jqwidgets-ng 19.0.2 → 19.0.3

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.
Files changed (127) hide show
  1. package/esm2020/jqxcombobox/angular_jqxcombobox.mjs +3 -0
  2. package/esm2020/jqxdatatable/angular_jqxdatatable.mjs +6 -0
  3. package/esm2020/jqxdropdownlist/angular_jqxdropdownlist.mjs +3 -0
  4. package/esm2020/jqxgrid/angular_jqxgrid.mjs +6 -0
  5. package/esm2020/jqxlistbox/angular_jqxlistbox.mjs +3 -0
  6. package/esm2020/jqxtreegrid/angular_jqxtreegrid.mjs +6 -0
  7. package/fesm2015/jqwidgets-ng-jqxcombobox.mjs +3 -0
  8. package/fesm2015/jqwidgets-ng-jqxdatatable.mjs +6 -0
  9. package/fesm2015/jqwidgets-ng-jqxdropdownlist.mjs +3 -0
  10. package/fesm2015/jqwidgets-ng-jqxgrid.mjs +6 -0
  11. package/fesm2015/jqwidgets-ng-jqxlistbox.mjs +3 -0
  12. package/fesm2015/jqwidgets-ng-jqxtreegrid.mjs +6 -0
  13. package/fesm2020/jqwidgets-ng-jqxcombobox.mjs +3 -0
  14. package/fesm2020/jqwidgets-ng-jqxdatatable.mjs +6 -0
  15. package/fesm2020/jqwidgets-ng-jqxdropdownlist.mjs +3 -0
  16. package/fesm2020/jqwidgets-ng-jqxgrid.mjs +6 -0
  17. package/fesm2020/jqwidgets-ng-jqxlistbox.mjs +3 -0
  18. package/fesm2020/jqwidgets-ng-jqxtreegrid.mjs +6 -0
  19. package/jqwidgets/globalization/globalize.js +5 -1
  20. package/jqwidgets/jqx-all.js +2573 -104
  21. package/jqwidgets/jqxangular.js +1 -1
  22. package/jqwidgets/jqxbarcode.js +6 -1
  23. package/jqwidgets/jqxbargauge.js +1 -1
  24. package/jqwidgets/jqxbulletchart.js +1 -1
  25. package/jqwidgets/jqxbuttongroup.js +1 -1
  26. package/jqwidgets/jqxbuttons.js +1 -1
  27. package/jqwidgets/jqxcalendar.js +1 -1
  28. package/jqwidgets/jqxchart.annotations.js +1 -1
  29. package/jqwidgets/jqxchart.api.js +1 -1
  30. package/jqwidgets/jqxchart.core.js +1 -1
  31. package/jqwidgets/jqxchart.js +6 -6
  32. package/jqwidgets/jqxchart.rangeselector.js +1 -1
  33. package/jqwidgets/jqxchart.waterfall.js +1 -1
  34. package/jqwidgets/jqxcheckbox.js +1 -1
  35. package/jqwidgets/jqxcheckboxgroup.js +5 -1
  36. package/jqwidgets/jqxcolorpicker.js +1 -1
  37. package/jqwidgets/jqxcombobox.js +1 -1
  38. package/jqwidgets/jqxcomplexinput.js +1 -1
  39. package/jqwidgets/jqxcore.elements.js +1 -1
  40. package/jqwidgets/jqxcore.js +7 -7
  41. package/jqwidgets/jqxdata.export.js +1 -1
  42. package/jqwidgets/jqxdata.js +1 -1
  43. package/jqwidgets/jqxdatatable.js +1 -1
  44. package/jqwidgets/jqxdate.js +1 -1
  45. package/jqwidgets/jqxdatetimeinput.js +1 -1
  46. package/jqwidgets/jqxdocking.js +1 -1
  47. package/jqwidgets/jqxdockinglayout.js +1 -1
  48. package/jqwidgets/jqxdockpanel.js +1 -1
  49. package/jqwidgets/jqxdragdrop.js +1 -1
  50. package/jqwidgets/jqxdraw.js +1 -1
  51. package/jqwidgets/jqxdropdownbutton.js +1 -1
  52. package/jqwidgets/jqxdropdownlist.js +1 -1
  53. package/jqwidgets/jqxeditor.js +1 -1
  54. package/jqwidgets/jqxexpander.js +1 -1
  55. package/jqwidgets/jqxexport.js +6 -0
  56. package/jqwidgets/jqxfileupload.js +1 -1
  57. package/jqwidgets/jqxform.js +1 -1
  58. package/jqwidgets/jqxformattedinput.js +1 -1
  59. package/jqwidgets/jqxgantt.js +1 -1
  60. package/jqwidgets/jqxgauge.js +1 -1
  61. package/jqwidgets/jqxgrid.aggregates.js +1 -1
  62. package/jqwidgets/jqxgrid.chart.js +6 -1
  63. package/jqwidgets/jqxgrid.columnsreorder.js +1 -1
  64. package/jqwidgets/jqxgrid.columnsresize.js +1 -1
  65. package/jqwidgets/jqxgrid.edit.js +1 -1
  66. package/jqwidgets/jqxgrid.export.js +1 -1
  67. package/jqwidgets/jqxgrid.filter.js +1 -1
  68. package/jqwidgets/jqxgrid.grouping.js +1 -1
  69. package/jqwidgets/jqxgrid.js +1 -1
  70. package/jqwidgets/jqxgrid.pager.js +1 -1
  71. package/jqwidgets/jqxgrid.selection.js +1 -1
  72. package/jqwidgets/jqxgrid.sort.js +1 -1
  73. package/jqwidgets/jqxgrid.storage.js +1 -1
  74. package/jqwidgets/jqxheatmap.js +1 -1
  75. package/jqwidgets/jqximport.js +6 -0
  76. package/jqwidgets/jqxinput.js +1 -1
  77. package/jqwidgets/jqxkanban.js +1 -1
  78. package/jqwidgets/jqxknob.js +1 -1
  79. package/jqwidgets/jqxlayout.js +1 -1
  80. package/jqwidgets/jqxlistbox.js +1 -1
  81. package/jqwidgets/jqxlistmenu.js +1 -1
  82. package/jqwidgets/jqxloader.js +1 -1
  83. package/jqwidgets/jqxmaskedinput.js +1 -1
  84. package/jqwidgets/jqxmaterialcolorpicker.js +6 -0
  85. package/jqwidgets/jqxmenu.js +1 -1
  86. package/jqwidgets/jqxnavbar.js +1 -1
  87. package/jqwidgets/jqxnavigationbar.js +1 -1
  88. package/jqwidgets/jqxnotification.js +1 -1
  89. package/jqwidgets/jqxnumberinput.js +1 -1
  90. package/jqwidgets/jqxpanel.js +1 -1
  91. package/jqwidgets/jqxpasswordinput.js +1 -1
  92. package/jqwidgets/jqxpivot.js +1 -1
  93. package/jqwidgets/jqxpivotdesigner.js +1 -1
  94. package/jqwidgets/jqxpivotgrid.js +1 -1
  95. package/jqwidgets/jqxpopover.js +1 -1
  96. package/jqwidgets/jqxprogressbar.js +1 -1
  97. package/jqwidgets/jqxqrcode.js +6 -1
  98. package/jqwidgets/jqxradiobutton.js +1 -1
  99. package/jqwidgets/jqxradiobuttongroup.js +6 -1
  100. package/jqwidgets/jqxrangeselector.js +1 -1
  101. package/jqwidgets/jqxrating.js +1 -1
  102. package/jqwidgets/jqxresponse.js +1 -1
  103. package/jqwidgets/jqxresponsivepanel.js +1 -1
  104. package/jqwidgets/jqxribbon.js +1 -1
  105. package/jqwidgets/jqxrichtextarea.js +6 -1
  106. package/jqwidgets/jqxscheduler.api.js +1 -1
  107. package/jqwidgets/jqxscheduler.js +1 -1
  108. package/jqwidgets/jqxscrollbar.js +1 -1
  109. package/jqwidgets/jqxscrollview.js +1 -1
  110. package/jqwidgets/jqxslider.js +1 -1
  111. package/jqwidgets/jqxsortable.js +1 -1
  112. package/jqwidgets/jqxsplitlayout.js +2107 -2170
  113. package/jqwidgets/jqxsplitter.js +1 -1
  114. package/jqwidgets/jqxswitchbutton.js +1 -1
  115. package/jqwidgets/jqxtabs.js +1 -1
  116. package/jqwidgets/jqxtagcloud.js +1 -1
  117. package/jqwidgets/jqxtextarea.js +1 -1
  118. package/jqwidgets/jqxtimepicker.js +1 -1
  119. package/jqwidgets/jqxtoolbar.js +1 -1
  120. package/jqwidgets/jqxtooltip.js +1 -1
  121. package/jqwidgets/jqxtouch.js +1 -1
  122. package/jqwidgets/jqxtree.js +1 -1
  123. package/jqwidgets/jqxtreegrid.js +1 -1
  124. package/jqwidgets/jqxtreemap.js +1 -1
  125. package/jqwidgets/jqxvalidator.js +1 -1
  126. package/jqwidgets/jqxwindow.js +1 -1
  127. package/package.json +1 -1
@@ -5,5 +5,5 @@ License: https://jqwidgets.com/license/
5
5
  */
6
6
  /* eslint-disable */
7
7
 
