sogo/UI/WebServerResources/js/vendor/angular-file-upload.min.js

2 lines
23 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["angular-file-upload"]=t():e["angular-file-upload"]=t()}(this,function(){return r={},o.m=n=[function(e,t,o){"use strict";var n=y(o(1)),r=y(o(2)),i=y(o(3)),s=y(o(4)),a=y(o(5)),l=y(o(6)),u=y(o(7)),p=y(o(8)),c=y(o(9)),f=y(o(10)),d=y(o(11)),h=y(o(12)),o=y(o(13));function y(e){return e&&e.__esModule?e:{default:e}}angular.module(n.default.name,[]).value("fileUploaderOptions",r.default).factory("FileUploader",i.default).factory("FileLikeObject",s.default).factory("FileItem",a.default).factory("FileDirective",l.default).factory("FileSelect",u.default).factory("FileDrop",c.default).factory("FileOver",f.default).factory("Pipeline",p.default).directive("nvFileSelect",d.default).directive("nvFileDrop",h.default).directive("nvFileOver",o.default).run(["FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver","Pipeline",function(e,t,o,n,r,i,s,a){e.FileLikeObject=t,e.FileItem=o,e.FileDirective=n,e.FileSelect=r,e.FileDrop=i,e.FileOver=s,e.Pipeline=a}])},function(e,t){e.exports={name:"angularFileUpload"}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={url:"/",alias:"file",headers:{},queue:[],progress:0,autoUpload:!1,removeAfterUpload:!1,method:"POST",filters:[],formData:[],queueLimit:Number.MAX_VALUE,withCredentials:!1,disableMultipart:!1}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var o=[],n=!0,r=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!t||o.length!==t);n=!0);}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return o}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=i;var n,r=o(1);(n=r)&&n.__esModule;var o=angular,l=o.bind,d=o.copy,h=o.extend,y=o.forEach,m=o.isObject,v=o.isNumber,_=o.isDefined,g=o.isArray,b=o.isUndefined,F=o.element;function i(o,e,n,t,r,u,p,c){var i=t.File,s=t.FormData,t=(a.prototype.addToQueue=function(e,o,t){var r=this,i=this.isArrayLikeObject(e)?Array.prototype.slice.call(e):[e],s=this._getFilters(t),n=this.queue.length,a=[],t=function n(){var e=i.shift();if(b(e))return l();var t=r.isFile(e)?e:new u(e),e=r._convertFiltersToPipes(s),e=new c(e);e.onThrown=function(e){var t=e.pipe.originalFilter,o=f(e.args,2),e=o[0],o=o[1];r._onWhenAddingFileFailed(e,t,o),n()},e.onSuccessful=function(e,t){t=new p(r,e,t);a.push(t),r.queue.push(t),r._onAfterAddingFile(t),n()},e.exec(t,o)},l=function(){r.queue.length!==n&&(r._onAfterAddingAll(a),r.progress=r._getTotalProgress()),r._render(),r.autoUpload&&r.uploadAll()};t()},a.prototype.removeFromQueue=function(e){var t=this.getIndexOfItem(e),e=this.queue[t];e.isUploading&&e.cancel(),this.queue.splice(t,1),e._destroy(),this.progress=this._getTotalProgress()},a.prototype.clearQueue=function(){for(;this.queue.length;)this.queue[0].remove();this.progress=0},a.prototype.uploadItem=function(e){var t=this.getIndexOfItem(e),e=this.queue[t],t=this.isHTML5?"_xhrTransport":"_iframeTransport";e._prepareToUploading(),this.isUploading||(this._onBeforeUploadItem(e),e.isCancel||(e.isUploading=!0,this.isUploading=!0,this[t](e),this._render()))},a.prototype.cancelItem=function(e){var t,o=this,e=this.getIndexOfItem(e),n=this.queue[e],e=this.isHTML5?"_xhr":"_form";n&&(n.isCancel=!0,n.isUploading?n[e].abort():(t=[void 0,0,{}],r(function(){o._onCancelItem.apply(o,[n].concat(t)),o._onCompleteItem.apply(o,[n].concat(t))})))},a.prototype.uploadAll=function(){var e=this.getNotUploadedItems().filter(function(e){return!e.isUploading});e.length&&(y(e,function(e){return e._prepareToUploading()}),e[0].upload())},a.prototype.cancelAll=function(){var e=this.getNotUploadedItems();y(e,function(e){return e.cancel()})},a.prototype.isFile=function(e){return this.constructor.isFile(e)},a.prototype.isFileLikeObject=function(e){return this.constructor.isFileLikeObject(e)},a.prototype.isArrayLikeObject=function(e){return this.constructor.isArrayLikeObject(e)},a.prototype.getIndexOfItem=function(e){return v(e)?e:this.queue.indexOf(e)},a.prototype.getNotUploadedItems=function(){return this.queue.filter(function(e){return!e.isUploaded})},a.prototype.getReadyItems=function(){return this.queue.filter(function(e){return e.isReady&&!e.isUploading}).sort(function(e,t){return e.index-t.index})},a.prototype.destroy=function(){var t=this;y(this._directives,function(e){y(t._directives[e],function(e){e.destroy()})})},a.prototype.onAfterAddingAll=function(e){},a.prototype.onAfterAddingFile=function(e){},a.prototype.onWhenAddingFileFailed=function(e,t,o){},a.prototype.onBeforeUploadItem=function(e){},a.prototype.onProgressItem=function(e,t){},a.prototype.onProgressAll=function(e){},a.prototype.onSuccessItem=function(e,t,o,n){},a.prototype.onErrorItem=function(e,t,o,n){},a.prototype.onCancelItem=function(e,t,o,n){},a.prototype.onCompleteItem=function(e,t,o,n){},a.prototype.onTimeoutItem=function(e){},a.prototype.onCompleteAll=function(){},a.prototype._getTotalProgress=function(e){if(this.removeAfterUpload)return e||0;var t=this.getNotUploadedItems().length,o=t?this.queue.length-t:this.queue.length,t=100/this.queue.length;return Math.round(o*t+(e||0)*t/100)},a.prototype._getFilters=function(e){if(!e)return this.filters;if(g(e))return e;var t=e.match(/[^\s,]+/g);return this.filters.filter(function(e){return-1!==t.indexOf(e.name)})},a.prototype._convertFiltersToPipes=function(e){var o=this;return e.map(function(e){var t=l(o,e.fn);return t.isAsync=3===e.fn.length,t.originalFilter=e,t})},a.prototype._render=function(){e.$$phase||e.$apply()},a.prototype._folderFilter=function(e){return!(!e.size&&!e.type)},a.prototype._queueLimitFilter=function(){return this.queue.length<this.queueLimit},a.prototype._isSuccessCode=function(e){return 200<=e&&e<300||304===e},a.prototype._transformResponse=function(t,e){var o=this._headersGetter(e);return y(n.defaults.transformResponse,function(e){t=e(t,o)}),t},a.prototype._parseHeaders=function(e){var t,o,n={};return e&&y(e.split("\n"),function(e){o=e.indexOf(":"),t=e.slice(0,o).trim().toLowerCase(),o=e.slice(o+1).trim(),t&&(n[t]=n[t]?n[t]+", "+o:o)}),n},a.prototype._headersGetter=function(t){return function(e){return e?t[e.toLowerCase()]||null:t}},a.prototype._xhrTransport=function(n){var o,r=this,i=n._xhr=new XMLHttpRequest;if(n.disableMultipart?o=n._file:(o=new s,y(n.formData,function(e){y(e,function(e,t){o.append(t,e)})}),o.append(n.alias,n._file,n.file.name)),"number"!=typeof n._file.size)throw new TypeError("The file specified is no longer valid");i.upload.onprogress=function(e){e=Math.round(e.lengthComputable?100*e.loaded/e.total:0);r._onProgressItem(n,e)},i.onload=function(){var e=r._parseHeaders(i.getAllResponseHeaders()),t=r._transformResponse(i.response,e),o=r._isSuccessCode(i.status)?"Success":"Error";r["_on"+o+"Item"](n,t,i.status,e),r._onCompleteItem(n,t,i.status,e)},i.onerror=function(){var e=r._parseHeaders(i.getAllResponseHeaders()),t=r._transformResponse(i.response,e);r._onErrorItem(n,t,i.status,e),r._onCompleteItem(n,t,i.status,e)},i.onabort=function(){var e=r._parseHeaders(i.getAllResponseHeaders()),t=r._transformResponse(i.response,e);r._onCancelItem(n,t,i.status,e),r._onCompleteItem(n,t,i.status,e)},i.ontimeout=function(e){var t=r._parseHeaders(i.getAllResponseHeaders());r._onTimeoutItem(n),r._onCompleteItem(n,"Request Timeout.",408,t)},i.open(n.method,n.url,!0),i.timeout=n.timeout||0,i.withCredentials=n.withCredentials,y(n.headers,function(e,t){i.setRequestHeader(t,e)}),i.send(o)},a.prototype._iframeTransport=function(n){var e,r=this,o=F('<form style="display: none;" />'),i=F('<iframe name="iframeTransport'+Date.now()+'">'),s=n._input,a=null,l=!1;n._form&&n._form.replaceWith(s),n._form=o,s.prop("name",n.alias),y(n.formData,function(e){y(e,function(e,t){t=F('<input type="hidden" name="'+t+'" />');t.val(e),o.append(t)})}),o.prop({action:n.url,method:"POST",target:i.prop("name"),enctype:"multipart/form-data",encoding:"multipart/form-data"}),i.bind("load",function(){var e="",t=200;try{e=i[0].contentDocument.body.innerHTML}catch(e){t=500}if(a&&clearTimeout(a),a=null,l)return!1;var o={response:e,status:t,dummy:!0},e={},t=r._transformResponse(o.response,e);r._onSuccessItem(n,t,o.status,e),r._onCompleteItem(n,t,o.status,e)}),o.abort=function(){var e=0,t={};i.unbind("load").prop("src","javascript:false;"),o.replaceWith(s),r._onCancelItem(n,void 0,e,t),r._onCompleteItem(n,void 0,e,t)},s.after(o),o.append(s).append(i),e=n.timeout||0,a=null,e&&(a=setTimeout(function(){l=!0,n.isCancel=!0,n.isUploading&&(i.unbind("load").prop("src","javascript:false;"),o.replaceWith(s));r._onTimeoutItem(n),r._onCompleteItem(n,"Request Timeout.",408,{})},e)),o[0].submit()},a.prototype._onWhenAddingFileFailed=function(e,t,o){this.onWhenAddingFileFailed(e,t,o)},a.prototype._onAfterAddingFile=function(e){this.onAfterAddingFile(e)},a.prototype._onAfterAddingAll=function(e){this.onAfterAddingAll(e)},a.prototype._onBeforeUploadItem=function(e){e._onBeforeUpload(),this.onBeforeUploadItem(e)},a.prototype._onProgressItem=function(e,t){var o=this._getTotalProgress(t);this.progress=o,e._onProgress(t),this.onProgressItem(e,t),this.onProgressAll(o),this._render()},a.prototype._onSuccessItem=function(e,t,o,n){e._onSuccess(t,o,n),this.onSuccessItem(e,t,o,n)},a.prototype._onErrorItem=function(e,t,o,n){e._onError(t,o,n),this.onErrorItem(e,t,o,n)},a.prototype._onCancelItem=function(e,t,o,n){e._onCancel(t,o,n),this.onCancelItem(e,t,o,n)},a.prototype._onCompleteItem=function(e,t,o,n){e._onComplete(t,o,n),this.onCompleteItem(e,t,o,n);n=this.getReadyItems()[0];this.isUploading=!1,_(n)?n.upload():(this.onCompleteAll(),this.progress=this._getTotalProgress(),this._render())},a.prototype._onTimeoutItem=function(e){e._onTimeout(),this.onTimeoutItem(e)},a.isFile=function(e){return i&&e instanceof i},a.isFileLikeObject=function(e){return e instanceof u},a.isArrayLikeObject=function(e){return m(e)&&"length"in e},a.inherit=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).super_=t},a);function a(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);var t=d(o);h(this,t,e,{isUploading:!1,_nextIndex:0,_directives:{select:[],drop:[],over:[]}}),this.filters.unshift({name:"queueLimit",fn:this._queueLimitFilter}),this.filters.unshift({name:"folder",fn:this._folderFilter})}return t.prototype.isHTML5=!(!i||!s),t.isHTML5=t.prototype.isHTML5,t}i.$inject=["fileUploaderOptions","$rootScope","$http","$window","$timeout","FileLikeObject","FileItem","Pipeline"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return function(){function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var t=s(e)?e.value:e;this["_createFrom"+(a(t)?"FakePath":"Object")](t,e)}return o.prototype._createFromFakePath=function(e,t){this.lastModifiedDate=null,this.size=null,this.type="like/"+e.slice(e.lastIndexOf(".")+1).toLowerCase(),this.name=e.slice(e.lastIndexOf("/")+e.lastIndexOf("\\")+2),this.input=t},o.prototype._createFromObject=function(e){this.lastModifiedDate=i(e.lastModifiedDate),this.size=e.size,this.type=e.type,this.name=e.name,this.input=e.input},o}()};var n,r=o(1);(n=r)&&n.__esModule;var o=angular,i=o.copy,s=o.isElement,a=o.isString},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n,r=o(1);(n=r)&&n.__esModule;var o=angular,a=o.copy,l=o.extend,u=o.element;o.isElement;function i(o,i){return s.prototype.upload=function(){try{this.uploader.uploadItem(this)}catch(e){var t=e.name+":"+e.message;this.uploader._onCompleteItem(this,t,e.code,[]),this.uploader._onErrorItem(this,t,e.code,[])}},s.prototype.cancel=function(){this.uploader.cancelItem(this)},s.prototype.remove=function(){this.uploader.removeFromQueue(this)},s.prototype.onBeforeUpload=function(){},s.prototype.onProgress=function(e){},s.prototype.onSuccess=function(e,t,o){},s.prototype.onError=function(e,t,o){},s.prototype.onCancel=function(e,t,o){},s.prototype.onComplete=function(e,t,o){},s.prototype.onTimeout=function(){},s.prototype._onBeforeUpload=function(){this.isReady=!0,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!1,this.progress=0,this.onBeforeUpload()},s.prototype._onProgress=function(e){this.progress=e,this.onProgress(e)},s.prototype._onSuccess=function(e,t,o){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!0,this.isCancel=!1,this.isError=!1,this.progress=100,this.index=null,this.onSuccess(e,t,o)},s.prototype._onError=function(e,t,o){this.isReady=!1,this.isUploading=!1,this.isUploaded=!0,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=null,this.onError(e,t,o)},s.prototype._onCancel=function(e,t,o){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!0,this.isError=!1,this.progress=0,this.index=null,this.onCancel(e,t,o)},s.prototype._onComplete=function(e,t,o){this.onComplete(e,t,o),this.removeAfterUpload&&this.remove()},s.prototype._onTimeout=function(){this.isReady=!1,this.isUploading=!1,this.isUploaded=!1,this.isSuccess=!1,this.isCancel=!1,this.isError=!0,this.progress=0,this.index=null,this.onTimeout()},s.prototype._destroy=function(){this._input&&this._input.remove(),this._form&&this._form.remove(),delete this._form,delete this._input},s.prototype._prepareToUploading=function(){this.index=this.index||++this.uploader._nextIndex,this.isReady=!0},s.prototype._replaceNode=function(e){var t=o(e.clone())(e.scope());t.prop("value",null),e.css("display","none"),e.after(t)},s;function s(e,t,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var n=!!t.input,r=n?u(t.input):null,n=n?null:t;l(this,{url:e.url,alias:e.alias,headers:a(e.headers),formData:a(e.formData),removeAfterUpload:e.removeAfterUpload,withCredentials:e.withCredentials,disableMultipart:e.disableMultipart,method:e.method,timeout:e.timeout},o,{uploader:e,file:new i(t),isReady:!1,isUploading:!1,isUploaded:!1,isSuccess:!1,isCancel:!1,isError:!1,progress:0,index:null,_file:n,_input:r}),r&&this._replaceNode(r)}}i.$inject=["$compile","FileLikeObject"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,e),this.uploader._directives[this.prop].push(this),this._saveLinks(),this.bind()}return t.prototype.bind=function(){for(var e in this.events){var t=this.events[e];this.element.bind(e,this[t])}},t.prototype.unbind=function(){for(var e in this.events)this.element.unbind(e,this.events[e])},t.prototype.destroy=function(){var e=this.uploader._directives[this.prop].indexOf(this);this.uploader._directives[this.prop].splice(e,1),this.unbind()},t.prototype._saveLinks=function(){for(var e in this.events){e=this.events[e];this[e]=this[e].bind(this)}},t}();return e.prototype.events={},e};var n,r=o(1);(n=r)&&n.__esModule;var i=angular.extend},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n,r=o(1);(n=r)&&n.__esModule;var i=angular.extend;function s(n,e){return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o=e),t.prototype.getOptions=function(){},t.prototype.getFilters=function(){},t.prototype.isEmptyAfterSelection=function(){return!!this.element.attr("multiple")},t.prototype.onChange=function(){var e=this.uploader.isHTML5?this.element[0].files:this.element[0],t=this.getOptions(),o=this.getFilters();this.uploader.isHTML5||this.destroy(),this.uploader.addToQueue(e,t,o),this.isEmptyAfterSelection()&&(this.element.prop("value",null),this.element.replaceWith(n(this.element.clone())(this.scope)))},t;function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);e=i(e,{events:{$destroy:"destroy",change:"onChange"},prop:"select"}),e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this,e));return e.uploader.isHTML5||e.element.removeAttr("multiple"),e.element.prop("value",null),e}var o}s.$inject=["$compile","FileDirective"]},function(e,t){"use strict";function a(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var t=angular,l=t.bind,u=t.isUndefined;function o(s){return t.prototype.next=function(e){var t,o,n,r,i=this.pipes.shift();u(i)?this.onSuccessful.apply(this,a(e)):((t=new Error("The filter has not passed")).pipe=i,t.args=e,i.isAsync?(o=s.defer(),n=l(this,this.next,e),r=l(this,this.onThrown,t),o.promise.then(n,r),i.apply(void 0,a(e).concat([o]))):Boolean(i.apply(void 0,a(e)))?this.next(e):this.onThrown(t))},t.prototype.exec=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];this.next(t)},t.prototype.onThrown=function(e){},t.prototype.onSuccessful=function(){},t;function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.pipes=e}}o.$inject=["$q"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n,r=o(1);(n=r)&&n.__esModule;var o=angular,i=o.extend,s=o.forEach;function a(e){return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o=e),t.prototype.getOptions=function(){},t.prototype.getFilters=function(){},t.prototype.onDrop=function(e){var t,o,n=this._getTransfer(e);n&&(t=this.getOptions(),o=this.getFilters(),this._preventAndStop(e),s(this.uploader._directives.over,this._removeOverClass,this),this.uploader.addToQueue(n.files,t,o))},t.prototype.onDragOver=function(e){var t=this._getTransfer(e);this._haveFiles(t.types)&&(t.dropEffect="copy",this._preventAndStop(e),s(this.uploader._directives.over,this._addOverClass,this))},t.prototype.onDragLeave=function(e){e.currentTarget!==this.element[0]&&(this._preventAndStop(e),s(this.uploader._directives.over,this._removeOverClass,this))},t.prototype._getTransfer=function(e){return e.dataTransfer||e.originalEvent.dataTransfer},t.prototype._preventAndStop=function(e){e.preventDefault(),e.stopPropagation()},t.prototype._haveFiles=function(e){return!!e&&(e.indexOf?-1!==e.indexOf("Files"):!!e.contains&&e.contains("Files"))},t.prototype._addOverClass=function(e){e.addOverClass()},t.prototype._removeOverClass=function(e){e.removeOverClass()},t;function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);e=i(e,{events:{$destroy:"destroy",drop:"onDrop",dragover:"onDragOver",dragleave:"onDragLeave"},prop:"drop"});return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this,e))}var o}a.$inject=["FileDirective"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n,r=o(1);(n=r)&&n.__esModule;var i=angular.extend;function s(e){return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o=e),t.prototype.addOverClass=function(){this.element.addClass(this.getOverClass())},t.prototype.removeOverClass=function(){this.element.removeClass(this.getOverClass())},t.prototype.getOverClass=function(){return this.overClass},t;function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);e=i(e,{events:{$destroy:"destroy"},prop:"over",overClass:"nv-file-over"});return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,o.call(this,e))}var o}s.$inject=["FileDirective"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n,r=o(1);(n=r)&&n.__esModule;function i(r,i,s){return{link:function(e,t,o){var n=e.$eval(o.uploader);if(!(n instanceof i))throw new TypeError('"Uploader" must be an instance of FileUploader');t=new s({uploader:n,element:t,scope:e});t.getOptions=r(o.options).bind(t,e),t.getFilters=function(){return o.filters}}}}i.$inject=["$parse","FileUploader","FileSelect"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n,r=o(1);(n=r)&&n.__esModule;function i(r,i,s){return{link:function(e,t,o){var n=e.$eval(o.uploader);if(!(n instanceof i))throw new TypeError('"Uploader" must be an instance of FileUploader');n.isHTML5&&((t=new s({uploader:n,element:t})).getOptions=r(o.options).bind(t,e),t.getFilters=function(){return o.filters})}}}i.$inject=["$parse","FileUploader","FileDrop"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n,r=o(1);(n=r)&&n.__esModule;function i(r,i){return{link:function(e,t,o){e=e.$eval(o.uploader);if(!(e instanceof r))throw new TypeError('"Uploader" must be an instance of FileUploader');var n=new i({uploader:e,element:t});n.getOverClass=function(){return o.overClass||n.overClass}}}}i.$inject=["FileUploader","FileOver"]}],o.c=r,o.p="",o(0);function o(e){if(r[e])return r[e].exports;var t=r[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var n,r}),function(){"use strict";function e(e,o){return e.prototype.onBeforeUploadItem=function(e){var t=o.get("XSRF-TOKEN");t&&(e.headers={"X-XSRF-TOKEN":t})},e}function t(e,o){return e.prototype.onDragOver=function(e){var t=this._getTransfer(e);this._haveFiles(t.types)&&(t.dropEffect="copy",this._preventAndStop(e),angular.forEach(this.uploader._directives.over,this._addOverClass,this),o.cancel(this.onDragLeaveTimer))},e.prototype.onDragLeave=function(e){var t=this;o.cancel(this.onDragLeaveTimer),this.onDragLeaveTimer=o(function(){t._preventAndStop(e),angular.forEach(t.uploader._directives.over,t._removeOverClass,t)},50)},e}angular.module("angularFileUpload").decorator("FileUploader",e).decorator("FileDrop",t),e.$inject=["$delegate","$cookies"],t.$inject=["$delegate","$timeout"]}();
//# sourceMappingURL=angular-file-upload.min.js.map