(function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},c={}.hasOwnProperty;!function(a){"function"==typeof define&&define.amd?define(["underscore","backbone","backbone.marionette","exports"],a):"object"==typeof exports?a(require("underscore"),require("backbone"),require("backbone.marionette"),exports):a(_,Backbone,Backbone.Marionette,{})}(function(c,d,e,f){return f=function(e){function f(){return this.destroy=a(this.destroy,this),f.__super__.constructor.apply(this,arguments)}return b(f,e),f.prototype.modals=[],f.prototype.zIndex=0,f.prototype.show=function(a,b){var e,f,g,h,i,j,k,l,m;if(null==b&&(b={}),this._ensureElement(b)){for(d.$("body").css({overflow:"hidden"}),this.modals.length>0&&(g=c.last(this.modals),g.modalEl.addClass(g.prefix+"-view--stacked"),null!=(m=this.modals[this.modals.length-1])&&m.modalEl.removeClass(m.prefix+"-modal--stacked-reverse")),a.render(b),a.regionEnabled=!0,this.triggerMethod("before:show",this,a,b),this.$el.append(a.el),this.currentView=a,k=this.modals,e=0,h=k.length;e