@syncfusion/ej2-layouts
Version:
A package of Essential JS 2 layout pure CSS components such as card and avatar. The card is used as small container to show content in specific structure, whereas the avatars are icons, initials or figures representing particular person.
10 lines • 138 kB
JavaScript
/*!
* filename: ej2-layouts.min.js
* version : 29.1.35
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase")):"function"==typeof define&&define.amd?define(["SyncfusionBase"],t):"object"==typeof exports?exports.SyncfusionLayouts=t(require("SyncfusionBase")):e.SyncfusionLayouts=t(e.SyncfusionBase)}(self,(e=>(()=>{"use strict";var t={766:t=>{t.exports=e}},i={};function s(e){var n=i[e];if(void 0!==n)return n.exports;var a=i[e]={exports:{}};return t[e](a,a.exports,s),a.exports}s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{s.r(n),s.d(n,{DashboardLayout:()=>J,PaneProperties:()=>T,Panel:()=>G,Splitter:()=>Y,Timeline:()=>he,TimelineAlign:()=>i,TimelineItem:()=>oe,TimelineOrientation:()=>t});var e,t,i,a=s(766),l=(e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}),r=function(e,t,i,s){var n,a=arguments.length,l=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(l=(a<3?n(l):a>3?n(t,i,l):n(t,i))||l);return a>3&&l&&Object.defineProperty(t,i,l),l},o="e-splitter",h="e-splitter-horizontal",d="e-splitter-vertical",p="e-pane",c="e-pane-horizontal",u="e-pane-vertical",g="e-split-bar",m="e-split-bar-horizontal",f="e-split-bar-vertical",v="e-static-pane",y="e-scrollable",P="e-resize-handler",C="e-resizable-split-bar",S="e-split-bar-hover",x="e-split-bar-active",b="e-hide-handler",w="e-disabled",z="e-rtl",A="e-collapsible",I="e-navigate-arrow",E="e-arrow-right",O="e-arrow-left",R="e-arrow-up",H="e-arrow-down",B="e-icon-hidden",M="e-expanded",L="e-collapsed",k="e-pane-hidden",W="e-resizable",N="e-last-bar",T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),r([(0,a.Property)()],t.prototype,"size",void 0),r([(0,a.Property)(!1)],t.prototype,"collapsible",void 0),r([(0,a.Property)(!1)],t.prototype,"collapsed",void 0),r([(0,a.Property)(!0)],t.prototype,"resizable",void 0),r([(0,a.Property)(null)],t.prototype,"min",void 0),r([(0,a.Property)(null)],t.prototype,"max",void 0),r([(0,a.Property)()],t.prototype,"content",void 0),r([(0,a.Property)("")],t.prototype,"cssClass",void 0),t}(a.ChildProperty),Y=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.needsID=!0,s}return l(t,e),t.prototype.onPropertyChanged=function(e,t){if(this.element.classList.contains(o))for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"height":this.setSplitterSize(this.element,e.height,"height");break;case"width":this.setSplitterSize(this.element,e.width,"width");break;case"cssClass":this.setCssClass(this.element,e.cssClass);break;case"enabled":this.isEnabled(this.enabled);break;case"enableReversePanes":this.setReversePane();break;case"separatorSize":this.setSeparatorSize(e.separatorSize);break;case"orientation":this.changeOrientation(e.orientation);break;case"paneSettings":if(e.paneSettings instanceof Array&&t.paneSettings instanceof Array)this.clearTemplate(),this.destroyPaneSettings(),this.allBars=[],this.allPanes=[],this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setRTL(this.enableRtl),this.isCollapsed();else{var n=Object.keys(e.paneSettings),l=n.some((function(t){return!(0,a.isNullOrUndefined)(e.paneSettings[t].content)}));if(this.isReact&&l){for(var r=0,h=0;h<this.paneSettings.length;h++)"function"==typeof this.paneSettings[h].content&&(r+=1);r===this.paneSettings.length&&this.clearTemplate()}for(var d=0;d<n.length;d++)for(var p=parseInt(Object.keys(e.paneSettings)[d],10),c=Object.keys(e.paneSettings[p]).length,u=0;u<c;u++){var g=Object.keys(e.paneSettings[p])[u];switch(g){case"content":var m=Object(e.paneSettings[p])[""+g];(0,a.isNullOrUndefined)(m)||(this.allPanes[p].innerHTML="",this.setTemplate(m,this.allPanes[p]));break;case"resizable":var f=Object(e.paneSettings[p])[""+g];this.resizableModel(p,f);break;case"collapsible":this.collapsibleModelUpdate(p);break;case"collapsed":e.paneSettings[p].collapsed?this.isCollapsed(p):this.collapsedOnchange(p);break;case"cssClass":this.setCssClass(this.allPanes[p],e.paneSettings[p].cssClass);break;case"size":var v=Object(e.paneSettings[p])[""+g];""===v||(0,a.isNullOrUndefined)(v)||this.updatePaneSize(v,p)}}}break;case"enableRtl":this.setRTL(e.enableRtl)}}},t.prototype.updatePaneSize=function(e,t){this.allPanes[t].style.flexBasis=e;for(var i,s=[],n=0,a=0;a<this.allPanes.length;a++)this.paneSettings[a].size||""===this.allPanes[a].innerText?this.paneSettings[a].size&&(i="Horizontal"===this.orientation?this.allPanes[t].offsetWidth:this.allPanes[t].offsetHeight):(s[n]=a,n++);i="Horizontal"===this.orientation?this.allBars[0].offsetWidth*this.allBars.length+i:this.allBars[0].offsetHeight*this.allBars.length+i;for(var l=(("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)-i-2*this.border)/s.length,r=0;r<s.length;r++)""!==this.allPanes[s[r]].style.flexBasis&&(this.allPanes[s[r]].style.flexBasis=l+"px");this.allPanes[t].classList.add(v)},t.prototype.initializeValues=function(){this.allPanes=[],this.paneOrder=[],this.separatorOrder=[],this.allBars=[],this.previousCoordinates={},this.currentCoordinates={},this.updatePrePaneInPercentage=!1,this.updateNextPaneInPercentage=!1,this.panesDimensions=[],this.border=0,this.validDataAttributes=["data-size","data-min","data-max","data-collapsible","data-resizable","data-content","data-collapsed"],this.validElementAttributes=["data-orientation","data-width","data-height"],this.iconsDelay=300,this.templateElement=[],this.collapseFlag=!1,this.expandFlag=!0},t.prototype.preRender=function(){this.initializeValues(),this.onReportWindowSize=this.reportWindowSize.bind(this),this.onMouseMoveHandler=this.onMouseMove.bind(this),this.onMouseUpHandler=this.onMouseUp.bind(this),this.onTouchMoveHandler=this.onMouseMove.bind(this),this.onTouchEndHandler=this.onMouseUp.bind(this),this.wrapper=this.element.cloneNode(!0),this.wrapperParent=this.element.parentElement,(0,a.removeClass)([this.wrapper],["e-control","e-lib",o]);var e="Horizontal"===this.orientation?h:d;(0,a.addClass)([this.element],e);var t="msie"===a.Browser.info.name?"e-ie":"";this.setCssClass(this.element,t),a.Browser.isDevice&&(0,a.addClass)([this.element],"e-splitter-touch")},t.prototype.getPersistData=function(){return this.addOnPersist(["paneSettings"])},t.prototype.getModuleName=function(){return"splitter"},t.prototype.render=function(){this.checkDataAttributes(),this.setCssClass(this.element,this.cssClass),this.isEnabled(this.enabled),this.setDimension(this.getHeight(this.element),this.getWidth(this.element)),this.createSplitPane(this.element),this.addSeparator(this.element),this.getPanesDimensions(),this.setPaneSettings(),this.setRTL(this.enableRtl),this.enableReversePanes&&this.setReversePane(),this.collapseFlag=!0,this.isCollapsed(),this.collapseFlag=!1,a.EventHandler.add(document,"touchstart click",this.onDocumentClick,this),this.renderComplete(),this.element.ownerDocument.defaultView.addEventListener("resize",this.onReportWindowSize,!0),a.EventHandler.add(this.element,"keydown",this.onMove,this)},t.prototype.onDocumentClick=function(e){e.target.classList.contains(g)||(0,a.isNullOrUndefined)(this.currentSeparator)||(this.currentSeparator.classList.remove(S),this.currentSeparator.classList.remove(x))},t.prototype.checkPaneSize=function(e){var t="Horizontal"===this.orientation?this.previousPane.offsetWidth:this.previousPane.offsetHeight,i="Horizontal"===this.orientation?this.nextPane.offsetWidth:this.nextPane.offsetHeight,s=(0,a.isNullOrUndefined)(this.separatorSize)?1:this.separatorSize;if(this.previousPane.style.flexBasis.indexOf("%")>0||this.previousPane.style.flexBasis.indexOf("p")>0||this.nextPane.style.flexBasis.indexOf("%")>0){var n=this.updatePaneFlexBasis(this.previousPane),l=this.updatePaneFlexBasis(this.nextPane);this.totalPercent=n+l,this.totalWidth=this.convertPercentageToPixel(this.totalPercent+"%"),"keydown"!==e.type||(0,a.isNullOrUndefined)(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&i>0&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<this.convertPercentageToPixel(l-1+"%")?(this.previousPane.style.flexBasis=n+1+"%",this.nextPane.style.flexBasis=l-1+"%"):(37===e.keyCode||38===e.keyCode)&&t>0&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<this.convertPercentageToPixel(n-1+"%")&&(this.previousPane.style.flexBasis=n-1+"%",this.nextPane.style.flexBasis=l+1+"%"))}else this.totalWidth="Horizontal"===this.orientation?this.previousPane.offsetWidth+this.nextPane.offsetWidth:this.previousPane.offsetHeight+this.nextPane.offsetHeight,"keydown"!==e.type||(0,a.isNullOrUndefined)(e.keyCode)||((39===e.keyCode||40===e.keyCode)&&i>0&&this.getMinInPixel(this.paneSettings[this.nextPaneIndex].min)<i+s?(this.addStaticPaneClass(),this.previousPane.style.flexBasis=t+s+"px",this.nextPane.style.flexBasis=i<s?"0px":i-s+"px"):(37===e.keyCode||38===e.keyCode)&&t>0&&this.getMinInPixel(this.paneSettings[this.prevPaneIndex].min)<t-s&&(this.addStaticPaneClass(),this.previousPane.style.flexBasis=t<s?"0px":t-s+"px",this.nextPane.style.flexBasis=i+s+"px"))},t.prototype.onMove=function(e){if(this.allPanes.length>1){var t=this.getSeparatorIndex(this.currentSeparator),i=this.previousPane.classList.contains(L),s=this.previousPane.classList.contains(M),n=this.nextPane.classList.contains(L);("Horizontal"!==this.orientation&&38===e.keyCode||"Horizontal"===this.orientation&&39===e.keyCode||"Horizontal"===this.orientation&&37===e.keyCode||"Horizontal"!==this.orientation&&40===e.keyCode)&&(!s&&!n&&!i||s&&!n)&&document.activeElement.classList.contains(g)&&this.paneSettings[t].resizable&&this.paneSettings[t+1].resizable?(e.preventDefault(),this.checkPaneSize(e),this.triggerResizing(e)):13===e.keyCode&&this.paneSettings[t].collapsible&&document.activeElement.classList.contains(g)&&this.currentSeparator.classList.contains(x)&&(this.previousPane.classList.contains(L)?(this.expand(t),(0,a.addClass)([this.currentSeparator],x)):(this.collapse(t),(0,a.addClass)([this.currentSeparator],x)))}},t.prototype.getMinInPixel=function(e){if((0,a.isNullOrUndefined)(e))return 0;var t=this.convertPixelToNumber(e.toString());return e.indexOf("%")>0&&(t=this.convertPercentageToPixel(e)),this.convertPixelToNumber(t.toString())},t.prototype.sanitizeHelper=function(e){if(this.enableHtmlSanitizer){var t=a.SanitizeHtmlHelper.beforeSanitize();(0,a.extend)(t,t,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",t),t.cancel&&!(0,a.isNullOrUndefined)(t.helper)?e=t.helper(e):t.cancel||(e=a.SanitizeHtmlHelper.serializeValue(t,e))}return e},t.prototype.checkDataAttributes=function(){for(var e,t,i=0;i<this.validElementAttributes.length;i++)t=this.element.getAttribute(this.validElementAttributes[i]),(0,a.isNullOrUndefined)(t)||(this[e=this.removeDataPrefix(this.validElementAttributes[i])]=t);for(var s=0;s<this.element.children.length;s++)for(var n=0;n<this.validDataAttributes.length;n++)if(t=this.element.children[s].getAttribute(this.validDataAttributes[n]),!(0,a.isNullOrUndefined)(t)){t="collapsible"===(e=this.removeDataPrefix(this.validDataAttributes[n]))||"resizable"===e?"true"===t:t,(0,a.isNullOrUndefined)(this.paneSettings[s])&&(this.paneSettings[s]={size:"",min:null,max:null,content:"",resizable:!0,collapsible:!1,collapsed:!1});var l=this.paneSettings[s][e];"resizable"!==e&&"collapsible"!==e&&"collapsed"!==e||(this.paneSettings[s][e]=t),((0,a.isNullOrUndefined)(l)||""===l)&&(this.paneSettings[s][e]=t)}},t.prototype.destroyPaneSettings=function(){[].slice.call(this.element.children).forEach((function(e){(0,a.detach)(e)})),this.restoreElem()},t.prototype.setPaneSettings=function(){for(var e=this.allPanes.length,t=[],i={size:"",min:null,max:null,content:"",resizable:!0,collapsed:!1,collapsible:!1,cssClass:""},s=0;s<e;s++)(0,a.isNullOrUndefined)(this.paneSettings[s])?t[s]=i:t[s]=this.paneSettings[s];this.setProperties({paneSettings:t},!0)},t.prototype.checkArrow=function(e,t){return this.allBars[e].querySelector("."+I+"."+t)},t.prototype.removeDataPrefix=function(e){return e.slice(e.lastIndexOf("-")+1)},t.prototype.setRTL=function(e){e?(0,a.addClass)([this.element],z):(0,a.removeClass)([this.element],z)},t.prototype.setReversePane=function(){this.allPanes=this.allPanes.reverse(),this.allBars=this.allBars.reverse(),(0,a.addClass)([this.allBars[this.allBars.length-1]],N),(0,a.removeClass)([this.allBars[0]],N),this.setProperties({paneSettings:this.paneSettings.reverse()},!0),this.enableReversePanes?this.element.setAttribute("dir","rtl"):this.element.removeAttribute("dir")},t.prototype.setSplitterSize=function(e,t,i){var s="width"===i?{width:(0,a.formatUnit)(t)}:{height:(0,a.formatUnit)(t)};(0,a.setStyleAttribute)(e,s)},t.prototype.getPanesDimensions=function(){for(var e=0;e<this.allPanes.length;e++)"Horizontal"===this.orientation?this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().width):this.panesDimensions.push(this.allPanes[e].getBoundingClientRect().height)},t.prototype.setCssClass=function(e,t){t&&(0,a.addClass)([e],t.split(t.indexOf(",")>-1?",":" "))},t.prototype.hideResizer=function(e){(0,a.addClass)([(0,a.select)("."+P,e)],b)},t.prototype.showResizer=function(e){!(0,a.isNullOrUndefined)(this.previousPane)&&this.previousPane.classList.contains(W)&&!(0,a.isNullOrUndefined)(this.nextPane)&&this.nextPane.classList.contains(W)&&(0,a.removeClass)([(0,a.select)("."+P,e)],b)},t.prototype.resizableModel=function(e,t){var i=e===this.allBars.length?e-1:e,s=e;a.EventHandler.remove(this.allBars[i],"mousedown",this.onMouseDown),t?(a.EventHandler.add(this.allBars[i],"mousedown",this.onMouseDown,this),this.isResizable()&&(this.showResizer(this.allBars[i]),(0,a.removeClass)([(0,a.select)("."+P,this.allBars[i])],b),this.allBars[i].classList.add(C),e===this.allBars.length?this.allPanes[e].classList.add(W):this.allPanes[i].classList.add(W),this.updateResizablePanes(s))):(this.updateResizablePanes(s),this.hideResizer(this.allBars[i]),this.allBars[i].classList.remove(C),e===this.allBars.length?this.allPanes[e].classList.remove(W):this.allPanes[i].classList.remove(W))},t.prototype.collapsibleModelUpdate=function(e){var t=e===this.allBars.length?e-1:e,i="Horizontal"===this.orientation?this.checkArrow(t,O):this.checkArrow(t,R),s="Horizontal"===this.orientation?this.checkArrow(t,E):this.checkArrow(t,H);this.paneCollapsible(this.allPanes[e],e),this.updateCollapseIcons(t,s,i)},t.prototype.collapseArrow=function(e,t){return(0,a.selectAll)("."+t,this.allBars[e])[0]},t.prototype.updateIsCollapsed=function(e,t,i){if(!(0,a.isNullOrUndefined)(e)){var s=e===this.allBars.length,n=s?e-1:e;(!s&&this.allPanes[e+1].classList.contains(L)&&0!==e?this.collapseArrow(n-1,i):s?this.collapseArrow(n,i):this.collapseArrow(n,t)).click()}},t.prototype.isCollapsed=function(e){var t=this;if((0,a.isNullOrUndefined)(e)||!this.paneSettings[e].collapsed||!(0,a.isNullOrUndefined)(this.allPanes[e].classList.contains(L))){if(this.expandFlag=!1,(0,a.isNullOrUndefined)(e)){for(var i=0;i<this.allPanes.length;i++)!(0,a.isNullOrUndefined)(this.paneSettings[i])&&this.paneSettings[i].collapsed&&this.updateIsCollapsed(i,this.targetArrows().collapseArrow,this.targetArrows().lastBarArrow);for(i=this.allPanes.length-1;i>=0;i--)if(!(0,a.isNullOrUndefined)(this.paneSettings[i])&&this.paneSettings[i].collapsed&&!this.allPanes[i].classList.contains(L)){var s="Horizontal"===this.orientation?E:H;if(0!==i)this.collapseArrow(i-1,s).click();if(!this.nextPane.classList.contains(L))this.collapseArrow(i-1,s).click()}}else{this.collapseFlag=!0;var n=e===this.allBars.length,l=n?e-1:e,r={target:!n&&this.allPanes[e+1].classList.contains(L)&&0!==e?this.collapseArrow(l-1,this.targetArrows().lastBarArrow):n?this.collapseArrow(l,this.targetArrows().lastBarArrow):this.collapseArrow(l,this.targetArrows().collapseArrow)},o=this.beforeAction(r);this.trigger("beforeCollapse",o,(function(i){if(!i.cancel){var s=[];s[0]=e;for(var n=1,a=0;a<t.allPanes.length;a++)t.allPanes[a].classList.contains(L)&&(s[n]=a,n++);s=s.sort(),t.updateIsCollapsed(e,t.targetArrows().collapseArrow,t.targetArrows().lastBarArrow);for(a=0;a<s.length;a++)t.allPanes[s[a]].classList.contains(L)||t.updateIsCollapsed(s[a],t.targetArrows().collapseArrow,t.targetArrows().lastBarArrow);for(a=s.length;a>0;a--)if(!t.allPanes[s[a-1]].classList.contains(L)){var l=t.targetArrows();t.updateIsCollapsed(s[a-1],l.collapseArrow,l.lastBarArrow)}var o=t.afterAction(r);t.trigger("collapsed",o),t.collapseFlag=!1}}))}this.expandFlag=!0}},t.prototype.targetArrows=function(){return this.splitterProperty(),{collapseArrow:"Horizontal"===this.orientation?O:R,lastBarArrow:"Vertical"===this.orientation?H:E}},t.prototype.collapsedOnchange=function(e){(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].collapsed)||!this.allPanes[e].classList.contains(L)||this.updateIsCollapsed(e,this.targetArrows().lastBarArrow,this.targetArrows().collapseArrow)},t.prototype.isEnabled=function(e){e?(0,a.removeClass)([this.element],w):(0,a.addClass)([this.element],w)},t.prototype.setSeparatorSize=function(e){for(var t=(0,a.isNullOrUndefined)(e)?"auto":e+"px",i="Horizontal"===this.orientation?m:f,s=0;s<this.allBars.length;s++){var n=(0,a.selectAll)("."+i,this.element)[s],l=(0,a.selectAll)("."+P,n)[0];"Horizontal"===this.orientation?(n.style.width=t,(0,a.isNullOrUndefined)(l)||(l.style.width=t)):(n.style.height=t,(0,a.isNullOrUndefined)(l)||(l.style.height=t))}},t.prototype.changeOrientation=function(e){var t="Vertical"===e;this.element.classList.remove(t?h:d),this.element.classList.add(t?d:h);for(var i=0;i<this.allPanes.length;i++)this.allPanes[i].classList.remove(t?c:u),this.allPanes[i].classList.add(t?u:c);for(i=0;i<this.allBars.length;i++)(0,a.detach)(this.allBars[i]);this.allBars=[],this.addSeparator(this.element)},t.prototype.checkSplitPane=function(e,t){return this.collectPanes(e.parentElement.children)[t]},t.prototype.collectPanes=function(e){for(var t=[],i=0;i<e.length;i++)e[i].classList.contains(p)&&t.push(e[i]);return t},t.prototype.getPrevPane=function(e){return this.enableReversePanes?this.getOrderPane(e+1):this.getOrderPane(e-1)},t.prototype.getNextPane=function(e){return this.enableReversePanes?this.getOrderPane(e-1):this.getOrderPane(e+1)},t.prototype.getOrderPane=function(e){for(var t,i=0;i<this.element.children.length;i++)parseInt(this.element.children[i].style.order,10)===e&&(t=this.element.children[i]);return t},t.prototype.getOrderIndex=function(e,t){var i,s;s="pane"===t?this.allPanes:this.allBars;for(var n=0;n<s.length;n++)parseInt(s[n].style.order,10)===e&&(i=n);return i},t.prototype.updateSeparatorSize=function(e){var t=(0,a.isNullOrUndefined)(this.separatorSize)?"1px":this.separatorSize+"px";"Horizontal"===this.orientation?e.style.width=t:e.style.height=t},t.prototype.addResizeHandler=function(e){var t=this.createElement("div");(0,a.addClass)([t],[P,"e-icons"]),this.updateSeparatorSize(t),e.appendChild(t)},t.prototype.getHeight=function(e){this.height;return""!==e.style.height&&"100%"===this.height?e.style.height:this.height},t.prototype.getWidth=function(e){this.width;return""!==e.style.width&&"100%"===this.width?e.style.width:this.width},t.prototype.setDimension=function(e,t){(0,a.setStyleAttribute)(this.element,{height:e,width:t})},t.prototype.updateCollapseIcons=function(e,t,i){(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].collapsible)||(this.paneSettings[e].collapsible?(0,a.removeClass)([i],[B]):(0,a.addClass)([i],[B]),(0,a.isNullOrUndefined)(this.paneSettings[e+1])||(this.paneSettings[e+1].collapsible?(0,a.removeClass)([t],[B]):(0,a.addClass)([t],[B])),(0,a.isNullOrUndefined)(this.paneSettings[e+1])||this.paneSettings[e+1].collapsible&&(this.paneSettings[e+1].collapsible?(0,a.removeClass)([t],[B]):(0,a.addClass)([t],[B])))},t.prototype.updateIconClass=function(){"Horizontal"===this.orientation?(this.leftArrow=O,this.rightArrow=E):(this.leftArrow=R,this.rightArrow=H)},t.prototype.createSeparator=function(e){var t=this.createElement("div");this.allBars.push(t);var i=this.createElement("button"),s=this.createElement("button");i.setAttribute("tabindex","-1"),s.setAttribute("tabindex","-1"),i.setAttribute("aria-label","Toggle navigation"),s.setAttribute("aria-label","Toggle navigation"),i.setAttribute("type","button"),s.setAttribute("type","button");var n=(0,a.isNullOrUndefined)(this.separatorSize)?"1px":this.separatorSize+"px",l=this;return"Horizontal"===this.orientation?(this.updateIconClass(),(0,a.addClass)([s],[I,O,B]),(0,a.addClass)([i],[I,E,B]),(0,a.addClass)([t],[g,m]),t.style.width=n):((0,a.addClass)([i],[I,H,B]),(0,a.addClass)([s],[I,R,B]),(0,a.addClass)([t],[g,f]),this.updateIconClass(),t.style.height=n),this.addMouseActions(t),t.appendChild(s),this.addResizeHandler(t),t.appendChild(i),this.updateCollapseIcons(e,i,s),t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),this.enableReversePanes?t.setAttribute("dir","ltr"):t.removeAttribute("dir"),t.addEventListener("focus",(function(){t.classList.add(x),l.currentSeparator=t,l.getPaneDetails()})),t.addEventListener("blur",(function(){t.classList.remove(x)})),t},t.prototype.updateResizablePanes=function(e){this.getPaneDetails(),this.isResizable()?this.allPanes[e].classList.add(W):this.allPanes[e].classList.remove(W)},t.prototype.addSeparator=function(e){for(var t,i=this.allPanes.length,s=e.children,n=0;n<i;n++)if(n<i-1){if(t=this.createSeparator(n),(0,a.setStyleAttribute)(t,{order:2*n+1}),this.separatorOrder.push(2*n+1),s[n].parentNode.appendChild(t),this.currentSeparator=t,t.setAttribute("role","separator"),t.setAttribute("aria-valuenow",n.toString()),(0,a.isNullOrUndefined)(this.orientation)||t.setAttribute("aria-orientation",this.orientation.toLowerCase()),this.wireClickEvents(),!(0,a.isNullOrUndefined)(t))if(this.isResizable()){a.EventHandler.add(t,"mousedown",this.onMouseDown,this);var l="msie"===a.Browser.info.name?"pointerdown":"touchstart";a.EventHandler.add(t,l,this.onMouseDown,this),t.classList.add(C),this.updateResizablePanes(n)}else(0,a.addClass)([(0,a.select)("."+P,t)],b)}else t&&(0,a.addClass)([t],N),i>1&&this.updateResizablePanes(n);if("msie"===a.Browser.info.name){var r=this.element.querySelectorAll(".e-splitter .e-resize-handler");for(n=0;n<r.length;n++){var o=(0,a.isNullOrUndefined)(this.separatorSize)?1:this.separatorSize;r[n].style.paddingLeft=o/2+"px",r[n].style.paddingRight=o/2+"px"}}},t.prototype.isResizable=function(){var e=!1;return(!(0,a.isNullOrUndefined)(this.paneSettings[this.getPreviousPaneIndex()])&&this.paneSettings[this.getPreviousPaneIndex()].resizable&&!(0,a.isNullOrUndefined)(this.paneSettings[this.getNextPaneIndex()])&&this.paneSettings[this.getNextPaneIndex()].resizable||(0,a.isNullOrUndefined)(this.paneSettings[this.getNextPaneIndex()]))&&(e=!0),e},t.prototype.addMouseActions=function(e){var t,i,s=this;e.addEventListener("mouseenter",(function(){t=setTimeout((function(){(0,a.addClass)([e],[S])}),s.iconsDelay)})),e.addEventListener("mouseleave",(function(){clearTimeout(t),(0,a.removeClass)([e],[S])})),e.addEventListener("mouseout",(function(){clearTimeout(i)})),e.addEventListener("mouseover",(function(){i=setTimeout((function(){(0,a.addClass)([e],[S])}))}))},t.prototype.getEventType=function(e){return e.indexOf("mouse")>-1?"mouse":"touch"},t.prototype.updateCurrentSeparator=function(e){this.currentSeparator=this.isSeparator(e)?e.parentElement:e},t.prototype.isSeparator=function(e){return!e.classList.contains(g)},t.prototype.isMouseEvent=function(e){var t=!1;return("mouse"===this.getEventType(e.type)||!(0,a.isNullOrUndefined)(e.pointerType)&&"mouse"===this.getEventType(e.pointerType))&&(t=!0),t},t.prototype.updateCursorPosition=function(e,t){if(this.isMouseEvent(e))this.changeCoordinates({x:e.pageX,y:e.pageY},t);else{var i="msie"!==a.Browser.info.name?e.touches[0]:e;this.changeCoordinates({x:i.pageX,y:i.pageY},t)}},t.prototype.changeCoordinates=function(e,t){"previous"===t?this.previousCoordinates=e:this.currentCoordinates=e},t.prototype.reportWindowSize=function(){var e=this,t=this.allPanes.length;if(document.body.contains(this.element)){for(var i=0;i<t;i++){if((0,a.isNullOrUndefined)(this.paneSettings[i].size)&&this.allPanes[i].classList.remove(v),t-1===i)this.element.querySelectorAll("."+v).length===t&&""===this.allPanes[i].style.flexBasis&&(0,a.removeClass)([this.allPanes[i]],v)}t>0&&setTimeout((function(){e.updateSplitterSize(!0)}),200)}else document.defaultView.removeEventListener("resize",this.onReportWindowSize)},t.prototype.updateSplitterSize=function(e){for(var t=0,i=[],s=0,n=this.element.children,l=0,r=n.length;l<r;l++)t+="Horizontal"===this.orientation?n[l].offsetWidth:n[l].offsetHeight;var o=0;for(r=this.allBars.length;o<r;o++)t+="Horizontal"===this.orientation?parseInt(getComputedStyle(this.allBars[o]).marginLeft,10)+parseInt(getComputedStyle(this.allBars[o]).marginLeft,10):parseInt(getComputedStyle(this.allBars[o]).marginTop,10)+parseInt(getComputedStyle(this.allBars[o]).marginBottom,10);var h="Horizontal"===this.orientation?this.element.offsetWidth-(2*this.border+t):this.element.offsetHeight-(2*this.border+t);for(l=0,r=this.allPanes.length;l<r;l++)(""===this.allPanes[l].innerText?this.paneSettings[l].size&&""===this.allPanes[l].innerText:this.paneSettings[l].size||""===this.allPanes[l].innerText)||(i[s]=l,s++);var d=h/i.length;for(o=0,r=i.length;o<r;o++)""!==this.allPanes[i[o]].style.flexBasis&&(this.allPanes[i[o]].style.flexBasis="Horizontal"===this.orientation?this.allPanes[i[o]].offsetWidth+d+"px":this.allPanes[i[o]].offsetHeight+d+"px");if(2===this.allPanes.length&&e){var p=this.allPanes.length,c=void 0,u=void 0,g=void 0,m=void 0;for(l=0;l<p;l++)if(!(0,a.isNullOrUndefined)(this.paneSettings[l].min)&&(u=this.convertPixelToNumber(this.paneSettings[l].min.toString()),this.paneSettings[l].min.indexOf("%")>0&&(u=this.convertPercentageToPixel(this.paneSettings[l].min)),c=this.convertPixelToNumber(u.toString()),("Horizontal"===this.orientation?this.allPanes[l].offsetWidth:this.allPanes[l].offsetHeight)<c)){0===l?(g=this.allPanes[l],m=this.allPanes[l+1]):(g=this.allPanes[l],m=this.allPanes[l-1]);var f=c-("Horizontal"===this.orientation?this.allPanes[l].offsetWidth:this.allPanes[l].offsetHeight),y=g.style.flexBasis.indexOf("%")>-1,P="Horizontal"===this.orientation?g.offsetWidth:g.offsetHeight;!(0,a.isNullOrUndefined)(g)&&""!==g.style.flexBasis&&g.classList.contains(v)&&(g.style.flexBasis=y?this.convertPixelToPercentage(P+f)+"%":P+f+"px");var C="Horizontal"===this.orientation?m.offsetWidth:m.offsetHeight;(0,a.isNullOrUndefined)(m)||""===m.style.flexBasis||m.classList.contains(v)||(m.style.flexBasis=m.style.flexBasis.indexOf("%")>-1?this.convertPixelToPercentage(C-f)+"%":C-f+"px")}}},t.prototype.wireResizeEvents=function(){document.addEventListener("mousemove",this.onMouseMoveHandler,!0),document.addEventListener("mouseup",this.onMouseUpHandler,!0);var e="msie"===a.Browser.info.name?"pointermove":"touchmove",t="msie"===a.Browser.info.name?"pointerup":"touchend";document.addEventListener(e,this.onTouchMoveHandler,!0),document.addEventListener(t,this.onTouchEndHandler,!0)},t.prototype.unwireResizeEvents=function(){this.element.ownerDocument.defaultView.removeEventListener("resize",this.onReportWindowSize);var e="msie"===a.Browser.info.name?"pointermove":"touchmove",t="msie"===a.Browser.info.name?"pointerup":"touchend";document.removeEventListener("mousemove",this.onMouseMoveHandler,!0),document.removeEventListener("mouseup",this.onMouseUpHandler,!0),document.removeEventListener(e,this.onTouchMoveHandler,!0),document.removeEventListener(t,this.onTouchEndHandler,!0)},t.prototype.wireClickEvents=function(){a.EventHandler.add(this.currentSeparator,"touchstart click",this.clickHandler,this)},t.prototype.clickHandler=function(e){if(!e.target.classList.contains(I)){var t=(0,a.selectAll)("."+o+" > ."+g+"."+S);t.length>0&&(0,a.removeClass)(t,S),e.target.classList.add(S)}this.splitterDetails(e);var i=e.target;(i.classList.contains(O)||i.classList.contains(E)||i.classList.contains(H)||i.classList.contains(R))&&(this.nextPane.classList.contains(k)||this.previousPane.classList.contains(k)?this.expandAction(e):this.collapseAction(e),this.updateSplitterSize())},t.prototype.expandAction=function(e){var t=this,i=this.beforeAction(e);this.expandFlag?this.trigger("beforeExpand",i,(function(i){i.cancel||t.expandPane(e);var s=t.afterAction(e);t.trigger("expanded",s)})):this.expandPane(e)},t.prototype.getIcon=function(e){return e.target.className.split(" ").filter((function(e){return e!==I&&e!==B}))[0]},t.prototype.expandPane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+L).length,i=!this.previousPane.classList.contains(L)&&this.previousPane.classList.contains(v)&&!this.nextPane.classList.contains(L)&&!this.nextPane.classList.contains(M)&&this.nextPane.nextElementSibling.classList.contains(p)&&!this.nextPane.nextElementSibling.classList.contains(v)&&!(t===this.allPanes.length-2),s=[L,k],n=this.getIcon(e),l=n===O||n===R,r=l?this.nextPane:this.previousPane,o=l?this.previousPane:this.nextPane,h=l?this.nextPaneIndex:this.prevPaneIndex;(0,a.removeClass)([r],s),r.setAttribute("aria-hidden","false");var d=this.element.querySelectorAll("."+L).length;if(d>0)o.classList.contains(L)||((0,a.addClass)([o],M),o.setAttribute("aria-expanded","true"));else if(0===d)for(var c=0;c<this.allPanes.length;c++)this.allPanes[c].classList.contains(L)||((0,a.removeClass)([this.allPanes[c]],M),this.allPanes[c].setAttribute("aria-expanded","false"));this.expandFlag&&this.updatePaneSettings(h,!1),this.updateIconsOnExpand(e,n),this.updateFlexGrow(),i&&(this.previousPane.classList.remove(M),this.previousPane.setAttribute("aria-expanded","false"),this.previousPane.style.flexGrow="")},t.prototype.updateFlexGrow=function(){for(var e=0,t=0;t<this.element.children.length;t++)this.element.children[t].classList.contains(L)&&(e+=1);for(var i=e===this.allPanes.length-2,s=this.allPanes,n=0;n<s.length;n++)s[n].style.flexGrow="",i&&this.allPanes[n].classList.contains(L)&&this.paneSettings[n].size&&n!==this.allPanes.length-1&&(s[n].style.flexGrow=""),s[n].classList.contains(M)?s[n].style.flexGrow="1":s[n].classList.contains(L)&&(s[n].style.flexGrow="0")},t.prototype.hideTargetBarIcon=function(e,t){(0,a.addClass)([(0,a.select)("."+t,e)],B)},t.prototype.showTargetBarIcon=function(e,t){(0,a.removeClass)([(0,a.select)("."+t,e)],B)},t.prototype.updateIconsOnCollapse=function(e,t){this.splitterProperty();var i=this.arrow,s=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,n=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;if(e.target.classList.contains(B))this.resizableModel(this.currentBarIndex,!1),(0,a.isNullOrUndefined)(s)||this.resizableModel(n,!0),this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible?((0,a.isNullOrUndefined)(s)||this.hideTargetBarIcon(s,i),this.showTargetBarIcon(this.currentSeparator,i)):((0,a.isNullOrUndefined)(s)||this.hideTargetBarIcon(s,t),this.hideTargetBarIcon(this.currentSeparator,i));else if(this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed)if(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible){if(this.resizableModel(this.currentBarIndex,!1),this.hideTargetBarIcon(this.currentSeparator,t),!(0,a.isNullOrUndefined)(s)){var l=n,r=n+1,o=this.getCollapseCount(l,r);this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible&&(1===o?(this.hideTargetBarIcon(s,i),this.resizableModel(n,!1)):2===o&&(this.hideBarIcons(s),this.resizableModel(n,!1)),this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible||this.hideTargetBarIcon(s,t))}}else this.showTargetBarIcon(this.currentSeparator,i),this.hideTargetBarIcon(this.currentSeparator,t),this.resizableModel(this.currentBarIndex,!1)},t.prototype.collapseAction=function(e){var t=this,i=this.beforeAction(e);this.collapseFlag?this.collapsePane(e):this.trigger("beforeCollapse",i,(function(i){if(!i.cancel){t.collapsePane(e);var s=t.afterAction(e);t.trigger("collapsed",s)}}))},t.prototype.collapsePane=function(e){this.removeStaticPanes();var t=this.element.querySelectorAll("."+L).length,i=this.previousPane.classList.contains(v)&&!this.previousPane.classList.contains(L)&&!this.nextPane.classList.contains(L)&&this.nextPane.nextElementSibling.classList.contains(p)&&!this.nextPane.nextElementSibling.classList.contains(v)&&!this.nextPane.nextElementSibling.classList.contains(L)&&!(t===this.allPanes.length-2)||this.nextPane.classList.contains(L)&&!this.previousPane.classList.contains(v)&&this.nextPane.classList.contains(v),s=[L,k],n=this.getIcon(e),l=n===O||n===R,r=l?this.previousPane:this.nextPane,o=l?this.nextPane:this.previousPane,h=l?this.prevPaneIndex:this.nextPaneIndex;if((0,a.removeClass)([r],M),r.setAttribute("aria-expanded","false"),(0,a.addClass)([r],s),r.setAttribute("aria-hidden","true"),""===r.style.flexBasis)(0,a.addClass)([o],M),o.setAttribute("aria-expanded","true");else{for(var d=!0,c=0;c<this.allPanes.length;c++)if(!this.allPanes[c].classList.contains(L)&&""===this.allPanes[c].style.flexBasis&&!this.allPanes[c].classList.contains(L)&&!this.allPanes[c].classList.contains(M)){(0,a.addClass)([this.allPanes[c]],M),this.allPanes[c].setAttribute("aria-expanded","true"),d=!1;break}d&&((0,a.addClass)([o],M),o.setAttribute("aria-expanded","true"))}this.collapseFlag||this.updatePaneSettings(h,!0),this.updateIconsOnCollapse(e,n),this.updateFlexGrow(),i&&(this.nextPane.classList.remove(M),this.nextPane.style.flexGrow="")},t.prototype.removeStaticPanes=function(){for(var e=0;e<this.allPanes.length;e++)(0,a.isNullOrUndefined)(this.paneSettings[e].size)&&this.allPanes[e].classList.remove(v)},t.prototype.beforeAction=function(e){return{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator,cancel:!1}},t.prototype.updatePaneSettings=function(e,t){var i=this.paneSettings;i[e].collapsed=t,this.setProperties({paneSettings:i},!0)},t.prototype.splitterProperty=function(){this.splitInstance={currentBarIndex:this.currentBarIndex,nextPaneCollapsible:this.nextPane.classList.contains(A),prevPaneCollapsible:this.previousPane.classList.contains(A),prevPaneExpanded:this.previousPane.classList.contains(M),nextPaneExpanded:this.nextPane.classList.contains(M),nextPaneCollapsed:this.nextPane.classList.contains(L),prevPaneCollapsed:this.previousPane.classList.contains(L),nextPaneIndex:this.getNextPaneIndex(),prevPaneIndex:this.getPreviousPaneIndex(),nextPaneNextEle:this.nextPane.nextElementSibling,prevPanePreEle:this.previousPane.previousElementSibling}},t.prototype.showCurrentBarIcons=function(){(0,a.removeClass)([(0,a.select)("."+this.arrow,this.currentSeparator)],B)},t.prototype.hideBarIcons=function(e){(0,a.addClass)([(0,a.select)("."+this.arrow,e)],B)},t.prototype.getCollapseCount=function(e,t){var i=0;return this.allPanes[e].classList.contains(L)&&(i+=1),this.allPanes[t].classList.contains(L)&&(i+=1),i},t.prototype.checkResizableProp=function(e,t){return!(!this.paneSettings[e].resizable||!this.paneSettings[t].resizable)},t.prototype.updateIconsOnExpand=function(e,t){this.splitterProperty();var i=this.arrow,s=this.currentBarIndex===this.allBars.length-1?this.prevBar:this.nextBar,n=this.currentBarIndex===this.allBars.length-1?this.currentBarIndex-1:this.currentBarIndex+1;if(e.target.classList.contains(B))this.paneSettings[this.prevPaneIndex].collapsible||this.paneSettings[this.nextPaneIndex].collapsible||this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0);else if(!this.splitInstance.prevPaneCollapsed&&!this.splitInstance.nextPaneCollapsed)if(this.paneSettings[this.prevPaneIndex].collapsible&&this.paneSettings[this.nextPaneIndex].collapsible){if(this.showCurrentBarIcons(),this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)?this.resizableModel(this.currentBarIndex,!0):this.resizableModel(this.currentBarIndex,!1),!(0,a.isNullOrUndefined)(s)){var l=n,r=n+1,o=this.getCollapseCount(l,r);this.paneSettings[l].collapsible&&this.paneSettings[r].collapsible&&(0===o?(this.showTargetBarIcon(s,t),this.showTargetBarIcon(s,i),this.checkResizableProp(l,r)&&this.resizableModel(n,!0)):1===o&&(this.hideBarIcons(s),this.allPanes[l].classList.contains(M)||this.allPanes[r].classList.contains(M)?this.showTargetBarIcon(s,i):this.showTargetBarIcon(s,t),this.resizableModel(n,!1)))}}else this.hideTargetBarIcon(this.currentSeparator,t),this.showTargetBarIcon(this.currentSeparator,i),this.splitInstance.prevPaneCollapsed||this.splitInstance.nextPaneCollapsed?this.resizableModel(this.currentBarIndex,!1):this.checkResizableProp(this.prevPaneIndex,this.nextPaneIndex)&&this.resizableModel(this.currentBarIndex,!0)},t.prototype.afterAction=function(e){return{element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],separator:this.currentSeparator}},t.prototype.currentIndex=function(e){this.currentBarIndex=this.getOrderIndex(parseInt(e.target.parentElement.style.order,10),"splitbar")},t.prototype.getSeparatorIndex=function(e){var t=[].slice.call(this.allBars);return(t=this.enableReversePanes?t.reverse():t).indexOf(e)},t.prototype.getPrevBar=function(e){return this.allBars[e-1]},t.prototype.getNextBar=function(e){return this.allBars[e+1]},t.prototype.updateBars=function(e){this.prevBar=this.getPrevBar(e),this.nextBar=this.getNextBar(e)},t.prototype.splitterDetails=function(e){"Horizontal"===this.orientation?this.arrow=e.target.classList.contains(O)?E:O:this.arrow=e.target.classList.contains(R)?H:R,this.updateCurrentSeparator(e.target),this.currentIndex(e),this.updateBars(this.currentBarIndex),this.getPaneDetails()},t.prototype.triggerResizing=function(e){var t={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.prevPaneIndex,this.nextPaneIndex],paneSize:[this.prePaneDimenson,this.nextPaneDimension],separator:this.currentSeparator};this.trigger("resizing",t)},t.prototype.onMouseDown=function(e){var t=this;e.preventDefault();var i=e.target;if(!i.classList.contains(I)){this.updateCurrentSeparator(i),(0,a.addClass)([this.currentSeparator],x),this.updateCursorPosition(e,"previous"),this.getPaneDetails();for(var s={element:this.element,event:e,pane:[this.previousPane,this.nextPane],index:[this.getPreviousPaneIndex(),this.getNextPaneIndex()],separator:this.currentSeparator,cancel:!1},n=0;n<this.element.querySelectorAll("iframe").length;n++)this.element.querySelectorAll("iframe")[n].style.pointerEvents="none";this.trigger("resizeStart",s,(function(i){i.cancel||(t.wireResizeEvents(),t.checkPaneSize(e))}))}},t.prototype.updatePaneFlexBasis=function(e){var t;if(e.style.flexBasis.indexOf("%")>0)t=this.removePercentageUnit(e.style.flexBasis);else if(""!==e.style.flexBasis)t=this.convertPixelToPercentage(this.convertPixelToNumber(e.style.flexBasis));else{var i="Horizontal"===this.orientation?e.offsetWidth:e.offsetHeight;t=this.convertPixelToPercentage(i)}return t},t.prototype.removePercentageUnit=function(e){return parseFloat(e.slice(0,e.indexOf("%")))},t.prototype.convertPercentageToPixel=function(e,t){var i,s=e.toString();if(s.indexOf("%")>-1){i=parseFloat(s.slice(0,s.indexOf("%")));var n=void 0;n=(0,a.isNullOrUndefined)(t)?"Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight:this.panesDimensions[this.allPanes.indexOf(t)],i=Math.ceil(n*(i/100))}else i=parseInt(s,10);return i},t.prototype.convertPixelToPercentage=function(e){return e/("Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight)*100},t.prototype.convertPixelToNumber=function(e){return(e=e.toString()).indexOf("p")>-1?parseFloat(e.slice(0,e.indexOf("p"))):parseFloat(e)},t.prototype.calcDragPosition=function(e,t){var i;return(i=(i=("Horizontal"===this.orientation?this.currentCoordinates.x-e:this.currentCoordinates.y-e)/t)>1?1:i<0?0:i)*t},t.prototype.getSeparatorPosition=function(e){this.updateCursorPosition(e,"current");var t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+window.scrollX:this.element.getBoundingClientRect().top+window.scrollY,i="Horizontal"===this.orientation?this.element.offsetWidth:this.element.offsetHeight;return this.calcDragPosition(t,i)},t.prototype.getMinMax=function(e,t,i){var s="min"===i?0:null,n=null;return"min"===i?(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].min)||(n=this.paneSettings[e].min):(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].max)||(n=this.paneSettings[e].max),this.paneSettings.length>0&&!(0,a.isNullOrUndefined)(this.paneSettings[e])&&!(0,a.isNullOrUndefined)(n)?(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),this.convertPixelToNumber(n)):s},t.prototype.getPreviousPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)+1:parseInt(this.currentSeparator.style.order,10)-1;return this.getOrderIndex(e,"pane")},t.prototype.getNextPaneIndex=function(){var e=this.enableReversePanes?parseInt(this.currentSeparator.style.order,10)-1:parseInt(this.currentSeparator.style.order,10)+1;return this.getOrderIndex(e,"pane")},t.prototype.getPaneDetails=function(){var e=null,t=null;this.order=parseInt(this.currentSeparator.style.order,10),this.allPanes.length>1&&(e=this.getPrevPane(this.order),t=this.getNextPane(this.order)),e&&t&&(this.previousPane=e,this.nextPane=t,this.prevPaneIndex=this.getPreviousPaneIndex(),this.nextPaneIndex=this.getNextPaneIndex())},t.prototype.getPaneHeight=function(e){return"Horizontal"===this.orientation?e.offsetWidth.toString():e.offsetHeight.toString()},t.prototype.isValidSize=function(e){var t=!1;return!(0,a.isNullOrUndefined)(this.paneSettings[e])&&!(0,a.isNullOrUndefined)(this.paneSettings[e].size)&&this.paneSettings[e].size.indexOf("%")>-1&&(t=!0),t},t.prototype.getPaneDimensions=function(){this.previousPaneHeightWidth=""===this.previousPane.style.flexBasis?this.getPaneHeight(this.previousPane):this.previousPane.style.flexBasis,this.nextPaneHeightWidth=""===this.nextPane.style.flexBasis?this.getPaneHeight(this.nextPane):this.nextPane.style.flexBasis,this.isValidSize(this.prevPaneIndex)&&(this.previousPaneHeightWidth=this.convertPercentageToPixel(this.previousPaneHeightWidth).toString(),this.updatePrePaneInPercentage=!0),this.isValidSize(this.nextPaneIndex)&&(this.nextPaneHeightWidth=this.convertPercentageToPixel(this.nextPaneHeightWidth).toString(),this.updateNextPaneInPercentage=!0),this.prePaneDimenson=this.convertPixelToNumber(this.previousPaneHeightWidth.toString()),this.nextPaneDimension=this.convertPixelToNumber(this.nextPaneHeightWidth.toString())},t.prototype.checkCoordinates=function(e,t){var i=!0;return e===this.previousCoordinates.x&&t===this.previousCoordinates.y&&(i=!1),i},t.prototype.isCursorMoved=function(e){return"mouse"===this.getEventType(e.type)||!(0,a.isNullOrUndefined)(e.pointerType)&&"mouse"===this.getEventType(e.pointerType)?this.checkCoordinates(e.pageX,e.pageY):"msie"!==a.Browser.info.name?this.checkCoordinates(e.touches[0].pageX,e.touches[0].pageY):this.checkCoordinates(e.pageX,e.pageY)},t.prototype.getBorder=function(){this.border=0;var e="Horizontal"===this.orientation?(this.element.offsetWidth-this.element.clientWidth)/2:(this.element.offsetHeight-this.element.clientHeight)/2;this.border="chrome"!==a.Browser.info.name?this.border:e},t.prototype.onMouseMove=function(e){if(this.isCursorMoved(e)){this.getPaneDetails(),this.getPaneDimensions(),this.triggerResizing(e);var t,i=this.validateDraggedPosition(this.getSeparatorPosition(e),this.prePaneDimenson,this.nextPaneDimension);if(this.getBorder(),t="Horizontal"===this.orientation?this.element.getBoundingClientRect().left+i-this.currentSeparator.getBoundingClientRect().left+this.border:this.element.getBoundingClientRect().top+i-this.currentSeparator.getBoundingClientRect().top+this.border,this.nextPaneHeightWidth="string"==typeof this.nextPaneHeightWidth&&this.nextPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.nextPaneHeightWidth):parseInt(this.nextPaneHeightWidth,10),this.previousPaneHeightWidth="string"==typeof this.previousPaneHeightWidth&&this.previousPaneHeightWidth.indexOf("p")>-1?this.convertPixelToNumber(this.previousPaneHeightWidth):parseInt(this.previousPaneHeightWidth,10),this.prevPaneCurrentWidth=t+this.previousPaneHeightWidth,this.nextPaneCurrentWidth=this.nextPaneHeightWidth-t,this.validateMinMaxValues(),this.nextPaneCurrentWidth<0&&(this.nextPaneCurrentWidth=0),this.prevPaneCurrentWidth<0&&(this.prevPaneCurrentWidth=0),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth>this.totalWidth&&(this.nextPaneCurrentWidth<this.prevPaneCurrentWidth?this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth):this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth-this.totalWidth)),this.nextPaneCurrentWidth+this.prevPaneCurrentWidth<this.totalWidth){var s=this.totalWidth-(this.nextPaneCurrentWidth+this.prevPaneCurrentWidth);this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+s}this.calculateCurrentDimensions(),this.addStaticPaneClass();for(var n=0,l=0;l<this.paneSettings.length;l++)""===this.paneSettings[l].size?n+=1:""!==this.allPanes[l].style.flexBasis&&(this.paneSettings[l].size=this.allPanes[l].style.flexBasis);var r=n===this.allPanes.length;if(""!==this.previousPane.style.flexBasis||""!==this.nextPane.style.flexBasis||r)r?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,(0,a.addClass)([this.previousPane],v),this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v)):(""!==this.previousPane.style.flexBasis&&this.previousPane.classList.contains(v)&&(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth),""!==this.nextPane.style.flexBasis&&this.nextPane.classList.contains(v)&&(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth));else{var o=this.allPanes.length%this.allBars.length;this.prevPaneIndex===o?(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v)):this.nextPaneIndex===o?(this.previousPane.style.flexBasis=this.prevPaneCurrentWidth,(0,a.addClass)([this.previousPane],v)):(this.nextPane.style.flexBasis=this.nextPaneCurrentWidth,(0,a.addClass)([this.nextPane],v))}var h=""!==this.previousPane.style.flexBasis&&""!==this.nextPane.style.flexBasis;this.allPanes.length>2||!h||this.updateSplitterSize()}},t.prototype.validateMinRange=function(e,t){var i,s,n=null,l=0;return(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].min)||(n=this.paneSettings[e].min.toString()),(0,a.isNullOrUndefined)(n)||(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),t<(i=this.convertPixelToNumber(n))&&(l=t-i<=0?0:t-i,this.totalWidth=this.totalWidth-l,this.totalPercent=this.convertPixelToPercentage(this.totalWidth),s=i)),(0,a.isNullOrUndefined)(s)?t:s},t.prototype.validateMaxRange=function(e,t){var i,s,n=null;return(0,a.isNullOrUndefined)(this.paneSettings[e])||(0,a.isNullOrUndefined)(this.paneSettings[e].max)||(n=this.paneSettings[e].max.toString()),(0,a.isNullOrUndefined)(n)||(n.indexOf("%")>0&&(n=this.convertPercentageToPixel(n).toString()),t>(i=this.convertPixelToNumber(n))&&(this.totalWidth=this.totalWidth-(t-i),this.totalPercent=this.convertPixelToPercentage(this.totalWidth),s=i)),(0,a.isNullOrUndefined)(s)?t:s},t.prototype.validateMinMaxValues=function(){this.prevPaneCurrentWidth=this.validateMinRange(this.prevPaneIndex,this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.validateMinRange(this.nextPaneIndex,this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.validateMaxRange(this.prevPaneIndex,this.prevPaneCurrentWidth),this.nextPaneCurrentWidth=this.validateMaxRange(this.nextPaneIndex,this.nextPaneCurrentWidth)},t.prototype.equatePaneWidths=function(){var e;this.prevPaneCurrentWidth+this.nextPaneCurrentWidth>this.totalPercent&&(e=this.prevPaneCurrentWidth+this.nextPaneCurrentWidth-this.totalPercent,this.prevPaneCurrentWidth=this.prevPaneCurrentWidth-e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth-e/2+"%"),this.prevPaneCurrentWidth+this.nextPaneCurrentWidth<this.totalPercent&&(e=this.totalPercent-(this.prevPaneCurrentWidth+this.nextPaneCurrentWidth),this.prevPaneCurrentWidth=this.prevPaneCurrentWidth+e/2+"%",this.nextPaneCurrentWidth=this.nextPaneCurrentWidth+e/2+"%")},t.prototype.calculateCurrentDimensions=function(){this.updatePrePaneInPercentage||this.updateNextPaneInPercentage?(this.prevPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.prevPaneCurrentWidth))/10)),this.nextPaneCurrentWidth=Math.round(Number(Math.round(10*this.convertPixelToPercentage(this.nextPaneCurrentWidth))/10)),0===this.prevPaneCurrentWidth&&(this.nextPaneCurrentWidth=this.totalPercent),0===this.nextPaneCurrentWidth&&(this.prevPaneCurrentWidth=this.totalPercent),