{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 8e3763ddc3eea8ac4eff","webpack:///./src/index.js","webpack:///./src/config.json","webpack:///./src/values/options.js","webpack:///./src/services/FileUploader.js","webpack:///./src/services/FileLikeObject.js","webpack:///./src/services/FileItem.js","webpack:///./src/services/FileDirective.js","webpack:///./src/services/FileSelect.js","webpack:///./src/services/Pipeline.js","webpack:///./src/services/FileDrop.js","webpack:///./src/services/FileOver.js","webpack:///./src/directives/FileSelect.js","webpack:///./src/directives/FileDrop.js","webpack:///./src/directives/FileOver.js"],"names":["angular","module","CONFIG","name","value","options","factory","serviceFileUploader","serviceFileLikeObject","serviceFileItem","serviceFileDirective","serviceFileSelect","serviceFileDrop","serviceFileOver","servicePipeline","directive","directiveFileSelect","directiveFileDrop","directiveFileOver","run","FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver","Pipeline","url","alias","headers","queue","progress","autoUpload","removeAfterUpload","method","filters","formData","queueLimit","Number","MAX_VALUE","withCredentials","disableMultipart","__identity","bind","copy","extend","forEach","isObject","isNumber","isDefined","isArray","isUndefined","element","fileUploaderOptions","$rootScope","$http","$window","$timeout","File","FormData","settings","isUploading","_nextIndex","_directives","select","drop","over","unshift","fn","_queueLimitFilter","_folderFilter","addToQueue","files","incomingQueue","isArrayLikeObject","Array","prototype","slice","call","arrayOfFilters","_getFilters","count","length","addedFileItems","next","something","shift","done","fileLikeObject","isFile","pipes","_convertFiltersToPipes","pipeline","onThrown","err","originalFilter","pipe","args","_onWhenAddingFileFailed","onSuccessful","fileItem","push","_onAfterAddingFile","exec","_onAfterAddingAll","_getTotalProgress","_render","uploadAll","removeFromQueue","index","getIndexOfItem","item","cancel","splice","_destroy","clearQueue","remove","uploadItem","transport","isHTML5","_prepareToUploading","_onBeforeUploadItem","isCancel","cancelItem","prop","abort","dummy","undefined","onNextTick","_onCancelItem","_onCompleteItem","items","getNotUploadedItems","filter","upload","cancelAll","constructor","isFileLikeObject","indexOf","isUploaded","getReadyItems","isReady","sort","item1","item2","destroy","key","object","onAfterAddingAll","fileItems","onAfterAddingFile","onWhenAddingFileFailed","onBeforeUploadItem","onProgressItem","onProgressAll","onSuccessItem","response","status","onErrorItem","onCancelItem","onCompleteItem","onTimeoutItem","onCompleteAll","notUploaded","uploaded","ratio","current","Math","round","names","match","map","isAsync","$$phase","$apply","size","type","_isSuccessCode","_transformResponse","headersGetter","_headersGetter","defaults","transformResponse","transformFn","_parseHeaders","parsed","val","i","split","line","trim","toLowerCase","parsedHeaders","_xhrTransport","xhr","_xhr","XMLHttpRequest","sendable","obj","append","_file","file","TypeError","onprogress","event","lengthComputable","loaded","total","_onProgressItem","onload","getAllResponseHeaders","gist","onerror","_onErrorItem","onabort","ontimeout","e","_onTimeoutItem","open","timeout","setRequestHeader","send","_iframeTransport","form","iframe","Date","now","input","_input","timer","isTimedOut","_form","replaceWith","element_","action","target","enctype","encoding","html","contentDocument","body","innerHTML","clearTimeout","_onSuccessItem","unbind","after","setTimeout","submit","_onBeforeUpload","_onProgress","_onSuccess","_onError","_onCancel","_onComplete","nextItem","_onTimeout","inherit","source","Object","create","super_","$inject","isElement","isString","fileOrInput","isInput","fakePathOrObject","postfix","_createFromFakePath","path","lastModifiedDate","lastIndexOf","_createFromObject","$compile","uploader","some","isSuccess","isError","_replaceNode","message","code","onBeforeUpload","onProgress","onSuccess","onError","onCancel","onComplete","onTimeout","clone","scope","css","_saveLinks","events","extendedOptions","$destroy","change","removeAttr","getOptions","getFilters","isEmptyAfterSelection","attr","onChange","$q","Error","deferred","defer","onFulfilled","onRejected","promise","then","isDone","Boolean","dragover","dragleave","onDrop","transfer","_getTransfer","_preventAndStop","_removeOverClass","onDragOver","_haveFiles","types","dropEffect","_addOverClass","onDragLeave","currentTarget","dataTransfer","originalEvent","preventDefault","stopPropagation","contains","addOverClass","removeOverClass","overClass","addClass","getOverClass","removeClass","$parse","link","attributes","$eval"],"mappings":";;;;;AAAA;AACA;AACA;AACA;A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E,QAAvB,CAAf;;AAEA,iBAAI,EAAEA,oBAAoB/P,YAAtB,CAAJ,EAAyC;AACrC,uBAAM,IAAIuL,SAAJ,CAAc,gDAAd,CAAN;AACH;;AAED,iBAAIvD,SAAS,IAAI1H,QAAJ,CAAa;AACtByP,2BAAUA,QADY;AAEtB9N,0BAASA;AAFa,cAAb,CAAb;;AAKA+F,oBAAO4L,YAAP,GAAsB;AAAA,wBAAMI,WAAWN,SAAX,IAAwB1L,OAAO0L,SAArC;AAAA,cAAtB;AACH;AAdE,MAAP;AAkBH;;AAGDnS,YAAW2N,OAAX,GAAqB,CACjB,cADiB,EAEjB,UAFiB,CAArB,C","file":"angular-file-upload.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"angular-file-upload\"] = factory();\n\telse\n\t\troot[\"angular-file-upload\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8e3763ddc3eea8ac4eff","'use strict';\r\n\r\n\r\nimport CONFIG from './config.json';\r\n\r\n\r\nimport options from './values/options'\r\n\r\n\r\nimport serviceFileUploader from './services/FileUploader';\r\nimport serviceFileLikeObject from './services/FileLikeObject';\r\nimport serviceFileItem from './services/FileItem';\r\nimport serviceFileDirective from './services/FileDirective';\r\nimport serviceFileSelect from './services/FileSelect';\r\nimport servicePipeline from './services/Pipeline';\r\nimport serviceFileDrop from './services/FileDrop';\r\nimport serviceFileOver from './services/FileOver';\r\n\r\n\r\nimport directiveFileSelect from './directives/FileSelect';\r\nimport directiveFileDrop from './directives/FileDrop';\r\nimport directiveFileOver from './directives/FileOver';\r\n\r\n\r\nangular\r\n    .module(CONFIG.name, [])\r\n    .value('fileUploaderOptions', options)\r\n    .factory('FileUploader', serviceFileUploader)\r\n    .factory('FileLikeObject', serviceFileLikeObject)\r\n    .factory('FileItem', serviceFileItem)\r\n    .factory('FileDirective', serviceFileDirective)\r\n    .factory('FileSelect', serviceFileSelect)\r\n    .factory('FileDrop', serviceFileDrop)\r\n    .factory('FileOver', serviceFileOver)\r\n    .factory('Pipeline', servicePipeline)\r\n    .directive('nvFileSelect', directiveFileSelect)\r\n    .directive('nvFileDrop', directiveFileDrop)\r\n    .directive('nvFileOver', directiveFileOver)\r\n    .run([\r\n        'FileUploader',\r\n        'FileLikeObject',\r\n        'FileItem',\r\n        'FileDirective',\r\n        'FileSelect',\r\n        'FileDrop',\r\n        'FileOver',\r\n        'Pipeline',\r\n        function(FileUploader, FileLikeObject, FileItem, FileDirective, FileSelect, FileDrop, FileOver, Pipeline) {\r\n            // only for compatibility\r\n            FileUploader.FileLikeObject = FileLikeObject;\r\n            FileUploader.FileItem = FileItem;\r\n            FileUploader.FileDirective = FileDirective;\r\n            FileUploader.FileSelect = FileSelect;\r\n            FileUploader.FileDrop = FileDrop;\r\n            FileUploader.FileOver = FileOver;\r\n            FileUploader.Pipeline = Pipeline;\r\n        }\r\n    ]);\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","module.exports = {\"name\":\"angularFileUpload\"}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config.json\n// module id = 1\n// module chunks = 0 1","'use strict';\r\n\r\n\r\nexport default {\r\n    url: '/',\r\n    alias: 'file',\r\n    headers: {},\r\n    queue: [],\r\n    progress: 0,\r\n    autoUpload: false,\r\n    removeAfterUpload: false,\r\n    method: 'POST',\r\n    filters: [],\r\n    formData: [],\r\n    queueLimit: Number.MAX_VALUE,\r\n    withCredentials: false,\r\n    disableMultipart: false\r\n};\n\n\n// WEBPACK FOOTER //\n// ./src/values/options.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n    bind,\r\n    copy,\r\n    extend,\r\n    forEach,\r\n    isObject,\r\n    isNumber,\r\n    isDefined,\r\n    isArray,\r\n    isUndefined,\r\n    element\r\n    } = angular;\r\n\r\n\r\nexport default function __identity(fileUploaderOptions, $rootScope, $http, $window, $timeout, FileLikeObject, FileItem, Pipeline) {\r\n    \r\n    \r\n    let {\r\n        File,\r\n        FormData\r\n        } = $window;\r\n    \r\n    \r\n    class FileUploader {\r\n        /**********************\r\n         * PUBLIC\r\n         **********************/\r\n        /**\r\n         * Creates an instance of FileUploader\r\n         * @param {Object} [options]\r\n         * @constructor\r\n         */\r\n        constructor(options) {\r\n            var settings = copy(fileUploaderOptions);\r\n            \r\n            extend(this, settings, options, {\r\n                isUploading: false,\r\n                _nextIndex: 0,\r\n                _directives: {select: [], drop: [], over: []}\r\n            });\r\n\r\n            // add default filters\r\n            this.filters.unshift({name: 'queueLimit', fn: this._queueLimitFilter});\r\n            this.filters.unshift({name: 'folder', fn: this._folderFilter});\r\n        }\r\n        /**\r\n         * Adds items to the queue\r\n         * @param {File|HTMLInputElement|Object|FileList|Array<Object>} files\r\n         * @param {Object} [options]\r\n         * @param {Array<Function>|String} filters\r\n         */\r\n        addToQueue(files, options, filters) {\r\n            let incomingQueue = this.isArrayLikeObject(files) ? Array.prototype.slice.call(files): [files];\r\n            var arrayOfFilters = this._getFilters(filters);\r\n            var count = this.queue.length;\r\n            var addedFileItems = [];\r\n\r\n            let next = () => {\r\n                let something = incomingQueue.shift();\r\n                \r\n                if (isUndefined(something)) {\r\n                    return done();\r\n                }\r\n                \r\n                let fileLikeObject = this.isFile(something) ? something : new FileLikeObject(something);\r\n                let pipes = this._convertFiltersToPipes(arrayOfFilters);\r\n                let pipeline = new Pipeline(pipes);\r\n                let onThrown = (err) => {\r\n                    let {originalFilter} = err.pipe;\r\n                    let [fileLikeObject, options] = err.args;\r\n                    this._onWhenAddingFileFailed(fileLikeObject, originalFilter, options);\r\n                    next();\r\n                };\r\n                let onSuccessful = (fileLikeObject, options) => {\r\n                    let fileItem = new FileItem(this, fileLikeObject, options);\r\n                    addedFileItems.push(fileItem);\r\n                    this.queue.push(fileItem);\r\n                    this._onAfterAddingFile(fileItem);\r\n                    next();\r\n                };\r\n                pipeline.onThrown = onThrown;\r\n                pipeline.onSuccessful = onSuccessful;\r\n                pipeline.exec(fileLikeObject, options);\r\n            };\r\n                \r\n            let done = () => {\r\n                if(this.queue.length !== count) {\r\n                    this._onAfterAddingAll(addedFileItems);\r\n                    this.progress = this._getTotalProgress();\r\n                }\r\n\r\n                this._render();\r\n                if (this.autoUpload) this.uploadAll();\r\n            };\r\n            \r\n            next();\r\n        }\r\n        /**\r\n         * Remove items from the queue. Remove last: index = -1\r\n         * @param {FileItem|Number} value\r\n         */\r\n        removeFromQueue(value) {\r\n            var index = this.getIndexOfItem(value);\r\n            var item = this.queue[index];\r\n            if(item.isUploading) item.cancel();\r\n            this.queue.splice(index, 1);\r\n            item._destroy();\r\n            this.progress = this._getTotalProgress();\r\n        }\r\n        /**\r\n         * Clears the queue\r\n         */\r\n        clearQueue() {\r\n            while(this.queue.length) {\r\n                this.queue[0].remove();\r\n            }\r\n            this.progress = 0;\r\n        }\r\n        /**\r\n         * Uploads a item from the queue\r\n         * @param {FileItem|Number} value\r\n         */\r\n        uploadItem(value) {\r\n            var index = this.getIndexOfItem(value);\r\n            var item = this.queue[index];\r\n            var transport = this.isHTML5 ? '_xhrTransport' : '_iframeTransport';\r\n\r\n            item._prepareToUploading();\r\n            if(this.isUploading) return;\r\n\r\n            this._onBeforeUploadItem(item);\r\n            if (item.isCancel) return;\r\n\r\n            item.isUploading = true;\r\n            this.isUploading = true;\r\n            this[transport](item);\r\n            this._render();\r\n        }\r\n        /**\r\n         * Cancels uploading of item from the queue\r\n         * @param {FileItem|Number} value\r\n         */\r\n        cancelItem(value) {\r\n            var index = this.getIndexOfItem(value);\r\n            var item = this.queue[index];\r\n            var prop = this.isHTML5 ? '_xhr' : '_form';\r\n            if (!item) return;\r\n            item.isCancel = true;\r\n            if(item.isUploading) {\r\n                // It will call this._onCancelItem() & this._onCompleteItem() asynchronously\r\n                item[prop].abort();\r\n            } else {\r\n                let dummy = [undefined, 0, {}];\r\n                let onNextTick = () => {\r\n                    this._onCancelItem(item, ...dummy);\r\n                    this._onCompleteItem(item, ...dummy);\r\n                };\r\n                $timeout(onNextTick); // Trigger callbacks asynchronously (setImmediate emulation)\r\n            }\r\n        }\r\n        /**\r\n         * Uploads all not uploaded items of queue\r\n         */\r\n        uploadAll() {\r\n            var items = this.getNotUploadedItems().filter(item => !item.isUploading);\r\n            if(!items.length) return;\r\n\r\n            forEach(items, item => item._prepareToUploading());\r\n            items[0].upload();\r\n        }\r\n        /**\r\n         * Cancels all uploads\r\n         */\r\n        cancelAll() {\r\n            var items = this.getNotUploadedItems();\r\n            forEach(items, item => item.cancel());\r\n        }\r\n        /**\r\n         * Returns \"true\" if value an instance of File\r\n         * @param {*} value\r\n         * @returns {Boolean}\r\n         * @private\r\n         */\r\n        isFile(value) {\r\n            return this.constructor.isFile(value);\r\n        }\r\n        /**\r\n         * Returns \"true\" if value an instance of FileLikeObject\r\n         * @param {*} value\r\n         * @returns {Boolean}\r\n         * @private\r\n         */\r\n        isFileLikeObject(value) {\r\n            return this.constructor.isFileLikeObject(value);\r\n        }\r\n        /**\r\n         * Returns \"true\" if value is array like object\r\n         * @param {*} value\r\n         * @returns {Boolean}\r\n         */\r\n        isArrayLikeObject(value) {\r\n            return this.constructor.isArrayLikeObject(value);\r\n        }\r\n        /**\r\n         * Returns a index of item from the queue\r\n         * @param {Item|Number} value\r\n         * @returns {Number}\r\n         */\r\n        getIndexOfItem(value) {\r\n            return isNumber(value) ? value : this.queue.indexOf(value);\r\n        }\r\n        /**\r\n         * Returns not uploaded items\r\n         * @returns {Array}\r\n         */\r\n        getNotUploadedItems() {\r\n            return this.queue.filter(item => !item.isUploaded);\r\n        }\r\n        /**\r\n         * Returns items ready for upload\r\n         * @returns {Array}\r\n         */\r\n        getReadyItems() {\r\n            return this.queue\r\n                .filter(item => (item.isReady && !item.isUploading))\r\n                .sort((item1, item2) => item1.index - item2.index);\r\n        }\r\n        /**\r\n         * Destroys instance of FileUploader\r\n         */\r\n        destroy() {\r\n            forEach(this._directives, (key) => {\r\n                forEach(this._directives[key], (object) => {\r\n                    object.destroy();\r\n                });\r\n            });\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {Array} fileItems\r\n         */\r\n        onAfterAddingAll(fileItems) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {FileItem} fileItem\r\n         */\r\n        onAfterAddingFile(fileItem) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {File|Object} item\r\n         * @param {Object} filter\r\n         * @param {Object} options\r\n         */\r\n        onWhenAddingFileFailed(item, filter, options) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {FileItem} fileItem\r\n         */\r\n        onBeforeUploadItem(fileItem) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {FileItem} fileItem\r\n         * @param {Number} progress\r\n         */\r\n        onProgressItem(fileItem, progress) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {Number} progress\r\n         */\r\n        onProgressAll(progress) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {FileItem} item\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         */\r\n        onSuccessItem(item, response, status, headers) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {FileItem} item\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         */\r\n        onErrorItem(item, response, status, headers) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {FileItem} item\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         */\r\n        onCancelItem(item, response, status, headers) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {FileItem} item\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         */\r\n        onCompleteItem(item, response, status, headers) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {FileItem} item\r\n         */\r\n        onTimeoutItem(item) {\r\n        }\r\n        /**\r\n         * Callback\r\n         */\r\n        onCompleteAll() {\r\n        }\r\n        /**********************\r\n         * PRIVATE\r\n         **********************/\r\n        /**\r\n         * Returns the total progress\r\n         * @param {Number} [value]\r\n         * @returns {Number}\r\n         * @private\r\n         */\r\n        _getTotalProgress(value) {\r\n            if(this.removeAfterUpload) return value || 0;\r\n\r\n            var notUploaded = this.getNotUploadedItems().length;\r\n            var uploaded = notUploaded ? this.queue.length - notUploaded : this.queue.length;\r\n            var ratio = 100 / this.queue.length;\r\n            var current = (value || 0) * ratio / 100;\r\n\r\n            return Math.round(uploaded * ratio + current);\r\n        }\r\n        /**\r\n         * Returns array of filters\r\n         * @param {Array<Function>|String} filters\r\n         * @returns {Array<Function>}\r\n         * @private\r\n         */\r\n        _getFilters(filters) {\r\n            if(!filters) return this.filters;\r\n            if(isArray(filters)) return filters;\r\n            var names = filters.match(/[^\\s,]+/g);\r\n            return this.filters\r\n                .filter(filter => names.indexOf(filter.name) !== -1);\r\n        }\r\n       /**\r\n       * @param {Array<Function>} filters\r\n       * @returns {Array<Function>}\r\n       * @private\r\n       */\r\n       _convertFiltersToPipes(filters) {\r\n            return filters\r\n                .map(filter => {\r\n                    let fn = bind(this, filter.fn);\r\n                    fn.isAsync = filter.fn.length === 3;\r\n                    fn.originalFilter = filter;\r\n                    return fn;\r\n                });\r\n        }\r\n        /**\r\n         * Updates html\r\n         * @private\r\n         */\r\n        _render() {\r\n            if(!$rootScope.$$phase) $rootScope.$apply();\r\n        }\r\n        /**\r\n         * Returns \"true\" if item is a file (not folder)\r\n         * @param {File|FileLikeObject} item\r\n         * @returns {Boolean}\r\n         * @private\r\n         */\r\n        _folderFilter(item) {\r\n            return !!(item.size || item.type);\r\n        }\r\n        /**\r\n         * Returns \"true\" if the limit has not been reached\r\n         * @returns {Boolean}\r\n         * @private\r\n         */\r\n        _queueLimitFilter() {\r\n            return this.queue.length < this.queueLimit;\r\n        }\r\n        /**\r\n         * Checks whether upload successful\r\n         * @param {Number} status\r\n         * @returns {Boolean}\r\n         * @private\r\n         */\r\n        _isSuccessCode(status) {\r\n            return (status >= 200 && status < 300) || status === 304;\r\n        }\r\n        /**\r\n         * Transforms the server response\r\n         * @param {*} response\r\n         * @param {Object} headers\r\n         * @returns {*}\r\n         * @private\r\n         */\r\n        _transformResponse(response, headers) {\r\n            var headersGetter = this._headersGetter(headers);\r\n            forEach($http.defaults.transformResponse, (transformFn) => {\r\n                response = transformFn(response, headersGetter);\r\n            });\r\n            return response;\r\n        }\r\n        /**\r\n         * Parsed response headers\r\n         * @param headers\r\n         * @returns {Object}\r\n         * @see https://github.com/angular/angular.js/blob/master/src/ng/http.js\r\n         * @private\r\n         */\r\n        _parseHeaders(headers) {\r\n            var parsed = {}, key, val, i;\r\n\r\n            if(!headers) return parsed;\r\n\r\n            forEach(headers.split('\\n'), (line) => {\r\n                i = line.indexOf(':');\r\n                key = line.slice(0, i).trim().toLowerCase();\r\n                val = line.slice(i + 1).trim();\r\n\r\n                if(key) {\r\n                    parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\r\n                }\r\n            });\r\n\r\n            return parsed;\r\n        }\r\n        /**\r\n         * Returns function that returns headers\r\n         * @param {Object} parsedHeaders\r\n         * @returns {Function}\r\n         * @private\r\n         */\r\n        _headersGetter(parsedHeaders) {\r\n            return (name) => {\r\n                if(name) {\r\n                    return parsedHeaders[name.toLowerCase()] || null;\r\n                }\r\n                return parsedHeaders;\r\n            };\r\n        }\r\n        /**\r\n         * The XMLHttpRequest transport\r\n         * @param {FileItem} item\r\n         * @private\r\n         */\r\n        _xhrTransport(item) {\r\n            var xhr = item._xhr = new XMLHttpRequest();\r\n            var sendable;\r\n\r\n            if (!item.disableMultipart) {\r\n                sendable = new FormData();\r\n                forEach(item.formData, (obj) => {\r\n                    forEach(obj, (value, key) => {\r\n                        sendable.append(key, value);\r\n                    });\r\n                });\r\n\r\n                sendable.append(item.alias, item._file, item.file.name);\r\n            }\r\n            else {\r\n                sendable = item._file;\r\n            }\r\n\r\n            if(typeof(item._file.size) != 'number') {\r\n                throw new TypeError('The file specified is no longer valid');\r\n            }\r\n\r\n            xhr.upload.onprogress = (event) => {\r\n                var progress = Math.round(event.lengthComputable ? event.loaded * 100 / event.total : 0);\r\n                this._onProgressItem(item, progress);\r\n            };\r\n\r\n            xhr.onload = () => {\r\n                var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n                var response = this._transformResponse(xhr.response, headers);\r\n                var gist = this._isSuccessCode(xhr.status) ? 'Success' : 'Error';\r\n                var method = '_on' + gist + 'Item';\r\n                this[method](item, response, xhr.status, headers);\r\n                this._onCompleteItem(item, response, xhr.status, headers);\r\n            };\r\n\r\n            xhr.onerror = () => {\r\n                var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n                var response = this._transformResponse(xhr.response, headers);\r\n                this._onErrorItem(item, response, xhr.status, headers);\r\n                this._onCompleteItem(item, response, xhr.status, headers);\r\n            };\r\n\r\n            xhr.onabort = () => {\r\n                var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n                var response = this._transformResponse(xhr.response, headers);\r\n                this._onCancelItem(item, response, xhr.status, headers);\r\n                this._onCompleteItem(item, response, xhr.status, headers);\r\n            };       \r\n\r\n            xhr.ontimeout = (e) => {\r\n                var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n                var response = \"Request Timeout.\";\r\n                this._onTimeoutItem(item);\r\n                this._onCompleteItem(item, response, 408, headers);\r\n            };\r\n\r\n            xhr.open(item.method, item.url, true);\r\n\r\n            xhr.timeout = item.timeout || 0;\r\n            xhr.withCredentials = item.withCredentials;\r\n\r\n            forEach(item.headers, (value, name) => {\r\n                xhr.setRequestHeader(name, value);\r\n            });\r\n\r\n            xhr.send(sendable);\r\n        }\r\n        /**\r\n         * The IFrame transport\r\n         * @param {FileItem} item\r\n         * @private\r\n         */\r\n        _iframeTransport(item) {\r\n            var form = element('<form style=\"display: none;\" />');\r\n            var iframe = element('<iframe name=\"iframeTransport' + Date.now() + '\">');\r\n            var input = item._input;\r\n\r\n            var timeout = 0;\r\n            var timer = null;\r\n            var isTimedOut = false;\r\n\r\n            if(item._form) item._form.replaceWith(input); // remove old form\r\n            item._form = form; // save link to new form\r\n\r\n            input.prop('name', item.alias);\r\n\r\n            forEach(item.formData, (obj) => {\r\n                forEach(obj, (value, key) => {\r\n                    var element_ = element('<input type=\"hidden\" name=\"' + key + '\" />');\r\n                    element_.val(value);\r\n                    form.append(element_);\r\n                });\r\n            });\r\n\r\n            form.prop({\r\n                action: item.url,\r\n                method: 'POST',\r\n                target: iframe.prop('name'),\r\n                enctype: 'multipart/form-data',\r\n                encoding: 'multipart/form-data' // old IE\r\n            });\r\n\r\n            iframe.bind('load', () => {\r\n                var html = '';\r\n                var status = 200;\r\n\r\n                try {\r\n                    // Fix for legacy IE browsers that loads internal error page\r\n                    // when failed WS response received. In consequence iframe\r\n                    // content access denied error is thrown becouse trying to\r\n                    // access cross domain page. When such thing occurs notifying\r\n                    // with empty response object. See more info at:\r\n                    // http://stackoverflow.com/questions/151362/access-is-denied-error-on-accessing-iframe-document-object\r\n                    // Note that if non standard 4xx or 5xx error code returned\r\n                    // from WS then response content can be accessed without error\r\n                    // but 'XHR' status becomes 200. In order to avoid confusion\r\n                    // returning response via same 'success' event handler.\r\n\r\n                    // fixed angular.contents() for iframes\r\n                    html = iframe[0].contentDocument.body.innerHTML;\r\n                } catch(e) {\r\n                    // in case we run into the access-is-denied error or we have another error on the server side\r\n                    // (intentional 500,40... errors), we at least say 'something went wrong' -> 500\r\n                    status = 500;\r\n                }\r\n\r\n                if (timer) {\r\n                    clearTimeout(timer);\r\n                }\r\n                timer = null;\r\n\r\n                if (isTimedOut) {\r\n                    return false; //throw 'Request Timeout'\r\n                }\r\n\r\n                var xhr = {response: html, status: status, dummy: true};\r\n                var headers = {};\r\n                var response = this._transformResponse(xhr.response, headers);\r\n\r\n                this._onSuccessItem(item, response, xhr.status, headers);\r\n                this._onCompleteItem(item, response, xhr.status, headers);\r\n            });\r\n\r\n            form.abort = () => {\r\n                var xhr = {status: 0, dummy: true};\r\n                var headers = {};\r\n                var response;\r\n\r\n                iframe.unbind('load').prop('src', 'javascript:false;');\r\n                form.replaceWith(input);\r\n\r\n                this._onCancelItem(item, response, xhr.status, headers);\r\n                this._onCompleteItem(item, response, xhr.status, headers);\r\n            };\r\n\r\n            input.after(form);\r\n            form.append(input).append(iframe);\r\n\r\n            timeout = item.timeout || 0;\r\n            timer = null;\r\n\r\n            if (timeout) {\r\n                timer = setTimeout(() => {\r\n                    isTimedOut = true;\r\n\r\n                    item.isCancel = true;\r\n                    if (item.isUploading) {\r\n                        iframe.unbind('load').prop('src', 'javascript:false;');\r\n                        form.replaceWith(input);\r\n                    }\r\n\r\n                    var headers = {};\r\n                    var response = \"Request Timeout.\";\r\n                    this._onTimeoutItem(item);\r\n                    this._onCompleteItem(item, response, 408, headers);\r\n                }, timeout);\r\n            }\r\n\r\n            form[0].submit();\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {File|Object} item\r\n         * @param {Object} filter\r\n         * @param {Object} options\r\n         * @private\r\n         */\r\n        _onWhenAddingFileFailed(item, filter, options) {\r\n            this.onWhenAddingFileFailed(item, filter, options);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {FileItem} item\r\n         */\r\n        _onAfterAddingFile(item) {\r\n            this.onAfterAddingFile(item);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {Array<FileItem>} items\r\n         */\r\n        _onAfterAddingAll(items) {\r\n            this.onAfterAddingAll(items);\r\n        }\r\n        /**\r\n         *  Inner callback\r\n         * @param {FileItem} item\r\n         * @private\r\n         */\r\n        _onBeforeUploadItem(item) {\r\n            item._onBeforeUpload();\r\n            this.onBeforeUploadItem(item);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {FileItem} item\r\n         * @param {Number} progress\r\n         * @private\r\n         */\r\n        _onProgressItem(item, progress) {\r\n            var total = this._getTotalProgress(progress);\r\n            this.progress = total;\r\n            item._onProgress(progress);\r\n            this.onProgressItem(item, progress);\r\n            this.onProgressAll(total);\r\n            this._render();\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {FileItem} item\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         * @private\r\n         */\r\n        _onSuccessItem(item, response, status, headers) {\r\n            item._onSuccess(response, status, headers);\r\n            this.onSuccessItem(item, response, status, headers);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {FileItem} item\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         * @private\r\n         */\r\n        _onErrorItem(item, response, status, headers) {\r\n            item._onError(response, status, headers);\r\n            this.onErrorItem(item, response, status, headers);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {FileItem} item\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         * @private\r\n         */\r\n        _onCancelItem(item, response, status, headers) {\r\n            item._onCancel(response, status, headers);\r\n            this.onCancelItem(item, response, status, headers);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {FileItem} item\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         * @private\r\n         */\r\n        _onCompleteItem(item, response, status, headers) {\r\n            item._onComplete(response, status, headers);\r\n            this.onCompleteItem(item, response, status, headers);\r\n\r\n            var nextItem = this.getReadyItems()[0];\r\n            this.isUploading = false;\r\n\r\n            if(isDefined(nextItem)) {\r\n                nextItem.upload();\r\n                return;\r\n            }\r\n\r\n            this.onCompleteAll();\r\n            this.progress = this._getTotalProgress();\r\n            this._render();\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {FileItem} item\r\n         * @private\r\n         */\r\n        _onTimeoutItem(item) {\r\n            item._onTimeout();\r\n            this.onTimeoutItem(item);\r\n        }\r\n        /**********************\r\n         * STATIC\r\n         **********************/\r\n        /**\r\n         * Returns \"true\" if value an instance of File\r\n         * @param {*} value\r\n         * @returns {Boolean}\r\n         * @private\r\n         */\r\n        static isFile(value) {\r\n            return (File && value instanceof File);\r\n        }\r\n        /**\r\n         * Returns \"true\" if value an instance of FileLikeObject\r\n         * @param {*} value\r\n         * @returns {Boolean}\r\n         * @private\r\n         */\r\n        static isFileLikeObject(value) {\r\n            return value instanceof FileLikeObject;\r\n        }\r\n        /**\r\n         * Returns \"true\" if value is array like object\r\n         * @param {*} value\r\n         * @returns {Boolean}\r\n         */\r\n        static isArrayLikeObject(value) {\r\n            return (isObject(value) && 'length' in value);\r\n        }\r\n        /**\r\n         * Inherits a target (Class_1) by a source (Class_2)\r\n         * @param {Function} target\r\n         * @param {Function} source\r\n         */\r\n        static inherit(target, source) {\r\n            target.prototype = Object.create(source.prototype);\r\n            target.prototype.constructor = target;\r\n            target.super_ = source;\r\n        }\r\n    }\r\n\r\n\r\n    /**********************\r\n     * PUBLIC\r\n     **********************/\r\n    /**\r\n     * Checks a support the html5 uploader\r\n     * @returns {Boolean}\r\n     * @readonly\r\n     */\r\n    FileUploader.prototype.isHTML5 = !!(File && FormData);\r\n    /**********************\r\n     * STATIC\r\n     **********************/\r\n    /**\r\n     * @borrows FileUploader.prototype.isHTML5\r\n     */\r\n    FileUploader.isHTML5 = FileUploader.prototype.isHTML5;\r\n\r\n    \r\n    return FileUploader;\r\n}\r\n\r\n\r\n__identity.$inject = [\r\n    'fileUploaderOptions', \r\n    '$rootScope', \r\n    '$http', \r\n    '$window',\r\n    '$timeout',\r\n    'FileLikeObject',\r\n    'FileItem',\r\n    'Pipeline'\r\n];\n\n\n// WEBPACK FOOTER //\n// ./src/services/FileUploader.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n    copy,\r\n    isElement,\r\n    isString\r\n    } = angular;\r\n\r\n\r\nexport default function __identity() {\r\n    \r\n    \r\n    return class FileLikeObject {\r\n        /**\r\n         * Creates an instance of FileLikeObject\r\n         * @param {File|HTMLInputElement|Object} fileOrInput\r\n         * @constructor\r\n         */\r\n        constructor(fileOrInput) {\r\n            var isInput = isElement(fileOrInput);\r\n            var fakePathOrObject = isInput ? fileOrInput.value : fileOrInput;\r\n            var postfix = isString(fakePathOrObject) ? 'FakePath' : 'Object';\r\n            var method = '_createFrom' + postfix;\r\n            this[method](fakePathOrObject, fileOrInput);\r\n        }\r\n        /**\r\n         * Creates file like object from fake path string\r\n         * @param {String} path\r\n         * @private\r\n         */\r\n        _createFromFakePath(path, input) {\r\n            this.lastModifiedDate = null;\r\n            this.size = null;\r\n            this.type = 'like/' + path.slice(path.lastIndexOf('.') + 1).toLowerCase();\r\n            this.name = path.slice(path.lastIndexOf('/') + path.lastIndexOf('\\\\') + 2);\r\n            this.input = input;\r\n        }\r\n        /**\r\n         * Creates file like object from object\r\n         * @param {File|FileLikeObject} object\r\n         * @private\r\n         */\r\n        _createFromObject(object) {\r\n            this.lastModifiedDate = copy(object.lastModifiedDate);\r\n            this.size = object.size;\r\n            this.type = object.type;\r\n            this.name = object.name;\r\n            this.input = object.input;\r\n        }\r\n    }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/FileLikeObject.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n    copy,\r\n    extend,\r\n    element,\r\n    isElement\r\n    } = angular;\r\n\r\n\r\nexport default function __identity($compile, FileLikeObject) {\r\n    \r\n    \r\n    return class FileItem {\r\n        /**\r\n         * Creates an instance of FileItem\r\n         * @param {FileUploader} uploader\r\n         * @param {File|HTMLInputElement|Object} some\r\n         * @param {Object} options\r\n         * @constructor\r\n         */\r\n        constructor(uploader, some, options) {\r\n            var isInput = !!some.input;\r\n            var input = isInput ? element(some.input) : null;\r\n            var file = !isInput ? some : null;\r\n\r\n            extend(this, {\r\n                url: uploader.url,\r\n                alias: uploader.alias,\r\n                headers: copy(uploader.headers),\r\n                formData: copy(uploader.formData),\r\n                removeAfterUpload: uploader.removeAfterUpload,\r\n                withCredentials: uploader.withCredentials,\r\n                disableMultipart: uploader.disableMultipart,\r\n                method: uploader.method,\r\n                timeout: uploader.timeout\r\n            }, options, {\r\n                uploader: uploader,\r\n                file: new FileLikeObject(some),\r\n                isReady: false,\r\n                isUploading: false,\r\n                isUploaded: false,\r\n                isSuccess: false,\r\n                isCancel: false,\r\n                isError: false,\r\n                progress: 0,\r\n                index: null,\r\n                _file: file,\r\n                _input: input\r\n            });\r\n\r\n            if (input) this._replaceNode(input);\r\n        }\r\n        /**********************\r\n         * PUBLIC\r\n         **********************/\r\n        /**\r\n         * Uploads a FileItem\r\n         */\r\n        upload() {\r\n            try {\r\n                this.uploader.uploadItem(this);\r\n            } catch(e) {\r\n                var message = e.name + ':' + e.message;\r\n                this.uploader._onCompleteItem(this, message, e.code, []);\r\n                this.uploader._onErrorItem(this, message, e.code, []);\r\n            }\r\n        }\r\n        /**\r\n         * Cancels uploading of FileItem\r\n         */\r\n        cancel() {\r\n            this.uploader.cancelItem(this);\r\n        }\r\n        /**\r\n         * Removes a FileItem\r\n         */\r\n        remove() {\r\n            this.uploader.removeFromQueue(this);\r\n        }\r\n        /**\r\n         * Callback\r\n         * @private\r\n         */\r\n        onBeforeUpload() {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {Number} progress\r\n         * @private\r\n         */\r\n        onProgress(progress) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         */\r\n        onSuccess(response, status, headers) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         */\r\n        onError(response, status, headers) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         */\r\n        onCancel(response, status, headers) {\r\n        }\r\n        /**\r\n         * Callback\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         */\r\n        onComplete(response, status, headers) {\r\n        }\r\n        /**\r\n         * Callback         \r\n         */\r\n        onTimeout() {\r\n        }\r\n        /**********************\r\n         * PRIVATE\r\n         **********************/\r\n        /**\r\n         * Inner callback\r\n         */\r\n        _onBeforeUpload() {\r\n            this.isReady = true;\r\n            this.isUploading = false;\r\n            this.isUploaded = false;\r\n            this.isSuccess = false;\r\n            this.isCancel = false;\r\n            this.isError = false;\r\n            this.progress = 0;\r\n            this.onBeforeUpload();\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {Number} progress\r\n         * @private\r\n         */\r\n        _onProgress(progress) {\r\n            this.progress = progress;\r\n            this.onProgress(progress);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         * @private\r\n         */\r\n        _onSuccess(response, status, headers) {\r\n            this.isReady = false;\r\n            this.isUploading = false;\r\n            this.isUploaded = true;\r\n            this.isSuccess = true;\r\n            this.isCancel = false;\r\n            this.isError = false;\r\n            this.progress = 100;\r\n            this.index = null;\r\n            this.onSuccess(response, status, headers);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         * @private\r\n         */\r\n        _onError(response, status, headers) {\r\n            this.isReady = false;\r\n            this.isUploading = false;\r\n            this.isUploaded = true;\r\n            this.isSuccess = false;\r\n            this.isCancel = false;\r\n            this.isError = true;\r\n            this.progress = 0;\r\n            this.index = null;\r\n            this.onError(response, status, headers);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         * @private\r\n         */\r\n        _onCancel(response, status, headers) {\r\n            this.isReady = false;\r\n            this.isUploading = false;\r\n            this.isUploaded = false;\r\n            this.isSuccess = false;\r\n            this.isCancel = true;\r\n            this.isError = false;\r\n            this.progress = 0;\r\n            this.index = null;\r\n            this.onCancel(response, status, headers);\r\n        }\r\n        /**\r\n         * Inner callback\r\n         * @param {*} response\r\n         * @param {Number} status\r\n         * @param {Object} headers\r\n         * @private\r\n         */\r\n        _onComplete(response, status, headers) {\r\n            this.onComplete(response, status, headers);\r\n            if(this.removeAfterUpload) this.remove();\r\n        }\r\n        /**\r\n         * Inner callback         \r\n         * @private\r\n         */\r\n        _onTimeout() {\r\n            this.isReady = false;\r\n            this.isUploading = false;\r\n            this.isUploaded = false;\r\n            this.isSuccess = false;\r\n            this.isCancel = false;\r\n            this.isError = true;\r\n            this.progress = 0;\r\n            this.index = null;\r\n            this.onTimeout();\r\n        }\r\n        /**\r\n         * Destroys a FileItem\r\n         */\r\n        _destroy() {\r\n            if(this._input) this._input.remove();\r\n            if(this._form) this._form.remove();\r\n            delete this._form;\r\n            delete this._input;\r\n        }\r\n        /**\r\n         * Prepares to uploading\r\n         * @private\r\n         */\r\n        _prepareToUploading() {\r\n            this.index = this.index || ++this.uploader._nextIndex;\r\n            this.isReady = true;\r\n        }\r\n        /**\r\n         * Replaces input element on his clone\r\n         * @param {JQLite|jQuery} input\r\n         * @private\r\n         */\r\n        _replaceNode(input) {\r\n            var clone = $compile(input.clone())(input.scope());\r\n            clone.prop('value', null); // FF fix\r\n            input.css('display', 'none');\r\n            input.after(clone); // remove jquery dependency\r\n        }\r\n    }\r\n}\r\n\r\n\r\n__identity.$inject = [\r\n    '$compile',\r\n    'FileLikeObject'\r\n];\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/services/FileItem.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n    extend\r\n    } = angular;\r\n\r\n\r\nexport default function __identity() {\r\n\r\n\r\n    class FileDirective {\r\n        /**\r\n         * Creates instance of {FileDirective} object\r\n         * @param {Object} options\r\n         * @param {Object} options.uploader\r\n         * @param {HTMLElement} options.element\r\n         * @param {Object} options.events\r\n         * @param {String} options.prop\r\n         * @constructor\r\n         */\r\n        constructor(options) {\r\n            extend(this, options);\r\n            this.uploader._directives[this.prop].push(this);\r\n            this._saveLinks();\r\n            this.bind();\r\n        }\r\n        /**\r\n         * Binds events handles\r\n         */\r\n        bind() {\r\n            for(var key in this.events) {\r\n                var prop = this.events[key];\r\n                this.element.bind(key, this[prop]);\r\n            }\r\n        }\r\n        /**\r\n         * Unbinds events handles\r\n         */\r\n        unbind() {\r\n            for(var key in this.events) {\r\n                this.element.unbind(key, this.events[key]);\r\n            }\r\n        }\r\n        /**\r\n         * Destroys directive\r\n         */\r\n        destroy() {\r\n            var index = this.uploader._directives[this.prop].indexOf(this);\r\n            this.uploader._directives[this.prop].splice(index, 1);\r\n            this.unbind();\r\n            // this.element = null;\r\n        }\r\n        /**\r\n         * Saves links to functions\r\n         * @private\r\n         */\r\n        _saveLinks() {\r\n            for(var key in this.events) {\r\n                var prop = this.events[key];\r\n                this[prop] = this[prop].bind(this);\r\n            }\r\n        }\r\n    }\r\n\r\n\r\n    /**\r\n     * Map of events\r\n     * @type {Object}\r\n     */\r\n    FileDirective.prototype.events = {};\r\n\r\n\r\n    return FileDirective;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/services/FileDirective.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n    extend\r\n    } = angular;\r\n\r\n\r\nexport default function __identity($compile, FileDirective) {\r\n    \r\n    \r\n    return class FileSelect extends FileDirective {\r\n        /**\r\n         * Creates instance of {FileSelect} object\r\n         * @param {Object} options\r\n         * @constructor\r\n         */\r\n        constructor(options) {\r\n            let extendedOptions = extend(options, {\r\n                // Map of events\r\n                events: {\r\n                    $destroy: 'destroy',\r\n                    change: 'onChange'\r\n                },\r\n                // Name of property inside uploader._directive object\r\n                prop: 'select'\r\n            });\r\n            \r\n            super(extendedOptions);\r\n            \r\n            if(!this.uploader.isHTML5) {\r\n                this.element.removeAttr('multiple');\r\n            }\r\n            this.element.prop('value', null); // FF fix\r\n        }\r\n        /**\r\n         * Returns options\r\n         * @return {Object|undefined}\r\n         */\r\n        getOptions() {\r\n        }\r\n        /**\r\n         * Returns filters\r\n         * @return {Array<Function>|String|undefined}\r\n         */\r\n        getFilters() {\r\n        }\r\n        /**\r\n         * If returns \"true\" then HTMLInputElement will be cleared\r\n         * @returns {Boolean}\r\n         */\r\n        isEmptyAfterSelection() {\r\n            return !!this.element.attr('multiple');\r\n        }\r\n        /**\r\n         * Event handler\r\n         */\r\n        onChange() {\r\n            var files = this.uploader.isHTML5 ? this.element[0].files : this.element[0];\r\n            var options = this.getOptions();\r\n            var filters = this.getFilters();\r\n\r\n            if(!this.uploader.isHTML5) this.destroy();\r\n            this.uploader.addToQueue(files, options, filters);\r\n            if(this.isEmptyAfterSelection()) {\r\n                this.element.prop('value', null);\r\n                this.element.replaceWith($compile(this.element.clone())(this.scope)); // IE fix\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n\r\n__identity.$inject = [\r\n    '$compile',\r\n    'FileDirective'\r\n];\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/services/FileSelect.js","'use strict';\r\n\r\n\r\nconst {\r\n  bind,\r\n  isUndefined\r\n} = angular;\r\n\r\n\r\nexport default function __identity($q) {\r\n\r\n\r\n  return class Pipeline {\r\n    /**\r\n     * @param {Array<Function>} pipes\r\n     */\r\n    constructor(pipes = []) {\r\n      this.pipes = pipes;\r\n    }\r\n    next(args) {\r\n      let pipe = this.pipes.shift();\r\n      if (isUndefined(pipe)) {\r\n        this.onSuccessful(...args);\r\n        return;\r\n      }\r\n      let err = new Error('The filter has not passed');\r\n      err.pipe = pipe;\r\n      err.args = args;\r\n      if (pipe.isAsync) {\r\n        let deferred = $q.defer();\r\n        let onFulfilled = bind(this, this.next, args);\r\n        let onRejected = bind(this, this.onThrown, err);\r\n        deferred.promise.then(onFulfilled, onRejected);\r\n        pipe(...args, deferred);\r\n      } else {\r\n        let isDone = Boolean(pipe(...args));\r\n        if (isDone) {\r\n          this.next(args);\r\n        } else {\r\n          this.onThrown(err);\r\n        }\r\n      }\r\n    }\r\n    exec(...args) {\r\n      this.next(args);\r\n    }\r\n    onThrown(err) {\r\n\r\n    }\r\n    onSuccessful(...args) {\r\n\r\n    }\r\n  }\r\n  \r\n}\r\n\r\n__identity.$inject = [\r\n  '$q'\r\n];\n\n\n// WEBPACK FOOTER //\n// ./src/services/Pipeline.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n    extend,\r\n    forEach\r\n    } = angular;\r\n\r\n\r\nexport default function __identity(FileDirective) {\r\n    \r\n    \r\n    return class FileDrop extends FileDirective {\r\n        /**\r\n         * Creates instance of {FileDrop} object\r\n         * @param {Object} options\r\n         * @constructor\r\n         */\r\n        constructor(options) {\r\n            let extendedOptions = extend(options, {\r\n                // Map of events\r\n                events: {\r\n                    $destroy: 'destroy',\r\n                    drop: 'onDrop',\r\n                    dragover: 'onDragOver',\r\n                    dragleave: 'onDragLeave'\r\n                },\r\n                // Name of property inside uploader._directive object\r\n                prop: 'drop'\r\n            });\r\n            \r\n            super(extendedOptions);\r\n        }\r\n        /**\r\n         * Returns options\r\n         * @return {Object|undefined}\r\n         */\r\n        getOptions() {\r\n        }\r\n        /**\r\n         * Returns filters\r\n         * @return {Array<Function>|String|undefined}\r\n         */\r\n        getFilters() {\r\n        }\r\n        /**\r\n         * Event handler\r\n         */\r\n        onDrop(event) {\r\n            var transfer = this._getTransfer(event);\r\n            if(!transfer) return;\r\n            var options = this.getOptions();\r\n            var filters = this.getFilters();\r\n            this._preventAndStop(event);\r\n            forEach(this.uploader._directives.over, this._removeOverClass, this);\r\n            this.uploader.addToQueue(transfer.files, options, filters);\r\n        }\r\n        /**\r\n         * Event handler\r\n         */\r\n        onDragOver(event) {\r\n            var transfer = this._getTransfer(event);\r\n            if(!this._haveFiles(transfer.types)) return;\r\n            transfer.dropEffect = 'copy';\r\n            this._preventAndStop(event);\r\n            forEach(this.uploader._directives.over, this._addOverClass, this);\r\n        }\r\n        /**\r\n         * Event handler\r\n         */\r\n        onDragLeave(event) {\r\n            if(event.currentTarget === this.element[0]) return;\r\n            this._preventAndStop(event);\r\n            forEach(this.uploader._directives.over, this._removeOverClass, this);\r\n        }\r\n        /**\r\n         * Helper\r\n         */\r\n        _getTransfer(event) {\r\n            return event.dataTransfer ? event.dataTransfer : event.originalEvent.dataTransfer; // jQuery fix;\r\n        }\r\n        /**\r\n         * Helper\r\n         */\r\n        _preventAndStop(event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n        /**\r\n         * Returns \"true\" if types contains files\r\n         * @param {Object} types\r\n         */\r\n        _haveFiles(types) {\r\n            if(!types) return false;\r\n            if(types.indexOf) {\r\n                return types.indexOf('Files') !== -1;\r\n            } else if(types.contains) {\r\n                return types.contains('Files');\r\n            } else {\r\n                return false;\r\n            }\r\n        }\r\n        /**\r\n         * Callback\r\n         */\r\n        _addOverClass(item) {\r\n            item.addOverClass();\r\n        }\r\n        /**\r\n         * Callback\r\n         */\r\n        _removeOverClass(item) {\r\n            item.removeOverClass();\r\n        }\r\n    }\r\n}\r\n\r\n\r\n__identity.$inject = [\r\n    'FileDirective'\r\n];\n\n\n// WEBPACK FOOTER //\n// ./src/services/FileDrop.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n    extend\r\n    } = angular;\r\n\r\n\r\nexport default function __identity(FileDirective) {\r\n    \r\n    \r\n    return class FileOver extends FileDirective {\r\n        /**\r\n         * Creates instance of {FileDrop} object\r\n         * @param {Object} options\r\n         * @constructor\r\n         */\r\n        constructor(options) {\r\n            let extendedOptions = extend(options, {\r\n                // Map of events\r\n                events: {\r\n                    $destroy: 'destroy'\r\n                },\r\n                // Name of property inside uploader._directive object\r\n                prop: 'over',\r\n                // Over class\r\n                overClass: 'nv-file-over'\r\n            });\r\n            \r\n            super(extendedOptions);\r\n        }\r\n        /**\r\n         * Adds over class\r\n         */\r\n        addOverClass() {\r\n            this.element.addClass(this.getOverClass());\r\n        }\r\n        /**\r\n         * Removes over class\r\n         */\r\n        removeOverClass() {\r\n            this.element.removeClass(this.getOverClass());\r\n        }\r\n        /**\r\n         * Returns over class\r\n         * @returns {String}\r\n         */\r\n        getOverClass() {\r\n            return this.overClass;\r\n        }\r\n    }\r\n}\r\n\r\n\r\n__identity.$inject = [\r\n    'FileDirective'\r\n];\n\n\n// WEBPACK FOOTER //\n// ./src/services/FileOver.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nexport default function __identity($parse, FileUploader, FileSelect) {\r\n\r\n\r\n    return {\r\n        link: (scope, element, attributes) => {\r\n            var uploader = scope.$eval(attributes.uploader);\r\n\r\n            if (!(uploader instanceof FileUploader)) {\r\n                throw new TypeError('\"Uploader\" must be an instance of FileUploader');\r\n            }\r\n\r\n            var object = new FileSelect({\r\n                uploader: uploader,\r\n                element: element,\r\n                scope: scope\r\n            });\r\n\r\n            object.getOptions = $parse(attributes.options).bind(object, scope);\r\n            object.getFilters = () => attributes.filters;\r\n        }\r\n    };\r\n\r\n\r\n}\r\n\r\n\r\n__identity.$inject = [\r\n    '$parse',\r\n    'FileUploader',\r\n    'FileSelect'\r\n];\n\n\n// WEBPACK FOOTER //\n// ./src/directives/FileSelect.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nexport default function __identity($parse, FileUploader, FileDrop) {\r\n\r\n\r\n    return {\r\n        link: (scope, element, attributes) => {\r\n            var uploader = scope.$eval(attributes.uploader);\r\n\r\n            if (!(uploader instanceof FileUploader)) {\r\n                throw new TypeError('\"Uploader\" must be an instance of FileUploader');\r\n            }\r\n\r\n            if (!uploader.isHTML5) return;\r\n\r\n            var object = new FileDrop({\r\n                uploader: uploader,\r\n                element: element\r\n            });\r\n\r\n            object.getOptions = $parse(attributes.options).bind(object, scope);\r\n            object.getFilters = () => attributes.filters;\r\n        }\r\n    };\r\n\r\n\r\n}\r\n\r\n\r\n__identity.$inject = [\r\n    '$parse',\r\n    'FileUploader',\r\n    'FileDrop'\r\n];\n\n\n// WEBPACK FOOTER //\n// ./src/directives/FileDrop.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nexport default function __identity(FileUploader, FileOver) {\r\n\r\n\r\n    return {\r\n        link: (scope, element, attributes) => {\r\n            var uploader = scope.$eval(attributes.uploader);\r\n\r\n            if (!(uploader instanceof FileUploader)) {\r\n                throw new TypeError('\"Uploader\" must be an instance of FileUploader');\r\n            }\r\n\r\n            var object = new FileOver({\r\n                uploader: uploader,\r\n                element: element\r\n            });\r\n\r\n            object.getOverClass = () => attributes.overClass || object.overClass;\r\n        }\r\n    };\r\n\r\n\r\n}\r\n\r\n\r\n__identity.$inject = [\r\n    'FileUploader',\r\n    'FileOver'\r\n];\n\n\n// WEBPACK FOOTER //\n// ./src/directives/FileOver.js"],"sourceRoot":""}