8
- (function(a){a.jqx.jqxWidget("jqxMaskedInput","",{});a.extend(a.jqx._jqxMaskedInput.prototype,{defineInstance:function(){var b={value:null,mask:"99999",width:200,height:null,textAlign:"left",readOnly:false,cookies:false,promptChar:"_",placeHolder:"",template:"",rtl:false,disabled:false,hint:true,events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","change"],aria:{"aria-valuenow":{name:"value",type:"string"},"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxMaskedInput.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this.render()},render:function(){var e=this;e.element.setAttribute("role","textbox");e.element.setAttribute("data-role","input");e.host.addClass(e.toThemeProperty("jqx-maskedinput"));var f=e.element.getAttribute("value");if(f!==undefined&&f!==""&&f!==null){e.value=f}a.jqx.aria(this);a.jqx.aria(this,"aria-multiline",false);a.jqx.aria(this,"aria-readonly",e.readOnly);e._helpers=[];e._helpers.element=new jqxHelper(e.element);e._helpers.element.addClass(e.toThemeProperty("jqx-input jqx-input-widget jqx-rc-all jqx-widget jqx-widget-content"));var b=e.element.getAttribute("name");if(e.element.nodeName.toLowerCase()==="div"){e.element.innerHTML="";var d=document.createElement("input");d.setAttribute("type","textarea");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck",false);d.setAttribute("name",b);d.setAttribute("inputmode","numeric");e.element.appendChild(d);e.maskbox=a(d);if(e.disabled){e._helpers.element.addClass(e.toThemeProperty("jqx-input-disabled jqx-fill-state-disabled"));d.setAttribute("disabled",true)}}else{e.maskbox=e.host;e.element.setAttribute("autocomplete","off");e.element.setAttribute("autocorrect","off");e.element.setAttribute("autocapitalize","off");e.element.setAttribute("spellcheck",false);e.element.setAttribute("name",b);e.element.setAttribute("inputmode","numeric");if(e.disabled){e._helpers.element.addClass(e.toThemeProperty("jqx-input-disabled jqx-fill-state-disabled"));e.element.setAttribute("disabled",true)}}e._helpers.maskbox=new jqxHelper(e.maskbox[0]);e._helpers.maskbox.addClass(e.toThemeProperty("jqx-reset jqx-input-content jqx-widget-content"));if(e.rtl){e._helpers.maskbox.addClass(e.toThemeProperty("jqx-rtl"))}e.propertyChangeMap.disabled=function(g,i,h,j){if(j){g._helpers.maskbox.addClass(e.toThemeProperty("jqx-input-disabled"))}else{g._helpers.maskbox.removeClass(e.toThemeProperty("jqx-input-disabled"))}};e.selectedText="";e.self=this;e.oldValue=e._value();e.items=[];e._initializeLiterals();e._render();if(e.value!=null){e.inputValue(e.value.toString())}if(e.host.parents("form").length>0){e.host.parents("form").on("reset",function(){setTimeout(function(){e.clearValue()},10)})}e.addHandlers();if(e.cookies){var c=a.jqx.cookie.cookie("maskedInput."+e.element.id);if(c){e.val(c)}}},addHandlers:function(){var d=this;var b="";var c=/(android)/i.test(navigator.userAgent);this.addHandler(this.maskbox,"blur",function(){if(d.rtl){d.maskbox.css("direction","ltr")}d._helpers.maskbox.removeClass(d.toThemeProperty("jqx-fill-state-focus"));if(d.maskbox.val()!==b){d._raiseEvent(7,{type:"keyboard"});if(d.cookies){a.jqx.cookie.cookie("maskedInput."+d.element.id,d.maskbox.val())}}});this.addHandler(this.maskbox,"focus",function(){b=d.maskbox[0].value;if(d.rtl){d.maskbox[0].style.direction="rtl"}d._helpers.element.addClass(d.toThemeProperty("jqx-fill-state-focus"))});this.addHandler(this.host,"keydown",function(g){var h=d.readOnly;var f=g.charCode?g.charCode:g.keyCode?g.keyCode:0;if(h||d.disabled){return false}if(c){if(f===8){d._handleKeyDown(g,f);return false}return}var e=d._handleKeyDown(g,f);if(!e){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}}return e});this.addHandler(this.host,"keyup",function(e){var f=d.readOnly;if(f||d.disabled){return true}if(e.preventDefault){e.preventDefault()}if(e.stopPropagation){e.stopPropagation()}return false});this.addHandler(this.host,"keypress",function(g){var h=d.readOnly;var f=g.charCode?g.charCode:g.keyCode?g.keyCode:0;if(h||d.disabled){return true}if(c){var e=d._handleKeyDown(g,f);if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false}var e=d._handleKeyPress(g,f);if(!e){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}}return e})},focus:function(){try{var c=this;c.maskbox.focus();setTimeout(function(){c.maskbox.focus()})}catch(b){}},_getString:function(){var c="";for(var b=0;b<this.items.length;b++){var d=this.items[b].character;if((this.items[b].character===this.promptChar)&&(this.promptChar!==this.items[b].defaultCharacter)){c+=this.items[b].defaultCharacter}else{c+=d}}return c},_initializeLiterals:function(){if(this.mask===undefined||this.mask===null){this.items=[];return}var h=this;var l=function(o,n,i){var j={};j.character=o;j.regex=n;j.canEdit=i;j.defaultCharacter=h.promptChar;return j};this.mask=this.mask.toString();var c=this.mask.length;for(var f=0;f<c;f++){var g=this.mask.substring(f,f+1);var k="";var b=false;if(g==="["){for(var d=f;d<c;d++){var e=this.mask.substring(d,d+1);if(e==="]"){break}}k="("+this.mask.substring(f,d+1)+")";f=d;b=true}if(g==="#"){k="(\\d|[+]|[-])";b=true}else{if(g==="9"||g==="0"){k="\\d";b=true}else{if(g==="$"){b=false}else{if(g==="/"||g===":"){b=false}else{if(g==="A"||g==="a"){k="\\w";b=true}else{if(g==="c"||g==="C"){k=".";b=true}else{if(g==="L"||g==="l"){k="([a-zA-Z])";b=true}}}}}}}var m={};if(b){m=l(this.promptChar,k,b)}else{m=l(g,k,b)}this.items.push(m)}},setRegex:function(d,e,b,c){if((d===null||d===undefined)||(e===null||e===undefined)){return}if(d<this.items.length){this.items[d].regex=e;if(b!==null&&b!==undefined){this.items[d].canEdit=b}if(c!==null&&c!==undefined){this.items[d].defaultCharacter=c}}},_match:function(c,b){var d=new RegExp(b,"i");return d.test(c)},_raiseEvent:function(g,c){var d=this.events[g];var e={};e.owner=this;var b=true;var f=new a.Event(d);f.owner=this;e.value=this.inputValue();e.text=this.maskedValue();if(g===7){e.type=c.type;if(e.type===undefined){e.type=null}}f.args=e;if(g<2||g>6){b=this.host.trigger(f)}return b},_handleKeyPress:function(d,b){var c=this._isSpecialKey(b,d);return c},_insertKey:function(l,h){var k=this._selection();var b=this;var m;if(k.start>=0&&k.start<this.items.length){var c=String.fromCharCode(l);if(l>=65&&l<=90){if(!h.shiftKey){c=h.key}}var g=false;for(var f=0;f<this.items.length;f++){if(f<k.start){continue}var n=b.items[f];if(!n.canEdit){continue}if(b._match(c,n.regex)){if(!g&&k.length>0){for(var d=k.start;d<k.end;d++){if(b.items[d].canEdit){b.items[d].character=b.promptChar}}m=b._getString();b.maskedValue(m);g=true}n.character=c;m=b._getString();b.maskedValue(m);if(k.start<b.items.length){b._setSelectionStart(f+1)}break}else{break}}}},_deleteSelectedText:function(){var d=this._selection();var b=false;if(d.start>0||d.length>0){for(var c=d.start;c<d.end;c++){if(c<this.items.length&&this.items[c].canEdit&&this.items[c].character!==this.promptChar){this.items[c].character=this.promptChar;b=true}}var e=this._getString();this.maskedValue(e);return b}},_saveSelectedText:function(){var c=this._selection();var e="";if(c.start>0||c.length>0){for(var b=c.start;b<c.end;b++){if(this.items[b].canEdit){e+=this.items[b].character}}}if(window.clipboardData){window.clipboardData.setData("Text",e)}else{var d=a("<textarea style='position: absolute; left: -1000px; top: -1000px;'/>");d.val(e);a("body").append(d);d.select();setTimeout(function(){document.designMode="off";d.select();d.remove()},100)}return e},_pasteSelectedText:function(){var e=this._selection();var i="";var d=0;var b=e.start;var c="";var f=this;var h=function(j){if(j!==f.selectedText&&j.length>0){f.selectedText=j;if(f.selectedText===null||f.selectedText===undefined){return}}if(e.start>=0||e.length>0){for(var k=e.start;k<f.items.length;k++){if(f.items[k].canEdit){if(d<f.selectedText.length){f.items[k].character=f.selectedText[d];d++;b=1+k}}}}i=f._getString();f.maskedValue(i);if(b<f.items.length){f._setSelectionStart(b)}else{f._setSelectionStart(f.items.length)}};if(window.clipboardData){c=window.clipboardData.getData("Text");h(c)}else{var g=a("<textarea style='position: absolute; left: -1000px; top: -1000px;'/>");a("body").append(g);g.select();setTimeout(function(){var j=g.val();h(j);g.remove()},100)}},_handleKeyDown:function(h,l){var k=this._selection();var c,g;if(l>=96&&l<=105){l=l-48}var d=h.ctrlKey||h.metaKey;if((d&&l===97)||(d&&l===65)){return true}if((d&&l===120)||(d&&l===88)){this.selectedText=this._saveSelectedText(h);this._deleteSelectedText(h);if(a.jqx.browser.msie){return false}return true}if((d&&l===99)||(d&&l===67)){this.selectedText=this._saveSelectedText(h);if(a.jqx.browser.msie){return false}return true}if((d&&l===122)||(d&&l===90)){return false}if((d&&l===118)||(d&&l===86)||(h.shiftKey&&l===45)){this._pasteSelectedText();if(a.jqx.browser.msie){return false}return true}if(l===8){if(k.length===0){for(g=this.items.length-1;g>=0;g--){if(this.items[g].canEdit&&g<k.end&&this.items[g].character!==this.promptChar){this._setSelection(g,g+1);break}}}k=this._selection();var f=this._deleteSelectedText();if(k.start>0||k.length>0){if(k.start<=this.items.length){if(f){this._setSelectionStart(k.start)}else{this._setSelectionStart(k.start-1)}}}return false}if(l===190){c=k.start;for(g=c;g<this.items.length;g++){if(this.items[g].character==="."){this._setSelectionStart(g+1);break}}}if(l===191){c=k.start;for(g=c;g<this.items.length;g++){if(this.items[g].character==="/"){this._setSelectionStart(g+1);break}}}if(l===189){c=k.start;for(g=c;g<this.items.length;g++){if(this.items[g].character==="-"){this._setSelectionStart(g+1);break}}}if(l===46){if(k.length===0){for(g=0;g<this.items.length;g++){if(this.items[g].canEdit&&g>=k.start&&this.items[g].character!==this.promptChar){this._setSelection(g,g+1);this._deleteSelectedText(h);this._setSelection(g,g+1);break}}}var b=k;k=this._selection();if(k.start>=0||k.length>=0){if(k.start<this.items.length){if(k.length<=1){if(b.end!==k.end){this._setSelectionStart(k.end)}else{this._setSelectionStart(k.end+1)}}else{this._setSelectionStart(k.start)}}}return false}this._insertKey(l,h);var j=this._isSpecialKey(l,h);return j},_isSpecialKey:function(b,c){if(b===189||b===9||b===13||b===35||b===36||b===37||b===39||b===46){return true}if((b===16&&c.shiftKey)||c.ctrlKey||c.metaKey){return true}return false},_selection:function(){var g;var f=this.maskbox[0];if("selectionStart" in this.maskbox[0]){g=f.selectionEnd-f.selectionStart;return{start:f.selectionStart,end:f.selectionEnd,length:g,text:f.value}}else{var c=document.selection.createRange();if(c==null){return{start:0,end:f.value.length,length:0}}var b=this.maskbox[0].createTextRange();var d=b.duplicate();b.moveToBookmark(c.getBookmark());d.setEndPoint("EndToStart",b);g=c.text.length;return{start:d.text.length,end:d.text.length+c.text.length,length:g,text:c.text}}},_setSelection:function(d,b){if("selectionStart" in this.maskbox[0]){this.maskbox[0].focus();this.maskbox[0].setSelectionRange(d,b)}else{var c=this.maskbox[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",d);c.select()}},_setSelectionStart:function(b){this._setSelection(b,b)},refresh:function(b){if(!b){this._render()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},_render:function(){var c=parseInt(this.host.css("border-left-width"),10);var d=parseInt(this.host.css("border-left-width"),10);var h=parseInt(this.host.css("border-left-width"),10);var i=parseInt(this.host.css("border-left-width"),10);var b=parseInt(this.host.css("height"),10)-h-i;var e=parseInt(this.host.css("width"),10)-c-d;if(this.width!=null&&this.width.toString().indexOf("px")!==-1){e=this.width}else{if(this.width!==undefined&&!isNaN(this.width)){e=this.width}}if(this.height!=null&&this.height.toString().indexOf("px")!==-1){b=this.height}else{if(this.height!==undefined&&!isNaN(this.height)){b=this.height}}e=parseInt(e,10);b=parseInt(b,10);if(this.maskbox[0]!==this.element){this.maskbox.css({"border-left-width":0,"border-right-width":0,"border-bottom-width":0,"border-top-width":0})}this.maskbox.css("text-align",this.textAlign);var f=this.maskbox.css("font-size");if(!isNaN(b)){this.maskbox.css("height",parseInt(f,10)+4+"px")}if(!isNaN(e)){this.maskbox.css("width",e)}var g=parseInt(b,10)-2*parseInt(h,10)-2*parseInt(i,10)-parseInt(f,10);if(isNaN(g)){g=0}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=this.width}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=this.width+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=this.height}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=this.height+"px"}}if(this.maskbox[0]!==this.element){this.maskbox[0].style.height="100%"}this.maskbox[0].value=this._getString();if(this.width){if(this.width.toString().indexOf("%")>=0){this.element.style.width=this.width}}if(this.height){if(this.height.toString().indexOf("%")>=0){this.element.style.height=this.height}}this._addBarAndLabel(this.maskbox);this._updateHint()},_addBarAndLabel:function(f){var e=this;if(e.label){return}if(!e.isMaterialized()){return}if(this.element instanceof HTMLInputElement){var h=a("<div></div>");h.addClass(e.toThemeProperty("jqx-input-group jqx-maskedinput"));this.host.after(h);var b=this.element;var g=this.host.data();h.append(b);var c=a("<label></label");if(this.hint){c[0].innerHTML=this.placeHolder}c.addClass(e.toThemeProperty("jqx-input-label"));h.append(c);var d=a("<span></span>");h.append(d);d.addClass(e.toThemeProperty("jqx-input-bar"));h[0].id=this.element.id;this.element.removeAttribute("id");this.element.setAttribute("hint",true);h[0].style=this.element.style;e.input=e.element;if(!(this.input instanceof HTMLInputElement)){this.input=this.host.find("input");if(this.input.length>0){this.input=this.input[0]}a(this.input).addClass(this.toThemeProperty("jqx-input-widget"))}h[0].style.width=this.input.style.width;h[0].style.height=this.input.style.height;if(e.element.className.indexOf("underlined")>=0){h.addClass("underlined")}this.label=c;this.bar=d;this.element.style="";this.host=h;this.element=h[0];this.host.data(g);this.input.style.width="100%";this.input.style.height="100%"}else{var c=a("<label></label");if(this.hint){c[0].innerHTML=this.placeHolder}c.addClass(e.toThemeProperty("jqx-input-label"));f.after(c);e.label=c;var d=a("<span></span>");f.after(d);d.addClass(e.toThemeProperty("jqx-input-bar"));e.bar=d;var e=this}if(e.template){e.bar.addClass(e.toThemeProperty("jqx-"+e.template));e.label.addClass(e.toThemeProperty("jqx-"+e.template))}},_updateHint:function(){var b=this;if(!b.hint){return}if(b.isMaterialized()){setTimeout(function(){if(b.maskbox[0].value.length===0){b.element.removeAttribute("hint");b.label[0].innerHTML=b.placeHolder}else{b.element.setAttribute("hint",true)}})}},destroy:function(){var b=this;a.jqx.utilities.resize(this.host,null,true);b.host.remove();b._helpers=[]},maskedValue:function(b){if(b===undefined){return this._value()}this.value=b;this._refreshValue();if(this.oldValue!==b){this._raiseEvent(1,b);this.oldValue=b;this._raiseEvent(0,b)}return this},propertyChangedHandler:function(c,e,b,f){if(this.isInitialized===undefined||this.isInitialized===false){return}if(e==="rtl"){if(c.rtl){c._helpers.maskbox.addClass(c.toThemeProperty("jqx-rtl"))}else{c._helpers.maskbox.removeClass(c.toThemeProperty("jqx-rtl"))}}if(e==="value"){if(f===undefined||f===null){f=""}if(f===""){this.clear()}else{f=f.toString();this.inputValue(f)}c._raiseEvent(7,f)}if(e==="theme"){a.jqx.utilities.setTheme(b,f,this.host)}if(e==="disabled"){if(f){c._helpers.maskbox.addClass(c.toThemeProperty("jqx-input-disabled"));c._helpers.element.addClass(c.toThemeProperty("jqx-fill-state-disabled"));c._helpers.maskbox.attr("disabled",true)}else{c._helpers.maskbox.removeClass(this.toThemeProperty("jqx-input-disabled"));c._helpers.element.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));c._helpers.maskbox.attr("disabled",false)}a.jqx.aria(c,"aria-disabled",f)}if(e==="readOnly"){this.readOnly=f}if(e==="promptChar"){for(var d=0;d<c.items.length;d++){if(c.items[d].character===c.promptChar){c.items[d].character=f;c.items[d].defaultCharacter=f}}c.promptChar=f}if(e==="textAlign"){c.maskbox.css("text-align",f);c.textAlign=f}if(e==="mask"){c.mask=f;c.items=[];c._initializeLiterals();c.value=c._getString();c._refreshValue()}if(e==="width"){c.width=f;c._render()}else{if(e==="height"){c.height=f;c._render()}}},_value:function(){var b=this.value;return b},_getEditStringLength:function(){var c="";for(var b=0;b<this.items.length;b++){if(this.items[b].canEdit){c+=this.items[b].character}}return c.length},_getEditValue:function(){var c="";for(var b=0;b<this.items.length;b++){if(this.items[b].canEdit&&this.items[b].character!==this.promptChar){c+=this.items[b].character}}return c},parseValue:function(g){if(g===undefined||g===null){return null}var d=g.toString();var h="";var c=0;for(var b=0;b<d.length;b++){var f=d.substring(b,b+1);for(var e=c;e<this.items.length;e++){if(this.items[e].canEdit&&this._match(f,this.items[e].regex)){h+=f;c=e;break}}}return h},clear:function(){this.clearValue()},clearValue:function(){this.inputValue("",true)},val:function(b){if(b!==undefined&&typeof b!=="object"){if(typeof b==="number"&&isFinite(b)){b=b.toString()}if(b.indexOf("-")>=0||b.indexOf("(")>=0){that.maskedValue(b)}else{this.inputValue(b)}}return this.maskbox[0].value},inputValue:function(g,c){var e;if(g===undefined||g===null){var f="";for(e=0;e<this.items.length;e++){if(this.items[e].canEdit){f+=this.items[e].character}}return f}else{var b=0;g=g.toString();for(e=0;e<this.items.length;e++){if(this.items[e].canEdit){if(this._match(g.substring(b,b+1),this.items[e].regex)){this.items[e].character=g.substring(b,b+1);b++}else{if(c){this.items[e].character=this.promptChar;b++}}}}var d=this._getString();this.maskedValue(d);return this.inputValue()}},_refreshValue:function(){var d=this.maskedValue();var b=0;for(var c=0;c<this.items.length;c++){if(d.length>b){if(this.items[c].canEdit&&this.items[c].character!==d[b]){if((this._match(d[b],this.items[c].regex)||d[b]===this.promptChar)&&d[b].length===1){this.items[c].character=d[b]}}b++}}this.value=this._getString();d=this.value;this.maskbox[0].value=d;a.jqx.aria(this,"aria-valuenow",d)}})})(jqxBaseFramework);
8
+ (function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxMaskedInput","",{});a.extend(a.jqx._jqxMaskedInput.prototype,{defineInstance:function(){var b={value:null,mask:"99999",width:200,height:null,textAlign:"left",readOnly:false,cookies:false,promptChar:"_",placeHolder:"",template:"",rtl:false,disabled:false,hint:true,events:["valueChanged","textchanged","mousedown","mouseup","keydown","keyup","keypress","change"],aria:{"aria-valuenow":{name:"value",type:"string"},"aria-disabled":{name:"disabled",type:"boolean"}}};if(this===a.jqx._jqxMaskedInput.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this.render()},render:function(){var e=this;e.element.setAttribute("role","textbox");e.element.setAttribute("data-role","input");e.host.addClass(e.toThemeProperty("jqx-maskedinput"));var f=e.element.getAttribute("value");if(f!==undefined&&f!==""&&f!==null){e.value=f}a.jqx.aria(this);a.jqx.aria(this,"aria-multiline",false);a.jqx.aria(this,"aria-readonly",e.readOnly);e._helpers=[];e._helpers.element=new jqxHelper(e.element);e._helpers.element.addClass(e.toThemeProperty("jqx-input jqx-input-widget jqx-rc-all jqx-widget jqx-widget-content"));var b=e.element.getAttribute("name");if(e.element.nodeName.toLowerCase()==="div"){e.element.innerHTML="";var d=document.createElement("input");d.setAttribute("type","textarea");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck",false);d.setAttribute("name",b);d.setAttribute("inputmode","numeric");e.element.appendChild(d);e.maskbox=a(d);if(e.disabled){e._helpers.element.addClass(e.toThemeProperty("jqx-input-disabled jqx-fill-state-disabled"));d.setAttribute("disabled",true)}}else{e.maskbox=e.host;e.element.setAttribute("autocomplete","off");e.element.setAttribute("autocorrect","off");e.element.setAttribute("autocapitalize","off");e.element.setAttribute("spellcheck",false);e.element.setAttribute("name",b);e.element.setAttribute("inputmode","numeric");if(e.disabled){e._helpers.element.addClass(e.toThemeProperty("jqx-input-disabled jqx-fill-state-disabled"));e.element.setAttribute("disabled",true)}}e._helpers.maskbox=new jqxHelper(e.maskbox[0]);e._helpers.maskbox.addClass(e.toThemeProperty("jqx-reset jqx-input-content jqx-widget-content"));if(e.rtl){e._helpers.maskbox.addClass(e.toThemeProperty("jqx-rtl"))}e.propertyChangeMap.disabled=function(g,i,h,j){if(j){g._helpers.maskbox.addClass(e.toThemeProperty("jqx-input-disabled"))}else{g._helpers.maskbox.removeClass(e.toThemeProperty("jqx-input-disabled"))}};e.selectedText="";e.self=this;e.oldValue=e._value();e.items=[];e._initializeLiterals();e._render();if(e.value!=null){e.inputValue(e.value.toString())}if(e.host.parents("form").length>0){e.host.parents("form").on("reset",function(){setTimeout(function(){e.clearValue()},10)})}e.addHandlers();if(e.cookies){var c=a.jqx.cookie.cookie("maskedInput."+e.element.id);if(c){e.val(c)}}},addHandlers:function(){var d=this;var b="";var c=/(android)/i.test(navigator.userAgent);this.addHandler(this.maskbox,"blur",function(){if(d.rtl){d.maskbox.css("direction","ltr")}d._helpers.maskbox.removeClass(d.toThemeProperty("jqx-fill-state-focus"));if(d.maskbox.val()!==b){d._raiseEvent(7,{type:"keyboard"});if(d.cookies){a.jqx.cookie.cookie("maskedInput."+d.element.id,d.maskbox.val())}}});this.addHandler(this.maskbox,"focus",function(){b=d.maskbox[0].value;if(d.rtl){d.maskbox[0].style.direction="rtl"}d._helpers.element.addClass(d.toThemeProperty("jqx-fill-state-focus"))});this.addHandler(this.host,"keydown",function(g){var h=d.readOnly;var f=g.charCode?g.charCode:g.keyCode?g.keyCode:0;if(h||d.disabled){return false}if(c){if(f===8){d._handleKeyDown(g,f);return false}return}var e=d._handleKeyDown(g,f);if(!e){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}}return e});this.addHandler(this.host,"keyup",function(e){var f=d.readOnly;if(f||d.disabled){return true}if(e.preventDefault){e.preventDefault()}if(e.stopPropagation){e.stopPropagation()}return false});this.addHandler(this.host,"keypress",function(g){var h=d.readOnly;var f=g.charCode?g.charCode:g.keyCode?g.keyCode:0;if(h||d.disabled){return true}if(c){var e=d._handleKeyDown(g,f);if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}return false}var e=d._handleKeyPress(g,f);if(!e){if(g.preventDefault){g.preventDefault()}if(g.stopPropagation){g.stopPropagation()}}return e})},focus:function(){try{var c=this;c.maskbox.focus();setTimeout(function(){c.maskbox.focus()})}catch(b){}},_getString:function(){var c="";for(var b=0;b<this.items.length;b++){var d=this.items[b].character;if((this.items[b].character===this.promptChar)&&(this.promptChar!==this.items[b].defaultCharacter)){c+=this.items[b].defaultCharacter}else{c+=d}}return c},_initializeLiterals:function(){if(this.mask===undefined||this.mask===null){this.items=[];return}var h=this;var l=function(o,n,i){var j={};j.character=o;j.regex=n;j.canEdit=i;j.defaultCharacter=h.promptChar;return j};this.mask=this.mask.toString();var c=this.mask.length;for(var f=0;f<c;f++){var g=this.mask.substring(f,f+1);var k="";var b=false;if(g==="["){for(var d=f;d<c;d++){var e=this.mask.substring(d,d+1);if(e==="]"){break}}k="("+this.mask.substring(f,d+1)+")";f=d;b=true}if(g==="#"){k="(\\d|[+]|[-])";b=true}else{if(g==="9"||g==="0"){k="\\d";b=true}else{if(g==="$"){b=false}else{if(g==="/"||g===":"){b=false}else{if(g==="A"||g==="a"){k="\\w";b=true}else{if(g==="c"||g==="C"){k=".";b=true}else{if(g==="L"||g==="l"){k="([a-zA-Z])";b=true}}}}}}}var m={};if(b){m=l(this.promptChar,k,b)}else{m=l(g,k,b)}this.items.push(m)}},setRegex:function(d,e,b,c){if((d===null||d===undefined)||(e===null||e===undefined)){return}if(d<this.items.length){this.items[d].regex=e;if(b!==null&&b!==undefined){this.items[d].canEdit=b}if(c!==null&&c!==undefined){this.items[d].defaultCharacter=c}}},_match:function(c,b){var d=new RegExp(b,"i");return d.test(c)},_raiseEvent:function(g,c){var d=this.events[g];var e={};e.owner=this;var b=true;var f=new a.Event(d);f.owner=this;e.value=this.inputValue();e.text=this.maskedValue();if(g===7){e.type=c.type;if(e.type===undefined){e.type=null}}f.args=e;if(g<2||g>6){b=this.host.trigger(f)}return b},_handleKeyPress:function(d,b){var c=this._isSpecialKey(b,d);return c},_insertKey:function(l,h){var k=this._selection();var b=this;var m;if(k.start>=0&&k.start<this.items.length){var c=String.fromCharCode(l);if(l>=65&&l<=90){if(!h.shiftKey){c=h.key}}var g=false;for(var f=0;f<this.items.length;f++){if(f<k.start){continue}var n=b.items[f];if(!n.canEdit){continue}if(b._match(c,n.regex)){if(!g&&k.length>0){for(var d=k.start;d<k.end;d++){if(b.items[d].canEdit){b.items[d].character=b.promptChar}}m=b._getString();b.maskedValue(m);g=true}n.character=c;m=b._getString();b.maskedValue(m);if(k.start<b.items.length){b._setSelectionStart(f+1)}break}else{break}}}},_deleteSelectedText:function(){var d=this._selection();var b=false;if(d.start>0||d.length>0){for(var c=d.start;c<d.end;c++){if(c<this.items.length&&this.items[c].canEdit&&this.items[c].character!==this.promptChar){this.items[c].character=this.promptChar;b=true}}var e=this._getString();this.maskedValue(e);return b}},_saveSelectedText:function(){var c=this._selection();var e="";if(c.start>0||c.length>0){for(var b=c.start;b<c.end;b++){if(this.items[b].canEdit){e+=this.items[b].character}}}if(window.clipboardData){window.clipboardData.setData("Text",e)}else{var d=a("<textarea style='position: absolute; left: -1000px; top: -1000px;'/>");d.val(e);a("body").append(d);d.select();setTimeout(function(){document.designMode="off";d.select();d.remove()},100)}return e},_pasteSelectedText:function(){var e=this._selection();var i="";var d=0;var b=e.start;var c="";var f=this;var h=function(j){if(j!==f.selectedText&&j.length>0){f.selectedText=j;if(f.selectedText===null||f.selectedText===undefined){return}}if(e.start>=0||e.length>0){for(var k=e.start;k<f.items.length;k++){if(f.items[k].canEdit){if(d<f.selectedText.length){f.items[k].character=f.selectedText[d];d++;b=1+k}}}}i=f._getString();f.maskedValue(i);if(b<f.items.length){f._setSelectionStart(b)}else{f._setSelectionStart(f.items.length)}};if(window.clipboardData){c=window.clipboardData.getData("Text");h(c)}else{var g=a("<textarea style='position: absolute; left: -1000px; top: -1000px;'/>");a("body").append(g);g.select();setTimeout(function(){var j=g.val();h(j);g.remove()},100)}},_handleKeyDown:function(h,l){var k=this._selection();var c,g;if(l>=96&&l<=105){l=l-48}var d=h.ctrlKey||h.metaKey;if((d&&l===97)||(d&&l===65)){return true}if((d&&l===120)||(d&&l===88)){this.selectedText=this._saveSelectedText(h);this._deleteSelectedText(h);if(a.jqx.browser.msie){return false}return true}if((d&&l===99)||(d&&l===67)){this.selectedText=this._saveSelectedText(h);if(a.jqx.browser.msie){return false}return true}if((d&&l===122)||(d&&l===90)){return false}if((d&&l===118)||(d&&l===86)||(h.shiftKey&&l===45)){this._pasteSelectedText();if(a.jqx.browser.msie){return false}return true}if(l===8){if(k.length===0){for(g=this.items.length-1;g>=0;g--){if(this.items[g].canEdit&&g<k.end&&this.items[g].character!==this.promptChar){this._setSelection(g,g+1);break}}}k=this._selection();var f=this._deleteSelectedText();if(k.start>0||k.length>0){if(k.start<=this.items.length){if(f){this._setSelectionStart(k.start)}else{this._setSelectionStart(k.start-1)}}}return false}if(l===190){c=k.start;for(g=c;g<this.items.length;g++){if(this.items[g].character==="."){this._setSelectionStart(g+1);break}}}if(l===191){c=k.start;for(g=c;g<this.items.length;g++){if(this.items[g].character==="/"){this._setSelectionStart(g+1);break}}}if(l===189){c=k.start;for(g=c;g<this.items.length;g++){if(this.items[g].character==="-"){this._setSelectionStart(g+1);break}}}if(l===46){if(k.length===0){for(g=0;g<this.items.length;g++){if(this.items[g].canEdit&&g>=k.start&&this.items[g].character!==this.promptChar){this._setSelection(g,g+1);this._deleteSelectedText(h);this._setSelection(g,g+1);break}}}var b=k;k=this._selection();if(k.start>=0||k.length>=0){if(k.start<this.items.length){if(k.length<=1){if(b.end!==k.end){this._setSelectionStart(k.end)}else{this._setSelectionStart(k.end+1)}}else{this._setSelectionStart(k.start)}}}return false}this._insertKey(l,h);var j=this._isSpecialKey(l,h);return j},_isSpecialKey:function(b,c){if(b===189||b===9||b===13||b===35||b===36||b===37||b===39||b===46){return true}if((b===16&&c.shiftKey)||c.ctrlKey||c.metaKey){return true}return false},_selection:function(){var g;var f=this.maskbox[0];if("selectionStart" in this.maskbox[0]){g=f.selectionEnd-f.selectionStart;return{start:f.selectionStart,end:f.selectionEnd,length:g,text:f.value}}else{var c=document.selection.createRange();if(c==null){return{start:0,end:f.value.length,length:0}}var b=this.maskbox[0].createTextRange();var d=b.duplicate();b.moveToBookmark(c.getBookmark());d.setEndPoint("EndToStart",b);g=c.text.length;return{start:d.text.length,end:d.text.length+c.text.length,length:g,text:c.text}}},_setSelection:function(d,b){if("selectionStart" in this.maskbox[0]){this.maskbox[0].focus();this.maskbox[0].setSelectionRange(d,b)}else{var c=this.maskbox[0].createTextRange();c.collapse(true);c.moveEnd("character",b);c.moveStart("character",d);c.select()}},_setSelectionStart:function(b){this._setSelection(b,b)},refresh:function(b){if(!b){this._render()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},_render:function(){var c=parseInt(this.host.css("border-left-width"),10);var d=parseInt(this.host.css("border-left-width"),10);var h=parseInt(this.host.css("border-left-width"),10);var i=parseInt(this.host.css("border-left-width"),10);var b=parseInt(this.host.css("height"),10)-h-i;var e=parseInt(this.host.css("width"),10)-c-d;if(this.width!=null&&this.width.toString().indexOf("px")!==-1){e=this.width}else{if(this.width!==undefined&&!isNaN(this.width)){e=this.width}}if(this.height!=null&&this.height.toString().indexOf("px")!==-1){b=this.height}else{if(this.height!==undefined&&!isNaN(this.height)){b=this.height}}e=parseInt(e,10);b=parseInt(b,10);if(this.maskbox[0]!==this.element){this.maskbox.css({"border-left-width":0,"border-right-width":0,"border-bottom-width":0,"border-top-width":0})}this.maskbox.css("text-align",this.textAlign);var f=this.maskbox.css("font-size");if(!isNaN(b)){this.maskbox.css("height",parseInt(f,10)+4+"px")}if(!isNaN(e)){this.maskbox.css("width",e)}var g=parseInt(b,10)-2*parseInt(h,10)-2*parseInt(i,10)-parseInt(f,10);if(isNaN(g)){g=0}if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.element.style.width=this.width}else{if(this.width!=undefined&&!isNaN(this.width)){this.element.style.width=this.width+"px"}}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.element.style.height=this.height}else{if(this.height!=undefined&&!isNaN(this.height)){this.element.style.height=this.height+"px"}}if(this.maskbox[0]!==this.element){this.maskbox[0].style.height="100%"}this.maskbox[0].value=this._getString();if(this.width){if(this.width.toString().indexOf("%")>=0){this.element.style.width=this.width}}if(this.height){if(this.height.toString().indexOf("%")>=0){this.element.style.height=this.height}}this._addBarAndLabel(this.maskbox);this._updateHint()},_addBarAndLabel:function(f){var e=this;if(e.label){return}if(!e.isMaterialized()){return}if(this.element instanceof HTMLInputElement){var h=a("<div></div>");h.addClass(e.toThemeProperty("jqx-input-group jqx-maskedinput"));this.host.after(h);var b=this.element;var g=this.host.data();h.append(b);var c=a("<label></label");if(this.hint){c[0].innerHTML=this.placeHolder}c.addClass(e.toThemeProperty("jqx-input-label"));h.append(c);var d=a("<span></span>");h.append(d);d.addClass(e.toThemeProperty("jqx-input-bar"));h[0].id=this.element.id;this.element.removeAttribute("id");this.element.setAttribute("hint",true);h[0].style=this.element.style;e.input=e.element;if(!(this.input instanceof HTMLInputElement)){this.input=this.host.find("input");if(this.input.length>0){this.input=this.input[0]}a(this.input).addClass(this.toThemeProperty("jqx-input-widget"))}h[0].style.width=this.input.style.width;h[0].style.height=this.input.style.height;if(e.element.className.indexOf("underlined")>=0){h.addClass("underlined")}this.label=c;this.bar=d;this.element.style="";this.host=h;this.element=h[0];this.host.data(g);this.input.style.width="100%";this.input.style.height="100%"}else{var c=a("<label></label");if(this.hint){c[0].innerHTML=this.placeHolder}c.addClass(e.toThemeProperty("jqx-input-label"));f.after(c);e.label=c;var d=a("<span></span>");f.after(d);d.addClass(e.toThemeProperty("jqx-input-bar"));e.bar=d;var e=this}if(e.template){e.bar.addClass(e.toThemeProperty("jqx-"+e.template));e.label.addClass(e.toThemeProperty("jqx-"+e.template))}},_updateHint:function(){var b=this;if(!b.hint){return}if(b.isMaterialized()){setTimeout(function(){if(b.maskbox[0].value.length===0){b.element.removeAttribute("hint");b.label[0].innerHTML=b.placeHolder}else{b.element.setAttribute("hint",true)}})}},destroy:function(){var b=this;a.jqx.utilities.resize(this.host,null,true);b.host.remove();b._helpers=[]},maskedValue:function(b){if(b===undefined){return this._value()}this.value=b;this._refreshValue();if(this.oldValue!==b){this._raiseEvent(1,b);this.oldValue=b;this._raiseEvent(0,b)}return this},propertyChangedHandler:function(c,e,b,f){if(this.isInitialized===undefined||this.isInitialized===false){return}if(e==="rtl"){if(c.rtl){c._helpers.maskbox.addClass(c.toThemeProperty("jqx-rtl"))}else{c._helpers.maskbox.removeClass(c.toThemeProperty("jqx-rtl"))}}if(e==="value"){if(f===undefined||f===null){f=""}if(f===""){this.clear()}else{f=f.toString();this.inputValue(f)}c._raiseEvent(7,f)}if(e==="theme"){a.jqx.utilities.setTheme(b,f,this.host)}if(e==="disabled"){if(f){c._helpers.maskbox.addClass(c.toThemeProperty("jqx-input-disabled"));c._helpers.element.addClass(c.toThemeProperty("jqx-fill-state-disabled"));c._helpers.maskbox.attr("disabled",true)}else{c._helpers.maskbox.removeClass(this.toThemeProperty("jqx-input-disabled"));c._helpers.element.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));c._helpers.maskbox.attr("disabled",false)}a.jqx.aria(c,"aria-disabled",f)}if(e==="readOnly"){this.readOnly=f}if(e==="promptChar"){for(var d=0;d<c.items.length;d++){if(c.items[d].character===c.promptChar){c.items[d].character=f;c.items[d].defaultCharacter=f}}c.promptChar=f}if(e==="textAlign"){c.maskbox.css("text-align",f);c.textAlign=f}if(e==="mask"){c.mask=f;c.items=[];c._initializeLiterals();c.value=c._getString();c._refreshValue()}if(e==="width"){c.width=f;c._render()}else{if(e==="height"){c.height=f;c._render()}}},_value:function(){var b=this.value;return b},_getEditStringLength:function(){var c="";for(var b=0;b<this.items.length;b++){if(this.items[b].canEdit){c+=this.items[b].character}}return c.length},_getEditValue:function(){var c="";for(var b=0;b<this.items.length;b++){if(this.items[b].canEdit&&this.items[b].character!==this.promptChar){c+=this.items[b].character}}return c},parseValue:function(g){if(g===undefined||g===null){return null}var d=g.toString();var h="";var c=0;for(var b=0;b<d.length;b++){var f=d.substring(b,b+1);for(var e=c;e<this.items.length;e++){if(this.items[e].canEdit&&this._match(f,this.items[e].regex)){h+=f;c=e;break}}}return h},clear:function(){this.clearValue()},clearValue:function(){this.inputValue("",true)},val:function(b){if(b!==undefined&&typeof b!=="object"){if(typeof b==="number"&&isFinite(b)){b=b.toString()}if(b.indexOf("-")>=0||b.indexOf("(")>=0){that.maskedValue(b)}else{this.inputValue(b)}}return this.maskbox[0].value},inputValue:function(g,c){var e;if(g===undefined||g===null){var f="";for(e=0;e<this.items.length;e++){if(this.items[e].canEdit){f+=this.items[e].character}}return f}else{var b=0;g=g.toString();for(e=0;e<this.items.length;e++){if(this.items[e].canEdit){if(this._match(g.substring(b,b+1),this.items[e].regex)){this.items[e].character=g.substring(b,b+1);b++}else{if(c){this.items[e].character=this.promptChar;b++}}}}var d=this._getString();this.maskedValue(d);return this.inputValue()}},_refreshValue:function(){var d=this.maskedValue();var b=0;for(var c=0;c<this.items.length;c++){if(d.length>b){if(this.items[c].canEdit&&this.items[c].character!==d[b]){if((this._match(d[b],this.items[c].regex)||d[b]===this.promptChar)&&d[b].length===1){this.items[c].character=d[b]}}b++}}this.value=this._getString();d=this.value;this.maskbox[0].value=d;a.jqx.aria(this,"aria-valuenow",d)}})})(jqxBaseFramework)})();
9
9
 
@@ -1,5 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ (function(){
4
+ if (typeof document === 'undefined') {
5
+ return;
6
+ }
7
+
3
8
  (function ($) {
4
9
 
5
10
  $.jqx.jqxWidget('jqxMaterialColorPicker', '', {});
@@ -165,3 +170,4 @@
165
170
  });
166
171
 
167
172
  })(jqxBaseFramework);
173
+ })();
@@ -5,5 +5,5 @@ License: https://jqwidgets.com/license/
5
5
  */
6
6
  /* eslint-disable */
7
7
 
