function PmButtonHandler(){var n=this;setTimeout(function(){var t=bet365.Games.IoC.Container.bootstrap();n.gameLaunchService=t.resolve("gameLaunchService")},0)}function ExOvlControl(){this.shortGraphicMsg=null;this.longGraphicMsg=null;this.expOverlaySelector="#ovlMsg";this.expOverlayControl=$(this.expOverlaySelector);this.buttonHandler=new PmButtonHandler;this.isShortMsg=!0;this.overlayFadeDuration=750;this.closeGadget=null}function expandableOverlayInit(){thisExpControl===undefined&&(thisExpControl=new ExOvlControl,thisExpControl.closeGadget=thisExpControl.getExpOverlayElement("#dismiss"))}function OvlControl(){this.message=null;this.buttonHandler=new PmButtonHandler;this.overlaySelector="#ovlMsg";this.overlayControl=$(this.overlaySelector);this.layoutStyle={photo:"Photo",icon:"Icon",basic:"Basic",photoRegEx:/photo/i,iconRegEx:/icon/i};this.isWebMsgAlert=!1;this.defaultBodyHeight=118;this.defaultBodyTextHeight="auto";this.cssStyle={left:"left",top:"top",px:"px"};this.overlayFadeDuration=750;this.closeGadget=null;this.isPhoto=!1}function overlayControlInit(){thisOvlControl===undefined&&(thisOvlControl=new OvlControl)}function PmKeyValueCollection(){this.notExistIndex=-1;this.collection=[]}function PmPageProfile(){this.loginOrSession=0;this.areas=["0","10","11"];this.positions=new PmKeyValueCollection;this.gameGroupId="";this.gameId="";this.headerDropDownAvailable=!1}function PmMessageSchedule(n){var t=new Date;this.scheduledMessages=[];this.nextMsgDate=t.setHours(t.getHours()+24);this.nextMsg=null;this.timeoutID=-1;this.clearListener();this.positionId=n}function PmMessageCache(n){this.globalMessages=[];this.userMessages=[];this.scheduledMessages=new PmMessageSchedule(n);this.positionId=n}function PmPositionCache(){this.positions=[];this.positionPrefix="position_";this.scheduledMsgExpiredCallback="pmFramework.onScheduledMessage('{0}')"}function TbControl(){this.topLevelCtl="div[pmpositionid="+pmFramework.positionId.topBanner+"]";this.slideSpeed="slow";this.buttonHandler=new PmButtonHandler}function tbInitialise(){thisTbControl===undefined&&(thisTbControl=new TbControl,$("#TopBannerClose",thisTbControl.topLevelCtl).click(thisTbControl.closeUp))}function PmMessagingFramework(){this.pagePmPositionCache=new PmPositionCache;this.pageProfile=new PmPageProfile;this.pageProfileDiscovered=!1;this.pmData=null;this.positionId={overlay:1,overlayShort:2,overlayLong:3,topBanner:9,gameWindow:10,lobbyWindow:11,headerDropDown:12,overlayExpandable:13};this.areaId={all:0,home:1,section:2,selectedGame:3,allSections:8,promotionalPage:9,lobbyLaunch:10};this.customAttribs={positionId:"pmPositionId",areaId:"pmAreaId",gameSection:"pmGamesSectionId",gameId:"pmGameId",msgId:"pmmsgid",pushGraphicId:"pmpushgraphicid",isGlobal:"pmmsgisglobal",msgExpiry:"pmmsgexpiry"};this.gatewayApiTimeout=4e3;this.displayingExistingPopup=!1;this.impactId={na:0,normal:1,important:2,highImportance:3};this.headerType={fullLoad:"F",delta:"D"};this.messageAction={add:"A",update:"U",Delete:"D"};this.msgHandlerSelector="div["+this.customAttribs.positionId+"~='{0}']";this.mhrValues={global:1,highImportanceWebOnly:5,importantAnnouncement:6,pushGraphic:7,normalImportantWebOnly:8};this.gatewayServiceName={getGlobal:"getGlobalMessage.ashx",getUser:"getTargetedMessage.ashx",readUser:"updateMessage.ashx"};this.renderFailCode=-1;this.onPushMessageDataCalled=!1;this.additionalDataAttribs={highImportance:1,game:2,gameShown:3};this.showMsgDropDown=!1;this.isFirstLoadAfterLogin=!1;this.loginStatusChecked=!1;this.allowedLoggedInMessages=null;this.isDebug=!1;this.ttDebugInfo=!1;this.duringPageLoad=!1}function raiseError(n){typeof console=="object"&&console.log(n);pmFramework.isDebug&&(n.message!==undefined?$("#timeouts").append("Error Raised: "+n.message+"<br />line:"+n.lineNo+"<br />source:"+n.source+"<br />"):$("#timeouts").append("Error Raised: "+n+"<br />"))}function isNullOrUndefined(n){return n===undefined||n===null}function hasValue(n){return!isNullOrUndefined(n)&&(n.length!==undefined?n.length>0:!0)}function hasNonZeroValue(n){return hasValue(n)&&!isNaN(n)&&parseInt(n,10)!==0}function stringToInt(n){return typeof n=="string"?parseInt(n,10):n}function convertTimeSecsToMs(n){return hasNonZeroValue(n)?n*=1e3:n}function onPushMessageError(){raiseError("push messaging connection error - check service availability")}function onPushMessageData(n){var t,r,i,u,f;if(iboData===undefined){setTimeout(function(){onPushMessageData(n)},200);return}if(pmFramework.pmData=n,pmFramework.onPushMessageDataCalled=!0,pmFramework.duringPageLoad=!0,!pmFramework.loginStatusChecked&&(pmFramework.isFirstLoadAfterLogin=$("body").data("pageAttributes").IsFirstLoadAfterLogin=="True",pmFramework.isFirstLoadAfterLogin)){if(t="",pmFramework.pmData.messages!=null&&pmFramework.pmData.messages.length>0)for(r=0;r<pmFramework.pmData.messages.length;r++)i=pmFramework.pmData.messages[r],i.templates!=null&&i.templates.length>0&&(u=i.templates[0],u.rules!=null&&u.rules.length>0&&(f=u.rules[0],f.LS==0&&(t.length>0&&(t+=","),t+=i.MI)));t.length>0&&(pmFramework.allowedLoggedInMessages=t.split(","))}pmFramework.isDebug&&($("body").find("div#pmReceived").remove(),$("body").append('<div id="pmReceived"><span>Push Message(s) received:{0}<\/span><\/div>'.format(n.messages.length)));try{pmFramework.hasDataFlag()?setTimeout(function(){onPushMessageData(n)},6e3):(n.messages.length>0?pmFramework.processMessages(n):(pmFramework.discoverPositionsOnPage(),pmFramework.pageProfile.headerDropDownAvailable&&iboData.setMessageCount(0)),pmFramework.duringPageLoad=!1)}catch(e){raiseError(e)}pmFramework.loginStatusChecked=!0;bet365.PushMessageFramework.set(pmFramework)}function NewIboData(){this.messageHolder=$("#iboMessageHolder");this.messages=[];this.maxMessageCount=99;this.mailGlowIntervalId=0;this.notFoundIndex=-1;this.maxMsgChars=this.GetMaxMsgChars();this.effectDuration=250;this.mailGlowInterval=3e3}function newMessagesInitialise(){iboData===undefined&&(iboData=new NewIboData,$("#iboDismissImage").click(function(){$("#iboAnchor").fadeOut(this.effectDuration)}),$("#iboSummary").hover(function(){$(this).removeClass("iboSummaryInactive").addClass("iboSummaryActive")},function(){$(this).removeClass("iboSummaryActive").addClass("iboSummaryInactive")}),$("#iboSummary").unbind("click").click(function(){$("#iboAnchor .RML").click()}))}var _gsScope,swfobject,pmResolver,thisExpControl,thisOvlControl,thisTbControl,format,pmFramework,iboData,ns_lo_event,ns_lo_core_event,ns_loReadit,ns_loReadit_message,ns_loReadit_details,ns_loReadit_events,ns_loReadit_util,ns_loReadit_methods,ns_loReadit_clients,PushMessaging,__extends,bet365;(function(n,t){"use strict";function yt(n){var t=n.length,r=i.type(n);return i.isWindow(n)?!1:1===n.nodeType&&t?!0:"array"===r||"function"!==r&&(0===t||"number"==typeof t&&t>0&&t-1 in n)}function rf(n){var t=ii[n]={};return i.each(n.match(o)||[],function(n,i){t[i]=!0}),t}function pi(n,r,u,f){if(i.acceptData(n)){var s,h,c=i.expando,a="string"==typeof r,l=n.nodeType,o=l?i.cache:n,e=l?n[c]:n[c]&&c;if(e&&o[e]&&(f||o[e].data)||!a||u!==t)return e||(l?n[c]=e=w.pop()||i.guid++:e=c),o[e]||(o[e]={},l||(o[e].toJSON=i.noop)),("object"==typeof r||"function"==typeof r)&&(f?o[e]=i.extend(o[e],r):o[e].data=i.extend(o[e].data,r)),s=o[e],f||(s.data||(s.data={}),s=s.data),u!==t&&(s[i.camelCase(r)]=u),a?(h=s[r],null==h&&(h=s[i.camelCase(r)])):h=s,h}}function wi(n,t,r){if(i.acceptData(n)){var e,o,h,s=n.nodeType,u=s?i.cache:n,f=s?n[i.expando]:i.expando;if(u[f]){if(t&&(e=r?u[f]:u[f].data)){for(i.isArray(t)?t=t.concat(i.map(t,i.camelCase)):(t in e)?t=[t]:(t=i.camelCase(t),t=(t in e)?[t]:t.split(" ")),o=0,h=t.length;h>o;o++)delete e[t[o]];if(!(r?pt:i.isEmptyObject)(e))return}(r||(delete u[f].data,pt(u[f])))&&(s?i.cleanData([n],!0):i.support.deleteExpando||u!=u.window?delete u[f]:u[f]=null)}}}function bi(n,r,u){if(u===t&&1===n.nodeType){var f="data-"+r.replace(nu,"-$1").toLowerCase();if(u=n.getAttribute(f),"string"==typeof u){try{u="true"===u?!0:"false"===u?!1:"null"===u?null:+u+""===u?+u:gr.test(u)?i.parseJSON(u):u}catch(e){}i.data(n,r,u)}else u=t}return u}function pt(n){for(var t in n)if(("data"!==t||!i.isEmptyObject(n[t]))&&"toJSON"!==t)return!1;return!0}function rt(){return!0}function p(){return!1}function ki(n,t){do n=n[t];while(n&&1!==n.nodeType);return n}function di(n,t,r){if(t=t||0,i.isFunction(t))return i.grep(n,function(n,i){var u=!!t.call(n,i,n);return u===r});if(t.nodeType)return i.grep(n,function(n){return n===t===r});if("string"==typeof t){var u=i.grep(n,function(n){return 1===n.nodeType});if(ae.test(t))return i.filter(t,u,!r);t=i.filter(t,u)}return i.grep(n,function(n){return i.inArray(n,t)>=0===r})}function gi(n){var i=eu.split("|"),t=n.createDocumentFragment();if(t.createElement)for(;i.length;)t.createElement(i.pop());return t}function uf(n,t){return n.getElementsByTagName(t)[0]||n.appendChild(n.ownerDocument.createElement(t))}function nr(n){var t=n.getAttributeNode("type");return n.type=(t&&t.specified)+"/"+n.type,n}function tr(n){var t=ke.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function wt(n,t){for(var u,r=0;null!=(u=n[r]);r++)i._data(u,"globalEval",!t||i._data(t[r],"globalEval"))}function ir(n,t){if(1===t.nodeType&&i.hasData(n)){var u,f,o,s=i._data(n),r=i._data(t,s),e=s.events;if(e){delete r.handle;r.events={};for(u in e)for(f=0,o=e[u].length;o>f;f++)i.event.add(t,u,e[u][f])}r.data&&(r.data=i.extend({},r.data))}}function ff(n,t){var r,u,f;if(1===t.nodeType){if(r=t.nodeName.toLowerCase(),!i.support.noCloneEvent&&t[i.expando]){u=i._data(t);for(f in u.events)i.removeEvent(t,f,u.handle);t.removeAttribute(i.expando)}"script"===r&&t.text!==n.text?(nr(t).text=n.text,tr(t)):"object"===r?(t.parentNode&&(t.outerHTML=n.outerHTML),i.support.html5Clone&&n.innerHTML&&!i.trim(t.innerHTML)&&(t.innerHTML=n.innerHTML)):"input"===r&&si.test(n.type)?(t.defaultChecked=t.checked=n.checked,t.value!==n.value&&(t.value=n.value)):"option"===r?t.defaultSelected=t.selected=n.defaultSelected:("input"===r||"textarea"===r)&&(t.defaultValue=n.defaultValue)}}function u(n,r){var o,e,s=0,f=n.getElementsByTagName!==t?n.getElementsByTagName(r||"*"):n.querySelectorAll!==t?n.querySelectorAll(r||"*"):t;if(!f)for(f=[],o=n.childNodes||n;null!=(e=o[s]);s++)!r||i.nodeName(e,r)?f.push(e):i.merge(f,u(e,r));return r===t||r&&i.nodeName(n,r)?i.merge([n],f):f}function ef(n){si.test(n.type)&&(n.defaultChecked=n.checked)}function rr(n,t){if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),u=t,i=pu.length;i--;)if(t=pu[i]+r,t in n)return t;return u}function nt(n,t){return n=t||n,"none"===i.css(n,"display")||!i.contains(n.ownerDocument,n)}function ur(n,t){for(var r,f=[],u=0,e=n.length;e>u;u++)r=n[u],r.style&&(f[u]=i._data(r,"olddisplay"),t?(f[u]||"none"!==r.style.display||(r.style.display=""),""===r.style.display&&nt(r)&&(f[u]=i._data(r,"olddisplay",sr(r.nodeName)))):f[u]||nt(r)||i._data(r,"olddisplay",i.css(r,"display")));for(u=0;e>u;u++)r=n[u],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?f[u]||"":"none"));return n}function fr(n,t,i){var r=ro.exec(t);return r?Math.max(0,r[1]-(i||0))+(r[2]||"px"):t}function er(n,t,r,u,f){for(var e=r===(u?"border":"content")?4:"width"===t?1:0,o=0;4>e;e+=2)"margin"===r&&(o+=i.css(n,r+v[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+v[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+v[e]+"Width",!0,f))):(o+=i.css(n,"padding"+v[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+v[e]+"Width",!0,f)));return o}function or(n,t,r){var e=!0,u="width"===t?n.offsetWidth:n.offsetHeight,f=a(n),o=i.support.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,f);if(0>=u||null==u){if(u=l(n,t,f),(0>u||null==u)&&(u=n.style[t]),ht.test(u))return u;e=o&&(i.support.boxSizingReliable||u===n.style[t]);u=parseFloat(u)||0}return u+er(n,t,r||(o?"border":"content"),e,f)+"px"}function sr(n){var u=r,t=vu[n];return t||(t=hr(n,u),"none"!==t&&t||(tt=(tt||i("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(u.documentElement),u=(tt[0].contentWindow||tt[0].contentDocument).document,u.write("<!doctype html><html><body>"),u.close(),t=hr(n,u),tt.detach()),vu[n]=t),t}function hr(n,t){var r=i(t.createElement(n)).appendTo(t.body),u=i.css(r[0],"display");return r.remove(),u}function bt(n,t,r,u){var f;if(i.isArray(t))i.each(t,function(t,i){r||oo.test(n)?u(n,i):bt(n+"["+("object"==typeof i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)bt(n+"["+f+"]",t[f],r,u)}function cr(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(o)||[];if(i.isFunction(r))for(;u=e[f++];)"+"===u[0]?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function lr(n,r,u,f){function e(h){var c;return o[h]=!0,i.each(n[h]||[],function(n,i){var h=i(r,u,f);return"string"!=typeof h||s||o[h]?s?!(c=h):t:(r.dataTypes.unshift(h),e(h),!1)}),c}var o={},s=n===vi;return e(r.dataTypes[0])||!o["*"]&&e("*")}function kt(n,r){var u,f,e=i.ajaxSettings.flatOptions||{};for(u in r)r[u]!==t&&((e[u]?n:f||(f={}))[u]=r[u]);return f&&i.extend(!0,n,f),n}function of(n,i,r){var o,u,e,s,h=n.contents,f=n.dataTypes,c=n.responseFields;for(u in c)u in r&&(i[c[u]]=r[u]);for(;"*"===f[0];)f.shift(),o===t&&(o=n.mimeType||i.getResponseHeader("Content-Type"));if(o)for(u in h)if(h[u]&&h[u].test(o)){f.unshift(u);break}if(f[0]in r)e=f[0];else{for(u in r){if(!f[0]||n.converters[u+" "+f[0]]){e=u;break}s||(s=u)}e=e||s}return e?(e!==f[0]&&f.unshift(e),r[e]):t}function sf(n,t){var i,o,r,e,u={},h=0,s=n.dataTypes.slice(),f=s[0];if(n.dataFilter&&(t=n.dataFilter(t,n.dataType)),s[1])for(i in n.converters)u[i.toLowerCase()]=n.converters[i];for(;r=s[++h];)if("*"!==r){if("*"!==f&&f!==r){if(i=u[f+" "+r]||u["* "+r],!i)for(o in u)if(e=o.split(" "),e[1]===r&&(i=u[f+" "+e[0]]||u["* "+e[0]])){i===!0?i=u[o]:u[o]!==!0&&(r=e[0],s.splice(h--,0,r));break}if(i!==!0)if(i&&n.throws)t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+f+" to "+r}}}f=r}return{state:"success",data:t}}function ar(){try{return new n.XMLHttpRequest}catch(t){}}function hf(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function vr(){return setTimeout(function(){g=t}),g=i.now()}function cf(n,t){i.each(t,function(t,i){for(var u=(it[t]||[]).concat(it["*"]),r=0,f=u.length;f>r;r++)if(u[r].call(n,t,i))return})}function yr(n,t,r){var h,e,o=0,l=vt.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(e)return!1;for(var s=g||vr(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,o=u.tweens.length;o>r;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),1>i&&o?t:(f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:g||vr(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(e)return this;for(e=!0;r>i;i++)u.tweens[i].run(1);return t?f.resolveWith(n,[u,t]):f.rejectWith(n,[u,t]),this}}),s=u.props;for(lf(s,u.opts.specialEasing);l>o;o++)if(h=vt[o].call(u,n,s,u.opts))return h;return cf(u,s),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function lf(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],i.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function af(n,t,r){var o,u,a,w,s,v,l,f,b,h=this,e=n.style,y={},p=[],c=n.nodeType&&nt(n);r.queue||(f=i._queueHooks(n,"fx"),null==f.unqueued&&(f.unqueued=0,b=f.empty.fire,f.empty.fire=function(){f.unqueued||b()}),f.unqueued++,h.always(function(){h.always(function(){f.unqueued--;i.queue(n,"fx").length||f.empty.fire()})}));1===n.nodeType&&("height"in t||"width"in t)&&(r.overflow=[e.overflow,e.overflowX,e.overflowY],"inline"===i.css(n,"display")&&"none"===i.css(n,"float")&&(i.support.inlineBlockNeedsLayout&&"inline"!==sr(n.nodeName)?e.zoom=1:e.display="inline-block"));r.overflow&&(e.overflow="hidden",i.support.shrinkWrapBlocks||h.done(function(){e.overflow=r.overflow[0];e.overflowX=r.overflow[1];e.overflowY=r.overflow[2]}));for(o in t)if(a=t[o],yo.exec(a)){if(delete t[o],v=v||"toggle"===a,a===(c?"hide":"show"))continue;p.push(o)}if(w=p.length)for(s=i._data(n,"fxshow")||i._data(n,"fxshow",{}),("hidden"in s)&&(c=s.hidden),v&&(s.hidden=!c),c?i(n).show():h.done(function(){i(n).hide()}),h.done(function(){var t;i._removeData(n,"fxshow");for(t in y)i.style(n,t,y[t])}),o=0;w>o;o++)u=p[o],l=h.createTween(u,c?s[u]:0),y[u]=s[u]||i.style(n,u),u in s||(s[u]=l.start,c&&(l.end=l.start,l.start="width"===u||"height"===u?1:0))}function f(n,t,i,r,u){return new f.prototype.init(n,t,i,r,u)}function ut(n,t){var r,i={height:n},u=0;for(t=t?1:0;4>u;u+=2-t)r=v[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function pr(n){return i.isWindow(n)?n:9===n.nodeType?n.defaultView||n.parentWindow:!1}var wr,ft,r=n.document,vf=n.location,yf=n.jQuery,pf=n.$,et={},w=[],dt="1.9.0",br=w.concat,gt=w.push,h=w.slice,kr=w.indexOf,wf=et.toString,ni=et.hasOwnProperty,ti=dt.trim,i=function(n,t){return new i.fn.init(n,t,wr)},ot=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,o=/\S+/g,bf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,kf=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,dr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,df=/^[\],:{}\s]*$/,gf=/(?:^|:|,)(?:\s*\[)+/g,ne=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,te=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,ie=/^-ms-/,re=/-([\da-z])/gi,ue=function(n,t){return t.toUpperCase()},st=function(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",st,!1),i.ready()):"complete"===r.readyState&&(r.detachEvent("onreadystatechange",st),i.ready())},ii,gr,nu,yi,ct,k,d,tf,lt;i.fn=i.prototype={jquery:dt,constructor:i,init:function(n,u,f){var e,o;if(!n)return this;if("string"==typeof n){if(e="<"===n.charAt(0)&&">"===n.charAt(n.length-1)&&n.length>=3?[null,n,null]:kf.exec(n),!e||!e[1]&&u)return!u||u.jquery?(u||f).find(n):this.constructor(u).find(n);if(e[1]){if(u=u instanceof i?u[0]:u,i.merge(this,i.parseHTML(e[1],u&&u.nodeType?u.ownerDocument||u:r,!0)),dr.test(e[1])&&i.isPlainObject(u))for(e in u)i.isFunction(this[e])?this[e](u[e]):this.attr(e,u[e]);return this}if(o=r.getElementById(e[2]),o&&o.parentNode){if(o.id!==e[2])return f.find(n);this.length=1;this[0]=o}return this.context=r,this.selector=n,this}return n.nodeType?(this.context=this[0]=n,this.length=1,this):i.isFunction(n)?f.ready(n):(n.selector!==t&&(this.selector=n.selector,this.context=n.context),i.makeArray(n,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(n){return null==n?this.toArray():0>n?this[this.length+n]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t.context=this.context,t},each:function(n,t){return i.each(this,n,t)},ready:function(n){return i.ready.promise().done(n),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(0>n?i:0);return this.pushStack(t>=0&&i>t?[this[t]]:[])},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:gt,sort:[].sort,splice:[].splice};i.fn.init.prototype=i.fn;i.extend=i.fn.extend=function(){var o,e,u,r,s,h,n=arguments[0]||{},f=1,l=arguments.length,c=!1;for("boolean"==typeof n&&(c=n,n=arguments[1]||{},f=2),"object"==typeof n||i.isFunction(n)||(n={}),l===f&&(n=this,--f);l>f;f++)if(null!=(o=arguments[f]))for(e in o)u=n[e],r=o[e],n!==r&&(c&&r&&(i.isPlainObject(r)||(s=i.isArray(r)))?(s?(s=!1,h=u&&i.isArray(u)?u:[]):h=u&&i.isPlainObject(u)?u:{},n[e]=i.extend(c,h,r)):r!==t&&(n[e]=r));return n};i.extend({noConflict:function(t){return n.$===i&&(n.$=pf),t&&n.jQuery===i&&(n.jQuery=yf),i},isReady:!1,readyWait:1,holdReady:function(n){n?i.readyWait++:i.ready(!0)},ready:function(n){if(n===!0?!--i.readyWait:!i.isReady){if(!r.body)return setTimeout(i.ready);i.isReady=!0;n!==!0&&--i.readyWait>0||(ft.resolveWith(r,[i]),i.fn.trigger&&i(r).trigger("ready").off("ready"))}},isFunction:function(n){return"function"===i.type(n)},isArray:Array.isArray||function(n){return"array"===i.type(n)},isWindow:function(n){return null!=n&&n==n.window},isNumeric:function(n){return!isNaN(parseFloat(n))&&isFinite(n)},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?et[wf.call(n)]||"object":typeof n},isPlainObject:function(n){if(!n||"object"!==i.type(n)||n.nodeType||i.isWindow(n))return!1;try{if(n.constructor&&!ni.call(n,"constructor")&&!ni.call(n.constructor.prototype,"isPrototypeOf"))return!1}catch(u){return!1}for(var r in n);return r===t||ni.call(n,r)},isEmptyObject:function(n){for(var t in n)return!1;return!0},error:function(n){throw Error(n);},parseHTML:function(n,t,u){if(!n||"string"!=typeof n)return null;"boolean"==typeof t&&(u=t,t=!1);t=t||r;var f=dr.exec(n),e=!u&&[];return f?[t.createElement(f[1])]:(f=i.buildFragment([n],t,e),e&&i(e).remove(),i.merge([],f.childNodes))},parseJSON:function(r){return n.JSON&&n.JSON.parse?n.JSON.parse(r):null===r?r:"string"==typeof r&&(r=i.trim(r),r&&df.test(r.replace(ne,"@").replace(te,"]").replace(gf,"")))?Function("return "+r)():(i.error("Invalid JSON: "+r),t)},parseXML:function(r){var u,f;if(!r||"string"!=typeof r)return null;try{n.DOMParser?(f=new DOMParser,u=f.parseFromString(r,"text/xml")):(u=new ActiveXObject("Microsoft.XMLDOM"),u.async="false",u.loadXML(r))}catch(e){u=t}return u&&u.documentElement&&!u.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+r),u},noop:function(){},globalEval:function(t){t&&i.trim(t)&&(n.execScript||function(t){n.eval.call(n,t)})(t)},camelCase:function(n){return n.replace(ie,"ms-").replace(re,ue)},nodeName:function(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()},each:function(n,t,i){var u,r=0,f=n.length,e=yt(n);if(i){if(e)for(;f>r&&(u=t.apply(n[r],i),u!==!1);r++);else for(r in n)if(u=t.apply(n[r],i),u===!1)break}else if(e)for(;f>r&&(u=t.call(n[r],r,n[r]),u!==!1);r++);else for(r in n)if(u=t.call(n[r],r,n[r]),u===!1)break;return n},trim:ti&&!ti.call("﻿ ")?function(n){return null==n?"":ti.call(n)}:function(n){return null==n?"":(n+"").replace(bf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(yt(Object(n))?i.merge(r,"string"==typeof n?[n]:n):gt.call(r,n)),r},inArray:function(n,t,i){var r;if(t){if(kr)return kr.call(t,n,i);for(r=t.length,i=i?0>i?Math.max(0,r+i):i:0;r>i;i++)if(i in t&&t[i]===n)return i}return-1},merge:function(n,i){var f=i.length,u=n.length,r=0;if("number"==typeof f)for(;f>r;r++)n[u++]=i[r];else for(;i[r]!==t;)n[u++]=i[r++];return n.length=u,n},grep:function(n,t,i){var u,f=[],r=0,e=n.length;for(i=!!i;e>r;r++)u=!!t(n[r],r),i!==u&&f.push(n[r]);return f},map:function(n,t,i){var u,r=0,e=n.length,o=yt(n),f=[];if(o)for(;e>r;r++)u=t(n[r],r,i),null!=u&&(f[f.length]=u);else for(r in n)u=t(n[r],r,i),null!=u&&(f[f.length]=u);return br.apply([],f)},guid:1,proxy:function(n,r){var f,e,u;return"string"==typeof r&&(f=n[r],r=n,n=f),i.isFunction(n)?(e=h.call(arguments,2),u=function(){return n.apply(r||this,e.concat(h.call(arguments)))},u.guid=n.guid=n.guid||i.guid++,u):t},access:function(n,r,u,f,e,o,s){var h=0,l=n.length,c=null==u;if("object"===i.type(u)){e=!0;for(h in u)i.access(n,r,h,u[h],!0,o,s)}else if(f!==t&&(e=!0,i.isFunction(f)||(s=!0),c&&(s?(r.call(n,f),r=null):(c=r,r=function(n,t,r){return c.call(i(n),r)})),r))for(;l>h;h++)r(n[h],u,s?f:f.call(n[h],h,r(n[h],u)));return e?n:c?r.call(n):l?r(n[0],u):o},now:function(){return(new Date).getTime()}});i.ready.promise=function(t){if(!ft)if(ft=i.Deferred(),"complete"===r.readyState)setTimeout(i.ready);else if(r.addEventListener)r.addEventListener("DOMContentLoaded",st,!1),n.addEventListener("load",i.ready,!1);else{r.attachEvent("onreadystatechange",st);n.attachEvent("onload",i.ready);var u=!1;try{u=null==n.frameElement&&r.documentElement}catch(e){}u&&u.doScroll&&function f(){if(!i.isReady){try{u.doScroll("left")}catch(n){return setTimeout(f,50)}i.ready()}}()}return ft.promise(t)};i.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(n,t){et["[object "+t+"]"]=t.toLowerCase()});wr=i(r);ii={};i.Callbacks=function(n){n="string"==typeof n?ii[n]||rf(n):i.extend({},n);var f,c,o,l,s,e,r=[],u=!n.once&&[],a=function(t){for(f=n.memory&&t,c=!0,e=l||0,l=0,s=r.length,o=!0;r&&s>e;e++)if(r[e].apply(t[0],t[1])===!1&&n.stopOnFalse){f=!1;break}o=!1;r&&(u?u.length&&a(u.shift()):f?r=[]:h.disable())},h={add:function(){if(r){var t=r.length;(function u(t){i.each(t,function(t,f){var e=i.type(f);"function"===e?n.unique&&h.has(f)||r.push(f):f&&f.length&&"string"!==e&&u(f)})})(arguments);o?s=r.length:f&&(l=t,a(f))}return this},remove:function(){return r&&i.each(arguments,function(n,t){for(var u;(u=i.inArray(t,r,u))>-1;)r.splice(u,1),o&&(s>=u&&s--,e>=u&&e--)}),this},has:function(n){return i.inArray(n,r)>-1},empty:function(){return r=[],this},disable:function(){return r=u=f=t,this},disabled:function(){return!r},lock:function(){return u=t,f||h.disable(),this},locked:function(){return!u},fireWith:function(n,t){return t=t||[],t=[n,t.slice?t.slice():t],!r||c&&!u||(o?u.push(t):a(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h};i.extend({Deferred:function(n){var u=[["resolve","done",i.Callbacks("once memory"),"resolved"],["reject","fail",i.Callbacks("once memory"),"rejected"],["notify","progress",i.Callbacks("memory")]],f="pending",r={state:function(){return f},always:function(){return t.done(arguments).fail(arguments),this},then:function(){var n=arguments;return i.Deferred(function(f){i.each(u,function(u,e){var s=e[0],o=i.isFunction(n[u])&&n[u];t[e[1]](function(){var n=o&&o.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().done(f.resolve).fail(f.reject).progress(f.notify):f[s+"With"](this===r?f.promise():this,o?[n]:arguments)})});n=null}).promise()},promise:function(n){return null!=n?i.extend(n,r):r}},t={};return r.pipe=r.then,i.each(u,function(n,i){var e=i[2],o=i[3];r[i[1]]=e.add;o&&e.add(function(){f=o},u[1^n][2].disable,u[2][2].lock);t[i[0]]=function(){return t[i[0]+"With"](this===t?r:this,arguments),this};t[i[0]+"With"]=e.fireWith}),r.promise(t),n&&n.call(t,t),t},when:function(n){var o,c,s,t=0,u=h.call(arguments),r=u.length,e=1!==r||n&&i.isFunction(n.promise)?r:0,f=1===e?n:i.Deferred(),l=function(n,t,i){return function(r){t[n]=this;i[n]=arguments.length>1?h.call(arguments):r;i===o?f.notifyWith(t,i):--e||f.resolveWith(t,i)}};if(r>1)for(o=Array(r),c=Array(r),s=Array(r);r>t;t++)u[t]&&i.isFunction(u[t].promise)?u[t].promise().done(l(t,s,u)).fail(f.reject).progress(l(t,c,o)):--e;return e||f.resolveWith(s,u),f.promise()}});i.support=function(){var f,s,o,h,c,e,l,a,y,v,u=r.createElement("div");if(u.setAttribute("className","t"),u.innerHTML="  <link/><table><\/table><a href='/a'>a<\/a><input type='checkbox'/>",s=u.getElementsByTagName("*"),o=u.getElementsByTagName("a")[0],!s||!o||!s.length)return{};h=r.createElement("select");c=h.appendChild(r.createElement("option"));e=u.getElementsByTagName("input")[0];o.style.cssText="top:1px;float:left;opacity:.5";f={getSetAttribute:"t"!==u.className,leadingWhitespace:3===u.firstChild.nodeType,tbody:!u.getElementsByTagName("tbody").length,htmlSerialize:!!u.getElementsByTagName("link").length,style:/top/.test(o.getAttribute("style")),hrefNormalized:"/a"===o.getAttribute("href"),opacity:/^0.5/.test(o.style.opacity),cssFloat:!!o.style.cssFloat,checkOn:!!e.value,optSelected:c.selected,enctype:!!r.createElement("form").enctype,html5Clone:"<:nav><\/:nav>"!==r.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===r.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};e.checked=!0;f.noCloneChecked=e.cloneNode(!0).checked;h.disabled=!0;f.optDisabled=!c.disabled;try{delete u.test}catch(p){f.deleteExpando=!1}e=r.createElement("input");e.setAttribute("value","");f.input=""===e.getAttribute("value");e.value="t";e.setAttribute("type","radio");f.radioValue="t"===e.value;e.setAttribute("checked","t");e.setAttribute("name","t");l=r.createDocumentFragment();l.appendChild(e);f.appendChecked=e.checked;f.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked;u.attachEvent&&(u.attachEvent("onclick",function(){f.noCloneEvent=!1}),u.cloneNode(!0).click());for(v in{submit:!0,change:!0,focusin:!0})u.setAttribute(a="on"+v,"t"),f[v+"Bubbles"]=a in n||u.attributes[a].expando===!1;return u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,i(function(){var o,e,i,h="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=r.getElementsByTagName("body")[0];s&&(o=r.createElement("div"),o.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(o).appendChild(u),u.innerHTML="<table><tr><td><\/td><td>t<\/td><\/tr><\/table>",i=u.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",y=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",f.reliableHiddenOffsets=y&&0===i[0].offsetHeight,u.innerHTML="",u.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",f.boxSizing=4===u.offsetWidth,f.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,n.getComputedStyle&&(f.pixelPosition="1%"!==(n.getComputedStyle(u,null)||{}).top,f.boxSizingReliable="4px"===(n.getComputedStyle(u,null)||{width:"4px"}).width,e=u.appendChild(r.createElement("div")),e.style.cssText=u.style.cssText=h,e.style.marginRight=e.style.width="0",u.style.width="1px",f.reliableMarginRight=!parseFloat((n.getComputedStyle(e,null)||{}).marginRight)),u.style.zoom!==t&&(u.innerHTML="",u.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",f.inlineBlockNeedsLayout=3===u.offsetWidth,u.style.display="block",u.innerHTML="<div><\/div>",u.firstChild.style.width="5px",f.shrinkWrapBlocks=3!==u.offsetWidth,s.style.zoom=1),s.removeChild(o),o=u=i=e=null)}),s=h=l=c=o=e=null,f}();gr=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;nu=/([A-Z])/g;i.extend({cache:{},expando:"jQuery"+(dt+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(n){return n=n.nodeType?i.cache[n[i.expando]]:n[i.expando],!!n&&!pt(n)},data:function(n,t,i){return pi(n,t,i,!1)},removeData:function(n,t){return wi(n,t,!1)},_data:function(n,t,i){return pi(n,t,i,!0)},_removeData:function(n,t){return wi(n,t,!0)},acceptData:function(n){var t=n.nodeName&&i.noData[n.nodeName.toLowerCase()];return!t||t!==!0&&n.getAttribute("classid")===t}});i.fn.extend({data:function(n,r){var e,f,u=this[0],o=0,s=null;if(n===t){if(this.length&&(s=i.data(u),1===u.nodeType&&!i._data(u,"parsedAttrs"))){for(e=u.attributes;e.length>o;o++)f=e[o].name,f.indexOf("data-")||(f=i.camelCase(f.substring(5)),bi(u,f,s[f]));i._data(u,"parsedAttrs",!0)}return s}return"object"==typeof n?this.each(function(){i.data(this,n)}):i.access(this,function(r){return r===t?u?bi(u,n,i.data(u,n)):null:(this.each(function(){i.data(this,n,r)}),t)},null,r,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){i.removeData(this,n)})}});i.extend({queue:function(n,r,u){var f;return n?(r=(r||"fx")+"queue",f=i._data(n,r),u&&(!f||i.isArray(u)?f=i._data(n,r,i.makeArray(u)):f.push(u)),f||[]):t},dequeue:function(n,t){t=t||"fx";var f=i.queue(n,t),e=f.length,r=f.shift(),u=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===r&&(r=f.shift(),e--);u.cur=r;r&&("fx"===t&&f.unshift("inprogress"),delete u.stop,r.call(n,o,u));!e&&u&&u.empty.fire()},_queueHooks:function(n,t){var r=t+"queueHooks";return i._data(n,r)||i._data(n,r,{empty:i.Callbacks("once memory").add(function(){i._removeData(n,t+"queue");i._removeData(n,r)})})}});i.fn.extend({queue:function(n,r){var u=2;return"string"!=typeof n&&(r=n,n="fx",u--),u>arguments.length?i.queue(this[0],n):r===t?this:this.each(function(){var t=i.queue(this,n,r);i._queueHooks(this,n);"fx"===n&&"inprogress"!==t[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},delay:function(n,t){return n=i.fx?i.fx.speeds[n]||n:n,t=t||"fx",this.queue(t,function(t,i){var r=setTimeout(t,n);i.stop=function(){clearTimeout(r)}})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,r){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for("string"!=typeof n&&(r=n,n=t),n=n||"fx";s--;)u=i._data(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(r)}});var b,tu,ri=/[\t\r\n]/g,fe=/\r/g,ee=/^(?:input|select|textarea|button|object)$/i,oe=/^(?:a|area)$/i,iu=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,ui=/^(?:checked|selected)$/i,c=i.support.getSetAttribute,fi=i.support.input;i.fn.extend({attr:function(n,t){return i.access(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})},prop:function(n,t){return i.access(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return n=i.propFix[n]||n,this.each(function(){try{this[n]=t;delete this[n]}catch(i){}})},addClass:function(n){var e,t,r,u,s,f=0,h=this.length,c="string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(o)||[];h>f;f++)if(t=this[f],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(ri," "):" ")){for(s=0;u=e[s++];)0>r.indexOf(" "+u+" ")&&(r+=u+" ");t.className=i.trim(r)}return this},removeClass:function(n){var e,t,r,u,s,f=0,h=this.length,c=0===arguments.length||"string"==typeof n&&n;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,this.className))});if(c)for(e=(n||"").match(o)||[];h>f;f++)if(t=this[f],r=1===t.nodeType&&(t.className?(" "+t.className+" ").replace(ri," "):"")){for(s=0;u=e[s++];)for(;r.indexOf(" "+u+" ")>=0;)r=r.replace(" "+u+" "," ");t.className=n?i.trim(r):""}return this},toggleClass:function(n,t){var r=typeof n,u="boolean"==typeof t;return i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,this.className,t),t)}):this.each(function(){if("string"===r)for(var f,h=0,s=i(this),e=t,c=n.match(o)||[];f=c[h++];)e=u?e:!s.hasClass(f),s[e?"addClass":"removeClass"](f);else("undefined"===r||"boolean"===r)&&(this.className&&i._data(this,"__className__",this.className),this.className=this.className||n===!1?"":i._data(this,"__className__")||"")})},hasClass:function(n){for(var i=" "+n+" ",t=0,r=this.length;r>t;t++)if(1===this[t].nodeType&&(" "+this[t].className+" ").replace(ri," ").indexOf(i)>=0)return!0;return!1},val:function(n){var r,u,e,f=this[0];return arguments.length?(e=i.isFunction(n),this.each(function(u){var f,o=i(this);1===this.nodeType&&(f=e?n.call(this,u,o.val()):n,null==f?f="":"number"==typeof f?f+="":i.isArray(f)&&(f=i.map(f,function(n){return null==n?"":n+""})),r=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,f,"value")!==t||(this.value=f))})):f?(r=i.valHooks[f.type]||i.valHooks[f.nodeName.toLowerCase()],r&&"get"in r&&(u=r.get(f,"value"))!==t?u:(u=f.value,"string"==typeof u?u.replace(fe,""):null==u?"":u)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=n.attributes.value;return!t||t.specified?n.value:n.text}},select:{get:function(n){for(var e,t,o=n.options,r=n.selectedIndex,u="select-one"===n.type||0>r,s=u?null:[],h=u?r+1:o.length,f=0>r?h:u?r:0;h>f;f++)if(t=o[f],!(!t.selected&&f!==r||(i.support.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&i.nodeName(t.parentNode,"optgroup"))){if(e=i(t).val(),u)return e;s.push(e)}return s},set:function(n,t){var r=i.makeArray(t);return i(n).find("option").each(function(){this.selected=i.inArray(i(this).val(),r)>=0}),r.length||(n.selectedIndex=-1),r}}},attr:function(n,r,u){var f,e,o,s=n.nodeType;if(n&&3!==s&&8!==s&&2!==s)return n.getAttribute===t?i.prop(n,r,u):(o=1!==s||!i.isXMLDoc(n),o&&(r=r.toLowerCase(),e=i.attrHooks[r]||(iu.test(r)?tu:b)),u===t?e&&o&&"get"in e&&null!==(f=e.get(n,r))?f:(n.getAttribute!==t&&(f=n.getAttribute(r)),null==f?t:f):null!==u?e&&o&&"set"in e&&(f=e.set(n,u,r))!==t?f:(n.setAttribute(r,u+""),u):(i.removeAttr(n,r),t))},removeAttr:function(n,t){var r,u,e=0,f=t&&t.match(o);if(f&&1===n.nodeType)for(;r=f[e++];)u=i.propFix[r]||r,iu.test(r)?!c&&ui.test(r)?n[i.camelCase("default-"+r)]=n[u]=!1:n[u]=!1:i.attr(n,r,""),n.removeAttribute(c?r:u)},attrHooks:{type:{set:function(n,t){if(!i.support.radioValue&&"radio"===t&&i.nodeName(n,"input")){var r=n.value;return n.setAttribute("type",t),r&&(n.value=r),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(n,r,u){var e,f,s,o=n.nodeType;if(n&&3!==o&&8!==o&&2!==o)return s=1!==o||!i.isXMLDoc(n),s&&(r=i.propFix[r]||r,f=i.propHooks[r]),u!==t?f&&"set"in f&&(e=f.set(n,u,r))!==t?e:n[r]=u:f&&"get"in f&&null!==(e=f.get(n,r))?e:n[r]},propHooks:{tabIndex:{get:function(n){var i=n.getAttributeNode("tabindex");return i&&i.specified?parseInt(i.value,10):ee.test(n.nodeName)||oe.test(n.nodeName)&&n.href?0:t}}}});tu={get:function(n,r){var u=i.prop(n,r),f="boolean"==typeof u&&n.getAttribute(r),e="boolean"==typeof u?fi&&c?null!=f:ui.test(r)?n[i.camelCase("default-"+r)]:!!f:n.getAttributeNode(r);return e&&e.value!==!1?r.toLowerCase():t},set:function(n,t,r){return t===!1?i.removeAttr(n,r):fi&&c||!ui.test(r)?n.setAttribute(!c&&i.propFix[r]||r,r):n[i.camelCase("default-"+r)]=n[r]=!0,r}};fi&&c||(i.attrHooks.value={get:function(n,r){var u=n.getAttributeNode(r);return i.nodeName(n,"input")?n.defaultValue:u&&u.specified?u.value:t},set:function(n,r,u){return i.nodeName(n,"input")?(n.defaultValue=r,t):b&&b.set(n,r,u)}});c||(b=i.valHooks.button={get:function(n,i){var r=n.getAttributeNode(i);return r&&("id"===i||"name"===i||"coords"===i?""!==r.value:r.specified)?r.value:t},set:function(n,i,r){var u=n.getAttributeNode(r);return u||n.setAttributeNode(u=n.ownerDocument.createAttribute(r)),u.value=i+="","value"===r||i===n.getAttribute(r)?i:t}},i.attrHooks.contenteditable={get:b.get,set:function(n,t,i){b.set(n,""===t?!1:t,i)}},i.each(["width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{set:function(n,i){return""===i?(n.setAttribute(r,"auto"),i):t}})}));i.support.hrefNormalized||(i.each(["href","src","width","height"],function(n,r){i.attrHooks[r]=i.extend(i.attrHooks[r],{get:function(n){var i=n.getAttribute(r,2);return null==i?t:i}})}),i.each(["href","src"],function(n,t){i.propHooks[t]={get:function(n){return n.getAttribute(t,4)}}}));i.support.style||(i.attrHooks.style={get:function(n){return n.style.cssText||t},set:function(n,t){return n.style.cssText=t+""}});i.support.optSelected||(i.propHooks.selected=i.extend(i.propHooks.selected,{get:function(n){var t=n.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}));i.support.enctype||(i.propFix.enctype="encoding");i.support.checkOn||i.each(["radio","checkbox"],function(){i.valHooks[this]={get:function(n){return null===n.getAttribute("value")?"on":n.value}}});i.each(["radio","checkbox"],function(){i.valHooks[this]=i.extend(i.valHooks[this],{set:function(n,r){return i.isArray(r)?n.checked=i.inArray(i(n).val(),r)>=0:t}})});var ei=/^(?:input|select|textarea)$/i,se=/^key/,he=/^(?:mouse|contextmenu)|click/,ru=/^(?:focusinfocus|focusoutblur)$/,uu=/^([^.]*)(?:\.(.+)|)$/;i.event={global:{},add:function(n,r,u,f,e){var y,c,w,p,b,l,h,a,s,k,d,v=3!==n.nodeType&&8!==n.nodeType&&i._data(n);if(v){for(u.handler&&(y=u,u=y.handler,e=y.selector),u.guid||(u.guid=i.guid++),(p=v.events)||(p=v.events={}),(c=v.handle)||(c=v.handle=function(n){return i===t||n&&i.event.triggered===n.type?t:i.event.dispatch.apply(c.elem,arguments)},c.elem=n),r=(r||"").match(o)||[""],b=r.length;b--;)w=uu.exec(r[b])||[],s=d=w[1],k=(w[2]||"").split(".").sort(),h=i.event.special[s]||{},s=(e?h.delegateType:h.bindType)||s,h=i.event.special[s]||{},l=i.extend({type:s,origType:d,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:k.join(".")},y),(a=p[s])||(a=p[s]=[],a.delegateCount=0,h.setup&&h.setup.call(n,f,k,c)!==!1||(n.addEventListener?n.addEventListener(s,c,!1):n.attachEvent&&n.attachEvent("on"+s,c))),h.add&&(h.add.call(n,l),l.handler.guid||(l.handler.guid=u.guid)),e?a.splice(a.delegateCount++,0,l):a.push(l),i.event.global[s]=!0;n=null}},remove:function(n,t,r,u,f){var y,b,h,a,p,s,c,l,e,w,k,v=i.hasData(n)&&i._data(n);if(v&&(a=v.events)){for(t=(t||"").match(o)||[""],p=t.length;p--;)if(h=uu.exec(t[p])||[],e=k=h[1],w=(h[2]||"").split(".").sort(),e){for(c=i.event.special[e]||{},e=(u?c.delegateType:c.bindType)||e,l=a[e]||[],h=h[2]&&RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)"),b=y=l.length;y--;)s=l[y],!f&&k!==s.origType||r&&r.guid!==s.guid||h&&!h.test(s.namespace)||u&&u!==s.selector&&("**"!==u||!s.selector)||(l.splice(y,1),s.selector&&l.delegateCount--,c.remove&&c.remove.call(n,s));b&&!l.length&&(c.teardown&&c.teardown.call(n,w,v.handle)!==!1||i.removeEvent(n,e,v.handle),delete a[e])}else for(e in a)i.event.remove(n,e+t[p],r,u,!0);i.isEmptyObject(a)&&(delete v.handle,i._removeData(n,"events"))}},trigger:function(u,f,e,o){var p,h,c,w,a,v,l,b=[e||r],s=u.type||u,y=u.namespace?u.namespace.split("."):[];if(h=c=e=e||r,3!==e.nodeType&&8!==e.nodeType&&!ru.test(s+i.event.triggered)&&(s.indexOf(".")>=0&&(y=s.split("."),s=y.shift(),y.sort()),a=0>s.indexOf(":")&&"on"+s,u=u[i.expando]?u:new i.Event(s,"object"==typeof u&&u),u.isTrigger=!0,u.namespace=y.join("."),u.namespace_re=u.namespace?RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=t,u.target||(u.target=e),f=null==f?[u]:i.makeArray(f,[u]),l=i.event.special[s]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(w=l.delegateType||s,ru.test(w+s)||(h=h.parentNode);h;h=h.parentNode)b.push(h),c=h;c===(e.ownerDocument||r)&&b.push(c.defaultView||c.parentWindow||n)}for(p=0;(h=b[p++])&&!u.isPropagationStopped();)u.type=p>1?w:l.bindType||s,v=(i._data(h,"events")||{})[u.type]&&i._data(h,"handle"),v&&v.apply(h,f),v=a&&h[a],v&&i.acceptData(h)&&v.apply&&v.apply(h,f)===!1&&u.preventDefault();if(u.type=s,!(o||u.isDefaultPrevented()||l._default&&l._default.apply(e.ownerDocument,f)!==!1||"click"===s&&i.nodeName(e,"a")||!i.acceptData(e)||!a||!e[s]||i.isWindow(e))){c=e[a];c&&(e[a]=null);i.event.triggered=s;try{e[s]()}catch(k){}i.event.triggered=t;c&&(e[a]=c)}return u.result}},dispatch:function(n){n=i.event.fix(n);var o,s,e,u,r,c=[],l=h.call(arguments),a=(i._data(this,"events")||{})[n.type]||[],f=i.event.special[n.type]||{};if(l[0]=n,n.delegateTarget=this,!f.preDispatch||f.preDispatch.call(this,n)!==!1){for(c=i.event.handlers.call(this,n,a),o=0;(u=c[o++])&&!n.isPropagationStopped();)for(n.currentTarget=u.elem,s=0;(r=u.handlers[s++])&&!n.isImmediatePropagationStopped();)(!n.namespace_re||n.namespace_re.test(r.namespace))&&(n.handleObj=r,n.data=r.data,e=((i.event.special[r.origType]||{}).handle||r.handler).apply(u.elem,l),e!==t&&(n.result=e)===!1&&(n.preventDefault(),n.stopPropagation()));return f.postDispatch&&f.postDispatch.call(this,n),n.result}},handlers:function(n,r){var o,f,e,s,c=[],h=r.delegateCount,u=n.target;if(h&&u.nodeType&&(!n.button||"click"!==n.type))for(;u!=this;u=u.parentNode||this)if(u.disabled!==!0||"click"!==n.type){for(f=[],o=0;h>o;o++)s=r[o],e=s.selector+" ",f[e]===t&&(f[e]=s.needsContext?i(e,this).index(u)>=0:i.find(e,this,null,[u]).length),f[e]&&f.push(s);f.length&&c.push({elem:u,handlers:f})}return r.length>h&&c.push({elem:this,handlers:r.slice(h)}),c},fix:function(n){if(n[i.expando])return n;var f,e,t=n,u=i.event.fixHooks[n.type]||{},o=u.props?this.props.concat(u.props):this.props;for(n=new i.Event(t),f=o.length;f--;)e=o[f],n[e]=t[e];return n.target||(n.target=t.srcElement||r),3===n.target.nodeType&&(n.target=n.target.parentNode),n.metaKey=!!n.metaKey,u.filter?u.filter(n,t):n},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(n,t){return null==n.which&&(n.which=null!=t.charCode?t.charCode:t.keyCode),n}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(n,i){var o,u,f,e=i.button,s=i.fromElement;return null==n.pageX&&null!=i.clientX&&(o=n.target.ownerDocument||r,u=o.documentElement,f=o.body,n.pageX=i.clientX+(u&&u.scrollLeft||f&&f.scrollLeft||0)-(u&&u.clientLeft||f&&f.clientLeft||0),n.pageY=i.clientY+(u&&u.scrollTop||f&&f.scrollTop||0)-(u&&u.clientTop||f&&f.clientTop||0)),!n.relatedTarget&&s&&(n.relatedTarget=s===n.target?i.toElement:s),n.which||e===t||(n.which=1&e?1:2&e?3:4&e?2:0),n}},special:{load:{noBubble:!0},click:{trigger:function(){return i.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==r.activeElement&&this.focus)try{return this.focus(),!1}catch(n){}},delegateType:"focusin"},blur:{trigger:function(){return this===r.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(n){n.result!==t&&(n.originalEvent.returnValue=n.result)}}},simulate:function(n,t,r,u){var f=i.extend(new i.Event,r,{type:n,isSimulated:!0,originalEvent:{}});u?i.event.trigger(f,null,t):i.event.dispatch.call(t,f);f.isDefaultPrevented()&&r.preventDefault()}};i.removeEvent=r.removeEventListener?function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i,!1)}:function(n,i,r){var u="on"+i;n.detachEvent&&(n[u]===t&&(n[u]=null),n.detachEvent(u,r))};i.Event=function(n,r){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.returnValue===!1||n.getPreventDefault&&n.getPreventDefault()?rt:p):this.type=n,r&&i.extend(this,r),this.timeStamp=n&&n.timeStamp||i.now(),this[i.expando]=!0,t):new i.Event(n,r)};i.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=rt;n&&(n.preventDefault?n.preventDefault():n.returnValue=!1)},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=rt;n&&(n.stopPropagation&&n.stopPropagation(),n.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=rt;this.stopPropagation()}};i.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return(!r||r!==f&&!i.contains(f,r))&&(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.support.submitBubbles||(i.event.special.submit={setup:function(){return i.nodeName(this,"form")?!1:(i.event.add(this,"click._submit keypress._submit",function(n){var u=n.target,r=i.nodeName(u,"input")||i.nodeName(u,"button")?u.form:t;r&&!i._data(r,"submitBubbles")&&(i.event.add(r,"submit._submit",function(n){n._submit_bubble=!0}),i._data(r,"submitBubbles",!0))}),t)},postDispatch:function(n){n._submit_bubble&&(delete n._submit_bubble,this.parentNode&&!n.isTrigger&&i.event.simulate("submit",this.parentNode,n,!0))},teardown:function(){return i.nodeName(this,"form")?!1:(i.event.remove(this,"._submit"),t)}});i.support.changeBubbles||(i.event.special.change={setup:function(){return ei.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(i.event.add(this,"propertychange._change",function(n){"checked"===n.originalEvent.propertyName&&(this._just_changed=!0)}),i.event.add(this,"click._change",function(n){this._just_changed&&!n.isTrigger&&(this._just_changed=!1);i.event.simulate("change",this,n,!0)})),!1):(i.event.add(this,"beforeactivate._change",function(n){var t=n.target;ei.test(t.nodeName)&&!i._data(t,"changeBubbles")&&(i.event.add(t,"change._change",function(n){!this.parentNode||n.isSimulated||n.isTrigger||i.event.simulate("change",this.parentNode,n,!0)}),i._data(t,"changeBubbles",!0))}),t)},handle:function(n){var i=n.target;return this!==i||n.isSimulated||n.isTrigger||"radio"!==i.type&&"checkbox"!==i.type?n.handleObj.handler.apply(this,arguments):t},teardown:function(){return i.event.remove(this,"._change"),!ei.test(this.nodeName)}});i.support.focusinBubbles||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=0,f=function(n){i.event.simulate(t,n.target,i.event.fix(n),!0)};i.event.special[t]={setup:function(){0==u++&&r.addEventListener(n,f,!0)},teardown:function(){0==--u&&r.removeEventListener(n,f,!0)}}});i.fn.extend({on:function(n,r,u,f,e){var o,s;if("object"==typeof n){"string"!=typeof r&&(u=u||r,r=t);for(s in n)this.on(s,r,u,n[s],e);return this}if(null==u&&null==f?(f=r,u=r=t):null==f&&("string"==typeof r?(f=u,u=t):(f=u,u=r,r=t)),f===!1)f=p;else if(!f)return this;return 1===e&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),this.each(function(){i.event.add(this,n,f,u,r)})},one:function(n,t,i,r){return this.on(n,t,i,r,1)},off:function(n,r,u){var f,e;if(n&&n.preventDefault&&n.handleObj)return f=n.handleObj,i(n.delegateTarget).off(f.namespace?f.origType+"."+f.namespace:f.origType,f.selector,f.handler),this;if("object"==typeof n){for(e in n)this.off(e,r,n[e]);return this}return(r===!1||"function"==typeof r)&&(u=r,r=t),u===!1&&(u=p),this.each(function(){i.event.remove(this,n,u,r)})},bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)},trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,r){var u=this[0];return u?i.event.trigger(n,r,u,!0):t},hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}});i.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)};se.test(t)&&(i.event.fixHooks[t]=i.event.keyHooks);he.test(t)&&(i.event.fixHooks[t]=i.event.mouseHooks)}),function(n,t){function bt(n){return er.test(n+"")}function kt(){var n,t=[];return n=function(i,u){return t.push(i+=" ")>r.cacheLength&&delete n[t.shift()],n[i]=u}}function c(n){return n[f]=!0,n}function p(n){var t=s.createElement("div");try{return n(t)}catch(i){return!1}finally{t=null}}function u(n,t,i,r){var y,u,e,c,p,v,w,h,k,b;if((t?t.ownerDocument||t:d)!==s&&it(t),t=t||s,i=i||[],!n||"string"!=typeof n)return i;if(1!==(c=t.nodeType)&&9!==c)return[];if(!l&&!r){if(y=or.exec(n))if(e=y[1]){if(9===c){if(u=t.getElementById(e),!u||!u.parentNode)return i;if(u.id===e)return i.push(u),i}else if(t.ownerDocument&&(u=t.ownerDocument.getElementById(e))&&ut(t,u)&&u.id===e)return i.push(u),i}else{if(y[2])return ft.apply(i,et.call(t.getElementsByTagName(n),0)),i;if((e=y[3])&&o.getByClassName&&t.getElementsByClassName)return ft.apply(i,et.call(t.getElementsByClassName(e),0)),i}if(o.qsa&&!a.test(n)){if(w=!0,h=f,k=t,b=9===c&&n,1===c&&"object"!==t.nodeName.toLowerCase()){for(v=ot(n),(w=t.getAttribute("id"))?h=w.replace(cr,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",p=v.length;p--;)v[p]=h+st(v[p]);k=ei.test(n)&&t.parentNode||t;b=v.join(",")}if(b)try{return ft.apply(i,et.call(k.querySelectorAll(b),0)),i}catch(g){}finally{w||t.removeAttribute("id")}}}return gi(n.replace(pt,"$1"),t,i,r)}function oi(n,t){for(var i=n&&t&&n.nextSibling;i;i=i.nextSibling)if(i===t)return-1;return n?1:-1}function wi(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function bi(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function k(n){return c(function(t){return t=+t,c(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ot(n,t){var e,f,s,o,i,h,c,l=li[n+" "];if(l)return t?0:l.slice(0);for(i=n,h=[],c=r.preFilter;i;){(!e||(f=ir.exec(i)))&&(f&&(i=i.slice(f[0].length)||i),h.push(s=[]));e=!1;(f=rr.exec(i))&&(e=f.shift(),s.push({value:e,type:f[0].replace(pt," ")}),i=i.slice(e.length));for(o in r.filter)(f=wt[o].exec(i))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),i=i.slice(e.length));if(!e)break}return t?i.length:i?u.error(n):li(n,h).slice(0)}function st(n){for(var t=0,r=n.length,i="";r>t;t++)i+=n[t].value;return i}function dt(n,t,i){var r=t.dir,u=i&&"parentNode"===t.dir,e=nr++;return t.first?function(t,i,f){for(;t=t[r];)if(1===t.nodeType||u)return n(t,i,f)}:function(t,i,o){var h,s,c,l=v+" "+e;if(o){for(;t=t[r];)if((1===t.nodeType||u)&&n(t,i,o))return!0}else for(;t=t[r];)if(1===t.nodeType||u)if(c=t[f]||(t[f]={}),(s=c[r])&&s[0]===l){if((h=s[1])===!0||h===ct)return h===!0}else if(s=c[r]=[l],s[1]=n(t,i,o)||ct,s[1]===!0)return!0}}function gt(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function ht(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;s>f;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function ni(n,t,i,r,u,e){return r&&!r[f]&&(r=ni(r)),u&&!u[f]&&(u=ni(u,e)),c(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||di(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?b:ht(b,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=ht(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?ui.call(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=ht(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):ft.apply(e,h)})}function ti(n){for(var s,u,i,o=n.length,h=r.relative[n[0].type],c=h||r.relative[" "],t=h?1:0,l=dt(function(n){return n===s},c,!0),a=dt(function(n){return ui.call(s,n)>-1},c,!0),e=[function(n,t,i){return!h&&(i||t!==at)||((s=t).nodeType?l(n,t,i):a(n,t,i))}];o>t;t++)if(u=r.relative[n[t].type])e=[dt(gt(e),u)];else{if(u=r.filter[n[t].type].apply(null,n[t].matches),u[f]){for(i=++t;o>i&&!r.relative[n[i].type];i++);return ni(t>1&&gt(e),t>1&&st(n.slice(0,t-1)).replace(pt,"$1"),u,i>t&&ti(n.slice(t,i)),o>i&&ti(n=n.slice(i)),o>i&&st(n))}e.push(u)}return gt(e)}function ki(n,t){var f=0,i=t.length>0,e=n.length>0,o=function(o,h,c,l,a){var p,b,k,w=[],d=0,y="0",g=o&&[],nt=null!=a,tt=at,rt=o||e&&r.find.TAG("*",a&&h.parentNode||h),it=v+=null==tt?1:Math.E;for(nt&&(at=h!==s&&h,ct=f);null!=(p=rt[y]);y++){if(e&&p){for(b=0;k=n[b];b++)if(k(p,h,c)){l.push(p);break}nt&&(v=it,ct=++f)}i&&((p=!k&&p)&&d--,o&&g.push(p))}if(d+=y,i&&y!==d){for(b=0;k=t[b];b++)k(g,w,h,c);if(o){if(d>0)for(;y--;)g[y]||w[y]||(w[y]=tr.call(l));w=ht(w)}ft.apply(l,w);nt&&!o&&w.length>0&&d+t.length>1&&u.uniqueSort(l)}return nt&&(v=it,at=tt),g};return i?c(o):o}function di(n,t,i){for(var r=0,f=t.length;f>r;r++)u(n,t[r],i);return i}function gi(n,t,i,u){var e,f,o,h,c,s=ot(n);if(!u&&1===s.length){if(f=s[0]=s[0].slice(0),f.length>2&&"ID"===(o=f[0]).type&&9===t.nodeType&&!l&&r.relative[f[1].type]){if(t=r.find.ID(o.matches[0].replace(w,b),t)[0],!t)return i;n=n.slice(f.shift().value.length)}for(e=wt.needsContext.test(n)?-1:f.length-1;e>=0&&(o=f[e],!r.relative[h=o.type]);e--)if((c=r.find[h])&&(u=c(o.matches[0].replace(w,b),ei.test(f[0].type)&&t.parentNode||t))){if(f.splice(e,1),n=u.length&&st(f),!n)return ft.apply(i,et.call(u,0)),i;break}}return ii(n,s)(u,t,l,i,ei.test(n)),i}function si(){}var nt,ct,r,lt,hi,ii,tt,at,it,s,h,l,a,rt,vt,ut,ri,f="sizzle"+-new Date,d=n.document,o={},v=0,nr=0,ci=kt(),li=kt(),ai=kt(),y=typeof t,vi=-2147483648,yt=[],tr=yt.pop,ft=yt.push,et=yt.slice,ui=yt.indexOf||function(n){for(var t=0,i=this.length;i>t;t++)if(this[t]===n)return t;return-1},e="[\\x20\\t\\r\\n\\f]",g="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",yi=g.replace("w","w#"),pi="\\["+e+"*("+g+")"+e+"*(?:([*^$|!~]?=)"+e+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+yi+")|)|)"+e+"*\\]",fi=":("+g+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+pi.replace(3,8)+")*)|.*)\\)|)",pt=RegExp("^"+e+"+|((?:^|[^\\\\])(?:\\\\.)*)"+e+"+$","g"),ir=RegExp("^"+e+"*,"+e+"*"),rr=RegExp("^"+e+"*([\\x20\\t\\r\\n\\f>+~])"+e+"*"),ur=RegExp(fi),fr=RegExp("^"+yi+"$"),wt={ID:RegExp("^#("+g+")"),CLASS:RegExp("^\\.("+g+")"),NAME:RegExp("^\\[name=['\"]?("+g+")['\"]?\\]"),TAG:RegExp("^("+g.replace("w","w*")+")"),ATTR:RegExp("^"+pi),PSEUDO:RegExp("^"+fi),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+e+"*(even|odd|(([+-]|)(\\d*)n|)"+e+"*(?:([+-]|)"+e+"*(\\d+)|))"+e+"*\\)|)","i"),needsContext:RegExp("^"+e+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+e+"*((?:-\\d)?\\d*)"+e+"*\\)|)(?=[^-]|$)","i")},ei=/[\x20\t\r\n\f]*[+~]/,er=/\{\s*\[native code\]\s*\}/,or=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,sr=/^(?:input|select|textarea|button)$/i,hr=/^h\d$/i,cr=/'|\\/g,lr=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,w=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,b=function(n,t){var i="0x"+t-65536;return i!==i?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(55296|i>>10,56320|1023&i)};try{et.call(h.childNodes,0)[0].nodeType}catch(ar){et=function(n){for(var t,i=[];t=this[n];n++)i.push(t);return i}}hi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return t?"HTML"!==t.nodeName:!1};it=u.setDocument=function(n){var i=n?n.ownerDocument||n:d;return i!==s&&9===i.nodeType&&i.documentElement?(s=i,h=i.documentElement,l=hi(i),o.tagNameNoComments=p(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),o.attributes=p(function(n){n.innerHTML="<select><\/select>";var t=typeof n.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),o.getByClassName=p(function(n){return n.innerHTML="<div class='hidden e'><\/div><div class='hidden'><\/div>",n.getElementsByClassName&&n.getElementsByClassName("e").length?(n.lastChild.className="e",2===n.getElementsByClassName("e").length):!1}),o.getByName=p(function(n){n.id=f+0;n.innerHTML="<a name='"+f+"'><\/a><div name='"+f+"'><\/div>";h.insertBefore(n,h.firstChild);var t=i.getElementsByName&&i.getElementsByName(f).length===2+i.getElementsByName(f+0).length;return o.getIdNotName=!i.getElementById(f),h.removeChild(n),t}),r.attrHandle=p(function(n){return n.innerHTML="<a href='#'><\/a>",n.firstChild&&typeof n.firstChild.getAttribute!==y&&"#"===n.firstChild.getAttribute("href")})?{}:{href:function(n){return n.getAttribute("href",2)},type:function(n){return n.getAttribute("type")}},o.getIdNotName?(r.find.ID=function(n,t){if(typeof t.getElementById!==y&&!l){var i=t.getElementById(n);return i&&i.parentNode?[i]:[]}},r.filter.ID=function(n){var t=n.replace(w,b);return function(n){return n.getAttribute("id")===t}}):(r.find.ID=function(n,i){if(typeof i.getElementById!==y&&!l){var r=i.getElementById(n);return r?r.id===n||typeof r.getAttributeNode!==y&&r.getAttributeNode("id").value===n?[r]:t:[]}},r.filter.ID=function(n){var t=n.replace(w,b);return function(n){var i=typeof n.getAttributeNode!==y&&n.getAttributeNode("id");return i&&i.value===t}}),r.find.TAG=o.tagNameNoComments?function(n,i){return typeof i.getElementsByTagName!==y?i.getElementsByTagName(n):t}:function(n,t){var i,r=[],u=0,f=t.getElementsByTagName(n);if("*"===n){for(;i=f[u];u++)1===i.nodeType&&r.push(i);return r}return f},r.find.NAME=o.getByName&&function(n,i){return typeof i.getElementsByName!==y?i.getElementsByName(name):t},r.find.CLASS=o.getByClassName&&function(n,i){return typeof i.getElementsByClassName===y||l?t:i.getElementsByClassName(n)},rt=[],a=[":focus"],(o.qsa=bt(i.querySelectorAll))&&(p(function(n){n.innerHTML="<select><option selected=''><\/option><\/select>";n.querySelectorAll("[selected]").length||a.push("\\["+e+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)");n.querySelectorAll(":checked").length||a.push(":checked")}),p(function(n){n.innerHTML="<input type='hidden' i=''/>";n.querySelectorAll("[i^='']").length&&a.push("[*^$]="+e+"*(?:\"\"|'')");n.querySelectorAll(":enabled").length||a.push(":enabled",":disabled");n.querySelectorAll("*,:x");a.push(",.*:")})),(o.matchesSelector=bt(vt=h.matchesSelector||h.mozMatchesSelector||h.webkitMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&p(function(n){o.disconnectedMatch=vt.call(n,"div");vt.call(n,"[s!='']:x");rt.push("!=",fi)}),a=RegExp(a.join("|")),rt=RegExp(rt.join("|")),ut=bt(h.contains)||h.compareDocumentPosition?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)for(;t=t.parentNode;)if(t===n)return!0;return!1},ri=h.compareDocumentPosition?function(n,t){var r;return n===t?(tt=!0,0):(r=t.compareDocumentPosition&&n.compareDocumentPosition&&n.compareDocumentPosition(t))?1&r||n.parentNode&&11===n.parentNode.nodeType?n===i||ut(d,n)?-1:t===i||ut(d,t)?1:0:4&r?-1:1:n.compareDocumentPosition?-1:1}:function(n,t){var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(n===t)return tt=!0,0;if(n.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||vi)-(ut(d,n)&&~n.sourceIndex||vi);if(!o||!s)return n===i?-1:t===i?1:o?-1:s?1:0;if(o===s)return oi(n,t);for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);for(;f[u]===e[u];)u++;return u?oi(f[u],e[u]):f[u]===d?-1:e[u]===d?1:0},tt=!1,[0,0].sort(ri),o.detectDuplicates=tt,s):s};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==s&&it(n),t=t.replace(lr,"='$1']"),!(!o.matchesSelector||l||rt&&rt.test(t)||a.test(t)))try{var i=vt.call(n,t);if(i||o.disconnectedMatch||n.document&&11!==n.document.nodeType)return i}catch(r){}return u(t,s,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==s&&it(n),ut(n,t)};u.attr=function(n,t){var i;return(n.ownerDocument||n)!==s&&it(n),l||(t=t.toLowerCase()),(i=r.attrHandle[t])?i(n):l||o.attributes?n.getAttribute(t):((i=n.getAttributeNode(t))||n.getAttribute(t))&&n[t]===!0?t:i&&i.specified?i.value:null};u.error=function(n){throw Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=1,i=0;if(tt=!o.detectDuplicates,n.sort(ri),tt){for(;r=n[t];t++)r===n[t-1]&&(i=u.push(t));for(;i--;)n.splice(u[i],1)}return n};lt=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=lt(n)}else if(3===t||4===t)return n.nodeValue}else for(;r=n[u];u++)i+=lt(r);return i};r=u.selectors={cacheLength:50,createPseudo:c,match:wt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(w,b),n[3]=(n[4]||n[5]||"").replace(w,b),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[5]&&n[2];return wt.CHILD.test(n[0])?null:(n[4]?n[2]=n[4]:t&&ur.test(t)&&(i=ot(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){return"*"===n?function(){return!0}:(n=n.replace(w,b).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===n})},CLASS:function(n){var t=ci[n+" "];return t||(t=RegExp("(^|"+e+")"+n+"("+e+"|$)"))&&ci(n,function(n){return t.test(n.className||typeof n.getAttribute!==y&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return null==f?"!="===t:t?(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.substr(f.length-i.length)===i:"~="===t?(" "+f+" ").indexOf(i)>-1:"|="===t?f===i||f.substr(0,i.length+1)===i+"-":!1):!0}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var a,k,c,l,y,w,b=s!==o?"nextSibling":"previousSibling",p=t.parentNode,g=e&&t.nodeName.toLowerCase(),d=!h&&!e;if(p){if(s){for(;b;){for(c=t;c=c[b];)if(e?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;w=b="only"===n&&!w&&"nextSibling"}return!0}if(w=[o?p.firstChild:p.lastChild],o&&d){for(k=p[f]||(p[f]={}),a=k[n]||[],y=a[0]===v&&a[1],l=a[0]===v&&a[2],c=y&&p.childNodes[y];c=++y&&c&&c[b]||(l=y=0)||w.pop();)if(1===c.nodeType&&++l&&c===t){k[n]=[v,y,l];break}}else if(d&&(a=(t[f]||(t[f]={}))[n])&&a[0]===v)l=a[1];else for(;(c=++y&&c&&c[b]||(l=y=0)||w.pop())&&((e?c.nodeName.toLowerCase()!==g:1!==c.nodeType)||!++l||(d&&((c[f]||(c[f]={}))[n]=[v,l]),c!==t)););return l-=u,l===r||0==l%r&&l/r>=0}}},PSEUDO:function(n,t){var e,i=r.pseudos[n]||r.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return i[f]?i(t):i.length>1?(e=[n,n,"",t],r.setFilters.hasOwnProperty(n.toLowerCase())?c(function(n,r){for(var u,f=i(n,t),e=f.length;e--;)u=ui.call(n,f[e]),n[u]=!(r[u]=f[e])}):function(n){return i(n,0,e)}):i}},pseudos:{not:c(function(n){var i=[],r=[],t=ii(n.replace(pt,"$1"));return t[f]?c(function(n,i,r,u){for(var e,o=t(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(i[f]=e))}):function(n,u,f){return i[0]=n,t(i,null,f,r),!r.pop()}}),has:c(function(n){return function(t){return u(n,t).length>0}}),contains:c(function(n){return function(t){return(t.textContent||t.innerText||lt(t)).indexOf(n)>-1}}),lang:c(function(n){return fr.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(w,b).toLowerCase(),function(t){var i;do if(i=l?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===h},focus:function(n){return n===s.activeElement&&(!s.hasFocus||s.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:function(n){return n.disabled===!1},disabled:function(n){return n.disabled===!0},checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeName>"@"||3===n.nodeType||4===n.nodeType)return!1;return!0},parent:function(n){return!r.pseudos.empty(n)},header:function(n){return hr.test(n.nodeName)},input:function(n){return sr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||t.toLowerCase()===n.type)},first:k(function(){return[0]}),last:k(function(n,t){return[t-1]}),eq:k(function(n,t,i){return[0>i?i+t:i]}),even:k(function(n,t){for(var i=0;t>i;i+=2)n.push(i);return n}),odd:k(function(n,t){for(var i=1;t>i;i+=2)n.push(i);return n}),lt:k(function(n,t,i){for(var r=0>i?i+t:i;--r>=0;)n.push(r);return n}),gt:k(function(n,t,i){for(var r=0>i?i+t:i;t>++r;)n.push(r);return n})}};for(nt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[nt]=wi(nt);for(nt in{submit:!0,reset:!0})r.pseudos[nt]=bi(nt);ii=u.compile=function(n,t){var r,u=[],e=[],i=ai[n+" "];if(!i){for(t||(t=ot(n)),r=t.length;r--;)i=ti(t[r]),i[f]?u.push(i):e.push(i);i=ai(n,ki(e,u))}return i};r.pseudos.nth=r.pseudos.eq;r.filters=si.prototype=r.pseudos;r.setFilters=new si;it();u.attr=i.attr;i.find=u;i.expr=u.selectors;i.expr[":"]=i.expr.pseudos;i.unique=u.uniqueSort;i.text=u.getText;i.isXMLDoc=u.isXML;i.contains=u.contains}(n);var ce=/Until$/,le=/^(?:parents|prev(?:Until|All))/,ae=/^.[^:#\[\.,]*$/,fu=i.expr.match.needsContext,ve={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({find:function(n){var t,r,u;if("string"!=typeof n)return u=this,this.pushStack(i(n).filter(function(){for(t=0;u.length>t;t++)if(i.contains(u[t],this))return!0}));for(r=[],t=0;this.length>t;t++)i.find(n,this[t],r);return r=this.pushStack(i.unique(r)),r.selector=(this.selector?this.selector+" ":"")+n,r},has:function(n){var t,r=i(n,this),u=r.length;return this.filter(function(){for(t=0;u>t;t++)if(i.contains(this,r[t]))return!0})},not:function(n){return this.pushStack(di(this,n,!1))},filter:function(n){return this.pushStack(di(this,n,!0))},is:function(n){return!!n&&("string"==typeof n?fu.test(n)?i(n,this.context).index(this[0])>=0:i.filter(n,this).length>0:this.filter(n).length>0)},closest:function(n,t){for(var r,f=0,o=this.length,u=[],e=fu.test(n)||"string"!=typeof n?i(n,t||this.context):0;o>f;f++)for(r=this[f];r&&r.ownerDocument&&r!==t&&11!==r.nodeType;){if(e?e.index(r)>-1:i.find.matchesSelector(r,n)){u.push(r);break}r=r.parentNode}return this.pushStack(u.length>1?i.unique(u):u)},index:function(n){return n?"string"==typeof n?i.inArray(this[0],i(n)):i.inArray(n.jquery?n[0]:n,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){var r="string"==typeof n?i(n,t):i.makeArray(n&&n.nodeType?[n]:n),u=i.merge(this.get(),r);return this.pushStack(i.unique(u))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.fn.andSelf=i.fn.addBack;i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return i.dir(n,"parentNode")},parentsUntil:function(n,t,r){return i.dir(n,"parentNode",r)},next:function(n){return ki(n,"nextSibling")},prev:function(n){return ki(n,"previousSibling")},nextAll:function(n){return i.dir(n,"nextSibling")},prevAll:function(n){return i.dir(n,"previousSibling")},nextUntil:function(n,t,r){return i.dir(n,"nextSibling",r)},prevUntil:function(n,t,r){return i.dir(n,"previousSibling",r)},siblings:function(n){return i.sibling((n.parentNode||{}).firstChild,n)},children:function(n){return i.sibling(n.firstChild)},contents:function(n){return i.nodeName(n,"iframe")?n.contentDocument||n.contentWindow.document:i.merge([],n.childNodes)}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return ce.test(n)||(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),f=this.length>1&&!ve[n]?i.unique(f):f,this.length>1&&le.test(n)&&(f=f.reverse()),this.pushStack(f)}});i.extend({filter:function(n,t,r){return r&&(n=":not("+n+")"),1===t.length?i.find.matchesSelector(t[0],n)?[t[0]]:[]:i.find.matches(n,t)},dir:function(n,r,u){for(var e=[],f=n[r];f&&9!==f.nodeType&&(u===t||1!==f.nodeType||!i(f).is(u));)1===f.nodeType&&e.push(f),f=f[r];return e},sibling:function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i}});var eu="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ye=/ jQuery\d+="(?:null|\d+)"/g,ou=RegExp("<(?:"+eu+")[\\s/>]","i"),oi=/^\s+/,su=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,hu=/<([\w:]+)/,cu=/<tbody/i,pe=/<|&#?\w+;/,we=/<(?:script|style|link)/i,si=/^(?:checkbox|radio)$/i,be=/checked\s*(?:[^=]|=\s*.checked.)/i,lu=/^$|\/(?:java|ecma)script/i,ke=/^true\/(.*)/,de=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,e={option:[1,"<select multiple='multiple'>","<\/select>"],legend:[1,"<fieldset>","<\/fieldset>"],area:[1,"<map>","<\/map>"],param:[1,"<object>","<\/object>"],thead:[1,"<table>","<\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],col:[2,"<table><tbody><\/tbody><colgroup>","<\/colgroup><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:i.support.htmlSerialize?[0,"",""]:[1,"X<div>","<\/div>"]},ge=gi(r),hi=ge.appendChild(r.createElement("div"));e.optgroup=e.option;e.tbody=e.tfoot=e.colgroup=e.caption=e.thead;e.th=e.td;i.fn.extend({text:function(n){return i.access(this,function(n){return n===t?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(n))},null,n,arguments.length)},wrapAll:function(n){if(i.isFunction(n))return this.each(function(t){i(this).wrapAll(n.call(this,t))});if(this[0]){var t=i(n,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]);t.map(function(){for(var n=this;n.firstChild&&1===n.firstChild.nodeType;)n=n.firstChild;return n}).append(this)}return this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(){return this.parent().each(function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(n){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(n)})},prepend:function(){return this.domManip(arguments,!0,function(n){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(n,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return this.domManip(arguments,!1,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},remove:function(n,t){for(var r,f=0;null!=(r=this[f]);f++)(!n||i.filter(n,[r]).length>0)&&(t||1!==r.nodeType||i.cleanData(u(r)),r.parentNode&&(t&&i.contains(r.ownerDocument,r)&&wt(u(r,"script")),r.parentNode.removeChild(r)));return this},empty:function(){for(var n,t=0;null!=(n=this[t]);t++){for(1===n.nodeType&&i.cleanData(u(n,!1));n.firstChild;)n.removeChild(n.firstChild);n.options&&i.nodeName(n,"select")&&(n.options.length=0)}return this},clone:function(n,t){return n=null==n?!1:n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return i.access(this,function(n){var r=this[0]||{},f=0,o=this.length;if(n===t)return 1===r.nodeType?r.innerHTML.replace(ye,""):t;if(!("string"!=typeof n||we.test(n)||!i.support.htmlSerialize&&ou.test(n)||!i.support.leadingWhitespace&&oi.test(n)||e[(hu.exec(n)||["",""])[1].toLowerCase()])){n=n.replace(su,"<$1><\/$2>");try{for(;o>f;f++)r=this[f]||{},1===r.nodeType&&(i.cleanData(u(r,!1)),r.innerHTML=n);r=0}catch(s){}}r&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(n){var t=i.isFunction(n);return t||"string"==typeof n||(n=i(n).not(this).detach()),this.domManip([n],!0,function(n){var t=this.nextSibling,r=this.parentNode;(r&&1===this.nodeType||11===this.nodeType)&&(i(this).remove(),t?t.parentNode.insertBefore(n,t):r.appendChild(n))})},detach:function(n){return this.remove(n,!0)},domManip:function(n,r,f){n=br.apply([],n);var s,c,h,l,e,y,o=0,a=this.length,w=this,b=a-1,v=n[0],p=i.isFunction(v);if(p||!(1>=a||"string"!=typeof v||i.support.checkClone)&&be.test(v))return this.each(function(i){var u=w.eq(i);p&&(n[0]=v.call(this,i,r?u.html():t));u.domManip(n,r,f)});if(a&&(s=i.buildFragment(n,this[0].ownerDocument,!1,this),c=s.firstChild,1===s.childNodes.length&&(s=c),c)){for(r=r&&i.nodeName(c,"tr"),h=i.map(u(s,"script"),nr),l=h.length;a>o;o++)e=s,o!==b&&(e=i.clone(e,!0,!0),l&&i.merge(h,u(e,"script"))),f.call(r&&i.nodeName(this[o],"table")?uf(this[o],"tbody"):this[o],e,o);if(l)for(y=h[h.length-1].ownerDocument,i.map(h,tr),o=0;l>o;o++)e=h[o],lu.test(e.type||"")&&!i._data(e,"globalEval")&&i.contains(y,e)&&(e.src?i.ajax({url:e.src,type:"GET",dataType:"script",async:!1,global:!1,throws:!0}):i.globalEval((e.text||e.textContent||e.innerHTML||"").replace(de,"")));s=c=null}return this}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,r=0,f=[],e=i(n),o=e.length-1;o>=r;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),gt.apply(f,u.get());return this.pushStack(f)}});i.extend({clone:function(n,t,r){var f,s,h,e,o,c=i.contains(n.ownerDocument,n);if(i.support.html5Clone||i.isXMLDoc(n)||!ou.test("<"+n.nodeName+">")?o=n.cloneNode(!0):(hi.innerHTML=n.outerHTML,hi.removeChild(o=hi.firstChild)),!(i.support.noCloneEvent&&i.support.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(f=u(o),s=u(n),e=0;null!=(h=s[e]);++e)f[e]&&ff(h,f[e]);if(t)if(r)for(s=s||u(n),f=f||u(o),e=0;null!=(h=s[e]);e++)ir(h,f[e]);else ir(n,o);return f=u(o,"script"),f.length>0&&wt(f,!c&&u(n,"script")),f=s=h=null,o},buildFragment:function(n,t,r,f){for(var w,o,y,s,l,p,h,b=n.length,a=gi(t),c=[],v=0;b>v;v++)if(o=n[v],o||0===o)if("object"===i.type(o))i.merge(c,o.nodeType?[o]:o);else if(pe.test(o)){for(s=s||a.appendChild(t.createElement("div")),y=(hu.exec(o)||["",""])[1].toLowerCase(),l=e[y]||e._default,s.innerHTML=l[1]+o.replace(su,"<$1><\/$2>")+l[2],h=l[0];h--;)s=s.lastChild;if(!i.support.leadingWhitespace&&oi.test(o)&&c.push(t.createTextNode(oi.exec(o)[0])),!i.support.tbody)for(o="table"!==y||cu.test(o)?"<table>"!==l[1]||cu.test(o)?0:s:s.firstChild,h=o&&o.childNodes.length;h--;)i.nodeName(p=o.childNodes[h],"tbody")&&!p.childNodes.length&&o.removeChild(p);for(i.merge(c,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=a.lastChild}else c.push(t.createTextNode(o));for(s&&a.removeChild(s),i.support.appendChecked||i.grep(u(c,"input"),ef),v=0;o=c[v++];)if((!f||-1===i.inArray(o,f))&&(w=i.contains(o.ownerDocument,o),s=u(a.appendChild(o),"script"),w&&wt(s),r))for(h=0;o=s[h++];)lu.test(o.type||"")&&r.push(o);return s=null,a},cleanData:function(n,r){for(var e,f,u,o,c=0,s=i.expando,h=i.cache,l=i.support.deleteExpando,a=i.event.special;null!=(u=n[c]);c++)if((r||i.acceptData(u))&&(f=u[s],e=f&&h[f])){if(e.events)for(o in e.events)a[o]?i.event.remove(u,o):i.removeEvent(u,o,e.handle);h[f]&&(delete h[f],l?delete u[s]:u.removeAttribute!==t?u.removeAttribute(s):u[s]=null,w.push(f))}}});var l,a,tt,ci=/alpha\([^)]*\)/i,no=/opacity\s*=\s*([^)]*)/,to=/^(top|right|bottom|left)$/,io=/^(none|table(?!-c[ea]).+)/,au=/^margin/,ro=RegExp("^("+ot+")(.*)$","i"),ht=RegExp("^("+ot+")(?!px)[a-z%]+$","i"),uo=RegExp("^([+-])=("+ot+")","i"),vu={BODY:"block"},fo={position:"absolute",visibility:"hidden",display:"block"},yu={letterSpacing:0,fontWeight:400},v=["Top","Right","Bottom","Left"],pu=["Webkit","O","Moz","ms"];i.fn.extend({css:function(n,r){return i.access(this,function(n,r,u){var e,o,s={},f=0;if(i.isArray(r)){for(e=a(n),o=r.length;o>f;f++)s[r[f]]=i.css(n,r[f],!1,e);return s}return u!==t?i.style(n,r,u):i.css(n,r)},n,r,arguments.length>1)},show:function(){return ur(this,!0)},hide:function(){return ur(this)},toggle:function(n){var t="boolean"==typeof n;return this.each(function(){(t?n:nt(this))?i(this).show():i(this).hide()})}});i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=l(n,"opacity");return""===i?"1":i}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(n,r,u,f){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var o,s,e,h=i.camelCase(r),c=n.style;if(r=i.cssProps[h]||(i.cssProps[h]=rr(c,h)),e=i.cssHooks[r]||i.cssHooks[h],u===t)return e&&"get"in e&&(o=e.get(n,!1,f))!==t?o:c[r];if(s=typeof u,"string"===s&&(o=uo.exec(u))&&(u=(o[1]+1)*o[2]+parseFloat(i.css(n,r)),s="number"),!(null==u||"number"===s&&isNaN(u)||("number"!==s||i.cssNumber[h]||(u+="px"),i.support.clearCloneStyle||""!==u||0!==r.indexOf("background")||(c[r]="inherit"),e&&"set"in e&&(u=e.set(n,u,f))===t)))try{c[r]=u}catch(l){}}},css:function(n,r,u,f){var e,h,o,s=i.camelCase(r);return r=i.cssProps[s]||(i.cssProps[s]=rr(n.style,s)),o=i.cssHooks[r]||i.cssHooks[s],o&&"get"in o&&(e=o.get(n,!0,u)),e===t&&(e=l(n,r,f)),"normal"===e&&r in yu&&(e=yu[r]),u?(h=parseFloat(e),u===!0||i.isNumeric(h)?h||0:e):e},swap:function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f}});n.getComputedStyle?(a=function(t){return n.getComputedStyle(t,null)},l=function(n,r,u){var s,h,c,o=u||a(n),e=o?o.getPropertyValue(r)||o[r]:t,f=n.style;return o&&(""!==e||i.contains(n.ownerDocument,n)||(e=i.style(n,r)),ht.test(e)&&au.test(r)&&(s=f.width,h=f.minWidth,c=f.maxWidth,f.minWidth=f.maxWidth=f.width=e,e=o.width,f.width=s,f.minWidth=h,f.maxWidth=c)),e}):r.documentElement.currentStyle&&(a=function(n){return n.currentStyle},l=function(n,i,r){var s,e,o,h=r||a(n),u=h?h[i]:t,f=n.style;return null==u&&f&&f[i]&&(u=f[i]),ht.test(u)&&!to.test(i)&&(s=f.left,e=n.runtimeStyle,o=e&&e.left,o&&(e.left=n.currentStyle.left),f.left="fontSize"===i?"1em":u,u=f.pixelLeft+"px",f.left=s,o&&(e.left=o)),""===u?"auto":u});i.each(["height","width"],function(n,r){i.cssHooks[r]={get:function(n,u,f){return u?0===n.offsetWidth&&io.test(i.css(n,"display"))?i.swap(n,fo,function(){return or(n,r,f)}):or(n,r,f):t},set:function(n,t,u){var f=u&&a(n);return fr(n,t,u?er(n,r,u,i.support.boxSizing&&"border-box"===i.css(n,"boxSizing",!1,f),f):0)}}});i.support.opacity||(i.cssHooks.opacity={get:function(n,t){return no.test((t&&n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(n,t){var r=n.style,u=n.currentStyle,e=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",f=u&&u.filter||r.filter||"";r.zoom=1;(t>=1||""===t)&&""===i.trim(f.replace(ci,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||u&&!u.filter)||(r.filter=ci.test(f)?f.replace(ci,e):f+" "+e)}});i(function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(n,r){return r?i.swap(n,{display:"inline-block"},l,[n,"marginRight"]):t}});!i.support.pixelPosition&&i.fn.position&&i.each(["top","left"],function(n,r){i.cssHooks[r]={get:function(n,u){return u?(u=l(n,r),ht.test(u)?i(n).position()[r]+"px":u):t}}})});i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(n){return 0===n.offsetWidth&&0===n.offsetHeight||!i.support.reliableHiddenOffsets&&"none"===(n.style&&n.style.display||i.css(n,"display"))},i.expr.filters.visible=function(n){return!i.expr.filters.hidden(n)});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];4>r;r++)f[n+v[r]+t]=u[r]||u[r-2]||u[0];return f}};au.test(n)||(i.cssHooks[n+t].set=fr)});var eo=/%20/g,oo=/\[\]$/,wu=/\r?\n/g,so=/^(?:submit|button|image|reset)$/i,ho=/^(?:input|select|textarea|keygen)/i;i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&ho.test(this.nodeName)&&!so.test(n)&&(this.checked||!si.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:i.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(wu,"\r\n")}}):{name:t.name,value:r.replace(wu,"\r\n")}}).get()}});i.param=function(n,r){var u,f=[],e=function(n,t){t=i.isFunction(t)?t():null==t?"":t;f[f.length]=encodeURIComponent(n)+"="+encodeURIComponent(t)};if(r===t&&(r=i.ajaxSettings&&i.ajaxSettings.traditional),i.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){e(this.name,this.value)});else for(u in n)bt(u,n[u],r,e);return f.join("&").replace(eo,"+")};var y,s,li=i.now(),ai=/\?/,co=/#.*$/,bu=/([?&])_=[^&]*/,lo=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,ao=/^(?:GET|HEAD)$/,vo=/^\/\//,ku=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,du=i.fn.load,gu={},vi={},nf="*/".concat("*");try{s=vf.href}catch(bo){s=r.createElement("a");s.href="";s=s.href}y=ku.exec(s.toLowerCase())||[];i.fn.load=function(n,r,u){if("string"!=typeof n&&du)return du.apply(this,arguments);var f,s,h,e=this,o=n.indexOf(" ");return o>=0&&(f=n.slice(o,n.length),n=n.slice(0,o)),i.isFunction(r)?(u=r,r=t):r&&"object"==typeof r&&(s="POST"),e.length>0&&i.ajax({url:n,type:s,dataType:"html",data:r}).done(function(n){h=arguments;e.html(f?i("<div>").append(i.parseHTML(n)).find(f):n)}).complete(u&&function(n,t){e.each(u,h||[n.responseText,t,n])}),this};i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}});i.each(["get","post"],function(n,r){i[r]=function(n,u,f,e){return i.isFunction(u)&&(e=e||f,f=u,u=t),i.ajax({url:n,type:r,dataType:e,data:u,success:f})}});i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:s,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(y[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nf,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":n.String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?kt(kt(n,i.ajaxSettings),t):kt(i.ajaxSettings,n)},ajaxPrefilter:cr(gu),ajaxTransport:cr(vi),ajax:function(n,r){function w(n,r,o,s){var l,b,w,rt,y,a=r;2!==h&&(h=2,g&&clearTimeout(g),v=t,d=s||"",f.readyState=n>0?4:0,o&&(rt=of(u,f,o)),n>=200&&300>n||304===n?(u.ifModified&&(y=f.getResponseHeader("Last-Modified"),y&&(i.lastModified[e]=y),y=f.getResponseHeader("etag"),y&&(i.etag[e]=y)),304===n?(l=!0,a="notmodified"):(l=sf(u,rt),a=l.state,b=l.data,w=l.error,l=!w)):(w=a,(n||!a)&&(a="error",0>n&&(n=0))),f.status=n,f.statusText=(r||a)+"",l?tt.resolveWith(c,[b,a,f]):tt.rejectWith(c,[f,a,w]),f.statusCode(k),k=t,p&&nt.trigger(l?"ajaxSuccess":"ajaxError",[f,u,l?b:w]),it.fireWith(c,[f,a]),p&&(nt.trigger("ajaxComplete",[f,u]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof n&&(r=n,n=t);r=r||{};var v,e,d,b,g,l,p,a,u=i.ajaxSetup({},r),c=u.context||u,nt=u.context&&(c.nodeType||c.jquery)?i(c):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),k=u.statusCode||{},rt={},ut={},h=0,ft="canceled",f={readyState:0,getResponseHeader:function(n){var t;if(2===h){if(!b)for(b={};t=lo.exec(d);)b[t[1].toLowerCase()]=t[2];t=b[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===h?d:null},setRequestHeader:function(n,t){var i=n.toLowerCase();return h||(n=ut[i]=ut[i]||n,rt[n]=t),this},overrideMimeType:function(n){return h||(u.mimeType=n),this},statusCode:function(n){var t;if(n)if(2>h)for(t in n)k[t]=[k[t],n[t]];else f.always(n[f.status]);return this},abort:function(n){var t=n||ft;return v&&v.abort(t),w(0,t),this}};if(tt.promise(f).complete=it.add,f.success=f.done,f.error=f.fail,u.url=((n||u.url||s)+"").replace(co,"").replace(vo,y[1]+"//"),u.type=r.method||r.type||u.method||u.type,u.dataTypes=i.trim(u.dataType||"*").toLowerCase().match(o)||[""],null==u.crossDomain&&(l=ku.exec(u.url.toLowerCase()),u.crossDomain=!(!l||l[1]===y[1]&&l[2]===y[2]&&(l[3]||("http:"===l[1]?80:443))==(y[3]||("http:"===y[1]?80:443)))),u.data&&u.processData&&"string"!=typeof u.data&&(u.data=i.param(u.data,u.traditional)),lr(gu,u,r,f),2===h)return f;p=u.global;p&&0==i.active++&&i.event.trigger("ajaxStart");u.type=u.type.toUpperCase();u.hasContent=!ao.test(u.type);e=u.url;u.hasContent||(u.data&&(e=u.url+=(ai.test(e)?"&":"?")+u.data,delete u.data),u.cache===!1&&(u.url=bu.test(e)?e.replace(bu,"$1_="+li++):e+(ai.test(e)?"&":"?")+"_="+li++));u.ifModified&&(i.lastModified[e]&&f.setRequestHeader("If-Modified-Since",i.lastModified[e]),i.etag[e]&&f.setRequestHeader("If-None-Match",i.etag[e]));(u.data&&u.hasContent&&u.contentType!==!1||r.contentType)&&f.setRequestHeader("Content-Type",u.contentType);f.setRequestHeader("Accept",u.dataTypes[0]&&u.accepts[u.dataTypes[0]]?u.accepts[u.dataTypes[0]]+("*"!==u.dataTypes[0]?", "+nf+"; q=0.01":""):u.accepts["*"]);for(a in u.headers)f.setRequestHeader(a,u.headers[a]);if(u.beforeSend&&(u.beforeSend.call(c,f,u)===!1||2===h))return f.abort();ft="abort";for(a in{success:1,error:1,complete:1})f[a](u[a]);if(v=lr(vi,u,r,f)){f.readyState=1;p&&nt.trigger("ajaxSend",[f,u]);u.async&&u.timeout>0&&(g=setTimeout(function(){f.abort("timeout")},u.timeout));try{h=1;v.send(rt,w)}catch(et){if(!(2>h))throw et;w(-1,et)}}else w(-1,"No Transport");return f},getScript:function(n,r){return i.get(n,t,r,"script")},getJSON:function(n,t,r){return i.get(n,t,r,"json")}});i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(n){return i.globalEval(n),n}}});i.ajaxPrefilter("script",function(n){n.cache===t&&(n.cache=!1);n.crossDomain&&(n.type="GET",n.global=!1)});i.ajaxTransport("script",function(n){if(n.crossDomain){var u,f=r.head||i("head")[0]||r.documentElement;return{send:function(t,i){u=r.createElement("script");u.async=!0;n.scriptCharset&&(u.charset=n.scriptCharset);u.src=n.url;u.onload=u.onreadystatechange=function(n,t){(t||!u.readyState||/loaded|complete/.test(u.readyState))&&(u.onload=u.onreadystatechange=null,u.parentNode&&u.parentNode.removeChild(u),u=null,t||i(200,"success"))};f.insertBefore(u,f.firstChild)},abort:function(){u&&u.onload(t,!0)}}}});yi=[];ct=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=yi.pop()||i.expando+"_"+li++;return this[n]=!0,n}});i.ajaxPrefilter("json jsonp",function(r,u,f){var e,s,o,h=r.jsonp!==!1&&(ct.test(r.url)?"url":"string"==typeof r.data&&!(r.contentType||"").indexOf("application/x-www-form-urlencoded")&&ct.test(r.data)&&"data");return h||"jsonp"===r.dataTypes[0]?(e=r.jsonpCallback=i.isFunction(r.jsonpCallback)?r.jsonpCallback():r.jsonpCallback,h?r[h]=r[h].replace(ct,"$1"+e):r.jsonp!==!1&&(r.url+=(ai.test(r.url)?"&":"?")+r.jsonp+"="+e),r.converters["script json"]=function(){return o||i.error(e+" was not called"),o[0]},r.dataTypes[0]="json",s=n[e],n[e]=function(){o=arguments},f.always(function(){n[e]=s;r[e]&&(r.jsonpCallback=u.jsonpCallback,yi.push(e));o&&i.isFunction(s)&&s(o[0]);o=s=t}),"script"):t});tf=0;lt=n.ActiveXObject&&function(){for(var n in k)k[n](t,!0)};i.ajaxSettings.xhr=n.ActiveXObject?function(){return!this.isLocal&&ar()||hf()}:ar;d=i.ajaxSettings.xhr();i.support.cors=!!d&&"withCredentials"in d;d=i.support.ajax=!!d;d&&i.ajaxTransport(function(r){if(!r.crossDomain||i.support.cors){var u;return{send:function(f,e){var h,s,o=r.xhr();if(r.username?o.open(r.type,r.url,r.async,r.username,r.password):o.open(r.type,r.url,r.async),r.xhrFields)for(s in r.xhrFields)o[s]=r.xhrFields[s];r.mimeType&&o.overrideMimeType&&o.overrideMimeType(r.mimeType);r.crossDomain||f["X-Requested-With"]||(f["X-Requested-With"]="XMLHttpRequest");try{for(s in f)o.setRequestHeader(s,f[s])}catch(c){}o.send(r.hasContent&&r.data||null);u=function(n,f){var s,a,v,c,l;try{if(u&&(f||4===o.readyState))if(u=t,h&&(o.onreadystatechange=i.noop,lt&&delete k[h]),f)4!==o.readyState&&o.abort();else{c={};s=o.status;l=o.responseXML;v=o.getAllResponseHeaders();l&&l.documentElement&&(c.xml=l);"string"==typeof o.responseText&&(c.text=o.responseText);try{a=o.statusText}catch(p){a=""}s||!r.isLocal||r.crossDomain?1223===s&&(s=204):s=c.text?200:404}}catch(y){f||e(-1,y)}c&&e(s,a,c,v)};r.async?4===o.readyState?setTimeout(u):(h=++tf,lt&&(k||(k={},i(n).unload(lt)),k[h]=u),o.onreadystatechange=u):u()},abort:function(){u&&u(t,!0)}}}});var g,at,yo=/^(?:toggle|show|hide)$/,po=RegExp("^(?:([+-])=|)("+ot+")([a-z%]*)$","i"),wo=/queueHooks$/,vt=[af],it={"*":[function(n,t){var o,s,r=this.createTween(n,t),e=po.exec(t),h=r.cur(),u=+h||0,f=1,c=20;if(e){if(o=+e[2],s=e[3]||(i.cssNumber[n]?"":"px"),"px"!==s&&u){u=i.css(r.elem,n,!0)||o||1;do f=f||".5",u/=f,i.style(r.elem,n,u+s);while(f!==(f=r.cur()/h)&&1!==f&&--c)}r.unit=s;r.start=u;r.end=e[1]?u+(e[1]+1)*o:o}return r}]};i.Animation=i.extend(yr,{tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.split(" ");for(var r,u=0,f=n.length;f>u;u++)r=n[u],it[r]=it[r]||[],it[r].unshift(t)},prefilter:function(n,t){t?vt.unshift(n):vt.push(n)}});i.Tween=f;f.prototype={constructor:f,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||"swing";this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=f.propHooks[this.prop];return n&&n.get?n.get(this):f.propHooks._default.get(this)},run:function(n){var r,t=f.propHooks[this.prop];return this.pos=r=this.options.duration?i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):n,this.now=(this.end-this.start)*r+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),t&&t.set?t.set(this):f.propHooks._default.set(this),this}};f.prototype.init.prototype=f.prototype;f.propHooks={_default:{get:function(n){var t;return null==n.elem[n.prop]||n.elem.style&&null!=n.elem.style[n.prop]?(t=i.css(n.elem,n.prop,"auto"),t&&"auto"!==t?t:0):n.elem[n.prop]},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.style&&(null!=n.elem.style[i.cssProps[n.prop]]||i.cssHooks[n.prop])?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};f.propHooks.scrollTop=f.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(ut(t,!0),n,i,u)}});i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(nt).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,r,u){var o=i.isEmptyObject(n),e=i.speed(t,r,u),f=function(){var t=yr(this,i.extend({},n),e);f.finish=function(){t.stop(!0)};(o||i._data(this,"finish"))&&t.stop(!0)};return f.finish=f,o||e.queue===!1?this.each(f):this.queue(e.queue,f)},stop:function(n,r,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return"string"!=typeof n&&(u=r,r=n,n=t),r&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var o=!0,t=null!=n&&n+"queueHooks",e=i.timers,r=i._data(this);if(t)r[t]&&r[t].stop&&f(r[t]);else for(t in r)r[t]&&r[t].stop&&wo.test(t)&&f(r[t]);for(t=e.length;t--;)e[t].elem!==this||null!=n&&e[t].queue!==n||(e[t].anim.stop(u),o=!1,e.splice(t,1));(o||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,f=i._data(this),r=f[n+"queue"],e=f[n+"queueHooks"],u=i.timers,o=r?r.length:0;for(f.finish=!0,i.queue(this,n,[]),e&&e.cur&&e.cur.finish&&e.cur.finish.call(this),t=u.length;t--;)u[t].elem===this&&u[t].queue===n&&(u[t].anim.stop(!0),u.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete f.finish})}});i.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return u.duration=i.fx.off?0:"number"==typeof u.duration?u.duration:u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default,(null==u.queue||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2}};i.timers=[];i.fx=f.prototype.init;i.fx.tick=function(){var u,n=i.timers,r=0;for(g=i.now();n.length>r;r++)u=n[r],u()||n[r]!==u||n.splice(r--,1);n.length||i.fx.stop();g=t};i.fx.timer=function(n){n()&&i.timers.push(n)&&i.fx.start()};i.fx.interval=13;i.fx.start=function(){at||(at=setInterval(i.fx.tick,i.fx.interval))};i.fx.stop=function(){clearInterval(at);at=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fx.step={};i.expr&&i.expr.filters&&(i.expr.filters.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length});i.fn.offset=function(n){if(arguments.length)return n===t?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,e,f={top:0,left:0},u=this[0],o=u&&u.ownerDocument;if(o)return r=o.documentElement,i.contains(r,u)?(u.getBoundingClientRect!==t&&(f=u.getBoundingClientRect()),e=pr(o),{top:f.top+(e.pageYOffset||r.scrollTop)-(r.clientTop||0),left:f.left+(e.pageXOffset||r.scrollLeft)-(r.clientLeft||0)}):f};i.offset={setOffset:function(n,t,r){var f=i.css(n,"position");"static"===f&&(n.style.position="relative");var e,o,s=i(n),h=s.offset(),l=i.css(n,"top"),a=i.css(n,"left"),v=("absolute"===f||"fixed"===f)&&i.inArray("auto",[l,a])>-1,u={},c={};v?(c=s.position(),e=c.top,o=c.left):(e=parseFloat(l)||0,o=parseFloat(a)||0);i.isFunction(t)&&(t=t.call(n,r,h));null!=t.top&&(u.top=t.top-h.top+e);null!=t.left&&(u.left=t.left-h.left+o);"using"in t?t.using.call(n,u):s.css(u)}};i.fn.extend({position:function(){if(this[0]){var n,r,t={top:0,left:0},u=this[0];return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(n=this.offsetParent(),r=this.offset(),i.nodeName(n[0],"html")||(t=n.offset()),t.top+=i.css(n[0],"borderTopWidth",!0),t.left+=i.css(n[0],"borderLeftWidth",!0)),{top:r.top-t.top-i.css(u,"marginTop",!0),left:r.left-t.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent||r.documentElement;n&&!i.nodeName(n,"html")&&"static"===i.css(n,"position");)n=n.offsetParent;return n||r.documentElement})}});i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var u=/Y/.test(r);i.fn[n]=function(f){return i.access(this,function(n,f,e){var o=pr(n);return e===t?o?r in o?o[r]:o.document.documentElement[f]:n[f]:(o?o.scrollTo(u?i(o).scrollLeft():e,u?e:i(o).scrollTop()):n[f]=e,t)},n,f,arguments.length,null)}});i.each({Height:"height",Width:"width"},function(n,r){i.each({padding:"inner"+n,content:r,"":"outer"+n},function(u,f){i.fn[f]=function(f,e){var o=arguments.length&&(u||"boolean"!=typeof f),s=u||(f===!0||e===!0?"margin":"border");return i.access(this,function(r,u,f){var e;return i.isWindow(r)?r.document.documentElement["client"+n]:9===r.nodeType?(e=r.documentElement,Math.max(r.body["scroll"+n],e["scroll"+n],r.body["offset"+n],e["offset"+n],e["client"+n])):f===t?i.css(r,u,s):i.style(r,u,f,s)},r,o?f:t,o,null)}})});n.jQuery=n.$=i;"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return i})})(window),function(n,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():n.Blazy=t()}(this,function(){function h(n){var i=n._util;i.elements=b(n.options);i.count=i.elements.length;i.destroyed&&(i.destroyed=!1,n.options.container&&t(n.options.container,function(n){r(n,"scroll",i.validateT)}),r(window,"resize",i.saveViewportOffsetT),r(window,"resize",i.validateT),r(window,"scroll",i.validateT));c(n)}function c(n){for(var s,r,t,h,f=n._util,o=0;o<f.count;o++){s=f.elements[o];n:{if(t=s,r=n.options,h=t.getBoundingClientRect(),r.container&&w&&(t=t.closest(r.containerClass))){t=t.getBoundingClientRect();r=u(t,i)?u(h,{top:t.top-r.offset,right:t.right+r.offset,bottom:t.bottom+r.offset,left:t.left-r.offset}):!1;break n}r=u(h,i)}(r||e(s,n.options.successClass))&&(n.load(s),f.elements.splice(o,1),f.count--,o--)}0===f.count&&n.destroy()}function u(n,t){return n.right>=t.left&&n.bottom>=t.top&&n.left<=t.right&&n.top<=t.bottom}function l(i,u,h){if(!e(i,h.successClass)&&(u||h.loadInvisible||0<i.offsetWidth&&0<i.offsetHeight))if(u=i.getAttribute(s)||i.getAttribute(h.src)){u=u.split(h.separator);var l=u[p&&1<u.length?1:0],w=i.getAttribute(h.srcset),b="img"===i.nodeName.toLowerCase(),k=(u=i.parentNode)&&"picture"===u.nodeName.toLowerCase();if(b||void 0===i.src){var c=new Image,v=function(){h.error&&h.error(i,"invalid");o(i,h.errorClass);n(c,"error",v);n(c,"load",y)},y=function(){b?k||a(i,l,w):i.style.backgroundImage='url("'+l+'")';f(i,h);n(c,"load",y);n(c,"error",v)};k&&(c=i,t(u.getElementsByTagName("source"),function(n){var t=h.srcset,i=n.getAttribute(t);i&&(n.setAttribute("srcset",i),n.removeAttribute(t))}));r(c,"error",v);r(c,"load",y);a(c,l,w)}else i.src=l,f(i,h)}else"video"===i.nodeName.toLowerCase()?(t(i.getElementsByTagName("source"),function(n){var t=h.src,i=n.getAttribute(t);i&&(n.setAttribute("src",i),n.removeAttribute(t))}),i.load(),f(i,h)):(h.error&&h.error(i,"missing"),o(i,h.errorClass))}function f(n,i){o(n,i.successClass);i.success&&i.success(n);n.removeAttribute(i.src);n.removeAttribute(i.srcset);t(i.breakpoints,function(t){n.removeAttribute(t.src)})}function a(n,t,i){i&&n.setAttribute("srcset",i);n.src=t}function e(n,t){return-1!==(" "+n.className+" ").indexOf(" "+t+" ")}function o(n,t){e(n,t)||(n.className+=" "+t)}function b(n){var i=[],t;for(n=n.root.querySelectorAll(n.selector),t=n.length;t--;i.unshift(n[t]));return i}function v(n){i.bottom=(window.innerHeight||document.documentElement.clientHeight)+n;i.right=(window.innerWidth||document.documentElement.clientWidth)+n}function r(n,t,i){n.attachEvent?n.attachEvent&&n.attachEvent("on"+t,i):n.addEventListener(t,i,{capture:!1,passive:!0})}function n(n,t,i){n.detachEvent?n.detachEvent&&n.detachEvent("on"+t,i):n.removeEventListener(t,i,{capture:!1,passive:!0})}function t(n,t){if(n&&t)for(var r=n.length,i=0;i<r&&!1!==t(n[i],i);i++);}function y(n,t,i){var r=0;return function(){var u=+new Date;u-r<t||(r=u,n.apply(i,arguments))}}var s,i,p,w;return function(r){var e,u,f;document.querySelectorAll||(e=document.createStyleSheet(),document.querySelectorAll=function(n,t,i,r,u){for(u=document.all,t=[],n=n.replace(/\[for\b/gi,"[htmlFor").split(","),i=n.length;i--;){for(e.addRule(n[i],"k:v"),r=u.length;r--;)u[r].currentStyle.k&&t.push(u[r]);e.removeRule(0)}return t});u=this;f=u._util={};f.elements=[];f.destroyed=!0;u.options=r||{};u.options.error=u.options.error||!1;u.options.offset=u.options.offset||100;u.options.root=u.options.root||document;u.options.success=u.options.success||!1;u.options.selector=u.options.selector||".b-lazy";u.options.separator=u.options.separator||"|";u.options.containerClass=u.options.container;u.options.container=u.options.containerClass?document.querySelectorAll(u.options.containerClass):!1;u.options.errorClass=u.options.errorClass||"b-error";u.options.breakpoints=u.options.breakpoints||!1;u.options.loadInvisible=u.options.loadInvisible||!1;u.options.successClass=u.options.successClass||"b-loaded";u.options.validateDelay=u.options.validateDelay||25;u.options.saveViewportOffsetDelay=u.options.saveViewportOffsetDelay||50;u.options.srcset=u.options.srcset||"data-srcset";u.options.src=s=u.options.src||"data-src";w=Element.prototype.closest;p=1<window.devicePixelRatio;i={};i.top=0-u.options.offset;i.left=0-u.options.offset;u.revalidate=function(){h(u)};u.load=function(n,i){var r=this.options;void 0===n.length?l(n,i,r):t(n,function(n){l(n,i,r)})};u.destroy=function(){var i=this._util;this.options.container&&t(this.options.container,function(t){n(t,"scroll",i.validateT)});n(window,"scroll",i.validateT);n(window,"resize",i.validateT);n(window,"resize",i.saveViewportOffsetT);i.count=0;i.elements.length=0;i.destroyed=!0};f.validateT=y(function(){c(u)},u.options.validateDelay,u);f.saveViewportOffsetT=y(function(){v(u.options.offset)},u.options.saveViewportOffsetDelay,u);v(u.options.offset);t(u.options.breakpoints,function(n){if(n.width>=window.screen.width)return s=n.src,!1});setTimeout(function(){h(u)})}});_gsScope=typeof module!="undefined"&&module.exports&&typeof global!="undefined"?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(n,t){var r=function(){n.call(this,"css");this._overwriteProps.length=0;this.setRatio=r.prototype.setRatio},nu=_gsScope._gsDefine.globals,ft,pt,e,ri,l={},i=r.prototype=new n("css"),br,vt,kr,dr,gr,yt;i.constructor=r;r.version="1.17.0";r.API=2;r.defaultTransformPerspective=0;r.defaultSkewType="compensated";r.defaultSmoothOrigin=!0;i="px";r.suffixMap={top:i,right:i,bottom:i,left:i,width:i,height:i,fontSize:i,padding:i,margin:i,perspective:i,lineHeight:""};var wt=/(?:\d|\-\d|\.\d|\-\.\d)+/g,bi=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,ui=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,fi=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,bt=/(?:\d|\-|\+|=|#|\.)*/g,ei=/opacity *= *([^)]*)/i,tu=/opacity:([^;]*)/i,iu=/alpha\(opacity *=.+?\)/i,ki=/^(rgb|hsl)/,di=/([A-Z])/g,gi=/-([a-z])/gi,ru=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,nr=function(n,t){return t.toUpperCase()},uu=/(?:Left|Right|Width)/i,fu=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,eu=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,y=/,(?=[^\)]*(?:\(|$))/gi,k=Math.PI/180,nt=180/Math.PI,kt={},a=document,oi=function(n){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",n):a.createElement(n)},d=oi("div"),si=oi("img"),p=r._internals={_specialProps:l},w=navigator.userAgent,hi,tr,dt,gt,ir,tt,it=function(){var t=w.indexOf("Android"),n=oi("a");return(dt=w.indexOf("Safari")!==-1&&w.indexOf("Chrome")===-1&&(t===-1||Number(w.substr(t+8,1))>3),ir=dt&&Number(w.substr(w.indexOf("Version/")+8,1))<6,gt=w.indexOf("Firefox")!==-1,(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(w)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(w))&&(tt=parseFloat(RegExp.$1)),!n)?!1:(n.style.cssText="top:1px;opacity:.55;",/^0.55/.test(n.style.opacity))}(),rr=function(n){return ei.test(typeof n=="string"?n:(n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?parseFloat(RegExp.$1)/100:1},ur=function(n){window.console&&console.log(n)},fr="",ci="",et=function(n,t){t=t||d;var u=t.style,r,i;if(u[n]!==undefined)return n;for(n=n.charAt(0).toUpperCase()+n.substr(1),r=["O","Moz","ms","Ms","Webkit"],i=5;--i>-1&&u[r[i]+n]===undefined;);return i>=0?(ci=i===3?"ms":r[i],fr="-"+ci.toLowerCase()+"-",ci+n):null},ot=a.defaultView?a.defaultView.getComputedStyle:function(){},u=r.getStyle=function(n,t,i,r,u){var f;return!it&&t==="opacity"?rr(n):(!r&&n.style[t]?f=n.style[t]:(i=i||ot(n))?f=i[t]||i.getPropertyValue(t)||i.getPropertyValue(t.replace(di,"-$1").toLowerCase()):n.currentStyle&&(f=n.currentStyle[t]),u!=null&&(!f||f==="none"||f==="auto"||f==="auto auto")?u:f)},b=p.convertToPixels=function(n,i,f,e,o){if(e==="px"||!e)return f;if(e==="auto"||!f)return 0;var l=uu.test(i),s=n,v=d.style,p=f<0,h,c,y;if(p&&(f=-f),e==="%"&&i.indexOf("border")!==-1)h=f/100*(l?n.clientWidth:n.clientHeight);else{if(v.cssText="border:0 solid red;position:"+u(n,"position")+";line-height:0;",e!=="%"&&s.appendChild)v[l?"borderLeftWidth":"borderTopWidth"]=f+e;else{if(s=n.parentNode||a.body,c=s._gsCache,y=t.ticker.frame,c&&l&&c.time===y)return c.width*f/100;v[l?"width":"height"]=f+e}s.appendChild(d);h=parseFloat(d[l?"offsetWidth":"offsetHeight"]);s.removeChild(d);l&&e==="%"&&r.cacheWidths!==!1&&(c=s._gsCache=s._gsCache||{},c.time=y,c.width=h/f*100);h!==0||o||(h=b(n,i,f,e,!0))}return p?-h:h},er=p.calculateOffset=function(n,t,i){if(u(n,"position",i)!=="absolute")return 0;var r=t==="left"?"Left":"Top",f=u(n,"margin"+r,i);return n["offset"+r]-(b(n,t,parseFloat(f),f.replace(bt,""))||0)},st=function(n,t){var i={},r,u,f;if(t=t||ot(n,null))if(r=t.length)while(--r>-1)f=t[r],(f.indexOf("-transform")===-1||lr===f)&&(i[f.replace(gi,nr)]=t.getPropertyValue(f));else for(r in t)(r.indexOf("Transform")===-1||h===r)&&(i[r]=t[r]);else if(t=n.currentStyle||n.style)for(r in t)typeof r=="string"&&i[r]===undefined&&(i[r.replace(gi,nr)]=t[r]);return it||(i.opacity=rr(n)),u=at(n,t,!1),i.rotation=u.rotation,i.skewX=u.skewX,i.scaleX=u.scaleX,i.scaleY=u.scaleY,i.x=u.x,i.y=u.y,v&&(i.z=u.z,i.rotationX=u.rotationX,i.rotationY=u.rotationY,i.scaleZ=u.scaleZ),i.filters&&delete i.filters,i},li=function(n,t,i,r,u){var o={},s=n.style,e,f,h;for(f in i)f!=="cssText"&&f!=="length"&&isNaN(f)&&(t[f]!==(e=i[f])||u&&u[f])&&f.indexOf("Origin")===-1&&(typeof e=="number"||typeof e=="string")&&(o[f]=e==="auto"&&(f==="left"||f==="top")?er(n,f):(e===""||e==="auto"||e==="none")&&typeof t[f]=="string"&&t[f].replace(fi,"")!==""?0:e,s[f]!==undefined&&(h=new pi(s,f,s[f],h)));if(r)for(f in r)f!=="className"&&(o[f]=r[f]);return{difs:o,firstMPT:h}},ou={width:["Left","Right"],height:["Top","Bottom"]},su=["marginLeft","marginRight","marginTop","marginBottom"],hu=function(n,t,i){var r=parseFloat(t==="width"?n.offsetWidth:n.offsetHeight),f=ou[t],e=f.length;for(i=i||ot(n,null);--e>-1;)r-=parseFloat(u(n,"padding"+f[e],i,!0))||0,r-=parseFloat(u(n,"border"+f[e]+"Width",i,!0))||0;return r},ht=function(n,t){(n==null||n===""||n==="auto"||n==="auto auto")&&(n="0 0");var u=n.split(" "),i=n.indexOf("left")!==-1?"0%":n.indexOf("right")!==-1?"100%":u[0],r=n.indexOf("top")!==-1?"0%":n.indexOf("bottom")!==-1?"100%":u[1];return r==null?r=i==="center"?"50%":"0":r==="center"&&(r="50%"),(i==="center"||isNaN(parseFloat(i))&&(i+"").indexOf("=")===-1)&&(i="50%"),n=i+" "+r+(u.length>2?" "+u[2]:""),t&&(t.oxp=i.indexOf("%")!==-1,t.oyp=r.indexOf("%")!==-1,t.oxr=i.charAt(1)==="=",t.oyr=r.charAt(1)==="=",t.ox=parseFloat(i.replace(fi,"")),t.oy=parseFloat(r.replace(fi,"")),t.v=n),t||n},or=function(n,t){return typeof n=="string"&&n.charAt(1)==="="?parseInt(n.charAt(0)+"1",10)*parseFloat(n.substr(2)):parseFloat(n)-parseFloat(t)},c=function(n,t){return n==null?t:typeof n=="string"&&n.charAt(1)==="="?parseInt(n.charAt(0)+"1",10)*parseFloat(n.substr(2))+t:parseFloat(n)},ct=function(n,t,i,r){var h=1e-6,f,o,u,e,s;return n==null?e=t:typeof n=="number"?e=n:(f=360,o=n.split("_"),s=n.charAt(1)==="=",u=(s?parseInt(n.charAt(0)+"1",10)*parseFloat(o[0].substr(2)):parseFloat(o[0]))*(n.indexOf("rad")===-1?1:nt)-(s?0:t),o.length&&(r&&(r[i]=t+u),n.indexOf("short")!==-1&&(u=u%f,u!==u%(f/2)&&(u=u<0?u+f:u-f)),n.indexOf("_cw")!==-1&&u<0?u=(u+f*9999999999)%f-(u/f|0)*f:n.indexOf("ccw")!==-1&&u>0&&(u=(u-f*9999999999)%f-(u/f|0)*f)),e=t+u),e<h&&e>-h&&(e=0),e},rt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ai=function(n,t,i){return n=n<0?n+1:n>1?n-1:n,(n*6<1?t+(i-t)*n*6:n<.5?i:n*3<2?t+(i-t)*(2/3-n)*6:t)*255+.5|0},vi=r.parseColor=function(n){var i,t,e,u,f,r;return!n||n===""?rt.black:typeof n=="number"?[n>>16,n>>8&255,n&255]:(n.charAt(n.length-1)===","&&(n=n.substr(0,n.length-1)),rt[n])?rt[n]:n.charAt(0)==="#"?(n.length===4&&(i=n.charAt(1),t=n.charAt(2),e=n.charAt(3),n="#"+i+i+t+t+e+e),n=parseInt(n.substr(1),16),[n>>16,n>>8&255,n&255]):n.substr(0,3)==="hsl"?(n=n.match(wt),u=Number(n[0])%360/360,f=Number(n[1])/100,r=Number(n[2])/100,t=r<=.5?r*(f+1):r+f-r*f,i=r*2-t,n.length>3&&(n[3]=Number(n[3])),n[0]=ai(u+1/3,i,t),n[1]=ai(u,i,t),n[2]=ai(u-1/3,i,t),n):(n=n.match(wt)||rt.transparent,n[0]=Number(n[0]),n[1]=Number(n[1]),n[2]=Number(n[2]),n.length>3&&(n[3]=Number(n[3])),n)},ut="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(i in rt)ut+="|"+i+"\\b";ut=new RegExp(ut+")","gi");var sr=function(n,t,i,r){if(n==null)return function(n){return n};var s=t?(n.match(ut)||[""])[0]:"",f=n.split(s).join("").match(ui)||[],h=n.substr(0,n.indexOf(f[0])),c=n.charAt(n.length-1)===")"?")":"",e=n.indexOf(" ")!==-1?" ":",",u=f.length,l=u>0?f[0].replace(wt,""):"",o;return u?o=t?function(n){var p,a,t,v;if(typeof n=="number")n+=l;else if(r&&y.test(n)){for(v=n.replace(y,"|").split("|"),t=0;t<v.length;t++)v[t]=o(v[t]);return v.join(",")}if(p=(n.match(ut)||[s])[0],a=n.split(p).join("").match(ui)||[],t=a.length,u>t--)while(++t<u)a[t]=i?a[(t-1)/2|0]:f[t];return h+a.join(e)+e+p+c+(n.indexOf("inset")!==-1?" inset":"")}:function(n){var s,a,t;if(typeof n=="number")n+=l;else if(r&&y.test(n)){for(a=n.replace(y,"|").split("|"),t=0;t<a.length;t++)a[t]=o(a[t]);return a.join(",")}if(s=n.match(ui)||[],t=s.length,u>t--)while(++t<u)s[t]=i?s[(t-1)/2|0]:f[t];return h+s.join(e)+c}:function(n){return n}},yi=function(n){return n=n.split(","),function(t,i,r,u,f,e,o){var h=(i+"").split(" "),s;for(o={},s=0;s<4;s++)o[n[s]]=h[s]=h[s]||h[(s-1)/2>>0];return u.parse(t,o,f,e)}},pu=p._setPluginRatio=function(n){this.plugin.setRatio(n);for(var u=this.data,o=u.proxy,i=u.firstMPT,s=1e-6,r,t,f,e;i;)r=o[i.v],i.r?r=Math.round(r):r<s&&r>-s&&(r=0),i.t[i.p]=r,i=i._next;if(u.autoRotate&&(u.autoRotate.rotation=o.rotation),n===1)for(i=u.firstMPT;i;){if(t=i.t,t.type){if(t.type===1){for(e=t.xs0+t.s+t.xs1,f=1;f<t.l;f++)e+=t["xn"+f]+t["xs"+(f+1)];t.e=e}}else t.e=t.s+t.xs0;i=i._next}},pi=function(n,t,i,r,u){this.t=n;this.p=t;this.v=i;this.r=u;r&&(r._prev=this,this._next=r)},wu=p._parseToProxy=function(n,t,i,r,u,f){var s=r,c={},l={},y=i._transform,p=kt,a,e,o,h,v;for(i._transform=null,kt=t,r=v=i.parse(n,t,r,u),kt=p,f&&(i._transform=y,s&&(s._prev=null,s._prev&&(s._prev._next=null)));r&&r!==s;){if(r.type<=1&&(e=r.p,l[e]=r.s+r.c,c[e]=r.s,f||(h=new pi(r,"s",e,h,r.r),r.c=0),r.type===1))for(a=r.l;--a>0;)o="xn"+a,e=r.p+"_"+o,l[e]=r.data[o],c[e]=r[o],f||(h=new pi(r,o,e,h,r.rxp[o]));r=r._next}return{proxy:c,end:l,firstMPT:h,pt:v}},o=p.CSSPropTween=function(n,t,i,r,u,f,e,s,h,c,l){this.t=n;this.p=t;this.s=i;this.c=r;this.n=e||t;n instanceof o||ri.push(this.n);this.r=s;this.type=f||0;h&&(this.pr=h,ft=!0);this.b=c===undefined?i:c;this.e=l===undefined?i+r:l;u&&(this._next=u,u._prev=this)},ni=function(n,t,i,r,u,f){var e=new o(n,t,i,r-i,u,-1,f);return e.b=i,e.e=e.xs0=r,e},ti=r.parseComplex=function(n,t,i,r,u,f,e,s,h,c){i=i||f||"";e=new o(n,t,0,0,e,c?2:1,null,!1,s,i,r);r+="";var p=i.split(", ").join(",").split(" "),nt=r.split(", ").join(",").split(" "),ft=p.length,st=hi!==!1,v,w,b,l,a,tt,et,ut,k,ot,d,g;for((r.indexOf(",")!==-1||i.indexOf(",")!==-1)&&(p=p.join(" ").replace(y,", ").split(" "),nt=nt.join(" ").replace(y,", ").split(" "),ft=p.length),ft!==nt.length&&(p=(f||"").split(" "),ft=p.length),e.plugin=h,e.setRatio=c,v=0;v<ft;v++)if(l=p[v],a=nt[v],ut=parseFloat(l),ut||ut===0)e.appendXtra("",ut,or(a,ut),a.replace(bi,""),st&&a.indexOf("px")!==-1,!0);else if(u&&(l.charAt(0)==="#"||rt[l]||ki.test(l)))g=a.charAt(a.length-1)===","?"),":")",l=vi(l),a=vi(a),k=l.length+a.length>6,k&&!it&&a[3]===0?(e["xs"+e.l]+=e.l?" transparent":"transparent",e.e=e.e.split(nt[v]).join("transparent")):(it||(k=!1),e.appendXtra(k?"rgba(":"rgb(",l[0],a[0]-l[0],",",!0,!0).appendXtra("",l[1],a[1]-l[1],",",!0).appendXtra("",l[2],a[2]-l[2],k?",":g,!0),k&&(l=l.length<4?1:l[3],e.appendXtra("",l,(a.length<4?1:a[3])-l,g,!1)));else if(tt=l.match(wt),tt){if(et=a.match(bi),!et||et.length!==tt.length)return e;for(b=0,w=0;w<tt.length;w++)d=tt[w],ot=l.indexOf(d,b),e.appendXtra(l.substr(b,ot-b),Number(d),or(et[w],d),"",st&&l.substr(ot+d.length,2)==="px",w===0),b=ot+d.length;e["xs"+e.l]+=l.substr(b)}else e["xs"+e.l]+=e.l?" "+l:l;if(r.indexOf("=")!==-1&&e.data){for(g=e.xs0+e.data.s,v=1;v<e.l;v++)g+=e["xs"+v]+e.data["xn"+v];e.e=g+e["xs"+v]}return e.l||(e.type=-1,e.xs0=e.e),e.xfirst||e},s=9;for(i=o.prototype,i.l=i.pr=0;--s>0;)i["xn"+s]=0,i["xs"+s]="";i.xs0="";i._next=i._prev=i.xfirst=i.data=i.plugin=i.setRatio=i.rxp=null;i.appendXtra=function(n,t,i,r,u,f){var e=this,s=e.l;return(e["xs"+s]+=f&&s?" "+n:n||"",!i&&s!==0&&!e.plugin)?(e["xs"+s]+=t+(r||""),e):(e.l++,e.type=e.setRatio?2:1,e["xs"+e.l]=r||"",s>0)?(e.data["xn"+s]=t+i,e.rxp["xn"+s]=u,e["xn"+s]=t,e.plugin||(e.xfirst=new o(e,"xn"+s,t,i,e.xfirst||e,0,e.n,u,e.pr),e.xfirst.xs0=0),e):(e.data={s:t+i},e.rxp={},e.s=t,e.c=i,e.r=u,e)};var hr=function(n,t){t=t||{};this.p=t.prefix?et(n)||n:n;l[n]=l[this.p]=this;this.format=t.formatter||sr(t.defaultValue,t.color,t.collapsible,t.multi);t.parser&&(this.parse=t.parser);this.clrs=t.color;this.multi=t.multi;this.keyword=t.keyword;this.dflt=t.defaultValue;this.pr=t.priority||0},f=p._registerComplexSpecialProp=function(n,t,i){typeof t!="object"&&(t={parser:i});var u=n.split(","),f=t.defaultValue,r,e;for(i=i||[f],r=0;r<u.length;r++)t.prefix=r===0&&t.prefix,t.defaultValue=i[r]||f,e=new hr(u[r],t)},cu=function(n){if(!l[n]){var t=n.charAt(0).toUpperCase()+n.substr(1)+"Plugin";f(n,{parser:function(n,i,r,u,f,e,o){var s=nu.com.greensock.plugins[t];return s?(s._cssRegister(),l[r].parse(n,i,r,u,f,e,o)):(ur("Error: "+t+" js file not loaded."),f)}})}};i=hr.prototype;i.parseComplex=function(n,t,i,r,u,f){var h=this.keyword,e,o,s,a,c,l;if(this.multi&&(y.test(i)||y.test(t)?(o=t.replace(y,"|").split("|"),s=i.replace(y,"|").split("|")):h&&(o=[t],s=[i])),s){for(a=s.length>o.length?s.length:o.length,e=0;e<a;e++)t=o[e]=o[e]||this.dflt,i=s[e]=s[e]||this.dflt,h&&(c=t.indexOf(h),l=i.indexOf(h),c!==l&&(l===-1?o[e]=o[e].split(h).join(""):c===-1&&(o[e]+=" "+h)));t=o.join(", ");i=s.join(", ")}return ti(n,this.p,t,i,this.clrs,this.dflt,r,this.pr,u,f)};i.parse=function(n,t,i,r,f,o){return this.parseComplex(n.style,this.format(u(n,this.p,e,!1,this.dflt)),this.format(t),f,o)};r.registerSpecialProp=function(n,t,i){f(n,{parser:function(n,r,u,f,e,s){var h=new o(n,u,0,0,e,2,u,!1,i);return h.plugin=s,h.setRatio=t(n,r,f._tween,u),h},priority:i})};r.useSVGTransformAttr=dt||gt;var cr="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),h=et("transform"),lr=fr+"transform",lt=et("transformOrigin"),v=et("perspective")!==null,ii=p.Transform=function(){this.perspective=parseFloat(r.defaultTransformPerspective)||0;this.force3D=r.defaultForce3D===!1||!v?!1:r.defaultForce3D||"auto"},lu=window.SVGElement,g,ar=function(n,t,i){var r=a.createElementNS("http://www.w3.org/2000/svg",n),f=/([a-z])([A-Z])/g;for(var u in i)r.setAttributeNS(null,u.replace(f,"$1-$2").toLowerCase(),i[u]);return t.appendChild(r),r},vr=a.documentElement,au=function(){var t=tt||/Android/i.test(w)&&!window.chrome,i,n,r;return a.createElementNS&&!t&&(i=ar("svg",vr),n=ar("rect",i,{width:100,height:50,x:100}),r=n.getBoundingClientRect().width,n.style[lt]="50% 50%",n.style[h]="scaleX(0.5)",t=r===n.getBoundingClientRect().width&&!(gt&&v),vr.removeChild(i)),t}(),yr=function(n,t,i,u,f){var s=n._gsTransform,e=wr(n,!0),h,l,a,v,y,p,o,w,b,k,d,c,g,nt;s&&(g=s.xOrigin,nt=s.yOrigin);(!u||(h=u.split(" ")).length<2)&&(o=n.getBBox(),t=ht(t).split(" "),h=[(t[0].indexOf("%")!==-1?parseFloat(t[0])/100*o.width:parseFloat(t[0]))+o.x,(t[1].indexOf("%")!==-1?parseFloat(t[1])/100*o.height:parseFloat(t[1]))+o.y]);i.xOrigin=v=parseFloat(h[0]);i.yOrigin=y=parseFloat(h[1]);u&&e!==wi&&(p=e[0],o=e[1],w=e[2],b=e[3],k=e[4],d=e[5],c=p*b-o*w,l=v*(b/c)+y*(-w/c)+(w*d-b*k)/c,a=v*(-o/c)+y*(p/c)-(p*d-o*k)/c,v=i.xOrigin=h[0]=l,y=i.yOrigin=h[1]=a);s&&(f||f!==!1&&r.defaultSmoothOrigin!==!1?(l=v-g,a=y-nt,s.xOffset+=l*e[0]+a*e[2]-l,s.yOffset+=l*e[1]+a*e[3]-a):s.xOffset=s.yOffset=0);n.setAttribute("data-svg-origin",h.join(" "))},pr=function(n){return!!(lu&&typeof n.getBBox=="function"&&n.getCTM&&(!n.parentNode||n.parentNode.getBBox&&n.parentNode.getCTM))},wi=[1,0,0,1,0,0],wr=function(n,t){var o=n._gsTransform||new ii,l=1e5,f,r,i,e,c;if(h?r=u(n,lr,null,!0):n.currentStyle&&(r=n.currentStyle.filter.match(fu),r=r&&r.length===4?[r[0].substr(4),Number(r[2].substr(4)),Number(r[1].substr(4)),r[3].substr(4),o.x||0,o.y||0].join(","):""),f=!r||r==="none"||r==="matrix(1, 0, 0, 1, 0, 0)",(o.svg||n.getBBox&&pr(n))&&(f&&(n.style[h]+"").indexOf("matrix")!==-1&&(r=n.style[h],f=0),i=n.getAttribute("transform"),f&&i&&(i.indexOf("matrix")!==-1?(r=i,f=0):i.indexOf("translate")!==-1&&(r="matrix(1,0,0,1,"+i.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",f=0))),f)return wi;for(i=(r||"").match(/(?:\-|\b)[\d\-\.e]+\b/gi)||[],s=i.length;--s>-1;)e=Number(i[s]),i[s]=(c=e-(e|=0))?(c*l+(c<0?-.5:.5)|0)/l+e:e;return t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i},at=p.getTransform=function(n,i,f,o){if(n._gsTransform&&f&&!o)return n._gsTransform;var s=f?n._gsTransform||new ii:new ii,ei=s.scaleX<0,ti=2e-5,ut=1e5,oi=v?parseFloat(u(n,lt,i,!1,"0 0 0").split(" ")[2])||s.zOrigin||0:0,si=parseFloat(r.defaultTransformPerspective)||0,c,wt,gt,ni,ft,rt;if(s.svg=!!(n.getBBox&&pr(n)),s.svg&&(yr(n,u(n,lt,e,!1,"50% 50%")+"",s,n.getAttribute("data-svg-origin")),g=r.useSVGTransformAttr||au),c=wr(n),c!==wi){if(c.length===16){var d=c[0],w=c[1],bt=c[2],hi=c[3],ht=c[4],b=c[5],tt=c[6],ci=c[7],et=c[8],k=c[9],p=c[10],ri=c[12],ui=c[13],ot=c[14],it=c[11],y=Math.atan2(tt,p),kt,st,dt,l,a;s.zOrigin&&(ot=-s.zOrigin,ri=et*ot-c[12],ui=k*ot-c[13],ot=p*ot+s.zOrigin-c[14]);s.rotationX=y*nt;y&&(l=Math.cos(-y),a=Math.sin(-y),kt=ht*l+et*a,st=b*l+k*a,dt=tt*l+p*a,et=ht*-a+et*l,k=b*-a+k*l,p=tt*-a+p*l,it=ci*-a+it*l,ht=kt,b=st,tt=dt);y=Math.atan2(et,p);s.rotationY=y*nt;y&&(l=Math.cos(-y),a=Math.sin(-y),kt=d*l-et*a,st=w*l-k*a,dt=bt*l-p*a,k=w*a+k*l,p=bt*a+p*l,it=hi*a+it*l,d=kt,w=st,bt=dt);y=Math.atan2(w,d);s.rotation=y*nt;y&&(l=Math.cos(-y),a=Math.sin(-y),d=d*l+ht*a,st=w*l+b*a,b=w*-a+b*l,tt=bt*-a+tt*l,w=st);s.rotationX&&Math.abs(s.rotationX)+Math.abs(s.rotation)>359.9&&(s.rotationX=s.rotation=0,s.rotationY+=180);s.scaleX=(Math.sqrt(d*d+w*w)*ut+.5|0)/ut;s.scaleY=(Math.sqrt(b*b+k*k)*ut+.5|0)/ut;s.scaleZ=(Math.sqrt(tt*tt+p*p)*ut+.5|0)/ut;s.skewX=0;s.perspective=it?1/(it<0?-it:it):0;s.x=ri;s.y=ui;s.z=ot;s.svg&&(s.x-=s.xOrigin-(s.xOrigin*d-s.yOrigin*ht),s.y-=s.yOrigin-(s.yOrigin*w-s.xOrigin*b))}else if((!v||o||!c.length||s.x!==c[4]||s.y!==c[5]||!s.rotationX&&!s.rotationY)&&!(s.x!==undefined&&u(n,"display",i)==="none")){var fi=c.length>=6,ct=fi?c[0]:1,at=c[1]||0,yt=c[2]||0,pt=fi?c[3]:1;s.x=c[4]||0;s.y=c[5]||0;gt=Math.sqrt(ct*ct+at*at);ni=Math.sqrt(pt*pt+yt*yt);ft=ct||at?Math.atan2(at,ct)*nt:s.rotation||0;rt=yt||pt?Math.atan2(yt,pt)*nt+ft:s.skewX||0;Math.abs(rt)>90&&Math.abs(rt)<270&&(ei?(gt*=-1,rt+=ft<=0?180:-180,ft+=ft<=0?180:-180):(ni*=-1,rt+=rt<=0?180:-180));s.scaleX=gt;s.scaleY=ni;s.rotation=ft;s.skewX=rt;v&&(s.rotationX=s.rotationY=s.z=0,s.perspective=si,s.scaleZ=1);s.svg&&(s.x-=s.xOrigin-(s.xOrigin*ct+s.yOrigin*yt),s.y-=s.yOrigin-(s.xOrigin*at+s.yOrigin*pt))}s.zOrigin=oi;for(wt in s)s[wt]<ti&&s[wt]>-ti&&(s[wt]=0)}return f&&(n._gsTransform=s,s.svg&&(g&&n.style[h]?t.delayedCall(.001,function(){vt(n.style,h)}):!g&&n.getAttribute("transform")&&t.delayedCall(.001,function(){n.removeAttribute("transform")}))),s},vu=function(n){var t=this.data,nt=-t.rotation*k,ft=nt+t.skewX*k,e=1e5,o=(Math.cos(nt)*t.scaleX*e|0)/e,u=(Math.sin(nt)*t.scaleX*e|0)/e,f=(Math.sin(ft)*-t.scaleY*e|0)/e,h=(Math.cos(ft)*t.scaleY*e|0)/e,d=this.t.style,g=this.t.currentStyle,c,y,et,w,v,ot;if(g){y=u;u=-f;f=-y;c=g.filter;d.filter="";var l=this.t.offsetWidth,a=this.t.offsetHeight,it=g.position!=="absolute",p="progid:DXImageTransform.Microsoft.Matrix(M11="+o+", M12="+u+", M21="+f+", M22="+h,rt=t.x+l*t.xPercent/100,ut=t.y+a*t.yPercent/100,i,r;if(t.ox!=null&&(i=(t.oxp?l*t.ox*.01:t.ox)-l/2,r=(t.oyp?a*t.oy*.01:t.oy)-a/2,rt+=i-(i*o+r*u),ut+=r-(i*f+r*h)),it?(i=l/2,r=a/2,p+=", Dx="+(i-(i*o+r*u)+rt)+", Dy="+(r-(i*f+r*h)+ut)+")"):p+=", sizingMethod='auto expand')",d.filter=c.indexOf("DXImageTransform.Microsoft.Matrix(")!==-1?c.replace(eu,p):p+" "+c,(n===0||n===1)&&o===1&&u===0&&f===0&&h===1&&(it&&p.indexOf("Dx=0, Dy=0")===-1||ei.test(c)&&parseFloat(RegExp.$1)!==100||c.indexOf("gradient("&&c.indexOf("Alpha"))===-1&&d.removeAttribute("filter")),!it)for(et=tt<8?1:-1,i=t.ieOffsetX||0,r=t.ieOffsetY||0,t.ieOffsetX=Math.round((l-((o<0?-o:o)*l+(u<0?-u:u)*a))/2+rt),t.ieOffsetY=Math.round((a-((h<0?-h:h)*a+(f<0?-f:f)*l))/2+ut),s=0;s<4;s++)v=su[s],w=g[v],y=w.indexOf("px")!==-1?parseFloat(w):b(this.t,v,parseFloat(w),w.replace(bt,""))||0,ot=y!==t[v]?s<2?-t.ieOffsetX:-t.ieOffsetY:s<2?i-t.ieOffsetX:r-t.ieOffsetY,d[v]=(t[v]=Math.round(y-ot*(s===0||s===2?1:et)))+"px"}},yu=p.set3DTransformRatio=p.setTransformRatio=function(n){var t=this.data,wt=this.t.style,r=t.rotation,bt=t.rotationX,kt=t.rotationY,b=t.scaleX,d=t.scaleY,et=t.scaleZ,c=t.x,l=t.y,ot=t.z,ht=t.svg,st=t.perspective,dt=t.force3D,a,y,tt,p,w,it,lt,at,rt,vt,yt,ut,ct,i,f,e,u,ni,nt,o,s,pt,ft;if(((n===1||n===0)&&dt==="auto"&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!dt)&&!ot&&!st&&!kt&&!bt||g&&ht||!v){r||t.skewX||ht?(r*=k,pt=t.skewX*k,ft=1e5,a=Math.cos(r)*b,p=Math.sin(r)*b,y=Math.sin(r-pt)*-d,w=Math.cos(r-pt)*d,pt&&t.skewType==="simple"&&(u=Math.tan(pt),u=Math.sqrt(1+u*u),y*=u,w*=u,t.skewY&&(a*=u,p*=u)),ht&&(c+=t.xOrigin-(t.xOrigin*a+t.yOrigin*y)+t.xOffset,l+=t.yOrigin-(t.xOrigin*p+t.yOrigin*w)+t.yOffset,g&&(t.xPercent||t.yPercent)&&(i=this.t.getBBox(),c+=t.xPercent*.01*i.width,l+=t.yPercent*.01*i.height),i=1e-6,c<i&&c>-i&&(c=0),l<i&&l>-i&&(l=0)),nt=(a*ft|0)/ft+","+(p*ft|0)/ft+","+(y*ft|0)/ft+","+(w*ft|0)/ft+","+c+","+l+")",ht&&g?this.t.setAttribute("transform","matrix("+nt):wt[h]=(t.xPercent||t.yPercent?"translate("+t.xPercent+"%,"+t.yPercent+"%) matrix(":"matrix(")+nt):wt[h]=(t.xPercent||t.yPercent?"translate("+t.xPercent+"%,"+t.yPercent+"%) matrix(":"matrix(")+b+",0,0,"+d+","+c+","+l+")";return}if(gt&&(i=.0001,b<i&&b>-i&&(b=et=2e-5),d<i&&d>-i&&(d=et=2e-5),!st||t.z||t.rotationX||t.rotationY||(st=0)),r||t.skewX)r*=k,f=a=Math.cos(r),e=p=Math.sin(r),t.skewX&&(r-=t.skewX*k,f=Math.cos(r),e=Math.sin(r),t.skewType==="simple"&&(u=Math.tan(t.skewX*k),u=Math.sqrt(1+u*u),f*=u,e*=u,t.skewY&&(a*=u,p*=u))),y=-e,w=f;else if(kt||bt||et!==1||st||ht)a=w=1,y=p=0;else{wt[h]=(t.xPercent||t.yPercent?"translate("+t.xPercent+"%,"+t.yPercent+"%) translate3d(":"translate3d(")+c+"px,"+l+"px,"+ot+"px)"+(b!==1||d!==1?" scale("+b+","+d+")":"");return}rt=1;tt=it=lt=at=vt=yt=0;ut=st?-1/st:0;ct=t.zOrigin;i=1e-6;o=",";s="0";r=kt*k;r&&(f=Math.cos(r),e=Math.sin(r),lt=-e,vt=ut*-e,tt=a*e,it=p*e,rt=f,ut*=f,a*=f,p*=f);r=bt*k;r&&(f=Math.cos(r),e=Math.sin(r),u=y*f+tt*e,ni=w*f+it*e,at=rt*e,yt=ut*e,tt=y*-e+tt*f,it=w*-e+it*f,rt=rt*f,ut=ut*f,y=u,w=ni);et!==1&&(tt*=et,it*=et,rt*=et,ut*=et);d!==1&&(y*=d,w*=d,at*=d,yt*=d);b!==1&&(a*=b,p*=b,lt*=b,vt*=b);(ct||ht)&&(ct&&(c+=tt*-ct,l+=it*-ct,ot+=rt*-ct+ct),ht&&(c+=t.xOrigin-(t.xOrigin*a+t.yOrigin*y)+t.xOffset,l+=t.yOrigin-(t.xOrigin*p+t.yOrigin*w)+t.yOffset),c<i&&c>-i&&(c=s),l<i&&l>-i&&(l=s),ot<i&&ot>-i&&(ot=0));nt=t.xPercent||t.yPercent?"translate("+t.xPercent+"%,"+t.yPercent+"%) matrix3d(":"matrix3d(";nt+=(a<i&&a>-i?s:a)+o+(p<i&&p>-i?s:p)+o+(lt<i&&lt>-i?s:lt);nt+=o+(vt<i&&vt>-i?s:vt)+o+(y<i&&y>-i?s:y)+o+(w<i&&w>-i?s:w);bt||kt?(nt+=o+(at<i&&at>-i?s:at)+o+(yt<i&&yt>-i?s:yt)+o+(tt<i&&tt>-i?s:tt),nt+=o+(it<i&&it>-i?s:it)+o+(rt<i&&rt>-i?s:rt)+o+(ut<i&&ut>-i?s:ut)+o):nt+=",0,0,0,0,1,0,";nt+=c+o+l+o+ot+o+(st?1+-ot/st:1)+")";wt[h]=nt};for(i=ii.prototype,i.x=i.y=i.z=i.skewX=i.skewY=i.rotation=i.rotationX=i.rotationY=i.zOrigin=i.xPercent=i.yPercent=i.xOffset=i.yOffset=0,i.scaleX=i.scaleY=i.scaleZ=1,f("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(n,t,i,f,s,l,y){if(f._lastParsedTransform===y)return s;f._lastParsedTransform=y;var ut=n._gsTransform,p=f._transform=at(n,e,!0,y.parseTransform),yt=n.style,pt=1e-6,wt=cr.length,w=y,it={},rt="transformOrigin",b,ot,nt,k,ft,et,tt,st,vt;if(typeof w.transform=="string"&&h)nt=d.style,nt[h]=w.transform,nt.display="block",nt.position="absolute",a.body.appendChild(d),b=at(d,null,!1),a.body.removeChild(d),w.xPercent!=null&&(b.xPercent=c(w.xPercent,p.xPercent)),w.yPercent!=null&&(b.yPercent=c(w.yPercent,p.yPercent));else if(typeof w=="object"){if(b={scaleX:c(w.scaleX!=null?w.scaleX:w.scale,p.scaleX),scaleY:c(w.scaleY!=null?w.scaleY:w.scale,p.scaleY),scaleZ:c(w.scaleZ,p.scaleZ),x:c(w.x,p.x),y:c(w.y,p.y),z:c(w.z,p.z),xPercent:c(w.xPercent,p.xPercent),yPercent:c(w.yPercent,p.yPercent),perspective:c(w.transformPerspective,p.perspective)},tt=w.directionalRotation,tt!=null)if(typeof tt=="object")for(nt in tt)w[nt]=tt[nt];else w.rotation=tt;typeof w.x=="string"&&w.x.indexOf("%")!==-1&&(b.x=0,b.xPercent=c(w.x,p.xPercent));typeof w.y=="string"&&w.y.indexOf("%")!==-1&&(b.y=0,b.yPercent=c(w.y,p.yPercent));b.rotation=ct("rotation"in w?w.rotation:"shortRotation"in w?w.shortRotation+"_short":"rotationZ"in w?w.rotationZ:p.rotation,p.rotation,"rotation",it);v&&(b.rotationX=ct("rotationX"in w?w.rotationX:"shortRotationX"in w?w.shortRotationX+"_short":p.rotationX||0,p.rotationX,"rotationX",it),b.rotationY=ct("rotationY"in w?w.rotationY:"shortRotationY"in w?w.shortRotationY+"_short":p.rotationY||0,p.rotationY,"rotationY",it));b.skewX=w.skewX==null?p.skewX:ct(w.skewX,p.skewX);b.skewY=w.skewY==null?p.skewY:ct(w.skewY,p.skewY);(ot=b.skewY-p.skewY)&&(b.skewX+=ot,b.rotation+=ot)}for(v&&w.force3D!=null&&(p.force3D=w.force3D,et=!0),p.skewType=w.skewType||p.skewType||r.defaultSkewType,ft=p.force3D||p.z||p.rotationX||p.rotationY||b.z||b.rotationX||b.rotationY||b.perspective,ft||w.scale==null||(b.scaleZ=1);--wt>-1;)i=cr[wt],k=b[i]-p[i],(k>pt||k<-pt||w[i]!=null||kt[i]!=null)&&(et=!0,s=new o(p,i,p[i],k,s),i in it&&(s.e=it[i]),s.xs0=0,s.plugin=l,f._overwriteProps.push(s.n));return k=w.transformOrigin,p.svg&&(k||w.svgOrigin)&&(st=p.xOffset,vt=p.yOffset,yr(n,ht(k),b,w.svgOrigin,w.smoothOrigin),s=ni(p,"xOrigin",(ut?p:b).xOrigin,b.xOrigin,s,rt),s=ni(p,"yOrigin",(ut?p:b).yOrigin,b.yOrigin,s,rt),(st!==p.xOffset||vt!==p.yOffset)&&(s=ni(p,"xOffset",ut?st:p.xOffset,p.xOffset,s,rt),s=ni(p,"yOffset",ut?vt:p.yOffset,p.yOffset,s,rt)),k=g?null:"0px 0px"),(k||v&&ft&&p.zOrigin)&&(h?(et=!0,i=lt,k=(k||u(n,i,e,!1,"50% 50%"))+"",s=new o(yt,i,0,0,s,-1,rt),s.b=yt[i],s.plugin=l,v?(nt=p.zOrigin,k=k.split(" "),p.zOrigin=(k.length>2&&!(nt!==0&&k[2]==="0px")?parseFloat(k[2]):nt)||0,s.xs0=s.e=k[0]+" "+(k[1]||"50%")+" 0px",s=new o(p,"zOrigin",0,0,s,-1,s.n),s.b=nt,s.xs0=s.e=p.zOrigin):s.xs0=s.e=k):ht(k+"",p)),et&&(f._transformType=!(p.svg&&g)&&(ft||this._transformType===3)?3:2),s},prefix:!0}),f("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),f("borderRadius",{defaultValue:"0px",parser:function(n,t,i,r,f){t=this.format(t);var v=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],ut=n.style,tt,l,d,h,o,s,p,a,it,rt,c,y,g,w,k,nt;for(it=parseFloat(n.offsetWidth),rt=parseFloat(n.offsetHeight),tt=t.split(" "),l=0;l<v.length;l++)this.p.indexOf("border")&&(v[l]=et(v[l])),o=h=u(n,v[l],e,!1,"0px"),o.indexOf(" ")!==-1&&(h=o.split(" "),o=h[0],h=h[1]),s=d=tt[l],p=parseFloat(o),y=o.substr((p+"").length),g=s.charAt(1)==="=",g?(a=parseInt(s.charAt(0)+"1",10),s=s.substr(2),a*=parseFloat(s),c=s.substr((a+"").length-(a<0?1:0))||""):(a=parseFloat(s),c=s.substr((a+"").length)),c===""&&(c=pt[i]||y),c!==y&&(w=b(n,"borderLeft",p,y),k=b(n,"borderTop",p,y),c==="%"?(o=w/it*100+"%",h=k/rt*100+"%"):c==="em"?(nt=b(n,"borderLeft",1,"em"),o=w/nt+"em",h=k/nt+"em"):(o=w+"px",h=k+"px"),g&&(s=parseFloat(o)+a+c,d=parseFloat(h)+a+c)),f=ti(ut,v[l],o+" "+h,s+" "+d,!1,"0px",f);return f},prefix:!0,formatter:sr("0px 0px 0px 0px",!1,!0)}),f("backgroundPosition",{defaultValue:"0 0",parser:function(n,t,i,r,f,o){var v="background-position",c=e||ot(n,null),s=this.format((c?tt?c.getPropertyValue(v+"-x")+" "+c.getPropertyValue(v+"-y"):c.getPropertyValue(v):n.currentStyle.backgroundPositionX+" "+n.currentStyle.backgroundPositionY)||"0 0"),y=this.format(t),l,b,h,p,w,a;if(s.indexOf("%")!==-1!=(y.indexOf("%")!==-1)&&(a=u(n,"backgroundImage").replace(ru,""),a&&a!=="none")){for(l=s.split(" "),b=y.split(" "),si.setAttribute("src",a),h=2;--h>-1;)s=l[h],p=s.indexOf("%")!==-1,p!==(b[h].indexOf("%")!==-1)&&(w=h===0?n.offsetWidth-si.width:n.offsetHeight-si.height,l[h]=p?parseFloat(s)/100*w+"px":parseFloat(s)/w*100+"%");s=l.join(" ")}return this.parseComplex(n.style,s,y,f,o)},formatter:ht}),f("backgroundSize",{defaultValue:"0 0",formatter:ht}),f("perspective",{defaultValue:"0px",prefix:!0}),f("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),f("transformStyle",{prefix:!0}),f("backfaceVisibility",{prefix:!0}),f("userSelect",{prefix:!0}),f("margin",{parser:yi("marginTop,marginRight,marginBottom,marginLeft")}),f("padding",{parser:yi("paddingTop,paddingRight,paddingBottom,paddingLeft")}),f("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(n,t,i,r,f,o){var c,s,h;return tt<9?(s=n.currentStyle,h=tt<8?" ":",",c="rect("+s.clipTop+h+s.clipRight+h+s.clipBottom+h+s.clipLeft+")",t=this.format(t).split(",").join(h)):(c=this.format(u(n,this.p,e,!1,this.dflt)),t=this.format(t)),this.parseComplex(n.style,c,t,f,o)}}),f("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),f("autoRound,strictUnits",{parser:function(n,t,i,r,u){return u}}),f("border",{defaultValue:"0px solid #000",parser:function(n,t,i,r,f,o){return this.parseComplex(n.style,this.format(u(n,"borderTopWidth",e,!1,"0px")+" "+u(n,"borderTopStyle",e,!1,"solid")+" "+u(n,"borderTopColor",e,!1,"#000")),this.format(t),f,o)},color:!0,formatter:function(n){var t=n.split(" ");return t[0]+" "+(t[1]||"solid")+" "+(n.match(ut)||["#000"])[0]}}),f("borderWidth",{parser:yi("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),f("float,cssFloat,styleFloat",{parser:function(n,t,i,r,u){var f=n.style,e="cssFloat"in f?"cssFloat":"styleFloat";return new o(f,e,0,0,u,-1,i,!1,0,f[e],t)}}),br=function(n){var i=this.t,t=i.filter||u(this.data,"filter")||"",r=this.s+this.c*n|0,f;r===100&&(t.indexOf("atrix(")===-1&&t.indexOf("radient(")===-1&&t.indexOf("oader(")===-1?(i.removeAttribute("filter"),f=!u(this.data,"filter")):(i.filter=t.replace(iu,""),f=!0));f||(this.xn1&&(i.filter=t=t||"alpha(opacity="+r+")"),t.indexOf("pacity")===-1?r===0&&this.xn1||(i.filter=t+" alpha(opacity="+r+")"):i.filter=t.replace(ei,"opacity="+r))},f("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(n,t,i,r,f,s){var h=parseFloat(u(n,"opacity",e,!1,"1")),c=n.style,l=i==="autoAlpha";return typeof t=="string"&&t.charAt(1)==="="&&(t=(t.charAt(0)==="-"?-1:1)*parseFloat(t.substr(2))+h),l&&h===1&&u(n,"visibility",e)==="hidden"&&t!==0&&(h=0),it?f=new o(c,"opacity",h,t-h,f):(f=new o(c,"opacity",h*100,(t-h)*100,f),f.xn1=l?1:0,c.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=n,f.plugin=s,f.setRatio=br),l&&(f=new o(c,"visibility",0,0,f,-1,null,!1,0,h!==0?"inherit":"hidden",t===0?"hidden":"inherit"),f.xs0="inherit",r._overwriteProps.push(f.n),r._overwriteProps.push(i)),f}}),vt=function(n,t){t&&(n.removeProperty?((t.substr(0,2)==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),n.removeProperty(t.replace(di,"-$1").toLowerCase())):n.removeAttribute(t))},kr=function(n){if(this.t._gsClassPT=this,n===1||n===0){this.t.setAttribute("class",n===0?this.b:this.e);for(var t=this.data,i=this.t.style;t;)t.v?i[t.p]=t.v:vt(i,t.p),t=t._next;n===1&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)},f("className",{parser:function(n,t,i,r,u,f,s){var l=n.getAttribute("class")||"",p=n.style.cssText,a,y,c,v,h;if(u=r._classNamePT=new o(n,i,0,0,u,2),u.setRatio=kr,u.pr=-11,ft=!0,u.b=l,y=st(n,e),c=n._gsClassPT,c){for(v={},h=c.data;h;)v[h.p]=1,h=h._next;c.setRatio(1)}return n._gsClassPT=u,u.e=t.charAt(1)!=="="?t:l.replace(new RegExp("\\s*\\b"+t.substr(2)+"\\b"),"")+(t.charAt(0)==="+"?" "+t.substr(2):""),n.setAttribute("class",u.e),a=li(n,y,st(n),s,v),n.setAttribute("class",l),u.data=a.firstMPT,n.style.cssText=p,u.xfirst=r.parse(n,a.difs,u,f)}}),dr=function(n){if((n===1||n===0)&&this.data._totalTime===this.data._totalDuration&&this.data.data!=="isFromStart"){var i=this.t.style,o=l.transform.parse,r,t,u,f,e;if(this.e==="all")i.cssText="",f=!0;else for(r=this.e.split(" ").join("").split(","),u=r.length;--u>-1;)t=r[u],l[t]&&(l[t].parse===o?f=!0:t=t==="transformOrigin"?lt:l[t].p),vt(i,t);f&&(vt(i,h),e=this.t._gsTransform,e&&(e.svg&&this.t.removeAttribute("data-svg-origin"),delete this.t._gsTransform))}},f("clearProps",{parser:function(n,t,i,r,u){return u=new o(n,i,0,0,u,2),u.setRatio=dr,u.e=t,u.pr=-10,u.data=r._tween,ft=!0,u}}),i="bezier,throwProps,physicsProps,physics2D".split(","),s=i.length;s--;)cu(i[s]);return i=r.prototype,i._firstPT=i._lastParsedTransform=i._transform=null,i._onInitTween=function(n,t,i){if(!n.nodeType)return!1;this._target=n;this._tween=i;this._vars=t;hi=t.autoRound;ft=!1;pt=t.suffixMap||r.suffixMap;e=ot(n,"");ri=this._overwriteProps;var c=n.style,a,s,f,v,w,b,p,y,k;if(tr&&c.zIndex===""&&(a=u(n,"zIndex",e),(a==="auto"||a==="")&&this._addLazySet(c,"zIndex",0)),typeof t=="string"&&(v=c.cssText,a=st(n,e),c.cssText=v+";"+t,a=li(n,a,st(n)).difs,!it&&tu.test(t)&&(a.opacity=parseFloat(RegExp.$1)),t=a,c.cssText=v),this._firstPT=t.className?s=l.className.parse(n,t.className,"className",this,null,null,t):s=this.parse(n,t,null),this._transformType){for(k=this._transformType===3,h?dt&&(tr=!0,c.zIndex===""&&(p=u(n,"zIndex",e),(p==="auto"||p==="")&&this._addLazySet(c,"zIndex",0)),ir&&this._addLazySet(c,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(k?"visible":"hidden"))):c.zoom=1,f=s;f&&f._next;)f=f._next;y=new o(n,"transform",0,0,null,2);this._linkCSSP(y,null,f);y.setRatio=h?yu:vu;y.data=this._transform||at(n,e,!0);y.tween=i;y.pr=-1;ri.pop()}if(ft){while(s){for(b=s._next,f=v;f&&f.pr>s.pr;)f=f._next;(s._prev=f?f._prev:w)?s._prev._next=s:v=s;(s._next=f)?f._prev=s:w=s;s=b}this._firstPT=v}return!0},i.parse=function(n,t,i,r){var w=n.style,f,d,h,c,v,s,y,a,p,k;for(f in t)s=t[f],d=l[f],d?i=d.parse(n,s,f,this,i,r,t):(v=u(n,f,e)+"",p=typeof s=="string",f==="color"||f==="fill"||f==="stroke"||f.indexOf("Color")!==-1||p&&ki.test(s)?(p||(s=vi(s),s=(s.length>3?"rgba(":"rgb(")+s.join(",")+")"),i=ti(w,f,v,s,!0,"transparent",i,0,r)):p&&(s.indexOf(" ")!==-1||s.indexOf(",")!==-1)?i=ti(w,f,v,s,!0,null,i,0,r):(h=parseFloat(v),y=h||h===0?v.substr((h+"").length):"",(v===""||v==="auto")&&(f==="width"||f==="height"?(h=hu(n,f,e),y="px"):f==="left"||f==="top"?(h=er(n,f,e),y="px"):(h=f!=="opacity"?0:1,y="")),k=p&&s.charAt(1)==="=",k?(c=parseInt(s.charAt(0)+"1",10),s=s.substr(2),c*=parseFloat(s),a=s.replace(bt,"")):(c=parseFloat(s),a=p?s.replace(bt,""):""),a===""&&(a=f in pt?pt[f]:y),s=c||c===0?(k?c+h:c)+a:t[f],y!==a&&a!==""&&(c||c===0)&&h&&(h=b(n,f,h,y),a==="%"?(h/=b(n,f,100,"%")/100,t.strictUnits!==!0&&(v=h+"%")):a==="em"?h/=b(n,f,1,"em"):a!=="px"&&(c=b(n,f,c,a),a="px"),k&&(c||c===0)&&(s=c+h+a)),k&&(c+=h),(h||h===0)&&(c||c===0)?(i=new o(w,f,h,c-h,i,0,f,hi!==!1&&(a==="px"||f==="zIndex"),0,v,s),i.xs0=a):w[f]!==undefined&&(s||s+""!="NaN"&&s!=null)?(i=new o(w,f,c||h||0,0,i,-1,f,!1,0,v,s),i.xs0=s==="none"&&(f==="display"||f.indexOf("Style")!==-1)?v:s):ur("invalid "+f+" tween value: "+t[f]))),r&&i&&!i.plugin&&(i.plugin=r);return i},i.setRatio=function(n){var t=this._firstPT,f=1e-6,r,u,i;if(n===1&&(this._tween._time===this._tween._duration||this._tween._time===0))while(t){if(t.type!==2)if(t.r&&t.type!==-1)if(r=Math.round(t.s+t.c),t.type){if(t.type===1){for(i=t.l,u=t.xs0+r+t.xs1,i=1;i<t.l;i++)u+=t["xn"+i]+t["xs"+(i+1)];t.t[t.p]=u}}else t.t[t.p]=r+t.xs0;else t.t[t.p]=t.e;else t.setRatio(n);t=t._next}else if(!n&&(this._tween._time===this._tween._duration||this._tween._time===0)&&this._tween._rawPrevTime!==-1e-6)while(t)t.type!==2?t.t[t.p]=t.b:t.setRatio(n),t=t._next;else while(t){if(r=t.c*n+t.s,t.r?r=Math.round(r):r<f&&r>-f&&(r=0),t.type)if(t.type===1)if(i=t.l,i===2)t.t[t.p]=t.xs0+r+t.xs1+t.xn1+t.xs2;else if(i===3)t.t[t.p]=t.xs0+r+t.xs1+t.xn1+t.xs2+t.xn2+t.xs3;else if(i===4)t.t[t.p]=t.xs0+r+t.xs1+t.xn1+t.xs2+t.xn2+t.xs3+t.xn3+t.xs4;else if(i===5)t.t[t.p]=t.xs0+r+t.xs1+t.xn1+t.xs2+t.xn2+t.xs3+t.xn3+t.xs4+t.xn4+t.xs5;else{for(u=t.xs0+r+t.xs1,i=1;i<t.l;i++)u+=t["xn"+i]+t["xs"+(i+1)];t.t[t.p]=u}else t.type===-1?t.t[t.p]=t.xs0:t.setRatio&&t.setRatio(n);else t.t[t.p]=r+t.xs0;t=t._next}},i._enableTransforms=function(n){this._transform=this._transform||at(this._target,e,!0);this._transformType=!(this._transform.svg&&g)&&(n||this._transformType===3)?3:2},gr=function(){this.t[this.p]=this.e;this.data._linkCSSP(this,this._next,null,!0)},i._addLazySet=function(n,t,i){var r=this._firstPT=new o(n,t,0,0,this._firstPT,2);r.e=i;r.setRatio=gr;r.data=this},i._linkCSSP=function(n,t,i,r){return n&&(t&&(t._prev=n),n._next&&(n._next._prev=n._prev),n._prev?n._prev._next=n._next:this._firstPT===n&&(this._firstPT=n._next,r=!0),i?i._next=n:r||this._firstPT!==null||(this._firstPT=n),n._next=t,n._prev=i),n},i._kill=function(t){var u=t,i,f,r;if(t.autoAlpha||t.alpha){u={};for(f in t)u[f]=t[f];u.opacity=1;u.autoAlpha&&(u.visibility=1)}return t.className&&(i=this._classNamePT)&&(r=i.xfirst,r&&r._prev?this._linkCSSP(r._prev,i._next,r._prev._prev):r===this._firstPT&&(this._firstPT=i._next),i._next&&this._linkCSSP(i._next,i._next._next,r._prev),this._classNamePT=null),n.prototype._kill.call(this,u)},yt=function(n,t,i){var e,u,r,f;if(n.slice){for(u=n.length;--u>-1;)yt(n[u],t,i);return}for(e=n.childNodes,u=e.length;--u>-1;)r=e[u],f=r.type,r.style&&(t.push(st(r)),i&&i.push(r)),(f===1||f===9||f===11)&&r.childNodes.length&&yt(r,t,i)},r.cascadeTo=function(n,i,r){var o=t.to(n,i,r),l=[o],h=[],a=[],s=[],v=t._internals.reservedProps,u,f,e,c;for(n=o._targets||o.target,yt(n,h,s),o.render(i,!0,!0),yt(n,a),o.render(0,!0,!0),o._enabled(!0),u=s.length;--u>-1;)if(f=li(s[u],h[u],a[u]),f.firstMPT){f=f.difs;for(e in r)v[e]&&(f[e]=r[e]);c={};for(e in f)c[e]=h[u][e];l.push(t.fromTo(s[u],i,c,f))}return l},n.activate([r]),r},!0)});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};typeof define=="function"&&define.amd?define(["TweenLite"],t):typeof module!="undefined"&&module.exports&&(require("../TweenLite.js"),module.exports=t())}("CSSPlugin");_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(n){var f,u,s,a=_gsScope.GreenSockGlobals||_gsScope,p=a.com.greensock,v=2*Math.PI,y=Math.PI/2,r=p._class,t=function(t,i){var u=r("easing."+t,function(){},!0),f=u.prototype=new n;return f.constructor=u,f.getRatio=i,u},h=n.register||function(){},e=function(n,t,i,u){var f=r("easing."+n,{easeOut:new t,easeIn:new i,easeInOut:new u},!0);return h(f,n),f},c=function(n,t,i){this.t=n;this.v=t;i&&(this.next=i,i.prev=this,this.c=i.v-t,this.gap=i.t-n)},l=function(t,i){var u=r("easing."+t,function(n){this._p1=n||0===n?n:1.70158;this._p2=1.525*this._p1},!0),f=u.prototype=new n;return f.constructor=u,f.getRatio=i,f.config=function(n){return new u(n)},u},w=e("Back",l("BackOut",function(n){return(n-=1)*n*((this._p1+1)*n+this._p1)+1}),l("BackIn",function(n){return n*n*((this._p1+1)*n-this._p1)}),l("BackInOut",function(n){return 1>(n*=2)?.5*n*n*((this._p2+1)*n-this._p2):.5*((n-=2)*n*((this._p2+1)*n+this._p2)+2)})),o=r("easing.SlowMo",function(n,t,i){t=t||0===t?t:.7;null==n?n=.7:n>1&&(n=1);this._p=1!==n?t:0;this._p1=(1-n)/2;this._p2=n;this._p3=this._p1+this._p2;this._calcEnd=i===!0},!0),i=o.prototype=new n;return i.constructor=o,i.getRatio=function(n){var t=n+(.5-n)*this._p;return this._p1>n?this._calcEnd?1-(n=1-n/this._p1)*n:t-(n=1-n/this._p1)*n*n*n*t:n>this._p3?this._calcEnd?1-(n=(n-this._p3)/this._p1)*n:t+(n-t)*(n=(n-this._p3)/this._p1)*n*n*n:this._calcEnd?1:t},o.ease=new o(.7,.7),i.config=o.config=function(n,t,i){return new o(n,t,i)},f=r("easing.SteppedEase",function(n){n=n||1;this._p1=1/n;this._p2=n+1},!0),i=f.prototype=new n,i.constructor=f,i.getRatio=function(n){return 0>n?n=0:n>=1&&(n=.999999999),(this._p2*n>>0)*this._p1},i.config=f.config=function(n){return new f(n)},u=r("easing.RoughEase",function(t){t=t||{};for(var i,r,u,f,h,e,l=t.taper||"none",a=[],w=0,v=0|(t.points||20),o=v,y=t.randomize!==!1,b=t.clamp===!0,p=t.template instanceof n?t.template:null,s="number"==typeof t.strength?.4*t.strength:.4;--o>-1;)i=y?Math.random():1/v*o,r=p?p.getRatio(i):i,"none"===l?u=s:"out"===l?(f=1-i,u=f*f*s):"in"===l?u=i*i*s:.5>i?(f=2*i,u=.5*f*f*s):(f=2*(1-i),u=.5*f*f*s),y?r+=Math.random()*u-.5*u:o%2?r+=.5*u:r-=.5*u,b&&(r>1?r=1:0>r&&(r=0)),a[w++]={x:i,y:r};for(a.sort(function(n,t){return n.x-t.x}),e=new c(1,1,null),o=v;--o>-1;)h=a[o],e=new c(h.x,h.y,e);this._prev=new c(0,0,0!==e.t?e:e.next)},!0),i=u.prototype=new n,i.constructor=u,i.getRatio=function(n){var t=this._prev;if(n>t.t){for(;t.next&&n>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&t.t>=n;)t=t.prev;return this._prev=t,t.v+(n-t.t)/t.gap*t.c},i.config=function(n){return new u(n)},u.ease=new u,e("Bounce",t("BounceOut",function(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}),t("BounceIn",function(n){return 1/2.75>(n=1-n)?1-7.5625*n*n:2/2.75>n?1-(7.5625*(n-=1.5/2.75)*n+.75):2.5/2.75>n?1-(7.5625*(n-=2.25/2.75)*n+.9375):1-(7.5625*(n-=2.625/2.75)*n+.984375)}),t("BounceInOut",function(n){var t=.5>n;return n=t?1-2*n:2*n-1,n=1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375,t?.5*(1-n):.5*n+.5})),e("Circ",t("CircOut",function(n){return Math.sqrt(1-(n-=1)*n)}),t("CircIn",function(n){return-(Math.sqrt(1-n*n)-1)}),t("CircInOut",function(n){return 1>(n*=2)?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)})),s=function(t,i,u){var f=r("easing."+t,function(n,t){this._p1=n>=1?n:1;this._p2=(t||u)/(1>n?n:1);this._p3=this._p2/v*(Math.asin(1/this._p1)||0);this._p2=v/this._p2},!0),e=f.prototype=new n;return e.constructor=f,e.getRatio=i,e.config=function(n,t){return new f(n,t)},f},e("Elastic",s("ElasticOut",function(n){return this._p1*Math.pow(2,-10*n)*Math.sin((n-this._p3)*this._p2)+1},.3),s("ElasticIn",function(n){return-(this._p1*Math.pow(2,10*(n-=1))*Math.sin((n-this._p3)*this._p2))},.3),s("ElasticInOut",function(n){return 1>(n*=2)?-.5*this._p1*Math.pow(2,10*(n-=1))*Math.sin((n-this._p3)*this._p2):.5*this._p1*Math.pow(2,-10*(n-=1))*Math.sin((n-this._p3)*this._p2)+1},.45)),e("Expo",t("ExpoOut",function(n){return 1-Math.pow(2,-10*n)}),t("ExpoIn",function(n){return Math.pow(2,10*(n-1))-.001}),t("ExpoInOut",function(n){return 1>(n*=2)?.5*Math.pow(2,10*(n-1)):.5*(2-Math.pow(2,-10*(n-1)))})),e("Sine",t("SineOut",function(n){return Math.sin(n*y)}),t("SineIn",function(n){return-Math.cos(n*y)+1}),t("SineInOut",function(n){return-.5*(Math.cos(Math.PI*n)-1)})),r("easing.EaseLookup",{find:function(t){return n.map[t]}},!0),h(a.SlowMo,"SlowMo","ease,"),h(u,"RoughEase","ease,"),h(f,"SteppedEase","ease,"),w},!0)});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n,t){var f;if((!n.addEventListener||!n.removeEventListener)&&n.attachEvent&&n.detachEvent){var i=[],e=function(n){return typeof n=="function"},o=function(n,t){for(var r,u=i.length;u--;)if(r=i[u],r[0]===n&&r[1]===t)return r[2]},h=function(n,t,r){return o(n,t)||(i[i.length]=[n,t,r],r)},c=function(n){var i=t[n];t[n]=function(n){return s(i(n))}},r=function(i,r){if(e(r)){var u=this;u.attachEvent("on"+i,h(u,r,function(i){i=i||n.event;i.preventDefault=i.preventDefault||function(){i.returnValue=!1};i.stopPropagation=i.stopPropagation||function(){i.cancelBubble=!0};i.target=i.target||i.srcElement||t.documentElement;i.currentTarget=i.currentTarget||u;i.timeStamp=i.timeStamp||(new Date).getTime();r.call(u,i)}))}},u=function(n,t){if(e(t)){var i=this,r=o(i,t);r&&i.detachEvent("on"+n,r)}},s=function(n){var t=n.length;if(t)while(t--)n[t].addEventListener=r,n[t].removeEventListener=u;else n.addEventListener=r,n.removeEventListener=u;return n};s([t,n]);"Element"in n&&(f=n.Element,f.prototype.addEventListener=r,f.prototype.removeEventListener=u)}}(window,document),function(n,t){typeof exports=="object"&&typeof module=="object"?module.exports=t():typeof define=="function"&&define.amd?define(t):typeof exports=="object"?exports.Handlebars=t():n.Handlebars=t()}(this,function(){return function(n){function t(r){if(i[r])return i[r].exports;var u=i[r]={exports:{},id:r,loaded:!1};return n[r].call(u.exports,u,u.exports,t),u.loaded=!0,u.exports}var i={};return t.m=n,t.c=i,t.p="",t(0)}([function(n,t,i){"use strict";function o(){var n=k();return n.compile=function(t,i){return f.compile(t,i,n)},n.precompile=function(t,i){return f.precompile(t,i,n)},n.AST=l["default"],n.Compiler=f.Compiler,n.JavaScriptCompiler=v["default"],n.Parser=e.parser,n.parse=e.parse,n}var u=i(8)["default"],r;t.__esModule=!0;var s=i(1),h=u(s),c=i(2),l=u(c),e=i(3),f=i(4),a=i(5),v=u(a),y=i(6),p=u(y),w=i(7),b=u(w),k=h["default"].create;r=o();r.create=o;b["default"](r);r.Visitor=p["default"];r["default"]=r;t["default"]=r;n.exports=t["default"]},function(n,t,i){"use strict";function h(){var n=new o.HandlebarsEnvironment;return e.extend(n,o),n.SafeString=a["default"],n.Exception=y["default"],n.Utils=e,n.escapeExpression=e.escapeExpression,n.VM=s,n.template=function(t){return s.template(t,n)},n}var u=i(9)["default"],f=i(8)["default"],r;t.__esModule=!0;var c=i(10),o=u(c),l=i(11),a=f(l),v=i(12),y=f(v),p=i(13),e=u(p),w=i(14),s=u(w),b=i(7),k=f(b);r=h();r.create=h;k["default"](r);r["default"]=r;t["default"]=r;n.exports=t["default"]},function(n,t){"use strict";t.__esModule=!0;var i={Program:function(n,t,i,r){this.loc=r;this.type="Program";this.body=n;this.blockParams=t;this.strip=i},MustacheStatement:function(n,t,i,r,u,f){this.loc=f;this.type="MustacheStatement";this.path=n;this.params=t||[];this.hash=i;this.escaped=r;this.strip=u},BlockStatement:function(n,t,i,r,u,f,e,o,s){this.loc=s;this.type="BlockStatement";this.path=n;this.params=t||[];this.hash=i;this.program=r;this.inverse=u;this.openStrip=f;this.inverseStrip=e;this.closeStrip=o},PartialStatement:function(n,t,i,r,u){this.loc=u;this.type="PartialStatement";this.name=n;this.params=t||[];this.hash=i;this.indent="";this.strip=r},ContentStatement:function(n,t){this.loc=t;this.type="ContentStatement";this.original=this.value=n},CommentStatement:function(n,t,i){this.loc=i;this.type="CommentStatement";this.value=n;this.strip=t},SubExpression:function(n,t,i,r){this.loc=r;this.type="SubExpression";this.path=n;this.params=t||[];this.hash=i},PathExpression:function(n,t,i,r,u){this.loc=u;this.type="PathExpression";this.data=n;this.original=r;this.parts=i;this.depth=t},StringLiteral:function(n,t){this.loc=t;this.type="StringLiteral";this.original=this.value=n},NumberLiteral:function(n,t){this.loc=t;this.type="NumberLiteral";this.original=this.value=Number(n)},BooleanLiteral:function(n,t){this.loc=t;this.type="BooleanLiteral";this.original=this.value=n==="true"},UndefinedLiteral:function(n){this.loc=n;this.type="UndefinedLiteral";this.original=this.value=undefined},NullLiteral:function(n){this.loc=n;this.type="NullLiteral";this.original=this.value=null},Hash:function(n,t){this.loc=t;this.type="Hash";this.pairs=n},HashPair:function(n,t,i){this.loc=i;this.type="HashPair";this.key=n;this.value=t},helpers:{helperExpression:function(n){return!!(n.type==="SubExpression"||n.params.length||n.hash)},scopedId:function(n){return/^\.|this\b/.test(n.original)},simpleId:function(n){return n.parts.length===1&&!i.helpers.scopedId(n)&&!n.depth}}};t["default"]=i;n.exports=t["default"]},function(n,t,i){"use strict";function p(n,t){if(n.type==="Program")return n;f["default"].yy=r;r.locInfo=function(n){return new r.SourceLocation(t&&t.srcName,n)};var i=new l["default"];return i.accept(f["default"].parse(n))}var u=i(8)["default"],e=i(9)["default"],r;t.__esModule=!0;t.parse=p;var o=i(15),f=u(o),s=i(2),h=u(s),c=i(16),l=u(c),a=i(17),v=e(a),y=i(13);t.parser=f["default"];r={};y.extend(r,v,h["default"])},function(n,t,i){"use strict";function e(){}function v(n,t,i){if(n==null||typeof n!="string"&&n.type!=="Program")throw new u["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+n);t=t||{};"data"in t||(t.data=!0);t.compat&&(t.useDepths=!0);var r=i.parse(n,t),f=(new i.Compiler).compile(r,t);return(new i.JavaScriptCompiler).compile(f,t)}function y(n,t,i){function e(){var t=i.parse(n,f),r=(new i.Compiler).compile(t,f),u=(new i.JavaScriptCompiler).compile(r,f,undefined,!0);return i.template(u)}function o(n,t){return r||(r=e()),r.call(this,n,t)}var f=arguments[1]===undefined?{}:arguments[1],r;if(n==null||typeof n!="string"&&n.type!=="Program")throw new u["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);return"data"in f||(f.data=!0),f.compat&&(f.useDepths=!0),r=undefined,o._setup=function(n){return r||(r=e()),r._setup(n)},o._child=function(n,t,i,u){return r||(r=e()),r._child(n,t,i,u)},o}function s(n,t){if(n===t)return!0;if(f.isArray(n)&&f.isArray(t)&&n.length===t.length){for(var i=0;i<n.length;i++)if(!s(n[i],t[i]))return!1;return!0}}function h(n){if(!n.path.parts){var t=n.path;n.path=new r["default"].PathExpression(!1,0,[t.original+""],t.original+"",t.loc)}}var o=i(8)["default"];t.__esModule=!0;t.Compiler=e;t.precompile=v;t.compile=y;var c=i(12),u=o(c),f=i(13),l=i(2),r=o(l),a=[].slice;e.prototype={compiler:e,equals:function(n){var i=this.opcodes.length,r,u,t;if(n.opcodes.length!==i)return!1;for(t=0;t<i;t++)if(r=this.opcodes[t],u=n.opcodes[t],r.opcode!==u.opcode||!s(r.args,u.args))return!1;for(i=this.children.length,t=0;t<i;t++)if(!this.children[t].equals(n.children[t]))return!1;return!0},guid:0,compile:function(n,t){var i,r;if(this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],i=t.knownHelpers,t.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},i)for(r in i)r in i&&(t.knownHelpers[r]=i[r]);return this.accept(n)},compileProgram:function(n){var r=new this.compiler,t=r.compile(n,this.options),i=this.guid++;return this.usePartial=this.usePartial||t.usePartial,this.children[i]=t,this.useDepths=this.useDepths||t.useDepths,i},accept:function(n){this.sourceNode.unshift(n);var t=this[n.type](n);return this.sourceNode.shift(),t},Program:function(n){var i,r,t;for(this.options.blockParams.unshift(n.blockParams),i=n.body,r=i.length,t=0;t<r;t++)this.accept(i[t]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=n.blockParams?n.blockParams.length:0,this},BlockStatement:function(n){var t,i,r;h(n);t=n.program;i=n.inverse;t=t&&this.compileProgram(t);i=i&&this.compileProgram(i);r=this.classifySexpr(n);r==="helper"?this.helperSexpr(n,t,i):r==="simple"?(this.simpleSexpr(n),this.opcode("pushProgram",t),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue",n.path.original)):(this.ambiguousSexpr(n,t,i),this.opcode("pushProgram",t),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue"));this.opcode("append")},PartialStatement:function(n){var t,f,r,i;if(this.usePartial=!0,t=n.params,t.length>1)throw new u["default"]("Unsupported number of partial arguments: "+t.length,n);else t.length||t.push({type:"PathExpression",parts:[],depth:0});f=n.name.original;r=n.name.type==="SubExpression";r&&this.accept(n.name);this.setupFullMustacheParams(n,undefined,undefined,!0);i=n.indent||"";this.options.preventIndent&&i&&(this.opcode("appendContent",i),i="");this.opcode("invokePartial",r,f,i);this.opcode("append")},MustacheStatement:function(n){this.SubExpression(n);n.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ContentStatement:function(n){n.value&&this.opcode("appendContent",n.value)},CommentStatement:function(){},SubExpression:function(n){h(n);var t=this.classifySexpr(n);t==="simple"?this.simpleSexpr(n):t==="helper"?this.helperSexpr(n):this.ambiguousSexpr(n)},ambiguousSexpr:function(n,t,i){var r=n.path,u=r.parts[0],f=t!=null||i!=null;this.opcode("getContext",r.depth);this.opcode("pushProgram",t);this.opcode("pushProgram",i);this.accept(r);this.opcode("invokeAmbiguous",u,f)},simpleSexpr:function(n){this.accept(n.path);this.opcode("resolvePossibleLambda")},helperSexpr:function(n,t,i){var o=this.setupFullMustacheParams(n,t,i),f=n.path,e=f.parts[0];if(this.options.knownHelpers[e])this.opcode("invokeKnownHelper",o.length,e);else if(this.options.knownHelpersOnly)throw new u["default"]("You specified knownHelpersOnly, but used the unknown helper "+e,n);else f.falsy=!0,this.accept(f),this.opcode("invokeHelper",o.length,f.original,r["default"].helpers.simpleId(f))},PathExpression:function(n){this.addDepth(n.depth);this.opcode("getContext",n.depth);var t=n.parts[0],i=r["default"].helpers.scopedId(n),u=!n.depth&&!i&&this.blockParamIndex(t);u?this.opcode("lookupBlockParam",u,n.parts):t?n.data?(this.options.data=!0,this.opcode("lookupData",n.depth,n.parts)):this.opcode("lookupOnContext",n.parts,n.falsy,i):this.opcode("pushContext")},StringLiteral:function(n){this.opcode("pushString",n.value)},NumberLiteral:function(n){this.opcode("pushLiteral",n.value)},BooleanLiteral:function(n){this.opcode("pushLiteral",n.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(n){var i=n.pairs,t=0,r=i.length;for(this.opcode("pushHash");t<r;t++)this.pushParam(i[t].value);while(t--)this.opcode("assignToHash",i[t].key);this.opcode("popHash")},opcode:function(n){this.opcodes.push({opcode:n,args:a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(n){n&&(this.useDepths=!0)},classifySexpr:function(n){var f=r["default"].helpers.simpleId(n.path),e=f&&!!this.blockParamIndex(n.path.parts[0]),t=!e&&r["default"].helpers.helperExpression(n),i=!e&&(t||f),o,u;return i&&!t&&(o=n.path.parts[0],u=this.options,u.knownHelpers[o]?t=!0:u.knownHelpersOnly&&(i=!1)),t?"helper":i?"ambiguous":"simple"},pushParams:function(n){for(var t=0,i=n.length;t<i;t++)this.pushParam(n[t])},pushParam:function(n){var t=n.value!=null?n.value:n.original||"",i,u;this.stringParams?(t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",t,n.type),n.type==="SubExpression"&&this.accept(n)):(this.trackIds&&(i=undefined,!n.parts||r["default"].helpers.scopedId(n)||n.depth||(i=this.blockParamIndex(n.parts[0])),i?(u=n.parts.slice(1).join("."),this.opcode("pushId","BlockParam",i,u)):(t=n.original||t,t.replace&&(t=t.replace(/^\.\//g,"").replace(/^\.$/g,"")),this.opcode("pushId",n.type,t))),this.accept(n))},setupFullMustacheParams:function(n,t,i,r){var u=n.params;return this.pushParams(u),this.opcode("pushProgram",t),this.opcode("pushProgram",i),n.hash?this.accept(n.hash):this.opcode("emptyHash",r),u},blockParamIndex:function(n){for(var i,r,t=0,u=this.options.blockParams.length;t<u;t++)if(i=this.options.blockParams[t],r=i&&f.indexOf(i,n),i&&r>=0)return[t,r]}}},function(n,t,i){"use strict";function u(n){this.value=n}function r(){}function a(n,t,i,r){var u=t.popStack(),f=0,e=i.length;for(n&&e--;f<e;f++)u=t.nameLookup(u,i[f],r);return n?[t.aliasable("this.strict"),"(",u,", ",t.quotedString(i[f]),")"]:u}var e=i(8)["default"];t.__esModule=!0;var o=i(10),s=i(12),f=e(s),h=i(13),c=i(18),l=e(c);r.prototype={nameLookup:function(n,t){return r.isValidJavaScriptVariableName(t)?[n,".",t]:[n,"['",t,"']"]},depthedLookup:function(n){return[this.aliasable("this.lookup"),'(depths, "',n,'")']},compilerInfo:function(){var n=o.COMPILER_REVISION,t=o.REVISION_CHANGES[n];return[n,t]},appendToBuffer:function(n,t,i){return h.isArray(n)||(n=[n]),n=this.source.wrap(n,t),this.environment.isSimple?["return ",n,";"]:i?["buffer += ",n,";"]:(n.appendToBuffer=!0,n)},initializeBuffer:function(){return this.quotedString("")},compile:function(n,t,i,r){var l,u,h;this.environment=n;this.options=t;this.stringParams=this.options.stringParams;this.trackIds=this.options.trackIds;this.precompile=!r;this.name=this.environment.name;this.isChild=!!i;this.context=i||{programs:[],environments:[]};this.preamble();this.stackSlot=0;this.stackVars=[];this.aliases={};this.registers={list:[]};this.hashes=[];this.compileStack=[];this.inlineStack=[];this.blockParams=[];this.compileChildren(n,t);this.useDepths=this.useDepths||n.useDepths||this.options.compat;this.useBlockParams=this.useBlockParams||n.useBlockParams;for(var a=n.opcodes,o=undefined,c=undefined,e=undefined,s=undefined,e=0,s=a.length;e<s;e++)o=a[e],this.source.currentLocation=o.loc,c=c||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new f["default"]("Compile completed with content left on stack");if(l=this.createFunctionContext(r),this.isChild)return l;for(u={compiler:this.compilerInfo(),main:l},h=this.context.programs,e=0,s=h.length;e<s;e++)h[e]&&(u[e]=h[e]);return this.environment.usePartial&&(u.usePartial=!0),this.options.data&&(u.useData=!0),this.useDepths&&(u.useDepths=!0),this.useBlockParams&&(u.useBlockParams=!0),this.options.compat&&(u.compat=!0),r?u.compilerOptions=this.options:(u.compiler=JSON.stringify(u.compiler),this.source.currentLocation={start:{line:1,column:0}},u=this.objectLiteral(u),t.srcName?(u=u.toStringWithSourceMap({file:t.destName}),u.map=u.map&&u.map.toString()):u=u.toString()),u},preamble:function(){this.lastContext=0;this.source=new l["default"](this.options.srcName)},createFunctionContext:function(n){var u="",o=this.stackVars.concat(this.registers.list),f,i,r,t,e;o.length>0&&(u+=", "+o.join(", "));f=0;for(i in this.aliases)r=this.aliases[i],this.aliases.hasOwnProperty(i)&&r.children&&r.referenceCount>1&&(u+=", alias"+ ++f+"="+i,r.children[0]="alias"+f);return t=["depth0","helpers","partials","data"],(this.useBlockParams||this.useDepths)&&t.push("blockParams"),this.useDepths&&t.push("depths"),e=this.mergeSource(u),n?(t.push(e),Function.apply(this,t)):this.source.wrap(["function(",t.join(","),") {\n  ",e,"}"])},mergeSource:function(n){var e=this.environment.isSimple,f=!this.forceBuffer,r=undefined,u=undefined,t=undefined,i=undefined;return this.source.each(function(n){n.appendToBuffer?(t?n.prepend("  + "):t=n,i=n):(t&&(u?t.prepend("buffer += "):r=!0,i.add(";"),t=i=undefined),u=!0,e||(f=!1))}),f?t?(t.prepend("return "),i.add(";")):u||this.source.push('return "";'):(n+=", buffer = "+(r?"":this.initializeBuffer()),t?(t.prepend("return buffer + "),i.add(";")):this.source.push("return buffer;")),n&&this.source.prepend("var "+n.substring(2)+(r?"":";\n")),this.source.merge()},blockValue:function(n){var r=this.aliasable("helpers.blockHelperMissing"),t=[this.contextName(0)],i;this.setupHelperArgs(n,0,t);i=this.popStack();t.splice(1,0,i);this.push(this.source.functionCall(r,"call",t))},ambiguousBlockValue:function(){var i=this.aliasable("helpers.blockHelperMissing"),n=[this.contextName(0)],t;this.setupHelperArgs("",0,n,!0);this.flushInline();t=this.topStack();n.splice(1,0,t);this.pushSource(["if (!",this.lastHelper,") { ",t," = ",this.source.functionCall(i,"call",n),"}"])},appendContent:function(n){this.pendingContent?n=this.pendingContent+n:this.pendingLocation=this.source.currentLocation;this.pendingContent=n},append:function(){if(this.isInline())this.replaceStack(function(n){return[" != null ? ",n,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var n=this.popStack();this.pushSource(["if (",n," != null) { ",this.appendToBuffer(n,undefined,!0)," }"]);this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",undefined,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("this.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(n){this.lastContext=n},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(n,t,i){var r=0;i||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(n[r++]));this.resolvePath("context",n,r,t)},lookupBlockParam:function(n,t){this.useBlockParams=!0;this.push(["blockParams[",n[0],"][",n[1],"]"]);this.resolvePath("context",t,1)},lookupData:function(n,t){n?this.pushStackLiteral("this.data(data, "+n+")"):this.pushStackLiteral("data");this.resolvePath("data",t,0,!0)},resolvePath:function(n,t,i,r){var f=this,u;if(this.options.strict||this.options.assumeObjects){this.push(a(this.options.strict,this,t,n));return}for(u=t.length;i<u;i++)this.replaceStack(function(u){var e=f.nameLookup(u,t[i],n);return r?[" && ",e]:[" != null ? ",e," : ",u]})},resolvePossibleLambda:function(){this.push([this.aliasable("this.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(n,t){this.pushContext();this.pushString(t);t!=="SubExpression"&&(typeof n=="string"?this.pushString(n):this.pushStackLiteral(n))},emptyHash:function(n){this.trackIds&&this.push("{}");this.stringParams&&(this.push("{}"),this.push("{}"));this.pushStackLiteral(n?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash);this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var n=this.hash;this.hash=this.hashes.pop();this.trackIds&&this.push(this.objectLiteral(n.ids));this.stringParams&&(this.push(this.objectLiteral(n.contexts)),this.push(this.objectLiteral(n.types)));this.push(this.objectLiteral(n.values))},pushString:function(n){this.pushStackLiteral(this.quotedString(n))},pushLiteral:function(n){this.pushStackLiteral(n)},pushProgram:function(n){n!=null?this.pushStackLiteral(this.programExpression(n)):this.pushStackLiteral(null)},invokeHelper:function(n,t,i){var f=this.popStack(),u=this.setupHelper(n,t),e=i?[u.name," || "]:"",r=["("].concat(e,f);this.options.strict||r.push(" || ",this.aliasable("helpers.helperMissing"));r.push(")");this.push(this.source.functionCall(r,"call",u.callParams))},invokeKnownHelper:function(n,t){var i=this.setupHelper(n,t);this.push(this.source.functionCall(i.name,"call",i.callParams))},invokeAmbiguous:function(n,t){var u;this.useRegister("helper");u=this.popStack();this.emptyHash();var i=this.setupHelper(0,n,t),f=this.lastHelper=this.nameLookup("helpers",n,"helper"),r=["(","(helper = ",f," || ",u,")"];this.options.strict||(r[0]="(helper = ",r.push(" != null ? helper : ",this.aliasable("helpers.helperMissing")));this.push(["(",r,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(n,t,i){var u=[],r=this.setupParams(t,1,u,!1);n&&(t=this.popStack(),delete r.name);i&&(r.indent=JSON.stringify(i));r.helpers="helpers";r.partials="partials";n?u.unshift(t):u.unshift(this.nameLookup("partials",t,"partial"));this.options.compat&&(r.depths="depths");r=this.objectLiteral(r);u.push(r);this.push(this.source.functionCall("this.invokePartial","",u))},assignToHash:function(n){var f=this.popStack(),i=undefined,r=undefined,u=undefined,t;this.trackIds&&(u=this.popStack());this.stringParams&&(r=this.popStack(),i=this.popStack());t=this.hash;i&&(t.contexts[n]=i);r&&(t.types[n]=r);u&&(t.ids[n]=u);t.values[n]=f},pushId:function(n,t,i){n==="BlockParam"?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(i?" + "+JSON.stringify("."+i):"")):n==="PathExpression"?this.pushString(t):n==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:r,compileChildren:function(n,t){for(var r,e=n.children,i=undefined,u=undefined,f=0,o=e.length;f<o;f++)i=e[f],u=new this.compiler,r=this.matchExistingProgram(i),r==null?(this.context.programs.push(""),r=this.context.programs.length,i.index=r,i.name="program"+r,this.context.programs[r]=u.compile(i,t,this.context,!this.precompile),this.context.environments[r]=i,this.useDepths=this.useDepths||u.useDepths,this.useBlockParams=this.useBlockParams||u.useBlockParams):(i.index=r,i.name="program"+r,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams)},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=this.environment.children[n],t=[i.index,"data",i.blockParams];return(this.useBlockParams||this.useDepths)&&t.push("blockParams"),this.useDepths&&t.push("depths"),"this.program("+t.join(", ")+")"},useRegister:function(n){this.registers[n]||(this.registers[n]=!0,this.registers.list.push(n))},push:function(n){return n instanceof u||(n=this.source.wrap(n)),this.inlineStack.push(n),n},pushStackLiteral:function(n){this.push(new u(n))},pushSource:function(n){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=undefined);n&&this.source.push(n)},replaceStack:function(n){var r=["("],t=undefined,e=undefined,o=undefined,i,s,h;if(!this.isInline())throw new f["default"]("replaceStack on non-inline");i=this.popStack(!0);i instanceof u?(t=[i.value],r=["(",t],o=!0):(e=!0,s=this.incrStack(),r=["((",this.push(s)," = ",i,")"],t=this.topStack());h=n.call(this,t);o||this.popStack();e&&this.stackSlot--;this.push(r.concat(h,")"))},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,f,t,i;for(this.inlineStack=[],n=0,f=r.length;n<f;n++)t=r[n],t instanceof u?this.compileStack.push(t):(i=this.incrStack(),this.pushSource([i," = ",t,";"]),this.compileStack.push(i))},isInline:function(){return this.inlineStack.length},popStack:function(n){var i=this.isInline(),t=(i?this.inlineStack:this.compileStack).pop();if(!n&&t instanceof u)return t.value;if(!i){if(!this.stackSlot)throw new f["default"]("Invalid stack pop");this.stackSlot--}return t},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,n=t[t.length-1];return n instanceof u?n.value:n},contextName:function(n){return this.useDepths&&n?"depths["+n+"]":"depth"+n},quotedString:function(n){return this.source.quotedString(n)},objectLiteral:function(n){return this.source.objectLiteral(n)},aliasable:function(n){var t=this.aliases[n];return t?(t.referenceCount++,t):(t=this.aliases[n]=this.source.wrap(n),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(n,t,i){var r=[],u=this.setupHelperArgs(t,n,r,i),f=this.nameLookup("helpers",t,"helper");return{params:r,paramsInit:u,name:f,callParams:[this.contextName(0)].concat(r)}},setupParams:function(n,t,i){var r={},o=[],s=[],h=[],c=undefined,f,e,u;for(r.name=this.quotedString(n),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack()),f=this.popStack(),e=this.popStack(),(e||f)&&(r.fn=e||"this.noop",r.inverse=f||"this.noop"),u=t;u--;)c=this.popStack(),i[u]=c,this.trackIds&&(h[u]=this.popStack()),this.stringParams&&(s[u]=this.popStack(),o[u]=this.popStack());return this.trackIds&&(r.ids=this.source.generateArray(h)),this.stringParams&&(r.types=this.source.generateArray(s),r.contexts=this.source.generateArray(o)),this.options.data&&(r.data="data"),this.useBlockParams&&(r.blockParams="blockParams"),r},setupHelperArgs:function(n,t,i,r){var u=this.setupParams(n,t,i,!0);return u=this.objectLiteral(u),r?(this.useRegister("options"),i.push("options"),["options=",u]):(i.push(u),"")}},function(){for(var t="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 await null true false".split(" "),i=r.RESERVED_WORDS={},n=0,u=t.length;n<u;n++)i[t[n]]=!0}();r.isValidJavaScriptVariableName=function(n){return!r.RESERVED_WORDS[n]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(n)};t["default"]=r;n.exports=t["default"]},function(n,t,i){"use strict";function r(){this.parents=[]}var u=i(8)["default"];t.__esModule=!0;var e=i(12),f=u(e),o=i(2),s=u(o);r.prototype={constructor:r,mutating:!1,acceptKey:function(n,t){var i=this.accept(n[t]);if(this.mutating){if(i&&(!i.type||!s["default"][i.type]))throw new f["default"]('Unexpected node type "'+i.type+'" found when accepting '+t+" on "+n.type);n[t]=i}},acceptRequired:function(n,t){if(this.acceptKey(n,t),!n[t])throw new f["default"](n.type+" requires "+t);},acceptArray:function(n){for(var t=0,i=n.length;t<i;t++)this.acceptKey(n,t),n[t]||(n.splice(t,1),t--,i--)},accept:function(n){if(n){this.current&&this.parents.unshift(this.current);this.current=n;var t=this[n.type](n);return(this.current=this.parents.shift(),!this.mutating||t)?t:t!==!1?n:void 0}},Program:function(n){this.acceptArray(n.body)},MustacheStatement:function(n){this.acceptRequired(n,"path");this.acceptArray(n.params);this.acceptKey(n,"hash")},BlockStatement:function(n){this.acceptRequired(n,"path");this.acceptArray(n.params);this.acceptKey(n,"hash");this.acceptKey(n,"program");this.acceptKey(n,"inverse")},PartialStatement:function(n){this.acceptRequired(n,"name");this.acceptArray(n.params);this.acceptKey(n,"hash")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:function(n){this.acceptRequired(n,"path");this.acceptArray(n.params);this.acceptKey(n,"hash")},PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(n){this.acceptArray(n.pairs)},HashPair:function(n){this.acceptRequired(n,"value")}};t["default"]=r;n.exports=t["default"]},function(n,t){(function(i){"use strict";t.__esModule=!0;t["default"]=function(n){var t=typeof i!="undefined"?i:window,r=t.Handlebars;n.noConflict=function(){t.Handlebars===n&&(t.Handlebars=r)}};n.exports=t["default"]}).call(t,function(){return this}())},function(n,t){"use strict";t["default"]=function(n){return n&&n.__esModule?n:{"default":n}};t.__esModule=!0},function(n,t){"use strict";t["default"]=function(n){var t,i;if(n&&n.__esModule)return n;if(t={},typeof n=="object"&&n!==null)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t};t.__esModule=!0},function(n,t,i){"use strict";function s(n,t){this.helpers=n||{};this.partials=t||{};d(this)}function d(n){n.registerHelper("helperMissing",function(){if(arguments.length===1)return undefined;throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"');});n.registerHelper("blockHelperMissing",function(t,i){var f=i.inverse,o=i.fn,u;return t===!0?o(this):t===!1||t==null?f(this):a(t)?t.length>0?(i.ids&&(i.ids=[i.name]),n.helpers.each(t,i)):f(this):(i.data&&i.ids&&(u=e(i.data),u.contextPath=r.appendContextPath(i.data.contextPath,i.name),i={data:u}),o(t,i))});n.registerHelper("each",function(n,t){function l(t,i,f){u&&(u.key=t,u.index=i,u.first=i===0,u.last=!!f,c&&(u.contextPath=c+t));h=h+p(n[t],{data:u,blockParams:r.blockParams([n[t],t],[c+t,null])})}var y,s,v;if(!t)throw new f["default"]("Must pass iterator to #each");var p=t.fn,w=t.inverse,i=0,h="",u=undefined,c=undefined;if(t.data&&t.ids&&(c=r.appendContextPath(t.data.contextPath,t.ids[0])+"."),o(n)&&(n=n.call(this)),t.data&&(u=e(t.data)),n&&typeof n=="object")if(a(n))for(y=n.length;i<y;i++)l(i,i,i===n.length-1);else{s=undefined;for(v in n)n.hasOwnProperty(v)&&(s&&l(s,i-1),s=v,i++);s&&l(s,i-1,!0)}return i===0&&(h=w(this)),h});n.registerHelper("if",function(n,t){return o(n)&&(n=n.call(this)),(t.hash.includeZero||n)&&!r.isEmpty(n)?t.fn(this):t.inverse(this)});n.registerHelper("unless",function(t,i){return n.helpers["if"].call(this,t,{fn:i.inverse,inverse:i.fn,hash:i.hash})});n.registerHelper("with",function(n,t){var u,i;return o(n)&&(n=n.call(this)),u=t.fn,r.isEmpty(n)?t.inverse(this):(t.data&&t.ids&&(i=e(t.data),i.contextPath=r.appendContextPath(t.data.contextPath,t.ids[0]),t={data:i}),u(n,t))});n.registerHelper("log",function(t,i){var r=i.data&&i.data.level!=null?parseInt(i.data.level,10):1;n.log(r,t)});n.registerHelper("lookup",function(n,t){return n&&n[t]})}function e(n){var t=r.extend({},n);return t._parent=n,t}var p=i(9)["default"],w=i(8)["default"],c,l,u,h;t.__esModule=!0;t.HandlebarsEnvironment=s;t.createFrame=e;var b=i(13),r=p(b),k=i(12),f=w(k);t.VERSION="3.0.1";c=6;t.COMPILER_REVISION=c;l={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};t.REVISION_CHANGES=l;var a=r.isArray,o=r.isFunction,v=r.toString,y="[object Object]";s.prototype={constructor:s,logger:u,log:h,registerHelper:function(n,t){if(v.call(n)===y){if(t)throw new f["default"]("Arg not supported with multiple helpers");r.extend(this.helpers,n)}else this.helpers[n]=t},unregisterHelper:function(n){delete this.helpers[n]},registerPartial:function(n,t){if(v.call(n)===y)r.extend(this.partials,n);else{if(typeof t=="undefined")throw new f["default"]("Attempting to register a partial as undefined");this.partials[n]=t}},unregisterPartial:function(n){delete this.partials[n]}};u={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:1,log:function(n,t){if(typeof console!="undefined"&&u.level<=n){var i=u.methodMap[n];(console[i]||console.log).call(console,t)}}};t.logger=u;h=u.log;t.log=h},function(n,t){"use strict";function i(n){this.string=n}t.__esModule=!0;i.prototype.toString=i.prototype.toHTML=function(){return""+this.string};t["default"]=i;n.exports=t["default"]},function(n,t){"use strict";function r(n,t){var f=t&&t.loc,e=undefined,o=undefined,s,u;for(f&&(e=f.start.line,o=f.start.column,n+=" - "+e+":"+o),s=Error.prototype.constructor.call(this,n),u=0;u<i.length;u++)this[i[u]]=s[i[u]];Error.captureStackTrace&&Error.captureStackTrace(this,r);f&&(this.lineNumber=e,this.column=o)}t.__esModule=!0;var i=["description","fileName","lineNumber","message","name","number","stack"];r.prototype=new Error;t["default"]=r;n.exports=t["default"]},function(n,t){"use strict";function s(n){return f[n]}function h(n){for(var i,t=1;t<arguments.length;t++)for(i in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],i)&&(n[i]=arguments[t][i]);return n}function c(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1}function l(n){if(typeof n!="string"){if(n&&n.toHTML)return n.toHTML();if(n==null)return"";if(!n)return n+"";n=""+n}return o.test(n)?n.replace(e,s):n}function a(n){return n||n===0?u(n)&&n.length===0?!0:!1:!0}function v(n,t){return n.path=t,n}function y(n,t){return(n?n+".":"")+t}var i,r,u;t.__esModule=!0;t.extend=h;t.indexOf=c;t.escapeExpression=l;t.isEmpty=a;t.blockParams=v;t.appendContextPath=y;var f={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},e=/[&<>"'`]/g,o=/[&<>"'`]/;i=Object.prototype.toString;t.toString=i;r=function(n){return typeof n=="function"};r(/x/)&&(t.isFunction=r=function(n){return typeof n=="function"&&i.call(n)==="[object Function]"});t.isFunction=r;u=Array.isArray||function(n){return n&&typeof n=="object"?i.call(n)==="[object Array]":!1};t.isArray=u},function(n,t,i){"use strict";function l(n){var t=n&&n[0]||1,i=u.COMPILER_REVISION,f,e;if(t!==i)if(t<i){f=u.REVISION_CHANGES[i];e=u.REVISION_CHANGES[t];throw new r["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+f+") or downgrade your runtime to an older version ("+e+").");}else throw new r["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+n[1]+").");}function a(n,t){function o(i,u,f){var o,h,s,c;if(f.hash&&(u=e.extend({},u,f.hash)),i=t.VM.resolvePartial.call(this,i,u,f),o=t.VM.invokePartial.call(this,i,u,f),o==null&&t.compile&&(f.partials[f.name]=t.compile(i,n.compilerOptions,t),o=f.partials[f.name](u,f)),o!=null){if(f.indent){for(h=o.split("\n"),s=0,c=h.length;s<c;s++){if(!h[s]&&s+1===c)break;h[s]=f.indent+h[s]}o=h.join("\n")}return o}throw new r["default"]("The partial "+f.name+" could not be compiled when running in runtime-only mode");}function u(t){var r=arguments[1]===undefined?{}:arguments[1],f=r.data,e,o;return u._setup(r),!r.partial&&n.useData&&(f=w(t,f)),e=undefined,o=n.useBlockParams?[]:undefined,n.useDepths&&(e=r.depths?[t].concat(r.depths):[t]),n.main.call(i,t,i.helpers,i.partials,f,o,e)}if(!t)throw new r["default"]("No environment passed to template");if(!n||!n.main)throw new r["default"]("Unknown template object: "+typeof n);t.VM.checkRevision(n.compiler);var i={strict:function(n,t){if(!(t in n))throw new r["default"]('"'+t+'" not defined in '+n);return n[t]},lookup:function(n,t){for(var r=n.length,i=0;i<r;i++)if(n[i]&&n[i][t]!=null)return n[i][t]},lambda:function(n,t){return typeof n=="function"?n.call(t):n},escapeExpression:e.escapeExpression,invokePartial:o,fn:function(t){return n[t]},programs:[],program:function(n,t,i,r,u){var e=this.programs[n],o=this.fn(n);return t||u||r||i?e=f(this,n,o,t,i,r,u):e||(e=this.programs[n]=f(this,n,o)),e},data:function(n,t){while(n&&t--)n=n._parent;return n},merge:function(n,t){var i=n||t;return n&&t&&n!==t&&(i=e.extend({},t,n)),i},noop:t.VM.noop,compilerInfo:n.compiler};return u.isTop=!0,u._setup=function(r){r.partial?(i.helpers=r.helpers,i.partials=r.partials):(i.helpers=i.merge(r.helpers,t.helpers),n.usePartial&&(i.partials=i.merge(r.partials,t.partials)))},u._child=function(t,u,e,o){if(n.useBlockParams&&!e)throw new r["default"]("must pass block params");if(n.useDepths&&!o)throw new r["default"]("must pass parent depths");return f(i,t,n[t],u,0,e,o)},u}function f(n,t,i,r,u,f,e){function o(t){var u=arguments[1]===undefined?{}:arguments[1];return i.call(n,t,n.helpers,n.partials,u.data||r,f&&[u.blockParams].concat(f),e&&[t].concat(e))}return o.program=t,o.depth=e?e.length:0,o.blockParams=u||0,o}function v(n,t,i){return n?n.call||i.name||(i.name=n,n=i.partials[n]):n=i.partials[i.name],n}function y(n,t,i){if(i.partial=!0,n===undefined)throw new r["default"]("The partial "+i.name+" could not be found");else if(n instanceof Function)return n(t,i)}function p(){return""}function w(n,t){return t&&"root"in t||(t=t?u.createFrame(t):{},t.root=n),t}var o=i(9)["default"],s=i(8)["default"];t.__esModule=!0;t.checkRevision=l;t.template=a;t.wrapProgram=f;t.resolvePartial=v;t.invokePartial=y;t.noop=p;var h=i(13),e=o(h),c=i(12),r=s(c),u=i(10)},function(n,t){"use strict";t.__esModule=!0;var i=function(){function t(){this.yy={}}var n={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,content:12,COMMENT:13,CONTENT:14,openRawBlock:15,END_RAW_BLOCK:16,OPEN_RAW_BLOCK:17,helperName:18,openRawBlock_repetition0:19,openRawBlock_option0:20,CLOSE_RAW_BLOCK:21,openBlock:22,block_option0:23,closeBlock:24,openInverse:25,block_option1:26,OPEN_BLOCK:27,openBlock_repetition0:28,openBlock_option0:29,openBlock_option1:30,CLOSE:31,OPEN_INVERSE:32,openInverse_repetition0:33,openInverse_option0:34,openInverse_option1:35,openInverseChain:36,OPEN_INVERSE_CHAIN:37,openInverseChain_repetition0:38,openInverseChain_option0:39,openInverseChain_option1:40,inverseAndProgram:41,INVERSE:42,inverseChain:43,inverseChain_option0:44,OPEN_ENDBLOCK:45,OPEN:46,mustache_repetition0:47,mustache_option0:48,OPEN_UNESCAPED:49,mustache_repetition1:50,mustache_option1:51,CLOSE_UNESCAPED:52,OPEN_PARTIAL:53,partialName:54,partial_repetition0:55,partial_option0:56,param:57,sexpr:58,OPEN_SEXPR:59,sexpr_repetition0:60,sexpr_option0:61,CLOSE_SEXPR:62,hash:63,hash_repetition_plus0:64,hashSegment:65,ID:66,EQUALS:67,blockParams:68,OPEN_BLOCK_PARAMS:69,blockParams_repetition_plus0:70,CLOSE_BLOCK_PARAMS:71,path:72,dataName:73,STRING:74,NUMBER:75,BOOLEAN:76,UNDEFINED:77,NULL:78,DATA:79,pathSegments:80,SEP:81,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",13:"COMMENT",14:"CONTENT",16:"END_RAW_BLOCK",17:"OPEN_RAW_BLOCK",21:"CLOSE_RAW_BLOCK",27:"OPEN_BLOCK",31:"CLOSE",32:"OPEN_INVERSE",37:"OPEN_INVERSE_CHAIN",42:"INVERSE",45:"OPEN_ENDBLOCK",46:"OPEN",49:"OPEN_UNESCAPED",52:"CLOSE_UNESCAPED",53:"OPEN_PARTIAL",59:"OPEN_SEXPR",62:"CLOSE_SEXPR",66:"ID",67:"EQUALS",69:"OPEN_BLOCK_PARAMS",71:"CLOSE_BLOCK_PARAMS",74:"STRING",75:"NUMBER",76:"BOOLEAN",77:"UNDEFINED",78:"NULL",79:"DATA",81:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[12,1],[10,3],[15,5],[9,4],[9,4],[22,6],[25,6],[36,6],[41,2],[43,3],[43,1],[24,3],[8,5],[8,5],[11,5],[57,1],[57,1],[58,5],[63,1],[65,3],[68,3],[18,1],[18,1],[18,1],[18,1],[18,1],[18,1],[18,1],[54,1],[54,1],[73,2],[72,1],[80,3],[80,1],[6,0],[6,2],[19,0],[19,2],[20,0],[20,1],[23,0],[23,1],[26,0],[26,1],[28,0],[28,2],[29,0],[29,1],[30,0],[30,1],[33,0],[33,2],[34,0],[34,1],[35,0],[35,1],[38,0],[38,2],[39,0],[39,1],[40,0],[40,1],[44,0],[44,1],[47,0],[47,2],[48,0],[48,1],[50,0],[50,2],[51,0],[51,1],[55,0],[55,2],[56,0],[56,1],[60,0],[60,2],[61,0],[61,1],[64,1],[64,2],[70,1],[70,2]],performAction:function(n,t,i,r,u,f){var e=f.length-1,s,o;switch(u){case 1:return f[e-1];case 2:this.$=new r.Program(f[e],null,{},r.locInfo(this._$));break;case 3:this.$=f[e];break;case 4:this.$=f[e];break;case 5:this.$=f[e];break;case 6:this.$=f[e];break;case 7:this.$=f[e];break;case 8:this.$=new r.CommentStatement(r.stripComment(f[e]),r.stripFlags(f[e],f[e]),r.locInfo(this._$));break;case 9:this.$=new r.ContentStatement(f[e],r.locInfo(this._$));break;case 10:this.$=r.prepareRawBlock(f[e-2],f[e-1],f[e],this._$);break;case 11:this.$={path:f[e-3],params:f[e-2],hash:f[e-1]};break;case 12:this.$=r.prepareBlock(f[e-3],f[e-2],f[e-1],f[e],!1,this._$);break;case 13:this.$=r.prepareBlock(f[e-3],f[e-2],f[e-1],f[e],!0,this._$);break;case 14:this.$={path:f[e-4],params:f[e-3],hash:f[e-2],blockParams:f[e-1],strip:r.stripFlags(f[e-5],f[e])};break;case 15:this.$={path:f[e-4],params:f[e-3],hash:f[e-2],blockParams:f[e-1],strip:r.stripFlags(f[e-5],f[e])};break;case 16:this.$={path:f[e-4],params:f[e-3],hash:f[e-2],blockParams:f[e-1],strip:r.stripFlags(f[e-5],f[e])};break;case 17:this.$={strip:r.stripFlags(f[e-1],f[e-1]),program:f[e]};break;case 18:s=r.prepareBlock(f[e-2],f[e-1],f[e],f[e],!1,this._$);o=new r.Program([s],null,{},r.locInfo(this._$));o.chained=!0;this.$={strip:f[e-2].strip,program:o,chain:!0};break;case 19:this.$=f[e];break;case 20:this.$={path:f[e-1],strip:r.stripFlags(f[e-2],f[e])};break;case 21:this.$=r.prepareMustache(f[e-3],f[e-2],f[e-1],f[e-4],r.stripFlags(f[e-4],f[e]),this._$);break;case 22:this.$=r.prepareMustache(f[e-3],f[e-2],f[e-1],f[e-4],r.stripFlags(f[e-4],f[e]),this._$);break;case 23:this.$=new r.PartialStatement(f[e-3],f[e-2],f[e-1],r.stripFlags(f[e-4],f[e]),r.locInfo(this._$));break;case 24:this.$=f[e];break;case 25:this.$=f[e];break;case 26:this.$=new r.SubExpression(f[e-3],f[e-2],f[e-1],r.locInfo(this._$));break;case 27:this.$=new r.Hash(f[e],r.locInfo(this._$));break;case 28:this.$=new r.HashPair(r.id(f[e-2]),f[e],r.locInfo(this._$));break;case 29:this.$=r.id(f[e-1]);break;case 30:this.$=f[e];break;case 31:this.$=f[e];break;case 32:this.$=new r.StringLiteral(f[e],r.locInfo(this._$));break;case 33:this.$=new r.NumberLiteral(f[e],r.locInfo(this._$));break;case 34:this.$=new r.BooleanLiteral(f[e],r.locInfo(this._$));break;case 35:this.$=new r.UndefinedLiteral(r.locInfo(this._$));break;case 36:this.$=new r.NullLiteral(r.locInfo(this._$));break;case 37:this.$=f[e];break;case 38:this.$=f[e];break;case 39:this.$=r.preparePath(!0,f[e],this._$);break;case 40:this.$=r.preparePath(!1,f[e],this._$);break;case 41:f[e-2].push({part:r.id(f[e]),original:f[e],separator:f[e-1]});this.$=f[e-2];break;case 42:this.$=[{part:r.id(f[e]),original:f[e]}];break;case 43:this.$=[];break;case 44:f[e-1].push(f[e]);break;case 45:this.$=[];break;case 46:f[e-1].push(f[e]);break;case 53:this.$=[];break;case 54:f[e-1].push(f[e]);break;case 59:this.$=[];break;case 60:f[e-1].push(f[e]);break;case 65:this.$=[];break;case 66:f[e-1].push(f[e]);break;case 73:this.$=[];break;case 74:f[e-1].push(f[e]);break;case 77:this.$=[];break;case 78:f[e-1].push(f[e]);break;case 81:this.$=[];break;case 82:f[e-1].push(f[e]);break;case 85:this.$=[];break;case 86:f[e-1].push(f[e]);break;case 89:this.$=[f[e]];break;case 90:f[e-1].push(f[e]);break;case 91:this.$=[f[e]];break;case 92:f[e-1].push(f[e])}},table:[{3:1,4:2,5:[2,43],6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],46:[2,43],49:[2,43],53:[2,43]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:[1,11],14:[1,18],15:16,17:[1,21],22:14,25:15,27:[1,19],32:[1,20],37:[2,2],42:[2,2],45:[2,2],46:[1,12],49:[1,13],53:[1,17]},{1:[2,1]},{5:[2,44],13:[2,44],14:[2,44],17:[2,44],27:[2,44],32:[2,44],37:[2,44],42:[2,44],45:[2,44],46:[2,44],49:[2,44],53:[2,44]},{5:[2,3],13:[2,3],14:[2,3],17:[2,3],27:[2,3],32:[2,3],37:[2,3],42:[2,3],45:[2,3],46:[2,3],49:[2,3],53:[2,3]},{5:[2,4],13:[2,4],14:[2,4],17:[2,4],27:[2,4],32:[2,4],37:[2,4],42:[2,4],45:[2,4],46:[2,4],49:[2,4],53:[2,4]},{5:[2,5],13:[2,5],14:[2,5],17:[2,5],27:[2,5],32:[2,5],37:[2,5],42:[2,5],45:[2,5],46:[2,5],49:[2,5],53:[2,5]},{5:[2,6],13:[2,6],14:[2,6],17:[2,6],27:[2,6],32:[2,6],37:[2,6],42:[2,6],45:[2,6],46:[2,6],49:[2,6],53:[2,6]},{5:[2,7],13:[2,7],14:[2,7],17:[2,7],27:[2,7],32:[2,7],37:[2,7],42:[2,7],45:[2,7],46:[2,7],49:[2,7],53:[2,7]},{5:[2,8],13:[2,8],14:[2,8],17:[2,8],27:[2,8],32:[2,8],37:[2,8],42:[2,8],45:[2,8],46:[2,8],49:[2,8],53:[2,8]},{18:22,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:33,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{4:34,6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],37:[2,43],42:[2,43],45:[2,43],46:[2,43],49:[2,43],53:[2,43]},{4:35,6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],42:[2,43],45:[2,43],46:[2,43],49:[2,43],53:[2,43]},{12:36,14:[1,18]},{18:38,54:37,58:39,59:[1,40],66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{5:[2,9],13:[2,9],14:[2,9],16:[2,9],17:[2,9],27:[2,9],32:[2,9],37:[2,9],42:[2,9],45:[2,9],46:[2,9],49:[2,9],53:[2,9]},{18:41,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:42,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:43,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{31:[2,73],47:44,59:[2,73],66:[2,73],74:[2,73],75:[2,73],76:[2,73],77:[2,73],78:[2,73],79:[2,73]},{21:[2,30],31:[2,30],52:[2,30],59:[2,30],62:[2,30],66:[2,30],69:[2,30],74:[2,30],75:[2,30],76:[2,30],77:[2,30],78:[2,30],79:[2,30]},{21:[2,31],31:[2,31],52:[2,31],59:[2,31],62:[2,31],66:[2,31],69:[2,31],74:[2,31],75:[2,31],76:[2,31],77:[2,31],78:[2,31],79:[2,31]},{21:[2,32],31:[2,32],52:[2,32],59:[2,32],62:[2,32],66:[2,32],69:[2,32],74:[2,32],75:[2,32],76:[2,32],77:[2,32],78:[2,32],79:[2,32]},{21:[2,33],31:[2,33],52:[2,33],59:[2,33],62:[2,33],66:[2,33],69:[2,33],74:[2,33],75:[2,33],76:[2,33],77:[2,33],78:[2,33],79:[2,33]},{21:[2,34],31:[2,34],52:[2,34],59:[2,34],62:[2,34],66:[2,34],69:[2,34],74:[2,34],75:[2,34],76:[2,34],77:[2,34],78:[2,34],79:[2,34]},{21:[2,35],31:[2,35],52:[2,35],59:[2,35],62:[2,35],66:[2,35],69:[2,35],74:[2,35],75:[2,35],76:[2,35],77:[2,35],78:[2,35],79:[2,35]},{21:[2,36],31:[2,36],52:[2,36],59:[2,36],62:[2,36],66:[2,36],69:[2,36],74:[2,36],75:[2,36],76:[2,36],77:[2,36],78:[2,36],79:[2,36]},{21:[2,40],31:[2,40],52:[2,40],59:[2,40],62:[2,40],66:[2,40],69:[2,40],74:[2,40],75:[2,40],76:[2,40],77:[2,40],78:[2,40],79:[2,40],81:[1,45]},{66:[1,32],80:46},{21:[2,42],31:[2,42],52:[2,42],59:[2,42],62:[2,42],66:[2,42],69:[2,42],74:[2,42],75:[2,42],76:[2,42],77:[2,42],78:[2,42],79:[2,42],81:[2,42]},{50:47,52:[2,77],59:[2,77],66:[2,77],74:[2,77],75:[2,77],76:[2,77],77:[2,77],78:[2,77],79:[2,77]},{23:48,36:50,37:[1,52],41:51,42:[1,53],43:49,45:[2,49]},{26:54,41:55,42:[1,53],45:[2,51]},{16:[1,56]},{31:[2,81],55:57,59:[2,81],66:[2,81],74:[2,81],75:[2,81],76:[2,81],77:[2,81],78:[2,81],79:[2,81]},{31:[2,37],59:[2,37],66:[2,37],74:[2,37],75:[2,37],76:[2,37],77:[2,37],78:[2,37],79:[2,37]},{31:[2,38],59:[2,38],66:[2,38],74:[2,38],75:[2,38],76:[2,38],77:[2,38],78:[2,38],79:[2,38]},{18:58,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{28:59,31:[2,53],59:[2,53],66:[2,53],69:[2,53],74:[2,53],75:[2,53],76:[2,53],77:[2,53],78:[2,53],79:[2,53]},{31:[2,59],33:60,59:[2,59],66:[2,59],69:[2,59],74:[2,59],75:[2,59],76:[2,59],77:[2,59],78:[2,59],79:[2,59]},{19:61,21:[2,45],59:[2,45],66:[2,45],74:[2,45],75:[2,45],76:[2,45],77:[2,45],78:[2,45],79:[2,45]},{18:65,31:[2,75],48:62,57:63,58:66,59:[1,40],63:64,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{66:[1,70]},{21:[2,39],31:[2,39],52:[2,39],59:[2,39],62:[2,39],66:[2,39],69:[2,39],74:[2,39],75:[2,39],76:[2,39],77:[2,39],78:[2,39],79:[2,39],81:[1,45]},{18:65,51:71,52:[2,79],57:72,58:66,59:[1,40],63:73,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{24:74,45:[1,75]},{45:[2,50]},{4:76,6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],37:[2,43],42:[2,43],45:[2,43],46:[2,43],49:[2,43],53:[2,43]},{45:[2,19]},{18:77,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{4:78,6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],45:[2,43],46:[2,43],49:[2,43],53:[2,43]},{24:79,45:[1,75]},{45:[2,52]},{5:[2,10],13:[2,10],14:[2,10],17:[2,10],27:[2,10],32:[2,10],37:[2,10],42:[2,10],45:[2,10],46:[2,10],49:[2,10],53:[2,10]},{18:65,31:[2,83],56:80,57:81,58:66,59:[1,40],63:82,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{59:[2,85],60:83,62:[2,85],66:[2,85],74:[2,85],75:[2,85],76:[2,85],77:[2,85],78:[2,85],79:[2,85]},{18:65,29:84,31:[2,55],57:85,58:66,59:[1,40],63:86,64:67,65:68,66:[1,69],69:[2,55],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:65,31:[2,61],34:87,57:88,58:66,59:[1,40],63:89,64:67,65:68,66:[1,69],69:[2,61],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:65,20:90,21:[2,47],57:91,58:66,59:[1,40],63:92,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{31:[1,93]},{31:[2,74],59:[2,74],66:[2,74],74:[2,74],75:[2,74],76:[2,74],77:[2,74],78:[2,74],79:[2,74]},{31:[2,76]},{21:[2,24],31:[2,24],52:[2,24],59:[2,24],62:[2,24],66:[2,24],69:[2,24],74:[2,24],75:[2,24],76:[2,24],77:[2,24],78:[2,24],79:[2,24]},{21:[2,25],31:[2,25],52:[2,25],59:[2,25],62:[2,25],66:[2,25],69:[2,25],74:[2,25],75:[2,25],76:[2,25],77:[2,25],78:[2,25],79:[2,25]},{21:[2,27],31:[2,27],52:[2,27],62:[2,27],65:94,66:[1,95],69:[2,27]},{21:[2,89],31:[2,89],52:[2,89],62:[2,89],66:[2,89],69:[2,89]},{21:[2,42],31:[2,42],52:[2,42],59:[2,42],62:[2,42],66:[2,42],67:[1,96],69:[2,42],74:[2,42],75:[2,42],76:[2,42],77:[2,42],78:[2,42],79:[2,42],81:[2,42]},{21:[2,41],31:[2,41],52:[2,41],59:[2,41],62:[2,41],66:[2,41],69:[2,41],74:[2,41],75:[2,41],76:[2,41],77:[2,41],78:[2,41],79:[2,41],81:[2,41]},{52:[1,97]},{52:[2,78],59:[2,78],66:[2,78],74:[2,78],75:[2,78],76:[2,78],77:[2,78],78:[2,78],79:[2,78]},{52:[2,80]},{5:[2,12],13:[2,12],14:[2,12],17:[2,12],27:[2,12],32:[2,12],37:[2,12],42:[2,12],45:[2,12],46:[2,12],49:[2,12],53:[2,12]},{18:98,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{36:50,37:[1,52],41:51,42:[1,53],43:100,44:99,45:[2,71]},{31:[2,65],38:101,59:[2,65],66:[2,65],69:[2,65],74:[2,65],75:[2,65],76:[2,65],77:[2,65],78:[2,65],79:[2,65]},{45:[2,17]},{5:[2,13],13:[2,13],14:[2,13],17:[2,13],27:[2,13],32:[2,13],37:[2,13],42:[2,13],45:[2,13],46:[2,13],49:[2,13],53:[2,13]},{31:[1,102]},{31:[2,82],59:[2,82],66:[2,82],74:[2,82],75:[2,82],76:[2,82],77:[2,82],78:[2,82],79:[2,82]},{31:[2,84]},{18:65,57:104,58:66,59:[1,40],61:103,62:[2,87],63:105,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{30:106,31:[2,57],68:107,69:[1,108]},{31:[2,54],59:[2,54],66:[2,54],69:[2,54],74:[2,54],75:[2,54],76:[2,54],77:[2,54],78:[2,54],79:[2,54]},{31:[2,56],69:[2,56]},{31:[2,63],35:109,68:110,69:[1,108]},{31:[2,60],59:[2,60],66:[2,60],69:[2,60],74:[2,60],75:[2,60],76:[2,60],77:[2,60],78:[2,60],79:[2,60]},{31:[2,62],69:[2,62]},{21:[1,111]},{21:[2,46],59:[2,46],66:[2,46],74:[2,46],75:[2,46],76:[2,46],77:[2,46],78:[2,46],79:[2,46]},{21:[2,48]},{5:[2,21],13:[2,21],14:[2,21],17:[2,21],27:[2,21],32:[2,21],37:[2,21],42:[2,21],45:[2,21],46:[2,21],49:[2,21],53:[2,21]},{21:[2,90],31:[2,90],52:[2,90],62:[2,90],66:[2,90],69:[2,90]},{67:[1,96]},{18:65,57:112,58:66,59:[1,40],66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{5:[2,22],13:[2,22],14:[2,22],17:[2,22],27:[2,22],32:[2,22],37:[2,22],42:[2,22],45:[2,22],46:[2,22],49:[2,22],53:[2,22]},{31:[1,113]},{45:[2,18]},{45:[2,72]},{18:65,31:[2,67],39:114,57:115,58:66,59:[1,40],63:116,64:67,65:68,66:[1,69],69:[2,67],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{5:[2,23],13:[2,23],14:[2,23],17:[2,23],27:[2,23],32:[2,23],37:[2,23],42:[2,23],45:[2,23],46:[2,23],49:[2,23],53:[2,23]},{62:[1,117]},{59:[2,86],62:[2,86],66:[2,86],74:[2,86],75:[2,86],76:[2,86],77:[2,86],78:[2,86],79:[2,86]},{62:[2,88]},{31:[1,118]},{31:[2,58]},{66:[1,120],70:119},{31:[1,121]},{31:[2,64]},{14:[2,11]},{21:[2,28],31:[2,28],52:[2,28],62:[2,28],66:[2,28],69:[2,28]},{5:[2,20],13:[2,20],14:[2,20],17:[2,20],27:[2,20],32:[2,20],37:[2,20],42:[2,20],45:[2,20],46:[2,20],49:[2,20],53:[2,20]},{31:[2,69],40:122,68:123,69:[1,108]},{31:[2,66],59:[2,66],66:[2,66],69:[2,66],74:[2,66],75:[2,66],76:[2,66],77:[2,66],78:[2,66],79:[2,66]},{31:[2,68],69:[2,68]},{21:[2,26],31:[2,26],52:[2,26],59:[2,26],62:[2,26],66:[2,26],69:[2,26],74:[2,26],75:[2,26],76:[2,26],77:[2,26],78:[2,26],79:[2,26]},{13:[2,14],14:[2,14],17:[2,14],27:[2,14],32:[2,14],37:[2,14],42:[2,14],45:[2,14],46:[2,14],49:[2,14],53:[2,14]},{66:[1,125],71:[1,124]},{66:[2,91],71:[2,91]},{13:[2,15],14:[2,15],17:[2,15],27:[2,15],32:[2,15],42:[2,15],45:[2,15],46:[2,15],49:[2,15],53:[2,15]},{31:[1,126]},{31:[2,70]},{31:[2,29]},{66:[2,92],71:[2,92]},{13:[2,16],14:[2,16],17:[2,16],27:[2,16],32:[2,16],37:[2,16],42:[2,16],45:[2,16],46:[2,16],49:[2,16],53:[2,16]}],defaultActions:{4:[2,1],49:[2,50],51:[2,19],55:[2,52],64:[2,76],73:[2,80],78:[2,17],82:[2,84],92:[2,48],99:[2,18],100:[2,72],105:[2,88],107:[2,58],110:[2,64],111:[2,11],123:[2,70],124:[2,29]},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){function u(n,i){return t.yytext=t.yytext.substr(n,t.yyleng-i)}var f=r;switch(i){case 0:if(t.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):t.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return t.yytext=t.yytext.substr(5,t.yyleng-9),this.popState(),16;case 4:return 14;case 5:return this.popState(),13;case 6:return 59;case 7:return 62;case 8:return 17;case 9:return this.popState(),this.begin("raw"),21;case 10:return 53;case 11:return 27;case 12:return 45;case 13:return this.popState(),42;case 14:return this.popState(),42;case 15:return 32;case 16:return 37;case 17:return 49;case 18:return 46;case 19:this.unput(t.yytext);this.popState();this.begin("com");break;case 20:return this.popState(),13;case 21:return 46;case 22:return 67;case 23:return 66;case 24:return 66;case 25:return 81;case 27:return this.popState(),52;case 28:return this.popState(),31;case 29:return t.yytext=u(1,2).replace(/\\"/g,'"'),74;case 30:return t.yytext=u(1,2).replace(/\\'/g,"'"),74;case 31:return 79;case 32:return 76;case 33:return 76;case 34:return 77;case 35:return 78;case 36:return 75;case 37:return 69;case 38:return 71;case 39:return 66;case 40:return 66;case 41:return"INVALID";case 42:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,42],inclusive:!0}},n}();return n.lexer=i,t.prototype=n,n.Parser=t,new t}();t["default"]=i;n.exports=t["default"]},function(n,t,i){"use strict";function u(){}function e(n,t,i){t===undefined&&(t=n.length);var r=n[t-1],u=n[t-2];return r?r.type==="ContentStatement"?(u||!i?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original):void 0:i}function o(n,t,i){t===undefined&&(t=-1);var r=n[t+1],u=n[t+2];return r?r.type==="ContentStatement"?(u||!i?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original):void 0:i}function f(n,t,i){var r=n[t==null?0:t+1],u;r&&r.type==="ContentStatement"&&(i||!r.rightStripped)&&(u=r.value,r.value=r.value.replace(i?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==u)}function r(n,t,i){var r=n[t==null?n.length-1:t-1],u;if(r&&r.type==="ContentStatement"&&(i||!r.leftStripped))return u=r.value,r.value=r.value.replace(i?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==u,r.leftStripped}var c=i(8)["default"],s,h;t.__esModule=!0;s=i(6);h=c(s);u.prototype=new h["default"];u.prototype.Program=function(n){var h=!this.isRootSeen,i,t,c,u,s;for(this.isRootSeen=!0,i=n.body,t=0,c=i.length;t<c;t++)if(u=i[t],s=this.accept(u),s){var l=e(i,t,h),a=o(i,t,h),v=s.openStandalone&&l,y=s.closeStandalone&&a,p=s.inlineStandalone&&l&&a;s.close&&f(i,t,!0);s.open&&r(i,t,!0);p&&(f(i,t),r(i,t)&&u.type==="PartialStatement"&&(u.indent=/([ \t]+$)/.exec(i[t-1].original)[1]));v&&(f((u.program||u.inverse).body),r(i,t));y&&(f(i,t),r((u.inverse||u.program).body))}return n};u.prototype.BlockStatement=function(n){var c,h;this.accept(n.program);this.accept(n.inverse);var t=n.program||n.inverse,i=n.program&&n.inverse,u=i,s=i;if(i&&i.chained)for(u=i.body[0].program;s.chained;)s=s.body[s.body.length-1].program;return c={open:n.openStrip.open,close:n.closeStrip.close,openStandalone:o(t.body),closeStandalone:e((u||t).body)},n.openStrip.close&&f(t.body,null,!0),i?(h=n.inverseStrip,h.open&&r(t.body,null,!0),h.close&&f(u.body,null,!0),n.closeStrip.open&&r(s.body,null,!0),e(t.body)&&o(u.body)&&(r(t.body),f(u.body))):n.closeStrip.open&&r(t.body,null,!0),c};u.prototype.MustacheStatement=function(n){return n.strip};u.prototype.PartialStatement=u.prototype.CommentStatement=function(n){var t=n.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};t["default"]=u;n.exports=t["default"]},function(n,t,i){"use strict";function e(n,t){this.source=n;this.start={line:t.first_line,column:t.first_column};this.end={line:t.last_line,column:t.last_column}}function o(n){return/^\[.*\]$/.test(n)?n.substr(1,n.length-2):n}function s(n,t){return{open:n.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function h(n){return n.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function c(n,t,i){var f,h,u,c;i=this.locInfo(i);var e=n?"@":"",o=[],s=0,l="";for(f=0,h=t.length;f<h;f++)if(u=t[f].part,c=t[f].original!==u,e+=(t[f].separator||"")+u,c||u!==".."&&u!=="."&&u!=="this")o.push(u);else if(o.length>0)throw new r["default"]("Invalid path: "+e,{loc:i});else u===".."&&(s++,l+="../");return new this.PathExpression(n,s,o,e,i)}function l(n,t,i,r,u,f){var e=r.charAt(3)||r.charAt(2),o=e!=="{"&&e!=="&";return new this.MustacheStatement(n,t,i,o,u,this.locInfo(f))}function a(n,t,i,u){var f,e;if(n.path.original!==i){f={loc:n.path.loc};throw new r["default"](n.path.original+" doesn't match "+i,f);}return u=this.locInfo(u),e=new this.Program([t],null,{},u),new this.BlockStatement(n.path,n.params,n.hash,e,undefined,{},{},{},u)}function v(n,t,i,u,f,e){var h,o,s;if(u&&u.path&&n.path.original!==u.path.original){h={loc:n.path.loc};throw new r["default"](n.path.original+" doesn't match "+u.path.original,h);}return t.blockParams=n.blockParams,o=undefined,s=undefined,i&&(i.chain&&(i.program.body[0].closeStrip=u.strip),s=i.strip,o=i.program),f&&(f=o,o=t,t=f),new this.BlockStatement(n.path,n.params,n.hash,t,o,n.strip,s,u&&u.strip,this.locInfo(e))}var f=i(8)["default"],u,r;t.__esModule=!0;t.SourceLocation=e;t.id=o;t.stripFlags=s;t.stripComment=h;t.preparePath=c;t.prepareMustache=l;t.prepareRawBlock=a;t.prepareBlock=v;u=i(12);r=f(u)},function(n,t,i){"use strict";function f(n,t,i){var f,r,e;if(u.isArray(n)){for(f=[],r=0,e=n.length;r<e;r++)f.push(t.wrap(n[r],i));return f}return typeof n=="boolean"||typeof n=="number"?n+"":n}function o(n){this.srcFile=n;this.source=[]}var u,r,e;t.__esModule=!0;u=i(13);r=undefined;try{!1&&(e=require("source-map"),r=e.SourceNode)}catch(s){}r||(r=function(n,t,i,r){this.src="";r&&this.add(r)},r.prototype={add:function(n){u.isArray(n)&&(n=n.join(""));this.src+=n},prepend:function(n){u.isArray(n)&&(n=n.join(""));this.src=n+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});o.prototype={prepend:function(n,t){this.source.unshift(this.wrap(n,t))},push:function(n,t){this.source.push(this.wrap(n,t))},merge:function(){var n=this.empty();return this.each(function(t){n.add(["  ",t,"\n"])}),n},each:function(n){for(var t=0,i=this.source.length;t<i;t++)n(this.source[t])},empty:function(){var n=arguments[0]===undefined?this.currentLocation||{start:{}}:arguments[0];return new r(n.start.line,n.start.column,this.srcFile)},wrap:function(n){var t=arguments[1]===undefined?this.currentLocation||{start:{}}:arguments[1];return n instanceof r?n:(n=f(n,this,t),new r(t.start.line,t.start.column,this.srcFile,n))},functionCall:function(n,t,i){return i=this.generateList(i),this.wrap([n,t?"."+t+"(":"(",i,")"])},quotedString:function(n){return'"'+(n+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(n){var u=[],t,r,i;for(t in n)n.hasOwnProperty(t)&&(r=f(n[t],this),r!=="undefined"&&u.push([this.quotedString(t),":",r]));return i=this.generateList(u),i.prepend("{"),i.add("}"),i},generateList:function(n,t){for(var r=this.empty(t),i=0,u=n.length;i<u;i++)i&&r.add(","),r.add(f(n[i],this,t));return r},generateArray:function(n,t){var i=this.generateList(n,t);return i.prepend("["),i.add("]"),i}};t["default"]=o;n.exports=t["default"]}])});Array.prototype.map||(Array.prototype.map=function(n,t){var e,u,i,r,f,o,s;if(this==null)throw new TypeError(" this is null or not defined");if(r=Object(this),f=r.length>>>0,typeof n!="function")throw new TypeError(n+" is not a function");for(arguments.length>1&&(e=t),u=new Array(f),i=0;i<f;)i in r&&(o=r[i],s=n.call(e,o,i,r),u[i]=s),i++;return u}),function(n){function f(){}function h(){u=!0;i=decodeURIComponent(a("p"));var t=window.addEventListener?"addEventListener":"attachEvent",r=t=="attachEvent"?"onmessage":"message",f=function(n){c(n)},e=o(f,this);n.addEventListener(r,e)}function e(n){var r,t;if(n){if(r=[],arguments.length>1&&typeof arguments[1].length!="undefined")for(t=0;t<arguments[1].length;t++)typeof arguments[1][t]!="function"&&r.push(arguments[1][t]);parent.postMessage(JSON.stringify({call:n,params:r}),i)}}function c(n){var u,f;if(n.origin.toLowerCase()===i.toLowerCase()&&n.data&&(u=JSON.parse(n.data),u.callback&&u.callback==="init")){for(f=0;f<u.api.length;f++)l(u.api[f].type,u.api[f].name,u.api[f].data);t&&(r?t(r):t())}}function o(n,t){return function(){return n.apply(t,arguments)}}function l(t,i,r){switch(t){case"function":var u=function(){e(i,Array.prototype.slice.call(arguments))},f=o(u,this);n.mgs.inGameInterface[i]=f;break;default:n.mgs.inGameInterface[i]=r}}function a(n){for(var i,u=window.location.href,r=u.split(/[\?&]+/),t=0;t<r.length;t++)if(i=r[t].split("="),i[0]==n)return i[1];return!1}var u=!1,i,t,r,s=f.prototype;s.init=function(n,i){u||h();t=n;r=i;e("init")};n.mgs={};n.mgs.inGameInterface=new f}(window),function(n,t,i){function s(n,t){return typeof n===t}function ft(){var i,n,u,f,e,o,t;for(var h in c)if(c.hasOwnProperty(h)){if(i=[],n=c[h],n.name&&(i.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(u=0;u<n.options.aliases.length;u++)i.push(n.options.aliases[u].toLowerCase());for(f=s(n.fn,"function")?n.fn():n.fn,e=0;e<i.length;e++)o=i[e],t=o.split("."),t.length===1?r[t[0]]=f:(!r[t[0]]||r[t[0]]instanceof Boolean||(r[t[0]]=new Boolean(r[t[0]])),r[t[0]][t[1]]=f),g.push((f?"":"no-")+t.join("-"))}}function et(n){var t=e.className,i=r._config.classPrefix||"",u;h&&(t=t.baseVal);r._config.enableJSClass&&(u=new RegExp("(^|\\s)"+i+"no-js(\\s|$)"),t=t.replace(u,"$1"+i+"js$2"));r._config.enableClasses&&(t+=" "+i+n.join(" "+i),h?e.className.baseVal=t:e.className=t)}function o(){return typeof t.createElement!="function"?t.createElement(arguments[0]):h?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function ot(){var n=t.body;return n||(n=o(h?"svg":"body"),n.fake=!0),n}function v(n,i,r,u){var c="modernizr",s,a,l,v,h=o("div"),f=ot();if(parseInt(r,10))while(r--)l=o("div"),l.id=u?u[r]:c+(r+1),h.appendChild(l);return s=o("style"),s.type="text/css",s.id="s"+c,(f.fake?f:h).appendChild(s),f.appendChild(h),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(t.createTextNode(n)),h.id=c,f.fake&&(f.style.background="",f.style.overflow="hidden",v=e.style.overflow,e.style.overflow="hidden",e.appendChild(f)),a=i(h,n),f.fake?(f.parentNode.removeChild(f),e.style.overflow=v,e.offsetHeight):h.parentNode.removeChild(h),!!a}function st(n,t){return!!~(""+n).indexOf(t)}function ht(n){return n.replace(/([a-z])-([a-z])/g,function(n,t,i){return t+i.toUpperCase()}).replace(/^-/,"")}function ct(n,t){return function(){return n.apply(t,arguments)}}function lt(n,t,i){var r;for(var u in n)if(n[u]in t)return i===!1?n[u]:(r=t[n[u]],s(r,"function"))?ct(r,i||t):r;return!1}function rt(n){return n.replace(/([A-Z])/g,function(n,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function at(t,r){var f=t.length,u;if("CSS"in n&&"supports"in n.CSS){while(f--)if(n.CSS.supports(rt(t[f]),r))return!0;return!1}if("CSSSupportsRule"in n){for(u=[];f--;)u.push("("+rt(t[f])+":"+r+")");return u=u.join(" or "),v("@supports ("+u+") { #modernizr { position: absolute; } }",function(n){return getComputedStyle(n,null).position=="absolute"})}return i}function vt(n,t,r,u){function l(){a&&(delete f.style,delete f.modElem)}var c,a,h,v,e,y,p;if(u=s(u,"undefined")?!1:u,!s(r,"undefined")&&(c=at(n,r),!s(c,"undefined")))return c;for(p=["modernizr","tspan"];!f.style;)a=!0,f.modElem=o(p.shift()),f.style=f.modElem.style;for(v=n.length,h=0;h<v;h++)if(e=n[h],y=f.style[e],st(e,"-")&&(e=ht(e)),f.style[e]!==i){if(u||s(r,"undefined"))return l(),t=="pfx"?e:!0;try{f.style[e]=r}catch(w){}if(f.style[e]!=y)return l(),t=="pfx"?e:!0}return l(),!1}function ut(n,t,i,r,u){var f=n.charAt(0).toUpperCase()+n.slice(1),e=(n+" "+w.join(f+" ")+f).split(" ");return s(t,"string")||s(t,"undefined")?vt(e,t,r,u):(e=(n+" "+b.join(f+" ")+f).split(" "),lt(e,t,i))}function d(n,t,r){return ut(n,i,i,t,r)}var g=[],c=[],u={_version:"3.3.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(n,t){var i=this;setTimeout(function(){t(i[n])},0)},addTest:function(n,t,i){c.push({name:n,fn:t,options:i})},addAsyncTest:function(n){c.push({name:null,fn:n})}},r=function(){},e,h,a,nt,tt,it,y,p,w,b,k,f,l;for(r.prototype=u,r=new r,r.addTest("webaudio",function(){var i="webkitAudioContext"in n,t="AudioContext"in n;return r._config.usePrefixes?i||t:t}),e=t.documentElement,h=e.nodeName.toLowerCase()==="svg",h||function(n,t){function p(n,t){var i=n.createElement("p"),r=n.getElementsByTagName("head")[0]||n.documentElement;return i.innerHTML="x<style>"+t+"<\/style>",r.insertBefore(i.lastChild,r.firstChild)}function l(){var n=i.elements;return typeof n=="string"?n.split(" "):n}function w(n,t){var r=i.elements;typeof r!="string"&&(r=r.join(" "));typeof n!="string"&&(n=n.join(" "));i.elements=r+" "+n;s(t)}function o(n){var t=c[n[h]];return t||(t={},e++,n[h]=e,c[e]=t),t}function a(n,i,u){if(i||(i=t),r)return i.createElement(n);u||(u=o(i));var f;return f=u.cache[n]?u.cache[n].cloneNode():y.test(n)?(u.cache[n]=u.createElem(n)).cloneNode():u.createElem(n),f.canHaveChildren&&!v.test(n)&&!f.tagUrn?u.frag.appendChild(f):f}function b(n,i){if(n||(n=t),r)return n.createDocumentFragment();i=i||o(n);for(var f=i.frag.cloneNode(),u=0,e=l(),s=e.length;u<s;u++)f.createElement(e[u]);return f}function k(n,t){t.cache||(t.cache={},t.createElem=n.createElement,t.createFrag=n.createDocumentFragment,t.frag=t.createFrag());n.createElement=function(r){return i.shivMethods?a(r,n,t):t.createElem(r)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/[\w\-:]+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(i,t.frag)}function s(n){n||(n=t);var u=o(n);return!i.shivCSS||f||u.hasCSS||(u.hasCSS=!!p(n,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),r||k(n,u),n}var u=n.html5||{},v=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,y=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,h="_html5shiv",e=0,c={},r,i;(function(){try{var n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";f="hidden"in n;r=n.childNodes.length==1||function(){t.createElement("a");var n=t.createDocumentFragment();return typeof n.cloneNode=="undefined"||typeof n.createDocumentFragment=="undefined"||typeof n.createElement=="undefined"}()}catch(i){f=!0;r=!0}})();i={elements:u.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:u.shivCSS!==!1,supportsUnknownElements:r,shivMethods:u.shivMethods!==!1,type:"default",shivDocument:s,createElement:a,createDocumentFragment:b,addElements:w};n.html5=i;s(t);typeof module=="object"&&module.exports&&(module.exports=i)}(typeof n!="undefined"?n:this,t),r.addTest("audio",function(){var t=o("audio"),n=!1;try{(n=!!t.canPlayType)&&(n=new Boolean(n),n.ogg=t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=t.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/,""),n.opus=t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),n.wav=t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(i){}return n}),r.addTest("canvas",function(){var n=o("canvas");return!!(n.getContext&&n.getContext("2d"))}),r.addTest("video",function(){var t=o("video"),n=!1;try{(n=!!t.canPlayType)&&(n=new Boolean(n),n.ogg=t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),n.vp9=t.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),n.hls=t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(i){}return n}),a=u._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[],u._prefixes=a,nt=("CSS"in n)&&("supports"in n.CSS),tt=("supportsCSS"in n),r.addTest("supports",nt||tt),it=function(){var t=n.matchMedia||n.msMatchMedia;return t?function(n){var i=t(n);return i&&i.matches||!1}:function(t){var i=!1;return v("@media "+t+" { #modernizr { position: absolute; } }",function(t){i=(n.getComputedStyle?n.getComputedStyle(t,null):t.currentStyle).position=="absolute"}),i}}(),u.mq=it,y=u.testStyles=v,r.addTest("touchevents",function(){var i,r;return"ontouchstart"in n||n.DocumentTouch&&t instanceof DocumentTouch?i=!0:(r=["@media (",a.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join(""),y(r,function(n){i=n.offsetTop===9})),i}),p="Moz O ms Webkit",w=u._config.usePrefixes?p.split(" "):[],u._cssomPrefixes=w,b=u._config.usePrefixes?p.toLowerCase().split(" "):[],u._domPrefixes=b,k={elem:o("modernizr")},r._q.push(function(){delete k.elem}),f={style:k.elem.style},r._q.unshift(function(){delete f.style}),u.testAllProps=ut,u.testAllProps=d,r.addTest("csstransforms",function(){return navigator.userAgent.indexOf("Android 2.")===-1&&d("transform","scale(1)",!0)}),r.addTest("csstransforms3d",function(){var t=!!d("perspective","1px",!0),i=r._config.usePrefixes,n,u;return t&&(!i||"webkitPerspective"in e.style)&&(u="#modernizr{width:0;height:0}",r.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",i&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",y(u+n,function(n){t=n.offsetWidth===7&&n.offsetHeight===18})),t}),ft(),et(g),delete u.addTest,delete u.addAsyncTest,l=0;l<r._q.length;l++)r._q[l]();n.Modernizr=r}(window,document),function(n,t){"use strict";var ot=n.GreenSockGlobals=n.GreenSockGlobals||n,ct,o,at,ut,c;if(!ot.TweenLite){var s,f,i,u,h,kt=function(n){for(var r=n.split("."),i=ot,t=0;r.length>t;t++)i[r[t]]=i=i[r[t]]||{};return i},v=kt("com.greensock"),e=1e-10,dt=function(n){for(var i=[],r=n.length,t=0;t!==r;i.push(n[t++]));return i},gt=function(){},d=function(){var n=Object.prototype.toString,t=n.call([]);return function(i){return null!=i&&(i instanceof Array||"object"==typeof i&&!!i.push&&n.call(i)===t)}}(),g={},ni=function(i,r,u,f){this.sc=g[i]?g[i].sc:[];g[i]=this;this.gsClass=null;this.func=u;var e=[];this.check=function(o){for(var c,l,a,h,s=r.length,v=s;--s>-1;)(c=g[r[s]]||new ni(r[s],[])).gsClass?(e[s]=c.gsClass,v--):o&&c.sc.push(this);if(0===v&&u)for(l=("com.greensock."+i).split("."),a=l.pop(),h=kt(l.join("."))[a]=this.gsClass=u.apply(u,e),f&&(ot[a]=h,"function"==typeof define&&define.amd?define((n.GreenSockAMDPath?n.GreenSockAMDPath+"/":"")+i.split(".").pop(),[],function(){return h}):i===t&&"undefined"!=typeof module&&module.exports&&(module.exports=h)),s=0;this.sc.length>s;s++)this.sc[s].check()};this.check(!0)},st=n._gsDefine=function(n,t,i,r){return new ni(n,t,i,r)},l=v._class=function(n,t,i){return t=t||function(){},st(n,[],function(){return t},i),t};st.globals=ot;var ti=[0,0,1,1],ei=[],a=l("easing.Ease",function(n,t,i,r){this._func=n;this._type=i||0;this._power=r||0;this._params=t?ti.concat(t):ti},!0),nt=a.map={},ht=a.register=function(n,t,i,r){for(var o,u,e,f,s=t.split(","),h=s.length,c=(i||"easeIn,easeOut,easeInOut").split(",");--h>-1;)for(u=s[h],o=r?l("easing."+u,null,!0):v.easing[u]||{},e=c.length;--e>-1;)f=c[e],nt[u+"."+f]=nt[f+u]=o[f]=n.getRatio?n:n[f]||new n};for(i=a.prototype,i._calcEnd=!1,i.getRatio=function(n){if(this._func)return this._params[0]=n,this._func.apply(null,this._params);var i=this._type,r=this._power,t=1===i?1-n:2===i?n:.5>n?2*n:2*(1-n);return 1===r?t*=t:2===r?t*=t*t:3===r?t*=t*t*t:4===r&&(t*=t*t*t*t),1===i?1-t:2===i?t:.5>n?t/2:1-t/2},s=["Linear","Quad","Cubic","Quart","Quint,Strong"],f=s.length;--f>-1;)i=s[f]+",Power"+f,ht(new a(null,null,1,f),i,"easeOut",!0),ht(new a(null,null,2,f),i,"easeIn"+(0===f?",easeNone":"")),ht(new a(null,null,3,f),i,"easeInOut");nt.linear=v.easing.Linear.easeIn;nt.swing=v.easing.Quad.easeInOut;ct=l("events.EventDispatcher",function(n){this._listeners={};this._eventTarget=n||this});i=ct.prototype;i.addEventListener=function(n,t,i,r,f){f=f||0;var s,o,e=this._listeners[n],c=0;for(null==e&&(this._listeners[n]=e=[]),o=e.length;--o>-1;)s=e[o],s.c===t&&s.s===i?e.splice(o,1):0===c&&f>s.pr&&(c=o+1);e.splice(c,0,{c:t,s:i,up:r,pr:f});this!==u||h||u.wake()};i.removeEventListener=function(n,t){var i,r=this._listeners[n];if(r)for(i=r.length;--i>-1;)if(r[i].c===t)return r.splice(i,1),void 0};i.dispatchEvent=function(n){var r,i,t,u=this._listeners[n];if(u)for(r=u.length,i=this._eventTarget;--r>-1;)t=u[r],t&&(t.up?t.c.call(t.s||i,{type:n,target:i}):t.c.call(t.s||i))};var tt=n.requestAnimationFrame,lt=n.cancelAnimationFrame,it=Date.now||function(){return(new Date).getTime()},rt=it();for(s=["ms","moz","webkit","o"],f=s.length;--f>-1&&!tt;)tt=n[s[f]+"RequestAnimationFrame"],lt=n[s[f]+"CancelAnimationFrame"]||n[s[f]+"CancelRequestAnimationFrame"];l("Ticker",function(n,t){var r,a,f,s,c,i=this,y=it(),o=t!==!1&&tt,l=500,p=33,w="tick",v=function(n){var t,e,u=it()-rt;u>l&&(y+=u-p);rt+=u;i.time=(rt-y)/1e3;t=i.time-c;(!r||t>0||n===!0)&&(i.frame++,c+=t+(t>=s?.004:s-t),e=!0);n!==!0&&(f=a(v));e&&i.dispatchEvent(w)};ct.call(i);i.time=i.frame=0;i.tick=function(){v(!0)};i.lagSmoothing=function(n,t){l=n||1/e;p=Math.min(t,l,0)};i.sleep=function(){null!=f&&(o&&lt?lt(f):clearTimeout(f),a=gt,f=null,i===u&&(h=!1))};i.wake=function(){null!==f?i.sleep():i.frame>10&&(rt=it()-l+5);a=0===r?gt:o&&tt?tt:function(n){return setTimeout(n,0|1e3*(c-i.time)+1)};i===u&&(h=!0);v(2)};i.fps=function(n){return arguments.length?(r=n,s=1/(r||60),c=this.time+s,i.wake(),void 0):r};i.useRAF=function(n){return arguments.length?(i.sleep(),o=n,i.fps(r),void 0):o};i.fps(n);setTimeout(function(){o&&5>i.frame&&i.useRAF(!1)},1500)});i=v.Ticker.prototype=new v.events.EventDispatcher;i.constructor=v.Ticker;o=l("core.Animation",function(n,t){if(this.vars=t=t||{},this._duration=this._totalDuration=n||0,this._delay=Number(t.delay)||0,this._timeScale=1,this._active=t.immediateRender===!0,this.data=t.data,this._reversed=t.reversed===!0,p){h||u.wake();var i=this.vars.useFrames?k:p;i.add(this,i._time);this.vars.paused&&this.paused(!0)}});u=o.ticker=new v.Ticker;i=o.prototype;i._dirty=i._gc=i._initted=i._paused=!1;i._totalTime=i._time=0;i._rawPrevTime=-1;i._next=i._last=i._onUpdate=i._timeline=i.timeline=null;i._paused=!1;at=function(){h&&it()-rt>2e3&&u.wake();setTimeout(at,2e3)};at();i.play=function(n,t){return null!=n&&this.seek(n,t),this.reversed(!1).paused(!1)};i.pause=function(n,t){return null!=n&&this.seek(n,t),this.paused(!0)};i.resume=function(n,t){return null!=n&&this.seek(n,t),this.paused(!1)};i.seek=function(n,t){return this.totalTime(Number(n),t!==!1)};i.restart=function(n,t){return this.reversed(!1).paused(!1).totalTime(n?-this._delay:0,t!==!1,!0)};i.reverse=function(n,t){return null!=n&&this.seek(n||this.totalDuration(),t),this.reversed(!0).paused(!1)};i.render=function(){};i.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this};i.isActive=function(){var t,n=this._timeline,i=this._startTime;return!n||!this._gc&&!this._paused&&n.isActive()&&(t=n.rawTime())>=i&&i+this.totalDuration()/this._timeScale>t};i._enabled=function(n,t){return h||u.wake(),this._gc=!n,this._active=this.isActive(),t!==!0&&(n&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!n&&this.timeline&&this._timeline._remove(this,!0)),!1};i._kill=function(){return this._enabled(!1,!1)};i.kill=function(n,t){return this._kill(n,t),this};i._uncache=function(n){for(var t=n?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this};i._swapSelfInParams=function(n){for(var t=n.length,i=n.concat();--t>-1;)"{self}"===n[t]&&(i[t]=this);return i};i._callback=function(n){var t=this.vars;t[n].apply(t[n+"Scope"]||t.callbackScope||this,t[n+"Params"]||ei)};i.eventCallback=function(n,t,i,r){if("on"===(n||"").substr(0,2)){var u=this.vars;if(1===arguments.length)return u[n];null==t?delete u[n]:(u[n]=t,u[n+"Params"]=d(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,u[n+"Scope"]=r);"onUpdate"===n&&(this._onUpdate=t)}return this};i.delay=function(n){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+n-this._delay),this._delay=n,this):this._delay};i.duration=function(n){return arguments.length?(this._duration=this._totalDuration=n,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==n&&this.totalTime(this._totalTime*(n/this._duration),!0),this):(this._dirty=!1,this._duration)};i.totalDuration=function(n){return this._dirty=!1,arguments.length?this.duration(n):this._totalDuration};i.time=function(n,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(n>this._duration?this._duration:n,t)):this._time};i.totalTime=function(n,t,i){if(h||u.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>n&&!i&&(n+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var f=this._totalDuration,r=this._timeline;if(n>f&&!i&&(n=f),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?f-n:n)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1);(this._totalTime!==n||0===this._duration)&&(this.render(n,t,!1),y.length&&ft())}return this};i.progress=i.totalProgress=function(n,t){return arguments.length?this.totalTime(this.duration()*n,t):this._time/this.duration()};i.startTime=function(n){return arguments.length?(n!==this._startTime&&(this._startTime=n,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,n-this._delay)),this):this._startTime};i.endTime=function(n){return this._startTime+(0!=n?this.totalDuration():this.duration())/this._timeScale};i.timeScale=function(n){if(!arguments.length)return this._timeScale;if(n=n||e,this._timeline&&this._timeline.smoothChildTiming){var t=this._pauseTime,i=t||0===t?t:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/n}return this._timeScale=n,this._uncache(!1)};i.reversed=function(n){return arguments.length?(n!=this._reversed&&(this._reversed=n,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed};i.paused=function(n){if(!arguments.length)return this._paused;var t,r,i=this._timeline;return n!=this._paused&&i&&(h||n||u.wake(),t=i.rawTime(),r=t-this._pauseTime,!n&&i.smoothChildTiming&&(this._startTime+=r,this._uncache(!1)),this._pauseTime=n?t:null,this._paused=n,this._active=this.isActive(),!n&&0!==r&&this._initted&&this.duration()&&this.render(i.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,!0,!0)),this._gc&&!n&&this._enabled(!0,!1),this};ut=l("core.SimpleTimeline",function(n){o.call(this,0,n);this.autoRemoveChildren=this.smoothChildTiming=!0});i=ut.prototype=new o;i.constructor=ut;i.kill()._gc=!1;i._first=i._last=i._recent=null;i._sortChildren=!1;i.add=i.insert=function(n,t){var i,r;if(n._startTime=Number(t||0)+n._delay,n._paused&&this!==n._timeline&&(n._pauseTime=n._startTime+(this.rawTime()-n._startTime)/n._timeScale),n.timeline&&n.timeline._remove(n,!0),n.timeline=n._timeline=this,n._gc&&n._enabled(!0,!0),i=this._last,this._sortChildren)for(r=n._startTime;i&&i._startTime>r;)i=i._prev;return i?(n._next=i._next,i._next=n):(n._next=this._first,this._first=n),n._next?n._next._prev=n:this._last=n,n._prev=i,this._recent=n,this._timeline&&this._uncache(!0),this};i._remove=function(n,t){return n.timeline===this&&(t||n._enabled(!1,!0),n._prev?n._prev._next=n._next:this._first===n&&(this._first=n._next),n._next?n._next._prev=n._prev:this._last===n&&(this._last=n._prev),n._next=n._prev=n.timeline=null,n===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this};i.render=function(n,t,i){var u,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=n;r;)u=r._next,(r._active||n>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(n-r._startTime)*r._timeScale,t,i):r.render((n-r._startTime)*r._timeScale,t,i)),r=u};i.rawTime=function(){return h||u.wake(),this._totalTime};var r=l("TweenLite",function(t,i,u){if(o.call(this,i,u),this.render=r.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"!=typeof t?t:r.selector(t)||t;var s,f,h,l=t.jquery||t.length&&t!==n&&t[0]&&(t[0]===n||t[0].nodeType&&t[0].style&&!t.nodeType),c=this.vars.overwrite;if(this._overwrite=c=null==c?ii[r.defaultOverwrite]:"number"==typeof c?c>>0:ii[c],(l||t instanceof Array||t.push&&d(t))&&"number"!=typeof t[0])for(this._targets=h=dt(t),this._propLookup=[],this._siblings=[],s=0;h.length>s;s++)f=h[s],f?"string"!=typeof f?f.length&&f!==n&&f[0]&&(f[0]===n||f[0].nodeType&&f[0].style&&!f.nodeType)?(h.splice(s--,1),this._targets=h=h.concat(dt(f))):(this._siblings[s]=et(f,this,!1),1===c&&this._siblings[s].length>1&&bt(f,this,null,1,this._siblings[s])):(f=h[s--]=r.selector(f),"string"==typeof f&&h.splice(s+1,1)):h.splice(s--,1);else this._propLookup={},this._siblings=et(t,this,!1),1===c&&this._siblings.length>1&&bt(t,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-e,this.render(-this._delay))},!0),vt=function(t){return t&&t.length&&t!==n&&t[0]&&(t[0]===n||t[0].nodeType&&t[0].style&&!t.nodeType)},oi=function(n,t){var i,r={};for(i in n)wt[i]||i in t&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!w[i]||w[i]&&w[i]._autoCSS)||(r[i]=n[i],delete n[i]);n.css=r};i=r.prototype=new o;i.constructor=r;i.kill()._gc=!1;i.ratio=0;i._firstPT=i._targets=i._overwrittenProps=i._startAt=null;i._notifyPluginsOfEnabled=i._lazy=!1;r.version="1.17.0";r.defaultEase=i._ease=new a(null,null,1,1);r.defaultOverwrite="auto";r.ticker=u;r.autoSleep=120;r.lagSmoothing=function(n,t){u.lagSmoothing(n,t)};r.selector=n.$||n.jQuery||function(t){var i=n.$||n.jQuery;return i?(r.selector=i,i(t)):"undefined"==typeof document?t:document.querySelectorAll?document.querySelectorAll(t):document.getElementById("#"===t.charAt(0)?t.substr(1):t)};var y=[],yt={},pt=r._internals={isArray:d,isSelector:vt,lazyTweens:y},w=r._plugins={},b=pt.tweenLookup={},si=0,wt=pt.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1},ii={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},k=o._rootFramesTimeline=new ut,p=o._rootTimeline=new ut,ri=30,ft=pt.lazyRender=function(){var n,t=y.length;for(yt={};--t>-1;)n=y[t],n&&n._lazy!==!1&&(n.render(n._lazy[0],n._lazy[1],!0),n._lazy=!1);y.length=0};p._startTime=u.time;k._startTime=u.frame;p._active=k._active=!0;setTimeout(ft,1);o._updateRoot=r.render=function(){var i,t,n;if(y.length&&ft(),p.render((u.time-p._startTime)*p._timeScale,!1,!1),k.render((u.frame-k._startTime)*k._timeScale,!1,!1),y.length&&ft(),u.frame>=ri){ri=u.frame+(parseInt(r.autoSleep,10)||120);for(n in b){for(t=b[n].tweens,i=t.length;--i>-1;)t[i]._gc&&t.splice(i,1);0===t.length&&delete b[n]}if(n=p._first,(!n||n._paused)&&r.autoSleep&&!k._first&&1===u._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||u.sleep()}}};u.addEventListener("tick",o._updateRoot);var et=function(n,t,i){var r,f,u=n._gsTweenID;if(b[u||(n._gsTweenID=u="t"+si++)]||(b[u]={target:n,tweens:[]}),t&&(r=b[u].tweens,r[f=r.length]=t,i))for(;--f>-1;)r[f]===t&&r.splice(f,1);return b[u].tweens},ui=function(n,t,i,u){var e,o,f=n.vars.onOverwrite;return f&&(e=f(n,t,i,u)),f=r.onOverwrite,f&&(o=f(n,t,i,u)),e!==!1&&o!==!1},bt=function(n,t,i,r,u){var o,s,f,y;if(1===r||r>=4){for(y=u.length,o=0;y>o;o++)if((f=u[o])!==t)f._gc||f._kill(null,n,t)&&(s=!0);else if(5===r)break;return s}var h,c=t._startTime+e,l=[],a=0,v=0===t._duration;for(o=u.length;--o>-1;)(f=u[o])===t||f._gc||f._paused||(f._timeline!==t._timeline?(h=h||fi(t,0,v),0===fi(f,h,v)&&(l[a++]=f)):c>=f._startTime&&f._startTime+f.totalDuration()/f._timeScale>c&&((v||!f._initted)&&2e-10>=c-f._startTime||(l[a++]=f)));for(o=a;--o>-1;)if(f=l[o],2===r&&f._kill(i,n,t)&&(s=!0),2!==r||!f._firstPT&&f._initted){if(2!==r&&!ui(f,t))continue;f._enabled(!1,!1)&&(s=!0)}return s},fi=function(n,t,i){for(var u=n._timeline,f=u._timeScale,r=n._startTime;u._timeline;){if(r+=u._startTime,f*=u._timeScale,u._paused)return-100;u=u._timeline}return r/=f,r>t?r-t:i&&r===t||!n._initted&&2*e>r-t?e:(r+=n.totalDuration()/n._timeScale/f)>t+e?0:r-t-e};if(i._init=function(){var e,h,n,u,f,t=this.vars,s=this._overwrittenProps,c=this._duration,o=!!t.immediateRender,i=t.ease;if(t.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill());f={};for(u in t.startAt)f[u]=t.startAt[u];if(f.overwrite=!1,f.immediateRender=!0,f.lazy=o&&t.lazy!==!1,f.startAt=f.delay=null,this._startAt=r.to(this.target,0,f),o)if(this._time>0)this._startAt=null;else if(0!==c)return}else if(t.runBackwards&&0!==c)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(o=!1);n={};for(u in t)wt[u]&&"autoCSS"!==u||(n[u]=t[u]);if(n.overwrite=0,n.data="isFromStart",n.lazy=o&&t.lazy!==!1,n.immediateRender=o,this._startAt=r.to(this.target,0,n),o){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=i=i?i instanceof a?i:"function"==typeof i?new a(i,t.easeParams):nt[i]||r.defaultEase:r.defaultEase,t.easeParams instanceof Array&&i.config&&(this._ease=i.config.apply(i,t.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(e=this._targets.length;--e>-1;)this._initProps(this._targets[e],this._propLookup[e]={},this._siblings[e],s?s[e]:null)&&(h=!0);else h=this._initProps(this.target,this._propLookup,this._siblings,s);if(h&&r._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),t.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=t.onInterval;this._initted=!0},i._initProps=function(t,i,r,u){var f,h,c,s,o,e;if(null==t)return!1;yt[t._gsTweenID]&&ft();this.vars.css||t.style&&t!==n&&t.nodeType&&w.css&&this.vars.autoCSS!==!1&&oi(this.vars,t);for(f in this.vars){if(e=this.vars[f],wt[f])e&&(e instanceof Array||e.push&&d(e))&&-1!==e.join("").indexOf("{self}")&&(this.vars[f]=e=this._swapSelfInParams(e,this));else if(w[f]&&(s=new w[f])._onInitTween(t,this.vars[f],this)){for(this._firstPT=o={_next:this._firstPT,t:s,p:"setRatio",s:0,c:1,f:!0,n:f,pg:!0,pr:s._priority},h=s._overwriteProps.length;--h>-1;)i[s._overwriteProps[h]]=this._firstPT;(s._priority||s._onInitAllProps)&&(c=!0);(s._onDisable||s._onEnable)&&(this._notifyPluginsOfEnabled=!0)}else this._firstPT=i[f]=o={_next:this._firstPT,t:t,p:f,f:"function"==typeof t[f],n:f,pg:!1,pr:0},o.s=o.f?t[f.indexOf("set")||"function"!=typeof t["get"+f.substr(3)]?f:"get"+f.substr(3)]():parseFloat(t[f]),o.c="string"==typeof e&&"="===e.charAt(1)?parseInt(e.charAt(0)+"1",10)*Number(e.substr(2)):Number(e)-o.s||0;o&&o._next&&(o._next._prev=o)}return u&&this._kill(u,t)?this._initProps(t,i,r,u):this._overwrite>1&&this._firstPT&&r.length>1&&bt(t,this,i,this._overwrite,r)?(this._kill(i,t),this._initProps(t,i,r,u)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(yt[t._gsTweenID]=!0),c)},i.render=function(n,t,i){var h,s,u,v,c=this._time,f=this._duration,o=this._rawPrevTime;if(n>=f)this._totalTime=this._time=f,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(h=!0,s="onComplete",i=i||this._timeline.autoRemoveChildren),0===f&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(n=0),(0===n||0>o||o===e&&"isPause"!==this.data)&&o!==n&&(i=!0,o>e&&(s="onReverseComplete")),this._rawPrevTime=v=!t||n||o===n?n:e);else if(1e-7>n)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==c||0===f&&o>0)&&(s="onReverseComplete",h=this._reversed),0>n&&(this._active=!1,0===f&&(this._initted||!this.vars.lazy||i)&&(o>=0&&(o!==e||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=v=!t||n||o===n?n:e)),this._initted||(i=!0);else if(this._totalTime=this._time=n,this._easeType){var r=n/f,l=this._easeType,a=this._easePower;(1===l||3===l&&r>=.5)&&(r=1-r);3===l&&(r*=2);1===a?r*=r:2===a?r*=r*r:3===a?r*=r*r*r:4===a&&(r*=r*r*r*r);this.ratio=1===l?1-r:2===l?r:.5>n/f?r/2:1-r/2}else this.ratio=this._ease.getRatio(n/f);if(this._time!==c||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=c,this._rawPrevTime=o,y.push(this),this._lazy=[n,t],void 0;this._time&&!h?this.ratio=this._ease.getRatio(this._time/f):h&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==c&&n>=0&&(this._active=!0),0===c&&(this._startAt&&(n>=0?this._startAt.render(n,t,i):s||(s="_dummyGS")),this.vars.onStart&&(0!==this._time||0===f)&&(t||this._callback("onStart"))),u=this._firstPT;u;)u.f?u.t[u.p](u.c*this.ratio+u.s):u.t[u.p]=u.c*this.ratio+u.s,u=u._next;this._onUpdate&&(0>n&&this._startAt&&n!==-.0001&&this._startAt.render(n,t,i),t||(this._time!==c||h)&&this._callback("onUpdate"));s&&(!this._gc||i)&&(0>n&&this._startAt&&!this._onUpdate&&n!==-.0001&&this._startAt.render(n,t,i),h&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[s]&&this._callback(s),0===f&&this._rawPrevTime===e&&v!==e&&(this._rawPrevTime=0))}},i._kill=function(n,t,i){if("all"===n&&(n=null),null==n&&(null==t||t===this.target))return this._lazy=!1,this._enabled(!1,!1);t="string"!=typeof t?t||this._targets||this.target:r.selector(t)||t;var f,s,o,u,e,c,l,a,h,v=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((d(t)||vt(t))&&"number"!=typeof t[0])for(f=t.length;--f>-1;)this._kill(n,t[f],i)&&(c=!0);else{if(this._targets){for(f=this._targets.length;--f>-1;)if(t===this._targets[f]){e=this._propLookup[f]||{};this._overwrittenProps=this._overwrittenProps||[];s=this._overwrittenProps[f]=n?this._overwrittenProps[f]||{}:"all";break}}else{if(t!==this.target)return!1;e=this._propLookup;s=this._overwrittenProps=n?this._overwrittenProps||{}:"all"}if(e){if(l=n||e,a=n!==s&&"all"!==s&&n!==e&&("object"!=typeof n||!n._tempKill),i&&(r.onOverwrite||this.vars.onOverwrite)){for(o in l)e[o]&&(h||(h=[]),h.push(o));if((h||!n)&&!ui(this,i,t,h))return!1}for(o in l)(u=e[o])&&(v&&(u.f?u.t[u.p](u.s):u.t[u.p]=u.s,c=!0),u.pg&&u.t._kill(l)&&(c=!0),u.pg&&0!==u.t._overwriteProps.length||(u._prev?u._prev._next=u._next:u===this._firstPT&&(this._firstPT=u._next),u._next&&(u._next._prev=u._prev),u._next=u._prev=null),delete e[o]),a&&(s[o]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return c},i.invalidate=function(){return this._notifyPluginsOfEnabled&&r._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],o.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-e,this.render(-this._delay)),this},i._enabled=function(n,t){if(h||u.wake(),n&&this._gc){var i,f=this._targets;if(f)for(i=f.length;--i>-1;)this._siblings[i]=et(f[i],this,!0);else this._siblings=et(this.target,this,!0)}return o.prototype._enabled.call(this,n,t),this._notifyPluginsOfEnabled&&this._firstPT?r._onPluginEvent(n?"_onEnable":"_onDisable",this):!1},r.to=function(n,t,i){return new r(n,t,i)},r.from=function(n,t,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new r(n,t,i)},r.fromTo=function(n,t,i,u){return u.startAt=i,u.immediateRender=0!=u.immediateRender&&0!=i.immediateRender,new r(n,t,u)},r.delayedCall=function(n,t,i,u,f){return new r(t,0,{delay:n,onComplete:t,onCompleteParams:i,callbackScope:u,onReverseComplete:t,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:f,overwrite:0})},r.set=function(n,t){return new r(n,0,t)},r.getTweensOf=function(n,t){if(null==n)return[];n="string"!=typeof n?n:r.selector(n)||n;var i,u,f,e;if((d(n)||vt(n))&&"number"!=typeof n[0]){for(i=n.length,u=[];--i>-1;)u=u.concat(r.getTweensOf(n[i],t));for(i=u.length;--i>-1;)for(e=u[i],f=i;--f>-1;)e===u[f]&&u.splice(i,1)}else for(u=et(n).concat(),i=u.length;--i>-1;)(u[i]._gc||t&&!u[i].isActive())&&u.splice(i,1);return u},r.killTweensOf=r.killDelayedCallsTo=function(n,t,i){"object"==typeof t&&(i=t,t=!1);for(var u=r.getTweensOf(n,t),f=u.length;--f>-1;)u[f]._kill(i,n)},c=l("plugins.TweenPlugin",function(n,t){this._overwriteProps=(n||"").split(",");this._propName=this._overwriteProps[0];this._priority=t||0;this._super=c.prototype},!0),i=c.prototype,c.version="1.10.1",c.API=2,i._firstPT=null,i._addTween=function(n,t,i,r,u,f){var o,e;if(null!=r&&(o="number"==typeof r||"="!==r.charAt(1)?Number(r)-Number(i):parseInt(r.charAt(0)+"1",10)*Number(r.substr(2))))return(this._firstPT=e={_next:this._firstPT,t:n,p:t,s:i,c:o,f:"function"==typeof n[t],n:u||t,r:f},e._next&&(e._next._prev=e),e)},i.setRatio=function(n){for(var i,t=this._firstPT,r=1e-6;t;)i=t.c*n+t.s,t.r?i=Math.round(i):r>i&&i>-r&&(i=0),t.f?t.t[t.p](i):t.t[t.p]=i,t=t._next},i._kill=function(n){var i,r=this._overwriteProps,t=this._firstPT;if(null!=n[this._propName])this._overwriteProps=[];else for(i=r.length;--i>-1;)null!=n[r[i]]&&r.splice(i,1);for(;t;)null!=n[t.n]&&(t._next&&(t._next._prev=t._prev),t._prev?(t._prev._next=t._next,t._prev=null):this._firstPT===t&&(this._firstPT=t._next)),t=t._next;return!1},i._roundProps=function(n,t){for(var i=this._firstPT;i;)(n[this._propName]||null!=i.n&&n[i.n.split(this._propName+"_").join("")])&&(i.r=t),i=i._next},r._onPluginEvent=function(n,t){var f,r,u,e,o,i=t._firstPT;if("_onInitAllProps"===n){for(;i;){for(o=i._next,r=u;r&&r.pr>i.pr;)r=r._next;(i._prev=r?r._prev:e)?i._prev._next=i:u=i;(i._next=r)?r._prev=i:e=i;i=o}i=t._firstPT=u}for(;i;)i.pg&&"function"==typeof i.t[n]&&i.t[n]()&&(f=!0),i=i._next;return f},c.activate=function(n){for(var t=n.length;--t>-1;)n[t].API===c.API&&(w[(new n[t])._propName]=n[t]);return!0},st.plugin=function(n){if(!(n&&n.propName&&n.init&&n.API))throw"illegal plugin definition.";var i,r=n.propName,e=n.priority||0,o=n.overwriteProps,u={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},t=l("plugins."+r.charAt(0).toUpperCase()+r.substr(1)+"Plugin",function(){c.call(this,r,e);this._overwriteProps=o||[]},n.global===!0),f=t.prototype=new c(r);f.constructor=t;t.API=n.API;for(i in u)"function"==typeof n[i]&&(f[u[i]]=n[i]);return t.version=n.version,c.activate([t]),t},s=n._gsQueue){for(f=0;s.length>f;f++)s[f]();for(i in g)g[i].func||n.console.log("GSAP encountered missing dependency: com.greensock."+i)}h=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenLite");bet365=bet365||{};bet365.cmsCore=bet365.cmsCore||{};bet365.cmsCore.sessionPoller=bet365.cmsCore.sessionPoller||{};bet365.cmsCore.sessionPoller.start=function(n){"use strict";var t=function(){bet365.cmsCore.Session.LogOut()},i=function(n){bet365.cmsCore.RealityCheck.ResetRealityCheck(n)},r=bet365.cmsCore.getPageAttributes(n),u=new bet365.cmsCore.sessionPoller.Poller(n,r,t,i);u.loop()};bet365.cmsCore.sessionPoller.Poller=bet365.cmsCore.sessionPoller.Poller||function(n,t,i,r,u){"use strict";var e=this,o=!1,s=!1,f=0,h=0,c=!1;return this.getSessionData=function(){h++;n.ajax({type:"GET",dataType:"json",url:t.appPath+"RealityCheck/PollSessionState",async:!1,success:function(n){e.updatePage(n);u&&u(n)}})},this.isCoolOffDiaglogVisible=function(){var t=n(".realitycheck .cooloff-message-container");return t.length>0&&t.is(":visible")},e.updatePage=function(n){n.T<0?(s&&(e.isCoolOffDiaglogVisible()||i()),o=!1):n.T===0?(c=!0,s=!0,e.calculatePollInterval(h),o=f>0?!0:!1):(f=n.T,s=!0,o=!0,h=0,c&&(c=!1,r(f)))},e.calculatePollInterval=function(n){switch(!0){case n<11:f=2e3;break;case n<21:f=5e3;break;case n<31:f=1e4;break;case n<41:f=6e4;break;default:f=-1}},{loop:function(){var n=this;setTimeout(function(){e.getSessionData();o&&n.loop()},f)}}};$(document).ready(function(){var n=n||{};n.cmsCore=n.cmsCore||{};n.cmsCore.footer=function(){$(".back-to-top").click(function(n){n.preventDefault();$("html, body").scrollTop(0)})}()});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({R: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.R+'"]'),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)}}},function(n,t,i){function u(n,i){this.wrapper=typeof n=="string"?t.querySelector(n):n;this.scroller=this.wrapper.children[0];this.scrollerStyle=this.scroller.style;this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!1,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},eventPassthrough:"vertical",disablePointer:!0,HWCompositing:!0,useTransition:!0,useTransform:!0};for(var u in i)this.options[u]=i[u];this.translateZ=this.options.HWCompositing&&r.hasPerspective?" translateZ(0)":"";this.options.useTransition=r.hasTransition&&this.options.useTransition;this.options.useTransform=r.hasTransform&&this.options.useTransform;this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough;this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault;this.options.scrollY=this.options.eventPassthrough=="vertical"?!1:this.options.scrollY;this.options.scrollX=this.options.eventPassthrough=="horizontal"?!1:this.options.scrollX;this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough;this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold;this.options.bounceEasing=typeof this.options.bounceEasing=="string"?r.ease[this.options.bounceEasing]||r.ease.circular:this.options.bounceEasing;this.options.resizePolling=this.options.resizePolling===undefined?60:this.options.resizePolling;this.options.tap===!0&&(this.options.tap="tap");this.options.shrinkScrollbars=="scale"&&(this.options.useTransition=!1);this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1;this.x=0;this.y=0;this.directionX=0;this.directionY=0;this._events={};this._init();this.refresh();this.scrollTo(this.options.startX,this.options.startY);this.enable()}function f(n,i,r){var u=t.createElement("div"),f=t.createElement("div");return r===!0&&(u.style.cssText="position:absolute;z-index:9999",f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),f.className="iScrollIndicator",n=="h"?(r===!0&&(u.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",f.style.height="100%"),u.className="iScrollHorizontalScrollbar"):(r===!0&&(u.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",f.style.width="100%"),u.className="iScrollVerticalScrollbar"),u.style.cssText+=";overflow:hidden",i||(u.style.pointerEvents="none"),u.appendChild(f),u}function e(i,u){this.wrapper=typeof u.el=="string"?t.querySelector(u.el):u.el;this.wrapperStyle=this.wrapper.style;this.indicator=this.wrapper.children[0];this.indicatorStyle=this.indicator.style;this.scroller=i;this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var f in u)this.options[f]=u[f];this.sizeRatioX=1;this.sizeRatioY=1;this.maxPosX=0;this.maxPosY=0;this.options.interactive&&(this.options.disableTouch||(r.addEvent(this.indicator,"touchstart",this),r.addEvent(n,"touchend",this)),this.options.disablePointer||(r.addEvent(this.indicator,r.prefixPointerEvent("pointerdown"),this),r.addEvent(n,r.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(r.addEvent(this.indicator,"mousedown",this),r.addEvent(n,"mouseup",this)));this.options.fade&&(this.wrapperStyle[r.style.transform]=this.scroller.translateZ,this.wrapperStyle[r.style.transitionDuration]=r.isBadAndroid?"0.001s":"0ms",this.wrapperStyle.opacity="0")}var o=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(t){n.setTimeout(t,1e3/60)},r=function(){function u(n){return e===!1?!1:e===""?n:e+n.charAt(0).toUpperCase()+n.substr(1)}var r={},f=t.createElement("div").style,e=function(){for(var t=["t","webkitT","MozT","msT","OT"],i,n=0,r=t.length;n<r;n++)if(i=t[n]+"ransform",i in f)return t[n].substr(0,t[n].length-1);return!1}(),o;return r.getTime=Date.now||function(){return(new Date).getTime()},r.extend=function(n,t){for(var i in t)n[i]=t[i]},r.addEvent=function(n,t,i,r){n.addEventListener(t,i,!!r)},r.removeEvent=function(n,t,i,r){n.removeEventListener(t,i,!!r)},r.prefixPointerEvent=function(t){return n.MSPointerEvent?"MSPointer"+t.charAt(9).toUpperCase()+t.substr(10):t},r.momentum=function(n,t,r,u,f,e){var h=n-t,s=i.abs(h)/r,o,c;return e=e===undefined?.0006:e,o=n+s*s/(2*e)*(h<0?-1:1),c=s/e,o<u?(o=f?u-f/2.5*(s/8):u,h=i.abs(o-n),c=h/s):o>0&&(o=f?f/2.5*(s/8):0,h=i.abs(n)+o,c=h/s),{destination:i.round(o),duration:c}},o=u("transform"),r.extend(r,{hasTransform:o!==!1,hasPerspective:u("perspective")in f,hasTouch:"ontouchstart"in n,hasPointer:n.PointerEvent||n.MSPointerEvent,hasTransition:u("transition")in f}),r.isBadAndroid=/Android /.test(n.navigator.appVersion)&&!/Chrome\/\d/.test(n.navigator.appVersion),r.extend(r.style={},{transform:o,transitionTimingFunction:u("transitionTimingFunction"),transitionDuration:u("transitionDuration"),transitionDelay:u("transitionDelay"),transformOrigin:u("transformOrigin")}),r.hasClass=function(n,t){var i=new RegExp("(^|\\s)"+t+"(\\s|$)");return i.test(n.className)},r.addClass=function(n,t){if(!r.hasClass(n,t)){var i=n.className.split(" ");i.push(t);n.className=i.join(" ")}},r.removeClass=function(n,t){if(r.hasClass(n,t)){var i=new RegExp("(^|\\s)"+t+"(\\s|$)","g");n.className=n.className.replace(i," ")}},r.offset=function(n){for(var t=-n.offsetLeft,i=-n.offsetTop;n=n.offsetParent;)t-=n.offsetLeft,i-=n.offsetTop;return{left:t,top:i}},r.preventDefaultException=function(n,t){for(var i in t)if(t[i].test(n[i]))return!0;return!1},r.extend(r.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),r.extend(r.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(n){return n*(2-n)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(n){return i.sqrt(1- --n*n)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(n){var t=4;return(n=n-1)*n*((t+1)*n+t)+1}},bounce:{style:"",fn:function(n){return(n/=1)<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}},elastic:{style:"",fn:function(n){var t=.22;return n===0?0:n==1?1:.4*i.pow(2,-10*n)*i.sin((n-t/4)*2*i.PI/t)+1}}}),r.tap=function(n,i){var r=t.createEvent("Event");r.initEvent(i,!0,!0);r.pageX=n.pageX;r.pageY=n.pageY;n.target.dispatchEvent(r)},r.click=function(n){var i=n.target,r;/(SELECT|INPUT|TEXTAREA)/i.test(i.tagName)||(r=t.createEvent("MouseEvents"),r.initMouseEvent("click",!0,!0,n.view,1,i.screenX,i.screenY,i.clientX,i.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,0,null),r._constructed=!0,i.dispatchEvent(r))},r}();u.prototype={version:"5.1.3",_init:function(){this._initEvents();(this.options.scrollbars||this.options.indicators)&&this._initIndicators();this.options.mouseWheel&&this._initWheel();this.options.snap&&this._initSnap();this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0);this._execEvent("destroy")},_transitionEnd:function(n){n.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(n){if((r.eventType[n.type]==1||n.button===0)&&this.enabled&&(!this.initiated||r.eventType[n.type]===this.initiated)){!this.options.preventDefault||r.isBadAndroid||r.preventDefaultException(n.target,this.options.preventDefaultException)||n.preventDefault();var u=n.touches?n.touches[0]:n,t;this.initiated=r.eventType[n.type];this.moved=!1;this.distX=0;this.distY=0;this.directionX=0;this.directionY=0;this.directionLocked=0;this._transitionTime();this.startTime=r.getTime();this.options.useTransition&&this.isInTransition?(this.isInTransition=!1,t=this.getComputedPosition(),this._translate(i.round(t.x),i.round(t.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd"));this.startX=this.x;this.startY=this.y;this.absStartX=this.x;this.absStartY=this.y;this.pointX=u.pageX;this.pointY=u.pageY;this._execEvent("beforeScrollStart")}},_move:function(n){if(this.enabled&&r.eventType[n.type]===this.initiated){this.options.preventDefault&&n.preventDefault();var o=n.touches?n.touches[0]:n,t=o.pageX-this.pointX,u=o.pageY-this.pointY,c=r.getTime(),f,e,s,h;if(this.pointX=o.pageX,this.pointY=o.pageY,this.distX+=t,this.distY+=u,s=i.abs(this.distX),h=i.abs(this.distY),!(c-this.endTime>300)||!(s<10)||!(h<10)){if(this.directionLocked||this.options.freeScroll||(this.directionLocked=s>h+this.options.directionLockThreshold?"h":h>=s+this.options.directionLockThreshold?"v":"n"),this.directionLocked=="h"){if(this.options.eventPassthrough=="vertical")n.preventDefault();else if(this.options.eventPassthrough=="horizontal"){this.initiated=!1;return}u=0}else if(this.directionLocked=="v"){if(this.options.eventPassthrough=="horizontal")n.preventDefault();else if(this.options.eventPassthrough=="vertical"){this.initiated=!1;return}t=0}t=this.hasHorizontalScroll?t:0;u=this.hasVerticalScroll?u:0;f=this.x+t;e=this.y+u;(f>0||f<this.maxScrollX)&&(f=this.options.bounce?this.x+t/3:f>0?0:this.maxScrollX);(e>0||e<this.maxScrollY)&&(e=this.options.bounce?this.y+u/3:e>0?0:this.maxScrollY);this.directionX=t>0?-1:t<0?1:0;this.directionY=u>0?-1:u<0?1:0;this.moved||this._execEvent("scrollStart");this.moved=!0;this._translate(f,e);c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y)}}},_end:function(n){var f;if(this.enabled&&r.eventType[n.type]===this.initiated){this.options.preventDefault&&!r.preventDefaultException(n.target,this.options.preventDefaultException)&&n.preventDefault();var v=n.changedTouches?n.changedTouches[0]:n,o,s,e=r.getTime()-this.startTime,t=i.round(this.x),u=i.round(this.y),l=i.abs(t-this.startX),a=i.abs(u-this.startY),h=0,c="";if(this.isInTransition=0,this.initiated=0,this.endTime=r.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(t,u),!this.moved){this.options.tap&&r.tap(n,this.options.tap);this.options.click&&r.click(n);this._execEvent("scrollCancel");return}if(this._events.flick&&e<200&&l<100&&a<100){this._execEvent("flick");return}if(this.options.momentum&&e<300&&(o=this.hasHorizontalScroll?r.momentum(this.x,this.startX,e,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:t,duration:0},s=this.hasVerticalScroll?r.momentum(this.y,this.startY,e,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:u,duration:0},t=o.destination,u=s.destination,h=i.max(o.duration,s.duration),this.isInTransition=1),this.options.snap&&(f=this._nearestSnap(t,u),this.currentPage=f,h=this.options.snapSpeed||i.max(i.max(i.min(i.abs(t-f.x),1e3),i.min(i.abs(u-f.y),1e3)),300),t=f.x,u=f.y,this.directionX=0,this.directionY=0,c=this.options.bounceEasing),t!=this.x||u!=this.y){(t>0||t<this.maxScrollX||u>0||u<this.maxScrollY)&&(c=r.ease.quadratic);this.scrollTo(t,u,h,c);return}this._execEvent("scrollEnd")}}},_resize:function(){var n=this;clearTimeout(this.resizeTimeout);this.resizeTimeout=setTimeout(function(){n.refresh()},this.options.resizePolling)},resetPosition:function(n){var t=this.x,i=this.y;return(n=n||0,!this.hasHorizontalScroll||this.x>0?t=0:this.x<this.maxScrollX&&(t=this.maxScrollX),!this.hasVerticalScroll||this.y>0?i=0:this.y<this.maxScrollY&&(i=this.maxScrollY),t==this.x&&i==this.y)?!1:(this.scrollTo(t,i,n,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){var n=this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth;this.wrapperHeight=this.wrapper.clientHeight;this.scrollerWidth=this.scroller.offsetWidth;this.scrollerHeight=this.scroller.offsetHeight;this.maxScrollX=this.wrapperWidth-this.scrollerWidth;this.maxScrollY=this.wrapperHeight-this.scrollerHeight;this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0;this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0;this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth);this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight);this.endTime=0;this.directionX=0;this.directionY=0;this.wrapperOffset=r.offset(this.wrapper);this._execEvent("refresh");this.resetPosition()},on:function(n,t){this._events[n]||(this._events[n]=[]);this._events[n].push(t)},off:function(n,t){if(this._events[n]){var i=this._events[n].indexOf(t);i>-1&&this._events[n].splice(i,1)}},_execEvent:function(n){if(this._events[n]){var t=0,i=this._events[n].length;if(i)for(;t<i;t++)this._events[n][t].apply(this,[].slice.call(arguments,1))}},scrollBy:function(n,t,i,r){n=this.x+n;t=this.y+t;i=i||0;this.scrollTo(n,t,i,r)},scrollTo:function(n,t,i,u){u=u||r.ease.circular;this.isInTransition=this.options.useTransition&&i>0;!i||this.options.useTransition&&u.style?(this._transitionTimingFunction(u.style),this._transitionTime(i),this._translate(n,t)):this._animate(n,t,i,u.fn)},scrollToElement:function(n,t,u,f,e){if(n=n.nodeType?n:this.scroller.querySelector(n),n){var o=r.offset(n);o.left-=this.wrapperOffset.left;o.top-=this.wrapperOffset.top;u===!0&&(u=i.round(n.offsetWidth/2-this.wrapper.offsetWidth/2));f===!0&&(f=i.round(n.offsetHeight/2-this.wrapper.offsetHeight/2));o.left-=u||0;o.top-=f||0;o.left=o.left>0?0:o.left<this.maxScrollX?this.maxScrollX:o.left;o.top=o.top>0?0:o.top<this.maxScrollY?this.maxScrollY:o.top;t=t===undefined||t===null||t==="auto"?i.max(i.abs(this.x-o.left),i.abs(this.y-o.top)):t;this.scrollTo(o.left,o.top,t,e)}},_transitionTime:function(n){if(n=n||0,this.scrollerStyle[r.style.transitionDuration]=n+"ms",!n&&r.isBadAndroid&&(this.scrollerStyle[r.style.transitionDuration]="0.001s"),this.indicators)for(var t=this.indicators.length;t--;)this.indicators[t].transitionTime(n)},_transitionTimingFunction:function(n){if(this.scrollerStyle[r.style.transitionTimingFunction]=n,this.indicators)for(var t=this.indicators.length;t--;)this.indicators[t].transitionTimingFunction(n)},_translate:function(n,t){if(this.options.useTransform?this.scrollerStyle[r.style.transform]="translate("+n+"px,"+t+"px)"+this.translateZ:(n=i.round(n),t=i.round(t),this.scrollerStyle.left=n+"px",this.scrollerStyle.top=t+"px"),this.x=n,this.y=t,this.indicators)for(var u=this.indicators.length;u--;)this.indicators[u].updatePosition()},_initEvents:function(t){var i=t?r.removeEvent:r.addEvent,u=this.options.bindToWrapper?this.wrapper:n;i(n,"orientationchange",this);i(n,"resize",this);this.options.click&&i(this.wrapper,"click",this,!0);this.options.disableMouse||(i(this.wrapper,"mousedown",this),i(u,"mousemove",this),i(u,"mousecancel",this),i(u,"mouseup",this));r.hasPointer&&!this.options.disablePointer&&(i(this.wrapper,r.prefixPointerEvent("pointerdown"),this),i(u,r.prefixPointerEvent("pointermove"),this),i(u,r.prefixPointerEvent("pointercancel"),this),i(u,r.prefixPointerEvent("pointerup"),this));r.hasTouch&&!this.options.disableTouch&&(i(this.wrapper,"touchstart",this),i(u,"touchmove",this),i(u,"touchcancel",this),i(u,"touchend",this));i(this.scroller,"transitionend",this);i(this.scroller,"webkitTransitionEnd",this);i(this.scroller,"oTransitionEnd",this);i(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var t=n.getComputedStyle(this.scroller,null),i,u;return this.options.useTransform?(t=t[r.style.transform].split(")")[0].split(", "),i=+(t[12]||t[4]),u=+(t[13]||t[5])):(i=+t.left.replace(/[^-\d.]/g,""),u=+t.top.replace(/[^-\d.]/g,"")),{x:i,y:u}},_initIndicators:function(){function i(n){for(var t=s.indicators.length;t--;)n.call(s.indicators[t])}var r=this.options.interactiveScrollbars,o=typeof this.options.scrollbars!="string",n=[],t,s=this,u;for(this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(t={el:f("v",r,this.options.scrollbars),interactive:r,defaultScrollbars:!0,customStyle:o,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(t.el),n.push(t)),this.options.scrollX&&(t={el:f("h",r,this.options.scrollbars),interactive:r,defaultScrollbars:!0,customStyle:o,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(t.el),n.push(t))),this.options.indicators&&(n=n.concat(this.options.indicators)),u=n.length;u--;)this.indicators.push(new e(this,n[u]));if(this.options.fadeScrollbars){this.on("scrollEnd",function(){i(function(){this.fade()})});this.on("scrollCancel",function(){i(function(){this.fade()})});this.on("scrollStart",function(){i(function(){this.fade(1)})});this.on("beforeScrollStart",function(){i(function(){this.fade(1,!0)})})}this.on("refresh",function(){i(function(){this.refresh()})});this.on("destroy",function(){i(function(){this.destroy()});delete this.indicators})},_initWheel:function(){r.addEvent(this.wrapper,"wheel",this);r.addEvent(this.wrapper,"mousewheel",this);r.addEvent(this.wrapper,"DOMMouseScroll",this);this.on("destroy",function(){r.removeEvent(this.wrapper,"wheel",this);r.removeEvent(this.wrapper,"mousewheel",this);r.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(n){if(this.enabled){n.preventDefault();n.stopPropagation();var r,t,u,f,e=this;if(this.wheelTimeout===undefined&&e._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){e._execEvent("scrollEnd");e.wheelTimeout=undefined},400),"deltaX"in n)n.deltaMode===1?(r=-n.deltaX*this.options.mouseWheelSpeed,t=-n.deltaY*this.options.mouseWheelSpeed):(r=-n.deltaX,t=-n.deltaY);else if("wheelDeltaX"in n)r=n.wheelDeltaX/120*this.options.mouseWheelSpeed,t=n.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in n)r=t=n.wheelDelta/120*this.options.mouseWheelSpeed;else if("detail"in n)r=t=-n.detail/3*this.options.mouseWheelSpeed;else return;if(r*=this.options.invertWheelDirection,t*=this.options.invertWheelDirection,this.hasVerticalScroll||(r=t,t=0),this.options.snap){u=this.currentPage.pageX;f=this.currentPage.pageY;r>0?u--:r<0&&u++;t>0?f--:t<0&&f++;this.goToPage(u,f);return}u=this.x+i.round(this.hasHorizontalScroll?r:0);f=this.y+i.round(this.hasVerticalScroll?t:0);u>0?u=0:u<this.maxScrollX&&(u=this.maxScrollX);f>0?f=0:f<this.maxScrollY&&(f=this.maxScrollY);this.scrollTo(u,f,0)}},_initSnap:function(){this.currentPage={};typeof this.options.snap=="string"&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap));this.on("refresh",function(){var n=0,f,e=0,h,o,s,r=0,u,c=this.options.snapStepX||this.wrapperWidth,l=this.options.snapStepY||this.wrapperHeight,t;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(this.options.snap===!0)for(o=i.round(c/2),s=i.round(l/2);r>-this.scrollerWidth;){for(this.pages[n]=[],f=0,u=0;u>-this.scrollerHeight;)this.pages[n][f]={x:i.max(r,this.maxScrollX),y:i.max(u,this.maxScrollY),width:c,height:l,cx:r-o,cy:u-s},u-=l,f++;r-=c;n++}else for(t=this.options.snap,f=t.length,h=-1;n<f;n++)(n===0||t[n].offsetLeft<=t[n-1].offsetLeft)&&(e=0,h++),this.pages[e]||(this.pages[e]=[]),r=i.max(-t[n].offsetLeft,this.maxScrollX),u=i.max(-t[n].offsetTop,this.maxScrollY),o=r-i.round(t[n].offsetWidth/2),s=u-i.round(t[n].offsetHeight/2),this.pages[e][h]={x:r,y:u,width:t[n].offsetWidth,height:t[n].offsetHeight,cx:o,cy:s},r>this.maxScrollX&&e++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0);this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=i.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=i.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}});this.on("flick",function(){var n=this.options.snapSpeed||i.max(i.max(i.min(i.abs(this.x-this.startX),1e3),i.min(i.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,n)})},_nearestSnap:function(n,t){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var r=0,f=this.pages.length,u=0;if(i.abs(n-this.absStartX)<this.snapThresholdX&&i.abs(t-this.absStartY)<this.snapThresholdY)return this.currentPage;for(n>0?n=0:n<this.maxScrollX&&(n=this.maxScrollX),t>0?t=0:t<this.maxScrollY&&(t=this.maxScrollY);r<f;r++)if(n>=this.pages[r][0].cx){n=this.pages[r][0].x;break}for(f=this.pages[r].length;u<f;u++)if(t>=this.pages[0][u].cy){t=this.pages[0][u].y;break}return r==this.currentPage.pageX&&(r+=this.directionX,r<0?r=0:r>=this.pages.length&&(r=this.pages.length-1),n=this.pages[r][0].x),u==this.currentPage.pageY&&(u+=this.directionY,u<0?u=0:u>=this.pages[0].length&&(u=this.pages[0].length-1),t=this.pages[0][u].y),{x:n,y:t,pageX:r,pageY:u}},goToPage:function(n,t,r,u){u=u||this.options.bounceEasing;n>=this.pages.length?n=this.pages.length-1:n<0&&(n=0);t>=this.pages[n].length?t=this.pages[n].length-1:t<0&&(t=0);var f=this.pages[n][t].x,e=this.pages[n][t].y;r=r===undefined?this.options.snapSpeed||i.max(i.max(i.min(i.abs(f-this.x),1e3),i.min(i.abs(e-this.y),1e3)),300):r;this.currentPage={x:f,y:e,pageX:n,pageY:t};this.scrollTo(f,e,r,u)},next:function(n,t){var i=this.currentPage.pageX,r=this.currentPage.pageY;i++;i>=this.pages.length&&this.hasVerticalScroll&&(i=0,r++);this.goToPage(i,r,n,t)},prev:function(n,t){var i=this.currentPage.pageX,r=this.currentPage.pageY;i--;i<0&&this.hasVerticalScroll&&(i=0,r--);this.goToPage(i,r,n,t)},_initKeys:function(){var i={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40},t;if(typeof this.options.keyBindings=="object")for(t in this.options.keyBindings)typeof this.options.keyBindings[t]=="string"&&(this.options.keyBindings[t]=this.options.keyBindings[t].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(t in i)this.options.keyBindings[t]=this.options.keyBindings[t]||i[t];r.addEvent(n,"keydown",this);this.on("destroy",function(){r.removeEvent(n,"keydown",this)})},_key:function(n){if(this.enabled){var t=this.options.snap,u=t?this.currentPage.pageX:this.x,f=t?this.currentPage.pageY:this.y,o=r.getTime(),s=this.keyTime||0,e;this.options.useTransition&&this.isInTransition&&(e=this.getComputedPosition(),this._translate(i.round(e.x),i.round(e.y)),this.isInTransition=!1);this.keyAcceleration=o-s<200?i.min(this.keyAcceleration+.25,50):0;switch(n.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?u+=t?1:this.wrapperWidth:f+=t?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?u-=t?1:this.wrapperWidth:f-=t?1:this.wrapperHeight;break;case this.options.keyBindings.end:u=t?this.pages.length-1:this.maxScrollX;f=t?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:u=0;f=0;break;case this.options.keyBindings.left:u+=t?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:f+=t?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:u-=t?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:f-=t?1:5+this.keyAcceleration>>0;break;default:return}if(t){this.goToPage(u,f);return}u>0?(u=0,this.keyAcceleration=0):u<this.maxScrollX&&(u=this.maxScrollX,this.keyAcceleration=0);f>0?(f=0,this.keyAcceleration=0):f<this.maxScrollY&&(f=this.maxScrollY,this.keyAcceleration=0);this.scrollTo(u,f,0);this.keyTime=o}},_animate:function(n,t,i,u){function c(){var a=r.getTime(),y,p,v;if(a>=l){f.isAnimating=!1;f._translate(n,t);f.resetPosition(f.options.bounceTime)||f._execEvent("scrollEnd");return}a=(a-h)/i;v=u(a);y=(n-e)*v+e;p=(t-s)*v+s;f._translate(y,p);f.isAnimating&&o(c)}var f=this,e=this.x,s=this.y,h=r.getTime(),l=h+i;this.isAnimating=!0;c()},handleEvent:function(n){switch(n.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(n);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(n);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(n);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(n);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(n);break;case"keydown":this._key(n);break;case"click":n._constructed||(n.preventDefault(),n.stopPropagation())}}};e.prototype={handleEvent:function(n){switch(n.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(n);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(n);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(n)}},destroy:function(){this.options.interactive&&(r.removeEvent(this.indicator,"touchstart",this),r.removeEvent(this.indicator,r.prefixPointerEvent("pointerdown"),this),r.removeEvent(this.indicator,"mousedown",this),r.removeEvent(n,"touchmove",this),r.removeEvent(n,r.prefixPointerEvent("pointermove"),this),r.removeEvent(n,"mousemove",this),r.removeEvent(n,"touchend",this),r.removeEvent(n,r.prefixPointerEvent("pointerup"),this),r.removeEvent(n,"mouseup",this));this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var i=t.touches?t.touches[0]:t;t.preventDefault();t.stopPropagation();this.transitionTime();this.initiated=!0;this.moved=!1;this.lastPointX=i.pageX;this.lastPointY=i.pageY;this.startTime=r.getTime();this.options.disableTouch||r.addEvent(n,"touchmove",this);this.options.disablePointer||r.addEvent(n,r.prefixPointerEvent("pointermove"),this);this.options.disableMouse||r.addEvent(n,"mousemove",this);this.scroller._execEvent("beforeScrollStart")},_move:function(n){var t=n.touches?n.touches[0]:n,i,u,f,e,o=r.getTime();this.moved||this.scroller._execEvent("scrollStart");this.moved=!0;i=t.pageX-this.lastPointX;this.lastPointX=t.pageX;u=t.pageY-this.lastPointY;this.lastPointY=t.pageY;f=this.x+i;e=this.y+u;this._pos(f,e);n.preventDefault();n.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),r.removeEvent(n,"touchmove",this),r.removeEvent(n,r.prefixPointerEvent("pointermove"),this),r.removeEvent(n,"mousemove",this),this.scroller.options.snap){var u=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),f=this.options.snapSpeed||i.max(i.max(i.min(i.abs(this.scroller.x-u.x),1e3),i.min(i.abs(this.scroller.y-u.y),1e3)),300);(this.scroller.x!=u.x||this.scroller.y!=u.y)&&(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=u,this.scroller.scrollTo(u.x,u.y,f,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(n){n=n||0;this.indicatorStyle[r.style.transitionDuration]=n+"ms";!n&&r.isBadAndroid&&(this.indicatorStyle[r.style.transitionDuration]="0.001s")},transitionTimingFunction:function(n){this.indicatorStyle[r.style.transitionTimingFunction]=n},refresh:function(){this.transitionTime();this.indicatorStyle.display=this.options.listenX&&!this.options.listenY?this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.scroller.hasVerticalScroll?"block":"none":this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none";this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(r.addClass(this.wrapper,"iScrollBothScrollbars"),r.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(r.removeClass(this.wrapper,"iScrollBothScrollbars"),r.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));var n=this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=i.max(i.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,this.options.shrink=="clip"?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX);this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=i.max(i.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.options.shrink=="clip"?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY);this.updatePosition()},updatePosition:function(){var n=this.options.listenX&&i.round(this.sizeRatioX*this.scroller.x)||0,t=this.options.listenY&&i.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(n<this.minBoundaryX?(this.options.shrink=="scale"&&(this.width=i.max(this.indicatorWidth+n,8),this.indicatorStyle.width=this.width+"px"),n=this.minBoundaryX):n>this.maxBoundaryX?this.options.shrink=="scale"?(this.width=i.max(this.indicatorWidth-(n-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",n=this.maxPosX+this.indicatorWidth-this.width):n=this.maxBoundaryX:this.options.shrink=="scale"&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),t<this.minBoundaryY?(this.options.shrink=="scale"&&(this.height=i.max(this.indicatorHeight+t*3,8),this.indicatorStyle.height=this.height+"px"),t=this.minBoundaryY):t>this.maxBoundaryY?this.options.shrink=="scale"?(this.height=i.max(this.indicatorHeight-(t-this.maxPosY)*3,8),this.indicatorStyle.height=this.height+"px",t=this.maxPosY+this.indicatorHeight-this.height):t=this.maxBoundaryY:this.options.shrink=="scale"&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px"));this.x=n;this.y=t;this.scroller.options.useTransform?this.indicatorStyle[r.style.transform]="translate("+n+"px,"+t+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=n+"px",this.indicatorStyle.top=t+"px")},_pos:function(n,t){n<0?n=0:n>this.maxPosX&&(n=this.maxPosX);t<0?t=0:t>this.maxPosY&&(t=this.maxPosY);n=this.options.listenX?i.round(n/this.sizeRatioX):this.scroller.x;t=this.options.listenY?i.round(t/this.sizeRatioY):this.scroller.y;this.scroller.scrollTo(n,t)},fade:function(n,t){if(!t||this.visible){clearTimeout(this.fadeTimeout);this.fadeTimeout=null;var i=n?250:500,u=n?0:300;n=n?"1":"0";this.wrapperStyle[r.style.transitionDuration]=i+"ms";this.fadeTimeout=setTimeout(function(n){this.wrapperStyle.opacity=n;this.visible=+n}.bind(this,n),u)}}};u.utils=r;typeof module!="undefined"&&module.exports?module.exports=u:n.IScroll=u}(window,document,Math);var bet365=bet365===undefined?{}:bet365,persistantExtraWindow=null,persistantSportsWindow=null,persistantHelpWindow=null,persistantGameWindow=null,persistantBingoWindow=null,persistantCasinoWindow=null,persistantAffWindow=null,persistantChatWindow=null;bet365.Navigation={};bet365.Navigation={PerformNavigation:function(n,t,i,r,u,f,e,o,s,h,c){"use strict";var y,p,w,v,l,a;if(y=!1,c!==null&&c.length>0){p=20;w=0;switch(u){case 4:v="height="+o+",width="+e+",status=yes,toolbar=yes,menubar=yes,location=yes,left="+p+",top="+w+",scrollbars=yes,resizable=yes";break;default:v="height="+o+",width="+e+",status=yes,toolbar=no,menubar=no,location=no,left="+p+",top="+w+",scrollbars=yes,resizable=yes"}if(u===1)window.location=c;else if(u===3)RedirectParentWindow(s,c,e,o);else switch(r){case 2:case 11:case 18:if(r===11?(l=persistantExtraWindow,a="persistantExtraWindow"):i==="MMM"?(l=persistantSportsWindow,a="persistantSportsWindow"):i==="AAA"?(l=persistantAffWindow,a="persistantAffWindow"):i==="CCC"?(l=persistantChatWindow,a="persistantChatWindow"):(l=persistantHelpWindow,a="persistantHelpWindow"),l!==null)try{l.close()}catch(b){}try{l=window.open(c,i,v)}catch(b){l=window.open(c,"_blank",v)}l!==null&&(r===11?persistantExtraWindow=l:i==="MMM"?persistantSportsWindow=l:i==="AAA"?persistantAffWindow=l:i==="CCC"?persistantChatWindow=l:persistantHelpWindow=l,setTimeout(a+".blur(); "+a+".focus();",500));break;case 5:case 6:bet365.games.CheckFlashAvailableAndLaunchGame(h,c,i,o,e,t);break;default:window.open(c,i,v)}}else y=!0;return y}};bet365.cmsCore.CCP=bet365.cmsCore.CCP||{};bet365.cmsCore.CCP={SubmitPromotionalResult:function(n){"use strict";var i,t,r;return i="{ 'result': '"+n+"' }",t="",r=bet365.cmsCore.getPageAttributes($),$.ajax({type:"POST",async:!1,data:i,contentType:"application/json; charset=utf-8",dataType:"json",url:r.appPath+"CustomContentPod/SubmitPromotionalResult",success:function(n){t=n},error:function(){t=!1}}),t},HasPromotionalResult:function(){"use strict";var n,t;return n="",t=bet365.cmsCore.getPageAttributes($),$.ajax({type:"POST",async:!1,contentType:"application/json; charset=utf-8",dataType:"json",url:t.appPath+"CustomContentPod/HasPromotionalResult",success:function(t){n=t},error:function(){n=!1}}),n}};bet365.cmsCore.CCP.Initialise=bet365.cmsCore.CCP.Initialise||{};bet365.cmsCore.CCP.Instances=bet365.cmsCore.CCP.Instances||{};bet365.cmsCore.leaderboards=bet365.cmsCore.leaderboards||{};bet365.cmsCore.leaderboards.poll=function(n,t){"use strict";var i=setInterval(function(){var r=bet365.cmsCore.getPageAttributes($).appPath,u="{ 'contentPath': '"+n+"', 'userName': '"+t+"' }";$.ajax({type:"POST",data:u,contentType:"application/json; charset=utf-8",dataType:"json",url:r+"CustomContentPod/PollLeaderboard",success:function(n){bet365.cmsCore.leaderboards.refreshLeaderboards(n.Leaderboards)},error:function(){clearInterval(i)}})},42e4);return i};bet365.cmsCore.leaderboards.refreshLeaderboards=function(n){for(var t=0;t<n.length;++t)n[t].LData!=null&&n[t].LDataFID!=null&&$("#"+n[t].LDataFID).html(n[t].LData),n[t].LDet!=null&&n[0].LDetFID!=null&&$("#"+n[t].LDetFID).html(n[t].LDet),n[t].TWData!=null&&n[t].TWFID!=null&&$("#"+n[t].TWFID).html(n[t].TWData),n[t].GWData!=null&&n[t].GWFID!=null&&$("#"+n[t].GWFID).html(n[t].GWData),n[t].SurroundingDataData!=null&&n[t].SDFID!=null&&$("#"+n[t].SDFID).html(n[t].SDData)};bet365.cmsCore.CCP=bet365.cmsCore.CCP||{};bet365.cmsCore.CCP.Leaderboards={timers:{},register:function(n,t,i){"use strict";var r=bet365.cmsCore.leaderboards.poll(i,t);bet365.cmsCore.CCP.Leaderboards.timers[n]=r},clear:function(n){"use strict";bet365.cmsCore.CCP.Leaderboards.timers[n]&&(clearInterval(bet365.cmsCore.CCP.Leaderboards.timers[n]),bet365.cmsCore.CCP.Leaderboards.timers[n]=null)}};swfobject=function(){function v(){var i,r,n;if(!c){try{i=t.getElementsByTagName("body")[0].appendChild(h("span"));i.parentNode.removeChild(i)}catch(u){return}for(c=!0,r=w.length,n=0;n<r;n++)w[n]()}}function yt(n){c?n():w[w.length]=n}function pt(n){if(typeof r.addEventListener!=i)r.addEventListener("load",n,!1);else if(typeof t.addEventListener!=i)t.addEventListener("load",n,!1);else if(typeof r.attachEvent!=i)ui(r,"onload",n);else if(typeof r.onload=="function"){var u=r.onload;r.onload=function(){u();n()}}else r.onload=n}function gt(){lt?ni():it()}function ni(){var o=t.getElementsByTagName("body")[0],u=h(f),r,e;u.setAttribute("type",p);r=o.appendChild(u);r?(e=0,function(){if(typeof r.GetVariable!=i){var t=r.GetVariable("$version");t&&(t=t.split(" ")[1].split(","),n.pv=[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)])}else if(e<10){e++;setTimeout(arguments.callee,10);return}o.removeChild(u);r=null;it()}()):it()}function it(){var y=s.length,r,t,h,c,v;if(y>0)for(r=0;r<y;r++){var f=s[r].id,e=s[r].callbackFn,o={success:!1,id:f};if(n.pv[0]>0){if(t=u(f),t)if(!g(s[r].swfVersion)||n.wk&&n.wk<312)if(s[r].expressInstall&&ut()){h={};h.data=s[r].expressInstall;h.width=t.getAttribute("width")||"0";h.height=t.getAttribute("height")||"0";t.getAttribute("class")&&(h.styleclass=t.getAttribute("class"));t.getAttribute("align")&&(h.align=t.getAttribute("align"));var p={},a=t.getElementsByTagName("param"),w=a.length;for(c=0;c<w;c++)a[c].getAttribute("name").toLowerCase()!="movie"&&(p[a[c].getAttribute("name")]=a[c].getAttribute("value"));ft(h,p,f,e)}else ti(t),e&&e(o);else l(f,!0),e&&(o.success=!0,o.ref=rt(f),e(o))}else l(f,!0),e&&(v=rt(f),v&&typeof v.SetVariable!=i&&(o.success=!0,o.ref=v),e(o))}}function rt(n){var r=null,t=u(n),e;return t&&t.nodeName=="OBJECT"&&(typeof t.SetVariable!=i?r=t:(e=t.getElementsByTagName(f)[0],e&&(r=e))),r}function ut(){return!d&&g("6.0.65")&&(n.win||n.mac)&&!(n.wk&&n.wk<312)}function ft(f,e,o,s){var c,v,l,a;d=!0;nt=s||null;at={success:!1,id:o};c=u(o);c&&(c.nodeName=="OBJECT"?(y=et(c),k=null):(y=c,k=o),f.id=ht,(typeof f.width==i||!/%$/.test(f.width)&&parseInt(f.width,10)<310)&&(f.width="310"),(typeof f.height==i||!/%$/.test(f.height)&&parseInt(f.height,10)<137)&&(f.height="137"),t.title=t.title.slice(0,47)+" - Flash Player Installation",v=n.ie&&n.win?"ActiveX":"PlugIn",l="MMredirectURL="+r.location.toString().replace(/&/g,"%26")+"&MMplayerType="+v+"&MMdoctitle="+t.title,typeof e.flashvars!=i?e.flashvars+="&"+l:e.flashvars=l,n.ie&&n.win&&c.readyState!=4&&(a=h("div"),o+="SWFObjectNew",a.setAttribute("id",o),c.parentNode.insertBefore(a,c),c.style.display="none",function(){c.readyState==4?c.parentNode.removeChild(c):setTimeout(arguments.callee,10)}()),ot(f,e,o))}function ti(t){if(n.ie&&n.win&&t.readyState!=4){var i=h("div");t.parentNode.insertBefore(i,t);i.parentNode.replaceChild(et(t),i);t.style.display="none",function(){t.readyState==4?t.parentNode.removeChild(t):setTimeout(arguments.callee,10)}()}else t.parentNode.replaceChild(et(t),t)}function et(t){var u=h("div"),e,i,o,r;if(n.win&&n.ie)u.innerHTML=t.innerHTML;else if(e=t.getElementsByTagName(f)[0],e&&(i=e.childNodes,i))for(o=i.length,r=0;r<o;r++)i[r].nodeType==1&&i[r].nodeName=="PARAM"||i[r].nodeType==8||u.appendChild(i[r].cloneNode(!0));return u}function ot(t,r,e){var v,y=u(e),w,o,k,a,c,s,l;if(n.wk&&n.wk<312)return v;if(y)if(typeof t.id==i&&(t.id=e),n.ie&&n.win){w="";for(o in t)t[o]!=Object.prototype[o]&&(o.toLowerCase()=="data"?r.movie=t[o]:o.toLowerCase()=="styleclass"?w+=' class="'+t[o]+'"':o.toLowerCase()!="classid"&&(w+=" "+o+'="'+t[o]+'"'));k="";for(a in r)r[a]!=Object.prototype[a]&&(k+='<param name="'+a+'" value="'+r[a]+'" />');y.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+w+">"+k+"<\/object>";b[b.length]=t.id;v=u(t.id)}else{c=h(f);c.setAttribute("type",p);for(s in t)t[s]!=Object.prototype[s]&&(s.toLowerCase()=="styleclass"?c.setAttribute("class",t[s]):s.toLowerCase()!="classid"&&c.setAttribute(s,t[s]));for(l in r)r[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&ii(c,l,r[l]);y.parentNode.replaceChild(c,y);v=c}return v}function ii(n,t,i){var r=h("param");r.setAttribute("name",t);r.setAttribute("value",i);n.appendChild(r)}function wt(t){var i=u(t);i&&i.nodeName=="OBJECT"&&(n.ie&&n.win?(i.style.display="none",function(){i.readyState==4?ri(t):setTimeout(arguments.callee,10)}()):i.parentNode.removeChild(i))}function ri(n){var t=u(n),i;if(t){for(i in t)typeof t[i]=="function"&&(t[i]=null);t.parentNode.removeChild(t)}}function u(n){var i=null;try{i=t.getElementById(n)}catch(r){}return i}function h(n){return t.createElement(n)}function ui(n,t,i){n.attachEvent(t,i);a[a.length]=[n,t,i]}function g(t){var r=n.pv,i=t.split(".");return i[0]=parseInt(i[0],10),i[1]=parseInt(i[1],10)||0,i[2]=parseInt(i[2],10)||0,r[0]>i[0]||r[0]==i[0]&&r[1]>i[1]||r[0]==i[0]&&r[1]==i[1]&&r[2]>=i[2]?!0:!1}function bt(r,u,o,s){var a,c,l;n.ie&&n.mac||(a=t.getElementsByTagName("head")[0],a)&&(c=o&&typeof o=="string"?o:"screen",s&&(e=null,tt=null),e&&tt==c||(l=h("style"),l.setAttribute("type","text/css"),l.setAttribute("media",c),e=a.appendChild(l),n.ie&&n.win&&typeof t.styleSheets!=i&&t.styleSheets.length>0&&(e=t.styleSheets[t.styleSheets.length-1]),tt=c),n.ie&&n.win?e&&typeof e.addRule==f&&e.addRule(r,u):e&&typeof t.createTextNode!=i&&e.appendChild(t.createTextNode(r+" {"+u+"}")))}function l(n,t){if(vt){var i=t?"visible":"hidden";c&&u(n)?u(n).style.visibility=i:bt("#"+n,"visibility:"+i)}}function kt(n){var t=/[\\\"<>\.;]/.exec(n)!=null;return t&&typeof encodeURIComponent!=i?encodeURIComponent(n):n}var i="undefined",f="object",st="Shockwave Flash",dt="ShockwaveFlash.ShockwaveFlash",p="application/x-shockwave-flash",ht="SWFObjectExprInst",ct="onreadystatechange",r=window,t=document,o=navigator,lt=!1,w=[gt],s=[],b=[],a=[],y,k,nt,at,c=!1,d=!1,e,tt,vt=!0,n=function(){var l=typeof t.getElementById!=i&&typeof t.getElementsByTagName!=i&&typeof t.createElement!=i,e=o.userAgent.toLowerCase(),s=o.platform.toLowerCase(),a=s?/win/.test(s):/win/.test(e),v=s?/mac/.test(s):/mac/.test(e),y=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,h=!+"\v1",u=[0,0,0],n=null,c;if(typeof o.plugins!=i&&typeof o.plugins[st]==f)n=o.plugins[st].description,!n||typeof o.mimeTypes!=i&&o.mimeTypes[p]&&!o.mimeTypes[p].enabledPlugin||(lt=!0,h=!1,n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),u[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10),u[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10),u[2]=/[a-zA-Z]/.test(n)?parseInt(n.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof r.ActiveXObject!=i)try{c=new ActiveXObject(dt);c&&(n=c.GetVariable("$version"),n&&(h=!0,n=n.split(" ")[1].split(","),u=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]))}catch(w){}return{w3:l,pv:u,wk:y,ie:h,win:a,mac:v}}(),fi=function(){n.w3&&((typeof t.readyState!=i&&t.readyState=="complete"||typeof t.readyState==i&&(t.getElementsByTagName("body")[0]||t.body))&&v(),c||(typeof t.addEventListener!=i&&t.addEventListener("DOMContentLoaded",v,!1),n.ie&&n.win&&(t.attachEvent(ct,function(){t.readyState=="complete"&&(t.detachEvent(ct,arguments.callee),v())}),r==top&&function(){if(!c){try{t.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}v()}}()),n.wk&&function(){if(!c){if(!/loaded|complete/.test(t.readyState)){setTimeout(arguments.callee,0);return}v()}}(),pt(v)))}(),ei=function(){n.ie&&n.win&&window.attachEvent("onunload",function(){for(var r,i,u,f,e=a.length,t=0;t<e;t++)a[t][0].detachEvent(a[t][1],a[t][2]);for(r=b.length,i=0;i<r;i++)wt(b[i]);for(u in n)n[u]=null;n=null;for(f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(t,i,r,u){if(n.w3&&t&&i){var f={};f.id=t;f.swfVersion=i;f.expressInstall=r;f.callbackFn=u;s[s.length]=f;l(t,!1)}else u&&u({success:!1,id:t})},getObjectById:function(t){if(n.w3)return rt(t)},embedSWF:function(t,r,u,e,o,s,h,c,a,v){var y={success:!1,id:r};n.w3&&!(n.wk&&n.wk<312)&&t&&r&&u&&e&&o?(l(r,!1),yt(function(){var n,b,p,k,w,d;if(u+="",e+="",n={},a&&typeof a===f)for(b in a)n[b]=a[b];if(n.data=t,n.width=u,n.height=e,p={},c&&typeof c===f)for(k in c)p[k]=c[k];if(h&&typeof h===f)for(w in h)typeof p.flashvars!=i?p.flashvars+="&"+w+"="+h[w]:p.flashvars=w+"="+h[w];if(g(o))d=ot(n,p,r),n.id==r&&l(r,!0),y.success=!0,y.ref=d;else{if(s&&ut()){n.data=s;ft(n,p,r,v);return}l(r,!0)}v&&v(y)})):v&&v(y)},switchOffAutoHideShow:function(){vt=!1},ua:n,getFlashPlayerVersion:function(){return{major:n.pv[0],minor:n.pv[1],release:n.pv[2]}},hasFlashPlayerVersion:g,createSWF:function(t,i,r){return n.w3?ot(t,i,r):undefined},showExpressInstall:function(t,i,r,u){n.w3&&ut()&&ft(t,i,r,u)},removeSWF:function(t){n.w3&&wt(t)},createCSS:function(t,i,r,u){n.w3&&bt(t,i,r,u)},addDomLoadEvent:yt,addLoadEvent:pt,getQueryParamValue:function(n){var r=t.location.search||t.location.hash,u,i;if(r){if(/\?/.test(r)&&(r=r.split("?")[1]),n==null)return kt(r);for(u=r.split("&"),i=0;i<u.length;i++)if(u[i].substring(0,u[i].indexOf("="))==n)return kt(u[i].substring(u[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(d){var t=u(ht);t&&y&&(t.parentNode.replaceChild(y,t),k&&(l(k,!0),n.ie&&n.win&&(y.style.display="block")),nt&&nt(at));d=!1}}}}();bet365.cmsCore.buttons={ApplyConsistentButtonsWidths:function(n){var t,i,u,r,f;if(n&&n.length>0){for(t=null,i=0;i<n.length;i++)u=$(n[i]),(t==null||u.width()>t.width())&&(t=u);if(t)for(r=0;r<n.length;r++)f=$(n[r]),t[0]!=f[0]&&f.css("width",t.css("width"))}}};bet365.GetBrowser=function(){var n=navigator.userAgent.toLowerCase();return n.indexOf("chrome")!=-1?"CHROME":n.indexOf("opera")!=-1?"OPERA":n.indexOf("netscape")!=-1?n.indexOf("msie")!=-1?"IE":"NETSCAPE":n.indexOf("firefox")!=-1?"FIREFOX":n.indexOf("chrome")!=-1?"CHROME":n.indexOf("safari")!=-1?"SAFARI":n.indexOf("msie 6")!=-1?"IE6":n.indexOf("msie 8.")!=-1?"IE8":n.indexOf("msie 10.")!=-1?"IE10":n.indexOf("trident")!==-1&&n.indexOf("rv:11")!==-1?"IE11":n.indexOf("msie 7")!=-1?"IE7":n.indexOf("msie")!=-1?"IE":"IE*"};bet365.PushMessageFramework=function(){var n;return{set:function(t){n=t},get:function(){return n},isAvailable:function(){return n!=undefined}}}();bet365=bet365||{};bet365.pushMessaging=bet365.pushMessaging||{};bet365.pushMessaging.pushMessenger=function(){function t(t,i,r,u,f){n=new PushMessaging.PushMessagingProxy(t,u,r,f);n.addEventListener(PushMessaging.PushMessageEvent.PUSH_MESSAGE,function(n){i(n.getMessageCollection())})}function i(t){n.setAdditionalData(t)}function r(){return n.getAdditionalData()}function u(t,i){n.setMessageAsRead(t,i)}var n;return{init:t,setAdditionalData:i,setMessageAsRead:u,getAdditionalData:r}}();pmResolver=pmResolver||{};pmResolver.instance=function(){return($("#pmConnObj")[0]==undefined)?bet365.pushMessaging.pushMessenger:$("#pmConnObj")[0]}();PmButtonHandler.prototype.getAction=function(n,t){var i;return n&&n.length>0?(i=n.split("]"),t===undefined||t===!1?i[0]+"]":i.length===2?i[1]:null):"[Close]"};PmButtonHandler.prototype.getActionValue=function(n){return this.getAction(n,!0)};PmButtonHandler.prototype.setupButtonAction=function(n,t,i,r){var f,u=!1;f=this.getAction(i.action);$(t).css("display","");switch(f){case"[Play Now]":case"[Download Now]":case"[Chat Now]":case"[Deposit Now]":this.applyButtonAction(n,t,i,r);u=!0;break;case"[Read Messages]":this.applyButtonAction(n,t,i,r);u=!0;break;case"[Close]":if(isNullOrUndefined(r)){u=!1;break}else{$(t).unbind("click").click(new Function(r+"; return false;"));u=!0;break}case"[More Details]":case"[Go To Game]":case"[Opt In]":u=!1;break;case"[Bet Now]":raiseError("[Bet Now] button action is not supported for CGPB");break;case"[No Button]":$(t).css("display","none");u=!0;break;default:u=this.customAction(t,i,r);$(t).attr("id")=="topBannerLink"&&r&&$(t).click(new Function(r))}return u};PmButtonHandler.prototype.customAction=function(n,t,i){var f=0,r=t.action,u="";return r.indexOf("{")>-1&&r.indexOf("}")&&(u=r.substring(r.indexOf("{")+1,r.length-1),r=r.substring(0,r.indexOf("{")),f=1,u+=u.length>0?", ":"",u+="resizable=yes"),f==1?($(n).attr("target","_pushCustom"),$(n).click(function(event){event.preventDefault();window.open(r,"_pushCustom",u);eval(i)})):$(n).click(function(event){event.preventDefault();eval(i);setTimeout(function(){window.location=r},1e3)}),$(n).attr("href",r),!0};PmButtonHandler.prototype.getButtonHandlerAttribs=function(n){var t={},i,r;return i=this.getAction(n.action),r=this.getActionValue(n.action),$.ajax({type:"POST",url:"{0}{1}ButtonHandler.aspx".format([pmFramework.baseUrl(),pmConfigParams.pushMessagePath]),data:"action="+i+"&actionValue="+escape(r),async:!1,timeout:2e3,dataType:"xml",success:function(n){t.onclick=unescape($(n.documentElement).find("onclick").text());t.href=unescape($(n.documentElement).find("href").text());t.gametoken=$(n.documentElement).find("gametoken").text()},error:function(n){n.status===200?(t.onclick=unescape($(n.responseText).find("onclick").text().toString()),t.href=unescape($(n.responseText).find("href").text().toString()),t.gametoken=$(n.responseText).find("gametoken").text().toString()):t=null}}),t};PmButtonHandler.prototype.applyButtonAction=function(n,t,i,r){var u,h,o,s,f,c,e,gameLaunchService;(o="return false;",f=this.getButtonHandlerAttribs(i),f)&&(u=f.onclick.toString(),h=f.href.toString(),e=f.gametoken.toString(),u.length>0&&($(t)[0].attributes.onclick!==undefined||$(t)[0].attributes.href!==undefined)&&($(t).removeAttr("onclick"),$(t).removeAttr("href")),isNullOrUndefined(r)||(s=u.lastIndexOf(o)>-1?o:"",u=u.replace(s,r+" "+s)),$(t).unbind("click"),c=new Function(u),$(t).click(c),$(t).attr("href",h.toString()),e&&e.length&&this.gameLaunchService&&(gameLaunchService=this.gameLaunchService,$(t).click(function(){return event.preventDefault(),n.promise().done(function(){gameLaunchService.launchGame(e)}),!1})))};ExOvlControl.prototype.doRender=function(n,t,i){this.clearDownControl();this.expOverlayControl.removeClass("Overlay ImportantMessageOverlay").addClass("ExpandableOverlay GraphicalMessageOverlay");var r;if(n.shortText.length!=undefined&&n.shortText.length!=0){if(this.shortGraphicMsg=n,r=pmFramework.getLayoutForPosition(pmFramework.positionId.overlayLong,i),r===null)return pmFramework.renderFailCode;pmFramework.getPushGraphicData(r,i,thisExpControl.onGetPushGraphicData,"longGraphicMsg");pmFramework.renderOverlayBackground(this.expOverlaySelector);this.centreOverlay()}};ExOvlControl.prototype.getExpOverlayElement=function(n){return n!==undefined?$(n,this.expOverlaySelector):this.expOverlayControl};ExOvlControl.prototype.centreOverlay=function(){var i,n,t;i=$(window).width();n=(i-this.expOverlayControl.width())/2;n<0&&(n=0);this.expOverlayControl.css("left",n+"px");this.isShortMsg&&(t=($(window).height()-this.expOverlayControl.height())/2,t<0&&(t=0),this.expOverlayControl.css("top",t+"px"))};ExOvlControl.prototype.clearDownControl=function(){this.clearDownImage();this.getExpOverlayElement("#webMsgCount").remove();$("ul","#bodytext").remove();this.getExpOverlayElement("#ovlOutBord").removeClass("Photo Icon Basic");this.getExpOverlayElement(".baseButton").css("width","")};ExOvlControl.prototype.clearDownImage=function(){this.getExpOverlayElement("#image").attr("src","")};ExOvlControl.prototype.shortToLongMsgAnimation=function(n){var t=this.getExpOverlayElement("#bodyContainer");if(n===1)return t.slideToggle(thisExpControl.overlayFadeDuration),thisExpControl.overlayFadeDuration;n===2&&t.slideDown(thisExpControl.overlayFadeDuration/2)};ExOvlControl.prototype.setupButton=function(n,t){var u,i,f,r;$(n).unbind("click").removeAttr("href");i="$('"+this.expOverlaySelector+"').fadeOut(thisExpControl.overlayFadeDuration, function() {pmFramework.closeMessageAndOverlay($('.ovlMsgAnc'));});";u=this.buttonHandler.setupButtonAction($(this.expOverlaySelector),n,t[n.id],i);!u&&this.isShortMsg&&$(n).click(function(){f=thisExpControl.shortToLongMsgAnimation(1);setTimeout(thisExpControl.showLongMessage,f)});r=$._data(thisExpControl.closeGadget[0],"events");r&&r.click||(thisExpControl.closeGadget.click(new Function(i)),thisExpControl.closeGadget.data("track-id",t.id));$(n).data("track-id",t.id)};ExOvlControl.prototype.showMessage=function(n){this.getExpOverlayElement("#image").attr("src",pmFramework.getMsgImagePath(n.image));this.getExpOverlayElement("#subject").html(n.shortTextH2);this.getExpOverlayElement("#title").html(n.shortTextH1);this.getExpOverlayElement("#bodytext").html(n.longText);this.getExpOverlayElement("#buttons #button1").html(n.button1.text);this.getExpOverlayElement("#buttons #button2").html(n.button2.text);this.getExpOverlayElement("#buttons .baseButton").each(function(){thisExpControl.setupButton(this,n)});this.isShortMsg?(this.centreOverlay(),this.expOverlayControl.fadeIn(thisExpControl.overlayFadeDuration)):thisExpControl.shortToLongMsgAnimation(2)};ExOvlControl.prototype.showLongMessage=function(){thisExpControl.isShortMsg=!1;thisExpControl.showMessage(thisExpControl.longGraphicMsg)};ExOvlControl.prototype.onGetPushGraphicData=function(n){n.graphicMsg!==undefined?(thisExpControl[n.callbackContextInfo]=n.graphicMsg.message,thisExpControl.shortGraphicMsg!==undefined&&thisExpControl.longGraphicMsg!==undefined&&(thisExpControl.isShortMsg=!0,thisExpControl.showMessage(thisExpControl.shortGraphicMsg))):pmFramework.setMsgIdShown($("div .ovlMsgAnc"),null)};OvlControl.prototype.doRender=function(n){if(this.initialise(),this.isWebMsgAlert=n.isWebAlert!==undefined&&n.isWebAlert===!0,this.isWebMsgAlert)this.overlayControl.removeClass("GraphicalMessageOverlay").addClass("ImportantMessageOverlay"),this.showWebAlert(n);else{if(n.shortText.length==undefined||n.shortText.length==0)return;this.overlayControl.removeClass("ImportantMessageOverlay").addClass("GraphicalMessageOverlay");this.showMessage(n)}};OvlControl.prototype.getOverlayElement=function(n){return $(n,this.overlaySelector)};OvlControl.prototype.centreOverlay=function(){var i,r=0,n,t;i=$(window).width();n=(i-20-this.getOverlayElement("#contentContainer").width())/2;n<0&&(n=0);r=$(window).height();t=r/2-this.getOverlayElement("#contentContainer").height()/2;t<0&&(t=0);this.overlayControl.css(this.cssStyle.left,n+this.cssStyle.px).css(this.cssStyle.top,t+this.cssStyle.px)};OvlControl.prototype.clearDownControl=function(){this.clearDownImage();this.getOverlayElement("#webMsgCount").remove();$("ul",this.getOverlayElement("#bodytext")).remove();this.getOverlayElement("#ovlOutBord").removeClass("Photo Icon Basic");this.getOverlayElement(".baseButton").css("width","")};OvlControl.prototype.clearDownImage=function(){this.getOverlayElement("#image").attr("src","")};OvlControl.prototype.showWebAlert=function(n){var u,e,f,t,i,o,r;for(this.clearDownControl(),f={image:$("body").data("NewMessagesImage"),shortTextH1:$("body").data("NewMessagesTranslation"),shortTextH2:"",longText:"",button1:{text:$("body").data("ReadMessagesTranslation"),action:"[Read Messages]"},button2:{text:$("body").data("CloseTranslation"),action:"[Close]"}},this.message=f,this.setImage(f.image,!1,null),e=this.layoutStyle.icon,this.getOverlayElement("#ovlOutBord").addClass(e),this.showMsgDetails(f),r=$("<ul />"),r.append("<li>"+n.SU+(n.IM===pmFramework.impactId.highImportance||n.IM===pmFramework.impactId.important?'<span class="highImportanceExclaim">&nbsp;!<\/span><\/li>':"")),t=0;t<4;t++)isNullOrUndefined(n.otherWebMessages[t])||(n.otherWebMessages[t].IM===pmFramework.impactId.highImportance||n.otherWebMessages[t].IM===pmFramework.impactId.important?r.append("<li>"+n.otherWebMessages[t].SU+'<span class="highImportanceExclaim">&nbsp;!<\/span><\/li>'):r.append("<li>"+n.otherWebMessages[t].SU+"<\/li>"));r.appendTo($("#bodytext","#ovlMsg"));this.centreOverlay();u=1;n.otherWebMessages!==undefined&&(u+=n.otherWebMessages.length);setTimeout(function(){i=$(".aEmails").html();i=i.replace("(","");i=i.replace(")","");o=/^\d+$/;o.test(i)&&(u=parseInt(i,10))},500);this.getOverlayElement("#imageDiv").append('<div id="webMsgCount">'+u+"<\/div>")};OvlControl.prototype.showMessage=function(n){this.clearDownControl();this.message=n;this.setImage(n.image,!0,n)};OvlControl.prototype.showMessageRemainingItems=function(n){var t;n.image.match(this.layoutStyle.iconRegEx)?t=this.layoutStyle.icon:n.image.match(this.layoutStyle.photoRegEx)?(t=this.layoutStyle.photo,this.isPhoto=!0):t=this.layoutStyle.basic;this.getOverlayElement("#ovlOutBord").addClass(t);this.showMsgDetails(n);this.centreOverlay()};OvlControl.prototype.setImage=function(n,t,i){n=this.isWebMsgAlert?pmFramework.getCtlImagePath(n):pmFramework.getMsgImagePath(n);this.getOverlayElement("#image").attr("src",n);t&&thisOvlControl.showMessageRemainingItems(i)};OvlControl.prototype.showMsgDetails=function(n){this.showSubHeaderAndTitle(n);this.getOverlayElement("#bodytext").html(n.longText);this.getOverlayElement("#button1").html(n.button1.text);this.getOverlayElement("#button2").html(n.button2.text);this.getOverlayElement(".baseButton").each(function(){thisOvlControl.setupButton(this,n)});this.overlayControl.fadeIn(thisOvlControl.overlayFadeDuration);bet365.cmsCore.buttons.ApplyConsistentButtonsWidths(this.getOverlayElement(".baseButton"));pmFramework.renderOverlayBackground(this.overlaySelector)};OvlControl.prototype.showSubHeaderAndTitle=function(n){n.shortTextH2!==""?(this.getOverlayElement("#subject").show().html(n.shortTextH2),this.getOverlayElement("#title").html(n.shortTextH1)):(this.getOverlayElement("#subject").hide().html(""),this.getOverlayElement("#title").html(n.shortTextH1))};OvlControl.prototype.setupButton=function(n,t){var i,r;$(n).unbind("click").removeAttr("href");i='$("'+this.overlaySelector+'").fadeOut(thisOvlControl.overlayFadeDuration, function() {pmFramework.closeMessageAndOverlay($(".ovlMsgAnc"));});';this.buttonHandler.setupButtonAction($(this.overlaySelector),n,this.message[n.id],i);r=$._data(thisOvlControl.closeGadget[0],"events");r&&r.click||(thisOvlControl.closeGadget.click(new Function(i)),$(thisOvlControl.closeGadget).data("track-id",t.id));$(n).data("track-id",t.id)};OvlControl.prototype.initialise=function(){this.overlayControl.removeClass("ExpandableOverlay").addClass("Overlay");this.closeGadget=this.getOverlayElement("#dismiss")};PmKeyValueCollection.prototype.addItem=function(n,t){return this.indexOf(n)===this.notExistIndex?(this.collection.push({key:n,value:t}),!0):!1};PmKeyValueCollection.prototype.containsKey=function(n){return this.indexOf(n)>this.notExistIndex};PmKeyValueCollection.prototype.containsValue=function(n){return this.indexOfValue(n)>this.notExistIndex};PmKeyValueCollection.prototype.indexOfCheck=function(n,t){for(var i=0;i<this.collection.length;i++)if(t&&this.collection[i].key==n||!t&&this.collection[i].name===n)return i;return this.notExistIndex};PmKeyValueCollection.prototype.indexOf=function(n){return this.indexOfCheck(n,!0)};PmKeyValueCollection.prototype.indexOfValue=function(n){return this.indexOfCheck(n,!1)};PmKeyValueCollection.prototype.removeItem=function(n){var t=this.indexOf(n);t!==this.notExistIndex&&this.collection.splice(t,1)};PmKeyValueCollection.prototype.clear=function(){this.collection=[]};PmPageProfile.prototype.isNullOrEmpty=function(n){return undefined===n||null===n||n.length===0};PmPageProfile.prototype.scoreRule=function(n,t){var i=0,r,f,u,e;if(!t&&(r=$("body").data("pageAttributes"),r&&r.pushWebMessagingRestrictToWebAlertsOnly&&r.pushWebMessagingRestrictToWebAlertsOnly==="true")||!this.positions.containsKey(n.PI)||!this.isNullOrEmpty(n.LS)&&n.LS===0&&0===this.loginOrSession)return 0;if(!this.isNullOrEmpty(n.AI))if(this.areas.contains(String(n.AI)))i+=1;else return 0;if(!this.isNullOrEmpty(n.GG))if(n.GG.toLowerCase()===this.gameGroupId.toLowerCase())i+=5;else return 0;if(!this.isNullOrEmpty(n.GI)){for(f=n.GI.split(","),e=!1,u=0;u<f.length;u++)if(f[u].toLowerCase()===this.gameId.toLowerCase()){i+=10;e=!0;break}if(!e)return 0}return i};PmMessageSchedule.prototype.scheduleMessage=function(n){this.scheduledMessages.push(n);this.setNextMessageDate()};PmMessageSchedule.prototype.getTimeUTC=function(n){return n.getTime()+n.getTimezoneOffset()*6e4};PmMessageSchedule.prototype.resetListener=function(){var n;null!==this.listenerMethod&&this.scheduledMessages.length>0&&this.nextMsgDate!==0&&(pmFramework.isDebug&&pmFramework.ttDebugInfo&&$("#timeouts").append("nextMessageDate: "+this.nextMsgDate+" - syncdTimeUTC: "+pmConfigParams.getSyncdTimeUTC()+"<br/>"),n=this.nextMsgDate-pmConfigParams.getSyncdTimeUTC(),n>1e3?(this.timeoutID=setTimeout(this.listenerMethod.toString(),n),pmFramework.isDebug&&pmFramework.ttDebugInfo&&$("#timeouts").append(this.nextMsg.MI+" ("+this.positionId+") set for "+n+"ms<br/>")):(this.nextMsg.SR.TT=0,this.nextMsg.SR.TD=0,this.nextMsg.SR.TTDelayExpired=!0,n=pmFramework.isHandlerControlAvailable(this.positionId)?1e3:5e3,pmFramework.isDebug&&pmFramework.ttDebugInfo&&$("#timeouts").append(this.nextMsg.MI+" ("+this.positionId+") display "+n+"ms<br/>"),this.timeoutID=setTimeout(this.listenerMethod.toString(),n)))};PmMessageSchedule.prototype.setNextMessageDate=function(){var n,t=new Date;for(t.setHours(t.getHours()+24),this.nextMsgDate=this.getTimeUTC(t),n=0;n<this.scheduledMessages.length;n++)this.scheduledMessages[n].SR.TT<this.nextMsgDate&&(this.nextMsgDate=this.scheduledMessages[n].SR.TT,this.nextMsg=this.scheduledMessages[n]);this.resetListener()};PmMessageSchedule.prototype.clearListener=function(){this.listenerMethod=null;this.timeoutID!==-1&&clearTimeout(this.timeoutID)};PmMessageSchedule.prototype.setListener=function(n){this.listenerMethod=n;this.resetListener()};PmMessageSchedule.prototype.isMessagePending=function(n){var t;for(n=n+1e3,t=0;t<this.scheduledMessages.length;t++)if(this.scheduledMessages[t].SR.TT<n)return!0;return!1};PmMessageSchedule.prototype.removeMessage=function(n){for(var i=!1,t=this.scheduledMessages.length-1;t>=0;t--)if(this.scheduledMessages[t].MI===n){this.scheduledMessages.splice(t,1);i=!0;break}i&&this.setNextMessageDate()};PmMessageSchedule.prototype.getPendingMessage=function(){$("#timeouts").append("getPendingMessage: "+this.scheduledMessages.length+"<br/>");var i,t,r,n;for(t=new Date,r=-1,n=0,t.setFullYear(2200,12,12),t=t.getTime(),n=0;n<this.scheduledMessages.length;n++)this.scheduledMessages[n].SR.TT<t&&(i=this.scheduledMessages[n],t=i.SR.TT,r=n);return r>=0&&(this.scheduledMessages.splice(r,1),this.setNextMessageDate(),i.SR.TT=0,i.SR.TD=0),i};PmMessageSchedule.prototype.clearAll=function(){var n=new Date;this.scheduledMessages.clear();this.nextMsgDate=n.setHours(n.getHours()+24);this.nextMsg=null;this.clearListener()};PmMessageCache.prototype.cacheMessage=function(n){var t;if(pmFramework.isDebug&&pmFramework.ttDebugInfo&&(isNullOrUndefined(n.SR)||(t=hasNonZeroValue(n.SR.TT)?"S":n.isGlobal?"G":"U",$("#timeouts").append("queuing msg: "+n.MI+" ("+n.SR.PI+") to queue: "+t+"<br/>"))),n.SR!==undefined&&hasNonZeroValue(n.SR.TT)){this.scheduledMessages.scheduleMessage(n);return}if(n.isGlobal){this.globalMessages.push(n);return}this.userMessages.push(n)};PmMessageCache.prototype.getNextMessage=function(){if(hasValue(this.globalMessages))return this.globalMessages.pop();if($("#timeouts").append("scheduledMessages.scheduledMessages : "+this.scheduledMessages.scheduledMessages+"<br/>"),$("#timeouts").append("this.scheduledMessages.isMessagePending : "+this.scheduledMessages.isMessagePending(pmConfigParams.getSyncdTimeUTC())+"<br/>"),$("#timeouts").append("pmConfigParams.getSyncdTimeUTC : "+pmConfigParams.getSyncdTimeUTC()+"<br/>"),$("#timeouts").append("get time : "+((new Date).getTime()+pmConfigParams.localTimeOffset)+"<br/>"),hasValue(this.scheduledMessages.scheduledMessages)&&this.scheduledMessages.isMessagePending(pmConfigParams.getSyncdTimeUTC()))return this.scheduledMessages.getPendingMessage();if(hasValue(this.userMessages)){var n=this.userMessages[0];return this.userMessages.splice(0,1),n}return null};PmMessageCache.prototype.removeMessage=function(n){this.deleteMessageFromCache(n,this.globalMessages);this.scheduledMessages.removeMessage(n);this.deleteMessageFromCache(n,this.userMessages)};PmMessageCache.prototype.deleteMessageFromCache=function(n,t){for(var i=t.length-1;i>=0;i--)if(t[i].MI===n){t.splice(i,1);break}};PmMessageCache.prototype.updateMessage=function(n){this.deleteMessage(n.MI);this.queueMessage(n)};PmMessageCache.prototype.clear=function(){this.globalMessages.clear();this.userMessages.clear();this.scheduledMessages.clearAll()};PmPositionCache.prototype.internalPositionId=function(n){return this.positionPrefix+n};PmPositionCache.prototype.addPosition=function(n){var i,t;t=this.internalPositionId(n);undefined===this[t]&&(this[t]=new PmMessageCache(n),this.positions.push(t),i=this.scheduledMsgExpiredCallback.replace("{0}",n),this[t].scheduledMessages.setListener(i))};PmPositionCache.prototype.getPosition=function(n){var t=this.internalPositionId(n);return this[t]};PmPositionCache.prototype.queueMessage=function(n,t){var i;n!==null&&t!==null&&(i=this.getPosition(t.PI),i!==null&&i.cacheMessage(n))};PmPositionCache.prototype.removeMessage=function(n){for(var t=0;t<this.positions.length;t++)this[this.positions[t]].removeMessage(n)};PmPositionCache.prototype.updateMessage=function(n){for(var t=0;t<this.positions.length;t++)this[this.positions[t]].updateMessage(n)};PmPositionCache.prototype.getNextMessage=function(n){var t,i;return(i=this.internalPositionId(n),this[i]!==undefined)?(t=this[i].getNextMessage(),$("#timeouts").append("getNextMessage: "+t+"<br/>"),null!==t&&this.removeMessage(t.MI),pmFramework.isDebug&&pmFramework.reportDebugInfo(1),t):null};Array.prototype.add=function(n){this.indexOf(n)===-1&&this.push(n)};Array.prototype.clear=function(){this.splice(0,this.length)};Array.prototype.contains=function(n){return this.indexOf(n)!==-1};Array.prototype.removeItem=function(n){var t=this.indexOf(n);this[t]>-1&&this.splice(t,1)};Array.prototype.indexOf||(Array.prototype.indexOf=function(n){var r=this.length,t,i;for(t=Number(arguments[1])||0,t=t<0?Math.ceil(t):Math.floor(t),t<0&&(t+=r),i=t;i<r;i++)if(i in this&&this[i]===n)return i;return-1});TbControl.prototype.doRender=function(n){var t,r,u,f,i;n.shortText.length!=undefined&&n.shortText.length!=0&&(t=$(this.topLevelCtl),f=t.attr("id"),r=n.image.indexOf("x94")===-1?"TopBannerImageWithBorder":"",$("#TopBannerImage",this.topLevelCtl).attr("src",pmFramework.getMsgImagePath(n.image)).attr("class",r),$("span.headerText",this.topLevelCtl).text(n.shortTextH1),$("span.bodyText",this.topLevelCtl).text(n.longText),$("span.linkText",this.topLevelCtl).text(n.button1.text),u='var pmTBCtl = $("#'+f+'");pmTBCtl.slideUp("'+this.slideSpeed+'", function(){pmFramework.closeMessage(pmTBCtl)});',i=$("a#topBannerLink",this.topLevelCtl),i.data("track-id",n.id),$("#TopBannerClose",this.topLevelCtl).data("track-id",n.id),this.buttonHandler.setupButtonAction($(this.topLevelCtl),i,n.button1,u),t.slideDown(this.slideSpeed,function(){PmMessagingFramework.prototype.resizeOverlayBackground()}))};TbControl.prototype.closeUp=function(){var n=$(thisTbControl.topLevelCtl);n.slideUp(thisTbControl.slideSpeed,function(){pmFramework.closeMessage(n)})};format=function(n,t){var i=1;return t=typeof t=="object"?t:Array.prototype.slice.call(arguments,1),n.replace(/\{([^}]+)\}/gm,function(){return t[arguments[i]]})};String.prototype.format=function(n){return format(this,n)};String.prototype.startsWith=function(n){return this.match("^"+n)===n};pmFramework=new PmMessagingFramework;PmMessagingFramework.prototype.pmEmbedConnectionSWF=function(n,t,i){var e,o,r,s="<div/>",u="pmSWFdiv",f;if(typeof $===undefined)throw new Error("jQuery not in page - PushMessaging pre-requisite");if(swfobject===undefined)throw new Error("swfobject.js not in page - PushMessaging pre-requisite");e=window.location.protocol+"//"+window.location.host+i;o={allowscriptaccess:"always",allownetworking:"all",base:e};r={id:"pmConnObj"};swfobject&&swfobject.removeSWF(r.id);f=$(s);f.attr("id","pmSWFparentDiv");f.appendTo(document.body);$("#"+u).length===0&&$(s).attr("id",u).appendTo("#pmSWFparentDiv");swfobject.embedSWF(n.Path,u,1,1,n.FlashVer,!1,t,o,r,function(){$("#pmSWFparentDiv").css("position","absolute");$("#pmSWFparentDiv").css("left","-500px");$("#pmSWFparentDiv").css("top","-500px");setTimeout(function(){pmFramework.onPushMessageDataCalled||onPushMessageError()},5e3)})};PmMessagingFramework.prototype.triggerRepost=function(){this.pageProfileDiscovered=!1;addConnectionSWF()};PmMessagingFramework.prototype.discoverPageProfile=function(){this.pageProfileDiscovered||(this.discoverAreasOnPage(),this.discoverPositionsOnPage(),this.discoverGameGroupOnPage(),this.discoverGameOnPage(),this.discoverLoginOrSession(),this.pageProfileDiscovered=!0,this.isDebug&&this.reportDebugInfo(0))};PmMessagingFramework.prototype.reportPageProfileInfo=function(n,t){var i=t!==undefined?t:"";return $("div["+n+"]").each(function(){i+=(i.length>0?", ":"")+$(this).attr(n)}),i.toString()};PmMessagingFramework.prototype.reportAreasOnPage=function(){return this.reportPageProfileInfo(pmFramework.customAttribs.areaId,"0")};PmMessagingFramework.prototype.reportPositionsOnPage=function(){return this.reportPageProfileInfo(pmFramework.customAttribs.positionId)};PmMessagingFramework.prototype.reportGameSectionOnPage=function(){return this.reportPageProfileInfo(pmFramework.customAttribs.gameSection)};PmMessagingFramework.prototype.reportQueued=function(){var t="<br/>",n,i=t;return $.each(pmFramework.pagePmPositionCache.positions,function(r,u){n=pmFramework.pagePmPositionCache[u];i+="{0}{1}{0}G:{2}{0}S:{3}{0}U:{4}{0}".format([t,u,n.globalMessages.length,n.scheduledMessages.scheduledMessages.length,n.userMessages.length])}),i};PmMessagingFramework.prototype.reportDebugInfo=function(n){if(this.isDebug){var i=$("body"),t='<div id="pmDebugInfo"><span>Areas: {0}<\/span><br/><span>Positions: {1}<\/span><br/><span>GameSection: {2}<\/span><br/><span>LoginSessionFlag: {3}<\/span><br/><br/><span>Queues: {4}<\/span><\/div>';t=t.format([this.reportAreasOnPage(),this.reportPositionsOnPage(),this.reportGameSectionOnPage(),pmConfigParams.loginSession,this.reportQueued()]);i.find("div#pmDebugInfo").remove();i.append(t+(n===0?'<div id="timeouts"><\/div>':""));setTimeout(function(){pmFramework.reportDebugInfo(1)},6e3)}};PmMessagingFramework.prototype.renderOverlayBackground=function(n){var t=$("<div />").attr("id","overlayBackground").css({position:"absolute",top:"0px",left:"0px",backgroundColor:"#000",zIndex:"9999"}),i=$(document).height();t.css({width:"100%",height:i}).fadeTo(700,.7).appendTo("body");$(n).css("z-index","10001").appendTo("body")};PmMessagingFramework.prototype.resizeOverlayBackground=function(){var n=$(document).height();$("#overlayBackground").css({height:n})};PmMessagingFramework.prototype.removeOverlayBackground=function(){$("#overlayBackground").remove()};PmMessagingFramework.prototype.hasDataFlag=function(){var n=!1;return $("body").data!==null&&($("body").data("DownloadPrompt")?(n=!0,$("body").removeData("DownloadPrompt")):pmFramework.canDisplayMessage()||(n=!0)),n};PmMessagingFramework.prototype.isDisplayingExistingPopUp=function(n){var i,t;if($(".popup-mask, .loadingSpinnerOverlay").is(":visible"))this.displayingExistingPopup=!0,n&&setTimeout(function(){pmFramework.isDisplayingExistingPopUp(!0)},5e3);else{if(this.displayingExistingPopup)for(t=0;t<pmFramework.pageProfile.positions.collection.length;t++)i=this.pagePmPositionCache.getNextMessage(t),null!==i&&this.processMessage(i);this.displayingExistingPopup=!1}return this.displayingExistingPopup};PmMessagingFramework.prototype.canDisplayMessage=function(){return!this.isDisplayingExistingPopUp(!1)};PmMessagingFramework.prototype.setMsgIdShown=function(n,t){t?$(n).attr({pmmsgid:t.MI,pmmsgisglobal:t.isGlobal,pmmsgexpiry:t.ET,pmpushgraphicid:isNullOrUndefined(t.graphicMsg)?"0":t.graphicMsg.message.id}):n.removeAttr(this.customAttribs.msgId).removeAttr(this.customAttribs.isGlobal).removeAttr(this.customAttribs.msgExpiry).removeAttr(this.customAttribs.pushGraphicId)};PmMessagingFramework.prototype.getMsgIdShown=function(n){return $(n).attr(pmFramework.customAttribs.msgId)};PmMessagingFramework.prototype.isMsgShownAtPosition=function(n){var t,i;return t=$(this.msgHandlerSelector.format(n)),hasValue(t)&&(i=this.getMsgIdShown(t)),i!==undefined};PmMessagingFramework.prototype.getDoRenderFunction=function(n){var i,t;return($.each(this.positionId,function(t,r){if(r===n)return i="doRender_"+t,!1}),t=window[i],t===undefined||typeof t!="function")?(raiseError("push message error - cannot find: "+i+"()"),null):t};PmMessagingFramework.prototype.sendMsgToHandlerControl=function(n,t){var i,u,r;if(r=this.getDoRenderFunction(t.SR.PI),n.length>0&&null!==r){i=n[0];try{this.isDebug&&$("#timeouts").append("Render msg: "+t.MI+" ("+String(t.SR.PI)+")<br/>");u=isNullOrUndefined(t.graphicMsg)?r(t,i):r(t.graphicMsg.message,i,t);(u===undefined||u!==this.renderFailCode)&&this.setMsgIdShown(i,t)}catch(f){raiseError(f)}}};PmMessagingFramework.prototype.processNextQueuedMessage=function(n){var t=null,i,r=0;for(typeof n=="string"&&(n=parseInt(n,10)),i=this.getConflictingControlPositions(n),$("#timeouts").append("processNextQueuedMessage position  called pos: "+i.length+"<br/>");null===t&&r<i.length;)t=this.pagePmPositionCache.getNextMessage(i[r]),$("#timeouts").append("inside loop pos: "+r+" swf msg: "+t+"<br/>"),r++;$("#timeouts").append("processNextQueuedMessage called pos: "+t+"<br/>");null!==t&&this.processMessage(t)};PmMessagingFramework.prototype.onScheduledMessage=function(n){this.isDebug&&this.ttDebugInfo&&$("#timeouts").append("onScheduledMsg called pos: "+n+"<br/>");this.processNextQueuedMessage(n)};PmMessagingFramework.prototype.getConflictingControlPositions=function(n){switch(n){case this.positionId.overlay:case this.positionId.overlayExpandable:return[this.positionId.overlay,this.positionId.overlayExpandable];default:return[n]}};PmMessagingFramework.prototype.isHandlerControlAvailable=function(n){for(var t=!0,r=0,i=this.getConflictingControlPositions(n);t&&r<i.length;)t=!this.isMsgShownAtPosition(i[r]),r++;return t};PmMessagingFramework.prototype.processGameLobbyWindowRules=function(n){var r=0,o=!1,u,t,f,i,e;$("div["+this.customAttribs.positionId+"]").each(function(){return r=parseInt($(this).attr(pmFramework.customAttribs.positionId),0),r===pmFramework.positionId.gameWindow||r===pmFramework.positionId.lobbyWindow?(o=!0,!1):void 0});o||(n.rules=$.grep(n.rules,function(r){return r.PI===pmFramework.positionId.gameWindow||r.PI===pmFramework.positionId.lobbyWindow?(t=!1,hasValue(r.GI)?(u=r.GI,t=!0):hasValue(r.GG)?t=!0:(r.AI===0||r.AI===1||r.AI===9||r.AI===10)&&(t=pmFramework.pageProfile.areas.contains(String(r.AI))),t&&(e=pmResolver.instance.getAdditionalData(),e&&e!=""&&(f=$.parseJSON(pmResolver.instance.getAdditionalData())),i=f&&hasValue(n.MI)?f.seenLobbyMessages.indexOf(n.MI)==-1?!0:!1:!0,i&&pmFramework.setAdditionalData(pmFramework.additionalDataAttribs.game,(hasValue(r.AI)?r.AI:"")+"-"+(hasValue(u)?u:"")+"-"+(hasValue(n.MI)?n.MI:"")+"-"+(hasValue(r.GG)?r.GG:"")+"-"+(hasValue(n.TY)?n.TY:"")+"-"+(hasValue(n.layouts[0].LI)?n.layouts[0].LI:""))),!1):!0}))};PmMessagingFramework.prototype.selectRule=function(n){for(var i,u,f=0,r=n.rules,t=0;t<r.length;t++)i=this.pageProfile.scoreRule(r[t],n.isWebAlert),i>f&&(f=i,u=r[t]);return u};PmMessagingFramework.prototype.parseShortText=function(n){var i,t,r;if(isNullOrUndefined(n.message)||n.message.shortText.length<=0)return n;for(i=n.message.shortText.split(/\|\||\|/),t=0;t<3;t++){if(i.length<=t)break;r=i[t];n.message["shortTextH"+(t+1)]=r}return n};PmMessagingFramework.prototype.hasMsgHighImportance=function(n){for(var t=0;t<n.length;t++)if(this.isMsgHighImportance(n[t]))return!0;return!1};PmMessagingFramework.prototype.isMsgImportantAnnouncement=function(n){return this.isMsgHighImportance(n)&&this.ispushGraphic(n)};PmMessagingFramework.prototype.isMsgHighImportance=function(n){return n.IM===this.impactId.highImportance};PmMessagingFramework.prototype.displayDropdown=function(n){for(var i,r,t=0;t<n.length;t++)if(i=n[t],r=!isNullOrUndefined(i.templates)&&i.templates.length>0,i.isWebAlert||r)return!1;return!0};PmMessagingFramework.prototype.isValidForWebAlert=function(n){var t=$("body").data("pageAttributes"),r,i;if(t===null||t===undefined||!isNullOrUndefined(n.templates)&&n.templates.length>0)return!1;r=t.pushWebMessagingDuringSession==="True";i=!1;switch(n.IM){case this.impactId.highImportance:i=t.pushWebMessagingHighImportance==="True";break;case this.impactId.important:i=t.pushWebMessagingImportant==="True";break;case this.impactId.normal:i=t.pushWebMessagingNormal==="True"}return i&&(pmFramework.isFirstLoadAfterLogin||r)};PmMessagingFramework.prototype.isMsgImportant=function(n){return n.IM===this.impactId.important};PmMessagingFramework.prototype.isMsgPushGraphic=function(n){return hasValue(n.templates)&&n.templates[0].layouts.length>0};PmMessagingFramework.prototype.simplifyMsgData=function(n,t){var r,i=jQuery.extend(!0,{},n);if(i.lngId=t,i.isGlobal=i.TY==="G",hasValue(i.templates)&&(i.rules=i.templates[0].rules,i.layouts=i.templates[0].layouts,delete i.templates),i.hasPushGraphic=hasValue(i.layouts),i.ET=convertTimeSecsToMs(i.ET),hasValue(i.rules))for(r=0;r<i.rules.length;r++)i.rules[r].TT=convertTimeSecsToMs(i.rules[r].TT),hasNonZeroValue(i.rules[r].TD)&&(i.rules[r].TT=pmConfigParams.getSyncdTimeUTC()+convertTimeSecsToMs(i.rules[r].TD),this.isDebug&&this.ttDebugInfo&&($("#timeouts").append(i.MI+" - TT calcd as "+i.rules[r].TT+"<br/>"),$("#timeouts").append(i.MI+" - Time now without offset "+(new Date).getTime()+"<br/>"),$("#timeouts").append(i.MI+" - Synched time UTC "+pmConfigParams.getSyncdTimeUTC()+"<br/>")));return i};PmMessagingFramework.prototype.getGraphicMsgStatusCode=function(n){return hasValue(n)?parseInt(n.status.code,0):-1};PmMessagingFramework.prototype.onGetPushGraphicData=function(n){var t;try{t=this.xmlToJSON($(n).find("pushMessageResponse")[0]);t=this.parseShortText(t)}catch(i){raiseError("error converting xml to json: "+i)}return t};PmMessagingFramework.prototype.beforeAjaxSend=function(n,t,i){n.callbackContextInfo=i};PmMessagingFramework.prototype.getPushGraphicData=function(n,t,i,r){var f,h="",e,u,o,s=null,c;o="GET";isNullOrUndefined(t.isTestMessage)||t.isTestMessage!==!0?(t.isGlobal?(u=this.gatewayServiceName.getGlobal,h="?GI={0}&LI={1}".format([n,t.lngId]),s="{ }"):(u=this.gatewayServiceName.getUser,o="POST",s="GI={0}&LI={1}".format([n,t.lngId])),f=pmConfigParams.gatewayAPIPath+u):(u="GetMessage.aspx",f=window.location.protocol+"//"+window.location.host+(window.location.host.indexOf("localhost")>-1?"/"+window.location.pathname.split("/")[1]:"")+"/PushMessaging/GatewayAPI/"+u);try{return $.ajax({type:o,url:f+h,async:i!==undefined,data:s,timeout:this.gatewayApiTimeout,success:function(t,i,r){c=parseInt($(t).find("pushMessageResponse status code").text(),0);c===0?(e=pmFramework.onGetPushGraphicData(t),r.graphicMsg=e):raiseError("Response status code error from "+u+"("+f+"): "+$(t).find("pushMessageResponse status").text()+" for GraphicId:"+n)},error:function(n,t){raiseError("Error calling PushMessaging-"+u+"("+f+") service: "+t+"-"+n.status+":"+n.responseText)},beforeSend:function(n,t){pmFramework.beforeAjaxSend(n,t,r)},complete:i}),e}catch(l){raiseError("Error calling PushMessaging-"+u+" service: "+l)}};PmMessagingFramework.prototype.getPushGraphicFromLayout=function(n,t){var u,r,i;if(u=n===this.positionId.overlayExpandable?this.positionId.overlayShort:n,r=this.getLayoutForPosition(u,t),!r||(i=this.getPushGraphicData(r,t),i!==undefined&&!hasNonZeroValue(this.getGraphicMsgStatusCode(i))))return i};PmMessagingFramework.prototype.processSwfMessage=function(n){var t,i,r;if(this.processGameLobbyWindowRules(n),t=this.selectRule(n),isNullOrUndefined(t)){for(i in n.rules)if(n.rules[i]!==null&&n.rules[i].AI===2){r=this.pagePmPositionCache.getPosition(9);isNullOrUndefined(r)||r.cacheMessage(n);break}return}return n.SR=t,n};PmMessagingFramework.prototype.processMessage=function(n){var t,o,i,u,f,s,e,r;if(($("#timeouts").append("processMessage called pos: "+n+"<br/>"),n.hasPushGraphic)&&(n=pmFramework.processSwfMessage(n),n!=undefined)&&(t=n.SR,r=!1,t.LS==1?r=!0:t.LS==0&&pmFramework.isFirstLoadAfterLogin&&pmFramework.allowedLoggedInMessages!=null&&$.inArray(n.MI,pmFramework.allowedLoggedInMessages)&&(r=!0),r))if(s=hasNonZeroValue(t.TT)&&t.TT>pmConfigParams.getSyncdTimeUTC()||hasNonZeroValue(t.TD),i=s?!0:!1,o=!i,u=this.msgHandlerSelector.format(t.PI),f=$(u),hasValue(f)){if(o)if(this.isHandlerControlAvailable(t.PI)&&(n.MHR>this.mhrValues.global?this.canDisplayMessage():!0)){if(e=n.isWebAlert!==undefined&&n.isWebAlert===!0,e&&!this.highImportanceMessageCanBeShown(n.MI))return;if(!e&&(n.graphicMsg=this.getPushGraphicFromLayout(t.PI,n),isNullOrUndefined(n.graphicMsg)))return;pmFramework.isDisplayingExistingPopUp(!0)?i=!0:this.sendMsgToHandlerControl(f,n)}else i=!0;i&&(this.pagePmPositionCache.queueMessage(n,t),this.isDebug&&pmFramework.reportDebugInfo(1))}else raiseError("no msgHandler control(s) matched selector: "+u)};PmMessagingFramework.prototype.xmlToJSON=function(n){var u={},t,r;if(!isNullOrUndefined(n.attributes))for(t=0;t<n.attributes.length;t++)u[n.attributes[t].nodeName]=n.attributes[t].value;for(t=0;t<n.childNodes.length;t++){var i=n.childNodes[t],f=i.childNodes!==null,e=!0;if(f)for(r=0;r<i.childNodes.length;r++)if(i.childNodes[r].nodeType!==3){e=!1;break}u[i.nodeName]=f&&e?$(i).text():this.xmlToJSON(i)}return u};PmMessagingFramework.prototype.determineMHR=function(n){return n.isGlobal?this.mhrValues.global:this.isMsgHighImportance(n)?this.mhrValues.highImportanceWebOnly:hasValue(n.templates)&&n.templates[0].layouts.length>0?this.mhrValues.pushGraphic:this.mhrValues.normalImportantWebOnly};PmMessagingFramework.prototype.mhrSort=function(n,t){return n.MHR-t.MHR};PmMessagingFramework.prototype.prioritiseMessages=function(n){if(n.messages.length===0)return n.messages;for(var t=0;t<n.messages.length;t++)n.messages[t].MHR=this.determineMHR(n.messages[t]);return n.messages.sort(PmMessagingFramework.prototype.mhrSort),this.configureOverlayMessages(n)};PmMessagingFramework.prototype.configureOverlayMessages=function(n){var r,t,u,f;if(n.messages.length===0)return n.messages;var i=[],e=[],o=[],s=[];for(r=0;r<n.messages.length;r++)t=n.messages[r],t.AC!==null&&(t.isGlobal=t.TY==="G",t.isWebAlert=!1,!t.isGlobal&&this.isValidForWebAlert(t)?i.push(t):PmMessagingFramework.prototype.IsPushGraphic(t)?o.push(t):e.push(t));return i.length>0&&(u=i[0],u.isWebAlert=!0,i.splice(0,1),f=i.concat(e),f.sort(PmMessagingFramework.prototype.mhrSort),f.reverse(),u.otherWebMessages=f,s.push(this.addWebAlertOverlayPushGraphic(u))),o.concat(e,s)};PmMessagingFramework.prototype.IsPushGraphic=function(n){return!isNullOrUndefined(n.templates)&&n.templates.length>0};PmMessagingFramework.prototype.addWebAlertOverlayPushGraphic=function(n){var i,t;if(!isNullOrUndefined(n.templates)&&n.templates.length>0?(i=jQuery.extend(!0,{},n),i.IM=0,i.isCloned=!0,pmFramework.pmData.messages.push(i),delete n.templates.rules,delete n.templates.layouts):n.templates=[{GI:0,NR:1}],n.templates[0].rules=[{LS:1,AI:0,PI:1,TD:0,TT:0,GI:"",GG:""}],n.templates[0].layouts=[{ST:"",LI:0,PI:1}],n.hasPushGraphic=!0,n.isWebAlert=!0,n.otherWebMessages===undefined)n.otherWebMessages=[];else for(t=0;t<n.otherWebMessages.length;t++)n.otherWebMessages[t].MHR===this.mhrValues.pushGraphic&&this.addWebAlertOverlayPushGraphic(n.otherWebMessages[t]);return n};PmMessagingFramework.prototype.processMessages=function(n){var t,i,r=!1;for(this.discoverPageProfile(),n.messages=this.prioritiseMessages(n),n.HT===this.headerType.fullLoad?this.showMsgDropDown=this.displayDropdown(n.messages):this.hasMsgHighImportance(n.messages)&&this.isMsgHighImportance(n.messages[0])&&(n.messages[0].otherWebMessages===undefined&&(n.messages[0].otherWebMessages=[]),n.messages[0].otherWebMessages=n.messages[0].otherWebMessages.concat(iboData.messages)),t=0;t<n.messages.length;t++)i=this.simplifyMsgData(n.messages[t],n.LI),i.AC===this.messageAction.add?(i.isGlobal||i.isCloned||this.pageProfile.headerDropDownAvailable&&(iboData.addMessage(i),r=!0,(n.messages[t].otherWebMessages==null||n.messages[t].otherWebMessages.length>0)&&(this.addOtherWebMessages(n,t),n.messages[t].otherWebMessages==null&&(this.showMsgDropDown=this.displayDropdown(n.messages)))),this.processMessage(i)):i.AC===this.messageAction.Delete&&this.pageProfile.headerDropDownAvailable&&(iboData.removeMessage(i),r=!0,iboData.messages.length==0&&(this.showMsgDropDown=!1));r?this.showMsgDropDown&&this.isHandlerControlAvailable(pmFramework.positionId.overlay)&&$("#iboAnchor").show(iboData.effectDuration):iboData.renderMessages()};PmMessagingFramework.prototype.addOtherWebMessages=function(n,t){for(var r,u=n.messages[t].otherWebMessages==null?1:n.messages[t].otherWebMessages.length,i=0;i<u;i++)r=this.simplifyMsgData(n.messages[t].otherWebMessages==null?n.messages[t]:n.messages[t].otherWebMessages[i],n.LI),r.AC===this.messageAction.add&&(r.isGlobal||this.pageProfile.headerDropDownAvailable&&iboData.addMessage(r))};PmMessagingFramework.prototype.discoverAreasOnPage=function(){var n;$("["+this.customAttribs.areaId+"]").each(function(){n=$(this).attr(pmFramework.customAttribs.areaId).split(" ");for(var t=0;t<n.length;t++)pmFramework.pageProfile.areas.add(n[t])})};PmMessagingFramework.prototype.discoverPositionsOnPage=function(){var n;$("["+this.customAttribs.positionId+"]").each(function(){var t,i;for(n=$(this).attr(pmFramework.customAttribs.positionId).split(" "),t=0;t<n.length;t++)i=parseInt(n[t],0),i!==pmFramework.positionId.headerDropDown?(pmFramework.pagePmPositionCache.addPosition(i),pmFramework.pageProfile.positions.addItem(i,null)):pmFramework.pageProfile.headerDropDownAvailable=!isNullOrUndefined(iboData)})};PmMessagingFramework.prototype.discoverGameGroupOnPage=function(){$("["+this.customAttribs.gameSection+"]").each(function(){pmFramework.pageProfile.gameGroupId=$(this).attr(pmFramework.customAttribs.gameSection)})};PmMessagingFramework.prototype.discoverGameOnPage=function(){$("["+this.customAttribs.gameId+"]").each(function(){pmFramework.pageProfile.gameId=$(this).attr(pmFramework.customAttribs.gameId)})};PmMessagingFramework.prototype.discoverLoginOrSession=function(){pmFramework.pageProfile.loginOrSession=pmConfigParams.loginSession};PmMessagingFramework.prototype.onUpdatePushGraphicStatusResponse=function(n){try{return this.xmlToJSON($(n).find("pushMessageResponse")[0])}catch(t){raiseError("error converting xml to json: "+t)}};PmMessagingFramework.prototype.updatePushGraphicStatus=function(n){var i,r,t,u,f;if(n===undefined){raiseError("error in PmMessagingFramework.updatePushGraphicStatus - pushGraphicId undefined");return}t=this.gatewayServiceName.readUser;i=pmConfigParams.gatewayAPIPath+t;u="GI={0}&ST=2".format([n]);try{return $.ajax({type:"POST",url:i,data:u,async:!0,timeout:this.gatewayApiTimeout,success:function(u){f=parseInt($(u).find("pushMessageResponse status code").text(),0);f===0?r=pmFramework.onUpdatePushGraphicStatusResponse(u):raiseError("Response status code error from "+t+"("+i+"): "+$(u).find("pushMessageResponse status").text()+" for push graphicId:"+n)},error:function(i,r){raiseError("Error calling PushMessaging-"+t+" service: "+r+"-"+i.status+":"+i.responseText+" graphicId: "+n)}}),r}catch(e){raiseError("Error calling PushMessaging-UpdateMessage service: "+e)}};PmMessagingFramework.prototype.setAdditionalData=function(n,t){var u=new Date,i,f,e,r,o;if(o=$("body").data("HideMessageForHours")!=undefined?$("body").data("HideMessageForHours"):12,u.setHours((new Date).getHours()+o),i=pmFramework.getAdditionalData(),i===""&&(i={highImportanceMsgs:[],seenLobbyMessages:[]}),n===pmFramework.additionalDataAttribs.highImportance)for(f={msgId:t,expires:u.valueOf()},i.highImportanceMsgs.push(f),r=0;r<i.highImportanceMsgs.length;r++)e=i.highImportanceMsgs[r],new Date(e.expires).valueOf()<(new Date).valueOf()&&i.highImportanceMsgs.splice(r,1);pmResolver.instance.setAdditionalData(JSON.stringify(i))};PmMessagingFramework.prototype.getAdditionalData=function(){var n=pmResolver.instance.getAdditionalData(),t="";return n&&n!=""&&(t=$.parseJSON(pmResolver.instance.getAdditionalData())),t};PmMessagingFramework.prototype.highImportanceMessageCanBeShown=function(n){var i=pmFramework.getAdditionalData(),t,r=!0;if(i!=="")for(t=0;t<i.highImportanceMsgs.length;t++)if(i.highImportanceMsgs[t].msgId==n){new Date(i.highImportanceMsgs[t].expires).valueOf()>(new Date).valueOf()&&(r=!1);break}return r};PmMessagingFramework.prototype.baseUrl=function(){return"{0}//{1}/".format([document.location.protocol,document.location.hostname])};PmMessagingFramework.prototype.closeMessageAndOverlay=function(n){var t=this;setTimeout(function(){t.closeMessage(n);t.removeOverlayBackground()},100)};PmMessagingFramework.prototype.closeMessage=function(n){var t={};$.each(n[0].attributes,function(){t[this.name.toLowerCase()]=this.value});this.setMsgIdShown(n,null);n.attr(this.customAttribs.msgId)!==undefined&&raiseError("pmmsgid attribute not removed!");t.pmmsgisglobal===undefined&&raiseError("closeMessage - pmmsgisglobal undefined!");t.pmmsgisglobal===(!0).toString()?pmFramework.closeGlobalMessage(t.pmmsgid,t.pmmsgexpiry):hasNonZeroValue(t.pmpushgraphicid)?pmFramework.closeTargetedMessage(t.pmpushgraphicid):this.setAdditionalData(this.additionalDataAttribs.highImportance,t.pmmsgid);pmFramework.processNextQueuedMessage(t.pmpositionid)};PmMessagingFramework.prototype.closeGlobalMessage=function(n,t){pmResolver.instance.setMessageAsRead(n,t)};PmMessagingFramework.prototype.closeTargetedMessage=function(n){this.updatePushGraphicStatus(n)};PmMessagingFramework.prototype.getLayoutForPosition=function(n,t){var i,r;if(hasValue(t.layouts))for(i=0;i<t.layouts.length;i++)if(stringToInt(t.layouts[i].PI)===n)return t.layouts[i].LI;return raiseError("layout missing from received data for msgId:"+t.MI),t.isGlobal&&(r=pmResolver.instance,r.setMessageAsRead(t.MI,t.ET)),null};PmMessagingFramework.prototype.getMsgImagePath=function(n){return pmConfigParams.messageImagePath+n};PmMessagingFramework.prototype.getCtlImagePath=function(n){return typeof pmConfigParams!="undefined"?pmConfigParams.controlImagePath+n:null};PmMessagingFramework.prototype.createTestLayout=function(n,t){return{LI:n,PI:t}};PmMessagingFramework.prototype.createTestRule=function(n,t,i,r,u,f,e){return{LS:n,AI:t,PI:i,TD:r,TT:u,GI:f,GG:e}};PmMessagingFramework.prototype.createTestMessage=function(n,t,i,r,u,f,e,o){var s={MI:n,AC:t,IM:i,ST:r,TY:u,SU:f,ET:e,NG:o,isTestMessage:!0};return s.rules=[],s.layouts=[],s};PmMessagingFramework.prototype.createTestHeader=function(n,t,i,r,u){var f={HT:n,HR:t,UI:i,PC:r,LI:u};return f.messages=[],f};PmMessagingFramework.prototype.getTestScenarioNames=function(){return["WebAlert","NormalImportWebMsgs","Expandable","Overlay","TopBanner","GameWindow","OptInButton","PlayNowTest"]};PmMessagingFramework.prototype.createTestScenario=function(n){var i,t;i=this.createTestHeader("F",1,"123",pmConfigParams.productCode,1);switch(n){case 1:t=this.createTestMessage(0,"A",3,"","","High importance web message",null,0);i.messages.push(t);t=this.createTestMessage(0,"A",2,"","","Important importance web message",null,0);i.messages.push(t);t=this.createTestMessage(0,"A",1,"","","Normal importance web message",null,0);i.messages.push(t);break;case 2:t=this.createTestMessage(0,"A",2,"","","Important importance web message",null,0);i.messages.push(t);t=this.createTestMessage(0,"A",1,"","","Normal importance web message",null,0);i.messages.push(t);break;case 3:t=this.createTestMessage(0,"A",1,"","G","Message 3",null,0);t.rules.push(this.createTestRule(1,0,13,null,null,null,null));t.layouts.push(this.createTestLayout(302,2));t.layouts.push(this.createTestLayout(303,3));i.messages.push(t);break;case 4:t=this.createTestMessage(0,"A",1,"","G","Message 4",null,0);t.rules.push(this.createTestRule(1,0,1,null,null,null,null));t.layouts.push(this.createTestLayout(303,1));i.messages.push(t);break;case 5:t=this.createTestMessage(0,"A",1,"","G","Message 1",null,0);t.rules.push(this.createTestRule(1,0,9,null,null,null,null));t.layouts.push(this.createTestLayout(301,9));i.messages.push(t);break;case 6:t=this.createTestMessage(0,"A",1,"","G","Message 1",null,0);t.rules.push(this.createTestRule(1,2,10,null,null,null,"FeaturedGames"));t.layouts.push(this.createTestLayout(300,10));t.rules.push(this.createTestRule(1,3,10,null,null,"fbr",null));t.layouts.push(this.createTestLayout(301,10));i.messages.push(t);break;case 7:t=this.createTestMessage(0,"A",1,"","G","Message 1",null,0);t.rules.push(this.createTestRule(1,1,1,null,null,null,null));t.layouts.push(this.createTestLayout(300,1));i.messages.push(t);break;case 8:t=this.createTestMessage(0,"A",1,"","G","Message 1",null,0);t.rules.push(this.createTestRule(1,1,1,null,null,null,null));t.layouts.push(this.createTestLayout(300,1));i.messages.push(t)}return i};PmMessagingFramework.prototype.pushTestScenario=function(n){onPushMessageData(this.createTestScenario(n))};PmMessagingFramework.prototype.onPushMessageDataInternal=function(){this.pmData!==null&&pmFramework.processMessages(data)};PmMessagingFramework.prototype.setGamesGroupAttributes=function(n){n!==undefined&&($("[pmgamessectionid]",n.context).removeAttr("pmgamessectionid").removeAttr("pmareaid"),$(n.activeCssClass,n.context).attr("pmgamessectionid",n.sectionName).attr("pmareaid",2),this.pageProfile.gameGroupId=n.sectionName,this.processNextQueuedMessage(9))};$(document).ready(function(){if(pmFramework.isDebug){var r,n,t,i;for($("span.spanTime").click(function(){i.slideDown("slow")}),r='<a id="pmTestLink{0}" onclick="pmFramework.pushTestScenario({0})">{1}<\/a><span>&nbsp;|&nbsp;<\/span>',t=pmFramework.getTestScenarioNames(),i=$("span.spanTime").append('<div id="testmessages"/>').find("div#testmessages"),n=1;n<=t.length;n++)i.append(r.format([n,t[n-1]]))}});NewIboData.prototype.GetMaxMsgChars=function(){var n=$("body").data("pageAttributes"),t=38;return n!==null&&n!==undefined&&n.pushWebMessagingDropdownMaxChars!==null&&n.pushWebMessagingDropdownMaxChars!==undefined&&(t=n.pushWebMessagingDropdownMaxChars),t};NewIboData.prototype.removeMessage=function(n){this.contains(n)&&(this.messages.splice(this.indexOf(n),1),this.renderMessages())};NewIboData.prototype.getMessageId=function(n){return"msg_"+n.MI};NewIboData.prototype.indexOf=function(n){for(var t=0;t<this.messages.length;t++)if(this.messages[t].MI==n.MI)return t;return this.notFoundIndex};NewIboData.prototype.contains=function(n){return this.indexOf(n)>this.notFoundIndex};NewIboData.prototype.addMessage=function(n){if(!this.contains(n)){for(var t=0;t<this.messages.length;t++)if(!(this.messages[t].MHR<n.MHR)&&!(this.messages[t].IM>=n.IM))break;t===this.messages.length?this.messages.push(n):this.messages.splice(t,0,n);this.renderMessages()}};NewIboData.prototype.renderMessage=function(n){var i=this.getMessageId(n),r,t,u;$("li",this.messageHolder).length>4||(u="height=600,width=800,status=yes,toolbar=no,menubar=no,location=no,left=20,top=20,scrollbars=yes,resizable=yes",r=(n.SU.length>this.maxMsgChars?n.SU.substring(0,this.maxMsgChars)+"...":n.SU)+(n.MHR===5||pmFramework.isMsgHighImportance(n)?' <span class="highImportanceExclaim">!<\/span>':""),t=$("body").data("DirectPushUrl")+n.MI,$(this.messageHolder).append($("<li />").addClass("Message").css("display","none").attr("id",i).html($("<a />").attr("target","_blank").attr("href",t).html(r)).click(function(n){n.preventDefault();window.open(t,"MMM",u)})),$("#"+i).slideDown(this.effectDuration,"swing"))};NewIboData.prototype.clearMessages=function(){$(this.messageHolder).children().remove()};NewIboData.prototype.renderMessages=function(){var n;for(this.clearMessages(),n=0;n<this.messages.length&&n<this.maxMessageCount;n++)this.renderMessage(this.messages[n]);this.setMessageCount(this.messages.length)};NewIboData.prototype.insertMessage=function(n,t){n.append('<li class="Message">'+t.shortText+"<\/li>")};NewIboData.prototype.iboDoRender=function(n){var t=$("#iboMessageHolder");this.insertMessage(t,n);$("a#Messages","#iboSummary").fadeOut(this.effectDuration,this.setMessageCount)};NewIboData.prototype.setMessageCount=function(n){var t;if($(".responsive-header").length>0){this.UpdateResponsiveHeaderEnvelope(n);return}t=n;$(".aEmailsReskin","#iboSummary").length>0?($(".aEmailsReskin","#iboSummary").html(t<=this.maxMessageCount?t:"&sect;"),$(".aEmailsReskin","#iboSummary").fadeIn(this.effectDuration)):($("a#Messages","#iboSummary").html("("+(t<=this.maxMessageCount?t:"&sect;")+")"),$("a#Messages","#iboSummary").fadeIn(this.effectDuration));t>0?$("div.Header div.RightHandSide div.TopLine div.MessageIconContainer").length>0?($("div.Header div.RightHandSide div.TopLine div.MessageIconContainer").hover(function(){$("#iboAnchor").show()},function(){$("#iboAnchor").hide()}),this.showMsgDropDown&&$("#iboSummary").removeClass("iboSummaryInactive").addClass("iboSummaryActive")):$("#iboMailIconHighlight").css("display","block"):$("#iboMailIconHighlight").css("display","none");t>0?$("div.Header div.RightHandSide div.TopLine div.MessageIconContainer").length==0&&($("#iboSummary").unbind("click").unbind("mouseenter mouseleave"),$("#iboSummary").parents("td").hover(function(){$("#iboAnchor").show()},function(){$("#iboAnchor").hide()})):($("div.Header div.RightHandSide div.TopLine div.MessageIconContainer").unbind("mouseenter mouseleave"),$("#iboAnchor").fadeOut(iboData.effectDuration),$("#iboSummary").unbind("click").click(function(){$("#iboAnchor .RML").click()}).parents("td").unbind("mouseenter mouseleave"))};NewIboData.prototype.UpdateResponsiveHeaderEnvelope=function(n){var t=$(".responsive-header .user-links .envelope");n>0?(t.addClass("envelope-icon-unread-messages"),t.removeClass("envelope-icon-all-messages-read")):(t.addClass("envelope-icon-all-messages-read"),t.removeClass("envelope-icon-unread-messages"))};$(document).ready(function(){var n=bet365.GetBrowser();n.match(/IE/ig)!=null?(setTimeout(tbInitialise,100),setTimeout(expandableOverlayInit,200),setTimeout(newMessagesInitialise,500),setTimeout(overlayControlInit,100)):(tbInitialise(),expandableOverlayInit(),newMessagesInitialise(),overlayControlInit())});$(document).ready(function(){"use strict";var n=$("div.HeaderWrapper"),t;n.length>0&&(t=bet365.cmsCore.getPageAttributes($),bet365.cmsCore.enableLoggingIfRequired(t),t&&t.handleLogout||bet365.cmsCore.Session.SetupLogOutLink(),bet365.cmsCore.DropDowns.SetupLanguageSelector(n),bet365.cmsCore.DropDowns.SetupServicesSelector(n),bet365.cmsCore.DropDowns.SetupBalanceSelector(n),setInterval(function(){bet365.cmsCore.UpdateClock()},1e3));bet365.cmsCore.Session.SessionMonitor.start()});bet365.cmsCore.getPageAttributes=function(n){"use strict";return n(document.body).data("pageAttributes")};bet365.cmsCore.enableLoggingIfRequired=function(n){"use strict";bet365.cmsCore.log&&n&&n.enableJavascriptLogging&&bet365.cmsCore.log.enable()};bet365.cmsCore.UpdateClock=function(){var n,i,r,u,t,f,e,o;t=$("#CurrentTime");n=new Date(t.data("date"));n.setTime(n.getTime()+1e3);i=n.getHours();r=n.getMinutes();u=n.getSeconds();$("#clock").text((i<10?"0"+i:i)+":"+(r<10?"0"+r:r)+":"+(u<10?"0"+u:u));t.data("date",n);f=t.find(".hidLoginTime");f.length>0&&(e=new Date(f[0].innerText),o=n-e,o>6e4&&(f.remove(),t.find(".spanLastLoginText").fadeOut(1e3),t.find(".spanLastLogin").fadeOut(1e3)))};bet365.cmsCore.Login={ConcatenateOriginalAndAdditionalQueryStringParameters:function(n,t){var i=$(".txtAdditionalItems",$(n).closest("form")).val();return!i||!i.length?t:!t||!t.length?i:t+"&"+i},SetPasswordHiddenField:function(n){var i=n.find(".protectedP").val(),t=encodeURIComponent(i);n.find(".protectedP").val(t);n.find(".txtPassword").val(t)},SubmitCredentials:function(n){return bet365.cmsCore.Login.SetPasswordHiddenField(n),n.find(".loginSubmit, .submitButton").click()}};bet365.cmsCore.DropDowns={SetupLanguageSelector:function(n){var t=n.find(".LanguageSelector");t.find("dt").click(function(){var n=$(this);n.hasClass("active")?n.removeClass("active"):n.addClass("active");t.find("dd ul").toggle()});$(document).bind("click",function(n){var i=$(n.target);i.parents().hasClass("LanguageSelector")||(t.find("dt").removeClass("active"),t.find("dd ul").hide(),t.find(".LanguageSelectorTitle").removeClass("Hover"),t.find(".LanguageSelectorHeaderIcon").removeClass("Hover"));$(".DownloadPopupContainer[style*='display: block']").length!==0&&(i.hasClass("DownloadPopupContainer")||i.parents().hasClass("DownloadPopupContainer")||bet365.popups.hideDialog(".DownloadPopupContainer"))});$(".LanguageSelector li ").click(function(){$(".header-version-7").length>0&&$(this).find("a").length>0&&(window.location.href=$(this).attr("data-languageurl"))});t.hover(function(){$(this).find(".LanguageSelectorTitle").addClass("Hover");$(this).find(".LanguageSelectorHeaderIcon").addClass("Hover")},function(){$("dt",this).hasClass("active")||($(this).find(".LanguageSelectorTitle").removeClass("Hover"),$(this).find(".LanguageSelectorHeaderIcon").removeClass("Hover"))})},PopulateBalances:function(n){n.ajax({dataType:"json",url:"/balance/balance",cache:!1,success:function(t){n("span.BonusValue").text(t.Bonus);n("span.WithdrawableValue").text(t.Withdrawable);n("span.NonWithdrawableValue").text(t.NonWithdrawable);n("span.TotalValue").text(t.Total);bet365.cmsCore.DropDowns.OverwriteBalanceSelectorTitleWithSportsAndGamesTotalBalance(t)}})},SetupRefreshBalance:function(n){bet365.cmsCore.DropDowns.PopulateBalances($);$(n).unbind("click");$(n).addClass("refreshClicked");setTimeout(function(){$(n).removeClass("refreshClicked");$(n).click(function(){bet365.cmsCore.DropDowns.SetupRefreshBalance(n)})},5e3)},SetupBalanceSelector:function(n){var t=n.find(".BalanceSelector");bet365.cmsCore.DropDowns.RecordOriginalBalanceSelectorTitle();t.find("dt").click(function(){var n=$(this),i;n.hasClass("active")?n.removeClass("active"):(n.addClass("active"),bet365.cmsCore.DropDowns.PopulateBalances($));i=t.find("dd ul");i.toggle();i.is(":hidden")&&bet365.cmsCore.DropDowns.RestoreOriginalBalanceSelectorTitle()});$(".BalanceSelector .firstRow").click(function(){$(".header-version-7").length>0?bet365.cmsCore.DropDowns.SetupRefreshBalance(this):bet365.cmsCore.DropDowns.PopulateBalances($)});$(document).bind("click",function(n){var i=$(n.target);i.parents().hasClass("BalanceSelector")||(t.find("dt").removeClass("active"),t.find("dd ul").hide(),bet365.cmsCore.DropDowns.RestoreOriginalBalanceSelectorTitle(),t.find(".BalanceSelectorTitle").removeClass("Hover"),t.find(".BalanceSelectorHeaderIcon").removeClass("Hover"));$(".DownloadPopupContainer[style*='display: block']").length!==0&&(i.hasClass("DownloadPopupContainer")||i.parents().hasClass("DownloadPopupContainer")||bet365.popups.hideDialog(".DownloadPopupContainer"))});t.hover(function(){$(this).find(".BalanceSelectorTitle").addClass("Hover");$(this).find(".BalanceSelectorHeaderIcon").addClass("Hover")},function(){$("dt",this).hasClass("active")||($(this).find(".BalanceSelectorTitle").removeClass("Hover"),$(this).find(".BalanceSelectorHeaderIcon").removeClass("Hover"))})},RecordOriginalBalanceSelectorTitle:function(){$(".BalanceSelectorTitle .BalanceSelectorHeader").data("origBalanceTitle",$(".BalanceSelectorTitle .BalanceSelectorHeader").text())},RestoreOriginalBalanceSelectorTitle:function(){$(".BalanceSelectorTitle .BalanceSelectorHeader").text($(".BalanceSelectorTitle .BalanceSelectorHeader").data("origBalanceTitle"))},OverwriteBalanceSelectorTitleWithSportsAndGamesTotalBalance:function(n){n.SportsAndGamesTotalBalance!==null&&$("span.BalanceSelectorHeader").text(n.SportsAndGamesTotalBalance)},SetupServicesSelector:function(n){var t=n.find(".ServicesSelector"),i,r;t.find("dt").click(function(){var n=$(this);n.hasClass("active")?n.removeClass("active"):n.addClass("active");t.find("dd ul").toggle();$(".ServicesSelectorTitle",n).addClass("Hover");$(".ServicesSelectorHeaderIcon",n).addClass("Hover")});$(document).bind("click",function(n){var i=$(n.target);i.parents().hasClass("ServicesSelector")||(t.find("dt").removeClass("active"),t.find("dd ul").hide(),t.find(".ServicesSelectorTitle").removeClass("Hover"),t.find(".ServicesSelectorHeaderIcon").removeClass("Hover"));$(".DownloadPopupContainer[style*='display: block']").length!==0&&(i.hasClass("DownloadPopupContainer")||i.parents().hasClass("DownloadPopupContainer")||bet365.popups.hideDialog(".DownloadPopupContainer"))});i=t.find("ul li a");i.click(function(){t.find("dt").removeClass("active");t.find("dd ul").hide()});r=t.find("ul").width()-20;i.css("width",r+"px");t.hover(function(){$(this).find(".ServicesSelectorTitle").addClass("Hover");$(this).find(".ServicesSelectorHeaderIcon").addClass("Hover")},function(){$("dt",this).hasClass("active")||($(this).find(".ServicesSelectorTitle").removeClass("Hover"),$(this).find(".ServicesSelectorHeaderIcon").removeClass("Hover"))})}};__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var t=function(){function n(n,t){t===void 0&&(t=!0);this.type=n;this.bubbles=t}return n.COMPLETE="COMPLETE",n.ERROR="ERROR",n}();n.Event365=t}(ns_lo_event||(ns_lo_event={})),function(n){var t=function(){function n(){this._eventList={}}return n.prototype.addEventListener=function(n,t,i){this._eventList[n]||(this._eventList[n]=[]);this._eventList[n].push([t,i||window])},n.prototype.dispatchEvent=function(n){var i=n.bubbles,t;if(n.target||(n.target=this),this._eventList[n.type])for(t=0,t;t<this._eventList[n.type].length;t++)this._eventList[n.type][t][0].call(this._eventList[n.type][t][1],n);i&&this.parent&&this.parent.bubbleEvent(n)},n.prototype.bubbleEvent=function(n){this.dispatchEvent(n);for(var t=this.parent;t;){if(t.bubbleEvent){t.bubbleEvent(n);break}t=t.parent}},n.prototype.removeEventListener=function(n,t){var r=this._eventList[n],i,u;if(r)for(i=0,u=r.length,i;i<u;i++)r[i][0]==t&&(r.splice(i,1),u=r.length,i>-1&&i--)},n.prototype.hasEventListener=function(n){var t=this._eventList[n];return t&&t.length>0},n.prototype.toString=function(){return"[EventDispatcher]"},n}();n.EventDispatcher=t}(ns_lo_event||(ns_lo_event={})),function(n){var t=ns_lo_event.Event365,i=function(n){function t(t,i){n.call(this,t);this.message=i}return __extends(t,n),t.prototype.toString=function(){return"[MessageEvent type="+this.type+" message="+this.message+"]"},t.MESSAGE_RECEIVED="messageReceived",t}(t);n.MessageEvent=i}(ns_lo_core_event||(ns_lo_core_event={})),function(n){var t;(function(n){var t=function(){function t(){}return t.init=function(){this.instance=new n.LogService;t.status=this.getCookie("debugLogger")==="true"?!0:!1},t.prototype.write=function(n){t.status&&this.writeToConsole(n)},t.prototype.writeToConsole=function(n){"console"in self&&"log"in console&&n&&n.length>=1&&typeof console=="object"&&console.log(n)},t.getCookie=function(n){var i=document.cookie,t,r;return i.length>0&&(t=i.indexOf(n+"="),t!==-1)?(t=t+n.length+1,r=i.indexOf(";",t),r==-1&&(r=i.length),decodeURIComponent(i.substring(t,r))):""},t.status=!1,t}();n.LogService=t})(t=n.Logging||(n.Logging={}))}(PushMessaging||(PushMessaging={})),function(n){n.ReaditConnectionStatus={DISCONNECTED:0,PENDING:1,CONNECTED:2};n.StandardProtocolConstants={RECORD_DELIM:"\x01",FIELD_DELIM:"\x02",HANDSHAKE_MESSAGE_DELIM:"\x03",MESSAGE_DELIM:"\b",CLIENT_CONNECT:0,CLIENT_POLL:1,CLIENT_SEND:2,CLIENT_CONNECT_FAST:3,INITIAL_TOPIC_LOAD:20,DELTA:21,CLIENT_SUBSCRIBE:22,CLIENT_UNSUBSCRIBE:23,CLIENT_SWAP_SUBSCRIPTIONS:26,NONE_ENCODING:0,ENCRYPTED_ENCODING:17,COMPRESSED_ENCODING:18,BASE64_ENCODING:19,SERVER_PING:24,CLIENT_PING:25,CLIENT_ABORT:28,CLIENT_CLOSE:29,ACK_ITL:30,ACK_DELTA:31,ACK_RESPONSE:32}}(ns_loReadit||(ns_loReadit={})),function(n){var t=function(){function n(n,t,i,r){this.messageType=n;this.topic=t;this.message=i;this.userHeaders=r}return n.prototype.toString=function(){return"[ReaditMessage messageType="+this.messageType+" message="+this.message+" topic="+this.topic+"]"},n}();n.ReaditMessage=t}(ns_loReadit_message||(ns_loReadit_message={})),function(n){var t=function(){function n(n,t,i){this.host=n;this.port=t;this.defaultTopic=i}return n.prototype.toString=function(){return"[host:"+this.host+", port:"+this.port+", topic:"+this.defaultTopic+"]"},n}();n.ReaditConnectionDetails=t}(ns_loReadit_details||(ns_loReadit_details={})),function(n){var t=function(n){function t(){n.apply(this,arguments)}return __extends(t,n),t.CONNECTED="connected",t.DISCONNECTED="disconnected",t.CONNECTION_FAILED="connectionFailed",t}(ns_lo_event.Event365);n.TransportConnectionEvent=t}(ns_loReadit_events||(ns_loReadit_events={})),function(n){var i=0,r=1,u=3,t=4,f=function(){function n(){this.xdr=new XDomainRequest;this.xdr.timeout=6e4;this.status=0;this.readyState=i;this.responseText=null;this.contentType=null;this.onreadystatechange=null}return n.TryCreate=function(t){return!("withCredentials"in t)&&XDomainRequest?new n:t},n.prototype._progress=function(){this.readyState=u;this.onreadystatechange&&this.onreadystatechange.call(this)},n.prototype._timeout=function(){this.readyState=t;this.status=0;this.responseText=null;this.contentType=null;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=undefined;this.onreadystatechange&&this.onreadystatechange.call(this)},n.prototype._onerror=function(){this.readyState=t;this.status=0;this.responseText=null;this.contentType=null;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=undefined;this.onreadystatechange&&this.onreadystatechange.call(this)},n.prototype._onload=function(){this.readyState=t;this.status=200;this.responseText=this.xdr.responseText;this.contentType=this.xdr.contentType;this.xdr.onload=this.xdr.onerror=this.xdr.ontimeout=function(){};this.xdr=undefined;this.onreadystatechange&&this.onreadystatechange.call(this)},n.prototype.open=function(n,t){var i=this,u=this.xdr.open(n,t);return this.xdr.onprogress=function(){i._progress()},this.xdr.ontimeout=function(){i._timeout()},this.xdr.onerror=function(){i._onerror()},this.xdr.onload=function(){i._onload()},this.readyState=r,this.onreadystatechange&&this.onreadystatechange.call(this),u},n.prototype.send=function(n){this.xdr.send(n)},n.prototype.abort=function(){return this.readyState=i,this.onreadystatechange=null,this.xdr.abort()},n}();n.XDomainXMLHttpRequest=f}(ns_loReadit_util||(ns_loReadit_util={})),function(n){var t=ns_loReadit.StandardProtocolConstants,i=ns_loReadit_events.TransportConnectionEvent,f=ns_loReadit_util.XDomainXMLHttpRequest,u=ns_lo_core_event.MessageEvent,e=ns_loReadit_message.ReaditMessage,r=PushMessaging.Logging,o=function(n){function o(){n.apply(this,arguments);this._poller=null;this._messageDispatcher=null;this._connectionTimeout=0;this._url="";this._requestActive=!1;this._requestQueue=[];this._connectionID="";this._sID="";this._sequence=0;this._connected=!1;this._hasNativeXmlHttp=!1;this._transportIsSupported=this.checkXmlHttpAvailable();this._activeXVersion=null;this.siteIdLookup={L:"1",M:"2",I:"3"}}return __extends(o,n),o.prototype.connect=function(){var i=this,n;this._connectionTimeout=setTimeout(function(){i.connectionFailed("timeout after "+o.CONNECTION_TIMEOUT_LIMIT+"ms")},o.CONNECTION_TIMEOUT_LIMIT);try{this._url=this._connectionDetails.host+":"+this._connectionDetails.port+o.TRAILING;r.LogService.instance.write("Attempting connection to "+this._url);n=this.getRequest({method:t.CLIENT_CONNECT,transporttimeout:o.TRANSPORT_TIMEOUT,type:"F",topic:this._connectionDetails.defaultTopic});r.LogService.instance.write("Connecting with:"+n);n.onreadystatechange=function(){if(n.readyState==4){if(clearTimeout(i._connectionTimeout),n.status==200){var u=n.responseText.split(t.HANDSHAKE_MESSAGE_DELIM),f=u[0],r=f.split("\x02");r[0]=="100"&&i.handshakeHandler(r[1]);r[0]=="111"&&i.connectionFailed("connection rejected 111")}else i.connectionFailed("Connection Rejected - Invalid response status:"+n.status);n.onreadystatechange=null}};r.LogService.instance.write("Sending request...");n.send(n.params||"")}catch(u){clearTimeout(this._connectionTimeout);this.connectionFailed("Unable to open Socket.")}},o.prototype.send=function(n,i){this.put(this.getRequest({method:t.CLIENT_SEND,data:encodeURIComponent(i),topic:n,s:this._sequence++}))},o.prototype.close=function(){this.dispose();this.dispatchEvent(new i(i.DISCONNECTED))},o.prototype.setMessageDispatcher=function(n){this._messageDispatcher=n},o.prototype.setConnectionDetails=function(n){this._connectionDetails=n},o.prototype.connectionFailed=function(){var n=this._connected;this.dispose();n?this.dispatchEvent(new i(i.DISCONNECTED)):this.dispatchEvent(new i(i.CONNECTION_FAILED))},o.prototype.getRequest=function(n){var t,i,u;t=this._hasNativeXmlHttp?f.TryCreate(new XMLHttpRequest):new ActiveXObject(this._activeXVersion);try{t.open("POST",this._url+(this._connectionID?"?id="+this._connectionID:""));this._connectionID&&(n.clientid=this._connectionID);i="";t.setRequestHeader&&t.setRequestHeader("Content-Type","text/plain");for(u in n)i+=(i.length>0?"&":"")+u+"="+encodeURIComponent(n[u]);return t.params=i,t}catch(e){r.LogService.instance.write(e)}return null},o.prototype.put=function(n){var i=this,t;if(n!==null&&this._requestQueue.push(n),!this._requestActive&&this._connectionID!==""){if(this._requestQueue.length>0)t=this._requestQueue.shift();else return;this._requestActive=!0;t.onreadystatechange=function(){t.readyState==4&&(t.status==200&&t.responseText?i.processMessage(t.responseText):t.status!=200&&i.connectionFailed("Connection lost during put."),i.queuedRequestCompleteHandler(),t.onreadystatechange=null)};"params"in t?t.send(t.params||""):t.send("")}},o.prototype.poll=function(){var n=this;this._connected&&(this._poller=this.getRequest({method:t.CLIENT_POLL,s:this._sequence++,topic:""}),this._poller.complete=!1,this._poller.onreadystatechange=function(){n._poller.readyState!=4||n._poller.complete||(n._poller.complete=!0,n._poller.onreadystatechange=null,n._poller.status==200?n.pollerCompleteHandler(n._poller.responseText):n._connected&&n.connectionFailed('Connection lost during poll statusCode:"'+n._poller.status+'" statusText:"'+n._poller.statusText+'"'))},"params"in this._poller?this._poller.send(this._poller.params||""):this._poller.send(""))},o.prototype.dispose=function(){if(this._connected=!1,this._connectionID=null,this._poller){try{this._poller.abort()}catch(n){}this._poller.onreadystatechange=null;this._poller=null}this._messageDispatcher=null;clearTimeout(this._connectionTimeout)},o.prototype.checkXmlHttpAvailable=function(){try{return new XMLHttpRequest,this._hasNativeXmlHttp=!0,!0}catch(n){}return!1},o.prototype.handshakeHandler=function(n){this._requestActive=!1;this._connectionID=n;this._sID=n?this.siteIdLookup[n.charAt(0).toUpperCase()]||"0":"0";this._connected=!0;r.LogService.instance.write("connected as "+this._connectionID+". "+this._connectionDetails);this.poll();this.dispatchEvent(new i(i.CONNECTED))},o.prototype.processMessage=function(n){var r,i,f;if(n){r=n.split(t.MESSAGE_DELIM);do{i=r.shift();f=i.charCodeAt(0);switch(f){case t.INITIAL_TOPIC_LOAD:case t.DELTA:var o=i.split(t.RECORD_DELIM),s=o[0].split(t.FIELD_DELIM),h=s.shift(),c=h.substr(1,h.length),l=i.substr(o[0].length+1);this._messageDispatcher!==null&&this._messageDispatcher.dispatchEvent(new u(u.MESSAGE_RECEIVED,new e(String(f),c,l,s)));break;case t.CLIENT_ABORT:case t.CLIENT_CLOSE:this.connectionFailed("Connection close/abort during poll.")}}while(r.length)}},o.prototype.pollerCompleteHandler=function(n){if(this.processMessage(n),this._connected){var t=this;setTimeout(function(){t.poll()},o.pollDelay)}},o.prototype.queuedRequestCompleteHandler=function(){this._requestActive=!1;this._requestQueue.length&&this.put(null)},o.prototype.toString=function(){return"[HttpTransportMethod]"},o.CONNECTION_TIMEOUT_LIMIT=15e3,o.TRANSPORT_TIMEOUT=20,o.TRAILING="/pow2/",o.pollDelay=10,o}(ns_lo_event.EventDispatcher);n.HttpTransportMethod=o}(ns_loReadit_methods||(ns_loReadit_methods={})),function(n){var t=ns_loReadit_events.TransportConnectionEvent,i=ns_loReadit.ReaditConnectionStatus,u=ns_loReadit_methods.HttpTransportMethod,r=PushMessaging.Logging,f=function(n){function f(t,r){n.call(this);this._maxRetryConnectionAttempts=1;this._retryConnectionIntervalMilliseconds=5e3;this._connectionRetryCount=0;this._currentConnectionDetails=null;this._currentTransportMethod=null;this._connectionStatus=i.DISCONNECTED;this._maxRetryConnectionAttempts=t;this._retryConnectionIntervalMilliseconds=r}return __extends(f,n),f.prototype.connect=function(n){this._connectionStatus==i.DISCONNECTED&&(this._connectionStatus=i.PENDING,this._currentConnectionDetails=n,this.connectToNext())},f.prototype.send=function(n,t){this._currentTransportMethod.send(n,t)},f.prototype.close=function(){this._currentTransportMethod&&(this.disposeCurrentTransportMethod(),this._currentTransportMethod.close());this._connectionStatus=i.DISCONNECTED},f.prototype.connectToNext=function(){this.disposeCurrentTransportMethod();this._currentTransportMethod=new u;this._currentTransportMethod.addEventListener(t.CONNECTED,this.transportConnectedHandler,this);this._currentTransportMethod.addEventListener(t.CONNECTION_FAILED,this.transportConnectionFailedHandler,this);this._currentTransportMethod.addEventListener(t.DISCONNECTED,this.transportDisconnectedHandler,this);this._currentTransportMethod.setConnectionDetails(this._currentConnectionDetails);this._currentTransportMethod.setMessageDispatcher(this);this._currentTransportMethod.connect()},f.prototype.disposeCurrentTransportMethod=function(){this._currentTransportMethod&&(this._currentTransportMethod.removeEventListener(t.CONNECTED,this.transportConnectedHandler),this._currentTransportMethod.removeEventListener(t.CONNECTION_FAILED,this.transportConnectionFailedHandler),this._currentTransportMethod.removeEventListener(t.DISCONNECTED,this.transportDisconnectedHandler))},f.prototype.transportConnectedHandler=function(n){this._connectionStatus=i.CONNECTED;this._connectionRetryCount=0;this.dispatchEvent(n)},f.prototype.transportConnectionFailedHandler=function(){var n=this;this.disconnectTimer=setTimeout(function(){n.retryConnect();clearTimeout(n.disconnectTimer)},this._retryConnectionIntervalMilliseconds)},f.prototype.transportDisconnectedHandler=function(n){var t=this;this.close();this.dispatchEvent(n);this.disconnectTimer=setTimeout(function(){t.retryConnect();clearTimeout(t.disconnectTimer)},this._retryConnectionIntervalMilliseconds)},f.prototype.retryConnect=function(){this._connectionRetryCount++;this._connectionRetryCount<=this._maxRetryConnectionAttempts?(r.LogService.instance.write("Retry connect attempt "+this._connectionRetryCount+" of "+this._maxRetryConnectionAttempts),this.connectToNext()):(this._connectionRetryCount=0,r.LogService.instance.write("Max Retry Attempts exceeded. Aborting retry connect."))},f.prototype.toString=function(){return"[ReaditClient]"},f}(ns_lo_event.EventDispatcher);n.ReadItClient=f}(ns_loReadit_clients||(ns_loReadit_clients={})),function(n){var t=ns_lo_event.Event365,i=function(n){function t(t,i){n.call(this,t);this._config=i}return __extends(t,n),t.prototype.getConfig=function(){return this._config},t.prototype.getHttpPort=function(){return this._httpPort},t.prototype.getHttpHost=function(){return this._httpHost},t.prototype.setHttpPort=function(n){this._httpPort=n},t.prototype.setHttpHost=function(n){this._httpHost=n},t.CONFIG_LOADED="ConfigLoaded",t.CONFIG_FAILED="ConfigFailed",t}(t);n.ConfigEvent=i}(PushMessaging||(PushMessaging={})),function(n){var i=ns_lo_event.EventDispatcher,r=ns_loReadit_util.XDomainXMLHttpRequest,t=n.Logging,u=function(i){function u(){i.apply(this,arguments)}return __extends(u,i),u.prototype.load=function(i){var f=this,u;u=r.TryCreate(new XMLHttpRequest);u.open("GET",i);u.onreadystatechange=function(){var i,r;u.readyState!=4||u.complete||(u.complete=!0,u.onreadystatechange=null,u.status==200?(t.LogService.instance.write("Config::load - "+u.responseText),i=new n.ConfigEvent(n.ConfigEvent.CONFIG_LOADED,u.responseText),r=JSON.parse(u.responseText),i.setHttpHost(r.HttpHost),i.setHttpPort(r.HttpPorts)):(t.LogService.instance.write("Config::load - Failed with response status "+u.status),i=new n.ConfigEvent(n.ConfigEvent.CONFIG_FAILED,"")),f.dispatchEvent(i))};u.send("")},u}(i);n.Config=u}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){}return n.LOAD_FULL="F",n.LOAD_DELTA="D",n.ACTION_ADD="A",n.ACTION_UPDATE="U",n.ACTION_DELETE="D",n.HEADER_TYPE="HT",n.HEADER_NUM_RECORDS="HR",n.HEADER_USER_ID="UI",n.HEADER_PRODUCT_CODE="PC",n.HEADER_LANGUAGE_ID="LI",n.MESSAGE_ID="MI",n.MESSAGE_ACTION="AC",n.MESSAGE_IMPACT_ID="IM",n.MESSAGE_TYPE="TY",n.MESSAGE_SUBJECT="SU",n.MESSAGE_EXPIRY_TIME="ET",n.MESSAGE_NUM_TEMPLATES="NT",n.TEMPLATE_NUM_RULES="NR",n.TEMPLATE_NUM_LAYOUTS="NL",n.RULE_LOGIN_OR_SESSION="LS",n.RULE_AREA_ID="AI",n.RULE_CLASSIFICATION_ID="CI",n.RULE_POSITION_ID="PI",n.RULE_TIME_DELAY="TD",n.RULE_TIME_TRIGGER="TT",n.RULE_FIXTURE_ID="FI",n.RULE_BET_CONFIRMATION="BC",n.RULE_GAME_ID="GI",n.RULE_GAME_GROUP_ID="GG",n.LAYOUT_ID="LI",n.LAYOUT_STATUS="ST",n.LAYOUT_POSITION_ID="PI",n}();n.FieldDefinitions=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){}return n.LENGTH_MESSAGE_ADD_UPDATE=7,n.LENGTH_MESSAGE_DELETE=2,n.LENGTH_TEMPLATE=1,n.LENGTH_RULE=10,n.LENGTH_LAYOUT=3,n.MESSAGE_ID=0,n.MESSAGE_ACTION=1,n.MESSAGE_IMPACT_ID=2,n.MESSAGE_TYPE=3,n.MESSAGE_SUBJECT=4,n.MESSAGE_EXPIRY_TIME=5,n.MESSAGE_NUM_TEMPLATES=6,n.TEMPLATE_NUM_RULES=0,n.TEMPLATE_NUM_LAYOUTS=1,n.RULE_LOGIN_OR_SESSION=0,n.RULE_AREA_ID=1,n.RULE_CLASSIFICATION_ID=2,n.RULE_POSITION_ID=3,n.RULE_TIME_DELAY=4,n.RULE_TIME_TRIGGER=5,n.RULE_FIXTURE_ID=6,n.RULE_BET_CONFIRMATION=7,n.RULE_GAME_ID=8,n.RULE_GAME_GROUP_ID=9,n.LAYOUT_ID=0,n.LAYOUT_STATUS=1,n.LAYOUT_POSITION_ID=2,n}();n.FieldIndexes=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){}return n.prototype.toString=function(){return"LI = "+this.LI+", ST = "+this.ST+", PI = "+this.PI},n}();n.GraphicLayout=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){}return n.prototype.toString=function(){return"LS = "+this.LS+", AI = "+this.AI+", CI = "+this.CI+", PI = "+this.PI+", TD = "+this.TD+", TT = "+this.TT+", FI = "+this.FI+", BC = "+this.BC+", GI = "+this.GI+", GG = "+this.GG},n}();n.GraphicRule=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){this.rules=[];this.layouts=[]}return n}();n.GraphicTemplate=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){this.templates=[]}return n.prototype.toString=function(){return"MI = "+this.MI+", AC = "+this.AC+", IM = "+this.IM+", TY = "+this.TY+", SU = "+this.SU+", ET = "+this.ET+", NT = "+this.NT},n}();n.PushMessage=t}(PushMessaging||(PushMessaging={})),function(n){var t=function(){function n(){this.messages=[]}return n.prototype.toString=function(){return"HR = "+this.HR+", HT = "+this.HT+", UI = "+this.UI+", PC = "+this.PC+", LI = "+this.LI},n}();n.PushMessageCollection=t}(PushMessaging||(PushMessaging={})),function(n){var t=ns_lo_event.Event365,i=function(n){function t(t,i,r){n.call(this,t);this.theTopic=i;this.theMessageCollection=r}return __extends(t,n),t.prototype.getTopic=function(){return this.theTopic},t.prototype.getMessageCollection=function(){return this.theMessageCollection},t.prototype.getHeaderType=function(){return this.theMessageCollection.HT},t.prototype.getNumberOfMessages=function(){return this.theMessageCollection.HR},t.prototype.getProductCode=function(){return this.theMessageCollection.PC},t.PUSH_MESSAGE="push_message",t.UNREAD_MESSAGE_COUNT_CHANGE="message_count_change",t.DISPLAY_HEADER_DROPDOWN="display_header_dropdown",t}(t);n.PushMessageEvent=i}(PushMessaging||(PushMessaging={})),function(n){function i(){try{var n="test";return localStorage.setItem(n,n),localStorage.removeItem(n),!0}catch(t){}return!1}var t=i(),r=function(){function n(){}return n.Add=function(n,i){t&&localStorage.setItem(n,i)},n.Get=function(n){return t?localStorage.getItem(n):null},n.Remove=function(n){t&&localStorage.removeItem(n)},n}();n.LocalStorage=r}(PushMessaging||(PushMessaging={})),function(n){var i=function(){function n(){}return n}(),t=function(){function t(){}return t.prototype.init=function(i){i===void 0&&(i=0);this.messages=JSON.parse(n.LocalStorage.Get(t.STORAGE_NAME));this.messages?i>0&&this.removeExpiredMessages(i):this.messages=[]},t.prototype.setMessageAsRead=function(i,r){this.messages[this.messages.length]={id:i,expiry:r};n.LocalStorage.Add(t.STORAGE_NAME,JSON.stringify(this.messages))},t.prototype.isMessageRead=function(n){for(var t=0;t<this.messages.length;t++)if(this.messages[t].id==n)return!0;return!1},t.prototype.removeExpiredMessages=function(i){for(var o,f,e=this.messages.length,u,r=0;r<e;r++)u=this.messages[r].expiry*1e3,i>u&&(o=new Date,o.setTime(u),this.messages.splice(r,1),f=!0,r--,e--);f&&n.LocalStorage.Add(t.STORAGE_NAME,JSON.stringify(this.messages))},t.prototype.setAdditionalData=function(i){n.LocalStorage.Add(t.ADDITIONAL_DATA_KEY,i)},t.prototype.getAdditionalData=function(){return n.LocalStorage.Get(t.ADDITIONAL_DATA_KEY)},t.STORAGE_NAME="b365push",t.ADDITIONAL_DATA_KEY="b365AD",t}();n.PushMessageStorage=t}(PushMessaging||(PushMessaging={})),function(n){var u=ns_loReadit_clients.ReadItClient,r=ns_loReadit_events.TransportConnectionEvent,t=ns_loReadit.StandardProtocolConstants,f=ns_lo_event.EventDispatcher,e=n.PushMessageCollection,o=ns_loReadit_details.ReaditConnectionDetails,s=ns_lo_core_event,i=n.Logging,h=function(f){function h(t,e,o,h){f.call(this);this.topic="__time";this.retryCount=3;this.retryIntervalMilliseconds=5e3;this.idleTimerIntervalMilliseconds=9e4;this.sessionToken=e;this.languageId=o;this.productCode=h;this.storage=new n.PushMessageStorage;this.storage.init();n.Logging.LogService.init();this.readItClient=new u(this.retryCount,this.retryIntervalMilliseconds);this.readItClient.addEventListener(r.CONNECTED,this.connected,this);this.readItClient.addEventListener(r.CONNECTION_FAILED,this.connectionFailed,this);this.readItClient.addEventListener(r.DISCONNECTED,this.disconnected,this);this.readItClient.addEventListener(s.MessageEvent.MESSAGE_RECEIVED,this.receiveMessages,this);var c=new n.Config;c.addEventListener(n.ConfigEvent.CONFIG_LOADED,function(n){i.LogService.instance.write("ConfigLoaded");this.publisherAddress=n.getHttpHost();this.publisherPort=n.getHttpPort();this.connect(this.topic)},this);c.load(t)}return __extends(h,f),h.prototype.connect=function(){i.LogService.instance.write("Connecting to topic "+this.topic);this.readItClient.close();this.readItClient.connect(new o(this.publisherAddress,this.publisherPort,this.topic))},h.prototype.disconnect=function(){i.LogService.instance.write("Disconnecting...");this.readItClient.close()},h.prototype.setAdditionalData=function(n){this.storage.setAdditionalData(n)},h.prototype.setMessageAsRead=function(n,t){this.storage.setMessageAsRead(n,t)},h.prototype.getAdditionalData=function(){return this.storage.getAdditionalData()},h.prototype.getMessages=function(n,i,r){var u="getMessage";u+=t.RECORD_DELIM+n+t.FIELD_DELIM+i+t.FIELD_DELIM+r;this.readItClient.send("command",u)},h.prototype.receiveMessages=function(n){i.LogService.instance.write("message received - "+n.message.message);this.resetConnectionIdleTimer();var u=n.message.topic,r=n.message.message,f=u.substr(u.lastIndexOf("_")+1);switch(f){case"MSG":r.lastIndexOf(t.RECORD_DELIM)==r.length-t.RECORD_DELIM.length&&(r=r.substr(0,r.lastIndexOf(t.RECORD_DELIM)));this.handleServerData(u,r);this.dispatchEvent(n);break;default:this.dispatchEvent(n)}},h.prototype.handleServerData=function(r,u){var a=u.split(t.RECORD_DELIM),y=r.split("_"),g=a.shift(),k=a.length>0&&a[0].length>0?a.length:0,c=new e,d=0,p,f,o,w,b,h,l,s,v;for(c.HR=k,c.HT=g,c.UI=y[0],c.PC=y[1],c.LI=y.length>2?Number(y[2]):1,i.LogService.instance.write(c.toString()),p=0;p<k;p++)if(f=a[p].split(t.FIELD_DELIM),o=new n.PushMessage,o.MI=Number(f[n.FieldIndexes.MESSAGE_ID]),o.AC=f[n.FieldIndexes.MESSAGE_ACTION],!this.storage.isMessageRead(o.MI)||o.AC==n.FieldDefinitions.ACTION_DELETE){if(o.AC==n.FieldDefinitions.ACTION_ADD||o.AC==n.FieldDefinitions.ACTION_UPDATE)for(o.IM=Number(f[n.FieldIndexes.MESSAGE_IMPACT_ID]),o.TY=f[n.FieldIndexes.MESSAGE_TYPE],o.SU=f[n.FieldIndexes.MESSAGE_SUBJECT],o.ET=Number(f[n.FieldIndexes.MESSAGE_EXPIRY_TIME]),o.NT=d=Number(f[n.FieldIndexes.MESSAGE_NUM_TEMPLATES]),o.templates=[],f=f.splice(n.FieldIndexes.LENGTH_MESSAGE_ADD_UPDATE,f.length-n.FieldIndexes.LENGTH_MESSAGE_ADD_UPDATE),w=0;w<d;w++){for(b=0,h=new n.GraphicTemplate,h.NR=b=Number(f[n.FieldIndexes.TEMPLATE_NUM_RULES]),h.rules=[],h.layouts=[],f=f.splice(n.FieldIndexes.LENGTH_TEMPLATE,f.length-n.FieldIndexes.LENGTH_TEMPLATE),l=0;l<b;l++)s=new n.GraphicRule,s.LS=Number(f[n.FieldIndexes.RULE_LOGIN_OR_SESSION]),s.AI=Number(f[n.FieldIndexes.RULE_AREA_ID]),s.CI=Number(f[n.FieldIndexes.RULE_CLASSIFICATION_ID]),s.PI=Number(f[n.FieldIndexes.RULE_POSITION_ID]),s.TD=Number(f[n.FieldIndexes.RULE_TIME_DELAY]),s.TT=Number(f[n.FieldIndexes.RULE_TIME_TRIGGER]),s.FI=Number(f[n.FieldIndexes.RULE_FIXTURE_ID]),s.BC=Number(f[n.FieldIndexes.RULE_BET_CONFIRMATION]),s.GI=f[n.FieldIndexes.RULE_GAME_ID],s.GG=f[n.FieldIndexes.RULE_GAME_GROUP_ID],h.rules.push(s),f=f.splice(n.FieldIndexes.LENGTH_RULE,f.length-n.FieldIndexes.LENGTH_RULE);for(h.NL=parseInt(f[0]),f=f.splice(1,f.length-1),l=0;l<h.NL;l++)v=new n.GraphicLayout,v.LI=Number(f[n.FieldIndexes.LAYOUT_ID]),v.ST=f[n.FieldIndexes.LAYOUT_STATUS],v.PI=Number(f[n.FieldIndexes.LAYOUT_POSITION_ID]),h.layouts.push(v),f=f.splice(n.FieldIndexes.LENGTH_LAYOUT,f.length-n.FieldIndexes.LENGTH_LAYOUT);o.templates.push(h)}c.messages.push(o)}this.dispatchMessageData(r,c)},h.prototype.dispatchMessageData=function(t,i){this.dispatchEvent(new n.PushMessageEvent(n.PushMessageEvent.PUSH_MESSAGE,t,i))},h.prototype.connected=function(){this.resetConnectionIdleTimer();this.getMessages(this.sessionToken,this.productCode,this.languageId)},h.prototype.connectionFailed=function(n){i.LogService.instance.write("Connection failed");this.dispatchEvent(n)},h.prototype.disconnected=function(n){i.LogService.instance.write("Disconnecting");this.dispatchEvent(n)},h.prototype.resetConnectionIdleTimer=function(){var n=this,t=this;clearTimeout(this.connectionIdleTimer);this.connectionIdleTimer=setTimeout(function(){i.LogService.instance.write("Connection appears idle, re-connecting...");clearTimeout(n.connectionIdleTimer);t.connect()},this.idleTimerIntervalMilliseconds)},h}(f);n.PushMessagingProxy=h}(PushMessaging||(PushMessaging={}));$(document).ready(function(){bet365.cmsCore.Session.LogoutIfRequired()});bet365.cmsCore.Session={LogoutIfRequired:function(){window.location.href.indexOf("logout=1")>0&&bet365.cmsCore.Session.LogOut()},LogOut:function(){bet365.cmsCore.Session.LogOutHandler(!0,!0)},LogOutWithoutRefresh:function(n){bet365.cmsCore.Session.LogOutHandler(!1,n)},LogOutHandler:function(n,t){(t===null||t===undefined)&&(t=!1);var i=bet365.cmsCore.getPageAttributes($),r=i.appPath,u=i&&i.enableManualMembersLogOut,f=function(){var t,u;if(n){var f=window.location.protocol+"//"+window.location.hostname+window.location.pathname,i=window.location.search.replace("?","").split("&"),r=[];for(t=0;t<i.length;t++)i[t]!==""&&i[t].toLowerCase()!=="logout=1"&&r.push(i[t]);u=r.length>0?"?"+r.join("&"):"";window.location=f+u}};u&&$("<iframe>",{src:i.membersLogOutUrl,style:"display:none"}).appendTo("body");$.ajax({type:"POST",contentType:"application/json; charset=utf-8",dataType:"json",data:"{clearKeepMeLoggedIn:"+t+"}",url:r+"SessionActivity/LogOut",complete:function(){f()}})},SetupLogOutLink:function(){$("div.HeaderWrapper a.LogOut").click(function(n){return n.preventDefault(),bet365.cmsCore.Session.LogOut(),!1})},SessionMonitor:{cookieName:"bet365_OpenAccount_Session",interval:null,cookiePattern:null,start:function(){var t=new Date,n,i;t=new Date(t.getTime()+108e5);n=this.cookieName+"=True;";n+="expires="+t.toGMTString()+";";n+="path=/";document.cookie=n;this.cookiePattern=new RegExp("(^|; )"+this.cookieName+"=True");i=this;this.interval=setInterval(function(){i.check()},500)},check:function(){var n=document.cookie;this.cookiePattern.test(n)||(document.cookie=this.cookieName+"=;expires="+(new Date).toGMTString()+";path=/",window.location.reload(!0),clearInterval(this.interval))}},OnLogout:function(n){"use strict";function u(){$.ajax({type:"GET",url:t+"Session/IsAuthenticated/",dataType:"text",data:"",success:function(t){t==="0"&&(clearInterval(r),n())}})}var i=bet365.cmsCore.getPageAttributes($),t=i.appPath,r=setInterval(function(){u(t,n)},3e3)}};bet365.Screen={GetScreenRes:function(){var n=screen.height;switch(bet365.GetBrowser()){case"OPERA":return n*.7;case"NETSCAPE":return n-200;case"IE":return n-250;case"IE6":return n-250;case"FIREFOX":return n-250;case"IE8":return n-250}},GetScreenWidth:function(){var n=screen.width;return n=n-n*.9,Math.round(n)},GetScreenTop:function(){var n=screen.height;return n=n-n*.88,Math.round(n)}};__extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(gamesSettingsService,membersService){this.gamesSettingsService=gamesSettingsService;this.membersService=membersService}return n.prototype.prepopulateUserName=function(n,t){if(this.gamesSettingsService.getGameSettings().mobile){var i=this.membersService.getSavedUsername();i&&(n.val(i),this.toggleIconVisibilityByFieldEmpty(n,t))}},n.prototype.toggleIconVisibilityByFieldEmpty=function(n,t){n.val().length>0?t.show():t.hide()},n.prototype.setupClearInputClick=function(n,t,i,r,u,f){var e=this,o=n.find(".clear-input");o.on("click",function(n){n.preventDefault();var i=$(n.target).hide().siblings(".toggle");return i.val("").blur(),i.hasClass("username")?e.membersService.deleteSavedUsername():t.hide(),!1});o.hide();i.on("input",function(){e.toggleIconVisibilityByFieldEmpty(i,u)});r.on("input",function(){e.toggleIconVisibilityByFieldEmpty(r,f)})},n.prototype.setupToggleInputMask=function(n,t){var i=this;n.on("click",function(n){n.preventDefault();n.stopPropagation();t.attr("type")==="password"?(t.attr("type","text"),$(this).addClass("selected")):(t.attr("type","password"),$(this).removeClass("selected"))});n.hide();t.on("input",function(){i.toggleIconVisibilityByFieldEmpty(t,n)})},n.prototype.resetToggleInputMask=function(n,t){n.attr("type")==="text"&&(n.attr("type","password"),t.removeClass("selected"))},n.prototype.showFailureAnimation=function(n){var t,i;n.addClass("failed-login");t=$(".modal .password");t.val("");t.siblings("label").show();t.siblings(".clear-input").hide();$(".modal .toggle-mask").removeClass("selected").hide();i="failure-animation";n.addClass(i);setTimeout(function(){n.removeClass(i)},500)},n.prototype.setupKmlControl=function(n,t){t.on("click",function(){var i=n.find(".checkmark");t.prop("checked")?i.addClass("selected"):i.removeClass("selected")})},n}();n.LoginModalBase=t})(t=n.BaseClasses||(n.BaseClasses={}))})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.init=function(n){var t=this;n!==null&&(this.clockContainer=$(n),this.clock=this.clockContainer.find(".clock"),this.currentTimeContainer=this.clockContainer.find(".time"),this.hideLoginTime=this.clockContainer.find(".hide-login-time"),this.lastLoginText=this.clockContainer.find(".last-login-text"),this.lastLogin=this.clockContainer.find(".last-login"),this.doHideLastLoginCheck=!0,this.setTimeDifference(),setTimeout(function(){t.updateClock()},1e3))},n.prototype.setTimeDifference=function(){var n=new Date,t=n.getTime(),i=this.currentTimeContainer.data("date").toString(),r=new Date(i),u=r.getTime();this.dateTimeDifference=u-t},n.prototype.updateClock=function(){var u=this,f=(new Date).getTime(),e=f+this.dateTimeDifference,n=new Date(e),t=n.getHours(),i=n.getMinutes(),r=n.getSeconds(),o=(t<10?"0"+t:t)+":"+(i<10?"0"+i:i)+":"+(r<10?"0"+r:r);this.clock.text(o);this.hideLastLoginCheck(n);setTimeout(function(){u.updateClock()},1e3)},n.prototype.hideLastLoginCheck=function(n){var t,i;this.hideLoginTime.length>0?(t=new Date(this.hideLoginTime[0].innerText),i=n.getTime()-t.getTime(),i>6e4&&this.hideLastLogin()):this.doHideLastLoginCheck=!1},n.prototype.hideLastLogin=function(){var n=1e3;this.hideLoginTime.remove();this.lastLoginText.fadeOut(n);this.lastLogin.fadeOut(n);this.doHideLastLoginCheck=!1},n}();n.Clock=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.HideBalance=0]="HideBalance";n[n.HideProductNav=1]="HideProductNav";n[n.PinAuthenticationData=2]="PinAuthenticationData";n[n.UsernameVisibility=3]="UsernameVisibility";n[n.DropDownMenuUpdated=4]="DropDownMenuUpdated";n[n.OverlayBannerIds=5]="OverlayBannerIds";n[n.SmartPanel=6]="SmartPanel"})(t=n.LocalStorageKeys||(n.LocalStorageKeys={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(){this.browser=null}return t.prototype.getBrowser=function(){if(this.browser!=null)return this.browser;var n=this.getBrowserUserAgent();return this.browser=n.indexOf("opr")!==-1?this.buildOperaBrowser():n.indexOf("chrome")!==-1?this.buildGoogleChromeBrowser():n.indexOf("firefox")!==-1?this.buildMozillaFirefoxBrowser():n.indexOf("safari")!==-1&&n.indexOf("android")===-1?this.buildAppleSafariBrowser():n.indexOf("android")!==-1?this.buildAndroidNativeBrowser():this.buildMicrosoftInternetExplorerBrowser(n),this.browser},t.prototype.isAndroidInternetBrowser=function(){return this.getBrowser().name==="AndroidInternet"},t.prototype.isOldInternetExplorer=function(){var n=this.getBrowser();return n.name==="Internet Explorer"&&(n.version===8||n.version===9)},t.prototype.buildMicrosoftInternetExplorerBrowser=function(t){var i=0,r;return t.indexOf("trident")!==-1&&t.indexOf("rv:11")!==-1?i=11:(r=new RegExp("msie ([0-9]{1,}[.0-9]{0,})"),r.exec(t)!=null&&(i=parseFloat(RegExp.$1))),new n.Models.Browser("Microsoft","Internet Explorer",i)},t.prototype.buildGoogleChromeBrowser=function(){return new n.Models.Browser("Google","Chrome",0)},t.prototype.buildOperaBrowser=function(){return new n.Models.Browser("Opera","Opera",0)},t.prototype.buildMozillaFirefoxBrowser=function(){return new n.Models.Browser("Mozilla","Firefox",0)},t.prototype.buildAppleSafariBrowser=function(){return new n.Models.Browser("Apple","Safari",0)},t.prototype.buildNetscapeNavigatorBrowser=function(){return new n.Models.Browser("Netscape","Navigator",0)},t.prototype.buildAndroidNativeBrowser=function(){return new n.Models.Browser("Android","AndroidInternet",0)},t.prototype.getBrowserUserAgent=function(){return navigator.userAgent.toLowerCase()},t}();t.BrowserDetailsService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e,o,s,h){this.thirdPartyCookieBaseUrl=n;this.activityAlertDelay=t;this.keepMeLoggedIn=i;this.keepMeLoggedInReturnUrl=r;this.keepMeLoggedInServiceUrl=u;this.mobile=f;this.bet365SportsProductType=e;this.mobilePinAuthSupported=o;this.newGamingDesktopHeader=s;this.returnPath=h}return n}();n.GameSettings=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(){}return t.prototype.getGameSettings=function(){if(this.gameSettings==null){var t=$("body").data("pageAttributes"),i=this.settingToBoolean(t.mobile),r=this.settingToBoolean(t.keepMeLoggedIn),u=this.settingToBoolean(t.MobilePinAuthSupported),f=this.settingToBoolean(t.NewGamingDesktopHeader);this.gameSettings=new n.Models.GameSettings(t.ThirdPartyCookieBaseUrl,t.ActivityAlertDelay,r,t.keepMeLoggedInReturnUrl,t.keepMeLoggedInServiceUrl,i,t.bet365SportsProductType,u,f,t.ReturnPath)}return this.gameSettings},t.prototype.settingToBoolean=function(n){return n&&n.toLowerCase()==="true"},t}();t.GamesSettingsService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(browserDetailsService,gamesSettingsService){this.browserDetailsService=browserDetailsService;this.gamesSettingsService=gamesSettingsService;this.cookieRestricted=!0;this.cookieCheckAttempts=0}return n.prototype.setCookie=function(n,t,i,r){var u,f;i===void 0&&(i=null);r===void 0&&(r=null);u="";i&&(f=new Date,f.setMilliseconds(f.getMilliseconds()+i*864e5),u=f.toUTCString(),u="; expires="+u);r&&(r="; domain="+r);document.cookie=[n,"=",t,u,";path=/",r].join("")},n.prototype.getCookie=function(n){var i=document.cookie,t,r;return i.length>0&&(t=i.indexOf(n+"="),t!==-1)?(t=t+n.length+1,r=i.indexOf(";",t),r==-1&&(r=i.length),decodeURIComponent(i.substring(t,r))):""},n.prototype.eraseCookie=function(n,t){t===void 0&&(t=null);this.setCookie(n,"",-1,t)},n.prototype.startupCookieRestrictionCheck=function(){var t=this,n=window.location;if(this.browserDetailsService.getBrowser().name=="Internet Explorer"){this.cookieRestricted=!1;return}if(this.getCookie("ce")===""){var i=this.gamesSettingsService.getGameSettings(),r=[i.thirdPartyCookieBaseUrl,"/CookieCheck","?BaseUrl="].join(""),u=n.origin?n.origin:[window.location.protocol,"//",window.location.hostname].join(""),f=[r,u].join("");$('<iframe id="ck" src="'+f+'" height="0" width="0"/>').appendTo("body");setTimeout(function(){t.thirdPartyCookieCheckRepeat()},500)}else this.cookieRestricted=!1},n.prototype.areThirdPartyCookiesRestricted=function(){return this.gamesSettingsService.getGameSettings().mobile?!1:(this.cookieRestricted&&this.checkIFrameForThirdPartyCookieCheck(),this.cookieRestricted)},n.prototype.readMultiValueCookieValue=function(n,t){var f=this.getCookie(n),r,i,u;if(f==null)return"";for(r=f.split("&"),i=0;i<r.length;i++)if(u=r[i].split("="),u[0]===t)return u[1];return""},n.prototype.thirdPartyCookieCheckRepeat=function(){var n=this;try{if(this.cookieCheckAttempts>=5)return;this.cookieCheckAttempts++;this.checkIFrameForThirdPartyCookieCheck()||setTimeout(function(){n.thirdPartyCookieCheckRepeat()},500)}catch(t){setTimeout(function(){n.thirdPartyCookieCheckRepeat()},500)}},n.prototype.checkIFrameForThirdPartyCookieCheck=function(){try{var n=$("#ck").contents().find("#success").text().toLowerCase();return n==="true"?(this.cookieRestricted=!1,this.setCookie("ce","1",1e4),!0):n==="false"?(this.cookieRestricted=!0,!0):!1}catch(t){return!1}},n}();n.CookieService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(cookieService){this.cookieService=cookieService;this.cookieService.getCookie("debugLogger")==="true"?n.enable():n.disable()}return n.prototype.writeToConsole=function(n){"console"in self&&"log"in console&&n&&n.length>=1&&typeof console=="object"&&console.log(n)},n.enable=function(){n.status=!0},n.disable=function(){n.status=!1},n.prototype.write=function(t){n.status&&this.writeToConsole(t)},n.status=!1,n}();n.LogService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.key=n;this.internalStorageKey=t}return n}(),i=function(){function n(logService){this.storageKeys=[new t(0,"HideBalance"),new t(1,"HideProductNav"),new t(2,"PinAuthData"),new t(3,"UsernameVisibility"),new t(4,"DropDownMenuUpdated"),new t(5,"OverlayBannerIds"),new t(6,"SmartPanel")];this.logService=logService}return n.prototype.getData=function(n){var t=this.getStorageKey(n);return!this.supportForLocalStorage()&&t!=""?null:JSON.parse(this.localStorage().getItem(t))},n.prototype.setData=function(n,t){var i=this.getStorageKey(n);if(!this.supportForLocalStorage()||i==""||!this.valueIsAnObject(t))return!1;try{return this.localStorage().setItem(i,JSON.stringify(t)),!0}catch(r){return!1}},n.prototype.remove=function(n){var t=this.getStorageKey(n);if(!this.supportForLocalStorage()||t=="")return!1;try{return this.localStorage().removeItem(t),!0}catch(i){return!1}},n.prototype.getSessionData=function(n){var t=this.getStorageKey(n);return!this.supportForLocalStorage()||t===""?null:JSON.parse(this.sessionStorage().getItem(t))},n.prototype.setSessionData=function(n,t){var i=this.getStorageKey(n);if(!this.supportForLocalStorage()||i===""||!this.valueIsAnObject(t))return!1;try{return this.sessionStorage().setItem(i,JSON.stringify(t)),!0}catch(r){return!1}},n.prototype.removeSessionData=function(n){var t=this.getStorageKey(n);if(!this.supportForLocalStorage()||t==="")return!1;try{return this.sessionStorage().removeItem(t),!0}catch(i){return!1}},n.prototype.getKeys=function(){return this.storageKeys},n.prototype.getStorageKey=function(n){for(var i,t=0;t<this.storageKeys.length;t++)if(i=this.storageKeys[t],i.key===n)return i.internalStorageKey;return this.logService.write("The key "+n.toString()+" used is not allowed"),""},n.prototype.supportForLocalStorage=function(){var n="test";try{return this.localStorage().setItem(n,n),this.localStorage().removeItem(n),!0}catch(t){return this.logService.write("Local Storage is not available for this browser"),!1}},n.prototype.valueIsAnObject=function(n){return typeof n=="object"?!0:(this.logService.write("Value that is stored must be of type object"),!1)},n.prototype.localStorage=function(){return localStorage},n.prototype.sessionStorage=function(){return sessionStorage},n}();n.LocalStorageService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.ProductNavigationSlideDown=0]="ProductNavigationSlideDown";n[n.RealityCheckShowing=1]="RealityCheckShowing";n[n.Members=2]="Members";n[n.CustomScrollbarSelected=3]="CustomScrollbarSelected"})(t=n.PageContextKeys||(n.PageContextKeys={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.key=n;this.internalPageContextKey=t}return n}(),i=function(){function n(logService){this.pageContextKeys=[new t(0,"product-navigation-slide-down"),new t(1,"realitycheck-showing"),new t(2,"members"),new t(3,"custom-scrollbar-selected")];this.logService=logService;this.body=$("body")}return n.prototype.addPageContext=function(n){this.body.addClass(this.getPageContextKey(n))},n.prototype.removePageContext=function(n){this.body.removeClass(this.getPageContextKey(n))},n.prototype.hasPageContext=function(n){return this.body.hasClass(this.getPageContextKey(n))},n.prototype.getCurrentPage=function(){return this.body.hasClass("play-page")?0:this.body.hasClass("playinwindow")?2:1},n.prototype.getPageContextKey=function(n){for(var i,t=0;t<this.pageContextKeys.length;t++)if(i=this.pageContextKeys[t],i.key===n)return i.internalPageContextKey;return this.logService.write("The key is not allowed "+n.toString()+" in the Page Context Service"),""},n}();n.PageContextService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.callbacks=[]}return n.prototype.emitEvent=function(){for(var t,i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];for(t=0;t<this.callbacks.length;t++)this.callbacks[t].apply(this,i)},n.prototype.onEvent=function(n){this.callbacks.push(n)},n}();n.EventHandler=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Hide=0]="Hide";n[n.Show=1]="Show"})(t=n.Toggle||(n.Toggle={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.ToggleProductNavigationEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.hide=n}return n}();n.HideNav=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(pageContextService,setupScrollBarEvent,browserDetailsService){this.scrollBarSelectedCssClass="custom-scrollbar-selected";this.scrollBarHiddenCssClass="scrollbar-hidden";this.pageContextService=pageContextService;this.receiveSetupScrollBarEvent=setupScrollBarEvent;this.browserDetailsService=browserDetailsService}return n.prototype.init=function(n){var i=this,t;if(n!=null&&!this.browserDetailsService.isOldInternetExplorer()){window.animationFrame=window.requestAnimationFrame||window.setImmediate||function(n){return setTimeout(n,0)};this.container=$(n);this.scrollableContentContainer=this.container.get(0);this.scrollableContent=this.container.find(".user-preference-scrollable-content").get(0);this.scrollBar=this.container.find(".scrollbar").get(0);this.scrollBar.addEventListener("mousedown",function(n){i.mouseDownEventListener(n)});this.scrollableContent.addEventListener("scroll",this.setupScrollbarMove.bind(this));this.scrollableContent.addEventListener("mouseenter",this.setupScrollbarMove.bind(this));t=window.getComputedStyle(this.scrollableContent);t.height==="0px"&&t["max-height"]!=="0px"&&(this.scrollableContent.style.height=t["max-height"]);this.receiveSetupScrollBarEvent.onEvent(function(){i.setupScrollRatio();i.scrollBarMove()})}},n.prototype.setupScrollRatio=function(){var n=this.scrollableContent.scrollHeight,t=this.scrollableContent.clientHeight;this.scrollRatio=t/n},n.prototype.setupScrollbarMove=function(){var n=this;this.setupScrollRatio();window.animationFrame(function(){n.scrollBarMove()})},n.prototype.scrollBarMove=function(){var n,t,i;this.scrollRatio>=1?this.scrollBar.classList.add(this.scrollBarHiddenCssClass):(n=4,t=this.scrollRatio*100-n,this.scrollBar.classList.remove(this.scrollBarHiddenCssClass),i=this.scrollableContent.scrollTop/this.scrollableContent.scrollHeight*100,this.scrollBar.style.cssText="height:"+t+"%; top:"+i+"%;")},n.prototype.mouseDownEventListener=function(n){var t=this;return this.lastPageY=n.pageY,this.scrollBar.classList.add(this.scrollBarSelectedCssClass),this.pageContextService.addPageContext(3),this.scrollbarDragging=function(n){t.dragScrollbar(n)},this.stopScrollbarScrolling=function(){t.stopScrolling()},document.addEventListener("mousemove",this.scrollbarDragging),document.addEventListener("mouseup",this.stopScrollbarScrolling),!1},n.prototype.dragScrollbar=function(n){var t=this,i=n.pageY-this.lastPageY;this.lastPageY=n.pageY;window.animationFrame(function(){t.dragScrolling(i)})},n.prototype.dragScrolling=function(n){this.scrollableContent.scrollTop+=n/this.scrollRatio},n.prototype.stopScrolling=function(){this.scrollBar.classList.remove(this.scrollBarSelectedCssClass);this.pageContextService.removePageContext(3);document.removeEventListener("mousemove",this.scrollbarDragging);document.removeEventListener("mouseup",this.stopScrollbarScrolling)},n}();n.ContainerScroll=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Flash=1]="Flash";n[n.Html5=2]="Html5";n[n.Html5Touch=3]="Html5Touch"})(t=n.GamePlayTechnology||(n.GamePlayTechnology={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.html5=!1;this.html5Touch=!1;this.flash=!1}return n.prototype.mapTechnologySet=function(){var n="";return this.flash&&(n=[n,1,","].join("")),this.html5&&(n=[n,2,","].join("")),this.html5Touch&&(n=[n,3,","].join("")),n.substring(0,n.length-1)},n}();n.ClientTechnologySet=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(cookieService){this.cookieService=cookieService;this.technologies=new n.Models.ClientTechnologySet}return t.prototype.establish=function(){Modernizr.canvas&&Modernizr.video&&Modernizr.audio&&(this.technologies.html5=!0);Modernizr.touchevents&&(this.technologies.html5Touch=!0);this.hasFlash()&&(this.technologies.flash=!0,this.technologies.flashVersion=this.flashVersion());this.cookieService.setCookie("ctc",this.technologies.mapTechnologySet(),45)},t.prototype.hasFlash=function(){var n,t;if(navigator.plugins&&navigator.plugins.length&&navigator.plugins["Shockwave Flash"]||navigator.mimeTypes&&navigator.mimeTypes.length&&(n=navigator.mimeTypes["application/x-shockwave-flash"],n&&n.enabledPlugin))return!0;try{return t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),!0}catch(i){return!1}},t.prototype.flashVersion=function(){var n,t;if(navigator.plugins&&navigator.plugins.length){if(n=navigator.plugins["Shockwave Flash"],n.version)return n.version;if(n.description)return this.getVersionFromDescription(n.description)}if(navigator.mimeTypes&&navigator.mimeTypes.length&&(t=navigator.mimeTypes["application/x-shockwave-flash"],t&&t.enabledPlugin&&t.description))return this.getVersionFromDescription(t.description);try{return this.getVersionFromDescription(new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version"))}catch(i){return"0"}},t.prototype.getVersionFromDescription=function(n){var t=n.match(/[\d]+/g);return t.length=3,t.join(".")},t}();t.ClientTechnologyService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.DataComponentInitializerCompleteEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(clientTechnologyService,dataComponentInitializerCompleteEvent){this.clientTechnologyService=clientTechnologyService;this.receiveDataComponentInitializerCompleteEvent=dataComponentInitializerCompleteEvent}return n.prototype.init=function(n){var t=this;if(n!=null)this.receiveDataComponentInitializerCompleteEvent.onEvent(function(){t.checkForFlash()})},n.prototype.checkForFlash=function(){this.clientTechnologyService.hasFlash()?(this.clientTechnologyService.establish(),window.location.href=window.location.href+"&fc=1"):this.showModal()},n.prototype.bindCloseButtonsClick=function(){var n=this;this.closeButton.on("click",function(){n.flashEnablePrompt()})},n.prototype.flashEnablePrompt=function(){var n=this.closeButton.data("url");window.open(n,"","height=640,width=1024,sLeft=20,sTop=0,scrollbars=yes,resizable=yes")},n.prototype.showModal=function(){this.modal=$(".modal.noflash");this.closeButton=this.modal.find(".closeButton");this.bindCloseButtonsClick();this.modal.show()},n}();n.FlashCheck=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(){"use strict"})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.showMessage=n;this.lastActivity=t;this.newExpiryTime=i;this.newTimestamp=r;this.hash=u;this.newTimeoutDuration=f}return n}();n.SessionValidModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.SessionValidModel,r=function(){function t(cookieService){this.cookieService=cookieService}return t.prototype.checkSessionValid=function(n,t,r,u,f,e){var o={timeStamp:t.toString(),hashValue:r.toString(),timeoutDuration:parseInt(u)};n.ajax({type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",async:!0,url:"/SessionActivity/CheckSessionValid",data:JSON.stringify(o),success:function(n){var t=new i(n.showMessage,n.lastActivity,n.newExpiryTime,n.newTimestamp,n.newHash,n.newTimeoutDuration);e(t)},error:function(){return!1}})},t.prototype.keepSessionAlive=function(t,r,u,f,e){var o={timeStamp:r.toString(),hashValue:u.toString(),timeoutDuration:parseInt(f)};t.ajax({type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",async:!0,url:"/SessionActivity/KeepAlive",data:JSON.stringify(o),success:function(n){var t=new i(n.showMessage,n.lastActivity,n.newExpiryTime,n.newTimestamp,n.newHash,n.newTimeoutDuration);return e(t),!1},error:function(){n.cmsCore.Session.LogOut()}})},t.prototype.logOutWithoutRefresh=function(){n.cmsCore.Session.LogOutWithoutRefresh(!1)},t.prototype.logOutWithRefresh=function(){n.cmsCore.Session.LogOut()},t.prototype.isLoggedIn=function(){var n=this.cookieService.getCookie("gstk");return n?new RegExp("^[0-9a-fA-F]{36}04$").test(n):!1},t}();t.SessionService=r})(i=t.Services||(t.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.hideBalance=n}return n}();n.HideBalance=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Services=0]="Services";n[n.MyOfferTab=1]="MyOfferTab"})(t=n.HeaderDropDownMenu||(n.HeaderDropDownMenu={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.HideBalance,r=function(){function n(sessionService,toggleMenuEvent,balanceUpdateEvent,headerDropDownMenuEvent,balanceService,localStorageService,toggleBalanceEvent,userPreferenceService,setupScrollBarEvent){this.myOffersActive=!1;this.sessionService=sessionService;this.receiveToggleMenuEvent=toggleMenuEvent;this.balanceUpdateEvent=balanceUpdateEvent;this.balanceService=balanceService;this.localStorageService=localStorageService;this.sendToggleBalanceEvent=toggleBalanceEvent;this.sendHeaderDropDownMenuEvent=headerDropDownMenuEvent;this.receiveToggleBalanceEvent=toggleBalanceEvent;this.userPreferenceService=userPreferenceService;this.sendSetupScrollBarEvent=setupScrollBarEvent}return n.prototype.init=function(n){n!=null&&(this.menu=$(n),this.logout=this.menu.find(".log-out"),this.balanceContainer=this.menu.find(".balance-container"),this.balanceBreakdownContainer=this.menu.find(".balance-expand-container"),this.hideBalance=this.menu.find(".hide-balance-text"),this.showBalance=this.menu.find(".show-balance-text"),this.balanceChevronIcon=this.menu.find(".balance-element-container .chevron-icon"),this.balanceVisibilityIcon=this.menu.find(".visibility-icon"),this.refreshBalanceIcon=this.menu.find(".refresh-icon"),this.servicesButton=this.menu.find(".row.services a"),this.cogButton=this.menu.find(".cog-wrapper"),this.balanceAmount=this.balanceContainer.find(".balance-amount"),this.balanceText=this.balanceContainer.find(".balance-text"),this.messageNumber=this.menu.find(".message-number"),this.languageMenu=this.menu.find(".row.language"),this.languageListItems=this.menu.find(".row-expand.language ul li"),this.timeZoneMenu=this.menu.find(".row.timezone"),this.timeZoneListItems=this.menu.find(".row-expand.timezone ul li"),this.inactivityMenu=this.menu.find(".row.inactivity"),this.inactivityListItems=this.menu.find(".row-expand.inactivity ul li"),this.userPreferenceRows=this.menu.find(".row-expand"),this.myOffersActive=this.isMyOffersActive(),this.myOffersActive&&(this.myOffersButton=this.menu.find(".user-offers"),this.myOffer=this.menu.find(".offer-container")),this.setupClickEvents(),this.setupMenuVisibilityEvents(),this.setupBalances(),this.refreshBalanceSetup(),this.setupServicesMenu(),this.showUpdatedElements())},n.prototype.setupClickEvents=function(){var n=this;this.logout.click(function(t){return t.preventDefault(),n.sessionService.logOutWithRefresh(),!1});this.balanceChevronIcon.click(function(){n.balanceBreakdownContainer.toggleClass("balance-expanded")})},n.prototype.setupMenuVisibilityEvents=function(){var n=this;this.receiveToggleMenuEvent.onEvent(function(t,i){t===2&&(t===2&&i===0&&n.menu.removeClass("show-menu"),t===2&&i===1&&(n.menu.addClass("show-menu"),n.displayMessageCount(),n.resetMenu()))})},n.prototype.setupBalances=function(){var n=this,r="hide-balance",u,t;this.receiveToggleBalanceEvent.onEvent(function(t){t===0?n.balanceContainer.addClass(r):n.balanceContainer.removeClass(r)});this.balanceVisibilityIcon.click(function(){var t=!n.balanceContainer.hasClass(r);n.localStorageService.setData(0,new i(t));t?n.sendToggleBalanceEvent.emitEvent(0):n.sendToggleBalanceEvent.emitEvent(1)});u=this.localStorageService.getData(0);u&&u.hideBalance&&this.sendToggleBalanceEvent.emitEvent(0);t=this.balanceService.getBalances();t!==undefined&&t!==null&&this.populateBalances(t);this.balanceUpdateEvent.onEvent(function(t){n.populateBalances(t);n.updateUserPreferenceMenuSize()})},n.prototype.populateBalances=function(n){var i=n.sportsAndGamesTotalBalance?n.sportsAndGamesTotalBalance:n.total,t;(this.balanceAmount.html(this.formatCurrency(i,n.isoCode)),this.balanceBreakdownContainer.find(".bonus-balance-container .balance-value").html(this.formatCurrency(n.bonus,n.isoCode)),this.balanceBreakdownContainer.find(".withdrawable-balance-container .balance-value").html(this.formatCurrency(n.withdrawable,n.isoCode)),t=this.balanceBreakdownContainer.find(".non-withdrawable-balance-container .balance-value"),t.length!==0)&&(t.html(this.formatCurrency(n.nonWithdrawable,n.isoCode)),this.balanceBreakdownContainer.find(".total-balance-container .balance-value").html(this.formatCurrency(n.total,n.isoCode)))},n.prototype.formatCurrency=function(n,t){return n.replace(t,'<span class="balance-currency">'+t+"<\/span>")},n.prototype.updateUserPreferenceMenuSize=function(){this.userPreferenceRows.width(this.menu.width())},n.prototype.refreshBalanceSetup=function(){var n=this;this.refreshBalanceIcon.click(function(){if(!n.balanceUpdateInProgress){var t="spinning";n.balanceUpdateInProgress=!0;n.refreshBalanceIcon.addClass(t);n.balanceService.refreshBalances();setTimeout(function(){n.refreshBalanceIcon.removeClass(t);n.balanceUpdateInProgress=!1},2e3)}})},n.prototype.setupServicesMenu=function(){var n=this;this.servicesButton.click(function(){n.menu.removeClass("services-submenu");n.servicesButton.addClass("selected");n.cogButton.removeClass("selected");n.myOffersActive&&(n.menu.removeClass("my-offers"),n.menu.find(".offer-container").removeClass("show"),n.myOffersButton.removeClass("selected"))});this.cogButton.click(function(){n.menu.addClass("services-submenu");n.servicesButton.removeClass("selected");n.cogButton.addClass("selected");n.myOffersActive&&(n.menu.removeClass("my-offers"),n.menu.find(".offer-container").removeClass("show"),n.myOffersButton.removeClass("selected"))});this.myOffersActive&&this.myOffersButton.click(function(){n.menu.addClass("my-offers");n.menu.find(".offer-container").addClass("show");n.menu.removeClass("services-submenu");n.servicesButton.removeClass("selected");n.cogButton.removeClass("selected");n.myOffersButton.addClass("selected");n.sendHeaderDropDownMenuEvent.emitEvent(1)});this.setupUserPreferenceMenu(this.languageMenu,this.languageListItems,"services-language","data-language-id",function(t){n.userPreferenceService.setLanguage(t)});this.setupUserPreferenceMenu(this.timeZoneMenu,this.timeZoneListItems,"services-timezone","data-time-zone-id",function(t){n.userPreferenceService.setTimeZone(t)});this.setupUserInactivityPreferenceMenu(this.inactivityMenu,this.inactivityListItems,"services-inactivity","data-inactivity-id","data-inactivity-amount",function(t,i){n.userPreferenceService.setInactivity(t,i)})},n.prototype.resetMenu=function(){var n="selected";this.menu.removeClass("services-submenu");this.servicesButton.addClass(n);this.cogButton.removeClass(n);this.myOffersActive&&(this.menu.removeClass("my-offers"),this.menu.find(".offer-container").removeClass("show"),this.myOffersButton.removeClass(n));this.menu.removeClass("services-language services-timezone services-inactivity");this.menu.find(".user-preference-menu-selected").removeClass("user-preference-menu-selected")},n.prototype.setupUserPreferenceMenu=function(n,t,i,r,u){var f=this;this.setupMenuClick(n,i);t.click(function(e){var o=f.setupSelectedMenuListItem(e,t,n,i),s=Number(o.attr(r));u(s)})},n.prototype.setupUserInactivityPreferenceMenu=function(n,t,i,r,u,f){var e=this;this.setupMenuClick(n,i);t.click(function(o){var s=e.setupSelectedMenuListItem(o,t,n,i),h=Number(s.attr(r)),c=Number(s.attr(u));f(h,c)})},n.prototype.showUpdatedElements=function(){if(!Modernizr.mq("(max-width: 1100px)")){var n=this.localStorageService.getData(4),t="selected";n&&(n.inactivityUpdated||n.languageUpdated||n.timeZoneUpdated)&&(this.menu.addClass("show-menu services-submenu"),this.servicesButton.removeClass(t),this.cogButton.addClass(t),n.languageUpdated&&this.addUpdatedTickToMenuHeader(this.languageMenu),n.timeZoneUpdated&&this.addUpdatedTickToMenuHeader(this.timeZoneMenu),n.inactivityUpdated&&this.addUpdatedTickToMenuHeader(this.inactivityMenu));this.localStorageService.remove(4)}},n.prototype.addUpdatedTickToMenuHeader=function(n){n.addClass("updated");setTimeout(function(){n.find(".updated-tick").remove()},6e3)},n.prototype.displayMessageCount=function(){var n=this;this.messageNumber.length!==0&&$.ajax({url:"/AccountMessages/UnreadMessages",type:"POST"}).done(function(t){t?n.messageNumber.html(t.toString()):n.messageNumber.html("0")})},n.prototype.setupMenuClick=function(n,t){var i=this;n.click(function(){i.menu.toggleClass(t);var n=$(event.currentTarget);n.toggleClass("user-preference-menu-selected");i.sendSetupScrollBarEvent.emitEvent()})},n.prototype.setupSelectedMenuListItem=function(n,t,i,r){var f="selected",u=$(n.target);return t.removeClass(f),u.addClass(f),i.find(".setting-value").text(u.text()),this.menu.removeClass(r),u},n.prototype.isMyOffersActive=function(){var n=this.menu.find(".my-offers-tab");return n!==undefined?!0:!1},n}();t.LargeDropDownHeaderMenu=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Slide=1]="Slide";n[n.Fade=2]="Fade";n[n.Instant=3]="Instant"})(t=n.ModalShowEffect||(n.ModalShowEffect={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e,o,s){i===void 0&&(i=2);r===void 0&&(r=!0);u===void 0&&(u=!0);f===void 0&&(f=0);e===void 0&&(e=!1);o===void 0&&(o=!0);s===void 0&&(s=function(){});this.modal=n;this.priority=t;this.showEffect=i;this.hideModalOnOverlayClick=r;this.overlayWholePage=u;this.modalType=f;this.keepVisible=e;this.positionModal=o;this.hideModalOnOverlayCallback=s}return n}();n.Modal=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Center=0]="Center";n[n.Header=1]="Header"})(t=n.ModalType||(n.ModalType={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(logService,deviceService){this.tabableElements=$("a[href], area[href], input, select, textarea, button, iframe, object, embed, *[tabindex], *[contenteditable]");this.modalsContainer=$(".modals");this.headerModalContainer=$(".header-login-container");this.modalQueue=[];this.modalEffectSpeed=200;this.overlayEffectSpeed=200;this.popupMask=$(".popup-mask");this.logService=logService;this.deviceService=deviceService;this.visibleModal=null;this.popupMask.length!==1&&this.logService.write("No popup mask on the page or multiple popup mask are on the page")}return n.prototype.showModal=function(n){if(this.visibleModal==null)this.visibleModal=n,this.displayModal();else{if(this.visibleModal.priority>n.priority){if(this.modalExistsInQueueOrIsShowing(this.modalQueue,n))return;this.modalQueue.push(this.visibleModal);this.visibleModal.keepVisible||this.visibleModal.modal.fadeOut(200);this.visibleModal=n;this.displayModal()}else{if(this.modalExistsInQueueOrIsShowing(this.modalQueue,n))return;this.modalQueue.push(n)}this.modalQueue.sort(this.modalQueueSortFunction)}},n.prototype.displayModal=function(){var n=this;if(this.visibleModal.modalType===1?this.visibleModal.modal.parent().is(this.headerModalContainer)||this.headerModalContainer.append(this.visibleModal.modal):this.visibleModal.modal.parent().is(this.modalsContainer)||this.modalsContainer.append(this.visibleModal.modal),this.visibleModal.overlayWholePage?(this.visibleModal.modal.addClass("overlayWholePage"),this.popupMask.addClass("overlayWholePage")):(this.visibleModal.modal.removeClass("overlayWholePage"),this.popupMask.removeClass("overlayWholePage")),this.showOverlay(),this.removeTabEventListener(),$(window).off(".modal"),this.visibleModal.positionModal){$(window).on("resize.modal",function(){n.positionCentrally()});this.executePositionCentrally()}this.visibleModal.modal.is("div")&&this.setupTabIndexes();this.visibleModal.showEffect===1?this.hideSlideModalIfNotKeepVisible():this.visibleModal.showEffect===3?this.visibleModal.modal.addClass("instant"):this.visibleModal.modal.fadeIn(this.modalEffectSpeed)},n.prototype.hideSlideModalIfNotKeepVisible=function(){this.visibleModal.modal.hasClass("slide")&&this.visibleModal.keepVisible||(this.visibleModal.modal.toggleClass("slide"),this.visibleModal.modal.show())},n.prototype.modalQueueSortFunction=function(n,t){return n.priority-t.priority},n.prototype.hideAllModals=function(){this.modalQueue=[];this.hideModal()},n.prototype.hideModal=function(n){n===void 0&&(n=!1);this.visibleModal!=null&&(this.hideModalWithVisibilityEffect(this.visibleModal),this.visibleModal.modal.is("div")&&this.removeTabEventListener(),this.modalQueue.length>0&&!n?(this.visibleModal=this.modalQueue.shift(),this.displayModal()):(this.hideOverlay(),this.visibleModal.hideModalOnOverlayCallback(),$(window).off(".modal"),this.popupMask.removeClass("overlayWholePage"),this.visibleModal=null))},n.prototype.hideModalWithVisibilityEffect=function(n){n.showEffect===1?n.modal.removeClass("slide"):n.showEffect===3?n.modal.removeClass("instant"):n.modal.fadeToggle(this.modalEffectSpeed)},n.prototype.removeModal=function(n,t){var r,f,u,i;if(t===void 0&&(t=!1),r=n.modal,$(this.visibleModal.modal).is(r)){this.hideModal(t);return}for(r.is(":visible")&&this.hideModalWithVisibilityEffect(n),f=this.modalQueue.length,u=-1,i=0;i<f;i++)if($(this.modalQueue[i].modal).is(r)){u=i;break}u!==-1&&this.modalQueue.splice(u,1)},n.prototype.removeVisibleModal=function(){this.visibleModal.modal.fadeOut(200);this.visibleModal.modal.is("div")&&this.removeTabEventListener();this.modalQueue.length>0?(this.visibleModal=this.modalQueue.shift(),this.displayModal()):($("#popupmask").fadeOut(200),$(window).off(".modal"),this.visibleModal=null)},n.prototype.removeModalFromTheQueue=function(n){for(var r=this.modalQueue.length,i=-1,t=0;t<r;t++)if($(this.modalQueue[t].modal).is($(n.modal))){i=t;break}i!==-1&&this.modalQueue.splice(i,1)},n.prototype.positionCentrally=function(){var n=this;setTimeout(function(){n.executePositionCentrally()},100)},n.prototype.executePositionCentrally=function(){var t;if(this.visibleModal!=null){this.visibleModal.modal.css("top","").css("left","");this.visibleModal.modal.css("position","absolute");var i=$(window).height()<$(window).width(),r=$(window).height()-this.visibleModal.modal.outerHeight(),u=$(window).width()-this.visibleModal.modal.outerWidth(),n=0;this.visibleModal.modalType===0&&(n=this.visibleModal.modal.find($("input")).is(":focus")&&this.deviceService.isIPad()&&i?0+$(window).scrollTop():Math.max(0,r/2)+$(window).scrollTop(),t=Math.max(0,u/2)+"px",this.visibleModal.modal.css("left",t));this.visibleModal.modal.css("top",n+"px");this.visibleModal.modal.css("margin-left","0");this.visibleModal.modal.css("margin-top","0")}},n.prototype.setupTabIndexes=function(){var n=this.visibleModal.modal.find(this.tabableElements).not(":hidden, :disabled"),t=n.first(),i=n.last();this.visibleModal.modal.attr("tabindex",-1);this.visibleModal.modal.trigger("focus");n.each(function(n,t){$(t).attr("tabindex",n+1)});this.addTabEventListener(t,i)},n.prototype.addTabEventListener=function(n,t){var i=this;this.visibleModal.modal[0].addEventListener("keydown",function(r){i.tabEventListener(r,n,t)},!1)},n.prototype.removeTabEventListener=function(){this.visibleModal.modal[0].removeEventListener("keydown",function(){})},n.prototype.tabEventListener=function(n,t,i){n.keyCode==9&&(n.stopPropagation(),n.shiftKey?document.activeElement==t[0]&&(n.preventDefault(),i.trigger("focus")):document.activeElement==i[0]&&(n.preventDefault(),t.trigger("focus")))},n.prototype.modalExistsInQueueOrIsShowing=function(n,t){var r,i;if($(this.visibleModal.modal).is($(t.modal)))return!0;for(r=n.length,i=0;i<r;i++)if($(n[i].modal).is($(t.modal)))return!0;return!1},n.prototype.showOverlay=function(){var n=this;if(this.popupMask.is(":visible")||this.popupMask.fadeIn(200),this.visibleModal.hideModalOnOverlayClick)this.popupMask.on("click",function(){n.hideModal()});else this.popupMask.off("click")},n.prototype.hideOverlay=function(){this.popupMask.is(":visible")&&this.popupMask.fadeOut(this.overlayEffectSpeed)},n}();n.ModalService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Play=0]="Play";n[n.Unknown=1]="Unknown";n[n.PlayInWindow=2]="PlayInWindow"})(t=n.Page||(n.Page={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(modalService,authenticationService,queryStringService,pinService,pageContextService,pinCreatedEvent,pinCreatedFailedEvent,createPinEvent){this.priority=39;this.confirmationMismatches=0;this.modalService=modalService;this.authenticationService=authenticationService;this.queryStringService=queryStringService;this.pinService=pinService;this.receivePinCreatedEvent=pinCreatedEvent;this.receivePinCreatedFailedEvent=pinCreatedFailedEvent;this.receiveCreatePinEvent=createPinEvent;this.pageContextService=pageContextService}return n.prototype.init=function(n){if(n!==null){this.setPinModal=$(n);this.setupCreatePin();var t=this.queryStringService.getQueryStringItemValueFromWindowUrl("sl").length>0;t&&this.authenticationService.showSetupPin()?(this.modalService.showModal(new i(this.setPinModal,this.priority,2,!1,!0,0,!1,!0)),this.setPinModal.addClass("setup-pin-start")):this.pageContextService.getCurrentPage()===0&&t&&this.noConflictingComponentsPresent()&&this.clearPostLoginQueryParameter()}},n.prototype.setupCreatePin=function(){this.setupPinCreate=this.setPinModal.find("#setupPinCreate");this.setupPinNotNow=this.setPinModal.find("#setupPinNotNow");this.setupPinNext=this.setPinModal.find("#setupPinNext");this.setupPinCancel=this.setPinModal.find("#setupPinCancel");this.setupPinEnterConfirm=this.setPinModal.find("#setupPinEnterConfirm");this.pinContainer=this.setPinModal.find(".pin-container");this.pinCodeEntry=this.setPinModal.find(".pin-entry-input");this.pinEntry=this.setPinModal.find(".pin-container .pin-entry");this.setupPinComplete=this.setPinModal.find("#setupPinComplete");this.setupPinTryAgain=this.setPinModal.find("#setupPinTryAgain");this.authenticationService.getPinSetupAttemptsRemaining()===1&&this.setupPinNotNow.html(this.setupPinNotNow.data("noThanksText"));this.bindSetupModalClick();this.setupEvents()},n.prototype.setupEnterPin=function(){this.confirmationMismatches=0;this.setPinModal.removeClass("setup-pin-start");this.setPinModal.addClass("enter-pin");this.setupPinNext.addClass("faded");this.bindPinInputElementKeyEvents();this.pinCodeEntry.focus()},n.prototype.bindSetupModalClick=function(){var n=this;this.setupPinNotNow.click(function(){n.authenticationService.incrementPinSetupAttempts();n.hidePinSetupAndRefresh()});this.setupPinCreate.click(function(){n.setupEnterPin();n.pinService.obtainPinValidationRules()});this.setupPinEnterConfirm.click(function(){n.pinCodeEntry.focus()});this.setupPinCancel.click(function(){n.hidePinSetupAndRefresh()});this.setupPinTryAgain.click(function(){n.confirmationMismatches=0;n.setPinModal.addClass("enter-pin");n.setPinModal.removeClass("pin-try-again");n.resetPinEntry()});this.setupPinComplete.click(function(){n.hidePinSetupAndRefresh()});this.setupPinNext.click(function(){if(n.pinCodeEntry.val().length<4)n.shakePinContainer(),n.pinCodeEntry.focus();else if(n.pinCodeEntry.val().length===4){var t=n.setPinModal.hasClass("enter-pin");t?n.showConfirmPin():n.pinService.setPin(n.pinCodeEntry.val())}})},n.prototype.noConflictingComponentsPresent=function(){return $("[data-component-type=MobileLoggedInOverlay], [data-component-type=KycSecondaryAuthMobile], [data-component-type=MembersNotifications]").length===0},n.prototype.clearPostLoginQueryParameter=function(){var t=this.queryStringService.getQueryStringItemValue(window.location.href,"sl"),n;t&&(n=this.queryStringService.updateQueryString("sl",null,window.location.href),window.location.href=n)},n.prototype.hidePinSetupAndRefresh=function(){this.modalService.hideModal();this.clearPostLoginQueryParameter()},n.prototype.bindPinInputElementKeyEvents=function(){var n=this;this.pinCodeEntry.off("keyup").on("keyup",function(t){var f=n.updateAndCheckForCompletedPin(t),i,r,u;if(n.setPinModal.removeClass("pin-too-weak pin-doesnt-match"),f){if(i=n.setPinModal.hasClass("enter-pin"),i){if(r=n.pinCodeEntry.val(),!n.pinService.isRequestedPinValid(r)){n.showPinIsTooWeak();return}}else if(u=n.pinCodeEntry.val(),n.requestedPin!==u){n.pinDoesntMatch();return}n.setupPinNext.removeClass("faded")}else n.setupPinNext.addClass("faded")})},n.prototype.showPinIsTooWeak=function(){this.shakePinContainer();this.resetPinEntry();this.setPinModal.addClass("pin-too-weak")},n.prototype.pinDoesntMatch=function(){if(this.confirmationMismatches>=2){this.setPinModal.addClass("pin-try-again");this.setPinModal.removeClass("re-enter-pin");return}this.confirmationMismatches++;this.shakePinContainer();this.resetPinEntry();this.setPinModal.addClass("pin-doesnt-match")},n.prototype.resetPinEntry=function(){this.pinEntry.removeClass("pin-entered");this.pinCodeEntry.val("");this.setupPinNext.addClass("faded");this.pinCodeEntry.focus()},n.prototype.resetSetPinModal=function(){this.setPinModal.removeClass("setup-pin-start success enter-pin pin-try-again re-enter-pin pin-too-weak pin-doesnt-match")},n.prototype.shakePinContainer=function(){var t=this,n="pin-code-failure";this.pinContainer.addClass(n);setTimeout(function(){t.pinContainer.removeClass(n)},500)},n.prototype.showConfirmPin=function(){this.requestedPin=this.pinCodeEntry.val();$(".pin-entry").removeClass("pin-entered");this.pinCodeEntry.val("");this.pinCodeEntry.focus();this.setPinModal.removeClass("enter-pin");this.setPinModal.addClass("re-enter-pin");this.setupPinNext.addClass("faded")},n.prototype.setupEvents=function(){var n=this;this.receivePinCreatedEvent.onEvent(function(){n.authenticationService.resetPinAuthenticationData();n.setPinModal.removeClass("re-enter-pin");n.setPinModal.addClass("success")});this.receiveCreatePinEvent.onEvent(function(){n.resetSetPinModal();n.resetPinEntry();n.setupEnterPin();n.pinService.obtainPinValidationRules();n.modalService.showModal(new i(n.setPinModal,n.priority,2,!1,!0,0,!1,!0));n.pinCodeEntry.focus()});this.receivePinCreatedFailedEvent.onEvent(function(){n.setPinModal.addClass("pin-try-again");n.setPinModal.removeClass("re-enter-pin")})},n.prototype.updateAndCheckForCompletedPin=function(n){var t=n.currentTarget.value;return(this.updatePinEntryClasses(t),t.length===4)?!0:!1},n.prototype.updatePinEntryClasses=function(n){this.pinEntry.each(function(t,i){t<n.length?$(i).addClass("pin-entered"):$(i).removeClass("pin-entered")})},n}();t.MobileSetPin=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(membersLoadInFrameEvent){this.membersLoadInFrameEvent=membersLoadInFrameEvent}return n.prototype.init=function(n){if(n!=null){var t=$(n).data("url");this.membersLoadInFrameEvent.emitEvent(t)}},n}();n.KycSecondaryAuthMobile=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.init=function(n){if(n!=null){var t=$(n);setTimeout(function(){t.trigger("gameGridLoaded")},350)}},n}();n.GamePodContainer=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.init=function(n){var i=this,t;if(n!=null){this.banner=$(n);this.banner.on("click",function(){t=i.banner.find(".destination,[data-link-destination]");t.length>0&&(window.location.href=i.extractDestinationPath(t))});this.banner.find(".terms-and-conditions, .termsContainer").on("click",function(n){n.stopPropagation()})}},n.prototype.extractDestinationPath=function(n){var t="";return n.is("a")&&(t=n.attr("href")),n.is("[data-link-destination]")&&(t=n.data("link-destination")),t},n}();n.LandingPageBanner=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.ThirdPartyCookieCheckEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e,o){this.id=n;this.token=t;this.freePlay=i;this.maxHeight=r;this.maxWidth=u;this.minHeight=f;this.minWidth=e;this.thirdPartyCookieRestricted=o}return n}();n.Game=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(logService){this.logService=logService}return t.prototype.getGameInformation=function(){return this.game==null&&(this.gameInformation=$("div.gamePlayInformation"),this.gameInformation.length==1&&(this.game=new n.Models.Game(this.gameInformation.data("gameid"),this.gameInformation.data("gametoken"),this.gameInformation.data("freeplay"),this.gameInformation.data("maxheight"),this.gameInformation.data("maxwidth"),this.gameInformation.data("minheight"),this.gameInformation.data("minwidth"),this.gameInformation.data("thirdpartycookierestricted")))),this.game},t.prototype.getGameFilter=function(t,i,r){var f=this.getGameInformation(),u="";this.game!=null&&(u=f.token);this.getResponse("/GamePod/GameSlider",new n.Models.SliderRequestModel(t,i,"",u),r)},t.prototype.getGameLaunchInformationByToken=function(t){var r=this,i;return $.ajax({url:"/GamePod/GamePlayInformationByToken/",type:"GET",async:!1,data:{request:JSON.stringify({t:t})}}).done(function(t){if(t!=""){var r=JSON.parse(t);i=new n.Models.GameLaunchInformation(r.t,r.r)}}).fail(function(){return r.logService.write("Failed to find game launch information for token "+t),null}),i},t.prototype.getResponse=function(n,t,i){var r=this;$.ajax({url:n,type:"GET",data:{request:JSON.stringify(t)}}).done(function(n){r.processResponse(n,i)})},t.prototype.processResponse=function(n,t){if(n!=""){var i=JSON.parse(n),r=this.convertResponseToGamePodArray(i.g);t(r)}},t.prototype.convertResponseToGamePodArray=function(t){var i=[];return t.map(function(t){return i[t.id]=new n.Models.GamePodModel(t.id,t.tkn,t.im,t.na,t.ra,t.t1t,t.t1,t.t2t,t.t2,t.pc,t.ne,t.rid)})},t}();t.GameService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(thirdPartyCookieCheckEvent,cookieService,gameService){this.baseGameLaunchUrl="/Play/";this.returnParameter="?returnPath=";this.thirdPartyCookieCheckEvent=thirdPartyCookieCheckEvent;this.cookieService=cookieService;this.gameService=gameService}return n.prototype.launchGame=function(n){n==null||n.length<1||(this.isGameThirdPartyCookiesRestricted(n)?this.thirdPartyCookieCheckEvent.emitEvent():this.redirectToGame(this.baseGameLaunchUrl+n+this.returnParameter+this.getReturnPath()))},n.prototype.redirectToGame=function(n){window.location.href=n},n.prototype.openGameInNewWindow=function(n){var i="/window"+this.baseGameLaunchUrl+"?gameToken="+n+"&product=4",r=window.open(i,n,"width=900,height=675, resizable=yes"),u=$("form[data-component-type='DesktopHeaderLogin']").length>0,t;u&&(t=setInterval(function(){r.closed&&(clearInterval(t),window.location.reload())},1e3))},n.prototype.isGameThirdPartyCookiesRestricted=function(n){if(this.cookieService.areThirdPartyCookiesRestricted()){var t=this.gameService.getGameLaunchInformationByToken(n);return t&&t.thirdPartyCookieRestricted==!0?!0:!1}return!1},n.prototype.getReturnPath=function(){var n=$("body").data("pageAttributes");return n.ReturnPath&&n.ReturnPath.length>0?n.ReturnPath:encodeURIComponent(location.pathname)},n}();n.GameLaunchService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(gameLaunchService){this.gameLaunchService=gameLaunchService}return n.prototype.init=function(n){n!=null&&(this.launchLink=$(".GameLaunchLink",n),this.registerGameLaunchClickEvent())},n.prototype.registerGameLaunchClickEvent=function(){var n=this;this.launchLink.click(function(t){t.preventDefault();var i=$(t.currentTarget).attr("data-gametoken");n.gameLaunchService.launchGame(i)})},n}();n.GameLaunchLink=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(i){"use strict";var r=n.Games.Models.Modal,u=n.Games.Components.GameLaunchLink,f=function(){function i(modalService,gameLaunchService,browserDetailsService,localStorageService){this.priority=50;this.modalService=modalService;this.gameLaunchService=gameLaunchService;this.browserDetailsService=browserDetailsService;this.localStorageService=localStorageService}return i.prototype.init=function(n){n!=null&&this.setupBanner()},i.prototype.setupBanner=function(){var n=this.browserDetailsService.getBrowser(),t;if(this.localStorageService.supportForLocalStorage()){if(n.name==="Internet Explorer"&&n.version===8)return;t=this.getNextBanner();this.showBanner(t)}},i.prototype.getNextBanner=function(){var n,i=$(".modal.loggedin"),t;if(!i.is(":visible")){if(this.bannerShouldNotBeShownOnPage())return"";t=this.getPreviousBannerIds();$.ajax({type:"GET",async:!1,url:"/Overlays/GetNext?ids="+t,cache:!1,success:function(t){t&&(n=t)}})}return n},i.prototype.getPreviousBannerIds=function(){var f=[],o=+new Date-1296e5,n=this.localStorageService.getData(5),t,i,r,u,e;if(n){for(t=[],i=0;i<n.overlayBanners.length;i++)r=n.overlayBanners[i],o<r.interactedTime?f.push(r.id):t.push(r);for(u=0;u<t.length;u++)e=n.overlayBanners.indexOf(t[u]),n.overlayBanners.splice(e,1);this.localStorageService.setData(5,n)}return f},i.prototype.showBanner=function(t){var f=this,i;t&&t.length!==0&&!$(".members-frame-mobile").is(":visible")&&(this.modal=$(t),$(".modals").append(this.modal),this.gameLaunchLink=new u(this.gameLaunchService),this.gameLaunchLink.init(this.modal[0]),this.bindClicks(),i=this.modal.find(".PodJackpot").length>0,i&&n.cmsCore.jackpots!==undefined&&n.cmsCore.jackpots.startFromElement($),this.modalService.showModal(new r(this.modal,this.priority,2,!0,!0,0,!1,!0,function(){f.acknowledgeBanner()})))},i.prototype.bindClicks=function(){var n=this,i=this.modal.find(".OverlayBannerCallToAction, #OverlayBannerImage"),t;i.on("click",function(){n.acknowledgeBanner()});t=this.modal.find("#OverlayBannerCloseButton");t.on("click",function(){n.acknowledgeBanner();n.modalService.hideModal()})},i.prototype.acknowledgeBanner=function(){var i=this.modal.attr("data-overlaybanner-id");if(i){var n=this.localStorageService.getData(5),r=n&&n.overlayBanners?n.overlayBanners:[],u=new t.Models.OverlayBanner(i,+new Date);r.push(u);this.localStorageService.setData(5,new t.Models.OverlayBanners(r))}},i.prototype.bannerShouldNotBeShownOnPage=function(){var n=window.location.pathname.toLowerCase(),i=n.indexOf("/play/")>=0,t;return i?!0:(t=n.indexOf("/slots-giveaway")>=0||n.indexOf("/one-million-spectacular")>=0,t)?!0:!1},i}();i.OverlayBannerModal=f})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f){this.total=n;this.withdrawable=t;this.nonWithdrawable=i;this.bonus=r;this.isoCode=u;this.sportsAndGamesTotalBalance=f}return n}();n.Balances=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(balanceUpdateEvent){this.balanceUpdateEvent=balanceUpdateEvent;this.balances=null;this.inProgress=!1}return t.prototype.getBalances=function(){return this.balances!==null?this.balances:(this.refreshBalances(),null)},t.prototype.refreshBalances=function(){var t=this;this.inProgress||(this.inProgress=!0,$.ajax({dataType:"json",method:"GET",url:"/balance/balance",cache:!1}).done(function(i){var r=new n.Models.Balances(i.Total,i.Withdrawable,i.NonWithdrawable,i.Bonus,i.ISOCode,i.SportsAndGamesTotalBalance);t.balanceUpdateEvent.emitEvent(r);t.balances=r;t.inProgress=!1}))},t}();t.BalanceService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"user strict";var t=function(){function n(){}return n.prototype.handleMessageEvent=function(n){var i=n.originalEvent,t=JSON.parse(i.data),r,u;return t&&t.message?(r=this.parsePrimaryHost(i.origin),u=this.parsePrimaryHost(this.getWindowLocationHostname()),r!==u)?null:(t.origin=i.origin,t):null},n.prototype.postMessage=function(n,t,i,r){var u,f,e;return(r||(r={}),u=this.parsePrimaryHost(this.getWindowLocationHostname()),f=this.parsePrimaryHost(t),u!==f)?!1:(r.message=i,e=JSON.stringify(r),n.postMessage(e,t),!0)},n.prototype.parsePrimaryHost=function(n){return n.indexOf(".")>0?n.split(".").slice(1).join("."):n},n.prototype.getWindowLocationHostname=function(){return window.location.hostname},n}();n.PostMessageBrokerService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.MembersNotificationsLoadedEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.MembersNotificationsCompletedEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.MembersLoadInFrameEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.NavMembersProcessedEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(pageContextService,gamesSettingsService,membersLoadInFrameEvent,navMembersProcessedEvent){this.membersDefaultPage="/he/helpers/hostedredirect.aspx?prdid=";this.membersHash="type=Members;key=hopper;";this.pageContextService=pageContextService;this.gamesSettingsService=gamesSettingsService;this.membersLoadInFrameEvent=membersLoadInFrameEvent;this.navMembersProcessedEvent=navMembersProcessedEvent}return n.prototype.process=function(n){if(n&&n.postJoinNow&&this.isOnPlayGamePage()){window.location.href=this.buildPostJoinNowUrl();return}if(n&&n.loginStateChanged){window.location.hash.indexOf(this.membersHash)===-1&&(window.location.hash=this.membersHash);window.location.reload();return}var t=window.location.host.replace("games","mobile"),i=[window.location.protocol,"//",t,this.membersDefaultPage,this.gamesSettingsService.getGameSettings().bet365SportsProductType].join("");this.membersLoadInFrameEvent.emitEvent(i);this.navMembersProcessedEvent.emitEvent()},n.prototype.buildPostJoinNowUrl=function(){var n,t="launchGame=false";return n=window.location.search.length>0?[window.location.search,"&",t].join(""):["?",t].join(""),[window.location.protocol,"//",window.location.host,window.location.pathname,n,"#",this.membersHash].join("")},n.prototype.isOnPlayGamePage=function(){return this.pageContextService.getCurrentPage()===0},n}();n.NavMembersEventProcessor=t})(t=n.Processors||(n.Processors={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(postMessageBrokerService,membersNotificationsLoadedEvent,membersNotificationsCompletedEvent,navMembersEventProcessor){this.postMessageApiMethods={IFRAME_LOADED:this.frameLoaded,IFRAME_COMPLETE:this.frameComplete,NAV_3RDPARTY:this.navigateThirdParty,NAV_MEMBERS:this.navigateMembers};this.postMessageBrokerService=postMessageBrokerService;this.sendMembersNotificationsLoadedEvent=membersNotificationsLoadedEvent;this.sendMembersNotificationsCompletedEvent=membersNotificationsCompletedEvent;this.navMembersEventProcessor=navMembersEventProcessor}return n.prototype.setupMessagingService=function(){var n=this;$(window).on("message",function(t){var i=n.postMessageBrokerService.handleMessageEvent(t);n.handleMessage(i)})},n.prototype.postIFrameHosted=function(n,t){return this.postMessageBrokerService.postMessage(n,t,"IFRAME_HOSTED",null)},n.prototype.navigateMembers=function(n){this.navMembersEventProcessor.process(n)},n.prototype.handleMessage=function(n){if(this.postMessageApiMethods.hasOwnProperty(n.message)){var t=this.postMessageApiMethods[n.message];t.call(this,n)}},n.prototype.navigateThirdParty=function(n){n.url&&(window.location.href=n.url)},n.prototype.frameLoaded=function(n){this.sendMembersNotificationsLoadedEvent.emitEvent(n)},n.prototype.frameComplete=function(n){this.sendMembersNotificationsCompletedEvent.emitEvent(n)},n}();n.MembersNotificationsMessagingService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.ToggleMenuEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.LoginEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(balanceService,postMessageBrokerService,modalService,membersLoadInFrameEvent,toggleMenuEvent,loginEvent,pageContextService,gamesSettingsService,authenticationService,membersNotificationsMessagingService,navMembersEventProcessor){this.postMessageApiMethods={REAUTH_COMPLETE:"reauthenticationComplete",SHOW_HEADER:"showHeader",HIDE_HEADER:"hideHeader",INACTIVITY_RESET:"inactivityReset",IFRAME_LOADED:"frameLoaded",NAV_HOME:"navigateHome",NAV_MEMBERS:"navigateMembers",NAV_MEMBERS_DOMAIN:"navigateMembersDomain",NAV_3RDPARTY:"navigateThirdParty",NAV_3RDPARTYFORM:"navigateThirdPartyForm",IFRAME_HEIGHT:"setFrameHeight",USER_GET_BALANCE:"userGetBalance",USER_REFRESH_BALANCE:"userRefreshBalance",IFRAME_CLOSE:"closeFrame",PAGE_SCROLL:"scrollPage",NAV_HOME_LOGIN:"navigationHomeLogin",NAV_HOME_DOMAIN:"navigationHomeLogin"};this.membersPostMessages={userBalance:"USER_BALANCE"};this.balanceService=balanceService;this.postMessageBrokerService=postMessageBrokerService;this.modalService=modalService;this.membersLoadInFrameEvent=membersLoadInFrameEvent;this.toggleMenuEvent=toggleMenuEvent;this.loginEvent=loginEvent;this.pageContextService=pageContextService;this.gamesSettingsService=gamesSettingsService;this.authenticationService=authenticationService;this.membersNotificationsMessagingService=membersNotificationsMessagingService;this.navMembersEventProcessor=navMembersEventProcessor}return n.prototype.init=function(n){var t=this;n!=null&&(this.membersFrame=$("#MembersIFrame"),this.header=$(".header-wrapper, .landingPage .headerWrapper, .responsive-header"),this.subHeader=$(".divSubHeaderWrapper"),this.bodyContent=$(".body-content"),this.loginContainer=$(".header-login-container"),this.body=$("body"),this.footer=$(".footer, .landingPage .fullTerms"),this.overlay=$(".popup-mask"),this.membersDefaultPage="/he/helpers/hostedredirect.aspx?prdid=",this.membersHash="type=Members;key=hopper;",this.setupEvents(),window.location.hash.indexOf(this.membersHash)>-1&&this.navigateMembers(null),window.onhashchange=function(){t.isUserInMembers()})},n.prototype.setupEvents=function(){var n=this;this.membersLoadInFrameEvent.onEvent(function(t){n.loadInFrame(t)})},n.prototype.isUserInMembers=function(){window.location.hash.indexOf(this.membersHash)===-1&&this.hideMembers()},n.prototype.kycRequirement=function(n){window.location.hash.indexOf(this.membersHash)===-1&&this.loadInFrame(n)},n.prototype.attachMessageListener=function(){var n=this;$(window).on("message",function(t){var i=n.postMessageBrokerService.handleMessageEvent(t);n.handleMessage(i)})},n.prototype.showLoadingOverlay=function(){var n=$(".frame-loading-spinner");this.overlay.addClass("frame-loading-overlay");$("html").css("overflow","hidden");n.show();this.centerBox(n)},n.prototype.loadInFrame=function(n){this.membersFrame.length===0&&this.buildFrame();this.showLoadingOverlay();this.membersFrame.show();this.hideMembersHeader();this.membersFrame.attr("src",this.buildMembersFrameLink(n));this.attachMessageListener()},n.prototype.showMembersWithHeader=function(){this.header.show();this.subHeader.hide();this.footer.show();this.bodyContent.hide();this.pageContextService.addPageContext(2);this.membersFrame.length>0&&(this.productSlideMenuHasBeenHidden&&(this.productSlideMenuHasBeenHidden=!1,this.pageContextService.addPageContext(0)),this.membersFrame.removeClass("coverpage"),this.membersFrame.show())},n.prototype.showMembersWithoutHeader=function(){this.header.hide();this.subHeader.hide();this.footer.hide();this.bodyContent.hide();this.pageContextService.addPageContext(2);this.membersFrame.length>0&&(this.pageContextService.hasPageContext(0)&&(this.productSlideMenuHasBeenHidden=!0,this.pageContextService.removePageContext(0)),this.membersFrame.addClass("coverpage"),this.membersFrame.show())},n.prototype.hideMembers=function(){this.header.show();this.subHeader.show();this.footer.show();this.bodyContent.show();this.pageContextService.removePageContext(2);$("html").css("overflow","");this.productSlideMenuHasBeenHidden&&(this.productSlideMenuHasBeenHidden=!1,this.pageContextService.addPageContext(0));this.membersFrame.length>0&&this.membersFrame.is(":visible")&&(this.membersFrame.removeClass("coverpage"),this.membersFrame.hide(),window.location.hash="")},n.prototype.reauthenticationComplete=function(){},n.prototype.showHeader=function(){this.showMembersWithHeader()},n.prototype.hideHeader=function(){this.showMembersWithoutHeader()},n.prototype.inactivityReset=function(){},n.prototype.frameLoaded=function(n){window.location.hash=this.membersHash;$("html").css("overflow","visible");this.overlay.find(".frame-loading-spinner").hide();this.overlay.removeClass("frame-loading-overlay");this.postIFrameHosted(n)},n.prototype.navigateHome=function(n){this.closeFrame();(n.loginStateChanged||this.isOnPlayGamePage())&&window.location.reload()},n.prototype.postIFrameHosted=function(n){var t=this.membersFrame[0].contentWindow;this.membersNotificationsMessagingService.postIFrameHosted(t,n.origin)},n.prototype.navigateMembers=function(n){this.navMembersEventProcessor.process(n)},n.prototype.navigateMembersDomain=function(n){if(n&&n.domain){var t=[window.location.search,"#",this.membersHash].join("");this.redirectToNewDomain(n.domain,t)}},n.prototype.navigateThirdParty=function(n){n.url&&(window.location.href=n.url)},n.prototype.navigateThirdPartyForm=function(n){var t;n.url&&n.formData&&(t=document.createElement("form"),t.setAttribute("method","post"),t.setAttribute("action",n.url),t.innerHTML=n.formData,document.body.appendChild(t),t.submit())},n.prototype.setFrameHeight=function(n){n&&n.height!==undefined&&n.height>=0&&(n.height===0?this.membersFrame.css("height",""):this.membersFrame.height(n.height))},n.prototype.userGetBalance=function(){this.balanceService.getBalances()===null&&this.userRefreshBalance()},n.prototype.userRefreshBalance=function(){this.balanceService.refreshBalances()},n.prototype.closeFrame=function(){this.hideMembers();this.isOnPlayGamePage()&&window.location.reload()},n.prototype.scrollPage=function(n){if(n&&n.top){var t=n.top,i=this.header.first();n.top>0&&i.is(":visible")&&(t=t+i.height());window.scrollTo(0,t)}},n.prototype.navigationHomeLogin=function(){this.hideMembers();var n=this.authenticationService.getAuthenticationType();this.loginEvent.emitEvent(1,n,1,!0,null,1,!1)},n.prototype.buildFrame=function(){var n;this.membersFrame=$("<iframe>",{id:"MembersIFrame",name:"MembersIFrame",scrolling:"no",frameBorder:"0","data-component-type":"MembersIFrame","class":"members-frame-mobile",style:"display:block"});n=$("<div>",{"class":"members-frame-container"});n.append(this.membersFrame);this.bodyContent.after(n)},n.prototype.buildMembersFrameLink=function(n){return n.indexOf("?mh=1")===-1&&n.indexOf("&mh=1")===-1?n.indexOf("?")===-1?[n,"?mh=1"].join(""):[n,"&mh=1"].join(""):n},n.prototype.isOnPlayGamePage=function(){return this.pageContextService.getCurrentPage()===0},n.prototype.redirectToNewDomain=function(n,t){var i=window.location.host,r=i.split("."),u=r[r.length-1],f=i.replace(u,n),e=[window.location.protocol,"//",f,window.location.pathname,t].join("");this.windowRedirect(e)},n.prototype.hideMembersHeader=function(){this.toggleMenuEvent.emitEvent(1,0)},n.prototype.handleMessage=function(n){if(this.postMessageApiMethods.hasOwnProperty(n.message)){var t=this.postMessageApiMethods[n.message];this[t](n)}},n.prototype.windowRedirect=function(n){window.location.href=n},n.prototype.centerBox=function(n,t){t===void 0&&(t=!1);n.css("position","absolute");var i=$(window).height()-n.outerHeight(),r=$(window).width()-n.outerWidth(),u=Math.max(0,i/2+(t?0:$(window).scrollTop())),f=Math.max(0,r/2);n.css("top",u+"px");n.css("left",f+"px");n.css("margin-left","0");n.css("margin-top","0")},n}();n.MembersFrame=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(membersLoadInFrameEvent){this.membersLoadInFrameEvent=membersLoadInFrameEvent}return n.prototype.init=function(n){var t=this;if(n!=null){this.link=$(n);this.link.off("click");this.link.removeAttr("onclick");this.href=this.link.attr("href");this.link.on("click",function(n){n.preventDefault();n.stopPropagation();t.membersLoadInFrameEvent.emitEvent(t.href)})}},n}();n.MembersFrameLink=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.quickDepositEnabled=n;this.lastFourDigits=t;this.minimumQuickDepositAmount=i}return n}();n.QuickDepositSettingsModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r){this.id=n;this.imagePath=t;this.gameToken=i;this.name=r}return n}();n.SearchResult=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Success=0]="Success";n[n.Fail=1]="Fail";n[n.Timeout=2]="Timeout"})(t=n.ResultCodes||(n.ResultCodes={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(){this.inProgress=!1;this.inProgress=!1;this.settingsCallbacks=[];this.fiveSeconds=5e3}return t.prototype.getSettings=function(t){var i=this;this.settingsCallbacks.push(t);this.inProgress||(this.inProgress=!0,$.ajax({method:"POST",url:"/QuickDeposit/Setup"}).done(function(t){for(var u=new n.Models.QuickDepositSettingsModel(t.UserDataResults.QuickDepositSupported&&t.UserDataResults.QuickDepositSupported.indexOf("Menu")>-1,t.UserDataResults.Last4CardDigits,t.UserDataResults.MinimumQuickDepositAmount),r=0;r<i.settingsCallbacks.length;r++)i.settingsCallbacks[r](u);i.settingsCallbacks=[];i.inProgress=!1}))},t.prototype.deposit=function(n,t,i,r){$.ajax({method:"POST",url:"/QuickDeposit/Deposit",timeout:this.fiveSeconds,data:{amount:n,cv2:t,__RequestVerificationToken:i}}).done(function(n){n.ResultCode==="Success"?r(0,n.ResultHeader,n.ResultDescription):r(1,n.ResultHeader,n.ResultDescription)}).fail(function(n){n.statusText==="timeout"?r(2,null,null):r(1,null,null)})},t}();t.QuickDepositService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.ToggleBalanceEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.BalanceUpdateEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=n.Games.Models.HideBalance,u=function(){function t(balanceService,localStorageService,balanceUpdateEvent,headerDropDownMenuEvent,quickDepositService,toggleMenuEvent,toggleBalanceEvent,modalService,authenticationService,createPinEvent,pinCreatedEvent,membersService,gamesSettingsService,userPreferenceService,pageContextService){this.membersMenuModalPriority=40;this.myOffersActive=!1;this.balanceService=balanceService;this.balanceUpdateEvent=balanceUpdateEvent;this.sendHeaderDropDownMenuEvent=headerDropDownMenuEvent;this.quickDepositService=quickDepositService;this.sendToggleMenuEvent=toggleMenuEvent;this.receiveToggleMenuEvent=toggleMenuEvent;this.localStorageService=localStorageService;this.sendToggleBalanceEvent=toggleBalanceEvent;this.modalService=modalService;this.membersService=membersService;this.authenticationService=authenticationService;this.sendCreatePinEvent=createPinEvent;this.receivePinCreatedEvent=pinCreatedEvent;this.receiveToggleBalanceEvent=toggleBalanceEvent;this.gamesSettingsService=gamesSettingsService;this.userPreferenceService=userPreferenceService;this.pageContextService=pageContextService}return t.prototype.init=function(n){var t=this,u,r,f;n!==null&&(this.slideMenu=$(n),this.refresh=this.slideMenu.find(".refresh-icon"),this.logout=this.slideMenu.find(".log-out"),this.balanceVisibility=this.slideMenu.find(".visibility-icon"),this.balanceContainer=this.slideMenu.find(".balance-container"),this.headerContainer=this.slideMenu.find(".header-container"),this.balanceBreakdownContainer=this.slideMenu.find(".balance-expand-container"),this.depositButton=this.slideMenu.find(".deposit-button.async-button.quickdeposit"),this.fallbackDepositButton=this.slideMenu.find(".header-info-row .deposit-button.fallback"),this.authenticationOptionMenu=this.slideMenu.find(".auth-option-menu"),this.authenticationTogglePin=this.slideMenu.find("#authTogglePin"),this.serviceLink=this.slideMenu.find(".services-container a"),this.cogLink=this.slideMenu.find(".cog-icon"),this.servicesMenu=this.slideMenu.find(".services-submenu"),this.standardMenu=this.slideMenu.find(".standard-menu"),this.myOffersActive=this.isMyOffersActive(),this.myOffersActive&&(this.myOffersButton=this.slideMenu.find(".user-offers"),this.myOffer=this.slideMenu.find(".offer-container")),u=this.localStorageService.getData(0),u&&u.hideBalance&&this.hideBalance(),r=this.balanceService.getBalances(),r!==undefined&&r!==null&&this.populateBalances(r),this.depositButton.hide(),this.fallbackDepositButton.hide(),this.quickDepositService.getSettings(function(n){n.quickDepositEnabled&&t.gamesSettingsService.getGameSettings().mobile?(t.depositButton.show(),t.balanceContainer.find(".balance-arrow").removeClass("active"),t.depositButton.click(function(){t.sendToggleMenuEvent.emitEvent(0,1)})):t.fallbackDepositButton.show()}),this.setupClickEvents(),this.bindEvents(),this.authenticationService.isAuthenticationTokenAvailable()?this.setupPinAuthentication():this.authenticationOptionMenu.closest(".row").hide(),this.membersMenuModal=new i(this.slideMenu,this.membersMenuModalPriority,1,!0,!1,1,!0,!1,function(){t.sendToggleMenuEvent.emitEvent(1,0)}),f=this.serviceLink.length>0,f&&(this.setupServiceMenu(),this.showUpdatedElements()))},t.prototype.setupServiceMenu=function(){var n=this;this.languageMenu=this.servicesMenu.find(".language-menu");this.timeZoneMenu=this.servicesMenu.find(".timezone-menu");this.inactivityTimeMenu=this.servicesMenu.find(".inactivity-time-menu");this.cogLink.click(function(){n.servicesMenu.show();n.standardMenu.hide();n.serviceLink.removeClass("selected");n.cogLink.addClass("selected");n.myOffersActive&&(n.slideMenu.find(".offer-container").removeClass("show"),n.slideMenu.find(".my-offers-tab").removeClass("show"),n.myOffersButton.removeClass("selected"))});this.serviceLink.click(function(){n.servicesMenu.hide();n.standardMenu.show();n.serviceLink.addClass("selected");n.cogLink.removeClass("selected");n.myOffersActive&&(n.slideMenu.find(".offer-container").removeClass("show"),n.slideMenu.find(".my-offers-tab").removeClass("show"),n.myOffersButton.removeClass("selected"))});this.myOffersActive&&this.myOffersButton.click(function(){n.slideMenu.find(".offer-container").addClass("show");n.slideMenu.find(".my-offers-tab").addClass("show");n.servicesMenu.hide();n.standardMenu.hide();n.serviceLink.removeClass("selected");n.cogLink.removeClass("selected");n.myOffersButton.addClass("selected");n.sendHeaderDropDownMenuEvent.emitEvent(1)});this.setupLanguageMenu();this.setupTimeZoneMenu();this.setupinactivityTimeMenu()},t.prototype.setupLanguageMenu=function(){var n=this;this.languageMenu.change(function(){var t=$("option:selected",n.languageMenu),i=Number(t.attr("data-language-id"));n.userPreferenceService.setLanguage(i)})},t.prototype.setupTimeZoneMenu=function(){var n=this;this.timeZoneMenu.change(function(){var t=$("option:selected",n.timeZoneMenu),i=Number(t.attr("data-time-zone-id"));n.userPreferenceService.setTimeZone(i)})},t.prototype.setupinactivityTimeMenu=function(){var n=this;this.inactivityTimeMenu.change(function(){var t=$("option:selected",n.inactivityTimeMenu),i=Number(t.attr("data-inactivity-id")),r=Number(t.attr("data-inactivity-amount"));n.userPreferenceService.setInactivity(i,r)})},t.prototype.showUpdatedElements=function(){if(!Modernizr.mq("(min-width: 1100px)")){var n=this.localStorageService.getData(4);n&&(n.inactivityUpdated||n.languageUpdated||n.timeZoneUpdated)&&(this.sendToggleMenuEvent.emitEvent(1,1),this.servicesMenu.show(),this.standardMenu.hide(),this.serviceLink.removeClass("selected"),this.cogLink.addClass("selected"),n.languageUpdated&&this.addUpdatedTickToMenuHeader(this.languageMenu),n.timeZoneUpdated&&this.addUpdatedTickToMenuHeader(this.timeZoneMenu),n.inactivityUpdated&&this.addUpdatedTickToMenuHeader(this.inactivityTimeMenu));this.localStorageService.remove(4)}},t.prototype.addUpdatedTickToMenuHeader=function(n){var i=500,t=n.closest(".preferences-row-selection-wrapper"),r=t.find(".preferences-row-updated-label");t.addClass("updated");setTimeout(function(){r.fadeOut(i,function(){t.removeClass("updated")})},6e3)},t.prototype.setupPinAuthentication=function(){var n=this;if(!this.localStorageService.supportForLocalStorage()){this.authenticationTogglePin.addClass("slider-toggle-disabled");return}this.getAuthenticationType()!==1&&this.authenticationTogglePin.addClass("slider-toggle-off");this.authenticationOptionMenu.click(function(){n.getAuthenticationType()!==0&&n.authenticationService.revertAuthorisationToken();n.authenticationTogglePin.hasClass("slider-toggle-off")?n.sendCreatePinEvent.emitEvent():n.authenticationTogglePin.addClass("slider-toggle-off")});this.receivePinCreatedEvent.onEvent(function(){n.authenticationTogglePin.removeClass("slider-toggle-off")})},t.prototype.setupClickEvents=function(){var t=this;this.refresh.click(function(){t.balanceUpdateInProgress=!0;var n=t.slideMenu.find(".refresh-icon");n.toggleClass("spinning");t.balanceService.refreshBalances();setTimeout(function(){n.toggleClass("spinning");t.balanceUpdateInProgress=!1},2e3)});this.logout.click(function(t){return t.preventDefault(),n.cmsCore.Session.LogOut(),!1});this.balanceContainer.click(function(){t.balanceBreakdownContainer.toggle()});this.balanceVisibility.click(function(){var n=!(t.balanceContainer.css("visibility")==="hidden");t.localStorageService.setData(0,new r(n));n?t.sendToggleBalanceEvent.emitEvent(0):t.sendToggleBalanceEvent.emitEvent(1)});this.slideMenu.find(".logout").click(function(t){return t.preventDefault(),window.location.hash="",n.cmsCore.Session.LogOut(),!1})},t.prototype.bindEvents=function(){var n=this;this.balanceUpdateEvent.onEvent(function(t){n.populateBalances(t)});this.receiveToggleMenuEvent.onEvent(function(t,i){if(t!==2){if(t!==null&&t===0){n.slideMenu.hide();return}n.slideMenu.show();t!==null&&t===1&&(i!==null&&i>-1?i===1?n.showMembersMenu():n.hideMembersMenu():n.slideMenu.hasClass("slide")?n.hideMembersMenu():n.showMembersMenu());n.slideMenu.hasClass("slide")&&n.displayMessageCount()}});this.receiveToggleBalanceEvent.onEvent(function(t){t===0?n.hideBalance():n.showBalance()})},t.prototype.hideMembersMenu=function(){var n=this.pageContextService.hasPageContext(2),t=n;this.slideMenu.hasClass("slide")&&this.membersMenuModal&&this.modalService.removeModal(this.membersMenuModal,t)},t.prototype.showMembersMenu=function(){var n=this.localStorageService.getData(4);n||this.resetMenu();this.modalService.showModal(this.membersMenuModal)},t.prototype.resetMenu=function(){var n="selected";this.servicesMenu.hide();this.standardMenu.show();this.serviceLink.addClass(n);this.cogLink.removeClass(n);this.myOffersActive&&(this.myOffersButton.removeClass(n),this.slideMenu.find(".offer-container").removeClass("show"),this.slideMenu.find(".my-offers-tab").removeClass("show"))},t.prototype.displayMessageCount=function(){var t=this,n=this.slideMenu.find(".messagesLink");n.length>0&&$.ajax({method:"POST",url:"/AccountMessages/UnreadMessages"}).done(function(i){var r=t.slideMenu.find(".messageCount");r.remove();i&&n.append(['<div class="messageCount">',i,'<div class="sprite"><\/div><\/div>'].join(""))})},t.prototype.hideBalance=function(){this.headerContainer.addClass("no-balance")},t.prototype.showBalance=function(){this.headerContainer.removeClass("no-balance")},t.prototype.populateBalances=function(n){var i=n.sportsAndGamesTotalBalance?n.sportsAndGamesTotalBalance:n.total,t;(this.balanceContainer.find(".balance").html(this.formatCurrency(i,n.isoCode)),this.balanceBreakdownContainer.find(".bonus-balance-container .balance-value").html(this.formatCurrency(n.bonus,n.isoCode)),this.balanceBreakdownContainer.find(".withdrawable-balance-container .balance-value").html(this.formatCurrency(n.withdrawable,n.isoCode)),t=this.balanceBreakdownContainer.find(".non-withdrawable-balance-container .balance-value"),t.length!==0)&&(t.html(this.formatCurrency(n.nonWithdrawable,n.isoCode)),this.balanceBreakdownContainer.find(".total-balance-container .balance-value").html(this.formatCurrency(n.total,n.isoCode)))},t.prototype.formatCurrency=function(n,t){return n.replace(t,'<span class="currency">'+t+"<\/span>")},t.prototype.getAuthenticationType=function(){return this.membersService.getAuthenticationType()},t.prototype.isMyOffersActive=function(){var n=this.slideMenu.find(".my-offers-tab");return n!==undefined?!0:!1},t}();t.MobileHeaderSlideMenu=u})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Standard=0]="Standard";n[n.Pin=1]="Pin";n[n.KeepMeLoggedIn=3]="KeepMeLoggedIn"})(t=n.AuthenticationType||(n.AuthenticationType={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(modalService,loginService,membersService,authenticationService,failedLoginEvent,loginEvent,authenticationNotAllowedEvent,noPinSetEvent){this.priority=50;this.modalService=modalService;this.loginService=loginService;this.membersService=membersService;this.authenticationService=authenticationService;this.failedLoginEvent=failedLoginEvent;this.receiveLoginEvent=loginEvent;this.sendLoginEvent=loginEvent;this.authenticationNotAllowedEvent=authenticationNotAllowedEvent;this.noPinSetEvent=noPinSetEvent}return n.prototype.init=function(n){var t=this;n!=null&&(this.pinAuthentication=$(n),this.pinCodeLogin=this.pinAuthentication.find(".pin-entry-input"),this.cancelButton=this.pinAuthentication.find(".cancel-button"),this.forgottenButton=this.pinAuthentication.find(".forgotten-button"),this.forgottenContinueButton=this.pinAuthentication.find(".login-pin-forgotten .primary-button-container a"),this.forgottenCancelButton=this.pinAuthentication.find(".login-pin-forgotten .secondary-button-container a"),this.loginPin=this.pinAuthentication.find(".login-pin"),this.pinContainer=this.pinAuthentication.find(".pin-container"),this.pinEntry=this.pinAuthentication.find(".pin-container .pin-entry"),this.loginPinFailed=this.pinAuthentication.find(".login-pin-failed"),this.pinAuthenticationNotAvailable=this.pinAuthentication.find(".login-pin-not-available"),this.closeCallback=function(){return t.modalService.hideModal()},this.bindClickEvents(),this.bindPinInputElementKeyEvents(),this.updatePinEntryAttempts(),this.setupEvents())},n.prototype.setupEvents=function(){var n=this;this.failedLoginEvent.onEvent(function(t){t===1&&(n.authenticationService.incrementPinAuthenticationAttempts(),n.updatePinEntryAttempts(),n.shakePinContainer(),n.resetPinEntry())});this.receiveLoginEvent.onEvent(function(t,r,u,f,e,o,s){(r===void 0&&(r=0),u===void 0&&(u=0),f===void 0&&(f=!0),e===void 0&&(e=null),o===void 0&&(o=2),s===void 0&&(s=!0),r===1)&&(t===1?n.pinAuthentication.hasClass("slide")||(e!=null&&(n.closeCallback=e),n.pinAuthentication.addClass("pin-login").removeClass("forgotten-login"),n.pinModal=new i(n.pinAuthentication,n.priority,o,f,s,u,!1,!0,function(){n.closeLoginModal()}),n.modalService.showModal(n.pinModal),n.pinCodeLogin.focus()):n.pinAuthentication.hasClass("slide")&&n.modalService.hideModal())});this.authenticationNotAllowedEvent.onEvent(function(t){t===1&&(n.pinAuthentication.removeClass("pin-login").addClass("pin-authentication-not-allowed"),n.pinAuthenticationNotAvailable.click(function(){n.revertToStandardLogin()}))});this.noPinSetEvent.onEvent(function(){n.setupFailedLogin();n.showAuthenticationFailed()})},n.prototype.closeLoginModal=function(){this.sendLoginEvent.emitEvent(0,1)},n.prototype.bindClickEvents=function(){var n=this;this.cancelButton.on("click",function(){n.revertToStandardLogin()});this.forgottenButton.on("click",function(){n.setupAndShowForgottenLogin()});this.loginPin.on("click",function(){n.pinCodeLogin.focus()})},n.prototype.setupFailedLogin=function(){var n=this,t=this.loginPinFailed.find(".button");t.click(function(){n.revertToStandardLogin()})},n.prototype.setupAndShowForgottenLogin=function(){var n=this;this.pinAuthentication.addClass("forgotten-login").removeClass("pin-login");this.forgottenCancelButton.click(function(){n.closeCallback()});this.forgottenContinueButton.click(function(){n.revertToStandardLogin()})},n.prototype.revertToStandardLogin=function(){this.authenticationService.resetPinAuthenticationData();this.membersService.revertToStandardAuthentication();this.modalService.removeModal(this.pinModal);this.sendLoginEvent.emitEvent(1,0,1,!0,function(){},3,!1)},n.prototype.updatePinEntryAttempts=function(){var n=this.authenticationService.getPinAuthenticationAttemptsRemaining();this.pinAuthentication.removeClass("attempts-remaining-2").removeClass("attempts-remaining-1");n===1?this.pinAuthentication.addClass("attempts-remaining-1"):n===2?this.pinAuthentication.addClass("attempts-remaining-2"):n<=0&&(this.setupFailedLogin(),this.showAuthenticationFailed())},n.prototype.showAuthenticationFailed=function(){this.pinAuthentication.addClass("authentication-failed").removeClass("pin-login")},n.prototype.bindPinInputElementKeyEvents=function(){var n=this;this.pinCodeLogin.on("keyup",function(t){n.loginIfFullPinEntered(t)});this.pinCodeLogin.on("input change",function(){n.handlePinInputChange()})},n.prototype.handlePinInputChange=function(){this.updatePinEntryClasses(this.pinCodeLogin.val())},n.prototype.loginIfFullPinEntered=function(n){var t=n.currentTarget.value,i;return t.length===4&&(this.pinAuthentication.addClass("processing-authentication").removeClass("attempts-remaining-2").removeClass("attempts-remaining-1"),i=this.membersService.getSavedUsername(),this.loginService.pinLogin(i,t,window.location.pathname,"","PinLogin")),!0},n.prototype.shakePinContainer=function(){var t=this,n="pin-code-failure";this.pinContainer.addClass(n);setTimeout(function(){t.pinContainer.removeClass(n)},500)},n.prototype.resetPinEntry=function(){this.pinAuthentication.removeClass("processing-authentication");this.pinEntry.removeClass("pin-entered");this.pinCodeLogin.val("");this.pinCodeLogin.focus()},n.prototype.updatePinEntryClasses=function(n){this.pinEntry.each(function(t,i){t<n.length?$(i).addClass("pin-entered"):$(i).removeClass("pin-entered")})},n}();t.PinAuthentication=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.hideUsername=n}return n}();n.UsernameVisibility=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.UsernameVisibility,r=function(){function n(loginEvent,pageContextService,toggleProductNavigationEvent,authenticationService,localStorageService,toggleMenuEvent,balanceUpdateEvent,toggleBalanceEvent){this.showMenuCssClass="show-menu";this.iScrollSettings={scrollY:!1,scrollX:!0,click:!1,tap:!0,momentum:!1,preventDefaultException:{tagName:/.*/}};this.loginEvent=loginEvent;this.pageContextService=pageContextService;this.recieveToggleProductNavigationEvent=toggleProductNavigationEvent;this.authenticationService=authenticationService;this.localStorageService=localStorageService;this.sendToggleMenuEvent=toggleMenuEvent;this.receiveToggleMenuEvent=toggleMenuEvent;this.balanceUpdateEvent=balanceUpdateEvent;this.receiveToggleBalanceEvent=toggleBalanceEvent}return n.prototype.init=function(n){n!=null&&(this.header=$(n),this.hide=this.header.find(".hide"),this.navigationWrapper=this.header.find(".product-navigation-wrapper"),this.logIn=this.header.find(".log-in"),this.serviceSelector=this.header.find(".service-selector"),this.serviceText=this.header.find(".services-text"),this.languageSelector=this.header.find(".LanguageSelector"),this.languageSelectorItems=this.header.find(".LanguageSelector li"),this.loggedInContainer=this.header.find(".logged-in-container"),this.userInformation=this.header.find(".user-information"),this.rightHandSideContainer=this.header.find(".right-hand-side-container"),this.userBalance=this.header.find(".balance"),this.largeMenuIcon=this.header.find(".large .user-information .icon"),this.setupProductNavigation(),this.setupLogin(),this.setupLoggedIn(),this.setupBottomBar(),this.setupBalanceEvent(),this.setupMenuEvents())},n.prototype.setupProductNavigation=function(){var n=this;this.hide.click(function(t){t.stopPropagation();n.hideNavigationWrapper()});this.header.find(".product-navigation-toggle").click(function(){n.navigationWrapper.hasClass("slidedown")?n.hideNavigationWrapper():n.showNavigationWrapper();var t=n.navigationWrapper.find(".navigation-container"),i=new IScroll(t.get(0),n.iScrollSettings);n.header.on("dragstart",t,function(){return!1})});this.recieveToggleProductNavigationEvent.onEvent(function(t){t===0&&n.hideNavigationWrapper()})},n.prototype.setupMenuEvents=function(){var n=this;this.rightHandSideContainer.mouseleave(function(){n.sendToggleMenuEvent.emitEvent(2,0)})},n.prototype.hideNavigationWrapper=function(){this.navigationWrapper.removeClass("active slidedown");this.pageContextService.removePageContext(0)},n.prototype.showNavigationWrapper=function(){this.navigationWrapper.addClass("active slidedown");this.pageContextService.addPageContext(0)},n.prototype.setupLogin=function(){var n=this;this.logIn.click(function(t){t.preventDefault();t.stopPropagation();var i=n.authenticationService.getAuthenticationType();n.logIn.hasClass("active")?(n.hideLogin(i),n.removeHideLoginOnPageSizeChange()):(n.logIn.addClass("active"),n.loginEvent.emitEvent(1,i,1,!0,null,1,!1),n.addHideLoginOnPageSizeChange())})},n.prototype.setupLoggedIn=function(){var n=this;this.largeMenuIcon.click(function(t){t.stopPropagation();n.largeMenuIcon.hasClass(n.showMenuCssClass)?(n.largeMenuIcon.removeClass(n.showMenuCssClass),n.sendToggleMenuEvent.emitEvent(2,0)):(n.largeMenuIcon.addClass(n.showMenuCssClass),n.sendToggleMenuEvent.emitEvent(2,1))});this.loggedInContainer.click(function(){n.userInformation.hasClass("active")?(n.sendToggleMenuEvent.emitEvent(1),n.userInformation.removeClass("active")):(n.sendToggleMenuEvent.emitEvent(1,1),n.userInformation.addClass("active"))});this.handleComponentVisibilityAfterResize=function(){Modernizr.mq("(min-width: 1100px)")&&(n.sendToggleMenuEvent.emitEvent(1,0),$(window).off("resize",n.handleComponentVisibilityAfterResize))};this.receiveToggleMenuEvent.onEvent(function(t,i){if(t===2){i!==null&&i===0&&n.largeMenuIcon.removeClass(n.showMenuCssClass);return}t!==null&&t===1&&i!==null&&i===0?(n.userInformation.removeClass("active"),$(window).off("resize",n.handleComponentVisibilityAfterResize)):(n.userInformation.addClass("active"),$(window).resize(n.handleComponentVisibilityAfterResize))});this.balanceUpdateEvent.onEvent(function(t){n.populateBalances(t)});this.setupUsername()},n.prototype.setupUsername=function(){var n=this,t="username-hidden",r="username-visible",u=this.localStorageService.getData(3);u&&u.hideUsername?this.userInformation.addClass(t):this.userInformation.addClass(r);this.header.find(".show-username").click(function(){n.userInformation.addClass(r).removeClass(t);n.localStorageService.setData(3,new i(!1))});this.header.find(".hide-username").click(function(){n.userInformation.removeClass(r).addClass(t);n.localStorageService.setData(3,new i(!0))})},n.prototype.hideLogin=function(n){this.logIn.removeClass("active");this.loginEvent.emitEvent(0,n,1,!0,null,1,!1)},n.prototype.addHideLoginOnPageSizeChange=function(){var n=this;this.resizeHideLoginCheck=function(){n.hideLoginOnPageSizeChange()};$(window).resize(this.resizeHideLoginCheck)},n.prototype.removeHideLoginOnPageSizeChange=function(){$(window).off("resize",this.resizeHideLoginCheck)},n.prototype.hideLoginOnPageSizeChange=function(){Modernizr.mq("(min-width: 1100px)")&&(this.hideLogin(0),this.removeHideLoginOnPageSizeChange())},n.prototype.setupBottomBar=function(){var n=this,t="active";this.serviceText.click(function(){n.serviceSelector.toggleClass(t);n.languageSelector.removeClass(t)});this.serviceSelector.mouseleave(function(){n.serviceSelector.removeClass(t)});this.languageSelector.mouseleave(function(){n.languageSelector.removeClass(t)});this.languageSelector.click(function(){n.languageSelector.toggleClass(t);n.serviceSelector.removeClass(t)});this.languageSelectorItems.click(function(){$(this).find("a").length>0&&(window.location.href=$(this).attr("data-languageurl"))});this.languageSelector.hover(function(){n.languageSelector.addClass("hover")},function(){n.languageSelector.removeClass("hover")})},n.prototype.populateBalances=function(n){var t=n.sportsAndGamesTotalBalance?n.sportsAndGamesTotalBalance:n.total,i=this.formatCurrency(t,n.isoCode);this.userBalance.html(i)},n.prototype.formatCurrency=function(n,t){return n.replace(t,'<span class="currency">'+t+"<\/span>")},n.prototype.setupBalanceEvent=function(){var n=this;this.receiveToggleBalanceEvent.onEvent(function(t){t===0?n.header.addClass("balance-hide"):n.header.removeClass("balance-hide")})},n}();t.ResponsiveHeader=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.init=function(n){n!=null&&this.createTerminateProcessFunction()},n.prototype.createTerminateProcessFunction=function(){var n=this;window.TerminateProcess=function(){n.closePage()}},n.prototype.closePage=function(){window.close()},n}();n.RggdFailurePageCloser=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.key=n;this.value=t}return n}();n.QueryStringItem=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(){}return t.prototype.getQueryString=function(t){t||(t=this.getWindowLocationHref());for(var r=[],u=new RegExp("([^?=&]+)=([^&]*)?","gi"),i=u.exec(t);i!=null;)r.push(new n.Models.QueryStringItem(i[1],i[2])),i=u.exec(t);return r},t.prototype.getQueryStringItemValue=function(n,t){for(var r,u=this.getQueryString(n),i=0;i<u.length;i++)if(r=u[i],r.key===t)return r.value;return""},t.prototype.getQueryStringItemValueFromWindowUrl=function(n){var t=this.getWindowLocationHref();return this.getQueryStringItemValue(t,n)},t.prototype.updateQueryString=function(n,t,i){var u,r,f;return i||(i=this.getWindowLocationHref()),u=new RegExp("([?&])"+n+"=.*?(&|#|$)(.*)","gi"),u.test(i)?typeof t!="undefined"&&t!==null?i.replace(u,"$1"+n+"="+t+"$2$3"):(r=i.split("#"),i=r[0].replace(u,"$1$3").replace(/(&|\?)$/,""),typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):typeof t!="undefined"&&t!==null?(f=i.indexOf("?")!==-1?"&":"?",r=i.split("#"),i=r[0]+f+n+"="+t,typeof r[1]!="undefined"&&r[1]!==null&&(i+="#"+r[1]),i):i},t.prototype.getWindowLocationHref=function(){return window.location.href},t}();t.QueryStringService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(queryStringService){this.queryStringService=queryStringService}return n.prototype.init=function(n){n!=null&&this.createTerminateProcessFunction()},n.prototype.createTerminateProcessFunction=function(){var n=this;window.TerminateProcess=function(){n.redirectToRoot()}},n.prototype.redirectToRoot=function(){var n=this.queryStringService.getQueryStringItemValue(document.URL,"sl");n!==""?this.windowRedirection(["/home?sl=",n].join("")):this.windowRedirection("/home")},n.prototype.windowRedirection=function(n){window.location.href=n},n}();n.RggdFailurePageReloader=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=n.Models.SearchResult,r=function(){function n(){this.serviceUrl="/GamePod/GamesByName"}return n.prototype.search=function(n,t){this.fetchData(n,function(n){t(n.map(function(n){return new i(n.i,n.p,n.t,n.n)}))})},n.prototype.fetchData=function(n,t){$.ajax({data:{t:n},dataType:"json",type:"GET",url:this.serviceUrl,cache:!1,success:function(n){t(n)}})},n}();t.SearchService=r})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(searchService,gameLaunchService){this.amountToIncreaseZindexBy=1e4;this.maximumWidthToScrollSearchBar=420;this.minimumTermLength=2;this.invalidKeysForSearch=[9,17,19,27,33,34,35,36,37,38,39,40,45,106,107,109,111,112,113,114,115,116,117,118,119,120,121,122,123,144,145,187];this.highlightedClass="highlighted";this.searchBar=$(".SearchBar");this.searchIcon=$(".searchIcon");this.resultsContainer=$(".SearchResults");this.closeIcon=$(".SearchBar .close");this.query="";this.homePageSliderScroll=$(".touch .slider-inner-wrapper");this.searchService=searchService;this.gameLaunchService=gameLaunchService}return n.prototype.init=function(n){n!=null&&(this.searchBarMask=$("#SearchbarMask"),this.searchBox=$(n).find("input").first(),this.getOriginalZindexValues(),this.bindSearchIconClick(),this.handleSearchBoxClick(),this.bindTextChangeEvent(),this.bindGameLaunchToResults(),this.bindCloseToTouchOutside())},n.prototype.bindSearchIconClick=function(){var n=this;this.searchIcon.on("click",function(){n.searchBox.hasClass("focus")&&setTimeout(function(){n.showShortPlaceholder();n.closeAndEmpty()},100);window.innerHeight<n.maximumWidthToScrollSearchBar&&(document.body.scrollTop=n.searchBar.offset().top);n.openSearchBarAction()})},n.prototype.handleSearchBoxClick=function(){var n=this;this.searchBox.on("click",function(){n.searchBox.hasClass("focus")||n.openSearchBarAction()})},n.prototype.openSearchBarAction=function(){this.setZindexValues(this.amountToIncreaseZindexBy);this.homePageSliderScroll.css("-webkit-overflow-scrolling","auto");this.searchBarMask.show();this.searchBox.css("display","block");this.searchIcon.addClass("grey");this.searchBox.focus();this.showFullPlaceholder()},n.prototype.bindGameLaunchToResults=function(){var n=this;this.resultsContainer.on("click",".searchResult",function(t){n.gameLaunchService.launchGame($(t.target).closest(".searchResult").attr("data-gametoken"));n.closeAndEmpty()})},n.prototype.bindTextChangeEvent=function(){var n=this;this.searchBox.on("keyup",function(t){n.handleTextChangeEvent(t)})},n.prototype.handleTextChangeEvent=function(n){(this.query=this.searchBox.val(),$.inArray(n.keyCode,this.invalidKeysForSearch)===-1)&&(this.query.length>0?(this.highlightSearchBox(),this.query.length>=this.minimumTermLength?this.searchService.search(this.query,this.displayResults):this.resultsContainer.hide()):(this.resultsContainer.empty(),this.resultsContainer.hide(),this.unhighlightSearchBox()))},n.prototype.closeAndEmpty=function(){if(window.matchMedia){var n=window.matchMedia("(max-width: 1199px)");n.matches&&this.searchBox.css("display","none")}this.resetZindexValues();this.homePageSliderScroll.css("-webkit-overflow-scrolling","touch");this.searchBarMask.hide();this.searchBox.val("");this.searchBox.blur();this.searchIcon.removeClass("grey");this.showShortPlaceholder();this.unhighlightSearchBox();this.resultsContainer.hide();this.resultsContainer.empty()},n.prototype.displayResults=function(n){var i=$(".SearchResults"),u,r,t;if(n.length==0){i.empty();i.hide();return}for(u="",r=0;r<n.length;r++)t=n[r],u+='<li class="searchResult" data-gameid="'+t.id+'" data-gametoken="'+t.gameToken+'"><span>'+t.name+'<\/span><img src="'+t.imagePath+'"><\/li>';i.html(u);i.show()},n.prototype.showShortPlaceholder=function(){this.searchBox.attr("placeholder",this.searchBox.data("short-placeholder"));this.searchBox.removeClass("focus")},n.prototype.showFullPlaceholder=function(){this.searchBox.attr("placeholder",this.searchBox.data("full-placeholder"));this.searchBox.addClass("focus")},n.prototype.highlightSearchBox=function(){this.searchBox.addClass(this.highlightedClass);this.searchIcon.addClass("closeIcon");this.closeIcon.css("display","block")},n.prototype.unhighlightSearchBox=function(){this.searchBox.removeClass(this.highlightedClass);this.searchIcon.removeClass("closeIcon");this.closeIcon.css("display","none")},n.prototype.bindCloseToTouchOutside=function(){var n=this;this.searchBarMask.on("tap click",function(){n.closeAndEmpty()})},n.prototype.getOriginalZindexValues=function(){this.originalSearchBarZindex=+this.searchBar.css("z-index");this.originalPopUpMaskZindex=+this.searchBarMask.css("z-index")},n.prototype.setZindexValues=function(n){this.searchBar.css("z-index",this.originalSearchBarZindex+n);this.searchBarMask.css("z-index",this.originalPopUpMaskZindex+n)},n.prototype.resetZindexValues=function(){this.searchBar.css("z-index",this.originalSearchBarZindex);this.searchBarMask.css("z-index",this.originalPopUpMaskZindex)},n}();n.SearchBar=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.activeClass="active";this.activeHoverClass="activeHover";this.categoryDataAttribute="category";this.headerDataAttribute="categoryheader";this.placeholderImageDataAttribute="placeholderimage";this.categoryChangedEventName="categoryChanged";this.categoryList=[];this.settings={scrollY:!1,scrollX:!0,click:!1,tap:!0,momentum:!0,bindToWrapper:!0,preventDefaultException:{tagName:/.*/}}}return n.prototype.init=function(n){n!=null&&(this.secondaryNavigation=$(n),this.gamePodGrid=$(".game-pod-grid"),this.categoryBar=$(".categoryBar"),this.nav=$(".SecondaryNavigationList"),this.navList=$("#navList"),this.listItems=this.secondaryNavigation.find("li"),this.ensureLastIconIsCutOffToIndicateScrolling(),this.installScroller(n),this.setCategoryList(),this.setCategoryHover(),this.setupBarLocation(),this.bindClickHandlers(),this.bindUpdateUnderliningToWindowResize())},n.prototype.setupBarLocation=function(){var n=this;setTimeout(function(){n.setSelectedCategory();n.scrollToSelectedCategory()},100);window.onpopstate=function(){n.setSelectedCategory()}},n.prototype.setSelectedCategory=function(){var n=this.listItems.first(),t=this.getRequestedCategoryFromWindowLocation();t!==undefined&&t!==null&&(n=$('[data-category="'+this.getProperlyCasedCategory(t)+'"]').first());n.addClass(this.activeClass);n.siblings().removeClass(this.activeClass);this.underlinedElement=n.children("span");this.moveBar();this.triggerCategoryChangedEvent(n)},n.prototype.setCategoryHover=function(){var n=this;Modernizr.touchevents||this.listItems.hover(function(t){$(t.currentTarget).hasClass(n.activeClass)||$(t.currentTarget).addClass(n.activeHoverClass)},function(t){$(t.currentTarget).removeClass(n.activeHoverClass)})},n.prototype.bindClickHandlers=function(){var n=this,t=0,i=$("html").is(".ie-8")?"click":"tap";this.listItems.on(i,function(i){if(!(i.timeStamp-t<550)){t=i.timeStamp;var r=$(i.currentTarget);n.underlinedElement=r.find("span");n.setActiveCategory(r);n.triggerCategoryChangedEvent(r);window.history&&history.pushState&&n.setHistoryPushState(r.data(n.categoryDataAttribute))}})},n.prototype.setHistoryPushState=function(n){var t=this.getUrl(),i=this.getRequestedCategoryFromWindowLocation();i!=null?t=t.replace(i,this.getProperlyCasedCategory(n)):(t.substring(t.length-1)!=="/"&&(t+="/"),t+=this.getProperlyCasedCategory(n));this.updateHistoryPushState(t)},n.prototype.updateHistoryPushState=function(n){history.pushState(null,null,n)},n.prototype.bindUpdateUnderliningToWindowResize=function(){var n=this;$(window).resize(function(){setTimeout(function(){n.moveBar();n.scrollToSelectedCategory()},100)})},n.prototype.moveBar=function(){var n=this.underlinedElement.offset().left-this.navList.offset().left,t=this.underlinedElement.innerWidth();TweenLite.to(this.categoryBar,.35,{x:n,width:t,ease:Power3.easeOut})},n.prototype.triggerCategoryChangedEvent=function(n){var t=n.data(this.categoryDataAttribute),i=n.data(this.headerDataAttribute),r=n.data(this.placeholderImageDataAttribute);t!==""&&i!==""&&this.gamePodGrid.trigger(this.categoryChangedEventName,[t,i,r])},n.prototype.setActiveCategory=function(n){this.secondaryNavigation.find(".active").removeClass(this.activeClass);n.addClass(this.activeClass);this.moveBar()},n.prototype.setCategoryList=function(){var n=this;$.each(this.listItems,function(t){var i=$(n.listItems[t]).data(n.categoryDataAttribute);i!==undefined&&i!==null&&i!==""&&n.categoryList.push(i)})},n.prototype.getRequestedCategoryFromWindowLocation=function(){var n=this.getLastNonEmptyPartOfUrl();return this.getProperlyCasedCategory(n)!==null?n:null},n.prototype.getLastNonEmptyPartOfUrl=function(){for(var t=this.getUrl().split("/"),i,n=t.length;n>=0;n--)if(t[n]!==undefined&&t[n]!==""){i=t[n];break}return i==undefined?null:i},n.prototype.getProperlyCasedCategory=function(n){if(n!==undefined&&n!==null)for(var t=0;t<this.categoryList.length;t++)if(n.toLowerCase()===this.categoryList[t].toLowerCase())return this.categoryList[t];return null},n.prototype.getUrl=function(){return window.location.pathname},n.prototype.scrollToSelectedCategory=function(){var n=this.secondaryNavigation.find("."+this.activeClass),t,i;n!==undefined&&(t=n.offset().left+n.outerWidth()-this.navList.offset().left,i=$(window).width(),t>i&&this.scroller.scrollTo(i-t,0))},n.prototype.installScroller=function(n){this.scroller=new IScroll(n,this.settings)},n.prototype.ensureLastIconIsCutOffToIndicateScrolling=function(){var i=$(window).width(),e=parseFloat(this.nav.css("min-width")),o=this.nav.width(),t=.5,r,u,f;if(i<e){var s=this.listItems.first().width(),n=i/s,h=Math.round(n%1);r=h>=t?Math.floor(n)+t:Math.floor(n)-t;u=n/r;f=o*u;this.nav.width(f)}},n}();n.SecondaryNavigation=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(logService,browserDetailsService,toggleProductNavigationEvent){this.layoutElementToAttachItemTo=".divSubHeaderWrapper";this.categoryChangedEventName="categoryChanged";this.logService=logService;this.browserDetailsService=browserDetailsService;this.sendProductNavigationEvent=toggleProductNavigationEvent}return n.prototype.init=function(){$("[id=side-navigation-menu]").length>1?this.logService.write("There are two elements of side navigation on the page there should only be one"):(this.sideMenu=$("#side-navigation-menu"),this.siteContainer=$(".site-container"),this.navigationTriggerLabel=$("#navigation-trigger-label"),this.bindNavigationToggle(),this.moveNavigationTrigger(),this.hideMenuOnChange(),this.addClassWhenLinkIsSelected(),this.resetPageOnBrowserBackButton(),this.highlightCategoryOnCategoryChanged(this.sideMenu),this.browserDetailsService.isAndroidInternetBrowser()&&$("body").addClass("android-native-browser"))},n.prototype.moveNavigationTrigger=function(){$(this.layoutElementToAttachItemTo).length===1?this.navigationTriggerLabel.prependTo(this.layoutElementToAttachItemTo):this.logService.write("Side navigation not setup correctly because the layout element is missing")},n.prototype.resetPageOnBrowserBackButton=function(){$(window).bind("pageshow",function(t){t.originalEvent.persisted&&$("#side-navigation-menu").find(".link-selected").removeClass(n.hyperlinkSelectedClass)})},n.prototype.bindNavigationToggle=function(){var n=this,i=!1,t;this.touchLinks=$("li",this.sideMenu);t=function(){n.navShown?(n.siteContainer.removeClass("showSideNav"),n.sideMenu.css("display","none"),n.removeTouchEvents(n.touchLinks),n.siteContainer.removeAttr("style")):(n.sendProductNavigationEvent.emitEvent(0),n.showSideMenu());n.navShown=!n.navShown};this.navigationTriggerLabel.on("touchend",function(n){n.preventDefault();i=!0;t()});this.navigationTriggerLabel.click(function(){i||t()})},n.prototype.showSideMenu=function(){this.siteContainer.addClass("showSideNav");this.sideMenu.css("display","block");$("#side-navigation-menu").scrollTop(0);this.setTouchEvents(this.touchLinks);this.siteContainer.css("overflow","hidden")},n.prototype.hideSideMenu=function(){this.siteContainer.removeClass("showSideNav");this.siteContainer.css("overflow","");this.sideMenu.css("display","none");this.navShown=!1},n.prototype.addClassWhenLinkIsSelected=function(){$("#side-navigation-menu a").each(function(){$(this).on("click",function(){var t=this;$(this).addClass(n.hyperlinkSelectedClass);setTimeout(function(){$(t).removeClass(n.hyperlinkSelectedClass)},1e3)})});$("#side-navigation-menu li").each(function(){$(this).on("click",function(){var t=this;$(this).addClass(n.listItemSelectedClass);setTimeout(function(){$(t).removeClass(n.listItemSelectedClass)},1e3)})})},n.prototype.setTouchEvents=function(t){var r=this,i=!1;t.on("touchmove",function(n){n.stopPropagation();i=!0});t.on("touchstart",function(n){n.stopPropagation();i=!1});t.on("touchend",function(t){if(t.stopPropagation(),!i){if($(t.currentTarget).hasClass(n.listItemSelectedClass))return;$(t.currentTarget).toggleClass(n.listItemSelectedClass);$(t.currentTarget).children("a").addClass(n.hyperlinkSelectedClass);setTimeout(function(){$(r).removeClass(n.listItemSelectedClass)},1e3)}})},n.prototype.removeTouchEvents=function(n){n.off("touchmove touchstart touchend")},n.prototype.hideMenuOnChange=function(){var n=this;$(window).on("resize",function(){n.resizeTimer&&clearTimeout(n.resizeTimer);n.resizeTimer=setTimeout(function(){Modernizr.mq("(min-width: 699px)")&&n.hideSideMenu()},250)})},n.prototype.highlightCategoryOnCategoryChanged=function(t){$(document).on(this.categoryChangedEventName,function(i,r){var u=t.find("."+r.toLowerCase()).first().parent(),f=u.siblings();u.addClass(n.listItemSelectedClass);u.children().addClass(n.hyperlinkSelectedClass);$.each(f,function(t){$(f[t]).removeClass(n.listItemSelectedClass);$(f[t]).children().removeClass(n.hyperlinkSelectedClass)})})},n.listItemSelectedClass="selected",n.hyperlinkSelectedClass="link-selected",n}();n.SideNavigation=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var i,t;(function(n){n[n.Left=0]="Left";n[n.Right=1]="Right"})(i=n.SlideDirection||(n.SlideDirection={}));t=function(){function n(n,t){this.bounceDuration=.5;this.boostedBounceMultiplier=5;this.boostFactor=10;this.complete=!1;this.boosting=!1;this.slider=n;this.lazyLoader=t;this.slideQueue=[]}return n.prototype.start=function(n){var t=this;if(this.currentTween&&this.currentTween.isActive()&&this.complete==!1&&n.defer==!0){this.slideQueue.push(n);return}this.complete=!1;this.targetPosition=n.targetPosition;var i=n.bounceAmount?n.bounceAmount:0,u=n.easing?n.easing:Linear.easeNone,f=n.direction?n.direction:0,r=this.targetPosition-n.currentPosition,e=n.duration?n.duration:Math.abs(r)/n.speed;this.stopRevalidating();this.revalidateInterval=setInterval(function(){t.lazyLoader&&t.lazyLoader.revalidate()},1e3);this.currentTween=TweenLite.to(this.slider,e,{css:f==0?{left:this.targetPosition}:{right:this.targetPosition},ease:u,onComplete:function(){i!=0&&(t.bounce(r<0?-i:i),$(t.slider).trigger("slideEnd"));t.stopRevalidating();t.complete=!0;n.onComplete&&n.onComplete();t.slideQueue.length>0&&t.start(t.slideQueue.shift())}})},n.prototype.stop=function(){this.currentTween&&this.currentTween.kill();this.slideQueue=[];this.stopRevalidating();this.complete=!0},n.prototype.stopRevalidating=function(){this.lazyLoader&&this.lazyLoader.revalidate();this.revalidateInterval&&clearInterval(this.revalidateInterval)},n.prototype.boost=function(n){var t=this;this.currentTween&&(this.boosting=!0,TweenLite.fromTo(this.currentTween,n,{timeScale:this.boostFactor},{timeScale:1,ease:Power4.easeOut,onComplete:function(){t.boosting=!1;t.lazyLoader&&t.lazyLoader.revalidate()}}))},n.prototype.bounce=function(n){var t=this,i=this.boosting?n*this.boostedBounceMultiplier:n,r=this.targetPosition+i;TweenLite.to(this.slider,this.bounceDuration,{left:r,ease:Power2.easeOut,onComplete:function(){TweenLite.to(t.slider,t.bounceDuration,{left:t.targetPosition,ease:Power1.easeInOut})}})},n}();n.SlideController=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.bounced="bounced"}return n.prototype.init=function(n){n!=null&&(this.button=$(n),this.registerSlideEndEvent())},n.prototype.registerSlideEndEvent=function(){var n=this;this.button.closest("section").on("slideEnd",function(){n.handleSlideEndEvent()})},n.prototype.handleSlideEndEvent=function(){this.button&&!this.button.hasClass(this.bounced)&&this.doButtonBounce()},n.prototype.doButtonBounce=function(){this.button.addClass(this.bounced);var t=this.button.find(".default-text"),n=this.button.find(".slider-title"),i=$(n).width();this.button.css("width",this.button.width()+"px");$(n).show();$(t).hide();TweenLite.to(this.button,.8,{width:i,ease:Back.easeOut})},n}();n.SliderButton=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(cookieService,thirdPartyCookieCheckEvent,modalService){this.priority=45;this.cookieService=cookieService;this.thirdPartyCookieCheckEvent=thirdPartyCookieCheckEvent;this.modalService=modalService}return n.prototype.init=function(n){var t=this;if(n!=null){this.modal=$(n);this.button=this.modal.find(".button");this.bindbuttonClick();this.cookieService.startupCookieRestrictionCheck();this.thirdPartyCookieCheckEvent.onEvent(function(n,i){n===void 0&&(n=!0);i===void 0&&(i=null);t.buttonCallbacks=[];n&&t.buttonCallbacks.push(function(){t.modalService.hideModal()});i&&t.buttonCallbacks.push(i);t.showThirdPartyCookieCheckModal()})}},n.prototype.showThirdPartyCookieCheckModal=function(){this.modalService.showModal(new i(this.modal,this.priority))},n.prototype.bindbuttonClick=function(){var n=this;this.button.on("click",function(){for(var t=0;t<n.buttonCallbacks.length;t++)n.buttonCallbacks[t].apply(n)})},n}();t.ThirdPartyCookieCheckModal=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.HideNav,r=function(){function n(localStorageService,toggleProductNavigationEvent,pageContextService){this.localStorageService=localStorageService;this.recieveProductNavigationEvent=toggleProductNavigationEvent;this.pageContextService=pageContextService}return n.prototype.init=function(n){var t=this,r;if(n!=null){this.headerWrapper=$(n);this.productNav=this.headerWrapper.find(".product-navigation-wrapper");this.navHint=this.headerWrapper.find(".header-nav-hint");this.productNavHidden=!1;r=this.localStorageService.getData(1);r||this.localStorageService.setData(1,new i(!1));this.headerWrapper.find(".product-navigation-toggle").on("click",function(){var n=window.innerWidth>0?window.innerWidth:screen.width;n<=950&&t.moveIndicator(!0)});this.productNav.find(".hide").on("click",function(n){n.stopPropagation();t.moveIndicator(!0)});this.recieveProductNavigationEvent.onEvent(function(n){n===0&&t.moveIndicator(!1)});this.hideNavOnLoad();this.moveIndicator(!1);this.bindUpdate()}},n.prototype.moveIndicator=function(n){if(n===void 0&&(n=!1),this.navHint||this.navHint.length!==0){var u,r=1,t;this.headerWrapper.removeClass("bouncelogo");u=this.pageContextService.hasPageContext(0);u?t="translate3d(0,-47px,0) scaleX("+r+")":(r=35/this.headerWrapper[0].getBoundingClientRect().width,t="translate3d(0px,0px,0) scaleX("+r+")",this.localStorageService.setData(1,new i(!0)),n&&this.headerWrapper.addClass("bouncelogo"));this.navHint.removeClass("navigation-bar-loading");this.navHint.css({transform:t,"-webkit-transform":t})}},n.prototype.hideNavOnLoad=function(){var n=this.localStorageService.getData(1),t,i;n&&!n.hide&&(this.productNav.addClass("active slidedown"),this.pageContextService.addPageContext(0),t=this.headerWrapper.find(".product-navigation-wrapper .navigation-container"),typeof IScroll!="undefined"&&(i=new IScroll(t.get(0),{scrollY:!1,scrollX:!0,click:!1})))},n.prototype.bindUpdate=function(){var n=this;window.addEventListener("resize",function(){n.moveIndicator(!1)})},n}();t.TopNavHint=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){var i=this,t;this.intervalTime=10;this.finished=!1;this.touchHistoryToKeep=10;this.touchToXHistory=[];this.touchToYHistory=[];t=this.getTouchEvent(n);this.startTime=(new Date).getTime();this.lastUpdated=this.startTime;this.startX=t.pageX;this.fromX=t.pageX;this.startY=t.pageY;this.fromY=t.pageY;this.touchToXHistory.push(this.startX);this.interval=setInterval(function(){return i.onInterval()},this.intervalTime)}return n.prototype.significantMovementDetected=function(n,t){return this.xDistanceMoved()>=n||this.yDistanceMoved()>=t?!0:!1},n.prototype.getDirection=function(n,t){return this.significantMovementDetected(n,t)?this.xDistanceMoved()>=this.yDistanceMoved()?0:1:null},n.prototype.stopMovement=function(){this.finished=!0;this.interval&&clearInterval(this.interval)},n.prototype.distanceMoved=function(){return this.toX-this.fromX},n.prototype.distanceFromOrigin=function(){return this.toX-this.startX},n.prototype.update=function(n){var t=this.getTouchEvent(n),i=(new Date).getTime();this.timeTaken=this.lastUpdated-i;this.lastUpdated=i;this.fromX=this.toX;this.fromY=this.toY;this.toX=t.pageX;this.toY=t.pageY},n.prototype.onInterval=function(){this.toX&&this.toY&&(this.touchToXHistory.length>this.touchHistoryToKeep&&(this.touchToXHistory.shift(),this.touchToYHistory.shift()),this.touchToXHistory.push(this.toX),this.touchToYHistory.push(this.toY))},n.prototype.getTouchEvent=function(n){return n.originalEvent?n.originalEvent.touches[0]:n.offsetX&&n.offsetY?{pageX:n.offsetX,pageY:n.offsetY}:null},n.prototype.xDistanceMoved=function(){return Math.abs(this.startX-this.toX)},n.prototype.yDistanceMoved=function(){return Math.abs(this.startY-this.toY)},n}();n.TouchMovement=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Deposit=0]="Deposit";n[n.Main=1]="Main";n[n.LargeMain=2]="LargeMain"})(t=n.Menu||(n.Menu={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Prompt=1]="Prompt";n[n.EnterPin=2]="EnterPin";n[n.ConfirmPin=3]="ConfirmPin";n[n.Complete=4]="Complete";n[n.Failed=5]="Failed";n[n.Invalid=6]="Invalid"})(t=n.PinDisplayState||(n.PinDisplayState={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.CreatePinEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.AuthenticationNotAllowedEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.NoPinSetEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.PinCreatedFailedEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.SetupScrollBarEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.PinCreatedEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.PostMessageEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.RealityCheckCoolOffAcknowledgedEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.languageUpdated=n;this.timeZoneUpdated=t;this.inactivityUpdated=i}return n}();n.DropDownMenuUpdated=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.overlayBanners=n}return n}();n.OverlayBanners=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.id=n;this.interactedTime=t}return n}();n.OverlayBanner=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.invalidPinPatterns=n;this.specificInvalidPins=t}return n}();n.PinValidationRules=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.pinEntryAttempts=n;this.pinSetupNotNow=t}return n}();n.PinAuthenticationData=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.txtType=n;this.platform=t;this.authenticationMethod=i}return n.prototype.toObject=function(){throw new Error("This method is abstract");},n}();n.LoginRequestModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(t,i,r,u,f,e,o,s,h,c){var l=n.call(this,f,e,o)||this;return l.txtUsername=t,l.pin=i,l.txtSTKN=r,l.txtTKN=u,l.txtType=f,l.platform=e,l.authenticationMethod=o,l.authenticationToken=s,l.deviceId=h,l.notificationSequence=c,l}return __extends(t,n),t.prototype.toObject=function(){return{txtType:this.txtType,platform:this.platform,authenticationMethod:this.authenticationMethod,txtUsername:this.txtUsername,pin:this.pin,txtSTKN:this.txtSTKN,txtTKN:this.txtTKN,authenticationToken:this.authenticationToken,deviceId:this.deviceId,notificationSequence:this.notificationSequence}},t}(n.LoginRequestModel);n.PinLoginRequestModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.PinAuthenticationData,r=function(){function n(localStorageService,membersService,gamesSettingsService,sessionService,cookieService){this.pinAttemptsPermitted=3;this.pinSetupAttemptsPermitted=3;this.authenticationCookieKey="aaat";this.localStorageService=localStorageService;this.membersService=membersService;this.gamesSettingsService=gamesSettingsService;this.sessionService=sessionService;this.cookieService=cookieService}return n.prototype.incrementPinAuthenticationAttempts=function(){var n=this.localStorageService.getData(2);if(n){n.pinEntryAttempts++;this.localStorageService.setData(2,n);return}this.localStorageService.setData(2,new i(1,0))},n.prototype.incrementPinSetupAttempts=function(){var n=this.localStorageService.getData(2);if(n){n.pinSetupNotNow++;this.localStorageService.setData(2,n);return}this.localStorageService.setData(2,new i(0,1))},n.prototype.revertAuthorisationToken=function(){var i=this,n,t;this.isRevertAuthorisationTokenInProgress||(this.isRevertAuthorisationTokenInProgress=!0,n=this.membersService.getAuthenticationToken(),t=this.membersService.getDeviceId(),this.resetPinAuthenticationData(),n&&t&&$.ajax({url:"/PinServices/RevertAuthorisationToken",type:"POST",data:{AuthenticationToken:n,DeviceId:t},async:!1}).always(function(){i.isRevertAuthorisationTokenInProgress=!1}))},n.prototype.resetPinAuthenticationData=function(){this.localStorageService.setData(2,new i(0,0))},n.prototype.getPinAuthenticationAttemptsRemaining=function(){var n=this.localStorageService.getData(2),t;return n?(t=n.pinEntryAttempts||0,this.pinAttemptsPermitted-t):this.pinAttemptsPermitted},n.prototype.showSetupPin=function(){var n=this.gamesSettingsService.getGameSettings(),t=this.sessionService.isLoggedIn(),i=this.getPinSetupAttemptsRemaining(),r=this.membersService.getAuthenticationType();return n.mobilePinAuthSupported&&i>0&&r===0&&t?!0:!1},n.prototype.getAuthenticationType=function(){var n=this.gamesSettingsService.getGameSettings(),f=this.sessionService.isLoggedIn(),t=this.membersService.getAuthenticationToken(),i=this.membersService.getAuthenticationType(),r,u;return n.keepMeLoggedIn&&t&&i===3&&!f?3:(r=this.getPinAuthenticationAttemptsRemaining(),u=this.membersService.getDeviceId(),r>0&&t&&u&&i===1&&n.mobilePinAuthSupported)?1:0},n.prototype.getPinSetupAttemptsRemaining=function(){var n=this.localStorageService.getData(2),t;return n?(t=n.pinSetupNotNow||0,this.pinSetupAttemptsPermitted-t):this.pinSetupAttemptsPermitted},n.prototype.isAuthenticationTokenAvailable=function(){var n=this.cookieService.getCookie(this.authenticationCookieKey);return n!=null&&n.length>0},n}();t.AuthenticationService=r})(i=t.Services||(t.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.userAgent=null}return n.prototype.getUserAgent=function(){return navigator.userAgent},n.prototype.isIPad=function(){return this.userAgent=this.getUserAgent(),/iPad/.test(this.userAgent)},n}();n.DeviceService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(realityCheckDueEvent,realityCheckDecisionEvent,logService){this.realityCheckDueEvent=realityCheckDueEvent;this.realityCheckDecisionEvent=realityCheckDecisionEvent;this.logService=logService}return n.prototype.init=function(){if(this.gameFrame=$("#gameframe")[0],this.gameFrame){var n=this.gameFrame.getAttribute("src");n&&n.length>0&&(this.sagalaOrigin=this.parseOrigin(n),this.attachMessageListener())}},n.prototype.attachMessageListener=function(){var n=this;$(window).on("message",function(t){var r=t.originalEvent,i;r.origin===n.sagalaOrigin&&(i=JSON.parse(r.data),i&&i.SagalaAvailable&&(n.bindRealityCheckEvents(),n.logService.write("Sagala Reality Check Service was enabled")))})},n.prototype.bindRealityCheckEvents=function(){var n=this;this.realityCheckDueEvent.onEvent(function(){n.sendMessageToSagala('{"RealityCheck":"Due"}');n.logService.write("Sent Reality Check Due Message to Sagala")});this.realityCheckDecisionEvent.onEvent(function(t){t===0?(n.sendMessageToSagala('{"RealityCheck":"Continue"}'),n.logService.write("Sent Reality Check Continue to Sagala")):t===1&&(n.sendMessageToSagala('{"RealityCheck":"Logout"}'),n.logService.write("Sent Reality Check Logout Message to Sagala"))})},n.prototype.sendMessageToSagala=function(n){this.gameFrame.contentWindow.postMessage(n,this.sagalaOrigin)},n.prototype.parseOrigin=function(n){var t=n.split("/"),i=t[0],r=t[2];return i+"//"+r},n}();n.SagalaRealityCheck=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.PinValidationRules,r=function(){function n(membersService,pinCreatedEvent,pinCreatedFailedEvent){this.isPinCreationInProgress=!1;this.isPinValidationRulesInProgress=!1;this.responseStatus={Error:0,Successful:1};this.membersService=membersService;this.sendPinCreatedEvent=pinCreatedEvent;this.sendpinCreatedFailedEvent=pinCreatedFailedEvent}return n.prototype.setPin=function(n){var t=this,i;this.isPinCreationInProgress||(this.isPinCreationInProgress=!0,i=this.buildPinServiceRequest(n),$.ajax({url:"/PinServices/SetPin",type:"POST",data:i}).done(function(n){n&&n.Status===t.responseStatus.Successful?t.sendPinCreatedEvent.emitEvent():t.sendpinCreatedFailedEvent.emitEvent()}).fail(function(){t.sendpinCreatedFailedEvent.emitEvent()}).always(function(){t.isPinCreationInProgress=!1}))},n.prototype.isRequestedPinValid=function(n){return new RegExp("^[0-9]{4}$").test(n)?this.pinValidationRules&&(this.pinValidationRules.specificInvalidPins.indexOf(n)!==-1||this.pinMatchesInvalidPinPattern(n))?!1:!0:!1},n.prototype.pinMatchesInvalidPinPattern=function(n){var t=$.map(this.pinValidationRules.invalidPinPatterns,function(t){return new RegExp(t).test(n)});return t.indexOf(!0)!==-1},n.prototype.obtainPinValidationRules=function(){var n=this,t;this.isPinValidationRulesInProgress||this.pinValidationRules||(this.isPinValidationRulesInProgress=!0,t=this.buildPinValidationRulesRequest(),$.ajax({url:"/PinServices/PinValidationRules",type:"POST",data:t,async:!0}).done(function(t){t&&t.Status===n.responseStatus.Successful&&(n.pinValidationRules=new i(t.InvalidPinPatterns,t.SpecificInvalidPins))}).always(function(){n.isPinValidationRulesInProgress=!1}))},n.prototype.buildPinValidationRulesRequest=function(){var n=this.membersService.getAuthenticationToken(),t=this.membersService.getDeviceId();return{StandardAuthenticationToken:n,DeviceId:t}},n.prototype.buildPinServiceRequest=function(n){var t=this.membersService.getAuthenticationToken(),i=this.membersService.getDeviceId();return{StandardAuthenticationToken:t,DeviceId:i,AuthenticationMethod:"Pin",Pin:n}},n}();t.PinService=r})(i=t.Services||(t.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.StayLoggedIn=0]="StayLoggedIn";n[n.LogOut=1]="LogOut"})(t=n.RealityCheckDecision||(n.RealityCheckDecision={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(){"use strict"})(t=n.MicrogamingRealityCheck||(n.MicrogamingRealityCheck={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(logService){this.logService=logService}return n.prototype.init=function(n){this.logService.write("mgs.inGameInterface.init()");mgs.inGameInterface.init(n)},n.prototype.setDisplayModeHidden=function(){this.setMode(mgs.inGameInterface.modes.hidden)},n.prototype.setDisplayModeFullScreen=function(){this.setMode(mgs.inGameInterface.modes.fullscreen)},n.prototype.preventGameplay=function(){this.logService.write("mgs.inGameInterface.preventGameplay()");mgs.inGameInterface.preventGameplay()},n.prototype.allowGameplay=function(){this.logService.write("mgs.inGameInterface.allowGameplay()");mgs.inGameInterface.allowGameplay()},n.prototype.toBanking=function(){this.logService.write("mgs.inGameInterface.toBanking()");mgs.inGameInterface.toBanking()},n.prototype.toLobby=function(){this.logService.write("mgs.inGameInterface.toLobby()");mgs.inGameInterface.toLobby()},n.prototype.setMode=function(n){this.logService.write("mgs.inGameInterface.setMode("+n+")");mgs.inGameInterface.setMode(n)},n}();n.MicrogamingInGameInterfaceWrapper=t})(t=n.MicrogamingRealityCheck||(n.MicrogamingRealityCheck={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(microgamingInGameInterfaceWrapper){this.microgamingInGameInterfaceWrapper=microgamingInGameInterfaceWrapper}return n.prototype.init=function(){var n=this;this.microgamingInGameInterfaceWrapper.init(function(){n.setUpInitialState()})},n.prototype.setUpInitialState=function(){this.microgamingInGameInterfaceWrapper.setDisplayModeHidden()},n.prototype.realityCheckDue=function(){this.microgamingInGameInterfaceWrapper.preventGameplay();this.microgamingInGameInterfaceWrapper.setDisplayModeFullScreen()},n.prototype.realityCheckDecision=function(n){n==0&&(this.microgamingInGameInterfaceWrapper.setDisplayModeHidden(),this.microgamingInGameInterfaceWrapper.allowGameplay())},n.prototype.realityCheckCoolOffAcknowledged=function(){this.microgamingInGameInterfaceWrapper.setDisplayModeHidden();this.microgamingInGameInterfaceWrapper.toLobby()},n}();n.MicrogamingMobileRealityCheckStrategy=t})(t=n.MicrogamingRealityCheck||(n.MicrogamingRealityCheck={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(logService){this.logService=logService}return n.prototype.init=function(){},n.prototype.realityCheckDue=function(){this.sendMessageToMicrogaming("StopGamePlay")},n.prototype.realityCheckDecision=function(n){n==0&&this.sendMessageToMicrogaming("ReStartGamePlay")},n.prototype.realityCheckCoolOffAcknowledged=function(){},n.prototype.sendMessageToMicrogaming=function(n){var t=$("#gameframe")[0],i;if(t==null)throw new Error("gameframe is missing - reality checks may not function as expected");i=this.getMicrogamingGameDomain(t);this.logService.write("MicrogamingRealityCheck("+n+", "+i+")");t.contentWindow.postMessage(n,i)},n.prototype.getMicrogamingGameDomain=function(){return"https://"+window.location.hostname.replace("games","launchgames")},n}();n.MicrogamingDesktopRealityCheckStrategy=t})(t=n.MicrogamingRealityCheck||(n.MicrogamingRealityCheck={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(microgamingDesktopRealityCheckStrategy,microgamingMobileRealityCheckStrategy){$("#gameframe").length?(this.microgamingRealityCheckStrategy=microgamingDesktopRealityCheckStrategy,this.microgamingRealityCheckStrategy.init()):$("#mobilegameframe").length&&(this.microgamingRealityCheckStrategy=microgamingMobileRealityCheckStrategy,this.microgamingRealityCheckStrategy.init())}return n.prototype.create=function(){if(this.microgamingRealityCheckStrategy!=undefined)return this.microgamingRealityCheckStrategy;throw new Error("Unable to determine platform - Reality Check may not function as expected");},n}();n.MicrogamingRealityCheckStrategyFactory=t})(t=n.MicrogamingRealityCheck||(n.MicrogamingRealityCheck={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.RealityCheckDueEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.RealityCheckDecisionEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(realityCheckDueEvent,realityCheckDecisionEvent,realityCheckCoolOffAcknowledgedEvent,microgamingRealityCheckStrategyFactory){this.realityCheckDueEvent=realityCheckDueEvent;this.realityCheckDecisionEvent=realityCheckDecisionEvent;this.realityCheckCoolOffAcknowledgedEvent=realityCheckCoolOffAcknowledgedEvent;this.microgamingRealityCheckStrategy=microgamingRealityCheckStrategyFactory.create()}return n.prototype.init=function(n){n!=null&&this.bindEvents()},n.prototype.bindEvents=function(){var n=this;this.realityCheckDueEvent.onEvent(function(){n.microgamingRealityCheckStrategy.realityCheckDue()});this.realityCheckDecisionEvent.onEvent(function(t){n.microgamingRealityCheckStrategy.realityCheckDecision(t)});this.realityCheckCoolOffAcknowledgedEvent.onEvent(function(){n.microgamingRealityCheckStrategy.realityCheckCoolOffAcknowledged()})},n}();n.MicrogamingRealityCheck=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(quickDepositService,toggleMenuEvent,balanceService,balanceUpdateEvent){this.inProgressClass="inProgress";this.waitingClass="waiting";this.completeClass="complete";this.animateClass="animate";this.disabledClass="disabled";this.invalidClass="invalid";this.pristineClass="pristine";this.errorMessageAttribute="errormessage";this.cv2RegEx=/^\d{3}$/;this.quickDepositService=quickDepositService;this.sendToggleMenuEvent=toggleMenuEvent;this.receiveToggleMenuEvent=toggleMenuEvent;this.balanceService=balanceService;this.balanceUpdateEvent=balanceUpdateEvent}return n.prototype.init=function(n){var t=this;n!=null&&(this.container=$(n),this.balanceContainer=this.container.find(".balance"),this.depositMade=!1,this.quickDepositService.getSettings(function(n){n.quickDepositEnabled&&(t.bindProperties(),t.minimumQuickDepositAmount=n.minimumQuickDepositAmount,t.setAmountInputFieldType($(document.body).data("pageAttributes").CurrencyDecimalSeparator),t.amountRegEx=new RegExp(decodeURIComponent($(document.body).data("pageAttributes").AmountInputRegEx)),t.setupAmountValidationErrorMessage(),t.bindEventHandlers(),t.bindEvents(),t.cardDetails.text(n.lastFourDigits))}))},n.prototype.bindAlternateDepositLink=function(){this.submitButton=this.container.find(".submit-button")},n.prototype.bindProperties=function(){this.submitButton=this.container.find(".submit-button");this.toggleMask=this.container.find(".toggle-mask");this.cancelButton=this.container.find(".cancel-button");this.amountField=this.container.find(".amount");this.cv2Field=this.container.find(".cv2");this.clearInput=this.container.find(".clear-input");this.cardDetails=this.container.find(".last-four-digits");this.defaultHeader=this.container.find(".header-container.default");this.successHeader=this.container.find(".header-container.success");this.depositedBalance=this.container.find(".deposited-balance");this.successOverlay=this.container.find(".success-overlay");this.form=this.container.find(".quick-deposit-form");this.errorMessages=this.container.find(".error");this.errorClientSide=this.container.find(".client-side-error");this.errorClientSideWrapper=this.container.find(".client-side-error-wrapper");this.responseErrorContainer=this.container.find(".response-error");this.responseErrorHeader=this.responseErrorContainer.find(".error-title");this.responseErrorMessage=this.responseErrorContainer.find(".error-body");this.requestVerificationToken=this.form.find("[name=__RequestVerificationToken]").val()},n.prototype.bindEvents=function(){var n=this;this.receiveToggleMenuEvent.onEvent(function(t,i){if(t!==2){if(t!==null&&t===1){n.container.hasClass("active")&&(n.container.removeClass("active"),setTimeout(function(){n.container.hide()},500));return}n.container.addClass("active");t!==null&&t===0&&(i!==null&&i===1?n.quickDepositService.getSettings(function(t){t.quickDepositEnabled&&n.openQuickDepositMenu()}):n.container.hide())}});this.balanceUpdateEvent.onEvent(function(t){n.depositMade?(n.depositedBalance.addClass(n.animateClass),setTimeout(function(){n.balanceContainer.text(t.total)},2e3),setTimeout(function(){n.close()},4e3),n.depositMade=!1):n.balanceContainer.text(t.total)})},n.prototype.setAmountInputFieldType=function(n){n!=="."&&this.amountField.attr("type","string")},n.prototype.setupAmountValidationErrorMessage=function(){var n=$("#amount-error"),t=this.minimumQuickDepositAmount.substr(0,this.minimumQuickDepositAmount.indexOf(".")+3),i=t.replace(".",$(document.body).data("pageAttributes").CurrencyDecimalSeparator);n.html(n.text().replace("{0}",i))},n.prototype.openQuickDepositMenu=function(){var n=this;this.quickDepositService.getSettings(function(t){n.cardDetails.text(t.lastFourDigits);n.balanceService.refreshBalances();n.container.show()})},n.prototype.bindEventHandlers=function(){var n=this;this.cancelButton.on("click",function(){n.cancelButton.hasClass(n.disabledClass)||n.close()});this.form.on("submit",function(t){t.preventDefault();n.hideResponseError();n.amountField.removeClass(n.pristineClass);n.cv2Field.removeClass(n.pristineClass);n.deposit()});this.amountField.on("blur",function(){n.amountField.removeClass(n.pristineClass);n.validateField(n.amountField,n.amountRegEx,n.minimumQuickDepositAmount)});this.amountField.on("input",function(){n.amountField.hasClass(n.pristineClass)||n.validateField(n.amountField,n.amountRegEx,n.minimumQuickDepositAmount)});this.cv2Field.on("blur",function(){n.cv2Field.removeClass(n.pristineClass);n.validateField(n.cv2Field,n.cv2RegEx,undefined)});this.cv2Field.on("input",function(){n.cv2Field.val(n.cv2Field.val().substring(0,3));n.cv2Field.hasClass(n.pristineClass)||n.validateField(n.cv2Field,n.cv2RegEx,undefined)})},n.prototype.close=function(){this.reset();this.container.removeClass(this.completeClass);this.container.is(":visible")&&(this.sendToggleMenuEvent.emitEvent(1,1),this.container.hide())},n.prototype.deposit=function(){var n=this;this.depositInProgress()||this.formInvalid()||(this.container.addClass(this.inProgressClass),this.submitButton.addClass(this.waitingClass),this.submitButton.blur(),this.cancelButton.addClass(this.disabledClass),this.errorMessages.hide(),this.hideResponseError(),this.depositAmount=this.amountField.val(),this.quickDepositService.deposit(this.amountField.val(),this.cv2Field.val(),this.requestVerificationToken,function(t,i,r){n.container.removeClass(n.inProgressClass);t===0?(n.depositMade=!0,n.container.addClass(n.completeClass),n.showSuccess()):t===2?n.showResponseError(null,n.responseErrorMessage.data("refresh-balance-error-message")):n.showResponseError(i,r)}))},n.prototype.convertAmountInputToDecimal=function(n){return parseFloat(n.replace($(document.body).data("pageAttributes").CurrencyThousandsSeparator,"").replace($(document.body).data("pageAttributes").CurrencyDecimalSeparator,"."))},n.prototype.validateField=function(n,t,i){return n.val()===""||!t.test(n.val())||n.hasClass("amount")&&this.convertAmountInputToDecimal(n.val())<parseFloat(i)?(n.addClass(this.invalidClass),this.errorClientSideWrapper.children(":visible").length!==0&&this.errorClientSideWrapper.children().hide(),$("."+n.data(this.errorMessageAttribute)).show(),!1):(n.removeClass(this.invalidClass),$("."+n.data(this.errorMessageAttribute)).hide(),!0)},n.prototype.formInvalid=function(){var n=this.validateField(this.amountField,this.amountRegEx,this.minimumQuickDepositAmount),t=this.validateField(this.cv2Field,this.cv2RegEx,undefined);return!n||!t},n.prototype.depositInProgress=function(){return this.submitButton.hasClass(this.waitingClass)},n.prototype.showSuccess=function(){this.defaultHeader.hide();this.successHeader.show();this.depositedBalance.text(this.depositAmount);this.successOverlay.show();this.balanceService.refreshBalances()},n.prototype.showResponseError=function(n,t){this.reset();this.showResponseErrorMessage(this.responseErrorHeader,n,"error-title");this.showResponseErrorMessage(this.responseErrorMessage,t,"error-text");this.responseErrorContainer.show()},n.prototype.showResponseErrorMessage=function(n,t,i){t!==null?(n.text(t),n.show()):(n.text(n.data(i)),n.show())},n.prototype.hideResponseError=function(){this.responseErrorHeader.text("");this.responseErrorHeader.hide();this.responseErrorMessage.text("");this.responseErrorMessage.hide();this.responseErrorContainer.hide()},n.prototype.reset=function(){this.submitButton.removeClass(this.waitingClass);this.cancelButton.removeClass(this.disabledClass);this.defaultHeader.show();this.successHeader.hide();this.errorMessages.hide();this.hideResponseError();this.amountField.val("");this.amountField.addClass(this.pristineClass);this.amountField.removeClass(this.invalidClass);this.cv2Field.val("");this.cv2Field.addClass(this.pristineClass);this.cv2Field.removeClass(this.invalidClass);this.depositedBalance.text("");this.depositedBalance.removeClass(this.animateClass);this.successOverlay.hide();this.depositAmount=0},n}();n.MobileHeaderQuickDeposit=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function t(modalService,pageContextService,realityCheckTimerService,realityCheckTimerEvent,realityCheckDueEvent,realityCheckDecisionEvent,realityCheckCoolOffAcknowledgedEvent,membersService,membersLoadInFrameEvent){this.priority=5;this.sessionTimerIncrement=1e3;this.modalService=modalService;this.pageContextService=pageContextService;this.realityCheckTimerService=realityCheckTimerService;this.realityCheckTimerEvent=realityCheckTimerEvent;this.realityCheckDueEvent=realityCheckDueEvent;this.realityCheckDecisionEvent=realityCheckDecisionEvent;this.realityCheckCoolOffAcknowledgedEvent=realityCheckCoolOffAcknowledgedEvent;this.membersService=membersService;this.membersLoadInFrameEvent=membersLoadInFrameEvent}return t.prototype.init=function(n){n!=null&&(this.getControlsAndData(n),this.bindEvents(),this.timeWhenPageLoaded=+new Date,this.realityCheckTimerService.startTimer(this.timeUntilNext))},t.prototype.getControlsAndData=function(n){this.modal=$(n);this.remainLoggedInButton=this.modal.find(".stay-logged-in");this.logOutButton=this.modal.find(".log-out");this.totalSessionTimeElement=$(this.modal).find(".total-session-time");this.timeUntilNext=this.modal.data("time-until-next");this.totalSessionTime=this.modal.data("total-session-time")},t.prototype.bindEvents=function(){var n=this;this.realityCheckTimerEvent.onEvent(function(){n.showRealityCheck()});this.remainLoggedInButton.on("click",function(){n.processDecision(0)});this.logOutButton.on("click",function(){n.processDecision(1)});this.modal.find(".cooloff-message-container a.realitychecks-close").on("click",function(){n.coolOffAcknowledged()});this.modal.find('#accountHistory[data-component-type="MembersFrameLink"]').on("click",function(t){t.preventDefault();t.stopPropagation();n.membersLoadInFrameEvent.emitEvent($(t.currentTarget).attr("href"));n.modalService.hideAllModals()})},t.prototype.showRealityCheck=function(){var n=this;$(".InactivityWarningDialog").is(":visible")||this.suppressRealityCheck()||$.ajax({type:"POST",data:"{ 'eventType': 'Popup Displayed' }",contentType:"application/json; charset=utf-8",dataType:"json",url:"/RealityCheck/Audit",success:function(t){t==!0?n.showRealityCheckAuditCallback():n.reloadWindowLocation()}})},t.prototype.suppressRealityCheck=function(){return this.getCurrentUrl().indexOf("rcs=1")>-1},t.prototype.getCurrentUrl=function(){return window.location.href},t.prototype.showRealityCheckAuditCallback=function(){this.pageContextService.addPageContext(1);this.modalService.showModal(new i(this.modal,this.priority,2,!1));this.realityCheckTimerService.stopAndResetTimer();this.startSessionTimer();this.realityCheckDueEvent.emitEvent(!0)},t.prototype.processDecision=function(n){if(n==0){this.continuePlaying();this.stopSessionTimer();this.pageContextService.removePageContext(1);var t=this.pageContextService.hasPageContext(2),i=t;this.modalService.hideModal(i)}else this.auditLogout(),this.modal.find(".session-message-container").hide(),this.modal.find(".cooloff-message-container").show();this.realityCheckDecisionEvent.emitEvent(n)},t.prototype.coolOffAcknowledged=function(){this.realityCheckCoolOffAcknowledgedEvent.emitEvent(!0);this.pageContextService.removePageContext(1);this.reloadAfterCoolOff()},t.prototype.continuePlaying=function(){var n=this;$.ajax({type:"POST",data:"",contentType:"application/json; charset=utf-8",dataType:"json",url:"/RealityCheck/ResetRealityCheckTimer",success:function(t){n.resetRealityCheckTimerCallback(t)}})},t.prototype.resetRealityCheckTimerCallback=function(n){n>0?(this.timeUntilNext=n,this.realityCheckTimerService.startTimer(this.timeUntilNext)):this.reloadWindowLocation()},t.prototype.auditLogout=function(){$.ajax({url:"/RealityCheck/Audit",type:"POST",data:"{ 'eventType': 'Logout' }",contentType:"application/json; charset=utf-8",dataType:"json",success:function(){n.cmsCore.Session.LogOutWithoutRefresh(!0)}})},t.prototype.startSessionTimer=function(){var n=this.totalSessionTime+(+new Date-this.timeWhenPageLoaded);this.startIncrementTotalSessionTime(n)},t.prototype.startIncrementTotalSessionTime=function(n){var t=this;this.sessionTimer=setTimeout(function(){n=n+t.sessionTimerIncrement;t.totalSessionTimeElement[0].innerHTML=t.msToFormattedTime(n);t.startIncrementTotalSessionTime(n)},this.sessionTimerIncrement)},t.prototype.stopSessionTimer=function(){clearTimeout(this.sessionTimer)},t.prototype.msToFormattedTime=function(n){var t=parseInt((n/1e3%60).toString()),i=parseInt((n/6e4%60).toString()),r=parseInt((n/36e5%24).toString()),u=r<10?"0"+r:r,f=i<10?"0"+i:i,e=t<10?"0"+t:t;return u+":"+f+":"+e},t.prototype.reloadAfterCoolOff=function(){if(this.getCurrentUrl().indexOf("#")===-1)this.reloadWindowLocation();else{var n=this.getCurrentUrl().replace("#"+window.location.hash,"");window.location.assign(n)}},t.prototype.reloadWindowLocation=function(){window.location.reload()},t}();t.RealityCheckModal=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(modalService,sessionService,membersService){this.deferred=$.Deferred();this.modalService=modalService;this.sessionService=sessionService;this.membersService=membersService}return t.prototype.init=function(n){n!=null&&(this.membersService.kmlAuthenticationEnabled()||(this.setupLinks(),this.pollInactivityTime($)))},t.prototype.setupLinks=function(){var n=this;$("input#InactivitySessionExpiry").length>0&&($("div.InactivityWarningDialog a.RemainLoggedInButton").click(function(t){return t.preventDefault(),n.sessionService.keepSessionAlive($,$("input#InactivitySessionTimestamp")[0].value,$("input#InactivitySessionHashValue")[0].value,$("input#InactivitySessionTimeoutDuration")[0].value,function(t){n.sessionKeepAliveSuccess(t)}),!1}),$("div.InactivityWarningDialog a.LogOutButton").click(function(t){return t.preventDefault(),n.logout(),!1}),$("div.InactivityWarningDialog div.ChangeSettingLink a").click(function(){n.sessionService.keepSessionAlive($,$("input#InactivitySessionTimestamp")[0].value,$("input#InactivitySessionHashValue")[0].value,$("input#InactivitySessionTimeoutDuration")[0].value,function(t){n.sessionKeepAliveSuccess(t)})}));$("body").data("browserTime",(new Date).getTime())},t.prototype.pollInactivityTime=function(n){var t=this,i;this.deferred=n.Deferred();n("input#InactivitySessionExpiry").length>0&&(i=setInterval(function(){if(t.deferred.done(function(){clearInterval(i)}),n("input#InactivitySessionExpiry").length>0){var u=new Date(n("input#InactivitySessionExpiry")[0].value),r=t.getCurrentLocalisedTime();r.getTime()>u.getTime()-6e4&&t.sessionService.checkSessionValid(n,n("input#InactivitySessionTimestamp")[0].value,n("input#InactivitySessionHashValue")[0].value,n("input#InactivitySessionTimeoutDuration")[0].value,r,function(n){t.sessionCheckSuccess(n)})}},1e3))},t.prototype.sessionCheckSuccess=function(n){n!=null&&(n.showMessage?this.showAlert():n.lastActivity<0?this.reloadPage():($("input#InactivitySessionExpiry")[0].value=n.newExpiryTime,$("input#InactivitySessionTimestamp")[0].value=n.newTimestamp,$("input#InactivitySessionHashValue")[0].value=n.hash))},t.prototype.sessionKeepAliveSuccess=function(t){t!=null?($("input#InactivitySessionExpiry").val(t.newExpiryTime),$("input#InactivitySessionTimestamp").val(t.newTimestamp),$("input#InactivitySessionHashValue").val(t.hash),$("input#InactivitySessionTimeoutDuration").val(t.newTimeoutDuration),this.hideAlert($)):n.cmsCore.Session.LogOut()},t.prototype.startCountdown=function(n){var f=this,u,t,i,r;r=n-(new Date).getTime();i=Math.floor(r/1e3);t=0;u=0;i>=60&&(r=r-6e4,i=i%60,t=1);t+=Math.floor(r/6e4);t>=60&&(r=r-36e5,t=t%60,u=1);u+=Math.floor(r/36e5);$("span#InactivityLogoutTime").text(u+":"+(t<10?"0"+t:t)+":"+(i<10?"0"+i:i));u+t+i>0&&setTimeout(function(){f.startCountdown(n)},1e3)},t.prototype.showAlert=function(){var t=this;this.modalService.showModal(new n.Games.Models.Modal($("div.InactivityWarningDialog"),1,2,!1));this.deferred.resolve();setTimeout(function(){$("div.InactivityWarningDialog").is(":visible")&&t.reloadPage()},63e3);this.startCountdown((new Date).getTime()+6e4)},t.prototype.hideAlert=function(n){this.pollInactivityTime(n);this.modalService.hideModal()},t.prototype.logout=function(){n.cmsCore.Session.LogOut()},t.prototype.getCurrentLocalisedTime=function(){var n=$("body").data("pageAttributes").currentServerTimestamp,t=new Date(n),i=(new Date).getTime()-$("body").data("browserTime");return new Date(t.getTime()+i)},t.prototype.reloadPage=function(){window.location.reload()},t}();t.InactivityWarning=i})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.init=function(n){var t;n!=null&&(t=$(n),t.find(".popup").click(function(n){n.preventDefault();n.stopPropagation();window.location.href=t.data("link-destination")}),t.click(function(n){t.is("[data-link-destination]")&&n.stopPropagation()}))},n}();n.LandingPageJoinLink=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(gameLaunchService){this.gameLaunchService=gameLaunchService}return n.prototype.init=function(n){n!=null&&(this.gamePod=$(n),this.gameToken=this.gamePod.data("game-token"),this.registerGameLaunchClickEvent())},n.prototype.registerGameLaunchClickEvent=function(){var n=this;this.gamePod.click(function(t){t.preventDefault();t.stopPropagation();n.gameLaunchService.launchGame(n.gameToken)})},n}();n.LandingPageLoginLink=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(logService){var n=this;this.attempts=0;this.isLoggedIntoPas=!1;this.showingTsAndCs=!1;this.setIsLoggedIntoPas=function(t){n.isLoggedIntoPas=t};this.runWithRetries=function(t){n.showingTsAndCs||(n.isLoggedIntoPas&&n.pasPlayGame(),n.attempts++,t(),n.attempts<10&&!n.isLoggedIntoPas&&window.setTimeout(function(){n.runWithRetries(t)},1e3))};this.pasLoginAndPlayGame=function(t,i,r,u,f){n.pasModule=t;iapiSetCallout(iapiCALLOUT_LOGIN,n.calloutLogin);var e="waitlogin=1&language="+u+"&wmode=opaque"+f;iapiSetClientParams("casino",e);iapiLogin(r,i,1,u)};this.calloutLogin=function(t){t.errorCode&&n.logService.write("cl. Login failed, error:"+t.errorCode+" errorText:"+t.errorText+" playerMessage:"+t.playerMessage);var i=t.sessionValidationData;i!=null?(n.sessionValidationByTcVersionData=i.SessionValidationByTCVersionData[0],n.configurePasTsAndCs(n.sessionValidationByTcVersionData)):n.setIsLoggedIntoPas(!0)};this.calloutValidateLoginSession=function(t){t.errorCode&&n.logService.write("cvls. Login failed, error:"+t.errorCode+" errorText:"+t.errorText+" playerMessage:"+t.playerMessage);iapiLaunchClient("casino",n.pasModule,"real","gameframe#")};this.logService=logService}return t.launchPasGame=function(t,i,r,u,f,e){var o=n.Games.IoC.Container.bootstrap(),gameLaunchPasService=o.resolve("gameLaunchPasService"),s=function(){return gameLaunchPasService.pasLoginAndPlayGame(i,r,u,f,e)};gameLaunchPasService.pasInitialise(t);gameLaunchPasService.runWithRetries(s)},t.prototype.pasInitialise=function(n){window.iapiConf=n},t.prototype.pasTsAndCsResponse=function(n){this.processValidateLoginSessionResponse(n)},t.prototype.pasPlayGame=function(){iapiLaunchClient("casino",this.pasModule,"real","gameframe")},t.prototype.processValidateLoginSessionResponse=function(n){n?(iapiSetCallout(iapiCALLOUT_SESSIONVALIDATION,this.calloutValidateLoginSession),iapiValidateTCVersion(this.sessionValidationByTcVersionData.termVersionReference,1,1),$("html").removeClass("pasTsAndCs")):this.setWindowLocationHref("/home")},t.prototype.configurePasTsAndCs=function(n){this.showingTsAndCs=!0;$("html").addClass("pasTsAndCs");$("#pasTsAndCs").attr("src",n.tcVersionUrl)},t.prototype.setWindowLocationHref=function(n){window.location.href=n},t}();t.GameLaunchPasService=i})(i=t.Services||(t.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(gameLaunchPasService){this.gameLaunchPasService=gameLaunchPasService}return n.prototype.init=function(n){n!=null&&this.bindClickEvents(n)},n.prototype.bindClickEvents=function(n){var t=this;$(n).find(".pasTsAndCsAccept").on("click",function(){t.gameLaunchPasService.pasTsAndCsResponse(!0)});$(n).find(".pasTsAndCsDecline").on("click",function(){t.gameLaunchPasService.pasTsAndCsResponse(!1)})},n}();n.PasTermsAndConditionsButtons=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Horizontal=0]="Horizontal";n[n.Vertical=1]="Vertical"})(t=n.TouchMovementDirection||(n.TouchMovementDirection={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(dataComponentInitializerCompleteEvent){this.sendDataComponentInitializerEvent=dataComponentInitializerCompleteEvent;this.deferredArray=[]}return n.prototype.addDataComponentsInitializer=function(n){this.deferredArray.push(n)},n.prototype.runDataComponentsInitializer=function(){var n=this;$.when.apply($,this.deferredArray).then(function(){n.sendDataComponentInitializerEvent.emitEvent()})},n}();n.DataComponentsInitializerService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(loginService,modalService,loginEvent,authenticationService){this.loginService=loginService;this.modalService=modalService;this.loginEvent=loginEvent;this.authenticationService=authenticationService}return n.prototype.init=function(n){var r=this,u=this.authenticationService.getAuthenticationType()===3,t;if(u){this.modal=$(n);t=new i(this.modal,99);this.modalService.showModal(t);this.loginService.autoLogin(window.location.pathname,"","AutoLogin");this.loginEvent.onEvent(function(){r.modalService.removeModal(t)})}},n}();t.KeepMeLoggedIn=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(t,i,r,u,f,e,o,s,h){var c=n.call(this,f,e,o)||this;return c.txtUsername=t,c.txtPassword=i,c.txtSTKN=r,c.txtTKN=u,c.txtType=f,c.platform=e,c.authenticationMethod=o,c.device=s,c.notificationSequence=h,c}return __extends(t,n),t.prototype.toObject=function(){return{txtType:this.txtType,platform:this.platform,authenticationMethod:this.authenticationMethod,txtUsername:this.txtUsername,txtPassword:this.txtPassword,txtSTKN:this.txtSTKN,txtTKN:this.txtTKN,device:this.device,notificationSequence:this.notificationSequence}},t}(n.LoginRequestModel);n.ManualLoginRequestModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(n){function t(t,i,r){var u=n.call(this,t,i,r)||this;return u.txtType=t,u.platform=i,u.authenticationMethod=r,u}return __extends(t,n),t.prototype.toObject=function(){return{txtType:this.txtType,platform:this.platform,authenticationMethod:this.authenticationMethod}},t}(n.LoginRequestModel);n.AutoLoginRequestModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var PageComponent=function(){function PageComponent(n,t,i){this.name=n;this.order=t;this.element=i}return PageComponent}();n.PageComponent=PageComponent})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(cookieService){this.authenticationKey="aaat";this.authenticationTypeKey="am";this.authenticationTokenKey="at";this.deviceIdKey="di";this.usernameKey="un";this.standard="0";this.pin="1";this.kml="3";this.isPinCreationInProgress=!1;this.responseStatus={Error:0,Successful:1};this.cookieService=cookieService}return n.prototype.getAuthenticationToken=function(){return this.cookieService.readMultiValueCookieValue(this.authenticationKey,this.authenticationTokenKey)},n.prototype.kmlAuthenticationEnabled=function(){return this.cookieService.readMultiValueCookieValue(this.authenticationKey,this.authenticationTypeKey)===this.kml?!0:!1},n.prototype.getAuthenticationType=function(){return this.cookieService.readMultiValueCookieValue(this.authenticationKey,this.authenticationTypeKey)===this.kml?3:this.cookieService.readMultiValueCookieValue(this.authenticationKey,this.authenticationTypeKey)===this.pin?1:0},n.prototype.deleteSavedUsername=function(){var t,i,n;(n=this.getSavedUsername(),n!==undefined&&n!=="")&&(i=3650,t=[this.deviceIdKey,"=",this.getDeviceId()].join(""),this.cookieService.setCookie(this.authenticationKey,t,i,this.getRootDomain()))},n.prototype.revertToStandardAuthentication=function(){for(var i=[this.authenticationTokenKey,"=",this.getAuthenticationToken()].join(""),r=[this.authenticationTypeKey,"=",this.getAuthenticationType()].join(""),n=this.cookieService.getCookie(this.authenticationKey).split("&"),t=n.length-1;t>=0;t--)(n[t].indexOf(i)>-1||n[t].indexOf(r)>-1)&&n.splice(t,1);this.cookieService.setCookie(this.authenticationKey,n.join("&"),3650,this.getRootDomain())},n.prototype.getSavedUsername=function(){return this.cookieService.readMultiValueCookieValue(this.authenticationKey,this.usernameKey)},n.prototype.getDeviceId=function(){return this.cookieService.readMultiValueCookieValue(this.authenticationKey,this.deviceIdKey)},n.prototype.getRootDomain=function(){var n=location.host.split(".").reverse();return[".",n[1],".",n[0]].join("")},n}();n.MembersService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(localStorageService){this.localStorageService=localStorageService}return t.prototype.setLanguage=function(t){this.localStorageService.setData(4,new n.Games.Models.DropDownMenuUpdated(!0,!1,!1));$.ajax({type:"POST",url:"/UserData/SetLanguage/",data:{LanguageId:t}}).done(function(){location.reload()})},t.prototype.setTimeZone=function(t){this.localStorageService.setData(4,new n.Games.Models.DropDownMenuUpdated(!1,!0,!1));$.ajax({type:"POST",url:"/UserData/SetTimeZone/",data:{TimeZoneId:t}}).done(function(){location.reload()})},t.prototype.setInactivity=function(t,i){this.localStorageService.setData(4,new n.Games.Models.DropDownMenuUpdated(!1,!1,!0));$.ajax({type:"POST",url:"/UserData/SetInactivity/",data:{InactivityId:t,inactivityAmount:i}}).done(function(){location.reload()})},t}();t.UserPreferenceService=i})(i=t.Services||(t.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r){this.g=n;this.l=t;this.p=i;this.t=r}return n}();n.SliderRequestModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.SliderRequestModel,r=function(){function n(){}return n.prototype.buildAllSliderRequestData=function(n,t){var i=this.buildCategorySliderRequestModels(n);return i.unshift(this.buildFilteredSliderRequestModel(t)),i},n.prototype.buildCategorySliderRequestModels=function(n){for(var r=[],t=0;t<n.length;t++){var u=$(n[t]),f=u.data("game-group"),e=parseInt(u.data("limit"));r.push(new i(f,e,"",""))}return r},n.prototype.buildFilteredSliderRequestModel=function(n){if(n.length===0)return new i("",0,"","");var t=n.data("game-group"),r=parseInt(n.data("limit")),u=n.data("promotion");return new i(t,r,u,"")},n}();t.RequestBuilderService=r})(i=t.GamePodLoader||(t.GamePodLoader={}))})(i=t.Services||(t.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(resolver){this.resolver=resolver}return n.prototype.createComponentInstance=function(n,t){return this.resolver.resolve(t+"Component")},n}();n.ComponentFactory=t})(t=n.Factories||(n.Factories={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(componentFactory){this.componentFactory=componentFactory}return n.prototype.initialiseComponent=function(n,t){var i,u,r,f;if(t){this.initialiseNamedComponent(n,t);return}if(i=n.getAttribute("data-component-type"),i===undefined||i===null||this.trimString(i)==="")throw new Error("UI Component not specified please add an attribute data-component-type to the html element with a valid component name");for(u=this.trimString(i).split(" "),r=0;r<u.length;r++)f=this.componentFactory.createComponentInstance(n,u[r]),f.init(n)},n.prototype.initialiseNamedComponent=function(n,t){if(t===undefined||t===null||this.trimString(t)==="")throw new Error("UI Component not specified please add an attribute data-component-type to the html element with a valid component name");var i=this.componentFactory.createComponentInstance(n,t);i.init(n)},n.prototype.trimString=function(n){return n.replace(/^\s+|\s+$/g,"")},n}();n.InitialiseComponentService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.sendXdrRequest=function(n,t,i,r){var u=new XDomainRequest,f;u.open(n,t);f={success:!1,data:null};u.onload=function(){f.success=!0;f.data=u.responseText;r(f)};u.onerror=function(){r(f)};u.ontimeout=function(){r(f)};u.send($.param(i,!0))},n}();n.XdrService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(gameLaunchService){this.gameLaunchService=gameLaunchService}return n.prototype.init=function(n){var t=this;if(n!=null){this.gamePod=$(n);this.image=this.gamePod.find("img");this.podJackpot=this.gamePod.find(".PodJackpot");this.gameToken=this.gamePod.data("game-token");this.registerGameLaunchClickEvent();$(window).on("resize",function(){t.podJackpot.css({top:t.image.height()-t.podJackpot.height()})})}},n.prototype.registerGameLaunchClickEvent=function(){var n=this;this.gamePod.click(function(t){t.preventDefault();n.gameLaunchService.launchGame(n.gameToken)})},n}();n.LandingPageGamePod=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.ScrollStart=0]="ScrollStart";n[n.ScrollStop=1]="ScrollStop"})(t=n.CarouselScrollState||(n.CarouselScrollState={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.CarouselScrollingEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(carouselScrollingEvent){this.carouselScrollingEvent=carouselScrollingEvent}return n.prototype.init=function(n){var i=this;if(n!=null){var t=$(n),r=t.find(".slide-content-wrapper a"),u=t.find(".carousel-terms a");u.length>0?this.mapLinkToWholeSlide(t,u):r.length>0&&this.mapLinkToWholeSlide(t,r);this.carouselScrollingEvent.onEvent(function(n){n===0?i.isScrolling=!0:n===1&&(i.isScrolling=!1)})}},n.prototype.mapLinkToWholeSlide=function(n,t){var i=this;t.click(function(n){n.stopPropagation()});n.click(function(){i.isScrolling||t.click()})},n}();n.CarouselPromoSlide=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(gameLaunchService,carouselScrollingEvent){this.gameLaunchService=gameLaunchService;this.carouselScrollingEvent=carouselScrollingEvent}return n.prototype.init=function(n){var t=this;if(n!=null){this.clickableCarouselElement=$(n);this.registerGameLaunchClickEvent();this.gameToken=$(n).data("gametoken");this.carouselScrollingEvent.onEvent(function(n){n===0?t.isScrolling=!0:n===1&&(t.isScrolling=!1)})}},n.prototype.registerGameLaunchClickEvent=function(){var n=this;this.clickableCarouselElement.click(function(t){n.isScrolling||(t.preventDefault(),n.gameLaunchService.launchGame(n.gameToken))})},n}();n.CarouselGameSlide=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t,i;(function(n){n[n.Full=0]="Full";n[n.LegacyIe=1]="LegacyIe";n[n.None=2]="None"})(t||(t={}));i=function(){function n(xdrService,queryStringService){this.xdrService=xdrService;this.queryStringService=queryStringService}return n.prototype.sendCorsRequest=function(n,i,r){var e=this,u,f;return this.deferred?$.Deferred().reject().promise():(this.deferred=$.Deferred(),u=this.getBrowsersCorsSupport(),u===t.Full?this.makeCrossDomainAjaxCall(i,n,r):u===t.LegacyIe?this.makeLegacyXdrCall(i,n,r):this.deferred.reject(),f=this.deferred.promise(),f.always(function(){e.deferred=null}),f)},n.prototype.getBrowsersCorsSupport=function(){return"withCredentials"in new XMLHttpRequest?t.Full:typeof XDomainRequest!="undefined"?t.LegacyIe:t.None},n.prototype.makeCrossDomainAjaxCall=function(n,t,i){var r={url:n,type:t,data:i,xhrFields:{withCredentials:!0}};this.deferred=$.ajax(r)},n.prototype.makeLegacyXdrCall=function(n,t,i){var r=this;n=this.queryStringService.updateQueryString("isb","1",n);this.xdrService.sendXdrRequest(t,n,i,function(n){r.deferred&&(n.success===!0?r.deferred.resolve(n.data):r.deferred.reject())})},n}();n.CorsService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.FailedLoginEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.FailedOptInLoginEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.FailedLoginWithKycEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(corsService,cookieService,queryStringService,loginEvent,failedLoginEvent,failedOptInLoginEvent,failedLoginWithKycEvent,membersService,authenticationNotAllowedEvent,noPinSetEvent,localStorageService){this.isLoginInProgress=!1;this.corsService=corsService;this.cookieService=cookieService;this.queryStringService=queryStringService;this.loginEvent=loginEvent;this.failedLoginEvent=failedLoginEvent;this.failedOptInLoginEvent=failedOptInLoginEvent;this.failedLoginWithKycEvent=failedLoginWithKycEvent;this.membersService=membersService;this.authenticationNotAllowedEvent=authenticationNotAllowedEvent;this.noPinSetEvent=noPinSetEvent;this.localStorageService=localStorageService}return t.prototype.logIn=function(t,i,r,u,f,e){var o=this.setupLogin(f);if(o!==null&&o!==undefined){var s=this.createLoginProcess(r,u,f),h=o.data("session-id"),c=o.data("notifications-sequence"),l=o.data("members-login-type-id"),a=o.data("platform-type-id"),v=this.getBrowserUserAgent(),y=new n.Models.ManualLoginRequestModel(t,encodeURIComponent(i),s,h,l,a,e,v,c);s&&this.submitLoginRequest(y,f)}},t.prototype.pinLogin=function(t,i,r,u,f){var e=this.setupLogin(f);if(e!==null&&e!==undefined){var o=this.createLoginProcess(r,u,f),s=e.data("session-id"),h=e.data("notifications-sequence"),c=e.data("members-login-type-id"),l=e.data("platform-type-id"),a=this.membersService.getAuthenticationToken(),v=this.membersService.getDeviceId(),y=new n.Models.PinLoginRequestModel(t,i,o,s,c,l,1,a,v,h);o&&this.submitLoginRequest(y,f)}},t.prototype.autoLogin=function(t,i,r){var u=this.setupLogin(r);if(u!==null&&u!==undefined){var f=this.createLoginProcess(t,i,r),e=u.data("members-login-type-id"),o=u.data("platform-type-id"),s=new n.Models.AutoLoginRequestModel(e,o,3);f&&this.submitLoginRequest(s,r)}},t.prototype.setupLogin=function(n){if(this.isLoginInProgress)return null;var t=$(".login-data");return t.length?(this.isLoginInProgress=!0,t):(this.handleLoginError(n),null)},t.prototype.createLoginProcess=function(n,t,i){var u=this,r;return $.ajax({url:"/Login/GenerateProcess",type:"POST",async:!1,data:{TargetUrl:n,AdditionalItems:t,Validate:!1,SourceId:i}}).done(function(n){r=n}).fail(function(){u.handleLoginError(i)}),r},t.prototype.submitLoginRequest=function(n,t){var i=this,u=$(".login-data").data("members-login-url"),r=this.corsService.sendCorsRequest("POST",u,n.toObject());r.done(function(n){i.processLoginResult(n,t)});r.fail(function(){i.handleLoginError(t)})},t.prototype.processLoginResult=function(n,t){var i=this,r=$.parseJSON(n);$.ajax({url:"/LoginResult/Responsive",type:"POST",data:r}).done(function(n){i.actionLoginResponse(n,t)}).fail(function(){i.handleLoginError(t)}).always(function(){i.isLoginInProgress=!1})},t.prototype.actionLoginResponse=function(n,t){var f=n.SuccessfulLogin,i=n.RedirectionUrl,u,r;if(f)if(this.clearPinAuthAttempts(),i&&i.length){for(i=this.queryStringService.updateQueryString("sl","1",i),u=this.queryStringService.getQueryString(window.location.href),r=0;r<u.length;r++)i=this.queryStringService.updateQueryString(u[r].key,u[r].value,i);this.loginRedirect(this.replaceSchemeForMatchingHostnames(i))}else this.loginRedirect(window.location.href);else n.FailedLoginKycRequired?this.handleLoginErrorWithKyc():n.AuthenticationMethodNotAllowed?this.handleAuthenticationMethodNotAllowed(t):n.NoPinSet?this.noPinSetEvent.emitEvent():this.handleLoginError(t)},t.prototype.clearPinAuthAttempts=function(){var n=this.localStorageService.getData(2);n&&(n.pinEntryAttempts=0,this.localStorageService.setData(2,n))},t.prototype.replaceSchemeForMatchingHostnames=function(n){for(var r=window.location.protocol+"//"+window.location.hostname,i=["http://"+window.location.hostname,"https://"+window.location.hostname],t=0;t<i.length;t++)if(n.indexOf(i[t])===0)return n.replace(i[t],r);return n},t.prototype.loginRedirect=function(n){window.location.href=this.stripTrailingHashToEnsurePageRefresh(n)},t.prototype.stripTrailingHashToEnsurePageRefresh=function(n){return(n||"").replace(/#$/,"")},t.prototype.handleLoginError=function(n){n!=null&&n.search("OptIn")>-1?this.failedOptInLoginEvent.emitEvent():n!=null&&n.search("AutoLogin")>-1?this.loginEvent.emitEvent(1):n!=null&&n.search("PinLogin")>-1?this.failedLoginEvent.emitEvent(1):this.failedLoginEvent.emitEvent(0);this.isLoginInProgress=!1},t.prototype.handleAuthenticationMethodNotAllowed=function(n){n!=null&&n.search("PinLogin")>-1?this.authenticationNotAllowedEvent.emitEvent(1):this.authenticationNotAllowedEvent.emitEvent(0);this.isLoginInProgress=!1},t.prototype.handleNoPinSet=function(){this.noPinSetEvent.emitEvent();this.isLoginInProgress=!1},t.prototype.handleLoginErrorWithKyc=function(){this.failedLoginWithKycEvent.emitEvent();this.isLoginInProgress=!1},t.prototype.getBrowserUserAgent=function(){return navigator.userAgent},t}();t.LoginService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(loginService,failedLoginEvent,gamesSettingsService){this.loginService=loginService;this.failedLoginEvent=failedLoginEvent;this.gamesSettingsService=gamesSettingsService}return n.prototype.init=function(n){n!=null&&(this.form=$(n),this.username=$(n).find(".txtUserName"),this.passwordEntryField=$(n).find(".passwordTogglefocus"),this.password=$(n).find(".protectedP"),this.joinNowLink=$(n).find(".JoinNow"),this.go=$(n).find(".aGo"),this.usernameDefaultText=this.username.val(),this.removeCmsCoreOnClickEvent(),this.registerEventHandlers(),this.textBoxTextToggle(),this.setupPasswordFieldToggle(),this.setupLoginSubmitOnEnterKeypress(),this.setupGoFocus(),this.setupTabIndex())},n.prototype.removeCmsCoreOnClickEvent=function(){this.go.prop("onclick",null)},n.prototype.registerEventHandlers=function(){var n=this;this.go.click(function(t){var i,r;n.gamesSettingsService.getGameSettings().newGamingDesktopHeader&&(n.go.addClass("logging-in"),r=n.go.data("inprogressspinnerurl"),r&&(i=$('<img class="spinner" />'),i.attr("src",r),i.appendTo(n.go)));$(".loadingSpinnerOverlay").fadeIn(200).find(".icon").css("top",$(window).innerHeight()/2);n.logIn(t)});this.form.on("keypress",function(n){return n.keyCode==13?(n.preventDefault(),!1):!0});this.failedLoginEvent.onEvent(function(){if(n.gamesSettingsService.getGameSettings().newGamingDesktopHeader){n.go.removeClass("logging-in");var t=n.go.data("loginbuttontext");n.go.html(t)}})},n.prototype.logIn=function(n){n.preventDefault();this.loginService.logIn(this.username.val(),this.password.val(),window.location.pathname,"","loginpanel",0);this.clearUsernameAndPassword()},n.prototype.clearUsernameAndPassword=function(){this.username.val("").blur();this.password.val("").blur()},n.prototype.textBoxTextToggle=function(){var n=this;this.username.focus(function(){n.username.val()===n.usernameDefaultText&&n.username.val("")});this.username.blur(function(){n.username.val()===""?(n.username.val(n.usernameDefaultText),n.username.removeClass("hasValue")):n.username.val()!==""&&n.username.val()!==n.usernameDefaultText&&n.username.addClass("hasValue")})},n.prototype.setupPasswordFieldToggle=function(){var n=this;this.passwordEntryField.show();this.password.hide();this.passwordEntryField.focus(function(){n.passwordEntryField.hide();n.password.show().focus()});this.password.blur(function(){n.password.val()===""?(n.password.hide(),n.passwordEntryField.show(),n.password.removeClass("hasValue")):n.password.addClass("hasValue")})},n.prototype.setupGoFocus=function(){var n=this;this.go.focus(function(){n.go.addClass("focused")});this.go.blur(function(){n.go.removeClass("focused")})},n.prototype.setupTabIndex=function(){this.joinNowLink.attr("tabindex","-1");this.go.attr("tabindex","0")},n.prototype.setupLoginSubmitOnEnterKeypress=function(){var n=this;this.form.on("keypress",'input[type!="hidden"]',function(t){t.which===13&&n.go.click()})},n}();n.DesktopHeaderLogin=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.init=function(n){n!=null&&this.createTerminateProcessFunction()},n.prototype.createTerminateProcessFunction=function(){var n=this;window.TerminateProcess=function(){n.refreshPage()}},n.prototype.refreshPage=function(){window.location.href=window.location.href},n}();n.KycSecondaryAuthPageReloader=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(modalService,queryStringService,membersLoadInFrameEvent,authenticationService){this.priority=38;this.queryStringService=queryStringService;this.modalService=modalService;this.membersLoadInFrameEvent=membersLoadInFrameEvent;this.authenticationService=authenticationService}return n.prototype.init=function(n){n!=null&&(this.modal=$(n),this.continueButton=this.modal.find(".button"),this.depositButton=this.modal.find(".deposit"),this.bindCloseButtonClick(),this.bindDepositButtonClick(),(document.URL.indexOf("?sl=")!==-1||document.URL.indexOf("&sl=")!==-1)&&this.modalService.showModal(new i(this.modal,this.priority,2,!1)))},n.prototype.bindDepositButtonClick=function(){var n=this;if(this.depositButton.length)this.depositButton.on("click",function(){n.modalService.hideModal()})},n.prototype.bindCloseButtonClick=function(){var n=this;this.continueButton.on("click",function(){if(n.modalService.hideModal(),!n.authenticationService.showSetupPin()){var t=n.queryStringService.updateQueryString("sl",null,window.location.href);window.location.href=t}});this.membersLoadInFrameEvent.onEvent(function(){n.modal.is(":visible")&&n.modalService.hideModal()})},n}();t.MobileLoggedInOverlay=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(loginEvent,authenticationService){this.loginEvent=loginEvent;this.authenticationService=authenticationService}return n.prototype.init=function(){var n=this,t=this.authenticationService.getAuthenticationType();setTimeout(function(){n.loginEvent.emitEvent(1,t,0,!1,function(){n.redirectToReturnPath()})},0)},n.prototype.redirectToReturnPath=function(){var n=this.getReturnPath();this.setWindowLocation(n)},n.prototype.setWindowLocation=function(n){window.location.href=n},n.prototype.getReturnPath=function(){var n=$("body").data("pageAttributes");return n.ReturnPath&&n.ReturnPath.length>0?n.ReturnPath:"/"},n}();n.LogInToPlay=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(modalService,clientTechnologyService,cookieService,dataComponentInitializerCompleteEvent){this.priority=50;this.modalService=modalService;this.clientTechnologyService=clientTechnologyService;this.cookieService=cookieService;this.receiveDataComponentInitializerCompleteEvent=dataComponentInitializerCompleteEvent}return n.prototype.init=function(n){var t=this;if(n!=null)this.receiveDataComponentInitializerCompleteEvent.onEvent(function(){t.setupNoFlashModal()})},n.prototype.setupNoFlashModal=function(){var n=this.getFtCookie();!this.clientTechnologyService.hasFlash()&&n>-1&&n<3?this.getModalAndShow():this.clientTechnologyService.hasFlash()&&n>0&&this.removeFtCookie()},n.prototype.showNoFlash=function(){this.modalService.showModal(new i(this.modal,this.priority,2,!1))},n.prototype.bindCloseButtonsClick=function(){var n=this;this.closeButton.on("click",function(){var t=n.getFtCookie();t++;n.setFtCookie(t);n.flashEnablePrompt();n.modalService.hideModal()})},n.prototype.flashEnablePrompt=function(){var n=this.closeButton.data("url");window.open(n,"","height=640,width=1024,sLeft=20,sTop=0,scrollbars=yes,resizable=yes")},n.prototype.setFtCookie=function(n){this.cookieService.setCookie("ft",n.toString(),2e4)},n.prototype.removeFtCookie=function(){this.cookieService.setCookie("ft","",-1)},n.prototype.getFtCookie=function(){var n=this.cookieService.getCookie("ft");return n!==null&&n!==undefined&&n.length>0&&!isNaN(Number(n))?parseInt(n,10):0},n.prototype.getModalAndShow=function(){var n=this;$.ajax({type:"GET",url:"/NoFlashModal/NoFlashModal",success:function(t){if(!t||t.length===0)return!1;$(".modals").append(t);n.modal=$(".modal.noflash");n.closeButton=n.modal.find(".closeButton");n.bindCloseButtonsClick();n.showNoFlash()}})},n}();t.NoFlashModal=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.attemptOptIn=function(n){var t="";return $.ajax({type:"POST",async:!1,data:{offerId:n},url:"/OptIn/OptIn",success:function(n){var i=JSON.parse(n);t=i.Status}}),t},n}();n.OptInService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var r=n.Games.Components.BaseClasses.LoginModalBase,i=n.Games.Models.Modal,u=function(n){function t(modalService,optInService,loginService,gamesSettingsService,membersService,queryStringService,failedOptInLoginEvent){var t=n.call(this,gamesSettingsService,membersService)||this;return t.priority=40,t.modalService=modalService,t.optInService=optInService,t.loginService=loginService,t.gamesSettingsService=gamesSettingsService,t.queryStringService=queryStringService,t.failedOptInLoginEvent=failedOptInLoginEvent,t}return __extends(t,n),t.prototype.init=function(n){var t=this;if(n!=null){this.modal=$(n);this.modal.removeAttr("style");this.toggleFocus=this.modal.find(".toggle");this.close=this.modal.find(".close");this.closeButton=this.modal.find(".closeButton");this.loginButton=this.modal.find(".loginButton");this.username=this.modal.find("#txtUsernameOptIn");this.password=this.modal.find("#txtPasswordOptIn");this.loginButtonText=this.loginButton.find("span");this.spinner=this.loginButton.find(".spinner");this.clientId=this.loginButton.data("clientid");this.offerId=this.modal.data("offerid");this.links=$('a[optinofferid="'+this.offerId+'"]');this.status=this.modal.data("status");this.title=this.modal.find(".title.main-title");this.clearUsernameIcon=this.username.siblings(".clear-input");this.clearPasswordIcon=this.password.siblings(".clear-input");this.toggleMask=this.password.siblings(".toggle-mask");this.kmlControl=this.modal.find(".kml-control");this.kmlControlCheckBox=this.kmlControl.find("input");this.setupClearInputClick(this.modal,this.toggleMask,this.username,this.password,this.clearUsernameIcon,this.clearPasswordIcon);this.setupToggleInputMask(this.toggleMask,this.password);this.bindCloseButtonsClick();this.setupFieldToggle();this.bindLoginClick();this.bindLinkClick();this.setupKmlControl(this.kmlControl,this.kmlControlCheckBox);this.setModalTitle();this.username.on("keypress",function(n){t.logInOnEnter(n)});this.password.on("keypress",function(n){t.logInOnEnter(n)});this.failedOptInLoginEvent.onEvent(function(){t.showFailedLogin()});this.status!=="UserIsNotCurrentlyLoggedIn"&&this.status!=="UserIsLoggedInAndCanAttemptToOptInNow"&&this.showOptIn(!0,!1);this.processAutomaticOptIn()}},t.prototype.setModalTitle=function(){var n=this.modal.find(".MustLogInMessage"),t=n&&n[0].innerHTML!=="";t||this.status!=="UserIsNotCurrentlyLoggedIn"&&this.status!=="UserHasTriedToLogInToOptInButAuthenticationFailed"?this.title.text(this.title.data("header")):this.title.text(this.title.data("subheader"))},t.prototype.bindLinkClick=function(){var n=this;this.links.on("click",function(t){return t.stopPropagation(),n.showOptIn(!0),!1})},t.prototype.showFailedLogin=function(){var n=this.modal.find(".input");n.show();this.loginButton.show();this.modal.find(".OptinErrorMessage.GeneralError").show();this.modal.find(".OptinErrorMessage.InvalidDetailsPart1").show();this.modal.addClass("failed-login");this.kmlControlCheckBox.prop("checked",!1);this.loginButtonText.show();this.spinner.hide();this.modalService.showModal(new i(this.modal,this.priority));this.showFailureAnimation(this.modal)},t.prototype.showOptIn=function(n,t){t===void 0&&(t=!0);t&&(this.status=this.optInService.attemptOptIn(this.offerId));this.modal.removeClass("logged-in");this.modal.removeClass("failed-login");var o=this.modal.find(".OptinCompleteMessage"),s=this.modal.find(".OptinErrorMessage"),r=this.modal.find(".input"),u=this.modal.find(".loginButton"),f=this.modal.find(".close, .closeButton"),e=this.modal.find(".MustLogInMessage");o.hide();s.hide();r.hide();u.hide();f.hide();this.resetToggleInputMask(this.password,this.toggleMask);this.kmlControl.hide();e.hide();switch(this.status){case"UserHasTriedToOptInButWasAlreadyOptedInToThisOffer":f.show();this.modal.find(".OptinCompleteMessage.AlreadyEntered").show();this.modal.addClass("logged-in");break;case"UserHasJustSuccessfullyOptedIn":f.show();this.modal.find(".OptinCompleteMessage.Success").show();this.modal.addClass("logged-in");break;case"UserHasTriedToLogInToOptInButAuthenticationFailed":r.show();u.show();this.gamesSettingsService.getGameSettings().mobile&&this.kmlControl.show();this.modal.find(".OptinErrorMessage.GeneralError").show();this.modal.find(".OptinErrorMessage.InvalidDetailsPart1").show();this.modal.addClass("failed-login");break;case"UserIsNotCurrentlyLoggedIn":if(e&&e[0].innerHTML!=="")e.show(),f.show(),this.modal.addClass("MustLogIn");else{if(this.membersService.kmlAuthenticationEnabled()){this.refreshPageWithGibSyncRedirect();return}this.prepopulateUserName(this.username,this.clearUsernameIcon);r.show();u.show();this.gamesSettingsService.getGameSettings().mobile&&this.kmlControl.show()}break;case"UserIsLoggedInAndCanAttemptToOptInNow":r.show();u.show();this.gamesSettingsService.getGameSettings().mobile&&this.kmlControl.show()}this.modalService.showModal(new i(this.modal,this.priority,2,n,!0))},t.prototype.setupFieldToggle=function(){this.toggleFocus.on("keypress paste",function(){$(this).siblings("label").hide()});this.toggleFocus.blur(function(){$(this).val()===""&&$(this).siblings("label").show()})},t.prototype.bindCloseButtonsClick=function(){var n=this;this.close.on("click",function(){n.modalService.hideModal()});this.closeButton.on("click",function(){n.modalService.hideModal()})},t.prototype.bindLoginClick=function(){var n=this;this.loginButton.on("click",function(t){n.logIn(t)})},t.prototype.logInOnEnter=function(n){n.which===13&&this.logIn(n)},t.prototype.logIn=function(n){n.preventDefault();this.loginButtonText.hide();this.spinner.show();var t=0;this.kmlControlCheckBox.prop("checked")&&(t=3);this.loginService.logIn(this.username.val(),this.password.val(),window.location.pathname,"",this.clientId,t)},t.prototype.refreshPageWithGibSyncRedirect=function(){window.location.href=window.location.href+"?gsr="+encodeURIComponent(window.location.pathname)},t.prototype.automaticOptInRequested=function(){var n=this.queryStringService.getQueryStringItemValueFromWindowUrl("AutoOptIn");return n==="1"},t.prototype.processAutomaticOptIn=function(){this.automaticOptInRequested()&&this.links.length>0&&this.links.first().click()},t}(r);t.OptInModal=u})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(gameService,gameLaunchService){var n=this;this.lazyLoadingInProgress=!1;this.relatedGamesCallback=function(t){var i=t;n.podContainer.html(n.template({model:i}));n.lazyLoadImages();n.launchGameOnButtonClick()};this.gameService=gameService;this.gameLaunchService=gameLaunchService}return t.prototype.init=function(t){t!=null&&(this.configureLazyLoader(),this.relatedGameContainer=$(t),this.podContainer=this.relatedGameContainer.find(".game-pods-container"),this.template=Handlebars.compile($("#game-pod-template").html()),n.Models.HandlebarsHelpers.registerGamePodHelpers(),this.gameService.getGameFilter("RelatedGames",5,this.relatedGamesCallback))},t.prototype.launchGameOnButtonClick=function(){var n=this;this.podContainer.on("click",".slider-item-wrapper",function(t){t.preventDefault();var i=$(t.currentTarget).find(".slider-item-content").attr("data-gametoken");n.gameLaunchService.launchGame(i)})},t.prototype.configureLazyLoader=function(){this.lazyLoader=new Blazy({container:".game-pods-container",src:"data-lazy",selector:".slider-item-image",offset:1e3})},t.prototype.lazyLoadImages=function(){var n=this,i=0,r=100,t;this.lazyLoadingInProgress||(this.lazyLoadingInProgress=!0,t=setInterval(function(){if(i>r)n.stopLazyLoading(t);else{var u=n.relatedGameContainer.find(".slider-item-image").last();u.hasClass("b-loaded")||u.hasClass("b-error")?n.stopLazyLoading(t):(i++,n.lazyLoader.revalidate())}},50))},t.prototype.stopLazyLoading=function(n){clearInterval(n);this.lazyLoadingInProgress=!1},t}();t.RelatedGames=i})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(loginEvent,modalService,balanceService,balanceUpdateEvent,toggleMenuEvent,toggleBalanceEvent,toggleProductNavigationEvent,localStorageService,pageContextService,authenticationService){this.loginEvent=loginEvent;this.modalService=modalService;this.balanceService=balanceService;this.balanceUpdateEvent=balanceUpdateEvent;this.sendToggleMenuEvent=toggleMenuEvent;this.receiveToggleBalanceEvent=toggleBalanceEvent;this.recieveToggleProductNavigationEvent=toggleProductNavigationEvent;this.localStorageService=localStorageService;this.pageContextService=pageContextService;this.receiveToggleMenuEvent=toggleMenuEvent;this.receiveLoginEvent=loginEvent;this.authenticationService=authenticationService}return n.prototype.init=function(n){var t=this;if(n!=null){this.header=$(n);this.logIn=this.header.find(".LogIn");this.hide=this.header.find(".hide");this.navigationWrapper=this.header.find(".product-navigation-wrapper");this.loginContainer=this.header.find(".header-login-container");this.loggedInContainer=this.header.find(".logged-in-container");this.productSlider=this.header.find(".product-navigation-slider");this.loggedInContainer.length>0?(this.userInformation=this.header.find(".user-information"),this.bindEvents(),this.setupLoggedIn()):this.setupLoggedOut();this.hide.click(function(n){n.stopPropagation();t.hideNavigationWrapper()});this.header.find(".product-navigation-toggle").click(function(){if(t.navigationWrapper.hasClass("slidedown")?t.hideNavigationWrapper():t.showNavigationWrapper(),typeof IScroll!="undefined")var n=new IScroll(".header-wrapper .product-navigation-slider",{scrollY:!1,scrollX:!0,click:!1})});this.recieveToggleProductNavigationEvent.onEvent(function(n){n===0&&t.hideNavigationWrapper()})}},n.prototype.setupLoggedOut=function(){var n=this;this.logIn.click(function(t){t.preventDefault();t.stopPropagation();var i=n.authenticationService.getAuthenticationType();n.logIn.hasClass("active")?(n.logIn.removeClass("active"),n.loginEvent.emitEvent(0,i,1,!0,null,1,!1)):(n.logIn.addClass("active"),n.loginEvent.emitEvent(1,i,1,!0,null,1,!1))});this.receiveLoginEvent.onEvent(function(t){t===0&&n.logIn.removeClass("active")})},n.prototype.setupLoggedIn=function(){var n=this,i,t;this.loggedInContainer.click(function(){n.userInformation.hasClass("active")?(n.sendToggleMenuEvent.emitEvent(1),n.userInformation.removeClass("active")):(n.sendToggleMenuEvent.emitEvent(1,1),n.userInformation.addClass("active"))});this.receiveToggleMenuEvent.onEvent(function(t,i){t!==null&&t===1&&i!==null&&i===0&&n.userInformation.removeClass("active")});i=this.localStorageService.getData(0);i&&i.hideBalance&&this.header.addClass("balance-hide");this.balanceUpdateEvent.onEvent(function(t){n.populateBalances(t)});t=this.balanceService.getBalances();t!==undefined&&t!==null&&this.populateBalances(t)},n.prototype.bindEvents=function(){var n=this;this.receiveToggleBalanceEvent.onEvent(function(t){t==0?n.header.addClass("balance-hide"):n.header.removeClass("balance-hide")})},n.prototype.populateBalances=function(n){var t=n.sportsAndGamesTotalBalance?n.sportsAndGamesTotalBalance:n.total;this.header.find(".balance").text(t)},n.prototype.hideNavigationWrapper=function(){this.navigationWrapper.removeClass("active slidedown");this.pageContextService.removePageContext(0)},n.prototype.showNavigationWrapper=function(){this.navigationWrapper.addClass("active slidedown");this.pageContextService.addPageContext(0)},n}();n.MobileHeader=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.init=function(n){n!=null&&this.cleanUrl()},n.prototype.cleanUrl=function(){window.history&&history.pushState&&this.historyReplaceState(this.getCurrentPath())},n.prototype.historyReplaceState=function(n){window.history.replaceState(null,null,n)},n.prototype.getCurrentPath=function(){return location.pathname},n}();n.PlayPageBackButton=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(cookieService,modalService){this.priority=50;this.cookieService=cookieService;this.modalService=modalService}return n.prototype.init=function(n){n!=null&&(this.modal=$(n),this.button=this.modal.find(".button"),this.cookieName=this.modal.data("cookiename"),this.bindCookieCreationToButtonClick(),this.setUpLinkClickEvents(),this.modalService.showModal(new i(this.modal,this.priority,2,!1)))},n.prototype.bindCookieCreationToButtonClick=function(){var n=this;this.button.on("click",function(){n.cookieService.setCookie(n.cookieName,"True",0);n.modalService.hideModal()})},n.prototype.setUpLinkClickEvents=function(){var n=this;this.modal.find("a").click(function(t){var i,e,u,f,r,o;return t.preventDefault(),i=t.target.getAttribute("href"),e=t.target.getAttribute("ia-popup"),u=t.target.getAttribute("ia-width"),f=t.target.getAttribute("ia-height"),r=t.target.getAttribute("ia-language"),r&&!isNaN(parseInt(r,10))&&(i=i.indexOf("?")>-1?i+"&lng="+parseInt(r):i+"?lng="+parseInt(r)),e&&u&&f?(o="height="+f+",width="+u+",status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes",window.open(i,"ImportantAnnouncementPopup",o)):n.redirectTo(i),!1})},n.prototype.redirectTo=function(n){window.location.href=n},n}();t.ImportantAnnouncementModal=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(){"use strict"})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(modalService){this.priority=35;this.modalService=modalService}return n.prototype.init=function(n){var t=this;n!=null&&(this.iframe=$(n),this.modalService.showModal(new i(this.iframe,this.priority,2,!1)),this.createTerminateProcessFunction(),this.createGetIFObjFunction(),window.ShowKYCPopup=function(){t.modalService.positionCentrally()})},n.prototype.createTerminateProcessFunction=function(){var n=this;window.TerminateProcess||(window.TerminateProcess=function(t){t===!0?n.refreshPage():n.modalService.hideModal()})},n.prototype.createGetIFObjFunction=function(){window.getIFObj||(window.getIFObj=function(n){return document.getElementById(n)})},n.prototype.refreshPage=function(){window.location.href=window.location.href},n}();t.KycSecondaryAuth=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(clientTechnologyService,failedLoginEvent,failedLoginWithKycEvent,realityCheckTimerService,realityCheckDecisionEvent,modalService,pageContextService){this.modalService=modalService;this.realityCheckDecisionEvent=realityCheckDecisionEvent;this.realityCheckTimerService=realityCheckTimerService;this.clientTechnologyService=clientTechnologyService;this.failedLoginEvent=failedLoginEvent;this.failedLoginWithKycEvent=failedLoginWithKycEvent;this.pageContextService=pageContextService}return t.prototype.init=function(){var n=this;this.clientTechnologyService.establish();this.failedLoginEvent.onEvent(function(){n.hideLoadingOverlay()});this.failedLoginWithKycEvent.onEvent(function(){n.handleFailedLoginWithKycEvent()});window.location.hash==="#JoinNow"&&$(".JoinNow").click();this.startSessionPoller()},t.prototype.hideLoadingOverlay=function(){$(".loadingSpinnerOverlay").fadeOut(200)},t.prototype.handleFailedLoginWithKycEvent=function(){window.location.href=window.location.href},t.prototype.startSessionPoller=function(){var t=this,f=function(){n.cmsCore.Session.LogOut()},e=function(n){t.realityCheckTimerService.stopAndResetTimer();t.realityCheckTimerService.startTimer(n);$(".realitycheck").is(":visible")&&(t.modalService.hideModal(),t.pageContextService.removePageContext(1));t.realityCheckDecisionEvent.emitEvent(0)},i=n.cmsCore.getPageAttributes($),o=window.location.pathname.toLowerCase().indexOf("/play/")===0,r,u;o&&(r=function(n){n!==null&&(t.lastPollValue!==null&&t.lastPollValue<n.T&&$.ajax({type:"GET",dataType:"text",url:i.appPath+"GamesRealityCheck/HasStoppedGaming",success:function(n){n==="True"&&(window.location.href=i.ReturnPath)}}),t.lastPollValue=n.T)});u=n.cmsCore.sessionPoller.Poller($,i,f,e,r);u.loop()},t}();t.Page=i})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var r=n.Games.Components.BaseClasses.LoginModalBase,i=n.Games.Models.Modal,u=function(n){function t(modalService,gameService,loginService,failedLoginEvent,loginEvent,gamesSettingsService,membersService){var t=n.call(this,gamesSettingsService,membersService)||this;return t.showLoginModalUrlParam="slp=1",t.priority=45,t.validClass="valid",t.modalService=modalService,t.gameService=gameService,t.loginService=loginService,t.failedLoginEvent=failedLoginEvent,t.receiveLoginEvent=loginEvent,t.gamesSettingsService=gamesSettingsService,t.membersService=membersService,t.sendLoginEvent=loginEvent,t}return __extends(t,n),t.prototype.init=function(n){var t=this;if(n!=null){this.modal=$(n);this.game=this.gameService.getGameInformation();this.toggleMask=this.modal.find(".toggle-mask");this.toggleFocus=this.modal.find(".toggle");this.loginButton=this.modal.find(".loginButton");this.username=this.modal.find("#txtUsername");this.password=this.modal.find("#txtPassword");this.loginButtonText=this.loginButton.find("span");this.spinner=this.loginButton.find(".cssSpinner");this.kmlControl=this.modal.find(".kml-control");this.kmlControlCheckBox=this.kmlControl.find("input");this.clearUsernameIcon=this.username.siblings(".clear-input");this.clearPasswordIcon=this.password.siblings(".clear-input");this.setupClearInputClick(this.modal,this.toggleMask,this.username,this.password,this.clearUsernameIcon,this.clearPasswordIcon);this.cancelButton=this.modal.find(".cancel-button");this.bindCancelClick();this.setupFieldToggle();this.setupToggleInputMask(this.toggleMask,this.password);this.setupKmlControl(this.kmlControl,this.kmlControlCheckBox);this.game!=null&&this.setupDemoLink();this.closeCallback=function(){return t.modalService.hideModal()};this.bindLoginClick();this.username.on("keypress",function(n){t.logInOnEnter(n)});this.username.on("keyup",function(n){t.toggleValidClass($(n.target))});this.password.on("keypress",function(n){t.logInOnEnter(n)});this.password.on("keyup",function(n){t.toggleValidClass($(n.target))});this.showModalOnInit();this.gamesSettingsService.getGameSettings().mobile&&this.kmlControl.show();this.failedLoginEvent.onEvent(function(n){n===0&&t.showFailedLogin()});this.receiveLoginEvent.onEvent(function(n,i,r,u,f,e,o){(i===void 0&&(i=0),r===void 0&&(r=0),u===void 0&&(u=!0),f===void 0&&(f=null),e===void 0&&(e=2),o===void 0&&(o=!0),i===0)&&(n===1?(t.clearFailedLogin(),t.modal.hasClass("slide")||t.showLogin(u,r,f,e,o)):(t.modal.hasClass("slide")||t.modal.hasClass("instant"))&&t.modalService.hideModal())})}},t.prototype.showModalOnInit=function(){var n=this.getWindowLocationHref();n.indexOf(this.showLoginModalUrlParam)>-1&&this.showLogin(!0)},t.prototype.getWindowLocationHref=function(){return window.location.href},t.prototype.showFailedLogin=function(){this.showFailureAnimation(this.modal);this.loginButtonText.show();this.spinner.hide();this.loginButton.removeClass("loading");this.modal.removeClass("loginInProgress");this.clearPasswordField();this.kmlControlCheckBox.prop("checked",!1);this.modalService.showModal(new i(this.modal,this.priority))},t.prototype.showLogin=function(n,t,r,u,f){var e=this;t===void 0&&(t=0);u===void 0&&(u=2);f===void 0&&(f=!0);r!=null&&(this.closeCallback=r);this.spinner.hide();this.loginButton.removeClass("loading");this.modal.removeClass("failed-login");this.modal.removeClass("loginInProgress");this.clearUsernameIcon.hide();this.clearPasswordIcon.hide();this.toggleMask.hide();this.resetToggleInputMask(this.password,this.toggleMask);this.clearAllInput();this.modalService.showModal(new i(this.modal,this.priority,u,n,f,t,!1,!0,function(){e.closeLoginModal()}))},t.prototype.closeLoginModal=function(){this.sendLoginEvent.emitEvent(0,0)},t.prototype.setupDemoLink=function(){this.demoLinkContainer=this.modal.find(".demo-link-container");this.game.freePlay?this.demoLinkContainer.show():this.demoLinkContainer.hide()},t.prototype.clearFailedLogin=function(){this.modal.removeClass("failed-login")},t.prototype.clearPasswordField=function(){this.password.val("").siblings("label").show()},t.prototype.clearAllInput=function(){this.username.val("").siblings("label").show();this.clearPasswordField();this.prepopulateUserName(this.username,this.clearUsernameIcon)},t.prototype.setupFieldToggle=function(){this.toggleFocus.on("keypress paste",function(){$(this).siblings("label").hide()});this.toggleFocus.blur(function(){$(this).val()===""&&$(this).siblings("label").show()})},t.prototype.bindCancelClick=function(){var n=this;this.cancelButton.on("click",function(){n.closeCallback()})},t.prototype.bindLoginClick=function(){var n=this;this.loginButton.on("click",function(t){n.modal.addClass("loginInProgress");n.logIn(t)})},t.prototype.logInOnEnter=function(n){n.which===13&&this.logIn(n)},t.prototype.logIn=function(n){n.preventDefault();this.spinner.show();var t=0;this.kmlControlCheckBox.prop("checked")&&(t=3);this.loginService.logIn(this.username.val(),this.password.val(),window.location.pathname,"","loginpanel",t)},t.prototype.toggleValidClass=function(n){n.val().length===0?n.removeClass(this.validClass):n.addClass(this.validClass)},t}(r);t.LoginModal=u})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.serviceUrl="/GameRating/AddRating"}return n.prototype.rateGame=function(n,t){$.ajax({data:{gameToken:n,rating:t},dataType:"json",type:"POST",url:this.serviceUrl,cache:!1})},n}();n.GameRatingService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(gameRatingService,realityCheckDueEvent){this.activeClass="active";this.rating=0;this.initialNumberOfHighlitStars=3;this.gameRatingService=gameRatingService;this.realityCheckDueEvent=realityCheckDueEvent}return n.prototype.init=function(n){n!=null&&(this.ratingControl=$(n),this.gameToken=this.ratingControl.data("game-token"),this.displayPeriod=this.ratingControl.data("timeout")*1e3,this.bindDoneButtonClickEvent(),this.bindCloseButtonClickEvent(),this.bindStarEvents(),this.bindBackgroundClickEvent(),this.bindEvents(),this.showControl(),this.setCloseTimeout())},n.prototype.bindCloseButtonClickEvent=function(){var n=this;this.ratingControl.on("click",".close-button",function(t){t.preventDefault();t.stopPropagation();n.rateCloseAndClear()})},n.prototype.bindDoneButtonClickEvent=function(){var n=this;this.ratingControl.on("click",".done-button",function(t){t.preventDefault();t.stopPropagation();n.rateCloseAndClear(n.rating)})},n.prototype.bindBackgroundClickEvent=function(){var n=this;this.ratingControl.on("click",function(){n.rating=0;n.highlightStars(0)})},n.prototype.bindStarEvents=function(){for(var t,n=this,i=1;i<6;i++){t=$('.star-rating[data-rating="'+i+'"]');t.on("mouseover",function(t){n.highlightStars($(t.target).data("rating"))});t.on("mouseleave",function(){n.highlightStars(0)});t.on("click",function(t){t.stopPropagation();n.rating=$(t.target).data("rating");n.highlightStars(n.rating)})}},n.prototype.highlightStars=function(n){for(var i,t=1;t<6;t++)i=$('.star-rating[data-rating="'+t+'"]'),t<=n||t<=this.rating?i.addClass(this.activeClass):i.removeClass(this.activeClass)},n.prototype.showControl=function(){var n=this;this.highlightStars(this.initialNumberOfHighlitStars);setTimeout(function(){n.ratingControl.css({bottom:0})},1e3)},n.prototype.hideControl=function(){var n=this;this.ratingControl.css({bottom:this.ratingControl.height()*-1});setTimeout(function(){n.ratingControl.hide()},350)},n.prototype.setCloseTimeout=function(){var n=this;this.displayPeriod>0&&(this.displayTimer=setTimeout(function(){n.rateCloseAndClear()},this.displayPeriod))},n.prototype.clearDisplayTimer=function(){this.displayTimer!==undefined&&clearTimeout(this.displayTimer)},n.prototype.rateCloseAndClear=function(n){n===undefined?this.gameRatingService.rateGame(this.gameToken):this.gameRatingService.rateGame(this.gameToken,n);this.hideControl();this.clearDisplayTimer()},n.prototype.bindEvents=function(){var n=this;this.realityCheckDueEvent.onEvent(function(){n.hideControl()})},n}();n.GameRatingControl=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Left=0]="Left";n[n.Centre=1]="Centre";n[n.Right=2]="Right"})(t=n.CarouselSlideDirection||(n.CarouselSlideDirection={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t;(function(n){n[n.Desktop=1]="Desktop";n[n.LargeDevice=2]="LargeDevice";n[n.SmallDevice=3]="SmallDevice"})(t=n.CarouselViewMode||(n.CarouselViewMode={}))})(t=n.Enums||(n.Enums={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.RealityCheckTimerEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){n[n.Singleton=0]="Singleton";n[n.Transient=1]="Transient"})(t=n.Lifestyle||(n.Lifestyle={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function t(t,i,r){r===void 0&&(r=n.Lifestyle.Transient);this.name=t;this.componentType=i;this.lifestyle=r}return t.prototype.withLifestyle=function(n){return this.lifestyle=n,this},t}();n.ComponentRegistration=t})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t,i){this.kernel=n;this.name=t;this.depth=i;this.continueProcessing=!0}return n}();n.ResolveContext=t})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function t(n){this.name=n}return t.named=function(n){return new t(n)},t.prototype.componentType=function(t){return new n.ComponentRegistration(this.name,t)},t}();n.Component=t})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){this.stages=[]}return n.prototype.execute=function(n){for(var t=0;t<this.stages.length;t++)n.continueProcessing&&this.stages[t].execute(n)},n.prototype.addStage=function(n){this.stages.push(n)},n}();n.ResolvePipeline=t})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(t){var i;(function(t){var i=function(){function t(){}return t.prototype.execute=function(t){t.componentRegistration.lifestyle!==n.Lifestyle.Singleton||t.kernel.componentCache.hasInstance(t.name)||t.kernel.componentCache.addInstance(t.name,t.componentInstance)},t}();t.CacheInstance=i})(i=t.Stages||(t.Stages={}))})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(t){var i;(function(t){var i=function(){function t(){}return t.prototype.execute=function(t){t.componentRegistration.lifestyle===n.Lifestyle.Singleton&&t.kernel.componentCache.hasInstance(t.name)&&(t.componentInstance=t.kernel.componentCache.getInstance(t.name),t.continueProcessing=!1)},t}();t.CheckCache=i})(i=t.Stages||(t.Stages={}))})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.execute=function(n){if(!n.kernel.nameIsRegistered(n.name)){n.componentInstance=null;n.continueProcessing=!1;throw new Error("IOC Component "+n.name+" hasn't been registered. Did you forget to register it?");}},n}();n.CheckComponentIsRegistered=t})(t=n.Stages||(n.Stages={}))})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){this.depthThreshold=10}return n.prototype.execute=function(n){this.checkDepth(n.depth)},n.prototype.checkDepth=function(n){if(n>this.depthThreshold)throw new Error("Cyclic dependency detected whilst resolving component.");},n}();n.CheckDepthForCyclicDependency=t})(t=n.Stages||(n.Stages={}))})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.execute=function(n){function t(){n.componentRegistration.componentType.apply(this,n.dependencies)}t.prototype=n.componentRegistration.componentType.prototype;n.componentInstance=new t},n}();n.CreateInstance=t})(t=n.Stages||(n.Stages={}))})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){this.functionArguments=/^function\s*[^\(]*\(\s*([^\)]*)\)/m.source}return n.prototype.execute=function(n){n.dependencyNames=this.getDependencyNames(n.componentRegistration)},n.prototype.getDependencyNames=function(n){if(n.name==="")return this.noArguments();var t=n.componentType.toString().match(this.functionArguments);return t===null?this.noArguments():t[1]===""?this.noArguments():t[1].replace(/\s/g,"").split(",")},n.prototype.noArguments=function(){return[]},n}();n.GetDependencyNames=t})(t=n.Stages||(n.Stages={}))})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(){}return n.prototype.execute=function(n){n.componentRegistration=n.kernel.getComponentRegistration(n.name);n.componentRegistration===null&&(n.continueProcessing=!1,n.componentInstance=null)},n}();n.ObtainRegistration=t})(t=n.Stages||(n.Stages={}))})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){this.container=n}return n.prototype.execute=function(n){var i=[],t;for(n.depth++,t=0;t<n.dependencyNames.length;t++)i.push(this.container.resolve(n.dependencyNames[t],n.depth));n.dependencies=i},n}();n.ResolveDependencies=t})(t=n.Stages||(n.Stages={}))})(t=n.Pipeline||(n.Pipeline={}))})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){var i=function(){function i(i){this.kernel=i;this.pipeline=new t.Pipeline.ResolvePipeline;this.pipeline.addStage(new t.Pipeline.Stages.CheckDepthForCyclicDependency);this.pipeline.addStage(new t.Pipeline.Stages.CheckComponentIsRegistered);this.pipeline.addStage(new t.Pipeline.Stages.ObtainRegistration);this.pipeline.addStage(new t.Pipeline.Stages.CheckCache);this.pipeline.addStage(new t.Pipeline.Stages.GetDependencyNames);this.pipeline.addStage(new t.Pipeline.Stages.ResolveDependencies(this));this.pipeline.addStage(new t.Pipeline.Stages.CreateInstance);this.pipeline.addStage(new t.Pipeline.Stages.CacheInstance);var r=t.Component.named("resolver").componentType(n.Games.IoC.IocContainer).withLifestyle(t.Lifestyle.Singleton);i.registerComponent(r);i.componentCache.addInstance("resolver",this)}return i.prototype.resolve=function(n,i){i===void 0&&(i=1);var r=new t.ResolveContext(this.kernel,n,i);return this.pipeline.execute(r),r.componentInstance},i.prototype.register=function(n){return this.kernel.registerComponent(n),this},i}();t.IocContainer=i})(i=t.IoC||(t.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n){this.componentCache=n;this.registeredComponents=[]}return n.prototype.nameIsRegistered=function(n){for(var t=0;t<this.registeredComponents.length;t++)if(this.registeredComponents[t].name===n)return!0;return!1},n.prototype.registerComponent=function(n){this.registeredComponents.push(n)},n.prototype.getComponentRegistration=function(n){for(var t=0;t<this.registeredComponents.length;t++)if(this.registeredComponents[t].name===n)return this.registeredComponents[t];throw new Error("No component registered for "+n);},n}();n.Kernel=t})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function n(n,t){this.name=n;this.instance=t}return n}();n.ComponentInstance=t})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function t(){this.componentInstances=[]}return t.prototype.hasInstance=function(n){for(var t=0;t<this.componentInstances.length;t++)if(this.componentInstances[t].name===n)return!0;return!1},t.prototype.getInstance=function(n){for(var t=0;t<this.componentInstances.length;t++)if(this.componentInstances[t].name===n)return this.componentInstances[t].instance;throw new Error("Component cache doesn't have an instance for component named "+n);},t.prototype.addInstance=function(t,i){this.componentInstances.push(new n.ComponentInstance(t,i))},t}();n.ComponentCache=t})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(){function t(){}return t.bootstrap=function(){return this.iocContainer||(this.iocContainer=new n.IocContainer(new n.Kernel(new n.ComponentCache))),this.iocContainer},t.clear=function(){this.iocContainer=null},t}();n.Container=t})(t=n.IoC||(n.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(){this.activeClass="active"}return t.prototype.init=function(n){n!=null&&(this.bindElements(n),this.registerEventHandlers())},t.prototype.bindElements=function(n){this.container=$(n);this.trigger=this.container.find(".slider-filter-trigger").first();this.triggerText=this.container.find(".filter-text-large").first();this.options=this.container.find(".slider-filter-options").first();this.titleElement=this.container.closest(".slider-header-wrapper").find(".slider-section-title").first();this.setDimensions(this.getWidthByCloning(this.trigger),0)},t.prototype.registerEventHandlers=function(){var n=this;this.toggleFilterOnTriggerClick();this.selectFilterOnOptionClick();this.closeOptionsOnClickOutsideFilterControl();this.closeOptionsOnWindowResize();$(".slider-filter-wrapper").on("mouseleave",function(){n.closeOptions()})},t.prototype.toggleFilterOnTriggerClick=function(){var n=this;this.trigger.click(function(){n.toggleFilter()})},t.prototype.selectFilterOnOptionClick=function(){var n=this;this.options.find("a").click(function(t){t.preventDefault();n.selectOption($(t.target))})},t.prototype.closeOptionsOnWindowResize=function(){var n=this;$(window).on("resize",function(){n.trigger.hasClass(n.activeClass)&&n.closeOptions()})},t.prototype.closeOptionsOnClickOutsideFilterControl=function(){var n=this;$(document).on("click",function(t){$(t.target).closest(".slider-filter-wrapper").length==0&&n.closeOptions()})},t.prototype.toggleFilter=function(){this.trigger.hasClass(this.activeClass)?this.closeOptions():this.openOptions()},t.prototype.openOptions=function(){var n=this.options.find(".slider-filter-item").length*$(".slider-filter-item").outerHeight();this.trigger.addClass(this.activeClass);this.options.show();this.setDimensions(Math.max(this.getWidthByCloning(this.options),this.getWidthByCloning(this.trigger)),n)},t.prototype.closeOptions=function(){this.trigger.removeClass(this.activeClass);this.setDimensions(this.getWidthByCloning(this.trigger),0)},t.prototype.stringFormat=function(n,t){var i=n;return i.replace("{0}",t)},t.prototype.selectOption=function(t){t.attr("data-selected")!=="yes"&&(this.setSelectedAttribute(t.data("filter"),t.data("promotion")),this.triggerText.text(this.stringFormat(""+this.triggerText.data("leading-text")+"",t.text())),this.titleElement.text(t.text()),this.closeOptions(),n.Games.Components.GamePodLoader.triggerFilterChange(t.data("filter"),t.data("promotion")))},t.prototype.setSelectedAttribute=function(n,t){for(var i,r=0;r<this.options.children().length;r++)i=$(this.options.children()[r]),i.data("filter")==n&&i.data("promotion")==t?i.attr("data-selected","yes"):i.attr("data-selected","no")},t.prototype.setDimensions=function(n,t){this.options.css({width:n+2+"px",height:t+"px"});this.trigger.css({width:n+2+"px"})},t.prototype.getWidthByCloning=function(n){var t=n.clone().css({width:"auto",display:"none"}).appendTo(n.parent()),i=t.innerWidth();return t.remove(),i},t}();t.FilteredSliderFilter=i})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var r=function(){function r(gameLaunchService){var n=this;this.requestUrl="/GamePod/GamesByCategory";this.loadQuantity=30;this.paddingQuantity=6;this.header=$(".game-pod-grid-header h1");this.openClass="open";this.xTouchTolerance=20;this.yTouchTolerance=10;this.lazyLoadingInProgress=!1;this.populateGamesGrid=function(){if(n.gamePods!==undefined&&n.gamePods!==null){var t=n.gamePods.splice(0,n.loadQuantity);setTimeout(function(){n.grid.html(n.template({model:t}));n.padGrid();n.setPodHeights();n.lazyLoadImages();n.grid.trigger("gameGridLoaded")},350)}};this.gameLaunchService=gameLaunchService}return r.prototype.init=function(t){t!=null&&(this.grid=$(t),this.gamePodOrderHolder=$(".game-pod-order-holder"),this.filterLinks=$(".game-pod-order"),this.initialGamePodOrderHolderHeight=38,this.orderCategoryBar=$(".order-category-bar"),this.template=Handlebars.compile($("#game-pod-template").html()),this.gamePodCurrentOrder=$(".game-pod-current-order"),this.gamePodCurrentOrder.html(this.filterLinks.first().text()),this.scaffoldGrid(),n.Models.HandlebarsHelpers.registerGamePodHelpers(),this.registerEventHandlers(),this.filterLinks.first().addClass("active"),this.setOrderCategoryBarLocation(this.filterLinks.first()),this.setCategoryHover(),this.bindTouchEvents(this.currentTouchMovement),this.configureLazyLoader(),this.preloadPlaceholderImages())},r.prototype.registerEventHandlers=function(){var n=this;window.onscroll=function(){n.loadMoreGamesOnScroll()};this.grid.on(r.categoryChangedEvent,function(t,i,r,u){n.loadNewCategory(i,r);n.selectFilter(n.filterLinks.first());n.placeholderImage=u});this.grid.on(r.filterChangedEvent,function(t,i){n.applyFilter(i)});this.filterLinks.click(function(t){var i=$(t.currentTarget);n.selectFilter(i);r.triggerFilterChanged(i.data("filter"))});$(window).on("resize",function(){n.setPodHeights();n.setOrderCategoryBarLocation($(".game-pod-order.active"))});this.toggleFilterOnGamePodOrderHolderClick();this.closeOptionsOnClickOutsideFilterControl();this.launchGameOnButtonClick()},r.prototype.launchGameOnButtonClick=function(){var n=this;this.grid.on("click",".slider-item-wrapper",function(t){if(t.preventDefault(),!Modernizr.touchevents){var i=$(t.currentTarget).find(".slider-item-content").attr("data-gametoken");n.gameLaunchService.launchGame(i)}})},r.prototype.toggleFilterOnGamePodOrderHolderClick=function(){var n=this;this.gamePodOrderHolder.click(function(){n.toggleFilter()});this.gamePodCurrentOrder.click(function(){})},r.prototype.closeOptionsOnClickOutsideFilterControl=function(){var n=this;$(document).on("click",function(t){$(t.target).closest(".game-pod-order-holder").length==0&&n.closeOptions()})},r.prototype.toggleFilter=function(){this.gamePodOrderHolder.hasClass(this.openClass)?this.closeOptions():this.openOptions()},r.prototype.openOptions=function(){var n;this.orderCategoryBar.is(":visible")||(this.gamePodOrderHolder.addClass(this.openClass),n=this.gamePodOrderHolder.find(".game-pod-order").length*38,this.gamePodOrderHolder.height(n))},r.prototype.bindTouchEvents=function(n){var i=this,r=!1;this.grid.on("touchmove",".slider-item-wrapper",function(t){t.stopPropagation();n.update(t);n.significantMovementDetected(i.xTouchTolerance,i.yTouchTolerance)&&(r=!0)});this.grid.on("touchstart",".slider-item-wrapper",function(i){i.stopPropagation();n=new t.TouchMovement(i);r=!1});this.grid.on("touchend",".slider-item-wrapper",function(n){if(n.stopPropagation(),!r){if($(n.currentTarget).hasClass("clicked")){var t=$(n.currentTarget).find(".slider-item-content").attr("data-gametoken");i.gameLaunchService.launchGame(t)}setTimeout(function(){$(".slider-item-wrapper.clicked").removeClass("clicked");$(n.currentTarget).addClass("clicked")},100)}})},r.prototype.closeOptions=function(){this.gamePodOrderHolder.removeClass(this.openClass);this.gamePodOrderHolder.height(this.initialGamePodOrderHolderHeight)},r.prototype.setCategoryHover=function(){Modernizr.touchevents||this.filterLinks.hover(function(n){$(n.currentTarget).hasClass("active")||$(n.currentTarget).addClass("hover")},function(n){$(n.currentTarget).removeClass("hover")})},r.prototype.loadMoreGamesOnScroll=function(){$(window).scrollTop()+$(window).height()>$(document).height()-r.infiniteScrollOffset&&this.loadMoreGames()},r.prototype.scaffoldGrid=function(){for(var n=0;n<this.loadQuantity;n++)this.grid.append($('<div class="game-pod">'));this.grid.find(".game-pod").each(function(n,t){$(t).height($(t).width()+40)});this.padGrid();this.addOverlay()},r.prototype.getGames=function(n,t){var i=this;$.ajax({url:this.requestUrl,type:"GET",data:{category:n},cache:!1}).done(function(n){i.processResponse(n,t)})},r.prototype.processResponse=function(t,i){var r=this;this.gamePods=JSON.parse(t).map(function(t){return new n.Models.GamePodModel(t.id,t.tkn,t.im,t.na,t.ra,t.t1t,t.t1,t.t2t,t.t2,t.pc,t.ne,t.rid,r.placeholderImage)});this.gamePodsBackup=this.gamePods.slice();i()},r.prototype.loadMoreGames=function(){this.gamePods&&this.gamePods.length>0&&(this.grid.find(".ghost").remove(),this.grid.append(this.template({model:this.gamePods.splice(0,this.loadQuantity)})),this.padGrid(),this.setPodHeights(),this.lazyLoadImages(),this.grid.trigger("gameGridLoaded"))},r.prototype.loadNewCategory=function(n,t){this.addOverlay();this.scrollToTop();this.updateHeader(t);this.getGames(n,this.populateGamesGrid)},r.prototype.applyFilter=function(n){this.addOverlay();this.scrollToTop();this.sortGamesByFilter(n);this.populateGamesGrid()},r.prototype.sortGamesByFilter=function(n){var t=this;if(this.gamePodsBackup!==undefined&&this.gamePodsBackup!==null){this.gamePods=this.gamePodsBackup.slice();switch(n){case"HighestRated":this.gamePods.sort(function(n,r){return t.recursiveSortByParameters(n,r,[new i("ra",!0),new i("na",!1)])});break;case"MostPlayed":this.gamePods.sort(function(n,r){return t.recursiveSortByParameters(n,r,[new i("pc",!0),new i("na",!1)])})}}},r.prototype.recursiveSortByParameters=function(n,t,i){var r,u;if(i.length>0){if(r=i.shift(),typeof n[r.propertyName]=="number"){if(n[r.propertyName]!=t[r.propertyName])return r.descending?t[r.propertyName]-n[r.propertyName]:n[r.propertyName]-t[r.propertyName]}else if(n[r.propertyName]>t[r.propertyName]||n[r.propertyName]<t[r.propertyName])return r.descending?-1:1;if(u=this.recursiveSortByParameters(n,t,i),u!=null)return u}return 0},r.prototype.updateHeader=function(n){this.header.text(n)},r.prototype.selectFilter=function(n){this.filterLinks.removeClass("active");n.addClass("active");n.removeClass("hover");this.setOrderCategoryBarLocation(n);this.gamePodCurrentOrder.html(n.text())},r.prototype.padGrid=function(){for(var n=0;n<this.paddingQuantity;n++)this.grid.append($('<div class="slider-item-wrapper game-pod ghost">'))},r.prototype.addOverlay=function(){if($(".overlay").length===0){var n=$('<div class="overlay">'),t=$('<img src="/img/spinner.png" alt="" class="spinner">');n.height(this.grid.height());n.append(t);this.grid.append(n)}},r.prototype.scrollToTop=function(){$("html, body").animate({scrollTop:0},250)},r.prototype.setPodHeights=function(){var n=this.grid.find(".game-pod").first().width();this.grid.find(".game-pod:not(.ghost)").height(n+2);this.grid.find(".slider-item-content").css("top",n+"px")},r.triggerCategoryChanged=function(n){$(".game-pod-grid").trigger(r.categoryChangedEvent,n)},r.triggerFilterChanged=function(n){$(".game-pod-grid").trigger(r.filterChangedEvent,n)},r.prototype.setOrderCategoryBarLocation=function(n){if(this.orderCategoryBar.is(":visible")){var t=this.gamePodOrderHolder.offset().left,i=n.offset().left,r=i-t,u=n.innerWidth();typeof TweenLite!="undefined"&&TweenLite.to(this.orderCategoryBar,.35,{x:r,width:u,ease:Power3.easeOut})}},r.prototype.configureLazyLoader=function(){this.lazyLoader=new Blazy({container:".game-pod-grid",src:"data-lazy",selector:".slider-item-image",offset:1e3})},r.prototype.lazyLoadImages=function(){var n=this,i=0,r=100,t;this.lazyLoadingInProgress||(this.lazyLoadingInProgress=!0,t=setInterval(function(){var u=$(".slider-item-image").last();i>r?n.stopLazyLoading(t):u.first().hasClass("b-loaded")||u.hasClass("b-error")?n.stopLazyLoading(t):(i++,n.lazyLoader.revalidate())},50))},r.prototype.stopLazyLoading=function(n){clearInterval(n);this.lazyLoadingInProgress=!1;this.setPodHeights()},r.prototype.preloadPlaceholderImages=function(){var n=$(".SecondaryNavigation li");$.each(n,function(t){var i=$(n[t]).data("placeholderimage"),r;i!==undefined&&i!==null&&i!==""&&(r=new Image,r.src=i)})},r.categoryChangedEvent="categoryChanged",r.filterChangedEvent="filterChanged",r.infiniteScrollOffset=1200,r}(),i;t.GamePodGrid=r;i=function(){function n(n,t){this.propertyName=n;this.descending=t}return n}()})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e,o,s,h,c,l,a){this.id=n;this.tkn=t;this.im=i;this.na=r;this.ra=u;this.t1t=f;this.t1=e;this.t2t=o;this.t2=s;this.pc=h;this.ne=c;this.rid=l;this.pi=a}return n}();n.GamePodModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.registerGamePodHelpers=function(){Handlebars.registerHelper("rating",function(n){for(var t='<div class="slider-item-rating">',i=0;i<5;i++)t=t+'<div class="'+(i<n?"on":"off")+'">&#9733;<\/div>';return t+"<\/div>"});Handlebars.registerHelper("reels",function(n){return n==0?"no-reels":""})},n}();n.HandlebarsHelpers=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.SliderRequestModel,r=n.Games.Models.HandlebarsHelpers,u=function(){function n(requestBuilderService,initialiseComponentService,dataComponentsInitializerService){var t=this;this.processLoadAllSlidersResponse=function(i){t.renderSliders(JSON.parse(i));n.filteredSliderContainer=$(".filtered .slider-container");n.filteredSliderContainer.on("changeFilter",function(n,i,r){t.refreshFilteredSlider(i,r)});t.deferred.resolve();$(document).trigger("allSlidersLoaded")};this.processRefreshFilteredSliderResponse=function(i){var r=JSON.parse(i);n.filteredSliderContainer.parent().find(".spinner").removeClass("show-animation");n.filteredSliderContainer.html(t.gamepodTemplate({model:r.g}));n.filteredSliderContainer.trigger("filteredSliderChanged")};this.requestBuilderService=requestBuilderService;this.initialiseComponentService=initialiseComponentService;this.dataComponentsInitializerService=dataComponentsInitializerService}return n.prototype.init=function(n){n!=null&&(this.gamepodLoader=$(n),this.gamepodSlidersContainer=this.gamepodLoader.find("#gamepod-sliders-container"),this.filteredSlider=this.gamepodLoader.find(".slider-outer-wrapper.filtered"),this.categorySliders=this.gamepodLoader.find(".slider-outer-wrapper.category"),this.gamepodTemplate=Handlebars.compile($("#game-pod-template").html()),r.registerGamePodHelpers(),this.loadAllSliders())},n.triggerFilterChange=function(t,i){n.filteredSliderContainer.trigger("changeFilter",[t,i])},n.prototype.loadAllSliders=function(){this.deferred=$.Deferred();this.dataComponentsInitializerService.addDataComponentsInitializer(this.deferred);var n=this.requestBuilderService.buildAllSliderRequestData(this.categorySliders,this.filteredSlider);this.getResponse("/GamePod/AllSliders",n,this.processLoadAllSlidersResponse)},n.prototype.refreshFilteredSlider=function(t,r){var u=$(".slider-outer-wrapper.filtered"),f,e;u.length&&(n.filteredSliderContainer.html("").parent().find(".spinner").addClass("show-animation"),f=parseInt(u.data("limit")),e=new i(t,f,r,""),this.getResponse("/GamePod/GameSlider",e,this.processRefreshFilteredSliderResponse))},n.prototype.renderSliders=function(n){var u=this,t=$(document.createElement("div")),i,r;t.append(this.categorySliders);i=t.find(".slider-container");i.each(function(t,i){var r=n.c[t].g;r.length===0?$(i).closest(".slider-outer-wrapper").remove():$(i).append(u.gamepodTemplate({model:r}))});r=this.gamepodTemplate({model:n.f.g});this.filteredSlider.find(".slider-container").html(r);t.prepend(this.filteredSlider);this.addDataComponentTypeAttributes(t);this.gamepodSlidersContainer.append(t);this.initialiseComponents()},n.prototype.initialiseComponents=function(){var n=this;this.gamepodSlidersContainer.find("[data-component-type]").each(function(t,i){n.initialiseComponentService.initialiseComponent(i)})},n.prototype.getResponse=function(n,t,i){i===void 0&&(i=function(){});var r={request:JSON.stringify(t)};$.ajax({url:n,type:"GET",data:r}).done(i)},n.prototype.addDataComponentTypeAttributes=function(n){n.find(".slider-filter-wrapper").attr("data-component-type","FilteredSliderFilter");n.find(".slider-outer-wrapper").attr("data-component-type","HomepageSlider");n.find(".slider-more-button").attr("data-component-type","SliderButton")},n}();t.GamePodLoader=u})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){}return n.prototype.setButtonTouchEvents=function(n){var t=!1;n.on("touchmove",function(n){n.stopPropagation();t=!0});n.on("touchstart",function(n){n.stopPropagation();t=!1});n.on("touchend",function(n){n.stopPropagation();t==!1&&$(n.target).toggleClass("hover_effect")})},n.prototype.setButtonHoverEvents=function(n){Modernizr.touchevents||n.hover(function(){$(this).addClass("hover_effect")},function(){$(this).removeClass("hover_effect")})},n}();n.ButtonService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(buttonService,gameLaunchService){this.buttonService=buttonService;this.gameLaunchService=gameLaunchService}return n.prototype.init=function(n){n!=null&&(this.hoverButtons=$(".Buttons a",n),this.touchButtons=$(".Buttons a",n),this.setup())},n.prototype.setup=function(){this.bindClickablePodHoverBehaviour();this.stopButtonEventPropagation();this.buttonService.setButtonTouchEvents(this.touchButtons);this.buttonService.setButtonHoverEvents(this.hoverButtons);this.registerGameLaunchClickEvent()},n.prototype.bindClickablePodHoverBehaviour=function(){$("div.PodImage").click(function(){var n=$(this).parent().find(".ReadMoreButton");n&&n.click()})},n.prototype.stopButtonEventPropagation=function(){$("div.clickablePodHover").click(function(n){n.stopPropagation()});$("div.GamesPromoPod .Buttons a").click(function(n){n.stopPropagation()});$(".MoreTerms").click(function(n){n.stopPropagation()})},n.prototype.registerGameLaunchClickEvent=function(){var n=this;$(".GameLaunchButton").on("click",function(t){t.preventDefault();var i=$(t.target).data("game-token");n.gameLaunchService.launchGame(i)})},n}();n.GamesPromoPod=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.smallBreakpoint=415;this.mediumBreakpoint=700;this.slideMargin=10}return n.prototype.refresh=function(n){this.slideWidth=n.slides.first().width()+this.slideMargin;this.visibleWidth=n.container.closest(".carousel-outer").width();this.viewMode=this.getViewMode()},n.prototype.calculateCentreOffset=function(n){var t=(this.visibleWidth-this.slideWidth)/2,i=n.offset().left;return Math.floor(t-i)},n.prototype.getViewMode=function(){var n=window.innerWidth-document.body.clientWidth;return this.visibleWidth<this.smallBreakpoint-n?3:this.visibleWidth<this.mediumBreakpoint-n?2:1},n}();n.ViewPortInformationService=t})(t=n.HomepageCarousel||(n.HomepageCarousel={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(viewPortInformationService){this.liveSlideClass="live-slide";this.viewPortInfo=viewPortInformationService}return n.prototype.init=function(n){this.markSlideAsLive(n,n.slides.first());this.fitToPage(n)},n.prototype.fitToPage=function(n){this.setSlideWidth(n);this.fillWithSlides(n);this.balanceSlidesAroundLiveSlide(n);this.fitContainerToSlides(n);this.positionLiveSlide(n)},n.prototype.moveLastSlideToStart=function(n){var t=this.getAllSlides(n).last().detach();n.container.width((n.slideCount-1)*this.viewPortInfo.slideWidth);n.container.css({right:this.viewPortInfo.visibleWidth-(n.container.offset().left+n.container.width()),left:"auto"});t.prependTo(n.container);this.fitContainerToSlides(n);n.container.css({left:n.container.offset().left,right:"auto"})},n.prototype.moveFirstSlideToEnd=function(n){n.container.css({right:this.viewPortInfo.visibleWidth-(n.container.offset().left+n.container.width()),left:"auto"});var t=this.getAllSlides(n).first().detach();n.container.width((n.slideCount-1)*this.viewPortInfo.slideWidth);n.container.css({left:n.container.offset().left,right:"auto"});this.fitContainerToSlides(n);t.appendTo(n.container)},n.prototype.markSlideAsLive=function(n,t){this.getAllSlides(n).removeClass(this.liveSlideClass);n.liveSlide=t;n.liveSlide.addClass(this.liveSlideClass)},n.prototype.setSlideWidth=function(n){switch(this.viewPortInfo.viewMode){case 2:this.getAllSlides(n).css({width:(this.viewPortInfo.visibleWidth-this.viewPortInfo.slideMargin)/2});break;case 3:this.getAllSlides(n).css({width:this.viewPortInfo.visibleWidth});break;default:this.getAllSlides(n).css({width:""})}this.viewPortInfo.refresh(n)},n.prototype.fillWithSlides=function(n){var t=Math.ceil(this.viewPortInfo.visibleWidth/this.viewPortInfo.slideWidth)+6,i,r;n.slideCount<t&&(i=t-n.slides.length,r=Math.ceil(i/n.slides.length),this.duplicateSlideSet(n,r))},n.prototype.balanceSlidesAroundLiveSlide=function(n){var t=Math.floor(n.slideCount/2);n.liveSlide.index()!==t&&(n.liveSlide.index()<t?this.getAllSlides(n).last().detach().prependTo(n.container):n.liveSlide.index()>t&&this.getAllSlides(n).first().detach().appendTo(n.container),this.balanceSlidesAroundLiveSlide(n))},n.prototype.fitContainerToSlides=function(n){n.container.width(n.slideCount*this.viewPortInfo.slideWidth)},n.prototype.positionLiveSlide=function(n){n.container.css({left:0});var t=this.viewPortInfo.viewMode==1?this.calculateCenteredPosition(n):this.calculatePinnedLeftPosition(n);n.container.css({left:t+"px"})},n.prototype.calculateCenteredPosition=function(n){return this.viewPortInfo.calculateCentreOffset(n.liveSlide)},n.prototype.calculatePinnedLeftPosition=function(n){return-n.liveSlide.offset().left},n.prototype.duplicateSlideSet=function(n,t){for(var r,u=n.container.children(),i=0;i<t;i++)r=u.clone(!0,!0).removeClass(this.liveSlideClass),i%2==0?n.container.prepend(r):n.container.append(r),n.slideCount+=u.length},n.prototype.getAllSlides=function(n){return n.container.find(".carousel-slide")},n}();n.SlideManagementService=t})(t=n.HomepageCarousel||(n.HomepageCarousel={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(viewPortInformationService,slideManagementService){this.slideAnimationDuration=.295;this.sliding=!1;this.slideQueue=[];this.viewPortInfo=viewPortInformationService;this.slideManager=slideManagementService}return n.prototype.init=function(n){this.setCurrentPositionOfLeftEdge(n)},n.prototype.slideLeft=function(n){this.slide(n,0)},n.prototype.snapBack=function(n){this.slide(n,1)},n.prototype.slideRight=function(n){this.slide(n,2)},n.prototype.drag=function(n,t){this.draggedPosition||(this.draggedPosition=n.container.offset().left);n.container.css({left:this.draggedPosition+t});this.draggedPosition+=t},n.prototype.endDrag=function(){this.draggedPosition=null},n.prototype.reset=function(n){this.setCurrentPositionOfLeftEdge(n)},n.prototype.clearQueue=function(){this.slideQueue=[]},n.prototype.slide=function(n,t){this.sliding?this.slideQueue.push(t):this.animateSlide(n,t)},n.prototype.animateSlide=function(n,t){var i=this;this.sliding=!0;TweenLite.to(n.container,this.slideAnimationDuration,{css:{left:this.getTargetPositionOfLeftEdge(n,t)},onComplete:function(){i.slideCompleteCallback(n,t);i.setCurrentPositionOfLeftEdge(n);i.sliding=!1;i.slideQueue.length>0&&i.animateSlide(n,i.slideQueue.shift())}})},n.prototype.getTargetPositionOfLeftEdge=function(n,t){switch(t){case 0:return this.currentPosition+this.viewPortInfo.slideWidth;case 1:return this.currentPosition;case 2:return this.currentPosition-this.viewPortInfo.slideWidth;default:return this.currentPosition}},n.prototype.setCurrentPositionOfLeftEdge=function(n){this.currentPosition=n.container.offset().left},n.prototype.slideCompleteCallback=function(n,t){switch(t){case 0:this.slideManager.markSlideAsLive(n,n.liveSlide.prev());this.slideManager.moveLastSlideToStart(n);break;case 2:this.slideManager.markSlideAsLive(n,n.liveSlide.next());this.slideManager.moveFirstSlideToEnd(n)}},n}();n.SlideAnimationService=t})(t=n.HomepageCarousel||(n.HomepageCarousel={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(slideAnimationService){this.running=!1;this.animationService=slideAnimationService}return n.prototype.init=function(n){n.autoPlaySpeed!==null&&n.autoPlaySpeed>0&&(this.enabled=!0,this.delayDuration=n.autoPlaySpeed,this.start(n))},n.prototype.start=function(n){var t=this;this.enabled&&!this.running&&(this.running=!0,this.intervalId=setInterval(function(){t.animationService.slideRight(n)},this.delayDuration))},n.prototype.stop=function(){this.enabled&&(this.running=!1,clearInterval(this.intervalId))},n.prototype.reset=function(n){this.stop();this.start(n)},n}();n.AutoPlayService=t})(t=n.HomepageCarousel||(n.HomepageCarousel={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n){this.autoPlaySpeed=0;this.container=n.find(".carousel-container");this.slides=n.find(".carousel-slide");this.liveSlide=this.slides.first();this.slideCount=this.slides.length;this.autoPlaySpeed=parseInt(n.data("autoplay"))}return n}();n.HomepageCarouselModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Components.TouchMovement,r=function(){function n(viewPortInformationService,slideManagementService,slideAnimationService,autoPlayService,carouselScrollingEvent){this.swipeThreshold=20;this.slideThreshold=50;this.viewPortInfo=viewPortInformationService;this.slideManager=slideManagementService;this.slideAnimator=slideAnimationService;this.autoPlay=autoPlayService;this.scrollEvent=carouselScrollingEvent}return n.prototype.bind=function(n){this.carouselModel=n;this.refitCarouselOnPageResize();this.pauseCarouselOnLossOfFocusOnWindow();this.slideLeftOnLeftClick();this.slideRightOnRightClick();this.bindTouchStart();this.bindTouchMove();this.bindTouchEnd()},n.prototype.refitCarouselOnPageResize=function(){var n=this;$(window).on("resize",function(){n.viewPortInfo.refresh(n.carouselModel);n.slideManager.fitToPage(n.carouselModel);n.slideAnimator.reset(n.carouselModel);n.autoPlay.reset(n.carouselModel)})},n.prototype.pauseCarouselOnLossOfFocusOnWindow=function(){var n=this;$(window).focus(function(){n.slideAnimator.clearQueue();n.autoPlay.start(n.carouselModel)}).blur(function(){n.autoPlay.stop()})},n.prototype.slideLeftOnLeftClick=function(){var n=this;$(".carousel-control-left").on("click",function(){n.slideAnimator.slideLeft(n.carouselModel);n.autoPlay.reset(n.carouselModel)})},n.prototype.slideRightOnRightClick=function(){var n=this;$(".carousel-control-right").on("click",function(){n.slideAnimator.slideRight(n.carouselModel);n.autoPlay.reset(n.carouselModel)})},n.prototype.bindTouchStart=function(){var n=this;this.carouselModel.container.on("touchstart",function(t){t.stopPropagation();n.scrollEvent.emitEvent(1);n.autoPlay.stop();n.currentTouchMovement=new i(t)})},n.prototype.bindTouchMove=function(){var n=this;this.carouselModel.container.on("touchmove",function(t){if(t.stopPropagation(),n.currentTouchMovement){if(n.currentTouchMovement.update(t),n.setScrollDirection(),n.scrollDirection==null)return;n.scrollDirection==1&&n.unbindTouchMove();t.preventDefault();n.scrollEvent.emitEvent(0);n.drag(n.currentTouchMovement.distanceMoved())}})},n.prototype.unbindTouchMove=function(){this.carouselModel.container.off("touchmove")},n.prototype.bindTouchEnd=function(){var n=this;this.carouselModel.container.on("touchend touchcancel",function(t){t.stopPropagation();n.currentTouchMovement.stopMovement();n.scrollDirection==0?n.slide(n.currentTouchMovement.distanceFromOrigin()):n.bindTouchMove();n.scrollDirection=null;n.autoPlay.start(n.carouselModel);n.slideAnimator.endDrag()})},n.prototype.drag=function(n){isNaN(n)||n==0||this.slideAnimator.drag(this.carouselModel,n)},n.prototype.slide=function(n){isNaN(n)||Math.abs(n)<this.slideThreshold?this.slideAnimator.snapBack(this.carouselModel):n<0?this.slideAnimator.slideRight(this.carouselModel):this.slideAnimator.slideLeft(this.carouselModel)},n.prototype.setScrollDirection=function(){this.scrollDirection==null&&(this.scrollDirection=this.currentTouchMovement.getDirection(this.swipeThreshold,this.swipeThreshold))},n}();t.UserInteractionService=r})(i=t.HomepageCarousel||(t.HomepageCarousel={}))})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(viewPortInformationService,slideManagementService,slideAnimationService,autoPlayService,userInteractionService,dataComponentInitializerCompleteEvent){this.viewPortInfo=viewPortInformationService;this.slideManager=slideManagementService;this.slideAnimator=slideAnimationService;this.autoPlay=autoPlayService;this.userInerteractions=userInteractionService;this.dataComponentInitializerCompleteEvent=dataComponentInitializerCompleteEvent}return t.prototype.init=function(t){var i=this;if(t!=null){if(this.carousel=new n.Models.HomepageCarouselModel($(t)),this.carousel.slides.length<1)return;this.viewPortInfo.refresh(this.carousel);this.dataComponentInitializerCompleteEvent.onEvent(function(){i.slideManager.init(i.carousel);i.slideAnimator.init(i.carousel);i.autoPlay.init(i.carousel);i.userInerteractions.bind(i.carousel)})}},t}();t.HomepageCarousel=i})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function t(gameLaunchService){this.normalSpeed=300;this.startOffset=0;this.gameLaunchService=gameLaunchService}return t.prototype.init=function(n){var t=this;if(n!=null){this.container=$(n);this.setup(n);this.container.on("filteredSliderChanged",function(){t.setup(n)})}},t.prototype.setup=function(){var t=this;if(this.slider=this.container.find(".slider-container"),this.wrapper=this.slider.parent(".slider-inner-wrapper"),this.resetSliderStyles(),Modernizr.touchevents)$(window).on("orientationchange",function(){var n=t.slider.css("display");t.slider.css("display","none");t.slider.get(0).offsetHeight;t.slider.css("display",n)});this.container.find(".game-pod").css("background-image",'url("'+this.container.data("placeholder")+'")');this.lazyLoader=new Blazy({container:".slider-container",src:"data-lazy",selector:".slider-item-image",offset:1e3});this.slideController=new n.SlideController(this.slider,this.lazyLoader);this.startOffset=this.getCurrentSliderPosition();this.setupMouseEventHandlers();this.setupClickEventHandlers();Modernizr.touchevents||$(window).resize(function(){setTimeout(function(){t.getCurrentSliderPosition()<t.getMaxLeftPosition()?t.getSliderContentsWidth()<t.getVisibleWidth()?t.setCurrentSliderLeftPosition(t.startOffset):t.setCurrentSliderRightPosition(t.startOffset):t.getCurrentSliderPosition()>t.startOffset&&t.setCurrentSliderLeftPosition(t.startOffset);t.lazyLoader&&t.lazyLoader.revalidate()},100)})},t.prototype.setupMouseEventHandlers=function(){var n=this;this.container.on("mouseover",".slider-control-left",function(){n.slideController.start({autoPlay:0,currentPosition:n.getCurrentSliderPosition(),targetPosition:n.startOffset,speed:n.normalSpeed,bounceAmount:20})});this.container.on("mouseover",".slider-control-right",function(){n.slideController.start({autoPlay:0,currentPosition:n.getCurrentSliderPosition(),targetPosition:n.getMaxLeftPosition(),speed:n.normalSpeed,bounceAmount:20})});this.container.on("mouseout",".slider-control-left, .slider-control-right",function(){n.slideController.stop()})},t.prototype.setupClickEventHandlers=function(){var n=this;this.container.on("click",".slider-control-left, .slider-control-right",function(){var t=Math.min(n.getVisibleWidth()/(n.normalSpeed*4),1);n.slideController.boost(t)});this.container.on("click",".slider-item-wrapper",function(t){if(t.preventDefault(),$(t.currentTarget).hasClass("clicked")||!Modernizr.touchevents){var i=$(t.currentTarget).find(".slider-item-content").attr("data-gametoken");n.gameLaunchService.launchGame(i)}else setTimeout(function(){$(".slider-item-wrapper.clicked").removeClass("clicked");$(t.currentTarget).addClass("clicked")},200)})},t.prototype.getVisibleWidth=function(){return this.wrapper.width()},t.prototype.getSliderContentsWidth=function(){return this.setCurrentSliderLeftPosition(this.getCurrentSliderPosition()),this.slider.width()},t.prototype.getMaxLeftPosition=function(){return Math.min(this.getVisibleWidth()-this.getSliderContentsWidth(),this.startOffset)},t.prototype.getCurrentSliderPosition=function(){return this.slider.position().left},t.prototype.setCurrentSliderLeftPosition=function(n){this.slider.css({left:n,right:"auto"})},t.prototype.setCurrentSliderRightPosition=function(n){this.slider.css({right:n,left:"auto"})},t.prototype.resetSliderStyles=function(){this.slider.removeAttr("style")},t}();n.HomepageSlider=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=function(){function t(dataComponentInitializerCompleteEvent){this.gameGridLoaded=!1;this.receiveDataComponentInitializerCompleteEvent=dataComponentInitializerCompleteEvent}return t.prototype.init=function(n){var t=this;if(n!=null)this.receiveDataComponentInitializerCompleteEvent.onEvent(function(){t.setupJackpots()})},t.prototype.setupJackpots=function(){this.pageAttributes=n.cmsCore.getPageAttributes($);this.formatter=new n.cmsCore.jackpots.Formatter(this.pageAttributes);n.cmsCore.jackpots.start($);this.registerEventHandlers();this.resetAmounts()},t.prototype.registerEventHandlers=function(){var n=this;$(document).on("filteredSliderChanged",function(){n.syncAmounts()});$(document).on("gameGridLoaded",function(){n.gameGridLoaded=!0;n.resetAmounts()})},t.prototype.resetAmounts=function(){var t;if(this.jackpotPods=$(".PodJackpot"),n.cmsCore.jackpots.initialData)for(t=0;t<this.jackpotPods.length;t++){var r=$(this.jackpotPods[t]),u=r.data("gameid"),i=this.getJackpotDataForGame(u);i!=null&&this.updateJackpotOverlay(r,i.I,i.S)}},t.prototype.syncAmounts=function(){var t,u,f;if(this.jackpotPods=$(".PodJackpot"),n.cmsCore.jackpots.initialData)for(t=0;t<this.jackpotPods.length;t++){var i=$(this.jackpotPods[t]),e=i.data("gameid"),o=i.data("active"),r=this.getJackpotDataForGame(e);r!=null&&(u=r.I,o||(f=this.jackpotPods.filter('[data-gameid="'+e+'"][data-active="true"]'),f.length>0&&(u=f.first().data("amount"))),this.updateJackpotOverlay(i,u,r.S))}},t.prototype.getJackpotDataForGame=function(t){for(var r=n.cmsCore.jackpots.initialData,i=0;i<r.length;i++)if(r[i].R==t)return r[i];return null},t.prototype.updateJackpotOverlay=function(n,t,i){n.attr("data-active","true");n.attr("data-amount",t);n.attr("data-step",i);n.text(this.formatter.format(t));n.show()},t}();t.JackpotManager=i})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(buttonService){this.buttonService=buttonService}return n.prototype.init=function(n){n!=null&&(this.button=$(".promotion-back-button a",n),this.setup($(n)))},n.prototype.setup=function(n){$("body").addClass("promotion-page");this.buttonService.setButtonTouchEvents(this.button);this.buttonService.setButtonHoverEvents(this.button);n.clone(!0,!0).appendTo(".divSubHeaderWrapper");n.remove()},n}();n.PromotionBackButton=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(buttonService){this.buttonService=buttonService}return n.prototype.init=function(n){n!=null&&(this.buttons=$("a",n),this.buttonService.setButtonTouchEvents(this.buttons),this.buttonService.setButtonHoverEvents(this.buttons));this.browserSupportsGreyscaleFilter()||$(".ExpiredRow img").each(function(){var i=$(this).parent(),n=document.createElement("div"),t;n.className="greyscale-overlay-container";i.append(n);$(this).appendTo(n);t=document.createElement("div");t.className="greyscale-overlay";$(n).append(t)})},n.prototype.browserSupportsGreyscaleFilter=function(){var n=document.createElement("div");return(n.style.cssText="filter: grayscale(100%)",n.style.length>0)?!0:(n.style.cssText="-webkit-filter: grayscale(100%)",n.style.length>0)?!0:document.documentMode!==undefined&&document.documentMode<10?!0:!1},n}();n.PromotionPage=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k){b===void 0&&(b=!1);k===void 0&&(k=!1);this.offerTitle=n;this.offerDescription=t;this.offerNumberTitle=i;this.offerRemainingNumber=r;this.offerProgressValue=u;this.offerProgressTitle=f;this.offerExpireTitle=e;this.offerTAndCInfo=o;this.offerTAndC=s;this.cancelOfferActionText=h;this.offerClaimNowButton=c;this.offerCompletedImage=l;this.offerCompletedTitle=a;this.offerCompletedDescription=v;this.promotionType=y;this.promoToken=p;this.noOfferText=w;this.offerExpired=b;this.offerCompleted=k}return n}();n.MyOffer=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(t){"use strict";var i=function(){function t(myOffersTabDataEvent){this.getMyOffersDataUrl="/UserProm/GetUserPromotions";this.claimOfferEndpoint="/UserProm/Claim";this.cancelOfferEndpoint="/UserProm/Cancel";this.myOffersTabDataEvent=myOffersTabDataEvent}return t.prototype.getMyOffers=function(){var n=this;this.myOffers=[];$.ajax({dataType:"json",url:this.getMyOffersDataUrl,type:"GET",cache:!1}).done(function(t){n.processResponse(t);n.myOffersTabDataEvent.emitEvent(n.myOffers)}).fail(function(){n.myOffersTabDataEvent.emitEvent(n.myOffers)})},t.prototype.claimOffer=function(n,t,i){$.ajax({data:{promotionToken:n,promotionType:t},type:"POST",url:this.claimOfferEndpoint,success:function(){i&&i()}})},t.prototype.cancelOffer=function(n,t){var i=this;$.ajax({data:{promotionToken:n},type:"POST",url:this.cancelOfferEndpoint,success:function(){t&&t();i.getMyOffers()}})},t.prototype.processResponse=function(t){var r,u;if(t.uo.length)for(r=0,u=t.uo;r<u.length;r++){var i=u[r],e=new Date(i.edt),f=(new Date).getTime()>e.getTime(),o=i.wpv===100,s=i.cbt!=null,h=f?t.oedt:o?t.ocdt:s?i.ncdt:i.dt,c=f?t.odt:t.ost;this.myOffers.push(new n.Models.MyOffer(i.t,h,i.intt,i.prsc!==i.ipn?i.prsc:i.ipn,i.wpv+"%",i.wpt,c+" "+this.formatDate(e),i.otci,i.tcl,t.coat,i.cbt,t.oci,t.oct,t.ocdt,i.pty,i.pto,null,f,o))}else this.myOffers.push(new n.Models.MyOffer(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,t.nom,null,null))},t.prototype.formatDate=function(n){var t=(n.getMinutes()<10?"0":"")+n.getMinutes(),i=(n.getHours()<10?"0":"")+n.getHours();return n.getDate()+" "+["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n.getMonth()]+" "+i+":"+t},t}();t.MyOffersService=i})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.MyOffersTabDataEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.HeaderDropDownMenuEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(myOffersService,myOffersTabDataEvent,headerDropDownMenuEvent,cancelOfferModalEvent){this.newOfferClassName="new-offer";this.claimedOfferClassName="claimed-offer";this.noOfferClassName="no-offer";this.expiredOfferClassName="expired-offer";this.completedOfferClassName="completed-offer";this.cancelOfferActionLinkClass="offer-cancel-offer";this.largeDropDownHeaderMenuComponentName="LargeDropDownHeaderMenu";this.mobileHeaderSlideMenuComponentName="MobileHeaderSlideMenu";this.fullProgressAnimationTime=400;this.mobileToDesktopResolution=1100;this.initialized=!1;this.myOffersService=myOffersService;this.myOffersTabDataEvent=myOffersTabDataEvent;this.headerDropDownMenuEvent=headerDropDownMenuEvent;this.cancelOfferModalEvent=cancelOfferModalEvent}return n.prototype.init=function(n){if(n!=null&&!this.initialized){this.myOffersTab=this.getMyOffersTabInVisibleHeader();this.noOfferTextElement=this.myOffersTab.find(".no-offer-text");var t=this.myOffersTab.find("#my-offers-tab-template");this.compiledTemplate=Handlebars.compile(t.html());this.handleMyOffersTabEvents();this.myOffersService.getMyOffers();this.initialized=!0}},n.prototype.getMyOffersTabInVisibleHeader=function(){return this.isDesktopProductVersion()?$("[data-component-type="+this.largeDropDownHeaderMenuComponentName+"]").find("[data-component-type=MyOffersTab]"):$("[data-component-type="+this.mobileHeaderSlideMenuComponentName+"]").find("[data-component-type=MyOffersTab]")},n.prototype.isDesktopProductVersion=function(){var n=$(window).width();return n>=this.mobileToDesktopResolution},n.prototype.handleMyOffersTabEvents=function(){var n=this;this.myOffersTabDataEvent.onEvent(function(t){n.myOffersTab.css({height:""});n.myOffersTab.removeClass(n.noOfferClassName);n.noOfferTextElement.text("");n.handleMyOffersTabReceiveDataEvent(t);n.triggerWageringProgressAnimation()});this.headerDropDownMenuEvent.onEvent(function(t){t===1&&(n.myOffersTab.css({height:n.myOffersTab.height()+"px"}),n.myOffersTab.removeClass(n.noOfferClassName),n.noOfferTextElement.text(""),n.myOffersTab.find(".offer-container").remove(),n.myOffersService.getMyOffers())})},n.prototype.handleCancelOfferActionLink=function(n,t){var i=this;n.click(function(){i.cancelOfferModalEvent.emitEvent(t)})},n.prototype.triggerWageringProgressAnimation=function(){var n=this;this.myOffersTab.find(".wagering-progress-circle-container").each(function(t,i){var e=$(i),u=parseInt(e.find(".wagering-progress-inner-cycle").text()),r,f;e.is(":visible")&&!isNaN(u)&&u>0&&(r=e.find(".wagering-progress-right .wagering-progress-bar"),f=e.find(".wagering-progress-left .wagering-progress-bar"),r.css("transition-duration","0ms"),f.css("transition-duration","0ms"),r.css("transform","rotate(-180deg)"),f.css("transform","rotate(0deg)"),setTimeout(function(){var i,e;if(u<=50)i=Math.floor(180/100*u*2)-180,e=n.fullProgressAnimationTime,r.css("transition-duration",e+"ms"),r.css("transition-timing-function","ease"),r.css("transform","rotate("+i+"deg)");else{var o=Math.floor(180/100*(u-50))*2,t=Math.floor(50/u*n.fullProgressAnimationTime),s=Math.floor(n.fullProgressAnimationTime-t);r.css("transition-duration",t+"ms");f.css("transition-duration",s+"ms");r.css("transform","rotate(0deg)");setTimeout(function(){f.css("transform","rotate("+o+"deg)")},t)}},100))})},n.prototype.handleMyOffersTabReceiveDataEvent=function(n){var t=this;this.myOffersTab.find(".offer-container").remove();$(n).each(function(n,i){var r=$($.parseHTML(t.compiledTemplate(i))[1]),u,f;t.myOffersTab.append(r);i.noOfferText?(t.myOffersTab.addClass(t.noOfferClassName),t.noOfferTextElement.text(i.noOfferText)):i.offerCompleted?r.addClass(t.completedOfferClassName):i.offerExpired?r.addClass(t.expiredOfferClassName):i.offerClaimNowButton?(r.addClass(t.newOfferClassName),u=r.find(".offer-button-claim-now"),u.click(function(){t.myOffersService.claimOffer(i.promoToken,i.promotionType,function(){t.myOffersService.getMyOffers()})})):(r.addClass(t.claimedOfferClassName),f=r.find("."+t.cancelOfferActionLinkClass),t.handleCancelOfferActionLink(f,i.promoToken))});this.myOffersTab.find(".offer-container").addClass("show")},n}();n.MyOffersTab=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(modalService,realityCheckDecisionEvent,setupScrollBarEvent){this.priority=10050;this.scrollBarClass="scrollbar";this.loadingSpinnerSelector=".cssSpinner";this.checkForPromotionParameter="checkForPromotion";this.acceptPromotionUrl="/UserProm/Claim";this.rejectPromotionUrl="/UserProm/Reject";this.modalService=modalService;this.realityCheckDecisionEvent=realityCheckDecisionEvent;this.sendSetupScrollBarEvent=setupScrollBarEvent}return n.prototype.init=function(n){var t=this;n!=null&&(this.promotionsModal=$(n),this.termsAndConditionsContainer=this.promotionsModal.find(".t-and-c-container"),this.termsAndConditionsTitleContainer=this.promotionsModal.find(".t-and-c-title"),this.htmlElement=$("html"),this.setupPromotionsModal(),this.showPromotionsModal(),setTimeout(function(){t.setupScrollingBehaviour()},200))},n.prototype.toggleTermsAndConditions=function(){this.termsAndConditionsContainer.hasClass("closed")?(this.promotionsModal.removeClass("closed-t-and-c"),this.termsAndConditionsContainer.removeClass("closed"),this.setupHtmlScrollTop()):(this.promotionsModal.addClass("closed-t-and-c"),this.termsAndConditionsContainer.addClass("closed"));this.setupScrollingBehaviour()},n.prototype.showPromotionsModal=function(){$(".modals").append(this.promotionsModal);this.modalService.showModal(new i(this.promotionsModal,this.priority,2,!1,!0))},n.prototype.setupPromotionsModal=function(){var n=this;this.response={};this.response.promotionToken=this.promotionsModal.data("promo-token");this.response.promotionType=parseInt(this.promotionsModal.data("promo-type"));this.actionButton=this.promotionsModal.find(".promotions-modal-action-button");this.rejectButton=this.promotionsModal.find(".promotions-modal-reject-button");this.closeButton=this.promotionsModal.find(".promotions-modal-close-button");this.bindEvents();this.sendSetupScrollBarEvent.emitEvent();this.termsAndConditionsTitleContainer.on("click",function(){n.toggleTermsAndConditions()});this.realityCheckDecisionEvent.onEvent(function(){n.setupHtmlScrollTop();n.setupScrollingBehaviour()})},n.prototype.setupScrollingBehaviour=function(){var n,t,i;this.modalHeight=this.promotionsModal.outerHeight();this.viewPortHeight=$(window).height();n=this.promotionsModal.offset().top;(this.modalHeight>this.viewPortHeight||this.modalHeight+n>document.body.offsetHeight)&&(t=44,i=n+this.modalHeight+t,$(document.body).css({height:i+"px"}))},n.prototype.setupHtmlScrollTop=function(){var t;if(Modernizr.touchevents){this.clearBodyCss();this.initialHtmlScrollTop=this.htmlElement.scrollTop();var n=this.promotionsModal.offset().top,i=n+this.modalHeight-(this.initialHtmlScrollTop+this.viewPortHeight),r=n<this.initialHtmlScrollTop;i>-20&&(t=r?this.initialHtmlScrollTop+100:n,this.htmlElement.scrollTop(t))}},n.prototype.clearBodyCss=function(){$(document.body).css({height:""})},n.prototype.bindEvents=function(){var n=this;this.actionButton.on("click",function(){n.actionButton.find(n.loadingSpinnerSelector).removeClass("hidden");n.processResponse(!0,n.response,n.closeModal)});this.rejectButton.on("click",function(){n.rejectButton.find(n.loadingSpinnerSelector).removeClass("hidden");n.processResponse(!1,n.response,n.closeModal)});this.closeButton.on("click",function(){n.closeModal();n.setPromotionCheckedUrlFlag()})},n.prototype.closeModal=function(n){n=n?n:this;n.modalService.hideModal();n.clearBodyCss()},n.prototype.setPromotionCheckedUrlFlag=function(){var n=this.checkForPromotionParameter+"=false";window.location.href=this.updateUrlQuerystring(n)},n.prototype.processResponse=function(n,t,i){var u=this,r;switch(n){case!0:r=this.acceptPromotionUrl;break;case!1:r=this.rejectPromotionUrl;break;default:r="/"}$.ajax({data:t,type:"POST",url:r,success:function(){i&&i(u);u.setPromotionCheckedUrlFlag()}})},n.prototype.updateUrlQuerystring=function(n){var t;return t=window.location.search.length>0?[window.location.search,"&",n].join(""):["?",n].join(""),[window.location.protocol,"//",window.location.host,window.location.pathname,t].join("")},n}();t.PromotionsModal=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n.call(this)||this}return __extends(t,n),t}(n.EventHandler);n.CancelOfferModalEvent=t})(t=n.Events||(n.Events={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(cancelOfferModalEvent,myOffersService,modalService){this.priority=30;this.receiveCancelOfferModalEvent=cancelOfferModalEvent;this.myOffersService=myOffersService;this.modalService=modalService}return n.prototype.init=function(n){n!=null&&(this.cancelOfferModalContainer=$(n),this.cancelOfferModal=this.cancelOfferModalContainer.find(".cancel-offer-modal"),this.closeIcon=this.cancelOfferModalContainer.find(".cancel-offer-modal__close-icon"),this.cancelOfferButton=this.cancelOfferModalContainer.find(".cancel-offer-modal__button-text"),this.setupEvents(),this.setupClickEvents())},n.prototype.setupEvents=function(){var n=this;this.receiveCancelOfferModalEvent.onEvent(function(t){n.showCancelOfferModal(t)})},n.prototype.setupClickEvents=function(){var n=this;this.closeIcon.click(function(){return n.modalService.hideModal()});this.cancelOfferButton.click(function(){return n.cancelOffer()})},n.prototype.cancelOffer=function(){this.myOffersService.cancelOffer(this.promotionToken);this.modalService.hideModal()},n.prototype.showCancelOfferModal=function(n){this.promotionToken=n;var t=new i(this.cancelOfferModal,this.priority,2,!1);this.modalService.showModal(t)},n}();t.CancelOfferModal=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.timesClosed=n;this.sessionCount=t}return n}();n.MobileSmartPanelLocalData=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.showThisSession=n;this.sessionStart=t}return n}();n.MobileSmartPanelSessionData=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(localStorageService){this.millisecondsIn24Hours=864e5;this.localStorageService=localStorageService}return n.prototype.init=function(n){var t=this,i;if(n!=null){if(!this.localStorageService.supportForLocalStorage())return;i=$(n);this.readConfig();this.readData();this.smartPanelData.sessionCount>=this.hiddenSessionsUntilReshown&&(this.smartPanelData.timesClosed=0);this.smartPanelSessionData.showThisSession&&this.smartPanelData.timesClosed<this.hiddenAfterUserCloses&&(i.show(),this.smartPanelData.sessionCount=0,$(".smart-panel .close-button").click(function(){i.hide();t.smartPanelData.timesClosed++;t.smartPanelData.sessionCount=0;t.smartPanelSessionData.showThisSession=!1;t.storeData();event.preventDefault()}));this.storeData()}},n.prototype.readData=function(){this.smartPanelData=this.localStorageService.getData(6)||{timesClosed:0,sessionCount:0};this.smartPanelSessionData=this.localStorageService.getSessionData(6);(!this.smartPanelSessionData||this.smartPanelSessionData.sessionStart+this.millisecondsIn24Hours<Date.now())&&(this.smartPanelSessionData={showThisSession:!0,sessionStart:Date.now()},this.smartPanelData.sessionCount++)},n.prototype.storeData=function(){this.localStorageService.setData(6,this.smartPanelData);this.localStorageService.setSessionData(6,this.smartPanelSessionData)},n.prototype.readConfig=function(){var n=$("body").data("pageAttributes");this.hiddenAfterUserCloses=n.hiddenAfterUserCloses;this.hiddenSessionsUntilReshown=n.hiddenSessionsUntilReshown},n}();n.MobileSmartPanel=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(t){"use strict";var i=n.Games.Models.Modal,r=function(){function n(modalService,membersNotificationsMessagingService,gamesSettingsService,membersNotificationsLoadedEvent,membersNotificationsCompletedEvent,pageContextService,postMessageBrokerService,navMembersProcessedEvent,queryStringService){this.priority=35;this.modalService=modalService;this.gamesSettingsService=gamesSettingsService;this.membersNotificationsMessagingService=membersNotificationsMessagingService;this.receiveMembersNotificationsLoadedEvent=membersNotificationsLoadedEvent;this.receiveMembersNotificationsCompletedEvent=membersNotificationsCompletedEvent;this.pageContextService=pageContextService;this.postMessageBrokerService=postMessageBrokerService;this.navMembersProcessedEvent=navMembersProcessedEvent;this.queryStringService=queryStringService}return n.prototype.init=function(n){if(n){this.iframe=$(n);this.gamesSettings=this.gamesSettingsService.getGameSettings();var t=this.isLegacy();this.userHasPermissions=this.iframe.data("user-has-permissions").toString().toLowerCase()==="true";this.modalService.showModal(new i(this.iframe,this.priority,2,!1,!0,0,!1,t,function(){}));this.membersNotificationsMessagingService.setupMessagingService();this.setupMembersNotificationsEvents()}},n.prototype.setupMembersNotificationsEvents=function(){var n=this,t="members-notifications-process";this.receiveMembersNotificationsLoadedEvent.onEvent(function(i){n.setupReceiveMembersNotificationsLoadedEvent(i);$("html").addClass(t);n.viewportUnitSupport(n.iframe)||(n.applyCoveringDimensions(n.iframe),n.setResizeEvents())});this.receiveMembersNotificationsCompletedEvent.onEvent(function(i){n.setupReceiveMembersNotificationsCompletedEvent(i);$("html").removeClass(t);n.viewportUnitSupport||n.removeResizeEvents()});this.navMembersProcessedEvent.onEvent(function(){n.modalService.hideModal(!0)})},n.prototype.setupReceiveMembersNotificationsLoadedEvent=function(n){var t=this.iframe[0].contentWindow;this.membersNotificationsMessagingService.postIFrameHosted(t,n.origin)},n.prototype.setupReceiveMembersNotificationsCompletedEvent=function(n){if(n.loginStateChanged==="1"||n.sessionTerminated==="1"){this.refreshPage();return}var t=this.pageContextService.getCurrentPage();this.isNotAllowedToPlay()?t===2?this.closePage():this.refreshPage(this.buildReturnPath()):t===0||t===2?this.refreshPage():this.modalService.hideModal()},n.prototype.buildReturnPath=function(){var n=this.gamesSettings.returnPath;return this.queryStringService.getQueryStringItemValue(window.location.href,"sl")!==""&&(n=this.queryStringService.updateQueryString("sl","1",n)),n},n.prototype.closePage=function(){window.close()},n.prototype.isNotAllowedToPlay=function(){return!this.userHasPermissions},n.prototype.refreshPage=function(n){n?window.location.href=n:window.location.reload()},n.prototype.isLegacy=function(){return $("html").is(".ie-8")},n.prototype.setResizeEvents=function(){var n=this;$(window).on("resize.viewport",function(){n.applyCoveringDimensions(n.iframe)})},n.prototype.removeResizeEvents=function(){$(window).off("resize.viewport")},n.prototype.viewportUnitSupport=function(n){var t=n[0],i=parseInt(window.getComputedStyle(t,null).getPropertyValue("width"),10),r=window.innerWidth;return i===r},n.prototype.applyCoveringDimensions=function(n){var t={width:window.innerWidth,height:window.innerHeight};n.css(t)},n}();t.MembersNotifications=r})(i=t.Components||(t.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(t){var i;(function(i){"use strict";var r=function(){function r(){this.componentOrder=["KeepMeLoggedIn","MembersFrame","KycSecondaryAuthMobile","MembersNotifications","MembersFrameLink","RealityCheckModal","MobileLoggedInOverlay","MobileSetPin","ResponsiveHeader"];this.container=n.Games.IoC.Container.bootstrap()}return r.initialize=function(){(new i.Initializer).init()},r.prototype.init=function(){this.registerComponentFactory();this.registerDataComponentsInitializer();this.registerServices();this.registerPageComponents();this.registerComponents();this.registerEvents();this.registerProcessors();this.instantiateComponents()},r.prototype.instantiateComponents=function(){for(var initialiseComponentService=this.container.resolve("initialiseComponentService"),i=this.container.resolve("dataComponentsInitializerService"),t=this.orderedPageComponents(),n=0;n<t.length;n++)initialiseComponentService.initialiseComponent(t[n].element,t[n].name);i.runDataComponentsInitializer()},r.prototype.orderedPageComponents=function(){var i=this,n=[];return $("[data-component-type]").each(function(u,f){var s=f.getAttribute("data-component-type"),o,e,h;if(s===undefined||s===null||r.trimString(s)==="")throw new Error("UI Component not specified please add an attribute data-component-type to the html element with a valid component name");for(o=r.trimString(s).split(" "),e=0;e<o.length;e++)h=i.componentOrder.indexOf(o[e]),h===-1?n.push(new t.Models.PageComponent(o[e],9999,f)):n.push(new t.Models.PageComponent(o[e],h,f))}),n.sort(function(n,t){return+n.order-+t.order})},r.prototype.registerComponentFactory=function(){this.container.register(i.Component.named("componentFactory").componentType(n.Games.Factories.ComponentFactory).withLifestyle(i.Lifestyle.Singleton))},r.prototype.registerProcessors=function(){this.container.register(i.Component.named("navMembersEventProcessor").componentType(n.Games.Processors.NavMembersEventProcessor).withLifestyle(i.Lifestyle.Singleton))},r.prototype.registerDataComponentsInitializer=function(){this.container.register(i.Component.named("dataComponentsInitializerService").componentType(n.Games.Services.DataComponentsInitializerService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("dataComponentInitializerCompleteEvent").componentType(n.Games.Events.DataComponentInitializerCompleteEvent).withLifestyle(i.Lifestyle.Singleton))},r.prototype.registerServices=function(){this.container.register(i.Component.named("logService").componentType(n.Games.Services.LogService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("viewPortInformationService").componentType(n.Games.Services.HomepageCarousel.ViewPortInformationService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("slideManagementService").componentType(n.Games.Services.HomepageCarousel.SlideManagementService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("slideAnimationService").componentType(n.Games.Services.HomepageCarousel.SlideAnimationService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("userInteractionService").componentType(n.Games.Services.HomepageCarousel.UserInteractionService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("autoPlayService").componentType(n.Games.Services.HomepageCarousel.AutoPlayService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("searchService").componentType(n.Games.Services.SearchService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("buttonService").componentType(n.Games.Services.ButtonService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("clientTechnologyService").componentType(n.Games.Services.ClientTechnologyService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("cookieService").componentType(n.Games.Services.CookieService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("gameLaunchPasService").componentType(n.Games.Services.GameLaunchPasService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("gameLaunchService").componentType(n.Games.Services.GameLaunchService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("modalService").componentType(n.Games.Services.ModalService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("loginService").componentType(n.Games.Services.LoginService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("corsService").componentType(n.Games.Services.CorsService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("gameService").componentType(n.Games.Services.GameService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("browserDetailsService").componentType(n.Games.Services.BrowserDetailsService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("deviceService").componentType(n.Games.Services.DeviceService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("gameRatingService").componentType(n.Games.Services.GameRatingService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("optInService").componentType(n.Games.Services.OptInService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("gamesSettingsService").componentType(n.Games.Services.GamesSettingsService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("queryStringService").componentType(n.Games.Services.QueryStringService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("requestBuilderService").componentType(n.Games.Services.GamePodLoader.RequestBuilderService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("sessionService").componentType(n.Games.Services.SessionService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("membersService").componentType(n.Games.Services.MembersService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("realityCheckTimerService").componentType(n.Games.Services.RealityCheckTimerService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("xdrService").componentType(n.Games.Services.XdrService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("initialiseComponentService").componentType(n.Games.Services.InitialiseComponentService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("microgamingRealityCheckStrategyFactory").componentType(n.Games.Services.MicrogamingRealityCheck.MicrogamingRealityCheckStrategyFactory).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("microgamingDesktopRealityCheckStrategy").componentType(n.Games.Services.MicrogamingRealityCheck.MicrogamingDesktopRealityCheckStrategy).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("microgamingMobileRealityCheckStrategy").componentType(n.Games.Services.MicrogamingRealityCheck.MicrogamingMobileRealityCheckStrategy).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("microgamingInGameInterfaceWrapper").componentType(n.Games.Services.MicrogamingRealityCheck.MicrogamingInGameInterfaceWrapper).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("quickDepositService").componentType(n.Games.Services.QuickDepositService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("localStorageService").componentType(n.Games.Services.LocalStorageService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("postMessageBrokerService").componentType(n.Games.Services.PostMessageBrokerService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("balanceService").componentType(n.Games.Services.BalanceService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("pageContextService").componentType(n.Games.Services.PageContextService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("authenticationService").componentType(n.Games.Services.AuthenticationService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("pinService").componentType(n.Games.Services.PinService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("userPreferenceService").componentType(n.Games.Services.UserPreferenceService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("membersNotificationsMessagingService").componentType(n.Games.Services.MembersNotificationsMessagingService).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("myOffersService").componentType(n.Games.Services.MyOffersService).withLifestyle(i.Lifestyle.Singleton))},r.prototype.registerPageComponents=function(){this.container.register(i.Component.named("PageComponent").componentType(n.Games.Components.Page).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("PlayPageComponent").componentType(n.Games.Components.PlayPage).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("PlayInWindowPageComponent").componentType(n.Games.Components.PlayInWindowPage).withLifestyle(i.Lifestyle.Singleton))},r.prototype.registerComponents=function(){this.container.register(i.Component.named("FilteredSliderFilterComponent").componentType(n.Games.Components.FilteredSliderFilter).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("GamePodGridComponent").componentType(n.Games.Components.GamePodGrid).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("GamePodLoaderComponent").componentType(n.Games.Components.GamePodLoader).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("GameRatingControlComponent").componentType(n.Games.Components.GameRatingControl).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("GamesPromoPodComponent").componentType(n.Games.Components.GamesPromoPod).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("HomepageCarouselComponent").componentType(n.Games.Components.HomepageCarousel).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("HomepageSliderComponent").componentType(n.Games.Components.HomepageSlider).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("JackpotManagerComponent").componentType(n.Games.Components.JackpotManager).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("PromotionBackButtonComponent").componentType(n.Games.Components.PromotionBackButton).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("PlayPageBackButtonComponent").componentType(n.Games.Components.PlayPageBackButton).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("PromotionPageComponent").componentType(n.Games.Components.PromotionPage).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("SearchBarComponent").componentType(n.Games.Components.SearchBar).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("SecondaryNavigationComponent").componentType(n.Games.Components.SecondaryNavigation).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("SideNavigationComponent").componentType(n.Games.Components.SideNavigation).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("RelatedGamesComponent").componentType(n.Games.Components.RelatedGames).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("KeepMeLoggedInComponent").componentType(n.Games.Components.KeepMeLoggedIn).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("SliderButtonComponent").componentType(n.Games.Components.SliderButton).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("CarouselGameSlideComponent").componentType(n.Games.Components.CarouselGameSlide).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("CarouselPromoSlideComponent").componentType(n.Games.Components.CarouselPromoSlide).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("LoginModalComponent").componentType(n.Games.Components.LoginModal).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("MobileLoggedInOverlayComponent").componentType(n.Games.Components.MobileLoggedInOverlay).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("ImportantAnnouncementModalComponent").componentType(n.Games.Components.ImportantAnnouncementModal).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("GameLaunchLinkComponent").componentType(n.Games.Components.GameLaunchLink).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("KycSecondaryAuthComponent").componentType(n.Games.Components.KycSecondaryAuth).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("KycSecondaryAuthMobileComponent").componentType(n.Games.Components.KycSecondaryAuthMobile).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("DesktopHeaderLoginComponent").componentType(n.Games.Components.DesktopHeaderLogin).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("MobileHeaderComponent").componentType(n.Games.Components.MobileHeader).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("MobileHeaderSlideMenuComponent").componentType(n.Games.Components.MobileHeaderSlideMenu).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("LogInToPlayComponent").componentType(n.Games.Components.LogInToPlay).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("OptInModalComponent").componentType(n.Games.Components.OptInModal).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("ThirdPartyCookieCheckModalComponent").componentType(n.Games.Components.ThirdPartyCookieCheckModal).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("NoFlashModalComponent").componentType(n.Games.Components.NoFlashModal).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("PromotionsModalComponent").componentType(n.Games.Components.PromotionsModal).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("MyOffersTabComponent").componentType(n.Games.Components.MyOffersTab).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("CancelOfferModalComponent").componentType(n.Games.Components.CancelOfferModal).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("KycSecondaryAuthPageReloaderComponent").componentType(n.Games.Components.KycSecondaryAuthPageReloader).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("RggdFailurePageReloaderComponent").componentType(n.Games.Components.RggdFailurePageReloader).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("RggdFailurePageCloserComponent").componentType(n.Games.Components.RggdFailurePageCloser).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("LandingPageNavigationComponent").componentType(n.Games.Components.LandingPageNavigation).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("LandingPageGamePodComponent").componentType(n.Games.Components.LandingPageGamePod).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("LandingPageJoinLinkComponent").componentType(n.Games.Components.LandingPageJoinLink).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("LandingPageLoginLinkComponent").componentType(n.Games.Components.LandingPageLoginLink).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("InactivityWarningComponent").componentType(n.Games.Components.InactivityWarning).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("LandingPageBannerComponent").componentType(n.Games.Components.LandingPageBanner).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("PasTermsAndConditionsButtonsComponent").componentType(n.Games.Components.PasTermsAndConditionsButtons).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("GamePodContainerComponent").componentType(n.Games.Components.GamePodContainer).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("RealityCheckModalComponent").componentType(n.Games.Components.RealityCheckModal).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("SagalaRealityCheckComponent").componentType(n.Games.Components.SagalaRealityCheck).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("MicrogamingRealityCheckComponent").componentType(n.Games.Components.MicrogamingRealityCheck).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("MobileHeaderQuickDepositComponent").componentType(n.Games.Components.MobileHeaderQuickDeposit).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("TopNavHintComponent").componentType(n.Games.Components.TopNavHint).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("MembersFrameComponent").componentType(n.Games.Components.MembersFrame).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("MembersFrameLinkComponent").componentType(n.Games.Components.MembersFrameLink).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("OverlayBannerModalComponent").componentType(n.Games.Components.OverlayBannerModal).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("PinAuthenticationComponent").componentType(n.Games.Components.PinAuthentication).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("MobileSetPinComponent").componentType(n.Games.Components.MobileSetPin).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("FlashCheckComponent").componentType(n.Games.Components.FlashCheck).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("ResponsiveHeaderComponent").componentType(n.Games.Components.ResponsiveHeader).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("ClockComponent").componentType(n.Games.Components.Clock).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("LargeDropDownHeaderMenuComponent").componentType(n.Games.Components.LargeDropDownHeaderMenu).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("ContainerScrollComponent").componentType(n.Games.Components.ContainerScroll).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("MobileSmartPanelComponent").componentType(n.Games.Components.MobileSmartPanel).withLifestyle(i.Lifestyle.Transient)).register(i.Component.named("MembersNotificationsComponent").componentType(n.Games.Components.MembersNotifications).withLifestyle(i.Lifestyle.Singleton))},r.prototype.registerEvents=function(){this.container.register(i.Component.named("failedLoginEvent").componentType(n.Games.Events.FailedLoginEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("loginEvent").componentType(n.Games.Events.LoginEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("failedOptInLoginEvent").componentType(n.Games.Events.FailedOptInLoginEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("thirdPartyCookieCheckEvent").componentType(n.Games.Events.ThirdPartyCookieCheckEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("failedLoginWithKycEvent").componentType(n.Games.Events.FailedLoginWithKycEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("carouselScrollingEvent").componentType(n.Games.Events.CarouselScrollingEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("realityCheckTimerEvent").componentType(n.Games.Events.RealityCheckTimerEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("realityCheckDueEvent").componentType(n.Games.Events.RealityCheckDueEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("realityCheckDecisionEvent").componentType(n.Games.Events.RealityCheckDecisionEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("realityCheckCoolOffAcknowledgedEvent").componentType(n.Games.Events.RealityCheckCoolOffAcknowledgedEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("balanceUpdateEvent").componentType(n.Games.Events.BalanceUpdateEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("toggleMenuEvent").componentType(n.Games.Events.ToggleMenuEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("toggleBalanceEvent").componentType(n.Games.Events.ToggleBalanceEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("headerDropDownMenuEvent").componentType(n.Games.Events.HeaderDropDownMenuEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("toggleProductNavigationEvent").componentType(n.Games.Events.ToggleProductNavigationEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("membersLoadInFrameEvent").componentType(n.Games.Events.MembersLoadInFrameEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("pinCreatedEvent").componentType(n.Games.Events.PinCreatedEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("pinCreatedFailedEvent").componentType(n.Games.Events.PinCreatedFailedEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("createPinEvent").componentType(n.Games.Events.CreatePinEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("authenticationNotAllowedEvent").componentType(n.Games.Events.AuthenticationNotAllowedEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("noPinSetEvent").componentType(n.Games.Events.NoPinSetEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("setupScrollBarEvent").componentType(n.Games.Events.SetupScrollBarEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("membersNotificationsLoadedEvent").componentType(n.Games.Events.MembersNotificationsLoadedEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("membersNotificationsCompletedEvent").componentType(n.Games.Events.MembersNotificationsCompletedEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("navMembersProcessedEvent").componentType(n.Games.Events.NavMembersProcessedEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("myOffersTabDataEvent").componentType(n.Games.Events.MyOffersTabDataEvent).withLifestyle(i.Lifestyle.Singleton)).register(i.Component.named("cancelOfferModalEvent").componentType(n.Games.Events.CancelOfferModalEvent).withLifestyle(i.Lifestyle.Singleton))},r.trimString=function(n){return n.replace(/^\s+|\s+$/g,"")},r}();i.Initializer=r})(i=t.IoC||(t.IoC={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.autoPlay=n;this.transitionSpeed=t}return n}();n.CarouselContainerModel=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t,i){this.vendor=n;this.name=t;this.version=i}return n}();n.Browser=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(n,t){this.token=n;this.thirdPartyCookieRestricted=t}return n}();n.GameLaunchInformation=t})(t=n.Models||(n.Models={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(){this.settings={scrollY:!1,scrollX:!0,click:!1,tap:!0,momentum:!1,preventDefaultException:{tagName:/.*/}}}return n.prototype.init=function(n){var t=this;$(n).on("dragstart","a",function(){return!1});n!=null&&(this.scroller=new IScroll(n,this.settings));$(window).resize(function(){t.refit()})},n.prototype.refit=function(){this.reset();this.isFullyVisible()?this.scroller.disable():this.scroller.enable()},n.prototype.reset=function(){$(".languageSelector ul").css("transform","translate(0, 0)")},n.prototype.isFullyVisible=function(){var n=$(".languageSelector li:last-child");return n.offset().left+n.width()<$(window).width()},n}();n.LandingPageNavigation=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(thirdPartyCookieCheckEvent,cookieService,gameService){this.thirdPartyCookieCheckEvent=thirdPartyCookieCheckEvent;this.cookieService=cookieService;this.gameService=gameService}return n.prototype.init=function(){var n=this,t=this.gameService.getGameInformation();setTimeout(function(){n.isGameThirdPartyCookiesRestricted(t)&&($(".playFrame").hide(),n.thirdPartyCookieCheckEvent.emitEvent(!1,n.closePage))},2e3);this.resizeCurrentWindowForGame(t.minWidth,t.minHeight)},n.prototype.resizeCurrentWindowForGame=function(n,t){var i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,r=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;window.resizeBy(n-i,t-r)},n.prototype.isGameThirdPartyCookiesRestricted=function(n){return this.cookieService.areThirdPartyCookiesRestricted()?n.thirdPartyCookieRestricted:!1},n.prototype.closePage=function(){window.close()},n}();n.PlayInWindowPage=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(thirdPartyCookieCheckEvent,cookieService,gameService){this.containerMinWidth=1e3;this.defaultBackgroundImageHeight=600;this.thirdPartyCookieCheckEvent=thirdPartyCookieCheckEvent;this.cookieService=cookieService;this.gameService=gameService}return n.prototype.init=function(){var n=this,t=this.gameService.getGameInformation();setTimeout(function(){if(n.isGameThirdPartyCookiesRestricted(t)){var i=$(".playFrameContainer"),r=$(".divMainPageWrapper");i.hide();r.height(n.defaultBackgroundImageHeight);n.thirdPartyCookieCheckEvent.emitEvent(!1,n.redirectToRoot)}},2e3);this.resizeGameWindow(t);$(window).on("resize",function(){n.resizeGameWindow(t)});this.setupRefreshOnBalanceLinks()},n.prototype.isGameThirdPartyCookiesRestricted=function(n){return this.cookieService.areThirdPartyCookiesRestricted()?n.thirdPartyCookieRestricted:!1},n.prototype.redirectToRoot=function(){window.location.href="/"},n.prototype.resizeGameWindow=function(n){var r=$(".playFrameContainer"),f=$(".playFrame"),t=parseInt(f.attr("width"),10),e=parseInt(f.attr("height"),10),o,u;if(n.maxWidth===t){n.maxWidth<=this.containerMinWidth?r.outerWidth(this.containerMinWidth):r.width(n.maxWidth);return}if(o=$(window).width(),!(o<=t)){u=r.width()-t;u<100&&(u=100);var c=o-u,a=$(window).height(),v=$(".HeaderWrapper").height(),y=$(".playFrameContainer .title").height(),l=a-v-y-50,s,h,i;c-t<l-e?(i=this.calculateNewDimensions(n.maxWidth,n.minWidth,c,t,e),s=i.targetDimension,h=i.otherDimension):(i=this.calculateNewDimensions(n.maxHeight,n.minHeight,l,e,t),h=i.targetDimension,s=i.otherDimension);this.updateElementSizes(s,h,r,f)}},n.prototype.calculateNewDimensions=function(n,t,i,r,u){var f,e;return f=n<=i?n:i<=t?t:i,e=f/r*u,{targetDimension:f,otherDimension:e}},n.prototype.updateElementSizes=function(n,t,i,r){n<this.containerMinWidth?i.width(this.containerMinWidth):i.width(n);r.width(n);r.height(t)},n.prototype.setupRefreshOnBalanceLinks=function(){$(".playFrame")&&$(".refresh-on-balance").click(function(){$(".playFrame").attr("src","/RefreshBalance")})},n}();n.PlayPage=t})(t=n.Components||(n.Components={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){var t;(function(n){"use strict";var t=function(){function n(realityCheckTimerEvent){this.realityCheckTimerEvent=realityCheckTimerEvent}return n.prototype.startTimer=function(n){this.timer(n)},n.prototype.stopAndResetTimer=function(){clearTimeout(this.timeout)},n.prototype.timer=function(n){var t=this;this.timeout=setTimeout(function(){t.realityCheckTimerEvent.emitEvent(!0)},n)},n}();n.RealityCheckTimerService=t})(t=n.Services||(n.Services={}))})(t=n.Games||(n.Games={}))}(bet365||(bet365={})),function(n){var t;(function(n){"use strict";$(document).ready(function(){n.IoC.Initializer.initialize()})})(t=n.Games||(n.Games={}))}(bet365||(bet365={}));$(document).ready(function(){"use strict";$(".helpPage .backToTop a").click(function(n){return n.preventDefault(),$("html, body").animate({scrollTop:0},"slow"),!1});$(".mobileHelpPage .backToTop a").click(function(n){return n.preventDefault(),$("html, body").animate({scrollTop:0},"slow"),!1});$("body.helpPage").length&&bet365.Games.Help.CorrectScrollbars($)});bet365.Games.Help={CorrectScrollbars:function(n){try{var t=n(window).width(),i=524-t;window.resizeBy(i,0)}catch(r){return!1}return!0}};bet365=bet365||{};bet365.CCP=bet365.CCP||{};bet365.CCP.Core=bet365.CCP.Core||{version:"1.4.20.1",create:function(n){"use strict";for(var u=n.toString().split("."),t=window,i="",r=0;r<u.length;r++)i=u[r],t[i]=t[i]||{},t=t[i];return t},product:function(){"use strict";function f(i){for(var r=0;r<n.length;r++)if(i.indexOf(n[r])>=0){t=n[r];u=!0;break}}var i=window.location.toString().toLowerCase().replace("//","/").split("/"),r=i[1].split("."),e=i[2],n=["bingo","casino","games","vegas","poker"],t="unknown",u=!1;return(r[0].indexOf("mobile")>=0&&f(e),u)?t:(f(r[0]),t)}(),isMobile:function(){"use strict";return window.location.toString().toLowerCase().indexOf("://mobile")>=0||/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}(),removeConfigObject:function(n){"use strict";bet365.CCP.Config[n]&&delete bet365.CCP.Config[n]},isIE8:undefined,isIE9:undefined,isIE10:/*@cc_on!@*/!1&&document.documentMode===10,isIE11:!!window.MSInputMethodContext&&!!document.documentMode,isOldIE:undefined,isDesktop:undefined,init:function(){"use strict";bet365.CCP.Core.polyfills();this.Utils.CSS.SUPPORT.TRANSFORM=this.Utils.CSS.__check("transform",!0);this.Utils.CSS.SUPPORT.TRANSITION=this.Utils.CSS.__check("transition",!0);this.Utils.CSS.SUPPORT.ANIMATION=this.Utils.CSS.__check("animation",!0);this.Utils.CSS.PROPERTIES.ANIMATION=this.Utils.CSS.__check("animation");this.Utils.CSS.PROPERTIES.TRANSFORM=this.Utils.CSS.__check("transform");this.Utils.CSS.PROPERTIES.TRANSITION=this.Utils.CSS.__check("transition");this.Utils.CSS.SUPPORT.ANIMATION&&(this.Utils.CSS.PROPERTIES.ANIMATION_START=this.Utils.CSS.__checkEvent("animation","start"),this.Utils.CSS.PROPERTIES.ANIMATION_ITERATION=this.Utils.CSS.__checkEvent("animation","iteration"),this.Utils.CSS.PROPERTIES.ANIMATION_END=this.Utils.CSS.__checkEvent("animation","end"));this.Utils.CSS.SUPPORT.TRANSITION&&(this.Utils.CSS.PROPERTIES.TRANSITION_END=this.Utils.CSS.__checkEvent("transition","end"));this.isIE8=!this.Utils.CSS.SUPPORT.TRANSITION&&!this.Utils.CSS.SUPPORT.TRANSFORM;this.isIE9=!this.Utils.CSS.SUPPORT.TRANSITION&&this.Utils.CSS.SUPPORT.TRANSFORM;this.isOldIE=this.isIE8||this.isIE9;this.isDesktop=!this.isMobile}};bet365.CCP.Core.Utils=bet365.CCP.Core.Utils||{CCPEvent:function(n,t){"use strict";t=t||{};var i,u=t.bubbles||!1,r=t.cancelable||!1;try{i=new Event(n,{bubbles:u,cancelable:r})}catch(f){document.createEvent?(i=document.createEvent("Event"),i.initEvent(n,u,r)):document.createEventObject?(i=document.createEventObject(),i.eventType=i.type=n,i.cancelBubble=r):i="Cannot create CCPEvent '"+n+"'"}return i},CSS:{PROPERTIES:{ANIMATION:undefined,TRANSFORM:undefined,TRANSITION:undefined,ANIMATION_START:"undefined",ANIMATION_ITERATION:"undefined",ANIMATION_END:"undefined",TRANSITION_END:"undefined"},SUPPORT:{TRANSFORM:undefined,TRANSITION:undefined,ANIMATION:undefined},getVendorProperty:function(n,t){"use strict";return t===undefined?this.__check(n):this.__checkEvent(n,t)},isSupported:function(n){"use strict";return this.__check(n,!0)},__check:function(n,t){"use strict";var u=["Webkit","WebKit","Moz","ms","O","Khtml"],e=(document.body||document.documentElement).style,r=!1,i,f;if(t=t||"css",typeof e[n]=="string")r=!0;else for(n=t==="css"?n:n.charAt(0).toUpperCase()+n.substr(1),i=0;i<u.length;i++)if(f=t==="css"?"-"+u[i].toLowerCase()+"-"+n:u[i]+n,typeof e[f]=="string"){r=!0;n=f;break}return t===!0?r:r?n:undefined},__checkEvent:function(n,t){"use strict";var r,u=["Webkit","WebKit","Moz","O"],i;if(r=n.charAt(0).toUpperCase()+n.slice(1)+"Event",r in window)return n+t;for(i=0;i<u.length;i++)if(r=u[i]+n.charAt(0).toUpperCase()+n.slice(1)+"Event",r in window)return u[i].toLowerCase()+n.charAt(0).toUpperCase()+n.slice(1)+t.charAt(0).toUpperCase()+t.slice(1);return"undefined"}},Strings:{replaceAll:function(n,t,i){"use strict";return n.split(t).join(i)},indexOfAll:function(n,t){"use strict";for(var r=[],u=0,i;(i=n.indexOf(t,u))>-1;)r.push(i),u=i+t.length;return r},pluralForm:function(n,t,i,r,u){"use strict";if(typeof t!="object")throw TypeError("bet365.CCP.Core.Utils.Strings.pluralForm: 'phrases' is not an Object");var f,e=bet365.CCP.Core.Utils.Numbers.thousands(i,bet365.CCP.Core.Utils.Numbers.getDelimiter(n,"thousands",i));return t.zero=t.zero||"",t.single=t.single||"",f=i===0?t.zero:i===1?t.single:u.isMultiPlural&&i<u.pluralThreshold?t.pluralAlt:t.plural,f.replace(r,e)},tokenToTag:function(n,t){"use strict";var i;for(t=t||"[]",i=0;i<t.length;i++)n=this.replaceAll(n,t.charAt(i),"<>".charAt(i));return n}},Numbers:{thousands:function(n,t,i,r){"use strict";r=r||2;var u=i?n.toFixed(r):n.toFixed(0),f=u.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"@");return f.split(".").join(i).split("@").join(t)},prependZero:function(n){"use strict";return n<10?"0"+n.toString():n.toString()},getDelimiter:function(n,t,i){"use strict";var r=this.FORMATTING[n],u="suppress"in r,f=r.suppress||Infinity;return t==="thousands"&&u&&i<f?"":this.FORMATTING[n][t]},randomRange:function(n,t){"use strict";return Math.round(n+(t-n)*Math.random())},FORMATTING:{eng:{before:["EUR","GBP","USD","CAD","BRL"],thousands:",",decimal:"."},spa:{thousands:".",decimal:","},ger:{before:["EUR","GBP","USD","CAD","BRL"],thousands:".",decimal:","},ita:{before:["EUR","GBP","USD","CAD","BRL"],thousands:".",decimal:","},dan:{before:["EUR","GBP","CAD","USD"],thousands:".",decimal:","},swe:{before:["EUR","GBP","CAD","USD"],thousands:".",decimal:","},nor:{before:["EUR","GBP","CAD","USD","CAD"],thousands:".",decimal:","},tch:{before:["EUR","GBP","USD","CAD","BRL"],thousands:",",decimal:"."},sch:{before:["EUR","GBP","USD","CAD","BRL"],thousands:",",decimal:"."},bul:{thousands:".",decimal:","},gre:{before:["EUR","GBP","USD","CAD","BRL"],thousands:".",decimal:","},por:{thousands:".",decimal:","},pol:{thousands:".",decimal:","},rom:{thousands:".",decimal:","},cze:{thousands:".",decimal:","},hun:{thousands:".",decimal:","},svk:{thousands:".",decimal:","},dut:{before:["EUR","GBP","USD","CAD","BRL"],thousands:".",decimal:","},est:{thousands:" ",decimal:",",suppress:1e4,padding:" "},latampor:{before:["EUR","GBP","USD","CAD","BRL"],thousands:".",decimal:","},latamspa:{before:["EUR","GBP","USD","CAD","BRL"],thousands:".",decimal:","},roweng:{before:["EUR","GBP","USD","CAD","BRL"],thousands:".",decimal:","}}},Currency:{format:function(n,t,i,r){"use strict";i=i||this.getDefaultCurrency(t);r=r||!1;var s,e,u,o,h=this.CURRENCY_SYMBOLS[i],f={thousands:bet365.CCP.Core.Utils.Numbers.getDelimiter(t,"thousands",n),decimal:bet365.CCP.Core.Utils.Numbers.getDelimiter(t,"decimal"),before:bet365.CCP.Core.Utils.Numbers.FORMATTING[t].before};return s=r?f.decimal:parseFloat((n%1).toFixed(2))>0?f.decimal:undefined,e=bet365.CCP.Core.Utils.Numbers.thousands(n,f.thousands,s,2),u=bet365.CCP.Core.Utils.Numbers.FORMATTING[t].padding||"",o=!f.before||f.before.indexOf(i)<0?e+u+h:h+u+e,u?o.trim().replace(u+" ",u):o.trim()},getDefaultCurrency:function(n){"use strict";return this.DEFAULT_CURRENCY[n]},CURRENCY_SYMBOLS:{EUR:"€",GBP:"£",AUD:" AUD",BGN:" лв",CAD:"$",CHF:" CHF",NZD:" NZD",USD:"$",BRL:"R$",SGD:" SGD",RON:" RON",ARS:" ARS",MYR:" MYR",PLN:" PLN",RMB:" RMB",CNY:" CNY",DKK:" kr.",NOK:" kr",SEK:" kr",ZAR:" ZAR",HKD:" HKD",MXN:" MXN",CZK:" Kč",THB:" THB",TWD:" TWD",INR:" INR",ISK:" ISK",JPY:" JPY",HUF:" Ft"},DEFAULT_CURRENCY:{eng:"GBP",spa:"EUR",ger:"EUR",ita:"EUR",dan:"DKK",swe:"SEK",nor:"NOK",tch:"RMB",sch:"RMB",bul:"BGN",gre:"EUR",por:"EUR",pol:"PLN",rom:"RON",cze:"CZK",hun:"HUF",svk:"EUR",dut:"EUR",est:"EUR",latampor:"BRL",latamspa:"USD",roweng:"USD"}},Dates:{getBet365Time:function(n,t){"use strict";function e(){i.readyState===XMLHttpRequest.DONE&&(clearTimeout(r),i.status===200?n.call(this,new Date(i.responseText)):t.call(this,i.status))}function o(){i.abort();clearTimeout(r);t.call(this,"ForceXHRTimeout")}var i=new XMLHttpRequest,u=window.location.toString().toLowerCase().indexOf("://mobile")>=0,f=this.TIMESERVICE.baseURL+(u?"/"+bet365.CCP.Core.product:"")+this.TIMESERVICE.serviceURL,r;i||t.call(this,"CannotCreateXHR");i.onreadystatechange=e;r=setTimeout(o,1e3);i.open("GET",f);i.send()},getDateObject:function(n){"use strict";var t=n.split(" "),i=t[0].split("/"),r=[[i[1],i[0],i[2]].join("/"),t[1],t[2]].join(" ");return new Date(r)},localiseDate:function(n,t,i){"use strict";var u,f,e,o,r;return i=i||!0,typeof t=="string"?(r=t.split("/"),u=r[0],f=r[1],e=r[2]):(u=bet365.CCP.Core.Utils.Numbers.prependZero(t.getDate()),f=bet365.CCP.Core.Utils.Numbers.prependZero(t.getMonth()+1),e=i?t.getFullYear():t.getFullYear().toString().substring(2)),o=this.FORMATTING[this.BY_LANG[n].date],o.replace("d",u).replace("m",f).replace("y",e)},localiseTime:function(n,t){"use strict";return typeof t!="string"&&(t=t.toString().split(" ")[4]),this.BY_LANG[n].time?t.split(":").join(this.BY_LANG[n].time):t},localiseTimestamp:function(n,t,i){"use strict";function u(n){for(var t=0;t<r.length;t++)if(r[t].indexOf(n)>=0)return t}var r=t.split(" "),f=i?this.TIMESTAMP[this.BY_LANG[n].stampsolo]:this.TIMESTAMP[this.BY_LANG[n].stamp],e=this.localiseDate(n,r[u("/")]),o=this.localiseTime(n,r[u(":")]);return f.replace("D",e).replace("T",o)},FORMATTING:{slashes:"d/m/y",periods:"d.m.y",spaces:"d. m. y",ch:"y年m月d日",swe:"y-m-d",hun:"y.m.d."},TIMESTAMP:{bul:"T GMT на D",por:"T GMT de D",rom:"T GMT in D",hun:"D T (GMT)",dut:"T uur GMT D",datetime:"D T GMT",timedate:"T GMT D"},BY_LANG:{eng:{date:"slashes",stamp:"datetime"},spa:{date:"slashes",stamp:"datetime"},ger:{date:"periods",stamp:"datetime"},ita:{date:"slashes",stamp:"datetime"},dan:{date:"slashes",stamp:"timedate"},swe:{date:"swe",time:".",stamp:"datetime"},nor:{date:"periods",stamp:"datetime"},tch:{date:"ch",stamp:"datetime"},sch:{date:"ch",stamp:"datetime"},bul:{date:"periods",stamp:"bul",stampsolo:"datetime"},gre:{date:"slashes",stamp:"timedate"},por:{date:"slashes",stamp:"por"},pol:{date:"periods",stamp:"timedate"},rom:{date:"periods",stamp:"rom"},cze:{date:"spaces",stamp:"datetime"},hun:{date:"hun",stamp:"hun"},svk:{date:"spaces",stamp:"timedate"},dut:{date:"slashes",stamp:"dut"},latampor:{date:"slashes",stamp:"por"},latamspa:{date:"slashes",stamp:"datetime"},est:{date:"periods",stamp:"datetime"}},TIMESERVICE:{baseURL:window.location.protocol+"//"+window.location.hostname,serviceURL:"/services/gettime.ashx"}},Cookies:{get:function(n){"use strict";if(!n)return undefined;var t=encodeURIComponent(n).replace(/[\-\.\+\*]/g,"\\$&"),i=new RegExp("(?:(?:^|.*;)\\s*"+t+"\\s*\\=\\s*([^;]*).*$)|^.*$");return decodeURIComponent(document.cookie.replace(i,"$1"))||undefined},set:function(n,t,i,r,u,f){"use strict";if(!n||/^(?:expires|max\-age|path|domain|secure)$/i.test(n))return!1;var e="";if(u=u?"; domain="+u:"",r=r?"; path="+r:"",f=f?"; secure":"",i)switch(i.constructor){case Number:e=i===Infinity?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+i;break;case String:e="; expires="+i;break;case Date:e="; expires="+i.toUTCString()}return document.cookie=encodeURIComponent(n)+"="+encodeURIComponent(t)+e+u+r+f,!0},remove:function(n,t,i){"use strict";return this.has(n)?(i=i?"; domain="+i:"",t=t?"; path="+t:"",document.cookie=encodeURIComponent(n)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+i+t,!0):!1},has:function(n){"use strict";if(!n)return!1;var t=encodeURIComponent(n).replace(/[\-\.\+\*]/g,"\\$&"),i=new RegExp("(?:^|;\\s*)"+t+"\\s*\\=");return i.test(document.cookie)},keys:function(){"use strict";for(var n=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),t=0;t<n.length;t++)n[t]=decodeURIComponent(n[t]);return n}}};bet365.CCP.Core.BaseDataManager=function(n,t,i,r,u,f){"use strict";return this.id=n,this.wrapper=t,this.isListening=!1,this.listenID=0,this.observer=undefined,this.observationType="",this.dataset={},this.sources=[],this.cache={},this.callbackDataReady=i,this.callbackDataFail=r,this.scope=u,this.forcediv=!f,this.errors=[],this.dataUpdatedEvent=new bet365.CCP.Core.Utils.CCPEvent(this.EventConstants.DATA_UPDATED,{bubbles:!0}),this.init(),this};bet365.CCP.Core.BaseDataManager.prototype={init:function(){"use strict";var i=!0,n,t;if(bet365.CCP.Config[this.id]&&typeof bet365.CCP.Config[this.id]=="object"||(this.errors.push(this.ErrorConstants.NO_CONFIG_OBJECT),i=!1),n=this.wrapper.getElementsByTagName("div"),n.length===0&&this.forcediv)i=!1,this.errors.push(this.ErrorConstants.NO_DATA_SOURCES);else for(t=0;t<n.length;t++)n[t].id.indexOf(this.ConfigConstants.BASE_DIV_NAME)>=0&&(this.sources.push(n[t]),this.cache[n[t].id]=n[t].textContent||n[t].innerHTML);this.errors.length===0&&(i=this.parse());i?(this.listen(),this.callbackDataReady.call(this.scope)):this.callbackDataFail.call(this.scope,this.errors);delete this.scope;delete this.wrapper},parse:function(){"use strict";var n=this.__parseObject()&&this.__parseLeaderboardsArray()&&this.__parseDefaultLeaderboardData()&&this.__parseDIVSet();return bet365.CCP.Core.removeConfigObject(this.id),n},kill:function(){"use strict";this.ignore();delete this.dataset;delete this.sources;delete this.cache;delete this.callbackDataReady;delete this.callbackDataFail},__cast:function(n){function r(n,t){return/^(\-|\+)?([0-9]+|Infinity)$/.test(n)?parseInt(n,t):NaN}function u(n){return/^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/.test(n)?parseFloat(n):NaN}for(var i=[{test:n.toLowerCase()==="null",result:null},{test:n.toLowerCase()==="undefined",result:undefined},{test:n.toLowerCase()==="true",result:!0},{test:n.toLowerCase()==="false",result:!1},{test:n.indexOf("/")>=0&&n.indexOf(":")>=0,result:n},{test:!isNaN(u(n))&&n.indexOf(".")>=0,result:u(n)},{test:!isNaN(r(n,10)),result:r(n,10)}],t=0;t<i.length;t++)if(i[t].test)return i[t].result;return n},__castArray:function(n){for(var t=0;t<n.length;t++)n[t]=this.__cast(n[t]);return n},__parseObject:function(){"use strict";function f(n){return n=decodeURIComponent(n).split(t.ParseConstants.TEXT_SPACE).join(" "),n.indexOf(t.ParseConstants.ARRAY_DELIMITER)>=0?t.__castArray(n.split(t.ParseConstants.ARRAY_DELIMITER)):t.__cast(n)}var t=this,n=bet365.CCP.Config[this.id],i={content:{},images:{}},r,u;for(r in n)switch(r){case"imageVariables":i.images=n.imageVariables;break;case"contentVariables":for(u in n.contentVariables)n.contentVariables.hasOwnProperty(u)&&(i.content[u]=f(n.contentVariables[u]));break;case"leaderboards":break;default:i[r]=f(n[r])}return this.dataset=i,!0},__parseLeaderboardsArray:function(){"use strict";var r=bet365.CCP.Config[this.id],t,n,i;if(r.leaderboards)for(t=r.leaderboards,n=0;n<t.length;n++)for(i in t[n])t[n].hasOwnProperty(i)&&i.indexOf(this.ConfigConstants.LEADERBOARD_DATA_SUBPROP)>=0&&t[n][i]&&this.__parseStringData(i,t[n][i]);return!0},__parseDefaultLeaderboardData:function(){"use strict";if(this.dataset.defaultleaderboardData){if(typeof this.dataset.defaultleaderboardData.push=="function"){var n=this.dataset.defaultleaderboardData.join(this.ParseConstants.ARRAY_DELIMITER);this.dataset.defaultleaderboardData=n}this.__parseStringData("defaultLeaderboardData",this.dataset.defaultleaderboardData);delete this.dataset.defaultleaderboardData}return!0},__parseDIVSet:function(){"use strict";for(var n in this.cache)this.cache.hasOwnProperty(n)&&this.__parseStringData(n,this.cache[n]);return!0},__parseStringData:function(n,t){"use strict";function v(n,t,i,r){return!(n.length!==2||t===""||!r.test(t)||!i||i===""||i===undefined)}var s=t===""?[]:t.split(this.ParseConstants.LINE_DELIMITER),i,h,u,r;for(s.length>1&&(i=n.split("_")[0].replace(this.ConfigConstants.BASE_DIV_NAME,"").toLowerCase(),h=[]),u=0;u<s.length;u++){var f=s[u].split(this.ParseConstants.ITEM_DELIMITER),l={},c=!1;for(r=0;r<f.length;r++)if(f[r]!==""){var e=f[r].split(this.ParseConstants.KEY_VALUE_PAIR),a=e[0].charAt(0).toLowerCase()+e[0].slice(1),o=decodeURIComponent(e[1]).split(this.ParseConstants.TEXT_SPACE).join(" "),y=i?l:this.dataset;c=v(e,a,o,this.ParseConstants.INVALID_REGEX)&&f.length>0;c&&(y[a]=o.indexOf(this.ParseConstants.ARRAY_DELIMITER)>=0?this.__castArray(o.split(this.ParseConstants.ARRAY_DELIMITER)):this.__cast(o))}i&&c&&h.push(l)}i&&(this.dataset[i]=h)},listen:function(n,t){"use strict";var f=t||this.ListenConstants.POLL_INTERVAL,i,r,u;if(n=n||!1,this.isListening=!0,MutationObserver&&!n){for(i=new MutationObserver(this.__MOCallback),i.scope=this,r=0;r<this.sources.length;r++)i.observe(this.sources[r],{childList:!0,characterData:!0,subtree:!0});this.observer=i;this.observationType="MutationObserver"}else u=this,this.listenID=setInterval(function(){u.__poll()},f*1e3),this.observationType="setInterval"},ignore:function(){"use strict";this.isListening=!1;this.observer?this.observer.disconnect():clearInterval(this.listenID)},changePollInterval:function(n){"use strict";this.observationType==="setInterval"&&(this.ignore(),this.listen(!1,n))},__MOCallback:function(n){"use strict";var i;for(var f in n)if(n.hasOwnProperty(f)){var t=n[f],r=t.target.textContent,u=t.target.id||t.target.parentNode.id;i||(i=t.target);this.scope.cache[u]!==r&&(this.scope.cache[u]=r,this.scope.__parseStringData(u,r))}i.dispatchEvent(this.scope.dataUpdatedEvent)},__poll:function(){"use strict";for(var n,t,u=!1,i,r=0;r<this.sources.length;r++)n=this.sources[r],t=n.textContent||n.innerHTML,this.cache[n.id]!==t&&(i||(i=n),this.cache[n.id]=t,this.__parseStringData(n.id,t),u=!0);u&&i.dispatchEvent(this.dataUpdatedEvent)},ConfigConstants:{BASE_DIV_NAME:"CustomContentLeaderboard",LEADERBOARD_DATA_SUBPROP:"leaderboardData"},ListenConstants:{POLL_INTERVAL:120},ParseConstants:{LINE_DELIMITER:"¬",ITEM_DELIMITER:"|",ARRAY_DELIMITER:"~",KEY_VALUE_PAIR:"#",TEXT_SPACE:"+",INVALID_REGEX:/^[\w]+$/},ErrorConstants:{NO_CONFIG_OBJECT:"DataManager.noConfigJSONFound",NO_DATA_SOURCES:"DataManager.noLeaderboardDivSourcesFound",DATA_PARSE_ERROR:"DataManager.dataParseError"},EventConstants:{DATA_UPDATED:"dataupdated"}};bet365.CCP.Core.OverlayMonitor=function(n,t){"use strict";var i=this.__element();return!i||this.isOverlayHidden(i)?(this.running=!1,!1):(this.elem=i,this.observationType=undefined,this.listenID=0,this.callback=n,this.scope=t,this.init(),this)};bet365.CCP.Core.OverlayMonitor.prototype={running:!0,__element:function(){"use strict";for(var t,i=this.DOMElements[bet365.CCP.Core.product],n=0;n<i.length;n++)if(t=document.querySelector(i[n]),t)return t;return null},init:function(){"use strict";var n,t;MutationObserver?(n=new MutationObserver(this.__MOCallback),n.scope=this,n.observe(this.elem,{attributes:!0,attributeFilter:["style"]}),this.observer=n):(t=this,this.listenID=setInterval(function(){t.__poll()},this.ListenConstants.POLL_INTERVAL))},isOverlayHidden:function(n){"use strict";for(var i=this.__buildChecks(n),t=0;t<i.length;t++)if(i[t])return!0;return!1},terminate:function(){"use strict";this.observer?this.observer.disconnect():clearInterval(this.listenID)},__MOCallback:function(n){"use strict";for(var t,i=!1,r=this.scope.__buildChecks(this.scope.elem),u=0;u<n.length;u++){for(t=0;t<r.length;t++)if(r[t]){i=!0;break}if(i){this.scope.terminate();this.scope.__callback();break}}},__poll:function(){"use strict";for(var t=this.__buildChecks(this.elem),n=0;n<t.length;n++)if(t[n]){this.terminate();this.__callback();break}},__buildChecks:function(n){"use strict";return[n.style.display==="none",n.style.visibility==="hidden",n.offsetWidth===0||n.offsetHeight===0]},__callback:function(){"use strict";this.callback.call(this.scope)},ListenConstants:{POLL_INTERVAL:500},DOMElements:{bingo:["#OverlayBannerContainer","#ImportantAnnouncementModal","div.modal.loggedin"],games:["#OverlayBannerContainer","#ImportantAnnouncementModal","div.modal.loggedin"],casino:["#OverlayBannerContainer","#ImportantAnnouncementModal","div.PopUpForm"],poker:["#OverlayBannerContainer","#ImportantAnnouncementModal"],vegas:["#OverlayBannerContainer","#ImportantAnnouncementModal"]}};bet365.CCP.Core.ImagePreloader=function(n,t,i,r,u){"use strict";this.scope=u;this.callbackDone=t;this.callbackProgress=i;this.callbackError=r;this.haveLoaded=0;this.processed=0;this.images=[];this.sources=this.parse(n);this.count=this.sources.length;this.errors=[]};bet365.CCP.Core.ImagePreloader.prototype={parse:function(n){"use strict";var t=[];for(var i in n)n.hasOwnProperty(i)&&t.push(n[i]);return t},begin:function(){"use strict";if(this.count>0)for(var n=0;n<this.count;n++)this.preload(this.sources[n]);else this.complete()},preload:function(n){"use strict";var t=new Image;t.onload=this.__load;t.onerror=this.__error;t.onabort=this.__abort;t.loaded=!1;t.controller=this;this.images.push(t);t.src=n},complete:function(){"use strict";delete this.images;this.errors.length>0?this.callbackError.call(this.scope,this.errors,this.count,this.haveLoaded):this.callbackDone.call(this.scope)},imageComplete:function(){"use strict";this.processed++;this.callbackProgress.call(this.scope,Math.round(this.processed/this.count*100));this.processed===this.count&&this.complete()},__load:function(){"use strict";this.loaded=!0;this.controller.haveLoaded++;this.controller.imageComplete()},__error:function(){"use strict";var n=this.src.split("/");this.error=!0;this.controller.errors.push("ImagePreloader.fail: "+n[n.length-1]);this.controller.imageComplete()},__abort:function(){"use strict";var n=this.src.split("/");this.abort=!0;this.controller.errors.push("ImagePreloader.abort: "+n[n.length-1]);this.controller.imageComplete()}};bet365.CCP.Core.ErrorSet=function(){"use strict";this.errors=[]};bet365.CCP.Core.ErrorSet.prototype={add:function(n){"use strict";n.constructor===Array?this.errors=this.errors.concat(n):this.errors.push(n)},clear:function(){"use strict";this.errors=[]},display:function(n){"use strict";var t,i,r;if(!n)return this.errors;for(t=document.createElement("UL"),t.className="CCP_ErrorSetOutput",n=typeof n=="object"?n:document.querySelector(n),i=0;i<this.errors.length;i++)r=document.createElement("LI"),r.innerHTML=this.errors[i],t.appendChild(r);n.appendChild(t)}};bet365.CCP.Core.polyfills=function(){"use strict";(function(){var t=!0,n;try{window.dispatchEvent(new bet365.CCP.Core.Utils.CCPEvent("ontestevent"))}catch(i){t=!1}window.addEventListener&&window.removeEventListener&&window.dispatchEvent&&t||(n=[],Window.prototype.addEventListener=HTMLDocument.prototype.addEventListener=Element.prototype.addEventListener=function(t,i){var r=this;n.unshift([r,t,i,function(n,t){n.currentTarget=r;n.target=t||n.srcElement||r;n.preventDefault=function(){n.returnValue=!1};n.stopPropagation=function(){n.cancelBubble=!0};i.call(r,n)}]);this.attachEvent("on"+t.toLowerCase(),n[0][3])},Window.prototype.removeEventListener=HTMLDocument.prototype.removeEventListener=Element.prototype.removeEventListener=function(t,i){var r,u;if(t===undefined)return!0;for(r=0;r<n.length;r++)if(u=n[r],u[0]===this&&u[1]===t&&u[2]===i)return this.detachEvent("on"+t.toLowerCase(),n.splice(r,1)[0][3])},Window.prototype.dispatchEvent=HTMLDocument.prototype.dispatchEvent=Element.prototype.dispatchEvent=function(t){function f(t){for(var r=[],i=0;i<n.length;i++)n[i][1]===t&&typeof n[i][3]=="function"&&r.push(n[i][3]);return r}var u=(t.type||t.eventType).toLowerCase(),r,i;try{return this.fireEvent("on"+u,t)}catch(e){for(r=f(u),i=0;i<r.length;i++)r[i](t,this)}})})(),function(){typeof CustomEvent!="function"&&(window.CustomEvent=function(n,t){var i,r;if(t=t||{bubbles:!1,cancelable:!1,detail:undefined},document.createEvent)i=document.createEvent("CustomEvent"),i.initCustomEvent(n,t.bubbles,t.cancelable,t.detail);else{i=document.createEventObject();i.eventType=n;for(r in t)i[r]=t[r]}return i},window.CustomEvent.prototype=window.Event.prototype)}(),function(){String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})}(),function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){if(this===null)throw new TypeError("Array.indexOf polyfill: 'this' is null or not defined");var r,i,f=Object(this),u=f.length;if(u===0||(i=t||0,(isNaN(i)||Math.abs(i)===Infinity)&&(i=0),i>=u))return-1;for(r=Math.max(i>=0?i:u-Math.abs(i),0);r<u;){if(r in f&&f[r]===n)return r;r++}return-1})}(),function(){if(!window.DOMTokenList){var n=Array.prototype.push,t=Array.prototype.splice,i=Array.prototype.join;window.DOMTokenList=function(t,i){var u,r;for(this.elem=t,this.prop=i,this.list=[],u=t[i].replace(/^\s+|\s+$/g,"").split(/\s+/),r=0;r<u.length;r++)n.call(this.list,u[r])};window.DOMTokenList.prototype={add:function(t){this.contains(t)||(n.call(this.list,t),this.elem[this.prop]=this.toString())},contains:function(n){for(var t=0;t<this.list.length;t++)if(this.list[t]===n)return!0;return!1},item:function(n){return this.list[n]||null},remove:function(n){var i;if(this.contains(n)){for(i=0;i<this.list.length;i++)if(this.list[i]===n)break;t.call(this.list,i,1);this.elem[this.prop]=this.toString()}},toString:function(){return i.call(this.list," ")},toggle:function(n){return this.contains(n)?this.remove(n):this.add(n),this.contains(n)}}}}(),function(){"classList"in document.createElement("_")||Object.defineProperty(Element.prototype,"classList",{get:function(){return new DOMTokenList(this,"className")}})}(),function(){Object.create||(Object.create=function(n,t){function i(){}if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError("Object.create polyfill only supports Object prototypes as first argument [passed "+n+"]");if(t!==undefined)throw new Error("Object.create polyfill does not support a second argument");return i.prototype=n,new i})}(),function(){var i,t,n;if(!window.requestAnimationFrame||!window.cancelAnimationFrame){for(i=0,t=["webkit","ms","moz","o"],n=0;n<t.length&&!window.requestAnimationFrame;n++)window.requestAnimationFrame=window[t[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[n]+"CancelAnimationFrame"]||window[t[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n){var t=(new Date).getTime(),r=Math.max(0,16-(t-i)),u=window.setTimeout(function(){n(t+r)},r);return i=t+r,u},window.cancelAnimationFrame=function(n){clearTimeout(n)})}}(),function(){"TextRectangle"in window&&!("width"in TextRectangle.prototype)&&(Object.defineProperty(TextRectangle.prototype,"width",{get:function(){return this.right-this.left}}),Object.defineProperty(TextRectangle.prototype,"height",{get:function(){return this.bottom-this.top}}))}(),function(){window.getComputedStyle||(window.getComputedStyle=function(n){return n.currentStyle})}(),function(){window.MutationObserver||(window.MutationObserver=window.WebKitMutationObserver||window.MozMutationObserver||undefined)}(),function(){for(var t=["UNSENT","OPENED","HEADERS_RECEIVED","LOADING","DONE"],n=0;n<t.length;n++)XMLHttpRequest[t[n]]===undefined&&(XMLHttpRequest[t[n]]=n)}()};bet365.CCP.Core.init();bet365=bet365||{};bet365.CCP=bet365.CCP||{};bet365.CCP.SlotsFeb2018={id:undefined,div:undefined,wrapper:undefined,overlay:undefined,progbar:undefined,DataManager:undefined,ImagePreloader:undefined,OverlayMonitor:undefined,Errors:new bet365.CCP.Core.ErrorSet,ok:!0,deferred:!1,Version:{ccp:"1.8.4 RC2",app:"1.5.3",date:"2018.01.18",framework:bet365.CCP.Core.version},init:function(n,t){"use strict";this.id=n;this.wrapper=document.createElement("article");this.wrapper.id="__CCPContentWrapper";var i=document.getElementById(t);i.insertBefore(this.wrapper,i.firstChild);i.className+=" CCP_flexheight CCP_Colour-"+bet365.CCP.Core.product;bet365.CCP.Core.isOldIE&&i.classList.add("CCP_ie-fix");bet365.CCP.Core.isDesktop&&i.classList.add("CCP_isDesktop");this.DataManager=new bet365.CCP.Core.BaseDataManager(n,i,this.dataReady,this.dataFail,this);this.OverlayMonitor=new bet365.CCP.Core.OverlayMonitor(this.deferredLaunch,this);this.deferred=this.OverlayMonitor.running;this.DataManager.dataset.localise={isMultiPlural:"cze|svk|pol".indexOf(this.DataManager.dataset.content.thisLang)>=0,pluralThreshold:5};this.CTA.linkFunctionName=this.DataManager.dataset.linkFunctionName;this.ok&&this.preload();delete this.ok},kill:function(){"use strict";this.DataManager.kill();delete this.DataManager},dataReady:function(){"use strict";this.ok=!0},dataFail:function(n){"use strict";this.Errors.add(n);this.ok=!1},preload:function(){"use strict";this.overlay=document.createElement("section");this.overlay.className="CCP_preload-overlay";var n=document.createElement("div");n.className="bar-outer";this.progbar=document.createElement("div");this.progbar.className="bar-inner";n.appendChild(this.progbar);this.overlay.appendChild(n);this.wrapper.appendChild(this.overlay);this.ImagePreloader=new bet365.CCP.Core.ImagePreloader(this.DataManager.dataset.images,this.preloadComplete,this.preloadProgress,this.preloadError,this);this.ImagePreloader.begin()},preloadProgress:function(n){"use strict";this.progbar.style.width=n+"%"},preloadError:function(n){"use strict";this.Errors.add(n);this.preloadCleanup()},preloadComplete:function(){"use strict";this.deferred||(delete this.OverlayMonitor,delete this.deferred,this.preloadCleanup(),this.build())},preloadCleanup:function(){"use strict";this.wrapper.removeChild(this.overlay);delete this.overlay;delete this.progbar;delete this.ImagePreloader},deferredLaunch:function(){"use strict";this.deferred=!1;this.preloadComplete()},CTA:{linkFunctionName:undefined,custom:function(n){"use strict";var t=bet365.CCP.Core.create(this.linkFunctionName);typeof t=="function"&&t(n)},morePromotions:function(){"use strict";var n=bet365.CCP.Core.create(this.linkFunctionName);typeof n=="function"&&n("morePromotionsLink")}},User:{isLoggedIn:function(n){"use strict";return n.loggedIn&&n.loggedIn.toString().toLowerCase()==="true"}},Host:{isInApp:function(n){"use strict";for(var i=[n.fromNativeApp&&n.fromNativeApp.toString().toLowerCase()==="true",document.getElementById("FromNativeApp")],t=0;t<i.length;t++)if(i[t])return!0;return!1},showGameLauncher:function(n,t,i){"use strict";var r="flagHideGames"in n&&n.flagHideGames===!0;return!t&&!r&&i&&bet365.CCP.Core.product!=="vegas"}},build:function(){"use strict";function y(){n.DATA.refresh(i);g()?nt():b()}function p(){o.hide();r.hide();s.show();f&&(u.hide(),h.show())}function w(){o.show();r.show();s.hide();f&&(u.show(),h.hide())}function g(){return k!==n.DATA.DRAW}function b(){r.update();c.update()}function nt(){u&&u.removeDesktopFix();t.removeEventListener(r.EventConstants.SHOW_PRIZE_TABLE,p);t.removeEventListener(r.EventConstants.HIDE_PRIZE_TABLE,w);t.parentNode.removeEventListener(l.EventConstants.DATA_UPDATED,y);o=r=u=s=c=undefined;n.hardReset()}var t=this.wrapper,l=this.DataManager,i=this.DataManager.dataset,n=bet365.CCP.SlotsFeb2018;n.DATA.init(i);var a=n.User.isLoggedIn(i),v=n.PromoState.getPromoState(a),e=n.PromoState.isPromoActive(v),k=n.DATA.DRAW,d=n.Host.isInApp(i),f=n.Host.showGameLauncher(i.content,d,e),o,r,u,s,h,c;o=new n.UI.Background(i.images,f,e);r=e?new n.UI.MainView(i,a,f):new n.UI.TextView(i,n.PromoState.isPromoEnd(v));h=new n.Widgets.TilesBG(i.images,f);t.appendChild(o.domElement);t.appendChild(h.domElement);t.appendChild(r.domElement);f&&(u=new n.UI.GameLauncher(i),t.appendChild(u.domElement));u&&bet365.CCP.Core.isDesktop&&u.applyDesktopFix();e&&(s=new n.UI.PrizeTable(i),t.appendChild(s.domElement),t.addEventListener(r.EventConstants.SHOW_PRIZE_TABLE,p),t.addEventListener(r.EventConstants.HIDE_PRIZE_TABLE,w));a&&e?(c=new n.UI.LegalFooter(i),t.appendChild(c.domElement),t.parentNode.addEventListener(l.EventConstants.DATA_UPDATED,y),b()):l.ignore()},hardReset:function(){"use strict";while(this.wrapper.firstChild)this.wrapper.removeChild(this.wrapper.firstChild);this.build()}};bet365.CCP.SlotsFeb2018.UI={Background:function(n,t,i){"use strict";var u=i?bet365.CCP.SlotsFeb2018.DATA.WEEK:1,r=document.createElement("img");return this.domElement=document.createElement("section"),this.show=function(){this.domElement.classList.remove("hide-me")},this.hide=function(){this.domElement.classList.add("hide-me")},r.src=n.bgMask,this.domElement.className="CCP_bg"+(t?"":" no-games"),this.domElement.style.backgroundImage="url("+n["bgWeek"+u]+")",this.domElement.appendChild(r),this},MainView:function(n,t,i){"use strict";function h(n){n.target.classList.remove("CCP_Anim-SoftResolveInRight");n.target.removeEventListener(bet365.CCP.Core.Utils.CSS.PROPERTIES.ANIMATION_END,h)}function y(n){n.preventDefault();n.target.dispatchEvent(a)}function p(){var t=parseInt(n.tickets,10);return isNaN(t)?0:t}function w(){s=p();b()}function c(){return r.convertCurrency(r.PRIZE_TABLE.funds[Math.floor(r.DRAW_INDEX/2)]*1e3,n.content.thisLang)}function l(){return r.DRAW===r.FINAL_DRAW?n.content.textPrizeDrawLast:r.DRAW%2==0?n.content.textPrizeDrawEven:n.content.textPrizeDrawOdd}function b(){o.innerHTML=l().replace("[FUND]",c());e.update(s)}var a=new bet365.CCP.Core.Utils.CCPEvent(this.EventConstants.SHOW_PRIZE_TABLE,{bubbles:!0}),r=bet365.CCP.SlotsFeb2018.DATA,s,u=bet365.CCP.SlotsFeb2018.Controls.ImageDiv("logo",n.images.logo,n.content.altLogo),f=document.createElement("div"),o=document.createElement("h3"),e=t?new bet365.CCP.SlotsFeb2018.UI.CountdownTimer(n.content,n.localise):document.createElement("p"),v=new bet365.CCP.SlotsFeb2018.Controls.CCPLink(n.content.textButtonPrizeTable,y,{css:"prize-table",href:"#showPrizeTable"});return this.domElement=document.createElement("section"),this.update=function(){w()},this.show=function(){this.domElement.classList.remove("CCP_Transition-SlideOutUp")},this.hide=function(){this.domElement.classList.add("CCP_Transition-SlideOutUp")},u.className="logo",u.alt=n.content.altLogo,u.src=n.images.logo,f.className="text-wrap",f.appendChild(o),f.appendChild(e.domElement||e),this.domElement.className="CCP_main CCP_Anim-SoftResolveInRight"+(i?"":" no-games"),this.domElement.appendChild(u.domElement),this.domElement.appendChild(f),this.domElement.appendChild(v),this.domElement.addEventListener(bet365.CCP.Core.Utils.CSS.PROPERTIES.ANIMATION_END,h),t||(o.innerHTML=l().replace("[FUND]",c()),e.innerHTML=n.content.textLoggedOut),this},TextView:function(n,t){"use strict";function e(n){n.target.classList.remove("CCP_Anim-SoftResolveInRight");n.target.removeEventListener(bet365.CCP.Core.Utils.CSS.PROPERTIES.ANIMATION_END,e)}function o(n){n.preventDefault();bet365.CCP.SlotsFeb2018.CTA.morePromotions()}var r=bet365.CCP.SlotsFeb2018.Controls.ImageDiv("logo",n.images.logo,n.content.altLogo),i=document.createElement("div"),u=document.createElement("p"),f=document.createElement("p");return this.domElement=document.createElement("section"),r.className="logo",r.alt=n.content.altLogo,r.src=n.images.logo,u.innerHTML=t?n.content.textEndTitle:n.content.textPrePromoTitle,f.innerHTML=t?n.content.textEndBody:n.content.textPrePromoBody,i.className="text-wrap",i.appendChild(u),i.appendChild(f),this.domElement.className="CCP_main no-games CCP_Anim-SoftResolveInRight",this.domElement.appendChild(r.domElement),this.domElement.appendChild(i),t&&i.appendChild(new bet365.CCP.SlotsFeb2018.Controls.CCPButton(n.content.textButtonMorePromo,o)),this.domElement.addEventListener(bet365.CCP.Core.Utils.CSS.PROPERTIES.ANIMATION_END,e),this},GameLauncher:function(n){"use strict";function f(t){t.preventDefault();var i=t.currentTarget.getAttribute("data-game-id"),r=i.replace("GAME",""),u=n.content.gamesSplitLaunchArray&&n.content.gamesSplitLaunchArray.indexOf(r)>=0?i+(bet365.CCP.Core.isDesktop?"DESKTOP":"MOBILE"):i;bet365.CCP.SlotsFeb2018.CTA.custom(u)}function e(){i&&clearTimeout(i);i=setTimeout(function(){s()},50)}function o(n){n.target.classList.remove("CCP_Anim-SoftResolveInLeft");n.target.removeEventListener(bet365.CCP.Core.Utils.CSS.PROPERTIES.ANIMATION_END,o)}function s(){for(var i,n=0;n<t.childNodes.length;n++)i=t.childNodes[n],i.style.width=i.getBoundingClientRect().height+"px"}function h(i){var s={double:u.doubles[r.WEEK-1],feature:u.games[r.DRAW_INDEX]},c=function(){var t=document.createElement("div"),f=bet365.CCP.SlotsFeb2018.Controls.ImageDiv("game-box",n.images["img"+s.double]),r=document.createElement("div"),u=document.createElement("span"),i;return u.className="CCP_button inline",u.innerHTML=n.content.textButtonPlayNow,r.className="button-box",r.appendChild(u),t.className="double-ticket",t.setAttribute("data-game-id","GAME"+s.double.toUpperCase()),t.appendChild(f.domElement),t.appendChild(r),n.content.flagHideBadge||(i=document.createElement("div"),i.className="badge",i.innerHTML="<span>"+bet365.CCP.Core.Utils.Strings.tokenToTag(n.content.textGameDoubleTickets)+"<\/span>",t.appendChild(i)),t}(),h;for(c.addEventListener("click",f),t=document.createElement("div"),t.className="featured-games",h=0;h<s.feature.length;h++){var e=document.createElement("div"),l=document.createElement("img"),a=document.createElement("p");l.src=n.images["img"+s.feature[h]];a.innerHTML=n.content.textButtonPlayNow;e.className="fgame";e.appendChild(l);n.content.flagHidePlayNow||e.appendChild(a);e.setAttribute("data-game-id","GAME"+s.feature[h].toUpperCase());e.addEventListener("click",f);t.appendChild(e)}i.className="CCP_game-launcher CCP_Anim-SoftResolveInLeft";i.appendChild(c);i.appendChild(t);i.addEventListener(bet365.CCP.Core.Utils.CSS.PROPERTIES.ANIMATION_END,o)}var r=bet365.CCP.SlotsFeb2018.DATA,u=bet365.CCP.SlotsFeb2018.DATA.FEATURED_GAMES,t,i;return this.domElement=document.createElement("section"),this.show=function(){this.domElement.classList.remove("CCP_Transition-SoftResolveOutLeft")},this.hide=function(){this.domElement.classList.add("CCP_Transition-SoftResolveOutLeft")},this.applyDesktopFix=function(){for(var i,r=!1,n=0;n<t.childNodes.length;n++)if(i=t.childNodes[n].getBoundingClientRect(),i.width!==i.height){r=!0;break}r&&(s(),bet365.CCP.Core.product==="bingo"||bet365.CCP.Core.isOldIE||window.addEventListener("resize",e))},this.removeDesktopFix=function(){window.removeEventListener("resize",e)},h(this.domElement),this},PrizeTable:function(n){"use strict";function e(n){n.target.classList.remove("CCP_Anim-ModalResolve")}function o(n){n.preventDefault();this.dispatchEvent(u)}function s(){var e=t.PRIZE_TABLE.allocations[t.DRAW_INDEX],o=document.createElement("thead"),s=document.createElement("tbody"),r;for(o.appendChild(function(){for(var i,r=document.createElement("tr"),t=0;t<n.content.textPrizeTableHeadArray.length;t++)i=document.createElement("th"),i.innerHTML=n.content.textPrizeTableHeadArray[t],r.appendChild(i);return r}()),r=0;r<e.length;r++){var u=document.createElement("tr"),h=document.createElement("td"),c=document.createElement("td");h.innerHTML=t.convertCurrency(t.PRIZE_TABLE.tiers[r],n.content.thisLang);c.innerHTML=bet365.CCP.Core.Utils.Numbers.thousands(e[r],f);u.appendChild(h);u.appendChild(c);s.appendChild(u)}i.appendChild(o);i.appendChild(s)}var u=new bet365.CCP.Core.Utils.CCPEvent(this.EventConstants.HIDE_PRIZE_TABLE,{bubbles:!0}),t=bet365.CCP.SlotsFeb2018.DATA,f=bet365.CCP.Core.Utils.Numbers.getDelimiter(n.content.thisLang,"thousands",0),r=document.createElement("h3"),i=document.createElement("table");return this.domElement=document.createElement("section"),this.show=function(){this.domElement.classList.add("CCP_Transition-SlideInUp")},this.hide=function(){this.domElement.classList.remove("CCP_Transition-SlideInUp")},r.innerHTML=n.content.textPrizeTableTitle.replace("[DRAW]",t.DRAW),s(),this.domElement.className="CCP_prize-table",this.domElement.appendChild(r),this.domElement.appendChild(i),this.domElement.appendChild(new bet365.CCP.SlotsFeb2018.Controls.CCPButton("Close",o,{css:"closer",bg:n.images.crosses})),this.domElement.addEventListener(bet365.CCP.Core.Utils.CSS.PROPERTIES.ANIMATION_END,e),this},CountdownTimer:function(n,t){"use strict";function h(n){var t=i.getTime()-n.getTime(),r;r=t<=0?-1:t>=0&&t<=f?1:Math.floor(t/f);i=o();s(r)}function c(){s(-1)}function l(){bet365.CCP.Core.Utils.Dates.getBet365Time(h,c)}function o(){return bet365.CCP.Core.Utils.Dates.getDateObject(n.drawCloseDatesArray[bet365.CCP.SlotsFeb2018.DATA.DRAW_INDEX])}function a(){var i={zero:n.textTicketZero,single:n.textTicketSingle,plural:n.textTicketPlural,pluralAlt:n.textTicketPluralAlt},u=bet365.CCP.Core.Utils.Strings.pluralForm(n.thisLang,i,r,"[NUM]",t);return bet365.CCP.SlotsFeb2018.Utils.createMarkup(u,"span")}function v(i){var r={plural:n.textHourPlural,pluralAlt:n.textHourPluralAlt},u=bet365.CCP.Core.Utils.Strings.pluralForm(n.thisLang,r,i,"[NUM]",t);return bet365.CCP.SlotsFeb2018.Utils.createMarkup(u,"span")}function y(i){var r=Math.floor(i/u),f={single:n.textDaySingle,plural:n.textDayPlural,pluralAlt:n.textDayPluralAlt},e=bet365.CCP.Core.Utils.Strings.pluralForm(n.thisLang,f,r,"[NUM]",t);return bet365.CCP.SlotsFeb2018.Utils.createMarkup(e,"span")}function s(t){for(var r,f=[{test:t===-1,content:{phrase:n.textTicketsProgressError}},{test:t>u,content:{phrase:n.textTicketsProgress,time:y(t)}},{test:t<=1,content:{phrase:n.textTicketsProgressLast}},{test:!0,content:{phrase:n.textTicketsProgress,time:v(t)}}],i=0;i<f.length;i++)if(f[i].test){r=f[i].content;break}e.innerHTML=bet365.CCP.Core.Utils.Strings.tokenToTag(r.phrase.replace("[TICKETS]",a()).replace("[TIME]",r.time))}var i,r,u=24,f=36e5,e=document.createElement("p");return this.domElement=e,this.update=function(n){r=n;i=o();l()},this},LegalFooter:function(n){"use strict";function i(){return n.timestamp?n.content.textLastUpdated+" "+bet365.CCP.Core.Utils.Dates.localiseTimestamp(n.content.thisLang,n.timestamp):""}var t=document.createElement("p");return this.domElement=document.createElement("section"),this.update=function(){t.innerHTML=i()},this.domElement.className="CCP_legal",this.domElement.appendChild(t),this.update(),this}};bet365.CCP.SlotsFeb2018.UI.MainView.prototype.EventConstants=bet365.CCP.SlotsFeb2018.UI.TextView.prototype.EventConstants=bet365.CCP.SlotsFeb2018.UI.PrizeTable.prototype.EventConstants={SHOW_PRIZE_TABLE:"showprizetable",HIDE_PRIZE_TABLE:"hideprizetable"};bet365.CCP.SlotsFeb2018.Widgets={TilesBG:function(n,t){"use strict";var o=2,s=t?"transition-prep":"CCP_Anim-SoftResolveInLeft",e=["Left","Right"],i,r,u,f;for(this.domElement=document.createElement("section"),this.show=function(){this.domElement.classList.remove("transition-prep")},this.hide=function(){this.domElement.classList.add("transition-prep")},f=0;f<e.length;f++){for(i=document.createElement("div"),i.className=e[f].toLowerCase(),r=0;r<o;r++)u=document.createElement("img"),u.src=n["logos"+e[f]],i.appendChild(u);this.domElement.appendChild(i)}if(bet365.CCP.Core.isMobile){for(i=document.createElement("div"),i.className="single",r=0;r<o*2;r++)u=document.createElement("img"),u.src=r%2==0?n.logosLeft:n.logosRight,i.appendChild(u);this.domElement.appendChild(i)}return this.domElement.className="CCP_tiles-bg "+s,this}};bet365.CCP.SlotsFeb2018.Controls={CCPButton:function(n,t,i){"use strict";var r=document.createElement("button");return r.setAttribute("type","button"),r.className="CCP_button",r.innerHTML=n,r.addEventListener("click",t),i&&(i.css&&r.classList.add(i.css),i.bg&&(r.style.backgroundImage="url("+i.bg+")"),i.attribute&&r.setAttribute(i.attribute.name,i.attribute.value)),r},CCPLink:function(n,t,i){"use strict";var r=document.createElement("a");return r.href=i.href||"#",r.className="CCP_link",r.innerHTML=n,r.addEventListener("click",t),i&&(i.css&&r.classList.add(i.css),i.attribute&&r.setAttribute(i.attribute.name,i.attribute.value)),r},ImageDiv:function(n,t,i){"use strict";if(this.domElement=document.createElement("div"),this.domElement.className=n,bet365.CCP.Core.isIE8){var r=document.createElement("img");r.src=t;r.alt=i||"";this.domElement.appendChild(r)}else this.domElement.style.backgroundImage="url("+t+")",this.domElement.innerHTML=i||"";return this}};bet365.CCP.SlotsFeb2018.Utils={createMarkup:function(n,t){"use strict";return"["+t.toUpperCase()+"]"+n+"[/"+t.toUpperCase()+"]"}};bet365.CCP.SlotsFeb2018.PromoState={getPromoState:function(n){"use strict";for(var i=bet365.CCP.SlotsFeb2018.DataManager.dataset.content,r=[{test:i.promoStateTerminate,state:this.Constants.FORCE_END},{test:i.promoStatePre||bet365.CCP.SlotsFeb2018.DATA.DRAW===0,state:this.Constants.PRE_PROMO},{test:i.promoStateEnd||bet365.CCP.SlotsFeb2018.DATA.DRAW>bet365.CCP.SlotsFeb2018.DATA.FEATURED_GAMES.games.length,state:this.Constants.END},{test:bet365.CCP.SlotsFeb2018.DATA.DRAW<0,state:this.Constants.ERROR},{test:!n,state:this.Constants.NOT_LOGGED_IN}],t=0;t<r.length;t++)if(r[t].test)return r[t].state;return this.Constants.RUNNING},isPromoActive:function(n){"use strict";return n===this.Constants.RUNNING||n===this.Constants.NOT_LOGGED_IN},isPromoEnd:function(n){"use strict";return n===this.Constants.END||n===this.Constants.FORCE_END},Constants:{NOT_LOGGED_IN:"notloggedin",PRE_PROMO:"prepromo",RUNNING:"running",END:"promoend",FORCE_END:"forceend",ERROR:"error"}};bet365.CCP.SlotsFeb2018.DATA={DRAW:undefined,DRAW_INDEX:undefined,FINAL_DRAW:undefined,WEEK:undefined,FEATURED_GAMES:undefined,CURRENCY:undefined,CURRENCY_MULTI:undefined,PRIZE_TABLE:{funds:undefined,tiers:undefined,allocations:undefined},init:function(n){"use strict";this.CURRENCY=n.pointsAdditionalParamters||n.content.defaultCurrency||bet365.CCP.Core.Utils.Currency.getDefaultCurrency(n.content.thisLang);this.CURRENCY_MULTI=this.parseCurrencyMultipliers(n.content);this.FEATURED_GAMES=this.parseFeaturedGamesData(n.content);this.PRIZE_TABLE=this.parsePrizeTableData(n.content);this.FINAL_DRAW=this.FEATURED_GAMES.games.length;this.refresh(n)},refresh:function(n){"use strict";this.DRAW=this.getDrawRaw(n.draw);this.DRAW_INDEX=this.DRAW-1;this.WEEK=Math.ceil(this.DRAW/2)},parseFeaturedGamesData:function(n){"use strict";var r={},u=[],t,i;for(r.doubles=n.gamesDoubleTicketsArray,t=1;t<=8;t++)i=n["gamesDraw"+t+"Array"],u.push(typeof i=="string"?[i]:i);return r.games=u,r},parseCurrencyMultipliers:function(n){"use strict";for(var i,r={},u=n.currencyMultipliersArray,t=0;t<u.length;t++)i=u[t].split("=>"),r[i[0]]=i[1];return r},parsePrizeTableData:function(n){"use strict";var t={},e=n.prizeAllocationsArray,i,u,f,r;for(t.funds=n.prizeFundsArray,t.tiers=n.prizeTiersArray,t.allocations=[],i=0;i<e.length;i++){for(u=e[i].split(","),f=[],r=0;r<u.length;r++)f.push(parseInt(u[r],10));t.allocations.push(f)}return t},getDrawRaw:function(n){"use strict";return n&&!isNaN(parseInt(n,10))?parseInt(n,10):0},convertCurrency:function(n,t){"use strict";return bet365.CCP.Core.Utils.Currency.format(n*this.CURRENCY_MULTI[this.CURRENCY],t,this.CURRENCY)}};bet365=bet365||{};bet365.CCP=bet365.CCP||{};bet365.CCP.SlotsFeb2018InGame={id:undefined,div:undefined,wrapper:undefined,overlay:undefined,progbar:undefined,DataManager:undefined,ImagePreloader:undefined,OverlayMonitor:undefined,Errors:new bet365.CCP.Core.ErrorSet,ok:!0,deferred:!1,Version:{ccp:"1.8.4 RC2",app:"1.5.3",date:"2018.01.18",framework:bet365.CCP.Core.version},init:function(n,t){"use strict";this.id=n;this.wrapper=document.createElement("article");this.wrapper.id="__CCP_IG-ContentWrapper";var i=document.getElementById(t);i.insertBefore(this.wrapper,i.firstChild);i.className+=" CCP_IG";bet365.CCP.Core.isOldIE&&i.classList.add("CCP_ie-fix");this.DataManager=new bet365.CCP.Core.BaseDataManager(n,i,this.dataReady,this.dataFail,this);this.OverlayMonitor=new bet365.CCP.Core.OverlayMonitor(this.deferredLaunch,this);this.deferred=this.OverlayMonitor.running;this.DataManager.dataset.localise={isMultiPlural:"cze|svk|pol".indexOf(this.DataManager.dataset.content.thisLang)>=0,pluralThreshold:5};this.CTA.linkFunctionName=this.DataManager.dataset.linkFunctionName;this.ok&&this.preload();delete this.ok},kill:function(){"use strict";this.DataManager.kill();delete this.DataManager},dataReady:function(){"use strict";this.ok=!0},dataFail:function(n){"use strict";this.Errors.add(n);this.ok=!1},preload:function(){"use strict";this.overlay=document.createElement("section");this.overlay.className="CCP_preload-overlay";var n=document.createElement("div");n.className="bar-outer";this.progbar=document.createElement("div");this.progbar.className="bar-inner";n.appendChild(this.progbar);this.overlay.appendChild(n);this.wrapper.appendChild(this.overlay);this.ImagePreloader=new bet365.CCP.Core.ImagePreloader(this.DataManager.dataset.images,this.preloadComplete,this.preloadProgress,this.preloadError,this);this.ImagePreloader.begin()},preloadProgress:function(n){"use strict";this.progbar.style.width=n+"%"},preloadError:function(n){"use strict";this.Errors.add(n);this.preloadCleanup()},preloadComplete:function(){"use strict";this.deferred||(delete this.OverlayMonitor,delete this.deferred,this.preloadCleanup(),this.build())},preloadCleanup:function(){"use strict";this.wrapper.removeChild(this.overlay);delete this.overlay;delete this.progbar;delete this.ImagePreloader},deferredLaunch:function(){"use strict";this.deferred=!1;this.preloadComplete()},CTA:{linkFunctionName:undefined,custom:function(n){"use strict";var t=bet365.CCP.Core.create(this.linkFunctionName);typeof t=="function"&&t(n)},morePromotions:function(){"use strict";var n=bet365.CCP.Core.create(this.linkFunctionName);typeof n=="function"&&n("morePromotionsLink")}},User:{isLoggedIn:function(n){"use strict";return n.loggedIn&&n.loggedIn.toString().toLowerCase()==="true"}},Host:{showGameLauncher:function(n,t){"use strict";var i=n.flagHideGames&&n.flagHideGames.toString().toLowerCase()==="true";return!i&&t}},build:function(){"use strict";function a(){n.DATA.refresh(t);v()?(i.parentNode.removeEventListener(e.EventConstants.DATA_UPDATED,a),n.hardReset()):y()}function v(){var t=n.PromoState.getPromoState(u);return o!==t}function y(){h.update();c.update();l.update();f.update&&f.update()}var i=this.wrapper,e=this.DataManager,t=this.DataManager.dataset,n=bet365.CCP.SlotsFeb2018InGame;n.DATA.init(t);var u=n.User.isLoggedIn(t),o=n.PromoState.getPromoState(u),r=n.PromoState.isPromoActive(o),s=n.Host.showGameLauncher(t.content,r),h,c,f,l;h=new n.UI.Background(t.images,r);c=r?new n.UI.MainView(t,u,s):new n.UI.TextView(t,n.PromoState.isPromoEnd(o));f=s?new n.UI.GameLauncher(t):new n.Widgets.TilesBG(t.images,s);i.appendChild(h.domElement);i.appendChild(c.domElement);i.appendChild(f.domElement);r&&(l=new n.UI.LegalFooter(t),i.appendChild(l.domElement));u&&r?i.parentNode.addEventListener(e.EventConstants.DATA_UPDATED,a):e.ignore()},hardReset:function(){"use strict";while(this.wrapper.firstChild)this.wrapper.removeChild(this.wrapper.firstChild);this.build()}};bet365.CCP.SlotsFeb2018InGame.UI={Background:function(n,t){"use strict";var r=t?bet365.CCP.SlotsFeb2018InGame.DATA.WEEK:1,i=document.createElement("img");return this.domElement=document.createElement("section"),i.src=n.bgMask,this.domElement.className="CCP_IG-bg",this.domElement.style.backgroundImage="url("+n["bgWeek"+r]+")",this.domElement.appendChild(i),this},MainView:function(n,t,i){"use strict";function w(){var t=parseInt(n.tickets,10);return isNaN(t)?0:t}function a(){c=w();r.DRAW_INDEX!==f&&(f=r.DRAW_INDEX);k()}function v(){return r.convertCurrency(r.PRIZE_TABLE.funds[Math.floor(f/2)]*1e3,n.content.thisLang)}function y(){return r.DRAW===r.FINAL_DRAW?n.content.textPrizeDrawLast:r.DRAW%2==0?n.content.textPrizeDrawEven:n.content.textPrizeDrawOdd}function b(){var n=r.FEATURED_GAMES.games[r.DRAW_INDEX].length+1;return{isReduced:n<p,count:n}}function k(){var n=i?b():!1;h.innerHTML=y().replace("[FUND]",v());s.update(c);u.className=l;n.isReduced&&u.classList.add("only"+n.count+"games")}var r=bet365.CCP.SlotsFeb2018InGame.DATA,c,f,p=4,e=document.createElement("img"),o=document.createElement("div"),h=document.createElement("h3"),s=t?new bet365.CCP.SlotsFeb2018InGame.UI.CountdownTimer(n.content,n.localise):document.createElement("p"),u=document.createElement("section"),l="CCP_IG-main"+(i?"":" no-games");return this.update=function(){a()},f=r.DRAW_INDEX,e.className="logo",e.alt=n.content.altLogo,e.src=n.images.logo,o.className="text-wrap",o.appendChild(h),o.appendChild(s.domElement||s),u.className=l,u.appendChild(e),u.appendChild(o),t?a():(h.innerHTML=y().replace("[FUND]",v()),s.innerHTML=n.content.textLoggedOut),this.domElement=u,this},TextView:function(n,t){"use strict";function e(n){n.preventDefault();bet365.CCP.SlotsFeb2018InGame.CTA.morePromotions()}var r=document.createElement("img"),i=document.createElement("div"),u=document.createElement("p"),f=document.createElement("p");return this.domElement=document.createElement("section"),r.className="logo",r.alt=n.content.altLogo,r.src=n.images.logo,u.innerHTML=t?n.content.textEndTitle:n.content.textPrePromoTitle,f.innerHTML=t?n.content.textEndBody:n.content.textPrePromoBody,i.className="text-wrap",i.appendChild(u),i.appendChild(f),this.domElement.className="CCP_IG-main no-games",this.domElement.appendChild(r),this.domElement.appendChild(i),t&&i.appendChild(new bet365.CCP.SlotsFeb2018InGame.Widgets.CCPButton(n.content.textButtonMorePromo,e)),this},GameLauncher:function(n){"use strict";function o(n){n.preventDefault();var t=n.currentTarget.getAttribute("data-game-id");bet365.CCP.SlotsFeb2018InGame.CTA.custom(t)}function s(){var r=[],u=i.games[t.DRAW_INDEX],n;for(r.push(i.doubles[t.WEEK-1]),n=0;n<u.length;n++)r.push(u[n]);return r}function u(){r=t.DRAW}function f(t){var i=s(),h=document.createElement("ul"),r,u,c,f;for(t.className="CCP_IG-game-launcher",r=0;r<i.length;r++)u=document.createElement("li"),c=document.createElement("img"),c.src=n.images["img"+i[r]],u.appendChild(c),u.setAttribute("data-game-id","GAME"+i[r].toUpperCase()),u.addEventListener("click",o),h.appendChild(u);n.content.flagHideBadge||(f=document.createElement("div"),f.className="badge",f.innerHTML="<span>"+bet365.CCP.Core.Utils.Strings.tokenToTag(n.content.textGameDoubleTickets)+"<\/span>",h.firstChild.appendChild(f));i.length<e&&t.classList.add("only"+i.length+"games");t.appendChild(h)}var t=bet365.CCP.SlotsFeb2018InGame.DATA,i=bet365.CCP.SlotsFeb2018InGame.DATA.FEATURED_GAMES,r,e=4;return this.domElement=document.createElement("section"),this.update=function(){t.DRAW!==r&&(this.destroy(),u(),f(this.domElement))},u(),f(this.domElement),this},CountdownTimer:function(n,t){"use strict";function h(n){var t=i.getTime()-n.getTime(),r;r=t<=0?-1:t>=0&&t<=f?1:Math.floor(t/f);i=o();s(r)}function c(){s(-1)}function l(){bet365.CCP.Core.Utils.Dates.getBet365Time(h,c)}function o(){return bet365.CCP.Core.Utils.Dates.getDateObject(n.drawCloseDatesArray[bet365.CCP.SlotsFeb2018InGame.DATA.DRAW_INDEX])}function a(){var i={zero:n.textTicketZero,single:n.textTicketSingle,plural:n.textTicketPlural,pluralAlt:n.textTicketPluralAlt},u=bet365.CCP.Core.Utils.Strings.pluralForm(n.thisLang,i,r,"[NUM]",t);return bet365.CCP.SlotsFeb2018InGame.Utils.createMarkup(u,"span")}function v(i){var r={plural:n.textHourPlural,pluralAlt:n.textHourPluralAlt},u=bet365.CCP.Core.Utils.Strings.pluralForm(n.thisLang,r,i,"[NUM]",t);return bet365.CCP.SlotsFeb2018InGame.Utils.createMarkup(u,"span")}function y(i){var r=Math.floor(i/u),f={single:n.textDaySingle,plural:n.textDayPlural,pluralAlt:n.textDayPluralAlt},e=bet365.CCP.Core.Utils.Strings.pluralForm(n.thisLang,f,r,"[NUM]",t);return bet365.CCP.SlotsFeb2018InGame.Utils.createMarkup(e,"span")}function s(t){for(var r,f=[{test:t===-1,content:{phrase:n.textTicketsProgressError}},{test:t>u,content:{phrase:n.textTicketsProgress,time:y(t)}},{test:t<=1,content:{phrase:n.textTicketsProgressLast}},{test:!0,content:{phrase:n.textTicketsProgress,time:v(t)}}],i=0;i<f.length;i++)if(f[i].test){r=f[i].content;break}e.innerHTML=bet365.CCP.Core.Utils.Strings.tokenToTag(r.phrase.replace("[TICKETS]",a()).replace("[TIME]",r.time))}var i,r,u=24,f=36e5,e=document.createElement("p");return this.domElement=e,this.update=function(n){r=n;i=o();l()},this},LegalFooter:function(n){"use strict";function r(n){n.preventDefault();bet365.CCP.SlotsFeb2018InGame.CTA.custom("promoPageLink")}function u(){return n.timestamp?n.content.textLastUpdated+" "+bet365.CCP.Core.Utils.Dates.localiseTimestamp(n.content.thisLang,n.timestamp):""}var t=document.createElement("p"),i=new bet365.CCP.SlotsFeb2018InGame.Widgets.CCPLink(n.content.textButtonTCs,r,{css:"terms",href:"#showTermsAndConditions"});return this.domElement=document.createElement("section"),this.update=function(){t.innerHTML=u()},this.domElement.className="CCP_IG-legal",this.domElement.appendChild(t),this.domElement.appendChild(i),this.update(),this}};bet365.CCP.SlotsFeb2018InGame.UI.GameLauncher.prototype={domElement:undefined,destroy:function(){"use strict";while(this.domElement.firstChild)this.domElement.removeChild(this.domElement.firstChild)}};bet365.CCP.SlotsFeb2018InGame.Widgets={TilesBG:function(n){"use strict";var r=["Left","Right"],t,i,u,f;for(this.domElement=document.createElement("section"),t=0;t<r.length;t++){for(i=document.createElement("div"),i.className=r[t].toLowerCase(),u=0;u<2;u++)f=document.createElement("img"),f.src=n["logos"+r[t]],i.appendChild(f);this.domElement.appendChild(i)}return this.domElement.className="CCP_IG-tiles-bg",this},CCPButton:function(n,t,i){"use strict";var r=document.createElement("button");return r.setAttribute("type","button"),r.className="CCP_IG-button",r.innerHTML=n,r.addEventListener("click",t),i&&(i.css&&r.classList.add(i.css),i.bg&&(r.style.backgroundImage="url("+i.bg+")"),i.attribute&&r.setAttribute(i.attribute.name,i.attribute.value)),r},CCPLink:function(n,t,i){"use strict";var r=document.createElement("a");return r.href=i.href||"#",r.className="CCP_IG-link",r.innerHTML=n,r.addEventListener("click",t),i&&(i.css&&r.classList.add(i.css),i.attribute&&r.setAttribute(i.attribute.name,i.attribute.value)),r}};bet365.CCP.SlotsFeb2018InGame.Utils={createMarkup:function(n,t){"use strict";return"["+t.toUpperCase()+"]"+n+"[/"+t.toUpperCase()+"]"}};bet365.CCP.SlotsFeb2018InGame.PromoState={getPromoState:function(n){"use strict";for(var i=bet365.CCP.SlotsFeb2018InGame.DataManager.dataset.content,r=[{test:i.promoStateTerminate,state:this.Constants.FORCE_END},{test:i.promoStatePre||bet365.CCP.SlotsFeb2018InGame.DATA.DRAW===0,state:this.Constants.PRE_PROMO},{test:i.promoStateEnd||bet365.CCP.SlotsFeb2018InGame.DATA.DRAW>bet365.CCP.SlotsFeb2018InGame.DATA.FEATURED_GAMES.games.length,state:this.Constants.END},{test:bet365.CCP.SlotsFeb2018InGame.DATA.DRAW<0,state:this.Constants.ERROR},{test:!n,state:this.Constants.NOT_LOGGED_IN}],t=0;t<r.length;t++)if(r[t].test)return r[t].state;return this.Constants.RUNNING},isPromoActive:function(n){"use strict";return n===this.Constants.RUNNING||n===this.Constants.NOT_LOGGED_IN},isPromoEnd:function(n){"use strict";return n===this.Constants.END||n===this.Constants.FORCE_END},Constants:{NOT_LOGGED_IN:"notloggedin",PRE_PROMO:"prepromo",RUNNING:"running",END:"promoend",FORCE_END:"forceend",ERROR:"error"}};bet365.CCP.SlotsFeb2018InGame.DATA={DRAW:undefined,DRAW_INDEX:undefined,FINAL_DRAW:undefined,WEEK:undefined,FEATURED_GAMES:undefined,CURRENCY:undefined,CURRENCY_MULTI:undefined,PRIZE_TABLE:{funds:undefined,tiers:undefined,allocations:undefined},init:function(n){"use strict";this.CURRENCY=n.pointsAdditionalParamters||n.content.defaultCurrency||bet365.CCP.Core.Utils.Currency.getDefaultCurrency(n.content.thisLang);this.CURRENCY_MULTI=this.parseCurrencyMultipliers(n.content);this.FEATURED_GAMES=this.parseFeaturedGamesData(n.content);this.PRIZE_TABLE=this.parsePrizeTableData(n.content);this.FINAL_DRAW=this.FEATURED_GAMES.games.length;this.refresh(n)},refresh:function(n){"use strict";this.DRAW=this.getDrawRaw(n.draw);this.DRAW_INDEX=this.DRAW-1;this.WEEK=Math.ceil(this.DRAW/2)},parseFeaturedGamesData:function(n){"use strict";var r={},u=[],t,i;for(r.doubles=n.gamesDoubleTicketsArray,t=1;t<=8;t++)i=n["gamesDraw"+t+"Array"],u.push(typeof i=="string"?[i]:i);return r.games=u,r},parseCurrencyMultipliers:function(n){"use strict";for(var i,r={},u=n.currencyMultipliersArray,t=0;t<u.length;t++)i=u[t].split("=>"),r[i[0]]=i[1];return r},parsePrizeTableData:function(n){"use strict";var t={},e=n.prizeAllocationsArray,i,u,f,r;for(t.funds=n.prizeFundsArray,t.tiers=n.prizeTiersArray,t.allocations=[],i=0;i<e.length;i++){for(u=e[i].split(","),f=[],r=0;r<u.length;r++)f.push(parseInt(u[r],10));t.allocations.push(f)}return t},getDrawRaw:function(n){"use strict";return n&&!isNaN(parseInt(n,10))?parseInt(n,10):0},convertCurrency:function(n,t){"use strict";return bet365.CCP.Core.Utils.Currency.format(n*this.CURRENCY_MULTI[this.CURRENCY],t,this.CURRENCY)}}