(function(e){"use strict";if(typeof define==="function"&&define.amd){define(["jquery","./jquery.fileupload-ui.min"],e)}else{e(window.jQuery)}})(function(r){"use strict";r.widget("blueimp.fileupload",r.blueimp.fileupload,{options:{processdone:function(e,t){t.context.find(".start").button("enable")},progress:function(e,t){if(t.context){t.context.find(".progress").progressbar("option","value",parseInt(t.loaded/t.total*100,10))}},progressall:function(e,t){var n=r(this);n.find(".fileupload-progress").find(".progress").progressbar("option","value",parseInt(t.loaded/t.total*100,10)).end().find(".progress-extended").each(function(){r(this).html((n.data("blueimp-fileupload")||n.data("fileupload"))._renderExtendedProgress(t))})}},_renderUpload:function(e,t){var n=this._super(e,t),i=r(window).width()>480;n.find(".progress").empty().progressbar();n.find(".start").button({icons:{primary:"ui-icon-circle-arrow-e"},text:i});n.find(".cancel").button({icons:{primary:"ui-icon-cancel"},text:i});if(n.hasClass("fade")){n.hide()}return n},_renderDownload:function(e,t){var n=this._super(e,t),i=r(window).width()>480;n.find(".delete").button({icons:{primary:"ui-icon-trash"},text:i});if(n.hasClass("fade")){n.hide()}return n},_startHandler:function(e){r(e.currentTarget).button("disable");this._super(e)},_transition:function(e){var t=r.Deferred();if(e.hasClass("fade")){e.fadeToggle(this.options.transitionDuration,this.options.transitionEasing,function(){t.resolveWith(e)})}else{t.resolveWith(e)}return t},_create:function(){this._super();this.element.find(".fileupload-buttonbar").find(".fileinput-button").each(function(){var e=r(this).find("input:file").detach();r(this).button({icons:{primary:"ui-icon-plusthick"}}).append(e)}).end().find(".start").button({icons:{primary:"ui-icon-circle-arrow-e"}}).end().find(".cancel").button({icons:{primary:"ui-icon-cancel"}}).end().find(".delete").button({icons:{primary:"ui-icon-trash"}}).end().find(".progress").progressbar()},_destroy:function(){this.element.find(".fileupload-buttonbar").find(".fileinput-button").each(function(){var e=r(this).find("input:file").detach();r(this).button("destroy").append(e)}).end().find(".start").button("destroy").end().find(".cancel").button("destroy").end().find(".delete").button("destroy").end().find(".progress").progressbar("destroy");this._super()}})});