/*
 * Golabi-Admin - v1.4.0
 * 2015-11-02
 * Responsive Bootstrap Template
 *
 * All right reserved. Copyright 2015 
 */
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","./jquery.fileupload-process"],a):a("object"==typeof exports?require("jquery"):window.jQuery)}(function(a){"use strict";a.blueimp.fileupload.prototype.options.processQueue.push({action:"validate",always:!0,acceptFileTypes:"@",maxFileSize:"@",minFileSize:"@",maxNumberOfFiles:"@",disabled:"@disableValidation"}),a.widget("blueimp.fileupload",a.blueimp.fileupload,{options:{getNumberOfFiles:a.noop,messages:{maxNumberOfFiles:"Maximum number of files exceeded",acceptFileTypes:"File type not allowed",maxFileSize:"File is too large",minFileSize:"File is too small"}},processActions:{validate:function(b,c){if(c.disabled)return b;var d,e=a.Deferred(),f=this.options,g=b.files[b.index];return(c.minFileSize||c.maxFileSize)&&(d=g.size),"number"===a.type(c.maxNumberOfFiles)&&(f.getNumberOfFiles()||0)+b.files.length>c.maxNumberOfFiles?g.error=f.i18n("maxNumberOfFiles"):!c.acceptFileTypes||c.acceptFileTypes.test(g.type)||c.acceptFileTypes.test(g.name)?d>c.maxFileSize?g.error=f.i18n("maxFileSize"):"number"===a.type(d)&&d<c.minFileSize?g.error=f.i18n("minFileSize"):delete g.error:g.error=f.i18n("acceptFileTypes"),g.error||b.files.error?(b.files.error=!0,e.rejectWith(this,[b])):e.resolveWith(this,[b]),e.promise()}}})});