(function(){var n=nspace("shadac.viz");n.AsyncBaseView=Backbone.View.extend({states:function(){return{loading:{enter:function(){$(".loading",this.$el).show()},exit:function(){$(".loading",this.$el).hide()}},loaded:{enter:function(){this.fadeContentWhenLoading?$(".async-content",this.$el).css("opacity",1):$(".async-content",this.$el).show(),this.render()},exit:function(){this.fadeContentWhenLoading?$(".async-content",this.$el).css("opacity",.3):$(".async-content",this.$el).hide()}},error:{enter:function(){$(".error",this.$el).show()},exit:function(){$(".error",this.$el).hide()}}}},setup:function(n){var t=this;return n&&(this.fadeContentWhenLoading=n.fadeContentWhenLoading),this.fadeContentWhenLoading?$(".async-content",this.$el).css("opacity",.3):$(".async-content",this.$el).hide(),_.bindAll(this,"render"),this.model.bind(this.completeEvent,function(){t.triggerState("loaded")}),this.model.bind(this.errorEvent,function(){t.triggerState("error")}),this.model.bind(this.loadingEvent,function(){t.triggerState("loading")}),Backbone.StateManager.addStateManager(this)}})})(jQuery),function(n,t){var i=nspace("shadac.viz");i.VizGraphSummaryView=Backbone.View.extend({initialize:function(n){var i=this;t.bindAll(this,"render"),this.selectorsView=n.selectorsView;this.model.on("change",function(){t.defer(function(){i.render()})})},render:function(){var n=this.selectorsView.getDistributionSummary();this.$el.html("<p>"+n+"<\/p>")}})}(jQuery,_),function(){var n=nspace("shadac.viz");n.VizRouterBase=Backbone.Router.extend({getValue:function(n){return typeof n=="undefined"||n===shadac.viz.vizUtil.nullUrlValue?undefined:n},getValueOrDefault:function(n,t){return n==null?t||shadac.viz.vizUtil.nullUrlValue:n},splitArrayValue:function(n){return typeof n=="undefined"||n===shadac.viz.vizUtil.nullUrlValue?[]:n.split(",")},getArrayValueOrDefault:function(n,t){return!n||n==null||n.length==0?t||shadac.viz.vizUtil.nullUrlValue:n.join()}})}(jQuery),function(n,t){var i=nspace("shadac.viz.vizUtil");i.nullUrlValue="a",i.initializeRadioButtons=function(i,r){var u=n("input[value="+r+"]",this.$el);u.attr("checked",!0),t.each(n("input",i),function(t){var r=n("label[for="+n(t).attr("id")+"]",i);n(t).is(":checked")?r.addClass("checked"):r.removeClass("checked checkedHover checkedFocus")})},i.checkCustomInput=function(n){i.updateCustomInput(n,!0)},i.unCheckCustomInput=function(n){i.updateCustomInput(n,!1)},i.updateCustomInput=function(n,t){n.prop("checked")!=t&&(n.prop("checked",t),n.trigger("updateState"),n.trigger("change"))},i.updateMultiselect=function(n,t){n.val(t),n.multiselect("refresh")},i.getDataSummaryOfMultiple=function(n,t){return n&&n.length!=0?n.length==1?n[0]:n.length==t?"All Selected":n.length+" Selected":"None Selected"},i.getInnerTextWithoutChildNodes=function(n){return n.clone().children().remove().end().text()},i.commaSeparateNumber=function(n){while(/(\d+)(\d{3})/.test(n.toString()))n=n.toString().replace(/(\d+)(\d{3})/,"$1,$2");return n}}(jQuery,_)