@syncfusion/ej2-filemanager 28.1.33 → 28.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-filemanager.min.js +1 -10
- package/dist/ej2-filemanager.umd.min.js +1 -10
- package/dist/ej2-filemanager.umd.min.js.map +1 -1
- package/dist/es6/ej2-filemanager.es2015.js +40 -10
- package/dist/es6/ej2-filemanager.es2015.js.map +1 -1
- package/dist/es6/ej2-filemanager.es5.js +48 -18
- package/dist/es6/ej2-filemanager.es5.js.map +1 -1
- package/dist/global/ej2-filemanager.min.js +1 -10
- package/dist/global/ej2-filemanager.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +8 -9
- package/src/file-manager/common/operations.js +37 -11
- package/src/file-manager/common/utility.js +2 -2
- package/src/file-manager/layout/navigation-pane.js +9 -5
@@ -1,11 +1,2 @@
|
|
1
|
-
/*!
|
2
|
-
* filename: ej2-filemanager.umd.min.js
|
3
|
-
* version : 28.1.33
|
4
|
-
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
5
|
-
* Use of this code is subject to the terms of our license.
|
6
|
-
* A copy of the current license can be obtained at any time by e-mailing
|
7
|
-
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
8
|
-
* applicable laws.
|
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-grids"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-lists"),require("@syncfusion/ej2-splitbuttons"),require("@syncfusion/ej2-navigations")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-layouts","@syncfusion/ej2-popups","@syncfusion/ej2-data","@syncfusion/ej2-grids","@syncfusion/ej2-inputs","@syncfusion/ej2-buttons","@syncfusion/ej2-lists","@syncfusion/ej2-splitbuttons","@syncfusion/ej2-navigations"],t):t((e=e||self).ej={},e.ej2Base,e.ej2Layouts,e.ej2Popups,e.ej2Data,e.ej2Grids,e.ej2Inputs,e.ej2Buttons,e.ej2Lists,e.ej2Splitbuttons,e.ej2Navigations)}(this,function(e,y,A,r,h,F,V,U,_,H,B){"use strict";z=function(e,t){return(z=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])}))(e,t)};var z,q,W=function(e,t){function i(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},K=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},W=(q=y.ChildProperty,W(Y,q),K([y.Property(null)],Y.prototype,"downloadUrl",void 0),K([y.Property(null)],Y.prototype,"getImageUrl",void 0),K([y.Property(null)],Y.prototype,"uploadUrl",void 0),K([y.Property(null)],Y.prototype,"url",void 0),Y);function Y(){return null!==q&&q.apply(this,arguments)||this}G=function(e,t){return(G=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])}))(e,t)};var G,J,K=function(e,t){function i(){this.constructor=e}G(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},t=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},Q=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],X=(J=y.ChildProperty,K($,J),t([y.Property(Q)],$.prototype,"items",void 0),t([y.Property(!0)],$.prototype,"visible",void 0),$);function $(){return null!==J&&J.apply(this,arguments)||this}Z=y.ChildProperty,K(i,Z),t([y.Property("")],i.prototype,"id",void 0),t([y.Property("")],i.prototype,"text",void 0),t([y.Property("auto")],i.prototype,"width",void 0),t([y.Property("")],i.prototype,"cssClass",void 0),t([y.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),t([y.Property(!1)],i.prototype,"disabled",void 0),t([y.Property("")],i.prototype,"prefixIcon",void 0),t([y.Property("")],i.prototype,"suffixIcon",void 0),t([y.Property(!0)],i.prototype,"visible",void 0),t([y.Property("None")],i.prototype,"overflow",void 0),t([y.Property("")],i.prototype,"template",void 0),t([y.Property("Button")],i.prototype,"type",void 0),t([y.Property("Both")],i.prototype,"showTextOn",void 0),t([y.Property(null)],i.prototype,"htmlAttributes",void 0),t([y.Property("")],i.prototype,"tooltipText",void 0),t([y.Property("Left")],i.prototype,"align",void 0),t([y.Property(-1)],i.prototype,"tabIndex",void 0),t([y.Property()],i.prototype,"name",void 0);var Z,K=i;function i(){return null!==Z&&Z.apply(this,arguments)||this}ee=function(e,t){return(ee=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])}))(e,t)};var ee,te,t=function(e,t){function i(){this.constructor=e}ee(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},ie=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},t=(te=y.ChildProperty,t(ne,te),ie([y.Property(!0)],ne.prototype,"allowSearchOnTyping",void 0),ie([y.Property("contains")],ne.prototype,"filterType",void 0),ie([y.Property(!0)],ne.prototype,"ignoreCase",void 0),ie([y.Property(null)],ne.prototype,"placeholder",void 0),ne);function ne(){return null!==te&&te.apply(this,arguments)||this}se=function(e,t){return(se=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])}))(e,t)};var se,ae,ie=function(e,t){function i(){this.constructor=e}se(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},re=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},oe=[{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:y.initializeCSPTemplate(function(e){return'<span class="e-fe-size">'+e.size+"</span>"}),format:"n2"}],ie=(ae=y.ChildProperty,ie(le,ae),re([y.Property(!0)],le.prototype,"columnResizing",void 0),re([y.Property(oe)],le.prototype,"columns",void 0),le);function le(){return null!==ae&&ae.apply(this,arguments)||this}he=function(e,t){return(he=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])}))(e,t)};var he,de,re=function(e,t){function i(){this.constructor=e}he(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},pe=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},ce=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],ue=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],ge=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],re=(de=y.ChildProperty,re(me,de),pe([y.Property(ce)],me.prototype,"file",void 0),pe([y.Property(ue)],me.prototype,"folder",void 0),pe([y.Property(ge)],me.prototype,"layout",void 0),pe([y.Property(!0)],me.prototype,"visible",void 0),me);function me(){return null!==de&&de.apply(this,arguments)||this}fe=function(e,t){return(fe=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])}))(e,t)};var fe,be,pe=function(e,t){function i(){this.constructor=e}fe(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},ye=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},pe=(be=y.ChildProperty,pe(ve,be),ye([y.Property("650px")],ve.prototype,"maxWidth",void 0),ye([y.Property("240px")],ve.prototype,"minWidth",void 0),ye([y.Property(!0)],ve.prototype,"visible",void 0),ye([y.Property("None")],ve.prototype,"sortOrder",void 0),ve);function ve(){return null!==be&&be.apply(this,arguments)||this}Ie=function(e,t){return(Ie=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])}))(e,t)};var Ie,Oe,ye=function(e,t){function i(){this.constructor=e}Ie(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},we=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},ye=(Oe=y.ChildProperty,ye(De,Oe),we([y.Property("")],De.prototype,"allowedExtensions",void 0),we([y.Property(!0)],De.prototype,"autoUpload",void 0),we([y.Property(!1)],De.prototype,"autoClose",void 0),we([y.Property(!1)],De.prototype,"directoryUpload",void 0),we([y.Property(0)],De.prototype,"minFileSize",void 0),we([y.Property(3e7)],De.prototype,"maxFileSize",void 0),we([y.Property(0)],De.prototype,"chunkSize",void 0),De);function De(){return null!==Oe&&Oe.apply(this,arguments)||this}Se=function(e,t){return(Se=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])}))(e,t)};var Se,Ce,we=function(e,t){function i(){this.constructor=e}Se(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},n=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},we=(Ce=y.ChildProperty,we(s,Ce),n([y.Property("")],s.prototype,"field",void 0),n([y.Property("")],s.prototype,"headerText",void 0),n([y.Property("")],s.prototype,"width",void 0),n([y.Property("")],s.prototype,"minWidth",void 0),n([y.Property("")],s.prototype,"maxWidth",void 0),n([y.Property("Left")],s.prototype,"textAlign",void 0),n([y.Property(null)],s.prototype,"headerTextAlign",void 0),n([y.Property(null)],s.prototype,"type",void 0),n([y.Property(null)],s.prototype,"format",void 0),n([y.Property(null)],s.prototype,"template",void 0),n([y.Property(null)],s.prototype,"sortComparer",void 0),n([y.Property(null)],s.prototype,"headerTemplate",void 0),n([y.Property(!0)],s.prototype,"allowSorting",void 0),n([y.Property(!0)],s.prototype,"allowResizing",void 0),n([y.Property(null)],s.prototype,"customAttributes",void 0),n([y.Property("")],s.prototype,"hideAtMedia",void 0),n([y.Property(null)],s.prototype,"customFormat",void 0),n([y.Property(!1)],s.prototype,"isPrimaryKey",void 0),s);function s(){return null!==Ce&&Ce.apply(this,arguments)||this}var je="_toolbar",xe="_layout",Ne="_navigation",Ee="_tree",Pe="_grid",Re="_largeicons",Me="_dialog",ke="_img_dialog",Le="_extn_dialog",Te="_upload_dialog",Ae="_contextmenu",Fe="_content",Ve="_breadcrumbbar",Ue="_upload",_e="_search",He="e-filemanager",Be="e-control",ze="e-fe-cb-select",qe="e-fe-popup",We="e-fe-mobile",Ke="e-fe-popup e-fe-mobile",Ye="e-fe-m-select",Ge="e-fe-m-filter",Je="e-layout",Qe="e-navigation",Xe="e-layout-content",$e="e-large-icons",Ze="e-toolbar-item",d="e-list-item",et="e-list-text",tt="e-list-parent",o="e-icons e-fe-tick",it="e-icons e-fe-dot",nt="e-blur",p="e-active",st="e-hover",at="e-focus",rt="e-focused",ot="e-check",lt="e-frame",ht="e-checkbox-wrapper",dt="e-row",c="e-empty",pt="e-empty-content",ct="e-empty-inner-content",ut="e-fe-clone",gt="e-fe-drop-folder",mt="e-fe-drop-file",ft="e-fe-folder",bt="e-fe-image",yt="e-fe-music",vt="e-fe-video",It="e-large-icon",Ot="e-empty-icon e-fe-folder",wt="e-gridheader",Dt="e-treeview",St="e-menu-item",Ct="e-menu-icon",jt="e-caret",xt="e-content",Nt="e-gridcontent",Et="e-list-parent",Pt="e-icons e-fe-open",Rt="e-icons e-fe-upload",Mt="e-icons e-fe-cut",kt="e-icons e-fe-copy",Lt="e-icons e-fe-paste",Tt="e-icons e-fe-delete",At="e-icons e-fe-rename",Ft="e-icons e-fe-newfolder",Vt="e-icons e-fe-details",Ut="e-icons e-fe-sort",_t="e-icons e-fe-refresh",Ht="e-icons e-fe-select",Bt="e-icons e-fe-download",zt="e-icons e-fe-grid",qt="e-icons e-fe-large",Wt="e-icons e-fe-breadcrumb",Kt="e-icons e-fe-clear",Yt="e-icons",Gt="e-fe-errorcontent",Jt="e-address",Qt="e-rtl",Xt="e-display-none",$t="e-fullrow",Zt="e-split-bar",ei="e-headercheck",ti="e-fe-overlay",ii="e-fe-value",l="model-changed",ni="initial-end",u="finalize-end",si="create-end",ai="filter-end",ri="path-drag",oi="delete-init",li="delete-end",hi="refresh-end",di="resize-end",pi="splitter-resize",g="path-changed",ci="destroy",ui="before-request",gi="skip-upload",mi="after-request",fi="layout-refresh",bi="actionFailure",yi="search",vi="open-init",Ii="open-end",m="selection-changed",Oi="select-all-init",wi="clear-all-init",Di="clear-path-init",a="layout-change",Si="sort-by-change",Ci="node-expand",f="details-init",ji="menu-item-data",xi="rename-init",Ni="rename-end-parent",b="rename-end",Ei="show-paste",Pi="hide-paste",Ri="selected-data",Mi="cut-copy-init",ki="paste-init",Li="paste-end",Ti="cut-end",Ai="hide-layout",Fi="update-tree-selection",Vi="sort-column",Ui="path-column",_i="search-change",Hi="download-init",Bi="drop-init",zi="drag-end",qi="drop-path",Wi="dragging",Ki="update-selection-data",Yi="method-call",Gi="read",v="write",Ji="writeContents",Qi="upload",Xi="download";function $i(e,t,i){var t=y.getValue("name",t),n=e.getAttribute("data-id"),n=y.isNullOrUndefined(n)?t:n;i.setProperties({path:Zi(e,n,i.hasId)},!0),i.pathId=en(e),i.pathNames=tn(e,t)}function Zi(e,t,i){for(var n=nn(e,t,!1,i),s="/",a=n.length-2;0<=a;a--)s+=n[a]+"/";return s}function en(e){for(var t=nn(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;0<=n;n--)i.push(t[n]);return i}function tn(e,t){for(var i=nn(e,t,!1),n=[],s=i.length-1;0<=s;s--)n.push(i[s]);return n}function nn(e,t,i,n){for(var s,a=[t],r=e.parentNode;!y.isNullOrUndefined(r)&&(y.matches(r,"."+d)&&(s=i?r.getAttribute("data-uid"):n?r.getAttribute("data-id"):y.select("."+et,r).textContent,a.push(s)),!(r=r.parentNode).classList.contains(Dt)););return a}function sn(e){for(var t=e.hasId?"id":"name",i="/",n=1;n<e.pathId.length;n++){var s=y.getValue(e.pathId[parseInt(n.toString(),10)],e.feParent);i+=y.getValue(t,s)+"/"}e.setProperties({path:i},!0)}function an(e){e.isCut&&(I(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(Pi,{}))}function rn(e,t){if(t.isSearchCut=!1,t.actionRecords=[],t.activeElements=[],t.notify(Mi,{}),0===t.activeElements.length)return!1;I(t);var i=t.activeElements,n=("navigationpane"!==t.activeModule?t.targetPath=t.path:t.targetPath=Tn(t.path),0);if(i&&(ln(t,i[0]),"cut"===e))for(;n<i.length;)on(i[n]),n++;for(n=0,t.selectedNodes=[],t.enablePaste=!0,t.notify(Ei,{});n<t.activeRecords.length;)t.actionRecords.push(t.activeRecords[n]),t.selectedNodes.push(y.getValue("name",t.activeRecords[n])),n++;if((""!==t.breadcrumbbarModule.searchObj.element.value||t.isFiltered)&&"navigationpane"!==t.activeModule){t.selectedNodes=[],t.isSearchCut=!0;for(var s=0;s<t.selectedItems.length;)t.selectedNodes.push(t.selectedItems[s]),s++}return!0}function on(e){e.classList.add(nt)}function I(e,t){for(var i=t?e.element.querySelectorAll("."+st):e.element.querySelectorAll("."+nt),n=0;n<i.length;)i[n].classList.remove(t?st:nt),n++}function ln(e,t){t&&(t.classList.contains(dt)?e.activeModule="detailsview":y.closest(t,"."+It)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function hn(t,i){var e=t.fileSystemData.filter(function(e){return String(e.parentId)===String(i)}),n=e.slice();return e.forEach(function(e){e=e.id;n=n.concat(hn(t,e))}),n}function dn(e,t,i){var n,s;0!==t.length||e.isFiltered||e.notify(Ui,{args:e}),j(e)?""===t?(e.itemData=e.fileSystemData,C(e,a,e.path)):(e.searchSettings.filterType=y.isNullOrUndefined(e.searchSettings.filterType)?"contains":e.searchSettings.filterType,s=y.getValue(e.pathId[e.pathId.length-1],e.feParent),s=hn(e,y.getValue("id",s)),s=new h.DataManager(s).executeLocal((new h.Query).where("name",e.searchSettings.filterType,t,e.searchSettings.ignoreCase)),n=e.searchSettings.ignoreCase?t.toLowerCase():t,e.itemData=s,Fs(e,i?a:yi,e.path,n,e.showHiddenItems,!e.searchSettings.ignoreCase)):(s="startsWith"===e.searchSettings.filterType?t+"*":"endsWith"===e.searchSettings.filterType?"*"+t:"*"+t+"*",e.searchWord=s,e.itemData=[O(e)],0<t.length?(n=e.searchSettings.ignoreCase,t=e.showHiddenItems,Fs(e,i?a:yi,e.path,s,t,!n)):e.isFiltered?cs(e,a):e.isSortByClicked?(e.notify(a,{files:"Details"===e.oldView?e.detailsviewModule.gridObj.dataSource:e.largeiconsviewModule.allItems}),e.isSortByClicked=!1):C(e,i?a:yi,e.path))}function pn(e,t){e.oldView=e.view,e.setProperties({view:t},!0),""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||(e.layoutSelectedItems=e.selectedItems);t="";e.breadcrumbbarModule.searchObj.element.value&&(t=e.breadcrumbbarModule.searchObj.element.value),e.isLayoutChange=!0,dn(e,t,!0)}function cn(e,t){var i="";t&&(i=y.closest(t,"."+He+"."+Be+" ."+Nt)?"detailsview":y.closest(t,"."+$e)?"largeiconsview":t.classList.contains("e-fullrow")||t.classList.contains("e-icon-expandable")?"navigationpane":y.closest(t,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=i}function un(e){e.itemData=[O(e)],is(e.itemData[0])?C(e,hi,e.path):D(e,e.itemData[0],Gi)}function gn(e){C(e,Ii,e.path)}function O(e){return y.getValue(e.pathId[e.pathId.length-1],e.feParent)}function mn(e){rn("copy",e)&&(e.fileAction="copy")}function fn(e){rn("cut",e)&&(e.isCut=!0,e.fileAction="move")}function bn(e){return y.getValue("isFile",e)?(-1!==(e=(e=y.getValue("type",e)).toLowerCase()).indexOf(".")&&(e=e.split(".").join("")),-1!==["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"].indexOf(e)?bt:-1!==["mp3","wav","aac","ogg","wma","aif","fla","m4a"].indexOf(e)?yt:-1!==["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"].indexOf(e)?vt:-1!==["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"].indexOf(e)?"e-fe-"+e:"e-fe-unknown e-fe-"+e):ft}function yn(e,t){var i,n,s,a,r=j(e)?y.getValue("imageUrl",t):"";return(j(e)?(e.trigger("beforeImageLoad",i={fileDetails:[t],imageUrl:r}),i):(n=-1!==(i=e.ajaxSettings.getImageUrl||e.ajaxSettings.url).indexOf("?")?"&path=":"?path=",s=encodeURIComponent(y.getValue("name",t)),a=y.getValue("filterPath",t),t={fileDetails:[t],imageUrl:r=(r=e.hasId?(t=y.getValue("id",t),i+n+e.path+"&id="+t):y.isNullOrUndefined(a)?i+n+e.path+s:i+n+encodeURIComponent(a.replace(/\\/g,"/"))+s)+"&time="+(new Date).getTime().toString()},e.trigger("beforeImageLoad",t),t)).imageUrl}function vn(e,t,i){var n=y.getValue(e.hasId?"id":"name",t)+"/",e=y.getValue(e.hasId?"filterId":"filterPath",t);return y.isNullOrUndefined(e)?i+n:e.replace(/\\/g,"/")+n}function In(e,t){var i=y.getValue("name",t),t=y.getValue("filterPath",t);return i=""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||y.isNullOrUndefined(t)?i:(t=t.replace(/\\/g,"/")).replace(e.path,"")+i}function On(e,t){return 0===t.length?t:(e=("None"===e.sortOrder||y.isNullOrUndefined(e.sortOrder)?new h.Query:(new h.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0)).group("isFile"),t=new h.DataManager(t).executeLocal(e),y.getValue("records",t))}function wn(e,t,i){e=y.getValue(e.pathId[e.pathId.length-1],e.feFiles).filter(function(e){return e[t].toString()===i});return 0<e.length?e[0]:null}function Dn(e,t,i){var n,s,a=y.select("#"+e.element.id+xe,e.element),r=y.select("#"+e.element.id+Ve,a).offsetHeight,r=a.offsetHeight-r,o=("Details"===e.view&&(r-=y.select("."+wt,a).offsetHeight),y.isNullOrUndefined(t.querySelector("."+c))&&(a=y.createElement("div",{className:c}),o=y.createElement("div",{className:Ot}),n=y.createElement("div",{className:pt}),s=y.createElement("div",{className:ct}),("Details"===e.view?t.querySelector("."+xt):t).appendChild(a),a.appendChild(o),a.appendChild(n),a.appendChild(s)),t.querySelector("."+c)&&(y.isNullOrUndefined(i.error)?e.isFiltered?(t.querySelector("."+pt).innerHTML=w(e,"Filter-Empty"),t.querySelector("."+ct).innerHTML=w(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(t.querySelector("."+pt).innerHTML=w(e,"Search-Empty"),t.querySelector("."+ct).innerHTML=w(e,"Search-Key")):(t.querySelector("."+pt).innerHTML=w(e,"Folder-Empty"),t.querySelector("."+ct).innerHTML=w(e,"File-Upload")):(t.querySelector("."+pt).innerHTML=w(e,"Access-Denied"),t.querySelector("."+ct).innerHTML=w(e,"Access-Details"))),y.select("."+c,t));r=(r-o.offsetHeight)/2,o.style.marginTop=r+"px"}function Sn(e){return new h.DataManager(e).executeLocal((new h.Query).where("isFile","equal",!1,!1))}function Cn(e,t){for(var i=Sn(e.files),n=0,s=i.length;n<s;n++)y.setValue("_fm_id",t+"_"+n,i[n])}function jn(e,t,i){for(var n=0;n<e.length;n++){var s=new Date(y.getValue("dateCreated",e[n])),a=new Date(y.getValue("dateModified",e[n]));y.isNullOrUndefined(i)&&(i="MM/dd/yyyy"),y.setValue("_fm_created",t.formatDate(s,{format:i}),e[n]),y.setValue("_fm_modified",t.formatDate(a,{format:i}),e[n])}}function w(e,t){e=e.localeObj.getConstant(t);return""===e?t:e}function xn(e,t){e=e.cssClass;return y.isNullOrUndefined(e)||""===e?t:e+" "+t}function Nn(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=En(t.item.id):e.sortBy=En(t.item.id,e),e.itemData=[O(e)],"Details"===e.view&&(e.isMobile?pn(e,"Details"):(e.notify(Vi,{module:"detailsview"}),e.isSortByClicked=!1)),"LargeIcons"===e.view&&pn(e,"LargeIcons"),e.notify(Si,{})}function En(e,t){var i,e=e.substring(e.lastIndexOf("_")+1),n=e;switch(t&&(i=t.detailsViewSettings.columns),e){case"date":for(var s=0,a=i.length;s<a;s++){if("dateModified"===i[s].field||"dateCreated"===i[s].field){n=i[s].field;break}n="_fm_modified"}break;case"ascending":n="Ascending";break;case"descending":n="Descending";break;case"none":n="None"}return n}function Pn(e,t){for(var t=t.split("/"),i=e.originalPath.split("/"),n=y.getValue(e.pathId[0],e.feParent),s=y.isNullOrUndefined(y.getValue("id",n))?"name":"id",a=t.length-1,r=i.length-1;a<r;a++){var o,l=""===i[a+1]?u:ni,h=""===i[a]?"/":e.path+i[a]+"/",d=wn(e,s,i[parseInt(a.toString(),10)]);y.isNullOrUndefined(d)?e.originalPath=h:(o=y.getValue("_fm_id",d),e.setProperties({path:h},!0),e.pathId.push(o),e.itemData=[d],e.pathNames.push(y.getValue("name",d))),C(e,l,e.path);break}}function Rn(e,t){e.originalPath=vn(e,t,e.path);var i=y.getValue(e.pathId[0],e.feParent),n=e.feParent[y.getValue("_fm_id",e.itemData[0])],n=y.isNullOrUndefined(n)||"fe_tree"===y.getValue("_fm_id",n),i=wn(e,y.isNullOrUndefined(y.getValue("id",i))?"name":"id",j(e)?y.getValue("id",t):y.getValue("name",t));if(y.isNullOrUndefined(i)){if(n)return void Pn(e,e.path);e.notify(Di,{selectedNode:e.pathId[e.pathId.length-1]})}else{t=y.getValue("_fm_id",i);e.setProperties({path:e.originalPath},!0),e.pathId.push(t),e.itemData=[i],e.pathNames.push(y.getValue("name",i))}C(e,e.path!==e.originalPath?ni:u,e.path)}function Mn(e){var t;e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste&&(t=""===e.folderPath?e.path:e.folderPath,"navigationpane"!==e.activeModule||e.selectedNodes[0].includes("/")||(e.targetPath=hs(e,e.actionRecords[0])),kn(e,e.actionRecords,t,e.path)||("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction?(e.notify(ki,{}),gs(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords)):(e.enablePaste=!1,e.notify(Pi,{}),I(e),x(e,"Error",{files:null,error:{code:"402",message:w(e,"Same-Folder-Error"),fileExists:null}}))))}function kn(e,t,i,n){for(var s=!1,a=0;a<t.length;a++)if(y.getValue("isFile",t[a])){var r=e.dragData[a]?e.dragData[a].name:null,r=j(e)?r:e.dragNodes[a],o=0,l="";if((l=0<(o=r?r.lastIndexOf("/"):o)?n+r.substring(0,o+1):l)===i){x(e,"Error",{files:null,error:{code:"402",message:w(e,"Same-Folder-Error"),fileExists:null}}),s=!0;break}}else{r=vn(e,t[a],n);if(0===i.indexOf(r)){x(e,"Error",{files:null,error:{code:"402",message:w(e,"Sub-Folder-Error"),fileExists:null}}),s=!0;break}}return s}function Ln(e){e.isDragDrop=!0,0!==e.dragData.length&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),kn(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],gs(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(ki,{})))}function Tn(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function An(e,t){var i=y.getValue(e.hasId?"id":"name",t.cwd)+"/",t=y.getValue(e.hasId&&!y.isNullOrUndefined(e.ajaxSettings.url)?"filterId":"filterPath",t.cwd);return y.isNullOrUndefined(t)?j(e)?i:e.path+i:""===t?e.hasId&&!y.isNullOrUndefined(e.ajaxSettings.url)?i:"/":t.replace(/\\/g,"/")+i}function Fn(e,t,i){"move"===t&&(e.isDragDrop?e.notify(zi,i):(e.enablePaste=!1,e.notify(Pi,{}),e.notify(Ti,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.trigger("success",{action:t,result:i}),!e.isDragDrop||e.path===e.dragPath||e.path===e.dropPath||e.isSearchDrag?(e.isPathDrag=!1,C(e,Li,e.path)):Vn(e)}function Vn(e){var t,i=y.getValue("_fm_id",e.dropData);e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag?e.notify(ri,e.itemData):(e.navigationpaneModule&&((t=y.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element))||(i=document.querySelector('[data-id = "'+y.getValue("id",e.dropData)+'"]').getAttribute("data-uid"),t=y.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element)),$i(t,e.dropData,e)),C(e,qi,e.dropPath))}function Un(e,t){for(var i=null,n=e.isDragDrop?e.dragData:e.actionRecords,s=0;s<n.length;s++)if(y.getValue("name",n[s])===t){i=n[s];break}return i}function _n(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(Jn(e,e.dragData[0]))}var i=e.createElement("div",{className:"e-fe-icon "+bn(e.dragData[0])}),n=e.createElement("div",{className:"e-fe-name",innerHTML:e.dragData[0].name}),s=e.createElement("div",{className:"e-fe-content"}),i=(s.appendChild(i),s.appendChild(n),e.createElement("div",{className:ut}));i.appendChild(s),1<e.dragNodes.length&&(n=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)}),i.appendChild(n)),e.virtualDragElement=i,e.element.appendChild(e.virtualDragElement)}function Hn(t,e){var i=e,n=(i.cancel=!1,null!=t.treeExpandTimer&&(window.clearTimeout(t.treeExpandTimer),t.treeExpandTimer=null),qn(t),t.element.classList.remove("e-fe-drop","e-no-drop"),I(t),t.uploadObj.dropArea=y.select("#"+t.element.id+Fe,t.element),y.select("."+ut,t.element));n&&y.detach(n),cn(t,e.target),t.notify(Bi,e),I(t,"hover"),i.fileDetails=t.dragData,t.trigger("fileDragStop",i,function(e){!e.cancel&&!y.isNullOrUndefined(t.targetModule)&&""!==t.targetModule&&2<t.dragCount&&Ln(t),t.dragCount=0})}function Bn(t,i,n){var e=i;if(e.cancel=!1,e.fileDetails=t.dragData,t.dragCount=0,t.droppedObjects=[],t.allowDragAndDrop&&("navigationpane"!==t.activeModule||y.closest(i.element,"li").getAttribute("data-uid")!==t.pathId[0])||(e.cancel=!0),"navigationpane"===t.activeModule&&-1!==t.pathId.indexOf(y.closest(i.element,"li").getAttribute("data-uid"))?t.isPathDrag=!0:t.isPathDrag=!1,I(t),e.cancel)n.intDestroy(i.event),zn(t);else if(!e.cancel){for(var s=0;s<t.activeElements.length;)on(t.activeElements[s]),s++;t.trigger("fileDragStart",e,function(e){e.cancel?(n.intDestroy(i.event),zn(t)):t.uploadObj.dropArea=null})}}function zn(e){I(e);e=y.select("."+ut,e.element);e&&y.detach(e)}function qn(e){Wn(e,gt),Wn(e,mt)}function Wn(e,t){for(var i=e.element.querySelectorAll("."+t),n=0;n<i.length;n++)i[n].classList.remove(t)}function Kn(e,t,i,n){var s,a=e.getBoundingClientRect(),i=y.select("."+i,e);n>=a.top+e.clientHeight-30&&!y.isNullOrUndefined(i)&&(s="navigationpane"===t.targetModule||"detailsview"===t.targetModule?i.offsetHeight/2.5:i.offsetHeight/4.5,e.scrollBy(0,s)),!y.isNullOrUndefined(i)&&n<=a.top+30&&(s="navigationpane"===t.targetModule||"detailsview"===t.targetModule?i.offsetHeight/2.5:i.offsetHeight/4.5,e.scrollBy(0,-s))}function Yn(e,t){var i=t,n=(i.fileDetails=e.dragData,!1),s=(cn(e,t.target),qn(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),I(e,"hover"),null);"navigationpane"===e.targetModule?((s=y.closest(t.target,"li")).classList.add(st,gt),n=!0,e.treeExpandTimer=window.setTimeout(function(){e.notify(Wi,t)},800),Kn(e.navigationpaneModule.treeObj.element.parentElement,e,"e-level-2",t.event.y)):"detailsview"===e.targetModule?((s=y.closest(t.target,"tr"))&&s.querySelector("."+ft)&&!s.classList.contains(nt)?s.classList.add(gt):!s||s.querySelector("."+ft)||s.classList.contains(nt)||s.classList.add(mt),n=!0,Kn(e.detailsviewModule.gridObj.element.querySelector(".e-content"),e,"e-row",t.event.y)):"largeiconsview"===e.targetModule?((s=y.closest(t.target,"li"))&&s.querySelector("."+ft)&&!s.classList.contains(nt)&&s.classList.add(st,gt),n=!0,Kn(e.largeiconsviewModule.element.firstElementChild,e,"e-large-icon",t.event.y)):"breadcrumbbar"===e.targetModule&&(n=!0),e.element.classList.remove("e-fe-drop","e-no-drop"),e.element.classList.add(n?"e-fe-drop":"e-no-drop"),e.dragCount=e.dragCount+1,e.trigger("fileDragging",i)}function Gn(e){for(var t="",i=Object.keys(e),n=0;n<i.length;n++)"message"!==i[n]&&(t+=(0===n?"":", ")+i[n]+": "+y.getValue(i[n],e));return t}function Jn(e,t){return e.hasId?y.getValue("id",t):In(e,t)}function Qn(e,t){e.itemData=[t],e.currentItemText=y.getValue("name",t),e.isFile=y.getValue("isFile",t),e.filterPath=y.getValue("filterPath",t)}function Xn(e){S(e.itemData[0])?x(e,"Rename"):D(e,e.itemData[0],v)}function $n(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!as(t[i]))return void D(e,t[i],Xi);0<e.selectedItems.length&&Us(e,e.path,e.selectedItems)}function Zn(e,t,i){for(var n=0;n<t.length;n++)if(!S(t[n]))return void D(e,t[n],v);e.itemData=t,ms(e,i,e.path,"delete")}function es(e,t,i){for(var n=0;n<t.length;n++)if(!as(t[n]))return void D(e,t[n],Xi);e.itemData=t,0<i.length&&Us(e,e.path,i)}function D(e,t,i){var n=y.getValue("message",y.getValue("permission",t));x(e,"Error",{error:{code:"401",fileExists:null,message:n=""===n?w(e,"Access-Message").replace("{0}",y.getValue("name",t)).replace("{1}",i):n}})}function ts(e){return is(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function is(e){e=y.getValue("permission",e);return!(e&&!y.getValue("read",e))}function S(e){e=y.getValue("permission",e);return!e||y.getValue("read",e)&&y.getValue("write",e)}function ns(e){e=y.getValue("permission",e);return!e||y.getValue("read",e)&&y.getValue("writeContents",e)}function ss(e){e=y.getValue("permission",e);return!e||y.getValue("read",e)&&y.getValue("upload",e)}function as(e){e=y.getValue("permission",e);return!e||y.getValue("read",e)&&y.getValue("download",e)}function rs(e){var t=e.itemData[0];ns(t)?x(e,"NewFolder"):D(e,t,Ji)}function os(e){var t,i=e.itemData[0];ss(i)?(t="#"+e.element.id+Ue,document.querySelector(t).click()):D(e,i,Qi)}function ls(e){y.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide()}function hs(e,t){return e.hasId&&!y.isNullOrUndefined(y.getValue("filterId",t))?y.getValue("filterId",t).replace(/\\/g,"/").replace(/^[^/]+\//,"/"):y.getValue("filterPath",t).replace(/\\/g,"/")}function ds(e,t,i,n){for(var s="",a=0;a<t.length;a++){var r,o=y.getValue("permission",t[a]);if(null==o&&(o=void 0),n?!o||y.getValue("read",o)&&y.getValue("writeContents",o)||""===(s=y.getValue("message",y.getValue("permission",t[a])))&&(s=w(e,"Access-Message").replace("{0}",y.getValue("name",t[a])).replace("{1}","writeContents")):(r="copy"===i?y.getValue("copy",o):y.getValue("write",o),!o||y.getValue("read",o)&&r||""===(s=y.getValue("message",y.getValue("permission",t[a])))&&(s=w(e,"Access-Message").replace("{0}",y.getValue("name",t[a])).replace("{1}",i))),""!==s){e.responseData={cwd:null,details:null,error:{code:"401",message:s,fileExists:null},files:null};break}}return s}function C(e,t,i){for(var n=e.itemData,s=0;s<n.length;s++)y.isNullOrUndefined(y.getValue("hasChild",n[s]))&&y.setValue("hasChild",!1,n[s]);Ss(e,{action:"read",path:i,showHiddenItems:e.showHiddenItems,data:n},Es,t)}function ps(e,t){Ss(e,{action:"create",path:e.path,name:t,data:e.itemData},Rs,t)}function cs(e,t){var i={action:"filter",path:e.path,showHiddenItems:e.showHiddenItems,data:[O(e)]},i=e.filterData?y.extend(void 0,i,e.filterData):i;Ss(e,i,Ps,t,y.getValue("action",i))}function us(e,t,i){var n,s;s=""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||(s=e.filterPath,e.hasId)?(n=e.currentItemText,i):(n=(s=s.replace(/\\/g,"/")).replace(t,"")+e.currentItemText,s.replace(t,"")+i),Ss(e,{action:"rename",path:t,name:n,newName:s,data:e.itemData,showFileExtension:e.showFileExtension},Ms,t)}function gs(e,t,i,n,s,a,r){i={action:s,path:t,targetData:e.itemData[0],targetPath:n,names:i,renameFiles:a,data:r};e.destinationPath=n,Ss(e,i,ks,t,s,n)}function ms(e,t,i,n){Ss(e,{action:n,path:i,names:t,data:e.itemData},Ls,i)}function fs(e,t,i,n){Ss(e,{action:n,path:i,names:t,data:e.itemData},Ts,i,n)}function j(e){return 0<=e.fileSystemData.length&&y.isNullOrUndefined(e.ajaxSettings.url)}function bs(e,t){return e.some(function(e){return e.name===t})}function ys(e,t){return e.fileSystemData.findIndex(function(e){return!y.isNullOrUndefined(e)&&String(e.id)===String(t)})}function vs(e,t){return e.fileSystemData.filter(function(e){return String(e.id)===String(t)})[0]}function Is(e,t){return e.fileSystemData.filter(function(e){return String(e.parentId)===String(t)})}function Os(e,t,i,n){var s,a={};for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&(a[s]=null);var r=new Date,o=0!==t.id?t.filterPath+t.name:"\\";return Object.assign(a,{dateCreated:r,dateModified:r,filterPath:o,hasChild:!!n&&e.hasChild,id:F.getUid(null===i?e.name:i),isFile:!!n&&e.isFile,name:null===i?e.name:i,parentId:t.id,size:n?e.size:0,type:n?e.type:""}),a}function ws(e,t,i,n){e.responseData={cwd:null,details:null,error:{code:i,message:t,fileExists:null!=n?n:null},files:null}}function Ds(e,t,i){switch(y.getValue("action",t)){case"create":m=e,f=t,b=i,f={folderName:y.getValue("name",f),cancel:!1,path:y.getValue("path",f),parentFolder:y.getValue("data",f)},m.trigger("beforeFolderCreate",f,function(e){var t;e.cancel?b.cancel=!0:j(m)&&(bs(m.fileSystemData,e.folderName)?(t="A file or folder with the name "+e.folderName+" already exists.",ws(m,t,"400",null)):(t=Os(t=e.parentFolder[0],t,e.folderName,!1),m.fileSystemData.push(t)))});break;case"delete":d=e,f=t,p=i,f={cancel:!1,itemData:y.getValue("data",f),path:y.getValue("path",f)},d.trigger("beforeDelete",f,function(e){e.cancel?p.cancel=!0:j(d)&&e.itemData.forEach(function(t){var e=ys(d,t.id);-1!==e&&d.fileSystemData.splice(e,1),t.isFile||d.fileSystemData.filter(function(e){return e.filterPath.includes(t.name)}).forEach(function(e){e=ys(d,e.id);-1!==e&&d.fileSystemData.splice(e,1)})})});break;case"rename":o=e,l=t,h=i,l={cancel:!1,newName:y.getValue("newName",l),itemData:y.getValue("data",l),path:y.getValue("path",l)},o.trigger("beforeRename",l,function(e){var t;e.cancel?h.cancel=!0:j(o)&&(bs(o.fileSystemData,e.newName)?(t="Cannot rename"+e.itemData[0].name+"to"+e.newName+": destination already exists.",ws(o,t,"400",null)):vs(o,e.itemData[0].id).name=e.newName)});break;case"move":case"copy":c=e,u=t,g=i,l={cancel:!1,itemData:y.getValue("data",u),isCopy:"copy"===y.getValue("action",u),path:y.getValue("path",u),targetData:y.getValue("targetData",u),targetPath:y.getValue("targetPath",u)},c.trigger("beforeMove",l,function(i){if(i.cancel)g.cancel=!0;else if(j(c)){var n,e="File Already Exists",t=y.getValue("action",u),s=ds(c,i.itemData,t,!1),t=ds(c,[i.targetData],t,!0),a=[];if(c.pasteNodes=[],""===s&&""===t){if(i.isCopy)n=Is(c,i.targetData.id),i.itemData.forEach(function(e){var t;!bs(n,e.name)||0<y.getValue("renameFiles",u).length?0<y.getValue("renameFiles",u).length?(t=e.name.split("."),t=e.name.includes(".")?t[0]+"("+c.existingFileCount+")."+t[1]:t[0]+"("+c.existingFileCount+")",xs(c,e,i.targetData,t),c.responseData.error=null,c.existingFileCount++):xs(c,e,i.targetData,null):a.push(e.name)});else for(var r=i.targetData,o=Is(c,r.id),l=0;l<i.itemData.length;l++){var h,d,p=i.itemData[l];!bs(o,p.name)||0<y.getValue("renameFiles",u).length?(r.hasChild||(r.hasChild=!p.isFile),p.isFile||(h=0!==p.parentId?Is(c,p.parentID):[],vs(c,p.parentId).hasChild=1<h.length),h=vs(c,p.id),0<y.getValue("renameFiles",u).length&&(d=p.name.split("."),p.name=p.name.includes(".")?d[0]+"("+c.existingFileCount+")."+d[1]:d[0]+"("+c.existingFileCount+")",h.name=p.name,c.responseData.error=null,c.existingFileCount++,c.dropData=r,c.dropPath=i.path,d=i.targetPath.replace(/^\/|\/$/g,"").split("/"),r=vs(c,d[d.length-1])),h.parentId=r.id,h.filterPath=0===r.id?"\\":r.filterPath+r.name+"\\"):a.push(p.name)}0<a.length&&ws(c,e,"400",a)}}});break;case"search":n=e,s=t,a=i,r={searchResults:y.getValue("data",s),cancel:!1,path:y.getValue("path",s),searchText:y.getValue("searchString",s),caseSensitive:y.getValue("caseSensitive",s),showHiddenItems:y.getValue("showHiddenItems",s)},n.trigger("search",r,function(e){y.setValue("data",e.searchResults,s),e.cancel&&(a.cancel=!0)})}var n,s,a,r,c,u,g,o,l,h,d,p,m,f,b}function Ss(r,o,l,h,d,p){var e={url:r.ajaxSettings.url,type:"POST",mode:!0,dataType:"json",contentType:"application/json",data:JSON.stringify(o),onSuccess:null,onFailure:null,beforeSend:null},e={action:y.getValue("action",o),ajaxSettings:e,cancel:!1};Ds(r,o,e),r.trigger("beforeSend",e,function(i){var e,t,n,s,a;i.cancel||(r.notify(ui,{}),j(r)?(t=("node-expand"===h||"finalize-end"===h||"rename-end-parent"===h?y.getValue("path",o):r.path).replace(/^\/|\/$/g,"").split("/"),t="rename-end-parent"===h||"path-changed"===h&&0!==y.getValue("data",o).length&&y.isNullOrUndefined(r.renamedItem)||"paste-end"===h&&("largeiconsview"===r.targetModule||"detailsview"===r.targetModule)?y.getValue("data",o)[0].id:t[t.length-1],n=("move"===(s=y.getValue("action",o))||"rename"===s||"copy"===s||"delete"===s||"search"===s)&&"rename-end"!==h,"read"===s||"create"===s||"rename-end"===h?(e=0<r.fileSystemData.filter(function(e){return y.isNullOrUndefined(e.parentId)}).length?r.fileSystemData.filter(function(e){return y.isNullOrUndefined(e.parentId)})[0].id:0,r.responseData={cwd:vs(r,"/"===r.path&&"node-expand"!==h&&"rename-end-parent"!==h?e:t),details:null,error:null,files:Is(r,"/"===r.path&&"node-expand"!==h&&"rename-end-parent"!==h?e:t)},y.isNullOrUndefined(r.responseData.cwd)&&ws(r,"Cannot load empty data within the File Manager.","400",null)):n&&null===r.responseData.error?(0===(a="search"===s||"delete"===s?y.getValue("data",o):[]).length&&(a="copy"===s?r.pasteNodes.map(function(e){return vs(r,e)}):y.getValue("data",o).map(function(e){return vs(r,e.id)})),r.responseData={cwd:null,details:null,error:null,files:a}):"details"===y.getValue("action",o)&&(e=(a=y.getValue("data",o))[0],t=1<a.length,n=a.map(function(e){return e.name}),s=Cs(t?a.reduce(function(e,t){return e+(t.size||0)},0):e.size),a=r.pathNames.includes(e.name)||t?r.pathNames.join("/"):r.pathNames.join("/")+"/"+e.name,r.responseData.details=Object.assign({location:a,multipleFiles:t,name:n.join(", "),size:s},t?{}:{created:e.dateCreated,isFile:e.isFile,modified:e.dateModified,permission:e.permission})),js(r,r.responseData,l,o,h,d,p,i)):new y.Ajax({url:y.getValue("url",i.ajaxSettings),type:y.getValue("type",i.ajaxSettings),mode:y.getValue("mode",i.ajaxSettings),dataType:y.getValue("dataType",i.ajaxSettings),contentType:y.getValue("contentType",i.ajaxSettings),data:y.getValue("data",i.ajaxSettings),beforeSend:y.getValue("beforeSend",i.ajaxSettings),onSuccess:function(e){var t;y.isNullOrUndefined(e)?(t={error:{fileExists:null,message:w(r,"Server-Error")+" "+r.ajaxSettings.url,code:"406"},files:null},Ns(r,i,l,t,h,d,p)):("string"==typeof e&&(e=JSON.parse(e)),js(r,e,l,o,h,d,p,i))},onFailure:function(){var e={files:null,error:{code:"404",message:w(r,"Network-Error")+" "+r.ajaxSettings.url,fileExists:null}};Ns(r,i,l,e,h,d,p)}}).send())})}function Cs(e){e=e<1024?e+" B":e<1048576?(e/1024).toFixed(2)+" KB":e<1073741824?(e/1024/1024).toFixed(2)+" MB":(e/1024/1024/1024).toFixed(2)+" GB";return e}function js(e,t,i,n,s,a,r,o){e.notify(mi,{action:"success"});var l=e.expandedId||e.pathId[e.pathId.length-1],h=(y.isNullOrUndefined(t.cwd)||"read"!==y.getValue("action",n)||(t.cwd.name=1===e.pathId.length&&e.rootAliasName||t.cwd.name,y.setValue("_fm_id",l,t.cwd),y.setValue(l,t.cwd,e.feParent),y.isNullOrUndefined(t.files)&&"401"!==t.error.code)||("finalize-end"!==s&&"initial-end"!==s||0!==e.pathNames.length||(h=y.getValue(e.pathId[0],e.feParent),e.pathNames[0]=y.getValue("name",h),e.hasId=!y.isNullOrUndefined(y.getValue("id",h))),"finalize-end"===s&&sn(e)),new y.Internationalization(e.locale));if(!y.isNullOrUndefined(t.files)){jn(t.files,h,function(e){var t,i=e.detailsViewSettings.columns;if(!i)return null;for(var n=0;n<i.length;n++)if("_fm_modified"===i[n].field){y.isNullOrUndefined(i[n].format)||(t=i[n].format.toString());break}return t}(e));for(var d=0,p=t.files.length;d<p;d++){var c=t.files[d];y.setValue("_fm_iconClass",bn(c),c)}"read"===y.getValue("action",n)&&(Cn(t,l),y.setValue(l,t.files,e.feFiles))}y.isNullOrUndefined(t.details)||y.isNullOrUndefined(e.rootAliasName)||(h=e.rootAliasName||y.getValue("name",t.details),l=y.getValue("location",t.details).replace(new RegExp("/","g"),"\\"),l=("/"===y.getValue("path",n)||e.hasId&&1===y.getValue("path",n).match(/[/]/g).length)&&(0===y.getValue("names",n).length&&y.setValue("name",h,t.details),-1===l.indexOf("\\"))?h:l.replace(l.substring(0,l.indexOf("\\")),h),y.setValue("location",l,t.details)),i(e,t,s,a,r),y.isNullOrUndefined(t.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s&&"drop-path"!==s||e.notify(_i,t),"function"==typeof y.getValue("onSuccess",o.ajaxSettings)&&y.getValue("onSuccess",o.ajaxSettings)()}function xs(e,t,i,n){for(var s=Os(t,i,n,!0),a=(e.fileSystemData.push(s),e.pasteNodes.push(s.id),Is(e,t.id)),r=0;r<a.length;r++)xs(e,a[r],s,null)}function Ns(e,t,i,n,s,a,r){e.notify(mi,{action:"failure"}),i(e,n,s,a,r),"function"==typeof y.getValue("onFailure",t.ajaxSettings)&&y.getValue("onFailure",t.ajaxSettings)()}function Es(t,e,i){try{y.isNullOrUndefined(e.files)?(y.isNullOrUndefined(e.error)||"401"!==e.error.code||(e.files=[],t.notify(i,e),t.notify(m,{})),As(t,e,"read"),t.setProperties({path:t.oldPath},!0),t.pathNames.pop()):(t.notify(i,e),t.notify(m,{}),n={action:"read",result:e},t.trigger("success",n))}catch(e){_s(t,e,"read"),t.setProperties({path:t.oldPath},!0),t.pathNames.pop()}var n;t.isDragDrop&&t.isDropEnd&&(0!==t.droppedObjects.length&&(n={fileDetails:t.droppedObjects},t.trigger("fileDropped",n)),t.isDropEnd=t.isDragDrop=!1)}function Ps(t,e,i,n){try{var s;y.isNullOrUndefined(e.files)?As(t,e,n):(t.notify(i,e),s={action:n,result:e},t.trigger("success",s))}catch(e){_s(t,e,n)}}function Rs(e,t,i){try{var n,s,a,r;y.isNullOrUndefined(t.files)?"400"===t.error.code?(e.dialogObj&&e.dialogObj.visible?(n=y.select("#newname",e.dialogObj.element),s=w(e,"Validation-NewFolder-Exists").replace("{0}",'"'+n.value+'"'),n.parentElement.nextElementSibling.innerHTML=s):x(e,"Error",{files:null,error:{code:"400",message:w(e,"Validation-NewFolder-Exists").replace("{0}",'"'+i+'"'),fileExists:null}}),r={action:"create",error:t.error},e.trigger("failure",r)):(e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),As(e,t,"create")):(e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),e.createdItem=j(e)?t.files[t.files.length-1]:t.files[0],e.breadcrumbbarModule.searchObj.value="",a={folderName:i,path:e.path,parentFolder:e.itemData},e.trigger("folderCreate",a),r={action:"create",result:t},e.trigger("success",r),e.itemData=[O(e)],C(e,si,e.path))}catch(s){e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),_s(e,s,"create")}}function Ms(e,t){try{var i,n,s,a,r,o,l;y.isNullOrUndefined(t.files)?"400"===t.error.code&&e.dialogObj&&e.dialogObj.visible?(i=y.select("#rename",e.dialogObj.element),n=(n=w(e,"Validation-Rename-Exists").replace("{0}",'"'+e.currentItemText+'"')).replace("{1}",'"'+i.value+'"'),i.parentElement.nextElementSibling.innerHTML=n,s={action:"rename",error:t.error},e.trigger("failure",s)):(y.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),As(e,t,"rename")):(y.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),s={action:"rename",result:t},e.trigger("success",s),e.renamedItem=Array.isArray(t.files)?t.files[0]:t.files,a={newName:e.renamedItem.name,itemData:[e.renamedItem],path:e.path},e.trigger("rename",a),"navigationpane"===e.activeModule?(r=O(e),o=e.pathId[e.pathId.length-1].split("_").length-2,e.pathId.pop(),e.itemData=[y.getValue(e.pathId[e.pathId.length-1],e.feParent)],l=hs(e,e.renamedItem),C(e,Ni,l),!y.isNullOrUndefined(r)&&1<e.pathNames.length&&o<=e.pathNames.length-1&&(e.pathNames[o]=e.renameText,e.hasId||e.setProperties({path:"/"+e.pathNames.slice(1).join("/")+"/"},!0)),e.itemData=0<e.navigationpaneModule.previousSelected.length?e.navigationpaneModule.treeObj.getTreeData(e.navigationpaneModule.previousSelected[0]):e.itemData,C(e,g,e.path),e.itemData[0]=e.renamedItem,e.renamedItem=null):(e.itemData=[O(e)],""!==e.breadcrumbbarModule.searchObj.value?Fs(e,b,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?cs(e,b):C(e,b,e.path)))}catch(n){y.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),_s(e,n,"rename")}}function ks(t,e,i,n){try{var s={itemData:e.files,isCopy:"copy"===n,path:i,targetData:t.itemData[0],targetPath:t.path};t.trigger("move",s),e.error&&e.error.fileExists?(t.fileLength=0,y.isNullOrUndefined(e.files)||(t.isPasteError=!0,Fn(t,n,e)),Hs(t,"DuplicateItems",e.error.fileExists),"404"===e.error.code&&x(t,"Error",e)):e.error||y.isNullOrUndefined(e.files)?e.error&&!y.isNullOrUndefined(e.files)?(t.isPasteError=!0,Fn(t,n,e),x(t,"Error",e)):As(t,e,n):(t.isPasteError=!1,Fn(t,n,e))}catch(e){_s(t,e,n)}}function Ls(t,e,i){try{var n,s={itemData:e.files,path:i};t.trigger("delete",s),y.isNullOrUndefined(e.files)||(t.setProperties({path:i},!0),t.itemData=[O(t)],C(t,li,t.path),e.error)?As(t,e,"delete"):(n={action:"delete",result:e},t.trigger("success",n))}catch(e){_s(t,e,"delete")}}function Ts(t,e,i,n){try{var s;y.isNullOrUndefined(e.details)?As(t,e,"details"):(x(t,n,null,e.details),s={action:"details",result:e},t.trigger("success",s))}catch(e){_s(t,e,"details")}}function As(e,t,i){x(e,"Error",t);i={action:i,error:t.error};e.trigger("failure",i)}function Fs(e,t,i,n,s,a){Ss(e,{action:"search",path:i,searchString:n,showHiddenItems:s,caseSensitive:a,data:e.itemData},Vs,t)}function Vs(t,e,i){try{var n;y.isNullOrUndefined(e.files)?As(t,e,"search"):(t.notify(i,e),n={action:"search",result:e},t.trigger("success",n))}catch(e){_s(t,e,"search")}}function Us(a,e,t){var r=a.ajaxSettings.downloadUrl||a.ajaxSettings.url,e={action:"download",path:e,names:t,data:a.itemData},t={url:r,type:"POST",contentType:"application/json",responseType:"blob",data:JSON.stringify(e),onSuccess:null,onFailure:null,beforeSend:null};a.trigger("beforeDownload",{data:e,cancel:!1,useFormPost:!0,ajaxSettings:t},function(i){if(!i.cancel)if(i.useFormPost){var e=y.createElement("form",{id:a.element.id+"_downloadForm",attrs:{action:r,method:"post",name:"downloadForm",download:""}}),t=y.createElement("input",{id:a.element.id+"_hiddenForm",attrs:{name:"downloadInput",value:JSON.stringify(i.data),type:"hidden"}});e.appendChild(t),a.element.appendChild(e),document.forms.namedItem("downloadForm").submit(),a.element.removeChild(e)}else try{var n,s;new y.Fetch({url:y.getValue("url",i.ajaxSettings),type:y.getValue("type",i.ajaxSettings),contentType:y.getValue("contentType",i.ajaxSettings),responseType:y.getValue("responseType",i.ajaxSettings),beforeSend:y.getValue("beforeSend",i.ajaxSettings),onLoad:function(e){n=e.headers.get("Content-Disposition"),s=n?(e=(e=n.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/))&&e[1])?e.replace(/['"]/g,""):s:1<a.itemData.length?"files.zip":y.getValue("isFile",a.itemData[0])?y.getValue("name",a.itemData[0]):y.getValue("name",a.itemData[0])+".zip"},onSuccess:function(e){a.trigger("success",i);var e=URL.createObjectURL(e),t=document.createElement("a");t.href=e,t.download=s,document.body.appendChild(t),t.click(),document.body.removeChild(t)},onFailure:function(e){e={error:{code:e.status.toString(),message:w(a,"Network-Error")+" "+a.ajaxSettings.downloadUrl}};x(a,"Error",e),a.trigger("failure",i)}}).send(JSON.stringify(i.data))}catch(e){_s(a,e,"download")}})}function _s(e,t,i){As(e,{files:null,error:{message:t.message,fileExists:null}},i)}function x(t,e,i,n){var s=function(t,e,i,n){var s,a,r,o={header:"",content:"",buttons:[],dialogName:"",open:function(){qs(t,t.dialogObj,o.dialogName)},close:function(){Ws(t,t.dialogObj,o.dialogName)}};switch(e=n&&!0===n.multipleFiles?"MultipleFileDetails":e){case"NewFolder":o.dialogName="Create Folder",o.header=w(t,"Header-NewFolder"),o.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Create")},click:function(e){"keydown"!==e.type&&$s(t)}}],o.open=function(t){var e=y.select("#newname",t.dialogObj.element);e.parentElement.classList.contains("e-control-wrapper")||Gs(e,w(t,"Content-NewFolder"));e.parentElement.nextElementSibling.innerHTML="",e.oninput=function(){ea(t,e)},e.onkeyup=function(e){13===na(e)&&$s(t)},function(e){var e=y.select("#newname",e.dialogObj.element),t=(e.focus(),e.value="",e.value.length);e.setSelectionRange(0,t)}(t),qs(t,t.dialogObj,"Create Folder")}.bind(this,t);break;case"Delete":o.dialogName="Delete",1<t.selectedItems.length?(o.content=("<div>"+w(t,"Content-Multiple-Delete")+"</div>").replace("{0}",t.selectedItems.length.toString()),o.header=w(t,"Header-Multiple-Delete")):(o.content="<div>"+w(t,t.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",o.header=w(t,t.isFile?"Header-Delete":"Header-Folder-Delete")),o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Yes")},click:function(){var e;(e=t).dialogObj.hide(),e.notify(oi,{})}},{buttonModel:{content:w(t,"Button-No")},click:function(){t.dialogObj.hide()}}];break;case"Rename":o.dialogName="Rename",o.header=w(t,"Header-Rename"),o.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Save")},click:function(e){"keydown"!==e.type&&Zs(t)}}],o.open=function(t){var e=y.select("#rename",t.dialogObj.element);e.parentElement.classList.contains("e-control-wrapper")||Gs(e,w(t,"Content-Rename"));e.parentElement.nextElementSibling.innerHTML="",e.oninput=function(){ea(t,e)},e.onkeyup=function(e){13===na(e)&&Zs(t)},function(e,t){t.focus();var i="";{var n;i=!e.isFile||e.showFileExtension||(n=e.currentItemText.lastIndexOf("."),-1===n)?e.currentItemText:e.currentItemText.substring(0,n)}t.value=i,e.isFile&&e.showFileExtension&&-1!==t.value.indexOf(".")?t.setSelectionRange(0,t.value.lastIndexOf(".")):t.setSelectionRange(0,t.value.length)}(t,e),qs(t,t.dialogObj,"Rename")}.bind(this,t);break;case"details":o.dialogName="File Details",a=new y.Internationalization(t.locale),a=a.formatDate(new Date(n.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),s="",y.isNullOrUndefined(n.permission)||(s="<tr><td>"+w(t,"Permission")+'</td><td class="'+ii+'" >'+Gn(n.permission)+"</td></tr>"),o.header=n.name,o.content="<table><tr><td>"+w(t,"Type")+'</td><td class="'+ii+'" title="'+(n.isFile?"File":"Folder")+'">'+(n.isFile?"File":"Folder")+"</td></tr><tr><td>"+w(t,"Size")+'</td><td><span class="'+ii+'" title ="'+n.size+'">'+n.size+"</span></td></tr><tr><td>"+w(t,"Location")+'</td><td class="'+ii+'" title="'+n.location+'">'+n.location+"</td></tr><tr><td>"+w(t,"Modified")+'</td><td class="'+ii+'" >'+a+"</td></tr>"+s+"</table>",o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Ok")},click:function(){t.dialogObj.hide()}}];break;case"MultipleFileDetails":o.dialogName="File Details",void 0===(a=t.itemData.map(function(e){return 0!==(r=e.name.indexOf(".")+1)||e.isFile?0!==r?e.name.substr(r).replace(" ",""):"undetermined":"Folder"}))[0]&&(a=n.name.split(",").map(function(e){return 0===(r=e.indexOf(".")+1)?"Folder":e.substr(r).replace(" ","")})),s=a.every(function(e,t,i){return e===i[0]})?"Folder"===a[0]?"Folder":a[0].toLocaleUpperCase()+" Type":"Multiple Types",a=n.location,o.header=n.name,o.content="<table><tr><td>"+w(t,"Type")+':</td><td class="'+ii+'">'+s+"</td></tr><tr><td>"+w(t,"Size")+":</td><td>"+n.size+'<span class="'+ii+'" title ="'+n.size+'"></span></td></tr><tr><td>'+w(t,"Location")+':</td><td class="'+ii+'" title="'+a+'">'+a+"</td></tr></table>",o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Ok")},click:function(e){"keydown"!==e.type&&t.dialogObj.hide()}}];break;case"Error":t.notify(bi,{}),o.dialogName="Error","401"===i.error.code?o.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+w(t,"Access-Denied")+"</div>":o.header=w(t,"Error"),o.content='<div class="'+Gt+'">'+i.error.message+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Ok")},click:function(){t.dialogObj.hide()}}]}return o}(t,e,i,n);y.isNullOrUndefined(t.dialogObj)?(t.dialogObj=new r.Dialog({beforeOpen:Js.bind(this,t,s.dialogName),beforeClose:function(e){zs(t,t.dialogObj,e,s.dialogName)},header:s.header,content:s.content,buttons:s.buttons,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,allowDragging:!0,isModal:!0,target:t.popupTarget||"#"+t.element.id,cssClass:xn(t,t.isMobile?Ke:qe),width:"350px",open:s.open,close:s.close,enableRtl:t.enableRtl,enableHtmlSanitizer:t.enableHtmlSanitizer,locale:t.locale}),t.dialogObj.isStringTemplate=!0,t.dialogObj.appendTo("#"+t.element.id+Me)):function(t,i){t.dialogObj.header=i.header,t.dialogObj.content=i.content,t.dialogObj.buttons=i.buttons,t.dialogObj.enableRtl=t.enableRtl,t.dialogObj.open=i.open,t.dialogObj.close=i.close,t.dialogObj.beforeOpen=Js.bind(this,t,i.dialogName),t.dialogObj.beforeClose=function(e){zs(t,t.dialogObj,e,i.dialogName)},t.dialogObj.dataBind(),t.dialogObj.show()}(t,s)}function Hs(t,e,i,n){var s=function(n,e,s,t){var a,i,r,o={header:"",content:"",buttons:[],dialogName:"",open:function(){qs(n,n.extDialogObj,o.dialogName)},close:function(){Ws(n,n.extDialogObj,o.dialogName)}};switch(e){case"Extension":o.header=w(n,"Header-Rename-Confirmation"),o.content="<div>"+w(n,"Content-Rename-Confirmation")+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:w(n,"Button-Yes")},click:function(){n.extDialogObj.hide(),us(n,t,n.renameText)}},{buttonModel:{content:w(n,"Button-No")},click:function(){n.extDialogObj.hide(),n.dialogObj.hide()}}],o.dialogName="Extension Change";break;case"DuplicateItems":o.dialogName="Duplicate Items",n.replaceItems=s,i=n.replaceItems[n.fileLength],i=-1===(r=i.lastIndexOf("/"))?i:i.substring(r),o.header=w(n,"Header-Duplicate"),a="<div>"+w(n,"Content-Duplicate")+"</div>",o.content=a.replace("{0}",i),o.close=function(){var e;n.isDropEnd||0!==n.duplicateItems.length||(e={fileDetails:n.droppedObjects},n.trigger("fileDropped",e),n.isDropEnd=n.isDragDrop=!1),Ws(n,n.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:w(n,"Button-Yes")},click:function(){var e,t,i;n.duplicateItems.push(n.replaceItems[n.fileLength]),n.duplicateRecords.push(Un(n,n.replaceItems[n.fileLength])),n.fileLength++,s[n.fileLength]?(t=-1===(e=(t=n.replaceItems[n.fileLength]).lastIndexOf("/"))?t:t.substring(e),n.extDialogObj.content=a.replace("{0}",t),n.extDialogObj.show()):(n.extDialogObj.hide(),e=n.isDragDrop?n.dragPath:n.targetPath,t=n.isDragDrop?n.dropPath:""===n.folderPath?n.path:n.folderPath,i=n.isDragDrop?"move":n.fileAction,gs(n,e,n.duplicateItems,t,i,n.duplicateItems,n.duplicateRecords))}},{buttonModel:{content:w(n,"Button-No")},click:function(){var e,t,i;n.fileLength++,s[n.fileLength]?(t=-1===(e=(t=n.replaceItems[n.fileLength]).lastIndexOf("/"))?t:t.substring(e),n.extDialogObj.content=a.replace("{0}",t),n.extDialogObj.show()):(n.extDialogObj.hide(),0!==n.duplicateItems.length&&(e=n.isDragDrop?"move":n.fileAction,t=n.isDragDrop?n.dragPath:n.targetPath,i=n.isDragDrop?n.dropPath:""===n.folderPath?n.path:n.folderPath,gs(n,t,n.duplicateItems,i,e,n.duplicateItems,n.duplicateRecords)))}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=w(n,"Header-Retry"),o.content=n.retryFiles[0].name+'<div class="e-fe-retrycontent">'+w(n,"Content-Retry")+"</div>",o.open=function(t,e){t.isRetryOpened=!0;var e=y.getValue("element",e),e=y.select(".e-dlg-content",e),i=t.createElement("div",{className:"e-dlg-checkbox"}),n=t.createElement("input",{id:t.element.id+"_applyall"});i.appendChild(n),e.appendChild(i),new U.CheckBox({label:w(t,"ApplyAll-Label"),change:function(e){t.isApplySame=e.checked}}).appendTo("#"+t.element.id+"_applyall"),qs(t,t.extDialogObj,"Retry Upload")}.bind(this,n),o.close=function(){n.isRetryOpened=!1,Ys(n),Ws(n,n.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:w(n,"Button-Keep-Both")},click:function(){Ks(n,!0)}},{buttonModel:{isPrimary:!0,content:w(n,"Button-Replace")},click:function(){Ks(n,!1)}},{buttonModel:{isPrimary:!0,content:w(n,"Button-Skip")},click:function(){var e=0;n.isApplySame?(e=n.retryFiles.length,n.retryFiles=[],Ys(n)):(n.retryFiles.splice(0,e=1),0!==n.retryFiles.length?Hs(n,"UploadRetry"):Ys(n)),n.notify(gi,{count:e})}}]}return o}(t,e,i,n);t.isApplySame=!1,y.isNullOrUndefined(t.extDialogObj)?(t.extDialogObj=new r.Dialog({beforeOpen:Qs.bind(this,t,s.dialogName),beforeClose:function(e){zs(t,t.extDialogObj,e,s.dialogName)},content:s.content,header:s.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:t.popupTarget||"#"+t.element.id,cssClass:xn(t,t.isMobile?Ke:qe),enableRtl:t.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:s.buttons,open:s.open,close:s.close,enableHtmlSanitizer:t.enableHtmlSanitizer,locale:t.locale}),t.extDialogObj.isStringTemplate=!0,t.extDialogObj.appendTo("#"+t.element.id+Le)):(t.extDialogObj.header=s.header,t.extDialogObj.close=s.close,t.extDialogObj.open=s.open,t.extDialogObj.close=s.close,t.extDialogObj.content=s.content,t.extDialogObj.buttons=s.buttons,t.extDialogObj.enableRtl=t.enableRtl,t.extDialogObj.locale=t.locale,t.extDialogObj.beforeOpen=Qs.bind(this,t,s.dialogName),t.extDialogObj.beforeClose=function(e){zs(t,t.extDialogObj,e,s.dialogName)},t.extDialogObj.dataBind(),t.extDialogObj.show())}function Bs(e,t,i,n){n={cancel:i.cancel,popupName:n,popupModule:t};e.trigger("beforePopupOpen",n,function(e){i.cancel=e.cancel})}function zs(t,e,i,n){e={cancel:i.cancel,popupModule:e,popupName:n};t.trigger("beforePopupClose",e,function(e){i.cancel=e.cancel,i.cancel||!i.isInteracted||"Rename"!==n&&"Create Folder"!==n||t.trigger(bi,{})})}function qs(e,t,i){t={popupModule:t,element:t.element,popupName:i};e.trigger("popupOpen",t)}function Ws(e,t,i){t={popupModule:t,element:t.element,popupName:i};e.trigger("popupClose",t)}function Ks(e,t){if(e.isApplySame){if(t)for(var i=e;0!==i.retryFiles.length;)i.retryArgs.push({action:"keepboth",file:i.retryFiles[0]}),i.uploadObj.retry(i.retryFiles[0]),i.retryFiles.splice(0,1);else for(var n=e;0!==n.retryFiles.length;)n.retryArgs.push({action:"replace",file:n.retryFiles[0]}),n.uploadObj.retry(n.retryFiles[0]),n.retryFiles.splice(0,1);Ys(e)}else 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?Hs(e,"UploadRetry"):Ys(e)}function Ys(e){var t=!0,i=(e.isRetryOpened?e.isRetryOpened=!1:t=!1,y.select(".e-dlg-checkbox",e.extDialogObj.element));i&&y.remove(i),t?e.extDialogObj.hide():e.retryFiles=[]}function Gs(e,t){V.Input.createInput({element:e,properties:{placeholder:t}})}function Js(e,t,i){Xs(y.selectAll(".e-btn",e.dialogObj.element)),Bs(e,e.dialogObj,i,t)}function Qs(e,t,i){Xs(y.selectAll(".e-btn",e.extDialogObj.element)),Bs(e,e.extDialogObj,i,t)}function Xs(i){for(var e=0;e<i.length;e++)!function(t){i[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},i[t].onkeyup=function(e){13===e.keyCode&&i[t].click()}}(e)}function $s(e){var t=y.select("#newname",e.dialogObj.element);ta(e,t),""===t.parentElement.nextElementSibling.innerHTML&&ps(e,t.value)}function Zs(e){var t,i,n,s=y.select("#rename",e.dialogObj.element);ta(e,s),""===s.parentElement.nextElementSibling.innerHTML&&(s=s.value,t=e.currentItemText.lastIndexOf("."),e.isFile&&!e.showFileExtension&&(s+=-1===t?"":e.currentItemText.substr(t)),e.renameText=s,e.currentItemText===s?e.dialogObj.hide():(n="",n="navigationpane"===e.activeModule?hs(e,e.itemData[0]):e.path,e.renamedId=y.getValue("id",e.itemData[0]),e.isFile&&(t=-1===t?"":e.currentItemText.substr(t),i=-1===(i=s.lastIndexOf("."))?"":s.substr(i),e.showFileExtension)&&t!==i?Hs(e,"Extension",null,n):us(e,n,s)))}function ea(e,t){/[/\\|*?"<>:]/.test(t.value)?ia(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=w(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function ta(e,t){ea(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||ia(e,t)}function ia(e,t){var i=w(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');e.enableHtmlSanitizer?t.parentElement.nextElementSibling.textContent=i:t.parentElement.nextElementSibling.innerHTML=i}function na(e){e=e.keyCode||e.which||e.charCode;return e}function sa(t,e,i){var n=y.createElement("div",{className:"e-image-wrap"}),i=y.createElement("img",{className:"e-image",attrs:{src:i,alt:e}});n.appendChild(i),y.isNullOrUndefined(t.viewerObj)?(t.viewerObj=new r.Dialog({header:e,content:n,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,isModal:!0,width:"350px",height:"350px",target:t.popupTarget||"#"+t.element.id,cssClass:xn(t,t.isMobile?Ke:qe),locale:t.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:t.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:t.enableRtl,open:function(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),aa(e),qs(e,e.viewerObj,"Image Preview")}.bind(this,t),close:function(){Ws(t,t.viewerObj,"Image Preview")},beforeOpen:function(e){Bs(t,t.viewerObj,e,"Image Preview")},beforeClose:function(e){zs(t,t.viewerObj,e,"Image Preview")},resizing:aa.bind(this,t),resizeStop:aa.bind(this,t)}),t.viewerObj.isStringTemplate=!0,t.viewerObj.appendTo("#"+t.element.id+ke)):(t.viewerObj.refresh(),t.viewerObj.header=e,t.viewerObj.content=n,t.viewerObj.enableRtl=t.enableRtl,t.viewerObj.dataBind(),t.viewerObj.show())}function aa(e){var t=y.select(".e-dlg-content",e.viewerObj.element),e=y.select(".e-image-wrap",e.viewerObj.element),i=window.getComputedStyle(t,null),n=i?2*parseFloat(i.paddingRight):36,i=i?2*parseFloat(i.paddingBottom):20;e.style.width=t.offsetWidth-n+"px",e.style.height=t.offsetHeight-i+"px"}N.prototype.render=function(e){if(this.parent.visitedItem=null,this.startItem=null,r.showSpinner(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify(Ai,{});var t=y.select("#"+this.parent.element.id+Re,this.parent.element),i=y.select("ul",t),n=(i&&y.remove(i),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=h.DataUtil.sort(this.items,this.parent.sortBy,this.comparer.bind(this)):this.items=this.allItems=On(this.parent,this.items),t.classList.remove(Xt),this.parent.enableVirtualization&&0<this.allItems.length&&this.parent.virtualizationModule.setUIVirtualization(),this.listElements=_.ListBase.createListFromJson(y.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(y.selectAll("."+d,this.listElements)),this.element.appendChild(this.listElements),this.listElements.setAttribute("aria-label","listbox"),this.preventImgDrag(),this.createDragObj(),0===this.itemList.length?(i=this.element.querySelector("."+tt),this.element.removeChild(i),Dn(this.parent,this.element,e)):0!==this.itemList.length&&this.element.querySelector("."+c)&&this.element.removeChild(this.element.querySelector("."+c)),!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=[]),this.element.querySelectorAll("."+p));0!==n.length&&(this.parent.activeModule="largeiconsview");for(var s=0;s<n.length;s++)n[s].setAttribute("aria-selected","true");this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.parent.enableVirtualization&&0<this.allItems.length&&(this.parent.virtualizationModule.setUlElementHeight(),this.parent.virtualizationModule.wireScrollEvent(!1)),this.isRendered=!0,r.hideSpinner(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},N.prototype.comparer=function(e,t){var i;return"Descending"===this.parent.sortOrder&&(i=e,e=t,t=i),this.parent.sortComparer(e,t)},N.prototype.preventImgDrag=function(){for(var e=0;e<this.itemList.length;)this.itemList[e].querySelector("img")&&(this.itemList[e].ondragstart=function(){return!1}),e++},N.prototype.createDragObj=function(){var t=this;this.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new y.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!1,dragTarget:"."+It,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:Hn.bind(this,this.parent),drag:Yn.bind(this,this.parent),clone:!0,dragStart:function(e){Bn(t.parent,e,t.dragObj)}})):this.dragObj&&!this.parent.allowDragAndDrop&&this.dragObj.destroy())},N.prototype.dragHelper=function(e){e=e.sender.target,e=y.closest(e,".e-list-item");if(!e)return null;e&&!e.classList.contains("e-active")&&this.setFocus(e);var t=this.element.querySelectorAll("."+p);this.parent.activeElements=[],this.parent.dragData=[];for(var i=0;i<t.length;i++)this.parent.dragData.push(this.getItemObject(t[parseInt(i.toString(),10)])),this.parent.activeElements.push(t[i]);return ln(this.parent,e),this.parent.dragPath=this.parent.path,_n(this.parent),this.parent.virtualDragElement},N.prototype.onDropInit=function(e){var t;this.parent.targetModule===this.getModuleName()&&(e=y.closest(e.target,".e-list-item"),t=y.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),e?(e=this.getItemObject(e),this.parent.dropPath=e.isFile?this.parent.path:vn(this.parent,e,this.parent.path),this.parent.dropData=e.isFile?t:e):(this.parent.dropPath=this.parent.path,this.parent.dropData=t))},N.prototype.getModuleName=function(){return"largeiconsview"},N.prototype.onItemCreated=function(e){e.item.removeAttribute("aria-level"),!this.parent.showFileExtension&&y.getValue("isFile",e.curData)&&(n=e.item.querySelector("."+et),t=y.getValue("name",e.curData),i=y.getValue("type",e.curData),-1!==t.indexOf(i))&&(n.innerHTML=t.substr(0,t.length-i.length)),this.renderCheckbox(e);var t,i,n={element:e.item,fileDetails:e.curData,module:"LargeIconsView"};this.parent.trigger("fileLoad",n)},N.prototype.renderCheckbox=function(e){var t;this.parent.showItemCheckBoxes&&((t=U.createCheckBox(y.createElement,!1,{checked:!1,cssClass:"e-small"})).setAttribute("role","checkbox"),t.setAttribute("aria-checked","false"),t.setAttribute("aria-label","checkbox"),e.item.firstElementChild.insertBefore(t,e.item.firstElementChild.childNodes[0]))},N.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"===y.getValue("name",e)&&"move"===this.parent.fileAction&&this.parent.isCut&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length)for(var t=this.getIndexes(this.parent.selectedNodes),i=0;i<t.length;)on(this.itemList[t[i]]),i++;0!==this.element.querySelectorAll("."+p).length&&this.element.focus(),this.checkItem(),this.parent.isLayoutChange=!1}else this.element.setAttribute("tabindex","-1")},N.prototype.checkItem=function(){var e=this.element.querySelectorAll("."+p);if(e)for(var t=0;t<e.length;)this.checkState(e[t],!0),t++},N.prototype.renderList=function(e){for(var t=0,i=JSON.parse(JSON.stringify(e.files));t<i.length;){var n,s=bn(i[t]),a=y.getValue("name",i[t]),r=Jn(this.parent,i[t]),r=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?It+" e-active":It;S(i[t])||(r+=" "+ts(i[t])),s===bt&&this.parent.showThumbnail&&is(i[t])?(n=yn(this.parent,i[t]),y.setValue("_fm_imageUrl",n,i[t]),y.setValue("_fm_imageAttr",{alt:a},i[t])):y.setValue("_fm_icon",s,i[t]),y.setValue("_fm_htmlAttr",{class:r,title:a},i[t]),t++}return i},N.prototype.onFinalizeEnd=function(e){this.render(e)},N.prototype.onCreateEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.clearSelect(),this.selectItems([y.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null,this.parent.largeiconsviewModule.element.focus(),this.parent.activeModule="largeiconsview")},N.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},N.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&ms(this.parent,this.parent.selectedItems,this.parent.path,"delete")},N.prototype.onDeleteEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.parent.setProperties({selectedItems:[]},!0),this.clearSelect())},N.prototype.onRefreshEnd=function(e){"LargeIcons"===this.parent.view&&this.onLayoutChange(e)},N.prototype.onRenameInit=function(){"largeiconsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},N.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)&&"largeiconsview"===this.parent.activeModule&&(this.clearSelect(),this.addSelection(this.parent.renamedItem))},N.prototype.onOpenInit=function(e){"largeiconsview"===this.parent.activeModule&&this.doOpenAction(e.target)},N.prototype.onHideLayout=function(){"LargeIcons"!==this.parent.view&&this.element&&this.element.classList.add(Xt)},N.prototype.onSelectAllInit=function(){var e;"LargeIcons"===this.parent.view&&(this.startItem=this.getFirstItem(),e=this.getLastItem(),this.doSelection(e,{ctrlKey:!0,shiftKey:!0}),this.isInteraction=!0,this.isInteracted=!0)},N.prototype.onClearAllInit=function(){"LargeIcons"===this.parent.view&&(this.clearSelection(),this.isInteraction=!0,this.isInteracted=!0)},N.prototype.onBeforeRequest=function(){this.isRendered=!1},N.prototype.onAfterRequest=function(){this.isRendered=!0},N.prototype.onSearch=function(e){"LargeIcons"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(m,{}),this.parent.searchedItems=e.files,this.onLayoutChange(e))},N.prototype.onLayoutRefresh=function(){this.parent.view},N.prototype.onUpdateSelectionData=function(){"LargeIcons"===this.parent.view&&this.updateSelectedData()},N.prototype.onPathColumn=function(){"LargeIcons"!==this.parent.view||y.isNullOrUndefined(this.listObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||"filterPath"!==this.parent.sortBy||(this.parent.sortBy="name",this.parent.notify(Si,{}))},N.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Ui,this.onPathColumn),this.parent.off(u,this.onFinalizeEnd),this.parent.off(si,this.onCreateEnd),this.parent.off(Ri,this.onSelectedData),this.parent.off(oi,this.onDeleteInit),this.parent.off(li,this.onDeleteEnd),this.parent.off(hi,this.onRefreshEnd),this.parent.off(g,this.onPathChanged),this.parent.off(a,this.onLayoutChange),this.parent.off(yi,this.onSearch),this.parent.off(vi,this.onOpenInit),this.parent.off(Ii,this.onPathChanged),this.parent.off(l,this.onPropertyChanged),this.parent.off(Yi,this.onMethodCall),this.parent.off(bi,this.onActionFailure),this.parent.off(xi,this.onRenameInit),this.parent.off(b,this.onPathChanged),this.parent.off(Ai,this.onHideLayout),this.parent.off(Oi,this.onSelectAllInit),this.parent.off(wi,this.onClearAllInit),this.parent.off(ji,this.onMenuItemData),this.parent.off(ui,this.onBeforeRequest),this.parent.off(mi,this.onAfterRequest),this.parent.off(pi,this.splitterResizeHandler),this.parent.off(di,this.resizeHandler),this.parent.off(ki,this.onpasteInit),this.parent.off(Li,this.onpasteEnd),this.parent.off(Mi,this.oncutCopyInit),this.parent.off(Bi,this.onDropInit),this.parent.off(f,this.onDetailsInit),this.parent.off(fi,this.onLayoutRefresh),this.parent.off(qi,this.onDropPath),this.parent.off(Ki,this.onUpdateSelectionData),this.parent.off(ai,this.onPathChanged))},N.prototype.addEventListener=function(){this.parent.on(Ui,this.onPathColumn,this),this.parent.on(u,this.onFinalizeEnd,this),this.parent.on(si,this.onCreateEnd,this),this.parent.on(hi,this.onRefreshEnd,this),this.parent.on(Ri,this.onSelectedData,this),this.parent.on(g,this.onPathChanged,this),this.parent.on(oi,this.onDeleteInit,this),this.parent.on(ki,this.onpasteInit,this),this.parent.on(li,this.onDeleteEnd,this),this.parent.on(a,this.onLayoutChange,this),this.parent.on(yi,this.onSearch,this),this.parent.on(vi,this.onOpenInit,this),this.parent.on(xi,this.onRenameInit,this),this.parent.on(b,this.onPathChanged,this),this.parent.on(Ii,this.onPathChanged,this),this.parent.on(l,this.onPropertyChanged,this),this.parent.on(Yi,this.onMethodCall,this),this.parent.on(bi,this.onActionFailure,this),this.parent.on(Ai,this.onHideLayout,this),this.parent.on(Oi,this.onSelectAllInit,this),this.parent.on(wi,this.onClearAllInit,this),this.parent.on(ji,this.onMenuItemData,this),this.parent.on(ui,this.onBeforeRequest,this),this.parent.on(mi,this.onAfterRequest,this),this.parent.on(Bi,this.onDropInit,this),this.parent.on(f,this.onDetailsInit,this),this.parent.on(pi,this.splitterResizeHandler,this),this.parent.on(di,this.resizeHandler,this),this.parent.on(Li,this.onpasteEnd,this),this.parent.on(Mi,this.oncutCopyInit,this),this.parent.on(fi,this.onLayoutRefresh,this),this.parent.on(qi,this.onDropPath,this),this.parent.on(Ki,this.onUpdateSelectionData,this),this.parent.on(ai,this.onPathChanged,this)},N.prototype.onActionFailure=function(){this.isInteraction=!0,this.isInteracted=!0},N.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(e=y.closest(e.target,"li"),this.parent.itemData=[this.getItemObject(e)])},N.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.updateSelectedData():this.parent.itemData=[y.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},N.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""===this.parent.folderPath?[O(this.parent)]:[this.getItemObject(y.select(".e-active",this.element))])},N.prototype.oncutCopyInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.element.querySelectorAll("."+p);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]))}},N.prototype.onpasteEnd=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==An(this.parent,e)&&!this.parent.hasId||this.onPathChanged(e))},N.prototype.onDropPath=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},N.prototype.onPropertyChanged=function(e){var t;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"selectedItems":this.isInteraction=!1,this.isInteracted=!1,t=y.isNullOrUndefined(this.parent.selectedItems)?[]:this.parent.selectedItems.slice(0),t=this.parent.allowMultiSelection?t:t.slice(t.length-1),this.parent.setProperties({selectedItems:[]},!0),this.onClearAllInit(),t.length&&this.selectItems(t),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),this.isInteraction=!0,this.isInteracted=!0;break;case"showThumbnail":un(this.parent);break;case"showFileExtension":case"showHiddenItems":C(this.parent,g,this.parent.path);break;case"allowMultiSelection":case"showItemCheckBoxes":"LargeIcons"===this.parent.view&&un(this.parent);break;case"view":pn(this.parent,"LargeIcons")}},N.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents(),this.startItem=null,this.listElements=null)},N.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new y.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new y.KeyboardEvents(this.element,{keyAction:this.keydownActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),y.EventHandler.add(this.element,"mouseover",this.onMouseOver,this)},N.prototype.unWireEvents=function(){this.wireClickEvent(!1),y.EventHandler.remove(this.element,"mouseover",this.onMouseOver),this.keyboardModule.destroy(),this.keyboardDownModule.destroy()},N.prototype.onMouseOver=function(e){e=y.closest(e.target,".e-list-item");I(this.parent,"hover"),null!==e&&e.classList.add(st)},N.prototype.wireClickEvent=function(e){var t=this;e?this.clickObj=new y.Touch(this.element,{tap:function(e){t.parent.isDevice?(t.tapCount=e.tapCount,t.tapEvent=e,setTimeout(function(){0<t.tapCount&&t.doTapAction(t.tapEvent),t.tapCount=0},350)):2===e.tapCount&&3!==e.originalEvent.which?t.dblClickHandler(e):t.clickHandler(e)},tapHold:function(e){t.parent.isDevice&&(t.multiSelect=!!t.parent.allowMultiSelection,t.parent.allowMultiSelection&&y.addClass([t.parent.element],Ye),t.clickHandler(e))}}):this.clickObj&&this.clickObj.destroy()},N.prototype.doTapAction=function(e){var t=e.originalEvent.target,i=y.closest(t,"."+d);this.multiSelect||t.classList.contains(tt)||y.isNullOrUndefined(i)?this.clickHandler(e):(this.parent.isFile=!1,this.updateType(i),this.parent.isFile?2===e.tapCount?(this.clickHandler(e),this.dblClickHandler(e)):this.clickHandler(e):this.dblClickHandler(e))},N.prototype.clickHandler=function(e){var t=e.originalEvent.target;I(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},N.prototype.doSelection=function(e,t){var i=this.parent.isMac?t.metaKey:t.ctrlKey,n=this.parent.isMac&&t.ctrlKey&&t.shiftKey,s=y.closest(e,"."+d),a=e.classList,r=(this.parent.isFile=!1,"select");if(3!==t.which&&!n||y.isNullOrUndefined(s)||!s.classList.contains(p)){if(y.isNullOrUndefined(s))this.parent.selectedItems.length===this.itemList.length&&(this.isSelectAllCalled=!0),this.clearSelection();else if(this.parent.allowMultiSelection&&s.classList.contains(p)&&(i||e.classList.contains(ot))&&(r="unselect"),t.ctrlKey&&t.shiftKey&&!n&&(this.isSelectAllCalled=!0),!0!==this.triggerSelection(r,s).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!t||i)||a.contains(lt)||(this.updateType(s),this.clearSelect()),this.parent.allowMultiSelection&&t.shiftKey&&!n){t&&t.ctrlKey||this.clearSelect(),this.startItem||(this.startItem=s);var e=this.itemList.indexOf(this.startItem),o=this.itemList.indexOf(s);if(o<e)for(var l=e;o<=l;l--)this.addActive(this.itemList[l]);else for(l=e;l<=o;l++)this.addActive(this.itemList[l]);this.addFocus(this.itemList[o])}else this.startItem=s,this.parent.allowMultiSelection&&s.classList.contains(p)?this.removeActive(s):this.addActive(s),this.addFocus(s);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(m,{}),this.triggerSelect(r,s)}y.isNullOrUndefined(s)||(this.isSelectAllCalled=!1,this.updateType(s))}else this.addActive(s),this.updateType(s)},N.prototype.dblClickHandler=function(e){this.parent.activeModule="largeiconsview";e=e.originalEvent.target;this.doOpenAction(e)},N.prototype.clearSelection=function(){this.clearSelect(),this.resetMultiSelect(),this.parent.notify(m,{})},N.prototype.resetMultiSelect=function(){this.multiSelect=!1,y.removeClass([this.parent.element],Ye)},N.prototype.doOpenAction=function(e){var i,n=this;y.isNullOrUndefined(e)||(e=y.closest(e,"."+d),this.parent.isFile=!1,y.isNullOrUndefined(e))||(this.updateType(e),is(i=this.getItemObject(e))?this.parent.trigger("fileOpen",{cancel:!1,fileDetails:i,module:"LargeIconsView"},function(e){var t;e.cancel||(e=y.getValue("name",i),n.parent.isFile?bn(i)===bt&&(t=yn(n.parent,i),sa(n.parent,e,t)):(""!==n.parent.breadcrumbbarModule.searchObj.element.value||n.parent.isFiltered?Rn(n.parent,i):(t=y.getValue("id",i),n.parent.oldPath=n.parent.path,t=n.parent.path+(y.isNullOrUndefined(t)?e:t)+"/",n.parent.setProperties({path:t},!0),n.parent.pathNames.push(e),n.parent.pathId.push(y.getValue("_fm_id",i)),n.parent.itemData=[i],gn(n.parent)),n.parent.isFiltered=!1,n.parent.setProperties({selectedItems:[]},!0)))}):D(this.parent,i,Gi))},N.prototype.updateType=function(e){e=y.select("."+ft,e);this.parent.isFile=!!y.isNullOrUndefined(e)},N.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()}},N.prototype.keyActionHandler=function(e){var t=this;if(this.isRendered){var i=this.getFocusedItem(),n=this.getFirstItem(),s=this.getLastItem();switch(e.action){case"end":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTo(0,this.element.firstElementChild.scrollHeight),setTimeout(function(){t.navigateItem(t.itemList[t.itemList.length-1])},10)):this.navigateItem(s);break;case"home":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTop=0,setTimeout(function(){t.navigateItem(t.itemList[0])},10)):this.navigateItem(n);break;case"tab":y.isNullOrUndefined(i)?y.isNullOrUndefined(n)||this.addFocus(n):this.addFocus(i);break;case"moveDown":this.navigateDown(i,!0);break;case"moveLeft":this.navigateRight(i,!1);break;case"moveRight":this.navigateRight(i,!0);break;case"moveUp":this.navigateDown(i,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(s,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(n,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(i,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(i,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(i,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(i,e);break;case"space":this.spaceKey(i);break;case"ctrlSpace":case"shiftSpace":case"csSpace":y.isNullOrUndefined(i)||this.doSelection(i,e);break;case"ctrlA":this.ctrlAKey(n,s);break;case"enter":this.doOpenAction(this.parent.visitedItem||this.getVisitedItem());break;case"altEnter":this.parent.notify(f,{}),fs(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":an(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":mn(this.parent);break;case"ctrlV":this.parent.folderPath="",Mn(this.parent);break;case"ctrlX":fn(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload();break;case"back":this.parent.traverseBackward()}}},N.prototype.doDownload=function(){this.updateSelectedData(),$n(this.parent)},N.prototype.performDelete=function(){if(this.parent.selectedItems&&0<this.parent.selectedItems.length){this.updateSelectedData();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!S(e[t]))return void D(this.parent,e[t],v);x(this.parent,"Delete")}},N.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),Xn(this.parent))},N.prototype.updateRenameData=function(){var e=y.select("."+d+"."+p,this.element),e=this.getItemObject(e);Qn(this.parent,e)},N.prototype.getVisitedItem=function(){var e=this.parent.selectedItems[this.parent.selectedItems.length-1],e=this.getIndexes([e],this.parent.hasId);return this.itemList[e[0]]},N.prototype.getFocusedItem=function(){return y.select("."+d+"."+at,this.element)},N.prototype.getActiveItem=function(){return y.select("."+d+"."+p,this.element)},N.prototype.getFirstItem=function(){return this.itemList[0]},N.prototype.getLastItem=function(){return this.itemList[this.itemList.length-1]},N.prototype.navigateItem=function(e){this.setFocus(e)},N.prototype.navigateDown=function(e,t){e=this.getNextItem(e,t,this.perRow);this.setFocus(e)},N.prototype.navigateRight=function(e,t){e=this.getNextItem(e,t);this.setFocus(e)},N.prototype.getNextItem=function(e,t,i){if(y.isNullOrUndefined(e))return this.getFocusedItem()||this.getActiveItem()||this.getFirstItem();var n=this.itemList.indexOf(e);do{var s,n=t?i?n+i:n+1:i?n-i:n-1,a=this.itemList[n];if(this.parent.enableVirtualization&&y.isNullOrUndefined(a)&&(s=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-bottom"),10),s=this.itemList[0].getBoundingClientRect().height+s,this.element.firstElementChild.scrollTo(this.element.firstElementChild.scrollTop,this.element.firstElementChild.scrollTop+s)),y.isNullOrUndefined(a))return e}while(!y.isVisible(a));return a},N.prototype.setFocus=function(e){y.isNullOrUndefined(e)||!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(m,{}),this.triggerSelect("select",e))},N.prototype.spaceKey=function(e){y.isNullOrUndefined(e)||e.classList.contains(p)||!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(m,{}),this.triggerSelect("select",e))},N.prototype.ctrlAKey=function(e,t){var i,n;this.parent.allowMultiSelection&&!y.isNullOrUndefined(e)&&(this.startItem=e,i=(e=this.element.querySelector("."+tt)).scrollTop,n=this.getFocusedItem(),this.doSelection(t,{ctrlKey:!0,shiftKey:!0}),e.scrollTop=i,y.isNullOrUndefined(n)||this.addFocus(n))},N.prototype.csEndKey=function(e,t){this.parent.allowMultiSelection?y.isNullOrUndefined(e)||("ctrlEnd"===t.action?this.addFocus(e):this.doSelection(e,t)):this.navigateItem(e)},N.prototype.csHomeKey=function(e,t){this.parent.allowMultiSelection?y.isNullOrUndefined(e)||("ctrlHome"===t.action?this.addFocus(e):this.doSelection(e,t)):this.navigateItem(e)},N.prototype.csDownKey=function(e,t){var i;this.parent.allowMultiSelection?(i=this.getNextItem(e,!0,this.perRow),y.isNullOrUndefined(i)||("ctrlDown"===t.action?this.addFocus(i):this.doSelection(i,t))):this.navigateDown(e,!0)},N.prototype.csLeftKey=function(e,t){var i;this.parent.allowMultiSelection?(i=this.getNextItem(e,!1),y.isNullOrUndefined(i)||("ctrlLeft"===t.action?this.addFocus(i):this.doSelection(i,t))):this.navigateRight(e,!1)},N.prototype.csRightKey=function(e,t){var i;this.parent.allowMultiSelection?(i=this.getNextItem(e,!0),y.isNullOrUndefined(i)||("ctrlRight"===t.action?this.addFocus(i):this.doSelection(i,t))):this.navigateRight(e,!0)},N.prototype.csUpKey=function(e,t){var i;this.parent.allowMultiSelection?(i=this.getNextItem(e,!1,this.perRow),y.isNullOrUndefined(i)||("ctrlUp"===t.action?this.addFocus(i):this.doSelection(i,t))):this.navigateDown(e,!1)},N.prototype.addActive=function(e){y.isNullOrUndefined(e)||(e.classList.contains(p)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),y.addClass([e],[p]),e.setAttribute("aria-selected","true"),this.checkState(e,!0)),this.parent.visitedItem=e)},N.prototype.removeActive=function(e){y.isNullOrUndefined(e)||(y.removeClass([e],[p]),this.parent.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),this.checkState(e,!1),-1<(e=this.parent.selectedItems.indexOf(this.getDataName(e)))&&(this.parent.selectedItems.splice(e,1),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)),this.parent.visitedItem=null)},N.prototype.getDataName=function(e){e=this.getItemObject(e);return Jn(this.parent,e)},N.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var t=this.getFocusedItem();t&&(t.removeAttribute("tabindex"),y.removeClass([t],[at])),y.addClass([e],[at]),e.setAttribute("tabindex","0"),e.focus()},N.prototype.checkState=function(e,t){this.parent.showItemCheckBoxes&&(e=y.select("."+lt,e),y.isNullOrUndefined(e)||(t?e.classList.contains(ot)||(y.addClass([e],ot),y.closest(e,"."+ht).setAttribute("aria-checked","true")):e.classList.contains(ot)&&(y.removeClass([e],ot),y.closest(e,"."+ht).setAttribute("aria-checked","false"))))},N.prototype.clearSelect=function(){var e=Array.prototype.slice.call(y.selectAll("."+p,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var t=0,i=e.length;t<i;t++)this.removeActive(e[t]);this.triggerSelect("unselect",e[0])}},N.prototype.resizeHandler=function(){this.getItemCount()},N.prototype.splitterResizeHandler=function(){this.getItemCount()},N.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},N.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);e={action:e,fileDetails:1<i.length?i:i[0],isInteracted:this.isInteraction,cancel:!1,target:this.isSelectAllCalled?null:t};return this.parent.trigger("fileSelection",e),this.isInteraction=!0,e},N.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=1<i.length?i[i.length-1]:i[0];t={action:e,fileDetails:1<i.length?i:i[0],isInteracted:this.isInteracted};this.parent.trigger("fileSelect",t),this.isInteracted=!0},N.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})},N.prototype.getIndexes=function(e,t){for(var i=[],n=t?"id":"name",s=0,a=this.items.length;s<a;s++)-1!==e.indexOf(y.getValue(n,this.items[s]))&&i.push(s);return i},N.prototype.getItemObject=function(e){e=this.itemList.indexOf(e);return this.items[e]},N.prototype.addSelection=function(e){var t=[];this.parent.hasId?t=new h.DataManager(this.items).executeLocal((new h.Query).where("id","equal",this.parent.renamedId,!1)):0<(e=new h.DataManager(this.items).executeLocal((new h.Query).where("name","equal",y.getValue("name",e),!1))).length&&(t=new h.DataManager(e).executeLocal((new h.Query).where("filterPath","equal",this.parent.filterPath,!1))),0<t.length&&(e=this.items.indexOf(t[0]),this.doSelection(this.itemList[e],{ctrlKey:!0,shiftKey:!1}))},N.prototype.updateSelectedData=function(){for(var e=[],t=y.selectAll("."+d+"."+p,this.element),i=0;i<t.length;i++)e[i]=this.getItemObject(t[i]);this.parent.itemData=e},N.prototype.onMethodCall=function(e){if("LargeIcons"===this.parent.view)switch(y.getValue("action",e)){case"deleteFiles":this.deleteFiles(y.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(y.getValue("ids",e));break;case"openFile":this.openFile(y.getValue("id",e));break;case"renameFile":this.isInteraction=!1,this.isInteracted=!1,this.renameFile(y.getValue("id",e),y.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()}},N.prototype.getItemsIndex=function(e){var t=[],i=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),n=this.parent.hasId?"id":"name";if(this.parent.hasId||!i)for(var s=0,a=this.items.length;s<a;s++)-1!==e.indexOf(y.getValue(n,this.items[s]))&&t.push(s);else for(s=0,a=this.items.length;s<a;s++){var r=y.getValue("filterPath",this.items[s])+y.getValue("name",this.items[s]);-1===e.indexOf(r)&&-1===e.indexOf(y.getValue(n,this.items[s]))||t.push(s)}return t},N.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",y.isNullOrUndefined(e))this.performDelete();else{var t=this.getItemsIndex(e);if(0!==t.length){for(var i=[],n=[],s=0;s<t.length;s++)i[s]=this.items[t[s]],n[s]=Jn(this.parent,i[s]);Zn(this.parent,i,n)}}},N.prototype.downloadFiles=function(e){if(y.isNullOrUndefined(e))this.doDownload();else{var t=this.getItemsIndex(e);if(0!==t.length){for(var i=[],n=[],s=0;s<t.length;s++)i[s]=this.items[t[s]],n[s]=Jn(this.parent,i[s]);es(this.parent,i,n)}}},N.prototype.openFile=function(e){y.isNullOrUndefined(e)||0<(e=this.getItemsIndex([e])).length&&this.doOpenAction(this.itemList[e[0]])},N.prototype.renameFile=function(e,t){this.parent.activeModule="largeiconsview",y.isNullOrUndefined(e)?this.performRename():0<(e=this.getItemsIndex([e])).length&&(Qn(this.parent,this.items[e[0]]),y.isNullOrUndefined(t)?Xn(this.parent):S(this.parent.itemData[0])?us(this.parent,this.parent.path,t):D(this.parent,this.parent.itemData[0],v))};var ra=N;function N(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=y.select("#"+this.parent.element.id+Re,this.parent.element),y.addClass([this.element],$e),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"}}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++){var n=i[t],s=e.newProp.searchSettings;"searchSettings"===n&&(y.isNullOrUndefined(s.allowSearchOnTyping)||this.searchEventBind(s.allowSearchOnTyping),!this.parent.breadcrumbbarModule.searchObj.value||""===this.parent.breadcrumbbarModule.searchObj.value||!y.isNullOrUndefined(s.allowSearchOnTyping)&&y.isNullOrUndefined(s.filterType)&&y.isNullOrUndefined(s.ignoreCase)||dn(this.parent,this.parent.breadcrumbbarModule.searchObj.value,!1))}},E.prototype.render=function(){this.addEventListener()},E.prototype.onPathChange=function(){var e=this.parent.pathNames,t=this.parent.path.split("/"),i=this.parent.createElement("ul",{className:"e-addressbar-ul"}),n=null,s=e.length;if(0<e.length){for(var a="",r=0;r<s;r++){for(var o,l=null,n=this.parent.createElement("li",{className:"e-address-list-item"}),h=0;h<=r;h++)a=a+t[h]+"/";n.setAttribute("data-utext",a),0!==r&&(o=y.createElement("span",{className:Yt}),n.appendChild(o)),s-r!=1?(l=y.createElement("a",{className:et}),n.setAttribute("tabindex","0")):l=y.createElement("span",{className:et}),a="",l.innerText=e[r],n.appendChild(l),i.appendChild(n)}var d=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),d=(y.isNullOrUndefined(d)||(y.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),y.remove(d)),this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap"));d?this.parent.breadCrumbBarNavigation.appendChild(i):this.parent.breadCrumbBarNavigation.insertBefore(i,d),this.updateBreadCrumbBar(i)}},E.prototype.updateBreadCrumbBar=function(e){for(var t=e.querySelectorAll("li"),i=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),n=window.getComputedStyle(i,null),s=parseFloat(n.getPropertyValue("padding-right")),n=parseFloat(n.getPropertyValue("padding-left")),a=i.offsetWidth-s-n,r=this.parent.createElement("ul",{className:"e-addressbar-ul"}),o=0,l=[],h=0;h<t.length;h++){var d=t[h].clientWidth;l.push(d),o+=d}y.isNullOrUndefined(i)||y.remove(i);var s=this.parent.createElement("div"),n=(s.setAttribute("class","e-search-wrap"),this.parent.element.id+_e),i=y.createElement("input",{id:n,attrs:{autocomplete:"off","aria-label":w(this.parent,"Search")}}),n=(s.appendChild(i),this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap .e-input")),n=(y.isNullOrUndefined(n)&&(this.parent.breadCrumbBarNavigation.appendChild(s),n=y.createElement("span",{className:"e-icons e-fe-search"}),y.EventHandler.add(n,"click",this.onShowInput,this),i.parentElement.insertBefore(n,i),this.searchObj=new V.TextBox({value:"",showClearButton:!0,placeholder:w(this.parent,"Search"),focus:this.onFocus.bind(this),blur:this.onBlur.bind(this)}),this.searchObj.appendTo("#"+this.parent.element.id+_e),this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping),s=this.searchObj.element.nextElementSibling,y.EventHandler.add(s,"mousedown",this.searchChangeHandler.bind(this),this),y.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)),this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap"));if((a-=this.searchWrapWidth||n.offsetWidth)<o){for(h=t.length;h--;){var p=a-l[h];if(!(40<p)){for(var c=[],u=0;u<=h;u++){var g=t[u];c.push({text:g.innerText,utext:g.getAttribute("data-utext")})}var m=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),f=this.parent.createElement("button",{className:"e-breadcrumb-submenu"});m.appendChild(f),r.insertBefore(m,r.querySelector("li")),this.subMenuObj=new H.DropDownButton({items:c,cssClass:"e-caret-hide e-submenu",iconCss:Wt,iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(f);break}r.insertBefore(t[h],r.querySelector("li")),a=p}this.parent.breadCrumbBarNavigation.insertBefore(r,n)}else this.parent.breadCrumbBarNavigation.insertBefore(e,n)},E.prototype.onFocus=function(){y.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},E.prototype.onKeyUp=function(){this.parent.notify(Ui,{args:this.parent})},E.prototype.onBlur=function(){y.closest(this.searchObj.element,".e-search-wrap").classList.remove("e-focus")},E.prototype.subMenuSelectOperations=function(e){e={target:e.element};this.addressPathClickHandler(e)},E.prototype.addSubMenuAttributes=function(e){e.element.setAttribute("data-utext",y.getValue("utext",e.item));var t=this.parent.createElement("a",{className:"e-list-text"});e.element.appendChild(t)},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 t=this;y.isNullOrUndefined(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(function(){dn(t.parent,e.value,!1)},300)):dn(this.parent,e.value,!1))},E.prototype.addressPathClickHandler=function(e){var e=e.target;"LI"!==e.nodeName&&"A"!==e.nodeName||(e="LI"===e.nodeName?e.children[0]:e,y.isNullOrUndefined(e))||(this.parent.isFiltered=!1,e=this.updatePath(e),this.parent.itemData=[y.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),C(this.parent,g,e),e=this.parent.pathId[this.parent.pathId.length-1],this.parent.notify(Fi,{module:"treeview",selectedNode:e}))},E.prototype.triggerFileOpen=function(e){e={cancel:!1,fileDetails:e,module:"BreadCrumbBar"};delete e.cancel,this.parent.trigger("fileOpen",e)},E.prototype.onShowInput=function(){var e;this.parent.isMobile&&(this.parent.element.classList.contains(Ge)?(y.removeClass([this.parent.element],Ge),this.searchWrapWidth=null):(e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap"),this.searchWrapWidth=e.offsetWidth,y.addClass([this.parent.element],Ge),this.searchObj.element.focus()))},E.prototype.updatePath=function(e){for(var e=y.closest(e,"li").getAttribute("data-utext"),t=(this.addressBarLink=e,this.addressBarLink.split("/")),i=this.parent.pathId,n=this.parent.pathNames,s=(this.parent.pathId=[],this.parent.pathNames=[],""),a=0,r=t.length-1;a<r;a++)this.parent.pathId.push(i[a]),this.parent.pathNames.push(n[a]),s+=t[a]+"/";return this.parent.setProperties({path:s},!0),s},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 y.KeyboardEvents(this.parent.breadCrumbBarNavigation,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.parent.on(l,this.onPropertyChanged,this),y.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(ci,this.destroy,this),this.parent.on(g,this.onUpdatePath,this),this.parent.on(u,this.onUpdatePath,this),this.parent.on(hi,this.onUpdatePath,this),this.parent.on(Ii,this.onUpdatePath,this),this.parent.on(si,this.onCreateEnd,this),this.parent.on(b,this.onRenameEnd,this),this.parent.on(li,this.onDeleteEnd,this),this.parent.on(pi,this.onResize,this),this.parent.on(Li,this.onPasteEnd,this),this.parent.on(di,this.onResize,this),this.parent.on(_i,this.onSearchTextChange,this),this.parent.on(Bi,this.onDropInit,this),this.parent.on(fi,this.onResize,this),this.parent.on(qi,this.onPathChange,this)},E.prototype.keyActionHandler=function(e){"enter"===e.action&&this.addressPathClickHandler(e)},E.prototype.removeEventListener=function(){this.keyboardModule.destroy(),this.parent.off(g,this.onUpdatePath),this.parent.off(u,this.onUpdatePath),this.parent.off(hi,this.onUpdatePath),this.parent.off(Ii,this.onUpdatePath),this.parent.off(Li,this.onPasteEnd),this.parent.off(si,this.onCreateEnd),this.parent.off(b,this.onRenameEnd),this.parent.off(li,this.onDeleteEnd),this.parent.off(pi,this.onResize),this.parent.off(di,this.onResize),this.parent.off(_i,this.onSearchTextChange),this.parent.off(Bi,this.onDropInit),this.parent.off(fi,this.onResize),this.parent.off(qi,this.onPathChange)},E.prototype.onDropInit=function(e){this.parent.targetModule===this.getModuleName()&&(e=e.target.closest("li"),this.parent.dropPath=this.updatePath(e.children[0]),this.parent.dropData=y.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),this.triggerFileOpen(this.parent.dropData),e=this.parent.pathId[this.parent.pathId.length-1],this.parent.notify(Fi,{module:"treeview",selectedNode:e}))},E.prototype.getModuleName=function(){return"breadcrumbbar"},E.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),y.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),y.isNullOrUndefined(this.searchObj))||this.searchObj.destroy()},E.prototype.onSearchTextChange=function(e){this.searchObj.element.placeholder=null!=this.parent.searchSettings.placeholder?this.parent.searchSettings.placeholder:w(this.parent,"Search")+" "+w(this.parent,e.cwd.name.toString())};var oa=E;function E(e){this.addressPath="",this.addressBarLink="",this.searchTimer=null,this.searchWrapWidth=null,this.parent=e,this.keyConfigs={enter:"enter"},this.render()}P.prototype.render=function(){this.keyConfigs={downarrow:"downarrow",uparrow:"uparrown"},this.contextMenu=new B.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:xn(this.parent,qe)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+Ae),this.addEventListener()},P.prototype.onBeforeItemRender=function(e){var t,i;e.item.id===this.getMenuId("largeiconsview")&&(t=y.createElement("span"),(i=e.element).insertBefore(t,"LargeIcons"===this.parent.view?i.childNodes[1]:i.childNodes[0]),t.setAttribute("class",qt+" "+Ct)),e.item.id===this.getMenuId("detailsview")&&(t=y.createElement("span"),(i=e.element).insertBefore(t,"Details"===this.parent.view?i.childNodes[1]:i.childNodes[0]),t.setAttribute("class",zt+" "+Ct))},P.prototype.onBeforeClose=function(t){var e={cancel:!1,element:t.element,event:t.event,isFocused:t.isFocused,fileDetails:[this.menuItemData],items:t.items,parentItem:t.parentItem,menuType:this.menuType};if(this.parent.trigger("menuClose",e,function(e){e.cancel&&(t.cancel=e.cancel)}),this.menuTarget=null,!this.isMenuItemClicked&&1<this.parent.pathId.length&&"navigationpane"===this.parent.activeModule){this.parent.pathId.pop();for(var i=[],n=0,s=Object.keys(this.parent.feParent);n<s.length;n++){var a=s[n],a=y.getValue(a,this.parent.feParent);-1!==this.parent.pathNames.indexOf(a.name)&&i.push(a._fm_id)}this.parent.pathId.push(i[i.length-1]),this.parent.navigationpaneModule.treeObj.setProperties({selectedNodes:[this.parent.pathId[this.parent.pathId.length-1]]})}this.isMenuItemClicked=!1},P.prototype.onBeforeOpen=function(t){var e,i=this,n=!1,s=!1,a=t.event.target,r=(this.menuTarget=this.targetNodeElement=a,this.currentElement=t.element,a.classList.contains("e-spinner-pane")&&(a=this.parent.navigationpaneModule.activeNode.getElementsByClassName($t)[0],this.menuTarget=this.targetNodeElement=a),this.targetElement="Details"===this.parent.view?y.closest(a,"tr.e-row"):a,this.parent.enableVirtualization&&(a.classList.contains("e-virtual-bottom")||a.classList.contains("e-virtualtable"))&&(a=a.parentElement.closest("div")),this.getTargetView(a));if(this.updateActiveModule(),a.classList.contains(Dt)||y.closest(a,"th")||y.closest(a,"#"+this.parent.element.id+Ve)||y.closest(a,"#"+this.parent.element.id+je))t.cancel=!0;else if("LargeIcons"!==this.parent.view&&this.targetElement&&this.targetElement.classList.contains("e-emptyrow"))this.setLayoutItem(a);else if(y.closest(a,"."+c))this.setLayoutItem(a);else if(!a.classList.contains(St)&&!a.classList.contains(Ct)&&!a.classList.contains(jt))if("LargeIcons"!==this.parent.view||y.isNullOrUndefined(y.closest(a,"li"))||y.closest(a,"#"+this.parent.element.id+Ee)?y.isNullOrUndefined(y.closest(a,"tr.e-row"))?y.closest(a,"#"+this.parent.element.id+Ee)&&(e=y.closest(a,"li").getAttribute("data-uid"),y.isNullOrUndefined(e)||(this.navUid=e),s=!0):(e=this.targetElement.getAttribute("data-uid"),d=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(e).data,y.isNullOrUndefined(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("data-rowindex"),10)]),n=!0):(y.closest(a,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(a,{ctrlKey:!0,shiftKey:!0}),d=this.parent.visitedData,n=!0),n)!0===y.getValue("isFile",d)?this.setFileItem():this.setFolderItem(!1);else if(s)if(this.setFolderItem(!0),e===this.parent.pathId[0])this.disabledItems.push("Delete","Rename","Cut","Copy");else for(var o=["Delete","Rename","Cut","Copy"],l=0;l<this.disabledItems.length;l++){var h=this.disabledItems[l];-1!==o.indexOf(h)&&(this.disabledItems.splice(l,1),l--)}else"TreeView"===r||"GridView"===r||"LargeIcon"===r?this.setLayoutItem(a):t.cancel=!0;var d,p,n=y.select("#"+this.getMenuId("Paste"),this.contextMenu.element);t.cancel||this.parent.enablePaste||!n||n.classList.contains("e-disabled")?-1!==(d=this.disabledItems.indexOf("Paste"))&&this.disabledItems.splice(d,1):-1===this.disabledItems.indexOf("Paste")&&this.disabledItems.push("Paste"),t.cancel?this.menuTarget=this.currentElement=null:(this.contextMenu.dataBind(),p=!1,(a.classList.contains(St)||a.classList.contains(Ct)||a.classList.contains(jt))&&(p=!0),this.menuItemData=p?this.menuItemData:this.getMenuItemData(),s={fileDetails:[this.menuItemData],element:t.element,target:a,items:(p?t:this.contextMenu).items,menuModule:this.contextMenu,cancel:!1,menuType:this.menuType,isSubMenu:p},this.currentItems=s.items,this.parent.trigger("menuOpen",s,function(e){p||(i.contextMenu.dataBind(),i.contextMenu.items=e.items,i.contextMenu.dataBind()),i.enableItems(i.disabledItems,!1,!0),t.cancel=e.cancel,e.cancel&&(i.menuTarget=i.targetNodeElement=i.currentElement=null)}))},P.prototype.updateActiveModule=function(){this.parent.activeModule=y.closest(this.menuTarget,"#"+this.parent.element.id+Ee)?"navigationpane":y.closest(this.menuTarget,"#"+this.parent.element.id+Pe)?"detailsview":y.closest(this.menuTarget,"#"+this.parent.element.id+Re)?"largeiconsview":this.parent.activeModule},P.prototype.getTargetView=function(e){return e.classList.contains(Dt)?"TreeView":e.classList.contains(xt)?"GridView":e.classList.contains(Et)||e.classList.contains($e)?"LargeIcon":""},P.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},P.prototype.disableItem=function(e){0!==e.length&&(this.disabledItems=this.disabledItems.concat(e))},P.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)},P.prototype.setFolderItem=function(e){var t;this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map(function(e){return e.trim()})),this.contextMenu.dataBind(),e?(e=y.select('[data-uid="'+this.navUid+'"]',this.parent.navigationpaneModule.treeObj.element),y.isNullOrUndefined(e)||this.parent.pathNames[this.parent.pathNames.length-1]!==e.querySelector(".e-list-text").innerHTML||"navigationpane"!==this.parent.activeModule?-1!==(e=this.disabledItems.indexOf("Open"))&&this.disabledItems.splice(e,1):this.disabledItems.push("Open"),0===this.parent.selectedItems.length&&-1!==(t=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(t,1)):"navigationpane"!==this.parent.activeModule&&(1===this.parent.selectedItems.length?-1!==(t=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(t,1):this.disabledItems.push("Rename","Paste"))},P.prototype.setFileItem=function(){var e;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?-1!==(e=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(e,1):this.disabledItems.push("Rename")},P.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!==y.closest(e,"#"+this.parent.element.id+Re).getElementsByClassName(c).length||"Details"===this.parent.view&&0!==y.closest(e,"#"+this.parent.element.id+Pe).getElementsByClassName(c).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()},P.prototype.checkValidItem=function(e){return y.isNullOrUndefined(y.select("#"+this.getMenuId(e),this.currentElement))?y.isNullOrUndefined(y.select("#"+e,this.currentElement))?-1:2:1},P.prototype.getMenuItemData=function(){var e;return"layout"===this.menuType?O(this.parent):(e={target:this.menuTarget},this.parent.notify(ji,e),this.parent.itemData[0])},P.prototype.onSelect=function(s){var a,r,e,o=this;!y.isNullOrUndefined(s.item)&&s.item.id&&("refresh"===(a=s.item.id.substr((this.parent.element.id+"_cm_").length))||"newfolder"===a||"upload"===a?(r=[O(this.parent)],this.parent.itemData=r):(this.parent.notify(Ri,{}),r="navigationpane"===this.parent.activeModule&&"open"===a?[this.menuItemData]:this.parent.itemData),e={cancel:!1,element:s.element,fileDetails:r,item:s.item},this.parent.trigger("menuClick",e,function(e){var t;if(!e.cancel)switch(o.isMenuItemClicked=!0,a){case"cut":fn(o.parent);break;case"copy":mn(o.parent);break;case"paste":"folder"===o.menuType?"navigationpane"===o.parent.activeModule?(o.parent.navigationpaneModule.openFileOnContextMenuClick(y.closest(o.targetNodeElement,"li")),o.parent.folderPath=o.parent.path):o.parent.folderPath=vn(o.parent,o.menuItemData,o.parent.path):o.parent.folderPath="",Mn(o.parent);break;case"delete":for(var i=0;i<r.length;i++)if(!S(r[i]))return void D(o.parent,r[i],v);x(o.parent,"Delete");break;case"download":for(var n=0;n<r.length;n++)if(!as(r[n]))return void D(o.parent,r[n],Xi);"navigationpane"===o.parent.activeModule?o.parent.notify(Hi,{}):0<o.parent.selectedItems.length&&Us(o.parent,o.parent.path,o.parent.selectedItems);break;case"rename":S(r[0])?(o.parent.notify(xi,{}),x(o.parent,"Rename")):D(o.parent,r[0],v);break;case"selectall":o.parent.notify(Oi,{});break;case"refresh":un(o.parent);break;case"open":o.parent.visitedItem&&"navigationpane"!==o.parent.activeModule?o.parent.notify(vi,{target:o.parent.visitedItem}):"navigationpane"===o.parent.activeModule&&(o.parent.visitedItem&&o.parent.notify(vi,{target:o.parent.visitedItem}),o.parent.navigationpaneModule.openFileOnContextMenuClick(y.closest(o.targetNodeElement,"li")));break;case"details":o.parent.notify(f,{}),t=o.parent.selectedItems,"navigationpane"===o.parent.activeModule&&(t=[],o.parent.navigationpaneModule.openFileOnContextMenuClick(y.closest(o.targetNodeElement,"li"))),fs(o.parent,t,o.parent.path,"details");break;case"newfolder":rs(o.parent);break;case"upload":os(o.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":Nn(o.parent,s);break;case"largeiconsview":pn(o.parent,"LargeIcons");break;case"detailsview":pn(o.parent,"Details")}}))},P.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++)"cssClass"===i[t]&&(this.contextMenu.cssClass=xn(this.parent,qe))},P.prototype.addEventListener=function(){this.parent.on(ci,this.destroy,this),this.parent.on(l,this.onPropertyChanged,this),this.keyboardModule=new y.KeyboardEvents(this.contextMenu.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},P.prototype.removeEventListener=function(){this.parent.off(ci,this.destroy),this.parent.off(l,this.onPropertyChanged),this.keyboardModule.destroy()},P.prototype.keyActionHandler=function(e){switch(e.action){case"uparrow":case"downarrow":e.preventDefault()}},P.prototype.getModuleName=function(){return"contextmenu"},P.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.contextMenu.destroy(),this.targetElement=null)},P.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,s=this.getMenuId(e[i]),a=w(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:s,text:a,iconCss:Pt};break;case"Upload":n={id:s,text:a,iconCss:Rt};break;case"Cut":n={id:s,text:a,iconCss:Mt};break;case"Copy":n={id:s,text:a,iconCss:kt};break;case"Paste":n={id:s,text:a,iconCss:Lt};break;case"Delete":n={id:s,text:a,iconCss:Tt};break;case"Rename":n={id:s,text:a,iconCss:At};break;case"NewFolder":n={id:s,text:a,iconCss:Ft};break;case"Details":n={id:s,text:a,iconCss:Vt};break;case"SortBy":n={id:s,text:a,iconCss:Ut,items:[{id:this.getMenuId("Name"),text:w(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?it:null},{id:this.getMenuId("Size"),text:w(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?it:null},{id:this.getMenuId("Date"),text:w(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?it:null},{separator:!0},{id:this.getMenuId("Ascending"),text:w(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?o:null},{id:this.getMenuId("Descending"),text:w(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?o:null},{id:this.getMenuId("None"),text:w(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?o:null}]};break;case"View":n={id:s,text:a,iconCss:"Details"===this.parent.view?zt:qt,items:[{id:this.getMenuId("largeiconsview"),text:w(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:o},{id:this.getMenuId("detailsview"),text:w(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?o:null}]};break;case"Refresh":n={id:s,text:a,iconCss:_t};break;case"SelectAll":n={id:s,text:a,iconCss:Ht};break;case"Download":n={id:s,text:a,iconCss:Bt};break;default:n={id:s,text:a}}t.push(n)}return t},P.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.split(" ").join("").toLowerCase()};var la=P;function P(e){this.isMenuItemClicked=!1,this.currentItems=[],this.currentElement=null,this.disabledItems=[],this.parent=e,this.render()}var ha,da,pa,ca={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"},n=(ha=function(e,t){return(ha=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])}))(e,t)},function(e,t){function i(){this.constructor=e}ha(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),R=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},n=(da=y.Component,n(M,da),(pa=M).prototype.getModuleName=function(){return"filemanager"},M.prototype.preRender=function(){!y.isNullOrUndefined(this.element.id)&&""!==this.element.id||this.element.setAttribute("id",y.getUniqueID("filemanager")),this.ensurePath(),this.feParent=[],this.feFiles=[],y.setStyleAttribute(this.element,{width:y.formatUnit(this.width),height:y.formatUnit(this.height)}),this.isDevice=y.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=y.closest(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",r.createSpinner({target:this.element},y.createElement),this.addWrapper(),this.keyConfigs={altN:"alt+n",f5:"f5",ctrlShift1:"ctrl+shift+1",ctrlShift2:"ctrl+shift+2",ctrlU:"ctrl+u"},this.localeObj=new y.L10n(this.getModuleName(),ca,this.locale)},M.prototype.getPersistData=function(){return this.addOnPersist(["view","path","selectedItems"])},M.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},M.prototype.render=function(){this.initialize();var e=y.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.isMac=0<=navigator.platform.toUpperCase().indexOf("MAC"),this.setRtl(this.enableRtl),this.addEventListeners(),C(this,this.path!==this.originalPath?ni:u,this.path),"Details"===this.fileView&&this.largeiconsviewModule.element.classList.add(Xt),this.adjustHeight(),y.isNullOrUndefined(this.navigationpaneModule)&&(this.splitterObj.collapse(this.enableRtl?1:0),y.select("."+Zt,this.element).classList.add(Xt)),this.wireEvents(),this.renderComplete()},M.prototype.ensurePath=function(){var e=this.path,e=((e=y.isNullOrUndefined(e)?"/":e).lastIndexOf("/")!==e.length-1&&(e+="/"),(this.originalPath=e).split("/"));this.setProperties({path:e[0]+"/"},!0),this.pathNames=[],this.pathId=["fe_tree"],this.itemData=[]},M.prototype.initialize=function(){this.isMobile&&y.addClass([this.element],We),this.allowMultiSelection&&y.addClass([this.element],ze),this.addCssClass(null,this.cssClass),this.renderFileUpload()},M.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+je}),e=(this.element.appendChild(e),this.createElement("div",{id:this.element.id+xe,className:Je})),t=(this.element.appendChild(e),this.createElement("div",{id:this.element.id+Ne,className:Qe})),i=this.createElement("div",{id:this.element.id+Ee}),i=(t.appendChild(i),this.createElement("div",{id:this.element.id+Fe,className:Xe})),n=(this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+Ve,className:Jt}),i.appendChild(this.breadCrumbBarNavigation),this.createElement("div",{id:this.element.id+Pe})),n=(i.appendChild(n),this.createElement("div",{id:this.element.id+Re,className:$e,attrs:{role:"group"}})),n=(i.appendChild(n),this.createElement("span",{className:ti})),t=(i.appendChild(n),n=this.enableRtl?(e.appendChild(i),e.appendChild(t),[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(e.appendChild(t),e.appendChild(i),[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new A.Splitter({paneSettings:n,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(e),this.createElement("div",{id:this.element.id+Me})),i=(this.element.appendChild(t),this.createElement("ul",{id:this.element.id+Ae})),n=(this.element.appendChild(i),this.createElement("div",{id:this.element.id+ke})),e=(this.element.appendChild(n),this.createElement("div",{id:this.element.id+Le})),t=(this.element.appendChild(e),this.createElement("div",{id:this.element.id+Te}));this.element.appendChild(t)},M.prototype.adjustHeight=function(){var e=y.select("#"+this.element.id+je,this.element),e=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-e).toString(),this.splitterObj.dataBind())},M.prototype.splitterResize=function(){this.notify(pi,{})},M.prototype.splitterAdjust=function(){var e=y.select("."+Zt,this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(Xt)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(Xt))},M.prototype.addCssClass=function(e,t){y.isNullOrUndefined(e)||""===e||y.removeClass([this.element],e.split(" ")),y.isNullOrUndefined(t)||""===t||y.addClass([this.element],t.split(" "))},M.prototype.showSpinner=function(){r.showSpinner(this.element)},M.prototype.hideSpinner=function(){r.hideSpinner(this.element)},M.prototype.onContextMenu=function(e){e.preventDefault()},M.prototype.checkMobile=function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(y.Browser.userAgent.toLowerCase())&&/mobile/i.test(y.Browser.userAgent.toLowerCase())},M.prototype.renderFileUpload=function(){var e=this.element.id+Ue,e=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(e),this.uploadDialogObj=new r.Dialog({header:w(this,"Header-Upload"),content:e,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!1,isModal:!0,width:"350px",target:this.popupTarget||"#"+this.element.id,cssClass:xn(this,this.isMobile?Ke:qe),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+Te),this.renderUploadBox()},M.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl||this.ajaxSettings.url;this.uploadObj=new V.Uploader({dropArea:y.select("#"+this.element.id+Fe,this.element),asyncSettings:{saveUrl:e,removeUrl:e,chunkSize:this.uploadSettings.chunkSize,retryCount:0},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),chunkUploading:this.onChunkUploading.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+Ue)},M.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},M.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()},M.prototype.onBeforeOpen=function(t){var e={cancel:t.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupOpen",e,function(e){t.cancel=e.cancel})},M.prototype.onBeforeClose=function(t){var e={cancel:t.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupClose",e,function(e){t.cancel=e.cancel})},M.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)},M.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupClose",e)},M.prototype.onChunkUploading=function(e){var t="save";if(0!==this.retryArgs.length)for(var i=0;i<this.retryArgs.length;i++)e.fileData.name===this.retryArgs[i].file.name&&(t=this.retryArgs[i].action);var n=JSON.stringify(y.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{size:e.fileData.size},{action:t},{data:n},{filename:e.fileData.name}]},M.prototype.onUploading=function(i){var e="save";if(0!==this.retryArgs.length)for(var t=0;t<this.retryArgs.length;t++)i.fileData.name===this.retryArgs[t].file.name&&(e=this.retryArgs[t].action,0===this.uploadSettings.chunkSize)&&(this.retryArgs.splice(t,1),t=this.retryArgs.length);var n=JSON.stringify(y.getValue(this.pathId[this.pathId.length-1],this.feParent));i.customFormData=[{path:this.path},{size:i.fileData.size},{action:e},{data:n},{filename:i.fileData.name}];n={url:this.ajaxSettings.uploadUrl||this.ajaxSettings.url,type:"POST",mode:!0,dataType:null,contentType:null,data:JSON.stringify(i.customFormData),onSuccess:null,onFailure:null,beforeSend:null};this.uploadEventArgs={action:"Upload",ajaxSettings:n,cancel:!1},this.trigger("beforeSend",this.uploadEventArgs,function(e){i.customFormData=JSON.parse(y.getValue("data",e.ajaxSettings)),i.cancel=e.cancel;var t={cancel:!1,httpRequest:i.currentRequest};"function"==typeof y.getValue("beforeSend",e.ajaxSettings)&&(y.getValue("beforeSend",e.ajaxSettings)(t),y.getValue("cancel",t))&&(i.cancel=y.getValue("cancel",t))})},M.prototype.onRemoving=function(){this.onFileUploadSuccess({count:1}),1===this.uploadObj.getFilesData().length&&this.uploadDialogObj.hide()},M.prototype.onCancel=function(e){var t=JSON.stringify(y.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:"remove"},{data:t}]},M.prototype.onClearing=function(){this.isOpened&&this.uploadDialogObj.hide()},M.prototype.onSelected=function(e){var t;0!==e.filesData.length&&(this.uploadingCount=e.filesData.length,this.uploadedCount=0,ss(t=O(this))?this.uploadDialogObj.show():(e.cancel=!0,D(this,t,Qi)))},M.prototype.onFileUploadSuccess=function(e){this.uploadedCount=this.uploadedCount+e.count,this.uploadSettings.autoClose&&this.uploadingCount===this.uploadedCount&&this.uploadDialogObj.hide()},M.prototype.onChunkUploadComplete=function(e){if(0!==this.retryArgs.length)for(var t=0;t<this.retryArgs.length;t++)(y.isNullOrUndefined(e)?"":y.getValue("file",e).name)===this.retryArgs[t].file.name&&(this.retryArgs.splice(t,1),t=this.retryArgs.length)},M.prototype.onUploadSuccess=function(e){0<this.uploadSettings.chunkSize&&this.onChunkUploadComplete(e),this.trigger("success",{action:"Upload",result:e}),this.itemData=[y.getValue(this.pathId[this.pathId.length-1],this.feParent)],C(this,g,this.path),this.onFileUploadSuccess({count:1}),"function"==typeof y.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)&&y.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)()},M.prototype.onUploadFailure=function(e){0<this.uploadSettings.chunkSize&&this.onChunkUploadComplete(e);var t=y.getValue("response",e),i=y.getValue("statusText",t);""!==i&&y.setValue("statusText",i,e),this.trigger("failure",{action:"Upload",error:e}),400===y.getValue("statusCode",t)&&(this.retryFiles.push(y.getValue("file",e)),this.isRetryOpened||Hs(this,"UploadRetry")),"function"==typeof y.getValue("onFailure",this.uploadEventArgs.ajaxSettings)&&y.getValue("onFailure",this.uploadEventArgs.ajaxSettings)()},M.prototype.onInitialEnd=function(){Pn(this,this.path)},M.prototype.addEventListeners=function(){this.on(ui,this.showSpinner,this),this.on(mi,this.hideSpinner,this),this.on(ni,this.onInitialEnd,this),this.on(f,this.onDetailsInit,this),this.on(gi,this.onFileUploadSuccess,this),y.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},M.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(ui,this.showSpinner),this.off(mi,this.hideSpinner),this.off(ni,this.onInitialEnd),this.off(f,this.onDetailsInit),this.off(gi,this.onFileUploadSuccess),y.EventHandler.remove(this.element,"contextmenu",this.onContextMenu))},M.prototype.onDetailsInit=function(){y.isNullOrUndefined(this.activeModule)&&(this.itemData=[y.getValue(this.pathId[this.pathId.length-1],this.feParent)])},M.prototype.resizeHandler=function(){this.adjustHeight(),this.notify(di,{})},M.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[O(this)],ns(this.itemData[0])?x(this,"NewFolder"):D(this,this.itemData[0],Ji);break;case"f5":e.preventDefault(),un(this);break;case"ctrlShift1":e.preventDefault(),this.fileView="Details",this.setProperties({view:"Details"},!0),r.showSpinner(this.element),pn(this,"Details");break;case"ctrlShift2":e.preventDefault(),this.fileView="LargeIcons",this.setProperties({view:"LargeIcons"},!0),r.showSpinner(this.element),pn(this,"LargeIcons");break;case"ctrlU":e.preventDefault(),-1!==this.toolbarSettings.items.indexOf("Upload")&&y.select("#"+this.element.id+Ue,this.element).click()}},M.prototype.wireSelectOnDragEvent=function(e){y.isNullOrUndefined(this.view)||(e&&(this.viewElem="LargeIcons"===this.view?this.largeiconsviewModule.element:this.element.querySelector(".e-gridcontent")),this.viewElem&&(e?this.allowMultiSelection&&(y.EventHandler.add(this.viewElem,"mousedown",this.onDragStart,this),this.on(a,this.onLayoutChange,this),this.on(m,this.onLayoutChange,this)):(y.EventHandler.remove(this.viewElem,"mousedown",this.onDragStart),this.off(a,this.onLayoutChange),this.off(m,this.onLayoutChange))))},M.prototype.wireEvents=function(){this.enableRangeSelection&&this.wireSelectOnDragEvent(!0),y.EventHandler.add(window,"resize",this.resizeHandler,this),this.keyboardModule=new y.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},M.prototype.unWireEvents=function(){this.wireSelectOnDragEvent(!1),y.EventHandler.remove(window,"resize",this.resizeHandler),this.keyboardModule.destroy()},M.prototype.onDragStart=function(e){if(this.viewElem){if(this.allowDragAndDrop)if(y.closest(e.target,this.viewElem.classList.contains("e-large-icons")?".e-list-item":".e-fe-text"))return;e.preventDefault(),this.dragX=e.pageX,this.dragY=e.pageY,this.dragSelectElement||(this.dragSelectElement=y.createElement("div",{id:this.element.id+"_drag",className:"e-filemanager e-drag-select",styles:"left: "+this.dragX+"px;top: "+this.dragY+"px;"}),document.body.append(this.dragSelectElement)),y.EventHandler.add(document,"mouseup",this.onDragStop,this),y.EventHandler.add(this.viewElem,"mousemove",this.onDrag,this),y.EventHandler.add(this.dragSelectElement,"mousemove",this.onDrag,this)}},M.prototype.onDrag=function(e){var t;e.stopPropagation(),this.dragSelectElement?(t=e.pageX-this.dragX,e=e.pageY-this.dragY,y.setStyleAttribute(this.dragSelectElement,{left:t<0?this.dragX+t+"px":this.dragX+"px",top:e<0?this.dragY+e+"px":this.dragY+"px",height:Math.abs(e)+"px",width:Math.abs(t)+"px"}),this.selectItems()):y.EventHandler.remove(this.viewElem,"mousemove",this.onDrag)},M.prototype.onDragStop=function(){this.viewElem&&(y.EventHandler.remove(document,"mouseup",this.onDragStop),y.EventHandler.remove(this.viewElem,"mousemove",this.onDrag)),this.dragSelectElement&&(y.EventHandler.remove(this.dragSelectElement,"mousemove",this.onDrag),0<this.dragSelectElement.clientHeight&&0<this.dragSelectElement.clientWidth&&this.setProperties({selectedItems:this.dragSelectedItems}),this.dragSelectedItems=[],y.detach(this.dragSelectElement),this.dragSelectElement=null)},M.prototype.selectItems=function(){this.dragSelectedItems=[];var e=this.dragSelectElement.getBoundingClientRect(),t=y.selectAll(this.viewElem.classList.contains("e-large-icons")?".e-list-item":".e-row",this.viewElem);y.removeClass(y.selectAll(".e-active",this.viewElem),["e-active","e-focus"]),y.removeClass(y.selectAll(".e-check",this.viewElem),["e-check"]);for(var i=0,n=t;i<n.length;i++){var s=n[i],a=s.getBoundingClientRect();!(e.right<a.left||e.left>a.right||e.bottom<a.top||e.top>a.bottom)&&0<this.dragSelectElement.clientHeight&&0<this.dragSelectElement.clientWidth&&(this.viewElem.classList.contains("e-large-icons")?(s.classList.add("e-active"),this.dragSelectedItems.push(s.getAttribute("title"))):(y.addClass(y.selectAll(".e-rowcell",s),["e-active"]),this.dragSelectedItems.push(s.querySelector(".e-drag-text").textContent)),s.querySelector(".e-frame").classList.add("e-check"))}},M.prototype.onLayoutChange=function(){this.enableRangeSelection&&(this.unWireEvents(),this.wireEvents())},M.prototype.setPath=function(){this.setProperties({selectedItems:[]},!0),this.ensurePath(),this.notify(Di,{selectedNode:this.pathId[0]}),C(this,this.path!==this.originalPath?ni:u,this.path)},M.prototype.onPropertyChanged=function(e,t){for(var i=this,n=!1,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(l,{module:"common",newProp:e,oldProp:t});break;case"showItemCheckBoxes":this.showItemCheckBoxes=e.showItemCheckBoxes,this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"enableVirtualization":this.enableVirtualization=e.enableVirtualization,n=!0;break;case"allowMultiSelection":this.allowMultiSelection?y.addClass([this.element],ze):(1<this.selectedItems.length&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),y.removeClass([this.element],ze)),this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"cssClass":this.addCssClass(t.cssClass,e.cssClass),this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"detailsViewSettings":this.notify(l,{module:"detailsview",newProp:e,oldProp:t});break;case"enableRangeSelection":this.wireSelectOnDragEvent(!1),e.enableRangeSelection&&this.wireSelectOnDragEvent(!0);break;case"enableRtl":this.enableRtl=e.enableRtl,n=!0;break;case"rootAliasName":this.rootAliasName=e.rootAliasName,n=!0;break;case"height":r=y.isNullOrUndefined(e.height)?e.height:y.formatUnit(e.height),y.setStyleAttribute(this.element,{height:r}),this.adjustHeight(),this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"locale":y.isNullOrUndefined(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify(l,{module:"navigationpane",newProp:e,oldProp:t});break;case"path":this.setPath();break;case"searchSettings":y.isNullOrUndefined(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),y.isNullOrUndefined(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),y.isNullOrUndefined(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify(l,{module:"breadcrumbbar",newProp:e,oldProp:t});break;case"selectedItems":"Details"===this.view?this.notify(l,{module:"detailsview",newProp:e,oldProp:t}):"LargeIcons"===this.view&&this.notify(l,{module:"largeiconsview",newProp:e,oldProp:t});break;case"showFileExtension":case"showHiddenItems":this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"showThumbnail":this.notify(l,{module:"largeiconsview",newProp:e,oldProp:t});break;case"toolbarSettings":case"toolbarItems":this.adjustHeight(),this.notify(l,{module:"toolbar",newProp:e,oldProp:t});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(l,{module:"detailsview",newProp:e,oldProp:t}):"LargeIcons"===e.view&&this.notify(l,{module:"largeiconsview",newProp:e,oldProp:t});break;case"width":y.setStyleAttribute(this.element,{width:y.isNullOrUndefined(e.width)?e.width:y.formatUnit(e.width)}),this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"sortOrder":un(this),this.notify(Si,{});break;case"sortBy":if("Details"===this.view){var r=this.detailsViewSettings.columns;if(!(!y.isNullOrUndefined(r)&&-1!==r.findIndex(function(e){return e.field===i.sortBy})))return;un(this),this.notify(Si,{}),this.notify(Vi,{})}else un(this),this.notify(Si,{});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);break;case"fileSystemData":this.fileSystemData=e.fileSystemData,n=!0}n&&this.refresh()},M.prototype.ajaxSettingSetModel=function(e){y.isNullOrUndefined(e.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:e.ajaxSettings.url}},!0),y.isNullOrUndefined(e.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:e.ajaxSettings.uploadUrl}},!0),y.isNullOrUndefined(e.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:e.ajaxSettings.downloadUrl}},!0),y.isNullOrUndefined(e.ajaxSettings.getImageUrl)||this.setProperties({ajaxSettings:{getImageUrl:e.ajaxSettings.getImageUrl}},!0),this.setProperties({path:"/"},!0),this.setProperties({selectedItems:[]},!0),da.prototype.refresh.call(this)},M.prototype.localeSetModelOption=function(e){this.uploadObj.locale=e.locale,da.prototype.refresh.call(this)},M.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(ci,{}),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),y.removeClass([this.element],[Qt,We,ze]),this.element.innerHTML="",this.breadCrumbBarNavigation=null,this.activeElements=null,this.virtualDragElement=null,this.visitedItem=null,da.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,this.viewElem=null,this.dragSelectElement=null,this.dragSelectedItems=null)},M.prototype.createFolder=function(e){this.notify(Yi,{action:"createFolder"});var t=[O(this)];this.itemData=t,e?/[/\\|*?"<>:]/.test(e)?x(this,"Error",{files:null,error:{code:"402",message:w(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):ns(t[0])?ps(this,e):D(this,t[0],Ji):rs(this)},M.prototype.deleteFiles=function(e){this.notify(Yi,{action:"deleteFiles",ids:e})},M.prototype.disableToolbarItems=function(e){!y.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!1)},M.prototype.downloadFiles=function(e){this.notify(Yi,{action:"downloadFiles",ids:e})},M.prototype.enableToolbarItems=function(e){!y.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!0)},M.prototype.disableMenuItems=function(e){y.isNullOrUndefined(e)||y.isNullOrUndefined(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},M.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},M.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},M.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(m,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),cs(this,ai)},M.prototype.getSelectedFiles=function(){return this.notify(Ki,{}),this.itemData},M.prototype.openFile=function(e){this.notify(Yi,{action:"openFile",id:e})},M.prototype.refreshFiles=function(){un(this)},M.prototype.refreshLayout=function(){this.adjustHeight(),this.notify(fi,{})},M.prototype.selectAll=function(){this.notify(Yi,{action:"selectAll"})},M.prototype.traverseBackward=function(){var e;1<this.pathNames.length&&""===this.breadcrumbbarModule.searchObj.element.value&&!this.isFiltered&&(this.pathId.pop(),this.pathNames.pop(),e=this.pathNames.slice(1).join("/"),this.setProperties({path:e=""===e?"/":"/"+e+"/"},!0),C(this,g,this.path),e=this.pathId[this.pathId.length-1],this.notify(Fi,{module:"treeview",selectedNode:e}))},M.prototype.clearSelection=function(){this.notify(Yi,{action:"clearSelection"})},M.prototype.renameFile=function(e,t){this.notify(Yi,{action:"renameFile",id:e,newName:t})},M.prototype.uploadFiles=function(){var e=[O(this)];this.itemData=e,os(this)},M.prototype.closeDialog=function(){ls(this)},M.prototype.setRtl=function(e){e?this.addCssClass(null,Qt):this.addCssClass(Qt,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)},R([y.Complex({},W)],M.prototype,"ajaxSettings",void 0),R([y.Property([])],M.prototype,"fileSystemData",void 0),R([y.Property(!1)],M.prototype,"allowDragAndDrop",void 0),R([y.Property(!0)],M.prototype,"allowMultiSelection",void 0),R([y.Property(!0)],M.prototype,"showItemCheckBoxes",void 0),R([y.Complex({},re)],M.prototype,"contextMenuSettings",void 0),R([y.Property("")],M.prototype,"cssClass",void 0),R([y.Complex({},ie)],M.prototype,"detailsViewSettings",void 0),R([y.Property(!0)],M.prototype,"enableHtmlSanitizer",void 0),R([y.Property(!1)],M.prototype,"enablePersistence",void 0),R([y.Property(!1)],M.prototype,"enableVirtualization",void 0),R([y.Property("400px")],M.prototype,"height",void 0),R([y.Property("LargeIcons")],M.prototype,"view",void 0),R([y.Complex({},pe)],M.prototype,"navigationPaneSettings",void 0),R([y.Property("/")],M.prototype,"path",void 0),R([y.Property(null)],M.prototype,"popupTarget",void 0),R([y.Complex({},t)],M.prototype,"searchSettings",void 0),R([y.Property()],M.prototype,"selectedItems",void 0),R([y.Property(!0)],M.prototype,"showFileExtension",void 0),R([y.Property(null)],M.prototype,"rootAliasName",void 0),R([y.Property(!1)],M.prototype,"showHiddenItems",void 0),R([y.Property(!0)],M.prototype,"showThumbnail",void 0),R([y.Property("Ascending")],M.prototype,"sortOrder",void 0),R([y.Property("name")],M.prototype,"sortBy",void 0),R([y.Property(null)],M.prototype,"sortComparer",void 0),R([y.Property(!1)],M.prototype,"enableRangeSelection",void 0),R([y.Complex({},X)],M.prototype,"toolbarSettings",void 0),R([y.Collection([],K)],M.prototype,"toolbarItems",void 0),R([y.Complex({},ye)],M.prototype,"uploadSettings",void 0),R([y.Property("100%")],M.prototype,"width",void 0),R([y.Event()],M.prototype,"fileLoad",void 0),R([y.Event()],M.prototype,"fileOpen",void 0),R([y.Event()],M.prototype,"beforeDownload",void 0),R([y.Event()],M.prototype,"beforeImageLoad",void 0),R([y.Event()],M.prototype,"beforePopupClose",void 0),R([y.Event()],M.prototype,"beforePopupOpen",void 0),R([y.Event()],M.prototype,"beforeSend",void 0),R([y.Event()],M.prototype,"created",void 0),R([y.Event()],M.prototype,"beforeFolderCreate",void 0),R([y.Event()],M.prototype,"folderCreate",void 0),R([y.Event()],M.prototype,"destroyed",void 0),R([y.Event()],M.prototype,"beforeDelete",void 0),R([y.Event()],M.prototype,"delete",void 0),R([y.Event()],M.prototype,"beforeRename",void 0),R([y.Event()],M.prototype,"rename",void 0),R([y.Event()],M.prototype,"beforeMove",void 0),R([y.Event()],M.prototype,"move",void 0),R([y.Event()],M.prototype,"search",void 0),R([y.Event()],M.prototype,"fileDragStart",void 0),R([y.Event()],M.prototype,"fileDragging",void 0),R([y.Event()],M.prototype,"fileDragStop",void 0),R([y.Event()],M.prototype,"fileDropped",void 0),R([y.Event()],M.prototype,"fileSelection",void 0),R([y.Event()],M.prototype,"fileSelect",void 0),R([y.Event()],M.prototype,"menuClick",void 0),R([y.Event()],M.prototype,"menuOpen",void 0),R([y.Event()],M.prototype,"menuClose",void 0),R([y.Event()],M.prototype,"failure",void 0),R([y.Event()],M.prototype,"popupClose",void 0),R([y.Event()],M.prototype,"popupOpen",void 0),R([y.Event()],M.prototype,"success",void 0),R([y.Event()],M.prototype,"toolbarClick",void 0),R([y.Event()],M.prototype,"toolbarCreate",void 0),R([y.Event()],M.prototype,"uploadListCreate",void 0),pa=R([y.NotifyPropertyChanges],M));function M(e,t){e=da.call(this,e,t)||this;return e.filterData=null,e.selectedNodes=[],e.duplicateItems=[],e.duplicateRecords=[],e.previousPath=[],e.nextPath=[],e.existingFileCount=0,e.isLayoutChange=!1,e.layoutSelectedItems=[],e.renamedId=null,e.uploadItem=[],e.deleteRecords=[],e.isFile=!1,e.isCut=!1,e.isSearchCut=!1,e.isSearchDrag=!1,e.isPasteError=!1,e.folderPath="",e.isSameAction=!1,e.isFiltered=!1,e.isSortByClicked=!1,e.enablePaste=!1,e.persistData=!1,e.retryArgs=[],e.isOpened=!1,e.isRetryOpened=!1,e.isPathDrag=!1,e.searchedItems=[],e.retryFiles=[],e.isApplySame=!1,e.dragData=[],e.dragNodes=[],e.dragPath="",e.dropPath="",e.isDragDrop=!1,e.treeExpandTimer=null,e.dragCursorPosition={left:44,top:18},e.isDropEnd=!1,e.dragCount=0,e.droppedObjects=[],e.uploadingCount=0,e.uploadedCount=0,e.isMac=!1,e.dragSelectedItems=[],pa.Inject(oa,ra,la),e}k.prototype.render=function(){var t=this,e=(this.items=this.toolbarItemData(this.getItems(this.parent.toolbarSettings.items.map(function(e){return e.trim()}))),{items:this.items});this.parent.trigger("toolbarCreate",e,function(e){t.items=e.items,t.toolbarObj=new B.Toolbar({items:t.items,created:t.toolbarCreateHandler.bind(t),overflowMode:"Popup",clicked:t.onClicked.bind(t),enableHtmlSanitizer:t.parent.enableHtmlSanitizer,enableRtl:t.parent.enableRtl}),t.toolbarObj.isStringTemplate=!0,t.toolbarObj.root=t.parent.root||t.parent,t.toolbarObj.appendTo("#"+t.parent.element.id+je)})},k.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},k.prototype.getItems=function(e){e=e.slice();return this.parent.isDevice&&this.parent.allowMultiSelection&&e.push("SelectAll"),e=0<this.parent.toolbarItems.length?this.parent.toolbarItems.map(function(e){return e.name}):e},k.prototype.onClicked=function(n){var s,a,e,r=this;!y.isNullOrUndefined(n.item)&&n.item.id&&("refresh"===(s=n.item.id.substr((this.parent.element.id+"_tb_").length))||"newfolder"===s||"upload"===s?(a=[O(this.parent)],this.parent.itemData=a):(this.parent.notify(Ri,{}),a=this.parent.itemData),e={cancel:!1,fileDetails:a,item:n.item},this.parent.trigger("toolbarClick",e,function(e){var t;if(!e.cancel)switch(s){case"sortby":(t=y.closest(n.originalEvent.target,"."+Ze))&&t.classList.contains("e-toolbar-popup")&&(n.cancel=!0);break;case"newfolder":rs(r.parent);break;case"cut":fn(r.parent);break;case"copy":mn(r.parent);break;case"delete":for(var i=0;i<a.length;i++)if(!S(a[i]))return void D(r.parent,a[i],v);x(r.parent,"Delete");break;case"details":r.parent.notify(f,{}),t=r.parent.selectedItems,"navigationpane"===r.parent.activeModule&&(t=[]),fs(r.parent,t,r.parent.path,"details");break;case"paste":r.parent.folderPath="",Mn(r.parent);break;case"refresh":un(r.parent);break;case"download":$n(r.parent);break;case"rename":S(a[0])?(r.parent.notify(xi,{}),x(r.parent,"Rename")):D(r.parent,a[0],v);break;case"upload":os(r.parent);break;case"selectall":r.parent.notify(Oi,{});break;case"selection":r.parent.notify(wi,{})}}))},k.prototype.toolbarCreateHandler=function(){for(var e,n=this,i=(y.isNullOrUndefined(y.select("#"+this.getId("SortBy"),this.parent.element))||(e=[{id:this.getPupupId("name"),text:w(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?it:""},{id:this.getPupupId("size"),text:w(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?it:""},{id:this.getPupupId("date"),text:w(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?it:""},{separator:!0},{id:this.getPupupId("ascending"),text:w(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?o:""},{id:this.getPupupId("descending"),text:w(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?o:""},{id:this.getPupupId("none"),text:w(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?o:""}],this.buttonObj=new H.DropDownButton({items:e,cssClass:xn(this.parent,qe),select:Nn.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:Ut}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))),y.isNullOrUndefined(y.select("#"+this.getId("View"),this.parent.element))||(e=[{id:this.getPupupId("large"),text:w(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":o},{id:this.getPupupId("details"),text:w(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?o:""}],this.layoutBtnObj=new H.DropDownButton({iconCss:"Details"===this.parent.view?zt:qt,cssClass:xn(this.parent,"e-caret-hide "+qe),items:e,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,content:'<span class="e-tbar-btn-text">'+w(this.parent,"View")+"</span>",beforeItemRender:function(e){var t=e.item.iconCss,i=e.item.text===w(n.parent,"View-LargeIcons"),t=(e.element.innerHTML='<span class="'+(t?" e-menu-icon "+t:"")+'"></span>'+(i?'<span class="e-icons e-fe-large e-menu-icon"></span>':'<span class="e-icons e-fe-grid e-menu-icon"></span>')+e.item.text,e.element.firstChild);t&&""===t.className&&e.element.removeChild(t)}}),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()),y.selectAll(".e-btn",this.toolbarObj.element)),t=0;t<i.length;t++)!function(t){i[t].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},i[t].onkeyup=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||i[t].click()}}(t);this.parent.refreshLayout()},k.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?it:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?it:"":e[t].id===this.getPupupId("date")?"dateModified"===this.parent.sortBy||"dateCreated"===this.parent.sortBy?e[t].iconCss=this.parent.sortBy==this.parent.sortBy?it:"":e[t].iconCss="_fm_modified"===this.parent.sortBy?it:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?o:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?o:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?o:"")},k.prototype.getPupupId=function(e){return this.parent.element.id+"_ddl_"+e.toLowerCase()},k.prototype.layoutChange=function(e){"Details"===this.parent.view?e.item.id===this.getPupupId("large")&&pn(this.parent,"LargeIcons"):e.item.id===this.getPupupId("details")&&pn(this.parent,"Details")},k.prototype.toolbarItemData=function(e){var t=[],i="Both";this.parent.isMobile&&(i="Overflow");for(var n=0;n<e.length;n++){var s,a=void 0,r=void 0,o=(0<this.parent.toolbarItems.length&&(r=this.getItemModel(this.parent.toolbarItems[parseInt(n.toString(),10)])),this.getId(e[n])),l=w(this.parent,e[n]),h=w(this.parent,"Tooltip-"+e[n]);switch(e[n]){case"|":a={type:"Separator"};break;case"Upload":a={id:o,text:l,tooltipText:h,prefixIcon:Rt,showTextOn:i};break;case"SortBy":var d='<span class="e-tbar-btn-text e-tbar-ddb-text">'+l+"</span>",a={id:o,tooltipText:h,template:'<button id="'+o+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+(d=r&&r.text?'<span class="e-tbar-btn-text e-tbar-ddb-text">'+r.text+"</span>":d)+"</button>"};break;case"Refresh":a={id:o,text:l,tooltipText:h,prefixIcon:_t,showTextOn:i};break;case"Selection":a={id:o,text:l,tooltipText:h,suffixIcon:Kt,overflow:"Show",align:"Right"};break;case"View":d=void 0,d=r&&r.text?r.text:w(this.parent,"View");a={id:o,tooltipText:h,prefixIcon:"Details"===this.parent.view?zt:qt,overflow:"Show",align:"Right",text:l,showTextOn:"Overflow",template:'<button id="'+o+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+d+"></button>"};break;case"Details":a={id:o,tooltipText:h,prefixIcon:Vt,overflow:"Show",align:"Right",text:l,showTextOn:"Overflow"};break;case"NewFolder":a={id:o,text:l,tooltipText:h,prefixIcon:Ft,showTextOn:i};break;case"Cut":a={id:o,text:l,tooltipText:h,prefixIcon:Mt,showTextOn:i};break;case"Copy":a={id:o,text:l,tooltipText:h,prefixIcon:kt,showTextOn:i};break;case"Paste":a={id:o,text:l,tooltipText:h,prefixIcon:Lt,showTextOn:i};break;case"Delete":a={id:o,text:l,tooltipText:h,prefixIcon:Tt,showTextOn:i};break;case"Rename":a={id:o,text:l,tooltipText:h,prefixIcon:At,showTextOn:i};break;case"Download":a={id:o,text:l,tooltipText:h,prefixIcon:Bt,showTextOn:i};break;case"SelectAll":a={id:o,text:l,tooltipText:h,prefixIcon:Ht,showTextOn:i};break;default:a={id:o,text:l,tooltipText:h,template:""}}0<this.parent.toolbarItems.length&&r?(s=Object.assign({},a,r),t.push(s)):t.push(a)}return t},k.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},k.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},k.prototype.addEventListener=function(){this.parent.on(l,this.onPropertyChanged,this),this.parent.on(m,this.onSelectionChanged,this),this.parent.on(a,this.onLayoutChange,this),this.parent.on(Ei,this.showPaste,this),this.parent.on(Pi,this.hidePaste,this),this.parent.on(ci,this.destroy,this),this.parent.on(Si,this.updateSortByButton,this)},k.prototype.reRenderToolbar=function(e){var t=this,i=[];0<this.parent.toolbarItems.length?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()})),0<i.length&&(this.items=this.toolbarItemData(this.getItems(i)),e={items:this.items},this.parent.trigger("toolbarCreate",e,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()}))},k.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)):1<this.parent.selectedItems.length&&(this.hideItems(this.multiple,!1),this.hideItems(this.selection,!0));var e,t=y.select("#"+this.getId("Selection"),this.toolbarObj.element);0<this.parent.selectedItems.length&&t&&!this.parent.enableVirtualization&&(e=void 0,e=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+w(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+w(this.parent,"Items-Selection"),y.select(".e-tbar-btn-text",t).textContent=e,this.toolbarObj.hideItem(t.parentElement,!1))},k.prototype.hideItems=function(e,t){for(var i=0;i<e.length;i++){var n=y.select("#"+this.getId(e[i]),this.parent.element);n&&this.toolbarObj.hideItem(n.parentElement,t)}},k.prototype.hideStatus=function(){var e=y.select("#"+this.getId("Selection"),this.toolbarObj.element);e&&this.toolbarObj.hideItem(e.parentElement,!0)},k.prototype.showPaste=function(){this.hideItems(["Paste"],!1)},k.prototype.hidePaste=function(){this.hideItems(["Paste"],!0)},k.prototype.onLayoutChange=function(){if(this.layoutBtnObj){this.layoutBtnObj.iconCss="Details"===this.parent.view?zt:qt;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?o:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?o:"")}},k.prototype.removeEventListener=function(){this.parent.off(l,this.onPropertyChanged),this.parent.off(m,this.onSelectionChanged),this.parent.off(a,this.onLayoutChange),this.parent.off(Ei,this.showPaste),this.parent.off(Pi,this.hidePaste),this.parent.off(ci,this.destroy),this.parent.off(Si,this.updateSortByButton)},k.prototype.getModuleName=function(){return"toolbar"},k.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=xn(this.parent,qe)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=xn(this.parent,"e-caret-hide "+qe));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":case"toolbarItems":this.reRenderToolbar(e)}},k.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.buttonObj&&this.buttonObj.destroy(),this.layoutBtnObj&&this.layoutBtnObj.destroy(),this.toolbarObj.destroy(),this.parent.refreshLayout())},k.prototype.enableItems=function(e,t){for(var i=0;i<e.length;i++){var n=y.select("#"+this.getId(e[i]),this.parent.element);n&&this.toolbarObj.enableItems(n.parentElement,t)}};R=k;function k(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()}ga.prototype.setUIVirtualization=function(){var e=this.largeIconInstance.items,t=e.slice(0,1),t=_.ListBase.createListFromJson(y.createElement,t,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(y.selectAll("."+d,t)),this.largeIconInstance.element.appendChild(t),0!==this.itemList.length&&this.largeIconInstance.element.querySelector("."+c)&&this.largeIconInstance.element.removeChild(this.largeIconInstance.element.querySelector("."+c)),this.itemCount=this.getItemCount(Object.keys(this.largeIconInstance.allItems).length),this.largeIconInstance.element.firstChild.remove(),this.largeIconInstance.items=e.slice(0,this.itemCount)},ga.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},ga.prototype.getItemCount=function(e){var t=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-right"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-left"),10),t=(this.rowItemCount=Math.floor(parseFloat(y.formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth))/(this.itemList[0].offsetWidth+t)),this.rowItemCount*Math.round(parseFloat(y.formatUnit(this.largeIconInstance.element.clientHeight))/this.itemList[0].offsetHeight));return t=e<t||0===t?e:t},ga.prototype.wireScrollEvent=function(e){e?y.EventHandler.remove(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll):y.EventHandler.add(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll,this)},ga.prototype.onVirtualUiScroll=function(){this.scrollPosition=y.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var e,t,i=this.getscrollerHeight(0);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)&&(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",i>this.scrollPosition?(t=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff),this.onNormalScroll(t,!0)):(t=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight),this.onNormalScroll(t,!1))),this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),this.scrollPosition=i,this.largeIconInstance.itemList=Array.prototype.slice.call(y.selectAll("."+d,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)},ga.prototype.getscrollerHeight=function(e){return this.largeIconInstance.element.firstElementChild.scrollTop-e<=0?0:this.largeIconInstance.element.firstElementChild.scrollTop-e},ga.prototype.onNormalScroll=function(e,t){for(var i=0;i<e;i++)this.updateUI(t)},ga.prototype.updateUI=function(e){var t=this;if(e){if(this.items=this.largeIconInstance.allItems.slice(this.renderedCount,this.renderedCount+this.rowItemCount),0<this.items.length){var i=_.ListBase.createListFromJson(y.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(y.selectAll("."+d,i)),this.itemList.forEach(function(e){t.largeIconInstance.element.firstElementChild.insertBefore(e,t.bottomElement)}),this.renderedCount=this.largeIconInstance.allItems.length>=this.renderedCount+this.rowItemCount?this.renderedCount+this.rowItemCount:this.renderedCount+this.lastRowCount;for(var n=0;n<this.rowItemCount;n++)y.detach(this.topElement.nextElementSibling)}}else{var e=void 0,s=void 0,a=(this.renderedCount===this.largeIconInstance.allItems.length?(e=this.renderedCount-(this.itemCount-this.rowItemCount+this.lastRowCount),this.renderedCount=this.renderedCount-this.lastRowCount<this.itemCount?this.itemCount:this.renderedCount-this.lastRowCount,s=!0):(e=this.renderedCount-this.itemCount,this.renderedCount=this.renderedCount-this.rowItemCount<this.itemCount?this.itemCount:this.renderedCount-this.rowItemCount),0<e-this.rowItemCount?e-this.rowItemCount:0);if(this.items=this.largeIconInstance.allItems.slice(a,e),0<this.items.length){i=_.ListBase.createListFromJson(y.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(y.selectAll("."+d,i));for(var r=this.itemList.length;0<r;r--)this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[r-1],this.topElement.nextElementSibling);for(n=0;n<(s?this.lastRowCount:this.rowItemCount);n++)y.detach(this.bottomElement.previousElementSibling)}}},ga.prototype.getModuleName=function(){return"virtualization"},ga.prototype.destroy=function(){this.filemanagerInstance.isDestroyed||y.isNullOrUndefined(this.largeIconInstance.element.firstElementChild)||this.wireScrollEvent(!0)};var ua=ga;function ga(e){this.filemanagerInstance=e,this.largeIconInstance=e.largeiconsviewModule}L.prototype.onInit=function(){var e,t,i;y.isNullOrUndefined(this.treeObj)&&(e=y.getValue(this.parent.pathId[0],this.parent.feParent),y.setValue("_fm_icon","e-fe-folder",e),t={},i=y.getValue("id",e),y.isNullOrUndefined(i)||y.setValue("data-id",i,t),S(e)||y.setValue("class",ts(e),t),y.isNullOrUndefined(t)||y.setValue("_fm_htmlAttr",t,e),this.treeObj=new B.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+Ee),this.wireEvents())},L.prototype.addDragDrop=function(){var t=this;!this.parent.isMobile&&this.treeObj&&(this.parent.allowDragAndDrop&&y.isNullOrUndefined(this.dragObj)?this.dragObj=new y.Draggable(this.treeObj.element,{cursorAt:this.parent.dragCursorPosition,dragTarget:"."+$t,distance:5,dragArea:this.parent.element,drag:Yn.bind(this,this.parent),dragStart:function(e){Bn(t.parent,e,t.dragObj)},dragStop:Hn.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!1,helper:this.dragHelper.bind(this)}):!this.parent.allowDragAndDrop&&this.dragObj&&(this.dragObj.destroy(),this.dragObj=null))},L.prototype.dragHelper=function(e){var e=e.sender.target;return e.classList.contains($t)?(e=y.closest(e,"li"),this.parent.dragPath="",this.parent.dragData=[],this.parent.activeElements=[],this.parent.activeElements=[e],this.parent.dragNodes=[],ln(this.parent,e),this.parent.dragData=this.getTreeData(e),this.parent.dragPath=this.getDragPath(e,this.parent.dragData[0].name),this.parent.dragNodes.push(this.parent.dragData[0].name),_n(this.parent),this.parent.virtualDragElement):null},L.prototype.getDragPath=function(e,t){return Tn(this.getDropPath(e,t))},L.prototype.getDropPath=function(e,t){var i=e.getAttribute("data-id");return Zi(e,this.parent.hasId?i:t,this.parent.hasId)},L.prototype.onDrowNode=function(e){e={element:e.node,fileDetails:e.nodeData,module:"NavigationPane"};this.parent.trigger("fileLoad",e)},L.prototype.addChild=function(e,t,i){var n=Sn(e),e=this.getTreeData(t);if(0<n.length&&0<e.length&&(null==n[0].filterPath||y.isNullOrUndefined(e[0])&&null==e[0].filterPath||n[0].filterPath!==e[0].filterPath)){for(var s=0,a=n;s<n.length;){a[parseInt(s.toString(),10)]._fm_icon="e-fe-folder";var r={},o=y.getValue("id",a[s]);y.isNullOrUndefined(o)||y.setValue("data-id",o,r),S(a[s])||y.setValue("class",ts(a[s]),r),y.isNullOrUndefined(r)||y.setValue("_fm_htmlAttr",r,a[s]),s++}e=y.select('[data-uid="'+t+'"]',this.treeObj.element),e=y.select("ul",e);y.isNullOrUndefined(e)&&this.treeObj.addNodes(n,t,null,i)}},L.prototype.onNodeSelecting=function(e){var t,i,n;(e.isInteracted||this.isRightClick||this.isSameNodeClicked||this.isPathDragged||this.isRenameParent)&&!this.restrictSelecting?this.renameParent||(this.parent.activeModule="navigationpane",t=this.getTreeData(y.getValue("id",e.nodeData)),e.node.getAttribute("data-uid")!==this.parent.pathId[this.parent.pathId.length-1]&&!this.isRightClick&&!this.isNodeClickCalled||this.isSameNodeClicked?(this.isNodeClickCalled=!1,this.isSameNodeClicked||(this.isSameNodeClicked=!0,n={action:e.action,fileDetails:t[0],isInteracted:e.isInteracted},this.parent.trigger("fileSelect",n)),this.isRightClick||(i={cancel:!1,fileDetails:t[0],module:"NavigationPane"},this.parent.trigger("fileOpen",i),e.cancel=i.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.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]}))):this.previousSelected[0]!==e.node.getAttribute("data-uid")&&(n={action:e.action,fileDetails:t[0],isInteracted:this.isNodeClickCalled},this.parent.trigger("fileSelect",n))):(this.restrictSelecting=!1,this.isNodeClickCalled=!1)},L.prototype.openFileOnContextMenuClick=function(e){var t=this.treeObj.getTreeData(e),t=(this.parent.selectedItems=[],this.parent.itemData=t,this.activeNode=e,{cancel:!(this.parent.activeModule="navigationpane"),fileDetails:t[0],module:"NavigationPane"});this.parent.trigger("fileOpen",t),this.isNodeClickCalled=!0,t.cancel||($i(e,this.parent.itemData[0],this.parent),C(this.parent,this.isPathDragged?Li:g,this.parent.path),this.parent.visitedItem=e,this.isPathDragged=this.isRenameParent=this.isRightClick=!1,this.treeObj.setProperties({selectedNodes:[e.getAttribute("data-uid")]}))},L.prototype.onNodeSelected=function(e){var t;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",t=this.getTreeData(y.getValue("id",e.nodeData)),this.parent.selectedItems=[],this.parent.itemData=t,t=this.parent.path,!this.isRightClick&&this.isSameNodeClicked?$i(e.node,this.parent.itemData[0],this.parent):(this.parent.pathId=en(e.node),this.parent.visitedItem=e.node),e.node.querySelector("."+Yt)&&null===e.node.querySelector("."+d)&&(this.expandNodeTarget="add"),t!==this.parent.path&&(!this.isRightClick&&this.isSameNodeClicked&&(C(this.parent,this.isPathDragged?Li:g,this.parent.path),this.isNodeClickCalled=!0),this.parent.visitedItem=e.node),this.isPathDragged=this.isRenameParent=this.isRightClick=this.isSameNodeClicked=!1):this.parent.pathId=en(e.node)},L.prototype.onPathDrag=function(e){this.isPathDragged=!0,this.selectResultNode(e[0])},L.prototype.onNodeExpand=function(e){var t,i,n;(e.isInteracted||this.isDrag)&&null===e.node.querySelector("."+d)&&(this.isNodeExpandCalled=!0,i=y.getValue("text",e.nodeData),n=e.node.getAttribute("data-id"),t=!y.isNullOrUndefined(n),i=y.isNullOrUndefined(n)?i:n,n=Zi(e.node,i,t),this.expandNodeTarget=e.node.getAttribute("data-uid"),this.parent.expandedId=this.expandNodeTarget,this.parent.itemData=this.getTreeData(y.getValue("id",e.nodeData)),this.parent.pathId.push(y.getValue("id",e.nodeData)),C(this.parent,Ci,n))},L.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null,this.isNodeExpandCalled=!1},L.prototype.onNodeClicked=function(e){var t;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.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]})):e.node.getAttribute("data-uid")===this.treeObj.selectedNodes[0]&&0!==this.parent.selectedItems.length?(this.parent.setProperties({selectedItems:[]},!0),t="LargeIcons"===this.parent.view?"largeiconsview":"detailsview",this.parent.notify(l,{module:t,newProp:{selectedItems:[]}})):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.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]}))},L.prototype.onNodeEditing=function(e){y.isNullOrUndefined(e.innerHtml)||(e.cancel=!0)},L.prototype.onPathChanged=function(e){this.parent.isCut=!1;var t,i=y.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feFiles);"add"===this.expandNodeTarget&&(t=y.select('[data-uid="'+this.treeObj.selectedNodes[0]+'"]',this.treeObj.element),t=y.isNullOrUndefined(t)?null:y.select("."+tt,t),y.isNullOrUndefined(t)&&this.addChild(e.files,this.treeObj.selectedNodes[0],!this.expandTree),this.expandNodeTarget=""),this.expandTree=!1,y.isNullOrUndefined(i)&&y.setValue(this.parent.pathId[this.parent.pathId.length-1],e.files,this.parent.feFiles),this.parent.uploadObj.directoryUpload&&!this.parent.hasId&&this.updateTree(e)},L.prototype.updateTree=function(e){var t;this.treeObj&&(t=this.treeObj.selectedNodes[0],this.updateTreeNode(e,t))},L.prototype.updateTreeNode=function(e,t){var i=-1!==this.treeObj.expandedNodes.indexOf(t);this.removeChildNodes(t),this.addChild(e.files,t,!i)},L.prototype.removeChildNodes=function(e){e=y.select('[data-uid="'+e+'"]',this.treeObj.element),e=y.select("."+tt,e),e=e?Array.prototype.slice.call(e.children):null;e&&this.treeObj.removeNodes(e)},L.prototype.onOpenEnd=function(e){var t=this.parent.pathId[this.parent.pathId.length-1];this.treeObj.expandAll(this.treeObj.selectedNodes),this.treeObj.setProperties({selectedNodes:[t]}),this.expandNodeTarget="add",this.onPathChanged(e)},L.prototype.onOpenInit=function(e){"navigationpane"===this.parent.activeModule&&e.target.querySelector("."+Yt)&&this.treeObj.expandAll(this.treeObj.selectedNodes)},L.prototype.onInitialEnd=function(e){this.onInit(),this.addChild(e.files,y.getValue("_fm_id",e.cwd),!1)},L.prototype.onFinalizeEnd=function(e){this.onInit();var t=y.getValue("_fm_id",e.cwd);this.addChild(e.files,t,!1),this.treeObj.setProperties({selectedNodes:[this.parent.pathId[this.parent.pathId.length-1]]})},L.prototype.onCreateEnd=function(e){this.updateTree(e)},L.prototype.onSelectedData=function(){"navigationpane"===this.parent.activeModule&&this.updateItemData()},L.prototype.onDeleteInit=function(){var e;"navigationpane"===this.parent.activeModule&&(this.updateActionData(),e=y.getValue("name",this.parent.itemData[0]),ms(this.parent,[e],this.parent.path,"delete"))},L.prototype.onDeleteEnd=function(e){var t;"navigationpane"===this.parent.activeModule&&(t=this.treeObj.selectedNodes[0],t=y.select('[data-uid="'+t+'"]',this.treeObj.element),t=y.closest(t,"."+tt).parentElement,this.treeObj.selectedNodes=[t.getAttribute("data-uid")],this.treeObj.dataBind()),this.updateTree(e)},L.prototype.onRefreshEnd=function(e){this.updateTree(e)},L.prototype.onRenameInit=function(){"navigationpane"===this.parent.activeModule&&this.updateRenameData()},L.prototype.onRenameEndParent=function(e){var t,i=this.renameParent||this.parent.pathId[this.parent.pathId.length-1];this.expandTree=-1!==this.treeObj.expandedNodes.indexOf(this.treeObj.selectedNodes[0]),this.updateTreeNode(e,i),this.parent.expandedId=null,this.renameParent?this.renameParent=null:(e=[],this.parent.hasId?e=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where("id","equal",this.parent.renamedId,!1)):0<(t=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",this.parent.renameText,!1))).length&&(e=new h.DataManager(t).executeLocal((new h.Query).where("_fm_pId","equal",i,!1))),0<e.length&&(t=0<this.previousSelected.length&&0!==this.treeObj.getTreeData(this.previousSelected[0]).length?this.previousSelected[0]:y.getValue(this.treeObj.fields.id,e[0]),this.treeObj.selectedNodes=[t],this.treeObj.dataBind(),this.updateItemData()))},L.prototype.onRenameEnd=function(e){var t,i;""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?(i=this.treeObj.getTreeData(),t=[],this.parent.hasId?t=new h.DataManager(i).executeLocal((new h.Query).where("id","equal",this.parent.renamedId,!1)):0<(i=new h.DataManager(i).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",this.parent.currentItemText,!1))).length&&(t=new h.DataManager(i).executeLocal((new h.Query).where("filterPath","equal",this.parent.filterPath,!1))),0<t.length&&(this.renameParent=y.getValue(this.treeObj.fields.parentID,t[0]),this.parent.expandedId=this.renameParent,this.parent.itemData=this.getTreeData(this.renameParent),C(this.parent,Ni,this.parent.filterPath.replace(/\\/g,"/")))):this.updateTree(e)},L.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":C(this.parent,u,this.parent.path),e.oldProp.navigationPaneSettings.sortOrder!==e.newProp.navigationPaneSettings.sortOrder&&(this.treeObj.sortOrder=e.newProp.navigationPaneSettings.sortOrder)}},L.prototype.onDownLoadInit=function(){this.doDownload()},L.prototype.onSelectionChanged=function(e){this.treeObj.setProperties({selectedNodes:[e.selectedNode]})},L.prototype.onClearPathInit=function(e){this.removeChildNodes(e.selectedNode)},L.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)},L.prototype.getMoveNames=function(e,t,i){for(var n=[],s=0;s<e.length;s++)if(!e[s].isFile&&!this.parent.hasId)for(var a,r=e[s].previousName,o=(t&&(a=(i+=e[s].previousName).lastIndexOf("/"),r=i.substring(a+1),i=i.substring(0,a+1)),new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",r,!1))),l=0;l<o.length;l++)if(y.getValue("filterPath",o[l]).replace(/\\/g,"/")===i){n.push(y.getValue(this.treeObj.fields.id,o[l]));break}return n},L.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)},L.prototype.selectResultNode=function(t){var e,i;this.parent.hasId?(i=this.treeObj.getTreeData().filter(function(e){return e.name===t.name})[0],this.treeObj.selectedNodes=[y.getValue("_fm_id",i)],this.treeObj.dataBind()):(i=y.getValue("filterPath",t),e=y.getValue("name",t),0<(e=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",e,!1))).length&&0<(e=new h.DataManager(e).executeLocal((new h.Query).where("filterPath","equal",i,!1))).length&&(i=y.getValue(this.treeObj.fields.id,e[0]),this.treeObj.selectedNodes=[i],this.treeObj.dataBind()))},L.prototype.onDropPath=function(e){this.onpasteEnd(e),this.selectResultNode(this.parent.dropData),this.parent.isDropEnd=!this.parent.isPasteError},L.prototype.onpasteEnd=function(e){var t,i=[];this.parent.hasId?i=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where("id","equal",y.getValue("id",e.cwd),!1)):0<(t=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",y.getValue("name",e.cwd),!1))).length&&(i=new h.DataManager(t).executeLocal((new h.Query).where("filterPath","equal",y.getValue("filterPath",e.cwd),!1))),0<i.length&&(t=y.getValue(this.treeObj.fields.id,i[0]),i=-1===this.treeObj.expandedNodes.indexOf(t),this.removeChildNodes(t),this.addChild(e.files,t,i)),this.parent.expandedId=null,this.onPathChanged(e),this.parent.isDragDrop&&this.checkDropPath(e)},L.prototype.checkDropPath=function(e){j(this.parent)&&(this.parent.path===this.parent.dropPath||"navigationpane"===this.parent.targetModule)||(this.parent.hasId?(this.parent.isDropEnd=!this.parent.isPasteError,Vn(this.parent)):-1===this.parent.dropPath.indexOf(An(this.parent,e))?(this.parent.isDropEnd=!1,Vn(this.parent)):this.parent.isDropEnd=!this.parent.isPasteError)},L.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&this.updateItemData(),this.moveNames=[];for(var e=this.parent.isDragDrop||j(this.parent)?this.parent.dragData:this.parent.actionRecords,t=0;t<e.length;t++)!1===y.getValue("isFile",e[t])&&this.moveNames.push(y.getValue("_fm_id",e[t]))},L.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.activeElements=[this.activeNode])},L.prototype.addEventListener=function(){this.parent.on(l,this.onPropertyChanged,this),this.parent.on(Hi,this.onDownLoadInit,this),this.parent.on(ni,this.onInitialEnd,this),this.parent.on(u,this.onFinalizeEnd,this),this.parent.on(g,this.onPathChanged,this),this.parent.on(Li,this.onpasteEnd,this),this.parent.on(Ti,this.onCutEnd,this),this.parent.on(ki,this.onpasteInit,this),this.parent.on(Ci,this.onNodeExpanded,this),this.parent.on(si,this.onCreateEnd,this),this.parent.on(Ri,this.onSelectedData,this),this.parent.on(oi,this.onDeleteInit,this),this.parent.on(li,this.onDeleteEnd,this),this.parent.on(hi,this.onRefreshEnd,this),this.parent.on(Fi,this.onSelectionChanged,this),this.parent.on(vi,this.onOpenInit,this),this.parent.on(Ii,this.onOpenEnd,this),this.parent.on(ci,this.destroy,this),this.parent.on(xi,this.onRenameInit,this),this.parent.on(b,this.onRenameEnd,this),this.parent.on(Ni,this.onRenameEndParent,this),this.parent.on(Di,this.onClearPathInit,this),this.parent.on(Mi,this.oncutCopyInit,this),this.parent.on(Bi,this.onDropInit,this),this.parent.on(ji,this.onMenuItemData,this),this.parent.on(zi,this.onDragEnd,this),this.parent.on(Wi,this.onDragging,this),this.parent.on(qi,this.onDropPath,this),this.parent.on(f,this.onDetailsInit,this),this.parent.on(ri,this.onPathDrag,this)},L.prototype.removeEventListener=function(){this.parent.off(ni,this.onInitialEnd),this.parent.off(Hi,this.onDownLoadInit),this.parent.off(u,this.onFinalizeEnd),this.parent.off(Ri,this.onSelectedData),this.parent.off(l,this.onPropertyChanged),this.parent.off(g,this.onPathChanged),this.parent.off(Li,this.onpasteEnd),this.parent.off(Ti,this.onCutEnd),this.parent.off(ki,this.onpasteInit),this.parent.off(Fi,this.onSelectionChanged),this.parent.off(Ci,this.onNodeExpanded),this.parent.off(si,this.onCreateEnd),this.parent.off(hi,this.onRefreshEnd),this.parent.off(vi,this.onOpenInit),this.parent.off(Ii,this.onOpenEnd),this.parent.off(ci,this.destroy),this.parent.off(xi,this.onRenameInit),this.parent.off(b,this.onRenameEnd),this.parent.off(Ni,this.onRenameEndParent),this.parent.off(Di,this.onClearPathInit),this.parent.off(oi,this.onDeleteInit),this.parent.off(li,this.onDeleteEnd),this.parent.off(Mi,this.oncutCopyInit),this.parent.off(Bi,this.onDropInit),this.parent.off(zi,this.onDragEnd),this.parent.off(Wi,this.onDragging),this.parent.off(qi,this.onDropPath),this.parent.off(f,this.onDetailsInit),this.parent.off(ji,this.onMenuItemData),this.parent.off(ri,this.onPathDrag)},L.prototype.onDetailsInit=function(){var e;this.parent.activeModule===this.getModuleName()&&(e=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.itemData=e)},L.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(e=y.closest(e.target,"li"),this.parent.itemData=this.getTreeData(e.getAttribute("data-uid")))},L.prototype.onDragging=function(e){var t,e=y.closest(e.target,"li");e.classList.contains("e-node-collapsed")&&(this.isDrag=!0,t=parseInt(e.getAttribute("aria-level"),10),this.treeObj.expandAll([e.getAttribute("data-uid")],t+1),this.isDrag=!1)},L.prototype.onDropInit=function(e){this.parent.targetModule===this.getModuleName()&&(e=y.closest(e.target,"li"),this.parent.dropData=this.getTreeData(e)[0],this.parent.dropPath=this.getDropPath(e,y.getValue("name",this.parent.dropData)))},L.prototype.getModuleName=function(){return"navigationpane"},L.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.treeObj&&(this.unWireEvents(),this.treeObj.destroy()))},L.prototype.wireEvents=function(){this.keyboardModule=new y.KeyboardEvents(this.treeObj.element,{keyAction:this.keyDown.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},L.prototype.unWireEvents=function(){this.keyboardModule.destroy()},L.prototype.keyDown=function(e){var t;switch(e.action){case"altEnter":this.parent.notify(f,{}),fs(this.parent,[],this.parent.path,"details");break;case"esc":an(this.parent);break;case"del":this.parent.pathId[0]!==this.activeNode.getAttribute("data-uid")&&(this.updateItemData(),S(this.parent.itemData[0])?(this.removeNodes=[],x(this.parent,"Delete")):D(this.parent,this.parent.itemData[0],v));break;case"ctrlC":mn(this.parent);break;case"ctrlV":this.parent.folderPath="",Mn(this.parent);break;case"ctrlX":fn(this.parent);break;case"shiftF10":this.updateItemData(),as(this.parent.itemData[0])?0!==this.parent.selectedItems.length&&this.doDownload():D(this.parent,this.parent.itemData[0],Xi);break;case"f2":0===this.parent.selectedItems.length&&(S(t=this.getTreeData(this.treeObj.selectedNodes[0])[0])?(this.updateRenameData(),x(this.parent,"Rename")):D(this.parent,t,v))}},L.prototype.getTreeData=function(e){for(var t=this.treeObj.getTreeData(e),i=0;i<t.length;i++)y.isNullOrUndefined(y.getValue("hasChild",t[i]))&&y.setValue("hasChild",!1,t[i]);return t},L.prototype.updateRenameData=function(){this.updateItemData(),this.parent.currentItemText=y.getValue("name",this.parent.itemData[0])},L.prototype.updateItemData=function(){var e=this.getTreeData(this.treeObj.selectedNodes[0])[0];this.parent.itemData=[e],this.parent.isFile=!1},L.prototype.updateActionData=function(){this.updateItemData();$i(y.select('[data-uid="'+this.parent.pathId[this.parent.pathId.length-1]+'"]',this.treeObj.element),this.parent.itemData[0],this.parent);var e=Tn(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},L.prototype.doDownload=function(){var e=Tn(this.parent.path),t=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":y.getValue("name",this.parent.itemData[0]);Us(this.parent,e,[t])};var ma=L;function L(e){this.removeNodes=[],this.moveNames=[],this.previousSelected=[],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.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"}}T.prototype.render=function(e){var t,i,n,s,a=this;this.parent.enablePersistence&&(t=window.localStorage.getItem("grid"+this.parent.element.id+"_grid"),y.isNullOrUndefined(t)||(t=JSON.parse(t),!y.isNullOrUndefined(t)&&0<Object.keys(t).length&&"sortSettings"in t&&(delete t.sortSettings,window.localStorage.setItem("grid"+this.parent.element.id+"_grid",JSON.stringify(t))))),r.showSpinner(this.parent.element),"Details"===this.parent.view&&(y.removeClass([this.parent.element],Ye),t=On(this.parent,e.files),this.checkNameWidth(),i=this.getColumns(),n=void 0,s=!y.isNullOrUndefined(i)&&-1!==i.findIndex(function(e){return e.field===a.parent.sortBy}),this.parent.isMobile||!s?n=[]:"None"!==this.parent.sortOrder&&(n=[{direction:this.parent.sortOrder,field:this.parent.sortBy}]),this.gridObj=new F.Grid({dataSource:t,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:n},columns:i,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(){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+Pe),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e)},T.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()},T.prototype.getGridHeight=function(){var e=y.select("#"+this.parent.element.id+Fe,this.parent.element),t=y.select("#"+this.parent.element.id+Ve,this.parent.element);return e.offsetHeight-t.offsetHeight-36},T.prototype.checkNameWidth=function(){var e=this.parent.detailsViewSettings.columns;this.isNameWidth=!1;for(var t=0;t<e.length;t++)if("name"===e[t].field)return void(this.isNameWidth=!y.isNullOrUndefined(e[t].width))},T.prototype.adjustWidth=function(e,t){if(!this.isNameWidth||"name"!==t)for(var i,n=0;n<e.length;n++)e[n].field===t&&(i=void 0,i=""!==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[n].width=i)},T.prototype.getColumns=function(){var i,n=this.parent.enableHtmlSanitizer;if(this.parent.isMobile)i=[{field:"name",headerText:w(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:y.initializeCSPTemplate(function(e){return'<div class="e-fe-text">'+(n?y.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{i=y.extend([],this.parent.detailsViewSettings.columns,null,!0),this.adjustWidth(i,"name");for(var s=this,e=0,t=i.length;e<t;e++)!function(e){var t;i[e].headerText=w(s.parent,i[e].headerText),"name"!==i[e].field||y.isNullOrUndefined(i[e].template)||"function"==typeof i[e].template||(t=i[e].template,i[e].template=y.initializeCSPTemplate(function(e){e=n?y.SanitizeHtmlHelper.sanitize(e.name):e.name;return t.replace(/\${name}/g,e)}))}(e)}var a=this.parent.isMobile||this.parent.isBigger?"54":"46",a={field:"type",width:a,minWidth:a,template:y.initializeCSPTemplate(function(e){return'<span class="e-fe-icon '+e._fm_iconClass+'"></span>'}),allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:y.initializeCSPTemplate(function(){return"<span class='e-fe-icon e-fe-folder'></span>"})};i.unshift(a),this.parent.showItemCheckBoxes&&(a={type:"checkbox",width:a=this.parent.isBigger?"36":"26",minWidth:a,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1},this.parent.isMobile?i.push(a):i.unshift(a));for(e=0,t=i.length;e<t;e++)i[e].disableHtmlEncode=!this.parent.enableHtmlSanitizer;return this.parent.enableRangeSelection&&i.push({field:"name",visible:!1,customAttributes:{class:"e-drag-text"}}),i},T.prototype.adjustHeight=function(){var e,t,i;this.gridObj&&(i=y.select("#"+this.parent.element.id+Fe,this.parent.element),e=y.select("#"+this.parent.element.id+Ve,this.parent.element),t=y.select("."+wt,this.parent.element),i=i.offsetHeight-e.offsetHeight-t.offsetHeight,this.gridObj.height=i,this.gridObj.dataBind())},T.prototype.renderCheckBox=function(){this.gridObj.columns=this.getColumns(),this.isColumnRefresh=!0,this.gridObj.refreshColumns()},T.prototype.onRowDataBound=function(e){var t=y.select(".e-fe-grid-name",e.row);if(!t)for(var i=this.parent.detailsViewSettings.columns,n=0;n<i.length;n++)if("name"===i[n].field){t=e.row.children[this.parent.allowMultiSelection?n+2:n+1];break}if(t&&t.setAttribute("title",y.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(y.getValue("name",e.data))&&on(e.row),!this.parent.showFileExtension&&y.getValue("isFile",e.data)&&(s=y.getValue("name",e.data),s=e.row.querySelector('[title= "'+s+'"]'))&&(a=y.getValue("name",e.data),r=y.getValue("type",e.data),-1!==a.indexOf(r))&&(s.innerHTML=a.substr(0,a.length-r.length)),void 0!==y.getValue("size",e.data)&&e.row.querySelector(".e-fe-size")){var s=e.row.querySelector(".e-fe-size"),a=void 0;if(y.getValue("isFile",e.data)){for(var r=y.getValue("size",e.data),o=new y.Internationalization(this.parent.locale),l=void 0,i=this.parent.detailsViewSettings.columns,n=0;n<i.length;n++)if("size"===i[n].field){l=y.isNullOrUndefined(i[n].format)?"n":i[n].format.toString();break}a=o.formatNumber(r/1024,{format:l})+" "+w(this.parent,"KB")}else a="";s.innerHTML=a}if(this.parent.isMobile&&void 0!==y.getValue("_fm_modified",e.data)&&e.row.querySelector(".e-fe-date")){for(var r=e.row.querySelector(".e-fe-date"),o=new y.Internationalization(this.parent.locale),i=this.parent.detailsViewSettings.columns,h=void 0,n=0;n<i.length;n++)if("dateModified"===i[n].field){h=i[n].format;break}s=o.formatDate(new Date(y.getValue("_fm_modified",e.data)),h);r.innerHTML=s}a=e.row.querySelector("."+ht),a&&a.classList.add("e-small"),S(e.data)||(e.row.className+=" "+ts(e.data)),o={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",o)},T.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 t=this.gridObj.getSelectedRowIndexes(),i=t.length;for(this.sortSelectedNodes=[];0<i;){var n=this.gridObj.getRowsObject()[t[i-1]].data;this.sortSelectedNodes.push(y.getValue(this.parent.hasId?"id":"name",n)),i--}}this.parent.notify(Si,{})}},T.prototype.onHeaderCellInfo=function(e){e=e.node.querySelector("."+ht);e&&e.classList.add("e-small")},T.prototype.onBeforeDataBound=function(e){var t=this,i=(r.showSpinner(this.parent.element),this.parent.detailsViewSettings.columns.find(function(e){return e.field===t.parent.sortBy}));!i||"sortComparer"in i||(i=On(this.parent,this.parent.enableVirtualization?e.result:this.gridObj.dataSource),e.result=i)},T.prototype.onDataBound=function(){var e,t;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&&!y.isNullOrUndefined(this.gridObj.getDataRows())&&0<this.gridObj.getDataRows().length&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.parent.pasteNodes),this.isPasteOperation=!1)),this.parent.createdItem&&(this.selectRecords([y.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="",y.select(".e-headercontent",e).style.borderRightWidth="0",(t=this.gridObj.getContent().querySelector(".e-content")).style.overflowY="",t.classList.add("e-scrollShow")):(e=this.gridObj.getHeaderContent(),this.parent.enableRtl?e.style.paddingLeft="16px":e.style.paddingRight="16px",(t=this.gridObj.getContent().querySelector(".e-content")).classList.remove("e-scrollShow")),this.isRendered=!0,this.parent.isLayoutChange=!1,r.hideSpinner(this.parent.element),this.checkEmptyDiv(this.emptyArgs),this.isInteracted=!!this.isLoaded||this.isInteracted,this.isLoaded=!1},T.prototype.selectRecords=function(e){for(var t=this.gridObj.getCurrentViewRecords(),i=[],n=0,s=t.length;n<s;n++){var a=this.parent.hasId?y.getValue("id",t[n]):In(this.parent,t[n]);-1!==e.indexOf(a)?i.push(n):this.parent.showFileExtension||this.parent.hasId||!a.includes(".")||(a=a.split(".").slice(0,-1).join("."),-1!==e.indexOf(a)&&i.push(n))}0!==i.length&&(this.gridObj.selectRows(i),this.addFocus(this.gridObj.selectedRowIndex))},T.prototype.addSelection=function(e){var t=this.gridObj.getCurrentViewRecords(),i=[];this.parent.hasId?i=new h.DataManager(t).executeLocal((new h.Query).where("id","equal",this.parent.renamedId,!1)):0<(e=new h.DataManager(t).executeLocal((new h.Query).where("name","equal",y.getValue("name",e),!1))).length&&(i=new h.DataManager(e).executeLocal((new h.Query).where("filterPath","equal",this.parent.filterPath,!1))),0<i.length&&(e=t.indexOf(i[0]),this.gridObj.selectRows([e]))},T.prototype.onSortColumn=function(){"None"!==this.parent.sortOrder?this.gridObj.sortModule.sortColumn(this.parent.sortBy,this.parent.sortOrder):this.gridObj.dataSource=On(this.parent,this.gridObj.dataSource),0!==this.element.querySelector(".e-content").scrollTop&&this.gridObj.freezeRefresh()},T.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t,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":y.isNullOrUndefined(this.gridObj)||(this.checkNameWidth(),t=this.getColumns(),this.gridObj.columns=t,this.gridObj.allowResizing=this.parent.detailsViewSettings.columnResizing,this.gridObj.dataBind(),this.gridObj.refreshColumns());break;case"selectedItems":this.interaction=!1,0!==this.parent.selectedItems.length?(this.parent.allowMultiSelection||(t=this.parent.selectedItems.slice(this.parent.selectedItems.length-1),this.parent.setProperties({selectedItems:t},!0)),this.selectRecords(this.parent.selectedItems),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)):y.isNullOrUndefined(this.gridObj)||(this.gridObj.clearSelection(),this.interaction=!0);break;case"showFileExtension":case"showHiddenItems":C(this.parent,g,this.parent.path);break;case"showItemCheckBoxes":case"allowMultiSelection":y.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":pn(this.parent,"Details");break;case"width":this.onDetailsResize()}},T.prototype.onPathChanged=function(e){this.parent.isCut=!1;var t=this.parent.detailsViewSettings.columns.find(function(e){return"filterPath"===e.field});(""===this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.gridObj||!y.isNullOrUndefined(t)&&!y.isNullOrUndefined(t.hideAtMedia)&&""!==t.hideAtMedia)&&(this.parent.searchedItems=[],this.parent.isFiltered?this.updatePathColumn():this.removePathColumn(!1)),I(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,r.showSpinner(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=On(this.parent,e.files),this.gridObj.freezeRefresh(),this.parent.isReact)&&this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this),this.emptyArgs=e},T.prototype.updatePathColumn=function(){var e=this.gridObj.columns.length,t=JSON.parse(JSON.stringify(this.gridObj.columns));t[e-1].field&&"filterPath"!==t[e-1].field&&!this.parent.isMobile&&(t={field:"filterPath",headerText:w(this.parent,"Path"),minWidth:180,width:"auto"},this.gridObj.columns.push(t),this.adjustWidth(this.gridObj.columns,"filterPath"),this.adjustWidth(this.gridObj.columns,"name"),this.isColumnRefresh=!0,this.gridObj.refreshColumns())},T.prototype.checkEmptyDiv=function(e){var t=On(this.parent,e.files);0!==t.length||y.isNullOrUndefined(this.element.querySelector("."+xt))?0!==t.length&&this.element.querySelector("."+c)&&(this.element.querySelector("."+xt).querySelector("."+c)?(t=this.element.querySelector("."+xt).querySelector("."+c),this.element.querySelector("."+xt).removeChild(t)):this.element.removeChild(this.element.querySelector("."+c))):Dn(this.parent,this.element,e)},T.prototype.onOpenInit=function(){var e;"detailsview"===this.parent.activeModule&&(e=this.gridObj.getSelectedRecords()[0],this.openContent(e))},T.prototype.DblClickEvents=function(e){this.gridObj.selectRows([e.rowIndex]),e.rowData&&(e=JSON.parse(JSON.stringify(e.rowData)),this.openContent(e))},T.prototype.openContent=function(i){var n=this;is(i)?this.parent.trigger("fileOpen",{cancel:!1,fileDetails:i,module:"DetailsView"},function(e){var t;e.cancel||(e=y.getValue("name",i),y.getValue("isFile",i)?bn(i)===bt&&(t=yn(n.parent,i),sa(n.parent,e,t)):(""!==n.parent.breadcrumbbarModule.searchObj.element.value||n.parent.isFiltered?Rn(n.parent,i):(t=y.getValue("id",i),n.parent.oldPath=n.parent.path,t=n.parent.path+(y.isNullOrUndefined(t)?e:t)+"/",n.parent.setProperties({path:t},!0),n.parent.pathNames.push(e),n.parent.pathId.push(y.getValue("_fm_id",i)),n.parent.itemData=[i],gn(n.parent)),n.parent.isFiltered=!1),n.element.focus(),n.parent.enableVirtualization&&n.parent.element.querySelector("#"+n.parent.element.id+ke).focus())}):D(this.parent,i,Gi)},T.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=On(this.parent,e.files),this.parent.notify(Ai,{}),this.gridObj.element.classList.remove(Xt),this.isInteracted=!1,this.gridObj.clearSelection(),""!==this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.onSearchFiles(e),this.adjustHeight(),0<this.gridObj.sortSettings.columns.length)&&this.gridObj.sortSettings.columns[0].field!==this.parent.sortBy&&"None"!==this.parent.sortOrder&&this.gridObj.sortColumn(this.parent.sortBy,this.parent.sortOrder)},T.prototype.onSearchFiles=function(e){"Details"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(m,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},T.prototype.removePathColumn=function(e){var t=this.gridObj.columns.length,i=JSON.parse(JSON.stringify(this.gridObj.columns));i[t-1].field&&"filterPath"===i[t-1].field&&(y.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=On(this.parent,this.gridObj.dataSource),this.parent.notify(Si,{})),this.gridObj.columns.pop(),e||(this.isColumnRefresh=!0,this.gridObj.refreshColumns()))},T.prototype.onFinalizeEnd=function(e){"Details"===this.parent.view&&(this.gridObj?this.onPathChanged(e):this.render(e))},T.prototype.onCreateEnd=function(e){"Details"===this.parent.view&&this.onPathChanged(e)},T.prototype.onRenameInit=function(){"detailsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},T.prototype.onSelectedData=function(){"detailsview"===this.parent.activeModule&&(this.parent.itemData=this.gridObj.getSelectedRecords())},T.prototype.onDeleteInit=function(){"detailsview"===this.parent.activeModule&&ms(this.parent,this.parent.selectedItems,this.parent.path,"delete")},T.prototype.onDeleteEnd=function(e){"Details"===this.parent.view&&(this.onPathChanged(e),this.parent.setProperties({selectedItems:[]},!0))},T.prototype.onRefreshEnd=function(e){"Details"===this.parent.view&&(this.isInteracted=!1,this.removePathColumn(!1),this.gridObj.dataSource=On(this.parent,e.files),this.emptyArgs=e)},T.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(Xt)},T.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)},T.prototype.onClearAllInit=function(){"Details"===this.parent.view&&(this.removeSelection(),this.interaction=!0)},T.prototype.onSelectionChanged=function(){y.removeClass([this.element],ei),0<this.parent.selectedItems.length&&y.addClass([this.element],ei)},T.prototype.onLayoutRefresh=function(){"Details"===this.parent.view&&this.adjustHeight()},T.prototype.onBeforeRequest=function(){this.isRendered=!1},T.prototype.onAfterRequest=function(){this.isRendered=!0},T.prototype.onUpdateSelectionData=function(){"Details"===this.parent.view&&(this.parent.itemData=this.gridObj.getSelectedRecords())},T.prototype.addEventListener=function(){this.parent.on(u,this.onFinalizeEnd,this),this.parent.on(ci,this.destroy,this),this.parent.on(a,this.onLayoutChange,this),this.parent.on(g,this.onPathChanged,this),this.parent.on(si,this.onCreateEnd,this),this.parent.on(Bi,this.onDropInit,this),this.parent.on(f,this.onDetailsInit,this),this.parent.on(hi,this.onRefreshEnd,this),this.parent.on(yi,this.onSearchFiles,this),this.parent.on(Yi,this.onMethodCall,this),this.parent.on(bi,this.onActionFailure,this),this.parent.on(l,this.onPropertyChanged,this),this.parent.on(oi,this.onDeleteInit,this),this.parent.on(li,this.onDeleteEnd,this),this.parent.on(Ri,this.onSelectedData,this),this.parent.on(xi,this.onRenameInit,this),this.parent.on(b,this.onPathChanged,this),this.parent.on(vi,this.onOpenInit,this),this.parent.on(Vi,this.onSortColumn,this),this.parent.on(Ii,this.onPathChanged,this),this.parent.on(ai,this.onPathChanged,this),this.parent.on(ki,this.onPasteInit,this),this.parent.on(Ai,this.onHideLayout,this),this.parent.on(Oi,this.onSelectAllInit,this),this.parent.on(wi,this.onClearAllInit,this),this.parent.on(Ui,this.onPathColumn,this),this.parent.on(m,this.onSelectionChanged,this),this.parent.on(ui,this.onBeforeRequest,this),this.parent.on(mi,this.onAfterRequest,this),this.parent.on(Li,this.onpasteEnd,this),this.parent.on(Mi,this.oncutCopyInit,this),this.parent.on(ji,this.onMenuItemData,this),this.parent.on(di,this.onDetailsResizeHandler,this),this.parent.on(pi,this.onDetailsResize,this),this.parent.on(fi,this.onLayoutRefresh,this),this.parent.on(qi,this.onDropPath,this),this.parent.on(Ki,this.onUpdateSelectionData,this)},T.prototype.removeEventListener=function(){this.parent.off(u,this.onFinalizeEnd),this.parent.off(ci,this.destroy),this.parent.off(a,this.onLayoutChange),this.parent.off(g,this.onPathChanged),this.parent.off(ki,this.onPasteInit),this.parent.off(si,this.onCreateEnd),this.parent.off(hi,this.onRefreshEnd),this.parent.off(yi,this.onSearchFiles),this.parent.off(Yi,this.onMethodCall),this.parent.off(bi,this.onActionFailure),this.parent.off(l,this.onPropertyChanged),this.parent.off(xi,this.onRenameInit),this.parent.off(b,this.onPathChanged),this.parent.off(ai,this.onPathChanged),this.parent.off(vi,this.onOpenInit),this.parent.off(Vi,this.onSortColumn),this.parent.off(Ii,this.onPathChanged),this.parent.off(Ai,this.onHideLayout),this.parent.off(Oi,this.onSelectAllInit),this.parent.off(wi,this.onClearAllInit),this.parent.off(oi,this.onDeleteInit),this.parent.off(li,this.onDeleteEnd),this.parent.off(Ui,this.onPathColumn),this.parent.off(m,this.onSelectionChanged),this.parent.off(ui,this.onBeforeRequest),this.parent.off(mi,this.onAfterRequest),this.parent.off(Li,this.onpasteEnd),this.parent.off(Mi,this.oncutCopyInit),this.parent.off(Bi,this.onDropInit),this.parent.off(Ri,this.onSelectedData),this.parent.off(f,this.onDetailsInit),this.parent.off(ji,this.onMenuItemData),this.parent.off(di,this.onDetailsResizeHandler),this.parent.off(pi,this.onDetailsResize),this.parent.off(fi,this.onLayoutRefresh),this.parent.off(qi,this.onDropPath),this.parent.off(Ki,this.onUpdateSelectionData)},T.prototype.onActionFailure=function(){this.interaction=!0},T.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=[this.gridObj.getRowInfo(e.target).rowData])},T.prototype.onPasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""!==this.parent.folderPath?this.gridObj.getSelectedRecords():[O(this.parent)])},T.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.parent.itemData=this.gridObj.getSelectedRecords():this.parent.itemData=[y.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},T.prototype.dragHelper=function(e){var t,i,e=e.sender.target.closest("tr.e-row");return e?(e.getElementsByClassName("e-fe-text")[0]?t=this.parent.hasId?this.gridObj.getRowInfo(e).rowData.id:e.getElementsByClassName("e-fe-text")[0].innerText:e.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling&&(t=this.parent.hasId?this.gridObj.getRowInfo(e).rowData.id:e.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText),e&&!e.querySelector(".e-active")&&this.selectRecords([t]),ln(this.parent,e),this.parent.activeElements=[],this.parent.dragData=[],this.parent.dragData=this.gridObj.getSelectedRecords(),(i=0===this.parent.dragData.length&&e?this.gridObj.getRowInfo(e):i)&&this.parent.dragData.push(i.rowData),this.parent.dragPath=this.parent.path,this.parent.activeElements=this.gridObj.getSelectedRows(),_n(this.parent),this.parent.virtualDragElement):null},T.prototype.onDetailsResize=function(){if("Details"===this.parent.view&&!this.parent.isMobile&&!y.isNullOrUndefined(this.gridObj))for(var e=this.gridObj.getHeaderContent().querySelector(".e-headercontent").firstChild.childNodes[0],t=this.gridObj.getContent().querySelector(".e-content .e-table").children[0],i=this.gridObj.getColumns(),n=0;n<i.length;n++)(this.isNameWidth||"name"!==i[n].field)&&"filterPath"!==i[n].field||(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===i[n].field?(e.children[n].setAttribute("style","width: 120px"),t.children[n].setAttribute("style","width: 120px")):(e.children[n].setAttribute("style","width: 180px"),t.children[n].setAttribute("style","width: 180px")):680<this.element.clientWidth&&(e.children[n].setAttribute("style","width: auto"),t.children[n].setAttribute("style","width: auto")):this.element.clientWidth<=500?(e.children[n].setAttribute("style","width: 120px"),t.children[n].setAttribute("style","width: 120px")):500<this.element.clientWidth&&(e.children[n].setAttribute("style","width: auto"),t.children[n].setAttribute("style","width: auto")))},T.prototype.onDetailsResizeHandler=function(){this.onDetailsResize(),"Details"!==this.parent.view||this.parent.isMobile||y.isNullOrUndefined(this.gridObj)||this.adjustHeight()},T.prototype.createDragObj=function(){var t=this;this.gridObj&&(this.parent.allowDragAndDrop&&y.isNullOrUndefined(this.dragObj)?this.dragObj=new y.Draggable(this.gridObj.element,{cursorAt:this.parent.dragCursorPosition,distance:5,enableTailMode:!0,dragArea:this.parent.element,dragTarget:"."+dt,drag:Yn.bind(this,this.parent),dragStart:function(e){Bn(t.parent,e,t.dragObj)},dragStop:Hn.bind(this,this.parent),enableAutoScroll:!1,helper:this.dragHelper.bind(this)}):!this.parent.allowDragAndDrop&&this.dragObj&&(this.dragObj.destroy(),this.dragObj=null))},T.prototype.onDropInit=function(e){var t,i;this.parent.targetModule===this.getModuleName()&&(t=y.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),e.target.closest("tr")?(i=null,i=this.gridObj.getRowInfo(e.target).rowData,this.parent.dropPath=i.isFile?this.parent.path:vn(this.parent,i,this.parent.path),this.parent.dropData=i.isFile?t:i):(this.parent.dropPath=this.parent.path,this.parent.dropData=t))},T.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.gridObj.getSelectedRecords(),this.parent.activeElements=this.gridObj.getSelectedRows())},T.prototype.onpasteEnd=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==An(this.parent,e)&&!this.parent.hasId||this.onPathChanged(e))},T.prototype.onDropPath=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},T.prototype.getModuleName=function(){return"detailsview"},T.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.gridObj&&(this.parent.isReact&&this.gridObj.off("reactTemplateRender",this.reactTemplateRender),this.unWireEvents(),this.gridObj.destroy()))},T.prototype.updateType=function(e){e=y.select("."+ft,e);this.parent.isFile=!!y.isNullOrUndefined(e)},T.prototype.onSelection=function(e,t){var e={action:e,fileDetails:t.data,isInteracted:this.interaction,cancel:!1,target:t.target};this.parent.trigger("fileSelection",e),t.cancel=e.cancel,this.isMultiSelect||(this.isMultiSelect=!0,(t.isShiftPressed||t.isCtrlPressed)&&!this.parent.allowMultiSelection&&t.target&&t.target.parentElement&&!t.target.parentElement.classList.contains("e-checkbox-wrapper")&&(t.cancel=!0,e=t&&t.rowIndexes?t.rowIndexes[t.rowIndexes.length-1]:t.rowIndex,this.gridObj.selectRow(e)),this.isMultiSelect=!1)},T.prototype.onSelected=function(e){this.parent.activeModule="detailsview",this.parent.isLayoutChange&&!this.parent.isFiltered||this.selectedRecords(),this.parent.notify(m,{}),1===this.gridObj.getSelectedRowIndexes().length&&(this.firstItemIndex=this.gridObj.selectedRowIndex),this.gridObj.element.setAttribute("tabindex","-1"),this.triggerSelect("select",e);var t=this.gridObj.getRowByIndex(this.gridObj.selectedRowIndex),i=(this.updateType(t),y.isNullOrUndefined(t)||y.isNullOrUndefined(t.querySelector(".e-checkselect"))||(1!==this.gridObj.getSelectedRowIndexes().length&&(s=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2],this.gridObj.getRowByIndex(s).querySelector(".e-checkselect").setAttribute("tabindex","-1")),t.querySelector(".e-rowcell.e-fe-checkbox").removeAttribute("tabindex")),y.isNullOrUndefined(this.gridObj)||y.isNullOrUndefined(this.gridObj.element.querySelector(".e-checkselectall"))||this.gridObj.element.querySelector(".e-checkselectall").setAttribute("tabindex","-1"),this.gridObj.getSelectedRowIndexes());if(!this.parent.allowMultiSelection)for(var n=0;n<i.length;n++)i[n]===this.gridObj.selectedRowIndex?this.gridObj.getRowByIndex(i[n]).setAttribute("tabindex","0"):this.gridObj.getRowByIndex(i[n]).removeAttribute("tabindex");var s=i.length,s=(this.parent.enableVirtualization?this.parent.currentItemText=y.getValue("name",e.data):0<s&&(t=this.gridObj.getRowsObject()[i[s-1]].data,this.parent.currentItemText=y.getValue("name",t)),y.getValue("rowIndexes",e)),t=y.getValue("enableSelectMultiTouch",this.gridObj.selectionModule);this.parent.isDevice&&y.isNullOrUndefined(s)&&e.target&&!t&&!e.target.closest(".e-headercell")&&(this.parent.isFile=y.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)},T.prototype.onPathColumn=function(){"Details"!==this.parent.view||y.isNullOrUndefined(this.gridObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||this.removePathColumn(!1)},T.prototype.selectedRecords=function(){this.parent.setProperties({selectedItems:[]},!0);for(var e=this.gridSelectNodes(),t=0;t<e.length;){var i=e[t],i=Jn(this.parent,i);this.parent.selectedItems.push(i),t++}this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)},T.prototype.onDeSelection=function(e){var t;!this.parent.allowMultiSelection&&y.isNullOrUndefined(e.data)?this.gridObj.getRowByIndex(e.rowIndex).removeAttribute("tabindex"):1<this.gridObj.getSelectedRowIndexes().length&&(t=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2],this.gridObj.getRowByIndex(t).querySelector(".e-checkselect").removeAttribute("tabindex")),-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),this.isInteracted?(this.selectedRecords(),0===this.parent.selectedItems.length&&(y.setValue("enableSelectMultiTouch",!1,this.gridObj.selectionModule),y.removeClass([this.parent.element],Ye)),this.parent.notify(m,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null):this.isInteracted=!0},T.prototype.triggerSelect=function(e,t){e={action:e,fileDetails:t.data,isInteracted:this.interaction};this.parent.trigger("fileSelect",e),this.interaction=!0},T.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new y.KeyboardEvents(this.gridObj.element,{keyAction:this.keyupHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new y.KeyboardEvents(this.element,{keyAction:this.keydownHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),y.EventHandler.add(this.gridObj.element,"blur",this.removeFocus,this),y.EventHandler.add(this.parent.element,"focusout",this.onBlur,this)},T.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),y.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus),y.EventHandler.remove(this.parent.element,"focusout",this.onBlur)},T.prototype.wireClickEvent=function(e){var t=this;e?(e=this.gridObj.getContent(),this.clickObj=new y.Touch(e,{tap:function(e){1===e.tapCount&&e.originalEvent.target.classList.contains("e-content")&&t.onClearAllInit()},tapHold:function(e){t.parent.isDevice&&(e.originalEvent.preventDefault(),t.parent.allowMultiSelection&&(y.setValue("enableSelectMultiTouch",t.parent.allowMultiSelection,t.gridObj.selectionModule),y.addClass([t.parent.element],Ye)),e=e.originalEvent.target)&&(e=y.closest(e,"."+dt),e=t.gridObj.getRows().indexOf(e),t.gridObj.selectRow(e))}})):this.clickObj&&this.clickObj.destroy()},T.prototype.removeSelection=function(){y.removeClass([this.parent.element],Ye),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(m,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},T.prototype.removeFocus=function(){this.addFocus(null)},T.prototype.onBlur=function(e){if((null===e.relatedTarget||y.closest(e.relatedTarget,".e-grid")===e.relatedTarget)&&!y.isNullOrUndefined(this.gridObj.element))for(var t=this.gridObj.element.querySelectorAll("th"),i=0;i<t.length;i++)t[i].classList.contains("e-focus")&&this.addFocus(null)},T.prototype.getFocusedItemIndex=function(){return y.isNullOrUndefined(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("data-rowindex"),10)},T.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()}},T.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var t,i,n,s=e.action,a=On(this.parent,this.gridObj.dataSource),r=a.length,o=this.getFocusedItemIndex(),l=this.gridObj.selectedRowIndex,h=this.gridObj.getSelectedRowIndexes();switch(s){case"altEnter":this.parent.notify(f,{}),fs(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":an(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"enter":-1===this.gridObj.selectedRowIndex&&!0===this.gridObj.allowSorting?e.target.classList.contains("e-fe-grid-icon")||(i=e.target.getElementsByClassName("e-ascending").length?"Descending":"Ascending",t=this.gridObj.getColumnByUid(e.target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid")).field,this.gridObj.sortColumn(t,i),y.isNullOrUndefined(this.getFocusedItem().nextSibling))||this.getFocusedItem().nextSibling.setAttribute("tabindex","0"):(t=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data)&&(i=JSON.parse(JSON.stringify(t)),this.openContent(i));break;case"ctrlC":mn(this.parent);break;case"ctrlV":this.parent.folderPath="",Mn(this.parent);break;case"ctrlX":fn(this.parent);break;case"ctrlD":this.doDownload();break;case"f2":this.performRename();break;case"ctrlA":!y.isNullOrUndefined(a[0])&&this.parent.allowMultiSelection&&(i=(t=this.gridObj.getContent().querySelector(".e-content")).scrollTop,n=this.gridObj.selectedRowIndex,this.gridObj.selectionModule.selectRowsByRange(0,a.length-1),t.scrollTop=i,-1!==n)&&this.addFocus(n);break;case"ctrlHome":case"tab":if(!y.isNullOrUndefined(a[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":y.isNullOrUndefined(a[0])||(this.parent.allowMultiSelection?this.addFocus(r-1):this.gridObj.selectRow(r-1));break;case"shiftHome":case"shiftEnd":case"csHome":case"csEnd":this.parent.allowMultiSelection?y.isNullOrUndefined(a[0])||(y.isNullOrUndefined(l)||-1===l?"csHome"===e.action||"shiftHome"===e.action?this.gridObj.selectRow(0):this.gridObj.selectionModule.selectRowsByRange(0,a.length-1):this.checkRowsKey(a,l,null,e)):this.gridObj.selectRow("shiftHome"===e.action||"csHome"===e.action?0:a.length-1);break;case"space":case"csSpace":case"shiftSpace":case"ctrlSpace":this.spaceSelection(h,o,l,e);break;case"csUp":case"csDown":case"shiftUp":case"shiftDown":this.shiftMoveMethod(a,l,o,h,e);break;case"ctrlUp":case"ctrlDown":this.parent.allowMultiSelection?this.ctrlMoveFunction(a,e,l):this.moveFunction(a,e,l);break;case"home":t=[y.getValue(this.parent.hasId?"id":"name",a[0])],this.parent.setProperties({selectedItems:t},!0),this.selectRecords(t);break;case"moveUp":case"moveDown":this.moveFunction(a,e,l);break;case"end":i=[y.getValue(this.parent.hasId?"id":"name",a[r-1])],this.parent.setProperties({selectedItems:i},!0),this.selectRecords(i);break;case"back":this.parent.traverseBackward()}}},T.prototype.gridSelectNodes=function(){return this.gridObj.getSelectedRecords()},T.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(!as(e[t]))return void D(this.parent,e[t],Xi);Us(this.parent,this.parent.path,this.parent.selectedItems)}},T.prototype.performDelete=function(){if(this.parent.selectedItems&&0<this.parent.selectedItems.length){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!S(e[t]))return void D(this.parent,e[t],v);x(this.parent,"Delete")}},T.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),Xn(this.parent))},T.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];Qn(this.parent,e)},T.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)},T.prototype.moveFunction=function(e,t,i){!y.isNullOrUndefined(this.getFocusedItem())&&this.parent.allowMultiSelection?"moveDown"===t.action?this.gridObj.selectRow(this.getFocusedItemIndex()+1):this.gridObj.selectRow(this.getFocusedItemIndex()-1):y.isNullOrUndefined(i)||-1===i?y.isNullOrUndefined(e[0])||this.gridObj.selectRow(0):"moveDown"===t.action||"ctrlDown"===t.action||"shiftDown"===t.action||"csDown"===t.action?this.gridObj.selectRow(i+(i!==e.length-1?1:0)):this.gridObj.selectRow(i-(0!==i?1:0))},T.prototype.spaceSelection=function(e,t,i,n){var s;this.isSelected(e,t)||-1===i||"shiftSpace"!==n.action&&"csSpace"!==n.action?y.isNullOrUndefined(this.getFocusedItem())||t===i?-1!==i&&"ctrlSpace"===n.action&&this.parent.allowMultiSelection?(s=i,e.pop(),this.gridObj.selectRows(e),this.addFocus(s)):"shiftSpace"===n.action&&this.gridObj.selectRow(i):(e.push(this.getFocusedItemIndex()),this.gridObj.selectRows(e)):t<i?this.gridObj.selectionModule.selectRowsByRange(t,i):this.gridObj.selectionModule.selectRowsByRange(i,t)},T.prototype.ctrlMoveFunction=function(e,t,i){var n;y.isNullOrUndefined(this.getFocusedItem())?y.isNullOrUndefined(i)||-1===i?y.isNullOrUndefined(e[0])||(n=0):n="ctrlDown"===t.action||"csDown"===t.action?i+(i<e.length?1:0):i-(i<1?0:1):(i=this.getFocusedItemIndex(),n="ctrlDown"===t.action||"csDown"===t.action?i+(i<e.length-1?1:0):i-(i<1?0:1)),this.addFocus(n)},T.prototype.checkRowsKey=function(e,t,i,n){"Uncheck"===this.gridObj.checkAllRows||"Intermediate"===this.gridObj.checkAllRows?"csHome"!==n.action&&"csEnd"!==n.action?(y.isNullOrUndefined(this.startIndex)&&this.firstItemIndex!==t&&(this.firstItemIndex=t),"shiftEnd"===n.action?this.gridObj.selectionModule.selectRowsByRange(this.firstItemIndex,e.length-1):this.gridObj.selectionModule.selectRowsByRange(0,this.firstItemIndex),this.startIndex=t):"csEnd"===n.action?this.gridObj.selectRows(this.InnerItems(y.isNullOrUndefined(t)?0:t,y.isNullOrUndefined(i)?e.length-1:i,n)):y.isNullOrUndefined(t)?this.gridObj.selectRow(0):this.gridObj.selectRows(this.InnerItems(y.isNullOrUndefined(i)?0:i,t,n)):this.gridObj.selectionModule.selectRow("shiftHome"===n.action||"csHome"===n.action?0:e.length-1)},T.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},T.prototype.shiftSelectFocusItem=function(e,t,i,n){t+="shiftDown"===n.action||"csDown"===n.action?1:-1,e=y.isNullOrUndefined(this.startIndex)?e:i[0];e===t?this.gridObj.selectRow(e):e<t?"shiftDown"===n.action||"csDown"===n.action?this.gridObj.selectionModule.selectRowsByRange(e,t):this.gridObj.selectionModule.selectRowsByRange(t,e):"shiftDown"===n.action||"csDown"===n.action?this.gridObj.selectionModule.selectRowsByRange(t,e):this.gridObj.selectionModule.selectRowsByRange(e,t),this.startIndex=this.gridObj.selectedRowIndex},T.prototype.addFocus=function(e){var t=this.getFocusedItem(),e=this.gridObj.getRowByIndex(e);t&&(t.removeAttribute("tabindex"),y.removeClass([t],[at,rt])),y.isNullOrUndefined(e)||(this.gridObj.element.setAttribute("tabindex","-1"),e.setAttribute("tabindex","0"),e.focus(),y.addClass([e],[at,rt]))},T.prototype.addHeaderFocus=function(e){var t,i=y.select(".e-row",this.element);this.gridObj.element.setAttribute("tabindex","-1"),!y.isNullOrUndefined(e.target)&&e.target.classList.contains("e-defaultcursor")?(this.addFocus(0),t=e.target.nextElementSibling):y.isNullOrUndefined(this.gridObj.element.querySelector(".e-focus"))||"TH"!==this.gridObj.element.querySelector(".e-focus").tagName?t=y.select("th.e-fe-grid-icon",this.element):(t=this.gridObj.element.querySelector(".e-focus").nextElementSibling,this.addFocus(0)),y.isNullOrUndefined(t)||(t.setAttribute("tabindex","0"),t.focus(),y.addClass([t],[at,rt]),i.setAttribute("tabindex","0"),0===i.tabIndex&&0===t.tabIndex&&y.removeClass([i],[at,rt]))},T.prototype.getFocusedItem=function(){return y.select("."+rt,this.element)},T.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},T.prototype.shiftSelectedItem=function(e,t,i,n){-1===e?this.gridObj.selectRow(0):y.isNullOrUndefined(this.startIndex)&&n.shiftKey?(this.startIndex=this.gridObj.selectedRowIndex,this.gridObj.selectRows([e,"shiftDown"===n.action||"csDown"===n.action?e+(e!==i.length-1?1:0):e-(0!==e?1:0)])):"shiftDown"===n.action||"shiftUp"===n.action?("shiftDown"===n.action&&-1===t.indexOf(e+1)?e!==i.length-1&&t.push(e+1):"shiftUp"===n.action&&-1===t.indexOf(e-1)?0!==e&&t.push(e-1):t.pop(),this.gridObj.selectRows(t)):"csDown"===n.action?this.isSelected(t,this.getFocusedItemIndex()+1)?this.addFocus(this.getFocusedItemIndex()+1):(t.push(this.getFocusedItemIndex()+1),this.gridObj.selectRows(t)):this.isSelected(t,this.getFocusedItemIndex()-1)?this.addFocus(this.getFocusedItemIndex()-1):(t.push(this.getFocusedItemIndex()-1),this.gridObj.selectRows(t))},T.prototype.onMethodCall=function(e){if("Details"===this.parent.view)switch(y.getValue("action",e)){case"deleteFiles":this.deleteFiles(y.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(y.getValue("ids",e));break;case"openFile":this.openFile(y.getValue("id",e));break;case"createFolder":this.interaction=!1;break;case"renameFile":this.interaction=!1,this.renameFile(y.getValue("id",e),y.getValue("newName",e));break;case"selectAll":this.interaction=!1,this.onSelectAllInit();break;case"clearSelection":this.interaction=!1,this.onClearAllInit()}},T.prototype.getRecords=function(e){var t=this.gridObj.getCurrentViewRecords(),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=t.length;a<r;a++)-1!==e.indexOf(y.getValue(s,t[a]))&&i.push(t[a]);else for(a=0,r=t.length;a<r;a++){var o=y.getValue("filterPath",t[a])+y.getValue("name",t[a]);-1!==e.indexOf(o)&&i.push(t[a])}return i},T.prototype.deleteFiles=function(e){if(this.parent.activeModule="detailsview",y.isNullOrUndefined(e))this.performDelete();else{var t=this.getRecords(e);if(0!==t.length){for(var i=[],n=[],s=0;s<t.length;s++)i[s]=t[s],n[s]=Jn(this.parent,i[s]);Zn(this.parent,i,n)}}},T.prototype.downloadFiles=function(e){if(y.isNullOrUndefined(e))this.doDownload();else{var t=this.getRecords(e);if(0!==t.length){for(var i=[],n=[],s=0;s<t.length;s++)i[s]=t[s],n[s]=Jn(this.parent,i[s]);es(this.parent,i,n)}}},T.prototype.openFile=function(e){y.isNullOrUndefined(e)||0<(e=this.getRecords([e])).length&&this.openContent(e[0])},T.prototype.renameFile=function(e,t){this.parent.activeModule="detailsview",y.isNullOrUndefined(e)?this.performRename():0<(e=this.getRecords([e])).length&&(Qn(this.parent,e[0]),y.isNullOrUndefined(t)?Xn(this.parent):S(this.parent.itemData[0])?us(this.parent,this.parent.path,t):D(this.parent,this.parent.itemData[0],v))};var fa=T;function T(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.isMultiSelect=!1,this.pasteOperation=!1,this.uploadOperation=!1,F.Grid.Inject(F.Resize,F.ContextMenu,F.Sort,F.VirtualScroll),this.parent=e,this.element=y.select("#"+this.parent.element.id+Pe,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",back:"backspace"}}e.ACTIVE=p,e.ALT_DIALOG_ID="_alt_dialog",e.AjaxSettings=W,e.BLUR=nt,e.BREADCRUMBBAR_ID=Ve,e.BREADCRUMBS=Jt,e.BreadCrumbBar=oa,e.CB_WRAP=ht,e.CHECK=ot,e.CHECK_SELECT=ze,e.CLONE=ut,e.COLLAPSED="e-node-collapsed",e.CONTENT_ID=Fe,e.CONTEXT_MENU_ID=Ae,e.CONTROL=Be,e.Column=we,e.ContextMenu=la,e.ContextMenuSettings=re,e.DETAILS_LABEL="e-detailslabel",e.DIALOG_ID=Me,e.DISPLAY_NONE=Xt,e.DROP_FILE=mt,e.DROP_FOLDER=gt,e.Delete=ms,e.DetailsView=fa,e.DetailsViewSettings=ie,e.Download=Us,e.EMPTY=c,e.EMPTY_CONTENT=pt,e.EMPTY_INNER_CONTENT=ct,e.ERROR_CONTENT=Gt,e.EXTN_DIALOG_ID=Le,e.FILTER=Ge,e.FOCUS=at,e.FOCUSED=rt,e.FOLDER=ft,e.FRAME=lt,e.FULLROW=$t,e.FileManager=n,e.GRID_CONTENT=Nt,e.GRID_HEADER=wt,e.GRID_ID=Pe,e.GRID_VIEW=xt,e.GetDetails=fs,e.HEADER_CHECK=ei,e.HOVER=st,e.ICONS=Yt,e.ICON_BREADCRUMB=Wt,e.ICON_CLEAR=Kt,e.ICON_COLLAPSIBLE="e-icon-collapsible",e.ICON_COPY=kt,e.ICON_CUT=Mt,e.ICON_DELETE=Tt,e.ICON_DETAILS=Vt,e.ICON_DOWNLOAD=Bt,e.ICON_DROP_IN="e-icons e-fe-drop-in",e.ICON_DROP_OUT="e-icons e-fe-drop-out",e.ICON_GRID=zt,e.ICON_IMAGE=bt,e.ICON_LARGE=qt,e.ICON_MUSIC=yt,e.ICON_NEWFOLDER=Ft,e.ICON_NO_DROP="e-icons e-fe-no-drop",e.ICON_OPEN=Pt,e.ICON_OPTIONS="e-icons e-fe-options",e.ICON_PASTE=Lt,e.ICON_REFRESH=_t,e.ICON_RENAME=At,e.ICON_SELECTALL=Ht,e.ICON_SHORTBY=Ut,e.ICON_UPLOAD=Rt,e.ICON_VIDEO=vt,e.ICON_VIEW=Et,e.IMG_DIALOG_ID=ke,e.LARGEICON_ID=Re,e.LARGE_EMPTY_FOLDER=Ot,e.LARGE_EMPTY_FOLDER_TWO="e-empty-icon.e-fe-folder",e.LARGE_ICON=It,e.LARGE_ICONS=$e,e.LARGE_ICON_FOLDER="e-fe-folder",e.LAYOUT=Je,e.LAYOUT_CONTENT=Xe,e.LAYOUT_ID=xe,e.LIST_ITEM=d,e.LIST_PARENT=tt,e.LIST_TEXT=et,e.LargeIconsView=ra,e.MENU_ICON=Ct,e.MENU_ITEM=St,e.MOBILE=We,e.MOB_POPUP=Ke,e.MULTI_SELECT=Ye,e.NAVIGATION=Qe,e.NAVIGATION_ID=Ne,e.NavigationPane=ma,e.NavigationPaneSettings=pe,e.OVERLAY=ti,e.RETRY_DIALOG_ID="_retry_dialog",e.RETRY_ID="_retry",e.ROOT=He,e.ROOT_POPUP=qe,e.ROW=dt,e.ROWCELL="e-rowcell",e.RTL=Qt,e.SEARCH_ID=_e,e.SELECTED_ITEMS="e-items",e.SORTBY_ID="_sortby",e.SPLITTER_ID="_splitter",e.SPLIT_BAR=Zt,e.STATUS="e-status",e.SUBMENU_ICON=jt,e.Search=Fs,e.SearchSettings=t,e.TB_ITEM=Ze,e.TB_OPTION_DOT=it,e.TB_OPTION_TICK=o,e.TEMPLATE_CELL="e-templatecell",e.TEXT_CONTENT="e-text-content",e.TOOLBAR_ID=je,e.TREE_ID=Ee,e.TREE_VIEW=Dt,e.Toolbar=R,e.ToolbarItem=K,e.ToolbarSettings=X,e.UPLOAD_DIALOG_ID=Te,e.UPLOAD_ID=Ue,e.UploadSettings=ye,e.VALUE=ii,e.VIEW_ID="_view",e.Virtualization=ua,e.actionFailure=bi,e.activeElement=rn,e.addBlur=on,e.afterRequest=mi,e.beforeDelete="before-delete",e.beforeDownload="before-download",e.beforeRequest=ui,e.clearAllInit=wi,e.clearPathInit=Di,e.closePopup=ls,e.columnArray=oe,e.copyFiles=mn,e.createDeniedDialog=D,e.createDialog=x,e.createEmptyElement=Dn,e.createEnd=si,e.createExtDialog=Hs,e.createFolder=ps,e.createImageDialog=sa,e.createNewFolder=rs,e.createVirtualDragElement=_n,e.cutCopyInit=Mi,e.cutEnd=Ti,e.cutFiles=fn,e.defaultToolbarItems=Q,e.deleteEnd=li,e.deleteInit=oi,e.destroy=ci,e.detailsInit=f,e.doDeleteFiles=Zn,e.doDownload=$n,e.doDownloadFiles=es,e.doPasteUpdate=Fn,e.doRename=Xn,e.download="download",e.downloadInit=Hi,e.dragCancel=zn,e.dragEnd=zi,e.dragHelper="drag-helper",e.dragStartHandler=Bn,e.dragStopHandler=Hn,e.dragging=Wi,e.draggingHandler=Yn,e.dropHandler=Ln,e.dropInit=Bi,e.dropPath=qi,e.fileItems=ce,e.fileType=bn,e.filter=cs,e.filterEnd=ai,e.finalizeEnd=u,e.folderItems=ue,e.generatePath=sn,e.getAccessClass=ts,e.getAccessDetails=ds,e.getAllChildItems=hn,e.getCssClass=xn,e.getDirectories=Sn,e.getDirectoryPath=An,e.getDuplicateData=Un,e.getFullPath=vn,e.getImageUrl=yn,e.getItemName=Jn,e.getLocaleText=w,e.getModule=ln,e.getName=In,e.getObject=wn,e.getParentPath=Tn,e.getParents=nn,e.getPath=Zi,e.getPathId=en,e.getPathNames=tn,e.getPathObject=O,e.getSortField=En,e.getSortedData=On,e.getTargetModule=cn,e.getTargetPath=hs,e.hasContentAccess=ns,e.hasDownloadAccess=as,e.hasEditAccess=S,e.hasReadAccess=is,e.hasUploadAccess=ss,e.hideLayout=Ai,e.hidePaste=Pi,e.initialEnd=ni,e.isFile="isFile",e.isFileSystemData=j,e.layoutChange=a,e.layoutItems=ge,e.layoutRefresh=fi,e.menuItemData=ji,e.methodCall=Yi,e.modelChanged=l,e.nodeExpand=Ci,e.objectToString=Gn,e.openAction=gn,e.openEnd=Ii,e.openInit=vi,e.openSearchFolder=Rn,e.paste=gs,e.pasteEnd=Li,e.pasteHandler=Mn,e.pasteInit=ki,e.pathChanged=g,e.pathColumn=Ui,e.pathDrag=ri,e.permissionCopy="copy",e.permissionDownload=Xi,e.permissionEdit=v,e.permissionEditContents=Ji,e.permissionRead=Gi,e.permissionUpload=Qi,e.read=C,e.readDropPath=Vn,e.refresh=un,e.refreshEnd=hi,e.removeActive=an,e.removeBlur=I,e.removeDropTarget=qn,e.removeItemClass=Wn,e.rename=us,e.renameEnd=b,e.renameEndParent=Ni,e.renameInit=xi,e.resizeEnd=di,e.scrollHandler=Kn,e.search=yi,e.searchTextChange=_i,e.searchWordHandler=dn,e.selectAllInit=Oi,e.selectedData=Ri,e.selectionChanged=m,e.setDateObject=jn,e.setNextPath=Pn,e.setNodeId=Cn,e.showPaste=Ei,e.skipUpload=gi,e.sortByChange=Si,e.sortColumn=Vi,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();if(r&&o){r=r[0]-o[0]||r[1].localeCompare(o[1]);if(r)return r}}return s.length-a.length},e.sortbyClickHandler=Nn,e.splitterResize=pi,e.treeSelect="select-node",e.updateLayout=pn,e.updatePath=$i,e.updateRenamingData=Qn,e.updateSelectionData=Ki,e.updateTreeSelection=Fi,e.upload="upload",e.uploadItem=os,e.validateSubFolder=kn,Object.defineProperty(e,"__esModule",{value:!0})});
|
1
|
+
!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-grids"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-lists"),require("@syncfusion/ej2-splitbuttons"),require("@syncfusion/ej2-navigations")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-layouts","@syncfusion/ej2-popups","@syncfusion/ej2-data","@syncfusion/ej2-grids","@syncfusion/ej2-inputs","@syncfusion/ej2-buttons","@syncfusion/ej2-lists","@syncfusion/ej2-splitbuttons","@syncfusion/ej2-navigations"],t):t((e=e||self).ej={},e.ej2Base,e.ej2Layouts,e.ej2Popups,e.ej2Data,e.ej2Grids,e.ej2Inputs,e.ej2Buttons,e.ej2Lists,e.ej2Splitbuttons,e.ej2Navigations)}(this,function(e,b,A,r,h,F,V,U,_,H,B){"use strict";z=function(e,t){return(z=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])}))(e,t)};var z,q,W=function(e,t){function i(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},K=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},W=(q=b.ChildProperty,W(Y,q),K([b.Property(null)],Y.prototype,"downloadUrl",void 0),K([b.Property(null)],Y.prototype,"getImageUrl",void 0),K([b.Property(null)],Y.prototype,"uploadUrl",void 0),K([b.Property(null)],Y.prototype,"url",void 0),Y);function Y(){return null!==q&&q.apply(this,arguments)||this}G=function(e,t){return(G=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])}))(e,t)};var G,J,K=function(e,t){function i(){this.constructor=e}G(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},t=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},Q=["NewFolder","Upload","Cut","Copy","Paste","Delete","Download","Rename","SortBy","Refresh","Selection","View","Details"],X=(J=b.ChildProperty,K($,J),t([b.Property(Q)],$.prototype,"items",void 0),t([b.Property(!0)],$.prototype,"visible",void 0),$);function $(){return null!==J&&J.apply(this,arguments)||this}Z=b.ChildProperty,K(i,Z),t([b.Property("")],i.prototype,"id",void 0),t([b.Property("")],i.prototype,"text",void 0),t([b.Property("auto")],i.prototype,"width",void 0),t([b.Property("")],i.prototype,"cssClass",void 0),t([b.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),t([b.Property(!1)],i.prototype,"disabled",void 0),t([b.Property("")],i.prototype,"prefixIcon",void 0),t([b.Property("")],i.prototype,"suffixIcon",void 0),t([b.Property(!0)],i.prototype,"visible",void 0),t([b.Property("None")],i.prototype,"overflow",void 0),t([b.Property("")],i.prototype,"template",void 0),t([b.Property("Button")],i.prototype,"type",void 0),t([b.Property("Both")],i.prototype,"showTextOn",void 0),t([b.Property(null)],i.prototype,"htmlAttributes",void 0),t([b.Property("")],i.prototype,"tooltipText",void 0),t([b.Property("Left")],i.prototype,"align",void 0),t([b.Property(-1)],i.prototype,"tabIndex",void 0),t([b.Property()],i.prototype,"name",void 0);var Z,K=i;function i(){return null!==Z&&Z.apply(this,arguments)||this}ee=function(e,t){return(ee=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])}))(e,t)};var ee,te,t=function(e,t){function i(){this.constructor=e}ee(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},ie=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},t=(te=b.ChildProperty,t(ne,te),ie([b.Property(!0)],ne.prototype,"allowSearchOnTyping",void 0),ie([b.Property("contains")],ne.prototype,"filterType",void 0),ie([b.Property(!0)],ne.prototype,"ignoreCase",void 0),ie([b.Property(null)],ne.prototype,"placeholder",void 0),ne);function ne(){return null!==te&&te.apply(this,arguments)||this}se=function(e,t){return(se=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])}))(e,t)};var se,ae,ie=function(e,t){function i(){this.constructor=e}se(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},re=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},oe=[{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:b.initializeCSPTemplate(function(e){return'<span class="e-fe-size">'+e.size+"</span>"}),format:"n2"}],ie=(ae=b.ChildProperty,ie(le,ae),re([b.Property(!0)],le.prototype,"columnResizing",void 0),re([b.Property(oe)],le.prototype,"columns",void 0),le);function le(){return null!==ae&&ae.apply(this,arguments)||this}he=function(e,t){return(he=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])}))(e,t)};var he,de,re=function(e,t){function i(){this.constructor=e}he(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},pe=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},ce=["Open","|","Cut","Copy","|","Delete","Download","Rename","|","Details"],ue=["Open","|","Cut","Copy","Paste","|","Delete","Rename","Download","|","Details"],ge=["SortBy","View","Refresh","|","Paste","|","NewFolder","Upload","|","Details","|","SelectAll"],re=(de=b.ChildProperty,re(fe,de),pe([b.Property(ce)],fe.prototype,"file",void 0),pe([b.Property(ue)],fe.prototype,"folder",void 0),pe([b.Property(ge)],fe.prototype,"layout",void 0),pe([b.Property(!0)],fe.prototype,"visible",void 0),fe);function fe(){return null!==de&&de.apply(this,arguments)||this}me=function(e,t){return(me=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])}))(e,t)};var me,be,pe=function(e,t){function i(){this.constructor=e}me(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},ye=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},pe=(be=b.ChildProperty,pe(ve,be),ye([b.Property("650px")],ve.prototype,"maxWidth",void 0),ye([b.Property("240px")],ve.prototype,"minWidth",void 0),ye([b.Property(!0)],ve.prototype,"visible",void 0),ye([b.Property("None")],ve.prototype,"sortOrder",void 0),ve);function ve(){return null!==be&&be.apply(this,arguments)||this}Ie=function(e,t){return(Ie=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])}))(e,t)};var Ie,Oe,ye=function(e,t){function i(){this.constructor=e}Ie(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},we=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},ye=(Oe=b.ChildProperty,ye(De,Oe),we([b.Property("")],De.prototype,"allowedExtensions",void 0),we([b.Property(!0)],De.prototype,"autoUpload",void 0),we([b.Property(!1)],De.prototype,"autoClose",void 0),we([b.Property(!1)],De.prototype,"directoryUpload",void 0),we([b.Property(0)],De.prototype,"minFileSize",void 0),we([b.Property(3e7)],De.prototype,"maxFileSize",void 0),we([b.Property(0)],De.prototype,"chunkSize",void 0),De);function De(){return null!==Oe&&Oe.apply(this,arguments)||this}Se=function(e,t){return(Se=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])}))(e,t)};var Se,Ce,we=function(e,t){function i(){this.constructor=e}Se(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},n=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},we=(Ce=b.ChildProperty,we(s,Ce),n([b.Property("")],s.prototype,"field",void 0),n([b.Property("")],s.prototype,"headerText",void 0),n([b.Property("")],s.prototype,"width",void 0),n([b.Property("")],s.prototype,"minWidth",void 0),n([b.Property("")],s.prototype,"maxWidth",void 0),n([b.Property("Left")],s.prototype,"textAlign",void 0),n([b.Property(null)],s.prototype,"headerTextAlign",void 0),n([b.Property(null)],s.prototype,"type",void 0),n([b.Property(null)],s.prototype,"format",void 0),n([b.Property(null)],s.prototype,"template",void 0),n([b.Property(null)],s.prototype,"sortComparer",void 0),n([b.Property(null)],s.prototype,"headerTemplate",void 0),n([b.Property(!0)],s.prototype,"allowSorting",void 0),n([b.Property(!0)],s.prototype,"allowResizing",void 0),n([b.Property(null)],s.prototype,"customAttributes",void 0),n([b.Property("")],s.prototype,"hideAtMedia",void 0),n([b.Property(null)],s.prototype,"customFormat",void 0),n([b.Property(!1)],s.prototype,"isPrimaryKey",void 0),s);function s(){return null!==Ce&&Ce.apply(this,arguments)||this}var je="_toolbar",xe="_layout",Ne="_navigation",Ee="_tree",Pe="_grid",Re="_largeicons",Me="_dialog",ke="_img_dialog",Le="_extn_dialog",Te="_upload_dialog",Ae="_contextmenu",Fe="_content",Ve="_breadcrumbbar",Ue="_upload",_e="_search",He="e-filemanager",Be="e-control",ze="e-fe-cb-select",qe="e-fe-popup",We="e-fe-mobile",Ke="e-fe-popup e-fe-mobile",Ye="e-fe-m-select",Ge="e-fe-m-filter",Je="e-layout",Qe="e-navigation",Xe="e-layout-content",$e="e-large-icons",Ze="e-toolbar-item",d="e-list-item",et="e-list-text",tt="e-list-parent",o="e-icons e-fe-tick",it="e-icons e-fe-dot",nt="e-blur",p="e-active",st="e-hover",at="e-focus",rt="e-focused",ot="e-check",lt="e-frame",ht="e-checkbox-wrapper",dt="e-row",c="e-empty",pt="e-empty-content",ct="e-empty-inner-content",ut="e-fe-clone",gt="e-fe-drop-folder",ft="e-fe-drop-file",mt="e-fe-folder",bt="e-fe-image",yt="e-fe-music",vt="e-fe-video",It="e-large-icon",Ot="e-empty-icon e-fe-folder",wt="e-gridheader",Dt="e-treeview",St="e-menu-item",Ct="e-menu-icon",jt="e-caret",xt="e-content",Nt="e-gridcontent",Et="e-list-parent",Pt="e-icons e-fe-open",Rt="e-icons e-fe-upload",Mt="e-icons e-fe-cut",kt="e-icons e-fe-copy",Lt="e-icons e-fe-paste",Tt="e-icons e-fe-delete",At="e-icons e-fe-rename",Ft="e-icons e-fe-newfolder",Vt="e-icons e-fe-details",Ut="e-icons e-fe-sort",_t="e-icons e-fe-refresh",Ht="e-icons e-fe-select",Bt="e-icons e-fe-download",zt="e-icons e-fe-grid",qt="e-icons e-fe-large",Wt="e-icons e-fe-breadcrumb",Kt="e-icons e-fe-clear",Yt="e-icons",Gt="e-fe-errorcontent",Jt="e-address",Qt="e-rtl",Xt="e-display-none",$t="e-fullrow",Zt="e-split-bar",ei="e-headercheck",ti="e-fe-overlay",ii="e-fe-value",l="model-changed",ni="initial-end",u="finalize-end",si="create-end",ai="filter-end",ri="path-drag",oi="delete-init",li="delete-end",hi="refresh-end",di="resize-end",pi="splitter-resize",g="path-changed",ci="destroy",ui="before-request",gi="skip-upload",fi="after-request",mi="layout-refresh",bi="actionFailure",yi="search",vi="open-init",Ii="open-end",f="selection-changed",Oi="select-all-init",wi="clear-all-init",Di="clear-path-init",a="layout-change",Si="sort-by-change",Ci="node-expand",m="details-init",ji="menu-item-data",xi="rename-init",Ni="rename-end-parent",y="rename-end",Ei="show-paste",Pi="hide-paste",Ri="selected-data",Mi="cut-copy-init",ki="paste-init",Li="paste-end",Ti="cut-end",Ai="hide-layout",Fi="update-tree-selection",Vi="sort-column",Ui="path-column",_i="search-change",Hi="download-init",Bi="drop-init",zi="drag-end",qi="drop-path",Wi="dragging",Ki="update-selection-data",Yi="method-call",Gi="read",v="write",Ji="writeContents",Qi="upload",Xi="download";function $i(e,t,i){var t=b.getValue("name",t),n=e.getAttribute("data-id"),n=b.isNullOrUndefined(n)?t:n;i.setProperties({path:Zi(e,n,i.hasId)},!0),i.pathId=en(e),i.pathNames=tn(e,t)}function Zi(e,t,i){for(var n=nn(e,t,!1,i),s="/",a=n.length-2;0<=a;a--)s+=n[a]+"/";return s}function en(e){for(var t=nn(e,e.getAttribute("data-uid"),!0),i=[],n=t.length-1;0<=n;n--)i.push(t[n]);return i}function tn(e,t){for(var i=nn(e,t,!1),n=[],s=i.length-1;0<=s;s--)n.push(i[s]);return n}function nn(e,t,i,n){for(var s,a=[t],r=e.parentNode;!b.isNullOrUndefined(r)&&(b.matches(r,"."+d)&&(s=i?r.getAttribute("data-uid"):n?r.getAttribute("data-id"):b.select("."+et,r).textContent,a.push(s)),!(r=r.parentNode).classList.contains(Dt)););return a}function sn(e){for(var t=e.hasId?"id":"name",i="/",n=1;n<e.pathId.length;n++){var s=b.getValue(e.pathId[parseInt(n.toString(),10)],e.feParent);i+=b.getValue(t,s)+"/"}e.setProperties({path:i},!0)}function an(e){e.isCut&&(I(e),e.selectedNodes=[],e.actionRecords=[],e.enablePaste=!1,e.notify(Pi,{}))}function rn(e,t){if(t.isSearchCut=!1,t.actionRecords=[],t.activeElements=[],t.notify(Mi,{}),0===t.activeElements.length)return!1;I(t);var i=t.activeElements,n=("navigationpane"!==t.activeModule?t.targetPath=t.path:t.targetPath=Tn(t.path),0);if(i&&(ln(t,i[0]),"cut"===e))for(;n<i.length;)on(i[n]),n++;for(n=0,t.selectedNodes=[],t.enablePaste=!0,t.notify(Ei,{});n<t.activeRecords.length;)t.actionRecords.push(t.activeRecords[n]),t.selectedNodes.push(b.getValue("name",t.activeRecords[n])),n++;if((""!==t.breadcrumbbarModule.searchObj.element.value||t.isFiltered)&&"navigationpane"!==t.activeModule){t.selectedNodes=[],t.isSearchCut=!0;for(var s=0;s<t.selectedItems.length;)t.selectedNodes.push(t.selectedItems[s]),s++}return!0}function on(e){e.classList.add(nt)}function I(e,t){for(var i=t?e.element.querySelectorAll("."+st):e.element.querySelectorAll("."+nt),n=0;n<i.length;)i[n].classList.remove(t?st:nt),n++}function ln(e,t){t&&(t.classList.contains(dt)?e.activeModule="detailsview":b.closest(t,"."+It)?e.activeModule="largeiconsview":e.activeModule="navigationpane")}function hn(t,i){var e=t.fileSystemData.filter(function(e){return String(e.parentId)===String(i)}),n=e.slice();return e.forEach(function(e){e=e.id;n=n.concat(hn(t,e))}),n}function dn(e,t,i){var n,s;0!==t.length||e.isFiltered||e.notify(Ui,{args:e}),j(e)?""===t?(e.itemData=e.fileSystemData,C(e,a,e.path)):(e.searchSettings.filterType=b.isNullOrUndefined(e.searchSettings.filterType)?"contains":e.searchSettings.filterType,s=b.getValue(e.pathId[e.pathId.length-1],e.feParent),s=hn(e,b.getValue("id",s)),s=new h.DataManager(s).executeLocal((new h.Query).where("name",e.searchSettings.filterType,t,e.searchSettings.ignoreCase)),n=e.searchSettings.ignoreCase?t.toLowerCase():t,e.itemData=s,Vs(e,i?a:yi,e.path,n,e.showHiddenItems,!e.searchSettings.ignoreCase)):(s="startsWith"===e.searchSettings.filterType?t+"*":"endsWith"===e.searchSettings.filterType?"*"+t:"*"+t+"*",e.searchWord=s,e.itemData=[O(e)],0<t.length?(n=e.searchSettings.ignoreCase,t=e.showHiddenItems,Vs(e,i?a:yi,e.path,s,t,!n)):e.isFiltered?cs(e,a):e.isSortByClicked?(e.notify(a,{files:"Details"===e.oldView?e.detailsviewModule.gridObj.dataSource:e.largeiconsviewModule.allItems}),e.isSortByClicked=!1):C(e,i?a:yi,e.path))}function pn(e,t){e.oldView=e.view,e.setProperties({view:t},!0),""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||(e.layoutSelectedItems=e.selectedItems);t="";e.breadcrumbbarModule.searchObj.element.value&&(t=e.breadcrumbbarModule.searchObj.element.value),e.isLayoutChange=!0,dn(e,t,!0)}function cn(e,t){var i="";t&&(i=b.closest(t,"."+He+"."+Be+" ."+Nt)?"detailsview":b.closest(t,"."+$e)?"largeiconsview":t.classList.contains("e-fullrow")||t.classList.contains("e-icon-expandable")?"navigationpane":b.closest(t,".e-address-list-item")?"breadcrumbbar":""),e.targetModule=i}function un(e){e.itemData=[O(e)],is(e.itemData[0])?C(e,hi,e.path):D(e,e.itemData[0],Gi)}function gn(e){C(e,Ii,e.path)}function O(e){return b.getValue(e.pathId[e.pathId.length-1],e.feParent)}function fn(e){rn("copy",e)&&(e.fileAction="copy")}function mn(e){rn("cut",e)&&(e.isCut=!0,e.fileAction="move")}function bn(e){return b.getValue("isFile",e)?(-1!==(e=(e=b.getValue("type",e)).toLowerCase()).indexOf(".")&&(e=e.split(".").join("")),-1!==["bmp","dib","jpg","jpeg","jpe","jfif","gif","tif","tiff","png","ico"].indexOf(e)?bt:-1!==["mp3","wav","aac","ogg","wma","aif","fla","m4a"].indexOf(e)?yt:-1!==["webm","mkv","flv","vob","ogv","ogg","avi","wmv","mp4","3gp"].indexOf(e)?vt:-1!==["css","exe","html","js","msi","pdf","pptx","ppt","rar","zip","txt","docx","doc","xlsx","xls","xml","rtf","php"].indexOf(e)?"e-fe-"+e:"e-fe-unknown e-fe-"+e):mt}function yn(e,t){var i,n,s,a,r=j(e)?b.getValue("imageUrl",t):"";return(j(e)?(e.trigger("beforeImageLoad",i={fileDetails:[t],imageUrl:r}),i):(n=-1!==(i=e.ajaxSettings.getImageUrl||e.ajaxSettings.url).indexOf("?")?"&path=":"?path=",s=encodeURIComponent(b.getValue("name",t)),a=b.getValue("filterPath",t),t={fileDetails:[t],imageUrl:r=(r=e.hasId?(t=b.getValue("id",t),i+n+e.path+"&id="+t):b.isNullOrUndefined(a)?i+n+e.path+s:i+n+encodeURIComponent(a.replace(/\\/g,"/"))+s)+"&time="+(new Date).getTime().toString()},e.trigger("beforeImageLoad",t),t)).imageUrl}function vn(e,t,i){var n=b.getValue(e.hasId?"id":"name",t)+"/",e=b.getValue(e.hasId?"filterId":"filterPath",t);return b.isNullOrUndefined(e)?i+n:e.replace(/\\/g,"/")+n}function In(e,t){var i=b.getValue("name",t),t=b.getValue("filterPath",t);return i=""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||b.isNullOrUndefined(t)?i:(t=t.replace(/\\/g,"/")).replace(e.path,"")+i}function On(e,t){return 0===t.length?t:(e=("None"===e.sortOrder||b.isNullOrUndefined(e.sortOrder)?new h.Query:(new h.Query).sortBy(e.sortBy,e.sortOrder.toLowerCase(),!0)).group("isFile"),t=new h.DataManager(t).executeLocal(e),b.getValue("records",t))}function wn(e,t,i){e=b.getValue(e.pathId[e.pathId.length-1],e.feFiles).filter(function(e){return e[t].toString()===i});return 0<e.length?e[0]:null}function Dn(e,t,i){var n,s,a=b.select("#"+e.element.id+xe,e.element),r=b.select("#"+e.element.id+Ve,a).offsetHeight,r=a.offsetHeight-r,o=("Details"===e.view&&(r-=b.select("."+wt,a).offsetHeight),b.isNullOrUndefined(t.querySelector("."+c))&&(a=b.createElement("div",{className:c}),o=b.createElement("div",{className:Ot}),n=b.createElement("div",{className:pt}),s=b.createElement("div",{className:ct}),("Details"===e.view?t.querySelector("."+xt):t).appendChild(a),a.appendChild(o),a.appendChild(n),a.appendChild(s)),t.querySelector("."+c)&&(b.isNullOrUndefined(i.error)?e.isFiltered?(t.querySelector("."+pt).innerHTML=w(e,"Filter-Empty"),t.querySelector("."+ct).innerHTML=w(e,"Filter-Key")):""!==e.breadcrumbbarModule.searchObj.element.value?(t.querySelector("."+pt).innerHTML=w(e,"Search-Empty"),t.querySelector("."+ct).innerHTML=w(e,"Search-Key")):(t.querySelector("."+pt).innerHTML=w(e,"Folder-Empty"),t.querySelector("."+ct).innerHTML=w(e,"File-Upload")):(t.querySelector("."+pt).innerHTML=w(e,"Access-Denied"),t.querySelector("."+ct).innerHTML=w(e,"Access-Details"))),b.select("."+c,t));r=(r-o.offsetHeight)/2,o.style.marginTop=r+"px"}function Sn(e){return new h.DataManager(e).executeLocal((new h.Query).where("isFile","equal",!1,!1))}function Cn(e,t){for(var i=Sn(e.files),n=0,s=i.length;n<s;n++)b.setValue("_fm_id",t+"_"+n,i[n])}function jn(e,t,i){for(var n=0;n<e.length;n++){var s=new Date(b.getValue("dateCreated",e[n])),a=new Date(b.getValue("dateModified",e[n]));b.isNullOrUndefined(i)&&(i="MM/dd/yyyy"),b.setValue("_fm_created",t.formatDate(s,{format:i}),e[n]),b.setValue("_fm_modified",t.formatDate(a,{format:i}),e[n])}}function w(e,t){e=e.localeObj.getConstant(t);return""===e?t:e}function xn(e,t){e=e.cssClass;return b.isNullOrUndefined(e)||""===e?t:e+" "+t}function Nn(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=En(t.item.id):e.sortBy=En(t.item.id,e),e.itemData=[O(e)],"Details"===e.view&&(e.isMobile?pn(e,"Details"):(e.notify(Vi,{module:"detailsview"}),e.isSortByClicked=!1)),"LargeIcons"===e.view&&pn(e,"LargeIcons"),e.notify(Si,{})}function En(e,t){var i,e=e.substring(e.lastIndexOf("_")+1),n=e;switch(t&&(i=t.detailsViewSettings.columns),e){case"date":for(var s=0,a=i.length;s<a;s++){if("dateModified"===i[s].field||"dateCreated"===i[s].field){n=i[s].field;break}n="_fm_modified"}break;case"ascending":n="Ascending";break;case"descending":n="Descending";break;case"none":n="None"}return n}function Pn(e,t){for(var t=t.split("/"),i=e.originalPath.split("/"),n=b.getValue(e.pathId[0],e.feParent),s=b.isNullOrUndefined(b.getValue("id",n))?"name":"id",a=t.length-1,r=i.length-1;a<r;a++){var o,l=""===i[a+1]?u:ni,h=""===i[a]?"/":e.path+i[a]+"/",d=wn(e,s,i[parseInt(a.toString(),10)]);b.isNullOrUndefined(d)?e.originalPath=h:(o=b.getValue("_fm_id",d),e.setProperties({path:h},!0),e.pathId.push(o),e.itemData=[d],e.pathNames.push(b.getValue("name",d))),C(e,l,e.path);break}}function Rn(e,t){e.originalPath=vn(e,t,e.path);var i=b.getValue(e.pathId[0],e.feParent),n=e.feParent[b.getValue("_fm_id",e.itemData[0])],n=b.isNullOrUndefined(n)||"fe_tree"===b.getValue("_fm_id",n),i=wn(e,b.isNullOrUndefined(b.getValue("id",i))?"name":"id",j(e)?b.getValue("id",t):b.getValue("name",t));if(b.isNullOrUndefined(i)){if(n)return void Pn(e,e.path);e.notify(Di,{selectedNode:e.pathId[e.pathId.length-1]})}else{t=b.getValue("_fm_id",i);e.setProperties({path:e.originalPath},!0),e.pathId.push(t),e.itemData=[i],e.pathNames.push(b.getValue("name",i))}C(e,e.path!==e.originalPath?ni:u,e.path)}function Mn(e){var t;e.isDragDrop=!1,0!==e.selectedNodes.length&&e.enablePaste&&(t=""===e.folderPath?e.path:e.folderPath,"navigationpane"!==e.activeModule||e.selectedNodes[0].includes("/")||(e.targetPath=hs(e,e.actionRecords[0])),kn(e,e.actionRecords,t,e.path)||("move"===e.fileAction&&e.targetPath!==t||"copy"===e.fileAction?(e.notify(ki,{}),gs(e,e.targetPath,e.selectedNodes,t,e.fileAction,[],e.actionRecords)):(e.enablePaste=!1,e.notify(Pi,{}),I(e),x(e,"Error",{files:null,error:{code:"402",message:w(e,"Same-Folder-Error"),fileExists:null}}))))}function kn(e,t,i,n){for(var s=!1,a=0;a<t.length;a++)if(b.getValue("isFile",t[a])){var r=e.dragData[a]?e.dragData[a].name:null,r=j(e)?r:e.dragNodes[a],o=0,l="";if((l=0<(o=r?r.lastIndexOf("/"):o)?n+r.substring(0,o+1):l)===i){x(e,"Error",{files:null,error:{code:"402",message:w(e,"Same-Folder-Error"),fileExists:null}}),s=!0;break}}else{r=vn(e,t[a],n);if(0===i.indexOf(r)){x(e,"Error",{files:null,error:{code:"402",message:w(e,"Sub-Folder-Error"),fileExists:null}}),s=!0;break}}return s}function Ln(e){e.isDragDrop=!0,0!==e.dragData.length&&(e.dragPath=e.dragPath.replace(/\\/g,"/"),e.dropPath=e.dropPath.replace(/\\/g,"/"),kn(e,e.dragData,e.dropPath,e.dragPath)||e.dragPath===e.dropPath||(e.itemData=[e.dropData],gs(e,e.dragPath,e.dragNodes,e.dropPath,"move",[],e.dragData),e.notify(ki,{})))}function Tn(e){for(var t=e.split("/"),i=t[0]+"/",n=1;n<t.length-2;n++)i+=t[n]+"/";return i}function An(e,t){var i=b.getValue(e.hasId?"id":"name",t.cwd)+"/",t=b.getValue(e.hasId&&!b.isNullOrUndefined(e.ajaxSettings.url)?"filterId":"filterPath",t.cwd);return b.isNullOrUndefined(t)?j(e)?i:e.path+i:""===t?"/":t.replace(/\\/g,"/").replace(/^.*?(?=\/)/,"")+i}function Fn(e,t,i){"move"===t&&(e.isDragDrop?e.notify(zi,i):(e.enablePaste=!1,e.notify(Pi,{}),e.notify(Ti,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.trigger("success",{action:t,result:i}),!e.isDragDrop||e.path===e.dragPath||e.path===e.dropPath||e.isSearchDrag?(e.isPathDrag=!1,C(e,Li,e.path)):Vn(e)}function Vn(e){var t,i=b.getValue("_fm_id",e.dropData);e.expandedId=i,e.itemData=[e.dropData],e.isPathDrag?e.notify(ri,e.itemData):(e.navigationpaneModule&&((t=b.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element))||(i=document.querySelector('[data-id = "'+b.getValue("id",e.dropData)+'"]').getAttribute("data-uid"),t=b.select('[data-uid="'+i+'"]',e.navigationpaneModule.treeObj.element)),$i(t,e.dropData,e)),C(e,qi,e.dropPath))}function Un(e,t){for(var i=null,n=e.isDragDrop?e.dragData:e.actionRecords,s=0;s<n.length;s++)if(b.getValue("name",n[s])===t){i=n[s];break}return i}function _n(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(Jn(e,e.dragData[0]))}var i=e.createElement("div",{className:"e-fe-icon "+bn(e.dragData[0])}),n=e.createElement("div",{className:"e-fe-name",innerHTML:e.dragData[0].name}),s=e.createElement("div",{className:"e-fe-content"}),i=(s.appendChild(i),s.appendChild(n),e.createElement("div",{className:ut}));i.appendChild(s),1<e.dragNodes.length&&(n=e.createElement("span",{className:"e-fe-count",innerHTML:e.dragNodes.length.toString(10)}),i.appendChild(n)),e.virtualDragElement=i,e.element.appendChild(e.virtualDragElement)}function Hn(t,e){var i=e,n=(i.cancel=!1,null!=t.treeExpandTimer&&(window.clearTimeout(t.treeExpandTimer),t.treeExpandTimer=null),qn(t),t.element.classList.remove("e-fe-drop","e-no-drop"),I(t),t.uploadObj.dropArea=b.select("#"+t.element.id+Fe,t.element),b.select("."+ut,t.element));n&&b.detach(n),cn(t,e.target),t.notify(Bi,e),I(t,"hover"),i.fileDetails=t.dragData,t.trigger("fileDragStop",i,function(e){!e.cancel&&!b.isNullOrUndefined(t.targetModule)&&""!==t.targetModule&&2<t.dragCount&&Ln(t),t.dragCount=0})}function Bn(t,i,n){var e=i;if(e.cancel=!1,e.fileDetails=t.dragData,t.dragCount=0,t.droppedObjects=[],t.allowDragAndDrop&&("navigationpane"!==t.activeModule||b.closest(i.element,"li").getAttribute("data-uid")!==t.pathId[0])||(e.cancel=!0),"navigationpane"===t.activeModule&&-1!==t.pathId.indexOf(b.closest(i.element,"li").getAttribute("data-uid"))?t.isPathDrag=!0:t.isPathDrag=!1,I(t),e.cancel)n.intDestroy(i.event),zn(t);else if(!e.cancel){for(var s=0;s<t.activeElements.length;)on(t.activeElements[s]),s++;t.trigger("fileDragStart",e,function(e){e.cancel?(n.intDestroy(i.event),zn(t)):t.uploadObj.dropArea=null})}}function zn(e){I(e);e=b.select("."+ut,e.element);e&&b.detach(e)}function qn(e){Wn(e,gt),Wn(e,ft)}function Wn(e,t){for(var i=e.element.querySelectorAll("."+t),n=0;n<i.length;n++)i[n].classList.remove(t)}function Kn(e,t,i,n){var s,a=e.getBoundingClientRect(),i=b.select("."+i,e);n>=a.top+e.clientHeight-30&&!b.isNullOrUndefined(i)&&(s="navigationpane"===t.targetModule||"detailsview"===t.targetModule?i.offsetHeight/2.5:i.offsetHeight/4.5,e.scrollBy(0,s)),!b.isNullOrUndefined(i)&&n<=a.top+30&&(s="navigationpane"===t.targetModule||"detailsview"===t.targetModule?i.offsetHeight/2.5:i.offsetHeight/4.5,e.scrollBy(0,-s))}function Yn(e,t){var i=t,n=(i.fileDetails=e.dragData,!1),s=(cn(e,t.target),qn(e),null!=e.treeExpandTimer&&(window.clearTimeout(e.treeExpandTimer),e.treeExpandTimer=null),I(e,"hover"),null);"navigationpane"===e.targetModule?((s=b.closest(t.target,"li")).classList.add(st,gt),n=!0,e.treeExpandTimer=window.setTimeout(function(){e.notify(Wi,t)},800),Kn(e.navigationpaneModule.treeObj.element.parentElement,e,"e-level-2",t.event.y)):"detailsview"===e.targetModule?((s=b.closest(t.target,"tr"))&&s.querySelector("."+mt)&&!s.classList.contains(nt)?s.classList.add(gt):!s||s.querySelector("."+mt)||s.classList.contains(nt)||s.classList.add(ft),n=!0,Kn(e.detailsviewModule.gridObj.element.querySelector(".e-content"),e,"e-row",t.event.y)):"largeiconsview"===e.targetModule?((s=b.closest(t.target,"li"))&&s.querySelector("."+mt)&&!s.classList.contains(nt)&&s.classList.add(st,gt),n=!0,Kn(e.largeiconsviewModule.element.firstElementChild,e,"e-large-icon",t.event.y)):"breadcrumbbar"===e.targetModule&&(n=!0),e.element.classList.remove("e-fe-drop","e-no-drop"),e.element.classList.add(n?"e-fe-drop":"e-no-drop"),e.dragCount=e.dragCount+1,e.trigger("fileDragging",i)}function Gn(e){for(var t="",i=Object.keys(e),n=0;n<i.length;n++)"message"!==i[n]&&(t+=(0===n?"":", ")+i[n]+": "+b.getValue(i[n],e));return t}function Jn(e,t){return e.hasId?b.getValue("id",t):In(e,t)}function Qn(e,t){e.itemData=[t],e.currentItemText=b.getValue("name",t),e.isFile=b.getValue("isFile",t),e.filterPath=b.getValue("filterPath",t)}function Xn(e){S(e.itemData[0])?x(e,"Rename"):D(e,e.itemData[0],v)}function $n(e){for(var t=e.itemData,i=0;i<t.length;i++)if(!as(t[i]))return void D(e,t[i],Xi);0<e.selectedItems.length&&_s(e,e.path,e.selectedItems)}function Zn(e,t,i){for(var n=0;n<t.length;n++)if(!S(t[n]))return void D(e,t[n],v);e.itemData=t,fs(e,i,e.path,"delete")}function es(e,t,i){for(var n=0;n<t.length;n++)if(!as(t[n]))return void D(e,t[n],Xi);e.itemData=t,0<i.length&&_s(e,e.path,i)}function D(e,t,i){var n=b.getValue("message",b.getValue("permission",t));x(e,"Error",{error:{code:"401",fileExists:null,message:n=""===n?w(e,"Access-Message").replace("{0}",b.getValue("name",t)).replace("{1}",i):n}})}function ts(e){return is(e)?"e-fe-locked":"e-fe-locked e-fe-hidden"}function is(e){e=b.getValue("permission",e);return!(e&&!b.getValue("read",e))}function S(e){e=b.getValue("permission",e);return!e||b.getValue("read",e)&&b.getValue("write",e)}function ns(e){e=b.getValue("permission",e);return!e||b.getValue("read",e)&&b.getValue("writeContents",e)}function ss(e){e=b.getValue("permission",e);return!e||b.getValue("read",e)&&b.getValue("upload",e)}function as(e){e=b.getValue("permission",e);return!e||b.getValue("read",e)&&b.getValue("download",e)}function rs(e){var t=e.itemData[0];ns(t)?x(e,"NewFolder"):D(e,t,Ji)}function os(e){var t,i=e.itemData[0];ss(i)?(t="#"+e.element.id+Ue,document.querySelector(t).click()):D(e,i,Qi)}function ls(e){b.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide()}function hs(e,t){return e.hasId&&!b.isNullOrUndefined(b.getValue("filterId",t))?b.getValue("filterId",t).replace(/\\/g,"/").replace(/^[^/]+\//,"/"):b.getValue("filterPath",t).replace(/\\/g,"/")}function ds(e,t,i,n){for(var s="",a=0;a<t.length;a++){var r,o=b.getValue("permission",t[a]);if(null==o&&(o=void 0),n?!o||b.getValue("read",o)&&b.getValue("writeContents",o)||""===(s=b.getValue("message",b.getValue("permission",t[a])))&&(s=w(e,"Access-Message").replace("{0}",b.getValue("name",t[a])).replace("{1}","writeContents")):(r="copy"===i?b.getValue("copy",o):b.getValue("write",o),!o||b.getValue("read",o)&&r||""===(s=b.getValue("message",b.getValue("permission",t[a])))&&(s=w(e,"Access-Message").replace("{0}",b.getValue("name",t[a])).replace("{1}",i))),""!==s){e.responseData={cwd:null,details:null,error:{code:"401",message:s,fileExists:null},files:null};break}}return s}function C(e,t,i){for(var n=e.itemData,s=0;s<n.length;s++)b.isNullOrUndefined(b.getValue("hasChild",n[s]))&&b.setValue("hasChild",!1,n[s]);Cs(e,{action:"read",path:i,showHiddenItems:e.showHiddenItems,data:n},Ps,t)}function ps(e,t){Cs(e,{action:"create",path:e.path,name:t,data:e.itemData},Ms,t)}function cs(e,t){var i={action:"filter",path:e.path,showHiddenItems:e.showHiddenItems,data:[O(e)]},i=e.filterData?b.extend(void 0,i,e.filterData):i;Cs(e,i,Rs,t,b.getValue("action",i))}function us(e,t,i){var n,s;s=""===e.breadcrumbbarModule.searchObj.element.value&&!e.isFiltered||(s=e.filterPath,e.hasId)?(n=e.currentItemText,i):(n=(s=s.replace(/\\/g,"/")).replace(t,"")+e.currentItemText,s.replace(t,"")+i),Cs(e,{action:"rename",path:t,name:n,newName:s,data:e.itemData,showFileExtension:e.showFileExtension},ks,t)}function gs(e,t,i,n,s,a,r){i={action:s,path:t,targetData:e.itemData[0],targetPath:n,names:i,renameFiles:a,data:r};e.destinationPath=n,Cs(e,i,Ls,t,s,n)}function fs(e,t,i,n){Cs(e,{action:n,path:i,names:t,data:e.itemData},Ts,i)}function ms(e,t,i,n){Cs(e,{action:n,path:i,names:t,data:e.itemData},As,i,n)}function j(e){return 0<=e.fileSystemData.length&&b.isNullOrUndefined(e.ajaxSettings.url)}function bs(e,t){return e.some(function(e){return e.name===t})}function ys(e,t){return e.fileSystemData.findIndex(function(e){return!b.isNullOrUndefined(e)&&String(e.id)===String(t)})}function vs(e,t){return e.fileSystemData.filter(function(e){return String(e.id)===String(t)})[0]}function Is(e,t){return e.fileSystemData.filter(function(e){return String(e.parentId)===String(t)})}function Os(e,t,i,n){var s,a={};for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&(a[s]=null);var r=new Date,o=String(t.id)===String(0)||b.isNullOrUndefined(t.parentId)?"\\":t.filterPath+t.name+"\\";return Object.assign(a,{dateCreated:r,dateModified:r,filterPath:o,hasChild:!!n&&e.hasChild,id:F.getUid(null===i?e.name:i),isFile:!!n&&e.isFile,name:null===i?e.name:i,parentId:t.id,size:n?e.size:0,type:n?e.type:""}),a}function ws(e,t,i,n){e.responseData={cwd:null,details:null,error:{code:i,message:t,fileExists:null!=n?n:null},files:null}}function Ds(n,e,s){e={cancel:!1,newName:b.getValue("newName",e),itemData:b.getValue("data",e),path:b.getValue("path",e)};n.trigger("beforeRename",e,function(e){var t,i;e.cancel?s.cancel=!0:j(n)&&(bs(n.fileSystemData,e.newName)?(t="Cannot rename"+e.itemData[0].name+"to"+e.newName+": destination already exists.",ws(n,t,"400",null)):(i=(t=vs(n,e.itemData[0].id)).name,t.name=e.newName,function i(n,s,a,r){n.fileSystemData.forEach(function(e){var t;String(e.parentId)===String(s)&&(t=e.filterPath,t=t.replace(a+"\\",r+"\\"),e.filterPath=t,i(n,e.id,a,r))})}(n,t.id,i,e.newName)))})}function Ss(e,t,i){switch(b.getValue("action",t)){case"create":h=e,d=t,p=i,d={folderName:b.getValue("name",d),cancel:!1,path:b.getValue("path",d),parentFolder:b.getValue("data",d)},h.trigger("beforeFolderCreate",d,function(e){var t;e.cancel?p.cancel=!0:j(h)&&(bs(h.fileSystemData,e.folderName)?(t="A file or folder with the name "+e.folderName+" already exists.",ws(h,t,"400",null)):(t=Os(t=e.parentFolder[0],t,e.folderName,!1),h.fileSystemData.push(t)))});break;case"delete":o=e,d=t,l=i,d={cancel:!1,itemData:b.getValue("data",d),path:b.getValue("path",d)},o.trigger("beforeDelete",d,function(e){e.cancel?l.cancel=!0:j(o)&&e.itemData.forEach(function(t){var e=ys(o,t.id);-1!==e&&o.fileSystemData.splice(e,1),t.isFile||o.fileSystemData.filter(function(e){return e.filterPath.includes(t.name)}).forEach(function(e){e=ys(o,e.id);-1!==e&&o.fileSystemData.splice(e,1)})})});break;case"rename":Ds(e,t,i);break;case"move":case"copy":u=e,g=t,f=i,r={cancel:!1,itemData:b.getValue("data",g),isCopy:"copy"===b.getValue("action",g),path:b.getValue("path",g),targetData:b.getValue("targetData",g),targetPath:b.getValue("targetPath",g)},u.trigger("beforeMove",r,function(i){if(i.cancel)f.cancel=!0;else if(j(u)){var n,e="File Already Exists",t=b.getValue("action",g),s=ds(u,i.itemData,t,!1),t=ds(u,[i.targetData],t,!0),a=[];if(u.pasteNodes=[],""===s&&""===t){if(i.isCopy)n=Is(u,i.targetData.id),i.itemData.forEach(function(e){var t;!bs(n,e.name)||0<b.getValue("renameFiles",g).length?0<b.getValue("renameFiles",g).length?(t=e.name.split("."),t=e.name.includes(".")?t[0]+"("+u.existingFileCount+")."+t[1]:t[0]+"("+u.existingFileCount+")",Ns(u,e,i.targetData,t),u.responseData.error=null,u.existingFileCount++):Ns(u,e,i.targetData,null):a.push(e.name)});else for(var r=i.targetData,o=Is(u,r.id),l=0;l<i.itemData.length;l++){var h,d,p,c=i.itemData[l];!bs(o,c.name)||0<b.getValue("renameFiles",g).length?(r.hasChild||(r.hasChild=!c.isFile,0<(h=u.fileSystemData.filter(function(e){return String(e.id)===String(r.id)})).length&&(h[0].hasChild=r.hasChild)),c.isFile||(h=0!==c.parentId?Is(u,c.parentId):[],vs(u,c.parentId).hasChild=1<h.length),d=vs(u,c.id),0<b.getValue("renameFiles",g).length&&(p=c.name.split("."),c.name=c.name.includes(".")?p[0]+"("+u.existingFileCount+")."+p[1]:p[0]+"("+u.existingFileCount+")",d.name=c.name,u.responseData.error=null,u.existingFileCount++,u.dropData=r,u.dropPath=i.path,p=i.targetPath.replace(/^\/|\/$/g,"").split("/"),r=vs(u,p[p.length-1])),d.parentId=r.id,d.filterPath=0===r.id?"\\":r.filterPath+r.name+"\\"):a.push(c.name)}0<a.length&&ws(u,e,"400",a)}}});break;case"search":r=e,n=t,s=i,a={searchResults:b.getValue("data",n),cancel:!1,path:b.getValue("path",n),searchText:b.getValue("searchString",n),caseSensitive:b.getValue("caseSensitive",n),showHiddenItems:b.getValue("showHiddenItems",n)},r.trigger("search",a,function(e){b.setValue("data",e.searchResults,n),e.cancel&&(s.cancel=!0)})}var n,s,a,u,g,f,r,o,l,h,d,p}function Cs(r,o,l,h,d,p){var e={url:r.ajaxSettings.url,type:"POST",mode:!0,dataType:"json",contentType:"application/json",data:JSON.stringify(o),onSuccess:null,onFailure:null,beforeSend:null},e={action:b.getValue("action",o),ajaxSettings:e,cancel:!1};Ss(r,o,e),r.trigger("beforeSend",e,function(i){var e,t,n,s,a;i.cancel||(r.notify(ui,{}),j(r)?(t=("node-expand"===h||"finalize-end"===h||"rename-end-parent"===h?b.getValue("path",o):r.path).replace(/^\/|\/$/g,"").split("/"),t="rename-end-parent"===h||"path-changed"===h&&0!==b.getValue("data",o).length&&b.isNullOrUndefined(r.renamedItem)?b.getValue("data",o)[0].id:t[t.length-1],n=("move"===(s=b.getValue("action",o))||"rename"===s||"copy"===s||"delete"===s||"search"===s)&&"rename-end"!==h,"read"===s||"create"===s||"rename-end"===h?(e=0<r.fileSystemData.filter(function(e){return b.isNullOrUndefined(e.parentId)}).length?r.fileSystemData.filter(function(e){return b.isNullOrUndefined(e.parentId)})[0].id:0,r.responseData={cwd:vs(r,"/"===r.path&&"node-expand"!==h&&"rename-end-parent"!==h?e:t),details:null,error:null,files:Is(r,"/"===r.path&&"node-expand"!==h&&"rename-end-parent"!==h?e:t)},b.isNullOrUndefined(r.responseData.cwd)&&ws(r,"Cannot load empty data within the File Manager.","400",null)):n&&null===r.responseData.error?(0===(a="search"===s||"delete"===s?b.getValue("data",o):[]).length&&(a="copy"===s?r.pasteNodes.map(function(e){return vs(r,e)}):b.getValue("data",o).map(function(e){return vs(r,e.id)})),r.responseData={cwd:null,details:null,error:null,files:a}):"details"===b.getValue("action",o)&&(e=(a=b.getValue("data",o))[0],t=1<a.length,n=a.map(function(e){return e.name}),s=js(t?a.reduce(function(e,t){return e+(t.size||0)},0):e.size),a=r.pathNames.includes(e.name)||t?r.pathNames.join("/"):r.pathNames.join("/")+"/"+e.name,r.responseData.details=Object.assign({location:a,multipleFiles:t,name:n.join(", "),size:s},t?{}:{created:e.dateCreated,isFile:e.isFile,modified:e.dateModified,permission:e.permission})),xs(r,r.responseData,l,o,h,d,p,i)):new b.Ajax({url:b.getValue("url",i.ajaxSettings),type:b.getValue("type",i.ajaxSettings),mode:b.getValue("mode",i.ajaxSettings),dataType:b.getValue("dataType",i.ajaxSettings),contentType:b.getValue("contentType",i.ajaxSettings),data:b.getValue("data",i.ajaxSettings),beforeSend:b.getValue("beforeSend",i.ajaxSettings),onSuccess:function(e){var t;b.isNullOrUndefined(e)?(t={error:{fileExists:null,message:w(r,"Server-Error")+" "+r.ajaxSettings.url,code:"406"},files:null},Es(r,i,l,t,h,d,p)):("string"==typeof e&&(e=JSON.parse(e)),xs(r,e,l,o,h,d,p,i))},onFailure:function(){var e={files:null,error:{code:"404",message:w(r,"Network-Error")+" "+r.ajaxSettings.url,fileExists:null}};Es(r,i,l,e,h,d,p)}}).send())})}function js(e){e=e<1024?e+" B":e<1048576?(e/1024).toFixed(2)+" KB":e<1073741824?(e/1024/1024).toFixed(2)+" MB":(e/1024/1024/1024).toFixed(2)+" GB";return e}function xs(e,t,i,n,s,a,r,o){e.notify(fi,{action:"success"});var l=e.expandedId||e.pathId[e.pathId.length-1],h=(b.isNullOrUndefined(t.cwd)||"read"!==b.getValue("action",n)||(t.cwd.name=1===e.pathId.length&&e.rootAliasName||t.cwd.name,b.setValue("_fm_id",l,t.cwd),b.setValue(l,t.cwd,e.feParent),b.isNullOrUndefined(t.files)&&"401"!==t.error.code)||("finalize-end"!==s&&"initial-end"!==s||0!==e.pathNames.length||(h=b.getValue(e.pathId[0],e.feParent),e.pathNames[0]=b.getValue("name",h),e.hasId=!b.isNullOrUndefined(b.getValue("id",h))),"finalize-end"===s&&sn(e)),new b.Internationalization(e.locale));if(!b.isNullOrUndefined(t.files)){jn(t.files,h,function(e){var t,i=e.detailsViewSettings.columns;if(!i)return null;for(var n=0;n<i.length;n++)if("_fm_modified"===i[n].field){b.isNullOrUndefined(i[n].format)||(t=i[n].format.toString());break}return t}(e));for(var d=0,p=t.files.length;d<p;d++){var c=t.files[d];b.setValue("_fm_iconClass",bn(c),c)}"read"===b.getValue("action",n)&&(Cn(t,l),b.setValue(l,t.files,e.feFiles))}b.isNullOrUndefined(t.details)||b.isNullOrUndefined(e.rootAliasName)||(h=e.rootAliasName||b.getValue("name",t.details),l=b.getValue("location",t.details).replace(new RegExp("/","g"),"\\"),l=("/"===b.getValue("path",n)||e.hasId&&1===b.getValue("path",n).match(/[/]/g).length)&&(0===b.getValue("names",n).length&&b.setValue("name",h,t.details),-1===l.indexOf("\\"))?h:l.replace(l.substring(0,l.indexOf("\\")),h),b.setValue("location",l,t.details)),i(e,t,s,a,r),b.isNullOrUndefined(t.files)||"path-changed"!==s&&"finalize-end"!==s&&"open-end"!==s&&"drop-path"!==s||e.notify(_i,t),"function"==typeof b.getValue("onSuccess",o.ajaxSettings)&&b.getValue("onSuccess",o.ajaxSettings)()}function Ns(e,t,i,n){for(var s=Os(t,i,n,!0),a=(e.fileSystemData.push(s),e.pasteNodes.push(s.id),Is(e,t.id)),r=0;r<a.length;r++)Ns(e,a[r],s,null)}function Es(e,t,i,n,s,a,r){e.notify(fi,{action:"failure"}),i(e,n,s,a,r),"function"==typeof b.getValue("onFailure",t.ajaxSettings)&&b.getValue("onFailure",t.ajaxSettings)()}function Ps(t,e,i){try{b.isNullOrUndefined(e.files)?(b.isNullOrUndefined(e.error)||"401"!==e.error.code||(e.files=[],t.notify(i,e),t.notify(f,{})),Fs(t,e,"read"),t.setProperties({path:t.oldPath},!0),t.pathNames.pop()):(t.notify(i,e),t.notify(f,{}),n={action:"read",result:e},t.trigger("success",n))}catch(e){Hs(t,e,"read"),t.setProperties({path:t.oldPath},!0),t.pathNames.pop()}var n;t.isDragDrop&&t.isDropEnd&&(0!==t.droppedObjects.length&&(n={fileDetails:t.droppedObjects},t.trigger("fileDropped",n)),t.isDropEnd=t.isDragDrop=!1)}function Rs(t,e,i,n){try{var s;b.isNullOrUndefined(e.files)?Fs(t,e,n):(t.notify(i,e),s={action:n,result:e},t.trigger("success",s))}catch(e){Hs(t,e,n)}}function Ms(e,t,i){try{var n,s,a,r;b.isNullOrUndefined(t.files)?"400"===t.error.code?(e.dialogObj&&e.dialogObj.visible?(n=b.select("#newname",e.dialogObj.element),s=w(e,"Validation-NewFolder-Exists").replace("{0}",'"'+n.value+'"'),n.parentElement.nextElementSibling.innerHTML=s):x(e,"Error",{files:null,error:{code:"400",message:w(e,"Validation-NewFolder-Exists").replace("{0}",'"'+i+'"'),fileExists:null}}),r={action:"create",error:t.error},e.trigger("failure",r)):(e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),Fs(e,t,"create")):(e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),e.createdItem=j(e)?t.files[t.files.length-1]:t.files[0],e.breadcrumbbarModule.searchObj.value="",a={folderName:i,path:e.path,parentFolder:e.itemData},e.trigger("folderCreate",a),r={action:"create",result:t},e.trigger("success",r),e.itemData=[O(e)],C(e,si,e.path))}catch(s){e.dialogObj&&e.dialogObj.visible&&e.dialogObj.hide(),Hs(e,s,"create")}}function ks(e,t){try{var i,n,s,a,r,o,l;b.isNullOrUndefined(t.files)?"400"===t.error.code&&e.dialogObj&&e.dialogObj.visible?(i=b.select("#rename",e.dialogObj.element),n=(n=w(e,"Validation-Rename-Exists").replace("{0}",'"'+e.currentItemText+'"')).replace("{1}",'"'+i.value+'"'),i.parentElement.nextElementSibling.innerHTML=n,s={action:"rename",error:t.error},e.trigger("failure",s)):(b.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),Fs(e,t,"rename")):(b.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),s={action:"rename",result:t},e.trigger("success",s),e.renamedItem=Array.isArray(t.files)?t.files[0]:t.files,a={newName:e.renamedItem.name,itemData:[e.renamedItem],path:e.path},e.trigger("rename",a),"navigationpane"===e.activeModule?(r=O(e),o=e.pathId[e.pathId.length-1].split("_").length-2,e.pathId.pop(),e.itemData=[b.getValue(e.pathId[e.pathId.length-1],e.feParent)],l=hs(e,e.renamedItem),C(e,Ni,l),!b.isNullOrUndefined(r)&&1<e.pathNames.length&&o<=e.pathNames.length-1&&(e.pathNames[o]=e.renameText,e.hasId||e.setProperties({path:"/"+e.pathNames.slice(1).join("/")+"/"},!0)),e.itemData=0<e.navigationpaneModule.previousSelected.length?e.navigationpaneModule.treeObj.getTreeData(e.navigationpaneModule.previousSelected[0]):e.itemData,C(e,g,e.path),e.itemData[0]=e.renamedItem,e.renamedItem=null):(e.itemData=[O(e)],""!==e.breadcrumbbarModule.searchObj.value?Vs(e,y,e.path,e.searchWord,e.showHiddenItems,!e.searchSettings.ignoreCase):e.isFiltered?cs(e,y):C(e,y,e.path)))}catch(n){b.isNullOrUndefined(e.dialogObj)||e.dialogObj.hide(),Hs(e,n,"rename")}}function Ls(t,e,i,n){try{var s={itemData:e.files,isCopy:"copy"===n,path:i,targetData:t.itemData[0],targetPath:t.path};t.trigger("move",s),e.error&&e.error.fileExists?(t.fileLength=0,b.isNullOrUndefined(e.files)||(t.isPasteError=!0,Fn(t,n,e)),Bs(t,"DuplicateItems",e.error.fileExists),"404"===e.error.code&&x(t,"Error",e)):e.error||b.isNullOrUndefined(e.files)?e.error&&!b.isNullOrUndefined(e.files)?(t.isPasteError=!0,Fn(t,n,e),x(t,"Error",e)):Fs(t,e,n):(t.isPasteError=!1,Fn(t,n,e))}catch(e){Hs(t,e,n)}}function Ts(t,e,i){try{var n,s={itemData:e.files,path:i};t.trigger("delete",s),b.isNullOrUndefined(e.files)||(t.setProperties({path:i},!0),t.itemData=[O(t)],C(t,li,t.path),e.error)?Fs(t,e,"delete"):(n={action:"delete",result:e},t.trigger("success",n))}catch(e){Hs(t,e,"delete")}}function As(t,e,i,n){try{var s;b.isNullOrUndefined(e.details)?Fs(t,e,"details"):(x(t,n,null,e.details),s={action:"details",result:e},t.trigger("success",s))}catch(e){Hs(t,e,"details")}}function Fs(e,t,i){x(e,"Error",t);i={action:i,error:t.error};e.trigger("failure",i)}function Vs(e,t,i,n,s,a){Cs(e,{action:"search",path:i,searchString:n,showHiddenItems:s,caseSensitive:a,data:e.itemData},Us,t)}function Us(t,e,i){try{var n;b.isNullOrUndefined(e.files)?Fs(t,e,"search"):(t.notify(i,e),n={action:"search",result:e},t.trigger("success",n))}catch(e){Hs(t,e,"search")}}function _s(a,e,t){var r=a.ajaxSettings.downloadUrl||a.ajaxSettings.url,e={action:"download",path:e,names:t,data:a.itemData},t={url:r,type:"POST",contentType:"application/json",responseType:"blob",data:JSON.stringify(e),onSuccess:null,onFailure:null,beforeSend:null};a.trigger("beforeDownload",{data:e,cancel:!1,useFormPost:!0,ajaxSettings:t},function(i){if(!i.cancel)if(i.useFormPost){var e=b.createElement("form",{id:a.element.id+"_downloadForm",attrs:{action:r,method:"post",name:"downloadForm",download:""}}),t=b.createElement("input",{id:a.element.id+"_hiddenForm",attrs:{name:"downloadInput",value:JSON.stringify(i.data),type:"hidden"}});e.appendChild(t),a.element.appendChild(e),document.forms.namedItem("downloadForm").submit(),a.element.removeChild(e)}else try{var n,s;new b.Fetch({url:b.getValue("url",i.ajaxSettings),type:b.getValue("type",i.ajaxSettings),contentType:b.getValue("contentType",i.ajaxSettings),responseType:b.getValue("responseType",i.ajaxSettings),beforeSend:b.getValue("beforeSend",i.ajaxSettings),onLoad:function(e){n=e.headers.get("Content-Disposition"),s=n?(e=(e=n.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/))&&e[1])?e.replace(/['"]/g,""):s:1<a.itemData.length?"files.zip":b.getValue("isFile",a.itemData[0])?b.getValue("name",a.itemData[0]):b.getValue("name",a.itemData[0])+".zip"},onSuccess:function(e){a.trigger("success",i);var e=URL.createObjectURL(e),t=document.createElement("a");t.href=e,t.download=s,document.body.appendChild(t),t.click(),document.body.removeChild(t)},onFailure:function(e){e={error:{code:e.status.toString(),message:w(a,"Network-Error")+" "+a.ajaxSettings.downloadUrl}};x(a,"Error",e),a.trigger("failure",i)}}).send(JSON.stringify(i.data))}catch(e){Hs(a,e,"download")}})}function Hs(e,t,i){Fs(e,{files:null,error:{message:t.message,fileExists:null}},i)}function x(t,e,i,n){var s=function(t,e,i,n){var s,a,r,o={header:"",content:"",buttons:[],dialogName:"",open:function(){Ws(t,t.dialogObj,o.dialogName)},close:function(){Ks(t,t.dialogObj,o.dialogName)}};switch(e=n&&!0===n.multipleFiles?"MultipleFileDetails":e){case"NewFolder":o.dialogName="Create Folder",o.header=w(t,"Header-NewFolder"),o.content='<input type="text" value="New folder" id="newname"><div class="e-fe-error"></div>',o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Create")},click:function(e){"keydown"!==e.type&&Zs(t)}}],o.open=function(t){var e=b.select("#newname",t.dialogObj.element);e.parentElement.classList.contains("e-control-wrapper")||Js(e,w(t,"Content-NewFolder"));e.parentElement.nextElementSibling.innerHTML="",e.oninput=function(){ta(t,e)},e.onkeyup=function(e){13===sa(e)&&Zs(t)},function(e){var e=b.select("#newname",e.dialogObj.element),t=(e.focus(),e.value="",e.value.length);e.setSelectionRange(0,t)}(t),Ws(t,t.dialogObj,"Create Folder")}.bind(this,t);break;case"Delete":o.dialogName="Delete",1<t.selectedItems.length?(o.content=("<div>"+w(t,"Content-Multiple-Delete")+"</div>").replace("{0}",t.selectedItems.length.toString()),o.header=w(t,"Header-Multiple-Delete")):(o.content="<div>"+w(t,t.isFile?"Content-Delete":"Content-Folder-Delete")+"</div>",o.header=w(t,t.isFile?"Header-Delete":"Header-Folder-Delete")),o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Yes")},click:function(){var e;(e=t).dialogObj.hide(),e.notify(oi,{})}},{buttonModel:{content:w(t,"Button-No")},click:function(){t.dialogObj.hide()}}];break;case"Rename":o.dialogName="Rename",o.header=w(t,"Header-Rename"),o.content='<input type="text" class="e-input" id="rename"><div class="e-fe-error"></div>',o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Save")},click:function(e){"keydown"!==e.type&&ea(t)}}],o.open=function(t){var e=b.select("#rename",t.dialogObj.element);e.parentElement.classList.contains("e-control-wrapper")||Js(e,w(t,"Content-Rename"));e.parentElement.nextElementSibling.innerHTML="",e.oninput=function(){ta(t,e)},e.onkeyup=function(e){13===sa(e)&&ea(t)},function(e,t){t.focus();var i="";{var n;i=!e.isFile||e.showFileExtension||(n=e.currentItemText.lastIndexOf("."),-1===n)?e.currentItemText:e.currentItemText.substring(0,n)}t.value=i,e.isFile&&e.showFileExtension&&-1!==t.value.indexOf(".")?t.setSelectionRange(0,t.value.lastIndexOf(".")):t.setSelectionRange(0,t.value.length)}(t,e),Ws(t,t.dialogObj,"Rename")}.bind(this,t);break;case"details":o.dialogName="File Details",a=new b.Internationalization(t.locale),a=a.formatDate(new Date(n.modified),{format:"MMMM dd, yyyy HH:mm:ss"}),s="",b.isNullOrUndefined(n.permission)||(s="<tr><td>"+w(t,"Permission")+'</td><td class="'+ii+'" >'+Gn(n.permission)+"</td></tr>"),o.header=n.name,o.content="<table><tr><td>"+w(t,"Type")+'</td><td class="'+ii+'" title="'+(n.isFile?"File":"Folder")+'">'+(n.isFile?"File":"Folder")+"</td></tr><tr><td>"+w(t,"Size")+'</td><td><span class="'+ii+'" title ="'+n.size+'">'+n.size+"</span></td></tr><tr><td>"+w(t,"Location")+'</td><td class="'+ii+'" title="'+n.location+'">'+n.location+"</td></tr><tr><td>"+w(t,"Modified")+'</td><td class="'+ii+'" >'+a+"</td></tr>"+s+"</table>",o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Ok")},click:function(){t.dialogObj.hide()}}];break;case"MultipleFileDetails":o.dialogName="File Details",void 0===(a=t.itemData.map(function(e){return 0!==(r=e.name.indexOf(".")+1)||e.isFile?0!==r?e.name.substr(r).replace(" ",""):"undetermined":"Folder"}))[0]&&(a=n.name.split(",").map(function(e){return 0===(r=e.indexOf(".")+1)?"Folder":e.substr(r).replace(" ","")})),s=a.every(function(e,t,i){return e===i[0]})?"Folder"===a[0]?"Folder":a[0].toLocaleUpperCase()+" Type":"Multiple Types",a=n.location,o.header=n.name,o.content="<table><tr><td>"+w(t,"Type")+':</td><td class="'+ii+'">'+s+"</td></tr><tr><td>"+w(t,"Size")+":</td><td>"+n.size+'<span class="'+ii+'" title ="'+n.size+'"></span></td></tr><tr><td>'+w(t,"Location")+':</td><td class="'+ii+'" title="'+a+'">'+a+"</td></tr></table>",o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Ok")},click:function(e){"keydown"!==e.type&&t.dialogObj.hide()}}];break;case"Error":t.notify(bi,{}),o.dialogName="Error","401"===i.error.code?o.header='<span class="e-fe-icon e-fe-access-error"></span><div class="e-fe-access-header">'+w(t,"Access-Denied")+"</div>":o.header=w(t,"Error"),o.content='<div class="'+Gt+'">'+i.error.message+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:w(t,"Button-Ok")},click:function(){t.dialogObj.hide()}}]}return o}(t,e,i,n);b.isNullOrUndefined(t.dialogObj)?(t.dialogObj=new r.Dialog({beforeOpen:Qs.bind(this,t,s.dialogName),beforeClose:function(e){qs(t,t.dialogObj,e,s.dialogName)},header:s.header,content:s.content,buttons:s.buttons,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,allowDragging:!0,isModal:!0,target:t.popupTarget||"#"+t.element.id,cssClass:xn(t,t.isMobile?Ke:qe),width:"350px",open:s.open,close:s.close,enableRtl:t.enableRtl,enableHtmlSanitizer:t.enableHtmlSanitizer,locale:t.locale}),t.dialogObj.isStringTemplate=!0,t.dialogObj.appendTo("#"+t.element.id+Me)):function(t,i){t.dialogObj.header=i.header,t.dialogObj.content=i.content,t.dialogObj.buttons=i.buttons,t.dialogObj.enableRtl=t.enableRtl,t.dialogObj.open=i.open,t.dialogObj.close=i.close,t.dialogObj.beforeOpen=Qs.bind(this,t,i.dialogName),t.dialogObj.beforeClose=function(e){qs(t,t.dialogObj,e,i.dialogName)},t.dialogObj.dataBind(),t.dialogObj.show()}(t,s)}function Bs(t,e,i,n){var s=function(n,e,s,t){var a,i,r,o={header:"",content:"",buttons:[],dialogName:"",open:function(){Ws(n,n.extDialogObj,o.dialogName)},close:function(){Ks(n,n.extDialogObj,o.dialogName)}};switch(e){case"Extension":o.header=w(n,"Header-Rename-Confirmation"),o.content="<div>"+w(n,"Content-Rename-Confirmation")+"</div>",o.buttons=[{buttonModel:{isPrimary:!0,content:w(n,"Button-Yes")},click:function(){n.extDialogObj.hide(),us(n,t,n.renameText)}},{buttonModel:{content:w(n,"Button-No")},click:function(){n.extDialogObj.hide(),n.dialogObj.hide()}}],o.dialogName="Extension Change";break;case"DuplicateItems":o.dialogName="Duplicate Items",n.replaceItems=s,i=n.replaceItems[n.fileLength],i=-1===(r=i.lastIndexOf("/"))?i:i.substring(r),o.header=w(n,"Header-Duplicate"),a="<div>"+w(n,"Content-Duplicate")+"</div>",o.content=a.replace("{0}",i),o.close=function(){var e;n.isDropEnd||0!==n.duplicateItems.length||(e={fileDetails:n.droppedObjects},n.trigger("fileDropped",e),n.isDropEnd=n.isDragDrop=!1),Ks(n,n.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:w(n,"Button-Yes")},click:function(){var e,t,i;n.duplicateItems.push(n.replaceItems[n.fileLength]),n.duplicateRecords.push(Un(n,n.replaceItems[n.fileLength])),n.fileLength++,s[n.fileLength]?(t=-1===(e=(t=n.replaceItems[n.fileLength]).lastIndexOf("/"))?t:t.substring(e),n.extDialogObj.content=a.replace("{0}",t),n.extDialogObj.show()):(n.extDialogObj.hide(),e=n.isDragDrop?n.dragPath:n.targetPath,t=n.isDragDrop?n.dropPath:""===n.folderPath?n.path:n.folderPath,i=n.isDragDrop?"move":n.fileAction,gs(n,e,n.duplicateItems,t,i,n.duplicateItems,n.duplicateRecords))}},{buttonModel:{content:w(n,"Button-No")},click:function(){var e,t,i;n.fileLength++,s[n.fileLength]?(t=-1===(e=(t=n.replaceItems[n.fileLength]).lastIndexOf("/"))?t:t.substring(e),n.extDialogObj.content=a.replace("{0}",t),n.extDialogObj.show()):(n.extDialogObj.hide(),0!==n.duplicateItems.length&&(e=n.isDragDrop?"move":n.fileAction,t=n.isDragDrop?n.dragPath:n.targetPath,i=n.isDragDrop?n.dropPath:""===n.folderPath?n.path:n.folderPath,gs(n,t,n.duplicateItems,i,e,n.duplicateItems,n.duplicateRecords)))}}];break;case"UploadRetry":o.dialogName="Retry Upload",o.header=w(n,"Header-Retry"),o.content=n.retryFiles[0].name+'<div class="e-fe-retrycontent">'+w(n,"Content-Retry")+"</div>",o.open=function(t,e){t.isRetryOpened=!0;var e=b.getValue("element",e),e=b.select(".e-dlg-content",e),i=t.createElement("div",{className:"e-dlg-checkbox"}),n=t.createElement("input",{id:t.element.id+"_applyall"});i.appendChild(n),e.appendChild(i),new U.CheckBox({label:w(t,"ApplyAll-Label"),change:function(e){t.isApplySame=e.checked}}).appendTo("#"+t.element.id+"_applyall"),Ws(t,t.extDialogObj,"Retry Upload")}.bind(this,n),o.close=function(){n.isRetryOpened=!1,Gs(n),Ks(n,n.extDialogObj,o.dialogName)},o.buttons=[{buttonModel:{isPrimary:!0,content:w(n,"Button-Keep-Both")},click:function(){Ys(n,!0)}},{buttonModel:{isPrimary:!0,content:w(n,"Button-Replace")},click:function(){Ys(n,!1)}},{buttonModel:{isPrimary:!0,content:w(n,"Button-Skip")},click:function(){var e=0;n.isApplySame?(e=n.retryFiles.length,n.retryFiles=[],Gs(n)):(n.retryFiles.splice(0,e=1),0!==n.retryFiles.length?Bs(n,"UploadRetry"):Gs(n)),n.notify(gi,{count:e})}}]}return o}(t,e,i,n);t.isApplySame=!1,b.isNullOrUndefined(t.extDialogObj)?(t.extDialogObj=new r.Dialog({beforeOpen:Xs.bind(this,t,s.dialogName),beforeClose:function(e){qs(t,t.extDialogObj,e,s.dialogName)},content:s.content,header:s.header,closeOnEscape:!0,allowDragging:!0,animationSettings:{effect:"None"},target:t.popupTarget||"#"+t.element.id,cssClass:xn(t,t.isMobile?Ke:qe),enableRtl:t.enableRtl,showCloseIcon:!0,isModal:!0,width:350,buttons:s.buttons,open:s.open,close:s.close,enableHtmlSanitizer:t.enableHtmlSanitizer,locale:t.locale}),t.extDialogObj.isStringTemplate=!0,t.extDialogObj.appendTo("#"+t.element.id+Le)):(t.extDialogObj.header=s.header,t.extDialogObj.close=s.close,t.extDialogObj.open=s.open,t.extDialogObj.close=s.close,t.extDialogObj.content=s.content,t.extDialogObj.buttons=s.buttons,t.extDialogObj.enableRtl=t.enableRtl,t.extDialogObj.locale=t.locale,t.extDialogObj.beforeOpen=Xs.bind(this,t,s.dialogName),t.extDialogObj.beforeClose=function(e){qs(t,t.extDialogObj,e,s.dialogName)},t.extDialogObj.dataBind(),t.extDialogObj.show())}function zs(e,t,i,n){n={cancel:i.cancel,popupName:n,popupModule:t};e.trigger("beforePopupOpen",n,function(e){i.cancel=e.cancel})}function qs(t,e,i,n){e={cancel:i.cancel,popupModule:e,popupName:n};t.trigger("beforePopupClose",e,function(e){i.cancel=e.cancel,i.cancel||!i.isInteracted||"Rename"!==n&&"Create Folder"!==n||t.trigger(bi,{})})}function Ws(e,t,i){t={popupModule:t,element:t.element,popupName:i};e.trigger("popupOpen",t)}function Ks(e,t,i){t={popupModule:t,element:t.element,popupName:i};e.trigger("popupClose",t)}function Ys(e,t){if(e.isApplySame){if(t)for(var i=e;0!==i.retryFiles.length;)i.retryArgs.push({action:"keepboth",file:i.retryFiles[0]}),i.uploadObj.retry(i.retryFiles[0]),i.retryFiles.splice(0,1);else for(var n=e;0!==n.retryFiles.length;)n.retryArgs.push({action:"replace",file:n.retryFiles[0]}),n.uploadObj.retry(n.retryFiles[0]),n.retryFiles.splice(0,1);Gs(e)}else 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?Bs(e,"UploadRetry"):Gs(e)}function Gs(e){var t=!0,i=(e.isRetryOpened?e.isRetryOpened=!1:t=!1,b.select(".e-dlg-checkbox",e.extDialogObj.element));i&&b.remove(i),t?e.extDialogObj.hide():e.retryFiles=[]}function Js(e,t){V.Input.createInput({element:e,properties:{placeholder:t}})}function Qs(e,t,i){$s(b.selectAll(".e-btn",e.dialogObj.element)),zs(e,e.dialogObj,i,t)}function Xs(e,t,i){$s(b.selectAll(".e-btn",e.extDialogObj.element)),zs(e,e.extDialogObj,i,t)}function $s(i){for(var e=0;e<i.length;e++)!function(t){i[t].onkeydown=function(e){13===e.keyCode&&e.preventDefault()},i[t].onkeyup=function(e){13===e.keyCode&&i[t].click()}}(e)}function Zs(e){var t=b.select("#newname",e.dialogObj.element);ia(e,t),""===t.parentElement.nextElementSibling.innerHTML&&ps(e,t.value)}function ea(e){var t,i,n,s=b.select("#rename",e.dialogObj.element);ia(e,s),""===s.parentElement.nextElementSibling.innerHTML&&(s=s.value,t=e.currentItemText.lastIndexOf("."),e.isFile&&!e.showFileExtension&&(s+=-1===t?"":e.currentItemText.substr(t)),e.renameText=s,e.currentItemText===s?e.dialogObj.hide():(n="",n="navigationpane"===e.activeModule?hs(e,e.itemData[0]):e.path,e.renamedId=b.getValue("id",e.itemData[0]),e.isFile&&(t=-1===t?"":e.currentItemText.substr(t),i=-1===(i=s.lastIndexOf("."))?"":s.substr(i),e.showFileExtension)&&t!==i?Bs(e,"Extension",null,n):us(e,n,s)))}function ta(e,t){/[/\\|*?"<>:]/.test(t.value)?na(e,t):""===t.value?t.parentElement.nextElementSibling.innerHTML=w(e,"Validation-Empty"):t.parentElement.nextElementSibling.innerHTML=""}function ia(e,t){ta(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||na(e,t)}function na(e,t){var i=w(e,"Validation-Invalid").replace("{0}",'"'+t.value+'"');e.enableHtmlSanitizer?t.parentElement.nextElementSibling.textContent=i:t.parentElement.nextElementSibling.innerHTML=i}function sa(e){e=e.keyCode||e.which||e.charCode;return e}function aa(t,e,i){var n=b.createElement("div",{className:"e-image-wrap"}),i=b.createElement("img",{className:"e-image",attrs:{src:i,alt:e}});n.appendChild(i),b.isNullOrUndefined(t.viewerObj)?(t.viewerObj=new r.Dialog({header:e,content:n,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!0,isModal:!0,width:"350px",height:"350px",target:t.popupTarget||"#"+t.element.id,cssClass:xn(t,t.isMobile?Ke:qe),locale:t.locale,enableResize:!0,allowDragging:!0,enableHtmlSanitizer:t.enableHtmlSanitizer,position:{X:"center",Y:"center"},enableRtl:t.enableRtl,open:function(e){setTimeout(function(){e.viewerObj&&e.viewerObj.element.focus()}),ra(e),Ws(e,e.viewerObj,"Image Preview")}.bind(this,t),close:function(){Ks(t,t.viewerObj,"Image Preview")},beforeOpen:function(e){zs(t,t.viewerObj,e,"Image Preview")},beforeClose:function(e){qs(t,t.viewerObj,e,"Image Preview")},resizing:ra.bind(this,t),resizeStop:ra.bind(this,t)}),t.viewerObj.isStringTemplate=!0,t.viewerObj.appendTo("#"+t.element.id+ke)):(t.viewerObj.refresh(),t.viewerObj.header=e,t.viewerObj.content=n,t.viewerObj.enableRtl=t.enableRtl,t.viewerObj.dataBind(),t.viewerObj.show())}function ra(e){var t=b.select(".e-dlg-content",e.viewerObj.element),e=b.select(".e-image-wrap",e.viewerObj.element),i=window.getComputedStyle(t,null),n=i?2*parseFloat(i.paddingRight):36,i=i?2*parseFloat(i.paddingBottom):20;e.style.width=t.offsetWidth-n+"px",e.style.height=t.offsetHeight-i+"px"}N.prototype.render=function(e){if(this.parent.visitedItem=null,this.startItem=null,r.showSpinner(this.parent.element),"LargeIcons"===this.parent.view){this.resetMultiSelect(),this.element.setAttribute("tabindex","0"),this.listObj&&(this.unWireEvents(),this.removeEventListener()),this.parent.notify(Ai,{});var t=b.select("#"+this.parent.element.id+Re,this.parent.element),i=b.select("ul",t),n=(i&&b.remove(i),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=h.DataUtil.sort(this.items,this.parent.sortBy,this.comparer.bind(this)):this.items=this.allItems=On(this.parent,this.items),t.classList.remove(Xt),this.parent.enableVirtualization&&0<this.allItems.length&&this.parent.virtualizationModule.setUIVirtualization(),this.listElements=_.ListBase.createListFromJson(b.createElement,this.items,this.listObj),this.itemList=Array.prototype.slice.call(b.selectAll("."+d,this.listElements)),this.element.appendChild(this.listElements),this.listElements.setAttribute("aria-label","listbox"),this.preventImgDrag(),this.createDragObj(),0===this.itemList.length?(i=this.element.querySelector("."+tt),this.element.removeChild(i),Dn(this.parent,this.element,e)):0!==this.itemList.length&&this.element.querySelector("."+c)&&this.element.removeChild(this.element.querySelector("."+c)),!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=[]),this.element.querySelectorAll("."+p));0!==n.length&&(this.parent.activeModule="largeiconsview");for(var s=0;s<n.length;s++)n[s].setAttribute("aria-selected","true");this.element.style.maxHeight="100%",this.getItemCount(),this.addEventListener(),this.wireEvents(),this.parent.enableVirtualization&&0<this.allItems.length&&(this.parent.virtualizationModule.setUlElementHeight(),this.parent.virtualizationModule.wireScrollEvent(!1)),this.isRendered=!0,r.hideSpinner(this.parent.element),this.parent.selectedItems.length&&this.checkItem()}},N.prototype.comparer=function(e,t){var i;return"Descending"===this.parent.sortOrder&&(i=e,e=t,t=i),this.parent.sortComparer(e,t)},N.prototype.preventImgDrag=function(){for(var e=0;e<this.itemList.length;)this.itemList[e].querySelector("img")&&(this.itemList[e].ondragstart=function(){return!1}),e++},N.prototype.createDragObj=function(){var t=this;this.listObj&&(this.parent.allowDragAndDrop?(this.dragObj&&this.dragObj.destroy(),this.dragObj=new b.Draggable(this.listElements,{enableTailMode:!0,distance:5,enableAutoScroll:!1,dragTarget:"."+It,helper:this.dragHelper.bind(this),cursorAt:this.parent.dragCursorPosition,dragArea:this.parent.element,dragStop:Hn.bind(this,this.parent),drag:Yn.bind(this,this.parent),clone:!0,dragStart:function(e){Bn(t.parent,e,t.dragObj)}})):this.dragObj&&!this.parent.allowDragAndDrop&&this.dragObj.destroy())},N.prototype.dragHelper=function(e){e=e.sender.target,e=b.closest(e,".e-list-item");if(!e)return null;e&&!e.classList.contains("e-active")&&this.setFocus(e);var t=this.element.querySelectorAll("."+p);this.parent.activeElements=[],this.parent.dragData=[];for(var i=0;i<t.length;i++)this.parent.dragData.push(this.getItemObject(t[parseInt(i.toString(),10)])),this.parent.activeElements.push(t[i]);return ln(this.parent,e),this.parent.dragPath=this.parent.path,_n(this.parent),this.parent.virtualDragElement},N.prototype.onDropInit=function(e){var t;this.parent.targetModule===this.getModuleName()&&(e=b.closest(e.target,".e-list-item"),t=b.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),e?(e=this.getItemObject(e),this.parent.dropPath=e.isFile?this.parent.path:vn(this.parent,e,this.parent.path),this.parent.dropData=e.isFile?t:e):(this.parent.dropPath=this.parent.path,this.parent.dropData=t))},N.prototype.getModuleName=function(){return"largeiconsview"},N.prototype.onItemCreated=function(e){e.item.removeAttribute("aria-level"),!this.parent.showFileExtension&&b.getValue("isFile",e.curData)&&(n=e.item.querySelector("."+et),t=b.getValue("name",e.curData),i=b.getValue("type",e.curData),-1!==t.indexOf(i))&&(n.innerHTML=t.substr(0,t.length-i.length)),this.renderCheckbox(e);var t,i,n={element:e.item,fileDetails:e.curData,module:"LargeIconsView"};this.parent.trigger("fileLoad",n)},N.prototype.renderCheckbox=function(e){var t;this.parent.showItemCheckBoxes&&((t=U.createCheckBox(b.createElement,!1,{checked:!1,cssClass:"e-small"})).setAttribute("role","checkbox"),t.setAttribute("aria-checked","false"),t.setAttribute("aria-label","checkbox"),e.item.firstElementChild.insertBefore(t,e.item.firstElementChild.childNodes[0]))},N.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"===b.getValue("name",e)&&"move"===this.parent.fileAction&&this.parent.isCut&&this.parent.selectedNodes&&0!==this.parent.selectedNodes.length)for(var t=this.getIndexes(this.parent.selectedNodes),i=0;i<t.length;)on(this.itemList[t[i]]),i++;0!==this.element.querySelectorAll("."+p).length&&this.element.focus(),this.checkItem(),this.parent.isLayoutChange=!1}else this.element.setAttribute("tabindex","-1")},N.prototype.checkItem=function(){var e=this.element.querySelectorAll("."+p);if(e)for(var t=0;t<e.length;)this.checkState(e[t],!0),t++},N.prototype.renderList=function(e){for(var t=0,i=JSON.parse(JSON.stringify(e.files));t<i.length;){var n,s=bn(i[t]),a=b.getValue("name",i[t]),r=Jn(this.parent,i[t]),r=this.parent.selectedItems&&-1!==this.parent.selectedItems.indexOf(r)?It+" e-active":It;S(i[t])||(r+=" "+ts(i[t])),s===bt&&this.parent.showThumbnail&&is(i[t])?(n=yn(this.parent,i[t]),b.setValue("_fm_imageUrl",n,i[t]),b.setValue("_fm_imageAttr",{alt:a},i[t])):b.setValue("_fm_icon",s,i[t]),b.setValue("_fm_htmlAttr",{class:r,title:a},i[t]),t++}return i},N.prototype.onFinalizeEnd=function(e){this.render(e)},N.prototype.onCreateEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.clearSelect(),this.selectItems([b.getValue(this.parent.hasId?"id":"name",this.parent.createdItem)]),this.parent.createdItem=null,this.parent.largeiconsviewModule.element.focus(),this.parent.activeModule="largeiconsview")},N.prototype.onSelectedData=function(){"largeiconsview"===this.parent.activeModule&&this.updateSelectedData()},N.prototype.onDeleteInit=function(){"largeiconsview"===this.parent.activeModule&&fs(this.parent,this.parent.selectedItems,this.parent.path,"delete")},N.prototype.onDeleteEnd=function(e){"LargeIcons"===this.parent.view&&(this.onLayoutChange(e),this.parent.setProperties({selectedItems:[]},!0),this.clearSelect())},N.prototype.onRefreshEnd=function(e){"LargeIcons"===this.parent.view&&this.onLayoutChange(e)},N.prototype.onRenameInit=function(){"largeiconsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},N.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)&&"largeiconsview"===this.parent.activeModule&&(this.clearSelect(),this.addSelection(this.parent.renamedItem))},N.prototype.onOpenInit=function(e){"largeiconsview"===this.parent.activeModule&&this.doOpenAction(e.target)},N.prototype.onHideLayout=function(){"LargeIcons"!==this.parent.view&&this.element&&this.element.classList.add(Xt)},N.prototype.onSelectAllInit=function(){var e;"LargeIcons"===this.parent.view&&(this.startItem=this.getFirstItem(),e=this.getLastItem(),this.doSelection(e,{ctrlKey:!0,shiftKey:!0}),this.isInteraction=!0,this.isInteracted=!0)},N.prototype.onClearAllInit=function(){"LargeIcons"===this.parent.view&&(this.clearSelection(),this.isInteraction=!0,this.isInteracted=!0)},N.prototype.onBeforeRequest=function(){this.isRendered=!1},N.prototype.onAfterRequest=function(){this.isRendered=!0},N.prototype.onSearch=function(e){"LargeIcons"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(f,{}),this.parent.searchedItems=e.files,this.onLayoutChange(e))},N.prototype.onLayoutRefresh=function(){this.parent.view},N.prototype.onUpdateSelectionData=function(){"LargeIcons"===this.parent.view&&this.updateSelectedData()},N.prototype.onPathColumn=function(){"LargeIcons"!==this.parent.view||b.isNullOrUndefined(this.listObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||"filterPath"!==this.parent.sortBy||(this.parent.sortBy="name",this.parent.notify(Si,{}))},N.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(Ui,this.onPathColumn),this.parent.off(u,this.onFinalizeEnd),this.parent.off(si,this.onCreateEnd),this.parent.off(Ri,this.onSelectedData),this.parent.off(oi,this.onDeleteInit),this.parent.off(li,this.onDeleteEnd),this.parent.off(hi,this.onRefreshEnd),this.parent.off(g,this.onPathChanged),this.parent.off(a,this.onLayoutChange),this.parent.off(yi,this.onSearch),this.parent.off(vi,this.onOpenInit),this.parent.off(Ii,this.onPathChanged),this.parent.off(l,this.onPropertyChanged),this.parent.off(Yi,this.onMethodCall),this.parent.off(bi,this.onActionFailure),this.parent.off(xi,this.onRenameInit),this.parent.off(y,this.onPathChanged),this.parent.off(Ai,this.onHideLayout),this.parent.off(Oi,this.onSelectAllInit),this.parent.off(wi,this.onClearAllInit),this.parent.off(ji,this.onMenuItemData),this.parent.off(ui,this.onBeforeRequest),this.parent.off(fi,this.onAfterRequest),this.parent.off(pi,this.splitterResizeHandler),this.parent.off(di,this.resizeHandler),this.parent.off(ki,this.onpasteInit),this.parent.off(Li,this.onpasteEnd),this.parent.off(Mi,this.oncutCopyInit),this.parent.off(Bi,this.onDropInit),this.parent.off(m,this.onDetailsInit),this.parent.off(mi,this.onLayoutRefresh),this.parent.off(qi,this.onDropPath),this.parent.off(Ki,this.onUpdateSelectionData),this.parent.off(ai,this.onPathChanged))},N.prototype.addEventListener=function(){this.parent.on(Ui,this.onPathColumn,this),this.parent.on(u,this.onFinalizeEnd,this),this.parent.on(si,this.onCreateEnd,this),this.parent.on(hi,this.onRefreshEnd,this),this.parent.on(Ri,this.onSelectedData,this),this.parent.on(g,this.onPathChanged,this),this.parent.on(oi,this.onDeleteInit,this),this.parent.on(ki,this.onpasteInit,this),this.parent.on(li,this.onDeleteEnd,this),this.parent.on(a,this.onLayoutChange,this),this.parent.on(yi,this.onSearch,this),this.parent.on(vi,this.onOpenInit,this),this.parent.on(xi,this.onRenameInit,this),this.parent.on(y,this.onPathChanged,this),this.parent.on(Ii,this.onPathChanged,this),this.parent.on(l,this.onPropertyChanged,this),this.parent.on(Yi,this.onMethodCall,this),this.parent.on(bi,this.onActionFailure,this),this.parent.on(Ai,this.onHideLayout,this),this.parent.on(Oi,this.onSelectAllInit,this),this.parent.on(wi,this.onClearAllInit,this),this.parent.on(ji,this.onMenuItemData,this),this.parent.on(ui,this.onBeforeRequest,this),this.parent.on(fi,this.onAfterRequest,this),this.parent.on(Bi,this.onDropInit,this),this.parent.on(m,this.onDetailsInit,this),this.parent.on(pi,this.splitterResizeHandler,this),this.parent.on(di,this.resizeHandler,this),this.parent.on(Li,this.onpasteEnd,this),this.parent.on(Mi,this.oncutCopyInit,this),this.parent.on(mi,this.onLayoutRefresh,this),this.parent.on(qi,this.onDropPath,this),this.parent.on(Ki,this.onUpdateSelectionData,this),this.parent.on(ai,this.onPathChanged,this)},N.prototype.onActionFailure=function(){this.isInteraction=!0,this.isInteracted=!0},N.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(e=b.closest(e.target,"li"),this.parent.itemData=[this.getItemObject(e)])},N.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.updateSelectedData():this.parent.itemData=[b.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},N.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""===this.parent.folderPath?[O(this.parent)]:[this.getItemObject(b.select(".e-active",this.element))])},N.prototype.oncutCopyInit=function(){if(this.parent.activeModule===this.getModuleName()){var e=this.element.querySelectorAll("."+p);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]))}},N.prototype.onpasteEnd=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==An(this.parent,e)&&!this.parent.hasId||this.onPathChanged(e))},N.prototype.onDropPath=function(e){"LargeIcons"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},N.prototype.onPropertyChanged=function(e){var t;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"selectedItems":this.isInteraction=!1,this.isInteracted=!1,t=b.isNullOrUndefined(this.parent.selectedItems)?[]:this.parent.selectedItems.slice(0),t=this.parent.allowMultiSelection?t:t.slice(t.length-1),this.parent.setProperties({selectedItems:[]},!0),this.onClearAllInit(),t.length&&this.selectItems(t),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),this.isInteraction=!0,this.isInteracted=!0;break;case"showThumbnail":un(this.parent);break;case"showFileExtension":case"showHiddenItems":C(this.parent,g,this.parent.path);break;case"allowMultiSelection":case"showItemCheckBoxes":"LargeIcons"===this.parent.view&&un(this.parent);break;case"view":pn(this.parent,"LargeIcons")}},N.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.listObj&&this.unWireEvents(),this.startItem=null,this.listElements=null)},N.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new b.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new b.KeyboardEvents(this.element,{keyAction:this.keydownActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),b.EventHandler.add(this.element,"mouseover",this.onMouseOver,this)},N.prototype.unWireEvents=function(){this.wireClickEvent(!1),b.EventHandler.remove(this.element,"mouseover",this.onMouseOver),this.keyboardModule.destroy(),this.keyboardDownModule.destroy()},N.prototype.onMouseOver=function(e){e=b.closest(e.target,".e-list-item");I(this.parent,"hover"),null!==e&&e.classList.add(st)},N.prototype.wireClickEvent=function(e){var t=this;e?this.clickObj=new b.Touch(this.element,{tap:function(e){t.parent.isDevice?(t.tapCount=e.tapCount,t.tapEvent=e,setTimeout(function(){0<t.tapCount&&t.doTapAction(t.tapEvent),t.tapCount=0},350)):2===e.tapCount&&3!==e.originalEvent.which?t.dblClickHandler(e):t.clickHandler(e)},tapHold:function(e){t.parent.isDevice&&(t.multiSelect=!!t.parent.allowMultiSelection,t.parent.allowMultiSelection&&b.addClass([t.parent.element],Ye),t.clickHandler(e))}}):this.clickObj&&this.clickObj.destroy()},N.prototype.doTapAction=function(e){var t=e.originalEvent.target,i=b.closest(t,"."+d);this.multiSelect||t.classList.contains(tt)||b.isNullOrUndefined(i)?this.clickHandler(e):(this.parent.isFile=!1,this.updateType(i),this.parent.isFile?2===e.tapCount?(this.clickHandler(e),this.dblClickHandler(e)):this.clickHandler(e):this.dblClickHandler(e))},N.prototype.clickHandler=function(e){var t=e.originalEvent.target;I(this.parent,"hover"),this.doSelection(t,e.originalEvent),this.parent.activeModule="largeiconsview"},N.prototype.doSelection=function(e,t){var i=this.parent.isMac?t.metaKey:t.ctrlKey,n=this.parent.isMac&&t.ctrlKey&&t.shiftKey,s=b.closest(e,"."+d),a=e.classList,r=(this.parent.isFile=!1,"select");if(3!==t.which&&!n||b.isNullOrUndefined(s)||!s.classList.contains(p)){if(b.isNullOrUndefined(s))this.parent.selectedItems.length===this.itemList.length&&(this.isSelectAllCalled=!0),this.clearSelection();else if(this.parent.allowMultiSelection&&s.classList.contains(p)&&(i||e.classList.contains(ot))&&(r="unselect"),t.ctrlKey&&t.shiftKey&&!n&&(this.isSelectAllCalled=!0),!0!==this.triggerSelection(r,s).cancel){if(this.parent.allowMultiSelection&&(this.multiSelect||!t||i)||a.contains(lt)||(this.updateType(s),this.clearSelect()),this.parent.allowMultiSelection&&t.shiftKey&&!n){t&&t.ctrlKey||this.clearSelect(),this.startItem||(this.startItem=s);var e=this.itemList.indexOf(this.startItem),o=this.itemList.indexOf(s);if(o<e)for(var l=e;o<=l;l--)this.addActive(this.itemList[l]);else for(l=e;l<=o;l++)this.addActive(this.itemList[l]);this.addFocus(this.itemList[o])}else this.startItem=s,this.parent.allowMultiSelection&&s.classList.contains(p)?this.removeActive(s):this.addActive(s),this.addFocus(s);0===this.parent.selectedItems.length&&this.resetMultiSelect(),this.parent.notify(f,{}),this.triggerSelect(r,s)}b.isNullOrUndefined(s)||(this.isSelectAllCalled=!1,this.updateType(s))}else this.addActive(s),this.updateType(s)},N.prototype.dblClickHandler=function(e){this.parent.activeModule="largeiconsview";e=e.originalEvent.target;this.doOpenAction(e)},N.prototype.clearSelection=function(){this.clearSelect(),this.resetMultiSelect(),this.parent.notify(f,{})},N.prototype.resetMultiSelect=function(){this.multiSelect=!1,b.removeClass([this.parent.element],Ye)},N.prototype.doOpenAction=function(e){var i,n=this;b.isNullOrUndefined(e)||(e=b.closest(e,"."+d),this.parent.isFile=!1,b.isNullOrUndefined(e))||(this.updateType(e),is(i=this.getItemObject(e))?this.parent.trigger("fileOpen",{cancel:!1,fileDetails:i,module:"LargeIconsView"},function(e){var t;e.cancel||(e=b.getValue("name",i),n.parent.isFile?bn(i)===bt&&(t=yn(n.parent,i),aa(n.parent,e,t)):(""!==n.parent.breadcrumbbarModule.searchObj.element.value||n.parent.isFiltered?Rn(n.parent,i):(t=b.getValue("id",i),n.parent.oldPath=n.parent.path,t=n.parent.path+(b.isNullOrUndefined(t)?e:t)+"/",n.parent.setProperties({path:t},!0),n.parent.pathNames.push(e),n.parent.pathId.push(b.getValue("_fm_id",i)),n.parent.itemData=[i],gn(n.parent)),n.parent.isFiltered=!1,n.parent.setProperties({selectedItems:[]},!0)))}):D(this.parent,i,Gi))},N.prototype.updateType=function(e){e=b.select("."+mt,e);this.parent.isFile=!!b.isNullOrUndefined(e)},N.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()}},N.prototype.keyActionHandler=function(e){var t=this;if(this.isRendered){var i=this.getFocusedItem(),n=this.getFirstItem(),s=this.getLastItem();switch(e.action){case"end":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTo(0,this.element.firstElementChild.scrollHeight),setTimeout(function(){t.navigateItem(t.itemList[t.itemList.length-1])},10)):this.navigateItem(s);break;case"home":this.parent.enableVirtualization?(this.clearSelect(),this.element.firstElementChild.scrollTop=0,setTimeout(function(){t.navigateItem(t.itemList[0])},10)):this.navigateItem(n);break;case"tab":b.isNullOrUndefined(i)?b.isNullOrUndefined(n)||this.addFocus(n):this.addFocus(i);break;case"moveDown":this.navigateDown(i,!0);break;case"moveLeft":this.navigateRight(i,!1);break;case"moveRight":this.navigateRight(i,!0);break;case"moveUp":this.navigateDown(i,!1);break;case"ctrlEnd":case"shiftEnd":case"csEnd":this.csEndKey(s,e);break;case"ctrlHome":case"shiftHome":case"csHome":this.csHomeKey(n,e);break;case"ctrlDown":case"shiftDown":case"csDown":this.csDownKey(i,e);break;case"ctrlLeft":case"shiftLeft":case"csLeft":this.csLeftKey(i,e);break;case"ctrlRight":case"shiftRight":case"csRight":this.csRightKey(i,e);break;case"ctrlUp":case"shiftUp":case"csUp":this.csUpKey(i,e);break;case"space":this.spaceKey(i);break;case"ctrlSpace":case"shiftSpace":case"csSpace":b.isNullOrUndefined(i)||this.doSelection(i,e);break;case"ctrlA":this.ctrlAKey(n,s);break;case"enter":this.doOpenAction(this.parent.visitedItem||this.getVisitedItem());break;case"altEnter":this.parent.notify(m,{}),ms(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":an(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"ctrlC":fn(this.parent);break;case"ctrlV":this.parent.folderPath="",Mn(this.parent);break;case"ctrlX":mn(this.parent);break;case"f2":this.performRename();break;case"ctrlD":this.doDownload();break;case"back":this.parent.traverseBackward()}}},N.prototype.doDownload=function(){this.updateSelectedData(),$n(this.parent)},N.prototype.performDelete=function(){if(this.parent.selectedItems&&0<this.parent.selectedItems.length){this.updateSelectedData();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!S(e[t]))return void D(this.parent,e[t],v);x(this.parent,"Delete")}},N.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),Xn(this.parent))},N.prototype.updateRenameData=function(){var e=b.select("."+d+"."+p,this.element),e=this.getItemObject(e);Qn(this.parent,e)},N.prototype.getVisitedItem=function(){var e=this.parent.selectedItems[this.parent.selectedItems.length-1],e=this.getIndexes([e],this.parent.hasId);return this.itemList[e[0]]},N.prototype.getFocusedItem=function(){return b.select("."+d+"."+at,this.element)},N.prototype.getActiveItem=function(){return b.select("."+d+"."+p,this.element)},N.prototype.getFirstItem=function(){return this.itemList[0]},N.prototype.getLastItem=function(){return this.itemList[this.itemList.length-1]},N.prototype.navigateItem=function(e){this.setFocus(e)},N.prototype.navigateDown=function(e,t){e=this.getNextItem(e,t,this.perRow);this.setFocus(e)},N.prototype.navigateRight=function(e,t){e=this.getNextItem(e,t);this.setFocus(e)},N.prototype.getNextItem=function(e,t,i){if(b.isNullOrUndefined(e))return this.getFocusedItem()||this.getActiveItem()||this.getFirstItem();var n=this.itemList.indexOf(e);do{var s,n=t?i?n+i:n+1:i?n-i:n-1,a=this.itemList[n];if(this.parent.enableVirtualization&&b.isNullOrUndefined(a)&&(s=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-top"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-bottom"),10),s=this.itemList[0].getBoundingClientRect().height+s,this.element.firstElementChild.scrollTo(this.element.firstElementChild.scrollTop,this.element.firstElementChild.scrollTop+s)),b.isNullOrUndefined(a))return e}while(!b.isVisible(a));return a},N.prototype.setFocus=function(e){b.isNullOrUndefined(e)||!0!==this.triggerSelection("select",e).cancel&&(this.startItem=e,this.clearSelect(),this.addActive(e),this.addFocus(e),this.parent.notify(f,{}),this.triggerSelect("select",e))},N.prototype.spaceKey=function(e){b.isNullOrUndefined(e)||e.classList.contains(p)||!0!==this.triggerSelection("select",e).cancel&&(this.addActive(e),this.parent.notify(f,{}),this.triggerSelect("select",e))},N.prototype.ctrlAKey=function(e,t){var i,n;this.parent.allowMultiSelection&&!b.isNullOrUndefined(e)&&(this.startItem=e,i=(e=this.element.querySelector("."+tt)).scrollTop,n=this.getFocusedItem(),this.doSelection(t,{ctrlKey:!0,shiftKey:!0}),e.scrollTop=i,b.isNullOrUndefined(n)||this.addFocus(n))},N.prototype.csEndKey=function(e,t){this.parent.allowMultiSelection?b.isNullOrUndefined(e)||("ctrlEnd"===t.action?this.addFocus(e):this.doSelection(e,t)):this.navigateItem(e)},N.prototype.csHomeKey=function(e,t){this.parent.allowMultiSelection?b.isNullOrUndefined(e)||("ctrlHome"===t.action?this.addFocus(e):this.doSelection(e,t)):this.navigateItem(e)},N.prototype.csDownKey=function(e,t){var i;this.parent.allowMultiSelection?(i=this.getNextItem(e,!0,this.perRow),b.isNullOrUndefined(i)||("ctrlDown"===t.action?this.addFocus(i):this.doSelection(i,t))):this.navigateDown(e,!0)},N.prototype.csLeftKey=function(e,t){var i;this.parent.allowMultiSelection?(i=this.getNextItem(e,!1),b.isNullOrUndefined(i)||("ctrlLeft"===t.action?this.addFocus(i):this.doSelection(i,t))):this.navigateRight(e,!1)},N.prototype.csRightKey=function(e,t){var i;this.parent.allowMultiSelection?(i=this.getNextItem(e,!0),b.isNullOrUndefined(i)||("ctrlRight"===t.action?this.addFocus(i):this.doSelection(i,t))):this.navigateRight(e,!0)},N.prototype.csUpKey=function(e,t){var i;this.parent.allowMultiSelection?(i=this.getNextItem(e,!1,this.perRow),b.isNullOrUndefined(i)||("ctrlUp"===t.action?this.addFocus(i):this.doSelection(i,t))):this.navigateDown(e,!1)},N.prototype.addActive=function(e){b.isNullOrUndefined(e)||(e.classList.contains(p)||(this.parent.selectedItems.push(this.getDataName(e)),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0),b.addClass([e],[p]),e.setAttribute("aria-selected","true"),this.checkState(e,!0)),this.parent.visitedItem=e)},N.prototype.removeActive=function(e){b.isNullOrUndefined(e)||(b.removeClass([e],[p]),this.parent.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),this.checkState(e,!1),-1<(e=this.parent.selectedItems.indexOf(this.getDataName(e)))&&(this.parent.selectedItems.splice(e,1),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)),this.parent.visitedItem=null)},N.prototype.getDataName=function(e){e=this.getItemObject(e);return Jn(this.parent,e)},N.prototype.addFocus=function(e){this.element.setAttribute("tabindex","-1");var t=this.getFocusedItem();t&&(t.removeAttribute("tabindex"),b.removeClass([t],[at])),b.addClass([e],[at]),e.setAttribute("tabindex","0"),e.focus()},N.prototype.checkState=function(e,t){this.parent.showItemCheckBoxes&&(e=b.select("."+lt,e),b.isNullOrUndefined(e)||(t?e.classList.contains(ot)||(b.addClass([e],ot),b.closest(e,"."+ht).setAttribute("aria-checked","true")):e.classList.contains(ot)&&(b.removeClass([e],ot),b.closest(e,"."+ht).setAttribute("aria-checked","false"))))},N.prototype.clearSelect=function(){var e=Array.prototype.slice.call(b.selectAll("."+p,this.listElements));if(0!==e.length){if(!0!==this.triggerSelection("unselect",e[0]).cancel)for(var t=0,i=e.length;t<i;t++)this.removeActive(e[t]);this.triggerSelect("unselect",e[0])}},N.prototype.resizeHandler=function(){this.getItemCount()},N.prototype.splitterResizeHandler=function(){this.getItemCount()},N.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},N.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);e={action:e,fileDetails:1<i.length?i:i[0],isInteracted:this.isInteraction,cancel:!1,target:this.isSelectAllCalled?null:t};return this.parent.trigger("fileSelection",e),this.isInteraction=!0,e},N.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=1<i.length?i[i.length-1]:i[0];t={action:e,fileDetails:1<i.length?i:i[0],isInteracted:this.isInteracted};this.parent.trigger("fileSelect",t),this.isInteracted=!0},N.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})},N.prototype.getIndexes=function(e,t){for(var i=[],n=t?"id":"name",s=0,a=this.items.length;s<a;s++)-1!==e.indexOf(b.getValue(n,this.items[s]))&&i.push(s);return i},N.prototype.getItemObject=function(e){e=this.itemList.indexOf(e);return this.items[e]},N.prototype.addSelection=function(e){var t=[];this.parent.hasId?t=new h.DataManager(this.items).executeLocal((new h.Query).where("id","equal",this.parent.renamedId,!1)):0<(e=new h.DataManager(this.items).executeLocal((new h.Query).where("name","equal",b.getValue("name",e),!1))).length&&(t=new h.DataManager(e).executeLocal((new h.Query).where("filterPath","equal",this.parent.filterPath,!1))),0<t.length&&(e=this.items.indexOf(t[0]),this.doSelection(this.itemList[e],{ctrlKey:!0,shiftKey:!1}))},N.prototype.updateSelectedData=function(){for(var e=[],t=b.selectAll("."+d+"."+p,this.element),i=0;i<t.length;i++)e[i]=this.getItemObject(t[i]);this.parent.itemData=e},N.prototype.onMethodCall=function(e){if("LargeIcons"===this.parent.view)switch(b.getValue("action",e)){case"deleteFiles":this.deleteFiles(b.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(b.getValue("ids",e));break;case"openFile":this.openFile(b.getValue("id",e));break;case"renameFile":this.isInteraction=!1,this.isInteracted=!1,this.renameFile(b.getValue("id",e),b.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()}},N.prototype.getItemsIndex=function(e){var t=[],i=!(""===this.parent.breadcrumbbarModule.searchObj.element.value&&!this.parent.isFiltered),n=this.parent.hasId?"id":"name";if(this.parent.hasId||!i)for(var s=0,a=this.items.length;s<a;s++)-1!==e.indexOf(b.getValue(n,this.items[s]))&&t.push(s);else for(s=0,a=this.items.length;s<a;s++){var r=b.getValue("filterPath",this.items[s])+b.getValue("name",this.items[s]);-1===e.indexOf(r)&&-1===e.indexOf(b.getValue(n,this.items[s]))||t.push(s)}return t},N.prototype.deleteFiles=function(e){if(this.parent.activeModule="largeiconsview",b.isNullOrUndefined(e))this.performDelete();else{var t=this.getItemsIndex(e);if(0!==t.length){for(var i=[],n=[],s=0;s<t.length;s++)i[s]=this.items[t[s]],n[s]=Jn(this.parent,i[s]);Zn(this.parent,i,n)}}},N.prototype.downloadFiles=function(e){if(b.isNullOrUndefined(e))this.doDownload();else{var t=this.getItemsIndex(e);if(0!==t.length){for(var i=[],n=[],s=0;s<t.length;s++)i[s]=this.items[t[s]],n[s]=Jn(this.parent,i[s]);es(this.parent,i,n)}}},N.prototype.openFile=function(e){b.isNullOrUndefined(e)||0<(e=this.getItemsIndex([e])).length&&this.doOpenAction(this.itemList[e[0]])},N.prototype.renameFile=function(e,t){this.parent.activeModule="largeiconsview",b.isNullOrUndefined(e)?this.performRename():0<(e=this.getItemsIndex([e])).length&&(Qn(this.parent,this.items[e[0]]),b.isNullOrUndefined(t)?Xn(this.parent):S(this.parent.itemData[0])?us(this.parent,this.parent.path,t):D(this.parent,this.parent.itemData[0],v))};var oa=N;function N(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=b.select("#"+this.parent.element.id+Re,this.parent.element),b.addClass([this.element],$e),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"}}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++){var n=i[t],s=e.newProp.searchSettings;"searchSettings"===n&&(b.isNullOrUndefined(s.allowSearchOnTyping)||this.searchEventBind(s.allowSearchOnTyping),!this.parent.breadcrumbbarModule.searchObj.value||""===this.parent.breadcrumbbarModule.searchObj.value||!b.isNullOrUndefined(s.allowSearchOnTyping)&&b.isNullOrUndefined(s.filterType)&&b.isNullOrUndefined(s.ignoreCase)||dn(this.parent,this.parent.breadcrumbbarModule.searchObj.value,!1))}},E.prototype.render=function(){this.addEventListener()},E.prototype.onPathChange=function(){var e=this.parent.pathNames,t=this.parent.path.split("/"),i=this.parent.createElement("ul",{className:"e-addressbar-ul"}),n=null,s=e.length;if(0<e.length){for(var a="",r=0;r<s;r++){for(var o,l=null,n=this.parent.createElement("li",{className:"e-address-list-item"}),h=0;h<=r;h++)a=a+t[h]+"/";n.setAttribute("data-utext",a),0!==r&&(o=b.createElement("span",{className:Yt}),n.appendChild(o)),s-r!=1?(l=b.createElement("a",{className:et}),n.setAttribute("tabindex","0")):l=b.createElement("span",{className:et}),a="",l.innerText=e[r],n.appendChild(l),i.appendChild(n)}var d=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),d=(b.isNullOrUndefined(d)||(b.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),b.remove(d)),this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap"));d?this.parent.breadCrumbBarNavigation.appendChild(i):this.parent.breadCrumbBarNavigation.insertBefore(i,d),this.updateBreadCrumbBar(i)}},E.prototype.updateBreadCrumbBar=function(e){for(var t=e.querySelectorAll("li"),i=this.parent.breadCrumbBarNavigation.querySelector(".e-addressbar-ul"),n=window.getComputedStyle(i,null),s=parseFloat(n.getPropertyValue("padding-right")),n=parseFloat(n.getPropertyValue("padding-left")),a=i.offsetWidth-s-n,r=this.parent.createElement("ul",{className:"e-addressbar-ul"}),o=0,l=[],h=0;h<t.length;h++){var d=t[h].clientWidth;l.push(d),o+=d}b.isNullOrUndefined(i)||b.remove(i);var s=this.parent.createElement("div"),n=(s.setAttribute("class","e-search-wrap"),this.parent.element.id+_e),i=b.createElement("input",{id:n,attrs:{autocomplete:"off","aria-label":w(this.parent,"Search")}}),n=(s.appendChild(i),this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap .e-input")),n=(b.isNullOrUndefined(n)&&(this.parent.breadCrumbBarNavigation.appendChild(s),n=b.createElement("span",{className:"e-icons e-fe-search"}),b.EventHandler.add(n,"click",this.onShowInput,this),i.parentElement.insertBefore(n,i),this.searchObj=new V.TextBox({value:"",showClearButton:!0,placeholder:w(this.parent,"Search"),focus:this.onFocus.bind(this),blur:this.onBlur.bind(this)}),this.searchObj.appendTo("#"+this.parent.element.id+_e),this.searchEventBind(this.parent.searchSettings.allowSearchOnTyping),s=this.searchObj.element.nextElementSibling,b.EventHandler.add(s,"mousedown",this.searchChangeHandler.bind(this),this),b.EventHandler.add(this.searchObj.element,"keyup",this.onKeyUp.bind(this),this)),this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap"));if((a-=this.searchWrapWidth||n.offsetWidth)<o){for(h=t.length;h--;){var p=a-l[h];if(!(40<p)){for(var c=[],u=0;u<=h;u++){var g=t[u];c.push({text:g.innerText,utext:g.getAttribute("data-utext")})}var f=this.parent.createElement("li",{className:"e-breadcrumb-menu"}),m=this.parent.createElement("button",{className:"e-breadcrumb-submenu"});f.appendChild(m),r.insertBefore(f,r.querySelector("li")),this.subMenuObj=new H.DropDownButton({items:c,cssClass:"e-caret-hide e-submenu",iconCss:Wt,iconPosition:"Top",enableHtmlSanitizer:this.parent.enableHtmlSanitizer,beforeItemRender:this.addSubMenuAttributes.bind(this),select:this.subMenuSelectOperations.bind(this)}),this.subMenuObj.isStringTemplate=!0,this.subMenuObj.appendTo(m);break}r.insertBefore(t[h],r.querySelector("li")),a=p}this.parent.breadCrumbBarNavigation.insertBefore(r,n)}else this.parent.breadCrumbBarNavigation.insertBefore(e,n)},E.prototype.onFocus=function(){b.closest(this.searchObj.element,".e-search-wrap").classList.add("e-focus")},E.prototype.onKeyUp=function(){this.parent.notify(Ui,{args:this.parent})},E.prototype.onBlur=function(){b.closest(this.searchObj.element,".e-search-wrap").classList.remove("e-focus")},E.prototype.subMenuSelectOperations=function(e){e={target:e.element};this.addressPathClickHandler(e)},E.prototype.addSubMenuAttributes=function(e){e.element.setAttribute("data-utext",b.getValue("utext",e.item));var t=this.parent.createElement("a",{className:"e-list-text"});e.element.appendChild(t)},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 t=this;b.isNullOrUndefined(e.value)||(this.parent.isFiltered=!1,this.parent.searchSettings.allowSearchOnTyping?(window.clearTimeout(this.searchTimer),this.searchTimer=window.setTimeout(function(){dn(t.parent,e.value,!1)},300)):dn(this.parent,e.value,!1))},E.prototype.addressPathClickHandler=function(e){var e=e.target;"LI"!==e.nodeName&&"A"!==e.nodeName||(e="LI"===e.nodeName?e.children[0]:e,b.isNullOrUndefined(e))||(this.parent.isFiltered=!1,e=this.updatePath(e),this.parent.itemData=[b.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)],this.triggerFileOpen(this.parent.itemData[0]),C(this.parent,g,e),e=this.parent.pathId[this.parent.pathId.length-1],this.parent.notify(Fi,{module:"treeview",selectedNode:e}))},E.prototype.triggerFileOpen=function(e){e={cancel:!1,fileDetails:e,module:"BreadCrumbBar"};delete e.cancel,this.parent.trigger("fileOpen",e)},E.prototype.onShowInput=function(){var e;this.parent.isMobile&&(this.parent.element.classList.contains(Ge)?(b.removeClass([this.parent.element],Ge),this.searchWrapWidth=null):(e=this.parent.breadCrumbBarNavigation.querySelector(".e-search-wrap"),this.searchWrapWidth=e.offsetWidth,b.addClass([this.parent.element],Ge),this.searchObj.element.focus()))},E.prototype.updatePath=function(e){for(var e=b.closest(e,"li").getAttribute("data-utext"),t=(this.addressBarLink=e,this.addressBarLink.split("/")),i=this.parent.pathId,n=this.parent.pathNames,s=(this.parent.pathId=[],this.parent.pathNames=[],""),a=0,r=t.length-1;a<r;a++)this.parent.pathId.push(i[a]),this.parent.pathNames.push(n[a]),s+=t[a]+"/";return this.parent.setProperties({path:s},!0),s},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 b.KeyboardEvents(this.parent.breadCrumbBarNavigation,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.parent.on(l,this.onPropertyChanged,this),b.EventHandler.add(this.parent.breadCrumbBarNavigation,"click",this.addressPathClickHandler,this),this.parent.on(ci,this.destroy,this),this.parent.on(g,this.onUpdatePath,this),this.parent.on(u,this.onUpdatePath,this),this.parent.on(hi,this.onUpdatePath,this),this.parent.on(Ii,this.onUpdatePath,this),this.parent.on(si,this.onCreateEnd,this),this.parent.on(y,this.onRenameEnd,this),this.parent.on(li,this.onDeleteEnd,this),this.parent.on(pi,this.onResize,this),this.parent.on(Li,this.onPasteEnd,this),this.parent.on(di,this.onResize,this),this.parent.on(_i,this.onSearchTextChange,this),this.parent.on(Bi,this.onDropInit,this),this.parent.on(mi,this.onResize,this),this.parent.on(qi,this.onPathChange,this)},E.prototype.keyActionHandler=function(e){"enter"===e.action&&this.addressPathClickHandler(e)},E.prototype.removeEventListener=function(){this.keyboardModule.destroy(),this.parent.off(g,this.onUpdatePath),this.parent.off(u,this.onUpdatePath),this.parent.off(hi,this.onUpdatePath),this.parent.off(Ii,this.onUpdatePath),this.parent.off(Li,this.onPasteEnd),this.parent.off(si,this.onCreateEnd),this.parent.off(y,this.onRenameEnd),this.parent.off(li,this.onDeleteEnd),this.parent.off(pi,this.onResize),this.parent.off(di,this.onResize),this.parent.off(_i,this.onSearchTextChange),this.parent.off(Bi,this.onDropInit),this.parent.off(mi,this.onResize),this.parent.off(qi,this.onPathChange)},E.prototype.onDropInit=function(e){this.parent.targetModule===this.getModuleName()&&(e=e.target.closest("li"),this.parent.dropPath=this.updatePath(e.children[0]),this.parent.dropData=b.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),this.triggerFileOpen(this.parent.dropData),e=this.parent.pathId[this.parent.pathId.length-1],this.parent.notify(Fi,{module:"treeview",selectedNode:e}))},E.prototype.getModuleName=function(){return"breadcrumbbar"},E.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),b.isNullOrUndefined(this.subMenuObj)||this.subMenuObj.destroy(),b.isNullOrUndefined(this.searchObj))||this.searchObj.destroy()},E.prototype.onSearchTextChange=function(e){this.searchObj.element.placeholder=null!=this.parent.searchSettings.placeholder?this.parent.searchSettings.placeholder:w(this.parent,"Search")+" "+w(this.parent,e.cwd.name.toString())};var la=E;function E(e){this.addressPath="",this.addressBarLink="",this.searchTimer=null,this.searchWrapWidth=null,this.parent=e,this.keyConfigs={enter:"enter"},this.render()}P.prototype.render=function(){this.keyConfigs={downarrow:"downarrow",uparrow:"uparrown"},this.contextMenu=new B.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:xn(this.parent,qe)}),this.contextMenu.isStringTemplate=!0,this.contextMenu.appendTo("#"+this.parent.element.id+Ae),this.addEventListener()},P.prototype.onBeforeItemRender=function(e){var t,i;e.item.id===this.getMenuId("largeiconsview")&&(t=b.createElement("span"),(i=e.element).insertBefore(t,"LargeIcons"===this.parent.view?i.childNodes[1]:i.childNodes[0]),t.setAttribute("class",qt+" "+Ct)),e.item.id===this.getMenuId("detailsview")&&(t=b.createElement("span"),(i=e.element).insertBefore(t,"Details"===this.parent.view?i.childNodes[1]:i.childNodes[0]),t.setAttribute("class",zt+" "+Ct))},P.prototype.onBeforeClose=function(t){var e={cancel:!1,element:t.element,event:t.event,isFocused:t.isFocused,fileDetails:[this.menuItemData],items:t.items,parentItem:t.parentItem,menuType:this.menuType};if(this.parent.trigger("menuClose",e,function(e){e.cancel&&(t.cancel=e.cancel)}),this.menuTarget=null,!this.isMenuItemClicked&&1<this.parent.pathId.length&&"navigationpane"===this.parent.activeModule){this.parent.pathId.pop();for(var i=[],n=0,s=Object.keys(this.parent.feParent);n<s.length;n++){var a=s[n],a=b.getValue(a,this.parent.feParent);-1!==this.parent.pathNames.indexOf(a.name)&&i.push(a._fm_id)}this.parent.pathId.push(i[i.length-1]),this.parent.navigationpaneModule.treeObj.setProperties({selectedNodes:[this.parent.pathId[this.parent.pathId.length-1]]})}this.isMenuItemClicked=!1},P.prototype.onBeforeOpen=function(t){var e,i=this,n=!1,s=!1,a=t.event.target,r=(this.menuTarget=this.targetNodeElement=a,this.currentElement=t.element,a.classList.contains("e-spinner-pane")&&(a=this.parent.navigationpaneModule.activeNode.getElementsByClassName($t)[0],this.menuTarget=this.targetNodeElement=a),this.targetElement="Details"===this.parent.view?b.closest(a,"tr.e-row"):a,this.parent.enableVirtualization&&(a.classList.contains("e-virtual-bottom")||a.classList.contains("e-virtualtable"))&&(a=a.parentElement.closest("div")),this.getTargetView(a));if(this.updateActiveModule(),a.classList.contains(Dt)||b.closest(a,"th")||b.closest(a,"#"+this.parent.element.id+Ve)||b.closest(a,"#"+this.parent.element.id+je))t.cancel=!0;else if("LargeIcons"!==this.parent.view&&this.targetElement&&this.targetElement.classList.contains("e-emptyrow"))this.setLayoutItem(a);else if(b.closest(a,"."+c))this.setLayoutItem(a);else if(!a.classList.contains(St)&&!a.classList.contains(Ct)&&!a.classList.contains(jt))if("LargeIcons"!==this.parent.view||b.isNullOrUndefined(b.closest(a,"li"))||b.closest(a,"#"+this.parent.element.id+Ee)?b.isNullOrUndefined(b.closest(a,"tr.e-row"))?b.closest(a,"#"+this.parent.element.id+Ee)&&(e=b.closest(a,"li").getAttribute("data-uid"),b.isNullOrUndefined(e)||(this.navUid=e),s=!0):(e=this.targetElement.getAttribute("data-uid"),d=this.parent.detailsviewModule.gridObj.getRowObjectFromUID(e).data,b.isNullOrUndefined(this.targetElement.getAttribute("aria-selected"))&&this.parent.detailsviewModule.gridObj.selectRows([parseInt(this.targetElement.getAttribute("data-rowindex"),10)]),n=!0):(b.closest(a,"li").classList.contains("e-active")||this.parent.largeiconsviewModule.doSelection(a,{ctrlKey:!0,shiftKey:!0}),d=this.parent.visitedData,n=!0),n)!0===b.getValue("isFile",d)?this.setFileItem():this.setFolderItem(!1);else if(s)if(this.setFolderItem(!0),e===this.parent.pathId[0])this.disabledItems.push("Delete","Rename","Cut","Copy");else for(var o=["Delete","Rename","Cut","Copy"],l=0;l<this.disabledItems.length;l++){var h=this.disabledItems[l];-1!==o.indexOf(h)&&(this.disabledItems.splice(l,1),l--)}else"TreeView"===r||"GridView"===r||"LargeIcon"===r?this.setLayoutItem(a):t.cancel=!0;var d,p,n=b.select("#"+this.getMenuId("Paste"),this.contextMenu.element);t.cancel||this.parent.enablePaste||!n||n.classList.contains("e-disabled")?-1!==(d=this.disabledItems.indexOf("Paste"))&&this.disabledItems.splice(d,1):-1===this.disabledItems.indexOf("Paste")&&this.disabledItems.push("Paste"),t.cancel?this.menuTarget=this.currentElement=null:(this.contextMenu.dataBind(),p=!1,(a.classList.contains(St)||a.classList.contains(Ct)||a.classList.contains(jt))&&(p=!0),this.menuItemData=p?this.menuItemData:this.getMenuItemData(),s={fileDetails:[this.menuItemData],element:t.element,target:a,items:(p?t:this.contextMenu).items,menuModule:this.contextMenu,cancel:!1,menuType:this.menuType,isSubMenu:p},this.currentItems=s.items,this.parent.trigger("menuOpen",s,function(e){p||(i.contextMenu.dataBind(),i.contextMenu.items=e.items,i.contextMenu.dataBind()),i.enableItems(i.disabledItems,!1,!0),t.cancel=e.cancel,e.cancel&&(i.menuTarget=i.targetNodeElement=i.currentElement=null)}))},P.prototype.updateActiveModule=function(){this.parent.activeModule=b.closest(this.menuTarget,"#"+this.parent.element.id+Ee)?"navigationpane":b.closest(this.menuTarget,"#"+this.parent.element.id+Pe)?"detailsview":b.closest(this.menuTarget,"#"+this.parent.element.id+Re)?"largeiconsview":this.parent.activeModule},P.prototype.getTargetView=function(e){return e.classList.contains(Dt)?"TreeView":e.classList.contains(xt)?"GridView":e.classList.contains(Et)||e.classList.contains($e)?"LargeIcon":""},P.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},P.prototype.disableItem=function(e){0!==e.length&&(this.disabledItems=this.disabledItems.concat(e))},P.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)},P.prototype.setFolderItem=function(e){var t;this.menuType="folder",this.contextMenu.items=this.getItemData(this.parent.contextMenuSettings.folder.map(function(e){return e.trim()})),this.contextMenu.dataBind(),e?(e=b.select('[data-uid="'+this.navUid+'"]',this.parent.navigationpaneModule.treeObj.element),b.isNullOrUndefined(e)||this.parent.pathNames[this.parent.pathNames.length-1]!==e.querySelector(".e-list-text").innerHTML||"navigationpane"!==this.parent.activeModule?-1!==(e=this.disabledItems.indexOf("Open"))&&this.disabledItems.splice(e,1):this.disabledItems.push("Open"),0===this.parent.selectedItems.length&&-1!==(t=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(t,1)):"navigationpane"!==this.parent.activeModule&&(1===this.parent.selectedItems.length?-1!==(t=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(t,1):this.disabledItems.push("Rename","Paste"))},P.prototype.setFileItem=function(){var e;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?-1!==(e=this.disabledItems.indexOf("Rename"))&&this.disabledItems.splice(e,1):this.disabledItems.push("Rename")},P.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!==b.closest(e,"#"+this.parent.element.id+Re).getElementsByClassName(c).length||"Details"===this.parent.view&&0!==b.closest(e,"#"+this.parent.element.id+Pe).getElementsByClassName(c).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()},P.prototype.checkValidItem=function(e){return b.isNullOrUndefined(b.select("#"+this.getMenuId(e),this.currentElement))?b.isNullOrUndefined(b.select("#"+e,this.currentElement))?-1:2:1},P.prototype.getMenuItemData=function(){var e;return"layout"===this.menuType?O(this.parent):(e={target:this.menuTarget},this.parent.notify(ji,e),this.parent.itemData[0])},P.prototype.onSelect=function(s){var a,r,e,o=this;!b.isNullOrUndefined(s.item)&&s.item.id&&("refresh"===(a=s.item.id.substr((this.parent.element.id+"_cm_").length))||"newfolder"===a||"upload"===a?(r=[O(this.parent)],this.parent.itemData=r):(this.parent.notify(Ri,{}),r="navigationpane"===this.parent.activeModule&&"open"===a?[this.menuItemData]:this.parent.itemData),e={cancel:!1,element:s.element,fileDetails:r,item:s.item},this.parent.trigger("menuClick",e,function(e){var t;if(!e.cancel)switch(o.isMenuItemClicked=!0,a){case"cut":mn(o.parent);break;case"copy":fn(o.parent);break;case"paste":"folder"===o.menuType?"navigationpane"===o.parent.activeModule?(o.parent.navigationpaneModule.openFileOnContextMenuClick(b.closest(o.targetNodeElement,"li")),o.parent.folderPath=o.parent.path):o.parent.folderPath=vn(o.parent,o.menuItemData,o.parent.path):o.parent.folderPath="",Mn(o.parent);break;case"delete":for(var i=0;i<r.length;i++)if(!S(r[i]))return void D(o.parent,r[i],v);x(o.parent,"Delete");break;case"download":for(var n=0;n<r.length;n++)if(!as(r[n]))return void D(o.parent,r[n],Xi);"navigationpane"===o.parent.activeModule?o.parent.notify(Hi,{}):0<o.parent.selectedItems.length&&_s(o.parent,o.parent.path,o.parent.selectedItems);break;case"rename":S(r[0])?(o.parent.notify(xi,{}),x(o.parent,"Rename")):D(o.parent,r[0],v);break;case"selectall":o.parent.notify(Oi,{});break;case"refresh":un(o.parent);break;case"open":o.parent.visitedItem&&"navigationpane"!==o.parent.activeModule?o.parent.notify(vi,{target:o.parent.visitedItem}):"navigationpane"===o.parent.activeModule&&(o.parent.visitedItem&&o.parent.notify(vi,{target:o.parent.visitedItem}),o.parent.navigationpaneModule.openFileOnContextMenuClick(b.closest(o.targetNodeElement,"li")));break;case"details":o.parent.notify(m,{}),t=o.parent.selectedItems,"navigationpane"===o.parent.activeModule&&(t=[],o.parent.navigationpaneModule.openFileOnContextMenuClick(b.closest(o.targetNodeElement,"li"))),ms(o.parent,t,o.parent.path,"details");break;case"newfolder":rs(o.parent);break;case"upload":os(o.parent);break;case"name":case"size":case"date":case"ascending":case"descending":case"none":Nn(o.parent,s);break;case"largeiconsview":pn(o.parent,"LargeIcons");break;case"detailsview":pn(o.parent,"Details")}}))},P.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++)"cssClass"===i[t]&&(this.contextMenu.cssClass=xn(this.parent,qe))},P.prototype.addEventListener=function(){this.parent.on(ci,this.destroy,this),this.parent.on(l,this.onPropertyChanged,this),this.keyboardModule=new b.KeyboardEvents(this.contextMenu.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},P.prototype.removeEventListener=function(){this.parent.off(ci,this.destroy),this.parent.off(l,this.onPropertyChanged),this.keyboardModule.destroy()},P.prototype.keyActionHandler=function(e){switch(e.action){case"uparrow":case"downarrow":e.preventDefault()}},P.prototype.getModuleName=function(){return"contextmenu"},P.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.contextMenu.destroy(),this.targetElement=null)},P.prototype.getItemData=function(e){for(var t=[],i=0;i<e.length;i++){var n=void 0,s=this.getMenuId(e[i]),a=w(this.parent,e[i]);switch(e[i]){case"|":n={separator:!0};break;case"Open":n={id:s,text:a,iconCss:Pt};break;case"Upload":n={id:s,text:a,iconCss:Rt};break;case"Cut":n={id:s,text:a,iconCss:Mt};break;case"Copy":n={id:s,text:a,iconCss:kt};break;case"Paste":n={id:s,text:a,iconCss:Lt};break;case"Delete":n={id:s,text:a,iconCss:Tt};break;case"Rename":n={id:s,text:a,iconCss:At};break;case"NewFolder":n={id:s,text:a,iconCss:Ft};break;case"Details":n={id:s,text:a,iconCss:Vt};break;case"SortBy":n={id:s,text:a,iconCss:Ut,items:[{id:this.getMenuId("Name"),text:w(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?it:null},{id:this.getMenuId("Size"),text:w(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?it:null},{id:this.getMenuId("Date"),text:w(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?it:null},{separator:!0},{id:this.getMenuId("Ascending"),text:w(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?o:null},{id:this.getMenuId("Descending"),text:w(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?o:null},{id:this.getMenuId("None"),text:w(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?o:null}]};break;case"View":n={id:s,text:a,iconCss:"Details"===this.parent.view?zt:qt,items:[{id:this.getMenuId("largeiconsview"),text:w(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?null:o},{id:this.getMenuId("detailsview"),text:w(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?o:null}]};break;case"Refresh":n={id:s,text:a,iconCss:_t};break;case"SelectAll":n={id:s,text:a,iconCss:Ht};break;case"Download":n={id:s,text:a,iconCss:Bt};break;default:n={id:s,text:a}}t.push(n)}return t},P.prototype.getMenuId=function(e){return this.parent.element.id+"_cm_"+e.split(" ").join("").toLowerCase()};var ha=P;function P(e){this.isMenuItemClicked=!1,this.currentItems=[],this.currentElement=null,this.disabledItems=[],this.parent=e,this.render()}var da,pa,ca,ua={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"},n=(da=function(e,t){return(da=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])}))(e,t)},function(e,t){function i(){this.constructor=e}da(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),R=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;0<=o;o--)(s=e[o])&&(r=(a<3?s(r):3<a?s(t,i,r):s(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},n=(pa=b.Component,n(M,pa),(ca=M).prototype.getModuleName=function(){return"filemanager"},M.prototype.preRender=function(){!b.isNullOrUndefined(this.element.id)&&""!==this.element.id||this.element.setAttribute("id",b.getUniqueID("filemanager")),this.ensurePath(),this.feParent=[],this.feFiles=[],b.setStyleAttribute(this.element,{width:b.formatUnit(this.width),height:b.formatUnit(this.height)}),this.isDevice=b.Browser.isDevice,this.isMobile=this.checkMobile(),this.isMobile&&this.setProperties({navigationPaneSettings:{visible:!1}},!0);var e=b.closest(this.element,".e-bigger");this.isBigger=!!e,this.activeModule="LargeIcons"===this.view?"largeiconsview":"detailsview",r.createSpinner({target:this.element},b.createElement),this.addWrapper(),this.keyConfigs={altN:"alt+n",f5:"f5",ctrlShift1:"ctrl+shift+1",ctrlShift2:"ctrl+shift+2",ctrlU:"ctrl+u"},this.localeObj=new b.L10n(this.getModuleName(),ua,this.locale)},M.prototype.getPersistData=function(){return this.addOnPersist(["view","path","selectedItems"])},M.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},M.prototype.render=function(){this.initialize();var e=b.isNullOrUndefined(this.selectedItems)?[]:this.allowMultiSelection?this.selectedItems:this.selectedItems.slice(this.selectedItems.length-1);this.setProperties({selectedItems:e},!0),this.fileView=this.view,this.isMac=0<=navigator.platform.toUpperCase().indexOf("MAC"),this.setRtl(this.enableRtl),this.addEventListeners(),C(this,this.path!==this.originalPath?ni:u,this.path),"Details"===this.fileView&&this.largeiconsviewModule.element.classList.add(Xt),this.adjustHeight(),b.isNullOrUndefined(this.navigationpaneModule)&&(this.splitterObj.collapse(this.enableRtl?1:0),b.select("."+Zt,this.element).classList.add(Xt)),this.wireEvents(),this.renderComplete()},M.prototype.ensurePath=function(){var e=this.path,e=((e=b.isNullOrUndefined(e)?"/":e).lastIndexOf("/")!==e.length-1&&(e+="/"),(this.originalPath=e).split("/"));this.setProperties({path:e[0]+"/"},!0),this.pathNames=[],this.pathId=["fe_tree"],this.itemData=[]},M.prototype.initialize=function(){this.isMobile&&b.addClass([this.element],We),this.allowMultiSelection&&b.addClass([this.element],ze),this.addCssClass(null,this.cssClass),this.renderFileUpload()},M.prototype.addWrapper=function(){var e=this.createElement("div",{id:this.element.id+je}),e=(this.element.appendChild(e),this.createElement("div",{id:this.element.id+xe,className:Je})),t=(this.element.appendChild(e),this.createElement("div",{id:this.element.id+Ne,className:Qe})),i=this.createElement("div",{id:this.element.id+Ee}),i=(t.appendChild(i),this.createElement("div",{id:this.element.id+Fe,className:Xe})),n=(this.breadCrumbBarNavigation=this.createElement("div",{id:this.element.id+Ve,className:Jt}),i.appendChild(this.breadCrumbBarNavigation),this.createElement("div",{id:this.element.id+Pe})),n=(i.appendChild(n),this.createElement("div",{id:this.element.id+Re,className:$e,attrs:{role:"group"}})),n=(i.appendChild(n),this.createElement("span",{className:ti})),t=(i.appendChild(n),n=this.enableRtl?(e.appendChild(i),e.appendChild(t),[{size:"75%",min:"270px"},{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()}]):(e.appendChild(t),e.appendChild(i),[{size:"25%",min:this.navigationPaneSettings.minWidth.toString(),max:this.navigationPaneSettings.maxWidth.toString()},{size:"75%",min:"270px"}]),this.splitterObj=new A.Splitter({paneSettings:n,width:"100%",enableRtl:!1,enableHtmlSanitizer:this.enableHtmlSanitizer,resizing:this.splitterResize.bind(this)}),this.splitterObj.isStringTemplate=!0,this.splitterObj.appendTo(e),this.createElement("div",{id:this.element.id+Me})),i=(this.element.appendChild(t),this.createElement("ul",{id:this.element.id+Ae})),n=(this.element.appendChild(i),this.createElement("div",{id:this.element.id+ke})),e=(this.element.appendChild(n),this.createElement("div",{id:this.element.id+Le})),t=(this.element.appendChild(e),this.createElement("div",{id:this.element.id+Te}));this.element.appendChild(t)},M.prototype.adjustHeight=function(){var e=b.select("#"+this.element.id+je,this.element),e=e?e.offsetHeight:0;this.splitterObj&&(this.splitterObj.height=(this.element.clientHeight-e).toString(),this.splitterObj.dataBind())},M.prototype.splitterResize=function(){this.notify(pi,{})},M.prototype.splitterAdjust=function(){var e=b.select("."+Zt,this.element);this.navigationPaneSettings.visible?(this.splitterObj.expand(this.enableRtl?1:0),e.classList.remove(Xt)):(this.splitterObj.collapse(this.enableRtl?1:0),e.classList.add(Xt))},M.prototype.addCssClass=function(e,t){b.isNullOrUndefined(e)||""===e||b.removeClass([this.element],e.split(" ")),b.isNullOrUndefined(t)||""===t||b.addClass([this.element],t.split(" "))},M.prototype.showSpinner=function(){r.showSpinner(this.element)},M.prototype.hideSpinner=function(){r.hideSpinner(this.element)},M.prototype.onContextMenu=function(e){e.preventDefault()},M.prototype.checkMobile=function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(b.Browser.userAgent.toLowerCase())&&/mobile/i.test(b.Browser.userAgent.toLowerCase())},M.prototype.renderFileUpload=function(){var e=this.element.id+Ue,e=this.createElement("input",{id:e,attrs:{name:"uploadFiles",type:"file"}});this.element.appendChild(e),this.uploadDialogObj=new r.Dialog({header:w(this,"Header-Upload"),content:e,animationSettings:{effect:"None"},showCloseIcon:!0,closeOnEscape:!0,visible:!1,isModal:!0,width:"350px",target:this.popupTarget||"#"+this.element.id,cssClass:xn(this,this.isMobile?Ke:qe),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+Te),this.renderUploadBox()},M.prototype.renderUploadBox=function(){var e=this.ajaxSettings.uploadUrl||this.ajaxSettings.url;this.uploadObj=new V.Uploader({dropArea:b.select("#"+this.element.id+Fe,this.element),asyncSettings:{saveUrl:e,removeUrl:e,chunkSize:this.uploadSettings.chunkSize,retryCount:0},locale:this.locale,enableRtl:this.enableRtl,uploading:this.onUploading.bind(this),chunkUploading:this.onChunkUploading.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+Ue)},M.prototype.onFileListRender=function(e){this.trigger("uploadListCreate",e)},M.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()},M.prototype.onBeforeOpen=function(t){var e={cancel:t.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupOpen",e,function(e){t.cancel=e.cancel})},M.prototype.onBeforeClose=function(t){var e={cancel:t.cancel,popupName:"Upload",popupModule:this.uploadDialogObj};this.trigger("beforePopupClose",e,function(e){t.cancel=e.cancel})},M.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)},M.prototype.onClose=function(){this.isOpened=!1,this.uploadObj.clearAll();var e={popupModule:this.uploadDialogObj,popupName:"Upload",element:this.uploadDialogObj.element};this.trigger("popupClose",e)},M.prototype.onChunkUploading=function(e){var t="save";if(0!==this.retryArgs.length)for(var i=0;i<this.retryArgs.length;i++)e.fileData.name===this.retryArgs[i].file.name&&(t=this.retryArgs[i].action);var n=JSON.stringify(b.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{size:e.fileData.size},{action:t},{data:n},{filename:e.fileData.name}]},M.prototype.onUploading=function(i){var e="save";if(0!==this.retryArgs.length)for(var t=0;t<this.retryArgs.length;t++)i.fileData.name===this.retryArgs[t].file.name&&(e=this.retryArgs[t].action,0===this.uploadSettings.chunkSize)&&(this.retryArgs.splice(t,1),t=this.retryArgs.length);var n=JSON.stringify(b.getValue(this.pathId[this.pathId.length-1],this.feParent));i.customFormData=[{path:this.path},{size:i.fileData.size},{action:e},{data:n},{filename:i.fileData.name}];n={url:this.ajaxSettings.uploadUrl||this.ajaxSettings.url,type:"POST",mode:!0,dataType:null,contentType:null,data:JSON.stringify(i.customFormData),onSuccess:null,onFailure:null,beforeSend:null};this.uploadEventArgs={action:"Upload",ajaxSettings:n,cancel:!1},this.trigger("beforeSend",this.uploadEventArgs,function(e){i.customFormData=JSON.parse(b.getValue("data",e.ajaxSettings)),i.cancel=e.cancel;var t={cancel:!1,httpRequest:i.currentRequest};"function"==typeof b.getValue("beforeSend",e.ajaxSettings)&&(b.getValue("beforeSend",e.ajaxSettings)(t),b.getValue("cancel",t))&&(i.cancel=b.getValue("cancel",t))})},M.prototype.onRemoving=function(){this.onFileUploadSuccess({count:1}),1===this.uploadObj.getFilesData().length&&this.uploadDialogObj.hide()},M.prototype.onCancel=function(e){var t=JSON.stringify(b.getValue(this.pathId[this.pathId.length-1],this.feParent));e.customFormData=[{path:this.path},{action:"remove"},{data:t}]},M.prototype.onClearing=function(){this.isOpened&&this.uploadDialogObj.hide()},M.prototype.onSelected=function(e){var t;0!==e.filesData.length&&(this.uploadingCount=e.filesData.length,this.uploadedCount=0,ss(t=O(this))?this.uploadDialogObj.show():(e.cancel=!0,D(this,t,Qi)))},M.prototype.onFileUploadSuccess=function(e){this.uploadedCount=this.uploadedCount+e.count,this.uploadSettings.autoClose&&this.uploadingCount===this.uploadedCount&&this.uploadDialogObj.hide()},M.prototype.onChunkUploadComplete=function(e){if(0!==this.retryArgs.length)for(var t=0;t<this.retryArgs.length;t++)(b.isNullOrUndefined(e)?"":b.getValue("file",e).name)===this.retryArgs[t].file.name&&(this.retryArgs.splice(t,1),t=this.retryArgs.length)},M.prototype.onUploadSuccess=function(e){0<this.uploadSettings.chunkSize&&this.onChunkUploadComplete(e),this.trigger("success",{action:"Upload",result:e}),this.itemData=[b.getValue(this.pathId[this.pathId.length-1],this.feParent)],C(this,g,this.path),this.onFileUploadSuccess({count:1}),"function"==typeof b.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)&&b.getValue("onSuccess",this.uploadEventArgs.ajaxSettings)()},M.prototype.onUploadFailure=function(e){0<this.uploadSettings.chunkSize&&this.onChunkUploadComplete(e);var t=b.getValue("response",e),i=b.getValue("statusText",t);""!==i&&b.setValue("statusText",i,e),this.trigger("failure",{action:"Upload",error:e}),400===b.getValue("statusCode",t)&&(this.retryFiles.push(b.getValue("file",e)),this.isRetryOpened||Bs(this,"UploadRetry")),"function"==typeof b.getValue("onFailure",this.uploadEventArgs.ajaxSettings)&&b.getValue("onFailure",this.uploadEventArgs.ajaxSettings)()},M.prototype.onInitialEnd=function(){Pn(this,this.path)},M.prototype.addEventListeners=function(){this.on(ui,this.showSpinner,this),this.on(fi,this.hideSpinner,this),this.on(ni,this.onInitialEnd,this),this.on(m,this.onDetailsInit,this),this.on(gi,this.onFileUploadSuccess,this),b.EventHandler.add(this.element,"contextmenu",this.onContextMenu,this)},M.prototype.removeEventListeners=function(){this.isDestroyed||(this.off(ui,this.showSpinner),this.off(fi,this.hideSpinner),this.off(ni,this.onInitialEnd),this.off(m,this.onDetailsInit),this.off(gi,this.onFileUploadSuccess),b.EventHandler.remove(this.element,"contextmenu",this.onContextMenu))},M.prototype.onDetailsInit=function(){b.isNullOrUndefined(this.activeModule)&&(this.itemData=[b.getValue(this.pathId[this.pathId.length-1],this.feParent)])},M.prototype.resizeHandler=function(){this.adjustHeight(),this.notify(di,{})},M.prototype.keyActionHandler=function(e){switch(e.action){case"altN":e.preventDefault(),this.itemData=[O(this)],ns(this.itemData[0])?x(this,"NewFolder"):D(this,this.itemData[0],Ji);break;case"f5":e.preventDefault(),un(this);break;case"ctrlShift1":e.preventDefault(),this.fileView="Details",this.setProperties({view:"Details"},!0),r.showSpinner(this.element),pn(this,"Details");break;case"ctrlShift2":e.preventDefault(),this.fileView="LargeIcons",this.setProperties({view:"LargeIcons"},!0),r.showSpinner(this.element),pn(this,"LargeIcons");break;case"ctrlU":e.preventDefault(),-1!==this.toolbarSettings.items.indexOf("Upload")&&b.select("#"+this.element.id+Ue,this.element).click()}},M.prototype.wireSelectOnDragEvent=function(e){b.isNullOrUndefined(this.view)||(e&&(this.viewElem="LargeIcons"===this.view?this.largeiconsviewModule.element:this.element.querySelector(".e-gridcontent")),this.viewElem&&(e?this.allowMultiSelection&&(b.EventHandler.add(this.viewElem,"mousedown",this.onDragStart,this),this.on(a,this.onLayoutChange,this),this.on(f,this.onLayoutChange,this)):(b.EventHandler.remove(this.viewElem,"mousedown",this.onDragStart),this.off(a,this.onLayoutChange),this.off(f,this.onLayoutChange))))},M.prototype.wireEvents=function(){this.enableRangeSelection&&this.wireSelectOnDragEvent(!0),b.EventHandler.add(window,"resize",this.resizeHandler,this),this.keyboardModule=new b.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},M.prototype.unWireEvents=function(){this.wireSelectOnDragEvent(!1),b.EventHandler.remove(window,"resize",this.resizeHandler),this.keyboardModule.destroy()},M.prototype.onDragStart=function(e){if(this.viewElem){if(this.allowDragAndDrop)if(b.closest(e.target,this.viewElem.classList.contains("e-large-icons")?".e-list-item":".e-fe-text"))return;e.preventDefault(),this.dragX=e.pageX,this.dragY=e.pageY,this.dragSelectElement||(this.dragSelectElement=b.createElement("div",{id:this.element.id+"_drag",className:"e-filemanager e-drag-select",styles:"left: "+this.dragX+"px;top: "+this.dragY+"px;"}),document.body.append(this.dragSelectElement)),b.EventHandler.add(document,"mouseup",this.onDragStop,this),b.EventHandler.add(this.viewElem,"mousemove",this.onDrag,this),b.EventHandler.add(this.dragSelectElement,"mousemove",this.onDrag,this)}},M.prototype.onDrag=function(e){var t;e.stopPropagation(),this.dragSelectElement?(t=e.pageX-this.dragX,e=e.pageY-this.dragY,b.setStyleAttribute(this.dragSelectElement,{left:t<0?this.dragX+t+"px":this.dragX+"px",top:e<0?this.dragY+e+"px":this.dragY+"px",height:Math.abs(e)+"px",width:Math.abs(t)+"px"}),this.selectItems()):b.EventHandler.remove(this.viewElem,"mousemove",this.onDrag)},M.prototype.onDragStop=function(){this.viewElem&&(b.EventHandler.remove(document,"mouseup",this.onDragStop),b.EventHandler.remove(this.viewElem,"mousemove",this.onDrag)),this.dragSelectElement&&(b.EventHandler.remove(this.dragSelectElement,"mousemove",this.onDrag),0<this.dragSelectElement.clientHeight&&0<this.dragSelectElement.clientWidth&&this.setProperties({selectedItems:this.dragSelectedItems}),this.dragSelectedItems=[],b.detach(this.dragSelectElement),this.dragSelectElement=null)},M.prototype.selectItems=function(){this.dragSelectedItems=[];var e=this.dragSelectElement.getBoundingClientRect(),t=b.selectAll(this.viewElem.classList.contains("e-large-icons")?".e-list-item":".e-row",this.viewElem);b.removeClass(b.selectAll(".e-active",this.viewElem),["e-active","e-focus"]),b.removeClass(b.selectAll(".e-check",this.viewElem),["e-check"]);for(var i=0,n=t;i<n.length;i++){var s=n[i],a=s.getBoundingClientRect();!(e.right<a.left||e.left>a.right||e.bottom<a.top||e.top>a.bottom)&&0<this.dragSelectElement.clientHeight&&0<this.dragSelectElement.clientWidth&&(this.viewElem.classList.contains("e-large-icons")?(s.classList.add("e-active"),this.dragSelectedItems.push(s.getAttribute("title"))):(b.addClass(b.selectAll(".e-rowcell",s),["e-active"]),this.dragSelectedItems.push(s.querySelector(".e-drag-text").textContent)),s.querySelector(".e-frame").classList.add("e-check"))}},M.prototype.onLayoutChange=function(){this.enableRangeSelection&&(this.unWireEvents(),this.wireEvents())},M.prototype.setPath=function(){this.setProperties({selectedItems:[]},!0),this.ensurePath(),this.notify(Di,{selectedNode:this.pathId[0]}),C(this,this.path!==this.originalPath?ni:u,this.path)},M.prototype.onPropertyChanged=function(e,t){for(var i=this,n=!1,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(l,{module:"common",newProp:e,oldProp:t});break;case"showItemCheckBoxes":this.showItemCheckBoxes=e.showItemCheckBoxes,this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"enableVirtualization":this.enableVirtualization=e.enableVirtualization,n=!0;break;case"allowMultiSelection":this.allowMultiSelection?b.addClass([this.element],ze):(1<this.selectedItems.length&&this.setProperties({selectedItems:this.selectedItems.slice(this.selectedItems.length-1)},!0),b.removeClass([this.element],ze)),this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"cssClass":this.addCssClass(t.cssClass,e.cssClass),this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"detailsViewSettings":this.notify(l,{module:"detailsview",newProp:e,oldProp:t});break;case"enableRangeSelection":this.wireSelectOnDragEvent(!1),e.enableRangeSelection&&this.wireSelectOnDragEvent(!0);break;case"enableRtl":this.enableRtl=e.enableRtl,n=!0;break;case"rootAliasName":this.rootAliasName=e.rootAliasName,n=!0;break;case"height":r=b.isNullOrUndefined(e.height)?e.height:b.formatUnit(e.height),b.setStyleAttribute(this.element,{height:r}),this.adjustHeight(),this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"locale":b.isNullOrUndefined(e.enableRtl)||this.setProperties({enableRtl:e.enableRtl},!0),this.localeSetModelOption(e);break;case"navigationPaneSettings":this.splitterAdjust(),this.notify(l,{module:"navigationpane",newProp:e,oldProp:t});break;case"path":this.setPath();break;case"searchSettings":b.isNullOrUndefined(e.searchSettings.allowSearchOnTyping)||this.setProperties({searchSettings:{allowSearchOnTyping:e.searchSettings.allowSearchOnTyping}},!0),b.isNullOrUndefined(e.searchSettings.ignoreCase)&&this.setProperties({searchSettings:{ignoreCase:e.searchSettings.ignoreCase}},!0),b.isNullOrUndefined(e.searchSettings.filterType)&&this.setProperties({searchSettings:{filterType:e.searchSettings.filterType}},!0),this.notify(l,{module:"breadcrumbbar",newProp:e,oldProp:t});break;case"selectedItems":"Details"===this.view?this.notify(l,{module:"detailsview",newProp:e,oldProp:t}):"LargeIcons"===this.view&&this.notify(l,{module:"largeiconsview",newProp:e,oldProp:t});break;case"showFileExtension":case"showHiddenItems":this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"showThumbnail":this.notify(l,{module:"largeiconsview",newProp:e,oldProp:t});break;case"toolbarSettings":case"toolbarItems":this.adjustHeight(),this.notify(l,{module:"toolbar",newProp:e,oldProp:t});break;case"uploadSettings":this.updateUploader();break;case"view":"Details"===e.view?this.notify(l,{module:"detailsview",newProp:e,oldProp:t}):"LargeIcons"===e.view&&this.notify(l,{module:"largeiconsview",newProp:e,oldProp:t});break;case"width":b.setStyleAttribute(this.element,{width:b.isNullOrUndefined(e.width)?e.width:b.formatUnit(e.width)}),this.notify(l,{module:"common",newProp:e,oldProp:t});break;case"sortOrder":un(this),this.notify(Si,{});break;case"sortBy":if("Details"===this.view){var r=this.detailsViewSettings.columns;if(!(!b.isNullOrUndefined(r)&&-1!==r.findIndex(function(e){return e.field===i.sortBy})))return;un(this),this.notify(Si,{}),this.notify(Vi,{})}else un(this),this.notify(Si,{});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);break;case"fileSystemData":this.fileSystemData=e.fileSystemData,n=!0}n&&this.refresh()},M.prototype.ajaxSettingSetModel=function(e){b.isNullOrUndefined(e.ajaxSettings.url)||this.setProperties({ajaxSettings:{url:e.ajaxSettings.url}},!0),b.isNullOrUndefined(e.ajaxSettings.uploadUrl)||this.setProperties({ajaxSettings:{uploadUrl:e.ajaxSettings.uploadUrl}},!0),b.isNullOrUndefined(e.ajaxSettings.downloadUrl)||this.setProperties({ajaxSettings:{downloadUrl:e.ajaxSettings.downloadUrl}},!0),b.isNullOrUndefined(e.ajaxSettings.getImageUrl)||this.setProperties({ajaxSettings:{getImageUrl:e.ajaxSettings.getImageUrl}},!0),this.setProperties({path:"/"},!0),this.setProperties({selectedItems:[]},!0),pa.prototype.refresh.call(this)},M.prototype.localeSetModelOption=function(e){this.uploadObj.locale=e.locale,pa.prototype.refresh.call(this)},M.prototype.destroy=function(){this.isDestroyed||(this.refreshing||this.notify(ci,{}),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),b.removeClass([this.element],[Qt,We,ze]),this.element.innerHTML="",this.breadCrumbBarNavigation=null,this.activeElements=null,this.virtualDragElement=null,this.visitedItem=null,pa.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,this.viewElem=null,this.dragSelectElement=null,this.dragSelectedItems=null)},M.prototype.createFolder=function(e){this.notify(Yi,{action:"createFolder"});var t=[O(this)];this.itemData=t,e?/[/\\|*?"<>:]/.test(e)?x(this,"Error",{files:null,error:{code:"402",message:w(this,"Validation-Invalid").replace("{0}",'"'+e+'"'),fileExists:null}}):ns(t[0])?ps(this,e):D(this,t[0],Ji):rs(this)},M.prototype.deleteFiles=function(e){this.notify(Yi,{action:"deleteFiles",ids:e})},M.prototype.disableToolbarItems=function(e){!b.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!1)},M.prototype.downloadFiles=function(e){this.notify(Yi,{action:"downloadFiles",ids:e})},M.prototype.enableToolbarItems=function(e){!b.isNullOrUndefined(e)&&this.toolbarModule&&this.toolbarModule.enableItems(e,!0)},M.prototype.disableMenuItems=function(e){b.isNullOrUndefined(e)||b.isNullOrUndefined(this.contextmenuModule.contextMenu)||this.contextmenuModule.disableItem(e)},M.prototype.getMenuItemIndex=function(e){return this.contextmenuModule?this.contextmenuModule.getItemIndex(e):-1},M.prototype.getToolbarItemIndex=function(e){return this.toolbarModule?this.toolbarModule.getItemIndex(e):-1},M.prototype.filterFiles=function(e){this.filterData=e||null,this.setProperties({selectedItems:[]},!0),this.notify(f,{}),this.isFiltered=!0,""!==this.breadcrumbbarModule.searchObj.element.value&&(this.breadcrumbbarModule.searchObj.element.value=""),cs(this,ai)},M.prototype.getSelectedFiles=function(){return this.notify(Ki,{}),this.itemData},M.prototype.openFile=function(e){this.notify(Yi,{action:"openFile",id:e})},M.prototype.refreshFiles=function(){un(this)},M.prototype.refreshLayout=function(){this.adjustHeight(),this.notify(mi,{})},M.prototype.selectAll=function(){this.notify(Yi,{action:"selectAll"})},M.prototype.traverseBackward=function(){var e;1<this.pathNames.length&&""===this.breadcrumbbarModule.searchObj.element.value&&!this.isFiltered&&(this.pathId.pop(),this.pathNames.pop(),e=this.pathNames.slice(1).join("/"),this.setProperties({path:e=""===e?"/":"/"+e+"/"},!0),C(this,g,this.path),e=this.pathId[this.pathId.length-1],this.notify(Fi,{module:"treeview",selectedNode:e}))},M.prototype.clearSelection=function(){this.notify(Yi,{action:"clearSelection"})},M.prototype.renameFile=function(e,t){this.notify(Yi,{action:"renameFile",id:e,newName:t})},M.prototype.uploadFiles=function(){var e=[O(this)];this.itemData=e,os(this)},M.prototype.closeDialog=function(){ls(this)},M.prototype.setRtl=function(e){e?this.addCssClass(null,Qt):this.addCssClass(Qt,null),this.uploadObj&&(this.uploadDialogObj.enableRtl=e,this.uploadObj.enableRtl=e)},R([b.Complex({},W)],M.prototype,"ajaxSettings",void 0),R([b.Property([])],M.prototype,"fileSystemData",void 0),R([b.Property(!1)],M.prototype,"allowDragAndDrop",void 0),R([b.Property(!0)],M.prototype,"allowMultiSelection",void 0),R([b.Property(!0)],M.prototype,"showItemCheckBoxes",void 0),R([b.Complex({},re)],M.prototype,"contextMenuSettings",void 0),R([b.Property("")],M.prototype,"cssClass",void 0),R([b.Complex({},ie)],M.prototype,"detailsViewSettings",void 0),R([b.Property(!0)],M.prototype,"enableHtmlSanitizer",void 0),R([b.Property(!1)],M.prototype,"enablePersistence",void 0),R([b.Property(!1)],M.prototype,"enableVirtualization",void 0),R([b.Property("400px")],M.prototype,"height",void 0),R([b.Property("LargeIcons")],M.prototype,"view",void 0),R([b.Complex({},pe)],M.prototype,"navigationPaneSettings",void 0),R([b.Property("/")],M.prototype,"path",void 0),R([b.Property(null)],M.prototype,"popupTarget",void 0),R([b.Complex({},t)],M.prototype,"searchSettings",void 0),R([b.Property()],M.prototype,"selectedItems",void 0),R([b.Property(!0)],M.prototype,"showFileExtension",void 0),R([b.Property(null)],M.prototype,"rootAliasName",void 0),R([b.Property(!1)],M.prototype,"showHiddenItems",void 0),R([b.Property(!0)],M.prototype,"showThumbnail",void 0),R([b.Property("Ascending")],M.prototype,"sortOrder",void 0),R([b.Property("name")],M.prototype,"sortBy",void 0),R([b.Property(null)],M.prototype,"sortComparer",void 0),R([b.Property(!1)],M.prototype,"enableRangeSelection",void 0),R([b.Complex({},X)],M.prototype,"toolbarSettings",void 0),R([b.Collection([],K)],M.prototype,"toolbarItems",void 0),R([b.Complex({},ye)],M.prototype,"uploadSettings",void 0),R([b.Property("100%")],M.prototype,"width",void 0),R([b.Event()],M.prototype,"fileLoad",void 0),R([b.Event()],M.prototype,"fileOpen",void 0),R([b.Event()],M.prototype,"beforeDownload",void 0),R([b.Event()],M.prototype,"beforeImageLoad",void 0),R([b.Event()],M.prototype,"beforePopupClose",void 0),R([b.Event()],M.prototype,"beforePopupOpen",void 0),R([b.Event()],M.prototype,"beforeSend",void 0),R([b.Event()],M.prototype,"created",void 0),R([b.Event()],M.prototype,"beforeFolderCreate",void 0),R([b.Event()],M.prototype,"folderCreate",void 0),R([b.Event()],M.prototype,"destroyed",void 0),R([b.Event()],M.prototype,"beforeDelete",void 0),R([b.Event()],M.prototype,"delete",void 0),R([b.Event()],M.prototype,"beforeRename",void 0),R([b.Event()],M.prototype,"rename",void 0),R([b.Event()],M.prototype,"beforeMove",void 0),R([b.Event()],M.prototype,"move",void 0),R([b.Event()],M.prototype,"search",void 0),R([b.Event()],M.prototype,"fileDragStart",void 0),R([b.Event()],M.prototype,"fileDragging",void 0),R([b.Event()],M.prototype,"fileDragStop",void 0),R([b.Event()],M.prototype,"fileDropped",void 0),R([b.Event()],M.prototype,"fileSelection",void 0),R([b.Event()],M.prototype,"fileSelect",void 0),R([b.Event()],M.prototype,"menuClick",void 0),R([b.Event()],M.prototype,"menuOpen",void 0),R([b.Event()],M.prototype,"menuClose",void 0),R([b.Event()],M.prototype,"failure",void 0),R([b.Event()],M.prototype,"popupClose",void 0),R([b.Event()],M.prototype,"popupOpen",void 0),R([b.Event()],M.prototype,"success",void 0),R([b.Event()],M.prototype,"toolbarClick",void 0),R([b.Event()],M.prototype,"toolbarCreate",void 0),R([b.Event()],M.prototype,"uploadListCreate",void 0),ca=R([b.NotifyPropertyChanges],M));function M(e,t){e=pa.call(this,e,t)||this;return e.filterData=null,e.selectedNodes=[],e.duplicateItems=[],e.duplicateRecords=[],e.previousPath=[],e.nextPath=[],e.existingFileCount=0,e.isLayoutChange=!1,e.layoutSelectedItems=[],e.renamedId=null,e.uploadItem=[],e.deleteRecords=[],e.isFile=!1,e.isCut=!1,e.isSearchCut=!1,e.isSearchDrag=!1,e.isPasteError=!1,e.folderPath="",e.isSameAction=!1,e.isFiltered=!1,e.isSortByClicked=!1,e.enablePaste=!1,e.persistData=!1,e.retryArgs=[],e.isOpened=!1,e.isRetryOpened=!1,e.isPathDrag=!1,e.searchedItems=[],e.retryFiles=[],e.isApplySame=!1,e.dragData=[],e.dragNodes=[],e.dragPath="",e.dropPath="",e.isDragDrop=!1,e.treeExpandTimer=null,e.dragCursorPosition={left:44,top:18},e.isDropEnd=!1,e.dragCount=0,e.droppedObjects=[],e.uploadingCount=0,e.uploadedCount=0,e.isMac=!1,e.dragSelectedItems=[],ca.Inject(la,oa,ha),e}k.prototype.render=function(){var t=this,e=(this.items=this.toolbarItemData(this.getItems(this.parent.toolbarSettings.items.map(function(e){return e.trim()}))),{items:this.items});this.parent.trigger("toolbarCreate",e,function(e){t.items=e.items,t.toolbarObj=new B.Toolbar({items:t.items,created:t.toolbarCreateHandler.bind(t),overflowMode:"Popup",clicked:t.onClicked.bind(t),enableHtmlSanitizer:t.parent.enableHtmlSanitizer,enableRtl:t.parent.enableRtl}),t.toolbarObj.isStringTemplate=!0,t.toolbarObj.root=t.parent.root||t.parent,t.toolbarObj.appendTo("#"+t.parent.element.id+je)})},k.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},k.prototype.getItems=function(e){e=e.slice();return this.parent.isDevice&&this.parent.allowMultiSelection&&e.push("SelectAll"),e=0<this.parent.toolbarItems.length?this.parent.toolbarItems.map(function(e){return e.name}):e},k.prototype.onClicked=function(n){var s,a,e,r=this;!b.isNullOrUndefined(n.item)&&n.item.id&&("refresh"===(s=n.item.id.substr((this.parent.element.id+"_tb_").length))||"newfolder"===s||"upload"===s?(a=[O(this.parent)],this.parent.itemData=a):(this.parent.notify(Ri,{}),a=this.parent.itemData),e={cancel:!1,fileDetails:a,item:n.item},this.parent.trigger("toolbarClick",e,function(e){var t;if(!e.cancel)switch(s){case"sortby":(t=b.closest(n.originalEvent.target,"."+Ze))&&t.classList.contains("e-toolbar-popup")&&(n.cancel=!0);break;case"newfolder":rs(r.parent);break;case"cut":mn(r.parent);break;case"copy":fn(r.parent);break;case"delete":for(var i=0;i<a.length;i++)if(!S(a[i]))return void D(r.parent,a[i],v);x(r.parent,"Delete");break;case"details":r.parent.notify(m,{}),t=r.parent.selectedItems,"navigationpane"===r.parent.activeModule&&(t=[]),ms(r.parent,t,r.parent.path,"details");break;case"paste":r.parent.folderPath="",Mn(r.parent);break;case"refresh":un(r.parent);break;case"download":$n(r.parent);break;case"rename":S(a[0])?(r.parent.notify(xi,{}),x(r.parent,"Rename")):D(r.parent,a[0],v);break;case"upload":os(r.parent);break;case"selectall":r.parent.notify(Oi,{});break;case"selection":r.parent.notify(wi,{})}}))},k.prototype.toolbarCreateHandler=function(){for(var e,n=this,i=(b.isNullOrUndefined(b.select("#"+this.getId("SortBy"),this.parent.element))||(e=[{id:this.getPupupId("name"),text:w(this.parent,"Name"),iconCss:"name"===this.parent.sortBy?it:""},{id:this.getPupupId("size"),text:w(this.parent,"Size"),iconCss:"size"===this.parent.sortBy?it:""},{id:this.getPupupId("date"),text:w(this.parent,"DateModified"),iconCss:"_fm_modified"===this.parent.sortBy?it:""},{separator:!0},{id:this.getPupupId("ascending"),text:w(this.parent,"Ascending"),iconCss:"Ascending"===this.parent.sortOrder?o:""},{id:this.getPupupId("descending"),text:w(this.parent,"Descending"),iconCss:"Descending"===this.parent.sortOrder?o:""},{id:this.getPupupId("none"),text:w(this.parent,"None"),iconCss:"None"===this.parent.sortOrder?o:""}],this.buttonObj=new H.DropDownButton({items:e,cssClass:xn(this.parent,qe),select:Nn.bind(this,this.parent),enableHtmlSanitizer:this.parent.enableHtmlSanitizer,enableRtl:this.parent.enableRtl,iconCss:Ut}),this.buttonObj.isStringTemplate=!0,this.buttonObj.appendTo("#"+this.getId("SortBy"))),b.isNullOrUndefined(b.select("#"+this.getId("View"),this.parent.element))||(e=[{id:this.getPupupId("large"),text:w(this.parent,"View-LargeIcons"),iconCss:"Details"===this.parent.view?"":o},{id:this.getPupupId("details"),text:w(this.parent,"View-Details"),iconCss:"Details"===this.parent.view?o:""}],this.layoutBtnObj=new H.DropDownButton({iconCss:"Details"===this.parent.view?zt:qt,cssClass:xn(this.parent,"e-caret-hide "+qe),items:e,select:this.layoutChange.bind(this),enableRtl:this.parent.enableRtl,content:'<span class="e-tbar-btn-text">'+w(this.parent,"View")+"</span>",beforeItemRender:function(e){var t=e.item.iconCss,i=e.item.text===w(n.parent,"View-LargeIcons"),t=(e.element.innerHTML='<span class="'+(t?" e-menu-icon "+t:"")+'"></span>'+(i?'<span class="e-icons e-fe-large e-menu-icon"></span>':'<span class="e-icons e-fe-grid e-menu-icon"></span>')+e.item.text,e.element.firstChild);t&&""===t.className&&e.element.removeChild(t)}}),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()),b.selectAll(".e-btn",this.toolbarObj.element)),t=0;t<i.length;t++)!function(t){i[t].onkeydown=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||e.preventDefault()},i[t].onkeyup=function(e){13!==e.keyCode||e.target.classList.contains("e-fe-popup")||i[t].click()}}(t);this.parent.refreshLayout()},k.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?it:"":e[t].id===this.getPupupId("size")?e[t].iconCss="size"===this.parent.sortBy?it:"":e[t].id===this.getPupupId("date")?"dateModified"===this.parent.sortBy||"dateCreated"===this.parent.sortBy?e[t].iconCss=this.parent.sortBy==this.parent.sortBy?it:"":e[t].iconCss="_fm_modified"===this.parent.sortBy?it:"":e[t].id===this.getPupupId("ascending")?e[t].iconCss="Ascending"===this.parent.sortOrder?o:"":e[t].id===this.getPupupId("descending")?e[t].iconCss="Descending"===this.parent.sortOrder?o:"":e[t].id===this.getPupupId("none")&&(e[t].iconCss="None"===this.parent.sortOrder?o:"")},k.prototype.getPupupId=function(e){return this.parent.element.id+"_ddl_"+e.toLowerCase()},k.prototype.layoutChange=function(e){"Details"===this.parent.view?e.item.id===this.getPupupId("large")&&pn(this.parent,"LargeIcons"):e.item.id===this.getPupupId("details")&&pn(this.parent,"Details")},k.prototype.toolbarItemData=function(e){var t=[],i="Both";this.parent.isMobile&&(i="Overflow");for(var n=0;n<e.length;n++){var s,a=void 0,r=void 0,o=(0<this.parent.toolbarItems.length&&(r=this.getItemModel(this.parent.toolbarItems[parseInt(n.toString(),10)])),this.getId(e[n])),l=w(this.parent,e[n]),h=w(this.parent,"Tooltip-"+e[n]);switch(e[n]){case"|":a={type:"Separator"};break;case"Upload":a={id:o,text:l,tooltipText:h,prefixIcon:Rt,showTextOn:i};break;case"SortBy":var d='<span class="e-tbar-btn-text e-tbar-ddb-text">'+l+"</span>",a={id:o,tooltipText:h,template:'<button id="'+o+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1">'+(d=r&&r.text?'<span class="e-tbar-btn-text e-tbar-ddb-text">'+r.text+"</span>":d)+"</button>"};break;case"Refresh":a={id:o,text:l,tooltipText:h,prefixIcon:_t,showTextOn:i};break;case"Selection":a={id:o,text:l,tooltipText:h,suffixIcon:Kt,overflow:"Show",align:"Right"};break;case"View":d=void 0,d=r&&r.text?r.text:w(this.parent,"View");a={id:o,tooltipText:h,prefixIcon:"Details"===this.parent.view?zt:qt,overflow:"Show",align:"Right",text:l,showTextOn:"Overflow",template:'<button id="'+o+'" class="e-tbar-btn e-tbtn-txt" tabindex="-1" aria-label='+d+"></button>"};break;case"Details":a={id:o,tooltipText:h,prefixIcon:Vt,overflow:"Show",align:"Right",text:l,showTextOn:"Overflow"};break;case"NewFolder":a={id:o,text:l,tooltipText:h,prefixIcon:Ft,showTextOn:i};break;case"Cut":a={id:o,text:l,tooltipText:h,prefixIcon:Mt,showTextOn:i};break;case"Copy":a={id:o,text:l,tooltipText:h,prefixIcon:kt,showTextOn:i};break;case"Paste":a={id:o,text:l,tooltipText:h,prefixIcon:Lt,showTextOn:i};break;case"Delete":a={id:o,text:l,tooltipText:h,prefixIcon:Tt,showTextOn:i};break;case"Rename":a={id:o,text:l,tooltipText:h,prefixIcon:At,showTextOn:i};break;case"Download":a={id:o,text:l,tooltipText:h,prefixIcon:Bt,showTextOn:i};break;case"SelectAll":a={id:o,text:l,tooltipText:h,prefixIcon:Ht,showTextOn:i};break;default:a={id:o,text:l,tooltipText:h,template:""}}0<this.parent.toolbarItems.length&&r?(s=Object.assign({},a,r),t.push(s)):t.push(a)}return t},k.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},k.prototype.getId=function(e){return this.parent.element.id+"_tb_"+e.toLowerCase()},k.prototype.addEventListener=function(){this.parent.on(l,this.onPropertyChanged,this),this.parent.on(f,this.onSelectionChanged,this),this.parent.on(a,this.onLayoutChange,this),this.parent.on(Ei,this.showPaste,this),this.parent.on(Pi,this.hidePaste,this),this.parent.on(ci,this.destroy,this),this.parent.on(Si,this.updateSortByButton,this)},k.prototype.reRenderToolbar=function(e){var t=this,i=[];0<this.parent.toolbarItems.length?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()})),0<i.length&&(this.items=this.toolbarItemData(this.getItems(i)),e={items:this.items},this.parent.trigger("toolbarCreate",e,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()}))},k.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)):1<this.parent.selectedItems.length&&(this.hideItems(this.multiple,!1),this.hideItems(this.selection,!0));var e,t=b.select("#"+this.getId("Selection"),this.toolbarObj.element);0<this.parent.selectedItems.length&&t&&!this.parent.enableVirtualization&&(e=void 0,e=1===this.parent.selectedItems.length?this.parent.selectedItems.length+" "+w(this.parent,"Item-Selection"):this.parent.selectedItems.length+" "+w(this.parent,"Items-Selection"),b.select(".e-tbar-btn-text",t).textContent=e,this.toolbarObj.hideItem(t.parentElement,!1))},k.prototype.hideItems=function(e,t){for(var i=0;i<e.length;i++){var n=b.select("#"+this.getId(e[i]),this.parent.element);n&&this.toolbarObj.hideItem(n.parentElement,t)}},k.prototype.hideStatus=function(){var e=b.select("#"+this.getId("Selection"),this.toolbarObj.element);e&&this.toolbarObj.hideItem(e.parentElement,!0)},k.prototype.showPaste=function(){this.hideItems(["Paste"],!1)},k.prototype.hidePaste=function(){this.hideItems(["Paste"],!0)},k.prototype.onLayoutChange=function(){if(this.layoutBtnObj){this.layoutBtnObj.iconCss="Details"===this.parent.view?zt:qt;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?o:"":e[t].id===this.getPupupId("details")&&(e[t].iconCss="Details"===this.parent.view?o:"")}},k.prototype.removeEventListener=function(){this.parent.off(l,this.onPropertyChanged),this.parent.off(f,this.onSelectionChanged),this.parent.off(a,this.onLayoutChange),this.parent.off(Ei,this.showPaste),this.parent.off(Pi,this.hidePaste),this.parent.off(ci,this.destroy),this.parent.off(Si,this.updateSortByButton)},k.prototype.getModuleName=function(){return"toolbar"},k.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=xn(this.parent,qe)),this.layoutBtnObj&&(this.layoutBtnObj.cssClass=xn(this.parent,"e-caret-hide "+qe));break;case"height":case"width":this.toolbarObj.refreshOverflow();break;case"toolbarSettings":case"toolbarItems":this.reRenderToolbar(e)}},k.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.buttonObj&&this.buttonObj.destroy(),this.layoutBtnObj&&this.layoutBtnObj.destroy(),this.toolbarObj.destroy(),this.parent.refreshLayout())},k.prototype.enableItems=function(e,t){for(var i=0;i<e.length;i++){var n=b.select("#"+this.getId(e[i]),this.parent.element);n&&this.toolbarObj.enableItems(n.parentElement,t)}};R=k;function k(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()}fa.prototype.setUIVirtualization=function(){var e=this.largeIconInstance.items,t=e.slice(0,1),t=_.ListBase.createListFromJson(b.createElement,t,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(b.selectAll("."+d,t)),this.largeIconInstance.element.appendChild(t),0!==this.itemList.length&&this.largeIconInstance.element.querySelector("."+c)&&this.largeIconInstance.element.removeChild(this.largeIconInstance.element.querySelector("."+c)),this.itemCount=this.getItemCount(Object.keys(this.largeIconInstance.allItems).length),this.largeIconInstance.element.firstChild.remove(),this.largeIconInstance.items=e.slice(0,this.itemCount)},fa.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},fa.prototype.getItemCount=function(e){var t=parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-right"),10)+parseInt(window.getComputedStyle(this.itemList[0]).getPropertyValue("margin-left"),10),t=(this.rowItemCount=Math.floor(parseFloat(b.formatUnit(this.largeIconInstance.element.firstElementChild.clientWidth))/(this.itemList[0].offsetWidth+t)),this.rowItemCount*Math.round(parseFloat(b.formatUnit(this.largeIconInstance.element.clientHeight))/this.itemList[0].offsetHeight));return t=e<t||0===t?e:t},fa.prototype.wireScrollEvent=function(e){e?b.EventHandler.remove(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll):b.EventHandler.add(this.largeIconInstance.element.firstElementChild,"scroll",this.onVirtualUiScroll,this)},fa.prototype.onVirtualUiScroll=function(){this.scrollPosition=b.isNullOrUndefined(this.scrollPosition)?0:this.scrollPosition;var e,t,i=this.getscrollerHeight(0);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)&&(this.topElement.style.height=this.topElementHeight+"px",this.bottomElement.style.height=this.bottomElementHeight+"px",i>this.scrollPosition?(t=Math.round(this.topElementHeight/this.listItemHeight-this.listDiff),this.onNormalScroll(t,!0)):(t=Math.round(this.listDiff-this.topElementHeight/this.listItemHeight),this.onNormalScroll(t,!1))),this.listDiff=Math.round(this.topElementHeight/this.listItemHeight),this.scrollPosition=i,this.largeIconInstance.itemList=Array.prototype.slice.call(b.selectAll("."+d,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)},fa.prototype.getscrollerHeight=function(e){return this.largeIconInstance.element.firstElementChild.scrollTop-e<=0?0:this.largeIconInstance.element.firstElementChild.scrollTop-e},fa.prototype.onNormalScroll=function(e,t){for(var i=0;i<e;i++)this.updateUI(t)},fa.prototype.updateUI=function(e){var t=this;if(e){if(this.items=this.largeIconInstance.allItems.slice(this.renderedCount,this.renderedCount+this.rowItemCount),0<this.items.length){var i=_.ListBase.createListFromJson(b.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(b.selectAll("."+d,i)),this.itemList.forEach(function(e){t.largeIconInstance.element.firstElementChild.insertBefore(e,t.bottomElement)}),this.renderedCount=this.largeIconInstance.allItems.length>=this.renderedCount+this.rowItemCount?this.renderedCount+this.rowItemCount:this.renderedCount+this.lastRowCount;for(var n=0;n<this.rowItemCount;n++)b.detach(this.topElement.nextElementSibling)}}else{var e=void 0,s=void 0,a=(this.renderedCount===this.largeIconInstance.allItems.length?(e=this.renderedCount-(this.itemCount-this.rowItemCount+this.lastRowCount),this.renderedCount=this.renderedCount-this.lastRowCount<this.itemCount?this.itemCount:this.renderedCount-this.lastRowCount,s=!0):(e=this.renderedCount-this.itemCount,this.renderedCount=this.renderedCount-this.rowItemCount<this.itemCount?this.itemCount:this.renderedCount-this.rowItemCount),0<e-this.rowItemCount?e-this.rowItemCount:0);if(this.items=this.largeIconInstance.allItems.slice(a,e),0<this.items.length){i=_.ListBase.createListFromJson(b.createElement,this.items,this.largeIconInstance.listObj);this.itemList=Array.prototype.slice.call(b.selectAll("."+d,i));for(var r=this.itemList.length;0<r;r--)this.largeIconInstance.element.firstElementChild.insertBefore(this.itemList[r-1],this.topElement.nextElementSibling);for(n=0;n<(s?this.lastRowCount:this.rowItemCount);n++)b.detach(this.bottomElement.previousElementSibling)}}},fa.prototype.getModuleName=function(){return"virtualization"},fa.prototype.destroy=function(){this.filemanagerInstance.isDestroyed||b.isNullOrUndefined(this.largeIconInstance.element.firstElementChild)||this.wireScrollEvent(!0)};var ga=fa;function fa(e){this.filemanagerInstance=e,this.largeIconInstance=e.largeiconsviewModule}L.prototype.onInit=function(){var e,t,i;b.isNullOrUndefined(this.treeObj)&&(e=b.getValue(this.parent.pathId[0],this.parent.feParent),b.setValue("_fm_icon","e-fe-folder",e),t={},i=b.getValue("id",e),b.isNullOrUndefined(i)||b.setValue("data-id",i,t),S(e)||b.setValue("class",ts(e),t),b.isNullOrUndefined(t)||b.setValue("_fm_htmlAttr",t,e),this.treeObj=new B.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+Ee),this.wireEvents())},L.prototype.addDragDrop=function(){var t=this;!this.parent.isMobile&&this.treeObj&&(this.parent.allowDragAndDrop&&b.isNullOrUndefined(this.dragObj)?this.dragObj=new b.Draggable(this.treeObj.element,{cursorAt:this.parent.dragCursorPosition,dragTarget:"."+$t,distance:5,dragArea:this.parent.element,drag:Yn.bind(this,this.parent),dragStart:function(e){Bn(t.parent,e,t.dragObj)},dragStop:Hn.bind(this,this.parent),enableTailMode:!0,enableAutoScroll:!1,helper:this.dragHelper.bind(this)}):!this.parent.allowDragAndDrop&&this.dragObj&&(this.dragObj.destroy(),this.dragObj=null))},L.prototype.dragHelper=function(e){var e=e.sender.target;return e.classList.contains($t)?(e=b.closest(e,"li"),this.parent.dragPath="",this.parent.dragData=[],this.parent.activeElements=[],this.parent.activeElements=[e],this.parent.dragNodes=[],ln(this.parent,e),this.parent.dragData=this.getTreeData(e),this.parent.dragPath=this.getDragPath(e,this.parent.dragData[0].name),this.parent.dragNodes.push(this.parent.dragData[0].name),_n(this.parent),this.parent.virtualDragElement):null},L.prototype.getDragPath=function(e,t){return Tn(this.getDropPath(e,t))},L.prototype.getDropPath=function(e,t){var i=e.getAttribute("data-id");return Zi(e,this.parent.hasId?i:t,this.parent.hasId)},L.prototype.onDrowNode=function(e){e={element:e.node,fileDetails:e.nodeData,module:"NavigationPane"};this.parent.trigger("fileLoad",e)},L.prototype.addChild=function(e,t,i){var n=Sn(e),e=this.getTreeData(t);if(0<n.length&&0<e.length&&(null==n[0].filterPath||b.isNullOrUndefined(e[0])&&null==e[0].filterPath||n[0].filterPath!==e[0].filterPath)){for(var s=0,a=n;s<n.length;){a[parseInt(s.toString(),10)]._fm_icon="e-fe-folder";var r={},o=b.getValue("id",a[s]);b.isNullOrUndefined(o)||b.setValue("data-id",o,r),S(a[s])||b.setValue("class",ts(a[s]),r),b.isNullOrUndefined(r)||b.setValue("_fm_htmlAttr",r,a[s]),s++}e=b.select('[data-uid="'+t+'"]',this.treeObj.element),e=b.select("ul",e);b.isNullOrUndefined(e)&&this.treeObj.addNodes(n,t,null,i)}},L.prototype.onNodeSelecting=function(e){var t,i,n;(e.isInteracted||this.isRightClick||this.isSameNodeClicked||this.isPathDragged||this.isRenameParent)&&!this.restrictSelecting?this.renameParent||(this.parent.activeModule="navigationpane",t=this.getTreeData(b.getValue("id",e.nodeData)),e.node.getAttribute("data-uid")!==this.parent.pathId[this.parent.pathId.length-1]&&!this.isRightClick&&!this.isNodeClickCalled||this.isSameNodeClicked?(this.isNodeClickCalled=!1,this.isSameNodeClicked||(this.isSameNodeClicked=!0,n={action:e.action,fileDetails:t[0],isInteracted:e.isInteracted},this.parent.trigger("fileSelect",n)),this.isRightClick||(i={cancel:!1,fileDetails:t[0],module:"NavigationPane"},this.parent.trigger("fileOpen",i),e.cancel=i.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.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]}))):this.previousSelected[0]!==e.node.getAttribute("data-uid")&&(n={action:e.action,fileDetails:t[0],isInteracted:this.isNodeClickCalled},this.parent.trigger("fileSelect",n))):(this.restrictSelecting=!1,this.isNodeClickCalled=!1)},L.prototype.openFileOnContextMenuClick=function(e){var t=this.treeObj.getTreeData(e),t=(this.parent.selectedItems=[],this.parent.itemData=t,this.activeNode=e,{cancel:!(this.parent.activeModule="navigationpane"),fileDetails:t[0],module:"NavigationPane"});this.parent.trigger("fileOpen",t),this.isNodeClickCalled=!0,t.cancel||($i(e,this.parent.itemData[0],this.parent),C(this.parent,this.isPathDragged?Li:g,this.parent.path),this.parent.visitedItem=e,this.isPathDragged=this.isRenameParent=this.isRightClick=!1,this.treeObj.setProperties({selectedNodes:[e.getAttribute("data-uid")]}))},L.prototype.onNodeSelected=function(e){var t;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",t=this.getTreeData(b.getValue("id",e.nodeData)),this.parent.selectedItems=[],this.parent.itemData=t,t=this.parent.path,!this.isRightClick&&this.isSameNodeClicked?$i(e.node,this.parent.itemData[0],this.parent):(this.parent.pathId=en(e.node),this.parent.visitedItem=e.node),e.node.querySelector("."+Yt)&&null===e.node.querySelector("."+d)&&(this.expandNodeTarget="add"),t!==this.parent.path&&(!this.isRightClick&&this.isSameNodeClicked&&(C(this.parent,this.isPathDragged?Li:g,this.parent.path),this.isNodeClickCalled=!0),this.parent.visitedItem=e.node),this.isPathDragged=this.isRenameParent=this.isRightClick=this.isSameNodeClicked=!1):this.parent.pathId=en(e.node)},L.prototype.onPathDrag=function(e){this.isPathDragged=!0,this.selectResultNode(e[0])},L.prototype.onNodeExpand=function(e){var t,i,n;(e.isInteracted||this.isDrag)&&null===e.node.querySelector("."+d)&&(this.isNodeExpandCalled=!0,i=b.getValue("text",e.nodeData),n=e.node.getAttribute("data-id"),t=!b.isNullOrUndefined(n),i=b.isNullOrUndefined(n)?i:n,n=Zi(e.node,i,t),this.expandNodeTarget=e.node.getAttribute("data-uid"),this.parent.expandedId=this.expandNodeTarget,this.parent.itemData=this.getTreeData(b.getValue("id",e.nodeData)),this.parent.pathId.push(b.getValue("id",e.nodeData)),C(this.parent,Ci,n))},L.prototype.onNodeExpanded=function(e){this.addChild(e.files,this.expandNodeTarget,!1),this.parent.expandedId=null,this.isNodeExpandCalled=!1},L.prototype.onNodeClicked=function(e){var t;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.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]})):e.node.getAttribute("data-uid")===this.treeObj.selectedNodes[0]&&0!==this.parent.selectedItems.length?(this.parent.setProperties({selectedItems:[]},!0),t="LargeIcons"===this.parent.view?"largeiconsview":"detailsview",this.parent.notify(l,{module:t,newProp:{selectedItems:[]}})):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.setProperties({selectedNodes:[e.node.getAttribute("data-uid")]}))},L.prototype.onNodeEditing=function(e){b.isNullOrUndefined(e.innerHtml)||(e.cancel=!0)},L.prototype.onPathChanged=function(e){this.parent.isCut=!1;var t,i=b.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feFiles);"add"===this.expandNodeTarget&&(t=b.select('[data-uid="'+this.treeObj.selectedNodes[0]+'"]',this.treeObj.element),t=b.isNullOrUndefined(t)?null:b.select("."+tt,t),b.isNullOrUndefined(t)&&this.addChild(e.files,this.treeObj.selectedNodes[0],!this.expandTree),this.expandNodeTarget=""),this.expandTree=!1,b.isNullOrUndefined(i)&&b.setValue(this.parent.pathId[this.parent.pathId.length-1],e.files,this.parent.feFiles),this.parent.uploadObj.directoryUpload&&!this.parent.hasId&&this.updateTree(e)},L.prototype.updateTree=function(e){var t;this.treeObj&&(t=this.treeObj.selectedNodes[0],this.updateTreeNode(e,t))},L.prototype.updateTreeNode=function(e,t){var i=-1!==this.treeObj.expandedNodes.indexOf(t);this.removeChildNodes(t),this.addChild(e.files,t,!i)},L.prototype.removeChildNodes=function(e){e=b.select('[data-uid="'+e+'"]',this.treeObj.element),e=b.select("."+tt,e),e=e?Array.prototype.slice.call(e.children):null;e&&this.treeObj.removeNodes(e)},L.prototype.onOpenEnd=function(e){var t=this.parent.pathId[this.parent.pathId.length-1];this.treeObj.expandAll(this.treeObj.selectedNodes),this.treeObj.setProperties({selectedNodes:[t]}),this.expandNodeTarget="add",this.onPathChanged(e)},L.prototype.onOpenInit=function(e){"navigationpane"===this.parent.activeModule&&e.target.querySelector("."+Yt)&&this.treeObj.expandAll(this.treeObj.selectedNodes)},L.prototype.onInitialEnd=function(e){this.onInit(),this.addChild(e.files,b.getValue("_fm_id",e.cwd),!1)},L.prototype.onFinalizeEnd=function(e){this.onInit();var t=b.getValue("_fm_id",e.cwd);this.addChild(e.files,t,!1),this.treeObj.setProperties({selectedNodes:[this.parent.pathId[this.parent.pathId.length-1]]})},L.prototype.onCreateEnd=function(e){this.updateTree(e)},L.prototype.onSelectedData=function(){"navigationpane"===this.parent.activeModule&&this.updateItemData()},L.prototype.onDeleteInit=function(){var e;"navigationpane"===this.parent.activeModule&&(this.updateActionData(),e=b.getValue("name",this.parent.itemData[0]),fs(this.parent,[e],this.parent.path,"delete"))},L.prototype.onDeleteEnd=function(e){var t;"navigationpane"===this.parent.activeModule&&(t=this.treeObj.selectedNodes[0],t=b.select('[data-uid="'+t+'"]',this.treeObj.element),t=b.closest(t,"."+tt).parentElement,this.treeObj.selectedNodes=[t.getAttribute("data-uid")],this.treeObj.dataBind()),this.updateTree(e)},L.prototype.onRefreshEnd=function(e){this.updateTree(e)},L.prototype.onRenameInit=function(){"navigationpane"===this.parent.activeModule&&this.updateRenameData()},L.prototype.onRenameEndParent=function(e){var t,i=this.renameParent||this.parent.pathId[this.parent.pathId.length-1];this.expandTree=-1!==this.treeObj.expandedNodes.indexOf(this.treeObj.selectedNodes[0]),this.updateTreeNode(e,i),this.parent.expandedId=null,this.renameParent?this.renameParent=null:(e=[],this.parent.hasId?e=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where("id","equal",this.parent.renamedId,!1)):0<(t=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",this.parent.renameText,!1))).length&&(e=new h.DataManager(t).executeLocal((new h.Query).where("_fm_pId","equal",i,!1))),0<e.length&&(t=0<this.previousSelected.length&&0!==this.treeObj.getTreeData(this.previousSelected[0]).length?this.previousSelected[0]:b.getValue(this.treeObj.fields.id,e[0]),this.treeObj.selectedNodes=[t],this.treeObj.dataBind(),this.updateItemData()))},L.prototype.onRenameEnd=function(e){var t,i;""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?(i=this.treeObj.getTreeData(),t=[],this.parent.hasId?t=new h.DataManager(i).executeLocal((new h.Query).where("id","equal",this.parent.renamedId,!1)):0<(i=new h.DataManager(i).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",this.parent.currentItemText,!1))).length&&(t=new h.DataManager(i).executeLocal((new h.Query).where("filterPath","equal",this.parent.filterPath,!1))),0<t.length&&(this.renameParent=b.getValue(this.treeObj.fields.parentID,t[0]),this.parent.expandedId=this.renameParent,this.parent.itemData=this.getTreeData(this.renameParent),C(this.parent,Ni,this.parent.filterPath.replace(/\\/g,"/")))):this.updateTree(e)},L.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":C(this.parent,u,this.parent.path),e.oldProp.navigationPaneSettings.sortOrder!==e.newProp.navigationPaneSettings.sortOrder&&(this.treeObj.sortOrder=e.newProp.navigationPaneSettings.sortOrder)}},L.prototype.onDownLoadInit=function(){this.doDownload()},L.prototype.onSelectionChanged=function(e){this.treeObj.setProperties({selectedNodes:[e.selectedNode]})},L.prototype.onClearPathInit=function(e){this.removeChildNodes(e.selectedNode)},L.prototype.onDragEnd=function(e){if(j(this.parent)){this.moveNames=[];for(var t=this.parent.dragData,i=0;i<t.length;i++)!1===b.getValue("isFile",t[i])&&this.moveNames.push(b.getValue("_fm_id",t[i]))}var n=[],n=this.parent.isPasteError||this.parent.isSearchDrag?this.getMoveNames(e.files,this.parent.isSearchDrag,this.parent.dragPath):this.moveNames;this.treeObj.removeNodes(n)},L.prototype.getMoveNames=function(e,t,i){for(var n=[],s=0;s<e.length;s++)if(!e[s].isFile&&!this.parent.hasId)for(var a,r=e[s].previousName,o=(t&&(a=(i+=e[s].previousName).lastIndexOf("/"),r=i.substring(a+1),i=i.substring(0,a+1)),new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",r,!1))),l=0;l<o.length;l++)if(b.getValue("filterPath",o[l]).replace(/\\/g,"/")===i){n.push(b.getValue(this.treeObj.fields.id,o[l]));break}return n},L.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)},L.prototype.selectResultNode=function(t){var e,i;this.parent.hasId?(i=this.treeObj.getTreeData().filter(function(e){return e.name===t.name})[0],this.treeObj.selectedNodes=[b.getValue("_fm_id",i)],this.treeObj.dataBind()):(i=b.getValue("filterPath",t),e=b.getValue("name",t),0<(e=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",e,!1))).length&&0<(e=new h.DataManager(e).executeLocal((new h.Query).where("filterPath","equal",i,!1))).length&&(i=b.getValue(this.treeObj.fields.id,e[0]),this.treeObj.selectedNodes=[i],this.treeObj.dataBind()))},L.prototype.onDropPath=function(e){this.onpasteEnd(e),this.selectResultNode(this.parent.dropData),this.parent.isDropEnd=!this.parent.isPasteError},L.prototype.onpasteEnd=function(e){var t,i=[];this.parent.hasId?i=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where("id","equal",b.getValue("id",e.cwd),!1)):0<(t=new h.DataManager(this.treeObj.getTreeData()).executeLocal((new h.Query).where(this.treeObj.fields.text,"equal",b.getValue("name",e.cwd),!1))).length&&(i=new h.DataManager(t).executeLocal((new h.Query).where("filterPath","equal",b.getValue("filterPath",e.cwd),!1))),0<i.length&&(t=b.getValue(this.treeObj.fields.id,i[0]),i=-1===this.treeObj.expandedNodes.indexOf(t),this.removeChildNodes(t),this.addChild(e.files,t,i)),this.parent.expandedId=null,this.onPathChanged(e),this.parent.isDragDrop&&this.checkDropPath(e)},L.prototype.checkDropPath=function(e){j(this.parent)&&(this.parent.path===this.parent.dropPath||"navigationpane"===this.parent.targetModule)||(-1===this.parent.dropPath.indexOf(An(this.parent,e))?(this.parent.isDropEnd=!1,Vn(this.parent)):this.parent.isDropEnd=!this.parent.isPasteError)},L.prototype.onpasteInit=function(){this.parent.activeModule===this.getModuleName()&&this.updateItemData(),this.moveNames=[];for(var e=this.parent.isDragDrop||j(this.parent)?this.parent.dragData:this.parent.actionRecords,t=0;t<e.length;t++)!1===b.getValue("isFile",e[t])&&this.moveNames.push(b.getValue("_fm_id",e[t]))},L.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.activeElements=[this.activeNode])},L.prototype.addEventListener=function(){this.parent.on(l,this.onPropertyChanged,this),this.parent.on(Hi,this.onDownLoadInit,this),this.parent.on(ni,this.onInitialEnd,this),this.parent.on(u,this.onFinalizeEnd,this),this.parent.on(g,this.onPathChanged,this),this.parent.on(Li,this.onpasteEnd,this),this.parent.on(Ti,this.onCutEnd,this),this.parent.on(ki,this.onpasteInit,this),this.parent.on(Ci,this.onNodeExpanded,this),this.parent.on(si,this.onCreateEnd,this),this.parent.on(Ri,this.onSelectedData,this),this.parent.on(oi,this.onDeleteInit,this),this.parent.on(li,this.onDeleteEnd,this),this.parent.on(hi,this.onRefreshEnd,this),this.parent.on(Fi,this.onSelectionChanged,this),this.parent.on(vi,this.onOpenInit,this),this.parent.on(Ii,this.onOpenEnd,this),this.parent.on(ci,this.destroy,this),this.parent.on(xi,this.onRenameInit,this),this.parent.on(y,this.onRenameEnd,this),this.parent.on(Ni,this.onRenameEndParent,this),this.parent.on(Di,this.onClearPathInit,this),this.parent.on(Mi,this.oncutCopyInit,this),this.parent.on(Bi,this.onDropInit,this),this.parent.on(ji,this.onMenuItemData,this),this.parent.on(zi,this.onDragEnd,this),this.parent.on(Wi,this.onDragging,this),this.parent.on(qi,this.onDropPath,this),this.parent.on(m,this.onDetailsInit,this),this.parent.on(ri,this.onPathDrag,this)},L.prototype.removeEventListener=function(){this.parent.off(ni,this.onInitialEnd),this.parent.off(Hi,this.onDownLoadInit),this.parent.off(u,this.onFinalizeEnd),this.parent.off(Ri,this.onSelectedData),this.parent.off(l,this.onPropertyChanged),this.parent.off(g,this.onPathChanged),this.parent.off(Li,this.onpasteEnd),this.parent.off(Ti,this.onCutEnd),this.parent.off(ki,this.onpasteInit),this.parent.off(Fi,this.onSelectionChanged),this.parent.off(Ci,this.onNodeExpanded),this.parent.off(si,this.onCreateEnd),this.parent.off(hi,this.onRefreshEnd),this.parent.off(vi,this.onOpenInit),this.parent.off(Ii,this.onOpenEnd),this.parent.off(ci,this.destroy),this.parent.off(xi,this.onRenameInit),this.parent.off(y,this.onRenameEnd),this.parent.off(Ni,this.onRenameEndParent),this.parent.off(Di,this.onClearPathInit),this.parent.off(oi,this.onDeleteInit),this.parent.off(li,this.onDeleteEnd),this.parent.off(Mi,this.oncutCopyInit),this.parent.off(Bi,this.onDropInit),this.parent.off(zi,this.onDragEnd),this.parent.off(Wi,this.onDragging),this.parent.off(qi,this.onDropPath),this.parent.off(m,this.onDetailsInit),this.parent.off(ji,this.onMenuItemData),this.parent.off(ri,this.onPathDrag)},L.prototype.onDetailsInit=function(){var e;this.parent.activeModule===this.getModuleName()&&(e=this.getTreeData(this.treeObj.selectedNodes[0]),this.parent.itemData=e)},L.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(e=b.closest(e.target,"li"),this.parent.itemData=this.getTreeData(e.getAttribute("data-uid")))},L.prototype.onDragging=function(e){var t,e=b.closest(e.target,"li");e.classList.contains("e-node-collapsed")&&(this.isDrag=!0,t=parseInt(e.getAttribute("aria-level"),10),this.treeObj.expandAll([e.getAttribute("data-uid")],t+1),this.isDrag=!1)},L.prototype.onDropInit=function(e){this.parent.targetModule===this.getModuleName()&&(e=b.closest(e.target,"li"),this.parent.dropData=this.getTreeData(e)[0],this.parent.dropPath=this.getDropPath(e,b.getValue("name",this.parent.dropData)))},L.prototype.getModuleName=function(){return"navigationpane"},L.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.treeObj&&(this.unWireEvents(),this.treeObj.destroy()))},L.prototype.wireEvents=function(){this.keyboardModule=new b.KeyboardEvents(this.treeObj.element,{keyAction:this.keyDown.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},L.prototype.unWireEvents=function(){this.keyboardModule.destroy()},L.prototype.keyDown=function(e){var t;switch(e.action){case"altEnter":this.parent.notify(m,{}),ms(this.parent,[],this.parent.path,"details");break;case"esc":an(this.parent);break;case"del":this.parent.pathId[0]!==this.activeNode.getAttribute("data-uid")&&(this.updateItemData(),S(this.parent.itemData[0])?(this.removeNodes=[],x(this.parent,"Delete")):D(this.parent,this.parent.itemData[0],v));break;case"ctrlC":fn(this.parent);break;case"ctrlV":this.parent.folderPath="",Mn(this.parent);break;case"ctrlX":mn(this.parent);break;case"shiftF10":this.updateItemData(),as(this.parent.itemData[0])?0!==this.parent.selectedItems.length&&this.doDownload():D(this.parent,this.parent.itemData[0],Xi);break;case"f2":0===this.parent.selectedItems.length&&(S(t=this.getTreeData(this.treeObj.selectedNodes[0])[0])?(this.updateRenameData(),x(this.parent,"Rename")):D(this.parent,t,v))}},L.prototype.getTreeData=function(e){for(var t=this.treeObj.getTreeData(e),i=0;i<t.length;i++)b.isNullOrUndefined(b.getValue("hasChild",t[i]))&&b.setValue("hasChild",!1,t[i]);return t},L.prototype.updateRenameData=function(){this.updateItemData(),this.parent.currentItemText=b.getValue("name",this.parent.itemData[0])},L.prototype.updateItemData=function(){var e=this.getTreeData(this.treeObj.selectedNodes[0])[0];this.parent.itemData=[e],this.parent.isFile=!1},L.prototype.updateActionData=function(){this.updateItemData();$i(b.select('[data-uid="'+this.parent.pathId[this.parent.pathId.length-1]+'"]',this.treeObj.element),this.parent.itemData[0],this.parent);var e=Tn(this.parent.path);this.parent.setProperties({path:e},!0),this.parent.pathId.pop(),this.parent.pathNames.pop()},L.prototype.doDownload=function(){var e=Tn(this.parent.path),t=this.treeObj.selectedNodes[0]===this.parent.pathId[0]?"":b.getValue("name",this.parent.itemData[0]);_s(this.parent,e,[t])};var ma=L;function L(e){this.removeNodes=[],this.moveNames=[],this.previousSelected=[],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.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"}}T.prototype.render=function(e){var t,i,n,s,a=this;this.parent.enablePersistence&&(t=window.localStorage.getItem("grid"+this.parent.element.id+"_grid"),b.isNullOrUndefined(t)||(t=JSON.parse(t),!b.isNullOrUndefined(t)&&0<Object.keys(t).length&&"sortSettings"in t&&(delete t.sortSettings,window.localStorage.setItem("grid"+this.parent.element.id+"_grid",JSON.stringify(t))))),r.showSpinner(this.parent.element),"Details"===this.parent.view&&(b.removeClass([this.parent.element],Ye),t=On(this.parent,e.files),this.checkNameWidth(),i=this.getColumns(),n=void 0,s=!b.isNullOrUndefined(i)&&-1!==i.findIndex(function(e){return e.field===a.parent.sortBy}),this.parent.isMobile||!s?n=[]:"None"!==this.parent.sortOrder&&(n=[{direction:this.parent.sortOrder,field:this.parent.sortBy}]),this.gridObj=new F.Grid({dataSource:t,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:n},columns:i,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(){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+Pe),this.wireEvents(),this.adjustHeight(),this.emptyArgs=e)},T.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()},T.prototype.getGridHeight=function(){var e=b.select("#"+this.parent.element.id+Fe,this.parent.element),t=b.select("#"+this.parent.element.id+Ve,this.parent.element);return e.offsetHeight-t.offsetHeight-36},T.prototype.checkNameWidth=function(){var e=this.parent.detailsViewSettings.columns;this.isNameWidth=!1;for(var t=0;t<e.length;t++)if("name"===e[t].field)return void(this.isNameWidth=!b.isNullOrUndefined(e[t].width))},T.prototype.adjustWidth=function(e,t){if(!this.isNameWidth||"name"!==t)for(var i,n=0;n<e.length;n++)e[n].field===t&&(i=void 0,i=""!==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[n].width=i)},T.prototype.getColumns=function(){var i,n=this.parent.enableHtmlSanitizer;if(this.parent.isMobile)i=[{field:"name",headerText:w(this.parent,"Name"),width:"auto",minWidth:120,headerTextAlign:"Left",template:b.initializeCSPTemplate(function(e){return'<div class="e-fe-text">'+(n?b.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{i=b.extend([],this.parent.detailsViewSettings.columns,null,!0),this.adjustWidth(i,"name");for(var s=this,e=0,t=i.length;e<t;e++)!function(e){var t;i[e].headerText=w(s.parent,i[e].headerText),"name"!==i[e].field||b.isNullOrUndefined(i[e].template)||"function"==typeof i[e].template||(t=i[e].template,i[e].template=b.initializeCSPTemplate(function(e){e=n?b.SanitizeHtmlHelper.sanitize(e.name):e.name;return t.replace(/\${name}/g,e)}))}(e)}var a=this.parent.isMobile||this.parent.isBigger?"54":"46",a={field:"type",width:a,minWidth:a,template:b.initializeCSPTemplate(function(e){return'<span class="e-fe-icon '+e._fm_iconClass+'"></span>'}),allowResizing:!1,allowSorting:!0,customAttributes:{class:"e-fe-grid-icon"},headerTemplate:b.initializeCSPTemplate(function(){return"<span class='e-fe-icon e-fe-folder'></span>"})};i.unshift(a),this.parent.showItemCheckBoxes&&(a={type:"checkbox",width:a=this.parent.isBigger?"36":"26",minWidth:a,customAttributes:{class:"e-fe-checkbox"},allowResizing:!1,allowSorting:!1},this.parent.isMobile?i.push(a):i.unshift(a));for(e=0,t=i.length;e<t;e++)i[e].disableHtmlEncode=!this.parent.enableHtmlSanitizer;return this.parent.enableRangeSelection&&i.push({field:"name",visible:!1,customAttributes:{class:"e-drag-text"}}),i},T.prototype.adjustHeight=function(){var e,t,i;this.gridObj&&(i=b.select("#"+this.parent.element.id+Fe,this.parent.element),e=b.select("#"+this.parent.element.id+Ve,this.parent.element),t=b.select("."+wt,this.parent.element),i=i.offsetHeight-e.offsetHeight-t.offsetHeight,this.gridObj.height=i,this.gridObj.dataBind())},T.prototype.renderCheckBox=function(){this.gridObj.columns=this.getColumns(),this.isColumnRefresh=!0,this.gridObj.refreshColumns()},T.prototype.onRowDataBound=function(e){var t=b.select(".e-fe-grid-name",e.row);if(!t)for(var i=this.parent.detailsViewSettings.columns,n=0;n<i.length;n++)if("name"===i[n].field){t=e.row.children[this.parent.allowMultiSelection?n+2:n+1];break}if(t&&t.setAttribute("title",b.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(b.getValue("name",e.data))&&on(e.row),!this.parent.showFileExtension&&b.getValue("isFile",e.data)&&(s=b.getValue("name",e.data),s=e.row.querySelector('[title= "'+s+'"]'))&&(a=b.getValue("name",e.data),r=b.getValue("type",e.data),-1!==a.indexOf(r))&&(s.innerHTML=a.substr(0,a.length-r.length)),void 0!==b.getValue("size",e.data)&&e.row.querySelector(".e-fe-size")){var s=e.row.querySelector(".e-fe-size"),a=void 0;if(b.getValue("isFile",e.data)){for(var r=b.getValue("size",e.data),o=new b.Internationalization(this.parent.locale),l=void 0,i=this.parent.detailsViewSettings.columns,n=0;n<i.length;n++)if("size"===i[n].field){l=b.isNullOrUndefined(i[n].format)?"n":i[n].format.toString();break}a=o.formatNumber(r/1024,{format:l})+" "+w(this.parent,"KB")}else a="";s.innerHTML=a}if(this.parent.isMobile&&void 0!==b.getValue("_fm_modified",e.data)&&e.row.querySelector(".e-fe-date")){for(var r=e.row.querySelector(".e-fe-date"),o=new b.Internationalization(this.parent.locale),i=this.parent.detailsViewSettings.columns,h=void 0,n=0;n<i.length;n++)if("dateModified"===i[n].field){h=i[n].format;break}s=o.formatDate(new Date(b.getValue("_fm_modified",e.data)),h);r.innerHTML=s}a=e.row.querySelector("."+ht),a&&a.classList.add("e-small"),S(e.data)||(e.row.className+=" "+ts(e.data)),o={element:e.row,fileDetails:e.data,module:"DetailsView"};this.parent.trigger("fileLoad",o)},T.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 t=this.gridObj.getSelectedRowIndexes(),i=t.length;for(this.sortSelectedNodes=[];0<i;){var n=this.gridObj.getRowsObject()[t[i-1]].data;this.sortSelectedNodes.push(b.getValue(this.parent.hasId?"id":"name",n)),i--}}this.parent.notify(Si,{})}},T.prototype.onHeaderCellInfo=function(e){e=e.node.querySelector("."+ht);e&&e.classList.add("e-small")},T.prototype.onBeforeDataBound=function(e){var t=this,i=(r.showSpinner(this.parent.element),this.parent.detailsViewSettings.columns.find(function(e){return e.field===t.parent.sortBy}));!i||"sortComparer"in i||(i=On(this.parent,this.parent.enableVirtualization?e.result:this.gridObj.dataSource),e.result=i)},T.prototype.onDataBound=function(){var e,t;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&&!b.isNullOrUndefined(this.gridObj.getDataRows())&&0<this.gridObj.getDataRows().length&&(this.isColumnRefresh?this.isColumnRefresh=!1:(this.selectRecords(this.parent.pasteNodes),this.isPasteOperation=!1)),this.parent.createdItem&&(this.selectRecords([b.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="",b.select(".e-headercontent",e).style.borderRightWidth="0",(t=this.gridObj.getContent().querySelector(".e-content")).style.overflowY="",t.classList.add("e-scrollShow")):(e=this.gridObj.getHeaderContent(),this.parent.enableRtl?e.style.paddingLeft="16px":e.style.paddingRight="16px",(t=this.gridObj.getContent().querySelector(".e-content")).classList.remove("e-scrollShow")),this.isRendered=!0,this.parent.isLayoutChange=!1,r.hideSpinner(this.parent.element),this.checkEmptyDiv(this.emptyArgs),this.isInteracted=!!this.isLoaded||this.isInteracted,this.isLoaded=!1},T.prototype.selectRecords=function(e){for(var t=this.gridObj.getCurrentViewRecords(),i=[],n=0,s=t.length;n<s;n++){var a=this.parent.hasId?b.getValue("id",t[n]):In(this.parent,t[n]);-1!==e.indexOf(a)?i.push(n):this.parent.showFileExtension||this.parent.hasId||!a.includes(".")||(a=a.split(".").slice(0,-1).join("."),-1!==e.indexOf(a)&&i.push(n))}0!==i.length&&(this.gridObj.selectRows(i),this.addFocus(this.gridObj.selectedRowIndex))},T.prototype.addSelection=function(e){var t=this.gridObj.getCurrentViewRecords(),i=[];this.parent.hasId?i=new h.DataManager(t).executeLocal((new h.Query).where("id","equal",this.parent.renamedId,!1)):0<(e=new h.DataManager(t).executeLocal((new h.Query).where("name","equal",b.getValue("name",e),!1))).length&&(i=new h.DataManager(e).executeLocal((new h.Query).where("filterPath","equal",this.parent.filterPath,!1))),0<i.length&&(e=t.indexOf(i[0]),this.gridObj.selectRows([e]))},T.prototype.onSortColumn=function(){"None"!==this.parent.sortOrder?this.gridObj.sortModule.sortColumn(this.parent.sortBy,this.parent.sortOrder):this.gridObj.dataSource=On(this.parent,this.gridObj.dataSource),0!==this.element.querySelector(".e-content").scrollTop&&this.gridObj.freezeRefresh()},T.prototype.onPropertyChanged=function(e){if(e.module===this.getModuleName()||"common"===e.module)for(var t,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":b.isNullOrUndefined(this.gridObj)||(this.checkNameWidth(),t=this.getColumns(),this.gridObj.columns=t,this.gridObj.allowResizing=this.parent.detailsViewSettings.columnResizing,this.gridObj.dataBind(),this.gridObj.refreshColumns());break;case"selectedItems":this.interaction=!1,0!==this.parent.selectedItems.length?(this.parent.allowMultiSelection||(t=this.parent.selectedItems.slice(this.parent.selectedItems.length-1),this.parent.setProperties({selectedItems:t},!0)),this.selectRecords(this.parent.selectedItems),this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)):b.isNullOrUndefined(this.gridObj)||(this.gridObj.clearSelection(),this.interaction=!0);break;case"showFileExtension":case"showHiddenItems":C(this.parent,g,this.parent.path);break;case"showItemCheckBoxes":case"allowMultiSelection":b.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":pn(this.parent,"Details");break;case"width":this.onDetailsResize()}},T.prototype.onPathChanged=function(e){this.parent.isCut=!1;var t=this.parent.detailsViewSettings.columns.find(function(e){return"filterPath"===e.field});(""===this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.gridObj||!b.isNullOrUndefined(t)&&!b.isNullOrUndefined(t.hideAtMedia)&&""!==t.hideAtMedia)&&(this.parent.searchedItems=[],this.parent.isFiltered?this.updatePathColumn():this.removePathColumn(!1)),I(this.parent),"Details"===this.parent.view&&(this.isInteracted=!1,r.showSpinner(this.parent.element),this.parent.setProperties({selectedItems:[]},!0),this.gridObj.dataSource=On(this.parent,e.files),this.gridObj.freezeRefresh(),this.parent.isReact)&&this.gridObj.on("reactTemplateRender",this.reactTemplateRender,this),this.emptyArgs=e},T.prototype.updatePathColumn=function(){var e=this.gridObj.columns.length,t=JSON.parse(JSON.stringify(this.gridObj.columns));t[e-1].field&&"filterPath"!==t[e-1].field&&!this.parent.isMobile&&(t={field:"filterPath",headerText:w(this.parent,"Path"),minWidth:180,width:"auto"},this.gridObj.columns.push(t),this.adjustWidth(this.gridObj.columns,"filterPath"),this.adjustWidth(this.gridObj.columns,"name"),this.isColumnRefresh=!0,this.gridObj.refreshColumns())},T.prototype.checkEmptyDiv=function(e){var t=On(this.parent,e.files);0!==t.length||b.isNullOrUndefined(this.element.querySelector("."+xt))?0!==t.length&&this.element.querySelector("."+c)&&(this.element.querySelector("."+xt).querySelector("."+c)?(t=this.element.querySelector("."+xt).querySelector("."+c),this.element.querySelector("."+xt).removeChild(t)):this.element.removeChild(this.element.querySelector("."+c))):Dn(this.parent,this.element,e)},T.prototype.onOpenInit=function(){var e;"detailsview"===this.parent.activeModule&&(e=this.gridObj.getSelectedRecords()[0],this.openContent(e))},T.prototype.DblClickEvents=function(e){this.gridObj.selectRows([e.rowIndex]),e.rowData&&(e=JSON.parse(JSON.stringify(e.rowData)),this.openContent(e))},T.prototype.openContent=function(i){var n=this;is(i)?this.parent.trigger("fileOpen",{cancel:!1,fileDetails:i,module:"DetailsView"},function(e){var t;e.cancel||(e=b.getValue("name",i),b.getValue("isFile",i)?bn(i)===bt&&(t=yn(n.parent,i),aa(n.parent,e,t)):(""!==n.parent.breadcrumbbarModule.searchObj.element.value||n.parent.isFiltered?Rn(n.parent,i):(t=b.getValue("id",i),n.parent.oldPath=n.parent.path,t=n.parent.path+(b.isNullOrUndefined(t)?e:t)+"/",n.parent.setProperties({path:t},!0),n.parent.pathNames.push(e),n.parent.pathId.push(b.getValue("_fm_id",i)),n.parent.itemData=[i],gn(n.parent)),n.parent.isFiltered=!1),n.element.focus(),n.parent.enableVirtualization&&n.parent.element.querySelector("#"+n.parent.element.id+ke).focus())}):D(this.parent,i,Gi)},T.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=On(this.parent,e.files),this.parent.notify(Ai,{}),this.gridObj.element.classList.remove(Xt),this.isInteracted=!1,this.gridObj.clearSelection(),""!==this.parent.breadcrumbbarModule.searchObj.element.value.trim()&&this.onSearchFiles(e),this.adjustHeight(),0<this.gridObj.sortSettings.columns.length)&&this.gridObj.sortSettings.columns[0].field!==this.parent.sortBy&&"None"!==this.parent.sortOrder&&this.gridObj.sortColumn(this.parent.sortBy,this.parent.sortOrder)},T.prototype.onSearchFiles=function(e){"Details"===this.parent.view&&(this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(f,{}),this.parent.isLayoutChange||(this.parent.layoutSelectedItems=[]),this.updatePathColumn(),this.parent.searchedItems=e.files,this.onPathChanged(e))},T.prototype.removePathColumn=function(e){var t=this.gridObj.columns.length,i=JSON.parse(JSON.stringify(this.gridObj.columns));i[t-1].field&&"filterPath"===i[t-1].field&&(b.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=On(this.parent,this.gridObj.dataSource),this.parent.notify(Si,{})),this.gridObj.columns.pop(),e||(this.isColumnRefresh=!0,this.gridObj.refreshColumns()))},T.prototype.onFinalizeEnd=function(e){"Details"===this.parent.view&&(this.gridObj?this.onPathChanged(e):this.render(e))},T.prototype.onCreateEnd=function(e){"Details"===this.parent.view&&this.onPathChanged(e)},T.prototype.onRenameInit=function(){"detailsview"===this.parent.activeModule&&1===this.parent.selectedItems.length&&this.updateRenameData()},T.prototype.onSelectedData=function(){"detailsview"===this.parent.activeModule&&(this.parent.itemData=this.gridObj.getSelectedRecords())},T.prototype.onDeleteInit=function(){"detailsview"===this.parent.activeModule&&fs(this.parent,this.parent.selectedItems,this.parent.path,"delete")},T.prototype.onDeleteEnd=function(e){"Details"===this.parent.view&&(this.onPathChanged(e),this.parent.setProperties({selectedItems:[]},!0))},T.prototype.onRefreshEnd=function(e){"Details"===this.parent.view&&(this.isInteracted=!1,this.removePathColumn(!1),this.gridObj.dataSource=On(this.parent,e.files),this.emptyArgs=e)},T.prototype.onHideLayout=function(){"Details"!==this.parent.view&&this.gridObj&&this.gridObj.element.classList.add(Xt)},T.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)},T.prototype.onClearAllInit=function(){"Details"===this.parent.view&&(this.removeSelection(),this.interaction=!0)},T.prototype.onSelectionChanged=function(){b.removeClass([this.element],ei),0<this.parent.selectedItems.length&&b.addClass([this.element],ei)},T.prototype.onLayoutRefresh=function(){"Details"===this.parent.view&&this.adjustHeight()},T.prototype.onBeforeRequest=function(){this.isRendered=!1},T.prototype.onAfterRequest=function(){this.isRendered=!0},T.prototype.onUpdateSelectionData=function(){"Details"===this.parent.view&&(this.parent.itemData=this.gridObj.getSelectedRecords())},T.prototype.addEventListener=function(){this.parent.on(u,this.onFinalizeEnd,this),this.parent.on(ci,this.destroy,this),this.parent.on(a,this.onLayoutChange,this),this.parent.on(g,this.onPathChanged,this),this.parent.on(si,this.onCreateEnd,this),this.parent.on(Bi,this.onDropInit,this),this.parent.on(m,this.onDetailsInit,this),this.parent.on(hi,this.onRefreshEnd,this),this.parent.on(yi,this.onSearchFiles,this),this.parent.on(Yi,this.onMethodCall,this),this.parent.on(bi,this.onActionFailure,this),this.parent.on(l,this.onPropertyChanged,this),this.parent.on(oi,this.onDeleteInit,this),this.parent.on(li,this.onDeleteEnd,this),this.parent.on(Ri,this.onSelectedData,this),this.parent.on(xi,this.onRenameInit,this),this.parent.on(y,this.onPathChanged,this),this.parent.on(vi,this.onOpenInit,this),this.parent.on(Vi,this.onSortColumn,this),this.parent.on(Ii,this.onPathChanged,this),this.parent.on(ai,this.onPathChanged,this),this.parent.on(ki,this.onPasteInit,this),this.parent.on(Ai,this.onHideLayout,this),this.parent.on(Oi,this.onSelectAllInit,this),this.parent.on(wi,this.onClearAllInit,this),this.parent.on(Ui,this.onPathColumn,this),this.parent.on(f,this.onSelectionChanged,this),this.parent.on(ui,this.onBeforeRequest,this),this.parent.on(fi,this.onAfterRequest,this),this.parent.on(Li,this.onpasteEnd,this),this.parent.on(Mi,this.oncutCopyInit,this),this.parent.on(ji,this.onMenuItemData,this),this.parent.on(di,this.onDetailsResizeHandler,this),this.parent.on(pi,this.onDetailsResize,this),this.parent.on(mi,this.onLayoutRefresh,this),this.parent.on(qi,this.onDropPath,this),this.parent.on(Ki,this.onUpdateSelectionData,this)},T.prototype.removeEventListener=function(){this.parent.off(u,this.onFinalizeEnd),this.parent.off(ci,this.destroy),this.parent.off(a,this.onLayoutChange),this.parent.off(g,this.onPathChanged),this.parent.off(ki,this.onPasteInit),this.parent.off(si,this.onCreateEnd),this.parent.off(hi,this.onRefreshEnd),this.parent.off(yi,this.onSearchFiles),this.parent.off(Yi,this.onMethodCall),this.parent.off(bi,this.onActionFailure),this.parent.off(l,this.onPropertyChanged),this.parent.off(xi,this.onRenameInit),this.parent.off(y,this.onPathChanged),this.parent.off(ai,this.onPathChanged),this.parent.off(vi,this.onOpenInit),this.parent.off(Vi,this.onSortColumn),this.parent.off(Ii,this.onPathChanged),this.parent.off(Ai,this.onHideLayout),this.parent.off(Oi,this.onSelectAllInit),this.parent.off(wi,this.onClearAllInit),this.parent.off(oi,this.onDeleteInit),this.parent.off(li,this.onDeleteEnd),this.parent.off(Ui,this.onPathColumn),this.parent.off(f,this.onSelectionChanged),this.parent.off(ui,this.onBeforeRequest),this.parent.off(fi,this.onAfterRequest),this.parent.off(Li,this.onpasteEnd),this.parent.off(Mi,this.oncutCopyInit),this.parent.off(Bi,this.onDropInit),this.parent.off(Ri,this.onSelectedData),this.parent.off(m,this.onDetailsInit),this.parent.off(ji,this.onMenuItemData),this.parent.off(di,this.onDetailsResizeHandler),this.parent.off(pi,this.onDetailsResize),this.parent.off(mi,this.onLayoutRefresh),this.parent.off(qi,this.onDropPath),this.parent.off(Ki,this.onUpdateSelectionData)},T.prototype.onActionFailure=function(){this.interaction=!0},T.prototype.onMenuItemData=function(e){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=[this.gridObj.getRowInfo(e.target).rowData])},T.prototype.onPasteInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.itemData=""!==this.parent.folderPath?this.gridObj.getSelectedRecords():[O(this.parent)])},T.prototype.onDetailsInit=function(){this.parent.activeModule===this.getModuleName()&&(0!==this.parent.selectedItems.length?this.parent.itemData=this.gridObj.getSelectedRecords():this.parent.itemData=[b.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent)])},T.prototype.dragHelper=function(e){var t,i,e=e.sender.target.closest("tr.e-row");return e?(e.getElementsByClassName("e-fe-text")[0]?t=this.parent.hasId?this.gridObj.getRowInfo(e).rowData.id:e.getElementsByClassName("e-fe-text")[0].innerText:e.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling&&(t=this.parent.hasId?this.gridObj.getRowInfo(e).rowData.id:e.getElementsByClassName("e-rowcell e-templatecell")[0].nextElementSibling.innerText),e&&!e.querySelector(".e-active")&&this.selectRecords([t]),ln(this.parent,e),this.parent.activeElements=[],this.parent.dragData=[],this.parent.dragData=this.gridObj.getSelectedRecords(),(i=0===this.parent.dragData.length&&e?this.gridObj.getRowInfo(e):i)&&this.parent.dragData.push(i.rowData),this.parent.dragPath=this.parent.path,this.parent.activeElements=this.gridObj.getSelectedRows(),_n(this.parent),this.parent.virtualDragElement):null},T.prototype.onDetailsResize=function(){if("Details"===this.parent.view&&!this.parent.isMobile&&!b.isNullOrUndefined(this.gridObj))for(var e=this.gridObj.getHeaderContent().querySelector(".e-headercontent").firstChild.childNodes[0],t=this.gridObj.getContent().querySelector(".e-content .e-table").children[0],i=this.gridObj.getColumns(),n=0;n<i.length;n++)(this.isNameWidth||"name"!==i[n].field)&&"filterPath"!==i[n].field||(""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered?this.element.clientWidth<=680?"name"===i[n].field?(e.children[n].setAttribute("style","width: 120px"),t.children[n].setAttribute("style","width: 120px")):(e.children[n].setAttribute("style","width: 180px"),t.children[n].setAttribute("style","width: 180px")):680<this.element.clientWidth&&(e.children[n].setAttribute("style","width: auto"),t.children[n].setAttribute("style","width: auto")):this.element.clientWidth<=500?(e.children[n].setAttribute("style","width: 120px"),t.children[n].setAttribute("style","width: 120px")):500<this.element.clientWidth&&(e.children[n].setAttribute("style","width: auto"),t.children[n].setAttribute("style","width: auto")))},T.prototype.onDetailsResizeHandler=function(){this.onDetailsResize(),"Details"!==this.parent.view||this.parent.isMobile||b.isNullOrUndefined(this.gridObj)||this.adjustHeight()},T.prototype.createDragObj=function(){var t=this;this.gridObj&&(this.parent.allowDragAndDrop&&b.isNullOrUndefined(this.dragObj)?this.dragObj=new b.Draggable(this.gridObj.element,{cursorAt:this.parent.dragCursorPosition,distance:5,enableTailMode:!0,dragArea:this.parent.element,dragTarget:"."+dt,drag:Yn.bind(this,this.parent),dragStart:function(e){Bn(t.parent,e,t.dragObj)},dragStop:Hn.bind(this,this.parent),enableAutoScroll:!1,helper:this.dragHelper.bind(this)}):!this.parent.allowDragAndDrop&&this.dragObj&&(this.dragObj.destroy(),this.dragObj=null))},T.prototype.onDropInit=function(e){var t,i;this.parent.targetModule===this.getModuleName()&&(t=b.getValue(this.parent.pathId[this.parent.pathId.length-1],this.parent.feParent),e.target.closest("tr")?(i=null,i=this.gridObj.getRowInfo(e.target).rowData,this.parent.dropPath=i.isFile?this.parent.path:vn(this.parent,i,this.parent.path),this.parent.dropData=i.isFile?t:i):(this.parent.dropPath=this.parent.path,this.parent.dropData=t))},T.prototype.oncutCopyInit=function(){this.parent.activeModule===this.getModuleName()&&(this.parent.activeRecords=this.gridObj.getSelectedRecords(),this.parent.activeElements=this.gridObj.getSelectedRows())},T.prototype.onpasteEnd=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.parent.path!==this.parent.destinationPath&&this.parent.path!==An(this.parent,e)&&!this.parent.hasId||this.onPathChanged(e))},T.prototype.onDropPath=function(e){"Details"===this.parent.view&&(this.isPasteOperation=!0,this.onPathChanged(e))},T.prototype.getModuleName=function(){return"detailsview"},T.prototype.destroy=function(){this.parent.isDestroyed||(this.removeEventListener(),this.gridObj&&(this.parent.isReact&&this.gridObj.off("reactTemplateRender",this.reactTemplateRender),this.unWireEvents(),this.gridObj.destroy()))},T.prototype.updateType=function(e){e=b.select("."+mt,e);this.parent.isFile=!!b.isNullOrUndefined(e)},T.prototype.onSelection=function(e,t){var e={action:e,fileDetails:t.data,isInteracted:this.interaction,cancel:!1,target:t.target};this.parent.trigger("fileSelection",e),t.cancel=e.cancel,this.isMultiSelect||(this.isMultiSelect=!0,(t.isShiftPressed||t.isCtrlPressed)&&!this.parent.allowMultiSelection&&t.target&&t.target.parentElement&&!t.target.parentElement.classList.contains("e-checkbox-wrapper")&&(t.cancel=!0,e=t&&t.rowIndexes?t.rowIndexes[t.rowIndexes.length-1]:t.rowIndex,this.gridObj.selectRow(e)),this.isMultiSelect=!1)},T.prototype.onSelected=function(e){this.parent.activeModule="detailsview",this.parent.isLayoutChange&&!this.parent.isFiltered||this.selectedRecords(),this.parent.notify(f,{}),1===this.gridObj.getSelectedRowIndexes().length&&(this.firstItemIndex=this.gridObj.selectedRowIndex),this.gridObj.element.setAttribute("tabindex","-1"),this.triggerSelect("select",e);var t=this.gridObj.getRowByIndex(this.gridObj.selectedRowIndex),i=(this.updateType(t),b.isNullOrUndefined(t)||b.isNullOrUndefined(t.querySelector(".e-checkselect"))||(1!==this.gridObj.getSelectedRowIndexes().length&&(s=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2],this.gridObj.getRowByIndex(s).querySelector(".e-checkselect").setAttribute("tabindex","-1")),t.querySelector(".e-rowcell.e-fe-checkbox").removeAttribute("tabindex")),b.isNullOrUndefined(this.gridObj)||b.isNullOrUndefined(this.gridObj.element.querySelector(".e-checkselectall"))||this.gridObj.element.querySelector(".e-checkselectall").setAttribute("tabindex","-1"),this.gridObj.getSelectedRowIndexes());if(!this.parent.allowMultiSelection)for(var n=0;n<i.length;n++)i[n]===this.gridObj.selectedRowIndex?this.gridObj.getRowByIndex(i[n]).setAttribute("tabindex","0"):this.gridObj.getRowByIndex(i[n]).removeAttribute("tabindex");var s=i.length,s=(this.parent.enableVirtualization?this.parent.currentItemText=b.getValue("name",e.data):0<s&&(t=this.gridObj.getRowsObject()[i[s-1]].data,this.parent.currentItemText=b.getValue("name",t)),b.getValue("rowIndexes",e)),t=b.getValue("enableSelectMultiTouch",this.gridObj.selectionModule);this.parent.isDevice&&b.isNullOrUndefined(s)&&e.target&&!t&&!e.target.closest(".e-headercell")&&(this.parent.isFile=b.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)},T.prototype.onPathColumn=function(){"Details"!==this.parent.view||b.isNullOrUndefined(this.gridObj)||""!==this.parent.breadcrumbbarModule.searchObj.element.value||this.parent.isFiltered||this.removePathColumn(!1)},T.prototype.selectedRecords=function(){this.parent.setProperties({selectedItems:[]},!0);for(var e=this.gridSelectNodes(),t=0;t<e.length;){var i=e[t],i=Jn(this.parent,i);this.parent.selectedItems.push(i),t++}this.parent.setProperties({selectedItems:this.parent.selectedItems},!0)},T.prototype.onDeSelection=function(e){var t;!this.parent.allowMultiSelection&&b.isNullOrUndefined(e.data)?this.gridObj.getRowByIndex(e.rowIndex).removeAttribute("tabindex"):1<this.gridObj.getSelectedRowIndexes().length&&(t=this.gridObj.getSelectedRowIndexes()[this.gridObj.getSelectedRowIndexes().length-2],this.gridObj.getRowByIndex(t).querySelector(".e-checkselect").removeAttribute("tabindex")),-1===this.gridObj.selectedRowIndex&&this.gridObj.element.setAttribute("tabindex","0"),this.isInteracted?(this.selectedRecords(),0===this.parent.selectedItems.length&&(b.setValue("enableSelectMultiTouch",!1,this.gridObj.selectionModule),b.removeClass([this.parent.element],Ye)),this.parent.notify(f,{}),this.triggerSelect("unselect",e),this.parent.visitedItem=null):this.isInteracted=!0},T.prototype.triggerSelect=function(e,t){e={action:e,fileDetails:t.data,isInteracted:this.interaction};this.parent.trigger("fileSelect",e),this.interaction=!0},T.prototype.wireEvents=function(){this.wireClickEvent(!0),this.keyboardModule=new b.KeyboardEvents(this.gridObj.element,{keyAction:this.keyupHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keyup"}),this.keyboardDownModule=new b.KeyboardEvents(this.element,{keyAction:this.keydownHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),b.EventHandler.add(this.gridObj.element,"blur",this.removeFocus,this),b.EventHandler.add(this.parent.element,"focusout",this.onBlur,this)},T.prototype.unWireEvents=function(){this.wireClickEvent(!1),this.keyboardModule.destroy(),this.keyboardDownModule.destroy(),b.EventHandler.remove(this.gridObj.element,"blur",this.removeFocus),b.EventHandler.remove(this.parent.element,"focusout",this.onBlur)},T.prototype.wireClickEvent=function(e){var t=this;e?(e=this.gridObj.getContent(),this.clickObj=new b.Touch(e,{tap:function(e){1===e.tapCount&&e.originalEvent.target.classList.contains("e-content")&&t.onClearAllInit()},tapHold:function(e){t.parent.isDevice&&(e.originalEvent.preventDefault(),t.parent.allowMultiSelection&&(b.setValue("enableSelectMultiTouch",t.parent.allowMultiSelection,t.gridObj.selectionModule),b.addClass([t.parent.element],Ye)),e=e.originalEvent.target)&&(e=b.closest(e,"."+dt),e=t.gridObj.getRows().indexOf(e),t.gridObj.selectRow(e))}})):this.clickObj&&this.clickObj.destroy()},T.prototype.removeSelection=function(){b.removeClass([this.parent.element],Ye),this.gridObj.clearSelection(),this.parent.setProperties({selectedItems:[]},!0),this.parent.notify(f,{}),-1===this.gridObj.selectedRowIndex&&(this.startIndex=null),this.isInteracted=!0},T.prototype.removeFocus=function(){this.addFocus(null)},T.prototype.onBlur=function(e){if((null===e.relatedTarget||b.closest(e.relatedTarget,".e-grid")===e.relatedTarget)&&!b.isNullOrUndefined(this.gridObj.element))for(var t=this.gridObj.element.querySelectorAll("th"),i=0;i<t.length;i++)t[i].classList.contains("e-focus")&&this.addFocus(null)},T.prototype.getFocusedItemIndex=function(){return b.isNullOrUndefined(this.getFocusedItem())?null:parseInt(this.getFocusedItem().getAttribute("data-rowindex"),10)},T.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()}},T.prototype.keyupHandler=function(e){if(this.isRendered){e.preventDefault();var t,i,n,s=e.action,a=On(this.parent,this.gridObj.dataSource),r=a.length,o=this.getFocusedItemIndex(),l=this.gridObj.selectedRowIndex,h=this.gridObj.getSelectedRowIndexes();switch(s){case"altEnter":this.parent.notify(m,{}),ms(this.parent,this.parent.selectedItems,this.parent.path,"details");break;case"esc":an(this.parent);break;case"del":case"shiftdel":this.performDelete();break;case"enter":-1===this.gridObj.selectedRowIndex&&!0===this.gridObj.allowSorting?e.target.classList.contains("e-fe-grid-icon")||(i=e.target.getElementsByClassName("e-ascending").length?"Descending":"Ascending",t=this.gridObj.getColumnByUid(e.target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid")).field,this.gridObj.sortColumn(t,i),b.isNullOrUndefined(this.getFocusedItem().nextSibling))||this.getFocusedItem().nextSibling.setAttribute("tabindex","0"):(t=this.gridObj.getRowsObject()[this.gridObj.selectedRowIndex].data)&&(i=JSON.parse(JSON.stringify(t)),this.openContent(i));break;case"ctrlC":fn(this.parent);break;case"ctrlV":this.parent.folderPath="",Mn(this.parent);break;case"ctrlX":mn(this.parent);break;case"ctrlD":this.doDownload();break;case"f2":this.performRename();break;case"ctrlA":!b.isNullOrUndefined(a[0])&&this.parent.allowMultiSelection&&(i=(t=this.gridObj.getContent().querySelector(".e-content")).scrollTop,n=this.gridObj.selectedRowIndex,this.gridObj.selectionModule.selectRowsByRange(0,a.length-1),t.scrollTop=i,-1!==n)&&this.addFocus(n);break;case"ctrlHome":case"tab":if(!b.isNullOrUndefined(a[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":b.isNullOrUndefined(a[0])||(this.parent.allowMultiSelection?this.addFocus(r-1):this.gridObj.selectRow(r-1));break;case"shiftHome":case"shiftEnd":case"csHome":case"csEnd":this.parent.allowMultiSelection?b.isNullOrUndefined(a[0])||(b.isNullOrUndefined(l)||-1===l?"csHome"===e.action||"shiftHome"===e.action?this.gridObj.selectRow(0):this.gridObj.selectionModule.selectRowsByRange(0,a.length-1):this.checkRowsKey(a,l,null,e)):this.gridObj.selectRow("shiftHome"===e.action||"csHome"===e.action?0:a.length-1);break;case"space":case"csSpace":case"shiftSpace":case"ctrlSpace":this.spaceSelection(h,o,l,e);break;case"csUp":case"csDown":case"shiftUp":case"shiftDown":this.shiftMoveMethod(a,l,o,h,e);break;case"ctrlUp":case"ctrlDown":this.parent.allowMultiSelection?this.ctrlMoveFunction(a,e,l):this.moveFunction(a,e,l);break;case"home":t=[b.getValue(this.parent.hasId?"id":"name",a[0])],this.parent.setProperties({selectedItems:t},!0),this.selectRecords(t);break;case"moveUp":case"moveDown":this.moveFunction(a,e,l);break;case"end":i=[b.getValue(this.parent.hasId?"id":"name",a[r-1])],this.parent.setProperties({selectedItems:i},!0),this.selectRecords(i);break;case"back":this.parent.traverseBackward()}}},T.prototype.gridSelectNodes=function(){return this.gridObj.getSelectedRecords()},T.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(!as(e[t]))return void D(this.parent,e[t],Xi);_s(this.parent,this.parent.path,this.parent.selectedItems)}},T.prototype.performDelete=function(){if(this.parent.selectedItems&&0<this.parent.selectedItems.length){this.parent.itemData=this.gridObj.getSelectedRecords();for(var e=this.parent.itemData,t=0;t<e.length;t++)if(!S(e[t]))return void D(this.parent,e[t],v);x(this.parent,"Delete")}},T.prototype.performRename=function(){1===this.parent.selectedItems.length&&(this.updateRenameData(),Xn(this.parent))},T.prototype.updateRenameData=function(){var e=this.gridSelectNodes()[0];Qn(this.parent,e)},T.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)},T.prototype.moveFunction=function(e,t,i){!b.isNullOrUndefined(this.getFocusedItem())&&this.parent.allowMultiSelection?"moveDown"===t.action?this.gridObj.selectRow(this.getFocusedItemIndex()+1):this.gridObj.selectRow(this.getFocusedItemIndex()-1):b.isNullOrUndefined(i)||-1===i?b.isNullOrUndefined(e[0])||this.gridObj.selectRow(0):"moveDown"===t.action||"ctrlDown"===t.action||"shiftDown"===t.action||"csDown"===t.action?this.gridObj.selectRow(i+(i!==e.length-1?1:0)):this.gridObj.selectRow(i-(0!==i?1:0))},T.prototype.spaceSelection=function(e,t,i,n){var s;this.isSelected(e,t)||-1===i||"shiftSpace"!==n.action&&"csSpace"!==n.action?b.isNullOrUndefined(this.getFocusedItem())||t===i?-1!==i&&"ctrlSpace"===n.action&&this.parent.allowMultiSelection?(s=i,e.pop(),this.gridObj.selectRows(e),this.addFocus(s)):"shiftSpace"===n.action&&this.gridObj.selectRow(i):(e.push(this.getFocusedItemIndex()),this.gridObj.selectRows(e)):t<i?this.gridObj.selectionModule.selectRowsByRange(t,i):this.gridObj.selectionModule.selectRowsByRange(i,t)},T.prototype.ctrlMoveFunction=function(e,t,i){var n;b.isNullOrUndefined(this.getFocusedItem())?b.isNullOrUndefined(i)||-1===i?b.isNullOrUndefined(e[0])||(n=0):n="ctrlDown"===t.action||"csDown"===t.action?i+(i<e.length?1:0):i-(i<1?0:1):(i=this.getFocusedItemIndex(),n="ctrlDown"===t.action||"csDown"===t.action?i+(i<e.length-1?1:0):i-(i<1?0:1)),this.addFocus(n)},T.prototype.checkRowsKey=function(e,t,i,n){"Uncheck"===this.gridObj.checkAllRows||"Intermediate"===this.gridObj.checkAllRows?"csHome"!==n.action&&"csEnd"!==n.action?(b.isNullOrUndefined(this.startIndex)&&this.firstItemIndex!==t&&(this.firstItemIndex=t),"shiftEnd"===n.action?this.gridObj.selectionModule.selectRowsByRange(this.firstItemIndex,e.length-1):this.gridObj.selectionModule.selectRowsByRange(0,this.firstItemIndex),this.startIndex=t):"csEnd"===n.action?this.gridObj.selectRows(this.InnerItems(b.isNullOrUndefined(t)?0:t,b.isNullOrUndefined(i)?e.length-1:i,n)):b.isNullOrUndefined(t)?this.gridObj.selectRow(0):this.gridObj.selectRows(this.InnerItems(b.isNullOrUndefined(i)?0:i,t,n)):this.gridObj.selectionModule.selectRow("shiftHome"===n.action||"csHome"===n.action?0:e.length-1)},T.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},T.prototype.shiftSelectFocusItem=function(e,t,i,n){t+="shiftDown"===n.action||"csDown"===n.action?1:-1,e=b.isNullOrUndefined(this.startIndex)?e:i[0];e===t?this.gridObj.selectRow(e):e<t?"shiftDown"===n.action||"csDown"===n.action?this.gridObj.selectionModule.selectRowsByRange(e,t):this.gridObj.selectionModule.selectRowsByRange(t,e):"shiftDown"===n.action||"csDown"===n.action?this.gridObj.selectionModule.selectRowsByRange(t,e):this.gridObj.selectionModule.selectRowsByRange(e,t),this.startIndex=this.gridObj.selectedRowIndex},T.prototype.addFocus=function(e){var t=this.getFocusedItem(),e=this.gridObj.getRowByIndex(e);t&&(t.removeAttribute("tabindex"),b.removeClass([t],[at,rt])),b.isNullOrUndefined(e)||(this.gridObj.element.setAttribute("tabindex","-1"),e.setAttribute("tabindex","0"),e.focus(),b.addClass([e],[at,rt]))},T.prototype.addHeaderFocus=function(e){var t,i=b.select(".e-row",this.element);this.gridObj.element.setAttribute("tabindex","-1"),!b.isNullOrUndefined(e.target)&&e.target.classList.contains("e-defaultcursor")?(this.addFocus(0),t=e.target.nextElementSibling):b.isNullOrUndefined(this.gridObj.element.querySelector(".e-focus"))||"TH"!==this.gridObj.element.querySelector(".e-focus").tagName?t=b.select("th.e-fe-grid-icon",this.element):(t=this.gridObj.element.querySelector(".e-focus").nextElementSibling,this.addFocus(0)),b.isNullOrUndefined(t)||(t.setAttribute("tabindex","0"),t.focus(),b.addClass([t],[at,rt]),i.setAttribute("tabindex","0"),0===i.tabIndex&&0===t.tabIndex&&b.removeClass([i],[at,rt]))},T.prototype.getFocusedItem=function(){return b.select("."+rt,this.element)},T.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},T.prototype.shiftSelectedItem=function(e,t,i,n){-1===e?this.gridObj.selectRow(0):b.isNullOrUndefined(this.startIndex)&&n.shiftKey?(this.startIndex=this.gridObj.selectedRowIndex,this.gridObj.selectRows([e,"shiftDown"===n.action||"csDown"===n.action?e+(e!==i.length-1?1:0):e-(0!==e?1:0)])):"shiftDown"===n.action||"shiftUp"===n.action?("shiftDown"===n.action&&-1===t.indexOf(e+1)?e!==i.length-1&&t.push(e+1):"shiftUp"===n.action&&-1===t.indexOf(e-1)?0!==e&&t.push(e-1):t.pop(),this.gridObj.selectRows(t)):"csDown"===n.action?this.isSelected(t,this.getFocusedItemIndex()+1)?this.addFocus(this.getFocusedItemIndex()+1):(t.push(this.getFocusedItemIndex()+1),this.gridObj.selectRows(t)):this.isSelected(t,this.getFocusedItemIndex()-1)?this.addFocus(this.getFocusedItemIndex()-1):(t.push(this.getFocusedItemIndex()-1),this.gridObj.selectRows(t))},T.prototype.onMethodCall=function(e){if("Details"===this.parent.view)switch(b.getValue("action",e)){case"deleteFiles":this.deleteFiles(b.getValue("ids",e));break;case"downloadFiles":this.downloadFiles(b.getValue("ids",e));break;case"openFile":this.openFile(b.getValue("id",e));break;case"createFolder":this.interaction=!1;break;case"renameFile":this.interaction=!1,this.renameFile(b.getValue("id",e),b.getValue("newName",e));break;case"selectAll":this.interaction=!1,this.onSelectAllInit();break;case"clearSelection":this.interaction=!1,this.onClearAllInit()}},T.prototype.getRecords=function(e){var t=this.gridObj.getCurrentViewRecords(),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=t.length;a<r;a++)-1!==e.indexOf(b.getValue(s,t[a]))&&i.push(t[a]);else for(a=0,r=t.length;a<r;a++){var o=b.getValue("filterPath",t[a])+b.getValue("name",t[a]);-1!==e.indexOf(o)&&i.push(t[a])}return i},T.prototype.deleteFiles=function(e){if(this.parent.activeModule="detailsview",b.isNullOrUndefined(e))this.performDelete();else{var t=this.getRecords(e);if(0!==t.length){for(var i=[],n=[],s=0;s<t.length;s++)i[s]=t[s],n[s]=Jn(this.parent,i[s]);Zn(this.parent,i,n)}}},T.prototype.downloadFiles=function(e){if(b.isNullOrUndefined(e))this.doDownload();else{var t=this.getRecords(e);if(0!==t.length){for(var i=[],n=[],s=0;s<t.length;s++)i[s]=t[s],n[s]=Jn(this.parent,i[s]);es(this.parent,i,n)}}},T.prototype.openFile=function(e){b.isNullOrUndefined(e)||0<(e=this.getRecords([e])).length&&this.openContent(e[0])},T.prototype.renameFile=function(e,t){this.parent.activeModule="detailsview",b.isNullOrUndefined(e)?this.performRename():0<(e=this.getRecords([e])).length&&(Qn(this.parent,e[0]),b.isNullOrUndefined(t)?Xn(this.parent):S(this.parent.itemData[0])?us(this.parent,this.parent.path,t):D(this.parent,this.parent.itemData[0],v))};var ba=T;function T(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.isMultiSelect=!1,this.pasteOperation=!1,this.uploadOperation=!1,F.Grid.Inject(F.Resize,F.ContextMenu,F.Sort,F.VirtualScroll),this.parent=e,this.element=b.select("#"+this.parent.element.id+Pe,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",back:"backspace"}}e.ACTIVE=p,e.ALT_DIALOG_ID="_alt_dialog",e.AjaxSettings=W,e.BLUR=nt,e.BREADCRUMBBAR_ID=Ve,e.BREADCRUMBS=Jt,e.BreadCrumbBar=la,e.CB_WRAP=ht,e.CHECK=ot,e.CHECK_SELECT=ze,e.CLONE=ut,e.COLLAPSED="e-node-collapsed",e.CONTENT_ID=Fe,e.CONTEXT_MENU_ID=Ae,e.CONTROL=Be,e.Column=we,e.ContextMenu=ha,e.ContextMenuSettings=re,e.DETAILS_LABEL="e-detailslabel",e.DIALOG_ID=Me,e.DISPLAY_NONE=Xt,e.DROP_FILE=ft,e.DROP_FOLDER=gt,e.Delete=fs,e.DetailsView=ba,e.DetailsViewSettings=ie,e.Download=_s,e.EMPTY=c,e.EMPTY_CONTENT=pt,e.EMPTY_INNER_CONTENT=ct,e.ERROR_CONTENT=Gt,e.EXTN_DIALOG_ID=Le,e.FILTER=Ge,e.FOCUS=at,e.FOCUSED=rt,e.FOLDER=mt,e.FRAME=lt,e.FULLROW=$t,e.FileManager=n,e.GRID_CONTENT=Nt,e.GRID_HEADER=wt,e.GRID_ID=Pe,e.GRID_VIEW=xt,e.GetDetails=ms,e.HEADER_CHECK=ei,e.HOVER=st,e.ICONS=Yt,e.ICON_BREADCRUMB=Wt,e.ICON_CLEAR=Kt,e.ICON_COLLAPSIBLE="e-icon-collapsible",e.ICON_COPY=kt,e.ICON_CUT=Mt,e.ICON_DELETE=Tt,e.ICON_DETAILS=Vt,e.ICON_DOWNLOAD=Bt,e.ICON_DROP_IN="e-icons e-fe-drop-in",e.ICON_DROP_OUT="e-icons e-fe-drop-out",e.ICON_GRID=zt,e.ICON_IMAGE=bt,e.ICON_LARGE=qt,e.ICON_MUSIC=yt,e.ICON_NEWFOLDER=Ft,e.ICON_NO_DROP="e-icons e-fe-no-drop",e.ICON_OPEN=Pt,e.ICON_OPTIONS="e-icons e-fe-options",e.ICON_PASTE=Lt,e.ICON_REFRESH=_t,e.ICON_RENAME=At,e.ICON_SELECTALL=Ht,e.ICON_SHORTBY=Ut,e.ICON_UPLOAD=Rt,e.ICON_VIDEO=vt,e.ICON_VIEW=Et,e.IMG_DIALOG_ID=ke,e.LARGEICON_ID=Re,e.LARGE_EMPTY_FOLDER=Ot,e.LARGE_EMPTY_FOLDER_TWO="e-empty-icon.e-fe-folder",e.LARGE_ICON=It,e.LARGE_ICONS=$e,e.LARGE_ICON_FOLDER="e-fe-folder",e.LAYOUT=Je,e.LAYOUT_CONTENT=Xe,e.LAYOUT_ID=xe,e.LIST_ITEM=d,e.LIST_PARENT=tt,e.LIST_TEXT=et,e.LargeIconsView=oa,e.MENU_ICON=Ct,e.MENU_ITEM=St,e.MOBILE=We,e.MOB_POPUP=Ke,e.MULTI_SELECT=Ye,e.NAVIGATION=Qe,e.NAVIGATION_ID=Ne,e.NavigationPane=ma,e.NavigationPaneSettings=pe,e.OVERLAY=ti,e.RETRY_DIALOG_ID="_retry_dialog",e.RETRY_ID="_retry",e.ROOT=He,e.ROOT_POPUP=qe,e.ROW=dt,e.ROWCELL="e-rowcell",e.RTL=Qt,e.SEARCH_ID=_e,e.SELECTED_ITEMS="e-items",e.SORTBY_ID="_sortby",e.SPLITTER_ID="_splitter",e.SPLIT_BAR=Zt,e.STATUS="e-status",e.SUBMENU_ICON=jt,e.Search=Vs,e.SearchSettings=t,e.TB_ITEM=Ze,e.TB_OPTION_DOT=it,e.TB_OPTION_TICK=o,e.TEMPLATE_CELL="e-templatecell",e.TEXT_CONTENT="e-text-content",e.TOOLBAR_ID=je,e.TREE_ID=Ee,e.TREE_VIEW=Dt,e.Toolbar=R,e.ToolbarItem=K,e.ToolbarSettings=X,e.UPLOAD_DIALOG_ID=Te,e.UPLOAD_ID=Ue,e.UploadSettings=ye,e.VALUE=ii,e.VIEW_ID="_view",e.Virtualization=ga,e.actionFailure=bi,e.activeElement=rn,e.addBlur=on,e.afterRequest=fi,e.beforeDelete="before-delete",e.beforeDownload="before-download",e.beforeRequest=ui,e.clearAllInit=wi,e.clearPathInit=Di,e.closePopup=ls,e.columnArray=oe,e.copyFiles=fn,e.createDeniedDialog=D,e.createDialog=x,e.createEmptyElement=Dn,e.createEnd=si,e.createExtDialog=Bs,e.createFolder=ps,e.createImageDialog=aa,e.createNewFolder=rs,e.createVirtualDragElement=_n,e.cutCopyInit=Mi,e.cutEnd=Ti,e.cutFiles=mn,e.defaultToolbarItems=Q,e.deleteEnd=li,e.deleteInit=oi,e.destroy=ci,e.detailsInit=m,e.doDeleteFiles=Zn,e.doDownload=$n,e.doDownloadFiles=es,e.doPasteUpdate=Fn,e.doRename=Xn,e.download="download",e.downloadInit=Hi,e.dragCancel=zn,e.dragEnd=zi,e.dragHelper="drag-helper",e.dragStartHandler=Bn,e.dragStopHandler=Hn,e.dragging=Wi,e.draggingHandler=Yn,e.dropHandler=Ln,e.dropInit=Bi,e.dropPath=qi,e.fileItems=ce,e.fileType=bn,e.filter=cs,e.filterEnd=ai,e.finalizeEnd=u,e.folderItems=ue,e.generatePath=sn,e.getAccessClass=ts,e.getAccessDetails=ds,e.getAllChildItems=hn,e.getCssClass=xn,e.getDirectories=Sn,e.getDirectoryPath=An,e.getDuplicateData=Un,e.getFullPath=vn,e.getImageUrl=yn,e.getItemName=Jn,e.getLocaleText=w,e.getModule=ln,e.getName=In,e.getObject=wn,e.getParentPath=Tn,e.getParents=nn,e.getPath=Zi,e.getPathId=en,e.getPathNames=tn,e.getPathObject=O,e.getSortField=En,e.getSortedData=On,e.getTargetModule=cn,e.getTargetPath=hs,e.hasContentAccess=ns,e.hasDownloadAccess=as,e.hasEditAccess=S,e.hasReadAccess=is,e.hasUploadAccess=ss,e.hideLayout=Ai,e.hidePaste=Pi,e.initialEnd=ni,e.isFile="isFile",e.isFileSystemData=j,e.layoutChange=a,e.layoutItems=ge,e.layoutRefresh=mi,e.menuItemData=ji,e.methodCall=Yi,e.modelChanged=l,e.nodeExpand=Ci,e.objectToString=Gn,e.openAction=gn,e.openEnd=Ii,e.openInit=vi,e.openSearchFolder=Rn,e.paste=gs,e.pasteEnd=Li,e.pasteHandler=Mn,e.pasteInit=ki,e.pathChanged=g,e.pathColumn=Ui,e.pathDrag=ri,e.permissionCopy="copy",e.permissionDownload=Xi,e.permissionEdit=v,e.permissionEditContents=Ji,e.permissionRead=Gi,e.permissionUpload=Qi,e.read=C,e.readDropPath=Vn,e.refresh=un,e.refreshEnd=hi,e.removeActive=an,e.removeBlur=I,e.removeDropTarget=qn,e.removeItemClass=Wn,e.rename=us,e.renameEnd=y,e.renameEndParent=Ni,e.renameInit=xi,e.resizeEnd=di,e.scrollHandler=Kn,e.search=yi,e.searchTextChange=_i,e.searchWordHandler=dn,e.selectAllInit=Oi,e.selectedData=Ri,e.selectionChanged=f,e.setDateObject=jn,e.setNextPath=Pn,e.setNodeId=Cn,e.showPaste=Ei,e.skipUpload=gi,e.sortByChange=Si,e.sortColumn=Vi,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();if(r&&o){r=r[0]-o[0]||r[1].localeCompare(o[1]);if(r)return r}}return s.length-a.length},e.sortbyClickHandler=Nn,e.splitterResize=pi,e.treeSelect="select-node",e.updateLayout=pn,e.updatePath=$i,e.updateRenamingData=Qn,e.updateSelectionData=Ki,e.updateTreeSelection=Fi,e.upload="upload",e.uploadItem=os,e.validateSubFolder=kn,Object.defineProperty(e,"__esModule",{value:!0})});
|
11
2
|
//# sourceMappingURL=ej2-filemanager.umd.min.js.map
|