/* @license Copyright (C) Exontrol. All rights reserved. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,e(t.exontrol||{}))}(this,function(t){"use strict";function e(t,e){function o(t){return t&&t.tfi&&s.IsS(t.tfi)&&(t.tfi=s.ToTFI(t.tfi)),t}return s.Inh(o(t),o(e))}function o(){return Math.max.apply(0,arguments)}function n(){return Math.min.apply(null,arguments)}function i(t,e,o){return null==t?~~o:s.s2F(t,e)}var r,s=s||window.exontrol,l=s.G;s.Def.Menu={},s.Shapes.Menu={dfitem:{normal:{},disabled:{opacity:.5},checked:{fillColor:"rgba(0,0,0,0.125)",frameColor:"rgba(0,0,0,0.25)",pad:-1},hover:{fillColor:"rgba(0,0,0,0.25)",frameColor:"rgba(0,0,0,0.5)",pad:-1},click:{fillColor:"rgba(0,0,0,0.30)",frameColor:"rgba(0,0,0,.55)",pad:-1},open:{fillColor:"rgba(0,0,0,0.30)",frameColor:"rgba(0,0,0,.55)",pad:-1}},dfcap:{normal:{formatText:s.DrawTextFormatEnum.exTextWordEllipsis}},dfsep:{normal:{fillColor:"rgba(0,0,0,0.20)"}},dfflat:{normal:{pad:-1,fillColor:"rgba(0,0,0,0.10)",frameColor:"rgba(0,0,0,0.5)"}},dfsub:{normal:{pad:-1,frameColor:"rgba(0,0,0,0.25)"}},dfarrow:{normal:{fillColor:"rgba(0,0,0,0.75)",primitive:"EllipticPolygon",pArg:{edges:3,startAngle:Math.PI/2}}},dfbarrow:{normal:{pArg:{startAngle:Math.PI}}}},s.Mrg(s,function(){function t(t,e){this.init(t,e)}function u(t,e,o){var n=null==t||s.IsS(t);if(this.rgCI=[],this.caption=n?null:t.caption,this.flags=n?null:t.flags,this.oP=e||null,this.id=void 0,this.autoID=0,null==this.oP)u.AutoID=0;else{var i=this.oP.rgCI;i.splice(null!=o?o:i.length,0,this),this.setAutoID()}u.AutoID+=10,this.set(n?t:t.subText)}function h(){this.rgO=new s.BiM}function a(t,e){this.oM=t,this.oI=e,this.size={width:0,height:0},this.oD=new h,this.rgVP=new s.M1,this.mI2I=e.dscnID(),this.oST=this.getTabs(),this.mVAg=null;var o=t.GetClientRect(),n=null;if(t.isWrap()&&(n={width:o[2],height:o[3]}),this.size=this.build(n),null!=n&&t.isScroll()&&t.getScrollClip()){var i=t.getScrollSize(!0);i&&(this.size.width+i>o[2]&&(n.width-=i),this.size.height+i>o[3]&&(n.height-=i),this.size=this.build(n))}}t.version="3.0",t.type="Menu",t.reqEsc=",()[]\\\"'=",t.escape=function(e){for(var o,n="",i=t.reqEsc,r=0,s=e.length;r=0&&(o="\\"+o),n+=o;return n},t.FlatEnum={exNormal:0,exShowFlat:1,exAlwaysFlat:2},t.GroupPopupEnum={exNoGroupPopup:0,exGroupPopup:1,exGroupPopupEqualWidth:16,exGroupPopupEqualHeight:32,exGroupPopupVertical:256},t.ArrangeItemsEnum={exArrangeItemsHorizontal:1,exArrangeItemsVertical:2,exArrangeItemsHideTopArrow:16,exArrangeItemsPopupAlign:32,exArrangeItemsWrap:256,exArrangeItemsScroll:512,exArrangeItemsAlignCenter:1024,exArrangeItemsAlignReverse:2048},t.ShowAsButtonEnum={exShowAsButtonNone:0,exShowAsButton:1,exShowAsSelectButton:17,exShowAsSelectButtonBottom:273,exShowAsSelectList:512},t.ShowCheckedAsSelectedEnum={exDisplayItemCheckDefault:0,exDisplayItemCheckHighlight:-1,exDisplayItemHighlight:1},t.DisplayTypeEnum={exDisplayNormal:0,exDisplayCheck:1,exDisplayRadio:2},t.ShowPopupAlignEnum={exShowPopupAlignNone:0,exShowPopupAlignDown:1,exShowPopupAlignRight:2},t.AlignContextMenuEnum={exLeftAlign:0,exCenterAlign:4,exRightAlign:8,exTopAlign:0,exVCenterAlign:16,exBottomAlign:32},t.CloseOnClickEnum={exCloseOnDefault:0,exCloseOnDisabled:1,exCloseOnSeparator:2,exCloseOnButton:4,exCloseOnCheck:8,exCloseOnRadio:16,exCloseOnState:24,exCloseOnAny:-1},t.Options={tfi:null,locked:null,readOnly:null,debug:null,wheelChange:null,items:null,criSize:null,criPad:null,criAlign:null,criFlat:null,pad:null,itemsPad:null,align:null,arrSize:null,arrangeItemsAs:null,subArrangeItemsAs:null,sepSize:null,btnPad:null,btnArrSize:null,show:null,scrollSize:null,scrollClip:null,scrollOpt:null,smoothSel:null,shapes:null,cursors:null,open:null,close:null,subOpen:null,subClose:null,outClose:null,popupRatio:null,closeOnClick:null,alignClient:null,alignContextMenu:null,allowToggleRadio:null,x:null,y:null},t.prototype.init=function(e,o){this.lI=0,this.lL=0,this.lUhI=0,this.bF=!1,this.handlers={oEF:null,oPM:null,oRI:null,rgF:null,oDI:null,oLyt:null,oLytVI:null},this.iLts(),this.oO=s.Cpy(t.Options),this.SetClientRect(e),s.CC.GetCanvas(e)&&this.SetCanvas(e),this.SetOptions(o||s.Def.Menu,!0),s.DPR.Reg(this),this.GetCanvas()||null==this.GetX()&&null==this.GetY()||this.Open()},s.SB.addProto(t.prototype),t.prototype.GetOptions=function(){return this.getRootMenu().oO},t.prototype.SetOptions=function(t,e){var o=!1;if(null!=t){var n=[],i=this.GetOptions();if(null!=i){for(var r in i){var l=t[r];void 0!==l&&(n.push(r),i[r]!==l&&(i[r]=s.CpV(l)))}if(e)for(var r in t)r in i||(i[r]=s.CpV(t[r]));(o=0!=n.length)&&(this.bU(),n.forEach(function(t){var e=s.setM(t);e in this&&this[e].call(this,i[t])},this),this.eU())}}return o},t.prototype.opt=function(t,e){var o=this.getRootMenu().GetOptions()[t];return null==o&&null==(o=s.Def.Menu[t])&&(o=e),o},t.prototype.GetCanvas=function(){return this.canvas},t.prototype.SetCanvas=function(t,e){this.isRootMenu()&&this.clearFloats(),null!=this.oScrollBar&&(this.oScrollBar.SetCanvas(null),this.oScrollBar=null),this.udefSts(this.oSts),this.oSts=null,this.resAO(),t=s.CC.GetCanvas(t),s.HP.removeEventListener("onchange",this,"onimg"),t&&s.HP.addEventListener("onchange",this,"onimg"),!e&&s.CC.SetCanvas(this,t),this.canvas=t,s.CC.GetCanvas(this.canvas)&&(this.Shortcuts=this.oSts=new s.Sts,this.defSts(this.oSts))},s.ComboBox&&(t.prototype.dCBl=function(t,e,o){var n=this.oSelI;o.oO.label=n&&o.label(n.hasImage(),this.getCaption(n))||""},t.prototype.cCB=function(t){var e,o=this.e2M(t),n=!o||!o.item;return n||o&&(e=o.item)&&(n=!e.isPopup()&&!e.hasCheckRadio()),n},t.prototype.sCB=function(t){return t&&(this.oSelI=null),this.oSelI},t.prototype.SetCanvas=function(t,e){return s.ComboBox.implExHost(t,"onselect,oncheck,onuncheck")}(t.prototype.SetCanvas)),t.prototype.onimg=function(){this.Refresh()},t.prototype.SetClientRect=function(t){var e=s.CC.GetCanvas(t);e&&(t=[0,0,e.width,e.height]),this.client=s.C2R(t),this.visAO()||this.resAO(),this.onRL()},t.prototype.GetClientRect=function(){return this.client.slice()},t.prototype.GetCanvasRect=function(){var t=this.GetClientRect(),e=this.GetCanvas();return null!=e&&(t=[0,0,e.width,e.height]),t},t.prototype.GetVisibleRect=function(){return s.NRt(this.GetClientRect(),this.GetCanvasRect())},t.prototype.GetViewRect=function(){return s.EArtC(this.GetCanvas())},t.prototype.c2V=function(t,e){var o,n=t,i=e,r=this.GetViewRect();return 1==arguments.length&&(o=arguments[0],n=l.X(o),i=l.Y(o)),{x:n+r[0],y:i+r[1]}},t.prototype.v2C=function(t,e){var o,n=t,i=e,r=this.GetViewRect();return 1==arguments.length&&(o=arguments[0],n=l.X(o),i=l.Y(o)),{x:n-r[0],y:i-r[1]}},t.prototype.c2Vrt=function(t){var e=this.c2V(t);return[e.x,e.y,t[2],t[3]]},t.prototype.v2Crt=function(t){var e=this.v2C(t);return[e.x,e.y,t[2],t[3]]},t.prototype.postrfhAO=function(){if(this.GetCanvas()){var t=this;setTimeout(function(){t.rfhAO()},0)}},t.prototype.invAll=function(){this.reverseForEachFloatMenu(function(t){t.rfhAO()}),this.rfhAO()},t.prototype.asDisabled=function(t){return!this.isSelectable()||t.asDisabled()},t.prototype.asSelectable=function(t){return!!this.isSelectable()&&t.isSelectable()},t.prototype.setAO=function(t){if(this.visAO()){var e,o=!0;this.oEF?e=this.oEF.oAO:(e=t.gAO())&&(o=!1,!e.lU&&this.onSetAO(e),e.hasOf(this)&&e.onDrawAO(this.drawAO,this)),o&&this.drawAO(t,e)}else this.resAO()},t.prototype.isAM=function(t,e){function o(t,e){var o=t.v2C(e);return s.PInR(o.x,o.y,t.GetVisibleRect())}var n=this.c2V(t,e),i=o(this,n);return this.reverseForEachFloatMenu(function(t){if(o(t,n))return i=this==t,!0},this),i},t.prototype.isAP=function(t,e){var o;return this.isEnabled()&&((o=this.W())?o.isAP(t,e):this.isAM(t,e))},t.prototype.gPtr=function(t){var e=s.e2P(t);return e=s.pS2T(e,t.target,this.GetCanvas())},t.prototype.updateHoverItem=function(t,e){var o=null;if(null!=t&&this.e2FM(t)==this){var n=this.itemFromPointer(this.gPtr(t));null!=(o=null!=n?n.item:null)&&o==this.getDisplayItem()&&(o=null)}if(o!=this.oHoverItem){this.oHoverItem=o;var i=this,r=this.getRootMenu();0==r.lUhI++&&this.feM(function(e){e!=this&&(e.updateHoverItem(t,!1),null!=e.oHoverItem&&(i=e))},this),r.lUhI--,(null==e||e)&&setTimeout(function(){i.onHoverItem(i.oHoverItem),i.invAll()})}},t.prototype.onmousemove=function(t){this.updateHoverItem(t);var e,o=this.gPtr(t),n=this.getCursor(o);return(e=this.GetCanvas())&&(e.style.cursor=n||"auto"),n},t.prototype.onmouseover=function(t){},t.prototype.onmouseout=function(t){this.updateHoverItem(t)},t.prototype.onwheel=function(t){var e=this.isSelectable();if(e){e=null!=this.oScrollBar||p.Is(this);var o=this.gPtr(t);null!=o&&s.PInR(o.x,o.y,this.GetClientRect())&&this.dowheel(t)}return e},t.prototype.dowheel=function(t){var e=!1;if(s.WhelInc(t)&&null!=this.oScrollBar){var o=this.getWheelChange();if(o)for(var n=0;n=0&&(i=!t.call(e,n[s],s+1));s--);i&&t.call(e,o,0)}},t.prototype.reverseForEachFloatMenu=function(t,e){if(t instanceof Function){e=e||this;var o=this.getRootMenu().handlers.rgF;if(null!=o)for(var n=o.length,i=n-1;i>=0&&!t.call(e,o[i],i);i--);}},t.prototype.getFloatPopup=function(t){var e=null;return null!=t&&t.isPopup()&&this.reverseForEachFloatMenu(function(o){if(o.handlers.oDI==t)return e=o,!0}),e},t.prototype.getItemFloatLevel=function(t){var e=-1;return null==t?e=this.getFloatLevel():this.feM(function(o,n){if(function(t,e){return null!=t.getItemRect(e)}(o,t))return e=n,!0}),e},t.prototype.getFloatLevel=function(){var t=-1;return this.feM(function(e,o){if(e==this)return t=o,!0},this),t},t.prototype.resetHandlers=function(){for(var t in this.handlers)this.handlers[t]=null},t.prototype.getParentMenu=function(){return this.handlers.oPM},t.prototype.isRootMenu=function(){return null==this.getParentMenu()},t.prototype.isTopMenu=function(){return this==this.getTopMenu()},t.prototype.clearFloats=function(t){var e=this.getRootMenu(),n=e.handlers.rgF;if(n){var i=n.length;if(i>0){var r=o(0,t=t||0);if(r=r;u--){var h=n[u];e.saveScrollPos(h),h.SetCanvas(null),s.EF.Destroy(h.handlers.oEF),l.push(h)}n.splice(t),e.endFloat(),e.invAll(),l.length&&l.forEach(function(t){e.onCloseFloatMenu(t),t.resetHandlers()})}}}},s.Def.CN.floatMenu="exmenu",t.prototype.addFloat=function(e){var o=!0,n=null,i=this.getRootMenu(),r=null!=e&&e.isPopup(),l=this.getItemFloatLevel(e),u=i.getFloatCount();if(r&&u&&u==l+1){var h=this.getFloatPopup(e);h==i.getFloat(l)&&(o=!1,n=h)}if(o){if(i.beginFloat(),this.clearFloats(l),r){var a,p,c,f,g=this.getItemRect(e),v=null==e.oP;if(g?g=this.c2Vrt(s.NRt(g,this.GetVisibleRect())):v&&(g=[this.getX(),this.getY()||0,0,0]),g&&(a=this.CSSzom(),i.handlers.rgF=i.handlers.rgF||[],p=s.EF.Create({tag:"canvas",pointerEvents:"",class:s.Def.CN.floatMenu+" "+s.Def.CN.ppEF,inner:{style:{zoom:a}}}))){c=p.oHE,f=this.getAlignClient(),n=new t(c),i.handlers.rgF.push(n),n.handlers.oEF=p,n.handlers.oPM=this,n.handlers.oRI=this.getRootItem(),n.handlers.oDI=e,n.SetClientRect(c);var m=s.pgrt(),y=this.getPopupSize(m,n.Lyt().size),d=e.getPopupRect(this,g,y);s.IRt(m,-8,-8);var S=s.IBox(d,c);if(f||s.ORt(S,-(S[0]-d[0]),-(S[1]-d[1])),v){var C=f?d:S,P=this.getAlignContextMenu(),I=P&t.AlignContextMenuEnum.exCenterAlign?2:P&t.AlignContextMenuEnum.exRightAlign?1:0,A=P&t.AlignContextMenuEnum.exVCenterAlign?2:P&t.AlignContextMenuEnum.exBottomAlign?1:0;s.ORt(S,I?-C[2]/I:0,A?-C[3]/A:0)}if(a)for(var R=0;R<4;R++)m[R]/=a;if(s.FRt(S,m),s.ORt(d,S[0]-d[0],S[1]-d[1]),s.BOf(S)>s.BOf(g)){var w=s.NRt(g,s.IBox(S,c,-1));s.EyR(w)||(S[1]=s.BOf(g),s.FRt(S,m),s.ORt(d,S[0]-d[0],S[1]-d[1]))}p.SetClient(d),n.lL++,n.handlers.oLytVI=null,n.SetClientRect(c),n.lL--,i.restoreScrollPos(n),n.inv(),this.postrfhAO()}}i.endFloat(),null!=n&&(i.onfloat(n),setTimeout(function(){i.onOpenFloatMenu(n)}))}return n},t.prototype.getFloatCount=function(){return this.handlers.rgF&&this.handlers.rgF.length||0},t.prototype.getFloat=function(t){return t>=0&&null!=this.handlers.rgF&&t0){var e=t[0];if(null!=e)return e.handlers.oDI==e.handlers.oRI}return!1},t.prototype.onFloatCountChange=function(){p.OnFloatCountChange(this),this.lockScrollBars()},t.prototype.doLockScrollBars=function(){var t=this.getActiveMenu();this.feM(function(e){var o=e.oScrollBar;null!=o&&o.SetLocked(e!=t)})},t.prototype.lockScrollBars=function(){this.nTimeoutLockSBS&&clearTimeout(this.nTimeoutLockSBS);var t=this.getRootMenu();this.nTimeoutLockSBS=setTimeout(function(){t.doLockScrollBars()})},t.prototype.onRL=function(t){(null==t||t)&&this.resAO(),this.sShs=null,this.sCrs=null,this.bDebug=null,this.lL||(this.oHoverItem=null,this.handlers.oLytVI=null,this.handlers.oLyt=null),this.onRecalcScrollBar()},t.prototype.onRecalcScrollBar=function(){var t=!1;if(this.isScroll()){var e=this.getScrollRange();if(t=0!=e){if(null==this.oScrollBar){this.oScrollBar=new s.ScrollBar(this.GetCanvas(),this.getScrollOpt()),this.oScrollBar.SetIgnoreLargeChange(!1);var o=this.oScrollBar.onchange,n=this;this.oScrollBar.onchange=function(){o.call(this),n.onscroll(this)},this.oScrollBar.SetScrollRect=this.oScrollBar.SetClientRect,this.oScrollBar.SetClientRect=function(t){}}s.CC.SetZOrd(this.oScrollBar,s.CC.GetZOrd(this)+1);var i=this.GetClientRect().slice();this.isScrollVertical()?(i[0]=s.ROf(i)-this.getScrollSize(),i[2]=this.getScrollSize()):(i[1]=s.BOf(i)-this.getScrollSize(),i[3]=this.getScrollSize()),this.oScrollBar.SetScrollRect(i),this.oScrollBar.SetInfo({range:e,page:this.getScrollPage()})}}t||null!=this.oScrollBar&&(this.oScrollBar.SetCanvas(null),this.oScrollBar=null)},t.prototype.onscroll=function(t){this.resAO(),this.handlers.oLytVI=null,this.bF=!1,this.clearFloats(this.getFloatLevel())},t.prototype.onSetAO=function(t){var e=this.getVisibleItems();if(null!=e&&!t.hasOf(this)&&this.isSelectable()){var o=this.getSmoothSel();e.forEach(function(e,n){e.forEach(function(e,i){var r=this.getPartShapes(n,i,!1);r&&(!s.EyO(r.hover)&&t.set({owner:this,id:this.idAOfH(n,i),item:n,part:i,inv:this.inv,hitTest:function(t,e,o){return!!this.isAP(t,e)&&null!=this.ptInPart(t,e,o.item)},duration:o}),!s.EyO(r.click)&&t.set({owner:this,id:this.idAOfC(n,i),item:n,part:i,inv:this.inv,hitTest:function(t,e,o){return!!this.isAP(t,e)&&null!=this.ptInPart(t,e,o.item)},actOn:4,duration:o}))},this)},this)}},t.prototype.BeginUpdate=function(){this.lI++,s.AO.tlA(this.gAO(),!0)},t.prototype.bU=t.prototype.BeginUpdate,t.prototype.EndUpdate=function(){--this.lI||(this.rfhAO(),s.AO.tlA(this.gAO(),!1))},t.prototype.eU=t.prototype.EndUpdate,t.prototype.Update=function(t,e){this.bU(),t&&t.call(e||this),this.eU()},t.prototype.GetClipRect=function(){var t=this.GetClientRect();if(null!=this.oScrollBar&&this.getScrollClip()){var e=this.getScrollSize();e&&(t[s[this.isScrollVertical()?"w":"h"]]-=e)}return t},t.prototype.getOrigin=function(t){var e={x:(t=t||this.GetClientRect())[0],y:t[1]},o=this.getScrollPos();return o&&(e[this.isScrollVertical()?"y":"x"]-=o),e},t.prototype.drawItem=function(t,o,n,i){function r(t,o,n){var i=t.gAO(),r=this,l=this.asDisabled(o),h=this.isOpenItem(o);n.forEach(function(n,a){!function(n,l,a){var p,c=(n=n||{}).normal||n;o.asChecked(r)&&(s.EyO(n.checked)||(c=e(n.checked,c))),r.asDisabled(o)?s.EyO(n.disabled)||(c=e(n.disabled,c)):o.isSeparator()||i&&(s.EyO(n.hover)||(p=i.get(r,r.idAOfH(o,l)))&&(c=s.R.Shape(p.state,p.range,{from:c,to:n.hover})),h?s.EyO(n.open)?s.EyO(n.click)||(c=e(n.click,c)):c=e(n.open,c):s.EyO(n.click)||(p=i.get(r,r.idAOfC(o,l)))&&(c=s.R.Shape(p.state,p.range,{from:c,to:n.click})));var f={object:o,part:l,state:o.getState()};switch(l){case u.PartEnum.exCaption:f.text=r.getCaption(o),f.formatText=(c?c.formatText:0)||0;break;case u.PartEnum.exImage:var g=o.hasImage();g&&(f.text=""+g+":"+a[2]+":"+a[3]+"",f.formatText=0)}t.drawShape(a,c,f)}(this.getPartShapes(o,a,l),a,n)},this)}var l=t.asDisabled(n);l&&s.H.lA++,r.call(t,o,n,i),l&&--s.H.lA},t.prototype.draw=function(t,e,o){var n=this.getVisibleItems(),i=this.getRootMenu();n&&(t.selClip(this.GetClipRect()),n.forEach(function(e,o){i.drawItem(this,t,o,e)},this),t.resClip())},t.prototype.getAOMaskID=function(t,e){var o="menu.hitTest.*.";return null==e&&(e="*"),o+=null!=t?this.Lyt().op2k(t,e):"*:"+e},t.prototype.idAOfH=function(t,e){return"menu.hitTest.hover."+this.Lyt().op2k(t,e)},t.prototype.idAOfC=function(t,e){return"menu.hitTest.click."+this.Lyt().op2k(t,e)},t.prototype.isOpenItem=function(t){var e=!1;if(null!=t&&t.isPopup()&&null!=this.getFloatPopup(t)&&(!this.oHoverItem||this.oHoverItem==t)){e=!0;var o=this.getParentMenu();null!=o&&(e=o.isOpenItem(this.getDisplayItem()))}return e},t.prototype.GetTfi=function(){return this.GetOptions().tfi},t.prototype.SetTfi=function(t){this.bU(),this.GetOptions().tfi=t||null,this.onRL(),this.eU()},t.prototype.getTfi=function(){return this.opt("tfi")},t.prototype.GetLocked=function(){return this.GetOptions().locked},t.prototype.SetLocked=function(t){this.bU(),this.GetOptions().locked=t,this.onRL(),this.eU()},t.prototype.getLocked=function(){return this.opt("locked",!1)},t.prototype.GetReadOnly=function(){return this.oO.readOnly},t.prototype.SetReadOnly=function(t){this.bU(),this.oO.readOnly=t,this.onRL(),this.eU()},t.prototype.isReadOnly=function(){return this.opt("readOnly",!1)},t.prototype.GetDebug=function(){return this.GetOptions().debug},t.prototype.SetDebug=function(t){this.bU(),this.GetOptions().debug=t,this.onRL(),this.eU()},t.prototype.getDebug=function(){var t=this.bDebug;return null==t&&(t=this.opt("debug",!1),this.bDebug=t),t},t.prototype.GetWheelChange=function(){return this.GetOptions().wheelChange},t.prototype.SetWheelChange=function(t){this.bU(),this.GetOptions().wheelChange=t,this.onRL(),this.eU()},t.prototype.getWheelChange=function(){return this.opt("wheelChange",1)},t.prototype.GetPad=function(){return this.GetOptions().pad},t.prototype.SetPad=function(t){this.bU(),this.GetOptions().pad=t,this.onRL(),this.eU()},t.prototype.GetItemsPad=function(){return this.GetOptions().itemsPad},t.prototype.SetItemsPad=function(t){this.bU(),this.GetOptions().itemsPad=t,this.onRL(),this.eU()},t.prototype.GetCriSize=function(){return this.GetOptions().criSize},t.prototype.SetCriSize=function(t){this.bU(),this.GetOptions().criSize=t,this.onRL(),this.eU()},t.prototype.getCriSize=function(){return o(0,s.ToN(this.opt("criSize",16),0))},t.prototype.getFlatWidth=function(){var t=[0,0,this.getCriSize(),0];return s.PRt(t,this.getDisplayItem().getPad(this)),s.PRt(t,this.getCriPad()),t[2]},t.prototype.GetCriPad=function(){return this.GetOptions().criPad},t.prototype.SetCriPad=function(t){this.bU(),this.GetOptions().criPad=t,this.onRL(),this.eU()},t.prototype.getCriPad=function(){return s.pad2A(this.opt("criPad",[0,0]))},t.prototype.GetCriAlign=function(){return this.GetOptions().criAlign},t.prototype.SetCriAlign=function(t){this.bU(),this.GetOptions().criAlign=t,this.onRL(),this.eU()},t.prototype.getCriAlign=function(){return!!this.opt("criAlign",!1)},t.prototype.GetCriFlat=function(){return this.GetOptions().criFlat},t.prototype.SetCriFlat=function(t){this.bU(),this.GetOptions().criFlat=t,this.onRL(),this.eU()},t.prototype.getCriFlat=function(){return i(this.opt("criFlat"),t.FlatEnum,t.FlatEnum.exShowFlat)},t.prototype.GetAlign=function(){return this.GetOptions().align},t.prototype.SetAlign=function(t){this.bU(),this.GetOptions().align=t,this.onRL(),this.eU()},t.prototype.getAlign=function(){var e=this.getArrangeItemsAs();return t.ArrangeItemsEnum.exArrangeItemsAlignCenter==(e&t.ArrangeItemsEnum.exArrangeItemsAlignCenter)?1:t.ArrangeItemsEnum.exArrangeItemsAlignReverse==(e&t.ArrangeItemsEnum.exArrangeItemsAlignReverse)?2:s.ToI(this.GetAlign(),-1)},t.prototype.GetArrSize=function(){return this.GetOptions().arrSize},t.prototype.SetArrSize=function(t){this.bU(),this.GetOptions().arrSize=t,this.onRL(),this.eU()},t.prototype.getArrSize=function(){return o(0,s.ToN(this.opt("arrSize",6),0))},t.prototype.GetArrangeItemsAs=function(){return i(this.GetOptions().arrangeItemsAs,s.Menu.ArrangeItemsEnum)},t.prototype.SetArrangeItemsAs=function(t){this.bU(),this.GetOptions().arrangeItemsAs=t,this.onRL(),this.eU()},t.prototype.GetSubArrangeItemsAs=function(){return i(this.GetOptions().subArrangeItemsAs,s.Menu.ArrangeItemsEnum)},t.prototype.SetSubArrangeItemsAs=function(t){this.bU(),this.GetOptions().subArrangeItemsAs=t,this.onRL(),this.eU()},t.prototype.getArrangeItemsAs=function(){return this.opt(this.isTopMenu()?"arrangeItemsAs":"subArrangeItemsAs",t.ArrangeItemsEnum.exArrangeItemsVertical|t.ArrangeItemsEnum.exArrangeItemsScroll|t.ArrangeItemsEnum.exArrangeItemsPopupAlign)},t.prototype.GetSepSize=function(){return this.GetOptions().sepSize},t.prototype.SetSepSize=function(t){this.bU(),this.GetOptions().sepSize=t,this.onRL(),this.eU()},t.prototype.getSepSize=function(){return o(0,s.ToN(this.opt("sepSize",1),0))},t.prototype.GetBtnPad=function(){return this.GetOptions().btnPad},t.prototype.SetBtnPad=function(t){this.bU(),this.GetOptions().btnPad=t,this.onRL(),this.eU()},t.prototype.getBtnPad=function(){return s.pad2A(this.opt("btnPad",[2,2]))},t.prototype.GetBtnArrSize=function(){return this.GetOptions().btnArrSize},t.prototype.SetBtnArrSize=function(t){this.bU(),this.GetOptions().btnArrSize=t,this.onRL(),this.eU()},t.prototype.getBtnArrSize=function(){return o(0,s.ToN(this.opt("btnArrSize",6),0))},t.prototype.GetShow=function(){return this.GetOptions().show},t.prototype.SetShow=function(t){this.bU(),this.GetOptions().show=t,this.onRL(),this.eU()},t.prototype.GetScrollSize=function(){return this.GetOptions().scrollSize},t.prototype.SetScrollSize=function(t){this.bU(),this.GetOptions().scrollSize=t,this.onRL(),this.eU()},t.prototype.getScrollSize=function(t){return null==this.oEF||t?o(0,s.ToN(this.opt("scrollSize",8),0)):0},t.prototype.GetScrollClip=function(){return this.GetOptions().scrollClip},t.prototype.SetScrollClip=function(t){this.bU(),this.GetOptions().scrollClip=t,this.onRL(),this.eU()},t.prototype.getScrollClip=function(){return!!this.opt("scrollClip",!1)},t.prototype.GetScrollOpt=function(){return this.GetOptions().scrollOpt},t.prototype.SetScrollOpt=function(t){this.bU(),this.GetOptions().scrollOpt=t,this.onRL(),this.eU()},t.prototype.getScrollOpt=function(){return this.opt("scrollOpt",null)||{visibleParts:"t,b",cursors:"pointer(t,lo,b,up)",horizonalShapes:"tRange(t),range(b)",verticalShapes:"tRange(t),range(b)",wheelChange:16}},t.prototype.GetShapes=function(){return this.GetOptions().shapes},t.prototype.SetShapes=function(t){this.bU(),this.GetOptions().shapes=t,this.onRL(),this.eU()},t.prototype.getShapes=function(){var t=this.sShs;return null==t&&(null==(t=this.GetShapes())&&(t=s.Def.Menu.shapes),t=s.ToS(t,"dfitem(item),dfcap(cap),dfsep(sep),dfflat(flat),dfsub(sub),Radio(rad),CheckBox(chk),Button(btn),dfarrow(arr,rarr,barr),dfbarrow(barr)"),this.sShs=t),t},t.prototype.getTypeShape=function(t,e){if(null!=e){var o=this.getShapes();if(null!=t){var n=t.getShapes();null!=n&&(o=n)}return s.S.GetOf(e.toLowerCase(),o,"Menu")}return null},t.prototype.getPartShapes=function(t,o,n){var i=this.getTypeShape(t,o);return n&&o!=u.PartEnum.exItem&&(i=e(i,this.getTypeShape(t,u.PartEnum.exItem))),i},t.prototype.GetCursors=function(){return this.GetOptions().cursors},t.prototype.SetCursors=function(t){this.bU(),this.GetOptions().cursors=t,this.onRL(),this.eU()},t.prototype.getCursors=function(){var t=this.sCrs;return null==t&&(null==(t=this.GetCursors())&&(t=s.Def.Menu.cursors),t=s.ToS(t,"pointer(chk,rad,btn,anchor)"),this.sCrs=t),t},t.prototype.getCursor=function(t){var e,o,n,i,r,l=this.getCursors();if(this.isSelectable()&&!this.isReadOnly())if(!s.H.lA&&this.p2A(t))n=s.GP.Get("anchor",l);else if(e=this.itemFromPointer(t),(o=e&&e.item)&&(r=o.getCursors())&&(l=r),i=this.partsFromPointer(t))for(var u=0,h=i.length;!n&&ui}return t},t.prototype.getScrollRange=function(){var t=0,e=this.Lyt();return null!=e&&(t=this.isScrollVertical()?e.size.height:e.size.width)<=this.getScrollPage()&&(t=0),t},t.prototype.getScrollPage=function(){var t=this.GetClientRect();return this.isScrollVertical()?t[3]:t[2]},t.prototype.getScrollPos=function(){var t=0;return null!=this.oScrollBar&&(t=this.oScrollBar.GetValue()),t},t.prototype.setScrollPos=function(t){if(null!=this.oScrollBar){var e=this.oScrollBar.GetValue();return this.oScrollBar.SetValue(t),e!=this.oScrollBar.GetValue()}return!1},t.prototype.getID=function(){var t=0,e=this.getDisplayItem();return null!=e&&(t=e.getID()),t},t.prototype.saveScrollPos=function(t){this.rgFloatScrollPos=this.rgFloatScrollPos||new Map,this.rgFloatScrollPos.set(t.getID(),t.getScrollPos())},t.prototype.restoreScrollPos=function(t){null!=this.rgFloatScrollPos&&t.setScrollPos(this.rgFloatScrollPos.get(t.getID())||0)},t.prototype.isRURScrollEvent=function(t,e){var o=0;if(null!=this.oScrollBar){var n=this.gPtr(t);if(null!=n){e=e||this.GetVisibleRect();var i=n.x,r=s.LOf(e),l=s.ROf(e),u=n.y,h=s.TOf(e),a=s.BOf(e);if(this.isScrollVertical())ua&&(o=+Math.ceil((u-a)/16));else if(i(l=s.ROf(e))&&(o=+Math.ceil((i-l)/16))}}}return o},t.prototype.rurScroll=function(t,e){if(null!=this.oScrollBar){s.Ptr.SetTargExclPad(this.GetCanvas());var o=this.isRURScrollEvent(t,e);if(s.Ptr.ResTargExclPad(),0!=o&&this.setScrollPos(this.getScrollPos()+o))return this}return null},t.prototype.getRootMenu=function(){for(var t=this,e=null;e=t.handlers.oPM;)t=e;return t},t.prototype.getTopMenu=function(){var t=this.getRootMenu();return this.isCM()&&(t=t.handlers.rgF[0]),t},t.prototype.getRootItem=function(){var t=this.getRootMenu();return null==t.handlers.oRI&&(t.handlers.oRI=new u(t.GetOptions().items)),t.handlers.oRI},t.prototype.getDisplayItem=function(){return this.isRootMenu()?this.getRootItem():this.handlers.oDI},t.prototype.getDisplayPath=function(){var t=[],e=this.getDisplayItem();return null!=e&&(t=e.getPath()),t},t.prototype.Lyt=function(){if(0==this.lL++&&null==this.handlers.oLyt){var t=this.gCtx(),e=null;t&&(e=s.TFI.bCTX(t,this.getTfi())),this.handlers.oLyt=new a(this,this.getDisplayItem()),this.onlayoutchange(this.handlers.oLyt),t&&s.TFI.eCTX(t,e)}return this.lL--,this.handlers.oLyt},t.prototype.onlayoutchange=function(t){this.oLts.onlayoutchange.do(t)},t.prototype.getVisibleItems=function(){var t=this.handlers.oLytVI;if(null==t){var e=this.Lyt();null!=e&&(t=e.getVisibleItems(this.GetClientRect(),this.getOrigin())),this.handlers.oLytVI=t}return t},t.prototype.GetItems=function(){var t="",e=this.getDisplayItem();return null!=e&&(t=e.save()),t},t.prototype.SetItems=function(t){var e=this.getRootMenu(),o=e.handlers.oRI;e.rgFloatScrollPos=null,this.GetOptions().items=null!=t?t:"";var n=[];if(null!=e.handlers.rgF&&e.handlers.rgF.forEach(function(t){n.push(t.getDisplayPath())}),null!=o&&e!=this){null!=(h=this.getDisplayItem())&&(h.load(t),e.GetOptions().items=o.save())}e.handlers.oRI=null,e.handlers.oLyt=null;var i=[],r=e.getRootItem();if(r)for(var s=!0,l=0,u=n.length;s&&l["+t.getID()+"]"),e},t.prototype.GetPopupRatio=function(){return this.GetOptions().popupRatio},t.prototype.SetPopupRatio=function(t){this.bU(),this.GetOptions().popupRatio=t,this.onRL(),this.eU()},t.prototype.getPopupRatio=function(){return this.opt("popupRatio",.5)},t.prototype.getPopupSize=function(t,e){var o=this.getPopupRatio(),i={width:e.width,height:e.height};if(o>0&&(i.width=n(i.width,t[2]*o),i.height=n(i.height,t[3]*o),this.isScroll()&&this.getScrollClip())){var r=this.getScrollSize();e.height>e.width?i.height=0&&null!=(n=t.split("\\"))&&1==n.length&&(n=null),null==n)o=e(i,t);else{o=i;for(var r=0,l=n.length;o&&ri+r||l+u>i+r)&&(i=l-r+n(r,u))}else{var h=s.LOf(o),a=o[2];hi+r||h+a>i+r)&&(i=h-r+n(r,a))}this.setScrollPos(i)}}return t},t.timeoutOC=32,t.prototype.Open=function(e){function o(t,e){if(t&&!s.EyR(t.GetViewRect())){t.bF=!0;for(var o=0,n=e.length;t&&o=0&&(o.splice(n,1),null!=t)){var i=s.B.split(t);i.length&&i.forEach(function(t){new u(t,e,n++)},this)}}},u.prototype.save=function(){var t="";if(t+=s.B.quoteC(this.caption),t+=s.B.quoteF(this.flags),this.rgCI.length){var e=[];this.rgCI.forEach(function(t){e.push(t.save())}),t+=s.B.quoteS(e,null!=this.oP)}return t},u.prototype.setAutoID=function(){null==this.getFlag(null,"id")&&(this.autoID=u.AutoID),this.id=this.getID()},u.prototype.getID=function(){return this.getFlag(null,"id",0)||this.autoID},u.prototype.getPathID=function(){return this.getID()||this.caption},u.prototype.getPath=function(){for(var t=[],e=this,o=null;null!=(o=e.oP);)t.push(e.getPathID()),e=o;return t.reverse(),t},u.prototype.findChildPathID=function(t){for(var e=null,o=0,n=this.rgCI.length;!e&&o0},u.opt=function(t,e,o){return null!=t?t.opt(e,o):o},u.prototype.getFlag=function(t,e,o){var n=o;if(null!=t&&(n=u.opt(t,e,o)),null!=this.flags){var i=this.flags.get(e.toLowerCase());if(void 0!==i){if(null!=i){var r=s.P(i);r.eatSpace(),(r.getHexa()||r.getNumber())&&(r.continue()||(i=r.result))}n=i}}return n},u.prototype.getFlagA=function(t,e,o){var n=void 0;if(null!=e)for(var i=e.split(","),r=0,s=i.length;void 0===n&&r0},u.prototype.hasCaption=function(){return null!=this.caption&&this.caption.toString()},u.prototype.isVisible=function(){var t=this.hasCaption()||this.hasFlags()||this.hasItems();if(t){var e=this.getFlag(null,"hid");if(void 0!==e&&(t=!!parseInt(e)),t){var o=this.hasWidth();if(null!=o&&(t=o>0),t){var n=this.hasHeight();null!=n&&(t=n>0)}}}return!!t},u.prototype.setVisible=function(t){this.setFlag("hid",t?void 0:null)},u.prototype.hasCaptionWidth=function(){var t=this.getFlagA(null,"captionWidth,cw");return void 0!==t&&(t=parseInt(t)||0)>=0?t:null},u.prototype.hasCaptionHeight=function(){var t=this.getFlagA(null,"captionHeight,ch");return void 0!==t&&(t=parseInt(t)||0)>=0?t:null},u.prototype.hasHeight=function(){var t=this.getFlag(null,"height");return void 0!==t&&(t=parseInt(t)||0)>=0?t:null},u.prototype.hasWidth=function(){var t=this.getFlag(null,"width");return void 0!==t&&(t=parseInt(t)||0)>=0?t:null},u.prototype.hasSize=function(){return null!=this.hasWidth()||null!=this.hasHeight()},u.prototype.hasButton=function(){var e=null;return this.isSeparator()||void 0===(e=this.getFlag(null,"button"))||null!=e?e||null:t.ShowAsButtonEnum.exShowAsButton},u.prototype.showPopupOnChecked=function(){var t=this.getFlag(null,"spchk");return void 0!==t&&(t=!(null!=t&&!t)),t||!1},u.prototype.showCheckedAsSelected=function(e){return~~this.getFlag(e,"show",t.ShowCheckedAsSelectedEnum.exDisplayItemCheckDefault)},u.prototype.isEnabled=function(){function t(t){var e=t.getFlag(null,"dis");return void 0!==e&&(e=!e),!e}for(var e=this,o=!1;(o=t(e))&&e.oP;)e=e.oP;return o},u.prototype.setEnabled=function(t){this.setFlag("dis",t?void 0:null)},u.prototype.showAsDisabled=function(){function t(t){var e=t.getFlag(null,"showDis");return void 0!==e&&(e=!e),e||!1}for(var e=this,o=!1;!(o=t(e))&&e.oP;)e=e.oP;return o},u.prototype.asDisabled=function(){return!this.isEnabled()||this.showAsDisabled()},u.prototype.hasTab=function(){return this.getFlag(null,"tab",null)},u.prototype.isSelectable=function(){var t=!1;return this.isSeparator()||(t=this.isEnabled()),t},u.prototype.getShapes=function(){var t=this.getFlag(null,"shapes");return void 0!==t?null!=t?t.toString():"":null},u.prototype.getCursors=function(){var t=this.getFlag(null,"cursors");return void 0!==t?null!=t?t.toString():"":null},u.prototype.getClose=function(){return this.getFlag(null,"close",null)},u.prototype.toString=function(){var t=null!=this.caption?this.caption.toString():"";return t&&(t+=" "),t+="["+this.getPath().join("\\")+"]"},u.prototype.getShowPopupAlign=function(e,o){var n=this.getFlagA(null,"popupalign,pa");if(void 0===n){var i=this.hasButton();if(t.ShowAsButtonEnum.exShowAsSelectButtonBottom==(i&t.ShowAsButtonEnum.exShowAsSelectButtonBottom)&&(n=t.ShowPopupAlignEnum.exShowPopupAlignDown),void 0===n&&null!=e&&e.isPopupAlign()){n=t.ShowPopupAlignEnum.exShowPopupAlignDown,e.isV()&&(n|=t.ShowPopupAlignEnum.exShowPopupAlignRight);var r=e.getItemRect(this);if(null!=r){var l=[s.ROf(r),s.TOf(r),o.width,o.height],u=[s.LOf(r),s.BOf(r),o.width,o.height],h=e.itemsFromRect(l),a=e.itemsFromRect(u);h&&!a?n=t.ShowPopupAlignEnum.exShowPopupAlignDown:a&&!h&&(n=t.ShowPopupAlignEnum.exShowPopupAlignDown|t.ShowPopupAlignEnum.exShowPopupAlignRight)}}}return s.ToI(n,t.ShowPopupAlignEnum.exShowPopupAlignRight|t.ShowPopupAlignEnum.exShowPopupAlignDown)},u.prototype.getPopupRect=function(e,o,n){var i=this.getShowPopupAlign(e,n),r=[o[0],o[1]-n.height,n.width,n.height];if(i){var l=i&t.ShowPopupAlignEnum.exShowPopupAlignDown,u=i&t.ShowPopupAlignEnum.exShowPopupAlignRight;l?u?(r[0]=s.ROf(o),r[1]=s.TOf(o)):r[1]=s.BOf(o):u&&(r[0]=s.ROf(o),r[1]=s.BOf(o)-n.height)}return r},u.prototype.forEachU=function(t,e){var o;e=e||this;for(var n,i=this.rgCI,r=0,s=i.length;!o&&r0){var o=this.rgO.getKey(parseInt(t.substr(0,e)));if(null!=o)return{o:o,p:t.substr(e+1)}}}},a.prototype.getTabs=function(){var t={source:new Map,target:new Map};return this.mI2I.forEach(function(e){var o=function(t,e){if(e.getGroupPopup()){var o=e.hasTab();if(null!=o){var n=t.mI2I.get(o);if(n!=e)return n}}return null}(this,e);if(null!=o){t.source.set(e,o);var n=t.target.get(o);null==n&&t.target.set(o,n=[]),n.push(e)}},this),t.source.size?t:null},a.prototype.op2k=function(t,e){return this.oD.op2k(t,e)},a.prototype.k2op=function(t){return this.oD.k2op(t)},a.prototype.targetGroupPopup=function(t){var e=null,o=this.oST;if(null!=o){var n=o.target.get(t);if(null!=n)for(var i=0,r=n.length;!e&&i0&&r.oM.getCriFlat()){var h=s.get("e-flat");null!=h&&null==s.get(u.PartEnum.exCheck)&&null==s.get(u.PartEnum.exRadio)&&null==s.get(u.PartEnum.exImage)&&h.forEach(function(t){var n=r.k2op(t).o,i=r.op2k(n,"e-cri");o.remove(t),o.remove(i);var s=e.get(n);if(null!=s){var l=s.get(t)[2]+2*n.getPad()[0];s.remove(t),s.remove(i);var h=s.get(r.op2k(n,u.PartEnum.exItem));null!=h&&(h[0]+=l,h[2]-=l),s.offset(-l,0)}})}}}(this);var r=a.getUnionBuildItems(e,n);return null!=r&&(t?this.extItemsWidth(o,n,r[2]):this.offItemsHeight(e,n,r[3]),this.extItemsSep(t,o,n,r)),r},a.prototype.build=function(e){function n(t,e){return v.op2k(t,e)}function i(){return{width:g.getArrSize(),height:g.getArrSize()}}function r(e){if(v.isV(e)&&e==f)switch(g.getCriFlat()){case t.FlatEnum.exShowFlat:return e.itemsShowCRI(g);case t.FlatEnum.exAlwaysFlat:return!0}return!1}function l(t){var e=v.k2op(t);return!e||e.p.sWith("e-")}function h(o){var l=new s.M1,h=v.isV(o),a=0,c=0,m=0,y=null;if(v.getItems(o).forEach(function(t){var e=I.get(t);null==e&&I.set(t,e=p(t)),e.origin(),y=s.URts(y,e.union())}),null!=y){var d=v.isGroupPopupEqualSize(o);if(d){var S={width:d&t.GroupPopupEnum.exGroupPopupEqualWidth?y[2]:null,height:d&t.GroupPopupEnum.exGroupPopupEqualHeight?y[3]:null};v.getItems(o).forEach(function(t){var e=I.get(t);s.EqR(y,e.union())||I.set(t,e=p(t,S))})}}var C=null!=e&&o==f,P=v.getItems(o),A=null;P.forEach(function(t){var o=I.get(t),n=o.union();if(null!=n&&C)if(null==A)A=[t];else if(h)if(c+n[3]0&&i.forEach(function(e){var o=t.get(e);o&&s.ORt(o,0,a)})}}}(A,t,e)}}),this.rgVP=function(t){var e=new s.M1;return t.forEach(function(t,o){l(o)||e.set(o,t)}),e}(A);var w=this.rgVP.union();w&&(c.width=w[2],c.height=w[3])}}return c},a.prototype.itemFromPoint=function(t,e){var o=null,n=this.rgVP.p2O(t,e);if(null!=n){var i=this.k2op(n);null!=i&&(o={item:i.o,part:i.p})}return o},a.prototype.ptInPart=function(t,e,o,n){var i=null;if(o||n){var r=this.rgVP.p2O(t,e);if(null!=r){var s=this.k2op(r).o,l=this.rgVP.p2rgO(t,e);if(l)for(var u=l.length,h=0;!i&&h=0&&(c=setTimeout(function(){s.RUR.Rng()||(h.bF=!1,h.clearFloats())},e))}}function l(t){var o=(t=t.getRootMenu()).getFloatCount();null!=h&&(o&&t==h||function(){if(h){var t=h.getRootMenu();u(),i(),s.win.removeEventListener("mousedown",e),s.win.removeEventListener("mousemove",r),s.win.removeEventListener(s.wheel,e),s.supportTouch&&s.win.removeEventListener("touchstart",e),s.win.removeEventListener("keydown",n),a&&(s.CC.prototype.ondown=a,a=null),h.clearFloats(),h=null,setTimeout(function(){t.onEndModal()})}}()),o&&null==h&&function(t){if(null==h&&null!=t){t.getRootMenu().onStartModal(),f++,s.win.addEventListener("mousedown",e),t.isCM()||s.win.addEventListener("mousemove",r),s.win.addEventListener(s.wheel,e),s.supportTouch&&s.win.addEventListener("touchstart",e),s.win.addEventListener("keydown",n),h=t,a=s.CC.prototype.ondown,s.CC.prototype.ondown=function(t){var o=a;return e(t),o&&o.call(this,t)},setTimeout(function(){f--})}}(t)}function u(){null!=p&&clearTimeout(p),p=null}var h=null,a=null,p=null,c=null,f=0,g=0;return{Is:t,OnFloatCountChange:l,OnHover:function(e,o){if(0==g++&&(u(),null!=o&&(null==h||t(e))))if(o.isPopup()&&e.asSelectable(o)){var n=e.getTimeout("Open"),i=null==o.hasButton();i&&(i=n>=0||e.isRootMenu()&&e.bF&&e.getTimeout("Close")>=0)&&(p=setTimeout(function(){e.addFloat(o)},n))}else(n=e.getTimeout("Close"))>=0&&(p=setTimeout(function(){e.clearFloats(e.getFloatLevel())},n));g--},LockHover:function(){0==g++&&u()},UnlockHover:function(){g=o(0,g-1)}}}();return s.expOL({root:null,parent:null,path:null,state:null},u.prototype),s.expO({image:null},u.prototype,null,!1,s.expL("has")),s.expO({visible:null,enabled:null},u.prototype,null,!1,s.expL("is")),s.expO(s.Mrg({Options:null},t.Options),t.prototype),{Menu:t}}()),t.Menu=s.Menu});