@syncfusion/ej2-filemanager 25.2.3 → 25.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * filename: ej2-filemanager.umd.min.js
3
- * version : 25.2.3
3
+ * version : 25.2.6
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-layouts"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-lists"),require("@syncfusion/ej2-splitbuttons"),require("@syncfusion/ej2-navigations"),require("@syncfusion/ej2-grids")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-layouts","@syncfusion/ej2-popups","@syncfusion/ej2-data","@syncfusion/ej2-inputs","@syncfusion/ej2-buttons","@syncfusion/ej2-lists","@syncfusion/ej2-splitbuttons","@syncfusion/ej2-navigations","@syncfusion/ej2-grids"],t):t(e.ej={},e.ej2Base,e.ej2Layouts,e.ej2Popups,e.ej2Data,e.ej2Inputs,e.ej2Buttons,e.ej2Lists,e.ej2Splitbuttons,e.ej2Navigations,e.ej2Grids)}(this,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="/",a=n.length-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,"."+di)){var o=n?r.getAttribute("data-uid"):s?r.getAttribute("data-id"):t.select("."+pi,r).textContent;a.push(o)}if((r=r.parentNode).classList.contains(Ai))break}return a}function m(e){for(var i=e.hasId?"id":"name",n="/",s=1;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&&(I(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(Yn,{}))}function y(e,i){if(i.isSearchCut=!1,i.actionRecords=[],i.activeElements=[],i.notify(Qn,{}),0===i.activeElements.length)return!1;I(i);var n=i.activeElements;"navigationpane"!==i.activeModule?i.targetPath=i.path:i.targetPath=J(i.path);var s=0;if(n&&(O(i,n[0]),"cut"===e))for(;s<n.length;)v(n[s]),s++;for(s=0,i.selectedNodes=[],i.enablePaste=!0,i.notify(Gn,{});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(gi)}function I(e,t){for(var i=t?e.element.querySelectorAll("."+bi):e.element.querySelectorAll("."+gi),n=0;n<i.length;)i[n].classList.remove(t?bi:gi),n++}function O(e,i){i&&(i.classList.contains(wi)?e.activeModule="detailsview":t.closest(i,"."+ki)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function w(e,t,i){var n;if(0!==t.length||e.isFiltered||e.notify(ns,{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;He(e,i?Vn:Mn,e.path,n,a,!s)}else e.isFiltered?je(e,Vn):e.isSortByClicked?(e.notify(Vn,{files:"Details"===e.oldView?e.detailsviewModule.gridObj.dataSource:e.largeiconsviewModule.allItems}),e.isSortByClicked=!1):Ce(e,i?Vn:Mn,e.path)}function D(e,t){e.oldView=e.view,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,w(e,i,!0)}function C(e,i){var n="";i&&(n=t.closest(i,"."+Zt+"."+ei+" ."+_i)?"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 S(e){e.itemData=[x(e)],be(e.itemData[0])?Ce(e,wn,e.path):ge(e,e.itemData[0],cs)}function j(e){Ce(e,Tn,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 Ni;var i=t.getValue("type",e);-1!==(i=i.toLowerCase()).indexOf(".")&&(i=i.split(".").join(""));return-1!==["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"].indexOf(i)?Ei:-1!==["mp3","wav","aac","ogg","wma","aif","fla","m4a"].indexOf(i)?Ri:-1!==["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"].indexOf(i)?Mi:-1!==["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"].indexOf(i)?"e-fe-"+i:"e-fe-unknown e-fe-"+i}function R(e,i){var n,s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,a=-1!==s.indexOf("?")?"&path=":"?path=",r=encodeURIComponent(t.getValue("name",i)),o=t.getValue("filterPath",i);if(e.hasId){var l=t.getValue("id",i);n=s+a+e.path+"&id="+l}else n=t.isNullOrUndefined(o)?s+a+e.path+r:s+a+encodeURIComponent(o.replace(/\\/g,"/"))+r;var h={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",h),h.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 T(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 L(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+Ht,e.element),r=t.select("#"+e.element.id+Xt,a).offsetHeight;if(s=a.offsetHeight-r,"Details"===e.view&&(s-=t.select("."+Li,a).offsetHeight),t.isNullOrUndefined(i.querySelector("."+Di))){var o=t.createElement("div",{className:Di}),l=t.createElement("div",{className:Ti}),h=t.createElement("div",{className:Ci}),d=t.createElement("div",{className:Si});"Details"===e.view?i.querySelector("."+Vi).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+Di)&&(t.isNullOrUndefined(n.error)?e.isFiltered?(i.querySelector("."+Ci).innerHTML=_(e,"Filter-Empty"),i.querySelector("."+Si).innerHTML=_(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+Ci).innerHTML=_(e,"Search-Empty"),i.querySelector("."+Si).innerHTML=_(e,"Search-Key")):(i.querySelector("."+Ci).innerHTML=_(e,"Folder-Empty"),i.querySelector("."+Si).innerHTML=_(e,"File-Upload")):(i.querySelector("."+Ci).innerHTML=_(e,"Access-Denied"),i.querySelector("."+Si).innerHTML=_(e,"Access-Details")));var p=t.select("."+Di,i);s=(s-p.offsetHeight)/2,p.style.marginTop=s+"px"}function F(e){return new s.DataManager(e).executeLocal((new s.Query).where(un,"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 V(e,i,n){for(var s=0;s<e.length;s++){var a=new Date(t.getValue("dateCreated",e[s])),r=new Date(t.getValue("dateModified",e[s]));t.isNullOrUndefined(n)&&(n="MM/dd/yyyy"),t.setValue("_fm_created",i.formatDate(a,{format:n}),e[s]),t.setValue("_fm_modified",i.formatDate(r,{format:n}),e[s])}}function _(e,t){var i=e.localeObj.getConstant(t);return""===i?t:i}function H(e,i){var n=e.cssClass;return n=t.isNullOrUndefined(n)||""===n?i:n+" "+i}function B(e,t){e.isSortByClicked=!0,-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),e.itemData=[x(e)],"Details"===e.view&&(e.isMobile?D(e,"Details"):(e.notify(is,{module:"detailsview"}),e.isSortByClicked=!1)),"LargeIcons"===e.view&&D(e,"LargeIcons"),e.notify(_n,{})}function z(e,t){var i,n=e.substring(e.lastIndexOf("_")+1),s=n;switch(t&&(i=t.detailsViewSettings.columns),n){case"date":for(var a=0,r=i.length;a<r;a++){if("dateModified"===i[a].field||"dateCreated"===i[a].field){s=i[a].field;break}s="_fm_modified"}break;case"ascending":s="Ascending";break;case"descending":s="Descending";break;case"none":s="None"}return s}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]?mn:gn,d=""===s[o]?"/":e.path+s[o]+"/",p=L(e,r,s[o]);if(t.isNullOrUndefined(p))e.originalPath=d;else{var 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))}Ce(e,h,e.path);break}}function W(e,i){e.originalPath=M(e,i,e.path);var n=t.getValue(e.pathId[0],e.feParent),s="fe_tree"==t.getValue("_fm_id",e.itemData[0]),a=L(e,t.isNullOrUndefined(t.getValue("id",n))?"name":"id",t.getValue("name",i));if(t.isNullOrUndefined(a)){if(s)return void q(e,e.path);e.notify(Un,{selectedNode:e.pathId[e.pathId.length-1]})}else{var r=t.getValue("_fm_id",a);e.setProperties({path:e.originalPath},!0),e.pathId.push(r),e.itemData=[a],e.pathNames.push(t.getValue("name",a))}Ce(e,e.path!==e.originalPath?gn:mn,e.path)}function K(e){if(e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste){var t=""===e.folderPath?e.path:e.folderPath;if(!G(e,e.actionRecords,t,e.path))if("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction)e.notify(Xn,{}),Pe(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords);else{e.enablePaste=!1,e.notify(Yn,{}),I(e);qe(e,"Error",{files:null,error:{code:"402",message:_(e,"Same-Folder-Error"),fileExists:null}})}}}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){qe(e,"Error",{files:null,error:{code:"402",message:_(e,"Same-Folder-Error"),fileExists:null}}),a=!0;break}}else{var d=M(e,i[r],s);if(0===n.indexOf(d)){qe(e,"Error",{files:null,error:{code:"402",message:_(e,"Sub-Folder-Error"),fileExists:null}}),a=!0;break}}return a}function Y(e){if(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],Pe(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(Xn,{}))}}function J(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function Q(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(os,i):(e.enablePaste=!1,e.notify(Yn,{}),e.notify(Zn,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,Ce(e,$n,e.path)):$(e),e.trigger("success",{action:t,result:i})}function $(e){var i=t.getValue("_fm_id",e.dropData);if(e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag)e.notify(vn,e.itemData);else{if(e.navigationpaneModule){var n=t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element);if(!n){i=document.querySelector('[data-id = "'+t.getValue("id",e.dropData)+'"]').getAttribute("data-uid"),n=t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element)}p(n,e.dropData,e)}Ce(e,ls,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(he(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:ji});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"),I(e),e.uploadObj.dropArea=t.select("#"+e.element.id+Qt,e.element);var s=t.select("."+ji,e.element);s&&t.detach(s),C(e,i.target),e.notify(rs,i),I(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,function(i){!i.cancel&&!t.isNullOrUndefined(e.targetModule)&&""!==e.targetModule&&e.dragCount>2&&Y(e),e.dragCount=0})}function ie(e,i,n){var s=i;if(s.cancel=!1,s.fileDetails=e.dragData,e.dragCount=0,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,I(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(t){t.cancel?(n.intDestroy(i.event),ne(e)):e.uploadObj.dropArea=null})}}function ne(e){I(e);var i=t.select("."+ji,e.element);i&&t.detach(i)}function se(e){ae(e,xi),ae(e,Pi)}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,n,s,a){var r,o=e.getBoundingClientRect(),l=t.select("."+n,e);s>=o.top+e.clientHeight-30&&!t.isNullOrUndefined(l)&&(r="navigationpane"===i.targetModule||"detailsview"===i.targetModule?l.offsetHeight/2.5:l.offsetHeight/4.5,e.scrollBy(0,r)),!t.isNullOrUndefined(l)&&a<=o.top+30&&(r="navigationpane"===i.targetModule||"detailsview"===i.targetModule?l.offsetHeight/2.5:l.offsetHeight/4.5,e.scrollBy(0,-r))}function oe(e,i){var n=i;n.fileDetails=e.dragData;var s=!1;C(e,i.target),se(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),I(e,"hover");var a=null;"navigationpane"===e.targetModule?((a=t.closest(i.target,"li")).classList.add(bi,xi),s=!0,e.treeExpandTimer=window.setTimeout(function(){e.notify(hs,i)},800),re(e.navigationpaneModule.treeObj.element.parentElement,e,"e-level-2",i.event.screenY,i.event.y)):"detailsview"===e.targetModule?((a=t.closest(i.target,"tr"))&&a.querySelector("."+Ni)&&!a.classList.contains(gi)?a.classList.add(xi):!a||a.querySelector("."+Ni)||a.classList.contains(gi)||a.classList.add(Pi),s=!0,re(e.detailsviewModule.gridObj.element.querySelector(".e-content"),e,"e-row",i.event.screenY,i.event.y)):"largeiconsview"===e.targetModule?((a=t.closest(i.target,"li"))&&a.querySelector("."+Ni)&&!a.classList.contains(gi)&&a.classList.add(bi,xi),s=!0,re(e.largeiconsviewModule.element.firstElementChild,e,"e-large-icon",i.event.screenY,i.event.y)):"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.dragCount=e.dragCount+1,e.trigger("fileDragging",n)}function le(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 he(e,i){return e.hasId?t.getValue("id",i):k(e,i)}function de(e,i){e.itemData=[i],e.currentItemText=t.getValue("name",i),e.isFile=t.getValue("isFile",i),e.filterPath=t.getValue("filterPath",i)}function pe(e){ye(e.itemData[0])?qe(e,"Rename"):ge(e,e.itemData[0],us)}function ce(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!Oe(t[i]))return void ge(e,t[i],ms);e.selectedItems.length>0&&ze(e,e.path,e.selectedItems)}function ue(e,t,i){for(var n=0;n<t.length;n++)if(!ye(t[n]))return void ge(e,t[n],us);e.itemData=t,Ne(e,i,e.path,"delete")}function fe(e,t,i){for(var n=0;n<t.length;n++)if(!Oe(t[n]))return void ge(e,t[n],ms);e.itemData=t,i.length>0&&ze(e,e.path,i)}function ge(e,i,n){var s=t.getValue("message",t.getValue("permission",i));""===s&&(s=_(e,"Access-Message").replace("{0}",t.getValue("name",i)).replace("{1}",n));qe(e,"Error",{error:{code:"401",fileExists:null,message:s}})}function me(e){return be(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function be(e){var i=t.getValue("permission",e);return!(i&&!t.getValue("read",i))}function ye(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("write",i)}function ve(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("writeContents",i)}function Ie(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];ve(t)?qe(e,"NewFolder"):ge(e,t,fs)}function De(e){var t=e.itemData[0];if(Ie(t)){var i="#"+e.element.id+$t;document.querySelector(i).click()}else ge(e,t,gs)}function Ce(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]);Re(e,{action:"read",path:n,showHiddenItems:e.showHiddenItems,data:s},ke,i)}function Se(e,t){Re(e,{action:"create",path:e.path,name:t,data:e.itemData},Le,t)}function je(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;Re(e,s,Te,i,t.getValue("action",s))}function xe(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;Re(e,{action:"rename",path:t,name:n,newName:s,data:e.itemData,showFileExtension:e.showFileExtension},Ae,t)}function Pe(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,Re(e,o,Fe,t,s,n)}function Ne(e,t,i,n){Re(e,{action:n,path:i,names:t,data:e.itemData},Ue,i)}function Ee(e,t,i,n){Re(e,{action:n,path:i,names:t,data:e.itemData},Ve,i,n)}function Re(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){if(!o.cancel){e.notify(xn,{});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:_(e,"Server-Error")+" "+e.ajaxSettings.url,code:"406"},files:null};Me(e,o,n,h,s,a,r)}else{"string"==typeof l&&(l=JSON.parse(l)),e.notify(Nn,{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)}var c=new t.Internationalization(e.locale);if(!t.isNullOrUndefined(l.files)){V(l.files,c,function(e){for(var i,n=e.detailsViewSettings.columns,s=0;s<n.length;s++)if("_fm_modified"===n[s].field){t.isNullOrUndefined(n[s].format)||(i=n[s].format.toString());break}return i}(e));for(var u=0,f=l.files.length;u<f;u++){var g=l.files[u];t.setValue("_fm_iconClass",E(g),g)}"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 b=e.rootAliasName||t.getValue("name",l.details),y=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",b,l.details),y=b):y=y.replace(y.substring(0,y.indexOf("\\")),b),t.setValue("location",y,l.details)}n(e,l,s,a,r),t.isNullOrUndefined(l.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s&&"drop-path"!==s||e.notify(ss,l),"function"==typeof t.getValue("onSuccess",o.ajaxSettings)&&t.getValue("onSuccess",o.ajaxSettings)()}},onFailure:function(){var t={files:null,error:{code:"404",message:_(e,"Network-Error")+" "+e.ajaxSettings.url,fileExists:null}};Me(e,o,n,t,s,a,r)}}).send()}})}function Me(e,i,n,s,a,r,o){e.notify(Nn,{action:"failure"}),n(e,s,a,r,o),"function"==typeof t.getValue("onFailure",i.ajaxSettings)&&t.getValue("onFailure",i.ajaxSettings)()}function ke(e,i,n){if(t.isNullOrUndefined(i.files))"401"===i.error.code&&(i.files=[],e.notify(n,i),e.notify(Ln,{})),_e(e,i,"read"),e.setProperties({path:e.oldPath},!0),e.pathNames.pop();else{e.notify(n,i),e.notify(Ln,{});var s={action:"read",result:i};e.trigger("success",s)}if(e.isDragDrop&&e.isDropEnd){if(0!==e.droppedObjects.length){s={fileDetails:e.droppedObjects};e.trigger("fileDropped",s)}e.isDropEnd=e.isDragDrop=!1}}function Te(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=_(e,"Validation-NewFolder-Exists").replace("{0}",'"'+s.value+'"');s.parentElement.nextElementSibling.innerHTML=a}else{qe(e,"Error",{files:null,error:{code:"400",message:_(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)],Ce(e,bn,e.path)}}function Ae(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=_(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=Array.isArray(i.files)?i.files[0]:i.files,"navigationpane"===e.activeModule?(e.pathId.pop(),e.itemData=[t.getValue(e.pathId[e.pathId.length-1],e.feParent)],Ce(e,Wn,t.getValue("filterPath",e.renamedItem).replace(/\\/g,"/")),e.itemData[0]=e.renamedItem,Ce(e,Sn,"/"===e.path?e.path:t.getValue("filterPath",e.renamedItem).replace(/\\/g,"/")+e.renamedItem.name+"/"),t.getValue("filterPath",e.renamedItem)===t.getValue("filterPath",e.itemData[0])&&e.pathNames.length>1&&(e.pathNames[e.pathNames.length-1]=e.renameText)):(e.itemData=[x(e)],""!==e.breadcrumbbarModule.searchObj.value?He(e,Kn,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?je(e,Kn):Ce(e,Kn,e.path))}}function Fe(e,i,n,s){i.error&&i.error.fileExists?(e.fileLength=0,t.isNullOrUndefined(i.files)||(e.isPasteError=!0,X(e,s,i)),We(e,"DuplicateItems",i.error.fileExists),"404"===i.error.code&&qe(e,"Error",i)):i.error||t.isNullOrUndefined(i.files)?i.error&&!t.isNullOrUndefined(i.files)?(e.isPasteError=!0,X(e,s,i),qe(e,"Error",i)):_e(e,i,s):(e.isPasteError=!1,X(e,s,i))}function Ue(e,i,n){if(t.isNullOrUndefined(i.files))_e(e,i,"delete");else if(e.setProperties({path:n},!0),e.itemData=[x(e)],Ce(e,On,e.path),i.error)_e(e,i,"delete");else{var s={action:"delete",result:i};e.trigger("success",s)}}function Ve(e,i,n,s){if(t.isNullOrUndefined(i.details))_e(e,i,"details");else{qe(e,s,null,i.details);var a={action:"details",result:i};e.trigger("success",a)}}function _e(e,t,i){qe(e,"Error",t);var n={action:i,error:t.error};e.trigger("failure",n)}function He(e,t,i,n,s,a){Re(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 ze(e,i,n){var s=e.ajaxSettings.downloadUrl?e.ajaxSettings.downloadUrl:e.ajaxSettings.url,a={action:"download",path:i,names:n,data:e.itemData},r={data:a,cancel:!1,useFormPost:!0,ajaxSettings:{url:s,type:"POST",contentType:"application/json",responseType:"blob",data:JSON.stringify(a),onSuccess:null,onFailure:null,beforeSend:null}};e.trigger("beforeDownload",r,function(i){if(!i.cancel)if(i.useFormPost){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)}else{var r,o;new t.Fetch({url:t.getValue("url",i.ajaxSettings),type:t.getValue("type",i.ajaxSettings),contentType:t.getValue("contentType",i.ajaxSettings),responseType:t.getValue("responseType",i.ajaxSettings),beforeSend:t.getValue("beforeSend",i.ajaxSettings),onLoad:function(i){if(r=i.headers.get("Content-Disposition")){var n=r.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/),s=n&&n[1];o=s?s.replace(/['"]/g,""):o}else o=e.itemData.length>1?"files.zip":t.getValue("isFile",e.itemData[0])?t.getValue("name",e.itemData[0]):t.getValue("name",e.itemData[0])+".zip"},onSuccess:function(t){e.trigger("success",i);var n=t,s=URL.createObjectURL(n),a=document.createElement("a");a.href=s,a.download=o,document.body.appendChild(a),a.click(),document.body.removeChild(a)},onFailure:function(t){var n={error:{code:t.status.toString(),message:_(e,"Network-Error")+" "+e.ajaxSettings.downloadUrl}};qe(e,"Error",n),e.trigger("failure",i)}}).send(JSON.stringify(i.data))}})}function qe(e,i,s,a,r){var o=function(e,i,n,s,a){var r,o,l,h,d,p,c={header:"",content:"",buttons:[],dialogName:""};switch(c.open=function(){Ye(e,e.dialogObj,c.dialogName)},c.close=function(){Je(e,e.dialogObj,c.dialogName)},i=s&&!0===s.multipleFiles?"MultipleFileDetails":i){case"NewFolder":c.dialogName="Create Folder",c.header=_(e,"Header-NewFolder"),c.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Create")},click:function(t){"keydown"!==t.type&&it(e)}}],c.open=function(e){var i=t.select("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||$e(i,_(e,"Content-NewFolder"));i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){st(e,i)},i.onkeyup=function(t){var i=ot(t);13===i&&it(e)},function(e){var i=t.select("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}(e),Ye(e,e.dialogObj,"Create Folder")}.bind(this,e);break;case"Delete":c.dialogName="Delete",e.selectedItems.length>1?(c.content=("<div>"+_(e,"Content-Multiple-Delete")+"</div>").replace("{0}",e.selectedItems.length.toString()),c.header=_(e,"Header-Multiple-Delete")):(c.content="<div>"+_(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",c.header=_(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Yes")},click:function(t){!function(e){e.dialogObj.hide(),e.notify(In,{})}(e)}},{buttonModel:{content:_(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":c.dialogName="Rename",c.header=_(e,"Header-Rename"),c.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Save")},click:function(t){"keydown"!==t.type&&nt(e)}}],c.open=function(e){var i=t.select("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||$e(i,_(e,"Content-Rename"));i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){st(e,i)},i.onkeyup=function(t){var i=ot(t);13===i&&nt(e)},function(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)}(e,i),Ye(e,e.dialogObj,"Rename")}.bind(this,e);break;case"details":c.dialogName="File Details",l=new t.Internationalization(e.locale),o=l.formatDate(new Date(s.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),r="",t.isNullOrUndefined(s.permission)||(r="<tr><td>"+_(e,"Permission")+'</td><td class="'+cn+'" >'+le(s.permission)+"</td></tr>"),c.header=s.name,c.content="<table><tr><td>"+_(e,"Type")+'</td><td class="'+cn+'" title="'+(s.isFile?"File":"Folder")+'">'+(s.isFile?"File":"Folder")+"</td></tr><tr><td>"+_(e,"Size")+'</td><td><span class="'+cn+'" title ="'+s.size+'">'+s.size+"</span></td></tr><tr><td>"+_(e,"Location")+'</td><td class="'+cn+'" title="'+s.location+'">'+s.location+"</td></tr><tr><td>"+_(e,"Modified")+'</td><td class="'+cn+'" >'+o+"</td></tr>"+r+"</table>",c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}];break;case"MultipleFileDetails":var u;c.dialogName="File Details",void 0==(h=e.itemData.map(function(e){return 0!==(u=e.name.indexOf(".")+1)||e.isFile?0!==u?e.name.substr(u).replace(" ",""):"undetermined":"Folder"}))[0]&&(h=s.name.split(",").map(function(e){return 0===(u=e.indexOf(".")+1)?"Folder":e.substr(u).replace(" ","")})),d=h.every(function(e,t,i){return e===i[0]})?"Folder"===h[0]?"Folder":h[0].toLocaleUpperCase()+" Type":"Multiple Types",p=s.location,c.header=s.name,c.content="<table><tr><td>"+_(e,"Type")+':</td><td class="'+cn+'">'+d+"</td></tr><tr><td>"+_(e,"Size")+":</td><td>"+s.size+'<span class="'+cn+'" title ="'+s.size+'"></span></td></tr><tr><td>'+_(e,"Location")+':</td><td class="'+cn+'" title="'+p+'">'+p+"</td></tr></table>",c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(Rn,{}),c.dialogName="Error","401"===n.error.code?c.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+_(e,"Access-Denied")+"</div>":c.header=_(e,"Error"),c.content='<div class="'+on+'">'+n.error.message+"</div>",c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}]}return c}(e,i,s,a);t.isNullOrUndefined(e.dialogObj)?(e.dialogObj=new n.Dialog({beforeOpen:Ze.bind(this,e,o.dialogName),beforeClose:function(t){Ge(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:H(e,e.isMobile?si:ii),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+Wt)):function(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=Ze.bind(this,e,t.dialogName),e.dialogObj.beforeClose=function(i){Ge(e,e.dialogObj,i,t.dialogName)},e.dialogObj.dataBind(),e.dialogObj.show()}(e,o)}function We(e,i,s,a){var o=function(e,i,n,s){var a,o,l,h={header:"",content:"",buttons:[],dialogName:""};switch(h.open=function(){Ye(e,e.extDialogObj,h.dialogName)},h.close=function(){Je(e,e.extDialogObj,h.dialogName)},i){case"Extension":h.header=_(e,"Header-Rename-Confirmation"),h.content="<div>"+_(e,"Content-Rename-Confirmation")+"</div>",h.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),xe(e,s,e.renameText)}},{buttonModel:{content:_(e,"Button-No")},click:function(){e.extDialogObj.hide(),e.dialogObj.hide()}}],h.dialogName="Extension Change";break;case"DuplicateItems":h.dialogName="Duplicate Items",e.replaceItems=n,o=e.replaceItems[e.fileLength],l=o.lastIndexOf("/"),o=-1===l?o:o.substring(l),h.header=_(e,"Header-Duplicate"),a="<div>"+_(e,"Content-Duplicate")+"</div>",h.content=a.replace("{0}",o),h.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}Je(e,e.extDialogObj,h.dialogName)},h.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(Z(e,e.replaceItems[e.fileLength])),e.fileLength++,n[e.fileLength]){var t=e.replaceItems[e.fileLength],i=t.lastIndexOf("/");t=-1===i?t:t.substring(i),e.extDialogObj.content=a.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var s=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;Pe(e,s,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:_(e,"Button-No")},click:function(){if(e.fileLength++,n[e.fileLength]){var t=e.replaceItems[e.fileLength],i=t.lastIndexOf("/");t=-1===i?t:t.substring(i),e.extDialogObj.content=a.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var s=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;Pe(e,r,e.duplicateItems,o,s,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":h.dialogName="Retry Upload",h.header=_(e,"Header-Retry"),h.content=e.retryFiles[0].name+'<div class="e-fe-retrycontent">'+_(e,"Content-Retry")+"</div>",h.open=function(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:_(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}}).appendTo("#"+e.element.id+"_applyall"),Ye(e,e.extDialogObj,"Retry Upload")}.bind(this,e),h.close=function(){e.isRetryOpened=!1,Xe(e),Je(e,e.extDialogObj,h.dialogName)},h.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Keep-Both")},click:function(){Qe(e,!0)}},{buttonModel:{isPrimary:!0,content:_(e,"Button-Replace")},click:function(){Qe(e,!1)}},{buttonModel:{isPrimary:!0,content:_(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?We(e,"UploadRetry"):Xe(e)),e.notify(Pn,{count:t})}}]}return h}(e,i,s,a);e.isApplySame=!1,t.isNullOrUndefined(e.extDialogObj)?(e.extDialogObj=new n.Dialog({beforeOpen:et.bind(this,e,o.dialogName),beforeClose:function(t){Ge(e,e.extDialogObj,t,o.dialogName)},content:o.content,header:o.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:H(e,e.isMobile?si:ii),enableRtl:e.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:o.buttons,open:o.open,close:o.close,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.extDialogObj.isStringTemplate=!0,e.extDialogObj.appendTo("#"+e.element.id+Gt)):(e.extDialogObj.header=o.header,e.extDialogObj.close=o.close,e.extDialogObj.open=o.open,e.extDialogObj.close=o.close,e.extDialogObj.content=o.content,e.extDialogObj.buttons=o.buttons,e.extDialogObj.enableRtl=e.enableRtl,e.extDialogObj.locale=e.locale,e.extDialogObj.beforeOpen=et.bind(this,e,o.dialogName),e.extDialogObj.beforeClose=function(t){Ge(e,e.extDialogObj,t,o.dialogName)},e.extDialogObj.dataBind(),e.extDialogObj.show())}function Ke(e,t,i,n){var s={cancel:i.cancel,popupName:n,popupModule:t};e.trigger("beforePopupOpen",s,function(e){i.cancel=e.cancel})}function Ge(e,t,i,n){var s={cancel:i.cancel,popupModule:t,popupName:n};e.trigger("beforePopupClose",s,function(t){i.cancel=t.cancel,i.cancel||!i.isInteracted||"Rename"!==n&&"Create Folder"!==n||e.trigger(Rn,{})})}function Ye(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupOpen",n)}function Je(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupClose",n)}function Qe(e,t){e.isApplySame?(t?function(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)}(e):function(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)}(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?We(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,t){a.Input.createInput({element:e,properties:{placeholder:t}})}function Ze(e,i,n){tt(t.selectAll(".e-btn",e.dialogObj.element)),Ke(e,e.dialogObj,n,i)}function et(e,i,n){tt(t.selectAll(".e-btn",e.extDialogObj.element)),Ke(e,e.extDialogObj,n,i)}function tt(e){for(var t=function(t){e[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},e[t].onkeyup=function(i){13===i.keyCode&&e[t].click()}},i=0;i<e.length;i++)t(i)}function it(e){var i=t.select("#newname",e.dialogObj.element);at(e,i),""===i.parentElement.nextElementSibling.innerHTML&&Se(e,i.value)}function nt(e){var i=t.select("#rename",e.dialogObj.element);if(at(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)}if(e.renameText=n,e.currentItemText!==n){var a="navigationpane"===e.activeModule?t.getValue("filterPath",e.itemData[0]).replace(/\\/g,"/"):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?We(e,"Extension",null,a):xe(e,a,n)}else xe(e,a,n)}else e.dialogObj.hide()}}function st(e,t){/[/\\|*?"<>:]/.test(t.value)?rt(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=_(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function at(e,t){st(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==t.value.lastIndexOf(".")&&0!==t.value.substring(t.value.indexOf(".")+1).length||rt(e,t)}function rt(e,t){var i=_(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');e.enableHtmlSanitizer?t.parentElement.nextElementSibling.textContent=i:t.parentElement.nextElementSibling.innerHTML=i}function ot(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function lt(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:H(e,e.isMobile?si:ii),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:function(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),ht(e),Ye(e,e.viewerObj,"Image Preview")}.bind(this,e),close:function(){Je(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){Ke(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){Ge(e,e.viewerObj,t,"Image Preview")},resizing:ht.bind(this,e),resizeStop:ht.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+Kt)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function ht(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 dt=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)}}(),pt=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},ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return dt(i,e),pt([t.Property(null)],i.prototype,"downloadUrl",void 0),pt([t.Property(null)],i.prototype,"getImageUrl",void 0),pt([t.Property(null)],i.prototype,"uploadUrl",void 0),pt([t.Property(null)],i.prototype,"url",void 0),i}(t.ChildProperty),ut=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)}}(),ft=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},gt=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],mt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ut(i,e),ft([t.Property(gt)],i.prototype,"items",void 0),ft([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ut(i,e),ft([t.Property("")],i.prototype,"id",void 0),ft([t.Property("")],i.prototype,"text",void 0),ft([t.Property("auto")],i.prototype,"width",void 0),ft([t.Property("")],i.prototype,"cssClass",void 0),ft([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),ft([t.Property(!1)],i.prototype,"disabled",void 0),ft([t.Property("")],i.prototype,"prefixIcon",void 0),ft([t.Property("")],i.prototype,"suffixIcon",void 0),ft([t.Property(!0)],i.prototype,"visible",void 0),ft([t.Property("None")],i.prototype,"overflow",void 0),ft([t.Property("")],i.prototype,"template",void 0),ft([t.Property("Button")],i.prototype,"type",void 0),ft([t.Property("Both")],i.prototype,"showTextOn",void 0),ft([t.Property(null)],i.prototype,"htmlAttributes",void 0),ft([t.Property("")],i.prototype,"tooltipText",void 0),ft([t.Property("Left")],i.prototype,"align",void 0),ft([t.Property(-1)],i.prototype,"tabIndex",void 0),ft([t.Property()],i.prototype,"name",void 0),i}(t.ChildProperty),yt=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)}}(),vt=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},It=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return yt(i,e),vt([t.Property(!0)],i.prototype,"allowSearchOnTyping",void 0),vt([t.Property("contains")],i.prototype,"filterType",void 0),vt([t.Property(!0)],i.prototype,"ignoreCase",void 0),vt([t.Property(null)],i.prototype,"placeholder",void 0),i}(t.ChildProperty),Ot=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},Dt=[{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:t.initializeCSPTemplate(function(e){return'<span class="e-fe-size">'+e.size+"</span>"}),format:"n2"}],Ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ot(i,e),wt([t.Property(!0)],i.prototype,"columnResizing",void 0),wt([t.Property(Dt)],i.prototype,"columns",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)}}(),jt=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},xt=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],Pt=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],Nt=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return St(i,e),jt([t.Property(xt)],i.prototype,"file",void 0),jt([t.Property(Pt)],i.prototype,"folder",void 0),jt([t.Property(Nt)],i.prototype,"layout",void 0),jt([t.Property(!0)],i.prototype,"visible",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=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Rt(i,e),Mt([t.Property("650px")],i.prototype,"maxWidth",void 0),Mt([t.Property("240px")],i.prototype,"minWidth",void 0),Mt([t.Property(!0)],i.prototype,"visible",void 0),Mt([t.Property("None")],i.prototype,"sortOrder",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)}}(),Lt=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},At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Tt(i,e),Lt([t.Property("")],i.prototype,"allowedExtensions",void 0),Lt([t.Property(!0)],i.prototype,"autoUpload",void 0),Lt([t.Property(!1)],i.prototype,"autoClose",void 0),Lt([t.Property(!1)],i.prototype,"directoryUpload",void 0),Lt([t.Property(0)],i.prototype,"minFileSize",void 0),Lt([t.Property(3e7)],i.prototype,"maxFileSize",void 0),i}(t.ChildProperty),Ft=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)}}(),Ut=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},Vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),Ut([t.Property("")],i.prototype,"field",void 0),Ut([t.Property("")],i.prototype,"headerText",void 0),Ut([t.Property("")],i.prototype,"width",void 0),Ut([t.Property("")],i.prototype,"minWidth",void 0),Ut([t.Property("")],i.prototype,"maxWidth",void 0),Ut([t.Property("Left")],i.prototype,"textAlign",void 0),Ut([t.Property(null)],i.prototype,"headerTextAlign",void 0),Ut([t.Property(null)],i.prototype,"type",void 0),Ut([t.Property(null)],i.prototype,"format",void 0),Ut([t.Property(null)],i.prototype,"template",void 0),Ut([t.Property(null)],i.prototype,"sortComparer",void 0),Ut([t.Property(null)],i.prototype,"headerTemplate",void 0),Ut([t.Property(!0)],i.prototype,"allowSorting",void 0),Ut([t.Property(!0)],i.prototype,"allowResizing",void 0),Ut([t.Property(null)],i.prototype,"customAttributes",void 0),Ut([t.Property("")],i.prototype,"hideAtMedia",void 0),Ut([t.Property(null)],i.prototype,"customFormat",void 0),Ut([t.Property(!1)],i.prototype,"isPrimaryKey",void 0),i}(t.ChildProperty),_t="_toolbar",Ht="_layout",Bt="_tree",zt="_grid",qt="_largeicons",Wt="_dialog",Kt="_img_dialog",Gt="_extn_dialog",Yt="_upload_dialog",Jt="_contextmenu",Qt="_content",Xt="_breadcrumbbar",$t="_upload",Zt="e-filemanager",ei="e-control",ti="e-fe-cb-select",ii="e-fe-popup",ni="e-fe-mobile",si="e-fe-popup e-fe-mobile",ai="e-fe-m-select",ri="e-fe-m-filter",oi="e-layout-content",li="e-large-icons",hi="e-toolbar-item",di="e-list-item",pi="e-list-text",ci="e-list-parent",ui="e-icons e-fe-tick",fi="e-icons e-fe-dot",gi="e-blur",mi="e-active",bi="e-hover",yi="e-focus",vi="e-focused",Ii="e-check",Oi="e-checkbox-wrapper",wi="e-row",Di="e-empty",Ci="e-empty-content",Si="e-empty-inner-content",ji="e-fe-clone",xi="e-fe-drop-folder",Pi="e-fe-drop-file",Ni="e-fe-folder",Ei="e-fe-image",Ri="e-fe-music",Mi="e-fe-video",ki="e-large-icon",Ti="e-empty-icon e-fe-folder",Li="e-gridheader",Ai="e-treeview",Fi="e-menu-item",Ui="e-menu-icon",Vi="e-content",_i="e-gridcontent",Hi="e-list-parent",Bi="e-icons e-fe-open",zi="e-icons e-fe-upload",qi="e-icons e-fe-cut",Wi="e-icons e-fe-copy",Ki="e-icons e-fe-paste",Gi="e-icons e-fe-delete",Yi="e-icons e-fe-rename",Ji="e-icons e-fe-newfolder",Qi="e-icons e-fe-details",Xi="e-icons e-fe-sort",$i="e-icons e-fe-refresh",Zi="e-icons e-fe-select",en="e-icons e-fe-download",tn="e-icons e-fe-grid",nn="e-icons e-fe-large",sn="e-icons e-fe-breadcrumb",an="e-icons e-fe-clear",rn="e-icons",on="e-fe-errorcontent",ln="e-display-none",hn="e-fullrow",dn="e-split-bar",pn="e-headercheck",cn="e-fe-value",un="isFile",fn="model-changed",gn="initial-end",mn="finalize-end",bn="create-end",yn="filter-end",vn="path-drag",In="delete-init",On="delete-end",wn="refresh-end",Dn="resize-end",Cn="splitter-resize",Sn="path-changed",jn="destroy",xn="before-request",Pn="skip-upload",Nn="after-request",En="layout-refresh",Rn="actionFailure",Mn="search",kn="open-init",Tn="open-end",Ln="selection-changed",An="select-all-init",Fn="clear-all-init",Un="clear-path-init",Vn="layout-change",_n="sort-by-change",Hn="node-expand",Bn="details-init",zn="menu-item-data",qn="rename-init",Wn="rename-end-parent",Kn="rename-end",Gn="show-paste",Yn="hide-paste",Jn="selected-data",Qn="cut-copy-init",Xn="paste-init",$n="paste-end",Zn="cut-end",es="hide-layout",ts="update-tree-selection",is="sort-column",ns="path-column",ss="search-change",as="download-init",rs="drop-init",os="drag-end",ls="drop-path",hs="dragging",ds="update-selection-data",ps="method-call",cs="read",us="write",fs="writeContents",gs="upload",ms="download",bs=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isSelectAllCalled=!1,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=t.select("#"+this.parent.element.id+qt,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:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"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(es,{});var i=t.select("#"+this.parent.element.id+qt,this.parent.element),a=t.select("ul",i);if(a&&t.remove(a),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.parent.sortComparer&&"None"!==this.parent.sortBy?this.items=this.allItems=s.DataUtil.sort(this.items,this.parent.sortBy,this.comparer.bind(this)):this.items=this.allItems=T(this.parent,this.items),i.classList.remove(ln),this.parent.enableVirtualization&&this.allItems.length>0&&(this.element.style.height||this.adjustHeight(),this.parent.virtualizationModule.setUIVirtualization()),this.listElements=o.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(t.selectAll("."+di,this.listElements)),this.element.appendChild(this.listElements),this.listElements.setAttribute("aria-label","listbox"),this.preventImgDrag(),this.createDragObj(),0===this.itemList.length){var r=this.element.querySelector("."+ci);this.element.removeChild(r),A(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+Di)&&this.element.removeChild(this.element.querySelector("."+Di));!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.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var l=this.element.querySelectorAll("."+mi);0!==l.length&&(this.parent.activeModule="largeiconsview");for(var h=0;h<l.length;h++)l[h].setAttribute("aria-selected","true");this.adjustHeight(),this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.parent.enableVirtualization&&this.allItems.length>0&&(this.parent.virtualizationModule.setUlElementHeight(),this.parent.virtualizationModule.wireScrollEvent(!1)),this.isRendered=!0,n.hideSpinner(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},e.prototype.comparer=function(e,t,i,n){if("Descending"===this.parent.sortOrder){var s=e;e=t,t=s}return this.parent.sortComparer(e,t)},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.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!1,dragTarget:"."+ki,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:te.bind(this,this.parent),drag:oe.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("."+mi);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 O(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+Qt,this.parent.element),i=t.select("#"+this.parent.element.id+Xt,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("."+pi),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.showItemCheckBoxes){var i=r.createCheckBox(t.createElement,!1,{checked:!1,cssClass:"e-small"});i.setAttribute("role","checkbox"),i.setAttribute("aria-checked","false"),i.setAttribute("aria-label","checkbox"),e.item.firstElementChild.insertBefore(i,e.item.firstElementChild.childNodes[0])}},e.prototype.onLayoutChange=function(e){if("LargeIcons"===this.parent.view){if(this.destroy(),this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),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("."+mi).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("."+mi);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=he(this.parent,n[i]),o=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?ki+" e-active":ki;if(ye(n[i])||(o+=" "+me(n[i])),s===Ei&&this.parent.showThumbnail&&be(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(),this.parent.activeModule="largeiconsview")},e.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},e.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&Ne(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&&(I(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(ln)},e.prototype.onSelectAllInit=function(){if("LargeIcons"===this.parent.view){this.startItem=this.getFirstItem();var e=this.getLastItem();this.doSelection(e,{ctrlKey:!0,shiftKey:!0}),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(Ln,{}),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(_n,{}))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(ns,this.onPathColumn),this.parent.off(mn,this.onFinalizeEnd),this.parent.off(bn,this.onCreateEnd),this.parent.off(Jn,this.onSelectedData),this.parent.off(In,this.onDeleteInit),this.parent.off(On,this.onDeleteEnd),this.parent.off(wn,this.onRefreshEnd),this.parent.off(Sn,this.onPathChanged),this.parent.off(Vn,this.onLayoutChange),this.parent.off(Mn,this.onSearch),this.parent.off(kn,this.onOpenInit),this.parent.off(Tn,this.onPathChanged),this.parent.off(fn,this.onPropertyChanged),this.parent.off(ps,this.onMethodCall),this.parent.off(Rn,this.onActionFailure),this.parent.off(qn,this.onRenameInit),this.parent.off(Kn,this.onPathChanged),this.parent.off(es,this.onHideLayout),this.parent.off(An,this.onSelectAllInit),this.parent.off(Fn,this.onClearAllInit),this.parent.off(zn,this.onMenuItemData),this.parent.off(xn,this.onBeforeRequest),this.parent.off(Nn,this.onAfterRequest),this.parent.off(Cn,this.splitterResizeHandler),this.parent.off(Dn,this.resizeHandler),this.parent.off(Xn,this.onpasteInit),this.parent.off($n,this.onpasteEnd),this.parent.off(Qn,this.oncutCopyInit),this.parent.off(rs,this.onDropInit),this.parent.off(Bn,this.onDetailsInit),this.parent.off(En,this.onLayoutRefresh),this.parent.off(ls,this.onDropPath),this.parent.off(ds,this.onUpdateSelectionData),this.parent.off(yn,this.onPathChanged))},e.prototype.addEventListener=function(){this.parent.on(ns,this.onPathColumn,this),this.parent.on(mn,this.onFinalizeEnd,this),this.parent.on(bn,this.onCreateEnd,this),this.parent.on(wn,this.onRefreshEnd,this),this.parent.on(Jn,this.onSelectedData,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on(In,this.onDeleteInit,this),this.parent.on(Xn,this.onpasteInit,this),this.parent.on(On,this.onDeleteEnd,this),this.parent.on(Vn,this.onLayoutChange,this),this.parent.on(Mn,this.onSearch,this),this.parent.on(kn,this.onOpenInit,this),this.parent.on(qn,this.onRenameInit,this),this.parent.on(Kn,this.onPathChanged,this),this.parent.on(Tn,this.onPathChanged,this),this.parent.on(fn,this.onPropertyChanged,this),this.parent.on(ps,this.onMethodCall,this),this.parent.on(Rn,this.onActionFailure,this),this.parent.on(es,this.onHideLayout,this),this.parent.on(An,this.onSelectAllInit,this),this.parent.on(Fn,this.onClearAllInit,this),this.parent.on(zn,this.onMenuItemData,this),this.parent.on(xn,this.onBeforeRequest,this),this.parent.on(Nn,this.onAfterRequest,this),this.parent.on(rs,this.onDropInit,this),this.parent.on(Bn,this.onDetailsInit,this),this.parent.on(Cn,this.splitterResizeHandler,this),this.parent.on(Dn,this.resizeHandler,this),this.parent.on($n,this.onpasteEnd,this),this.parent.on(Qn,this.oncutCopyInit,this),this.parent.on(En,this.onLayoutRefresh,this),this.parent.on(ls,this.onDropPath,this),this.parent.on(ds,this.onUpdateSelectionData,this),this.parent.on(yn,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("."+mi);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!==Q(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":S(this.parent);break;case"showFileExtension":case"showHiddenItems":Ce(this.parent,Sn,this.parent.path);break;case"allowMultiSelection":if("LargeIcons"!==this.parent.view)break;S(this.parent);break;case"view":D(this.parent,"LargeIcons")}}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents(),this.startItem=null,this.listElements=null)},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");I(this.parent,"hover"),null!==i&&i.classList.add(bi)},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],ai),i.clickHandler(e))}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=t.closest(i,"."+di);this.multiSelect||i.classList.contains(ci)||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;I(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=t.closest(e,"."+di),s=e.classList;this.parent.isFile=!1;var a="select";if(3!==i.which||t.isNullOrUndefined(n)||!n.classList.contains(mi)){if(t.isNullOrUndefined(n))this.parent.selectedItems.length===this.itemList.length&&(this.isSelectAllCalled=!0),this.clearSelection();else{this.parent.allowMultiSelection&&n.classList.contains(mi)&&(i.ctrlKey||e.classList.contains(Ii))&&(a="unselect"),i.ctrlKey&&i.shiftKey&&(this.isSelectAllCalled=!0);if(!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(var l=r;l>=o;l--)this.addActive(this.itemList[l]);else for(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(mi)?this.removeActive(n):this.addActive(n),this.addFocus(n);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(Ln,{}),this.triggerSelect(a,n)}}t.isNullOrUndefined(n)||(this.isSelectAllCalled=!1,this.updateType(n))}else 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(Ln,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,t.removeClass([this.parent.element],ai)},e.prototype.doOpenAction=function(e){var i=this;if(!t.isNullOrUndefined(e)){var n=t.closest(e,"."+di);if(this.parent.isFile=!1,!t.isNullOrUndefined(n)){this.updateType(n);var s=this.getItemObject(n);if(!be(s))return void ge(this.parent,s,cs);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)===Ei){var a=R(i.parent,s);lt(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);i.parent.oldPath=i.parent.path;var 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("."+Ni,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){var i=this;if(this.isRendered){var n=this.getFocusedItem(),s=this.getFirstItem(),a=this.getLastItem();switch(e.action){case"end":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTo(0,this.element.firstElementChild.scrollHeight),setTimeout(function(){i.navigateItem(i.itemList[i.itemList.length-1])},10)):this.navigateItem(a);break;case"home":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTop=0,setTimeout(function(){i.navigateItem(i.itemList[0])},10)):this.navigateItem(s);break;case"tab":t.isNullOrUndefined(n)?t.isNullOrUndefined(s)||this.addFocus(s):this.addFocus(n);break;case"moveDown":this.navigateDown(n,!0);break;case"moveLeft":this.navigateRight(n,!1);break;case"moveRight":this.navigateRight(n,!0);break;case"moveUp":this.navigateDown(n,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(a,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(s,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(n,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(n,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(n,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(n,e);break;case"space":this.spaceKey(n);break;case"ctrlSpace":case"shiftSpace":case"csSpace":t.isNullOrUndefined(n)||this.doSelection(n,e);break;case"ctrlA":this.ctrlAKey(s,a);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(Bn,{}),Ee(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(),ce(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(!ye(e[t]))return void ge(this.parent,e[t],us);qe(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),pe(this.parent))},e.prototype.updateRenameData=function(){var e=t.select("."+di+"."+mi,this.element),i=this.getItemObject(e);de(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("."+di+"."+yi,this.element)},e.prototype.getActiveItem=function(){return t.select("."+di+"."+mi,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],this.parent.enableVirtualization&&t.isNullOrUndefined(s)){var r=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-bottom"),10),o=this.itemList[0].getBoundingClientRect().height+r;this.element.firstElementChild.scrollTo(this.element.firstElementChild.scrollTop,this.element.firstElementChild.scrollTop+o)}if(t.isNullOrUndefined(s))return e}while(!t.isVisible(s));return s},e.prototype.setFocus=function(e){if(!t.isNullOrUndefined(e)){!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(Ln,{}),this.triggerSelect("select",e))}},e.prototype.spaceKey=function(e){if(!t.isNullOrUndefined(e)&&!e.classList.contains(mi)){!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(Ln,{}),this.triggerSelect("select",e))}},e.prototype.ctrlAKey=function(e,i){if(this.parent.allowMultiSelection&&!t.isNullOrUndefined(e)){this.startItem=e;var n=this.element.querySelector("."+ci),s=n.scrollTop,a=this.getFocusedItem();this.doSelection(i,{ctrlKey:!0,shiftKey:!0}),n.scrollTop=s,t.isNullOrUndefined(a)||this.addFocus(a)}},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(mi)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),t.addClass([e],[mi]),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],[mi]),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 he(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),t.removeClass([i],[yi])),t.addClass([e],[yi]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.showItemCheckBoxes){var n=t.select(".e-frame",e);t.isNullOrUndefined(n)||(i?n.classList.contains(Ii)||(t.addClass([n],Ii),t.closest(n,"."+Oi).setAttribute("aria-checked","true")):n.classList.contains(Ii)&&(t.removeClass([n],Ii),t.closest(n,"."+Oi).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call(t.selectAll("."+mi,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=[];if(this.isSelectAllCalled)for(var n=0,s=this.itemList.length;n<s;n++)i[n]=this.getItemObject(this.itemList[n]);else i[0]=this.getItemObject(t);var a={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteraction,cancel:!1,target:this.isSelectAllCalled?null:t};return this.parent.trigger("fileSelection",a),this.isInteraction=!0,a},e.prototype.triggerSelect=function(e,t){var i=[];if(this.isSelectAllCalled){for(var n=0,s=this.itemList.length;n<s;n++)i[n]=this.getItemObject(this.itemList[n]);this.isSelectAllCalled=!1}else i[0]=this.getItemObject(t);this.parent.visitedData=i.length>1?i[i.length-1]:i[0];var a={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteracted};this.parent.trigger("fileSelect",a),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++){this.doSelection(this.itemList[t[i]],{ctrlKey:!0,shiftKey:!1})}},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]);this.doSelection(this.itemList[a],{ctrlKey:!0,shiftKey:!1})}},e.prototype.updateSelectedData=function(){for(var e=[],i=t.selectAll("."+di+"."+mi,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(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)&&-1===e.indexOf(t.getValue(s,this.items[a]))||i.push(a)}return i},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))this.performDelete();else{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]=he(this.parent,n[a]);ue(this.parent,n,s)}}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))this.doDownload();else{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]=he(this.parent,n[a]);fe(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))this.performRename();else{var n=this.getItemsIndex([e]);n.length>0&&(de(this.parent,this.items[n[0]]),t.isNullOrUndefined(i)?pe(this.parent):ye(this.parent.itemData[0])?xe(this.parent,this.parent.path,i):ge(this.parent,this.parent.itemData[0],us))}},e}(),ys=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)||w(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:rn});s.appendChild(d)}a-o!=1?(l=t.createElement("a",{className:pi}),s.setAttribute("tabindex","0")):l=t.createElement("span",{className:pi}),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":_(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:_(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 I=this.searchObj.element.nextElementSibling;t.EventHandler.add(I,"mousedown",this.searchChangeHandler.bind(this),this),t.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)}var O=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");if(h-=this.searchWrapWidth?this.searchWrapWidth:O.offsetWidth,p>h){for(u=i.length;u--;){var w=h-c[u];if(!(w>40)){for(var D=[],C=0;C<=u;C++){var S=i[C];D.push({text:S.innerText,utext:S.getAttribute("data-utext")})}var j=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),x=this.parent.createElement("button",{className:"e-breadcrumb-submenu"});j.appendChild(x),d.insertBefore(j,d.querySelector("li")),this.subMenuObj=new l.DropDownButton({items:D,cssClass:"e-caret-hide e-submenu",iconCss:sn,iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(x);break}d.insertBefore(i[u],d.querySelector("li")),h=w}this.parent.breadCrumbBarNavigation.insertBefore(d,O)}else this.parent.breadCrumbBarNavigation.insertBefore(e,O)},e.prototype.onFocus=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(ns,{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(){w(i.parent,e.value,!1)},300)):w(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]),Ce(this.parent,Sn,s);var a=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify(ts,{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(ri))t.removeClass([this.parent.element],ri),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,t.addClass([this.parent.element],ri),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(fn,this.onPropertyChanged,this),t.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(jn,this.destroy,this),this.parent.on(Sn,this.onUpdatePath,this),this.parent.on(mn,this.onUpdatePath,this),this.parent.on(wn,this.onUpdatePath,this),this.parent.on(Tn,this.onUpdatePath,this),this.parent.on(bn,this.onCreateEnd,this),this.parent.on(Kn,this.onRenameEnd,this),this.parent.on(On,this.onDeleteEnd,this),this.parent.on(Cn,this.onResize,this),this.parent.on($n,this.onPasteEnd,this),this.parent.on(Dn,this.onResize,this),this.parent.on(ss,this.onSearchTextChange,this),this.parent.on(rs,this.onDropInit,this),this.parent.on(En,this.onResize,this),this.parent.on(ls,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(Sn,this.onUpdatePath),this.parent.off(mn,this.onUpdatePath),this.parent.off(wn,this.onUpdatePath),this.parent.off(Tn,this.onUpdatePath),this.parent.off($n,this.onPasteEnd),this.parent.off(bn,this.onCreateEnd),this.parent.off(Kn,this.onRenameEnd),this.parent.off(On,this.onDeleteEnd),this.parent.off(Cn,this.onResize),this.parent.off(Dn,this.onResize),this.parent.off(ss,this.onSearchTextChange),this.parent.off(rs,this.onDropInit),this.parent.off(En,this.onResize),this.parent.off(ls,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(ts,{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=null!=this.parent.searchSettings.placeholder?this.parent.searchSettings.placeholder:_(this.parent,"Search")+" "+_(this.parent,e.cwd.name.toString())},e}(),vs=function(){function e(e){this.isMenuItemClicked=!1,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:H(this.parent,ii)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+Jt),this.addEventListener()},e.prototype.onBeforeItemRender=function(e){if(e.item.id===this.getMenuId("largeiconsview")){var i=t.createElement("span");(n=e.element).insertBefore(i,"LargeIcons"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",nn+" "+Ui)}if(e.item.id===this.getMenuId("detailsview")){var n;i=t.createElement("span");(n=e.element).insertBefore(i,"Details"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",tn+" "+Ui)}},e.prototype.onBeforeClose=function(){if(this.menuTarget=null,!this.isMenuItemClicked&&this.parent.pathId.length>1&&"navigationpane"==this.parent.activeModule){this.parent.pathId.pop();for(var e=[],i=0,n=Object.keys(this.parent.feParent);i<n.length;i++){var s=n[i],a=t.getValue(s,this.parent.feParent);-1!==this.parent.pathNames.indexOf(a.name)&&e.push(a._fm_id)}this.parent.pathId.push(e[e.length-1]),this.parent.navigationpaneModule.treeObj.selectedNodes=[this.parent.pathId[this.parent.pathId.length-1]]}this.isMenuItemClicked=!1},e.prototype.onBeforeOpen=function(e){var i,n,s=this,a=!1,r=!1,o=e.event.target;this.menuTarget=this.targetNodeElement=o,this.currentElement=e.element,o.classList.contains("e-spinner-pane")&&(o=this.parent.navigationpaneModule.activeNode.getElementsByClassName(hn)[0],this.menuTarget=this.targetNodeElement=o),this.targetElement="Details"===this.parent.view?t.closest(o,"tr.e-row"):o,this.parent.enableVirtualization&&(o.classList.contains("e-virtual-bottom")||o.classList.contains("e-virtualtable"))&&(o=o.parentElement.closest("div"));var l=this.getTargetView(o);if(this.updateActiveModule(),o.classList.contains(Ai)||t.closest(o,"th")||t.closest(o,"#"+this.parent.element.id+Xt)||t.closest(o,"#"+this.parent.element.id+_t))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,"."+Di))this.setLayoutItem(o);else if(!o.classList.contains(Fi)&&!o.classList.contains(Ui)&&!o.classList.contains("e-caret")){if("LargeIcons"!==this.parent.view||t.isNullOrUndefined(t.closest(o,"li"))||t.closest(o,"#"+this.parent.element.id+Bt))t.isNullOrUndefined(t.closest(o,"tr.e-row"))?t.closest(o,"#"+this.parent.element.id+Bt)&&(i=t.closest(o,"li").getAttribute("data-uid"),r=!0):(i=this.targetElement.getAttribute("data-uid"),n=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(i).data,t.isNullOrUndefined(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("data-rowindex"),10)]),a=!0);else{t.closest(o,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(o,{ctrlKey:!0,shiftKey:!0}),n=this.parent.visitedData,a=!0}a?!0===t.getValue("isFile",n)?this.setFileItem():this.setFolderItem(!1):r?(this.setFolderItem(!0),i===this.parent.pathId[0]&&this.disabledItems.push("Delete","Rename","Cut","Copy")):"TreeView"===l||"GridView"===l||"LargeIcon"===l?this.setLayoutItem(o):e.cancel=!0}var h=t.select("#"+this.getMenuId("Paste"),this.contextMenu.element);if(e.cancel||this.parent.enablePaste||!h||h.classList.contains("e-disabled")){var d=this.disabledItems.indexOf("Paste");-1!==d&&this.disabledItems.splice(d,1)}else-1===this.disabledItems.indexOf("Paste")&&this.disabledItems.push("Paste");if(e.cancel)this.menuTarget=this.currentElement=null;else{this.contextMenu.dataBind();var p=!1;(o.classList.contains(Fi)||o.classList.contains(Ui)||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};this.currentItems=c.items,this.parent.trigger("menuOpen",c,function(t){p||(s.contextMenu.dataBind(),s.contextMenu.items=t.items,s.contextMenu.dataBind()),s.enableItems(s.disabledItems,!1,!0),e.cancel=t.cancel,t.cancel&&(s.menuTarget=s.targetNodeElement=s.currentElement=null)})}},e.prototype.updateActiveModule=function(){this.parent.activeModule=t.closest(this.menuTarget,"#"+this.parent.element.id+Bt)?"navigationpane":t.closest(this.menuTarget,"#"+this.parent.element.id+zt)?"detailsview":t.closest(this.menuTarget,"#"+this.parent.element.id+qt)?"largeiconsview":this.parent.activeModule},e.prototype.getTargetView=function(e){return e.classList.contains(Ai)?"TreeView":e.classList.contains(Vi)?"GridView":e.classList.contains(Hi)?"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){if(this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map(function(e){return e.trim()})),this.contextMenu.dataBind(),e){var i=t.select('[data-uid="'+this.parent.navigationpaneModule.treeObj.selectedNodes[0]+'"]',this.parent.navigationpaneModule.treeObj.element);this.parent.pathNames[this.parent.pathNames.length-1]===i.querySelector(".e-list-text").innerHTML&&"navigationpane"===this.parent.activeModule&&this.disabledItems.push("Open")}else 1!==this.parent.selectedItems.length&&"navigationpane"!==this.parent.activeModule&&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+qt).getElementsByClassName(Di).length||"Details"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+zt).getElementsByClassName(Di).length?this.disabledItems.push("SelectAll"):this.disabledItems=this.disabledItems.filter(function(e){return"SelectAll"!==e}),0===this.parent.selectedNodes.length&&-1===this.disabledItems.indexOf("Paste")&&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(zn,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(Jn,{}),n="navigationpane"===this.parent.activeModule&&"open"===s?[this.menuItemData]:this.parent.itemData);var a={cancel:!1,element:e.element,fileDetails:n,item:e.item};this.parent.trigger("menuClick",a,function(a){var r;if(!a.cancel)switch(i.isMenuItemClicked=!0,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 o=0;o<n.length;o++)if(!ye(n[o]))return void ge(i.parent,n[o],us);qe(i.parent,"Delete");break;case"download":for(var l=0;l<n.length;l++)if(!Oe(n[l]))return void ge(i.parent,n[l],ms);"navigationpane"===i.parent.activeModule?i.parent.notify(as,{}):i.parent.selectedItems.length>0&&ze(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":ye(n[0])?(i.parent.notify(qn,{}),qe(i.parent,"Rename")):ge(i.parent,n[0],us);break;case"selectall":i.parent.notify(An,{});break;case"refresh":S(i.parent);break;case"open":i.parent.visitedItem&&"navigationpane"!==i.parent.activeModule?i.parent.notify(kn,{target:i.parent.visitedItem}):"navigationpane"===i.parent.activeModule&&(i.parent.visitedItem&&i.parent.notify(kn,{target:i.parent.visitedItem}),i.parent.navigationpaneModule.openFileOnContextMenuClick(t.closest(i.targetNodeElement,"li")));break;case"details":i.parent.notify(Bn,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[],i.parent.navigationpaneModule.openFileOnContextMenuClick(t.closest(i.targetNodeElement,"li"))),Ee(i.parent,r,i.parent.path,"details");break;case"newfolder":we(i.parent);break;case"upload":De(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":B(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=H(this.parent,ii)}}},e.prototype.addEventListener=function(){this.parent.on(jn,this.destroy,this),this.parent.on(fn,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(jn,this.destroy),this.parent.off(fn,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(),this.targetElement=null)},e.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,s=this.getMenuId(e[i]),a=_(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:s,text:a,iconCss:Bi};break;case"Upload":n={id:s,text:a,iconCss:zi};break;case"Cut":n={id:s,text:a,iconCss:qi};break;case"Copy":n={id:s,text:a,iconCss:Wi};break;case"Paste":n={id:s,text:a,iconCss:Ki};break;case"Delete":n={id:s,text:a,iconCss:Gi};break;case"Rename":n={id:s,text:a,iconCss:Yi};break;case"NewFolder":n={id:s,text:a,iconCss:Ji};break;case"Details":n={id:s,text:a,iconCss:Qi};break;case"SortBy":n={id:s,text:a,iconCss:Xi,items:[{id:this.getMenuId("Name"),text:_(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?fi:null},{id:this.getMenuId("Size"),text:_(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?fi:null},{id:this.getMenuId("Date"),text:_(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?fi:null},{separator:!0},{id:this.getMenuId("Ascending"),text:_(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?ui:null},{id:this.getMenuId("Descending"),text:_(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?ui:null},{id:this.getMenuId("None"),text:_(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?ui:null}]};break;case"View":n={id:s,text:a,iconCss:"Details"===this.parent.view?tn:nn,items:[{id:this.getMenuId("largeiconsview"),text:_(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:ui},{id:this.getMenuId("detailsview"),text:_(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?ui:null}]};break;case"Refresh":n={id:s,text:a,iconCss:$i};break;case"SelectAll":n={id:s,text:a,iconCss:Zi};break;case"Download":n={id:s,text:a,iconCss:en};break;default:n={id:s,text:a}}t.push(n)}return t},e.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.split(" ").join("").toLowerCase()},e}(),Is={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"},Os=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)}}(),ws=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},Ds=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.isCut=!1,n.isSearchCut=!1,n.isSearchDrag=!1,n.isPasteError=!1,n.folderPath="",n.isSameAction=!1,n.isFiltered=!1,n.isSortByClicked=!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.dragCount=0,n.droppedObjects=[],n.uploadingCount=0,n.uploadedCount=0,n.isMac=!1,r.Inject(ys,bs,vs),n}Os(s,e),r=s,s.prototype.getModuleName=function(){return"filemanager"},s.prototype.preRender=function(){(t.isNullOrUndefined(this.element.id)||""===this.element.id)&&this.element.setAttribute("id",t.getUniqueID("filemanager")),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(),Is,this.locale)},s.prototype.getPersistData=function(){return this.addOnPersist(["view","path","selectedItems"])},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],name:"Toolbar"}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this],name:"NavigationPane"}),this.view&&e.push({member:"detailsview",args:[this],name:"DetailsView"}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this],name:"ContextMenu"}),this.enableVirtualization&&e.push({member:"virtualization",args:[this],name:"Virtualization"}),e},s.prototype.render=function(){this.initialize();var e=t.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);if(this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,this.setRtl(this.enableRtl),this.addEventListeners(),Ce(this,this.path!==this.originalPath?gn:mn,this.path),this.adjustHeight(),t.isNullOrUndefined(this.navigationpaneModule)){this.splitterObj.collapse(this.enableRtl?1:0);t.select("."+dn,this.element).classList.add(ln)}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],ni),this.allowMultiSelection&&t.addClass([this.element],ti),this.addCssClass(null,this.cssClass),this.renderFileUpload()},s.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+_t});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+Ht,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+Bt});n.appendChild(s);var a=this.createElement("div",{id:this.element.id+Qt,className:oi});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+Xt,className:"e-address"}),a.appendChild(this.breadCrumbBarNavigation);var r=this.createElement("div",{id:this.element.id+zt});a.appendChild(r);var o=this.createElement("div",{id:this.element.id+qt,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+Wt});this.element.appendChild(d);var p=this.createElement("ul",{id:this.element.id+Jt});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+Kt});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+Gt});this.element.appendChild(u);var f=this.createElement("div",{id:this.element.id+Yt});this.element.appendChild(f)},s.prototype.adjustHeight=function(){var e=t.select("#"+this.element.id+_t,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(Cn,{})},s.prototype.splitterAdjust=function(){var e=t.select("."+dn,this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(ln)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(ln))},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+$t,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new n.Dialog({header:_(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:H(this,this.isMobile?si:ii),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+Yt),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+Qt,this.element),asyncSettings:{saveUrl:e,removeUrl:e},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),removing:this.onRemoving.bind(this),canceling:this.onCancel.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,directoryUpload:this.uploadSettings.directoryUpload,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+$t)},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.directoryUpload=this.uploadSettings.directoryUpload,this.uploadObj.dataBind()},s.prototype.onBeforeOpen=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupOpen",t,function(t){e.cancel=t.cancel})},s.prototype.onBeforeClose=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupClose",t,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};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};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},{filename:e.fileData.name}];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.onCancel=function(e){var i=JSON.stringify(t.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:"remove"},{data:i}]},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(!Ie(t))return e.cancel=!0,void ge(this,t,gs);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)],Ce(this,Sn,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||We(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(xn,this.showSpinner,this),this.on(Nn,this.hideSpinner,this),this.on(gn,this.onInitialEnd,this),this.on(Bn,this.onDetailsInit,this),this.on(Pn,this.onFileUploadSuccess,this),t.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},s.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(xn,this.showSpinner),this.off(Nn,this.hideSpinner),this.off(gn,this.onInitialEnd),this.off(Bn,this.onDetailsInit),this.off(Pn,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(Dn,{})},s.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[x(this)],ve(this.itemData[0])?qe(this,"NewFolder"):ge(this,this.itemData[0],fs);break;case"f5":e.preventDefault(),S(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(),-1!=this.toolbarSettings.items.indexOf("Upload")&&t.select("#"+this.element.id+$t,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(Un,{selectedNode:this.pathId[0]}),Ce(this,this.path!==this.originalPath?gn:mn,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(fn,{module:"common",newProp:e,oldProp:i});break;case"allowMultiSelection":this.allowMultiSelection?t.addClass([this.element],ti):(this.selectedItems.length>1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),t.removeClass([this.element],ti)),this.notify(fn,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify(fn,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify(fn,{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(fn,{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(fn,{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(fn,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify(fn,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify(fn,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify(fn,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify(fn,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":case"toolbarItems":this.adjustHeight(),this.notify(fn,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(fn,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify(fn,{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(fn,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":S(this),this.notify(_n,{});break;case"sortBy":S(this),this.notify(_n,{}),"Details"===this.view&&this.notify(is,{});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(jn,{}),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],["e-rtl",ni,ti]),this.element.innerHTML="",this.breadCrumbBarNavigation=null,this.activeElements=null,this.virtualDragElement=null,this.visitedItem=null,e.prototype.destroy.call(this),this.virtualizationModule=null,this.navigationpaneModule=null,this.toolbarModule=null,this.contextmenuModule=null,this.largeiconsviewModule=null,this.detailsviewModule=null,this.breadcrumbbarModule=null)},s.prototype.createFolder=function(e){this.notify(ps,{action:"createFolder"});var t=[x(this)];if(this.itemData=t,e)if(/[/\\|*?"<>:]/.test(e)){qe(this,"Error",{files:null,error:{code:"402",message:_(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}})}else ve(t[0])?Se(this,e):ge(this,t[0],fs);else we(this)},s.prototype.deleteFiles=function(e){this.notify(ps,{action:"deleteFiles",ids:e})},s.prototype.disableToolbarItems=function(e){!t.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!1)},s.prototype.downloadFiles=function(e){this.notify(ps,{action:"downloadFiles",ids:e})},s.prototype.enableToolbarItems=function(e){!t.isNullOrUndefined(e)&&this.toolbarModule&&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(Ln,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),je(this,yn)},s.prototype.getSelectedFiles=function(){return this.notify(ds,{}),this.itemData},s.prototype.openFile=function(e){this.notify(ps,{action:"openFile",id:e})},s.prototype.refreshFiles=function(){S(this)},s.prototype.refreshLayout=function(){this.adjustHeight(),this.notify(En,{})},s.prototype.selectAll=function(){this.notify(ps,{action:"selectAll"})},s.prototype.clearSelection=function(){this.notify(ps,{action:"clearSelection"})},s.prototype.renameFile=function(e,t){this.notify(ps,{action:"renameFile",id:e,newName:t})},s.prototype.uploadFiles=function(){var e=[x(this)];this.itemData=e,De(this)},s.prototype.setRtl=function(e){e?this.addCssClass(null,"e-rtl"):this.addCssClass("e-rtl",null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)};var r;return ws([t.Complex({},ct)],s.prototype,"ajaxSettings",void 0),ws([t.Property(!1)],s.prototype,"allowDragAndDrop",void 0),ws([t.Property(!0)],s.prototype,"allowMultiSelection",void 0),ws([t.Property(!0)],s.prototype,"showItemCheckBoxes",void 0),ws([t.Complex({},Et)],s.prototype,"contextMenuSettings",void 0),ws([t.Property("")],s.prototype,"cssClass",void 0),ws([t.Complex({},Ct)],s.prototype,"detailsViewSettings",void 0),ws([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),ws([t.Property(!1)],s.prototype,"enablePersistence",void 0),ws([t.Property(!1)],s.prototype,"enableVirtualization",void 0),ws([t.Property("400px")],s.prototype,"height",void 0),ws([t.Property("LargeIcons")],s.prototype,"view",void 0),ws([t.Complex({},kt)],s.prototype,"navigationPaneSettings",void 0),ws([t.Property("/")],s.prototype,"path",void 0),ws([t.Property(null)],s.prototype,"popupTarget",void 0),ws([t.Complex({},It)],s.prototype,"searchSettings",void 0),ws([t.Property()],s.prototype,"selectedItems",void 0),ws([t.Property(!0)],s.prototype,"showFileExtension",void 0),ws([t.Property(null)],s.prototype,"rootAliasName",void 0),ws([t.Property(!1)],s.prototype,"showHiddenItems",void 0),ws([t.Property(!0)],s.prototype,"showThumbnail",void 0),ws([t.Property("Ascending")],s.prototype,"sortOrder",void 0),ws([t.Property("name")],s.prototype,"sortBy",void 0),ws([t.Property(null)],s.prototype,"sortComparer",void 0),ws([t.Complex({},mt)],s.prototype,"toolbarSettings",void 0),ws([t.Collection([],bt)],s.prototype,"toolbarItems",void 0),ws([t.Complex({},At)],s.prototype,"uploadSettings",void 0),ws([t.Property("100%")],s.prototype,"width",void 0),ws([t.Event()],s.prototype,"fileLoad",void 0),ws([t.Event()],s.prototype,"fileOpen",void 0),ws([t.Event()],s.prototype,"beforeDownload",void 0),ws([t.Event()],s.prototype,"beforeImageLoad",void 0),ws([t.Event()],s.prototype,"beforePopupClose",void 0),ws([t.Event()],s.prototype,"beforePopupOpen",void 0),ws([t.Event()],s.prototype,"beforeSend",void 0),ws([t.Event()],s.prototype,"created",void 0),ws([t.Event()],s.prototype,"destroyed",void 0),ws([t.Event()],s.prototype,"fileDragStart",void 0),ws([t.Event()],s.prototype,"fileDragging",void 0),ws([t.Event()],s.prototype,"fileDragStop",void 0),ws([t.Event()],s.prototype,"fileDropped",void 0),ws([t.Event()],s.prototype,"fileSelection",void 0),ws([t.Event()],s.prototype,"fileSelect",void 0),ws([t.Event()],s.prototype,"menuClick",void 0),ws([t.Event()],s.prototype,"menuOpen",void 0),ws([t.Event()],s.prototype,"failure",void 0),ws([t.Event()],s.prototype,"popupClose",void 0),ws([t.Event()],s.prototype,"popupOpen",void 0),ws([t.Event()],s.prototype,"success",void 0),ws([t.Event()],s.prototype,"toolbarClick",void 0),ws([t.Event()],s.prototype,"toolbarCreate",void 0),ws([t.Event()],s.prototype,"uploadListCreate",void 0),s=r=ws([t.NotifyPropertyChanges],s)}(t.Component),Cs=function(){return(Cs=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e}).apply(this,arguments)},Ss=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.root=e.parent.root?e.parent.root:e.parent,e.toolbarObj.appendTo("#"+e.parent.element.id+_t)})},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"),this.parent.toolbarItems.length>0&&(t=this.parent.toolbarItems.map(function(e){return e.name})),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(Jn,{}),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,"."+hi))&&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(!ye(n[l]))return void ge(i.parent,n[l],us);qe(i.parent,"Delete");break;case"details":i.parent.notify(Bn,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[]),Ee(i.parent,r,i.parent.path,"details");break;case"paste":i.parent.folderPath="",K(i.parent);break;case"refresh":S(i.parent);break;case"download":ce(i.parent);break;case"rename":ye(n[0])?(i.parent.notify(qn,{}),qe(i.parent,"Rename")):ge(i.parent,n[0],us);break;case"upload":De(i.parent);break;case"selectall":i.parent.notify(An,{});break;case"selection":i.parent.notify(Fn,{})}})}},e.prototype.toolbarCreateHandler=function(){var e=this;if(!t.isNullOrUndefined(t.select("#"+this.getId("SortBy"),this.parent.element))){var i=[{id:this.getPupupId("name"),text:_(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?fi:""},{id:this.getPupupId("size"),text:_(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?fi:""},{id:this.getPupupId("date"),text:_(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?fi:""},{separator:!0},{id:this.getPupupId("ascending"),text:_(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?ui:""},{id:this.getPupupId("descending"),text:_(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?ui:""},{id:this.getPupupId("none"),text:_(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?ui:""}];this.buttonObj=new l.DropDownButton({items:i,cssClass:H(this.parent,ii),select:B.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:Xi}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))}if(!t.isNullOrUndefined(t.select("#"+this.getId("View"),this.parent.element))){var n=[{id:this.getPupupId("large"),text:_(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":ui},{id:this.getPupupId("details"),text:_(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?ui:""}];this.layoutBtnObj=new l.DropDownButton({iconCss:"Details"===this.parent.view?tn:nn,cssClass:H(this.parent,"e-caret-hide "+ii),items:n,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,content:'<span class="e-tbar-btn-text">'+_(this.parent,"View")+"</span>",beforeItemRender:function(t){var i=t.item.iconCss,n=t.item.text===_(e.parent,"View-LargeIcons"),s=i?" e-menu-icon "+i:"";t.element.innerHTML='<span class="'+s+'"></span>'+(n?'<span class="e-icons e-fe-large e-menu-icon"></span>':'<span class="e-icons e-fe-grid e-menu-icon"></span>')+t.item.text;var a=t.element.firstChild;a&&""===a.className&&t.element.removeChild(a)}}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus(),this.parent.portals&&this.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.toolbarObj.portals),this.parent.renderReactTemplates());for(var s=t.selectAll(".e-btn",this.toolbarObj.element),a=function(e){s[e].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},s[e].onkeyup=function(t){13!==t.keyCode||t.target.classList.contains("e-fe-popup")||s[e].click()}},r=0;r<s.length;r++)a(r);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?fi:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?fi:"":e[t].id===this.getPupupId("date")?"dateModified"===this.parent.sortBy||"dateCreated"===this.parent.sortBy?e[t].iconCss=this.parent.sortBy==this.parent.sortBy?fi:"":e[t].iconCss="_fm_modified"===this.parent.sortBy?fi:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?ui:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?ui:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?ui:"")},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=void 0;this.parent.toolbarItems.length>0&&(a=this.getItemModel(this.parent.toolbarItems[parseInt(n.toString(),10)]));var r=this.getId(e[n]),o=_(this.parent,e[n]),l=_(this.parent,"Tooltip-"+e[n]);switch(e[n]){case"|":s={type:"Separator"};break;case"Upload":s={id:r,text:o,tooltipText:l,prefixIcon:zi,showTextOn:i};break;case"SortBy":var h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+o+"</span>";a&&a.text&&(h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+a.text+"</span>"),s={id:r,tooltipText:l,template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+h+"</button>"};break;case"Refresh":s={id:r,text:o,tooltipText:l,prefixIcon:$i,showTextOn:i};break;case"Selection":s={id:r,text:o,tooltipText:l,suffixIcon:an,overflow:"Show",align:"Right"};break;case"View":var d=void 0;d=a&&a.text?a.text:_(this.parent,"View"),s={id:r,tooltipText:l,prefixIcon:"Details"===this.parent.view?tn:nn,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow",template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+d+"></button>"};break;case"Details":s={id:r,tooltipText:l,prefixIcon:Qi,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow"};break;case"NewFolder":s={id:r,text:o,tooltipText:l,prefixIcon:Ji,showTextOn:i};break;case"Cut":s={id:r,text:o,tooltipText:l,prefixIcon:qi,showTextOn:i};break;case"Copy":s={id:r,text:o,tooltipText:l,prefixIcon:Wi,showTextOn:i};break;case"Paste":s={id:r,text:o,tooltipText:l,prefixIcon:Ki,showTextOn:i};break;case"Delete":s={id:r,text:o,tooltipText:l,prefixIcon:Gi,showTextOn:i};break;case"Rename":s={id:r,text:o,tooltipText:l,prefixIcon:Yi,showTextOn:i};break;case"Download":s={id:r,text:o,tooltipText:l,prefixIcon:en,showTextOn:i};break;case"SelectAll":s={id:r,text:o,tooltipText:l,prefixIcon:Zi,showTextOn:i};break;default:s={id:r,text:o,tooltipText:l,template:""}}if(this.parent.toolbarItems.length>0&&a){var p=Cs({},s,a);t.push(p)}else t.push(s)}return t},e.prototype.getItemModel=function(e){var t={};return e.id&&(t.id=e.id),e.text&&(t.text=e.text),e.tooltipText&&(t.tooltipText=e.tooltipText),e.prefixIcon&&(t.prefixIcon=e.prefixIcon),e.cssClass&&(t.cssClass=e.cssClass),"Both"!==e.showTextOn&&(t.showTextOn=e.showTextOn),e.template&&(t.template=e.template),e.disabled&&(t.disabled=e.disabled),"auto"!==e.width&&(t.width=e.width),e.suffixIcon&&(t.suffixIcon=e.suffixIcon),"Left"!==e.align&&(t.align=e.align),"None"!==e.overflow&&(t.overflow=e.overflow),e.htmlAttributes&&(t.htmlAttributes=e.htmlAttributes),"Button"!==e.type&&(t.type=e.type),!0!==e.visible&&(t.visible=e.visible),e.showAlwaysInPopup&&(t.showAlwaysInPopup=e.showAlwaysInPopup),-1!==e.tabIndex&&(t.tabIndex=e.tabIndex),t},e.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},e.prototype.addEventListener=function(){this.parent.on(fn,this.onPropertyChanged,this),this.parent.on(Ln,this.onSelectionChanged,this),this.parent.on(Vn,this.onLayoutChange,this),this.parent.on(Gn,this.showPaste,this),this.parent.on(Yn,this.hidePaste,this),this.parent.on(jn,this.destroy,this),this.parent.on(_n,this.updateSortByButton,this)},e.prototype.reRenderToolbar=function(e){var t=this,i=[];if(this.parent.toolbarItems.length>0?i=this.parent.toolbarItems.map(function(e){return e.name}):void 0!==e.newProp.toolbarSettings.items&&(i=e.newProp.toolbarSettings.items.map(function(e){return e.trim()})),i.length>0){this.items=this.toolbarItemData(this.getItems(i));var n={items:this.items};this.parent.trigger("toolbarCreate",n,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&&!this.parent.enableVirtualization){var i=void 0;i=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+_(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+_(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?tn:nn;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?ui:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?ui:"")}},e.prototype.removeEventListener=function(){this.parent.off(fn,this.onPropertyChanged),this.parent.off(Ln,this.onSelectionChanged),this.parent.off(Vn,this.onLayoutChange),this.parent.off(Gn,this.showPaste),this.parent.off(Yn,this.hidePaste),this.parent.off(jn,this.destroy),this.parent.off(_n,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=H(this.parent,ii)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=H(this.parent,"e-caret-hide "+ii));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":case"toolbarItems":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}(),js=function(){function e(e){this.filemanagerInstance=e,this.largeIconInstance=e.largeiconsviewModule}return e.prototype.setUIVirtualization=function(){var e=this.largeIconInstance.items,i=e.slice(0,1),n=o.ListBase.createListFromJson(t.createElement,i,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+di,n)),this.largeIconInstance.element.appendChild(n),0!==this.itemList.length&&this.largeIconInstance.element.querySelector("."+Di)&&this.largeIconInstance.element.removeChild(this.largeIconInstance.element.querySelector("."+Di)),this.itemCount=this.getItemCount(Object.keys(this.largeIconInstance.allItems).length),this.largeIconInstance.element.firstChild.remove(),this.largeIconInstance.items=e.slice(0,this.itemCount)},e.prototype.setUlElementHeight=function(){this.lastRowCount=(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount?(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount:this.rowItemCount,this.topElement=this.filemanagerInstance.createElement("div"),this.topElement.classList.add("e-virtual-top"),this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement,this.largeIconInstance.element.firstElementChild.firstChild),this.bottomElement=this.filemanagerInstance.createElement("div"),this.bottomElement.classList.add("e-virtual-bottom"),this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement,null);var e=parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-bottom"),10);this.listItemHeight=this.largeIconInstance.itemList[0].getBoundingClientRect().height+e,this.totalHeight=Object.keys(this.largeIconInstance.allItems).length/this.rowItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.renderedCount=this.itemCount},e.prototype.getItemCount=function(e){var i=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-right"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-left"),10);this.rowItemCount=Math.floor(parseFloat(t.formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth))/(this.itemList[0].offsetWidth+i));var n=this.rowItemCount*Math.round(parseFloat(t.formatUnit(this.largeIconInstance.element.clientHeight))/this.itemList[0].offsetHeight);return n>e&&(n=e),n},e.prototype.wireScrollEvent=function(e){e?t.EventHandler.remove(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll):t.EventHandler.add(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll,this)},e.prototype.onVirtualUiScroll=function(){var e;this.scrollPosition=t.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var i=this.getscrollerHeight(0);if(this.topElementHeight=this.listItemHeight*Math.floor(i/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,e=i<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=e[0],this.bottomElementHeight=e[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",i>this.scrollPosition){var n=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff);this.onNormalScroll(n,!0)}else{n=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight);this.onNormalScroll(n,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),this.scrollPosition=i,this.largeIconInstance.itemList=Array.prototype.slice.call(t.selectAll("."+di,this.largeIconInstance.element)),this.largeIconInstance.items=this.largeIconInstance.allItems.slice(this.renderedCount-this.itemCount,this.renderedCount)},e.prototype.getscrollerHeight=function(e){return this.largeIconInstance.element.firstElementChild.scrollTop-e<=0?0:this.largeIconInstance.element.firstElementChild.scrollTop-e},e.prototype.onNormalScroll=function(e,t){for(var i=0;i<e;i++)this.updateUI(t)},e.prototype.updateUI=function(e){var i=this;if(e){if(this.items=this.largeIconInstance.allItems.slice(this.renderedCount,this.renderedCount+this.rowItemCount),this.items.length>0){var n=o.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+di,n)),this.itemList.forEach(function(e){i.largeIconInstance.element.firstElementChild.insertBefore(e,i.bottomElement)}),this.renderedCount=this.largeIconInstance.allItems.length>=this.renderedCount+this.rowItemCount?this.renderedCount+this.rowItemCount:this.renderedCount+this.lastRowCount;for(var s=0;s<this.rowItemCount;s++)t.detach(this.topElement.nextElementSibling)}}else{var a=void 0,r=void 0;this.renderedCount===this.largeIconInstance.allItems.length?(a=this.renderedCount-(this.itemCount-this.rowItemCount+this.lastRowCount),this.renderedCount=this.renderedCount-this.lastRowCount<this.itemCount?this.itemCount:this.renderedCount-this.lastRowCount,r=!0):(a=this.renderedCount-this.itemCount,this.renderedCount=this.renderedCount-this.rowItemCount<this.itemCount?this.itemCount:this.renderedCount-this.rowItemCount);var l=a-this.rowItemCount>0?a-this.rowItemCount:0;if(this.items=this.largeIconInstance.allItems.slice(l,a),this.items.length>0){n=o.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+di,n));for(var h=this.itemList.length;h>0;h--)this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[h-1],this.topElement.nextElementSibling);for(s=0;s<(r?this.lastRowCount:this.rowItemCount);s++)t.detach(this.bottomElement.previousElementSibling)}}},e.prototype.getModuleName=function(){return"virtualization"},e.prototype.destroy=function(){this.filemanagerInstance.isDestroyed||t.isNullOrUndefined(this.largeIconInstance.element.firstElementChild)||this.wireScrollEvent(!0)},e}(),xs=function(){function e(e){this.removeNodes=[],this.moveNames=[],this.expandTree=!1,this.isDrag=!1,this.isPathDragged=!1,this.isRenameParent=!1,this.isRightClick=!1,this.isSameNodeClicked=!1,this.isNodeExpandCalled=!1,this.renameParent=null,this.previousSelected=null,this.isNodeClickCalled=!1,this.restrictSelecting=!1,this.parent=e,this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"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),ye(e)||t.setValue("class",me(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,sortOrder:this.parent.navigationPaneSettings.sortOrder,nodeSelecting:this.onNodeSelecting.bind(this),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+Bt),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:"."+hn,distance:5,dragArea:this.parent.element,drag:oe.bind(this,this.parent),dragStart:function(t){ie(e.parent,t,e.dragObj)},dragStop:te.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!1,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(hn))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=[],O(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 J(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&&(null==s[0].filterPath||null==this.getTreeData(i)[0].filterPath||s[0].filterPath!==this.getTreeData(i)[0].filterPath)){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),ye(r[a])||t.setValue("class",me(r[a]),o),t.isNullOrUndefined(o)||t.setValue("_fm_htmlAttr",o,r[a]),a++}var h=t.select('[data-uid="'+i+'"]',this.treeObj.element),d=t.select("ul",h);t.isNullOrUndefined(d)&&this.treeObj.addNodes(s,i,null,n)}},e.prototype.onNodeSelecting=function(e){if(!e.isInteracted&&!this.isRightClick&&!this.isSameNodeClicked&&!this.isPathDragged&&!this.isRenameParent||this.restrictSelecting)return this.restrictSelecting=!1,void(this.isNodeClickCalled=!1);if(!this.renameParent){this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));if(e.node.getAttribute("data-uid")!==this.parent.pathId[this.parent.pathId.length-1]&&!this.isRightClick&&!this.isNodeClickCalled||this.isSameNodeClicked){if(this.isNodeClickCalled=!1,!this.isSameNodeClicked){this.isSameNodeClicked=!0;var n={action:e.action,fileDetails:i[0],isInteracted:e.isInteracted};this.parent.trigger("fileSelect",n)}if(!this.isRightClick){var s={cancel:!1,fileDetails:i[0],module:"NavigationPane"};this.parent.trigger("fileOpen",s),e.cancel=s.cancel}e.cancel&&(this.restrictSelecting=!!this.isNodeClickCalled&&this.previousSelected[0]!==e.node.getAttribute("data-uid"),this.isNodeClickCalled=!0,this.isSameNodeClicked=!1,this.previousSelected=this.treeObj.selectedNodes,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")])}else if(this.previousSelected[0]!==e.node.getAttribute("data-uid")){n={action:e.action,fileDetails:i[0],isInteracted:this.isNodeClickCalled};this.parent.trigger("fileSelect",n)}}},e.prototype.openFileOnContextMenuClick=function(e){var t=this.treeObj.getTreeData(e);this.parent.selectedItems=[],this.parent.itemData=t,this.activeNode=e,this.parent.activeModule="navigationpane";var i={cancel:!1,fileDetails:t[0],module:"NavigationPane"};this.parent.trigger("fileOpen",i),this.isNodeClickCalled=!0,i.cancel||(p(e,this.parent.itemData[0],this.parent),Ce(this.parent,this.isPathDragged?$n:Sn,this.parent.path),this.parent.visitedItem=e,this.isPathDragged=this.isRenameParent=this.isRightClick=!1,this.treeObj.selectedNodes=[e.getAttribute("data-uid")])},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.isNodeClickCalled=!1),this.parent.searchedItems=[],e.isInteracted||this.isRightClick||this.isSameNodeClicked||this.isPathDragged||this.isRenameParent){this.activeNode=e.node,this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));this.parent.selectedItems=[],this.parent.itemData=i;var n=this.parent.path;!this.isRightClick&&this.isSameNodeClicked?p(e.node,this.parent.itemData[0],this.parent):(this.parent.pathId=u(e.node),this.parent.visitedItem=e.node),e.node.querySelector("."+rn)&&null===e.node.querySelector("."+di)&&(this.expandNodeTarget="add"),n!==this.parent.path&&(!this.isRightClick&&this.isSameNodeClicked&&(Ce(this.parent,this.isPathDragged?$n:Sn,this.parent.path),this.isNodeClickCalled=!0),this.parent.visitedItem=e.node),this.isPathDragged=this.isRenameParent=this.isRightClick=this.isSameNodeClicked=!1}else this.parent.pathId=u(e.node)},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("."+di)){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)),this.parent.pathId.push(t.getValue("id",e.nodeData)),Ce(this.parent,Hn,r),this.isNodeExpandCalled=!0}},e.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null,this.isNodeExpandCalled=!1},e.prototype.onNodeClicked=function(e){if(this.parent.activeModule="navigationpane",this.previousSelected=this.treeObj.selectedNodes,this.activeNode=e.node,3===e.event.which&&e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0])this.isRightClick=!0,this.isNodeClickCalled=!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(fn,{module:t,newProp:{selectedItems:[]}})}else e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0]||this.isNodeClickCalled||this.isNodeExpandCalled||(3===e.event.which&&(this.isRightClick=!0),this.isSameNodeClicked=!0,this.isNodeClickCalled=!0,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")])},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.isNullOrUndefined(n)?null:t.select("."+ci,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),this.parent.uploadObj.directoryUpload&&!this.parent.hasId&&this.updateTree(e)},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("."+ci,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("."+rn)&&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.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]);Ne(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,"."+ci).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){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),Ce(this.parent,Wn,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":Ce(this.parent,mn,"/"),e.oldProp.navigationPaneSettings.sortOrder!==e.newProp.navigationPaneSettings.sortOrder&&(this.treeObj.sortOrder=e.newProp.navigationPaneSettings.sortOrder)}}},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){var i=this.treeObj.getTreeData().filter(function(t){return t.name===e.name})[0];this.treeObj.selectedNodes=[t.getValue("_fm_id",i)],this.treeObj.dataBind()}else{var n=t.getValue("filterPath",e),a=t.getValue("name",e),r=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",a,!1));if(r.length>0){var o=new s.DataManager(r).executeLocal((new s.Query).where("filterPath","equal",n,!1));if(o.length>0){var l=t.getValue(this.treeObj.fields.id,o[0]);this.treeObj.selectedNodes=[l],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(Q(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(fn,this.onPropertyChanged,this),this.parent.on(as,this.onDownLoadInit,this),this.parent.on(gn,this.onInitialEnd,this),this.parent.on(mn,this.onFinalizeEnd,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on($n,this.onpasteEnd,this),this.parent.on(Zn,this.onCutEnd,this),this.parent.on(Xn,this.onpasteInit,this),this.parent.on(Hn,this.onNodeExpanded,this),this.parent.on(bn,this.onCreateEnd,this),this.parent.on(Jn,this.onSelectedData,this),this.parent.on(In,this.onDeleteInit,this),this.parent.on(On,this.onDeleteEnd,this),this.parent.on(wn,this.onRefreshEnd,this),this.parent.on(ts,this.onSelectionChanged,this),this.parent.on(kn,this.onOpenInit,this),this.parent.on(Tn,this.onOpenEnd,this),this.parent.on(jn,this.destroy,this),this.parent.on(qn,this.onRenameInit,this),this.parent.on(Kn,this.onRenameEnd,this),this.parent.on(Wn,this.onRenameEndParent,this),this.parent.on(Un,this.onClearPathInit,this),this.parent.on(Qn,this.oncutCopyInit,this),this.parent.on(rs,this.onDropInit,this),this.parent.on(zn,this.onMenuItemData,this),this.parent.on(os,this.onDragEnd,this),this.parent.on(hs,this.onDragging,this),this.parent.on(ls,this.onDropPath,this),this.parent.on(Bn,this.onDetailsInit,this),this.parent.on(vn,this.onPathDrag,this)},e.prototype.removeEventListener=function(){this.parent.off(gn,this.onInitialEnd),this.parent.off(as,this.onDownLoadInit),this.parent.off(mn,this.onFinalizeEnd),this.parent.off(Jn,this.onSelectedData),this.parent.off(fn,this.onPropertyChanged),this.parent.off(Sn,this.onPathChanged),this.parent.off($n,this.onpasteEnd),this.parent.off(Zn,this.onCutEnd),this.parent.off(Xn,this.onpasteInit),this.parent.off(ts,this.onSelectionChanged),this.parent.off(Hn,this.onNodeExpanded),this.parent.off(bn,this.onCreateEnd),this.parent.off(wn,this.onRefreshEnd),this.parent.off(kn,this.onOpenInit),this.parent.off(Tn,this.onOpenEnd),this.parent.off(jn,this.destroy),this.parent.off(qn,this.onRenameInit),this.parent.off(Kn,this.onRenameEnd),this.parent.off(Wn,this.onRenameEndParent),this.parent.off(Un,this.onClearPathInit),this.parent.off(In,this.onDeleteInit),this.parent.off(On,this.onDeleteEnd),this.parent.off(Qn,this.oncutCopyInit),this.parent.off(rs,this.onDropInit),this.parent.off(os,this.onDragEnd),this.parent.off(hs,this.onDragging),this.parent.off(ls,this.onDropPath),this.parent.off(Bn,this.onDetailsInit),this.parent.off(zn,this.onMenuItemData),this.parent.off(vn,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(Bn,{}),Ee(this.parent,[],this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":this.parent.pathId[0]!==this.activeNode.getAttribute("data-uid")&&(this.updateItemData(),ye(this.parent.itemData[0])?(this.removeNodes=[],qe(this.parent,"Delete")):ge(this.parent,this.parent.itemData[0],us));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 ge(this.parent,this.parent.itemData[0],ms);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];ye(t)?(this.updateRenameData(),qe(this.parent,"Rename")):ge(this.parent,t,us)}}},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=J(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},e.prototype.doDownload=function(){var e=J(this.parent.path),i=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":t.getValue("name",this.parent.itemData[0]);ze(this.parent,e,[i])},e}(),Ps=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+zt,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:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"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],ai);var i=T(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},enableVirtualization:this.parent.enableVirtualization,enablePersistence:this.parent.enablePersistence,enableVirtualMaskRow:!0,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%",height:this.parent.enableVirtualization?this.getGridHeight():"auto",beforeCopy:function(e){e.cancel=!0},load:function(e){this.focusModule.destroy()},locale:this.parent.locale}),this.parent.isReact&&(this.gridObj.isReact=!0,this.gridObj.portals=[],this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),this.gridObj.isStringTemplate=!0,this.gridObj.appendTo("#"+this.parent.element.id+zt),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e}},e.prototype.reactTemplateRender=function(e){this.parent.portals=e,this.parent.portals&&this.parent.toolbarModule&&this.parent.toolbarModule.toolbarObj&&this.parent.toolbarModule.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.parent.toolbarModule.toolbarObj.portals)),this.parent.notify("renderReactTemplate",this.parent.portals),this.parent.renderReactTemplates()},e.prototype.getGridHeight=function(){var e=t.select("#"+this.parent.element.id+Qt,this.parent.element),i=t.select("#"+this.parent.element.id+Xt,this.parent.element);return e.offsetHeight-i.offsetHeight-36},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,i=this.parent.enableHtmlSanitizer;if(this.parent.isMobile)e=[{field:"name",headerText:_(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:t.initializeCSPTemplate(function(e){return'<div class="e-fe-text">'+(i?t.SanitizeHtmlHelper.sanitize(e.name):e.name)+'</div><div class="e-fe-date">'+e._fm_modified+'</div><span class="e-fe-size">'+e.size+"</span>"})}];else{e=t.extend([],this.parent.detailsViewSettings.columns,null,!0),this.adjustWidth(e,"name");for(var n=function(n,a){if(e[n].headerText=_(s.parent,e[n].headerText),"name"===e[n].field&&!t.isNullOrUndefined(e[n].template)&&"function"!=typeof e[n].template){var r=e[n].template;e[n].template=t.initializeCSPTemplate(function(e){var n=i?t.SanitizeHtmlHelper.sanitize(e.name):e.name;return r.replace(/\${name}/g,n)})}},s=this,a=0,r=e.length;a<r;a++)n(a)}var o=this.parent.isMobile||this.parent.isBigger?"54":"46",l={field:"type",width:o,minWidth:o,template:t.initializeCSPTemplate(function(e){return'<span class="e-fe-icon '+e._fm_iconClass+'"></span>'}),allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:t.initializeCSPTemplate(function(){return'<span class="e-fe-icon e-fe-folder"></span>'})};if(e.unshift(l),this.parent.showItemCheckBoxes){var h=this.parent.isBigger?"36":"26",d={type:"checkbox",width:h,minWidth:h,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1};this.parent.isMobile?e.push(d):e.unshift(d)}for(a=0,r=e.length;a<r;a++)e[a].disableHtmlEncode=!this.parent.enableHtmlSanitizer;return e},e.prototype.adjustHeight=function(){if(this.gridObj){var e=t.select("#"+this.parent.element.id+Qt,this.parent.element),i=t.select("#"+this.parent.element.id+Xt,this.parent.element),n=t.select("."+Li,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),p=new t.Internationalization(this.parent.locale),c=void 0;for(n=this.parent.detailsViewSettings.columns,s=0;s<n.length;s++)if("size"===n[s].field){c=t.isNullOrUndefined(n[s].format)?"n":n[s].format.toString();break}h=p.formatNumber(d/1024,{format:c})+" "+_(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")){var u=e.row.querySelector(".e-fe-date"),f=(p=new t.Internationalization(this.parent.locale),n=this.parent.detailsViewSettings.columns,void 0);for(s=0;s<n.length;s++)if("dateModified"===n[s].field){f=n[s].format;break}var g=p.formatDate(new Date(t.getValue("_fm_modified",e.data)),f);u.innerHTML=g}var m=e.row.querySelector("."+Oi);m&&m.classList.add("e-small"),ye(e.data)||(e.row.className+=" "+me(e.data));var b={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",b)},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(_n,{})}},e.prototype.onHeaderCellInfo=function(e){var t=e.node.querySelector("."+Oi);t&&t.classList.add("e-small")},e.prototype.onBeforeDataBound=function(e){var t=this;n.showSpinner(this.parent.element);var i=this.parent.detailsViewSettings.columns.find(function(e){return e.field===t.parent.sortBy});if(i&&!("sortComparer"in i)){var s=T(this.parent,this.parent.enableVirtualization?e.result:this.gridObj.dataSource);e.result=s}},e.prototype.onDataBound=function(){if(this.createDragObj(),(0!==this.parent.selectedItems.length&&!this.parent.enableVirtualization||0!==this.parent.selectedItems.length&&this.parent.enableVirtualization&&0==this.element.querySelector(".e-content").scrollTop)&&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;(i=this.gridObj.getContent().querySelector(".e-content")).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]);if(-1!==e.indexOf(r))n.push(s);else if(!this.parent.showFileExtension&&r.includes(".")){var o=r.split(".").slice(0,-1).join(".");-1!==e.indexOf(o)&&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=T(this.parent,this.gridObj.dataSource),0!==this.element.querySelector(".e-content").scrollTop&&this.gridObj.freezeRefresh()},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(),this.interaction=!0);break;case"showFileExtension":case"showHiddenItems":Ce(this.parent,Sn,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)),I(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,n.showSpinner(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=T(this.parent,e.files),this.gridObj.freezeRefresh(),this.parent.isReact&&this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),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:_(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=T(this.parent,e.files);if(0!==i.length||t.isNullOrUndefined(this.element.querySelector("."+Vi))){if(0!==i.length&&this.element.querySelector("."+Di))if(this.element.querySelector("."+Vi).querySelector("."+Di)){var n=this.element.querySelector("."+Vi).querySelector("."+Di);this.element.querySelector("."+Vi).removeChild(n)}else this.element.removeChild(this.element.querySelector("."+Di))}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(be(e)){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)===Ei){var a=R(i.parent,e);lt(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);i.parent.oldPath=i.parent.path;var 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(),i.parent.enableVirtualization&&i.parent.element.querySelector("#"+i.parent.element.id+Kt).focus()}})}else ge(this.parent,e,cs)},e.prototype.onLayoutChange=function(e){"Details"===this.parent.view&&(this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),this.gridObj?this.isLoaded=!0:this.render(e),this.parent.isFiltered&&(this.updatePathColumn(),this.parent.setProperties({selectedItems:[]},!0)),this.gridObj.dataSource=T(this.parent,e.files),this.parent.notify(es,{}),this.gridObj.element.classList.remove(ln),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(Ln,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},e.prototype.removePathColumn=function(e){var i=this.gridObj.columns.length,n=JSON.parse(JSON.stringify(this.gridObj.columns));n[i-1].field&&"filterPath"===n[i-1].field&&(t.isNullOrUndefined(this.gridObj.sortSettings.columns[0])||"filterPath"!==this.gridObj.sortSettings.columns[0].field||("None"!==this.parent.sortOrder?this.gridObj.sortColumn("name",this.parent.sortOrder):this.gridObj.dataSource=T(this.parent,this.gridObj.dataSource),this.parent.notify(_n,{})),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&&Ne(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=T(this.parent,e.files),this.emptyArgs=e)},e.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(ln)},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],pn),this.parent.selectedItems.length>0&&t.addClass([this.element],pn)},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(mn,this.onFinalizeEnd,this),this.parent.on(jn,this.destroy,this),this.parent.on(Vn,this.onLayoutChange,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on(bn,this.onCreateEnd,this),this.parent.on(rs,this.onDropInit,this),this.parent.on(Bn,this.onDetailsInit,this),this.parent.on(wn,this.onRefreshEnd,this),this.parent.on(Mn,this.onSearchFiles,this),this.parent.on(ps,this.onMethodCall,this),this.parent.on(Rn,this.onActionFailure,this),this.parent.on(fn,this.onPropertyChanged,this),this.parent.on(In,this.onDeleteInit,this),this.parent.on(On,this.onDeleteEnd,this),this.parent.on(Jn,this.onSelectedData,this),this.parent.on(qn,this.onRenameInit,this),this.parent.on(Kn,this.onPathChanged,this),this.parent.on(kn,this.onOpenInit,this),this.parent.on(is,this.onSortColumn,this),this.parent.on(Tn,this.onPathChanged,this),this.parent.on(yn,this.onPathChanged,this),this.parent.on(Xn,this.onPasteInit,this),this.parent.on(es,this.onHideLayout,this),this.parent.on(An,this.onSelectAllInit,this),this.parent.on(Fn,this.onClearAllInit,this),this.parent.on(ns,this.onPathColumn,this),this.parent.on(Ln,this.onSelectionChanged,this),this.parent.on(xn,this.onBeforeRequest,this),this.parent.on(Nn,this.onAfterRequest,this),this.parent.on($n,this.onpasteEnd,this),this.parent.on(Qn,this.oncutCopyInit,this),this.parent.on(zn,this.onMenuItemData,this),this.parent.on(Dn,this.onDetailsResizeHandler,this),this.parent.on(Cn,this.onDetailsResize,this),this.parent.on(En,this.onLayoutRefresh,this),this.parent.on(ls,this.onDropPath,this),this.parent.on(ds,this.onUpdateSelectionData,this)},e.prototype.removeEventListener=function(){this.parent.off(mn,this.onFinalizeEnd),this.parent.off(jn,this.destroy),this.parent.off(Vn,this.onLayoutChange),this.parent.off(Sn,this.onPathChanged),this.parent.off(Xn,this.onPasteInit),this.parent.off(bn,this.onCreateEnd),this.parent.off(wn,this.onRefreshEnd),this.parent.off(Mn,this.onSearchFiles),this.parent.off(ps,this.onMethodCall),this.parent.off(Rn,this.onActionFailure),this.parent.off(fn,this.onPropertyChanged),this.parent.off(qn,this.onRenameInit),this.parent.off(Kn,this.onPathChanged),this.parent.off(yn,this.onPathChanged),this.parent.off(kn,this.onOpenInit),this.parent.off(is,this.onSortColumn),this.parent.off(Tn,this.onPathChanged),this.parent.off(es,this.onHideLayout),this.parent.off(An,this.onSelectAllInit),this.parent.off(Fn,this.onClearAllInit),this.parent.off(In,this.onDeleteInit),this.parent.off(On,this.onDeleteEnd),this.parent.off(ns,this.onPathColumn),this.parent.off(Ln,this.onSelectionChanged),this.parent.off(xn,this.onBeforeRequest),this.parent.off(Nn,this.onAfterRequest),this.parent.off($n,this.onpasteEnd),this.parent.off(Qn,this.oncutCopyInit),this.parent.off(rs,this.onDropInit),this.parent.off(Jn,this.onSelectedData),this.parent.off(Bn,this.onDetailsInit),this.parent.off(zn,this.onMenuItemData),this.parent.off(Dn,this.onDetailsResizeHandler),this.parent.off(Cn,this.onDetailsResize),this.parent.off(En,this.onLayoutRefresh),this.parent.off(ls,this.onDropPath),this.parent.off(ds,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]?i=this.parent.hasId?this.gridObj.getRowInfo(t).rowData.id:t.getElementsByClassName("e-fe-text")[0].innerText:t.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling&&(i=this.parent.hasId?this.gridObj.getRowInfo(t).rowData.id:t.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText),t&&!t.querySelector(".e-active")&&this.selectRecords([i]),O(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.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:"."+wi,drag:oe.bind(this,this.parent),dragStart:function(t){ie(e.parent,t,e.dragObj)},dragStop:te.bind(this,this.parent),enableAutoScroll:!1,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!==Q(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.parent.isReact&&this.gridObj.off("reactTemplateRender",this.reactTemplateRender),this.unWireEvents(),this.gridObj.destroy()))},e.prototype.updateType=function(e){var i=t.select("."+Ni,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(Ln,{}),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(this.parent.enableVirtualization)this.parent.currentItemText=t.getValue("name",e.data);else 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.enableVirtualization&&e.isHeaderCheckboxClicked||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=he(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")}-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),this.isInteracted?(this.selectedRecords(),0===this.parent.selectedItems.length&&(t.setValue("enableSelectMultiTouch",!1,this.gridObj.selectionModule),t.removeClass([this.parent.element],ai)),this.parent.notify(Ln,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null):this.isInteracted=!0},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),t.EventHandler.add(this.parent.element,"focusout",this.onBlur,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),t.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus),t.EventHandler.remove(this.parent.element,"focusout",this.onBlur)},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],ai));var n=e.originalEvent.target;if(n){var s=t.closest(n,"."+wi),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],ai),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(Ln,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},e.prototype.removeFocus=function(){this.addFocus(null)},e.prototype.onBlur=function(e){if((null===e.relatedTarget||t.closest(e.relatedTarget,".e-grid")===e.relatedTarget)&&!t.isNullOrUndefined(this.gridObj.element))for(var i=this.gridObj.element.querySelectorAll("th"),n=0;n<i.length;n++)i[n].classList.contains("e-focus")&&this.addFocus(null)},e.prototype.getFocusedItemIndex=function(){return t.isNullOrUndefined(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("data-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":case"ctrlD":e.preventDefault()}},e.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var i,n,s,a=e.action,r=T(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":this.parent.notify(Bn,{}),Ee(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&&!0===this.gridObj.allowSorting){if(!e.target.classList.contains("e-fe-grid-icon")){var p=e.target.getElementsByClassName("e-ascending").length?"Descending":"Ascending",c=this.gridObj.getColumnByUid(e.target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid")).field;this.gridObj.sortColumn(c,p),t.isNullOrUndefined(this.getFocusedItem().nextSibling)||this.getFocusedItem().nextSibling.setAttribute("tabindex","0")}break}if(i=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data){var u=JSON.parse(JSON.stringify(i));this.openContent(u)}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":if(!t.isNullOrUndefined(r[0])&&this.parent.allowMultiSelection){var f=this.gridObj.getContent().querySelector(".e-content"),g=f.scrollTop,m=this.gridObj.selectedRowIndex;this.gridObj.selectionModule.selectRowsByRange(0,r.length-1),f.scrollTop=g,-1!==m&&this.addFocus(m)}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.addHeaderFocus(e)}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 ge(this.parent,e[t],ms);ze(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(!ye(e[t]))return void ge(this.parent,e[t],us);qe(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),pe(this.parent))},e.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];de(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(var s=e+1;s<=t;s++)n.push(s);else for(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],[yi,vi])),t.isNullOrUndefined(n)||(this.gridObj.element.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[yi,vi]))},e.prototype.addHeaderFocus=function(e){var i=t.select(".e-row",this.element);this.gridObj.element.setAttribute("tabindex","-1");var n;!t.isNullOrUndefined(e.target)&&e.target.classList.contains("e-defaultcursor")?(this.addFocus(0),n=e.target.nextElementSibling):t.isNullOrUndefined(this.gridObj.element.querySelector(".e-focus"))||"TH"!==this.gridObj.element.querySelector(".e-focus").tagName?n=t.select("th.e-fe-grid-icon",this.element):(n=this.gridObj.element.querySelector(".e-focus").nextElementSibling,this.addFocus(0)),t.isNullOrUndefined(n)||(n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[yi,vi]),i.setAttribute("tabindex","0"),0===i.tabIndex&&0===n.tabIndex&&t.removeClass([i],[yi,vi]))},e.prototype.getFocusedItem=function(){return t.select("."+vi,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(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))this.performDelete();else{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]=he(this.parent,n[a]);ue(this.parent,n,s)}}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))this.doDownload();else{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]=he(this.parent,n[a]);fe(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))this.performRename();else{var n=this.getRecords([e]);n.length>0&&(de(this.parent,n[0]),t.isNullOrUndefined(i)?pe(this.parent):ye(this.parent.itemData[0])?xe(this.parent,this.parent.path,i):ge(this.parent,this.parent.itemData[0],us))}},e}();e.AjaxSettings=ct,e.defaultToolbarItems=gt,e.ToolbarSettings=mt,e.ToolbarItem=bt,e.SearchSettings=It,e.columnArray=Dt,e.DetailsViewSettings=Ct,e.fileItems=xt,e.folderItems=Pt,e.layoutItems=Nt,e.ContextMenuSettings=Et,e.NavigationPaneSettings=kt,e.UploadSettings=At,e.Column=Vt,e.TOOLBAR_ID=_t,e.LAYOUT_ID=Ht,e.NAVIGATION_ID="_navigation",e.TREE_ID=Bt,e.GRID_ID=zt,e.LARGEICON_ID=qt,e.DIALOG_ID=Wt,e.ALT_DIALOG_ID="_alt_dialog",e.IMG_DIALOG_ID=Kt,e.EXTN_DIALOG_ID=Gt,e.UPLOAD_DIALOG_ID=Yt,e.RETRY_DIALOG_ID="_retry_dialog",e.CONTEXT_MENU_ID=Jt,e.SORTBY_ID="_sortby",e.VIEW_ID="_view",e.SPLITTER_ID="_splitter",e.CONTENT_ID=Qt,e.BREADCRUMBBAR_ID=Xt,e.UPLOAD_ID=$t,e.RETRY_ID="_retry",e.SEARCH_ID="_search",e.ROOT=Zt,e.CONTROL=ei,e.CHECK_SELECT=ti,e.ROOT_POPUP=ii,e.MOBILE=ni,e.MOB_POPUP=si,e.MULTI_SELECT=ai,e.FILTER=ri,e.LAYOUT="e-layout",e.NAVIGATION="e-navigation",e.LAYOUT_CONTENT=oi,e.LARGE_ICONS=li,e.TB_ITEM=hi,e.LIST_ITEM=di,e.LIST_TEXT=pi,e.LIST_PARENT=ci,e.TB_OPTION_TICK=ui,e.TB_OPTION_DOT=fi,e.BLUR=gi,e.ACTIVE=mi,e.HOVER=bi,e.FOCUS=yi,e.FOCUSED=vi,e.CHECK=Ii,e.FRAME="e-frame",e.CB_WRAP=Oi,e.ROW=wi,e.ROWCELL="e-rowcell",e.EMPTY=Di,e.EMPTY_CONTENT=Ci,e.EMPTY_INNER_CONTENT=Si,e.CLONE=ji,e.DROP_FOLDER=xi,e.DROP_FILE=Pi,e.FOLDER=Ni,e.ICON_IMAGE=Ei,e.ICON_MUSIC=Ri,e.ICON_VIDEO=Mi,e.LARGE_ICON=ki,e.LARGE_EMPTY_FOLDER=Ti,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=Li,e.TEMPLATE_CELL="e-templatecell",e.TREE_VIEW=Ai,e.MENU_ITEM=Fi,e.MENU_ICON=Ui,e.SUBMENU_ICON="e-caret",e.GRID_VIEW=Vi,e.GRID_CONTENT=_i,e.ICON_VIEW=Hi,e.ICON_OPEN=Bi,e.ICON_UPLOAD=zi,e.ICON_CUT=qi,e.ICON_COPY=Wi,e.ICON_PASTE=Ki,e.ICON_DELETE=Gi,e.ICON_RENAME=Yi,e.ICON_NEWFOLDER=Ji,e.ICON_DETAILS=Qi,e.ICON_SHORTBY=Xi,e.ICON_REFRESH=$i,e.ICON_SELECTALL=Zi,e.ICON_DOWNLOAD=en,e.ICON_OPTIONS="e-icons e-fe-options",e.ICON_GRID=tn,e.ICON_LARGE=nn,e.ICON_BREADCRUMB=sn,e.ICON_CLEAR=an,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=rn,e.DETAILS_LABEL="e-detailslabel",e.ERROR_CONTENT=on,e.STATUS="e-status",e.BREADCRUMBS="e-address",e.RTL="e-rtl",e.DISPLAY_NONE=ln,e.COLLAPSED="e-node-collapsed",e.FULLROW=hn,e.ICON_COLLAPSIBLE="e-icon-collapsible",e.SPLIT_BAR=dn,e.HEADER_CHECK=pn,e.OVERLAY="e-fe-overlay",e.VALUE=cn,e.isFile=un,e.modelChanged=fn,e.initialEnd=gn,e.finalizeEnd=mn,e.createEnd=bn,e.filterEnd=yn,e.beforeDelete="before-delete",e.pathDrag=vn,e.deleteInit=In,e.deleteEnd=On,e.refreshEnd=wn,e.resizeEnd=Dn,e.splitterResize=Cn,e.pathChanged=Sn,e.destroy=jn,e.beforeRequest=xn,e.upload="upload",e.skipUpload=Pn,e.afterRequest=Nn,e.download="download",e.layoutRefresh=En,e.actionFailure=Rn,e.search=Mn,e.openInit=kn,e.openEnd=Tn,e.selectionChanged=Ln,e.selectAllInit=An,e.clearAllInit=Fn,e.clearPathInit=Un,e.layoutChange=Vn,e.sortByChange=_n,e.nodeExpand=Hn,e.detailsInit=Bn,e.menuItemData=zn,e.renameInit=qn,e.renameEndParent=Wn,e.renameEnd=Kn,e.showPaste=Gn,e.hidePaste=Yn,e.selectedData=Jn,e.cutCopyInit=Qn,e.pasteInit=Xn,e.pasteEnd=$n,e.cutEnd=Zn,e.hideLayout=es,e.updateTreeSelection=ts,e.treeSelect="select-node",e.sortColumn=is,e.pathColumn=ns,e.searchTextChange=ss,e.beforeDownload="before-download",e.downloadInit=as,e.dropInit=rs,e.dragEnd=os,e.dropPath=ls,e.dragHelper="drag-helper",e.dragging=hs,e.updateSelectionData=ds,e.methodCall=ps,e.permissionRead=cs,e.permissionEdit=us,e.permissionEditContents=fs,e.permissionCopy="copy",e.permissionUpload=gs,e.permissionDownload=ms,e.FileManager=Ds,e.Toolbar=Ss,e.BreadCrumbBar=ys,e.Virtualization=js,e.NavigationPane=xs,e.DetailsView=Ps,e.LargeIconsView=bs,e.createDialog=qe,e.createExtDialog=We,e.createImageDialog=lt,e.ContextMenu=vs,e.read=Ce,e.createFolder=Se,e.filter=je,e.rename=xe,e.paste=Pe,e.Delete=Ne,e.GetDetails=Ee,e.Search=He,e.Download=ze,e.sortComparer=function(e,t){var i=/\.\S+/.test(e),n=/\.\S+/.test(t);if(i&&!n)return 1;if(!i&&n)return-1;var s=[],a=[];for((e+"").replace(/(\d+)|(\D+)/g,function(e,t,i){return s.push([t||1/0,i||""]),""}),(t+"").replace(/(\d+)|(\D+)/g,function(e,t,i){return a.push([t||1/0,i||""]),""});s.length&&a.length;){var r=s.shift(),o=a.shift(),l=r[0]-o[0]||r[1].localeCompare(o[1]);if(l)return l}return s.length-a.length},e.updatePath=p,e.getPath=c,e.getPathId=u,e.getPathNames=f,e.getParents=g,e.generatePath=m,e.removeActive=b,e.activeElement=y,e.addBlur=v,e.removeBlur=I,e.getModule=O,e.searchWordHandler=w,e.updateLayout=D,e.getTargetModule=C,e.refresh=S,e.openAction=j,e.getPathObject=x,e.copyFiles=P,e.cutFiles=N,e.fileType=E,e.getImageUrl=R,e.getFullPath=M,e.getName=k,e.getSortedData=T,e.getObject=L,e.createEmptyElement=A,e.getDirectories=F,e.setNodeId=U,e.setDateObject=V,e.getLocaleText=_,e.getCssClass=H,e.sortbyClickHandler=B,e.getSortField=z,e.setNextPath=q,e.openSearchFolder=W,e.pasteHandler=K,e.validateSubFolder=G,e.dropHandler=Y,e.getParentPath=J,e.getDirectoryPath=Q,e.doPasteUpdate=X,e.readDropPath=$,e.getDuplicateData=Z,e.createVirtualDragElement=ee,e.dragStopHandler=te,e.dragStartHandler=ie,e.dragCancel=ne,e.removeDropTarget=se,e.removeItemClass=ae,e.scrollHandler=re,e.draggingHandler=oe,e.objectToString=le,e.getItemName=he,e.updateRenamingData=de,e.doRename=pe,e.doDownload=ce,e.doDeleteFiles=ue,e.doDownloadFiles=fe,e.createDeniedDialog=ge,e.getAccessClass=me,e.hasReadAccess=be,e.hasEditAccess=ye,e.hasContentAccess=ve,e.hasUploadAccess=Ie,e.hasDownloadAccess=Oe,e.createNewFolder=we,e.uploadItem=De,Object.defineProperty(e,"__esModule",{value:!0})});
10
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-layouts"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-lists"),require("@syncfusion/ej2-splitbuttons"),require("@syncfusion/ej2-navigations"),require("@syncfusion/ej2-grids")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-layouts","@syncfusion/ej2-popups","@syncfusion/ej2-data","@syncfusion/ej2-inputs","@syncfusion/ej2-buttons","@syncfusion/ej2-lists","@syncfusion/ej2-splitbuttons","@syncfusion/ej2-navigations","@syncfusion/ej2-grids"],t):t(e.ej={},e.ej2Base,e.ej2Layouts,e.ej2Popups,e.ej2Data,e.ej2Inputs,e.ej2Buttons,e.ej2Lists,e.ej2Splitbuttons,e.ej2Navigations,e.ej2Grids)}(this,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="/",a=n.length-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,"."+di)){var o=n?r.getAttribute("data-uid"):s?r.getAttribute("data-id"):t.select("."+pi,r).textContent;a.push(o)}if((r=r.parentNode).classList.contains(Ai))break}return a}function m(e){for(var i=e.hasId?"id":"name",n="/",s=1;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&&(I(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(Yn,{}))}function y(e,i){if(i.isSearchCut=!1,i.actionRecords=[],i.activeElements=[],i.notify(Qn,{}),0===i.activeElements.length)return!1;I(i);var n=i.activeElements;"navigationpane"!==i.activeModule?i.targetPath=i.path:i.targetPath=J(i.path);var s=0;if(n&&(O(i,n[0]),"cut"===e))for(;s<n.length;)v(n[s]),s++;for(s=0,i.selectedNodes=[],i.enablePaste=!0,i.notify(Gn,{});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(gi)}function I(e,t){for(var i=t?e.element.querySelectorAll("."+bi):e.element.querySelectorAll("."+gi),n=0;n<i.length;)i[n].classList.remove(t?bi:gi),n++}function O(e,i){i&&(i.classList.contains(wi)?e.activeModule="detailsview":t.closest(i,"."+ki)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function w(e,t,i){var n;if(0!==t.length||e.isFiltered||e.notify(ns,{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;He(e,i?Vn:Mn,e.path,n,a,!s)}else e.isFiltered?je(e,Vn):e.isSortByClicked?(e.notify(Vn,{files:"Details"===e.oldView?e.detailsviewModule.gridObj.dataSource:e.largeiconsviewModule.allItems}),e.isSortByClicked=!1):Ce(e,i?Vn:Mn,e.path)}function D(e,t){e.oldView=e.view,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,w(e,i,!0)}function C(e,i){var n="";i&&(n=t.closest(i,"."+Zt+"."+ei+" ."+_i)?"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 S(e){e.itemData=[x(e)],be(e.itemData[0])?Ce(e,wn,e.path):ge(e,e.itemData[0],cs)}function j(e){Ce(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 Ni;var i=t.getValue("type",e);-1!==(i=i.toLowerCase()).indexOf(".")&&(i=i.split(".").join(""));return-1!==["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"].indexOf(i)?Ei:-1!==["mp3","wav","aac","ogg","wma","aif","fla","m4a"].indexOf(i)?Ri:-1!==["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"].indexOf(i)?Mi:-1!==["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"].indexOf(i)?"e-fe-"+i:"e-fe-unknown e-fe-"+i}function R(e,i){var n,s=e.ajaxSettings.getImageUrl?e.ajaxSettings.getImageUrl:e.ajaxSettings.url,a=-1!==s.indexOf("?")?"&path=":"?path=",r=encodeURIComponent(t.getValue("name",i)),o=t.getValue("filterPath",i);if(e.hasId){var l=t.getValue("id",i);n=s+a+e.path+"&id="+l}else n=t.isNullOrUndefined(o)?s+a+e.path+r:s+a+encodeURIComponent(o.replace(/\\/g,"/"))+r;var h={fileDetails:[i],imageUrl:n=n+"&time="+(new Date).getTime().toString()};return e.trigger("beforeImageLoad",h),h.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+Ht,e.element),r=t.select("#"+e.element.id+Xt,a).offsetHeight;if(s=a.offsetHeight-r,"Details"===e.view&&(s-=t.select("."+Ti,a).offsetHeight),t.isNullOrUndefined(i.querySelector("."+Di))){var o=t.createElement("div",{className:Di}),l=t.createElement("div",{className:Li}),h=t.createElement("div",{className:Ci}),d=t.createElement("div",{className:Si});"Details"===e.view?i.querySelector("."+Vi).appendChild(o):i.appendChild(o),o.appendChild(l),o.appendChild(h),o.appendChild(d)}i.querySelector("."+Di)&&(t.isNullOrUndefined(n.error)?e.isFiltered?(i.querySelector("."+Ci).innerHTML=_(e,"Filter-Empty"),i.querySelector("."+Si).innerHTML=_(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(i.querySelector("."+Ci).innerHTML=_(e,"Search-Empty"),i.querySelector("."+Si).innerHTML=_(e,"Search-Key")):(i.querySelector("."+Ci).innerHTML=_(e,"Folder-Empty"),i.querySelector("."+Si).innerHTML=_(e,"File-Upload")):(i.querySelector("."+Ci).innerHTML=_(e,"Access-Denied"),i.querySelector("."+Si).innerHTML=_(e,"Access-Details")));var p=t.select("."+Di,i);s=(s-p.offsetHeight)/2,p.style.marginTop=s+"px"}function F(e){return new s.DataManager(e).executeLocal((new s.Query).where(un,"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 V(e,i,n){for(var s=0;s<e.length;s++){var a=new Date(t.getValue("dateCreated",e[s])),r=new Date(t.getValue("dateModified",e[s]));t.isNullOrUndefined(n)&&(n="MM/dd/yyyy"),t.setValue("_fm_created",i.formatDate(a,{format:n}),e[s]),t.setValue("_fm_modified",i.formatDate(r,{format:n}),e[s])}}function _(e,t){var i=e.localeObj.getConstant(t);return""===i?t:i}function H(e,i){var n=e.cssClass;return n=t.isNullOrUndefined(n)||""===n?i:n+" "+i}function B(e,t){e.isSortByClicked=!0,-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),e.itemData=[x(e)],"Details"===e.view&&(e.isMobile?D(e,"Details"):(e.notify(is,{module:"detailsview"}),e.isSortByClicked=!1)),"LargeIcons"===e.view&&D(e,"LargeIcons"),e.notify(_n,{})}function z(e,t){var i,n=e.substring(e.lastIndexOf("_")+1),s=n;switch(t&&(i=t.detailsViewSettings.columns),n){case"date":for(var a=0,r=i.length;a<r;a++){if("dateModified"===i[a].field||"dateCreated"===i[a].field){s=i[a].field;break}s="_fm_modified"}break;case"ascending":s="Ascending";break;case"descending":s="Descending";break;case"none":s="None"}return s}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]?mn:gn,d=""===s[o]?"/":e.path+s[o]+"/",p=T(e,r,s[o]);if(t.isNullOrUndefined(p))e.originalPath=d;else{var 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))}Ce(e,h,e.path);break}}function W(e,i){e.originalPath=M(e,i,e.path);var n=t.getValue(e.pathId[0],e.feParent),s="fe_tree"==t.getValue("_fm_id",e.itemData[0]),a=T(e,t.isNullOrUndefined(t.getValue("id",n))?"name":"id",t.getValue("name",i));if(t.isNullOrUndefined(a)){if(s)return void q(e,e.path);e.notify(Un,{selectedNode:e.pathId[e.pathId.length-1]})}else{var r=t.getValue("_fm_id",a);e.setProperties({path:e.originalPath},!0),e.pathId.push(r),e.itemData=[a],e.pathNames.push(t.getValue("name",a))}Ce(e,e.path!==e.originalPath?gn:mn,e.path)}function K(e){if(e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste){var t=""===e.folderPath?e.path:e.folderPath;if(!G(e,e.actionRecords,t,e.path))if("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction)e.notify(Xn,{}),Pe(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords);else{e.enablePaste=!1,e.notify(Yn,{}),I(e);qe(e,"Error",{files:null,error:{code:"402",message:_(e,"Same-Folder-Error"),fileExists:null}})}}}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){qe(e,"Error",{files:null,error:{code:"402",message:_(e,"Same-Folder-Error"),fileExists:null}}),a=!0;break}}else{var d=M(e,i[r],s);if(0===n.indexOf(d)){qe(e,"Error",{files:null,error:{code:"402",message:_(e,"Sub-Folder-Error"),fileExists:null}}),a=!0;break}}return a}function Y(e){if(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],Pe(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(Xn,{}))}}function J(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function Q(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(os,i):(e.enablePaste=!1,e.notify(Yn,{}),e.notify(Zn,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,Ce(e,$n,e.path)):$(e),e.trigger("success",{action:t,result:i})}function $(e){var i=t.getValue("_fm_id",e.dropData);if(e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag)e.notify(vn,e.itemData);else{if(e.navigationpaneModule){var n=t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element);if(!n){i=document.querySelector('[data-id = "'+t.getValue("id",e.dropData)+'"]').getAttribute("data-uid"),n=t.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element)}p(n,e.dropData,e)}Ce(e,ls,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(he(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:ji});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"),I(e),e.uploadObj.dropArea=t.select("#"+e.element.id+Qt,e.element);var s=t.select("."+ji,e.element);s&&t.detach(s),C(e,i.target),e.notify(rs,i),I(e,"hover"),n.fileDetails=e.dragData,e.trigger("fileDragStop",n,function(i){!i.cancel&&!t.isNullOrUndefined(e.targetModule)&&""!==e.targetModule&&e.dragCount>2&&Y(e),e.dragCount=0})}function ie(e,i,n){var s=i;if(s.cancel=!1,s.fileDetails=e.dragData,e.dragCount=0,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,I(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(t){t.cancel?(n.intDestroy(i.event),ne(e)):e.uploadObj.dropArea=null})}}function ne(e){I(e);var i=t.select("."+ji,e.element);i&&t.detach(i)}function se(e){ae(e,xi),ae(e,Pi)}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,n,s,a){var r,o=e.getBoundingClientRect(),l=t.select("."+n,e);s>=o.top+e.clientHeight-30&&!t.isNullOrUndefined(l)&&(r="navigationpane"===i.targetModule||"detailsview"===i.targetModule?l.offsetHeight/2.5:l.offsetHeight/4.5,e.scrollBy(0,r)),!t.isNullOrUndefined(l)&&a<=o.top+30&&(r="navigationpane"===i.targetModule||"detailsview"===i.targetModule?l.offsetHeight/2.5:l.offsetHeight/4.5,e.scrollBy(0,-r))}function oe(e,i){var n=i;n.fileDetails=e.dragData;var s=!1;C(e,i.target),se(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),I(e,"hover");var a=null;"navigationpane"===e.targetModule?((a=t.closest(i.target,"li")).classList.add(bi,xi),s=!0,e.treeExpandTimer=window.setTimeout(function(){e.notify(hs,i)},800),re(e.navigationpaneModule.treeObj.element.parentElement,e,"e-level-2",i.event.screenY,i.event.y)):"detailsview"===e.targetModule?((a=t.closest(i.target,"tr"))&&a.querySelector("."+Ni)&&!a.classList.contains(gi)?a.classList.add(xi):!a||a.querySelector("."+Ni)||a.classList.contains(gi)||a.classList.add(Pi),s=!0,re(e.detailsviewModule.gridObj.element.querySelector(".e-content"),e,"e-row",i.event.screenY,i.event.y)):"largeiconsview"===e.targetModule?((a=t.closest(i.target,"li"))&&a.querySelector("."+Ni)&&!a.classList.contains(gi)&&a.classList.add(bi,xi),s=!0,re(e.largeiconsviewModule.element.firstElementChild,e,"e-large-icon",i.event.screenY,i.event.y)):"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.dragCount=e.dragCount+1,e.trigger("fileDragging",n)}function le(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 he(e,i){return e.hasId?t.getValue("id",i):k(e,i)}function de(e,i){e.itemData=[i],e.currentItemText=t.getValue("name",i),e.isFile=t.getValue("isFile",i),e.filterPath=t.getValue("filterPath",i)}function pe(e){ye(e.itemData[0])?qe(e,"Rename"):ge(e,e.itemData[0],us)}function ce(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!Oe(t[i]))return void ge(e,t[i],ms);e.selectedItems.length>0&&ze(e,e.path,e.selectedItems)}function ue(e,t,i){for(var n=0;n<t.length;n++)if(!ye(t[n]))return void ge(e,t[n],us);e.itemData=t,Ne(e,i,e.path,"delete")}function fe(e,t,i){for(var n=0;n<t.length;n++)if(!Oe(t[n]))return void ge(e,t[n],ms);e.itemData=t,i.length>0&&ze(e,e.path,i)}function ge(e,i,n){var s=t.getValue("message",t.getValue("permission",i));""===s&&(s=_(e,"Access-Message").replace("{0}",t.getValue("name",i)).replace("{1}",n));qe(e,"Error",{error:{code:"401",fileExists:null,message:s}})}function me(e){return be(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function be(e){var i=t.getValue("permission",e);return!(i&&!t.getValue("read",i))}function ye(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("write",i)}function ve(e){var i=t.getValue("permission",e);return!i||t.getValue("read",i)&&t.getValue("writeContents",i)}function Ie(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];ve(t)?qe(e,"NewFolder"):ge(e,t,fs)}function De(e){var t=e.itemData[0];if(Ie(t)){var i="#"+e.element.id+$t;document.querySelector(i).click()}else ge(e,t,gs)}function Ce(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]);Re(e,{action:"read",path:n,showHiddenItems:e.showHiddenItems,data:s},ke,i)}function Se(e,t){Re(e,{action:"create",path:e.path,name:t,data:e.itemData},Te,t)}function je(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;Re(e,s,Le,i,t.getValue("action",s))}function xe(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;Re(e,{action:"rename",path:t,name:n,newName:s,data:e.itemData,showFileExtension:e.showFileExtension},Ae,t)}function Pe(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,Re(e,o,Fe,t,s,n)}function Ne(e,t,i,n){Re(e,{action:n,path:i,names:t,data:e.itemData},Ue,i)}function Ee(e,t,i,n){Re(e,{action:n,path:i,names:t,data:e.itemData},Ve,i,n)}function Re(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){if(!o.cancel){e.notify(xn,{});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:_(e,"Server-Error")+" "+e.ajaxSettings.url,code:"406"},files:null};Me(e,o,n,h,s,a,r)}else{"string"==typeof l&&(l=JSON.parse(l)),e.notify(Nn,{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)}var c=new t.Internationalization(e.locale);if(!t.isNullOrUndefined(l.files)){V(l.files,c,function(e){for(var i,n=e.detailsViewSettings.columns,s=0;s<n.length;s++)if("_fm_modified"===n[s].field){t.isNullOrUndefined(n[s].format)||(i=n[s].format.toString());break}return i}(e));for(var u=0,f=l.files.length;u<f;u++){var g=l.files[u];t.setValue("_fm_iconClass",E(g),g)}"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 b=e.rootAliasName||t.getValue("name",l.details),y=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",b,l.details),y=b):y=y.replace(y.substring(0,y.indexOf("\\")),b),t.setValue("location",y,l.details)}n(e,l,s,a,r),t.isNullOrUndefined(l.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s&&"drop-path"!==s||e.notify(ss,l),"function"==typeof t.getValue("onSuccess",o.ajaxSettings)&&t.getValue("onSuccess",o.ajaxSettings)()}},onFailure:function(){var t={files:null,error:{code:"404",message:_(e,"Network-Error")+" "+e.ajaxSettings.url,fileExists:null}};Me(e,o,n,t,s,a,r)}}).send()}})}function Me(e,i,n,s,a,r,o){e.notify(Nn,{action:"failure"}),n(e,s,a,r,o),"function"==typeof t.getValue("onFailure",i.ajaxSettings)&&t.getValue("onFailure",i.ajaxSettings)()}function ke(e,i,n){if(t.isNullOrUndefined(i.files))"401"===i.error.code&&(i.files=[],e.notify(n,i),e.notify(Tn,{})),_e(e,i,"read"),e.setProperties({path:e.oldPath},!0),e.pathNames.pop();else{e.notify(n,i),e.notify(Tn,{});var s={action:"read",result:i};e.trigger("success",s)}if(e.isDragDrop&&e.isDropEnd){if(0!==e.droppedObjects.length){s={fileDetails:e.droppedObjects};e.trigger("fileDropped",s)}e.isDropEnd=e.isDragDrop=!1}}function Le(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 Te(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=_(e,"Validation-NewFolder-Exists").replace("{0}",'"'+s.value+'"');s.parentElement.nextElementSibling.innerHTML=a}else{qe(e,"Error",{files:null,error:{code:"400",message:_(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)],Ce(e,bn,e.path)}}function Ae(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=_(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=Array.isArray(i.files)?i.files[0]:i.files,"navigationpane"===e.activeModule?(e.pathId.pop(),e.itemData=[t.getValue(e.pathId[e.pathId.length-1],e.feParent)],Ce(e,Wn,t.getValue("filterPath",e.renamedItem).replace(/\\/g,"/")),e.itemData[0]=e.renamedItem,Ce(e,Sn,"/"===e.path?e.path:t.getValue("filterPath",e.renamedItem).replace(/\\/g,"/")+e.renamedItem.name+"/"),t.getValue("filterPath",e.renamedItem)===t.getValue("filterPath",e.itemData[0])&&e.pathNames.length>1&&(e.pathNames[e.pathNames.length-1]=e.renameText)):(e.itemData=[x(e)],""!==e.breadcrumbbarModule.searchObj.value?He(e,Kn,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?je(e,Kn):Ce(e,Kn,e.path))}}function Fe(e,i,n,s){i.error&&i.error.fileExists?(e.fileLength=0,t.isNullOrUndefined(i.files)||(e.isPasteError=!0,X(e,s,i)),We(e,"DuplicateItems",i.error.fileExists),"404"===i.error.code&&qe(e,"Error",i)):i.error||t.isNullOrUndefined(i.files)?i.error&&!t.isNullOrUndefined(i.files)?(e.isPasteError=!0,X(e,s,i),qe(e,"Error",i)):_e(e,i,s):(e.isPasteError=!1,X(e,s,i))}function Ue(e,i,n){if(t.isNullOrUndefined(i.files))_e(e,i,"delete");else if(e.setProperties({path:n},!0),e.itemData=[x(e)],Ce(e,On,e.path),i.error)_e(e,i,"delete");else{var s={action:"delete",result:i};e.trigger("success",s)}}function Ve(e,i,n,s){if(t.isNullOrUndefined(i.details))_e(e,i,"details");else{qe(e,s,null,i.details);var a={action:"details",result:i};e.trigger("success",a)}}function _e(e,t,i){qe(e,"Error",t);var n={action:i,error:t.error};e.trigger("failure",n)}function He(e,t,i,n,s,a){Re(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 ze(e,i,n){var s=e.ajaxSettings.downloadUrl?e.ajaxSettings.downloadUrl:e.ajaxSettings.url,a={action:"download",path:i,names:n,data:e.itemData},r={data:a,cancel:!1,useFormPost:!0,ajaxSettings:{url:s,type:"POST",contentType:"application/json",responseType:"blob",data:JSON.stringify(a),onSuccess:null,onFailure:null,beforeSend:null}};e.trigger("beforeDownload",r,function(i){if(!i.cancel)if(i.useFormPost){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)}else{var r,o;new t.Fetch({url:t.getValue("url",i.ajaxSettings),type:t.getValue("type",i.ajaxSettings),contentType:t.getValue("contentType",i.ajaxSettings),responseType:t.getValue("responseType",i.ajaxSettings),beforeSend:t.getValue("beforeSend",i.ajaxSettings),onLoad:function(i){if(r=i.headers.get("Content-Disposition")){var n=r.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/),s=n&&n[1];o=s?s.replace(/['"]/g,""):o}else o=e.itemData.length>1?"files.zip":t.getValue("isFile",e.itemData[0])?t.getValue("name",e.itemData[0]):t.getValue("name",e.itemData[0])+".zip"},onSuccess:function(t){e.trigger("success",i);var n=t,s=URL.createObjectURL(n),a=document.createElement("a");a.href=s,a.download=o,document.body.appendChild(a),a.click(),document.body.removeChild(a)},onFailure:function(t){var n={error:{code:t.status.toString(),message:_(e,"Network-Error")+" "+e.ajaxSettings.downloadUrl}};qe(e,"Error",n),e.trigger("failure",i)}}).send(JSON.stringify(i.data))}})}function qe(e,i,s,a,r){var o=function(e,i,n,s,a){var r,o,l,h,d,p,c={header:"",content:"",buttons:[],dialogName:""};switch(c.open=function(){Ye(e,e.dialogObj,c.dialogName)},c.close=function(){Je(e,e.dialogObj,c.dialogName)},i=s&&!0===s.multipleFiles?"MultipleFileDetails":i){case"NewFolder":c.dialogName="Create Folder",c.header=_(e,"Header-NewFolder"),c.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Create")},click:function(t){"keydown"!==t.type&&it(e)}}],c.open=function(e){var i=t.select("#newname",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||$e(i,_(e,"Content-NewFolder"));i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){st(e,i)},i.onkeyup=function(t){var i=ot(t);13===i&&it(e)},function(e){var i=t.select("#newname",e.dialogObj.element);i.focus(),i.value="";var n=i.value.length;i.setSelectionRange(0,n)}(e),Ye(e,e.dialogObj,"Create Folder")}.bind(this,e);break;case"Delete":c.dialogName="Delete",e.selectedItems.length>1?(c.content=("<div>"+_(e,"Content-Multiple-Delete")+"</div>").replace("{0}",e.selectedItems.length.toString()),c.header=_(e,"Header-Multiple-Delete")):(c.content="<div>"+_(e,e.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",c.header=_(e,e.isFile?"Header-Delete":"Header-Folder-Delete")),c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Yes")},click:function(t){!function(e){e.dialogObj.hide(),e.notify(In,{})}(e)}},{buttonModel:{content:_(e,"Button-No")},click:function(){e.dialogObj.hide()}}];break;case"Rename":c.dialogName="Rename",c.header=_(e,"Header-Rename"),c.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Save")},click:function(t){"keydown"!==t.type&&nt(e)}}],c.open=function(e){var i=t.select("#rename",e.dialogObj.element);i.parentElement.classList.contains("e-control-wrapper")||$e(i,_(e,"Content-Rename"));i.parentElement.nextElementSibling.innerHTML="",i.oninput=function(){st(e,i)},i.onkeyup=function(t){var i=ot(t);13===i&&nt(e)},function(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)}(e,i),Ye(e,e.dialogObj,"Rename")}.bind(this,e);break;case"details":c.dialogName="File Details",l=new t.Internationalization(e.locale),o=l.formatDate(new Date(s.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),r="",t.isNullOrUndefined(s.permission)||(r="<tr><td>"+_(e,"Permission")+'</td><td class="'+cn+'" >'+le(s.permission)+"</td></tr>"),c.header=s.name,c.content="<table><tr><td>"+_(e,"Type")+'</td><td class="'+cn+'" title="'+(s.isFile?"File":"Folder")+'">'+(s.isFile?"File":"Folder")+"</td></tr><tr><td>"+_(e,"Size")+'</td><td><span class="'+cn+'" title ="'+s.size+'">'+s.size+"</span></td></tr><tr><td>"+_(e,"Location")+'</td><td class="'+cn+'" title="'+s.location+'">'+s.location+"</td></tr><tr><td>"+_(e,"Modified")+'</td><td class="'+cn+'" >'+o+"</td></tr>"+r+"</table>",c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}];break;case"MultipleFileDetails":var u;c.dialogName="File Details",void 0==(h=e.itemData.map(function(e){return 0!==(u=e.name.indexOf(".")+1)||e.isFile?0!==u?e.name.substr(u).replace(" ",""):"undetermined":"Folder"}))[0]&&(h=s.name.split(",").map(function(e){return 0===(u=e.indexOf(".")+1)?"Folder":e.substr(u).replace(" ","")})),d=h.every(function(e,t,i){return e===i[0]})?"Folder"===h[0]?"Folder":h[0].toLocaleUpperCase()+" Type":"Multiple Types",p=s.location,c.header=s.name,c.content="<table><tr><td>"+_(e,"Type")+':</td><td class="'+cn+'">'+d+"</td></tr><tr><td>"+_(e,"Size")+":</td><td>"+s.size+'<span class="'+cn+'" title ="'+s.size+'"></span></td></tr><tr><td>'+_(e,"Location")+':</td><td class="'+cn+'" title="'+p+'">'+p+"</td></tr></table>",c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Ok")},click:function(t){"keydown"!==t.type&&e.dialogObj.hide()}}];break;case"Error":e.notify(Rn,{}),c.dialogName="Error","401"===n.error.code?c.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+_(e,"Access-Denied")+"</div>":c.header=_(e,"Error"),c.content='<div class="'+on+'">'+n.error.message+"</div>",c.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Ok")},click:function(t){e.dialogObj.hide()}}]}return c}(e,i,s,a);t.isNullOrUndefined(e.dialogObj)?(e.dialogObj=new n.Dialog({beforeOpen:Ze.bind(this,e,o.dialogName),beforeClose:function(t){Ge(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:H(e,e.isMobile?si:ii),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+Wt)):function(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=Ze.bind(this,e,t.dialogName),e.dialogObj.beforeClose=function(i){Ge(e,e.dialogObj,i,t.dialogName)},e.dialogObj.dataBind(),e.dialogObj.show()}(e,o)}function We(e,i,s,a){var o=function(e,i,n,s){var a,o,l,h={header:"",content:"",buttons:[],dialogName:""};switch(h.open=function(){Ye(e,e.extDialogObj,h.dialogName)},h.close=function(){Je(e,e.extDialogObj,h.dialogName)},i){case"Extension":h.header=_(e,"Header-Rename-Confirmation"),h.content="<div>"+_(e,"Content-Rename-Confirmation")+"</div>",h.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Yes")},click:function(){e.extDialogObj.hide(),xe(e,s,e.renameText)}},{buttonModel:{content:_(e,"Button-No")},click:function(){e.extDialogObj.hide(),e.dialogObj.hide()}}],h.dialogName="Extension Change";break;case"DuplicateItems":h.dialogName="Duplicate Items",e.replaceItems=n,o=e.replaceItems[e.fileLength],l=o.lastIndexOf("/"),o=-1===l?o:o.substring(l),h.header=_(e,"Header-Duplicate"),a="<div>"+_(e,"Content-Duplicate")+"</div>",h.content=a.replace("{0}",o),h.close=function(){if(!e.isDropEnd&&0===e.duplicateItems.length){var t={fileDetails:e.droppedObjects};e.trigger("fileDropped",t),e.isDropEnd=e.isDragDrop=!1}Je(e,e.extDialogObj,h.dialogName)},h.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Yes")},click:function(){if(e.duplicateItems.push(e.replaceItems[e.fileLength]),e.duplicateRecords.push(Z(e,e.replaceItems[e.fileLength])),e.fileLength++,n[e.fileLength]){var t=e.replaceItems[e.fileLength],i=t.lastIndexOf("/");t=-1===i?t:t.substring(i),e.extDialogObj.content=a.replace("{0}",t),e.extDialogObj.show()}else{e.extDialogObj.hide();var s=e.isDragDrop?e.dragPath:e.targetPath,r=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath,o=e.isDragDrop?"move":e.fileAction;Pe(e,s,e.duplicateItems,r,o,e.duplicateItems,e.duplicateRecords)}}},{buttonModel:{content:_(e,"Button-No")},click:function(){if(e.fileLength++,n[e.fileLength]){var t=e.replaceItems[e.fileLength],i=t.lastIndexOf("/");t=-1===i?t:t.substring(i),e.extDialogObj.content=a.replace("{0}",t),e.extDialogObj.show()}else if(e.extDialogObj.hide(),0!==e.duplicateItems.length){var s=e.isDragDrop?"move":e.fileAction,r=e.isDragDrop?e.dragPath:e.targetPath,o=e.isDragDrop?e.dropPath:""===e.folderPath?e.path:e.folderPath;Pe(e,r,e.duplicateItems,o,s,e.duplicateItems,e.duplicateRecords)}}}];break;case"UploadRetry":h.dialogName="Retry Upload",h.header=_(e,"Header-Retry"),h.content=e.retryFiles[0].name+'<div class="e-fe-retrycontent">'+_(e,"Content-Retry")+"</div>",h.open=function(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:_(e,"ApplyAll-Label"),change:function(t){e.isApplySame=t.checked}}).appendTo("#"+e.element.id+"_applyall"),Ye(e,e.extDialogObj,"Retry Upload")}.bind(this,e),h.close=function(){e.isRetryOpened=!1,Xe(e),Je(e,e.extDialogObj,h.dialogName)},h.buttons=[{buttonModel:{isPrimary:!0,content:_(e,"Button-Keep-Both")},click:function(){Qe(e,!0)}},{buttonModel:{isPrimary:!0,content:_(e,"Button-Replace")},click:function(){Qe(e,!1)}},{buttonModel:{isPrimary:!0,content:_(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?We(e,"UploadRetry"):Xe(e)),e.notify(Pn,{count:t})}}]}return h}(e,i,s,a);e.isApplySame=!1,t.isNullOrUndefined(e.extDialogObj)?(e.extDialogObj=new n.Dialog({beforeOpen:et.bind(this,e,o.dialogName),beforeClose:function(t){Ge(e,e.extDialogObj,t,o.dialogName)},content:o.content,header:o.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:e.popupTarget?e.popupTarget:"#"+e.element.id,cssClass:H(e,e.isMobile?si:ii),enableRtl:e.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:o.buttons,open:o.open,close:o.close,enableHtmlSanitizer:e.enableHtmlSanitizer,locale:e.locale}),e.extDialogObj.isStringTemplate=!0,e.extDialogObj.appendTo("#"+e.element.id+Gt)):(e.extDialogObj.header=o.header,e.extDialogObj.close=o.close,e.extDialogObj.open=o.open,e.extDialogObj.close=o.close,e.extDialogObj.content=o.content,e.extDialogObj.buttons=o.buttons,e.extDialogObj.enableRtl=e.enableRtl,e.extDialogObj.locale=e.locale,e.extDialogObj.beforeOpen=et.bind(this,e,o.dialogName),e.extDialogObj.beforeClose=function(t){Ge(e,e.extDialogObj,t,o.dialogName)},e.extDialogObj.dataBind(),e.extDialogObj.show())}function Ke(e,t,i,n){var s={cancel:i.cancel,popupName:n,popupModule:t};e.trigger("beforePopupOpen",s,function(e){i.cancel=e.cancel})}function Ge(e,t,i,n){var s={cancel:i.cancel,popupModule:t,popupName:n};e.trigger("beforePopupClose",s,function(t){i.cancel=t.cancel,i.cancel||!i.isInteracted||"Rename"!==n&&"Create Folder"!==n||e.trigger(Rn,{})})}function Ye(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupOpen",n)}function Je(e,t,i){var n={popupModule:t,element:t.element,popupName:i};e.trigger("popupClose",n)}function Qe(e,t){e.isApplySame?(t?function(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)}(e):function(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)}(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?We(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,t){a.Input.createInput({element:e,properties:{placeholder:t}})}function Ze(e,i,n){tt(t.selectAll(".e-btn",e.dialogObj.element)),Ke(e,e.dialogObj,n,i)}function et(e,i,n){tt(t.selectAll(".e-btn",e.extDialogObj.element)),Ke(e,e.extDialogObj,n,i)}function tt(e){for(var t=function(t){e[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},e[t].onkeyup=function(i){13===i.keyCode&&e[t].click()}},i=0;i<e.length;i++)t(i)}function it(e){var i=t.select("#newname",e.dialogObj.element);at(e,i),""===i.parentElement.nextElementSibling.innerHTML&&Se(e,i.value)}function nt(e){var i=t.select("#rename",e.dialogObj.element);if(at(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)}if(e.renameText=n,e.currentItemText!==n){var a="navigationpane"===e.activeModule?t.getValue("filterPath",e.itemData[0]).replace(/\\/g,"/"):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?We(e,"Extension",null,a):xe(e,a,n)}else xe(e,a,n)}else e.dialogObj.hide()}}function st(e,t){/[/\\|*?"<>:]/.test(t.value)?rt(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=_(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function at(e,t){st(e,t);var i=t.value.length-1;""===t.value||t.value.lastIndexOf(".")!==i&&t.value.lastIndexOf(" ")!==i||!e.showFileExtension&&-1!==t.value.lastIndexOf(".")&&0!==t.value.substring(t.value.indexOf(".")+1).length||rt(e,t)}function rt(e,t){var i=_(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');e.enableHtmlSanitizer?t.parentElement.nextElementSibling.textContent=i:t.parentElement.nextElementSibling.innerHTML=i}function ot(e){return e.keyCode?e.keyCode:e.which?e.which:e.charCode}function lt(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:H(e,e.isMobile?si:ii),locale:e.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:e.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:e.enableRtl,open:function(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),ht(e),Ye(e,e.viewerObj,"Image Preview")}.bind(this,e),close:function(){Je(e,e.viewerObj,"Image Preview")},beforeOpen:function(t){Ke(e,e.viewerObj,t,"Image Preview")},beforeClose:function(t){Ge(e,e.viewerObj,t,"Image Preview")},resizing:ht.bind(this,e),resizeStop:ht.bind(this,e)}),e.viewerObj.isStringTemplate=!0,e.viewerObj.appendTo("#"+e.element.id+Kt)):(e.viewerObj.refresh(),e.viewerObj.header=i,e.viewerObj.content=a,e.viewerObj.enableRtl=e.enableRtl,e.viewerObj.dataBind(),e.viewerObj.show())}function ht(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 dt=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)}}(),pt=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},ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return dt(i,e),pt([t.Property(null)],i.prototype,"downloadUrl",void 0),pt([t.Property(null)],i.prototype,"getImageUrl",void 0),pt([t.Property(null)],i.prototype,"uploadUrl",void 0),pt([t.Property(null)],i.prototype,"url",void 0),i}(t.ChildProperty),ut=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)}}(),ft=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},gt=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],mt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ut(i,e),ft([t.Property(gt)],i.prototype,"items",void 0),ft([t.Property(!0)],i.prototype,"visible",void 0),i}(t.ChildProperty),bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ut(i,e),ft([t.Property("")],i.prototype,"id",void 0),ft([t.Property("")],i.prototype,"text",void 0),ft([t.Property("auto")],i.prototype,"width",void 0),ft([t.Property("")],i.prototype,"cssClass",void 0),ft([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),ft([t.Property(!1)],i.prototype,"disabled",void 0),ft([t.Property("")],i.prototype,"prefixIcon",void 0),ft([t.Property("")],i.prototype,"suffixIcon",void 0),ft([t.Property(!0)],i.prototype,"visible",void 0),ft([t.Property("None")],i.prototype,"overflow",void 0),ft([t.Property("")],i.prototype,"template",void 0),ft([t.Property("Button")],i.prototype,"type",void 0),ft([t.Property("Both")],i.prototype,"showTextOn",void 0),ft([t.Property(null)],i.prototype,"htmlAttributes",void 0),ft([t.Property("")],i.prototype,"tooltipText",void 0),ft([t.Property("Left")],i.prototype,"align",void 0),ft([t.Property(-1)],i.prototype,"tabIndex",void 0),ft([t.Property()],i.prototype,"name",void 0),i}(t.ChildProperty),yt=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)}}(),vt=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},It=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return yt(i,e),vt([t.Property(!0)],i.prototype,"allowSearchOnTyping",void 0),vt([t.Property("contains")],i.prototype,"filterType",void 0),vt([t.Property(!0)],i.prototype,"ignoreCase",void 0),vt([t.Property(null)],i.prototype,"placeholder",void 0),i}(t.ChildProperty),Ot=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},Dt=[{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:t.initializeCSPTemplate(function(e){return'<span class="e-fe-size">'+e.size+"</span>"}),format:"n2"}],Ct=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ot(i,e),wt([t.Property(!0)],i.prototype,"columnResizing",void 0),wt([t.Property(Dt)],i.prototype,"columns",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)}}(),jt=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},xt=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],Pt=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],Nt=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],Et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return St(i,e),jt([t.Property(xt)],i.prototype,"file",void 0),jt([t.Property(Pt)],i.prototype,"folder",void 0),jt([t.Property(Nt)],i.prototype,"layout",void 0),jt([t.Property(!0)],i.prototype,"visible",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=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Rt(i,e),Mt([t.Property("650px")],i.prototype,"maxWidth",void 0),Mt([t.Property("240px")],i.prototype,"minWidth",void 0),Mt([t.Property(!0)],i.prototype,"visible",void 0),Mt([t.Property("None")],i.prototype,"sortOrder",void 0),i}(t.ChildProperty),Lt=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)}}(),Tt=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},At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Lt(i,e),Tt([t.Property("")],i.prototype,"allowedExtensions",void 0),Tt([t.Property(!0)],i.prototype,"autoUpload",void 0),Tt([t.Property(!1)],i.prototype,"autoClose",void 0),Tt([t.Property(!1)],i.prototype,"directoryUpload",void 0),Tt([t.Property(0)],i.prototype,"minFileSize",void 0),Tt([t.Property(3e7)],i.prototype,"maxFileSize",void 0),i}(t.ChildProperty),Ft=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)}}(),Ut=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},Vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ft(i,e),Ut([t.Property("")],i.prototype,"field",void 0),Ut([t.Property("")],i.prototype,"headerText",void 0),Ut([t.Property("")],i.prototype,"width",void 0),Ut([t.Property("")],i.prototype,"minWidth",void 0),Ut([t.Property("")],i.prototype,"maxWidth",void 0),Ut([t.Property("Left")],i.prototype,"textAlign",void 0),Ut([t.Property(null)],i.prototype,"headerTextAlign",void 0),Ut([t.Property(null)],i.prototype,"type",void 0),Ut([t.Property(null)],i.prototype,"format",void 0),Ut([t.Property(null)],i.prototype,"template",void 0),Ut([t.Property(null)],i.prototype,"sortComparer",void 0),Ut([t.Property(null)],i.prototype,"headerTemplate",void 0),Ut([t.Property(!0)],i.prototype,"allowSorting",void 0),Ut([t.Property(!0)],i.prototype,"allowResizing",void 0),Ut([t.Property(null)],i.prototype,"customAttributes",void 0),Ut([t.Property("")],i.prototype,"hideAtMedia",void 0),Ut([t.Property(null)],i.prototype,"customFormat",void 0),Ut([t.Property(!1)],i.prototype,"isPrimaryKey",void 0),i}(t.ChildProperty),_t="_toolbar",Ht="_layout",Bt="_tree",zt="_grid",qt="_largeicons",Wt="_dialog",Kt="_img_dialog",Gt="_extn_dialog",Yt="_upload_dialog",Jt="_contextmenu",Qt="_content",Xt="_breadcrumbbar",$t="_upload",Zt="e-filemanager",ei="e-control",ti="e-fe-cb-select",ii="e-fe-popup",ni="e-fe-mobile",si="e-fe-popup e-fe-mobile",ai="e-fe-m-select",ri="e-fe-m-filter",oi="e-layout-content",li="e-large-icons",hi="e-toolbar-item",di="e-list-item",pi="e-list-text",ci="e-list-parent",ui="e-icons e-fe-tick",fi="e-icons e-fe-dot",gi="e-blur",mi="e-active",bi="e-hover",yi="e-focus",vi="e-focused",Ii="e-check",Oi="e-checkbox-wrapper",wi="e-row",Di="e-empty",Ci="e-empty-content",Si="e-empty-inner-content",ji="e-fe-clone",xi="e-fe-drop-folder",Pi="e-fe-drop-file",Ni="e-fe-folder",Ei="e-fe-image",Ri="e-fe-music",Mi="e-fe-video",ki="e-large-icon",Li="e-empty-icon e-fe-folder",Ti="e-gridheader",Ai="e-treeview",Fi="e-menu-item",Ui="e-menu-icon",Vi="e-content",_i="e-gridcontent",Hi="e-list-parent",Bi="e-icons e-fe-open",zi="e-icons e-fe-upload",qi="e-icons e-fe-cut",Wi="e-icons e-fe-copy",Ki="e-icons e-fe-paste",Gi="e-icons e-fe-delete",Yi="e-icons e-fe-rename",Ji="e-icons e-fe-newfolder",Qi="e-icons e-fe-details",Xi="e-icons e-fe-sort",$i="e-icons e-fe-refresh",Zi="e-icons e-fe-select",en="e-icons e-fe-download",tn="e-icons e-fe-grid",nn="e-icons e-fe-large",sn="e-icons e-fe-breadcrumb",an="e-icons e-fe-clear",rn="e-icons",on="e-fe-errorcontent",ln="e-display-none",hn="e-fullrow",dn="e-split-bar",pn="e-headercheck",cn="e-fe-value",un="isFile",fn="model-changed",gn="initial-end",mn="finalize-end",bn="create-end",yn="filter-end",vn="path-drag",In="delete-init",On="delete-end",wn="refresh-end",Dn="resize-end",Cn="splitter-resize",Sn="path-changed",jn="destroy",xn="before-request",Pn="skip-upload",Nn="after-request",En="layout-refresh",Rn="actionFailure",Mn="search",kn="open-init",Ln="open-end",Tn="selection-changed",An="select-all-init",Fn="clear-all-init",Un="clear-path-init",Vn="layout-change",_n="sort-by-change",Hn="node-expand",Bn="details-init",zn="menu-item-data",qn="rename-init",Wn="rename-end-parent",Kn="rename-end",Gn="show-paste",Yn="hide-paste",Jn="selected-data",Qn="cut-copy-init",Xn="paste-init",$n="paste-end",Zn="cut-end",es="hide-layout",ts="update-tree-selection",is="sort-column",ns="path-column",ss="search-change",as="download-init",rs="drop-init",os="drag-end",ls="drop-path",hs="dragging",ds="update-selection-data",ps="method-call",cs="read",us="write",fs="writeContents",gs="upload",ms="download",bs=function(){function e(e){this.isInteraction=!0,this.uploadOperation=!1,this.count=0,this.isRendered=!0,this.tapCount=0,this.isSelectAllCalled=!1,this.isPasteOperation=!1,this.isInteracted=!0,this.parent=e,this.element=t.select("#"+this.parent.element.id+qt,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:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"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(es,{});var i=t.select("#"+this.parent.element.id+qt,this.parent.element),a=t.select("ul",i);if(a&&t.remove(a),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.parent.sortComparer&&"None"!==this.parent.sortBy?this.items=this.allItems=s.DataUtil.sort(this.items,this.parent.sortBy,this.comparer.bind(this)):this.items=this.allItems=L(this.parent,this.items),i.classList.remove(ln),this.parent.enableVirtualization&&this.allItems.length>0&&(this.element.style.height||this.adjustHeight(),this.parent.virtualizationModule.setUIVirtualization()),this.listElements=o.ListBase.createListFromJson(t.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(t.selectAll("."+di,this.listElements)),this.element.appendChild(this.listElements),this.listElements.setAttribute("aria-label","listbox"),this.preventImgDrag(),this.createDragObj(),0===this.itemList.length){var r=this.element.querySelector("."+ci);this.element.removeChild(r),A(this.parent,this.element,e)}else 0!==this.itemList.length&&this.element.querySelector("."+Di)&&this.element.removeChild(this.element.querySelector("."+Di));!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.count===this.parent.uploadItem.length&&(this.uploadOperation=!1,this.parent.uploadItem=[]));var l=this.element.querySelectorAll("."+mi);0!==l.length&&(this.parent.activeModule="largeiconsview");for(var h=0;h<l.length;h++)l[h].setAttribute("aria-selected","true");this.adjustHeight(),this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.parent.enableVirtualization&&this.allItems.length>0&&(this.parent.virtualizationModule.setUlElementHeight(),this.parent.virtualizationModule.wireScrollEvent(!1)),this.isRendered=!0,n.hideSpinner(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},e.prototype.comparer=function(e,t,i,n){if("Descending"===this.parent.sortOrder){var s=e;e=t,t=s}return this.parent.sortComparer(e,t)},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.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new t.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!1,dragTarget:"."+ki,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:te.bind(this,this.parent),drag:oe.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("."+mi);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 O(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+Qt,this.parent.element),i=t.select("#"+this.parent.element.id+Xt,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("."+pi),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.showItemCheckBoxes){var i=r.createCheckBox(t.createElement,!1,{checked:!1,cssClass:"e-small"});i.setAttribute("role","checkbox"),i.setAttribute("aria-checked","false"),i.setAttribute("aria-label","checkbox"),e.item.firstElementChild.insertBefore(i,e.item.firstElementChild.childNodes[0])}},e.prototype.onLayoutChange=function(e){if("LargeIcons"===this.parent.view){if(this.destroy(),this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),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("."+mi).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("."+mi);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=he(this.parent,n[i]),o=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?ki+" e-active":ki;if(ye(n[i])||(o+=" "+me(n[i])),s===Ei&&this.parent.showThumbnail&&be(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(),this.parent.activeModule="largeiconsview")},e.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},e.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&Ne(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&&(I(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(ln)},e.prototype.onSelectAllInit=function(){if("LargeIcons"===this.parent.view){this.startItem=this.getFirstItem();var e=this.getLastItem();this.doSelection(e,{ctrlKey:!0,shiftKey:!0}),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(Tn,{}),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(_n,{}))},e.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(ns,this.onPathColumn),this.parent.off(mn,this.onFinalizeEnd),this.parent.off(bn,this.onCreateEnd),this.parent.off(Jn,this.onSelectedData),this.parent.off(In,this.onDeleteInit),this.parent.off(On,this.onDeleteEnd),this.parent.off(wn,this.onRefreshEnd),this.parent.off(Sn,this.onPathChanged),this.parent.off(Vn,this.onLayoutChange),this.parent.off(Mn,this.onSearch),this.parent.off(kn,this.onOpenInit),this.parent.off(Ln,this.onPathChanged),this.parent.off(fn,this.onPropertyChanged),this.parent.off(ps,this.onMethodCall),this.parent.off(Rn,this.onActionFailure),this.parent.off(qn,this.onRenameInit),this.parent.off(Kn,this.onPathChanged),this.parent.off(es,this.onHideLayout),this.parent.off(An,this.onSelectAllInit),this.parent.off(Fn,this.onClearAllInit),this.parent.off(zn,this.onMenuItemData),this.parent.off(xn,this.onBeforeRequest),this.parent.off(Nn,this.onAfterRequest),this.parent.off(Cn,this.splitterResizeHandler),this.parent.off(Dn,this.resizeHandler),this.parent.off(Xn,this.onpasteInit),this.parent.off($n,this.onpasteEnd),this.parent.off(Qn,this.oncutCopyInit),this.parent.off(rs,this.onDropInit),this.parent.off(Bn,this.onDetailsInit),this.parent.off(En,this.onLayoutRefresh),this.parent.off(ls,this.onDropPath),this.parent.off(ds,this.onUpdateSelectionData),this.parent.off(yn,this.onPathChanged))},e.prototype.addEventListener=function(){this.parent.on(ns,this.onPathColumn,this),this.parent.on(mn,this.onFinalizeEnd,this),this.parent.on(bn,this.onCreateEnd,this),this.parent.on(wn,this.onRefreshEnd,this),this.parent.on(Jn,this.onSelectedData,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on(In,this.onDeleteInit,this),this.parent.on(Xn,this.onpasteInit,this),this.parent.on(On,this.onDeleteEnd,this),this.parent.on(Vn,this.onLayoutChange,this),this.parent.on(Mn,this.onSearch,this),this.parent.on(kn,this.onOpenInit,this),this.parent.on(qn,this.onRenameInit,this),this.parent.on(Kn,this.onPathChanged,this),this.parent.on(Ln,this.onPathChanged,this),this.parent.on(fn,this.onPropertyChanged,this),this.parent.on(ps,this.onMethodCall,this),this.parent.on(Rn,this.onActionFailure,this),this.parent.on(es,this.onHideLayout,this),this.parent.on(An,this.onSelectAllInit,this),this.parent.on(Fn,this.onClearAllInit,this),this.parent.on(zn,this.onMenuItemData,this),this.parent.on(xn,this.onBeforeRequest,this),this.parent.on(Nn,this.onAfterRequest,this),this.parent.on(rs,this.onDropInit,this),this.parent.on(Bn,this.onDetailsInit,this),this.parent.on(Cn,this.splitterResizeHandler,this),this.parent.on(Dn,this.resizeHandler,this),this.parent.on($n,this.onpasteEnd,this),this.parent.on(Qn,this.oncutCopyInit,this),this.parent.on(En,this.onLayoutRefresh,this),this.parent.on(ls,this.onDropPath,this),this.parent.on(ds,this.onUpdateSelectionData,this),this.parent.on(yn,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("."+mi);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!==Q(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":S(this.parent);break;case"showFileExtension":case"showHiddenItems":Ce(this.parent,Sn,this.parent.path);break;case"allowMultiSelection":if("LargeIcons"!==this.parent.view)break;S(this.parent);break;case"view":D(this.parent,"LargeIcons")}}},e.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents(),this.startItem=null,this.listElements=null)},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");I(this.parent,"hover"),null!==i&&i.classList.add(bi)},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],ai),i.clickHandler(e))}})}else this.clickObj&&this.clickObj.destroy()},e.prototype.doTapAction=function(e){var i=e.originalEvent.target,n=t.closest(i,"."+di);this.multiSelect||i.classList.contains(ci)||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;I(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},e.prototype.doSelection=function(e,i){var n=t.closest(e,"."+di),s=e.classList;this.parent.isFile=!1;var a="select";if(3!==i.which||t.isNullOrUndefined(n)||!n.classList.contains(mi)){if(t.isNullOrUndefined(n))this.parent.selectedItems.length===this.itemList.length&&(this.isSelectAllCalled=!0),this.clearSelection();else{this.parent.allowMultiSelection&&n.classList.contains(mi)&&(i.ctrlKey||e.classList.contains(Ii))&&(a="unselect"),i.ctrlKey&&i.shiftKey&&(this.isSelectAllCalled=!0);if(!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(var l=r;l>=o;l--)this.addActive(this.itemList[l]);else for(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(mi)?this.removeActive(n):this.addActive(n),this.addFocus(n);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(Tn,{}),this.triggerSelect(a,n)}}t.isNullOrUndefined(n)||(this.isSelectAllCalled=!1,this.updateType(n))}else 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(Tn,{})},e.prototype.resetMultiSelect=function(){this.multiSelect=!1,t.removeClass([this.parent.element],ai)},e.prototype.doOpenAction=function(e){var i=this;if(!t.isNullOrUndefined(e)){var n=t.closest(e,"."+di);if(this.parent.isFile=!1,!t.isNullOrUndefined(n)){this.updateType(n);var s=this.getItemObject(n);if(!be(s))return void ge(this.parent,s,cs);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)===Ei){var a=R(i.parent,s);lt(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);i.parent.oldPath=i.parent.path;var 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("."+Ni,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){var i=this;if(this.isRendered){var n=this.getFocusedItem(),s=this.getFirstItem(),a=this.getLastItem();switch(e.action){case"end":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTo(0,this.element.firstElementChild.scrollHeight),setTimeout(function(){i.navigateItem(i.itemList[i.itemList.length-1])},10)):this.navigateItem(a);break;case"home":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTop=0,setTimeout(function(){i.navigateItem(i.itemList[0])},10)):this.navigateItem(s);break;case"tab":t.isNullOrUndefined(n)?t.isNullOrUndefined(s)||this.addFocus(s):this.addFocus(n);break;case"moveDown":this.navigateDown(n,!0);break;case"moveLeft":this.navigateRight(n,!1);break;case"moveRight":this.navigateRight(n,!0);break;case"moveUp":this.navigateDown(n,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(a,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(s,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(n,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(n,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(n,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(n,e);break;case"space":this.spaceKey(n);break;case"ctrlSpace":case"shiftSpace":case"csSpace":t.isNullOrUndefined(n)||this.doSelection(n,e);break;case"ctrlA":this.ctrlAKey(s,a);break;case"enter":this.doOpenAction(this.parent.visitedItem?this.parent.visitedItem:this.getVisitedItem());break;case"altEnter":this.parent.notify(Bn,{}),Ee(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(),ce(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(!ye(e[t]))return void ge(this.parent,e[t],us);qe(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),pe(this.parent))},e.prototype.updateRenameData=function(){var e=t.select("."+di+"."+mi,this.element),i=this.getItemObject(e);de(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("."+di+"."+yi,this.element)},e.prototype.getActiveItem=function(){return t.select("."+di+"."+mi,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],this.parent.enableVirtualization&&t.isNullOrUndefined(s)){var r=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-bottom"),10),o=this.itemList[0].getBoundingClientRect().height+r;this.element.firstElementChild.scrollTo(this.element.firstElementChild.scrollTop,this.element.firstElementChild.scrollTop+o)}if(t.isNullOrUndefined(s))return e}while(!t.isVisible(s));return s},e.prototype.setFocus=function(e){if(!t.isNullOrUndefined(e)){!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(Tn,{}),this.triggerSelect("select",e))}},e.prototype.spaceKey=function(e){if(!t.isNullOrUndefined(e)&&!e.classList.contains(mi)){!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(Tn,{}),this.triggerSelect("select",e))}},e.prototype.ctrlAKey=function(e,i){if(this.parent.allowMultiSelection&&!t.isNullOrUndefined(e)){this.startItem=e;var n=this.element.querySelector("."+ci),s=n.scrollTop,a=this.getFocusedItem();this.doSelection(i,{ctrlKey:!0,shiftKey:!0}),n.scrollTop=s,t.isNullOrUndefined(a)||this.addFocus(a)}},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(mi)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),t.addClass([e],[mi]),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],[mi]),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 he(this.parent,t)},e.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var i=this.getFocusedItem();i&&(i.removeAttribute("tabindex"),t.removeClass([i],[yi])),t.addClass([e],[yi]),e.setAttribute("tabindex","0"),e.focus()},e.prototype.checkState=function(e,i){if(this.parent.showItemCheckBoxes){var n=t.select(".e-frame",e);t.isNullOrUndefined(n)||(i?n.classList.contains(Ii)||(t.addClass([n],Ii),t.closest(n,"."+Oi).setAttribute("aria-checked","true")):n.classList.contains(Ii)&&(t.removeClass([n],Ii),t.closest(n,"."+Oi).setAttribute("aria-checked","false")))}},e.prototype.clearSelect=function(){var e=Array.prototype.slice.call(t.selectAll("."+mi,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=[];if(this.isSelectAllCalled)for(var n=0,s=this.itemList.length;n<s;n++)i[n]=this.getItemObject(this.itemList[n]);else i[0]=this.getItemObject(t);var a={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteraction,cancel:!1,target:this.isSelectAllCalled?null:t};return this.parent.trigger("fileSelection",a),this.isInteraction=!0,a},e.prototype.triggerSelect=function(e,t){var i=[];if(this.isSelectAllCalled){for(var n=0,s=this.itemList.length;n<s;n++)i[n]=this.getItemObject(this.itemList[n]);this.isSelectAllCalled=!1}else i[0]=this.getItemObject(t);this.parent.visitedData=i.length>1?i[i.length-1]:i[0];var a={action:e,fileDetails:i.length>1?i:i[0],isInteracted:this.isInteracted};this.parent.trigger("fileSelect",a),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++){this.doSelection(this.itemList[t[i]],{ctrlKey:!0,shiftKey:!1})}},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]);this.doSelection(this.itemList[a],{ctrlKey:!0,shiftKey:!1})}},e.prototype.updateSelectedData=function(){for(var e=[],i=t.selectAll("."+di+"."+mi,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(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)&&-1===e.indexOf(t.getValue(s,this.items[a]))||i.push(a)}return i},e.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",t.isNullOrUndefined(e))this.performDelete();else{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]=he(this.parent,n[a]);ue(this.parent,n,s)}}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))this.doDownload();else{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]=he(this.parent,n[a]);fe(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))this.performRename();else{var n=this.getItemsIndex([e]);n.length>0&&(de(this.parent,this.items[n[0]]),t.isNullOrUndefined(i)?pe(this.parent):ye(this.parent.itemData[0])?xe(this.parent,this.parent.path,i):ge(this.parent,this.parent.itemData[0],us))}},e}(),ys=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)||w(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:rn});s.appendChild(d)}a-o!=1?(l=t.createElement("a",{className:pi}),s.setAttribute("tabindex","0")):l=t.createElement("span",{className:pi}),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":_(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:_(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 I=this.searchObj.element.nextElementSibling;t.EventHandler.add(I,"mousedown",this.searchChangeHandler.bind(this),this),t.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)}var O=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");if(h-=this.searchWrapWidth?this.searchWrapWidth:O.offsetWidth,p>h){for(u=i.length;u--;){var w=h-c[u];if(!(w>40)){for(var D=[],C=0;C<=u;C++){var S=i[C];D.push({text:S.innerText,utext:S.getAttribute("data-utext")})}var j=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),x=this.parent.createElement("button",{className:"e-breadcrumb-submenu"});j.appendChild(x),d.insertBefore(j,d.querySelector("li")),this.subMenuObj=new l.DropDownButton({items:D,cssClass:"e-caret-hide e-submenu",iconCss:sn,iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(x);break}d.insertBefore(i[u],d.querySelector("li")),h=w}this.parent.breadCrumbBarNavigation.insertBefore(d,O)}else this.parent.breadCrumbBarNavigation.insertBefore(e,O)},e.prototype.onFocus=function(){t.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},e.prototype.onKeyUp=function(){this.parent.notify(ns,{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(){w(i.parent,e.value,!1)},300)):w(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]),Ce(this.parent,Sn,s);var a=this.parent.pathId[this.parent.pathId.length-1];this.parent.notify(ts,{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(ri))t.removeClass([this.parent.element],ri),this.searchWrapWidth=null;else{var e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap");this.searchWrapWidth=e.offsetWidth,t.addClass([this.parent.element],ri),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(fn,this.onPropertyChanged,this),t.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(jn,this.destroy,this),this.parent.on(Sn,this.onUpdatePath,this),this.parent.on(mn,this.onUpdatePath,this),this.parent.on(wn,this.onUpdatePath,this),this.parent.on(Ln,this.onUpdatePath,this),this.parent.on(bn,this.onCreateEnd,this),this.parent.on(Kn,this.onRenameEnd,this),this.parent.on(On,this.onDeleteEnd,this),this.parent.on(Cn,this.onResize,this),this.parent.on($n,this.onPasteEnd,this),this.parent.on(Dn,this.onResize,this),this.parent.on(ss,this.onSearchTextChange,this),this.parent.on(rs,this.onDropInit,this),this.parent.on(En,this.onResize,this),this.parent.on(ls,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(Sn,this.onUpdatePath),this.parent.off(mn,this.onUpdatePath),this.parent.off(wn,this.onUpdatePath),this.parent.off(Ln,this.onUpdatePath),this.parent.off($n,this.onPasteEnd),this.parent.off(bn,this.onCreateEnd),this.parent.off(Kn,this.onRenameEnd),this.parent.off(On,this.onDeleteEnd),this.parent.off(Cn,this.onResize),this.parent.off(Dn,this.onResize),this.parent.off(ss,this.onSearchTextChange),this.parent.off(rs,this.onDropInit),this.parent.off(En,this.onResize),this.parent.off(ls,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(ts,{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=null!=this.parent.searchSettings.placeholder?this.parent.searchSettings.placeholder:_(this.parent,"Search")+" "+_(this.parent,e.cwd.name.toString())},e}(),vs=function(){function e(e){this.isMenuItemClicked=!1,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:H(this.parent,ii)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+Jt),this.addEventListener()},e.prototype.onBeforeItemRender=function(e){if(e.item.id===this.getMenuId("largeiconsview")){var i=t.createElement("span");(n=e.element).insertBefore(i,"LargeIcons"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",nn+" "+Ui)}if(e.item.id===this.getMenuId("detailsview")){var n;i=t.createElement("span");(n=e.element).insertBefore(i,"Details"===this.parent.view?n.childNodes[1]:n.childNodes[0]),i.setAttribute("class",tn+" "+Ui)}},e.prototype.onBeforeClose=function(){if(this.menuTarget=null,!this.isMenuItemClicked&&this.parent.pathId.length>1&&"navigationpane"==this.parent.activeModule){this.parent.pathId.pop();for(var e=[],i=0,n=Object.keys(this.parent.feParent);i<n.length;i++){var s=n[i],a=t.getValue(s,this.parent.feParent);-1!==this.parent.pathNames.indexOf(a.name)&&e.push(a._fm_id)}this.parent.pathId.push(e[e.length-1]),this.parent.navigationpaneModule.treeObj.selectedNodes=[this.parent.pathId[this.parent.pathId.length-1]]}this.isMenuItemClicked=!1},e.prototype.onBeforeOpen=function(e){var i,n,s=this,a=!1,r=!1,o=e.event.target;this.menuTarget=this.targetNodeElement=o,this.currentElement=e.element,o.classList.contains("e-spinner-pane")&&(o=this.parent.navigationpaneModule.activeNode.getElementsByClassName(hn)[0],this.menuTarget=this.targetNodeElement=o),this.targetElement="Details"===this.parent.view?t.closest(o,"tr.e-row"):o,this.parent.enableVirtualization&&(o.classList.contains("e-virtual-bottom")||o.classList.contains("e-virtualtable"))&&(o=o.parentElement.closest("div"));var l=this.getTargetView(o);if(this.updateActiveModule(),o.classList.contains(Ai)||t.closest(o,"th")||t.closest(o,"#"+this.parent.element.id+Xt)||t.closest(o,"#"+this.parent.element.id+_t))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,"."+Di))this.setLayoutItem(o);else if(!o.classList.contains(Fi)&&!o.classList.contains(Ui)&&!o.classList.contains("e-caret")){if("LargeIcons"!==this.parent.view||t.isNullOrUndefined(t.closest(o,"li"))||t.closest(o,"#"+this.parent.element.id+Bt))t.isNullOrUndefined(t.closest(o,"tr.e-row"))?t.closest(o,"#"+this.parent.element.id+Bt)&&(i=t.closest(o,"li").getAttribute("data-uid"),r=!0):(i=this.targetElement.getAttribute("data-uid"),n=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(i).data,t.isNullOrUndefined(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("data-rowindex"),10)]),a=!0);else{t.closest(o,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(o,{ctrlKey:!0,shiftKey:!0}),n=this.parent.visitedData,a=!0}a?!0===t.getValue("isFile",n)?this.setFileItem():this.setFolderItem(!1):r?(this.setFolderItem(!0),i===this.parent.pathId[0]&&this.disabledItems.push("Delete","Rename","Cut","Copy")):"TreeView"===l||"GridView"===l||"LargeIcon"===l?this.setLayoutItem(o):e.cancel=!0}var h=t.select("#"+this.getMenuId("Paste"),this.contextMenu.element);if(e.cancel||this.parent.enablePaste||!h||h.classList.contains("e-disabled")){var d=this.disabledItems.indexOf("Paste");-1!==d&&this.disabledItems.splice(d,1)}else-1===this.disabledItems.indexOf("Paste")&&this.disabledItems.push("Paste");if(e.cancel)this.menuTarget=this.currentElement=null;else{this.contextMenu.dataBind();var p=!1;(o.classList.contains(Fi)||o.classList.contains(Ui)||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};this.currentItems=c.items,this.parent.trigger("menuOpen",c,function(t){p||(s.contextMenu.dataBind(),s.contextMenu.items=t.items,s.contextMenu.dataBind()),s.enableItems(s.disabledItems,!1,!0),e.cancel=t.cancel,t.cancel&&(s.menuTarget=s.targetNodeElement=s.currentElement=null)})}},e.prototype.updateActiveModule=function(){this.parent.activeModule=t.closest(this.menuTarget,"#"+this.parent.element.id+Bt)?"navigationpane":t.closest(this.menuTarget,"#"+this.parent.element.id+zt)?"detailsview":t.closest(this.menuTarget,"#"+this.parent.element.id+qt)?"largeiconsview":this.parent.activeModule},e.prototype.getTargetView=function(e){return e.classList.contains(Ai)?"TreeView":e.classList.contains(Vi)?"GridView":e.classList.contains(Hi)?"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){if(this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map(function(e){return e.trim()})),this.contextMenu.dataBind(),e){var i=t.select('[data-uid="'+this.parent.navigationpaneModule.treeObj.selectedNodes[0]+'"]',this.parent.navigationpaneModule.treeObj.element);this.parent.pathNames[this.parent.pathNames.length-1]===i.querySelector(".e-list-text").innerHTML&&"navigationpane"===this.parent.activeModule&&this.disabledItems.push("Open")}else if("navigationpane"!==this.parent.activeModule)if(1===this.parent.selectedItems.length){var n=this.disabledItems.indexOf("Rename");-1!==n&&this.disabledItems.splice(n,1)}else this.disabledItems.push("Rename","Paste")},e.prototype.setFileItem=function(){if(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){var e=this.disabledItems.indexOf("Rename");-1!==e&&this.disabledItems.splice(e,1)}else 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+qt).getElementsByClassName(Di).length||"Details"===this.parent.view&&0!==t.closest(e,"#"+this.parent.element.id+zt).getElementsByClassName(Di).length?this.disabledItems.push("SelectAll"):this.disabledItems=this.disabledItems.filter(function(e){return"SelectAll"!==e}),0===this.parent.selectedNodes.length&&-1===this.disabledItems.indexOf("Paste")&&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(zn,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(Jn,{}),n="navigationpane"===this.parent.activeModule&&"open"===s?[this.menuItemData]:this.parent.itemData);var a={cancel:!1,element:e.element,fileDetails:n,item:e.item};this.parent.trigger("menuClick",a,function(a){var r;if(!a.cancel)switch(i.isMenuItemClicked=!0,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 o=0;o<n.length;o++)if(!ye(n[o]))return void ge(i.parent,n[o],us);qe(i.parent,"Delete");break;case"download":for(var l=0;l<n.length;l++)if(!Oe(n[l]))return void ge(i.parent,n[l],ms);"navigationpane"===i.parent.activeModule?i.parent.notify(as,{}):i.parent.selectedItems.length>0&&ze(i.parent,i.parent.path,i.parent.selectedItems);break;case"rename":ye(n[0])?(i.parent.notify(qn,{}),qe(i.parent,"Rename")):ge(i.parent,n[0],us);break;case"selectall":i.parent.notify(An,{});break;case"refresh":S(i.parent);break;case"open":i.parent.visitedItem&&"navigationpane"!==i.parent.activeModule?i.parent.notify(kn,{target:i.parent.visitedItem}):"navigationpane"===i.parent.activeModule&&(i.parent.visitedItem&&i.parent.notify(kn,{target:i.parent.visitedItem}),i.parent.navigationpaneModule.openFileOnContextMenuClick(t.closest(i.targetNodeElement,"li")));break;case"details":i.parent.notify(Bn,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[],i.parent.navigationpaneModule.openFileOnContextMenuClick(t.closest(i.targetNodeElement,"li"))),Ee(i.parent,r,i.parent.path,"details");break;case"newfolder":we(i.parent);break;case"upload":De(i.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":B(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=H(this.parent,ii)}}},e.prototype.addEventListener=function(){this.parent.on(jn,this.destroy,this),this.parent.on(fn,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(jn,this.destroy),this.parent.off(fn,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(),this.targetElement=null)},e.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,s=this.getMenuId(e[i]),a=_(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:s,text:a,iconCss:Bi};break;case"Upload":n={id:s,text:a,iconCss:zi};break;case"Cut":n={id:s,text:a,iconCss:qi};break;case"Copy":n={id:s,text:a,iconCss:Wi};break;case"Paste":n={id:s,text:a,iconCss:Ki};break;case"Delete":n={id:s,text:a,iconCss:Gi};break;case"Rename":n={id:s,text:a,iconCss:Yi};break;case"NewFolder":n={id:s,text:a,iconCss:Ji};break;case"Details":n={id:s,text:a,iconCss:Qi};break;case"SortBy":n={id:s,text:a,iconCss:Xi,items:[{id:this.getMenuId("Name"),text:_(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?fi:null},{id:this.getMenuId("Size"),text:_(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?fi:null},{id:this.getMenuId("Date"),text:_(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?fi:null},{separator:!0},{id:this.getMenuId("Ascending"),text:_(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?ui:null},{id:this.getMenuId("Descending"),text:_(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?ui:null},{id:this.getMenuId("None"),text:_(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?ui:null}]};break;case"View":n={id:s,text:a,iconCss:"Details"===this.parent.view?tn:nn,items:[{id:this.getMenuId("largeiconsview"),text:_(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:ui},{id:this.getMenuId("detailsview"),text:_(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?ui:null}]};break;case"Refresh":n={id:s,text:a,iconCss:$i};break;case"SelectAll":n={id:s,text:a,iconCss:Zi};break;case"Download":n={id:s,text:a,iconCss:en};break;default:n={id:s,text:a}}t.push(n)}return t},e.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.split(" ").join("").toLowerCase()},e}(),Is={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"},Os=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)}}(),ws=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},Ds=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.isCut=!1,n.isSearchCut=!1,n.isSearchDrag=!1,n.isPasteError=!1,n.folderPath="",n.isSameAction=!1,n.isFiltered=!1,n.isSortByClicked=!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.dragCount=0,n.droppedObjects=[],n.uploadingCount=0,n.uploadedCount=0,n.isMac=!1,r.Inject(ys,bs,vs),n}Os(s,e),r=s,s.prototype.getModuleName=function(){return"filemanager"},s.prototype.preRender=function(){(t.isNullOrUndefined(this.element.id)||""===this.element.id)&&this.element.setAttribute("id",t.getUniqueID("filemanager")),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(),Is,this.locale)},s.prototype.getPersistData=function(){return this.addOnPersist(["view","path","selectedItems"])},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],name:"Toolbar"}),this.navigationPaneSettings.visible&&e.push({member:"navigationpane",args:[this],name:"NavigationPane"}),this.view&&e.push({member:"detailsview",args:[this],name:"DetailsView"}),this.contextMenuSettings.visible&&!this.isDevice&&e.push({member:"contextmenu",args:[this],name:"ContextMenu"}),this.enableVirtualization&&e.push({member:"virtualization",args:[this],name:"Virtualization"}),e},s.prototype.render=function(){this.initialize();var e=t.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);if(this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,this.setRtl(this.enableRtl),this.addEventListeners(),Ce(this,this.path!==this.originalPath?gn:mn,this.path),this.adjustHeight(),t.isNullOrUndefined(this.navigationpaneModule)){this.splitterObj.collapse(this.enableRtl?1:0);t.select("."+dn,this.element).classList.add(ln)}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],ni),this.allowMultiSelection&&t.addClass([this.element],ti),this.addCssClass(null,this.cssClass),this.renderFileUpload()},s.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+_t});this.element.appendChild(e);var t=this.createElement("div",{id:this.element.id+Ht,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+Bt});n.appendChild(s);var a=this.createElement("div",{id:this.element.id+Qt,className:oi});this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+Xt,className:"e-address"}),a.appendChild(this.breadCrumbBarNavigation);var r=this.createElement("div",{id:this.element.id+zt});a.appendChild(r);var o=this.createElement("div",{id:this.element.id+qt,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+Wt});this.element.appendChild(d);var p=this.createElement("ul",{id:this.element.id+Jt});this.element.appendChild(p);var c=this.createElement("div",{id:this.element.id+Kt});this.element.appendChild(c);var u=this.createElement("div",{id:this.element.id+Gt});this.element.appendChild(u);var f=this.createElement("div",{id:this.element.id+Yt});this.element.appendChild(f)},s.prototype.adjustHeight=function(){var e=t.select("#"+this.element.id+_t,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(Cn,{})},s.prototype.splitterAdjust=function(){var e=t.select("."+dn,this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(ln)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(ln))},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+$t,t=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(t),this.uploadDialogObj=new n.Dialog({header:_(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:H(this,this.isMobile?si:ii),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+Yt),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+Qt,this.element),asyncSettings:{saveUrl:e,removeUrl:e},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),removing:this.onRemoving.bind(this),canceling:this.onCancel.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,directoryUpload:this.uploadSettings.directoryUpload,fileListRendering:this.onFileListRender.bind(this)}),this.uploadObj.appendTo("#"+this.element.id+$t)},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.directoryUpload=this.uploadSettings.directoryUpload,this.uploadObj.dataBind()},s.prototype.onBeforeOpen=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupOpen",t,function(t){e.cancel=t.cancel})},s.prototype.onBeforeClose=function(e){var t={cancel:e.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupClose",t,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};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};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},{filename:e.fileData.name}];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.onCancel=function(e){var i=JSON.stringify(t.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:"remove"},{data:i}]},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(!Ie(t))return e.cancel=!0,void ge(this,t,gs);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)],Ce(this,Sn,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||We(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(xn,this.showSpinner,this),this.on(Nn,this.hideSpinner,this),this.on(gn,this.onInitialEnd,this),this.on(Bn,this.onDetailsInit,this),this.on(Pn,this.onFileUploadSuccess,this),t.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},s.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(xn,this.showSpinner),this.off(Nn,this.hideSpinner),this.off(gn,this.onInitialEnd),this.off(Bn,this.onDetailsInit),this.off(Pn,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(Dn,{})},s.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[x(this)],ve(this.itemData[0])?qe(this,"NewFolder"):ge(this,this.itemData[0],fs);break;case"f5":e.preventDefault(),S(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(),-1!=this.toolbarSettings.items.indexOf("Upload")&&t.select("#"+this.element.id+$t,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(Un,{selectedNode:this.pathId[0]}),Ce(this,this.path!==this.originalPath?gn:mn,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(fn,{module:"common",newProp:e,oldProp:i});break;case"allowMultiSelection":this.allowMultiSelection?t.addClass([this.element],ti):(this.selectedItems.length>1&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),t.removeClass([this.element],ti)),this.notify(fn,{module:"common",newProp:e,oldProp:i});break;case"cssClass":this.addCssClass(i.cssClass,e.cssClass),this.notify(fn,{module:"common",newProp:e,oldProp:i});break;case"detailsViewSettings":this.notify(fn,{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(fn,{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(fn,{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(fn,{module:"breadcrumbbar",newProp:e,oldProp:i});break;case"selectedItems":"Details"===this.view?this.notify(fn,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===this.view&&this.notify(fn,{module:"largeiconsview",newProp:e,oldProp:i});break;case"showFileExtension":case"showHiddenItems":this.notify(fn,{module:"common",newProp:e,oldProp:i});break;case"showThumbnail":this.notify(fn,{module:"largeiconsview",newProp:e,oldProp:i});break;case"toolbarSettings":case"toolbarItems":this.adjustHeight(),this.notify(fn,{module:"toolbar",newProp:e,oldProp:i});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(fn,{module:"detailsview",newProp:e,oldProp:i}):"LargeIcons"===e.view&&this.notify(fn,{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(fn,{module:"common",newProp:e,oldProp:i});break;case"sortOrder":S(this),this.notify(_n,{});break;case"sortBy":S(this),this.notify(_n,{}),"Details"===this.view&&this.notify(is,{});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(jn,{}),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],["e-rtl",ni,ti]),this.element.innerHTML="",this.breadCrumbBarNavigation=null,this.activeElements=null,this.virtualDragElement=null,this.visitedItem=null,e.prototype.destroy.call(this),this.virtualizationModule=null,this.navigationpaneModule=null,this.toolbarModule=null,this.contextmenuModule=null,this.largeiconsviewModule=null,this.detailsviewModule=null,this.breadcrumbbarModule=null)},s.prototype.createFolder=function(e){this.notify(ps,{action:"createFolder"});var t=[x(this)];if(this.itemData=t,e)if(/[/\\|*?"<>:]/.test(e)){qe(this,"Error",{files:null,error:{code:"402",message:_(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}})}else ve(t[0])?Se(this,e):ge(this,t[0],fs);else we(this)},s.prototype.deleteFiles=function(e){this.notify(ps,{action:"deleteFiles",ids:e})},s.prototype.disableToolbarItems=function(e){!t.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!1)},s.prototype.downloadFiles=function(e){this.notify(ps,{action:"downloadFiles",ids:e})},s.prototype.enableToolbarItems=function(e){!t.isNullOrUndefined(e)&&this.toolbarModule&&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(Tn,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),je(this,yn)},s.prototype.getSelectedFiles=function(){return this.notify(ds,{}),this.itemData},s.prototype.openFile=function(e){this.notify(ps,{action:"openFile",id:e})},s.prototype.refreshFiles=function(){S(this)},s.prototype.refreshLayout=function(){this.adjustHeight(),this.notify(En,{})},s.prototype.selectAll=function(){this.notify(ps,{action:"selectAll"})},s.prototype.clearSelection=function(){this.notify(ps,{action:"clearSelection"})},s.prototype.renameFile=function(e,t){this.notify(ps,{action:"renameFile",id:e,newName:t})},s.prototype.uploadFiles=function(){var e=[x(this)];this.itemData=e,De(this)},s.prototype.setRtl=function(e){e?this.addCssClass(null,"e-rtl"):this.addCssClass("e-rtl",null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)};var r;return ws([t.Complex({},ct)],s.prototype,"ajaxSettings",void 0),ws([t.Property(!1)],s.prototype,"allowDragAndDrop",void 0),ws([t.Property(!0)],s.prototype,"allowMultiSelection",void 0),ws([t.Property(!0)],s.prototype,"showItemCheckBoxes",void 0),ws([t.Complex({},Et)],s.prototype,"contextMenuSettings",void 0),ws([t.Property("")],s.prototype,"cssClass",void 0),ws([t.Complex({},Ct)],s.prototype,"detailsViewSettings",void 0),ws([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),ws([t.Property(!1)],s.prototype,"enablePersistence",void 0),ws([t.Property(!1)],s.prototype,"enableVirtualization",void 0),ws([t.Property("400px")],s.prototype,"height",void 0),ws([t.Property("LargeIcons")],s.prototype,"view",void 0),ws([t.Complex({},kt)],s.prototype,"navigationPaneSettings",void 0),ws([t.Property("/")],s.prototype,"path",void 0),ws([t.Property(null)],s.prototype,"popupTarget",void 0),ws([t.Complex({},It)],s.prototype,"searchSettings",void 0),ws([t.Property()],s.prototype,"selectedItems",void 0),ws([t.Property(!0)],s.prototype,"showFileExtension",void 0),ws([t.Property(null)],s.prototype,"rootAliasName",void 0),ws([t.Property(!1)],s.prototype,"showHiddenItems",void 0),ws([t.Property(!0)],s.prototype,"showThumbnail",void 0),ws([t.Property("Ascending")],s.prototype,"sortOrder",void 0),ws([t.Property("name")],s.prototype,"sortBy",void 0),ws([t.Property(null)],s.prototype,"sortComparer",void 0),ws([t.Complex({},mt)],s.prototype,"toolbarSettings",void 0),ws([t.Collection([],bt)],s.prototype,"toolbarItems",void 0),ws([t.Complex({},At)],s.prototype,"uploadSettings",void 0),ws([t.Property("100%")],s.prototype,"width",void 0),ws([t.Event()],s.prototype,"fileLoad",void 0),ws([t.Event()],s.prototype,"fileOpen",void 0),ws([t.Event()],s.prototype,"beforeDownload",void 0),ws([t.Event()],s.prototype,"beforeImageLoad",void 0),ws([t.Event()],s.prototype,"beforePopupClose",void 0),ws([t.Event()],s.prototype,"beforePopupOpen",void 0),ws([t.Event()],s.prototype,"beforeSend",void 0),ws([t.Event()],s.prototype,"created",void 0),ws([t.Event()],s.prototype,"destroyed",void 0),ws([t.Event()],s.prototype,"fileDragStart",void 0),ws([t.Event()],s.prototype,"fileDragging",void 0),ws([t.Event()],s.prototype,"fileDragStop",void 0),ws([t.Event()],s.prototype,"fileDropped",void 0),ws([t.Event()],s.prototype,"fileSelection",void 0),ws([t.Event()],s.prototype,"fileSelect",void 0),ws([t.Event()],s.prototype,"menuClick",void 0),ws([t.Event()],s.prototype,"menuOpen",void 0),ws([t.Event()],s.prototype,"failure",void 0),ws([t.Event()],s.prototype,"popupClose",void 0),ws([t.Event()],s.prototype,"popupOpen",void 0),ws([t.Event()],s.prototype,"success",void 0),ws([t.Event()],s.prototype,"toolbarClick",void 0),ws([t.Event()],s.prototype,"toolbarCreate",void 0),ws([t.Event()],s.prototype,"uploadListCreate",void 0),s=r=ws([t.NotifyPropertyChanges],s)}(t.Component),Cs=function(){return(Cs=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e}).apply(this,arguments)},Ss=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.root=e.parent.root?e.parent.root:e.parent,e.toolbarObj.appendTo("#"+e.parent.element.id+_t)})},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"),this.parent.toolbarItems.length>0&&(t=this.parent.toolbarItems.map(function(e){return e.name})),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(Jn,{}),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,"."+hi))&&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(!ye(n[l]))return void ge(i.parent,n[l],us);qe(i.parent,"Delete");break;case"details":i.parent.notify(Bn,{}),r=i.parent.selectedItems,"navigationpane"===i.parent.activeModule&&(r=[]),Ee(i.parent,r,i.parent.path,"details");break;case"paste":i.parent.folderPath="",K(i.parent);break;case"refresh":S(i.parent);break;case"download":ce(i.parent);break;case"rename":ye(n[0])?(i.parent.notify(qn,{}),qe(i.parent,"Rename")):ge(i.parent,n[0],us);break;case"upload":De(i.parent);break;case"selectall":i.parent.notify(An,{});break;case"selection":i.parent.notify(Fn,{})}})}},e.prototype.toolbarCreateHandler=function(){var e=this;if(!t.isNullOrUndefined(t.select("#"+this.getId("SortBy"),this.parent.element))){var i=[{id:this.getPupupId("name"),text:_(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?fi:""},{id:this.getPupupId("size"),text:_(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?fi:""},{id:this.getPupupId("date"),text:_(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?fi:""},{separator:!0},{id:this.getPupupId("ascending"),text:_(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?ui:""},{id:this.getPupupId("descending"),text:_(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?ui:""},{id:this.getPupupId("none"),text:_(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?ui:""}];this.buttonObj=new l.DropDownButton({items:i,cssClass:H(this.parent,ii),select:B.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:Xi}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))}if(!t.isNullOrUndefined(t.select("#"+this.getId("View"),this.parent.element))){var n=[{id:this.getPupupId("large"),text:_(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":ui},{id:this.getPupupId("details"),text:_(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?ui:""}];this.layoutBtnObj=new l.DropDownButton({iconCss:"Details"===this.parent.view?tn:nn,cssClass:H(this.parent,"e-caret-hide "+ii),items:n,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,content:'<span class="e-tbar-btn-text">'+_(this.parent,"View")+"</span>",beforeItemRender:function(t){var i=t.item.iconCss,n=t.item.text===_(e.parent,"View-LargeIcons"),s=i?" e-menu-icon "+i:"";t.element.innerHTML='<span class="'+s+'"></span>'+(n?'<span class="e-icons e-fe-large e-menu-icon"></span>':'<span class="e-icons e-fe-grid e-menu-icon"></span>')+t.item.text;var a=t.element.firstChild;a&&""===a.className&&t.element.removeChild(a)}}),this.layoutBtnObj.isStringTemplate=!0,this.layoutBtnObj.appendTo("#"+this.getId("View"))}this.hideItems(this.default,!0),this.hideStatus(),this.parent.portals&&this.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.toolbarObj.portals),this.parent.renderReactTemplates());for(var s=t.selectAll(".e-btn",this.toolbarObj.element),a=function(e){s[e].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},s[e].onkeyup=function(t){13!==t.keyCode||t.target.classList.contains("e-fe-popup")||s[e].click()}},r=0;r<s.length;r++)a(r);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?fi:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?fi:"":e[t].id===this.getPupupId("date")?"dateModified"===this.parent.sortBy||"dateCreated"===this.parent.sortBy?e[t].iconCss=this.parent.sortBy==this.parent.sortBy?fi:"":e[t].iconCss="_fm_modified"===this.parent.sortBy?fi:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?ui:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?ui:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?ui:"")},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=void 0;this.parent.toolbarItems.length>0&&(a=this.getItemModel(this.parent.toolbarItems[parseInt(n.toString(),10)]));var r=this.getId(e[n]),o=_(this.parent,e[n]),l=_(this.parent,"Tooltip-"+e[n]);switch(e[n]){case"|":s={type:"Separator"};break;case"Upload":s={id:r,text:o,tooltipText:l,prefixIcon:zi,showTextOn:i};break;case"SortBy":var h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+o+"</span>";a&&a.text&&(h='<span class="e-tbar-btn-text e-tbar-ddb-text">'+a.text+"</span>"),s={id:r,tooltipText:l,template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+h+"</button>"};break;case"Refresh":s={id:r,text:o,tooltipText:l,prefixIcon:$i,showTextOn:i};break;case"Selection":s={id:r,text:o,tooltipText:l,suffixIcon:an,overflow:"Show",align:"Right"};break;case"View":var d=void 0;d=a&&a.text?a.text:_(this.parent,"View"),s={id:r,tooltipText:l,prefixIcon:"Details"===this.parent.view?tn:nn,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow",template:'<button id="'+r+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+d+"></button>"};break;case"Details":s={id:r,tooltipText:l,prefixIcon:Qi,overflow:"Show",align:"Right",text:o,showTextOn:"Overflow"};break;case"NewFolder":s={id:r,text:o,tooltipText:l,prefixIcon:Ji,showTextOn:i};break;case"Cut":s={id:r,text:o,tooltipText:l,prefixIcon:qi,showTextOn:i};break;case"Copy":s={id:r,text:o,tooltipText:l,prefixIcon:Wi,showTextOn:i};break;case"Paste":s={id:r,text:o,tooltipText:l,prefixIcon:Ki,showTextOn:i};break;case"Delete":s={id:r,text:o,tooltipText:l,prefixIcon:Gi,showTextOn:i};break;case"Rename":s={id:r,text:o,tooltipText:l,prefixIcon:Yi,showTextOn:i};break;case"Download":s={id:r,text:o,tooltipText:l,prefixIcon:en,showTextOn:i};break;case"SelectAll":s={id:r,text:o,tooltipText:l,prefixIcon:Zi,showTextOn:i};break;default:s={id:r,text:o,tooltipText:l,template:""}}if(this.parent.toolbarItems.length>0&&a){var p=Cs({},s,a);t.push(p)}else t.push(s)}return t},e.prototype.getItemModel=function(e){var t={};return e.id&&(t.id=e.id),e.text&&(t.text=e.text),e.tooltipText&&(t.tooltipText=e.tooltipText),e.prefixIcon&&(t.prefixIcon=e.prefixIcon),e.cssClass&&(t.cssClass=e.cssClass),"Both"!==e.showTextOn&&(t.showTextOn=e.showTextOn),e.template&&(t.template=e.template),e.disabled&&(t.disabled=e.disabled),"auto"!==e.width&&(t.width=e.width),e.suffixIcon&&(t.suffixIcon=e.suffixIcon),"Left"!==e.align&&(t.align=e.align),"None"!==e.overflow&&(t.overflow=e.overflow),e.htmlAttributes&&(t.htmlAttributes=e.htmlAttributes),"Button"!==e.type&&(t.type=e.type),!0!==e.visible&&(t.visible=e.visible),e.showAlwaysInPopup&&(t.showAlwaysInPopup=e.showAlwaysInPopup),-1!==e.tabIndex&&(t.tabIndex=e.tabIndex),t},e.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},e.prototype.addEventListener=function(){this.parent.on(fn,this.onPropertyChanged,this),this.parent.on(Tn,this.onSelectionChanged,this),this.parent.on(Vn,this.onLayoutChange,this),this.parent.on(Gn,this.showPaste,this),this.parent.on(Yn,this.hidePaste,this),this.parent.on(jn,this.destroy,this),this.parent.on(_n,this.updateSortByButton,this)},e.prototype.reRenderToolbar=function(e){var t=this,i=[];if(this.parent.toolbarItems.length>0?i=this.parent.toolbarItems.map(function(e){return e.name}):void 0!==e.newProp.toolbarSettings.items&&(i=e.newProp.toolbarSettings.items.map(function(e){return e.trim()})),i.length>0){this.items=this.toolbarItemData(this.getItems(i));var n={items:this.items};this.parent.trigger("toolbarCreate",n,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&&!this.parent.enableVirtualization){var i=void 0;i=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+_(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+_(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?tn:nn;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?ui:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?ui:"")}},e.prototype.removeEventListener=function(){this.parent.off(fn,this.onPropertyChanged),this.parent.off(Tn,this.onSelectionChanged),this.parent.off(Vn,this.onLayoutChange),this.parent.off(Gn,this.showPaste),this.parent.off(Yn,this.hidePaste),this.parent.off(jn,this.destroy),this.parent.off(_n,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=H(this.parent,ii)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=H(this.parent,"e-caret-hide "+ii));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":case"toolbarItems":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}(),js=function(){function e(e){this.filemanagerInstance=e,this.largeIconInstance=e.largeiconsviewModule}return e.prototype.setUIVirtualization=function(){var e=this.largeIconInstance.items,i=e.slice(0,1),n=o.ListBase.createListFromJson(t.createElement,i,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+di,n)),this.largeIconInstance.element.appendChild(n),0!==this.itemList.length&&this.largeIconInstance.element.querySelector("."+Di)&&this.largeIconInstance.element.removeChild(this.largeIconInstance.element.querySelector("."+Di)),this.itemCount=this.getItemCount(Object.keys(this.largeIconInstance.allItems).length),this.largeIconInstance.element.firstChild.remove(),this.largeIconInstance.items=e.slice(0,this.itemCount)},e.prototype.setUlElementHeight=function(){this.lastRowCount=(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount?(this.largeIconInstance.allItems.length-this.itemCount)%this.rowItemCount:this.rowItemCount,this.topElement=this.filemanagerInstance.createElement("div"),this.topElement.classList.add("e-virtual-top"),this.largeIconInstance.element.firstElementChild.insertBefore(this.topElement,this.largeIconInstance.element.firstElementChild.firstChild),this.bottomElement=this.filemanagerInstance.createElement("div"),this.bottomElement.classList.add("e-virtual-bottom"),this.largeIconInstance.element.firstElementChild.insertBefore(this.bottomElement,null);var e=parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.largeIconInstance.itemList[0]).getPropertyValue("margin-bottom"),10);this.listItemHeight=this.largeIconInstance.itemList[0].getBoundingClientRect().height+e,this.totalHeight=Object.keys(this.largeIconInstance.allItems).length/this.rowItemCount*this.listItemHeight,this.topElement.style.height="0px",this.bottomElement.style.height=this.totalHeight+"px",this.topElementHeight=0,this.bottomElementHeight=this.totalHeight,this.listDiff=0,this.renderedCount=this.itemCount},e.prototype.getItemCount=function(e){var i=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-right"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-left"),10);this.rowItemCount=Math.floor(parseFloat(t.formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth))/(this.itemList[0].offsetWidth+i));var n=this.rowItemCount*Math.round(parseFloat(t.formatUnit(this.largeIconInstance.element.clientHeight))/this.itemList[0].offsetHeight);return n>e&&(n=e),n},e.prototype.wireScrollEvent=function(e){e?t.EventHandler.remove(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll):t.EventHandler.add(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll,this)},e.prototype.onVirtualUiScroll=function(){var e;this.scrollPosition=t.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var i=this.getscrollerHeight(0);if(this.topElementHeight=this.listItemHeight*Math.floor(i/this.listItemHeight),this.bottomElementHeight=this.totalHeight-this.topElementHeight,e=i<=this.totalHeight?[this.topElementHeight,this.bottomElementHeight]:[this.totalHeight,0],this.topElementHeight=e[0],this.bottomElementHeight=e[1],this.topElementHeight!==parseFloat(this.topElement.style.height))if(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",i>this.scrollPosition){var n=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff);this.onNormalScroll(n,!0)}else{n=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight);this.onNormalScroll(n,!1)}this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),this.scrollPosition=i,this.largeIconInstance.itemList=Array.prototype.slice.call(t.selectAll("."+di,this.largeIconInstance.element)),this.itemCount=this.itemCount!=this.largeIconInstance.itemList.length?this.largeIconInstance.itemList.length:this.itemCount,this.largeIconInstance.items=this.largeIconInstance.allItems.slice(this.renderedCount-this.itemCount,this.renderedCount)},e.prototype.getscrollerHeight=function(e){return this.largeIconInstance.element.firstElementChild.scrollTop-e<=0?0:this.largeIconInstance.element.firstElementChild.scrollTop-e},e.prototype.onNormalScroll=function(e,t){for(var i=0;i<e;i++)this.updateUI(t)},e.prototype.updateUI=function(e){var i=this;if(e){if(this.items=this.largeIconInstance.allItems.slice(this.renderedCount,this.renderedCount+this.rowItemCount),this.items.length>0){var n=o.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+di,n)),this.itemList.forEach(function(e){i.largeIconInstance.element.firstElementChild.insertBefore(e,i.bottomElement)}),this.renderedCount=this.largeIconInstance.allItems.length>=this.renderedCount+this.rowItemCount?this.renderedCount+this.rowItemCount:this.renderedCount+this.lastRowCount;for(var s=0;s<this.rowItemCount;s++)t.detach(this.topElement.nextElementSibling)}}else{var a=void 0,r=void 0;this.renderedCount===this.largeIconInstance.allItems.length?(a=this.renderedCount-(this.itemCount-this.rowItemCount+this.lastRowCount),this.renderedCount=this.renderedCount-this.lastRowCount<this.itemCount?this.itemCount:this.renderedCount-this.lastRowCount,r=!0):(a=this.renderedCount-this.itemCount,this.renderedCount=this.renderedCount-this.rowItemCount<this.itemCount?this.itemCount:this.renderedCount-this.rowItemCount);var l=a-this.rowItemCount>0?a-this.rowItemCount:0;if(this.items=this.largeIconInstance.allItems.slice(l,a),this.items.length>0){n=o.ListBase.createListFromJson(t.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(t.selectAll("."+di,n));for(var h=this.itemList.length;h>0;h--)this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[h-1],this.topElement.nextElementSibling);for(s=0;s<(r?this.lastRowCount:this.rowItemCount);s++)t.detach(this.bottomElement.previousElementSibling)}}},e.prototype.getModuleName=function(){return"virtualization"},e.prototype.destroy=function(){this.filemanagerInstance.isDestroyed||t.isNullOrUndefined(this.largeIconInstance.element.firstElementChild)||this.wireScrollEvent(!0)},e}(),xs=function(){function e(e){this.removeNodes=[],this.moveNames=[],this.expandTree=!1,this.isDrag=!1,this.isPathDragged=!1,this.isRenameParent=!1,this.isRightClick=!1,this.isSameNodeClicked=!1,this.isNodeExpandCalled=!1,this.renameParent=null,this.previousSelected=null,this.isNodeClickCalled=!1,this.restrictSelecting=!1,this.parent=e,this.addEventListener(),this.keyConfigs={altEnter:"alt+enter",esc:"escape",del:"delete",ctrlX:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"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),ye(e)||t.setValue("class",me(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,sortOrder:this.parent.navigationPaneSettings.sortOrder,nodeSelecting:this.onNodeSelecting.bind(this),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+Bt),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:"."+hn,distance:5,dragArea:this.parent.element,drag:oe.bind(this,this.parent),dragStart:function(t){ie(e.parent,t,e.dragObj)},dragStop:te.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!1,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(hn))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=[],O(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 J(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&&(null==s[0].filterPath||null==this.getTreeData(i)[0].filterPath||s[0].filterPath!==this.getTreeData(i)[0].filterPath)){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),ye(r[a])||t.setValue("class",me(r[a]),o),t.isNullOrUndefined(o)||t.setValue("_fm_htmlAttr",o,r[a]),a++}var h=t.select('[data-uid="'+i+'"]',this.treeObj.element),d=t.select("ul",h);t.isNullOrUndefined(d)&&this.treeObj.addNodes(s,i,null,n)}},e.prototype.onNodeSelecting=function(e){if(!e.isInteracted&&!this.isRightClick&&!this.isSameNodeClicked&&!this.isPathDragged&&!this.isRenameParent||this.restrictSelecting)return this.restrictSelecting=!1,void(this.isNodeClickCalled=!1);if(!this.renameParent){this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));if(e.node.getAttribute("data-uid")!==this.parent.pathId[this.parent.pathId.length-1]&&!this.isRightClick&&!this.isNodeClickCalled||this.isSameNodeClicked){if(this.isNodeClickCalled=!1,!this.isSameNodeClicked){this.isSameNodeClicked=!0;var n={action:e.action,fileDetails:i[0],isInteracted:e.isInteracted};this.parent.trigger("fileSelect",n)}if(!this.isRightClick){var s={cancel:!1,fileDetails:i[0],module:"NavigationPane"};this.parent.trigger("fileOpen",s),e.cancel=s.cancel}e.cancel&&(this.restrictSelecting=!!this.isNodeClickCalled&&this.previousSelected[0]!==e.node.getAttribute("data-uid"),this.isNodeClickCalled=!0,this.isSameNodeClicked=!1,this.previousSelected=this.treeObj.selectedNodes,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")])}else if(this.previousSelected[0]!==e.node.getAttribute("data-uid")){n={action:e.action,fileDetails:i[0],isInteracted:this.isNodeClickCalled};this.parent.trigger("fileSelect",n)}}},e.prototype.openFileOnContextMenuClick=function(e){var t=this.treeObj.getTreeData(e);this.parent.selectedItems=[],this.parent.itemData=t,this.activeNode=e,this.parent.activeModule="navigationpane";var i={cancel:!1,fileDetails:t[0],module:"NavigationPane"};this.parent.trigger("fileOpen",i),this.isNodeClickCalled=!0,i.cancel||(p(e,this.parent.itemData[0],this.parent),Ce(this.parent,this.isPathDragged?$n:Sn,this.parent.path),this.parent.visitedItem=e,this.isPathDragged=this.isRenameParent=this.isRightClick=!1,this.treeObj.selectedNodes=[e.getAttribute("data-uid")])},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.isNodeClickCalled=!1),this.parent.searchedItems=[],e.isInteracted||this.isRightClick||this.isSameNodeClicked||this.isPathDragged||this.isRenameParent){this.activeNode=e.node,this.parent.activeModule="navigationpane";var i=this.getTreeData(t.getValue("id",e.nodeData));this.parent.selectedItems=[],this.parent.itemData=i;var n=this.parent.path;!this.isRightClick&&this.isSameNodeClicked?p(e.node,this.parent.itemData[0],this.parent):(this.parent.pathId=u(e.node),this.parent.visitedItem=e.node),e.node.querySelector("."+rn)&&null===e.node.querySelector("."+di)&&(this.expandNodeTarget="add"),n!==this.parent.path&&(!this.isRightClick&&this.isSameNodeClicked&&(Ce(this.parent,this.isPathDragged?$n:Sn,this.parent.path),this.isNodeClickCalled=!0),this.parent.visitedItem=e.node),this.isPathDragged=this.isRenameParent=this.isRightClick=this.isSameNodeClicked=!1}else this.parent.pathId=u(e.node)},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("."+di)){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)),this.parent.pathId.push(t.getValue("id",e.nodeData)),Ce(this.parent,Hn,r),this.isNodeExpandCalled=!0}},e.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null,this.isNodeExpandCalled=!1},e.prototype.onNodeClicked=function(e){if(this.parent.activeModule="navigationpane",this.previousSelected=this.treeObj.selectedNodes,this.activeNode=e.node,3===e.event.which&&e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0])this.isRightClick=!0,this.isNodeClickCalled=!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(fn,{module:t,newProp:{selectedItems:[]}})}else e.node.getAttribute("data-uid")!==this.treeObj.selectedNodes[0]||this.isNodeClickCalled||this.isNodeExpandCalled||(3===e.event.which&&(this.isRightClick=!0),this.isSameNodeClicked=!0,this.isNodeClickCalled=!0,this.treeObj.selectedNodes=[e.node.getAttribute("data-uid")])},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.isNullOrUndefined(n)?null:t.select("."+ci,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),this.parent.uploadObj.directoryUpload&&!this.parent.hasId&&this.updateTree(e)},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("."+ci,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("."+rn)&&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.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]);Ne(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,"."+ci).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){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),Ce(this.parent,Wn,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":Ce(this.parent,mn,"/"),e.oldProp.navigationPaneSettings.sortOrder!==e.newProp.navigationPaneSettings.sortOrder&&(this.treeObj.sortOrder=e.newProp.navigationPaneSettings.sortOrder)}}},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){var i=this.treeObj.getTreeData().filter(function(t){return t.name===e.name})[0];this.treeObj.selectedNodes=[t.getValue("_fm_id",i)],this.treeObj.dataBind()}else{var n=t.getValue("filterPath",e),a=t.getValue("name",e),r=new s.DataManager(this.treeObj.getTreeData()).executeLocal((new s.Query).where(this.treeObj.fields.text,"equal",a,!1));if(r.length>0){var o=new s.DataManager(r).executeLocal((new s.Query).where("filterPath","equal",n,!1));if(o.length>0){var l=t.getValue(this.treeObj.fields.id,o[0]);this.treeObj.selectedNodes=[l],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(Q(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(fn,this.onPropertyChanged,this),this.parent.on(as,this.onDownLoadInit,this),this.parent.on(gn,this.onInitialEnd,this),this.parent.on(mn,this.onFinalizeEnd,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on($n,this.onpasteEnd,this),this.parent.on(Zn,this.onCutEnd,this),this.parent.on(Xn,this.onpasteInit,this),this.parent.on(Hn,this.onNodeExpanded,this),this.parent.on(bn,this.onCreateEnd,this),this.parent.on(Jn,this.onSelectedData,this),this.parent.on(In,this.onDeleteInit,this),this.parent.on(On,this.onDeleteEnd,this),this.parent.on(wn,this.onRefreshEnd,this),this.parent.on(ts,this.onSelectionChanged,this),this.parent.on(kn,this.onOpenInit,this),this.parent.on(Ln,this.onOpenEnd,this),this.parent.on(jn,this.destroy,this),this.parent.on(qn,this.onRenameInit,this),this.parent.on(Kn,this.onRenameEnd,this),this.parent.on(Wn,this.onRenameEndParent,this),this.parent.on(Un,this.onClearPathInit,this),this.parent.on(Qn,this.oncutCopyInit,this),this.parent.on(rs,this.onDropInit,this),this.parent.on(zn,this.onMenuItemData,this),this.parent.on(os,this.onDragEnd,this),this.parent.on(hs,this.onDragging,this),this.parent.on(ls,this.onDropPath,this),this.parent.on(Bn,this.onDetailsInit,this),this.parent.on(vn,this.onPathDrag,this)},e.prototype.removeEventListener=function(){this.parent.off(gn,this.onInitialEnd),this.parent.off(as,this.onDownLoadInit),this.parent.off(mn,this.onFinalizeEnd),this.parent.off(Jn,this.onSelectedData),this.parent.off(fn,this.onPropertyChanged),this.parent.off(Sn,this.onPathChanged),this.parent.off($n,this.onpasteEnd),this.parent.off(Zn,this.onCutEnd),this.parent.off(Xn,this.onpasteInit),this.parent.off(ts,this.onSelectionChanged),this.parent.off(Hn,this.onNodeExpanded),this.parent.off(bn,this.onCreateEnd),this.parent.off(wn,this.onRefreshEnd),this.parent.off(kn,this.onOpenInit),this.parent.off(Ln,this.onOpenEnd),this.parent.off(jn,this.destroy),this.parent.off(qn,this.onRenameInit),this.parent.off(Kn,this.onRenameEnd),this.parent.off(Wn,this.onRenameEndParent),this.parent.off(Un,this.onClearPathInit),this.parent.off(In,this.onDeleteInit),this.parent.off(On,this.onDeleteEnd),this.parent.off(Qn,this.oncutCopyInit),this.parent.off(rs,this.onDropInit),this.parent.off(os,this.onDragEnd),this.parent.off(hs,this.onDragging),this.parent.off(ls,this.onDropPath),this.parent.off(Bn,this.onDetailsInit),this.parent.off(zn,this.onMenuItemData),this.parent.off(vn,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(Bn,{}),Ee(this.parent,[],this.parent.path,"details");break;case"esc":b(this.parent);break;case"del":this.parent.pathId[0]!==this.activeNode.getAttribute("data-uid")&&(this.updateItemData(),ye(this.parent.itemData[0])?(this.removeNodes=[],qe(this.parent,"Delete")):ge(this.parent,this.parent.itemData[0],us));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 ge(this.parent,this.parent.itemData[0],ms);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];ye(t)?(this.updateRenameData(),qe(this.parent,"Rename")):ge(this.parent,t,us)}}},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=J(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},e.prototype.doDownload=function(){var e=J(this.parent.path),i=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":t.getValue("name",this.parent.itemData[0]);ze(this.parent,e,[i])},e}(),Ps=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+zt,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:this.parent.isMac?"cmd+x":"ctrl+x",ctrlC:this.parent.isMac?"cmd+c":"ctrl+c",ctrlV:this.parent.isMac?"cmd+v":"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],ai);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},enableVirtualization:this.parent.enableVirtualization,enablePersistence:this.parent.enablePersistence,enableVirtualMaskRow:!0,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%",height:this.parent.enableVirtualization?this.getGridHeight():"auto",beforeCopy:function(e){e.cancel=!0},load:function(e){this.focusModule.destroy()},locale:this.parent.locale}),this.parent.isReact&&(this.gridObj.isReact=!0,this.gridObj.portals=[],this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),this.gridObj.isStringTemplate=!0,this.gridObj.appendTo("#"+this.parent.element.id+zt),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e}},e.prototype.reactTemplateRender=function(e){this.parent.portals=e,this.parent.portals&&this.parent.toolbarModule&&this.parent.toolbarModule.toolbarObj&&this.parent.toolbarModule.toolbarObj.portals&&(this.parent.portals=this.parent.portals.concat(this.parent.toolbarModule.toolbarObj.portals)),this.parent.notify("renderReactTemplate",this.parent.portals),this.parent.renderReactTemplates()},e.prototype.getGridHeight=function(){var e=t.select("#"+this.parent.element.id+Qt,this.parent.element),i=t.select("#"+this.parent.element.id+Xt,this.parent.element);return e.offsetHeight-i.offsetHeight-36},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,i=this.parent.enableHtmlSanitizer;if(this.parent.isMobile)e=[{field:"name",headerText:_(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:t.initializeCSPTemplate(function(e){return'<div class="e-fe-text">'+(i?t.SanitizeHtmlHelper.sanitize(e.name):e.name)+'</div><div class="e-fe-date">'+e._fm_modified+'</div><span class="e-fe-size">'+e.size+"</span>"})}];else{e=t.extend([],this.parent.detailsViewSettings.columns,null,!0),this.adjustWidth(e,"name");for(var n=function(n,a){if(e[n].headerText=_(s.parent,e[n].headerText),"name"===e[n].field&&!t.isNullOrUndefined(e[n].template)&&"function"!=typeof e[n].template){var r=e[n].template;e[n].template=t.initializeCSPTemplate(function(e){var n=i?t.SanitizeHtmlHelper.sanitize(e.name):e.name;return r.replace(/\${name}/g,n)})}},s=this,a=0,r=e.length;a<r;a++)n(a)}var o=this.parent.isMobile||this.parent.isBigger?"54":"46",l={field:"type",width:o,minWidth:o,template:t.initializeCSPTemplate(function(e){return'<span class="e-fe-icon '+e._fm_iconClass+'"></span>'}),allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:t.initializeCSPTemplate(function(){return'<span class="e-fe-icon e-fe-folder"></span>'})};if(e.unshift(l),this.parent.showItemCheckBoxes){var h=this.parent.isBigger?"36":"26",d={type:"checkbox",width:h,minWidth:h,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1};this.parent.isMobile?e.push(d):e.unshift(d)}for(a=0,r=e.length;a<r;a++)e[a].disableHtmlEncode=!this.parent.enableHtmlSanitizer;return e},e.prototype.adjustHeight=function(){if(this.gridObj){var e=t.select("#"+this.parent.element.id+Qt,this.parent.element),i=t.select("#"+this.parent.element.id+Xt,this.parent.element),n=t.select("."+Ti,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),p=new t.Internationalization(this.parent.locale),c=void 0;for(n=this.parent.detailsViewSettings.columns,s=0;s<n.length;s++)if("size"===n[s].field){c=t.isNullOrUndefined(n[s].format)?"n":n[s].format.toString();break}h=p.formatNumber(d/1024,{format:c})+" "+_(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")){var u=e.row.querySelector(".e-fe-date"),f=(p=new t.Internationalization(this.parent.locale),n=this.parent.detailsViewSettings.columns,void 0);for(s=0;s<n.length;s++)if("dateModified"===n[s].field){f=n[s].format;break}var g=p.formatDate(new Date(t.getValue("_fm_modified",e.data)),f);u.innerHTML=g}var m=e.row.querySelector("."+Oi);m&&m.classList.add("e-small"),ye(e.data)||(e.row.className+=" "+me(e.data));var b={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",b)},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(_n,{})}},e.prototype.onHeaderCellInfo=function(e){var t=e.node.querySelector("."+Oi);t&&t.classList.add("e-small")},e.prototype.onBeforeDataBound=function(e){var t=this;n.showSpinner(this.parent.element);var i=this.parent.detailsViewSettings.columns.find(function(e){return e.field===t.parent.sortBy});if(i&&!("sortComparer"in i)){var s=L(this.parent,this.parent.enableVirtualization?e.result:this.gridObj.dataSource);e.result=s}},e.prototype.onDataBound=function(){if(this.createDragObj(),(0!==this.parent.selectedItems.length&&!this.parent.enableVirtualization||0!==this.parent.selectedItems.length&&this.parent.enableVirtualization&&0==this.element.querySelector(".e-content").scrollTop)&&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;(i=this.gridObj.getContent().querySelector(".e-content")).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]);if(-1!==e.indexOf(r))n.push(s);else if(!this.parent.showFileExtension&&r.includes(".")){var o=r.split(".").slice(0,-1).join(".");-1!==e.indexOf(o)&&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),0!==this.element.querySelector(".e-content").scrollTop&&this.gridObj.freezeRefresh()},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(),this.interaction=!0);break;case"showFileExtension":case"showHiddenItems":Ce(this.parent,Sn,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)),I(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.gridObj.freezeRefresh(),this.parent.isReact&&this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this)),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:_(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("."+Vi))){if(0!==i.length&&this.element.querySelector("."+Di))if(this.element.querySelector("."+Vi).querySelector("."+Di)){var n=this.element.querySelector("."+Vi).querySelector("."+Di);this.element.querySelector("."+Vi).removeChild(n)}else this.element.removeChild(this.element.querySelector("."+Di))}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(be(e)){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)===Ei){var a=R(i.parent,e);lt(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);i.parent.oldPath=i.parent.path;var 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(),i.parent.enableVirtualization&&i.parent.element.querySelector("#"+i.parent.element.id+Kt).focus()}})}else ge(this.parent,e,cs)},e.prototype.onLayoutChange=function(e){"Details"===this.parent.view&&(this.parent.enableVirtualization&&this.parent.setProperties({selectedItems:[]},!0),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(es,{}),this.gridObj.element.classList.remove(ln),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(Tn,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},e.prototype.removePathColumn=function(e){var i=this.gridObj.columns.length,n=JSON.parse(JSON.stringify(this.gridObj.columns));n[i-1].field&&"filterPath"===n[i-1].field&&(t.isNullOrUndefined(this.gridObj.sortSettings.columns[0])||"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(_n,{})),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&&Ne(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(ln)},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],pn),this.parent.selectedItems.length>0&&t.addClass([this.element],pn)},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(mn,this.onFinalizeEnd,this),this.parent.on(jn,this.destroy,this),this.parent.on(Vn,this.onLayoutChange,this),this.parent.on(Sn,this.onPathChanged,this),this.parent.on(bn,this.onCreateEnd,this),this.parent.on(rs,this.onDropInit,this),this.parent.on(Bn,this.onDetailsInit,this),this.parent.on(wn,this.onRefreshEnd,this),this.parent.on(Mn,this.onSearchFiles,this),this.parent.on(ps,this.onMethodCall,this),this.parent.on(Rn,this.onActionFailure,this),this.parent.on(fn,this.onPropertyChanged,this),this.parent.on(In,this.onDeleteInit,this),this.parent.on(On,this.onDeleteEnd,this),this.parent.on(Jn,this.onSelectedData,this),this.parent.on(qn,this.onRenameInit,this),this.parent.on(Kn,this.onPathChanged,this),this.parent.on(kn,this.onOpenInit,this),this.parent.on(is,this.onSortColumn,this),this.parent.on(Ln,this.onPathChanged,this),this.parent.on(yn,this.onPathChanged,this),this.parent.on(Xn,this.onPasteInit,this),this.parent.on(es,this.onHideLayout,this),this.parent.on(An,this.onSelectAllInit,this),this.parent.on(Fn,this.onClearAllInit,this),this.parent.on(ns,this.onPathColumn,this),this.parent.on(Tn,this.onSelectionChanged,this),this.parent.on(xn,this.onBeforeRequest,this),this.parent.on(Nn,this.onAfterRequest,this),this.parent.on($n,this.onpasteEnd,this),this.parent.on(Qn,this.oncutCopyInit,this),this.parent.on(zn,this.onMenuItemData,this),this.parent.on(Dn,this.onDetailsResizeHandler,this),this.parent.on(Cn,this.onDetailsResize,this),this.parent.on(En,this.onLayoutRefresh,this),this.parent.on(ls,this.onDropPath,this),this.parent.on(ds,this.onUpdateSelectionData,this)},e.prototype.removeEventListener=function(){this.parent.off(mn,this.onFinalizeEnd),this.parent.off(jn,this.destroy),this.parent.off(Vn,this.onLayoutChange),this.parent.off(Sn,this.onPathChanged),this.parent.off(Xn,this.onPasteInit),this.parent.off(bn,this.onCreateEnd),this.parent.off(wn,this.onRefreshEnd),this.parent.off(Mn,this.onSearchFiles),this.parent.off(ps,this.onMethodCall),this.parent.off(Rn,this.onActionFailure),this.parent.off(fn,this.onPropertyChanged),this.parent.off(qn,this.onRenameInit),this.parent.off(Kn,this.onPathChanged),this.parent.off(yn,this.onPathChanged),this.parent.off(kn,this.onOpenInit),this.parent.off(is,this.onSortColumn),this.parent.off(Ln,this.onPathChanged),this.parent.off(es,this.onHideLayout),this.parent.off(An,this.onSelectAllInit),this.parent.off(Fn,this.onClearAllInit),this.parent.off(In,this.onDeleteInit),this.parent.off(On,this.onDeleteEnd),this.parent.off(ns,this.onPathColumn),this.parent.off(Tn,this.onSelectionChanged),this.parent.off(xn,this.onBeforeRequest),this.parent.off(Nn,this.onAfterRequest),this.parent.off($n,this.onpasteEnd),this.parent.off(Qn,this.oncutCopyInit),this.parent.off(rs,this.onDropInit),this.parent.off(Jn,this.onSelectedData),this.parent.off(Bn,this.onDetailsInit),this.parent.off(zn,this.onMenuItemData),this.parent.off(Dn,this.onDetailsResizeHandler),this.parent.off(Cn,this.onDetailsResize),this.parent.off(En,this.onLayoutRefresh),this.parent.off(ls,this.onDropPath),this.parent.off(ds,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]?i=this.parent.hasId?this.gridObj.getRowInfo(t).rowData.id:t.getElementsByClassName("e-fe-text")[0].innerText:t.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling&&(i=this.parent.hasId?this.gridObj.getRowInfo(t).rowData.id:t.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText),t&&!t.querySelector(".e-active")&&this.selectRecords([i]),O(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.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:"."+wi,drag:oe.bind(this,this.parent),dragStart:function(t){ie(e.parent,t,e.dragObj)},dragStop:te.bind(this,this.parent),enableAutoScroll:!1,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!==Q(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.parent.isReact&&this.gridObj.off("reactTemplateRender",this.reactTemplateRender),this.unWireEvents(),this.gridObj.destroy()))},e.prototype.updateType=function(e){var i=t.select("."+Ni,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(Tn,{}),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(this.parent.enableVirtualization)this.parent.currentItemText=t.getValue("name",e.data);else 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.enableVirtualization&&e.isHeaderCheckboxClicked||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=he(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")}-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),this.isInteracted?(this.selectedRecords(),0===this.parent.selectedItems.length&&(t.setValue("enableSelectMultiTouch",!1,this.gridObj.selectionModule),t.removeClass([this.parent.element],ai)),this.parent.notify(Tn,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null):this.isInteracted=!0},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),t.EventHandler.add(this.parent.element,"focusout",this.onBlur,this)},e.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),t.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus),t.EventHandler.remove(this.parent.element,"focusout",this.onBlur)},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],ai));var n=e.originalEvent.target;if(n){var s=t.closest(n,"."+wi),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],ai),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(Tn,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},e.prototype.removeFocus=function(){this.addFocus(null)},e.prototype.onBlur=function(e){if((null===e.relatedTarget||t.closest(e.relatedTarget,".e-grid")===e.relatedTarget)&&!t.isNullOrUndefined(this.gridObj.element))for(var i=this.gridObj.element.querySelectorAll("th"),n=0;n<i.length;n++)i[n].classList.contains("e-focus")&&this.addFocus(null)},e.prototype.getFocusedItemIndex=function(){return t.isNullOrUndefined(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("data-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":case"ctrlD":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":this.parent.notify(Bn,{}),Ee(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&&!0===this.gridObj.allowSorting){if(!e.target.classList.contains("e-fe-grid-icon")){var p=e.target.getElementsByClassName("e-ascending").length?"Descending":"Ascending",c=this.gridObj.getColumnByUid(e.target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid")).field;this.gridObj.sortColumn(c,p),t.isNullOrUndefined(this.getFocusedItem().nextSibling)||this.getFocusedItem().nextSibling.setAttribute("tabindex","0")}break}if(i=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data){var u=JSON.parse(JSON.stringify(i));this.openContent(u)}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":if(!t.isNullOrUndefined(r[0])&&this.parent.allowMultiSelection){var f=this.gridObj.getContent().querySelector(".e-content"),g=f.scrollTop,m=this.gridObj.selectedRowIndex;this.gridObj.selectionModule.selectRowsByRange(0,r.length-1),f.scrollTop=g,-1!==m&&this.addFocus(m)}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.addHeaderFocus(e)}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 ge(this.parent,e[t],ms);ze(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(!ye(e[t]))return void ge(this.parent,e[t],us);qe(this.parent,"Delete")}},e.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),pe(this.parent))},e.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];de(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(var s=e+1;s<=t;s++)n.push(s);else for(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],[yi,vi])),t.isNullOrUndefined(n)||(this.gridObj.element.setAttribute("tabindex","-1"),n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[yi,vi]))},e.prototype.addHeaderFocus=function(e){var i=t.select(".e-row",this.element);this.gridObj.element.setAttribute("tabindex","-1");var n;!t.isNullOrUndefined(e.target)&&e.target.classList.contains("e-defaultcursor")?(this.addFocus(0),n=e.target.nextElementSibling):t.isNullOrUndefined(this.gridObj.element.querySelector(".e-focus"))||"TH"!==this.gridObj.element.querySelector(".e-focus").tagName?n=t.select("th.e-fe-grid-icon",this.element):(n=this.gridObj.element.querySelector(".e-focus").nextElementSibling,this.addFocus(0)),t.isNullOrUndefined(n)||(n.setAttribute("tabindex","0"),n.focus(),t.addClass([n],[yi,vi]),i.setAttribute("tabindex","0"),0===i.tabIndex&&0===n.tabIndex&&t.removeClass([i],[yi,vi]))},e.prototype.getFocusedItem=function(){return t.select("."+vi,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(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))this.performDelete();else{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]=he(this.parent,n[a]);ue(this.parent,n,s)}}},e.prototype.downloadFiles=function(e){if(t.isNullOrUndefined(e))this.doDownload();else{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]=he(this.parent,n[a]);fe(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))this.performRename();else{var n=this.getRecords([e]);n.length>0&&(de(this.parent,n[0]),t.isNullOrUndefined(i)?pe(this.parent):ye(this.parent.itemData[0])?xe(this.parent,this.parent.path,i):ge(this.parent,this.parent.itemData[0],us))}},e}();e.AjaxSettings=ct,e.defaultToolbarItems=gt,e.ToolbarSettings=mt,e.ToolbarItem=bt,e.SearchSettings=It,e.columnArray=Dt,e.DetailsViewSettings=Ct,e.fileItems=xt,e.folderItems=Pt,e.layoutItems=Nt,e.ContextMenuSettings=Et,e.NavigationPaneSettings=kt,e.UploadSettings=At,e.Column=Vt,e.TOOLBAR_ID=_t,e.LAYOUT_ID=Ht,e.NAVIGATION_ID="_navigation",e.TREE_ID=Bt,e.GRID_ID=zt,e.LARGEICON_ID=qt,e.DIALOG_ID=Wt,e.ALT_DIALOG_ID="_alt_dialog",e.IMG_DIALOG_ID=Kt,e.EXTN_DIALOG_ID=Gt,e.UPLOAD_DIALOG_ID=Yt,e.RETRY_DIALOG_ID="_retry_dialog",e.CONTEXT_MENU_ID=Jt,e.SORTBY_ID="_sortby",e.VIEW_ID="_view",e.SPLITTER_ID="_splitter",e.CONTENT_ID=Qt,e.BREADCRUMBBAR_ID=Xt,e.UPLOAD_ID=$t,e.RETRY_ID="_retry",e.SEARCH_ID="_search",e.ROOT=Zt,e.CONTROL=ei,e.CHECK_SELECT=ti,e.ROOT_POPUP=ii,e.MOBILE=ni,e.MOB_POPUP=si,e.MULTI_SELECT=ai,e.FILTER=ri,e.LAYOUT="e-layout",e.NAVIGATION="e-navigation",e.LAYOUT_CONTENT=oi,e.LARGE_ICONS=li,e.TB_ITEM=hi,e.LIST_ITEM=di,e.LIST_TEXT=pi,e.LIST_PARENT=ci,e.TB_OPTION_TICK=ui,e.TB_OPTION_DOT=fi,e.BLUR=gi,e.ACTIVE=mi,e.HOVER=bi,e.FOCUS=yi,e.FOCUSED=vi,e.CHECK=Ii,e.FRAME="e-frame",e.CB_WRAP=Oi,e.ROW=wi,e.ROWCELL="e-rowcell",e.EMPTY=Di,e.EMPTY_CONTENT=Ci,e.EMPTY_INNER_CONTENT=Si,e.CLONE=ji,e.DROP_FOLDER=xi,e.DROP_FILE=Pi,e.FOLDER=Ni,e.ICON_IMAGE=Ei,e.ICON_MUSIC=Ri,e.ICON_VIDEO=Mi,e.LARGE_ICON=ki,e.LARGE_EMPTY_FOLDER=Li,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=Ti,e.TEMPLATE_CELL="e-templatecell",e.TREE_VIEW=Ai,e.MENU_ITEM=Fi,e.MENU_ICON=Ui,e.SUBMENU_ICON="e-caret",e.GRID_VIEW=Vi,e.GRID_CONTENT=_i,e.ICON_VIEW=Hi,e.ICON_OPEN=Bi,e.ICON_UPLOAD=zi,e.ICON_CUT=qi,e.ICON_COPY=Wi,e.ICON_PASTE=Ki,e.ICON_DELETE=Gi,e.ICON_RENAME=Yi,e.ICON_NEWFOLDER=Ji,e.ICON_DETAILS=Qi,e.ICON_SHORTBY=Xi,e.ICON_REFRESH=$i,e.ICON_SELECTALL=Zi,e.ICON_DOWNLOAD=en,e.ICON_OPTIONS="e-icons e-fe-options",e.ICON_GRID=tn,e.ICON_LARGE=nn,e.ICON_BREADCRUMB=sn,e.ICON_CLEAR=an,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=rn,e.DETAILS_LABEL="e-detailslabel",e.ERROR_CONTENT=on,e.STATUS="e-status",e.BREADCRUMBS="e-address",e.RTL="e-rtl",e.DISPLAY_NONE=ln,e.COLLAPSED="e-node-collapsed",e.FULLROW=hn,e.ICON_COLLAPSIBLE="e-icon-collapsible",e.SPLIT_BAR=dn,e.HEADER_CHECK=pn,e.OVERLAY="e-fe-overlay",e.VALUE=cn,e.isFile=un,e.modelChanged=fn,e.initialEnd=gn,e.finalizeEnd=mn,e.createEnd=bn,e.filterEnd=yn,e.beforeDelete="before-delete",e.pathDrag=vn,e.deleteInit=In,e.deleteEnd=On,e.refreshEnd=wn,e.resizeEnd=Dn,e.splitterResize=Cn,e.pathChanged=Sn,e.destroy=jn,e.beforeRequest=xn,e.upload="upload",e.skipUpload=Pn,e.afterRequest=Nn,e.download="download",e.layoutRefresh=En,e.actionFailure=Rn,e.search=Mn,e.openInit=kn,e.openEnd=Ln,e.selectionChanged=Tn,e.selectAllInit=An,e.clearAllInit=Fn,e.clearPathInit=Un,e.layoutChange=Vn,e.sortByChange=_n,e.nodeExpand=Hn,e.detailsInit=Bn,e.menuItemData=zn,e.renameInit=qn,e.renameEndParent=Wn,e.renameEnd=Kn,e.showPaste=Gn,e.hidePaste=Yn,e.selectedData=Jn,e.cutCopyInit=Qn,e.pasteInit=Xn,e.pasteEnd=$n,e.cutEnd=Zn,e.hideLayout=es,e.updateTreeSelection=ts,e.treeSelect="select-node",e.sortColumn=is,e.pathColumn=ns,e.searchTextChange=ss,e.beforeDownload="before-download",e.downloadInit=as,e.dropInit=rs,e.dragEnd=os,e.dropPath=ls,e.dragHelper="drag-helper",e.dragging=hs,e.updateSelectionData=ds,e.methodCall=ps,e.permissionRead=cs,e.permissionEdit=us,e.permissionEditContents=fs,e.permissionCopy="copy",e.permissionUpload=gs,e.permissionDownload=ms,e.FileManager=Ds,e.Toolbar=Ss,e.BreadCrumbBar=ys,e.Virtualization=js,e.NavigationPane=xs,e.DetailsView=Ps,e.LargeIconsView=bs,e.createDialog=qe,e.createExtDialog=We,e.createImageDialog=lt,e.ContextMenu=vs,e.read=Ce,e.createFolder=Se,e.filter=je,e.rename=xe,e.paste=Pe,e.Delete=Ne,e.GetDetails=Ee,e.Search=He,e.Download=ze,e.sortComparer=function(e,t){var i=/\.\S+/.test(e),n=/\.\S+/.test(t);if(i&&!n)return 1;if(!i&&n)return-1;var s=[],a=[];for((e+"").replace(/(\d+)|(\D+)/g,function(e,t,i){return s.push([t||1/0,i||""]),""}),(t+"").replace(/(\d+)|(\D+)/g,function(e,t,i){return a.push([t||1/0,i||""]),""});s.length&&a.length;){var r=s.shift(),o=a.shift(),l=r[0]-o[0]||r[1].localeCompare(o[1]);if(l)return l}return s.length-a.length},e.updatePath=p,e.getPath=c,e.getPathId=u,e.getPathNames=f,e.getParents=g,e.generatePath=m,e.removeActive=b,e.activeElement=y,e.addBlur=v,e.removeBlur=I,e.getModule=O,e.searchWordHandler=w,e.updateLayout=D,e.getTargetModule=C,e.refresh=S,e.openAction=j,e.getPathObject=x,e.copyFiles=P,e.cutFiles=N,e.fileType=E,e.getImageUrl=R,e.getFullPath=M,e.getName=k,e.getSortedData=L,e.getObject=T,e.createEmptyElement=A,e.getDirectories=F,e.setNodeId=U,e.setDateObject=V,e.getLocaleText=_,e.getCssClass=H,e.sortbyClickHandler=B,e.getSortField=z,e.setNextPath=q,e.openSearchFolder=W,e.pasteHandler=K,e.validateSubFolder=G,e.dropHandler=Y,e.getParentPath=J,e.getDirectoryPath=Q,e.doPasteUpdate=X,e.readDropPath=$,e.getDuplicateData=Z,e.createVirtualDragElement=ee,e.dragStopHandler=te,e.dragStartHandler=ie,e.dragCancel=ne,e.removeDropTarget=se,e.removeItemClass=ae,e.scrollHandler=re,e.draggingHandler=oe,e.objectToString=le,e.getItemName=he,e.updateRenamingData=de,e.doRename=pe,e.doDownload=ce,e.doDeleteFiles=ue,e.doDownloadFiles=fe,e.createDeniedDialog=ge,e.getAccessClass=me,e.hasReadAccess=be,e.hasEditAccess=ye,e.hasContentAccess=ve,e.hasUploadAccess=Ie,e.hasDownloadAccess=Oe,e.createNewFolder=we,e.uploadItem=De,Object.defineProperty(e,"__esModule",{value:!0})});
11
11
  //# sourceMappingURL=ej2-filemanager.umd.min.js.map