8
- (function(a){a.jqx.jqxWidget("jqxMenu","",{});a.extend(a.jqx._jqxMenu.prototype,{defineInstance:function(){var b={items:new Array(),mode:"horizontal",width:null,height:null,minimizeWidth:"auto",easing:"easeInOutSine",animationShowDuration:200,animationHideDuration:200,autoCloseInterval:0,animationHideDelay:100,animationShowDelay:10,menuElements:new Array(),autoSizeMainItems:false,autoCloseOnClick:true,autoCloseOnMouseLeave:true,enableRoundedCorners:true,disabled:false,autoOpenPopup:true,enableHover:true,autoOpen:true,autoGenerate:true,clickToOpen:false,showTopLevelArrows:false,touchMode:"auto",source:null,popupZIndex:1000,rtl:false,keyboardNavigation:false,lockFocus:false,title:"",events:["shown","closed","itemclick","initialized","open","close"]};if(this===a.jqx._jqxMenu.prototype){return b}a.extend(true,this,b);return b},createInstance:function(c){var b=this;this.host.attr("role","menubar");a.jqx.utilities.resize(this.host,function(){b.refresh()},false,this.mode!="popup");if(this.minimizeWidth!="auto"&&this.minimizeWidth!=null&&this.width&&this.width.toString().indexOf("%")==-1){a(window).resize(function(){b.refresh()})}if(b.isMaterialized()){var g=window.getComputedStyle(this.element);var f=g.getPropertyValue("--jqx-dropdown-animation");if(f){this.animationType=f.trim();if(this.animationType==="transform"){this.animationShowDuration=0;this.animationHideDuration=0;this.animationShowDelay=0}}}this.host.css("outline","none");if(this.source){if(this.source!=null){var d=this.loadItems(this.source);this.element.innerHTML=d}}this._tmpHTML=this.element.innerHTML;if(this.element.innerHTML.indexOf("UL")){var e=this.host.find("ul:first");if(e.length>0){this._createMenu(e[0])}}this.host.data("autoclose",{});this._render();this._setSize();if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.host.attr("hideFocus",true)}},focus:function(){try{if(this.mode==="popup"&&this.keyboardNavigation){var d=this.host.closest("div.jqx-menu-wrapper");d.focus()}if(this.keyboardNavigation){this.host.focus();var c=this;var e=function(){if(!a.jqx.isHidden(a(c.items[0].element))){a(c.items[0].element).addClass(c.toThemeProperty("jqx-fill-state-focus"));c.activeItem=c.items[0]}else{var f=c._nextVisibleItem(c.items[0],0);if(f){a(f.element).addClass(c.toThemeProperty("jqx-fill-state-focus"));c.activeItem=f}}};if(!this.activeItem){e()}else{if(!a.jqx.isHidden(a(this.activeItem.element))){a(this.activeItem.element).addClass(this.toThemeProperty("jqx-fill-state-focus"))}else{a(this.activeItem.element).removeClass(this.toThemeProperty("jqx-fill-state-focus"));e()}}}}catch(b){}},loadItems:function(c,e){if(c==null){return}if(c.length==0){return""}var b=this;this.items=new Array();var d='<ul class="jqx-menu-ul">';if(e){d='<ul class="jqx-menu-ul" style="width:'+e+';">'}a.map(c,function(f){if(f==undefined){return null}d+=b._parseItem(f)});d+="</ul>";return d},_parseItem:function(f){var c="";if(f==undefined){return null}var b=f.label;if(!f.label&&f.html){b=f.html}if(!b){b="Item"}if(typeof f==="string"){b=f}var e=false;if(f.selected!=undefined&&f.selected){e=true}var d=false;if(f.disabled!=undefined&&f.disabled){d=true}c+="<li";if(d){c+=' item-disabled="true" '}if(f.label&&!f.html){c+=' item-label="'+b+'" '}if(f.value!=null){c+=' item-value="'+f.value+'" '}if(f.id!=undefined){c+=' id="'+f.id+'" '}c+=">"+b;if(f.items){if(f.subMenuWidth){c+=this.loadItems(f.items,f.subMenuWidth)}else{c+=this.loadItems(f.items)}}c+="</li>";return c},_setSize:function(){if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}}if(this.height===null){this.host.height("auto")}var g=this;if(this.minimizeWidth!=null&&this.mode!="popup"){var f=a(window).width();if(!a.jqx.response){var e=false;if(navigator.userAgent.match(/Windows|Linux|MacOS/)){var b=navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0;if(!b){e=true}}var c=this.minimizeWidth;if(e&&this.minimizeWidth=="auto"){return}}if(this.minimizeWidth=="auto"&&a.jqx.response){var d=new a.jqx.response();if(d.device.type=="Phone"||d.device.type=="Tablet"){if(!this.minimized){this.minimize()}}}else{if((f<c)&&!this.minimized){this.minimize()}else{if(this.minimized&&f>=c){this.restore()}}}}},minimize:function(){if(this.minimized){return}var e=this;this.host.addClass(this.toThemeProperty("jqx-menu-minimized"));this.minimized=true;this._tmpMode=this.mode;this.mode="simple";var h=this.host.closest("div.jqx-menu-wrapper");h.remove();a("#menuWrapper"+this.element.id).remove();a.each(this.items,function(){var k=this;var j=a(k.element);var i=a(k.subMenuElement);var l=i.closest("div.jqx-menu-popup");l.remove()});if(this.source){var d=this.loadItems(this.source);this.element.innerHTML=d;this._tmpHTML=this.element.innerHTML}this.element.innerHTML=this._tmpHTML;if(this.element.innerHTML.indexOf("UL")){var g=this.host.find("ul:first");if(g.length>0){this._createMenu(g[0])}}this._render();var c=this.host.find("ul:first");c.wrap('<div class="jqx-menu-wrapper" style="z-index:'+this.popupZIndex+'; padding: 0px; display: none; margin: 0px; height: auto; width: auto; position: absolute; top: 0; left: 0; display: block; visibility: visible;"></div>');var h=c.closest("div.jqx-menu-wrapper");h[0].id="menuWrapper"+this.element.id;h.detach();h.appendTo(a(document.body));h.addClass(this.toThemeProperty("jqx-widget"));h.addClass(this.toThemeProperty("jqx-menu"));h.addClass(this.toThemeProperty("jqx-menu-minimized"));h.addClass(this.toThemeProperty("jqx-widget-header"));c.children().hide();h.hide();h.find("ul").addClass(this.toThemeProperty("jqx-menu-ul-minimized"));this.minimizedItem=a("<div></div>");this.minimizedItem.addClass(this.toThemeProperty("jqx-item"));this.minimizedItem.addClass(this.toThemeProperty("jqx-menu-item-top"));this.addHandler(h,"keydown",function(i){return e.handleKeyDown(i)});this.minimizedItem.addClass(this.toThemeProperty("jqx-menu-minimized-button"));this.minimizedItem.prependTo(this.host);this.titleElement=a("<div>"+this.title+"</div>");this.titleElement.addClass(this.toThemeProperty("jqx-item"));this.titleElement.addClass(this.toThemeProperty("jqx-menu-title"));this.titleElement.prependTo(this.host);a("<div style='clear:both;'></div>").insertAfter(this.minimizedItem);e.minimizedHidden=true;var b=function(j){e.minimizedHidden=true;e.minimizedItem.show();var i=false;if(e.minimizedItem.css("float")=="right"){i=true}h.animate({left:!i?-h.outerWidth():e.host.coord().left+e.host.width()+h.width(),opacity:0},e.animationHideDuration,function(){h.find("ul:first").children().hide();h.hide()})};var f=function(k){if(e.minimizedHidden){h.find("ul:first").children().show();e.minimizedHidden=false;h.show();h.css("opacity",0);h.css("left",-h.outerWidth());var j=false;var i=h.width();if(e.minimizedItem.css("float")=="right"){h.css("left",e.host.coord().left+e.host.width()+i);j=true}h.css("top",e.host.coord().top+e.host.height());h.animate({left:!j?e.host.coord().left:e.host.coord().left+e.host.width()-i,opacity:0.95},e.animationShowDuration,function(){})}else{b(k)}e._raiseEvent("2",{type:"mouse",item:e.minimizedItem[0],event:k});e._setSize()};this.addHandler(a(window),"orientationchange.jqxmenu"+this.element.id,function(i){setTimeout(function(){if(!e.minimizedHidden){var j=h.width();var k=false;var j=h.width();if(e.minimizedItem.css("float")=="right"){k=true}h.css("top",e.host.coord().top+e.host.height());h.css({left:!k?e.host.coord().left:e.host.coord().left+e.host.width()-j})}},25)});this.addHandler(this.minimizedItem,"click",function(i){f(i)})},restore:function(){if(!this.minimized){return}this.host.find("ul").removeClass(this.toThemeProperty("jqx-menu-ul-minimized"));this.host.removeClass(this.toThemeProperty("jqx-menu-minimized"));this.minimized=false;this.mode=this._tmpMode;if(this.minimizedItem){this.minimizedItem.remove()}var d=a("#menuWrapper"+this.element.id);d.remove();if(this.source){var b=this.loadItems(this.source);this.element.innerHTML=b;this._tmpHTML=b}this.element.innerHTML=this._tmpHTML;if(this.element.innerHTML.indexOf("UL")){var c=this.host.find("ul:first");if(c.length>0){this._createMenu(c[0])}}this._setSize();this._render()},isTouchDevice:function(){if(this._isTouchDevice!=undefined){return this._isTouchDevice}var b=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){b=true}else{if(this.touchMode==false){b=false}}if(b){this.host.addClass(this.toThemeProperty("jqx-touch"));a(".jqx-menu-item").addClass(this.toThemeProperty("jqx-touch"))}this._isTouchDevice=b;return b},refresh:function(b){if(!b){this._setSize()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},_closeAll:function(f){var d=f!=null?f.data:this;var b=d.items;a.each(b,function(){var e=this;if(e.hasItems==true){if(e.isOpen){d._closeItem(d,e)}}});if(d.mode=="popup"){if(f!=null){var c=d._isRightClick(f);if(!c){d.close()}}}},closeItem:function(e){if(e==null){return false}var b=e;var c=document.getElementById(b);var d=this;a.each(d.items,function(){var f=this;if(f.isOpen==true&&f.element==c){d._closeItem(d,f);if(f.parentId){}}});return true},openItem:function(e){if(e==null){return false}var b=e;var c=document.getElementById(b);var d=this;a.each(d.items,function(){var f=this;if(f.isOpen==false&&f.element==c){d._openItem(d,f);if(f.parentId){d.openItem(f.parentId)}}});return true},_getClosedSubMenuOffset:function(c){var b=a(c.subMenuElement);var f=-b.outerHeight();var e=-b.outerWidth();var d=c.level==0&&this.mode=="horizontal";if(d){e=0}else{f=0}switch(c.openVerticalDirection){case"up":case"center":f=b.outerHeight();break}switch(c.openHorizontalDirection){case this._getDir("left"):if(d){e=0}else{e=b.outerWidth()}break;case"center":if(d){e=0}else{e=b.outerWidth()}break}return{left:e,top:f}},_closeItem:function(l,o,g,c){if(l==null||o==null){return false}var j=a(o.subMenuElement);var b=o.level==0&&this.mode=="horizontal";var f=this._getClosedSubMenuOffset(o);var m=f.top;var e=f.left;var i=a(o.element);var k=j.closest("div.jqx-menu-popup");if(k!=null){k.removeClass("show");var h=l.animationHideDelay;if(c==true){h=0}if(j.data("timer")&&j.data("timer").show!=null){clearTimeout(j.data("timer").show);j.data("timer").show=null}var n=function(){o.isOpen=false;if(b){j.stop().animate({top:m},l.animationHideDuration,function(){a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-top-selected"));a(o.element).removeClass(l.toThemeProperty("jqx-rc-b-expanded"));k.removeClass(l.toThemeProperty("jqx-rc-t-expanded"));var p=a(o.arrow);if(p.length>0&&l.showTopLevelArrows){p.removeClass();if(o.openVerticalDirection=="down"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-down"));p.addClass(l.toThemeProperty("jqx-icon-arrow-down"))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-up"));p.addClass(l.toThemeProperty("jqx-icon-arrow-up"))}}a.jqx.aria(a(o.element),"aria-expanded",false);k.css({display:"none"});if(l.animationHideDuration==0){j.css({top:m})}l._raiseEvent("1",o)})}else{if(!a.jqx.browser.msie){}j.stop().animate({left:e},l.animationHideDuration,function(){if(l.animationHideDuration==0){j.css({left:e})}if(o.level>0){a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-selected"));var p=a(o.arrow);if(p.length>0){p.removeClass();if(o.openHorizontalDirection!="left"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-"+l._getDir("right")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("right")))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-"+l._getDir("left")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("left")))}}}else{a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-top-selected"));var p=a(o.arrow);if(p.length>0){p.removeClass();if(o.openHorizontalDirection!="left"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-top-"+l._getDir("right")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("right")))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-top-"+l._getDir("left")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("left")))}}}a.jqx.aria(a(o.element),"aria-expanded",false);k.css({display:"none"});l._raiseEvent("1",o)})}};if(h>0){if(j.data("timer")){j.data("timer").hide=setTimeout(function(){n()},h)}}else{n()}if(g!=undefined&&g){var d=j.children();a.each(d,function(){if(l.menuElements[this.id]&&l.menuElements[this.id].isOpen){var p=a(l.menuElements[this.id].subMenuElement);l._closeItem(l,l.menuElements[this.id],true,true)}})}}},getSubItems:function(i,h){if(i==null){return false}var g=this;var c=new Array();if(h!=null){a.extend(c,h)}var d=i;var f=this.menuElements[d];var b=a(f.subMenuElement);var e=b.find(".jqx-menu-item");a.each(e,function(){c[this.id]=g.menuElements[this.id];var j=g.getSubItems(this.id,c);a.extend(c,j)});return c},disable:function(g,d){if(g==null){return}var c=g;var f=this;if(this.menuElements[c]){var e=this.menuElements[c];e.disabled=d;var b=a(e.element);e.element.disabled=d;a.each(b.children(),function(){this.disabled=d});if(d){b.addClass(f.toThemeProperty("jqx-menu-item-disabled"));b.addClass(f.toThemeProperty("jqx-fill-state-disabled"))}else{b.removeClass(f.toThemeProperty("jqx-menu-item-disabled"));b.removeClass(f.toThemeProperty("jqx-fill-state-disabled"))}}},getItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];return b}return null},disableItem:function(b){this.disable(b,true)},hideItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];a(b.element).hide()}},showItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];a(b.element).show()}},enableItem:function(b){this.disable(b,false)},_setItemProperty:function(g,c,f){if(g==null){return}var b=g;var e=this;if(this.menuElements[b]){var d=this.menuElements[b];if(d[c]){d[c]=f}}},setItemOpenDirection:function(d,c,e){if(d==null){return}var j=d;var g=this;var f=a.jqx.browser.msie&&a.jqx.browser.version<8;if(this.menuElements[j]){var i=this.menuElements[j];if(c!=null){i.openHorizontalDirection=c;if(i.hasItems&&i.level>0){var h=a(i.element);if(h!=undefined){var b=a(i.arrow);if(i.arrow==null){b=a('<span id="arrow'+h[0].id+'"></span>');if(!f){b.prependTo(h)}else{b.appendTo(h)}i.arrow=b[0]}b.removeClass();if(i.openHorizontalDirection=="left"){b.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("left")));b.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("left")))}else{b.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));b.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}b.css("visibility","inherit");if(!f){b.css("display","block");b.css("float","right")}else{b.css("display","inline-block");b.css("float","none")}}}}if(e!=null){i.openVerticalDirection=e;var b=a(i.arrow);var h=a(i.element);if(!g.showTopLevelArrows){return}if(h!=undefined){if(i.arrow==null){b=a('<span id="arrow'+h[0].id+'"></span>');if(!f){b.prependTo(h)}else{b.appendTo(h)}i.arrow=b[0]}b.removeClass();if(i.openVerticalDirection=="down"){b.addClass(g.toThemeProperty("jqx-menu-item-arrow-down"));b.addClass(g.toThemeProperty("jqx-icon-arrow-down"))}else{b.addClass(g.toThemeProperty("jqx-menu-item-arrow-up"));b.addClass(g.toThemeProperty("jqx-icon-arrow-up"))}b.css("visibility","inherit");if(!f){b.css("display","block");b.css("float","right")}else{b.css("display","inline-block");b.css("float","none")}}}}},_getSiblings:function(d){var e=new Array();var b=0;for(var c=0;c<this.items.length;c++){if(this.items[c]==d){continue}if(this.items[c].parentId==d.parentId&&this.items[c].hasItems){e[b++]=this.items[c]}}return e},_openItem:function(s,r,q){if(s==null||r==null){return false}if(r.isOpen){return false}if(r.disabled){return false}if(s.disabled){return false}var l=s.popupZIndex;if(q!=undefined){l=q}var e=s.animationHideDuration;s.animationHideDuration=0;s._closeItem(s,r,true,true);s.animationHideDuration=e;a(r.element).focus();var f=[5,5];var t=a(r.subMenuElement);if(t!=null){t.stop()}if(t.data("timer")&&t.data("timer").hide!=null){clearTimeout(t.data("timer").hide)}var o=t.closest("div.jqx-menu-popup");var h=a(r.element);var i=r.level==0?this._getOffset(r.element):h.position();if(r.level>0&&this.hasTransform){var p=parseInt(h.coord().top)-parseInt(this._getOffset(r.element).top);i.top+=p}if(r.level==0&&this.mode=="popup"){i=h.coord()}var j=r.level==0&&this.mode=="horizontal";var b=j?i.left:this.menuElements[r.parentId]!=null&&this.menuElements[r.parentId].subMenuElement!=null?parseInt(a(a(this.menuElements[r.parentId].subMenuElement).closest("div.jqx-menu-popup")).outerWidth())-f[0]:parseInt(t.outerWidth());o.css({visibility:"visible",display:"block",left:b,top:j?i.top+h.outerHeight():i.top,zIndex:l});t.css("display","block");if(this.mode!="horizontal"&&r.level==0){var d=this._getOffset(this.element);o.css("left",-1+d.left+this.host.outerWidth());t.css("left",-t.outerWidth())}else{var c=this._getClosedSubMenuOffset(r);t.css("left",c.left);t.css("top",c.top)}o.css({height:parseInt(t.outerHeight())+parseInt(f[1])+"px"});var n=0;var g=0;switch(r.openVerticalDirection){case"up":if(j){t.css("top",t.outerHeight());n=f[1];var k=parseInt(t.parent().css("padding-bottom"));if(isNaN(k)){k=0}if(k>0){o.addClass(this.toThemeProperty("jqx-menu-popup-clear"))}t.css("top",t.outerHeight()-k);o.css({display:"block",top:i.top-o.outerHeight(),zIndex:l})}else{n=f[1];t.css("top",t.outerHeight());o.css({display:"block",top:i.top-o.outerHeight()+f[1]+h.outerHeight(),zIndex:l})}break;case"center":if(j){t.css("top",0);o.css({display:"block",top:i.top-o.outerHeight()/2+f[1],zIndex:l})}else{t.css("top",0);o.css({display:"block",top:i.top+h.outerHeight()/2-o.outerHeight()/2+f[1],zIndex:l})}break}switch(r.openHorizontalDirection){case this._getDir("left"):if(j){o.css({left:i.left-(o.outerWidth()-h.outerWidth()-f[0])})}else{g=0;t.css("left",o.outerWidth());o.css({left:i.left-(o.outerWidth())+2*r.level})}break;case"center":if(j){o.css({left:i.left-(o.outerWidth()/2-h.outerWidth()/2-f[0]/2)})}else{o.css({left:i.left-(o.outerWidth()/2-h.outerWidth()/2-f[0]/2)});t.css("left",o.outerWidth())}break}if(j){if(parseInt(t.css("top"))==n){r.isOpen=true;return}}else{if(parseInt(t.css("left"))==g){r.isOpen==true;return}}a.each(s._getSiblings(r),function(){s._closeItem(s,this,true,true)});var m=a.data(s.element,"animationHideDelay");s.animationHideDelay=m;if(this.autoCloseInterval>0){if(this.host.data("autoclose")!=null&&this.host.data("autoclose").close!=null){clearTimeout(this.host.data("autoclose").close)}if(this.host.data("autoclose")!=null){this.host.data("autoclose").close=setTimeout(function(){s._closeAll()},this.autoCloseInterval)}}if(t.data("timer")){t.data("timer").show=setTimeout(function(){if(o!=null){if(j){t.stop();t.css("left",g);if(!a.jqx.browser.msie){}h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-top-selected"));if(r.openVerticalDirection=="down"){a(r.element).addClass(s.toThemeProperty("jqx-rc-b-expanded"));o.addClass(s.toThemeProperty("jqx-rc-t-expanded"));o.addClass(s.toThemeProperty("show"))}else{a(r.element).addClass(s.toThemeProperty("jqx-rc-t-expanded"));o.addClass(s.toThemeProperty("jqx-rc-b-expanded"));o.addClass(s.toThemeProperty("show"))}var u=a(r.arrow);if(u.length>0&&s.showTopLevelArrows){u.removeClass();if(r.openVerticalDirection=="down"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-down-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-down"))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-up-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-up"))}}if(s.animationShowDuration==0){t.css({top:n});r.isOpen=true;s._raiseEvent("0",r);a.jqx.aria(a(r.element),"aria-expanded",true)}else{t.animate({top:n},s.animationShowDuration,s.easing,function(){r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true);s._raiseEvent("0",r)})}}else{t.stop();t.css("top",n);o.addClass(s.toThemeProperty("show"));if(!a.jqx.browser.msie){}if(r.level>0){h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-selected"));var u=a(r.arrow);if(u.length>0){u.removeClass();if(r.openHorizontalDirection!="left"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("right")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("right")))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("left")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("left")))}}}else{h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-top-selected"));var u=a(r.arrow);if(u.length>0){u.removeClass();if(r.openHorizontalDirection!="left"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("right")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("right")))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("left")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("left")))}}}if(!a.jqx.browser.msie){}if(s.animationShowDuration==0){t.css({left:g});s._raiseEvent("0",r);r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true)}else{t.animate({left:g},s.animationShowDuration,s.easing,function(){s._raiseEvent("0",r);r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true)})}}}},this.animationShowDelay)}},_getDir:function(b){switch(b){case"left":return !this.rtl?"left":"right";case"right":return this.rtl?"left":"right"}return"left"},_applyOrientation:function(i,d){var g=this;var f=0;g.host.removeClass(g.toThemeProperty("jqx-menu-horizontal"));g.host.removeClass(g.toThemeProperty("jqx-menu-vertical"));g.host.removeClass(g.toThemeProperty("jqx-menu"));g.host.removeClass(g.toThemeProperty("jqx-widget"));g.host.addClass(g.toThemeProperty("jqx-widget"));g.host.addClass(g.toThemeProperty("jqx-menu"));if(i!=undefined&&d!=undefined&&d=="popup"){if(g.host.parent().length>0&&g.host.parent().parent().length>0&&g.host.parent().parent()[0]==document.body){var h=a.data(document.body,"jqxMenuOldHost"+g.element.id);if(h!=null){var e=g.host.closest("div.jqx-menu-wrapper");e.remove();e.appendTo(h);g.host.css("display","block");g.host.css("visibility","visible");e.css("display","block");e.css("visibility","visible")}}}else{if(i==undefined&&d==undefined){a.data(document.body,"jqxMenuOldHost"+g.element.id,g.host.parent()[0])}}if(g.autoOpenPopup){if(g.mode=="popup"){g.addHandler(a(document),"contextmenu."+g.element.id,function(j){return false});g.addHandler(a(document),"mousedown.menu"+g.element.id,function(j){g._openContextMenu(j)})}else{g.removeHandler(a(document),"contextmenu."+g.element.id);g.removeHandler(a(document),"mousedown.menu"+g.element.id)}}else{g.removeHandler(a(document),"contextmenu."+g.element.id);g.removeHandler(a(document),"mousedown.menu"+g.element.id);g.addHandler(a(document),"contextmenu."+g.element.id,function(j){if(j.target&&j.target.className.indexOf&&j.target.className.indexOf("jqx-menu")>=0){return false}})}if(g.rtl){g.host.addClass(g.toThemeProperty("jqx-rtl"))}switch(g.mode){case"horizontal":g.host.addClass(g.toThemeProperty("jqx-widget-header"));g.host.addClass(g.toThemeProperty("jqx-menu-horizontal"));a.each(g.items,function(){var m=this;var k=a(m.element);var l=a(m.arrow);l.removeClass();if(m.hasItems&&m.level>0){var l=a('<span style="border: none; background-color: transparent;" id="arrow'+k[0].id+'"></span>');l.prependTo(k);l.css("float",g._getDir("right"));l.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));l.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")));m.arrow=l[0]}if(m.level==0){a(m.element).css("float",g._getDir("left"));if(!m.ignoretheme&&m.hasItems&&g.showTopLevelArrows){var l=a('<span style="border: none; background-color: transparent;" id="arrow'+k[0].id+'"></span>');var j=a.jqx.browser.msie&&a.jqx.browser.version<8;if(m.arrow==null){if(!j){l.prependTo(k)}else{l.appendTo(k)}}else{l=a(m.arrow)}if(m.openVerticalDirection=="down"){l.addClass(g.toThemeProperty("jqx-menu-item-arrow-down"));l.addClass(g.toThemeProperty("jqx-icon-arrow-down"))}else{l.addClass(g.toThemeProperty("jqx-menu-item-arrow-up"));l.addClass(g.toThemeProperty("jqx-icon-arrow-up"))}l.css("visibility","inherit");if(!j){l.css("display","block");l.css("float","right")}else{l.css("display","inline-block")}m.arrow=l[0]}else{if(!m.ignoretheme&&m.hasItems&&!g.showTopLevelArrows){if(m.arrow!=null){var l=a(m.arrow);l.remove();m.arrow=null}}}f=Math.max(f,k.height())}});break;case"vertical":case"popup":case"simple":g.host.addClass(g.toThemeProperty("jqx-menu-vertical"));a.each(g.items,function(){var l=this;var j=a(l.element);if(l.hasItems&&!l.ignoretheme){if(l.arrow){a(l.arrow).remove()}if(g.mode=="simple"){return true}var k=a('<span style="border: none; background-color: transparent;" id="arrow'+j[0].id+'"></span>');k.prependTo(j);k.css("float","right");if(l.level==0){k.addClass(g.toThemeProperty("jqx-menu-item-arrow-top-"+g._getDir("right")));k.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}else{k.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));k.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}l.arrow=k[0]}j.css("float","none")});if(g.mode=="popup"){g.host.addClass(g.toThemeProperty("jqx-widget-content"));g.host.wrap('<div tabindex=0 class="jqx-menu-wrapper" style="z-index:'+g.popupZIndex+'; border: none; background-color: transparent; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: visible;"></div>');var e=g.host.closest("div.jqx-menu-wrapper");g.host.addClass(g.toThemeProperty("jqx-popup"));e[0].id="menuWrapper"+g.element.id;e.appendTo(a(document.body));g.addHandler(e,"keydown",function(j){return g.handleKeyDown(j)})}else{g.host.addClass(g.toThemeProperty("jqx-widget-header"))}if(g.mode=="popup"){var b=g.host.height();g.host.css("position","absolute");g.host.css("top","0");g.host.css("left","0");if(g.mode!="simple"){g.host.height(b);g.host.css("display","none")}}break}var c=g.isTouchDevice();if(g.autoCloseOnClick){g.removeHandler(a(document),"mousedown.menu"+g.element.id,g._closeAfterClick);g.addHandler(a(document),"mousedown.menu"+g.element.id,g._closeAfterClick,g);if(c){g.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+g.element.id,g._closeAfterClick,g);g.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+g.element.id,g._closeAfterClick,g)}}},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},_getOffset:function(c){var e=a.jqx.mobile.isSafariMobileBrowser();var i=a(c).coord(true);var h=i.top;var g=i.left;if(a("body").css("border-top-width")!="0px"){h=parseInt(h)+this._getBodyOffset().top}if(a("body").css("border-left-width")!="0px"){g=parseInt(g)+this._getBodyOffset().left}var d=a.jqx.mobile.isWindowsPhone();var f=a.jqx.mobile.isTouchDevice();if(this.hasTransform||(e!=null&&e)||d||f){var b={left:a.jqx.mobile.getLeftPos(c),top:a.jqx.mobile.getTopPos(c)};return b}else{return{left:g,top:h}}},_isRightClick:function(c){var b;if(!c){var c=window.event}if(c.which){b=(c.which==3)}else{if(c.button){b=(c.button==2)}}return b},_openContextMenu:function(d){var c=this;var b=c._isRightClick(d);if(b){c.open(parseInt(d.clientX)+5,parseInt(d.clientY)+5)}},close:function(){var c=this;if(!this.element){return}var d=a.data(this.element,"contextMenuOpened"+this.element.id);if(d){var b=this.host;c.host.removeClass("jqx-popup-show");a.each(c.items,function(){var e=this;if(e.hasItems){c._closeItem(c,e)}});a.each(c.items,function(){var f=this;if(f.isOpen==true){var e=a(f.subMenuElement);var g=e.closest("div.jqx-menu-popup");g.hide(this.animationHideDuration)}});this.host.hide(this.animationHideDuration);a.data(c.element,"contextMenuOpened"+this.element.id,false);c._raiseEvent("1",c);c._raiseEvent("5")}},open:function(e,d){if(this.mode=="popup"){var c=0;if(this.host.css("display")=="block"){this.close();c=this.animationHideDuration}var b=this;if(e==undefined||e==null){e=0}if(d==undefined||d==null){d=0}setTimeout(function(){b.host.show(b.animationShowDuration);b.host.css("visibility","visible");b.host.addClass("jqx-popup-show");a.data(b.element,"contextMenuOpened"+b.element.id,true);b._raiseEvent("0",b);b._raiseEvent("4",{left:e,top:d});b.host.css("z-index",b.popupZIndex);if(e!=undefined&&d!=undefined){b.host.css({left:e,top:d})}b.focus()},c)}},_renderHover:function(c,e,b){var d=this;if(!e.ignoretheme){this.addHandler(c,"mouseenter",function(){d.hoveredItem=e;if(!e.disabled&&!e.separator&&d.enableHover&&!d.disabled){if(e.level>0){c.addClass(d.toThemeProperty("jqx-fill-state-hover"));c.addClass(d.toThemeProperty("jqx-menu-item-hover"))}else{c.addClass(d.toThemeProperty("jqx-fill-state-hover"));c.addClass(d.toThemeProperty("jqx-menu-item-top-hover"))}}});this.addHandler(c,"mouseleave",function(){if(!e.disabled&&!e.separator&&d.enableHover&&!d.disabled){if(e.level>0){c.removeClass(d.toThemeProperty("jqx-fill-state-hover"));c.removeClass(d.toThemeProperty("jqx-menu-item-hover"))}else{c.removeClass(d.toThemeProperty("jqx-fill-state-hover"));c.removeClass(d.toThemeProperty("jqx-menu-item-top-hover"))}}})}},_closeAfterClick:function(c){var b=c!=null?c.data:this;var d=false;if(b.autoCloseOnClick){a.each(a(c.target).parents(),function(){if(this.className.indexOf){if(this.className.indexOf("jqx-menu")!=-1){d=true;return false}}});if(!d){c.data=b;b._closeAll(c)}}},_autoSizeHorizontalMenuItems:function(){var c=this;if(c.autoSizeMainItems&&this.mode=="horizontal"){var b=this.maxHeight;if(parseInt(b)>parseInt(this.host.height())){b=parseInt(this.host.height())}b=parseInt(this.host.height());a.each(this.items,function(){var m=this;var j=a(m.element);if(m.level==0&&b>0){var d=j.children().length>0?parseInt(j.children().height()):j.height();var g=c.host.find("ul:first");var h=parseInt(g.css("padding-top"));var n=parseInt(g.css("margin-top"));var k=b-2*(n+h);var i=parseInt(k)/2-d/2;var e=parseInt(i);var l=parseInt(i);j.css("padding-top",e);j.css("padding-bottom",l);if(parseInt(j.outerHeight())>k){var f=1;j.css("padding-top",e-f);e=e-f}}})}a.each(this.items,function(){var g=this;var e=a(g.element);if(g.hasItems&&g.level>0){if(g.arrow){var f=a(g.arrow);var d=a(g.element).height();if(d>15){f.css("margin-top",(d-15)/2)}}}})},_nextVisibleItem:function(c,d){if(c==null||c==undefined){return null}var b=c;while(b!=null){b=b.nextItem;if(this._isVisible(b)&&!b.disabled&&b.type!=="separator"){if(this.minimized){return b}if(d!=undefined){if(b&&b.level!=d){continue}}return b}}return null},_prevVisibleItem:function(c,d){if(c==null||c==undefined){return null}var b=c;while(b!=null){b=b.prevItem;if(this._isVisible(b)&&!b.disabled&&b.type!=="separator"){if(this.minimized){return b}if(d!=undefined){if(b&&b.level!=d){continue}}return b}}return null},_parentItem:function(d){if(d==null||d==undefined){return null}var c=d.parentElement;if(!c){return null}var b=null;a.each(this.items,function(){if(this.element==c){b=this;return false}});return b},_isElementVisible:function(b){if(b==null){return false}if(a(b).css("display")!="none"&&a(b).css("visibility")!="hidden"){return true}return false},_isVisible:function(c){if(c==null||c==undefined){return false}if(!this._isElementVisible(c.element)){return false}var b=this._parentItem(c);if(b==null){return true}if(this.minimized){return true}if(b!=null){if(!this._isElementVisible(b.element)){return false}if(b.isOpen||this.minimized){while(b!=null){b=this._parentItem(b);if(b!=null&&!this._isElementVisible(b.element)){return false}if(b!=null&&!b.isOpen){return false}}}else{return false}}return true},_render:function(f,g){if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.host.addClass(this.toThemeProperty("jqx-menu-disabled"))}if(this.host.attr("tabindex")==undefined){this.host.attr("tabindex",0)}var i=this.popupZIndex;var d=[5,5];var h=this;a.data(h.element,"animationHideDelay",h.animationHideDelay);var e=this.isTouchDevice();var c=e&&(a.jqx.mobile.isWindowsPhone()||navigator.userAgent.indexOf("Touch")>=0);var j=false;if(navigator.platform.toLowerCase().indexOf("win")!=-1){if(navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0){this.touchDevice=true}else{if(navigator.userAgent.indexOf("Touch")>=0){var b=("MSPointerDown" in window);if(b||a.jqx.mobile.isWindowsPhone()||navigator.userAgent.indexOf("ARM")>=0){j=true;c=true;h.clickToOpen=true;h.autoCloseOnClick=false;h.enableHover=false}}}}a.data(document.body,"menuel",this);this.hasTransform=a.jqx.utilities.hasTransform(this.host);this._applyOrientation(f,g);this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus");this.addHandler(this.host,"blur",function(k){if(h.keyboardNavigation){if(h.activeItem){if(h.mode==="popup"){if(document.activeElement&&document.activeElement.className.indexOf("jqx-menu-wrapper")>=0){return}}a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=null}}});this.addHandler(this.host,"focus",function(k){if(h.keyboardNavigation){if(!h.activeItem){if(h.hoveredItem){a(h.hoveredItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.hoveredItem}else{var l=function(){if(!a.jqx.isHidden(a(h.items[0].element))){a(h.items[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.items[0]}else{var m=h._nextVisibleItem(h.items[0],0);if(m){a(m.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=m}}};if(!h.activeItem){l()}else{if(!a.jqx.isHidden(a(h.activeItem.element))){a(h.activeItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"))}else{a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));l()}}}}}});this.removeHandler(this.host,"keydown.menu"+this.element.id);h.handleKeyDown=function(k){if(h.keyboardNavigation){if(k.target.nodeName.toLowerCase()==="input"){return true}var q=null;var o=null;a.each(h.items,function(){var A=this;if(this.disabled){return true}if(this.element.className.indexOf("pressed")>=0){o=this}if(this.element.className.indexOf("focus")>=0){q=this;return false}});if(!q&&o){q=o;return false}if(!q){a(h.items[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.items[0];q=h.activeItem;return false}var t=false;if(k.keyCode==27){k.data=h;h._closeAll(k);if(q){var z=q;while(z!=null){if(z.parentItem){z=z.parentItem}else{a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=z;a(h.activeItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));z=z.parentItem}}}t=true}if(k.keyCode==13){if(q){t=true;h._raiseEvent("2",{item:q.element,event:k,type:"keyboard"});var r=q.anchor!=null?a(q.anchor):null;if(r!=null&&r.length>0){var l=r.attr("href");var u=r.attr("target");if(l!=null){if(u!=null){window.open(l,u)}else{window.location=l}}}k.preventDefault();k.stopPropagation();a(q.element).focus()}}var n=function(D){if(D==null){return new Array()}var C=new Array();var A=0;for(var B=0;B<h.items.length;B++){if(h.items[B].parentId==D.parentId){C[A++]=h.items[B]}}return C};var v="";switch(k.keyCode){case 40:v="down";break;case 38:v="up";break;case 39:v="right";break;case 37:v="left";break}if(q&&q.openHorizontalDirection==="left"&&v==="left"){v="right"}if(q&&q.openHorizontalDirection==="left"&&v==="right"){v="left"}if(q&&q.openVerticalDirection==="top"&&v==="top"){v="bottom"}if(q&&q.openVerticalDirection==="top"&&v==="bottom"){v="top"}if(h.rtl){if(v==="right"){v="left"}else{if(v==="left"){v="right"}}}if(v==="right"&&!h.minimized){if(k.altKey&&(q.level!=0&&q.hasItems||h.mode!="horizontal")){h._openItem(h,q)}else{var x=h._nextVisibleItem(q,0);var m=h._nextVisibleItem(q);var w=n(m);if(!x){x=m}if(x&&((x.parentId===q.parentId&&x.level==0&&h.mode=="horizontal")||(m.id==w[0].id&&m.level!=0))){if(m.id==w[0].id&&((q.level!=0)||(q.level==0&&h.mode!="horizontal"))){x=m}a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}k.preventDefault();k.stopPropagation()}if(v==="left"&&!h.minimized){if(k.altKey&&((q.level!=0&&h.mode!=="horizontal")||(q.level>1&&h.mode==="horizontal")||(q.level==1&&q.hasItems&&h.mode==="horizontal"))){if(q.hasItems){h._closeItem(h,q)}else{if(q.parentItem){h._closeItem(h,q.parentItem);a(q.parentItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=q.parentItem}}}else{var x=h._prevVisibleItem(q,0);var y=q.parentItem;if(x&&(x.parentId===q.parentId&&x.level==0&&h.mode=="horizontal")){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(!(y&&y.level==0&&h.mode=="horizontal")&&y&&y.level==q.level-1){a(y.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=y}}}k.preventDefault();k.stopPropagation()}if(v==="down"){if(k.altKey){if(q.level==0&&q.hasItems){h._openItem(h,q)}if(h.minimized){if(h.minimizedHidden){h.minimizedItem.trigger("click")}}}else{var x=h._nextVisibleItem(q,q.level);var w=n(x);if(h.minimized&&x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(x&&(x.parentId===q.parentId||(x.id==w[0].id&&h.mode=="horizontal"))){if(!(x.level==0&&h.mode=="horizontal")){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}if(h.mode==="horizontal"&&q.level===0&&q.isOpen&&q.hasItems){var x=h._nextVisibleItem(q);a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}}k.preventDefault();k.stopPropagation()}else{if(v==="up"){if(k.altKey){if(q.parentItem&&q.parentItem.level==0){h._closeItem(h,q.parentItem);a(q.parentItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=q.parentItem}else{if(q.parentItem===null&&q.level===0&&h.mode==="horizontal"){h._closeItem(h,q)}}if(h.minimized){if(!h.minimizedHidden){h.minimizedItem.trigger("click")}}}else{var x=h._prevVisibleItem(q,q.level);var w=n(q);if(h.minimized&&x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(x&&(x.parentId===q.parentId||(x.id==q.parentId&&x.level==0&&h.mode=="horizontal"))){if(!(x.level==0&&h.mode==="horizontal"&&q.level===0)){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}else{if(q&&q.id==w[0].id&&q.parentItem&&q.parentItem.level===0&&h.mode==="horizontal"){var x=q.parentItem;a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}}}k.preventDefault();k.stopPropagation()}}if(k.keyCode==9){var x=k.shiftKey?h._prevVisibleItem(q):h._nextVisibleItem(q);if(x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x;k.preventDefault();k.stopPropagation()}else{if(h.lockFocus){var w=new Array();var s=0;for(var p=0;p<h.items.length;p++){if(h.items[p]==q){continue}if(h.items[p].parentId==q.parentId){w[s++]=h.items[p]}}if(w.length>0){if(k.shiftKey){a(w[w.length-1].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=w[w.length-1]}else{a(w[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=w[0]}a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"))}k.preventDefault();k.stopPropagation()}else{if(q){a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=null}}}}}else{return true}};this.addHandler(this.host,"keydown.menu"+this.element.id,function(k){h.handleKeyDown(k)});if(h.enableRoundedCorners){this.host.addClass(h.toThemeProperty("jqx-rc-all"))}a.each(this.items,function(){var r=this;var n=a(r.element);n.attr("role","menuitem");if(h.enableRoundedCorners){n.addClass(h.toThemeProperty("jqx-rc-all"))}h.removeHandler(n,"click");h.addHandler(n,"click",function(w){if(r.disabled){return}if(h.disabled){return}if(h.keyboardNavigation){if(h.activeItem){a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"))}h.activeItem=r;a(r.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));if(h.minimized){w.stopPropagation()}}h._raiseEvent("2",{type:"mouse",item:r.element,event:w});if(!h.autoOpen){if(r.level>0){if(h.autoCloseOnClick&&!e&&!h.clickToOpen){w.data=h;h._closeAll(w)}}}else{if(h.autoCloseOnClick&&!e&&!h.clickToOpen){if(r.closeOnClick){w.data=h;h._closeAll(w)}}}if(e&&h.autoCloseOnClick){w.data=h;if(!r.hasItems){h._closeAll(w)}}if(w.target.tagName!="A"&&w.target.tagName!="a"){var u=r.anchor!=null?a(r.anchor):null;if(u!=null&&u.length>0){var t=u.attr("href");var v=u.attr("target");if(t!=null){if(v!=null){window.open(t,v)}else{window.location=t}}}}});h.removeHandler(n,"mouseenter");h.removeHandler(n,"mouseleave");if(!c&&h.mode!="simple"){h._renderHover(n,r,e)}if(r.subMenuElement!=null){var o=a(r.subMenuElement);if(h.mode=="simple"){o.show();return true}o.wrap('<div class="jqx-menu-popup '+h.toThemeProperty("jqx-menu-popup")+'" style="border: none; background-color: transparent; z-index:'+i+'; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: hidden;"><div style="background-color: transparent; border: none; position:absolute; overflow:hidden; left: 0; top: 0; right: 0; width: 100%; height: 100%;"></div></div>');o.css({overflow:"hidden",position:"absolute",left:0,display:"inherit",top:-o.outerHeight()});o.data("timer",{});if(r.level>0){o.css("left",-o.outerWidth())}else{if(h.mode=="horizontal"){o.css("left",0)}}i++;var q=a(r.subMenuElement).closest("div.jqx-menu-popup").css({width:parseInt(a(r.subMenuElement).outerWidth())+parseInt(d[0])+"px",height:parseInt(a(r.subMenuElement).outerHeight())+parseInt(d[1])+"px"});var s=n.closest("div.jqx-menu-popup");if(s.length>0){var k=o.css("margin-left");var m=o.css("margin-right");var l=o.css("padding-left");var p=o.css("padding-right");q.addClass("horizontal");q.appendTo(s);o.css("margin-left",k);o.css("margin-right",m);o.css("padding-left",l);o.css("padding-right",p)}else{var k=o.css("margin-left");var m=o.css("margin-right");var l=o.css("padding-left");var p=o.css("padding-right");if(h.mode==="horizontal"){q.addClass("top")}else{q.addClass("horizontal")}q.appendTo(a(document.body));o.css("margin-left",k);o.css("margin-right",m);o.css("padding-left",l);o.css("padding-right",p)}if(!h.clickToOpen){if(e||c){h.removeHandler(n,a.jqx.mobile.getTouchEventName("touchstart"));h.addHandler(n,a.jqx.mobile.getTouchEventName("touchstart"),function(t){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(r.level==0&&!r.isOpen&&h.mode!="popup"){t.data=h;h._closeAll(t)}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}return false})}if(!c){h.addHandler(n,"mouseenter",function(){if(h.autoOpen||(r.level>0&&!h.autoOpen)){clearTimeout(o.data("timer").hide)}if(r.parentId&&r.parentId!=0){if(h.menuElements[r.parentId]){var t=h.menuElements[r.parentId].isOpen;if(!t){return}}}if(h.autoOpen||(r.level>0&&!h.autoOpen)){h._openItem(h,r)}return false});h.addHandler(n,"mousedown",function(){if(!h.autoOpen&&r.level==0){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}}});h.addHandler(n,"mouseleave",function(u){if(h.autoCloseOnMouseLeave){clearTimeout(o.data("timer").hide);var x=a(r.subMenuElement);var t={left:parseInt(u.pageX),top:parseInt(u.pageY)};var w={left:parseInt(x.coord().left),top:parseInt(x.coord().top),width:parseInt(x.outerWidth()),height:parseInt(x.outerHeight())};var v=true;if(w.left-5<=t.left&&t.left<=w.left+w.width+5){if(w.top<=t.top&&t.top<=w.top+w.height){v=false}}if(v){h._closeItem(h,r,true)}}});h.removeHandler(q,"mouseenter");h.addHandler(q,"mouseenter",function(){clearTimeout(o.data("timer").hide)});h.removeHandler(q,"mouseleave");h.addHandler(q,"mouseleave",function(t){if(h.autoCloseOnMouseLeave){clearTimeout(o.data("timer").hide);clearTimeout(o.data("timer").show);if(o!=null){o.stop()}h._closeItem(h,r,true)}})}}else{h.removeHandler(n,"mousedown");h.addHandler(n,"mousedown",function(t){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(r.level==0&&!r.isOpen){t.data=h;h._closeAll(t)}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}})}}});if(this.mode=="simple"){this._renderSimpleMode()}this._autoSizeHorizontalMenuItems();this._raiseEvent("3",this)},_renderSimpleMode:function(){this.host.show()},createID:function(){var b=Math.random()+"";b=b.replace(".","");b="99"+b;b=b/1;while(this.items[b]){b=Math.random()+"";b=b.replace(".","");b=b/1}return"menuItem"+b},_createMenu:function(c,f){if(c==null){return}if(f==undefined){f=true}if(f==null){f=true}var o=this;a(c).addClass("jqx-menu-ul");var u=a(c).find("li");var q=0;this.itemMapping=new Array();for(var j=0;j<u.length;j++){var m=u[j];var s=a(m);if(m.className.indexOf("jqx-menu")==-1&&this.autoGenerate==false){continue}var p=m.id;if(!p){p=this.createID()}if(f){m.id=p;this.items[q]=new a.jqx._jqxMenu.jqxMenuItem();this.menuElements[p]=this.items[q]}q+=1;var t=0;var x=this;var h=s.children();h.each(function(){if(!f){this.className="";if(x.autoGenerate){a(x.items[q-1].subMenuElement)[0].className="";if(!x.minimized){a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-widget-content"))}a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-menu-dropdown"));a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-popup"))}}if(this.className.indexOf("jqx-menu-dropdown")!=-1){if(f){x.items[q-1].subMenuElement=this}return false}else{if(x.autoGenerate&&(this.tagName=="ul"||this.tagName=="UL")){if(f){x.items[q-1].subMenuElement=this}this.className="";if(!x.minimized){a(this).addClass(x.toThemeProperty("jqx-widget-content"))}a(this).addClass(x.toThemeProperty("jqx-menu-dropdown"));a(this).addClass(x.toThemeProperty("jqx-popup"));a(this).attr("role","menu");if(x.rtl){a(this).addClass(x.toThemeProperty("jqx-rc-l"))}else{a(this).addClass(x.toThemeProperty("jqx-rc-r"))}a(this).addClass(x.toThemeProperty("jqx-rc-b"));return false}}});var w=s.parents();w.each(function(){if(this.className.indexOf("jqx-menu-item")!=-1){t=this.id;return false}else{if(x.autoGenerate&&(this.tagName=="li"||this.tagName=="LI")){t=this.id;return false}}});var e=false;var d=m.getAttribute("type");var b=m.getAttribute("ignoretheme")||m.getAttribute("data-ignoretheme");if(b){if(b=="true"||b==true){b=true}}else{b=false}if(!d){d=m.type}else{if(d=="separator"){var e=true}}if(!e){if(t){d="sub"}else{d="top"}}var g=this.items[q-1];if(f){g.id=p;g.parentId=t;g.type=d;g.separator=e;g.element=u[j];var l=s.children("a");g.disabled=m.getAttribute("item-disabled")=="true"?true:false;g.level=s.parents("li").length;g.anchor=l.length>0?l:null;if(g.anchor){a(g.anchor).attr("tabindex",-1)}}g.ignoretheme=b;var n=this.menuElements[t];if(n!=null){if(n.ignoretheme){g.ignoretheme=n.ignoretheme;b=n.ignoretheme}g.parentItem=n;g.parentElement=n.element}if(this.autoGenerate){if(d=="separator"){s.removeClass();s.addClass(this.toThemeProperty("jqx-menu-item-separator"));s.attr("role","separator")}else{if(!b){if(s[0].className.indexOf("jqx-grid-menu-item-touch")>=0){s[0].className=this.toThemeProperty("jqx-grid-menu-item-touch")}else{s[0].className=""}if(this.rtl){s.addClass(this.toThemeProperty("jqx-rtl"))}if(g.level>0&&!x.minimized){s.addClass(this.toThemeProperty("jqx-item"));s.addClass(this.toThemeProperty("jqx-menu-item"))}else{s.addClass(this.toThemeProperty("jqx-item"));s.addClass(this.toThemeProperty("jqx-menu-item-top"))}}}}if(g.disabled){s.addClass(x.toThemeProperty("jqx-menu-item-disabled"));s.addClass(x.toThemeProperty("jqx-fill-state-disabled"))}this.itemMapping[j]={element:u[j],item:g};this.itemMapping["id"+u[j].id]=this.itemMapping[j];if(f&&!b){g.hasItems=s.find("li").length>0;if(g.hasItems){if(g.element){a.jqx.aria(a(g.element),"aria-haspopup",true);if(!g.subMenuElement.id){g.subMenuElement.id=a.jqx.utilities.createId()}a.jqx.aria(a(g.element),"aria-owns",g.subMenuElement.id)}}}}for(var r=0;r<u.length;r++){var v=u[r];if(this.itemMapping["id"+v.id]){var g=this.itemMapping["id"+v.id].item;if(!g){continue}g.prevItem=null;g.nextItem=null;if(r>0){if(this.itemMapping["id"+u[r-1].id]){g.prevItem=this.itemMapping["id"+u[r-1].id].item}}if(r<u.length-1){if(this.itemMapping["id"+u[r+1].id]){g.nextItem=this.itemMapping["id"+u[r+1].id].item}}}}},destroy:function(){var b=this;a.jqx.utilities.resize(b.host,null,true);var d=b.host.closest("div.jqx-menu-wrapper");b.removeHandler(d,"keydown");d.remove();b.removeHandler(a("#menuWrapper"+b.element.id),"keydown");a("#menuWrapper"+b.element.id).remove();b.removeHandler(b.host,"keydown");b.removeHandler(b.host,"focus");b.removeHandler(b.host,"blur");b.removeHandler(a(document),"mousedown.menu"+b.element.id,b._closeAfterClick);b.removeHandler(a(document),"mouseup.menu"+b.element.id,b._closeAfterClick);b.removeHandler(a(document),"contextmenu."+b.element.id);b.removeHandler(b.host,"contextmenu."+b.element.id);a.data(document.body,"jqxMenuOldHost"+b.element.id,null);if(b.isTouchDevice()){b.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+b.element.id,b._closeAfterClick,this)}if(a(window).off){a(window).off("resize.menu"+b.element.id)}a.each(b.items,function(){var g=this;var f=a(g.element);b.removeHandler(f,"click");b.removeHandler(f,"selectstart");b.removeHandler(f,"mouseenter");b.removeHandler(f,"mouseleave");b.removeHandler(f,"mousedown");b.removeHandler(f,"mouseleave");var e=a(g.subMenuElement);var h=e.closest("div.jqx-menu-popup");h.remove();delete this.subMenuElement;delete this.element});a.data(document.body,"menuel",null);delete b.menuElements;b.items=new Array();delete b.items;var c=a.data(b.element,"jqxMenu");if(c){delete c.instance}b.host.removeClass();b.host.remove();delete b.host;delete b.element},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=this.events[g];var e=c;e.owner=this;var f=new a.Event(d);if(g=="2"){e=c.item;e.owner=this;e.clickType=c.type;a.extend(f,c.event);f.type="itemclick"}f.owner=this;f.args=e;var b=this.host.trigger(f);return b},propertiesChangedHandler:function(b,c,e){if(e.width&&e.height&&Object.keys(e).length==2){b._setSize();if(b.mode==="popup"){var d=this.host.closest("div.jqx-menu-wrapper");d[c](e);var f=this.host[0].id;a("#"+f)[c](e)}}},propertyChangedHandler:function(b,d,h,g){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(d=="disabled"){if(b.disabled){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"));b.host.addClass(b.toThemeProperty("jqx-menu-disabled"))}else{b.host.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));b.host.removeClass(b.toThemeProperty("jqx-menu-disabled"))}}if(g==h){return}if(d=="touchMode"){this._isTouchDevice=null;b._render(g,h)}if(d==="width"||d==="height"){b._setSize();if(b.mode==="popup"){var e=this.host.closest("div.jqx-menu-wrapper");e[d](g);var i=this.host[0].id;a("#"+i)[d](g)}return}if(d=="source"){if(b.source!=null){var c=b.loadItems(b.source);b.element.innerHTML=c;var f=b.host.find("ul:first");if(f.length>0){b.refresh();b._createMenu(f[0]);b._render()}}}if(d=="autoCloseOnClick"){if(g==false){b.removeHandler(a(document),"mousedown.menu"+this.element.id,b._closeAll)}else{b.addHandler(a(document),"mousedown.menu"+this.element.id,b,b._closeAll)}}else{if(d=="mode"||d=="width"||d=="height"||d=="showTopLevelArrows"){b.refresh();if(d=="mode"){b._render(g,h)}else{b._applyOrientation()}}else{if(d=="theme"){a.jqx.utilities.setTheme(h,g,b.host)}}}}})})(jqxBaseFramework);(function(a){a.jqx._jqxMenu.jqxMenuItem=function(e,d,c){var b={id:e,parentId:d,parentItem:null,anchor:null,type:c,disabled:false,level:0,isOpen:false,hasItems:false,element:null,subMenuElement:null,arrow:null,openHorizontalDirection:"right",openVerticalDirection:"down",closeOnClick:true};return b}})(jqxBaseFramework);
8
+ (function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxMenu","",{});a.extend(a.jqx._jqxMenu.prototype,{defineInstance:function(){var b={items:new Array(),mode:"horizontal",width:null,height:null,minimizeWidth:"auto",easing:"easeInOutSine",animationShowDuration:200,animationHideDuration:200,autoCloseInterval:0,animationHideDelay:100,animationShowDelay:10,menuElements:new Array(),autoSizeMainItems:false,autoCloseOnClick:true,autoCloseOnMouseLeave:true,enableRoundedCorners:true,disabled:false,autoOpenPopup:true,enableHover:true,autoOpen:true,autoGenerate:true,clickToOpen:false,showTopLevelArrows:false,touchMode:"auto",source:null,popupZIndex:1000,rtl:false,keyboardNavigation:false,lockFocus:false,title:"",events:["shown","closed","itemclick","initialized","open","close"]};if(this===a.jqx._jqxMenu.prototype){return b}a.extend(true,this,b);return b},createInstance:function(c){var b=this;this.host.attr("role","menubar");a.jqx.utilities.resize(this.host,function(){b.refresh()},false,this.mode!="popup");if(this.minimizeWidth!="auto"&&this.minimizeWidth!=null&&this.width&&this.width.toString().indexOf("%")==-1){a(window).resize(function(){b.refresh()})}if(b.isMaterialized()){var g=window.getComputedStyle(this.element);var f=g.getPropertyValue("--jqx-dropdown-animation");if(f){this.animationType=f.trim();if(this.animationType==="transform"){this.animationShowDuration=0;this.animationHideDuration=0;this.animationShowDelay=0}}}this.host.css("outline","none");if(this.source){if(this.source!=null){var d=this.loadItems(this.source);this.element.innerHTML=d}}this._tmpHTML=this.element.innerHTML;if(this.element.innerHTML.indexOf("UL")){var e=this.host.find("ul:first");if(e.length>0){this._createMenu(e[0])}}this.host.data("autoclose",{});this._render();this._setSize();if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.host.attr("hideFocus",true)}},focus:function(){try{if(this.mode==="popup"&&this.keyboardNavigation){var d=this.host.closest("div.jqx-menu-wrapper");d.focus()}if(this.keyboardNavigation){this.host.focus();var c=this;var e=function(){if(!a.jqx.isHidden(a(c.items[0].element))){a(c.items[0].element).addClass(c.toThemeProperty("jqx-fill-state-focus"));c.activeItem=c.items[0]}else{var f=c._nextVisibleItem(c.items[0],0);if(f){a(f.element).addClass(c.toThemeProperty("jqx-fill-state-focus"));c.activeItem=f}}};if(!this.activeItem){e()}else{if(!a.jqx.isHidden(a(this.activeItem.element))){a(this.activeItem.element).addClass(this.toThemeProperty("jqx-fill-state-focus"))}else{a(this.activeItem.element).removeClass(this.toThemeProperty("jqx-fill-state-focus"));e()}}}}catch(b){}},loadItems:function(c,e){if(c==null){return}if(c.length==0){return""}var b=this;this.items=new Array();var d='<ul class="jqx-menu-ul">';if(e){d='<ul class="jqx-menu-ul" style="width:'+e+';">'}a.map(c,function(f){if(f==undefined){return null}d+=b._parseItem(f)});d+="</ul>";return d},_parseItem:function(f){var c="";if(f==undefined){return null}var b=f.label;if(!f.label&&f.html){b=f.html}if(!b){b="Item"}if(typeof f==="string"){b=f}var e=false;if(f.selected!=undefined&&f.selected){e=true}var d=false;if(f.disabled!=undefined&&f.disabled){d=true}c+="<li";if(d){c+=' item-disabled="true" '}if(f.label&&!f.html){c+=' item-label="'+b+'" '}if(f.value!=null){c+=' item-value="'+f.value+'" '}if(f.id!=undefined){c+=' id="'+f.id+'" '}c+=">"+b;if(f.items){if(f.subMenuWidth){c+=this.loadItems(f.items,f.subMenuWidth)}else{c+=this.loadItems(f.items)}}c+="</li>";return c},_setSize:function(){if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}}if(this.height===null){this.host.height("auto")}var g=this;if(this.minimizeWidth!=null&&this.mode!="popup"){var f=a(window).width();if(!a.jqx.response){var e=false;if(navigator.userAgent.match(/Windows|Linux|MacOS/)){var b=navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0;if(!b){e=true}}var c=this.minimizeWidth;if(e&&this.minimizeWidth=="auto"){return}}if(this.minimizeWidth=="auto"&&a.jqx.response){var d=new a.jqx.response();if(d.device.type=="Phone"||d.device.type=="Tablet"){if(!this.minimized){this.minimize()}}}else{if((f<c)&&!this.minimized){this.minimize()}else{if(this.minimized&&f>=c){this.restore()}}}}},minimize:function(){if(this.minimized){return}var e=this;this.host.addClass(this.toThemeProperty("jqx-menu-minimized"));this.minimized=true;this._tmpMode=this.mode;this.mode="simple";var h=this.host.closest("div.jqx-menu-wrapper");h.remove();a("#menuWrapper"+this.element.id).remove();a.each(this.items,function(){var k=this;var j=a(k.element);var i=a(k.subMenuElement);var l=i.closest("div.jqx-menu-popup");l.remove()});if(this.source){var d=this.loadItems(this.source);this.element.innerHTML=d;this._tmpHTML=this.element.innerHTML}this.element.innerHTML=this._tmpHTML;if(this.element.innerHTML.indexOf("UL")){var g=this.host.find("ul:first");if(g.length>0){this._createMenu(g[0])}}this._render();var c=this.host.find("ul:first");c.wrap('<div class="jqx-menu-wrapper" style="z-index:'+this.popupZIndex+'; padding: 0px; display: none; margin: 0px; height: auto; width: auto; position: absolute; top: 0; left: 0; display: block; visibility: visible;"></div>');var h=c.closest("div.jqx-menu-wrapper");h[0].id="menuWrapper"+this.element.id;h.detach();h.appendTo(a(document.body));h.addClass(this.toThemeProperty("jqx-widget"));h.addClass(this.toThemeProperty("jqx-menu"));h.addClass(this.toThemeProperty("jqx-menu-minimized"));h.addClass(this.toThemeProperty("jqx-widget-header"));c.children().hide();h.hide();h.find("ul").addClass(this.toThemeProperty("jqx-menu-ul-minimized"));this.minimizedItem=a("<div></div>");this.minimizedItem.addClass(this.toThemeProperty("jqx-item"));this.minimizedItem.addClass(this.toThemeProperty("jqx-menu-item-top"));this.addHandler(h,"keydown",function(i){return e.handleKeyDown(i)});this.minimizedItem.addClass(this.toThemeProperty("jqx-menu-minimized-button"));this.minimizedItem.prependTo(this.host);this.titleElement=a("<div>"+this.title+"</div>");this.titleElement.addClass(this.toThemeProperty("jqx-item"));this.titleElement.addClass(this.toThemeProperty("jqx-menu-title"));this.titleElement.prependTo(this.host);a("<div style='clear:both;'></div>").insertAfter(this.minimizedItem);e.minimizedHidden=true;var b=function(j){e.minimizedHidden=true;e.minimizedItem.show();var i=false;if(e.minimizedItem.css("float")=="right"){i=true}h.animate({left:!i?-h.outerWidth():e.host.coord().left+e.host.width()+h.width(),opacity:0},e.animationHideDuration,function(){h.find("ul:first").children().hide();h.hide()})};var f=function(k){if(e.minimizedHidden){h.find("ul:first").children().show();e.minimizedHidden=false;h.show();h.css("opacity",0);h.css("left",-h.outerWidth());var j=false;var i=h.width();if(e.minimizedItem.css("float")=="right"){h.css("left",e.host.coord().left+e.host.width()+i);j=true}h.css("top",e.host.coord().top+e.host.height());h.animate({left:!j?e.host.coord().left:e.host.coord().left+e.host.width()-i,opacity:0.95},e.animationShowDuration,function(){})}else{b(k)}e._raiseEvent("2",{type:"mouse",item:e.minimizedItem[0],event:k});e._setSize()};this.addHandler(a(window),"orientationchange.jqxmenu"+this.element.id,function(i){setTimeout(function(){if(!e.minimizedHidden){var j=h.width();var k=false;var j=h.width();if(e.minimizedItem.css("float")=="right"){k=true}h.css("top",e.host.coord().top+e.host.height());h.css({left:!k?e.host.coord().left:e.host.coord().left+e.host.width()-j})}},25)});this.addHandler(this.minimizedItem,"click",function(i){f(i)})},restore:function(){if(!this.minimized){return}this.host.find("ul").removeClass(this.toThemeProperty("jqx-menu-ul-minimized"));this.host.removeClass(this.toThemeProperty("jqx-menu-minimized"));this.minimized=false;this.mode=this._tmpMode;if(this.minimizedItem){this.minimizedItem.remove()}var d=a("#menuWrapper"+this.element.id);d.remove();if(this.source){var b=this.loadItems(this.source);this.element.innerHTML=b;this._tmpHTML=b}this.element.innerHTML=this._tmpHTML;if(this.element.innerHTML.indexOf("UL")){var c=this.host.find("ul:first");if(c.length>0){this._createMenu(c[0])}}this._setSize();this._render()},isTouchDevice:function(){if(this._isTouchDevice!=undefined){return this._isTouchDevice}var b=a.jqx.mobile.isTouchDevice();if(this.touchMode==true){b=true}else{if(this.touchMode==false){b=false}}if(b){this.host.addClass(this.toThemeProperty("jqx-touch"));a(".jqx-menu-item").addClass(this.toThemeProperty("jqx-touch"))}this._isTouchDevice=b;return b},refresh:function(b){if(!b){this._setSize()}},resize:function(c,b){this.width=c;this.height=b;this.refresh()},_closeAll:function(f){var d=f!=null?f.data:this;var b=d.items;a.each(b,function(){var e=this;if(e.hasItems==true){if(e.isOpen){d._closeItem(d,e)}}});if(d.mode=="popup"){if(f!=null){var c=d._isRightClick(f);if(!c){d.close()}}}},closeItem:function(e){if(e==null){return false}var b=e;var c=document.getElementById(b);var d=this;a.each(d.items,function(){var f=this;if(f.isOpen==true&&f.element==c){d._closeItem(d,f);if(f.parentId){}}});return true},openItem:function(e){if(e==null){return false}var b=e;var c=document.getElementById(b);var d=this;a.each(d.items,function(){var f=this;if(f.isOpen==false&&f.element==c){d._openItem(d,f);if(f.parentId){d.openItem(f.parentId)}}});return true},_getClosedSubMenuOffset:function(c){var b=a(c.subMenuElement);var f=-b.outerHeight();var e=-b.outerWidth();var d=c.level==0&&this.mode=="horizontal";if(d){e=0}else{f=0}switch(c.openVerticalDirection){case"up":case"center":f=b.outerHeight();break}switch(c.openHorizontalDirection){case this._getDir("left"):if(d){e=0}else{e=b.outerWidth()}break;case"center":if(d){e=0}else{e=b.outerWidth()}break}return{left:e,top:f}},_closeItem:function(l,o,g,c){if(l==null||o==null){return false}var j=a(o.subMenuElement);var b=o.level==0&&this.mode=="horizontal";var f=this._getClosedSubMenuOffset(o);var m=f.top;var e=f.left;var i=a(o.element);var k=j.closest("div.jqx-menu-popup");if(k!=null){k.removeClass("show");var h=l.animationHideDelay;if(c==true){h=0}if(j.data("timer")&&j.data("timer").show!=null){clearTimeout(j.data("timer").show);j.data("timer").show=null}var n=function(){o.isOpen=false;if(b){j.stop().animate({top:m},l.animationHideDuration,function(){a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-top-selected"));a(o.element).removeClass(l.toThemeProperty("jqx-rc-b-expanded"));k.removeClass(l.toThemeProperty("jqx-rc-t-expanded"));var p=a(o.arrow);if(p.length>0&&l.showTopLevelArrows){p.removeClass();if(o.openVerticalDirection=="down"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-down"));p.addClass(l.toThemeProperty("jqx-icon-arrow-down"))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-up"));p.addClass(l.toThemeProperty("jqx-icon-arrow-up"))}}a.jqx.aria(a(o.element),"aria-expanded",false);k.css({display:"none"});if(l.animationHideDuration==0){j.css({top:m})}l._raiseEvent("1",o)})}else{if(!a.jqx.browser.msie){}j.stop().animate({left:e},l.animationHideDuration,function(){if(l.animationHideDuration==0){j.css({left:e})}if(o.level>0){a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-selected"));var p=a(o.arrow);if(p.length>0){p.removeClass();if(o.openHorizontalDirection!="left"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-"+l._getDir("right")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("right")))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-"+l._getDir("left")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("left")))}}}else{a(o.element).removeClass(l.toThemeProperty("jqx-fill-state-pressed"));a(o.element).removeClass(l.toThemeProperty("jqx-menu-item-top-selected"));var p=a(o.arrow);if(p.length>0){p.removeClass();if(o.openHorizontalDirection!="left"){p.addClass(l.toThemeProperty("jqx-menu-item-arrow-top-"+l._getDir("right")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("right")))}else{p.addClass(l.toThemeProperty("jqx-menu-item-arrow-top-"+l._getDir("left")));p.addClass(l.toThemeProperty("jqx-icon-arrow-"+l._getDir("left")))}}}a.jqx.aria(a(o.element),"aria-expanded",false);k.css({display:"none"});l._raiseEvent("1",o)})}};if(h>0){if(j.data("timer")){j.data("timer").hide=setTimeout(function(){n()},h)}}else{n()}if(g!=undefined&&g){var d=j.children();a.each(d,function(){if(l.menuElements[this.id]&&l.menuElements[this.id].isOpen){var p=a(l.menuElements[this.id].subMenuElement);l._closeItem(l,l.menuElements[this.id],true,true)}})}}},getSubItems:function(i,h){if(i==null){return false}var g=this;var c=new Array();if(h!=null){a.extend(c,h)}var d=i;var f=this.menuElements[d];var b=a(f.subMenuElement);var e=b.find(".jqx-menu-item");a.each(e,function(){c[this.id]=g.menuElements[this.id];var j=g.getSubItems(this.id,c);a.extend(c,j)});return c},disable:function(g,d){if(g==null){return}var c=g;var f=this;if(this.menuElements[c]){var e=this.menuElements[c];e.disabled=d;var b=a(e.element);e.element.disabled=d;a.each(b.children(),function(){this.disabled=d});if(d){b.addClass(f.toThemeProperty("jqx-menu-item-disabled"));b.addClass(f.toThemeProperty("jqx-fill-state-disabled"))}else{b.removeClass(f.toThemeProperty("jqx-menu-item-disabled"));b.removeClass(f.toThemeProperty("jqx-fill-state-disabled"))}}},getItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];return b}return null},disableItem:function(b){this.disable(b,true)},hideItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];a(b.element).hide()}},showItem:function(c){if(this.menuElements[c]){var b=this.menuElements[c];a(b.element).show()}},enableItem:function(b){this.disable(b,false)},_setItemProperty:function(g,c,f){if(g==null){return}var b=g;var e=this;if(this.menuElements[b]){var d=this.menuElements[b];if(d[c]){d[c]=f}}},setItemOpenDirection:function(d,c,e){if(d==null){return}var j=d;var g=this;var f=a.jqx.browser.msie&&a.jqx.browser.version<8;if(this.menuElements[j]){var i=this.menuElements[j];if(c!=null){i.openHorizontalDirection=c;if(i.hasItems&&i.level>0){var h=a(i.element);if(h!=undefined){var b=a(i.arrow);if(i.arrow==null){b=a('<span id="arrow'+h[0].id+'"></span>');if(!f){b.prependTo(h)}else{b.appendTo(h)}i.arrow=b[0]}b.removeClass();if(i.openHorizontalDirection=="left"){b.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("left")));b.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("left")))}else{b.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));b.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}b.css("visibility","inherit");if(!f){b.css("display","block");b.css("float","right")}else{b.css("display","inline-block");b.css("float","none")}}}}if(e!=null){i.openVerticalDirection=e;var b=a(i.arrow);var h=a(i.element);if(!g.showTopLevelArrows){return}if(h!=undefined){if(i.arrow==null){b=a('<span id="arrow'+h[0].id+'"></span>');if(!f){b.prependTo(h)}else{b.appendTo(h)}i.arrow=b[0]}b.removeClass();if(i.openVerticalDirection=="down"){b.addClass(g.toThemeProperty("jqx-menu-item-arrow-down"));b.addClass(g.toThemeProperty("jqx-icon-arrow-down"))}else{b.addClass(g.toThemeProperty("jqx-menu-item-arrow-up"));b.addClass(g.toThemeProperty("jqx-icon-arrow-up"))}b.css("visibility","inherit");if(!f){b.css("display","block");b.css("float","right")}else{b.css("display","inline-block");b.css("float","none")}}}}},_getSiblings:function(d){var e=new Array();var b=0;for(var c=0;c<this.items.length;c++){if(this.items[c]==d){continue}if(this.items[c].parentId==d.parentId&&this.items[c].hasItems){e[b++]=this.items[c]}}return e},_openItem:function(s,r,q){if(s==null||r==null){return false}if(r.isOpen){return false}if(r.disabled){return false}if(s.disabled){return false}var l=s.popupZIndex;if(q!=undefined){l=q}var e=s.animationHideDuration;s.animationHideDuration=0;s._closeItem(s,r,true,true);s.animationHideDuration=e;a(r.element).focus();var f=[5,5];var t=a(r.subMenuElement);if(t!=null){t.stop()}if(t.data("timer")&&t.data("timer").hide!=null){clearTimeout(t.data("timer").hide)}var o=t.closest("div.jqx-menu-popup");var h=a(r.element);var i=r.level==0?this._getOffset(r.element):h.position();if(r.level>0&&this.hasTransform){var p=parseInt(h.coord().top)-parseInt(this._getOffset(r.element).top);i.top+=p}if(r.level==0&&this.mode=="popup"){i=h.coord()}var j=r.level==0&&this.mode=="horizontal";var b=j?i.left:this.menuElements[r.parentId]!=null&&this.menuElements[r.parentId].subMenuElement!=null?parseInt(a(a(this.menuElements[r.parentId].subMenuElement).closest("div.jqx-menu-popup")).outerWidth())-f[0]:parseInt(t.outerWidth());o.css({visibility:"visible",display:"block",left:b,top:j?i.top+h.outerHeight():i.top,zIndex:l});t.css("display","block");if(this.mode!="horizontal"&&r.level==0){var d=this._getOffset(this.element);o.css("left",-1+d.left+this.host.outerWidth());t.css("left",-t.outerWidth())}else{var c=this._getClosedSubMenuOffset(r);t.css("left",c.left);t.css("top",c.top)}o.css({height:parseInt(t.outerHeight())+parseInt(f[1])+"px"});var n=0;var g=0;switch(r.openVerticalDirection){case"up":if(j){t.css("top",t.outerHeight());n=f[1];var k=parseInt(t.parent().css("padding-bottom"));if(isNaN(k)){k=0}if(k>0){o.addClass(this.toThemeProperty("jqx-menu-popup-clear"))}t.css("top",t.outerHeight()-k);o.css({display:"block",top:i.top-o.outerHeight(),zIndex:l})}else{n=f[1];t.css("top",t.outerHeight());o.css({display:"block",top:i.top-o.outerHeight()+f[1]+h.outerHeight(),zIndex:l})}break;case"center":if(j){t.css("top",0);o.css({display:"block",top:i.top-o.outerHeight()/2+f[1],zIndex:l})}else{t.css("top",0);o.css({display:"block",top:i.top+h.outerHeight()/2-o.outerHeight()/2+f[1],zIndex:l})}break}switch(r.openHorizontalDirection){case this._getDir("left"):if(j){o.css({left:i.left-(o.outerWidth()-h.outerWidth()-f[0])})}else{g=0;t.css("left",o.outerWidth());o.css({left:i.left-(o.outerWidth())+2*r.level})}break;case"center":if(j){o.css({left:i.left-(o.outerWidth()/2-h.outerWidth()/2-f[0]/2)})}else{o.css({left:i.left-(o.outerWidth()/2-h.outerWidth()/2-f[0]/2)});t.css("left",o.outerWidth())}break}if(j){if(parseInt(t.css("top"))==n){r.isOpen=true;return}}else{if(parseInt(t.css("left"))==g){r.isOpen==true;return}}a.each(s._getSiblings(r),function(){s._closeItem(s,this,true,true)});var m=a.data(s.element,"animationHideDelay");s.animationHideDelay=m;if(this.autoCloseInterval>0){if(this.host.data("autoclose")!=null&&this.host.data("autoclose").close!=null){clearTimeout(this.host.data("autoclose").close)}if(this.host.data("autoclose")!=null){this.host.data("autoclose").close=setTimeout(function(){s._closeAll()},this.autoCloseInterval)}}if(t.data("timer")){t.data("timer").show=setTimeout(function(){if(o!=null){if(j){t.stop();t.css("left",g);if(!a.jqx.browser.msie){}h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-top-selected"));if(r.openVerticalDirection=="down"){a(r.element).addClass(s.toThemeProperty("jqx-rc-b-expanded"));o.addClass(s.toThemeProperty("jqx-rc-t-expanded"));o.addClass(s.toThemeProperty("show"))}else{a(r.element).addClass(s.toThemeProperty("jqx-rc-t-expanded"));o.addClass(s.toThemeProperty("jqx-rc-b-expanded"));o.addClass(s.toThemeProperty("show"))}var u=a(r.arrow);if(u.length>0&&s.showTopLevelArrows){u.removeClass();if(r.openVerticalDirection=="down"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-down-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-down"))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-up-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-up"))}}if(s.animationShowDuration==0){t.css({top:n});r.isOpen=true;s._raiseEvent("0",r);a.jqx.aria(a(r.element),"aria-expanded",true)}else{t.animate({top:n},s.animationShowDuration,s.easing,function(){r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true);s._raiseEvent("0",r)})}}else{t.stop();t.css("top",n);o.addClass(s.toThemeProperty("show"));if(!a.jqx.browser.msie){}if(r.level>0){h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-selected"));var u=a(r.arrow);if(u.length>0){u.removeClass();if(r.openHorizontalDirection!="left"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("right")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("right")))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("left")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("left")))}}}else{h.addClass(s.toThemeProperty("jqx-fill-state-pressed"));h.addClass(s.toThemeProperty("jqx-menu-item-top-selected"));var u=a(r.arrow);if(u.length>0){u.removeClass();if(r.openHorizontalDirection!="left"){u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("right")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("right")))}else{u.addClass(s.toThemeProperty("jqx-menu-item-arrow-"+s._getDir("left")+"-selected"));u.addClass(s.toThemeProperty("jqx-icon-arrow-"+s._getDir("left")))}}}if(!a.jqx.browser.msie){}if(s.animationShowDuration==0){t.css({left:g});s._raiseEvent("0",r);r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true)}else{t.animate({left:g},s.animationShowDuration,s.easing,function(){s._raiseEvent("0",r);r.isOpen=true;a.jqx.aria(a(r.element),"aria-expanded",true)})}}}},this.animationShowDelay)}},_getDir:function(b){switch(b){case"left":return !this.rtl?"left":"right";case"right":return this.rtl?"left":"right"}return"left"},_applyOrientation:function(i,d){var g=this;var f=0;g.host.removeClass(g.toThemeProperty("jqx-menu-horizontal"));g.host.removeClass(g.toThemeProperty("jqx-menu-vertical"));g.host.removeClass(g.toThemeProperty("jqx-menu"));g.host.removeClass(g.toThemeProperty("jqx-widget"));g.host.addClass(g.toThemeProperty("jqx-widget"));g.host.addClass(g.toThemeProperty("jqx-menu"));if(i!=undefined&&d!=undefined&&d=="popup"){if(g.host.parent().length>0&&g.host.parent().parent().length>0&&g.host.parent().parent()[0]==document.body){var h=a.data(document.body,"jqxMenuOldHost"+g.element.id);if(h!=null){var e=g.host.closest("div.jqx-menu-wrapper");e.remove();e.appendTo(h);g.host.css("display","block");g.host.css("visibility","visible");e.css("display","block");e.css("visibility","visible")}}}else{if(i==undefined&&d==undefined){a.data(document.body,"jqxMenuOldHost"+g.element.id,g.host.parent()[0])}}if(g.autoOpenPopup){if(g.mode=="popup"){g.addHandler(a(document),"contextmenu."+g.element.id,function(j){return false});g.addHandler(a(document),"mousedown.menu"+g.element.id,function(j){g._openContextMenu(j)})}else{g.removeHandler(a(document),"contextmenu."+g.element.id);g.removeHandler(a(document),"mousedown.menu"+g.element.id)}}else{g.removeHandler(a(document),"contextmenu."+g.element.id);g.removeHandler(a(document),"mousedown.menu"+g.element.id);g.addHandler(a(document),"contextmenu."+g.element.id,function(j){if(j.target&&j.target.className.indexOf&&j.target.className.indexOf("jqx-menu")>=0){return false}})}if(g.rtl){g.host.addClass(g.toThemeProperty("jqx-rtl"))}switch(g.mode){case"horizontal":g.host.addClass(g.toThemeProperty("jqx-widget-header"));g.host.addClass(g.toThemeProperty("jqx-menu-horizontal"));a.each(g.items,function(){var m=this;var k=a(m.element);var l=a(m.arrow);l.removeClass();if(m.hasItems&&m.level>0){var l=a('<span style="border: none; background-color: transparent;" id="arrow'+k[0].id+'"></span>');l.prependTo(k);l.css("float",g._getDir("right"));l.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));l.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")));m.arrow=l[0]}if(m.level==0){a(m.element).css("float",g._getDir("left"));if(!m.ignoretheme&&m.hasItems&&g.showTopLevelArrows){var l=a('<span style="border: none; background-color: transparent;" id="arrow'+k[0].id+'"></span>');var j=a.jqx.browser.msie&&a.jqx.browser.version<8;if(m.arrow==null){if(!j){l.prependTo(k)}else{l.appendTo(k)}}else{l=a(m.arrow)}if(m.openVerticalDirection=="down"){l.addClass(g.toThemeProperty("jqx-menu-item-arrow-down"));l.addClass(g.toThemeProperty("jqx-icon-arrow-down"))}else{l.addClass(g.toThemeProperty("jqx-menu-item-arrow-up"));l.addClass(g.toThemeProperty("jqx-icon-arrow-up"))}l.css("visibility","inherit");if(!j){l.css("display","block");l.css("float","right")}else{l.css("display","inline-block")}m.arrow=l[0]}else{if(!m.ignoretheme&&m.hasItems&&!g.showTopLevelArrows){if(m.arrow!=null){var l=a(m.arrow);l.remove();m.arrow=null}}}f=Math.max(f,k.height())}});break;case"vertical":case"popup":case"simple":g.host.addClass(g.toThemeProperty("jqx-menu-vertical"));a.each(g.items,function(){var l=this;var j=a(l.element);if(l.hasItems&&!l.ignoretheme){if(l.arrow){a(l.arrow).remove()}if(g.mode=="simple"){return true}var k=a('<span style="border: none; background-color: transparent;" id="arrow'+j[0].id+'"></span>');k.prependTo(j);k.css("float","right");if(l.level==0){k.addClass(g.toThemeProperty("jqx-menu-item-arrow-top-"+g._getDir("right")));k.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}else{k.addClass(g.toThemeProperty("jqx-menu-item-arrow-"+g._getDir("right")));k.addClass(g.toThemeProperty("jqx-icon-arrow-"+g._getDir("right")))}l.arrow=k[0]}j.css("float","none")});if(g.mode=="popup"){g.host.addClass(g.toThemeProperty("jqx-widget-content"));g.host.wrap('<div tabindex=0 class="jqx-menu-wrapper" style="z-index:'+g.popupZIndex+'; border: none; background-color: transparent; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: visible;"></div>');var e=g.host.closest("div.jqx-menu-wrapper");g.host.addClass(g.toThemeProperty("jqx-popup"));e[0].id="menuWrapper"+g.element.id;e.appendTo(a(document.body));g.addHandler(e,"keydown",function(j){return g.handleKeyDown(j)})}else{g.host.addClass(g.toThemeProperty("jqx-widget-header"))}if(g.mode=="popup"){var b=g.host.height();g.host.css("position","absolute");g.host.css("top","0");g.host.css("left","0");if(g.mode!="simple"){g.host.height(b);g.host.css("display","none")}}break}var c=g.isTouchDevice();if(g.autoCloseOnClick){g.removeHandler(a(document),"mousedown.menu"+g.element.id,g._closeAfterClick);g.addHandler(a(document),"mousedown.menu"+g.element.id,g._closeAfterClick,g);if(c){g.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+g.element.id,g._closeAfterClick,g);g.addHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+g.element.id,g._closeAfterClick,g)}}},_getBodyOffset:function(){var c=0;var b=0;if(a("body").css("border-top-width")!="0px"){c=parseInt(a("body").css("border-top-width"));if(isNaN(c)){c=0}}if(a("body").css("border-left-width")!="0px"){b=parseInt(a("body").css("border-left-width"));if(isNaN(b)){b=0}}return{left:b,top:c}},_getOffset:function(c){var e=a.jqx.mobile.isSafariMobileBrowser();var i=a(c).coord(true);var h=i.top;var g=i.left;if(a("body").css("border-top-width")!="0px"){h=parseInt(h)+this._getBodyOffset().top}if(a("body").css("border-left-width")!="0px"){g=parseInt(g)+this._getBodyOffset().left}var d=a.jqx.mobile.isWindowsPhone();var f=a.jqx.mobile.isTouchDevice();if(this.hasTransform||(e!=null&&e)||d||f){var b={left:a.jqx.mobile.getLeftPos(c),top:a.jqx.mobile.getTopPos(c)};return b}else{return{left:g,top:h}}},_isRightClick:function(c){var b;if(!c){var c=window.event}if(c.which){b=(c.which==3)}else{if(c.button){b=(c.button==2)}}return b},_openContextMenu:function(d){var c=this;var b=c._isRightClick(d);if(b){c.open(parseInt(d.clientX)+5,parseInt(d.clientY)+5)}},close:function(){var c=this;if(!this.element){return}var d=a.data(this.element,"contextMenuOpened"+this.element.id);if(d){var b=this.host;c.host.removeClass("jqx-popup-show");a.each(c.items,function(){var e=this;if(e.hasItems){c._closeItem(c,e)}});a.each(c.items,function(){var f=this;if(f.isOpen==true){var e=a(f.subMenuElement);var g=e.closest("div.jqx-menu-popup");g.hide(this.animationHideDuration)}});this.host.hide(this.animationHideDuration);a.data(c.element,"contextMenuOpened"+this.element.id,false);c._raiseEvent("1",c);c._raiseEvent("5")}},open:function(e,d){if(this.mode=="popup"){var c=0;if(this.host.css("display")=="block"){this.close();c=this.animationHideDuration}var b=this;if(e==undefined||e==null){e=0}if(d==undefined||d==null){d=0}setTimeout(function(){b.host.show(b.animationShowDuration);b.host.css("visibility","visible");b.host.addClass("jqx-popup-show");a.data(b.element,"contextMenuOpened"+b.element.id,true);b._raiseEvent("0",b);b._raiseEvent("4",{left:e,top:d});b.host.css("z-index",b.popupZIndex);if(e!=undefined&&d!=undefined){b.host.css({left:e,top:d})}b.focus()},c)}},_renderHover:function(c,e,b){var d=this;if(!e.ignoretheme){this.addHandler(c,"mouseenter",function(){d.hoveredItem=e;if(!e.disabled&&!e.separator&&d.enableHover&&!d.disabled){if(e.level>0){c.addClass(d.toThemeProperty("jqx-fill-state-hover"));c.addClass(d.toThemeProperty("jqx-menu-item-hover"))}else{c.addClass(d.toThemeProperty("jqx-fill-state-hover"));c.addClass(d.toThemeProperty("jqx-menu-item-top-hover"))}}});this.addHandler(c,"mouseleave",function(){if(!e.disabled&&!e.separator&&d.enableHover&&!d.disabled){if(e.level>0){c.removeClass(d.toThemeProperty("jqx-fill-state-hover"));c.removeClass(d.toThemeProperty("jqx-menu-item-hover"))}else{c.removeClass(d.toThemeProperty("jqx-fill-state-hover"));c.removeClass(d.toThemeProperty("jqx-menu-item-top-hover"))}}})}},_closeAfterClick:function(c){var b=c!=null?c.data:this;var d=false;if(b.autoCloseOnClick){a.each(a(c.target).parents(),function(){if(this.className.indexOf){if(this.className.indexOf("jqx-menu")!=-1){d=true;return false}}});if(!d){c.data=b;b._closeAll(c)}}},_autoSizeHorizontalMenuItems:function(){var c=this;if(c.autoSizeMainItems&&this.mode=="horizontal"){var b=this.maxHeight;if(parseInt(b)>parseInt(this.host.height())){b=parseInt(this.host.height())}b=parseInt(this.host.height());a.each(this.items,function(){var m=this;var j=a(m.element);if(m.level==0&&b>0){var d=j.children().length>0?parseInt(j.children().height()):j.height();var g=c.host.find("ul:first");var h=parseInt(g.css("padding-top"));var n=parseInt(g.css("margin-top"));var k=b-2*(n+h);var i=parseInt(k)/2-d/2;var e=parseInt(i);var l=parseInt(i);j.css("padding-top",e);j.css("padding-bottom",l);if(parseInt(j.outerHeight())>k){var f=1;j.css("padding-top",e-f);e=e-f}}})}a.each(this.items,function(){var g=this;var e=a(g.element);if(g.hasItems&&g.level>0){if(g.arrow){var f=a(g.arrow);var d=a(g.element).height();if(d>15){f.css("margin-top",(d-15)/2)}}}})},_nextVisibleItem:function(c,d){if(c==null||c==undefined){return null}var b=c;while(b!=null){b=b.nextItem;if(this._isVisible(b)&&!b.disabled&&b.type!=="separator"){if(this.minimized){return b}if(d!=undefined){if(b&&b.level!=d){continue}}return b}}return null},_prevVisibleItem:function(c,d){if(c==null||c==undefined){return null}var b=c;while(b!=null){b=b.prevItem;if(this._isVisible(b)&&!b.disabled&&b.type!=="separator"){if(this.minimized){return b}if(d!=undefined){if(b&&b.level!=d){continue}}return b}}return null},_parentItem:function(d){if(d==null||d==undefined){return null}var c=d.parentElement;if(!c){return null}var b=null;a.each(this.items,function(){if(this.element==c){b=this;return false}});return b},_isElementVisible:function(b){if(b==null){return false}if(a(b).css("display")!="none"&&a(b).css("visibility")!="hidden"){return true}return false},_isVisible:function(c){if(c==null||c==undefined){return false}if(!this._isElementVisible(c.element)){return false}var b=this._parentItem(c);if(b==null){return true}if(this.minimized){return true}if(b!=null){if(!this._isElementVisible(b.element)){return false}if(b.isOpen||this.minimized){while(b!=null){b=this._parentItem(b);if(b!=null&&!this._isElementVisible(b.element)){return false}if(b!=null&&!b.isOpen){return false}}}else{return false}}return true},_render:function(f,g){if(this.disabled){this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.host.addClass(this.toThemeProperty("jqx-menu-disabled"))}if(this.host.attr("tabindex")==undefined){this.host.attr("tabindex",0)}var i=this.popupZIndex;var d=[5,5];var h=this;a.data(h.element,"animationHideDelay",h.animationHideDelay);var e=this.isTouchDevice();var c=e&&(a.jqx.mobile.isWindowsPhone()||navigator.userAgent.indexOf("Touch")>=0);var j=false;if(navigator.platform.toLowerCase().indexOf("win")!=-1){if(navigator.userAgent.indexOf("Windows Phone")>=0||navigator.userAgent.indexOf("WPDesktop")>=0||navigator.userAgent.indexOf("IEMobile")>=0||navigator.userAgent.indexOf("ZuneWP7")>=0){this.touchDevice=true}else{if(navigator.userAgent.indexOf("Touch")>=0){var b=("MSPointerDown" in window);if(b||a.jqx.mobile.isWindowsPhone()||navigator.userAgent.indexOf("ARM")>=0){j=true;c=true;h.clickToOpen=true;h.autoCloseOnClick=false;h.enableHover=false}}}}a.data(document.body,"menuel",this);this.hasTransform=a.jqx.utilities.hasTransform(this.host);this._applyOrientation(f,g);this.removeHandler(this.host,"blur");this.removeHandler(this.host,"focus");this.addHandler(this.host,"blur",function(k){if(h.keyboardNavigation){if(h.activeItem){if(h.mode==="popup"){if(document.activeElement&&document.activeElement.className.indexOf("jqx-menu-wrapper")>=0){return}}a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=null}}});this.addHandler(this.host,"focus",function(k){if(h.keyboardNavigation){if(!h.activeItem){if(h.hoveredItem){a(h.hoveredItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.hoveredItem}else{var l=function(){if(!a.jqx.isHidden(a(h.items[0].element))){a(h.items[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.items[0]}else{var m=h._nextVisibleItem(h.items[0],0);if(m){a(m.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=m}}};if(!h.activeItem){l()}else{if(!a.jqx.isHidden(a(h.activeItem.element))){a(h.activeItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"))}else{a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));l()}}}}}});this.removeHandler(this.host,"keydown.menu"+this.element.id);h.handleKeyDown=function(k){if(h.keyboardNavigation){if(k.target.nodeName.toLowerCase()==="input"){return true}var q=null;var o=null;a.each(h.items,function(){var A=this;if(this.disabled){return true}if(this.element.className.indexOf("pressed")>=0){o=this}if(this.element.className.indexOf("focus")>=0){q=this;return false}});if(!q&&o){q=o;return false}if(!q){a(h.items[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=h.items[0];q=h.activeItem;return false}var t=false;if(k.keyCode==27){k.data=h;h._closeAll(k);if(q){var z=q;while(z!=null){if(z.parentItem){z=z.parentItem}else{a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=z;a(h.activeItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));z=z.parentItem}}}t=true}if(k.keyCode==13){if(q){t=true;h._raiseEvent("2",{item:q.element,event:k,type:"keyboard"});var r=q.anchor!=null?a(q.anchor):null;if(r!=null&&r.length>0){var l=r.attr("href");var u=r.attr("target");if(l!=null){if(u!=null){window.open(l,u)}else{window.location=l}}}k.preventDefault();k.stopPropagation();a(q.element).focus()}}var n=function(D){if(D==null){return new Array()}var C=new Array();var A=0;for(var B=0;B<h.items.length;B++){if(h.items[B].parentId==D.parentId){C[A++]=h.items[B]}}return C};var v="";switch(k.keyCode){case 40:v="down";break;case 38:v="up";break;case 39:v="right";break;case 37:v="left";break}if(q&&q.openHorizontalDirection==="left"&&v==="left"){v="right"}if(q&&q.openHorizontalDirection==="left"&&v==="right"){v="left"}if(q&&q.openVerticalDirection==="top"&&v==="top"){v="bottom"}if(q&&q.openVerticalDirection==="top"&&v==="bottom"){v="top"}if(h.rtl){if(v==="right"){v="left"}else{if(v==="left"){v="right"}}}if(v==="right"&&!h.minimized){if(k.altKey&&(q.level!=0&&q.hasItems||h.mode!="horizontal")){h._openItem(h,q)}else{var x=h._nextVisibleItem(q,0);var m=h._nextVisibleItem(q);var w=n(m);if(!x){x=m}if(x&&((x.parentId===q.parentId&&x.level==0&&h.mode=="horizontal")||(m.id==w[0].id&&m.level!=0))){if(m.id==w[0].id&&((q.level!=0)||(q.level==0&&h.mode!="horizontal"))){x=m}a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}k.preventDefault();k.stopPropagation()}if(v==="left"&&!h.minimized){if(k.altKey&&((q.level!=0&&h.mode!=="horizontal")||(q.level>1&&h.mode==="horizontal")||(q.level==1&&q.hasItems&&h.mode==="horizontal"))){if(q.hasItems){h._closeItem(h,q)}else{if(q.parentItem){h._closeItem(h,q.parentItem);a(q.parentItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=q.parentItem}}}else{var x=h._prevVisibleItem(q,0);var y=q.parentItem;if(x&&(x.parentId===q.parentId&&x.level==0&&h.mode=="horizontal")){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(!(y&&y.level==0&&h.mode=="horizontal")&&y&&y.level==q.level-1){a(y.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=y}}}k.preventDefault();k.stopPropagation()}if(v==="down"){if(k.altKey){if(q.level==0&&q.hasItems){h._openItem(h,q)}if(h.minimized){if(h.minimizedHidden){h.minimizedItem.trigger("click")}}}else{var x=h._nextVisibleItem(q,q.level);var w=n(x);if(h.minimized&&x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(x&&(x.parentId===q.parentId||(x.id==w[0].id&&h.mode=="horizontal"))){if(!(x.level==0&&h.mode=="horizontal")){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}if(h.mode==="horizontal"&&q.level===0&&q.isOpen&&q.hasItems){var x=h._nextVisibleItem(q);a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}}k.preventDefault();k.stopPropagation()}else{if(v==="up"){if(k.altKey){if(q.parentItem&&q.parentItem.level==0){h._closeItem(h,q.parentItem);a(q.parentItem.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=q.parentItem}else{if(q.parentItem===null&&q.level===0&&h.mode==="horizontal"){h._closeItem(h,q)}}if(h.minimized){if(!h.minimizedHidden){h.minimizedItem.trigger("click")}}}else{var x=h._prevVisibleItem(q,q.level);var w=n(q);if(h.minimized&&x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}else{if(x&&(x.parentId===q.parentId||(x.id==q.parentId&&x.level==0&&h.mode=="horizontal"))){if(!(x.level==0&&h.mode==="horizontal"&&q.level===0)){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}else{if(q&&q.id==w[0].id&&q.parentItem&&q.parentItem.level===0&&h.mode==="horizontal"){var x=q.parentItem;a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x}}}}k.preventDefault();k.stopPropagation()}}if(k.keyCode==9){var x=k.shiftKey?h._prevVisibleItem(q):h._nextVisibleItem(q);if(x){a(x.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=x;k.preventDefault();k.stopPropagation()}else{if(h.lockFocus){var w=new Array();var s=0;for(var p=0;p<h.items.length;p++){if(h.items[p]==q){continue}if(h.items[p].parentId==q.parentId){w[s++]=h.items[p]}}if(w.length>0){if(k.shiftKey){a(w[w.length-1].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=w[w.length-1]}else{a(w[0].element).addClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=w[0]}a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"))}k.preventDefault();k.stopPropagation()}else{if(q){a(q.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"));h.activeItem=null}}}}}else{return true}};this.addHandler(this.host,"keydown.menu"+this.element.id,function(k){h.handleKeyDown(k)});if(h.enableRoundedCorners){this.host.addClass(h.toThemeProperty("jqx-rc-all"))}a.each(this.items,function(){var r=this;var n=a(r.element);n.attr("role","menuitem");if(h.enableRoundedCorners){n.addClass(h.toThemeProperty("jqx-rc-all"))}h.removeHandler(n,"click");h.addHandler(n,"click",function(w){if(r.disabled){return}if(h.disabled){return}if(h.keyboardNavigation){if(h.activeItem){a(h.activeItem.element).removeClass(h.toThemeProperty("jqx-fill-state-focus"))}h.activeItem=r;a(r.element).addClass(h.toThemeProperty("jqx-fill-state-focus"));if(h.minimized){w.stopPropagation()}}h._raiseEvent("2",{type:"mouse",item:r.element,event:w});if(!h.autoOpen){if(r.level>0){if(h.autoCloseOnClick&&!e&&!h.clickToOpen){w.data=h;h._closeAll(w)}}}else{if(h.autoCloseOnClick&&!e&&!h.clickToOpen){if(r.closeOnClick){w.data=h;h._closeAll(w)}}}if(e&&h.autoCloseOnClick){w.data=h;if(!r.hasItems){h._closeAll(w)}}if(w.target.tagName!="A"&&w.target.tagName!="a"){var u=r.anchor!=null?a(r.anchor):null;if(u!=null&&u.length>0){var t=u.attr("href");var v=u.attr("target");if(t!=null){if(v!=null){window.open(t,v)}else{window.location=t}}}}});h.removeHandler(n,"mouseenter");h.removeHandler(n,"mouseleave");if(!c&&h.mode!="simple"){h._renderHover(n,r,e)}if(r.subMenuElement!=null){var o=a(r.subMenuElement);if(h.mode=="simple"){o.show();return true}o.wrap('<div class="jqx-menu-popup '+h.toThemeProperty("jqx-menu-popup")+'" style="border: none; background-color: transparent; z-index:'+i+'; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: hidden;"><div style="background-color: transparent; border: none; position:absolute; overflow:hidden; left: 0; top: 0; right: 0; width: 100%; height: 100%;"></div></div>');o.css({overflow:"hidden",position:"absolute",left:0,display:"inherit",top:-o.outerHeight()});o.data("timer",{});if(r.level>0){o.css("left",-o.outerWidth())}else{if(h.mode=="horizontal"){o.css("left",0)}}i++;var q=a(r.subMenuElement).closest("div.jqx-menu-popup").css({width:parseInt(a(r.subMenuElement).outerWidth())+parseInt(d[0])+"px",height:parseInt(a(r.subMenuElement).outerHeight())+parseInt(d[1])+"px"});var s=n.closest("div.jqx-menu-popup");if(s.length>0){var k=o.css("margin-left");var m=o.css("margin-right");var l=o.css("padding-left");var p=o.css("padding-right");q.addClass("horizontal");q.appendTo(s);o.css("margin-left",k);o.css("margin-right",m);o.css("padding-left",l);o.css("padding-right",p)}else{var k=o.css("margin-left");var m=o.css("margin-right");var l=o.css("padding-left");var p=o.css("padding-right");if(h.mode==="horizontal"){q.addClass("top")}else{q.addClass("horizontal")}q.appendTo(a(document.body));o.css("margin-left",k);o.css("margin-right",m);o.css("padding-left",l);o.css("padding-right",p)}if(!h.clickToOpen){if(e||c){h.removeHandler(n,a.jqx.mobile.getTouchEventName("touchstart"));h.addHandler(n,a.jqx.mobile.getTouchEventName("touchstart"),function(t){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(r.level==0&&!r.isOpen&&h.mode!="popup"){t.data=h;h._closeAll(t)}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}return false})}if(!c){h.addHandler(n,"mouseenter",function(){if(h.autoOpen||(r.level>0&&!h.autoOpen)){clearTimeout(o.data("timer").hide)}if(r.parentId&&r.parentId!=0){if(h.menuElements[r.parentId]){var t=h.menuElements[r.parentId].isOpen;if(!t){return}}}if(h.autoOpen||(r.level>0&&!h.autoOpen)){h._openItem(h,r)}return false});h.addHandler(n,"mousedown",function(){if(!h.autoOpen&&r.level==0){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}}});h.addHandler(n,"mouseleave",function(u){if(h.autoCloseOnMouseLeave){clearTimeout(o.data("timer").hide);var x=a(r.subMenuElement);var t={left:parseInt(u.pageX),top:parseInt(u.pageY)};var w={left:parseInt(x.coord().left),top:parseInt(x.coord().top),width:parseInt(x.outerWidth()),height:parseInt(x.outerHeight())};var v=true;if(w.left-5<=t.left&&t.left<=w.left+w.width+5){if(w.top<=t.top&&t.top<=w.top+w.height){v=false}}if(v){h._closeItem(h,r,true)}}});h.removeHandler(q,"mouseenter");h.addHandler(q,"mouseenter",function(){clearTimeout(o.data("timer").hide)});h.removeHandler(q,"mouseleave");h.addHandler(q,"mouseleave",function(t){if(h.autoCloseOnMouseLeave){clearTimeout(o.data("timer").hide);clearTimeout(o.data("timer").show);if(o!=null){o.stop()}h._closeItem(h,r,true)}})}}else{h.removeHandler(n,"mousedown");h.addHandler(n,"mousedown",function(t){clearTimeout(o.data("timer").hide);if(o!=null){o.stop()}if(r.level==0&&!r.isOpen){t.data=h;h._closeAll(t)}if(!r.isOpen){h._openItem(h,r)}else{h._closeItem(h,r,true)}})}}});if(this.mode=="simple"){this._renderSimpleMode()}this._autoSizeHorizontalMenuItems();this._raiseEvent("3",this)},_renderSimpleMode:function(){this.host.show()},createID:function(){var b=Math.random()+"";b=b.replace(".","");b="99"+b;b=b/1;while(this.items[b]){b=Math.random()+"";b=b.replace(".","");b=b/1}return"menuItem"+b},_createMenu:function(c,f){if(c==null){return}if(f==undefined){f=true}if(f==null){f=true}var o=this;a(c).addClass("jqx-menu-ul");var u=a(c).find("li");var q=0;this.itemMapping=new Array();for(var j=0;j<u.length;j++){var m=u[j];var s=a(m);if(m.className.indexOf("jqx-menu")==-1&&this.autoGenerate==false){continue}var p=m.id;if(!p){p=this.createID()}if(f){m.id=p;this.items[q]=new a.jqx._jqxMenu.jqxMenuItem();this.menuElements[p]=this.items[q]}q+=1;var t=0;var x=this;var h=s.children();h.each(function(){if(!f){this.className="";if(x.autoGenerate){a(x.items[q-1].subMenuElement)[0].className="";if(!x.minimized){a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-widget-content"))}a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-menu-dropdown"));a(x.items[q-1].subMenuElement).addClass(x.toThemeProperty("jqx-popup"))}}if(this.className.indexOf("jqx-menu-dropdown")!=-1){if(f){x.items[q-1].subMenuElement=this}return false}else{if(x.autoGenerate&&(this.tagName=="ul"||this.tagName=="UL")){if(f){x.items[q-1].subMenuElement=this}this.className="";if(!x.minimized){a(this).addClass(x.toThemeProperty("jqx-widget-content"))}a(this).addClass(x.toThemeProperty("jqx-menu-dropdown"));a(this).addClass(x.toThemeProperty("jqx-popup"));a(this).attr("role","menu");if(x.rtl){a(this).addClass(x.toThemeProperty("jqx-rc-l"))}else{a(this).addClass(x.toThemeProperty("jqx-rc-r"))}a(this).addClass(x.toThemeProperty("jqx-rc-b"));return false}}});var w=s.parents();w.each(function(){if(this.className.indexOf("jqx-menu-item")!=-1){t=this.id;return false}else{if(x.autoGenerate&&(this.tagName=="li"||this.tagName=="LI")){t=this.id;return false}}});var e=false;var d=m.getAttribute("type");var b=m.getAttribute("ignoretheme")||m.getAttribute("data-ignoretheme");if(b){if(b=="true"||b==true){b=true}}else{b=false}if(!d){d=m.type}else{if(d=="separator"){var e=true}}if(!e){if(t){d="sub"}else{d="top"}}var g=this.items[q-1];if(f){g.id=p;g.parentId=t;g.type=d;g.separator=e;g.element=u[j];var l=s.children("a");g.disabled=m.getAttribute("item-disabled")=="true"?true:false;g.level=s.parents("li").length;g.anchor=l.length>0?l:null;if(g.anchor){a(g.anchor).attr("tabindex",-1)}}g.ignoretheme=b;var n=this.menuElements[t];if(n!=null){if(n.ignoretheme){g.ignoretheme=n.ignoretheme;b=n.ignoretheme}g.parentItem=n;g.parentElement=n.element}if(this.autoGenerate){if(d=="separator"){s.removeClass();s.addClass(this.toThemeProperty("jqx-menu-item-separator"));s.attr("role","separator")}else{if(!b){if(s[0].className.indexOf("jqx-grid-menu-item-touch")>=0){s[0].className=this.toThemeProperty("jqx-grid-menu-item-touch")}else{s[0].className=""}if(this.rtl){s.addClass(this.toThemeProperty("jqx-rtl"))}if(g.level>0&&!x.minimized){s.addClass(this.toThemeProperty("jqx-item"));s.addClass(this.toThemeProperty("jqx-menu-item"))}else{s.addClass(this.toThemeProperty("jqx-item"));s.addClass(this.toThemeProperty("jqx-menu-item-top"))}}}}if(g.disabled){s.addClass(x.toThemeProperty("jqx-menu-item-disabled"));s.addClass(x.toThemeProperty("jqx-fill-state-disabled"))}this.itemMapping[j]={element:u[j],item:g};this.itemMapping["id"+u[j].id]=this.itemMapping[j];if(f&&!b){g.hasItems=s.find("li").length>0;if(g.hasItems){if(g.element){a.jqx.aria(a(g.element),"aria-haspopup",true);if(!g.subMenuElement.id){g.subMenuElement.id=a.jqx.utilities.createId()}a.jqx.aria(a(g.element),"aria-owns",g.subMenuElement.id)}}}}for(var r=0;r<u.length;r++){var v=u[r];if(this.itemMapping["id"+v.id]){var g=this.itemMapping["id"+v.id].item;if(!g){continue}g.prevItem=null;g.nextItem=null;if(r>0){if(this.itemMapping["id"+u[r-1].id]){g.prevItem=this.itemMapping["id"+u[r-1].id].item}}if(r<u.length-1){if(this.itemMapping["id"+u[r+1].id]){g.nextItem=this.itemMapping["id"+u[r+1].id].item}}}}},destroy:function(){var b=this;a.jqx.utilities.resize(b.host,null,true);var d=b.host.closest("div.jqx-menu-wrapper");b.removeHandler(d,"keydown");d.remove();b.removeHandler(a("#menuWrapper"+b.element.id),"keydown");a("#menuWrapper"+b.element.id).remove();b.removeHandler(b.host,"keydown");b.removeHandler(b.host,"focus");b.removeHandler(b.host,"blur");b.removeHandler(a(document),"mousedown.menu"+b.element.id,b._closeAfterClick);b.removeHandler(a(document),"mouseup.menu"+b.element.id,b._closeAfterClick);b.removeHandler(a(document),"contextmenu."+b.element.id);b.removeHandler(b.host,"contextmenu."+b.element.id);a.data(document.body,"jqxMenuOldHost"+b.element.id,null);if(b.isTouchDevice()){b.removeHandler(a(document),a.jqx.mobile.getTouchEventName("touchstart")+".menu"+b.element.id,b._closeAfterClick,this)}if(a(window).off){a(window).off("resize.menu"+b.element.id)}a.each(b.items,function(){var g=this;var f=a(g.element);b.removeHandler(f,"click");b.removeHandler(f,"selectstart");b.removeHandler(f,"mouseenter");b.removeHandler(f,"mouseleave");b.removeHandler(f,"mousedown");b.removeHandler(f,"mouseleave");var e=a(g.subMenuElement);var h=e.closest("div.jqx-menu-popup");h.remove();delete this.subMenuElement;delete this.element});a.data(document.body,"menuel",null);delete b.menuElements;b.items=new Array();delete b.items;var c=a.data(b.element,"jqxMenu");if(c){delete c.instance}b.host.removeClass();b.host.remove();delete b.host;delete b.element},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=this.events[g];var e=c;e.owner=this;var f=new a.Event(d);if(g=="2"){e=c.item;e.owner=this;e.clickType=c.type;a.extend(f,c.event);f.type="itemclick"}f.owner=this;f.args=e;var b=this.host.trigger(f);return b},propertiesChangedHandler:function(b,c,e){if(e.width&&e.height&&Object.keys(e).length==2){b._setSize();if(b.mode==="popup"){var d=this.host.closest("div.jqx-menu-wrapper");d[c](e);var f=this.host[0].id;a("#"+f)[c](e)}}},propertyChangedHandler:function(b,d,h,g){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(d=="disabled"){if(b.disabled){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"));b.host.addClass(b.toThemeProperty("jqx-menu-disabled"))}else{b.host.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));b.host.removeClass(b.toThemeProperty("jqx-menu-disabled"))}}if(g==h){return}if(d=="touchMode"){this._isTouchDevice=null;b._render(g,h)}if(d==="width"||d==="height"){b._setSize();if(b.mode==="popup"){var e=this.host.closest("div.jqx-menu-wrapper");e[d](g);var i=this.host[0].id;a("#"+i)[d](g)}return}if(d=="source"){if(b.source!=null){var c=b.loadItems(b.source);b.element.innerHTML=c;var f=b.host.find("ul:first");if(f.length>0){b.refresh();b._createMenu(f[0]);b._render()}}}if(d=="autoCloseOnClick"){if(g==false){b.removeHandler(a(document),"mousedown.menu"+this.element.id,b._closeAll)}else{b.addHandler(a(document),"mousedown.menu"+this.element.id,b,b._closeAll)}}else{if(d=="mode"||d=="width"||d=="height"||d=="showTopLevelArrows"){b.refresh();if(d=="mode"){b._render(g,h)}else{b._applyOrientation()}}else{if(d=="theme"){a.jqx.utilities.setTheme(h,g,b.host)}}}}})})(jqxBaseFramework);(function(a){a.jqx._jqxMenu.jqxMenuItem=function(e,d,c){var b={id:e,parentId:d,parentItem:null,anchor:null,type:c,disabled:false,level:0,isOpen:false,hasItems:false,element:null,subMenuElement:null,arrow:null,openHorizontalDirection:"right",openVerticalDirection:"down",closeOnClick:true};return b}})(jqxBaseFramework)})();
9
9
 
@@ -5,5 +5,5 @@ License: https://jqwidgets.com/license/
5
5
  */
6
6
  /* eslint-disable */
7
7
 
8
- (function(a){a.jqx.jqxWidget("jqxNavBar","",{});a.extend(a.jqx._jqxNavBar.prototype,{defineInstance:function(){var b={height:"auto",minimizedHeight:30,popupAnimationDelay:250,minimizeButtonPosition:"left",width:"100%",selectedItem:0,selection:true,disabled:false,rtl:false,minimized:false,columns:null,minimizedTitle:"",orientation:"horizontal",events:["change"]};if(this===a.jqx._jqxNavBar.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){var b=this;if(b.ul&&b.ul.parent()[0]!==b.element){b.ul.detach();b.host.children().remove();b.host.append(b.ul);if(b.popup){b.popup.remove()}b.host.height(null);b.host.removeClass(b.toThemeProperty("jqx-widget-header"));b.host.removeClass(b.toThemeProperty("jqx-navbar-minimized"))}b.ul=b.host.children();b._items=b.ul.children();a.each(b._items,function(){a(this).removeClass()});if(this.width!==null&&(this.width.toString().indexOf("%")>=0||this.width.toString().indexOf("px")>=0)){this.element.style.width=this.width}else{this.element.style.width=this.width+"px"}b._layoutItems();b._addClasses();b._addHandlers();b._handleMinimize();a.jqx.utilities.resize(this.host,function(){b._resizePopup()})},_layoutItems:function(){var k=this;var t=1;var s=0;var o=this.height===null||this.height==="auto";if(k.orientation==="horizontal"){if(k._items.length>5){var c=50+"%";k._items.css("width",c);var q=k.height;t=Math.ceil(k._items.length/2);if(!o){var p;var h=false;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}s=2;if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}}else{var c=k.host.width/2;var g=k._items.length;var c=100/g+"%";k._items.css("width",c);if(!o){if(k.height.toString().indexOf("%")>=0){k._items.css("height",p);k._items.css("line-height",k.height)}else{k._items.height(k.height);k._items.css("line-height",parseInt(k.height)+"px")}}s=g}if(k.columns){var q=k.height;var l=0;for(var e=0;e<k._items.length;e++){var r=k._items[e];a(r).css("width",k.columns[l]);l++;if(l>=k.columns.length){l=0;if(k.columns.length!==k._items.length){t++}}}var h=false;var p;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}if(!o){if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}s=k.columns.length}}else{var q=k.height;var l=0;for(var e=0;e<k._items.length;e++){var r=k._items[e];a(r).css("width","100%")}t=k._items.length;if(!o){var h=false;var p;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}s=1}if(k.selection){var b=0;var f=k._items.length/s;var n=false;if(f<t){n=true}for(var e=0;e<t;e++){for(var d=0;d<s;d++){if(d<s-1){var m=k.rtl?"left":"right";a(k._items[b]).css("border-"+m+"-width","1px");a(k._items[b]).css("border-"+m+"-style","solid")}if(t>1&&e>0){a(k._items[b]).css("border-top-width","1px");a(k._items[b]).css("border-top-style","solid")}if(n&&e===t-2&&d===s-1){a(k._items[b]).css("border-bottom-width","1px");a(k._items[b]).css("border-bottom-style","solid")}b++}}}if(a.jqx.browser.msie&&a.jqx.browser.version<8){k._items.css("padding-left","0px");k._items.css("padding-right","0px");a.each(k._items,function(){a(this).css("border-left-width","0px");a(this).css("border-right-width","0px");a(this).css("position","relative");a(this).css("margin-left","-1px")});k.host.css("border","none")}},_handlePopupHeight:function(){var b=this;if(!b.minimized){return}var d;var c=false;if(b.height.toString().indexOf("%")>=0){b.host.css("height",b.height);d=b.host.height()-b.minimizedHeight-1;c=true}if(c){b.popup.height(d);b.ul.height(d);b.host.height(b.minimizedHeight);b._layoutItems()}},_handleMinimize:function(){var d=this;if(d.minimized){var f=d.host;f.height(d.minimizedHeight);f.css("box-sizing","border-box");f.addClass(d.toThemeProperty("jqx-widget-header"));f.addClass(d.toThemeProperty("jqx-navbar-minimized"));var c=a('<div style="cursor: pointer; height: 100%; margin:0px; margin-left: 5px; margin-right:5px;"></div>');f.append(c);c.css("float",d.minimizeButtonPosition);var e=a('<div style="height: 100%; margin:0px; margin-left: 5px; margin-right:5px;"></div>');e.append(d.minimizedTitle);e.css("float",d.minimizeButtonPosition==="left"?"right":"left");if(d.minimizedHeight!=="auto"){if(d.minimizedHeight.toString().indexOf("%")>=0){e.css("line-height",d.minimizedHeight)}else{e.css("line-height",parseInt(d.minimizedHeight)+"px")}}f.append(e);c.addClass(d.toThemeProperty("jqx-menu-minimized-button"));f.removeClass(d.toThemeProperty("jqx-widget-content"));d.ul.detach();var b=a("<div style='box-sizing: border-box; z-index: 999999; display: none; position: absolute;'></div>");b.addClass(d.toThemeProperty("jqx-widget jqx-widget-content jqx-popup jqx-navbar jqx-navbar-popup"));b.append(d.ul);d.popup=b;a(document.body).append(b);d.opened=false;c.click(function(){if(!d.opened){d.open()}else{d.close()}});d.button=c}},close:function(){var b=this;b.popup.fadeOut(b.popupAnimationDelay);b.opened=false},open:function(){var b=this;b.popup.fadeIn(b.popupAnimationDelay);b.popup.css("top",parseInt(b.host.coord().top)+b.host.outerHeight()-1);b.popup.width(b.host.width());var c=b.host.coord().left;b.popup.css("left",c);if(c.toString().indexOf(".5")>=0){b.popup.width(b.host.width()-0.5)}b._handlePopupHeight();b.opened=true},_resizePopup:function(){var b=this;if(b.minimized&&b.popup){b.popup.width(b.host.width());var c=b.host.coord().left;b.popup.css("left",c);if(c.toString().indexOf(".5")>=0){b.popup.width(b.host.width()-0.5)}b.popup.css("top",parseInt(b.host.coord().top)+b.host.outerHeight()-1);b._handlePopupHeight()}},selectAt:function(c){var d=this;if(!d.selection){return}a(d._items[d.selectedItem]).removeClass(d.toThemeProperty("jqx-fill-state-pressed"));a(d._items[c]).addClass(d.toThemeProperty("jqx-fill-state-pressed"));var b=d.selectedItem;d.selectedItem=c;d._raiseEvent("0",{selectedItem:c,oldSelectedItem:b})},getSelectedIndex:function(){return this.selectedItem},destroy:function(){var b=this;b._removeHandlers();b.host.remove()},propertyChangedHandler:function(b,c,e,d){b.render()},_raiseEvent:function(h,e){var g=this;var c=g.events[h];var f=new a.Event(c);f.owner=g;f.args=e;try{var b=g.host.trigger(f)}catch(d){}return b},_removeHandlers:function(){var b=this;b.removeHandler(b._items,"click.navbar"+b.element.id);b.removeHandler(b._items,"mouseenter.navbar"+b.element.id);b.removeHandler(b._items,"mouseleave.navbar"+b.element.id)},_addClasses:function(){var b=this;b.host.addClass(b.toThemeProperty("jqx-navbar"));if(b.disabled){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}b._items.addClass(b.toThemeProperty("jqx-navbar-block"));b.host.addClass(b.toThemeProperty("jqx-widget"));b.host.addClass(b.toThemeProperty("jqx-widget-content"));b.host.addClass(b.toThemeProperty("jqx-fill-state-normal"));b._items.addClass(b.toThemeProperty("jqx-fill-state-normal"));b._items.addClass(b.toThemeProperty("jqx-button"));if(b.selectedItem!==-1&&b.selection){a(b._items[b.selectedItem]).addClass(b.toThemeProperty("jqx-fill-state-pressed"))}if(b.selection===false){this.host.css("border","none")}if(b.rtl){b._items.addClass(b.toThemeProperty("jqx-navbar-block-rtl"))}},_addHandlers:function(){var b=this;b.addHandler(b._items,"click.navbar"+b.element.id,function(d){if(!b.disabled&&b.selection){var c=a(b._items).index(this);b.selectAt(c)}});b.addHandler(b._items,"mouseenter.navbar"+b.element.id,function(c){if(!b.disabled&&b.selection){a(c.target).addClass(b.toThemeProperty("jqx-fill-state-hover"))}});b.addHandler(b._items,"mouseleave.navbar"+b.element.id,function(c){if(!b.disabled&&b.selection){a(c.target).removeClass(b.toThemeProperty("jqx-fill-state-hover"))}})}})})(jqxBaseFramework);
8
+ (function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxNavBar","",{});a.extend(a.jqx._jqxNavBar.prototype,{defineInstance:function(){var b={height:"auto",minimizedHeight:30,popupAnimationDelay:250,minimizeButtonPosition:"left",width:"100%",selectedItem:0,selection:true,disabled:false,rtl:false,minimized:false,columns:null,minimizedTitle:"",orientation:"horizontal",events:["change"]};if(this===a.jqx._jqxNavBar.prototype){return b}a.extend(true,this,b);return b},createInstance:function(b){this.render()},render:function(){var b=this;if(b.ul&&b.ul.parent()[0]!==b.element){b.ul.detach();b.host.children().remove();b.host.append(b.ul);if(b.popup){b.popup.remove()}b.host.height(null);b.host.removeClass(b.toThemeProperty("jqx-widget-header"));b.host.removeClass(b.toThemeProperty("jqx-navbar-minimized"))}b.ul=b.host.children();b._items=b.ul.children();a.each(b._items,function(){a(this).removeClass()});if(this.width!==null&&(this.width.toString().indexOf("%")>=0||this.width.toString().indexOf("px")>=0)){this.element.style.width=this.width}else{this.element.style.width=this.width+"px"}b._layoutItems();b._addClasses();b._addHandlers();b._handleMinimize();a.jqx.utilities.resize(this.host,function(){b._resizePopup()})},_layoutItems:function(){var k=this;var t=1;var s=0;var o=this.height===null||this.height==="auto";if(k.orientation==="horizontal"){if(k._items.length>5){var c=50+"%";k._items.css("width",c);var q=k.height;t=Math.ceil(k._items.length/2);if(!o){var p;var h=false;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}s=2;if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}}else{var c=k.host.width/2;var g=k._items.length;var c=100/g+"%";k._items.css("width",c);if(!o){if(k.height.toString().indexOf("%")>=0){k._items.css("height",p);k._items.css("line-height",k.height)}else{k._items.height(k.height);k._items.css("line-height",parseInt(k.height)+"px")}}s=g}if(k.columns){var q=k.height;var l=0;for(var e=0;e<k._items.length;e++){var r=k._items[e];a(r).css("width",k.columns[l]);l++;if(l>=k.columns.length){l=0;if(k.columns.length!==k._items.length){t++}}}var h=false;var p;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}if(!o){if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}s=k.columns.length}}else{var q=k.height;var l=0;for(var e=0;e<k._items.length;e++){var r=k._items[e];a(r).css("width","100%")}t=k._items.length;if(!o){var h=false;var p;if(q.toString().indexOf("%")>=0){p=parseInt(q)/t;p+="%";h=true}else{p=parseInt(q)/t}if(h){k._items.css("height",p);k._items.css("line-height",k._items.height()+"px")}else{k._items.height(p);k._items.css("line-height",p+"px")}}s=1}if(k.selection){var b=0;var f=k._items.length/s;var n=false;if(f<t){n=true}for(var e=0;e<t;e++){for(var d=0;d<s;d++){if(d<s-1){var m=k.rtl?"left":"right";a(k._items[b]).css("border-"+m+"-width","1px");a(k._items[b]).css("border-"+m+"-style","solid")}if(t>1&&e>0){a(k._items[b]).css("border-top-width","1px");a(k._items[b]).css("border-top-style","solid")}if(n&&e===t-2&&d===s-1){a(k._items[b]).css("border-bottom-width","1px");a(k._items[b]).css("border-bottom-style","solid")}b++}}}if(a.jqx.browser.msie&&a.jqx.browser.version<8){k._items.css("padding-left","0px");k._items.css("padding-right","0px");a.each(k._items,function(){a(this).css("border-left-width","0px");a(this).css("border-right-width","0px");a(this).css("position","relative");a(this).css("margin-left","-1px")});k.host.css("border","none")}},_handlePopupHeight:function(){var b=this;if(!b.minimized){return}var d;var c=false;if(b.height.toString().indexOf("%")>=0){b.host.css("height",b.height);d=b.host.height()-b.minimizedHeight-1;c=true}if(c){b.popup.height(d);b.ul.height(d);b.host.height(b.minimizedHeight);b._layoutItems()}},_handleMinimize:function(){var d=this;if(d.minimized){var f=d.host;f.height(d.minimizedHeight);f.css("box-sizing","border-box");f.addClass(d.toThemeProperty("jqx-widget-header"));f.addClass(d.toThemeProperty("jqx-navbar-minimized"));var c=a('<div style="cursor: pointer; height: 100%; margin:0px; margin-left: 5px; margin-right:5px;"></div>');f.append(c);c.css("float",d.minimizeButtonPosition);var e=a('<div style="height: 100%; margin:0px; margin-left: 5px; margin-right:5px;"></div>');e.append(d.minimizedTitle);e.css("float",d.minimizeButtonPosition==="left"?"right":"left");if(d.minimizedHeight!=="auto"){if(d.minimizedHeight.toString().indexOf("%")>=0){e.css("line-height",d.minimizedHeight)}else{e.css("line-height",parseInt(d.minimizedHeight)+"px")}}f.append(e);c.addClass(d.toThemeProperty("jqx-menu-minimized-button"));f.removeClass(d.toThemeProperty("jqx-widget-content"));d.ul.detach();var b=a("<div style='box-sizing: border-box; z-index: 999999; display: none; position: absolute;'></div>");b.addClass(d.toThemeProperty("jqx-widget jqx-widget-content jqx-popup jqx-navbar jqx-navbar-popup"));b.append(d.ul);d.popup=b;a(document.body).append(b);d.opened=false;c.click(function(){if(!d.opened){d.open()}else{d.close()}});d.button=c}},close:function(){var b=this;b.popup.fadeOut(b.popupAnimationDelay);b.opened=false},open:function(){var b=this;b.popup.fadeIn(b.popupAnimationDelay);b.popup.css("top",parseInt(b.host.coord().top)+b.host.outerHeight()-1);b.popup.width(b.host.width());var c=b.host.coord().left;b.popup.css("left",c);if(c.toString().indexOf(".5")>=0){b.popup.width(b.host.width()-0.5)}b._handlePopupHeight();b.opened=true},_resizePopup:function(){var b=this;if(b.minimized&&b.popup){b.popup.width(b.host.width());var c=b.host.coord().left;b.popup.css("left",c);if(c.toString().indexOf(".5")>=0){b.popup.width(b.host.width()-0.5)}b.popup.css("top",parseInt(b.host.coord().top)+b.host.outerHeight()-1);b._handlePopupHeight()}},selectAt:function(c){var d=this;if(!d.selection){return}a(d._items[d.selectedItem]).removeClass(d.toThemeProperty("jqx-fill-state-pressed"));a(d._items[c]).addClass(d.toThemeProperty("jqx-fill-state-pressed"));var b=d.selectedItem;d.selectedItem=c;d._raiseEvent("0",{selectedItem:c,oldSelectedItem:b})},getSelectedIndex:function(){return this.selectedItem},destroy:function(){var b=this;b._removeHandlers();b.host.remove()},propertyChangedHandler:function(b,c,e,d){b.render()},_raiseEvent:function(h,e){var g=this;var c=g.events[h];var f=new a.Event(c);f.owner=g;f.args=e;try{var b=g.host.trigger(f)}catch(d){}return b},_removeHandlers:function(){var b=this;b.removeHandler(b._items,"click.navbar"+b.element.id);b.removeHandler(b._items,"mouseenter.navbar"+b.element.id);b.removeHandler(b._items,"mouseleave.navbar"+b.element.id)},_addClasses:function(){var b=this;b.host.addClass(b.toThemeProperty("jqx-navbar"));if(b.disabled){b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled"))}b._items.addClass(b.toThemeProperty("jqx-navbar-block"));b.host.addClass(b.toThemeProperty("jqx-widget"));b.host.addClass(b.toThemeProperty("jqx-widget-content"));b.host.addClass(b.toThemeProperty("jqx-fill-state-normal"));b._items.addClass(b.toThemeProperty("jqx-fill-state-normal"));b._items.addClass(b.toThemeProperty("jqx-button"));if(b.selectedItem!==-1&&b.selection){a(b._items[b.selectedItem]).addClass(b.toThemeProperty("jqx-fill-state-pressed"))}if(b.selection===false){this.host.css("border","none")}if(b.rtl){b._items.addClass(b.toThemeProperty("jqx-navbar-block-rtl"))}},_addHandlers:function(){var b=this;b.addHandler(b._items,"click.navbar"+b.element.id,function(d){if(!b.disabled&&b.selection){var c=a(b._items).index(this);b.selectAt(c)}});b.addHandler(b._items,"mouseenter.navbar"+b.element.id,function(c){if(!b.disabled&&b.selection){a(c.target).addClass(b.toThemeProperty("jqx-fill-state-hover"))}});b.addHandler(b._items,"mouseleave.navbar"+b.element.id,function(c){if(!b.disabled&&b.selection){a(c.target).removeClass(b.toThemeProperty("jqx-fill-state-hover"))}})}})})(jqxBaseFramework)})();
9
9
 
