@progress/kendo-angular-upload 7.1.3 → 7.1.4-dev.202110280937
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-angular-upload.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +1 -1
- package/dist/fesm5/index.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-upload.js +1 -1
- package/package.json +6 -6
package/dist/cdn/main.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@progress/kendo-licensing"),require("@angular/common/http"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","@progress/kendo-angular-l10n","@progress/kendo-angular-common","@angular/forms","rxjs","rxjs/operators","@progress/kendo-licensing","@angular/common/http","@angular/animations","@angular/common"],t):"object"==typeof exports?exports.KendoAngularUpload=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@progress/kendo-licensing"),require("@angular/common/http"),require("@angular/animations"),require("@angular/common")):e.KendoAngularUpload=t(e.tslib,e["@angular/core"],e["@progress/kendo-angular-l10n"],e["@progress/kendo-angular-common"],e["@angular/forms"],e.rxjs,e["rxjs/operators"],e["@progress/kendo-licensing"],e["@angular/common/http"],e["@angular/animations"],e["@angular/common"])}(window,(function(e,t,i,n,o,a,s,r,l,u,d){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=43)}([function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t){e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(21),a=i(1),s=i(4),r=i(23),l=i(24),u=i(5),d=i(55),p=function(){function e(e){this.http=e,this.cancelEvent=new a.EventEmitter,this.clearEvent=new a.EventEmitter,this.completeEvent=new a.EventEmitter,this.errorEvent=new a.EventEmitter,this.pauseEvent=new a.EventEmitter,this.removeEvent=new a.EventEmitter,this.resumeEvent=new a.EventEmitter,this.selectEvent=new a.EventEmitter,this.successEvent=new a.EventEmitter,this.uploadEvent=new a.EventEmitter,this.uploadProgressEvent=new a.EventEmitter,this.changeEvent=new a.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new o.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new o.HttpHeaders,saveMethod:"POST",saveUrl:"",withCredentials:!0},this.chunk={autoRetryAfter:100,size:1048576,maxAutoRetries:1,resumable:!0},this.component="Upload",this.chunkMap=new d.ChunkMap,this.fileList=new r.FileMap}return Object.defineProperty(e.prototype,"files",{get:function(){return this.fileList},enumerable:!0,configurable:!0}),e.prototype.setChunkSettings=function(e){!1!==e&&(this.async.chunk=!0,"object"==typeof e&&(this.chunk=Object.assign({},this.chunk,e)))},e.prototype.onChange=function(){var e=this.fileList.filesFlat.filter((function(e){return e.state===s.FileState.Initial||e.state===s.FileState.Uploaded}));this.changeEvent.emit(e.length>0?e:null)},e.prototype.addFiles=function(e){var t=new l.SelectEvent(e);if(this.selectEvent.emit(t),!t.isDefaultPrevented()){for(var i=0,n=e;i<n.length;i++){var o=n[i];this.fileList.add(o)}this.async.autoUpload&&this.uploadFiles()}if("FileSelect"===this.component){var a=this.fileList.filesFlat;this.changeEvent.emit(a.length>0?a:null)}},e.prototype.addInitialFiles=function(e){var t=this;this.fileList.clear(),e.forEach((function(e){var i=u.getInitialFileInfo(e);t.fileList.add(i)}))},e.prototype.addInitialFileSelectFiles=function(e){var t=this;this.fileList.clear(),e.forEach((function(e){e instanceof File?t.fileList.add(u.convertFileToFileInfo(e)):t.fileList.add(u.getInitialFileInfo(e))}))},e.prototype.resumeFile=function(e){var t=this.fileList.get(e);this.resumeEvent.emit(new l.ResumeEvent(t[0])),this.fileList.setFilesStateByUid(e,s.FileState.Uploading),this._uploadFiles([t])},e.prototype.pauseFile=function(e){var t=this.fileList.get(e)[0];this.pauseEvent.emit(new l.PauseEvent(t)),this.fileList.setFilesStateByUid(e,s.FileState.Paused)},e.prototype.removeFiles=function(e){var t=this.fileList.get(e),i=new l.RemoveEvent(t,this.cloneRequestHeaders(this.async.removeHeaders));if(this.removeEvent.emit(i),!i.isDefaultPrevented())if("Upload"!==this.component||t[0].state!==s.FileState.Uploaded&&t[0].state!==s.FileState.Initial){if(this.fileList.remove(e),"FileSelect"===this.component){var n=this.fileList.filesFlat;this.changeEvent.emit(n.length>0?n:null)}}else this.performRemove(t,i)},e.prototype.cancelFiles=function(e){var t=this.fileList.get(e),i=new l.CancelEvent(t);this.cancelEvent.emit(i);for(var n=0,o=t;n<o.length;n++){var a=o[n];a.httpSubscription&&a.httpSubscription.unsubscribe()}this.fileList.remove(e),this.checkAllComplete()},e.prototype.clearFiles=function(){var e=new l.ClearEvent;if(this.clearEvent.emit(e),!e.isDefaultPrevented()){var t=this.fileList.hasFileWithState([s.FileState.Initial,s.FileState.Uploaded]);this.fileList.clear(),t&&this.onChange()}},e.prototype.uploadFiles=function(){var e=[];this.async.concurrent&&(e=this.fileList.filesToUpload),this.async.concurrent||this.fileList.hasFileWithState([s.FileState.Uploading])||(e=[this.fileList.firstFileToUpload]),e&&e.length>0&&this._uploadFiles(e)},e.prototype.retryFiles=function(e){var t=[this.fileList.get(e)];t&&this._uploadFiles(t)},e.prototype._uploadFiles=function(e){for(var t=function(e){if(e[0].state===s.FileState.Paused)return{value:void 0};var t=new l.UploadEvent(e,i.cloneRequestHeaders(i.async.saveHeaders));if(i.uploadEvent.emit(t),t.isDefaultPrevented())i.fileList.remove(e[0].uid);else{i.fileList.setFilesState(e,s.FileState.Uploading);var n=i.performUpload(e,t);e.forEach((function(e){e.httpSubscription=n}))}},i=this,n=0,o=e;n<o.length;n++){var a=t(o[n]);if("object"==typeof a)return a.value}},e.prototype.performRemove=function(e,t){var i=this,n=this.async,a=e.map((function(e){return e.name})),s=this.populateRemoveFormData(a,t.data),r=this.populateRequestOptions(t.headers),l=new o.HttpRequest(n.removeMethod,n.removeUrl,s,r);this.http.request(l).subscribe((function(t){i.onSuccess(t,e,"remove")}),(function(t){i.onError(t,e,"remove")}))},e.prototype.performUpload=function(e,t){var i=this,n=this.async,a=this.populateUploadFormData(e,t.data),s=this.populateRequestOptions(t.headers),r=new o.HttpRequest(n.saveMethod,n.saveUrl,a,s);return this.http.request(r).subscribe((function(t){t.type!==o.HttpEventType.UploadProgress||i.async.chunk?t instanceof o.HttpResponse&&(i.onSuccess(t,e,"upload"),i.checkAllComplete()):i.onProgress(t,e)}),(function(t){i.onError(t,e,"upload"),i.checkAllComplete()}))},e.prototype.onSuccess=function(e,t,i){if("upload"===i&&this.async.chunk){if(this.onChunkProgress(t),!this.isChunkUploadComplete(t[0].uid))return this.updateChunkInfo(t[0].uid),void this._uploadFiles([t]);this.removeChunkInfo(t[0].uid)}var n=new l.SuccessEvent(t,i,e);this.successEvent.emit(n),"upload"===i?this.fileList.setFilesState(t,n.isDefaultPrevented()?s.FileState.Failed:s.FileState.Uploaded):n.isDefaultPrevented()||this.fileList.remove(t[0].uid),n.isDefaultPrevented()||this.onChange()},e.prototype.onError=function(e,t,i){var n=this;if("upload"===i&&this.async.chunk){var o=this.chunk.maxAutoRetries,a=this.chunkMap.get(t[0].uid);if(a.retries<o)return a.retries+=1,void setTimeout((function(){n.retryFiles(t[0].uid)}),this.chunk.autoRetryAfter)}var r=new l.ErrorEvent(t,i,e);this.errorEvent.emit(r),"upload"===i&&this.fileList.setFilesState(t,s.FileState.Failed)},e.prototype.onProgress=function(e,t){var i=Math.round(100*e.loaded/e.total),n=new l.UploadProgressEvent(t,i<100?i:100);this.uploadProgressEvent.emit(n)},e.prototype.onChunkProgress=function(e){var t=this.chunkMap.get(e[0].uid),i=0;t&&(i=t.index===t.totalChunks-1?100:Math.round((t.index+1)/t.totalChunks*100));var n=new l.UploadProgressEvent(e,i<100?i:100);this.uploadProgressEvent.emit(n)},e.prototype.checkAllComplete=function(){!this.fileList.hasFileWithState([s.FileState.Uploading,s.FileState.Paused])&&this.areAllSelectedFilesHandled()?this.completeEvent.emit():this.shouldUploadNextFile()&&this.uploadFiles()},e.prototype.shouldUploadNextFile=function(){return!this.async.concurrent&&this.fileList.hasFileWithState([s.FileState.Selected])&&!this.fileList.hasFileWithState([s.FileState.Uploading])},e.prototype.areAllSelectedFilesHandled=function(){return 0===this.fileList.getFilesWithState(s.FileState.Selected).filter((function(e){return!e.validationErrors})).length},e.prototype.cloneRequestHeaders=function(e){var t={};return e&&e.keys().forEach((function(i){t[i]=e.get(i)})),new o.HttpHeaders(t)},e.prototype.populateRequestOptions=function(e){return{headers:e,reportProgress:!0,responseType:this.async.responseType,withCredentials:this.async.withCredentials}},e.prototype.populateUploadFormData=function(e,t){var i=this.async.saveField,n=new FormData;if(this.populateClientFormData(n,t),this.async.chunk)n.append(i,this.getNextChunk(e[0])),n.append("metadata",this.getChunkMetadata(e[0]));else for(var o=0,a=e;o<a.length;o++){var s=a[o];n.append(i,s.rawFile)}return n},e.prototype.populateRemoveFormData=function(e,t){var i=new FormData;this.populateClientFormData(i,t);for(var n=0,o=e;n<o.length;n++){var a=o[n];i.append(this.async.removeField,a)}return i},e.prototype.populateClientFormData=function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.append(i,t[i])},e.prototype.getNextChunk=function(e){var t=this.getChunkInfo(e),i=t.position+this.chunk.size;return e.rawFile.slice(t.position,i)},e.prototype.getChunkInfo=function(e){var t=this.chunkMap.get(e.uid);if(!t){var i=Math.ceil(e.size/this.chunk.size);t=this.chunkMap.add(e.uid,i)}return t},e.prototype.updateChunkInfo=function(e){var t=this.chunkMap.get(e);t.index<t.totalChunks-1&&(t.index+=1,t.position+=this.chunk.size,t.retries=0)},e.prototype.removeChunkInfo=function(e){this.chunkMap.remove(e)},e.prototype.getChunkMetadata=function(e){var t=this.chunkMap.get(e.uid),i={chunkIndex:t.index,contentType:e.rawFile.type,fileName:e.name,fileSize:e.size,fileUid:e.uid,totalChunks:t.totalChunks};return JSON.stringify(i)},e.prototype.isChunkUploadComplete=function(e){var t=this.chunkMap.get(e);return!!t&&t.index+1===t.totalChunks},e=n.__decorate([a.Injectable(),n.__metadata("design:paramtypes",[o.HttpClient])],e)}();t.UploadService=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(22);t.FileState=n.FileState},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),o=i(8),a=i(54);t.getTotalFilesSizeMessage=function(e){var t,i=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(i+=e[t].size);return(i/=1024)<1024?i.toFixed(2)+" KB":(i/1024).toFixed(2)+" MB"};var s=function(e){var t=e.match(/\.([^\.]+)$/);return t?t[0]:""};t.validateInitialFileInfo=function(e){return!!(e instanceof Object&&e.hasOwnProperty("name"))},t.validateInitialFileSelectFile=function(e){return!!(e instanceof File||t.validateInitialFileInfo(e))},t.getInitialFileInfo=function(e){return e.extension=e.extension||s(e.name),e.name=e.name,e.size=e.size||0,e.hasOwnProperty("state")||(e.state=n.FileState.Initial),e.hasOwnProperty("uid")||(e.uid=o.guid()),e},t.convertFileToFileInfo=function(e){var t=r(e);return t.uid=o.guid(),t.state=n.FileState.Selected,t};var r=function(e){var t=e.name,i=e.size;return{extension:s(t),name:t,rawFile:e,size:i,state:n.FileState.Selected}};t.getAllFileInfo=function(e){var t,i=new Array;for(t=0;t<e.length;t++)i.push(r(e[t]));return i},t.fileHasValidationErrors=function(e){return!!(e.validationErrors&&e.validationErrors.length>0)},t.filesHaveValidationErrors=function(e){for(var i=0,n=e;i<n.length;i++){var o=n[i];if(t.fileHasValidationErrors(o))return!0}return!1},t.inputFiles=function(e){return e.files?t.getAllFileInfo(e.files):e.value.split("|").map((function(e,t){var i,o,a=e.trim();return{extension:s(a),name:(i=a,o=i.lastIndexOf("\\"),-1!==o?i.substr(o+1):i),rawFile:null,size:1e3*(t+1),state:n.FileState.Selected}}))},t.assignGuidToFiles=function(e,t){var i=o.guid();return e.map((function(e){return e.uid=t?o.guid():i,e}))},t.supportsFormData=function(){return"undefined"!=typeof FormData},t.userAgent=function(){return navigator.userAgent};var l=/^(?:a|input|select|textarea|button|object)$/i;t.IGNORE_TARGET_CLASSES="k-icon k-select k-input k-multiselect-wrap",t.UPLOAD_CLASSES="k-upload-button k-clear-selected k-upload-selected k-upload-action";var u=function(e){return String(e).trim().split(" ")};t.hasClasses=function(e,t){var i=u(t);return Boolean(u(e.className).find((function(e){return i.indexOf(e)>=0})))},t.isFocusable=function(e,t){if(void 0===t&&(t=!0),e.tagName){var i=e.tagName.toLowerCase(),n=e.getAttribute("tabIndex"),o=null!==n&&!isNaN(n)&&n>-1;return(l.test(i)?!e.disabled:o)&&(!t||function(e){var t=e.getBoundingClientRect();return!(!t.width||!t.height)&&"hidden"!==window.getComputedStyle(e).visibility}(e))}return!1},t.getFileGroupCssClass=function(e){for(var t in a.fileGroupMap)if(a.fileGroupMap[t].indexOf(e)>=0)return"k-i-file-"+t;return"k-i-file"},t.isPresent=function(e){return null!=e}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(){function e(e){this.templateRef=e}return e=n.__decorate([o.Directive({selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}),n.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.FileInfoTemplateDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(3),s=i(8),r=function(){function e(e){this.uploadService=e,this.onActionButtonAction=new o.EventEmitter,this.onActionButtonFocus=new o.EventEmitter,this.onFileAction=new o.EventEmitter,this.onFileFocus=new o.EventEmitter,this.onTab=new o.EventEmitter,this.onWrapperFocus=new o.EventEmitter,this.onSelectButtonFocus=new o.EventEmitter,this.actionButtonsVisible=!1,this.focused=!1,this._focusedIndex=-1}return e.prototype.action=function(e){var t=e.keyCode;return this.keyBindings[t]},e.prototype.process=function(e){var t=this.action(e);t&&t(e.shiftKey)},e.prototype.computeKeys=function(e){var t,i=this;this.keyBindings=((t={})[s.Keys.Enter]=function(){return i.handleEnter()},t[s.Keys.Escape]=function(){return i.handleEscape()},t[s.Keys.Delete]=function(){return i.handleDelete()},t[s.Keys.Tab]=function(e){return i.handleTab(e)},t[s.Keys.ArrowUp]=function(){return i.handleUp()},t[s.Keys.ArrowDown]=function(){return i.handleDown()},t[this.invertKeys(e,s.Keys.ArrowLeft,s.Keys.ArrowRight)]=function(){return i.handleLeft()},t[this.invertKeys(e,s.Keys.ArrowRight,s.Keys.ArrowLeft)]=function(){return i.handleRight()},t)},e.prototype.invertKeys=function(e,t,i){return"rtl"===e?i:t},e.prototype.focusSelectButton=function(){this.focused=!0,this._focusedIndex=-1,this.onSelectButtonFocus.emit()},e.prototype.handleEnter=function(){if(this.lastIndex>=0){if(this.focusedIndex<=this.lastFileIndex)return void this.onFileAction.emit(s.Keys.Enter);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&this.onActionButtonAction.emit(this.focusedIndex<this.lastIndex?"clear":"upload")}},e.prototype.handleDelete=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Delete)},e.prototype.handleEscape=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Escape)},e.prototype.handleLeft=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex&&(this.focusedIndex-=1,this.onActionButtonFocus.emit("clear"))},e.prototype.handleRight=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex-1&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("upload"))},e.prototype.handleTab=function(e){this.focusedIndex>=0&&e?this.focusedIndex=-1:this.onTab.emit()},e.prototype.handleDown=function(){if(this.lastIndex>=0&&this.focusedIndex<this.lastIndex){if(this.focusedIndex<this.lastFileIndex)return this.focusedIndex+=1,void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex===this.lastFileIndex&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("clear"))}},e.prototype.handleUp=function(){if(this.lastIndex>=0&&this.focusedIndex>-1){if(this.focusedIndex-=1,-1===this.focusedIndex)return void this.onSelectButtonFocus.emit();if(this.focusedIndex<=this.lastFileIndex)return void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&(this.focusedIndex=this.lastFileIndex,this.onFileFocus.emit(this.focusedIndex))}},Object.defineProperty(e.prototype,"focusedIndex",{get:function(){return this._focusedIndex},set:function(e){this.focused||this.onWrapperFocus.emit(),this._focusedIndex=e,this.focused=!0,this._focusedIndex>=0&&this._focusedIndex<=this.lastFileIndex&&this.onFileFocus.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastFileIndex",{get:function(){return this.actionButtonsVisible?this.lastIndex-2:this.lastIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastIndex",{get:function(){var e=this.uploadService.files.count;return this.actionButtonsVisible?e+1:e-1},enumerable:!0,configurable:!0}),e=n.__decorate([o.Injectable(),n.__metadata("design:paramtypes",[a.UploadService])],e)}();t.NavigationService=r},function(e,t){e.exports=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(){function e(e){this.templateRef=e}return e=n.__decorate([o.Directive({selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}),n.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.FileTemplateDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a={},s=function(){function e(){}return e.prototype.addComponent=function(e,t){this.has(t)?a[t].push(e):a[t]=[e]},e.prototype.getComponents=function(e){return a[e]},e.prototype.has=function(e){return e in a},e=n.__decorate([o.Injectable()],e)}();t.DropZoneService=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INVALIDMAXFILESIZE="invalidMaxFileSize",t.INVALIDMINFILESIZE="invalidMinFileSize",t.INVALIDFILEEXTENSION="invalidFileExtension";var n=function(e,i){i.length>0&&i.indexOf(e.extension.toLowerCase())<0&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(t.INVALIDFILEEXTENSION)<0&&e.validationErrors.push(t.INVALIDFILEEXTENSION))},o=function(e,i,n){0!==i&&e.size<i&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(t.INVALIDMINFILESIZE)<0&&e.validationErrors.push(t.INVALIDMINFILESIZE)),0!==n&&e.size>n&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(t.INVALIDMAXFILESIZE)<0&&e.validationErrors.push(t.INVALIDMAXFILESIZE))};t.validateFiles=function(e,t){var i,a=t.allowedExtensions.map((function(e){return("."===e.substring(0,1)?e:"."+e).toLowerCase()})),s=t.maxFileSize,r=t.minFileSize;for(i=0;i<e.length;i++)n(e[i],a),o(e[i],r,s)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(21),a=i(1),s=i(16),r=i(8),l=i(2),u=i(17),d=i(18),p=i(19),c=i(20),f=i(4),h=i(7),m=i(10),v=i(3),g=i(5),_=i(11),y=i(6);t.UPLOAD_VALUE_ACCESSOR={multi:!0,provide:s.NG_VALUE_ACCESSOR,useExisting:a.forwardRef((function(){return b}))};var b=function(){function e(e,t,i,n,o,s,l,u){var d=this;this.uploadService=e,this.localization=t,this.navigation=i,this.dropZoneService=n,this._ngZone=o,this.renderer=s,this.cdr=l,this.chunkable=!1,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+r.guid(),this.actionsLayout="end",this.onBlur=new a.EventEmitter,this.cancel=new a.EventEmitter,this.clear=new a.EventEmitter,this.complete=new a.EventEmitter,this.error=new a.EventEmitter,this.onFocus=new a.EventEmitter,this.pause=new a.EventEmitter,this.remove=new a.EventEmitter,this.resume=new a.EventEmitter,this.select=new a.EventEmitter,this.success=new a.EventEmitter,this.upload=new a.EventEmitter,this.uploadProgress=new a.EventEmitter,this.valueChange=new a.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},p.validatePackage(c.packageMetadata),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe((function(e){var t=e.rtl;d.direction=t?"rtl":"ltr",d.navigation.computeKeys(d.direction)})),this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.wrapper=u.nativeElement,this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers()}var i;return i=e,Object.defineProperty(e.prototype,"autoUpload",{get:function(){return this.uploadService.async.autoUpload},set:function(e){this.uploadService.async.autoUpload=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batch",{get:function(){return this.uploadService.async.batch},set:function(e){this.uploadService.async.batch=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withCredentials",{get:function(){return this.uploadService.async.withCredentials},set:function(e){this.uploadService.async.withCredentials=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveField",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveHeaders",{get:function(){return this.uploadService.async.saveHeaders},set:function(e){this.uploadService.async.saveHeaders=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveMethod",{get:function(){return this.uploadService.async.saveMethod},set:function(e){this.uploadService.async.saveMethod=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveUrl",{get:function(){return this.uploadService.async.saveUrl},set:function(e){this.uploadService.async.saveUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"responseType",{get:function(){return this.uploadService.async.responseType},set:function(e){this.uploadService.async.responseType=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeField",{get:function(){return this.uploadService.async.removeField},set:function(e){this.uploadService.async.removeField=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeHeaders",{get:function(){return this.uploadService.async.removeHeaders},set:function(e){this.uploadService.async.removeHeaders=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeMethod",{get:function(){return this.uploadService.async.removeMethod},set:function(e){this.uploadService.async.removeMethod=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeUrl",{get:function(){return this.uploadService.async.removeUrl},set:function(e){this.uploadService.async.removeUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"concurrent",{get:function(){return this.uploadService.async.concurrent},set:function(e){this.uploadService.async.concurrent=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabIndex",{get:function(){return this.tabindex},set:function(e){this.tabindex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){var t=Object.assign({},this._restrictions,e);this._restrictions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.verifySettings(),this.renderer.removeAttribute(this.wrapper,"tabindex"),this.uploadService.setChunkSettings(this.chunkable),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},e.prototype.ngOnChanges=function(e){if(r.isChanged("chunkable",e)){var t=e.chunkable.currentValue;"boolean"==typeof t&&(this.uploadService.async.chunk=t),"object"==typeof t&&null!==t&&(this.uploadService.async.chunk=!0,this.uploadService.chunk=Object.assign({},this.uploadService.chunk,t))}},e.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},e.prototype.handleKeydown=function(e){if(!this.disabled)return e.keyCode!==r.Keys.Enter&&e.keyCode!==r.Keys.Space||e.target!==this.fileSelectButton.nativeElement?void((g.hasClasses(e.target,g.UPLOAD_CLASSES)||!g.isFocusable(e.target)&&!g.hasClasses(e.target,g.IGNORE_TARGET_CLASSES))&&this.navigation.process(e)):(e.preventDefault(),void this.fileSelect.nativeElement.click())},e.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach((function(e){g.validateInitialFileInfo(e)||(t=!1)})),t&&this.uploadService.addInitialFiles(e)),null===e&&this.fileList.clear(),this.cdr.markForCheck()},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e.prototype.setDisabledState=function(e){this.disabled=e},Object.defineProperty(e.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabIndex},enumerable:!0,configurable:!0}),e.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-state-focused"),this.navigation.focused||(this.navigation.focusedIndex=-1)},e.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-state-focused")},Object.defineProperty(e.prototype,"showActionButtons",{get:function(){var e=!1;if(!this.autoUpload){var t=this.fileList.filesToUpload.length>0,i=this.fileList.hasFileWithState([f.FileState.Uploading]);this.concurrent&&t&&(e=!0),this.concurrent||!t||i||(e=!0)}return this.navigation.actionButtonsVisible=e,e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showTotalStatus",{get:function(){var e=[f.FileState.Uploaded,f.FileState.Uploading,f.FileState.Failed,f.FileState.Paused];return!!this.fileList.hasFileWithState(e)},enumerable:!0,configurable:!0}),e.prototype.textFor=function(e){return this.localization.get(e)},e.prototype.focus=function(){var e=this;setTimeout((function(){e.fileSelectButton.nativeElement.focus()}))},e.prototype.focusComponent=function(){this.focus()},e.prototype.blur=function(){this.navigation.focused&&(this.navigation.focused=!1,document.activeElement.blur(),this.onBlur.emit())},e.prototype.blurComponent=function(){this.blur()},e.prototype.pauseFileByUid=function(e){this.uploadService.pauseFile(e)},e.prototype.resumeFileByUid=function(e){this.uploadService.resumeFile(e)},e.prototype.removeFilesByUid=function(e){this.uploadService.removeFiles(e)},e.prototype.retryUploadByUid=function(e){this.uploadService.retryFiles(e)},e.prototype.cancelUploadByUid=function(e){this.uploadService.cancelFiles(e)},e.prototype.uploadFiles=function(){this.fileList.filesToUpload.length&&this.uploadService.uploadFiles()},e.prototype.clearFiles=function(){this.uploadService.clearFiles()},e.prototype.addFiles=function(e){this.uploadService.addFiles(e)},e.prototype.isEmpty=function(){return!1},e.prototype.verifySettings=function(){if(a.isDevMode()&&this.batch&&!1!==this.chunkable)throw new Error("The file chunking functionality requires the batch setting to be disabled.")},e.prototype.subscribeBlur=function(){var e=this;r.isDocumentAvailable()&&this._ngZone.runOutsideAngular((function(){e.documentClick=u.fromEvent(document,"click").pipe(d.filter((function(t){return!(e.wrapper!==t.target&&e.wrapper.contains(t.target))}))),e.blurSubscription=u.merge(e.documentClick,e.navigation.onTab).subscribe((function(){e.navigation.focused&&e._ngZone.run((function(){e.navigation.focused=!1,e.onTouchedCallback(),e.onBlur.emit()}))}))}))},e.prototype.subscribeFocus=function(){var e=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){e.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){e.fileSelectButton.nativeElement.focus()}))},e.prototype.attachEventHandlers=function(){var e=this;this.subs=this.uploadService.cancelEvent.subscribe((function(t){e.cancel.emit(t)})),this.subs.add(this.uploadService.changeEvent.subscribe((function(t){e.onChangeCallback(t),e.valueChange.emit(t)}))),this.subs.add(this.uploadService.clearEvent.subscribe((function(t){e.clear.emit(t)}))),this.subs.add(this.uploadService.completeEvent.subscribe((function(){e.complete.emit()}))),this.subs.add(this.uploadService.errorEvent.subscribe((function(t){e.error.emit(t)}))),this.subs.add(this.uploadService.pauseEvent.subscribe((function(t){e.pause.emit(t)}))),this.subs.add(this.uploadService.removeEvent.subscribe((function(t){e.remove.emit(t)}))),this.subs.add(this.uploadService.resumeEvent.subscribe((function(t){e.resume.emit(t)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(t){e.select.emit(t)}))),this.subs.add(this.uploadService.successEvent.subscribe((function(t){e.success.emit(t)}))),this.subs.add(this.uploadService.uploadEvent.subscribe((function(t){e.upload.emit(t)}))),this.subs.add(this.uploadService.uploadProgressEvent.subscribe((function(t){e.uploadProgress.emit(t)})))},n.__decorate([a.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"autoUpload",null),n.__decorate([a.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"batch",null),n.__decorate([a.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"withCredentials",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"saveField",null),n.__decorate([a.Input(),n.__metadata("design:type",o.HttpHeaders),n.__metadata("design:paramtypes",[o.HttpHeaders])],e.prototype,"saveHeaders",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"saveMethod",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"saveUrl",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"responseType",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"removeField",null),n.__decorate([a.Input(),n.__metadata("design:type",o.HttpHeaders),n.__metadata("design:paramtypes",[o.HttpHeaders])],e.prototype,"removeHeaders",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"removeMethod",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"removeUrl",null),n.__decorate([a.Input(),n.__metadata("design:type",Object)],e.prototype,"chunkable",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"concurrent",null),n.__decorate([a.Input(),n.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Boolean)],e.prototype,"showFileList",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Number)],e.prototype,"tabindex",void 0),n.__decorate([a.Input(),n.__metadata("design:type",String)],e.prototype,"zoneId",void 0),n.__decorate([a.Input("tabIndex"),n.__metadata("design:type",Number),n.__metadata("design:paramtypes",[Number])],e.prototype,"tabIndex",null),n.__decorate([a.Input(),n.__metadata("design:type",String)],e.prototype,"accept",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],e.prototype,"restrictions",null),n.__decorate([a.Input(),n.__metadata("design:type",String)],e.prototype,"focusableId",void 0),n.__decorate([a.Input(),n.__metadata("design:type",String)],e.prototype,"actionsLayout",void 0),n.__decorate([a.ContentChild(m.FileTemplateDirective,{static:!1}),n.__metadata("design:type",m.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),n.__decorate([a.ContentChild(y.FileInfoTemplateDirective,{static:!1}),n.__metadata("design:type",y.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),n.__decorate([a.ViewChild("fileSelect",{static:!0}),n.__metadata("design:type",a.ElementRef)],e.prototype,"fileSelect",void 0),n.__decorate([a.ViewChild("fileSelectButton",{static:!0}),n.__metadata("design:type",a.ElementRef)],e.prototype,"fileSelectButton",void 0),n.__decorate([a.Output("blur"),n.__metadata("design:type",a.EventEmitter)],e.prototype,"onBlur",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"cancel",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"clear",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"complete",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"error",void 0),n.__decorate([a.Output("focus"),n.__metadata("design:type",a.EventEmitter)],e.prototype,"onFocus",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"pause",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"remove",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"resume",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"select",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"success",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"upload",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"uploadProgress",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"valueChange",void 0),n.__decorate([a.HostBinding("class.k-widget"),a.HostBinding("class.k-upload"),n.__metadata("design:type",Boolean)],e.prototype,"hostDefaultClasses",void 0),n.__decorate([a.HostBinding("class.k-state-disabled"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"hostDisabledClass",null),n.__decorate([a.HostBinding("attr.dir"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"dir",null),n.__decorate([a.HostListener("keydown",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),e=i=n.__decorate([a.Component({exportAs:"kendoUpload",providers:[l.LocalizationService,h.NavigationService,v.UploadService,_.DropZoneService,t.UPLOAD_VALUE_ACCESSOR,{provide:l.L10N_PREFIX,useValue:"kendo.upload"},{provide:r.KendoInput,useExisting:a.forwardRef((function(){return i}))}],selector:"kendo-upload",template:'\n <ng-container kendoUploadLocalizedMessages\n i18n-cancel="kendo.upload.cancel|The text for the Cancel button"\n cancel="Cancel"\n\n i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"\n clearSelectedFiles="Clear"\n\n i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to upload"\n\n i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"\n filesBatchStatus="files"\n\n i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"\n filesBatchStatusFailed="files failed to upload."\n\n i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"\n filesBatchStatusUploaded="files successfully uploaded."\n\n i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"\n fileStatusFailed="File failed to upload."\n\n i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"\n fileStatusUploaded="File successfully uploaded."\n\n i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"\n headerStatusPaused="Paused"\n\n i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"\n headerStatusUploaded="Done"\n\n i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"\n headerStatusUploading="Uploading..."\n\n i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-pause="kendo.upload.pause|The text for the Pause button"\n pause="Pause"\n\n i18n-remove="kendo.upload.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-resume="kendo.upload.resume|The text for the Resume button"\n resume="Resume"\n\n i18n-retry="kendo.upload.retry|The text for the Retry button"\n retry="Retry"\n\n i18n-select="kendo.upload.select|The text for the Select button"\n select="Select files..."\n\n i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"\n uploadSelectedFiles="Upload"\n >\n </ng-container>\n <div kendoUploadInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [attr.aria-hidden]="true"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <kendo-upload-status-total *ngIf="showTotalStatus"\n class="k-upload-status k-upload-status-total"\n [fileList]="fileList">\n </kendo-upload-status-total>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list *ngIf="showFileList && fileList.count > 0"\n class="k-upload-files k-reset"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n <kendo-upload-action-buttons\n *ngIf="showActionButtons"\n [disabled]="disabled"\n [actionsLayout]="actionsLayout">\n </kendo-upload-action-buttons>\n '}),n.__metadata("design:paramtypes",[v.UploadService,l.LocalizationService,h.NavigationService,_.DropZoneService,a.NgZone,a.Renderer2,a.ChangeDetectorRef,a.ElementRef])],e)}();t.UploadComponent=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(15),s=i(25),r=[a.FileSelectComponent],l=function(){function e(){}return e=n.__decorate([o.NgModule({declarations:[r],exports:[s.PUBLIC_DIRECTIVES,r],imports:[s.SharedModule]})],e)}();t.FileSelectModule=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(16),s=i(2),r=i(8),l=i(17),u=i(18),d=i(19),p=i(20),c=i(3),f=i(7),h=i(5),m=i(10),v=i(22),g=i(11),_=i(6);t.FILESELECT_VALUE_ACCESSOR={multi:!0,provide:a.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return y}))};var y=function(){function e(e,t,i,n,a,s,l,u){var c=this;this.uploadService=e,this.localization=t,this.navigation=i,this.dropZoneService=n,this.ngZone=a,this.renderer=s,this.cdr=l,this.disabled=!1,this.multiple=!0,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+r.guid(),this.onBlur=new o.EventEmitter,this.onFocus=new o.EventEmitter,this.select=new o.EventEmitter,this.remove=new o.EventEmitter,this.valueChange=new o.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},d.validatePackage(p.packageMetadata),this.wrapper=u.nativeElement,this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe((function(e){var t=e.rtl;c.direction=t?"rtl":"ltr",c.navigation.computeKeys(c.direction)})),this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers(),this.setDefaultSettings()}var i;return i=e,Object.defineProperty(e.prototype,"name",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){var t=Object.assign({},this._restrictions,e);this._restrictions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.wrapper,"tabindex"),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},e.prototype.textFor=function(e){return this.localization.get(e)},e.prototype.focus=function(){var e=this;setTimeout((function(){e.fileSelectButton.nativeElement.focus()}))},e.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},e.prototype.handleKeydown=function(e){if(!this.disabled)return e.keyCode!==r.Keys.Enter&&e.keyCode!==r.Keys.Space||e.target!==this.fileSelectButton.nativeElement?void((h.hasClasses(e.target,h.UPLOAD_CLASSES)||!h.isFocusable(e.target)&&!h.hasClasses(e.target,h.IGNORE_TARGET_CLASSES))&&this.navigation.process(e)):(e.preventDefault(),void this.fileSelect.nativeElement.click())},e.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach((function(e){h.validateInitialFileSelectFile(e)||(t=!1)})),t&&this.uploadService.addInitialFileSelectFiles(e)),null===e&&this.fileList.clear(),this.cdr.markForCheck()},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.removeFileByUid=function(e){this.uploadService.removeFiles(e)},e.prototype.clearFiles=function(){this.uploadService.clearFiles()},e.prototype.isEmpty=function(){return!1},e.prototype.addFiles=function(e){this.uploadService.addFiles(e)},Object.defineProperty(e.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabindex},enumerable:!0,configurable:!0}),e.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-state-focused"),this.navigation.focused||(this.navigation.focusedIndex=-1)},e.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-state-focused")},e.prototype.subscribeBlur=function(){var e=this;r.isDocumentAvailable()&&this.ngZone.runOutsideAngular((function(){e.documentClick=l.fromEvent(document,"click").pipe(u.filter((function(t){return!(e.wrapper!==t.target&&e.wrapper.contains(t.target))}))),e.blurSubscription=l.merge(e.documentClick,e.navigation.onTab).subscribe((function(){e.navigation.focused&&e.ngZone.run((function(){e.navigation.focused=!1,e.onTouchedCallback(),e.onBlur.emit()}))}))}))},e.prototype.subscribeFocus=function(){var e=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){e.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){e.fileSelectButton.nativeElement.focus()}))},e.prototype.attachEventHandlers=function(){var e=this;this.subs=this.uploadService.changeEvent.subscribe((function(t){var i=[];null!==t&&t.forEach((function(e){e.state===v.FileState.Initial&&i.push(e),e.state===v.FileState.Selected&&e.rawFile&&!e.validationErrors&&i.push(e.rawFile)})),0===i.length&&(i=null),e.onChangeCallback(i),e.valueChange.emit(i)})),this.subs.add(this.uploadService.removeEvent.subscribe((function(t){e.remove.emit(t)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(t){e.select.emit(t)})))},e.prototype.setDefaultSettings=function(){this.uploadService.async.autoUpload=!1,this.uploadService.component="FileSelect"},n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"accept",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"name",null),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"showFileList",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],e.prototype,"tabindex",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],e.prototype,"restrictions",null),n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"zoneId",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"focusableId",void 0),n.__decorate([o.ContentChild(m.FileTemplateDirective,{static:!1}),n.__metadata("design:type",m.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),n.__decorate([o.ContentChild(_.FileInfoTemplateDirective,{static:!1}),n.__metadata("design:type",_.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),n.__decorate([o.ViewChild("fileSelect",{static:!0}),n.__metadata("design:type",o.ElementRef)],e.prototype,"fileSelect",void 0),n.__decorate([o.ViewChild("fileSelectButton",{static:!0}),n.__metadata("design:type",o.ElementRef)],e.prototype,"fileSelectButton",void 0),n.__decorate([o.Output("blur"),n.__metadata("design:type",o.EventEmitter)],e.prototype,"onBlur",void 0),n.__decorate([o.Output("focus"),n.__metadata("design:type",o.EventEmitter)],e.prototype,"onFocus",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],e.prototype,"select",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],e.prototype,"remove",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],e.prototype,"valueChange",void 0),n.__decorate([o.HostBinding("class.k-widget"),o.HostBinding("class.k-upload"),n.__metadata("design:type",Boolean)],e.prototype,"hostDefaultClasses",void 0),n.__decorate([o.HostBinding("class.k-state-disabled"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"hostDisabledClass",null),n.__decorate([o.HostBinding("attr.dir"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"dir",null),n.__decorate([o.HostListener("keydown",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),e=i=n.__decorate([o.Component({exportAs:"kendoFileSelect",providers:[s.LocalizationService,f.NavigationService,c.UploadService,g.DropZoneService,t.FILESELECT_VALUE_ACCESSOR,{provide:s.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:r.KendoInput,useExisting:o.forwardRef((function(){return i}))}],selector:"kendo-fileselect",template:'\n <ng-container kendoFileSelectLocalizedMessages\n i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to select"\n\n i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-remove="kendo.fileselect.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-select="kendo.fileselect.select|The text for the Select button"\n select="Select files..."\n >\n </ng-container>\n <div kendoFileSelectInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list\n class="k-upload-files k-reset"\n *ngIf="showFileList && fileList.count > 0"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n '}),n.__metadata("design:paramtypes",[c.UploadService,s.LocalizationService,f.NavigationService,g.DropZoneService,o.NgZone,o.Renderer2,o.ChangeDetectorRef,o.ElementRef])],e)}();t.FileSelectComponent=y},function(e,t){e.exports=o},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t){e.exports=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-upload",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1634118943,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Failed=0]="Failed",e[e.Initial=1]="Initial",e[e.Selected=2]="Selected",e[e.Uploaded=3]="Uploaded",e[e.Uploading=4]="Uploading",e[e.Paused=5]="Paused"}(t.FileState||(t.FileState={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),o=function(){function e(){this._files={}}return e.prototype.add=function(e){var t=e.uid;this.has(t)?e.validationErrors&&e.validationErrors.length>0?this._files[t].unshift(e):this._files[t].push(e):this._files[t]=[e]},e.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},e.prototype.clear=function(){var e=this._files;for(var t in e)if(e.hasOwnProperty(t)){for(var i=0,n=e[t];i<n.length;i++){var o=n[i];o.httpSubscription&&o.httpSubscription.unsubscribe()}e[t]=null,delete e[t]}},e.prototype.has=function(e){return e in this._files},e.prototype.get=function(e){return this._files[e]},e.prototype.setFilesState=function(e,t){for(var i=0,n=e;i<n.length;i++){var o=n[i];this.setFilesStateByUid(o.uid,t)}},e.prototype.setFilesStateByUid=function(e,t){this.get(e).forEach((function(e){e.state=t}))},Object.defineProperty(e.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"files",{get:function(){var e=this._files,t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(e[i]);return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filesFlat",{get:function(){var e=this._files,t=[];for(var i in e){if(e.hasOwnProperty(i))e[i].forEach((function(e){t.push(e)}))}return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filesToUpload",{get:function(){var e=this._files,t=[];for(var i in e)if(e.hasOwnProperty(i)){for(var o=e[i],a=!0,s=0,r=o;s<r.length;s++){var l=r[s];(l.state!==n.FileState.Selected||l.validationErrors&&l.validationErrors.length>0)&&(a=!1)}a&&t.push(o)}return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstFileToUpload",{get:function(){var e=this._files;for(var t in e)if(e.hasOwnProperty(t)){for(var i=e[t],o=!0,a=0,s=i;a<s.length;a++){var r=s[a];(r.state!==n.FileState.Selected||r.validationErrors&&r.validationErrors.length>0)&&(o=!1)}if(o)return i}return null},enumerable:!0,configurable:!0}),e.prototype.getFilesWithState=function(e){return this.filesFlat.filter((function(t){return t.state===e}))},e.prototype.hasFileWithState=function(e){var t=this._files;for(var i in t)if(t.hasOwnProperty(i))for(var n=0,o=t[i];n<o.length;n++){var a=o[n];if(e.indexOf(a.state)>=0)return!0}return!1},e}();t.FileMap=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(44);t.CancelEvent=n.CancelEvent;var o=i(45);t.ClearEvent=o.ClearEvent;var a=i(46);t.ErrorEvent=a.ErrorEvent;var s=i(47);t.PauseEvent=s.PauseEvent;var r=i(48);t.RemoveEvent=r.RemoveEvent;var l=i(49);t.ResumeEvent=l.ResumeEvent;var u=i(50);t.SelectEvent=u.SelectEvent;var d=i(51);t.SuccessEvent=d.SuccessEvent;var p=i(52);t.UploadEvent=p.UploadEvent;var c=i(53);t.UploadProgressEvent=c.UploadProgressEvent},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(6),a=i(1),s=i(56),r=i(26),l=i(57),u=i(29),d=i(30),p=i(31),c=i(32),f=i(35),h=i(36),m=i(10),v=i(58),g=i(37),_=i(38),y=i(39);t.SHARED_DECLARATIONS=[l.DropZoneInternalDirective,u.FileListComponent,d.FileListItemDirective,p.FileListItemActionButtonComponent,c.FileListMultipleItemsComponent,f.FileListSingleItemComponent,h.FileSelectDirective,v.LocalizedMessagesDirective,g.TemplateContextDirective],t.PUBLIC_DIRECTIVES=[m.FileTemplateDirective,o.FileInfoTemplateDirective,r.CustomMessagesComponent,_.UploadDropZoneDirective,y.UploadDropZoneComponent];var b=function(){function e(){}return e=n.__decorate([a.NgModule({declarations:[t.PUBLIC_DIRECTIVES,t.SHARED_DECLARATIONS],exports:[t.PUBLIC_DIRECTIVES,t.SHARED_DECLARATIONS,s.CommonModule],imports:[s.CommonModule]})],e)}();t.SharedModule=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(27),s=i(2),r=function(e){function t(t){var i=e.call(this)||this;return i.service=t,i}var i;return n.__extends(t,e),i=t,Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=i=n.__decorate([o.Component({providers:[{provide:a.Messages,useExisting:o.forwardRef((function(){return i}))}],selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",template:""}),n.__metadata("design:paramtypes",[s.LocalizationService])],t)}(a.Messages);t.CustomMessagesComponent=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"cancel",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"clearSelectedFiles",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"dropFilesHere",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"externalDropFilesHere",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"filesBatchStatus",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"filesBatchStatusFailed",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"filesBatchStatusUploaded",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"fileStatusFailed",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"fileStatusUploaded",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"headerStatusPaused",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"headerStatusUploaded",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"headerStatusUploading",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"invalidFileExtension",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"invalidMaxFileSize",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"invalidMinFileSize",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"pause",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"remove",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"resume",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"retry",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"select",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"uploadSelectedFiles",void 0),t}(i(2).ComponentMessages);t.Messages=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(){function e(e,t,i){this.element=e,this.renderer=t,this.hideIntervalElement=null,this.hoverClass=i}return e.prototype.onElementDragEnterListener=function(){var e=this;return this.addClass(this.hoverClass),this.lastDragElement=new Date,this.hideIntervalElement||(this.hideIntervalElement=setInterval((function(){e.calculateTimeDiff(e.lastDragElement)<100||(e.removeClass(e.hoverClass),clearInterval(e.hideIntervalElement),e.hideIntervalElement=null)}),100)),!1},e.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},e.prototype.calculateTimeDiff=function(e){return(new Date).getTime()-e.getTime()},e.prototype.addClass=function(e){this.renderer.addClass(this.element.nativeElement,e)},e.prototype.removeClass=function(e){this.renderer.removeClass(this.element.nativeElement,e)},n.__decorate([o.HostListener("dragenter"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Boolean)],e.prototype,"onElementDragEnterListener",null),n.__decorate([o.HostListener("dragover"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Boolean)],e.prototype,"onElementDragOverListener",null),e}();t.DropZoneBase=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(8),s=i(4),r=i(10),l=i(30),u=i(7),d=i(3),p=i(6),c=function(){function e(e,t){this.uploadService=e,this.navigation=t,this.onItemFocus(),this.onItemAction()}return e.prototype.onItemFocus=function(){var e=this;this.focusSubscription=this.navigation.onFileFocus.subscribe((function(t){e.fileListItems.toArray()[t].focus()}))},e.prototype.onItemAction=function(){var e=this;this.actionSubscription=this.navigation.onFileAction.subscribe((function(t){e.itemActionHandler(t)}))},e.prototype.itemActionHandler=function(e){var t=this.navigation.focusedIndex,i=this.fileListItems.toArray()[t],n=i.uidAttribute,o=this.uploadService.files.get(n);if(e===a.Keys.Escape&&o[0].state===s.FileState.Uploading)return this.uploadService.cancelFiles(n),void this.navigation.focusSelectButton();e!==a.Keys.Enter||o[0].state!==s.FileState.Failed?e===a.Keys.Delete&&(o[0].state===s.FileState.Uploading?this.uploadService.cancelFiles(n):this.hasDelete(i)&&this.uploadService.removeFiles(n),this.navigation.focusSelectButton()):this.uploadService.retryFiles(n)},e.prototype.hasDelete=function(e){return e.element.nativeElement.getElementsByClassName("k-delete").length>0},e.prototype.ngOnDestroy=function(){this.focusSubscription.unsubscribe(),this.actionSubscription.unsubscribe()},n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Array)],e.prototype,"fileList",void 0),n.__decorate([o.Input(),n.__metadata("design:type",r.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),n.__decorate([o.Input(),n.__metadata("design:type",p.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),n.__decorate([o.ViewChildren(l.FileListItemDirective),n.__metadata("design:type",o.QueryList)],e.prototype,"fileListItems",void 0),e=n.__decorate([o.Component({selector:"[kendo-upload-file-list]",template:"\n <ng-template ngFor\n [ngForOf]=\"fileList\"\n let-files\n let-index=\"index\">\n <li kendoUploadFileListItem [files]='files' [index]='index'>\n <kendo-upload-file-list-single-item\n class='k-file-single'\n *ngIf='files.length === 1 && !fileTemplate'\n [disabled]='disabled'\n [file]='files[0]'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-single-item>\n <kendo-upload-file-list-multiple-items\n class='k-file-multiple'\n *ngIf='files.length > 1 && !fileTemplate'\n [disabled]='disabled'\n [files]='files'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-multiple-items>\n <ng-template *ngIf=\"fileTemplate\"\n [templateContext]=\"{\n templateRef: fileTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\"></ng-template>\n </li>\n </ng-template>\n "}),n.__metadata("design:paramtypes",[d.UploadService,u.NavigationService])],e)}();t.FileListComponent=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(4),s=i(7),r=i(5),l=i(3),u=function(){function e(e,t,i){this.navigationService=t,this.uploadService=i,this.fileClass=!0,this.focused=!1,this.element=e}return e.prototype.focus=function(){this.element.nativeElement.focus()},Object.defineProperty(e.prototype,"uidAttribute",{get:function(){return this.files[0].uid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabIndex",{get:function(){return"-1"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kFileError",{get:function(){return this.files[0].state===a.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kFileInvalid",{get:function(){return r.filesHaveValidationErrors(this.files)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kFileProgress",{get:function(){return this.files[0].state===a.FileState.Uploading||this.files[0].state===a.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kFileSuccess",{get:function(){return"Upload"===this.uploadService.component&&(this.files[0].state===a.FileState.Uploaded||this.files[0].state===a.FileState.Initial)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kStateFocused",{get:function(){return this.focused},enumerable:!0,configurable:!0}),e.prototype.onFocus=function(){this.focused=!0},e.prototype.onBlur=function(){this.focused=!1},e.prototype.onClick=function(e){r.isFocusable(e.target)||r.hasClasses(e.target,r.IGNORE_TARGET_CLASSES)||(this.navigationService.focusedIndex=this.index)},n.__decorate([o.Input(),n.__metadata("design:type",Array)],e.prototype,"files",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],e.prototype,"index",void 0),n.__decorate([o.HostBinding("class.k-file"),n.__metadata("design:type",Boolean)],e.prototype,"fileClass",void 0),n.__decorate([o.HostBinding("attr.data-uid"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"uidAttribute",null),n.__decorate([o.HostBinding("attr.tabIndex"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"tabIndex",null),n.__decorate([o.HostBinding("class.k-file-error"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kFileError",null),n.__decorate([o.HostBinding("class.k-file-invalid"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kFileInvalid",null),n.__decorate([o.HostBinding("class.k-file-progress"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kFileProgress",null),n.__decorate([o.HostBinding("class.k-file-success"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kFileSuccess",null),n.__decorate([o.HostBinding("class.k-state-focused"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kStateFocused",null),n.__decorate([o.HostListener("focus"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],e.prototype,"onFocus",null),n.__decorate([o.HostListener("blur"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),n.__decorate([o.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"onClick",null),e=n.__decorate([o.Directive({selector:"[kendoUploadFileListItem]"}),n.__metadata("design:paramtypes",[o.ElementRef,s.NavigationService,l.UploadService])],e)}();t.FileListItemDirective=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(4),s=i(3),r=i(2),l=function(){function e(e,t){this.uploadService=e,this.localization=t,this.actionFocused=!1,this.retryFocused=!1,this.pauseResumeFocused=!1}return e.prototype.onFocus=function(e){"action"===e&&(this.actionFocused=!0),"retry"===e&&(this.retryFocused=!0),"pauseResume"===e&&(this.pauseResumeFocused=!0)},e.prototype.onBlur=function(e){"retry"===e&&(this.retryFocused=!1),"action"===e&&(this.actionFocused=!1),"pauseResume"===e&&(this.pauseResumeFocused=!1)},e.prototype.onRetryClick=function(){this.disabled||this.uploadService.retryFiles(this.file.uid)},e.prototype.onRemoveCancelClick=function(){if(!this.disabled){var e=this.file.uid;this.file.state===a.FileState.Uploading?this.uploadService.cancelFiles(e):this.uploadService.removeFiles(e)}},e.prototype.onPauseResumeClick=function(){if(!this.disabled){var e=this.file.uid;this.file.state===a.FileState.Paused?this.uploadService.resumeFile(e):this.uploadService.pauseFile(e)}},Object.defineProperty(e.prototype,"actionButtonTitle",{get:function(){return this.file.state===a.FileState.Uploading?this.localization.get("cancel"):this.localization.get("remove")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryButtonTitle",{get:function(){return this.localization.get("retry")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pauseResumeButtonTitle",{get:function(){return this.file.state===a.FileState.Uploading?this.localization.get("pause"):this.localization.get("resume")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploading",{get:function(){return this.file.state===a.FileState.Uploading},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFailed",{get:function(){return this.file.state===a.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this.file.state===a.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isResumable",{get:function(){var e=this.uploadService,t=e.async.chunk&&e.chunk.resumable,i=this.file.state===a.FileState.Paused||this.file.state===a.FileState.Uploading;return t&&i},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActionButtonVisible",{get:function(){return!!(this.file.state!==a.FileState.Uploaded&&this.file.state!==a.FileState.Initial||this.uploadService.async.removeUrl||"Upload"!==this.uploadService.component)},enumerable:!0,configurable:!0}),n.__decorate([o.Input(),n.__metadata("design:type",Object)],e.prototype,"file",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],e.prototype,"progress",void 0),e=n.__decorate([o.Component({selector:"kendo-upload-file-list-item-action-button",template:'\n <strong class="k-upload-status">\n <span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>\n\n <button type="button" *ngIf="isFailed" class="k-button k-button-icon k-flat k-upload-action"\n [ngClass]="{ \'k-state-focused\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-retry k-i-refresh-sm"\n [attr.aria-label]="retryButtonTitle"\n [attr.title]="retryButtonTitle">\n </span>\n </button>\n\n <button *ngIf="isResumable" type="button" class="k-button k-button-icon k-flat k-upload-action"\n [ngClass]="{ \'k-state-focused\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon"\n [ngClass]="{\n \'k-i-play-sm\': isPaused,\n \'k-i-pause-sm\': !isPaused\n }"\n [attr.aria-label]=\'pauseResumeButtonTitle\'\n [attr.title]=\'pauseResumeButtonTitle\'>\n </span>\n </button>\n\n <button type="button" *ngIf="isActionButtonVisible" class="k-button k-button-icon k-flat k-upload-action"\n [ngClass]="{ \'k-state-focused\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick()">\n <span class="k-icon"\n [ngClass]="{\n \'k-i-cancel\': isUploading,\n \'k-delete k-i-x\': !isUploading\n }"\n [attr.aria-label]=\'actionButtonTitle\'\n [attr.title]=\'actionButtonTitle\'>\n </span>\n </button>\n </strong>\n '}),n.__metadata("design:paramtypes",[s.UploadService,r.LocalizationService])],e)}();t.FileListItemActionButtonComponent=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(33),s=i(4),r=i(34),l=i(2),u=i(3),d=i(5),p=i(6),c=function(e){function t(t,i){var n=e.call(this,i)||this;return n.localization=t,n.subscribeUploadProgress((function(e){e.files[0].uid===n.files[0].uid&&(n.progressComplete=e.percentComplete)})),n}return n.__extends(t,e),Object.defineProperty(t.prototype,"showProgress",{get:function(){return this.files[0].state===s.FileState.Uploading||this.files[0].state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.filesHaveErrors=e.prototype.filesHaveValidationErrors.call(this,this.files)},t.prototype.fileStatusText=function(e){var t=e.validationErrors;return d.isPresent(t)?this.getFileValidationMessage(e):this.getTotalFilesSizeMessage([e])},Object.defineProperty(t.prototype,"batchStatusText",{get:function(){var e=this.files[0].state,t=this.files.length;return e===s.FileState.Uploaded?t+" "+this.textFor("filesBatchStatusUploaded"):e===s.FileState.Failed?t+" "+this.textFor("filesBatchStatusFailed"):t+" "+this.textFor("filesBatchStatus")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploadSuccessful",{get:function(){return this.files[0].state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploadFailed",{get:function(){return this.files[0].state===s.FileState.Failed},enumerable:!0,configurable:!0}),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Array)],t.prototype,"files",void 0),n.__decorate([o.Input(),n.__metadata("design:type",p.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),t=n.__decorate([o.Component({animations:[a.trigger("progressState",[a.state("active",a.style({opacity:1})),a.state("inactive",a.style({opacity:0})),a.transition("void => active",a.style({opacity:0})),a.transition("inactive => active",a.style({opacity:1})),a.transition("active => inactive",a.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-multiple-items",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-multiple-files-group-wrapper">\n <span class="k-file-group k-icon k-i-copy"></span>\n </span>\n <span class="k-multiple-files-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span *ngFor="let file of files" class="k-file-name-size-wrapper">\n <span [title]="file.name" class="k-file-name">\n {{file.name}}\n </span>\n <span [ngClass]="{\n \'k-text-error\': file.validationErrors,\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors\n }"\n >{{fileStatusText(file)}}</span>\n </span>\n <span class="k-file-information"\n [ngClass]="{\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': isUploadFailed\n }"\n >{{batchStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'files[0]\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),n.__metadata("design:paramtypes",[l.LocalizationService,u.UploadService])],t)}(r.FileListItemBase);t.FileListMultipleItemsComponent=c},function(e,t){e.exports=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=function(){function e(e){this.uploadService=e,this.progressComplete=0}return e.prototype.subscribeUploadProgress=function(e){this.uploadProgressSubscription=this.uploadService.uploadProgressEvent.subscribe(e)},e.prototype.fileHasValidationErrors=function(e){return n.fileHasValidationErrors(e)},e.prototype.filesHaveValidationErrors=function(e){return n.filesHaveValidationErrors(e)},e.prototype.ngOnDestroy=function(){this.uploadProgressSubscription.unsubscribe()},e.prototype.getFileValidationMessage=function(e){var t;return e.validationErrors&&e.validationErrors.length>0&&(t=this.localization.get(e.validationErrors[0])),t},e.prototype.getTotalFilesSizeMessage=function(e){return n.getTotalFilesSizeMessage(e)},e.prototype.textFor=function(e){return this.localization.get(e)},e}();t.FileListItemBase=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(33),s=i(4),r=i(34),l=i(2),u=i(3),d=i(5),p=i(6),c=function(e){function t(t,i){var n=e.call(this,i)||this;return n.localization=t,n.subscribeUploadProgress((function(e){e.files[0].uid===n.file.uid&&(n.progressComplete=e.percentComplete)})),n}return n.__extends(t,e),Object.defineProperty(t.prototype,"fileStatusText",{get:function(){var e=this.file.validationErrors;return this.file.state===s.FileState.Uploaded?""+this.textFor("fileStatusUploaded"):this.file.state===s.FileState.Failed?""+this.textFor("fileStatusFailed"):d.isPresent(e)?this.getFileValidationMessage(this.file):this.getTotalFilesSizeMessage([this.file])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showProgress",{get:function(){return this.file.state===s.FileState.Uploading||this.file.state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fileGroupClass",{get:function(){return d.getFileGroupCssClass(this.file.extension?this.file.extension:"")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploadSuccessful",{get:function(){return this.file.state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploadFailed",{get:function(){return this.file.state===s.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNotYetUploaded",{get:function(){return!this.isUploadFailed&&!this.isUploadSuccessful},enumerable:!0,configurable:!0}),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],t.prototype,"file",void 0),n.__decorate([o.Input(),n.__metadata("design:type",p.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),t=n.__decorate([o.Component({animations:[a.trigger("progressState",[a.state("active",a.style({opacity:1})),a.state("inactive",a.style({opacity:0})),a.transition("void => active",a.style({opacity:0})),a.transition("inactive => active",a.style({opacity:1})),a.transition("active => inactive",a.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-single-item",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-file-group-wrapper">\n <span class="k-file-group k-icon" [ngClass]="fileGroupClass"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span class="k-file-name" [title]="file.name">{{ file.name }}</span>\n <span [ngClass]="{\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors && isNotYetUploaded,\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': file.validationErrors || isUploadFailed,\n \'k-file-information\': isUploadSuccessful || isUploadFailed\n }"\n >{{fileStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: file.state,\n $implicit: [file]\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'file\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),n.__metadata("design:paramtypes",[l.LocalizationService,u.UploadService])],t)}(r.FileListItemBase);t.FileListSingleItemComponent=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(7),s=i(3),r=i(5),l=i(12),u=function(){function e(e,t,i){this.uploadService=e,this.navigation=t,this.type="file",this.autocomplete="off",this.tabIndex=-1,this.element=i}return Object.defineProperty(e.prototype,"nameAttribute",{get:function(){return this.uploadService.async.saveField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!0,configurable:!0}),e.prototype.onInputChange=function(e){var t=this,i=navigator.userAgent,n=r.inputFiles(e.target);n=r.assignGuidToFiles(n,!this.uploadService.async.batch),l.validateFiles(n,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(n);var o=this.element.nativeElement;!i.match(/(chrome)[ \/]([\w.]+)/i)&&i.match(/(webkit)[ \/]([\w.]+)/i)||(o.type="",o.type="file"),setTimeout((function(){t.navigation.focusedIndex=-1}))},n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"dir",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],e.prototype,"restrictions",void 0),n.__decorate([o.HostBinding("attr.type"),n.__metadata("design:type",String)],e.prototype,"type",void 0),n.__decorate([o.HostBinding("attr.autocomplete"),n.__metadata("design:type",String)],e.prototype,"autocomplete",void 0),n.__decorate([o.HostBinding("attr.tabindex"),n.__metadata("design:type",Number)],e.prototype,"tabIndex",void 0),n.__decorate([o.HostBinding("attr.name"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"nameAttribute",null),n.__decorate([o.HostBinding("attr.multiple"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"multipleAttribute",null),n.__decorate([o.HostBinding("attr.dir"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"dirAttribute",null),n.__decorate([o.HostBinding("attr.disabled"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"disabledAttribute",null),n.__decorate([o.HostListener("change",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"onInputChange",null),e=n.__decorate([o.Directive({selector:"[kendoFileSelect]"}),n.__metadata("design:paramtypes",[s.UploadService,a.NavigationService,o.ElementRef])],e)}();t.FileSelectDirective=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(){function e(e){this.viewContainerRef=e}return Object.defineProperty(e.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!0,configurable:!0}),n.__decorate([o.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],e.prototype,"templateContext",null),e=n.__decorate([o.Directive({selector:"[templateContext]"}),n.__metadata("design:paramtypes",[o.ViewContainerRef])],e)}();t.TemplateContextDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(5),s=i(12),r=i(11),l=i(13),u=function(){function e(e){this.dropZoneService=e}return e.prototype.onElementDragEnter=function(){return!1},e.prototype.onElementDragOver=function(){return!1},e.prototype.onDropListener=function(e){var t=this.componentInstance;if(a.isPresent(t))return t.forEach((function(t){var i=e.dataTransfer.files;if(i.length>0&&!t.disabled){var n=a.getAllFileInfo(i);n=t instanceof l.UploadComponent?a.assignGuidToFiles(n,!t.batch):a.assignGuidToFiles(n,!0),t.multiple||(n.splice(1,n.length-1),t.clearFiles()),s.validateFiles(n,t.restrictions),t.addFiles(n)}})),!1},Object.defineProperty(e.prototype,"componentInstance",{get:function(){return this.dropZoneService.getComponents(this.zoneId)},enumerable:!0,configurable:!0}),n.__decorate([o.Input("kendoUploadDropZone"),n.__metadata("design:type",String)],e.prototype,"zoneId",void 0),n.__decorate([o.HostListener("dragenter"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Boolean)],e.prototype,"onElementDragEnter",null),n.__decorate([o.HostListener("dragover"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Boolean)],e.prototype,"onElementDragOver",null),n.__decorate([o.HostListener("drop",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",Boolean)],e.prototype,"onDropListener",null),e=n.__decorate([o.Directive({providers:[r.DropZoneService],selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]"}),n.__metadata("design:paramtypes",[r.DropZoneService])],e)}();t.UploadDropZoneDirective=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(2),s=function(e){function t(t,i,n){var o=e.call(this,t,i,"k-external-dropzone-hover")||this;return o.localization=n,o.hostClass=!0,o.localizationChangeSubscription=o.localization.changes.subscribe((function(e){var t=e.rtl;o.direction=t?"rtl":"ltr"})),o}return n.__extends(t,e),Object.defineProperty(t.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.textFor=function(e){return this.localization.get(e)},Object.defineProperty(t.prototype,"iconClasses",{get:function(){return this.icon?"k-icon k-i-"+this.icon:this.iconClass?""+this.iconClass:"k-icon k-i-upload"},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},n.__decorate([o.HostBinding("class.k-external-dropzone"),n.__metadata("design:type",Boolean)],t.prototype,"hostClass",void 0),n.__decorate([o.HostBinding("attr.dir"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],t.prototype,"dirAttribute",null),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"zoneId",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"icon",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"iconClass",void 0),t=n.__decorate([o.Component({exportAs:"kendoUploadDropZone",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.uploaddropzone"}],selector:"kendo-uploaddropzone",template:"\n <ng-container kendoUploadDropZoneLocalizedMessages\n i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'\n externalDropFilesHere='Drag and drop files here to upload'\n >\n </ng-container>\n <div class='k-dropzone-inner' [kendoUploadDropZone]=\"zoneId\">\n <span [ngClass]=\"iconClasses\"></span>\n <span class=\"k-dropzone-hint\">{{ textFor('externalDropFilesHere') }}</span>\n <span class=\"k-dropzone-note\">\n <ng-content></ng-content>\n </span>\n </div>\n "}),n.__metadata("design:paramtypes",[o.ElementRef,o.Renderer2,a.LocalizationService])],t)}(i(28).DropZoneBase);t.UploadDropZoneComponent=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(13),s=i(41),r=i(42),l=i(25),u=[a.UploadComponent,s.UploadActionButtonsComponent,r.UploadStatusTotalComponent],d=function(){function e(){}return e=n.__decorate([o.NgModule({declarations:[u],exports:[l.PUBLIC_DIRECTIVES,u],imports:[l.SharedModule]})],e)}();t.UploadModule=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(3),s=i(2),r=i(7),l=function(){function e(e,t,i){this.uploadService=e,this.localization=t,this.navigation=i,this.hostDefaultClass=!0,this.onAction(),this.onFocus()}return Object.defineProperty(e.prototype,"actionButtonsEndClassName",{get:function(){return"end"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionButtonsStretchedClassName",{get:function(){return"stretched"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionButtonsStartClassName",{get:function(){return"start"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionButtonsCenterClassName",{get:function(){return"center"===this.actionsLayout},enumerable:!0,configurable:!0}),e.prototype.onAction=function(){var e=this;this.actionSubscription=this.navigation.onActionButtonAction.subscribe((function(t){"clear"===t?e.clearFiles():e.performUpload(),e.navigation.focusSelectButton()}))},e.prototype.onFocus=function(){var e=this;this.focusSubscription=this.navigation.onActionButtonFocus.subscribe((function(t){e.focusButton(t)}))},e.prototype.focusButton=function(e){("clear"===e?this.clearButton:this.uploadButton).nativeElement.focus()},e.prototype.ngOnDestroy=function(){this.actionSubscription.unsubscribe(),this.focusSubscription.unsubscribe()},e.prototype.performUpload=function(e){this.disabled||this.uploadService.uploadFiles()},e.prototype.clearFiles=function(e){this.disabled||this.uploadService.clearFiles()},e.prototype.textFor=function(e){return this.localization.get(e)},n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"actionsLayout",void 0),n.__decorate([o.ViewChild("clearButton",{static:!0}),n.__metadata("design:type",o.ElementRef)],e.prototype,"clearButton",void 0),n.__decorate([o.ViewChild("uploadButton",{static:!0}),n.__metadata("design:type",o.ElementRef)],e.prototype,"uploadButton",void 0),n.__decorate([o.HostBinding("class.k-actions"),n.__metadata("design:type",Boolean)],e.prototype,"hostDefaultClass",void 0),n.__decorate([o.HostBinding("class.k-actions-end"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"actionButtonsEndClassName",null),n.__decorate([o.HostBinding("class.k-actions-stretched"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"actionButtonsStretchedClassName",null),n.__decorate([o.HostBinding("class.k-actions-start"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"actionButtonsStartClassName",null),n.__decorate([o.HostBinding("class.k-actions-center"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"actionButtonsCenterClassName",null),e=n.__decorate([o.Component({selector:"kendo-upload-action-buttons",template:'\n <button #clearButton type="button" class="k-button k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="clearFiles($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="performUpload($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}),n.__metadata("design:paramtypes",[a.UploadService,s.LocalizationService,r.NavigationService])],e)}();t.UploadActionButtonsComponent=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(23),s=i(4),r=i(2),l=function(){function e(e){this.localization=e}return e.prototype.ngDoCheck=function(){this.isPaused=this.fileList.hasFileWithState([s.FileState.Paused]),this.isFailed=this.fileList.hasFileWithState([s.FileState.Failed]),this.isUploading=this.fileList.hasFileWithState([s.FileState.Uploading]),this.isPaused&&!this.isUploading?this.statusText=this.localization.get("headerStatusPaused"):this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded")},n.__decorate([o.Input(),n.__metadata("design:type",a.FileMap)],e.prototype,"fileList",void 0),e=n.__decorate([o.Component({selector:"kendo-upload-status-total",template:"\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-checkmark': !this.isUploading && !this.isFailed,\n 'k-i-exception': !this.isUploading && this.isFailed,\n 'k-i-upload': this.isUploading,\n 'k-i-pause-sm': this.isPaused\n }\">\n </span>\n {{statusText}}\n "}),n.__metadata("design:paramtypes",[r.LocalizationService])],e)}();t.UploadStatusTotalComponent=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(14);t.FileSelectModule=o.FileSelectModule;var a=i(40);t.UploadModule=a.UploadModule;var s=i(59);t.UploadsModule=s.UploadsModule;var r=i(13);t.UploadComponent=r.UploadComponent;var l=i(15);t.FileSelectComponent=l.FileSelectComponent;var u=i(39);t.UploadDropZoneComponent=u.UploadDropZoneComponent;var d=i(36);t.FileSelectDirective=d.FileSelectDirective;var p=i(29);t.FileListComponent=p.FileListComponent;var c=i(35);t.FileListSingleItemComponent=c.FileListSingleItemComponent;var f=i(31);t.FileListItemActionButtonComponent=f.FileListItemActionButtonComponent;var h=i(32);t.FileListMultipleItemsComponent=h.FileListMultipleItemsComponent;var m=i(10);t.FileTemplateDirective=m.FileTemplateDirective;var v=i(6);t.FileInfoTemplateDirective=v.FileInfoTemplateDirective;var g=i(37);t.TemplateContextDirective=g.TemplateContextDirective;var _=i(42);t.UploadStatusTotalComponent=_.UploadStatusTotalComponent;var y=i(41);t.UploadActionButtonsComponent=y.UploadActionButtonsComponent;var b=i(38);t.UploadDropZoneDirective=b.UploadDropZoneDirective;var S=i(26);t.CustomMessagesComponent=S.CustomMessagesComponent,n.__exportStar(i(24),t),n.__exportStar(i(4),t)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){this.files=e};t.CancelEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(){return e.call(this)||this}return n.__extends(t,e),t}(i(9).PreventableEvent);t.ClearEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,i){this.files=e,this.operation=t,this.response=i};t.ErrorEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){this.file=e};t.PauseEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(t,i){var n=e.call(this)||this;return n.files=t,n.headers=i,n}return n.__extends(t,e),t}(i(9).PreventableEvent);t.RemoveEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){this.file=e};t.ResumeEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(t){var i=e.call(this)||this;return i.files=t,i}return n.__extends(t,e),t}(i(9).PreventableEvent);t.SelectEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(t,i,n){var o=e.call(this)||this;return o.files=t,o.operation=i,o.response=n,o}return n.__extends(t,e),t}(i(9).PreventableEvent);t.SuccessEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(t,i){var n=e.call(this)||this;return n.files=t,n.headers=i,n}return n.__extends(t,e),t}(i(9).PreventableEvent);t.UploadEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.files=e,this.percentComplete=t};t.UploadProgressEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],discImage:[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._files={}}return e.prototype.add=function(e,t){var i={index:0,position:0,retries:0,totalChunks:t};return this._files[e]=i,i},e.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},e.prototype.has=function(e){return e in this._files},e.prototype.get=function(e){return this._files[e]},e}();t.ChunkMap=n},function(e,t){e.exports=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(5),s=i(12),r=i(28),l=i(3),u=function(e){function t(t,i,n,o){var a=e.call(this,t,i,"k-dropzone-hover")||this;return a.ngZone=n,a.uploadService=o,a.initialClassName=!0,a.hideIntervalDocument=null,a.activeClass="k-dropzone-active",a.ngZone.runOutsideAngular((function(){a.unsubscribeDocumentDragEnter=a.renderer.listen("document","dragenter",(function(){return a.onDocumentDragEnter()})),a.unsubscribeDocumentDragOver=a.renderer.listen("document","dragover",(function(){return a.onDocumentDragOver()}))})),a}return n.__extends(t,e),t.prototype.ngOnDestroy=function(){var e=this;this.ngZone.runOutsideAngular((function(){e.unsubscribeDocumentDragEnter&&e.unsubscribeDocumentDragEnter(),e.unsubscribeDocumentDragOver&&e.unsubscribeDocumentDragOver()}))},t.prototype.onDocumentDragEnter=function(){var e=this;return this.addClass(this.activeClass),this.lastDragDocument=new Date,this.hideIntervalDocument||(this.hideIntervalDocument=setInterval((function(){e.calculateTimeDiff(e.lastDragDocument)<100||(e.removeClass(e.activeClass),clearInterval(e.hideIntervalDocument),e.hideIntervalDocument=null)}),100)),!1},t.prototype.onDocumentDragOver=function(){return this.lastDragDocument=new Date,!1},t.prototype.onDropListener=function(e){var t=e.dataTransfer.files;if(t.length>0&&!this.disabled){var i=a.getAllFileInfo(t);i=a.assignGuidToFiles(i,!this.uploadService.async.batch),this.multiple||(i.splice(1,i.length-1),this.uploadService.clearFiles()),s.validateFiles(i,this.restrictions),this.uploadService.addFiles(i)}return!1},n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],t.prototype,"restrictions",void 0),n.__decorate([o.HostBinding("class.k-dropzone"),n.__metadata("design:type",Boolean)],t.prototype,"initialClassName",void 0),n.__decorate([o.HostListener("drop",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",Boolean)],t.prototype,"onDropListener",null),t=n.__decorate([o.Directive({selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n "}),n.__metadata("design:paramtypes",[o.ElementRef,o.Renderer2,o.NgZone,l.UploadService])],t)}(r.DropZoneBase);t.DropZoneInternalDirective=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(27),s=i(2),r=function(e){function t(t){var i=e.call(this)||this;return i.service=t,i}var i;return n.__extends(t,e),i=t,t=i=n.__decorate([o.Directive({providers:[{provide:a.Messages,useExisting:o.forwardRef((function(){return i}))}],selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "}),n.__metadata("design:paramtypes",[s.LocalizationService])],t)}(a.Messages);t.LocalizedMessagesDirective=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(14),s=i(40),r=function(){function e(){}return e=n.__decorate([o.NgModule({exports:[a.FileSelectModule,s.UploadModule]})],e)}();t.UploadsModule=r}])}));
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@progress/kendo-licensing"),require("@angular/common/http"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","@progress/kendo-angular-l10n","@progress/kendo-angular-common","@angular/forms","rxjs","rxjs/operators","@progress/kendo-licensing","@angular/common/http","@angular/animations","@angular/common"],t):"object"==typeof exports?exports.KendoAngularUpload=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("rxjs"),require("rxjs/operators"),require("@progress/kendo-licensing"),require("@angular/common/http"),require("@angular/animations"),require("@angular/common")):e.KendoAngularUpload=t(e.tslib,e["@angular/core"],e["@progress/kendo-angular-l10n"],e["@progress/kendo-angular-common"],e["@angular/forms"],e.rxjs,e["rxjs/operators"],e["@progress/kendo-licensing"],e["@angular/common/http"],e["@angular/animations"],e["@angular/common"])}(window,(function(e,t,i,n,o,a,s,r,l,u,d){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=43)}([function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t){e.exports=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(21),a=i(1),s=i(4),r=i(23),l=i(24),u=i(5),d=i(55),p=function(){function e(e){this.http=e,this.cancelEvent=new a.EventEmitter,this.clearEvent=new a.EventEmitter,this.completeEvent=new a.EventEmitter,this.errorEvent=new a.EventEmitter,this.pauseEvent=new a.EventEmitter,this.removeEvent=new a.EventEmitter,this.resumeEvent=new a.EventEmitter,this.selectEvent=new a.EventEmitter,this.successEvent=new a.EventEmitter,this.uploadEvent=new a.EventEmitter,this.uploadProgressEvent=new a.EventEmitter,this.changeEvent=new a.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new o.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new o.HttpHeaders,saveMethod:"POST",saveUrl:"",withCredentials:!0},this.chunk={autoRetryAfter:100,size:1048576,maxAutoRetries:1,resumable:!0},this.component="Upload",this.chunkMap=new d.ChunkMap,this.fileList=new r.FileMap}return Object.defineProperty(e.prototype,"files",{get:function(){return this.fileList},enumerable:!0,configurable:!0}),e.prototype.setChunkSettings=function(e){!1!==e&&(this.async.chunk=!0,"object"==typeof e&&(this.chunk=Object.assign({},this.chunk,e)))},e.prototype.onChange=function(){var e=this.fileList.filesFlat.filter((function(e){return e.state===s.FileState.Initial||e.state===s.FileState.Uploaded}));this.changeEvent.emit(e.length>0?e:null)},e.prototype.addFiles=function(e){var t=new l.SelectEvent(e);if(this.selectEvent.emit(t),!t.isDefaultPrevented()){for(var i=0,n=e;i<n.length;i++){var o=n[i];this.fileList.add(o)}this.async.autoUpload&&this.uploadFiles()}if("FileSelect"===this.component){var a=this.fileList.filesFlat;this.changeEvent.emit(a.length>0?a:null)}},e.prototype.addInitialFiles=function(e){var t=this;this.fileList.clear(),e.forEach((function(e){var i=u.getInitialFileInfo(e);t.fileList.add(i)}))},e.prototype.addInitialFileSelectFiles=function(e){var t=this;this.fileList.clear(),e.forEach((function(e){e instanceof File?t.fileList.add(u.convertFileToFileInfo(e)):t.fileList.add(u.getInitialFileInfo(e))}))},e.prototype.resumeFile=function(e){var t=this.fileList.get(e);this.resumeEvent.emit(new l.ResumeEvent(t[0])),this.fileList.setFilesStateByUid(e,s.FileState.Uploading),this._uploadFiles([t])},e.prototype.pauseFile=function(e){var t=this.fileList.get(e)[0];this.pauseEvent.emit(new l.PauseEvent(t)),this.fileList.setFilesStateByUid(e,s.FileState.Paused)},e.prototype.removeFiles=function(e){var t=this.fileList.get(e),i=new l.RemoveEvent(t,this.cloneRequestHeaders(this.async.removeHeaders));if(this.removeEvent.emit(i),!i.isDefaultPrevented())if("Upload"!==this.component||t[0].state!==s.FileState.Uploaded&&t[0].state!==s.FileState.Initial){if(this.fileList.remove(e),"FileSelect"===this.component){var n=this.fileList.filesFlat;this.changeEvent.emit(n.length>0?n:null)}}else this.performRemove(t,i)},e.prototype.cancelFiles=function(e){var t=this.fileList.get(e),i=new l.CancelEvent(t);this.cancelEvent.emit(i);for(var n=0,o=t;n<o.length;n++){var a=o[n];a.httpSubscription&&a.httpSubscription.unsubscribe()}this.fileList.remove(e),this.checkAllComplete()},e.prototype.clearFiles=function(){var e=new l.ClearEvent;if(this.clearEvent.emit(e),!e.isDefaultPrevented()){var t=this.fileList.hasFileWithState([s.FileState.Initial,s.FileState.Uploaded]);this.fileList.clear(),t&&this.onChange()}},e.prototype.uploadFiles=function(){var e=[];this.async.concurrent&&(e=this.fileList.filesToUpload),this.async.concurrent||this.fileList.hasFileWithState([s.FileState.Uploading])||(e=[this.fileList.firstFileToUpload]),e&&e.length>0&&this._uploadFiles(e)},e.prototype.retryFiles=function(e){var t=[this.fileList.get(e)];t&&this._uploadFiles(t)},e.prototype._uploadFiles=function(e){for(var t=function(e){if(e[0].state===s.FileState.Paused)return{value:void 0};var t=new l.UploadEvent(e,i.cloneRequestHeaders(i.async.saveHeaders));if(i.uploadEvent.emit(t),t.isDefaultPrevented())i.fileList.remove(e[0].uid);else{i.fileList.setFilesState(e,s.FileState.Uploading);var n=i.performUpload(e,t);e.forEach((function(e){e.httpSubscription=n}))}},i=this,n=0,o=e;n<o.length;n++){var a=t(o[n]);if("object"==typeof a)return a.value}},e.prototype.performRemove=function(e,t){var i=this,n=this.async,a=e.map((function(e){return e.name})),s=this.populateRemoveFormData(a,t.data),r=this.populateRequestOptions(t.headers),l=new o.HttpRequest(n.removeMethod,n.removeUrl,s,r);this.http.request(l).subscribe((function(t){i.onSuccess(t,e,"remove")}),(function(t){i.onError(t,e,"remove")}))},e.prototype.performUpload=function(e,t){var i=this,n=this.async,a=this.populateUploadFormData(e,t.data),s=this.populateRequestOptions(t.headers),r=new o.HttpRequest(n.saveMethod,n.saveUrl,a,s);return this.http.request(r).subscribe((function(t){t.type!==o.HttpEventType.UploadProgress||i.async.chunk?t instanceof o.HttpResponse&&(i.onSuccess(t,e,"upload"),i.checkAllComplete()):i.onProgress(t,e)}),(function(t){i.onError(t,e,"upload"),i.checkAllComplete()}))},e.prototype.onSuccess=function(e,t,i){if("upload"===i&&this.async.chunk){if(this.onChunkProgress(t),!this.isChunkUploadComplete(t[0].uid))return this.updateChunkInfo(t[0].uid),void this._uploadFiles([t]);this.removeChunkInfo(t[0].uid)}var n=new l.SuccessEvent(t,i,e);this.successEvent.emit(n),"upload"===i?this.fileList.setFilesState(t,n.isDefaultPrevented()?s.FileState.Failed:s.FileState.Uploaded):n.isDefaultPrevented()||this.fileList.remove(t[0].uid),n.isDefaultPrevented()||this.onChange()},e.prototype.onError=function(e,t,i){var n=this;if("upload"===i&&this.async.chunk){var o=this.chunk.maxAutoRetries,a=this.chunkMap.get(t[0].uid);if(a.retries<o)return a.retries+=1,void setTimeout((function(){n.retryFiles(t[0].uid)}),this.chunk.autoRetryAfter)}var r=new l.ErrorEvent(t,i,e);this.errorEvent.emit(r),"upload"===i&&this.fileList.setFilesState(t,s.FileState.Failed)},e.prototype.onProgress=function(e,t){var i=Math.round(100*e.loaded/e.total),n=new l.UploadProgressEvent(t,i<100?i:100);this.uploadProgressEvent.emit(n)},e.prototype.onChunkProgress=function(e){var t=this.chunkMap.get(e[0].uid),i=0;t&&(i=t.index===t.totalChunks-1?100:Math.round((t.index+1)/t.totalChunks*100));var n=new l.UploadProgressEvent(e,i<100?i:100);this.uploadProgressEvent.emit(n)},e.prototype.checkAllComplete=function(){!this.fileList.hasFileWithState([s.FileState.Uploading,s.FileState.Paused])&&this.areAllSelectedFilesHandled()?this.completeEvent.emit():this.shouldUploadNextFile()&&this.uploadFiles()},e.prototype.shouldUploadNextFile=function(){return!this.async.concurrent&&this.fileList.hasFileWithState([s.FileState.Selected])&&!this.fileList.hasFileWithState([s.FileState.Uploading])},e.prototype.areAllSelectedFilesHandled=function(){return 0===this.fileList.getFilesWithState(s.FileState.Selected).filter((function(e){return!e.validationErrors})).length},e.prototype.cloneRequestHeaders=function(e){var t={};return e&&e.keys().forEach((function(i){t[i]=e.get(i)})),new o.HttpHeaders(t)},e.prototype.populateRequestOptions=function(e){return{headers:e,reportProgress:!0,responseType:this.async.responseType,withCredentials:this.async.withCredentials}},e.prototype.populateUploadFormData=function(e,t){var i=this.async.saveField,n=new FormData;if(this.populateClientFormData(n,t),this.async.chunk)n.append(i,this.getNextChunk(e[0])),n.append("metadata",this.getChunkMetadata(e[0]));else for(var o=0,a=e;o<a.length;o++){var s=a[o];n.append(i,s.rawFile)}return n},e.prototype.populateRemoveFormData=function(e,t){var i=new FormData;this.populateClientFormData(i,t);for(var n=0,o=e;n<o.length;n++){var a=o[n];i.append(this.async.removeField,a)}return i},e.prototype.populateClientFormData=function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.append(i,t[i])},e.prototype.getNextChunk=function(e){var t=this.getChunkInfo(e),i=t.position+this.chunk.size;return e.rawFile.slice(t.position,i)},e.prototype.getChunkInfo=function(e){var t=this.chunkMap.get(e.uid);if(!t){var i=Math.ceil(e.size/this.chunk.size);t=this.chunkMap.add(e.uid,i)}return t},e.prototype.updateChunkInfo=function(e){var t=this.chunkMap.get(e);t.index<t.totalChunks-1&&(t.index+=1,t.position+=this.chunk.size,t.retries=0)},e.prototype.removeChunkInfo=function(e){this.chunkMap.remove(e)},e.prototype.getChunkMetadata=function(e){var t=this.chunkMap.get(e.uid),i={chunkIndex:t.index,contentType:e.rawFile.type,fileName:e.name,fileSize:e.size,fileUid:e.uid,totalChunks:t.totalChunks};return JSON.stringify(i)},e.prototype.isChunkUploadComplete=function(e){var t=this.chunkMap.get(e);return!!t&&t.index+1===t.totalChunks},e=n.__decorate([a.Injectable(),n.__metadata("design:paramtypes",[o.HttpClient])],e)}();t.UploadService=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(22);t.FileState=n.FileState},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),o=i(8),a=i(54);t.getTotalFilesSizeMessage=function(e){var t,i=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(i+=e[t].size);return(i/=1024)<1024?i.toFixed(2)+" KB":(i/1024).toFixed(2)+" MB"};var s=function(e){var t=e.match(/\.([^\.]+)$/);return t?t[0]:""};t.validateInitialFileInfo=function(e){return!!(e instanceof Object&&e.hasOwnProperty("name"))},t.validateInitialFileSelectFile=function(e){return!!(e instanceof File||t.validateInitialFileInfo(e))},t.getInitialFileInfo=function(e){return e.extension=e.extension||s(e.name),e.name=e.name,e.size=e.size||0,e.hasOwnProperty("state")||(e.state=n.FileState.Initial),e.hasOwnProperty("uid")||(e.uid=o.guid()),e},t.convertFileToFileInfo=function(e){var t=r(e);return t.uid=o.guid(),t.state=n.FileState.Selected,t};var r=function(e){var t=e.name,i=e.size;return{extension:s(t),name:t,rawFile:e,size:i,state:n.FileState.Selected}};t.getAllFileInfo=function(e){var t,i=new Array;for(t=0;t<e.length;t++)i.push(r(e[t]));return i},t.fileHasValidationErrors=function(e){return!!(e.validationErrors&&e.validationErrors.length>0)},t.filesHaveValidationErrors=function(e){for(var i=0,n=e;i<n.length;i++){var o=n[i];if(t.fileHasValidationErrors(o))return!0}return!1},t.inputFiles=function(e){return e.files?t.getAllFileInfo(e.files):e.value.split("|").map((function(e,t){var i,o,a=e.trim();return{extension:s(a),name:(i=a,o=i.lastIndexOf("\\"),-1!==o?i.substr(o+1):i),rawFile:null,size:1e3*(t+1),state:n.FileState.Selected}}))},t.assignGuidToFiles=function(e,t){var i=o.guid();return e.map((function(e){return e.uid=t?o.guid():i,e}))},t.supportsFormData=function(){return"undefined"!=typeof FormData},t.userAgent=function(){return navigator.userAgent};var l=/^(?:a|input|select|textarea|button|object)$/i;t.IGNORE_TARGET_CLASSES="k-icon k-select k-input k-multiselect-wrap",t.UPLOAD_CLASSES="k-upload-button k-clear-selected k-upload-selected k-upload-action";var u=function(e){return String(e).trim().split(" ")};t.hasClasses=function(e,t){var i=u(t);return Boolean(u(e.className).find((function(e){return i.indexOf(e)>=0})))},t.isFocusable=function(e,t){if(void 0===t&&(t=!0),e.tagName){var i=e.tagName.toLowerCase(),n=e.getAttribute("tabIndex"),o=null!==n&&!isNaN(n)&&n>-1;return(l.test(i)?!e.disabled:o)&&(!t||function(e){var t=e.getBoundingClientRect();return!(!t.width||!t.height)&&"hidden"!==window.getComputedStyle(e).visibility}(e))}return!1},t.getFileGroupCssClass=function(e){for(var t in a.fileGroupMap)if(a.fileGroupMap[t].indexOf(e)>=0)return"k-i-file-"+t;return"k-i-file"},t.isPresent=function(e){return null!=e}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(){function e(e){this.templateRef=e}return e=n.__decorate([o.Directive({selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}),n.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.FileInfoTemplateDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(3),s=i(8),r=function(){function e(e){this.uploadService=e,this.onActionButtonAction=new o.EventEmitter,this.onActionButtonFocus=new o.EventEmitter,this.onFileAction=new o.EventEmitter,this.onFileFocus=new o.EventEmitter,this.onTab=new o.EventEmitter,this.onWrapperFocus=new o.EventEmitter,this.onSelectButtonFocus=new o.EventEmitter,this.actionButtonsVisible=!1,this.focused=!1,this._focusedIndex=-1}return e.prototype.action=function(e){var t=e.keyCode;return this.keyBindings[t]},e.prototype.process=function(e){var t=this.action(e);t&&t(e.shiftKey)},e.prototype.computeKeys=function(e){var t,i=this;this.keyBindings=((t={})[s.Keys.Enter]=function(){return i.handleEnter()},t[s.Keys.Escape]=function(){return i.handleEscape()},t[s.Keys.Delete]=function(){return i.handleDelete()},t[s.Keys.Tab]=function(e){return i.handleTab(e)},t[s.Keys.ArrowUp]=function(){return i.handleUp()},t[s.Keys.ArrowDown]=function(){return i.handleDown()},t[this.invertKeys(e,s.Keys.ArrowLeft,s.Keys.ArrowRight)]=function(){return i.handleLeft()},t[this.invertKeys(e,s.Keys.ArrowRight,s.Keys.ArrowLeft)]=function(){return i.handleRight()},t)},e.prototype.invertKeys=function(e,t,i){return"rtl"===e?i:t},e.prototype.focusSelectButton=function(){this.focused=!0,this._focusedIndex=-1,this.onSelectButtonFocus.emit()},e.prototype.handleEnter=function(){if(this.lastIndex>=0){if(this.focusedIndex<=this.lastFileIndex)return void this.onFileAction.emit(s.Keys.Enter);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&this.onActionButtonAction.emit(this.focusedIndex<this.lastIndex?"clear":"upload")}},e.prototype.handleDelete=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Delete)},e.prototype.handleEscape=function(){this.focusedIndex>=0&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(s.Keys.Escape)},e.prototype.handleLeft=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex&&(this.focusedIndex-=1,this.onActionButtonFocus.emit("clear"))},e.prototype.handleRight=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex-1&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("upload"))},e.prototype.handleTab=function(e){this.focusedIndex>=0&&e?this.focusedIndex=-1:this.onTab.emit()},e.prototype.handleDown=function(){if(this.lastIndex>=0&&this.focusedIndex<this.lastIndex){if(this.focusedIndex<this.lastFileIndex)return this.focusedIndex+=1,void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex===this.lastFileIndex&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("clear"))}},e.prototype.handleUp=function(){if(this.lastIndex>=0&&this.focusedIndex>-1){if(this.focusedIndex-=1,-1===this.focusedIndex)return void this.onSelectButtonFocus.emit();if(this.focusedIndex<=this.lastFileIndex)return void this.onFileFocus.emit(this.focusedIndex);this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&(this.focusedIndex=this.lastFileIndex,this.onFileFocus.emit(this.focusedIndex))}},Object.defineProperty(e.prototype,"focusedIndex",{get:function(){return this._focusedIndex},set:function(e){this.focused||this.onWrapperFocus.emit(),this._focusedIndex=e,this.focused=!0,this._focusedIndex>=0&&this._focusedIndex<=this.lastFileIndex&&this.onFileFocus.emit(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastFileIndex",{get:function(){return this.actionButtonsVisible?this.lastIndex-2:this.lastIndex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastIndex",{get:function(){var e=this.uploadService.files.count;return this.actionButtonsVisible?e+1:e-1},enumerable:!0,configurable:!0}),e=n.__decorate([o.Injectable(),n.__metadata("design:paramtypes",[a.UploadService])],e)}();t.NavigationService=r},function(e,t){e.exports=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.prevented=!1}return e.prototype.preventDefault=function(){this.prevented=!0},e.prototype.isDefaultPrevented=function(){return this.prevented},e}();t.PreventableEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(){function e(e){this.templateRef=e}return e=n.__decorate([o.Directive({selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}),n.__metadata("design:paramtypes",[o.TemplateRef])],e)}();t.FileTemplateDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a={},s=function(){function e(){}return e.prototype.addComponent=function(e,t){this.has(t)?a[t].push(e):a[t]=[e]},e.prototype.getComponents=function(e){return a[e]},e.prototype.has=function(e){return e in a},e=n.__decorate([o.Injectable()],e)}();t.DropZoneService=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INVALIDMAXFILESIZE="invalidMaxFileSize",t.INVALIDMINFILESIZE="invalidMinFileSize",t.INVALIDFILEEXTENSION="invalidFileExtension";var n=function(e,i){i.length>0&&i.indexOf(e.extension.toLowerCase())<0&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(t.INVALIDFILEEXTENSION)<0&&e.validationErrors.push(t.INVALIDFILEEXTENSION))},o=function(e,i,n){0!==i&&e.size<i&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(t.INVALIDMINFILESIZE)<0&&e.validationErrors.push(t.INVALIDMINFILESIZE)),0!==n&&e.size>n&&(e.validationErrors=e.validationErrors||[],e.validationErrors.indexOf(t.INVALIDMAXFILESIZE)<0&&e.validationErrors.push(t.INVALIDMAXFILESIZE))};t.validateFiles=function(e,t){var i,a=t.allowedExtensions.map((function(e){return("."===e.substring(0,1)?e:"."+e).toLowerCase()})),s=t.maxFileSize,r=t.minFileSize;for(i=0;i<e.length;i++)n(e[i],a),o(e[i],r,s)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(21),a=i(1),s=i(16),r=i(8),l=i(2),u=i(17),d=i(18),p=i(19),c=i(20),f=i(4),h=i(7),m=i(10),v=i(3),g=i(5),_=i(11),y=i(6);t.UPLOAD_VALUE_ACCESSOR={multi:!0,provide:s.NG_VALUE_ACCESSOR,useExisting:a.forwardRef((function(){return b}))};var b=function(){function e(e,t,i,n,o,s,l,u){var d=this;this.uploadService=e,this.localization=t,this.navigation=i,this.dropZoneService=n,this._ngZone=o,this.renderer=s,this.cdr=l,this.chunkable=!1,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+r.guid(),this.actionsLayout="end",this.onBlur=new a.EventEmitter,this.cancel=new a.EventEmitter,this.clear=new a.EventEmitter,this.complete=new a.EventEmitter,this.error=new a.EventEmitter,this.onFocus=new a.EventEmitter,this.pause=new a.EventEmitter,this.remove=new a.EventEmitter,this.resume=new a.EventEmitter,this.select=new a.EventEmitter,this.success=new a.EventEmitter,this.upload=new a.EventEmitter,this.uploadProgress=new a.EventEmitter,this.valueChange=new a.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},p.validatePackage(c.packageMetadata),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe((function(e){var t=e.rtl;d.direction=t?"rtl":"ltr",d.navigation.computeKeys(d.direction)})),this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.wrapper=u.nativeElement,this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers()}var i;return i=e,Object.defineProperty(e.prototype,"autoUpload",{get:function(){return this.uploadService.async.autoUpload},set:function(e){this.uploadService.async.autoUpload=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batch",{get:function(){return this.uploadService.async.batch},set:function(e){this.uploadService.async.batch=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withCredentials",{get:function(){return this.uploadService.async.withCredentials},set:function(e){this.uploadService.async.withCredentials=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveField",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveHeaders",{get:function(){return this.uploadService.async.saveHeaders},set:function(e){this.uploadService.async.saveHeaders=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveMethod",{get:function(){return this.uploadService.async.saveMethod},set:function(e){this.uploadService.async.saveMethod=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"saveUrl",{get:function(){return this.uploadService.async.saveUrl},set:function(e){this.uploadService.async.saveUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"responseType",{get:function(){return this.uploadService.async.responseType},set:function(e){this.uploadService.async.responseType=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeField",{get:function(){return this.uploadService.async.removeField},set:function(e){this.uploadService.async.removeField=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeHeaders",{get:function(){return this.uploadService.async.removeHeaders},set:function(e){this.uploadService.async.removeHeaders=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeMethod",{get:function(){return this.uploadService.async.removeMethod},set:function(e){this.uploadService.async.removeMethod=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removeUrl",{get:function(){return this.uploadService.async.removeUrl},set:function(e){this.uploadService.async.removeUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"concurrent",{get:function(){return this.uploadService.async.concurrent},set:function(e){this.uploadService.async.concurrent=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabIndex",{get:function(){return this.tabindex},set:function(e){this.tabindex=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){var t=Object.assign({},this._restrictions,e);this._restrictions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.verifySettings(),this.renderer.removeAttribute(this.wrapper,"tabindex"),this.uploadService.setChunkSettings(this.chunkable),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},e.prototype.ngOnChanges=function(e){if(r.isChanged("chunkable",e)){var t=e.chunkable.currentValue;"boolean"==typeof t&&(this.uploadService.async.chunk=t),"object"==typeof t&&null!==t&&(this.uploadService.async.chunk=!0,this.uploadService.chunk=Object.assign({},this.uploadService.chunk,t))}},e.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},e.prototype.handleKeydown=function(e){if(!this.disabled)return e.keyCode!==r.Keys.Enter&&e.keyCode!==r.Keys.Space||e.target!==this.fileSelectButton.nativeElement?void((g.hasClasses(e.target,g.UPLOAD_CLASSES)||!g.isFocusable(e.target)&&!g.hasClasses(e.target,g.IGNORE_TARGET_CLASSES))&&this.navigation.process(e)):(e.preventDefault(),void this.fileSelect.nativeElement.click())},e.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach((function(e){g.validateInitialFileInfo(e)||(t=!1)})),t&&this.uploadService.addInitialFiles(e)),null===e&&this.fileList.clear(),this.cdr.markForCheck()},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e.prototype.setDisabledState=function(e){this.disabled=e},Object.defineProperty(e.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabIndex},enumerable:!0,configurable:!0}),e.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-state-focused"),this.navigation.focused||(this.navigation.focusedIndex=-1)},e.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-state-focused")},Object.defineProperty(e.prototype,"showActionButtons",{get:function(){var e=!1;if(!this.autoUpload){var t=this.fileList.filesToUpload.length>0,i=this.fileList.hasFileWithState([f.FileState.Uploading]);this.concurrent&&t&&(e=!0),this.concurrent||!t||i||(e=!0)}return this.navigation.actionButtonsVisible=e,e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showTotalStatus",{get:function(){var e=[f.FileState.Uploaded,f.FileState.Uploading,f.FileState.Failed,f.FileState.Paused];return!!this.fileList.hasFileWithState(e)},enumerable:!0,configurable:!0}),e.prototype.textFor=function(e){return this.localization.get(e)},e.prototype.focus=function(){var e=this;setTimeout((function(){e.fileSelectButton.nativeElement.focus()}))},e.prototype.focusComponent=function(){this.focus()},e.prototype.blur=function(){this.navigation.focused&&(this.navigation.focused=!1,document.activeElement.blur(),this.onBlur.emit())},e.prototype.blurComponent=function(){this.blur()},e.prototype.pauseFileByUid=function(e){this.uploadService.pauseFile(e)},e.prototype.resumeFileByUid=function(e){this.uploadService.resumeFile(e)},e.prototype.removeFilesByUid=function(e){this.uploadService.removeFiles(e)},e.prototype.retryUploadByUid=function(e){this.uploadService.retryFiles(e)},e.prototype.cancelUploadByUid=function(e){this.uploadService.cancelFiles(e)},e.prototype.uploadFiles=function(){this.fileList.filesToUpload.length&&this.uploadService.uploadFiles()},e.prototype.clearFiles=function(){this.uploadService.clearFiles()},e.prototype.addFiles=function(e){this.uploadService.addFiles(e)},e.prototype.isEmpty=function(){return!1},e.prototype.verifySettings=function(){if(a.isDevMode()&&this.batch&&!1!==this.chunkable)throw new Error("The file chunking functionality requires the batch setting to be disabled.")},e.prototype.subscribeBlur=function(){var e=this;r.isDocumentAvailable()&&this._ngZone.runOutsideAngular((function(){e.documentClick=u.fromEvent(document,"click").pipe(d.filter((function(t){return!(e.wrapper!==t.target&&e.wrapper.contains(t.target))}))),e.blurSubscription=u.merge(e.documentClick,e.navigation.onTab).subscribe((function(){e.navigation.focused&&e._ngZone.run((function(){e.navigation.focused=!1,e.onTouchedCallback(),e.onBlur.emit()}))}))}))},e.prototype.subscribeFocus=function(){var e=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){e.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){e.fileSelectButton.nativeElement.focus()}))},e.prototype.attachEventHandlers=function(){var e=this;this.subs=this.uploadService.cancelEvent.subscribe((function(t){e.cancel.emit(t)})),this.subs.add(this.uploadService.changeEvent.subscribe((function(t){e.onChangeCallback(t),e.valueChange.emit(t)}))),this.subs.add(this.uploadService.clearEvent.subscribe((function(t){e.clear.emit(t)}))),this.subs.add(this.uploadService.completeEvent.subscribe((function(){e.complete.emit()}))),this.subs.add(this.uploadService.errorEvent.subscribe((function(t){e.error.emit(t)}))),this.subs.add(this.uploadService.pauseEvent.subscribe((function(t){e.pause.emit(t)}))),this.subs.add(this.uploadService.removeEvent.subscribe((function(t){e.remove.emit(t)}))),this.subs.add(this.uploadService.resumeEvent.subscribe((function(t){e.resume.emit(t)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(t){e.select.emit(t)}))),this.subs.add(this.uploadService.successEvent.subscribe((function(t){e.success.emit(t)}))),this.subs.add(this.uploadService.uploadEvent.subscribe((function(t){e.upload.emit(t)}))),this.subs.add(this.uploadService.uploadProgressEvent.subscribe((function(t){e.uploadProgress.emit(t)})))},n.__decorate([a.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"autoUpload",null),n.__decorate([a.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"batch",null),n.__decorate([a.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"withCredentials",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"saveField",null),n.__decorate([a.Input(),n.__metadata("design:type",o.HttpHeaders),n.__metadata("design:paramtypes",[o.HttpHeaders])],e.prototype,"saveHeaders",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"saveMethod",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"saveUrl",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"responseType",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"removeField",null),n.__decorate([a.Input(),n.__metadata("design:type",o.HttpHeaders),n.__metadata("design:paramtypes",[o.HttpHeaders])],e.prototype,"removeHeaders",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"removeMethod",null),n.__decorate([a.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"removeUrl",null),n.__decorate([a.Input(),n.__metadata("design:type",Object)],e.prototype,"chunkable",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],e.prototype,"concurrent",null),n.__decorate([a.Input(),n.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Boolean)],e.prototype,"showFileList",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Number)],e.prototype,"tabindex",void 0),n.__decorate([a.Input(),n.__metadata("design:type",String)],e.prototype,"zoneId",void 0),n.__decorate([a.Input("tabIndex"),n.__metadata("design:type",Number),n.__metadata("design:paramtypes",[Number])],e.prototype,"tabIndex",null),n.__decorate([a.Input(),n.__metadata("design:type",String)],e.prototype,"accept",void 0),n.__decorate([a.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],e.prototype,"restrictions",null),n.__decorate([a.Input(),n.__metadata("design:type",String)],e.prototype,"focusableId",void 0),n.__decorate([a.Input(),n.__metadata("design:type",String)],e.prototype,"actionsLayout",void 0),n.__decorate([a.ContentChild(m.FileTemplateDirective,{static:!1}),n.__metadata("design:type",m.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),n.__decorate([a.ContentChild(y.FileInfoTemplateDirective,{static:!1}),n.__metadata("design:type",y.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),n.__decorate([a.ViewChild("fileSelect",{static:!0}),n.__metadata("design:type",a.ElementRef)],e.prototype,"fileSelect",void 0),n.__decorate([a.ViewChild("fileSelectButton",{static:!0}),n.__metadata("design:type",a.ElementRef)],e.prototype,"fileSelectButton",void 0),n.__decorate([a.Output("blur"),n.__metadata("design:type",a.EventEmitter)],e.prototype,"onBlur",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"cancel",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"clear",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"complete",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"error",void 0),n.__decorate([a.Output("focus"),n.__metadata("design:type",a.EventEmitter)],e.prototype,"onFocus",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"pause",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"remove",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"resume",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"select",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"success",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"upload",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"uploadProgress",void 0),n.__decorate([a.Output(),n.__metadata("design:type",a.EventEmitter)],e.prototype,"valueChange",void 0),n.__decorate([a.HostBinding("class.k-widget"),a.HostBinding("class.k-upload"),n.__metadata("design:type",Boolean)],e.prototype,"hostDefaultClasses",void 0),n.__decorate([a.HostBinding("class.k-state-disabled"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"hostDisabledClass",null),n.__decorate([a.HostBinding("attr.dir"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"dir",null),n.__decorate([a.HostListener("keydown",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),e=i=n.__decorate([a.Component({exportAs:"kendoUpload",providers:[l.LocalizationService,h.NavigationService,v.UploadService,_.DropZoneService,t.UPLOAD_VALUE_ACCESSOR,{provide:l.L10N_PREFIX,useValue:"kendo.upload"},{provide:r.KendoInput,useExisting:a.forwardRef((function(){return i}))}],selector:"kendo-upload",template:'\n <ng-container kendoUploadLocalizedMessages\n i18n-cancel="kendo.upload.cancel|The text for the Cancel button"\n cancel="Cancel"\n\n i18n-clearSelectedFiles="kendo.upload.clearSelectedFiles|The text for the Clear button"\n clearSelectedFiles="Clear"\n\n i18n-dropFilesHere="kendo.upload.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to upload"\n\n i18n-filesBatchStatus="kendo.upload.filesBatchStatus|The status message for a batch of files"\n filesBatchStatus="files"\n\n i18n-filesBatchStatusFailed="kendo.upload.filesBatchStatusFailed|The status message for a batch of files after failed upload"\n filesBatchStatusFailed="files failed to upload."\n\n i18n-filesBatchStatusUploaded="kendo.upload.filesBatchStatusUploaded|The status message for a batch of files after successful upload"\n filesBatchStatusUploaded="files successfully uploaded."\n\n i18n-fileStatusFailed="kendo.upload.fileStatusFailed|The file status message after failed upload"\n fileStatusFailed="File failed to upload."\n\n i18n-fileStatusUploaded="kendo.upload.fileStatusUploaded|The file status message after successful upload"\n fileStatusUploaded="File successfully uploaded."\n\n i18n-headerStatusPaused="kendo.upload.headerStatusPaused|The header status message when the file upload is paused"\n headerStatusPaused="Paused"\n\n i18n-headerStatusUploaded="kendo.upload.headerStatusUploaded|The header status message after file upload completion"\n headerStatusUploaded="Done"\n\n i18n-headerStatusUploading="kendo.upload.headerStatusUploading|The header status message during file upload"\n headerStatusUploading="Uploading..."\n\n i18n-invalidFileExtension="kendo.upload.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.upload.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.upload.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-pause="kendo.upload.pause|The text for the Pause button"\n pause="Pause"\n\n i18n-remove="kendo.upload.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-resume="kendo.upload.resume|The text for the Resume button"\n resume="Resume"\n\n i18n-retry="kendo.upload.retry|The text for the Retry button"\n retry="Retry"\n\n i18n-select="kendo.upload.select|The text for the Select button"\n select="Select files..."\n\n i18n-uploadSelectedFiles="kendo.upload.uploadSelectedFiles|The text for the Upload files button"\n uploadSelectedFiles="Upload"\n >\n </ng-container>\n <div kendoUploadInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [attr.aria-hidden]="true"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <kendo-upload-status-total *ngIf="showTotalStatus"\n class="k-upload-status k-upload-status-total"\n [fileList]="fileList">\n </kendo-upload-status-total>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list *ngIf="showFileList && fileList.count > 0"\n class="k-upload-files k-reset"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n <kendo-upload-action-buttons\n *ngIf="showActionButtons"\n [disabled]="disabled"\n [actionsLayout]="actionsLayout">\n </kendo-upload-action-buttons>\n '}),n.__metadata("design:paramtypes",[v.UploadService,l.LocalizationService,h.NavigationService,_.DropZoneService,a.NgZone,a.Renderer2,a.ChangeDetectorRef,a.ElementRef])],e)}();t.UploadComponent=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(15),s=i(25),r=[a.FileSelectComponent],l=function(){function e(){}return e=n.__decorate([o.NgModule({declarations:[r],exports:[s.PUBLIC_DIRECTIVES,r],imports:[s.SharedModule]})],e)}();t.FileSelectModule=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(16),s=i(2),r=i(8),l=i(17),u=i(18),d=i(19),p=i(20),c=i(3),f=i(7),h=i(5),m=i(10),v=i(22),g=i(11),_=i(6);t.FILESELECT_VALUE_ACCESSOR={multi:!0,provide:a.NG_VALUE_ACCESSOR,useExisting:o.forwardRef((function(){return y}))};var y=function(){function e(e,t,i,n,a,s,l,u){var c=this;this.uploadService=e,this.localization=t,this.navigation=i,this.dropZoneService=n,this.ngZone=a,this.renderer=s,this.cdr=l,this.disabled=!1,this.multiple=!0,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+r.guid(),this.onBlur=new o.EventEmitter,this.onFocus=new o.EventEmitter,this.select=new o.EventEmitter,this.remove=new o.EventEmitter,this.valueChange=new o.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},d.validatePackage(p.packageMetadata),this.wrapper=u.nativeElement,this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe((function(e){var t=e.rtl;c.direction=t?"rtl":"ltr",c.navigation.computeKeys(c.direction)})),this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers(),this.setDefaultSettings()}var i;return i=e,Object.defineProperty(e.prototype,"name",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){var t=Object.assign({},this._restrictions,e);this._restrictions=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dir",{get:function(){return this.direction},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.wrapper,"tabindex"),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},e.prototype.textFor=function(e){return this.localization.get(e)},e.prototype.focus=function(){var e=this;setTimeout((function(){e.fileSelectButton.nativeElement.focus()}))},e.prototype.ngOnDestroy=function(){this.fileList.clear(),this.blurSubscription&&this.blurSubscription.unsubscribe(),this.wrapperFocusSubscription&&this.wrapperFocusSubscription.unsubscribe(),this.selectButtonFocusSubscription&&this.selectButtonFocusSubscription.unsubscribe(),this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe(),this.subs&&this.subs.unsubscribe()},e.prototype.handleKeydown=function(e){if(!this.disabled)return e.keyCode!==r.Keys.Enter&&e.keyCode!==r.Keys.Space||e.target!==this.fileSelectButton.nativeElement?void((h.hasClasses(e.target,h.UPLOAD_CLASSES)||!h.isFocusable(e.target)&&!h.hasClasses(e.target,h.IGNORE_TARGET_CLASSES))&&this.navigation.process(e)):(e.preventDefault(),void this.fileSelect.nativeElement.click())},e.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach((function(e){h.validateInitialFileSelectFile(e)||(t=!1)})),t&&this.uploadService.addInitialFileSelectFiles(e)),null===e&&this.fileList.clear(),this.cdr.markForCheck()},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.removeFileByUid=function(e){this.uploadService.removeFiles(e)},e.prototype.clearFiles=function(){this.uploadService.clearFiles()},e.prototype.isEmpty=function(){return!1},e.prototype.addFiles=function(e){this.uploadService.addFiles(e)},Object.defineProperty(e.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabindex},enumerable:!0,configurable:!0}),e.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-state-focused"),this.navigation.focused||(this.navigation.focusedIndex=-1)},e.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-state-focused")},e.prototype.subscribeBlur=function(){var e=this;r.isDocumentAvailable()&&this.ngZone.runOutsideAngular((function(){e.documentClick=l.fromEvent(document,"click").pipe(u.filter((function(t){return!(e.wrapper!==t.target&&e.wrapper.contains(t.target))}))),e.blurSubscription=l.merge(e.documentClick,e.navigation.onTab).subscribe((function(){e.navigation.focused&&e.ngZone.run((function(){e.navigation.focused=!1,e.onTouchedCallback(),e.onBlur.emit()}))}))}))},e.prototype.subscribeFocus=function(){var e=this;this.wrapperFocusSubscription=this.navigation.onWrapperFocus.subscribe((function(){e.onFocus.emit()})),this.selectButtonFocusSubscription=this.navigation.onSelectButtonFocus.subscribe((function(){e.fileSelectButton.nativeElement.focus()}))},e.prototype.attachEventHandlers=function(){var e=this;this.subs=this.uploadService.changeEvent.subscribe((function(t){var i=[];null!==t&&t.forEach((function(e){e.state===v.FileState.Initial&&i.push(e),e.state===v.FileState.Selected&&e.rawFile&&!e.validationErrors&&i.push(e.rawFile)})),0===i.length&&(i=null),e.onChangeCallback(i),e.valueChange.emit(i)})),this.subs.add(this.uploadService.removeEvent.subscribe((function(t){e.remove.emit(t)}))),this.subs.add(this.uploadService.selectEvent.subscribe((function(t){e.select.emit(t)})))},e.prototype.setDefaultSettings=function(){this.uploadService.async.autoUpload=!1,this.uploadService.component="FileSelect"},n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"accept",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[String])],e.prototype,"name",null),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"showFileList",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],e.prototype,"tabindex",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],e.prototype,"restrictions",null),n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"zoneId",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"focusableId",void 0),n.__decorate([o.ContentChild(m.FileTemplateDirective,{static:!1}),n.__metadata("design:type",m.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),n.__decorate([o.ContentChild(_.FileInfoTemplateDirective,{static:!1}),n.__metadata("design:type",_.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),n.__decorate([o.ViewChild("fileSelect",{static:!0}),n.__metadata("design:type",o.ElementRef)],e.prototype,"fileSelect",void 0),n.__decorate([o.ViewChild("fileSelectButton",{static:!0}),n.__metadata("design:type",o.ElementRef)],e.prototype,"fileSelectButton",void 0),n.__decorate([o.Output("blur"),n.__metadata("design:type",o.EventEmitter)],e.prototype,"onBlur",void 0),n.__decorate([o.Output("focus"),n.__metadata("design:type",o.EventEmitter)],e.prototype,"onFocus",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],e.prototype,"select",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],e.prototype,"remove",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],e.prototype,"valueChange",void 0),n.__decorate([o.HostBinding("class.k-widget"),o.HostBinding("class.k-upload"),n.__metadata("design:type",Boolean)],e.prototype,"hostDefaultClasses",void 0),n.__decorate([o.HostBinding("class.k-state-disabled"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"hostDisabledClass",null),n.__decorate([o.HostBinding("attr.dir"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"dir",null),n.__decorate([o.HostListener("keydown",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"handleKeydown",null),e=i=n.__decorate([o.Component({exportAs:"kendoFileSelect",providers:[s.LocalizationService,f.NavigationService,c.UploadService,g.DropZoneService,t.FILESELECT_VALUE_ACCESSOR,{provide:s.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:r.KendoInput,useExisting:o.forwardRef((function(){return i}))}],selector:"kendo-fileselect",template:'\n <ng-container kendoFileSelectLocalizedMessages\n i18n-dropFilesHere="kendo.fileselect.dropFilesHere|The drop zone hint"\n dropFilesHere="Drop files here to select"\n\n i18n-invalidFileExtension="kendo.fileselect.invalidFileExtension|The text for the invalid allowed extensions restriction message"\n invalidFileExtension="File type not allowed."\n\n i18n-invalidMaxFileSize="kendo.fileselect.invalidMaxFileSize|The text for the invalid max file size restriction message"\n invalidMaxFileSize="File size too large."\n\n i18n-invalidMinFileSize="kendo.fileselect.invalidMinFileSize|The text for the invalid min file size restriction message"\n invalidMinFileSize="File size too small."\n\n i18n-remove="kendo.fileselect.remove|The text for the Remove button"\n remove="Remove"\n\n i18n-select="kendo.fileselect.select|The text for the Select button"\n select="Select files..."\n >\n </ng-container>\n <div kendoFileSelectInternalDropZone\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled">\n <div role="button" #fileSelectButton\n [id]="focusableId"\n [attr.aria-label]="textFor(\'select\')"\n [attr.tabindex]="selectButtonTabIndex"\n (focus)="onFileSelectButtonFocus($event)"\n (blur)="onFileSelectButtonBlur($event)"\n class="k-button k-upload-button">\n <input #fileSelect kendoFileSelect\n [attr.accept]="accept ? accept : null"\n [dir]="direction"\n [restrictions]="restrictions"\n [multiple]="multiple"\n [disabled]="disabled" />\n <span>{{textFor(\'select\')}}</span>\n </div>\n <div class="k-dropzone-hint">{{textFor(\'dropFilesHere\')}}</div>\n </div>\n <ul kendo-upload-file-list\n class="k-upload-files k-reset"\n *ngIf="showFileList && fileList.count > 0"\n [disabled]="disabled"\n [fileList]="fileList.files"\n [fileTemplate]="fileTemplate"\n [fileInfoTemplate]="fileInfoTemplate">\n </ul>\n '}),n.__metadata("design:paramtypes",[c.UploadService,s.LocalizationService,f.NavigationService,g.DropZoneService,o.NgZone,o.Renderer2,o.ChangeDetectorRef,o.ElementRef])],e)}();t.FileSelectComponent=y},function(e,t){e.exports=o},function(e,t){e.exports=a},function(e,t){e.exports=s},function(e,t){e.exports=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-upload",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1635413785,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Failed=0]="Failed",e[e.Initial=1]="Initial",e[e.Selected=2]="Selected",e[e.Uploaded=3]="Uploaded",e[e.Uploading=4]="Uploading",e[e.Paused=5]="Paused"}(t.FileState||(t.FileState={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),o=function(){function e(){this._files={}}return e.prototype.add=function(e){var t=e.uid;this.has(t)?e.validationErrors&&e.validationErrors.length>0?this._files[t].unshift(e):this._files[t].push(e):this._files[t]=[e]},e.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},e.prototype.clear=function(){var e=this._files;for(var t in e)if(e.hasOwnProperty(t)){for(var i=0,n=e[t];i<n.length;i++){var o=n[i];o.httpSubscription&&o.httpSubscription.unsubscribe()}e[t]=null,delete e[t]}},e.prototype.has=function(e){return e in this._files},e.prototype.get=function(e){return this._files[e]},e.prototype.setFilesState=function(e,t){for(var i=0,n=e;i<n.length;i++){var o=n[i];this.setFilesStateByUid(o.uid,t)}},e.prototype.setFilesStateByUid=function(e,t){this.get(e).forEach((function(e){e.state=t}))},Object.defineProperty(e.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"files",{get:function(){var e=this._files,t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(e[i]);return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filesFlat",{get:function(){var e=this._files,t=[];for(var i in e){if(e.hasOwnProperty(i))e[i].forEach((function(e){t.push(e)}))}return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filesToUpload",{get:function(){var e=this._files,t=[];for(var i in e)if(e.hasOwnProperty(i)){for(var o=e[i],a=!0,s=0,r=o;s<r.length;s++){var l=r[s];(l.state!==n.FileState.Selected||l.validationErrors&&l.validationErrors.length>0)&&(a=!1)}a&&t.push(o)}return t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstFileToUpload",{get:function(){var e=this._files;for(var t in e)if(e.hasOwnProperty(t)){for(var i=e[t],o=!0,a=0,s=i;a<s.length;a++){var r=s[a];(r.state!==n.FileState.Selected||r.validationErrors&&r.validationErrors.length>0)&&(o=!1)}if(o)return i}return null},enumerable:!0,configurable:!0}),e.prototype.getFilesWithState=function(e){return this.filesFlat.filter((function(t){return t.state===e}))},e.prototype.hasFileWithState=function(e){var t=this._files;for(var i in t)if(t.hasOwnProperty(i))for(var n=0,o=t[i];n<o.length;n++){var a=o[n];if(e.indexOf(a.state)>=0)return!0}return!1},e}();t.FileMap=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(44);t.CancelEvent=n.CancelEvent;var o=i(45);t.ClearEvent=o.ClearEvent;var a=i(46);t.ErrorEvent=a.ErrorEvent;var s=i(47);t.PauseEvent=s.PauseEvent;var r=i(48);t.RemoveEvent=r.RemoveEvent;var l=i(49);t.ResumeEvent=l.ResumeEvent;var u=i(50);t.SelectEvent=u.SelectEvent;var d=i(51);t.SuccessEvent=d.SuccessEvent;var p=i(52);t.UploadEvent=p.UploadEvent;var c=i(53);t.UploadProgressEvent=c.UploadProgressEvent},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(6),a=i(1),s=i(56),r=i(26),l=i(57),u=i(29),d=i(30),p=i(31),c=i(32),f=i(35),h=i(36),m=i(10),v=i(58),g=i(37),_=i(38),y=i(39);t.SHARED_DECLARATIONS=[l.DropZoneInternalDirective,u.FileListComponent,d.FileListItemDirective,p.FileListItemActionButtonComponent,c.FileListMultipleItemsComponent,f.FileListSingleItemComponent,h.FileSelectDirective,v.LocalizedMessagesDirective,g.TemplateContextDirective],t.PUBLIC_DIRECTIVES=[m.FileTemplateDirective,o.FileInfoTemplateDirective,r.CustomMessagesComponent,_.UploadDropZoneDirective,y.UploadDropZoneComponent];var b=function(){function e(){}return e=n.__decorate([a.NgModule({declarations:[t.PUBLIC_DIRECTIVES,t.SHARED_DECLARATIONS],exports:[t.PUBLIC_DIRECTIVES,t.SHARED_DECLARATIONS,s.CommonModule],imports:[s.CommonModule]})],e)}();t.SharedModule=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(27),s=i(2),r=function(e){function t(t){var i=e.call(this)||this;return i.service=t,i}var i;return n.__extends(t,e),i=t,Object.defineProperty(t.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),t=i=n.__decorate([o.Component({providers:[{provide:a.Messages,useExisting:o.forwardRef((function(){return i}))}],selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",template:""}),n.__metadata("design:paramtypes",[s.LocalizationService])],t)}(a.Messages);t.CustomMessagesComponent=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"cancel",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"clearSelectedFiles",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"dropFilesHere",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"externalDropFilesHere",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"filesBatchStatus",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"filesBatchStatusFailed",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"filesBatchStatusUploaded",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"fileStatusFailed",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"fileStatusUploaded",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"headerStatusPaused",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"headerStatusUploaded",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"headerStatusUploading",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"invalidFileExtension",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"invalidMaxFileSize",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"invalidMinFileSize",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"pause",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"remove",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"resume",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"retry",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"select",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"uploadSelectedFiles",void 0),t}(i(2).ComponentMessages);t.Messages=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(){function e(e,t,i){this.element=e,this.renderer=t,this.hideIntervalElement=null,this.hoverClass=i}return e.prototype.onElementDragEnterListener=function(){var e=this;return this.addClass(this.hoverClass),this.lastDragElement=new Date,this.hideIntervalElement||(this.hideIntervalElement=setInterval((function(){e.calculateTimeDiff(e.lastDragElement)<100||(e.removeClass(e.hoverClass),clearInterval(e.hideIntervalElement),e.hideIntervalElement=null)}),100)),!1},e.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},e.prototype.calculateTimeDiff=function(e){return(new Date).getTime()-e.getTime()},e.prototype.addClass=function(e){this.renderer.addClass(this.element.nativeElement,e)},e.prototype.removeClass=function(e){this.renderer.removeClass(this.element.nativeElement,e)},n.__decorate([o.HostListener("dragenter"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Boolean)],e.prototype,"onElementDragEnterListener",null),n.__decorate([o.HostListener("dragover"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Boolean)],e.prototype,"onElementDragOverListener",null),e}();t.DropZoneBase=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(8),s=i(4),r=i(10),l=i(30),u=i(7),d=i(3),p=i(6),c=function(){function e(e,t){this.uploadService=e,this.navigation=t,this.onItemFocus(),this.onItemAction()}return e.prototype.onItemFocus=function(){var e=this;this.focusSubscription=this.navigation.onFileFocus.subscribe((function(t){e.fileListItems.toArray()[t].focus()}))},e.prototype.onItemAction=function(){var e=this;this.actionSubscription=this.navigation.onFileAction.subscribe((function(t){e.itemActionHandler(t)}))},e.prototype.itemActionHandler=function(e){var t=this.navigation.focusedIndex,i=this.fileListItems.toArray()[t],n=i.uidAttribute,o=this.uploadService.files.get(n);if(e===a.Keys.Escape&&o[0].state===s.FileState.Uploading)return this.uploadService.cancelFiles(n),void this.navigation.focusSelectButton();e!==a.Keys.Enter||o[0].state!==s.FileState.Failed?e===a.Keys.Delete&&(o[0].state===s.FileState.Uploading?this.uploadService.cancelFiles(n):this.hasDelete(i)&&this.uploadService.removeFiles(n),this.navigation.focusSelectButton()):this.uploadService.retryFiles(n)},e.prototype.hasDelete=function(e){return e.element.nativeElement.getElementsByClassName("k-delete").length>0},e.prototype.ngOnDestroy=function(){this.focusSubscription.unsubscribe(),this.actionSubscription.unsubscribe()},n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Array)],e.prototype,"fileList",void 0),n.__decorate([o.Input(),n.__metadata("design:type",r.FileTemplateDirective)],e.prototype,"fileTemplate",void 0),n.__decorate([o.Input(),n.__metadata("design:type",p.FileInfoTemplateDirective)],e.prototype,"fileInfoTemplate",void 0),n.__decorate([o.ViewChildren(l.FileListItemDirective),n.__metadata("design:type",o.QueryList)],e.prototype,"fileListItems",void 0),e=n.__decorate([o.Component({selector:"[kendo-upload-file-list]",template:"\n <ng-template ngFor\n [ngForOf]=\"fileList\"\n let-files\n let-index=\"index\">\n <li kendoUploadFileListItem [files]='files' [index]='index'>\n <kendo-upload-file-list-single-item\n class='k-file-single'\n *ngIf='files.length === 1 && !fileTemplate'\n [disabled]='disabled'\n [file]='files[0]'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-single-item>\n <kendo-upload-file-list-multiple-items\n class='k-file-multiple'\n *ngIf='files.length > 1 && !fileTemplate'\n [disabled]='disabled'\n [files]='files'\n [fileInfoTemplate]=\"fileInfoTemplate\">\n </kendo-upload-file-list-multiple-items>\n <ng-template *ngIf=\"fileTemplate\"\n [templateContext]=\"{\n templateRef: fileTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }\"></ng-template>\n </li>\n </ng-template>\n "}),n.__metadata("design:paramtypes",[d.UploadService,u.NavigationService])],e)}();t.FileListComponent=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(4),s=i(7),r=i(5),l=i(3),u=function(){function e(e,t,i){this.navigationService=t,this.uploadService=i,this.fileClass=!0,this.focused=!1,this.element=e}return e.prototype.focus=function(){this.element.nativeElement.focus()},Object.defineProperty(e.prototype,"uidAttribute",{get:function(){return this.files[0].uid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tabIndex",{get:function(){return"-1"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kFileError",{get:function(){return this.files[0].state===a.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kFileInvalid",{get:function(){return r.filesHaveValidationErrors(this.files)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kFileProgress",{get:function(){return this.files[0].state===a.FileState.Uploading||this.files[0].state===a.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kFileSuccess",{get:function(){return"Upload"===this.uploadService.component&&(this.files[0].state===a.FileState.Uploaded||this.files[0].state===a.FileState.Initial)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"kStateFocused",{get:function(){return this.focused},enumerable:!0,configurable:!0}),e.prototype.onFocus=function(){this.focused=!0},e.prototype.onBlur=function(){this.focused=!1},e.prototype.onClick=function(e){r.isFocusable(e.target)||r.hasClasses(e.target,r.IGNORE_TARGET_CLASSES)||(this.navigationService.focusedIndex=this.index)},n.__decorate([o.Input(),n.__metadata("design:type",Array)],e.prototype,"files",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],e.prototype,"index",void 0),n.__decorate([o.HostBinding("class.k-file"),n.__metadata("design:type",Boolean)],e.prototype,"fileClass",void 0),n.__decorate([o.HostBinding("attr.data-uid"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"uidAttribute",null),n.__decorate([o.HostBinding("attr.tabIndex"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"tabIndex",null),n.__decorate([o.HostBinding("class.k-file-error"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kFileError",null),n.__decorate([o.HostBinding("class.k-file-invalid"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kFileInvalid",null),n.__decorate([o.HostBinding("class.k-file-progress"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kFileProgress",null),n.__decorate([o.HostBinding("class.k-file-success"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kFileSuccess",null),n.__decorate([o.HostBinding("class.k-state-focused"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"kStateFocused",null),n.__decorate([o.HostListener("focus"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],e.prototype,"onFocus",null),n.__decorate([o.HostListener("blur"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",void 0)],e.prototype,"onBlur",null),n.__decorate([o.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"onClick",null),e=n.__decorate([o.Directive({selector:"[kendoUploadFileListItem]"}),n.__metadata("design:paramtypes",[o.ElementRef,s.NavigationService,l.UploadService])],e)}();t.FileListItemDirective=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(4),s=i(3),r=i(2),l=function(){function e(e,t){this.uploadService=e,this.localization=t,this.actionFocused=!1,this.retryFocused=!1,this.pauseResumeFocused=!1}return e.prototype.onFocus=function(e){"action"===e&&(this.actionFocused=!0),"retry"===e&&(this.retryFocused=!0),"pauseResume"===e&&(this.pauseResumeFocused=!0)},e.prototype.onBlur=function(e){"retry"===e&&(this.retryFocused=!1),"action"===e&&(this.actionFocused=!1),"pauseResume"===e&&(this.pauseResumeFocused=!1)},e.prototype.onRetryClick=function(){this.disabled||this.uploadService.retryFiles(this.file.uid)},e.prototype.onRemoveCancelClick=function(){if(!this.disabled){var e=this.file.uid;this.file.state===a.FileState.Uploading?this.uploadService.cancelFiles(e):this.uploadService.removeFiles(e)}},e.prototype.onPauseResumeClick=function(){if(!this.disabled){var e=this.file.uid;this.file.state===a.FileState.Paused?this.uploadService.resumeFile(e):this.uploadService.pauseFile(e)}},Object.defineProperty(e.prototype,"actionButtonTitle",{get:function(){return this.file.state===a.FileState.Uploading?this.localization.get("cancel"):this.localization.get("remove")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"retryButtonTitle",{get:function(){return this.localization.get("retry")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pauseResumeButtonTitle",{get:function(){return this.file.state===a.FileState.Uploading?this.localization.get("pause"):this.localization.get("resume")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isUploading",{get:function(){return this.file.state===a.FileState.Uploading},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFailed",{get:function(){return this.file.state===a.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this.file.state===a.FileState.Paused},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isResumable",{get:function(){var e=this.uploadService,t=e.async.chunk&&e.chunk.resumable,i=this.file.state===a.FileState.Paused||this.file.state===a.FileState.Uploading;return t&&i},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActionButtonVisible",{get:function(){return!!(this.file.state!==a.FileState.Uploaded&&this.file.state!==a.FileState.Initial||this.uploadService.async.removeUrl||"Upload"!==this.uploadService.component)},enumerable:!0,configurable:!0}),n.__decorate([o.Input(),n.__metadata("design:type",Object)],e.prototype,"file",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number)],e.prototype,"progress",void 0),e=n.__decorate([o.Component({selector:"kendo-upload-file-list-item-action-button",template:'\n <strong class="k-upload-status">\n <span class="k-upload-pct" *ngIf="isUploading || isPaused">{{progress}}%</span>\n\n <button type="button" *ngIf="isFailed" class="k-button k-button-icon k-flat k-upload-action"\n [ngClass]="{ \'k-state-focused\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-retry k-i-refresh-sm"\n [attr.aria-label]="retryButtonTitle"\n [attr.title]="retryButtonTitle">\n </span>\n </button>\n\n <button *ngIf="isResumable" type="button" class="k-button k-button-icon k-flat k-upload-action"\n [ngClass]="{ \'k-state-focused\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon"\n [ngClass]="{\n \'k-i-play-sm\': isPaused,\n \'k-i-pause-sm\': !isPaused\n }"\n [attr.aria-label]=\'pauseResumeButtonTitle\'\n [attr.title]=\'pauseResumeButtonTitle\'>\n </span>\n </button>\n\n <button type="button" *ngIf="isActionButtonVisible" class="k-button k-button-icon k-flat k-upload-action"\n [ngClass]="{ \'k-state-focused\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick()">\n <span class="k-icon"\n [ngClass]="{\n \'k-i-cancel\': isUploading,\n \'k-delete k-i-x\': !isUploading\n }"\n [attr.aria-label]=\'actionButtonTitle\'\n [attr.title]=\'actionButtonTitle\'>\n </span>\n </button>\n </strong>\n '}),n.__metadata("design:paramtypes",[s.UploadService,r.LocalizationService])],e)}();t.FileListItemActionButtonComponent=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(33),s=i(4),r=i(34),l=i(2),u=i(3),d=i(5),p=i(6),c=function(e){function t(t,i){var n=e.call(this,i)||this;return n.localization=t,n.subscribeUploadProgress((function(e){e.files[0].uid===n.files[0].uid&&(n.progressComplete=e.percentComplete)})),n}return n.__extends(t,e),Object.defineProperty(t.prototype,"showProgress",{get:function(){return this.files[0].state===s.FileState.Uploading||this.files[0].state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.filesHaveErrors=e.prototype.filesHaveValidationErrors.call(this,this.files)},t.prototype.fileStatusText=function(e){var t=e.validationErrors;return d.isPresent(t)?this.getFileValidationMessage(e):this.getTotalFilesSizeMessage([e])},Object.defineProperty(t.prototype,"batchStatusText",{get:function(){var e=this.files[0].state,t=this.files.length;return e===s.FileState.Uploaded?t+" "+this.textFor("filesBatchStatusUploaded"):e===s.FileState.Failed?t+" "+this.textFor("filesBatchStatusFailed"):t+" "+this.textFor("filesBatchStatus")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploadSuccessful",{get:function(){return this.files[0].state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploadFailed",{get:function(){return this.files[0].state===s.FileState.Failed},enumerable:!0,configurable:!0}),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Array)],t.prototype,"files",void 0),n.__decorate([o.Input(),n.__metadata("design:type",p.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),t=n.__decorate([o.Component({animations:[a.trigger("progressState",[a.state("active",a.style({opacity:1})),a.state("inactive",a.style({opacity:0})),a.transition("void => active",a.style({opacity:0})),a.transition("inactive => active",a.style({opacity:1})),a.transition("active => inactive",a.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-multiple-items",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-multiple-files-group-wrapper">\n <span class="k-file-group k-icon k-i-copy"></span>\n </span>\n <span class="k-multiple-files-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span *ngFor="let file of files" class="k-file-name-size-wrapper">\n <span [title]="file.name" class="k-file-name">\n {{file.name}}\n </span>\n <span [ngClass]="{\n \'k-text-error\': file.validationErrors,\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors\n }"\n >{{fileStatusText(file)}}</span>\n </span>\n <span class="k-file-information"\n [ngClass]="{\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': isUploadFailed\n }"\n >{{batchStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: files[0].state,\n $implicit: files\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'files[0]\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),n.__metadata("design:paramtypes",[l.LocalizationService,u.UploadService])],t)}(r.FileListItemBase);t.FileListMultipleItemsComponent=c},function(e,t){e.exports=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(5),o=function(){function e(e){this.uploadService=e,this.progressComplete=0}return e.prototype.subscribeUploadProgress=function(e){this.uploadProgressSubscription=this.uploadService.uploadProgressEvent.subscribe(e)},e.prototype.fileHasValidationErrors=function(e){return n.fileHasValidationErrors(e)},e.prototype.filesHaveValidationErrors=function(e){return n.filesHaveValidationErrors(e)},e.prototype.ngOnDestroy=function(){this.uploadProgressSubscription.unsubscribe()},e.prototype.getFileValidationMessage=function(e){var t;return e.validationErrors&&e.validationErrors.length>0&&(t=this.localization.get(e.validationErrors[0])),t},e.prototype.getTotalFilesSizeMessage=function(e){return n.getTotalFilesSizeMessage(e)},e.prototype.textFor=function(e){return this.localization.get(e)},e}();t.FileListItemBase=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(33),s=i(4),r=i(34),l=i(2),u=i(3),d=i(5),p=i(6),c=function(e){function t(t,i){var n=e.call(this,i)||this;return n.localization=t,n.subscribeUploadProgress((function(e){e.files[0].uid===n.file.uid&&(n.progressComplete=e.percentComplete)})),n}return n.__extends(t,e),Object.defineProperty(t.prototype,"fileStatusText",{get:function(){var e=this.file.validationErrors;return this.file.state===s.FileState.Uploaded?""+this.textFor("fileStatusUploaded"):this.file.state===s.FileState.Failed?""+this.textFor("fileStatusFailed"):d.isPresent(e)?this.getFileValidationMessage(this.file):this.getTotalFilesSizeMessage([this.file])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"showProgress",{get:function(){return this.file.state===s.FileState.Uploading||this.file.state===s.FileState.Paused?"active":"inactive"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fileGroupClass",{get:function(){return d.getFileGroupCssClass(this.file.extension?this.file.extension:"")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploadSuccessful",{get:function(){return this.file.state===s.FileState.Uploaded},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUploadFailed",{get:function(){return this.file.state===s.FileState.Failed},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNotYetUploaded",{get:function(){return!this.isUploadFailed&&!this.isUploadSuccessful},enumerable:!0,configurable:!0}),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],t.prototype,"file",void 0),n.__decorate([o.Input(),n.__metadata("design:type",p.FileInfoTemplateDirective)],t.prototype,"fileInfoTemplate",void 0),t=n.__decorate([o.Component({animations:[a.trigger("progressState",[a.state("active",a.style({opacity:1})),a.state("inactive",a.style({opacity:0})),a.transition("void => active",a.style({opacity:0})),a.transition("inactive => active",a.style({opacity:1})),a.transition("active => inactive",a.animate("1s 2s ease-out"))])],selector:"kendo-upload-file-list-single-item",template:'\n <div class="k-progressbar" [@progressState]="showProgress">\n <span class="k-progress" [style.width]="progressComplete + \'%\'"></span>\n </div>\n <span class="k-file-group-wrapper">\n <span class="k-file-group k-icon" [ngClass]="fileGroupClass"></span>\n </span>\n <span class="k-file-name-size-wrapper">\n <ng-container *ngIf="!fileInfoTemplate">\n <span class="k-file-name" [title]="file.name">{{ file.name }}</span>\n <span [ngClass]="{\n \'k-file-validation-message\': file.validationErrors,\n \'k-file-size\': !file.validationErrors && isNotYetUploaded,\n \'k-text-success\': isUploadSuccessful,\n \'k-text-error\': file.validationErrors || isUploadFailed,\n \'k-file-information\': isUploadSuccessful || isUploadFailed\n }"\n >{{fileStatusText}}</span>\n </ng-container>\n <ng-template *ngIf="fileInfoTemplate"\n [templateContext]="{\n templateRef: fileInfoTemplate.templateRef,\n state: file.state,\n $implicit: [file]\n }">\n </ng-template>\n </span>\n <kendo-upload-file-list-item-action-button\n [file]=\'file\'\n [disabled]=\'disabled\'\n [progress]=\'progressComplete\'>\n </kendo-upload-file-list-item-action-button>\n '}),n.__metadata("design:paramtypes",[l.LocalizationService,u.UploadService])],t)}(r.FileListItemBase);t.FileListSingleItemComponent=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(7),s=i(3),r=i(5),l=i(12),u=function(){function e(e,t,i){this.uploadService=e,this.navigation=t,this.type="file",this.autocomplete="off",this.tabIndex=-1,this.element=i}return Object.defineProperty(e.prototype,"nameAttribute",{get:function(){return this.uploadService.async.saveField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!0,configurable:!0}),e.prototype.onInputChange=function(e){var t=this,i=navigator.userAgent,n=r.inputFiles(e.target);n=r.assignGuidToFiles(n,!this.uploadService.async.batch),l.validateFiles(n,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(n);var o=this.element.nativeElement;!i.match(/(chrome)[ \/]([\w.]+)/i)&&i.match(/(webkit)[ \/]([\w.]+)/i)||(o.type="",o.type="file"),setTimeout((function(){t.navigation.focusedIndex=-1}))},n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"dir",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"multiple",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],e.prototype,"restrictions",void 0),n.__decorate([o.HostBinding("attr.type"),n.__metadata("design:type",String)],e.prototype,"type",void 0),n.__decorate([o.HostBinding("attr.autocomplete"),n.__metadata("design:type",String)],e.prototype,"autocomplete",void 0),n.__decorate([o.HostBinding("attr.tabindex"),n.__metadata("design:type",Number)],e.prototype,"tabIndex",void 0),n.__decorate([o.HostBinding("attr.name"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"nameAttribute",null),n.__decorate([o.HostBinding("attr.multiple"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"multipleAttribute",null),n.__decorate([o.HostBinding("attr.dir"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"dirAttribute",null),n.__decorate([o.HostBinding("attr.disabled"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],e.prototype,"disabledAttribute",null),n.__decorate([o.HostListener("change",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],e.prototype,"onInputChange",null),e=n.__decorate([o.Directive({selector:"[kendoFileSelect]"}),n.__metadata("design:paramtypes",[s.UploadService,a.NavigationService,o.ElementRef])],e)}();t.FileSelectDirective=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=function(){function e(e){this.viewContainerRef=e}return Object.defineProperty(e.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!0,configurable:!0}),n.__decorate([o.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],e.prototype,"templateContext",null),e=n.__decorate([o.Directive({selector:"[templateContext]"}),n.__metadata("design:paramtypes",[o.ViewContainerRef])],e)}();t.TemplateContextDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(5),s=i(12),r=i(11),l=i(13),u=function(){function e(e){this.dropZoneService=e}return e.prototype.onElementDragEnter=function(){return!1},e.prototype.onElementDragOver=function(){return!1},e.prototype.onDropListener=function(e){var t=this.componentInstance;if(a.isPresent(t))return t.forEach((function(t){var i=e.dataTransfer.files;if(i.length>0&&!t.disabled){var n=a.getAllFileInfo(i);n=t instanceof l.UploadComponent?a.assignGuidToFiles(n,!t.batch):a.assignGuidToFiles(n,!0),t.multiple||(n.splice(1,n.length-1),t.clearFiles()),s.validateFiles(n,t.restrictions),t.addFiles(n)}})),!1},Object.defineProperty(e.prototype,"componentInstance",{get:function(){return this.dropZoneService.getComponents(this.zoneId)},enumerable:!0,configurable:!0}),n.__decorate([o.Input("kendoUploadDropZone"),n.__metadata("design:type",String)],e.prototype,"zoneId",void 0),n.__decorate([o.HostListener("dragenter"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Boolean)],e.prototype,"onElementDragEnter",null),n.__decorate([o.HostListener("dragover"),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[]),n.__metadata("design:returntype",Boolean)],e.prototype,"onElementDragOver",null),n.__decorate([o.HostListener("drop",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",Boolean)],e.prototype,"onDropListener",null),e=n.__decorate([o.Directive({providers:[r.DropZoneService],selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]"}),n.__metadata("design:paramtypes",[r.DropZoneService])],e)}();t.UploadDropZoneDirective=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(2),s=function(e){function t(t,i,n){var o=e.call(this,t,i,"k-external-dropzone-hover")||this;return o.localization=n,o.hostClass=!0,o.localizationChangeSubscription=o.localization.changes.subscribe((function(e){var t=e.rtl;o.direction=t?"rtl":"ltr"})),o}return n.__extends(t,e),Object.defineProperty(t.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!0,configurable:!0}),t.prototype.textFor=function(e){return this.localization.get(e)},Object.defineProperty(t.prototype,"iconClasses",{get:function(){return this.icon?"k-icon k-i-"+this.icon:this.iconClass?""+this.iconClass:"k-icon k-i-upload"},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},n.__decorate([o.HostBinding("class.k-external-dropzone"),n.__metadata("design:type",Boolean)],t.prototype,"hostClass",void 0),n.__decorate([o.HostBinding("attr.dir"),n.__metadata("design:type",String),n.__metadata("design:paramtypes",[])],t.prototype,"dirAttribute",null),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"zoneId",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"icon",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],t.prototype,"iconClass",void 0),t=n.__decorate([o.Component({exportAs:"kendoUploadDropZone",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.uploaddropzone"}],selector:"kendo-uploaddropzone",template:"\n <ng-container kendoUploadDropZoneLocalizedMessages\n i18n-externalDropFilesHere='kendo.uploaddropzone.externalDropFilesHere|Sets the external drop-zone hint'\n externalDropFilesHere='Drag and drop files here to upload'\n >\n </ng-container>\n <div class='k-dropzone-inner' [kendoUploadDropZone]=\"zoneId\">\n <span [ngClass]=\"iconClasses\"></span>\n <span class=\"k-dropzone-hint\">{{ textFor('externalDropFilesHere') }}</span>\n <span class=\"k-dropzone-note\">\n <ng-content></ng-content>\n </span>\n </div>\n "}),n.__metadata("design:paramtypes",[o.ElementRef,o.Renderer2,a.LocalizationService])],t)}(i(28).DropZoneBase);t.UploadDropZoneComponent=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(13),s=i(41),r=i(42),l=i(25),u=[a.UploadComponent,s.UploadActionButtonsComponent,r.UploadStatusTotalComponent],d=function(){function e(){}return e=n.__decorate([o.NgModule({declarations:[u],exports:[l.PUBLIC_DIRECTIVES,u],imports:[l.SharedModule]})],e)}();t.UploadModule=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(3),s=i(2),r=i(7),l=function(){function e(e,t,i){this.uploadService=e,this.localization=t,this.navigation=i,this.hostDefaultClass=!0,this.onAction(),this.onFocus()}return Object.defineProperty(e.prototype,"actionButtonsEndClassName",{get:function(){return"end"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionButtonsStretchedClassName",{get:function(){return"stretched"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionButtonsStartClassName",{get:function(){return"start"===this.actionsLayout},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"actionButtonsCenterClassName",{get:function(){return"center"===this.actionsLayout},enumerable:!0,configurable:!0}),e.prototype.onAction=function(){var e=this;this.actionSubscription=this.navigation.onActionButtonAction.subscribe((function(t){"clear"===t?e.clearFiles():e.performUpload(),e.navigation.focusSelectButton()}))},e.prototype.onFocus=function(){var e=this;this.focusSubscription=this.navigation.onActionButtonFocus.subscribe((function(t){e.focusButton(t)}))},e.prototype.focusButton=function(e){("clear"===e?this.clearButton:this.uploadButton).nativeElement.focus()},e.prototype.ngOnDestroy=function(){this.actionSubscription.unsubscribe(),this.focusSubscription.unsubscribe()},e.prototype.performUpload=function(e){this.disabled||this.uploadService.uploadFiles()},e.prototype.clearFiles=function(e){this.disabled||this.uploadService.clearFiles()},e.prototype.textFor=function(e){return this.localization.get(e)},n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],e.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],e.prototype,"actionsLayout",void 0),n.__decorate([o.ViewChild("clearButton",{static:!0}),n.__metadata("design:type",o.ElementRef)],e.prototype,"clearButton",void 0),n.__decorate([o.ViewChild("uploadButton",{static:!0}),n.__metadata("design:type",o.ElementRef)],e.prototype,"uploadButton",void 0),n.__decorate([o.HostBinding("class.k-actions"),n.__metadata("design:type",Boolean)],e.prototype,"hostDefaultClass",void 0),n.__decorate([o.HostBinding("class.k-actions-end"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"actionButtonsEndClassName",null),n.__decorate([o.HostBinding("class.k-actions-stretched"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"actionButtonsStretchedClassName",null),n.__decorate([o.HostBinding("class.k-actions-start"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"actionButtonsStartClassName",null),n.__decorate([o.HostBinding("class.k-actions-center"),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[])],e.prototype,"actionButtonsCenterClassName",null),e=n.__decorate([o.Component({selector:"kendo-upload-action-buttons",template:'\n <button #clearButton type="button" class="k-button k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="clearFiles($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="performUpload($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}),n.__metadata("design:paramtypes",[a.UploadService,s.LocalizationService,r.NavigationService])],e)}();t.UploadActionButtonsComponent=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(23),s=i(4),r=i(2),l=function(){function e(e){this.localization=e}return e.prototype.ngDoCheck=function(){this.isPaused=this.fileList.hasFileWithState([s.FileState.Paused]),this.isFailed=this.fileList.hasFileWithState([s.FileState.Failed]),this.isUploading=this.fileList.hasFileWithState([s.FileState.Uploading]),this.isPaused&&!this.isUploading?this.statusText=this.localization.get("headerStatusPaused"):this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded")},n.__decorate([o.Input(),n.__metadata("design:type",a.FileMap)],e.prototype,"fileList",void 0),e=n.__decorate([o.Component({selector:"kendo-upload-status-total",template:"\n <span class=\"k-icon\"\n [ngClass]=\"{\n 'k-i-checkmark': !this.isUploading && !this.isFailed,\n 'k-i-exception': !this.isUploading && this.isFailed,\n 'k-i-upload': this.isUploading,\n 'k-i-pause-sm': this.isPaused\n }\">\n </span>\n {{statusText}}\n "}),n.__metadata("design:paramtypes",[r.LocalizationService])],e)}();t.UploadStatusTotalComponent=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(14);t.FileSelectModule=o.FileSelectModule;var a=i(40);t.UploadModule=a.UploadModule;var s=i(59);t.UploadsModule=s.UploadsModule;var r=i(13);t.UploadComponent=r.UploadComponent;var l=i(15);t.FileSelectComponent=l.FileSelectComponent;var u=i(39);t.UploadDropZoneComponent=u.UploadDropZoneComponent;var d=i(36);t.FileSelectDirective=d.FileSelectDirective;var p=i(29);t.FileListComponent=p.FileListComponent;var c=i(35);t.FileListSingleItemComponent=c.FileListSingleItemComponent;var f=i(31);t.FileListItemActionButtonComponent=f.FileListItemActionButtonComponent;var h=i(32);t.FileListMultipleItemsComponent=h.FileListMultipleItemsComponent;var m=i(10);t.FileTemplateDirective=m.FileTemplateDirective;var v=i(6);t.FileInfoTemplateDirective=v.FileInfoTemplateDirective;var g=i(37);t.TemplateContextDirective=g.TemplateContextDirective;var _=i(42);t.UploadStatusTotalComponent=_.UploadStatusTotalComponent;var y=i(41);t.UploadActionButtonsComponent=y.UploadActionButtonsComponent;var b=i(38);t.UploadDropZoneDirective=b.UploadDropZoneDirective;var S=i(26);t.CustomMessagesComponent=S.CustomMessagesComponent,n.__exportStar(i(24),t),n.__exportStar(i(4),t)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){this.files=e};t.CancelEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(){return e.call(this)||this}return n.__extends(t,e),t}(i(9).PreventableEvent);t.ClearEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,i){this.files=e,this.operation=t,this.response=i};t.ErrorEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){this.file=e};t.PauseEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(t,i){var n=e.call(this)||this;return n.files=t,n.headers=i,n}return n.__extends(t,e),t}(i(9).PreventableEvent);t.RemoveEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){this.file=e};t.ResumeEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(t){var i=e.call(this)||this;return i.files=t,i}return n.__extends(t,e),t}(i(9).PreventableEvent);t.SelectEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(t,i,n){var o=e.call(this)||this;return o.files=t,o.operation=i,o.response=n,o}return n.__extends(t,e),t}(i(9).PreventableEvent);t.SuccessEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=function(e){function t(t,i){var n=e.call(this)||this;return n.files=t,n.headers=i,n}return n.__extends(t,e),t}(i(9).PreventableEvent);t.UploadEvent=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.files=e,this.percentComplete=t};t.UploadProgressEvent=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],discImage:[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._files={}}return e.prototype.add=function(e,t){var i={index:0,position:0,retries:0,totalChunks:t};return this._files[e]=i,i},e.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},e.prototype.has=function(e){return e in this._files},e.prototype.get=function(e){return this._files[e]},e}();t.ChunkMap=n},function(e,t){e.exports=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(5),s=i(12),r=i(28),l=i(3),u=function(e){function t(t,i,n,o){var a=e.call(this,t,i,"k-dropzone-hover")||this;return a.ngZone=n,a.uploadService=o,a.initialClassName=!0,a.hideIntervalDocument=null,a.activeClass="k-dropzone-active",a.ngZone.runOutsideAngular((function(){a.unsubscribeDocumentDragEnter=a.renderer.listen("document","dragenter",(function(){return a.onDocumentDragEnter()})),a.unsubscribeDocumentDragOver=a.renderer.listen("document","dragover",(function(){return a.onDocumentDragOver()}))})),a}return n.__extends(t,e),t.prototype.ngOnDestroy=function(){var e=this;this.ngZone.runOutsideAngular((function(){e.unsubscribeDocumentDragEnter&&e.unsubscribeDocumentDragEnter(),e.unsubscribeDocumentDragOver&&e.unsubscribeDocumentDragOver()}))},t.prototype.onDocumentDragEnter=function(){var e=this;return this.addClass(this.activeClass),this.lastDragDocument=new Date,this.hideIntervalDocument||(this.hideIntervalDocument=setInterval((function(){e.calculateTimeDiff(e.lastDragDocument)<100||(e.removeClass(e.activeClass),clearInterval(e.hideIntervalDocument),e.hideIntervalDocument=null)}),100)),!1},t.prototype.onDocumentDragOver=function(){return this.lastDragDocument=new Date,!1},t.prototype.onDropListener=function(e){var t=e.dataTransfer.files;if(t.length>0&&!this.disabled){var i=a.getAllFileInfo(t);i=a.assignGuidToFiles(i,!this.uploadService.async.batch),this.multiple||(i.splice(1,i.length-1),this.uploadService.clearFiles()),s.validateFiles(i,this.restrictions),this.uploadService.addFiles(i)}return!1},n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"disabled",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],t.prototype,"multiple",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],t.prototype,"restrictions",void 0),n.__decorate([o.HostBinding("class.k-dropzone"),n.__metadata("design:type",Boolean)],t.prototype,"initialClassName",void 0),n.__decorate([o.HostListener("drop",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",Boolean)],t.prototype,"onDropListener",null),t=n.__decorate([o.Directive({selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n "}),n.__metadata("design:paramtypes",[o.ElementRef,o.Renderer2,o.NgZone,l.UploadService])],t)}(r.DropZoneBase);t.DropZoneInternalDirective=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(27),s=i(2),r=function(e){function t(t){var i=e.call(this)||this;return i.service=t,i}var i;return n.__extends(t,e),i=t,t=i=n.__decorate([o.Directive({providers:[{provide:a.Messages,useExisting:o.forwardRef((function(){return i}))}],selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "}),n.__metadata("design:paramtypes",[s.LocalizationService])],t)}(a.Messages);t.LocalizedMessagesDirective=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(14),s=i(40),r=function(){function e(){}return e=n.__decorate([o.NgModule({exports:[a.FileSelectModule,s.UploadModule]})],e)}();t.UploadsModule=r}])}));
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-upload',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1635413785,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-upload',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1635413785,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -21,7 +21,7 @@ const packageMetadata = {
|
|
|
21
21
|
name: '@progress/kendo-angular-upload',
|
|
22
22
|
productName: 'Kendo UI for Angular',
|
|
23
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
24
|
-
publishDate:
|
|
24
|
+
publishDate: 1635413785,
|
|
25
25
|
version: '',
|
|
26
26
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
27
27
|
};
|
package/dist/fesm5/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var packageMetadata = {
|
|
|
21
21
|
name: '@progress/kendo-angular-upload',
|
|
22
22
|
productName: 'Kendo UI for Angular',
|
|
23
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
24
|
-
publishDate:
|
|
24
|
+
publishDate: 1635413785,
|
|
25
25
|
version: '',
|
|
26
26
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
27
27
|
};
|