(function(e){define([],function(){return{bind_toggles:function(){this.on("show",function(){this.$el.show()}),this.on("hide",function(){this.$el.hide()})},save_fields:function(){},preview_color:function(e){var t=e.toRgb(),n="rgba("+t.r+","+t.g+","+t.b+","+e.alpha+")";n=e.get_is_theme_color()!==!1?e.theme_color:n,this.model.set_breakpoint_property("background_color",n)},update_color:function(e){this.preview_color(e),this._default_color=this.model.get_breakpoint_property_value("background_color",!0)},reset_color:function(){this.model.set_breakpoint_property("background_color",this._default_color)},upload_image:function(){var t=this;Upfront.Views.Editor.ImageSelector.open().done(function(n){var r={},i;_.each(n,function(e,t){r=e,i=t}),e("<img>").attr("src",r.full[0]).load(function(){Upfront.Views.Editor.ImageSelector.close(),t.model.set_breakpoint_property("background_image",r.full[0]),t.model.set_breakpoint_property("background_image_ratio",Math.round(r.full[2]/r.full[1]*100)/100)})})}}})})(jQuery);