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gS,SA3BKD,GAyBYa,UAAI,SAAAC,GAAA,WAAAA,GAAwFd,GAhDVe,MAgD+CA,OAAa,EACnJd,EAAKe,UAjDkFD,MAAE,CAAAzS,KAiDJ0R,EAAmBiB,UAAA,0BAAAC,aAAA,SAAAC,EAAAC,GAAA,EAAAD,GAjDjBJ,MAAE,2BAiDJK,EAAAT,UAAU,EAAS,EAAAU,OAAA,CAAAvS,SAAA,YAAAwS,QAAA,CAAAnB,eAAA,oBA1B/GH,CAAmB,KAwCnBuB,EAAgB,UAAAC,EAAtB,MAAMD,GAILC,SAJKD,GACYV,UAAI,SAAAC,GAAA,WAAAA,GAAwFS,EAAgB,EACjHC,EAAKC,UAjEkFV,KAAE,CAAAzS,KAiESiT,IAClGC,EAAKE,UAlEkFX,MAAE,CAAAY,QAAA,CAkEqCC,QAHrIL,CAAgB","names":["FileLikeObject","constructor","fileOrInput","this","rawFile","fakePathOrObject","HTMLInputElement","value","_createFromFakePath","path","lastModifiedDate","size","type","slice","lastIndexOf","toLowerCase","name","_createFromObject","object","FileItem","uploader","some","options","url","headers","withCredentials","formData","isReady","isUploading","isUploaded","isSuccess","isCancel","isError","progress","file","_file","method","alias","itemAlias","upload","uploadItem","_onCompleteItem","_onErrorItem","cancel","cancelItem","remove","removeFromQueue","onBeforeUpload","onBuildForm","form","onProgress","onSuccess","response","status","onError","onCancel","onComplete","_onBeforeUpload","_onBuildForm","_onProgress","_onSuccess","index","undefined","_onError","_onCancel","_onComplete","removeAfterUpload","_prepareToUploading","_nextIndex","FileType","_FileType","getMimeClass","_file$type","_file$type2","_file$type3","mimeClass","mime_psd","indexOf","match","mime_compress","mime_doc","mime_xsl","mime_ppt","fileTypeDetection","inputFilename","types","jpg","jpeg","tif","psd","bmp","png","nef","tiff","cr2","dwg","cdr","ai","indd","pin","cdp","skp","stp","mp3","wav","wma","mod","m4a","compress","zip","rar","lz","z01","bz2","gz","pdf","xls","xlsx","ods","mp4","avi","wmv","mpg","mts","flv","vob","m4v","mpeg","m2ts","mov","doc","docx","eps","txt","odt","rtf","ppt","pptx","pps","ppsx","odp","chunks","split","length","extension","FileUploader","queue","autoUpload","isHTML5","filters","disableMultipart","formatDataFunction","item","formatDataFunctionIsAsync","setOptions","EventEmitter","_this$options$filters","_this$options$filters2","_this$options$filters3","_this$options$filters4","Object","assign","authToken","authTokenHeader","unshift","fn","_queueLimitFilter","maxFileSize","_fileSizeFilter","allowedFileType","_fileTypeFilter","allowedMimeType","_mimeTypeFilter","i","addToQueue","files","_options","list","push","arrayOfFilters","_getFilters","count","addedFileItems","map","temp","_isValidFile","fileItem","_onAfterAddingFile","_failFilterIndex","_onWhenAddingFileFailed","_onAfterAddingAll","_getTotalProgress","_render","uploadAll","getIndexOfItem","splice","clearQueue","transport","_xhr","_form","abort","items","getNotUploadedItems","filter","cancelAll","isFile","File","isFileLikeObject","getReadyItems","sort","item1","item2","onAfterAddingAll","fileItems","onBuildItemForm","onAfterAddingFile","onWhenAddingFileFailed","onBeforeUploadItem","onProgressItem","onProgressAll","onSuccessItem","onErrorItem","onCancelItem","onCompleteItem","onCompleteAll","_this$options$allowed","nextItem","_headersGetter","parsedHeaders","_xhrTransport","that","xhr","XMLHttpRequest","sendable","_onBeforeUploadItem","TypeError","FormData","_onBuildItemForm","appendFile","append","parametersBeforeFiles","additionalParameter","keys","forEach","key","_this$options$additio","_item$file","paramVal","replace","onprogress","event","Math","round","lengthComputable","loaded","total","_onProgressItem","onload","_parseHeaders","getAllResponseHeaders","_transformResponse","_isSuccessCode","onerror","onabort","_onCancelItem","open","header","setRequestHeader","onreadystatechange","readyState","DONE","emit","responseText","then","result","send","JSON","stringify","notUploaded","ratio","_this$options3","_this$options","Array","isArray","_this$options2","names","queueLimit","every","call","parsed","val","line","trim","_onSuccessItem","FileSelectDirective","_FileSelectDirective","element","onFileSelected","getOptions","_this$uploader3","getFilters","isEmptyAfterSelection","nativeElement","attributes","multiple","onChange","_this$uploader4","ɵfac","__ngFactoryType__","i0","ɵdir","selectors","hostBindings","rf","ctx","inputs","outputs","FileUploadModule","_FileUploadModule","ɵmod","ɵinj","imports","CommonModule"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./node_modules/ng2-file-upload/fesm2022/ng2-file-upload.mjs"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { EventEmitter, Directive, Input, Output, HostListener, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nclass FileLikeObject {\n constructor(fileOrInput) {\n this.rawFile = fileOrInput;\n const fakePathOrObject = fileOrInput instanceof HTMLInputElement ? fileOrInput.value : fileOrInput;\n const postfix = typeof fakePathOrObject === 'string' ? 'FakePath' : 'Object';\n const method = `_createFrom${postfix}`;\n this[method](fakePathOrObject);\n }\n _createFromFakePath(path) {\n this.lastModifiedDate = void 0;\n this.size = void 0;\n this.type = `like/${path.slice(path.lastIndexOf('.') + 1).toLowerCase()}`;\n this.name = path.slice(path.lastIndexOf('/') + path.lastIndexOf('\\\\') + 2);\n }\n _createFromObject(object) {\n this.size = object.size;\n this.type = object.type;\n this.name = object.name;\n }\n}\n\nclass FileItem {\n constructor(uploader, some, options) {\n this.url = '/';\n this.headers = [];\n this.withCredentials = true;\n this.formData = [];\n this.isReady = false;\n this.isUploading = false;\n this.isUploaded = false;\n this.isSuccess = false;\n this.isCancel = false;\n this.isError = false;\n this.progress = 0;\n this.uploader = uploader;\n this.some = some;\n this.options = options;\n this.file = new FileLikeObject(some);\n this._file = some;\n if (uploader.options) {\n this.method = uploader.options.method || 'POST';\n this.alias = uploader.options.itemAlias || 'file';\n }\n this.url = uploader.options.url;\n }\n upload() {\n try {\n this.uploader.uploadItem(this);\n }\n catch (e) {\n this.uploader._onCompleteItem(this, '', 0, {});\n this.uploader._onErrorItem(this, '', 0, {});\n }\n }\n cancel() {\n this.uploader.cancelItem(this);\n }\n remove() {\n this.uploader.removeFromQueue(this);\n }\n onBeforeUpload() {\n return void 0;\n }\n onBuildForm(form) {\n return { form };\n }\n onProgress(progress) {\n return { progress };\n }\n onSuccess(response, status, headers) {\n return { response, status, headers };\n }\n onError(response, status, headers) {\n return { response, status, headers };\n }\n onCancel(response, status, headers) {\n return { response, status, headers };\n }\n onComplete(response, status, headers) {\n return { response, status, headers };\n }\n _onBeforeUpload() {\n this.isReady = true;\n this.isUploading = true;\n this.isUploaded = false;\n this.isSuccess = false;\n this.isCancel = false;\n this.isError = false;\n this.progress = 0;\n this.onBeforeUpload();\n }\n _onBuildForm(form) {\n this.onBuildForm(form);\n }\n _onProgress(progress) {\n this.progress = progress;\n this.onProgress(progress);\n }\n _onSuccess(response, status, headers) {\n this.isReady = false;\n this.isUploading = false;\n this.isUploaded = true;\n this.isSuccess = true;\n this.isCancel = false;\n this.isError = false;\n this.progress = 100;\n this.index = undefined;\n this.onSuccess(response, status, headers);\n }\n _onError(response, status, headers) {\n this.isReady = false;\n this.isUploading = false;\n this.isUploaded = true;\n this.isSuccess = false;\n this.isCancel = false;\n this.isError = true;\n this.progress = 0;\n this.index = undefined;\n this.onError(response, status, headers);\n }\n _onCancel(response, status, headers) {\n this.isReady = false;\n this.isUploading = false;\n this.isUploaded = false;\n this.isSuccess = false;\n this.isCancel = true;\n this.isError = false;\n this.progress = 0;\n this.index = undefined;\n this.onCancel(response, status, headers);\n }\n _onComplete(response, status, headers) {\n this.onComplete(response, status, headers);\n if (this.uploader.options.removeAfterUpload) {\n this.remove();\n }\n }\n _prepareToUploading() {\n this.index = this.index || ++this.uploader._nextIndex;\n this.isReady = true;\n }\n}\n\nclass FileType {\n /* MS office */\n // tslint:disable-next-line:variable-name\n static { this.mime_doc = [\n 'application/msword',\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n 'application/vnd.ms-word.document.macroEnabled.12',\n 'application/vnd.ms-word.template.macroEnabled.12'\n ]; }\n // tslint:disable-next-line:variable-name\n static { this.mime_xsl = [\n 'application/vnd.ms-excel',\n 'application/vnd.ms-excel',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n 'application/vnd.ms-excel.sheet.macroEnabled.12',\n 'application/vnd.ms-excel.template.macroEnabled.12',\n 'application/vnd.ms-excel.addin.macroEnabled.12',\n 'application/vnd.ms-excel.sheet.binary.macroEnabled.12'\n ]; }\n // tslint:disable-next-line:variable-name\n static { this.mime_ppt = [\n 'application/vnd.ms-powerpoint',\n 'application/vnd.ms-powerpoint',\n 'application/vnd.ms-powerpoint',\n 'application/vnd.ms-powerpoint',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'application/vnd.openxmlformats-officedocument.presentationml.template',\n 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n 'application/vnd.ms-powerpoint.addin.macroEnabled.12',\n 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',\n 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',\n 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12'\n ]; }\n /* PSD */\n // tslint:disable-next-line:variable-name\n static { this.mime_psd = [\n 'image/photoshop',\n 'image/x-photoshop',\n 'image/psd',\n 'application/photoshop',\n 'application/psd',\n 'zz-application/zz-winassoc-psd'\n ]; }\n /* Compressed files */\n // tslint:disable-next-line:variable-name\n static { this.mime_compress = [\n 'application/x-gtar',\n 'application/x-gcompress',\n 'application/compress',\n 'application/x-tar',\n 'application/x-rar-compressed',\n 'application/octet-stream',\n 'application/x-zip-compressed',\n 'application/zip-compressed',\n 'application/x-7z-compressed',\n 'application/gzip',\n 'application/x-bzip2'\n ]; }\n static getMimeClass(file) {\n let mimeClass = 'application';\n if (file?.type && this.mime_psd.indexOf(file.type) !== -1) {\n mimeClass = 'image';\n }\n else if (file?.type?.match('image.*')) {\n mimeClass = 'image';\n }\n else if (file?.type?.match('video.*')) {\n mimeClass = 'video';\n }\n else if (file?.type?.match('audio.*')) {\n mimeClass = 'audio';\n }\n else if (file?.type === 'application/pdf') {\n mimeClass = 'pdf';\n }\n else if (file?.type && this.mime_compress.indexOf(file.type) !== -1) {\n mimeClass = 'compress';\n }\n else if (file?.type && this.mime_doc.indexOf(file.type) !== -1) {\n mimeClass = 'doc';\n }\n else if (file?.type && this.mime_xsl.indexOf(file.type) !== -1) {\n mimeClass = 'xls';\n }\n else if (file?.type && this.mime_ppt.indexOf(file.type) !== -1) {\n mimeClass = 'ppt';\n }\n if (mimeClass === 'application' && file?.name) {\n mimeClass = this.fileTypeDetection(file.name);\n }\n return mimeClass;\n }\n static fileTypeDetection(inputFilename) {\n const types = {\n jpg: 'image',\n jpeg: 'image',\n tif: 'image',\n psd: 'image',\n bmp: 'image',\n png: 'image',\n nef: 'image',\n tiff: 'image',\n cr2: 'image',\n dwg: 'image',\n cdr: 'image',\n ai: 'image',\n indd: 'image',\n pin: 'image',\n cdp: 'image',\n skp: 'image',\n stp: 'image',\n '3dm': 'image',\n mp3: 'audio',\n wav: 'audio',\n wma: 'audio',\n mod: 'audio',\n m4a: 'audio',\n compress: 'compress',\n zip: 'compress',\n rar: 'compress',\n '7z': 'compress',\n lz: 'compress',\n z01: 'compress',\n bz2: 'compress',\n gz: 'compress',\n pdf: 'pdf',\n xls: 'xls',\n xlsx: 'xls',\n ods: 'xls',\n mp4: 'video',\n avi: 'video',\n wmv: 'video',\n mpg: 'video',\n mts: 'video',\n flv: 'video',\n '3gp': 'video',\n vob: 'video',\n m4v: 'video',\n mpeg: 'video',\n m2ts: 'video',\n mov: 'video',\n doc: 'doc',\n docx: 'doc',\n eps: 'doc',\n txt: 'doc',\n odt: 'doc',\n rtf: 'doc',\n ppt: 'ppt',\n pptx: 'ppt',\n pps: 'ppt',\n ppsx: 'ppt',\n odp: 'ppt'\n };\n const chunks = inputFilename.split('.');\n if (chunks.length < 2) {\n return 'application';\n }\n const extension = chunks[chunks.length - 1].toLowerCase();\n if (types[extension] === undefined) {\n return 'application';\n }\n else {\n return types[extension];\n }\n }\n}\n\nfunction isFile(value) {\n return (File && value instanceof File);\n}\nclass FileUploader {\n constructor(options) {\n this.isUploading = false;\n this.queue = [];\n this.progress = 0;\n this._nextIndex = 0;\n this.options = {\n autoUpload: false,\n isHTML5: true,\n filters: [],\n removeAfterUpload: false,\n disableMultipart: false,\n formatDataFunction: (item) => item._file,\n formatDataFunctionIsAsync: false,\n url: ''\n };\n this.setOptions(options);\n this.response = new EventEmitter();\n }\n setOptions(options) {\n this.options = Object.assign(this.options, options);\n this.authToken = this.options.authToken;\n this.authTokenHeader = this.options.authTokenHeader || 'Authorization';\n this.autoUpload = this.options.autoUpload;\n this.options.filters?.unshift({ name: 'queueLimit', fn: this._queueLimitFilter });\n if (this.options.maxFileSize) {\n this.options.filters?.unshift({ name: 'fileSize', fn: this._fileSizeFilter });\n }\n if (this.options.allowedFileType) {\n this.options.filters?.unshift({ name: 'fileType', fn: this._fileTypeFilter });\n }\n if (this.options.allowedMimeType) {\n this.options.filters?.unshift({ name: 'mimeType', fn: this._mimeTypeFilter });\n }\n for (let i = 0; i < this.queue.length; i++) {\n this.queue[i].url = this.options.url;\n }\n }\n addToQueue(files, _options, filters) {\n let options = _options;\n const list = [];\n for (const file of files) {\n list.push(file);\n }\n const arrayOfFilters = this._getFilters(filters);\n const count = this.queue.length;\n const addedFileItems = [];\n list.map((some) => {\n if (!options) {\n options = this.options;\n }\n const temp = new FileLikeObject(some);\n if (this._isValidFile(temp, arrayOfFilters, options)) {\n const fileItem = new FileItem(this, some, options);\n addedFileItems.push(fileItem);\n this.queue.push(fileItem);\n this._onAfterAddingFile(fileItem);\n }\n else {\n if (typeof this._failFilterIndex === 'number' && this._failFilterIndex >= 0) {\n const filter = arrayOfFilters[this._failFilterIndex];\n this._onWhenAddingFileFailed(temp, filter, options);\n }\n }\n });\n if (this.queue.length !== count) {\n this._onAfterAddingAll(addedFileItems);\n this.progress = this._getTotalProgress();\n }\n this._render();\n if (this.options.autoUpload) {\n this.uploadAll();\n }\n }\n removeFromQueue(value) {\n const index = this.getIndexOfItem(value);\n const item = this.queue[index];\n if (item.isUploading) {\n item.cancel();\n }\n this.queue.splice(index, 1);\n this.progress = this._getTotalProgress();\n }\n clearQueue() {\n while (this.queue.length) {\n this.queue[0].remove();\n }\n this.progress = 0;\n }\n uploadItem(value) {\n const index = this.getIndexOfItem(value);\n const item = this.queue[index];\n const transport = this.options.isHTML5 ? '_xhrTransport' : '_iframeTransport';\n item._prepareToUploading();\n if (this.isUploading) {\n return;\n }\n this.isUploading = true;\n this[transport](item);\n }\n cancelItem(value) {\n const index = this.getIndexOfItem(value);\n const item = this.queue[index];\n const prop = this.options.isHTML5 ? item._xhr : item._form;\n if (item && item.isUploading) {\n prop.abort();\n }\n }\n uploadAll() {\n const items = this.getNotUploadedItems().filter((item) => !item.isUploading);\n if (!items.length) {\n return;\n }\n items.map((item) => item._prepareToUploading());\n items[0].upload();\n }\n cancelAll() {\n const items = this.getNotUploadedItems();\n items.map((item) => item.cancel());\n }\n isFile(value) {\n return isFile(value);\n }\n isFileLikeObject(value) {\n return value instanceof FileLikeObject;\n }\n getIndexOfItem(value) {\n return typeof value === 'number' ? value : this.queue.indexOf(value);\n }\n getNotUploadedItems() {\n return this.queue.filter((item) => !item.isUploaded);\n }\n getReadyItems() {\n return this.queue\n .filter((item) => (item.isReady && !item.isUploading))\n .sort((item1, item2) => item1.index - item2.index);\n }\n onAfterAddingAll(fileItems) {\n return { fileItems };\n }\n onBuildItemForm(fileItem, form) {\n return { fileItem, form };\n }\n onAfterAddingFile(fileItem) {\n return { fileItem };\n }\n onWhenAddingFileFailed(item, filter, options) {\n return { item, filter, options };\n }\n onBeforeUploadItem(fileItem) {\n return { fileItem };\n }\n onProgressItem(fileItem, progress) {\n return { fileItem, progress };\n }\n onProgressAll(progress) {\n return { progress };\n }\n onSuccessItem(item, response, status, headers) {\n return { item, response, status, headers };\n }\n onErrorItem(item, response, status, headers) {\n return { item, response, status, headers };\n }\n onCancelItem(item, response, status, headers) {\n return { item, response, status, headers };\n }\n onCompleteItem(item, response, status, headers) {\n return { item, response, status, headers };\n }\n onCompleteAll() {\n return void 0;\n }\n _mimeTypeFilter(item) {\n return !(item?.type && this.options.allowedMimeType && this.options.allowedMimeType?.indexOf(item.type) === -1);\n }\n _fileSizeFilter(item) {\n return !(this.options.maxFileSize && item.size > this.options.maxFileSize);\n }\n _fileTypeFilter(item) {\n return !(this.options.allowedFileType &&\n this.options.allowedFileType.indexOf(FileType.getMimeClass(item)) === -1);\n }\n _onErrorItem(item, response, status, headers) {\n item._onError(response, status, headers);\n this.onErrorItem(item, response, status, headers);\n }\n _onCompleteItem(item, response, status, headers) {\n item._onComplete(response, status, headers);\n this.onCompleteItem(item, response, status, headers);\n const nextItem = this.getReadyItems()[0];\n this.isUploading = false;\n if (nextItem) {\n nextItem.upload();\n return;\n }\n this.onCompleteAll();\n this.progress = this._getTotalProgress();\n this._render();\n }\n _headersGetter(parsedHeaders) {\n return (name) => {\n if (name) {\n return parsedHeaders[name.toLowerCase()] || undefined;\n }\n return parsedHeaders;\n };\n }\n _xhrTransport(item) {\n // tslint:disable-next-line:no-this-assignment\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this;\n const xhr = item._xhr = new XMLHttpRequest();\n let sendable;\n this._onBeforeUploadItem(item);\n if (typeof item._file.size !== 'number') {\n throw new TypeError('The file specified is no longer valid');\n }\n if (!this.options.disableMultipart) {\n sendable = new FormData();\n this._onBuildItemForm(item, sendable);\n const appendFile = () => sendable.append(item.alias, item._file, item.file.name);\n if (!this.options.parametersBeforeFiles) {\n appendFile();\n }\n // For AWS, Additional Parameters must come BEFORE Files\n if (this.options.additionalParameter !== undefined) {\n Object.keys(this.options.additionalParameter).forEach((key) => {\n let paramVal = this.options.additionalParameter?.[key];\n // Allow an additional parameter to include the filename\n if (typeof paramVal === 'string' && paramVal.indexOf('{{file_name}}') >= 0 && item.file?.name) {\n paramVal = paramVal.replace('{{file_name}}', item.file.name);\n }\n sendable.append(key, paramVal);\n });\n }\n if (appendFile && this.options.parametersBeforeFiles) {\n appendFile();\n }\n }\n else {\n if (this.options.formatDataFunction) {\n sendable = this.options.formatDataFunction(item);\n }\n }\n xhr.upload.onprogress = (event) => {\n const progress = Math.round(event.lengthComputable ? event.loaded * 100 / event.total : 0);\n this._onProgressItem(item, progress);\n };\n xhr.onload = () => {\n const headers = this._parseHeaders(xhr.getAllResponseHeaders());\n const response = this._transformResponse(xhr.response);\n const gist = this._isSuccessCode(xhr.status) ? 'Success' : 'Error';\n const method = `_on${gist}Item`;\n this[method](item, response, xhr.status, headers);\n this._onCompleteItem(item, response, xhr.status, headers);\n };\n xhr.onerror = () => {\n const headers = this._parseHeaders(xhr.getAllResponseHeaders());\n const response = this._transformResponse(xhr.response);\n this._onErrorItem(item, response, xhr.status, headers);\n this._onCompleteItem(item, response, xhr.status, headers);\n };\n xhr.onabort = () => {\n const headers = this._parseHeaders(xhr.getAllResponseHeaders());\n const response = this._transformResponse(xhr.response);\n this._onCancelItem(item, response, xhr.status, headers);\n this._onCompleteItem(item, response, xhr.status, headers);\n };\n if (item.method && item.url) {\n xhr.open(item.method, item.url, true);\n }\n xhr.withCredentials = item.withCredentials;\n if (this.options.headers) {\n for (const header of this.options.headers) {\n xhr.setRequestHeader(header.name, header.value);\n }\n }\n if (item.headers.length) {\n for (const header of item.headers) {\n xhr.setRequestHeader(header.name, header.value);\n }\n }\n if (this.authToken && this.authTokenHeader) {\n xhr.setRequestHeader(this.authTokenHeader, this.authToken);\n }\n xhr.onreadystatechange = function () {\n if (xhr.readyState == XMLHttpRequest.DONE) {\n that.response.emit(xhr.responseText);\n }\n };\n if (this.options.formatDataFunctionIsAsync) {\n sendable.then((result) => xhr.send(JSON.stringify(result)));\n }\n else {\n xhr.send(sendable);\n }\n this._render();\n }\n _getTotalProgress(value = 0) {\n if (this.options.removeAfterUpload) {\n return value;\n }\n const notUploaded = this.getNotUploadedItems().length;\n const uploaded = notUploaded ? this.queue.length - notUploaded : this.queue.length;\n const ratio = 100 / this.queue.length;\n const current = value * ratio / 100;\n return Math.round(uploaded * ratio + current);\n }\n _getFilters(filters) {\n if (!filters) {\n return this.options?.filters || [];\n }\n if (Array.isArray(filters)) {\n return filters;\n }\n if (typeof filters === 'string') {\n const names = filters.match(/[^\\s,]+/g);\n return this.options?.filters || []\n .filter((filter) => names?.indexOf(filter.name) !== -1);\n }\n return this.options?.filters || [];\n }\n _render() {\n return void 0;\n }\n _queueLimitFilter() {\n return this.options.queueLimit === undefined || this.queue.length < this.options.queueLimit;\n }\n _isValidFile(file, filters, options) {\n this._failFilterIndex = -1;\n return !filters.length ? true : filters.every((filter) => {\n if (typeof this._failFilterIndex === 'number') {\n this._failFilterIndex++;\n }\n return filter.fn.call(this, file, options);\n });\n }\n _isSuccessCode(status) {\n return (status >= 200 && status < 300) || status === 304;\n }\n _transformResponse(response) {\n return response;\n }\n _parseHeaders(headers) {\n const parsed = {};\n let key;\n let val;\n let i;\n if (!headers) {\n return parsed;\n }\n headers.split('\\n').map((line) => {\n i = line.indexOf(':');\n key = line.slice(0, i).trim().toLowerCase();\n val = line.slice(i + 1).trim();\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n return parsed;\n }\n _onWhenAddingFileFailed(item, filter, options) {\n this.onWhenAddingFileFailed(item, filter, options);\n }\n _onAfterAddingFile(item) {\n this.onAfterAddingFile(item);\n }\n _onAfterAddingAll(items) {\n this.onAfterAddingAll(items);\n }\n _onBeforeUploadItem(item) {\n item._onBeforeUpload();\n this.onBeforeUploadItem(item);\n }\n _onBuildItemForm(item, form) {\n item._onBuildForm(form);\n this.onBuildItemForm(item, form);\n }\n _onProgressItem(item, progress) {\n const total = this._getTotalProgress(progress);\n this.progress = total;\n item._onProgress(progress);\n this.onProgressItem(item, progress);\n this.onProgressAll(total);\n this._render();\n }\n _onSuccessItem(item, response, status, headers) {\n item._onSuccess(response, status, headers);\n this.onSuccessItem(item, response, status, headers);\n }\n _onCancelItem(item, response, status, headers) {\n item._onCancel(response, status, headers);\n this.onCancelItem(item, response, status, headers);\n }\n}\n\nclass FileDropDirective {\n constructor(element) {\n this.fileOver = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n this.onFileDrop = new EventEmitter();\n this.element = element;\n }\n getOptions() {\n return this.uploader?.options;\n }\n getFilters() {\n return '';\n }\n onDrop(event) {\n const transfer = this._getTransfer(event);\n if (!transfer) {\n return;\n }\n const options = this.getOptions();\n const filters = this.getFilters();\n this._preventAndStop(event);\n if (options) {\n this.uploader?.addToQueue(transfer.files, options, filters);\n }\n this.fileOver.emit(false);\n this.onFileDrop.emit(transfer.files);\n }\n onDragOver(event) {\n const transfer = this._getTransfer(event);\n if (!this._haveFiles(transfer.types)) {\n return;\n }\n transfer.dropEffect = 'copy';\n this._preventAndStop(event);\n this.fileOver.emit(true);\n }\n onDragLeave(event) {\n if (this.element) {\n if (event.currentTarget === this.element[0]) {\n return;\n }\n }\n this._preventAndStop(event);\n this.fileOver.emit(false);\n }\n _getTransfer(event) {\n return event.dataTransfer ? event.dataTransfer : event.originalEvent.dataTransfer; // jQuery fix;\n }\n _preventAndStop(event) {\n event.preventDefault();\n event.stopPropagation();\n }\n _haveFiles(types) {\n if (!types) {\n return false;\n }\n if (types.indexOf) {\n return types.indexOf('Files') !== -1;\n }\n else if (types.contains) {\n return types.contains('Files');\n }\n else {\n return false;\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FileDropDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"18.0.1\", type: FileDropDirective, selector: \"[ng2FileDrop]\", inputs: { uploader: \"uploader\" }, outputs: { fileOver: \"fileOver\", onFileDrop: \"onFileDrop\" }, host: { listeners: { \"drop\": \"onDrop($event)\", \"dragover\": \"onDragOver($event)\", \"dragleave\": \"onDragLeave($event)\" } }, ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FileDropDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng2FileDrop]' }]\n }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { uploader: [{\n type: Input\n }], fileOver: [{\n type: Output\n }], onFileDrop: [{\n type: Output\n }], onDrop: [{\n type: HostListener,\n args: ['drop', ['$event']]\n }], onDragOver: [{\n type: HostListener,\n args: ['dragover', ['$event']]\n }], onDragLeave: [{\n type: HostListener,\n args: ['dragleave', ['$event']]\n }] } });\n\nclass FileSelectDirective {\n constructor(element) {\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n this.onFileSelected = new EventEmitter();\n this.element = element;\n }\n getOptions() {\n return this.uploader?.options;\n }\n getFilters() {\n return '';\n }\n isEmptyAfterSelection() {\n return !!this.element.nativeElement.attributes.multiple;\n }\n onChange() {\n const files = this.element.nativeElement.files;\n const options = this.getOptions();\n const filters = this.getFilters();\n this.uploader?.addToQueue(files, options, filters);\n this.onFileSelected.emit(files);\n if (this.isEmptyAfterSelection()) {\n this.element.nativeElement.value = '';\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FileSelectDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"18.0.1\", type: FileSelectDirective, selector: \"[ng2FileSelect]\", inputs: { uploader: \"uploader\" }, outputs: { onFileSelected: \"onFileSelected\" }, host: { listeners: { \"change\": \"onChange()\" } }, ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FileSelectDirective, decorators: [{\n type: Directive,\n args: [{ selector: '[ng2FileSelect]' }]\n }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { uploader: [{\n type: Input\n }], onFileSelected: [{\n type: Output\n }], onChange: [{\n type: HostListener,\n args: ['change']\n }] } });\n\nclass FileUploadModule {\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }\n static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"18.0.1\", ngImport: i0, type: FileUploadModule, declarations: [FileDropDirective, FileSelectDirective], imports: [CommonModule], exports: [FileDropDirective, FileSelectDirective] }); }\n static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FileUploadModule, imports: [CommonModule] }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"18.0.1\", ngImport: i0, type: FileUploadModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n declarations: [FileDropDirective, FileSelectDirective],\n exports: [FileDropDirective, FileSelectDirective]\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FileDropDirective, FileItem, FileLikeObject, FileSelectDirective, FileUploadModule, FileUploader };\n"],"x_google_ignoreList":[0]}