diff --git a/sdk/js/player.js b/sdk/js/player.js index a54d3e7..1f63f71 100644 --- a/sdk/js/player.js +++ b/sdk/js/player.js @@ -60,8 +60,8 @@ define(['jquery', 'vendor/simple-slider', 'underscore', 'vendor/sc-interface', ' var container = $(dom); var currentRatio = null; var currentTimeIn = null; - var bufferPauseThreshold = 3000; // If the track plays within this many milliseconds of the buffer edge, pause and wait. - var bufferResumeThreshold = 6000; // Once the buffer is this var past the play progress, it will resume. + var bufferPauseThreshold = 5000; // If the track plays within this many milliseconds of the buffer edge, pause and wait. + var bufferResumeThreshold = 10000; // Once the buffer is this var past the play progress, it will resume. var trackLoadedPercent = null; var trackLoadedTime = null; var trackPlayedPercent = null; diff --git a/toneden.js b/toneden.js index a975870..d4ead6f 100644 --- a/toneden.js +++ b/toneden.js @@ -14,4 +14,4 @@ a.artwork_url&&(a.artwork_url=a.artwork_url.replace("large.jpg","t500x500.jpg")) },classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b,c=a.length;c--;)b=a[c],this.options.stringParams?(b.depth&&this.addDepth(b.depth),this.opcode("getContext",b.depth||0),this.opcode("pushStringParam",b.stringModeValue,b.type),"sexpr"===b.type&&this.sexpr(b)):this[b.type](b)},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},e.precompile=c,e.compile=d,e}(c),k=function(a,b){function c(a){this.value=a}function d(){}var e,f=a.COMPILER_REVISION,g=a.REVISION_CHANGES,h=a.log,i=b;d.prototype={nameLookup:function(a,b){var c,e;return 0===a.indexOf("depth")&&(c=!0),e=/^[0-9]+$/.test(b)?a+"["+b+"]":d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']",c?"("+a+" && "+e+")":e},compilerInfo:function(){var a=f,b=g[a];return"this.compilerInfo = ["+a+",'"+b+"'];\n"},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b||{},h("debug",this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b);var e,f=a.opcodes;this.i=0;for(var g=f.length;this.ie;e++)d.push("depth"+this.environment.depths.list[e]);var g=this.mergeSource();if(this.isChild||(g=this.compilerInfo()+g),a)return d.push(g),Function.apply(this,d);var i="function "+(this.name||"")+"("+d.join(",")+") {\n "+g+"}";return h("debug",i+"\n\n"),i},mergeSource:function(){for(var a,b="",c=0,d=this.source.length;d>c;c++){var e=this.source[c];e.appendToBuffer?a=a?a+"\n + "+e.content:e.content:(a&&(b+="buffer += "+a+";\n ",a=void 0),b+=e+"\n ")}return b},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a),this.replaceStack(function(b){return a.splice(1,0,b),"blockHelperMissing.call("+a.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a);var b=this.topStack();a.splice(1,0,b),this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.stripNext&&(a=a.replace(/^\s+/,"")),this.pendingContent=a},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,"")),this.stripNext="strip"},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext!==a&&(this.lastContext=a)},lookupOnContext:function(a){this.push(this.nameLookup("depth"+this.lastContext,a,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(a){return"typeof "+a+" === functionType ? "+a+".apply(depth0) : "+a})},lookup:function(a){this.replaceStack(function(b){return b+" == null || "+b+" === false ? "+b+" : "+this.nameLookup(b,a,"context")})},lookupData:function(){this.pushStackLiteral("data")},pushStringParam:function(a,b){this.pushStackLiteral("depth"+this.lastContext),this.pushString(b),"sexpr"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.options.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}")),this.push("{\n "+a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){this.pushStackLiteral(null!=a?this.programExpression(a):null)},invokeHelper:function(a,b,c){this.context.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var d=this.lastHelper=this.setupHelper(a,b,!0),e=this.nameLookup("depth"+this.lastContext,b,"context"),f="helper = "+d.name+" || "+e;d.paramsInit&&(f+=","+d.paramsInit),this.push("("+f+",helper ? helper.call("+d.callParams+") : helperMissing.call("+d.helperMissingParams+"))"),c||this.flushInline()},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.context.aliases.functionType='"function"',this.useRegister("helper"),this.emptyHash();var c=this.setupHelper(0,a,b),d=this.lastHelper=this.nameLookup("helpers",a,"helper"),e=this.nameLookup("depth"+this.lastContext,a,"context"),f=this.nextStack();c.paramsInit&&this.pushSource(c.paramsInit),this.pushSource("if (helper = "+d+") { "+f+" = helper.call("+c.callParams+"); }"),this.pushSource("else { helper = "+e+"; "+f+" = typeof helper === functionType ? helper.call("+c.callParams+") : helper; }")},invokePartial:function(a){var b=[this.nameLookup("partials",a,"partial"),"'"+a+"'",this.popStack(),"helpers","partials"];this.options.data&&b.push("data"),this.context.aliases.self="this",this.push("self.invokePartial("+b.join(", ")+")")},assignToHash:function(a){var b,c,d=this.popStack();this.options.stringParams&&(c=this.popStack(),b=this.popStack());var e=this.hash;b&&e.contexts.push("'"+a+"': "+b),c&&e.types.push("'"+a+"': "+c),e.values.push("'"+a+"': ("+d+")")},compiler:d,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context),this.context.environments[h]=c):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){if(this.context.aliases.self="this",null==a)return"self.noop";for(var b,c=this.environment.children[a],d=c.depths.list,e=[c.index,c.name,"data"],f=0,g=d.length;g>f;f++)b=d[f],e.push(1===b?"depth0":"depth"+(b-1));return(0===d.length?"self.program(":"self.programWithDepth(")+e.join(", ")+")"},register:function(a,b){this.useRegister(a),this.pushSource(a+" = "+b+";")},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return a&&this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){var b,d,e,f="",g=this.isInline();if(g){var h=this.popStack(!0);if(h instanceof c)b=h.value,e=!0;else{d=!this.stackSlot;var i=d?this.incrStack():this.topStackName();f="("+this.push(i)+" = "+h+"),",b=this.topStack()}}else b=this.topStack();var j=a.call(this,b);return g?(e||this.popStack(),d&&this.stackSlot--,this.push("("+f+j+")")):(/^stack/.test(b)||(b=this.nextStack()),this.pushSource(b+" = ("+f+j+");")),b},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,d=a.length;d>b;b++){var e=a[b];e instanceof c?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),d=(b?this.inlineStack:this.compileStack).pop();if(!a&&d instanceof c)return d.value;if(!b){if(!this.stackSlot)throw new i("Invalid stack pop");this.stackSlot--}return d},topStack:function(a){var b=this.isInline()?this.inlineStack:this.compileStack,d=b[b.length-1];return!a&&d instanceof c?d.value:d},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(a,b,c){var d=[],e=this.setupParams(a,d,c),f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:["depth0"].concat(d).join(", "),helperMissingParams:c&&["depth0",this.quotedString(b)].concat(d).join(", ")}},setupOptions:function(a,b){var c,d,e,f=[],g=[],h=[];f.push("hash:"+this.popStack()),this.options.stringParams&&(f.push("hashTypes:"+this.popStack()),f.push("hashContexts:"+this.popStack())),d=this.popStack(),e=this.popStack(),(e||d)&&(e||(this.context.aliases.self="this",e="self.noop"),d||(this.context.aliases.self="this",d="self.noop"),f.push("inverse:"+d),f.push("fn:"+e));for(var i=0;a>i;i++)c=this.popStack(),b.push(c),this.options.stringParams&&(h.push(this.popStack()),g.push(this.popStack()));return this.options.stringParams&&(f.push("contexts:["+g.join(",")+"]"),f.push("types:["+h.join(",")+"]")),this.options.data&&f.push("data:data"),f},setupParams:function(a,b,c){var d="{"+this.setupOptions(a,b).join(",")+"}";return c?(this.useRegister("options"),b.push("options"),"options="+d):(b.push(d),"")}};for(var j="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),k=d.RESERVED_WORDS={},l=0,m=j.length;m>l;l++)k[j[l]]=!0;return d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)?!0:!1},e=d}(d,c),l=function(a,b,c,d,e){var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=function(b,c){return m(b,c,a)},a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,f=g}(f,g,i,j,k);return l}();ToneDen.define("vendor/handlebars",function(){}),ToneDen.define("hbs/handlebars",[],function(){var a=function(){var a=function(){function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){function b(a){return h[a]||"&"}function c(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])}function d(a){return a instanceof g?a.toString():a||0===a?(a=""+a,j.test(a)?a.replace(i,b):a):""}function e(a){return a||0===a?m(a)&&0===a.length?!0:!1:!0}var f={},g=a,h={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},i=/[&<>"'`]/g,j=/[&<>"'`]/;f.extend=c;var k=Object.prototype.toString;f.toString=k;var l=function(a){return"function"==typeof a};l(/x/)&&(l=function(a){return"function"==typeof a&&"[object Function]"===k.call(a)});var l;f.isFunction=l;var m=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===k.call(a):!1};return f.isArray=m,f.escapeExpression=d,f.isEmpty=e,f}(a),c=function(){function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f0?a.helpers.each(b,c):d(this):e(b)}),a.registerHelper("each",function(a,b){var c,d=b.fn,e=b.inverse,f=0,g="";if(m(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(l(a))for(var h=a.length;h>f;f++)c&&(c.index=f,c.first=0===f,c.last=f===a.length-1),g+=d(a[f],{data:c});else for(var i in a)a.hasOwnProperty(i)&&(c&&(c.key=i,c.index=f,c.first=0===f),g+=d(a[i],{data:c}),f++);return 0===f&&(g=e(this)),g}),a.registerHelper("if",function(a,b){return m(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||g.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){return m(a)&&(a=a.call(this)),g.isEmpty(a)?void 0:b.fn(a)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)})}function e(a,b){p.log(a,b)}var f={},g=a,h=b,i="1.3.0";f.VERSION=i;var j=4;f.COMPILER_REVISION=j;var k={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};f.REVISION_CHANGES=k;var l=g.isArray,m=g.isFunction,n=g.toString,o="[object Object]";f.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:p,log:e,registerHelper:function(a,b,c){if(n.call(a)===o){if(c||b)throw new h("Arg not supported with multiple helpers");g.extend(this.helpers,a)}else c&&(b.not=c),this.helpers[a]=b},registerPartial:function(a,b){n.call(a)===o?g.extend(this.partials,a):this.partials[a]=b}};var p={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(p.level<=a){var c=p.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};f.logger=p,f.log=e;var q=function(a){var b={};return g.extend(b,a),b};return f.createFrame=q,f}(b,c),e=function(a,b,c){function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");var c=function(a,c,d,e,f,g){var h=b.VM.invokePartial.apply(this,arguments);if(null!=h)return h;if(b.compile){var i={helpers:e,partials:f,data:g};return f[c]=b.compile(a,{data:void 0!==g},b),f[c](d,i)}throw new l("The partial "+c+" could not be compiled when running in runtime-only mode")},d={escapeExpression:k.escapeExpression,invokePartial:c,programs:[],program:function(a,b,c){var d=this.programs[a];return c?d=g(a,b,c):d||(d=this.programs[a]=g(a,b)),d},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c={},k.extend(c,b),k.extend(c,a)),c},programWithDepth:b.VM.programWithDepth,noop:b.VM.noop,compilerInfo:null};return function(c,e){e=e||{};var f,g,h=e.partial?e:b;e.partial||(f=e.helpers,g=e.partials);var i=a.call(d,h,c,f,g,e.data);return e.partial||b.VM.checkRevision(d.compilerInfo),i}}function f(a,b,c){var d=Array.prototype.slice.call(arguments,3),e=function(a,e){return e=e||{},b.apply(this,[a,e.data||c].concat(d))};return e.program=a,e.depth=d.length,e}function g(a,b,c){var d=function(a,d){return d=d||{},b(a,d.data||c)};return d.program=a,d.depth=0,d}function h(a,b,c,d,e,f){var g={partial:!0,helpers:d,partials:e,data:f};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,g):void 0}function i(){return""}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES;return j.checkRevision=d,j.template=e,j.programWithDepth=f,j.program=g,j.invokePartial=h,j.noop=i,j}(b,c,d),f=function(a,b,c,d,e){var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,f=m}(d,a,c,b,e),g=function(a){function b(a){a=a||{},this.firstLine=a.first_line,this.firstColumn=a.first_column,this.lastColumn=a.last_column,this.lastLine=a.last_line}var c,d=a,e={ProgramNode:function(a,c,d,f){var g,h;3===arguments.length?(f=d,d=null):2===arguments.length&&(f=c,c=null),b.call(this,f),this.type="program",this.statements=a,this.strip={},d?(h=d[0],h?(g={first_line:h.firstLine,last_line:h.lastLine,last_column:h.lastColumn,first_column:h.firstColumn},this.inverse=new e.ProgramNode(d,c,g)):this.inverse=new e.ProgramNode(d,c),this.strip.right=c.left):c&&(this.strip.left=c.right)},MustacheNode:function(a,c,d,f,g){if(b.call(this,g),this.type="mustache",this.strip=f,null!=d&&d.charAt){var h=d.charAt(3)||d.charAt(2);this.escaped="{"!==h&&"&"!==h}else this.escaped=!!d;this.sexpr=a instanceof e.SexprNode?a:new e.SexprNode(a,c),this.sexpr.isRoot=!0,this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(a,c,d){b.call(this,d),this.type="sexpr",this.hash=c;var e=this.id=a[0],f=this.params=a.slice(1),g=this.eligibleHelper=e.isSimple;this.isHelper=g&&(f.length||c)},PartialNode:function(a,c,d,e){b.call(this,e),this.type="partial",this.partialName=a,this.context=c,this.strip=d},BlockNode:function(a,c,e,f,g){if(b.call(this,g),a.sexpr.id.original!==f.path.original)throw new d(a.sexpr.id.original+" doesn't match "+f.path.original,this);this.type="block",this.mustache=a,this.program=c,this.inverse=e,this.strip={left:a.strip.left,right:f.strip.right},(c||e).strip.left=a.strip.right,(e||c).strip.right=f.strip.left,e&&!c&&(this.isInverse=!0)},ContentNode:function(a,c){b.call(this,c),this.type="content",this.string=a},HashNode:function(a,c){b.call(this,c),this.type="hash",this.pairs=a},IdNode:function(a,c){b.call(this,c),this.type="ID";for(var e="",f=[],g=0,h=0,i=a.length;i>h;h++){var j=a[h].part;if(e+=(a[h].separator||"")+j,".."===j||"."===j||"this"===j){if(f.length>0)throw new d("Invalid path: "+e,this);".."===j?g++:this.isScoped=!0}else f.push(j)}this.original=e,this.parts=f,this.string=f.join("."),this.depth=g,this.isSimple=1===a.length&&!this.isScoped&&0===g,this.stringModeValue=this.string},PartialNameNode:function(a,c){b.call(this,c),this.type="PARTIAL_NAME",this.name=a.original},DataNode:function(a,c){b.call(this,c),this.type="DATA",this.id=a},StringNode:function(a,c){b.call(this,c),this.type="STRING",this.original=this.string=this.stringModeValue=a},IntegerNode:function(a,c){b.call(this,c),this.type="INTEGER",this.original=this.integer=a,this.stringModeValue=Number(a)},BooleanNode:function(a,c){b.call(this,c),this.type="BOOLEAN",this.bool=a,this.stringModeValue="true"===a},CommentNode:function(a,c){b.call(this,c),this.type="comment",this.comment=a}};return c=e}(c),h=function(){var a,b=function(){function a(a,b){return{left:"~"===a.charAt(2),right:"~"===b.charAt(0)||"~"===b.charAt(1)}}function b(){this.yy={}}var c={trace:function(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,sexpr:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,sexpr_repetition0:28,sexpr_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,OPEN_SEXPR:35,CLOSE_SEXPR:36,hash:37,hash_repetition_plus0:38,hashSegment:39,ID:40,EQUALS:41,DATA:42,pathSegments:43,SEP:44,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],performAction:function(b,c,d,e,f,g){var h=g.length-1;switch(f){case 1:return new e.ProgramNode(g[h-1],this._$);case 2:return new e.ProgramNode([],this._$);case 3:this.$=new e.ProgramNode([],g[h-1],g[h],this._$);break;case 4:this.$=new e.ProgramNode(g[h-2],g[h-1],g[h],this._$);break;case 5:this.$=new e.ProgramNode(g[h-1],g[h],[],this._$);break;case 6:this.$=new e.ProgramNode(g[h],this._$);break;case 7:this.$=new e.ProgramNode([],this._$);break;case 8:this.$=new e.ProgramNode([],this._$);break;case 9:this.$=[g[h]];break;case 10:g[h-1].push(g[h]),this.$=g[h-1];break;case 11:this.$=new e.BlockNode(g[h-2],g[h-1].inverse,g[h-1],g[h],this._$);break;case 12:this.$=new e.BlockNode(g[h-2],g[h-1],g[h-1].inverse,g[h],this._$);break;case 13:this.$=g[h];break;case 14:this.$=g[h];break;case 15:this.$=new e.ContentNode(g[h],this._$);break;case 16:this.$=new e.CommentNode(g[h],this._$);break;case 17:this.$=new e.MustacheNode(g[h-1],null,g[h-2],a(g[h-2],g[h]),this._$);break;case 18:this.$=new e.MustacheNode(g[h-1],null,g[h-2],a(g[h-2],g[h]),this._$);break;case 19:this.$={path:g[h-1],strip:a(g[h-2],g[h])};break;case 20:this.$=new e.MustacheNode(g[h-1],null,g[h-2],a(g[h-2],g[h]),this._$);break;case 21:this.$=new e.MustacheNode(g[h-1],null,g[h-2],a(g[h-2],g[h]),this._$);break;case 22:this.$=new e.PartialNode(g[h-2],g[h-1],a(g[h-3],g[h]),this._$);break;case 23:this.$=a(g[h-1],g[h]);break;case 24:this.$=new e.SexprNode([g[h-2]].concat(g[h-1]),g[h],this._$);break;case 25:this.$=new e.SexprNode([g[h]],null,this._$);break;case 26:this.$=g[h];break;case 27:this.$=new e.StringNode(g[h],this._$);break;case 28:this.$=new e.IntegerNode(g[h],this._$);break;case 29:this.$=new e.BooleanNode(g[h],this._$);break;case 30:this.$=g[h];break;case 31:g[h-1].isHelper=!0,this.$=g[h-1];break;case 32:this.$=new e.HashNode(g[h],this._$);break;case 33:this.$=[g[h-2],g[h]];break;case 34:this.$=new e.PartialNameNode(g[h],this._$);break;case 35:this.$=new e.PartialNameNode(new e.StringNode(g[h],this._$),this._$);break;case 36:this.$=new e.PartialNameNode(new e.IntegerNode(g[h],this._$));break;case 37:this.$=new e.DataNode(g[h],this._$);break;case 38:this.$=new e.IdNode(g[h],this._$);break;case 39:g[h-2].push({part:g[h],separator:g[h-1]}),this.$=g[h-2];break;case 40:this.$=[{part:g[h]}];break;case 43:this.$=[];break;case 44:g[h-1].push(g[h]);break;case 47:this.$=[g[h]];break;case 48:g[h-1].push(g[h])}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],defaultActions:{3:[2,2],16:[2,1],50:[2,42]},parseError:function(a){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},d=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=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),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,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(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a: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 a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},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(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return e(0,4),this.popState(),15;case 4:return 35;case 5:return 36;case 6:return 25;case 7:return 16;case 8:return 20;case 9:return 19;case 10:return 19;case 11:return 23;case 12:return 22;case 13:this.popState(),this.begin("com");break;case 14:return e(3,5),this.popState(),15;case 15:return 22;case 16:return 41;case 17:return 40;case 18:return 40;case 19:return 44;case 20:break;case 21:return this.popState(),24;case 22:return this.popState(),18;case 23:return b.yytext=e(1,2).replace(/\\"/g,'"'),32;case 24:return b.yytext=e(1,2).replace(/\\'/g,"'"),32;case 25:return 42;case 26:return 34;case 27:return 34;case 28:return 33;case 29:return 40;case 30:return b.yytext=e(1,2),40;case 31:return"INVALID";case 32:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,32],inclusive:!0}},a}();return c.lexer=d,b.prototype=c,c.Parser=b,new b}();return a=b}(),i=function(a,b){function c(a){return a.constructor===f.ProgramNode?a:(e.yy=f,e.parse(a))}var d={},e=a,f=b;return d.parser=e,d.parse=c,d}(h,g),j=function(a){function b(){}function c(a,b,c){if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new f("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0);var d=c.parse(a),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function d(a,b,c){function d(){var d=c.parse(a),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new f("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=b||{},"data"in b||(b.data=!0);var e;return function(a,b){return e||(e=d()),e.call(this,a,b)}}var e={},f=a;return e.Compiler=b,b.prototype={compiler:b,disassemble:function(){for(var a,b,c,d=this.opcodes,e=[],f=0,g=d.length;g>f;f++)if(a=d[f],"DECLARE"===a.opcode)e.push("DECLARE "+a.name+"="+a.value);else{b=[];for(var h=0;hc;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||d.args.length!==e.args.length)return!1;for(var f=0;fc;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=b;var c=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0},c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){var b,c=a.strip||{};return c.left&&this.opcode("strip"),b=this[a.type](a),c.right&&this.opcode("strip"),b},program:function(a){for(var b=a.statements,c=0,d=b.length;d>c;c++)this.accept(b[c]);return this.isSimple=1===d,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(a){var b,c=(new this.compiler).compile(a,this.options),d=this.guid++;this.usePartial=this.usePartial||c.usePartial,this.children[d]=c;for(var e=0,f=c.depths.list.length;f>e;e++)b=c.depths.list[e],2>b||this.addDepth(b-1);return d},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;c&&(c=this.compileProgram(c)),d&&(d=this.compileProgram(d));var e=b.sexpr,f=this.classifySexpr(e);"helper"===f?this.helperSexpr(e,c,d):"simple"===f?(this.simpleSexpr(e),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousSexpr(e,c,d),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(a){var b,c,d=a.pairs;this.opcode("pushHash");for(var e=0,f=d.length;f>e;e++)b=d[e],c=b[1],this.options.stringParams?(c.depth&&this.addDepth(c.depth),this.opcode("getContext",c.depth||0),this.opcode("pushStringParam",c.stringModeValue,c.type),"sexpr"===c.type&&this.sexpr(c)):this.accept(c),this.opcode("assignToHash",b[0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0,a.context?this.ID(a.context):this.opcode("push","depth0"),this.opcode("invokePartial",b.name),this.opcode("append")},content:function(a){this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr),this.opcode(a.escaped&&!this.options.noEscape?"appendEscaped":"append")},ambiguousSexpr:function(a,b,c){var d=a.id,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.id;"DATA"===b.type?this.DATA(b):b.parts.length?this.ID(b):(this.addDepth(b.depth),this.opcode("getContext",b.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.id.parts[0];if(this.options.knownHelpers[e])this.opcode("invokeKnownHelper",d.length,e);else{if(this.options.knownHelpersOnly)throw new f("You specified knownHelpersOnly, but used the unknown helper "+e,a);this.opcode("invokeHelper",d.length,e,a.isRoot)}},sexpr:function(a){var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0];b?this.opcode("lookupOnContext",a.parts[0]):this.opcode("pushContext");for(var c=1,d=a.parts.length;d>c;c++)this.opcode("lookup",a.parts[c])},DATA:function(a){if(this.options.data=!0,a.id.isScoped||a.id.depth)throw new f("Scoped data references are not supported: "+a.original,a);this.opcode("lookupData");for(var b=a.id.parts,c=0,d=b.length;d>c;c++)this.opcode("lookup",b[c])},STRING:function(a){this.opcode("pushString",a.string)},INTEGER:function(a){this.opcode("pushLiteral",a.integer)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:[].slice.call(arguments,1)})},declare:function(a,b){this.opcodes.push({opcode:"DECLARE",name:a,value:b})},addDepth:function(a){0!==a&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b,c=a.length;c--;)b=a[c],this.options.stringParams?(b.depth&&this.addDepth(b.depth),this.opcode("getContext",b.depth||0),this.opcode("pushStringParam",b.stringModeValue,b.type),"sexpr"===b.type&&this.sexpr(b)):this[b.type](b)},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},e.precompile=c,e.compile=d,e}(c),k=function(a,b){function c(a){this.value=a}function d(){}var e,f=a.COMPILER_REVISION,g=a.REVISION_CHANGES,h=a.log,i=b;d.prototype={nameLookup:function(a,b){var c,e;return 0===a.indexOf("depth")&&(c=!0),e=/^[0-9]+$/.test(b)?a+"["+b+"]":d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']",c?"("+a+" && "+e+")":e},compilerInfo:function(){var a=f,b=g[a];return"this.compilerInfo = ["+a+",'"+b+"'];\n"},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b||{},h("debug",this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b);var e,f=a.opcodes;this.i=0;for(var g=f.length;this.ie;e++)d.push("depth"+this.environment.depths.list[e]);var g=this.mergeSource();if(this.isChild||(g=this.compilerInfo()+g),a)return d.push(g),Function.apply(this,d);var i="function "+(this.name||"")+"("+d.join(",")+") {\n "+g+"}";return h("debug",i+"\n\n"),i},mergeSource:function(){for(var a,b="",c=0,d=this.source.length;d>c;c++){var e=this.source[c];e.appendToBuffer?a=a?a+"\n + "+e.content:e.content:(a&&(b+="buffer += "+a+";\n ",a=void 0),b+=e+"\n ")}return b},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a),this.replaceStack(function(b){return a.splice(1,0,b),"blockHelperMissing.call("+a.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams(0,a);var b=this.topStack();a.splice(1,0,b),this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.stripNext&&(a=a.replace(/^\s+/,"")),this.pendingContent=a},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,"")),this.stripNext="strip"},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext!==a&&(this.lastContext=a)},lookupOnContext:function(a){this.push(this.nameLookup("depth"+this.lastContext,a,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(a){return"typeof "+a+" === functionType ? "+a+".apply(depth0) : "+a})},lookup:function(a){this.replaceStack(function(b){return b+" == null || "+b+" === false ? "+b+" : "+this.nameLookup(b,a,"context")})},lookupData:function(){this.pushStackLiteral("data")},pushStringParam:function(a,b){this.pushStackLiteral("depth"+this.lastContext),this.pushString(b),"sexpr"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.options.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}")),this.push("{\n "+a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){this.pushStackLiteral(null!=a?this.programExpression(a):null)},invokeHelper:function(a,b,c){this.context.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var d=this.lastHelper=this.setupHelper(a,b,!0),e=this.nameLookup("depth"+this.lastContext,b,"context"),f="helper = "+d.name+" || "+e;d.paramsInit&&(f+=","+d.paramsInit),this.push("("+f+",helper ? helper.call("+d.callParams+") : helperMissing.call("+d.helperMissingParams+"))"),c||this.flushInline()},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.context.aliases.functionType='"function"',this.useRegister("helper"),this.emptyHash();var c=this.setupHelper(0,a,b),d=this.lastHelper=this.nameLookup("helpers",a,"helper"),e=this.nameLookup("depth"+this.lastContext,a,"context"),f=this.nextStack();c.paramsInit&&this.pushSource(c.paramsInit),this.pushSource("if (helper = "+d+") { "+f+" = helper.call("+c.callParams+"); }"),this.pushSource("else { helper = "+e+"; "+f+" = typeof helper === functionType ? helper.call("+c.callParams+") : helper; }")},invokePartial:function(a){var b=[this.nameLookup("partials",a,"partial"),"'"+a+"'",this.popStack(),"helpers","partials"];this.options.data&&b.push("data"),this.context.aliases.self="this",this.push("self.invokePartial("+b.join(", ")+")")},assignToHash:function(a){var b,c,d=this.popStack();this.options.stringParams&&(c=this.popStack(),b=this.popStack());var e=this.hash;b&&e.contexts.push("'"+a+"': "+b),c&&e.types.push("'"+a+"': "+c),e.values.push("'"+a+"': ("+d+")")},compiler:d,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context),this.context.environments[h]=c):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){if(this.context.aliases.self="this",null==a)return"self.noop";for(var b,c=this.environment.children[a],d=c.depths.list,e=[c.index,c.name,"data"],f=0,g=d.length;g>f;f++)b=d[f],e.push(1===b?"depth0":"depth"+(b-1));return(0===d.length?"self.program(":"self.programWithDepth(")+e.join(", ")+")"},register:function(a,b){this.useRegister(a),this.pushSource(a+" = "+b+";")},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return a&&this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){var b,d,e,f="",g=this.isInline();if(g){var h=this.popStack(!0);if(h instanceof c)b=h.value,e=!0;else{d=!this.stackSlot;var i=d?this.incrStack():this.topStackName();f="("+this.push(i)+" = "+h+"),",b=this.topStack()}}else b=this.topStack();var j=a.call(this,b);return g?(e||this.popStack(),d&&this.stackSlot--,this.push("("+f+j+")")):(/^stack/.test(b)||(b=this.nextStack()),this.pushSource(b+" = ("+f+j+");")),b},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,d=a.length;d>b;b++){var e=a[b];e instanceof c?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),d=(b?this.inlineStack:this.compileStack).pop();if(!a&&d instanceof c)return d.value;if(!b){if(!this.stackSlot)throw new i("Invalid stack pop");this.stackSlot--}return d},topStack:function(a){var b=this.isInline()?this.inlineStack:this.compileStack,d=b[b.length-1];return!a&&d instanceof c?d.value:d},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(a,b,c){var d=[],e=this.setupParams(a,d,c),f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:["depth0"].concat(d).join(", "),helperMissingParams:c&&["depth0",this.quotedString(b)].concat(d).join(", ")}},setupOptions:function(a,b){var c,d,e,f=[],g=[],h=[];f.push("hash:"+this.popStack()),this.options.stringParams&&(f.push("hashTypes:"+this.popStack()),f.push("hashContexts:"+this.popStack())),d=this.popStack(),e=this.popStack(),(e||d)&&(e||(this.context.aliases.self="this",e="self.noop"),d||(this.context.aliases.self="this",d="self.noop"),f.push("inverse:"+d),f.push("fn:"+e));for(var i=0;a>i;i++)c=this.popStack(),b.push(c),this.options.stringParams&&(h.push(this.popStack()),g.push(this.popStack()));return this.options.stringParams&&(f.push("contexts:["+g.join(",")+"]"),f.push("types:["+h.join(",")+"]")),this.options.data&&f.push("data:data"),f},setupParams:function(a,b,c){var d="{"+this.setupOptions(a,b).join(",")+"}";return c?(this.useRegister("options"),b.push("options"),"options="+d):(b.push(d),"")}};for(var j="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),k=d.RESERVED_WORDS={},l=0,m=j.length;m>l;l++)k[j[l]]=!0;return d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)?!0:!1},e=d}(d,c),l=function(a,b,c,d,e){var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=function(b,c){return m(b,c,a)},a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,f=g}(f,g,i,j,k);return l}();return a}),ToneDen.define("hbs/underscore",[],function(){function a(b,c,d){if(b===c)return 0!==b||1/b==1/c;if(null==b||null==c)return b===c;if(b._chain&&(b=b._wrapped),c._chain&&(c=c._wrapped),b.isEqual&&v.isFunction(b.isEqual))return b.isEqual(c);if(c.isEqual&&v.isFunction(c.isEqual))return c.isEqual(b);var e=h.call(b);if(e!=h.call(c))return!1;switch(e){case"[object String]":return b==String(c);case"[object Number]":return b!=+b?c!=+c:0==b?1/b==1/c:b==+c;case"[object Date]":case"[object Boolean]":return+b==+c;case"[object RegExp]":return b.source==c.source&&b.global==c.global&&b.multiline==c.multiline&&b.ignoreCase==c.ignoreCase}if("object"!=typeof b||"object"!=typeof c)return!1;for(var f=d.length;f--;)if(d[f]==b)return!0;d.push(b);var g=0,i=!0;if("[object Array]"==e){if(g=b.length,i=g==c.length)for(;g--&&(i=g in b==g in c&&a(b[g],c[g],d)););}else{if("constructor"in b!="constructor"in c||b.constructor!=c.constructor)return!1;for(var j in b)if(v.has(b,j)&&(g++,!(i=v.has(c,j)&&a(b[j],c[j],d))))break;if(i){for(j in c)if(v.has(c,j)&&!g--)break;i=!g}}return d.pop(),i}var b={},c=Array.prototype,d=Object.prototype,e=Function.prototype,f=c.slice,g=c.unshift,h=d.toString,i=d.hasOwnProperty,j=c.forEach,k=c.map,l=c.reduce,m=c.reduceRight,n=c.filter,o=c.every,p=c.some,q=c.indexOf,r=c.lastIndexOf,s=Array.isArray,t=Object.keys,u=e.bind,v=function(a){return new G(a)};v.VERSION="1.3.3";var w=v.each=v.forEach=function(a,c,d){if(null!=a)if(j&&a.forEach===j)a.forEach(c,d);else if(a.length===+a.length){for(var e=0,f=a.length;f>e;e++)if(e in a&&c.call(d,a[e],e,a)===b)return}else for(var g in a)if(v.has(a,g)&&c.call(d,a[g],g,a)===b)return};v.map=v.collect=function(a,b,c){var d=[];return null==a?d:k&&a.map===k?a.map(b,c):(w(a,function(a,e,f){d[d.length]=b.call(c,a,e,f)}),a.length===+a.length&&(d.length=a.length),d)},v.reduce=v.foldl=v.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),l&&a.reduce===l)return d&&(b=v.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(w(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError("Reduce of empty array with no initial value");return c},v.reduceRight=v.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),m&&a.reduceRight===m)return d&&(b=v.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=v.toArray(a).reverse();return d&&!e&&(b=v.bind(b,d)),e?v.reduce(f,b,c,d):v.reduce(f,b)},v.find=v.detect=function(a,b,c){var d;return x(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,!0):void 0}),d},v.filter=v.select=function(a,b,c){var d=[];return null==a?d:n&&a.filter===n?a.filter(b,c):(w(a,function(a,e,f){b.call(c,a,e,f)&&(d[d.length]=a)}),d)},v.reject=function(a,b,c){var d=[];return null==a?d:(w(a,function(a,e,f){b.call(c,a,e,f)||(d[d.length]=a)}),d)},v.every=v.all=function(a,c,d){var e=!0;return null==a?e:o&&a.every===o?a.every(c,d):(w(a,function(a,f,g){return(e=e&&c.call(d,a,f,g))?void 0:b}),!!e)};var x=v.some=v.any=function(a,c,d){c||(c=v.identity);var e=!1;return null==a?e:p&&a.some===p?a.some(c,d):(w(a,function(a,f,g){return e||(e=c.call(d,a,f,g))?b:void 0}),!!e)};v.include=v.contains=function(a,b){var c=!1;return null==a?c:q&&a.indexOf===q?-1!=a.indexOf(b):c=x(a,function(a){return a===b})},v.invoke=function(a,b){var c=f.call(arguments,2);return v.map(a,function(a){return(v.isFunction(b)?b||a:a[b]).apply(a,c)})},v.pluck=function(a,b){return v.map(a,function(a){return a[b]})},v.max=function(a,b,c){if(!b&&v.isArray(a)&&a[0]===+a[0])return Math.max.apply(Math,a);if(!b&&v.isEmpty(a))return-1/0;var d={computed:-1/0};return w(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;g>=d.computed&&(d={value:a,computed:g})}),d.value},v.min=function(a,b,c){if(!b&&v.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!b&&v.isEmpty(a))return 1/0;var d={computed:1/0};return w(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;gc?-1:c>d?1:0}),"value")},v.groupBy=function(a,b){var c={},d=v.isFunction(b)?b:function(a){return a[b]};return w(a,function(a,b){var e=d(a,b);(c[e]||(c[e]=[])).push(a)}),c},v.sortedIndex=function(a,b,c){c||(c=v.identity);for(var d=0,e=a.length;e>d;){var f=d+e>>1;c(a[f])=0})})},v.difference=function(a){var b=v.flatten(f.call(arguments,1),!0);return v.filter(a,function(a){return!v.include(b,a)})},v.zip=function(){for(var a=f.call(arguments),b=v.max(v.pluck(a,"length")),c=new Array(b),d=0;b>d;d++)c[d]=v.pluck(a,""+d);return c},v.indexOf=function(a,b,c){if(null==a)return-1;var d,e;if(c)return d=v.sortedIndex(a,b),a[d]===b?d:-1;if(q&&a.indexOf===q)return a.indexOf(b);for(d=0,e=a.length;e>d;d++)if(d in a&&a[d]===b)return d;return-1},v.lastIndexOf=function(a,b){if(null==a)return-1;if(r&&a.lastIndexOf===r)return a.lastIndexOf(b);for(var c=a.length;c--;)if(c in a&&a[c]===b)return c;return-1},v.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);d>e;)f[e++]=a,a+=c;return f};var y=function(){};v.bind=function(a,b){var c,d;if(a.bind===u&&u)return u.apply(a,f.call(arguments,1));if(!v.isFunction(a))throw new TypeError;return d=f.call(arguments,2),c=function(){if(!(this instanceof c))return a.apply(b,d.concat(f.call(arguments)));y.prototype=a.prototype;var e=new y,g=a.apply(e,d.concat(f.call(arguments)));return Object(g)===g?g:e}},v.bindAll=function(a){var b=f.call(arguments,1);return 0==b.length&&(b=v.functions(a)),w(b,function(b){a[b]=v.bind(a[b],a)}),a},v.memoize=function(a,b){var c={};return b||(b=v.identity),function(){var d=b.apply(this,arguments);return v.has(c,d)?c[d]:c[d]=a.apply(this,arguments)}},v.delay=function(a,b){var c=f.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},v.defer=function(a){return v.delay.apply(v,[a,1].concat(f.call(arguments,1)))},v.throttle=function(a,b){var c,d,e,f,g,h,i=v.debounce(function(){g=f=!1},b);return function(){c=this,d=arguments;var j=function(){e=null,g&&a.apply(c,d),i()};return e||(e=setTimeout(j,b)),f?g=!0:h=a.apply(c,d),i(),f=!0,h}},v.debounce=function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)};c&&!d&&a.apply(e,f),clearTimeout(d),d=setTimeout(g,b)}},v.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments))}},v.wrap=function(a,b){return function(){var c=[a].concat(f.call(arguments,0));return b.apply(this,c)}},v.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},v.after=function(a,b){return 0>=a?b():function(){return--a<1?b.apply(this,arguments):void 0}},v.keys=t||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[];for(var c in a)v.has(a,c)&&(b[b.length]=c);return b},v.values=function(a){return v.map(a,v.identity)},v.functions=v.methods=function(a){var b=[];for(var c in a)v.isFunction(a[c])&&b.push(c);return b.sort()},v.extend=function(a){return w(f.call(arguments,1),function(b){for(var c in b)a[c]=b[c]}),a},v.pick=function(a){var b={};return w(v.flatten(f.call(arguments,1)),function(c){c in a&&(b[c]=a[c])}),b},v.defaults=function(a){return w(f.call(arguments,1),function(b){for(var c in b)null==a[c]&&(a[c]=b[c])}),a},v.clone=function(a){return v.isObject(a)?v.isArray(a)?a.slice():v.extend({},a):a },v.tap=function(a,b){return b(a),a},v.isEqual=function(b,c){return a(b,c,[])},v.isEmpty=function(a){if(null==a)return!0;if(v.isArray(a)||v.isString(a))return 0===a.length;for(var b in a)if(v.has(a,b))return!1;return!0},v.isElement=function(a){return!(!a||1!=a.nodeType)},v.isArray=s||function(a){return"[object Array]"==h.call(a)},v.isObject=function(a){return a===Object(a)},v.isArguments=function(a){return"[object Arguments]"==h.call(a)},v.isArguments(arguments)||(v.isArguments=function(a){return!(!a||!v.has(a,"callee"))}),v.isFunction=function(a){return"[object Function]"==h.call(a)},v.isString=function(a){return"[object String]"==h.call(a)},v.isNumber=function(a){return"[object Number]"==h.call(a)},v.isFinite=function(a){return v.isNumber(a)&&isFinite(a)},v.isNaN=function(a){return a!==a},v.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"==h.call(a)},v.isDate=function(a){return"[object Date]"==h.call(a)},v.isRegExp=function(a){return"[object RegExp]"==h.call(a)},v.isNull=function(a){return null===a},v.isUndefined=function(a){return void 0===a},v.has=function(a,b){return i.call(a,b)},v.noConflict=function(){return root._=previousUnderscore,this},v.identity=function(a){return a},v.times=function(a,b,c){for(var d=0;a>d;d++)b.call(c,d)},v.escape=function(a){return(""+a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},v.result=function(a,b){if(null==a)return null;var c=a[b];return v.isFunction(c)?c.call(a):c},v.mixin=function(a){w(v.functions(a),function(b){I(b,v[b]=a[b])})};var z=0;v.uniqueId=function(a){var b=z++;return a?a+b:b},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/.^/,B={"\\":"\\","'":"'",r:"\r",n:"\n",t:" ",u2028:"\u2028",u2029:"\u2029"};for(var C in B)B[B[C]]=C;var D=/\\|'|\r|\n|\t|\u2028|\u2029/g,E=/\\(\\|'|r|n|t|u2028|u2029)/g,F=function(a){return a.replace(E,function(a,b){return B[b]})};v.template=function(a,b,c){c=v.defaults(c||{},v.templateSettings);var d="__p+='"+a.replace(D,function(a){return"\\"+B[a]}).replace(c.escape||A,function(a,b){return"'+\n_.escape("+F(b)+")+\n'"}).replace(c.interpolate||A,function(a,b){return"'+\n("+F(b)+")+\n'"}).replace(c.evaluate||A,function(a,b){return"';\n"+F(b)+"\n;__p+='"})+"';\n";c.variable||(d="with(obj||{}){\n"+d+"}\n"),d="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+d+"return __p;\n";var e=new Function(c.variable||"obj","_",d);if(b)return e(b,v);var f=function(a){return e.call(this,a,v)};return f.source="function("+(c.variable||"obj")+"){\n"+d+"}",f},v.chain=function(a){return v(a).chain()};var G=function(a){this._wrapped=a};v.prototype=G.prototype;var H=function(a,b){return b?v(a).chain():a},I=function(a,b){G.prototype[a]=function(){var a=f.call(arguments);return g.call(a,this._wrapped),H(b.apply(v,a),this._chain)}};return v.mixin(v),w(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=c[a];G.prototype[a]=function(){var c=this._wrapped;b.apply(c,arguments);var d=c.length;return"shift"!=a&&"splice"!=a||0!==d||delete c[0],H(c,this._chain)}}),w(["concat","join","slice"],function(a){var b=c[a];G.prototype[a]=function(){return H(b.apply(this._wrapped,arguments),this._chain)}}),G.prototype.chain=function(){return this._chain=!0,this},G.prototype.value=function(){return this._wrapped},v}),ToneDen.define("hbs/i18nprecompile",["hbs/handlebars","hbs/underscore"],function(a,b){function c(d,e,f){return f=f||{},e=e||{},d&&"program"===d.type&&d.statements&&(b(d.statements).forEach(function(b,g){var h="";if("mustache"===b.type&&b.id&&"$"===b.id.original){if(b.params.length&&b.params[0].string){var i=b.params[0].string;h=e[i]||(f.originalKeyFallback?i:h)}d.statements[g]=new a.AST.ContentNode(h)}else b.program&&(b.program=c(b.program,e,f))}),d.inverse&&c(d.inverse,e,f)),d}return function(b,d,e){e=e||{};var f,g;return f=a.parse(b),d!==!1&&(f=c(f,d,e)),g=(new a.Compiler).compile(f,e),(new a.JavaScriptCompiler).compile(g,e)}}),function(window){var JSON=window.JSON||{};!function(){function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),ToneDen.define("hbs/json2",[],function(){return JSON})}.call(this,this),ToneDen.define("hbs",["hbs/handlebars","hbs/underscore","hbs/i18nprecompile","hbs/json2"],function(a,b,c,d){var e,f,g=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],h=function(){throw new Error("Environment unsupported.")},i=[],j="w+",k="hbs",l="@hbs",m="/styles/",n="/demo-build/styles/",o="templates/helpers/",p="templates/i18n/",q="screen.build.css";a.registerHelper("$",function(){}),"undefined"!=typeof window&&window.navigator&&window.document&&!window.navigator.userAgent.match(/Node.js/)?(f=function(){var a,b,c;if("undefined"!=typeof XMLHttpRequest)return arguments[0]===!0?new XDomainRequest:new XMLHttpRequest;for(b=0;3>b;b++){c=g[b];try{a=new ActiveXObject(c)}catch(d){}if(a){g=[c];break}}if(!a)throw new Error("getXhr(): XMLHttpRequest not available");return a},h=function(a,b){var c=!1;if(0!=a.indexOf("http"))c=!1;else{var d="https"===a.substr(0,5)?8:7,e="https"===window.location.href.substr(0,5)?8:7,g=a.substr(d).split("/").shift(),h=getIEVersion();c=g!=window.location.href.substr(e).split("/").shift()&&h>=7}if(c){var i=f(!0);i.open("GET",a),i.onload=function(){b(i.responseText)},i.onprogress=function(){},i.ontimeout=function(){},i.onerror=function(){},setTimeout(function(){i.send()},0)}else{var j=f();j.open("GET",a,!0),j.onreadystatechange=function(){4===j.readyState&&b(j.responseText)},j.send(null)}}):"undefined"!=typeof process&&process.versions&&process.versions.node?(e=require.nodeRequire("fs"),h=function(a,b){var c=e.readFileSync(a,"utf8")||"";c=c.replace(/^\uFEFF/,""),b(c)}):"undefined"!=typeof java&&"undefined"!=typeof java.io&&(h=function(a,b){for(var c,d=new java.io.File(a),e=new java.io.FileReader(d),f=new java.io.BufferedReader(e),g="";null!==(c=f.readLine());)g+=new String(c)+"\n";f.close(),b(g)});var r={},s=function(a,b){r[a]?b(r[a]):h(a,function(c){r[a]=c,b.call(this,c)})},t=[],u={};return{get:function(){return a},write:function(a,b,c){if(b+l in i){var d=i[b+l];c.asModule(a+"!"+b,d)}},version:"0.5.0",load:function(f,g,r,v){function w(a,c){return b(a).forEach(function(a){a&&a.type&&"partial"===a.type&&c.push(a.partialName.name),a&&a.program&&a.program.statements&&w(a.program.statements,c),a&&a.program&&a.program.inverse&&a.program.inverse.statements&&w(a.program.inverse.statements,c)}),c}function x(a){var c=[];return a&&a.statements&&(c=w(a.statements,[])),b(c).unique()}function y(a){var b,c,e;if(a&&a.statements&&(b=a.statements[0],b&&"comment"===b.type))try{return c=b.comment.replace(new RegExp("^[\\s]+|[\\s]+$","g"),""),e=d.parse(c),c}catch(f){return'{ "description" : "'+b.comment+'" }'}return"{}"}function z(a){if(!a)return[];var b,c=[a[0]],d=a[0];for(b=1;b",N="",O="t.meta = "+I+";\nt.helpers = "+d.stringify(L)+";\nt.deps = "+d.stringify(P)+";\nt.vars = "+d.stringify(K)+";\n");var V=F?!1:b.extend(k,v.localeMapping),W=v.hbs||{},X=b.extend(W.compileOptions||{},{originalKeyFallback:W.originalKeyFallback}),Y=c(h,V,X),Z=v.isBuild?"":"'"+f+"',";l&&(l=", '"+l+"'");var $=[];require.config.hbs._partials[f]&&($=require.config.hbs._partials[f].references),h="/* START_TEMPLATE */\ndefine("+Z+"['hbs','hbs/handlebars'"+l+p+"], function( hbs, Handlebars ){ \nvar t = Handlebars.template("+Y+");\n";for(var S=0;S<$.length;S++)h+="Handlebars.registerPartial('"+$[S]+"', t);\n";h+=O+"return t;\n});\n/* END_TEMPLATE */\n",v.isBuild&&(i[E]=h),v.isBuild||(h+="\r\n//@ sourceURL="+T),v.isBuild?(r.fromText(f,h),g([f],function(a){r(a)})):require(P,function(){r.fromText(h),g([f],function(a){r(a)})}),v.removeCombined&&e.unlinkSync(T)})}var E=f+l;v.hbs=v.hbs||{};var F=!(1==v.hbs.i18n),G=0==v.hbs.helpers,H="";v.hbs.partialsUrl&&(H=v.hbs.partialsUrl,H.match(/\/$/)||(H+="/"));var I,J=v.hbs&&v.hbs.templateExtension===!1;if(I=g.toUrl(J?f:f+"."+(v.hbs&&v.hbs.templateExtension?v.hbs.templateExtension:k)),F)D(!1);else{var K=(v.hbs&&v.hbs.i18nDirectory?v.hbs.i18nDirectory:p)+(v.locale||"en_us")+".json";try{s(g.toUrl(K),function(a){D(d.parse(a))})}catch(L){if(v.hbs)throw L;console.warn("hbs: Error reading "+K+", disabling i18n. Ignore this if you're using jam, otherwise check your i18n configuration.\n"),v.hbs={i18n:!1,helpers:!0},D(!1)}}}}}),ToneDen.define("templates/helpers/ifCond",["hbs/handlebars"],function(a){function b(a,b,c){return a||b?c.fn(this):c.inverse(this)}return a.registerHelper("ifCond",b),b}),ToneDen.define("templates/helpers/commanator",["hbs/handlebars"],function(a){function b(a){return a?a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):"-"}return a.registerHelper("commanator",b),b}),ToneDen.define("templates/helpers/msToTimestamp",["hbs/handlebars"],function(a){function b(a){var b=Math.round(a/1e3),c=Math.floor(b/60),d=b-60*c;return isNaN(c)&&(c=""),isNaN(d)?"":(10>d&&(d="0"+d),c+":"+d)}return a.registerHelper("msToTimestamp",b),b}),ToneDen.define("hbs!templates/player",["hbs","hbs/handlebars","templates/helpers/ifCond","templates/helpers/commanator","templates/helpers/msToTimestamp"],function(a,b){var c=b.template(function(a,b,c,d,e){function f(){return'\n
\n
\n
\n
\n
\n
\n
\n '}function g(a,b){var d,e,f,g="";return g+='\n
\n
\n
\n ',d=c["if"].call(a,a&&a.artwork_url,{hash:{},inverse:y.program(6,i,b),fn:y.program(4,h,b),data:b}),(d||0===d)&&(g+=d),g+='\n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
0:00
\n
\n \n
\n
\n '+x((e=c.msToTimestamp||a&&a.msToTimestamp,f={hash:{},data:b},e?e.call(a,(d=a&&a.nowPlaying,null==d||d===!1?d:d.duration),f):z.call(a,"msToTimestamp",(d=a&&a.nowPlaying,null==d||d===!1?d:d.duration),f)))+'\n \n
\n
\n
\n '}function h(a,b){var d,e,f="";return f+='\n \n '}function i(a){var b,c="";return c+='\n \n '}function j(a,b){var d,e,f="";return f+='\n \n '}function k(a,b){var d,e,f="";return f+='\n \n '}function l(a,b){var d,e,f="";return f+='\n
\n \n BUY\n \n
\n '}function m(a,b){var d,e="";return e+="\n ",d=c["if"].call(a,a&&a.download_url,{hash:{},inverse:y.noop,fn:y.program(15,n,b),data:b}),(d||0===d)&&(e+=d),e+="\n "}function n(a,b){var d,e,f="";return f+='\n \n '}function o(a,b){var d,e,f,g="";return g+="\n ",d=c["if"].call(a,a&&a.playing,{hash:{},inverse:y.program(20,q,b),fn:y.program(18,p,b),data:b}),(d||0===d)&&(g+=d),g+="\n ",d=c["if"].call(a,a&&a.playing,{hash:{},inverse:y.program(24,s,b),fn:y.program(22,r,b),data:b}),(d||0===d)&&(g+=d),g+='\n \n
\n ',(e=c.title)?d=e.call(a,{hash:{},data:b}):(e=a&&a.title,d=typeof e===w?e.call(a,{hash:{},data:b}):e),g+=x(d)+'\n
\n \n \n
\n
\n \n '+x((e=c.commanator||a&&a.commanator,f={hash:{},data:b},e?e.call(a,a&&a.playback_count,f):z.call(a,"commanator",a&&a.playback_count,f)))+'\n
\n
\n \n '+x((e=c.commanator||a&&a.commanator,f={hash:{},data:b},e?e.call(a,a&&a.favoritings_count,f):z.call(a,"commanator",a&&a.favoritings_count,f)))+'\n
\n
\n \n '+x((e=c.commanator||a&&a.commanator,f={hash:{},data:b},e?e.call(a,a&&a.comment_count,f):z.call(a,"commanator",a&&a.comment_count,f)))+"\n
\n \n
\n \n \n "}function p(){return'\n \n '}function q(a,b){var c,d="";return d+='\n
\n ',t=c.unless.call(b,b&&b.nowPlaying,{hash:{},inverse:y.noop,fn:y.program(1,f,e),data:e}),(t||0===t)&&(v+=t),v+='\n
\n \n ',t=c["with"].call(b,b&&b.nowPlaying,{hash:{},inverse:y.noop,fn:y.program(3,g,e),data:e}),(t||0===t)&&(v+=t),v+='\n
\n \n ',t=c.each.call(b,b&&b.tracks,{hash:{},inverse:y.noop,fn:y.program(17,o,e),data:e}),(t||0===t)&&(v+=t),v+="\n \n \n \n\n"});return c}),ToneDen.define("hbs!templates/player-solo",["hbs","hbs/handlebars","templates/helpers/ifCond","templates/helpers/msToTimestamp","templates/helpers/commanator"],function(a,b){var c=b.template(function(a,b,c,d,e){function f(){return'\n
\n
\n
\n
\n
\n
\n
\n '}function g(a,b){var d,e,f,g="";return g+='\n
\n
\n
\n ',d=c["if"].call(a,a&&a.artwork_url,{hash:{},inverse:t.program(6,i,b),fn:t.program(4,h,b)}),(d||0===d)&&(g+=d),g+='\n
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n ',e=c.ifCond||a&&a.ifCond,f={hash:{},inverse:t.program(10,k,b),fn:t.program(8,j,b)},d=e?e.call(a,a&&a.purchase_url,a&&a.download_url,f):u.call(a,"ifCond",a&&a.purchase_url,a&&a.download_url,f),(d||0===d)&&(g+=d),g+="\n ",d=c["if"].call(a,a&&a.purchase_url,{hash:{},inverse:t.program(14,m,b),fn:t.program(12,l,b)}),(d||0===d)&&(g+=d),g+='\n
\n
\n
\n \n
\n
\n
0:00
\n
\n \n
\n
\n '+s((e=c.msToTimestamp||a&&a.msToTimestamp,f={hash:{}},e?e.call(a,(d=a&&a.nowPlaying,null==d||d===!1?d:d.duration),f):u.call(a,"msToTimestamp",(d=a&&a.nowPlaying,null==d||d===!1?d:d.duration),f)))+'\n \n
\n
\n
\n \n "}function h(a){var b,d,e="";return e+='\n \n '}function i(a){var b,c="";return c+='\n \n '}function j(a){var b,d,e="";return e+='\n \n ' -}function k(a){var b,d,e="";return e+='\n \n '}function l(a){var b,d,e="";return e+='\n
\n \n BUY\n \n
\n '}function m(a,b){var d,e="";return e+="\n ",d=c["if"].call(a,a&&a.download_url,{hash:{},inverse:t.noop,fn:t.program(15,n,b)}),(d||0===d)&&(e+=d),e+="\n "}function n(a){var b,d,e="";return e+=' \n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers);var o,p,q="",r="function",s=this.escapeExpression,t=this,u=c.helperMissing;return q+='
\n ',o=c.unless.call(b,b&&b.nowPlaying,{hash:{},inverse:t.noop,fn:t.program(1,f,e)}),(o||0===o)&&(q+=o),q+='\n
\n \n ',o=c["with"].call(b,b&&b.nowPlaying,{hash:{},inverse:t.noop,fn:t.program(3,g,e)}),(o||0===o)&&(q+=o),q+="\n
\n
\n
\n"});return c}),ToneDen.define("hbs!templates/player-mini",["hbs","hbs/handlebars","templates/helpers/msToTimestamp","templates/helpers/commanator","templates/helpers/ifCond"],function(a,b){var c=b.template(function(a,b,c,d,e){function f(){return'\n
\n
\n
\n
\n
\n
\n
\n '}function g(a,b){var d,e,f,g="";return g+='\n
\n
\n \n \n \n
\n
\n
\n
\n
0:00
\n
\n \n
\n
\n '+o((e=c.msToTimestamp||a&&a.msToTimestamp,f={hash:{}},e?e.call(a,(d=a&&a.nowPlaying,null==d||d===!1?d:d.duration),f):p.call(a,"msToTimestamp",(d=a&&a.nowPlaying,null==d||d===!1?d:d.duration),f)))+'\n \n
\n
\n
\n \n
    \n
  • \n \n '+o((e=c.commanator||a&&a.commanator,f={hash:{}},e?e.call(a,a&&a.playback_count,f):p.call(a,"commanator",a&&a.playback_count,f)))+'\n
  • \n
  • \n \n '+o((e=c.commanator||a&&a.commanator,f={hash:{}},e?e.call(a,a&&a.favoritings_count,f):p.call(a,"commanator",a&&a.favoritings_count,f)))+'\n
  • \n
  • \n \n '+o((e=c.commanator||a&&a.commanator,f={hash:{}},e?e.call(a,a&&a.comment_count,f):p.call(a,"commanator",a&&a.comment_count,f)))+'\n
  • \n \n
\n
\n ',d=c["if"].call(a,a&&a.purchase_url,{hash:{},inverse:q.program(6,i,b),fn:q.program(4,h,b)}),(d||0===d)&&(g+=d),g+=" \n ",e=c.ifCond||a&&a.ifCond,f={hash:{},inverse:q.program(8,j,b),fn:q.program(8,j,b)},d=e?e.call(a,a&&a.purchase_url,a&&a.download_url,f):p.call(a,"ifCond",a&&a.purchase_url,a&&a.download_url,f),(d||0===d)&&(g+=d),g+="\n \n BUY\n \n
\n '}function i(a){var b,d,e="";return e+='\n \n '}function j(a){var b,d,e="";return e+='\n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers);var k,l,m="",n="function",o=this.escapeExpression,p=c.helperMissing,q=this;return m+='
\n ',k=c.unless.call(b,b&&b.nowPlaying,{hash:{},inverse:q.noop,fn:q.program(1,f,e)}),(k||0===k)&&(m+=k),m+="\n ",k=c["with"].call(b,b&&b.nowPlaying,{hash:{},inverse:q.noop,fn:q.program(3,g,e)}),(k||0===k)&&(m+=k),m+="\n
\n"});return c}),ToneDen.define("hbs!templates/player-empty",["hbs","hbs/handlebars"],function(a,b){var c=b.template(function(a,b,c){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers);var d,e,f="",g="function",h=this.escapeExpression;return f+='
\n
\n \n There are no tracks to play.\n
\n
\n'});return c}),ToneDen.define("player",["jquery","vendor/simple-slider","underscore","vendor/sc-interface","vendor/handlebars","hbs!templates/player","hbs!templates/player-solo","hbs!templates/player-mini","hbs!templates/player-empty","templates/helpers/msToTimestamp","vendor/d3"],function(a,b,c,d,e,f,g,h,i,j,k){return{create:function(b,e,l){function m(a,b){window.console&&("error"===b?console.error(a):u.debug&&console.debug(a))}function n(a){a=JSON.parse(JSON.stringify(a));var b=!c.any(a.tracks)&&a.tracks.length>0;if(a.nowPlaying)for(var d=0;d1?(w.find(".prev").show(),w.find(".next").show()):(w.find(".prev").hide(),w.find(".next").hide()),w.width()<500&&(w.find(".header").addClass("header-small").css("width","100%"),w.find(".solo-container").addClass("solo-container-small").css("width","100%").prependTo(w.find(".solo-buttons")),w.find(".scrubber").hide())):1==a.mini?w.html(h(a)):(w.html(f(a)),w.width()<500&&(w.find(".current-song-info").css("width","100%").prependTo(w.find(".social")),w.find(".buy").hide(),w.find(".follow").hide(),w.find(".track-info-stats").hide()),w.height()<500&&w.find(".player").addClass("shrink")),w.find(".scrubber-slider").simpleSlider({highlight:!0})}function o(a){function b(a,b){"waves"===u.visualizerType?a.selectAll("path").data([b]).attr("d",n).transition().ease("linear").duration(100):"bars"==u.visualizerType&&e.selectAll("rect").data(b).transition().duration(100).attr("y",function(a){return i-m(a)}).attr("height",function(a){return m(a)})}if(!a)for(var a=[],c=0;128>c;c++)a.push(0);var d=k.select(w[0]),e=d.select(".waveform svg"),f=128,g={top:0,right:0,bottom:0,left:0},h=w.find(".cover").width(),i=w.find(".cover").height(),j=(h-f)/f,l=k.scale.linear().domain([0,f-1]).range([0,h]),m=k.scale.linear().domain([0,1.5]).range([0,i]),n=k.svg.line().x(function(a,b){return l(b)}).y(function(a){return i-m(a)}).interpolate("basis");e.node()||(e=d.select(".waveform").append("svg:svg").attr("width",h+g.left+g.right).attr("height",i+g.top+g.bottom).append("g"),"waves"==u.visualizerType?e.selectAll("path").data([a]).enter().append("svg:path").attr("d",n).attr("stroke-width",3):"bars"==u.visualizerType&&e.selectAll("rect").data(a).enter().append("rect").attr("x",function(a,b){return l(b)}).attr("y",function(a){return i-m(a)}).attr("width",j).attr("height",function(a){return m(a)})),b(e,a)}function p(a){var b="fa-play-circle-o",c="fa-pause",d=w.find(".play");a?(d.removeClass(c),d.addClass(b)):(d.removeClass(b),d.addClass(c))}function q(){w.off(),w.html(""),G.destroy(),ToneDen.players.splice(ToneDen.players.indexOf(t),1),delete t}function r(){G.pause()}function s(){G.play()}ToneDen.players=ToneDen.players||[];var t,u={debug:!1,keyboardEvents:!1,single:null,skin:"light",staticUrl:"//sd.toneden.io/",tracksPerArtist:10,visualizer:!0,visualizerType:"waves",mini:!1};1===arguments.length&&"object"==typeof arguments[0]?c.extend(u,arguments[0]):(u.urls=b,u.dom=e,delete l.urls,delete l.dom,c.extend(u,l),"/"!==u.staticUrl.charAt(u.staticUrl.length-1)&&(u.staticUrl+="/")),-1===navigator.userAgent.toLowerCase().indexOf("chrome")&&(u.visualizer=!1),"none"===u.visualizerType&&(u.visualizer=!1);var v={consumerKey:"6f85bdf51b0a19b7ab2df7b969233901",debug:u.debug,preload:!0,togglePause:!0,tracksPerArtist:u.tracksPerArtist,visualizer:u.visualizer},e=u.dom,b=u.urls,w=a(e),x=null,y=null,z=3e3,A=6e3,B=null,C=null,D=null,E=!1,F=!1;if(!(w.length>0))return void m('ToneDen Player: the container specified by "'+u.dom+'" does not exist.',"error");n({tracks:[],skin:u.skin,eq:u.eq,tracksPerArtist:u.tracksPerArtist,single:u.single,mini:u.mini});{var G=new d(b,v);w.find(".title")}return w.on("click",".controls",function(b){b.preventDefault();var c=a(b.target);c.hasClass("play")?G.pause():c.hasClass("next")?G.next():c.hasClass("prev")&&G.prev()}),w.on("click",".track-info",function(){var b=a(this),c=b.attr("class"),d=Number(b.attr("data-index"));-1===c.indexOf("playing")&&G.goto(d)}),w.on("slider:changed",".scrubber-slider",function(a,b){G.play(),m("Slider Ratio: "+b.ratio),G.seek(b.ratio)}),u.keyboardEvents&&document.addEventListener("keydown",function(a){32==a.keyCode?(G&&G.pause(),a.preventDefault()):39==a.keyCode?(G&&G.next(),a.preventDefault()):37==a.keyCode&&(G&&G.prev(),a.preventDefault())},!1),G.on("scplayer.play",function(){p(!1)}),G.on("scplayer.pause",function(){var a=G.sound().paused;p(a)}),G.on("scplayer.stop",function(){m("Stopped."),w.find(".play").attr("src",u.staticUrl+"img/play.png")}),G.on("scplayer.track.whileloading",function(a,b){B=b,C=b/100*G.sound().duration,w.find(".buffer").css("width",b+"%"),F&&C-G.position()>A&&(G.pause(),F=!1)}),G.on("scplayer.track.whileplaying",function(b,c,d){1!=u.visualizer||"number"!=typeof d[0]||isNaN(d[0])||o(d);var e=c/100,f=j(G.position()),g=j(G.track().duration-G.position());D=Math.round(c),e=e.toFixed(3),e!==x&&w.find(".scrubber-slider").simpleSlider("setRatio",e,!0),f!==y&&(w.find(".start-time").html(f),w.find(".stop-time").html(g)),x=e,y=f;var h=C-G.position()B/100;if(h){var i=a('');100!=D&&(G.pause(),F=!0,w.find(".stop-time").empty().append(i))}}),G.on("scplayer.playlist.preloaded",function(){m("All tracks loaded."),G.tracks(function(a){var b=G.track();m(a),1===a.length&&u.single!==!1&&0==u.mini&&(u.single=!0),w.find(".tdspinner").hide(),n({nowPlaying:b,tracks:a,skin:u.skin,tracksPerArtist:u.tracksPerArtist,visualizerType:u.visualizerType,single:u.single,mini:u.mini})})}),G.on("scplayer.track.ready",function(){E=!0}),G.on("scplayer.changing_track",function(a,b){m("New track index: "+b),w.find(".played").css("width","0%"),w.find(".buffer").css("width","0%"),G.tracks(function(a){n({nowPlaying:G.track(),tracks:a,skin:u.skin,tracksPerArtist:u.tracksPerArtist,visualizerType:u.visualizerType,single:u.single,mini:u.mini})})}),t={destroy:q,pause:r,parameters:u,play:s},ToneDen.players.push(t),t},getInstanceByDom:function(b){if(ToneDen.players)for(var c,d=0;d\n \n FOLLOW\n \n \n '}function l(a){var b,d,e="";return e+='\n
\n \n BUY\n \n
\n '}function m(a,b){var d,e="";return e+="\n ",d=c["if"].call(a,a&&a.download_url,{hash:{},inverse:t.noop,fn:t.program(15,n,b)}),(d||0===d)&&(e+=d),e+="\n "}function n(a){var b,d,e="";return e+=' \n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers);var o,p,q="",r="function",s=this.escapeExpression,t=this,u=c.helperMissing;return q+='
\n ',o=c.unless.call(b,b&&b.nowPlaying,{hash:{},inverse:t.noop,fn:t.program(1,f,e)}),(o||0===o)&&(q+=o),q+='\n
\n \n ',o=c["with"].call(b,b&&b.nowPlaying,{hash:{},inverse:t.noop,fn:t.program(3,g,e)}),(o||0===o)&&(q+=o),q+="\n
\n
\n\n"});return c}),ToneDen.define("hbs!templates/player-mini",["hbs","hbs/handlebars","templates/helpers/msToTimestamp","templates/helpers/commanator","templates/helpers/ifCond"],function(a,b){var c=b.template(function(a,b,c,d,e){function f(){return'\n
\n
\n
\n
\n
\n
\n
\n '}function g(a,b){var d,e,f,g="";return g+='\n
\n
\n \n \n \n
\n
\n
\n
\n
0:00
\n
\n \n
\n
\n '+o((e=c.msToTimestamp||a&&a.msToTimestamp,f={hash:{}},e?e.call(a,(d=a&&a.nowPlaying,null==d||d===!1?d:d.duration),f):p.call(a,"msToTimestamp",(d=a&&a.nowPlaying,null==d||d===!1?d:d.duration),f)))+'\n \n
\n
\n
\n \n
    \n
  • \n \n '+o((e=c.commanator||a&&a.commanator,f={hash:{}},e?e.call(a,a&&a.playback_count,f):p.call(a,"commanator",a&&a.playback_count,f)))+'\n
  • \n
  • \n \n '+o((e=c.commanator||a&&a.commanator,f={hash:{}},e?e.call(a,a&&a.favoritings_count,f):p.call(a,"commanator",a&&a.favoritings_count,f)))+'\n
  • \n
  • \n \n '+o((e=c.commanator||a&&a.commanator,f={hash:{}},e?e.call(a,a&&a.comment_count,f):p.call(a,"commanator",a&&a.comment_count,f)))+'\n
  • \n \n
\n
\n ',d=c["if"].call(a,a&&a.purchase_url,{hash:{},inverse:q.program(6,i,b),fn:q.program(4,h,b)}),(d||0===d)&&(g+=d),g+=" \n ",e=c.ifCond||a&&a.ifCond,f={hash:{},inverse:q.program(8,j,b),fn:q.program(8,j,b)},d=e?e.call(a,a&&a.purchase_url,a&&a.download_url,f):p.call(a,"ifCond",a&&a.purchase_url,a&&a.download_url,f),(d||0===d)&&(g+=d),g+="\n \n BUY\n \n
\n '}function i(a){var b,d,e="";return e+='\n \n '}function j(a){var b,d,e="";return e+='\n \n '}this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers);var k,l,m="",n="function",o=this.escapeExpression,p=c.helperMissing,q=this;return m+='
\n ',k=c.unless.call(b,b&&b.nowPlaying,{hash:{},inverse:q.noop,fn:q.program(1,f,e)}),(k||0===k)&&(m+=k),m+="\n ",k=c["with"].call(b,b&&b.nowPlaying,{hash:{},inverse:q.noop,fn:q.program(3,g,e)}),(k||0===k)&&(m+=k),m+="\n
\n"});return c}),ToneDen.define("hbs!templates/player-empty",["hbs","hbs/handlebars"],function(a,b){var c=b.template(function(a,b,c){this.compilerInfo=[4,">= 1.0.0"],c=this.merge(c,a.helpers);var d,e,f="",g="function",h=this.escapeExpression;return f+='
\n
\n \n There are no tracks to play.\n
\n
\n'});return c}),ToneDen.define("player",["jquery","vendor/simple-slider","underscore","vendor/sc-interface","vendor/handlebars","hbs!templates/player","hbs!templates/player-solo","hbs!templates/player-mini","hbs!templates/player-empty","templates/helpers/msToTimestamp","vendor/d3"],function(a,b,c,d,e,f,g,h,i,j,k){return{create:function(b,e,l){function m(a,b){window.console&&("error"===b?console.error(a):u.debug&&console.debug(a))}function n(a){a=JSON.parse(JSON.stringify(a));var b=!c.any(a.tracks)&&a.tracks.length>0;if(a.nowPlaying)for(var d=0;d1?(w.find(".prev").show(),w.find(".next").show()):(w.find(".prev").hide(),w.find(".next").hide()),w.width()<500&&(w.find(".header").addClass("header-small").css("width","100%"),w.find(".solo-container").addClass("solo-container-small").css("width","100%").prependTo(w.find(".solo-buttons")),w.find(".scrubber").hide())):1==a.mini?w.html(h(a)):(w.html(f(a)),w.width()<500&&(w.find(".current-song-info").css("width","100%").prependTo(w.find(".social")),w.find(".buy").hide(),w.find(".follow").hide(),w.find(".track-info-stats").hide()),w.height()<500&&w.find(".player").addClass("shrink")),w.find(".scrubber-slider").simpleSlider({highlight:!0})}function o(a){function b(a,b){"waves"===u.visualizerType?a.selectAll("path").data([b]).attr("d",n).transition().ease("linear").duration(100):"bars"==u.visualizerType&&e.selectAll("rect").data(b).transition().duration(100).attr("y",function(a){return i-m(a)}).attr("height",function(a){return m(a)})}if(!a)for(var a=[],c=0;128>c;c++)a.push(0);var d=k.select(w[0]),e=d.select(".waveform svg"),f=128,g={top:0,right:0,bottom:0,left:0},h=w.find(".cover").width(),i=w.find(".cover").height(),j=(h-f)/f,l=k.scale.linear().domain([0,f-1]).range([0,h]),m=k.scale.linear().domain([0,1.5]).range([0,i]),n=k.svg.line().x(function(a,b){return l(b)}).y(function(a){return i-m(a)}).interpolate("basis");e.node()||(e=d.select(".waveform").append("svg:svg").attr("width",h+g.left+g.right).attr("height",i+g.top+g.bottom).append("g"),"waves"==u.visualizerType?e.selectAll("path").data([a]).enter().append("svg:path").attr("d",n).attr("stroke-width",3):"bars"==u.visualizerType&&e.selectAll("rect").data(a).enter().append("rect").attr("x",function(a,b){return l(b)}).attr("y",function(a){return i-m(a)}).attr("width",j).attr("height",function(a){return m(a)})),b(e,a)}function p(a){var b="fa-play-circle-o",c="fa-pause",d=w.find(".play");a?(d.removeClass(c),d.addClass(b)):(d.removeClass(b),d.addClass(c))}function q(){w.off(),w.html(""),G.destroy(),ToneDen.players.splice(ToneDen.players.indexOf(t),1),delete t}function r(){G.pause()}function s(){G.play()}ToneDen.players=ToneDen.players||[];var t,u={debug:!1,keyboardEvents:!1,single:null,skin:"light",staticUrl:"//sd.toneden.io/",tracksPerArtist:10,visualizer:!0,visualizerType:"waves",mini:!1};1===arguments.length&&"object"==typeof arguments[0]?c.extend(u,arguments[0]):(u.urls=b,u.dom=e,delete l.urls,delete l.dom,c.extend(u,l),"/"!==u.staticUrl.charAt(u.staticUrl.length-1)&&(u.staticUrl+="/")),-1===navigator.userAgent.toLowerCase().indexOf("chrome")&&(u.visualizer=!1),"none"===u.visualizerType&&(u.visualizer=!1);var v={consumerKey:"6f85bdf51b0a19b7ab2df7b969233901",debug:u.debug,preload:!0,togglePause:!0,tracksPerArtist:u.tracksPerArtist,visualizer:u.visualizer},e=u.dom,b=u.urls,w=a(e),x=null,y=null,z=5e3,A=1e4,B=null,C=null,D=null,E=!1,F=!1;if(!(w.length>0))return void m('ToneDen Player: the container specified by "'+u.dom+'" does not exist.',"error");n({tracks:[],skin:u.skin,eq:u.eq,tracksPerArtist:u.tracksPerArtist,single:u.single,mini:u.mini});{var G=new d(b,v);w.find(".title")}return w.on("click",".controls",function(b){b.preventDefault();var c=a(b.target);c.hasClass("play")?G.pause():c.hasClass("next")?G.next():c.hasClass("prev")&&G.prev()}),w.on("click",".track-info",function(){var b=a(this),c=b.attr("class"),d=Number(b.attr("data-index"));-1===c.indexOf("playing")&&G.goto(d)}),w.on("slider:changed",".scrubber-slider",function(a,b){G.play(),m("Slider Ratio: "+b.ratio),G.seek(b.ratio)}),u.keyboardEvents&&document.addEventListener("keydown",function(a){32==a.keyCode?(G&&G.pause(),a.preventDefault()):39==a.keyCode?(G&&G.next(),a.preventDefault()):37==a.keyCode&&(G&&G.prev(),a.preventDefault())},!1),G.on("scplayer.play",function(){p(!1)}),G.on("scplayer.pause",function(){var a=G.sound().paused;p(a)}),G.on("scplayer.stop",function(){m("Stopped."),w.find(".play").attr("src",u.staticUrl+"img/play.png")}),G.on("scplayer.track.whileloading",function(a,b){B=b,C=b/100*G.sound().duration,w.find(".buffer").css("width",b+"%"),F&&C-G.position()>A&&(G.pause(),F=!1)}),G.on("scplayer.track.whileplaying",function(b,c,d){1!=u.visualizer||"number"!=typeof d[0]||isNaN(d[0])||o(d);var e=c/100,f=j(G.position()),g=j(G.track().duration-G.position());D=Math.round(c),e=e.toFixed(3),e!==x&&w.find(".scrubber-slider").simpleSlider("setRatio",e,!0),f!==y&&(w.find(".start-time").html(f),w.find(".stop-time").html(g)),x=e,y=f;var h=C-G.position()B/100;if(h){var i=a('');100!=D&&(G.pause(),F=!0,w.find(".stop-time").empty().append(i))}}),G.on("scplayer.playlist.preloaded",function(){m("All tracks loaded."),G.tracks(function(a){var b=G.track();m(a),1===a.length&&u.single!==!1&&0==u.mini&&(u.single=!0),w.find(".tdspinner").hide(),n({nowPlaying:b,tracks:a,skin:u.skin,tracksPerArtist:u.tracksPerArtist,visualizerType:u.visualizerType,single:u.single,mini:u.mini})})}),G.on("scplayer.track.ready",function(){E=!0}),G.on("scplayer.changing_track",function(a,b){m("New track index: "+b),w.find(".played").css("width","0%"),w.find(".buffer").css("width","0%"),G.tracks(function(a){n({nowPlaying:G.track(),tracks:a,skin:u.skin,tracksPerArtist:u.tracksPerArtist,visualizerType:u.visualizerType,single:u.single,mini:u.mini})})}),t={destroy:q,pause:r,parameters:u,play:s},ToneDen.players.push(t),t},getInstanceByDom:function(b){if(ToneDen.players)for(var c,d=0;d