// Marionette.Handlebars, v2.0.0 // Copyright (c) 2015-2016 Michael Heim, Zeilenwechsel.de // Distributed under MIT license // http://github.com/hashchange/marionette.handlebars !function(a,b){"use strict";var c="object"==typeof exports&&exports&&!exports.nodeType&&"object"==typeof module&&module&&!module.nodeType;"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(["exports","underscore","backbone","handlebars","marionette"],b):c?b(exports,require("underscore"),require("backbone"),require("handlebars"),require("marionette")):b({},_,Backbone,Handlebars)}(this,function(a,_,Backbone,b){"use strict";function c(a){return _.isString(a)&&a.length>0}function d(a){return c(a)||f.TemplateCache.allowCompiledTemplatesOverHttp&&_.isFunction(a)}var e,f=Backbone.Marionette;if(!f)throw new Error("Load error: Backbone.Marionette is not available");e=f.TemplateCache.prototype.loadTemplate,f.TemplateCache.allowCompiledTemplatesOverHttp=!1,f.TemplateCache.MarionetteHandlebarsVersion="2.0.0",_.extend(f.TemplateCache.prototype,{loadTemplate:function(a,b){var f,g=this.getPrecompiledTemplate(a);if(!g||!_.isFunction(g)){try{f=e.call(this,a,b)}catch(a){}c(f)||(f=this.lazyLoadTemplate(a,b)),d(f)||this.throwTemplateError(a)}return f||g},compileTemplate:function(a,c){return _.isFunction(a)?a:b.compile(a,c)},getPrecompiledTemplate:function(a){return b.templates&&b.templates[a]},lazyLoadTemplate:function(a,b){},throwTemplateError:function(a){var b="NoTemplateError",c='Could not load template: "'+a+'". It does not exist, is of an illegal type, or has content which cannot be processed.';if(f.Error)throw new f.Error({name:b,message:c});if("function"!=typeof throwError)throw new Error(c);throwError(c,b)}}),a.info="Marionette.Handlebars has loaded. Don't use the exported value of the module. Its functionality is available inside the Backbone namespace."}); //# sourceMappingURL=marionette.handlebars.min.js.map