@progress/kendo-angular-upload 9.0.0 → 9.0.2-dev.202205191355

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.
@@ -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&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),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("KendoAngularUpload",["exports","@angular/core","@angular/forms","@progress/kendo-angular-l10n","@progress/kendo-angular-common","rxjs","rxjs/operators","@progress/kendo-licensing","@angular/common/http","@angular/animations","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularUpload={},e.ng.core,e.ng.forms,e.KendoAngularL10N,e.KendoAngularCommon,e.rxjs,e.rxjs.operators,e.KendoLicensing,e.ng.common.http,e.ng.animations,e.ng.common)}(this,function(p,c,e,t,u,M,R,V,j,n,i){"use strict";function H(n){if(n&&n.__esModule)return n;var i=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),i.default=n,Object.freeze(i)}var o=H(c),s=H(t),A=H(j),a=H(i),N={name:"@progress/kendo-angular-upload",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1650441235,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){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}_(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function Z(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;p.FileState=void 0,(d=p.FileState||(p.FileState={}))[d.Failed=0]="Failed",d[d.Initial=1]="Initial",d[d.Selected=2]="Selected",d[d.Uploaded=3]="Uploaded",d[d.Uploading=4]="Uploading",d[d.Paused=5]="Paused";l.prototype.add=function(e){var t=e.uid;this.has(t)?e.validationErrors&&0<e.validationErrors.length?this._files[t].unshift(e):this._files[t].push(e):this._files[t]=[e]},l.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},l.prototype.clear=function(){var t,e,n,i=this._files;for(n in i)if(i.hasOwnProperty(n)){try{t=void 0;for(var o=Z(i[n]),s=o.next();!s.done;s=o.next()){var a=s.value;a.httpSubscription&&a.httpSubscription.unsubscribe()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}i[n]=null,delete i[n]}},l.prototype.has=function(e){return e in this._files},l.prototype.get=function(e){return this._files[e]},l.prototype.setFilesState=function(e,t){var n,i;try{for(var o=Z(e),s=o.next();!s.done;s=o.next()){var a=s.value;this.setFilesStateByUid(a.uid,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},l.prototype.setFilesStateByUid=function(e,t){this.get(e).forEach(function(e){e.state=t})},Object.defineProperty(l.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"files",{get:function(){var e,t=this._files,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(t[e]);return n},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"filesFlat",{get:function(){var e,t=this._files,n=[];for(e in t)t.hasOwnProperty(e)&&t[e].forEach(function(e){n.push(e)});return n},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"filesToUpload",{get:function(){var t,e,n,i=this._files,o=[];for(n in i)if(i.hasOwnProperty(n)){var s=i[n],a=!0;try{t=void 0;for(var r=Z(s),l=r.next();!l.done;l=r.next()){var c=l.value;(c.state!==p.FileState.Selected||c.validationErrors&&0<c.validationErrors.length)&&(a=!1)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}a&&o.push(s)}return o},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"firstFileToUpload",{get:function(){var t,e,n,i=this._files;for(n in i)if(i.hasOwnProperty(n)){var o=i[n],s=!0;try{t=void 0;for(var a=Z(o),r=a.next();!r.done;r=a.next()){var l=r.value;(l.state!==p.FileState.Selected||l.validationErrors&&0<l.validationErrors.length)&&(s=!1)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}if(s)return o}return null},enumerable:!1,configurable:!0}),l.prototype.getFilesWithState=function(t){return this.filesFlat.filter(function(e){return e.state===t})},l.prototype.hasFileWithState=function(e){var t,n,i,o=this._files;for(i in o)if(o.hasOwnProperty(i)){var s=o[i];try{t=void 0;for(var a=Z(s),r=a.next();!r.done;r=a.next()){var l=r.value;if(0<=e.indexOf(l.state))return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}return!1};var K=l;function l(){this._files={}}var $=function(e){this.files=e},d=(q.prototype.preventDefault=function(){this.prevented=!0},q.prototype.isDefaultPrevented=function(){return this.prevented},q);function q(){this.prevented=!1}r(X,W=d);var W,G=X;function X(){return W.call(this)||this}var Q,Y=function(e,t,n){this.files=e,this.operation=t,this.response=n},J=function(e){this.file=e},ee=(r(te,Q=d),te);function te(e,t){var n=Q.call(this)||this;return n.files=e,n.headers=t,n}var ne,ie=function(e){this.file=e},oe=(r(se,ne=d),se);function se(e){var t=ne.call(this)||this;return t.files=e,t}r(le,ae=d);var ae,re=le;function le(e,t,n){var i=ae.call(this)||this;return i.files=e,i.operation=t,i.response=n,i}r(ue,ce=d);var ce,pe=ue;function ue(e,t){var n=ce.call(this)||this;return n.files=e,n.headers=t,n}function de(e){return!!(e instanceof Object&&e.hasOwnProperty("name"))}function fe(e){return e.extension=e.extension||Ee(e.name),e.name=e.name,e.size=e.size||0,e.hasOwnProperty("state")||(e.state=p.FileState.Initial),e.hasOwnProperty("uid")||(e.uid=u.guid()),e}function he(e){var t=e.name,n=e.size;return{extension:Ee(t),name:t,rawFile:e,size:n,state:p.FileState.Selected}}function me(e){for(var t=new Array,n=0;n<e.length;n++)t.push(he(e[n]));return t}function ge(e){return!!(e.validationErrors&&0<e.validationErrors.length)}function ye(e){var t,n;try{for(var i=Z(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(ge(s))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!1}function ve(e){return e.files?me(e.files):e.value.split("|").map(function(e,t){var n,e=e.trim();return{extension:Ee(e),name:-1!==(n=(e=e).lastIndexOf("\\"))?e.substr(n+1):e,rawFile:null,size:1e3*(t+1),state:p.FileState.Selected}})}function be(e,t){var n=u.guid();return e.map(function(e){return e.uid=t?u.guid():n,e})}function ke(e){return String(e).trim().split(" ")}function Fe(e,t){var n=ke(t);return Boolean(ke(e.className).find(function(e){return 0<=n.indexOf(e)}))}function Se(e,t){var n,i;return void 0===t&&(t=!0),!!e.tagName&&(n=e.tagName.toLowerCase(),i=null!==(i=e.getAttribute("tabIndex"))&&!isNaN(i)&&-1<i,(De.test(n)?!e.disabled:i)&&(!t||!(!(i=(n=e).getBoundingClientRect()).width||!i.height)&&"hidden"!==window.getComputedStyle(n).visibility))}function Ie(e){return null!=e}var Ce=function(e,t){this.files=e,this.percentComplete=t},xe={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"]},Ee=function(e){e=e.match(/\.([^\.]+)$/);return e?e[0]:""},De=/^(?:a|input|select|textarea|button|object)$/i,Te="k-icon k-select k-input k-multiselect-wrap",we="k-upload-button k-clear-selected k-upload-selected k-upload-action",Ue=(Be.prototype.add=function(e,t){t={index:0,position:0,retries:0,totalChunks:t};return this._files[e]=t},Be.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},Be.prototype.has=function(e){return e in this._files},Be.prototype.get=function(e){return this._files[e]},Be);function Be(){this._files={}}Object.defineProperty(h.prototype,"files",{get:function(){return this.fileList},enumerable:!1,configurable:!0}),h.prototype.setChunkSettings=function(e){!1!==e&&(this.async.chunk=!0,"object"==typeof e&&(this.chunk=Object.assign({},this.chunk,e)))},h.prototype.onChange=function(){var e=this.fileList.filesFlat.filter(function(e){return e.state===p.FileState.Initial||e.state===p.FileState.Uploaded});this.changeEvent.emit(0<e.length?e:null)},h.prototype.addFiles=function(e){var t,n,i=new oe(e);if(this.selectEvent.emit(i),!i.isDefaultPrevented()){try{for(var o=Z(e),s=o.next();!s.done;s=o.next()){var a=s.value;this.fileList.add(a)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this.async.autoUpload&&this.uploadFiles()}"FileSelect"===this.component&&(i=this.fileList.filesFlat,this.changeEvent.emit(0<i.length?i:null))},h.prototype.addInitialFiles=function(e){var t=this;this.fileList.clear(),e.forEach(function(e){e=fe(e);t.fileList.add(e)})},h.prototype.addInitialFileSelectFiles=function(e){var t=this;this.fileList.clear(),e.forEach(function(e){e instanceof File?t.fileList.add(function(e){e=he(e);return e.uid=u.guid(),e.state=p.FileState.Selected,e}(e)):t.fileList.add(fe(e))})},h.prototype.resumeFile=function(e){var t=this.fileList.get(e);this.resumeEvent.emit(new ie(t[0])),this.fileList.setFilesStateByUid(e,p.FileState.Uploading),this._uploadFiles([t])},h.prototype.pauseFile=function(e){var t=this.fileList.get(e)[0];this.pauseEvent.emit(new J(t)),this.fileList.setFilesStateByUid(e,p.FileState.Paused)},h.prototype.removeFiles=function(e){var t=this.fileList.get(e),n=new ee(t,this.cloneRequestHeaders(this.async.removeHeaders));this.removeEvent.emit(n),n.isDefaultPrevented()||("Upload"!==this.component||t[0].state!==p.FileState.Uploaded&&t[0].state!==p.FileState.Initial?(this.fileList.remove(e),"FileSelect"===this.component&&(e=this.fileList.filesFlat,this.changeEvent.emit(0<e.length?e:null))):this.performRemove(t,n))},h.prototype.cancelFiles=function(e){var t,n,i=this.fileList.get(e),o=new $(i);this.cancelEvent.emit(o);try{for(var s=Z(i),a=s.next();!a.done;a=s.next()){var r=a.value;r.httpSubscription&&r.httpSubscription.unsubscribe()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this.fileList.remove(e),this.checkAllComplete()},h.prototype.clearFiles=function(){var e=new G;this.clearEvent.emit(e),e.isDefaultPrevented()||(e=this.fileList.hasFileWithState([p.FileState.Initial,p.FileState.Uploaded]),this.fileList.clear(),e&&this.onChange())},h.prototype.uploadFiles=function(){var e=[];this.async.concurrent&&(e=this.fileList.filesToUpload),(e=this.async.concurrent||this.fileList.hasFileWithState([p.FileState.Uploading])?e:this.fileList.firstFileToUpload?[this.fileList.firstFileToUpload]:[])&&0<e.length&&this._uploadFiles(e)},h.prototype.retryFiles=function(e){e=[this.fileList.get(e)];this._uploadFiles(e)},h.prototype._uploadFiles=function(e){var t,n,i=this;try{for(var o=Z(e),s=o.next();!s.done;s=o.next()){var a=function(e){if(e[0].state===p.FileState.Paused)return{value:void 0};var t,n=new pe(e,i.cloneRequestHeaders(i.async.saveHeaders));i.uploadEvent.emit(n),n.isDefaultPrevented()?i.fileList.remove(e[0].uid):(i.fileList.setFilesState(e,p.FileState.Uploading),t=i.performUpload(e,n),e.forEach(function(e){e.httpSubscription=t}))}(s.value);if("object"==typeof a)return a.value}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},h.prototype.performRemove=function(t,e){var n=this,i=this.async,o=t.map(function(e){return e.name}),o=this.populateRemoveFormData(o,e.data),e=this.populateRequestOptions(e.headers),i=new j.HttpRequest(i.removeMethod,i.removeUrl,o,e);this.http.request(i).subscribe(function(e){n.onSuccess(e,t,"remove")},function(e){n.onError(e,t,"remove")})},h.prototype.performUpload=function(t,e){var n=this,i=this.async,o=this.populateUploadFormData(t,e.data),e=this.populateRequestOptions(e.headers),i=new j.HttpRequest(i.saveMethod,i.saveUrl,o,e);return this.http.request(i).subscribe(function(e){e.type!==j.HttpEventType.UploadProgress||n.async.chunk?e instanceof j.HttpResponse&&(n.onSuccess(e,t,"upload"),n.checkAllComplete()):n.onProgress(e,t)},function(e){n.onError(e,t,"upload"),n.checkAllComplete()})},h.prototype.onSuccess=function(e,t,n){if("upload"===n&&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)}e=new re(t,n,e);this.successEvent.emit(e),"upload"===n?this.fileList.setFilesState(t,e.isDefaultPrevented()?p.FileState.Failed:p.FileState.Uploaded):e.isDefaultPrevented()||this.fileList.remove(t[0].uid),e.isDefaultPrevented()||this.onChange()},h.prototype.onError=function(e,t,n){var i=this;if("upload"===n&&this.async.chunk){var o=this.chunk.maxAutoRetries,s=this.chunkMap.get(t[0].uid);if(s.retries<o)return s.retries+=1,void setTimeout(function(){i.retryFiles(t[0].uid)},this.chunk.autoRetryAfter)}o=new Y(t,n,e);this.errorEvent.emit(o),"upload"===n&&this.fileList.setFilesState(t,p.FileState.Failed)},h.prototype.onProgress=function(e,t){e=Math.round(100*e.loaded/e.total),t=new Ce(t,e<100?e:100);this.uploadProgressEvent.emit(t)},h.prototype.onChunkProgress=function(e){var t=this.chunkMap.get(e[0].uid),n=0,t=(t&&(n=t.index===t.totalChunks-1?100:Math.round((t.index+1)/t.totalChunks*100)),new Ce(e,n<100?n:100));this.uploadProgressEvent.emit(t)},h.prototype.checkAllComplete=function(){!this.fileList.hasFileWithState([p.FileState.Uploading,p.FileState.Paused])&&this.areAllSelectedFilesHandled()?this.completeEvent.emit():this.shouldUploadNextFile()&&this.uploadFiles()},h.prototype.shouldUploadNextFile=function(){return!this.async.concurrent&&this.fileList.hasFileWithState([p.FileState.Selected])&&!this.fileList.hasFileWithState([p.FileState.Uploading])},h.prototype.areAllSelectedFilesHandled=function(){return 0===this.fileList.getFilesWithState(p.FileState.Selected).filter(function(e){return!e.validationErrors}).length},h.prototype.cloneRequestHeaders=function(t){var n={};return t&&t.keys().forEach(function(e){n[e]=t.get(e)}),new j.HttpHeaders(n)},h.prototype.populateRequestOptions=function(e){return{headers:e,reportProgress:!0,responseType:this.async.responseType,withCredentials:this.async.withCredentials}},h.prototype.populateUploadFormData=function(e,t){var n,i,o=this.async.saveField,s=new FormData;if(this.populateClientFormData(s,t),this.async.chunk)s.append(o,this.getNextChunk(e[0])),s.append("metadata",this.getChunkMetadata(e[0]));else try{for(var a=Z(e),r=a.next();!r.done;r=a.next()){var l=r.value;s.append(o,l.rawFile)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s},h.prototype.populateRemoveFormData=function(e,t){var n,i,o=new FormData;this.populateClientFormData(o,t);try{for(var s=Z(e),a=s.next();!a.done;a=s.next()){var r=a.value;o.append(this.async.removeField,r)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},h.prototype.populateClientFormData=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.append(n,t[n])},h.prototype.getNextChunk=function(e){var t=this.getChunkInfo(e),n=t.position+this.chunk.size;return e.rawFile.slice(t.position,n)},h.prototype.getChunkInfo=function(e){var t,n=this.chunkMap.get(e.uid);return n||(t=Math.ceil(e.size/this.chunk.size),n=this.chunkMap.add(e.uid,t)),n},h.prototype.updateChunkInfo=function(e){e=this.chunkMap.get(e);e.index<e.totalChunks-1&&(e.index+=1,e.position+=this.chunk.size,e.retries=0)},h.prototype.removeChunkInfo=function(e){this.chunkMap.remove(e)},h.prototype.getChunkMetadata=function(e){var t=this.chunkMap.get(e.uid),e={chunkIndex:t.index,contentType:e.rawFile.type,fileName:e.name,fileSize:e.size,fileUid:e.uid,totalChunks:t.totalChunks};return JSON.stringify(e)},h.prototype.isChunkUploadComplete=function(e){e=this.chunkMap.get(e);return!!e&&e.index+1===e.totalChunks};var f=h;function h(e){this.http=e,this.cancelEvent=new c.EventEmitter,this.clearEvent=new c.EventEmitter,this.completeEvent=new c.EventEmitter,this.errorEvent=new c.EventEmitter,this.pauseEvent=new c.EventEmitter,this.removeEvent=new c.EventEmitter,this.resumeEvent=new c.EventEmitter,this.selectEvent=new c.EventEmitter,this.successEvent=new c.EventEmitter,this.uploadEvent=new c.EventEmitter,this.uploadProgressEvent=new c.EventEmitter,this.changeEvent=new c.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new j.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new j.HttpHeaders,saveMethod:"POST",saveUrl:"",withCredentials:!0},this.chunk={autoRetryAfter:100,size:1048576,maxAutoRetries:1,resumable:!0},this.component="Upload",this.chunkMap=new Ue,this.fileList=new K}f.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,deps:[{token:A.HttpClient}],target:o.ɵɵFactoryTarget.Injectable}),f.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:A.HttpClient}]}});g.prototype.action=function(e){e=e.keyCode;return this.keyBindings[e]},g.prototype.process=function(e){var t=this.action(e);t&&t(e.shiftKey)},g.prototype.computeKeys=function(e){var t,n=this;this.keyBindings=((t={})[u.Keys.Enter]=function(){return n.handleEnter()},t[u.Keys.Escape]=function(){return n.handleEscape()},t[u.Keys.Delete]=function(){return n.handleDelete()},t[u.Keys.Tab]=function(e){return n.handleTab(e)},t[u.Keys.ArrowUp]=function(){return n.handleUp()},t[u.Keys.ArrowDown]=function(){return n.handleDown()},t[this.invertKeys(e,u.Keys.ArrowLeft,u.Keys.ArrowRight)]=function(){return n.handleLeft()},t[this.invertKeys(e,u.Keys.ArrowRight,u.Keys.ArrowLeft)]=function(){return n.handleRight()},t)},g.prototype.invertKeys=function(e,t,n){return"rtl"===e?n:t},g.prototype.focusSelectButton=function(){this.focused=!0,this._focusedIndex=-1,this.onSelectButtonFocus.emit()},g.prototype.handleEnter=function(){0<=this.lastIndex&&(this.focusedIndex<=this.lastFileIndex?this.onFileAction.emit(u.Keys.Enter):this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&this.onActionButtonAction.emit(this.focusedIndex<this.lastIndex?"clear":"upload"))},g.prototype.handleDelete=function(){0<=this.focusedIndex&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(u.Keys.Delete)},g.prototype.handleEscape=function(){0<=this.focusedIndex&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(u.Keys.Escape)},g.prototype.handleLeft=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex&&(--this.focusedIndex,this.onActionButtonFocus.emit("clear"))},g.prototype.handleRight=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex-1&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("upload"))},g.prototype.handleTab=function(e){0<=this.focusedIndex&&e?this.focusedIndex=-1:this.onTab.emit()},g.prototype.handleDown=function(){if(0<=this.lastIndex&&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"))}},g.prototype.handleUp=function(){0<=this.lastIndex&&-1<this.focusedIndex&&(--this.focusedIndex,-1===this.focusedIndex?this.onSelectButtonFocus.emit():this.focusedIndex<=this.lastFileIndex?this.onFileFocus.emit(this.focusedIndex):this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&(this.focusedIndex=this.lastFileIndex,this.onFileFocus.emit(this.focusedIndex)))},Object.defineProperty(g.prototype,"focusedIndex",{get:function(){return this._focusedIndex},set:function(e){this.focused||this.onWrapperFocus.emit(),this._focusedIndex=e,this.focused=!0,0<=this._focusedIndex&&this._focusedIndex<=this.lastFileIndex&&this.onFileFocus.emit(e)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"lastFileIndex",{get:function(){return this.actionButtonsVisible?this.lastIndex-2:this.lastIndex},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"lastIndex",{get:function(){var e=this.uploadService.files.count;return this.actionButtonsVisible?e+1:e-1},enumerable:!1,configurable:!0});var m=g;function g(e){this.uploadService=e,this.onActionButtonAction=new c.EventEmitter,this.onActionButtonFocus=new c.EventEmitter,this.onFileAction=new c.EventEmitter,this.onFileFocus=new c.EventEmitter,this.onTab=new c.EventEmitter,this.onWrapperFocus=new c.EventEmitter,this.onSelectButtonFocus=new c.EventEmitter,this.actionButtonsVisible=!1,this.focused=!1,this._focusedIndex=-1}m.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:m,deps:[{token:f}],target:o.ɵɵFactoryTarget.Injectable}),m.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:m}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:m,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:f}]}});var d=function(e){this.templateRef=e},ze=(d.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:d,deps:[{token:o.TemplateRef}],target:o.ɵɵFactoryTarget.Directive}),d.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:d,selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]",ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:d,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}]}],ctorParameters:function(){return[{type:o.TemplateRef}]}}),{}),y=(Pe.prototype.addComponent=function(e,t){this.has(t)?ze[t].push(e):ze[t]=[e]},Pe.prototype.getComponents=function(e){return ze[e]},Pe.prototype.has=function(e){return e in ze},Pe);function Pe(){}y.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:y,deps:[],target:o.ɵɵFactoryTarget.Injectable}),y.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:y}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:y,decorators:[{type:c.Injectable}]});var v=function(e){this.templateRef=e},b=(v.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:v,deps:[{token:o.TemplateRef}],target:o.ɵɵFactoryTarget.Directive}),v.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:v,selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]",ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:v,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}]}],ctorParameters:function(){return[{type:o.TemplateRef}]}}),k.prototype.focus=function(){this.element.nativeElement.focus()},Object.defineProperty(k.prototype,"uidAttribute",{get:function(){return this.files[0].uid},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"tabIndex",{get:function(){return"-1"},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"kFileError",{get:function(){return this.files[0].state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"kFileInvalid",{get:function(){return ye(this.files)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"kFileProgress",{get:function(){return this.files[0].state===p.FileState.Uploading||this.files[0].state===p.FileState.Paused},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"kFileSuccess",{get:function(){return"Upload"===this.uploadService.component&&(this.files[0].state===p.FileState.Uploaded||this.files[0].state===p.FileState.Initial)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"kStateFocused",{get:function(){return this.focused},enumerable:!1,configurable:!0}),k.prototype.onFocus=function(){this.focused=!0},k.prototype.onBlur=function(){this.focused=!1},k.prototype.onClick=function(e){Se(e.target)||Fe(e.target,Te)||(this.navigationService.focusedIndex=this.index)},k);function k(e,t,n){this.navigationService=t,this.uploadService=n,this.fileClass=!0,this.focused=!1,this.element=e}b.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,deps:[{token:o.ElementRef},{token:m},{token:f}],target:o.ɵɵFactoryTarget.Directive}),b.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:b,selector:"[kendoUploadFileListItem]",inputs:{files:"files",index:"index"},host:{listeners:{focus:"onFocus()",blur:"onBlur()",click:"onClick($event)"},properties:{"class.k-file":"this.fileClass","attr.data-uid":"this.uidAttribute","attr.tabIndex":"this.tabIndex","class.k-file-error":"this.kFileError","class.k-file-invalid":"this.kFileInvalid","class.k-file-progress":"this.kFileProgress","class.k-file-success":"this.kFileSuccess","class.k-state-focused":"this.kStateFocused"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileListItem]"}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:m},{type:f}]},propDecorators:{files:[{type:c.Input}],index:[{type:c.Input}],fileClass:[{type:c.HostBinding,args:["class.k-file"]}],uidAttribute:[{type:c.HostBinding,args:["attr.data-uid"]}],tabIndex:[{type:c.HostBinding,args:["attr.tabIndex"]}],kFileError:[{type:c.HostBinding,args:["class.k-file-error"]}],kFileInvalid:[{type:c.HostBinding,args:["class.k-file-invalid"]}],kFileProgress:[{type:c.HostBinding,args:["class.k-file-progress"]}],kFileSuccess:[{type:c.HostBinding,args:["class.k-file-success"]}],kStateFocused:[{type:c.HostBinding,args:["class.k-state-focused"]}],onFocus:[{type:c.HostListener,args:["focus"]}],onBlur:[{type:c.HostListener,args:["blur"]}],onClick:[{type:c.HostListener,args:["click",["$event"]]}]}});Le.prototype.subscribeUploadProgress=function(e){this.uploadProgressSubscription=this.uploadService.uploadProgressEvent.subscribe(e)},Le.prototype.fileHasValidationErrors=ge,Le.prototype.filesHaveValidationErrors=ye,Le.prototype.ngOnDestroy=function(){this.uploadProgressSubscription.unsubscribe()},Le.prototype.getFileValidationMessage=function(e){var t;return t=e.validationErrors&&0<e.validationErrors.length?this.localization.get(e.validationErrors[0]):t},Le.prototype.getTotalFilesSizeMessage=function(e){var t,n=e,i=0;if("number"!=typeof n[0].size)return"";for(t=0;t<n.length;t++)n[t].size&&(i+=n[t].size);return(i/=1024)<1024?i.toFixed(2)+" KB":(i/1024).toFixed(2)+" MB"},Le.prototype.textFor=function(e){return this.localization.get(e)};var F=Le;function Le(e){this.uploadService=e,this.progressComplete=0}F.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:F,deps:[{token:f}],target:o.ɵɵFactoryTarget.Component}),F.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:F,selector:"ng-component",ngImport:o,template:"",isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:F,decorators:[{type:c.Component,args:[{template:""}]}],ctorParameters:function(){return[{type:f}]}});S.prototype.onFocus=function(e){"action"===e&&(this.actionFocused=!0),"retry"===e&&(this.retryFocused=!0),"pauseResume"===e&&(this.pauseResumeFocused=!0)},S.prototype.onBlur=function(e){"retry"===e&&(this.retryFocused=!1),"action"===e&&(this.actionFocused=!1),"pauseResume"===e&&(this.pauseResumeFocused=!1)},S.prototype.onRetryClick=function(){this.disabled||this.uploadService.retryFiles(this.file.uid)},S.prototype.onRemoveCancelClick=function(e){this.disabled||(e.stopImmediatePropagation(),e=this.file.uid,this.file.state===p.FileState.Uploading?this.uploadService.cancelFiles(e):this.uploadService.removeFiles(e),this.navigation.focusSelectButton())},S.prototype.onPauseResumeClick=function(){var e;this.disabled||(e=this.file.uid,this.file.state===p.FileState.Paused?this.uploadService.resumeFile(e):this.uploadService.pauseFile(e))},Object.defineProperty(S.prototype,"actionButtonTitle",{get:function(){return this.file.state===p.FileState.Uploading?this.localization.get("cancel"):this.localization.get("remove")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"retryButtonTitle",{get:function(){return this.localization.get("retry")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"pauseResumeButtonTitle",{get:function(){return this.file.state===p.FileState.Uploading?this.localization.get("pause"):this.localization.get("resume")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isUploading",{get:function(){return this.file.state===p.FileState.Uploading},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isFailed",{get:function(){return this.file.state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isPaused",{get:function(){return this.file.state===p.FileState.Paused},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isResumable",{get:function(){var e=this.uploadService,e=e.async.chunk&&e.chunk.resumable,t=this.file.state===p.FileState.Paused||this.file.state===p.FileState.Uploading;return e&&t},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isActionButtonVisible",{get:function(){return!!(this.file.state!==p.FileState.Uploaded&&this.file.state!==p.FileState.Initial||this.uploadService.async.removeUrl||"Upload"!==this.uploadService.component)},enumerable:!1,configurable:!0});var Oe=S;function S(e,t,n){this.uploadService=e,this.localization=t,this.navigation=n,this.actionFocused=!1,this.retryFocused=!1,this.pauseResumeFocused=!1}Oe.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Oe,deps:[{token:f},{token:s.LocalizationService},{token:m}],target:o.ɵɵFactoryTarget.Component}),Oe.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:{file:"file",disabled:"disabled",progress:"progress"},ngImport:o,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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-button-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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon k-button-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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick($event)">\n <span class="k-icon k-button-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 ',isInline:!0,directives:[{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Oe,decorators:[{type:c.Component,args:[{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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-button-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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon k-button-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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick($event)">\n <span class="k-icon k-button-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 '}]}],ctorParameters:function(){return[{type:f},{type:s.LocalizationService},{type:m}]},propDecorators:{file:[{type:c.Input}],disabled:[{type:c.Input}],progress:[{type:c.Input}]}});Object.defineProperty(Me.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:!1,configurable:!0});var I=Me;function Me(e){this.viewContainerRef=e}I.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,deps:[{token:o.ViewContainerRef}],target:o.ɵɵFactoryTarget.Directive}),I.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:I,selector:"[templateContext]",inputs:{templateContext:"templateContext"},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,decorators:[{type:c.Directive,args:[{selector:"[templateContext]"}]}],ctorParameters:function(){return[{type:o.ViewContainerRef}]},propDecorators:{templateContext:[{type:c.Input}]}});r(je,Re=F),Object.defineProperty(je.prototype,"fileStatusText",{get:function(){var e=this.file.validationErrors;return this.file.state===p.FileState.Uploaded?""+this.textFor("fileStatusUploaded"):this.file.state===p.FileState.Failed?""+this.textFor("fileStatusFailed"):Ie(e)?this.getFileValidationMessage(this.file):this.getTotalFilesSizeMessage([this.file])},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"showProgress",{get:function(){return this.file.state===p.FileState.Uploading||this.file.state===p.FileState.Paused?"active":"inactive"},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"fileGroupClass",{get:function(){var e,t=this.file.extension||"",n="k-i-file";for(e in xe)if(0<=xe[e].indexOf(t))return n+"-"+e;return n},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isUploadSuccessful",{get:function(){return this.file.state===p.FileState.Uploaded},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isUploadFailed",{get:function(){return this.file.state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isNotYetUploaded",{get:function(){return!this.isUploadFailed&&!this.isUploadSuccessful},enumerable:!1,configurable:!0});var Re,Ve=je;function je(e,t){var n=Re.call(this,t)||this;return n.localization=e,n.subscribeUploadProgress(function(e){e.files[0].uid===n.file.uid&&(n.progressComplete=e.percentComplete)}),n}Ve.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ve,deps:[{token:s.LocalizationService},{token:f}],target:o.ɵɵFactoryTarget.Component}),Ve.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Ve,selector:"kendo-upload-file-list-single-item",inputs:{disabled:"disabled",file:"file",fileInfoTemplate:"fileInfoTemplate"},usesInheritance:!0,ngImport:o,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 ',isInline:!0,components:[{type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:["file","disabled","progress"]}],directives:[{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}],animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.animate("1s 2s ease-out"))])]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ve,decorators:[{type:c.Component,args:[{animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.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 '}]}],ctorParameters:function(){return[{type:s.LocalizationService},{type:f}]},propDecorators:{disabled:[{type:c.Input}],file:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}]}});r(Ae,He=F),Object.defineProperty(Ae.prototype,"showProgress",{get:function(){return this.files[0].state===p.FileState.Uploading||this.files[0].state===p.FileState.Paused?"active":"inactive"},enumerable:!1,configurable:!0}),Ae.prototype.ngOnInit=function(){this.filesHaveErrors=He.prototype.filesHaveValidationErrors.call(this,this.files)},Ae.prototype.fileStatusText=function(e){var t=e.validationErrors;return Ie(t)?this.getFileValidationMessage(e):this.getTotalFilesSizeMessage([e])},Object.defineProperty(Ae.prototype,"batchStatusText",{get:function(){var e=this.files[0].state,t=this.files.length;return e===p.FileState.Uploaded?t+" "+this.textFor("filesBatchStatusUploaded"):e===p.FileState.Failed?t+" "+this.textFor("filesBatchStatusFailed"):t+" "+this.textFor("filesBatchStatus")},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isUploadSuccessful",{get:function(){return this.files[0].state===p.FileState.Uploaded},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"isUploadFailed",{get:function(){return this.files[0].state===p.FileState.Failed},enumerable:!1,configurable:!0});var He,F=Ae;function Ae(e,t){var n=He.call(this,t)||this;return n.localization=e,n.subscribeUploadProgress(function(e){e.files[0].uid===n.files[0].uid&&(n.progressComplete=e.percentComplete)}),n}F.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:F,deps:[{token:s.LocalizationService},{token:f}],target:o.ɵɵFactoryTarget.Component}),F.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:F,selector:"kendo-upload-file-list-multiple-items",inputs:{disabled:"disabled",files:"files",fileInfoTemplate:"fileInfoTemplate"},usesInheritance:!0,ngImport:o,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 ',isInline:!0,components:[{type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:["file","disabled","progress"]}],directives:[{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:a.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}],animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.animate("1s 2s ease-out"))])]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:F,decorators:[{type:c.Component,args:[{animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.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 '}]}],ctorParameters:function(){return[{type:s.LocalizationService},{type:f}]},propDecorators:{disabled:[{type:c.Input}],files:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}]}});Ne.prototype.onItemFocus=function(){var t=this;this.focusSubscription=this.navigation.onFileFocus.subscribe(function(e){t.fileListItems.toArray()[e].focus()})},Ne.prototype.onItemAction=function(){var t=this;this.actionSubscription=this.navigation.onFileAction.subscribe(function(e){t.itemActionHandler(e)})},Ne.prototype.itemActionHandler=function(e){var t=this.navigation.focusedIndex,t=this.fileListItems.toArray()[t],n=t.uidAttribute,i=this.uploadService.files.get(n);if(e===u.Keys.Escape&&i[0].state===p.FileState.Uploading)return this.uploadService.cancelFiles(n),void this.navigation.focusSelectButton();e===u.Keys.Enter&&i[0].state===p.FileState.Failed?this.uploadService.retryFiles(n):e===u.Keys.Delete&&(i[0].state===p.FileState.Uploading?this.uploadService.cancelFiles(n):this.hasDelete(t)&&this.uploadService.removeFiles(n),this.navigation.focusSelectButton())},Ne.prototype.hasDelete=function(e){return 0<e.element.nativeElement.getElementsByClassName("k-delete").length},Ne.prototype.ngOnDestroy=function(){this.focusSubscription.unsubscribe(),this.actionSubscription.unsubscribe()};n=Ne;function Ne(e,t){this.uploadService=e,this.navigation=t,this.onItemFocus(),this.onItemAction()}n.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:n,deps:[{token:f},{token:m}],target:o.ɵɵFactoryTarget.Component}),n.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:n,selector:"[kendo-upload-file-list]",inputs:{disabled:"disabled",fileList:"fileList",fileTemplate:"fileTemplate",fileInfoTemplate:"fileInfoTemplate"},viewQueries:[{propertyName:"fileListItems",predicate:b,descendants:!0}],ngImport:o,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 ",isInline:!0,components:[{type:Ve,selector:"kendo-upload-file-list-single-item",inputs:["disabled","file","fileInfoTemplate"]},{type:F,selector:"kendo-upload-file-list-multiple-items",inputs:["disabled","files","fileInfoTemplate"]}],directives:[{type:a.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:b,selector:"[kendoUploadFileListItem]",inputs:["files","index"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:n,decorators:[{type:c.Component,args:[{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 "}]}],ctorParameters:function(){return[{type:f},{type:m}]},propDecorators:{disabled:[{type:c.Input}],fileList:[{type:c.Input}],fileTemplate:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}],fileListItems:[{type:c.ViewChildren,args:[b]}]}});r(Ze,_e=t.ComponentMessages);var _e,C=Ze;function Ze(){return null!==_e&&_e.apply(this,arguments)||this}C.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,deps:null,target:o.ɵɵFactoryTarget.Directive}),C.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:C,inputs:{cancel:"cancel",clearSelectedFiles:"clearSelectedFiles",dropFilesHere:"dropFilesHere",externalDropFilesHere:"externalDropFilesHere",filesBatchStatus:"filesBatchStatus",filesBatchStatusFailed:"filesBatchStatusFailed",filesBatchStatusUploaded:"filesBatchStatusUploaded",fileStatusFailed:"fileStatusFailed",fileStatusUploaded:"fileStatusUploaded",headerStatusPaused:"headerStatusPaused",headerStatusUploaded:"headerStatusUploaded",headerStatusUploading:"headerStatusUploading",invalidFileExtension:"invalidFileExtension",invalidMaxFileSize:"invalidMaxFileSize",invalidMinFileSize:"invalidMinFileSize",pause:"pause",remove:"remove",resume:"resume",retry:"retry",select:"select",uploadSelectedFiles:"uploadSelectedFiles"},usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,decorators:[{type:c.Directive}],propDecorators:{cancel:[{type:c.Input}],clearSelectedFiles:[{type:c.Input}],dropFilesHere:[{type:c.Input}],externalDropFilesHere:[{type:c.Input}],filesBatchStatus:[{type:c.Input}],filesBatchStatusFailed:[{type:c.Input}],filesBatchStatusUploaded:[{type:c.Input}],fileStatusFailed:[{type:c.Input}],fileStatusUploaded:[{type:c.Input}],headerStatusPaused:[{type:c.Input}],headerStatusUploaded:[{type:c.Input}],headerStatusUploading:[{type:c.Input}],invalidFileExtension:[{type:c.Input}],invalidMaxFileSize:[{type:c.Input}],invalidMinFileSize:[{type:c.Input}],pause:[{type:c.Input}],remove:[{type:c.Input}],resume:[{type:c.Input}],retry:[{type:c.Input}],select:[{type:c.Input}],uploadSelectedFiles:[{type:c.Input}]}});r($e,Ke=C);var Ke,x=$e;function $e(e){var t=Ke.call(this)||this;return t.service=e,t}x.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:x,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Directive}),x.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n ",providers:[{provide:C,useExisting:c.forwardRef(function(){return x})}],usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:x,decorators:[{type:c.Directive,args:[{providers:[{provide:C,useExisting:c.forwardRef(function(){return x})}],selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "}]}],ctorParameters:function(){return[{type:s.LocalizationService}]}});function qe(e,t){for(var n,i,o,s=t.allowedExtensions.map(function(e){return("."===e.substring(0,1)?e:"."+e).toLowerCase()}),a=t.maxFileSize,r=t.minFileSize,l=0;l<e.length;l++)i=e[l],0<(o=s).length&&o.indexOf(i.extension.toLowerCase())<0&&(i.validationErrors=i.validationErrors||[],i.validationErrors.indexOf(Xe)<0&&i.validationErrors.push(Xe)),o=e[l],i=a,0!==(n=r)&&o.size<n&&(o.validationErrors=o.validationErrors||[],o.validationErrors.indexOf(Ge)<0&&o.validationErrors.push(Ge)),0!==i&&o.size>i&&(o.validationErrors=o.validationErrors||[],o.validationErrors.indexOf(We)<0&&o.validationErrors.push(We))}var We="invalidMaxFileSize",Ge="invalidMinFileSize",Xe="invalidFileExtension",E=(Qe.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},Qe.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},Qe.prototype.calculateTimeDiff=function(e){return(new Date).getTime()-e.getTime()},Qe.prototype.addClass=function(e){this.renderer.addClass(this.element.nativeElement,e)},Qe.prototype.removeClass=function(e){this.renderer.removeClass(this.element.nativeElement,e)},Qe);function Qe(e,t,n){this.element=e,this.renderer=t,this.hideIntervalElement=null,this.hoverClass=n}E.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:"hoverClass"}],target:o.ɵɵFactoryTarget.Directive}),E.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:E,host:{listeners:{dragenter:"onElementDragEnterListener()",dragover:"onElementDragOverListener()"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,decorators:[{type:c.Directive}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:void 0,decorators:[{type:c.Inject,args:["hoverClass"]}]}]},propDecorators:{onElementDragEnterListener:[{type:c.HostListener,args:["dragenter"]}],onElementDragOverListener:[{type:c.HostListener,args:["dragover"]}]}});r(Je,Ye=E),Je.prototype.ngOnDestroy=function(){var e=this;this.ngZone.runOutsideAngular(function(){e.unsubscribeDocumentDragEnter&&e.unsubscribeDocumentDragEnter(),e.unsubscribeDocumentDragOver&&e.unsubscribeDocumentDragOver()})},Je.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},Je.prototype.onDocumentDragOver=function(){return this.lastDragDocument=new Date,!1},Je.prototype.onDropListener=function(e){var e=e.dataTransfer.files;return 0<e.length&&!this.disabled&&(e=me(e),e=be(e,!this.uploadService.async.batch),this.multiple||(e.splice(1,e.length-1),this.uploadService.clearFiles()),qe(e,this.restrictions),this.uploadService.addFiles(e)),!1};var Ye,D=Je;function Je(e,t,n,i){var o=Ye.call(this,e,t,"k-dropzone-hover")||this;return o.ngZone=n,o.uploadService=i,o.initialClassName=!0,o.hideIntervalDocument=null,o.activeClass="k-dropzone-active",o.ngZone.runOutsideAngular(function(){o.unsubscribeDocumentDragEnter=o.renderer.listen("document","dragenter",function(){return o.onDocumentDragEnter()}),o.unsubscribeDocumentDragOver=o.renderer.listen("document","dragover",function(){return o.onDocumentDragOver()})}),o}D.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:o.NgZone},{token:f}],target:o.ɵɵFactoryTarget.Directive}),D.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:{disabled:"disabled",multiple:"multiple",restrictions:"restrictions"},host:{listeners:{drop:"onDropListener($event)"},properties:{"class.k-dropzone":"this.initialClassName"}},usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,decorators:[{type:c.Directive,args:[{selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n "}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:o.NgZone},{type:f}]},propDecorators:{disabled:[{type:c.Input}],multiple:[{type:c.Input}],restrictions:[{type:c.Input}],initialClassName:[{type:c.HostBinding,args:["class.k-dropzone"]}],onDropListener:[{type:c.HostListener,args:["drop",["$event"]]}]}});Object.defineProperty(tt.prototype,"nameAttribute",{get:function(){return this.uploadService.async.saveField},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!1,configurable:!0}),tt.prototype.onInputChange=function(e){var t=this,n=navigator.userAgent,e=ve(e.target),e=be(e,!this.uploadService.async.batch),e=(qe(e,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(e),this.element.nativeElement);(n.match(/(webkit)[ \/]([\w.]+)/i)||n.match(/(windows)[ \/]([\w.]+)/i))&&(e.type="",e.type="file"),setTimeout(function(){t.navigation.focusedIndex=-1})};var et=tt;function tt(e,t,n){this.uploadService=e,this.navigation=t,this.type="file",this.autocomplete="off",this.tabIndex=-1,this.element=n}et.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:et,deps:[{token:f},{token:m},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Directive}),et.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:et,selector:"[kendoFileSelect]",inputs:{dir:"dir",disabled:"disabled",multiple:"multiple",restrictions:"restrictions"},host:{listeners:{change:"onInputChange($event)"},properties:{"attr.type":"this.type","attr.autocomplete":"this.autocomplete","attr.tabindex":"this.tabIndex","attr.name":"this.nameAttribute","attr.multiple":"this.multipleAttribute","attr.dir":"this.dirAttribute","attr.disabled":"this.disabledAttribute"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:et,decorators:[{type:c.Directive,args:[{selector:"[kendoFileSelect]"}]}],ctorParameters:function(){return[{type:f},{type:m},{type:o.ElementRef}]},propDecorators:{dir:[{type:c.Input}],disabled:[{type:c.Input}],multiple:[{type:c.Input}],restrictions:[{type:c.Input}],type:[{type:c.HostBinding,args:["attr.type"]}],autocomplete:[{type:c.HostBinding,args:["attr.autocomplete"]}],tabIndex:[{type:c.HostBinding,args:["attr.tabindex"]}],nameAttribute:[{type:c.HostBinding,args:["attr.name"]}],multipleAttribute:[{type:c.HostBinding,args:["attr.multiple"]}],dirAttribute:[{type:c.HostBinding,args:["attr.dir"]}],disabledAttribute:[{type:c.HostBinding,args:["attr.disabled"]}],onInputChange:[{type:c.HostListener,args:["change",["$event"]]}]}});var T={multi:!0,provide:e.NG_VALUE_ACCESSOR,useExisting:c.forwardRef(function(){return w})},w=(Object.defineProperty(U.prototype,"name",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){e=Object.assign({},this._restrictions,e);this._restrictions=e},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"dir",{get:function(){return this.direction},enumerable:!1,configurable:!0}),U.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.wrapper,"tabindex"),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},U.prototype.textFor=function(e){return this.localization.get(e)},U.prototype.focus=function(){var e=this;setTimeout(function(){e.fileSelectButton.nativeElement.focus()})},U.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()},U.prototype.handleKeydown=function(e){if(!this.disabled)return e.keyCode!==u.Keys.Enter&&e.keyCode!==u.Keys.Space||e.target!==this.fileSelectButton.nativeElement?void(!Fe(e.target,we)&&(Se(e.target)||Fe(e.target,Te))||this.navigation.process(e)):(e.preventDefault(),void this.fileSelect.nativeElement.click())},U.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach(function(e){(e=e)instanceof File||de(e)||(t=!1)}),t&&this.uploadService.addInitialFileSelectFiles(e)),null===e&&this.fileList.clear(),this.cdr.markForCheck()},U.prototype.registerOnChange=function(e){this.onChangeCallback=e},U.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},U.prototype.setDisabledState=function(e){this.disabled=e},U.prototype.removeFileByUid=function(e){this.uploadService.removeFiles(e)},U.prototype.clearFiles=function(){this.uploadService.clearFiles()},U.prototype.isEmpty=function(){return!1},U.prototype.addFiles=function(e){this.uploadService.addFiles(e)},Object.defineProperty(U.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabindex},enumerable:!1,configurable:!0}),U.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},U.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},U.prototype.subscribeBlur=function(){var t=this;u.isDocumentAvailable()&&this.ngZone.runOutsideAngular(function(){t.documentClick=M.fromEvent(document,"click").pipe(R.filter(function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))})),t.blurSubscription=M.merge(t.documentClick,t.navigation.onTab).subscribe(function(){t.navigation.focused&&t.ngZone.run(function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()})})})},U.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()})},U.prototype.attachEventHandlers=function(){var n=this;this.subs=this.uploadService.changeEvent.subscribe(function(e){var t=[];null!==e&&e.forEach(function(e){e.state===p.FileState.Initial&&t.push(e),e.state===p.FileState.Selected&&e.rawFile&&!e.validationErrors&&t.push(e.rawFile)}),0===t.length&&(t=null),n.onChangeCallback(t),n.valueChange.emit(t)}),this.subs.add(this.uploadService.removeEvent.subscribe(function(e){n.remove.emit(e)})),this.subs.add(this.uploadService.selectEvent.subscribe(function(e){n.select.emit(e)}))},U.prototype.setDefaultSettings=function(){this.uploadService.async.autoUpload=!1,this.uploadService.component="FileSelect"},U);function U(e,t,n,i,o,s,a,r){var l=this;this.uploadService=e,this.localization=t,this.navigation=n,this.dropZoneService=i,this.ngZone=o,this.renderer=s,this.cdr=a,this.disabled=!1,this.multiple=!0,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+u.guid(),this.onBlur=new c.EventEmitter,this.onFocus=new c.EventEmitter,this.select=new c.EventEmitter,this.remove=new c.EventEmitter,this.valueChange=new c.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},V.validatePackage(N),this.wrapper=r.nativeElement,this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe(function(e){e=e.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)}),this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers(),this.setDefaultSettings()}w.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,deps:[{token:f},{token:s.LocalizationService},{token:m},{token:y},{token:o.NgZone},{token:o.Renderer2},{token:o.ChangeDetectorRef},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Component}),w.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:w,selector:"kendo-fileselect",inputs:{accept:"accept",disabled:"disabled",multiple:"multiple",name:"name",showFileList:"showFileList",tabindex:"tabindex",restrictions:"restrictions",zoneId:"zoneId",focusableId:"focusableId"},outputs:{onBlur:"blur",onFocus:"focus",select:"select",remove:"remove",valueChange:"valueChange"},host:{listeners:{keydown:"handleKeydown($event)"},properties:{"class.k-widget":"this.hostDefaultClasses","class.k-upload":"this.hostDefaultClasses","class.k-disabled":"this.hostDisabledClass","attr.dir":"this.dir"}},providers:[t.LocalizationService,m,f,y,T,{provide:t.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return w})}],queries:[{propertyName:"fileTemplate",first:!0,predicate:d,descendants:!0},{propertyName:"fileInfoTemplate",first:!0,predicate:v,descendants:!0}],viewQueries:[{propertyName:"fileSelect",first:!0,predicate:["fileSelect"],descendants:!0,static:!0},{propertyName:"fileSelectButton",first:!0,predicate:["fileSelectButton"],descendants:!0,static:!0}],exportAs:["kendoFileSelect"],ngImport:o,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-button-md k-rounded-md k-button-solid k-button-solid-base 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 ',isInline:!0,components:[{type:n,selector:"[kendo-upload-file-list]",inputs:["disabled","fileList","fileTemplate","fileInfoTemplate"]}],directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:["disabled","multiple","restrictions"]},{type:et,selector:"[kendoFileSelect]",inputs:["dir","disabled","multiple","restrictions"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,decorators:[{type:c.Component,args:[{exportAs:"kendoFileSelect",providers:[t.LocalizationService,m,f,y,T,{provide:t.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return w})}],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-button-md k-rounded-md k-button-solid k-button-solid-base 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 '}]}],ctorParameters:function(){return[{type:f},{type:s.LocalizationService},{type:m},{type:y},{type:o.NgZone},{type:o.Renderer2},{type:o.ChangeDetectorRef},{type:o.ElementRef}]},propDecorators:{accept:[{type:c.Input}],disabled:[{type:c.Input}],multiple:[{type:c.Input}],name:[{type:c.Input}],showFileList:[{type:c.Input}],tabindex:[{type:c.Input}],restrictions:[{type:c.Input}],zoneId:[{type:c.Input}],focusableId:[{type:c.Input}],fileTemplate:[{type:c.ContentChild,args:[d,{static:!1}]}],fileInfoTemplate:[{type:c.ContentChild,args:[v,{static:!1}]}],fileSelect:[{type:c.ViewChild,args:["fileSelect",{static:!0}]}],fileSelectButton:[{type:c.ViewChild,args:["fileSelectButton",{static:!0}]}],onBlur:[{type:c.Output,args:["blur"]}],onFocus:[{type:c.Output,args:["focus"]}],select:[{type:c.Output}],remove:[{type:c.Output}],valueChange:[{type:c.Output}],hostDefaultClasses:[{type:c.HostBinding,args:["class.k-widget"]},{type:c.HostBinding,args:["class.k-upload"]}],hostDisabledClass:[{type:c.HostBinding,args:["class.k-disabled"]}],dir:[{type:c.HostBinding,args:["attr.dir"]}],handleKeydown:[{type:c.HostListener,args:["keydown",["$event"]]}]}});r(it,nt=C),Object.defineProperty(it.prototype,"override",{get:function(){return!0},enumerable:!1,configurable:!0});var nt,B=it;function it(e){var t=nt.call(this)||this;return t.service=e,t}B.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:B,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),B.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:B,selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",providers:[{provide:C,useExisting:c.forwardRef(function(){return B})}],usesInheritance:!0,ngImport:o,template:"",isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:B,decorators:[{type:c.Component,args:[{providers:[{provide:C,useExisting:c.forwardRef(function(){return B})}],selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",template:""}]}],ctorParameters:function(){return[{type:s.LocalizationService}]}});ot.prototype.ngDoCheck=function(){this.isPaused=this.fileList.hasFileWithState([p.FileState.Paused]),this.isFailed=this.fileList.hasFileWithState([p.FileState.Failed]),this.isUploading=this.fileList.hasFileWithState([p.FileState.Uploading]),this.isPaused&&!this.isUploading?this.statusText=this.localization.get("headerStatusPaused"):this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded")};T=ot;function ot(e){this.localization=e}T.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:T,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),T.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:T,selector:"kendo-upload-status-total",inputs:{fileList:"fileList"},ngImport:o,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 ",isInline:!0,directives:[{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:T,decorators:[{type:c.Component,args:[{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 "}]}],ctorParameters:function(){return[{type:s.LocalizationService}]},propDecorators:{fileList:[{type:c.Input}]}});Object.defineProperty(z.prototype,"actionButtonsEndClassName",{get:function(){return"end"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsStretchedClassName",{get:function(){return"stretched"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsStartClassName",{get:function(){return"start"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsCenterClassName",{get:function(){return"center"===this.actionsLayout},enumerable:!1,configurable:!0}),z.prototype.onAction=function(){var t=this;this.actionSubscription=this.navigation.onActionButtonAction.subscribe(function(e){"clear"===e?t.clearFiles():t.performUpload()})},z.prototype.onFocus=function(){var t=this;this.focusSubscription=this.navigation.onActionButtonFocus.subscribe(function(e){t.focusButton(e)})},z.prototype.focusButton=function(e){("clear"===e?this.clearButton:this.uploadButton).nativeElement.focus()},z.prototype.ngOnDestroy=function(){this.actionSubscription.unsubscribe(),this.focusSubscription.unsubscribe()},z.prototype.onUploadButtonClick=function(e){e.stopImmediatePropagation(),this.performUpload()},z.prototype.performUpload=function(){this.disabled||(this.uploadService.uploadFiles(),this.navigation.focusSelectButton())},z.prototype.onClearButtonClick=function(e){e.stopImmediatePropagation(),this.clearFiles()},z.prototype.clearFiles=function(){this.disabled||(this.uploadService.clearFiles(),this.navigation.focusSelectButton())},z.prototype.textFor=function(e){return this.localization.get(e)};C=z;function z(e,t,n){this.uploadService=e,this.localization=t,this.navigation=n,this.hostDefaultClass=!0,this.onAction(),this.onFocus()}C.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,deps:[{token:f},{token:s.LocalizationService},{token:m}],target:o.ɵɵFactoryTarget.Component}),C.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"kendo-upload-action-buttons",inputs:{disabled:"disabled",actionsLayout:"actionsLayout"},host:{properties:{"class.k-actions":"this.hostDefaultClass","class.k-actions-end":"this.actionButtonsEndClassName","class.k-actions-stretched":"this.actionButtonsStretchedClassName","class.k-actions-start":"this.actionButtonsStartClassName","class.k-actions-center":"this.actionButtonsCenterClassName"}},viewQueries:[{propertyName:"clearButton",first:!0,predicate:["clearButton"],descendants:!0,static:!0},{propertyName:"uploadButton",first:!0,predicate:["uploadButton"],descendants:!0,static:!0}],ngImport:o,template:'\n <button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="onClearButtonClick($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="onUploadButtonClick($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n ',isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,decorators:[{type:c.Component,args:[{selector:"kendo-upload-action-buttons",template:'\n <button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="onClearButtonClick($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="onUploadButtonClick($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}]}],ctorParameters:function(){return[{type:f},{type:s.LocalizationService},{type:m}]},propDecorators:{disabled:[{type:c.Input}],actionsLayout:[{type:c.Input}],clearButton:[{type:c.ViewChild,args:["clearButton",{static:!0}]}],uploadButton:[{type:c.ViewChild,args:["uploadButton",{static:!0}]}],hostDefaultClass:[{type:c.HostBinding,args:["class.k-actions"]}],actionButtonsEndClassName:[{type:c.HostBinding,args:["class.k-actions-end"]}],actionButtonsStretchedClassName:[{type:c.HostBinding,args:["class.k-actions-stretched"]}],actionButtonsStartClassName:[{type:c.HostBinding,args:["class.k-actions-start"]}],actionButtonsCenterClassName:[{type:c.HostBinding,args:["class.k-actions-center"]}]}});var e={multi:!0,provide:e.NG_VALUE_ACCESSOR,useExisting:c.forwardRef(function(){return P})},P=(Object.defineProperty(L.prototype,"autoUpload",{get:function(){return this.uploadService.async.autoUpload},set:function(e){this.uploadService.async.autoUpload=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"batch",{get:function(){return this.uploadService.async.batch},set:function(e){this.uploadService.async.batch=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"withCredentials",{get:function(){return this.uploadService.async.withCredentials},set:function(e){this.uploadService.async.withCredentials=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"saveField",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"saveHeaders",{get:function(){return this.uploadService.async.saveHeaders},set:function(e){this.uploadService.async.saveHeaders=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"saveMethod",{get:function(){return this.uploadService.async.saveMethod},set:function(e){this.uploadService.async.saveMethod=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"saveUrl",{get:function(){return this.uploadService.async.saveUrl},set:function(e){this.uploadService.async.saveUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"responseType",{get:function(){return this.uploadService.async.responseType},set:function(e){this.uploadService.async.responseType=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"removeField",{get:function(){return this.uploadService.async.removeField},set:function(e){this.uploadService.async.removeField=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"removeHeaders",{get:function(){return this.uploadService.async.removeHeaders},set:function(e){this.uploadService.async.removeHeaders=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"removeMethod",{get:function(){return this.uploadService.async.removeMethod},set:function(e){this.uploadService.async.removeMethod=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"removeUrl",{get:function(){return this.uploadService.async.removeUrl},set:function(e){this.uploadService.async.removeUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"concurrent",{get:function(){return this.uploadService.async.concurrent},set:function(e){this.uploadService.async.concurrent=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"tabIndex",{get:function(){return this.tabindex},set:function(e){this.tabindex=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){e=Object.assign({},this._restrictions,e);this._restrictions=e},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"dir",{get:function(){return this.direction},enumerable:!1,configurable:!0}),L.prototype.ngOnInit=function(){this.verifySettings(),this.renderer.removeAttribute(this.wrapper,"tabindex"),this.uploadService.setChunkSettings(this.chunkable),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},L.prototype.ngOnChanges=function(e){u.isChanged("chunkable",e)&&("boolean"==typeof(e=e.chunkable.currentValue)&&(this.uploadService.async.chunk=e),"object"==typeof e&&null!==e&&(this.uploadService.async.chunk=!0,this.uploadService.chunk=Object.assign({},this.uploadService.chunk,e)))},L.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()},L.prototype.handleKeydown=function(e){if(!this.disabled)return e.keyCode!==u.Keys.Enter&&e.keyCode!==u.Keys.Space||e.target!==this.fileSelectButton.nativeElement?void(!Fe(e.target,we)&&(Se(e.target)||Fe(e.target,Te))||this.navigation.process(e)):(e.preventDefault(),void this.fileSelect.nativeElement.click())},L.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach(function(e){de(e)||(t=!1)}),t&&this.uploadService.addInitialFiles(e)),null===e&&this.fileList.clear(),this.cdr.markForCheck()},L.prototype.registerOnChange=function(e){this.onChangeCallback=e},L.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},L.prototype.setDisabledState=function(e){this.disabled=e},Object.defineProperty(L.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabIndex},enumerable:!1,configurable:!0}),L.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},L.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},Object.defineProperty(L.prototype,"showActionButtons",{get:function(){var e,t,n=!1;return this.autoUpload||(e=0<this.fileList.filesToUpload.length,t=this.fileList.hasFileWithState([p.FileState.Uploading]),this.concurrent&&e&&(n=!0),this.concurrent||!e||t||(n=!0)),this.navigation.actionButtonsVisible=n},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"showTotalStatus",{get:function(){var e=[p.FileState.Uploaded,p.FileState.Uploading,p.FileState.Failed,p.FileState.Paused];return!!this.fileList.hasFileWithState(e)},enumerable:!1,configurable:!0}),L.prototype.textFor=function(e){return this.localization.get(e)},L.prototype.focus=function(){var e=this;setTimeout(function(){e.fileSelectButton.nativeElement.focus()})},L.prototype.focusComponent=function(){this.focus()},L.prototype.blur=function(){this.navigation.focused&&(this.navigation.focused=!1,document.activeElement.blur(),this.onBlur.emit())},L.prototype.blurComponent=function(){this.blur()},L.prototype.pauseFileByUid=function(e){this.uploadService.pauseFile(e)},L.prototype.resumeFileByUid=function(e){this.uploadService.resumeFile(e)},L.prototype.removeFilesByUid=function(e){this.uploadService.removeFiles(e)},L.prototype.retryUploadByUid=function(e){this.uploadService.retryFiles(e)},L.prototype.cancelUploadByUid=function(e){this.uploadService.cancelFiles(e)},L.prototype.uploadFiles=function(){this.fileList.filesToUpload.length&&this.uploadService.uploadFiles()},L.prototype.clearFiles=function(){this.uploadService.clearFiles()},L.prototype.addFiles=function(e){this.uploadService.addFiles(e)},L.prototype.isEmpty=function(){return!1},L.prototype.verifySettings=function(){if(c.isDevMode()&&this.batch&&!1!==this.chunkable)throw new Error("The file chunking functionality requires the batch setting to be disabled.")},L.prototype.subscribeBlur=function(){var t=this;u.isDocumentAvailable()&&this._ngZone.runOutsideAngular(function(){t.documentClick=M.fromEvent(document,"click").pipe(R.filter(function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))})),t.blurSubscription=M.merge(t.documentClick,t.navigation.onTab).subscribe(function(){t.navigation.focused&&t._ngZone.run(function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()})})})},L.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()})},L.prototype.attachEventHandlers=function(){var t=this;this.subs=this.uploadService.cancelEvent.subscribe(function(e){t.cancel.emit(e)}),this.subs.add(this.uploadService.changeEvent.subscribe(function(e){t.onChangeCallback(e),t.valueChange.emit(e)})),this.subs.add(this.uploadService.clearEvent.subscribe(function(e){t.clear.emit(e)})),this.subs.add(this.uploadService.completeEvent.subscribe(function(){t.complete.emit()})),this.subs.add(this.uploadService.errorEvent.subscribe(function(e){t.error.emit(e)})),this.subs.add(this.uploadService.pauseEvent.subscribe(function(e){t.pause.emit(e)})),this.subs.add(this.uploadService.removeEvent.subscribe(function(e){t.remove.emit(e)})),this.subs.add(this.uploadService.resumeEvent.subscribe(function(e){t.resume.emit(e)})),this.subs.add(this.uploadService.selectEvent.subscribe(function(e){t.select.emit(e)})),this.subs.add(this.uploadService.successEvent.subscribe(function(e){t.success.emit(e)})),this.subs.add(this.uploadService.uploadEvent.subscribe(function(e){t.upload.emit(e)})),this.subs.add(this.uploadService.uploadProgressEvent.subscribe(function(e){t.uploadProgress.emit(e)}))},L);function L(e,t,n,i,o,s,a,r){var l=this;this.uploadService=e,this.localization=t,this.navigation=n,this.dropZoneService=i,this._ngZone=o,this.renderer=s,this.cdr=a,this.chunkable=!1,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+u.guid(),this.actionsLayout="end",this.onBlur=new c.EventEmitter,this.cancel=new c.EventEmitter,this.clear=new c.EventEmitter,this.complete=new c.EventEmitter,this.error=new c.EventEmitter,this.onFocus=new c.EventEmitter,this.pause=new c.EventEmitter,this.remove=new c.EventEmitter,this.resume=new c.EventEmitter,this.select=new c.EventEmitter,this.success=new c.EventEmitter,this.upload=new c.EventEmitter,this.uploadProgress=new c.EventEmitter,this.valueChange=new c.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},V.validatePackage(N),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe(function(e){e=e.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)}),this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.wrapper=r.nativeElement,this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers()}P.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:P,deps:[{token:f},{token:s.LocalizationService},{token:m},{token:y},{token:o.NgZone},{token:o.Renderer2},{token:o.ChangeDetectorRef},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Component}),P.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:P,selector:"kendo-upload",inputs:{autoUpload:"autoUpload",batch:"batch",withCredentials:"withCredentials",saveField:"saveField",saveHeaders:"saveHeaders",saveMethod:"saveMethod",saveUrl:"saveUrl",responseType:"responseType",removeField:"removeField",removeHeaders:"removeHeaders",removeMethod:"removeMethod",removeUrl:"removeUrl",chunkable:"chunkable",concurrent:"concurrent",multiple:"multiple",disabled:"disabled",showFileList:"showFileList",tabindex:"tabindex",zoneId:"zoneId",tabIndex:"tabIndex",accept:"accept",restrictions:"restrictions",focusableId:"focusableId",actionsLayout:"actionsLayout"},outputs:{onBlur:"blur",cancel:"cancel",clear:"clear",complete:"complete",error:"error",onFocus:"focus",pause:"pause",remove:"remove",resume:"resume",select:"select",success:"success",upload:"upload",uploadProgress:"uploadProgress",valueChange:"valueChange"},host:{listeners:{keydown:"handleKeydown($event)"},properties:{"class.k-widget":"this.hostDefaultClasses","class.k-upload":"this.hostDefaultClasses","class.k-disabled":"this.hostDisabledClass","attr.dir":"this.dir"}},providers:[t.LocalizationService,m,f,y,e,{provide:t.L10N_PREFIX,useValue:"kendo.upload"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return P})}],queries:[{propertyName:"fileTemplate",first:!0,predicate:d,descendants:!0},{propertyName:"fileInfoTemplate",first:!0,predicate:v,descendants:!0}],viewQueries:[{propertyName:"fileSelect",first:!0,predicate:["fileSelect"],descendants:!0,static:!0},{propertyName:"fileSelectButton",first:!0,predicate:["fileSelectButton"],descendants:!0,static:!0}],exportAs:["kendoUpload"],usesOnChanges:!0,ngImport:o,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-button-md k-rounded-md k-button-solid k-button-solid-base 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 ',isInline:!0,components:[{type:T,selector:"kendo-upload-status-total",inputs:["fileList"]},{type:n,selector:"[kendo-upload-file-list]",inputs:["disabled","fileList","fileTemplate","fileInfoTemplate"]},{type:C,selector:"kendo-upload-action-buttons",inputs:["disabled","actionsLayout"]}],directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:["disabled","multiple","restrictions"]},{type:et,selector:"[kendoFileSelect]",inputs:["dir","disabled","multiple","restrictions"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:P,decorators:[{type:c.Component,args:[{exportAs:"kendoUpload",providers:[t.LocalizationService,m,f,y,e,{provide:t.L10N_PREFIX,useValue:"kendo.upload"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return P})}],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-button-md k-rounded-md k-button-solid k-button-solid-base 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 '}]}],ctorParameters:function(){return[{type:f},{type:s.LocalizationService},{type:m},{type:y},{type:o.NgZone},{type:o.Renderer2},{type:o.ChangeDetectorRef},{type:o.ElementRef}]},propDecorators:{autoUpload:[{type:c.Input}],batch:[{type:c.Input}],withCredentials:[{type:c.Input}],saveField:[{type:c.Input}],saveHeaders:[{type:c.Input}],saveMethod:[{type:c.Input}],saveUrl:[{type:c.Input}],responseType:[{type:c.Input}],removeField:[{type:c.Input}],removeHeaders:[{type:c.Input}],removeMethod:[{type:c.Input}],removeUrl:[{type:c.Input}],chunkable:[{type:c.Input}],concurrent:[{type:c.Input}],multiple:[{type:c.Input}],disabled:[{type:c.Input}],showFileList:[{type:c.Input}],tabindex:[{type:c.Input}],zoneId:[{type:c.Input}],tabIndex:[{type:c.Input,args:["tabIndex"]}],accept:[{type:c.Input}],restrictions:[{type:c.Input}],focusableId:[{type:c.Input}],actionsLayout:[{type:c.Input}],fileTemplate:[{type:c.ContentChild,args:[d,{static:!1}]}],fileInfoTemplate:[{type:c.ContentChild,args:[v,{static:!1}]}],fileSelect:[{type:c.ViewChild,args:["fileSelect",{static:!0}]}],fileSelectButton:[{type:c.ViewChild,args:["fileSelectButton",{static:!0}]}],onBlur:[{type:c.Output,args:["blur"]}],cancel:[{type:c.Output}],clear:[{type:c.Output}],complete:[{type:c.Output}],error:[{type:c.Output}],onFocus:[{type:c.Output,args:["focus"]}],pause:[{type:c.Output}],remove:[{type:c.Output}],resume:[{type:c.Output}],select:[{type:c.Output}],success:[{type:c.Output}],upload:[{type:c.Output}],uploadProgress:[{type:c.Output}],valueChange:[{type:c.Output}],hostDefaultClasses:[{type:c.HostBinding,args:["class.k-widget"]},{type:c.HostBinding,args:["class.k-upload"]}],hostDisabledClass:[{type:c.HostBinding,args:["class.k-disabled"]}],dir:[{type:c.HostBinding,args:["attr.dir"]}],handleKeydown:[{type:c.HostListener,args:["keydown",["$event"]]}]}});st.prototype.onElementDragEnter=function(){return!1},st.prototype.onElementDragOver=function(){return!1},st.prototype.onDropListener=function(n){var e=this.componentInstance;if(Ie(e))return e.forEach(function(e){var t=n.dataTransfer.files;0<t.length&&!e.disabled&&(t=me(t),t=be(t,!(e instanceof P)||!e.batch),e.multiple||(t.splice(1,t.length-1),e.clearFiles()),qe(t,e.restrictions),e.addFiles(t))}),!1},Object.defineProperty(st.prototype,"componentInstance",{get:function(){return this.dropZoneService.getComponents(this.zoneId)},enumerable:!1,configurable:!0});e=st;function st(e){this.dropZoneService=e}e.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:e,deps:[{token:y}],target:o.ɵɵFactoryTarget.Directive}),e.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:e,selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]",inputs:{zoneId:["kendoUploadDropZone","zoneId"]},host:{listeners:{dragenter:"onElementDragEnter()",dragover:"onElementDragOver()",drop:"onDropListener($event)"}},providers:[y],ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:e,decorators:[{type:c.Directive,args:[{providers:[y],selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]"}]}],ctorParameters:function(){return[{type:y}]},propDecorators:{zoneId:[{type:c.Input,args:["kendoUploadDropZone"]}],onElementDragEnter:[{type:c.HostListener,args:["dragenter"]}],onElementDragOver:[{type:c.HostListener,args:["dragover"]}],onDropListener:[{type:c.HostListener,args:["drop",["$event"]]}]}});r(rt,at=E),Object.defineProperty(rt.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!1,configurable:!0}),rt.prototype.textFor=function(e){return this.localization.get(e)},Object.defineProperty(rt.prototype,"iconClasses",{get:function(){return this.icon?"k-icon k-i-"+this.icon:this.iconClass?""+this.iconClass:"k-icon k-i-upload"},enumerable:!1,configurable:!0}),rt.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()};var at,E=rt;function rt(e,t,n){var i=at.call(this,e,t,"k-external-dropzone-hover")||this;return i.localization=n,i.hostClass=!0,i.localizationChangeSubscription=i.localization.changes.subscribe(function(e){e=e.rtl;i.direction=e?"rtl":"ltr"}),i}E.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),E.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:E,selector:"kendo-uploaddropzone",inputs:{zoneId:"zoneId",icon:"icon",iconClass:"iconClass"},host:{properties:{"class.k-external-dropzone":"this.hostClass","attr.dir":"this.dirAttribute"}},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.uploaddropzone"}],exportAs:["kendoUploadDropZone"],usesInheritance:!0,ngImport:o,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 ",isInline:!0,directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:e,selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]",inputs:["kendoUploadDropZone"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,decorators:[{type:c.Component,args:[{exportAs:"kendoUploadDropZone",providers:[t.LocalizationService,{provide:t.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 "}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:s.LocalizationService}]},propDecorators:{hostClass:[{type:c.HostBinding,args:["class.k-external-dropzone"]}],dirAttribute:[{type:c.HostBinding,args:["attr.dir"]}],zoneId:[{type:c.Input}],icon:[{type:c.Input}],iconClass:[{type:c.Input}]}});var a=[D,n,b,Oe,F,Ve,et,x,I],t=[d,v,B,e,E],O=function(){},D=(O.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,deps:[],target:o.ɵɵFactoryTarget.NgModule}),O.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,declarations:[d,v,B,e,E,D,n,b,Oe,F,Ve,et,x,I],imports:[i.CommonModule],exports:[d,v,B,e,E,D,n,b,Oe,F,Ve,et,x,I,i.CommonModule]}),O.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,imports:[[i.CommonModule],i.CommonModule]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,decorators:[{type:c.NgModule,args:[{declarations:[t,a],exports:[t,a,i.CommonModule],imports:[i.CommonModule]}]}]}),[w]),b=function(){},a=(b.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,deps:[],target:o.ɵɵFactoryTarget.NgModule}),b.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,declarations:[w],imports:[O],exports:[d,v,B,e,E,w]}),b.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,imports:[[O]]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,decorators:[{type:c.NgModule,args:[{declarations:[D],exports:[t,D],imports:[O]}]}]}),[P,C,T]),i=function(){},D=(i.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,deps:[],target:o.ɵɵFactoryTarget.NgModule}),i.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,declarations:[P,C,T],imports:[O],exports:[d,v,B,e,E,P,C,T]}),i.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,imports:[[O]]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,decorators:[{type:c.NgModule,args:[{declarations:[a],exports:[t,a],imports:[O]}]}]}),function(){});D.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,deps:[],target:o.ɵɵFactoryTarget.NgModule}),D.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,exports:[b,i]}),D.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,imports:[b,i]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,decorators:[{type:c.NgModule,args:[{exports:[b,i]}]}]}),p.CancelEvent=$,p.ClearEvent=G,p.CustomMessagesComponent=B,p.ErrorEvent=Y,p.FileInfoTemplateDirective=v,p.FileListComponent=n,p.FileListItemActionButtonComponent=Oe,p.FileListMultipleItemsComponent=F,p.FileListSingleItemComponent=Ve,p.FileSelectComponent=w,p.FileSelectDirective=et,p.FileSelectModule=b,p.FileTemplateDirective=d,p.PauseEvent=J,p.RemoveEvent=ee,p.ResumeEvent=ie,p.SelectEvent=oe,p.SuccessEvent=re,p.TemplateContextDirective=I,p.UploadActionButtonsComponent=C,p.UploadComponent=P,p.UploadDropZoneComponent=E,p.UploadDropZoneDirective=e,p.UploadEvent=pe,p.UploadModule=i,p.UploadProgressEvent=Ce,p.UploadStatusTotalComponent=T,p.UploadsModule=D,Object.defineProperty(p,"__esModule",{value:!0})});
5
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core"),require("@progress/kendo-angular-common"),require("@angular/forms"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("rxjs/operators"),require("@progress/kendo-licensing"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define("KendoAngularUpload",["exports","@angular/common/http","@angular/core","@progress/kendo-angular-common","@angular/forms","@progress/kendo-angular-l10n","rxjs","rxjs/operators","@progress/kendo-licensing","@angular/animations","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularUpload={},e.ng.common.http,e.ng.core,e.KendoAngularCommon,e.ng.forms,e.KendoAngularL10N,e.rxjs,e.rxjs.operators,e.KendoLicensing,e.ng.animations,e.ng.common)}(this,function(p,M,c,u,e,t,R,V,j,n,i){"use strict";function H(n){if(n&&n.__esModule)return n;var i=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),i.default=n,Object.freeze(i)}var A=H(M),o=H(c),s=H(t),a=H(i),N=function(e,t){return(N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}N(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function d(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;p.FileState=void 0,(f=p.FileState||(p.FileState={}))[f.Failed=0]="Failed",f[f.Initial=1]="Initial",f[f.Selected=2]="Selected",f[f.Uploaded=3]="Uploaded",f[f.Uploading=4]="Uploading",f[f.Paused=5]="Paused";l.prototype.add=function(e){var t=e.uid;this.has(t)?e.validationErrors&&0<e.validationErrors.length?this._files[t].unshift(e):this._files[t].push(e):this._files[t]=[e]},l.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},l.prototype.clear=function(){var t,e,n,i=this._files;for(n in i)if(i.hasOwnProperty(n)){try{t=void 0;for(var o=d(i[n]),s=o.next();!s.done;s=o.next()){var a=s.value;a.httpSubscription&&a.httpSubscription.unsubscribe()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}i[n]=null,delete i[n]}},l.prototype.has=function(e){return e in this._files},l.prototype.get=function(e){return this._files[e]},l.prototype.setFilesState=function(e,t){var n,i;try{for(var o=d(e),s=o.next();!s.done;s=o.next()){var a=s.value;this.setFilesStateByUid(a.uid,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},l.prototype.setFilesStateByUid=function(e,t){this.get(e).forEach(function(e){e.state=t})},Object.defineProperty(l.prototype,"count",{get:function(){return Object.getOwnPropertyNames(this._files).length},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"files",{get:function(){var e,t=this._files,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(t[e]);return n},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"filesFlat",{get:function(){var e,t=this._files,n=[];for(e in t)t.hasOwnProperty(e)&&t[e].forEach(function(e){n.push(e)});return n},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"filesToUpload",{get:function(){var t,e,n,i=this._files,o=[];for(n in i)if(i.hasOwnProperty(n)){var s=i[n],a=!0;try{t=void 0;for(var r=d(s),l=r.next();!l.done;l=r.next()){var c=l.value;(c.state!==p.FileState.Selected||c.validationErrors&&0<c.validationErrors.length)&&(a=!1)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}a&&o.push(s)}return o},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"firstFileToUpload",{get:function(){var t,e,n,i=this._files;for(n in i)if(i.hasOwnProperty(n)){var o=i[n],s=!0;try{t=void 0;for(var a=d(o),r=a.next();!r.done;r=a.next()){var l=r.value;(l.state!==p.FileState.Selected||l.validationErrors&&0<l.validationErrors.length)&&(s=!1)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}if(s)return o}return null},enumerable:!1,configurable:!0}),l.prototype.getFilesWithState=function(t){return this.filesFlat.filter(function(e){return e.state===t})},l.prototype.hasFileWithState=function(e){var t,n,i,o=this._files;for(i in o)if(o.hasOwnProperty(i)){var s=o[i];try{t=void 0;for(var a=d(s),r=a.next();!r.done;r=a.next()){var l=r.value;if(0<=e.indexOf(l.state))return!0}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}return!1};var _=l;function l(){this._files={}}var Z=function(e){this.files=e},f=(K.prototype.preventDefault=function(){this.prevented=!0},K.prototype.isDefaultPrevented=function(){return this.prevented},K);function K(){this.prevented=!1}r(W,$=f);var $,q=W;function W(){return $.call(this)||this}var G,X=function(e,t,n){this.files=e,this.operation=t,this.response=n},Q=function(e){this.file=e},Y=(r(J,G=f),J);function J(e,t){var n=G.call(this)||this;return n.files=e,n.headers=t,n}var ee,te=function(e){this.file=e},ne=(r(ie,ee=f),ie);function ie(e){var t=ee.call(this)||this;return t.files=e,t}r(ae,oe=f);var oe,se=ae;function ae(e,t,n){var i=oe.call(this)||this;return i.files=e,i.operation=t,i.response=n,i}r(ce,re=f);var re,le=ce;function ce(e,t){var n=re.call(this)||this;return n.files=e,n.headers=t,n}function pe(e){return!!(e instanceof Object&&e.hasOwnProperty("name"))}function ue(e){return e.extension=e.extension||Ce(e.name),e.name=e.name,e.size=e.size||0,e.hasOwnProperty("state")||(e.state=p.FileState.Initial),e.hasOwnProperty("uid")||(e.uid=u.guid()),e}function de(e){var t=e.name,n=e.size;return{extension:Ce(t),name:t,rawFile:e,size:n,state:p.FileState.Selected}}function fe(e){for(var t=new Array,n=0;n<e.length;n++)t.push(de(e[n]));return t}function he(e){return!!(e.validationErrors&&0<e.validationErrors.length)}function me(e){var t,n;try{for(var i=d(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(he(s))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!1}function ge(e){return e.files?fe(e.files):e.value.split("|").map(function(e,t){var n,e=e.trim();return{extension:Ce(e),name:-1!==(n=(e=e).lastIndexOf("\\"))?e.substr(n+1):e,rawFile:null,size:1e3*(t+1),state:p.FileState.Selected}})}function ve(e,t){var n=u.guid();return e.map(function(e){return e.uid=t?u.guid():n,e})}function ye(e){return String(e).trim().split(" ")}function be(e,t){var n=ye(t);return Boolean(ye(e.className).find(function(e){return 0<=n.indexOf(e)}))}function ke(e,t){var n,i;return void 0===t&&(t=!0),!!e.tagName&&(n=e.tagName.toLowerCase(),i=null!==(i=e.getAttribute("tabIndex"))&&!isNaN(i)&&-1<i,(xe.test(n)?!e.disabled:i)&&(!t||!(!(i=(n=e).getBoundingClientRect()).width||!i.height)&&"hidden"!==window.getComputedStyle(n).visibility))}function Fe(e){return null!=e}var Se=function(e,t){this.files=e,this.percentComplete=t},Ie={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"]},Ce=function(e){e=e.match(/\.([^\.]+)$/);return e?e[0]:""},xe=/^(?:a|input|select|textarea|button|object)$/i,Ee="k-icon k-select k-input k-multiselect-wrap",De="k-upload-button k-clear-selected k-upload-selected k-upload-action",Te=(we.prototype.add=function(e,t){t={index:0,position:0,retries:0,totalChunks:t};return this._files[e]=t},we.prototype.remove=function(e){this.has(e)&&(this._files[e]=null,delete this._files[e])},we.prototype.has=function(e){return e in this._files},we.prototype.get=function(e){return this._files[e]},we);function we(){this._files={}}Object.defineProperty(m.prototype,"files",{get:function(){return this.fileList},enumerable:!1,configurable:!0}),m.prototype.setChunkSettings=function(e){!1!==e&&(this.async.chunk=!0,"object"==typeof e&&(this.chunk=Object.assign({},this.chunk,e)))},m.prototype.onChange=function(){var e=this.fileList.filesFlat.filter(function(e){return e.state===p.FileState.Initial||e.state===p.FileState.Uploaded});this.changeEvent.emit(0<e.length?e:null)},m.prototype.addFiles=function(e){var t,n,i=new ne(e);if(this.selectEvent.emit(i),!i.isDefaultPrevented()){try{for(var o=d(e),s=o.next();!s.done;s=o.next()){var a=s.value;this.fileList.add(a)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this.async.autoUpload&&this.uploadFiles()}"FileSelect"===this.component&&(i=this.fileList.filesFlat,this.changeEvent.emit(0<i.length?i:null))},m.prototype.addInitialFiles=function(e){var t=this;this.fileList.clear(),e.forEach(function(e){e=ue(e);t.fileList.add(e)})},m.prototype.addInitialFileSelectFiles=function(e){var t=this;this.fileList.clear(),e.forEach(function(e){e instanceof File?t.fileList.add(function(e){e=de(e);return e.uid=u.guid(),e.state=p.FileState.Selected,e}(e)):t.fileList.add(ue(e))})},m.prototype.resumeFile=function(e){var t=this.fileList.get(e);this.resumeEvent.emit(new te(t[0])),this.fileList.setFilesStateByUid(e,p.FileState.Uploading),this._uploadFiles([t])},m.prototype.pauseFile=function(e){var t=this.fileList.get(e)[0];this.pauseEvent.emit(new Q(t)),this.fileList.setFilesStateByUid(e,p.FileState.Paused)},m.prototype.removeFiles=function(e){var t=this.fileList.get(e),n=new Y(t,this.cloneRequestHeaders(this.async.removeHeaders));this.removeEvent.emit(n),n.isDefaultPrevented()||("Upload"!==this.component||t[0].state!==p.FileState.Uploaded&&t[0].state!==p.FileState.Initial?(this.fileList.remove(e),"FileSelect"===this.component&&(e=this.fileList.filesFlat,this.changeEvent.emit(0<e.length?e:null))):this.performRemove(t,n))},m.prototype.cancelFiles=function(e){var t,n,i=this.fileList.get(e),o=new Z(i);this.cancelEvent.emit(o);try{for(var s=d(i),a=s.next();!a.done;a=s.next()){var r=a.value;r.httpSubscription&&r.httpSubscription.unsubscribe()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this.fileList.remove(e),this.checkAllComplete()},m.prototype.clearFiles=function(){var e=new q;this.clearEvent.emit(e),e.isDefaultPrevented()||(e=this.fileList.hasFileWithState([p.FileState.Initial,p.FileState.Uploaded]),this.fileList.clear(),e&&this.onChange())},m.prototype.uploadFiles=function(){var e=[];this.async.concurrent&&(e=this.fileList.filesToUpload),(e=this.async.concurrent||this.fileList.hasFileWithState([p.FileState.Uploading])?e:this.fileList.firstFileToUpload?[this.fileList.firstFileToUpload]:[])&&0<e.length&&this._uploadFiles(e)},m.prototype.retryFiles=function(e){e=[this.fileList.get(e)];this._uploadFiles(e)},m.prototype._uploadFiles=function(e){var t,n,i=this;try{for(var o=d(e),s=o.next();!s.done;s=o.next()){var a=function(e){if(e[0].state===p.FileState.Paused)return{value:void 0};var t,n=new le(e,i.cloneRequestHeaders(i.async.saveHeaders));i.uploadEvent.emit(n),n.isDefaultPrevented()?i.fileList.remove(e[0].uid):(i.fileList.setFilesState(e,p.FileState.Uploading),t=i.performUpload(e,n),e.forEach(function(e){e.httpSubscription=t}))}(s.value);if("object"==typeof a)return a.value}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},m.prototype.performRemove=function(t,e){var n=this,i=this.async,o=t.map(function(e){return e.name}),o=this.populateRemoveFormData(o,e.data),e=this.populateRequestOptions(e.headers,!1),i=new M.HttpRequest(i.removeMethod,i.removeUrl,o,e);this.http.request(i).subscribe(function(e){n.onSuccess(e,t,"remove")},function(e){n.onError(e,t,"remove")})},m.prototype.performUpload=function(t,e){var n=this,i=this.async,o=this.populateUploadFormData(t,e.data),e=this.populateRequestOptions(e.headers),i=new M.HttpRequest(i.saveMethod,i.saveUrl,o,e);return this.http.request(i).subscribe(function(e){e.type!==M.HttpEventType.UploadProgress||n.async.chunk?e instanceof M.HttpResponse&&(n.onSuccess(e,t,"upload"),n.checkAllComplete()):n.onProgress(e,t)},function(e){n.onError(e,t,"upload"),n.checkAllComplete()})},m.prototype.onSuccess=function(e,t,n){if("upload"===n&&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)}e=new se(t,n,e);this.successEvent.emit(e),"upload"===n?this.fileList.setFilesState(t,e.isDefaultPrevented()?p.FileState.Failed:p.FileState.Uploaded):e.isDefaultPrevented()||this.fileList.remove(t[0].uid),e.isDefaultPrevented()||this.onChange()},m.prototype.onError=function(e,t,n){var i=this;if("upload"===n&&this.async.chunk){var o=this.chunk.maxAutoRetries,s=this.chunkMap.get(t[0].uid);if(s.retries<o)return s.retries+=1,void setTimeout(function(){i.retryFiles(t[0].uid)},this.chunk.autoRetryAfter)}o=new X(t,n,e);this.errorEvent.emit(o),"upload"===n&&this.fileList.setFilesState(t,p.FileState.Failed)},m.prototype.onProgress=function(e,t){e=Math.round(100*e.loaded/e.total),t=new Se(t,e<100?e:100);this.uploadProgressEvent.emit(t)},m.prototype.onChunkProgress=function(e){var t=this.chunkMap.get(e[0].uid),n=0,t=(t&&(n=t.index===t.totalChunks-1?100:Math.round((t.index+1)/t.totalChunks*100)),new Se(e,n<100?n:100));this.uploadProgressEvent.emit(t)},m.prototype.checkAllComplete=function(){!this.fileList.hasFileWithState([p.FileState.Uploading,p.FileState.Paused])&&this.areAllSelectedFilesHandled()?this.completeEvent.emit():this.shouldUploadNextFile()&&this.uploadFiles()},m.prototype.shouldUploadNextFile=function(){return!this.async.concurrent&&this.fileList.hasFileWithState([p.FileState.Selected])&&!this.fileList.hasFileWithState([p.FileState.Uploading])},m.prototype.areAllSelectedFilesHandled=function(){return 0===this.fileList.getFilesWithState(p.FileState.Selected).filter(function(e){return!e.validationErrors}).length},m.prototype.cloneRequestHeaders=function(t){var n={};return t&&t.keys().forEach(function(e){n[e]=t.get(e)}),new M.HttpHeaders(n)},m.prototype.populateRequestOptions=function(e,t){return{headers:e,reportProgress:t=void 0===t?!0:t,responseType:this.async.responseType,withCredentials:this.async.withCredentials}},m.prototype.populateUploadFormData=function(e,t){var n,i,o=this.async.saveField,s=new FormData;if(this.populateClientFormData(s,t),this.async.chunk)s.append(o,this.getNextChunk(e[0])),s.append("metadata",this.getChunkMetadata(e[0]));else try{for(var a=d(e),r=a.next();!r.done;r=a.next()){var l=r.value;s.append(o,l.rawFile)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return s},m.prototype.populateRemoveFormData=function(e,t){var n,i,o=new FormData;this.populateClientFormData(o,t);try{for(var s=d(e),a=s.next();!a.done;a=s.next()){var r=a.value;o.append(this.async.removeField,r)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},m.prototype.populateClientFormData=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.append(n,t[n])},m.prototype.getNextChunk=function(e){var t=this.getChunkInfo(e),n=t.position+this.chunk.size;return e.rawFile.slice(t.position,n)},m.prototype.getChunkInfo=function(e){var t,n=this.chunkMap.get(e.uid);return n||(t=Math.ceil(e.size/this.chunk.size),n=this.chunkMap.add(e.uid,t)),n},m.prototype.updateChunkInfo=function(e){e=this.chunkMap.get(e);e.index<e.totalChunks-1&&(e.index+=1,e.position+=this.chunk.size,e.retries=0)},m.prototype.removeChunkInfo=function(e){this.chunkMap.remove(e)},m.prototype.getChunkMetadata=function(e){var t=this.chunkMap.get(e.uid),e={chunkIndex:t.index,contentType:e.rawFile.type,fileName:e.name,fileSize:e.size,fileUid:e.uid,totalChunks:t.totalChunks};return JSON.stringify(e)},m.prototype.isChunkUploadComplete=function(e){e=this.chunkMap.get(e);return!!e&&e.index+1===e.totalChunks};var h=m;function m(e){this.http=e,this.cancelEvent=new c.EventEmitter,this.clearEvent=new c.EventEmitter,this.completeEvent=new c.EventEmitter,this.errorEvent=new c.EventEmitter,this.pauseEvent=new c.EventEmitter,this.removeEvent=new c.EventEmitter,this.resumeEvent=new c.EventEmitter,this.selectEvent=new c.EventEmitter,this.successEvent=new c.EventEmitter,this.uploadEvent=new c.EventEmitter,this.uploadProgressEvent=new c.EventEmitter,this.changeEvent=new c.EventEmitter,this.async={autoUpload:!0,batch:!1,chunk:!1,concurrent:!0,removeField:"fileNames",removeHeaders:new M.HttpHeaders,removeMethod:"POST",removeUrl:"",responseType:"json",saveField:"files",saveHeaders:new M.HttpHeaders,saveMethod:"POST",saveUrl:"",withCredentials:!0},this.chunk={autoRetryAfter:100,size:1048576,maxAutoRetries:1,resumable:!0},this.component="Upload",this.chunkMap=new Te,this.fileList=new _}h.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:h,deps:[{token:A.HttpClient}],target:o.ɵɵFactoryTarget.Injectable}),h.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:h}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:h,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:A.HttpClient}]}});v.prototype.action=function(e){e=e.keyCode;return this.keyBindings[e]},v.prototype.process=function(e){var t=this.action(e);t&&t(e.shiftKey)},v.prototype.computeKeys=function(e){var t,n=this;this.keyBindings=((t={})[u.Keys.Enter]=function(){return n.handleEnter()},t[u.Keys.Escape]=function(){return n.handleEscape()},t[u.Keys.Delete]=function(){return n.handleDelete()},t[u.Keys.Tab]=function(e){return n.handleTab(e)},t[u.Keys.ArrowUp]=function(){return n.handleUp()},t[u.Keys.ArrowDown]=function(){return n.handleDown()},t[this.invertKeys(e,u.Keys.ArrowLeft,u.Keys.ArrowRight)]=function(){return n.handleLeft()},t[this.invertKeys(e,u.Keys.ArrowRight,u.Keys.ArrowLeft)]=function(){return n.handleRight()},t)},v.prototype.invertKeys=function(e,t,n){return"rtl"===e?n:t},v.prototype.focusSelectButton=function(){this.focused=!0,this._focusedIndex=-1,this.onSelectButtonFocus.emit()},v.prototype.handleEnter=function(){0<=this.lastIndex&&(this.focusedIndex<=this.lastFileIndex?this.onFileAction.emit(u.Keys.Enter):this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&this.onActionButtonAction.emit(this.focusedIndex<this.lastIndex?"clear":"upload"))},v.prototype.handleDelete=function(){0<=this.focusedIndex&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(u.Keys.Delete)},v.prototype.handleEscape=function(){0<=this.focusedIndex&&this.focusedIndex<=this.lastFileIndex&&this.onFileAction.emit(u.Keys.Escape)},v.prototype.handleLeft=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex&&(--this.focusedIndex,this.onActionButtonFocus.emit("clear"))},v.prototype.handleRight=function(){this.actionButtonsVisible&&this.focusedIndex===this.lastIndex-1&&(this.focusedIndex+=1,this.onActionButtonFocus.emit("upload"))},v.prototype.handleTab=function(e){0<=this.focusedIndex&&e?this.focusedIndex=-1:this.onTab.emit()},v.prototype.handleDown=function(){if(0<=this.lastIndex&&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"))}},v.prototype.handleUp=function(){0<=this.lastIndex&&-1<this.focusedIndex&&(--this.focusedIndex,-1===this.focusedIndex?this.onSelectButtonFocus.emit():this.focusedIndex<=this.lastFileIndex?this.onFileFocus.emit(this.focusedIndex):this.actionButtonsVisible&&this.focusedIndex<=this.lastIndex&&(this.focusedIndex=this.lastFileIndex,this.onFileFocus.emit(this.focusedIndex)))},Object.defineProperty(v.prototype,"focusedIndex",{get:function(){return this._focusedIndex},set:function(e){this.focused||this.onWrapperFocus.emit(),this._focusedIndex=e,this.focused=!0,0<=this._focusedIndex&&this._focusedIndex<=this.lastFileIndex&&this.onFileFocus.emit(e)},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"lastFileIndex",{get:function(){return this.actionButtonsVisible?this.lastIndex-2:this.lastIndex},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"lastIndex",{get:function(){var e=this.uploadService.files.count;return this.actionButtonsVisible?e+1:e-1},enumerable:!1,configurable:!0});var g=v;function v(e){this.uploadService=e,this.onActionButtonAction=new c.EventEmitter,this.onActionButtonFocus=new c.EventEmitter,this.onFileAction=new c.EventEmitter,this.onFileFocus=new c.EventEmitter,this.onTab=new c.EventEmitter,this.onWrapperFocus=new c.EventEmitter,this.onSelectButtonFocus=new c.EventEmitter,this.actionButtonsVisible=!1,this.focused=!1,this._focusedIndex=-1}g.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:g,deps:[{token:h}],target:o.ɵɵFactoryTarget.Injectable}),g.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:g}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:g,decorators:[{type:c.Injectable}],ctorParameters:function(){return[{type:h}]}});var Ue={name:"@progress/kendo-angular-upload",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1652968490,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"},f=function(e){this.templateRef=e},Be=(f.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,deps:[{token:o.TemplateRef}],target:o.ɵɵFactoryTarget.Directive}),f.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:f,selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]",ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileTemplate], [kendoFileSelectFileTemplate]"}]}],ctorParameters:function(){return[{type:o.TemplateRef}]}}),{}),y=(ze.prototype.addComponent=function(e,t){this.has(t)?Be[t].push(e):Be[t]=[e]},ze.prototype.getComponents=function(e){return Be[e]},ze.prototype.has=function(e){return e in Be},ze);function ze(){}y.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:y,deps:[],target:o.ɵɵFactoryTarget.Injectable}),y.ɵprov=o.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:y}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:y,decorators:[{type:c.Injectable}]});var b=function(e){this.templateRef=e},k=(b.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,deps:[{token:o.TemplateRef}],target:o.ɵɵFactoryTarget.Directive}),b.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:b,selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]",ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:b,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileInfoTemplate], [kendoFileSelectFileInfoTemplate]"}]}],ctorParameters:function(){return[{type:o.TemplateRef}]}}),F.prototype.focus=function(){this.element.nativeElement.focus()},Object.defineProperty(F.prototype,"uidAttribute",{get:function(){return this.files[0].uid},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"tabIndex",{get:function(){return"-1"},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kFileError",{get:function(){return this.files[0].state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kFileInvalid",{get:function(){return me(this.files)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kFileProgress",{get:function(){return this.files[0].state===p.FileState.Uploading||this.files[0].state===p.FileState.Paused},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kFileSuccess",{get:function(){return"Upload"===this.uploadService.component&&(this.files[0].state===p.FileState.Uploaded||this.files[0].state===p.FileState.Initial)},enumerable:!1,configurable:!0}),Object.defineProperty(F.prototype,"kStateFocused",{get:function(){return this.focused},enumerable:!1,configurable:!0}),F.prototype.onFocus=function(){this.focused=!0},F.prototype.onBlur=function(){this.focused=!1},F.prototype.onClick=function(e){ke(e.target)||be(e.target,Ee)||(this.navigationService.focusedIndex=this.index)},F);function F(e,t,n){this.navigationService=t,this.uploadService=n,this.fileClass=!0,this.focused=!1,this.element=e}k.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,deps:[{token:o.ElementRef},{token:g},{token:h}],target:o.ɵɵFactoryTarget.Directive}),k.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:k,selector:"[kendoUploadFileListItem]",inputs:{files:"files",index:"index"},host:{listeners:{focus:"onFocus()",blur:"onBlur()",click:"onClick($event)"},properties:{"class.k-file":"this.fileClass","attr.data-uid":"this.uidAttribute","attr.tabIndex":"this.tabIndex","class.k-file-error":"this.kFileError","class.k-file-invalid":"this.kFileInvalid","class.k-file-progress":"this.kFileProgress","class.k-file-success":"this.kFileSuccess","class.k-state-focused":"this.kStateFocused"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,decorators:[{type:c.Directive,args:[{selector:"[kendoUploadFileListItem]"}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:g},{type:h}]},propDecorators:{files:[{type:c.Input}],index:[{type:c.Input}],fileClass:[{type:c.HostBinding,args:["class.k-file"]}],uidAttribute:[{type:c.HostBinding,args:["attr.data-uid"]}],tabIndex:[{type:c.HostBinding,args:["attr.tabIndex"]}],kFileError:[{type:c.HostBinding,args:["class.k-file-error"]}],kFileInvalid:[{type:c.HostBinding,args:["class.k-file-invalid"]}],kFileProgress:[{type:c.HostBinding,args:["class.k-file-progress"]}],kFileSuccess:[{type:c.HostBinding,args:["class.k-file-success"]}],kStateFocused:[{type:c.HostBinding,args:["class.k-state-focused"]}],onFocus:[{type:c.HostListener,args:["focus"]}],onBlur:[{type:c.HostListener,args:["blur"]}],onClick:[{type:c.HostListener,args:["click",["$event"]]}]}});Pe.prototype.subscribeUploadProgress=function(e){this.uploadProgressSubscription=this.uploadService.uploadProgressEvent.subscribe(e)},Pe.prototype.fileHasValidationErrors=he,Pe.prototype.filesHaveValidationErrors=me,Pe.prototype.ngOnDestroy=function(){this.uploadProgressSubscription.unsubscribe()},Pe.prototype.getFileValidationMessage=function(e){var t;return t=e.validationErrors&&0<e.validationErrors.length?this.localization.get(e.validationErrors[0]):t},Pe.prototype.getTotalFilesSizeMessage=function(e){var t,n=e,i=0;if("number"!=typeof n[0].size)return"";for(t=0;t<n.length;t++)n[t].size&&(i+=n[t].size);return(i/=1024)<1024?i.toFixed(2)+" KB":(i/1024).toFixed(2)+" MB"},Pe.prototype.textFor=function(e){return this.localization.get(e)};var Le=Pe;function Pe(e){this.uploadService=e,this.progressComplete=0}Le.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Le,deps:[{token:h}],target:o.ɵɵFactoryTarget.Component}),Le.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Le,selector:"ng-component",ngImport:o,template:"",isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Le,decorators:[{type:c.Component,args:[{template:""}]}],ctorParameters:function(){return[{type:h}]}});S.prototype.onFocus=function(e){"action"===e&&(this.actionFocused=!0),"retry"===e&&(this.retryFocused=!0),"pauseResume"===e&&(this.pauseResumeFocused=!0)},S.prototype.onBlur=function(e){"retry"===e&&(this.retryFocused=!1),"action"===e&&(this.actionFocused=!1),"pauseResume"===e&&(this.pauseResumeFocused=!1)},S.prototype.onRetryClick=function(){this.disabled||this.uploadService.retryFiles(this.file.uid)},S.prototype.onRemoveCancelClick=function(e){this.disabled||(e.stopImmediatePropagation(),e=this.file.uid,this.file.state===p.FileState.Uploading?this.uploadService.cancelFiles(e):this.uploadService.removeFiles(e),this.navigation.focusSelectButton())},S.prototype.onPauseResumeClick=function(){var e;this.disabled||(e=this.file.uid,this.file.state===p.FileState.Paused?this.uploadService.resumeFile(e):this.uploadService.pauseFile(e))},Object.defineProperty(S.prototype,"actionButtonTitle",{get:function(){return this.file.state===p.FileState.Uploading?this.localization.get("cancel"):this.localization.get("remove")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"retryButtonTitle",{get:function(){return this.localization.get("retry")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"pauseResumeButtonTitle",{get:function(){return this.file.state===p.FileState.Uploading?this.localization.get("pause"):this.localization.get("resume")},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isUploading",{get:function(){return this.file.state===p.FileState.Uploading},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isFailed",{get:function(){return this.file.state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isPaused",{get:function(){return this.file.state===p.FileState.Paused},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isResumable",{get:function(){var e=this.uploadService,e=e.async.chunk&&e.chunk.resumable,t=this.file.state===p.FileState.Paused||this.file.state===p.FileState.Uploading;return e&&t},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isActionButtonVisible",{get:function(){return!!(this.file.state!==p.FileState.Uploaded&&this.file.state!==p.FileState.Initial||this.uploadService.async.removeUrl||"Upload"!==this.uploadService.component)},enumerable:!1,configurable:!0});var Oe=S;function S(e,t,n){this.uploadService=e,this.localization=t,this.navigation=n,this.actionFocused=!1,this.retryFocused=!1,this.pauseResumeFocused=!1}Oe.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Oe,deps:[{token:h},{token:s.LocalizationService},{token:g}],target:o.ɵɵFactoryTarget.Component}),Oe.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:{file:"file",disabled:"disabled",progress:"progress"},ngImport:o,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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-button-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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon k-button-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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick($event)">\n <span class="k-icon k-button-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 ',isInline:!0,directives:[{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Oe,decorators:[{type:c.Component,args:[{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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.retryFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'retry\')"\n (blur)="onBlur(\'retry\')"\n (click)="onRetryClick()">\n <span class="k-icon k-button-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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.pauseResumeFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'pauseResume\')"\n (blur)="onBlur(\'pauseResume\')"\n (click)="onPauseResumeClick()">\n <span class="k-icon k-button-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-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action"\n [ngClass]="{ \'k-focus\': this.actionFocused }"\n [attr.tabIndex]="-1"\n (focus)="onFocus(\'action\')"\n (blur)="onBlur(\'action\')"\n (click)="onRemoveCancelClick($event)">\n <span class="k-icon k-button-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 '}]}],ctorParameters:function(){return[{type:h},{type:s.LocalizationService},{type:g}]},propDecorators:{file:[{type:c.Input}],disabled:[{type:c.Input}],progress:[{type:c.Input}]}});Object.defineProperty(Me.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:!1,configurable:!0});var I=Me;function Me(e){this.viewContainerRef=e}I.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,deps:[{token:o.ViewContainerRef}],target:o.ɵɵFactoryTarget.Directive}),I.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:I,selector:"[templateContext]",inputs:{templateContext:"templateContext"},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,decorators:[{type:c.Directive,args:[{selector:"[templateContext]"}]}],ctorParameters:function(){return[{type:o.ViewContainerRef}]},propDecorators:{templateContext:[{type:c.Input}]}});r(je,Re=Le),Object.defineProperty(je.prototype,"fileStatusText",{get:function(){var e=this.file.validationErrors;return this.file.state===p.FileState.Uploaded?""+this.textFor("fileStatusUploaded"):this.file.state===p.FileState.Failed?""+this.textFor("fileStatusFailed"):Fe(e)?this.getFileValidationMessage(this.file):this.getTotalFilesSizeMessage([this.file])},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"showProgress",{get:function(){return this.file.state===p.FileState.Uploading||this.file.state===p.FileState.Paused?"active":"inactive"},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"fileGroupClass",{get:function(){var e,t=this.file.extension||"",n="k-i-file";for(e in Ie)if(0<=Ie[e].indexOf(t))return n+"-"+e;return n},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isUploadSuccessful",{get:function(){return this.file.state===p.FileState.Uploaded},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isUploadFailed",{get:function(){return this.file.state===p.FileState.Failed},enumerable:!1,configurable:!0}),Object.defineProperty(je.prototype,"isNotYetUploaded",{get:function(){return!this.isUploadFailed&&!this.isUploadSuccessful},enumerable:!1,configurable:!0});var Re,Ve=je;function je(e,t){var n=Re.call(this,t)||this;return n.localization=e,n.subscribeUploadProgress(function(e){e.files[0].uid===n.file.uid&&(n.progressComplete=e.percentComplete)}),n}Ve.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ve,deps:[{token:s.LocalizationService},{token:h}],target:o.ɵɵFactoryTarget.Component}),Ve.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Ve,selector:"kendo-upload-file-list-single-item",inputs:{disabled:"disabled",file:"file",fileInfoTemplate:"fileInfoTemplate"},usesInheritance:!0,ngImport:o,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 ',isInline:!0,components:[{type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:["file","disabled","progress"]}],directives:[{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}],animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.animate("1s 2s ease-out"))])]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ve,decorators:[{type:c.Component,args:[{animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.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 '}]}],ctorParameters:function(){return[{type:s.LocalizationService},{type:h}]},propDecorators:{disabled:[{type:c.Input}],file:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}]}});r(Ne,He=Le),Object.defineProperty(Ne.prototype,"showProgress",{get:function(){return this.files[0].state===p.FileState.Uploading||this.files[0].state===p.FileState.Paused?"active":"inactive"},enumerable:!1,configurable:!0}),Ne.prototype.ngOnInit=function(){this.filesHaveErrors=He.prototype.filesHaveValidationErrors.call(this,this.files)},Ne.prototype.fileStatusText=function(e){var t=e.validationErrors;return Fe(t)?this.getFileValidationMessage(e):this.getTotalFilesSizeMessage([e])},Object.defineProperty(Ne.prototype,"batchStatusText",{get:function(){var e=this.files[0].state,t=this.files.length;return e===p.FileState.Uploaded?t+" "+this.textFor("filesBatchStatusUploaded"):e===p.FileState.Failed?t+" "+this.textFor("filesBatchStatusFailed"):t+" "+this.textFor("filesBatchStatus")},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"isUploadSuccessful",{get:function(){return this.files[0].state===p.FileState.Uploaded},enumerable:!1,configurable:!0}),Object.defineProperty(Ne.prototype,"isUploadFailed",{get:function(){return this.files[0].state===p.FileState.Failed},enumerable:!1,configurable:!0});var He,Ae=Ne;function Ne(e,t){var n=He.call(this,t)||this;return n.localization=e,n.subscribeUploadProgress(function(e){e.files[0].uid===n.files[0].uid&&(n.progressComplete=e.percentComplete)}),n}Ae.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ae,deps:[{token:s.LocalizationService},{token:h}],target:o.ɵɵFactoryTarget.Component}),Ae.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:Ae,selector:"kendo-upload-file-list-multiple-items",inputs:{disabled:"disabled",files:"files",fileInfoTemplate:"fileInfoTemplate"},usesInheritance:!0,ngImport:o,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 ',isInline:!0,components:[{type:Oe,selector:"kendo-upload-file-list-item-action-button",inputs:["file","disabled","progress"]}],directives:[{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:a.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}],animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.animate("1s 2s ease-out"))])]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:Ae,decorators:[{type:c.Component,args:[{animations:[n.trigger("progressState",[n.state("active",n.style({opacity:1})),n.state("inactive",n.style({opacity:0})),n.transition("void => active",n.style({opacity:0})),n.transition("inactive => active",n.style({opacity:1})),n.transition("active => inactive",n.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 '}]}],ctorParameters:function(){return[{type:s.LocalizationService},{type:h}]},propDecorators:{disabled:[{type:c.Input}],files:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}]}});_e.prototype.onItemFocus=function(){var t=this;this.focusSubscription=this.navigation.onFileFocus.subscribe(function(e){t.fileListItems.toArray()[e].focus()})},_e.prototype.onItemAction=function(){var t=this;this.actionSubscription=this.navigation.onFileAction.subscribe(function(e){t.itemActionHandler(e)})},_e.prototype.itemActionHandler=function(e){var t=this.navigation.focusedIndex,t=this.fileListItems.toArray()[t],n=t.uidAttribute,i=this.uploadService.files.get(n);if(e===u.Keys.Escape&&i[0].state===p.FileState.Uploading)return this.uploadService.cancelFiles(n),void this.navigation.focusSelectButton();e===u.Keys.Enter&&i[0].state===p.FileState.Failed?this.uploadService.retryFiles(n):e===u.Keys.Delete&&(i[0].state===p.FileState.Uploading?this.uploadService.cancelFiles(n):this.hasDelete(t)&&this.uploadService.removeFiles(n),this.navigation.focusSelectButton())},_e.prototype.hasDelete=function(e){return 0<e.element.nativeElement.getElementsByClassName("k-delete").length},_e.prototype.ngOnDestroy=function(){this.focusSubscription.unsubscribe(),this.actionSubscription.unsubscribe()};n=_e;function _e(e,t){this.uploadService=e,this.navigation=t,this.onItemFocus(),this.onItemAction()}n.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:n,deps:[{token:h},{token:g}],target:o.ɵɵFactoryTarget.Component}),n.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:n,selector:"[kendo-upload-file-list]",inputs:{disabled:"disabled",fileList:"fileList",fileTemplate:"fileTemplate",fileInfoTemplate:"fileInfoTemplate"},viewQueries:[{propertyName:"fileListItems",predicate:k,descendants:!0}],ngImport:o,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 ",isInline:!0,components:[{type:Ve,selector:"kendo-upload-file-list-single-item",inputs:["disabled","file","fileInfoTemplate"]},{type:Ae,selector:"kendo-upload-file-list-multiple-items",inputs:["disabled","files","fileInfoTemplate"]}],directives:[{type:a.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:k,selector:"[kendoUploadFileListItem]",inputs:["files","index"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:I,selector:"[templateContext]",inputs:["templateContext"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:n,decorators:[{type:c.Component,args:[{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 "}]}],ctorParameters:function(){return[{type:h},{type:g}]},propDecorators:{disabled:[{type:c.Input}],fileList:[{type:c.Input}],fileTemplate:[{type:c.Input}],fileInfoTemplate:[{type:c.Input}],fileListItems:[{type:c.ViewChildren,args:[k]}]}});r(Ke,Ze=t.ComponentMessages);var Ze,C=Ke;function Ke(){return null!==Ze&&Ze.apply(this,arguments)||this}C.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,deps:null,target:o.ɵɵFactoryTarget.Directive}),C.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:C,inputs:{cancel:"cancel",clearSelectedFiles:"clearSelectedFiles",dropFilesHere:"dropFilesHere",externalDropFilesHere:"externalDropFilesHere",filesBatchStatus:"filesBatchStatus",filesBatchStatusFailed:"filesBatchStatusFailed",filesBatchStatusUploaded:"filesBatchStatusUploaded",fileStatusFailed:"fileStatusFailed",fileStatusUploaded:"fileStatusUploaded",headerStatusPaused:"headerStatusPaused",headerStatusUploaded:"headerStatusUploaded",headerStatusUploading:"headerStatusUploading",invalidFileExtension:"invalidFileExtension",invalidMaxFileSize:"invalidMaxFileSize",invalidMinFileSize:"invalidMinFileSize",pause:"pause",remove:"remove",resume:"resume",retry:"retry",select:"select",uploadSelectedFiles:"uploadSelectedFiles"},usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,decorators:[{type:c.Directive}],propDecorators:{cancel:[{type:c.Input}],clearSelectedFiles:[{type:c.Input}],dropFilesHere:[{type:c.Input}],externalDropFilesHere:[{type:c.Input}],filesBatchStatus:[{type:c.Input}],filesBatchStatusFailed:[{type:c.Input}],filesBatchStatusUploaded:[{type:c.Input}],fileStatusFailed:[{type:c.Input}],fileStatusUploaded:[{type:c.Input}],headerStatusPaused:[{type:c.Input}],headerStatusUploaded:[{type:c.Input}],headerStatusUploading:[{type:c.Input}],invalidFileExtension:[{type:c.Input}],invalidMaxFileSize:[{type:c.Input}],invalidMinFileSize:[{type:c.Input}],pause:[{type:c.Input}],remove:[{type:c.Input}],resume:[{type:c.Input}],retry:[{type:c.Input}],select:[{type:c.Input}],uploadSelectedFiles:[{type:c.Input}]}});r(qe,$e=C);var $e,x=qe;function qe(e){var t=$e.call(this)||this;return t.service=e,t}x.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:x,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Directive}),x.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n ",providers:[{provide:C,useExisting:c.forwardRef(function(){return x})}],usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:x,decorators:[{type:c.Directive,args:[{providers:[{provide:C,useExisting:c.forwardRef(function(){return x})}],selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "}]}],ctorParameters:function(){return[{type:s.LocalizationService}]}});function We(e,t){for(var n,i,o,s=t.allowedExtensions.map(function(e){return("."===e.substring(0,1)?e:"."+e).toLowerCase()}),a=t.maxFileSize,r=t.minFileSize,l=0;l<e.length;l++)i=e[l],0<(o=s).length&&o.indexOf(i.extension.toLowerCase())<0&&(i.validationErrors=i.validationErrors||[],i.validationErrors.indexOf(Qe)<0&&i.validationErrors.push(Qe)),o=e[l],i=a,0!==(n=r)&&o.size<n&&(o.validationErrors=o.validationErrors||[],o.validationErrors.indexOf(Xe)<0&&o.validationErrors.push(Xe)),0!==i&&o.size>i&&(o.validationErrors=o.validationErrors||[],o.validationErrors.indexOf(Ge)<0&&o.validationErrors.push(Ge))}var Ge="invalidMaxFileSize",Xe="invalidMinFileSize",Qe="invalidFileExtension",E=(Ye.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},Ye.prototype.onElementDragOverListener=function(){return this.lastDragElement=new Date,!1},Ye.prototype.calculateTimeDiff=function(e){return(new Date).getTime()-e.getTime()},Ye.prototype.addClass=function(e){this.renderer.addClass(this.element.nativeElement,e)},Ye.prototype.removeClass=function(e){this.renderer.removeClass(this.element.nativeElement,e)},Ye);function Ye(e,t,n){this.element=e,this.renderer=t,this.hideIntervalElement=null,this.hoverClass=n}E.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:"hoverClass"}],target:o.ɵɵFactoryTarget.Directive}),E.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:E,host:{listeners:{dragenter:"onElementDragEnterListener()",dragover:"onElementDragOverListener()"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,decorators:[{type:c.Directive}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:void 0,decorators:[{type:c.Inject,args:["hoverClass"]}]}]},propDecorators:{onElementDragEnterListener:[{type:c.HostListener,args:["dragenter"]}],onElementDragOverListener:[{type:c.HostListener,args:["dragover"]}]}});r(et,Je=E),et.prototype.ngOnDestroy=function(){var e=this;this.ngZone.runOutsideAngular(function(){e.unsubscribeDocumentDragEnter&&e.unsubscribeDocumentDragEnter(),e.unsubscribeDocumentDragOver&&e.unsubscribeDocumentDragOver()})},et.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},et.prototype.onDocumentDragOver=function(){return this.lastDragDocument=new Date,!1},et.prototype.onDropListener=function(e){var e=e.dataTransfer.files;return 0<e.length&&!this.disabled&&(e=fe(e),e=ve(e,!this.uploadService.async.batch),this.multiple||(e.splice(1,e.length-1),this.uploadService.clearFiles()),We(e,this.restrictions),this.uploadService.addFiles(e)),!1};var Je,D=et;function et(e,t,n,i){var o=Je.call(this,e,t,"k-dropzone-hover")||this;return o.ngZone=n,o.uploadService=i,o.initialClassName=!0,o.hideIntervalDocument=null,o.activeClass="k-dropzone-active",o.ngZone.runOutsideAngular(function(){o.unsubscribeDocumentDragEnter=o.renderer.listen("document","dragenter",function(){return o.onDocumentDragEnter()}),o.unsubscribeDocumentDragOver=o.renderer.listen("document","dragover",function(){return o.onDocumentDragOver()})}),o}D.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:o.NgZone},{token:h}],target:o.ɵɵFactoryTarget.Directive}),D.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:{disabled:"disabled",multiple:"multiple",restrictions:"restrictions"},host:{listeners:{drop:"onDropListener($event)"},properties:{"class.k-dropzone":"this.initialClassName"}},usesInheritance:!0,ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,decorators:[{type:c.Directive,args:[{selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n "}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:o.NgZone},{type:h}]},propDecorators:{disabled:[{type:c.Input}],multiple:[{type:c.Input}],restrictions:[{type:c.Input}],initialClassName:[{type:c.HostBinding,args:["class.k-dropzone"]}],onDropListener:[{type:c.HostListener,args:["drop",["$event"]]}]}});Object.defineProperty(nt.prototype,"nameAttribute",{get:function(){return this.uploadService.async.saveField},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"multipleAttribute",{get:function(){return this.multiple?"multiple":null},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"dirAttribute",{get:function(){return this.dir},enumerable:!1,configurable:!0}),Object.defineProperty(nt.prototype,"disabledAttribute",{get:function(){return this.disabled?"true":null},enumerable:!1,configurable:!0}),nt.prototype.onInputChange=function(e){var t=this,n=navigator.userAgent,e=ge(e.target),e=ve(e,!this.uploadService.async.batch),e=(We(e,this.restrictions),this.multiple||this.uploadService.clearFiles(),this.uploadService.addFiles(e),this.element.nativeElement);(n.match(/(webkit)[ \/]([\w.]+)/i)||n.match(/(windows)[ \/]([\w.]+)/i))&&(e.type="",e.type="file"),setTimeout(function(){t.navigation.focusedIndex=-1})};var tt=nt;function nt(e,t,n){this.uploadService=e,this.navigation=t,this.type="file",this.autocomplete="off",this.tabIndex=-1,this.element=n}tt.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:tt,deps:[{token:h},{token:g},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Directive}),tt.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:tt,selector:"[kendoFileSelect]",inputs:{dir:"dir",disabled:"disabled",multiple:"multiple",restrictions:"restrictions"},host:{listeners:{change:"onInputChange($event)"},properties:{"attr.type":"this.type","attr.autocomplete":"this.autocomplete","attr.tabindex":"this.tabIndex","attr.name":"this.nameAttribute","attr.multiple":"this.multipleAttribute","attr.dir":"this.dirAttribute","attr.disabled":"this.disabledAttribute"}},ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:tt,decorators:[{type:c.Directive,args:[{selector:"[kendoFileSelect]"}]}],ctorParameters:function(){return[{type:h},{type:g},{type:o.ElementRef}]},propDecorators:{dir:[{type:c.Input}],disabled:[{type:c.Input}],multiple:[{type:c.Input}],restrictions:[{type:c.Input}],type:[{type:c.HostBinding,args:["attr.type"]}],autocomplete:[{type:c.HostBinding,args:["attr.autocomplete"]}],tabIndex:[{type:c.HostBinding,args:["attr.tabindex"]}],nameAttribute:[{type:c.HostBinding,args:["attr.name"]}],multipleAttribute:[{type:c.HostBinding,args:["attr.multiple"]}],dirAttribute:[{type:c.HostBinding,args:["attr.dir"]}],disabledAttribute:[{type:c.HostBinding,args:["attr.disabled"]}],onInputChange:[{type:c.HostListener,args:["change",["$event"]]}]}});var T={multi:!0,provide:e.NG_VALUE_ACCESSOR,useExisting:c.forwardRef(function(){return w})},w=(Object.defineProperty(U.prototype,"name",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){e=Object.assign({},this._restrictions,e);this._restrictions=e},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(U.prototype,"dir",{get:function(){return this.direction},enumerable:!1,configurable:!0}),U.prototype.ngOnInit=function(){this.renderer.removeAttribute(this.wrapper,"tabindex"),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},U.prototype.textFor=function(e){return this.localization.get(e)},U.prototype.focus=function(){var e=this;setTimeout(function(){e.fileSelectButton.nativeElement.focus()})},U.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()},U.prototype.handleKeydown=function(e){if(!this.disabled)return e.keyCode!==u.Keys.Enter&&e.keyCode!==u.Keys.Space||e.target!==this.fileSelectButton.nativeElement?void(!be(e.target,De)&&(ke(e.target)||be(e.target,Ee))||this.navigation.process(e)):(e.preventDefault(),void this.fileSelect.nativeElement.click())},U.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach(function(e){(e=e)instanceof File||pe(e)||(t=!1)}),t&&this.uploadService.addInitialFileSelectFiles(e)),null===e&&this.fileList.clear(),this.cdr.markForCheck()},U.prototype.registerOnChange=function(e){this.onChangeCallback=e},U.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},U.prototype.setDisabledState=function(e){this.disabled=e},U.prototype.removeFileByUid=function(e){this.uploadService.removeFiles(e)},U.prototype.clearFiles=function(){this.uploadService.clearFiles()},U.prototype.isEmpty=function(){return!1},U.prototype.addFiles=function(e){this.uploadService.addFiles(e)},Object.defineProperty(U.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabindex},enumerable:!1,configurable:!0}),U.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},U.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},U.prototype.subscribeBlur=function(){var t=this;u.isDocumentAvailable()&&this.ngZone.runOutsideAngular(function(){t.documentClick=R.fromEvent(document,"click").pipe(V.filter(function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))})),t.blurSubscription=R.merge(t.documentClick,t.navigation.onTab).subscribe(function(){t.navigation.focused&&t.ngZone.run(function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()})})})},U.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()})},U.prototype.attachEventHandlers=function(){var n=this;this.subs=this.uploadService.changeEvent.subscribe(function(e){var t=[];null!==e&&e.forEach(function(e){e.state===p.FileState.Initial&&t.push(e),e.state===p.FileState.Selected&&e.rawFile&&!e.validationErrors&&t.push(e.rawFile)}),0===t.length&&(t=null),n.onChangeCallback(t),n.valueChange.emit(t)}),this.subs.add(this.uploadService.removeEvent.subscribe(function(e){n.remove.emit(e)})),this.subs.add(this.uploadService.selectEvent.subscribe(function(e){n.select.emit(e)}))},U.prototype.setDefaultSettings=function(){this.uploadService.async.autoUpload=!1,this.uploadService.component="FileSelect"},U);function U(e,t,n,i,o,s,a,r){var l=this;this.uploadService=e,this.localization=t,this.navigation=n,this.dropZoneService=i,this.ngZone=o,this.renderer=s,this.cdr=a,this.disabled=!1,this.multiple=!0,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+u.guid(),this.onBlur=new c.EventEmitter,this.onFocus=new c.EventEmitter,this.select=new c.EventEmitter,this.remove=new c.EventEmitter,this.valueChange=new c.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},j.validatePackage(Ue),this.wrapper=r.nativeElement,this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe(function(e){e=e.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)}),this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers(),this.setDefaultSettings()}w.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,deps:[{token:h},{token:s.LocalizationService},{token:g},{token:y},{token:o.NgZone},{token:o.Renderer2},{token:o.ChangeDetectorRef},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Component}),w.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:w,selector:"kendo-fileselect",inputs:{accept:"accept",disabled:"disabled",multiple:"multiple",name:"name",showFileList:"showFileList",tabindex:"tabindex",restrictions:"restrictions",zoneId:"zoneId",focusableId:"focusableId"},outputs:{onBlur:"blur",onFocus:"focus",select:"select",remove:"remove",valueChange:"valueChange"},host:{listeners:{keydown:"handleKeydown($event)"},properties:{"class.k-widget":"this.hostDefaultClasses","class.k-upload":"this.hostDefaultClasses","class.k-disabled":"this.hostDisabledClass","attr.dir":"this.dir"}},providers:[t.LocalizationService,g,h,y,T,{provide:t.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return w})}],queries:[{propertyName:"fileTemplate",first:!0,predicate:f,descendants:!0},{propertyName:"fileInfoTemplate",first:!0,predicate:b,descendants:!0}],viewQueries:[{propertyName:"fileSelect",first:!0,predicate:["fileSelect"],descendants:!0,static:!0},{propertyName:"fileSelectButton",first:!0,predicate:["fileSelectButton"],descendants:!0,static:!0}],exportAs:["kendoFileSelect"],ngImport:o,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-button-md k-rounded-md k-button-solid k-button-solid-base 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 ',isInline:!0,components:[{type:n,selector:"[kendo-upload-file-list]",inputs:["disabled","fileList","fileTemplate","fileInfoTemplate"]}],directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:["disabled","multiple","restrictions"]},{type:tt,selector:"[kendoFileSelect]",inputs:["dir","disabled","multiple","restrictions"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:w,decorators:[{type:c.Component,args:[{exportAs:"kendoFileSelect",providers:[t.LocalizationService,g,h,y,T,{provide:t.L10N_PREFIX,useValue:"kendo.fileselect"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return w})}],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-button-md k-rounded-md k-button-solid k-button-solid-base 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 '}]}],ctorParameters:function(){return[{type:h},{type:s.LocalizationService},{type:g},{type:y},{type:o.NgZone},{type:o.Renderer2},{type:o.ChangeDetectorRef},{type:o.ElementRef}]},propDecorators:{accept:[{type:c.Input}],disabled:[{type:c.Input}],multiple:[{type:c.Input}],name:[{type:c.Input}],showFileList:[{type:c.Input}],tabindex:[{type:c.Input}],restrictions:[{type:c.Input}],zoneId:[{type:c.Input}],focusableId:[{type:c.Input}],fileTemplate:[{type:c.ContentChild,args:[f,{static:!1}]}],fileInfoTemplate:[{type:c.ContentChild,args:[b,{static:!1}]}],fileSelect:[{type:c.ViewChild,args:["fileSelect",{static:!0}]}],fileSelectButton:[{type:c.ViewChild,args:["fileSelectButton",{static:!0}]}],onBlur:[{type:c.Output,args:["blur"]}],onFocus:[{type:c.Output,args:["focus"]}],select:[{type:c.Output}],remove:[{type:c.Output}],valueChange:[{type:c.Output}],hostDefaultClasses:[{type:c.HostBinding,args:["class.k-widget"]},{type:c.HostBinding,args:["class.k-upload"]}],hostDisabledClass:[{type:c.HostBinding,args:["class.k-disabled"]}],dir:[{type:c.HostBinding,args:["attr.dir"]}],handleKeydown:[{type:c.HostListener,args:["keydown",["$event"]]}]}});r(ot,it=C),Object.defineProperty(ot.prototype,"override",{get:function(){return!0},enumerable:!1,configurable:!0});var it,B=ot;function ot(e){var t=it.call(this)||this;return t.service=e,t}B.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:B,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),B.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:B,selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",providers:[{provide:C,useExisting:c.forwardRef(function(){return B})}],usesInheritance:!0,ngImport:o,template:"",isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:B,decorators:[{type:c.Component,args:[{providers:[{provide:C,useExisting:c.forwardRef(function(){return B})}],selector:"kendo-upload-messages, kendo-fileselect-messages, kendo-uploaddropzone-messages",template:""}]}],ctorParameters:function(){return[{type:s.LocalizationService}]}});st.prototype.ngDoCheck=function(){this.isPaused=this.fileList.hasFileWithState([p.FileState.Paused]),this.isFailed=this.fileList.hasFileWithState([p.FileState.Failed]),this.isUploading=this.fileList.hasFileWithState([p.FileState.Uploading]),this.isPaused&&!this.isUploading?this.statusText=this.localization.get("headerStatusPaused"):this.statusText=this.isUploading?this.localization.get("headerStatusUploading"):this.localization.get("headerStatusUploaded")};T=st;function st(e){this.localization=e}T.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:T,deps:[{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),T.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:T,selector:"kendo-upload-status-total",inputs:{fileList:"fileList"},ngImport:o,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 ",isInline:!0,directives:[{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:T,decorators:[{type:c.Component,args:[{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 "}]}],ctorParameters:function(){return[{type:s.LocalizationService}]},propDecorators:{fileList:[{type:c.Input}]}});Object.defineProperty(z.prototype,"actionButtonsEndClassName",{get:function(){return"end"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsStretchedClassName",{get:function(){return"stretched"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsStartClassName",{get:function(){return"start"===this.actionsLayout},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"actionButtonsCenterClassName",{get:function(){return"center"===this.actionsLayout},enumerable:!1,configurable:!0}),z.prototype.onAction=function(){var t=this;this.actionSubscription=this.navigation.onActionButtonAction.subscribe(function(e){"clear"===e?t.clearFiles():t.performUpload()})},z.prototype.onFocus=function(){var t=this;this.focusSubscription=this.navigation.onActionButtonFocus.subscribe(function(e){t.focusButton(e)})},z.prototype.focusButton=function(e){("clear"===e?this.clearButton:this.uploadButton).nativeElement.focus()},z.prototype.ngOnDestroy=function(){this.actionSubscription.unsubscribe(),this.focusSubscription.unsubscribe()},z.prototype.onUploadButtonClick=function(e){e.stopImmediatePropagation(),this.performUpload()},z.prototype.performUpload=function(){this.disabled||(this.uploadService.uploadFiles(),this.navigation.focusSelectButton())},z.prototype.onClearButtonClick=function(e){e.stopImmediatePropagation(),this.clearFiles()},z.prototype.clearFiles=function(){this.disabled||(this.uploadService.clearFiles(),this.navigation.focusSelectButton())},z.prototype.textFor=function(e){return this.localization.get(e)};C=z;function z(e,t,n){this.uploadService=e,this.localization=t,this.navigation=n,this.hostDefaultClass=!0,this.onAction(),this.onFocus()}C.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,deps:[{token:h},{token:s.LocalizationService},{token:g}],target:o.ɵɵFactoryTarget.Component}),C.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"kendo-upload-action-buttons",inputs:{disabled:"disabled",actionsLayout:"actionsLayout"},host:{properties:{"class.k-actions":"this.hostDefaultClass","class.k-actions-end":"this.actionButtonsEndClassName","class.k-actions-stretched":"this.actionButtonsStretchedClassName","class.k-actions-start":"this.actionButtonsStartClassName","class.k-actions-center":"this.actionButtonsCenterClassName"}},viewQueries:[{propertyName:"clearButton",first:!0,predicate:["clearButton"],descendants:!0,static:!0},{propertyName:"uploadButton",first:!0,predicate:["uploadButton"],descendants:!0,static:!0}],ngImport:o,template:'\n <button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="onClearButtonClick($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="onUploadButtonClick($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n ',isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:C,decorators:[{type:c.Component,args:[{selector:"kendo-upload-action-buttons",template:'\n <button #clearButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-clear-selected"\n [attr.tabIndex]="-1"\n (click)="onClearButtonClick($event)">\n {{textFor(\'clearSelectedFiles\')}}\n </button>\n <button #uploadButton type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-upload-selected"\n [attr.tabIndex]="-1"\n (click)="onUploadButtonClick($event)">\n {{textFor(\'uploadSelectedFiles\')}}\n </button>\n '}]}],ctorParameters:function(){return[{type:h},{type:s.LocalizationService},{type:g}]},propDecorators:{disabled:[{type:c.Input}],actionsLayout:[{type:c.Input}],clearButton:[{type:c.ViewChild,args:["clearButton",{static:!0}]}],uploadButton:[{type:c.ViewChild,args:["uploadButton",{static:!0}]}],hostDefaultClass:[{type:c.HostBinding,args:["class.k-actions"]}],actionButtonsEndClassName:[{type:c.HostBinding,args:["class.k-actions-end"]}],actionButtonsStretchedClassName:[{type:c.HostBinding,args:["class.k-actions-stretched"]}],actionButtonsStartClassName:[{type:c.HostBinding,args:["class.k-actions-start"]}],actionButtonsCenterClassName:[{type:c.HostBinding,args:["class.k-actions-center"]}]}});var e={multi:!0,provide:e.NG_VALUE_ACCESSOR,useExisting:c.forwardRef(function(){return L})},L=(Object.defineProperty(P.prototype,"autoUpload",{get:function(){return this.uploadService.async.autoUpload},set:function(e){this.uploadService.async.autoUpload=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"batch",{get:function(){return this.uploadService.async.batch},set:function(e){this.uploadService.async.batch=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"withCredentials",{get:function(){return this.uploadService.async.withCredentials},set:function(e){this.uploadService.async.withCredentials=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"saveField",{get:function(){return this.uploadService.async.saveField},set:function(e){this.uploadService.async.saveField=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"saveHeaders",{get:function(){return this.uploadService.async.saveHeaders},set:function(e){this.uploadService.async.saveHeaders=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"saveMethod",{get:function(){return this.uploadService.async.saveMethod},set:function(e){this.uploadService.async.saveMethod=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"saveUrl",{get:function(){return this.uploadService.async.saveUrl},set:function(e){this.uploadService.async.saveUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"responseType",{get:function(){return this.uploadService.async.responseType},set:function(e){this.uploadService.async.responseType=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"removeField",{get:function(){return this.uploadService.async.removeField},set:function(e){this.uploadService.async.removeField=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"removeHeaders",{get:function(){return this.uploadService.async.removeHeaders},set:function(e){this.uploadService.async.removeHeaders=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"removeMethod",{get:function(){return this.uploadService.async.removeMethod},set:function(e){this.uploadService.async.removeMethod=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"removeUrl",{get:function(){return this.uploadService.async.removeUrl},set:function(e){this.uploadService.async.removeUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"concurrent",{get:function(){return this.uploadService.async.concurrent},set:function(e){this.uploadService.async.concurrent=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"tabIndex",{get:function(){return this.tabindex},set:function(e){this.tabindex=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"restrictions",{get:function(){return this._restrictions},set:function(e){e=Object.assign({},this._restrictions,e);this._restrictions=e},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hostDisabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"dir",{get:function(){return this.direction},enumerable:!1,configurable:!0}),P.prototype.ngOnInit=function(){this.verifySettings(),this.renderer.removeAttribute(this.wrapper,"tabindex"),this.uploadService.setChunkSettings(this.chunkable),this.zoneId&&this.dropZoneService.addComponent(this,this.zoneId)},P.prototype.ngOnChanges=function(e){u.isChanged("chunkable",e)&&("boolean"==typeof(e=e.chunkable.currentValue)&&(this.uploadService.async.chunk=e),"object"==typeof e&&null!==e&&(this.uploadService.async.chunk=!0,this.uploadService.chunk=Object.assign({},this.uploadService.chunk,e)))},P.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()},P.prototype.handleKeydown=function(e){if(!this.disabled)return e.keyCode!==u.Keys.Enter&&e.keyCode!==u.Keys.Space||e.target!==this.fileSelectButton.nativeElement?void(!be(e.target,De)&&(ke(e.target)||be(e.target,Ee))||this.navigation.process(e)):(e.preventDefault(),void this.fileSelect.nativeElement.click())},P.prototype.writeValue=function(e){var t=!0;e instanceof Array&&(e.forEach(function(e){pe(e)||(t=!1)}),t&&this.uploadService.addInitialFiles(e)),null===e&&this.fileList.clear(),this.cdr.markForCheck()},P.prototype.registerOnChange=function(e){this.onChangeCallback=e},P.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},P.prototype.setDisabledState=function(e){this.disabled=e},Object.defineProperty(P.prototype,"selectButtonTabIndex",{get:function(){return this.disabled?void 0:this.tabIndex},enumerable:!1,configurable:!0}),P.prototype.onFileSelectButtonFocus=function(e){this.renderer.addClass(this.fileSelectButton.nativeElement,"k-focus"),this.navigation.focused||(this.navigation.focusedIndex=-1)},P.prototype.onFileSelectButtonBlur=function(e){this.renderer.removeClass(this.fileSelectButton.nativeElement,"k-focus")},Object.defineProperty(P.prototype,"showActionButtons",{get:function(){var e,t,n=!1;return this.autoUpload||(e=0<this.fileList.filesToUpload.length,t=this.fileList.hasFileWithState([p.FileState.Uploading]),this.concurrent&&e&&(n=!0),this.concurrent||!e||t||(n=!0)),this.navigation.actionButtonsVisible=n},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"showTotalStatus",{get:function(){var e=[p.FileState.Uploaded,p.FileState.Uploading,p.FileState.Failed,p.FileState.Paused];return!!this.fileList.hasFileWithState(e)},enumerable:!1,configurable:!0}),P.prototype.textFor=function(e){return this.localization.get(e)},P.prototype.focus=function(){var e=this;setTimeout(function(){e.fileSelectButton.nativeElement.focus()})},P.prototype.focusComponent=function(){this.focus()},P.prototype.blur=function(){this.navigation.focused&&(this.navigation.focused=!1,document.activeElement.blur(),this.onBlur.emit())},P.prototype.blurComponent=function(){this.blur()},P.prototype.pauseFileByUid=function(e){this.uploadService.pauseFile(e)},P.prototype.resumeFileByUid=function(e){this.uploadService.resumeFile(e)},P.prototype.removeFilesByUid=function(e){this.uploadService.removeFiles(e)},P.prototype.retryUploadByUid=function(e){this.uploadService.retryFiles(e)},P.prototype.cancelUploadByUid=function(e){this.uploadService.cancelFiles(e)},P.prototype.uploadFiles=function(){this.fileList.filesToUpload.length&&this.uploadService.uploadFiles()},P.prototype.clearFiles=function(){this.uploadService.clearFiles()},P.prototype.addFiles=function(e){this.uploadService.addFiles(e)},P.prototype.isEmpty=function(){return!1},P.prototype.verifySettings=function(){if(c.isDevMode()&&this.batch&&!1!==this.chunkable)throw new Error("The file chunking functionality requires the batch setting to be disabled.")},P.prototype.subscribeBlur=function(){var t=this;u.isDocumentAvailable()&&this._ngZone.runOutsideAngular(function(){t.documentClick=R.fromEvent(document,"click").pipe(V.filter(function(e){return!(t.wrapper!==e.target&&t.wrapper.contains(e.target))})),t.blurSubscription=R.merge(t.documentClick,t.navigation.onTab).subscribe(function(){t.navigation.focused&&t._ngZone.run(function(){t.navigation.focused=!1,t.onTouchedCallback(),t.onBlur.emit()})})})},P.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()})},P.prototype.attachEventHandlers=function(){var t=this;this.subs=this.uploadService.cancelEvent.subscribe(function(e){t.cancel.emit(e)}),this.subs.add(this.uploadService.changeEvent.subscribe(function(e){t.onChangeCallback(e),t.valueChange.emit(e)})),this.subs.add(this.uploadService.clearEvent.subscribe(function(e){t.clear.emit(e)})),this.subs.add(this.uploadService.completeEvent.subscribe(function(){t.complete.emit()})),this.subs.add(this.uploadService.errorEvent.subscribe(function(e){t.error.emit(e)})),this.subs.add(this.uploadService.pauseEvent.subscribe(function(e){t.pause.emit(e)})),this.subs.add(this.uploadService.removeEvent.subscribe(function(e){t.remove.emit(e)})),this.subs.add(this.uploadService.resumeEvent.subscribe(function(e){t.resume.emit(e)})),this.subs.add(this.uploadService.selectEvent.subscribe(function(e){t.select.emit(e)})),this.subs.add(this.uploadService.successEvent.subscribe(function(e){t.success.emit(e)})),this.subs.add(this.uploadService.uploadEvent.subscribe(function(e){t.upload.emit(e)})),this.subs.add(this.uploadService.uploadProgressEvent.subscribe(function(e){t.uploadProgress.emit(e)}))},P);function P(e,t,n,i,o,s,a,r){var l=this;this.uploadService=e,this.localization=t,this.navigation=n,this.dropZoneService=i,this._ngZone=o,this.renderer=s,this.cdr=a,this.chunkable=!1,this.multiple=!0,this.disabled=!1,this.showFileList=!0,this.tabindex=0,this.focusableId="k-"+u.guid(),this.actionsLayout="end",this.onBlur=new c.EventEmitter,this.cancel=new c.EventEmitter,this.clear=new c.EventEmitter,this.complete=new c.EventEmitter,this.error=new c.EventEmitter,this.onFocus=new c.EventEmitter,this.pause=new c.EventEmitter,this.remove=new c.EventEmitter,this.resume=new c.EventEmitter,this.select=new c.EventEmitter,this.success=new c.EventEmitter,this.upload=new c.EventEmitter,this.uploadProgress=new c.EventEmitter,this.valueChange=new c.EventEmitter,this.hostDefaultClasses=!0,this._restrictions={allowedExtensions:[],maxFileSize:0,minFileSize:0},this.onTouchedCallback=function(e){},this.onChangeCallback=function(e){},j.validatePackage(Ue),this.fileList=this.uploadService.files,this.localizationChangeSubscription=t.changes.subscribe(function(e){e=e.rtl;l.direction=e?"rtl":"ltr",l.navigation.computeKeys(l.direction)}),this.direction=t.rtl?"rtl":"ltr",this.navigation.computeKeys(this.direction),this.wrapper=r.nativeElement,this.subscribeBlur(),this.subscribeFocus(),this.attachEventHandlers()}L.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:L,deps:[{token:h},{token:s.LocalizationService},{token:g},{token:y},{token:o.NgZone},{token:o.Renderer2},{token:o.ChangeDetectorRef},{token:o.ElementRef}],target:o.ɵɵFactoryTarget.Component}),L.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:L,selector:"kendo-upload",inputs:{autoUpload:"autoUpload",batch:"batch",withCredentials:"withCredentials",saveField:"saveField",saveHeaders:"saveHeaders",saveMethod:"saveMethod",saveUrl:"saveUrl",responseType:"responseType",removeField:"removeField",removeHeaders:"removeHeaders",removeMethod:"removeMethod",removeUrl:"removeUrl",chunkable:"chunkable",concurrent:"concurrent",multiple:"multiple",disabled:"disabled",showFileList:"showFileList",tabindex:"tabindex",zoneId:"zoneId",tabIndex:"tabIndex",accept:"accept",restrictions:"restrictions",focusableId:"focusableId",actionsLayout:"actionsLayout"},outputs:{onBlur:"blur",cancel:"cancel",clear:"clear",complete:"complete",error:"error",onFocus:"focus",pause:"pause",remove:"remove",resume:"resume",select:"select",success:"success",upload:"upload",uploadProgress:"uploadProgress",valueChange:"valueChange"},host:{listeners:{keydown:"handleKeydown($event)"},properties:{"class.k-widget":"this.hostDefaultClasses","class.k-upload":"this.hostDefaultClasses","class.k-disabled":"this.hostDisabledClass","attr.dir":"this.dir"}},providers:[t.LocalizationService,g,h,y,e,{provide:t.L10N_PREFIX,useValue:"kendo.upload"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return L})}],queries:[{propertyName:"fileTemplate",first:!0,predicate:f,descendants:!0},{propertyName:"fileInfoTemplate",first:!0,predicate:b,descendants:!0}],viewQueries:[{propertyName:"fileSelect",first:!0,predicate:["fileSelect"],descendants:!0,static:!0},{propertyName:"fileSelectButton",first:!0,predicate:["fileSelectButton"],descendants:!0,static:!0}],exportAs:["kendoUpload"],usesOnChanges:!0,ngImport:o,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-button-md k-rounded-md k-button-solid k-button-solid-base 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 ',isInline:!0,components:[{type:T,selector:"kendo-upload-status-total",inputs:["fileList"]},{type:n,selector:"[kendo-upload-file-list]",inputs:["disabled","fileList","fileTemplate","fileInfoTemplate"]},{type:C,selector:"kendo-upload-action-buttons",inputs:["disabled","actionsLayout"]}],directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:D,selector:"\n [kendoUploadInternalDropZone],\n [kendoFileSelectInternalDropZone]\n ",inputs:["disabled","multiple","restrictions"]},{type:tt,selector:"[kendoFileSelect]",inputs:["dir","disabled","multiple","restrictions"]},{type:a.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:L,decorators:[{type:c.Component,args:[{exportAs:"kendoUpload",providers:[t.LocalizationService,g,h,y,e,{provide:t.L10N_PREFIX,useValue:"kendo.upload"},{provide:u.KendoInput,useExisting:c.forwardRef(function(){return L})}],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-button-md k-rounded-md k-button-solid k-button-solid-base 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 '}]}],ctorParameters:function(){return[{type:h},{type:s.LocalizationService},{type:g},{type:y},{type:o.NgZone},{type:o.Renderer2},{type:o.ChangeDetectorRef},{type:o.ElementRef}]},propDecorators:{autoUpload:[{type:c.Input}],batch:[{type:c.Input}],withCredentials:[{type:c.Input}],saveField:[{type:c.Input}],saveHeaders:[{type:c.Input}],saveMethod:[{type:c.Input}],saveUrl:[{type:c.Input}],responseType:[{type:c.Input}],removeField:[{type:c.Input}],removeHeaders:[{type:c.Input}],removeMethod:[{type:c.Input}],removeUrl:[{type:c.Input}],chunkable:[{type:c.Input}],concurrent:[{type:c.Input}],multiple:[{type:c.Input}],disabled:[{type:c.Input}],showFileList:[{type:c.Input}],tabindex:[{type:c.Input}],zoneId:[{type:c.Input}],tabIndex:[{type:c.Input,args:["tabIndex"]}],accept:[{type:c.Input}],restrictions:[{type:c.Input}],focusableId:[{type:c.Input}],actionsLayout:[{type:c.Input}],fileTemplate:[{type:c.ContentChild,args:[f,{static:!1}]}],fileInfoTemplate:[{type:c.ContentChild,args:[b,{static:!1}]}],fileSelect:[{type:c.ViewChild,args:["fileSelect",{static:!0}]}],fileSelectButton:[{type:c.ViewChild,args:["fileSelectButton",{static:!0}]}],onBlur:[{type:c.Output,args:["blur"]}],cancel:[{type:c.Output}],clear:[{type:c.Output}],complete:[{type:c.Output}],error:[{type:c.Output}],onFocus:[{type:c.Output,args:["focus"]}],pause:[{type:c.Output}],remove:[{type:c.Output}],resume:[{type:c.Output}],select:[{type:c.Output}],success:[{type:c.Output}],upload:[{type:c.Output}],uploadProgress:[{type:c.Output}],valueChange:[{type:c.Output}],hostDefaultClasses:[{type:c.HostBinding,args:["class.k-widget"]},{type:c.HostBinding,args:["class.k-upload"]}],hostDisabledClass:[{type:c.HostBinding,args:["class.k-disabled"]}],dir:[{type:c.HostBinding,args:["attr.dir"]}],handleKeydown:[{type:c.HostListener,args:["keydown",["$event"]]}]}});at.prototype.onElementDragEnter=function(){return!1},at.prototype.onElementDragOver=function(){return!1},at.prototype.onDropListener=function(n){var e=this.componentInstance;if(Fe(e))return e.forEach(function(e){var t=n.dataTransfer.files;0<t.length&&!e.disabled&&(t=fe(t),t=ve(t,!(e instanceof L)||!e.batch),e.multiple||(t.splice(1,t.length-1),e.clearFiles()),We(t,e.restrictions),e.addFiles(t))}),!1},Object.defineProperty(at.prototype,"componentInstance",{get:function(){return this.dropZoneService.getComponents(this.zoneId)},enumerable:!1,configurable:!0});e=at;function at(e){this.dropZoneService=e}e.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:e,deps:[{token:y}],target:o.ɵɵFactoryTarget.Directive}),e.ɵdir=o.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:e,selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]",inputs:{zoneId:["kendoUploadDropZone","zoneId"]},host:{listeners:{dragenter:"onElementDragEnter()",dragover:"onElementDragOver()",drop:"onDropListener($event)"}},providers:[y],ngImport:o}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:e,decorators:[{type:c.Directive,args:[{providers:[y],selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]"}]}],ctorParameters:function(){return[{type:y}]},propDecorators:{zoneId:[{type:c.Input,args:["kendoUploadDropZone"]}],onElementDragEnter:[{type:c.HostListener,args:["dragenter"]}],onElementDragOver:[{type:c.HostListener,args:["dragover"]}],onDropListener:[{type:c.HostListener,args:["drop",["$event"]]}]}});r(lt,rt=E),Object.defineProperty(lt.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!1,configurable:!0}),lt.prototype.textFor=function(e){return this.localization.get(e)},Object.defineProperty(lt.prototype,"iconClasses",{get:function(){return this.icon?"k-icon k-i-"+this.icon:this.iconClass?""+this.iconClass:"k-icon k-i-upload"},enumerable:!1,configurable:!0}),lt.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()};var rt,E=lt;function lt(e,t,n){var i=rt.call(this,e,t,"k-external-dropzone-hover")||this;return i.localization=n,i.hostClass=!0,i.localizationChangeSubscription=i.localization.changes.subscribe(function(e){e=e.rtl;i.direction=e?"rtl":"ltr"}),i}E.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:s.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),E.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:E,selector:"kendo-uploaddropzone",inputs:{zoneId:"zoneId",icon:"icon",iconClass:"iconClass"},host:{properties:{"class.k-external-dropzone":"this.hostClass","attr.dir":"this.dirAttribute"}},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.uploaddropzone"}],exportAs:["kendoUploadDropZone"],usesInheritance:!0,ngImport:o,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 ",isInline:!0,directives:[{type:x,selector:"\n [kendoUploadLocalizedMessages],\n [kendoFileSelectLocalizedMessages],\n [kendoUploadDropZoneLocalizedMessages]\n "},{type:e,selector:"[kendoUploadDropZone], [kendoFileSelectDropZone]",inputs:["kendoUploadDropZone"]},{type:a.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:E,decorators:[{type:c.Component,args:[{exportAs:"kendoUploadDropZone",providers:[t.LocalizationService,{provide:t.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 "}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:s.LocalizationService}]},propDecorators:{hostClass:[{type:c.HostBinding,args:["class.k-external-dropzone"]}],dirAttribute:[{type:c.HostBinding,args:["attr.dir"]}],zoneId:[{type:c.Input}],icon:[{type:c.Input}],iconClass:[{type:c.Input}]}});var a=[D,n,k,Oe,Ae,Ve,tt,x,I],t=[f,b,B,e,E],O=function(){},D=(O.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,deps:[],target:o.ɵɵFactoryTarget.NgModule}),O.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,declarations:[f,b,B,e,E,D,n,k,Oe,Ae,Ve,tt,x,I],imports:[i.CommonModule],exports:[f,b,B,e,E,D,n,k,Oe,Ae,Ve,tt,x,I,i.CommonModule]}),O.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,imports:[[i.CommonModule],i.CommonModule]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:O,decorators:[{type:c.NgModule,args:[{declarations:[t,a],exports:[t,a,i.CommonModule],imports:[i.CommonModule]}]}]}),[w]),k=function(){},a=(k.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,deps:[],target:o.ɵɵFactoryTarget.NgModule}),k.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,declarations:[w],imports:[O],exports:[f,b,B,e,E,w]}),k.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,imports:[[O]]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,decorators:[{type:c.NgModule,args:[{declarations:[D],exports:[t,D],imports:[O]}]}]}),[L,C,T]),i=function(){},D=(i.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,deps:[],target:o.ɵɵFactoryTarget.NgModule}),i.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,declarations:[L,C,T],imports:[O],exports:[f,b,B,e,E,L,C,T]}),i.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,imports:[[O]]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:i,decorators:[{type:c.NgModule,args:[{declarations:[a],exports:[t,a],imports:[O]}]}]}),function(){});D.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,deps:[],target:o.ɵɵFactoryTarget.NgModule}),D.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,exports:[k,i]}),D.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,imports:[k,i]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:D,decorators:[{type:c.NgModule,args:[{exports:[k,i]}]}]}),p.CancelEvent=Z,p.ClearEvent=q,p.CustomMessagesComponent=B,p.ErrorEvent=X,p.FileInfoTemplateDirective=b,p.FileListComponent=n,p.FileListItemActionButtonComponent=Oe,p.FileListItemBase=Le,p.FileListMultipleItemsComponent=Ae,p.FileListSingleItemComponent=Ve,p.FileMap=_,p.FileSelectComponent=w,p.FileSelectDirective=tt,p.FileSelectModule=k,p.FileTemplateDirective=f,p.NavigationService=g,p.PauseEvent=Q,p.RemoveEvent=Y,p.ResumeEvent=te,p.SelectEvent=ne,p.SuccessEvent=se,p.TemplateContextDirective=I,p.UploadActionButtonsComponent=C,p.UploadComponent=L,p.UploadDropZoneComponent=E,p.UploadDropZoneDirective=e,p.UploadEvent=le,p.UploadModule=i,p.UploadProgressEvent=Se,p.UploadService=h,p.UploadStatusTotalComponent=T,p.UploadsModule=D,Object.defineProperty(p,"__esModule",{value:!0})});
package/esm2015/main.js CHANGED
@@ -2,6 +2,8 @@
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
+ export { UploadService } from './upload.service';
6
+ export { NavigationService } from './navigation.service';
5
7
  export { FileSelectModule } from './fileselect.module';
6
8
  export { UploadModule } from './upload.module';
7
9
  export { UploadsModule } from './uploads.module';
@@ -10,6 +12,7 @@ export { FileSelectComponent } from './fileselect.component';
10
12
  export { UploadDropZoneComponent } from './dropzone.component';
11
13
  export { FileSelectDirective } from './file-select.directive';
12
14
  export { FileListComponent } from './rendering/file-list.component';
15
+ export { FileListItemBase } from './rendering/file-list-item-base';
13
16
  export { FileListSingleItemComponent } from './rendering/file-list-single-item.component';
14
17
  export { FileListItemActionButtonComponent } from './rendering/file-list-item-action-button.component';
15
18
  export { FileListMultipleItemsComponent } from './rendering/file-list-multiple-items.component';
@@ -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: 1650441235,
12
+ publishDate: 1652968490,
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/esm2015/types.js CHANGED
@@ -3,3 +3,4 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { FileState } from './types/file-state';
6
+ export { FileMap } from './types/file-map';
@@ -217,7 +217,7 @@ export class UploadService {
217
217
  return file.name;
218
218
  });
219
219
  let formData = this.populateRemoveFormData(fileNames, removeEventArgs.data);
220
- let options = this.populateRequestOptions(removeEventArgs.headers);
220
+ let options = this.populateRequestOptions(removeEventArgs.headers, false);
221
221
  let removeRequest = new HttpRequest(async.removeMethod, async.removeUrl, formData, options);
222
222
  this.http.request(removeRequest)
223
223
  .subscribe(success => {
@@ -338,10 +338,10 @@ export class UploadService {
338
338
  }
339
339
  return new HttpHeaders(cloned);
340
340
  }
341
- populateRequestOptions(headers) {
341
+ populateRequestOptions(headers, reportProgress = true) {
342
342
  return {
343
343
  headers: headers,
344
- reportProgress: true,
344
+ reportProgress: reportProgress,
345
345
  responseType: this.async.responseType,
346
346
  withCredentials: this.async.withCredentials
347
347
  };
@@ -2,33 +2,21 @@
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
+ import * as i1 from '@angular/common/http';
6
+ import { HttpHeaders, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
5
7
  import * as i0 from '@angular/core';
6
8
  import { EventEmitter, Injectable, Directive, Input, HostBinding, HostListener, Component, ViewChildren, forwardRef, Inject, ContentChild, ViewChild, Output, isDevMode, NgModule } from '@angular/core';
9
+ import { guid, Keys, isDocumentAvailable, KendoInput, isChanged } from '@progress/kendo-angular-common';
7
10
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
11
  import * as i1$1 from '@progress/kendo-angular-l10n';
9
12
  import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
10
- import { guid, Keys, isDocumentAvailable, KendoInput, isChanged } from '@progress/kendo-angular-common';
11
13
  import { fromEvent, merge } from 'rxjs';
12
14
  import { filter } from 'rxjs/operators';
13
15
  import { validatePackage } from '@progress/kendo-licensing';
14
- import * as i1 from '@angular/common/http';
15
- import { HttpHeaders, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
16
16
  import { trigger, state, style, transition, animate } from '@angular/animations';
17
17
  import * as i4 from '@angular/common';
18
18
  import { CommonModule } from '@angular/common';
19
19
 
20
- /**
21
- * @hidden
22
- */
23
- const packageMetadata = {
24
- name: '@progress/kendo-angular-upload',
25
- productName: 'Kendo UI for Angular',
26
- productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
27
- publishDate: 1650441235,
28
- version: '',
29
- 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'
30
- };
31
-
32
20
  /**
33
21
  * Lists the possible states of a file.
34
22
  */
@@ -1102,7 +1090,7 @@ class UploadService {
1102
1090
  return file.name;
1103
1091
  });
1104
1092
  let formData = this.populateRemoveFormData(fileNames, removeEventArgs.data);
1105
- let options = this.populateRequestOptions(removeEventArgs.headers);
1093
+ let options = this.populateRequestOptions(removeEventArgs.headers, false);
1106
1094
  let removeRequest = new HttpRequest(async.removeMethod, async.removeUrl, formData, options);
1107
1095
  this.http.request(removeRequest)
1108
1096
  .subscribe(success => {
@@ -1223,10 +1211,10 @@ class UploadService {
1223
1211
  }
1224
1212
  return new HttpHeaders(cloned);
1225
1213
  }
1226
- populateRequestOptions(headers) {
1214
+ populateRequestOptions(headers, reportProgress = true) {
1227
1215
  return {
1228
1216
  headers: headers,
1229
- reportProgress: true,
1217
+ reportProgress: reportProgress,
1230
1218
  responseType: this.async.responseType,
1231
1219
  withCredentials: this.async.withCredentials
1232
1220
  };
@@ -1456,6 +1444,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1456
1444
  type: Injectable
1457
1445
  }], ctorParameters: function () { return [{ type: UploadService }]; } });
1458
1446
 
1447
+ /**
1448
+ * @hidden
1449
+ */
1450
+ const packageMetadata = {
1451
+ name: '@progress/kendo-angular-upload',
1452
+ productName: 'Kendo UI for Angular',
1453
+ productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
1454
+ publishDate: 1652968490,
1455
+ version: '',
1456
+ 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'
1457
+ };
1458
+
1459
1459
  /**
1460
1460
  * Used to customize the rendering of the files in the list ([see example]({% slug templates_upload %}#toc-file-template)).
1461
1461
  */
@@ -4755,5 +4755,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
4755
4755
  * Generated bundle index. Do not edit.
4756
4756
  */
4757
4757
 
4758
- export { CancelEvent, ClearEvent, CustomMessagesComponent, ErrorEvent, FileInfoTemplateDirective, FileListComponent, FileListItemActionButtonComponent, FileListMultipleItemsComponent, FileListSingleItemComponent, FileSelectComponent, FileSelectDirective, FileSelectModule, FileState, FileTemplateDirective, PauseEvent, RemoveEvent, ResumeEvent, SelectEvent, SuccessEvent, TemplateContextDirective, UploadActionButtonsComponent, UploadComponent, UploadDropZoneComponent, UploadDropZoneDirective, UploadEvent, UploadModule, UploadProgressEvent, UploadStatusTotalComponent, UploadsModule };
4758
+ export { CancelEvent, ClearEvent, CustomMessagesComponent, ErrorEvent, FileInfoTemplateDirective, FileListComponent, FileListItemActionButtonComponent, FileListItemBase, FileListMultipleItemsComponent, FileListSingleItemComponent, FileMap, FileSelectComponent, FileSelectDirective, FileSelectModule, FileState, FileTemplateDirective, NavigationService, PauseEvent, RemoveEvent, ResumeEvent, SelectEvent, SuccessEvent, TemplateContextDirective, UploadActionButtonsComponent, UploadComponent, UploadDropZoneComponent, UploadDropZoneDirective, UploadEvent, UploadModule, UploadProgressEvent, UploadService, UploadStatusTotalComponent, UploadsModule };
4759
4759
 
package/main.d.ts CHANGED
@@ -2,6 +2,8 @@
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
+ export { UploadService } from './upload.service';
6
+ export { NavigationService } from './navigation.service';
5
7
  export { FileSelectModule } from './fileselect.module';
6
8
  export { UploadModule } from './upload.module';
7
9
  export { UploadsModule } from './uploads.module';
@@ -10,6 +12,7 @@ export { FileSelectComponent } from './fileselect.component';
10
12
  export { UploadDropZoneComponent } from './dropzone.component';
11
13
  export { FileSelectDirective } from './file-select.directive';
12
14
  export { FileListComponent } from './rendering/file-list.component';
15
+ export { FileListItemBase } from './rendering/file-list-item-base';
13
16
  export { FileListSingleItemComponent } from './rendering/file-list-single-item.component';
14
17
  export { FileListItemActionButtonComponent } from './rendering/file-list-item-action-button.component';
15
18
  export { FileListMultipleItemsComponent } from './rendering/file-list-multiple-items.component';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-upload",
3
- "version": "9.0.0",
3
+ "version": "9.0.2-dev.202205191355",
4
4
  "description": "Kendo UI Angular Upload Component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
package/types.d.ts CHANGED
@@ -8,3 +8,4 @@ export { FileInfo } from './types/file-info';
8
8
  export { FileState } from './types/file-state';
9
9
  export { FileRestrictions } from './types/file-restrictions';
10
10
  export { OperationType } from './types/operation-type';
11
+ export { FileMap } from './types/file-map';