12345678910 |
- /*!
- * filename: ej2-filemanager.min.js
- * version : 19.1.66
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.filemanager=function(e,t,i,n,s,a,r,o,l,h,d){"use strict";function p(e,i,n){var s=t.getValue("name",i),a=e.getAttribute("data-id"),r=t.isNullOrUndefined(a)?s:a;n.setProperties({path:c(e,r,n.hasId)},!0),n.pathId=u(e),n.pathNames=f(e,s)}function c(e,t,i){for(var n=g(e,t,!1,i),s=i?"":"/",a=n.length-(i?1:2);a>=0;a--)s+=n[a]+"/";return s}function u(e){for(var t=g(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;n>=0;n--)i.push(t[n]);return i}function f(e,t){for(var i=g(e,t,!1),n=[],s=i.length-1;s>=0;s--)n.push(i[s]);return n}function g(e,i,n,s){for(var a=[i],r=e.parentNode;!t.isNullOrUndefined(r);){if(t.matches(r,"."+hi)){var o=n?r.getAttribute("data-uid"):s?r.getAttribute("data-id"):t.select("."+di,r).textContent;a.push(o)}if((r=r.parentNode).classList.contains(ki))break}return a}function m(e){var i=e.hasId?"id":"name",n=e.hasId?"":"/",s=e.hasId?0:1;for(s;s<e.pathId.length;s++){var a=t.getValue(e.pathId[s],e.feParent);n+=t.getValue(i,a)+"/"}e.setProperties({path:n},!0)}function b(e){e.isCut&&(O(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(vn,{}))}function y(e,i){if(i.isSearchCut=!1,i.actionRecords=[],i.activeElements=[],i.notify(On,{}),0===i.activeElements.length)return!1;O(i);var n=i.activeElements;"navigationpane"!==i.activeModule?i.targetPath=i.path:i.targetPath=Q(i.path);var s=0;if(n&&(w(i,n[0]),"cut"===e))for(;s<n.length;)v(n[s]),s++;for(s=0,i.selectedNodes=[],i.enablePaste=!0,i.notify(yn,{});s<i.activeRecords.length;)i.actionRecords.push(i.activeRecords[s]),i.selectedNodes.push(t.getValue("name",i.activeRecords[s])),s++;if((""!==i.breadcrumbbarModule.searchObj.element.value||i.isFiltered)&&"navigationpane"!==i.activeModule){i.selectedNodes=[],i.isSearchCut=!0;for(var a=0;a<i.selectedItems.length;)i.selectedNodes.push(i.selectedItems[a]),a++}return!0}function v(e){e.classList.add(ui)}function O(e,t){for(var i=t?e.element.querySelectorAll("."+gi):e.element.querySelectorAll("."+ui),n=0;n<i.length;)i[n].classList.remove(t?gi:ui),n++}function w(e,i){i&&(i.classList.contains(vi)?e.activeModule="detailsview":t.closest(i,"."+Ei)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function I(e,t,i){var n;if(0!==t.length||e.isFiltered||e.notify(Cn,{args:e}),n="startsWith"===e.searchSettings.filterType?t+"*":"endsWith"===e.searchSettings.filterType?"*"+t:"*"+t+"*",e.searchWord=n,e.itemData=[x(e)],t.length>0){var s=e.searchSettings.ignoreCase,a=e.showHiddenItems;Ve(e,i?pn:rn,e.path,n,a,!s)}else e.isFiltered?Ce(e,pn):De(e,i?pn:rn,e.path)}function D(e,t){e.setProperties({view:t},!0),(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered)&&(e.layoutSelectedItems=e.selectedItems);var i="";e.breadcrumbbarModule.searchObj.element.value&&(i=e.breadcrumbbarModule.searchObj.element.value),e.isLayoutChange=!0,I(e,i,!0)}function S(e,i){var n="";i&&(n=t.closest(i,".e-gridcontent")?"detailsview":t.closest(i,"."+li)?"largeiconsview":i.classList.contains("e-fullrow")||i.classList.contains("e-icon-expandable")?"navigationpane":t.closest(i,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=n}function C(e){e.itemData=[x(e)],me(e.itemData[0])?De(e,Xi,e.path):fe(e,e.itemData[0],Mn)}function j(e){De(e,ln,e.path)}function x(e){return t.getValue(e.pathId[e.pathId.length-1],e.feParent)}function P(e){y("copy",e)&&(e.fileAction="copy")}function N(e){y("cut",e)&&(e.isCut=!0,e.fileAction="move")}function E(e){if(!t.getValue("isFile",e))return ji;var i=["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"],n=["mp3","wav","aac","ogg","wma","aif","fla","m4a"],s=["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"],a=["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"],r=t.getValue("type",e);-1!==(r=r.toLowerCase()).indexOf(".")&&(r=r.split(".").join(""));return-1!==i.indexOf(r)?xi:-1!==n.indexOf(r)?Pi:-1!==s.indexOf(r)?Ni:-1!==a.indexOf(r)?"e-fe-"+r:"e-fe-unknown e-fe-"+r}function R(e,i){var n,s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,a=t.getValue("name",i),r=t.getValue("filterPath",i);if(e.hasId){var o=t.getValue("id",i);n=s+"?path="+e.path+"&id="+o}else n=t.isNullOrUndefined(r)?s+"?path="+e.path+a:s+"?path="+r.replace(/\\/g,"/")+a;var l={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",l),l.imageUrl}function M(e,i,n){var s=t.getValue(e.hasId?"id":"name",i)+"/",a=t.getValue(e.hasId?"filterId":"filterPath",i);return t.isNullOrUndefined(a)?n+s:a.replace(/\\/g,"/")+s}function k(e,i){var n=t.getValue("name",i),s=t.getValue("filterPath",i);return""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||t.isNullOrUndefined(s)||(n=(s=s.replace(/\\/g,"/")).replace(e.path,"")+n),n}function L(e,i){if(0===i.length)return i;var n;n="None"!==e.sortOrder?(new s.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0).group("isFile"):(new s.Query).group("isFile");var a=new s.DataManager(i).executeLocal(n);return t.getValue("records",a)}function T(e,i,n){var a=t.getValue(e.pathId[e.pathId.length-1],e.feFiles),r=(new s.Query).where(i,"equal",n);return new s.DataManager(a).executeLocal(r)[0]}function A(e,i,n){var s,a=t.select("#"+e.element.id+Jt,e.element),r=t.select("#"+e.element.id+ni,a).offsetHeight;if(s=a.offsetHeight-r,"Details"===e.view&&(s-=t.select("."+Mi,a).offsetHeight),t.isNullOrUndefined(i.querySelector("."+Oi))){var o=t.createElement("div",{className:Oi}),l=t.createElement("div",{className:Ri}),h=t.createElement("div",{className:wi}),d=t.createElement("div",{className:Ii});"Details"===e.view?i.querySelector("."+Ti).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+Oi)&&(t.isNullOrUndefined(n.error)?e.isFiltered?(i.querySelector("."+wi).innerHTML=V(e,"Filter-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+wi).innerHTML=V(e,"Search-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"Search-Key")):(i.querySelector("."+wi).innerHTML=V(e,"Folder-Empty"),i.querySelector("."+Ii).innerHTML=V(e,"File-Upload")):(i.querySelector("."+wi).innerHTML=V(e,"Access-Denied"),i.querySelector("."+Ii).innerHTML=V(e,"Access-Details")));var p=t.select("."+Oi,i);s=(s-p.offsetHeight)/2,p.style.marginTop=s+"px"}function F(e){return new s.DataManager(e).executeLocal((new s.Query).where(zi,"equal",!1,!1))}function U(e,i){for(var n=F(e.files),s=0,a=n.length;s<a;s++)t.setValue("_fm_id",i+"_"+s,n[s])}function _(e){for(var i=0;i<e.length;i++)t.setValue("_fm_created",new Date(t.getValue("dateCreated",e[i])),e[i]),t.setValue("_fm_modified",new Date(t.getValue("dateModified",e[i])),e[i])}function V(e,t){var i=e.localeObj.getConstant(t);return""===i?t:i}function B(e,i){var n=e.cssClass;return n=t.isNullOrUndefined(n)||""===n?i:n+" "+i}function H(e,t){-1!==t.item.id.indexOf("ascending")||-1!==t.item.id.indexOf("descending")||-1!==t.item.id.indexOf("none")?e.sortOrder=z(t.item.id):e.sortBy=z(t.item.id),e.itemData=[x(e)],"Details"===e.view&&(e.isMobile?D(e,"Details"):e.notify(Sn,{module:"detailsview"})),"LargeIcons"===e.view&&D(e,"LargeIcons"),e.notify(cn,{})}function z(e){var t=e.substring(e.lastIndexOf("_")+1),i=t;switch(t){case"date":i="_fm_modified";break;case"ascending":i="Ascending";break;case"descending":i="Descending";break;case"none":i="None"}return i}function q(e,i){for(var n=i.split("/"),s=e.originalPath.split("/"),a=t.getValue(e.pathId[0],e.feParent),r=t.isNullOrUndefined(t.getValue("id",a))?"name":"id",o=n.length-1,l=s.length-1;o<l;o++){var h=""===s[o+1]?Ki:Wi,d=""===s[o]?"/":e.path+s[o]+"/",p=T(e,r,s[o]),c=t.getValue("_fm_id",p);e.setProperties({path:d},!0),e.pathId.push(c),e.itemData=[p],e.pathNames.push(t.getValue("name",p)),De(e,h,e.path);break}}function W(e,t){e.notify(dn,{selectedNode:e.pathId[e.pathId.length-1]}),e.originalPath=M(e,t,e.path),De(e,e.path!==e.originalPath?Wi:Ki,e.path)}function K(e){if(e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste){var t=""===e.folderPath?e.path:e.folderPath;G(e,e.actionRecords,t,e.path)||("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction?(e.notify(wn,{}),xe(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords)):(e.enablePaste=!1,e.notify(vn,{}),O(e)))}}function G(e,i,n,s){for(var a=!1,r=0;r<i.length;r++)if(t.getValue("isFile",i[r])){var o=e.dragNodes[r],l=0;o&&(l=o.lastIndexOf("/"));var h="";if(l>0&&(h=s+o.substring(0,l+1)),h===n){var d={files:null,error:{code:"402",message:V(e,"Same-Folder-Error"),fileExists:null}};ze(e,"Error",d),a=!0;break}}else{var p=M(e,i[r],s);if(0===n.indexOf(p)){ze(e,"Error",d={files:null,error:{code:"402",message:V(e,"Sub-Folder-Error"),fileExists:null}}),a=!0;break}}return a}function Y(e){e.isDragDrop=!0,0!==e.dragData.length&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),G(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],xe(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(wn,{})))}function Q(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function J(e,i){var n=t.getValue(e.hasId?"id":"name",i.cwd)+"/",s=t.getValue(e.hasId?"filterId":"filterPath",i.cwd);return t.isNullOrUndefined(s)?e.path+n:""===s?e.hasId?n:"/":s.replace(/\\/g,"/")+n}function X(e,t,i){"move"===t&&(e.isDragDrop?e.notify(Pn,i):(e.enablePaste=!1,e.notify(vn,{}),e.notify(Dn,i))),0===e.duplicateItems.length&&(e.pasteNodes=[]);for(var n=0;n<i.files.length;n++)e.pasteNodes.push(i.files[n][e.hasId?"id":"name"]),e.isDragDrop&&e.droppedObjects.push(i.files[n]);e.duplicateItems=[],e.duplicateRecords=[],e.isDragDrop&&!e.isPasteError?e.isDropEnd=!0:e.isDropEnd=!1,!e.isDragDrop||e.path===e.dragPath||e.path===e.dropPath||e.isSearchDrag?(e.isPathDrag=!1,De(e,In,e.path)):$(e),e.trigger("success",{action:t,result:i})}function $(e){var i=t.getValue("_fm_id",e.dropData);e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag?e.notify(Yi,e.itemData):(e.navigationpaneModule&&p(t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element),e.dropData,e),De(e,Nn,e.dropPath))}function Z(e,i){for(var n=null,s=e.isDragDrop?e.dragData:e.actionRecords,a=0;a<s.length;a++)if(t.getValue("name",s[a])===i){n=s[a];break}return n}function ee(e){if(e.isSearchDrag=!1,""!==e.breadcrumbbarModule.searchObj.element.value&&(e.isSearchDrag=!0),"navigationpane"!==e.activeModule){e.dragNodes=[];for(var t=0;t<e.selectedItems.length;)e.dragNodes.push(e.selectedItems[t]),t++;0==e.selectedItems.length&&e.dragData&&1==e.dragData.length&&e.dragNodes.push(le(e,e.dragData[0]))}var i=e.createElement("div",{className:"e-fe-icon "+E(e.dragData[0])}),n=e.createElement("div",{className:"e-fe-name",innerHTML:e.dragData[0].name}),s=e.createElement("div",{className:"e-fe-content"});s.appendChild(i),s.appendChild(n);var a=e.createElement("div",{className:Di});if(a.appendChild(s),e.dragNodes.length>1){var r=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)});a.appendChild(r)}e.virtualDragElement=a,e.element.appendChild(e.virtualDragElement)}function te(e,i){var n=i;n.cancel=!1,null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),se(e),e.element.classList.remove("e-fe-drop","e-no-drop"),O(e),e.uploadObj.dropArea=t.select("#"+e.element.id+ii,e.element);var s=t.select("."+Di,e.element);s&&t.detach(s),S(e,i.target),e.notify(xn,i),O(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,function(i){i.cancel||t.isNullOrUndefined(e.targetModule)||""===e.targetModule||Y(e)})}function ie(e,i,n){var s=i;if(s.cancel=!1,s.fileDetails=e.dragData,e.droppedObjects=[],(!e.allowDragAndDrop||"navigationpane"===e.activeModule&&t.closest(i.element,"li").getAttribute("data-uid")===e.pathId[0])&&(s.cancel=!0),"navigationpane"===e.activeModule&&-1!==e.pathId.indexOf(t.closest(i.element,"li").getAttribute("data-uid"))?e.isPathDrag=!0:e.isPathDrag=!1,O(e),s.cancel)n.intDestroy(i.event),ne(e);else if(!s.cancel){for(var a=0;a<e.activeElements.length;)v(e.activeElements[a]),a++;e.trigger("fileDragStart",s,function(s){s.cancel?(n.intDestroy(i.event),ne(e)):(e.uploadObj.dropArea=null,t.isBlazor()&&s.bindEvents(s.dragElement))})}}function ne(e){O(e);var i=t.select("."+Di,e.element);i&&t.detach(i)}function se(e){ae(e,Si),ae(e,Ci)}function ae(e,t){for(var i=e.element.querySelectorAll("."+t),n=0;n<i.length;n++)i[n].classList.remove(t)}function re(e,i){var n=i;n.fileDetails=e.dragData;var s=!1;S(e,i.target),se(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),O(e,"hover");var a=null;"navigationpane"===e.targetModule?((a=t.closest(i.target,"li")).classList.add(gi,Si),s=!0,e.treeExpandTimer=window.setTimeout(function(){e.notify(En,i)},800)):"detailsview"===e.targetModule?((a=t.closest(i.target,"tr"))&&a.querySelector("."+ji)&&!a.classList.contains(ui)?a.classList.add(Si):!a||a.querySelector("."+ji)||a.classList.contains(ui)||a.classList.add(Ci),s=!0):"largeiconsview"===e.targetModule?((a=t.closest(i.target,"li"))&&a.querySelector("."+ji)&&!a.classList.contains(ui)&&a.classList.add(gi,Si),s=!0):"breadcrumbbar"===e.targetModule&&(s=!0),e.element.classList.remove("e-fe-drop","e-no-drop"),e.element.classList.add(s?"e-fe-drop":"e-no-drop"),e.trigger("fileDragging",n)}function oe(e){for(var i="",n=Object.keys(e),s=0;s<n.length;s++)"message"!==n[s]&&(i+=(0===s?"":", ")+n[s]+": "+t.getValue(n[s],e));return i}function le(e,i){return e.hasId?t.getValue("id",i):k(e,i)}function he(e,i){e.itemData=[i],e.currentItemText=t.getValue("name",i),e.isFile=t.getValue("isFile",i),e.filterPath=t.getValue("filterPath",i)}function de(e){be(e.itemData[0])?ze(e,"Rename"):fe(e,e.itemData[0],kn)}function pe(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!Oe(t[i]))return void fe(e,t[i],An);e.selectedItems.length>0&&He(e,e.path,e.selectedItems)}function ce(e,t,i){for(var n=0;n<t.length;n++)if(!be(t[n]))return void fe(e,t[n],kn);e.itemData=t,Pe(e,i,e.path,"delete")}function ue(e,t,i){for(var n=0;n<t.length;n++)if(!Oe(t[n]))return void fe(e,t[n],An);e.itemData=t,i.length>0&&He(e,e.path,i)}function fe(e,i,n){var s=t.getValue("message",t.getValue("permission",i));""===s&&(s=V(e,"Access-Message").replace("{0}",t.getValue("name",i)).replace("{1}",n)),ze(e,"Error",{error:{code:"401",fileExists:null,message:s}})}function ge(e){return me(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function me(e){var i=t.getValue("permission",e);return!(i&&!t.getValue("read",i))}function be(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("write",i)}function ye(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("writeContents",i)}function ve(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("upload",i)}function Oe(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("download",i)}function we(e){var t=e.itemData[0];ye(t)?ze(e,"NewFolder"):fe(e,t,Ln)}function Ie(e){var t=e.itemData[0];if(ve(t)){var i="#"+e.element.id+si;document.querySelector(i).click()}else fe(e,t,Tn)}function De(e,i,n){for(var s=e.itemData,a=0;a<s.length;a++)t.isNullOrUndefined(t.getValue("hasChild",s[a]))&&t.setValue("hasChild",!1,s[a]);Ee(e,{action:"read",path:n,showHiddenItems:e.showHiddenItems,data:s},Me,i)}function Se(e,t){Ee(e,{action:"create",path:e.path,name:t,data:e.itemData},Le,t)}function Ce(e,i){var n={action:"filter",path:e.path,showHiddenItems:e.showHiddenItems,data:[x(e)]},s=e.filterData?t.extend(void 0,n,e.filterData):n;Ee(e,void 0,ke,i,t.getValue("action",s))}function je(e,t,i){var n,s;if(""!==e.breadcrumbbarModule.searchObj.element.value||e.isFiltered){var a=e.filterPath;e.hasId?(n=e.currentItemText,s=i):(n=(a=a.replace(/\\/g,"/")).replace(t,"")+e.currentItemText,s=a.replace(t,"")+i)}else n=e.currentItemText,s=i;Ee(e,{action:"rename",path:t,name:n,newName:s,data:e.itemData},Te,t)}function xe(e,t,i,n,s,a,r){var o={action:s,path:t,targetData:e.itemData[0],targetPath:n,names:i,renameFiles:a,data:r};e.destinationPath=n,Ee(e,o,Ae,t,s,n)}function Pe(e,t,i,n){Ee(e,{action:n,path:i,names:t,data:e.itemData},Fe,i)}function Ne(e,t,i,n){Ee(e,{action:n,path:i,names:t,data:e.itemData},Ue,i,n)}function Ee(e,i,n,s,a,r){var o={url:e.ajaxSettings.url,type:"POST",mode:!0,dataType:"json",contentType:"application/json",data:JSON.stringify(i),onSuccess:null,onFailure:null,beforeSend:null},l={action:t.getValue("action",i),ajaxSettings:o,cancel:!1};e.trigger("beforeSend",l,function(o){o.cancel||(e.notify(tn,{}),new t.Ajax({url:t.getValue("url",o.ajaxSettings),type:t.getValue("type",o.ajaxSettings),mode:t.getValue("mode",o.ajaxSettings),dataType:t.getValue("dataType",o.ajaxSettings),contentType:t.getValue("contentType",o.ajaxSettings),data:t.getValue("data",o.ajaxSettings),beforeSend:t.getValue("beforeSend",o.ajaxSettings),onSuccess:function(l){if(t.isNullOrUndefined(l)){var h={error:{fileExists:null,message:V(e,"Server-Error")+" "+e.ajaxSettings.url,code:"406"},files:null};return void Re(e,o,n,h,s,a,r)}"string"==typeof l&&(l=JSON.parse(l)),e.notify(sn,{action:"success"});var d=e.expandedId?e.expandedId:e.pathId[e.pathId.length-1];if(!t.isNullOrUndefined(l.cwd)&&"read"===t.getValue("action",i)&&(l.cwd.name=1===e.pathId.length?e.rootAliasName||l.cwd.name:l.cwd.name,t.setValue("_fm_id",d,l.cwd),t.setValue(d,l.cwd,e.feParent),!t.isNullOrUndefined(l.files)||"401"===l.error.code)){if(("finalize-end"===s||"initial-end"===s)&&0===e.pathNames.length){var p=t.getValue(e.pathId[0],e.feParent);e.pathNames[0]=t.getValue("name",p),e.hasId=!t.isNullOrUndefined(t.getValue("id",p))}"finalize-end"===s&&m(e)}if(!t.isNullOrUndefined(l.files)){_(l.files);for(var c=0,u=l.files.length;c<u;c++){var f=l.files[c];t.setValue("_fm_iconClass",E(f),f)}"read"===t.getValue("action",i)&&(U(l,d),t.setValue(d,l.files,e.feFiles))}if(!t.isNullOrUndefined(l.details)&&!t.isNullOrUndefined(e.rootAliasName)){var g=e.rootAliasName||t.getValue("name",l.details),b=t.getValue("location",l.details).replace(new RegExp("/","g"),"\\");("/"===t.getValue("path",i)||e.hasId&&1===t.getValue("path",i).match(/[\/]/g).length)&&0===t.getValue("names",i).length?(t.setValue("name",g,l.details),b=g):b=b.replace(b.substring(0,b.indexOf("\\")),g),t.setValue("location",b,l.details)}n(e,l,s,a,r),t.isNullOrUndefined(l.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s||e.notify(jn,l),"function"==typeof t.getValue("onSuccess",o.ajaxSettings)&&t.getValue("onSuccess",o.ajaxSettings)()},onFailure:function(){var t={files:null,error:{code:"404",message:V(e,"Network-Error")+" "+e.ajaxSettings.url,fileExists:null}};Re(e,o,n,t,s,a,r)}}).send())})}function Re(e,i,n,s,a,r,o){e.notify(sn,{action:"failure"}),n(e,s,a,r,o),"function"==typeof t.getValue("onFailure",i.ajaxSettings)&&t.getValue("onFailure",i.ajaxSettings)()}function Me(e,i,n){if(t.isNullOrUndefined(i.files))"401"===i.error.code&&(i.files=[],e.notify(n,i),e.notify(hn,{})),_e(e,i,"read");else{e.notify(n,i),e.notify(hn,{});s={action:"read",result:i};e.trigger("success",s)}if(e.isDragDrop&&e.isDropEnd){if(0!==e.droppedObjects.length){var s={fileDetails:e.droppedObjects};e.trigger("fileDropped",s)}e.isDropEnd=e.isDragDrop=!1}}function ke(e,i,n,s){if(t.isNullOrUndefined(i.files))_e(e,i,s);else{e.notify(n,i);var a={action:s,result:i};e.trigger("success",a)}}function Le(e,i,n){if(t.isNullOrUndefined(i.files))if("400"===i.error.code){if(e.dialogObj&&e.dialogObj.visible){var s=t.select("#newname",e.dialogObj.element),a=V(e,"Validation-NewFolder-Exists").replace("{0}",'"'+s.value+'"');s.parentElement.nextElementSibling.innerHTML=a}else ze(e,"Error",{files:null,error:{code:"400",message:V(e,"Validation-NewFolder-Exists").replace("{0}",'"'+n+'"'),fileExists:null}});r={action:"create",error:i.error};e.trigger("failure",r)}else e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),_e(e,i,"create");else{e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),e.createdItem=i.files[0],e.breadcrumbbarModule.searchObj.value="";var r={action:"create",result:i};e.trigger("success",r),e.itemData=[x(e)],De(e,Gi,e.path)}}function Te(e,i,n){if(t.isNullOrUndefined(i.files))if("400"===i.error.code&&e.dialogObj&&e.dialogObj.visible){var s=t.select("#rename",e.dialogObj.element),a=V(e,"Validation-Rename-Exists").replace("{0}",'"'+e.currentItemText+'"');a=a.replace("{1}",'"'+s.value+'"'),s.parentElement.nextElementSibling.innerHTML=a;r={action:"rename",error:i.error};e.trigger("failure",r)}else t.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),_e(e,i,"rename");else{t.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide();var r={action:"rename",result:i};e.trigger("success",r),e.renamedItem=i.files[0],"navigationpane"===e.activeModule?(e.pathId.pop(),e.itemData=[t.getValue(e.pathId[e.pathId.length-1],e.feParent)],De(e,mn,Q(e.path))):(e.itemData=[x(e)],""!==e.breadcrumbbarModule.searchObj.value?Ve(e,bn,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?Ce(e,bn):De(e,bn,e.path))}}function Ae(e,i,n,s){i.error&&i.error.fileExists?(e.fileLength=0,t.isNullOrUndefined(i.files)||(e.isPasteError=!0,X(e,s,i)),qe(e,"DuplicateItems",i.error.fileExists),"404"===i.error.code&&ze(e,"Error",i)):i.error||t.isNullOrUndefined(i.files)?i.error&&!t.isNullOrUndefined(i.files)?(e.isPasteError=!0,X(e,s,i),ze(e,"Error",i)):_e(e,i,s):(e.isPasteError=!1,X(e,s,i))}function Fe(e,i,n){if(t.isNullOrUndefined(i.files))_e(e,i,"delete");else if(e.setProperties({path:n},!0),e.itemData=[x(e)],De(e,Ji,e.path),i.error)_e(e,i,"delete");else{var s={action:"delete",result:i};e.trigger("success",s)}}function Ue(e,i,n,s){if(t.isNullOrUndefined(i.details))_e(e,i,"details");else{ze(e,s,null,i.details);var a={action:"details",result:i};e.trigger("success",a)}}function _e(e,t,i){ze(e,"Error",t);var n={action:i,error:t.error};e.trigger("failure",n)}function Ve(e,t,i,n,s,a){Ee(e,{action:"search",path:i,searchString:n,showHiddenItems:s,caseSensitive:a,data:e.itemData},Be,t)}function Be(e,i,n){if(t.isNullOrUndefined(i.files))_e(e,i,"search");else{e.notify(n,i);var s={action:"search",result:i};e.trigger("success",s)}}function He(e,i,n){var s=e.ajaxSettings.downloadUrl?e.ajaxSettings.downloadUrl:e.ajaxSettings.url,a={data:{action:"download",path:i,names:n,data:e.itemData},cancel:!1};e.trigger("beforeDownload",a,function(i){if(!i.cancel){var n=t.createElement("form",{id:e.element.id+"_downloadForm",attrs:{action:s,method:"post",name:"downloadForm",download:""}}),a=t.createElement("input",{id:e.element.id+"_hiddenForm",attrs:{name:"downloadInput",value:JSON.stringify(i.data),type:"hidden"}});n.appendChild(a),e.element.appendChild(n),document.forms.namedItem("downloadForm").submit(),e.element.removeChild(n)}})}function ze(e,i,s,a,r){var o=rt(e,i,s,a,r);t.isNullOrUndefined(e.dialogObj)?(e.dialogObj=new n.Dialog({beforeOpen:ot.bind(this,e,o.dialogName),beforeClose:function(t){Ke(e,e.dialogObj,t,o.dialogName)},header:o.header,content:o.content,buttons:o.buttons,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,allowDragging:!0,isModal:!0,target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ri:ai),width:"350px",open:o.open,close:o.close,enableRtl:e.enableRtl,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.dialogObj.isStringTemplate=!0,e.dialogObj.appendTo("#"+e.element.id+Zt)):dt(e,o)}function qe(e,i,s,a){var r=Qe(e,i,s,a);e.isApplySame=!1,t.isNullOrUndefined(e.extDialogObj)?(e.extDialogObj=new n.Dialog({beforeOpen:lt.bind(this,e,r.dialogName),beforeClose:function(t){Ke(e,e.extDialogObj,t,r.dialogName)},content:r.content,header:r.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ri:ai),enableRtl:e.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:r.buttons,open:r.open,close:r.close,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.extDialogObj.isStringTemplate=!0,e.extDialogObj.appendTo("#"+e.element.id+ti)):(e.extDialogObj.header=r.header,e.extDialogObj.close=r.close,e.extDialogObj.open=r.open,e.extDialogObj.close=r.close,e.extDialogObj.content=r.content,e.extDialogObj.buttons=r.buttons,e.extDialogObj.enableRtl=e.enableRtl,e.extDialogObj.locale=e.locale,e.extDialogObj.beforeOpen=lt.bind(this,e,r.dialogName),e.extDialogObj.beforeClose=function(t){Ke(e,e.extDialogObj,t,r.dialogName)},e.extDialogObj.dataBind(),e.extDialogObj.show())}function We(e,i,n,s){var a={cancel:n.cancel,popupName:s,popupModule:i};t.isBlazor()&&delete a.popupModule,e.trigger("beforePopupOpen",a,function(e){n.cancel=e.cancel})}function Ke(e,i,n,s){var a={cancel:n.cancel,popupModule:i,popupName:s};t.isBlazor()&&delete a.popupModule,e.trigger("beforePopupClose",a,function(t){n.cancel=t.cancel,n.cancel||!n.isInteracted||"Rename"!==s&&"Create Folder"!==s||e.trigger(an,{})})}function Ge(e,i,n){var s={popupModule:i,element:i.element,popupName:n};t.isBlazor()&&delete s.popupModule,e.trigger("popupOpen",s)}function Ye(e,i,n){var s={popupModule:i,element:i.element,popupName:n};t.isBlazor()&&delete s.popupModule,e.trigger("popupClose",s)}function Qe(e,t,i,n){var s,a,r,o={header:"",content:"",buttons:[],dialogName:""};switch(o.open=function(){Ge(e,e.extDialogObj,o.dialogName)},o.close=function(){Ye(e,e.extDialogObj,o.dialogName)},t){case"Extension":o.header=V(e,"Header-Rename-Confirmation"),o.content="<div>"+V(e,"Content-Rename-Confirmation")+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),je(e,n,e.renameText)}},{buttonModel:{content:V(e,"Button-No")},click:function(){e.extDialogObj.hide(),e.dialogObj.hide()}}],o.dialogName="Extension Change";break;case"DuplicateItems":o.dialogName="Duplicate Items",e.replaceItems=i,a=-1===(r=(a=e.replaceItems[e.fileLength]).lastIndexOf("/"))?a:a.substring(r),o.header=V(e,"Header-Duplicate"),s="<div>"+V(e,"Content-Duplicate")+"</div>",o.content=s.replace("{0}",a),o.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}Ye(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(Z(e,e.replaceItems[e.fileLength])),e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var a=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;xe(e,a,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:V(e,"Button-No")},click:function(){if(e.fileLength++,i[e.fileLength]){var t=e.replaceItems[e.fileLength],n=t.lastIndexOf("/");t=-1===n?t:t.substring(n),e.extDialogObj.content=s.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var a=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;xe(e,r,e.duplicateItems,o,a,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=V(e,"Header-Retry"),o.content=e.retryFiles[0].name+'<div class="e-fe-retrycontent">'+V(e,"Content-Retry")+"</div>",o.open=$e.bind(this,e),o.close=function(){e.isRetryOpened=!1,Xe(e),Ye(e,e.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Keep-Both")},click:function(){Je(e,!0)}},{buttonModel:{isPrimary:!0,content:V(e,"Button-Replace")},click:function(){Je(e,!1)}},{buttonModel:{isPrimary:!0,content:V(e,"Button-Skip")},click:function(){var t=0;e.isApplySame?(t=e.retryFiles.length,e.retryFiles=[],Xe(e)):(t=1,e.retryFiles.splice(0,1),0!==e.retryFiles.length?qe(e,"UploadRetry"):Xe(e)),e.notify(nn,{count:t})}}]}return o}function Je(e,t){e.isApplySame?(t?Ze(e):et(e),Xe(e)):(e.retryArgs.push({action:t?"keepboth":"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1),0!==e.retryFiles.length?qe(e,"UploadRetry"):Xe(e))}function Xe(e){var i=!0;e.isRetryOpened?e.isRetryOpened=!1:i=!1;var n=t.select(".e-dlg-checkbox",e.extDialogObj.element);n&&t.remove(n),i?e.extDialogObj.hide():e.retryFiles=[]}function $e(e,i){e.isRetryOpened=!0;var n=t.getValue("element",i),s=t.select(".e-dlg-content",n),a=e.createElement("div",{className:"e-dlg-checkbox"}),o=e.createElement("input",{id:e.element.id+"_applyall"});a.appendChild(o),s.appendChild(a),new r.CheckBox({label:V(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}}).appendTo("#"+e.element.id+"_applyall"),Ge(e,e.extDialogObj,"Retry Upload")}function Ze(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"keepboth",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function et(e){for(;0!==e.retryFiles.length;)e.retryArgs.push({action:"replace",file:e.retryFiles[0]}),e.uploadObj.retry(e.retryFiles[0]),e.retryFiles.splice(0,1)}function tt(e){var i=t.select("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}function it(e){var i=t.select("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||at(i,V(e,"Content-NewFolder")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){ft(e,i)},i.onkeyup=function(t){13===bt(t)&&pt(e)},tt(e),Ge(e,e.dialogObj,"Create Folder")}function nt(e){var i=t.select("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||at(i,V(e,"Content-Rename")),i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){ft(e,i)},i.onkeyup=function(t){13===bt(t)&&ct(e)},st(e,i),Ge(e,e.dialogObj,"Rename")}function st(e,t){t.focus();var i="";if(e.isFile&&!e.showFileExtension){var n=e.currentItemText.lastIndexOf(".");i=-1===n?e.currentItemText:e.currentItemText.substring(0,n)}else i=e.currentItemText;t.value=i,e.isFile&&e.showFileExtension&&-1!==t.value.indexOf(".")?t.setSelectionRange(0,t.value.lastIndexOf(".")):t.setSelectionRange(0,t.value.length)}function at(e,t){a.Input.createInput({element:e,properties:{placeholder:t}})}function rt(e,i,n,s,a){var r,o,l,h,d,p={header:"",content:"",buttons:[],dialogName:""};switch(p.open=function(){Ge(e,e.dialogObj,p.dialogName)},p.close=function(){Ye(e,e.dialogObj,p.dialogName)},i=s&&!0===s.multipleFiles?"MultipleFileDetails":i){case"NewFolder":p.dialogName="Create Folder",p.header=V(e,"Header-NewFolder"),p.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Create")},click:function(t){"keydown"!==t.type&&pt(e)}}],p.open=it.bind(this,e);break;case"Delete":p.dialogName="Delete",e.selectedItems.length>1?(p.content=("<div>"+V(e,"Content-Multiple-Delete")+"</div>").replace("{0}",e.selectedItems.length.toString()),p.header=V(e,"Header-Multiple-Delete")):(p.content="<div>"+V(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",p.header=V(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Yes")},click:function(t){ut(e)}},{buttonModel:{content:V(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":p.dialogName="Rename",p.header=V(e,"Header-Rename"),p.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Save")},click:function(t){"keydown"!==t.type&&ct(e)}}],p.open=nt.bind(this,e);break;case"details":p.dialogName="File Details",o=new t.Internationalization(e.locale).formatDate(new Date(s.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),r="",t.isNullOrUndefined(s.permission)||(r="<tr><td>"+V(e,"Permission")+'</td><td class="'+Hi+'" >'+oe(s.permission)+"</td></tr>"),p.header=s.name,p.content="<table><tr><td>"+V(e,"Type")+'</td><td class="'+Hi+'" title="'+(s.isFile?"File":"Folder")+'">'+(s.isFile?"File":"Folder")+"</td></tr><tr><td>"+V(e,"Size")+'</td><td><span class="'+Hi+'" title ="'+s.size+'">'+s.size+"</span></td></tr><tr><td>"+V(e,"Location")+'</td><td class="'+Hi+'" title="'+s.location+'">'+s.location+"</td></tr><tr><td>"+V(e,"Modified")+'</td><td class="'+Hi+'" >'+o+"</td></tr>"+r+"</table>",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}];break;case"MultipleFileDetails":p.dialogName="File Details",h=(l=s.name.split(",").map(function(e){var t=e.indexOf(".")+1;return 0===t?"Folder":e.substr(t).replace(" ","")})).every(function(e,t,i){return e===i[0]})?"Folder"===l[0]?"Folder":l[0].toLocaleUpperCase()+" Type":"Multiple Types",d=s.location,p.header=s.name,p.content="<table><tr><td>"+V(e,"Type")+':</td><td class="'+Hi+'">'+h+"</td></tr><tr><td>"+V(e,"Size")+":</td><td>"+s.size+'<span class="'+Hi+'" title ="'+s.size+'"></span></td></tr><tr><td>'+V(e,"Location")+':</td><td class="'+Hi+'" title="'+d+'">'+d+"</td></tr></table>",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(an,{}),p.dialogName="Error","401"===n.error.code?p.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+V(e,"Access-Denied")+"</div>":p.header=V(e,"Error"),p.content='<div class="'+_i+'">'+n.error.message+"</div>",p.buttons=[{buttonModel:{isPrimary:!0,content:V(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}]}return p}function ot(e,i,n){ht(t.selectAll(".e-btn",e.dialogObj.element)),We(e,e.dialogObj,n,i)}function lt(e,i,n){ht(t.selectAll(".e-btn",e.extDialogObj.element)),We(e,e.extDialogObj,n,i)}function ht(e){for(var t=0;t<e.length;t++)!function(t){e[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},e[t].onkeyup=function(i){13===i.keyCode&&e[t].click()}}(t)}function dt(e,t){e.dialogObj.header=t.header,e.dialogObj.content=t.content,e.dialogObj.buttons=t.buttons,e.dialogObj.enableRtl=e.enableRtl,e.dialogObj.open=t.open,e.dialogObj.close=t.close,e.dialogObj.beforeOpen=ot.bind(this,e,t.dialogName),e.dialogObj.beforeClose=function(i){Ke(e,e.dialogObj,i,t.dialogName)},e.dialogObj.dataBind(),e.dialogObj.show()}function pt(e){var i=t.select("#newname",e.dialogObj.element);gt(e,i),""===i.parentElement.nextElementSibling.innerHTML&&Se(e,i.value)}function ct(e){var i=t.select("#rename",e.dialogObj.element);if(gt(e,i),""===i.parentElement.nextElementSibling.innerHTML){var n=i.value,s=e.currentItemText.lastIndexOf(".");if(e.isFile&&!e.showFileExtension&&(n+=-1===s?"":e.currentItemText.substr(s)),e.renameText=n,e.currentItemText===n)return void e.dialogObj.hide();var a="navigationpane"===e.activeModule?Q(e.path):e.path;if(e.renamedId=t.getValue("id",e.itemData[0]),e.isFile){var r=-1===s?"":e.currentItemText.substr(s),o=n.lastIndexOf("."),l=-1===o?"":n.substr(o);e.showFileExtension&&r!==l?qe(e,"Extension",null,a):je(e,a,n)}else je(e,a,n)}}function ut(e){e.dialogObj.hide(),e.notify(Qi,{})}function ft(e,t){/[\/\\|*?"<>:]/.test(t.value)?mt(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=V(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function gt(e,t){ft(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==e.currentItemText.lastIndexOf(".")||mt(e,t)}function mt(e,t){var i=V(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');t.parentElement.nextElementSibling.innerHTML=i}function bt(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function yt(e,i,s){var a=t.createElement("div",{className:"e-image-wrap"}),r=t.createElement("img",{className:"e-image",attrs:{src:s,alt:i}});a.appendChild(r),t.isNullOrUndefined(e.viewerObj)?(e.viewerObj=new n.Dialog({header:i,content:a,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,isModal:!0,width:"350px",height:"350px",target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:B(e,e.isMobile?ri:ai),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:vt.bind(this,e),close:function(){Ye(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){We(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){Ke(e,e.viewerObj,t,"Image Preview")},resizing:Ot.bind(this,e),resizeStop:Ot.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+ei)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function vt(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),Ot(e),Ge(e,e.viewerObj,"Image Preview")}function Ot(e){var i=t.select(".e-dlg-content",e.viewerObj.element),n=t.select(".e-image-wrap",e.viewerObj.element),s=window.getComputedStyle(i,null),a=s?2*parseFloat(s.paddingRight):36,r=s?2*parseFloat(s.paddingBottom):20;n.style.width=i.offsetWidth-a+"px",n.style.height=i.offsetHeight-r+"px"}var wt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),It=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Dt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wt(i,e),It([t.Property(null)],i.prototype,"downloadUrl",void 0),It([t.Property(null)],i.prototype,"getImageUrl",void 0),It([t.Property(null)],i.prototype,"uploadUrl",void 0),It([t.Property(null)],i.prototype,"url",void 0),i}(t.ChildProperty),St=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ct=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},jt=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return St(i,e),Ct([t.Property(jt)],i.prototype,"items",void 0),Ct([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Pt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Nt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Pt(i,e),Nt([t.Property(!0)],i.prototype,"allowSearchOnTyping",void 0),Nt([t.Property("contains")],i.prototype,"filterType",void 0),Nt([t.Property(!0)],i.prototype,"ignoreCase",void 0),i}(t.ChildProperty),Rt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Mt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},kt=[{field:"name",headerText:"Name",minWidth:120,template:'<span class="e-fe-text">${name}</span>',customAttributes:{class:"e-fe-grid-name"}},{field:"_fm_modified",headerText:"DateModified",type:"dateTime",format:"MMMM dd, yyyy HH:mm",minWidth:120,width:"190"},{field:"size",headerText:"Size",minWidth:90,width:"110",template:'<span class="e-fe-size">${size}</span>'}],Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Rt(i,e),Mt([t.Property(!0)],i.prototype,"columnResizing",void 0),Mt([t.Property(kt)],i.prototype,"columns",void 0),i}(t.ChildProperty),Tt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),At=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ft=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],Ut=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],_t=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],Vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Tt(i,e),At([t.Property(Ft)],i.prototype,"file",void 0),At([t.Property(Ut)],i.prototype,"folder",void 0),At([t.Property(_t)],i.prototype,"layout",void 0),At([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),Bt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Ht=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bt(i,e),Ht([t.Property("650px")],i.prototype,"maxWidth",void 0),Ht([t.Property("240px")],i.prototype,"minWidth",void 0),Ht([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),qt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Wt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qt(i,e),Wt([t.Property("")],i.prototype,"allowedExtensions",void 0),Wt([t.Property(!0)],i.prototype,"autoUpload",void 0),Wt([t.Property(!1)],i.prototype,"autoClose",void 0),Wt([t.Property(0)],i.prototype,"minFileSize",void 0),Wt([t.Property(3e7)],i.prototype,"maxFileSize",void 0),i}(t.ChildProperty),Gt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Yt=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Gt(i,e),Yt([t.Property("")],i.prototype,"field",void 0),Yt([t.Property("")],i.prototype,"headerText",void 0),Yt([t.Property("")],i.prototype,"width",void 0),Yt([t.Property("")],i.prototype,"minWidth",void 0),Yt([t.Property("")],i.prototype,"maxWidth",void 0),Yt([t.Property("Left")],i.prototype,"textAlign",void 0),Yt([t.Property(null)],i.prototype,"headerTextAlign",void 0),Yt([t.Property(null)],i.prototype,"type",void 0),Yt([t.Property(null)],i.prototype,"format",void 0),Yt([t.Property(null)],i.prototype,"template",void 0),Yt([t.Property(null)],i.prototype,"headerTemplate",void 0),Yt([t.Property(!0)],i.prototype,"allowSorting",void 0),Yt([t.Property(!0)],i.prototype,"allowResizing",void 0),Yt([t.Property(null)],i.prototype,"customAttributes",void 0),Yt([t.Property("")],i.prototype,"hideAtMedia",void 0),Yt([t.Property(null)],i.prototype,"customFormat",void 0),i}(t.ChildProperty),Jt="_layout",Xt="_grid",$t="_largeicons",Zt="_dialog",ei="_img_dialog",ti="_extn_dialog",ii="_content",ni="_breadcrumbbar",si="_upload",ai="e-fe-popup",ri="e-fe-popup e-fe-mobile",oi="e-fe-m-filter",li="e-large-icons",hi="e-list-item",di="e-list-text",pi="e-icons e-fe-tick",ci="e-icons e-fe-dot",ui="e-blur",fi="e-active",gi="e-hover",mi="e-focus",bi="e-check",yi="e-checkbox-wrapper",vi="e-row",Oi="e-empty",wi="e-empty-content",Ii="e-empty-inner-content",Di="e-fe-clone",Si="e-fe-drop-folder",Ci="e-fe-drop-file",ji="e-fe-folder",xi="e-fe-image",Pi="e-fe-music",Ni="e-fe-video",Ei="e-large-icon",Ri="e-empty-icon e-fe-folder",Mi="e-gridheader",ki="e-treeview",Li="e-menu-icon",Ti="e-content",Ai="e-icons e-fe-cut",Fi="e-icons e-fe-grid",Ui="e-icons e-fe-large",_i="e-fe-errorcontent",Vi="e-rtl",Bi="e-display-none",Hi="e-fe-value",zi="isFile",qi="model-changed",Wi="initial-end",Ki="finalize-end",Gi="create-end",Yi="path-drag",Qi="delete-init",Ji="delete-end",Xi="refresh-end",$i="resize-end",Zi="path-changed",en="destroy",tn="before-request",nn="skip-upload",sn="after-request",an="actionFailure",rn="search",on="open-init",ln="open-end",hn="selection-changed",dn="clear-path-init",pn="layout-change",cn="sort-by-change",un="details-init",fn="menu-item-data",gn="rename-init",mn="rename-end-parent",bn="rename-end",yn="show-paste",vn="hide-paste",On="cut-copy-init",wn="paste-init",In="paste-end",Dn="cut-end",Sn="sort-column",Cn="path-column",jn="search-change",xn="drop-init",Pn="drag-end",Nn="drop-path",En="dragging",Rn="method-call",Mn="read",kn="write",Ln="writeContents",Tn="upload",An="download",Fn=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=t.select("#"+this.parent.element.id+$t,this.parent.element),t.addClass([this.element],li),this.addEventListener(),this.keyConfigs={end:"end",home:"home",tab:"tab",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",ctrlUp:"ctrl+uparrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftLeft:"shift+leftarrow",shiftRight:"shift+rightarrow",shiftUp:"shift+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csLeft:"ctrl+shift+leftarrow",csRight:"ctrl+shift+rightarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",ctrlA:"ctrl+a",enter:"enter",altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:"ctrl+x",ctrlC:"ctrl+c",ctrlV:"ctrl+v",f2:"f2",shiftdel:"shift+delete",back:"backspace",ctrlD:"ctrl+d"}}return e.prototype.render=function(e){if(this.parent.visitedItem=null,this.startItem=null,n.showSpinner(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify("hide-layout",{});var i=t.select("#"+this.parent.element.id+$t,this.parent.element),s=t.select("ul",i);if(s&&t.remove(s),this.listObj={ariaAttributes:{itemRole:"option",listRole:"listbox",itemText:"",groupItemRole:"group",wrapperRole:""},showIcon:!0,fields:{text:"name",iconCss:"_fm_icon",imageUrl:"_fm_imageUrl",htmlAttributes:"_fm_htmlAttr"},sortOrder:this.parent.sortOrder,itemCreated:this.onItemCreated.bind(this),enableHtmlSanitizer:this.parent.enableHtmlSanitizer},this.items=[],this.items=this.renderList(e),this.items=L(this.parent,this.items),this.listElements=o.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(t.selectAll("."+hi,this.listElements)),this.element.appendChild(this.listElements),this.preventImgDrag(),this.createDragObj(),i.classList.remove(Bi),0===this.itemList.length){var a=this.element.querySelector(".e-list-parent");this.element.removeChild(a),A(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+Oi)&&this.element.removeChild(this.element.querySelector("."+Oi));!0===this.isPasteOperation&&(this.selectItems(this.parent.pasteNodes),this.isPasteOperation=!1),!0===this.uploadOperation&&(this.selectItems(this.parent.uploadItem),this.parent.setProperties({selectedItems:[]},!0),++this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var r=this.element.querySelectorAll("."+fi);0!==r.length&&(this.parent.activeModule="largeiconsview");for(var l=0;l<r.length;l++)r[l].setAttribute("aria-selected","true");this.adjustHeight(),this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.isRendered=!0,n.hideSpinner(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},e.prototype.preventImgDrag=function(){for(var e=0;e<this.itemList.length;)this.itemList[e].querySelector("img")&&(this.itemList[e].ondragstart=function(){return!1}),e++},e.prototype.createDragObj=function(){var e=this;!this.parent.isMobile&&this.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!0,dragTarget:"."+Ei,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:te.bind(this,this.parent),drag:re.bind(this,this.parent),clone:!0,dragStart:function(t){ie(e.parent,t,e.dragObj)}})):this.dragObj&&!this.parent.allowDragAndDrop&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target,n=t.closest(i,".e-list-item");if(!n)return null;n&&!n.classList.contains("e-active")&&this.setFocus(n);var s=this.element.querySelectorAll("."+fi);this.parent.activeElements=[],this.parent.dragData=[];for(var a=0;a<s.length;a++)this.parent.dragData.push(this.getItemObject(s[a])),this.parent.activeElements.push(s[a]);return w(this.parent,n),this.parent.dragPath=this.parent.path,ee(this.parent),this.parent.virtualDragElement},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.closest(e.target,".e-list-item"),n=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(i){var s=this.getItemObject(i);this.parent.dropPath=s.isFile?this.parent.path:M(this.parent,s,this.parent.path),this.parent.dropData=s.isFile?n:s}else this.parent.dropPath=this.parent.path,this.parent.dropData=n}},e.prototype.getModuleName=function(){return"largeiconsview"},e.prototype.adjustHeight=function(){var e=t.select("#"+this.parent.element.id+ii,this.parent.element),i=t.select("#"+this.parent.element.id+ni,this.parent.element);this.element.style.height=e.offsetHeight-i.offsetHeight+"px"},e.prototype.onItemCreated=function(e){if(e.item.removeAttribute("aria-level"),!this.parent.showFileExtension&&t.getValue("isFile",e.curData)){var i=e.item.querySelector("."+di),n=t.getValue("name",e.curData),s=t.getValue("type",e.curData);i.innerHTML=n.substr(0,n.length-s.length)}this.renderCheckbox(e);var a={element:e.item,fileDetails:e.curData,module:"LargeIconsView"};this.parent.trigger("fileLoad",a)},e.prototype.renderCheckbox=function(e){if(this.parent.allowMultiSelection){var i=r.createCheckBox(t.createElement,!1,{checked:!1,cssClass:"e-small"});i.setAttribute("role","checkbox"),i.setAttribute("aria-checked","false"),e.item.firstElementChild.insertBefore(i,e.item.firstElementChild.childNodes[0])}},e.prototype.onLayoutChange=function(e){if("LargeIcons"===this.parent.view){if(this.destroy(),this.render(e),"layout-change"===t.getValue("name",e)&&"move"===this.parent.fileAction&&this.parent.isCut&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length)for(var i=this.getIndexes(this.parent.selectedNodes),n=0;n<i.length;)v(this.itemList[i[n]]),n++;0!==this.element.querySelectorAll("."+fi).length&&this.element.focus(),this.checkItem(),this.parent.isLayoutChange=!1}else this.element.setAttribute("tabindex","-1")},e.prototype.checkItem=function(){var e=this.element.querySelectorAll("."+fi);if(e)for(var t=0;t<e.length;)this.checkState(e[t],!0),t++},e.prototype.renderList=function(e){for(var i=0,n=JSON.parse(JSON.stringify(e.files));i<n.length;){var s=E(n[i]),a=t.getValue("name",n[i]),r=le(this.parent,n[i]),o=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?Ei+" e-active":Ei;if(be(n[i])||(o+=" "+ge(n[i])),s===xi&&this.parent.showThumbnail&&me(n[i])){var l=R(this.parent,n[i]);t.setValue("_fm_imageUrl",l,n[i]),t.setValue("_fm_imageAttr",{alt:a},n[i])}else t.setValue("_fm_icon",s,n[i]);t.setValue("_fm_htmlAttr",{class:o,title:a},n[i]),i++}return n},e.prototype.onFinalizeEnd=function(e){this.render(e)},e.prototype.onCreateEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.clearSelect(),this.selectItems([t.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null,this.parent.largeiconsviewModule.element.focus())},e.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},e.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&Pe(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.parent.setProperties({selectedItems:[]},!0),this.clearSelect())},e.prototype.onRefreshEnd=function(e){"LargeIcons"===this.parent.view&&this.onLayoutChange(e)},e.prototype.onRenameInit=function(){"largeiconsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value&&(this.parent.searchedItems=[]),"LargeIcons"===this.parent.view&&(O(this.parent),this.parent.setProperties({selectedItems:[]},!0),this.onLayoutChange(e),this.parent.renamedItem&&(this.clearSelect(),this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null))},e.prototype.onOpenInit=function(e){"largeiconsview"===this.parent.activeModule&&this.doOpenAction(e.target)},e.prototype.onHideLayout=function(){"LargeIcons"!==this.parent.view&&this.element&&this.element.classList.add(Bi)},e.prototype.onSelectAllInit=function(){if("LargeIcons"===this.parent.view){this.startItem=this.getFirstItem();var e=this.getLastItem(),t={ctrlKey:!0,shiftKey:!0};this.doSelection(e,t),this.isInteraction=!0,this.isInteracted=!0}},e.prototype.onClearAllInit=function(){"LargeIcons"===this.parent.view&&(this.clearSelection(),this.isInteraction=!0,this.isInteracted=!0)},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onSearch=function(e){"LargeIcons"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(hn,{}),this.parent.searchedItems=e.files,this.onLayoutChange(e))},e.prototype.onLayoutRefresh=function(){"LargeIcons"===this.parent.view&&this.adjustHeight()},e.prototype.onUpdateSelectionData=function(){"LargeIcons"===this.parent.view&&this.updateSelectedData()},e.prototype.onPathColumn=function(){"LargeIcons"!==this.parent.view||t.isNullOrUndefined(this.listObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||"filterPath"!==this.parent.sortBy||(this.parent.sortBy="name",this.parent.notify(cn,{}))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Cn,this.onPathColumn),this.parent.off(Ki,this.onFinalizeEnd),this.parent.off(Gi,this.onCreateEnd),this.parent.off("selected-data",this.onSelectedData),this.parent.off(Qi,this.onDeleteInit),this.parent.off(Ji,this.onDeleteEnd),this.parent.off(Xi,this.onRefreshEnd),this.parent.off(Zi,this.onPathChanged),this.parent.off(pn,this.onLayoutChange),this.parent.off(rn,this.onSearch),this.parent.off(on,this.onOpenInit),this.parent.off(ln,this.onPathChanged),this.parent.off(qi,this.onPropertyChanged),this.parent.off(Rn,this.onMethodCall),this.parent.off(an,this.onActionFailure),this.parent.off(gn,this.onRenameInit),this.parent.off(bn,this.onPathChanged),this.parent.off("hide-layout",this.onHideLayout),this.parent.off("select-all-init",this.onSelectAllInit),this.parent.off("clear-all-init",this.onClearAllInit),this.parent.off(fn,this.onMenuItemData),this.parent.off(tn,this.onBeforeRequest),this.parent.off(sn,this.onAfterRequest),this.parent.off("splitter-resize",this.splitterResizeHandler),this.parent.off($i,this.resizeHandler),this.parent.off(wn,this.onpasteInit),this.parent.off(In,this.onpasteEnd),this.parent.off(On,this.oncutCopyInit),this.parent.off(xn,this.onDropInit),this.parent.off(un,this.onDetailsInit),this.parent.off("layout-refresh",this.onLayoutRefresh),this.parent.off(Nn,this.onDropPath),this.parent.off("update-selection-data",this.onUpdateSelectionData),this.parent.off("filter-end",this.onPathChanged))},e.prototype.addEventListener=function(){this.parent.on(Cn,this.onPathColumn,this),this.parent.on(Ki,this.onFinalizeEnd,this),this.parent.on(Gi,this.onCreateEnd,this),this.parent.on(Xi,this.onRefreshEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(Zi,this.onPathChanged,this),this.parent.on(Qi,this.onDeleteInit,this),this.parent.on(wn,this.onpasteInit,this),this.parent.on(Ji,this.onDeleteEnd,this),this.parent.on(pn,this.onLayoutChange,this),this.parent.on(rn,this.onSearch,this),this.parent.on(on,this.onOpenInit,this),this.parent.on(gn,this.onRenameInit,this),this.parent.on(bn,this.onPathChanged,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on(qi,this.onPropertyChanged,this),this.parent.on(Rn,this.onMethodCall,this),this.parent.on(an,this.onActionFailure,this),this.parent.on("hide-layout",this.onHideLayout,this),this.parent.on("select-all-init",this.onSelectAllInit,this),this.parent.on("clear-all-init",this.onClearAllInit,this),this.parent.on(fn,this.onMenuItemData,this),this.parent.on(tn,this.onBeforeRequest,this),this.parent.on(sn,this.onAfterRequest,this),this.parent.on(xn,this.onDropInit,this),this.parent.on(un,this.onDetailsInit,this),this.parent.on("splitter-resize",this.splitterResizeHandler,this),this.parent.on($i,this.resizeHandler,this),this.parent.on(In,this.onpasteEnd,this),this.parent.on(On,this.oncutCopyInit,this),this.parent.on("layout-refresh",this.onLayoutRefresh,this),this.parent.on(Nn,this.onDropPath,this),this.parent.on("update-selection-data",this.onUpdateSelectionData,this),this.parent.on("filter-end",this.onPathChanged,this)},e.prototype.onActionFailure=function(){this.isInteraction=!0,this.isInteracted=!0},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.itemData=[this.getItemObject(i)]}},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.updateSelectedData():this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""===this.parent.folderPath?[x(this.parent)]:[this.getItemObject(t.select(".e-active",this.element))])},e.prototype.oncutCopyInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.element.querySelectorAll("."+fi);this.parent.activeRecords=[],this.parent.activeElements=[];for(var t=0;t<e.length;t++)this.parent.activeElements.push(e[t]),this.parent.activeRecords.push(this.getItemObject(e[t]))}},e.prototype.onpasteEnd=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==J(this.parent,e)||this.onPathChanged(e))},e.prototype.onDropPath=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.onPropertyChanged=function(e){var i;if(e.module===this.getModuleName()||"common"===e.module)for(var n=0,s=Object.keys(e.newProp);n<s.length;n++)switch(s[n]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"selectedItems":this.isInteraction=!1,this.isInteracted=!1,i=t.isNullOrUndefined(this.parent.selectedItems)?[]:this.parent.selectedItems.slice(0),i=this.parent.allowMultiSelection?i:i.slice(i.length-1),this.parent.setProperties({selectedItems:[]},!0),this.onClearAllInit(),i.length&&this.selectItems(i),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),this.isInteraction=!0,this.isInteracted=!0;break;case"showThumbnail":C(this.parent);break;case"showFileExtension":case"showHiddenItems":De(this.parent,Zi,this.parent.path);break;case"allowMultiSelection":if("LargeIcons"!==this.parent.view)break;C(this.parent);break;case"view":D(this.parent,"LargeIcons")}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents())},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),this.keyboardModule.destroy(),this.keyboardDownModule.destroy()},e.prototype.onMouseOver=function(e){var i=t.closest(e.target,".e-list-item");O(this.parent,"hover"),null!==i&&i.classList.add(gi)},e.prototype.wireClickEvent=function(e){if(e){var i=this;this.clickObj=new t.Touch(this.element,{tap:function(e){e.originalEvent.preventDefault(),i.parent.isDevice?(i.tapCount=e.tapCount,i.tapEvent=e,setTimeout(function(){i.tapCount>0&&i.doTapAction(i.tapEvent),i.tapCount=0},350)):2===e.tapCount&&3!==e.originalEvent.which?i.dblClickHandler(e):i.clickHandler(e)},tapHold:function(e){i.parent.isDevice&&(i.multiSelect=!!i.parent.allowMultiSelection,i.parent.allowMultiSelection&&t.addClass([i.parent.element],"e-fe-m-select"),i.clickHandler(e))}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=t.closest(i,"."+hi);this.multiSelect||i.classList.contains("e-list-parent")||t.isNullOrUndefined(n)?this.clickHandler(e):(this.parent.isFile=!1,this.updateType(n),this.parent.isFile?2===e.tapCount?(this.clickHandler(e),this.dblClickHandler(e)):this.clickHandler(e):this.dblClickHandler(e))},e.prototype.clickHandler=function(e){var t=e.originalEvent.target;O(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=t.closest(e,"."+hi),s=e.classList;this.parent.isFile=!1;var a="select";if(3===i.which&&!t.isNullOrUndefined(n)&&n.classList.contains(fi))return void this.updateType(n);if(t.isNullOrUndefined(n))this.clearSelection();else if(this.parent.allowMultiSelection&&n.classList.contains(fi)&&(i.ctrlKey||e.classList.contains(bi))&&(a="unselect"),!0!==this.triggerSelection(a,n).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!i||i.ctrlKey)||s.contains("e-frame")||(this.updateType(n),this.clearSelect()),this.parent.allowMultiSelection&&i.shiftKey){i&&i.ctrlKey||this.clearSelect(),this.startItem||(this.startItem=n);var r=this.itemList.indexOf(this.startItem),o=this.itemList.indexOf(n);if(r>o)for(l=r;l>=o;l--)this.addActive(this.itemList[l]);else for(var l=r;l<=o;l++)this.addActive(this.itemList[l]);this.addFocus(this.itemList[o])}else this.startItem=n,this.parent.allowMultiSelection&&n.classList.contains(fi)?this.removeActive(n):this.addActive(n),this.addFocus(n);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(hn,{}),this.triggerSelect(a,n)}t.isNullOrUndefined(n)||this.updateType(n)},e.prototype.dblClickHandler=function(e){this.parent.activeModule="largeiconsview";var t=e.originalEvent.target;this.doOpenAction(t)},e.prototype.clearSelection=function(){this.clearSelect(),this.resetMultiSelect(),this.parent.notify(hn,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,t.removeClass([this.parent.element],"e-fe-m-select")},e.prototype.doOpenAction=function(e){var i=this;if(!t.isNullOrUndefined(e)){var n=t.closest(e,"."+hi);if(this.parent.isFile=!1,!t.isNullOrUndefined(n)){this.updateType(n);var s=this.getItemObject(n);if(!me(s))return void fe(this.parent,s,Mn);var a={cancel:!1,fileDetails:s,module:"LargeIconsView"};this.parent.trigger("fileOpen",a,function(e){if(!e.cancel){var n=t.getValue("name",s);if(i.parent.isFile){if(E(s)===xi){var a=R(i.parent,s);yt(i.parent,n,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)W(i.parent,s);else{var r=t.getValue("id",s),o=i.parent.path+(t.isNullOrUndefined(r)?n:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(n),i.parent.pathId.push(t.getValue("_fm_id",s)),i.parent.itemData=[s],j(i.parent)}i.parent.isFiltered=!1,i.parent.setProperties({selectedItems:[]},!0)}}})}}},e.prototype.updateType=function(e){var i=t.select("."+ji,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.keydownActionHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"moveDown":case"moveLeft":case"moveRight":case"moveUp":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"ctrlRight":case"shiftRight":case"csRight":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"ctrlD":e.preventDefault()}},e.prototype.keyActionHandler=function(e){if(this.isRendered){var i=this.getFocusedItem(),n=this.getFirstItem(),s=this.getLastItem();switch(e.action){case"end":this.navigateItem(s);break;case"home":this.navigateItem(n);break;case"tab":t.isNullOrUndefined(i)?t.isNullOrUndefined(n)||this.addFocus(n):this.addFocus(i);break;case"moveDown":this.navigateDown(i,!0);break;case"moveLeft":this.navigateRight(i,!1);break;case"moveRight":this.navigateRight(i,!0);break;case"moveUp":this.navigateDown(i,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(s,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(n,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(i,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(i,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(i,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(i,e);break;case"space":this.spaceKey(i);break;case"ctrlSpace":case"shiftSpace":case"csSpace":t.isNullOrUndefined(i)||this.doSelection(i,e);break;case"ctrlA":this.ctrlAKey(n,s);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(un,{}),Ne(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":P(this.parent);break;case"ctrlV":this.parent.folderPath="",K(this.parent);break;case"ctrlX":N(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload()}}},e.prototype.doDownload=function(){this.updateSelectedData(),pe(this.parent)},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.updateSelectedData();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!be(e[t]))return void fe(this.parent,e[t],kn);ze(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),de(this.parent))},e.prototype.updateRenameData=function(){var e=t.select("."+hi+"."+fi,this.element),i=this.getItemObject(e);he(this.parent,i)},e.prototype.getVisitedItem=function(){var e=this.parent.selectedItems[this.parent.selectedItems.length-1],t=this.getIndexes([e],this.parent.hasId);return this.itemList[t[0]]},e.prototype.getFocusedItem=function(){return t.select("."+hi+"."+mi,this.element)},e.prototype.getActiveItem=function(){return t.select("."+hi+"."+fi,this.element)},e.prototype.getFirstItem=function(){return this.itemList[0]},e.prototype.getLastItem=function(){return this.itemList[this.itemList.length-1]},e.prototype.navigateItem=function(e){this.setFocus(e)},e.prototype.navigateDown=function(e,t){var i=this.getNextItem(e,t,this.perRow);this.setFocus(i)},e.prototype.navigateRight=function(e,t){var i=this.getNextItem(e,t);this.setFocus(i)},e.prototype.getNextItem=function(e,i,n){if(t.isNullOrUndefined(e))return this.getFocusedItem()||this.getActiveItem()||this.getFirstItem();var s,a=this.itemList.indexOf(e);do{if(a=i?n?a+n:a+1:n?a-n:a-1,s=this.itemList[a],t.isNullOrUndefined(s))return e}while(!t.isVisible(s));return s},e.prototype.setFocus=function(e){t.isNullOrUndefined(e)||!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(hn,{}),this.triggerSelect("select",e))},e.prototype.spaceKey=function(e){t.isNullOrUndefined(e)||e.classList.contains(fi)||!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(hn,{}),this.triggerSelect("select",e))},e.prototype.ctrlAKey=function(e,i){if(this.parent.allowMultiSelection&&!t.isNullOrUndefined(e)){this.startItem=e;var n={ctrlKey:!0,shiftKey:!0};this.doSelection(i,n)}},e.prototype.csEndKey=function(e,i){this.parent.allowMultiSelection?t.isNullOrUndefined(e)||("ctrlEnd"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csHomeKey=function(e,i){this.parent.allowMultiSelection?t.isNullOrUndefined(e)||("ctrlHome"===i.action?this.addFocus(e):this.doSelection(e,i)):this.navigateItem(e)},e.prototype.csDownKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0,this.perRow);t.isNullOrUndefined(n)||("ctrlDown"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!0)},e.prototype.csLeftKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1);t.isNullOrUndefined(n)||("ctrlLeft"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!1)},e.prototype.csRightKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!0);t.isNullOrUndefined(n)||("ctrlRight"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateRight(e,!0)},e.prototype.csUpKey=function(e,i){if(this.parent.allowMultiSelection){var n=this.getNextItem(e,!1,this.perRow);t.isNullOrUndefined(n)||("ctrlUp"===i.action?this.addFocus(n):this.doSelection(n,i))}else this.navigateDown(e,!1)},e.prototype.addActive=function(e){t.isNullOrUndefined(e)||(e.classList.contains(fi)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),t.addClass([e],[fi]),e.setAttribute("aria-selected","true"),this.checkState(e,!0)),this.parent.visitedItem=e)},e.prototype.removeActive=function(e){if(!t.isNullOrUndefined(e)){t.removeClass([e],[fi]),this.parent.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),this.checkState(e,!1);var i=this.parent.selectedItems.indexOf(this.getDataName(e));i>-1&&(this.parent.selectedItems.splice(i,1),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)),this.parent.visitedItem=null}},e.prototype.getDataName=function(e){var t=this.getItemObject(e);return le(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),t.removeClass([i],[mi])),t.addClass([e],[mi]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.allowMultiSelection){var n=t.select(".e-frame",e);t.isNullOrUndefined(n)||(i?n.classList.contains(bi)||(t.addClass([n],bi),t.closest(n,"."+yi).setAttribute("aria-checked","true")):n.classList.contains(bi)&&(t.removeClass([n],bi),t.closest(n,"."+yi).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call(t.selectAll("."+fi,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var i=0,n=e.length;i<n;i++)this.removeActive(e[i]);this.triggerSelect("unselect",e[0])}},e.prototype.resizeHandler=function(){this.getItemCount(),t.isNullOrUndefined(this.listObj)||this.adjustHeight()},e.prototype.splitterResizeHandler=function(){this.getItemCount()},e.prototype.getItemCount=function(){var e=1;if(this.itemList)for(var t=0,i=this.itemList.length-1;t<i&&this.itemList[t].getBoundingClientRect().top===this.itemList[t+1].getBoundingClientRect().top;t++)e++;this.perRow=e},e.prototype.triggerSelection=function(e,t){var i={action:e,fileDetails:this.getItemObject(t),isInteracted:this.isInteraction,cancel:!1,target:t};return this.parent.trigger("fileSelection",i),this.isInteraction=!0,i},e.prototype.triggerSelect=function(e,t){var i=this.getItemObject(t);this.parent.visitedData=i;var n={action:e,fileDetails:i,isInteracted:this.isInteracted};this.parent.trigger("fileSelect",n),this.isInteracted=!0},e.prototype.selectItems=function(e){for(var t=this.getIndexes(e,this.parent.hasId),i=0,n=t.length;i<n;i++){var s={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[t[i]],s)}},e.prototype.getIndexes=function(e,i){for(var n=[],s=i?"id":"name",a=0,r=this.items.length;a<r;a++)-1!==e.indexOf(t.getValue(s,this.items[a]))&&n.push(a);return n},e.prototype.getItemObject=function(e){var t=this.itemList.indexOf(e);return this.items[t]},e.prototype.addSelection=function(e){var i=[];if(this.parent.hasId)i=new s.DataManager(this.items).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var n=new s.DataManager(this.items).executeLocal((new s.Query).where("name","equal",t.getValue("name",e),!1));n.length>0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(i.length>0){var a=this.items.indexOf(i[0]),r={ctrlKey:!0,shiftKey:!1};this.doSelection(this.itemList[a],r)}},e.prototype.updateSelectedData=function(){for(var e=[],i=t.selectAll("."+hi+"."+fi,this.element),n=0;n<i.length;n++)e[n]=this.getItemObject(i[n]);this.parent.itemData=e},e.prototype.onMethodCall=function(e){if("LargeIcons"===this.parent.view)switch(t.getValue("action",e)){case"deleteFiles":this.deleteFiles(t.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(t.getValue("ids",e));break;case"openFile":this.openFile(t.getValue("id",e));break;case"renameFile":this.isInteraction=!1,this.isInteracted=!1,this.renameFile(t.getValue("id",e),t.getValue("newName",e));break;case"createFolder":this.isInteraction=!1,this.isInteracted=!1;break;case"clearSelection":this.isInteraction=!1,this.isInteracted=!1,this.onClearAllInit();break;case"selectAll":this.isInteraction=!1,this.isInteracted=!1,this.onSelectAllInit()}},e.prototype.getItemsIndex=function(e){var i=[],n=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),s=this.parent.hasId?"id":"name";if(this.parent.hasId||!n)for(var a=0,r=this.items.length;a<r;a++)-1!==e.indexOf(t.getValue(s,this.items[a]))&&i.push(a);else for(var a=0,r=this.items.length;a<r;a++){var o=t.getValue("filterPath",this.items[a])+t.getValue("name",this.items[a]);-1!==e.indexOf(o)&&i.push(a)}return i},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performDelete();var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=this.items[i[a]],s[a]=le(this.parent,n[a]);ce(this.parent,n,s)}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))return void this.doDownload();var i=this.getItemsIndex(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=this.items[i[a]],s[a]=le(this.parent,n[a]);ue(this.parent,n,s)}},e.prototype.openFile=function(e){if(!t.isNullOrUndefined(e)){var i=this.getItemsIndex([e]);i.length>0&&this.doOpenAction(this.itemList[i[0]])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getItemsIndex([e]);n.length>0&&(he(this.parent,this.items[n[0]]),t.isNullOrUndefined(i)?de(this.parent):be(this.parent.itemData[0])?je(this.parent,this.parent.path,i):fe(this.parent,this.parent.itemData[0],kn))},e}(),Un=function(){function e(e){this.addressPath="",this.addressBarLink="",this.searchTimer=null,this.searchWrapWidth=null,this.parent=e,this.keyConfigs={enter:"enter"},this.render()}return e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++){var s=n[i],a=e.newProp.searchSettings;switch(s){case"searchSettings":t.isNullOrUndefined(a.allowSearchOnTyping)||this.searchEventBind(a.allowSearchOnTyping),!this.parent.breadcrumbbarModule.searchObj.value||""===this.parent.breadcrumbbarModule.searchObj.value||!t.isNullOrUndefined(a.allowSearchOnTyping)&&t.isNullOrUndefined(a.filterType)&&t.isNullOrUndefined(a.ignoreCase)||I(this.parent,this.parent.breadcrumbbarModule.searchObj.value,!1)}}},e.prototype.render=function(){this.addEventListener()},e.prototype.onPathChange=function(){var e=this.parent.pathNames,i=this.parent.path.split("/"),n=this.parent.createElement("ul",{className:"e-addressbar-ul"}),s=null,a=e.length;if(e.length>0){for(var r="",o=0;o<a;o++){var l=null;s=this.parent.createElement("li",{className:"e-address-list-item"});for(var h=0;h<=o;h++)r=r+i[h]+"/";if(s.setAttribute("data-utext",r),0!==o){var d=t.createElement("span",{className:"e-icons"});s.appendChild(d)}a-o!=1?(l=t.createElement("a",{className:di}),s.setAttribute("tabindex","0")):l=t.createElement("span",{className:di}),r="",l.innerText=e[o],s.appendChild(l),n.appendChild(s)}var p=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul");t.isNullOrUndefined(p)||(t.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),t.remove(p));var c=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");c?this.parent.breadCrumbBarNavigation.appendChild(n):this.parent.breadCrumbBarNavigation.insertBefore(n,c),this.updateBreadCrumbBar(n)}},e.prototype.updateBreadCrumbBar=function(e){for(var i=e.querySelectorAll("li"),n=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),s=window.getComputedStyle(n,null),r=parseFloat(s.getPropertyValue("padding-right")),o=parseFloat(s.getPropertyValue("padding-left")),h=n.offsetWidth-r-o,d=this.parent.createElement("ul",{className:"e-addressbar-ul"}),p=0,c=[],u=0;u<i.length;u++){var f=i[u].clientWidth;c.push(f),p+=f}t.isNullOrUndefined(n)||t.remove(n);var g=this.parent.createElement("div");g.setAttribute("class","e-search-wrap");var m=this.parent.element.id+"_search",b=t.createElement("input",{id:m,attrs:{autocomplete:"off","aria-label":V(this.parent,"Search")}});g.appendChild(b);var y=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap .e-input");if(t.isNullOrUndefined(y)){this.parent.breadCrumbBarNavigation.appendChild(g);var v=t.createElement("span",{className:"e-icons e-fe-search"});t.EventHandler.add(v,"click",this.onShowInput,this),b.parentElement.insertBefore(v,b),this.searchObj=new a.TextBox({value:"",showClearButton:!0,placeholder:V(this.parent,"Search"),focus:this.onFocus.bind(this),blur:this.onBlur.bind(this)}),this.searchObj.appendTo("#"+this.parent.element.id+"_search"),this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping);var O=this.searchObj.element.nextElementSibling;t.EventHandler.add(O,"mousedown",this.searchChangeHandler.bind(this),this),t.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)}var w=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");if(h-=this.searchWrapWidth?this.searchWrapWidth:w.offsetWidth,p>h){for(u=i.length;u--;){var I=h-c[u];if(!(I>40)){for(var D=[],S=0;S<=u;S++){var C=i[S];D.push({text:C.innerText,utext:C.getAttribute("data-utext")})}var j=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),x={className:"e-breadcrumb-submenu"},P=this.parent.createElement("button",x);j.appendChild(P),d.insertBefore(j,d.querySelector("li")),this.subMenuObj=new l.DropDownButton({items:D,cssClass:"e-caret-hide e-submenu",iconCss:"e-icons e-fe-breadcrumb",iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(P);break}d.insertBefore(i[u],d.querySelector("li")),h=I}this.parent.breadCrumbBarNavigation.insertBefore(d,w)}else this.parent.breadCrumbBarNavigation.insertBefore(e,w)},e.prototype.onFocus=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(Cn,{args:this.parent})},e.prototype.onBlur=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.remove("e-focus")},e.prototype.subMenuSelectOperations=function(e){var t={target:e.element};this.addressPathClickHandler(t)},e.prototype.addSubMenuAttributes=function(e){e.element.setAttribute("data-utext",t.getValue("utext",e.item));var i=this.parent.createElement("a",{className:"e-list-text"});e.element.appendChild(i)},e.prototype.searchEventBind=function(e){e?(this.searchObj.input=this.searchChangeHandler.bind(this),this.searchObj.change=null):(this.searchObj.change=this.searchChangeHandler.bind(this),this.searchObj.input=null)},e.prototype.searchChangeHandler=function(e){var i=this;t.isNullOrUndefined(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(function(){I(i.parent,e.value,!1)},300)):I(this.parent,e.value,!1))},e.prototype.addressPathClickHandler=function(e){var i=e.target;if("LI"===i.nodeName||"A"===i.nodeName){var n="LI"===i.nodeName?i.children[0]:i;if(!t.isNullOrUndefined(n)){this.parent.isFiltered=!1;var s=this.updatePath(n);this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),De(this.parent,Zi,s);var a=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:a})}}},e.prototype.triggerFileOpen=function(e){var t={cancel:!1,fileDetails:e,module:"BreadCrumbBar"};delete t.cancel,this.parent.trigger("fileOpen",t)},e.prototype.onShowInput=function(){if(this.parent.isMobile)if(this.parent.element.classList.contains(oi))t.removeClass([this.parent.element],oi),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,t.addClass([this.parent.element],oi),this.searchObj.element.focus()}},e.prototype.updatePath=function(e){var i=t.closest(e,"li").getAttribute("data-utext");this.addressBarLink=i;var n=this.addressBarLink.split("/"),s=this.parent.pathId,a=this.parent.pathNames;this.parent.pathId=[],this.parent.pathNames=[];for(var r="",o=0,l=n.length-1;o<l;o++)this.parent.pathId.push(s[o]),this.parent.pathNames.push(a[o]),r+=n[o]+"/";return this.parent.setProperties({path:r},!0),r},e.prototype.onUpdatePath=function(){this.onPathChange(),this.removeSearchValue()},e.prototype.onCreateEnd=function(){this.onPathChange()},e.prototype.onRenameEnd=function(){this.onPathChange()},e.prototype.onDeleteEnd=function(){this.onUpdatePath()},e.prototype.removeSearchValue=function(){this.parent.isFiltered=!1,!this.searchObj||""===this.searchObj.value&&""===this.searchObj.element.value||(this.searchObj.value="",this.searchObj.element.value="",this.searchObj.dataBind())},e.prototype.onResize=function(){this.onPathChange()},e.prototype.onPasteEnd=function(){this.onPathChange()},e.prototype.addEventListener=function(){this.keyboardModule=new t.KeyboardEvents(this.parent.breadCrumbBarNavigation,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.parent.on(qi,this.onPropertyChanged,this),t.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(en,this.destroy,this),this.parent.on(Zi,this.onUpdatePath,this),this.parent.on(Ki,this.onUpdatePath,this),this.parent.on(Xi,this.onUpdatePath,this),this.parent.on(ln,this.onUpdatePath,this),this.parent.on(Gi,this.onCreateEnd,this),this.parent.on(bn,this.onRenameEnd,this),this.parent.on(Ji,this.onDeleteEnd,this),this.parent.on("splitter-resize",this.onResize,this),this.parent.on(In,this.onPasteEnd,this),this.parent.on($i,this.onResize,this),this.parent.on(jn,this.onSearchTextChange,this),this.parent.on(xn,this.onDropInit,this),this.parent.on("layout-refresh",this.onResize,this),this.parent.on(Nn,this.onPathChange,this)},e.prototype.keyActionHandler=function(e){switch(e.action){case"enter":this.addressPathClickHandler(e)}},e.prototype.removeEventListener=function(){this.keyboardModule.destroy(),this.parent.off(Zi,this.onUpdatePath),this.parent.off(Ki,this.onUpdatePath),this.parent.off(Xi,this.onUpdatePath),this.parent.off(ln,this.onUpdatePath),this.parent.off(In,this.onPasteEnd),this.parent.off(Gi,this.onCreateEnd),this.parent.off(bn,this.onRenameEnd),this.parent.off(Ji,this.onDeleteEnd),this.parent.off("splitter-resize",this.onResize),this.parent.off($i,this.onResize),this.parent.off(jn,this.onSearchTextChange),this.parent.off(xn,this.onDropInit),this.parent.off("layout-refresh",this.onResize),this.parent.off(Nn,this.onPathChange)},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=e.target.closest("li");this.parent.dropPath=this.updatePath(i.children[0]),this.parent.dropData=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),this.triggerFileOpen(this.parent.dropData);var n=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify("update-tree-selection",{module:"treeview",selectedNode:n})}},e.prototype.getModuleName=function(){return"breadcrumbbar"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),t.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),t.isNullOrUndefined(this.searchObj)||this.searchObj.destroy())},e.prototype.onSearchTextChange=function(e){this.searchObj.element.placeholder=V(this.parent,"Search")+" "+e.cwd.name},e}(),_n=function(){function e(e){this.currentItems=[],this.currentElement=null,this.disabledItems=[],this.parent=e,this.render()}return e.prototype.render=function(){this.keyConfigs={downarrow:"downarrow",uparrow:"uparrown"},this.contextMenu=new h.ContextMenu({enableRtl:this.parent.enableRtl,locale:this.parent.locale,target:"#"+this.parent.element.id,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.onBeforeItemRender.bind(this),select:this.onSelect.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this),cssClass:B(this.parent,ai)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+"_contextmenu"),this.addEventListener()},e.prototype.onBeforeItemRender=function(e){if(e.item.id===this.getMenuId("largeiconsview")){i=t.createElement("span");(n=e.element).insertBefore(i,"LargeIcons"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",Ui+" "+Li)}if(e.item.id===this.getMenuId("detailsview")){var i=t.createElement("span"),n=e.element;n.insertBefore(i,"Details"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",Fi+" "+Li)}},e.prototype.onBeforeClose=function(){this.menuTarget=null},e.prototype.onBeforeOpen=function(e){var i=this;this.disabledItems=[];var n,s,a=!1,r=!1,o=e.event.target;this.menuTarget=o,this.currentElement=e.element,o.classList.contains("e-spinner-pane")&&(o=this.parent.navigationpaneModule.activeNode.getElementsByClassName("e-fullrow")[0],this.menuTarget=o),o.classList.contains("e-fullrow")&&(this.parent.selectedItems.length=0),this.targetElement="Details"===this.parent.view?t.closest(o,"tr"):o;var l=this.getTargetView(o);if(this.updateActiveModule(),o.classList.contains(ki)||t.closest(o,"th")||t.closest(o,"#"+this.parent.element.id+ni)||t.closest(o,"#"+this.parent.element.id+"_toolbar"))e.cancel=!0;else if("LargeIcons"!==this.parent.view&&this.targetElement&&this.targetElement.classList.contains("e-emptyrow"))this.setLayoutItem(o);else if(t.closest(o,"."+Oi))this.setLayoutItem(o);else if(!o.classList.contains("e-menu-item")&&!o.classList.contains(Li)&&!o.classList.contains("e-caret")){if("LargeIcons"!==this.parent.view||t.isNullOrUndefined(t.closest(o,"li"))||t.closest(o,"#"+this.parent.element.id+"_tree"))t.isNullOrUndefined(t.closest(o,"tr"))?t.closest(o,"#"+this.parent.element.id+"_tree")&&(n=t.closest(o,"li").getAttribute("data-uid"),r=!0):(n=this.targetElement.getAttribute("data-uid"),s=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(n).data,t.isNullOrUndefined(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("aria-rowindex"),10)]),a=!0);else{var h={ctrlKey:!0,shiftKey:!0};t.closest(o,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(o,h),s=this.parent.visitedData,a=!0}a?!0===t.getValue("isFile",s)?this.setFileItem():this.setFolderItem(!1):r?(this.setFolderItem(!0),n===this.parent.pathId[0]&&this.disabledItems.push("Delete","Rename","Cut","Copy")):"TreeView"===l||"GridView"===l||"LargeIcon"===l?this.setLayoutItem(o):e.cancel=!0}var d=t.select("#"+this.getMenuId("Paste"),this.contextMenu.element);if(e.cancel||this.parent.enablePaste||!d||d.classList.contains("e-disabled")||this.disabledItems.push("Paste"),e.cancel)return void(this.menuTarget=this.currentElement=null);this.contextMenu.dataBind();var p=!1;(o.classList.contains("e-menu-item")||o.classList.contains(Li)||o.classList.contains("e-caret"))&&(p=!0),this.menuItemData=p?this.menuItemData:this.getMenuItemData();var c={fileDetails:[this.menuItemData],element:e.element,target:o,items:p?e.items:this.contextMenu.items,menuModule:this.contextMenu,cancel:!1,menuType:this.menuType,isSubMenu:p};t.isBlazor()&&(this.enableItems(this.disabledItems,!1,!0),delete c.menuModule),this.currentItems=c.items,this.parent.trigger("menuOpen",c,function(t){p||(i.contextMenu.dataBind(),i.contextMenu.items=t.items,i.contextMenu.dataBind()),i.enableItems(i.disabledItems,!1,!0),e.cancel=t.cancel,t.cancel&&(i.menuTarget=i.currentElement=null)})},e.prototype.updateActiveModule=function(){this.parent.activeModule=t.closest(this.menuTarget,"#"+this.parent.element.id+"_tree")?"navigationpane":t.closest(this.menuTarget,"#"+this.parent.element.id+Xt)?"detailsview":t.closest(this.menuTarget,"#"+this.parent.element.id+$t)?"largeiconsview":this.parent.activeModule},e.prototype.getTargetView=function(e){return e.classList.contains(ki)?"TreeView":e.classList.contains(Ti)?"GridView":e.classList.contains("e-list-parent")?"LargeIcon":e.classList.contains(li)?"LargeIcon":""},e.prototype.getItemIndex=function(e){for(var t=this.getMenuId(e),i=0;i<this.currentItems.length;i++)if(this.currentItems[i].id===t||this.currentItems[i].id===e)return i;return-1},e.prototype.disableItem=function(e){0!==e.length&&(this.disabledItems=this.disabledItems.concat(e))},e.prototype.enableItems=function(e,t,i){for(var n=0;n<e.length;n++)1===this.checkValidItem(e[n])?this.contextMenu.enableItems([this.getMenuId(e[n])],t,i):2===this.checkValidItem(e[n])&&this.contextMenu.enableItems([e[n]],t,i)},e.prototype.setFolderItem=function(e){this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map(function(e){return e.trim()})),this.contextMenu.dataBind(),e?this.disabledItems.push("Open"):1!==this.parent.selectedItems.length&&this.disabledItems.push("Rename","Paste")},e.prototype.setFileItem=function(){this.menuType="file",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.file.map(function(e){return e.trim()})),this.contextMenu.dataBind(),1!==this.parent.selectedItems.length&&this.disabledItems.push("Rename")},e.prototype.setLayoutItem=function(e){this.menuType="layout",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.layout.map(function(e){return e.trim()})),this.contextMenu.dataBind(),(!this.parent.allowMultiSelection||"LargeIcons"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+$t).getElementsByClassName(Oi).length||"Details"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+Xt).getElementsByClassName(Oi).length)&&this.disabledItems.push("SelectAll"),0===this.parent.selectedNodes.length&&this.disabledItems.push("Paste"),this.contextMenu.dataBind()},e.prototype.checkValidItem=function(e){return t.isNullOrUndefined(t.select("#"+this.getMenuId(e),this.currentElement))?t.isNullOrUndefined(t.select("#"+e,this.currentElement))?-1:2:1},e.prototype.getMenuItemData=function(){if("layout"===this.menuType)return x(this.parent);var e={target:this.menuTarget};return this.parent.notify(fn,e),this.parent.itemData[0]},e.prototype.onSelect=function(e){var i=this;if(!t.isNullOrUndefined(e.item)&&e.item.id){var n,s=e.item.id.substr((this.parent.element.id+"_cm_").length);"refresh"===s||"newfolder"===s||"upload"===s?(n=[x(this.parent)],this.parent.itemData=n):(this.parent.notify("selected-data",{}),n=this.parent.itemData);var a={cancel:!1,element:e.element,fileDetails:n,item:e.item};this.parent.trigger("menuClick",a,function(t){var a;if(!t.cancel)switch(s){case"cut":N(i.parent);break;case"copy":P(i.parent);break;case"paste":"folder"===i.menuType&&("largeiconsview"===i.parent.activeModule||"detailsview"===i.parent.activeModule)?i.parent.folderPath=M(i.parent,i.menuItemData,i.parent.path):i.parent.folderPath="",K(i.parent);break;case"delete":for(var r=0;r<n.length;r++)if(!be(n[r]))return void fe(i.parent,n[r],kn);ze(i.parent,"Delete");break;case"download":for(var o=0;o<n.length;o++)if(!Oe(n[o]))return void fe(i.parent,n[o],An);"navigationpane"===i.parent.activeModule?i.parent.notify("download-init",{}):i.parent.selectedItems.length>0&&He(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":be(n[0])?(i.parent.notify(gn,{}),ze(i.parent,"Rename")):fe(i.parent,n[0],kn);break;case"selectall":i.parent.notify("select-all-init",{});break;case"refresh":C(i.parent);break;case"open":i.parent.visitedItem&&i.parent.notify(on,{target:i.parent.visitedItem});break;case"details":i.parent.notify(un,{}),a=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(a=[]),Ne(i.parent,a,i.parent.path,"details");break;case"newfolder":we(i.parent);break;case"upload":Ie(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":H(i.parent,e);break;case"largeiconsview":D(i.parent,"LargeIcons");break;case"detailsview":D(i.parent,"Details")}})}},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"cssClass":this.contextMenu.cssClass=B(this.parent,ai)}},e.prototype.addEventListener=function(){this.parent.on(en,this.destroy,this),this.parent.on(qi,this.onPropertyChanged,this),this.keyboardModule=new t.KeyboardEvents(this.contextMenu.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.removeEventListener=function(){this.parent.off(en,this.destroy),this.parent.off(qi,this.onPropertyChanged),this.keyboardModule.destroy()},e.prototype.keyActionHandler=function(e){switch(e.action){case"uparrow":case"downarrow":e.preventDefault()}},e.prototype.getModuleName=function(){return"contextmenu"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.contextMenu.destroy())},e.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,s=this.getMenuId(e[i]),a=V(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:s,text:a,iconCss:"e-icons e-fe-open"};break;case"Upload":n={id:s,text:a,iconCss:"e-icons e-fe-upload"};break;case"Cut":n={id:s,text:a,iconCss:Ai};break;case"Copy":n={id:s,text:a,iconCss:"e-icons e-fe-copy"};break;case"Paste":n={id:s,text:a,iconCss:"e-icons e-fe-paste"};break;case"Delete":n={id:s,text:a,iconCss:"e-icons e-fe-delete"};break;case"Rename":n={id:s,text:a,iconCss:"e-icons e-fe-rename"};break;case"NewFolder":n={id:s,text:a,iconCss:"e-icons e-fe-newfolder"};break;case"Details":n={id:s,text:a,iconCss:"e-icons e-fe-details"};break;case"SortBy":n={id:s,text:a,iconCss:"e-icons e-fe-sort",items:[{id:this.getMenuId("Name"),text:V(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?ci:null},{id:this.getMenuId("Size"),text:V(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?ci:null},{id:this.getMenuId("Date"),text:V(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?ci:null},{separator:!0},{id:this.getMenuId("Ascending"),text:V(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?pi:null},{id:this.getMenuId("Descending"),text:V(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?pi:null},{id:this.getMenuId("None"),text:V(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?pi:null}]};break;case"View":n={id:s,text:a,iconCss:"Details"===this.parent.view?Fi:Ui,items:[{id:this.getMenuId("largeiconsview"),text:V(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:pi},{id:this.getMenuId("detailsview"),text:V(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?pi:null}]};break;case"Refresh":n={id:s,text:a,iconCss:"e-icons e-fe-refresh"};break;case"SelectAll":n={id:s,text:a,iconCss:"e-icons e-fe-select"};break;case"Download":n={id:s,text:a,iconCss:"e-icons e-fe-download"};break;default:n={id:s,text:a}}t.push(n)}return t},e.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.toLowerCase()},e}(),Vn={NewFolder:"New folder",Upload:"Upload",Delete:"Delete",Rename:"Rename",Download:"Download",Cut:"Cut",Copy:"Copy",Paste:"Paste",SortBy:"Sort by",Refresh:"Refresh","Item-Selection":"item selected","Items-Selection":"items selected",View:"View",Details:"Details",SelectAll:"Select all",Open:"Open","Tooltip-NewFolder":"New folder","Tooltip-Upload":"Upload","Tooltip-Delete":"Delete","Tooltip-Rename":"Rename","Tooltip-Download":"Download","Tooltip-Cut":"Cut","Tooltip-Copy":"Copy","Tooltip-Paste":"Paste","Tooltip-SortBy":"Sort by","Tooltip-Refresh":"Refresh","Tooltip-Selection":"Clear selection","Tooltip-View":"View","Tooltip-Details":"Details","Tooltip-SelectAll":"Select all",Name:"Name",Size:"Size",DateModified:"Modified",DateCreated:"Date created",Path:"Path",Modified:"Modified",Created:"Created",Location:"Location",Type:"Type",Permission:"Permission",Ascending:"Ascending",Descending:"Descending",None:"None","View-LargeIcons":"Large icons","View-Details":"Details",Search:"Search","Button-Ok":"OK","Button-Cancel":"Cancel","Button-Yes":"Yes","Button-No":"No","Button-Create":"Create","Button-Save":"Save","Header-NewFolder":"Folder","Content-NewFolder":"Enter your folder name","Header-Rename":"Rename","Content-Rename":"Enter your new name","Header-Rename-Confirmation":"Rename Confirmation","Content-Rename-Confirmation":"If you change a file name extension, the file might become unstable. Are you sure you want to change it?","Header-Delete":"Delete File","Content-Delete":"Are you sure you want to delete this file?","Header-Folder-Delete":"Delete Folder","Content-Folder-Delete":"Are you sure you want to delete this folder?","Header-Multiple-Delete":"Delete Multiple Items","Content-Multiple-Delete":"Are you sure you want to delete these {0} items?","Header-Duplicate":"File/Folder exists","Content-Duplicate":"{0} already exists. Do you want to rename and paste?","Header-Upload":"Upload Files",Error:"Error","Validation-Empty":"The file or folder name cannot be empty.","Validation-Invalid":'The file or folder name {0} contains invalid characters. Please use a different name. Valid file or folder names cannot end with a dot or space, and cannot contain any of the following characters: \\/:*?"<>|',"Validation-NewFolder-Exists":"A file or folder with the name {0} already exists.","Validation-Rename-Exists":"Cannot rename {0} to {1}: destination already exists.","Folder-Empty":"This folder is empty","File-Upload":"Drag files here to upload","Search-Empty":"No results found","Search-Key":"Try with different keywords","Filter-Empty":"No results found","Filter-Key":"Try with different filter","Sub-Folder-Error":"The destination folder is the subfolder of the source folder.","Same-Folder-Error":"The destination folder is the same as the source folder.","Access-Denied":"Access Denied","Access-Details":'You don"t have permission to access this folder.',"Header-Retry":"File Already Exists","Content-Retry":"A file with this name already exists in this folder. What would you like to do?","Button-Keep-Both":"Keep both","Button-Replace":"Replace","Button-Skip":"Skip","ApplyAll-Label":"Do this for all current items",KB:"KB","Access-Message":"{0} is not accessible. You need permission to perform the {1} action.","Network-Error":"NetworkError: Failed to send on XMLHTTPRequest: Failed to load","Server-Error":"ServerError: Invalid response from"},Bn=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Hn=function(e,t,i,n){var s,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(r=(a<3?s(r):a>3?s(t,i,r):s(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},zn=function(e){function s(t,i){var n=e.call(this,t,i)||this;return n.filterData=null,n.selectedNodes=[],n.duplicateItems=[],n.duplicateRecords=[],n.previousPath=[],n.nextPath=[],n.isLayoutChange=!1,n.layoutSelectedItems=[],n.renamedId=null,n.uploadItem=[],n.deleteRecords=[],n.isFile=!1,n.sortBy="name",n.isCut=!1,n.isSearchCut=!1,n.isSearchDrag=!1,n.isPasteError=!1,n.folderPath="",n.isSameAction=!1,n.isFiltered=!1,n.enablePaste=!1,n.persistData=!1,n.retryArgs=[],n.isOpened=!1,n.isRetryOpened=!1,n.isPathDrag=!1,n.searchedItems=[],n.retryFiles=[],n.isApplySame=!1,n.dragData=[],n.dragNodes=[],n.dragPath="",n.dropPath="",n.isDragDrop=!1,n.treeExpandTimer=null,n.dragCursorPosition={left:44,top:18},n.isDropEnd=!1,n.droppedObjects=[],n.uploadingCount=0,n.uploadedCount=0,r.Inject(Un,Fn,_n),n}Bn(s,e),r=s,s.prototype.getModuleName=function(){return"filemanager"},s.prototype.preRender=function(){this.ensurePath(),this.feParent=[],this.feFiles=[],t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.isDevice=t.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=t.closest(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",n.createSpinner({target:this.element},t.createElement),this.addWrapper(),this.keyConfigs={altN:"alt+n",f5:"f5",ctrlShift1:"ctrl+shift+1",ctrlShift2:"ctrl+shift+2",ctrlU:"ctrl+u"},this.localeObj=new t.L10n(this.getModuleName(),Vn,this.locale)},s.prototype.getPersistData=function(){var e=["view","path","selectedItems"];return this.addOnPersist(e)},s.prototype.requiredModules=function(){var e=[];return e.push({member:"breadcrumbbar",args:[this]}),e.push({member:"largeiconsview",args:[this]}),this.toolbarSettings.visible&&e.push({member:"toolbar",args:[this]}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this]}),this.view&&e.push({member:"detailsview",args:[this]}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this]}),e},s.prototype.render=function(){this.initialize();var e=t.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.setRtl(this.enableRtl),this.addEventListeners(),De(this,this.path!==this.originalPath?Wi:Ki,this.path),this.adjustHeight(),t.isNullOrUndefined(this.navigationpaneModule)&&(this.splitterObj.collapse(this.enableRtl?1:0),t.select(".e-split-bar",this.element).classList.add(Bi)),this.wireEvents(),this.renderComplete()},s.prototype.ensurePath=function(){var e=this.path;t.isNullOrUndefined(e)&&(e="/"),e.lastIndexOf("/")!==e.length-1&&(e+="/"),this.originalPath=e;var i=e.split("/");this.setProperties({path:i[0]+"/"},!0),this.pathNames=[],this.pathId=["fe_tree"],this.itemData=[]},s.prototype.initialize=function(){this.isMobile&&t.addClass([this.element],"e-fe-mobile"),this.allowMultiSelection&&t.addClass([this.element],"e-fe-cb-select"),this.addCssClass(null,this.cssClass),this.renderFileUpload()},s.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+"_toolbar"});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+Jt,className:"e-layout"});this.element.appendChild(t);var n=this.createElement("div",{id:this.element.id+"_navigation",className:"e-navigation"}),s=this.createElement("div",{id:this.element.id+"_tree"});n.appendChild(s);var a=this.createElement("div",{id:this.element.id+ii,className:"e-layout-content"});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+ni,className:"e-address"}),a.appendChild(this.breadCrumbBarNavigation);var r=this.createElement("div",{id:this.element.id+Xt});a.appendChild(r);var o=this.createElement("div",{id:this.element.id+$t,className:li,attrs:{role:"group"}});a.appendChild(o);var l=this.createElement("span",{className:"e-fe-overlay"});a.appendChild(l);var h;this.enableRtl?(t.appendChild(a),t.appendChild(n),h=[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(t.appendChild(n),t.appendChild(a),h=[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new i.Splitter({paneSettings:h,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(t);var d=this.createElement("div",{id:this.element.id+Zt});this.element.appendChild(d);var p=this.createElement("ul",{id:this.element.id+"_contextmenu"});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+ei});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+ti});this.element.appendChild(u);var f=this.createElement("div",{id:this.element.id+"_upload_dialog"});this.element.appendChild(f)},s.prototype.adjustHeight=function(){var e=t.select("#"+this.element.id+"_toolbar",this.element),i=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-i).toString(),this.splitterObj.dataBind())},s.prototype.splitterResize=function(){this.notify("splitter-resize",{})},s.prototype.splitterAdjust=function(){var e=t.select(".e-split-bar",this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(Bi)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(Bi))},s.prototype.addCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},s.prototype.showSpinner=function(){n.showSpinner(this.element)},s.prototype.hideSpinner=function(){n.hideSpinner(this.element)},s.prototype.onContextMenu=function(e){e.preventDefault()},s.prototype.checkMobile=function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(t.Browser.userAgent.toLowerCase())&&/mobile/i.test(t.Browser.userAgent.toLowerCase())},s.prototype.renderFileUpload=function(){var e=this.element.id+si,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new n.Dialog({header:V(this,"Header-Upload"),content:t,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!1,isModal:!0,width:"350px",target:this.popupTarget?this.popupTarget:"#"+this.element.id,cssClass:B(this,this.isMobile?ri:ai),locale:this.locale,allowDragging:!0,position:{X:"center",Y:"center"},enableRtl:this.enableRtl,enableHtmlSanitizer:this.enableHtmlSanitizer,open:this.onOpen.bind(this),close:this.onClose.bind(this),beforeOpen:this.onBeforeOpen.bind(this),beforeClose:this.onBeforeClose.bind(this)}),this.uploadDialogObj.appendTo("#"+this.element.id+"_upload_dialog"),this.renderUploadBox()},s.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url;this.uploadObj=new a.Uploader({dropArea:t.select("#"+this.element.id+ii,this.element),asyncSettings:{saveUrl:e,removeUrl:e},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),removing:this.onRemoving.bind(this),clearing:this.onClearing.bind(this),selected:this.onSelected.bind(this),success:this.onUploadSuccess.bind(this),failure:this.onUploadFailure.bind(this),autoUpload:this.uploadSettings.autoUpload,minFileSize:this.uploadSettings.minFileSize,maxFileSize:this.uploadSettings.maxFileSize,allowedExtensions:this.uploadSettings.allowedExtensions,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+si)},s.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},s.prototype.updateUploader=function(){this.uploadObj.autoUpload=this.uploadSettings.autoUpload,this.uploadObj.minFileSize=this.uploadSettings.minFileSize,this.uploadObj.maxFileSize=this.uploadSettings.maxFileSize,this.uploadObj.allowedExtensions=this.uploadSettings.allowedExtensions,this.uploadObj.dataBind()},s.prototype.onBeforeOpen=function(e){var i={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};t.isBlazor()&&delete i.popupModule,this.trigger("beforePopupOpen",i,function(t){e.cancel=t.cancel})},s.prototype.onBeforeClose=function(e){var i={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};t.isBlazor()&&delete i.popupModule,this.trigger("beforePopupClose",i,function(t){e.cancel=t.cancel})},s.prototype.onOpen=function(){this.isOpened=!0,this.uploadDialogObj.element.focus();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};t.isBlazor()&&delete e.popupModule,this.trigger("popupOpen",e)},s.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};t.isBlazor()&&delete e.popupModule,this.trigger("popupClose",e)},s.prototype.onUploading=function(e){var i="save";if(0!==this.retryArgs.length)for(var n=0;n<this.retryArgs.length;n++)e.fileData.name===this.retryArgs[n].file.name&&(i=this.retryArgs[n].action,this.retryArgs.splice(n,1),n=this.retryArgs.length);var s=JSON.stringify(t.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:i},{data:s}];var a={url:this.ajaxSettings.uploadUrl?this.ajaxSettings.uploadUrl:this.ajaxSettings.url,type:"POST",mode:!0,dataType:null,contentType:null,data:JSON.stringify(e.customFormData),onSuccess:null,onFailure:null,beforeSend:null};this.uploadEventArgs={action:"Upload",ajaxSettings:a,cancel:!1},this.trigger("beforeSend",this.uploadEventArgs,function(i){e.customFormData=JSON.parse(t.getValue("data",i.ajaxSettings)),e.cancel=i.cancel;var n={cancel:!1,httpRequest:e.currentRequest};"function"==typeof t.getValue("beforeSend",i.ajaxSettings)&&(t.getValue("beforeSend",i.ajaxSettings)(n),t.getValue("cancel",n)&&(e.cancel=t.getValue("cancel",n)))})},s.prototype.onRemoving=function(){this.onFileUploadSuccess({count:1}),1===this.uploadObj.getFilesData().length&&this.uploadDialogObj.hide()},s.prototype.onClearing=function(){this.isOpened&&this.uploadDialogObj.hide()},s.prototype.onSelected=function(e){if(0!==e.filesData.length){this.uploadingCount=e.filesData.length,this.uploadedCount=0;var t=x(this);if(!ve(t))return e.cancel=!0,void fe(this,t,Tn);this.uploadDialogObj.show()}},s.prototype.onFileUploadSuccess=function(e){this.uploadedCount=this.uploadedCount+e.count,this.uploadSettings.autoClose&&this.uploadingCount===this.uploadedCount&&this.uploadDialogObj.hide()},s.prototype.onUploadSuccess=function(e){var i={action:"Upload",result:e};this.trigger("success",i),this.itemData=[t.getValue(this.pathId[this.pathId.length-1],this.feParent)],De(this,Zi,this.path),this.onFileUploadSuccess({count:1}),"function"==typeof t.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)&&t.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)()},s.prototype.onUploadFailure=function(e){var i=t.getValue("response",e),n=t.getValue("statusText",i);""!==n&&t.setValue("statusText",n,e);var s={action:"Upload",error:e};this.trigger("failure",s),400===t.getValue("statusCode",i)&&(this.retryFiles.push(t.getValue("file",e)),this.isRetryOpened||qe(this,"UploadRetry")),"function"==typeof t.getValue("onFailure",this.uploadEventArgs.ajaxSettings)&&t.getValue("onFailure",this.uploadEventArgs.ajaxSettings)()},s.prototype.onInitialEnd=function(){q(this,this.path)},s.prototype.addEventListeners=function(){this.on(tn,this.showSpinner,this),this.on(sn,this.hideSpinner,this),this.on(Wi,this.onInitialEnd,this),this.on(un,this.onDetailsInit,this),this.on(nn,this.onFileUploadSuccess,this),t.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},s.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(tn,this.showSpinner),this.off(sn,this.hideSpinner),this.off(Wi,this.onInitialEnd),this.off(un,this.onDetailsInit),this.off(nn,this.onFileUploadSuccess),t.EventHandler.remove(this.element,"contextmenu",this.onContextMenu))},s.prototype.onDetailsInit=function(){t.isNullOrUndefined(this.activeModule)&&(this.itemData=[t.getValue(this.pathId[this.pathId.length-1],this.feParent)])},s.prototype.resizeHandler=function(){this.adjustHeight(),this.notify($i,{})},s.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[x(this)],ye(this.itemData[0])?ze(this,"NewFolder"):fe(this,this.itemData[0],Ln);break;case"f5":e.preventDefault(),C(this);break;case"ctrlShift1":e.preventDefault(),this.fileView="Details",this.setProperties({view:"Details"},!0),n.showSpinner(this.element),D(this,"Details");break;case"ctrlShift2":e.preventDefault(),this.fileView="LargeIcons",this.setProperties({view:"LargeIcons"},!0),n.showSpinner(this.element),D(this,"LargeIcons");break;case"ctrlU":e.preventDefault(),t.select("#"+this.element.id+si,this.element).click()}},s.prototype.wireEvents=function(){t.EventHandler.add(window,"resize",this.resizeHandler,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},s.prototype.unWireEvents=function(){t.EventHandler.remove(window,"resize",this.resizeHandler),this.keyboardModule.destroy()},s.prototype.setPath=function(){this.setProperties({selectedItems:[]},!0),this.ensurePath(),this.notify(dn,{selectedNode:this.pathId[0]}),De(this,this.path!==this.originalPath?Wi:Ki,this.path)},s.prototype.onPropertyChanged=function(e,i){for(var n,s=0,a=Object.keys(e);s<a.length;s++)switch(a[s]){case"ajaxSettings":this.ajaxSettingSetModel(e);break;case"allowDragAndDrop":this.allowDragAndDrop=e.allowDragAndDrop,this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"allowMultiSelection":this.allowMultiSelection?t.addClass([this.element],"e-fe-cb-select"):(this.selectedItems.length>1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),t.removeClass([this.element],"e-fe-cb-select")),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify(qi,{module:"detailsview",newProp:e,oldProp:i});break;case"enableRtl":this.enableRtl=e.enableRtl,this.refresh();break;case"rootAliasName":this.rootAliasName=e.rootAliasName,this.refresh();break;case"height":n=t.isNullOrUndefined(e.height)?e.height:t.formatUnit(e.height),t.setStyleAttribute(this.element,{height:n}),this.adjustHeight(),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"locale":t.isNullOrUndefined(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify(qi,{module:"navigationpane",newProp:e,oldProp:i});break;case"path":this.setPath();break;case"searchSettings":t.isNullOrUndefined(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),t.isNullOrUndefined(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),t.isNullOrUndefined(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify(qi,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify(qi,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":this.adjustHeight(),this.notify(qi,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(qi,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify(qi,{module:"largeiconsview",newProp:e,oldProp:i});break;case"width":t.setStyleAttribute(this.element,{width:t.isNullOrUndefined(e.width)?e.width:t.formatUnit(e.width)}),this.notify(qi,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":C(this),this.notify(cn,{});break;case"popupTarget":this.uploadDialogObj&&(this.uploadDialogObj.target=e.popupTarget),this.dialogObj&&(this.dialogObj.target=e.popupTarget),this.extDialogObj&&(this.extDialogObj.target=e.popupTarget),this.viewerObj&&(this.viewerObj.target=e.popupTarget)}},s.prototype.ajaxSettingSetModel=function(i){t.isNullOrUndefined(i.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:i.ajaxSettings.url}},!0),t.isNullOrUndefined(i.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:i.ajaxSettings.uploadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:i.ajaxSettings.downloadUrl}},!0),t.isNullOrUndefined(i.ajaxSettings.getImageUrl)||this.setProperties({ajaxSettings:{getImageUrl:i.ajaxSettings.getImageUrl}},!0),this.setProperties({path:"/"},!0),this.setProperties({selectedItems:[]},!0),e.prototype.refresh.call(this)},s.prototype.localeSetModelOption=function(t){this.uploadObj.locale=t.locale,e.prototype.refresh.call(this)},s.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(en,{}),this.uploadObj.destroy(),this.uploadObj=null,this.uploadDialogObj.destroy(),this.uploadDialogObj=null,this.splitterObj.destroy(),this.splitterObj=null,this.dialogObj&&(this.dialogObj.destroy(),this.dialogObj=null),this.viewerObj&&(this.viewerObj.destroy(),this.viewerObj=null),this.extDialogObj&&(this.extDialogObj.destroy(),this.extDialogObj=null),this.element.removeAttribute("style"),this.element.removeAttribute("tabindex"),this.removeEventListeners(),this.unWireEvents(),this.addCssClass(this.cssClass,null),t.removeClass([this.element],[Vi,"e-fe-mobile","e-fe-cb-select"]),this.element.innerHTML="",e.prototype.destroy.call(this))},s.prototype.createFolder=function(e){this.notify(Rn,{action:"createFolder"});var t=[x(this)];this.itemData=t,e?/[\/\\|*?"<>:]/.test(e)?ze(this,"Error",{files:null,error:{code:"402",message:V(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):ye(t[0])?Se(this,e):fe(this,t[0],Ln):we(this)},s.prototype.deleteFiles=function(e){this.notify(Rn,{action:"deleteFiles",ids:e})},s.prototype.disableToolbarItems=function(e){t.isNullOrUndefined(e)||this.toolbarModule.enableItems(e,!1)},s.prototype.downloadFiles=function(e){this.notify(Rn,{action:"downloadFiles",ids:e})},s.prototype.enableToolbarItems=function(e){t.isNullOrUndefined(e)||this.toolbarModule.enableItems(e,!0)},s.prototype.disableMenuItems=function(e){t.isNullOrUndefined(e)||t.isNullOrUndefined(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},s.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},s.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},s.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(hn,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),Ce(this,"filter-end")},s.prototype.getSelectedFiles=function(){return this.notify("update-selection-data",{}),this.itemData},s.prototype.openFile=function(e){this.notify(Rn,{action:"openFile",id:e})},s.prototype.refreshFiles=function(){C(this)},s.prototype.refreshLayout=function(){this.adjustHeight(),this.notify("layout-refresh",{})},s.prototype.selectAll=function(){this.notify(Rn,{action:"selectAll"})},s.prototype.clearSelection=function(){this.notify(Rn,{action:"clearSelection"})},s.prototype.renameFile=function(e,t){this.notify(Rn,{action:"renameFile",id:e,newName:t})},s.prototype.uploadFiles=function(){var e=[x(this)];this.itemData=e,Ie(this)},s.prototype.setRtl=function(e){e?this.addCssClass(null,Vi):this.addCssClass(Vi,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)};var r;return Hn([t.Complex({},Dt)],s.prototype,"ajaxSettings",void 0),Hn([t.Property(!1)],s.prototype,"allowDragAndDrop",void 0),Hn([t.Property(!0)],s.prototype,"allowMultiSelection",void 0),Hn([t.Complex({},Vt)],s.prototype,"contextMenuSettings",void 0),Hn([t.Property("")],s.prototype,"cssClass",void 0),Hn([t.Complex({},Lt)],s.prototype,"detailsViewSettings",void 0),Hn([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),Hn([t.Property(!1)],s.prototype,"enablePersistence",void 0),Hn([t.Property("400px")],s.prototype,"height",void 0),Hn([t.Property("LargeIcons")],s.prototype,"view",void 0),Hn([t.Complex({},zt)],s.prototype,"navigationPaneSettings",void 0),Hn([t.Property("/")],s.prototype,"path",void 0),Hn([t.Property(null)],s.prototype,"popupTarget",void 0),Hn([t.Complex({},Et)],s.prototype,"searchSettings",void 0),Hn([t.Property()],s.prototype,"selectedItems",void 0),Hn([t.Property(!0)],s.prototype,"showFileExtension",void 0),Hn([t.Property(null)],s.prototype,"rootAliasName",void 0),Hn([t.Property(!1)],s.prototype,"showHiddenItems",void 0),Hn([t.Property(!0)],s.prototype,"showThumbnail",void 0),Hn([t.Property("Ascending")],s.prototype,"sortOrder",void 0),Hn([t.Complex({},xt)],s.prototype,"toolbarSettings",void 0),Hn([t.Complex({},Kt)],s.prototype,"uploadSettings",void 0),Hn([t.Property("100%")],s.prototype,"width",void 0),Hn([t.Event()],s.prototype,"fileLoad",void 0),Hn([t.Event()],s.prototype,"fileOpen",void 0),Hn([t.Event()],s.prototype,"beforeDownload",void 0),Hn([t.Event()],s.prototype,"beforeImageLoad",void 0),Hn([t.Event()],s.prototype,"beforePopupClose",void 0),Hn([t.Event()],s.prototype,"beforePopupOpen",void 0),Hn([t.Event()],s.prototype,"beforeSend",void 0),Hn([t.Event()],s.prototype,"created",void 0),Hn([t.Event()],s.prototype,"destroyed",void 0),Hn([t.Event()],s.prototype,"fileDragStart",void 0),Hn([t.Event()],s.prototype,"fileDragging",void 0),Hn([t.Event()],s.prototype,"fileDragStop",void 0),Hn([t.Event()],s.prototype,"fileDropped",void 0),Hn([t.Event()],s.prototype,"fileSelection",void 0),Hn([t.Event()],s.prototype,"fileSelect",void 0),Hn([t.Event()],s.prototype,"menuClick",void 0),Hn([t.Event()],s.prototype,"menuOpen",void 0),Hn([t.Event()],s.prototype,"failure",void 0),Hn([t.Event()],s.prototype,"popupClose",void 0),Hn([t.Event()],s.prototype,"popupOpen",void 0),Hn([t.Event()],s.prototype,"success",void 0),Hn([t.Event()],s.prototype,"toolbarClick",void 0),Hn([t.Event()],s.prototype,"toolbarCreate",void 0),Hn([t.Event()],s.prototype,"uploadListCreate",void 0),s=r=Hn([t.NotifyPropertyChanges],s)}(t.Component),qn=function(){function e(e){this.default=["Delete","Rename","Download","Cut","Copy","Paste"],this.single=["Delete","Rename","Download","Cut","Copy"],this.multiple=["Delete","Download","Cut","Copy","Refresh"],this.selection=["NewFolder","Upload","SortBy","Refresh"],this.parent=e,this.render(),this.addEventListener()}return e.prototype.render=function(){var e=this;this.items=this.toolbarItemData(this.getItems(this.parent.toolbarSettings.items.map(function(e){return e.trim()})));var t={items:this.items};this.parent.trigger("toolbarCreate",t,function(t){e.items=t.items,e.toolbarObj=new h.Toolbar({items:e.items,created:e.toolbarCreateHandler.bind(e),overflowMode:"Popup",clicked:e.onClicked.bind(e),enableHtmlSanitizer:e.parent.enableHtmlSanitizer,enableRtl:e.parent.enableRtl}),e.toolbarObj.isStringTemplate=!0,e.toolbarObj.appendTo("#"+e.parent.element.id+"_toolbar")})},e.prototype.getItemIndex=function(e){for(var t=this.getId(e),i=0;i<this.items.length;i++)if(this.items[i].id===t)return i;return-1},e.prototype.getItems=function(e){var t=e.slice();return this.parent.isDevice&&this.parent.allowMultiSelection&&t.push("SelectAll"),t},e.prototype.onClicked=function(e){var i=this;if(!t.isNullOrUndefined(e.item)&&e.item.id){var n,s=e.item.id.substr((this.parent.element.id+"_tb_").length);"refresh"===s||"newfolder"===s||"upload"===s?(n=[x(this.parent)],this.parent.itemData=n):(this.parent.notify("selected-data",{}),n=this.parent.itemData);var a={cancel:!1,fileDetails:n,item:e.item};this.parent.trigger("toolbarClick",a,function(a){var r,o;if(!a.cancel)switch(s){case"sortby":(o=t.closest(e.originalEvent.target,".e-toolbar-item"))&&o.classList.contains("e-toolbar-popup")&&(e.cancel=!0);break;case"newfolder":we(i.parent);break;case"cut":N(i.parent);break;case"copy":P(i.parent);break;case"delete":for(var l=0;l<n.length;l++)if(!be(n[l]))return void fe(i.parent,n[l],kn);ze(i.parent,"Delete");break;case"details":i.parent.notify(un,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[]),Ne(i.parent,r,i.parent.path,"details");break;case"paste":i.parent.folderPath="",K(i.parent);break;case"refresh":C(i.parent);break;case"download":pe(i.parent);break;case"rename":be(n[0])?(i.parent.notify(gn,{}),ze(i.parent,"Rename")):fe(i.parent,n[0],kn);break;case"upload":Ie(i.parent);break;case"selectall":i.parent.notify("select-all-init",{});break;case"selection":i.parent.notify("clear-all-init",{})}})}},e.prototype.toolbarCreateHandler=function(){if(!t.isNullOrUndefined(t.select("#"+this.getId("SortBy"),this.parent.element))){var e=[{id:this.getPupupId("name"),text:V(this.parent,"Name"),iconCss:ci},{id:this.getPupupId("size"),text:V(this.parent,"Size")},{id:this.getPupupId("date"),text:V(this.parent,"DateModified")},{separator:!0},{id:this.getPupupId("ascending"),text:V(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?pi:""},{id:this.getPupupId("descending"),text:V(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?pi:""},{id:this.getPupupId("none"),text:V(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?pi:""}];this.buttonObj=new l.DropDownButton({items:e,cssClass:B(this.parent,ai),select:H.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:"e-icons e-fe-sort"}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))}if(!t.isNullOrUndefined(t.select("#"+this.getId("View"),this.parent.element))){var i=[{id:this.getPupupId("large"),text:'<span class="e-icons e-fe-large e-menu-icon"></span>'+V(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":pi},{id:this.getPupupId("details"),text:'<span class="e-icons e-fe-grid e-menu-icon"></span>'+V(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?pi:""}];this.layoutBtnObj=new l.DropDownButton({iconCss:"Details"===this.parent.view?Fi:Ui,cssClass:B(this.parent,"e-caret-hide "+ai),items:i,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,enableHtmlSanitizer:this.parent.enableHtmlSanitizer,content:'<span class="e-tbar-btn-text">'+V(this.parent,"View")+"</span>"}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus();for(var n=t.selectAll(".e-btn",this.toolbarObj.element),s=0;s<n.length;s++)!function(e){n[e].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},n[e].onkeyup=function(t){13!==t.keyCode||t.target.classList.contains("e-fe-popup")||n[e].click()}}(s);this.parent.refreshLayout()},e.prototype.updateSortByButton=function(){if(this.buttonObj)for(var e=this.buttonObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("name")?e[t].iconCss="name"===this.parent.sortBy?ci:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?ci:"":e[t].id===this.getPupupId("date")?e[t].iconCss="_fm_modified"===this.parent.sortBy?ci:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?pi:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?pi:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?pi:"")},e.prototype.getPupupId=function(e){return this.parent.element.id+"_ddl_"+e.toLowerCase()},e.prototype.layoutChange=function(e){"Details"===this.parent.view?e.item.id===this.getPupupId("large")&&D(this.parent,"LargeIcons"):e.item.id===this.getPupupId("details")&&D(this.parent,"Details")},e.prototype.toolbarItemData=function(e){var t=[],i="Both";this.parent.isMobile&&(i="Overflow");for(var n=0;n<e.length;n++){var s=void 0,a=this.getId(e[n]),r=V(this.parent,e[n]),o=V(this.parent,"Tooltip-"+e[n]),l='<span class="e-tbar-btn-text e-tbar-ddb-text">'+r+"</span>";switch(e[n]){case"|":s={type:"Separator"};break;case"Upload":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-upload",showTextOn:i};break;case"SortBy":s={id:a,tooltipText:o,template:'<button id="'+a+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+l+"</button>"};break;case"Refresh":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-refresh",showTextOn:i};break;case"Selection":s={id:a,text:r,tooltipText:o,suffixIcon:"e-icons e-fe-clear",overflow:"Show",align:"Right"};break;case"View":s={id:a,tooltipText:o,prefixIcon:"Details"===this.parent.view?Fi:Ui,overflow:"Show",align:"Right",text:r,showTextOn:"Overflow",template:'<button id="'+a+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+V(this.parent,"View")+"></button>"};break;case"Details":s={id:a,tooltipText:o,prefixIcon:"e-icons e-fe-details",overflow:"Show",align:"Right",text:r,showTextOn:"Overflow"};break;case"NewFolder":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-newfolder",showTextOn:i};break;case"Cut":s={id:a,text:r,tooltipText:o,prefixIcon:Ai,showTextOn:i};break;case"Copy":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-copy",showTextOn:i};break;case"Paste":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-paste",showTextOn:i};break;case"Delete":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-delete",showTextOn:i};break;case"Rename":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-rename",showTextOn:i};break;case"Download":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-download",showTextOn:i};break;case"SelectAll":s={id:a,text:r,tooltipText:o,prefixIcon:"e-icons e-fe-select",showTextOn:i};break;default:s={id:a,text:r,tooltipText:o}}t.push(s)}return t},e.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},e.prototype.addEventListener=function(){this.parent.on(qi,this.onPropertyChanged,this),this.parent.on(hn,this.onSelectionChanged,this),this.parent.on(pn,this.onLayoutChange,this),this.parent.on(yn,this.showPaste,this),this.parent.on(vn,this.hidePaste,this),this.parent.on(en,this.destroy,this),this.parent.on(cn,this.updateSortByButton,this)},e.prototype.reRenderToolbar=function(e){var t=this;if(void 0!==e.newProp.toolbarSettings.items){this.items=this.toolbarItemData(this.getItems(e.newProp.toolbarSettings.items.map(function(e){return e.trim()})));var i={items:this.items};this.parent.trigger("toolbarCreate",i,function(e){t.buttonObj&&t.buttonObj.destroy(),t.layoutBtnObj&&t.layoutBtnObj.destroy(),t.items=e.items,t.toolbarObj.items=t.items,t.toolbarObj.dataBind(),t.toolbarCreateHandler()})}},e.prototype.onSelectionChanged=function(){this.hideStatus(),this.hideItems(this.single,!0),this.hideItems(this.selection,!1),1===this.parent.selectedItems.length?(this.hideItems(this.single,!1),this.hideItems(this.selection,!0)):this.parent.selectedItems.length>1&&(this.hideItems(this.multiple,!1),this.hideItems(this.selection,!0));var e=t.select("#"+this.getId("Selection"),this.toolbarObj.element);if(this.parent.selectedItems.length>0&&e){var i=void 0;i=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+V(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+V(this.parent,"Items-Selection"),t.select(".e-tbar-btn-text",e).textContent=i,this.toolbarObj.hideItem(e.parentElement,!1)}},e.prototype.hideItems=function(e,i){for(var n=0;n<e.length;n++){var s=t.select("#"+this.getId(e[n]),this.parent.element);s&&this.toolbarObj.hideItem(s.parentElement,i)}},e.prototype.hideStatus=function(){var e=t.select("#"+this.getId("Selection"),this.toolbarObj.element);e&&this.toolbarObj.hideItem(e.parentElement,!0)},e.prototype.showPaste=function(){this.hideItems(["Paste"],!1)},e.prototype.hidePaste=function(){this.hideItems(["Paste"],!0)},e.prototype.onLayoutChange=function(){if(this.layoutBtnObj){this.layoutBtnObj.iconCss="Details"===this.parent.view?Fi:Ui;for(var e=this.layoutBtnObj.items,t=0;t<e.length;t++)e[t].id===this.getPupupId("large")?e[t].iconCss="LargeIcons"===this.parent.view?pi:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?pi:"")}},e.prototype.removeEventListener=function(){this.parent.off(qi,this.onPropertyChanged),this.parent.off(hn,this.onSelectionChanged),this.parent.off(pn,this.onLayoutChange),this.parent.off(yn,this.showPaste),this.parent.off(vn,this.hidePaste),this.parent.off(en,this.destroy),this.parent.off(cn,this.updateSortByButton)},e.prototype.getModuleName=function(){return"toolbar"},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"cssClass":this.buttonObj&&(this.buttonObj.cssClass=B(this.parent,ai)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=B(this.parent,"e-caret-hide "+ai));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":this.reRenderToolbar(e)}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.buttonObj&&this.buttonObj.destroy(),this.layoutBtnObj&&this.layoutBtnObj.destroy(),this.toolbarObj.destroy(),this.parent.refreshLayout())},e.prototype.enableItems=function(e,i){for(var n=0;n<e.length;n++){var s=t.select("#"+this.getId(e[n]),this.parent.element);s&&this.toolbarObj.enableItems(s.parentElement,i)}},e}(),Wn=function(){function e(e){this.removeNodes=[],this.moveNames=[],this.expandTree=!1,this.isDrag=!1,this.isPathDragged=!1,this.isRenameParent=!1,this.isRightClick=!1,this.renameParent=null,this.parent=e,this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:"ctrl+x",ctrlC:"ctrl+c",ctrlV:"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftF10:"shift+F10",f2:"f2"}}return e.prototype.onInit=function(){if(t.isNullOrUndefined(this.treeObj)){var e=t.getValue(this.parent.pathId[0],this.parent.feParent);t.setValue("_fm_icon","e-fe-folder",e);var i={},n=t.getValue("id",e);t.isNullOrUndefined(n)||t.setValue("data-id",n,i),be(e)||t.setValue("class",ge(e),i),t.isNullOrUndefined(i)||t.setValue("_fm_htmlAttr",i,e),this.treeObj=new h.TreeView({fields:{dataSource:[e],id:"_fm_id",parentID:"_fm_pId",expanded:"_fm_expanded",selected:"_fm_selected",text:"name",hasChildren:"hasChild",iconCss:"_fm_icon",htmlAttributes:"_fm_htmlAttr",tooltip:"name"},enableHtmlSanitizer:this.parent.enableHtmlSanitizer,nodeSelected:this.onNodeSelected.bind(this),nodeExpanding:this.onNodeExpand.bind(this),nodeClicked:this.onNodeClicked.bind(this),allowEditing:!0,nodeEditing:this.onNodeEditing.bind(this),drawNode:this.onDrowNode.bind(this),enableRtl:this.parent.enableRtl,dataBound:this.addDragDrop.bind(this)}),this.treeObj.isStringTemplate=!0,this.treeObj.appendTo("#"+this.parent.element.id+"_tree"),this.wireEvents()}},e.prototype.addDragDrop=function(){var e=this;!this.parent.isMobile&&this.treeObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.treeObj.element,{cursorAt:this.parent.dragCursorPosition,dragTarget:".e-fullrow",distance:5,dragArea:this.parent.element,drag:re.bind(this,this.parent),dragStart:function(t){ie(e.parent,t,e.dragObj)},dragStop:te.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!0,helper:this.dragHelper.bind(this)})):!this.parent.allowDragAndDrop&&this.dragObj&&this.dragObj.destroy())},e.prototype.dragHelper=function(e){var i=e.sender.target;if(!i.classList.contains("e-fullrow"))return null;var n=t.closest(i,"li");return this.parent.dragPath="",this.parent.dragData=[],this.parent.activeElements=[],this.parent.activeElements=[n],this.parent.dragNodes=[],w(this.parent,n),this.parent.dragData=this.getTreeData(n),this.parent.dragPath=this.getDragPath(n,this.parent.dragData[0].name),this.parent.dragNodes.push(this.parent.dragData[0].name),ee(this.parent),this.parent.virtualDragElement},e.prototype.getDragPath=function(e,t){return Q(this.getDropPath(e,t))},e.prototype.getDropPath=function(e,t){var i=e.getAttribute("data-id");return c(e,this.parent.hasId?i:t,this.parent.hasId)},e.prototype.onDrowNode=function(e){var t={element:e.node,fileDetails:e.nodeData,module:"NavigationPane"};this.parent.trigger("fileLoad",t)},e.prototype.addChild=function(e,i,n){var s=F(e);if(s.length>0){for(var a=0,r=s;a<s.length;){r[a]._fm_icon="e-fe-folder";var o={},l=t.getValue("id",r[a]);t.isNullOrUndefined(l)||t.setValue("data-id",l,o),be(r[a])||t.setValue("class",ge(r[a]),o),t.isNullOrUndefined(o)||t.setValue("_fm_htmlAttr",o,r[a]),a++}this.treeObj.addNodes(s,i,null,n)}},e.prototype.onNodeSelected=function(e){if(this.parent.breadcrumbbarModule&&this.parent.breadcrumbbarModule.searchObj&&!this.renameParent&&(this.parent.breadcrumbbarModule.searchObj.element.value="",this.parent.isFiltered=!1),this.parent.searchedItems=[],e.isInteracted||this.isRightClick||this.isPathDragged||this.isRenameParent){this.activeNode=e.node,this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));if(!this.renameParent){var n={cancel:!1,fileDetails:i[0],module:"NavigationPane"};delete n.cancel,this.parent.trigger("fileOpen",n)}this.parent.selectedItems=[],this.parent.itemData=i,p(e.node,this.parent.itemData[0],this.parent),this.expandNodeTarget=null,e.node.querySelector(".e-icons")&&null===e.node.querySelector("."+hi)&&(this.expandNodeTarget="add"),De(this.parent,this.isPathDragged?In:Zi,this.parent.path),this.parent.visitedItem=e.node,this.isPathDragged=this.isRenameParent=this.isRightClick=!1}},e.prototype.onPathDrag=function(e){this.isPathDragged=!0,this.selectResultNode(e[0])},e.prototype.onNodeExpand=function(e){if((e.isInteracted||this.isDrag)&&null===e.node.querySelector("."+hi)){var i=t.getValue("text",e.nodeData),n=e.node.getAttribute("data-id"),s=!t.isNullOrUndefined(n),a=t.isNullOrUndefined(n)?i:n,r=c(e.node,a,s);this.expandNodeTarget=e.node.getAttribute("data-uid"),this.parent.expandedId=this.expandNodeTarget,this.parent.itemData=this.getTreeData(t.getValue("id",e.nodeData)),De(this.parent,"node-expand",r)}},e.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null},e.prototype.onNodeClicked=function(e){if(this.parent.activeModule="navigationpane",this.activeNode=e.node,3===e.event.which&&e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0])this.isRightClick=!0,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")];else if(e.node.getAttribute("data-uid")===this.treeObj.selectedNodes[0]&&0!==this.parent.selectedItems.length){this.parent.setProperties({selectedItems:[]},!0);var t="LargeIcons"===this.parent.view?"largeiconsview":"detailsview";this.parent.notify(qi,{module:t,newProp:{selectedItems:[]}})}},e.prototype.onNodeEditing=function(e){t.isNullOrUndefined(e.innerHtml)||(e.cancel=!0)},e.prototype.onPathChanged=function(e){this.parent.isCut=!1;var i=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feFiles);if("add"===this.expandNodeTarget){var n=t.select('[data-uid="'+this.treeObj.selectedNodes[0]+'"]',this.treeObj.element),s=t.select(".e-list-parent",n);t.isNullOrUndefined(s)&&this.addChild(e.files,this.treeObj.selectedNodes[0],!this.expandTree),this.expandNodeTarget=""}this.expandTree=!1,t.isNullOrUndefined(i)&&t.setValue(this.parent.pathId[this.parent.pathId.length-1],e.files,this.parent.feFiles)},e.prototype.updateTree=function(e){if(this.treeObj){var t=this.treeObj.selectedNodes[0];this.updateTreeNode(e,t)}},e.prototype.updateTreeNode=function(e,t){var i=-1!==this.treeObj.expandedNodes.indexOf(t);this.removeChildNodes(t),this.addChild(e.files,t,!i)},e.prototype.removeChildNodes=function(e){var i=t.select('[data-uid="'+e+'"]',this.treeObj.element),n=t.select(".e-list-parent",i),s=n?Array.prototype.slice.call(n.children):null;s&&this.treeObj.removeNodes(s)},e.prototype.onOpenEnd=function(e){var t=this.parent.pathId[this.parent.pathId.length-1];this.treeObj.expandAll(this.treeObj.selectedNodes),this.treeObj.selectedNodes=[t],this.expandNodeTarget="add",this.onPathChanged(e)},e.prototype.onOpenInit=function(e){"navigationpane"===this.parent.activeModule&&e.target.querySelector(".e-icons")&&this.treeObj.expandAll(this.treeObj.selectedNodes)},e.prototype.onInitialEnd=function(e){this.onInit(),this.addChild(e.files,t.getValue("_fm_id",e.cwd),!1)},e.prototype.onFinalizeEnd=function(e){this.onInit();var i=t.getValue("_fm_id",e.cwd);this.removeChildNodes(i),this.addChild(e.files,i,!1),this.treeObj.selectedNodes=[this.parent.pathId[this.parent.pathId.length-1]]},e.prototype.onCreateEnd=function(e){this.updateTree(e)},e.prototype.onSelectedData=function(){"navigationpane"===this.parent.activeModule&&this.updateItemData()},e.prototype.onDeleteInit=function(){if("navigationpane"===this.parent.activeModule){this.updateActionData();var e=t.getValue("name",this.parent.itemData[0]);Pe(this.parent,[e],this.parent.path,"delete")}},e.prototype.onDeleteEnd=function(e){if("navigationpane"===this.parent.activeModule){var i=this.treeObj.selectedNodes[0],n=t.select('[data-uid="'+i+'"]',this.treeObj.element),s=t.closest(n,".e-list-parent").parentElement;this.treeObj.selectedNodes=[s.getAttribute("data-uid")],this.treeObj.dataBind()}this.updateTree(e)},e.prototype.onRefreshEnd=function(e){this.updateTree(e)},e.prototype.onRenameInit=function(){"navigationpane"===this.parent.activeModule&&this.updateRenameData()},e.prototype.onRenameEndParent=function(e){var i=this.renameParent?this.renameParent:this.parent.pathId[this.parent.pathId.length-1];if(this.expandTree=-1!==this.treeObj.expandedNodes.indexOf(this.treeObj.selectedNodes[0]),this.updateTreeNode(e,i),this.parent.expandedId=null,this.renameParent)this.renameParent=null;else{var n=[];if(this.parent.hasId)n=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",this.parent.renameText,!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("_fm_pId","equal",i,!1)))}if(n.length>0){this.isRenameParent=!0;var r=t.getValue(this.treeObj.fields.id,n[0]);this.treeObj.selectedNodes=[r],this.treeObj.dataBind()}}},e.prototype.onRenameEnd=function(e){if(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered){var i=this.treeObj.getTreeData(),n=[];if(this.parent.hasId)n=new s.DataManager(i).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(i).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",this.parent.currentItemText,!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}n.length>0&&(this.renameParent=t.getValue(this.treeObj.fields.parentID,n[0]),this.parent.expandedId=this.renameParent,this.parent.itemData=this.getTreeData(this.renameParent),De(this.parent,mn,this.parent.filterPath.replace(/\\/g,"/")))}else this.updateTree(e)},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t=0,i=Object.keys(e.newProp);t<i.length;t++)switch(i[t]){case"allowDragAndDrop":this.addDragDrop();break;case"navigationPaneSettings":De(this.parent,Ki,"/")}},e.prototype.onDownLoadInit=function(){this.doDownload()},e.prototype.onSelectionChanged=function(e){this.treeObj.selectedNodes=[e.selectedNode]},e.prototype.onClearPathInit=function(e){this.removeChildNodes(e.selectedNode)},e.prototype.onDragEnd=function(e){var t=[];t=this.parent.isPasteError||this.parent.isSearchDrag?this.getMoveNames(e.files,this.parent.isSearchDrag,this.parent.dragPath):this.moveNames,this.treeObj.removeNodes(t)},e.prototype.getMoveNames=function(e,i,n){for(var a=[],r=0;r<e.length;r++)if(!e[r].isFile&&!this.parent.hasId){var o=e[r].previousName;if(i){var l=(n+=e[r].previousName).lastIndexOf("/");o=n.substring(l+1),n=n.substring(0,l+1)}for(var h=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",o,!1)),d=0;d<h.length;d++){var p=t.getValue("filterPath",h[d]);if((p=p.replace(/\\/g,"/"))===n){a.push(t.getValue(this.treeObj.fields.id,h[d]));break}}}return a},e.prototype.onCutEnd=function(e){var t=[];this.parent.isPasteError||this.parent.isSearchCut?this.moveNames=this.getMoveNames(e.files,this.parent.isSearchCut,this.parent.targetPath):t=this.moveNames,this.treeObj.removeNodes(t)},e.prototype.selectResultNode=function(e){if(this.parent.hasId)this.treeObj.selectedNodes=[t.getValue("_fm_id",e)],this.treeObj.dataBind();else{var i=t.getValue("filterPath",e),n=t.getValue("name",e),a=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",n,!1));if(a.length>0){var r=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",i,!1));if(r.length>0){var o=t.getValue(this.treeObj.fields.id,r[0]);this.treeObj.selectedNodes=[o],this.treeObj.dataBind()}}}},e.prototype.onDropPath=function(e){this.onpasteEnd(e),this.selectResultNode(this.parent.dropData),this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteEnd=function(e){var i=[];if(this.parent.hasId)i=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where("id","equal",t.getValue("id",e.cwd),!1));else{var n=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",t.getValue("name",e.cwd),!1));n.length>0&&(i=new s.DataManager(n).executeLocal((new s.Query).where("filterPath","equal",t.getValue("filterPath",e.cwd),!1)))}if(i.length>0){var a=t.getValue(this.treeObj.fields.id,i[0]),r=-1===this.treeObj.expandedNodes.indexOf(a);this.removeChildNodes(a),this.addChild(e.files,a,r)}this.parent.expandedId=null,this.onPathChanged(e),this.parent.isDragDrop&&this.checkDropPath(e)},e.prototype.checkDropPath=function(e){if(this.parent.hasId)return this.parent.isDropEnd=!this.parent.isPasteError,void $(this.parent);-1===this.parent.dropPath.indexOf(J(this.parent,e))?(this.parent.isDropEnd=!1,$(this.parent)):this.parent.isDropEnd=!this.parent.isPasteError},e.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&this.updateItemData(),this.moveNames=[];for(var e=this.parent.isDragDrop?this.parent.dragData:this.parent.actionRecords,i=0;i<e.length;i++)!1===t.getValue("isFile",e[i])&&this.moveNames.push(t.getValue("_fm_id",e[i]))},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.activeElements=[this.activeNode])},e.prototype.addEventListener=function(){this.parent.on(qi,this.onPropertyChanged,this),this.parent.on("download-init",this.onDownLoadInit,this),this.parent.on(Wi,this.onInitialEnd,this),this.parent.on(Ki,this.onFinalizeEnd,this),this.parent.on(Zi,this.onPathChanged,this),this.parent.on(In,this.onpasteEnd,this),this.parent.on(Dn,this.onCutEnd,this),this.parent.on(wn,this.onpasteInit,this),this.parent.on("node-expand",this.onNodeExpanded,this),this.parent.on(Gi,this.onCreateEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(Qi,this.onDeleteInit,this),this.parent.on(Ji,this.onDeleteEnd,this),this.parent.on(Xi,this.onRefreshEnd,this),this.parent.on("update-tree-selection",this.onSelectionChanged,this),this.parent.on(on,this.onOpenInit,this),this.parent.on(ln,this.onOpenEnd,this),this.parent.on(en,this.destroy,this),this.parent.on(gn,this.onRenameInit,this),this.parent.on(bn,this.onRenameEnd,this),this.parent.on(mn,this.onRenameEndParent,this),this.parent.on(dn,this.onClearPathInit,this),this.parent.on(On,this.oncutCopyInit,this),this.parent.on(xn,this.onDropInit,this),this.parent.on(fn,this.onMenuItemData,this),this.parent.on(Pn,this.onDragEnd,this),this.parent.on(En,this.onDragging,this),this.parent.on(Nn,this.onDropPath,this),this.parent.on(un,this.onDetailsInit,this),this.parent.on(Yi,this.onPathDrag,this)},e.prototype.removeEventListener=function(){this.parent.off(Wi,this.onInitialEnd),this.parent.off("download-init",this.onDownLoadInit),this.parent.off(Ki,this.onFinalizeEnd),this.parent.off("selected-data",this.onSelectedData),this.parent.off(qi,this.onPropertyChanged),this.parent.off(Zi,this.onPathChanged),this.parent.off(In,this.onpasteEnd),this.parent.off(Dn,this.onCutEnd),this.parent.off(wn,this.onpasteInit),this.parent.off("update-tree-selection",this.onSelectionChanged),this.parent.off("node-expand",this.onNodeExpanded),this.parent.off(Gi,this.onCreateEnd),this.parent.off(Xi,this.onRefreshEnd),this.parent.off(on,this.onOpenInit),this.parent.off(ln,this.onOpenEnd),this.parent.off(en,this.destroy),this.parent.off(gn,this.onRenameInit),this.parent.off(bn,this.onRenameEnd),this.parent.off(mn,this.onRenameEndParent),this.parent.off(dn,this.onClearPathInit),this.parent.off(Qi,this.onDeleteInit),this.parent.off(Ji,this.onDeleteEnd),this.parent.off(On,this.oncutCopyInit),this.parent.off(xn,this.onDropInit),this.parent.off(Pn,this.onDragEnd),this.parent.off(En,this.onDragging),this.parent.off(Nn,this.onDropPath),this.parent.off(un,this.onDetailsInit),this.parent.off(fn,this.onMenuItemData),this.parent.off(Yi,this.onPathDrag)},e.prototype.onDetailsInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.getTreeData(this.treeObj.selectedNodes[0]);this.parent.itemData=e}},e.prototype.onMenuItemData=function(e){if(this.parent.activeModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.itemData=this.getTreeData(i.getAttribute("data-uid"))}},e.prototype.onDragging=function(e){var i=t.closest(e.target,"li");if(i.classList.contains("e-node-collapsed")){this.isDrag=!0;var n=parseInt(i.getAttribute("aria-level"),10);this.treeObj.expandAll([i.getAttribute("data-uid")],n+1),this.isDrag=!1}},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.closest(e.target,"li");this.parent.dropData=this.getTreeData(i)[0],this.parent.dropPath=this.getDropPath(i,t.getValue("name",this.parent.dropData))}},e.prototype.getModuleName=function(){return"navigationpane"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.treeObj&&(this.unWireEvents(),this.treeObj.destroy()))},e.prototype.wireEvents=function(){this.keyboardModule=new t.KeyboardEvents(this.treeObj.element,{keyAction:this.keyDown.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},e.prototype.unWireEvents=function(){this.keyboardModule.destroy()},e.prototype.keyDown=function(e){switch(e.action){case"altEnter":this.parent.notify(un,{}),Ne(this.parent,[],this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":this.updateItemData(),be(this.parent.itemData[0])?(this.removeNodes=[],ze(this.parent,"Delete")):fe(this.parent,this.parent.itemData[0],kn);break;case"ctrlC":P(this.parent);break;case"ctrlV":this.parent.folderPath="",K(this.parent);break;case"ctrlX":N(this.parent);break;case"shiftF10":if(this.updateItemData(),!Oe(this.parent.itemData[0]))return void fe(this.parent,this.parent.itemData[0],An);0!==this.parent.selectedItems.length&&this.doDownload();break;case"f2":if(0===this.parent.selectedItems.length){var t=this.getTreeData(this.treeObj.selectedNodes[0])[0];be(t)?(this.updateRenameData(),ze(this.parent,"Rename")):fe(this.parent,t,kn)}}},e.prototype.getTreeData=function(e){for(var i=this.treeObj.getTreeData(e),n=0;n<i.length;n++)t.isNullOrUndefined(t.getValue("hasChild",i[n]))&&t.setValue("hasChild",!1,i[n]);return i},e.prototype.updateRenameData=function(){this.updateItemData(),this.parent.currentItemText=t.getValue("name",this.parent.itemData[0])},e.prototype.updateItemData=function(){var e=this.getTreeData(this.treeObj.selectedNodes[0])[0];this.parent.itemData=[e],this.parent.isFile=!1},e.prototype.updateActionData=function(){this.updateItemData();var e=Q(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},e.prototype.doDownload=function(){var e=Q(this.parent.path),i=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":t.getValue("name",this.parent.itemData[0]);He(this.parent,e,[i])},e}(),Kn=function(){function e(e){this.isInteracted=!0,this.interaction=!0,this.isPasteOperation=!1,this.isColumnRefresh=!1,this.dragObj=null,this.startIndex=null,this.firstItemIndex=null,this.isSelectionUpdate=!1,this.currentSelectedItem=[],this.count=0,this.isRendered=!0,this.isLoaded=!1,this.isNameWidth=!1,this.pasteOperation=!1,this.uploadOperation=!1,d.Grid.Inject(d.Resize,d.ContextMenu,d.Sort,d.VirtualScroll),this.parent=e,this.element=t.select("#"+this.parent.element.id+Xt,this.parent.element),this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",tab:"tab",moveDown:"downarrow",ctrlEnd:"ctrl+end",ctrlHome:"ctrl+home",ctrlDown:"ctrl+downarrow",ctrlLeft:"ctrl+leftarrow",ctrlRight:"ctrl+rightarrow",shiftEnd:"shift+end",shiftHome:"shift+home",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",ctrlUp:"ctrl+uparrow",csEnd:"ctrl+shift+end",csHome:"ctrl+shift+home",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",space:"space",ctrlSpace:"ctrl+space",shiftSpace:"shift+space",csSpace:"ctrl+shift+space",end:"end",home:"home",moveUp:"uparrow",del:"delete",ctrlX:"ctrl+x",ctrlC:"ctrl+c",ctrlV:"ctrl+v",ctrlShiftN:"ctrl+shift+n",shiftdel:"shift+delete",ctrlD:"ctrl+d",f2:"f2",ctrlA:"ctrl+a",enter:"enter"}}return e.prototype.render=function(e){if(n.showSpinner(this.parent.element),"Details"===this.parent.view){t.removeClass([this.parent.element],"e-fe-m-select");var i=L(this.parent,e.files);this.checkNameWidth();var s=this.getColumns(),a=void 0;this.parent.isMobile?a=[]:"None"!==this.parent.sortOrder&&(a=[{direction:this.parent.sortOrder,field:this.parent.sortBy}]),this.gridObj=new d.Grid({dataSource:i,allowSorting:!0,rowSelecting:this.onSelection.bind(this,"select"),rowDeselecting:this.onSelection.bind(this,"unselect"),rowSelected:this.onSelected.bind(this),rowDeselected:this.onDeSelection.bind(this),allowResizing:this.parent.detailsViewSettings.columnResizing,selectionSettings:{type:this.parent.allowMultiSelection?"Multiple":"Single",checkboxMode:"ResetOnRowClick"},enableRtl:this.parent.enableRtl,pageSettings:{pageSize:20},sortSettings:{allowUnsort:!1,columns:a},columns:s,recordDoubleClick:this.DblClickEvents.bind(this),beforeDataBound:this.onBeforeDataBound.bind(this),dataBound:this.onDataBound.bind(this),rowDataBound:this.onRowDataBound.bind(this),actionBegin:this.onActionBegin.bind(this),headerCellInfo:this.onHeaderCellInfo.bind(this),width:"100%",beforeCopy:function(e){e.cancel=!0},load:function(e){this.focusModule.destroy()},locale:this.parent.locale}),this.gridObj.isStringTemplate=!0,this.gridObj.appendTo("#"+this.parent.element.id+Xt),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e}},e.prototype.checkNameWidth=function(){var e=this.parent.detailsViewSettings.columns;this.isNameWidth=!1;for(var i=0;i<e.length;i++)if("name"===e[i].field)return void(this.isNameWidth=!t.isNullOrUndefined(e[i].width))},e.prototype.adjustWidth=function(e,t){if(!this.isNameWidth||"name"!==t)for(var i=0;i<e.length;i++)if(e[i].field===t){var n=void 0;n=""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===t?"120px":"180px":"auto":this.element.clientWidth<=500?"120px":"auto",e[i].width=n}},e.prototype.getColumns=function(){var e;if(this.parent.isMobile)e=[{field:"name",headerText:V(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:'<div class="e-fe-text">${name}</div><div class="e-fe-date">${_fm_modified}</div><span class="e-fe-size">${size}</span>'}];else{e=JSON.parse(JSON.stringify(this.parent.detailsViewSettings.columns)),this.adjustWidth(e,"name");for(var t=0,i=e.length;t<i;t++)e[t].headerText=V(this.parent,e[t].headerText)}var n=this.parent.isMobile||this.parent.isBigger?"54":"46",s={field:"type",width:n,minWidth:n,template:'<span class="e-fe-icon ${_fm_iconClass}"></span>',allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:'<span class="e-fe-icon e-fe-folder"></span>'};if(e.unshift(s),this.parent.allowMultiSelection){var a=this.parent.isBigger?"36":"26",r={type:"checkbox",width:a,minWidth:a,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1};this.parent.isMobile?e.push(r):e.unshift(r)}for(var t=0,i=e.length;t<i;t++)e[t].disableHtmlEncode=!this.parent.enableHtmlSanitizer;return e},e.prototype.adjustHeight=function(){if(this.gridObj){var e=t.select("#"+this.parent.element.id+ii,this.parent.element),i=t.select("#"+this.parent.element.id+ni,this.parent.element),n=t.select("."+Mi,this.parent.element),s=e.offsetHeight-i.offsetHeight-n.offsetHeight;this.gridObj.height=s,this.gridObj.dataBind()}},e.prototype.renderCheckBox=function(){this.gridObj.columns=this.getColumns(),this.isColumnRefresh=!0,this.gridObj.refreshColumns()},e.prototype.onRowDataBound=function(e){var i=t.select(".e-fe-grid-name",e.row);if(!i)for(var n=this.parent.detailsViewSettings.columns,s=0;s<n.length;s++)if("name"===n[s].field){i=e.row.children[this.parent.allowMultiSelection?s+2:s+1];break}if(i&&i.setAttribute("title",t.getValue("name",e.data)),this.parent.isLayoutChange&&this.parent.isCut&&"move"===this.parent.fileAction&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length&&-1!==this.parent.selectedNodes.indexOf(t.getValue("name",e.data))&&v(e.row),!this.parent.showFileExtension&&t.getValue("isFile",e.data)){var a=e.row.querySelector(".e-fe-text");if(a){var r=t.getValue("name",e.data),o=t.getValue("type",e.data);a.innerHTML=r.substr(0,r.length-o.length)}}if(void 0!==t.getValue("size",e.data)&&e.row.querySelector(".e-fe-size")){var l=e.row.querySelector(".e-fe-size"),h=void 0;if(t.getValue("isFile",e.data)){var d=t.getValue("size",e.data);h=(c=new t.Internationalization(this.parent.locale)).formatNumber(d/1024,{format:"n"})+" "+V(this.parent,"KB")}else h="";l.innerHTML=h}if(this.parent.isMobile&&void 0!==t.getValue("_fm_modified",e.data)&&e.row.querySelector(".e-fe-date")){for(var p=e.row.querySelector(".e-fe-date"),c=new t.Internationalization(this.parent.locale),n=this.parent.detailsViewSettings.columns,u=void 0,s=0;s<n.length;s++)if("dateModified"===n[s].field){u=n[s].format;break}var f=c.formatDate(new Date(t.getValue("_fm_modified",e.data)),u);p.innerHTML=f}var g=e.row.querySelector("."+yi);g&&g.classList.add("e-small"),be(e.data)||(e.row.className+=" "+ge(e.data));var m={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",m)},e.prototype.onActionBegin=function(e){if("sorting"===e.requestType){if(this.parent.setProperties({sortOrder:e.direction},!0),this.parent.setProperties({sortBy:e.columnName},!0),0!==this.parent.selectedItems.length){this.sortItem=!0;var i=this.gridObj.getSelectedRowIndexes(),n=i.length;for(this.sortSelectedNodes=[];n>0;){var s=this.gridObj.getRowsObject()[i[n-1]].data;this.sortSelectedNodes.push(t.getValue(this.parent.hasId?"id":"name",s)),n--}}this.parent.notify(cn,{})}},e.prototype.onHeaderCellInfo=function(e){var t=e.node.querySelector("."+yi);t&&t.classList.add("e-small")},e.prototype.onBeforeDataBound=function(e){n.showSpinner(this.parent.element);var t=L(this.parent,this.gridObj.dataSource);e.result=t},e.prototype.onDataBound=function(){if(this.createDragObj(),0!==this.parent.selectedItems.length&&this.selectRecords(this.parent.selectedItems),!0===this.isPasteOperation&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.parent.pasteNodes),this.isPasteOperation=!1)),this.parent.createdItem&&(this.selectRecords([t.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null),this.parent.layoutSelectedItems.length&&this.selectRecords(this.parent.layoutSelectedItems),this.parent.renamedItem&&(this.addSelection(this.parent.renamedItem),this.parent.renamedItem=null),!0===this.sortItem&&(this.selectRecords(this.sortSelectedNodes),this.sortItem=!1),this.isSelectionUpdate&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.currentSelectedItem),this.isSelectionUpdate=!1)),!0===this.uploadOperation&&(this.count++,this.selectRecords(this.parent.uploadItem),this.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[])),this.gridObj.currentViewData.length*this.gridObj.getRowHeight()<this.gridObj.height)(e=this.gridObj.getHeaderContent()).style.paddingRight="",e.style.paddingLeft="",t.select(".e-headercontent",e).style.borderRightWidth="0",(i=this.gridObj.getContent().querySelector(".e-content")).style.overflowY="",i.classList.add("e-scrollShow");else{var e=this.gridObj.getHeaderContent();this.parent.enableRtl?e.style.paddingLeft="16px":e.style.paddingRight="16px";var i=this.gridObj.getContent().querySelector(".e-content");i.classList.remove("e-scrollShow")}this.isRendered=!0,this.parent.isLayoutChange=!1,n.hideSpinner(this.parent.element),this.checkEmptyDiv(this.emptyArgs),this.isInteracted=!!this.isLoaded||this.isInteracted,this.isLoaded=!1},e.prototype.selectRecords=function(e){for(var i=this.gridObj.getCurrentViewRecords(),n=[],s=0,a=i.length;s<a;s++){var r=this.parent.hasId?t.getValue("id",i[s]):k(this.parent,i[s]);-1!==e.indexOf(r)&&n.push(s)}0!==n.length&&(this.gridObj.selectRows(n),this.addFocus(this.gridObj.selectedRowIndex))},e.prototype.addSelection=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[];if(this.parent.hasId)n=new s.DataManager(i).executeLocal((new s.Query).where("id","equal",this.parent.renamedId,!1));else{var a=new s.DataManager(i).executeLocal((new s.Query).where("name","equal",t.getValue("name",e),!1));a.length>0&&(n=new s.DataManager(a).executeLocal((new s.Query).where("filterPath","equal",this.parent.filterPath,!1)))}if(n.length>0){var r=i.indexOf(n[0]);this.gridObj.selectRows([r])}},e.prototype.onSortColumn=function(){"None"!==this.parent.sortOrder?this.gridObj.sortModule.sortColumn(this.parent.sortBy,this.parent.sortOrder):this.gridObj.dataSource=L(this.parent,this.gridObj.dataSource)},e.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var i=0,n=Object.keys(e.newProp);i<n.length;i++)switch(n[i]){case"allowDragAndDrop":this.createDragObj();break;case"height":this.adjustHeight();break;case"detailsViewSettings":if(!t.isNullOrUndefined(this.gridObj)){this.checkNameWidth();var s=this.getColumns();this.gridObj.columns=s,this.gridObj.allowResizing=this.parent.detailsViewSettings.columnResizing,this.gridObj.dataBind(),this.gridObj.refreshColumns()}break;case"selectedItems":if(this.interaction=!1,0!==this.parent.selectedItems.length){if(!this.parent.allowMultiSelection){var a=this.parent.selectedItems.slice(this.parent.selectedItems.length-1);this.parent.setProperties({selectedItems:a},!0)}this.selectRecords(this.parent.selectedItems),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)}else t.isNullOrUndefined(this.gridObj)||this.gridObj.clearSelection();break;case"showFileExtension":case"showHiddenItems":De(this.parent,Zi,this.parent.path);break;case"allowMultiSelection":t.isNullOrUndefined(this.gridObj)||(this.currentSelectedItem=this.parent.selectedItems,this.gridObj.selectionSettings.type=e.newProp.allowMultiSelection?"Multiple":"Single",this.isSelectionUpdate=!0,this.renderCheckBox());break;case"view":D(this.parent,"Details");break;case"width":this.onDetailsResize()}},e.prototype.onPathChanged=function(e){this.parent.isCut=!1,""===this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.gridObj&&(this.parent.searchedItems=[],this.parent.isFiltered?this.updatePathColumn():this.removePathColumn(!1)),O(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,n.showSpinner(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=L(this.parent,e.files)),this.emptyArgs=e},e.prototype.updatePathColumn=function(){var e=this.gridObj.columns.length,t=JSON.parse(JSON.stringify(this.gridObj.columns));if(t[e-1].field&&"filterPath"!==t[e-1].field&&!this.parent.isMobile){var i={field:"filterPath",headerText:V(this.parent,"Path"),minWidth:180,width:"auto"};this.gridObj.columns.push(i),this.adjustWidth(this.gridObj.columns,"filterPath"),this.adjustWidth(this.gridObj.columns,"name"),this.isColumnRefresh=!0,this.gridObj.refreshColumns()}},e.prototype.checkEmptyDiv=function(e){var i=L(this.parent,e.files);if(0!==i.length||t.isNullOrUndefined(this.element.querySelector("."+Ti))){if(0!==i.length&&this.element.querySelector("."+Oi))if(this.element.querySelector("."+Ti).querySelector("."+Oi)){var n=this.element.querySelector("."+Ti).querySelector("."+Oi);this.element.querySelector("."+Ti).removeChild(n)}else this.element.removeChild(this.element.querySelector("."+Oi))}else A(this.parent,this.element,e)},e.prototype.onOpenInit=function(){if("detailsview"===this.parent.activeModule){var e=this.gridObj.getSelectedRecords()[0];this.openContent(e)}},e.prototype.DblClickEvents=function(e){this.gridObj.selectRows([e.rowIndex]);var t;e.rowData&&(t=JSON.parse(JSON.stringify(e.rowData)),this.openContent(t))},e.prototype.openContent=function(e){var i=this;if(!me(e))return void fe(this.parent,e,Mn);var n={cancel:!1,fileDetails:e,module:"DetailsView"};this.parent.trigger("fileOpen",n,function(n){if(!n.cancel){var s=t.getValue("name",e);if(t.getValue("isFile",e)){if(E(e)===xi){var a=R(i.parent,e);yt(i.parent,s,a)}}else{if(""!==i.parent.breadcrumbbarModule.searchObj.element.value||i.parent.isFiltered)W(i.parent,e);else{var r=t.getValue("id",e),o=i.parent.path+(t.isNullOrUndefined(r)?s:r)+"/";i.parent.setProperties({path:o},!0),i.parent.pathNames.push(s),i.parent.pathId.push(t.getValue("_fm_id",e)),i.parent.itemData=[e],j(i.parent)}i.parent.isFiltered=!1}i.element.focus()}})},e.prototype.onLayoutChange=function(e){"Details"===this.parent.view&&(this.gridObj?this.isLoaded=!0:this.render(e),this.parent.isFiltered&&(this.updatePathColumn(),this.parent.setProperties({selectedItems:[]},!0)),this.gridObj.dataSource=L(this.parent,e.files),this.parent.notify("hide-layout",{}),this.gridObj.element.classList.remove(Bi),this.isInteracted=!1,this.gridObj.clearSelection(),""!==this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.onSearchFiles(e),this.adjustHeight(),this.gridObj.sortSettings.columns.length>0&&this.gridObj.sortSettings.columns[0].field!==this.parent.sortBy&&"None"!==this.parent.sortOrder&&this.gridObj.sortColumn(this.parent.sortBy,this.parent.sortOrder))},e.prototype.onSearchFiles=function(e){"Details"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(hn,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},e.prototype.removePathColumn=function(e){var t=this.gridObj.columns.length,i=JSON.parse(JSON.stringify(this.gridObj.columns));i[t-1].field&&"filterPath"===i[t-1].field&&("filterPath"===this.gridObj.sortSettings.columns[0].field&&("None"!==this.parent.sortOrder?this.gridObj.sortColumn("name",this.parent.sortOrder):this.gridObj.dataSource=L(this.parent,this.gridObj.dataSource),this.parent.notify(cn,{})),this.gridObj.columns.pop(),e||(this.isColumnRefresh=!0,this.gridObj.refreshColumns()))},e.prototype.onFinalizeEnd=function(e){"Details"===this.parent.view&&(this.gridObj?this.onPathChanged(e):this.render(e))},e.prototype.onCreateEnd=function(e){"Details"===this.parent.view&&this.onPathChanged(e)},e.prototype.onRenameInit=function(){"detailsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},e.prototype.onSelectedData=function(){"detailsview"===this.parent.activeModule&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.onDeleteInit=function(){"detailsview"===this.parent.activeModule&&Pe(this.parent,this.parent.selectedItems,this.parent.path,"delete")},e.prototype.onDeleteEnd=function(e){"Details"===this.parent.view&&(this.onPathChanged(e),this.parent.setProperties({selectedItems:[]},!0))},e.prototype.onRefreshEnd=function(e){"Details"===this.parent.view&&(this.isInteracted=!1,this.removePathColumn(!1),this.gridObj.dataSource=L(this.parent,e.files),this.emptyArgs=e)},e.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(Bi)},e.prototype.onSelectAllInit=function(){"Details"===this.parent.view&&(this.isInteracted=!1,this.parent.allowMultiSelection?this.gridObj.selectionModule.selectRowsByRange(0,this.gridObj.getRows().length):this.gridObj.selectRow(this.gridObj.getRows().length-1),this.isInteracted=!0,this.interaction=!0)},e.prototype.onClearAllInit=function(){"Details"===this.parent.view&&(this.removeSelection(),this.interaction=!0)},e.prototype.onSelectionChanged=function(){t.removeClass([this.element],"e-headercheck"),this.parent.selectedItems.length>0&&t.addClass([this.element],"e-headercheck")},e.prototype.onLayoutRefresh=function(){"Details"===this.parent.view&&this.adjustHeight()},e.prototype.onBeforeRequest=function(){this.isRendered=!1},e.prototype.onAfterRequest=function(){this.isRendered=!0},e.prototype.onUpdateSelectionData=function(){"Details"===this.parent.view&&(this.parent.itemData=this.gridObj.getSelectedRecords())},e.prototype.addEventListener=function(){this.parent.on(Ki,this.onFinalizeEnd,this),this.parent.on(en,this.destroy,this),this.parent.on(pn,this.onLayoutChange,this),this.parent.on(Zi,this.onPathChanged,this),this.parent.on(Gi,this.onCreateEnd,this),this.parent.on(xn,this.onDropInit,this),this.parent.on(un,this.onDetailsInit,this),this.parent.on(Xi,this.onRefreshEnd,this),this.parent.on(rn,this.onSearchFiles,this),this.parent.on(Rn,this.onMethodCall,this),this.parent.on(an,this.onActionFailure,this),this.parent.on(qi,this.onPropertyChanged,this),this.parent.on(Qi,this.onDeleteInit,this),this.parent.on(Ji,this.onDeleteEnd,this),this.parent.on("selected-data",this.onSelectedData,this),this.parent.on(gn,this.onRenameInit,this),this.parent.on(bn,this.onPathChanged,this),this.parent.on(on,this.onOpenInit,this),this.parent.on(Sn,this.onSortColumn,this),this.parent.on(ln,this.onPathChanged,this),this.parent.on("filter-end",this.onPathChanged,this),this.parent.on(wn,this.onPasteInit,this),this.parent.on("hide-layout",this.onHideLayout,this),this.parent.on("select-all-init",this.onSelectAllInit,this),this.parent.on("clear-all-init",this.onClearAllInit,this),this.parent.on(Cn,this.onPathColumn,this),this.parent.on(hn,this.onSelectionChanged,this),this.parent.on(tn,this.onBeforeRequest,this),this.parent.on(sn,this.onAfterRequest,this),this.parent.on(In,this.onpasteEnd,this),this.parent.on(On,this.oncutCopyInit,this),this.parent.on(fn,this.onMenuItemData,this),this.parent.on($i,this.onDetailsResizeHandler,this),this.parent.on("splitter-resize",this.onDetailsResize,this),this.parent.on("layout-refresh",this.onLayoutRefresh,this),this.parent.on(Nn,this.onDropPath,this),this.parent.on("update-selection-data",this.onUpdateSelectionData,this)},e.prototype.removeEventListener=function(){this.parent.off(Ki,this.onFinalizeEnd),this.parent.off(en,this.destroy),this.parent.off(pn,this.onLayoutChange),this.parent.off(Zi,this.onPathChanged),this.parent.off(wn,this.onPasteInit),this.parent.off(Gi,this.onCreateEnd),this.parent.off(Xi,this.onRefreshEnd),this.parent.off(rn,this.onSearchFiles),this.parent.off(Rn,this.onMethodCall),this.parent.off(an,this.onActionFailure),this.parent.off(qi,this.onPropertyChanged),this.parent.off(gn,this.onRenameInit),this.parent.off(bn,this.onPathChanged),this.parent.off("filter-end",this.onPathChanged),this.parent.off(on,this.onOpenInit),this.parent.off(Sn,this.onSortColumn),this.parent.off(ln,this.onPathChanged),this.parent.off("hide-layout",this.onHideLayout),this.parent.off("select-all-init",this.onSelectAllInit),this.parent.off("clear-all-init",this.onClearAllInit),this.parent.off(Qi,this.onDeleteInit),this.parent.off(Ji,this.onDeleteEnd),this.parent.off(Cn,this.onPathColumn),this.parent.off(hn,this.onSelectionChanged),this.parent.off(tn,this.onBeforeRequest),this.parent.off(sn,this.onAfterRequest),this.parent.off(In,this.onpasteEnd),this.parent.off(On,this.oncutCopyInit),this.parent.off(xn,this.onDropInit),this.parent.off("selected-data",this.onSelectedData),this.parent.off(un,this.onDetailsInit),this.parent.off(fn,this.onMenuItemData),this.parent.off($i,this.onDetailsResizeHandler),this.parent.off("splitter-resize",this.onDetailsResize),this.parent.off("layout-refresh",this.onLayoutRefresh),this.parent.off(Nn,this.onDropPath),this.parent.off("update-selection-data",this.onUpdateSelectionData)},e.prototype.onActionFailure=function(){this.interaction=!0},e.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=[this.gridObj.getRowInfo(e.target).rowData])},e.prototype.onPasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""!==this.parent.folderPath?this.gridObj.getSelectedRecords():[x(this.parent)])},e.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.parent.itemData=this.gridObj.getSelectedRecords():this.parent.itemData=[t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},e.prototype.dragHelper=function(e){var t=e.sender.target.closest("tr.e-row");if(!t)return null;var i=t.getElementsByClassName("e-fe-text")[0].innerText;t&&!t.querySelector(".e-active")&&this.selectRecords([i]),w(this.parent,t),this.parent.activeElements=[],this.parent.dragData=[],this.parent.dragData=this.gridObj.getSelectedRecords();var n;return 0==this.parent.dragData.length&&t&&(n=this.gridObj.getRowInfo(t)),n&&this.parent.dragData.push(n.rowData),this.parent.dragPath=this.parent.path,this.parent.activeElements=this.gridObj.getSelectedRows(),ee(this.parent),this.parent.virtualDragElement},e.prototype.onDetailsResize=function(){if("Details"===this.parent.view&&!this.parent.isMobile&&!t.isNullOrUndefined(this.gridObj))for(var e=this.gridObj.getHeaderContent().querySelector(".e-headercontent").firstChild.childNodes[0],i=this.gridObj.getContent().querySelector(".e-content .e-table").children[0],n=this.gridObj.getColumns(),s=0;s<n.length;s++)(!this.isNameWidth&&"name"===n[s].field||"filterPath"===n[s].field)&&(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===n[s].field?(e.children[s].setAttribute("style","width: 120px"),i.children[s].setAttribute("style","width: 120px")):(e.children[s].setAttribute("style","width: 180px"),i.children[s].setAttribute("style","width: 180px")):this.element.clientWidth>680&&(e.children[s].setAttribute("style","width: auto"),i.children[s].setAttribute("style","width: auto")):this.element.clientWidth<=500?(e.children[s].setAttribute("style","width: 120px"),i.children[s].setAttribute("style","width: 120px")):this.element.clientWidth>500&&(e.children[s].setAttribute("style","width: auto"),i.children[s].setAttribute("style","width: auto")))},e.prototype.onDetailsResizeHandler=function(){this.onDetailsResize(),"Details"!==this.parent.view||this.parent.isMobile||t.isNullOrUndefined(this.gridObj)||this.adjustHeight()},e.prototype.createDragObj=function(){var e=this;!this.parent.isMobile&&this.gridObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.gridObj.element,{cursorAt:this.parent.dragCursorPosition,distance:5,enableTailMode:!0,dragArea:this.parent.element,dragTarget:"."+vi,drag:re.bind(this,this.parent),dragStart:function(t){ie(e.parent,t,e.dragObj)},dragStop:te.bind(this,this.parent),enableAutoScroll:!0,helper:this.dragHelper.bind(this)})):!this.parent.allowDragAndDrop&&this.dragObj&&this.dragObj.destroy())},e.prototype.onDropInit=function(e){if(this.parent.targetModule===this.getModuleName()){var i=t.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent);if(e.target.closest("tr")){var n=null;n=this.gridObj.getRowInfo(e.target).rowData,this.parent.dropPath=n.isFile?this.parent.path:M(this.parent,n,this.parent.path),this.parent.dropData=n.isFile?i:n}else this.parent.dropPath=this.parent.path,this.parent.dropData=i}},e.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.gridObj.getSelectedRecords(),this.parent.activeElements=this.gridObj.getSelectedRows())},e.prototype.onpasteEnd=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==J(this.parent,e)||this.onPathChanged(e))},e.prototype.onDropPath=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},e.prototype.getModuleName=function(){return"detailsview"},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.gridObj&&(this.unWireEvents(),this.gridObj.destroy()))},e.prototype.updateType=function(e){var i=t.select("."+ji,e);this.parent.isFile=!!t.isNullOrUndefined(i)},e.prototype.onSelection=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction,cancel:!1,target:t.target};this.parent.trigger("fileSelection",i),t.cancel=i.cancel},e.prototype.onSelected=function(e){this.parent.activeModule="detailsview",this.parent.isLayoutChange&&!this.parent.isFiltered||this.selectedRecords(),this.parent.notify(hn,{}),1===this.gridObj.getSelectedRowIndexes().length&&(this.firstItemIndex=this.gridObj.selectedRowIndex),this.gridObj.element.setAttribute("tabindex","-1"),this.triggerSelect("select",e);var i=this.gridObj.getRowByIndex(this.gridObj.selectedRowIndex);if(this.updateType(i),!t.isNullOrUndefined(i)&&!t.isNullOrUndefined(i.querySelector(".e-checkselect"))){if(1!==this.gridObj.getSelectedRowIndexes().length){var n=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2];this.gridObj.getRowByIndex(n).querySelector(".e-checkselect").setAttribute("tabindex","-1")}i.querySelector(".e-rowcell.e-fe-checkbox").removeAttribute("tabindex")}t.isNullOrUndefined(this.gridObj)||t.isNullOrUndefined(this.gridObj.element.querySelector(".e-checkselectall"))||this.gridObj.element.querySelector(".e-checkselectall").setAttribute("tabindex","-1");var s=this.gridObj.getSelectedRowIndexes();if(!this.parent.allowMultiSelection)for(var a=0;a<s.length;a++)s[a]===this.gridObj.selectedRowIndex?this.gridObj.getRowByIndex(s[a]).setAttribute("tabindex","0"):this.gridObj.getRowByIndex(s[a]).removeAttribute("tabindex");var r=s.length;if(r>0){var o=this.gridObj.getRowsObject()[s[r-1]].data;this.parent.currentItemText=t.getValue("name",o)}var l=t.getValue("rowIndexes",e),h=t.getValue("enableSelectMultiTouch",this.gridObj.selectionModule);this.parent.isDevice&&t.isNullOrUndefined(l)&&e.target&&!h&&!e.target.closest(".e-headercell")&&(this.parent.isFile=t.getValue("isFile",e.data),this.parent.isFile||this.openContent(e.data)),this.parent.visitedItem=e.row,!this.parent.allowMultiSelection||t.isNullOrUndefined(i)||t.isNullOrUndefined(i.querySelector(".e-checkselect"))||i.querySelector(".e-checkselect").focus(),this.addFocus(this.gridObj.selectedRowIndex),this.parent.isLayoutChange||(this.isInteracted=!0)},e.prototype.onPathColumn=function(){"Details"!==this.parent.view||t.isNullOrUndefined(this.gridObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||this.removePathColumn(!1)},e.prototype.selectedRecords=function(){this.parent.setProperties({selectedItems:[]},!0);for(var e=this.gridSelectNodes(),t=0;t<e.length;){var i=e[t],n=le(this.parent,i);this.parent.selectedItems.push(n),t++}this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)},e.prototype.onDeSelection=function(e){if(!this.parent.allowMultiSelection&&t.isNullOrUndefined(e.data))this.gridObj.getRowByIndex(e.rowIndex).removeAttribute("tabindex");else if(this.gridObj.getSelectedRowIndexes().length>1){var i=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2];this.gridObj.getRowByIndex(i).querySelector(".e-checkselect").removeAttribute("tabindex")}if(-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),!this.isInteracted)return void(this.isInteracted=!0);this.selectedRecords(),0===this.parent.selectedItems.length&&(t.setValue("enableSelectMultiTouch",!1,this.gridObj.selectionModule),t.removeClass([this.parent.element],"e-fe-m-select")),this.parent.notify(hn,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null},e.prototype.triggerSelect=function(e,t){var i={action:e,fileDetails:t.data,isInteracted:this.interaction};this.parent.trigger("fileSelect",i),this.interaction=!0},e.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new t.KeyboardEvents(this.gridObj.element,{keyAction:this.keyupHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new t.KeyboardEvents(this.element,{keyAction:this.keydownHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),t.EventHandler.add(this.gridObj.element,"blur",this.removeFocus,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),t.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus)},e.prototype.wireClickEvent=function(e){if(e){var i=this,n=this.gridObj.getContent();this.clickObj=new t.Touch(n,{tap:function(e){1===e.tapCount&&e.originalEvent.target.classList.contains("e-content")&&i.onClearAllInit()},tapHold:function(e){if(i.parent.isDevice){e.originalEvent.preventDefault(),i.parent.allowMultiSelection&&(t.setValue("enableSelectMultiTouch",i.parent.allowMultiSelection,i.gridObj.selectionModule),t.addClass([i.parent.element],"e-fe-m-select"));var n=e.originalEvent.target;if(n){var s=t.closest(n,"."+vi),a=i.gridObj.getRows().indexOf(s);i.gridObj.selectRow(a)}}}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.removeSelection=function(){t.removeClass([this.parent.element],"e-fe-m-select"),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(hn,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},e.prototype.removeFocus=function(){this.addFocus(null)},e.prototype.getFocusedItemIndex=function(){return t.isNullOrUndefined(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("aria-rowindex"),10)},e.prototype.keydownHandler=function(e){if(this.isRendered)switch(e.action){case"end":case"home":case"space":case"ctrlSpace":case"shiftSpace":case"csSpace":case"ctrlA":case"enter":case"altEnter":case"ctrlEnd":case"shiftEnd":case"csEnd":case"ctrlHome":case"shiftHome":case"csHome":case"ctrlDown":case"shiftDown":case"csDown":case"ctrlLeft":case"shiftLeft":case"csLeft":case"esc":case"del":case"shiftdel":case"ctrlC":case"ctrlV":case"ctrlX":case"f2":case"moveDown":case"moveUp":e.preventDefault()}},e.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var i,n,s,a=e.action,r=L(this.parent,this.gridObj.dataSource),o=r.length,l=(this.getFocusedItem(),this.getFocusedItemIndex()),h=this.gridObj.selectedRowIndex,d=this.gridObj.getSelectedRowIndexes();switch(a){case"altEnter":Ne(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"enter":if(-1===this.gridObj.selectedRowIndex)break;if(i=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data){var p=JSON.parse(JSON.stringify(i));this.openContent(p)}break;case"ctrlC":P(this.parent);break;case"ctrlV":this.parent.folderPath="",K(this.parent);break;case"ctrlX":N(this.parent);break;case"ctrlD":this.doDownload();break;case"f2":this.performRename();break;case"ctrlA":!t.isNullOrUndefined(r[0])&&this.parent.allowMultiSelection&&this.gridObj.selectionModule.selectRowsByRange(0,r.length-1);break;case"ctrlHome":case"tab":if(!t.isNullOrUndefined(r[0]))if(this.parent.allowMultiSelection||"ctrlHome"!==e.action){if(-1!==this.gridObj.selectedRowIndex&&"tab"===e.action)return;this.addFocus(0)}else this.gridObj.selectRow(0);break;case"ctrlEnd":t.isNullOrUndefined(r[0])||(this.parent.allowMultiSelection?this.addFocus(o-1):this.gridObj.selectRow(o-1));break;case"shiftHome":case"shiftEnd":case"csHome":case"csEnd":this.parent.allowMultiSelection?t.isNullOrUndefined(r[0])||(t.isNullOrUndefined(h)||-1===h?"csHome"===e.action||"shiftHome"===e.action?this.gridObj.selectRow(0):this.gridObj.selectionModule.selectRowsByRange(0,r.length-1):this.checkRowsKey(r,h,null,e)):this.gridObj.selectRow("shiftHome"===e.action||"csHome"===e.action?0:r.length-1);break;case"space":case"csSpace":case"shiftSpace":case"ctrlSpace":this.spaceSelection(d,l,h,e);break;case"csUp":case"csDown":case"shiftUp":case"shiftDown":this.shiftMoveMethod(r,h,l,d,e);break;case"ctrlUp":case"ctrlDown":this.parent.allowMultiSelection?this.ctrlMoveFunction(r,e,h):this.moveFunction(r,e,h);break;case"home":n=[t.getValue(this.parent.hasId?"id":"name",r[0])],this.parent.setProperties({selectedItems:n},!0),this.selectRecords(n);break;case"moveUp":case"moveDown":this.moveFunction(r,e,h);break;case"end":s=[t.getValue(this.parent.hasId?"id":"name",r[o-1])],this.parent.setProperties({selectedItems:s},!0),this.selectRecords(s)}}},e.prototype.gridSelectNodes=function(){return this.gridObj.getSelectedRecords()},e.prototype.doDownload=function(){if(0!==this.parent.selectedItems.length){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!Oe(e[t]))return void fe(this.parent,e[t],An);He(this.parent,this.parent.path,this.parent.selectedItems)}},e.prototype.performDelete=function(){if(this.parent.selectedItems&&this.parent.selectedItems.length>0){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!be(e[t]))return void fe(this.parent,e[t],kn);ze(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),de(this.parent))},e.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];he(this.parent,e)},e.prototype.shiftMoveMethod=function(e,t,i,n,s){this.parent.allowMultiSelection?-1!==t||"csUp"!==s.action&&"csDown"!==s.action?-1===t||i===t||("csUp"===s.action||"csDown"===s.action)&&this.isSelected(n,i)?this.shiftSelectedItem(t,n,e,s):this.shiftSelectFocusItem(t,i,n,s):this.ctrlMoveFunction(e,s,t):this.moveFunction(e,s,t)},e.prototype.moveFunction=function(e,i,n){!t.isNullOrUndefined(this.getFocusedItem())&&this.parent.allowMultiSelection?"moveDown"===i.action?this.gridObj.selectRow(this.getFocusedItemIndex()+1):this.gridObj.selectRow(this.getFocusedItemIndex()-1):t.isNullOrUndefined(n)||-1===n?t.isNullOrUndefined(e[0])||this.gridObj.selectRow(0):"moveDown"===i.action||"ctrlDown"===i.action||"shiftDown"===i.action||"csDown"===i.action?this.gridObj.selectRow(n+(n!==e.length-1?1:0)):this.gridObj.selectRow(n-(0!==n?1:0))},e.prototype.spaceSelection=function(e,i,n,s){if(this.isSelected(e,i)||-1===n||"shiftSpace"!==s.action&&"csSpace"!==s.action)if(t.isNullOrUndefined(this.getFocusedItem())||i===n)if(-1!==n&&"ctrlSpace"===s.action&&this.parent.allowMultiSelection){var a=n;e.pop(),this.gridObj.selectRows(e),this.addFocus(a)}else"shiftSpace"===s.action&&this.gridObj.selectRow(n);else e.push(this.getFocusedItemIndex()),this.gridObj.selectRows(e);else i<n?this.gridObj.selectionModule.selectRowsByRange(i,n):this.gridObj.selectionModule.selectRowsByRange(n,i)},e.prototype.ctrlMoveFunction=function(e,i,n){var s;if(t.isNullOrUndefined(this.getFocusedItem()))t.isNullOrUndefined(n)||-1===n?t.isNullOrUndefined(e[0])||(s=0):s="ctrlDown"===i.action||"csDown"===i.action?n+(n<e.length?1:0):n-(n<1?0:1);else{var a=this.getFocusedItemIndex();s="ctrlDown"===i.action||"csDown"===i.action?a+(a<e.length-1?1:0):a-(a<1?0:1)}this.addFocus(s)},e.prototype.checkRowsKey=function(e,i,n,s){"Uncheck"===this.gridObj.checkAllRows||"Intermediate"===this.gridObj.checkAllRows?"csHome"!==s.action&&"csEnd"!==s.action?(t.isNullOrUndefined(this.startIndex)&&this.firstItemIndex!==i&&(this.firstItemIndex=i),"shiftEnd"===s.action?this.gridObj.selectionModule.selectRowsByRange(this.firstItemIndex,e.length-1):this.gridObj.selectionModule.selectRowsByRange(0,this.firstItemIndex),this.startIndex=i):"csEnd"===s.action?this.gridObj.selectRows(this.InnerItems(t.isNullOrUndefined(i)?0:i,t.isNullOrUndefined(n)?e.length-1:n,s)):t.isNullOrUndefined(i)?this.gridObj.selectRow(0):this.gridObj.selectRows(this.InnerItems(t.isNullOrUndefined(n)?0:n,i,s)):this.gridObj.selectionModule.selectRow("shiftHome"===s.action||"csHome"===s.action?0:e.length-1)},e.prototype.InnerItems=function(e,t,i){var n=this.gridObj.getSelectedRowIndexes();if("csEnd"===i.action)for(s=e+1;s<=t;s++)n.push(s);else for(var s=t-1;e<=s;s--)n.push(s);return n},e.prototype.shiftSelectFocusItem=function(e,i,n,s){var a=i+("shiftDown"===s.action||"csDown"===s.action?1:-1),r=t.isNullOrUndefined(this.startIndex)?e:n[0];r===a?this.gridObj.selectRow(r):r<a?"shiftDown"===s.action||"csDown"===s.action?this.gridObj.selectionModule.selectRowsByRange(r,a):this.gridObj.selectionModule.selectRowsByRange(a,r):"shiftDown"===s.action||"csDown"===s.action?this.gridObj.selectionModule.selectRowsByRange(a,r):this.gridObj.selectionModule.selectRowsByRange(r,a),this.startIndex=this.gridObj.selectedRowIndex},e.prototype.addFocus=function(e){var i=this.getFocusedItem(),n=this.gridObj.getRowByIndex(e);i&&(i.removeAttribute("tabindex"),t.removeClass([i],[mi,"e-focused"])),t.isNullOrUndefined(n)||(this.gridObj.element.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[mi,"e-focused"]))},e.prototype.getFocusedItem=function(){return t.select(".e-focused",this.element)},e.prototype.isSelected=function(e,t){for(var i=!1,n=0;n<=e.length-1;n++)if(e[n]===t){i=!0;break}return i},e.prototype.shiftSelectedItem=function(e,i,n,s){-1===e?this.gridObj.selectRow(0):t.isNullOrUndefined(this.startIndex)&&s.shiftKey?(this.startIndex=this.gridObj.selectedRowIndex,this.gridObj.selectRows([e,"shiftDown"===s.action||"csDown"===s.action?e+(e!==n.length-1?1:0):e-(0!==e?1:0)])):"shiftDown"===s.action||"shiftUp"===s.action?("shiftDown"===s.action&&-1===i.indexOf(e+1)?e!==n.length-1&&i.push(e+1):"shiftUp"===s.action&&-1===i.indexOf(e-1)?0!==e&&i.push(e-1):i.pop(),this.gridObj.selectRows(i)):"csDown"===s.action?this.isSelected(i,this.getFocusedItemIndex()+1)?this.addFocus(this.getFocusedItemIndex()+1):(i.push(this.getFocusedItemIndex()+1),this.gridObj.selectRows(i)):this.isSelected(i,this.getFocusedItemIndex()-1)?this.addFocus(this.getFocusedItemIndex()-1):(i.push(this.getFocusedItemIndex()-1),this.gridObj.selectRows(i))},e.prototype.onMethodCall=function(e){if("Details"===this.parent.view)switch(t.getValue("action",e)){case"deleteFiles":this.deleteFiles(t.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(t.getValue("ids",e));break;case"openFile":this.openFile(t.getValue("id",e));break;case"createFolder":this.interaction=!1;break;case"renameFile":this.interaction=!1,this.renameFile(t.getValue("id",e),t.getValue("newName",e));break;case"selectAll":this.interaction=!1,this.onSelectAllInit();break;case"clearSelection":this.interaction=!1,this.onClearAllInit()}},e.prototype.getRecords=function(e){var i=this.gridObj.getCurrentViewRecords(),n=[],s=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),a=this.parent.hasId?"id":"name";if(this.parent.hasId||!s)for(var r=0,o=i.length;r<o;r++)-1!==e.indexOf(t.getValue(a,i[r]))&&n.push(i[r]);else for(var r=0,o=i.length;r<o;r++){var l=t.getValue("filterPath",i[r])+t.getValue("name",i[r]);-1!==e.indexOf(l)&&n.push(i[r])}return n},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="detailsview",t.isNullOrUndefined(e))return void this.performDelete();var i=this.getRecords(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=i[a],s[a]=le(this.parent,n[a]);ce(this.parent,n,s)}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))return void this.doDownload();var i=this.getRecords(e);if(0!==i.length){for(var n=[],s=[],a=0;a<i.length;a++)n[a]=i[a],s[a]=le(this.parent,n[a]);ue(this.parent,n,s)}},e.prototype.openFile=function(e){if(!t.isNullOrUndefined(e)){var i=this.getRecords([e]);i.length>0&&this.openContent(i[0])}},e.prototype.renameFile=function(e,i){if(this.parent.activeModule="detailsview",t.isNullOrUndefined(e))return void this.performRename();var n=this.getRecords([e]);n.length>0&&(he(this.parent,n[0]),t.isNullOrUndefined(i)?de(this.parent):be(this.parent.itemData[0])?je(this.parent,this.parent.path,i):fe(this.parent,this.parent.itemData[0],kn))},e}();return zn.Inject(Kn,Wn,Fn,qn,_n,Un),e.AjaxSettings=Dt,e.toolbarItems=jt,e.ToolbarSettings=xt,e.SearchSettings=Et,e.columnArray=kt,e.DetailsViewSettings=Lt,e.fileItems=Ft,e.folderItems=Ut,e.layoutItems=_t,e.ContextMenuSettings=Vt,e.NavigationPaneSettings=zt,e.UploadSettings=Kt,e.Column=Qt,e.TOOLBAR_ID="_toolbar",e.LAYOUT_ID=Jt,e.NAVIGATION_ID="_navigation",e.TREE_ID="_tree",e.GRID_ID=Xt,e.LARGEICON_ID=$t,e.DIALOG_ID=Zt,e.ALT_DIALOG_ID="_alt_dialog",e.IMG_DIALOG_ID=ei,e.EXTN_DIALOG_ID=ti,e.UPLOAD_DIALOG_ID="_upload_dialog",e.RETRY_DIALOG_ID="_retry_dialog",e.CONTEXT_MENU_ID="_contextmenu",e.SORTBY_ID="_sortby",e.VIEW_ID="_view",e.SPLITTER_ID="_splitter",e.CONTENT_ID=ii,e.BREADCRUMBBAR_ID=ni,e.UPLOAD_ID=si,e.RETRY_ID="_retry",e.SEARCH_ID="_search",e.ROOT="e-filemanager",e.CONTROL="e-control",e.CHECK_SELECT="e-fe-cb-select",e.ROOT_POPUP=ai,e.MOBILE="e-fe-mobile",e.MOB_POPUP=ri,e.MULTI_SELECT="e-fe-m-select",e.FILTER=oi,e.LAYOUT="e-layout",e.NAVIGATION="e-navigation",e.LAYOUT_CONTENT="e-layout-content",e.LARGE_ICONS=li,e.TB_ITEM="e-toolbar-item",e.LIST_ITEM=hi,e.LIST_TEXT=di,e.LIST_PARENT="e-list-parent",e.TB_OPTION_TICK=pi,e.TB_OPTION_DOT=ci,e.BLUR=ui,e.ACTIVE=fi,e.HOVER=gi,e.FOCUS=mi,e.FOCUSED="e-focused",e.CHECK=bi,e.FRAME="e-frame",e.CB_WRAP=yi,e.ROW=vi,e.ROWCELL="e-rowcell",e.EMPTY=Oi,e.EMPTY_CONTENT=wi,e.EMPTY_INNER_CONTENT=Ii,e.CLONE=Di,e.DROP_FOLDER=Si,e.DROP_FILE=Ci,e.FOLDER=ji,e.ICON_IMAGE=xi,e.ICON_MUSIC=Pi,e.ICON_VIDEO=Ni,e.LARGE_ICON=Ei,e.LARGE_EMPTY_FOLDER=Ri,e.LARGE_EMPTY_FOLDER_TWO="e-empty-icon.e-fe-folder",e.LARGE_ICON_FOLDER="e-fe-folder",e.SELECTED_ITEMS="e-items",e.TEXT_CONTENT="e-text-content",e.GRID_HEADER=Mi,e.TEMPLATE_CELL="e-templatecell",e.TREE_VIEW=ki,e.MENU_ITEM="e-menu-item",e.MENU_ICON=Li,e.SUBMENU_ICON="e-caret",e.GRID_VIEW=Ti,e.ICON_VIEW="e-list-parent",e.ICON_OPEN="e-icons e-fe-open",e.ICON_UPLOAD="e-icons e-fe-upload",e.ICON_CUT=Ai,e.ICON_COPY="e-icons e-fe-copy",e.ICON_PASTE="e-icons e-fe-paste",e.ICON_DELETE="e-icons e-fe-delete",e.ICON_RENAME="e-icons e-fe-rename",e.ICON_NEWFOLDER="e-icons e-fe-newfolder",e.ICON_DETAILS="e-icons e-fe-details",e.ICON_SHORTBY="e-icons e-fe-sort",e.ICON_REFRESH="e-icons e-fe-refresh",e.ICON_SELECTALL="e-icons e-fe-select",e.ICON_DOWNLOAD="e-icons e-fe-download",e.ICON_OPTIONS="e-icons e-fe-options",e.ICON_GRID=Fi,e.ICON_LARGE=Ui,e.ICON_BREADCRUMB="e-icons e-fe-breadcrumb",e.ICON_CLEAR="e-icons e-fe-clear",e.ICON_DROP_IN="e-icons e-fe-drop-in",e.ICON_DROP_OUT="e-icons e-fe-drop-out",e.ICON_NO_DROP="e-icons e-fe-no-drop",e.ICONS="e-icons",e.DETAILS_LABEL="e-detailslabel",e.ERROR_CONTENT=_i,e.STATUS="e-status",e.BREADCRUMBS="e-address",e.RTL=Vi,e.DISPLAY_NONE=Bi,e.COLLAPSED="e-node-collapsed",e.FULLROW="e-fullrow",e.ICON_COLLAPSIBLE="e-icon-collapsible",e.SPLIT_BAR="e-split-bar",e.HEADER_CHECK="e-headercheck",e.OVERLAY="e-fe-overlay",e.VALUE=Hi,e.isFile=zi,e.modelChanged=qi,e.initialEnd=Wi,e.finalizeEnd=Ki,e.createEnd=Gi,e.filterEnd="filter-end",e.beforeDelete="before-delete",e.pathDrag=Yi,e.deleteInit=Qi,e.deleteEnd=Ji,e.refreshEnd=Xi,e.resizeEnd=$i,e.splitterResize="splitter-resize",e.pathChanged=Zi,e.destroy=en,e.beforeRequest=tn,e.upload="upload",e.skipUpload=nn,e.afterRequest=sn,e.download="download",e.layoutRefresh="layout-refresh",e.actionFailure=an,e.search=rn,e.openInit=on,e.openEnd=ln,e.selectionChanged=hn,e.selectAllInit="select-all-init",e.clearAllInit="clear-all-init",e.clearPathInit=dn,e.layoutChange=pn,e.sortByChange=cn,e.nodeExpand="node-expand",e.detailsInit=un,e.menuItemData=fn,e.renameInit=gn,e.renameEndParent=mn,e.renameEnd=bn,e.showPaste=yn,e.hidePaste=vn,e.selectedData="selected-data",e.cutCopyInit=On,e.pasteInit=wn,e.pasteEnd=In,e.cutEnd=Dn,e.hideLayout="hide-layout",e.updateTreeSelection="update-tree-selection",e.treeSelect="select-node",e.sortColumn=Sn,e.pathColumn=Cn,e.searchTextChange=jn,e.beforeDownload="before-download",e.downloadInit="download-init",e.dropInit=xn,e.dragEnd=Pn,e.dropPath=Nn,e.dragHelper="drag-helper",e.dragging=En,e.updateSelectionData="update-selection-data",e.methodCall=Rn,e.permissionRead=Mn,e.permissionEdit=kn,e.permissionEditContents=Ln,e.permissionCopy="copy",e.permissionUpload=Tn,e.permissionDownload=An,e.FileManager=zn,e.Toolbar=qn,e.BreadCrumbBar=Un,e.NavigationPane=Wn,e.DetailsView=Kn,e.LargeIconsView=Fn,e.createDialog=ze,e.createExtDialog=qe,e.createImageDialog=yt,e.ContextMenu=_n,e}({},ej.base,ej.layouts,ej.popups,ej.data,ej.inputs,ej.buttons,ej.lists,ej.splitbuttons,ej.navigations,ej.grids),this.ejs=ej;
|