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