text: /*! UIkit 2.16.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
  !function(e){var t;jQuery&&UIkit&&(t=e(jQuery,UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(jQuery,UIkit)})}(function(e,t){"use strict";function n(a,r){function l(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,l=0;r=t[l];l++)o.append(n.param,r);for(var i in n.params)o.append(i,n.params[i]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!t.support.ajaxupload)return this;if(r=e.extend({},n.defaults,r),a.length){if("*.*"!==r.allow)for(var i,f=0;i=a[f];f++)if(!o(r.allow,i.name))return"string"==typeof r.notallowed?alert(r.notallowed):r.notallowed(i,r),void 0;var s=r.complete;if(r.single){var d=a.length,u=0,p=!0;r.beforeAll(a),r.complete=function(e,t){u+=1,s(e,t),r.filelimit&&u>=r.filelimit&&(p=!1),p&&d>u?l([a[u]],r):r.allcomplete(e,t)},l([a[0]],r)}else r.complete=function(e,t){s(e,t),r.allcomplete(e,t)},l(a,r)}}function o(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return t.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){n(e.element[0].files,e.options);var t=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(t),e.element=t})}}),t.component("uploadDrop",{defaults:{dragoverClass:"@-dragover"},init:function(){var e=this,t=!1;this.on("drop",function(t){t.dataTransfer&&t.dataTransfer.files&&(t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[t.dataTransfer.files]),n(t.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(n){n.stopPropagation(),n.preventDefault(),t||(e.element.addClass(e.options.dragoverClass),t=!0)}).on("dragleave",function(n){n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),t=!1})}}),t.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),t.support.ajaxupload&&e.event.props.push("dataTransfer"),n.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},t.Utils.xhrupload=n,n});