Update Handlebars
This commit is contained in:
parent
2ff4f2bd6e
commit
1338a99536
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
|
||||
handlebars v2.0.0-alpha.4
|
||||
handlebars v2.0.0
|
||||
|
||||
Copyright (C) 2011-2014 by Yehuda Katz
|
||||
|
||||
|
@ -25,7 +25,15 @@ THE SOFTWARE.
|
|||
@license
|
||||
*/
|
||||
/* 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
|
||||
var __module3__ = (function() {
|
||||
"use strict";
|
||||
|
@ -63,7 +71,7 @@ var __module2__ = (function(__dependency1__) {
|
|||
var possible = /[&<>"'`]/;
|
||||
|
||||
function escapeChar(chr) {
|
||||
return escape[chr] || "&";
|
||||
return escape[chr];
|
||||
}
|
||||
|
||||
function extend(obj /* , ...source */) {
|
||||
|
@ -86,6 +94,7 @@ var __module2__ = (function(__dependency1__) {
|
|||
return typeof value === 'function';
|
||||
};
|
||||
// fallback for older versions of Chrome and Safari
|
||||
/* istanbul ignore next */
|
||||
if (isFunction(/x/)) {
|
||||
isFunction = function(value) {
|
||||
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
||||
|
@ -93,6 +102,7 @@ var __module2__ = (function(__dependency1__) {
|
|||
}
|
||||
var isFunction;
|
||||
__exports__.isFunction = isFunction;
|
||||
/* istanbul ignore next */
|
||||
var isArray = Array.isArray || function(value) {
|
||||
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
|
||||
if (string instanceof SafeString) {
|
||||
return string.toString();
|
||||
} else if (!string && string !== 0) {
|
||||
} else if (string == null) {
|
||||
return "";
|
||||
} else if (!string) {
|
||||
return string + '';
|
||||
}
|
||||
|
||||
// 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 Exception = __dependency2__;
|
||||
|
||||
var VERSION = "2.0.0-alpha.4";
|
||||
__exports__.VERSION = VERSION;var COMPILER_REVISION = 5;
|
||||
var VERSION = "2.0.0";
|
||||
__exports__.VERSION = VERSION;var COMPILER_REVISION = 6;
|
||||
__exports__.COMPILER_REVISION = COMPILER_REVISION;
|
||||
var REVISION_CHANGES = {
|
||||
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
||||
2: '== 1.0.0-rc.3',
|
||||
3: '== 1.0.0-rc.4',
|
||||
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;
|
||||
var isArray = Utils.isArray,
|
||||
|
@ -203,12 +216,11 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
|
|||
logger: logger,
|
||||
log: log,
|
||||
|
||||
registerHelper: function(name, fn, inverse) {
|
||||
registerHelper: function(name, fn) {
|
||||
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);
|
||||
} else {
|
||||
if (inverse) { fn.not = inverse; }
|
||||
this.helpers[name] = fn;
|
||||
}
|
||||
},
|
||||
|
@ -216,11 +228,11 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
|
|||
delete this.helpers[name];
|
||||
},
|
||||
|
||||
registerPartial: function(name, str) {
|
||||
registerPartial: function(name, partial) {
|
||||
if (toString.call(name) === objectType) {
|
||||
Utils.extend(this.partials, name);
|
||||
} else {
|
||||
this.partials[name] = str;
|
||||
this.partials[name] = partial;
|
||||
}
|
||||
},
|
||||
unregisterPartial: function(name) {
|
||||
|
@ -240,9 +252,8 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
|
|||
});
|
||||
|
||||
instance.registerHelper('blockHelperMissing', function(context, options) {
|
||||
var inverse = options.inverse || function() {}, fn = options.fn;
|
||||
|
||||
if (isFunction(context)) { context = context.call(this); }
|
||||
var inverse = options.inverse,
|
||||
fn = options.fn;
|
||||
|
||||
if(context === true) {
|
||||
return fn(this);
|
||||
|
@ -270,10 +281,8 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
|
|||
});
|
||||
|
||||
instance.registerHelper('each', function(context, options) {
|
||||
// Allow for {{#each}}
|
||||
if (!options) {
|
||||
options = context;
|
||||
context = this;
|
||||
throw new Exception('Must pass iterator to #each');
|
||||
}
|
||||
|
||||
var fn = options.fn, inverse = options.inverse;
|
||||
|
@ -360,15 +369,17 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
|
|||
}
|
||||
|
||||
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;
|
||||
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];
|
||||
});
|
||||
}
|
||||
|
@ -384,19 +395,19 @@ var __module1__ = (function(__dependency1__, __dependency2__) {
|
|||
level: 3,
|
||||
|
||||
// can be overridden in the host environment
|
||||
log: function(level, obj) {
|
||||
log: function(level, message) {
|
||||
if (logger.level <= level) {
|
||||
var method = logger.methodMap[level];
|
||||
if (typeof console !== 'undefined' && console[method]) {
|
||||
console[method].call(console, obj);
|
||||
console[method].call(console, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
__exports__.logger = logger;
|
||||
function log(level, obj) { logger.log(level, obj); }
|
||||
|
||||
__exports__.log = log;var createFrame = function(object) {
|
||||
var log = logger.log;
|
||||
__exports__.log = log;
|
||||
var createFrame = function(object) {
|
||||
var frame = Utils.extend({}, object);
|
||||
frame._parent = object;
|
||||
return frame;
|
||||
|
@ -436,26 +447,43 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
|
|||
__exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial
|
||||
|
||||
function template(templateSpec, env) {
|
||||
/* istanbul ignore next */
|
||||
if (!env) {
|
||||
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
|
||||
// for external users to override these as psuedo-supported APIs.
|
||||
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) {
|
||||
context = Utils.extend({}, context, hash);
|
||||
}
|
||||
|
||||
var result = env.VM.invokePartial.call(this, partial, name, context, helpers, partials, data);
|
||||
if (result != null) { return result; }
|
||||
var result = env.VM.invokePartial.call(this, partial, name, context, helpers, partials, data, depths);
|
||||
|
||||
if (env.compile) {
|
||||
var options = { helpers: helpers, partials: partials, data: data };
|
||||
partials[name] = env.compile(partial, { data: data !== undefined }, env);
|
||||
return partials[name](context, options);
|
||||
if (result == null && env.compile) {
|
||||
var options = { helpers: helpers, partials: partials, data: data, depths: depths };
|
||||
partials[name] = env.compile(partial, { data: data !== undefined, compat: templateSpec.compat }, env);
|
||||
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 {
|
||||
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
|
||||
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,
|
||||
invokePartial: invokePartialWrapper,
|
||||
|
||||
|
@ -471,17 +511,16 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
|
|||
},
|
||||
|
||||
programs: [],
|
||||
program: function(i, data) {
|
||||
program: function(i, data, depths) {
|
||||
var programWrapper = this.programs[i],
|
||||
fn = this.fn(i);
|
||||
if(data) {
|
||||
programWrapper = program(this, i, fn, data);
|
||||
if (data || depths) {
|
||||
programWrapper = program(this, i, fn, data, depths);
|
||||
} else if (!programWrapper) {
|
||||
programWrapper = this.programs[i] = program(this, i, fn);
|
||||
}
|
||||
return programWrapper;
|
||||
},
|
||||
programWithDepth: env.VM.programWithDepth,
|
||||
|
||||
data: function(data, depth) {
|
||||
while (data && depth--) {
|
||||
|
@ -505,16 +544,20 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
|
|||
|
||||
var ret = function(context, options) {
|
||||
options = options || {};
|
||||
var helpers,
|
||||
partials,
|
||||
data = options.data;
|
||||
var data = options.data;
|
||||
|
||||
ret._setup(options);
|
||||
if (!options.partial && templateSpec.useData) {
|
||||
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) {
|
||||
if (!options.partial) {
|
||||
|
@ -529,41 +572,29 @@ var __module5__ = (function(__dependency1__, __dependency2__, __dependency3__) {
|
|||
}
|
||||
};
|
||||
|
||||
ret._child = function(i) {
|
||||
return container.programWithDepth(i);
|
||||
ret._child = function(i, data, depths) {
|
||||
if (templateSpec.useDepths && !depths) {
|
||||
throw new Exception('must pass parent depths');
|
||||
}
|
||||
|
||||
return program(container, i, templateSpec[i], data, depths);
|
||||
};
|
||||
return ret;
|
||||
}
|
||||
|
||||
__exports__.template = template;function programWithDepth(i, data /*, $depth */) {
|
||||
/*jshint -W040 */
|
||||
var args = Array.prototype.slice.call(arguments, 2),
|
||||
container = this,
|
||||
fn = container.fn(i);
|
||||
|
||||
__exports__.template = template;function program(container, i, fn, data, depths) {
|
||||
var prog = function(context, 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.depth = args.length;
|
||||
prog.depth = depths ? depths.length : 0;
|
||||
return prog;
|
||||
}
|
||||
|
||||
__exports__.programWithDepth = programWithDepth;function program(container, i, fn, data) {
|
||||
var prog = function(context, options) {
|
||||
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 };
|
||||
__exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data, depths) {
|
||||
var options = { partial: true, helpers: helpers, partials: partials, data: data, depths: depths };
|
||||
|
||||
if(partial === undefined) {
|
||||
throw new Exception("The partial " + name + " could not be found");
|
||||
|
@ -606,6 +637,7 @@ var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, _
|
|||
hb.SafeString = SafeString;
|
||||
hb.Exception = Exception;
|
||||
hb.Utils = Utils;
|
||||
hb.escapeExpression = Utils.escapeExpression;
|
||||
|
||||
hb.VM = runtime;
|
||||
hb.template = function(spec) {
|
||||
|
@ -618,9 +650,11 @@ var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, _
|
|||
var Handlebars = create();
|
||||
Handlebars.create = create;
|
||||
|
||||
Handlebars['default'] = Handlebars;
|
||||
|
||||
__exports__ = Handlebars;
|
||||
return __exports__;
|
||||
})(__module1__, __module3__, __module4__, __module2__, __module5__);
|
||||
|
||||
return __module0__;
|
||||
})();
|
||||
}));
|
||||
|
|
|
@ -1,122 +1,122 @@
|
|||
(function() {
|
||||
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
||||
templates['chan'] = template({"1":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", escapeExpression=this.escapeExpression;
|
||||
return "\n<button data-id=\""
|
||||
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||
return "<button data-id=\""
|
||||
+ 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-"
|
||||
+ 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=\""
|
||||
+ 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 "
|
||||
+ 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 "
|
||||
+ 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";
|
||||
},"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 = "";
|
||||
stack1 = helpers.each.call(depth0, (depth0 && depth0.channels), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
return buffer + "\n";
|
||||
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 != null) { buffer += stack1; }
|
||||
return buffer;
|
||||
},"useData":true});
|
||||
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-"
|
||||
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div id=\"chan-"
|
||||
+ 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=\""
|
||||
+ 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=\""
|
||||
+ 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 "
|
||||
+ 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\">"
|
||||
+ 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\">"
|
||||
+ escapeExpression(((helper = helpers.type || (depth0 && depth0.type)),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
|
||||
+ " </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}));
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
return buffer + "\n <div class=\"messages\">\n "
|
||||
+ escapeExpression((helper = helpers.partial || (depth0 && depth0.partial) || helperMissing,helper.call(depth0, "msg", {"name":"partial","hash":{},"data":data})))
|
||||
+ 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";
|
||||
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 != null) { buffer += stack1; }
|
||||
return buffer + " <div class=\"messages\">\n "
|
||||
+ 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 "
|
||||
+ 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";
|
||||
},"2":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", escapeExpression=this.escapeExpression;
|
||||
return "\n <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)))
|
||||
+ "\">\n Show more\n </button>\n ";
|
||||
},"compiler":[5,">= 2.0.0"],"main":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||
return " <button class=\"show-more\" data-id=\""
|
||||
+ 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";
|
||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
var stack1, buffer = "";
|
||||
stack1 = helpers.each.call(depth0, (depth0 && depth0.channels), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
return buffer + "\n";
|
||||
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 != null) { buffer += stack1; }
|
||||
return buffer;
|
||||
},"useData":true});
|
||||
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 "
|
||||
+ escapeExpression(((helper = helpers.type || (depth0 && depth0.type)),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
|
||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"msg "
|
||||
+ 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 "
|
||||
+ escapeExpression((helper = helpers.tz || (depth0 && depth0.tz) || helperMissing,helper.call(depth0, (depth0 && depth0.time), {"name":"tz","hash":{},"data":data})))
|
||||
+ "\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});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n </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)))
|
||||
+ "</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}));
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
return buffer + "\n </span>\n</div>\n";
|
||||
+ 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";
|
||||
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 != null) { buffer += stack1; }
|
||||
buffer += " </span>\n <span class=\"text\">\n <em class=\"type\">"
|
||||
+ 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";
|
||||
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 != null) { buffer += stack1; }
|
||||
return buffer + " </span>\n</div>\n";
|
||||
},"2":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", escapeExpression=this.escapeExpression;
|
||||
return "\n <button class=\"user\">"
|
||||
+ escapeExpression(((helper = helpers.from || (depth0 && depth0.from)),(typeof helper === functionType ? helper.call(depth0, {"name":"from","hash":{},"data":data}) : helper)))
|
||||
+ "</button>\n ";
|
||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||
return " <button class=\"user\">"
|
||||
+ 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";
|
||||
},"4":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", escapeExpression=this.escapeExpression;
|
||||
return "\n <img src=\""
|
||||
+ escapeExpression(((helper = helpers.text || (depth0 && depth0.text)),(typeof helper === functionType ? helper.call(depth0, {"name":"text","hash":{},"data":data}) : helper)))
|
||||
+ "\" class=\"image\">\n ";
|
||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||
return " <img src=\""
|
||||
+ 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";
|
||||
},"6":function(depth0,helpers,partials,data) {
|
||||
var stack1, helper, helperMissing=helpers.helperMissing, buffer = "\n ";
|
||||
stack1 = (helper = helpers.uri || (depth0 && depth0.uri) || helperMissing,helper.call(depth0, (depth0 && depth0.text), {"name":"uri","hash":{},"data":data}));
|
||||
if(stack1 || stack1 === 0) { 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; }
|
||||
var stack1, helperMissing=helpers.helperMissing, buffer = " ";
|
||||
stack1 = ((helpers.uri || (depth0 && depth0.uri) || helperMissing).call(depth0, (depth0 != null ? depth0.text : depth0), {"name":"uri","hash":{},"data":data}));
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
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});
|
||||
templates['network'] = template({"1":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing;
|
||||
return "\n<section id=\"network-"
|
||||
+ escapeExpression(((helper = helpers.id || (depth0 && depth0.id)),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||
return "<section id=\"network-"
|
||||
+ 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 "
|
||||
+ 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";
|
||||
},"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 = "";
|
||||
stack1 = helpers.each.call(depth0, (depth0 && depth0.networks), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
return buffer + "\n";
|
||||
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 != null) { buffer += stack1; }
|
||||
return buffer;
|
||||
},"useData":true});
|
||||
templates['user'] = template({"1":function(depth0,helpers,partials,data) {
|
||||
var stack1, functionType="function", escapeExpression=this.escapeExpression;
|
||||
return "\n<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))
|
||||
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
|
||||
return "<div class=\"count\">\n <input class=\"search\" placeholder=\""
|
||||
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.users : depth0)) != null ? stack1.length : stack1), depth0))
|
||||
+ " users\">\n</div>\n";
|
||||
},"3":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", escapeExpression=this.escapeExpression;
|
||||
return "\n <button class=\"user\">"
|
||||
+ escapeExpression(((helper = helpers.mode || (depth0 && depth0.mode)),(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)))
|
||||
+ "</button>\n ";
|
||||
},"compiler":[5,">= 2.0.0"],"main":function(depth0,helpers,partials,data) {
|
||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||
return " <button class=\"user\">"
|
||||
+ 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 = (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";
|
||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||
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});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
buffer += "\n<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});
|
||||
if(stack1 || stack1 === 0) { buffer += stack1; }
|
||||
return buffer + "\n</div>\n";
|
||||
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 != null) { buffer += stack1; }
|
||||
buffer += "<div class=\"names\">\n";
|
||||
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 != null) { buffer += stack1; }
|
||||
return buffer + "</div>\n";
|
||||
},"useData":true});
|
||||
})();
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "shout",
|
||||
"description": "A web IRC client",
|
||||
"version": "0.18.1",
|
||||
"version": "0.19.0",
|
||||
"author": "Mattias Erming",
|
||||
"preferGlobal": true,
|
||||
"bin": {
|
||||
|
|
Loading…
Reference in New Issue