Update Handlebars

This commit is contained in:
Mattias Erming 2014-09-09 14:55:45 -07:00
parent 2ff4f2bd6e
commit 1338a99536
4 changed files with 191 additions and 157 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*! /*!
handlebars v2.0.0-alpha.4 handlebars v2.0.0
Copyright (C) 2011-2014 by Yehuda Katz Copyright (C) 2011-2014 by Yehuda Katz
@ -25,7 +25,15 @@ THE SOFTWARE.
@license @license
*/ */
/* exported Handlebars */ /* exported Handlebars */
this.Handlebars = (function() { (function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.Handlebars = root.Handlebars || factory();
}
}(this, function () {
// handlebars/safe-string.js // handlebars/safe-string.js
var __module3__ = (function() { var __module3__ = (function() {
"use strict"; "use strict";
@ -63,7 +71,7 @@ var __module2__ = (function(__dependency1__) {
var possible = /[&<>"'`]/; var possible = /[&<>"'`]/;
function escapeChar(chr) { function escapeChar(chr) {
return escape[chr] || "&amp;"; return escape[chr];
} }
function extend(obj /* , ...source */) { function extend(obj /* , ...source */) {
@ -86,6 +94,7 @@ var __module2__ = (function(__dependency1__) {
return typeof value === 'function'; return typeof value === 'function';
}; };
// fallback for older versions of Chrome and Safari // fallback for older versions of Chrome and Safari
/* istanbul ignore next */
if (isFunction(/x/)) { if (isFunction(/x/)) {
isFunction = function(value) { isFunction = function(value) {
return typeof value === 'function' && toString.call(value) === '[object Function]'; return typeof value === 'function' && toString.call(value) === '[object Function]';
@ -93,6 +102,7 @@ var __module2__ = (function(__dependency1__) {
} }
var isFunction; var isFunction;
__exports__.isFunction = isFunction; __exports__.isFunction = isFunction;
/* istanbul ignore next */
var isArray = Array.isArray || function(value) { var isArray = Array.isArray || function(value) {
return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false; return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;
}; };
@ -102,8 +112,10 @@ var __module2__ = (function(__dependency1__) {
// don't escape SafeStrings, since they're already safe // don't escape SafeStrings, since they're already safe
if (string instanceof SafeString) { if (string instanceof SafeString) {
return string.toString(); return string.toString();
} else if (!string && string !== 0) { } else if (string == null) {
return ""; return "";
} else if (!string) {
return string + '';
} }
// Force a string conversion as this will be done by the append regardless and // Force a string conversion as this will be done by the append regardless and
@ -174,15 +186,16 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
var Utils = __dependency1__; var Utils = __dependency1__;
var Exception = __dependency2__; var Exception = __dependency2__;
var VERSION = "2.0.0-alpha.4"; var VERSION = "2.0.0";
__exports__.VERSION = VERSION;var COMPILER_REVISION = 5; __exports__.VERSION = VERSION;var COMPILER_REVISION = 6;
__exports__.COMPILER_REVISION = COMPILER_REVISION; __exports__.COMPILER_REVISION = COMPILER_REVISION;
var REVISION_CHANGES = { var REVISION_CHANGES = {
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
2: '== 1.0.0-rc.3', 2: '== 1.0.0-rc.3',
3: '== 1.0.0-rc.4', 3: '== 1.0.0-rc.4',
4: '== 1.x.x', 4: '== 1.x.x',
5: '>= 2.0.0' 5: '== 2.0.0-alpha.x',
6: '>= 2.0.0-beta.1'
}; };
__exports__.REVISION_CHANGES = REVISION_CHANGES; __exports__.REVISION_CHANGES = REVISION_CHANGES;
var isArray = Utils.isArray, var isArray = Utils.isArray,
@ -203,12 +216,11 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
logger: logger, logger: logger,
log: log, log: log,
registerHelper: function(name, fn, inverse) { registerHelper: function(name, fn) {
if (toString.call(name) === objectType) { if (toString.call(name) === objectType) {
if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); } if (fn) { throw new Exception('Arg not supported with multiple helpers'); }
Utils.extend(this.helpers, name); Utils.extend(this.helpers, name);
} else { } else {
if (inverse) { fn.not = inverse; }
this.helpers[name] = fn; this.helpers[name] = fn;
} }
}, },
@ -216,11 +228,11 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
delete this.helpers[name]; delete this.helpers[name];
}, },
registerPartial: function(name, str) { registerPartial: function(name, partial) {
if (toString.call(name) === objectType) { if (toString.call(name) === objectType) {
Utils.extend(this.partials, name); Utils.extend(this.partials, name);
} else { } else {
this.partials[name] = str; this.partials[name] = partial;
} }
}, },
unregisterPartial: function(name) { unregisterPartial: function(name) {
@ -240,9 +252,8 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
}); });
instance.registerHelper('blockHelperMissing', function(context, options) { instance.registerHelper('blockHelperMissing', function(context, options) {
var inverse = options.inverse || function() {}, fn = options.fn; var inverse = options.inverse,
fn = options.fn;
if (isFunction(context)) { context = context.call(this); }
if(context === true) { if(context === true) {
return fn(this); return fn(this);
@ -270,10 +281,8 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
}); });
instance.registerHelper('each', function(context, options) { instance.registerHelper('each', function(context, options) {
// Allow for {{#each}}
if (!options) { if (!options) {
options = context; throw new Exception('Must pass iterator to #each');
context = this;
} }
var fn = options.fn, inverse = options.inverse; var fn = options.fn, inverse = options.inverse;
@ -360,15 +369,17 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
} }
return fn(context, options); return fn(context, options);
} else {
return options.inverse(this);
} }
}); });
instance.registerHelper('log', function(context, options) { instance.registerHelper('log', function(message, options) {
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1; var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
instance.log(level, context); instance.log(level, message);
}); });
instance.registerHelper('lookup', function(obj, field, options) { instance.registerHelper('lookup', function(obj, field) {
return obj && obj[field]; return obj && obj[field];
}); });
} }
@ -384,19 +395,19 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
level: 3, level: 3,
// can be overridden in the host environment // can be overridden in the host environment
log: function(level, obj) { log: function(level, message) {
if (logger.level <= level) { if (logger.level <= level) {
var method = logger.methodMap[level]; var method = logger.methodMap[level];
if (typeof console !== 'undefined' && console[method]) { if (typeof console !== 'undefined' && console[method]) {
console[method].call(console, obj); console[method].call(console, message);
} }
} }
} }
}; };
__exports__.logger = logger; __exports__.logger = logger;
function log(level, obj) { logger.log(level, obj); } var log = logger.log;
__exports__.log = log;
__exports__.log = log;var createFrame = function(object) { var createFrame = function(object) {
var frame = Utils.extend({}, object); var frame = Utils.extend({}, object);
frame._parent = object; frame._parent = object;
return frame; return frame;
@ -436,26 +447,43 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
__exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial __exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial
function template(templateSpec, env) { function template(templateSpec, env) {
/* istanbul ignore next */
if (!env) { if (!env) {
throw new Exception("No environment passed to template"); throw new Exception("No environment passed to template");
} }
if (!templateSpec || !templateSpec.main) {
throw new Exception('Unknown template object: ' + typeof templateSpec);
}
// Note: Using env.VM references rather than local var references throughout this section to allow // Note: Using env.VM references rather than local var references throughout this section to allow
// for external users to override these as psuedo-supported APIs. // for external users to override these as psuedo-supported APIs.
env.VM.checkRevision(templateSpec.compiler); env.VM.checkRevision(templateSpec.compiler);
var invokePartialWrapper = function(partial, name, context, hash, helpers, partials, data) { var invokePartialWrapper = function(partial, indent, name, context, hash, helpers, partials, data, depths) {
if (hash) { if (hash) {
context = Utils.extend({}, context, hash); context = Utils.extend({}, context, hash);
} }
var result = env.VM.invokePartial.call(this, partial, name, context, helpers, partials, data); var result = env.VM.invokePartial.call(this, partial, name, context, helpers, partials, data, depths);
if (result != null) { return result; }
if (env.compile) { if (result == null && env.compile) {
var options = { helpers: helpers, partials: partials, data: data }; var options = { helpers: helpers, partials: partials, data: data, depths: depths };
partials[name] = env.compile(partial, { data: data !== undefined }, env); partials[name] = env.compile(partial, { data: data !== undefined, compat: templateSpec.compat }, env);
return partials[name](context, options); result = partials[name](context, options);
}
if (result != null) {
if (indent) {
var lines = result.split('\n');
for (var i = 0, l = lines.length; i < l; i++) {
if (!lines[i] && i + 1 === l) {
break;
}
lines[i] = indent + lines[i];
}
result = lines.join('\n');
}
return result;
} else { } else {
throw new Exception("The partial " + name + " could not be compiled when running in runtime-only mode"); throw new Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
} }
@ -463,6 +491,18 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
// Just add water // Just add water
var container = { var container = {
lookup: function(depths, name) {
var len = depths.length;
for (var i = 0; i < len; i++) {
if (depths[i] && depths[i][name] != null) {
return depths[i][name];
}
}
},
lambda: function(current, context) {
return typeof current === 'function' ? current.call(context) : current;
},
escapeExpression: Utils.escapeExpression, escapeExpression: Utils.escapeExpression,
invokePartial: invokePartialWrapper, invokePartial: invokePartialWrapper,
@ -471,17 +511,16 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
}, },
programs: [], programs: [],
program: function(i, data) { program: function(i, data, depths) {
var programWrapper = this.programs[i], var programWrapper = this.programs[i],
fn = this.fn(i); fn = this.fn(i);
if(data) { if (data || depths) {
programWrapper = program(this, i, fn, data); programWrapper = program(this, i, fn, data, depths);
} else if (!programWrapper) { } else if (!programWrapper) {
programWrapper = this.programs[i] = program(this, i, fn); programWrapper = this.programs[i] = program(this, i, fn);
} }
return programWrapper; return programWrapper;
}, },
programWithDepth: env.VM.programWithDepth,
data: function(data, depth) { data: function(data, depth) {
while (data && depth--) { while (data && depth--) {
@ -505,16 +544,20 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
var ret = function(context, options) { var ret = function(context, options) {
options = options || {}; options = options || {};
var helpers, var data = options.data;
partials,
data = options.data;
ret._setup(options); ret._setup(options);
if (!options.partial && templateSpec.useData) { if (!options.partial && templateSpec.useData) {
data = initData(context, data); data = initData(context, data);
} }
return templateSpec.main.call(container, context, container.helpers, container.partials, data); var depths;
if (templateSpec.useDepths) {
depths = options.depths ? [context].concat(options.depths) : [context];
}
return templateSpec.main.call(container, context, container.helpers, container.partials, data, depths);
}; };
ret.isTop = true;
ret._setup = function(options) { ret._setup = function(options) {
if (!options.partial) { if (!options.partial) {
@ -529,41 +572,29 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
} }
}; };
ret._child = function(i) { ret._child = function(i, data, depths) {
return container.programWithDepth(i); if (templateSpec.useDepths && !depths) {
throw new Exception('must pass parent depths');
}
return program(container, i, templateSpec[i], data, depths);
}; };
return ret; return ret;
} }
__exports__.template = template;function programWithDepth(i, data /*, $depth */) { __exports__.template = template;function program(container, i, fn, data, depths) {
/*jshint -W040 */
var args = Array.prototype.slice.call(arguments, 2),
container = this,
fn = container.fn(i);
var prog = function(context, options) { var prog = function(context, options) {
options = options || {}; options = options || {};
return fn.apply(container, [context, container.helpers, container.partials, options.data || data].concat(args)); return fn.call(container, context, container.helpers, container.partials, options.data || data, depths && [context].concat(depths));
}; };
prog.program = i; prog.program = i;
prog.depth = args.length; prog.depth = depths ? depths.length : 0;
return prog; return prog;
} }
__exports__.programWithDepth = programWithDepth;function program(container, i, fn, data) { __exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data, depths) {
var prog = function(context, options) { var options = { partial: true, helpers: helpers, partials: partials, data: data, depths: depths };
options = options || {};
return fn.call(container, context, container.helpers, container.partials, options.data || data);
};
prog.program = i;
prog.depth = 0;
return prog;
}
__exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data) {
var options = { partial: true, helpers: helpers, partials: partials, data: data };
if(partial === undefined) { if(partial === undefined) {
throw new Exception("The partial " + name + " could not be found"); throw new Exception("The partial " + name + " could not be found");
@ -606,6 +637,7 @@ var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, _
hb.SafeString = SafeString; hb.SafeString = SafeString;
hb.Exception = Exception; hb.Exception = Exception;
hb.Utils = Utils; hb.Utils = Utils;
hb.escapeExpression = Utils.escapeExpression;
hb.VM = runtime; hb.VM = runtime;
hb.template = function(spec) { hb.template = function(spec) {
@ -618,9 +650,11 @@ var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, _
var Handlebars = create(); var Handlebars = create();
Handlebars.create = create; Handlebars.create = create;
Handlebars['default'] = Handlebars;
__exports__ = Handlebars; __exports__ = Handlebars;
return __exports__; return __exports__;
})(__module1__, __module3__, __module4__, __module2__, __module5__); })(__module1__, __module3__, __module4__, __module2__, __module5__);
return __module0__; return __module0__;
})(); }));

View File

@ -1,122 +1,122 @@
(function() { (function() {
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
templates['chan'] = template({"1":function(depth0,helpers,partials,data) { templates['chan'] = template({"1":function(depth0,helpers,partials,data) {
var helper, functionType="function", escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "\n<button data-id=\"" return "<button data-id=\""
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\" data-target=\"#chan-" + "\" data-target=\"#chan-"
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\" data-title=\"" + "\" data-title=\""
+ escapeExpression(((helper = helpers.name || (depth0 && depth0.name)),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ "\" class=\"chan " + "\" class=\"chan "
+ escapeExpression(((helper = helpers.type || (depth0 && depth0.type)),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+ "\">\n <span class=\"badge\"></span>\n <span class=\"close\"></span>\n " + "\">\n <span class=\"badge\"></span>\n <span class=\"close\"></span>\n "
+ escapeExpression(((helper = helpers.name || (depth0 && depth0.name)),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ "\n</button>\n"; + "\n</button>\n";
},"compiler":[5,">= 2.0.0"],"main":function(depth0,helpers,partials,data) { },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, buffer = ""; var stack1, buffer = "";
stack1 = helpers.each.call(depth0, (depth0 && depth0.channels), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.channels : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n"; return buffer;
},"useData":true}); },"useData":true});
templates['chat'] = template({"1":function(depth0,helpers,partials,data) { templates['chat'] = template({"1":function(depth0,helpers,partials,data) {
var stack1, helper, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, buffer = "\n<div id=\"chan-" var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div id=\"chan-"
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\" data-id=\"" + "\" data-id=\""
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\" data-type=\"" + "\" data-type=\""
+ escapeExpression(((helper = helpers.type || (depth0 && depth0.type)),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+ "\" class=\"chan " + "\" class=\"chan "
+ escapeExpression(((helper = helpers.type || (depth0 && depth0.type)),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+ "\">\n <div class=\"header\">\n <button class=\"lt\"></button>\n <button class=\"rt\"></button>\n <span class=\"title\">" + "\">\n <div class=\"header\">\n <button class=\"lt\"></button>\n <button class=\"rt\"></button>\n <span class=\"title\">"
+ escapeExpression(((helper = helpers.name || (depth0 && depth0.name)),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ "</span>\n <span class=\"topic\">" + "</span>\n <span class=\"topic\">"
+ escapeExpression(((helper = helpers.type || (depth0 && depth0.type)),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+ " </span>\n </div>\n <div class=\"chat\">\n "; + " </span>\n </div>\n <div class=\"chat\">\n";
stack1 = (helper = helpers.equal || (depth0 && depth0.equal) || helperMissing,helper.call(depth0, 100, ((stack1 = (depth0 && depth0.messages)),stack1 == null || stack1 === false ? stack1 : stack1.length), {"name":"equal","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data})); stack1 = ((helpers.equal || (depth0 && depth0.equal) || helperMissing).call(depth0, 100, ((stack1 = (depth0 != null ? depth0.messages : depth0)) != null ? stack1.length : stack1), {"name":"equal","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}));
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n <div class=\"messages\">\n " return buffer + " <div class=\"messages\">\n "
+ escapeExpression((helper = helpers.partial || (depth0 && depth0.partial) || helperMissing,helper.call(depth0, "msg", {"name":"partial","hash":{},"data":data}))) + escapeExpression(((helpers.partial || (depth0 && depth0.partial) || helperMissing).call(depth0, "msg", {"name":"partial","hash":{},"data":data})))
+ "\n </div>\n </div>\n <aside class=\"sidebar\">\n <div class=\"users\">\n " + "\n </div>\n </div>\n <aside class=\"sidebar\">\n <div class=\"users\">\n "
+ escapeExpression((helper = helpers.partial || (depth0 && depth0.partial) || helperMissing,helper.call(depth0, "user", {"name":"partial","hash":{},"data":data}))) + escapeExpression(((helpers.partial || (depth0 && depth0.partial) || helperMissing).call(depth0, "user", {"name":"partial","hash":{},"data":data})))
+ "\n </div>\n </aside>\n</div>\n"; + "\n </div>\n </aside>\n</div>\n";
},"2":function(depth0,helpers,partials,data) { },"2":function(depth0,helpers,partials,data) {
var helper, functionType="function", escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "\n <button class=\"show-more\" data-id=\"" return " <button class=\"show-more\" data-id=\""
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\">\n Show more\n </button>\n "; + "\">\n Show more\n </button>\n";
},"compiler":[5,">= 2.0.0"],"main":function(depth0,helpers,partials,data) { },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, buffer = ""; var stack1, buffer = "";
stack1 = helpers.each.call(depth0, (depth0 && depth0.channels), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.channels : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n"; return buffer;
},"useData":true}); },"useData":true});
templates['msg'] = template({"1":function(depth0,helpers,partials,data) { templates['msg'] = template({"1":function(depth0,helpers,partials,data) {
var stack1, helper, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, buffer = "\n<div class=\"msg " var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"msg "
+ escapeExpression(((helper = helpers.type || (depth0 && depth0.type)),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+ "\">\n <span class=\"time\">\n " + "\">\n <span class=\"time\">\n "
+ escapeExpression((helper = helpers.tz || (depth0 && depth0.tz) || helperMissing,helper.call(depth0, (depth0 && depth0.time), {"name":"tz","hash":{},"data":data}))) + escapeExpression(((helpers.tz || (depth0 && depth0.tz) || helperMissing).call(depth0, (depth0 != null ? depth0.time : depth0), {"name":"tz","hash":{},"data":data})))
+ "\n </span>\n <span class=\"from\">\n "; + "\n </span>\n <span class=\"from\">\n";
stack1 = helpers['if'].call(depth0, (depth0 && depth0.from), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data}); stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.from : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
buffer += "\n </span>\n <span class=\"text\">\n <em class=\"type\">" buffer += " </span>\n <span class=\"text\">\n <em class=\"type\">"
+ escapeExpression(((helper = helpers.type || (depth0 && depth0.type)),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+ "</em>\n "; + "</em>\n";
stack1 = (helper = helpers.equal || (depth0 && depth0.equal) || helperMissing,helper.call(depth0, (depth0 && depth0.type), "image", {"name":"equal","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data})); stack1 = ((helpers.equal || (depth0 && depth0.equal) || helperMissing).call(depth0, (depth0 != null ? depth0.type : depth0), "image", {"name":"equal","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data}));
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n </span>\n</div>\n"; return buffer + " </span>\n</div>\n";
},"2":function(depth0,helpers,partials,data) { },"2":function(depth0,helpers,partials,data) {
var helper, functionType="function", escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "\n <button class=\"user\">" return " <button class=\"user\">"
+ escapeExpression(((helper = helpers.from || (depth0 && depth0.from)),(typeof helper === functionType ? helper.call(depth0, {"name":"from","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.from || (depth0 != null ? depth0.from : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"from","hash":{},"data":data}) : helper)))
+ "</button>\n "; + "</button>\n";
},"4":function(depth0,helpers,partials,data) { },"4":function(depth0,helpers,partials,data) {
var helper, functionType="function", escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "\n <img src=\"" return " <img src=\""
+ escapeExpression(((helper = helpers.text || (depth0 && depth0.text)),(typeof helper === functionType ? helper.call(depth0, {"name":"text","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.text || (depth0 != null ? depth0.text : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"text","hash":{},"data":data}) : helper)))
+ "\" class=\"image\">\n "; + "\" class=\"image\">\n";
},"6":function(depth0,helpers,partials,data) { },"6":function(depth0,helpers,partials,data) {
var stack1, helper, helperMissing=helpers.helperMissing, buffer = "\n "; var stack1, helperMissing=helpers.helperMissing, buffer = " ";
stack1 = (helper = helpers.uri || (depth0 && depth0.uri) || helperMissing,helper.call(depth0, (depth0 && depth0.text), {"name":"uri","hash":{},"data":data})); stack1 = ((helpers.uri || (depth0 && depth0.uri) || helperMissing).call(depth0, (depth0 != null ? depth0.text : depth0), {"name":"uri","hash":{},"data":data}));
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n ";
},"compiler":[5,">= 2.0.0"],"main":function(depth0,helpers,partials,data) {
var stack1, buffer = "";
stack1 = helpers.each.call(depth0, (depth0 && depth0.messages), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if(stack1 || stack1 === 0) { buffer += stack1; }
return buffer + "\n"; return buffer + "\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, buffer = "";
stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.messages : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
return buffer;
},"useData":true}); },"useData":true});
templates['network'] = template({"1":function(depth0,helpers,partials,data) { templates['network'] = template({"1":function(depth0,helpers,partials,data) {
var helper, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "\n<section id=\"network-" return "<section id=\"network-"
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+ "\" class=\"network\">\n " + "\" class=\"network\">\n "
+ escapeExpression((helper = helpers.partial || (depth0 && depth0.partial) || helperMissing,helper.call(depth0, "chan", {"name":"partial","hash":{},"data":data}))) + escapeExpression(((helpers.partial || (depth0 && depth0.partial) || helperMissing).call(depth0, "chan", {"name":"partial","hash":{},"data":data})))
+ "\n</section>\n"; + "\n</section>\n";
},"compiler":[5,">= 2.0.0"],"main":function(depth0,helpers,partials,data) { },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, buffer = ""; var stack1, buffer = "";
stack1 = helpers.each.call(depth0, (depth0 && depth0.networks), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.networks : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n"; return buffer;
},"useData":true}); },"useData":true});
templates['user'] = template({"1":function(depth0,helpers,partials,data) { templates['user'] = template({"1":function(depth0,helpers,partials,data) {
var stack1, functionType="function", escapeExpression=this.escapeExpression; var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
return "\n<div class=\"count\">\n <input class=\"search\" placeholder=\"" return "<div class=\"count\">\n <input class=\"search\" placeholder=\""
+ escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.users)),stack1 == null || stack1 === false ? stack1 : stack1.length)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.users : depth0)) != null ? stack1.length : stack1), depth0))
+ " users\">\n</div>\n"; + " users\">\n</div>\n";
},"3":function(depth0,helpers,partials,data) { },"3":function(depth0,helpers,partials,data) {
var helper, functionType="function", escapeExpression=this.escapeExpression; var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "\n <button class=\"user\">" return " <button class=\"user\">"
+ escapeExpression(((helper = helpers.mode || (depth0 && depth0.mode)),(typeof helper === functionType ? helper.call(depth0, {"name":"mode","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.mode || (depth0 != null ? depth0.mode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"mode","hash":{},"data":data}) : helper)))
+ escapeExpression(((helper = helpers.name || (depth0 && depth0.name)),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper))) + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+ "</button>\n "; + "</button>\n";
},"compiler":[5,">= 2.0.0"],"main":function(depth0,helpers,partials,data) { },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, buffer = ""; var stack1, buffer = "";
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.users)),stack1 == null || stack1 === false ? stack1 : stack1.length), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.users : depth0)) != null ? stack1.length : stack1), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
buffer += "\n<div class=\"names\">\n "; buffer += "<div class=\"names\">\n";
stack1 = helpers.each.call(depth0, (depth0 && depth0.users), {"name":"each","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}); stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.users : depth0), {"name":"each","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
if(stack1 || stack1 === 0) { buffer += stack1; } if (stack1 != null) { buffer += stack1; }
return buffer + "\n</div>\n"; return buffer + "</div>\n";
},"useData":true}); },"useData":true});
})(); })();

View File

@ -1,7 +1,7 @@
{ {
"name": "shout", "name": "shout",
"description": "A web IRC client", "description": "A web IRC client",
"version": "0.18.1", "version": "0.19.0",
"author": "Mattias Erming", "author": "Mattias Erming",
"preferGlobal": true, "preferGlobal": true,
"bin": { "bin": {