@@ -5,5 +5,5 @@ License: https://jqwidgets.com/license/
5
5
  */
6
6
  /* eslint-disable */
7
7
 
8
- (function(a){a.jqx.jqxWidget("jqxNavigationBar","",{});a.extend(a.jqx._jqxNavigationBar.prototype,{defineInstance:function(){var b={width:"auto",height:"auto",expandAnimationDuration:250,collapseAnimationDuration:250,animationType:"slide",toggleMode:"click",showArrow:true,arrowPosition:"right",disabled:false,initContent:null,rtl:false,easing:"easeInOutSine",expandMode:"singleFitHeight",expandedIndexes:[],_expandModes:["singleFitHeight","single","multiple","toggle","none"],aria:{"aria-disabled":{name:"disabled",type:"boolean"}},events:["expandingItem","expandedItem","collapsingItem","collapsedItem"]};if(this===a.jqx._jqxNavigationBar.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this._isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);this.render()},val:function(b){if(arguments.length===0||typeof(b)=="object"){return this.expandedIndexes}if(typeof b=="string"){this.expandedIndexes.push(parseInt(b,10));this._applyExpandedIndexes()}else{if(b instanceof Array){this.expandedIndexes=b}else{this.expandedIndexes=[b]}this._applyExpandedIndexes()}return this.expandedIndexes},expandAt:function(b){var f=this;if(this.expandMode=="single"||this.expandMode=="singleFitHeight"||this.expandMode=="toggle"){for(var c=0;c<f.items.length;c++){if(c!=b){f.collapseAt(c)}}}var g=this.items[b];if(g.disabled===false&&g.expanded===false&&g._expandChecker==1){g._expandChecker=0;this._raiseEvent("0",{item:b});g._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-normal"));g._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-pressed jqx-expander-header-expanded"));g._arrowHelper.removeClass(this.toThemeProperty("jqx-icon-arrow-down jqx-icon-arrow-down-hover jqx-icon-arrow-up-hover jqx-icon-arrow-down-selected jqx-expander-arrow-top"));g._arrowHelper.addClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));if(this.heightFlag===false){f.element.style.overflowX="hidden";f.element.style.overflowY="hidden"}this.eCFlag=1;switch(this.animationType){case"slide":var e=g._contentHelper,h=0,d=e.outerHeight();e.slideDown({duration:this.expandAnimationDuration,easing:this.easing,step:function(i,j){j.now=Math.round(i);if(j.prop!=="height"){h+=j.now}else{if(f._collapseContent){j.now=Math.round(d-f._collapseContent.outerHeight()-h);h=0}else{j.now=Math.round(i)}}},complete:function(){g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);f._updateExpandedIndexes();f._raiseEvent("1",{item:b});f._checkHeight();if(f.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(f.initContent&&g._initialized===false){f.initContent(b);g._initialized=true}f.eCFlag=0}});break;case"fade":setTimeout(function(){g._contentHelper.fadeIn({duration:this.expandAnimationDuration,complete:function(){g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);f._updateExpandedIndexes();f._raiseEvent("1",{item:b});f._checkHeight();if(f.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(f.initContent&&g._initialized===false){f.initContent(b);g._initialized=true}f.eCFlag=0}})},this.collapseAnimationDuration);break;case"none":g._content.style.display="";g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);this._updateExpandedIndexes();this._raiseEvent("1",{item:b});this._checkHeight();if(this.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(this.initContent&&g._initialized===false){this.initContent(b);g._initialized=true}this.eCFlag=0;break}}},collapseAt:function(b){var e=this.items[b];if(e.disabled===false&&e.expanded===true&&e._expandChecker===0){var d=this;e._expandChecker=1;this._raiseEvent("2",{item:b});e._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-pressed jqx-expander-header-expanded"));e._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-normal"));e._arrowHelper.removeClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-icon-arrow-down-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));e._arrowHelper.addClass(this.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top"));if(this.heightFlag===false){d.element.style.overflowX="hidden";d.element.style.overflowY="hidden"}this.eCFlag=1;this._collapseContent=e._contentHelper;switch(this.animationType){case"slide":var c=e._contentHelper;c.slideUp({duration:this.collapseAnimationDuration,step:function(f,g){g.now=Math.round(f)},easing:this.easing,complete:function(){e.expanded=false;e._content.style.display="none";a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);d._updateExpandedIndexes();d._raiseEvent("3",{item:b});d._checkHeight();if(d.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}d.eCFlag=0;d._collapseContent=null}});break;case"fade":e._contentHelper.fadeOut({duration:this.collapseAnimationDuration,complete:function(){e.expanded=false;a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);d._updateExpandedIndexes();d._raiseEvent("3",{item:b});d._checkHeight();if(d.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}d.eCFlag=0}});break;case"none":e._content.style.display="none";e.expanded=false;a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);this._updateExpandedIndexes();this._raiseEvent("3",{item:b});this._checkHeight();if(this.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}this.eCFlag=0;break}}},setHeaderContentAt:function(b,c){this.items[b]._headerText.innerHTML=c},getHeaderContentAt:function(b){return this.items[b]._headerText.innerHTML},setContentAt:function(b,c){this.items[b]._content.innerHTML=c;this._checkContent(b)},getContentAt:function(b){return this.items[b]._content.innerHTML},showArrowAt:function(b){this.items[b]._arrow.style.display="block"},hideArrowAt:function(b){this.items[b]._arrow.style.display="none"},enable:function(){this.disabled=false;this._enabledDisabledCheck();this.refresh();a.jqx.aria(this,"aria-disabled",false)},disable:function(){this.disabled=true;this._enabledDisabledCheck();this.refresh();a.jqx.aria(this,"aria-disabled",true)},enableAt:function(b){this.items[b].disabled=false;this.refresh()},disableAt:function(b){this.items[b].disabled=true;this.refresh()},invalidate:function(){this.refresh()},refresh:function(c){if(c===true){return}this._removeHandlers();for(var b=0;b<this.items.length;b++){this.items[b]._arrow.style.display=this.showArrow?"block":"none"}this._updateExpandedIndexes();this._setTheme();this._setSize();this._toggle();this._keyBoard()},render:function(){this.widgetID=this.element.id;var s=this;if(this._expandModes.indexOf(this.expandMode)==-1){this.expandMode="singleFitHeight"}a.jqx.utilities.resize(this.host,function(){s._setSize()});s.element.setAttribute("role","tablist");if(this.items){this._removeHandlers();a.each(this.items,function(){this._header.className="";this._header.setAttribute("tabindex",null);this._header.style.marginTop="0px";this._headerText.className="";this._header.innerHTML=this._headerText.innerHTML;this._content.setAttribute("tabindex",null)})}this.items=[];var t=s.host.children(),p=t.length;var w="Invalid jqxNavigationBar structure. Please add an even number of child div elements that will represent each item's header and content.";try{if(p%2!==0){throw w}}catch(d){throw new Error(d)}var g="Invalid jqxNavigationBar structure. Please make sure all the children elements of the navigationbar are divs.";try{for(var u=0;u<p;u++){if(t[u].tagName.toLowerCase()!="div"){throw g}}}catch(d){throw new Error(d)}for(var x=0;x<p;x+=2){var r=t[x];r.innerHTML="<div>"+r.innerHTML+"</div>"}var o=0;var h;for(var n=0;n<p/2;n++){h=o+1;var v={};v={};v._header=t[o];v._headerHelper=a(t[o]);t[o].setAttribute("role","tab");v._content=t[h];v._contentHelper=a(t[h]);if(v._contentHelper.initAnimate){v._contentHelper.initAnimate()}v.expandedFlag=false;v.expanded=false;v.focusedH=false;v.focusedC=false;this.items[n]=v;t[h].setAttribute("role","tabpanel");o+=2}var b=this.expandedIndexes.length;if(this.items&&this.items.length===0){return}if(this.expandMode=="single"||this.expandMode=="singleFitHeight"||this.expandMode=="toggle"||this.expandMode=="none"){if(b!==0){this.items[this.expandedIndexes[0]].expanded=true}else{if(b===0&&(this.expandMode=="single"||this.expandMode=="singleFitHeight")){this.items[0].expanded=true}}}else{if(this.expandMode=="multiple"){if(b!==0){for(var f=0;f<b;f++){s.items[this.expandedIndexes[f]].expanded=true}}}}this._enabledDisabledCheck();var q=0;a.each(this.items,function(c){var i=this;i._headerText=a(i._header).children()[0];if(!s.rtl){a(i._headerText).addClass(s.toThemeProperty("jqx-expander-header-content"))}else{a(i._headerText).addClass(s.toThemeProperty("jqx-expander-header-content-rtl"))}i._arrow=document.createElement("div");i._arrowHelper=a(i._arrow);i._header.appendChild(i._arrow);if(s.showArrow){i._arrow.style.display="block"}else{i._arrow.style.display="none"}if(i.expanded===true){i._arrowHelper.addClass(s.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));if(s.initContent){setTimeout(function(){s.initContent(c);i._initialized=true},10)}else{i._initialized=true}i._expandChecker=0;a.jqx.aria(i._header,"aria-expanded",true);a.jqx.aria(i._content,"aria-hidden",false)}else{if(i.expanded===false){i._arrowHelper.addClass(s.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top"));i._initialized=false;i._expandChecker=1;i._content.style.display="none";a.jqx.aria(i._header,"aria-expanded",false);a.jqx.aria(i._content,"aria-hidden",true)}}if(i._header.getAttribute("tabindex")===null){q++;i._header.setAttribute("tabindex",q)}if(i._content.getAttribute("tabindex")===null){q++;i._content.setAttribute("tabindex",q)}});this._setTheme();this._setSize();for(var e=0;e<s.items.length;e++){s._checkContent(e)}this._toggle();this._keyBoard()},insert:function(b,g,e){var f=document.createElement("div"),c=document.createElement("div");f.innerHTML=g;c.innerHTML=e;if(b>=0&&b<=this.items.length){var d=this.items[b]._header;this.element.insertBefore(f,d);this.element.insertBefore(c,d)}else{this.element.appendChild(f);this.element.appendChild(c)}this.render()},add:function(c,b){this.insert(-1,c,b)},update:function(b,d,c){this.setHeaderContentAt(b,d);this.setContentAt(b,c)},remove:function(b){if(isNaN(b)){b=this.items.length-1}if(!this.items[b]){return}this.items[b]._header.remove();this.items[b]._content.remove();this.items.splice(b,1);var c=this.expandedIndexes.indexOf(b);if(c>-1){this.expandedIndexes.splice(c,1)}this.render()},destroy:function(){this._removeHandlers();this.host.remove()},focus:function(){try{for(var c=0;c<this.items.length;c++){var d=this.items[c];if(d.disabled===false){d._header.focus();return false}}}catch(b){}},_applyExpandedIndexes:function(){var g=this;var f=this.expandedIndexes.length;for(var d=0;d<f;d++){var h=g.expandedIndexes[d];for(var c=0;c<g.items.length;c++){var e=g.items[c];if(c==h){e.expandedFlag=true;if(e.expanded===false){g.expandAt(c)}if(g.expandMode=="single"||g.expandMode=="singleFitHeight"||g.expandMode=="toggle"||g.expandMode=="none"){return false}}else{if(c!=h&&e.expandedFlag===false){g.collapseAt(c)}}}}for(var b=0;b<g.items.length;b++){g.items[b].expandedFlag=false}},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b._setSize()}},propertyChangedHandler:function(b,c,e,d){if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c=="width"||c=="height"){b._setSize();return}if(c==="theme"){b.render();return}if(c=="disabled"){b._enabledDisabledCheck()}else{if(c=="expandedIndexes"){b._applyExpandedIndexes()}else{b.refresh()}}},_raiseEvent:function(g,e){var c=this.events[g];var f=new a.Event(c);f.owner=this;f.args=e;f.item=f.args.item;var b;try{b=this.host.trigger(f)}catch(d){}return b},resize:function(c,b){this.width=c;this.height=b;this._setSize()},_setSize:function(){var k=this;this.headersHeight=0;var e=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-left"),10):0;var d=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-right"),10):0;var b=2;var c=e+d+b;if(isNaN(c)){c=12}if(this.width=="auto"){k.element.style.width="auto"}else{if(this.width!=null&&this.width.toString().indexOf("%")!=-1){k.element.style.width=k.width}else{k.element.style.width=(parseInt(this.width,10)+c)+"px"}}if(typeof k.height==="number"){k.element.style.height=k.height+"px"}else{k.element.style.height=k.height}for(var h=0;h<k.items.length;h++){var n=k.items[h];var f=k.arrowPosition;if(k.rtl){switch(f){case"left":f="right";break;case"right":f="left";break}}if(f=="right"){n._headerText.style["float"]="left";n._headerText.style.marginLeft="0px";n._arrow.style["float"]="right";n._arrow.style.position="relative"}else{if(f=="left"){if(k.width=="auto"){n._headerText.style["float"]="left";n._headerText.style.marginLeft="17px";n._arrow.style["float"]="left";n._arrow.style.position="absolute"}else{n._headerText.style["float"]="right";n._headerText.style.marginLeft="0px";n._arrow.style["float"]="left";n._arrow.style.position="relative"}}}n._header.style.height="auto";n._headerText.style.minHeight=n._arrow.offsetHeight;k.headersHeight+=a(n._header).outerHeight();n._arrow.style.marginTop=(n._headerText.offsetHeight/2-n._arrow.offsetHeight/2)+"px"}for(var g=0;g<k.items.length;g++){var m=k.items[g];if(k.height!="auto"){if(k.expandMode=="single"||k.expandMode=="toggle"||k.expandMode=="multiple"){k.element.style.overflowX="hidden";k.element.style.overflowY="auto"}else{if(k.expandMode=="singleFitHeight"){var l=parseInt(m._contentHelper.css("padding-top"),10)+parseInt(m._contentHelper.css("padding-bottom"),10);if(k.height&&k.height.toString().indexOf("%")>=0){m._content.style.height=Math.max(0,(k.element.offsetHeight-k.headersHeight-l+2))+"px"}else{m._content.style.height=Math.max(0,(k.element.offsetHeight-k.headersHeight-l))+"px"}}}}}k._checkHeight()},_toggle:function(){var b=this;if(this._isTouchDevice===false){switch(this.toggleMode){case"click":case"dblclick":a.each(this.items,function(c){var d=this;if(d.disabled===false){b.addHandler(d._header,b.toggleMode+".navigationbar"+b.widgetID,function(){b.focusedH=true;b._animate(c)})}});break;case"none":break}}else{if(this.toggleMode!="none"){a.each(this.items,function(c){var d=this;if(d.disabled===false){b.addHandler(d._header,a.jqx.mobile.getTouchEventName("touchstart")+"."+b.widgetID,function(){b._animate(c)})}})}else{return}}},_animate:function(c,b){var d=this;var e=this.items[c];if(this.expandMode!="none"&&this.eCFlag!=1){if(this.items[c].expanded===true){if(this.expandMode=="multiple"||this.expandMode=="toggle"){this.collapseAt(c)}}else{this.expandAt(c)}if(!d._isTouchDevice){if(b!==true){e._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));e._arrowHelper.addClass(this.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}else{e._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));e._arrowHelper.removeClass(this.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}}}},_removeHandlers:function(){var d=this;this.removeHandler(this.host,"keydown.navigationbar"+this.widgetID);for(var b=0;b<d.items.length;b++){var c=d.items[b];d.removeHandler(c._header,"click.navigationbar"+d.widgetID);d.removeHandler(c._header,"dblclick.navigationbar"+d.widgetID);d.removeHandler(c._header,"mouseenter.navigationbar"+d.widgetID);d.removeHandler(c._header,"mouseleave.navigationbar"+d.widgetID);d.removeHandler(c._header,"focus.navigationbar"+d.widgetID);d.removeHandler(c._header,"blur.navigationbar"+d.widgetID);d.removeHandler(c._content,"focus.navigationbar"+d.widgetID);d.removeHandler(c._content,"blur.navigationbar"+d.widgetID);d.removeHandler(c._headerText,"focus.navigationbar"+d.widgetID);d.removeHandler(c._arrow,"focus.navigationbar"+d.widgetID)}},_setTheme:function(){var b=this;this.host.addClass(this.toThemeProperty("jqx-reset jqx-widget"));if(this.rtl===true){this.host.addClass(this.toThemeProperty("jqx-rtl"))}a.each(this.items,function(e){var g=this,h=g._headerHelper,i=g._arrowHelper,c=g._contentHelper,f="jqx-widget-header jqx-item jqx-expander-header",d="jqx-widget-content jqx-expander-content jqx-expander-content-bottom";g._header.style.position="relative";g._content.style.position="relative";if(g.disabled===false){h.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));c.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));if(g.expanded===true){f+=" jqx-fill-state-pressed jqx-expander-header-expanded"}else{f+=" jqx-fill-state-normal";h.removeClass(b.toThemeProperty("jqx-expander-header-expanded"))}if(!b._isTouchDevice){b.addHandler(g._header,"mouseenter.navigationbar"+b.widgetID,function(){if(g._expandChecker==1){if(!g.focusedH){g._header.style.zIndex=5}h.removeClass(b.toThemeProperty("jqx-fill-state-normal jqx-fill-state-pressed"));h.addClass(b.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));i.addClass(b.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"));if(g.expanded){i.addClass(b.toThemeProperty("jqx-icon-arrow-up-hover"))}else{i.addClass(b.toThemeProperty("jqx-icon-arrow-down-hover"))}}});b.addHandler(g._header,"mouseleave.navigationbar"+b.widgetID,function(){if(!g.focusedH){g._header.style.zIndex=0}h.removeClass(b.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));i.removeClass(b.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover jqx-icon-arrow-up-hover jqx-icon-arrow-down-hover"));if(g._expandChecker==1){h.addClass(b.toThemeProperty("jqx-fill-state-normal"))}else{h.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}})}}else{f+=" jqx-fill-state-disabled";d+=" jqx-fill-state-disabled"}b.host.addClass(b.toThemeProperty("jqx-navigationbar"));h.addClass(b.toThemeProperty(f));c.addClass(b.toThemeProperty(d));if(e!==0){g._header.style.marginTop="-1px"}i.addClass(b.toThemeProperty("jqx-expander-arrow"))})},_checkContent:function(b){var d=this.items[b];var c=d._content;this._cntntEmpty=/^\s*$/.test(this.items[b]._content.innerHTML);if(this._cntntEmpty===true){c.style.display="none";c.style.height="0px";d._contentHelper.addClass(this.toThemeProperty("jqx-expander-content-empty"))}else{if(d.expanded){c.style.display="block"}if(this.expandMode=="singleFitHeight"){var e=1;if(b!==0){}c.style.height=Math.max(0,(this.element.offsetHeight-this.headersHeight+this.items.length-2))+"px"}else{c.style.height="auto"}d._contentHelper.removeClass(this.toThemeProperty("jqx-expander-content-empty"))}},_checkHeight:function(){var h=this;if(typeof h.width==="string"&&h.width.indexOf("%")!==-1){return}var j=0;var e=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-left"),10):0;var d=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-right"),10):0;var b=2;var c=e+d+b;if(isNaN(c)){c=12}var g=17;for(var f=0;f<h.items.length;f++){var k=h.items[f];j+=(k.expanded?k._contentHelper.outerHeight():0)+k._headerHelper.outerHeight()}if(this.width!="auto"&&this.height!="auto"&&this.expandMode!="singleFitHeight"){if(j>h.element.offsetHeight){h.element.style.width=(parseInt(this.width,10)+c+g)+"px";this.heightFlag=true}else{h.element.style.width=(parseInt(this.width,10)+c)+"px";this.heightFlag=false}}},_enabledDisabledCheck:function(){for(var b=0;b<this.items.length;b++){this.items[b].disabled=this.disabled}},_updateExpandedIndexes:function(){var b=this;this.expandedIndexes=[];a.each(this.items,function(c){var d=this;if(d.expanded===true){b.expandedIndexes.push(c);if(b.expandMode=="single"||b.expandMode=="singleFitHeight"||b.expandMode=="toggle"||b.expandMode=="none"){return false}}})},_keyBoard:function(){var b=this;this._focus();this.addHandler(this.host,"keydown.navigationbar"+this.widgetID,function(d){var e=false,c=b.items.length;a.each(b.items,function(f){var g=this;if((g.focusedH===true||g.focusedC===true)&&g.disabled===false){switch(d.keyCode){case 13:case 32:if(b.toggleMode!="none"){if(g.focusedH===true){b._animate(f,true)}e=true}break;case 37:if(f!==0){b.items[f-1]._header.focus()}else{b.items[c-1]._header.focus()}e=true;break;case 38:if(d.ctrlKey===false){if(f!==0){b.items[f-1]._header.focus()}else{b.items[c-1]._header.focus()}}else{if(g.focusedC===true){g._header.focus()}}e=true;break;case 39:if(f!=c-1){b.items[f+1]._header.focus()}else{b.items[0]._header.focus()}e=true;break;case 40:if(d.ctrlKey===false){if(f!=c-1){b.items[f+1]._header.focus()}else{b.items[0]._header.focus()}}else{if(g.expanded===true){g._content.focus()}}e=true;break;case 35:if(f!=c-1){b.items[c-1]._header.focus()}e=true;break;case 36:if(f!==0){b.items[0]._header.focus()}e=true;break}return false}});if(e&&d.preventDefault){d.preventDefault()}return !e})},_focus:function(){var b=this;if(this.disabled){return}a.each(this.items,function(){var c=this;b.addHandler(c._header,"focus.navigationbar"+this.widgetID,function(){c.focusedH=true;a.jqx.aria(c._header,"aria-selected",true);c._headerHelper.addClass(b.toThemeProperty("jqx-fill-state-focus"));c._header.style.zIndex=10});b.addHandler(c._header,"blur.navigationbar"+this.widgetID,function(){c.focusedH=false;a.jqx.aria(c._header,"aria-selected",false);if(c._header.className.indexOf("jqx-expander-header-hover")!==-1){c._header.style.zIndex=5}else{c._header.style.zIndex=0}c._headerHelper.removeClass(b.toThemeProperty("jqx-fill-state-focus"))});b.addHandler(c._headerText,"focus.navigationbar"+this.widgetID,function(){c._header.focus()});b.addHandler(c._arrow,"focus.navigationbar"+this.widgetID,function(){c._header.focus()});b.addHandler(c._content,"focus.navigationbar"+this.widgetID,function(){c.focusedC=true;c._contentHelper.addClass(b.toThemeProperty("jqx-fill-state-focus"))});b.addHandler(c._content,"blur.navigationbar"+this.widgetID,function(){c.focusedC=false;c._contentHelper.removeClass(b.toThemeProperty("jqx-fill-state-focus"))})})}})})(jqxBaseFramework);
8
+ (function(){if(typeof document==="undefined"){return}(function(a){a.jqx.jqxWidget("jqxNavigationBar","",{});a.extend(a.jqx._jqxNavigationBar.prototype,{defineInstance:function(){var b={width:"auto",height:"auto",expandAnimationDuration:250,collapseAnimationDuration:250,animationType:"slide",toggleMode:"click",showArrow:true,arrowPosition:"right",disabled:false,initContent:null,rtl:false,easing:"easeInOutSine",expandMode:"singleFitHeight",expandedIndexes:[],_expandModes:["singleFitHeight","single","multiple","toggle","none"],aria:{"aria-disabled":{name:"disabled",type:"boolean"}},events:["expandingItem","expandedItem","collapsingItem","collapsedItem"]};if(this===a.jqx._jqxNavigationBar.prototype){return b}a.extend(true,this,b);return b},createInstance:function(){this._isTouchDevice=a.jqx.mobile.isTouchDevice();a.jqx.aria(this);this.render()},val:function(b){if(arguments.length===0||typeof(b)=="object"){return this.expandedIndexes}if(typeof b=="string"){this.expandedIndexes.push(parseInt(b,10));this._applyExpandedIndexes()}else{if(b instanceof Array){this.expandedIndexes=b}else{this.expandedIndexes=[b]}this._applyExpandedIndexes()}return this.expandedIndexes},expandAt:function(b){var f=this;if(this.expandMode=="single"||this.expandMode=="singleFitHeight"||this.expandMode=="toggle"){for(var c=0;c<f.items.length;c++){if(c!=b){f.collapseAt(c)}}}var g=this.items[b];if(g.disabled===false&&g.expanded===false&&g._expandChecker==1){g._expandChecker=0;this._raiseEvent("0",{item:b});g._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-normal"));g._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-pressed jqx-expander-header-expanded"));g._arrowHelper.removeClass(this.toThemeProperty("jqx-icon-arrow-down jqx-icon-arrow-down-hover jqx-icon-arrow-up-hover jqx-icon-arrow-down-selected jqx-expander-arrow-top"));g._arrowHelper.addClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));if(this.heightFlag===false){f.element.style.overflowX="hidden";f.element.style.overflowY="hidden"}this.eCFlag=1;switch(this.animationType){case"slide":var e=g._contentHelper,h=0,d=e.outerHeight();e.slideDown({duration:this.expandAnimationDuration,easing:this.easing,step:function(i,j){j.now=Math.round(i);if(j.prop!=="height"){h+=j.now}else{if(f._collapseContent){j.now=Math.round(d-f._collapseContent.outerHeight()-h);h=0}else{j.now=Math.round(i)}}},complete:function(){g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);f._updateExpandedIndexes();f._raiseEvent("1",{item:b});f._checkHeight();if(f.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(f.initContent&&g._initialized===false){f.initContent(b);g._initialized=true}f.eCFlag=0}});break;case"fade":setTimeout(function(){g._contentHelper.fadeIn({duration:this.expandAnimationDuration,complete:function(){g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);f._updateExpandedIndexes();f._raiseEvent("1",{item:b});f._checkHeight();if(f.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(f.initContent&&g._initialized===false){f.initContent(b);g._initialized=true}f.eCFlag=0}})},this.collapseAnimationDuration);break;case"none":g._content.style.display="";g.expanded=true;a.jqx.aria(g._header,"aria-expanded",true);a.jqx.aria(g._content,"aria-hidden",false);this._updateExpandedIndexes();this._raiseEvent("1",{item:b});this._checkHeight();if(this.heightFlag===true){f.element.style.overflowX="hidden";f.element.style.overflowY="auto"}if(this.initContent&&g._initialized===false){this.initContent(b);g._initialized=true}this.eCFlag=0;break}}},collapseAt:function(b){var e=this.items[b];if(e.disabled===false&&e.expanded===true&&e._expandChecker===0){var d=this;e._expandChecker=1;this._raiseEvent("2",{item:b});e._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-pressed jqx-expander-header-expanded"));e._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-normal"));e._arrowHelper.removeClass(this.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-icon-arrow-down-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));e._arrowHelper.addClass(this.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top"));if(this.heightFlag===false){d.element.style.overflowX="hidden";d.element.style.overflowY="hidden"}this.eCFlag=1;this._collapseContent=e._contentHelper;switch(this.animationType){case"slide":var c=e._contentHelper;c.slideUp({duration:this.collapseAnimationDuration,step:function(f,g){g.now=Math.round(f)},easing:this.easing,complete:function(){e.expanded=false;e._content.style.display="none";a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);d._updateExpandedIndexes();d._raiseEvent("3",{item:b});d._checkHeight();if(d.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}d.eCFlag=0;d._collapseContent=null}});break;case"fade":e._contentHelper.fadeOut({duration:this.collapseAnimationDuration,complete:function(){e.expanded=false;a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);d._updateExpandedIndexes();d._raiseEvent("3",{item:b});d._checkHeight();if(d.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}d.eCFlag=0}});break;case"none":e._content.style.display="none";e.expanded=false;a.jqx.aria(e._header,"aria-expanded",false);a.jqx.aria(e._content,"aria-hidden",true);this._updateExpandedIndexes();this._raiseEvent("3",{item:b});this._checkHeight();if(this.heightFlag===true){d.element.style.overflowX="hidden";d.element.style.overflowY="auto"}this.eCFlag=0;break}}},setHeaderContentAt:function(b,c){this.items[b]._headerText.innerHTML=c},getHeaderContentAt:function(b){return this.items[b]._headerText.innerHTML},setContentAt:function(b,c){this.items[b]._content.innerHTML=c;this._checkContent(b)},getContentAt:function(b){return this.items[b]._content.innerHTML},showArrowAt:function(b){this.items[b]._arrow.style.display="block"},hideArrowAt:function(b){this.items[b]._arrow.style.display="none"},enable:function(){this.disabled=false;this._enabledDisabledCheck();this.refresh();a.jqx.aria(this,"aria-disabled",false)},disable:function(){this.disabled=true;this._enabledDisabledCheck();this.refresh();a.jqx.aria(this,"aria-disabled",true)},enableAt:function(b){this.items[b].disabled=false;this.refresh()},disableAt:function(b){this.items[b].disabled=true;this.refresh()},invalidate:function(){this.refresh()},refresh:function(c){if(c===true){return}this._removeHandlers();for(var b=0;b<this.items.length;b++){this.items[b]._arrow.style.display=this.showArrow?"block":"none"}this._updateExpandedIndexes();this._setTheme();this._setSize();this._toggle();this._keyBoard()},render:function(){this.widgetID=this.element.id;var s=this;if(this._expandModes.indexOf(this.expandMode)==-1){this.expandMode="singleFitHeight"}a.jqx.utilities.resize(this.host,function(){s._setSize()});s.element.setAttribute("role","tablist");if(this.items){this._removeHandlers();a.each(this.items,function(){this._header.className="";this._header.setAttribute("tabindex",null);this._header.style.marginTop="0px";this._headerText.className="";this._header.innerHTML=this._headerText.innerHTML;this._content.setAttribute("tabindex",null)})}this.items=[];var t=s.host.children(),p=t.length;var w="Invalid jqxNavigationBar structure. Please add an even number of child div elements that will represent each item's header and content.";try{if(p%2!==0){throw w}}catch(d){throw new Error(d)}var g="Invalid jqxNavigationBar structure. Please make sure all the children elements of the navigationbar are divs.";try{for(var u=0;u<p;u++){if(t[u].tagName.toLowerCase()!="div"){throw g}}}catch(d){throw new Error(d)}for(var x=0;x<p;x+=2){var r=t[x];r.innerHTML="<div>"+r.innerHTML+"</div>"}var o=0;var h;for(var n=0;n<p/2;n++){h=o+1;var v={};v={};v._header=t[o];v._headerHelper=a(t[o]);t[o].setAttribute("role","tab");v._content=t[h];v._contentHelper=a(t[h]);if(v._contentHelper.initAnimate){v._contentHelper.initAnimate()}v.expandedFlag=false;v.expanded=false;v.focusedH=false;v.focusedC=false;this.items[n]=v;t[h].setAttribute("role","tabpanel");o+=2}var b=this.expandedIndexes.length;if(this.items&&this.items.length===0){return}if(this.expandMode=="single"||this.expandMode=="singleFitHeight"||this.expandMode=="toggle"||this.expandMode=="none"){if(b!==0){this.items[this.expandedIndexes[0]].expanded=true}else{if(b===0&&(this.expandMode=="single"||this.expandMode=="singleFitHeight")){this.items[0].expanded=true}}}else{if(this.expandMode=="multiple"){if(b!==0){for(var f=0;f<b;f++){s.items[this.expandedIndexes[f]].expanded=true}}}}this._enabledDisabledCheck();var q=0;a.each(this.items,function(c){var i=this;i._headerText=a(i._header).children()[0];if(!s.rtl){a(i._headerText).addClass(s.toThemeProperty("jqx-expander-header-content"))}else{a(i._headerText).addClass(s.toThemeProperty("jqx-expander-header-content-rtl"))}i._arrow=document.createElement("div");i._arrowHelper=a(i._arrow);i._header.appendChild(i._arrow);if(s.showArrow){i._arrow.style.display="block"}else{i._arrow.style.display="none"}if(i.expanded===true){i._arrowHelper.addClass(s.toThemeProperty("jqx-icon-arrow-up jqx-icon-arrow-up-selected jqx-expander-arrow-bottom jqx-expander-arrow-expanded"));if(s.initContent){setTimeout(function(){s.initContent(c);i._initialized=true},10)}else{i._initialized=true}i._expandChecker=0;a.jqx.aria(i._header,"aria-expanded",true);a.jqx.aria(i._content,"aria-hidden",false)}else{if(i.expanded===false){i._arrowHelper.addClass(s.toThemeProperty("jqx-icon-arrow-down jqx-expander-arrow-top"));i._initialized=false;i._expandChecker=1;i._content.style.display="none";a.jqx.aria(i._header,"aria-expanded",false);a.jqx.aria(i._content,"aria-hidden",true)}}if(i._header.getAttribute("tabindex")===null){q++;i._header.setAttribute("tabindex",q)}if(i._content.getAttribute("tabindex")===null){q++;i._content.setAttribute("tabindex",q)}});this._setTheme();this._setSize();for(var e=0;e<s.items.length;e++){s._checkContent(e)}this._toggle();this._keyBoard()},insert:function(b,g,e){var f=document.createElement("div"),c=document.createElement("div");f.innerHTML=g;c.innerHTML=e;if(b>=0&&b<=this.items.length){var d=this.items[b]._header;this.element.insertBefore(f,d);this.element.insertBefore(c,d)}else{this.element.appendChild(f);this.element.appendChild(c)}this.render()},add:function(c,b){this.insert(-1,c,b)},update:function(b,d,c){this.setHeaderContentAt(b,d);this.setContentAt(b,c)},remove:function(b){if(isNaN(b)){b=this.items.length-1}if(!this.items[b]){return}this.items[b]._header.remove();this.items[b]._content.remove();this.items.splice(b,1);var c=this.expandedIndexes.indexOf(b);if(c>-1){this.expandedIndexes.splice(c,1)}this.render()},destroy:function(){this._removeHandlers();this.host.remove()},focus:function(){try{for(var c=0;c<this.items.length;c++){var d=this.items[c];if(d.disabled===false){d._header.focus();return false}}}catch(b){}},_applyExpandedIndexes:function(){var g=this;var f=this.expandedIndexes.length;for(var d=0;d<f;d++){var h=g.expandedIndexes[d];for(var c=0;c<g.items.length;c++){var e=g.items[c];if(c==h){e.expandedFlag=true;if(e.expanded===false){g.expandAt(c)}if(g.expandMode=="single"||g.expandMode=="singleFitHeight"||g.expandMode=="toggle"||g.expandMode=="none"){return false}}else{if(c!=h&&e.expandedFlag===false){g.collapseAt(c)}}}}for(var b=0;b<g.items.length;b++){g.items[b].expandedFlag=false}},propertiesChangedHandler:function(b,c,d){if(d.width&&d.height&&Object.keys(d).length==2){b._setSize()}},propertyChangedHandler:function(b,c,e,d){if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(c=="width"||c=="height"){b._setSize();return}if(c==="theme"){b.render();return}if(c=="disabled"){b._enabledDisabledCheck()}else{if(c=="expandedIndexes"){b._applyExpandedIndexes()}else{b.refresh()}}},_raiseEvent:function(g,e){var c=this.events[g];var f=new a.Event(c);f.owner=this;f.args=e;f.item=f.args.item;var b;try{b=this.host.trigger(f)}catch(d){}return b},resize:function(c,b){this.width=c;this.height=b;this._setSize()},_setSize:function(){var k=this;this.headersHeight=0;var e=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-left"),10):0;var d=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-right"),10):0;var b=2;var c=e+d+b;if(isNaN(c)){c=12}if(this.width=="auto"){k.element.style.width="auto"}else{if(this.width!=null&&this.width.toString().indexOf("%")!=-1){k.element.style.width=k.width}else{k.element.style.width=(parseInt(this.width,10)+c)+"px"}}if(typeof k.height==="number"){k.element.style.height=k.height+"px"}else{k.element.style.height=k.height}for(var h=0;h<k.items.length;h++){var n=k.items[h];var f=k.arrowPosition;if(k.rtl){switch(f){case"left":f="right";break;case"right":f="left";break}}if(f=="right"){n._headerText.style["float"]="left";n._headerText.style.marginLeft="0px";n._arrow.style["float"]="right";n._arrow.style.position="relative"}else{if(f=="left"){if(k.width=="auto"){n._headerText.style["float"]="left";n._headerText.style.marginLeft="17px";n._arrow.style["float"]="left";n._arrow.style.position="absolute"}else{n._headerText.style["float"]="right";n._headerText.style.marginLeft="0px";n._arrow.style["float"]="left";n._arrow.style.position="relative"}}}n._header.style.height="auto";n._headerText.style.minHeight=n._arrow.offsetHeight;k.headersHeight+=a(n._header).outerHeight();n._arrow.style.marginTop=(n._headerText.offsetHeight/2-n._arrow.offsetHeight/2)+"px"}for(var g=0;g<k.items.length;g++){var m=k.items[g];if(k.height!="auto"){if(k.expandMode=="single"||k.expandMode=="toggle"||k.expandMode=="multiple"){k.element.style.overflowX="hidden";k.element.style.overflowY="auto"}else{if(k.expandMode=="singleFitHeight"){var l=parseInt(m._contentHelper.css("padding-top"),10)+parseInt(m._contentHelper.css("padding-bottom"),10);if(k.height&&k.height.toString().indexOf("%")>=0){m._content.style.height=Math.max(0,(k.element.offsetHeight-k.headersHeight-l+2))+"px"}else{m._content.style.height=Math.max(0,(k.element.offsetHeight-k.headersHeight-l))+"px"}}}}}k._checkHeight()},_toggle:function(){var b=this;if(this._isTouchDevice===false){switch(this.toggleMode){case"click":case"dblclick":a.each(this.items,function(c){var d=this;if(d.disabled===false){b.addHandler(d._header,b.toggleMode+".navigationbar"+b.widgetID,function(){b.focusedH=true;b._animate(c)})}});break;case"none":break}}else{if(this.toggleMode!="none"){a.each(this.items,function(c){var d=this;if(d.disabled===false){b.addHandler(d._header,a.jqx.mobile.getTouchEventName("touchstart")+"."+b.widgetID,function(){b._animate(c)})}})}else{return}}},_animate:function(c,b){var d=this;var e=this.items[c];if(this.expandMode!="none"&&this.eCFlag!=1){if(this.items[c].expanded===true){if(this.expandMode=="multiple"||this.expandMode=="toggle"){this.collapseAt(c)}}else{this.expandAt(c)}if(!d._isTouchDevice){if(b!==true){e._headerHelper.addClass(this.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));e._arrowHelper.addClass(this.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}else{e._headerHelper.removeClass(this.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));e._arrowHelper.removeClass(this.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"))}}}},_removeHandlers:function(){var d=this;this.removeHandler(this.host,"keydown.navigationbar"+this.widgetID);for(var b=0;b<d.items.length;b++){var c=d.items[b];d.removeHandler(c._header,"click.navigationbar"+d.widgetID);d.removeHandler(c._header,"dblclick.navigationbar"+d.widgetID);d.removeHandler(c._header,"mouseenter.navigationbar"+d.widgetID);d.removeHandler(c._header,"mouseleave.navigationbar"+d.widgetID);d.removeHandler(c._header,"focus.navigationbar"+d.widgetID);d.removeHandler(c._header,"blur.navigationbar"+d.widgetID);d.removeHandler(c._content,"focus.navigationbar"+d.widgetID);d.removeHandler(c._content,"blur.navigationbar"+d.widgetID);d.removeHandler(c._headerText,"focus.navigationbar"+d.widgetID);d.removeHandler(c._arrow,"focus.navigationbar"+d.widgetID)}},_setTheme:function(){var b=this;this.host.addClass(this.toThemeProperty("jqx-reset jqx-widget"));if(this.rtl===true){this.host.addClass(this.toThemeProperty("jqx-rtl"))}a.each(this.items,function(e){var g=this,h=g._headerHelper,i=g._arrowHelper,c=g._contentHelper,f="jqx-widget-header jqx-item jqx-expander-header",d="jqx-widget-content jqx-expander-content jqx-expander-content-bottom";g._header.style.position="relative";g._content.style.position="relative";if(g.disabled===false){h.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));c.removeClass(b.toThemeProperty("jqx-fill-state-disabled"));if(g.expanded===true){f+=" jqx-fill-state-pressed jqx-expander-header-expanded"}else{f+=" jqx-fill-state-normal";h.removeClass(b.toThemeProperty("jqx-expander-header-expanded"))}if(!b._isTouchDevice){b.addHandler(g._header,"mouseenter.navigationbar"+b.widgetID,function(){if(g._expandChecker==1){if(!g.focusedH){g._header.style.zIndex=5}h.removeClass(b.toThemeProperty("jqx-fill-state-normal jqx-fill-state-pressed"));h.addClass(b.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));i.addClass(b.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover"));if(g.expanded){i.addClass(b.toThemeProperty("jqx-icon-arrow-up-hover"))}else{i.addClass(b.toThemeProperty("jqx-icon-arrow-down-hover"))}}});b.addHandler(g._header,"mouseleave.navigationbar"+b.widgetID,function(){if(!g.focusedH){g._header.style.zIndex=0}h.removeClass(b.toThemeProperty("jqx-fill-state-hover jqx-expander-header-hover"));i.removeClass(b.toThemeProperty("jqx-expander-arrow-top-hover jqx-expander-arrow-down-hover jqx-icon-arrow-up-hover jqx-icon-arrow-down-hover"));if(g._expandChecker==1){h.addClass(b.toThemeProperty("jqx-fill-state-normal"))}else{h.addClass(b.toThemeProperty("jqx-fill-state-pressed"))}})}}else{f+=" jqx-fill-state-disabled";d+=" jqx-fill-state-disabled"}b.host.addClass(b.toThemeProperty("jqx-navigationbar"));h.addClass(b.toThemeProperty(f));c.addClass(b.toThemeProperty(d));if(e!==0){g._header.style.marginTop="-1px"}i.addClass(b.toThemeProperty("jqx-expander-arrow"))})},_checkContent:function(b){var d=this.items[b];var c=d._content;this._cntntEmpty=/^\s*$/.test(this.items[b]._content.innerHTML);if(this._cntntEmpty===true){c.style.display="none";c.style.height="0px";d._contentHelper.addClass(this.toThemeProperty("jqx-expander-content-empty"))}else{if(d.expanded){c.style.display="block"}if(this.expandMode=="singleFitHeight"){var e=1;if(b!==0){}c.style.height=Math.max(0,(this.element.offsetHeight-this.headersHeight+this.items.length-2))+"px"}else{c.style.height="auto"}d._contentHelper.removeClass(this.toThemeProperty("jqx-expander-content-empty"))}},_checkHeight:function(){var h=this;if(typeof h.width==="string"&&h.width.indexOf("%")!==-1){return}var j=0;var e=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-left"),10):0;var d=this.items&&this.items.length>0?parseInt(this.items[0]._headerHelper.css("padding-right"),10):0;var b=2;var c=e+d+b;if(isNaN(c)){c=12}var g=17;for(var f=0;f<h.items.length;f++){var k=h.items[f];j+=(k.expanded?k._contentHelper.outerHeight():0)+k._headerHelper.outerHeight()}if(this.width!="auto"&&this.height!="auto"&&this.expandMode!="singleFitHeight"){if(j>h.element.offsetHeight){h.element.style.width=(parseInt(this.width,10)+c+g)+"px";this.heightFlag=true}else{h.element.style.width=(parseInt(this.width,10)+c)+"px";this.heightFlag=false}}},_enabledDisabledCheck:function(){for(var b=0;b<this.items.length;b++){this.items[b].disabled=this.disabled}},_updateExpandedIndexes:function(){var b=this;this.expandedIndexes=[];a.each(this.items,function(c){var d=this;if(d.expanded===true){b.expandedIndexes.push(c);if(b.expandMode=="single"||b.expandMode=="singleFitHeight"||b.expandMode=="toggle"||b.expandMode=="none"){return false}}})},_keyBoard:function(){var b=this;this._focus();this.addHandler(this.host,"keydown.navigationbar"+this.widgetID,function(d){var e=false,c=b.items.length;a.each(b.items,function(f){var g=this;if((g.focusedH===true||g.focusedC===true)&&g.disabled===false){switch(d.keyCode){case 13:case 32:if(b.toggleMode!="none"){if(g.focusedH===true){b._animate(f,true)}e=true}break;case 37:if(f!==0){b.items[f-1]._header.focus()}else{b.items[c-1]._header.focus()}e=true;break;case 38:if(d.ctrlKey===false){if(f!==0){b.items[f-1]._header.focus()}else{b.items[c-1]._header.focus()}}else{if(g.focusedC===true){g._header.focus()}}e=true;break;case 39:if(f!=c-1){b.items[f+1]._header.focus()}else{b.items[0]._header.focus()}e=true;break;case 40:if(d.ctrlKey===false){if(f!=c-1){b.items[f+1]._header.focus()}else{b.items[0]._header.focus()}}else{if(g.expanded===true){g._content.focus()}}e=true;break;case 35:if(f!=c-1){b.items[c-1]._header.focus()}e=true;break;case 36:if(f!==0){b.items[0]._header.focus()}e=true;break}return false}});if(e&&d.preventDefault){d.preventDefault()}return !e})},_focus:function(){var b=this;if(this.disabled){return}a.each(this.items,function(){var c=this;b.addHandler(c._header,"focus.navigationbar"+this.widgetID,function(){c.focusedH=true;a.jqx.aria(c._header,"aria-selected",true);c._headerHelper.addClass(b.toThemeProperty("jqx-fill-state-focus"));c._header.style.zIndex=10});b.addHandler(c._header,"blur.navigationbar"+this.widgetID,function(){c.focusedH=false;a.jqx.aria(c._header,"aria-selected",false);if(c._header.className.indexOf("jqx-expander-header-hover")!==-1){c._header.style.zIndex=5}else{c._header.style.zIndex=0}c._headerHelper.removeClass(b.toThemeProperty("jqx-fill-state-focus"))});b.addHandler(c._headerText,"focus.navigationbar"+this.widgetID,function(){c._header.focus()});b.addHandler(c._arrow,"focus.navigationbar"+this.widgetID,function(){c._header.focus()});b.addHandler(c._content,"focus.navigationbar"+this.widgetID,function(){c.focusedC=true;c._contentHelper.addClass(b.toThemeProperty("jqx-fill-state-focus"))});b.addHandler(c._content,"blur.navigationbar"+this.widgetID,function(){c.focusedC=false;c._contentHelper.removeClass(b.toThemeProperty("jqx-fill-state-focus"))})})}})})(jqxBaseFramework)})();
9
9