@syncfusion/ej2-navigations 17.3.9-beta → 17.3.14-96615

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 (314) hide show
  1. package/.eslintrc.json +244 -0
  2. package/CHANGELOG.md +898 -800
  3. package/README.md +163 -163
  4. package/dist/ej2-navigations.umd.min.js +1 -10
  5. package/dist/ej2-navigations.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-navigations.es2015.js +325 -170
  7. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  8. package/dist/es6/ej2-navigations.es5.js +455 -300
  9. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  10. package/dist/global/ej2-navigations.min.js +1 -10
  11. package/dist/global/ej2-navigations.min.js.map +1 -1
  12. package/dist/global/index.d.ts +0 -9
  13. package/dist/ts/accordion/accordion.ts +1312 -0
  14. package/dist/ts/common/h-scroll.ts +459 -0
  15. package/dist/ts/common/menu-base.ts +2131 -0
  16. package/dist/ts/common/v-scroll.ts +430 -0
  17. package/dist/ts/context-menu/context-menu.ts +119 -0
  18. package/dist/ts/menu/menu.ts +270 -0
  19. package/dist/ts/sidebar/sidebar.ts +817 -0
  20. package/dist/ts/tab/tab.ts +1761 -0
  21. package/dist/ts/toolbar/toolbar.ts +2076 -0
  22. package/dist/ts/treeview/treeview.ts +5050 -0
  23. package/helpers/e2e/index.js +3 -3
  24. package/license +10 -10
  25. package/package.json +135 -149
  26. package/src/accordion/accordion-model.d.ts +156 -156
  27. package/src/accordion/accordion.d.ts +1 -0
  28. package/src/accordion/accordion.js +40 -41
  29. package/src/common/h-scroll-model.d.ts +5 -5
  30. package/src/common/h-scroll.js +19 -20
  31. package/src/common/menu-base-model.d.ts +157 -157
  32. package/src/common/menu-base.d.ts +19 -0
  33. package/src/common/menu-base.js +94 -24
  34. package/src/common/v-scroll-model.d.ts +5 -5
  35. package/src/common/v-scroll.js +19 -19
  36. package/src/context-menu/context-menu-model.d.ts +15 -15
  37. package/src/context-menu/context-menu.js +19 -19
  38. package/src/menu/menu-model.d.ts +30 -30
  39. package/src/menu/menu.js +19 -19
  40. package/src/sidebar/sidebar-model.d.ts +136 -136
  41. package/src/sidebar/sidebar.js +19 -19
  42. package/src/tab/tab-model.d.ts +215 -215
  43. package/src/tab/tab.d.ts +3 -0
  44. package/src/tab/tab.js +117 -82
  45. package/src/toolbar/toolbar-model.d.ts +175 -175
  46. package/src/toolbar/toolbar.d.ts +1 -0
  47. package/src/toolbar/toolbar.js +30 -24
  48. package/src/treeview/treeview-model.d.ts +323 -323
  49. package/src/treeview/treeview.js +79 -33
  50. package/styles/accordion/_all.scss +2 -2
  51. package/styles/accordion/_bootstrap-dark-definition.scss +69 -69
  52. package/styles/accordion/_bootstrap-definition.scss +76 -76
  53. package/styles/accordion/_bootstrap4-definition.scss +82 -82
  54. package/styles/accordion/_fabric-dark-definition.scss +74 -74
  55. package/styles/accordion/_fabric-definition.scss +78 -78
  56. package/styles/accordion/_highcontrast-definition.scss +106 -106
  57. package/styles/accordion/_highcontrast-light-definition.scss +104 -104
  58. package/styles/accordion/_layout.scss +447 -447
  59. package/styles/accordion/_material-dark-definition.scss +75 -75
  60. package/styles/accordion/_material-definition.scss +72 -72
  61. package/styles/accordion/_theme.scss +479 -479
  62. package/styles/accordion/icons/_bootstrap-dark.scss +17 -17
  63. package/styles/accordion/icons/_bootstrap.scss +17 -17
  64. package/styles/accordion/icons/_bootstrap4.scss +17 -17
  65. package/styles/accordion/icons/_fabric-dark.scss +17 -17
  66. package/styles/accordion/icons/_fabric.scss +17 -17
  67. package/styles/accordion/icons/_highcontrast-light.scss +17 -17
  68. package/styles/accordion/icons/_highcontrast.scss +17 -17
  69. package/styles/accordion/icons/_material-dark.scss +17 -17
  70. package/styles/accordion/icons/_material.scss +17 -17
  71. package/styles/bootstrap-dark.css +7 -9
  72. package/styles/bootstrap.css +7 -9
  73. package/styles/bootstrap4.css +7 -9
  74. package/styles/bootstrap5-dark.css +0 -0
  75. package/styles/bootstrap5-dark.scss +0 -0
  76. package/styles/bootstrap5.css +0 -0
  77. package/styles/bootstrap5.scss +0 -0
  78. package/styles/context-menu/_all.scss +2 -2
  79. package/styles/context-menu/_bootstrap-dark-definition.scss +54 -54
  80. package/styles/context-menu/_bootstrap-definition.scss +52 -52
  81. package/styles/context-menu/_bootstrap4-definition.scss +52 -52
  82. package/styles/context-menu/_fabric-dark-definition.scss +54 -54
  83. package/styles/context-menu/_fabric-definition.scss +52 -52
  84. package/styles/context-menu/_highcontrast-definition.scss +52 -52
  85. package/styles/context-menu/_highcontrast-light-definition.scss +54 -54
  86. package/styles/context-menu/_layout-mixin.scss +175 -175
  87. package/styles/context-menu/_layout.scss +70 -70
  88. package/styles/context-menu/_material-dark-definition.scss +54 -54
  89. package/styles/context-menu/_material-definition.scss +52 -52
  90. package/styles/context-menu/_theme-mixin.scss +59 -59
  91. package/styles/context-menu/_theme.scss +36 -36
  92. package/styles/context-menu/bootstrap-dark.css +0 -1
  93. package/styles/context-menu/bootstrap.css +0 -1
  94. package/styles/context-menu/bootstrap4.css +0 -1
  95. package/styles/context-menu/fabric-dark.css +0 -1
  96. package/styles/context-menu/fabric.css +0 -1
  97. package/styles/context-menu/highcontrast-light.css +0 -1
  98. package/styles/context-menu/highcontrast.css +0 -1
  99. package/styles/context-menu/icons/_bootstrap-dark.scss +30 -30
  100. package/styles/context-menu/icons/_bootstrap.scss +30 -30
  101. package/styles/context-menu/icons/_bootstrap4.scss +30 -30
  102. package/styles/context-menu/icons/_fabric-dark.scss +30 -30
  103. package/styles/context-menu/icons/_fabric.scss +30 -30
  104. package/styles/context-menu/icons/_highcontrast-light.scss +30 -30
  105. package/styles/context-menu/icons/_highcontrast.scss +30 -30
  106. package/styles/context-menu/icons/_material-dark.scss +30 -30
  107. package/styles/context-menu/icons/_material.scss +30 -30
  108. package/styles/context-menu/material-dark.css +0 -1
  109. package/styles/context-menu/material.css +3 -4
  110. package/styles/fabric-dark.css +7 -9
  111. package/styles/fabric.css +7 -9
  112. package/styles/h-scroll/_all.scss +2 -2
  113. package/styles/h-scroll/_bootstrap-dark-definition.scss +49 -49
  114. package/styles/h-scroll/_bootstrap-definition.scss +50 -50
  115. package/styles/h-scroll/_bootstrap4-definition.scss +49 -49
  116. package/styles/h-scroll/_fabric-dark-definition.scss +50 -50
  117. package/styles/h-scroll/_fabric-definition.scss +48 -48
  118. package/styles/h-scroll/_highcontrast-definition.scss +52 -52
  119. package/styles/h-scroll/_highcontrast-light-definition.scss +54 -54
  120. package/styles/h-scroll/_layout.scss +198 -198
  121. package/styles/h-scroll/_material-dark-definition.scss +77 -77
  122. package/styles/h-scroll/_material-definition.scss +77 -77
  123. package/styles/h-scroll/_theme.scss +157 -157
  124. package/styles/h-scroll/icons/_bootstrap-dark.scss +49 -49
  125. package/styles/h-scroll/icons/_bootstrap.scss +49 -49
  126. package/styles/h-scroll/icons/_bootstrap4.scss +49 -49
  127. package/styles/h-scroll/icons/_fabric-dark.scss +49 -49
  128. package/styles/h-scroll/icons/_fabric.scss +49 -49
  129. package/styles/h-scroll/icons/_highcontrast-light.scss +49 -49
  130. package/styles/h-scroll/icons/_highcontrast.scss +49 -49
  131. package/styles/h-scroll/icons/_material-dark.scss +49 -49
  132. package/styles/h-scroll/icons/_material.scss +49 -49
  133. package/styles/highcontrast-light.css +7 -9
  134. package/styles/highcontrast.css +7 -9
  135. package/styles/material-dark.css +7 -9
  136. package/styles/material.css +21 -14
  137. package/styles/menu/_all.scss +2 -2
  138. package/styles/menu/_bootstrap-dark-definition.scss +63 -63
  139. package/styles/menu/_bootstrap-definition.scss +65 -65
  140. package/styles/menu/_bootstrap4-definition.scss +64 -64
  141. package/styles/menu/_fabric-dark-definition.scss +63 -63
  142. package/styles/menu/_fabric-definition.scss +64 -64
  143. package/styles/menu/_highcontrast-definition.scss +65 -65
  144. package/styles/menu/_highcontrast-light-definition.scss +61 -61
  145. package/styles/menu/_layout.scss +638 -638
  146. package/styles/menu/_material-dark-definition.scss +63 -63
  147. package/styles/menu/_material-definition.scss +64 -64
  148. package/styles/menu/_theme.scss +243 -243
  149. package/styles/menu/bootstrap-dark.css +0 -1
  150. package/styles/menu/bootstrap.css +0 -1
  151. package/styles/menu/bootstrap.scss +1 -0
  152. package/styles/menu/bootstrap4.css +0 -1
  153. package/styles/menu/fabric-dark.css +0 -1
  154. package/styles/menu/fabric.css +0 -1
  155. package/styles/menu/fabric.scss +1 -0
  156. package/styles/menu/highcontrast-light.css +0 -1
  157. package/styles/menu/highcontrast.css +0 -1
  158. package/styles/menu/highcontrast.scss +1 -0
  159. package/styles/menu/icons/_bootstrap-dark.scss +127 -127
  160. package/styles/menu/icons/_bootstrap.scss +127 -127
  161. package/styles/menu/icons/_bootstrap4.scss +127 -127
  162. package/styles/menu/icons/_fabric-dark.scss +127 -127
  163. package/styles/menu/icons/_fabric.scss +127 -127
  164. package/styles/menu/icons/_highcontrast-light.scss +127 -127
  165. package/styles/menu/icons/_highcontrast.scss +127 -127
  166. package/styles/menu/icons/_material-dark.scss +127 -127
  167. package/styles/menu/icons/_material.scss +127 -127
  168. package/styles/menu/material-dark.css +0 -1
  169. package/styles/menu/material.css +2 -3
  170. package/styles/menu/material.scss +1 -0
  171. package/styles/sidebar/_all.scss +3 -3
  172. package/styles/sidebar/_bootstrap-dark-definition.scss +4 -4
  173. package/styles/sidebar/_bootstrap-definition.scss +4 -4
  174. package/styles/sidebar/_bootstrap4-definition.scss +4 -4
  175. package/styles/sidebar/_fabric-dark-definition.scss +4 -4
  176. package/styles/sidebar/_fabric-definition.scss +6 -6
  177. package/styles/sidebar/_highcontrast-definition.scss +4 -4
  178. package/styles/sidebar/_highcontrast-light-definition.scss +4 -4
  179. package/styles/sidebar/_icons.scss +1 -1
  180. package/styles/sidebar/_material-dark-definition.scss +4 -4
  181. package/styles/sidebar/_material-definition.scss +6 -6
  182. package/styles/sidebar/_theme.scss +168 -168
  183. package/styles/sidebar/bootstrap-dark.css +0 -1
  184. package/styles/sidebar/bootstrap.css +0 -1
  185. package/styles/sidebar/bootstrap4.css +0 -1
  186. package/styles/sidebar/fabric-dark.css +0 -1
  187. package/styles/sidebar/fabric.css +0 -1
  188. package/styles/sidebar/highcontrast-light.css +0 -1
  189. package/styles/sidebar/highcontrast.css +0 -1
  190. package/styles/sidebar/material-dark.css +0 -1
  191. package/styles/sidebar/material.css +0 -1
  192. package/styles/tab/_all.scss +2 -2
  193. package/styles/tab/_bootstrap-dark-definition.scss +386 -386
  194. package/styles/tab/_bootstrap-definition.scss +396 -396
  195. package/styles/tab/_bootstrap4-definition.scss +401 -401
  196. package/styles/tab/_fabric-dark-definition.scss +394 -394
  197. package/styles/tab/_fabric-definition.scss +410 -410
  198. package/styles/tab/_highcontrast-definition.scss +434 -434
  199. package/styles/tab/_highcontrast-light-definition.scss +423 -423
  200. package/styles/tab/_icons.scss +43 -43
  201. package/styles/tab/_layout.scss +3528 -3521
  202. package/styles/tab/_material-dark-definition.scss +407 -407
  203. package/styles/tab/_material-definition.scss +416 -416
  204. package/styles/tab/_theme.scss +1751 -1751
  205. package/styles/tab/bootstrap-dark.css +7 -2
  206. package/styles/tab/bootstrap.css +7 -2
  207. package/styles/tab/bootstrap4.css +7 -2
  208. package/styles/tab/fabric-dark.css +7 -2
  209. package/styles/tab/fabric.css +7 -2
  210. package/styles/tab/highcontrast-light.css +7 -2
  211. package/styles/tab/highcontrast.css +7 -2
  212. package/styles/tab/icons/_bootstrap-dark.scss +132 -132
  213. package/styles/tab/icons/_bootstrap.scss +132 -132
  214. package/styles/tab/icons/_bootstrap4.scss +132 -132
  215. package/styles/tab/icons/_fabric-dark.scss +132 -132
  216. package/styles/tab/icons/_fabric.scss +132 -132
  217. package/styles/tab/icons/_highcontrast-light.scss +132 -132
  218. package/styles/tab/icons/_highcontrast.scss +132 -132
  219. package/styles/tab/icons/_material-dark.scss +132 -132
  220. package/styles/tab/icons/_material.scss +132 -132
  221. package/styles/tab/material-dark.css +7 -2
  222. package/styles/tab/material.css +7 -2
  223. package/styles/tailwind-dark.css +0 -0
  224. package/styles/tailwind-dark.scss +0 -0
  225. package/styles/tailwind.css +0 -0
  226. package/styles/tailwind.scss +0 -0
  227. package/styles/toolbar/_all.scss +2 -2
  228. package/styles/toolbar/_bootstrap-dark-definition.scss +135 -135
  229. package/styles/toolbar/_bootstrap-definition.scss +134 -134
  230. package/styles/toolbar/_bootstrap4-definition.scss +139 -139
  231. package/styles/toolbar/_fabric-dark-definition.scss +155 -155
  232. package/styles/toolbar/_fabric-definition.scss +139 -139
  233. package/styles/toolbar/_highcontrast-definition.scss +149 -149
  234. package/styles/toolbar/_highcontrast-light-definition.scss +164 -164
  235. package/styles/toolbar/_layout.scss +1460 -1460
  236. package/styles/toolbar/_material-dark-definition.scss +180 -180
  237. package/styles/toolbar/_material-definition.scss +164 -164
  238. package/styles/toolbar/_theme.scss +451 -451
  239. package/styles/toolbar/bootstrap-dark.css +0 -1
  240. package/styles/toolbar/bootstrap.css +0 -1
  241. package/styles/toolbar/bootstrap.scss +1 -0
  242. package/styles/toolbar/bootstrap4.css +0 -1
  243. package/styles/toolbar/fabric-dark.css +0 -1
  244. package/styles/toolbar/fabric.css +0 -1
  245. package/styles/toolbar/fabric.scss +1 -0
  246. package/styles/toolbar/highcontrast-light.css +0 -1
  247. package/styles/toolbar/highcontrast.css +0 -1
  248. package/styles/toolbar/highcontrast.scss +1 -0
  249. package/styles/toolbar/icons/_bootstrap-dark.scss +16 -16
  250. package/styles/toolbar/icons/_bootstrap.scss +16 -16
  251. package/styles/toolbar/icons/_bootstrap4.scss +16 -16
  252. package/styles/toolbar/icons/_fabric-dark.scss +16 -16
  253. package/styles/toolbar/icons/_fabric.scss +16 -16
  254. package/styles/toolbar/icons/_highcontrast-light.scss +16 -16
  255. package/styles/toolbar/icons/_highcontrast.scss +16 -16
  256. package/styles/toolbar/icons/_material-dark.scss +16 -16
  257. package/styles/toolbar/icons/_material.scss +16 -16
  258. package/styles/toolbar/material-dark.css +0 -1
  259. package/styles/toolbar/material.css +0 -1
  260. package/styles/toolbar/material.scss +1 -0
  261. package/styles/treeview/_all.scss +2 -2
  262. package/styles/treeview/_bootstrap-dark-definition.scss +131 -131
  263. package/styles/treeview/_bootstrap-definition.scss +127 -127
  264. package/styles/treeview/_bootstrap4-definition.scss +153 -153
  265. package/styles/treeview/_fabric-dark-definition.scss +130 -130
  266. package/styles/treeview/_fabric-definition.scss +126 -126
  267. package/styles/treeview/_highcontrast-definition.scss +132 -132
  268. package/styles/treeview/_highcontrast-light-definition.scss +137 -137
  269. package/styles/treeview/_layout.scss +551 -551
  270. package/styles/treeview/_material-dark-definition.scss +126 -126
  271. package/styles/treeview/_material-definition.scss +126 -126
  272. package/styles/treeview/_theme.scss +331 -331
  273. package/styles/treeview/bootstrap-dark.css +0 -3
  274. package/styles/treeview/bootstrap.css +0 -3
  275. package/styles/treeview/bootstrap4.css +0 -3
  276. package/styles/treeview/fabric-dark.css +0 -3
  277. package/styles/treeview/fabric.css +0 -3
  278. package/styles/treeview/highcontrast-light.css +0 -3
  279. package/styles/treeview/highcontrast.css +0 -3
  280. package/styles/treeview/icons/_bootstrap-dark.scss +39 -39
  281. package/styles/treeview/icons/_bootstrap.scss +39 -39
  282. package/styles/treeview/icons/_bootstrap4.scss +39 -39
  283. package/styles/treeview/icons/_fabric-dark.scss +43 -43
  284. package/styles/treeview/icons/_fabric.scss +43 -43
  285. package/styles/treeview/icons/_highcontrast-light.scss +43 -43
  286. package/styles/treeview/icons/_highcontrast.scss +43 -43
  287. package/styles/treeview/icons/_material-dark.scss +43 -43
  288. package/styles/treeview/icons/_material.scss +43 -43
  289. package/styles/treeview/material-dark.css +0 -3
  290. package/styles/treeview/material.css +9 -3
  291. package/styles/v-scroll/_all.scss +2 -2
  292. package/styles/v-scroll/_bootstrap-dark-definition.scss +50 -50
  293. package/styles/v-scroll/_bootstrap-definition.scss +49 -49
  294. package/styles/v-scroll/_bootstrap4-definition.scss +49 -49
  295. package/styles/v-scroll/_fabric-dark-definition.scss +51 -51
  296. package/styles/v-scroll/_fabric-definition.scss +50 -50
  297. package/styles/v-scroll/_highcontrast-definition.scss +51 -51
  298. package/styles/v-scroll/_highcontrast-light-definition.scss +52 -52
  299. package/styles/v-scroll/_layout.scss +162 -162
  300. package/styles/v-scroll/_material-dark-definition.scss +78 -78
  301. package/styles/v-scroll/_material-definition.scss +77 -77
  302. package/styles/v-scroll/_theme.scss +133 -133
  303. package/styles/v-scroll/icons/_bootstrap-dark.scss +26 -26
  304. package/styles/v-scroll/icons/_bootstrap.scss +26 -26
  305. package/styles/v-scroll/icons/_bootstrap4.scss +26 -26
  306. package/styles/v-scroll/icons/_fabric-dark.scss +26 -26
  307. package/styles/v-scroll/icons/_fabric.scss +26 -26
  308. package/styles/v-scroll/icons/_highcontrast-light.scss +26 -26
  309. package/styles/v-scroll/icons/_highcontrast.scss +26 -26
  310. package/styles/v-scroll/icons/_material-dark.scss +26 -26
  311. package/styles/v-scroll/icons/_material.scss +26 -26
  312. package/tslint.json +111 -0
  313. package/.gitlab/merge_request_templates/Bug.md +0 -63
  314. package/.gitlab/merge_request_templates/feature.md +0 -39
@@ -1,11 +1,2 @@
1
- /*!
2
- * filename: ej2-navigations.umd.min.js
3
- * version : 17.3.9-beta
4
- * Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.
5
- * Use of this code is subject to the terms of our license.
6
- * A copy of the current license can be obtained at any time by e-mailing
7
- * licensing@syncfusion.com. Any infringement will be prosecuted under
8
- * applicable laws.
9
- */
10
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-lists"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-inputs")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-lists","@syncfusion/ej2-popups","@syncfusion/ej2-buttons","@syncfusion/ej2-data","@syncfusion/ej2-inputs"],t):t(e.ej={},e.ej2Base,e.ej2Lists,e.ej2Popups,e.ej2Buttons,e.ej2Data,e.ej2Inputs)}(this,function(e,t,i,s,n,l,o){"use strict";var r=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),a=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},d="e-rtl",h="e-overlay",c="e-nav-arrow",p="e-nav-right-arrow",u="e-nav-left-arrow",f="e-scroll-nav",m="e-scroll-right-nav",g="e-scroll-left-nav",v="e-scroll-device",y="e-scroll-overlay",b="e-scroll-right-overlay",C="e-scroll-left-overlay",N=function(e){function i(t,i){return e.call(this,t,i)||this}return r(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(d)},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add(v),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=this.createElement("div",{className:"e-hscroll-content"}),t=this.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,s=0,n=[].slice.call(i.children);s<n.length;s++){var l=n[s];e.appendChild(l)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},i.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},i.prototype.getModuleName=function(){return"hScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",i.classList.remove("e-hscroll"),i.classList.remove(v);var s=t.selectAll(".e-"+i.id+"_nav."+f,i),n=t.selectAll("."+y,i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var l=0,o=[].slice.call(this.scrollItems.children);l<o.length;l++){var r=o[l];i.appendChild(r)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(."+h+")",this.element);e?this.element.classList.add(h):this.element.classList.remove(h),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:y+" "+b}),s="e-"+e.id.concat("_nav "+f+" "+m),n=this.createElement("div",{id:t.concat("_right"),className:s}),l=this.createElement("div",{className:p+" "+c+" e-icons"});n.appendChild(l);var o=this.createElement("div",{className:y+" "+C});this.ieCheck&&n.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(n),e.insertBefore(o,e.firstChild),this.eventBinding([n])},i.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav "+f+" "+m),s=this.createElement("div",{id:t.concat("_right"),className:i});s.setAttribute("aria-disabled","false");var n=this.createElement("div",{className:p+" "+c+" e-icons"}),l="e-"+e.id.concat("_nav "+f+" "+g),o=this.createElement("div",{id:t.concat("_left"),className:l+" "+h});o.setAttribute("aria-disabled","true");var r=this.createElement("div",{className:u+" "+c+" e-icons"});o.appendChild(r),s.appendChild(n),s.setAttribute("tabindex","0"),e.appendChild(s),e.insertBefore(o,e.firstChild),this.ieCheck&&(s.classList.add("e-ie-align"),o.classList.add("e-ie-align")),this.eventBinding([s,o])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){this.keyTimer=window.setTimeout(function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,f)?i.firstElementChild:i;this.timeout=window.setInterval(function(){t.eleScrolling(10,i,!0)},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){var s=this.scrollEle,n=this.element,l=t.classList;l.contains(f)&&(l=t.querySelector("."+c).classList),this.contains(n,d)&&this.browserCheck&&(e=-e);s.scrollLeft;!this.contains(n,d)||this.browserCheck||this.ieCheck?l.contains(p)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):l.contains(u)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceX/(10*e.velocity):e.distanceX/e.velocity;var s=.5,n=function(){var l=Math.sin(s);l<=0?window.cancelAnimationFrame(l):("Left"===e.swipeDirection?i.scrollLeft+=t*l:"Right"===e.swipeDirection&&(i.scrollLeft-=t*l),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)this.scrollUpdating(e,i);else{this.customStep||[].slice.call(t.selectAll("."+y,this.element)).forEach(function(t){e-=t.offsetWidth});var l=function(){var t,s;n.contains(n.element,d)&&n.browserCheck?(t=-e,s=-10):(t=e,s=10),t<10?window.cancelAnimationFrame(s):(n.scrollUpdating(s,i),e-=s,window.requestAnimationFrame(l))};l()}},i.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceX,this.ieCheck&&this.contains(this.element,d)&&(t=-t),"Left"===e.scrollDirection?i.scrollLeft=i.scrollLeft+t:"Right"===e.scrollDirection&&(i.scrollLeft=i.scrollLeft-t)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector("."+c);t.isNullOrUndefined(e)?t.classList(s,[p],[u]):t.classList(s,[u],[p])}else e.classList.add(h),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove(h),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,s=this.element,n=this.element.querySelector("."+g),l=this.element.querySelector("."+m),o=this.element.querySelector("."+C),r=this.element.querySelector("."+b),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(o=this.element.querySelector("."+b),r=this.element.querySelector("."+C)),o.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?r.style.width=t.scrollWidth-Math.ceil(i+a)+"px":r.style.width="40px"),0===a)!this.contains(s,d)||this.browserCheck||this.ieCheck?this.arrowDisabling(n,l):this.arrowDisabling(l,n);else if(Math.ceil(i+a+.1)>=t.scrollWidth)!this.contains(s,d)||this.browserCheck||this.ieCheck?this.arrowDisabling(l,n):this.arrowDisabling(n,l);else{var c=this.element.querySelector("."+f+"."+h);c&&(c.classList.remove(h),c.setAttribute("aria-disabled","false"),c.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add(d):this.element.classList.remove(d)}}},a([t.Property(null)],i.prototype,"scrollStep",void 0),i=a([t.NotifyPropertyChanges],i)}(t.Component),E=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),x=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},O="e-overlay",k="e-nav-arrow",S="e-nav-up-arrow",w="e-nav-down-arrow",L="e-scroll-nav",I="e-scroll-up-nav",A="e-scroll-down-nav",D="e-scroll-device",P="e-scroll-overlay",M="e-scroll-up-overlay",T="e-scroll-down-overlay",U=function(e){function i(t,i){return e.call(this,t,i)||this}return E(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add(D),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),t.EventHandler.add(this.element,"wheel",this.wheelEventHandler,this)},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=t.createElement("div",{className:"e-vscroll-content"}),i=t.createElement("div",{className:"e-vscroll-bar"});i.setAttribute("tabindex","-1");for(var s=this.element,n=0,l=[].slice.call(s.children);n<l.length;n++){var o=l[n];e.appendChild(o)}i.appendChild(e),s.appendChild(i),i.style.overflowY="hidden",this.scrollEle=i,this.scrollItems=e},i.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},i.prototype.getModuleName=function(){return"vScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",t.removeClass([this.element],["e-vscroll",D]);var s=t.selectAll(".e-"+i.id+"_nav."+L,i),n=t.selectAll("."+P,i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var l=0,o=[].slice.call(this.scrollItems.children);l<o.length;l++){var r=o[l];i.appendChild(r)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(."+O+")",this.element);e?this.element.classList.add(O):this.element.classList.remove(O),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlayElement=function(e){var i=e.id.concat("_nav"),s=t.createElement("div",{className:P+" "+T}),n="e-"+e.id.concat("_nav "+L+" "+A),l=t.createElement("div",{id:i.concat("down"),className:n}),o=t.createElement("div",{className:w+" "+k+" e-icons"});l.appendChild(o);var r=t.createElement("div",{className:P+" "+M});this.ieCheck&&l.classList.add("e-ie-align"),e.appendChild(s),e.appendChild(l),e.insertBefore(r,e.firstChild),this.eventBinding([l])},i.prototype.createNavIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav "+L+" "+A),n=t.createElement("div",{id:i.concat("_down"),className:s});n.setAttribute("aria-disabled","false");var l=t.createElement("div",{className:w+" "+k+" e-icons"}),o="e-"+e.id.concat("_nav "+L+" "+I),r=t.createElement("div",{id:i.concat("_up"),className:o+" "+O});r.setAttribute("aria-disabled","true");var a=t.createElement("div",{className:S+" "+k+" e-icons"});r.appendChild(a),n.appendChild(l),n.setAttribute("tabindex","0"),e.appendChild(n),e.insertBefore(r,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),r.classList.add("e-ie-align")),this.eventBinding([n,r])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){this.keyTimer=window.setTimeout(function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,L)?i.firstElementChild:i;this.timeout=window.setInterval(function(){t.eleScrolling(10,i,!0)},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){this.element;var s=t.classList;s.contains(L)&&(s=t.querySelector("."+k).classList),s.contains(w)?this.frameScrollRequest(e,"add",i):s.contains(S)&&this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.wheelEventHandler=function(e){e.preventDefault(),this.frameScrollRequest(this.scrollStep,e.deltaY>0?"add":"",!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceY/(10*e.velocity):e.distanceY/e.velocity;var s=.5,n=function(){var l=Math.sin(s);l<=0?window.cancelAnimationFrame(l):("Up"===e.swipeDirection?i.scrollTop+=t*l:"Down"===e.swipeDirection&&(i.scrollTop-=t*l),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)this.scrollUpdating(e,i);else{this.customStep||[].slice.call(t.selectAll("."+P,this.element)).forEach(function(t){e-=t.offsetHeight});var l=function(){e<10?window.cancelAnimationFrame(10):(n.scrollUpdating(10,i),e-=10,window.requestAnimationFrame(l))};l()}},i.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceY,"Up"===e.scrollDirection?i.scrollTop=i.scrollTop+t:"Down"===e.scrollDirection&&(i.scrollTop=i.scrollTop-t)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector("."+k);t.isNullOrUndefined(e)?t.classList(s,[w],[S]):t.classList(s,[S],[w])}else e.classList.add(O),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove(O),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollEventHandler=function(e){var t=e.target,i=t.offsetHeight,s=(this.element,this.element.querySelector("."+I)),n=this.element.querySelector("."+A),l=this.element.querySelector("."+M),o=this.element.querySelector("."+T),r=t.scrollTop;if(r<=0&&(r=-r),this.isDevice&&(l.style.height=r<40?r+"px":"40px",t.scrollHeight-Math.ceil(i+r)<40?o.style.height=t.scrollHeight-Math.ceil(i+r)+"px":o.style.height="40px"),0===r)this.arrowDisabling(s,n);else if(Math.ceil(i+r+.1)>=t.scrollHeight)this.arrowDisabling(n,s);else{var a=this.element.querySelector("."+L+"."+O);a&&(a.classList.remove(O),a.setAttribute("aria-disabled","false"),a.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}}},x([t.Property(null)],i.prototype,"scrollStep",void 0),i=x([t.NotifyPropertyChanges],i)}(t.Component),H=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),B=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},R="e-focused",j="e-menu-header",F="e-selected",q="e-separator",V="uparrow",W="downarrow",z="leftarrow",_="rightarrow",K="e-menu-item",G="e-disabled",Y="e-menu-hide",X="e-menu-popup",Q="Template",J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),B([t.Property("id")],i.prototype,"itemId",void 0),B([t.Property("parentId")],i.prototype,"parentId",void 0),B([t.Property("text")],i.prototype,"text",void 0),B([t.Property("iconCss")],i.prototype,"iconCss",void 0),B([t.Property("url")],i.prototype,"url",void 0),B([t.Property("separator")],i.prototype,"separator",void 0),B([t.Property("items")],i.prototype,"children",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),B([t.Property(null)],i.prototype,"iconCss",void 0),B([t.Property("")],i.prototype,"id",void 0),B([t.Property(!1)],i.prototype,"separator",void 0),B([t.Collection([],i)],i.prototype,"items",void 0),B([t.Property("")],i.prototype,"text",void 0),B([t.Property("")],i.prototype,"url",void 0),i}(t.ChildProperty),$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),B([t.Property("SlideDown")],i.prototype,"effect",void 0),B([t.Property(400)],i.prototype,"duration",void 0),B([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),ee=function(e){function n(i,s){var n=e.call(this,i,s)||this;return n.navIdx=[],n.animation=new t.Animation({}),n.isTapHold=!1,n.tempItem=[],n}return H(n,e),n.prototype.preRender=function(){if(!this.isMenu){var e=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){e=this.createElement("ul",{id:t.getUniqueID(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var i=t.getValue("ej2_instances",this.element);t.removeClass([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=e,t.setValue("ej2_instances",i,this.element)}else{e=this.createElement("ul",{id:t.getUniqueID(this.getModuleName())}),t.append([].slice.call(this.element.cloneNode(!0).children),e);var s=this.element.nextElementSibling;s?this.element.parentElement.insertBefore(e,s):this.element.parentElement.appendChild(e),this.clonedElement=e}this.clonedElement.style.display="none"}if("EJS-MENU"===this.element.tagName){for(var n=this.element,l=t.getValue("ej2_instances",n),o=(e=this.createElement("ul"),this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"})),r=0,a=n.attributes.length;r<a;r++)e.setAttribute(n.attributes[r].nodeName,n.attributes[r].nodeValue);n.parentNode.insertBefore(o,n),t.detach(n),n=e,o.appendChild(n),t.setValue("ej2_instances",l,n),this.clonedElement=o,this.element=n,this.element.id||(this.element.id=t.getUniqueID(this.getModuleName()))}},n.prototype.render=function(){if(this.initialize(),this.renderItems(),this.isMenu&&this.template&&this.isBlazor()){var e=this.element.id+Q;t.resetBlazorTemplate(e,Q),Object.keys(t.blazorTemplates).length&&t.extend(this.tempItem,t.blazorTemplates[e],[],!0),t.updateBlazorTemplate(e,Q,this)}this.wireEvents(),this.renderComplete()},n.prototype.initialize=function(){var e=this.getWrapper();e||(e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.isMenu?this.element.parentElement.insertBefore(e,this.element):document.body.appendChild(e)),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.enableRtl&&e.classList.add("e-rtl"),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e))},n.prototype.renderItems=function(){if(!this.items.length){var e=i.ListBase.createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var s=this.createItems(this.items);t.append(Array.prototype.slice.call(s.children),this.element),this.element.classList.add("e-menu-parent");var n=this.getWrapper();this.element.classList.contains("e-vertical")?this.addScrolling(n,this.element,"vscroll",n.offsetHeight,this.element.offsetHeight):this.addScrolling(n,this.element,"hscroll",n.offsetWidth,this.element.offsetWidth)},n.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var i=void 0,n=t.selectAll(this.target),l=0,o=n.length;l<o;l++)i=n[l],this.isMenu?t.EventHandler.add(i,"click",this.menuHeaderClickHandler,this):t.Browser.isIos?new t.Touch(i,{tapHold:this.touchHandler.bind(this)}):t.EventHandler.add(i,"contextmenu",this.cmenuHandler,this);if(this.targetElement=i,!this.isMenu)for(var r=0,a=s.getScrollableParent(this.targetElement);r<a.length;r++){var d=a[r];t.EventHandler.add(d,"scroll",this.scrollHandler,this)}}t.Browser.isDevice||(this.delegateMoverHandler=this.moverHandler.bind(this),this.delegateMouseDownHandler=this.mouseDownHandler.bind(this),t.EventHandler.add(this.isMenu?document:e,"mouseover",this.delegateMoverHandler,this),t.EventHandler.add(document,"mousedown",this.delegateMouseDownHandler,this)),this.delegateClickHandler=this.clickHandler.bind(this),t.EventHandler.add(document,"click",this.delegateClickHandler,this),this.wireKeyboardEvent(e),this.rippleFn=t.rippleEffect(e,{selector:"."+K})},n.prototype.wireKeyboardEvent=function(e){var i={downarrow:W,uparrow:V,enter:"enter",leftarrow:z,rightarrow:_,escape:"escape"};this.isMenu&&(i.home="home",i.end="end"),new t.KeyboardEvents(e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:i})},n.prototype.mouseDownHandler=function(e){t.closest(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||t.closest(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},n.prototype.keyBoardHandler=function(e){var i="",s=e.target,n=this.isMenu&&!this.hamburgerMode&&!this.element.classList.contains("e-vertical")&&this.navIdx.length<1;if(e.preventDefault(),this.enableScrolling&&13===e.keyCode&&s.classList.contains("e-scroll-nav")&&this.removeLIStateByClass([R,F],[t.closest(s,".e-"+this.getModuleName()+"-wrapper")]),n)switch(e.action){case _:i=_,e.action=W;break;case z:i=z,e.action=V;break;case W:i=W,e.action=_;break;case V:i=V,e.action=""}else if(this.enableRtl)switch(e.action){case z:n=!0,i=z,e.action=_;break;case _:n=!0,i=_,e.action=z}switch(e.action){case W:case V:case"end":case"home":this.upDownKeyHandler(e);break;case _:this.rightEnterKeyHandler(e);break;case z:this.leftEscKeyHandler(e);break;case"enter":this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e);break;case"escape":this.leftEscKeyHandler(e)}n&&(e.action=i)},n.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),i=e.action===W||"home"===e.action?0:t.childElementCount-1,s=i,n=this.getLIByClass(t,R);n&&("end"!==e.action&&"home"!==e.action&&(s=this.getIdx(t,n)),n.classList.remove(R),"end"!==e.action&&"home"!==e.action&&(e.action===W?s++:s--,s===(e.action===W?t.childElementCount:-1)&&(s=i)));var l=t.children[s];s=this.isValidLI(l,s,e.action),t.children[s].classList.add(R),t.children[s].focus()},n.prototype.isValidLI=function(e,t,i){this.getWrapper();var s=this.getUlByNavIdx();return(e.classList.contains(q)||e.classList.contains(G)||e.classList.contains(Y))&&(i===W||i===_?t++:t--),((e=s.children[t]).classList.contains(q)||e.classList.contains(G)||e.classList.contains(Y))&&(t=this.isValidLI(e,t,i)),t},n.prototype.getUlByNavIdx=function(e){if(void 0===e&&(e=this.navIdx.length),this.isMenu){var i=[this.getWrapper()].concat([].slice.call(t.selectAll("."+X)))[e];return t.isNullOrUndefined(i)?null:t.select(".e-menu-parent",i)}return this.getWrapper().children[e]},n.prototype.rightEnterKeyHandler=function(e){var t,i=this.getUlByNavIdx(),s=this.getLIByClass(i,R);if(s){var n=this.getIdx(i,s),l=this.navIdx.concat(n),o=this.getItem(l);o.items.length?(this.navIdx.push(n),this.keyType="right",this.action=e.action,this.openMenu(s,o,null,null,e)):"enter"===e.action&&(this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([F],[this.getWrapper()]):s.classList.remove(R),s.classList.add(F),t={element:s,item:o,event:e},this.trigger("select",t),this.closeMenu(null,e))}},n.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):"escape"===e.action&&this.closeMenu(null,e)},n.prototype.scrollHandler=function(e){this.closeMenu(null,e)},n.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},n.prototype.cmenuHandler=function(e){e.preventDefault(),this.isCMenu=!0,this.pageX=e.changedTouches?e.changedTouches[0].pageX+1:e.pageX+1,this.pageY=e.changedTouches?e.changedTouches[0].pageY+1:e.pageY+1,this.closeMenu(null,e),this.isCMenu&&(this.canOpen(e.target)&&this.openMenu(null,null,this.pageY,this.pageX,e),this.isCMenu=!1)},n.prototype.closeMenu=function(e,i){var n=this;if(void 0===e&&(e=0),void 0===i&&(i=null),this.isMenuVisible()){var l,o,r,a=void 0,d=void 0,h=this.getWrapper(),c=this.getPopups(),p=!1,u=this.isMenu?c.length+1:h.childElementCount;l=this.isMenu&&1!==u?t.select(".e-ul",c[u-2]):t.selectAll(".e-menu-parent",h)[u-1],this.isMenu&&l.classList.contains("e-menu")&&((a=this.getLIByClass(l,F))&&a.classList.remove(F),p=!0),p||(o=this.navIdx.length?this.getItem(this.navIdx):null,r=o?o.items:this.items,d={element:l,parentItem:o,items:r,event:i,cancel:!1},this.trigger("beforeClose",d,function(a){var d,h,c,p=!a.cancel;if((p||n.isCMenu)&&(n.isMenu?(d=t.closest(l,"."+X),n.hamburgerMode&&(d.parentElement.style.minHeight=""),n.unWireKeyboardEvent(d),n.destroyScrollObj(t.getInstance(d.children[0],U),d.children[0]),(c=t.getInstance(d,s.Popup)).hide(),c.destroy(),t.detach(d)):n.toggleAnimation(l,!1),h={element:l,parentItem:o,items:r},n.trigger("onClose",h),n.navIdx.pop()),n.isCMenu)n.canOpen(i.target)&&n.openMenu(null,null,n.pageY,n.pageX,i),n.isCMenu=!1;else if(p&&n.hamburgerMode&&null!==e)n.afterCloseMenu(i);else if(p&&!e&&n.navIdx.length)n.closeMenu(null,i);else if(!p||n.isMenu||e||0!==n.navIdx.length||n.isMenusClosed)if(p&&n.isMenu&&i&&i.target&&0!==n.navIdx.length&&t.closest(i.target,".e-menu-parent.e-control"))n.closeMenu(0,i);else if(!p||"right"!==n.keyType&&"click"!==n.keyType){var u=n.getUlByNavIdx(),f=n.getLIByClass(u,F);f&&(f.setAttribute("aria-expanded","false"),f.classList.remove(F),f.classList.add(R),f.focus())}else n.afterCloseMenu(i);else n.isMenusClosed=!0,n.closeMenu(0,i);n.removeStateWrapper()}))}},n.prototype.destroyScrollObj=function(e,i){e&&(e.destroy(),i.parentElement.appendChild(t.select(".e-menu-parent",i)),t.detach(i))},n.prototype.getPopups=function(){var e=this,t=[];return[].slice.call(document.querySelectorAll("."+X)).forEach(function(i){e.getIndex(i.querySelector("."+K).id,!0).length&&t.push(i)}),t},n.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&t.isVisible(this.element).valueOf()},n.prototype.canOpen=function(e){var i=!0;if(this.filter){i=!1;for(var s=this.filter.split(" "),n=0,l=s.length;n<l;n++)if(t.closest(e,"."+s[n])){i=!0;break}}return i},n.prototype.openMenu=function(e,i,n,l,o,r){void 0===n&&(n=0),void 0===l&&(l=0),void 0===o&&(o=null),void 0===r&&(r=this.targetElement);var a=this.getWrapper();this.lItem=e;var d=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,e){if(this.uList=this.createItems(i[this.getField("children",this.navIdx.length-1)]),!this.isMenu&&t.Browser.isDevice){a.lastChild.style.display="none";var h={text:i[this.getField("text")].toString(),iconCss:"e-icons e-previous"},c=new Z(this.items[0],"items",h,!0),p=this.createItems([c]).children[0];p.classList.add(j),this.uList.insertBefore(p,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+X,id:e.id+"-ej2menu-"+d+"-popup"}),this.hamburgerMode?(n=e.offsetHeight,e.appendChild(this.popupWrapper)):document.body.appendChild(this.popupWrapper),this.isNestedOrVertical=this.element.classList.contains("e-vertical")||1!==this.navIdx.length,this.popupObj=this.generatePopup(this.popupWrapper,this.uList,e,this.isNestedOrVertical),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&t.addClass([this.popupWrapper],this.cssClass.split(" ")),this.popupObj.hide()),this.triggerBeforeOpen(e,this.uList,i,o,0,0,"menu")):(this.uList.style.zIndex=this.element.style.zIndex,a.appendChild(this.uList),this.triggerBeforeOpen(e,this.uList,i,o,n,l,"none"))}else this.uList=this.element,this.uList.style.zIndex=s.getZindexPartial(r||this.element).toString(),this.triggerBeforeOpen(e,this.uList,i,o,n,l,"none");if(this.isMenu&&this.template&&this.isBlazor()){var u=this.element.id+Q;if(Object.keys(t.blazorTemplates).length){var f=t.blazorTemplates[u];this.tempItem=this.tempItem.concat(f),t.blazorTemplates[u]=this.tempItem}t.updateBlazorTemplate(u,Q,this)}},n.prototype.calculateIndentSize=function(e,t){var i=getComputedStyle(t),s=parseInt(i.textIndent,10);this.navIdx.length<2&&!t.classList.contains("e-blankicon")?s*=2:s+=s/4,e.style.textIndent=s+"px";var n=e.querySelectorAll(".e-blankicon");if(n&&n.length){var l=e.querySelector(".e-menu-icon"),o=getComputedStyle(l),r=parseInt(o.marginRight,10)+l.offsetWidth+s;n.forEach(function(e){return e.style.textIndent=r+"px"})}},n.prototype.generatePopup=function(e,i,n,l){var o=this,r=new s.Popup(e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:n,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:l||this.enableRtl?"none":"flip",Y:"fit"},position:l&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:i,open:function(){var e=t.select(".e-menu-vscroll",r.element);e&&(e.style.height="inherit",e.style.maxHeight="");var i=t.select(".e-ul",r.element);r.element.style.maxHeight="",i.focus(),o.triggerOpen(i)}});return r},n.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var t=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),i=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:this.title}),s=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});t.appendChild(i),t.appendChild(s),e.insertBefore(t,this.element)},n.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},n.prototype.closeHamburgerMenu=function(e){var t=this;if(this.hamburgerMode){var i=void 0;i={element:this.element,parentItem:null,event:e,items:this.items,cancel:!1},this.trigger("beforeClose",i,function(i){i.cancel||(t.closeMenu(null,e),t.element.classList.add("e-hide-menu"),t.trigger("onClose",{element:t.element,parentItem:null,items:t.items}))})}},n.prototype.callFit=function(e,t,i,n,l){return s.fit(e,null,{X:t,Y:i},{top:n,left:l})},n.prototype.triggerBeforeOpen=function(e,i,n,l,o,r,a){var d=this,h=(this.getIndex(e?e.id:null,!0),{element:i,items:e?n[this.getField("children",this.navIdx.length-1)]:this.items,parentItem:n,event:l,cancel:!1,top:o,left:r}),c=a;this.trigger("beforeOpen",h,function(i){switch(c){case"menu":d.hamburgerMode||(d.top=i.top,d.left=i.left),d.popupWrapper.style.display="block",d.hamburgerMode||(d.popupWrapper.style.maxHeight=d.popupWrapper.getBoundingClientRect().height+"px",d.addScrolling(d.popupWrapper,d.uList,"vscroll",d.popupWrapper.offsetHeight,d.uList.offsetHeight),d.checkScrollOffset(l));var o=void 0;if(d.hamburgerMode||d.left||d.top)d.popupObj.collision={X:"none",Y:"none"};else{if(d.popupObj.refreshPosition(d.lItem,!0),d.left=parseInt(d.popupWrapper.style.left,10),d.top=parseInt(d.popupWrapper.style.top,10),d.enableRtl&&(d.left=d.isNestedOrVertical?d.left-d.popupWrapper.offsetWidth-d.lItem.parentElement.offsetWidth:d.left-d.popupWrapper.offsetWidth+d.lItem.offsetWidth),o=s.isCollide(d.popupWrapper,null,d.left,d.top),(d.isNestedOrVertical||d.enableRtl)&&(o.indexOf("right")>-1||o.indexOf("left")>-1)){d.popupObj.collision.X="none";var r=t.closest(d.lItem,".e-"+d.getModuleName()+"-wrapper").offsetWidth;d.left=d.enableRtl?s.calculatePosition(d.lItem,d.isNestedOrVertical?"right":"left","top").left:d.left-d.popupWrapper.offsetWidth-r}((o=s.isCollide(d.popupWrapper,null,d.left,d.top)).indexOf("left")>-1||o.indexOf("right")>-1)&&(d.left=d.callFit(d.popupWrapper,!0,!1,d.top,d.left).left),d.popupWrapper.style.left=d.left+"px"}d.popupWrapper.style.display="";break;case"none":d.top=i.top,d.left=i.left;break;case"hamburger":i.cancel||(d.element.classList.remove("e-hide-menu"),d.triggerOpen(d.element))}if("hamburger"!==c)if(i.cancel)d.isMenu&&(d.popupObj.destroy(),t.detach(d.popupWrapper)),d.navIdx.pop();else if(d.isMenu)if(d.hamburgerMode)d.popupWrapper.style.top=d.top+"px",d.popupWrapper.style.left="0px",d.toggleAnimation(d.popupWrapper);else{d.wireKeyboardEvent(d.popupWrapper),t.rippleEffect(d.popupWrapper,{selector:"."+K}),d.popupWrapper.style.left=d.left+"px",d.popupWrapper.style.top=d.top+"px";var a="None"!==d.animationSettings.effect?{name:d.animationSettings.effect,duration:d.animationSettings.duration,timingFunction:d.animationSettings.easing}:null;d.popupObj.show(a,d.lItem)}else d.setPosition(d.lItem,d.uList,d.top,d.left),d.toggleAnimation(d.uList);if("right"===d.keyType){var h=d.getUlByNavIdx();if(e.classList.remove(R),d.isMenu&&1===d.navIdx.length&&d.removeLIStateByClass([F],[d.getWrapper()]),e.classList.add(F),"enter"===d.action){var p={element:e,item:n,event:l};d.trigger("select",p)}e.focus(),h=d.getUlByNavIdx();var u=d.isValidLI(h.children[0],0,d.action);h.children[u].classList.add(R),h.children[u].focus()}})},n.prototype.checkScrollOffset=function(e){var i=this.getWrapper();if(i.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var s=t.isNullOrUndefined(e)?this.element:t.closest(e.target,"."+K),n=t.select(".e-hscroll-bar",i),l=void 0,o=void 0;n.scrollLeft>s.offsetLeft&&(n.scrollLeft-=n.scrollLeft-s.offsetLeft),(l=n.scrollLeft+n.offsetWidth)<(o=s.offsetLeft+s.offsetWidth)&&(n.scrollLeft+=o-l)}},n.prototype.addScrolling=function(e,i,s,n,l){if(this.enableScrolling&&n<l){var o=this.createElement("div",{className:"e-menu-"+s});e.appendChild(o),o.appendChild(i),o.style.maxHeight=e.style.maxHeight;e.style.overflow="hidden","vscroll"===s?new U({enableRtl:this.enableRtl},o).scrollStep=t.select(".e-"+s+"-bar",e).offsetHeight/2:new N({enableRtl:this.enableRtl},o).scrollStep=t.select(".e-"+s+"-bar",e).offsetWidth}},n.prototype.setPosition=function(e,i,n,l){if(this.toggleVisiblity(i),i===this.element||!t.isNullOrUndefined(l)&&!t.isNullOrUndefined(n)){if((a=s.isCollide(i,null,l,n)).indexOf("right")>-1&&(l-=i.offsetWidth),a.indexOf("bottom")>-1){n=(o=this.callFit(i,!1,!0,n,l)).top-20}if((a=s.isCollide(i,null,l,n)).indexOf("left")>-1){l=(o=this.callFit(i,!0,!1,n,l)).left}}else if(t.Browser.isDevice)n=Number(this.element.style.top.replace("px","")),l=Number(this.element.style.left.replace("px",""));else{var o,r=this.enableRtl?"left":"right";n=(o=s.calculatePosition(e,r,"top")).top,l=o.left;var a,d=(a=s.isCollide(i,null,this.enableRtl?l-i.offsetWidth:l,n)).indexOf("left")>-1||a.indexOf("right")>-1;d&&(l=(o=s.calculatePosition(e,this.enableRtl?"right":"left","top")).left),(this.enableRtl||d)&&(l=this.enableRtl&&d?l:l-i.offsetWidth),a.indexOf("bottom")>-1&&(n=(o=this.callFit(i,!1,!0,n,l)).top)}this.toggleVisiblity(i,!1),i.style.top=n+"px",i.style.left=l+"px"},n.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},n.prototype.createItems=function(e){var s=this,n=this.navIdx?this.navIdx.length:0,l=this.hasField(e,this.getField("iconCss",n)),o={showIcon:l,moduleName:"menu",fields:this.getFields(n),template:this.template,itemCreating:function(e){e.curData[e.fields.id]||(e.curData[e.fields.id]=t.getUniqueID("menuitem")),e.curData.htmlAttributes={role:"menuitem",tabindex:"-1"},s.isMenu&&!e.curData[s.getField("separator",n)]&&(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]),""===e.curData[e.fields.iconCss]&&(e.curData[e.fields.iconCss]=null)},itemCreated:function(e){if(e.curData[s.getField("separator",n)]&&(e.item.classList.add(q),e.item.removeAttribute("role")),!l||e.curData[e.fields.iconCss]||e.curData[s.getField("separator",n)]||e.item.classList.add("e-blankicon"),e.curData[e.fields.child]&&e.curData[e.fields.child].length){var t=s.createElement("span",{className:"e-icons e-caret"});e.item.appendChild(t),e.item.setAttribute("aria-haspopup","true"),e.item.setAttribute("aria-expanded","false"),s.isMenu||e.item.removeAttribute("role"),e.item.classList.add("e-menu-caret-icon")}s.isMenu&&s.template&&(e.item.setAttribute("id",e.curData[e.fields.id].toString()),e.item.removeAttribute("data-uid"));var i={item:e.curData,element:e.item};s.trigger("beforeItemRender",i)}};this.setProperties({items:this.items},!0),this.isMenu&&(o.templateID=this.element.id+Q);var r=i.ListBase.createList(this.createElement,e,o,!this.template);return r.setAttribute("tabindex","0"),this.isMenu&&r.setAttribute("role","menu"),r},n.prototype.moverHandler=function(e){var i=e.target;this.liTrgt=i;var s=this.getLI(i),n=s?t.closest(s,".e-"+this.getModuleName()+"-wrapper"):this.getWrapper(),l=this.getWrapper(),o=new RegExp("-ej2menu-(.*)-popup"),r=!1;if(n){if((""!==n.id?o.exec(n.id)[1]:n.querySelector("ul").id)!==this.element.id){if(this.removeLIStateByClass([R,F],[this.getWrapper()]),!this.navIdx.length)return;r=!0}s&&t.closest(s,".e-"+this.getModuleName()+"-wrapper")&&!r?(this.removeLIStateByClass([R],this.isMenu?[n].concat(this.getPopups()):[n]),this.removeLIStateByClass([R],this.isMenu?[l].concat(this.getPopups()):[l]),s.classList.add(R),this.showItemOnClick||this.clickHandler(e)):this.isMenu&&this.showItemOnClick&&this.removeLIStateByClass([R],[n].concat(this.getPopups())),this.isMenu&&(this.showItemOnClick||i.parentElement===n||t.closest(i,".e-"+this.getModuleName()+"-popup")||s&&(!s||this.getIndex(s.id,!0).length)?r&&this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e)):(this.removeLIStateByClass([R,F],[n]),this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e))),this.isClosed||this.removeStateWrapper(),this.isClosed=!1)}},n.prototype.removeStateWrapper=function(){if(this.liTrgt){var e=t.closest(this.liTrgt,".e-menu-vscroll");"DIV"===this.liTrgt.tagName&&e&&this.removeLIStateByClass([R,F],[e])}},n.prototype.removeLIStateByClass=function(e,i){for(var s,n=function(n){e.forEach(function(e){(s=t.select("."+e,i[n]))&&s.classList.remove(e)})},l=0;l<i.length;l++)n(l)},n.prototype.getField=function(e,t){void 0===t&&(t=0);var i=this.fields[e];return"string"==typeof i?i:i[t]?i[t].toString():i[i.length-1].toString()},n.prototype.getFields=function(e){return void 0===e&&(e=0),{id:this.getField("itemId",e),iconCss:this.getField("iconCss",e),text:this.getField("text",e),url:this.getField("url",e),child:this.getField("children",e),separator:this.getField("separator",e)}},n.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][t])return!0;return!1},n.prototype.menuHeaderClickHandler=function(e){this.element.classList.contains("e-hide-menu")?this.openHamburgerMenu(e):this.closeHamburgerMenu(e)},n.prototype.clickHandler=function(e){if(this.isTapHold)this.isTapHold=!1;else{var i=this.getWrapper(),s=e.target,n=this.cli=this.getLI(s),l=n?t.closest(n,".e-"+this.getModuleName()+"-wrapper"):null,o=n&&l&&(this.isMenu?this.getIndex(n.id,!0).length>0:i.firstElementChild.id===l.firstElementChild.id);if(o&&"click"===e.type&&!n.classList.contains(j)){this.setLISelected(n);var r=this.getIndex(n.id,!0),a={element:n,item:this.getItem(r),event:e};this.trigger("select",a)}if(o&&("mouseover"===e.type||t.Browser.isDevice||this.showItemOnClick)){var d=void 0;if(n.classList.contains(j)){d=i.children[this.navIdx.length-1],this.toggleAnimation(d);(p=this.getLIByClass(d,F))&&p.classList.remove(F),t.detach(n.parentNode),this.navIdx.pop()}else if(!n.classList.contains(q)){this.showSubMenu=!0;var h=n.parentNode;if(this.cliIdx=this.getIdx(h,n),this.isMenu||!t.Browser.isDevice){var c=this.isMenu?Array.prototype.indexOf.call([i].concat(this.getPopups()),t.closest(h,".e-"+this.getModuleName()+"-wrapper")):this.getIdx(i,h);if(this.navIdx[c]===this.cliIdx&&(this.showSubMenu=!1),c!==this.navIdx.length&&("mouseover"!==e.type||this.showSubMenu)){var p;(p=this.getLIByClass(h,F))&&p.classList.remove(F),this.isClosed=!0,this.keyType="click",this.closeMenu(c+1,e)}}this.isClosed||this.afterCloseMenu(e),this.isClosed=!1}}else if(this.isMenu&&"DIV"===s.tagName&&this.navIdx.length&&t.closest(s,".e-menu-vscroll")){var u=t.closest(s,"."+X),f=Array.prototype.indexOf.call(this.getPopups(),u)+1;f<this.navIdx.length&&(this.closeMenu(f+1,e),this.removeLIStateByClass([R,F],[u]))}else this.isMenu&&this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):"UL"===s.tagName&&s.parentElement===i||n&&n.querySelector(".e-caret")||this.closeMenu(null,e)}},n.prototype.afterCloseMenu=function(e){if(this.showSubMenu){var i=this.navIdx.concat(this.cliIdx),s=this.getItem(i);s[this.getField("children",i.length-1)]&&s[this.getField("children",i.length-1)].length?(("mouseover"===e.type||t.Browser.isDevice&&this.isMenu)&&this.setLISelected(this.cli),this.cli.setAttribute("aria-expanded","true"),this.navIdx.push(this.cliIdx),this.openMenu(this.cli,s,null,null,e)):"mouseover"!==e.type&&this.closeMenu(null,e)}this.keyType=""},n.prototype.setLISelected=function(e){var t=this.getLIByClass(e.parentElement,F);t&&t.classList.remove(F),this.isMenu||e.classList.remove(R),e.classList.add(F)},n.prototype.getLIByClass=function(e,t){for(var i=0,s=e.children.length;i<s;i++)if(e.children[i].classList.contains(t))return e.children[i];return null},n.prototype.getItem=function(e){var t=(e=e.slice()).pop();return this.getItems(e)[t]},n.prototype.getItems=function(e){for(var t=this.items,i=0;i<e.length;i++)t=t[e[i]][this.getField("children",i)];return t},n.prototype.getIdx=function(e,t,i){void 0===i&&(i=!0);var s=Array.prototype.indexOf.call(e.querySelectorAll("li"),t);return s=this.isMenu&&this.template&&this.isBlazor()?Array.prototype.indexOf.call(e.querySelectorAll(t.tagName),t):Array.prototype.indexOf.call(e.children,t),i&&e.children[0].classList.contains(j)&&s--,s},n.prototype.getLI=function(e){return"LI"===e.tagName&&e.classList.contains("e-menu-item")?e:t.closest(e,"li.e-menu-item")},n.prototype.isBlazor=function(){return-1!==Object.keys(window).indexOf("ejsInterop")},n.prototype.removeChildElement=function(e){for(;e.firstElementChild;)e.removeChild(e.firstElementChild);return e},n.prototype.onPropertyChanged=function(e,i){for(var s=this,n=this.getWrapper(),l=function(l){switch(l){case"cssClass":i.cssClass&&t.removeClass([n],i.cssClass.split(" ")),e.cssClass&&t.addClass([n],e.cssClass.split(" "));break;case"enableRtl":n.classList.toggle("e-rtl");break;case"showItemOnClick":o.unWireEvents(),o.showItemOnClick=e.showItemOnClick,o.wireEvents();break;case"enableScrolling":if(e.enableScrolling){var r;o.element.classList.contains("e-vertical")?o.addScrolling(n,o.element,"vscroll",n.offsetHeight,o.element.offsetHeight):o.addScrolling(n,o.element,"hscroll",n.offsetWidth,o.element.offsetWidth),o.getPopups().forEach(function(e){r=t.select(".e-ul",e),s.addScrolling(e,r,"vscroll",e.offsetHeight,r.offsetHeight)})}else{var a=n.children[0];o.element.classList.contains("e-vertical")?o.destroyScrollObj(t.getInstance(a,U),a):o.destroyScrollObj(t.getInstance(a,N),a),n.style.overflow="",n.appendChild(o.element),o.getPopups().forEach(function(e){a=e.children[0],s.destroyScrollObj(t.getInstance(a,U),a),e.style.overflow=""})}break;case"items":var d=void 0,h=void 0,c=void 0;if(Object.keys(i.items).length){var p=Object.keys(e.items);for(f=0;f<p.length;f++)(h=o.getChangedItemIndex(e,[],Number(p[f]))).length<=o.getWrapper().children.length&&(d=h.pop(),c=o.getItems(h),o.insertAfter([c[d]],c[d].text),c=o.getItems(h),o.removeItem(c,h,d)),h.length=0}else{var u=o.element;o.isBlazor()?u=o.removeChildElement(o.element):u.innerHTML="";[].slice.call(o.createItems(o.items).children).forEach(function(e){u.appendChild(e)});for(var f=1,m=n.childElementCount;f<m;f++)t.detach(n.lastElementChild);o.navIdx=[]}}},o=this,r=0,a=Object.keys(e);r<a.length;r++){l(a[r])}},n.prototype.getChangedItemIndex=function(e,t,i){t.push(i);var s=Object.keys(e.items[i]).pop();if("items"===s){var n=e.items[i];this.getChangedItemIndex(n,t,Number(Object.keys(n.items).pop()))}else"isParentArray"===s&&t.length>1&&t.pop();return t},n.prototype.removeItem=function(e,i,s){e.splice(s,1);var n=this.getWrapper().children;i.length<n.length&&t.detach(n[i.length].children[s])},n.prototype.unWireEvents=function(e){void 0===e&&(e=this.target);var i=this.getWrapper();if(e){for(var n=void 0,l=void 0,o=t.selectAll(e),r=0,a=o.length;r<a;r++)n=o[r],this.isMenu?t.EventHandler.remove(n,"click",this.menuHeaderClickHandler):t.Browser.isIos?(l=t.getInstance(n,t.Touch))&&l.destroy():t.EventHandler.remove(n,"contextmenu",this.cmenuHandler);if(!this.isMenu)for(var d=0,h=s.getScrollableParent(this.targetElement);d<h.length;d++){var c=h[d];t.EventHandler.remove(c,"scroll",this.scrollHandler)}}t.Browser.isDevice||(t.EventHandler.remove(this.isMenu?document:i,"mouseover",this.delegateMoverHandler),t.EventHandler.remove(document,"mousedown",this.delegateMouseDownHandler)),t.EventHandler.remove(document,"click",this.delegateClickHandler),this.unWireKeyboardEvent(i),this.rippleFn()},n.prototype.unWireKeyboardEvent=function(e){var i=t.getInstance(e,t.KeyboardEvents);i&&i.destroy()},n.prototype.toggleAnimation=function(e,t){var i=this;void 0===t&&(t=!0);var s,n;"None"!==this.animationSettings.effect&&t?this.animation.animate(e,{name:this.animationSettings.effect,duration:this.animationSettings.duration,timingFunction:this.animationSettings.easing,begin:function(e){i.hamburgerMode?(n=e.element.parentElement,e.element.style.position="absolute",s=n.offsetHeight,e.element.style.maxHeight=e.element.offsetHeight+"px",n.style.maxHeight=""):(e.element.style.display="block",e.element.style.maxHeight=e.element.getBoundingClientRect().height+"px")},progress:function(e){i.hamburgerMode&&(n.style.minHeight=s+e.element.offsetHeight+"px")},end:function(e){i.hamburgerMode?(e.element.style.position="",e.element.style.maxHeight="",n.style.minHeight="",e.element.style.top="0px",e.element.children[0].focus(),i.triggerOpen(e.element.children[0])):i.end(e.element,t)}}):this.end(e,t)},n.prototype.triggerOpen=function(e){var t=this.navIdx.length?this.getItem(this.navIdx):null,i={element:e,parentItem:t,items:t?t.items:this.items};this.trigger("onOpen",i)},n.prototype.end=function(e,i){if(i)if(e.style.display="block",e.style.maxHeight="",this.triggerOpen(e),e.querySelector("."+R))e.querySelector("."+R).focus();else{var s=void 0;(s=this.getWrapper().children[this.getIdx(this.getWrapper(),e)-1])?s.querySelector("."+F).focus():this.element.focus()}else if(e===this.element){var n=this.getLIByClass(this.element,R);n&&n.classList.remove(R);var l=this.getLIByClass(this.element,F);l&&l.classList.remove(F),e.style.display="none"}else t.detach(e)},n.prototype.getPersistData=function(){return""},n.prototype.getWrapper=function(){return t.closest(this.element,".e-"+this.getModuleName()+"-wrapper")},n.prototype.getIndex=function(e,t,i,s,n,l){void 0===i&&(i=this.items),void 0===s&&(s=[]),void 0===n&&(n=!1),void 0===l&&(l=0);var o;l=n?l+1:0;for(var r=0,a=i.length;r<a;r++){if(o=i[r],(t?o[this.getField("itemId",l)]:o[this.getField("text",l)])===e){s.push(r);break}if(o[this.getField("children",l)]&&o[this.getField("children",l)].length){if(-1!==(s=this.getIndex(e,t,o[this.getField("children",l)],s,!0,l))[s.length-1]){s.unshift(r);break}r!==a-1&&s.pop()}else r===a-1&&s.push(-1)}return n||-1!==s[0]?s:[]},n.prototype.enableItems=function(e,i,s){void 0===i&&(i=!0);for(var n,l,o,r=G,a=0;a<e.length;a++)l=(o=this.getIndex(e[a],s)).pop(),(n=this.getUlByNavIdx(o.length))&&(i?this.isMenu?(n.children[l].classList.remove(r),n.children[l].removeAttribute("aria-disabled")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[l+1].classList.remove(r):n.children[l].classList.remove(r):this.isMenu?(n.children[l].classList.add(r),n.children[l].setAttribute("aria-disabled","true")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[l+1].classList.add(r):n.children[l].classList.add(r))},n.prototype.showItems=function(e,t){this.showHideItems(e,!1,t)},n.prototype.hideItems=function(e,t){this.showHideItems(e,!0,t)},n.prototype.showHideItems=function(e,i,s){for(var n,l,o,r=0;r<e.length;r++)l=(o=this.getIndex(e[r],s)).pop(),(n=this.getUlByNavIdx(o.length))&&(i?t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[l+1].classList.add(Y):n.children[l].classList.add(Y):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[l+1].classList.remove(Y):n.children[l].classList.remove(Y))},n.prototype.removeItems=function(e,t){for(var i,s,n,l=0;l<e.length;l++)i=(s=this.getIndex(e[l],t)).pop(),n=this.getItems(s),this.removeItem(n,s,i)},n.prototype.insertAfter=function(e,t,i){this.insertItems(e,t,i)},n.prototype.insertBefore=function(e,t,i){this.insertItems(e,t,i,!1)},n.prototype.insertItems=function(e,i,s,n){void 0===n&&(n=!0);for(var l,o,r,a,d,h=0;h<e.length;h++){o=(r=this.getIndex(i,s)).pop(),a=this.getItems(r),d=new Z(a[0],"items",e[h],!0),a.splice(n?o+1:o,0,d);var c=this.isMenu?[this.getWrapper()].concat(this.getPopups()):[].slice.call(this.getWrapper().children);if(r.length<c.length){o=n?o+1:o,this.hasField(a,this.getField("iconCss",r.length-1)),l=this.createItems(a).children[o];var p=this.isMenu?t.select(".e-menu-parent",c[r.length]):c[r.length];p.insertBefore(l,p.children[o])}}},n.prototype.removeAttributes=function(){var e=this;["top","left","display","z-index"].forEach(function(t){e.element.style.removeProperty(t)}),["role","tabindex","class","style"].forEach(function(t){"class"===t&&e.element.classList.contains("e-menu-parent")&&e.element.classList.remove("e-menu-parent"),-1!==["class","style"].indexOf(t)&&e.element.getAttribute(t)||e.element.removeAttribute(t),e.isMenu&&"class"===t&&e.element.classList.contains("e-vertical")&&e.element.classList.remove("e-vertical")})},n.prototype.destroy=function(){var i=this.getWrapper();if(i){if(this.unWireEvents(),this.isMenu)this.closeMenu(),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",this.removeAttributes(),i.parentNode.insertBefore(this.element,i);else{if(this.clonedElement.style.display="","EJS-CONTEXTMENU"===this.clonedElement.tagName)t.addClass([this.clonedElement],["e-control","e-lib","e-"+this.getModuleName()]),this.element=this.clonedElement;else if(this.refreshing&&this.clonedElement.childElementCount&&"LI"===this.clonedElement.children[0].tagName&&this.setProperties({items:[]},!0),document.getElementById(this.clonedElement.id)){var s=this.clonedElement.nextElementSibling;s&&s!==i?this.clonedElement.parentElement.insertBefore(this.element,s):this.clonedElement.parentElement.appendChild(this.element),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",t.append([].slice.call(this.clonedElement.children),this.element),t.detach(this.clonedElement),this.removeAttributes()}this.clonedElement=null}this.isMenu&&this.clonedElement?(t.detach(this.element),i.style.display="",i.classList.remove("e-"+this.getModuleName()+"-wrapper"),i.removeAttribute("data-ripple")):t.detach(i),e.prototype.destroy.call(this)}},B([t.Event()],n.prototype,"beforeItemRender",void 0),B([t.Event()],n.prototype,"beforeOpen",void 0),B([t.Event()],n.prototype,"onOpen",void 0),B([t.Event()],n.prototype,"beforeClose",void 0),B([t.Event()],n.prototype,"onClose",void 0),B([t.Event()],n.prototype,"select",void 0),B([t.Event()],n.prototype,"created",void 0),B([t.Property("")],n.prototype,"cssClass",void 0),B([t.Property(!1)],n.prototype,"showItemOnClick",void 0),B([t.Property("")],n.prototype,"target",void 0),B([t.Property("")],n.prototype,"filter",void 0),B([t.Property(null)],n.prototype,"template",void 0),B([t.Property(!1)],n.prototype,"enableScrolling",void 0),B([t.Complex({},J)],n.prototype,"fields",void 0),B([t.Collection([],Z)],n.prototype,"items",void 0),B([t.Complex({},$)],n.prototype,"animationSettings",void 0),n=B([t.NotifyPropertyChanges],n)}(t.Component),te=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ie=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},se="e-vertical",ne="e-toolbar-items",le="e-toolbar-item",oe="e-rtl",re="e-separator",ae="e-popup-up-icon",de="e-popup-down-icon",he="e-overlay",ce="e-toolbar-text",pe="e-popup-text",ue="e-overflow-show",fe="e-overflow-hide",me="e-hor-nav",ge="e-toolbar-center",ve="e-tbar-pos",ye="e-toolbar-pop",be="e-toolbar-popup",Ce="e-nav-active",Ne="e-ignore",Ee="e-popup-alone",xe="e-hidden",Oe="e-toolbar-multirow",ke="e-multirow-pos",Se="e-multirow-separator",we="e-extended-separator",Le="e-extended-toolbar",Ie="e-toolbar-extended",Ae="e-tbar-extended",De=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return te(i,e),ie([t.Property("")],i.prototype,"id",void 0),ie([t.Property("")],i.prototype,"text",void 0),ie([t.Property("auto")],i.prototype,"width",void 0),ie([t.Property("")],i.prototype,"cssClass",void 0),ie([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),ie([t.Property("")],i.prototype,"prefixIcon",void 0),ie([t.Property("")],i.prototype,"suffixIcon",void 0),ie([t.Property("None")],i.prototype,"overflow",void 0),ie([t.Property("")],i.prototype,"template",void 0),ie([t.Property("Button")],i.prototype,"type",void 0),ie([t.Property("Both")],i.prototype,"showTextOn",void 0),ie([t.Property(null)],i.prototype,"htmlAttributes",void 0),ie([t.Property("")],i.prototype,"tooltipText",void 0),ie([t.Property("Left")],i.prototype,"align",void 0),ie([t.Event()],i.prototype,"click",void 0),i}(t.ChildProperty),Pe=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.resizeContext=s.resize.bind(s),s.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},s}return te(i,e),i.prototype.destroy=function(){var i=this,s=this.element;for(e.prototype.destroy.call(this),this.unwireEvents(),this.tempId.forEach(function(e){t.isNullOrUndefined(i.element.querySelector(e))||(document.body.appendChild(i.element.querySelector(e)).style.display="none")});s.firstElementChild;)s.removeChild(s.firstElementChild);this.trgtEle&&s.appendChild(this.ctrlTem),this.clearProperty(),this.popObj=null,this.tbarAlign=null,this.remove(this.element,"e-toolpop"),s.removeAttribute("style"),["aria-disabled","aria-orientation","aria-haspopup","role"].forEach(function(e){i.element.removeAttribute(e)})},i.prototype.preRender=function(){var e={enableCollision:this.enableCollision,scrollStep:this.scrollStep};this.trigger("beforeCreate",e),this.enableCollision=e.enableCollision,this.scrollStep=e.scrollStep,this.scrollModule=null,this.popObj=null,this.tempId=[],this.tbarItemsCol=this.items,this.isVertical=!!this.element.classList.contains(se),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,oe)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),t.EventHandler.add(this.element,"keydown",this.docKeyDown,this),this.element.setAttribute("tabIndex","0")},i.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var i=!t.isNullOrUndefined(this.popObj)&&t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode;9===e.keyCode&&!0===e.target.classList.contains("e-hor-nav")&&i&&this.popObj.hide({name:"FadeOut",duration:100});(40===e.keyCode||38===e.keyCode||35===e.keyCode||36===e.keyCode)&&e.preventDefault()}},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),this.destroyScroll(),this.keyModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(document,"scroll",this.docEvent),t.EventHandler.remove(this.element,"keydown",this.docKeyDown),t.EventHandler.remove(document,"click",this.docEvent)},i.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},i.prototype.docEvent=function(e){var i=t.closest(e.target,".e-popup");this.popObj&&t.isVisible(this.popObj.element)&&!i&&"Popup"===this.overflowMode&&this.popObj.hide({name:"FadeOut",duration:100})},i.prototype.destroyScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,ve),this.scrollModule.destroy(),this.scrollModule=null)},i.prototype.destroyItems=function(){[].slice.call(this.element.querySelectorAll("."+le)).forEach(function(e){t.detach(e)});var e=this.element.querySelector("."+ne);this.tbarAlign&&([].slice.call(e.children).forEach(function(e){t.detach(e)}),this.tbarAlign=!1,this.remove(e,ve)),this.clearProperty()},i.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,oe),this.destroyScroll()),this.remove(this.element,Ae),this.remove(this.element,Le);var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,Oe),this.popObj&&this.popupRefresh(this.popObj.element,!0)},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},i.prototype.clstElement=function(e,i){return e&&this.popObj&&t.isVisible(this.popObj.element)?this.popObj.element.querySelector("."+le):this.element===i||e?this.element.querySelector("."+le+":not(."+he+" ):not(."+re+" ):not(."+xe+" )"):t.closest(i,"."+le)},i.prototype.keyHandling=function(e,i,s,n,l){var o=this.popObj,r=this.element,a={name:"FadeOut",duration:100};switch(i.action){case"moveRight":if(this.isVertical)return;r===s?this.elementFocus(e):n||this.eleFocus(e,"next");break;case"moveLeft":if(this.isVertical)return;n||this.eleFocus(e,"previous");break;case"home":case"end":var d=void 0,h=void 0;if(e){var c=t.closest(e,".e-popup");c?t.isVisible(this.popObj.element)&&(h=[].slice.call(c.children),d="home"===i.action?h[0]:h[h.length-1]):(h=this.element.querySelectorAll("."+ne+" ."+le),d="home"===i.action?h[0]:h[h.length-1]),d&&this.elementFocus(d)}break;case"moveUp":case"moveDown":var p="moveUp"===i.action?"previous":"next";if(this.isVertical)"moveUp"===i.action?this.eleFocus(e,"previous"):this.eleFocus(e,"next");else if(o&&t.closest(s,".e-popup")){var u=o.element,f=u.firstElementChild;if("previous"===p&&f===e||"next"===p&&u.lastElementChild===e)return;this.eleFocus(e,p)}else"moveDown"===i.action&&o&&t.isVisible(o.element)&&this.elementFocus(e);break;case"tab":if(!l&&!n){var m=e.firstElementChild;r===s&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(m),m.focus()),this.element.removeAttribute("tabindex"))}break;case"popupClose":o&&"Extended"!==this.overflowMode&&o.hide(a);break;case"popupOpen":if(!n)return;o&&!t.isVisible(o.element)?(o.element.style.top=r.offsetHeight+"px",o.show({name:"FadeIn",duration:100})):o.hide(a)}},i.prototype.keyActionHandler=function(e){var t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!this.element.classList.contains(he)){e.preventDefault();var i,s=t.classList.contains(me),n=t.classList.contains("e-scroll-nav");((i=this.clstElement(s,t))||n)&&this.keyHandling(i,e,t,s,n)}},i.prototype.disable=function(e){var i=this.element;e?i.classList.add(he):i.classList.remove(he),i.setAttribute("tabindex",e?"-1":"0"),this.activeEle&&this.activeEle.setAttribute("tabindex",e?"-1":"0"),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&(t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode&&this.popObj.hide(),i.querySelector("#"+i.id+"_nav").setAttribute("tabindex",e?"-1":"0"))},i.prototype.eleContains=function(e){return e.classList.contains(re)||e.classList.contains(he)||e.getAttribute("disabled")||e.classList.contains(xe)||!t.isVisible(e)},i.prototype.eleFocus=function(e,i){var s=Object(e)[i+"ElementSibling"];if(s){if(this.eleContains(s))return void this.eleFocus(s,i);this.elementFocus(s)}else if(this.tbarAlign){var n=Object(e.parentElement)[i+"ElementSibling"];if(t.isNullOrUndefined(n)||0!==n.children.length||(n=Object(n)[i+"ElementSibling"]),!t.isNullOrUndefined(n)&&n.children.length>0)if("next"===i){var l=n.querySelector("."+le);this.eleContains(l)?this.eleFocus(l,i):(l.firstElementChild.focus(),this.activeEleSwitch(l))}else{l=n.lastElementChild;this.eleContains(l)?this.eleFocus(l,i):this.elementFocus(l)}}},i.prototype.clickHandler=function(e){var i=this,s=e.target,n=s.classList,l=this.element,o=!t.isNullOrUndefined(t.closest(s,"."+ye)),r=t.closest(s,"."+me);r||(r=s),l.children[0].classList.contains("e-hscroll")||l.children[0].classList.contains("e-vscroll")||!n.contains(me)||(n=s.querySelector(".e-icons").classList),(n.contains(ae)||n.contains(de))&&this.popupClickHandler(l,r,oe);var a,d=t.closest(e.target,"."+le);if(!t.isNullOrUndefined(d)&&!d.classList.contains(he)||r.classList.contains(me)){d&&(a=this.items[this.tbarEle.indexOf(d)]);var h={originalEvent:e,item:a};a&&!t.isNullOrUndefined(a.click)&&this.trigger("items["+this.tbarEle.indexOf(d)+"].click",h),h.cancel||this.trigger("clicked",h,function(e){t.isNullOrUndefined(i.popObj)||!o||e.cancel||"Popup"!==i.overflowMode||i.popObj.hide({name:"FadeOut",duration:100})})}},i.prototype.popupClickHandler=function(e,i,s){var n=this.popObj;t.isVisible(n.element)?(i.classList.remove(Ce),n.hide({name:"FadeOut",duration:100})):(e.classList.contains(s)&&(n.enableRtl=!0,n.position={X:"left",Y:"top"}),0!==n.offsetX||e.classList.contains(s)||(n.enableRtl=!1,n.position={X:"right",Y:"top"}),n.dataBind(),n.refreshPosition(),n.element.style.top=this.getElementOffsetY()+"px","Extended"===this.overflowMode&&(n.element.style.minHeight="0px"),i.classList.add(Ce),n.show({name:"FadeIn",duration:100}))},i.prototype.render=function(){this.initialize(),this.renderControl(),this.separator(),this.refreshToolbarTemplate(),this.wireEvents(),t.isBlazor()&&this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);"msie"===t.Browser.info.name&&"auto"===this.height&&"MultiRow"!==this.overflowMode||t.setStyleAttribute(this.element,{height:i}),t.setStyleAttribute(this.element,{width:e});var s={role:"toolbar","aria-disabled":"false","aria-haspopup":"false","aria-orientation":this.isVertical?"vertical":"horizontal"};t.attributes(this.element,s)},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?this.element.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderOverflowMode(),this.tbarAlign&&this.itemPositioning(),this.popObj&&this.popObj.element.childElementCount>1&&this.checkPopupRefresh(this.element,this.popObj.element)&&this.popupRefresh(this.popObj.element,!1)},i.prototype.changeOrientation=function(){var e=this.element;this.isVertical?(e.classList.remove(se),this.isVertical=!1,"auto"!==this.height&&"100%"!==this.height||(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add(se),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),t.setStyleAttribute(this.element,{height:t.formatUnit(this.height),width:t.formatUnit(this.width)})),this.destroyMode(),this.refreshOverflow()},i.prototype.initScroll=function(e,i){!this.scrollModule&&this.checkOverflow(e,i[0])&&(this.tbarAlign&&this.element.querySelector("."+ne+" ."+ge).removeAttribute("style"),this.isVertical?this.scrollModule=new U({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]):this.scrollModule=new N({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]),this.remove(this.scrollModule.element,ve),t.setStyleAttribute(this.element,{overflow:"hidden"}))},i.prototype.itemWidthCal=function(e){var i,s=this,n=0;return[].slice.call(t.selectAll("."+le,e)).forEach(function(e){t.isVisible(e)&&(i=window.getComputedStyle(e),n+=s.isVertical?e.offsetHeight:e.offsetWidth,n+=parseFloat(s.isVertical?i.marginTop:i.marginRight),n+=parseFloat(s.isVertical?i.marginBottom:i.marginLeft))}),n},i.prototype.getScrollCntEle=function(e){var t=this.isVertical?".e-vscroll-content":".e-hscroll-content";return e.querySelector(t)},i.prototype.checkOverflow=function(e,i){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i)||!t.isVisible(e))return!1;var s=this.isVertical?e.offsetHeight:e.offsetWidth,n=this.isVertical?i.offsetHeight:i.offsetWidth;(this.tbarAlign||this.scrollModule||s===n)&&(n=this.itemWidthCal(this.scrollModule?this.getScrollCntEle(i):i));var l=e.querySelector("."+me),o=e.querySelector(".e-scroll-nav"),r=0;return l?r=this.isVertical?l.offsetHeight:l.offsetWidth:o&&(r=this.isVertical?2*o.offsetHeight:2*o.offsetWidth),n>s-r},i.prototype.refreshOverflow=function(){this.resize()},i.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,ve),this.itemPositioning())},i.prototype.renderOverflowMode=function(){var e=this.element,i=e.querySelector("."+ne),s=this.popupPriCount>0;if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.remove(this.element,"e-toolpop"),"msie"===t.Browser.info.name&&"auto"===this.height&&(e.style.height=""),this.overflowMode){case"Scrollable":t.isNullOrUndefined(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(ne)));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),(this.checkOverflow(e,i)||s)&&(this.createPopupEle(e,[].slice.call(t.selectAll("."+ne+" ."+le,e))),this.element.querySelector("."+me).setAttribute("tabIndex","0")),this.toolbarAlign(i);break;case"MultiRow":this.add(i,Oe),this.checkOverflow(e,i)&&this.tbarAlign&&(this.removePositioning(),this.add(i,ke)),"hidden"===e.style.overflow&&(e.style.overflow=""),"msie"!==t.Browser.info.name&&"auto"===e.style.height||(e.style.height="auto");break;case"Extended":this.add(this.element,Le),(this.checkOverflow(e,i)||s)&&(this.tbarAlign&&this.removePositioning(),this.createPopupEle(e,[].slice.call(t.selectAll("."+ne+" ."+le,e))),this.element.querySelector("."+me).setAttribute("tabIndex","0")),this.toolbarAlign(i)}},i.prototype.separator=function(){var e,t=this.element,i=[].slice.call(t.querySelectorAll("."+re)),s=t.querySelector("."+Se),n=t.querySelector("."+we);null!==(e="MultiRow"===this.overflowMode?s:n)&&("MultiRow"===this.overflowMode?e.classList.remove(Se):"Extended"===this.overflowMode&&e.classList.remove(we));for(var l=0;l<=i.length-1;l++)i[l].offsetLeft<30&&0!==i[l].offsetLeft&&("MultiRow"===this.overflowMode?i[l].classList.add(Se):"Extended"===this.overflowMode&&i[l].classList.add(we))},i.prototype.createPopupEle=function(e,i){var s=e.querySelector("."+me),n=this.isVertical;s||this.createPopupIcon(e),s=e.querySelector("."+me);var l=n?s.offsetHeight:s.offsetWidth,o=(n?e.offsetHeight:e.offsetWidth)-l;this.element.classList.remove("e-rtl"),t.setStyleAttribute(this.element,{direction:"initial"}),this.checkPriority(e,i,o,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.element.style.removeProperty("direction"),this.createPopup()},i.prototype.pushingPoppedEle=function(e,i,s,n,l){var o=e.element,r=t.selectAll("."+ue,s),a=0,d=0;[].slice.call(t.selectAll("."+be,o.querySelector("."+ne))).forEach(function(o,h){r=t.selectAll("."+ue,s),o.classList.contains(ue)&&r.length>0?e.tbResize&&r.length>h?(s.insertBefore(o,r[h]),++d):(s.insertBefore(o,s.children[r.length]),++d):o.classList.contains(ue)?(s.insertBefore(o,s.firstChild),++d):e.tbResize&&o.classList.contains(fe)&&s.children.length>0&&0===r.length?(s.insertBefore(o,s.firstChild),++d):o.classList.contains(fe)?i.push(o):e.tbResize?(s.insertBefore(o,s.childNodes[a+d]),++a):s.appendChild(o),o.classList.contains(re)?t.setStyleAttribute(o,{display:"",height:l+"px"}):t.setStyleAttribute(o,{display:"",height:n+"px"})}),i.forEach(function(e){s.appendChild(e)});for(var h=t.selectAll("."+le,o.querySelector("."+ne)),c=h.length-1;c>=0;c--){var p=h[c];if(!p.classList.contains(re)||"Extended"===this.overflowMode)break;t.setStyleAttribute(p,{display:"none"})}},i.prototype.createPopup=function(){var e,t,i,s,n=this.element;"Extended"===this.overflowMode&&(s=n.querySelector("."+re+":not(."+be+")"),i="auto"===n.style.height||""===n.style.height?null:s.offsetHeight),t=n.querySelector("."+le+":not(."+re+"):not(."+be+")"),e="auto"===n.style.height||""===n.style.height?null:t&&t.offsetHeight;var l;if(n.querySelector("#"+n.id+"_popup."+ye))l=n.querySelector("#"+n.id+"_popup."+ye);else{var o=this.createElement("div",{id:n.id+"_popup",className:ye+" "+Ie}),r=this.createElement("div",{id:n.id+"_popup",className:ye});l="Extended"===this.overflowMode?o:r}this.pushingPoppedEle(this,[],l,e,i),this.popupInit(n,l)},i.prototype.getElementOffsetY=function(){return"Extended"===this.overflowMode&&"border-box"===window.getComputedStyle(this.element).getPropertyValue("box-sizing")?this.element.clientHeight:this.element.offsetHeight},i.prototype.popupInit=function(e,i){if(this.popObj){var n=this.popObj.element;t.setStyleAttribute(n,{maxHeight:"",display:"block"}),t.setStyleAttribute(n,{maxHeight:n.offsetHeight+"px",display:""})}else{e.appendChild(i),t.setStyleAttribute(this.element,{overflow:""});var l=window.getComputedStyle(this.element),o=new s.Popup(null,{relateTo:this.element,offsetY:this.isVertical?0:this.getElementOffsetY(),enableRtl:this.enableRtl,open:this.popupOpen.bind(this),close:this.popupClose.bind(this),collision:{Y:this.enableCollision?"flip":"none"},position:this.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"}});if(o.appendTo(i),"Extended"===this.overflowMode&&(o.width=parseFloat(l.width)+2*parseFloat(l.borderRightWidth),o.offsetX=0),t.EventHandler.add(document,"scroll",this.docEvent.bind(this)),t.EventHandler.add(document,"click ",this.docEvent.bind(this)),o.element.style.maxHeight=o.element.offsetHeight+"px",this.isVertical&&(o.element.style.visibility="hidden"),this.isExtendedOpen){var r=this.element.querySelector("."+me);r.classList.add(Ce),t.classList(r.firstElementChild,[ae],[de]),this.element.querySelector("."+Ie).classList.add("e-popup-open")}else o.hide();this.popObj=o,this.element.setAttribute("aria-haspopup","true")}},i.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,Ae):this.remove(this.element,Ae))},i.prototype.popupOpen=function(e){var i=this.popObj;this.isVertical||(i.offsetY=this.getElementOffsetY(),i.dataBind());var n=this.popObj.element,l=this.popObj.element.parentElement,o=l.querySelector("."+me);t.setStyleAttribute(i.element,{height:"auto",maxHeight:""}),i.element.style.maxHeight=i.element.offsetHeight+"px","Extended"===this.overflowMode&&(i.element.style.minHeight="");var r=n.offsetTop+n.offsetHeight+s.calculatePosition(l).top,a=o.firstElementChild;o.classList.add(Ce),t.classList(a,[ae],[de]),this.tbarPopupHandler(!0);var d=t.isNullOrUndefined(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+d<r&&this.element.offsetTop<n.offsetHeight){var h=n.offsetHeight-(r-window.innerHeight-d+5);i.height=h+"px";for(var c=0;c<=n.childElementCount;c++){var p=n.children[c];if(p.offsetTop+p.offsetHeight>h){h=p.offsetTop;break}}t.setStyleAttribute(i.element,{maxHeight:h+"px"})}else if(this.isVertical){var u=this.element.getBoundingClientRect();t.setStyleAttribute(i.element,{maxHeight:u.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}},i.prototype.popupClose=function(e){var i=this.element.querySelector("."+me),s=i.firstElementChild;i.classList.remove(Ce),t.classList(s,[de],[ae]),this.tbarPopupHandler(!1)},i.prototype.checkPriority=function(e,i,s,n){for(var l,o=this.popupPriCount>0,r=s,a=0,d=0,h=0,c=function(e,t){var i=!1;return t.forEach(function(t){e.classList.contains(t)&&(i=!0)}),i},p=i.length-1;p>=0;p--){var u=void 0,f=window.getComputedStyle(i[p]);this.isVertical?(u=parseFloat(f.marginTop),u+=parseFloat(f.marginBottom)):(u=parseFloat(f.marginRight),u+=parseFloat(f.marginLeft));var m=i[p]===this.tbarEle[0];m&&(this.tbarEleMrgn=u),l=this.isVertical?i[p].offsetHeight:i[p].offsetWidth;var g=m?l+u:l;if(c(i[p],[Ee])&&o&&(i[p].classList.add(be),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:g+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:g+"px"}),h++),this.isVertical?i[p].offsetTop+i[p].offsetHeight+u>s:i[p].offsetLeft+i[p].offsetWidth+u>s){if(i[p].classList.contains(re)){if("Extended"===this.overflowMode){if(d===h){c(v=i[p],[re,Ne])&&(i[p].classList.add(be),h++)}d++}else if("Popup"===this.overflowMode){if(a>0&&d===h){var v;c(v=i[p+d+(a-1)],[re,Ne])&&t.setStyleAttribute(v,{display:"none"})}a++,d=0,h=0}}else d++;i[p].classList.contains(ue)&&n?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:c(i[p],[re,Ne])?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:(i[p].classList.add(be),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:g+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:g+"px"}),h++)}}if(n){var y=t.selectAll("."+le+":not(."+be+")",this.element);this.checkPriority(e,y,r,!1)}},i.prototype.createPopupIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav e-hor-nav");s="Extended"===this.overflowMode?s+" e-expended-nav":s;var n=this.createElement("div",{id:i,className:s});"msie"!==t.Browser.info.name&&"edge"!==t.Browser.info.name||n.classList.add("e-ie-align");var l=this.createElement("div",{className:de+" e-icons"});n.appendChild(l),n.setAttribute("tabindex","0"),e.appendChild(n)},i.prototype.tbarPriRef=function(e,i,s,n,l,o,r,a){var d=a,h=this.popObj.element,c=t.selectAll("."+be+":not(."+ue+")",h).length,p=function(e,t){return e.classList.contains(t)};if(0===t.selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)",e).length){var u=e.children[i-(i-s)-1],f=!t.isNullOrUndefined(u)&&p(u,Ne);if(!t.isNullOrUndefined(u)&&p(u,re)&&!t.isVisible(u)||f){u.style.display="inherit";var m=u.offsetWidth+2*parseFloat(window.getComputedStyle(u).marginRight),g=u.previousElementSibling;o+m<r||l?(e.insertBefore(n,e.children[i+d-(i-s)]),t.isNullOrUndefined(g)||(g.style.display="")):g.classList.contains(re)&&(g.style.display="none"),u.style.display=""}else e.insertBefore(n,e.children[i+d-(i-s)])}else e.insertBefore(n,e.children[i+d-c])},i.prototype.popupRefresh=function(e,i){var s=this,n=this.element,l=this.isVertical,o=n.querySelector("."+me),r=n.querySelector("."+ne);if(!t.isNullOrUndefined(o)){r.removeAttribute("style"),e.style.display="block";var a;a=l?n.offsetHeight-(o.offsetHeight+r.offsetHeight):n.offsetWidth-(o.offsetWidth+r.offsetWidth);var d=0;[].slice.call(e.children).forEach(function(e){d+=s.popupEleWidth(e),t.setStyleAttribute(e,{position:""})}),a+(l?o.offsetHeight:o.offsetWidth)>d&&0===this.popupPriCount&&(i=!0),this.popupEleRefresh(a,e,i),e.style.display="",0===e.children.length&&o&&this.popObj&&(t.detach(o),o=null,this.popObj.destroy(),t.detach(this.popObj.element),this.popObj=null,n.setAttribute("aria-haspopup","false"))}},i.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll("."+Ne)),s=[],n=0;return i.length>0?(i.forEach(function(e){s.push([].slice.call(t.children).indexOf(e))}),s.forEach(function(t){t<=e&&n++}),n):0},i.prototype.checkPopupRefresh=function(e,t){t.style.display="block";var i=this.popupEleWidth(t.firstElementChild);t.firstElementChild.style.removeProperty("Position");var s=e.offsetWidth-e.querySelector("."+me).offsetWidth,n=e.querySelector("."+ne).offsetWidth;return t.style.removeProperty("display"),s>i+n},i.prototype.popupEleWidth=function(e){e.style.position="absolute";var i=this.isVertical?e.offsetHeight:e.offsetWidth,s=e.querySelector(".e-tbar-btn-text");if(e.classList.contains("e-tbtn-align")||e.classList.contains(pe)){var n=e.children[0];!t.isNullOrUndefined(s)&&e.classList.contains(pe)?s.style.display="none":!t.isNullOrUndefined(s)&&e.classList.contains(ce)&&(s.style.display="block"),n.style.minWidth="0%",i=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),n.style.minWidth="",n.style.minHeight="",t.isNullOrUndefined(s)||(s.style.display="")}return i},i.prototype.popupEleRefresh=function(e,i,s){for(var n,l,o=this.popupPriCount>0,r=this.tbarEle,a=this.element.querySelector("."+ne),d=0,h=function(i){if(i.classList.contains(Ee)&&o&&!s)return"continue";var h=c.popupEleWidth(i);if(i===c.tbarEle[0]&&(h+=c.tbarEleMrgn),i.style.position="",!(h<e||s))return"break";if(t.setStyleAttribute(i,{minWidth:"",height:"",minHeight:""}),i.classList.contains(fe)||i.classList.remove(be),l=c.tbarEle.indexOf(i),c.tbarAlign){var p=c.items[l].align;l=c.tbarAlgEle[(p+"s").toLowerCase()].indexOf(i),r=c.tbarAlgEle[(p+"s").toLowerCase()],a=c.element.querySelector("."+ne+" .e-toolbar-"+p.toLowerCase())}var u=0;"Extended"!==c.overflowMode&&r.slice(0,l).forEach(function(t){(t.classList.contains(ue)||t.classList.contains(re))&&(t.classList.contains(re)&&(t.style.display="",e-=t.offsetWidth),u++)}),d=c.ignoreEleFetch(l,a),i.classList.contains(ue)?(c.tbarPriRef(a,l,u,i,s,h,e,d),e-=i.offsetWidth):0===l?(a.insertBefore(i,a.firstChild),e-=i.offsetWidth):(n=t.selectAll("."+ue,c.popObj.element).length,a.insertBefore(i,a.children[l+d-n]),e-=i.offsetWidth),i.style.height=""},c=this,p=0,u=[].slice.call(i.children);p<u.length;p++){if("break"===h(u[p]))break}this.checkOverflow(this.element,this.element.getElementsByClassName(ne)[0])&&!s&&this.renderOverflowMode()},i.prototype.removePositioning=function(){var e=this.element.querySelector("."+ne);if(!t.isNullOrUndefined(e)&&e.classList.contains(ve)){this.remove(e,ve);var i=[].slice.call(e.childNodes);i[1].removeAttribute("style"),i[2].removeAttribute("style")}},i.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+ne);this.add(e,ve),this.itemPositioning()},i.prototype.itemPositioning=function(){var e,i=this.element.querySelector("."+ne);if(!t.isNullOrUndefined(i)&&i.classList.contains(ve)){var s,n=this.element.querySelector("."+me);if(this.scrollModule){var l=this.isVertical?"e-vscroll-content":"e-hscroll-content";s=[].slice.call(i.querySelector("."+l).children)}else s=[].slice.call(i.childNodes);e=this.isVertical?s[0].offsetHeight+s[2].offsetHeight:s[0].offsetWidth+s[2].offsetWidth;var o=this.isVertical?this.element.offsetHeight:this.element.offsetWidth;if(n){o-=this.isVertical?n.offsetHeight:n.offsetWidth;var r=(this.isVertical?n.offsetHeight:n.offsetWidth)+"px";s[2].removeAttribute("style"),this.isVertical?this.enableRtl?s[2].style.top=r:s[2].style.bottom=r:this.enableRtl?s[2].style.left=r:s[2].style.right=r}if(!(o<=e)){var a=(o-e-(this.isVertical?s[1].offsetHeight:s[1].offsetWidth))/2;s[1].removeAttribute("style");var d=(this.isVertical?s[0].offsetHeight:s[0].offsetWidth)+a+"px";this.isVertical?this.enableRtl?s[1].style.marginBottom=d:s[1].style.marginTop=d:this.enableRtl?s[1].style.marginRight=d:s[1].style.marginLeft=d}}},i.prototype.tbarItemAlign=function(e,t,i){var s=this;if(!e.showAlwaysInPopup||"Show"===e.overflow){var n=[];if(n.push(this.createElement("div",{className:"e-toolbar-left"})),n.push(this.createElement("div",{className:ge})),n.push(this.createElement("div",{className:"e-toolbar-right"})),0===i&&"Left"!==e.align)n.forEach(function(e){t.appendChild(e)}),this.tbarAlign=!0,this.add(t,ve);else if("Left"!==e.align){var l=t.childNodes,o=n[0];[].slice.call(l).forEach(function(e){s.tbarAlgEle.lefts.push(e),o.appendChild(e)}),t.appendChild(o),t.appendChild(n[1]),t.appendChild(n[2]),this.tbarAlign=!0,this.add(t,ve)}}},i.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,ne),this.tbarEle=[];[].slice.call(this.trgtEle.children).forEach(function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),t.setAttribute("aria-disabled","false"),e.add(t,le))})},i.prototype.renderItems=function(){var e,t,i,s=this.element,n=this.items;if(s&&s.children.length>0&&(e=s.querySelector("."+ne)),null!=this.trgtEle)this.ctrlTemplate();else if(s&&n.length>0){e||(e=this.createElement("div",{className:ne}));for(var l=0;l<n.length;l++)t=this.renderSubComponent(n[l],l),-1===this.tbarEle.indexOf(t)&&this.tbarEle.push(t),this.tbarAlign||this.tbarItemAlign(n[l],e,l),(i=e.querySelector(".e-toolbar-"+n[l].align.toLowerCase()))?(n[l].showAlwaysInPopup&&"Show"!==n[l].overflow||this.tbarAlgEle[(n[l].align+"s").toLowerCase()].push(t),i.appendChild(t)):e.appendChild(t);s.appendChild(e)}},i.prototype.setAttr=function(e,t){for(var i,s=Object.keys(e),n=0;n<s.length;n++)"class"===(i=s[n])?this.add(t,e[i]):t.setAttribute(i,e[i])},i.prototype.enableItems=function(e,i){var s,n=e,l=n.length;t.isNullOrUndefined(i)&&(i=!0);var o=function(e,t){e?(t.classList.remove(he),t.setAttribute("aria-disabled","false")):(t.classList.add(he),t.setAttribute("aria-disabled","true"))};if(!t.isNullOrUndefined(l)&&l>=1){for(var r=0,a=[].slice.call(n);r<l;r++){var d=a[r];if("number"==typeof d){if(s=this.getElementByIndex(d),t.isNullOrUndefined(s))return;n[r]=s}else s=d;o(i,s)}i?t.removeClass(n,he):t.addClass(n,he)}else{if("number"==typeof n){if(s=this.getElementByIndex(n),t.isNullOrUndefined(s))return}else s=e;o(i,s)}},i.prototype.getElementByIndex=function(e){return this.tbarEle[e]?this.tbarEle[e]:null},i.prototype.addItems=function(e,i){var s;this.extendedOpen();var n=this.element.querySelector("."+ne);if(t.isNullOrUndefined(n))this.itemsRerender(e);else{var l,o="Left";t.isNullOrUndefined(i)&&(i=0),e.forEach(function(e){t.isNullOrUndefined(e.align)||"Left"===e.align||"Left"!==o||(o=e.align)});for(var r=0,a=e;r<a.length;r++){var d=a[r];if(t.isNullOrUndefined(d.type)&&(d.type="Button"),s=t.selectAll("."+le,this.element),d.align=o,l=this.renderSubComponent(d,i),this.tbarEle.length>=i&&s.length>=0){t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var h="L"===d.align[0]?0:"C"===d.align[0]?1:2,c=void 0;this.tbarAlign||"Left"===o?this.tbarAlign?((c=t.closest(s[0],"."+ne).children[h]).insertBefore(l,c.children[i]),this.tbarAlgEle[(d.align+"s").toLowerCase()].splice(i,0,l),this.refreshPositioning()):0===s.length?(s=t.selectAll("."+ne,this.element))[0].appendChild(l):s[0].parentNode.insertBefore(l,s[i]):(this.tbarItemAlign(d,n,1),this.tbarAlign=!0,(c=t.closest(s[0],"."+ne).children[h]).appendChild(l),this.tbarAlgEle[(d.align+"s").toLowerCase()].push(l),this.refreshPositioning()),this.items.splice(i,0,d),this.tbarEle.splice(i,0,l),i++,this.offsetWid=n.offsetWidth}}n.style.width="",this.renderOverflowMode()}},i.prototype.removeItems=function(e){var i,s=e,n=[].slice.call(t.selectAll("."+le,this.element));if("number"==typeof s)i=parseInt(e.toString(),10),this.removeItemByIndex(i,n);else if(s&&s.length>1)for(var l=0,o=[].slice.call(s);l<o.length;l++){var r=o[l];i=this.tbarEle.indexOf(r),this.removeItemByIndex(i,n),n=t.selectAll("."+le,this.element)}else{r=s&&s.length&&1===s.length?s[0]:e;i=n.indexOf(r),this.removeItemByIndex(i,n)}this.resize()},i.prototype.removeItemByIndex=function(e,i){if(this.tbarEle[e]&&i[e]){var s=this.tbarEle.indexOf(i[e]);if(this.tbarAlign){var n=void 0;n=this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].indexOf(this.tbarEle[s]),this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].splice(n,1)}t.detach(i[e]),this.items.splice(s,1),this.tbarEle.splice(s,1)}},i.prototype.templateRender=function(e,i,s,n){var l,o=s.type,r=e;if("object"==typeof e&&(l="function"==typeof r.appendTo),"string"!=typeof e&&l){if("Input"===o){h=this.createElement("input");s.id?h.id=s.id:h.id=t.getUniqueID("tbr-ipt"),i.appendChild(h),r.appendTo(h)}}else{var a=void 0,d=e;d="string"==typeof e?e.trim():e;try{if("object"!=typeof e||t.isNullOrUndefined(e.tagName)){if(document.querySelectorAll(d).length){var h,c=(h=document.querySelector(d)).outerHTML.trim();i.appendChild(h),h.style.display="",t.isNullOrUndefined(c)||this.tempId.push(d)}}else i.appendChild(e)}catch(e){a=t.compile(d)}var p=void 0;if(!t.isNullOrUndefined(a)){var u=this.element.id+n+"_template";p=a({},this,"template",u,this.isStringTemplate)}!t.isNullOrUndefined(p)&&p.length>0&&[].slice.call(p).forEach(function(e){t.isNullOrUndefined(e.tagName)||(e.style.display=""),i.appendChild(e)})}this.add(i,"e-template"),this.tbarEle.push(i)},i.prototype.buttonRendering=function(e,i){var s=this.createElement("button",{className:"e-tbar-btn"});s.setAttribute("type","button");var l,o,r=e.text;e.id?s.id=e.id:s.id=t.getUniqueID("e-tbr-btn");var a=this.createElement("span",{className:"e-tbar-btn-text"});r?(a.innerHTML=r,s.appendChild(a),s.classList.add("e-tbtn-txt")):this.add(i,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(l=e.prefixIcon+" e-icons",o="Left"):(l=e.suffixIcon+" e-icons",o="Right"));var d=new n.Button({iconCss:l,iconPosition:o});return d.createElement=this.createElement,d.appendTo(s),e.width&&t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),s},i.prototype.renderSubComponent=function(e,t){var i,s;if((i=this.createElement("div",{className:le})).setAttribute("aria-disabled","false"),this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,i),e.tooltipText){var n=this.createElement("div",{innerHTML:e.tooltipText});i.setAttribute("title",n.textContent)}if(e.cssClass&&(i.className=i.className+" "+e.cssClass),e.template)this.templateRender(e.template,i,e,t);else switch(e.type){case"Button":(s=this.buttonRendering(e,i)).setAttribute("tabindex","-1"),i.appendChild(s),i.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(i,re)}if(e.showTextOn){var l=e.showTextOn;"Toolbar"===l?(this.add(i,ce),this.add(i,"e-tbtn-align")):"Overflow"===l&&this.add(i,pe)}if(e.overflow){var o=e.overflow;"Show"===o?this.add(i,ue):"Hide"===o&&(i.classList.contains(re)||this.add(i,fe))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!i.classList.contains(re)&&(this.add(i,Ee),this.popupPriCount++),i},i.prototype.refreshToolbarTemplate=function(){for(var e=Object.keys(window),i=0,s=this.items.length;i<s;i++){var n=this.items[i];n.template&&e.indexOf("Blazor")>-1&&!this.isStringTemplate&&0===n.template.indexOf("<div>Blazor")&&(t.resetBlazorTemplate(this.element.id+i+"_template","Template"),t.updateBlazorTemplate(this.element.id+i+"_template","Template",n))}},i.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},i.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},i.prototype.activeEleRemove=function(e){t.isNullOrUndefined(this.activeEle)||this.activeEle.setAttribute("tabindex","-1"),this.activeEle=e,t.isNullOrUndefined(this.trgtEle)&&!e.parentElement.classList.contains("e-template")?e.removeAttribute("tabindex"):this.activeEle.setAttribute("tabindex","0")},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.getModuleName=function(){return"toolbar"},i.prototype.itemsRerender=function(e){this.items=this.tbarItemsCol,this.destroyMode(),this.destroyItems(),this.items=e,this.tbarItemsCol=this.items,this.renderItems(),this.renderOverflowMode()},i.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&"Popup"===this.overflowMode&&this.popObj.hide();var i=this.checkOverflow(e,e.getElementsByClassName(ne)[0]);if(!i){this.destroyScroll();var s=e.querySelector("."+ne);t.isNullOrUndefined(s)||(this.remove(s,ke),this.tbarAlign&&this.add(s,ve))}if(!i||!this.scrollModule||this.offsetWid!==e.offsetWidth){if((this.offsetWid>e.offsetWidth||i)&&this.renderOverflowMode(),this.popObj){if("Extended"===this.overflowMode){var n=window.getComputedStyle(this.element);this.popObj.width=parseFloat(n.width)+2*parseFloat(n.borderRightWidth)}this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()}this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator()}},i.prototype.extendedOpen=function(){var e=this.element.querySelector("."+Ie);"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains("e-popup-open"))},i.prototype.onPropertyChanged=function(e,i){var s=this.element;this.extendedOpen();for(var n=0,l=Object.keys(e);n<l.length;n++){switch(l[n]){case"items":if(e.items instanceof Array&&i.items instanceof Array)this.itemsRerender(e.items);else for(var o=Object.keys(e.items),r=0;r<o.length;r++){var a=parseInt(Object.keys(e.items)[r],10),d=Object.keys(e.items[a])[0],h=(Object(i.items[a])[d],Object(e.items[a])[d]);if(this.tbarAlign||"align"===d){this.refresh(),this.trigger("created");break}var c="showAlwaysInPopup"===d&&!h,p="overflow"===d&&0!==this.popupPriCount;(c||this.items[a].showAlwaysInPopup&&p)&&--this.popupPriCount,t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var u=[].slice.call(t.selectAll("."+ne+" ."+le,s));t.detach(u[a]),this.tbarEle.splice(a,1),this.addItems([this.items[a]],a),this.items.splice(a,1),this.items[a].template&&this.tbarEle.splice(this.items.length,1)}break;case"width":var f=s.offsetWidth;t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),this.renderOverflowMode(),this.popObj&&f<s.offsetWidth&&this.popupRefresh(this.popObj.element,!1);break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(s,oe),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(s,oe):this.remove(s,oe),t.isNullOrUndefined(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,oe):this.remove(this.scrollModule.element,oe)),t.isNullOrUndefined(this.popObj)||(e.enableRtl?this.add(this.popObj.element,oe):this.remove(this.popObj.element,oe)),this.tbarAlign&&this.itemPositioning();break;case"scrollStep":this.scrollModule&&(this.scrollModule.scrollStep=this.scrollStep);break;case"enableCollision":this.popObj&&(this.popObj.collision={Y:this.enableCollision?"flip":"none"})}}},i.prototype.hideItem=function(e,i){var s,n,l="object"==typeof e,o=e,r=[].slice.call(t.selectAll("."+le,this.element));if(l)n=e;else if(this.tbarEle[o]){n=[].slice.call(t.selectAll("."+le,this.element))[o]}if(n){if(i?n.classList.add(xe):n.classList.remove(xe),i&&t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains(re)){if(t.isNullOrUndefined(n.firstElementChild.getAttribute("tabindex"))){n.firstElementChild.setAttribute("tabindex","-1");var a=[].slice.call(t.selectAll("."+le,this.element));l&&(o=a.indexOf(n));for(var d=a[++o];d;){if(!this.eleContains(d)){d.firstElementChild.removeAttribute("tabindex");break}d=a[++o]}}}else if(t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains(re))for(var h=!1,c=!1,p=r[s=0];p;)if(p.classList.contains(re))p=r[++s];else if(t.isNullOrUndefined(p.firstElementChild.getAttribute("tabindex")))p.firstElementChild.setAttribute("tabindex","-1"),h=!0;else{if(h&&c)break;this.eleContains(p)||(p.firstElementChild.removeAttribute("tabindex"),c=!0),p=r[++s]}this.refreshOverflow()}},ie([t.Collection([],De)],i.prototype,"items",void 0),ie([t.Property("auto")],i.prototype,"width",void 0),ie([t.Property("auto")],i.prototype,"height",void 0),ie([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),ie([t.Property()],i.prototype,"scrollStep",void 0),ie([t.Property(!0)],i.prototype,"enableCollision",void 0),ie([t.Event()],i.prototype,"clicked",void 0),ie([t.Event()],i.prototype,"created",void 0),ie([t.Event()],i.prototype,"destroyed",void 0),ie([t.Event()],i.prototype,"beforeCreate",void 0),i=ie([t.NotifyPropertyChanges],i)}(t.Component),Me=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Te=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},Ue="e-acrdn-root",He="e-accordion",Be="e-acrdn-item",Re="e-acrdn-header",je="e-acrdn-header-content",Fe="e-acrdn-panel",qe="e-acrdn-content",Ve="e-toggle-icon",We="e-content-hide",ze="e-selected",_e="e-active",Ke="e-overlay",Ge="e-toggle-animation",Ye="e-expand-state",Xe="e-accordion-container",Qe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Me(i,e),Te([t.Property("SlideDown")],i.prototype,"effect",void 0),Te([t.Property(400)],i.prototype,"duration",void 0),Te([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),Je=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Me(i,e),Te([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},Qe)],i.prototype,"collapse",void 0),Te([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},Qe)],i.prototype,"expand",void 0),i}(t.ChildProperty),Ze=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Me(i,e),Te([t.Property(null)],i.prototype,"content",void 0),Te([t.Property(null)],i.prototype,"header",void 0),Te([t.Property(null)],i.prototype,"cssClass",void 0),Te([t.Property(null)],i.prototype,"iconCss",void 0),Te([t.Property(!1)],i.prototype,"expanded",void 0),i}(t.ChildProperty),$e=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.keyConfigs={moveUp:"uparrow",moveDown:"downarrow",enter:"enter",space:"space",home:"home",end:"end"},s}return Me(i,e),i.prototype.destroy=function(){var t=this,i=this.element;for(e.prototype.destroy.call(this),this.unwireEvents(),this.isDestroy=!0,this.restoreContent(null);i.firstElementChild;)i.removeChild(i.firstElementChild);if(this.trgtEle)for(;this.ctrlTem.firstElementChild;)i.appendChild(this.ctrlTem.firstElementChild);i.classList.remove(Ue),i.removeAttribute("style"),["aria-disabled","aria-multiselectable","role","data-ripple"].forEach(function(e){t.element.removeAttribute(e)})},i.prototype.preRender=function(){var e=t.closest(this.element,"."+Fe);this.isNested=!1,this.templateEle=[],this.isDestroy||(this.isDestroy=!1),t.isNullOrUndefined(e)?this.element.classList.add(Ue):(e.classList.add("e-nested"),this.isNested=!0),this.enableRtl&&this.add(this.element,"e-rtl"),this.enablePersistence&&!t.isNullOrUndefined(this.expandedItems)||(this.expandedItems=[])},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.render=function(){this.initializeheaderTemplate(),this.initializeItemTemplate(),this.initialize(),this.renderControl(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);t.setStyleAttribute(this.element,{width:e,height:i});this.expandedItems.length>0&&(this.initExpand=this.expandedItems),t.attributes(this.element,{"aria-disabled":"false",role:"presentation","aria-multiselectable":"true"}),"Single"===this.expandMode&&this.element.setAttribute("aria-multiselectable","false")},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?t.select("div",this.element):null,this.renderItems(),this.initItemExpand()},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.isNullOrUndefined(this.keyModule)||this.keyModule.destroy()},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),this.isNested||this.isDestroy||t.rippleEffect(this.element,{selector:"."+Re}),this.isNested||(this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}))},i.prototype.templateParser=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},i.prototype.initializeheaderTemplate=function(){this.headerTemplate&&(this.headerTemplateFn=this.templateParser(this.headerTemplate))},i.prototype.initializeItemTemplate=function(){this.itemTemplate&&(this.itemTemplateFn=this.templateParser(this.itemTemplate))},i.prototype.getheaderTemplate=function(){return this.headerTemplateFn},i.prototype.getItemTemplate=function(){return this.itemTemplateFn},i.prototype.updateContentBlazorTemplate=function(e,i){this.itemTemplate&&t.isBlazor()&&!this.isStringTemplate&&t.updateBlazorTemplate(this.element.id+"_itemTemplate","ItemTemplate",this),e&&e.content&&t.isBlazor()&&!this.isStringTemplate&&0===e.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+i+"_content","ContentTemplate",e)},i.prototype.focusIn=function(e){e.target.parentElement.classList.add("e-item-focus")},i.prototype.focusOut=function(e){e.target.parentElement.classList.remove("e-item-focus")},i.prototype.ctrlTemplate=function(){this.ctrlTem=this.element.cloneNode(!0);var e,i=t.select("."+Xe,this.element);e=i?i.children:this.element.children;var s=[];[].slice.call(e).forEach(function(e){s.push({header:e.childElementCount>0&&e.children[0]?e.children[0]:"",content:e.childElementCount>1&&e.children[1]?e.children[1]:""}),e.parentNode.removeChild(e)}),i&&this.element.removeChild(i),this.setProperties({items:s},!0)},i.prototype.toggleIconGenerate=function(){var e=this.createElement("div",{className:Ve}),t=this.createElement("span",{className:"e-tgl-collapse-icon e-icons"});return e.appendChild(t),e},i.prototype.initItemExpand=function(){var e=this.initExpand.length;if(0!==e)if("Single"===this.expandMode)this.expandItem(!0,this.initExpand[e-1]);else for(var t=0;t<e;t++)this.expandItem(!0,this.initExpand[t])},i.prototype.renderItems=function(){var e,i,s=this,n=this.element;if(t.isNullOrUndefined(this.initExpand)&&(this.initExpand=[]),t.isNullOrUndefined(this.trgtEle)||this.ctrlTemplate(),this.dataSource.length>0)this.dataSource.forEach(function(e,l){i=s.renderInnerItem(e,l),n.appendChild(i),i.childElementCount>0&&(t.EventHandler.add(i.querySelector("."+Re),"focus",s.focusIn,s),t.EventHandler.add(i.querySelector("."+Re),"blur",s.focusOut,s))}),this.headerTemplate&&t.isBlazor()&&!this.isStringTemplate&&t.updateBlazorTemplate(this.element.id+"_headerTemplate","headerTemplate",this);else{var l=this.items;n&&l.length>0&&l.forEach(function(i,l){e=s.renderInnerItem(i,l),n.appendChild(e),i.header&&t.isBlazor()&&!s.isStringTemplate&&0===i.header.indexOf("<div>Blazor")&&t.updateBlazorTemplate(s.element.id+l+"_header","HeaderTemplate",i),e.childElementCount>0&&(t.EventHandler.add(e.querySelector("."+Re),"focus",s.focusIn,s),t.EventHandler.add(e.querySelector("."+Re),"blur",s.focusOut,s))})}},i.prototype.clickHandler=function(e){var i,s,n=this,l=e.target,o=this.getItems(),r={};if(t.closest(l,"."+He)===this.element){l.classList.add("e-target");var a=t.closest(l,"."+Be),d=t.closest(l,"."+Re),h=t.closest(l,"."+Fe);a&&(t.isNullOrUndefined(d)||t.isNullOrUndefined(h))&&(d=a.children[0],h=a.children[1]),d&&(s=t.select("."+Ve,d));var c;d?c=t.closest(d,"."+Be):h&&(c=t.closest(h,"."+Be));var p=[];i=this.getIndexByItem(a),c&&(r.item=o[this.getIndexByItem(c)]),r.originalEvent=e;!(!t.isNullOrUndefined(s)&&a.childElementCount<=1)||!t.isNullOrUndefined(h)&&t.isNullOrUndefined(t.select("."+Re+" ."+Ve,c))||(this.dataSource.length>0?(this.dataSource.forEach(function(e,t){var i=n.getItemElements()[t],s=n.contentRendering(t);i.appendChild(s)}),this.updateContentBlazorTemplate(r.item,i)):a.appendChild(this.contentRendering(i)),this.ariaAttrUpdate(a)),this.trigger("clicked",r);var u=h&&!t.isNullOrUndefined(t.select(".e-target",h)),f=h&&!t.isNullOrUndefined(t.select("."+He,h))&&t.isNullOrUndefined(t.closest(l,".e-acrdn-panel .e-accordion")),m=h&&t.isNullOrUndefined(t.select("."+He,h))||!(t.closest(l,"."+He)===this.element);if(u=u&&(f||m),l.classList.remove("e-target"),!(l.classList.contains(Fe)||l.classList.contains(qe)||u)){var g=this.element.querySelector("."+Xe),v=g?g.children:this.element.children;[].slice.call(v).forEach(function(e){e.classList.contains(_e)&&p.push(e)});var y=[].slice.call(this.element.querySelectorAll("."+Be+" [e-animate]"));if(y.length>0)for(var b=0,C=y;b<C.length;b++){var N=C[b];p.push(N.parentElement)}var E=-1!==p.indexOf(c)&&"true"===h.getAttribute("e-animate"),x=!1;if(!t.isNullOrUndefined(a)&&!t.isNullOrUndefined(d)){var O=t.select("."+Fe,a),k=t.closest(a,"."+Ue).querySelector("."+Ye);if(t.isNullOrUndefined(O))return;x=k===a,!t.isVisible(O)||E&&!c.classList.contains(ze)?(p.length>0&&"Single"===this.expandMode&&!E&&p.forEach(function(e){n.collapse(t.select("."+Fe,e)),e.classList.remove(Ye)}),this.expand(O)):this.collapse(O),t.isNullOrUndefined(k)||x||k.classList.remove(Ye)}}}},i.prototype.eleMoveFocus=function(e,i,s){var n,l=t.closest(s,"."+Be);s===i?n=("moveUp"===e?s.lastElementChild:s).querySelector("."+Re):s.classList.contains(Re)&&(l="moveUp"===e?l.previousElementSibling:l.nextElementSibling)&&(n=t.select("."+Re,l)),n&&n.focus()},i.prototype.keyActionHandler=function(e){var i=e.target,s=t.closest(e.target,Re);if(!t.isNullOrUndefined(s)||i.classList.contains(He)||i.classList.contains(Re)){var n,l=this.element;switch(e.action){case"moveUp":case"moveDown":this.eleMoveFocus(e.action,l,i);break;case"space":case"enter":n=i.nextElementSibling,!t.isNullOrUndefined(n)&&n.classList.contains(Fe)?"true"!==n.getAttribute("e-animate")&&i.click():i.click();break;case"home":case"end":("home"===e.action?l.firstElementChild.children[0]:l.lastElementChild.children[0]).focus()}}},i.prototype.headerEleGenerate=function(){var e=this.createElement("div",{className:Re,id:t.getUniqueID("acrdn_header")}),i={tabindex:"0",role:"heading","aria-expanded":"false","aria-selected":"false","aria-disabled":"false","aria-level":this.getItems().length.toString()};return t.attributes(e,i),e},i.prototype.renderInnerItem=function(e,i){var s;if(s=this.createElement("div",{className:Be}),s.id=t.getUniqueID("acrdn_item"),this.headerTemplate){var n=this.headerEleGenerate(),l=this.createElement("div",{className:je});return n.appendChild(l),t.append(this.getheaderTemplate()(e,this,"headerTemplate",this.element.id+"_headerTemplate",!1),l),s.appendChild(n),n.appendChild(this.toggleIconGenerate()),this.add(s,"e-select"),s}if(e.header&&this.angularnativeCondiCheck(e,"header")){n=this.headerEleGenerate(),l=this.createElement("div",{className:je});n.appendChild(l),n.appendChild(this.fetchElement(l,e.header,i,!0)),s.appendChild(n)}var o=t.select("."+Re,s);if(!e.expanded||t.isNullOrUndefined(i)||this.enablePersistence||-1===this.initExpand.indexOf(i)&&this.initExpand.push(i),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.addClass([s],e)})}if(e.iconCss){var r=this.createElement("div",{className:"e-acrdn-header-icon"}),a=this.createElement("span",{className:e.iconCss+" e-icons"});r.appendChild(a),t.isNullOrUndefined(o)?((o=this.headerEleGenerate()).appendChild(r),s.appendChild(o)):o.insertBefore(r,o.childNodes[0])}if(e.content&&this.angularnativeCondiCheck(e,"content")){var d=this.toggleIconGenerate();t.isNullOrUndefined(o)&&(o=this.headerEleGenerate(),s.appendChild(o)),o.appendChild(d),this.add(s,"e-select")}return s},i.prototype.angularnativeCondiCheck=function(e,i){var s="content"===i?e.content:e.header;if(this.isAngular&&!t.isNullOrUndefined(s.elementRef)){var n=s.elementRef.nativeElement.data;if(t.isNullOrUndefined(n)||""===n||-1===n.indexOf("bindings="))return!0;var l=JSON.parse(s.elementRef.nativeElement.data.replace("bindings=",""));return!(!t.isNullOrUndefined(l)&&"false"===l["ng-reflect-ng-if"])}return!0},i.prototype.fetchElement=function(e,i,s,n){var l,o;try{if(document.querySelectorAll(i).length){var r=document.querySelector(i);o=r.outerHTML.trim(),e.appendChild(r),r.style.display=""}}catch(s){"string"==typeof i&&t.isBlazor()&&0!==i.indexOf("<div>Blazor")?e.innerHTML=i:!t.isNullOrUndefined(this.trgtEle)&&i instanceof HTMLElement?(e.appendChild(i),e.firstElementChild.style.display=""):l=t.compile(i)}var a;if(!t.isNullOrUndefined(l)){var d=void 0;e.classList.contains(je)?d=this.element.id+s+"_header":e.classList.contains(qe)&&(d=this.element.id+s+"_content"),a=l({},null,null,d,this.isStringTemplate)}return t.isNullOrUndefined(a)||!(a.length>0)||t.isNullOrUndefined(a[0].tagName)&&1===a.length?0===e.childElementCount&&(e.innerHTML=i):[].slice.call(a).forEach(function(i){t.isNullOrUndefined(i.tagName)||(i.style.display=""),e.appendChild(i)}),t.isNullOrUndefined(o)||-1===this.templateEle.indexOf(i)&&this.templateEle.push(i),e},i.prototype.ariaAttrUpdate=function(e){var i=t.select("."+Re,e),s=t.select("."+Fe,e);i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id)},i.prototype.contentRendering=function(e){var i=this.createElement("div",{className:Fe+" "+We,id:t.getUniqueID("acrdn_panel")});t.attributes(i,{"aria-hidden":"true"});var s=this.createElement("div",{className:qe});return this.dataSource.length>0?(t.append(this.getItemTemplate()(this.dataSource[e],this,"itemTemplate",this.element.id+"_itemTemplate",!1),s),i.appendChild(s)):i.appendChild(this.fetchElement(s,this.items[e].content,e,!1)),i},i.prototype.expand=function(e){var i,s=this,n=this.getItems(),l=t.closest(e,"."+Be);if(!(t.isNullOrUndefined(e)||t.isVisible(e)&&"true"!==e.getAttribute("e-animate")||l.classList.contains(Ke))){var o=t.closest(l,"."+Ue).querySelector("."+Ye),r={name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing},a=t.select("."+Ve,l).firstElementChild;i={element:l,item:n[this.getIndexByItem(l)],index:this.getIndexByItem(l),content:l.querySelector("."+Fe),isExpanded:!0};var d=r.name;this.trigger("expanding",i,function(i){i.cancel||(a.classList.add(Ge),s.expandedItemsPush(l),t.isNullOrUndefined(o)||o.classList.remove(Ye),l.classList.add(Ye),"None"===r.name?(s.expandProgress("begin",a,e,l,i),s.expandProgress("end",a,e,l,i)):s.expandAnimation(d,a,e,l,r,i))})}},i.prototype.expandAnimation=function(e,i,s,n,l,o){var r,a=this;this.lastActiveItemId=n.id,"SlideDown"===e?(l.begin=function(){a.expandProgress("begin",i,s,n,o),s.style.position="absolute",r=n.offsetHeight,s.offsetHeight,s.style.maxHeight=s.offsetHeight+"px",n.style.maxHeight=""},l.progress=function(){n.style.minHeight=r+s.offsetHeight+"px"},l.end=function(){t.setStyleAttribute(s,{position:"",maxHeight:""}),n.style.minHeight="",a.expandProgress("end",i,s,n,o)}):(l.begin=function(){a.expandProgress("begin",i,s,n,o)},l.end=function(){a.expandProgress("end",i,s,n,o)}),new t.Animation(l).animate(s)},i.prototype.expandProgress=function(e,i,s,n,l){this.remove(s,We),this.add(n,ze),this.add(i,"e-expand-icon"),"end"===e&&(this.add(n,_e),s.setAttribute("aria-hidden","false"),t.attributes(s.previousElementSibling,{"aria-selected":"true","aria-expanded":"true"}),i.classList.remove(Ge),this.trigger("expanded",l))},i.prototype.expandedItemsPush=function(e){var t=this.getIndexByItem(e);-1===this.expandedItems.indexOf(t)&&this.expandedItems.push(t)},i.prototype.getIndexByItem=function(e){var t=this.getItemElements();return[].slice.call(t).indexOf(e)},i.prototype.getItemElements=function(){var e=[],t=this.element.children;return[].slice.call(t).forEach(function(t){t.classList.contains(Be)&&e.push(t)}),e},i.prototype.expandedItemsPop=function(e){var t=this.getIndexByItem(e);this.expandedItems.splice(this.expandedItems.indexOf(t),1)},i.prototype.collapse=function(e){var i,s=this,n=this.getItems(),l=t.closest(e,"."+Be);if(!t.isNullOrUndefined(e)&&t.isVisible(e)&&!l.classList.contains(Ke)){var o={name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing},r=t.select("."+Ve,l).firstElementChild;i={element:l,item:n[this.getIndexByItem(l)],index:this.getIndexByItem(l),content:l.querySelector("."+Fe),isExpanded:!1};var a=o.name;this.trigger("expanding",i,function(t){t.cancel||(s.expandedItemsPop(l),l.classList.add(Ye),r.classList.add(Ge),"None"===o.name?(s.collapseProgress("begin",r,e,l,t),s.collapseProgress("end",r,e,l,t)):s.collapseAnimation(a,e,l,r,o,t))})}},i.prototype.collapseAnimation=function(e,i,s,n,l,o){var r,a,d,h,c=this;this.lastActiveItemId=s.id,"SlideUp"===e?(l.begin=function(){d=s.offsetHeight,s.style.minHeight=d+"px",i.style.position="absolute",r=s.offsetHeight,a=i.offsetHeight,i.style.maxHeight=a+"px",c.collapseProgress("begin",n,i,s,o)},l.progress=function(){(h=r-(a-i.offsetHeight))<d&&(s.style.minHeight=h+"px")},l.end=function(){i.style.display="none",c.collapseProgress("end",n,i,s,o),s.style.minHeight="",t.setStyleAttribute(i,{position:"",maxHeight:"",display:""})}):(l.begin=function(){c.collapseProgress("begin",n,i,s,o)},l.end=function(){c.collapseProgress("end",n,i,s,o)}),new t.Animation(l).animate(i)},i.prototype.collapseProgress=function(e,i,s,n,l){this.remove(i,"e-expand-icon"),this.remove(n,ze),"end"===e&&(this.add(s,We),i.classList.remove(Ge),this.remove(n,_e),s.setAttribute("aria-hidden","true"),t.attributes(s.previousElementSibling,{"aria-selected":"false","aria-expanded":"false"}),this.trigger("expanded",l))},i.prototype.getModuleName=function(){return"accordion"},i.prototype.itemAttribUpdate=function(){var e=this.getItems(),i=this.getItemElements(),s=e.length;i.forEach(function(e){t.select("."+Re,e).setAttribute("aria-level",""+s)})},i.prototype.getItems=function(){return this.itemTemplate&&this.headerTemplate?this.dataSource:this.items},i.prototype.addItem=function(e,i){var s=this.element,n=this.getItemElements(),l=this.getItems();if(t.isNullOrUndefined(i)&&(i=l.length),s.childElementCount>=i){l.splice(i,0,e);var o=this.renderInnerItem(e,i);s.childElementCount===i?s.appendChild(o):s.insertBefore(o,n[i]),t.EventHandler.add(o.querySelector("."+Re),"focus",this.focusIn,this),t.EventHandler.add(o.querySelector("."+Re),"blur",this.focusOut,this),this.itemAttribUpdate()}this.expandedItems=[],this.expandedItemRefresh(s),e&&e.expanded&&this.expandItem(!0,i)},i.prototype.expandedItemRefresh=function(e){var t=this,i=this.getItemElements();[].slice.call(i).forEach(function(e){e.classList.contains(ze)&&t.expandedItemsPush(e)})},i.prototype.removeItem=function(e){var i=this.getItemElements()[e],s=this.getItems();t.isNullOrUndefined(i)||(this.restoreContent(e),t.detach(i),s.splice(e,1),this.itemAttribUpdate(),this.expandedItems=[],this.expandedItemRefresh(this.element))},i.prototype.select=function(e){var i=this.getItemElements()[e];t.isNullOrUndefined(i)||t.isNullOrUndefined(t.select("."+Re,i))||i.children[0].focus()},i.prototype.hideItem=function(e,i){var s=this.getItemElements()[e];t.isNullOrUndefined(s)||(t.isNullOrUndefined(i)&&(i=!0),i?this.add(s,"e-hide"):this.remove(s,"e-hide"))},i.prototype.enableItem=function(e,i){var s=this.getItemElements()[e];if(!t.isNullOrUndefined(s)){var n=s.firstElementChild;i?(this.remove(s,Ke),t.attributes(n,{tabindex:"0","aria-disabled":"false"}),n.focus()):(s.classList.contains(_e)&&(this.expandItem(!1,e),this.eleMoveFocus("movedown",this.element,n)),this.add(s,Ke),n.setAttribute("aria-disabled","true"),n.removeAttribute("tabindex"))}},i.prototype.expandItem=function(e,i){var s=this,n=(this.element,this.getItemElements());if(t.isNullOrUndefined(i))if("Single"===this.expandMode&&e){var l=n[n.length-1];this.itemExpand(e,l,this.getIndexByItem(l))}else{var o=t.select("#"+this.lastActiveItemId,this.element);[].slice.call(n).forEach(function(t){s.itemExpand(e,t,s.getIndexByItem(t)),t.classList.remove(Ye)});var r=t.select("."+Ye,this.element);r&&r.classList.remove(Ye),o&&o.classList.add(Ye)}else{l=n[i];if(t.isNullOrUndefined(l)||!l.classList.contains("e-select")||l.classList.contains(_e)&&e)return;"Single"===this.expandMode&&this.expandItem(!1),this.itemExpand(e,l,i)}},i.prototype.itemExpand=function(e,i,s){var n=i.children[1],l=this.getItems();if(!i.classList.contains(Ke)){if(t.isNullOrUndefined(n)&&e)n=this.contentRendering(s),i.appendChild(n),this.updateContentBlazorTemplate(l[s],s),this.ariaAttrUpdate(i);else if(t.isNullOrUndefined(n))return;e?this.expand(n):this.collapse(n)}},i.prototype.destroyItems=function(){this.restoreContent(null),[].slice.call(this.element.querySelectorAll("."+Be)).forEach(function(e){t.detach(e)})},i.prototype.restoreContent=function(e){var i;i=t.isNullOrUndefined(e)?this.element:this.element.querySelectorAll("."+Be)[e],this.templateEle.forEach(function(e){t.isNullOrUndefined(i.querySelector(e))||(document.body.appendChild(i.querySelector(e)).style.display="none")})},i.prototype.updateItem=function(e,i){if(!t.isNullOrUndefined(e)){var s=this.getItems(),n=s[i];s.splice(i,1),this.restoreContent(i),t.detach(e),this.addItem(n,i)}},i.prototype.getPersistData=function(){return this.addOnPersist(["expandedItems"])},i.prototype.onPropertyChanged=function(e,i){for(var s=this.element,n=!1,l=0,o=Object.keys(e);l<o.length;l++){switch(o[l]){case"items":if(e.items instanceof Array&&i.items instanceof Array)n=!0;else for(var r=Object.keys(e.items),a=0;a<r.length;a++){var d=parseInt(Object.keys(e.items)[a],10),h=Object.keys(e.items[d])[0],c=t.selectAll("."+Be,this.element)[d],p=Object(i.items[d])[h],u=Object(e.items[d])[h];("header"===h||"iconCss"===h||"expanded"===h||"content"===h&&""===p)&&this.updateItem(c,d),"cssClass"!==h||t.isNullOrUndefined(c)||(c.classList.remove(p),c.classList.add(u)),"content"!==h||t.isNullOrUndefined(c)||2!==c.children.length||(c.classList.contains(ze)&&this.expandItem(!1,d),t.detach(c.querySelector("."+Fe)))}break;case"dataSource":n=!0;break;case"headerTemplate":this.initializeheaderTemplate(),n=!0;break;case"itemTemplate":this.initializeItemTemplate(),n=!0;break;case"enableRtl":e.enableRtl?this.add(s,"e-rtl"):this.remove(s,"e-rtl");break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"expandMode":"Single"===e.expandMode?(this.element.setAttribute("aria-multiselectable","false"),this.expandedItems.length>1&&this.expandItem(!1)):this.element.setAttribute("aria-multiselectable","true")}}n&&(this.destroyItems(),this.renderItems(),this.initItemExpand())},Te([t.Collection([],Ze)],i.prototype,"items",void 0),Te([t.Property([])],i.prototype,"dataSource",void 0),Te([t.Property()],i.prototype,"itemTemplate",void 0),Te([t.Property()],i.prototype,"headerTemplate",void 0),Te([t.Property("100%")],i.prototype,"width",void 0),Te([t.Property("auto")],i.prototype,"height",void 0),Te([t.Property("Multiple")],i.prototype,"expandMode",void 0),Te([t.Complex({},Je)],i.prototype,"animation",void 0),Te([t.Event()],i.prototype,"clicked",void 0),Te([t.Event()],i.prototype,"expanding",void 0),Te([t.Event()],i.prototype,"expanded",void 0),Te([t.Event()],i.prototype,"created",void 0),Te([t.Event()],i.prototype,"destroyed",void 0),i=Te([t.NotifyPropertyChanges],i)}(t.Component),et=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),tt=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},it=function(e){function i(t,i){return e.call(this,t,i)||this}return et(i,e),i.prototype.preRender=function(){this.isMenu=!1,this.element.id=this.element.id||t.getUniqueID("ej2-contextmenu"),e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menu",tabindex:"0"}),this.element.style.zIndex=s.getZindexPartial(this.element).toString()},i.prototype.open=function(t,i,s){e.prototype.openMenu.call(this,null,null,t,i,null,s)},i.prototype.close=function(){e.prototype.closeMenu.call(this)},i.prototype.onPropertyChanged=function(t,i){e.prototype.onPropertyChanged.call(this,t,i);for(var s=0,n=Object.keys(t);s<n.length;s++){switch(n[s]){case"filter":this.close(),this.filter=t.filter;break;case"target":this.unWireEvents(i.target),this.wireEvents()}}},i.prototype.getModuleName=function(){return"contextmenu"},tt([t.Property("")],i.prototype,"target",void 0),tt([t.Property("")],i.prototype,"filter",void 0),tt([t.Collection([],Z)],i.prototype,"items",void 0),i=tt([t.NotifyPropertyChanges],i)}(ee),st=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),nt=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},lt="e-vertical",ot="e-hamburger",rt=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.tempItems=[],s}return st(i,e),i.prototype.getModuleName=function(){return"menu"},i.prototype.preRender=function(){if(this.isMenu=!0,this.element.id=this.element.id||t.getUniqueID("ej2-menu"),this.template)try{document.querySelectorAll(this.template).length&&(this.template=document.querySelector(this.template).innerHTML.trim(),this.clearChanges())}catch(e){}else this.updateMenuItems(this.items);e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menubar",tabindex:"0"}),"Vertical"===this.orientation?(this.element.classList.add(lt),this.hamburgerMode&&!this.target&&this.element.previousElementSibling.classList.add(lt),this.element.setAttribute("aria-orientation","vertical")):t.Browser.isDevice&&!this.enableScrolling&&this.element.parentElement.classList.add("e-scrollable"),this.hamburgerMode&&(this.element.parentElement.classList.add(ot),"Horizontal"===this.orientation&&this.element.classList.add("e-hide-menu"))},i.prototype.updateMenuItems=function(e){this.tempItems=e,this.items=[],this.tempItems.map(this.createMenuItems,this),this.setProperties({items:this.items},!0),this.tempItems=[]},i.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++){switch(n[s]){case"orientation":"Vertical"===t.orientation?(this.element.classList.add(lt),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.add(lt),this.element.classList.remove("e-hide-menu")),this.element.setAttribute("aria-orientation","vertical")):(this.element.classList.remove(lt),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.remove(lt),this.element.classList.add("e-hide-menu")),this.element.removeAttribute("aria-orientation"));break;case"items":Object.keys(i.items).length||this.updateMenuItems(t.items);break;case"hamburgerMode":this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),t.hamburgerMode?this.element.parentElement.classList.add(ot):this.element.parentElement.classList.remove(ot),"Vertical"===this.orientation?(this.target||this.element.previousElementSibling.classList.add(lt),this.element.classList.remove("e-hide-menu")):(this.target?this.element.previousElementSibling.classList.add(lt):this.element.previousElementSibling.classList.remove(lt),this.element.classList[t.hamburgerMode?"add":"remove"]("e-hide-menu"));break;case"title":this.hamburgerMode&&this.element.previousElementSibling&&(this.element.previousElementSibling.querySelector(".e-menu-title").innerHTML=t.title);break;case"target":this.hamburgerMode&&(this.unWireEvents(i.target),this.wireEvents(),"Horizontal"===this.orientation&&(t.target?this.element.previousElementSibling.classList.add(lt):(this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),this.element.previousElementSibling.classList.remove(lt)),this.element.classList.add("e-hide-menu")))}}e.prototype.onPropertyChanged.call(this,t,i)},i.prototype.createMenuItems=function(e){var t,i,s,n=this.items;if(t=this.getField("parentId"),e[t]){for(i=this.getIndex(e[t].toString(),!0),s=0;s<i.length;s++)n[i[s]].items||(n[i[s]].items=[]),n=n[i[s]].items;n.push(e)}else this.items.push(e)},i.prototype.open=function(){e.prototype.openHamburgerMenu.call(this)},i.prototype.close=function(){e.prototype.closeHamburgerMenu.call(this)},nt([t.Property("Horizontal")],i.prototype,"orientation",void 0),nt([t.Property("")],i.prototype,"target",void 0),nt([t.Property(null)],i.prototype,"template",void 0),nt([t.Property(!1)],i.prototype,"enableScrolling",void 0),nt([t.Property(!1)],i.prototype,"hamburgerMode",void 0),nt([t.Property("Menu")],i.prototype,"title",void 0),nt([t.Complex({},J)],i.prototype,"fields",void 0),i=nt([t.NotifyPropertyChanges],i)}(ee),at=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),dt=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},ht="e-tab-header",ct="e-content",pt="e-item",ut="e-active",ft="e-disable",mt="e-hidden",gt="e-close-icon",vt="e-tab-wrap",yt="e-toolbar-items",bt="e-toolbar-item",Ct="e-toolbar-popup",Nt="e-progress",Et="e-vertical",xt="e-vertical-right",Ot=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return at(i,e),dt([t.Property("SlideLeftIn")],i.prototype,"effect",void 0),dt([t.Property(600)],i.prototype,"duration",void 0),dt([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return at(i,e),dt([t.Complex({effect:"SlideLeftIn",duration:600,easing:"ease"},Ot)],i.prototype,"previous",void 0),dt([t.Complex({effect:"SlideRightIn",duration:600,easing:"ease"},Ot)],i.prototype,"next",void 0),i}(t.ChildProperty),St=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return at(i,e),dt([t.Property("")],i.prototype,"text",void 0),dt([t.Property("")],i.prototype,"iconCss",void 0),dt([t.Property("left")],i.prototype,"iconPosition",void 0),i}(t.ChildProperty),wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return at(i,e),dt([t.Complex({},St)],i.prototype,"header",void 0),dt([t.Property(null)],i.prototype,"headerTemplate",void 0),dt([t.Property("")],i.prototype,"content",void 0),dt([t.Property("")],i.prototype,"cssClass",void 0),dt([t.Property(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),Lt=function(e){function i(i,s){var n=e.call(this,i,s)||this;return n.show={},n.hide={},n.animateOptions={},n.animObj=new t.Animation(n.animateOptions),n.maxHeight=0,n.title="Close",n.lastIndex=0,n.isAdd=!1,n.isIconAlone=!1,n.resizeContext=n.refreshActElePosition.bind(n),n.keyConfigs={tab:"tab",home:"home",end:"end",enter:"enter",space:"space",delete:"delete",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"},n}return at(i,e),i.prototype.destroy=function(){var i=this;if(t.isNullOrUndefined(this.tbObj)||this.tbObj.destroy(),this.unWireEvents(),["role","aria-disabled","aria-activedescendant","tabindex","aria-orientation"].forEach(function(e){i.element.removeAttribute(e)}),this.expTemplateContent(),this.isTemplate){var s=t.select(".e-tab > ."+ct,this.element);this.element.classList.remove("e-template"),t.isNullOrUndefined(s)||(s.innerHTML=this.cnt)}else for(;this.element.firstElementChild;)t.remove(this.element.firstElementChild);e.prototype.destroy.call(this),this.trigger("destroyed")},i.prototype.preRender=function(){var e=t.closest(this.element,"."+ct);this.prevIndex=0,this.isNested=!1,this.isPopup=!1,this.initRender=!0,this.isSwipeed=!1,this.itemIndexArray=[],this.templateEle=[],t.isNullOrUndefined(e)||(e.parentElement.classList.add("e-nested"),this.isNested=!0);var i=t.Browser.info.name,s="msie"===i?"e-ie":"edge"===i?"e-edge":"safari"===i?"e-safari":"";t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.setCssClass(this.element,this.cssClass,!0),t.attributes(this.element,{role:"tablist","aria-disabled":"false","aria-activedescendant":""}),this.setCssClass(this.element,s,!0),this.updatePopAnimationConfig()},i.prototype.render=function(){this.btnCls=this.createElement("span",{className:"e-icons "+gt,attrs:{title:this.title}}),this.renderContainer(),this.wireEvents(),this.initRender=!1,t.isBlazor()&&this.renderComplete()},i.prototype.renderContainer=function(){var e=this.element;if(this.items.length>0&&0===e.children.length)e.appendChild(this.createElement("div",{className:ct})),this.setOrientation(this.headerPlacement,this.createElement("div",{className:ht})),this.isTemplate=!1;else if(this.element.children.length>0){this.isTemplate=!0,e.classList.add("e-template");var i=e.querySelector("."+ht);i&&"Bottom"===this.headerPlacement&&this.setOrientation(this.headerPlacement,i)}if(!t.isNullOrUndefined(t.select("."+ht,this.element))&&!t.isNullOrUndefined(t.select("."+ct,this.element))){if(this.renderHeader(),this.tbItems=t.select("."+ht+" ."+yt,this.element),t.isNullOrUndefined(this.tbItems)||t.rippleEffect(this.tbItems,{selector:".e-tab-wrap"}),this.renderContent(),t.selectAll("."+bt,this.element).length>0){var s=void 0;this.tbItems=t.select("."+ht+" ."+yt,this.element),this.bdrLine=this.createElement("div",{className:"e-indicator e-hidden e-ignore"}),s=t.select("."+this.scrCntClass,this.tbItems),t.isNullOrUndefined(s)?this.tbItems.insertBefore(this.bdrLine,this.tbItems.firstChild):s.insertBefore(this.bdrLine,s.firstChild),this.setContentHeight(!0),this.select(this.selectedItem)}this.setRTL(this.enableRtl)}},i.prototype.renderHeader=function(){var e=this,i=this.headerPlacement,s=[];if(this.hdrEle=t.select("."+ht,this.element),this.addVerticalClass(),this.isTemplate){this.element.children.length>1&&this.element.children[1].classList.contains(ht)&&this.setProperties({headerPlacement:"Bottom"},!0);for(var n=this.hdrEle.children.length,l=[],o=0;o<n;o++)l.push(this.hdrEle.children.item(o).innerHTML);if(n>0){for(;this.hdrEle.firstElementChild;)t.detach(this.hdrEle.firstElementChild);this.hdrEle.appendChild(this.createElement("div",{className:"e-items"})),l.forEach(function(i,s){e.lastIndex=s;var n={className:pt,id:"e-item_"+s,attrs:{role:"tab","aria-controls":ct+"_"+s,"aria-selected":"false"}},l=e.createElement("span",{className:"e-tab-text",innerHTML:i,attrs:{role:"presentation"}}).outerHTML,o=e.createElement("div",{className:"e-text-wrap",innerHTML:l+e.btnCls.outerHTML}).outerHTML,r=e.createElement("div",{className:vt,innerHTML:o,attrs:{tabIndex:"-1"}});t.select(".e-items",e.element).appendChild(e.createElement("div",n)),t.selectAll(".e-item",e.element)[s].appendChild(r)})}}else s=this.parseObject(this.items,0);this.tbObj=new Pe({width:"Left"===i||"Right"===i?"auto":"100%",height:"Left"===i||"Right"===i?"100%":"auto",overflowMode:this.overflowMode,items:0!==s.length?s:[],clicked:this.clickHandler.bind(this),scrollStep:this.scrollStep}),this.tbObj.isStringTemplate=!0,this.tbObj.createElement=this.createElement,this.tbObj.appendTo(this.hdrEle);for(o=0;o<this.items.length;o++){var r=this.items[o];r.headerTemplate&&t.isBlazor()&&!this.isStringTemplate&&0===r.headerTemplate.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+o+"_headerTemplate","HeaderTemplate",r)}this.updateOrientationAttribute(),this.setCloseButton(this.showCloseButton)},i.prototype.renderContent=function(){this.cntEle=t.select("."+ct,this.element);var e=t.selectAll("."+bt,this.element);if(this.isTemplate){this.cnt=this.cntEle.children.length>0?this.cntEle.innerHTML:"";for(var i=this.cntEle.children,s=0;s<e.length;s++)i.length-1>=s&&(i.item(s).className+=pt,t.attributes(i.item(s),{role:"tabpanel","aria-labelledby":"e-item_"+s}),i.item(s).id=ct+"_"+s)}},i.prototype.reRenderItems=function(){this.renderContainer(),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)}))},i.prototype.parseObject=function(e,i){var s,n=this,l=t.selectAll("."+bt,this.element).length,o=[],r=[];return e.forEach(function(e,a){var d=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconPosition)?"":e.header.iconPosition,h=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconCss)?"":e.header.iconCss;if(t.isNullOrUndefined(e.headerTemplate)&&(t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.text)||0===e.header.text.length&&""===h))r.push(a);else{var c=e.headerTemplate||e.header.text;n.lastIndex=0===l?a:n.isReplace?i+a:n.lastIndex+1;var p=e.disabled?" e-disable e-overlay":"";s=n.createElement("div",{className:"e-tab-text",attrs:{role:"presentation"}});var u=c instanceof Object?c.outerHTML:c,f=!t.isNullOrUndefined(u)&&""!==u;t.isNullOrUndefined(c.tagName)?n.headerTextCompile(s,c,a):s.appendChild(c);var m=n.createElement("span",{className:"e-icons e-tab-icon e-icon-"+d+" "+h}),g=n.createElement("div",{className:"e-text-wrap"});g.appendChild(s),""!==c&&void 0!==c&&""!==h?("left"===d||"top"===d?g.insertBefore(m,g.firstElementChild):g.appendChild(m),s,n.isIconAlone=!1):(""===h?s:m)===m&&(t.detach(s),g.appendChild(m),n.isIconAlone=!0);var v=e.disabled?{}:{tabIndex:"-1"};g.appendChild(n.btnCls.cloneNode(!0));var y=n.createElement("div",{className:vt,attrs:v});y.appendChild(g),n.itemIndexArray===[]?n.itemIndexArray.push("e-item_"+n.lastIndex):n.itemIndexArray.splice(i+a,0,"e-item_"+n.lastIndex);var b={htmlAttributes:{id:"e-item_"+n.lastIndex,role:"tab","aria-selected":"false"},template:y};b.cssClass=e.cssClass+" "+p+" "+(""!==h?"e-i"+d:"")+" "+(f?"":"e-icon"),"top"!==d&&"bottom"!==d||n.element.classList.add("e-vertical-icon"),o.push(b),a++}}),this.isAdd||r.forEach(function(e){n.items.splice(e,1)}),this.isIconAlone?this.element.classList.add("e-icon-tab"):this.element.classList.remove("e-icon-tab"),o},i.prototype.removeActiveClass=function(e){var i=t.selectAll(":root ."+ht+" ."+bt+"."+ut,this.element)[0],s=t.select("."+ht,this.element);"Bottom"===this.headerPlacement&&(i=t.selectAll(":root ."+ht+" ."+bt+"."+ut,s)[0]),t.isNullOrUndefined(i)||i.classList.remove(ut)},i.prototype.checkPopupOverflow=function(e){this.tbPop=t.select(".e-toolbar-pop",this.element);var i=t.select(".e-hor-nav",this.element),s=t.select("."+yt,this.element),n=s.lastChild,l=!1;return!this.isVertical()&&(this.enableRtl&&i.offsetLeft+i.offsetWidth>s.offsetLeft||!this.enableRtl&&i.offsetLeft<s.offsetWidth)?l=!0:this.isVertical()&&i.offsetTop<n.offsetTop+n.offsetHeight&&(l=!0),l&&(e.classList.add(Ct),this.tbPop.insertBefore(e.cloneNode(!0),t.selectAll("."+Ct,this.tbPop)[0]),e.outerHTML=""),!0},i.prototype.popupHandler=function(e){var i=e.querySelector(".e-ripple-element");t.isNullOrUndefined(i)||(i.outerHTML="",e.querySelector("."+vt).classList.remove("e-ripple")),this.tbItem=t.selectAll("."+yt+" ."+bt,this.hdrEle);var s=this.tbItem[this.tbItem.length-1];if(0!==this.tbItem.length){if(e.classList.remove(Ct),e.removeAttribute("style"),this.tbItems.appendChild(e.cloneNode(!0)),this.actEleId=e.id,e.outerHTML="",this.checkPopupOverflow(s)){var n=this.tbItems.lastChild.previousElementSibling;this.checkPopupOverflow(n)}this.isPopup=!0}return t.selectAll("."+bt,this.tbItems).length-1},i.prototype.updateOrientationAttribute=function(){t.attributes(this.element,{"aria-orientation":this.isVertical()?"vertical":"horizontal"})},i.prototype.setCloseButton=function(e){var i=t.select("."+ht,this.element);!0===e?i.classList.add("e-close-show"):i.classList.remove("e-close-show"),this.tbObj.refreshOverflow(),this.refreshActElePosition()},i.prototype.prevCtnAnimation=function(e,t){this.enableRtl||this.element.classList.contains("e-rtl");return this.isPopup||e<=t?"SlideLeftIn"===this.animation.previous.effect?{name:"SlideLeftOut",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}:null:"SlideRightIn"===this.animation.next.effect?{name:"SlideRightOut",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}:null},i.prototype.triggerPrevAnimation=function(e,i){var s=this,n=this.prevCtnAnimation(i,this.selectedItem);t.isNullOrUndefined(n)?e.classList.remove(ut):(n.begin=function(){t.setStyleAttribute(e,{position:"absolute"}),e.classList.add(Nt),e.classList.add("e-view")},n.end=function(){e.style.display="none",e.classList.remove(ut),e.classList.remove(Nt),e.classList.remove("e-view"),t.setStyleAttribute(e,{display:"",position:""}),0!==e.childNodes.length||s.isTemplate||t.detach(e)},new t.Animation(n).animate(e))},i.prototype.triggerAnimation=function(e,i){var s,n=this,l=this.prevIndex;[].slice.call(this.element.querySelector("."+ct).children).forEach(function(e){e.id===n.prevActiveEle&&(s=e)});var o=this.tbItem[l],r=this.extIndex(this.tbItem[this.selectedItem].id),a=this.getTrgContent(this.cntEle,r);if(t.isNullOrUndefined(s)&&!t.isNullOrUndefined(o)){var d=this.extIndex(o.id);s=this.getTrgContent(this.cntEle,d)}if(this.prevActiveEle=a.id,this.initRender||!1===i||this.animation==={}||t.isNullOrUndefined(this.animation))s&&s!==a&&s.classList.remove(ut);else{var h,c=t.select("."+ct,this.element);if(this.prevIndex>this.selectedItem&&!this.isPopup){var p=this.animation.previous.effect;h={name:"None"===p?"":"SlideLeftIn"!==p?p:"SlideLeftIn",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}}else if(this.isPopup||this.prevIndex<this.selectedItem||this.prevIndex===this.selectedItem){var u=this.animation.next.effect;h={name:"None"===u?"":"SlideRightIn"!==u?u:"SlideRightIn",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}}h.progress=function(){c.classList.add(Nt),n.setActiveBorder()},h.end=function(){c.classList.remove(Nt),a.classList.add(ut)},this.initRender||t.isNullOrUndefined(s)||this.triggerPrevAnimation(s,l),this.isPopup=!1,""===h.name?a.classList.add(ut):new t.Animation(h).animate(a)}},i.prototype.keyPressed=function(e){var i=t.closest(e,"."+ht+" ."+bt),s=this.getEleIndex(i);!t.isNullOrUndefined(this.popEle)&&e.classList.contains("e-hor-nav")?this.popEle.classList.contains("e-popup-open")?this.popObj.hide(this.hide):this.popObj.show(this.show):e.classList.contains("e-scroll-nav")?e.click():t.isNullOrUndefined(i)||!1!==i.classList.contains(ut)||(this.select(s),t.isNullOrUndefined(this.popEle)||this.popObj.hide(this.hide))},i.prototype.getEleIndex=function(e){return Array.prototype.indexOf.call(t.selectAll("."+ht+" ."+bt,this.element),e)},i.prototype.extIndex=function(e){return e.replace("e-item_","")},i.prototype.expTemplateContent=function(){var e=this;this.templateEle.forEach(function(i){t.isNullOrUndefined(e.element.querySelector(i))||(document.body.appendChild(e.element.querySelector(i)).style.display="none")})},i.prototype.templateCompile=function(e,i,s){var n=this.createElement("div");if(this.compileElement(n,i,"content",s),0!==n.childNodes.length){e.appendChild(n);var l=this.items[s];t.isNullOrUndefined(l)||l.content&&t.isBlazor()&&!this.isStringTemplate&&0===l.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+s+"_content","ContentTemplate",l)}},i.prototype.compileElement=function(e,i,s,n){var l;"string"==typeof i&&t.isBlazor()&&0!==i.indexOf("<div>Blazor")?(i=i.trim(),e.innerHTML=i):l=t.compile(i);var o;t.isNullOrUndefined(l)||(o=t.isBlazor()&&!this.isStringTemplate&&0===i.indexOf("<div>Blazor")?l({},this,s,this.element.id+n+"_"+s,this.isStringTemplate):l({},this,s)),!t.isNullOrUndefined(l)&&o.length>0&&[].slice.call(o).forEach(function(t){e.appendChild(t)})},i.prototype.headerTextCompile=function(e,t,i){this.compileElement(e,t,"headerTemplate",i)},i.prototype.getContent=function(e,i,s,n){var l;if("string"==typeof i||t.isNullOrUndefined(i.innerHTML))if("."===i[0]||"#"===i[0])if(document.querySelectorAll(i).length){var o=document.querySelector(i);l=o.outerHTML.trim(),"clone"===s?e.appendChild(o.cloneNode(!0)):(e.appendChild(o),o.style.display="")}else this.templateCompile(e,i,n);else this.templateCompile(e,i,n);else e.appendChild(i);t.isNullOrUndefined(l)||-1===this.templateEle.indexOf(i.toString())&&this.templateEle.push(i.toString())},i.prototype.getTrgContent=function(e,i){return this.element.classList.contains("e-nested")?t.select(".e-nested> .e-content > #e-content_"+i,this.element):this.findEle(e.children,ct+"_"+i)},i.prototype.findEle=function(e,t){for(var i,s=0;s<e.length;s++)if(e[s].id===t){i=e[s];break}return i},i.prototype.isVertical=function(){var e="Left"===this.headerPlacement||"Right"===this.headerPlacement;return this.scrCntClass=e?"e-vscroll-content":"e-hscroll-content",e},i.prototype.addVerticalClass=function(){if(this.isVertical()){var e="Left"===this.headerPlacement?"e-vertical-left":xt;t.addClass([this.hdrEle],[Et,e]),this.element.classList.add("e-vertical-tab")}"Bottom"===this.headerPlacement&&this.hdrEle.classList.add("e-horizontal-bottom")},i.prototype.updatePopAnimationConfig=function(){this.show={name:this.isVertical()?"FadeIn":"SlideDown",duration:100},this.hide={name:this.isVertical()?"FadeOut":"SlideUp",duration:100}},i.prototype.changeOrientation=function(e){this.setOrientation(e,this.hdrEle);var i=!!this.hdrEle.classList.contains(Et);t.removeClass([this.element],["e-vertical-tab"]),t.removeClass([this.hdrEle],[Et,"e-vertical-left",xt]),i!==this.isVertical()&&(this.tbObj.setProperties({height:this.isVertical()?"100%":"auto",width:this.isVertical()?"auto":"100%"},!0),this.tbObj.changeOrientation(),this.updatePopAnimationConfig()),this.addVerticalClass(),this.updateOrientationAttribute(),this.select(this.selectedItem)},i.prototype.setOrientation=function(e,i){var s=Array.prototype.indexOf.call(this.element.children,i),n=Array.prototype.indexOf.call(this.element.children,this.element.querySelector("."+ct));"Bottom"===e&&n>s?this.element.appendChild(i):this.element.insertBefore(i,t.select("."+ct,this.element))},i.prototype.setCssClass=function(e,t,i){if(""!==t)for(var s=t.split(" "),n=0;n<s.length;n++)i?e.classList.add(s[n]):e.classList.remove(s[n])},i.prototype.setContentHeight=function(e){if(!t.isNullOrUndefined(this.cntEle)){var i=t.select("."+ht,this.element);if("None"===this.heightAdjustMode){if("auto"===this.height)return;this.isVertical()||t.setStyleAttribute(this.cntEle,{height:this.element.offsetHeight-i.offsetHeight+"px"})}else if("Fill"===this.heightAdjustMode)t.setStyleAttribute(this.element,{height:"100%"}),t.setStyleAttribute(this.cntEle,{height:"auto"});else if("Auto"===this.heightAdjustMode){var s=t.selectAll(".e-content > .e-item",this.element);if(!0===this.isTemplate)for(var n=0;n<s.length;n++)s[n].setAttribute("style","display:block; visibility: visible"),this.maxHeight=Math.max(this.maxHeight,this.getHeight(s[n])),s[n].style.removeProperty("display"),s[n].style.removeProperty("visibility");else{this.cntEle=t.select("."+ct,this.element),!0===e&&this.cntEle.appendChild(this.createElement("div",{id:ct+"_0",className:"e-item "+ut,attrs:{role:"tabpanel","aria-labelledby":"e-item_0"}}));var l=this.cntEle.children.item(0);for(n=0;n<this.items.length;n++)for(this.getContent(l,this.items[n].content,"clone",n),this.maxHeight=Math.max(this.maxHeight,this.getHeight(l));l.firstChild;)l.removeChild(l.firstChild);this.clearTemplate(["content"]),this.templateEle=[],this.getContent(l,this.items[0].content,"render",0),l.classList.remove(ut)}t.setStyleAttribute(this.cntEle,{height:this.maxHeight+"px"})}else t.setStyleAttribute(this.cntEle,{height:"auto"})}},i.prototype.getHeight=function(e){var t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.getPropertyValue("padding-top"))+parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))},i.prototype.setActiveBorder=function(){var e,i,s,n;if("Bottom"===this.headerPlacement?(n=t.select("."+ht,this.element),e=t.select("."+bt+"."+ut,n)):(n=t.select("."+ht,this.element),e=t.select("."+bt+"."+ut,this.element)),null!==e){var l=t.closest(e,".e-tab");if(this.element===l){if(this.tbItems=t.select("."+yt,n),i=t.select(".e-indicator",n),s=t.select("."+yt+" ."+this.scrCntClass,n),this.isVertical()){t.setStyleAttribute(i,{left:"",right:""});0!==(t.isNullOrUndefined(s)?this.tbItems.offsetHeight:s.offsetHeight)?t.setStyleAttribute(i,{top:e.offsetTop+"px",height:e.offsetHeight+"px"}):t.setStyleAttribute(i,{top:0,height:0})}else{t.setStyleAttribute(i,{top:"",height:""});var o=t.isNullOrUndefined(s)?this.tbItems.offsetWidth:s.offsetWidth;0!==o?t.setStyleAttribute(i,{left:e.offsetLeft+"px",right:o-(e.offsetLeft+e.offsetWidth)+"px"}):t.setStyleAttribute(i,{left:"auto",right:"auto"})}t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.remove(mt)}}},i.prototype.setActive=function(e){this.tbItem=t.selectAll("."+ht+" ."+bt,this.element);var i=this.tbItem[e];if(e>=0&&this.setProperties({selectedItem:e},!0),!(e<0||isNaN(e)||0===this.tbItem.length))if(i.classList.contains(ut))this.setActiveBorder();else{if(!this.isTemplate){var s=this.tbItem[this.prevIndex];t.isNullOrUndefined(s)||s.removeAttribute("aria-controls"),t.attributes(i,{"aria-controls":ct+"_"+e})}var n=i.id;this.removeActiveClass(n),i.classList.add(ut),i.setAttribute("aria-selected","true");var l=Number(this.extIndex(n));if(t.isNullOrUndefined(this.prevActiveEle)&&(this.prevActiveEle=ct+"_"+l),t.attributes(this.element,{"aria-activedescendant":n}),this.isTemplate){if(t.select("."+ct,this.element).children.length>0){var o=this.findEle(t.select("."+ct,this.element).children,ct+"_"+l);t.isNullOrUndefined(o)||o.classList.add(ut),this.triggerAnimation(n,this.enableAnimation)}}else{this.cntEle=t.select(".e-tab > ."+ct,this.element);var r=this.getTrgContent(this.cntEle,this.extIndex(n));if(t.isNullOrUndefined(r)){this.cntEle.appendChild(this.createElement("div",{id:ct+"_"+this.extIndex(n),className:"e-item "+ut,attrs:{role:"tabpanel","aria-labelledby":"e-item_"+this.extIndex(n)}}));var a=this.getTrgContent(this.cntEle,this.extIndex(n)),d=Array.prototype.indexOf.call(this.itemIndexArray,i.id);this.getContent(a,this.items[d].content,"render",d)}else r.classList.add(ut);this.triggerAnimation(n,this.enableAnimation)}this.setActiveBorder();var h=t.select("."+ht+" #"+n,this.element);this.refreshItemVisibility(h),this.initRender||h.firstChild.focus();var c={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:i,selectedIndex:e,selectedContent:t.select("#e-content_"+this.selectingID,this.content),isSwiped:this.isSwipeed};this.initRender&&0===this.selectedItem||this.trigger("selected",c)}},i.prototype.setItems=function(e){this.isReplace=!0,this.tbItems=t.select("."+ht+" ."+yt,this.element),this.tbObj.items=this.parseObject(e,0),this.tbObj.dataBind(),this.isReplace=!1},i.prototype.setRTL=function(e){this.tbObj.enableRtl=e,this.tbObj.dataBind(),this.setCssClass(this.element,"e-rtl",e),this.refreshActiveBorder()},i.prototype.refreshActiveBorder=function(){t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add(mt),this.setActiveBorder()},i.prototype.showPopup=function(e){var i=t.select(".e-popup.e-toolbar-pop",this.hdrEle);if(i.classList.contains("e-popup-close")){var s=i&&i.ej2_instances[0];s.position.X="Left"===this.headerPlacement?"left":"right",s.dataBind(),s.show(e)}},i.prototype.wireEvents=function(){window.addEventListener("resize",this.resizeContext),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"keydown",this.spaceKeyDown,this),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)})),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:this.keyConfigs}),this.tabKeyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:{openPopup:"shift+f10",tab:"tab",shiftTab:"shift+tab"},eventName:"keydown"})},i.prototype.unWireEvents=function(){this.keyModule.destroy(),this.tabKeyModule.destroy(),t.isNullOrUndefined(this.cntEle)||this.touchModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"keydown",this.spaceKeyDown),this.element.classList.remove("e-rtl"),this.element.classList.remove("e-focused")},i.prototype.clickHandler=function(e){this.element.classList.remove("e-focused");var i=e.originalEvent.target,s=t.closest(i,"."+bt),n=this.getEleIndex(s);i.classList.contains(gt)?this.removeTab(n):this.isVertical()&&t.closest(i,".e-hor-nav")?this.showPopup(this.show):(this.isPopup=!1,t.isNullOrUndefined(s)||n===this.selectedItem||this.select(n))},i.prototype.swipeHandler=function(e){if(!(e.velocity<3&&t.isNullOrUndefined(e.originalEvent.changedTouches))){if(this.isSwipeed=!0,"Right"===e.swipeDirection&&0!==this.selectedItem){for(var i=this.selectedItem-1;i>=0;i--)if(!this.tbItem[i].classList.contains(mt)){this.select(i);break}}else if("Left"===e.swipeDirection&&this.selectedItem!==t.selectAll("."+bt,this.element).length-1)for(var s=this.selectedItem+1;s<this.tbItem.length;s++)if(!this.tbItem[s].classList.contains(mt)){this.select(s);break}this.isSwipeed=!1}},i.prototype.spaceKeyDown=function(e){if(32===e.keyCode&&32===e.which||35===e.keyCode&&35===e.which){var i=t.closest(e.target,"."+ht);t.isNullOrUndefined(i)||e.preventDefault()}},i.prototype.keyHandler=function(e){if(!this.element.classList.contains(ft)){this.element.classList.add("e-focused");var i=e.target,s=t.select("."+ht+" ."+ut,this.element);t.selectAll("."+bt+":not(."+Ct+")",this.element);switch(this.popEle=t.select("."+ht+" .e-toolbar-pop",this.element),t.isNullOrUndefined(this.popEle)||(this.popObj=this.popEle.ej2_instances[0]),e.action){case"space":case"enter":if(i.parentElement.classList.contains(ft))return;if("enter"===e.action&&i.classList.contains("e-hor-nav")){this.showPopup(this.show);break}this.keyPressed(i);break;case"tab":case"shiftTab":i.classList.contains(vt)&&!1===t.closest(i,"."+bt).classList.contains(ut)&&i.setAttribute("tabindex","-1"),this.popObj&&t.isVisible(this.popObj.element)&&this.popObj.hide(this.hide),s.children.item(0).setAttribute("tabindex","0");break;case"moveLeft":case"moveRight":var n=t.closest(document.activeElement,"."+bt);t.isNullOrUndefined(n)||this.refreshItemVisibility(n);break;case"openPopup":e.preventDefault(),!t.isNullOrUndefined(this.popEle)&&this.popEle.classList.contains("e-popup-close")&&this.popObj.show(this.show);break;case"delete":var l=t.closest(i,"."+bt);if(!0===this.showCloseButton&&!t.isNullOrUndefined(l)){var o=l.nextSibling;!t.isNullOrUndefined(o)&&o.classList.contains(bt)&&o.firstChild.focus(),this.removeTab(this.getEleIndex(l))}this.setActiveBorder()}}},i.prototype.refreshActElePosition=function(){var e=t.select("."+bt+"."+Ct+"."+ut,this.element);t.isNullOrUndefined(e)||this.select(this.getEleIndex(e)),this.refreshActiveBorder()},i.prototype.refreshItemVisibility=function(e){var i=t.select("."+this.scrCntClass,this.tbItems);if(!this.isVertical()&&!t.isNullOrUndefined(i)){var s=t.select(".e-hscroll-bar",this.tbItems),n=s.scrollLeft,l=n+s.offsetWidth,o=e.offsetLeft,r=e.offsetWidth,a=e.offsetLeft+e.offsetWidth;if(n<o&&l<a){var d=l-o;s.scrollLeft=n+(r-d)}else if(n>o&&l>a){d=a-n;s.scrollLeft=n-(r-d)}}},i.prototype.hoverHandler=function(e){var i=e.target;!t.isNullOrUndefined(i.classList)&&i.classList.contains(gt)&&i.setAttribute("title",new t.L10n("tab",{closeButtonTitle:this.title},this.locale).getConstant("closeButtonTitle"))},i.prototype.evalOnPropertyChangeItems=function(e,i){if(e.items instanceof Array&&i.items instanceof Array)if(this.lastIndex=0,t.isNullOrUndefined(this.tbObj))this.reRenderItems();else{this.setItems(e.items),this.templateEle.length>0&&this.expTemplateContent(),this.templateEle=[];for(var s=t.select(".e-tab > ."+ct,this.element);s.firstElementChild;)t.detach(s.firstElementChild);this.select(this.selectedItem)}else for(var n=Object.keys(e.items),l=0;l<n.length;l++){var o=parseInt(Object.keys(e.items)[l],10),r=Object.keys(e.items[o])[0],a=Object(i.items[o])[r],d=Object(e.items[o])[r],h=t.select("."+yt+" #"+pt+"_"+o,this.element),c=t.select(".e-content #e-content_"+o,this.element);if("header"===r||"headerTemplate"===r){var p=t.isNullOrUndefined(this.items[o].header)||t.isNullOrUndefined(this.items[o].header.iconCss)?"":this.items[o].header.iconCss;if(""===(this.items[o].headerTemplate||this.items[o].header.text)&&""===p)this.removeTab(o);else{var u=[];u.push(this.items[o]),this.items.splice(o,1),this.itemIndexArray.splice(o,1),this.tbObj.items.splice(o,1);var f=h.classList.contains(mt);t.detach(h),this.isReplace=!0,this.addTab(u,o),f&&this.hideTab(o),this.isReplace=!1}}if("content"===r&&!t.isNullOrUndefined(c)){if(("string"==typeof d||t.isNullOrUndefined(d.innerHTML))&&("."===d[0]||"#"===d[0])&&d.length){var m=document.querySelector(d);c.appendChild(m),m.style.display=""}else""===d&&"#"===a[0]?(document.body.appendChild(this.element.querySelector(a)).style.display="none",c.innerHTML=d):c.innerHTML=d}"cssClass"===r&&(t.isNullOrUndefined(h)||(h.classList.remove(a),h.classList.add(d)),t.isNullOrUndefined(c)||(c.classList.remove(a),c.classList.add(d))),"disabled"===r&&this.enableTab(o,!0!==d)}},i.prototype.enableTab=function(e,i){var s=t.selectAll("."+bt,this.element)[e];t.isNullOrUndefined(s)||(!0===i?(s.classList.remove(ft,"e-overlay"),s.firstChild.setAttribute("tabindex","-1")):(s.classList.add(ft,"e-overlay"),s.firstChild.removeAttribute("tabindex"),s.classList.contains(ut)&&this.select(e+1)),t.isNullOrUndefined(this.items[e])||(this.items[e].disabled=!i,this.dataBind()),s.setAttribute("aria-disabled",!0===i?"false":"true"))},i.prototype.addTab=function(e,t){var i=this,s={addedItems:e,cancel:!1};this.isReplace?this.addingTabContent(e,t):this.trigger("adding",s,function(s){s.cancel||i.addingTabContent(e,t)})},i.prototype.addingTabContent=function(e,i){var s=this,n=0;if(this.hdrEle=t.select("."+ht,this.element),t.isNullOrUndefined(this.hdrEle))this.items=e,this.reRenderItems();else{var l=t.selectAll("."+bt,this.element).length;if(0!==l&&(n=this.lastIndex+1),t.isNullOrUndefined(i)&&(i=l-1),l<i||i<0||isNaN(i))return;0!==l||t.isNullOrUndefined(this.hdrEle)||(this.hdrEle.style.display=""),t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add(mt),this.tbItems=t.select("."+ht+" ."+yt,this.element),this.isAdd=!0;var o=this.parseObject(e,i);this.isAdd=!1;var r,a=0;e.forEach(function(e,l){if(r=e.headerTemplate||e.header.text,t.isNullOrUndefined(e.headerTemplate||e.header)||t.isNullOrUndefined(r)||0===r.length&&t.isNullOrUndefined(e.header.iconCss)||(s.items.splice(i+a,0,e),a++),s.isTemplate&&!t.isNullOrUndefined(e.header)&&!t.isNullOrUndefined(e.header.text)){var o=n+l,d=s.createElement("div",{id:ct+"_"+o,className:pt,attrs:{role:"tabpanel","aria-labelledby":"e-item_"+o}});s.cntEle.insertBefore(d,s.cntEle.children[i+l]);var h=s.getTrgContent(s.cntEle,o.toString());s.getContent(h,e.content,"render",i)}}),this.tbObj.addItems(o,i),this.isReplace||this.trigger("added",{addedItems:e}),this.selectedItem===i?this.select(i):this.setActiveBorder()}},i.prototype.removeTab=function(e){var i=this,s=t.selectAll("."+bt,this.element)[e];if(!t.isNullOrUndefined(s)){var n={removedItem:s,removedIndex:e,cancel:!1};this.trigger("removing",n,function(n){if(!n.cancel){i.tbObj.removeItems(e),i.items.splice(e,1),i.itemIndexArray.splice(e,1),i.refreshActiveBorder();var l=t.select("#e-content_"+i.extIndex(s.id),t.select("."+ct,i.element));t.isNullOrUndefined(l)||t.detach(l),i.trigger("removed",n),s.classList.contains(ut)&&(e=e>t.selectAll("."+bt+":not(."+Ct+")",i.element).length-1?e-1:e,i.enableAnimation=!1,i.selectedItem=e,i.select(e)),0===t.selectAll("."+bt,i.element).length&&(i.hdrEle.style.display="none"),i.enableAnimation=!0}})}},i.prototype.hideTab=function(e,i){var s,n=t.selectAll("."+bt,this.element)[e];if(!t.isNullOrUndefined(n)){if(t.isNullOrUndefined(i)&&(i=!0),this.bdrLine.classList.add(mt),!0===i)if(n.classList.add(mt),0!==(s=t.selectAll("."+bt+":not(."+mt+")",this.tbItems)).length&&n.classList.contains(ut)){if(0!==e)for(var l=e-1;l>=0;l--){if(!this.tbItem[l].classList.contains(mt)){this.select(l);break}if(0===l)for(var o=e+1;o<this.tbItem.length;o++)if(!this.tbItem[o].classList.contains(mt)){this.select(o);break}}else for(o=e+1;o<this.tbItem.length;o++)if(!this.tbItem[o].classList.contains(mt)){this.select(o);break}}else 0===s.length&&this.element.classList.add(mt);else this.element.classList.remove(mt),0===(s=t.selectAll("."+bt+":not(."+mt+")",this.tbItems)).length&&this.select(e),n.classList.remove(mt);this.setActiveBorder(),n.setAttribute("aria-hidden",""+i)}},i.prototype.select=function(e){var i=this;this.tbItems=t.select("."+ht+" ."+yt,this.element),this.tbItem=t.selectAll("."+ht+" ."+bt,this.element),this.content=t.select("."+ct,this.element),this.prevItem=this.tbItem[this.prevIndex],t.isNullOrUndefined(this.selectedItem)||this.selectedItem<0||this.tbItem.length<=this.selectedItem||isNaN(this.selectedItem)?this.selectedItem=0:this.selectedID=this.extIndex(this.tbItem[this.selectedItem].id);var s=this.tbItem[e];t.isNullOrUndefined(s)?this.selectedID="0":this.selectingID=this.extIndex(s.id),t.isNullOrUndefined(this.prevItem)||this.prevItem.classList.contains(ft)||this.prevItem.children.item(0).setAttribute("tabindex","-1");var n={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:this.tbItem[this.selectedItem],selectedIndex:this.selectedItem,selectedContent:t.isNullOrUndefined(this.content)?null:t.select("#e-content_"+this.selectedID,this.content),selectingItem:s,selectingIndex:e,selectingContent:t.isNullOrUndefined(this.content)?null:t.select("#e-content_"+this.selectingID,this.content),isSwiped:this.isSwipeed,cancel:!1};this.initRender&&0===this.selectedItem?this.selectingContent(e):this.trigger("selecting",n,function(t){t.cancel||i.selectingContent(e)})},i.prototype.selectingContent=function(e){if("number"==typeof e){if(!t.isNullOrUndefined(this.tbItem[e])&&this.tbItem[e].classList.contains(ft))for(var i=e+1;i<this.items.length;i++){if(!1===this.items[i].disabled){e=i;break}e=0}this.tbItem.length>e&&e>=0&&!isNaN(e)?(this.prevIndex=this.selectedItem,this.tbItem[e].classList.contains(Ct)?this.setActive(this.popupHandler(this.tbItem[e])):this.setActive(e)):this.setActive(0)}else e instanceof HTMLElement&&this.setActive(this.getEleIndex(e))},i.prototype.disable=function(e){this.setCssClass(this.element,ft,e),this.element.setAttribute("aria-disabled",""+e)},i.prototype.getPersistData=function(){return this.addOnPersist(["selectedItem","actEleId"])},i.prototype.getModuleName=function(){return"tab"},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)}),this.setContentHeight(!1);break;case"cssClass":""!==i.cssClass?(this.setCssClass(this.element,i.cssClass,!1),this.setCssClass(this.element,e.cssClass,!0)):this.setCssClass(this.element,e.cssClass,!0);break;case"items":this.evalOnPropertyChangeItems(e,i);break;case"showCloseButton":this.setCloseButton(e.showCloseButton);break;case"selectedItem":this.selectedItem=i.selectedItem,this.select(e.selectedItem);break;case"headerPlacement":this.changeOrientation(e.headerPlacement);break;case"enableRtl":this.setRTL(e.enableRtl);break;case"overflowMode":this.tbObj.overflowMode=e.overflowMode,this.tbObj.dataBind(),this.refreshActElePosition();break;case"heightAdjustMode":this.setContentHeight(!1),this.select(this.selectedItem);break;case"scrollStep":this.tbObj&&(this.tbObj.scrollStep=this.scrollStep)}}},dt([t.Collection([],wt)],i.prototype,"items",void 0),dt([t.Property("100%")],i.prototype,"width",void 0),dt([t.Property("auto")],i.prototype,"height",void 0),dt([t.Property("")],i.prototype,"cssClass",void 0),dt([t.Property(0)],i.prototype,"selectedItem",void 0),dt([t.Property("Top")],i.prototype,"headerPlacement",void 0),dt([t.Property("Content")],i.prototype,"heightAdjustMode",void 0),dt([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),dt([t.Property(!1)],i.prototype,"enablePersistence",void 0),dt([t.Property(!1)],i.prototype,"showCloseButton",void 0),dt([t.Property()],i.prototype,"scrollStep",void 0),dt([t.Complex({},kt)],i.prototype,"animation",void 0),dt([t.Event()],i.prototype,"created",void 0),dt([t.Event()],i.prototype,"adding",void 0),dt([t.Event()],i.prototype,"added",void 0),dt([t.Event()],i.prototype,"selecting",void 0),dt([t.Event()],i.prototype,"selected",void 0),dt([t.Event()],i.prototype,"removing",void 0),dt([t.Event()],i.prototype,"removed",void 0),dt([t.Event()],i.prototype,"destroyed",void 0),i=dt([t.NotifyPropertyChanges],i)}(t.Component),It=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),At=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},Dt="e-treeview",Pt="e-icon-collapsible",Mt="e-icon-expandable",Tt="e-list-item",Ut="e-list-text",Ht="e-list-parent",Bt="e-hover",Rt="e-active",jt="e-icons-spinner",Ft="e-process",qt="e-icons",Vt="e-text-content",Wt="e-tree-input",zt="e-dragging",_t="e-sibling",Kt="e-drop-next",Gt="e-drop-out",Yt="e-fullrow",Xt="e-selected",Qt="e-expanded",Jt="e-node-collapsed",Zt="e-check",$t="e-stop",ei="e-checkbox-wrapper",ti="e-frame",ii="e-node-focus",si="e-animation-active",ni={treeRole:"tree",itemRole:"treeitem",listRole:"group",itemText:"",wrapperRole:""},li=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return It(i,e),At([t.Property("child")],i.prototype,"child",void 0),At([t.Property([])],i.prototype,"dataSource",void 0),At([t.Property("expanded")],i.prototype,"expanded",void 0),At([t.Property("hasChildren")],i.prototype,"hasChildren",void 0),At([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),At([t.Property("iconCss")],i.prototype,"iconCss",void 0),At([t.Property("id")],i.prototype,"id",void 0),At([t.Property("imageUrl")],i.prototype,"imageUrl",void 0),At([t.Property("isChecked")],i.prototype,"isChecked",void 0),At([t.Property("parentID")],i.prototype,"parentID",void 0),At([t.Property(null)],i.prototype,"query",void 0),At([t.Property("selected")],i.prototype,"selected",void 0),At([t.Property(null)],i.prototype,"tableName",void 0),At([t.Property("text")],i.prototype,"text",void 0),At([t.Property("tooltip")],i.prototype,"tooltip",void 0),At([t.Property("navigateUrl")],i.prototype,"navigateUrl",void 0),i}(t.ChildProperty),oi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return It(i,e),At([t.Property("SlideDown")],i.prototype,"effect",void 0),At([t.Property(400)],i.prototype,"duration",void 0),At([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),ri=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return It(i,e),At([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},oi)],i.prototype,"collapse",void 0),At([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},oi)],i.prototype,"expand",void 0),i}(t.ChildProperty),ai=function(e){function r(t,i){var s=e.call(this,t,i)||this;return s.preventExpand=!1,s.checkedElement=[],s.disableNode=[],s.parentNodeCheck=[],s.expandChildren=[],s.isFieldChange=!1,s.mouseDownStatus=!1,s}It(r,e),a=r,r.prototype.getModuleName=function(){return"treeview"},r.prototype.preRender=function(){var e=this;this.checkActionNodes=[],this.dragStartAction=!1,this.isAnimate=!1,this.keyConfigs={escape:"escape",end:"end",enter:"enter",f2:"f2",home:"home",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlDown:"ctrl+downarrow",ctrlUp:"ctrl+uparrow",ctrlEnter:"ctrl+enter",ctrlHome:"ctrl+home",ctrlEnd:"ctrl+end",ctrlA:"ctrl+A",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",shiftEnter:"shift+enter",shiftHome:"shift+home",shiftEnd:"shift+end",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",csEnter:"ctrl+shift+enter",csHome:"ctrl+shift+home",csEnd:"ctrl+shift+end",space:"space"},this.listBaseOption={expandCollapse:!0,showIcon:!0,expandIconClass:Mt,ariaAttributes:ni,expandIconPosition:"Left",itemCreated:function(t){e.beforeNodeCreate(t)}},this.updateListProp(this.fields),this.aniObj=new t.Animation({}),this.treeList=[],this.isLoaded=!1,this.isInitalExpand=!1,this.expandChildren=[],this.index=0,this.setTouchClass(),t.isNullOrUndefined(this.selectedNodes)&&this.setProperties({selectedNodes:[]},!0),t.isNullOrUndefined(this.checkedNodes)&&this.setProperties({checkedNodes:[]},!0),t.isNullOrUndefined(this.expandedNodes)?this.setProperties({expandedNodes:[]},!0):this.isInitalExpand=!0},r.prototype.getPersistData=function(){return this.addOnPersist(["selectedNodes","checkedNodes","expandedNodes"])},r.prototype.render=function(){this.initialRender=!0,this.initialize(),this.setDataBinding(),this.setExpandOnType(),this.setRipple(),this.wireEditingEvents(this.allowEditing),this.setDragAndDrop(this.allowDragAndDrop),this.wireEvents(),this.initialRender=!1,this.renderComplete()},r.prototype.initialize=function(){this.element.setAttribute("role","tree"),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active"),this.isBlazorPlatform=t.isBlazor(),this.setCssClass(null,this.cssClass),this.setEnableRtl(),this.setFullRow(this.fullRowSelect),this.nodeTemplateFn=this.templateComplier(this.nodeTemplate)},r.prototype.setEnableRtl=function(){this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},r.prototype.setRipple=function(){var e={selector:".e-fullrow,.e-text-content",ignore:"."+Vt+" > ."+qt+",.e-input-group,.e-input, ."+ei};this.rippleFn=t.rippleEffect(this.element,e);var i={selector:"."+Vt+" > ."+qt,isCenterRipple:!0};this.rippleIconFn=t.rippleEffect(this.element,i)},r.prototype.setFullRow=function(e){e?t.addClass([this.element],"e-fullrow-wrap"):t.removeClass([this.element],"e-fullrow-wrap")},r.prototype.setMultiSelect=function(e){var i=t.select("."+Ht,this.element);e?i.setAttribute("aria-multiselectable","true"):i.removeAttribute("aria-multiselectable")},r.prototype.templateComplier=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},r.prototype.setDataBinding=function(){var e=this;this.treeList.push("false"),this.fields.dataSource instanceof l.DataManager?this.fields.dataSource.ready?this.fields.dataSource.ready.then(function(t){e.fields.dataSource instanceof l.DataManager&&e.fields.dataSource.dataSource.offline&&(e.treeList.pop(),e.treeData=t.result,e.isNumberTypeId=e.getType(),e.setRootData(),e.renderItems(!0),0!==e.treeList.length||e.isLoaded||e.finalize())}):this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(t){e.treeList.pop(),e.treeData=t.result,e.isNumberTypeId=e.getType(),e.setRootData(),e.renderItems(!0),0!==e.treeList.length||e.isLoaded||e.finalize()}):(this.treeList.pop(),t.isNullOrUndefined(this.fields.dataSource)?this.rootData=this.treeData=[]:(this.treeData=JSON.parse(JSON.stringify(this.fields.dataSource)),this.setRootData()),this.isNumberTypeId=this.getType(),this.renderItems(!1)),0!==this.treeList.length||this.isLoaded||this.finalize()},r.prototype.getQuery=function(e,s){void 0===s&&(s=null);var n,o=[];if(e.query)n=e.query.clone();else{n=new l.Query;for(var r=this.getActualProperties(e),a=0,d=Object.keys(r);a<d.length;a++){var h=d[a];"dataSource"!==h&&"tableName"!==h&&"child"!==h&&e[h]&&-1===o.indexOf(e[h])&&o.push(e[h])}n.select(o),r.hasOwnProperty("tableName")&&n.from(e.tableName)}return i.ListBase.addSorting(this.sortOrder,e.text,n),t.isNullOrUndefined(s)||t.isNullOrUndefined(e.parentID)||n.where(e.parentID,"equal",this.isNumberTypeId?parseFloat(s):s),n},r.prototype.getType=function(){return!!this.treeData[0]&&"number"==typeof t.getValue(this.fields.id,this.treeData[0])},r.prototype.setRootData=function(){if(this.dataType=this.getDataType(this.treeData,this.fields),1===this.dataType){this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID);var e=this.getChildNodes(this.treeData,void 0,!0);t.isNullOrUndefined(e)?this.rootData=[]:this.rootData=e}else this.rootData=this.treeData},r.prototype.renderItems=function(e){if(this.listBaseOption.ariaAttributes.level=1,this.ulElement=i.ListBase.createList(this.createElement,e?this.rootData:this.getSortedData(this.rootData),this.listBaseOption),this.element.appendChild(this.ulElement),!1===this.loadOnDemand)for(var t=this.ulElement.querySelectorAll(".e-list-item"),s=0;s<t.length;)this.renderChildNodes(t[s],!0,null,!0),s++;else this.finalizeNode(this.element);this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.parentNodeCheck=[],this.parentCheckData=[],this.updateCheckedStateFromDS(),this.autoCheck&&this.showCheckBox&&!this.isLoaded&&this.updateParentCheckState()},r.prototype.updateCheckedStateFromDS=function(e){if(this.treeData&&this.showCheckBox)if(1===this.dataType){for(var i=this.fields,s=new l.DataManager(this.treeData).executeLocal((new l.Query).where(i.isChecked,"equal",!0,!1)),n=0;n<s.length;n++){var o=s[n][this.fields.id]?s[n][this.fields.id].toString():null;s[n][this.fields.parentID]&&s[n][this.fields.parentID].toString();if(-1!==this.checkedNodes.indexOf(o)||this.isLoaded||this.checkedNodes.push(o),s[n][this.fields.hasChildren])for(var r=s[n][this.fields.id],a=new l.DataManager(this.treeData).executeLocal((new l.Query).where(i.parentID,"equal",r,!1)),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(h)&&this.autoCheck&&this.checkedNodes.push(h)}}for(n=0;n<this.checkedNodes.length;n++){var c=this.fields,p=new l.DataManager(this.treeData).executeLocal((new l.Query).where(c.id,"equal",this.checkedNodes[n],!0));p[0]&&this.autoCheck&&(this.getCheckedNodeDetails(c,p),this.checkIndeterminateState(p[0]));for(var u=new l.DataManager(this.treeData).executeLocal((new l.Query).where(c.parentID,"equal",this.checkedNodes[n],!0)),f=0;f<u.length;f++){var m=u[f][this.fields.id]?u[f][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(m)&&this.autoCheck&&this.checkedNodes.push(m)}}}else if(2===this.dataType||this.fields.dataSource instanceof l.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof l.DataManager&&!this.loadOnDemand)for(f=0;f<this.treeData.length;f++){var g=this.treeData[f][this.fields.id]?this.treeData[f][this.fields.id].toString():"";this.treeData[f][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(g)&&this.checkedNodes.push(g);var v=t.getValue(this.fields.child.toString(),this.treeData[f]);v&&this.updateChildCheckState(v,this.treeData[f])}},r.prototype.getCheckedNodeDetails=function(e,i){var s=i[0][this.fields.parentID]?i[0][this.fields.parentID].toString():null,n=0,o=this.element.querySelector('[data-uid="'+i[0][this.fields.id]+'"]'),r=this.element.querySelector('[data-uid="'+i[0][this.fields.parentID]+'"]');if(o||r){if(r){t.select("."+Zt,r)||this.changeState(r,"indeterminate",null,!0,!0)}}else{this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(s)&&this.parentNodeCheck.push(s);for(var a=this.getChildNodes(this.treeData,s),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(h)&&n++,n===a.length&&-1===this.checkedNodes.indexOf(s)&&this.checkedNodes.push(s)}var c=new l.DataManager(this.treeData).executeLocal((new l.Query).where(e.id,"equal",s,!0));this.getCheckedNodeDetails(e,c)}},r.prototype.updateParentCheckState=function(){for(var e,i=t.selectAll(".e-stop",this.element),s=0;s<i.length;s++){var n=t.closest(i[s],"."+Tt),o=n.getAttribute("data-uid").toString(),r=0;if(e=1===this.dataType?new l.DataManager(this.treeData).executeLocal((new l.Query).where(this.fields.parentID,"equal",o,!0)):this.getChildNodes(this.treeData,o)){for(var a=0;a<e.length;a++){var d=e[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&r++}if(r===e.length){var h=n.getAttribute("data-uid");-1===this.checkedNodes.indexOf(h)&&this.checkedNodes.push(h),this.changeState(n,"check",null,!0,!0)}else 0===r&&0===this.checkedNodes.length&&this.changeState(n,"uncheck",null,!0,!0)}}},r.prototype.checkIndeterminateState=function(e){var t;if(t=1===this.dataType?this.element.querySelector('[data-uid="'+e[this.fields.parentID]+'"]'):this.element.querySelector('[data-uid="'+e[this.fields.id]+'"]')){"true"!==t.querySelector("."+ei).getAttribute("aria-checked")&&this.changeState(t,"indeterminate",null,!0,!0)}else if(2===this.dataType){this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(e[this.fields.id].toString())&&this.parentNodeCheck.push(e[this.fields.id].toString())}},r.prototype.updateChildCheckState=function(e,i){for(var s=0,n=i[this.fields.id]?i[this.fields.id].toString():"",l=0;l<e.length;l++){var o=e[l][this.fields.id]?e[l][this.fields.id].toString():"";e[l][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(o)&&this.checkedNodes.push(o),-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(o)&&this.autoCheck&&this.checkedNodes.push(o),-1!==this.checkedNodes.indexOf(o)&&this.autoCheck&&s++;var r=t.getValue(this.fields.child.toString(),e[l]);r&&(this.parentCheckData.push(i),this.updateChildCheckState(r,e[l])),s===e.length&&this.autoCheck&&-1===this.checkedNodes.indexOf(n)&&this.checkedNodes.push(n)}if(0!==s&&this.autoCheck){this.checkIndeterminateState(i);for(var a=0;a<this.parentCheckData.length;a++)i!==this.parentCheckData[a]&&this.parentCheckData[a]&&this.checkIndeterminateState(this.parentCheckData[a])}this.parentCheckData=[]},r.prototype.beforeNodeCreate=function(e){if(this.showCheckBox){var i=n.createCheckBox(this.createElement,!0,{cssClass:this.touchClass});i.setAttribute("role","checkbox");var s=t.select("div."+qt,e.item),l=e.item.getAttribute("data-uid");e.item.childNodes[0].insertBefore(i,e.item.childNodes[0].childNodes[t.isNullOrUndefined(s)?0:1]);var o=t.getValue(e.fields.isChecked,e.curData);this.checkedNodes.indexOf(l)>-1?(t.select("."+ti,i).classList.add(Zt),i.setAttribute("aria-checked","true"),this.addCheck(e.item)):t.isNullOrUndefined(o)||"true"!==o.toString()?i.setAttribute("aria-checked","false"):(t.select("."+ti,i).classList.add(Zt),i.setAttribute("aria-checked","true"),this.addCheck(e.item));var r=t.select("."+ti,i);t.EventHandler.add(r,"mousedown",this.frameMouseHandler,this),t.EventHandler.add(r,"mouseup",this.frameMouseHandler,this)}this.fullRowSelect&&this.createFullRow(e.item),this.allowMultiSelection&&!e.item.classList.contains(Xt)&&e.item.setAttribute("aria-selected","false");var a=e.fields;if(this.addActionClass(e,a.selected,Xt),this.addActionClass(e,a.expanded,Qt),!t.isNullOrUndefined(this.nodeTemplateFn)){var d=e.item.querySelector("."+Ut);d.innerHTML="";var h=this.nodeTemplateFn(e.curData,void 0,void 0,this.element.id+"nodeTemplate",this.isStringTemplate);h=Array.prototype.slice.call(h),t.append(h,d)}var c={node:e.item,nodeData:e.curData,text:e.text};this.trigger("drawNode",c)},r.prototype.frameMouseHandler=function(e){var i=t.select(".e-ripple-container",e.target.parentElement);n.rippleMouseHandler(e,i)},r.prototype.addActionClass=function(e,i,s){var n=e.curData,l=t.getValue(i,n);t.isNullOrUndefined(l)||"false"===l.toString()||e.item.classList.add(s)},r.prototype.getDataType=function(e,i){if(this.fields.dataSource instanceof l.DataManager){for(var s=0;s<e.length;s++)if("string"==typeof i.child&&t.isNullOrUndefined(t.getValue(i.child,e[s])))return 1;return 2}s=0;for(var n=e.length;s<n;s++){if("string"==typeof i.child&&!t.isNullOrUndefined(t.getValue(i.child,e[s])))return 2;if(!t.isNullOrUndefined(t.getValue(i.parentID,e[s]))||!t.isNullOrUndefined(t.getValue(i.hasChildren,e[s])))return 1}return 1},r.prototype.getGroupedData=function(e,t){for(var s=(new l.Query).group(t),n=i.ListBase.getDataSource(e,s),o=[],r=0;r<n.length;r++){var a=n[r].items;o.push(a)}return o},r.prototype.getSortedData=function(e){return e&&"None"!==this.sortOrder&&(e=i.ListBase.getDataSource(e,i.ListBase.addSorting(this.sortOrder,this.fields.text))),e},r.prototype.finalizeNode=function(e){for(var i=t.selectAll(".e-list-img",e),s=0;s<i.length;s++)i[s].setAttribute("alt","e-list-img");if(this.isLoaded){for(var n=t.selectAll("."+Xt,e),l=0;l<n.length;l++){this.selectNode(n[l],null);break}t.removeClass(n,Xt)}for(var o=t.selectAll("."+Tt+":not(."+Qt+")",e),r=0;r<o.length;r++){var a=t.select("div."+qt,o[r]);a&&a.classList.contains(Mt)&&this.disableExpandAttr(o[r])}var d=t.selectAll("."+Qt,e);if(!this.isInitalExpand)for(l=0;l<d.length;l++)this.renderChildNodes(d[l]);t.removeClass(d,Qt),this.updateList(),this.isLoaded&&this.updateCheckedProp()},r.prototype.updateCheckedProp=function(){if(this.showCheckBox){var e=[].concat([],this.checkedNodes);this.setProperties({checkedNodes:e},!0)}},r.prototype.ensureIndeterminate=function(){if(this.autoCheck)for(var e=t.selectAll("li",this.element),i=0;i<e.length;i++)e[i].classList.contains(Tt)&&(t.select("."+Ht,e[i])?this.ensureParentCheckState(e[i]):this.ensureChildCheckState(e[i]));else{var s=t.selectAll(".e-stop",this.element);for(i=0;i<s.length;i++)s[i].classList.remove($t)}},r.prototype.ensureParentCheckState=function(e){if(!t.isNullOrUndefined(e)){if(e.classList.contains(Dt))return;var i=e;e.classList.contains(Tt)&&(i=t.select("."+Ht,e));var s=t.selectAll("."+Zt,i),n=t.selectAll(".e-stop",i),l=t.selectAll("."+Tt,i),o=e.getElementsByClassName(ei)[0];l.length===s.length?this.changeState(o,"check",null,!0,!0):s.length>0||n.length>0?this.changeState(o,"indeterminate",null,!0,!0):0===s.length&&this.changeState(o,"uncheck",null,!0,!0);var r=t.closest(e,"."+Ht);if(!t.isNullOrUndefined(r)){var a=t.closest(r,"."+Tt);this.ensureParentCheckState(a)}}},r.prototype.ensureChildCheckState=function(e,i){if(!t.isNullOrUndefined(e)){var s=t.select("."+Ht,e),n=void 0;if(!t.isNullOrUndefined(s)){n=t.selectAll("."+ei,s);for(var l=e.getElementsByClassName(ti)[0].classList.contains(Zt),o=e.getElementsByClassName(ti)[0].classList.contains($t),r=s.querySelectorAll("li"),a=(s.parentElement.getAttribute("aria-expanded"),void 0),d=0;d<n.length;d++){if(t.isNullOrUndefined(this.currentLoadData)||t.isNullOrUndefined(t.getValue(this.fields.isChecked,this.currentLoadData[d]))){var h=n[d].getElementsByClassName(ti)[0].classList.contains(Zt),c=r[d].getAttribute("data-uid");l?a="check":h&&!this.isLoaded?a="check":-1!==this.checkedNodes.indexOf(c)&&this.isLoaded&&(o||l)?a="check":r[d].classList.contains("e-has-child")&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(l||o)&&-1!==this.parentNodeCheck.indexOf(c)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):1===this.dataType&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(l||o)&&-1!==this.parentNodeCheck.indexOf(c)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):a="uncheck"}else a=t.getValue(this.fields.isChecked,this.currentLoadData[d])?"check":"uncheck",-1!==this.ele&&(a=l?"check":"uncheck");this.changeState(n[d],a,i,!0,!0)}}this.autoCheck&&this.isLoaded&&this.updateParentCheckState()}},r.prototype.doCheckBoxAction=function(e,i){t.selectAll("."+Tt,this.element);if(t.isNullOrUndefined(e)){var s=t.selectAll("."+ei,this.element);if(this.loadOnDemand)for(var n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck",null,null,null,i);else for(n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck")}else for(var l=e.length;l>=0;l--){var o=void 0;if(o=1===e.length?this.getElement(e[l-1]):this.getElement(e[l]),t.isNullOrUndefined(o)){var r=void 0;if(""!==(r=e[l-e.length]?e[l-e.length].toString():e[l]?e[l].toString():null)&&i&&r)this.setValidCheckedNode(r),this.dynamicCheckState(r,i);else if(-1!==this.checkedNodes.indexOf(r)&&""!==r&&!i){this.checkedNodes.splice(this.checkedNodes.indexOf(r),1);var a=this.getChildNodes(this.treeData,r);if(a){for(var d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(h)&&this.checkedNodes.splice(this.checkedNodes.indexOf(h),1)}-1!==this.parentNodeCheck.indexOf(r)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(r),1)}r&&this.dynamicCheckState(r,i),this.updateField(this.treeData,this.fields,r,"isChecked",null)}}else{var c=t.select("."+Ht+" ."+ei,o);this.validateCheckNode(c,!i,o,null)}}if(e)for(var p=0;p<e.length;p++){r=e[p]?e[p].toString():"";i||this.updateField(this.treeData,this.fields,r,"isChecked",null)}this.autoCheck&&this.updateParentCheckState()},r.prototype.updateFieldChecked=function(e,i){var s=t.closest(e,"."+Tt),n=s.getAttribute("data-uid");"true"!==this.getNodeData(s).isChecked||i||this.updateField(this.treeData,this.fields,n,"isChecked",null)},r.prototype.dynamicCheckState=function(e,i){if(1===this.dataType){var s=0,n=new l.DataManager(this.treeData).executeLocal((new l.Query).where(this.fields.id,"equal",e,!0));if(n[0]){var o=n[0][this.fields.id]?n[0][this.fields.id].toString():null,r=n[0][this.fields.parentID]?n[0][this.fields.parentID].toString():null,a=((u=this.element.querySelector('[data-uid="'+r+'"]'))&&t.select(".e-stop",u),u?t.select("."+Zt,u):null),d=this.element.querySelector('[data-uid="'+o+'"]'),h=this.getChildNodes(this.treeData,r);if(h)for(var c=0;c<h.length;c++){var p=h[c][this.fields.id]?h[c][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(p)&&s++}-1!==this.checkedNodes.indexOf(e)&&u&&o===e&&this.autoCheck?this.changeState(u,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&d&&o===e&&!i?this.changeState(d,"uncheck",null):-1!==this.checkedNodes.indexOf(e)&&d&&o===e&&i?this.changeState(d,"check",null):-1===this.checkedNodes.indexOf(e)&&!d&&u&&o===e&&this.autoCheck&&0!==s?this.changeState(u,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&!d&&u&&o===e&&this.autoCheck&&0===s?this.changeState(u,"uncheck",null):d||u||o!==e||!this.autoCheck||this.updateIndeterminate(e,i)}}else if(2===this.dataType||this.fields.dataSource instanceof l.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof l.DataManager&&!this.loadOnDemand){o=void 0;var u=void 0;for(a=void 0,c=0;c<this.treeData.length;c++){o=this.treeData[c][this.fields.id]?this.treeData[c][this.fields.id].toString():"",a=(u=this.element.querySelector('[data-uid="'+o+'"]'))?t.select("."+Zt,u):null,-1===this.checkedNodes.indexOf(o)&&u&&a&&!i&&this.changeState(u,"uncheck",null);var f=t.getValue(this.fields.child.toString(),this.treeData[c]);f&&this.updateChildIndeterminate(f,o,e,i,o)}}},r.prototype.updateIndeterminate=function(e,t){var i,s=this.getTreeData(e),n=0;1===this.dataType&&(i=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null);var l=this.getChildNodes(this.treeData,i);if(l)for(var o=0;o<l.length;o++){var r=l[o][this.fields.id]?l[o][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(r)&&n++}var a=this.element.querySelector('[data-uid="'+i+'"]');a&&t?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0!==n?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0===n?this.changeState(a,"uncheck",null):a||(t||-1!==this.checkedNodes.indexOf(i)||-1===this.parentNodeCheck.indexOf(i)?t&&-1===this.checkedNodes.indexOf(i)&&-1===this.parentNodeCheck.indexOf(i)?this.parentNodeCheck.push(i):t||-1===this.checkedNodes.indexOf(i)||-1!==this.parentNodeCheck.indexOf(i)||0===n||this.parentNodeCheck.push(i):this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i),1),this.updateIndeterminate(i,t),-1===this.checkedNodes.indexOf(i)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(i),1))},r.prototype.updateChildIndeterminate=function(e,i,s,n,l){for(var o=0,r=0;r<e.length;r++){var a=e[r][this.fields.id]?e[r][this.fields.id].toString():"";-1!==this.checkedNodes.indexOf(a)&&o++;var d=this.element.querySelector('[data-uid="'+i+'"]'),h=d?t.select(".e-stop",d):null,c=d?t.select("."+Zt,d):null,p=this.element.querySelector('[data-uid="'+a+'"]'),u=p?t.select("."+Zt,p):null;if(-1!==this.checkedNodes.indexOf(s)&&d&&a===s&&this.autoCheck)this.changeState(d,"indeterminate",null);else if(-1!==this.checkedNodes.indexOf(s)||!d||p||a!==s||n){if(-1===this.checkedNodes.indexOf(s)&&p&&a===s&&!n)this.changeState(p,"uncheck",null);else if(-1===this.checkedNodes.indexOf(s)&&h&&a===s&&this.autoCheck&&0===o&&!n)h.classList.remove($t);else if(-1===this.checkedNodes.indexOf(s)&&!p&&c&&a===s&&0===o)this.changeState(d,"uncheck",null);else if(-1===this.checkedNodes.indexOf(a)&&p&&u&&0===o)this.changeState(p,"uncheck",null);else if(!p&&!d&&a===s||-1!==this.parentNodeCheck.indexOf(i)&&this.autoCheck){var f=this.element.querySelector('[data-uid="'+l+'"]');n&&0!==o?this.changeState(f,"indeterminate",null):n&&o===e.length&&-1===this.checkedNodes.indexOf(i)?this.checkedNodes.push(i):n||0!==o||-1===this.parentNodeCheck.indexOf(i)||this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i)),-1===this.parentNodeCheck.indexOf(i)&&this.parentNodeCheck.push(i)}}else this.autoCheck?this.changeState(d,"uncheck",null):0!==o?this.changeState(d,"indeterminate",null):this.changeState(d,"uncheck",null);var m=t.getValue(this.fields.child.toString(),e[r]);m&&this.updateChildIndeterminate(m,a,s,n,l)}},r.prototype.changeState=function(e,i,s,n,l,o){var r,a=this,d=t.closest(e,"."+Tt);n?this.nodeCheckAction(e,i,d,r,s,n,l,o):(this.checkActionNodes=[],r=this.getCheckEvent(d,i,s),this.trigger("nodeChecking",r,function(t){t.cancel||a.nodeCheckAction(e,i,d,t,s,n,l,o)}))},r.prototype.nodeCheckAction=function(e,i,s,n,l,o,r,a){var d,h=e.getElementsByClassName(ti)[0];if("check"!==i||h.classList.contains(Zt)?"uncheck"===i&&(h.classList.contains(Zt)||h.classList.contains($t))?(t.removeClass([h],[Zt,$t]),this.removeCheck(s),d="false"):"indeterminate"===i&&!h.classList.contains($t)&&this.autoCheck&&(h.classList.remove(Zt),h.classList.add($t),this.removeCheck(s),d="mixed"):(h.classList.remove($t),h.classList.add(Zt),this.addCheck(s),d="true"),d="check"===i?"true":"uncheck"===i?"false":d,t.isNullOrUndefined(d)||e.setAttribute("aria-checked",d),r){var c=[].concat([],this.checkActionNodes);n=this.getCheckEvent(s,i,l),t.isUndefined(o)&&(n.data=c)}void 0!==a&&this.ensureStateChange(s,a),o||t.isNullOrUndefined(d)||(e.setAttribute("aria-checked",d),n.data[0].checked=d,this.trigger("nodeChecked",n),this.checkActionNodes=[])},r.prototype.addCheck=function(e){var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.checkedNodes.indexOf(i)||this.checkedNodes.push(i)},r.prototype.removeCheck=function(e){var t=this.checkedNodes.indexOf(e.getAttribute("data-uid"));t>-1&&this.checkedNodes.splice(t,1)},r.prototype.getCheckEvent=function(e,i,s){this.checkActionNodes.push(this.getNodeData(e));var n=this.checkActionNodes;return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,data:n}},r.prototype.finalize=function(){t.select("."+Ht,this.element).setAttribute("role",ni.treeRole),this.setMultiSelect(this.allowMultiSelection);var e=t.select("."+Tt,this.element);e&&(t.addClass([e],ii),this.updateIdAttr(null,e)),this.hasPid=!!this.rootData[0]&&this.rootData[0].hasOwnProperty(this.fields.parentID),this.doExpandAction()},r.prototype.doExpandAction=function(){var e=this.expandedNodes;if(this.isInitalExpand&&e.length>0)if(this.setProperties({expandedNodes:[]},!0),this.fields.dataSource instanceof l.DataManager)this.expandGivenNodes(e);else{for(var i=0;i<e.length;i++){var s=t.select('[data-uid="'+e[i]+'"]',this.element);if(t.isNullOrUndefined(s))e[i]&&-1===this.expandChildren.indexOf(e[i])&&this.expandChildren.push(e[i].toString());else{var n=t.select("."+Mt,t.select("."+Vt,s));t.isNullOrUndefined(n)||this.expandAction(s,n,null)}}this.afterFinalized()}else this.afterFinalized()},r.prototype.expandGivenNodes=function(e){var t=this;this.expandCallback(e[this.index],function(){t.index++,t.index<e.length?t.expandGivenNodes(e):t.afterFinalized()})},r.prototype.expandCallback=function(e,i){var s=t.select('[data-uid="'+e+'"]',this.element);if(t.isNullOrUndefined(s))i();else{var n=t.select("."+Mt,t.select("."+Vt,s));t.isNullOrUndefined(n)?i():this.expandAction(s,n,null,!1,i)}},r.prototype.afterFinalized=function(){if(this.doSelectionAction(),this.updateCheckedProp(),this.isAnimate=!0,this.isInitalExpand=!1,!this.isLoaded||this.isFieldChange){var e={data:this.treeData};this.trigger("dataBound",e)}this.isLoaded=!0},r.prototype.doSelectionAction=function(){var e=t.selectAll("."+Xt,this.element),i=this.selectedNodes;if(i.length>0){this.setProperties({selectedNodes:[]},!0);for(var s=0;s<i.length;s++){var n=t.select('[data-uid="'+i[s]+'"]',this.element);if(n&&!n.classList.contains("e-active")?this.selectNode(n,null,!0):this.selectedNodes.push(i[s]),!this.allowMultiSelection)break}}else this.selectGivenNodes(e);t.removeClass(e,Xt)},r.prototype.selectGivenNodes=function(e){for(var t=0;t<e.length&&(e[t].classList.contains("e-disable")||this.selectNode(e[t],null,!0),this.allowMultiSelection);t++);},r.prototype.clickHandler=function(e){var i=e.originalEvent.target;if(t.EventHandler.remove(this.element,"contextmenu",this.preventContextMenu),i&&!this.dragStartAction){var s=i.classList,n=t.closest(i,"."+Tt);if(n){if(this.removeHover(),this.setFocusElement(n),this.showCheckBox&&!n.classList.contains("e-disable")){var l=t.closest(i,"."+ei);if(!t.isNullOrUndefined(l)){var o=t.select("."+ti,l);return this.validateCheckNode(l,o.classList.contains(Zt),n,e.originalEvent),void this.triggerClickEvent(e.originalEvent,n)}}s.contains(Mt)?this.expandAction(n,i,e):s.contains(Pt)?this.collapseNode(n,i,e):s.contains(Ht)||s.contains(Tt)||this.toggleSelect(n,e.originalEvent,!1),this.triggerClickEvent(e.originalEvent,n)}}},r.prototype.nodeCheckedEvent=function(e,i,s){t.closest(e,"."+Tt);var n=this.getCheckEvent(e,i?"uncheck":"check",s);n.data=n.data.splice(0,n.data.length-1),this.trigger("nodeChecked",n)},r.prototype.triggerClickEvent=function(e,t){var i={event:e,node:t};this.trigger("nodeClicked",i)},r.prototype.expandNode=function(e,i,s){var n=this;if(i.classList.contains(jt)&&this.hideSpinner(i),this.initialRender||i.classList.add("interaction"),!0!==s||!0===s&&e.classList.contains("e-expanded")){if(!0!==this.preventExpand){t.removeClass([i],Mt),t.addClass([i],Pt);var o=0,r=0,a=this,d=t.select("."+Ht,e),h=e;this.setHeight(h,d);var c=t.select("."+Tt+"."+Rt,e);this.isAnimate?this.aniObj.animate(d,{name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing,begin:function(i){h.style.overflow="hidden",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.add(si),o=h.offsetHeight,r=t.select("."+Vt,e).offsetHeight},progress:function(e){e.element.style.display="block",a.animateHeight(e,o,r)},end:function(e){e.element.style.display="block",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.remove(si),n.expandedNode(h,d,i)}}):this.expandedNode(h,d,i)}}else{t.select("."+Ht,e).style.display="none",this.fields.dataSource instanceof l.DataManager==!0&&(this.preventExpand=!1)}this.initialRender&&i.classList.add("interaction")},r.prototype.expandedNode=function(e,i,s){i.style.display="block",e.style.display="block",e.style.overflow="",e.style.height="",t.removeClass([s],Ft),this.addExpand(e),this.isLoaded&&this.expandArgs&&(this.expandArgs=this.getExpandEvent(e,null),this.trigger("nodeExpanded",this.expandArgs))},r.prototype.addExpand=function(e){e.setAttribute("aria-expanded","true"),t.removeClass([e],Jt);var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.expandedNodes.indexOf(i)||this.expandedNodes.push(i)},r.prototype.collapseNode=function(e,i,s){var n=this;if(!i.classList.contains(Ft)){t.addClass([i],Ft);var l;this.isLoaded?(l=this.getExpandEvent(e,s),this.trigger("nodeCollapsing",l,function(s){s.cancel?t.removeClass([i],Ft):n.nodeCollapseAction(e,i,s)})):this.nodeCollapseAction(e,i,l)}},r.prototype.nodeCollapseAction=function(e,i,s){var n=this;t.removeClass([i],Pt),t.addClass([i],Mt);var l=0,o=0,r=this,a=t.select("."+Ht,e),d=e,h=t.select("."+Tt+"."+Rt,e);this.isAnimate?this.aniObj.animate(a,{name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing,begin:function(i){d.style.overflow="hidden",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.add(si),l=t.select("."+Vt,e).offsetHeight,o=d.offsetHeight},progress:function(e){r.animateHeight(e,l,o)},end:function(e){e.element.style.display="none",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.remove(si),n.collapsedNode(d,a,i,s)}}):this.collapsedNode(d,a,i,s)},r.prototype.collapsedNode=function(e,i,s,n){i.style.display="none",e.style.overflow="",e.style.height="",t.removeClass([s],Ft),this.removeExpand(e),this.isLoaded&&this.trigger("nodeCollapsed",n)},r.prototype.removeExpand=function(e,t){t?e.removeAttribute("aria-expanded"):this.disableExpandAttr(e);var i=this.expandedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.expandedNodes.splice(i,1)},r.prototype.disableExpandAttr=function(e){e.setAttribute("aria-expanded","false"),t.addClass([e],Jt)},r.prototype.setHeight=function(e,t){t.style.display="block",t.style.visibility="hidden",e.style.height=e.offsetHeight+"px",t.style.display="none",t.style.visibility=""},r.prototype.animateHeight=function(e,t,i){var s=(i-t)*((e.duration-e.timeStamp)/e.duration)+t;e.element.parentElement.style.height=s+"px"},r.prototype.renderChildNodes=function(e,s,n,o){var r=this,a=t.select("div."+qt,e);if(!t.isNullOrUndefined(a)){this.showSpinner(a);var d;if(this.fields.dataSource instanceof l.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){var h=this.parents(e,"."+Ht).length,c=this.getChildFields(this.fields,h,1);if(t.isNullOrUndefined(c)||t.isNullOrUndefined(c.dataSource))return t.detach(a),void this.removeExpand(e,!0);this.treeList.push("false"),this.fields.dataSource instanceof l.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof l.DataManager&&!this.loadOnDemand?(this.treeList.pop(),d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.loadChild(d,c,a,e,s,n,o),this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate()):this.fields.dataSource instanceof l.DataManager&&this.loadOnDemand&&c.dataSource.executeQuery(this.getQuery(c,e.getAttribute("data-uid"))).then(function(t){r.treeList.pop(),d=t.result,r.loadChild(d,c,a,e,s,n,o),r.nodeTemplate&&r.isBlazorPlatform&&!r.isStringTemplate&&r.updateBlazorTemplate()})}else{if(d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.currentLoadData=d,t.isNullOrUndefined(d)||0===d.length)return t.detach(a),void this.removeExpand(e,!0);this.listBaseOption.ariaAttributes.level=parseFloat(e.getAttribute("aria-level"))+1,e.appendChild(i.ListBase.createList(this.createElement,this.getSortedData(d),this.listBaseOption)),this.expandNode(e,a,o),this.setSelectionForChildNodes(d),this.ensureCheckNode(e),this.finalizeNode(e),this.loadOnDemand&&this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.disableTreeNodes(d),this.renderSubChild(e,s,o)}}},r.prototype.loadChild=function(e,s,n,o,r,a,d){if(this.currentLoadData=e,t.isNullOrUndefined(e)||0===e.length)t.detach(n),this.removeExpand(o,!0);else{if(this.updateListProp(s),this.fields.dataSource instanceof l.DataManager&&!this.fields.dataSource.dataSource.offline){var h=o.getAttribute("data-uid"),c=this.getNodeObject(h);t.setValue("child",e,c)}this.listBaseOption.ariaAttributes.level=parseFloat(o.getAttribute("aria-level"))+1,o.appendChild(i.ListBase.createList(this.createElement,e,this.listBaseOption)),this.expandNode(o,n,d),this.setSelectionForChildNodes(e),this.ensureCheckNode(o),this.finalizeNode(o),this.disableTreeNodes(e),this.renderSubChild(o,r,d)}a&&a(),0!==this.treeList.length||this.isLoaded||this.finalize()},r.prototype.disableTreeNodes=function(e){for(var t=0;t<e.length;){var i=e[t][this.fields.id].toString();void 0!==this.disableNode&&-1!==this.disableNode.indexOf(i)&&this.doDisableAction([i]),t++}},r.prototype.setSelectionForChildNodes=function(e){var t;for(t=0;t<e.length;t++){var i=e[t][this.fields.id].toString();void 0!==this.selectedNodes&&-1!==this.selectedNodes.indexOf(i)&&this.doSelectionAction()}},r.prototype.ensureCheckNode=function(e){this.showCheckBox&&(this.ele=this.checkedElement?this.checkedElement.indexOf(e.getAttribute("data-uid")):null,this.autoCheck&&(this.ensureChildCheckState(e),this.ensureParentCheckState(e))),this.currentLoadData=null},r.prototype.getFields=function(e,t,i){return t===i?e:this.getFields(this.getChildMapper(e),t,i+1)},r.prototype.getChildFields=function(e,t,i){return t===i?this.getChildMapper(e):this.getChildFields(this.getChildMapper(e),t,i+1)},r.prototype.getChildMapper=function(e){return"string"==typeof e.child||t.isNullOrUndefined(e.child)?e:e.child},r.prototype.getChildNodes=function(e,i,s){void 0===s&&(s=!1);var n;if(t.isNullOrUndefined(e))return n;if(1===this.dataType)return this.getChildGroup(this.groupedData,i,s);if("string"==typeof this.fields.child)for(var l=0,o=e.length;l<o;l++){var r=t.getValue(this.fields.id,e[l]);if(r&&r.toString()===i)return t.getValue(this.fields.child,e[l]);if(!t.isNullOrUndefined(t.getValue(this.fields.child,e[l]))&&void 0!==(n=this.getChildNodes(t.getValue(this.fields.child,e[l]),i)))break}return n},r.prototype.getChildGroup=function(e,i,s){if(!t.isNullOrUndefined(e))for(var n=0,l=e.length;n<l;n++){if(t.isNullOrUndefined(e[n][0])||t.isNullOrUndefined(t.getValue(this.fields.parentID,e[n][0])))return s?e[n]:[];if(t.getValue(this.fields.parentID,e[n][0]).toString()===i)return e[n]}},r.prototype.renderSubChild=function(e,i,s){if(i)for(var n=t.selectAll("."+Mt,e),l=0,o=n.length;l<o;l++){var r=n[l];if(e.querySelector(".e-icons")!==n[l]){var a=t.closest(r,"."+Tt);this.expandArgs=this.getExpandEvent(a,null),!0!==s&&this.trigger("nodeExpanding",this.expandArgs),this.renderChildNodes(a,i,null,s)}}},r.prototype.toggleSelect=function(e,t,i){e.classList.contains("e-disable")||(this.allowMultiSelection&&(t&&t.ctrlKey||i)&&this.isActive(e)?this.unselectNode(e,t):this.selectNode(e,t,i))},r.prototype.isActive=function(e){return!!e.classList.contains(Rt)},r.prototype.selectNode=function(e,i,s){var n=this;if(t.isNullOrUndefined(e)||!this.allowMultiSelection&&this.isActive(e)&&!t.isNullOrUndefined(i))this.setFocusElement(e);else{var l;this.isLoaded?(l=this.getSelectEvent(e,"select",i),this.trigger("nodeSelecting",l,function(t){t.cancel||n.nodeSelectAction(e,i,t,s)})):this.nodeSelectAction(e,i,l,s)}},r.prototype.nodeSelectAction=function(e,i,s,n){if(this.allowMultiSelection&&(n||i&&(!i||i.ctrlKey))||this.removeSelectAll(),this.allowMultiSelection&&i&&i.shiftKey){this.startNode||(this.startNode=e);var l=this.liList.indexOf(this.startNode),o=this.liList.indexOf(e);if(l>o){var r=l;l=o,o=r}for(var a=l;a<=o;a++){var d=this.liList[a];t.isVisible(d)&&!d.classList.contains("e-disable")&&this.addSelect(d)}}else this.startNode=e,this.addSelect(e);this.setFocusElement(e),this.isLoaded&&(s.nodeData=this.getNodeData(e),this.trigger("nodeSelected",s))},r.prototype.unselectNode=function(e,t){var i,s=this;this.isLoaded?(i=this.getSelectEvent(e,"un-select",t),this.trigger("nodeSelecting",i,function(t){t.cancel||s.nodeUnselectAction(e,t)})):this.nodeUnselectAction(e,i)},r.prototype.nodeUnselectAction=function(e,t){this.removeSelect(e),this.setFocusElement(e),this.isLoaded&&(t.nodeData=this.getNodeData(e),this.trigger("nodeSelected",t))},r.prototype.setFocusElement=function(e){if(!t.isNullOrUndefined(e)){var i=this.getFocusedNode();i&&t.removeClass([i],ii),t.addClass([e],ii),this.updateIdAttr(i,e)}},r.prototype.addSelect=function(e){e.setAttribute("aria-selected","true"),t.addClass([e],Rt);var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.selectedNodes.indexOf(i)||this.selectedNodes.push(i)},r.prototype.removeSelect=function(e){this.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),t.removeClass([e],Rt);var i=this.selectedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.selectedNodes.splice(i,1)},r.prototype.removeSelectAll=function(){for(var e=this.element.querySelectorAll("."+Rt),i=0,s=e;i<s.length;i++){var n=s[i];this.allowMultiSelection?n.setAttribute("aria-selected","false"):n.removeAttribute("aria-selected")}t.removeClass(e,Rt),this.setProperties({selectedNodes:[]},!0)},r.prototype.getSelectEvent=function(e,i,s){var n=this.getNodeData(e);return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,nodeData:n}},r.prototype.setExpandOnType=function(){this.expandOnType="Auto"===this.expandOn?t.Browser.isDevice?"Click":"DblClick":this.expandOn},r.prototype.expandHandler=function(e){var i=e.originalEvent.target;!i||i.classList.contains("e-input")||i.classList.contains(Dt)||i.classList.contains(Ht)||i.classList.contains(Tt)||i.classList.contains(qt)||this.showCheckBox&&t.closest(i,"."+ei)||this.expandCollapseAction(t.closest(i,"."+Tt),e)},r.prototype.expandCollapseAction=function(e,i){var s=t.select("div."+qt,e);if(s&&!s.classList.contains(Ft)){var n=s.classList;n.contains(Mt)?this.expandAction(e,s,i):n.contains(Pt)&&this.collapseNode(e,s,i)}},r.prototype.expandAction=function(e,i,s,n,l){var o=this;i.classList.contains(Ft)||(t.addClass([i],Ft),this.isLoaded?(this.expandArgs=this.getExpandEvent(e,s),this.trigger("nodeExpanding",this.expandArgs,function(s){s.cancel?t.removeClass([i],Ft):o.nodeExpandAction(e,i,n,l)})):this.nodeExpandAction(e,i,n,l))},r.prototype.nodeExpandAction=function(e,i,s,n){var l=t.select("."+Ht,e);if(l&&"UL"===l.nodeName)this.expandNode(e,i);else{this.renderChildNodes(e,s,n);for(var o=t.selectAll("."+Tt,e),r=0;r<o.length;r++){var a=this.getId(o[r]);if(-1!==this.expandChildren.indexOf(a)&&void 0!==this.expandChildren){var d=t.select("."+Mt,t.select("."+Vt,o[r]));t.isNullOrUndefined(d)||this.expandAction(o[r],d,null),this.expandChildren.splice(this.expandChildren.indexOf(a),1)}}}},r.prototype.keyActionHandler=function(e){var i=this,s=e.target,n=this.getFocusedNode();if(s&&s.classList.contains("e-input")){var l=s;"enter"===e.action?(l.blur(),this.element.focus(),t.addClass([n],Bt)):"escape"===e.action&&(l.value=this.oldText,l.blur(),this.element.focus(),t.addClass([n],Bt))}else{e.preventDefault();var o={cancel:!1,event:e,node:n};this.trigger("keyPress",o,function(s){if(!s.cancel)switch(e.action){case"space":i.showCheckBox&&i.checkNode(e);break;case"moveRight":i.openNode(!i.enableRtl,e);break;case"moveLeft":i.openNode(!!i.enableRtl,e);break;case"shiftDown":i.shiftKeySelect(!0,e);break;case"moveDown":case"ctrlDown":case"csDown":i.navigateNode(!0);break;case"shiftUp":i.shiftKeySelect(!1,e);break;case"moveUp":case"ctrlUp":case"csUp":i.navigateNode(!1);break;case"home":case"shiftHome":case"ctrlHome":case"csHome":i.navigateRootNode(!0);break;case"end":case"shiftEnd":case"ctrlEnd":case"csEnd":i.navigateRootNode(!1);break;case"enter":case"ctrlEnter":case"shiftEnter":case"csEnter":i.toggleSelect(n,e);break;case"f2":i.allowEditing&&!n.classList.contains("e-disable")&&i.createTextbox(n,e);break;case"ctrlA":if(i.allowMultiSelection){var l=t.selectAll("."+Tt+":not(."+Rt+")",i.element);i.selectGivenNodes(l)}}})}},r.prototype.navigateToFocus=function(e){var i=this.getFocusedNode().querySelector("."+Vt),s=i.getBoundingClientRect(),n=this.getScrollParent(this.element);if(!t.isNullOrUndefined(n)){var l=n.getBoundingClientRect();s.bottom>l.bottom?n.scrollTop+=s.bottom-l.bottom:s.top<l.top&&(n.scrollTop-=l.top-s.top)}this.isVisibleInViewport(i)||i.scrollIntoView(e)},r.prototype.isVisibleInViewport=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},r.prototype.getScrollParent=function(e){return t.isNullOrUndefined(e)?null:e.scrollHeight>e.clientHeight?e:this.getScrollParent(e.parentElement)},r.prototype.shiftKeySelect=function(e,t){if(this.allowMultiSelection){var i=this.getFocusedNode(),s=e?this.getNextNode(i):this.getPrevNode(i);this.removeHover(),this.setFocusElement(s),this.toggleSelect(s,t,!1),this.navigateToFocus(!e)}else this.navigateNode(e)},r.prototype.checkNode=function(e){var i=this.getFocusedNode(),s=t.select("."+ei,i),n=t.select(" ."+ti,s).classList.contains(Zt);i.classList.contains("e-disable")||0==i.getElementsByClassName("e-checkbox-disabled").length&&this.validateCheckNode(s,n,i,e)},r.prototype.validateCheckNode=function(e,i,s,n){var l=this,o=t.closest(e,"."+Tt);this.checkActionNodes=[];var r=i?"false":"true";t.isNullOrUndefined(r)||e.setAttribute("aria-checked",r);var a=this.getCheckEvent(o,i?"uncheck":"check",n);this.trigger("nodeChecking",a,function(t){t.cancel||l.nodeCheckingAction(e,i,s,t,n)})},r.prototype.nodeCheckingAction=function(e,i,s,n,l){if(-1===this.checkedElement.indexOf(s.getAttribute("data-uid"))){this.checkedElement.push(s.getAttribute("data-uid"));var o=this.getChildNodes(this.treeData,s.getAttribute("data-uid"));null!==o?this.allCheckNode(o,this.checkedElement,null,null,!1):o=null}if(this.changeState(e,i?"uncheck":"check",l,!0),this.autoCheck){this.ensureChildCheckState(s),this.ensureParentCheckState(t.closest(t.closest(s,"."+Ht),"."+Tt));var r=void 0;"check"===n.action?r=!0:"uncheck"===n.action&&(r=!1),this.ensureStateChange(s,r)}this.nodeCheckedEvent(e,i,l)},r.prototype.ensureStateChange=function(e,i){var s=t.select("."+Ht,e),n=e.getAttribute("data-uid"),o=this.fields;if(1===this.dataType&&this.autoCheck)for(var r=new l.DataManager(this.treeData).executeLocal((new l.Query).where(o.parentID,"equal",n,!0)),a=0;a<r.length;a++){var d=r[a][this.fields.id]?r[a][this.fields.id].toString():null,h=r[a][this.fields.isChecked]?r[a][this.fields.isChecked].toString():null;if(-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(d)){this.checkedNodes.push(d);var c=this.getChildNodes(this.treeData,d);this.getChildItems(c,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}else if(-1===this.checkedNodes.indexOf(n)&&null===s&&-1!==this.checkedNodes.indexOf(d)){if(this.checkedNodes.splice(this.checkedNodes.indexOf(d),1),"true"===h&&this.updateField(this.treeData,this.fields,d,"isChecked",null),-1===this.checkedNodes.indexOf(n)&&null===s||-1!==this.parentNodeCheck.indexOf(d)){var p=this.getChildNodes(this.treeData,d);this.getChildItems(p,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}}else{c=this.getChildNodes(this.treeData,d);this.getChildItems(c,i)}}else if(1!==this.dataType||this.autoCheck){(c=this.getChildNodes(this.treeData,n))&&this.childStateChange(c,n,s,i)}else if(i)for(a=0;a<this.treeData.length;a++){var u=this.treeData[a][this.fields.id]?this.treeData[a][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(u)&&this.checkedNodes.push(u)}else{for(var f=new l.DataManager(this.treeData).executeLocal((new l.Query).where(o.isChecked,"equal",!0,!1)),a=0;a<f.length;a++){var m=f[a][this.fields.id]?f[a][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(m)&&this.checkedNodes.splice(this.checkedNodes.indexOf(m),1),this.updateField(this.treeData,this.fields,m,"isChecked",null)}this.checkedNodes=[]}},r.prototype.getChildItems=function(e,t){for(var i=0;i<e.length;i++){var s=e[i][this.fields.id]?e[i][this.fields.id].toString():null,n=e[i][this.fields.isChecked]?e[i][this.fields.isChecked].toString():null;-1===this.checkedNodes.indexOf(s)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(s),1),-1===this.checkedNodes.indexOf(s)&&t&&this.checkedNodes.push(s),"true"!==n||t||this.updateField(this.treeData,this.fields,s,"isChecked",null);var l=this.getChildNodes(this.treeData,s);l.length>0&&this.getChildItems(l,t)}},r.prototype.childStateChange=function(e,t,i,s){for(var n=0;n<e.length;n++){var l=e[n][this.fields.id]?e[n][this.fields.id].toString():"",o=e[n][this.fields.isChecked]?e[n][this.fields.isChecked].toString():null;this.autoCheck?-1!==this.checkedNodes.indexOf(t)&&-1===this.checkedNodes.indexOf(l)?(this.checkedNodes.push(l),-1!==this.parentNodeCheck.indexOf(l)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(l),1)):-1!==this.checkedNodes.indexOf(t)||null!==i||s||(this.checkedNodes.splice(this.checkedNodes.indexOf(l),1),"true"===o&&this.updateField(this.treeData,this.fields,l,"isChecked",null)):this.autoCheck||(s?-1===this.checkedNodes.indexOf(l)&&this.checkedNodes.push(l):(-1!==this.checkedNodes.indexOf(l)&&this.checkedNodes.splice(this.checkedNodes.indexOf(l),1),this.updateField(this.treeData,this.fields,l,"isChecked",null),this.checkedNodes=[]));var r=this.getChildNodes(this.treeData,l);r&&this.childStateChange(r,t,i,s)}},r.prototype.allCheckNode=function(e,i,s,n,l){if(e)for(var o=0;o<e.length;o++){var r=t.getValue(this.fields.id,e[o]),a=this.element.querySelector('[data-uid="'+r+'"]');if(!1!==l&&-1===this.checkedElement.indexOf(r.toString())&&(null===a&&!t.isNullOrUndefined(e[o][this.fields.isChecked])&&-1===i.indexOf(r.toString())||0===n||2===s)&&(!1!==e[o][this.fields.isChecked]||2===s?i.push(r.toString()):n=null,n=!1!==e[o][this.fields.isChecked]||2===s?0:null),-1===i.indexOf(r.toString())&&t.isNullOrUndefined(s)&&i.push(r.toString()),!0===t.getValue(this.fields.hasChildren,e[o])||t.getValue(this.fields.child.toString(),e[o])){var d=t.getValue(this.fields.id,e[o]),h=this.getChildNodes(this.treeData,d.toString());h&&(t.isNullOrUndefined(l)?this.allCheckNode(h,i,s,n):this.allCheckNode(h,i,s,n,l),n=null)}n=null}},r.prototype.openNode=function(e,i){var s=this.getFocusedNode(),n=t.select("div."+qt,s);if(e){if(!n)return;n.classList.contains(Mt)?this.expandAction(s,n,i):this.focusNextNode(s,!0)}else if(n&&n.classList.contains(Pt))this.collapseNode(s,n,i);else{var l=t.closest(t.closest(s,"."+Ht),"."+Tt);if(!l)return;l.classList.contains("e-disable")||(this.setFocus(s,l),this.navigateToFocus(!0))}},r.prototype.navigateNode=function(e){var t=this.getFocusedNode();this.focusNextNode(t,e)},r.prototype.navigateRootNode=function(e){var t=this.getFocusedNode(),i=e?this.getRootNode():this.getEndNode();i.classList.contains("e-disable")||(this.setFocus(t,i),this.navigateToFocus(e))},r.prototype.getFocusedNode=function(){var e,i=t.select("."+Tt+"."+ii,this.element);return t.isNullOrUndefined(i)&&(e=t.select("."+Tt,this.element)),t.isNullOrUndefined(i)?t.isNullOrUndefined(e)?this.element.firstElementChild:e:i},r.prototype.focusNextNode=function(e,t){var i=t?this.getNextNode(e):this.getPrevNode(e);if(this.setFocus(e,i),this.navigateToFocus(!t),i.classList.contains("e-disable")){var s=i.lastChild;null==i.previousSibling&&i.classList.contains("e-level-1")?this.focusNextNode(i,!0):null==i.nextSibling&&i.classList.contains("e-node-collapsed")?this.focusNextNode(i,!1):null==i.nextSibling&&s.classList.contains("e-text-content")?this.focusNextNode(i,!1):this.focusNextNode(i,t)}},r.prototype.getNextNode=function(e){var i,s=this.liList.indexOf(e);do{if(s++,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},r.prototype.getPrevNode=function(e){var i,s=this.liList.indexOf(e);do{if(s--,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},r.prototype.getRootNode=function(){var e,i=0;do{e=this.liList[i],i++}while(!t.isVisible(e));return e},r.prototype.getEndNode=function(){var e,i=this.liList.length-1;do{e=this.liList[i],i--}while(!t.isVisible(e));return e},r.prototype.setFocus=function(e,i){t.removeClass([e],[Bt,ii]),i.classList.contains("e-disable")||(t.addClass([i],[Bt,ii]),this.updateIdAttr(e,i))},r.prototype.updateIdAttr=function(e,t){this.element.removeAttribute("aria-activedescendant"),e&&e.removeAttribute("id"),t.setAttribute("id",this.element.id+"_active"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active")},r.prototype.focusIn=function(){this.mouseDownStatus||t.addClass([this.getFocusedNode()],Bt),this.mouseDownStatus=!1},r.prototype.focusOut=function(){t.removeClass([this.getFocusedNode()],Bt)},r.prototype.onMouseOver=function(e){var i=e.target,s=i.classList,n=t.closest(i,"."+Tt);!n||s.contains(Ht)||s.contains(Tt)?this.removeHover():n&&!n.classList.contains("e-disable")&&this.setHover(n)},r.prototype.setHover=function(e){e.classList.contains(Bt)||(this.removeHover(),t.addClass([e],Bt))},r.prototype.onMouseLeave=function(e){this.removeHover()},r.prototype.removeHover=function(){var e=t.selectAll("."+Bt,this.element);e&&e.length&&t.removeClass(e,Bt)},r.prototype.getNodeData=function(e,i){if(!t.isNullOrUndefined(e)&&e.classList.contains(Tt)&&!t.isNullOrUndefined(t.closest(e,".e-control"))&&t.closest(e,".e-control").classList.contains(Dt)){var s=e.getAttribute("data-uid"),n=this.getText(e,i),l=t.closest(e.parentNode,"."+Tt),o=l?l.getAttribute("data-uid"):null,r=e.classList.contains(Rt),a="true"===e.getAttribute("aria-expanded"),d=null!==e.getAttribute("aria-expanded"),h=null;return this.showCheckBox&&(h=t.select("."+ei,e).getAttribute("aria-checked")),{id:s,text:n,parentID:o,selected:r,expanded:a,isChecked:h,hasChildren:d}}return{id:"",text:"",parentID:"",selected:!1,expanded:!1,isChecked:"",hasChildren:!1}},r.prototype.getText=function(e,i){if(i){var s=this.getNodeObject(e.getAttribute("data-uid")),n=parseFloat(e.getAttribute("aria-level")),l=this.getFields(this.fields,n,1);return t.getValue(l.text,s)}return t.select("."+Ut,e).textContent},r.prototype.getExpandEvent=function(e,i){var s=this.getNodeData(e);return{cancel:!1,isInteracted:!t.isNullOrUndefined(i),node:e,nodeData:s,event:i}},r.prototype.destroyTemplate=function(e){this.clearTemplate(["nodeTemplate"])},r.prototype.reRenderNodes=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.isBlazorPlatform&&this.element.firstElementChild?this.element.removeChild(this.element.firstElementChild):this.element.innerHTML="",t.isNullOrUndefined(this.nodeTemplateFn)||this.destroyTemplate(this.nodeTemplate),this.setTouchClass(),this.setProperties({selectedNodes:[],checkedNodes:[],expandedNodes:[]},!0),this.checkedElement=[],this.isLoaded=!1,this.setDataBinding()},r.prototype.setCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},r.prototype.editingHandler=function(e){var i=e.target;if(!(!i||i.classList.contains(Dt)||i.classList.contains(Ht)||i.classList.contains(Tt)||i.classList.contains(qt)||i.classList.contains("e-input")||i.classList.contains("e-input-group"))){var s=t.closest(i,"."+Tt);this.createTextbox(s,e)}},r.prototype.createTextbox=function(e,i){var s=this,n=t.select("."+Wt,this.element);n&&n.blur();var l=t.select("."+Ut,e);this.updateOldText(e);var r=this.createElement("input",{className:Wt,attrs:{value:this.oldText}}),a=this.getEditEvent(e,null,r.outerHTML);this.trigger("nodeEditing",a,function(i){if(!i.cancel){var n="width:"+(l.offsetWidth+5)+"px";t.addClass([e],"e-editing"),l.innerHTML=a.innerHtml;var r=t.select("."+Wt,l);s.inputObj=o.Input.createInput({element:r,properties:{enableRtl:s.enableRtl}},s.createElement),s.inputObj.container.setAttribute("style",n),r.focus();var d=r;d.setSelectionRange(0,d.value.length),s.wireInputEvents(r)}})},r.prototype.updateOldText=function(e){var i=e.getAttribute("data-uid");this.editData=this.getNodeObject(i);var s=parseFloat(e.getAttribute("aria-level"));this.editFields=this.getFields(this.fields,s,1),this.oldText=t.getValue(this.editFields.text,this.editData)},r.prototype.inputFocusOut=function(e){if(t.select("."+Wt,this.element)){var i=e.target,s=i.value,n=t.closest(i,"."+Ut),l=t.closest(i,"."+Tt);t.detach(this.inputObj.container),this.appendNewText(l,n,s,!0)}},r.prototype.appendNewText=function(e,i,s,n){var l=this,o=this.getEditEvent(e,s,null);this.trigger("nodeEdited",o,function(o){s=o.cancel?o.oldText:o.newText;var r=t.setValue(l.editFields.text,s,l.editData);if(t.isNullOrUndefined(l.nodeTemplateFn))i.innerHTML=s;else{i.innerHTML="";var a=l.nodeTemplateFn(r,void 0,void 0,l.element.id+"nodeTemplate",l.isStringTemplate);a=Array.prototype.slice.call(a),t.append(a,i),l.updateBlazorTemplate()}n&&(t.removeClass([e],"e-editing"),i.focus()),o.oldText!==s&&l.triggerEvent()})},r.prototype.getElement=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?this.element.querySelector('[data-uid="'+e+'"]'):"object"==typeof e?t.getElement(e):null},r.prototype.getId=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?e:"object"==typeof e?t.getElement(e).getAttribute("data-uid"):null},r.prototype.getEditEvent=function(e,t,i){return{cancel:!1,newText:t,node:e,nodeData:this.getNodeData(e),oldText:this.oldText,innerHtml:i}},r.prototype.getNodeObject=function(e){if(!t.isNullOrUndefined(e)){if(1!==this.dataType)return this.getChildNodeObject(this.treeData,this.fields,e);for(var i=0,s=this.treeData.length;i<s;i++){var n=t.getValue(this.fields.id,this.treeData[i]);if(!t.isNullOrUndefined(this.treeData[i])&&!t.isNullOrUndefined(n)&&n.toString()===e)return this.treeData[i]}}},r.prototype.getChildNodeObject=function(e,i,s){var n;if(t.isNullOrUndefined(e))return n;for(var o=0,r=e.length;o<r;o++){var a=t.getValue(i.id,e[o]);if(e[o]&&a&&a.toString()===s)return e[o];if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[o]))){if(this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[o]))){if(void 0!==(n=this.getChildNodeObject(t.getValue("child",e[o]),this.getChildMapper(i),s)))break}}else{var d=t.getValue(i.child,e[o]);if(void 0!==(n=this.getChildNodeObject(d,this.getChildMapper(i),s)))break}}return n},r.prototype.setDragAndDrop=function(e){e?this.initializeDrag():this.destroyDrag()},r.prototype.initializeDrag=function(){var e,i=this,s=this;this.dragObj=new t.Draggable(this.element,{enableTailMode:!0,enableAutoScroll:!0,dragTarget:"."+Vt,helper:function(n){i.dragTarget=n.sender.target;var l=t.closest(i.dragTarget,"."+Dt),o=t.closest(i.dragTarget,"."+Vt);if(i.dragLi=t.closest(i.dragTarget,"."+Tt),i.fullRowSelect&&!o&&i.dragTarget.classList.contains(Yt)&&(o=i.dragTarget.nextElementSibling),!i.dragTarget||!n.element.isSameNode(l)||!o||i.dragTarget.classList.contains(Dt)||i.dragTarget.classList.contains(Ht)||i.dragTarget.classList.contains(Tt)||i.dragLi.classList.contains("e-disable"))return!1;var r=o.cloneNode(!0);if(t.isNullOrUndefined(t.select("div."+qt,r))){var a=s.createElement("div",{className:qt+" "+Mt});r.insertBefore(a,r.children[0])}var d="e-drag-item "+Dt+" "+i.cssClass+" "+(i.enableRtl?"e-rtl":"");(e=s.createElement("div",{className:d})).appendChild(r);var h=i.selectedNodes.length;if(h>1&&i.allowMultiSelection&&i.dragLi.classList.contains(Rt)){var c=s.createElement("span",{className:"e-drop-count",innerHTML:""+h});e.appendChild(c)}return document.body.appendChild(e),document.body.style.cursor="",i.dragData=i.getNodeData(i.dragLi),e},dragStart:function(s){t.addClass([i.element],zt);var n,l=t.closest(s.target,".e-list-item");l&&(n=parseInt(l.getAttribute("aria-level"),10));var o=i.getDragEvent(s.event,i,null,s.target,null,e,n);o.draggedNode.classList.contains("e-editing")?i.dragCancelAction(e):i.trigger("nodeDragStart",o,function(n){n.cancel?i.dragCancelAction(e):i.dragStartAction=!0,t.isBlazor()&&s.bindEvents(t.getElement(s.dragElement))})},drag:function(s){i.dragObj.setProperties({cursorAt:{top:!t.isNullOrUndefined(s.event.targetTouches)||t.Browser.isDevice?60:-20}}),i.dragAction(s,e)},dragStop:function(e){t.removeClass([i.element],zt),i.removeVirtualEle();var s=e.target,n=t.closest(s,".e-droppable");s&&n||(t.detach(e.helper),document.body.style.cursor="");var l,o=t.closest(s,".e-list-item");o&&(l=parseInt(o.getAttribute("aria-level"),10));var r=i.getDragEvent(e.event,i,s,s,null,e.helper,l);r.preventTargetExpand=!1,(i.isBlazorPlatform&&i.dragStartAction||!i.isBlazorPlatform)&&i.trigger("nodeDragStop",r,function(s){i.dragParent=s.draggedParentNode,i.preventExpand=s.preventTargetExpand,s.cancel&&(e.helper.parentNode&&t.detach(e.helper),document.body.style.cursor=""),i.dragStartAction=!1})}}),this.dropObj=new t.Droppable(this.element,{out:function(e){t.isNullOrUndefined(e)||e.target.classList.contains(_t)||(document.body.style.cursor="not-allowed")},over:function(e){document.body.style.cursor=""},drop:function(e){i.dropAction(e)}})},r.prototype.dragCancelAction=function(e){t.detach(e),t.removeClass([this.element],zt),this.dragStartAction=!1},r.prototype.dragAction=function(e,i){var s=t.closest(e.target,".e-droppable"),n=t.closest(e.target,"."+Vt),l=t.select("div."+qt,i);t.removeClass([l],["e-drop-in",Kt,Gt,"e-no-drop"]),this.removeVirtualEle(),document.body.style.cursor="";var o=e.target.classList;if(this.fullRowSelect&&!n&&!t.isNullOrUndefined(o)&&o.contains(Yt)&&(n=e.target.nextElementSibling),s){var r=t.closest(e.target,"."+Tt),a=t.closest(e.target,"."+ei);if(!s.classList.contains(Dt)||n&&!r.isSameNode(this.dragLi)&&!this.isDescendant(this.dragLi,r))if(r&&e&&e.event.offsetY<7&&!a){t.addClass([l],Kt);var d=this.createElement("div",{className:_t}),h=this.fullRowSelect?1:0;r.insertBefore(d,r.children[h])}else if(r&&e&&e.target.offsetHeight>0&&e.event.offsetY>e.target.offsetHeight-10&&!a){t.addClass([l],Kt);d=this.createElement("div",{className:_t}),h=this.fullRowSelect?2:1;r.insertBefore(d,r.children[h])}else t.addClass([l],"e-drop-in");else"LI"!==e.target.nodeName||r.isSameNode(this.dragLi)||this.isDescendant(this.dragLi,r)?e.target.classList.contains(_t)?t.addClass([l],Kt):t.addClass([l],Gt):(t.addClass([l],Kt),this.renderVirtualEle(e))}else t.addClass([l],"e-no-drop"),document.body.style.cursor="not-allowed";var c,p=t.closest(e.target,".e-list-item");p&&(c=parseInt(p.getAttribute("aria-level"),10));var u=this.getDragEvent(e.event,this,e.target,e.target,null,i,c);u.dropIndicator&&t.removeClass([l],u.dropIndicator),this.trigger("nodeDragging",u),u.dropIndicator&&t.addClass([l],u.dropIndicator)},r.prototype.dropAction=function(e){for(var i,s,n=e.event.offsetY,o=e.target,r=!1,d=e.dragData.draggable,h=0;h<d.ej2_instances.length;h++)if(d.ej2_instances[h]instanceof a){i=d.ej2_instances[h];break}if(i&&i.dragTarget){var c=i.dragTarget,p=t.closest(c,"."+Tt),u=t.closest(o,"."+Tt);if(null==u&&o.classList.contains(Dt)&&(u=o.firstElementChild),t.detach(e.droppedElement),document.body.style.cursor="",!u||u.isSameNode(p)||this.isDescendant(p,u))return void(this.fields.dataSource instanceof l.DataManager==!1&&(this.preventExpand=!1));if(i.allowMultiSelection&&p.classList.contains(Rt)){var f=t.selectAll("."+Rt,i.element);if(e.target.offsetHeight<=33&&n>e.target.offsetHeight-10&&n>6)for(h=f.length-1;h>=0;h--)u.isSameNode(f[h])||this.isDescendant(f[h],u)||this.appendNode(o,f[h],u,e,i,n);else for(h=0;h<f.length;h++)u.isSameNode(f[h])||this.isDescendant(f[h],u)||this.appendNode(o,f[h],u,e,i,n)}else this.appendNode(o,p,u,e,i,n);s=parseInt(p.getAttribute("aria-level"),10),r=!0}this.fields.dataSource instanceof l.DataManager==!1&&(this.preventExpand=!1),this.trigger("nodeDropped",this.getDragEvent(e.event,i,o,e.target,e.dragData.draggedElement,null,s,r)),this.triggerEvent()},r.prototype.appendNode=function(e,i,s,n,l,o){var r=t.closest(e,"."+ei);i.classList.contains("e-disable")||s.classList.contains("e-disable")||r?r&&this.dropAsChildNode(i,s,l,null,n,o,!0):"LI"===e.nodeName?this.dropAsSiblingNode(i,s,n,l):e.firstElementChild&&e.classList.contains(Dt)?"UL"===e.firstElementChild.nodeName&&this.dropAsSiblingNode(i,s,n,l):this.dropAsChildNode(i,s,l,null,n,o)},r.prototype.dropAsSiblingNode=function(e,i,s,n){var l,o=t.closest(i,"."+Ht),r=t.closest(e,"."+Ht),a=t.closest(r,"."+Tt);s.target.offsetHeight>0&&s.event.offsetY>s.target.offsetHeight-2?l=!1:s.event.offsetY<2&&(l=!0),o.insertBefore(e,l?s.target:s.target.nextElementSibling),this.moveData(e,i,o,l,n),this.updateElement(r,a),this.updateAriaLevel(e),n.element.id===this.element.id?this.updateList():(n.updateInstance(),this.updateInstance())},r.prototype.dropAsChildNode=function(e,i,s,n,l,o,r){var a=t.closest(e,"."+Ht),d=t.closest(a,"."+Tt),h=t.closest(i,"."+Ht);if(l&&o<7&&!r)h.insertBefore(e,i),this.moveData(e,i,h,!0,s);else if(l&&l.target.offsetHeight>0&&o>l.target.offsetHeight-10&&!r)h.insertBefore(e,i.nextElementSibling),this.moveData(e,i,h,!1,s);else{var c=this.expandParent(i),p=c.childNodes[n];c.insertBefore(e,p),this.moveData(e,p,c,!0,s)}this.updateElement(a,d),this.updateAriaLevel(e),s.element.id===this.element.id?this.updateList():(s.updateInstance(),this.updateInstance())},r.prototype.moveData=function(e,i,s,n,l){var o=t.closest(s,"."+Tt),r=this.getId(e),a=l.updateChildField(l.treeData,l.fields,r,null,null,!0),d=this.getId(i),h=this.getDataPos(this.treeData,this.fields,d),c=this.getId(o);if(1===this.dataType){this.updateField(this.treeData,this.fields,c,"hasChildren",!0);var p=t.isNullOrUndefined(h)?this.treeData.length:n?h:h+1;if(t.isNullOrUndefined(c)&&!this.hasPid)delete a[0][this.fields.parentID];else{var u=this.isNumberTypeId?parseFloat(c):c;t.setValue(this.fields.parentID,u,a[0])}if(this.treeData.splice(p,0,a[0]),l.element.id!==this.element.id){var f=l.removeChildNodes(r);p++;for(var m=0,g=f.length;m<g;m++)this.treeData.splice(p,0,f[m]),p++;l.groupedData=l.getGroupedData(l.treeData,l.fields.parentID)}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.addChildData(this.treeData,this.fields,c,a,n?h:h+1)},r.prototype.expandParent=function(e){var s=t.select("div."+qt,e);s&&s.classList.contains(Mt)&&!0!==this.preventExpand&&this.expandAction(e,s,null);var n=t.select("."+Ht,e);if(!0===this.preventExpand&&!n&&s&&this.renderChildNodes(e),n=t.select("."+Ht,e),t.isNullOrUndefined(n)||!0!==this.preventExpand||(n.style.display="none"),t.isNullOrUndefined(n)||!1!==this.preventExpand||(n.style.display="block"),t.isNullOrUndefined(n)&&!0===this.preventExpand){t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,Mt,this.listBaseOption);(l=t.select("div."+qt,e))&&l.classList.add("e-icon-expandable"),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),l?t.removeClass([l],Pt):i.ListBase.generateIcon(this.createElement,e,Mt,this.listBaseOption),e.setAttribute("aria-expanded","false"),n.style.display="none"}if(t.isNullOrUndefined(n)){this.trigger("nodeExpanding",this.getExpandEvent(e,null)),t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,Pt,this.listBaseOption);var l;(l=t.select("div."+qt,e))?t.removeClass([l],Mt):(i.ListBase.generateIcon(this.createElement,e,Pt,this.listBaseOption),l=t.select("div."+qt,e),t.removeClass([l],Mt)),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),this.addExpand(e),this.trigger("nodeExpanded",this.getExpandEvent(e,null))}return n},r.prototype.updateElement=function(e,i){if(i&&0===e.childElementCount){var s=t.select("div."+qt,i);t.detach(e),t.detach(s);var n=this.getId(i);this.updateField(this.treeData,this.fields,n,"hasChildren",!1),this.removeExpand(i,!0)}},r.prototype.updateAriaLevel=function(e){var i=this.parents(e,"."+Ht).length;e.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+Ht,e),i+1)},r.prototype.updateChildAriaLevel=function(e,i){if(!t.isNullOrUndefined(e))for(var s=e.childNodes,n=0,l=s.length;n<l;n++){var o=s[n];o.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+Ht,o),i+1)}},r.prototype.renderVirtualEle=function(e){var t;e.event.offsetY>e.target.offsetHeight-2?t=!1:e.event.offsetY<2&&(t=!0);var i=this.createElement("div",{className:_t}),s=this.fullRowSelect?t?1:2:t?0:1;e.target.insertBefore(i,e.target.children[s])},r.prototype.removeVirtualEle=function(){var e=t.select("."+_t);e&&t.detach(e)},r.prototype.destroyDrag=function(){this.dragObj&&this.dropObj&&(this.dragObj.destroy(),this.dropObj.destroy())},r.prototype.getDragEvent=function(e,i,s,n,o,r,a,d){var h=s?t.closest(s,"."+Tt):null,c=h?this.getNodeData(h):null,p=i?i.dragLi:o,u=i?i.dragData:null,f=s?this.parents(s,"."+Tt):null,m=i.dragLi.parentElement,g=i.dragLi?t.closest(m,"."+Tt):null,v=null,y=null,b=[Kt,"e-drop-in",Gt,"e-no-drop"],C=null,N=!0===d?p:h,E=N?t.closest(N,".e-list-parent"):null,x=0;if(g=i.dragLi&&null===g?t.closest(m,"."+Dt):g,g=!0===d?this.dragParent:g,r)for(;x<4;){if(t.select("."+qt,r).classList.contains(b[x])){C=b[x];break}x++}if(E){var O=0;for(x=0;x<E.childElementCount;x++){if(O=!0!==d&&E.children[x]===p&&h!==p?++O:O,!0!==d&&E.children[x].classList.contains("e-hover")){y=e.offsetY>=23?x+1:x;break}if(E.children[x]===N){e.offsetY,y=x;break}}y=0!==O?--y:y}if(s&&(v=0===f.length?null:s.classList.contains(Tt)?f[0]:f[1]),h===p&&(v=h),s&&n.offsetHeight<=33&&e.offsetY<n.offsetHeight-10&&e.offsetY>6&&(v=h,!0!==d)){a=++a;var k=v?t.select(".e-list-parent",v):null;if(y=k?k.children.length:0,!(this.fields.dataSource instanceof l.DataManager)&&null===k&&v){var S=v.hasAttribute("data-uid")?this.getChildNodes(this.fields.dataSource,v.getAttribute("data-uid").toString()):null;y=S?S.length:0}}return{cancel:!1,clonedNode:r,event:e,draggedNode:p,draggedNodeData:u,droppedNode:h,droppedNodeData:c,dropIndex:y,dropLevel:a,draggedParentNode:g,dropTarget:v,dropIndicator:C,target:n}},r.prototype.addFullRow=function(e){var i=this.liList.length;if(e)for(var s=0;s<i;s++)this.createFullRow(this.liList[s]);else for(s=0;s<i;s++){var n=t.select("."+Yt,this.liList[s]);t.detach(n)}},r.prototype.createFullRow=function(e){var t=this.createElement("div",{className:Yt});e.insertBefore(t,e.childNodes[0])},r.prototype.addMultiSelect=function(e){if(e)for(var i=0,s=t.selectAll("."+Tt+':not([aria-selected="true"])',this.element);i<s.length;i++){s[i].setAttribute("aria-selected","false")}else for(var n=0,l=t.selectAll("."+Tt+'[aria-selected="false"]',this.element);n<l.length;n++){l[n].removeAttribute("aria-selected")}},r.prototype.collapseByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),l=0,o=n.length;l<o;l++){var r=n[l],a=t.select("."+Pt,t.select("."+Vt,r));t.isNullOrUndefined(a)||this.collapseNode(r,a,null),this.collapseByLevel(t.select("."+Ht,r),i-1,s)}},r.prototype.collapseAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+Pt,this.element)),s=0,n=i.length;s<n;s++){var l=i[s],o=t.closest(l,"."+Tt);this.collapseNode(o,l,null)}},r.prototype.expandByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),l=0,o=n.length;l<o;l++){var r=n[l],a=t.select("."+Mt,t.select("."+Vt,r));t.isNullOrUndefined(a)||this.expandAction(r,a,null),this.expandByLevel(t.select("."+Ht,r),i-1,s)}},r.prototype.expandAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+Mt,this.element)),s=0,n=i.length;s<n;s++){var l=i[s],o=t.closest(l,"."+Tt);this.expandAction(o,l,null,!0)}},r.prototype.getVisibleNodes=function(e,i){var s=Array.prototype.slice.call(i);if(e)for(var n=0;n<s.length;n++)t.isVisible(s[n])||(s.splice(n,1),n--);return s},r.prototype.removeNode=function(e){var i=t.closest(e,"."+Ht),s=t.closest(i,"."+Tt);t.detach(e),this.updateElement(i,s),this.updateInstance(),this.removeData(e)},r.prototype.updateInstance=function(){this.updateList(),this.updateSelectedNodes(),this.updateExpandedNodes()},r.prototype.updateList=function(){this.liList=Array.prototype.slice.call(t.selectAll("."+Tt,this.element))},r.prototype.updateSelectedNodes=function(){this.setProperties({selectedNodes:[]},!0);var e=t.selectAll("."+Rt,this.element);this.selectGivenNodes(e)},r.prototype.updateExpandedNodes=function(){this.setProperties({expandedNodes:[]},!0);for(var e=t.selectAll('[aria-expanded="true"]',this.element),i=0,s=e.length;i<s;i++)this.addExpand(e[i])},r.prototype.removeData=function(e){if(1===this.dataType){var t=new l.DataManager(this.treeData),i=this.getId(e),s={},n=this.isNumberTypeId?parseFloat(i):i;s[this.fields.id]=n,t.remove(this.fields.id,s),this.removeChildNodes(i)}else{i=this.getId(e);this.updateChildField(this.treeData,this.fields,i,null,null,!0)}},r.prototype.removeChildNodes=function(e){var i=this.getChildGroup(this.groupedData,e,!1),s=[];if(i)for(var n=0,o=i.length;n<o;n++){var r=new l.DataManager(this.treeData),a=t.getValue(this.fields.id,i[n]).toString(),d={},h=this.isNumberTypeId?parseFloat(a):a;d[this.fields.id]=h;var c=r.remove(this.fields.id,d);s.push(c[0]),this.removeChildNodes(a)}return s},r.prototype.doGivenAction=function(e,i,s){for(var n=0,l=e.length;n<l;n++){var o=this.getElement(e[n]);if(!t.isNullOrUndefined(o)){var r=t.select("."+i,t.select("."+Vt,o));t.isNullOrUndefined(r)||(s?this.expandAction(o,r,null):this.collapseNode(o,r,null))}}},r.prototype.addGivenNodes=function(e,s,n,l,o){if(0!==e.length){var r=this.getSortedData(e),a=s?parseFloat(s.getAttribute("aria-level"))+1:1;l&&this.updateMapper(a);for(var d,h=i.ListBase.createListItemFromJson(this.createElement,r,this.listBaseOption,a),c=(d=o||(s?this.expandParent(s):t.select("."+Ht,this.element))).childNodes[n],p=0;p<h.length;p++)d.insertBefore(h[p],c);var u=this.getId(s);if(1===this.dataType){this.updateField(this.treeData,this.fields,u,"hasChildren",!0);for(var f=this.getId(c),m=t.isNullOrUndefined(f)?this.treeData.length:this.getDataPos(this.treeData,this.fields,f),g=0;g<e.length;g++){if(!t.isNullOrUndefined(u)){var v=this.isNumberTypeId?parseFloat(u):u;t.setValue(this.fields.parentID,v,e[g])}this.treeData.splice(m,0,e[g]),m++}}else this.addChildData(this.treeData,this.fields,u,e,n);this.finalizeNode(d)}},r.prototype.updateMapper=function(e){var t=1===e?this.fields:this.getChildFields(this.fields,e-1,1);this.updateListProp(t)},r.prototype.updateListProp=function(e){var t=this.getActualProperties(e);this.listBaseOption.fields=t,this.listBaseOption.fields.url=t.hasOwnProperty("navigateUrl")?t.navigateUrl:"navigateUrl"},r.prototype.getDataPos=function(e,i,s){for(var n=null,o=0,r=e.length;o<r;o++){var a=t.getValue(i.id,e[o]);if(e[o]&&a&&a.toString()===s)return o;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[o]))){if(this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[o]))){var d=t.getValue("child",e[o]);if(null!==(n=this.getDataPos(d,this.getChildMapper(i),s)))break}}else{var h=t.getValue(i.child,e[o]);if(null!==(n=this.getDataPos(h,this.getChildMapper(i),s)))break}}return n},r.prototype.addChildData=function(e,i,s,n,o){var r;if(t.isNullOrUndefined(s)){o=t.isNullOrUndefined(o)?e.length:o;for(var a=0,d=n.length;a<d;a++)e.splice(o,0,n[a]),o++;return r}for(var h=0,c=e.length;h<c;h++){var p=t.getValue(i.id,e[h]);if(e[h]&&p&&p.toString()===s){if("string"==typeof i.child&&e[h].hasOwnProperty(i.child)||this.fields.dataSource instanceof l.DataManager&&e[h].hasOwnProperty("child")){var u="string"==typeof i.child?i.child:"child",f=t.getValue(u,e[h]);o=t.isNullOrUndefined(o)?f.length:o;for(a=0,d=n.length;a<d;a++)f.splice(o,0,n[a]),o++}else{u="string"==typeof i.child?i.child:"child";e[h][u]=n}return!0}if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[h]))){if(this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[h]))){f=t.getValue("child",e[h]);if(void 0!==(r=this.addChildData(f,this.getChildMapper(i),s,n,o)))break}}else{var m=t.getValue(i.child,e[h]);if(void 0!==(r=this.addChildData(m,this.getChildMapper(i),s,n,o)))break}}return r},r.prototype.doDisableAction=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);if(t.isNullOrUndefined(n)){(e[i]?e[i].toString():null)&&-1===this.disableNode.indexOf(e[i].toString())&&this.disableNode.push(e[i].toString())}else n.setAttribute("aria-disabled","true"),t.addClass([n],"e-disable")}},r.prototype.doEnableAction=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);if(t.isNullOrUndefined(n)){var l=e[i]?e[i].toString():null;l&&-1!==this.disableNode.indexOf(l)&&this.disableNode.splice(this.disableNode.indexOf(l),1)}else n.removeAttribute("aria-disabled"),t.removeClass([n],"e-disable")}},r.prototype.setTouchClass=function(){var e=t.closest(this.element,".e-bigger");this.touchClass=t.isNullOrUndefined(e)?"":"e-small"},r.prototype.updatePersistProp=function(){this.removeField(this.treeData,this.fields,["selected","expanded"]);for(var e=this.selectedNodes,t=0,i=e.length;t<i;t++)this.updateField(this.treeData,this.fields,e[t],"selected",!0);for(var s=this.expandedNodes,n=0,l=s.length;n<l;n++)this.updateField(this.treeData,this.fields,s[n],"expanded",!0);if(this.showCheckBox){this.removeField(this.treeData,this.fields,["isChecked"]);var o=this.checkedNodes,r=0;for(l=o.length;r<l;r++)this.updateField(this.treeData,this.fields,o[r],"isChecked",!0)}},r.prototype.removeField=function(e,i,s){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i))for(var n=0,o=e.length;n<o;n++){for(var r=0;r<s.length;r++){var a=this.getMapperProp(i,s[r]);t.isNullOrUndefined(e[n][a])||delete e[n][a]}"string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[n]))?this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[n]))&&this.removeField(t.getValue("child",e[n]),this.getChildMapper(i),s):this.removeField(t.getValue(i.child,e[n]),this.getChildMapper(i),s)}},r.prototype.getMapperProp=function(e,i){switch(i){case"selected":return t.isNullOrUndefined(e.selected)?"selected":e.selected;case"expanded":return t.isNullOrUndefined(e.expanded)?"expanded":e.expanded;case"isChecked":return t.isNullOrUndefined(e.isChecked)?"isChecked":e.isChecked;case"hasChildren":return t.isNullOrUndefined(e.hasChildren)?"hasChildren":e.hasChildren;default:return i}},r.prototype.updateField=function(e,i,s,n,o){if(!t.isNullOrUndefined(s))if(1===this.dataType){var r=this.isNumberTypeId?parseFloat(s):s,a=new l.DataManager(this.treeData).executeLocal((new l.Query).where(i.id,"equal",r,!1));t.setValue(this.getMapperProp(i,n),o,a[0])}else this.updateChildField(e,i,s,n,o)},r.prototype.updateChildField=function(e,i,s,n,o,r){var a;if(t.isNullOrUndefined(e))return a;for(var d=0,h=e.length;d<h;d++){var c=t.getValue(i.id,e[d]);if(e[d]&&c&&c.toString()===s)return r?a=e.splice(d,1):(t.setValue(this.getMapperProp(i,n),o,e[d]),a=[]),a;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[d]))){if(this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[d]))){var p=t.getValue("child",e[d]);if(void 0!==(a=this.updateChildField(p,this.getChildMapper(i),s,n,o,r)))break}}else{var u=t.getValue(i.child,e[d]);if(void 0!==(a=this.updateChildField(u,this.getChildMapper(i),s,n,o,r)))break}}return a},r.prototype.triggerEvent=function(){this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate();var e={data:this.treeData};this.trigger("dataSourceChanged",e)},r.prototype.updateBlazorTemplate=function(){t.updateBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate",this,!1)},r.prototype.wireInputEvents=function(e){t.EventHandler.add(e,"blur",this.inputFocusOut,this)},r.prototype.wireEditingEvents=function(e){if(e){var i=this;this.touchEditObj=new t.Touch(this.element,{tap:function(e){2===e.tapCount&&(e.originalEvent.preventDefault(),i.editingHandler(e.originalEvent))}})}else this.touchEditObj&&this.touchEditObj.destroy()},r.prototype.wireClickEvent=function(e){if(e){var i=this;this.touchClickObj=new t.Touch(this.element,{tap:function(e){e.originalEvent.preventDefault(),i.clickHandler(e)}})}else this.touchClickObj&&this.touchClickObj.destroy()},r.prototype.wireExpandOnEvent=function(e){var i=this;if(e){var s=this;this.touchExpandObj=new t.Touch(this.element,{tap:function(e){("Click"===i.expandOnType||"DblClick"===i.expandOnType&&2===e.tapCount)&&s.expandHandler(e)}})}else this.touchExpandObj&&this.touchExpandObj.destroy()},r.prototype.mouseDownHandler=function(e){this.mouseDownStatus=!0,(e.shiftKey||e.ctrlKey)&&e.preventDefault(),e.ctrlKey&&this.allowMultiSelection&&t.EventHandler.add(this.element,"contextmenu",this.preventContextMenu,this)},r.prototype.preventContextMenu=function(e){e.preventDefault()},r.prototype.wireEvents=function(){t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this),this.wireClickEvent(!0),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0),t.EventHandler.add(this.element,"focus",this.focusIn,this),t.EventHandler.add(this.element,"blur",this.focusOut,this),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.element,"mouseout",this.onMouseLeave,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},r.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler),this.wireClickEvent(!1),this.wireExpandOnEvent(!1),t.EventHandler.remove(this.element,"focus",this.focusIn),t.EventHandler.remove(this.element,"blur",this.focusOut),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),t.EventHandler.remove(this.element,"mouseout",this.onMouseLeave),this.keyboardModule.destroy()},r.prototype.parents=function(e,i){for(var s=[],n=e.parentNode;!t.isNullOrUndefined(n);)t.matches(n,i)&&s.push(n),n=n.parentNode;return s},r.prototype.isDescendant=function(e,i){for(var s=i.parentNode;!t.isNullOrUndefined(s);){if(s===e)return!0;s=s.parentNode}return!1},r.prototype.showSpinner=function(e){t.addClass([e],jt),s.createSpinner({target:e,width:t.Browser.isDevice?16:14},this.createElement),s.showSpinner(e)},r.prototype.hideSpinner=function(e){s.hideSpinner(e),e.innerHTML="",t.removeClass([e],jt)},r.prototype.setCheckedNodes=function(e){e=JSON.parse(JSON.stringify(e)),this.uncheckAll(this.checkedNodes),this.setIndeterminate(e),e.length>0&&this.checkAll(e)},r.prototype.setValidCheckedNode=function(e){if(1===this.dataType){var i=this.fields,s=new l.DataManager(this.treeData).executeLocal((new l.Query).where(i.id,"equal",e,!0));if(s[0]&&(this.setChildCheckState(s,e,s[0]),this.autoCheck)){for(var n=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null,o=this.getChildNodes(this.treeData,n),r=0,a=0;a<o.length;a++){var d=o[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&r++}r===o.length&&-1===this.checkedNodes.indexOf(n)&&n&&this.checkedNodes.push(n)}}else if(2===this.dataType)for(var h=0;h<this.treeData.length;h++){if((this.treeData[h][this.fields.id]?this.treeData[h][this.fields.id].toString():"")===e&&-1===this.checkedNodes.indexOf(e)){this.checkedNodes.push(e);break}var c=t.getValue(this.fields.child.toString(),this.treeData[h]);c&&this.setChildCheckState(c,e,this.treeData[h])}},r.prototype.setChildCheckState=function(e,i,s){var n,l=0;if(1===this.dataType){s&&(n=s[this.fields.id]?s[this.fields.id].toString():null);for(var o=0;o<e.length;o++){var r=e[o][this.fields.id]?e[o][this.fields.id].toString():null;s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r),r===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i);(d=this.getChildNodes(this.treeData,r))&&this.setChildCheckState(d,i,s)}}else{s&&(n=s[this.fields.id]?s[this.fields.id].toString():"");for(o=0;o<e.length;o++){var a=e[o][this.fields.id]?e[o][this.fields.id].toString():"";s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(a)&&this.checkedNodes.push(a),a===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i);var d;(d=t.getValue(this.fields.child.toString(),e[o]))&&this.setChildCheckState(d,i,e[o]),-1!==this.checkedNodes.indexOf(a)&&this.autoCheck&&l++,l===e.length&&-1===this.checkedNodes.indexOf(n)&&this.autoCheck&&this.checkedNodes.push(n)}}},r.prototype.setIndeterminate=function(e){for(var t=0;t<e.length;t++)this.setValidCheckedNode(e[t])},r.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"allowDragAndDrop":this.setDragAndDrop(this.allowDragAndDrop);break;case"allowEditing":this.wireEditingEvents(this.allowEditing);break;case"allowMultiSelection":if(this.selectedNodes.length>1){var l=this.getElement(this.selectedNodes[0]);this.isLoaded=!1,this.removeSelectAll(),this.selectNode(l,null),this.isLoaded=!0}this.setMultiSelect(this.allowMultiSelection),this.addMultiSelect(this.allowMultiSelection);break;case"checkedNodes":this.showCheckBox&&(this.checkedNodes=i.checkedNodes,this.setCheckedNodes(e.checkedNodes));break;case"autoCheck":this.showCheckBox&&(this.autoCheck=e.autoCheck,this.ensureIndeterminate());break;case"cssClass":this.setCssClass(i.cssClass,e.cssClass);break;case"enableRtl":this.setEnableRtl();break;case"expandedNodes":this.isAnimate=!1,this.setProperties({expandedNodes:[]},!0),this.collapseAll(),this.isInitalExpand=!0,this.setProperties({expandedNodes:t.isNullOrUndefined(e.expandedNodes)?[]:e.expandedNodes},!0),this.doExpandAction(),this.isInitalExpand=!1,this.isAnimate=!0;break;case"expandOn":this.wireExpandOnEvent(!1),this.setExpandOnType(),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0);break;case"fields":this.isAnimate=!1,this.isFieldChange=!0,this.initialRender=!0,this.updateListProp(this.fields),this.reRenderNodes(),this.initialRender=!1,this.isAnimate=!0,this.isFieldChange=!1;break;case"fullRowSelect":this.setFullRow(this.fullRowSelect),this.addFullRow(this.fullRowSelect);break;case"loadOnDemand":if(!1===this.loadOnDemand&&!this.onLoaded){for(var o=this.element.querySelectorAll("li"),r=0;r<o.length;)this.renderChildNodes(o[r],!0,null,!0),r++;this.onLoaded=!0}break;case"nodeTemplate":this.nodeTemplateFn=this.templateComplier(this.nodeTemplate),this.reRenderNodes();break;case"selectedNodes":this.removeSelectAll(),this.setProperties({selectedNodes:e.selectedNodes},!0),this.doSelectionAction();break;case"showCheckBox":case"sortOrder":this.reRenderNodes()}}},r.prototype.destroy=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.element.removeAttribute("aria-activedescendant"),this.element.removeAttribute("tabindex"),this.unWireEvents(),this.wireEditingEvents(!1),this.rippleFn(),this.rippleIconFn(),this.setCssClass(this.cssClass,null),this.setDragAndDrop(!1),this.setFullRow(!1),this.element.innerHTML="",e.prototype.destroy.call(this)},r.prototype.addNodes=function(e,i,s,n){if(!t.isNullOrUndefined(e)){e=JSON.parse(JSON.stringify(e));var o=this.getElement(i);if(this.preventExpand=n,this.fields.dataSource instanceof l.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){var r,a=o?o.querySelector("."+qt):null,d=this;o&&a&&a.classList.contains(Mt)&&null===o.querySelector("."+Ht)?d.renderChildNodes(o,null,function(){r=o.querySelector("."+Ht),d.addGivenNodes(e,o,s,!0,r),d.triggerEvent()}):(this.addGivenNodes(e,o,s,!0),this.triggerEvent())}else if(2===this.dataType)this.addGivenNodes(e,o,s);else{if(o)this.addGivenNodes(e,o,s);else{e=this.getSortedData(e);for(var h=0;h<e.length;h++){var c=t.getValue(this.fields.parentID,e[h]);o=c?this.getElement(c.toString()):c,this.addGivenNodes([e[h]],o,s)}}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}this.showCheckBox&&o&&this.ensureParentCheckState(o),this.fields.dataSource instanceof l.DataManager==!1&&(this.preventExpand=!1,this.triggerEvent())}},r.prototype.beginEdit=function(e){var i=this.getElement(e);t.isNullOrUndefined(i)||this.createTextbox(i,null)},r.prototype.checkAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!0)},r.prototype.collapseAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.collapseByLevel(t.select("."+Ht,this.element),i,s):this.collapseAllNodes(s):this.doGivenAction(e,Pt,!1)},r.prototype.disableNodes=function(e){t.isNullOrUndefined(e)||this.doDisableAction(e)},r.prototype.enableNodes=function(e){t.isNullOrUndefined(e)||this.doEnableAction(e)},r.prototype.ensureVisible=function(e){var i=this.getElement(e);if(!t.isNullOrUndefined(i)){var s=this.parents(i,"."+Tt);this.expandAll(s),setTimeout(function(){i.scrollIntoView(!0)},450)}},r.prototype.expandAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.expandByLevel(t.select("."+Ht,this.element),i,s):this.expandAllNodes(s):this.doGivenAction(e,Mt,!0)},r.prototype.getAllCheckedNodes=function(){return this.checkedNodes},r.prototype.getNode=function(e){var t=this.getElement(e);return this.getNodeData(t,!0)},r.prototype.getTreeData=function(e){var i=this.getId(e);if(this.updatePersistProp(),t.isNullOrUndefined(i))return this.treeData;var s=this.getNodeObject(i);return t.isNullOrUndefined(s)?[]:[s]},r.prototype.moveNodes=function(e,i,s,n){var o=this.getElement(i);if(!t.isNullOrUndefined(o)){for(var r=0;r<e.length;r++){var a=this.getElement(e[r]);t.isNullOrUndefined(a)||o.isSameNode(a)||this.isDescendant(a,o)||(this.preventExpand=n,this.dropAsChildNode(a,o,this,s))}this.fields.dataSource instanceof l.DataManager==!1&&(this.preventExpand=!1),this.triggerEvent()}},r.prototype.removeNodes=function(e){if(!t.isNullOrUndefined(e)){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);t.isNullOrUndefined(n)||this.removeNode(n)}1===this.dataType&&(this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)),this.triggerEvent()}},r.prototype.updateNode=function(e,i){var s=this;if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)&&this.allowEditing){var n=this.getElement(e);if(!t.isNullOrUndefined(n)){var l=t.select("."+Ut,n);this.updateOldText(n);var o=this.getEditEvent(n,null,null);this.trigger("nodeEditing",o,function(e){e.cancel||s.appendNewText(n,l,i,!1)})}}},r.prototype.uncheckAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!1)};var a;return At([t.Property(!1)],r.prototype,"allowDragAndDrop",void 0),At([t.Property(!1)],r.prototype,"allowEditing",void 0),At([t.Property(!1)],r.prototype,"allowMultiSelection",void 0),At([t.Complex({},ri)],r.prototype,"animation",void 0),At([t.Property()],r.prototype,"checkedNodes",void 0),At([t.Property("")],r.prototype,"cssClass",void 0),At([t.Property(!1)],r.prototype,"enablePersistence",void 0),At([t.Property()],r.prototype,"expandedNodes",void 0),At([t.Property("Auto")],r.prototype,"expandOn",void 0),At([t.Complex({},li)],r.prototype,"fields",void 0),At([t.Property(!0)],r.prototype,"fullRowSelect",void 0),At([t.Property(!0)],r.prototype,"loadOnDemand",void 0),At([t.Property()],r.prototype,"nodeTemplate",void 0),At([t.Property()],r.prototype,"selectedNodes",void 0),At([t.Property("None")],r.prototype,"sortOrder",void 0),At([t.Property(!1)],r.prototype,"showCheckBox",void 0),At([t.Property(!0)],r.prototype,"autoCheck",void 0),At([t.Event()],r.prototype,"created",void 0),At([t.Event()],r.prototype,"dataBound",void 0),At([t.Event()],r.prototype,"dataSourceChanged",void 0),At([t.Event()],r.prototype,"drawNode",void 0),At([t.Event()],r.prototype,"destroyed",void 0),At([t.Event()],r.prototype,"keyPress",void 0),At([t.Event()],r.prototype,"nodeChecked",void 0),At([t.Event()],r.prototype,"nodeChecking",void 0),At([t.Event()],r.prototype,"nodeClicked",void 0),At([t.Event()],r.prototype,"nodeCollapsed",void 0),At([t.Event()],r.prototype,"nodeCollapsing",void 0),At([t.Event()],r.prototype,"nodeDragging",void 0),At([t.Event()],r.prototype,"nodeDragStart",void 0),At([t.Event()],r.prototype,"nodeDragStop",void 0),At([t.Event()],r.prototype,"nodeDropped",void 0),At([t.Event()],r.prototype,"nodeEdited",void 0),At([t.Event()],r.prototype,"nodeEditing",void 0),At([t.Event()],r.prototype,"nodeExpanded",void 0),At([t.Event()],r.prototype,"nodeExpanding",void 0),At([t.Event()],r.prototype,"nodeSelected",void 0),At([t.Event()],r.prototype,"nodeSelecting",void 0),r=a=At([t.NotifyPropertyChanges],r)}(t.Component),di=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),hi=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},ci="e-close",pi="e-open",ui="e-transition",fi="e-right",mi="e-over",gi="e-push",vi="e-visibility",yi="e-disable-animation",bi="e-sidebar-context",Ci="e-sidebar-absolute",Ni=function(e){function i(t,i){return e.call(this,t,i)||this}return di(i,e),i.prototype.preRender=function(){this.setWidth()},i.prototype.render=function(){this.initialize(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){this.setTarget(),this.addClass(),this.setZindex(),this.enableDock&&this.setDock(),this.isOpen?this.show():this.setMediaQuery(),this.checkType(!0),this.setType(this.type),this.setCloseOnDocumentClick(),this.setEnableRTL(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.setEnableRTL=function(){this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},i.prototype.setTarget=function(){this.sidebarEleCopy=this.element.cloneNode(!0),"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),this.target&&(this.target.insertBefore(this.element,this.target.children[0]),t.addClass([this.element],Ci),t.addClass([this.target],bi))},i.prototype.setCloseOnDocumentClick=function(){this.closeOnDocumentClick?t.EventHandler.add(document,"mousedown touchstart",this.documentclickHandler,this):t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler)},i.prototype.setWidth=function(){this.enableDock&&"Left"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock&&"Right"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock||t.setStyleAttribute(this.element,{width:this.setDimension(this.width)})},i.prototype.setDimension=function(e){return e="number"==typeof e?t.formatUnit(e):"string"==typeof e?e.match(/px|%|em/)?e:t.formatUnit(e):"100%"},i.prototype.setZindex=function(){t.setStyleAttribute(this.element,{"z-index":""+this.zIndex})},i.prototype.addClass=function(){var e=document.querySelector(".e-main-content");t.isNullOrUndefined(e||this.element.nextElementSibling)||t.addClass([e||this.element.nextElementSibling],["e-content-animation"]),this.enableDock||"Auto"===this.type||t.addClass([this.element],[vi]),t.removeClass([this.element],[pi,ci,fi,"e-left","e-slide",gi,mi]),this.element.classList.add("e-sidebar"),t.addClass([this.element],"Right"===this.position?fi:"e-left"),"Auto"!==this.type||t.Browser.isDevice?this.isOpen||t.addClass([this.element],ci):this.show(),this.enableDock&&t.addClass([this.element],"e-dock"),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.setAttribute("tabindex",this.tabIndex)},i.prototype.checkType=function(e){"Push"!==this.type&&"Over"!==this.type&&"Slide"!==this.type?this.type="Auto":this.element.classList.contains(ci)||e||this.hide()},i.prototype.transitionEnd=function(e){this.setDock(),t.isNullOrUndefined(e)||e.target!==this.element||this.triggerChange(),t.EventHandler.remove(this.element,"transitionend",this.transitionEnd)},i.prototype.destroyBackDrop=function(){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;this.target&&this.showBackdrop&&e?t.removeClass([e],"e-backdrop"):this.showBackdrop&&this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},i.prototype.hide=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("close",s,function(e){if(!e.cancel){if(i.element.classList.contains(ci))return;i.element.classList.contains(pi)&&!i.animate&&i.triggerChange(),t.addClass([i.element],ci),t.removeClass([i.element],pi),i.enableDock?t.setStyleAttribute(i.element,{width:t.formatUnit(i.dockSize)}):t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type);var s=document.querySelector(".e-main-content")||i.element.nextElementSibling;!i.enableDock&&s&&(s.style.transform="translateX(0px)","Left"===i.position?s.style.marginLeft="0px":s.style.marginRight="0px"),i.destroyBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.remove("e-sidebar-overflow"),i.setProperties({isOpen:!1},!0),i.enableDock&&setTimeout(function(){return i.setTimeOut()},50),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setTimeOut=function(){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;this.element.classList.contains(pi)&&e?"Left"===this.position?"auto"===this.width?e.style.marginLeft=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginLeft=this.setDimension(this.width):"auto"===this.width?e.style.marginRight=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginRight=this.setDimension(this.width):this.element.classList.contains(ci)&&e&&("Left"===this.position?"auto"===this.dockSize?e.style.marginLeft=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginLeft=this.setDimension(this.dockSize):"auto"===this.dockSize?e.style.marginRight=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginRight=this.setDimension(this.dockSize))},i.prototype.show=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("open",s,function(e){if(!e.cancel){if(t.removeClass([i.element],vi),i.element.classList.contains(pi))return;i.element.classList.contains(ci)&&!i.animate&&i.triggerChange(),t.addClass([i.element],[pi,ui]),t.setStyleAttribute(i.element,{transform:""}),t.removeClass([i.element],ci),t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type),i.createBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.add("e-sidebar-overflow"),i.setProperties({isOpen:!0},!0),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setAnimation=function(){this.animate?t.removeClass([this.element],yi):t.addClass([this.element],yi)},i.prototype.triggerChange=function(){var e={name:"change",element:this.element};this.trigger("change",e)},i.prototype.setDock=function(){this.enableDock&&"Left"===this.position&&!this.getState()?t.setStyleAttribute(this.element,{transform:"translateX(-100%) translateX("+this.setDimension(this.dockSize)+")"}):this.enableDock&&"Right"===this.position&&!this.getState()&&t.setStyleAttribute(this.element,{transform:"translateX(100%) translateX(-"+this.setDimension(this.dockSize)+")"}),this.element.classList.contains(ci)&&this.enableDock&&t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)})},i.prototype.createBackDrop=function(){if(this.target&&this.showBackdrop&&this.getState()){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;t.addClass([e],"e-backdrop")}else this.showBackdrop&&!this.modal&&this.getState()&&(this.modal=this.createElement("div"),this.modal.className="e-sidebar-overlay",this.modal.style.display="block",document.body.appendChild(this.modal))},i.prototype.getPersistData=function(){return this.addOnPersist(["type","position","isOpen"])},i.prototype.getModuleName=function(){return"sidebar"},i.prototype.toggle=function(e){this.element.classList.contains(pi)?this.hide():this.show()},i.prototype.getState=function(){return!!this.element.classList.contains(pi)},i.prototype.setMediaQuery=function(){if(this.mediaQuery){("string"==typeof this.mediaQuery?window.matchMedia(this.mediaQuery).matches:this.mediaQuery.matches)&&this.windowWidth!==window.innerWidth?this.show():this.getState()&&this.windowWidth!==window.innerWidth&&this.hide()}},i.prototype.resize=function(e){"Auto"===this.type&&(t.Browser.isDevice?t.addClass([this.element],mi):t.addClass([this.element],gi)),this.setMediaQuery(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.documentclickHandler=function(e){t.closest(e.target,".e-control.e-sidebar")||this.hide(e)},i.prototype.enableGestureHandler=function(e){"Left"===this.position&&"Right"===e.swipeDirection&&e.startX<=20&&e.distanceX>=50&&e.velocity>=.5?this.show():"Left"===this.position&&"Left"===e.swipeDirection?this.hide():"Right"===this.position&&"Right"===e.swipeDirection?this.hide():"Right"===this.position&&"Left"===e.swipeDirection&&window.innerWidth-e.startX<=20&&e.distanceX>=50&&e.velocity>=.5&&this.show()},i.prototype.setEnableGestures=function(){this.enableGestures?(this.mainContentEle=new t.Touch(document.body,{swipe:this.enableGestureHandler.bind(this)}),this.sidebarEle=new t.Touch(this.element,{swipe:this.enableGestureHandler.bind(this)})):this.mainContentEle&&this.sidebarEle&&(this.mainContentEle.destroy(),this.sidebarEle.destroy())},i.prototype.wireEvents=function(){this.setEnableGestures(),window.addEventListener("resize",this.resize.bind(this))},i.prototype.unWireEvents=function(){window.removeEventListener("resize",this.resize.bind(this)),t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler),this.mainContentEle&&this.mainContentEle.destroy(),this.sidebarEle&&this.sidebarEle.destroy()},i.prototype.onPropertyChanged=function(i,s){for(var n=document.querySelector(".e-main-content")||this.element.nextElementSibling,l=0,o=Object.keys(i);l<o.length;l++){switch(o[l]){case"isOpen":this.isOpen?this.show():this.hide();break;case"width":this.setWidth(),this.getState()||this.setDock();break;case"animate":this.setAnimation();break;case"type":this.checkType(!1),t.removeClass([this.element],[vi]),this.addClass(),t.addClass([this.element],"Auto"===this.type?t.Browser.isDevice?["e-over"]:["e-push"]:["e-"+this.type.toLowerCase()]);break;case"position":this.element.style.transform="",this.setDock(),n&&("Left"===this.position?n.style.marginRight="0px":n.style.marginLeft="0px"),"Right"===this.position?(t.removeClass([this.element],"e-left"),t.addClass([this.element],fi)):(t.removeClass([this.element],fi),t.addClass([this.element],"e-left")),this.setType(this.type);break;case"showBackdrop":this.showBackdrop?this.createBackDrop():this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null);break;case"target":"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),t.isNullOrUndefined(this.target)?(t.removeClass([this.element],Ci),t.removeClass([s.target],bi),t.setStyleAttribute(n,{"margin-left":0,"margin-right":0}),document.body.insertAdjacentElement("afterbegin",this.element)):e.prototype.refresh.call(this);break;case"closeOnDocumentClick":this.setCloseOnDocumentClick();break;case"enableDock":this.getState()||this.setDock();break;case"zIndex":this.setZindex();break;case"mediaQuery":this.setMediaQuery();break;case"enableGestures":this.setEnableGestures();break;case"enableRtl":this.setEnableRTL()}}},i.prototype.setType=function(e){var i=this.element.getBoundingClientRect().width;this.setZindex();var s=document.querySelector(".e-main-content")||this.element.nextElementSibling;s&&(s.style.transform="translateX(0px)",t.Browser.isDevice||"Auto"===this.type||("Left"===this.position?s.style.marginLeft="0px":s.style.marginRight="0px"));var n=(this.position,i+"px"),l="Left"===this.position?i:-i;switch(t.removeClass([this.element],[gi,mi,"e-slide"]),e){case"Push":t.addClass([this.element],[gi]),s&&(this.enableDock||this.element.classList.contains(pi))&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n);break;case"Slide":t.addClass([this.element],["e-slide"]),s&&(this.enableDock||this.element.classList.contains(pi))&&(s.style.transform="translateX("+l+"px)");break;case"Over":t.addClass([this.element],[mi]),this.enableDock&&this.element.classList.contains(ci)&&s&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n);break;case"Auto":t.addClass([this.element],[ui]),t.Browser.isDevice?s&&this.enableDock&&!this.getState()?("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n,t.addClass([this.element],gi)):t.addClass([this.element],mi):(t.addClass([this.element],gi),s&&(this.enableDock||this.element.classList.contains(pi))&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n)),this.createBackDrop()}},i.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[pi,ci,gi,"e-slide",mi,"e-left",fi,ui]),this.target&&(t.removeClass([this.element],Ci),t.removeClass([this.target],bi)),this.destroyBackDrop(),this.element.style.width="",this.element.style.zIndex="",this.element.style.transform="",this.windowWidth=null,t.isNullOrUndefined(this.sidebarEleCopy.getAttribute("tabindex"))?this.element.removeAttribute("tabindex"):this.element.setAttribute("tabindex",this.tabIndex);var i=document.querySelector(".e-main-content")||this.element.nextElementSibling;t.isNullOrUndefined(i)||(i.style.margin="",i.style.transform=""),this.unWireEvents()},hi([t.Property("auto")],i.prototype,"dockSize",void 0),hi([t.Property(null)],i.prototype,"mediaQuery",void 0),hi([t.Property(!1)],i.prototype,"enableDock",void 0),hi([t.Property("en-US")],i.prototype,"locale",void 0),hi([t.Property(!1)],i.prototype,"enablePersistence",void 0),hi([t.Property(!0)],i.prototype,"enableGestures",void 0),hi([t.Property(!1)],i.prototype,"isOpen",void 0),hi([t.Property(!1)],i.prototype,"enableRtl",void 0),hi([t.Property(!0)],i.prototype,"animate",void 0),hi([t.Property("auto")],i.prototype,"height",void 0),hi([t.Property(!1)],i.prototype,"closeOnDocumentClick",void 0),hi([t.Property("Left")],i.prototype,"position",void 0),hi([t.Property(null)],i.prototype,"target",void 0),hi([t.Property(!1)],i.prototype,"showBackdrop",void 0),hi([t.Property("Auto")],i.prototype,"type",void 0),hi([t.Property("auto")],i.prototype,"width",void 0),hi([t.Property(1e3)],i.prototype,"zIndex",void 0),hi([t.Event()],i.prototype,"created",void 0),hi([t.Event()],i.prototype,"close",void 0),hi([t.Event()],i.prototype,"open",void 0),hi([t.Event()],i.prototype,"change",void 0),hi([t.Event()],i.prototype,"destroyed",void 0),i=hi([t.NotifyPropertyChanges],i)}(t.Component);e.MenuAnimationSettings=$,e.MenuItem=Z,e.HScroll=N,e.VScroll=U,e.Item=De,e.Toolbar=Pe,e.AccordionActionSettings=Qe,e.AccordionAnimationSettings=Je,e.AccordionItem=Ze,e.Accordion=$e,e.ContextMenu=it,e.Menu=rt,e.TabActionSettings=Ot,e.TabAnimationSettings=kt,e.Header=St,e.TabItem=wt,e.Tab=Lt,e.FieldsSettings=li,e.ActionSettings=oi,e.NodeAnimationSettings=ri,e.TreeView=ai,e.Sidebar=Ni,Object.defineProperty(e,"__esModule",{value:!0})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-lists"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-inputs")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-lists","@syncfusion/ej2-popups","@syncfusion/ej2-buttons","@syncfusion/ej2-data","@syncfusion/ej2-inputs"],t):t(e.ej={},e.ej2Base,e.ej2Lists,e.ej2Popups,e.ej2Buttons,e.ej2Data,e.ej2Inputs)}(this,function(e,t,i,s,n,l,o){"use strict";var r=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),a=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},d="e-rtl",h="e-overlay",c="e-nav-arrow",p="e-nav-right-arrow",u="e-nav-left-arrow",f="e-scroll-nav",m="e-scroll-right-nav",g="e-scroll-left-nav",v="e-scroll-device",y="e-scroll-overlay",b="e-scroll-right-overlay",C="e-scroll-left-overlay",N=function(e){function i(t,i){return e.call(this,t,i)||this}return r(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(d)},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add(v),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=this.createElement("div",{className:"e-hscroll-content"}),t=this.createElement("div",{className:"e-hscroll-bar"});t.setAttribute("tabindex","-1");for(var i=this.element,s=0,n=[].slice.call(i.children);s<n.length;s++){var l=n[s];e.appendChild(l)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},i.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},i.prototype.getModuleName=function(){return"hScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",i.classList.remove("e-hscroll"),i.classList.remove(v);var s=t.selectAll(".e-"+i.id+"_nav."+f,i),n=t.selectAll("."+y,i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var l=0,o=[].slice.call(this.scrollItems.children);l<o.length;l++){var r=o[l];i.appendChild(r)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(."+h+")",this.element);e?this.element.classList.add(h):this.element.classList.remove(h),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:y+" "+b}),s="e-"+e.id.concat("_nav "+f+" "+m),n=this.createElement("div",{id:t.concat("_right"),className:s}),l=this.createElement("div",{className:p+" "+c+" e-icons"});n.appendChild(l);var o=this.createElement("div",{className:y+" "+C});this.ieCheck&&n.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(n),e.insertBefore(o,e.firstChild),this.eventBinding([n])},i.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav "+f+" "+m),s=this.createElement("div",{id:t.concat("_right"),className:i});s.setAttribute("aria-disabled","false");var n=this.createElement("div",{className:p+" "+c+" e-icons"}),l="e-"+e.id.concat("_nav "+f+" "+g),o=this.createElement("div",{id:t.concat("_left"),className:l+" "+h});o.setAttribute("aria-disabled","true");var r=this.createElement("div",{className:u+" "+c+" e-icons"});o.appendChild(r),s.appendChild(n),e.appendChild(s),e.insertBefore(o,e.firstChild),this.ieCheck&&(s.classList.add("e-ie-align"),o.classList.add("e-ie-align")),this.eventBinding([s,o])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){this.keyTimer=window.setTimeout(function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,f)?i.firstElementChild:i;this.timeout=window.setInterval(function(){t.eleScrolling(10,i,!0)},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){var s=this.scrollEle,n=this.element,l=t.classList;l.contains(f)&&(l=t.querySelector("."+c).classList),this.contains(n,d)&&this.browserCheck&&(e=-e);s.scrollLeft;!this.contains(n,d)||this.browserCheck||this.ieCheck?l.contains(p)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):l.contains(u)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceX/(10*e.velocity):e.distanceX/e.velocity;var s=.5,n=function(){var l=Math.sin(s);l<=0?window.cancelAnimationFrame(l):("Left"===e.swipeDirection?i.scrollLeft+=t*l:"Right"===e.swipeDirection&&(i.scrollLeft-=t*l),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)this.scrollUpdating(e,i);else{this.customStep||[].slice.call(t.selectAll("."+y,this.element)).forEach(function(t){e-=t.offsetWidth});var l=function(){var t,s;n.contains(n.element,d)&&n.browserCheck?(t=-e,s=-10):(t=e,s=10),t<10?window.cancelAnimationFrame(s):(n.scrollUpdating(s,i),e-=s,window.requestAnimationFrame(l))};l()}},i.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceX,this.ieCheck&&this.contains(this.element,d)&&(t=-t),"Left"===e.scrollDirection?i.scrollLeft=i.scrollLeft+t:"Right"===e.scrollDirection&&(i.scrollLeft=i.scrollLeft-t)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector("."+c);t.isNullOrUndefined(e)?t.classList(s,[p],[u]):t.classList(s,[u],[p])}else e.classList.add(h),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove(h),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,s=this.element,n=this.element.querySelector("."+g),l=this.element.querySelector("."+m),o=this.element.querySelector("."+C),r=this.element.querySelector("."+b),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(o=this.element.querySelector("."+b),r=this.element.querySelector("."+C)),o.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?r.style.width=t.scrollWidth-Math.ceil(i+a)+"px":r.style.width="40px"),0===a)!this.contains(s,d)||this.browserCheck||this.ieCheck?this.arrowDisabling(n,l):this.arrowDisabling(l,n);else if(Math.ceil(i+a+.1)>=t.scrollWidth)!this.contains(s,d)||this.browserCheck||this.ieCheck?this.arrowDisabling(l,n):this.arrowDisabling(n,l);else{var c=this.element.querySelector("."+f+"."+h);c&&(c.classList.remove(h),c.setAttribute("aria-disabled","false"),c.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add(d):this.element.classList.remove(d)}}},a([t.Property(null)],i.prototype,"scrollStep",void 0),i=a([t.NotifyPropertyChanges],i)}(t.Component),E=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),x=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},O="e-overlay",k="e-nav-arrow",S="e-nav-up-arrow",w="e-nav-down-arrow",L="e-scroll-nav",I="e-scroll-up-nav",A="e-scroll-down-nav",D="e-scroll-device",P="e-scroll-overlay",T="e-scroll-up-overlay",M="e-scroll-down-overlay",H=function(e){function i(t,i){return e.call(this,t,i)||this}return E(i,e),i.prototype.preRender=function(){this.browser=t.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=t.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=t.getUniqueID("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},i.prototype.render=function(){this.touchModule=new t.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),t.EventHandler.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add(D),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),t.EventHandler.add(this.element,"wheel",this.wheelEventHandler,this)},i.prototype.setScrollState=function(){t.isNullOrUndefined(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=t.createElement("div",{className:"e-vscroll-content"}),i=t.createElement("div",{className:"e-vscroll-bar"});i.setAttribute("tabindex","-1");for(var s=this.element,n=0,l=[].slice.call(s.children);n<l.length;n++){var o=l[n];e.appendChild(o)}i.appendChild(e),s.appendChild(i),i.style.overflowY="hidden",this.scrollEle=i,this.scrollItems=e},i.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},i.prototype.getModuleName=function(){return"vScroll"},i.prototype.destroy=function(){var i=this.element;i.style.display="",t.removeClass([this.element],["e-vscroll",D]);var s=t.selectAll(".e-"+i.id+"_nav."+L,i),n=t.selectAll("."+P,i);[].slice.call(n).forEach(function(e){t.detach(e)});for(var l=0,o=[].slice.call(this.scrollItems.children);l<o.length;l++){var r=o[l];i.appendChild(r)}this.uniqueId&&this.element.removeAttribute("id"),t.detach(this.scrollEle),s.length>0&&(t.detach(s[0]),t.isNullOrUndefined(s[1])||t.detach(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},i.prototype.disable=function(e){var i=t.selectAll(".e-scroll-nav:not(."+O+")",this.element);e?this.element.classList.add(O):this.element.classList.remove(O),[].slice.call(i).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},i.prototype.createOverlayElement=function(e){var i=e.id.concat("_nav"),s=t.createElement("div",{className:P+" "+M}),n="e-"+e.id.concat("_nav "+L+" "+A),l=t.createElement("div",{id:i.concat("down"),className:n}),o=t.createElement("div",{className:w+" "+k+" e-icons"});l.appendChild(o);var r=t.createElement("div",{className:P+" "+T});this.ieCheck&&l.classList.add("e-ie-align"),e.appendChild(s),e.appendChild(l),e.insertBefore(r,e.firstChild),this.eventBinding([l])},i.prototype.createNavIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav "+L+" "+A),n=t.createElement("div",{id:i.concat("_down"),className:s});n.setAttribute("aria-disabled","false");var l=t.createElement("div",{className:w+" "+k+" e-icons"}),o="e-"+e.id.concat("_nav "+L+" "+I),r=t.createElement("div",{id:i.concat("_up"),className:o+" "+O});r.setAttribute("aria-disabled","true");var a=t.createElement("div",{className:S+" "+k+" e-icons"});r.appendChild(a),n.appendChild(l),n.setAttribute("tabindex","0"),e.appendChild(n),e.insertBefore(r,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),r.classList.add("e-ie-align")),this.eventBinding([n,r])},i.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){this.keyTimer=window.setTimeout(function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)},100)}},i.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},i.prototype.eventBinding=function(e){var i=this;[].slice.call(e).forEach(function(e){new t.Touch(e,{tapHold:i.tabHoldHandler.bind(i),tapHoldThreshold:500}),e.addEventListener("keydown",i.onKeyPress.bind(i)),e.addEventListener("keyup",i.onKeyUp.bind(i)),e.addEventListener("mouseup",i.repeatScroll.bind(i)),e.addEventListener("touchend",i.repeatScroll.bind(i)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),t.EventHandler.add(e,"click",i.clickEventHandler,i)})},i.prototype.repeatScroll=function(){clearInterval(this.timeout)},i.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,L)?i.firstElementChild:i;this.timeout=window.setInterval(function(){t.eleScrolling(10,i,!0)},50)},i.prototype.contains=function(e,t){return e.classList.contains(t)},i.prototype.eleScrolling=function(e,t,i){this.element;var s=t.classList;s.contains(L)&&(s=t.querySelector("."+k).classList),s.contains(w)?this.frameScrollRequest(e,"add",i):s.contains(S)&&this.frameScrollRequest(e,"",i)},i.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},i.prototype.wheelEventHandler=function(e){e.preventDefault(),this.frameScrollRequest(this.scrollStep,e.deltaY>0?"add":"",!1)},i.prototype.swipeHandler=function(e){var t,i=this.scrollEle;t=e.velocity<=1?e.distanceY/(10*e.velocity):e.distanceY/e.velocity;var s=.5,n=function(){var l=Math.sin(s);l<=0?window.cancelAnimationFrame(l):("Up"===e.swipeDirection?i.scrollTop+=t*l:"Down"===e.swipeDirection&&(i.scrollTop-=t*l),s-=.02,window.requestAnimationFrame(n))};n()},i.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},i.prototype.frameScrollRequest=function(e,i,s){var n=this;if(s)this.scrollUpdating(e,i);else{this.customStep||[].slice.call(t.selectAll("."+P,this.element)).forEach(function(t){e-=t.offsetHeight});var l=function(){e<10?window.cancelAnimationFrame(10):(n.scrollUpdating(10,i),e-=10,window.requestAnimationFrame(l))};l()}},i.prototype.touchHandler=function(e){var t,i=this.scrollEle;t=e.distanceY,"Up"===e.scrollDirection?i.scrollTop=i.scrollTop+t:"Down"===e.scrollDirection&&(i.scrollTop=i.scrollTop-t)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=(t.isNullOrUndefined(e)?i:e).querySelector("."+k);t.isNullOrUndefined(e)?t.classList(s,[w],[S]):t.classList(s,[S],[w])}else e.classList.add(O),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove(O),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0");this.repeatScroll()},i.prototype.scrollEventHandler=function(e){var t=e.target,i=t.offsetHeight,s=(this.element,this.element.querySelector("."+I)),n=this.element.querySelector("."+A),l=this.element.querySelector("."+T),o=this.element.querySelector("."+M),r=t.scrollTop;if(r<=0&&(r=-r),this.isDevice&&(l.style.height=r<40?r+"px":"40px",t.scrollHeight-Math.ceil(i+r)<40?o.style.height=t.scrollHeight-Math.ceil(i+r)+"px":o.style.height="40px"),0===r)this.arrowDisabling(s,n);else if(Math.ceil(i+r+.1)>=t.scrollHeight)this.arrowDisabling(n,s);else{var a=this.element.querySelector("."+L+"."+O);a&&(a.classList.remove(O),a.setAttribute("aria-disabled","false"),a.setAttribute("tabindex","0"))}},i.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"scrollStep":this.setScrollState();break;case"enableRtl":e.enableRtl?this.element.classList.add("e-rtl"):this.element.classList.remove("e-rtl")}}},x([t.Property(null)],i.prototype,"scrollStep",void 0),i=x([t.NotifyPropertyChanges],i)}(t.Component),U=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),B=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},R="e-focused",j="e-menu-header",F="e-selected",q="e-separator",V="uparrow",z="downarrow",W="leftarrow",_="rightarrow",K="e-menu-item",Y="e-disabled",G="e-menu-hide",X="e-menu-popup",Q="Template",J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),B([t.Property("id")],i.prototype,"itemId",void 0),B([t.Property("parentId")],i.prototype,"parentId",void 0),B([t.Property("text")],i.prototype,"text",void 0),B([t.Property("iconCss")],i.prototype,"iconCss",void 0),B([t.Property("url")],i.prototype,"url",void 0),B([t.Property("separator")],i.prototype,"separator",void 0),B([t.Property("items")],i.prototype,"children",void 0),i}(t.ChildProperty),Z=/(ipad|iphone|ipod touch)/i,$={OPERA:/(opera|opr)(?:.*version|)[ /]([\w.]+)/i,EDGE:/(edge)(?:.*version|)[ /]([\w.]+)/i,CHROME:/(chrome|crios)[ /]([\w.]+)/i,PANTHOMEJS:/(phantomjs)[ /]([\w.]+)/i,SAFARI:/(safari)[ /]([\w.]+)/i,WEBKIT:/(webkit)[ /]([\w.]+)/i,MSIE:/(msie|trident) ([\w.]+)/i,MOZILLA:/(mozilla)(?:.*? rv:([\w.]+)|)/i},ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),B([t.Property(null)],i.prototype,"iconCss",void 0),B([t.Property("")],i.prototype,"id",void 0),B([t.Property(!1)],i.prototype,"separator",void 0),B([t.Collection([],i)],i.prototype,"items",void 0),B([t.Property("")],i.prototype,"text",void 0),B([t.Property("")],i.prototype,"url",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),B([t.Property("SlideDown")],i.prototype,"effect",void 0),B([t.Property(400)],i.prototype,"duration",void 0),B([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),ie=function(e){function n(i,s){var n=e.call(this,i,s)||this;return n.navIdx=[],n.animation=new t.Animation({}),n.isTapHold=!1,n.tempItem=[],n}return U(n,e),n.prototype.preRender=function(){if(!this.isMenu){var e=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){e=this.createElement("ul",{id:t.getUniqueID(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var i=t.getValue("ej2_instances",this.element);t.removeClass([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=e,t.setValue("ej2_instances",i,this.element)}else{e=this.createElement("ul",{id:t.getUniqueID(this.getModuleName())}),t.append([].slice.call(this.element.cloneNode(!0).children),e);var s=this.element.nextElementSibling;s?this.element.parentElement.insertBefore(e,s):this.element.parentElement.appendChild(e),this.clonedElement=e}this.clonedElement.style.display="none"}if("EJS-MENU"===this.element.tagName){for(var n=this.element,l=t.getValue("ej2_instances",n),o=(e=this.createElement("ul"),this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"})),r=0,a=n.attributes.length;r<a;r++)e.setAttribute(n.attributes[r].nodeName,n.attributes[r].nodeValue);n.parentNode.insertBefore(o,n),t.detach(n),n=e,o.appendChild(n),t.setValue("ej2_instances",l,n),this.clonedElement=o,this.element=n,this.element.id||(this.element.id=t.getUniqueID(this.getModuleName()))}},n.prototype.render=function(){if(this.initialize(),this.renderItems(),this.isMenu&&this.template&&this.isBlazor()){var e=this.element.id+Q;t.resetBlazorTemplate(e,Q),Object.keys(t.blazorTemplates).length&&t.extend(this.tempItem,t.blazorTemplates[e],[],!0),t.updateBlazorTemplate(e,Q,this)}this.wireEvents(),this.renderComplete()},n.prototype.initialize=function(){var e=this.getWrapper();e||(e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"}),this.isMenu?this.element.parentElement.insertBefore(e,this.element):document.body.appendChild(e)),this.cssClass&&t.addClass([e],this.cssClass.split(" ")),this.enableRtl&&e.classList.add("e-rtl"),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e))},n.prototype.renderItems=function(){if(!this.items.length){var e=i.ListBase.createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var s=this.createItems(this.items);t.append(Array.prototype.slice.call(s.children),this.element),this.element.classList.add("e-menu-parent");var n=this.getWrapper();this.element.classList.contains("e-vertical")?this.addScrolling(n,this.element,"vscroll",n.offsetHeight,this.element.offsetHeight):this.addScrolling(n,this.element,"hscroll",n.offsetWidth,this.element.offsetWidth)},n.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var i=void 0,n=t.selectAll(this.target),l=0,o=n.length;l<o;l++)i=n[l],this.isMenu?t.EventHandler.add(i,"click",this.menuHeaderClickHandler,this):this.menuIos()?new t.Touch(i,{tapHold:this.touchHandler.bind(this)}):t.EventHandler.add(i,"contextmenu",this.cmenuHandler,this);if(this.targetElement=i,!this.isMenu){t.EventHandler.add(this.targetElement,"scroll",this.scrollHandler,this);for(var r=0,a=s.getScrollableParent(this.targetElement);r<a.length;r++){var d=a[r];t.EventHandler.add(d,"scroll",this.scrollHandler,this)}}}t.Browser.isDevice||(this.delegateMoverHandler=this.moverHandler.bind(this),this.delegateMouseDownHandler=this.mouseDownHandler.bind(this),t.EventHandler.add(this.isMenu?document:e,"mouseover",this.delegateMoverHandler,this),t.EventHandler.add(document,"mousedown",this.delegateMouseDownHandler,this)),this.delegateClickHandler=this.clickHandler.bind(this),t.EventHandler.add(document,"click",this.delegateClickHandler,this),this.wireKeyboardEvent(e),this.rippleFn=t.rippleEffect(e,{selector:"."+K})},n.prototype.menuIos=function(){return this.getValue("isIos",Z)},n.prototype.getValue=function(e,i){var s="undefined"!=typeof window?window.browserDetails:{};return"undefined"!=typeof navigator&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1&&!0===t.Browser.isTouch&&!$.CHROME.test(navigator.userAgent)&&(s.isIos=!0,s.isDevice=!0,s.isTouch=!0,s.isPointer=!0),void 0===s[""+e]?s[""+e]=i.test(t.Browser.userAgent):s[""+e]},n.prototype.wireKeyboardEvent=function(e){var i={downarrow:z,uparrow:V,enter:"enter",leftarrow:W,rightarrow:_,escape:"escape"};this.isMenu&&(i.home="home",i.end="end"),new t.KeyboardEvents(e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:i})},n.prototype.mouseDownHandler=function(e){t.closest(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||t.closest(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},n.prototype.keyBoardHandler=function(e){var i="",s=e.target,n=this.isMenu&&!this.hamburgerMode&&!this.element.classList.contains("e-vertical")&&this.navIdx.length<1;if(e.preventDefault(),this.enableScrolling&&13===e.keyCode&&s.classList.contains("e-scroll-nav")&&this.removeLIStateByClass([R,F],[t.closest(s,".e-"+this.getModuleName()+"-wrapper")]),n)switch(e.action){case _:i=_,e.action=z;break;case W:i=W,e.action=V;break;case z:i=z,e.action=_;break;case V:i=V,e.action=""}else if(this.enableRtl)switch(e.action){case W:n=!0,i=W,e.action=_;break;case _:n=!0,i=_,e.action=W}switch(e.action){case z:case V:case"end":case"home":this.upDownKeyHandler(e);break;case _:this.rightEnterKeyHandler(e);break;case W:this.leftEscKeyHandler(e);break;case"enter":this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e);break;case"escape":this.leftEscKeyHandler(e)}n&&(e.action=i)},n.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),i=e.action===z||"home"===e.action?0:t.childElementCount-1,s=i,n=this.getLIByClass(t,R);n&&("end"!==e.action&&"home"!==e.action&&(s=this.getIdx(t,n)),n.classList.remove(R),"end"!==e.action&&"home"!==e.action&&(e.action===z?s++:s--,s===(e.action===z?t.childElementCount:-1)&&(s=i)));var l=t.children[s];s=this.isValidLI(l,s,e.action),t.children[s].classList.add(R),t.children[s].focus()},n.prototype.isValidLI=function(e,t,i){this.getWrapper();var s=this.getUlByNavIdx();return(e.classList.contains(q)||e.classList.contains(Y)||e.classList.contains(G))&&(i===z||i===_?t++:t--),((e=s.children[t]).classList.contains(q)||e.classList.contains(Y)||e.classList.contains(G))&&(t=this.isValidLI(e,t,i)),t},n.prototype.getUlByNavIdx=function(e){if(void 0===e&&(e=this.navIdx.length),this.isMenu){var i=[this.getWrapper()].concat([].slice.call(t.selectAll("."+X)))[e];return t.isNullOrUndefined(i)?null:t.select(".e-menu-parent",i)}return this.getWrapper().children[e]},n.prototype.rightEnterKeyHandler=function(e){var t,i=this.getUlByNavIdx(),s=this.getLIByClass(i,R);if(s){var n=this.getIdx(i,s),l=this.navIdx.concat(n),o=this.getItem(l);o.items.length?(this.navIdx.push(n),this.keyType="right",this.action=e.action,this.openMenu(s,o,null,null,e)):"enter"===e.action&&(this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([F],[this.getWrapper()]):s.classList.remove(R),s.classList.add(F),t={element:s,item:o,event:e},this.trigger("select",t),this.closeMenu(null,e))}},n.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):"escape"===e.action&&this.closeMenu(null,e)},n.prototype.scrollHandler=function(e){this.closeMenu(null,e)},n.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},n.prototype.cmenuHandler=function(e){e.preventDefault(),this.isCMenu=!0,this.pageX=e.changedTouches?e.changedTouches[0].pageX+1:e.pageX+1,this.pageY=e.changedTouches?e.changedTouches[0].pageY+1:e.pageY+1,this.closeMenu(null,e),this.isCMenu&&(this.canOpen(e.target)&&this.openMenu(null,null,this.pageY,this.pageX,e),this.isCMenu=!1)},n.prototype.closeMenu=function(e,i){var n=this;if(void 0===e&&(e=0),void 0===i&&(i=null),this.isMenuVisible()){var l,o,r,a=void 0,d=void 0,h=this.getWrapper(),c=this.getPopups(),p=!1,u=this.isMenu?c.length+1:h.childElementCount;l=this.isMenu&&1!==u?t.select(".e-ul",c[u-2]):t.selectAll(".e-menu-parent",h)[u-1],this.isMenu&&l.classList.contains("e-menu")&&((a=this.getLIByClass(l,F))&&a.classList.remove(F),p=!0),p||(o=this.navIdx.length?this.getItem(this.navIdx):null,r=o?o.items:this.items,d={element:l,parentItem:o,items:r,event:i,cancel:!1},this.trigger("beforeClose",d,function(a){var d,h,c,p=!a.cancel;if((p||n.isCMenu)&&(n.isMenu?(d=t.closest(l,"."+X),n.hamburgerMode&&(d.parentElement.style.minHeight=""),n.unWireKeyboardEvent(d),n.destroyScrollObj(t.getInstance(d.children[0],H),d.children[0]),(c=t.getInstance(d,s.Popup)).hide(),c.destroy(),t.detach(d)):n.toggleAnimation(l,!1),h={element:l,parentItem:o,items:r},n.trigger("onClose",h),n.navIdx.pop()),n.isCMenu)n.canOpen(i.target)&&n.openMenu(null,null,n.pageY,n.pageX,i),n.isCMenu=!1;else if(p&&n.hamburgerMode&&null!==e)n.afterCloseMenu(i);else if(p&&!e&&n.navIdx.length)n.closeMenu(null,i);else if(!p||n.isMenu||e||0!==n.navIdx.length||n.isMenusClosed)if(p&&n.isMenu&&i&&i.target&&0!==n.navIdx.length&&t.closest(i.target,".e-menu-parent.e-control"))n.closeMenu(0,i);else if(!p||"right"!==n.keyType&&"click"!==n.keyType){var u=n.getUlByNavIdx(),f=n.getLIByClass(u,F);f&&(f.setAttribute("aria-expanded","false"),f.classList.remove(F),f.classList.add(R),f.focus())}else n.afterCloseMenu(i);else n.isMenusClosed=!0,n.closeMenu(0,i);n.removeStateWrapper()}))}},n.prototype.destroyScrollObj=function(e,i){e&&(e.destroy(),i.parentElement.appendChild(t.select(".e-menu-parent",i)),t.detach(i))},n.prototype.getPopups=function(){var e=this,t=[];return[].slice.call(document.querySelectorAll("."+X)).forEach(function(i){e.getIndex(i.querySelector("."+K).id,!0).length&&t.push(i)}),t},n.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&t.isVisible(this.element).valueOf()},n.prototype.canOpen=function(e){var i=!0;if(this.filter){i=!1;for(var s=this.filter.split(" "),n=0,l=s.length;n<l;n++)if(t.closest(e,"."+s[n])){i=!0;break}}return i},n.prototype.openMenu=function(e,i,n,l,o,r){void 0===n&&(n=0),void 0===l&&(l=0),void 0===o&&(o=null),void 0===r&&(r=this.targetElement);var a=this.getWrapper();this.lItem=e;var d=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,e){if(this.uList=this.createItems(i[this.getField("children",this.navIdx.length-1)]),!this.isMenu&&t.Browser.isDevice){a.lastChild.style.display="none";var h={text:i[this.getField("text")].toString(),iconCss:"e-icons e-previous"},c=new ee(this.items[0],"items",h,!0),p=this.createItems([c]).children[0];p.classList.add(j),this.uList.insertBefore(p,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+X,id:e.id+"-ej2menu-"+d+"-popup"}),this.hamburgerMode?(n=e.offsetHeight,e.appendChild(this.popupWrapper)):document.body.appendChild(this.popupWrapper),this.isNestedOrVertical=this.element.classList.contains("e-vertical")||1!==this.navIdx.length,this.popupObj=this.generatePopup(this.popupWrapper,this.uList,e,this.isNestedOrVertical),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&t.addClass([this.popupWrapper],this.cssClass.split(" ")),this.popupObj.hide()),this.triggerBeforeOpen(e,this.uList,i,o,0,0,"menu")):(this.uList.style.zIndex=this.element.style.zIndex,a.appendChild(this.uList),this.triggerBeforeOpen(e,this.uList,i,o,n,l,"none"))}else this.uList=this.element,this.uList.style.zIndex=s.getZindexPartial(r||this.element).toString(),this.triggerBeforeOpen(e,this.uList,i,o,n,l,"none");if(this.isMenu&&this.template&&this.isBlazor()){var u=this.element.id+Q;if(Object.keys(t.blazorTemplates).length){var f=t.blazorTemplates[u];this.tempItem=this.tempItem.concat(f),t.blazorTemplates[u]=this.tempItem}t.updateBlazorTemplate(u,Q,this)}},n.prototype.calculateIndentSize=function(e,t){var i=getComputedStyle(t),s=parseInt(i.textIndent,10);this.navIdx.length<2&&!t.classList.contains("e-blankicon")?s*=2:s+=s/4,e.style.textIndent=s+"px";var n=e.querySelectorAll(".e-blankicon");if(n&&n.length){var l=e.querySelector(".e-menu-icon"),o=getComputedStyle(l),r=parseInt(o.marginRight,10)+l.offsetWidth+s;n.forEach(function(e){return e.style.textIndent=r+"px"})}},n.prototype.generatePopup=function(e,i,n,l){var o=this,r=new s.Popup(e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:n,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:l||this.enableRtl?"none":"flip",Y:"fit"},position:l&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:i,open:function(){var e=t.select(".e-menu-vscroll",r.element);e&&(e.style.height="inherit",e.style.maxHeight="");var i=t.select(".e-ul",r.element);r.element.style.maxHeight="",i.focus(),o.triggerOpen(i)}});return r},n.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var t=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),i=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:this.title}),s=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});t.appendChild(i),t.appendChild(s),e.insertBefore(t,this.element)},n.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},n.prototype.closeHamburgerMenu=function(e){var t=this;if(this.hamburgerMode){var i=void 0;i={element:this.element,parentItem:null,event:e,items:this.items,cancel:!1},this.trigger("beforeClose",i,function(i){i.cancel||(t.closeMenu(null,e),t.element.classList.add("e-hide-menu"),t.trigger("onClose",{element:t.element,parentItem:null,items:t.items}))})}},n.prototype.callFit=function(e,t,i,n,l){return s.fit(e,null,{X:t,Y:i},{top:n,left:l})},n.prototype.triggerBeforeOpen=function(e,i,n,l,o,r,a){var d=this,h=(this.getIndex(e?e.id:null,!0),{element:i,items:e?n[this.getField("children",this.navIdx.length-1)]:this.items,parentItem:n,event:l,cancel:!1,top:o,left:r}),c=a;this.trigger("beforeOpen",h,function(i){switch(c){case"menu":d.hamburgerMode||(d.top=i.top,d.left=i.left),d.popupWrapper.style.display="block",d.hamburgerMode||(d.popupWrapper.style.maxHeight=d.popupWrapper.getBoundingClientRect().height+"px",d.addScrolling(d.popupWrapper,d.uList,"vscroll",d.popupWrapper.offsetHeight,d.uList.offsetHeight),d.checkScrollOffset(l));var o=void 0;if(d.hamburgerMode||d.left||d.top)d.popupObj.collision={X:"none",Y:"none"};else{if(d.popupObj.refreshPosition(d.lItem,!0),d.left=parseInt(d.popupWrapper.style.left,10),d.top=parseInt(d.popupWrapper.style.top,10),d.enableRtl&&(d.left=d.isNestedOrVertical?d.left-d.popupWrapper.offsetWidth-d.lItem.parentElement.offsetWidth:d.left-d.popupWrapper.offsetWidth+d.lItem.offsetWidth),o=s.isCollide(d.popupWrapper,null,d.left,d.top),(d.isNestedOrVertical||d.enableRtl)&&(o.indexOf("right")>-1||o.indexOf("left")>-1)){d.popupObj.collision.X="none";var r=t.closest(d.lItem,".e-"+d.getModuleName()+"-wrapper").offsetWidth;d.left=d.enableRtl?s.calculatePosition(d.lItem,d.isNestedOrVertical?"right":"left","top").left:d.left-d.popupWrapper.offsetWidth-r}((o=s.isCollide(d.popupWrapper,null,d.left,d.top)).indexOf("left")>-1||o.indexOf("right")>-1)&&(d.left=d.callFit(d.popupWrapper,!0,!1,d.top,d.left).left),d.popupWrapper.style.left=d.left+"px"}d.popupWrapper.style.display="";break;case"none":d.top=i.top,d.left=i.left;break;case"hamburger":i.cancel||(d.element.classList.remove("e-hide-menu"),d.triggerOpen(d.element))}if("hamburger"!==c)if(i.cancel)d.isMenu&&(d.popupObj.destroy(),t.detach(d.popupWrapper)),d.navIdx.pop();else if(d.isMenu)if(d.hamburgerMode)d.popupWrapper.style.top=d.top+"px",d.popupWrapper.style.left="0px",d.toggleAnimation(d.popupWrapper);else{d.wireKeyboardEvent(d.popupWrapper),t.rippleEffect(d.popupWrapper,{selector:"."+K}),d.popupWrapper.style.left=d.left+"px",d.popupWrapper.style.top=d.top+"px";var a="None"!==d.animationSettings.effect?{name:d.animationSettings.effect,duration:d.animationSettings.duration,timingFunction:d.animationSettings.easing}:null;d.popupObj.show(a,d.lItem)}else d.setPosition(d.lItem,d.uList,d.top,d.left),d.toggleAnimation(d.uList);if("right"===d.keyType){var h=d.getUlByNavIdx();if(e.classList.remove(R),d.isMenu&&1===d.navIdx.length&&d.removeLIStateByClass([F],[d.getWrapper()]),e.classList.add(F),"enter"===d.action){var p={element:e,item:n,event:l};d.trigger("select",p)}e.focus(),h=d.getUlByNavIdx();var u=d.isValidLI(h.children[0],0,d.action);h.children[u].classList.add(R),h.children[u].focus()}})},n.prototype.checkScrollOffset=function(e){var i=this.getWrapper();if(i.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var s=t.isNullOrUndefined(e)?this.element:t.closest(e.target,"."+K),n=t.select(".e-hscroll-bar",i),l=void 0,o=void 0;n.scrollLeft>s.offsetLeft&&(n.scrollLeft-=n.scrollLeft-s.offsetLeft),(l=n.scrollLeft+n.offsetWidth)<(o=s.offsetLeft+s.offsetWidth)&&(n.scrollLeft+=o-l)}},n.prototype.addScrolling=function(e,i,s,n,l){if(this.enableScrolling&&n<l){var o=this.createElement("div",{className:"e-menu-"+s});e.appendChild(o),o.appendChild(i),o.style.maxHeight=e.style.maxHeight;e.style.overflow="hidden","vscroll"===s?new H({enableRtl:this.enableRtl},o).scrollStep=t.select(".e-"+s+"-bar",e).offsetHeight/2:new N({enableRtl:this.enableRtl},o).scrollStep=t.select(".e-"+s+"-bar",e).offsetWidth}},n.prototype.setPosition=function(e,i,n,l){if(this.toggleVisiblity(i),i===this.element||!t.isNullOrUndefined(l)&&!t.isNullOrUndefined(n)){if((a=s.isCollide(i,null,l,n)).indexOf("right")>-1&&(l-=i.offsetWidth),a.indexOf("bottom")>-1){n=(o=this.callFit(i,!1,!0,n,l)).top-20}if((a=s.isCollide(i,null,l,n)).indexOf("left")>-1){l=(o=this.callFit(i,!0,!1,n,l)).left}}else if(t.Browser.isDevice)n=Number(this.element.style.top.replace("px","")),l=Number(this.element.style.left.replace("px",""));else{var o,r=this.enableRtl?"left":"right";n=(o=s.calculatePosition(e,r,"top")).top,l=o.left;var a,d=(a=s.isCollide(i,null,this.enableRtl?l-i.offsetWidth:l,n)).indexOf("left")>-1||a.indexOf("right")>-1;d&&(l=(o=s.calculatePosition(e,this.enableRtl?"right":"left","top")).left),(this.enableRtl||d)&&(l=this.enableRtl&&d?l:l-i.offsetWidth),a.indexOf("bottom")>-1&&(n=(o=this.callFit(i,!1,!0,n,l)).top)}this.toggleVisiblity(i,!1),i.style.top=n+"px",i.style.left=l+"px"},n.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},n.prototype.createItems=function(e){var s=this,n=this.navIdx?this.navIdx.length:0,l=this.hasField(e,this.getField("iconCss",n)),o={showIcon:l,moduleName:"menu",fields:this.getFields(n),template:this.template,itemCreating:function(e){e.curData[e.fields.id]||(e.curData[e.fields.id]=t.getUniqueID("menuitem")),e.curData.htmlAttributes={role:"menuitem",tabindex:"-1"},s.isMenu&&!e.curData[s.getField("separator",n)]&&(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]),""===e.curData[e.fields.iconCss]&&(e.curData[e.fields.iconCss]=null)},itemCreated:function(e){if(e.curData[s.getField("separator",n)]&&(e.item.classList.add(q),e.item.removeAttribute("role")),!l||e.curData[e.fields.iconCss]||e.curData[s.getField("separator",n)]||e.item.classList.add("e-blankicon"),e.curData[e.fields.child]&&e.curData[e.fields.child].length){var t=s.createElement("span",{className:"e-icons e-caret"});e.item.appendChild(t),e.item.setAttribute("aria-haspopup","true"),e.item.setAttribute("aria-expanded","false"),s.isMenu||e.item.removeAttribute("role"),e.item.classList.add("e-menu-caret-icon")}s.isMenu&&s.template&&(e.item.setAttribute("id",e.curData[e.fields.id].toString()),e.item.removeAttribute("data-uid"));var i={item:e.curData,element:e.item};s.trigger("beforeItemRender",i)}};this.setProperties({items:this.items},!0),this.isMenu&&(o.templateID=this.element.id+Q);var r=i.ListBase.createList(this.createElement,e,o,!this.template);return r.setAttribute("tabindex","0"),this.isMenu&&r.setAttribute("role","menu"),r},n.prototype.moverHandler=function(e){var i=e.target;this.liTrgt=i;var s=this.getLI(i),n=s?t.closest(s,".e-"+this.getModuleName()+"-wrapper"):this.getWrapper(),l=this.getWrapper(),o=new RegExp("-ej2menu-(.*)-popup"),r=!1;if(n){if((""!==n.id?o.exec(n.id)[1]:n.querySelector("ul").id)!==this.element.id){if(this.removeLIStateByClass([R,F],[this.getWrapper()]),!this.navIdx.length)return;r=!0}s&&t.closest(s,".e-"+this.getModuleName()+"-wrapper")&&!r?(this.removeLIStateByClass([R],this.isMenu?[n].concat(this.getPopups()):[n]),this.removeLIStateByClass([R],this.isMenu?[l].concat(this.getPopups()):[l]),s.classList.add(R),this.showItemOnClick||this.clickHandler(e)):this.isMenu&&this.showItemOnClick&&this.removeLIStateByClass([R],[n].concat(this.getPopups())),this.isMenu&&(this.showItemOnClick||i.parentElement===n||t.closest(i,".e-"+this.getModuleName()+"-popup")||s&&(!s||this.getIndex(s.id,!0).length)?r&&this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e)):(this.removeLIStateByClass([R],[n]),this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e))),this.isClosed||this.removeStateWrapper(),this.isClosed=!1)}},n.prototype.removeStateWrapper=function(){if(this.liTrgt){var e=t.closest(this.liTrgt,".e-menu-vscroll");"DIV"===this.liTrgt.tagName&&e&&this.removeLIStateByClass([R,F],[e])}},n.prototype.removeLIStateByClass=function(e,i){for(var s,n=function(n){e.forEach(function(e){(s=t.select("."+e,i[n]))&&s.classList.remove(e)})},l=0;l<i.length;l++)n(l)},n.prototype.getField=function(e,t){void 0===t&&(t=0);var i=this.fields[e];return"string"==typeof i?i:i[t]?i[t].toString():i[i.length-1].toString()},n.prototype.getFields=function(e){return void 0===e&&(e=0),{id:this.getField("itemId",e),iconCss:this.getField("iconCss",e),text:this.getField("text",e),url:this.getField("url",e),child:this.getField("children",e),separator:this.getField("separator",e)}},n.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][t])return!0;return!1},n.prototype.menuHeaderClickHandler=function(e){t.closest(e.target,".e-menu-wrapper").querySelector("ul.e-menu-parent").id===this.element.id&&(this.element.classList.contains("e-hide-menu")?this.openHamburgerMenu(e):this.closeHamburgerMenu(e))},n.prototype.clickHandler=function(e){if(this.isTapHold)this.isTapHold=!1;else{var i=this.getWrapper(),s=e.target,n=this.cli=this.getLI(s),l=new RegExp("-ej2menu-(.*)-popup"),o=n?t.closest(n,".e-"+this.getModuleName()+"-wrapper"):null,r=n&&o&&(this.isMenu?this.getIndex(n.id,!0).length>0:i.firstElementChild.id===o.firstElementChild.id);if(n&&o&&this.isMenu){var a=o.id?l.exec(o.id)[1]:o.querySelector(".e-menu-parent").id;if(this.element.id!==a)return}if(r&&"click"===e.type&&!n.classList.contains(j)){this.setLISelected(n);var d=this.getIndex(n.id,!0),h={element:n,item:this.getItem(d),event:e};this.trigger("select",h)}if(r&&("mouseover"===e.type||t.Browser.isDevice||this.showItemOnClick)){var c=void 0;if(n.classList.contains(j)){c=i.children[this.navIdx.length-1],this.toggleAnimation(c);(f=this.getLIByClass(c,F))&&f.classList.remove(F),t.detach(n.parentNode),this.navIdx.pop()}else if(!n.classList.contains(q)){this.showSubMenu=!0;var p=n.parentNode;if(this.cliIdx=this.getIdx(p,n),this.isMenu||!t.Browser.isDevice){var u=this.isMenu?Array.prototype.indexOf.call([i].concat(this.getPopups()),t.closest(p,".e-"+this.getModuleName()+"-wrapper")):this.getIdx(i,p);if(this.navIdx[u]===this.cliIdx&&(this.showSubMenu=!1),u!==this.navIdx.length&&("mouseover"!==e.type||this.showSubMenu)){var f;(f=this.getLIByClass(p,F))&&f.classList.remove(F),this.isClosed=!0,this.keyType="click",this.closeMenu(u+1,e)}}this.isClosed||this.afterCloseMenu(e),this.isClosed=!1}}else if(this.isMenu&&"DIV"===s.tagName&&this.navIdx.length&&t.closest(s,".e-menu-vscroll")){var m=t.closest(s,"."+X),g=Array.prototype.indexOf.call(this.getPopups(),m)+1;g<this.navIdx.length&&(this.closeMenu(g+1,e),this.removeLIStateByClass([R,F],[m]))}else this.isMenu&&this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):"UL"===s.tagName&&(this.isMenu?!s.parentElement.classList.contains("e-menu-wrapper")||this.getIndex(s.querySelector("."+K).id,!0).length:s.parentElement===i)||(n||this.removeLIStateByClass([F],[i]),n&&n.querySelector(".e-caret")||this.closeMenu(null,e))}},n.prototype.afterCloseMenu=function(e){if(this.showSubMenu){var i=this.navIdx.concat(this.cliIdx),s=this.getItem(i);s&&s[this.getField("children",i.length-1)]&&s[this.getField("children",i.length-1)].length?(("mouseover"===e.type||t.Browser.isDevice&&this.isMenu)&&this.setLISelected(this.cli),this.cli.setAttribute("aria-expanded","true"),this.navIdx.push(this.cliIdx),this.openMenu(this.cli,s,null,null,e)):"mouseover"!==e.type&&this.closeMenu(null,e)}this.keyType=""},n.prototype.setLISelected=function(e){var t=this.getLIByClass(e.parentElement,F);t&&t.classList.remove(F),this.isMenu||e.classList.remove(R),e.classList.add(F)},n.prototype.getLIByClass=function(e,t){for(var i=0,s=e.children.length;i<s;i++)if(e.children[i].classList.contains(t))return e.children[i];return null},n.prototype.getItem=function(e){var t=(e=e.slice()).pop();return this.getItems(e)[t]},n.prototype.getItems=function(e){for(var t=this.items,i=0;i<e.length;i++)t=t[e[i]][this.getField("children",i)];return t},n.prototype.setItems=function(e,t){var i=this.getItems(t);i.splice(0,i.length);for(var s=0;s<e.length;s++)i.splice(s,0,e[s])},n.prototype.getIdx=function(e,t,i){void 0===i&&(i=!0);var s=Array.prototype.indexOf.call(e.querySelectorAll("li"),t);return s=this.isMenu&&this.template&&this.isBlazor()?Array.prototype.indexOf.call(e.querySelectorAll(t.tagName),t):Array.prototype.indexOf.call(e.children,t),i&&e.children[0].classList.contains(j)&&s--,s},n.prototype.getLI=function(e){return"LI"===e.tagName&&e.classList.contains("e-menu-item")?e:t.closest(e,"li.e-menu-item")},n.prototype.isBlazor=function(){return-1!==Object.keys(window).indexOf("ejsInterop")},n.prototype.removeChildElement=function(e){for(;e.firstElementChild;)e.removeChild(e.firstElementChild);return e},n.prototype.onPropertyChanged=function(e,i){for(var s=this,n=this.getWrapper(),l=function(l){switch(l){case"cssClass":i.cssClass&&t.removeClass([n],i.cssClass.split(" ")),e.cssClass&&t.addClass([n],e.cssClass.split(" "));break;case"enableRtl":n.classList.toggle("e-rtl");break;case"showItemOnClick":o.unWireEvents(),o.showItemOnClick=e.showItemOnClick,o.wireEvents();break;case"enableScrolling":if(e.enableScrolling){var r;o.element.classList.contains("e-vertical")?o.addScrolling(n,o.element,"vscroll",n.offsetHeight,o.element.offsetHeight):o.addScrolling(n,o.element,"hscroll",n.offsetWidth,o.element.offsetWidth),o.getPopups().forEach(function(e){r=t.select(".e-ul",e),s.addScrolling(e,r,"vscroll",e.offsetHeight,r.offsetHeight)})}else{var a=n.children[0];o.element.classList.contains("e-vertical")?o.destroyScrollObj(t.getInstance(a,H),a):o.destroyScrollObj(t.getInstance(a,N),a),n.style.overflow="",n.appendChild(o.element),o.getPopups().forEach(function(e){a=e.children[0],s.destroyScrollObj(t.getInstance(a,H),a),e.style.overflow=""})}break;case"items":var d=void 0,h=void 0,c=void 0;if(Object.keys(i.items).length){var p=Object.keys(e.items);for(f=0;f<p.length;f++)(h=o.getChangedItemIndex(e,[],Number(p[f]))).length<=o.getWrapper().children.length&&(d=h.pop(),c=o.getItems(h),o.insertAfter([c[d]],c[d].text),o.removeItem(c,h,d),o.setItems(c,h)),h.length=0}else{var u=o.element;o.isBlazor()?u=o.removeChildElement(o.element):u.innerHTML="";[].slice.call(o.createItems(o.items).children).forEach(function(e){u.appendChild(e)});for(var f=1,m=n.childElementCount;f<m;f++)t.detach(n.lastElementChild);o.navIdx=[]}}},o=this,r=0,a=Object.keys(e);r<a.length;r++){l(a[r])}},n.prototype.getChangedItemIndex=function(e,t,i){t.push(i);var s=Object.keys(e.items[i]).pop();if("items"===s){var n=e.items[i];this.getChangedItemIndex(n,t,Number(Object.keys(n.items).pop()))}else"isParentArray"===s&&t.length>1&&t.pop();return t},n.prototype.removeItem=function(e,i,s){e.splice(s,1);var n=this.getWrapper().children;i.length<n.length&&t.detach(n[i.length].children[s])},n.prototype.unWireEvents=function(e){void 0===e&&(e=this.target);var i=this.getWrapper();if(e){for(var n=void 0,l=void 0,o=t.selectAll(e),r=0,a=o.length;r<a;r++)n=o[r],this.isMenu?t.EventHandler.remove(n,"click",this.menuHeaderClickHandler):t.Browser.isIos?(l=t.getInstance(n,t.Touch))&&l.destroy():t.EventHandler.remove(n,"contextmenu",this.cmenuHandler);if(!this.isMenu){t.EventHandler.remove(this.targetElement,"scroll",this.scrollHandler);for(var d=0,h=s.getScrollableParent(this.targetElement);d<h.length;d++){var c=h[d];t.EventHandler.remove(c,"scroll",this.scrollHandler)}}}t.Browser.isDevice||(t.EventHandler.remove(this.isMenu?document:i,"mouseover",this.delegateMoverHandler),t.EventHandler.remove(document,"mousedown",this.delegateMouseDownHandler)),t.EventHandler.remove(document,"click",this.delegateClickHandler),this.unWireKeyboardEvent(i),this.rippleFn()},n.prototype.unWireKeyboardEvent=function(e){var i=t.getInstance(e,t.KeyboardEvents);i&&i.destroy()},n.prototype.toggleAnimation=function(e,t){var i=this;void 0===t&&(t=!0);var s,n;"None"!==this.animationSettings.effect&&t?this.animation.animate(e,{name:this.animationSettings.effect,duration:this.animationSettings.duration,timingFunction:this.animationSettings.easing,begin:function(e){i.hamburgerMode?(n=e.element.parentElement,e.element.style.position="absolute",s=n.offsetHeight,e.element.style.maxHeight=e.element.offsetHeight+"px",n.style.maxHeight=""):(e.element.style.display="block",e.element.style.maxHeight=e.element.getBoundingClientRect().height+"px")},progress:function(e){i.hamburgerMode&&(n.style.minHeight=s+e.element.offsetHeight+"px")},end:function(e){i.hamburgerMode?(e.element.style.position="",e.element.style.maxHeight="",n.style.minHeight="",e.element.style.top="0px",e.element.children[0].focus(),i.triggerOpen(e.element.children[0])):i.end(e.element,t)}}):this.end(e,t)},n.prototype.triggerOpen=function(e){var t=this.navIdx.length?this.getItem(this.navIdx):null,i={element:e,parentItem:t,items:t?t.items:this.items};this.trigger("onOpen",i)},n.prototype.end=function(e,i){if(i)if(e.style.display="block",e.style.maxHeight="",this.triggerOpen(e),e.querySelector("."+R))e.querySelector("."+R).focus();else{var s=void 0;(s=this.getWrapper().children[this.getIdx(this.getWrapper(),e)-1])?s.querySelector("."+F).focus():this.element.focus()}else if(e===this.element){var n=this.getLIByClass(this.element,R);n&&n.classList.remove(R);var l=this.getLIByClass(this.element,F);l&&l.classList.remove(F),e.style.display="none"}else t.detach(e)},n.prototype.getPersistData=function(){return""},n.prototype.getWrapper=function(){return t.closest(this.element,".e-"+this.getModuleName()+"-wrapper")},n.prototype.getIndex=function(e,t,i,s,n,l){void 0===i&&(i=this.items),void 0===s&&(s=[]),void 0===n&&(n=!1),void 0===l&&(l=0);var o;l=n?l+1:0;for(var r=0,a=i.length;r<a;r++){if(o=i[r],(t?o[this.getField("itemId",l)]:o[this.getField("text",l)])===e){s.push(r);break}if(o[this.getField("children",l)]&&o[this.getField("children",l)].length){if(-1!==(s=this.getIndex(e,t,o[this.getField("children",l)],s,!0,l))[s.length-1]){s.unshift(r);break}r!==a-1&&s.pop()}else r===a-1&&s.push(-1)}return n||-1!==s[0]?s:[]},n.prototype.enableItems=function(e,i,s){void 0===i&&(i=!0);for(var n,l,o,r,a=Y,d=0;d<e.length;d++){if(o=this.getIndex(e[d],s),this.navIdx.length){if(1!==o.length){r=!1;for(var h=0,c=o.length-1;h<c;h++)if(o[h]!==this.navIdx[h]){r=!0;break}if(r)continue}}else if(1!==o.length)continue;l=o.pop(),(n=this.getUlByNavIdx(o.length))&&(i?this.isMenu?(n.children[l].classList.remove(a),n.children[l].removeAttribute("aria-disabled")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[l+1].classList.remove(a):n.children[l].classList.remove(a):this.isMenu?(n.children[l].classList.add(a),n.children[l].setAttribute("aria-disabled","true")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[l+1].classList.add(a):n.children[l].classList.add(a))}},n.prototype.showItems=function(e,t){this.showHideItems(e,!1,t)},n.prototype.hideItems=function(e,t){this.showHideItems(e,!0,t)},n.prototype.showHideItems=function(e,i,s){for(var n,l,o,r=0;r<e.length;r++)l=(o=this.getIndex(e[r],s)).pop(),(n=this.getUlByNavIdx(o.length))&&(i?t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[l+1].classList.add(G):n.children[l].classList.add(G):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[l+1].classList.remove(G):n.children[l].classList.remove(G))},n.prototype.removeItems=function(e,t){for(var i,s,n,l=0;l<e.length;l++)i=(s=this.getIndex(e[l],t)).pop(),n=this.getItems(s),this.removeItem(n,s,i)},n.prototype.insertAfter=function(e,t,i){this.insertItems(e,t,i)},n.prototype.insertBefore=function(e,t,i){this.insertItems(e,t,i,!1)},n.prototype.insertItems=function(e,i,s,n){void 0===n&&(n=!0);for(var l,o,r,a,d,h=0;h<e.length;h++){o=(r=this.getIndex(i,s)).pop(),a=this.getItems(r),d=new ee(a[0],"items",e[h],!0),a.splice(n?o+1:o,0,d);var c=this.isMenu?[this.getWrapper()].concat(this.getPopups()):[].slice.call(this.getWrapper().children);if(r.length<c.length){o=n?o+1:o,this.hasField(a,this.getField("iconCss",r.length-1)),l=this.createItems(a).children[o];var p=this.isMenu?t.select(".e-menu-parent",c[r.length]):c[r.length];p.insertBefore(l,p.children[o])}}},n.prototype.removeAttributes=function(){var e=this;["top","left","display","z-index"].forEach(function(t){e.element.style.removeProperty(t)}),["role","tabindex","class","style"].forEach(function(t){"class"===t&&e.element.classList.contains("e-menu-parent")&&e.element.classList.remove("e-menu-parent"),-1!==["class","style"].indexOf(t)&&e.element.getAttribute(t)||e.element.removeAttribute(t),e.isMenu&&"class"===t&&e.element.classList.contains("e-vertical")&&e.element.classList.remove("e-vertical")})},n.prototype.destroy=function(){var i=this.getWrapper();if(i){if(this.unWireEvents(),this.isMenu)this.closeMenu(),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",this.removeAttributes(),i.parentNode.insertBefore(this.element,i);else{if(this.clonedElement.style.display="","EJS-CONTEXTMENU"===this.clonedElement.tagName)t.addClass([this.clonedElement],["e-control","e-lib","e-"+this.getModuleName()]),this.element=this.clonedElement;else if(this.refreshing&&this.clonedElement.childElementCount&&"LI"===this.clonedElement.children[0].tagName&&this.setProperties({items:[]},!0),document.getElementById(this.clonedElement.id)){var s=this.clonedElement.nextElementSibling;s&&s!==i?this.clonedElement.parentElement.insertBefore(this.element,s):this.clonedElement.parentElement.appendChild(this.element),this.isBlazor()?this.element=this.removeChildElement(this.element):this.element.innerHTML="",t.append([].slice.call(this.clonedElement.children),this.element),t.detach(this.clonedElement),this.removeAttributes()}this.clonedElement=null}this.isMenu&&this.clonedElement?(t.detach(this.element),i.style.display="",i.classList.remove("e-"+this.getModuleName()+"-wrapper"),i.removeAttribute("data-ripple")):t.detach(i),e.prototype.destroy.call(this)}},B([t.Event()],n.prototype,"beforeItemRender",void 0),B([t.Event()],n.prototype,"beforeOpen",void 0),B([t.Event()],n.prototype,"onOpen",void 0),B([t.Event()],n.prototype,"beforeClose",void 0),B([t.Event()],n.prototype,"onClose",void 0),B([t.Event()],n.prototype,"select",void 0),B([t.Event()],n.prototype,"created",void 0),B([t.Property("")],n.prototype,"cssClass",void 0),B([t.Property(!1)],n.prototype,"showItemOnClick",void 0),B([t.Property("")],n.prototype,"target",void 0),B([t.Property("")],n.prototype,"filter",void 0),B([t.Property(null)],n.prototype,"template",void 0),B([t.Property(!1)],n.prototype,"enableScrolling",void 0),B([t.Complex({},J)],n.prototype,"fields",void 0),B([t.Collection([],ee)],n.prototype,"items",void 0),B([t.Complex({},te)],n.prototype,"animationSettings",void 0),n=B([t.NotifyPropertyChanges],n)}(t.Component),se=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ne=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},le="e-vertical",oe="e-toolbar-items",re="e-toolbar-item",ae="e-rtl",de="e-separator",he="e-popup-up-icon",ce="e-popup-down-icon",pe="e-overlay",ue="e-toolbar-text",fe="e-popup-text",me="e-overflow-show",ge="e-overflow-hide",ve="e-hor-nav",ye="e-toolbar-center",be="e-tbar-pos",Ce="e-toolbar-pop",Ne="e-toolbar-popup",Ee="e-nav-active",xe="e-ignore",Oe="e-popup-alone",ke="e-hidden",Se="e-toolbar-multirow",we="e-multirow-pos",Le="e-multirow-separator",Ie="e-extended-separator",Ae="e-extended-toolbar",De="e-toolbar-extended",Pe="e-tbar-extended",Te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return se(i,e),ne([t.Property("")],i.prototype,"id",void 0),ne([t.Property("")],i.prototype,"text",void 0),ne([t.Property("auto")],i.prototype,"width",void 0),ne([t.Property("")],i.prototype,"cssClass",void 0),ne([t.Property(!1)],i.prototype,"showAlwaysInPopup",void 0),ne([t.Property("")],i.prototype,"prefixIcon",void 0),ne([t.Property("")],i.prototype,"suffixIcon",void 0),ne([t.Property("None")],i.prototype,"overflow",void 0),ne([t.Property("")],i.prototype,"template",void 0),ne([t.Property("Button")],i.prototype,"type",void 0),ne([t.Property("Both")],i.prototype,"showTextOn",void 0),ne([t.Property(null)],i.prototype,"htmlAttributes",void 0),ne([t.Property("")],i.prototype,"tooltipText",void 0),ne([t.Property("Left")],i.prototype,"align",void 0),ne([t.Event()],i.prototype,"click",void 0),i}(t.ChildProperty),Me=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.resizeContext=s.resize.bind(s),s.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},s}return se(i,e),i.prototype.destroy=function(){var i=this,s=this.element;for(e.prototype.destroy.call(this),this.unwireEvents(),this.tempId.forEach(function(e){t.isNullOrUndefined(i.element.querySelector(e))||(document.body.appendChild(i.element.querySelector(e)).style.display="none")});s.firstElementChild;)s.removeChild(s.firstElementChild);this.trgtEle&&s.appendChild(this.ctrlTem),this.clearProperty(),this.popObj=null,this.tbarAlign=null,this.remove(this.element,"e-toolpop"),s.removeAttribute("style"),["aria-disabled","aria-orientation","aria-haspopup","role"].forEach(function(e){i.element.removeAttribute(e)})},i.prototype.preRender=function(){var e={enableCollision:this.enableCollision,scrollStep:this.scrollStep};this.trigger("beforeCreate",e),this.enableCollision=e.enableCollision,this.scrollStep=e.scrollStep,this.scrollModule=null,this.popObj=null,this.tempId=[],this.tbarItemsCol=this.items,this.isVertical=!!this.element.classList.contains(le),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,ae)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),t.EventHandler.add(this.element,"keydown",this.docKeyDown,this),this.element.setAttribute("tabIndex","0")},i.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var i=!t.isNullOrUndefined(this.popObj)&&t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode;9===e.keyCode&&!0===e.target.classList.contains("e-hor-nav")&&i&&this.popObj.hide({name:"FadeOut",duration:100});(40===e.keyCode||38===e.keyCode||35===e.keyCode||36===e.keyCode)&&e.preventDefault()}},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),this.destroyScroll(),this.keyModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(document,"scroll",this.docEvent),t.EventHandler.remove(this.element,"keydown",this.docKeyDown),t.EventHandler.remove(document,"click",this.docEvent)},i.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},i.prototype.docEvent=function(e){var i=t.closest(e.target,".e-popup");this.popObj&&t.isVisible(this.popObj.element)&&!i&&"Popup"===this.overflowMode&&this.popObj.hide({name:"FadeOut",duration:100})},i.prototype.destroyScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,be),this.scrollModule.destroy(),this.scrollModule=null)},i.prototype.destroyItems=function(){[].slice.call(this.element.querySelectorAll("."+re)).forEach(function(e){t.detach(e)});var e=this.element.querySelector("."+oe);this.tbarAlign&&([].slice.call(e.children).forEach(function(e){t.detach(e)}),this.tbarAlign=!1,this.remove(e,be)),this.clearProperty()},i.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,ae),this.destroyScroll()),this.remove(this.element,Pe),this.remove(this.element,Ae);var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,Se),this.popObj&&this.popupRefresh(this.popObj.element,!0)},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},i.prototype.clstElement=function(e,i){return e&&this.popObj&&t.isVisible(this.popObj.element)?this.popObj.element.querySelector("."+re):this.element===i||e?this.element.querySelector("."+re+":not(."+pe+" ):not(."+de+" ):not(."+ke+" )"):t.closest(i,"."+re)},i.prototype.keyHandling=function(e,i,s,n,l){var o=this.popObj,r=this.element,a={name:"FadeOut",duration:100};switch(i.action){case"moveRight":if(this.isVertical)return;r===s?this.elementFocus(e):n||this.eleFocus(e,"next");break;case"moveLeft":if(this.isVertical)return;n||this.eleFocus(e,"previous");break;case"home":case"end":var d=void 0,h=void 0;if(e){var c=t.closest(e,".e-popup");c?t.isVisible(this.popObj.element)&&(h=[].slice.call(c.children),d="home"===i.action?h[0]:h[h.length-1]):(h=this.element.querySelectorAll("."+oe+" ."+re),d="home"===i.action?h[0]:h[h.length-1]),d&&this.elementFocus(d)}break;case"moveUp":case"moveDown":var p="moveUp"===i.action?"previous":"next";if(this.isVertical)"moveUp"===i.action?this.eleFocus(e,"previous"):this.eleFocus(e,"next");else if(o&&t.closest(s,".e-popup")){var u=o.element,f=u.firstElementChild;if("previous"===p&&f===e||"next"===p&&u.lastElementChild===e)return;this.eleFocus(e,p)}else"moveDown"===i.action&&o&&t.isVisible(o.element)&&this.elementFocus(e);break;case"tab":if(!l&&!n){var m=e.firstElementChild;r===s&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(m),m.focus()),this.element.removeAttribute("tabindex"))}break;case"popupClose":o&&"Extended"!==this.overflowMode&&o.hide(a);break;case"popupOpen":if(!n)return;o&&!t.isVisible(o.element)?(o.element.style.top=r.offsetHeight+"px",o.show({name:"FadeIn",duration:100})):o.hide(a)}},i.prototype.keyActionHandler=function(e){var t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!this.element.classList.contains(pe)){e.preventDefault();var i,s=t.classList.contains(ve),n=t.classList.contains("e-scroll-nav");((i=this.clstElement(s,t))||n)&&this.keyHandling(i,e,t,s,n)}},i.prototype.disable=function(e){var i=this.element;e?i.classList.add(pe):i.classList.remove(pe),i.setAttribute("tabindex",e?"-1":"0"),this.activeEle&&this.activeEle.setAttribute("tabindex",e?"-1":"0"),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&(t.isVisible(this.popObj.element)&&"Extended"!==this.overflowMode&&this.popObj.hide(),i.querySelector("#"+i.id+"_nav").setAttribute("tabindex",e?"-1":"0"))},i.prototype.eleContains=function(e){return e.classList.contains(de)||e.classList.contains(pe)||e.getAttribute("disabled")||e.classList.contains(ke)||!t.isVisible(e)},i.prototype.eleFocus=function(e,i){var s=Object(e)[i+"ElementSibling"];if(s){if(this.eleContains(s))return void this.eleFocus(s,i);this.elementFocus(s)}else if(this.tbarAlign){var n=Object(e.parentElement)[i+"ElementSibling"];if(t.isNullOrUndefined(n)||0!==n.children.length||(n=Object(n)[i+"ElementSibling"]),!t.isNullOrUndefined(n)&&n.children.length>0)if("next"===i){var l=n.querySelector("."+re);this.eleContains(l)?this.eleFocus(l,i):(l.firstElementChild.focus(),this.activeEleSwitch(l))}else{l=n.lastElementChild;this.eleContains(l)?this.eleFocus(l,i):this.elementFocus(l)}}},i.prototype.clickHandler=function(e){var i=this,s=e.target,n=s.classList,l=this.element,o=!t.isNullOrUndefined(t.closest(s,"."+Ce)),r=t.closest(s,"."+ve);r||(r=s),l.children[0].classList.contains("e-hscroll")||l.children[0].classList.contains("e-vscroll")||!n.contains(ve)||(n=s.querySelector(".e-icons").classList),(n.contains(he)||n.contains(ce))&&this.popupClickHandler(l,r,ae);var a,d=t.closest(e.target,"."+re);if(!t.isNullOrUndefined(d)&&!d.classList.contains(pe)||r.classList.contains(ve)){d&&(a=this.items[this.tbarEle.indexOf(d)]);var h={originalEvent:e,item:a};a&&!t.isNullOrUndefined(a.click)&&this.trigger("items["+this.tbarEle.indexOf(d)+"].click",h),h.cancel||this.trigger("clicked",h,function(e){!t.isNullOrUndefined(i.popObj)&&o&&!e.cancel&&"Popup"===i.overflowMode&&e.item&&"Input"!==e.item.type&&i.popObj.hide({name:"FadeOut",duration:100})})}},i.prototype.popupClickHandler=function(e,i,s){var n=this.popObj;t.isVisible(n.element)?(i.classList.remove(Ee),n.hide({name:"FadeOut",duration:100})):(e.classList.contains(s)&&(n.enableRtl=!0,n.position={X:"left",Y:"top"}),0!==n.offsetX||e.classList.contains(s)||(n.enableRtl=!1,n.position={X:"right",Y:"top"}),n.dataBind(),n.refreshPosition(),n.element.style.top=this.getElementOffsetY()+"px","Extended"===this.overflowMode&&(n.element.style.minHeight="0px"),i.classList.add(Ee),n.show({name:"FadeIn",duration:100}))},i.prototype.render=function(){this.initialize(),this.renderControl(),this.separator(),this.refreshToolbarTemplate(),this.wireEvents(),t.isBlazor()&&this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);"msie"===t.Browser.info.name&&"auto"===this.height&&"MultiRow"!==this.overflowMode||t.setStyleAttribute(this.element,{height:i}),t.setStyleAttribute(this.element,{width:e});var s={role:"toolbar","aria-disabled":"false","aria-haspopup":"false","aria-orientation":this.isVertical?"vertical":"horizontal"};t.attributes(this.element,s)},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?this.element.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderOverflowMode(),this.tbarAlign&&this.itemPositioning(),this.popObj&&this.popObj.element.childElementCount>1&&this.checkPopupRefresh(this.element,this.popObj.element)&&this.popupRefresh(this.popObj.element,!1)},i.prototype.changeOrientation=function(){var e=this.element;this.isVertical?(e.classList.remove(le),this.isVertical=!1,"auto"!==this.height&&"100%"!==this.height||(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add(le),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),t.setStyleAttribute(this.element,{height:t.formatUnit(this.height),width:t.formatUnit(this.width)})),this.destroyMode(),this.refreshOverflow()},i.prototype.initScroll=function(e,i){!this.scrollModule&&this.checkOverflow(e,i[0])&&(this.tbarAlign&&this.element.querySelector("."+oe+" ."+ye).removeAttribute("style"),this.isVertical?this.scrollModule=new H({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]):this.scrollModule=new N({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]),this.remove(this.scrollModule.element,be),t.setStyleAttribute(this.element,{overflow:"hidden"}))},i.prototype.itemWidthCal=function(e){var i,s=this,n=0;return[].slice.call(t.selectAll("."+re,e)).forEach(function(e){t.isVisible(e)&&(i=window.getComputedStyle(e),n+=s.isVertical?e.offsetHeight:e.offsetWidth,n+=parseFloat(s.isVertical?i.marginTop:i.marginRight),n+=parseFloat(s.isVertical?i.marginBottom:i.marginLeft))}),n},i.prototype.getScrollCntEle=function(e){var t=this.isVertical?".e-vscroll-content":".e-hscroll-content";return e.querySelector(t)},i.prototype.checkOverflow=function(e,i){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i)||!t.isVisible(e))return!1;var s=this.isVertical?e.offsetHeight:e.offsetWidth,n=this.isVertical?i.offsetHeight:i.offsetWidth;(this.tbarAlign||this.scrollModule||s===n)&&(n=this.itemWidthCal(this.scrollModule?this.getScrollCntEle(i):i));var l=e.querySelector("."+ve),o=e.querySelector(".e-scroll-nav"),r=0;return l?r=this.isVertical?l.offsetHeight:l.offsetWidth:o&&(r=this.isVertical?2*o.offsetHeight:2*o.offsetWidth),n>s-r},i.prototype.refreshOverflow=function(){this.resize()},i.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,be),this.itemPositioning())},i.prototype.renderOverflowMode=function(){var e=this.element,i=e.querySelector("."+oe),s=this.popupPriCount>0;if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.remove(this.element,"e-toolpop"),"msie"===t.Browser.info.name&&"auto"===this.height&&(e.style.height=""),this.overflowMode){case"Scrollable":t.isNullOrUndefined(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(oe)));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),(this.checkOverflow(e,i)||s)&&this.setOverflowAttributes(e),this.toolbarAlign(i);break;case"MultiRow":this.add(i,Se),this.checkOverflow(e,i)&&this.tbarAlign&&(this.removePositioning(),this.add(i,we)),"hidden"===e.style.overflow&&(e.style.overflow=""),"msie"!==t.Browser.info.name&&"auto"===e.style.height||(e.style.height="auto");break;case"Extended":this.add(this.element,Ae),(this.checkOverflow(e,i)||s)&&(this.tbarAlign&&this.removePositioning(),this.setOverflowAttributes(e)),this.toolbarAlign(i)}},i.prototype.setOverflowAttributes=function(e){this.createPopupEle(e,[].slice.call(t.selectAll("."+oe+" ."+re,e))),this.element.querySelector("."+ve).setAttribute("tabIndex","0"),this.element.querySelector("."+ve).setAttribute("role","list")},i.prototype.separator=function(){var e,t=this.element,i=[].slice.call(t.querySelectorAll("."+de)),s=t.querySelector("."+Le),n=t.querySelector("."+Ie);null!==(e="MultiRow"===this.overflowMode?s:n)&&("MultiRow"===this.overflowMode?e.classList.remove(Le):"Extended"===this.overflowMode&&e.classList.remove(Ie));for(var l=0;l<=i.length-1;l++)i[l].offsetLeft<30&&0!==i[l].offsetLeft&&("MultiRow"===this.overflowMode?i[l].classList.add(Le):"Extended"===this.overflowMode&&i[l].classList.add(Ie))},i.prototype.createPopupEle=function(e,i){var s=e.querySelector("."+ve),n=this.isVertical;s||this.createPopupIcon(e),s=e.querySelector("."+ve);var l=n?s.offsetHeight:s.offsetWidth,o=(n?e.offsetHeight:e.offsetWidth)-l;this.element.classList.remove("e-rtl"),t.setStyleAttribute(this.element,{direction:"initial"}),this.checkPriority(e,i,o,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.element.style.removeProperty("direction"),this.createPopup()},i.prototype.pushingPoppedEle=function(e,i,s,n,l){var o=e.element,r=t.selectAll("."+me,s),a=0,d=0;[].slice.call(t.selectAll("."+Ne,o.querySelector("."+oe))).forEach(function(o,h){r=t.selectAll("."+me,s),o.classList.contains(me)&&r.length>0?e.tbResize&&r.length>h?(s.insertBefore(o,r[h]),++d):(s.insertBefore(o,s.children[r.length]),++d):o.classList.contains(me)?(s.insertBefore(o,s.firstChild),++d):e.tbResize&&o.classList.contains(ge)&&s.children.length>0&&0===r.length?(s.insertBefore(o,s.firstChild),++d):o.classList.contains(ge)?i.push(o):e.tbResize?(s.insertBefore(o,s.childNodes[a+d]),++a):s.appendChild(o),o.classList.contains(de)?t.setStyleAttribute(o,{display:"",height:l+"px"}):t.setStyleAttribute(o,{display:"",height:n+"px"})}),i.forEach(function(e){s.appendChild(e)});for(var h=t.selectAll("."+re,o.querySelector("."+oe)),c=h.length-1;c>=0;c--){var p=h[c];if(!p.classList.contains(de)||"Extended"===this.overflowMode)break;t.setStyleAttribute(p,{display:"none"})}},i.prototype.createPopup=function(){var e,t,i,s,n=this.element;"Extended"===this.overflowMode&&(s=n.querySelector("."+de+":not(."+Ne+")"),i="auto"===n.style.height||""===n.style.height?null:s.offsetHeight),t=n.querySelector("."+re+":not(."+de+"):not(."+Ne+")"),e="auto"===n.style.height||""===n.style.height?null:t&&t.offsetHeight;var l;if(n.querySelector("#"+n.id+"_popup."+Ce))l=n.querySelector("#"+n.id+"_popup."+Ce);else{var o=this.createElement("div",{id:n.id+"_popup",className:Ce+" "+De}),r=this.createElement("div",{id:n.id+"_popup",className:Ce});l="Extended"===this.overflowMode?o:r}this.pushingPoppedEle(this,[],l,e,i),this.popupInit(n,l)},i.prototype.getElementOffsetY=function(){return"Extended"===this.overflowMode&&"border-box"===window.getComputedStyle(this.element).getPropertyValue("box-sizing")?this.element.clientHeight:this.element.offsetHeight},i.prototype.popupInit=function(e,i){if(this.popObj){var n=this.popObj.element;t.setStyleAttribute(n,{maxHeight:"",display:"block"}),t.setStyleAttribute(n,{maxHeight:n.offsetHeight+"px",display:""})}else{e.appendChild(i),t.setStyleAttribute(this.element,{overflow:""});var l=window.getComputedStyle(this.element),o=new s.Popup(null,{relateTo:this.element,offsetY:this.isVertical?0:this.getElementOffsetY(),enableRtl:this.enableRtl,open:this.popupOpen.bind(this),close:this.popupClose.bind(this),collision:{Y:this.enableCollision?"flip":"none"},position:this.enableRtl?{X:"left",Y:"top"}:{X:"right",Y:"top"}});if(o.appendTo(i),"Extended"===this.overflowMode&&(o.width=parseFloat(l.width)+2*parseFloat(l.borderRightWidth),o.offsetX=0),t.EventHandler.add(document,"scroll",this.docEvent.bind(this)),t.EventHandler.add(document,"click ",this.docEvent.bind(this)),o.element.style.maxHeight=o.element.offsetHeight+"px",this.isVertical&&(o.element.style.visibility="hidden"),this.isExtendedOpen){var r=this.element.querySelector("."+ve);r.classList.add(Ee),t.classList(r.firstElementChild,[he],[ce]),this.element.querySelector("."+De).classList.add("e-popup-open")}else o.hide();this.popObj=o,this.element.setAttribute("aria-haspopup","true")}},i.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,Pe):this.remove(this.element,Pe))},i.prototype.popupOpen=function(e){var i=this.popObj;this.isVertical||(i.offsetY=this.getElementOffsetY(),i.dataBind());var n=this.popObj.element,l=this.popObj.element.parentElement,o=l.querySelector("."+ve);t.setStyleAttribute(i.element,{height:"auto",maxHeight:""}),i.element.style.maxHeight=i.element.offsetHeight+"px","Extended"===this.overflowMode&&(i.element.style.minHeight="");var r=n.offsetTop+n.offsetHeight+s.calculatePosition(l).top,a=o.firstElementChild;o.classList.add(Ee),t.classList(a,[he],[ce]),this.tbarPopupHandler(!0);var d=t.isNullOrUndefined(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+d<r&&this.element.offsetTop<n.offsetHeight){var h=n.offsetHeight-(r-window.innerHeight-d+5);i.height=h+"px";for(var c=0;c<=n.childElementCount;c++){var p=n.children[c];if(p.offsetTop+p.offsetHeight>h){h=p.offsetTop;break}}t.setStyleAttribute(i.element,{maxHeight:h+"px"})}else if(this.isVertical){var u=this.element.getBoundingClientRect();t.setStyleAttribute(i.element,{maxHeight:u.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}},i.prototype.popupClose=function(e){var i=this.element.querySelector("."+ve),s=i.firstElementChild;i.classList.remove(Ee),t.classList(s,[ce],[he]),this.tbarPopupHandler(!1)},i.prototype.checkPriority=function(e,i,s,n){for(var l,o=this.popupPriCount>0,r=s,a=0,d=0,h=0,c=function(e,t){var i=!1;return t.forEach(function(t){e.classList.contains(t)&&(i=!0)}),i},p=i.length-1;p>=0;p--){var u=void 0,f=window.getComputedStyle(i[p]);this.isVertical?(u=parseFloat(f.marginTop),u+=parseFloat(f.marginBottom)):(u=parseFloat(f.marginRight),u+=parseFloat(f.marginLeft));var m=i[p]===this.tbarEle[0];m&&(this.tbarEleMrgn=u),l=this.isVertical?i[p].offsetHeight:i[p].offsetWidth;var g=m?l+u:l;if(c(i[p],[Oe])&&o&&(i[p].classList.add(Ne),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:g+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:g+"px"}),h++),this.isVertical?i[p].offsetTop+i[p].offsetHeight+u>s:i[p].offsetLeft+i[p].offsetWidth+u>s){if(i[p].classList.contains(de)){if("Extended"===this.overflowMode){if(d===h){c(v=i[p],[de,xe])&&(i[p].classList.add(Ne),h++)}d++}else if("Popup"===this.overflowMode){if(a>0&&d===h){var v;c(v=i[p+d+(a-1)],[de,xe])&&t.setStyleAttribute(v,{display:"none"})}a++,d=0,h=0}}else d++;i[p].classList.contains(me)&&n?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:c(i[p],[de,xe])?s-=(this.isVertical?i[p].offsetHeight:i[p].offsetWidth)+u:(i[p].classList.add(Ne),this.isVertical?t.setStyleAttribute(i[p],{display:"none",minHeight:g+"px"}):t.setStyleAttribute(i[p],{display:"none",minWidth:g+"px"}),h++)}}if(n){var y=t.selectAll("."+re+":not(."+Ne+")",this.element);this.checkPriority(e,y,r,!1)}},i.prototype.createPopupIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav e-hor-nav");s="Extended"===this.overflowMode?s+" e-expended-nav":s;var n=this.createElement("div",{id:i,className:s});"msie"!==t.Browser.info.name&&"edge"!==t.Browser.info.name||n.classList.add("e-ie-align");var l=this.createElement("div",{className:ce+" e-icons"});n.appendChild(l),n.setAttribute("tabindex","0"),n.setAttribute("role","list"),e.appendChild(n)},i.prototype.tbarPriRef=function(e,i,s,n,l,o,r,a){var d=a,h=this.popObj.element,c=t.selectAll("."+Ne+":not(."+me+")",h).length,p=function(e,t){return e.classList.contains(t)};if(0===t.selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)",e).length){var u=e.children[i-(i-s)-1],f=!t.isNullOrUndefined(u)&&p(u,xe);if(!t.isNullOrUndefined(u)&&p(u,de)&&!t.isVisible(u)||f){u.style.display="inherit";var m=u.offsetWidth+2*parseFloat(window.getComputedStyle(u).marginRight),g=u.previousElementSibling;o+m<r||l?(e.insertBefore(n,e.children[i+d-(i-s)]),t.isNullOrUndefined(g)||(g.style.display="")):g.classList.contains(de)&&(g.style.display="none"),u.style.display=""}else e.insertBefore(n,e.children[i+d-(i-s)])}else e.insertBefore(n,e.children[i+d-c])},i.prototype.popupRefresh=function(e,i){var s=this,n=this.element,l=this.isVertical,o=n.querySelector("."+ve),r=n.querySelector("."+oe);if(!t.isNullOrUndefined(o)){r.removeAttribute("style"),e.style.display="block";var a;a=l?n.offsetHeight-(o.offsetHeight+r.offsetHeight):n.offsetWidth-(o.offsetWidth+r.offsetWidth);var d=0;[].slice.call(e.children).forEach(function(e){d+=s.popupEleWidth(e),t.setStyleAttribute(e,{position:""})}),a+(l?o.offsetHeight:o.offsetWidth)>d&&0===this.popupPriCount&&(i=!0),this.popupEleRefresh(a,e,i),e.style.display="",0===e.children.length&&o&&this.popObj&&(t.detach(o),o=null,this.popObj.destroy(),t.detach(this.popObj.element),this.popObj=null,n.setAttribute("aria-haspopup","false"))}},i.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll("."+xe)),s=[],n=0;return i.length>0?(i.forEach(function(e){s.push([].slice.call(t.children).indexOf(e))}),s.forEach(function(t){t<=e&&n++}),n):0},i.prototype.checkPopupRefresh=function(e,t){t.style.display="block";var i=this.popupEleWidth(t.firstElementChild);t.firstElementChild.style.removeProperty("Position");var s=e.offsetWidth-e.querySelector("."+ve).offsetWidth,n=e.querySelector("."+oe).offsetWidth;return t.style.removeProperty("display"),s>i+n},i.prototype.popupEleWidth=function(e){e.style.position="absolute";var i=this.isVertical?e.offsetHeight:e.offsetWidth,s=e.querySelector(".e-tbar-btn-text");if(e.classList.contains("e-tbtn-align")||e.classList.contains(fe)){var n=e.children[0];!t.isNullOrUndefined(s)&&e.classList.contains(fe)?s.style.display="none":!t.isNullOrUndefined(s)&&e.classList.contains(ue)&&(s.style.display="block"),n.style.minWidth="0%",i=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),n.style.minWidth="",n.style.minHeight="",t.isNullOrUndefined(s)||(s.style.display="")}return i},i.prototype.popupEleRefresh=function(e,i,s){for(var n,l,o=this.popupPriCount>0,r=this.tbarEle,a=this.element.querySelector("."+oe),d=0,h=function(i){if(i.classList.contains(Oe)&&o&&!s)return"continue";var h=c.popupEleWidth(i);if(i===c.tbarEle[0]&&(h+=c.tbarEleMrgn),i.style.position="",!(h<e||s))return"break";if(t.setStyleAttribute(i,{minWidth:"",height:"",minHeight:""}),i.classList.contains(ge)||i.classList.remove(Ne),l=c.tbarEle.indexOf(i),c.tbarAlign){var p=c.items[l].align;l=c.tbarAlgEle[(p+"s").toLowerCase()].indexOf(i),r=c.tbarAlgEle[(p+"s").toLowerCase()],a=c.element.querySelector("."+oe+" .e-toolbar-"+p.toLowerCase())}var u=0;"Extended"!==c.overflowMode&&r.slice(0,l).forEach(function(t){(t.classList.contains(me)||t.classList.contains(de))&&(t.classList.contains(de)&&(t.style.display="",e-=t.offsetWidth),u++)}),d=c.ignoreEleFetch(l,a),i.classList.contains(me)?(c.tbarPriRef(a,l,u,i,s,h,e,d),e-=i.offsetWidth):0===l?(a.insertBefore(i,a.firstChild),e-=i.offsetWidth):(n=t.selectAll("."+me,c.popObj.element).length,a.insertBefore(i,a.children[l+d-n]),e-=i.offsetWidth),i.style.height=""},c=this,p=0,u=[].slice.call(i.children);p<u.length;p++){if("break"===h(u[p]))break}this.checkOverflow(this.element,this.element.getElementsByClassName(oe)[0])&&!s&&this.renderOverflowMode()},i.prototype.removePositioning=function(){var e=this.element.querySelector("."+oe);if(!t.isNullOrUndefined(e)&&e.classList.contains(be)){this.remove(e,be);var i=[].slice.call(e.childNodes);i[1].removeAttribute("style"),i[2].removeAttribute("style")}},i.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+oe);this.add(e,be),this.itemPositioning()},i.prototype.itemPositioning=function(){var e,i=this.element.querySelector("."+oe);if(!t.isNullOrUndefined(i)&&i.classList.contains(be)){var s,n=this.element.querySelector("."+ve);if(this.scrollModule){var l=this.isVertical?"e-vscroll-content":"e-hscroll-content";s=[].slice.call(i.querySelector("."+l).children)}else s=[].slice.call(i.childNodes);e=this.isVertical?s[0].offsetHeight+s[2].offsetHeight:s[0].offsetWidth+s[2].offsetWidth;var o=this.isVertical?this.element.offsetHeight:this.element.offsetWidth;if(n){o-=this.isVertical?n.offsetHeight:n.offsetWidth;var r=(this.isVertical?n.offsetHeight:n.offsetWidth)+"px";s[2].removeAttribute("style"),this.isVertical?this.enableRtl?s[2].style.top=r:s[2].style.bottom=r:this.enableRtl?s[2].style.left=r:s[2].style.right=r}if(!(o<=e)){var a=(o-e-(this.isVertical?s[1].offsetHeight:s[1].offsetWidth))/2;s[1].removeAttribute("style");var d=(this.isVertical?s[0].offsetHeight:s[0].offsetWidth)+a+"px";this.isVertical?this.enableRtl?s[1].style.marginBottom=d:s[1].style.marginTop=d:this.enableRtl?s[1].style.marginRight=d:s[1].style.marginLeft=d}}},i.prototype.tbarItemAlign=function(e,t,i){var s=this;if(!e.showAlwaysInPopup||"Show"===e.overflow){var n=[];if(n.push(this.createElement("div",{className:"e-toolbar-left"})),n.push(this.createElement("div",{className:ye})),n.push(this.createElement("div",{className:"e-toolbar-right"})),0===i&&"Left"!==e.align)n.forEach(function(e){t.appendChild(e)}),this.tbarAlign=!0,this.add(t,be);else if("Left"!==e.align){var l=t.childNodes,o=n[0];[].slice.call(l).forEach(function(e){s.tbarAlgEle.lefts.push(e),o.appendChild(e)}),t.appendChild(o),t.appendChild(n[1]),t.appendChild(n[2]),this.tbarAlign=!0,this.add(t,be)}}},i.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,oe),this.tbarEle=[];[].slice.call(this.trgtEle.children).forEach(function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),t.setAttribute("aria-disabled","false"),e.add(t,re))})},i.prototype.renderItems=function(){var e,t,i,s=this.element,n=this.items;if(s&&s.children.length>0&&(e=s.querySelector("."+oe)),null!=this.trgtEle)this.ctrlTemplate();else if(s&&n.length>0){e||(e=this.createElement("div",{className:oe}));for(var l=0;l<n.length;l++)t=this.renderSubComponent(n[l],l),-1===this.tbarEle.indexOf(t)&&this.tbarEle.push(t),this.tbarAlign||this.tbarItemAlign(n[l],e,l),(i=e.querySelector(".e-toolbar-"+n[l].align.toLowerCase()))?(n[l].showAlwaysInPopup&&"Show"!==n[l].overflow||this.tbarAlgEle[(n[l].align+"s").toLowerCase()].push(t),i.appendChild(t)):e.appendChild(t);s.appendChild(e)}},i.prototype.setAttr=function(e,t){for(var i,s=Object.keys(e),n=0;n<s.length;n++)"class"===(i=s[n])?this.add(t,e[i]):t.setAttribute(i,e[i])},i.prototype.enableItems=function(e,i){var s,n=e,l=n.length;t.isNullOrUndefined(i)&&(i=!0);var o=function(e,t){e?(t.classList.remove(pe),t.setAttribute("aria-disabled","false")):(t.classList.add(pe),t.setAttribute("aria-disabled","true"))};if(!t.isNullOrUndefined(l)&&l>=1){for(var r=0,a=[].slice.call(n);r<l;r++){var d=a[r];if("number"==typeof d){if(s=this.getElementByIndex(d),t.isNullOrUndefined(s))return;n[r]=s}else s=d;o(i,s)}i?t.removeClass(n,pe):t.addClass(n,pe)}else{if("number"==typeof n){if(s=this.getElementByIndex(n),t.isNullOrUndefined(s))return}else s=e;o(i,s)}},i.prototype.getElementByIndex=function(e){return this.tbarEle[e]?this.tbarEle[e]:null},i.prototype.addItems=function(e,i){var s;this.extendedOpen();var n=this.element.querySelector("."+oe);if(t.isNullOrUndefined(n))this.itemsRerender(e);else{var l,o="Left";t.isNullOrUndefined(i)&&(i=0),e.forEach(function(e){t.isNullOrUndefined(e.align)||"Left"===e.align||"Left"!==o||(o=e.align)});for(var r=0,a=e;r<a.length;r++){var d=a[r];if(t.isNullOrUndefined(d.type)&&(d.type="Button"),s=t.selectAll("."+re,this.element),d.align=o,l=this.renderSubComponent(d,i),this.tbarEle.length>=i&&s.length>=0){t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var h="L"===d.align[0]?0:"C"===d.align[0]?1:2,c=void 0;this.tbarAlign||"Left"===o?this.tbarAlign?((c=t.closest(s[0],"."+oe).children[h]).insertBefore(l,c.children[i]),this.tbarAlgEle[(d.align+"s").toLowerCase()].splice(i,0,l),this.refreshPositioning()):0===s.length?(s=t.selectAll("."+oe,this.element))[0].appendChild(l):s[0].parentNode.insertBefore(l,s[i]):(this.tbarItemAlign(d,n,1),this.tbarAlign=!0,(c=t.closest(s[0],"."+oe).children[h]).appendChild(l),this.tbarAlgEle[(d.align+"s").toLowerCase()].push(l),this.refreshPositioning()),this.items.splice(i,0,d),this.tbarEle.splice(i,0,l),i++,this.offsetWid=n.offsetWidth}}n.style.width="",this.renderOverflowMode()}},i.prototype.removeItems=function(e){var i,s=e,n=[].slice.call(t.selectAll("."+re,this.element));if("number"==typeof s)i=parseInt(e.toString(),10),this.removeItemByIndex(i,n);else if(s&&s.length>1)for(var l=0,o=[].slice.call(s);l<o.length;l++){var r=o[l];i=this.tbarEle.indexOf(r),this.removeItemByIndex(i,n),n=t.selectAll("."+re,this.element)}else{r=s&&s.length&&1===s.length?s[0]:e;i=n.indexOf(r),this.removeItemByIndex(i,n)}this.resize()},i.prototype.removeItemByIndex=function(e,i){if(this.tbarEle[e]&&i[e]){var s=this.tbarEle.indexOf(i[e]);if(this.tbarAlign){var n=void 0;n=this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].indexOf(this.tbarEle[s]),this.tbarAlgEle[(this.items[s].align+"s").toLowerCase()].splice(n,1)}t.detach(i[e]),this.items.splice(s,1),this.tbarEle.splice(s,1)}},i.prototype.templateRender=function(e,i,s,n){var l,o=s.type,r=e;if("object"==typeof e&&(l="function"==typeof r.appendTo),"string"!=typeof e&&l){if("Input"===o){h=this.createElement("input");s.id?h.id=s.id:h.id=t.getUniqueID("tbr-ipt"),i.appendChild(h),r.appendTo(h)}}else{var a=void 0,d=e;d="string"==typeof e?e.trim():e;try{if("object"!=typeof e||t.isNullOrUndefined(e.tagName)){if(document.querySelectorAll(d).length){var h,c=(h=document.querySelector(d)).outerHTML.trim();i.appendChild(h),h.style.display="",t.isNullOrUndefined(c)||this.tempId.push(d)}}else i.appendChild(e)}catch(e){a=t.compile(d)}var p=void 0;if(!t.isNullOrUndefined(a)){var u=this.element.id+n+"_template";p=a({},this,"template",u,this.isStringTemplate)}!t.isNullOrUndefined(p)&&p.length>0&&[].slice.call(p).forEach(function(e){t.isNullOrUndefined(e.tagName)||(e.style.display=""),i.appendChild(e)})}this.add(i,"e-template"),this.tbarEle.push(i)},i.prototype.buttonRendering=function(e,i){var s=this.createElement("button",{className:"e-tbar-btn"});s.setAttribute("type","button");var l,o,r=e.text;e.id?s.id=e.id:s.id=t.getUniqueID("e-tbr-btn");var a=this.createElement("span",{className:"e-tbar-btn-text"});r?(a.innerHTML=r,s.appendChild(a),s.classList.add("e-tbtn-txt")):this.add(i,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(l=e.prefixIcon+" e-icons",o="Left"):(l=e.suffixIcon+" e-icons",o="Right"));var d=new n.Button({iconCss:l,iconPosition:o});return d.createElement=this.createElement,d.appendTo(s),e.width&&t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),s},i.prototype.renderSubComponent=function(e,t){var i,s;if((i=this.createElement("div",{className:re})).setAttribute("aria-disabled","false"),this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,i),e.tooltipText){var n=this.createElement("div",{innerHTML:e.tooltipText});i.setAttribute("title",n.textContent)}if(e.cssClass&&(i.className=i.className+" "+e.cssClass),e.template)this.templateRender(e.template,i,e,t);else switch(e.type){case"Button":(s=this.buttonRendering(e,i)).setAttribute("tabindex","-1"),s.setAttribute("aria-label",e.text||e.tooltipText),i.appendChild(s),i.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(i,de)}if(e.showTextOn){var l=e.showTextOn;"Toolbar"===l?(this.add(i,ue),this.add(i,"e-tbtn-align")):"Overflow"===l&&this.add(i,fe)}if(e.overflow){var o=e.overflow;"Show"===o?this.add(i,me):"Hide"===o&&(i.classList.contains(de)||this.add(i,ge))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!i.classList.contains(de)&&(this.add(i,Oe),this.popupPriCount++),i},i.prototype.refreshToolbarTemplate=function(){for(var e=Object.keys(window),i=0,s=this.items.length;i<s;i++){var n=this.items[i];n.template&&e.indexOf("Blazor")>-1&&!this.isStringTemplate&&0===n.template.indexOf("<div>Blazor")&&(t.resetBlazorTemplate(this.element.id+i+"_template","Template"),t.updateBlazorTemplate(this.element.id+i+"_template","Template",n))}},i.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},i.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},i.prototype.activeEleRemove=function(e){t.isNullOrUndefined(this.activeEle)||this.activeEle.setAttribute("tabindex","-1"),this.activeEle=e,t.isNullOrUndefined(this.trgtEle)&&!e.parentElement.classList.contains("e-template")?e.removeAttribute("tabindex"):this.activeEle.setAttribute("tabindex","0")},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.getModuleName=function(){return"toolbar"},i.prototype.itemsRerender=function(e){this.items=this.tbarItemsCol,this.destroyMode(),this.destroyItems(),this.items=e,this.tbarItemsCol=this.items,this.renderItems(),this.renderOverflowMode()},i.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&"Popup"===this.overflowMode&&this.popObj.hide();var i=this.checkOverflow(e,e.getElementsByClassName(oe)[0]);if(!i){this.destroyScroll();var s=e.querySelector("."+oe);t.isNullOrUndefined(s)||(this.remove(s,we),this.tbarAlign&&this.add(s,be))}if(!i||!this.scrollModule||this.offsetWid!==e.offsetWidth){if((this.offsetWid>e.offsetWidth||i)&&this.renderOverflowMode(),this.popObj){if("Extended"===this.overflowMode){var n=window.getComputedStyle(this.element);this.popObj.width=parseFloat(n.width)+2*parseFloat(n.borderRightWidth)}this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()}this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator()}},i.prototype.extendedOpen=function(){var e=this.element.querySelector("."+De);"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains("e-popup-open"))},i.prototype.onPropertyChanged=function(e,i){var s=this.element;this.extendedOpen();for(var n=0,l=Object.keys(e);n<l.length;n++){switch(l[n]){case"items":if(e.items instanceof Array&&i.items instanceof Array)this.itemsRerender(e.items);else for(var o=Object.keys(e.items),r=0;r<o.length;r++){var a=parseInt(Object.keys(e.items)[r],10),d=Object.keys(e.items[a])[0],h=(Object(i.items[a])[d],Object(e.items[a])[d]);if(this.tbarAlign||"align"===d){this.refresh(),this.trigger("created");break}var c="showAlwaysInPopup"===d&&!h,p="overflow"===d&&0!==this.popupPriCount;(c||this.items[a].showAlwaysInPopup&&p)&&--this.popupPriCount,t.isNullOrUndefined(this.scrollModule)&&this.destroyMode();var u=[].slice.call(t.selectAll("."+oe+" ."+re,s));t.detach(u[a]),this.tbarEle.splice(a,1),this.addItems([this.items[a]],a),this.items.splice(a,1),this.items[a].template&&this.tbarEle.splice(this.items.length,1)}break;case"width":var f=s.offsetWidth;t.setStyleAttribute(s,{width:t.formatUnit(e.width)}),this.renderOverflowMode(),this.popObj&&f<s.offsetWidth&&this.popupRefresh(this.popObj.element,!1);break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(s,ae),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(s,ae):this.remove(s,ae),t.isNullOrUndefined(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,ae):this.remove(this.scrollModule.element,ae)),t.isNullOrUndefined(this.popObj)||(e.enableRtl?this.add(this.popObj.element,ae):this.remove(this.popObj.element,ae)),this.tbarAlign&&this.itemPositioning();break;case"scrollStep":this.scrollModule&&(this.scrollModule.scrollStep=this.scrollStep);break;case"enableCollision":this.popObj&&(this.popObj.collision={Y:this.enableCollision?"flip":"none"})}}},i.prototype.hideItem=function(e,i){var s,n,l="object"==typeof e,o=e,r=[].slice.call(t.selectAll("."+re,this.element));if(l)n=e;else if(this.tbarEle[o]){n=[].slice.call(t.selectAll("."+re,this.element))[o]}if(n){if(i?n.classList.add(ke):n.classList.remove(ke),i&&t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains(de)){if(t.isNullOrUndefined(n.firstElementChild.getAttribute("tabindex"))){n.firstElementChild.setAttribute("tabindex","-1");var a=[].slice.call(t.selectAll("."+re,this.element));l&&(o=a.indexOf(n));for(var d=a[++o];d;){if(!this.eleContains(d)){d.firstElementChild.removeAttribute("tabindex");break}d=a[++o]}}}else if(t.isNullOrUndefined(this.element.getAttribute("tabindex"))&&!n.classList.contains(de))for(var h=!1,c=!1,p=r[s=0];p;)if(p.classList.contains(de))p=r[++s];else if(t.isNullOrUndefined(p.firstElementChild.getAttribute("tabindex")))p.firstElementChild.setAttribute("tabindex","-1"),h=!0;else{if(h&&c)break;this.eleContains(p)||(p.firstElementChild.removeAttribute("tabindex"),c=!0),p=r[++s]}this.refreshOverflow()}},ne([t.Collection([],Te)],i.prototype,"items",void 0),ne([t.Property("auto")],i.prototype,"width",void 0),ne([t.Property("auto")],i.prototype,"height",void 0),ne([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),ne([t.Property()],i.prototype,"scrollStep",void 0),ne([t.Property(!0)],i.prototype,"enableCollision",void 0),ne([t.Event()],i.prototype,"clicked",void 0),ne([t.Event()],i.prototype,"created",void 0),ne([t.Event()],i.prototype,"destroyed",void 0),ne([t.Event()],i.prototype,"beforeCreate",void 0),i=ne([t.NotifyPropertyChanges],i)}(t.Component),He=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Ue=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},Be="e-acrdn-root",Re="e-accordion",je="e-acrdn-item",Fe="e-acrdn-header",qe="e-acrdn-header-content",Ve="e-acrdn-panel",ze="e-acrdn-content",We="e-toggle-icon",_e="e-content-hide",Ke="e-selected",Ye="e-active",Ge="e-overlay",Xe="e-toggle-animation",Qe="e-expand-state",Je="e-accordion-container",Ze=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return He(i,e),Ue([t.Property("SlideDown")],i.prototype,"effect",void 0),Ue([t.Property(400)],i.prototype,"duration",void 0),Ue([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),$e=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return He(i,e),Ue([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},Ze)],i.prototype,"collapse",void 0),Ue([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},Ze)],i.prototype,"expand",void 0),i}(t.ChildProperty),et=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return He(i,e),Ue([t.Property(null)],i.prototype,"content",void 0),Ue([t.Property(null)],i.prototype,"header",void 0),Ue([t.Property(null)],i.prototype,"cssClass",void 0),Ue([t.Property(null)],i.prototype,"iconCss",void 0),Ue([t.Property(!1)],i.prototype,"expanded",void 0),i}(t.ChildProperty),tt=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.keyConfigs={moveUp:"uparrow",moveDown:"downarrow",enter:"enter",space:"space",home:"home",end:"end"},s}return He(i,e),i.prototype.destroy=function(){var t=this,i=this.element;for(e.prototype.destroy.call(this),this.unwireEvents(),this.isDestroy=!0,this.restoreContent(null);i.firstElementChild;)i.removeChild(i.firstElementChild);if(this.trgtEle)for(;this.ctrlTem.firstElementChild;)i.appendChild(this.ctrlTem.firstElementChild);i.classList.remove(Be),i.removeAttribute("style"),["aria-disabled","aria-multiselectable","role","data-ripple"].forEach(function(e){t.element.removeAttribute(e)})},i.prototype.preRender=function(){var e=t.closest(this.element,"."+Ve);this.isNested=!1,this.templateEle=[],this.isDestroy||(this.isDestroy=!1),t.isNullOrUndefined(e)?this.element.classList.add(Be):(e.classList.add("e-nested"),this.isNested=!0),this.enableRtl&&this.add(this.element,"e-rtl"),this.enablePersistence&&!t.isNullOrUndefined(this.expandedItems)||(this.expandedItems=[])},i.prototype.add=function(e,t){e.classList.add(t)},i.prototype.remove=function(e,t){e.classList.remove(t)},i.prototype.render=function(){this.initializeheaderTemplate(),this.initializeItemTemplate(),this.initialize(),this.renderControl(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){var e=t.formatUnit(this.width),i=t.formatUnit(this.height);t.setStyleAttribute(this.element,{width:e,height:i});this.expandedItems.length>0&&(this.initExpand=this.expandedItems),t.attributes(this.element,{"aria-disabled":"false",role:"presentation","aria-multiselectable":"true"}),"Single"===this.expandMode&&this.element.setAttribute("aria-multiselectable","false")},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?t.select("div",this.element):null,this.renderItems(),this.initItemExpand()},i.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),t.isNullOrUndefined(this.keyModule)||this.keyModule.destroy()},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),this.isNested||this.isDestroy||t.rippleEffect(this.element,{selector:"."+Fe}),this.isNested||(this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}))},i.prototype.templateParser=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},i.prototype.initializeheaderTemplate=function(){this.headerTemplate&&(this.headerTemplateFn=this.templateParser(this.headerTemplate))},i.prototype.initializeItemTemplate=function(){this.itemTemplate&&(this.itemTemplateFn=this.templateParser(this.itemTemplate))},i.prototype.getheaderTemplate=function(){return this.headerTemplateFn},i.prototype.getItemTemplate=function(){return this.itemTemplateFn},i.prototype.updateContentBlazorTemplate=function(e,i){this.itemTemplate&&t.isBlazor()&&!this.isStringTemplate&&t.updateBlazorTemplate(this.element.id+"_itemTemplate","ItemTemplate",this,!1),e&&e.content&&t.isBlazor()&&!this.isStringTemplate&&0===e.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+i+"_content","ContentTemplate",e)},i.prototype.updateHeaderBlazorTemplate=function(e,i){this.headerTemplate&&t.isBlazor()&&!this.isStringTemplate&&t.updateBlazorTemplate(this.element.id+"_headerTemplate","HeaderTemplate",this,!1),e&&e.header&&t.isBlazor()&&!this.isStringTemplate&&0===e.header.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+i+"_header","HeaderTemplate",e)},i.prototype.focusIn=function(e){e.target.parentElement.classList.add("e-item-focus")},i.prototype.focusOut=function(e){e.target.parentElement.classList.remove("e-item-focus")},i.prototype.ctrlTemplate=function(){this.ctrlTem=this.element.cloneNode(!0);var e,i=t.select("."+Je,this.element);e=i?i.children:this.element.children;var s=[];[].slice.call(e).forEach(function(e){s.push({header:e.childElementCount>0&&e.children[0]?e.children[0]:"",content:e.childElementCount>1&&e.children[1]?e.children[1]:""}),e.parentNode.removeChild(e)}),i&&this.element.removeChild(i),this.setProperties({items:s},!0)},i.prototype.toggleIconGenerate=function(){var e=this.createElement("div",{className:We}),t=this.createElement("span",{className:"e-tgl-collapse-icon e-icons"});return e.appendChild(t),e},i.prototype.initItemExpand=function(){var e=this.initExpand.length;if(0!==e)if("Single"===this.expandMode)this.expandItem(!0,this.initExpand[e-1]);else for(var t=0;t<e;t++)this.expandItem(!0,this.initExpand[t])},i.prototype.renderItems=function(){var e,i,s=this,n=this.element;if(t.isNullOrUndefined(this.initExpand)&&(this.initExpand=[]),t.isNullOrUndefined(this.trgtEle)||this.ctrlTemplate(),this.dataSource.length>0)this.dataSource.forEach(function(e,l){i=s.renderInnerItem(e,l),n.appendChild(i),i.childElementCount>0&&(t.EventHandler.add(i.querySelector("."+Fe),"focus",s.focusIn,s),t.EventHandler.add(i.querySelector("."+Fe),"blur",s.focusOut,s))}),this.updateHeaderBlazorTemplate();else{var l=this.items;n&&l.length>0&&l.forEach(function(i,l){e=s.renderInnerItem(i,l),n.appendChild(e),s.updateHeaderBlazorTemplate(i,l),e.childElementCount>0&&(t.EventHandler.add(e.querySelector("."+Fe),"focus",s.focusIn,s),t.EventHandler.add(e.querySelector("."+Fe),"blur",s.focusOut,s))})}},i.prototype.clickHandler=function(e){var i,s,n=this,l=e.target,o=this.getItems(),r={};if(t.closest(l,"."+Re)===this.element){l.classList.add("e-target");var a=t.closest(l,"."+je),d=t.closest(l,"."+Fe),h=t.closest(l,"."+Ve);a&&(t.isNullOrUndefined(d)||t.isNullOrUndefined(h))&&(d=a.children[0],h=a.children[1]),d&&(s=t.select("."+We,d));var c;d?c=t.closest(d,"."+je):h&&(c=t.closest(h,"."+je));var p=[];i=this.getIndexByItem(a),c&&(r.item=o[this.getIndexByItem(c)]),r.originalEvent=e;!(!t.isNullOrUndefined(s)&&a.childElementCount<=1)||!t.isNullOrUndefined(h)&&t.isNullOrUndefined(t.select("."+Fe+" ."+We,c))||(a.appendChild(this.contentRendering(i)),this.updateContentBlazorTemplate(r.item,i),this.ariaAttrUpdate(a)),this.trigger("clicked",r);var u=h&&!t.isNullOrUndefined(t.select(".e-target",h)),f=h&&!t.isNullOrUndefined(t.select("."+Re,h))&&t.isNullOrUndefined(t.closest(l,".e-acrdn-panel .e-accordion")),m=h&&t.isNullOrUndefined(t.select("."+Re,h))||!(t.closest(l,"."+Re)===this.element);if(u=u&&(f||m),l.classList.remove("e-target"),!(l.classList.contains(Ve)||l.classList.contains(ze)||u)){var g=this.element.querySelector("."+Je),v=g?g.children:this.element.children;[].slice.call(v).forEach(function(e){e.classList.contains(Ye)&&p.push(e)});var y=[].slice.call(this.element.querySelectorAll("."+je+" [e-animate]"));if(y.length>0)for(var b=0,C=y;b<C.length;b++){var N=C[b];p.push(N.parentElement)}var E=-1!==p.indexOf(c)&&"true"===h.getAttribute("e-animate"),x=!1;if(!t.isNullOrUndefined(a)&&!t.isNullOrUndefined(d)){var O=t.select("."+Ve,a),k=t.closest(a,"."+Be).querySelector("."+Qe);if(t.isNullOrUndefined(O))return;x=k===a,!t.isVisible(O)||E&&!c.classList.contains(Ke)?(p.length>0&&"Single"===this.expandMode&&!E&&p.forEach(function(e){n.collapse(t.select("."+Ve,e)),e.classList.remove(Qe)}),this.expand(O)):this.collapse(O),t.isNullOrUndefined(k)||x||k.classList.remove(Qe)}}}},i.prototype.eleMoveFocus=function(e,i,s){var n,l=t.closest(s,"."+je);s===i?n=("moveUp"===e?s.lastElementChild:s).querySelector("."+Fe):s.classList.contains(Fe)&&(l="moveUp"===e?l.previousElementSibling:l.nextElementSibling)&&(n=t.select("."+Fe,l)),n&&n.focus()},i.prototype.keyActionHandler=function(e){var i=e.target,s=t.closest(e.target,Fe);if(!t.isNullOrUndefined(s)||i.classList.contains(Re)||i.classList.contains(Fe)){var n,l=this.element;switch(e.action){case"moveUp":case"moveDown":this.eleMoveFocus(e.action,l,i);break;case"space":case"enter":n=i.nextElementSibling,!t.isNullOrUndefined(n)&&n.classList.contains(Ve)?"true"!==n.getAttribute("e-animate")&&i.click():i.click();break;case"home":case"end":("home"===e.action?l.firstElementChild.children[0]:l.lastElementChild.children[0]).focus()}}},i.prototype.headerEleGenerate=function(){var e=this.createElement("div",{className:Fe,id:t.getUniqueID("acrdn_header")}),i={tabindex:"0",role:"heading","aria-selected":"false","aria-disabled":"false","aria-level":this.getItems().length.toString()};return t.attributes(e,i),e},i.prototype.renderInnerItem=function(e,i){var s;if(s=this.createElement("div",{className:je}),s.id=t.getUniqueID("acrdn_item"),t.attributes(s,{"aria-expanded":"false"}),this.headerTemplate){var n=this.headerEleGenerate(),l=this.createElement("div",{className:qe});return n.appendChild(l),t.append(this.getheaderTemplate()(e,this,"headerTemplate",this.element.id+"_headerTemplate",!1),l),s.appendChild(n),n.appendChild(this.toggleIconGenerate()),this.add(s,"e-select"),s}if(e.header&&this.angularnativeCondiCheck(e,"header")){n=this.headerEleGenerate(),l=this.createElement("div",{className:qe});n.appendChild(l),n.appendChild(this.fetchElement(l,e.header,i,!0)),s.appendChild(n)}var o=t.select("."+Fe,s);if(!e.expanded||t.isNullOrUndefined(i)||this.enablePersistence||-1===this.initExpand.indexOf(i)&&this.initExpand.push(i),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.addClass([s],e)})}if(e.iconCss){var r=this.createElement("div",{className:"e-acrdn-header-icon"}),a=this.createElement("span",{className:e.iconCss+" e-icons"});r.appendChild(a),t.isNullOrUndefined(o)?((o=this.headerEleGenerate()).appendChild(r),s.appendChild(o)):o.insertBefore(r,o.childNodes[0])}if(e.content&&this.angularnativeCondiCheck(e,"content")){var d=this.toggleIconGenerate();t.isNullOrUndefined(o)&&(o=this.headerEleGenerate(),s.appendChild(o)),o.appendChild(d),this.add(s,"e-select")}return s},i.prototype.angularnativeCondiCheck=function(e,i){var s="content"===i?e.content:e.header;if(this.isAngular&&!t.isNullOrUndefined(s.elementRef)){var n=s.elementRef.nativeElement.data;if(t.isNullOrUndefined(n)||""===n||-1===n.indexOf("bindings="))return!0;var l=JSON.parse(s.elementRef.nativeElement.data.replace("bindings=",""));return!(!t.isNullOrUndefined(l)&&"false"===l["ng-reflect-ng-if"])}return!0},i.prototype.fetchElement=function(e,i,s,n){var l,o;try{if(document.querySelectorAll(i).length){var r=document.querySelector(i);o=r.outerHTML.trim(),e.appendChild(r),r.style.display=""}}catch(s){"string"==typeof i&&t.isBlazor()&&0!==i.indexOf("<div>Blazor")?e.innerHTML=i:!t.isNullOrUndefined(this.trgtEle)&&i instanceof HTMLElement?(e.appendChild(i),e.firstElementChild.style.display=""):l=t.compile(i)}var a;if(!t.isNullOrUndefined(l)){var d=void 0;e.classList.contains(qe)?d=this.element.id+s+"_header":e.classList.contains(ze)&&(d=this.element.id+s+"_content"),a=l({},null,null,d,this.isStringTemplate)}return t.isNullOrUndefined(a)||!(a.length>0)||t.isNullOrUndefined(a[0].tagName)&&1===a.length?0===e.childElementCount&&(e.innerHTML=i):[].slice.call(a).forEach(function(i){t.isNullOrUndefined(i.tagName)||(i.style.display=""),e.appendChild(i)}),t.isNullOrUndefined(o)||-1===this.templateEle.indexOf(i)&&this.templateEle.push(i),e},i.prototype.ariaAttrUpdate=function(e){var i=t.select("."+Fe,e),s=t.select("."+Ve,e);i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id),s.setAttribute("role","definition")},i.prototype.contentRendering=function(e){var i=this.createElement("div",{className:Ve+" "+_e,id:t.getUniqueID("acrdn_panel")});t.attributes(i,{"aria-hidden":"true"});var s=this.createElement("div",{className:ze});return this.dataSource.length>0?(t.append(this.getItemTemplate()(this.dataSource[e],this,"itemTemplate",this.element.id+"_itemTemplate",!1),s),i.appendChild(s)):i.appendChild(this.fetchElement(s,this.items[e].content,e,!1)),i},i.prototype.expand=function(e){var i,s=this,n=this.getItems(),l=t.closest(e,"."+je);if(!(t.isNullOrUndefined(e)||t.isVisible(e)&&"true"!==e.getAttribute("e-animate")||l.classList.contains(Ge))){var o=t.closest(l,"."+Be).querySelector("."+Qe),r={name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing},a=t.select("."+We,l).firstElementChild;i={element:l,item:n[this.getIndexByItem(l)],index:this.getIndexByItem(l),content:l.querySelector("."+Ve),isExpanded:!0};var d=r.name;this.trigger("expanding",i,function(i){i.cancel||(a.classList.add(Xe),s.expandedItemsPush(l),t.isNullOrUndefined(o)||o.classList.remove(Qe),l.classList.add(Qe),"None"===r.name?(s.expandProgress("begin",a,e,l,i),s.expandProgress("end",a,e,l,i)):s.expandAnimation(d,a,e,l,r,i))})}},i.prototype.expandAnimation=function(e,i,s,n,l,o){var r,a=this;this.lastActiveItemId=n.id,"SlideDown"===e?(l.begin=function(){a.expandProgress("begin",i,s,n,o),s.style.position="absolute",r=n.offsetHeight,s.offsetHeight,s.style.maxHeight=s.offsetHeight+"px",n.style.maxHeight=""},l.progress=function(){n.style.minHeight=r+s.offsetHeight+"px"},l.end=function(){t.setStyleAttribute(s,{position:"",maxHeight:""}),n.style.minHeight="",a.expandProgress("end",i,s,n,o)}):(l.begin=function(){a.expandProgress("begin",i,s,n,o)},l.end=function(){a.expandProgress("end",i,s,n,o)}),new t.Animation(l).animate(s)},i.prototype.expandProgress=function(e,i,s,n,l){this.remove(s,_e),this.add(n,Ke),this.add(i,"e-expand-icon"),"end"===e&&(this.add(n,Ye),s.setAttribute("aria-hidden","false"),t.attributes(n,{"aria-expanded":"true"}),t.attributes(s.previousElementSibling,{"aria-selected":"true"}),i.classList.remove(Xe),this.trigger("expanded",l))},i.prototype.expandedItemsPush=function(e){var t=this.getIndexByItem(e);-1===this.expandedItems.indexOf(t)&&this.expandedItems.push(t)},i.prototype.getIndexByItem=function(e){var t=this.getItemElements();return[].slice.call(t).indexOf(e)},i.prototype.getItemElements=function(){var e=[],t=this.element.children;return[].slice.call(t).forEach(function(t){t.classList.contains(je)&&e.push(t)}),e},i.prototype.expandedItemsPop=function(e){var t=this.getIndexByItem(e);this.expandedItems.splice(this.expandedItems.indexOf(t),1)},i.prototype.collapse=function(e){var i,s=this,n=this.getItems(),l=t.closest(e,"."+je);if(!t.isNullOrUndefined(e)&&t.isVisible(e)&&!l.classList.contains(Ge)){var o={name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing},r=t.select("."+We,l).firstElementChild;i={element:l,item:n[this.getIndexByItem(l)],index:this.getIndexByItem(l),content:l.querySelector("."+Ve),isExpanded:!1};var a=o.name;this.trigger("expanding",i,function(t){t.cancel||(s.expandedItemsPop(l),l.classList.add(Qe),r.classList.add(Xe),"None"===o.name?(s.collapseProgress("begin",r,e,l,t),s.collapseProgress("end",r,e,l,t)):s.collapseAnimation(a,e,l,r,o,t))})}},i.prototype.collapseAnimation=function(e,i,s,n,l,o){var r,a,d,h,c=this;this.lastActiveItemId=s.id,"SlideUp"===e?(l.begin=function(){d=s.offsetHeight,s.style.minHeight=d+"px",i.style.position="absolute",r=s.offsetHeight,a=i.offsetHeight,i.style.maxHeight=a+"px",c.collapseProgress("begin",n,i,s,o)},l.progress=function(){(h=r-(a-i.offsetHeight))<d&&(s.style.minHeight=h+"px")},l.end=function(){i.style.display="none",c.collapseProgress("end",n,i,s,o),s.style.minHeight="",t.setStyleAttribute(i,{position:"",maxHeight:"",display:""})}):(l.begin=function(){c.collapseProgress("begin",n,i,s,o)},l.end=function(){c.collapseProgress("end",n,i,s,o)}),new t.Animation(l).animate(i)},i.prototype.collapseProgress=function(e,i,s,n,l){this.remove(i,"e-expand-icon"),this.remove(n,Ke),"end"===e&&(this.add(s,_e),i.classList.remove(Xe),this.remove(n,Ye),s.setAttribute("aria-hidden","true"),t.attributes(n,{"aria-expanded":"false"}),t.attributes(s.previousElementSibling,{"aria-selected":"false"}),this.trigger("expanded",l))},i.prototype.getModuleName=function(){return"accordion"},i.prototype.itemAttribUpdate=function(){var e=this.getItems(),i=this.getItemElements(),s=e.length;i.forEach(function(e){t.select("."+Fe,e).setAttribute("aria-level",""+s)})},i.prototype.getItems=function(){return this.itemTemplate&&this.headerTemplate?this.dataSource:this.items},i.prototype.addItem=function(e,i){var s=this.element,n=this.getItemElements(),l=this.getItems();if(t.isNullOrUndefined(i)&&(i=l.length),s.childElementCount>=i){l.splice(i,0,e);var o=this.renderInnerItem(e,i);s.childElementCount===i?s.appendChild(o):s.insertBefore(o,n[i]),this.updateHeaderBlazorTemplate(),t.EventHandler.add(o.querySelector("."+Fe),"focus",this.focusIn,this),t.EventHandler.add(o.querySelector("."+Fe),"blur",this.focusOut,this),this.itemAttribUpdate()}this.expandedItems=[],this.expandedItemRefresh(s),e&&e.expanded&&this.expandItem(!0,i)},i.prototype.expandedItemRefresh=function(e){var t=this,i=this.getItemElements();[].slice.call(i).forEach(function(e){e.classList.contains(Ke)&&t.expandedItemsPush(e)})},i.prototype.removeItem=function(e){var i=this.getItemElements()[e],s=this.getItems();t.isNullOrUndefined(i)||(this.restoreContent(e),t.detach(i),s.splice(e,1),this.itemAttribUpdate(),this.expandedItems=[],this.expandedItemRefresh(this.element))},i.prototype.select=function(e){var i=this.getItemElements()[e];t.isNullOrUndefined(i)||t.isNullOrUndefined(t.select("."+Fe,i))||i.children[0].focus()},i.prototype.hideItem=function(e,i){var s=this.getItemElements()[e];t.isNullOrUndefined(s)||(t.isNullOrUndefined(i)&&(i=!0),i?this.add(s,"e-hide"):this.remove(s,"e-hide"))},i.prototype.enableItem=function(e,i){var s=this.getItemElements()[e];if(!t.isNullOrUndefined(s)){var n=s.firstElementChild;i?(this.remove(s,Ge),t.attributes(n,{tabindex:"0","aria-disabled":"false"}),n.focus()):(s.classList.contains(Ye)&&(this.expandItem(!1,e),this.eleMoveFocus("movedown",this.element,n)),this.add(s,Ge),n.setAttribute("aria-disabled","true"),n.removeAttribute("tabindex"))}},i.prototype.expandItem=function(e,i){var s=this,n=(this.element,this.getItemElements());if(t.isNullOrUndefined(i))if("Single"===this.expandMode&&e){var l=n[n.length-1];this.itemExpand(e,l,this.getIndexByItem(l))}else{var o=t.select("#"+this.lastActiveItemId,this.element);[].slice.call(n).forEach(function(t){s.itemExpand(e,t,s.getIndexByItem(t)),t.classList.remove(Qe)});var r=t.select("."+Qe,this.element);r&&r.classList.remove(Qe),o&&o.classList.add(Qe)}else{l=n[i];if(t.isNullOrUndefined(l)||!l.classList.contains("e-select")||l.classList.contains(Ye)&&e)return;"Single"===this.expandMode&&this.expandItem(!1),this.itemExpand(e,l,i)}},i.prototype.itemExpand=function(e,i,s){var n=i.children[1],l=this.getItems();if(!i.classList.contains(Ge)){if(t.isNullOrUndefined(n)&&e)n=this.contentRendering(s),i.appendChild(n),this.updateContentBlazorTemplate(l[s],s),this.ariaAttrUpdate(i);else if(t.isNullOrUndefined(n))return;e?this.expand(n):this.collapse(n)}},i.prototype.destroyItems=function(){this.restoreContent(null),[].slice.call(this.element.querySelectorAll("."+je)).forEach(function(e){t.detach(e)})},i.prototype.restoreContent=function(e){var i;i=t.isNullOrUndefined(e)?this.element:this.element.querySelectorAll("."+je)[e],this.templateEle.forEach(function(e){t.isNullOrUndefined(i.querySelector(e))||(document.body.appendChild(i.querySelector(e)).style.display="none")})},i.prototype.updateItem=function(e,i){if(!t.isNullOrUndefined(e)){var s=this.getItems(),n=s[i];s.splice(i,1),this.restoreContent(i),t.detach(e),this.addItem(n,i)}},i.prototype.getPersistData=function(){return this.addOnPersist(["expandedItems"])},i.prototype.onPropertyChanged=function(e,i){for(var s=this.element,n=!1,l=0,o=Object.keys(e);l<o.length;l++){switch(o[l]){case"items":if(e.items instanceof Array&&i.items instanceof Array)n=!0;else for(var r=Object.keys(e.items),a=0;a<r.length;a++){var d=parseInt(Object.keys(e.items)[a],10),h=Object.keys(e.items[d])[0],c=t.selectAll("."+je,this.element)[d],p=Object(i.items[d])[h],u=Object(e.items[d])[h];("header"===h||"iconCss"===h||"expanded"===h||"content"===h&&""===p)&&this.updateItem(c,d),"cssClass"!==h||t.isNullOrUndefined(c)||(c.classList.remove(p),c.classList.add(u)),"content"!==h||t.isNullOrUndefined(c)||2!==c.children.length||(c.classList.contains(Ke)&&this.expandItem(!1,d),t.detach(c.querySelector("."+Ve)))}break;case"dataSource":n=!0;break;case"headerTemplate":this.initializeheaderTemplate(),n=!0;break;case"itemTemplate":this.initializeItemTemplate(),n=!0;break;case"enableRtl":e.enableRtl?this.add(s,"e-rtl"):this.remove(s,"e-rtl");break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)});break;case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"expandMode":"Single"===e.expandMode?(this.element.setAttribute("aria-multiselectable","false"),this.expandedItems.length>1&&this.expandItem(!1)):this.element.setAttribute("aria-multiselectable","true")}}n&&(this.destroyItems(),this.renderItems(),this.initItemExpand())},Ue([t.Collection([],et)],i.prototype,"items",void 0),Ue([t.Property([])],i.prototype,"dataSource",void 0),Ue([t.Property()],i.prototype,"itemTemplate",void 0),Ue([t.Property()],i.prototype,"headerTemplate",void 0),Ue([t.Property("100%")],i.prototype,"width",void 0),Ue([t.Property("auto")],i.prototype,"height",void 0),Ue([t.Property("Multiple")],i.prototype,"expandMode",void 0),Ue([t.Complex({},$e)],i.prototype,"animation",void 0),Ue([t.Event()],i.prototype,"clicked",void 0),Ue([t.Event()],i.prototype,"expanding",void 0),Ue([t.Event()],i.prototype,"expanded",void 0),Ue([t.Event()],i.prototype,"created",void 0),Ue([t.Event()],i.prototype,"destroyed",void 0),i=Ue([t.NotifyPropertyChanges],i)}(t.Component),it=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),st=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},nt=function(e){function i(t,i){return e.call(this,t,i)||this}return it(i,e),i.prototype.preRender=function(){this.isMenu=!1,this.element.id=this.element.id||t.getUniqueID("ej2-contextmenu"),e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menu",tabindex:"0"}),this.element.style.zIndex=s.getZindexPartial(this.element).toString()},i.prototype.open=function(t,i,s){e.prototype.openMenu.call(this,null,null,t,i,null,s)},i.prototype.close=function(){e.prototype.closeMenu.call(this)},i.prototype.onPropertyChanged=function(t,i){e.prototype.onPropertyChanged.call(this,t,i);for(var s=0,n=Object.keys(t);s<n.length;s++){switch(n[s]){case"filter":this.close(),this.filter=t.filter;break;case"target":this.unWireEvents(i.target),this.wireEvents()}}},i.prototype.getModuleName=function(){return"contextmenu"},st([t.Property("")],i.prototype,"target",void 0),st([t.Property("")],i.prototype,"filter",void 0),st([t.Collection([],ee)],i.prototype,"items",void 0),i=st([t.NotifyPropertyChanges],i)}(ie),lt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ot=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},rt="e-vertical",at="e-hamburger",dt=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.tempItems=[],s}return lt(i,e),i.prototype.getModuleName=function(){return"menu"},i.prototype.preRender=function(){if(this.isMenu=!0,this.element.id=this.element.id||t.getUniqueID("ej2-menu"),this.template)try{document.querySelectorAll(this.template).length&&(this.template=document.querySelector(this.template).innerHTML.trim(),this.clearChanges())}catch(e){}else this.updateMenuItems(this.items);e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),t.attributes(this.element,{role:"menubar",tabindex:"0"}),"Vertical"===this.orientation?(this.element.classList.add(rt),this.hamburgerMode&&!this.target&&this.element.previousElementSibling.classList.add(rt),this.element.setAttribute("aria-orientation","vertical")):t.Browser.isDevice&&!this.enableScrolling&&this.element.parentElement.classList.add("e-scrollable"),this.hamburgerMode&&(this.element.parentElement.classList.add(at),"Horizontal"===this.orientation&&this.element.classList.add("e-hide-menu"))},i.prototype.updateMenuItems=function(e){this.tempItems=e,this.items=[],this.tempItems.map(this.createMenuItems,this),this.setProperties({items:this.items},!0),this.tempItems=[]},i.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++){switch(n[s]){case"orientation":"Vertical"===t.orientation?(this.element.classList.add(rt),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.add(rt),this.element.classList.remove("e-hide-menu")),this.element.setAttribute("aria-orientation","vertical")):(this.element.classList.remove(rt),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.remove(rt),this.element.classList.add("e-hide-menu")),this.element.removeAttribute("aria-orientation"));break;case"items":Object.keys(i.items).length||this.updateMenuItems(t.items);break;case"hamburgerMode":this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),t.hamburgerMode?this.element.parentElement.classList.add(at):this.element.parentElement.classList.remove(at),"Vertical"===this.orientation?(this.target||this.element.previousElementSibling.classList.add(rt),this.element.classList.remove("e-hide-menu")):(this.target?this.element.previousElementSibling.classList.add(rt):this.element.previousElementSibling.classList.remove(rt),this.element.classList[t.hamburgerMode?"add":"remove"]("e-hide-menu"));break;case"title":this.hamburgerMode&&this.element.previousElementSibling&&(this.element.previousElementSibling.querySelector(".e-menu-title").innerHTML=t.title);break;case"target":this.hamburgerMode&&(this.unWireEvents(i.target),this.wireEvents(),"Horizontal"===this.orientation&&(t.target?this.element.previousElementSibling.classList.add(rt):(this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),this.element.previousElementSibling.classList.remove(rt)),this.element.classList.add("e-hide-menu")))}}e.prototype.onPropertyChanged.call(this,t,i)},i.prototype.createMenuItems=function(e){var t,i,s,n=this.items;if(t=this.getField("parentId"),e[t]){for(i=this.getIndex(e[t].toString(),!0),s=0;s<i.length;s++)n[i[s]].items||(n[i[s]].items=[]),n=n[i[s]].items;n.push(e)}else this.items.push(e)},i.prototype.open=function(){e.prototype.openHamburgerMenu.call(this)},i.prototype.close=function(){e.prototype.closeHamburgerMenu.call(this)},ot([t.Property("Horizontal")],i.prototype,"orientation",void 0),ot([t.Property("")],i.prototype,"target",void 0),ot([t.Property(null)],i.prototype,"template",void 0),ot([t.Property(!1)],i.prototype,"enableScrolling",void 0),ot([t.Property(!1)],i.prototype,"hamburgerMode",void 0),ot([t.Property("Menu")],i.prototype,"title",void 0),ot([t.Complex({},J)],i.prototype,"fields",void 0),i=ot([t.NotifyPropertyChanges],i)}(ie),ht=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ct=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},pt="e-tab-header",ut="e-content",ft="e-item",mt="e-active",gt="e-disable",vt="e-hidden",yt="e-close-icon",bt="e-tab-wrap",Ct="e-toolbar-items",Nt="e-toolbar-item",Et="e-toolbar-popup",xt="e-progress",Ot="e-vertical",kt="e-vertical-right",St="e-fill-mode",wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ht(i,e),ct([t.Property("SlideLeftIn")],i.prototype,"effect",void 0),ct([t.Property(600)],i.prototype,"duration",void 0),ct([t.Property("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),Lt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ht(i,e),ct([t.Complex({effect:"SlideLeftIn",duration:600,easing:"ease"},wt)],i.prototype,"previous",void 0),ct([t.Complex({effect:"SlideRightIn",duration:600,easing:"ease"},wt)],i.prototype,"next",void 0),i}(t.ChildProperty),It=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ht(i,e),ct([t.Property("")],i.prototype,"text",void 0),ct([t.Property("")],i.prototype,"iconCss",void 0),ct([t.Property("left")],i.prototype,"iconPosition",void 0),i}(t.ChildProperty),At=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ht(i,e),ct([t.Complex({},It)],i.prototype,"header",void 0),ct([t.Property(null)],i.prototype,"headerTemplate",void 0),ct([t.Property("")],i.prototype,"content",void 0),ct([t.Property("")],i.prototype,"cssClass",void 0),ct([t.Property(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),Dt=function(e){function i(i,s){var n=e.call(this,i,s)||this;return n.show={},n.hide={},n.animateOptions={},n.animObj=new t.Animation(n.animateOptions),n.maxHeight=0,n.title="Close",n.lastIndex=0,n.isAdd=!1,n.isIconAlone=!1,n.resizeContext=n.refreshActElePosition.bind(n),n.keyConfigs={tab:"tab",home:"home",end:"end",enter:"enter",space:"space",delete:"delete",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"},n}return ht(i,e),i.prototype.destroy=function(){var i=this;if(t.isNullOrUndefined(this.tbObj)||this.tbObj.destroy(),this.unWireEvents(),["role","aria-disabled","aria-activedescendant","tabindex","aria-orientation"].forEach(function(e){i.element.removeAttribute(e)}),this.expTemplateContent(),this.isTemplate){var s=t.select(".e-tab > ."+ut,this.element);this.element.classList.remove("e-template"),t.isNullOrUndefined(s)||(s.innerHTML=this.cnt)}else for(;this.element.firstElementChild;)t.remove(this.element.firstElementChild);e.prototype.destroy.call(this),this.trigger("destroyed")},i.prototype.preRender=function(){var e=t.closest(this.element,"."+ut);this.prevIndex=0,this.isNested=!1,this.isPopup=!1,this.initRender=!0,this.isSwipeed=!1,this.itemIndexArray=[],this.templateEle=[],t.isNullOrUndefined(e)||(e.parentElement.classList.add("e-nested"),this.isNested=!0);var i=t.Browser.info.name,s="msie"===i?"e-ie":"edge"===i?"e-edge":"safari"===i?"e-safari":"";t.setStyleAttribute(this.element,{width:t.formatUnit(this.width),height:t.formatUnit(this.height)}),this.setCssClass(this.element,this.cssClass,!0),t.attributes(this.element,{role:"tablist","aria-disabled":"false","aria-activedescendant":""}),this.setCssClass(this.element,s,!0),this.updatePopAnimationConfig()},i.prototype.render=function(){this.btnCls=this.createElement("span",{className:"e-icons "+yt,attrs:{title:this.title}}),this.tabId=this.element.id.length>0?"-"+this.element.id:t.getRandomId(),this.renderContainer(),this.wireEvents(),this.initRender=!1,t.isBlazor()&&this.renderComplete()},i.prototype.renderContainer=function(){var e=this.element;if(this.items.length>0&&0===e.children.length)e.appendChild(this.createElement("div",{className:ut})),this.setOrientation(this.headerPlacement,this.createElement("div",{className:pt})),this.isTemplate=!1;else if(this.element.children.length>0){this.isTemplate=!0,e.classList.add("e-template");var i=e.querySelector("."+pt);i&&"Bottom"===this.headerPlacement&&this.setOrientation(this.headerPlacement,i)}if(!t.isNullOrUndefined(t.select("."+pt,this.element))&&!t.isNullOrUndefined(t.select("."+ut,this.element))){if(this.renderHeader(),this.tbItems=t.select("."+pt+" ."+Ct,this.element),t.isNullOrUndefined(this.tbItems)||t.rippleEffect(this.tbItems,{selector:".e-tab-wrap"}),this.renderContent(),t.selectAll("."+Nt,this.element).length>0){var s=void 0;this.tbItems=t.select("."+pt+" ."+Ct,this.element),this.bdrLine=this.createElement("div",{className:"e-indicator e-hidden e-ignore"}),s=t.select("."+this.scrCntClass,this.tbItems),t.isNullOrUndefined(s)?this.tbItems.insertBefore(this.bdrLine,this.tbItems.firstChild):s.insertBefore(this.bdrLine,s.firstChild),this.setContentHeight(!0),this.select(this.selectedItem)}this.setRTL(this.enableRtl)}},i.prototype.renderHeader=function(){var e=this,i=this.headerPlacement,s=[];if(this.hdrEle=this.getTabHeader(),this.addVerticalClass(),this.isTemplate){this.element.children.length>1&&this.element.children[1].classList.contains(pt)&&this.setProperties({headerPlacement:"Bottom"},!0);for(var n=this.hdrEle.children.length,l=[],o=0;o<n;o++)l.push(this.hdrEle.children.item(o).innerHTML);if(n>0){for(;this.hdrEle.firstElementChild;)t.detach(this.hdrEle.firstElementChild);var r=this.createElement("div",{className:"e-items"});this.hdrEle.appendChild(r),l.forEach(function(i,s){e.lastIndex=s;var n={className:ft,id:ft+e.tabId+"_"+s,attrs:{role:"tab","aria-controls":ut+e.tabId+"_"+s,"aria-selected":"false"}},l=e.createElement("span",{className:"e-tab-text",innerHTML:i,attrs:{role:"presentation"}}).outerHTML,o=e.createElement("div",{className:"e-text-wrap",innerHTML:l+e.btnCls.outerHTML}).outerHTML,a=e.createElement("div",{className:bt,innerHTML:o,attrs:{tabIndex:"-1"}});r.appendChild(e.createElement("div",n)),t.selectAll(".e-item",r)[s].appendChild(a)})}}else s=this.parseObject(this.items,0);this.tbObj=new Me({width:"Left"===i||"Right"===i?"auto":"100%",height:"Left"===i||"Right"===i?"100%":"auto",overflowMode:this.overflowMode,items:0!==s.length?s:[],clicked:this.clickHandler.bind(this),scrollStep:this.scrollStep}),this.tbObj.isStringTemplate=!0,this.tbObj.createElement=this.createElement,this.tbObj.appendTo(this.hdrEle),t.attributes(this.hdrEle,{"aria-label":"tab-header"});for(o=0;o<this.items.length;o++){var a=this.items[o];a.headerTemplate&&t.isBlazor()&&!this.isStringTemplate&&0===a.headerTemplate.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+o+"_headerTemplate","HeaderTemplate",a)}this.updateOrientationAttribute(),this.setCloseButton(this.showCloseButton)},i.prototype.renderContent=function(){this.cntEle=t.select("."+ut,this.element);var e=t.selectAll("."+Nt,this.element);if(this.isTemplate){this.cnt=this.cntEle.children.length>0?this.cntEle.innerHTML:"";for(var i=this.cntEle.children,s=0;s<e.length;s++)i.length-1>=s&&(i.item(s).className+=ft,t.attributes(i.item(s),{role:"tabpanel","aria-labelledby":ft+this.tabId+"_"+s}),i.item(s).id=ut+this.tabId+"_"+s)}},i.prototype.reRenderItems=function(){this.renderContainer(),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)}))},i.prototype.parseObject=function(e,i){var s,n=this,l=t.selectAll("."+Nt,this.element).length,o=[],r=[];return e.forEach(function(e,a){var d=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconPosition)?"":e.header.iconPosition,h=t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.iconCss)?"":e.header.iconCss;if(t.isNullOrUndefined(e.headerTemplate)&&(t.isNullOrUndefined(e.header)||t.isNullOrUndefined(e.header.text)||0===e.header.text.length&&""===h))r.push(a);else{var c=e.headerTemplate||e.header.text;n.lastIndex=0===l?a:n.isReplace?i+a:n.lastIndex+1;var p=e.disabled?" e-disable e-overlay":"";s=n.createElement("div",{className:"e-tab-text",attrs:{role:"presentation"}});var u=c instanceof Object?c.outerHTML:c,f=!t.isNullOrUndefined(u)&&""!==u;t.isNullOrUndefined(c.tagName)?n.headerTextCompile(s,c,a):s.appendChild(c);var m=n.createElement("span",{className:"e-icons e-tab-icon e-icon-"+d+" "+h}),g=n.createElement("div",{className:"e-text-wrap"});g.appendChild(s),""!==c&&void 0!==c&&""!==h?("left"===d||"top"===d?g.insertBefore(m,g.firstElementChild):g.appendChild(m),s,n.isIconAlone=!1):(""===h?s:m)===m&&(t.detach(s),g.appendChild(m),n.isIconAlone=!0);var v=e.disabled?{}:{tabIndex:"-1"};g.appendChild(n.btnCls.cloneNode(!0));var y=n.createElement("div",{className:bt,attrs:v});y.appendChild(g),n.itemIndexArray===[]?n.itemIndexArray.push(ft+n.tabId+"_"+n.lastIndex):n.itemIndexArray.splice(i+a,0,ft+n.tabId+"_"+n.lastIndex);var b={htmlAttributes:{id:ft+n.tabId+"_"+n.lastIndex,role:"tab","aria-selected":"false"},template:y};b.cssClass=e.cssClass+" "+p+" "+(""!==h?"e-i"+d:"")+" "+(f?"":"e-icon"),"top"!==d&&"bottom"!==d||n.element.classList.add("e-vertical-icon"),o.push(b),a++}}),this.isAdd||r.forEach(function(e){n.items.splice(e,1)}),this.isIconAlone?this.element.classList.add("e-icon-tab"):this.element.classList.remove("e-icon-tab"),o},i.prototype.removeActiveClass=function(){var e=this.getTabHeader();if(e){var i=t.selectAll("."+Nt+"."+mt,e);[].slice.call(i).forEach(function(e){return e.classList.remove(mt)})}},i.prototype.checkPopupOverflow=function(e){this.tbPop=t.select(".e-toolbar-pop",this.element);var i=t.select(".e-hor-nav",this.element),s=t.select("."+Ct,this.element),n=s.lastChild,l=!1;return!this.isVertical()&&(this.enableRtl&&i.offsetLeft+i.offsetWidth>s.offsetLeft||!this.enableRtl&&i.offsetLeft<s.offsetWidth)?l=!0:this.isVertical()&&i.offsetTop<n.offsetTop+n.offsetHeight&&(l=!0),l&&(e.classList.add(Et),this.tbPop.insertBefore(e.cloneNode(!0),t.selectAll("."+Et,this.tbPop)[0]),e.outerHTML=""),!0},i.prototype.popupHandler=function(e){var i=e.querySelector(".e-ripple-element");t.isNullOrUndefined(i)||(i.outerHTML="",e.querySelector("."+bt).classList.remove("e-ripple")),this.tbItem=t.selectAll("."+Ct+" ."+Nt,this.hdrEle);var s=this.tbItem[this.tbItem.length-1];if(0!==this.tbItem.length){if(e.classList.remove(Et),e.removeAttribute("style"),this.tbItems.appendChild(e.cloneNode(!0)),this.actEleId=e.id,e.outerHTML="",this.checkPopupOverflow(s)){var n=this.tbItems.lastChild.previousElementSibling;this.checkPopupOverflow(n)}this.isPopup=!0}return t.selectAll("."+Nt,this.tbItems).length-1},i.prototype.updateOrientationAttribute=function(){t.attributes(this.element,{"aria-orientation":this.isVertical()?"vertical":"horizontal"})},i.prototype.setCloseButton=function(e){var i=t.select("."+pt,this.element);!0===e?i.classList.add("e-close-show"):i.classList.remove("e-close-show"),this.tbObj.refreshOverflow(),this.refreshActElePosition()},i.prototype.prevCtnAnimation=function(e,t){this.enableRtl||this.element.classList.contains("e-rtl");return this.isPopup||e<=t?"SlideLeftIn"===this.animation.previous.effect?{name:"SlideLeftOut",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}:null:"SlideRightIn"===this.animation.next.effect?{name:"SlideRightOut",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}:null},i.prototype.triggerPrevAnimation=function(e,i){var s=this,n=this.prevCtnAnimation(i,this.selectedItem);t.isNullOrUndefined(n)?e.classList.remove(mt):(n.begin=function(){t.setStyleAttribute(e,{position:"absolute"}),e.classList.add(xt),e.classList.add("e-view")},n.end=function(){e.style.display="none",e.classList.remove(mt),e.classList.remove(xt),e.classList.remove("e-view"),t.setStyleAttribute(e,{display:"",position:""}),0!==e.childNodes.length||s.isTemplate||t.detach(e)},new t.Animation(n).animate(e))},i.prototype.triggerAnimation=function(e,i){var s,n=this,l=this.prevIndex;[].slice.call(this.element.querySelector("."+ut).children).forEach(function(e){e.id===n.prevActiveEle&&(s=e)});var o=this.tbItem[l],r=this.extIndex(this.tbItem[this.selectedItem].id),a=this.getTrgContent(this.cntEle,r);if(t.isNullOrUndefined(s)&&!t.isNullOrUndefined(o)){var d=this.extIndex(o.id);s=this.getTrgContent(this.cntEle,d)}if(this.prevActiveEle=a.id,this.initRender||!1===i||this.animation==={}||t.isNullOrUndefined(this.animation))s&&s!==a&&s.classList.remove(mt);else{var h,c=t.select("."+ut,this.element);if(this.prevIndex>this.selectedItem&&!this.isPopup){var p=this.animation.previous.effect;h={name:"None"===p?"":"SlideLeftIn"!==p?p:"SlideLeftIn",duration:this.animation.previous.duration,timingFunction:this.animation.previous.easing}}else if(this.isPopup||this.prevIndex<this.selectedItem||this.prevIndex===this.selectedItem){var u=this.animation.next.effect;h={name:"None"===u?"":"SlideRightIn"!==u?u:"SlideRightIn",duration:this.animation.next.duration,timingFunction:this.animation.next.easing}}h.progress=function(){c.classList.add(xt),n.setActiveBorder()},h.end=function(){c.classList.remove(xt),a.classList.add(mt)},this.initRender||t.isNullOrUndefined(s)||this.triggerPrevAnimation(s,l),this.isPopup=!1,""===h.name?a.classList.add(mt):new t.Animation(h).animate(a)}},i.prototype.keyPressed=function(e){var i=t.closest(e,"."+pt+" ."+Nt),s=this.getEleIndex(i);!t.isNullOrUndefined(this.popEle)&&e.classList.contains("e-hor-nav")?this.popEle.classList.contains("e-popup-open")?this.popObj.hide(this.hide):this.popObj.show(this.show):e.classList.contains("e-scroll-nav")?e.click():t.isNullOrUndefined(i)||!1!==i.classList.contains(mt)||(this.select(s),t.isNullOrUndefined(this.popEle)||this.popObj.hide(this.hide))},i.prototype.getTabHeader=function(){var e=[].slice.call(this.element.children).filter(function(e){return e.classList.contains(pt)});if(e.length>0)return e[0];var t=[].slice.call(this.element.children).filter(function(e){return!e.classList.contains("blazor-template")})[0];if(t)return[].slice.call(t.children).filter(function(e){return e.classList.contains(pt)})[0]},i.prototype.getEleIndex=function(e){return Array.prototype.indexOf.call(t.selectAll("."+Nt,this.getTabHeader()),e)},i.prototype.extIndex=function(e){return e.replace(ft+this.tabId+"_","")},i.prototype.expTemplateContent=function(){var e=this;this.templateEle.forEach(function(i){t.isNullOrUndefined(e.element.querySelector(i))||(document.body.appendChild(e.element.querySelector(i)).style.display="none")})},i.prototype.templateCompile=function(e,i,s){var n=this.createElement("div");if(this.compileElement(n,i,"content",s),0!==n.childNodes.length){e.appendChild(n);var l=this.items[s];t.isNullOrUndefined(l)||l.content&&t.isBlazor()&&!this.isStringTemplate&&0===l.content.indexOf("<div>Blazor")&&t.updateBlazorTemplate(this.element.id+s+"_content","ContentTemplate",l)}},i.prototype.compileElement=function(e,i,s,n){var l;"string"==typeof i&&t.isBlazor()&&0!==i.indexOf("<div>Blazor")?(i=i.trim(),e.innerHTML=i):l=t.compile(i);var o;t.isNullOrUndefined(l)||(o=t.isBlazor()&&!this.isStringTemplate&&0===i.indexOf("<div>Blazor")?l({},this,s,this.element.id+n+"_"+s,this.isStringTemplate):l({},this,s)),!t.isNullOrUndefined(l)&&o.length>0&&[].slice.call(o).forEach(function(t){e.appendChild(t)})},i.prototype.headerTextCompile=function(e,t,i){this.compileElement(e,t,"headerTemplate",i)},i.prototype.getContent=function(e,i,s,n){var l;if("string"==typeof i||t.isNullOrUndefined(i.innerHTML))if("."===i[0]||"#"===i[0])if(document.querySelectorAll(i).length){var o=document.querySelector(i);l=o.outerHTML.trim(),"clone"===s?e.appendChild(o.cloneNode(!0)):(e.appendChild(o),o.style.display="")}else this.templateCompile(e,i,n);else this.templateCompile(e,i,n);else e.appendChild(i);t.isNullOrUndefined(l)||-1===this.templateEle.indexOf(i.toString())&&this.templateEle.push(i.toString())},i.prototype.getTrgContent=function(e,i){return this.element.classList.contains("e-nested")?t.select(".e-nested> .e-content > #"+ut+this.tabId+"_"+i,this.element):this.findEle(e.children,ut+this.tabId+"_"+i)},i.prototype.findEle=function(e,t){for(var i,s=0;s<e.length;s++)if(e[s].id===t){i=e[s];break}return i},i.prototype.isVertical=function(){var e="Left"===this.headerPlacement||"Right"===this.headerPlacement;return this.scrCntClass=e?"e-vscroll-content":"e-hscroll-content",e},i.prototype.addVerticalClass=function(){if(this.isVertical()){var e="Left"===this.headerPlacement?"e-vertical-left":kt;t.addClass([this.hdrEle],[Ot,e]),this.element.classList.add("e-vertical-tab")}"Bottom"===this.headerPlacement&&this.hdrEle.classList.add("e-horizontal-bottom")},i.prototype.updatePopAnimationConfig=function(){this.show={name:this.isVertical()?"FadeIn":"SlideDown",duration:100},this.hide={name:this.isVertical()?"FadeOut":"SlideUp",duration:100}},i.prototype.changeOrientation=function(e){this.setOrientation(e,this.hdrEle);var i=!!this.hdrEle.classList.contains(Ot);t.removeClass([this.element],["e-vertical-tab"]),t.removeClass([this.hdrEle],[Ot,"e-vertical-left",kt]),i!==this.isVertical()&&(this.tbObj.setProperties({height:this.isVertical()?"100%":"auto",width:this.isVertical()?"auto":"100%"},!0),this.tbObj.changeOrientation(),this.updatePopAnimationConfig()),this.addVerticalClass(),this.updateOrientationAttribute(),this.select(this.selectedItem)},i.prototype.setOrientation=function(e,i){var s=Array.prototype.indexOf.call(this.element.children,i),n=Array.prototype.indexOf.call(this.element.children,this.element.querySelector("."+ut));"Bottom"===e&&n>s?this.element.appendChild(i):this.element.insertBefore(i,t.select("."+ut,this.element))},i.prototype.setCssClass=function(e,t,i){if(""!==t)for(var s=t.split(" "),n=0;n<s.length;n++)i?e.classList.add(s[n]):e.classList.remove(s[n])},i.prototype.setContentHeight=function(e){if(this.element.classList.contains(St)&&t.removeClass([this.element],[St]),!t.isNullOrUndefined(this.cntEle)){var i=this.getTabHeader();if("None"===this.heightAdjustMode){if("auto"===this.height)return;this.isVertical()||t.setStyleAttribute(this.cntEle,{height:this.element.offsetHeight-i.offsetHeight+"px"})}else if("Fill"===this.heightAdjustMode)t.addClass([this.element],[St]),t.setStyleAttribute(this.element,{height:"100%"}),t.setStyleAttribute(this.cntEle,{height:"100%"});else if("Auto"===this.heightAdjustMode){var s=t.selectAll(".e-content > .e-item",this.element);if(!0===this.isTemplate)for(var n=0;n<s.length;n++)s[n].setAttribute("style","display:block; visibility: visible"),this.maxHeight=Math.max(this.maxHeight,this.getHeight(s[n])),s[n].style.removeProperty("display"),s[n].style.removeProperty("visibility");else{this.cntEle=t.select("."+ut,this.element),!0===e&&this.cntEle.appendChild(this.createElement("div",{id:ut+this.tabId+"_0",className:"e-item "+mt,attrs:{role:"tabpanel","aria-labelledby":ft+this.tabId+"_0"}}));var l=this.cntEle.children.item(0);for(n=0;n<this.items.length;n++)for(this.getContent(l,this.items[n].content,"clone",n),this.maxHeight=Math.max(this.maxHeight,this.getHeight(l));l.firstChild;)l.removeChild(l.firstChild);this.clearTemplate(["content"]),this.templateEle=[],this.getContent(l,this.items[0].content,"render",0),l.classList.remove(mt)}t.setStyleAttribute(this.cntEle,{height:this.maxHeight+"px"})}else t.setStyleAttribute(this.cntEle,{height:"auto"})}},i.prototype.getHeight=function(e){var t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.getPropertyValue("padding-top"))+parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))},i.prototype.setActiveBorder=function(){var e,i,s=this.getTabHeader(),n=t.select("."+Nt+"."+mt,s);if(null!==n){var l=t.closest(n,".e-tab");if(this.element===l){if(this.tbItems=t.select("."+Ct,s),e=t.select(".e-indicator",s),i=t.select("."+Ct+" ."+this.scrCntClass,s),this.isVertical()){t.setStyleAttribute(e,{left:"",right:""});0!==(t.isNullOrUndefined(i)?this.tbItems.offsetHeight:i.offsetHeight)?t.setStyleAttribute(e,{top:n.offsetTop+"px",height:n.offsetHeight+"px"}):t.setStyleAttribute(e,{top:0,height:0})}else{t.setStyleAttribute(e,{top:"",height:""});var o=t.isNullOrUndefined(i)?this.tbItems.offsetWidth:i.offsetWidth;0!==o?t.setStyleAttribute(e,{left:n.offsetLeft+"px",right:o-(n.offsetLeft+n.offsetWidth)+"px"}):t.setStyleAttribute(e,{left:"auto",right:"auto"})}t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.remove(vt)}}},i.prototype.setActive=function(e){this.tbItem=t.selectAll("."+Nt,this.getTabHeader());var i=this.tbItem[e];if(e>=0&&this.setProperties({selectedItem:e},!0),!(e<0||isNaN(e)||0===this.tbItem.length))if(i.classList.contains(mt))this.setActiveBorder();else{if(!this.isTemplate){var s=this.tbItem[this.prevIndex];t.isNullOrUndefined(s)||s.removeAttribute("aria-controls"),t.attributes(i,{"aria-controls":ut+this.tabId+"_"+e})}var n=i.id;this.removeActiveClass(),i.classList.add(mt),i.setAttribute("aria-selected","true");var l=Number(this.extIndex(n));if(t.isNullOrUndefined(this.prevActiveEle)&&(this.prevActiveEle=ut+this.tabId+"_"+l),t.attributes(this.element,{"aria-activedescendant":n}),this.isTemplate){if(t.select("."+ut,this.element).children.length>0){var o=this.findEle(t.select("."+ut,this.element).children,ut+this.tabId+"_"+l);t.isNullOrUndefined(o)||o.classList.add(mt),this.triggerAnimation(n,this.enableAnimation)}}else{this.cntEle=t.select(".e-tab > ."+ut,this.element);var r=this.getTrgContent(this.cntEle,this.extIndex(n));if(t.isNullOrUndefined(r)){this.cntEle.appendChild(this.createElement("div",{id:ut+this.tabId+"_"+this.extIndex(n),className:"e-item "+mt,attrs:{role:"tabpanel","aria-labelledby":ft+this.tabId+"_"+this.extIndex(n)}}));var a=this.getTrgContent(this.cntEle,this.extIndex(n)),d=Array.prototype.indexOf.call(this.itemIndexArray,i.id);this.getContent(a,this.items[d].content,"render",d)}else r.classList.add(mt);this.triggerAnimation(n,this.enableAnimation)}this.setActiveBorder();var h=t.select("."+pt+" #"+n,this.element);this.refreshItemVisibility(h),this.initRender||h.firstChild.focus();var c={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:i,selectedIndex:e,selectedContent:t.select("#"+ut+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwipeed};this.initRender&&0===this.selectedItem||this.trigger("selected",c)}},i.prototype.setItems=function(e){this.isReplace=!0,this.tbItems=t.select("."+Ct,this.getTabHeader()),this.tbObj.items=this.parseObject(e,0),this.tbObj.dataBind(),this.isReplace=!1},i.prototype.setRTL=function(e){this.tbObj.enableRtl=e,this.tbObj.dataBind(),this.setCssClass(this.element,"e-rtl",e),this.refreshActiveBorder()},i.prototype.refreshActiveBorder=function(){t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add(vt),this.setActiveBorder()},i.prototype.showPopup=function(e){var i=t.select(".e-popup.e-toolbar-pop",this.hdrEle);if(i.classList.contains("e-popup-close")){var s=i&&i.ej2_instances[0];s.position.X="Left"===this.headerPlacement?"left":"right",s.dataBind(),s.show(e)}},i.prototype.wireEvents=function(){window.addEventListener("resize",this.resizeContext),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"keydown",this.spaceKeyDown,this),t.isNullOrUndefined(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)})),this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:this.keyConfigs}),this.tabKeyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:{openPopup:"shift+f10",tab:"tab",shiftTab:"shift+tab"},eventName:"keydown"})},i.prototype.unWireEvents=function(){this.keyModule.destroy(),this.tabKeyModule.destroy(),t.isNullOrUndefined(this.cntEle)||this.touchModule.destroy(),window.removeEventListener("resize",this.resizeContext),t.EventHandler.remove(this.element,"mouseover",this.hoverHandler),t.EventHandler.remove(this.element,"keydown",this.spaceKeyDown),this.element.classList.remove("e-rtl"),this.element.classList.remove("e-focused")},i.prototype.clickHandler=function(e){this.element.classList.remove("e-focused");var i=e.originalEvent.target,s=t.closest(i,"."+Nt),n=this.getEleIndex(s);i.classList.contains(yt)?this.removeTab(n):this.isVertical()&&t.closest(i,".e-hor-nav")?this.showPopup(this.show):(this.isPopup=!1,t.isNullOrUndefined(s)||n===this.selectedItem||this.select(n))},i.prototype.swipeHandler=function(e){if(!(e.velocity<3&&t.isNullOrUndefined(e.originalEvent.changedTouches))){if(this.isSwipeed=!0,"Right"===e.swipeDirection&&0!==this.selectedItem){for(var i=this.selectedItem-1;i>=0;i--)if(!this.tbItem[i].classList.contains(vt)){this.select(i);break}}else if("Left"===e.swipeDirection&&this.selectedItem!==t.selectAll("."+Nt,this.element).length-1)for(var s=this.selectedItem+1;s<this.tbItem.length;s++)if(!this.tbItem[s].classList.contains(vt)){this.select(s);break}this.isSwipeed=!1}},i.prototype.spaceKeyDown=function(e){if(32===e.keyCode&&32===e.which||35===e.keyCode&&35===e.which){var i=t.closest(e.target,"."+pt);t.isNullOrUndefined(i)||e.preventDefault()}},i.prototype.keyHandler=function(e){if(!this.element.classList.contains(gt)){this.element.classList.add("e-focused");var i=e.target,s=this.getTabHeader(),n=t.select("."+mt,s);switch(this.popEle=t.select(".e-toolbar-pop",s),t.isNullOrUndefined(this.popEle)||(this.popObj=this.popEle.ej2_instances[0]),e.action){case"space":case"enter":if(i.parentElement.classList.contains(gt))return;if("enter"===e.action&&i.classList.contains("e-hor-nav")){this.showPopup(this.show);break}this.keyPressed(i);break;case"tab":case"shiftTab":i.classList.contains(bt)&&!1===t.closest(i,"."+Nt).classList.contains(mt)&&i.setAttribute("tabindex","-1"),this.popObj&&t.isVisible(this.popObj.element)&&this.popObj.hide(this.hide),n.children.item(0).setAttribute("tabindex","0");break;case"moveLeft":case"moveRight":var l=t.closest(document.activeElement,"."+Nt);t.isNullOrUndefined(l)||this.refreshItemVisibility(l);break;case"openPopup":e.preventDefault(),!t.isNullOrUndefined(this.popEle)&&this.popEle.classList.contains("e-popup-close")&&this.popObj.show(this.show);break;case"delete":var o=t.closest(i,"."+Nt);if(!0===this.showCloseButton&&!t.isNullOrUndefined(o)){var r=o.nextSibling;!t.isNullOrUndefined(r)&&r.classList.contains(Nt)&&r.firstChild.focus(),this.removeTab(this.getEleIndex(o))}this.setActiveBorder()}}},i.prototype.refreshActElePosition=function(){var e=t.select("."+Nt+"."+Et+"."+mt,this.element);t.isNullOrUndefined(e)||this.select(this.getEleIndex(e)),this.refreshActiveBorder()},i.prototype.refreshItemVisibility=function(e){var i=t.select("."+this.scrCntClass,this.tbItems);if(!this.isVertical()&&!t.isNullOrUndefined(i)){var s=t.select(".e-hscroll-bar",this.tbItems),n=s.scrollLeft,l=n+s.offsetWidth,o=e.offsetLeft,r=e.offsetWidth,a=e.offsetLeft+e.offsetWidth;if(n<o&&l<a){var d=l-o;s.scrollLeft=n+(r-d)}else if(n>o&&l>a){d=a-n;s.scrollLeft=n-(r-d)}}},i.prototype.hoverHandler=function(e){var i=e.target;!t.isNullOrUndefined(i.classList)&&i.classList.contains(yt)&&i.setAttribute("title",new t.L10n("tab",{closeButtonTitle:this.title},this.locale).getConstant("closeButtonTitle"))},i.prototype.evalOnPropertyChangeItems=function(e,i){if(e.items instanceof Array&&i.items instanceof Array)if(this.lastIndex=0,t.isNullOrUndefined(this.tbObj))this.reRenderItems();else{var s=e.items;for(o=0;o<s.length;o++)this.resetBlazorTemplates(s[o],o);this.setItems(e.items),this.templateEle.length>0&&this.expTemplateContent(),this.templateEle=[];for(var n=t.select(".e-tab > ."+ut,this.element);n.firstElementChild;)t.detach(n.firstElementChild);this.select(this.selectedItem)}else for(var l=Object.keys(e.items),o=0;o<l.length;o++){var r=parseInt(Object.keys(e.items)[o],10),a=Object.keys(e.items[r])[0],d=Object(i.items[r])[a],h=Object(e.items[r])[a],c=t.select("."+Ct+" #"+ft+this.tabId+"_"+r,this.element),p=t.select(".e-content #"+ut+this.tabId+"_"+r,this.element);if("header"===a||"headerTemplate"===a){var u=t.isNullOrUndefined(this.items[r].header)||t.isNullOrUndefined(this.items[r].header.iconCss)?"":this.items[r].header.iconCss;if(""===(this.items[r].headerTemplate||this.items[r].header.text)&&""===u)this.removeTab(r);else{var f=[];f.push(this.items[r]),this.items.splice(r,1),this.itemIndexArray.splice(r,1),this.tbObj.items.splice(r,1);var m=c.classList.contains(vt);t.detach(c),this.isReplace=!0,this.addTab(f,r),m&&this.hideTab(r),this.isReplace=!1}}if("content"===a&&!t.isNullOrUndefined(p)){if(("string"==typeof h||t.isNullOrUndefined(h.innerHTML))&&("."===h[0]||"#"===h[0])&&h.length){var g=document.querySelector(h);p.appendChild(g),g.style.display=""}else""===h&&"#"===d[0]?(document.body.appendChild(this.element.querySelector(d)).style.display="none",p.innerHTML=h):p.innerHTML=h}"cssClass"===a&&(t.isNullOrUndefined(c)||(c.classList.remove(d),c.classList.add(h)),t.isNullOrUndefined(p)||(p.classList.remove(d),p.classList.add(h))),"disabled"===a&&this.enableTab(r,!0!==h)}},i.prototype.resetBlazorTemplates=function(e,i){t.isBlazor()&&(e.headerTemplate&&!this.isStringTemplate&&0===e.headerTemplate.indexOf("<div>Blazor")&&t.resetBlazorTemplate(this.element.id+i+"_headerTemplate","HeaderTemplate"),e.content&&!this.isStringTemplate&&0===e.content.indexOf("<div>Blazor")&&t.resetBlazorTemplate(this.element.id+i+"_content","ContentTemplate"))},i.prototype.enableTab=function(e,i){var s=t.selectAll("."+Nt,this.element)[e];t.isNullOrUndefined(s)||(!0===i?(s.classList.remove(gt,"e-overlay"),s.firstChild.setAttribute("tabindex","-1")):(s.classList.add(gt,"e-overlay"),s.firstChild.removeAttribute("tabindex"),s.classList.contains(mt)&&this.select(e+1)),t.isNullOrUndefined(this.items[e])||(this.items[e].disabled=!i,this.dataBind()),s.setAttribute("aria-disabled",!0===i?"false":"true"))},i.prototype.addTab=function(e,t){var i=this,s={addedItems:e,cancel:!1};this.isReplace?this.addingTabContent(e,t):this.trigger("adding",s,function(s){s.cancel||i.addingTabContent(e,t)})},i.prototype.addingTabContent=function(e,i){var s=this,n=0;if(this.hdrEle=t.select("."+pt,this.element),t.isNullOrUndefined(this.hdrEle))this.items=e,this.reRenderItems();else{var l=t.selectAll("."+Nt,this.element).length;if(0!==l&&(n=this.lastIndex+1),t.isNullOrUndefined(i)&&(i=l-1),l<i||i<0||isNaN(i))return;0!==l||t.isNullOrUndefined(this.hdrEle)||(this.hdrEle.style.display=""),t.isNullOrUndefined(this.bdrLine)||this.bdrLine.classList.add(vt),this.tbItems=t.select("."+Ct,this.getTabHeader()),this.isAdd=!0;var o=this.parseObject(e,i);this.isAdd=!1;var r,a=0;e.forEach(function(e,l){if(r=e.headerTemplate||e.header.text,t.isNullOrUndefined(e.headerTemplate||e.header)||t.isNullOrUndefined(r)||0===r.length&&t.isNullOrUndefined(e.header.iconCss)||(s.items.splice(i+a,0,e),a++),s.isTemplate&&!t.isNullOrUndefined(e.header)&&!t.isNullOrUndefined(e.header.text)){var o=n+l,d=s.createElement("div",{id:ut+s.tabId+"_"+o,className:ft,attrs:{role:"tabpanel","aria-labelledby":ft+s.tabId+"_"+o}});s.cntEle.insertBefore(d,s.cntEle.children[i+l]);var h=s.getTrgContent(s.cntEle,o.toString());s.getContent(h,e.content,"render",i)}}),this.tbObj.addItems(o,i),this.isReplace||this.trigger("added",{addedItems:e}),this.selectedItem===i?this.select(i):this.setActiveBorder()}},i.prototype.removeTab=function(e){var i=this,s=t.selectAll("."+Nt,this.element)[e];if(!t.isNullOrUndefined(s)){var n={removedItem:s,removedIndex:e,cancel:!1};this.trigger("removing",n,function(n){if(!n.cancel){i.resetBlazorTemplates(i.items[e],e),i.tbObj.removeItems(e),i.items.splice(e,1),i.itemIndexArray.splice(e,1),i.refreshActiveBorder();var l=t.select("#"+ut+i.tabId+"_"+i.extIndex(s.id),t.select("."+ut,i.element));t.isNullOrUndefined(l)||t.detach(l),i.trigger("removed",n),s.classList.contains(mt)&&(e=e>t.selectAll("."+Nt+":not(."+Et+")",i.element).length-1?e-1:e,i.enableAnimation=!1,i.selectedItem=e,i.select(e)),0===t.selectAll("."+Nt,i.element).length&&(i.hdrEle.style.display="none"),i.enableAnimation=!0}})}},i.prototype.hideTab=function(e,i){var s,n=t.selectAll("."+Nt,this.element)[e];if(!t.isNullOrUndefined(n)){if(t.isNullOrUndefined(i)&&(i=!0),this.bdrLine.classList.add(vt),!0===i)if(n.classList.add(vt),0!==(s=t.selectAll("."+Nt+":not(."+vt+")",this.tbItems)).length&&n.classList.contains(mt)){if(0!==e)for(var l=e-1;l>=0;l--){if(!this.tbItem[l].classList.contains(vt)){this.select(l);break}if(0===l)for(var o=e+1;o<this.tbItem.length;o++)if(!this.tbItem[o].classList.contains(vt)){this.select(o);break}}else for(o=e+1;o<this.tbItem.length;o++)if(!this.tbItem[o].classList.contains(vt)){this.select(o);break}}else 0===s.length&&this.element.classList.add(vt);else this.element.classList.remove(vt),0===(s=t.selectAll("."+Nt+":not(."+vt+")",this.tbItems)).length&&this.select(e),n.classList.remove(vt);this.setActiveBorder(),n.setAttribute("aria-hidden",""+i)}},i.prototype.select=function(e){var i=this,s=this.getTabHeader();this.tbItems=t.select("."+Ct,s),this.tbItem=t.selectAll("."+Nt,s),this.content=t.select("."+ut,this.element),this.prevItem=this.tbItem[this.prevIndex],t.isNullOrUndefined(this.selectedItem)||this.selectedItem<0||this.tbItem.length<=this.selectedItem||isNaN(this.selectedItem)?this.selectedItem=0:this.selectedID=this.extIndex(this.tbItem[this.selectedItem].id);var n=this.tbItem[e];t.isNullOrUndefined(n)?this.selectedID="0":this.selectingID=this.extIndex(n.id),t.isNullOrUndefined(this.prevItem)||this.prevItem.classList.contains(gt)||this.prevItem.children.item(0).setAttribute("tabindex","-1");var l={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:this.tbItem[this.selectedItem],selectedIndex:this.selectedItem,selectedContent:t.isNullOrUndefined(this.content)?null:t.select("#"+ut+this.tabId+"_"+this.selectedID,this.content),selectingItem:n,selectingIndex:e,selectingContent:t.isNullOrUndefined(this.content)?null:t.select("#"+ut+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwipeed,cancel:!1};this.initRender&&0===this.selectedItem?this.selectingContent(e):this.trigger("selecting",l,function(t){t.cancel||i.selectingContent(e)})},i.prototype.selectingContent=function(e){if("number"==typeof e){if(!t.isNullOrUndefined(this.tbItem[e])&&this.tbItem[e].classList.contains(gt))for(var i=e+1;i<this.items.length;i++){if(!1===this.items[i].disabled){e=i;break}e=0}this.tbItem.length>e&&e>=0&&!isNaN(e)?(this.prevIndex=this.selectedItem,this.tbItem[e].classList.contains(Et)?this.setActive(this.popupHandler(this.tbItem[e])):this.setActive(e)):this.setActive(0)}else e instanceof HTMLElement&&this.setActive(this.getEleIndex(e))},i.prototype.disable=function(e){this.setCssClass(this.element,gt,e),this.element.setAttribute("aria-disabled",""+e)},i.prototype.getPersistData=function(){return this.addOnPersist(["selectedItem","actEleId"])},i.prototype.getModuleName=function(){return"tab"},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"width":t.setStyleAttribute(this.element,{width:t.formatUnit(e.width)});break;case"height":t.setStyleAttribute(this.element,{height:t.formatUnit(e.height)}),this.setContentHeight(!1);break;case"cssClass":""!==i.cssClass?(this.setCssClass(this.element,i.cssClass,!1),this.setCssClass(this.element,e.cssClass,!0)):this.setCssClass(this.element,e.cssClass,!0);break;case"items":this.evalOnPropertyChangeItems(e,i);break;case"showCloseButton":this.setCloseButton(e.showCloseButton);break;case"selectedItem":this.selectedItem=i.selectedItem,this.select(e.selectedItem);break;case"headerPlacement":this.changeOrientation(e.headerPlacement);break;case"enableRtl":this.setRTL(e.enableRtl);break;case"overflowMode":this.tbObj.overflowMode=e.overflowMode,this.tbObj.dataBind(),this.refreshActElePosition();break;case"heightAdjustMode":this.setContentHeight(!1),this.select(this.selectedItem);break;case"scrollStep":this.tbObj&&(this.tbObj.scrollStep=this.scrollStep)}}},ct([t.Collection([],At)],i.prototype,"items",void 0),ct([t.Property("100%")],i.prototype,"width",void 0),ct([t.Property("auto")],i.prototype,"height",void 0),ct([t.Property("")],i.prototype,"cssClass",void 0),ct([t.Property(0)],i.prototype,"selectedItem",void 0),ct([t.Property("Top")],i.prototype,"headerPlacement",void 0),ct([t.Property("Content")],i.prototype,"heightAdjustMode",void 0),ct([t.Property("Scrollable")],i.prototype,"overflowMode",void 0),ct([t.Property(!1)],i.prototype,"enablePersistence",void 0),ct([t.Property(!1)],i.prototype,"showCloseButton",void 0),ct([t.Property()],i.prototype,"scrollStep",void 0),ct([t.Complex({},Lt)],i.prototype,"animation",void 0),ct([t.Event()],i.prototype,"created",void 0),ct([t.Event()],i.prototype,"adding",void 0),ct([t.Event()],i.prototype,"added",void 0),ct([t.Event()],i.prototype,"selecting",void 0),ct([t.Event()],i.prototype,"selected",void 0),ct([t.Event()],i.prototype,"removing",void 0),ct([t.Event()],i.prototype,"removed",void 0),ct([t.Event()],i.prototype,"destroyed",void 0),i=ct([t.NotifyPropertyChanges],i)}(t.Component),Pt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Tt=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},Mt="e-treeview",Ht="e-icon-collapsible",Ut="e-icon-expandable",Bt="e-list-item",Rt="e-list-text",jt="e-list-parent",Ft="e-hover",qt="e-active",Vt="e-icons-spinner",zt="e-process",Wt="e-icons",_t="e-text-content",Kt="e-tree-input",Yt="e-dragging",Gt="e-sibling",Xt="e-drop-next",Qt="e-drop-out",Jt="e-fullrow",Zt="e-selected",$t="e-expanded",ei="e-node-collapsed",ti="e-check",ii="e-stop",si="e-checkbox-wrapper",ni="e-frame",li="e-node-focus",oi="e-animation-active",ri={treeRole:"tree",itemRole:"treeitem",listRole:"group",itemText:"",wrapperRole:""},ai=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Pt(i,e),Tt([t.Property("child")],i.prototype,"child",void 0),Tt([t.Property([])],i.prototype,"dataSource",void 0),Tt([t.Property("expanded")],i.prototype,"expanded",void 0),Tt([t.Property("hasChildren")],i.prototype,"hasChildren",void 0),Tt([t.Property("htmlAttributes")],i.prototype,"htmlAttributes",void 0),Tt([t.Property("iconCss")],i.prototype,"iconCss",void 0),Tt([t.Property("id")],i.prototype,"id",void 0),Tt([t.Property("imageUrl")],i.prototype,"imageUrl",void 0),Tt([t.Property("isChecked")],i.prototype,"isChecked",void 0),Tt([t.Property("parentID")],i.prototype,"parentID",void 0),Tt([t.Property(null)],i.prototype,"query",void 0),Tt([t.Property("selected")],i.prototype,"selected",void 0),Tt([t.Property(null)],i.prototype,"tableName",void 0),Tt([t.Property("text")],i.prototype,"text",void 0),Tt([t.Property("tooltip")],i.prototype,"tooltip",void 0),Tt([t.Property("navigateUrl")],i.prototype,"navigateUrl",void 0),i}(t.ChildProperty),di=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Pt(i,e),Tt([t.Property("SlideDown")],i.prototype,"effect",void 0),Tt([t.Property(400)],i.prototype,"duration",void 0),Tt([t.Property("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),hi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Pt(i,e),Tt([t.Complex({effect:"SlideUp",duration:400,easing:"linear"},di)],i.prototype,"collapse",void 0),Tt([t.Complex({effect:"SlideDown",duration:400,easing:"linear"},di)],i.prototype,"expand",void 0),i}(t.ChildProperty),ci=function(e){function r(t,i){var s=e.call(this,t,i)||this;return s.preventExpand=!1,s.checkedElement=[],s.disableNode=[],s.parentNodeCheck=[],s.expandChildren=[],s.isFieldChange=!1,s.mouseDownStatus=!1,s}Pt(r,e),a=r,r.prototype.getModuleName=function(){return"treeview"},r.prototype.preRender=function(){var e=this;this.checkActionNodes=[],this.dragStartAction=!1,this.isAnimate=!1,this.keyConfigs={escape:"escape",end:"end",enter:"enter",f2:"f2",home:"home",moveDown:"downarrow",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",ctrlDown:"ctrl+downarrow",ctrlUp:"ctrl+uparrow",ctrlEnter:"ctrl+enter",ctrlHome:"ctrl+home",ctrlEnd:"ctrl+end",ctrlA:"ctrl+A",shiftDown:"shift+downarrow",shiftUp:"shift+uparrow",shiftEnter:"shift+enter",shiftHome:"shift+home",shiftEnd:"shift+end",csDown:"ctrl+shift+downarrow",csUp:"ctrl+shift+uparrow",csEnter:"ctrl+shift+enter",csHome:"ctrl+shift+home",csEnd:"ctrl+shift+end",space:"space"},this.listBaseOption={expandCollapse:!0,showIcon:!0,expandIconClass:Ut,ariaAttributes:ri,expandIconPosition:"Left",itemCreated:function(t){e.beforeNodeCreate(t)}},this.updateListProp(this.fields),this.aniObj=new t.Animation({}),this.treeList=[],this.isLoaded=!1,this.isInitalExpand=!1,this.expandChildren=[],this.index=0,this.setTouchClass(),t.isNullOrUndefined(this.selectedNodes)&&this.setProperties({selectedNodes:[]},!0),t.isNullOrUndefined(this.checkedNodes)&&this.setProperties({checkedNodes:[]},!0),t.isNullOrUndefined(this.expandedNodes)?this.setProperties({expandedNodes:[]},!0):this.isInitalExpand=!0},r.prototype.getPersistData=function(){return this.addOnPersist(["selectedNodes","checkedNodes","expandedNodes"])},r.prototype.render=function(){this.initialRender=!0,this.initialize(),this.setDataBinding(),this.setExpandOnType(),this.setRipple(),this.wireEditingEvents(this.allowEditing),this.setDragAndDrop(this.allowDragAndDrop),this.wireEvents(),this.initialRender=!1,this.renderComplete()},r.prototype.initialize=function(){this.element.setAttribute("role","tree"),this.element.setAttribute("tabindex","0"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active"),this.isBlazorPlatform=t.isBlazor(),this.setCssClass(null,this.cssClass),this.setEnableRtl(),this.setFullRow(this.fullRowSelect),this.nodeTemplateFn=this.templateComplier(this.nodeTemplate)},r.prototype.setEnableRtl=function(){this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},r.prototype.setRipple=function(){var e={selector:".e-fullrow,.e-text-content",ignore:"."+_t+" > ."+Wt+",.e-input-group,.e-input, ."+si};this.rippleFn=t.rippleEffect(this.element,e);var i={selector:"."+_t+" > ."+Wt,isCenterRipple:!0};this.rippleIconFn=t.rippleEffect(this.element,i)},r.prototype.setFullRow=function(e){e?t.addClass([this.element],"e-fullrow-wrap"):t.removeClass([this.element],"e-fullrow-wrap")},r.prototype.setMultiSelect=function(e){var i=t.select("."+jt,this.element);e?i.setAttribute("aria-multiselectable","true"):i.removeAttribute("aria-multiselectable")},r.prototype.templateComplier=function(e){if(e)try{if(document.querySelectorAll(e).length)return t.compile(document.querySelector(e).innerHTML.trim())}catch(i){return t.compile(e)}},r.prototype.setDataBinding=function(){var e=this;this.treeList.push("false"),this.fields.dataSource instanceof l.DataManager?this.fields.dataSource.ready?this.fields.dataSource.ready.then(function(t){e.fields.dataSource instanceof l.DataManager&&e.fields.dataSource.dataSource.offline&&(e.treeList.pop(),e.treeData=t.result,e.isNumberTypeId=e.getType(),e.setRootData(),e.renderItems(!0),0!==e.treeList.length||e.isLoaded||e.finalize())}):this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(t){e.treeList.pop(),e.treeData=t.result,e.isNumberTypeId=e.getType(),e.setRootData(),e.renderItems(!0),0!==e.treeList.length||e.isLoaded||e.finalize()}):(this.treeList.pop(),t.isNullOrUndefined(this.fields.dataSource)?this.rootData=this.treeData=[]:(this.treeData=JSON.parse(JSON.stringify(this.fields.dataSource)),this.setRootData()),this.isNumberTypeId=this.getType(),this.renderItems(!1)),0!==this.treeList.length||this.isLoaded||this.finalize()},r.prototype.getQuery=function(e,s){void 0===s&&(s=null);var n,o=[];if(e.query)n=e.query.clone();else{n=new l.Query;for(var r=this.getActualProperties(e),a=0,d=Object.keys(r);a<d.length;a++){var h=d[a];"dataSource"!==h&&"tableName"!==h&&"child"!==h&&e[h]&&-1===o.indexOf(e[h])&&o.push(e[h])}n.select(o),r.hasOwnProperty("tableName")&&n.from(e.tableName)}return i.ListBase.addSorting(this.sortOrder,e.text,n),t.isNullOrUndefined(s)||t.isNullOrUndefined(e.parentID)||n.where(e.parentID,"equal",this.isNumberTypeId?parseFloat(s):s),n},r.prototype.getType=function(){return!!this.treeData[0]&&"number"==typeof t.getValue(this.fields.id,this.treeData[0])},r.prototype.setRootData=function(){if(this.dataType=this.getDataType(this.treeData,this.fields),1===this.dataType){this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID);var e=this.getChildNodes(this.treeData,void 0,!0);t.isNullOrUndefined(e)?this.rootData=[]:this.rootData=e}else this.rootData=this.treeData},r.prototype.renderItems=function(e){if(this.listBaseOption.ariaAttributes.level=1,this.ulElement=i.ListBase.createList(this.createElement,e?this.rootData:this.getSortedData(this.rootData),this.listBaseOption),this.element.appendChild(this.ulElement),!1===this.loadOnDemand)for(var t=this.ulElement.querySelectorAll(".e-list-item"),s=0;s<t.length;)this.renderChildNodes(t[s],!0,null,!0),s++;else this.finalizeNode(this.element);this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.parentNodeCheck=[],this.parentCheckData=[],this.updateCheckedStateFromDS(),this.autoCheck&&this.showCheckBox&&!this.isLoaded&&this.updateParentCheckState()},r.prototype.updateCheckedStateFromDS=function(e){if(this.treeData&&this.showCheckBox)if(1===this.dataType){for(var i=this.fields,s=new l.DataManager(this.treeData).executeLocal((new l.Query).where(i.isChecked,"equal",!0,!1)),n=0;n<s.length;n++){var o=s[n][this.fields.id]?s[n][this.fields.id].toString():null;s[n][this.fields.parentID]&&s[n][this.fields.parentID].toString();if(-1!==this.checkedNodes.indexOf(o)||this.isLoaded||this.checkedNodes.push(o),s[n][this.fields.hasChildren])for(var r=s[n][this.fields.id],a=new l.DataManager(this.treeData).executeLocal((new l.Query).where(i.parentID,"equal",r,!1)),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(h)&&this.autoCheck&&this.checkedNodes.push(h)}}for(n=0;n<this.checkedNodes.length;n++){var c=this.fields,p=new l.DataManager(this.treeData).executeLocal((new l.Query).where(c.id,"equal",this.checkedNodes[n],!0));p[0]&&this.autoCheck&&(this.getCheckedNodeDetails(c,p),this.checkIndeterminateState(p[0]));for(var u=new l.DataManager(this.treeData).executeLocal((new l.Query).where(c.parentID,"equal",this.checkedNodes[n],!0)),f=0;f<u.length;f++){var m=u[f][this.fields.id]?u[f][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(m)&&this.autoCheck&&this.checkedNodes.push(m)}}}else if(2===this.dataType||this.fields.dataSource instanceof l.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof l.DataManager&&!this.loadOnDemand)for(f=0;f<this.treeData.length;f++){var g=this.treeData[f][this.fields.id]?this.treeData[f][this.fields.id].toString():"";this.treeData[f][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(g)&&this.checkedNodes.push(g);var v=t.getValue(this.fields.child.toString(),this.treeData[f]);v&&this.updateChildCheckState(v,this.treeData[f])}},r.prototype.getCheckedNodeDetails=function(e,i){var s=i[0][this.fields.parentID]?i[0][this.fields.parentID].toString():null,n=0,o=this.element.querySelector('[data-uid="'+i[0][this.fields.id]+'"]'),r=this.element.querySelector('[data-uid="'+i[0][this.fields.parentID]+'"]');if(o||r){if(r){t.select("."+ti,r)||this.changeState(r,"indeterminate",null,!0,!0)}}else{this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(s)&&this.parentNodeCheck.push(s);for(var a=this.getChildNodes(this.treeData,s),d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(h)&&n++,n===a.length&&-1===this.checkedNodes.indexOf(s)&&this.checkedNodes.push(s)}var c=new l.DataManager(this.treeData).executeLocal((new l.Query).where(e.id,"equal",s,!0));this.getCheckedNodeDetails(e,c)}},r.prototype.updateParentCheckState=function(){for(var e,i=t.selectAll(".e-stop",this.element),s=0;s<i.length;s++){var n=t.closest(i[s],"."+Bt),o=n.getAttribute("data-uid").toString(),r=0;if(e=1===this.dataType?new l.DataManager(this.treeData).executeLocal((new l.Query).where(this.fields.parentID,"equal",o,!0)):this.getChildNodes(this.treeData,o)){for(var a=0;a<e.length;a++){var d=e[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&r++}if(r===e.length){var h=n.getAttribute("data-uid");-1===this.checkedNodes.indexOf(h)&&this.checkedNodes.push(h),this.changeState(n,"check",null,!0,!0)}else 0===r&&0===this.checkedNodes.length&&this.changeState(n,"uncheck",null,!0,!0)}}},r.prototype.checkIndeterminateState=function(e){var t;if(t=1===this.dataType?this.element.querySelector('[data-uid="'+e[this.fields.parentID]+'"]'):this.element.querySelector('[data-uid="'+e[this.fields.id]+'"]')){"true"!==t.querySelector("."+si).getAttribute("aria-checked")&&this.changeState(t,"indeterminate",null,!0,!0)}else if(2===this.dataType){this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(e[this.fields.id].toString())&&this.parentNodeCheck.push(e[this.fields.id].toString())}},r.prototype.updateChildCheckState=function(e,i){for(var s=0,n=i[this.fields.id]?i[this.fields.id].toString():"",l=0;l<e.length;l++){var o=e[l][this.fields.id]?e[l][this.fields.id].toString():"";e[l][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(o)&&this.checkedNodes.push(o),-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(o)&&this.autoCheck&&this.checkedNodes.push(o),-1!==this.checkedNodes.indexOf(o)&&this.autoCheck&&s++;var r=t.getValue(this.fields.child.toString(),e[l]);r&&(this.parentCheckData.push(i),this.updateChildCheckState(r,e[l])),s===e.length&&this.autoCheck&&-1===this.checkedNodes.indexOf(n)&&this.checkedNodes.push(n)}if(0!==s&&this.autoCheck){this.checkIndeterminateState(i);for(var a=0;a<this.parentCheckData.length;a++)i!==this.parentCheckData[a]&&this.parentCheckData[a]&&this.checkIndeterminateState(this.parentCheckData[a])}this.parentCheckData=[]},r.prototype.beforeNodeCreate=function(e){if(this.showCheckBox){var i=n.createCheckBox(this.createElement,!0,{cssClass:this.touchClass});i.setAttribute("role","checkbox");var s=t.select("div."+Wt,e.item),l=e.item.getAttribute("data-uid");e.item.childNodes[0].insertBefore(i,e.item.childNodes[0].childNodes[t.isNullOrUndefined(s)?0:1]);var o=t.getValue(e.fields.isChecked,e.curData);this.checkedNodes.indexOf(l)>-1?(t.select("."+ni,i).classList.add(ti),i.setAttribute("aria-checked","true"),this.addCheck(e.item)):t.isNullOrUndefined(o)||"true"!==o.toString()?i.setAttribute("aria-checked","false"):(t.select("."+ni,i).classList.add(ti),i.setAttribute("aria-checked","true"),this.addCheck(e.item));var r=t.select("."+ni,i);t.EventHandler.add(r,"mousedown",this.frameMouseHandler,this),t.EventHandler.add(r,"mouseup",this.frameMouseHandler,this)}this.fullRowSelect&&this.createFullRow(e.item),this.allowMultiSelection&&!e.item.classList.contains(Zt)&&e.item.setAttribute("aria-selected","false");var a=e.fields;if(this.addActionClass(e,a.selected,Zt),this.addActionClass(e,a.expanded,$t),!t.isNullOrUndefined(this.nodeTemplateFn)){var d=e.item.querySelector("."+Rt);d.innerHTML="";var h=this.nodeTemplateFn(e.curData,void 0,void 0,this.element.id+"nodeTemplate",this.isStringTemplate);h=Array.prototype.slice.call(h),t.append(h,d)}var c={node:e.item,nodeData:e.curData,text:e.text};this.trigger("drawNode",c)},r.prototype.frameMouseHandler=function(e){var i=t.select(".e-ripple-container",e.target.parentElement);n.rippleMouseHandler(e,i)},r.prototype.addActionClass=function(e,i,s){var n=e.curData,l=t.getValue(i,n);t.isNullOrUndefined(l)||"false"===l.toString()||e.item.classList.add(s)},r.prototype.getDataType=function(e,i){if(this.fields.dataSource instanceof l.DataManager){for(var s=0;s<e.length;s++)if("string"==typeof i.child&&t.isNullOrUndefined(t.getValue(i.child,e[s])))return 1;return 2}s=0;for(var n=e.length;s<n;s++){if("string"==typeof i.child&&!t.isNullOrUndefined(t.getValue(i.child,e[s])))return 2;if(!t.isNullOrUndefined(t.getValue(i.parentID,e[s]))||!t.isNullOrUndefined(t.getValue(i.hasChildren,e[s])))return 1}return 1},r.prototype.getGroupedData=function(e,t){for(var s=(new l.Query).group(t),n=i.ListBase.getDataSource(e,s),o=[],r=0;r<n.length;r++){var a=n[r].items;o.push(a)}return o},r.prototype.getSortedData=function(e){return e&&"None"!==this.sortOrder&&(e=i.ListBase.getDataSource(e,i.ListBase.addSorting(this.sortOrder,this.fields.text))),e},r.prototype.finalizeNode=function(e){for(var i=t.selectAll(".e-list-img",e),s=0;s<i.length;s++)i[s].setAttribute("alt","e-list-img");if(this.isLoaded){for(var n=t.selectAll("."+Zt,e),l=0;l<n.length;l++){this.selectNode(n[l],null);break}t.removeClass(n,Zt)}for(var o=t.selectAll("."+Bt+":not(."+$t+")",e),r=0;r<o.length;r++){var a=t.select("div."+Wt,o[r]);a&&a.classList.contains(Ut)&&this.disableExpandAttr(o[r])}var d=t.selectAll("."+$t,e);if(!this.isInitalExpand)for(l=0;l<d.length;l++)this.renderChildNodes(d[l]);t.removeClass(d,$t),this.updateList(),this.isLoaded&&this.updateCheckedProp()},r.prototype.updateCheckedProp=function(){if(this.showCheckBox){var e=[].concat([],this.checkedNodes);this.setProperties({checkedNodes:e},!0)}},r.prototype.ensureIndeterminate=function(){if(this.autoCheck)for(var e=t.selectAll("li",this.element),i=0;i<e.length;i++)e[i].classList.contains(Bt)&&(t.select("."+jt,e[i])?this.ensureParentCheckState(e[i]):this.ensureChildCheckState(e[i]));else{var s=t.selectAll(".e-stop",this.element);for(i=0;i<s.length;i++)s[i].classList.remove(ii)}},r.prototype.ensureParentCheckState=function(e){if(!t.isNullOrUndefined(e)){if(e.classList.contains(Mt))return;var i=e;e.classList.contains(Bt)&&(i=t.select("."+jt,e));var s=t.selectAll("."+ti,i),n=t.selectAll(".e-stop",i),l=t.selectAll("."+Bt,i),o=e.getElementsByClassName(si)[0];l.length===s.length?this.changeState(o,"check",null,!0,!0):s.length>0||n.length>0?this.changeState(o,"indeterminate",null,!0,!0):0===s.length&&this.changeState(o,"uncheck",null,!0,!0);var r=t.closest(e,"."+jt);if(!t.isNullOrUndefined(r)){var a=t.closest(r,"."+Bt);this.ensureParentCheckState(a)}}},r.prototype.ensureChildCheckState=function(e,i){if(!t.isNullOrUndefined(e)){var s=t.select("."+jt,e),n=void 0;if(!t.isNullOrUndefined(s)){n=t.selectAll("."+si,s);for(var l=e.getElementsByClassName(ni)[0].classList.contains(ti),o=e.getElementsByClassName(ni)[0].classList.contains(ii),r=s.querySelectorAll("li"),a=(s.parentElement.getAttribute("aria-expanded"),void 0),d=0;d<n.length;d++){if(t.isNullOrUndefined(this.currentLoadData)||t.isNullOrUndefined(t.getValue(this.fields.isChecked,this.currentLoadData[d]))){var h=n[d].getElementsByClassName(ni)[0].classList.contains(ti),c=r[d].getAttribute("data-uid");l?a="check":h&&!this.isLoaded?a="check":-1!==this.checkedNodes.indexOf(c)&&this.isLoaded&&(o||l)?a="check":r[d].classList.contains("e-has-child")&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(l||o)&&-1!==this.parentNodeCheck.indexOf(c)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):1===this.dataType&&!t.isUndefined(this.parentNodeCheck)&&this.autoCheck&&(l||o)&&-1!==this.parentNodeCheck.indexOf(c)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):a="uncheck"}else a=t.getValue(this.fields.isChecked,this.currentLoadData[d])?"check":"uncheck",-1!==this.ele&&(a=l?"check":"uncheck");this.changeState(n[d],a,i,!0,!0)}}this.autoCheck&&this.isLoaded&&this.updateParentCheckState()}},r.prototype.doCheckBoxAction=function(e,i){t.selectAll("."+Bt,this.element);if(t.isNullOrUndefined(e)){var s=t.selectAll("."+si,this.element);if(this.loadOnDemand)for(var n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck",null,null,null,i);else for(n=0;n<s.length;n++)this.updateFieldChecked(s[n],i),this.changeState(s[n],i?"check":"uncheck")}else for(var l=e.length;l>=0;l--){var o=void 0;if(o=1===e.length?this.getElement(e[l-1]):this.getElement(e[l]),t.isNullOrUndefined(o)){var r=void 0;if(""!==(r=e[l-e.length]?e[l-e.length].toString():e[l]?e[l].toString():null)&&i&&r)this.setValidCheckedNode(r),this.dynamicCheckState(r,i);else if(-1!==this.checkedNodes.indexOf(r)&&""!==r&&!i){this.checkedNodes.splice(this.checkedNodes.indexOf(r),1);var a=this.getChildNodes(this.treeData,r);if(a){for(var d=0;d<a.length;d++){var h=a[d][this.fields.id]?a[d][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(h)&&this.checkedNodes.splice(this.checkedNodes.indexOf(h),1)}-1!==this.parentNodeCheck.indexOf(r)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(r),1)}r&&this.dynamicCheckState(r,i),this.updateField(this.treeData,this.fields,r,"isChecked",null)}}else{var c=t.select("."+jt+" ."+si,o);this.validateCheckNode(c,!i,o,null)}}if(e)for(var p=0;p<e.length;p++){r=e[p]?e[p].toString():"";i||this.updateField(this.treeData,this.fields,r,"isChecked",null)}this.autoCheck&&this.updateParentCheckState()},r.prototype.updateFieldChecked=function(e,i){var s=t.closest(e,"."+Bt),n=s.getAttribute("data-uid");"true"!==this.getNodeData(s).isChecked||i||this.updateField(this.treeData,this.fields,n,"isChecked",null)},r.prototype.dynamicCheckState=function(e,i){if(1===this.dataType){var s=0,n=new l.DataManager(this.treeData).executeLocal((new l.Query).where(this.fields.id,"equal",e,!0));if(n[0]){var o=n[0][this.fields.id]?n[0][this.fields.id].toString():null,r=n[0][this.fields.parentID]?n[0][this.fields.parentID].toString():null,a=((u=this.element.querySelector('[data-uid="'+r+'"]'))&&t.select(".e-stop",u),u?t.select("."+ti,u):null),d=this.element.querySelector('[data-uid="'+o+'"]'),h=this.getChildNodes(this.treeData,r);if(h)for(var c=0;c<h.length;c++){var p=h[c][this.fields.id]?h[c][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(p)&&s++}-1!==this.checkedNodes.indexOf(e)&&u&&o===e&&this.autoCheck?this.changeState(u,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&d&&o===e&&!i?this.changeState(d,"uncheck",null):-1!==this.checkedNodes.indexOf(e)&&d&&o===e&&i?this.changeState(d,"check",null):-1===this.checkedNodes.indexOf(e)&&!d&&u&&o===e&&this.autoCheck&&0!==s?this.changeState(u,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&!d&&u&&o===e&&this.autoCheck&&0===s?this.changeState(u,"uncheck",null):d||u||o!==e||!this.autoCheck||this.updateIndeterminate(e,i)}}else if(2===this.dataType||this.fields.dataSource instanceof l.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof l.DataManager&&!this.loadOnDemand){o=void 0;var u=void 0;for(a=void 0,c=0;c<this.treeData.length;c++){o=this.treeData[c][this.fields.id]?this.treeData[c][this.fields.id].toString():"",a=(u=this.element.querySelector('[data-uid="'+o+'"]'))?t.select("."+ti,u):null,-1===this.checkedNodes.indexOf(o)&&u&&a&&!i&&this.changeState(u,"uncheck",null);var f=t.getValue(this.fields.child.toString(),this.treeData[c]);f&&this.updateChildIndeterminate(f,o,e,i,o)}}},r.prototype.updateIndeterminate=function(e,t){var i,s=this.getTreeData(e),n=0;1===this.dataType&&(i=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null);var l=this.getChildNodes(this.treeData,i);if(l)for(var o=0;o<l.length;o++){var r=l[o][this.fields.id]?l[o][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(r)&&n++}var a=this.element.querySelector('[data-uid="'+i+'"]');a&&t?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0!==n?this.changeState(a,"indeterminate",null):!t&&a&&-1===this.parentNodeCheck.indexOf(i)&&0===n?this.changeState(a,"uncheck",null):a||(t||-1!==this.checkedNodes.indexOf(i)||-1===this.parentNodeCheck.indexOf(i)?t&&-1===this.checkedNodes.indexOf(i)&&-1===this.parentNodeCheck.indexOf(i)?this.parentNodeCheck.push(i):t||-1===this.checkedNodes.indexOf(i)||-1!==this.parentNodeCheck.indexOf(i)||0===n||this.parentNodeCheck.push(i):this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i),1),this.updateIndeterminate(i,t),-1===this.checkedNodes.indexOf(i)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(i),1))},r.prototype.updateChildIndeterminate=function(e,i,s,n,l){for(var o=0,r=0;r<e.length;r++){var a=e[r][this.fields.id]?e[r][this.fields.id].toString():"";-1!==this.checkedNodes.indexOf(a)&&o++;var d=this.element.querySelector('[data-uid="'+i+'"]'),h=d?t.select(".e-stop",d):null,c=d?t.select("."+ti,d):null,p=this.element.querySelector('[data-uid="'+a+'"]'),u=p?t.select("."+ti,p):null;if(-1!==this.checkedNodes.indexOf(s)&&d&&a===s&&this.autoCheck)this.changeState(d,"indeterminate",null);else if(-1!==this.checkedNodes.indexOf(s)||!d||p||a!==s||n){if(-1===this.checkedNodes.indexOf(s)&&p&&a===s&&!n)this.changeState(p,"uncheck",null);else if(-1===this.checkedNodes.indexOf(s)&&h&&a===s&&this.autoCheck&&0===o&&!n)h.classList.remove(ii);else if(-1===this.checkedNodes.indexOf(s)&&!p&&c&&a===s&&0===o)this.changeState(d,"uncheck",null);else if(-1===this.checkedNodes.indexOf(a)&&p&&u&&0===o)this.changeState(p,"uncheck",null);else if(!p&&!d&&a===s||-1!==this.parentNodeCheck.indexOf(i)&&this.autoCheck){var f=this.element.querySelector('[data-uid="'+l+'"]');n&&0!==o?this.changeState(f,"indeterminate",null):n&&o===e.length&&-1===this.checkedNodes.indexOf(i)?this.checkedNodes.push(i):n||0!==o||-1===this.parentNodeCheck.indexOf(i)||this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(i)),-1===this.parentNodeCheck.indexOf(i)&&this.parentNodeCheck.push(i)}}else this.autoCheck?this.changeState(d,"uncheck",null):0!==o?this.changeState(d,"indeterminate",null):this.changeState(d,"uncheck",null);var m=t.getValue(this.fields.child.toString(),e[r]);m&&this.updateChildIndeterminate(m,a,s,n,l)}},r.prototype.changeState=function(e,i,s,n,l,o){var r,a=this,d=t.closest(e,"."+Bt);n?this.nodeCheckAction(e,i,d,r,s,n,l,o):(this.checkActionNodes=[],r=this.getCheckEvent(d,i,s),this.trigger("nodeChecking",r,function(t){t.cancel||a.nodeCheckAction(e,i,d,t,s,n,l,o)}))},r.prototype.nodeCheckAction=function(e,i,s,n,l,o,r,a){var d,h=e.getElementsByClassName(ni)[0];if("check"!==i||h.classList.contains(ti)?"uncheck"===i&&(h.classList.contains(ti)||h.classList.contains(ii))?(t.removeClass([h],[ti,ii]),this.removeCheck(s),d="false"):"indeterminate"===i&&!h.classList.contains(ii)&&this.autoCheck&&(h.classList.remove(ti),h.classList.add(ii),this.removeCheck(s),d="mixed"):(h.classList.remove(ii),h.classList.add(ti),this.addCheck(s),d="true"),d="check"===i?"true":"uncheck"===i?"false":d,t.isNullOrUndefined(d)||e.setAttribute("aria-checked",d),r){var c=[].concat([],this.checkActionNodes);n=this.getCheckEvent(s,i,l),t.isUndefined(o)&&(n.data=c)}void 0!==a&&this.ensureStateChange(s,a),o||t.isNullOrUndefined(d)||(e.setAttribute("aria-checked",d),n.data[0].checked=d,this.trigger("nodeChecked",n),this.checkActionNodes=[])},r.prototype.addCheck=function(e){var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.checkedNodes.indexOf(i)||this.checkedNodes.push(i)},r.prototype.removeCheck=function(e){var t=this.checkedNodes.indexOf(e.getAttribute("data-uid"));t>-1&&this.checkedNodes.splice(t,1)},r.prototype.getCheckEvent=function(e,i,s){this.checkActionNodes.push(this.getNodeData(e));var n=this.checkActionNodes;return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,data:n}},r.prototype.finalize=function(){t.select("."+jt,this.element).setAttribute("role",ri.treeRole),this.setMultiSelect(this.allowMultiSelection);var e=t.select("."+Bt,this.element);e&&(t.addClass([e],li),this.updateIdAttr(null,e)),this.hasPid=!!this.rootData[0]&&this.rootData[0].hasOwnProperty(this.fields.parentID),this.doExpandAction()},r.prototype.doExpandAction=function(){var e=this.expandedNodes;if(this.isInitalExpand&&e.length>0)if(this.setProperties({expandedNodes:[]},!0),this.fields.dataSource instanceof l.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName)this.expandGivenNodes(e);else{for(var i=0;i<e.length;i++){var s=t.select('[data-uid="'+e[i]+'"]',this.element);if(t.isNullOrUndefined(s))e[i]&&-1===this.expandChildren.indexOf(e[i])&&this.expandChildren.push(e[i].toString());else{var n=t.select("."+Ut,t.select("."+_t,s));t.isNullOrUndefined(n)||this.expandAction(s,n,null)}}this.afterFinalized()}else this.afterFinalized()},r.prototype.expandGivenNodes=function(e){var t=this;this.expandCallback(e[this.index],function(){t.index++,t.index<e.length?t.expandGivenNodes(e):t.afterFinalized()})},r.prototype.expandCallback=function(e,i){var s=t.select('[data-uid="'+e+'"]',this.element);if(t.isNullOrUndefined(s))i();else{var n=t.select("."+Ut,t.select("."+_t,s));t.isNullOrUndefined(n)?i():this.expandAction(s,n,null,!1,i)}},r.prototype.afterFinalized=function(){if(this.doSelectionAction(),this.updateCheckedProp(),this.isAnimate=!0,this.isInitalExpand=!1,!this.isLoaded||this.isFieldChange){var e={data:this.treeData};this.trigger("dataBound",e)}this.isLoaded=!0},r.prototype.doSelectionAction=function(){var e=t.selectAll("."+Zt,this.element),i=this.selectedNodes;if(i.length>0){this.setProperties({selectedNodes:[]},!0);for(var s=0;s<i.length;s++){var n=t.select('[data-uid="'+i[s]+'"]',this.element);if(n&&!n.classList.contains("e-active")?this.selectNode(n,null,!0):this.selectedNodes.push(i[s]),!this.allowMultiSelection)break}}else this.selectGivenNodes(e);t.removeClass(e,Zt)},r.prototype.selectGivenNodes=function(e){for(var t=0;t<e.length&&(e[t].classList.contains("e-disable")||this.selectNode(e[t],null,!0),this.allowMultiSelection);t++);},r.prototype.clickHandler=function(e){var i=e.originalEvent.target;if(t.EventHandler.remove(this.element,"contextmenu",this.preventContextMenu),i&&!this.dragStartAction){var s=i.classList,n=t.closest(i,"."+Bt);if(n){if(this.removeHover(),this.setFocusElement(n),this.showCheckBox&&!n.classList.contains("e-disable")){var l=t.closest(i,"."+si);if(!t.isNullOrUndefined(l)){var o=t.select("."+ni,l);return this.validateCheckNode(l,o.classList.contains(ti),n,e.originalEvent),void this.triggerClickEvent(e.originalEvent,n)}}s.contains(Ut)?this.expandAction(n,i,e):s.contains(Ht)?this.collapseNode(n,i,e):s.contains(jt)||s.contains(Bt)||this.toggleSelect(n,e.originalEvent,!1),this.triggerClickEvent(e.originalEvent,n)}}},r.prototype.nodeCheckedEvent=function(e,i,s){t.closest(e,"."+Bt);var n=this.getCheckEvent(e,i?"uncheck":"check",s);n.data=n.data.splice(0,n.data.length-1),this.trigger("nodeChecked",n)},r.prototype.triggerClickEvent=function(e,t){var i={event:e,node:t};this.trigger("nodeClicked",i)},r.prototype.expandNode=function(e,i,s){var n=this;if(i.classList.contains(Vt)&&this.hideSpinner(i),this.initialRender||i.classList.add("interaction"),!0!==s||!0===s&&e.classList.contains("e-expanded")){if(!0!==this.preventExpand){t.removeClass([i],Ut),t.addClass([i],Ht);var o=0,r=0,a=this,d=t.select("."+jt,e),h=e;this.setHeight(h,d);var c=t.select("."+Bt+"."+qt,e);this.isAnimate?this.aniObj.animate(d,{name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing,begin:function(i){h.style.overflow="hidden",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.add(oi),o=h.offsetHeight,r=t.select("."+_t,e).offsetHeight},progress:function(e){e.element.style.display="block",a.animateHeight(e,o,r)},end:function(e){e.element.style.display="block",!t.isNullOrUndefined(c)&&c instanceof HTMLElement&&c.classList.remove(oi),n.expandedNode(h,d,i)}}):this.expandedNode(h,d,i)}}else{t.select("."+jt,e).style.display="none",this.fields.dataSource instanceof l.DataManager==!0&&(this.preventExpand=!1)}this.initialRender&&i.classList.add("interaction")},r.prototype.expandedNode=function(e,i,s){i.style.display="block",e.style.display="block",e.style.overflow="",e.style.height="",t.removeClass([s],zt),this.addExpand(e),this.isLoaded&&this.expandArgs&&(this.expandArgs=this.getExpandEvent(e,null),this.trigger("nodeExpanded",this.expandArgs))},r.prototype.addExpand=function(e){e.setAttribute("aria-expanded","true"),t.removeClass([e],ei);var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.expandedNodes.indexOf(i)||(this.isBlazorPlatform?this.setProperties({expandedNodes:[].concat([],this.expandedNodes,[i])},!0):this.expandedNodes.push(i))},r.prototype.collapseNode=function(e,i,s){var n=this;if(!i.classList.contains(zt)){t.addClass([i],zt);var l;this.isLoaded?(l=this.getExpandEvent(e,s),this.trigger("nodeCollapsing",l,function(s){s.cancel?t.removeClass([i],zt):n.nodeCollapseAction(e,i,s)})):this.nodeCollapseAction(e,i,l)}},r.prototype.nodeCollapseAction=function(e,i,s){var n=this;t.removeClass([i],Ht),t.addClass([i],Ut);var l=0,o=0,r=this,a=t.select("."+jt,e),d=e,h=t.select("."+Bt+"."+qt,e);this.isAnimate?this.aniObj.animate(a,{name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing,begin:function(i){d.style.overflow="hidden",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.add(oi),l=t.select("."+_t,e).offsetHeight,o=d.offsetHeight},progress:function(e){r.animateHeight(e,l,o)},end:function(e){e.element.style.display="none",!t.isNullOrUndefined(h)&&h instanceof HTMLElement&&h.classList.remove(oi),n.collapsedNode(d,a,i,s)}}):this.collapsedNode(d,a,i,s)},r.prototype.collapsedNode=function(e,i,s,n){i.style.display="none",e.style.overflow="",e.style.height="",t.removeClass([s],zt),this.removeExpand(e),this.isLoaded&&this.trigger("nodeCollapsed",n)},r.prototype.removeExpand=function(e,t){t?e.removeAttribute("aria-expanded"):this.disableExpandAttr(e);var i=this.expandedNodes.indexOf(e.getAttribute("data-uid"));if(i>-1)if(this.isBlazorPlatform){var s=this.expandedNodes.slice(0);s.splice(i,1),this.setProperties({expandedNodes:[].concat([],s)},!0)}else this.expandedNodes.splice(i,1)},r.prototype.disableExpandAttr=function(e){e.setAttribute("aria-expanded","false"),t.addClass([e],ei)},r.prototype.setHeight=function(e,t){t.style.display="block",t.style.visibility="hidden",e.style.height=e.offsetHeight+"px",t.style.display="none",t.style.visibility=""},r.prototype.animateHeight=function(e,t,i){var s=(i-t)*((e.duration-e.timeStamp)/e.duration)+t;e.element.parentElement.style.height=s+"px"},r.prototype.renderChildNodes=function(e,s,n,o){var r=this,a=t.select("div."+Wt,e);if(!t.isNullOrUndefined(a)){this.showSpinner(a);var d;if(this.fields.dataSource instanceof l.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){var h=this.parents(e,"."+jt).length,c=this.getChildFields(this.fields,h,1);if(t.isNullOrUndefined(c)||t.isNullOrUndefined(c.dataSource))return t.detach(a),void this.removeExpand(e,!0);this.treeList.push("false"),this.fields.dataSource instanceof l.DataManager&&this.fields.dataSource.dataSource.offline||this.fields.dataSource instanceof l.DataManager&&!this.loadOnDemand?(this.treeList.pop(),d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.loadChild(d,c,a,e,s,n,o),this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate()):this.fields.dataSource instanceof l.DataManager&&this.loadOnDemand&&c.dataSource.executeQuery(this.getQuery(c,e.getAttribute("data-uid"))).then(function(t){r.treeList.pop(),d=t.result,1===r.dataType&&(r.dataType=2),r.loadChild(d,c,a,e,s,n,o),r.nodeTemplate&&r.isBlazorPlatform&&!r.isStringTemplate&&r.updateBlazorTemplate()})}else{if(d=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.currentLoadData=d,t.isNullOrUndefined(d)||0===d.length)return t.detach(a),void this.removeExpand(e,!0);this.listBaseOption.ariaAttributes.level=parseFloat(e.getAttribute("aria-level"))+1,e.appendChild(i.ListBase.createList(this.createElement,this.getSortedData(d),this.listBaseOption)),this.expandNode(e,a,o),this.setSelectionForChildNodes(d),this.ensureCheckNode(e),this.finalizeNode(e),this.loadOnDemand&&this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate(),this.disableTreeNodes(d),this.renderSubChild(e,s,o)}}},r.prototype.loadChild=function(e,s,n,o,r,a,d){if(this.currentLoadData=e,t.isNullOrUndefined(e)||0===e.length)t.detach(n),this.removeExpand(o,!0);else{if(this.updateListProp(s),this.fields.dataSource instanceof l.DataManager&&!this.fields.dataSource.dataSource.offline){var h=o.getAttribute("data-uid"),c=this.getNodeObject(h);t.setValue("child",e,c)}this.listBaseOption.ariaAttributes.level=parseFloat(o.getAttribute("aria-level"))+1,o.appendChild(i.ListBase.createList(this.createElement,e,this.listBaseOption)),this.expandNode(o,n,d),this.setSelectionForChildNodes(e),this.ensureCheckNode(o),this.finalizeNode(o),this.disableTreeNodes(e),this.renderSubChild(o,r,d)}a&&a(),0!==this.treeList.length||this.isLoaded||this.finalize()},r.prototype.disableTreeNodes=function(e){for(var t=0;t<e.length;){var i=e[t][this.fields.id].toString();void 0!==this.disableNode&&-1!==this.disableNode.indexOf(i)&&this.doDisableAction([i]),t++}},r.prototype.setSelectionForChildNodes=function(e){var t;for(t=0;t<e.length;t++){var i=e[t][this.fields.id].toString();void 0!==this.selectedNodes&&-1!==this.selectedNodes.indexOf(i)&&this.doSelectionAction()}},r.prototype.ensureCheckNode=function(e){this.showCheckBox&&(this.ele=this.checkedElement?this.checkedElement.indexOf(e.getAttribute("data-uid")):null,this.autoCheck&&(this.ensureChildCheckState(e),this.ensureParentCheckState(e))),this.currentLoadData=null},r.prototype.getFields=function(e,t,i){return t===i?e:this.getFields(this.getChildMapper(e),t,i+1)},r.prototype.getChildFields=function(e,t,i){return t===i?this.getChildMapper(e):this.getChildFields(this.getChildMapper(e),t,i+1)},r.prototype.getChildMapper=function(e){return"string"==typeof e.child||t.isNullOrUndefined(e.child)?e:e.child},r.prototype.getChildNodes=function(e,i,s){void 0===s&&(s=!1);var n;if(t.isNullOrUndefined(e))return n;if(1===this.dataType)return this.getChildGroup(this.groupedData,i,s);if("string"==typeof this.fields.child)for(var l=0,o=e.length;l<o;l++){var r=t.getValue(this.fields.id,e[l]);if(r&&r.toString()===i)return t.getValue(this.fields.child,e[l]);if(!t.isNullOrUndefined(t.getValue(this.fields.child,e[l]))&&void 0!==(n=this.getChildNodes(t.getValue(this.fields.child,e[l]),i)))break}return n},r.prototype.getChildGroup=function(e,i,s){if(!t.isNullOrUndefined(e))for(var n=0,l=e.length;n<l;n++){if(t.isNullOrUndefined(e[n][0])||t.isNullOrUndefined(t.getValue(this.fields.parentID,e[n][0])))return s?e[n]:[];if(t.getValue(this.fields.parentID,e[n][0]).toString()===i)return e[n]}},r.prototype.renderSubChild=function(e,i,s){if(i)for(var n=t.selectAll("."+Ut,e),l=0,o=n.length;l<o;l++){var r=n[l];if(e.querySelector(".e-icons")!==n[l]){var a=t.closest(r,"."+Bt);this.expandArgs=this.getExpandEvent(a,null),!0!==s&&this.trigger("nodeExpanding",this.expandArgs),this.renderChildNodes(a,i,null,s)}}},r.prototype.toggleSelect=function(e,t,i){e.classList.contains("e-disable")||(this.allowMultiSelection&&(t&&t.ctrlKey||i)&&this.isActive(e)?this.unselectNode(e,t):this.selectNode(e,t,i))},r.prototype.isActive=function(e){return!!e.classList.contains(qt)},r.prototype.selectNode=function(e,i,s){var n=this;if(t.isNullOrUndefined(e)||!this.allowMultiSelection&&this.isActive(e)&&!t.isNullOrUndefined(i))this.setFocusElement(e);else{var l;this.isLoaded?(l=this.getSelectEvent(e,"select",i),this.trigger("nodeSelecting",l,function(t){t.cancel||n.nodeSelectAction(e,i,t,s)})):this.nodeSelectAction(e,i,l,s)}},r.prototype.nodeSelectAction=function(e,i,s,n){if(this.allowMultiSelection&&(n||i&&(!i||i.ctrlKey))||this.removeSelectAll(),this.allowMultiSelection&&i&&i.shiftKey){this.startNode||(this.startNode=e);var l=this.liList.indexOf(this.startNode),o=this.liList.indexOf(e);if(l>o){var r=l;l=o,o=r}for(var a=l;a<=o;a++){var d=this.liList[a];t.isVisible(d)&&!d.classList.contains("e-disable")&&this.addSelect(d)}}else this.startNode=e,this.addSelect(e);this.setFocusElement(e),this.isLoaded&&(s.nodeData=this.getNodeData(e),this.trigger("nodeSelected",s))},r.prototype.unselectNode=function(e,t){var i,s=this;this.isLoaded?(i=this.getSelectEvent(e,"un-select",t),this.trigger("nodeSelecting",i,function(t){t.cancel||s.nodeUnselectAction(e,t)})):this.nodeUnselectAction(e,i)},r.prototype.nodeUnselectAction=function(e,t){this.removeSelect(e),this.setFocusElement(e),this.isLoaded&&(t.nodeData=this.getNodeData(e),this.trigger("nodeSelected",t))},r.prototype.setFocusElement=function(e){if(!t.isNullOrUndefined(e)){var i=this.getFocusedNode();i&&t.removeClass([i],li),t.addClass([e],li),this.updateIdAttr(i,e)}},r.prototype.addSelect=function(e){e.setAttribute("aria-selected","true"),t.addClass([e],qt);var i=e.getAttribute("data-uid");t.isNullOrUndefined(i)||-1!==this.selectedNodes.indexOf(i)||this.selectedNodes.push(i)},r.prototype.removeSelect=function(e){this.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),t.removeClass([e],qt);var i=this.selectedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.selectedNodes.splice(i,1)},r.prototype.removeSelectAll=function(){for(var e=this.element.querySelectorAll("."+qt),i=0,s=e;i<s.length;i++){var n=s[i];this.allowMultiSelection?n.setAttribute("aria-selected","false"):n.removeAttribute("aria-selected")}t.removeClass(e,qt),this.setProperties({selectedNodes:[]},!0)},r.prototype.getSelectEvent=function(e,i,s){var n=this.getNodeData(e);return{action:i,cancel:!1,isInteracted:!t.isNullOrUndefined(s),node:e,nodeData:n}},r.prototype.setExpandOnType=function(){this.expandOnType="Auto"===this.expandOn?t.Browser.isDevice?"Click":"DblClick":this.expandOn},r.prototype.expandHandler=function(e){var i=e.originalEvent.target;!i||i.classList.contains("e-input")||i.classList.contains(Mt)||i.classList.contains(jt)||i.classList.contains(Bt)||i.classList.contains(Wt)||this.showCheckBox&&t.closest(i,"."+si)||this.expandCollapseAction(t.closest(i,"."+Bt),e)},r.prototype.expandCollapseAction=function(e,i){var s=t.select("div."+Wt,e);if(s&&!s.classList.contains(zt)){var n=s.classList;n.contains(Ut)?this.expandAction(e,s,i):n.contains(Ht)&&this.collapseNode(e,s,i)}},r.prototype.expandAction=function(e,i,s,n,l){var o=this;i.classList.contains(zt)||(t.addClass([i],zt),this.isLoaded?(this.expandArgs=this.getExpandEvent(e,s),this.trigger("nodeExpanding",this.expandArgs,function(s){s.cancel?t.removeClass([i],zt):o.nodeExpandAction(e,i,n,l)})):this.nodeExpandAction(e,i,n,l))},r.prototype.nodeExpandAction=function(e,i,s,n){var l=t.select("."+jt,e);if(l&&"UL"===l.nodeName)this.expandNode(e,i);else{this.renderChildNodes(e,s,n);for(var o=t.selectAll("."+Bt,e),r=0;r<o.length;r++){var a=this.getId(o[r]);if(-1!==this.expandChildren.indexOf(a)&&void 0!==this.expandChildren){var d=t.select("."+Ut,t.select("."+_t,o[r]));t.isNullOrUndefined(d)||this.expandAction(o[r],d,null),this.expandChildren.splice(this.expandChildren.indexOf(a),1)}}}},r.prototype.keyActionHandler=function(e){var i=this,s=e.target,n=this.getFocusedNode();if(s&&s.classList.contains("e-input")){var l=s;"enter"===e.action?(l.blur(),this.element.focus(),t.addClass([n],Ft)):"escape"===e.action&&(l.value=this.oldText,l.blur(),this.element.focus(),t.addClass([n],Ft))}else{e.preventDefault();var o={cancel:!1,event:e,node:n};this.trigger("keyPress",o,function(s){if(!s.cancel)switch(e.action){case"space":i.showCheckBox&&i.checkNode(e);break;case"moveRight":i.openNode(!i.enableRtl,e);break;case"moveLeft":i.openNode(!!i.enableRtl,e);break;case"shiftDown":i.shiftKeySelect(!0,e);break;case"moveDown":case"ctrlDown":case"csDown":i.navigateNode(!0);break;case"shiftUp":i.shiftKeySelect(!1,e);break;case"moveUp":case"ctrlUp":case"csUp":i.navigateNode(!1);break;case"home":case"shiftHome":case"ctrlHome":case"csHome":i.navigateRootNode(!0);break;case"end":case"shiftEnd":case"ctrlEnd":case"csEnd":i.navigateRootNode(!1);break;case"enter":case"ctrlEnter":case"shiftEnter":case"csEnter":i.toggleSelect(n,e);break;case"f2":i.allowEditing&&!n.classList.contains("e-disable")&&i.createTextbox(n,e);break;case"ctrlA":if(i.allowMultiSelection){var l=t.selectAll("."+Bt+":not(."+qt+")",i.element);i.selectGivenNodes(l)}}})}},r.prototype.navigateToFocus=function(e){var i=this.getFocusedNode().querySelector("."+_t),s=i.getBoundingClientRect(),n=this.getScrollParent(this.element);if(!t.isNullOrUndefined(n)){var l=n.getBoundingClientRect();s.bottom>l.bottom?n.scrollTop+=s.bottom-l.bottom:s.top<l.top&&(n.scrollTop-=l.top-s.top)}this.isVisibleInViewport(i)||i.scrollIntoView(e)},r.prototype.isVisibleInViewport=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},r.prototype.getScrollParent=function(e){return t.isNullOrUndefined(e)?null:e.scrollHeight>e.clientHeight?e:this.getScrollParent(e.parentElement)},r.prototype.shiftKeySelect=function(e,t){if(this.allowMultiSelection){var i=this.getFocusedNode(),s=e?this.getNextNode(i):this.getPrevNode(i);this.removeHover(),this.setFocusElement(s),this.toggleSelect(s,t,!1),this.navigateToFocus(!e)}else this.navigateNode(e)},r.prototype.checkNode=function(e){var i=this.getFocusedNode(),s=t.select("."+si,i),n=t.select(" ."+ni,s).classList.contains(ti);i.classList.contains("e-disable")||0==i.getElementsByClassName("e-checkbox-disabled").length&&this.validateCheckNode(s,n,i,e)},r.prototype.validateCheckNode=function(e,i,s,n){var l=this,o=t.closest(e,"."+Bt);this.checkActionNodes=[];var r=i?"false":"true";t.isNullOrUndefined(r)||e.setAttribute("aria-checked",r);var a=this.getCheckEvent(o,i?"uncheck":"check",n);this.trigger("nodeChecking",a,function(t){t.cancel||l.nodeCheckingAction(e,i,s,t,n)})},r.prototype.nodeCheckingAction=function(e,i,s,n,l){if(-1===this.checkedElement.indexOf(s.getAttribute("data-uid"))){this.checkedElement.push(s.getAttribute("data-uid"));var o=this.getChildNodes(this.treeData,s.getAttribute("data-uid"));null!==o?this.allCheckNode(o,this.checkedElement,null,null,!1):o=null}if(this.changeState(e,i?"uncheck":"check",l,!0),this.autoCheck){this.ensureChildCheckState(s),this.ensureParentCheckState(t.closest(t.closest(s,"."+jt),"."+Bt));var r=void 0;"check"===n.action?r=!0:"uncheck"===n.action&&(r=!1),this.ensureStateChange(s,r)}this.nodeCheckedEvent(e,i,l)},r.prototype.ensureStateChange=function(e,i){var s=t.select("."+jt,e),n=e.getAttribute("data-uid"),o=this.fields;if(1===this.dataType&&this.autoCheck)for(var r=new l.DataManager(this.treeData).executeLocal((new l.Query).where(o.parentID,"equal",n,!0)),a=0;a<r.length;a++){var d=r[a][this.fields.id]?r[a][this.fields.id].toString():null,h=r[a][this.fields.isChecked]?r[a][this.fields.isChecked].toString():null;if(-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(d)){this.checkedNodes.push(d);var c=this.getChildNodes(this.treeData,d);this.getChildItems(c,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}else if(-1===this.checkedNodes.indexOf(n)&&null===s&&-1!==this.checkedNodes.indexOf(d)){if(this.checkedNodes.splice(this.checkedNodes.indexOf(d),1),"true"===h&&this.updateField(this.treeData,this.fields,d,"isChecked",null),-1===this.checkedNodes.indexOf(n)&&null===s||-1!==this.parentNodeCheck.indexOf(d)){var p=this.getChildNodes(this.treeData,d);this.getChildItems(p,i),-1!==this.parentNodeCheck.indexOf(d)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(d),1)}}else{c=this.getChildNodes(this.treeData,d);this.getChildItems(c,i)}}else if(1!==this.dataType||this.autoCheck){(c=this.getChildNodes(this.treeData,n))&&this.childStateChange(c,n,s,i)}else if(i)for(a=0;a<this.treeData.length;a++){var u=this.treeData[a][this.fields.id]?this.treeData[a][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(u)&&this.checkedNodes.push(u)}else{for(var f=new l.DataManager(this.treeData).executeLocal((new l.Query).where(o.isChecked,"equal",!0,!1)),a=0;a<f.length;a++){var m=f[a][this.fields.id]?f[a][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(m)&&this.checkedNodes.splice(this.checkedNodes.indexOf(m),1),this.updateField(this.treeData,this.fields,m,"isChecked",null)}this.checkedNodes=[]}},r.prototype.getChildItems=function(e,t){for(var i=0;i<e.length;i++){var s=e[i][this.fields.id]?e[i][this.fields.id].toString():null,n=e[i][this.fields.isChecked]?e[i][this.fields.isChecked].toString():null;-1===this.checkedNodes.indexOf(s)||t||this.checkedNodes.splice(this.checkedNodes.indexOf(s),1),-1===this.checkedNodes.indexOf(s)&&t&&this.checkedNodes.push(s),"true"!==n||t||this.updateField(this.treeData,this.fields,s,"isChecked",null);var l=this.getChildNodes(this.treeData,s);l.length>0&&this.getChildItems(l,t)}},r.prototype.childStateChange=function(e,t,i,s){for(var n=0;n<e.length;n++){var l=e[n][this.fields.id]?e[n][this.fields.id].toString():"",o=e[n][this.fields.isChecked]?e[n][this.fields.isChecked].toString():null;this.autoCheck?-1!==this.checkedNodes.indexOf(t)&&-1===this.checkedNodes.indexOf(l)?(this.checkedNodes.push(l),-1!==this.parentNodeCheck.indexOf(l)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(l),1)):-1!==this.checkedNodes.indexOf(t)||null!==i||s||(this.checkedNodes.splice(this.checkedNodes.indexOf(l),1),"true"===o&&this.updateField(this.treeData,this.fields,l,"isChecked",null)):this.autoCheck||(s?-1===this.checkedNodes.indexOf(l)&&this.checkedNodes.push(l):(-1!==this.checkedNodes.indexOf(l)&&this.checkedNodes.splice(this.checkedNodes.indexOf(l),1),this.updateField(this.treeData,this.fields,l,"isChecked",null),this.checkedNodes=[]));var r=this.getChildNodes(this.treeData,l);r&&this.childStateChange(r,t,i,s)}},r.prototype.allCheckNode=function(e,i,s,n,l){if(e)for(var o=0;o<e.length;o++){var r=t.getValue(this.fields.id,e[o]),a=this.element.querySelector('[data-uid="'+r+'"]');if(!1!==l&&-1===this.checkedElement.indexOf(r.toString())&&(null===a&&!t.isNullOrUndefined(e[o][this.fields.isChecked])&&-1===i.indexOf(r.toString())||0===n||2===s)&&(!1!==e[o][this.fields.isChecked]||2===s?i.push(r.toString()):n=null,n=!1!==e[o][this.fields.isChecked]||2===s?0:null),-1===i.indexOf(r.toString())&&t.isNullOrUndefined(s)&&i.push(r.toString()),!0===t.getValue(this.fields.hasChildren,e[o])||t.getValue(this.fields.child.toString(),e[o])){var d=t.getValue(this.fields.id,e[o]),h=this.getChildNodes(this.treeData,d.toString());h&&(t.isNullOrUndefined(l)?this.allCheckNode(h,i,s,n):this.allCheckNode(h,i,s,n,l),n=null)}n=null}},r.prototype.openNode=function(e,i){var s=this.getFocusedNode(),n=t.select("div."+Wt,s);if(e){if(!n)return;n.classList.contains(Ut)?this.expandAction(s,n,i):this.focusNextNode(s,!0)}else if(n&&n.classList.contains(Ht))this.collapseNode(s,n,i);else{var l=t.closest(t.closest(s,"."+jt),"."+Bt);if(!l)return;l.classList.contains("e-disable")||(this.setFocus(s,l),this.navigateToFocus(!0))}},r.prototype.navigateNode=function(e){var t=this.getFocusedNode();this.focusNextNode(t,e)},r.prototype.navigateRootNode=function(e){var t=this.getFocusedNode(),i=e?this.getRootNode():this.getEndNode();i.classList.contains("e-disable")||(this.setFocus(t,i),this.navigateToFocus(e))},r.prototype.getFocusedNode=function(){var e,i=t.select("."+Bt+"."+li,this.element);return t.isNullOrUndefined(i)&&(e=t.select("."+Bt,this.element)),t.isNullOrUndefined(i)?t.isNullOrUndefined(e)?this.element.firstElementChild:e:i},r.prototype.focusNextNode=function(e,t){var i=t?this.getNextNode(e):this.getPrevNode(e);if(this.setFocus(e,i),this.navigateToFocus(!t),i.classList.contains("e-disable")){var s=i.lastChild;null==i.previousSibling&&i.classList.contains("e-level-1")?this.focusNextNode(i,!0):null==i.nextSibling&&i.classList.contains("e-node-collapsed")?this.focusNextNode(i,!1):null==i.nextSibling&&s.classList.contains("e-text-content")?this.focusNextNode(i,!1):this.focusNextNode(i,t)}},r.prototype.getNextNode=function(e){var i,s=this.liList.indexOf(e);do{if(s++,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},r.prototype.getPrevNode=function(e){var i,s=this.liList.indexOf(e);do{if(s--,i=this.liList[s],t.isNullOrUndefined(i))return e}while(!t.isVisible(i));return i},r.prototype.getRootNode=function(){var e,i=0;do{e=this.liList[i],i++}while(!t.isVisible(e));return e},r.prototype.getEndNode=function(){var e,i=this.liList.length-1;do{e=this.liList[i],i--}while(!t.isVisible(e));return e},r.prototype.setFocus=function(e,i){t.removeClass([e],[Ft,li]),i.classList.contains("e-disable")||(t.addClass([i],[Ft,li]),this.updateIdAttr(e,i))},r.prototype.updateIdAttr=function(e,t){this.element.removeAttribute("aria-activedescendant"),e&&e.removeAttribute("id"),t.setAttribute("id",this.element.id+"_active"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active")},r.prototype.focusIn=function(){this.mouseDownStatus||t.addClass([this.getFocusedNode()],Ft),this.mouseDownStatus=!1},r.prototype.focusOut=function(){t.removeClass([this.getFocusedNode()],Ft)},r.prototype.onMouseOver=function(e){var i=e.target,s=i.classList,n=t.closest(i,"."+Bt);!n||s.contains(jt)||s.contains(Bt)?this.removeHover():n&&!n.classList.contains("e-disable")&&this.setHover(n)},r.prototype.setHover=function(e){e.classList.contains(Ft)||(this.removeHover(),t.addClass([e],Ft))},r.prototype.onMouseLeave=function(e){this.removeHover()},r.prototype.removeHover=function(){var e=t.selectAll("."+Ft,this.element);e&&e.length&&t.removeClass(e,Ft)},r.prototype.getNodeData=function(e,i){if(!t.isNullOrUndefined(e)&&e.classList.contains(Bt)&&!t.isNullOrUndefined(t.closest(e,".e-control"))&&t.closest(e,".e-control").classList.contains(Mt)){var s=e.getAttribute("data-uid"),n=this.getText(e,i),l=t.closest(e.parentNode,"."+Bt),o=l?l.getAttribute("data-uid"):null,r=e.classList.contains(qt),a="true"===e.getAttribute("aria-expanded"),d=null!==e.getAttribute("aria-expanded"),h=null;return this.showCheckBox&&(h=t.select("."+si,e).getAttribute("aria-checked")),{id:s,text:n,parentID:o,selected:r,expanded:a,isChecked:h,hasChildren:d}}return{id:"",text:"",parentID:"",selected:!1,expanded:!1,isChecked:"",hasChildren:!1}},r.prototype.getText=function(e,i){if(i){var s=this.getNodeObject(e.getAttribute("data-uid")),n=parseFloat(e.getAttribute("aria-level")),l=this.getFields(this.fields,n,1);return t.getValue(l.text,s)}return t.select("."+Rt,e).textContent},r.prototype.getExpandEvent=function(e,i){var s=this.getNodeData(e);return{cancel:!1,isInteracted:!t.isNullOrUndefined(i),node:e,nodeData:s,event:i}},r.prototype.destroyTemplate=function(e){this.clearTemplate(["nodeTemplate"])},r.prototype.reRenderNodes=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.isBlazorPlatform&&this.element.firstElementChild?this.element.removeChild(this.element.firstElementChild):this.element.innerHTML="",t.isNullOrUndefined(this.nodeTemplateFn)||this.destroyTemplate(this.nodeTemplate),this.setTouchClass(),this.setProperties({selectedNodes:[],checkedNodes:[],expandedNodes:[]},!0),this.checkedElement=[],this.isLoaded=!1,this.setDataBinding()},r.prototype.setCssClass=function(e,i){t.isNullOrUndefined(e)||""===e||t.removeClass([this.element],e.split(" ")),t.isNullOrUndefined(i)||""===i||t.addClass([this.element],i.split(" "))},r.prototype.editingHandler=function(e){var i=e.target;if(!(!i||i.classList.contains(Mt)||i.classList.contains(jt)||i.classList.contains(Bt)||i.classList.contains(Wt)||i.classList.contains("e-input")||i.classList.contains("e-input-group"))){var s=t.closest(i,"."+Bt);this.createTextbox(s,e)}},r.prototype.createTextbox=function(e,i){var s=this,n=t.select("."+Kt,this.element);n&&n.blur();var l=t.select("."+Rt,e);this.updateOldText(e);var r=this.createElement("input",{className:Kt,attrs:{value:this.oldText}}),a=this.getEditEvent(e,null,r.outerHTML);this.trigger("nodeEditing",a,function(i){if(!i.cancel){var n="width:"+(l.offsetWidth+5)+"px";t.addClass([e],"e-editing"),l.innerHTML=a.innerHtml;var r=t.select("."+Kt,l);s.inputObj=o.Input.createInput({element:r,properties:{enableRtl:s.enableRtl}},s.createElement),s.inputObj.container.setAttribute("style",n),r.focus();var d=r;d.setSelectionRange(0,d.value.length),s.wireInputEvents(r)}})},r.prototype.updateOldText=function(e){var i=e.getAttribute("data-uid");this.editData=this.getNodeObject(i);var s=parseFloat(e.getAttribute("aria-level"));this.editFields=this.getFields(this.fields,s,1),this.oldText=t.getValue(this.editFields.text,this.editData)},r.prototype.inputFocusOut=function(e){if(t.select("."+Kt,this.element)){var i=e.target,s=i.value,n=t.closest(i,"."+Rt),l=t.closest(i,"."+Bt);t.detach(this.inputObj.container),this.appendNewText(l,n,s,!0)}},r.prototype.appendNewText=function(e,i,s,n){var l=this,o=this.getEditEvent(e,s,null);this.trigger("nodeEdited",o,function(o){s=o.cancel?o.oldText:o.newText;var r=t.setValue(l.editFields.text,s,l.editData);if(t.isNullOrUndefined(l.nodeTemplateFn))i.innerText=s;else{i.innerText="";var a=l.nodeTemplateFn(r,void 0,void 0,l.element.id+"nodeTemplate",l.isStringTemplate);a=Array.prototype.slice.call(a),t.append(a,i),l.updateBlazorTemplate()}n&&(t.removeClass([e],"e-editing"),i.focus()),o.oldText!==s&&l.triggerEvent()})},r.prototype.getElement=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?this.element.querySelector('[data-uid="'+e+'"]'):"object"==typeof e?t.getElement(e):null},r.prototype.getId=function(e){return t.isNullOrUndefined(e)?null:"string"==typeof e?e:"object"==typeof e?t.getElement(e).getAttribute("data-uid"):null},r.prototype.getEditEvent=function(e,t,i){return{cancel:!1,newText:t,node:e,nodeData:this.getNodeData(e),oldText:this.oldText,innerHtml:i}},r.prototype.getNodeObject=function(e){if(!t.isNullOrUndefined(e)){if(1!==this.dataType)return this.getChildNodeObject(this.treeData,this.fields,e);for(var i=0,s=this.treeData.length;i<s;i++){var n=t.getValue(this.fields.id,this.treeData[i]);if(!t.isNullOrUndefined(this.treeData[i])&&!t.isNullOrUndefined(n)&&n.toString()===e)return this.treeData[i]}}},r.prototype.getChildNodeObject=function(e,i,s){var n;if(t.isNullOrUndefined(e))return n;for(var o=0,r=e.length;o<r;o++){var a=t.getValue(i.id,e[o]);if(e[o]&&a&&a.toString()===s)return e[o];if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[o]))){if(this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[o]))){if(void 0!==(n=this.getChildNodeObject(t.getValue("child",e[o]),this.getChildMapper(i),s)))break}}else{var d=t.getValue(i.child,e[o]);if(void 0!==(n=this.getChildNodeObject(d,this.getChildMapper(i),s)))break}}return n},r.prototype.setDragAndDrop=function(e){e?this.initializeDrag():this.destroyDrag()},r.prototype.initializeDrag=function(){var e,i=this,s=this;this.dragObj=new t.Draggable(this.element,{enableTailMode:!0,enableAutoScroll:!0,dragTarget:"."+_t,helper:function(n){i.dragTarget=n.sender.target;var l=t.closest(i.dragTarget,"."+Mt),o=t.closest(i.dragTarget,"."+_t);if(i.dragLi=t.closest(i.dragTarget,"."+Bt),i.fullRowSelect&&!o&&i.dragTarget.classList.contains(Jt)&&(o=i.dragTarget.nextElementSibling),!i.dragTarget||!n.element.isSameNode(l)||!o||i.dragTarget.classList.contains(Mt)||i.dragTarget.classList.contains(jt)||i.dragTarget.classList.contains(Bt)||i.dragLi.classList.contains("e-disable"))return!1;var r=o.cloneNode(!0);if(t.isNullOrUndefined(t.select("div."+Wt,r))){var a=s.createElement("div",{className:Wt+" "+Ut});r.insertBefore(a,r.children[0])}var d="e-drag-item "+Mt+" "+i.cssClass+" "+(i.enableRtl?"e-rtl":"");(e=s.createElement("div",{className:d})).appendChild(r);var h=i.selectedNodes.length;if(h>1&&i.allowMultiSelection&&i.dragLi.classList.contains(qt)){var c=s.createElement("span",{className:"e-drop-count",innerHTML:""+h});e.appendChild(c)}return document.body.appendChild(e),document.body.style.cursor="",i.dragData=i.getNodeData(i.dragLi),e},dragStart:function(s){t.addClass([i.element],Yt);var n,l=t.closest(s.target,".e-list-item");l&&(n=parseInt(l.getAttribute("aria-level"),10));var o=i.getDragEvent(s.event,i,null,s.target,null,e,n);o.draggedNode.classList.contains("e-editing")?(i.dragObj.intDestroy(s.event),i.dragCancelAction(e)):i.trigger("nodeDragStart",o,function(n){n.cancel?(i.dragObj.intDestroy(s.event),i.dragCancelAction(e)):i.dragStartAction=!0,t.isBlazor()&&s.bindEvents(t.getElement(s.dragElement))})},drag:function(s){i.dragObj.setProperties({cursorAt:{top:!t.isNullOrUndefined(s.event.targetTouches)||t.Browser.isDevice?60:-20}}),i.dragAction(s,e)},dragStop:function(e){t.removeClass([i.element],Yt),i.removeVirtualEle();var s=e.target,n=t.closest(s,".e-droppable");s&&n||(t.detach(e.helper),document.body.style.cursor="");var l,o=t.closest(s,".e-list-item");o&&(l=parseInt(o.getAttribute("aria-level"),10));var r=i.getDragEvent(e.event,i,s,s,null,e.helper,l);r.preventTargetExpand=!1,(i.isBlazorPlatform&&i.dragStartAction||!i.isBlazorPlatform)&&i.trigger("nodeDragStop",r,function(s){i.dragParent=s.draggedParentNode,i.preventExpand=s.preventTargetExpand,s.cancel&&(e.helper.parentNode&&t.detach(e.helper),document.body.style.cursor=""),i.dragStartAction=!1})}}),this.dropObj=new t.Droppable(this.element,{out:function(e){t.isNullOrUndefined(e)||e.target.classList.contains(Gt)||(document.body.style.cursor="not-allowed")},over:function(e){document.body.style.cursor=""},drop:function(e){i.dropAction(e)}})},r.prototype.dragCancelAction=function(e){t.detach(e),t.removeClass([this.element],Yt),this.dragStartAction=!1},r.prototype.dragAction=function(e,i){var s=t.closest(e.target,".e-droppable"),n=t.closest(e.target,"."+_t),l=t.select("div."+Wt,i);t.removeClass([l],["e-drop-in",Xt,Qt,"e-no-drop"]),this.removeVirtualEle(),document.body.style.cursor="";var o=e.target.classList;if(this.fullRowSelect&&!n&&!t.isNullOrUndefined(o)&&o.contains(Jt)&&(n=e.target.nextElementSibling),s){var r=t.closest(e.target,"."+Bt),a=t.closest(e.target,"."+si),d=t.closest(e.target,"."+Ht),h=t.closest(e.target,"."+Ut);if(!s.classList.contains(Mt)||n&&!r.isSameNode(this.dragLi)&&!this.isDescendant(this.dragLi,r))if(r&&e&&!h&&!d&&e.event.offsetY<7&&!a||h&&e.event.offsetY<5||d&&e.event.offsetX<3){t.addClass([l],Xt);var c=this.createElement("div",{className:Gt}),p=this.fullRowSelect?1:0;r.insertBefore(c,r.children[p])}else if(r&&e&&!h&&!d&&e.target.offsetHeight>0&&e.event.offsetY>e.target.offsetHeight-10&&!a||h&&e.event.offsetY>19||d&&e.event.offsetX>19){t.addClass([l],Xt);c=this.createElement("div",{className:Gt}),p=this.fullRowSelect?2:1;r.insertBefore(c,r.children[p])}else t.addClass([l],"e-drop-in");else"LI"!==e.target.nodeName||r.isSameNode(this.dragLi)||this.isDescendant(this.dragLi,r)?e.target.classList.contains(Gt)?t.addClass([l],Xt):t.addClass([l],Qt):(t.addClass([l],Xt),this.renderVirtualEle(e))}else t.addClass([l],"e-no-drop"),document.body.style.cursor="not-allowed";var u,f=t.closest(e.target,".e-list-item");f&&(u=parseInt(f.getAttribute("aria-level"),10));var m=this.getDragEvent(e.event,this,e.target,e.target,null,i,u);m.dropIndicator&&t.removeClass([l],m.dropIndicator),this.trigger("nodeDragging",m),m.dropIndicator&&t.addClass([l],m.dropIndicator)},r.prototype.dropAction=function(e){for(var i,s,n=e.event.offsetY,o=e.target,r=!1,d=e.dragData.draggable,h=0;h<d.ej2_instances.length;h++)if(d.ej2_instances[h]instanceof a){i=d.ej2_instances[h];break}if(i&&i.dragTarget){var c=i.dragTarget,p=t.closest(c,"."+Bt),u=t.closest(o,"."+Bt);if(null==u&&o.classList.contains(Mt)&&(u=o.firstElementChild),t.detach(e.droppedElement),document.body.style.cursor="",!u||u.isSameNode(p)||this.isDescendant(p,u))return void(this.fields.dataSource instanceof l.DataManager==!1&&(this.preventExpand=!1));if(i.allowMultiSelection&&p.classList.contains(qt)){var f=t.selectAll("."+qt,i.element);if(e.target.offsetHeight<=33&&n>e.target.offsetHeight-10&&n>6)for(h=f.length-1;h>=0;h--)u.isSameNode(f[h])||this.isDescendant(f[h],u)||this.appendNode(o,f[h],u,e,i,n);else for(h=0;h<f.length;h++)u.isSameNode(f[h])||this.isDescendant(f[h],u)||this.appendNode(o,f[h],u,e,i,n)}else this.appendNode(o,p,u,e,i,n);s=parseInt(p.getAttribute("aria-level"),10),r=!0}this.fields.dataSource instanceof l.DataManager==!1&&(this.preventExpand=!1),this.trigger("nodeDropped",this.getDragEvent(e.event,i,o,e.target,e.dragData.draggedElement,null,s,r)),this.triggerEvent()},r.prototype.appendNode=function(e,i,s,n,l,o){var r=t.closest(e,"."+si),a=t.closest(n.target,"."+Ht),d=t.closest(n.target,"."+Ut);i.classList.contains("e-disable")||r||!(d&&n.event.offsetY<5||a&&n.event.offsetX<3||d&&n.event.offsetY>19||a&&n.event.offsetX>19||!d&&!a)?this.dropAsChildNode(i,s,l,null,n,o,!0):"LI"===e.nodeName?this.dropAsSiblingNode(i,s,n,l):e.firstElementChild&&e.classList.contains(Mt)?"UL"===e.firstElementChild.nodeName&&this.dropAsSiblingNode(i,s,n,l):e.classList.contains("e-icon-collapsible")||e.classList.contains("e-icon-expandable")?this.dropAsSiblingNode(i,s,n,l):this.dropAsChildNode(i,s,l,null,n,o)},r.prototype.dropAsSiblingNode=function(e,i,s,n){var l,o=t.closest(i,"."+jt),r=t.closest(e,"."+jt),a=t.closest(r,"."+Bt);if(s.target.offsetHeight>0&&s.event.offsetY>s.target.offsetHeight-2?l=!1:s.event.offsetY<2?l=!0:(s.target.classList.contains("e-icon-expandable")||s.target.classList.contains("e-icon-collapsible"))&&(s.event.offsetY<5||s.event.offsetX<3?l=!0:(s.event.offsetY>15||s.event.offsetX>17)&&(l=!1)),s.target.classList.contains("e-icon-expandable")||s.target.classList.contains("e-icon-collapsible")){var d=s.target.closest("li");o.insertBefore(e,l?d:d.nextElementSibling)}else o.insertBefore(e,l?s.target:s.target.nextElementSibling);this.moveData(e,i,o,l,n),this.updateElement(r,a),this.updateAriaLevel(e),n.element.id===this.element.id?this.updateList():(n.updateInstance(),this.updateInstance())},r.prototype.dropAsChildNode=function(e,i,s,n,l,o,r){var a=t.closest(e,"."+jt),d=t.closest(a,"."+Bt),h=t.closest(i,"."+jt);if(l&&o<7&&!r)h.insertBefore(e,i),this.moveData(e,i,h,!0,s);else if(l&&l.target.offsetHeight>0&&o>l.target.offsetHeight-10&&!r)h.insertBefore(e,i.nextElementSibling),this.moveData(e,i,h,!1,s);else{var c=this.expandParent(i),p=c.childNodes[n];c.insertBefore(e,p),this.moveData(e,p,c,!0,s)}this.updateElement(a,d),this.updateAriaLevel(e),s.element.id===this.element.id?this.updateList():(s.updateInstance(),this.updateInstance())},r.prototype.moveData=function(e,i,s,n,l){var o=t.closest(s,"."+Bt),r=this.getId(e),a=l.updateChildField(l.treeData,l.fields,r,null,null,!0),d=this.getId(i),h=this.getDataPos(this.treeData,this.fields,d),c=this.getId(o);if(1===this.dataType){this.updateField(this.treeData,this.fields,c,"hasChildren",!0);var p=t.isNullOrUndefined(h)?this.treeData.length:n?h:h+1;if(t.isNullOrUndefined(c)&&!this.hasPid)delete a[0][this.fields.parentID];else{var u=this.isNumberTypeId?parseFloat(c):c;t.setValue(this.fields.parentID,u,a[0])}if(this.treeData.splice(p,0,a[0]),l.element.id!==this.element.id){var f=l.removeChildNodes(r);p++;for(var m=0,g=f.length;m<g;m++)this.treeData.splice(p,0,f[m]),p++;l.groupedData=l.getGroupedData(l.treeData,l.fields.parentID)}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.addChildData(this.treeData,this.fields,c,a,n?h:h+1)},r.prototype.expandParent=function(e){var s=t.select("div."+Wt,e);s&&s.classList.contains(Ut)&&!0!==this.preventExpand&&this.expandAction(e,s,null);var n=t.select("."+jt,e);if(!0===this.preventExpand&&!n&&s&&this.renderChildNodes(e),n=t.select("."+jt,e),t.isNullOrUndefined(n)||!0!==this.preventExpand||(n.style.display="none"),t.isNullOrUndefined(n)||!1!==this.preventExpand||(n.style.display="block"),t.isNullOrUndefined(n)&&!0===this.preventExpand){t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,Ut,this.listBaseOption);(l=t.select("div."+Wt,e))&&l.classList.add("e-icon-expandable"),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),l?t.removeClass([l],Ht):i.ListBase.generateIcon(this.createElement,e,Ut,this.listBaseOption),e.setAttribute("aria-expanded","false"),n.style.display="none"}if(t.isNullOrUndefined(n)){this.trigger("nodeExpanding",this.getExpandEvent(e,null)),t.isNullOrUndefined(s)&&i.ListBase.generateIcon(this.createElement,e,Ht,this.listBaseOption);var l;(l=t.select("div."+Wt,e))?t.removeClass([l],Ut):(i.ListBase.generateIcon(this.createElement,e,Ht,this.listBaseOption),l=t.select("div."+Wt,e),t.removeClass([l],Ut)),n=i.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),this.addExpand(e),this.trigger("nodeExpanded",this.getExpandEvent(e,null))}return n},r.prototype.updateElement=function(e,i){if(i&&0===e.childElementCount){var s=t.select("div."+Wt,i);t.detach(e),t.detach(s);var n=this.getId(i);this.updateField(this.treeData,this.fields,n,"hasChildren",!1),this.removeExpand(i,!0)}},r.prototype.updateAriaLevel=function(e){var i=this.parents(e,"."+jt).length;e.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+jt,e),i+1)},r.prototype.updateChildAriaLevel=function(e,i){if(!t.isNullOrUndefined(e))for(var s=e.childNodes,n=0,l=s.length;n<l;n++){var o=s[n];o.setAttribute("aria-level",""+i),this.updateChildAriaLevel(t.select("."+jt,o),i+1)}},r.prototype.renderVirtualEle=function(e){var t;e.event.offsetY>e.target.offsetHeight-2?t=!1:e.event.offsetY<2&&(t=!0);var i=this.createElement("div",{className:Gt}),s=this.fullRowSelect?t?1:2:t?0:1;e.target.insertBefore(i,e.target.children[s])},r.prototype.removeVirtualEle=function(){var e=t.select("."+Gt);e&&t.detach(e)},r.prototype.destroyDrag=function(){this.dragObj&&this.dropObj&&(this.dragObj.destroy(),this.dropObj.destroy())},r.prototype.getDragEvent=function(e,i,s,n,o,r,a,d){var h=s?t.closest(s,"."+Bt):null,c=h?this.getNodeData(h):null,p=i?i.dragLi:o,u=i?i.dragData:null,f=s?this.parents(s,"."+Bt):null,m=i.dragLi.parentElement,g=i.dragLi?t.closest(m,"."+Bt):null,v=null,y=null,b=[Xt,"e-drop-in",Qt,"e-no-drop"],C=null,N=!0===d?p:h,E=N?t.closest(N,".e-list-parent"):null,x=0;if(g=i.dragLi&&null===g?t.closest(m,"."+Mt):g,g=!0===d?this.dragParent:g,r)for(;x<4;){if(t.select("."+Wt,r).classList.contains(b[x])){C=b[x];break}x++}if(E){var O=0;for(x=0;x<E.childElementCount;x++){if(O=!0!==d&&E.children[x]===p&&h!==p?++O:O,!0!==d&&E.children[x].classList.contains("e-hover")){y=e.offsetY>=23?x+1:x;break}if(E.children[x]===N){e.offsetY,y=x;break}}y=0!==O?--y:y}if(s&&(v=0===f.length?null:s.classList.contains(Bt)?f[0]:f[1]),h===p&&(v=h),s&&n.offsetHeight<=33&&e.offsetY<n.offsetHeight-10&&e.offsetY>6&&(v=h,!0!==d)){a=++a;var k=v?t.select(".e-list-parent",v):null;if(y=k?k.children.length:0,!(this.fields.dataSource instanceof l.DataManager)&&null===k&&v){var S=v.hasAttribute("data-uid")?this.getChildNodes(this.fields.dataSource,v.getAttribute("data-uid").toString()):null;y=S?S.length:0}}return{cancel:!1,clonedNode:r,event:e,draggedNode:p,draggedNodeData:u,droppedNode:h,droppedNodeData:c,dropIndex:y,dropLevel:a,draggedParentNode:g,dropTarget:v,dropIndicator:C,target:n}},r.prototype.addFullRow=function(e){var i=this.liList.length;if(e)for(var s=0;s<i;s++)this.createFullRow(this.liList[s]);else for(s=0;s<i;s++){var n=t.select("."+Jt,this.liList[s]);t.detach(n)}},r.prototype.createFullRow=function(e){var t=this.createElement("div",{className:Jt});e.insertBefore(t,e.childNodes[0])},r.prototype.addMultiSelect=function(e){if(e)for(var i=0,s=t.selectAll("."+Bt+':not([aria-selected="true"])',this.element);i<s.length;i++){s[i].setAttribute("aria-selected","false")}else for(var n=0,l=t.selectAll("."+Bt+'[aria-selected="false"]',this.element);n<l.length;n++){l[n].removeAttribute("aria-selected")}},r.prototype.collapseByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),l=0,o=n.length;l<o;l++){var r=n[l],a=t.select("."+Ht,t.select("."+_t,r));t.isNullOrUndefined(a)||this.collapseNode(r,a,null),this.collapseByLevel(t.select("."+jt,r),i-1,s)}},r.prototype.collapseAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+Ht,this.element)),s=0,n=i.length;s<n;s++){var l=i[s],o=t.closest(l,"."+Bt);this.collapseNode(o,l,null)}},r.prototype.expandByLevel=function(e,i,s){if(i>0&&!t.isNullOrUndefined(e))for(var n=this.getVisibleNodes(s,e.childNodes),l=0,o=n.length;l<o;l++){var r=n[l],a=t.select("."+Ut,t.select("."+_t,r));t.isNullOrUndefined(a)||this.expandAction(r,a,null),this.expandByLevel(t.select("."+jt,r),i-1,s)}},r.prototype.expandAllNodes=function(e){for(var i=this.getVisibleNodes(e,t.selectAll("."+Ut,this.element)),s=0,n=i.length;s<n;s++){var l=i[s],o=t.closest(l,"."+Bt);this.expandAction(o,l,null,!0)}},r.prototype.getVisibleNodes=function(e,i){var s=Array.prototype.slice.call(i);if(e)for(var n=0;n<s.length;n++)t.isVisible(s[n])||(s.splice(n,1),n--);return s},r.prototype.removeNode=function(e){var i=t.closest(e,"."+jt),s=t.closest(i,"."+Bt);t.detach(e),this.updateElement(i,s),this.updateInstance(),this.removeData(e)},r.prototype.updateInstance=function(){this.updateList(),this.updateSelectedNodes(),this.updateExpandedNodes()},r.prototype.updateList=function(){this.liList=Array.prototype.slice.call(t.selectAll("."+Bt,this.element))},r.prototype.updateSelectedNodes=function(){this.setProperties({selectedNodes:[]},!0);var e=t.selectAll("."+qt,this.element);this.selectGivenNodes(e)},r.prototype.updateExpandedNodes=function(){this.setProperties({expandedNodes:[]},!0);for(var e=t.selectAll('[aria-expanded="true"]',this.element),i=0,s=e.length;i<s;i++)this.addExpand(e[i])},r.prototype.removeData=function(e){if(1===this.dataType){var t=new l.DataManager(this.treeData),i=this.getId(e),s={},n=this.isNumberTypeId?parseFloat(i):i;s[this.fields.id]=n,t.remove(this.fields.id,s),this.removeChildNodes(i)}else{i=this.getId(e);this.updateChildField(this.treeData,this.fields,i,null,null,!0)}},r.prototype.removeChildNodes=function(e){var i=this.getChildGroup(this.groupedData,e,!1),s=[];if(i)for(var n=0,o=i.length;n<o;n++){var r=new l.DataManager(this.treeData),a=t.getValue(this.fields.id,i[n]).toString(),d={},h=this.isNumberTypeId?parseFloat(a):a;d[this.fields.id]=h;var c=r.remove(this.fields.id,d);s.push(c[0]),this.removeChildNodes(a)}return s},r.prototype.doGivenAction=function(e,i,s){for(var n=0,l=e.length;n<l;n++){var o=this.getElement(e[n]);if(!t.isNullOrUndefined(o)){var r=t.select("."+i,t.select("."+_t,o));t.isNullOrUndefined(r)||(s?this.expandAction(o,r,null):this.collapseNode(o,r,null))}}},r.prototype.addGivenNodes=function(e,s,n,l,o){if(0!==e.length){var r=this.getSortedData(e),a=s?parseFloat(s.getAttribute("aria-level"))+1:1;l&&this.updateMapper(a);for(var d,h=i.ListBase.createListItemFromJson(this.createElement,r,this.listBaseOption,a),c=(d=o||(s?this.expandParent(s):t.select("."+jt,this.element))).childNodes[n],p=0;p<h.length;p++)d.insertBefore(h[p],c);var u=this.getId(s);if(1===this.dataType){this.updateField(this.treeData,this.fields,u,"hasChildren",!0);for(var f=this.getId(c),m=t.isNullOrUndefined(f)?this.treeData.length:this.getDataPos(this.treeData,this.fields,f),g=0;g<e.length;g++){if(!t.isNullOrUndefined(u)){var v=this.isNumberTypeId?parseFloat(u):u;t.setValue(this.fields.parentID,v,e[g])}this.treeData.splice(m,0,e[g]),m++}}else this.addChildData(this.treeData,this.fields,u,e,n);this.finalizeNode(d)}},r.prototype.updateMapper=function(e){var t=1===e?this.fields:this.getChildFields(this.fields,e-1,1);this.updateListProp(t)},r.prototype.updateListProp=function(e){var t=this.getActualProperties(e);this.listBaseOption.fields=t,this.listBaseOption.fields.url=t.hasOwnProperty("navigateUrl")?t.navigateUrl:"navigateUrl"},r.prototype.getDataPos=function(e,i,s){for(var n=null,o=0,r=e.length;o<r;o++){var a=t.getValue(i.id,e[o]);if(e[o]&&a&&a.toString()===s)return o;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[o]))){if(this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[o]))){var d=t.getValue("child",e[o]);if(null!==(n=this.getDataPos(d,this.getChildMapper(i),s)))break}}else{var h=t.getValue(i.child,e[o]);if(null!==(n=this.getDataPos(h,this.getChildMapper(i),s)))break}}return n},r.prototype.addChildData=function(e,i,s,n,o){var r;if(t.isNullOrUndefined(s)){o=t.isNullOrUndefined(o)?e.length:o;for(var a=0,d=n.length;a<d;a++)e.splice(o,0,n[a]),o++;return r}for(var h=0,c=e.length;h<c;h++){var p=t.getValue(i.id,e[h]);if(e[h]&&p&&p.toString()===s){if("string"==typeof i.child&&e[h].hasOwnProperty(i.child)||this.fields.dataSource instanceof l.DataManager&&e[h].hasOwnProperty("child")){var u="string"==typeof i.child?i.child:"child",f=t.getValue(u,e[h]);o=t.isNullOrUndefined(o)?f.length:o;for(a=0,d=n.length;a<d;a++)f.splice(o,0,n[a]),o++}else{u="string"==typeof i.child?i.child:"child";e[h][u]=n}return!0}if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[h]))){if(this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[h]))){f=t.getValue("child",e[h]);if(void 0!==(r=this.addChildData(f,this.getChildMapper(i),s,n,o)))break}}else{var m=t.getValue(i.child,e[h]);if(void 0!==(r=this.addChildData(m,this.getChildMapper(i),s,n,o)))break}}return r},r.prototype.doDisableAction=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);if(t.isNullOrUndefined(n)){(e[i]?e[i].toString():null)&&-1===this.disableNode.indexOf(e[i].toString())&&this.disableNode.push(e[i].toString())}else n.setAttribute("aria-disabled","true"),t.addClass([n],"e-disable")}},r.prototype.doEnableAction=function(e){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);if(t.isNullOrUndefined(n)){var l=e[i]?e[i].toString():null;l&&-1!==this.disableNode.indexOf(l)&&this.disableNode.splice(this.disableNode.indexOf(l),1)}else n.removeAttribute("aria-disabled"),t.removeClass([n],"e-disable")}},r.prototype.setTouchClass=function(){var e=t.closest(this.element,".e-bigger");this.touchClass=t.isNullOrUndefined(e)?"":"e-small"},r.prototype.updatePersistProp=function(){this.removeField(this.treeData,this.fields,["selected","expanded"]);for(var e=this.selectedNodes,t=0,i=e.length;t<i;t++)this.updateField(this.treeData,this.fields,e[t],"selected",!0);for(var s=this.expandedNodes,n=0,l=s.length;n<l;n++)this.updateField(this.treeData,this.fields,s[n],"expanded",!0);if(this.showCheckBox){this.removeField(this.treeData,this.fields,["isChecked"]);var o=this.checkedNodes,r=0;for(l=o.length;r<l;r++)this.updateField(this.treeData,this.fields,o[r],"isChecked",!0)}},r.prototype.removeField=function(e,i,s){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i))for(var n=0,o=e.length;n<o;n++){for(var r=0;r<s.length;r++){var a=this.getMapperProp(i,s[r]);t.isNullOrUndefined(e[n][a])||delete e[n][a]}"string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[n]))?this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[n]))&&this.removeField(t.getValue("child",e[n]),this.getChildMapper(i),s):this.removeField(t.getValue(i.child,e[n]),this.getChildMapper(i),s)}},r.prototype.getMapperProp=function(e,i){switch(i){case"selected":return t.isNullOrUndefined(e.selected)?"selected":e.selected;case"expanded":return t.isNullOrUndefined(e.expanded)?"expanded":e.expanded;case"isChecked":return t.isNullOrUndefined(e.isChecked)?"isChecked":e.isChecked;case"hasChildren":return t.isNullOrUndefined(e.hasChildren)?"hasChildren":e.hasChildren;default:return i}},r.prototype.updateField=function(e,i,s,n,o){if(!t.isNullOrUndefined(s))if(1===this.dataType){var r=this.isNumberTypeId?parseFloat(s):s,a=new l.DataManager(this.treeData).executeLocal((new l.Query).where(i.id,"equal",r,!1));t.setValue(this.getMapperProp(i,n),o,a[0])}else this.updateChildField(e,i,s,n,o)},r.prototype.updateChildField=function(e,i,s,n,o,r){var a;if(t.isNullOrUndefined(e))return a;for(var d=0,h=e.length;d<h;d++){var c=t.getValue(i.id,e[d]);if(e[d]&&c&&c.toString()===s)return r?a=e.splice(d,1):(t.setValue(this.getMapperProp(i,n),o,e[d]),a=[]),a;if("string"!=typeof i.child||t.isNullOrUndefined(t.getValue(i.child,e[d]))){if(this.fields.dataSource instanceof l.DataManager&&!t.isNullOrUndefined(t.getValue("child",e[d]))){var p=t.getValue("child",e[d]);if(void 0!==(a=this.updateChildField(p,this.getChildMapper(i),s,n,o,r)))break}}else{var u=t.getValue(i.child,e[d]);if(void 0!==(a=this.updateChildField(u,this.getChildMapper(i),s,n,o,r)))break}}return a},r.prototype.triggerEvent=function(){this.nodeTemplate&&this.isBlazorPlatform&&!this.isStringTemplate&&this.updateBlazorTemplate();var e={data:this.treeData};this.trigger("dataSourceChanged",e)},r.prototype.updateBlazorTemplate=function(){t.updateBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate",this,!1)},r.prototype.wireInputEvents=function(e){t.EventHandler.add(e,"blur",this.inputFocusOut,this)},r.prototype.wireEditingEvents=function(e){if(e){var i=this;this.touchEditObj=new t.Touch(this.element,{tap:function(e){2===e.tapCount&&(e.originalEvent.preventDefault(),i.editingHandler(e.originalEvent))}})}else this.touchEditObj&&this.touchEditObj.destroy()},r.prototype.wireClickEvent=function(e){if(e){var i=this;this.touchClickObj=new t.Touch(this.element,{tap:function(e){e.originalEvent.preventDefault(),i.clickHandler(e)}})}else this.touchClickObj&&this.touchClickObj.destroy()},r.prototype.wireExpandOnEvent=function(e){var i=this;if(e){var s=this;this.touchExpandObj=new t.Touch(this.element,{tap:function(e){("Click"===i.expandOnType||"DblClick"===i.expandOnType&&2===e.tapCount)&&s.expandHandler(e)}})}else this.touchExpandObj&&this.touchExpandObj.destroy()},r.prototype.mouseDownHandler=function(e){this.mouseDownStatus=!0,(e.shiftKey||e.ctrlKey)&&e.preventDefault(),e.ctrlKey&&this.allowMultiSelection&&t.EventHandler.add(this.element,"contextmenu",this.preventContextMenu,this)},r.prototype.preventContextMenu=function(e){e.preventDefault()},r.prototype.wireEvents=function(){t.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this),this.wireClickEvent(!0),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0),t.EventHandler.add(this.element,"focus",this.focusIn,this),t.EventHandler.add(this.element,"blur",this.focusOut,this),t.EventHandler.add(this.element,"mouseover",this.onMouseOver,this),t.EventHandler.add(this.element,"mouseout",this.onMouseLeave,this),this.keyboardModule=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},r.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler),this.wireClickEvent(!1),this.wireExpandOnEvent(!1),t.EventHandler.remove(this.element,"focus",this.focusIn),t.EventHandler.remove(this.element,"blur",this.focusOut),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),t.EventHandler.remove(this.element,"mouseout",this.onMouseLeave),this.keyboardModule.destroy()},r.prototype.parents=function(e,i){for(var s=[],n=e.parentNode;!t.isNullOrUndefined(n);)t.matches(n,i)&&s.push(n),n=n.parentNode;return s},r.prototype.isDescendant=function(e,i){for(var s=i.parentNode;!t.isNullOrUndefined(s);){if(s===e)return!0;s=s.parentNode}return!1},r.prototype.showSpinner=function(e){t.addClass([e],Vt),s.createSpinner({target:e,width:t.Browser.isDevice?16:14},this.createElement),s.showSpinner(e)},r.prototype.hideSpinner=function(e){s.hideSpinner(e),e.innerHTML="",t.removeClass([e],Vt)},r.prototype.setCheckedNodes=function(e){e=JSON.parse(JSON.stringify(e)),this.uncheckAll(this.checkedNodes),this.setIndeterminate(e),e.length>0&&this.checkAll(e)},r.prototype.setValidCheckedNode=function(e){if(1===this.dataType){var i=this.fields,s=new l.DataManager(this.treeData).executeLocal((new l.Query).where(i.id,"equal",e,!0));if(s[0]&&(this.setChildCheckState(s,e,s[0]),this.autoCheck)){for(var n=s[0][this.fields.parentID]?s[0][this.fields.parentID].toString():null,o=this.getChildNodes(this.treeData,n),r=0,a=0;a<o.length;a++){var d=o[a][this.fields.id].toString();-1!==this.checkedNodes.indexOf(d)&&r++}r===o.length&&-1===this.checkedNodes.indexOf(n)&&n&&this.checkedNodes.push(n)}}else if(2===this.dataType)for(var h=0;h<this.treeData.length;h++){if((this.treeData[h][this.fields.id]?this.treeData[h][this.fields.id].toString():"")===e&&-1===this.checkedNodes.indexOf(e)){this.checkedNodes.push(e);break}var c=t.getValue(this.fields.child.toString(),this.treeData[h]);c&&this.setChildCheckState(c,e,this.treeData[h])}},r.prototype.setChildCheckState=function(e,i,s){var n,l=0;if(1===this.dataType){s&&(n=s[this.fields.id]?s[this.fields.id].toString():null);for(var o=0;o<e.length;o++){var r=e[o][this.fields.id]?e[o][this.fields.id].toString():null;s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r),r===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i);(d=this.getChildNodes(this.treeData,r))&&this.setChildCheckState(d,i,s)}}else{s&&(n=s[this.fields.id]?s[this.fields.id].toString():"");for(o=0;o<e.length;o++){var a=e[o][this.fields.id]?e[o][this.fields.id].toString():"";s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(a)&&this.checkedNodes.push(a),a===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i);var d;(d=t.getValue(this.fields.child.toString(),e[o]))&&this.setChildCheckState(d,i,e[o]),-1!==this.checkedNodes.indexOf(a)&&this.autoCheck&&l++,l===e.length&&-1===this.checkedNodes.indexOf(n)&&this.autoCheck&&this.checkedNodes.push(n)}}},r.prototype.setIndeterminate=function(e){for(var t=0;t<e.length;t++)this.setValidCheckedNode(e[t])},r.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"allowDragAndDrop":this.setDragAndDrop(this.allowDragAndDrop);break;case"allowEditing":this.wireEditingEvents(this.allowEditing);break;case"allowMultiSelection":if(this.selectedNodes.length>1){var l=this.getElement(this.selectedNodes[0]);this.isLoaded=!1,this.removeSelectAll(),this.selectNode(l,null),this.isLoaded=!0}this.setMultiSelect(this.allowMultiSelection),this.addMultiSelect(this.allowMultiSelection);break;case"checkedNodes":this.showCheckBox&&(this.checkedNodes=i.checkedNodes,this.setCheckedNodes(e.checkedNodes));break;case"autoCheck":this.showCheckBox&&(this.autoCheck=e.autoCheck,this.ensureIndeterminate());break;case"cssClass":this.setCssClass(i.cssClass,e.cssClass);break;case"enableRtl":this.setEnableRtl();break;case"expandedNodes":this.isAnimate=!1,this.isBlazorPlatform||this.setProperties({expandedNodes:[]},!0),this.collapseAll(),this.isInitalExpand=!0,this.isBlazorPlatform||this.setProperties({expandedNodes:t.isNullOrUndefined(e.expandedNodes)?[]:e.expandedNodes},!0),this.doExpandAction(),this.isInitalExpand=!1,this.isAnimate=!0;break;case"expandOn":this.wireExpandOnEvent(!1),this.setExpandOnType(),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0);break;case"fields":this.isAnimate=!1,this.isFieldChange=!0,this.initialRender=!0,this.updateListProp(this.fields),this.reRenderNodes(),this.initialRender=!1,this.isAnimate=!0,this.isFieldChange=!1;break;case"fullRowSelect":this.setFullRow(this.fullRowSelect),this.addFullRow(this.fullRowSelect);break;case"loadOnDemand":if(!1===this.loadOnDemand&&!this.onLoaded){for(var o=this.element.querySelectorAll("li"),r=0;r<o.length;)this.renderChildNodes(o[r],!0,null,!0),r++;this.onLoaded=!0}break;case"nodeTemplate":this.nodeTemplateFn=this.templateComplier(this.nodeTemplate),this.reRenderNodes();break;case"selectedNodes":this.removeSelectAll(),this.setProperties({selectedNodes:e.selectedNodes},!0),this.doSelectionAction();break;case"showCheckBox":case"sortOrder":this.reRenderNodes()}}},r.prototype.destroy=function(){t.resetBlazorTemplate(this.element.id+"nodeTemplate","NodeTemplate"),this.element.removeAttribute("aria-activedescendant"),this.element.removeAttribute("tabindex"),this.unWireEvents(),this.wireEditingEvents(!1),this.rippleFn(),this.rippleIconFn(),this.setCssClass(this.cssClass,null),this.setDragAndDrop(!1),this.setFullRow(!1),this.ulElement&&this.ulElement.parentElement&&this.ulElement.parentElement.removeChild(this.ulElement),e.prototype.destroy.call(this)},r.prototype.addNodes=function(e,i,s,n){if(!t.isNullOrUndefined(e)){e=JSON.parse(JSON.stringify(e));var o=this.getElement(i);if(this.preventExpand=n,this.fields.dataSource instanceof l.DataManager&&"BlazorAdaptor"!==this.fields.dataSource.adaptorName){var r,a=o?o.querySelector("."+Wt):null,d=this;o&&a&&a.classList.contains(Ut)&&null===o.querySelector("."+jt)?d.renderChildNodes(o,null,function(){r=o.querySelector("."+jt),d.addGivenNodes(e,o,s,!0,r),d.triggerEvent()}):(this.addGivenNodes(e,o,s,!0),this.triggerEvent())}else if(2===this.dataType)this.addGivenNodes(e,o,s);else{if(o)this.addGivenNodes(e,o,s);else{e=this.getSortedData(e);for(var h=0;h<e.length;h++){var c=t.getValue(this.fields.parentID,e[h]);o=c?this.getElement(c.toString()):c,this.addGivenNodes([e[h]],o,s)}}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}this.showCheckBox&&o&&this.ensureParentCheckState(o),(this.fields.dataSource instanceof l.DataManager==!1||this.fields.dataSource instanceof l.DataManager&&"BlazorAdaptor"===this.fields.dataSource.adaptorName)&&(this.preventExpand=!1,this.triggerEvent())}},r.prototype.beginEdit=function(e){var i=this.getElement(e);t.isNullOrUndefined(i)||this.createTextbox(i,null)},r.prototype.checkAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!0)},r.prototype.collapseAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.collapseByLevel(t.select("."+jt,this.element),i,s):this.collapseAllNodes(s):this.doGivenAction(e,Ht,!1)},r.prototype.disableNodes=function(e){t.isNullOrUndefined(e)||this.doDisableAction(e)},r.prototype.enableNodes=function(e){t.isNullOrUndefined(e)||this.doEnableAction(e)},r.prototype.ensureVisible=function(e){var i=this.getElement(e);if(!t.isNullOrUndefined(i)){var s=this.parents(i,"."+Bt);this.expandAll(s),setTimeout(function(){i.scrollIntoView(!0)},450)}},r.prototype.expandAll=function(e,i,s){t.isNullOrUndefined(e)?i>0?this.expandByLevel(t.select("."+jt,this.element),i,s):this.expandAllNodes(s):this.doGivenAction(e,Ut,!0)},r.prototype.getAllCheckedNodes=function(){return this.checkedNodes},r.prototype.getNode=function(e){var t=this.getElement(e);return this.getNodeData(t,!0)},r.prototype.getTreeData=function(e){var i=this.getId(e);if(this.updatePersistProp(),t.isNullOrUndefined(i))return this.treeData;var s=this.getNodeObject(i);return t.isNullOrUndefined(s)?[]:[s]},r.prototype.moveNodes=function(e,i,s,n){var o=this.getElement(i);if(!t.isNullOrUndefined(o)){for(var r=0;r<e.length;r++){var a=this.getElement(e[r]);t.isNullOrUndefined(a)||o.isSameNode(a)||this.isDescendant(a,o)||(this.preventExpand=n,this.dropAsChildNode(a,o,this,s))}this.fields.dataSource instanceof l.DataManager==!1&&(this.preventExpand=!1),this.triggerEvent()}},r.prototype.removeNodes=function(e){if(!t.isNullOrUndefined(e)){for(var i=0,s=e.length;i<s;i++){var n=this.getElement(e[i]);t.isNullOrUndefined(n)||this.removeNode(n)}1===this.dataType&&(this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)),this.triggerEvent()}},r.prototype.updateNode=function(e,i){var s=this;if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(i)&&this.allowEditing){var n=this.getElement(e);if(!t.isNullOrUndefined(n)){var l=t.select("."+Rt,n);this.updateOldText(n);var o=this.getEditEvent(n,null,null);this.trigger("nodeEditing",o,function(e){e.cancel||s.appendNewText(n,l,i,!1)})}}},r.prototype.uncheckAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!1)};var a;return Tt([t.Property(!1)],r.prototype,"allowDragAndDrop",void 0),Tt([t.Property(!1)],r.prototype,"allowEditing",void 0),Tt([t.Property(!1)],r.prototype,"allowMultiSelection",void 0),Tt([t.Complex({},hi)],r.prototype,"animation",void 0),Tt([t.Property()],r.prototype,"checkedNodes",void 0),Tt([t.Property("")],r.prototype,"cssClass",void 0),Tt([t.Property(!1)],r.prototype,"enablePersistence",void 0),Tt([t.Property()],r.prototype,"expandedNodes",void 0),Tt([t.Property("Auto")],r.prototype,"expandOn",void 0),Tt([t.Complex({},ai)],r.prototype,"fields",void 0),Tt([t.Property(!0)],r.prototype,"fullRowSelect",void 0),Tt([t.Property(!0)],r.prototype,"loadOnDemand",void 0),Tt([t.Property()],r.prototype,"nodeTemplate",void 0),Tt([t.Property()],r.prototype,"selectedNodes",void 0),Tt([t.Property("None")],r.prototype,"sortOrder",void 0),Tt([t.Property(!1)],r.prototype,"showCheckBox",void 0),Tt([t.Property(!0)],r.prototype,"autoCheck",void 0),Tt([t.Event()],r.prototype,"created",void 0),Tt([t.Event()],r.prototype,"dataBound",void 0),Tt([t.Event()],r.prototype,"dataSourceChanged",void 0),Tt([t.Event()],r.prototype,"drawNode",void 0),Tt([t.Event()],r.prototype,"destroyed",void 0),Tt([t.Event()],r.prototype,"keyPress",void 0),Tt([t.Event()],r.prototype,"nodeChecked",void 0),Tt([t.Event()],r.prototype,"nodeChecking",void 0),Tt([t.Event()],r.prototype,"nodeClicked",void 0),Tt([t.Event()],r.prototype,"nodeCollapsed",void 0),Tt([t.Event()],r.prototype,"nodeCollapsing",void 0),Tt([t.Event()],r.prototype,"nodeDragging",void 0),Tt([t.Event()],r.prototype,"nodeDragStart",void 0),Tt([t.Event()],r.prototype,"nodeDragStop",void 0),Tt([t.Event()],r.prototype,"nodeDropped",void 0),Tt([t.Event()],r.prototype,"nodeEdited",void 0),Tt([t.Event()],r.prototype,"nodeEditing",void 0),Tt([t.Event()],r.prototype,"nodeExpanded",void 0),Tt([t.Event()],r.prototype,"nodeExpanding",void 0),Tt([t.Event()],r.prototype,"nodeSelected",void 0),Tt([t.Event()],r.prototype,"nodeSelecting",void 0),r=a=Tt([t.NotifyPropertyChanges],r)}(t.Component),pi=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ui=function(e,t,i,s){var n,l=arguments.length,o=l<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var r=e.length-1;r>=0;r--)(n=e[r])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o},fi="e-close",mi="e-open",gi="e-transition",vi="e-right",yi="e-over",bi="e-push",Ci="e-visibility",Ni="e-disable-animation",Ei="e-sidebar-context",xi="e-sidebar-absolute",Oi=function(e){function i(t,i){return e.call(this,t,i)||this}return pi(i,e),i.prototype.preRender=function(){this.setWidth()},i.prototype.render=function(){this.initialize(),this.wireEvents(),this.renderComplete()},i.prototype.initialize=function(){this.setTarget(),this.addClass(),this.setZindex(),this.enableDock&&this.setDock(),this.isOpen?this.show():this.setMediaQuery(),this.checkType(!0),this.setType(this.type),this.setCloseOnDocumentClick(),this.setEnableRTL(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.setEnableRTL=function(){this.enableRtl?t.addClass([this.element],"e-rtl"):t.removeClass([this.element],"e-rtl")},i.prototype.setTarget=function(){this.sidebarEleCopy=this.element.cloneNode(!0),"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),this.target&&(this.target.insertBefore(this.element,this.target.children[0]),t.addClass([this.element],xi),t.addClass([this.target],Ei))},i.prototype.setCloseOnDocumentClick=function(){this.closeOnDocumentClick?t.EventHandler.add(document,"mousedown touchstart",this.documentclickHandler,this):t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler)},i.prototype.setWidth=function(){this.enableDock&&"Left"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock&&"Right"===this.position?t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock||t.setStyleAttribute(this.element,{width:this.setDimension(this.width)})},i.prototype.setDimension=function(e){return e="number"==typeof e?t.formatUnit(e):"string"==typeof e?e.match(/px|%|em/)?e:t.formatUnit(e):"100%"},i.prototype.setZindex=function(){t.setStyleAttribute(this.element,{"z-index":""+this.zIndex})},i.prototype.addClass=function(){var e=document.querySelector(".e-main-content");t.isNullOrUndefined(e||this.element.nextElementSibling)||t.addClass([e||this.element.nextElementSibling],["e-content-animation"]),this.enableDock||"Auto"===this.type||t.addClass([this.element],[Ci]),t.removeClass([this.element],[mi,fi,vi,"e-left","e-slide",bi,yi]),this.element.classList.add("e-sidebar"),t.addClass([this.element],"Right"===this.position?vi:"e-left"),"Auto"!==this.type||t.Browser.isDevice?this.isOpen||t.addClass([this.element],fi):this.show(),this.enableDock&&t.addClass([this.element],"e-dock"),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):"0",this.element.setAttribute("tabindex",this.tabIndex)},i.prototype.checkType=function(e){"Push"!==this.type&&"Over"!==this.type&&"Slide"!==this.type?this.type="Auto":this.element.classList.contains(fi)||e||this.hide()},i.prototype.transitionEnd=function(e){this.setDock(),t.isNullOrUndefined(e)||e.target!==this.element||this.triggerChange(),t.EventHandler.remove(this.element,"transitionend",this.transitionEnd)},i.prototype.destroyBackDrop=function(){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;this.target&&this.showBackdrop&&e?t.removeClass([e],"e-backdrop"):this.showBackdrop&&this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},i.prototype.hide=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("close",s,function(e){if(!e.cancel){if(i.element.classList.contains(fi))return;i.element.classList.contains(mi)&&!i.animate&&i.triggerChange(),t.addClass([i.element],fi),t.removeClass([i.element],mi),i.enableDock?t.setStyleAttribute(i.element,{width:t.formatUnit(i.dockSize)}):t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type);var s=document.querySelector(".e-main-content")||i.element.nextElementSibling;!i.enableDock&&s&&(s.style.transform="translateX(0px)","Left"===i.position?s.style.marginLeft="0px":s.style.marginRight="0px"),i.destroyBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.remove("e-sidebar-overflow"),i.setProperties({isOpen:!1},!0),i.enableDock&&setTimeout(function(){return i.setTimeOut()},50),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setTimeOut=function(){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;this.element.classList.contains(mi)&&e?"Left"===this.position?"auto"===this.width?e.style.marginLeft=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginLeft=this.setDimension(this.width):"auto"===this.width?e.style.marginRight=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginRight=this.setDimension(this.width):this.element.classList.contains(fi)&&e&&("Left"===this.position?"auto"===this.dockSize?e.style.marginLeft=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginLeft=this.setDimension(this.dockSize):"auto"===this.dockSize?e.style.marginRight=this.setDimension(this.element.getBoundingClientRect().width):e.style.marginRight=this.setDimension(this.dockSize))},i.prototype.show=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!t.isNullOrUndefined(e),event:e||null};t.isBlazor()&&delete s.model,this.trigger("open",s,function(e){if(!e.cancel){if(t.removeClass([i.element],Ci),i.element.classList.contains(mi))return;i.element.classList.contains(fi)&&!i.animate&&i.triggerChange(),t.addClass([i.element],[mi,gi]),t.setStyleAttribute(i.element,{transform:""}),t.removeClass([i.element],fi),t.setStyleAttribute(i.element,{width:t.formatUnit(i.width)}),i.setType(i.type),i.createBackDrop(),i.setAnimation(),"Slide"===i.type&&document.body.classList.add("e-sidebar-overflow"),i.setProperties({isOpen:!0},!0),t.EventHandler.add(i.element,"transitionend",i.transitionEnd,i)}})},i.prototype.setAnimation=function(){this.animate?t.removeClass([this.element],Ni):t.addClass([this.element],Ni)},i.prototype.triggerChange=function(){var e={name:"change",element:this.element};this.trigger("change",e)},i.prototype.setDock=function(){this.enableDock&&"Left"===this.position&&!this.getState()?t.setStyleAttribute(this.element,{transform:"translateX(-100%) translateX("+this.setDimension(this.dockSize)+")"}):this.enableDock&&"Right"===this.position&&!this.getState()&&t.setStyleAttribute(this.element,{transform:"translateX(100%) translateX(-"+this.setDimension(this.dockSize)+")"}),this.element.classList.contains(fi)&&this.enableDock&&t.setStyleAttribute(this.element,{width:this.setDimension(this.dockSize)})},i.prototype.createBackDrop=function(){if(this.target&&this.showBackdrop&&this.getState()){var e=document.querySelector(".e-main-content")||this.element.nextElementSibling;t.addClass([e],"e-backdrop")}else this.showBackdrop&&!this.modal&&this.getState()&&(this.modal=this.createElement("div"),this.modal.className="e-sidebar-overlay",this.modal.style.display="block",document.body.appendChild(this.modal))},i.prototype.getPersistData=function(){return this.addOnPersist(["type","position","isOpen"])},i.prototype.getModuleName=function(){return"sidebar"},i.prototype.toggle=function(e){this.element.classList.contains(mi)?this.hide():this.show()},i.prototype.getState=function(){return!!this.element.classList.contains(mi)},i.prototype.setMediaQuery=function(){if(this.mediaQuery){("string"==typeof this.mediaQuery?window.matchMedia(this.mediaQuery).matches:this.mediaQuery.matches)&&this.windowWidth!==window.innerWidth?this.show():this.getState()&&this.windowWidth!==window.innerWidth&&this.hide()}},i.prototype.resize=function(e){"Auto"===this.type&&(t.Browser.isDevice?t.addClass([this.element],yi):t.addClass([this.element],bi)),this.setMediaQuery(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.documentclickHandler=function(e){t.closest(e.target,".e-control.e-sidebar")||this.hide(e)},i.prototype.enableGestureHandler=function(e){"Left"===this.position&&"Right"===e.swipeDirection&&e.startX<=20&&e.distanceX>=50&&e.velocity>=.5?this.show():"Left"===this.position&&"Left"===e.swipeDirection?this.hide():"Right"===this.position&&"Right"===e.swipeDirection?this.hide():"Right"===this.position&&"Left"===e.swipeDirection&&window.innerWidth-e.startX<=20&&e.distanceX>=50&&e.velocity>=.5&&this.show()},i.prototype.setEnableGestures=function(){this.enableGestures?(this.mainContentEle=new t.Touch(document.body,{swipe:this.enableGestureHandler.bind(this)}),this.sidebarEle=new t.Touch(this.element,{swipe:this.enableGestureHandler.bind(this)})):this.mainContentEle&&this.sidebarEle&&(this.mainContentEle.destroy(),this.sidebarEle.destroy())},i.prototype.wireEvents=function(){this.setEnableGestures(),window.addEventListener("resize",this.resize.bind(this))},i.prototype.unWireEvents=function(){window.removeEventListener("resize",this.resize.bind(this)),t.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler),this.mainContentEle&&this.mainContentEle.destroy(),this.sidebarEle&&this.sidebarEle.destroy()},i.prototype.onPropertyChanged=function(i,s){for(var n=document.querySelector(".e-main-content")||this.element.nextElementSibling,l=0,o=Object.keys(i);l<o.length;l++){switch(o[l]){case"isOpen":this.isOpen?this.show():this.hide();break;case"width":this.setWidth(),this.getState()||this.setDock();break;case"animate":this.setAnimation();break;case"type":this.checkType(!1),t.removeClass([this.element],[Ci]),this.addClass(),t.addClass([this.element],"Auto"===this.type?t.Browser.isDevice?["e-over"]:["e-push"]:["e-"+this.type.toLowerCase()]);break;case"position":this.element.style.transform="",this.setDock(),n&&("Left"===this.position?n.style.marginRight="0px":n.style.marginLeft="0px"),"Right"===this.position?(t.removeClass([this.element],"e-left"),t.addClass([this.element],vi)):(t.removeClass([this.element],vi),t.addClass([this.element],"e-left")),this.setType(this.type);break;case"showBackdrop":this.showBackdrop?this.createBackDrop():this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null);break;case"target":"string"==typeof this.target&&this.setProperties({target:document.querySelector(this.target)},!0),t.isNullOrUndefined(this.target)?(t.removeClass([this.element],xi),t.removeClass([s.target],Ei),t.setStyleAttribute(n,{"margin-left":0,"margin-right":0}),document.body.insertAdjacentElement("afterbegin",this.element)):e.prototype.refresh.call(this);break;case"closeOnDocumentClick":this.setCloseOnDocumentClick();break;case"enableDock":this.getState()||this.setDock();break;case"zIndex":this.setZindex();break;case"mediaQuery":this.setMediaQuery();break;case"enableGestures":this.setEnableGestures();break;case"enableRtl":this.setEnableRTL()}}},i.prototype.setType=function(e){var i=this.element.getBoundingClientRect().width;this.setZindex();var s=document.querySelector(".e-main-content")||this.element.nextElementSibling;s&&(s.style.transform="translateX(0px)",t.Browser.isDevice||"Auto"===this.type||("Left"===this.position?s.style.marginLeft="0px":s.style.marginRight="0px"));var n=(this.position,i+"px"),l="Left"===this.position?i:-i;switch(t.removeClass([this.element],[bi,yi,"e-slide"]),e){case"Push":t.addClass([this.element],[bi]),s&&(this.enableDock||this.element.classList.contains(mi))&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n);break;case"Slide":t.addClass([this.element],["e-slide"]),s&&(this.enableDock||this.element.classList.contains(mi))&&(s.style.transform="translateX("+l+"px)");break;case"Over":t.addClass([this.element],[yi]),this.enableDock&&this.element.classList.contains(fi)&&s&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n);break;case"Auto":t.addClass([this.element],[gi]),t.Browser.isDevice?s&&this.enableDock&&!this.getState()?("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n,t.addClass([this.element],bi)):t.addClass([this.element],yi):(t.addClass([this.element],bi),s&&(this.enableDock||this.element.classList.contains(mi))&&("Left"===this.position?s.style.marginLeft=n:s.style.marginRight=n)),this.createBackDrop()}},i.prototype.destroy=function(){e.prototype.destroy.call(this),t.removeClass([this.element],[mi,fi,bi,"e-slide",yi,"e-left",vi,gi]),this.target&&(t.removeClass([this.element],xi),t.removeClass([this.target],Ei)),this.destroyBackDrop(),this.element.style.width="",this.element.style.zIndex="",this.element.style.transform="",this.windowWidth=null,t.isNullOrUndefined(this.sidebarEleCopy.getAttribute("tabindex"))?this.element.removeAttribute("tabindex"):this.element.setAttribute("tabindex",this.tabIndex);var i=document.querySelector(".e-main-content")||this.element.nextElementSibling;t.isNullOrUndefined(i)||(i.style.margin="",i.style.transform=""),this.unWireEvents()},ui([t.Property("auto")],i.prototype,"dockSize",void 0),ui([t.Property(null)],i.prototype,"mediaQuery",void 0),ui([t.Property(!1)],i.prototype,"enableDock",void 0),ui([t.Property("en-US")],i.prototype,"locale",void 0),ui([t.Property(!1)],i.prototype,"enablePersistence",void 0),ui([t.Property(!0)],i.prototype,"enableGestures",void 0),ui([t.Property(!1)],i.prototype,"isOpen",void 0),ui([t.Property(!1)],i.prototype,"enableRtl",void 0),ui([t.Property(!0)],i.prototype,"animate",void 0),ui([t.Property("auto")],i.prototype,"height",void 0),ui([t.Property(!1)],i.prototype,"closeOnDocumentClick",void 0),ui([t.Property("Left")],i.prototype,"position",void 0),ui([t.Property(null)],i.prototype,"target",void 0),ui([t.Property(!1)],i.prototype,"showBackdrop",void 0),ui([t.Property("Auto")],i.prototype,"type",void 0),ui([t.Property("auto")],i.prototype,"width",void 0),ui([t.Property(1e3)],i.prototype,"zIndex",void 0),ui([t.Event()],i.prototype,"created",void 0),ui([t.Event()],i.prototype,"close",void 0),ui([t.Event()],i.prototype,"open",void 0),ui([t.Event()],i.prototype,"change",void 0),ui([t.Event()],i.prototype,"destroyed",void 0),i=ui([t.NotifyPropertyChanges],i)}(t.Component);e.MenuAnimationSettings=te,e.MenuItem=ee,e.HScroll=N,e.VScroll=H,e.Item=Te,e.Toolbar=Me,e.AccordionActionSettings=Ze,e.AccordionAnimationSettings=$e,e.AccordionItem=et,e.Accordion=tt,e.ContextMenu=nt,e.Menu=dt,e.TabActionSettings=wt,e.TabAnimationSettings=Lt,e.Header=It,e.TabItem=At,e.Tab=Dt,e.FieldsSettings=ai,e.ActionSettings=di,e.NodeAnimationSettings=hi,e.TreeView=ci,e.Sidebar=Oi,Object.defineProperty(e,"__esModule",{value:!0})});
11
2
  //# sourceMappingURL=ej2-navigations.umd.min.js.map