(function(a){if(typeof define==="function"&&define.amd){define(["jquery","load-image","./jquery.fileupload-process"],a);}else{if(typeof exports==="object"){a(require("jquery"),require("blueimp-load-image/js/load-image"),require("./jquery.fileupload-process"));}else{a(window.jQuery,window.loadImage);}}}(function(a,b){a.blueimp.fileupload.prototype.options.processQueue.unshift({action:"loadAudio",prefix:true,fileTypes:"@",maxFileSize:"@",disabled:"@disableAudioPreview"},{action:"setAudio",name:"@audioPreviewName",disabled:"@disableAudioPreview"});a.widget("blueimp.fileupload",a.blueimp.fileupload,{options:{loadAudioFileTypes:/^audio\/.*$/},_audioElement:document.createElement("audio"),processActions:{loadAudio:function(g,d){if(d.disabled){return g;}var e=g.files[g.index],c,f;if(this._audioElement.canPlayType&&this._audioElement.canPlayType(e.type)&&(a.type(d.maxFileSize)!=="number"||e.size<=d.maxFileSize)&&(!d.fileTypes||d.fileTypes.test(e.type))){c=b.createObjectURL(e);if(c){f=this._audioElement.cloneNode(false);f.src=c;f.controls=true;g.audio=f;return g;}}return g;},setAudio:function(d,c){if(d.audio&&!c.disabled){d.files[d.index][c.name||"preview"]=d.audio;}return d;}}});}));