@syncfusion/ej2-navigations 25.2.4 → 26.1.35-750253

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 (642) hide show
  1. package/.eslintrc.json +3 -2
  2. package/dist/ej2-navigations.min.js +2 -2
  3. package/dist/ej2-navigations.umd.min.js +2 -2
  4. package/dist/ej2-navigations.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-navigations.es2015.js +1311 -1106
  6. package/dist/es6/ej2-navigations.es2015.js.map +1 -1
  7. package/dist/es6/ej2-navigations.es5.js +960 -740
  8. package/dist/es6/ej2-navigations.es5.js.map +1 -1
  9. package/dist/global/ej2-navigations.min.js +2 -2
  10. package/dist/global/ej2-navigations.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +12 -12
  13. package/src/accordion/accordion.d.ts +0 -3
  14. package/src/accordion/accordion.js +5 -5
  15. package/src/appbar/appbar.js +1 -1
  16. package/src/breadcrumb/breadcrumb-model.d.ts +7 -0
  17. package/src/breadcrumb/breadcrumb.d.ts +6 -0
  18. package/src/breadcrumb/breadcrumb.js +20 -6
  19. package/src/carousel/carousel.d.ts +1 -0
  20. package/src/carousel/carousel.js +12 -9
  21. package/src/common/menu-base.js +21 -13
  22. package/src/sidebar/sidebar-model.d.ts +5 -6
  23. package/src/sidebar/sidebar.d.ts +8 -6
  24. package/src/sidebar/sidebar.js +2 -3
  25. package/src/stepper/stepper-model.d.ts +7 -1
  26. package/src/stepper/stepper.d.ts +7 -3
  27. package/src/stepper/stepper.js +141 -76
  28. package/src/stepper-base/stepper-base-model.d.ts +1 -1
  29. package/src/stepper-base/stepper-base.d.ts +4 -4
  30. package/src/stepper-base/stepper-base.js +13 -8
  31. package/src/tab/tab-model.d.ts +1 -1
  32. package/src/tab/tab.d.ts +0 -3
  33. package/src/tab/tab.js +2 -2
  34. package/src/toolbar/toolbar-model.d.ts +1 -1
  35. package/src/toolbar/toolbar.js +13 -9
  36. package/src/treeview/treeview-model.d.ts +60 -53
  37. package/src/treeview/treeview.d.ts +134 -29
  38. package/src/treeview/treeview.js +572 -392
  39. package/styles/accordion/_bds-definition.scss +0 -13
  40. package/styles/accordion/_bootstrap-dark-definition.scss +0 -9
  41. package/styles/accordion/_bootstrap-definition.scss +0 -14
  42. package/styles/accordion/_bootstrap4-definition.scss +0 -9
  43. package/styles/accordion/_bootstrap5-definition.scss +8 -22
  44. package/styles/accordion/_bootstrap5.3-definition.scss +168 -0
  45. package/styles/accordion/_fabric-dark-definition.scss +0 -8
  46. package/styles/accordion/_fabric-definition.scss +0 -13
  47. package/styles/accordion/_fluent-definition.scss +0 -13
  48. package/styles/accordion/_fluent2-definition.scss +167 -0
  49. package/styles/accordion/_fusionnew-definition.scss +1 -15
  50. package/styles/accordion/_highcontrast-definition.scss +0 -13
  51. package/styles/accordion/_highcontrast-light-definition.scss +0 -11
  52. package/styles/accordion/_layout.scss +0 -2
  53. package/styles/accordion/_material-dark-definition.scss +0 -11
  54. package/styles/accordion/_material-definition.scss +0 -13
  55. package/styles/accordion/_material3-definition.scss +3 -17
  56. package/styles/accordion/_tailwind-definition.scss +0 -13
  57. package/styles/accordion/_theme.scss +0 -3
  58. package/styles/accordion/bootstrap-dark.css +11 -9
  59. package/styles/accordion/bootstrap.css +11 -10
  60. package/styles/accordion/bootstrap4.css +11 -9
  61. package/styles/accordion/bootstrap5-dark.css +20 -20
  62. package/styles/accordion/bootstrap5.css +20 -20
  63. package/styles/accordion/fabric-dark.css +11 -9
  64. package/styles/accordion/fabric.css +11 -10
  65. package/styles/accordion/fluent-dark.css +11 -10
  66. package/styles/accordion/fluent.css +11 -10
  67. package/styles/accordion/fluent2.css +1574 -0
  68. package/styles/accordion/fluent2.scss +4 -0
  69. package/styles/accordion/highcontrast-light.css +11 -9
  70. package/styles/accordion/highcontrast.css +11 -10
  71. package/styles/accordion/icons/_bds.scss +0 -2
  72. package/styles/accordion/icons/_bootstrap-dark.scss +0 -2
  73. package/styles/accordion/icons/_bootstrap.scss +0 -2
  74. package/styles/accordion/icons/_bootstrap4.scss +0 -2
  75. package/styles/accordion/icons/_bootstrap5.3.scss +15 -0
  76. package/styles/accordion/icons/_bootstrap5.scss +0 -2
  77. package/styles/accordion/icons/_fabric-dark.scss +0 -2
  78. package/styles/accordion/icons/_fabric.scss +0 -2
  79. package/styles/accordion/icons/_fluent.scss +0 -2
  80. package/styles/accordion/icons/_fluent2.scss +15 -0
  81. package/styles/accordion/icons/_fusionnew.scss +0 -2
  82. package/styles/accordion/icons/_highcontrast-light.scss +0 -2
  83. package/styles/accordion/icons/_highcontrast.scss +0 -2
  84. package/styles/accordion/icons/_material-dark.scss +0 -2
  85. package/styles/accordion/icons/_material.scss +0 -2
  86. package/styles/accordion/icons/_material3.scss +0 -2
  87. package/styles/accordion/icons/_tailwind.scss +0 -2
  88. package/styles/accordion/material-dark.css +11 -9
  89. package/styles/accordion/material.css +11 -10
  90. package/styles/accordion/material3-dark.css +12 -12
  91. package/styles/accordion/material3.css +12 -12
  92. package/styles/accordion/tailwind-dark.css +11 -10
  93. package/styles/accordion/tailwind.css +11 -10
  94. package/styles/appbar/_bds-definition.scss +1 -3
  95. package/styles/appbar/_bootstrap-dark-definition.scss +0 -2
  96. package/styles/appbar/_bootstrap-definition.scss +0 -2
  97. package/styles/appbar/_bootstrap4-definition.scss +0 -2
  98. package/styles/appbar/_bootstrap5-definition.scss +0 -2
  99. package/styles/appbar/_bootstrap5.3-definition.scss +6 -0
  100. package/styles/appbar/_fabric-dark-definition.scss +0 -2
  101. package/styles/appbar/_fabric-definition.scss +0 -2
  102. package/styles/appbar/_fluent-definition.scss +0 -2
  103. package/styles/appbar/_fluent2-definition.scss +24 -0
  104. package/styles/appbar/_fusionnew-definition.scss +0 -2
  105. package/styles/appbar/_highcontrast-definition.scss +0 -2
  106. package/styles/appbar/_highcontrast-light-definition.scss +0 -2
  107. package/styles/appbar/_layout.scss +3 -2
  108. package/styles/appbar/_material-dark-definition.scss +0 -2
  109. package/styles/appbar/_material-definition.scss +0 -2
  110. package/styles/appbar/_material3-definition.scss +0 -2
  111. package/styles/appbar/_tailwind-definition.scss +0 -2
  112. package/styles/appbar/_theme.scss +0 -2
  113. package/styles/appbar/bootstrap-dark.css +52 -23
  114. package/styles/appbar/bootstrap.css +52 -23
  115. package/styles/appbar/bootstrap4.css +52 -23
  116. package/styles/appbar/bootstrap5-dark.css +52 -23
  117. package/styles/appbar/bootstrap5.css +52 -23
  118. package/styles/appbar/fabric-dark.css +52 -23
  119. package/styles/appbar/fabric.css +52 -23
  120. package/styles/appbar/fluent-dark.css +52 -23
  121. package/styles/appbar/fluent.css +52 -23
  122. package/styles/appbar/fluent2.css +1332 -0
  123. package/styles/appbar/fluent2.scss +3 -0
  124. package/styles/appbar/highcontrast-light.css +52 -23
  125. package/styles/appbar/highcontrast.css +52 -23
  126. package/styles/appbar/material-dark.css +52 -23
  127. package/styles/appbar/material.css +52 -23
  128. package/styles/appbar/material3-dark.css +62 -26
  129. package/styles/appbar/material3.css +62 -26
  130. package/styles/appbar/tailwind-dark.css +52 -23
  131. package/styles/appbar/tailwind.css +52 -23
  132. package/styles/bootstrap-dark.css +1042 -643
  133. package/styles/bootstrap-dark.scss +47 -14
  134. package/styles/bootstrap.css +1050 -656
  135. package/styles/bootstrap.scss +47 -14
  136. package/styles/bootstrap4.css +1060 -673
  137. package/styles/bootstrap4.scss +47 -14
  138. package/styles/bootstrap5-dark.css +1101 -736
  139. package/styles/bootstrap5-dark.scss +47 -14
  140. package/styles/bootstrap5.css +1101 -736
  141. package/styles/bootstrap5.scss +47 -14
  142. package/styles/breadcrumb/_all.scss +0 -1
  143. package/styles/breadcrumb/_bds-definition.scss +1 -1
  144. package/styles/breadcrumb/_bootstrap5.3-definition.scss +57 -0
  145. package/styles/breadcrumb/_fluent-definition.scss +2 -1
  146. package/styles/breadcrumb/_fluent2-definition.scss +61 -0
  147. package/styles/breadcrumb/_layout.scss +92 -10
  148. package/styles/breadcrumb/_theme.scss +31 -2
  149. package/styles/breadcrumb/bootstrap-dark.css +37 -22
  150. package/styles/breadcrumb/bootstrap.css +37 -22
  151. package/styles/breadcrumb/bootstrap4.css +37 -22
  152. package/styles/breadcrumb/bootstrap5-dark.css +37 -22
  153. package/styles/breadcrumb/bootstrap5.css +37 -22
  154. package/styles/breadcrumb/fabric-dark.css +37 -22
  155. package/styles/breadcrumb/fabric.css +37 -22
  156. package/styles/breadcrumb/fluent-dark.css +39 -24
  157. package/styles/breadcrumb/fluent.css +39 -24
  158. package/styles/breadcrumb/fluent2.css +1489 -0
  159. package/styles/breadcrumb/fluent2.scss +4 -0
  160. package/styles/breadcrumb/highcontrast-light.css +37 -22
  161. package/styles/breadcrumb/highcontrast.css +37 -22
  162. package/styles/breadcrumb/icons/_bds.scss +0 -2
  163. package/styles/breadcrumb/icons/_bootstrap-dark.scss +0 -2
  164. package/styles/breadcrumb/icons/_bootstrap.scss +0 -2
  165. package/styles/breadcrumb/icons/_bootstrap4.scss +0 -2
  166. package/styles/breadcrumb/icons/_bootstrap5.3.scss +23 -0
  167. package/styles/breadcrumb/icons/_bootstrap5.scss +0 -2
  168. package/styles/breadcrumb/icons/_fabric-dark.scss +0 -2
  169. package/styles/breadcrumb/icons/_fabric.scss +0 -2
  170. package/styles/breadcrumb/icons/_fluent.scss +0 -2
  171. package/styles/breadcrumb/icons/_fluent2.scss +23 -0
  172. package/styles/breadcrumb/icons/_fusionnew.scss +0 -2
  173. package/styles/breadcrumb/icons/_highcontrast-light.scss +0 -2
  174. package/styles/breadcrumb/icons/_highcontrast.scss +0 -2
  175. package/styles/breadcrumb/icons/_material-dark.scss +0 -2
  176. package/styles/breadcrumb/icons/_material.scss +0 -2
  177. package/styles/breadcrumb/icons/_material3.scss +0 -2
  178. package/styles/breadcrumb/icons/_tailwind-dark.scss +0 -2
  179. package/styles/breadcrumb/icons/_tailwind.scss +0 -2
  180. package/styles/breadcrumb/material-dark.css +37 -22
  181. package/styles/breadcrumb/material.css +37 -22
  182. package/styles/breadcrumb/material3-dark.css +39 -23
  183. package/styles/breadcrumb/material3.css +39 -23
  184. package/styles/breadcrumb/tailwind-dark.css +37 -22
  185. package/styles/breadcrumb/tailwind.css +37 -22
  186. package/styles/carousel/_bds-definition.scss +0 -7
  187. package/styles/carousel/_bootstrap-dark-definition.scss +0 -7
  188. package/styles/carousel/_bootstrap-definition.scss +0 -7
  189. package/styles/carousel/_bootstrap4-definition.scss +0 -7
  190. package/styles/carousel/_bootstrap5-definition.scss +0 -7
  191. package/styles/carousel/_bootstrap5.3-definition.scss +20 -0
  192. package/styles/carousel/_fabric-dark-definition.scss +0 -7
  193. package/styles/carousel/_fabric-definition.scss +0 -7
  194. package/styles/carousel/_fluent-definition.scss +0 -7
  195. package/styles/carousel/_fluent2-definition.scss +21 -0
  196. package/styles/carousel/_fusionnew-definition.scss +0 -7
  197. package/styles/carousel/_highcontrast-definition.scss +0 -7
  198. package/styles/carousel/_highcontrast-light-definition.scss +0 -7
  199. package/styles/carousel/_layout.scss +0 -2
  200. package/styles/carousel/_material-dark-definition.scss +0 -7
  201. package/styles/carousel/_material-definition.scss +0 -7
  202. package/styles/carousel/_material3-definition.scss +0 -7
  203. package/styles/carousel/_tailwind-definition.scss +0 -7
  204. package/styles/carousel/_theme.scss +8 -2
  205. package/styles/carousel/bootstrap-dark.css +93 -39
  206. package/styles/carousel/bootstrap.css +93 -39
  207. package/styles/carousel/bootstrap4.css +93 -39
  208. package/styles/carousel/bootstrap5-dark.css +93 -39
  209. package/styles/carousel/bootstrap5.css +93 -39
  210. package/styles/carousel/fabric-dark.css +93 -39
  211. package/styles/carousel/fabric.css +93 -39
  212. package/styles/carousel/fluent-dark.css +93 -39
  213. package/styles/carousel/fluent.css +93 -39
  214. package/styles/carousel/fluent2.css +1405 -0
  215. package/styles/carousel/fluent2.scss +5 -0
  216. package/styles/carousel/highcontrast-light.css +93 -39
  217. package/styles/carousel/highcontrast.css +93 -39
  218. package/styles/carousel/icons/_bootstrap5.3.scss +30 -0
  219. package/styles/carousel/icons/_fluent2.scss +30 -0
  220. package/styles/carousel/material-dark.css +93 -39
  221. package/styles/carousel/material.css +93 -39
  222. package/styles/carousel/material3-dark.css +98 -41
  223. package/styles/carousel/material3.css +98 -41
  224. package/styles/carousel/tailwind-dark.css +93 -39
  225. package/styles/carousel/tailwind.css +93 -39
  226. package/styles/context-menu/_bds-definition.scss +5 -2
  227. package/styles/context-menu/_bootstrap-dark-definition.scss +0 -3
  228. package/styles/context-menu/_bootstrap5-definition.scss +0 -1
  229. package/styles/context-menu/_bootstrap5.3-definition.scss +51 -0
  230. package/styles/context-menu/_fabric-dark-definition.scss +0 -3
  231. package/styles/context-menu/_fluent-definition.scss +0 -1
  232. package/styles/context-menu/_fluent2-definition.scss +52 -0
  233. package/styles/context-menu/_fusionnew-definition.scss +0 -1
  234. package/styles/context-menu/_highcontrast-light-definition.scss +0 -3
  235. package/styles/context-menu/_layout-mixin.scss +24 -0
  236. package/styles/context-menu/_layout.scss +44 -4
  237. package/styles/context-menu/_material-dark-definition.scss +0 -3
  238. package/styles/context-menu/_material3-definition.scss +0 -1
  239. package/styles/context-menu/_tailwind-definition.scss +0 -1
  240. package/styles/context-menu/_theme-mixin.scss +13 -0
  241. package/styles/context-menu/_theme.scss +6 -3
  242. package/styles/context-menu/bootstrap-dark.css +19 -11
  243. package/styles/context-menu/bootstrap.css +21 -12
  244. package/styles/context-menu/bootstrap4.css +21 -12
  245. package/styles/context-menu/bootstrap5-dark.css +36 -14
  246. package/styles/context-menu/bootstrap5.css +36 -14
  247. package/styles/context-menu/fabric-dark.css +19 -11
  248. package/styles/context-menu/fabric.css +19 -11
  249. package/styles/context-menu/fluent-dark.css +36 -14
  250. package/styles/context-menu/fluent.css +36 -14
  251. package/styles/context-menu/fluent2.css +1497 -0
  252. package/styles/context-menu/fluent2.scss +7 -0
  253. package/styles/context-menu/highcontrast-light.css +19 -11
  254. package/styles/context-menu/highcontrast.css +19 -11
  255. package/styles/context-menu/icons/_bds.scss +0 -2
  256. package/styles/context-menu/icons/_bootstrap-dark.scss +0 -2
  257. package/styles/context-menu/icons/_bootstrap.scss +0 -2
  258. package/styles/context-menu/icons/_bootstrap4.scss +0 -2
  259. package/styles/context-menu/icons/_bootstrap5.3.scss +31 -0
  260. package/styles/context-menu/icons/_bootstrap5.scss +0 -2
  261. package/styles/context-menu/icons/_fabric-dark.scss +0 -2
  262. package/styles/context-menu/icons/_fabric.scss +0 -2
  263. package/styles/context-menu/icons/_fluent.scss +0 -2
  264. package/styles/context-menu/icons/_fluent2.scss +31 -0
  265. package/styles/context-menu/icons/_fusionnew.scss +0 -2
  266. package/styles/context-menu/icons/_highcontrast-light.scss +0 -2
  267. package/styles/context-menu/icons/_highcontrast.scss +0 -2
  268. package/styles/context-menu/icons/_material-dark.scss +0 -2
  269. package/styles/context-menu/icons/_material.scss +0 -2
  270. package/styles/context-menu/icons/_material3.scss +0 -2
  271. package/styles/context-menu/icons/_tailwind-dark.scss +0 -2
  272. package/styles/context-menu/icons/_tailwind.scss +0 -2
  273. package/styles/context-menu/material-dark.css +49 -15
  274. package/styles/context-menu/material.css +49 -15
  275. package/styles/context-menu/material3-dark.css +38 -15
  276. package/styles/context-menu/material3.css +38 -15
  277. package/styles/context-menu/tailwind-dark.css +36 -14
  278. package/styles/context-menu/tailwind.css +36 -14
  279. package/styles/fabric-dark.css +1040 -641
  280. package/styles/fabric-dark.scss +47 -14
  281. package/styles/fabric.css +1042 -652
  282. package/styles/fabric.scss +47 -14
  283. package/styles/fluent-dark.css +1074 -698
  284. package/styles/fluent-dark.scss +47 -14
  285. package/styles/fluent.css +1074 -698
  286. package/styles/fluent.scss +47 -14
  287. package/styles/fluent2.css +13003 -0
  288. package/styles/fluent2.scss +47 -0
  289. package/styles/h-scroll/_bootstrap5.3-definition.scss +83 -0
  290. package/styles/h-scroll/_fluent2-definition.scss +83 -0
  291. package/styles/h-scroll/bootstrap-dark.css +22 -10
  292. package/styles/h-scroll/bootstrap.css +22 -10
  293. package/styles/h-scroll/bootstrap4.css +22 -10
  294. package/styles/h-scroll/bootstrap5-dark.css +41 -14
  295. package/styles/h-scroll/bootstrap5.css +41 -14
  296. package/styles/h-scroll/fabric-dark.css +22 -10
  297. package/styles/h-scroll/fabric.css +22 -10
  298. package/styles/h-scroll/fluent-dark.css +41 -14
  299. package/styles/h-scroll/fluent.css +41 -14
  300. package/styles/h-scroll/fluent2.css +1341 -0
  301. package/styles/h-scroll/fluent2.scss +4 -0
  302. package/styles/h-scroll/highcontrast-light.css +22 -10
  303. package/styles/h-scroll/highcontrast.css +22 -10
  304. package/styles/h-scroll/icons/_bootstrap5.3.scss +49 -0
  305. package/styles/h-scroll/icons/_fluent2.scss +49 -0
  306. package/styles/h-scroll/material-dark.css +41 -14
  307. package/styles/h-scroll/material.css +41 -14
  308. package/styles/h-scroll/material3-dark.css +44 -15
  309. package/styles/h-scroll/material3.css +44 -15
  310. package/styles/h-scroll/tailwind-dark.css +41 -14
  311. package/styles/h-scroll/tailwind.css +41 -14
  312. package/styles/highcontrast-light.css +1040 -641
  313. package/styles/highcontrast-light.scss +47 -14
  314. package/styles/highcontrast.css +1056 -655
  315. package/styles/highcontrast.scss +47 -14
  316. package/styles/material-dark.css +1144 -709
  317. package/styles/material-dark.scss +47 -14
  318. package/styles/material.css +1157 -726
  319. package/styles/material.scss +47 -14
  320. package/styles/material3-dark.css +1148 -731
  321. package/styles/material3-dark.scss +47 -14
  322. package/styles/material3.css +1148 -731
  323. package/styles/material3.scss +47 -14
  324. package/styles/menu/_bds-definition.scss +0 -1
  325. package/styles/menu/_bootstrap-dark-definition.scss +0 -3
  326. package/styles/menu/_bootstrap5-definition.scss +0 -1
  327. package/styles/menu/_bootstrap5.3-definition.scss +66 -0
  328. package/styles/menu/_fabric-dark-definition.scss +0 -3
  329. package/styles/menu/_fluent-definition.scss +0 -1
  330. package/styles/menu/_fluent2-definition.scss +67 -0
  331. package/styles/menu/_fusionnew-definition.scss +0 -1
  332. package/styles/menu/_layout.scss +38 -17
  333. package/styles/menu/_material-dark-definition.scss +0 -3
  334. package/styles/menu/_material3-definition.scss +0 -1
  335. package/styles/menu/_tailwind-definition.scss +0 -1
  336. package/styles/menu/_theme.scss +46 -14
  337. package/styles/menu/bootstrap-dark.css +41 -39
  338. package/styles/menu/bootstrap.css +43 -40
  339. package/styles/menu/bootstrap4.css +47 -50
  340. package/styles/menu/bootstrap5-dark.css +58 -42
  341. package/styles/menu/bootstrap5.css +58 -42
  342. package/styles/menu/fabric-dark.css +41 -39
  343. package/styles/menu/fabric.css +41 -39
  344. package/styles/menu/fluent-dark.css +60 -47
  345. package/styles/menu/fluent.css +60 -47
  346. package/styles/menu/fluent2.css +2226 -0
  347. package/styles/menu/fluent2.scss +8 -0
  348. package/styles/menu/highcontrast-light.css +41 -39
  349. package/styles/menu/highcontrast.css +41 -39
  350. package/styles/menu/icons/_bds.scss +2 -32
  351. package/styles/menu/icons/_bootstrap-dark.scss +2 -31
  352. package/styles/menu/icons/_bootstrap.scss +2 -32
  353. package/styles/menu/icons/_bootstrap4.scss +2 -32
  354. package/styles/menu/icons/_bootstrap5.3.scss +104 -0
  355. package/styles/menu/icons/_bootstrap5.scss +2 -32
  356. package/styles/menu/icons/_fabric-dark.scss +2 -32
  357. package/styles/menu/icons/_fabric.scss +2 -32
  358. package/styles/menu/icons/_fluent.scss +2 -32
  359. package/styles/menu/icons/_fluent2.scss +104 -0
  360. package/styles/menu/icons/_fusionnew.scss +2 -32
  361. package/styles/menu/icons/_highcontrast-light.scss +2 -32
  362. package/styles/menu/icons/_highcontrast.scss +2 -32
  363. package/styles/menu/icons/_material-dark.scss +2 -32
  364. package/styles/menu/icons/_material.scss +2 -32
  365. package/styles/menu/icons/_material3.scss +2 -32
  366. package/styles/menu/icons/_tailwind-dark.scss +2 -32
  367. package/styles/menu/icons/_tailwind.scss +2 -32
  368. package/styles/menu/material-dark.css +71 -43
  369. package/styles/menu/material.css +71 -43
  370. package/styles/menu/material3-dark.css +61 -43
  371. package/styles/menu/material3.css +61 -43
  372. package/styles/menu/tailwind-dark.css +58 -42
  373. package/styles/menu/tailwind.css +58 -42
  374. package/styles/pager/_bds-definition.scss +6 -6
  375. package/styles/pager/_bootstrap-dark-definition.scss +2 -2
  376. package/styles/pager/_bootstrap-definition.scss +8 -8
  377. package/styles/pager/_bootstrap4-definition.scss +10 -10
  378. package/styles/pager/_bootstrap5-definition.scss +19 -19
  379. package/styles/pager/_bootstrap5.3-definition.scss +166 -0
  380. package/styles/pager/_fabric-dark-definition.scss +3 -5
  381. package/styles/pager/_fabric-definition.scss +3 -3
  382. package/styles/pager/_fluent-definition.scss +11 -11
  383. package/styles/pager/_fluent2-definition.scss +152 -0
  384. package/styles/pager/_fusionnew-definition.scss +19 -19
  385. package/styles/pager/_highcontrast-definition.scss +2 -2
  386. package/styles/pager/_highcontrast-light-definition.scss +2 -4
  387. package/styles/pager/_layout.scss +340 -339
  388. package/styles/pager/_material-dark-definition.scss +4 -6
  389. package/styles/pager/_material-definition.scss +4 -4
  390. package/styles/pager/_material3-definition.scss +22 -22
  391. package/styles/pager/_tailwind-definition.scss +17 -17
  392. package/styles/pager/_theme.scss +43 -26
  393. package/styles/pager/bootstrap-dark.css +88 -76
  394. package/styles/pager/bootstrap.css +90 -78
  395. package/styles/pager/bootstrap4.css +90 -78
  396. package/styles/pager/bootstrap5-dark.css +114 -111
  397. package/styles/pager/bootstrap5.css +114 -111
  398. package/styles/pager/fabric-dark.css +86 -74
  399. package/styles/pager/fabric.css +86 -74
  400. package/styles/pager/fluent-dark.css +92 -80
  401. package/styles/pager/fluent.css +92 -80
  402. package/styles/pager/fluent2.css +1862 -0
  403. package/styles/pager/fluent2.scss +4 -0
  404. package/styles/pager/highcontrast-light.css +86 -74
  405. package/styles/pager/highcontrast.css +86 -74
  406. package/styles/pager/icons/_bootstrap5.3.scss +50 -0
  407. package/styles/pager/icons/_fluent2.scss +50 -0
  408. package/styles/pager/material-dark.css +86 -74
  409. package/styles/pager/material.css +86 -74
  410. package/styles/pager/material3-dark.css +107 -106
  411. package/styles/pager/material3.css +107 -106
  412. package/styles/pager/tailwind-dark.css +139 -144
  413. package/styles/pager/tailwind.css +139 -144
  414. package/styles/sidebar/_bds-definition.scss +8 -0
  415. package/styles/sidebar/_bootstrap5.3-definition.scss +6 -0
  416. package/styles/sidebar/_fluent2-definition.scss +8 -0
  417. package/styles/sidebar/_material3-definition.scss +0 -3
  418. package/styles/sidebar/_theme.scss +114 -45
  419. package/styles/sidebar/bootstrap-dark.css +124 -49
  420. package/styles/sidebar/bootstrap.css +124 -49
  421. package/styles/sidebar/bootstrap4.css +124 -49
  422. package/styles/sidebar/bootstrap5-dark.css +122 -47
  423. package/styles/sidebar/bootstrap5.css +122 -47
  424. package/styles/sidebar/fabric-dark.css +124 -49
  425. package/styles/sidebar/fabric.css +124 -49
  426. package/styles/sidebar/fluent-dark.css +122 -47
  427. package/styles/sidebar/fluent.css +122 -47
  428. package/styles/sidebar/fluent2.css +1263 -0
  429. package/styles/sidebar/fluent2.scss +3 -0
  430. package/styles/sidebar/highcontrast-light.css +124 -49
  431. package/styles/sidebar/highcontrast.css +124 -49
  432. package/styles/sidebar/material-dark.css +124 -49
  433. package/styles/sidebar/material.css +124 -49
  434. package/styles/sidebar/material3-dark.css +125 -49
  435. package/styles/sidebar/material3.css +125 -49
  436. package/styles/sidebar/tailwind-dark.css +122 -47
  437. package/styles/sidebar/tailwind.css +122 -47
  438. package/styles/stepper/_bds-definition.scss +0 -7
  439. package/styles/stepper/_bootstrap-dark-definition.scss +0 -7
  440. package/styles/stepper/_bootstrap-definition.scss +0 -7
  441. package/styles/stepper/_bootstrap4-definition.scss +0 -7
  442. package/styles/stepper/_bootstrap5-definition.scss +0 -7
  443. package/styles/stepper/_bootstrap5.3-definition.scss +73 -0
  444. package/styles/stepper/_fabric-dark-definition.scss +0 -7
  445. package/styles/stepper/_fabric-definition.scss +0 -7
  446. package/styles/stepper/_fluent-definition.scss +0 -7
  447. package/styles/stepper/_fluent2-definition.scss +72 -0
  448. package/styles/stepper/_fusionnew-definition.scss +0 -7
  449. package/styles/stepper/_highcontrast-definition.scss +0 -7
  450. package/styles/stepper/_highcontrast-light-definition.scss +0 -7
  451. package/styles/stepper/_layout.scss +90 -143
  452. package/styles/stepper/_material-dark-definition.scss +0 -7
  453. package/styles/stepper/_material-definition.scss +0 -7
  454. package/styles/stepper/_material3-definition.scss +0 -7
  455. package/styles/stepper/_tailwind-definition.scss +0 -7
  456. package/styles/stepper/_theme.scss +12 -20
  457. package/styles/stepper/bootstrap-dark.css +162 -118
  458. package/styles/stepper/bootstrap.css +162 -118
  459. package/styles/stepper/bootstrap4.css +162 -118
  460. package/styles/stepper/bootstrap5-dark.css +162 -118
  461. package/styles/stepper/bootstrap5.css +162 -118
  462. package/styles/stepper/fabric-dark.css +162 -118
  463. package/styles/stepper/fabric.css +162 -118
  464. package/styles/stepper/fluent-dark.css +162 -118
  465. package/styles/stepper/fluent.css +162 -118
  466. package/styles/stepper/fluent2.css +1742 -0
  467. package/styles/stepper/fluent2.scss +5 -0
  468. package/styles/stepper/highcontrast-light.css +162 -118
  469. package/styles/stepper/highcontrast.css +162 -118
  470. package/styles/stepper/icons/_bootstrap5.3.scss +5 -0
  471. package/styles/stepper/icons/_fluent2.scss +5 -0
  472. package/styles/stepper/material-dark.css +162 -118
  473. package/styles/stepper/material.css +162 -118
  474. package/styles/stepper/material3-dark.css +167 -119
  475. package/styles/stepper/material3.css +167 -119
  476. package/styles/stepper/tailwind-dark.css +162 -118
  477. package/styles/stepper/tailwind.css +162 -118
  478. package/styles/tab/_bds-definition.scss +5 -45
  479. package/styles/tab/_bootstrap-dark-definition.scss +0 -26
  480. package/styles/tab/_bootstrap-definition.scss +0 -35
  481. package/styles/tab/_bootstrap4-definition.scss +9 -42
  482. package/styles/tab/_bootstrap5-definition.scss +0 -26
  483. package/styles/tab/_bootstrap5.3-definition.scss +635 -0
  484. package/styles/tab/_fabric-dark-definition.scss +0 -22
  485. package/styles/tab/_fabric-definition.scss +1 -36
  486. package/styles/tab/_fluent-definition.scss +0 -31
  487. package/styles/tab/_fluent2-definition.scss +667 -0
  488. package/styles/tab/_fusionnew-definition.scss +0 -26
  489. package/styles/tab/_highcontrast-definition.scss +0 -35
  490. package/styles/tab/_highcontrast-light-definition.scss +0 -24
  491. package/styles/tab/_icons.scss +0 -2
  492. package/styles/tab/_layout.scss +29 -31
  493. package/styles/tab/_material-dark-definition.scss +0 -28
  494. package/styles/tab/_material-definition.scss +0 -39
  495. package/styles/tab/_material3-definition.scss +3 -28
  496. package/styles/tab/_tailwind-definition.scss +0 -39
  497. package/styles/tab/_theme.scss +21 -2
  498. package/styles/tab/bootstrap-dark.css +171 -78
  499. package/styles/tab/bootstrap.css +171 -83
  500. package/styles/tab/bootstrap4.css +177 -87
  501. package/styles/tab/bootstrap5-dark.css +171 -84
  502. package/styles/tab/bootstrap5.css +171 -84
  503. package/styles/tab/fabric-dark.css +171 -78
  504. package/styles/tab/fabric.css +173 -85
  505. package/styles/tab/fluent-dark.css +171 -81
  506. package/styles/tab/fluent.css +171 -81
  507. package/styles/tab/fluent2.css +5251 -0
  508. package/styles/tab/fluent2.scss +5 -0
  509. package/styles/tab/highcontrast-light.css +171 -78
  510. package/styles/tab/highcontrast.css +171 -83
  511. package/styles/tab/icons/_bds.scss +0 -2
  512. package/styles/tab/icons/_bootstrap-dark.scss +0 -2
  513. package/styles/tab/icons/_bootstrap.scss +0 -2
  514. package/styles/tab/icons/_bootstrap4.scss +0 -2
  515. package/styles/tab/icons/_bootstrap5.3.scss +90 -0
  516. package/styles/tab/icons/_bootstrap5.scss +0 -2
  517. package/styles/tab/icons/_fabric-dark.scss +0 -2
  518. package/styles/tab/icons/_fabric.scss +0 -2
  519. package/styles/tab/icons/_fluent.scss +0 -2
  520. package/styles/tab/icons/_fluent2.scss +98 -0
  521. package/styles/tab/icons/_fusionnew.scss +0 -2
  522. package/styles/tab/icons/_highcontrast-light.scss +0 -2
  523. package/styles/tab/icons/_highcontrast.scss +0 -2
  524. package/styles/tab/icons/_material-dark.scss +0 -2
  525. package/styles/tab/icons/_material.scss +0 -2
  526. package/styles/tab/icons/_material3.scss +0 -2
  527. package/styles/tab/icons/_tailwind.scss +0 -2
  528. package/styles/tab/material-dark.css +232 -84
  529. package/styles/tab/material.css +232 -90
  530. package/styles/tab/material3-dark.css +174 -85
  531. package/styles/tab/material3.css +174 -85
  532. package/styles/tab/tailwind-dark.css +217 -87
  533. package/styles/tab/tailwind.css +217 -87
  534. package/styles/tailwind-dark.css +1165 -763
  535. package/styles/tailwind-dark.scss +47 -14
  536. package/styles/tailwind.css +1165 -763
  537. package/styles/tailwind.scss +47 -14
  538. package/styles/toolbar/_bds-definition.scss +0 -18
  539. package/styles/toolbar/_bootstrap-dark-definition.scss +0 -15
  540. package/styles/toolbar/_bootstrap-definition.scss +0 -3
  541. package/styles/toolbar/_bootstrap4-definition.scss +0 -13
  542. package/styles/toolbar/_bootstrap5-definition.scss +0 -22
  543. package/styles/toolbar/_bootstrap5.3-definition.scss +198 -0
  544. package/styles/toolbar/_fabric-dark-definition.scss +0 -15
  545. package/styles/toolbar/_fabric-definition.scss +0 -13
  546. package/styles/toolbar/_fluent-definition.scss +0 -13
  547. package/styles/toolbar/_fluent2-definition.scss +197 -0
  548. package/styles/toolbar/_fusionnew-definition.scss +0 -22
  549. package/styles/toolbar/_highcontrast-definition.scss +0 -14
  550. package/styles/toolbar/_highcontrast-light-definition.scss +0 -15
  551. package/styles/toolbar/_layout.scss +18 -32
  552. package/styles/toolbar/_material-dark-definition.scss +0 -16
  553. package/styles/toolbar/_material-definition.scss +0 -16
  554. package/styles/toolbar/_material3-definition.scss +0 -21
  555. package/styles/toolbar/_tailwind-definition.scss +0 -13
  556. package/styles/toolbar/_theme.scss +66 -5
  557. package/styles/toolbar/bootstrap-dark.css +94 -61
  558. package/styles/toolbar/bootstrap.css +96 -62
  559. package/styles/toolbar/bootstrap4.css +96 -62
  560. package/styles/toolbar/bootstrap5-dark.css +111 -64
  561. package/styles/toolbar/bootstrap5.css +111 -64
  562. package/styles/toolbar/fabric-dark.css +94 -61
  563. package/styles/toolbar/fabric.css +94 -61
  564. package/styles/toolbar/fluent-dark.css +111 -64
  565. package/styles/toolbar/fluent.css +111 -64
  566. package/styles/toolbar/fluent2.css +2224 -0
  567. package/styles/toolbar/fluent2.scss +8 -0
  568. package/styles/toolbar/highcontrast-light.css +94 -61
  569. package/styles/toolbar/highcontrast.css +94 -61
  570. package/styles/toolbar/icons/_bds.scss +0 -2
  571. package/styles/toolbar/icons/_bootstrap-dark.scss +0 -2
  572. package/styles/toolbar/icons/_bootstrap.scss +0 -2
  573. package/styles/toolbar/icons/_bootstrap4.scss +0 -2
  574. package/styles/toolbar/icons/_bootstrap5.3.scss +14 -0
  575. package/styles/toolbar/icons/_bootstrap5.scss +0 -2
  576. package/styles/toolbar/icons/_fabric-dark.scss +0 -2
  577. package/styles/toolbar/icons/_fabric.scss +0 -2
  578. package/styles/toolbar/icons/_fluent.scss +0 -2
  579. package/styles/toolbar/icons/_fluent2.scss +14 -0
  580. package/styles/toolbar/icons/_fusionnew.scss +0 -2
  581. package/styles/toolbar/icons/_highcontrast-light.scss +0 -2
  582. package/styles/toolbar/icons/_highcontrast.scss +0 -2
  583. package/styles/toolbar/icons/_material-dark.scss +0 -2
  584. package/styles/toolbar/icons/_material.scss +0 -2
  585. package/styles/toolbar/icons/_material3.scss +0 -2
  586. package/styles/toolbar/icons/_tailwind.scss +0 -2
  587. package/styles/toolbar/material-dark.css +143 -69
  588. package/styles/toolbar/material.css +143 -70
  589. package/styles/toolbar/material3-dark.css +123 -65
  590. package/styles/toolbar/material3.css +123 -65
  591. package/styles/toolbar/tailwind-dark.css +111 -64
  592. package/styles/toolbar/tailwind.css +111 -64
  593. package/styles/treeview/_bootstrap5.3-definition.scss +119 -0
  594. package/styles/treeview/_fluent2-definition.scss +126 -0
  595. package/styles/treeview/_layout.scss +154 -146
  596. package/styles/treeview/_material3-definition.scss +1 -12
  597. package/styles/treeview/_theme.scss +154 -168
  598. package/styles/treeview/bootstrap-dark.css +106 -98
  599. package/styles/treeview/bootstrap.css +112 -100
  600. package/styles/treeview/bootstrap4.css +112 -104
  601. package/styles/treeview/bootstrap5-dark.css +112 -103
  602. package/styles/treeview/bootstrap5.css +112 -103
  603. package/styles/treeview/fabric-dark.css +106 -98
  604. package/styles/treeview/fabric.css +106 -98
  605. package/styles/treeview/fluent-dark.css +112 -103
  606. package/styles/treeview/fluent.css +112 -103
  607. package/styles/treeview/fluent2.css +2052 -0
  608. package/styles/treeview/fluent2.scss +6 -0
  609. package/styles/treeview/highcontrast-light.css +106 -98
  610. package/styles/treeview/highcontrast.css +122 -103
  611. package/styles/treeview/icons/_bootstrap5.3.scss +43 -0
  612. package/styles/treeview/icons/_fluent2.scss +43 -0
  613. package/styles/treeview/material-dark.css +115 -99
  614. package/styles/treeview/material.css +129 -101
  615. package/styles/treeview/material3-dark.css +136 -109
  616. package/styles/treeview/material3.css +136 -109
  617. package/styles/treeview/tailwind-dark.css +113 -105
  618. package/styles/treeview/tailwind.css +113 -105
  619. package/styles/v-scroll/_bootstrap5.3-definition.scss +49 -0
  620. package/styles/v-scroll/_fluent2-definition.scss +49 -0
  621. package/styles/v-scroll/bootstrap-dark.css +22 -10
  622. package/styles/v-scroll/bootstrap.css +22 -10
  623. package/styles/v-scroll/bootstrap4.css +22 -10
  624. package/styles/v-scroll/bootstrap5-dark.css +22 -10
  625. package/styles/v-scroll/bootstrap5.css +22 -10
  626. package/styles/v-scroll/fabric-dark.css +22 -10
  627. package/styles/v-scroll/fabric.css +22 -10
  628. package/styles/v-scroll/fluent-dark.css +22 -10
  629. package/styles/v-scroll/fluent.css +22 -10
  630. package/styles/v-scroll/fluent2.css +1248 -0
  631. package/styles/v-scroll/fluent2.scss +4 -0
  632. package/styles/v-scroll/highcontrast-light.css +22 -10
  633. package/styles/v-scroll/highcontrast.css +22 -10
  634. package/styles/v-scroll/icons/_bootstrap5.3.scss +27 -0
  635. package/styles/v-scroll/icons/_fluent2.scss +27 -0
  636. package/styles/v-scroll/material-dark.css +41 -14
  637. package/styles/v-scroll/material.css +41 -14
  638. package/styles/v-scroll/material3-dark.css +25 -11
  639. package/styles/v-scroll/material3.css +25 -11
  640. package/styles/v-scroll/tailwind-dark.css +22 -10
  641. package/styles/v-scroll/tailwind.css +22 -10
  642. package/CHANGELOG.md +0 -2355
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * filename: ej2-navigations.min.js
3
- * version : 25.2.4
3
+ * version : 26.1.35
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionButtons"),require("SyncfusionLists"),require("SyncfusionData"),require("SyncfusionInputs")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionButtons","SyncfusionLists","SyncfusionData","SyncfusionInputs"],t):"object"==typeof exports?exports.SyncfusionNavigations=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionButtons"),require("SyncfusionLists"),require("SyncfusionData"),require("SyncfusionInputs")):e.SyncfusionNavigations=t(e.SyncfusionBase,e.SyncfusionPopups,e.SyncfusionButtons,e.SyncfusionLists,e.SyncfusionData,e.SyncfusionInputs)}(this,function(e,t,i,s,n,r){return function(e){function t(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=28)}([function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var s=i(0),n=(i.n(s),this&&this.__extends||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)}}()),r=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},o=function(e){function t(t,i){return e.call(this,t,i)||this}return n(t,e),t.prototype.preRender=function(){this.browser=s.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=s.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=i.i(s.getUniqueID)("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},t.prototype.render=function(){this.touchModule=new s.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),s.EventHandler.add(this.scrollEle,"scroll",this.scrollHandler,this),this.isDevice?(this.element.classList.add("e-scroll-device"),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},t.prototype.setScrollState=function(){i.i(s.isNullOrUndefined)(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},t.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=[].slice.call(i.children),n=0,r=s;n<r.length;n++){var o=r[n];e.appendChild(o)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},t.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},t.prototype.getModuleName=function(){return"hScroll"},t.prototype.destroy=function(){var t=this.element;t.style.display="",t.classList.remove("e-hscroll"),t.classList.remove("e-scroll-device"),t.classList.remove("e-rtl");var n=i.i(s.selectAll)(".e-"+t.id+"_nav.e-scroll-nav",t),r=i.i(s.selectAll)(".e-scroll-overlay",t);[].slice.call(r).forEach(function(e){i.i(s.detach)(e)});for(var o=0,a=[].slice.call(this.scrollItems.children);o<a.length;o++){var l=a[o];t.appendChild(l)}this.uniqueId&&this.element.removeAttribute("id"),i.i(s.detach)(this.scrollEle),n.length>0&&(i.i(s.detach)(n[0]),i.i(s.isNullOrUndefined)(n[1])||i.i(s.detach)(n[1])),s.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},t.prototype.disable=function(e){var t=i.i(s.selectAll)(".e-scroll-nav:not(.e-overlay)",this.element);e?this.element.classList.add("e-overlay"):this.element.classList.remove("e-overlay"),[].slice.call(t).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},t.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:"e-scroll-overlay e-scroll-right-overlay"}),s="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),n=this.createElement("div",{id:t.concat("_right"),className:s}),r=this.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"});n.appendChild(r);var o=this.createElement("div",{className:"e-scroll-overlay e-scroll-left-overlay"});this.ieCheck&&n.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(n),e.insertBefore(o,e.firstChild),this.eventBinding([n])},t.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-scroll-nav e-scroll-right-nav"),s={role:"button",id:t.concat("_right"),"aria-label":"Scroll right"},n=this.createElement("div",{className:i,attrs:s});n.setAttribute("aria-disabled","false");var r=this.createElement("div",{className:"e-nav-right-arrow e-nav-arrow e-icons"}),o="e-"+e.id.concat("_nav e-scroll-nav e-scroll-left-nav"),a={role:"button",id:t.concat("_left"),"aria-label":"Scroll left"},l=this.createElement("div",{className:o+" e-overlay",attrs:a});l.setAttribute("aria-disabled","true");var d=this.createElement("div",{className:"e-nav-left-arrow e-nav-arrow e-icons"});l.appendChild(d),n.appendChild(r),e.appendChild(n),e.insertBefore(l,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),l.classList.add("e-ie-align")),this.eventBinding([n,l])},t.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)};this.keyTimer=window.setTimeout(function(){i()},100)}},t.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},t.prototype.eventBinding=function(e){var t=this;[].slice.call(e).forEach(function(e){new s.Touch(e,{tapHold:t.tabHoldHandler.bind(t),tapHoldThreshold:500}),e.addEventListener("keydown",t.onKeyPress.bind(t)),e.addEventListener("keyup",t.onKeyUp.bind(t)),e.addEventListener("mouseup",t.repeatScroll.bind(t)),e.addEventListener("touchend",t.repeatScroll.bind(t)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),s.EventHandler.add(e,"click",t.clickEventHandler,t)})},t.prototype.repeatScroll=function(){clearInterval(this.timeout)},t.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var s=function(){t.eleScrolling(10,i,!0)};this.timeout=window.setInterval(function(){s()},50)},t.prototype.contains=function(e,t){return e.classList.contains(t)},t.prototype.eleScrolling=function(e,t,i){var s=this.element,n=t.classList;n.contains("e-scroll-nav")&&(n=t.querySelector(".e-nav-arrow").classList),this.contains(s,"e-rtl")&&this.browserCheck&&(e=-e),!this.contains(s,"e-rtl")||this.browserCheck||this.ieCheck?n.contains("e-nav-right-arrow")?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):n.contains("e-nav-left-arrow")?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},t.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},t.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 r=Math.sin(s);r<=0?window.cancelAnimationFrame(r):("Left"===e.swipeDirection?i.scrollLeft+=t*r:"Right"===e.swipeDirection&&(i.scrollLeft-=t*r),s-=.5,window.requestAnimationFrame(n))};n()},t.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e,this.enableRtl&&this.scrollEle.scrollLeft>0&&(this.scrollEle.scrollLeft=0)},t.prototype.frameScrollRequest=function(e,t,n){var r=this;if(n)return void this.scrollUpdating(e,t);this.customStep||[].slice.call(i.i(s.selectAll)(".e-scroll-overlay",this.element)).forEach(function(t){e-=t.offsetWidth});var o=function(){var i,s;r.contains(r.element,"e-rtl")&&r.browserCheck?(i=-e,s=-10):(i=e,s=10),i<10?window.cancelAnimationFrame(s):(r.scrollUpdating(s,t),e-=s,window.requestAnimationFrame(o))};o()},t.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceX;this.ieCheck&&this.contains(this.element,"e-rtl")&&(i=-i),"Left"===e.scrollDirection?t.scrollLeft=t.scrollLeft+i:"Right"===e.scrollDirection&&(t.scrollLeft=t.scrollLeft-i)},t.prototype.arrowDisabling=function(e,t){if(this.isDevice){var n=i.i(s.isNullOrUndefined)(e)?t:e,r=n.querySelector(".e-nav-arrow");i.i(s.isNullOrUndefined)(e)?i.i(s.classList)(r,["e-nav-right-arrow"],["e-nav-left-arrow"]):i.i(s.classList)(r,["e-nav-left-arrow"],["e-nav-right-arrow"])}else e&&t&&(e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false"),t.setAttribute("tabindex","0"));this.repeatScroll()},t.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,s=(this.element,this.element.querySelector(".e-scroll-left-nav")),n=this.element.querySelector(".e-scroll-right-nav"),r=this.element.querySelector(".e-scroll-left-overlay"),o=this.element.querySelector(".e-scroll-right-overlay"),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(r=this.element.querySelector(".e-scroll-right-overlay"),o=this.element.querySelector(".e-scroll-left-overlay")),r.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?o.style.width=t.scrollWidth-Math.ceil(i+a)+"px":o.style.width="40px"),0===a)this.arrowDisabling(s,n);else if(Math.ceil(i+a+.1)>=t.scrollWidth)this.arrowDisabling(n,s);else{var l=this.element.querySelector(".e-scroll-nav.e-overlay");l&&(l.classList.remove("e-overlay"),l.setAttribute("aria-disabled","false"),l.setAttribute("tabindex","0"))}},t.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")}}},r([i.i(s.Property)(null)],t.prototype,"scrollStep",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return g}),i.d(t,"c",function(){return y}),i.d(t,"d",function(){return b}),i.d(t,"b",function(){return C});var s=i(0),n=(i.n(s),i(6)),r=(i.n(n),i(1)),o=(i.n(r),i(2)),a=i(4),l=i(7),d=this&&this.__extends||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)}}(),h=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},c="e-focused",p="e-menu-header",u="e-selected",f="e-menu-item",m="e-menu-hide",v="e-menu-popup",g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),h([i.i(s.Property)("id")],t.prototype,"itemId",void 0),h([i.i(s.Property)("parentId")],t.prototype,"parentId",void 0),h([i.i(s.Property)("text")],t.prototype,"text",void 0),h([i.i(s.Property)("iconCss")],t.prototype,"iconCss",void 0),h([i.i(s.Property)("url")],t.prototype,"url",void 0),h([i.i(s.Property)("separator")],t.prototype,"separator",void 0),h([i.i(s.Property)("items")],t.prototype,"children",void 0),t}(s.ChildProperty),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),h([i.i(s.Property)(null)],t.prototype,"iconCss",void 0),h([i.i(s.Property)("")],t.prototype,"id",void 0),h([i.i(s.Property)(!1)],t.prototype,"separator",void 0),h([i.i(s.Collection)([],t)],t.prototype,"items",void 0),h([i.i(s.Property)("")],t.prototype,"text",void 0),h([i.i(s.Property)("")],t.prototype,"url",void 0),t}(s.ChildProperty),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),h([i.i(s.Property)("SlideDown")],t.prototype,"effect",void 0),h([i.i(s.Property)(400)],t.prototype,"duration",void 0),h([i.i(s.Property)("ease")],t.prototype,"easing",void 0),t}(s.ChildProperty),C=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.navIdx=[],n.animation=new s.Animation({}),n.isTapHold=!1,n.tempItem=[],n.showSubMenuOn="Auto",n}return d(t,e),t.prototype.preRender=function(){if(!this.isMenu){var e=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){e=this.createElement("ul",{id:i.i(s.getUniqueID)(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var t=i.i(s.getValue)("ej2_instances",this.element);i.i(s.removeClass)([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=e,i.i(s.setValue)("ej2_instances",t,this.element)}else{e=this.createElement("ul",{id:i.i(s.getUniqueID)(this.getModuleName())}),i.i(s.append)([].slice.call(this.element.cloneNode(!0).children),e);var n=this.element.nextElementSibling;n?this.element.parentElement.insertBefore(e,n):this.element.parentElement.appendChild(e),this.clonedElement=e}this.clonedElement.style.display="none"}if("EJS-MENU"===this.element.tagName){for(var r=this.element,o=i.i(s.getValue)("ej2_instances",r),e=this.createElement("ul"),a=this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"}),l=0,d=r.attributes.length;l<d;l++)e.setAttribute(r.attributes[l].nodeName,r.attributes[l].nodeValue);r.parentNode.insertBefore(a,r),i.i(s.detach)(r),r=e,a.appendChild(r),i.i(s.setValue)("ej2_instances",o,r),this.clonedElement=a,this.element=r,this.element.id||(this.element.id=i.i(s.getUniqueID)(this.getModuleName()))}},t.prototype.render=function(){var e=this;this.initialize(),this.renderItems(),this.wireEvents(),this.renderComplete();var t=this.getWrapper();this.template&&this.enableScrolling&&(this.isReact||this.isAngular)&&requestAnimationFrame(function(){i.i(l.a)(e.createElement,t,e.element,"hscroll",e.enableRtl)})},t.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&&i.i(s.addClass)([e],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.enableRtl&&e.classList.add("e-rtl"),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e)),this.defaultOption=this.showItemOnClick},t.prototype.renderItems=function(){if(!this.items.length){var e=n.ListBase.createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),i.i(s.isBlazor)()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var t=this.createItems(this.items);if(i.i(s.append)(Array.prototype.slice.call(t.children),this.element),this.element.classList.add("e-menu-parent"),this.isMenu){if(!this.hamburgerMode&&this.element.classList.contains("e-vertical")&&this.setBlankIconStyle(this.element),this.enableScrolling){var r=this.getWrapper();this.element.classList.contains("e-vertical")?i.i(l.a)(this.createElement,r,this.element,"vscroll",this.enableRtl):i.i(l.a)(this.createElement,r,this.element,"hscroll",this.enableRtl)}}else this.element.parentElement.setAttribute("role","dialog"),this.element.parentElement.setAttribute("aria-label","context menu")},t.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var t=void 0,n=i.i(s.selectAll)(this.target),o=0,a=n.length;o<a;o++)t=n[o],this.isMenu?s.EventHandler.add(t,"click",this.menuHeaderClickHandler,this):s.Browser.isIos?new s.Touch(t,{tapHold:this.touchHandler.bind(this)}):s.EventHandler.add(t,"contextmenu",this.cmenuHandler,this);if(this.targetElement=t,!this.isMenu){s.EventHandler.add(this.targetElement,"scroll",this.scrollHandler,this);for(var l=0,d=i.i(r.getScrollableParent)(this.targetElement);l<d.length;l++){var h=d[l];s.EventHandler.add(h,"scroll",this.scrollHandler,this)}}}s.Browser.isDevice||(this.delegateMoverHandler=this.moverHandler.bind(this),this.delegateMouseDownHandler=this.mouseDownHandler.bind(this),s.EventHandler.add(this.isMenu?document:e,"mouseover",this.delegateMoverHandler,this),s.EventHandler.add(document,"mousedown",this.delegateMouseDownHandler,this)),this.delegateClickHandler=this.clickHandler.bind(this),s.EventHandler.add(document,"click",this.delegateClickHandler,this),this.wireKeyboardEvent(e),this.rippleFn=i.i(s.rippleEffect)(e,{selector:"."+f})},t.prototype.wireKeyboardEvent=function(e){var t={downarrow:"downarrow",uparrow:"uparrow",enter:"enter",leftarrow:"leftarrow",rightarrow:"rightarrow",escape:"escape"};this.isMenu&&(t.home="home",t.end="end",t.tab="tab"),new s.KeyboardEvents(e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:t})},t.prototype.mouseDownHandler=function(e){i.i(s.closest)(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||i.i(s.closest)(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},t.prototype.keyHandler=function(e){38!==e.keyCode&&40!==e.keyCode||e.target&&(e.target.classList.contains("e-contextmenu")||e.target.classList.contains("e-menu-item"))&&e.preventDefault()},t.prototype.keyBoardHandler=function(e){var t="",n=e.target,r=this.isMenu&&!this.hamburgerMode&&!this.element.classList.contains("e-vertical")&&this.navIdx.length<1;if(e.preventDefault(),this.enableScrolling&&13===e.keyCode&&n.classList.contains("e-scroll-nav")&&this.removeLIStateByClass([c,u],[i.i(s.closest)(n,".e-"+this.getModuleName()+"-wrapper")]),r)switch(e.action){case"rightarrow":t="rightarrow",e.action="downarrow";break;case"leftarrow":t="leftarrow",e.action="uparrow";break;case"downarrow":t="downarrow",e.action="rightarrow";break;case"uparrow":t="uparrow",e.action=""}else if(this.enableRtl)switch(e.action){case"leftarrow":r=!0,t="leftarrow",e.action="rightarrow";break;case"rightarrow":r=!0,t="rightarrow",e.action="leftarrow"}switch(e.action){case"downarrow":case"uparrow":case"end":case"home":case"tab":this.upDownKeyHandler(e);break;case"rightarrow":this.rightEnterKeyHandler(e);break;case"leftarrow":this.leftEscKeyHandler(e);break;case"enter":this.hamburgerMode&&"SPAN"===n.tagName&&n.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e);break;case"escape":this.leftEscKeyHandler(e)}r&&(e.action=t)},t.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),i="downarrow"===e.action||"home"===e.action||"tab"===e.action?0:t.childElementCount-1,s=i,n=this.getLIByClass(t,c);n&&("end"!==e.action&&"home"!==e.action&&(s=this.getIdx(t,n)),n.classList.remove(c),"end"!==e.action&&"home"!==e.action&&("downarrow"===e.action?s++:s--,s===("downarrow"===e.action?t.childElementCount:-1)&&(s=i)));var r=t.children[s];s=this.isValidLI(r,s,e.action),t.children[s].classList.add(c),t.children[s].focus()},t.prototype.isValidLI=function(e,t,i){var s=this.getUlByNavIdx(),n="downarrow"===i||"home"===i||"tab"===i?0:s.childElementCount-1;return(e.classList.contains("e-separator")||e.classList.contains("e-disabled")||e.classList.contains(m))&&("downarrow"===i&&t===s.childElementCount-1?t=n:"uparrow"===i&&0===t?t=n:"downarrow"===i||"rightarrow"===i?t++:"tab"===i&&e.classList.contains("e-separator")?t++:t--),e=s.children[t],e&&(e.classList.contains("e-separator")||e.classList.contains("e-disabled")||e.classList.contains(m))&&(t=this.isValidLI(e,t,i)),t},t.prototype.getUlByNavIdx=function(e){var t=this;if(void 0===e&&(e=this.navIdx.length),this.isMenu){var n=[this.getWrapper()].concat([].slice.call(i.i(s.selectAll)("."+v)))[e],r=[];return i.i(s.selectAll)("."+v).forEach(function(e){(t.element.id===e.id.split("-")[2]||e.id.split("-")[2]+"-"+e.id.split("-")[3])&&r.push(e)}),n=[this.getWrapper()].concat([].slice.call(r))[e],i.i(s.isNullOrUndefined)(n)?null:i.i(s.select)(".e-menu-parent",n)}return this.getWrapper().children[e]},t.prototype.rightEnterKeyHandler=function(e){var t,i=this.getUlByNavIdx(),s=this.getLIByClass(i,c);if(s){var n=this.getIdx(i,s),r=this.navIdx.concat(n),o=this.getItem(r);if(o.items.length)this.navIdx.push(n),this.keyType="right",this.action=e.action,this.openMenu(s,o,-1,-1,e);else if("enter"===e.action){this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([u],[this.getWrapper()]):s.classList.remove(c),s.classList.add(u),t={element:s,item:o,event:e},this.trigger("select",t);var a=s.querySelector(".e-menu-url");if(o.url&&a)switch(a.getAttribute("target")){case"_blank":window.open(o.url,"_blank");break;case"_parent":window.parent.location.href=o.url;break;default:window.location.href=o.url}this.closeMenu(null,e);var l=this.getLIByClass(this.getUlByNavIdx(),u);l&&(l.classList.add(c),l.focus())}}},t.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):"escape"===e.action&&this.closeMenu(null,e)},t.prototype.scrollHandler=function(e){this.closeMenu(null,e)},t.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},t.prototype.cmenuHandler=function(e){e.preventDefault(),this.currentTarget=e.target,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)},t.prototype.closeMenu=function(e,t,n){var o=this;if(void 0===e&&(e=0),void 0===t&&(t=null),this.isMenuVisible()){var d,h,p=void 0,f=this.getWrapper(),m=void 0,g=this.getPopups(),y=!1,b=this.isMenu?g.length+1:f.childElementCount,C=this.isMenu&&1!==b?i.i(s.select)(".e-ul",g[b-2]):i.i(s.selectAll)(".e-menu-parent",f)[b-1];if(this.isMenu&&C.classList.contains("e-menu")&&(p=this.getLIByClass(C,u),p&&p.classList.remove(u),y=!0),!y){var x=t&&t.target&&this.getLI(t.target);this.cli=x||C.children[0],d=this.navIdx.length?this.getItem(this.navIdx):null,h=d?d.items:this.items,m={element:C,parentItem:d,items:h,event:t,cancel:!1,isFocused:!0},this.trigger("beforeClose",m,function(p){var m,g,y,b="",S=!p.cancel;(S||o.isCMenu)&&(o.isMenu?(m=i.i(s.closest)(C,"."+v),o.hamburgerMode&&(m.parentElement.style.minHeight="",i.i(s.closest)(C,".e-menu-item").setAttribute("aria-expanded","false")),o.unWireKeyboardEvent(m),i.i(l.b)(i.i(s.getInstance)(m.children[0],a.a),m.children[0]),y=i.i(s.getInstance)(m,r.Popup),y.hide(),b=m.id,y.destroy(),i.i(s.detach)(m)):o.toggleAnimation(C,!1),g={element:C,parentItem:d,items:h},o.trigger("onClose",g),o.navIdx.pop(),0===o.navIdx.length&&t&&"keyup"===t.type&&(o.showSubMenu=!1),o.isMenu||(s.EventHandler.remove(C,"keydown",o.keyHandler),"right"===o.keyType&&(o.keyType=""))),o.updateReactTemplate();var I,E,N,w=o.getWrapper()&&o.getUlByNavIdx();o.isCMenu&&(o.canOpen(t.target)&&o.openMenu(null,null,o.pageY,o.pageX,t),o.isCMenu=!1),o.isMenu&&w&&b.length?(I=new RegExp("(.*)-ej2menu-"+o.element.id+"-popup").exec(b)[1],E=w.querySelector('[id="'+I+'"]'),N=x&&w.querySelector('[id="'+x.id+'"]')):w&&(E=w.querySelector(".e-menu-item.e-selected"),N=x&&w.querySelector('[id="'+x.id+'"]'));var O=x&&x.querySelectorAll(".e-menu-item");if(S&&o.hamburgerMode&&e&&!O.length)o.afterCloseMenu(t);else if(S&&!o.hamburgerMode&&E&&!N&&"left"!==o.keyType&&(o.navIdx.length||!o.isMenu&&0===o.navIdx.length)){var L=t&&(t.target.classList.contains("e-vscroll")||t.target.classList.contains("e-scroll-nav"))?i.i(s.closest)(t.target,".e-menu-wrapper"):null;L?(L=L.querySelector(".e-menu-item"),(o.showItemOnClick||L&&o.getIndex(L.id,!0).length<=o.navIdx.length)&&o.closeMenu(o.navIdx[o.navIdx.length-1],t,!0)):t&&t.target.classList.contains("e-nav-arrow")||o.closeMenu(o.navIdx[o.navIdx.length-1],t)}else if(S&&!n&&!e&&(o.hamburgerMode&&o.navIdx.length||1===o.navIdx.length&&x&&w!==x.parentElement))o.closeMenu(null,t);else if(S&&i.i(s.isNullOrUndefined)(e)&&o.navIdx.length)o.closeMenu(null,t);else if(!S||o.isMenu||e||0!==o.navIdx.length||o.isMenusClosed||o.isCmenuHover)if(S&&o.isMenu&&t&&t.target&&0!==o.navIdx.length&&i.i(s.closest)(t.target,".e-menu-parent.e-control"))o.closeMenu(0,t);else if(S&&!o.isMenu&&i.i(s.selectAll)(".e-menu-parent",f)[e-1]&&3===t.which)o.closeMenu(null,t);else{if(!S||"right"!==o.keyType&&"click"!==o.keyType){var k=o.getUlByNavIdx(),A=o.getLIByClass(k,u);if(A&&(A.setAttribute("aria-expanded","false"),A.classList.remove(u),(p.isFocused&&x||"left"===o.keyType)&&(A.classList.add(c),t.target&&t.target.classList.contains("e-edit-template")||A.focus())),!S&&o.hamburgerMode&&x&&"false"===x.getAttribute("aria-expanded")&&"true"===x.getAttribute("aria-haspopup")){i.i(s.closest)(x,".e-menu-parent.e-control")?o.navIdx=[]:o.navIdx.pop(),o.navIdx.push(o.cliIdx);var T=o.getItem(o.navIdx);x.setAttribute("aria-expanded","true"),o.openMenu(x,T,-1,-1,t)}}else o.afterCloseMenu(t);o.navIdx.length<1&&("Hover"!==o.showSubMenuOn&&"Click"!==o.showSubMenuOn||(o.showItemOnClick=o.defaultOption,o.showSubMenuOn="Auto"))}else o.isMenusClosed=!0,o.closeMenu(0,t);o.removeStateWrapper()})}}},t.prototype.updateReactTemplate=function(){if(this.isReact&&this.template&&0===this.navIdx.length){var e=this.portals.splice(0,this.items.length);this.clearTemplate(["template"]),this.portals=e,this.renderReactTemplates()}},t.prototype.getMenuItemModel=function(e,t){if(i.i(s.isNullOrUndefined)(e))return null;i.i(s.isNullOrUndefined)(t)&&(t=0);var n=this.getFields(t);return{text:e[n.text],id:e[n.id],items:e[n.child],separator:e[n.separator],iconCss:e[n.iconCss],url:e[n.url]}},t.prototype.getPopups=function(){var e=this,t=[];return[].slice.call(document.querySelectorAll("."+v)).forEach(function(n){!i.i(s.isNullOrUndefined)(n.querySelector("."+f))&&e.getIndex(n.querySelector("."+f).id,!0).length&&t.push(n)}),t},t.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&i.i(s.isVisible)(this.element).valueOf()},t.prototype.canOpen=function(e){var t=!0;if(this.filter){t=!1;for(var n=this.filter.split(" "),r=0,o=n.length;r<o;r++)if(i.i(s.closest)(e,"."+n[r])){t=!0;break}}return t},t.prototype.openMenu=function(e,t,n,o,a,l){var d=this;void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=null),void 0===l&&(l=this.targetElement);var h=this.getWrapper();this.lItem=e;var c=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,i.i(s.isNullOrUndefined)(n)&&(n=-1),i.i(s.isNullOrUndefined)(o)&&(o=-1),e){if(this.uList=this.createItems(t[this.getField("children",this.navIdx.length-1)]),!this.isMenu&&s.Browser.isDevice){h.lastChild.style.display="none";var u={text:t[this.getField("text")].toString(),iconCss:"e-icons e-previous"},f=new y(this.items[0],"items",u,!0),m=this.createItems([f]).children[0];m.classList.add(p),this.uList.insertBefore(m,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+v,id:e.id+"-ej2menu-"+c+"-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.template&&this.renderReactTemplates(),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&i.i(s.addClass)([this.popupWrapper],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.popupObj.hide()),this.hamburgerMode||this.showItemOnClick||!this.hoverDelay?this.triggerBeforeOpen(e,this.uList,t,a,0,0,"menu"):(window.clearInterval(this.timer),this.timer=window.setTimeout(function(){d.triggerBeforeOpen(e,d.uList,t,a,0,0,"menu")},this.hoverDelay))):(this.uList.style.zIndex=this.element.style.zIndex,h.appendChild(this.uList),!this.showItemOnClick&&this.hoverDelay?(window.clearInterval(this.timer),this.timer=window.setTimeout(function(){d.triggerBeforeOpen(e,d.uList,t,a,n,o,"none")},this.hoverDelay)):this.triggerBeforeOpen(e,this.uList,t,a,n,o,"none"))}else if(this.uList=this.element,this.uList.style.zIndex=i.i(r.getZindexPartial)(l||this.element).toString(),i.i(s.isNullOrUndefined)(a)){var g=document.createEvent("MouseEvents");g.initEvent("click",!0,!1);var b=this.copyObject(g,{});b.target=b.srcElement=l,b.currentTarget=l,this.triggerBeforeOpen(e,this.uList,t,b,n,o,"none")}else this.triggerBeforeOpen(e,this.uList,t,a,n,o,"none")},t.prototype.copyObject=function(e,t){for(var i in e)t[""+i]=e[""+i];return t},t.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)for(var r=e.querySelector(".e-menu-icon"),o=getComputedStyle(r),a=parseInt(o.marginRight,10)+r.offsetWidth+s,l=0;l<n.length;l++)n[l].style.textIndent=a+"px"},t.prototype.generatePopup=function(e,t,n,o){var a=this,l=new r.Popup(e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:n,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:o||this.enableRtl?"none":"flip",Y:"fit"},position:o&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:t,open:function(){var e=i.i(s.select)(".e-menu-vscroll",l.element);e&&(e.style.height="inherit",e.style.maxHeight="");var t=i.i(s.select)(".e-ul",l.element);l.element.style.maxHeight="",t.focus(),a.triggerOpen(t)}});return l},t.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var t=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),i=this.enableHtmlSanitizer?s.SanitizeHtmlHelper.sanitize(this.title):this.title,n=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:i}),r=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});t.appendChild(n),t.appendChild(r),e.insertBefore(t,this.element)},t.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},t.prototype.closeHamburgerMenu=function(e){var t=this,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}))})},t.prototype.callFit=function(e,t,s,n,o){return i.i(r.fit)(e,null,{X:t,Y:s},{top:n,left:o})},t.prototype.triggerBeforeOpen=function(e,t,n,r,o,a,d){var h=this,p=e?n[this.getField("children",this.navIdx.length-1)]:this.items,m={element:t,items:p,parentItem:n,event:r,cancel:!1,top:o,left:a,showSubMenuOn:"Auto"},v=d;this.trigger("beforeOpen",m,function(o){switch(v){case"menu":h.hamburgerMode||("Auto"!==o.showSubMenuOn&&(h.showItemOnClick=!h.defaultOption,h.showSubMenuOn=o.showSubMenuOn),h.top=o.top,h.left=o.left),h.popupWrapper.style.display="block",h.hamburgerMode||(h.popupWrapper.style.maxHeight=h.popupWrapper.getBoundingClientRect().height+"px",h.enableScrolling&&i.i(l.a)(h.createElement,h.popupWrapper,h.uList,"vscroll",h.enableRtl),h.checkScrollOffset(r)),h.hamburgerMode||h.left||h.top?(h.popupObj.collision={X:"none",Y:"none"},h.popupWrapper.style.display=""):(h.popupObj.refreshPosition(h.lItem,!0),h.left=parseInt(h.popupWrapper.style.left,10),h.top=parseInt(h.popupWrapper.style.top,10),h.enableRtl&&(h.left=h.isNestedOrVertical?h.left-h.popupWrapper.offsetWidth-h.lItem.parentElement.offsetWidth+2:h.left-h.popupWrapper.offsetWidth+h.lItem.offsetWidth),h.template&&(h.isReact||h.isAngular)?requestAnimationFrame(function(){h.collision(),h.popupWrapper.style.display=""}):(h.collision(),h.popupWrapper.style.display=""));break;case"none":h.top=o.top,h.left=o.left;break;case"hamburger":o.cancel||(h.element.classList.remove("e-hide-menu"),h.triggerOpen(h.element))}if("hamburger"!==v)if(o.cancel)h.isMenu?(h.popupObj.destroy(),i.i(s.detach)(h.popupWrapper)):t.className.indexOf("e-ul")>-1&&i.i(s.detach)(t),h.navIdx.pop();else if(h.isMenu)if(h.hamburgerMode)h.popupWrapper.style.top=h.top+"px",h.popupWrapper.style.left="0px",h.toggleAnimation(h.popupWrapper);else{h.setBlankIconStyle(h.popupWrapper),h.wireKeyboardEvent(h.popupWrapper),i.i(s.rippleEffect)(h.popupWrapper,{selector:"."+f}),h.popupWrapper.style.left=h.left+"px",h.popupWrapper.style.top=h.top+"px";var a="None"!==h.animationSettings.effect?{name:h.animationSettings.effect,duration:h.animationSettings.duration,timingFunction:h.animationSettings.easing}:null;h.popupObj.show(a,h.lItem)}else h.setBlankIconStyle(h.uList),h.setPosition(h.lItem,h.uList,h.top,h.left),h.toggleAnimation(h.uList);if("right"===h.keyType){var d=h.getUlByNavIdx();if(e.classList.remove(c),h.isMenu&&1===h.navIdx.length&&h.removeLIStateByClass([u],[h.getWrapper()]),e.classList.add(u),"enter"===h.action){var p={element:e,item:n,event:r};h.trigger("select",p)}if(e.focus(),d=h.getUlByNavIdx()){var m=h.isValidLI(d.children[0],0,h.action);d.children[m].classList.add(c),d.children[m].focus()}}})},t.prototype.collision=function(){var e;if(e=i.i(r.isCollide)(this.popupWrapper,null,this.left,this.top),(this.isNestedOrVertical||this.enableRtl)&&(e.indexOf("right")>-1||e.indexOf("left")>-1)){this.popupObj.collision.X="none";var t=i.i(s.closest)(this.lItem,".e-"+this.getModuleName()+"-wrapper").offsetWidth;this.left=this.enableRtl?i.i(r.calculatePosition)(this.lItem,this.isNestedOrVertical?"right":"left","top").left:this.left-this.popupWrapper.offsetWidth-t+2}e=i.i(r.isCollide)(this.popupWrapper,null,this.left,this.top),(e.indexOf("left")>-1||e.indexOf("right")>-1)&&(this.left=this.callFit(this.popupWrapper,!0,!1,this.top,this.left).left),this.popupWrapper.style.left=this.left+"px"},t.prototype.setBlankIconStyle=function(e){var t=[].slice.call(e.getElementsByClassName("e-blankicon"));if(t.length){var i=e.querySelector(".e-menu-item:not(.e-blankicon):not(.e-separator)");if(i){var s=i.querySelector(".e-menu-icon");if(s){var n=this.enableRtl?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"},r=getComputedStyle(s),o=parseInt(r.fontSize,10);parseInt(r.width,10)&&parseInt(r.width,10)>o&&(o=parseInt(r.width,10));var a=o+parseInt(r[n.margin],10)+parseInt(getComputedStyle(i)[n.padding],10)+"px";t.forEach(function(e){e.style[n.padding]=a})}}}},t.prototype.checkScrollOffset=function(e){var t=this.getWrapper();if(t.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var n=i.i(s.isNullOrUndefined)(e)?this.element:i.i(s.closest)(e.target,"."+f),r=i.i(s.select)(".e-hscroll-bar",t);r.scrollLeft>n.offsetLeft&&(r.scrollLeft-=r.scrollLeft-n.offsetLeft);var o=r.scrollLeft+r.offsetWidth,a=n.offsetLeft+n.offsetWidth;o<a&&(r.scrollLeft+=a-o)}},t.prototype.setPosition=function(e,t,n,o){if(this.toggleVisiblity(t),t===this.element||o>-1&&n>-1){var a=i.i(r.isCollide)(t,null,o,n);if(a.indexOf("right")>-1&&(o-=t.offsetWidth),a.indexOf("bottom")>-1){var l=this.callFit(t,!1,!0,n,o);if((n=l.top-20)<0){var d=pageYOffset+document.documentElement.clientHeight-t.getBoundingClientRect().height;d>-1&&(n=d)}}if(a=i.i(r.isCollide)(t,null,o,n),a.indexOf("left")>-1){var l=this.callFit(t,!0,!1,n,o);o=l.left}}else if(s.Browser.isDevice)n=Number(this.element.style.top.replace("px","")),o=Number(this.element.style.left.replace("px",""));else{var h=this.enableRtl?"left":"right",l=i.i(r.calculatePosition)(e,h,"top");n=l.top,o=l.left;var a=i.i(r.isCollide)(t,null,this.enableRtl?o-t.offsetWidth:o,n),c=a.indexOf("left")>-1||a.indexOf("right")>-1;c&&(l=i.i(r.calculatePosition)(e,this.enableRtl?"right":"left","top"),o=l.left),(this.enableRtl||c)&&(o=this.enableRtl&&c?o:o-t.offsetWidth),a.indexOf("bottom")>-1&&(l=this.callFit(t,!1,!0,n,o),n=l.top)}this.toggleVisiblity(t,!1),t.style.top=n+"px",t.style.left=o+"px"},t.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},t.prototype.createItems=function(e){var t=this,r=this.navIdx?this.navIdx.length:0,o=this.getFields(r),a=this.hasField(e,this.getField("iconCss",r)),l={showIcon:a,moduleName:"menu",fields:o,template:this.template,itemNavigable:!0,itemCreating:function(e){e.curData[e.fields[o.id]]||(e.curData[e.fields[o.id]]=i.i(s.getUniqueID)("menuitem")),i.i(s.isNullOrUndefined)(e.curData.htmlAttributes)&&(e.curData.htmlAttributes={}),s.Browser.isIE?(e.curData.htmlAttributes.role="menuitem",e.curData.htmlAttributes.tabindex="-1"):Object.assign(e.curData.htmlAttributes,{role:"menuitem",tabindex:"-1"}),t.isMenu&&!e.curData[t.getField("separator",r)]&&(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]?e.curData[e.fields.text]:e.curData[e.fields.id]),""===e.curData[e.fields[o.iconCss]]&&(e.curData[e.fields[o.iconCss]]=null)},itemCreated:function(e){if(e.curData[t.getField("separator",r)]&&(e.item.classList.add("e-separator"),e.item.setAttribute("role","separator")),!a||e.curData[e.fields.iconCss]||e.curData[t.getField("separator",r)]||e.item.classList.add("e-blankicon"),e.curData[e.fields.child]&&e.curData[e.fields.child].length){var i=t.createElement("span",{className:"e-icons e-caret"});e.item.appendChild(i),e.item.setAttribute("aria-haspopup","true"),e.item.setAttribute("aria-expanded","false"),e.item.classList.add("e-menu-caret-icon")}t.isMenu&&t.template&&(e.item.setAttribute("id",e.curData[e.fields.id].toString()),e.item.removeAttribute("data-uid"),e.item.classList.contains("e-level-1")&&e.item.classList.remove("e-level-1"),e.item.classList.contains("e-has-child")&&e.item.classList.remove("e-has-child"),e.item.removeAttribute("aria-level"));var s={item:e.curData,element:e.item};t.trigger("beforeItemRender",s)}};this.setProperties({items:this.items},!0),this.isMenu&&(l.templateID=this.element.id+"Template");var d=n.ListBase.createList(this.createElement,e,l,!this.template,this);return d.setAttribute("tabindex","0"),this.isMenu?d.setAttribute("role","menu"):d.setAttribute("role","menubar"),d},t.prototype.moverHandler=function(e){var t=e.target;this.liTrgt=t,this.isMenu||(this.isCmenuHover=!0);var n=this.getLI(t),r=n?i.i(s.closest)(n,".e-"+this.getModuleName()+"-wrapper"):this.getWrapper(),o=this.getWrapper(),a=new RegExp("-ej2menu-(.*)-popup"),l=!1;if(r){if((""!==r.id?a.exec(r.id)[1]:r.querySelector("ul").id)!==this.element.id){if(this.removeLIStateByClass([c,u],[this.getWrapper()]),!this.navIdx.length)return;l=!0}n&&i.i(s.closest)(n,".e-"+this.getModuleName()+"-wrapper")&&!l?(this.removeLIStateByClass([c],this.isMenu?[r].concat(this.getPopups()):[r]),this.removeLIStateByClass([c],this.isMenu?[o].concat(this.getPopups()):[o]),n.classList.add(c),this.showItemOnClick||this.clickHandler(e)):this.isMenu&&this.showItemOnClick&&!l&&this.removeLIStateByClass([c],[r].concat(this.getPopups())),this.isMenu&&(this.showItemOnClick||t.parentElement===r||i.i(s.closest)(t,".e-"+this.getModuleName()+"-popup")||n&&(!n||this.getIndex(n.id,!0).length)||"Hover"===this.showSubMenuOn?l&&!this.showItemOnClick&&this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e)):(this.removeLIStateByClass([c],[r]),this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e))),this.isClosed||this.removeStateWrapper(),this.isClosed=!1),this.isMenu||(this.isCmenuHover=!1)}},t.prototype.removeStateWrapper=function(){if(this.liTrgt){var e=i.i(s.closest)(this.liTrgt,".e-menu-vscroll");"DIV"===this.liTrgt.tagName&&e&&this.removeLIStateByClass([c,u],[e])}},t.prototype.removeLIStateByClass=function(e,t){for(var n,r=0;r<t.length;r++)!function(r){e.forEach(function(e){(n=i.i(s.select)("."+e,t[r]))&&n.classList.remove(e)})}(r)},t.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()},t.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)}},t.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][""+t])return!0;return!1},t.prototype.menuHeaderClickHandler=function(e){var t=i.i(s.closest)(e.target,".e-menu-wrapper");t&&t.querySelector("ul.e-menu-parent").id!==this.element.id||(this.element.className.indexOf("e-hide-menu")>-1?this.openHamburgerMenu(e):this.closeHamburgerMenu(e))},t.prototype.clickHandler=function(e){this.isTapHold=!this.isTapHold&&this.isTapHold;var t=this.getWrapper(),n=e.target,r=this.cli=this.getLI(n),o=new RegExp("-ej2menu-(.*)-popup"),a=r?i.i(s.closest)(r,".e-"+this.getModuleName()+"-wrapper"):null,l=r&&a&&(this.isMenu?this.getIndex(r.id,!0).length>0:t.firstElementChild.id===a.firstElementChild.id);if(s.Browser.isDevice&&this.isMenu&&(this.removeLIStateByClass([c],[t].concat(this.getPopups())),this.mouseDownHandler(e)),r&&a&&this.isMenu){var d=a.id?o.exec(a.id)[1]:a.querySelector(".e-menu-parent").id;if(this.element.id!==d)return}if(l&&"click"===e.type&&!r.classList.contains(p)){this.setLISelected(r);var h=this.getIndex(r.id,!0),m=this.getItem(h),g={element:r,item:m,event:e};this.trigger("select",g)}if(l&&("mouseover"===e.type||s.Browser.isDevice||this.showItemOnClick)){var y=void 0;if(r.classList.contains(p)){y=t.children[this.navIdx.length-1],this.toggleAnimation(y);var b=this.getLIByClass(y,u);b&&b.classList.remove(u),i.i(s.detach)(r.parentNode),this.navIdx.pop()}else if(!r.classList.contains("e-separator")){this.showSubMenu=!0;var C=r.parentNode;if(i.i(s.isNullOrUndefined)(C))return;if(this.cliIdx=this.getIdx(C,r),this.isMenu||!s.Browser.isDevice){var x=this.isMenu?Array.prototype.indexOf.call([t].concat(this.getPopups()),i.i(s.closest)(C,".e-"+this.getModuleName()+"-wrapper")):this.getIdx(t,C);if(this.navIdx[x]===this.cliIdx&&(this.showSubMenu=!1),x!==this.navIdx.length&&("mouseover"!==e.type||this.showSubMenu)){var b=this.getLIByClass(C,u);b&&b.classList.remove(u),this.isClosed=!0,this.keyType="click",this.showItemOnClick&&(this.setLISelected(r),this.isMenu||(this.isCmenuHover=!0)),this.closeMenu(x+1,e),this.showItemOnClick&&(this.setLISelected(r),this.isMenu||(this.isCmenuHover=!1))}}this.isClosed||this.afterCloseMenu(e),this.isClosed=!1}}else if(this.isMenu&&"DIV"===n.tagName&&this.navIdx.length&&i.i(s.closest)(n,".e-menu-vscroll")){var S=i.i(s.closest)(n,"."+v),I=Array.prototype.indexOf.call(this.getPopups(),S)+1;I<this.navIdx.length&&(this.closeMenu(I+1,e),S&&this.removeLIStateByClass([c,u],[S]))}else this.isMenu&&this.hamburgerMode&&"SPAN"===n.tagName&&n.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):"UL"===n.tagName&&(this.isMenu?!n.parentElement.classList.contains("e-menu-wrapper")||this.getIndex(n.querySelector("."+f).id,!0).length:n.parentElement===t)||(r||this.removeLIStateByClass([u],[t]),r&&r.querySelector(".e-caret")||this.closeMenu(null,e))},t.prototype.afterCloseMenu=function(e){if(!i.i(s.isNullOrUndefined)(e)){var t;if(this.showSubMenu){t=this.showItemOnClick&&0===this.navIdx.length?i.i(s.closest)(e.target,".e-menu-parent.e-control"):i.i(s.closest)(this.element,".e-menu-parent.e-control");var n=this.navIdx.concat(this.cliIdx),r=this.getItem(n);if(r&&r[this.getField("children",n.length-1)]&&r[this.getField("children",n.length-1)].length?(("mouseover"===e.type||s.Browser.isDevice&&this.isMenu)&&this.setLISelected(this.cli),(!this.hamburgerMode&&t||this.hamburgerMode&&"false"===this.cli.getAttribute("aria-expanded"))&&(this.cli.setAttribute("aria-expanded","true"),this.navIdx.push(this.cliIdx),this.openMenu(this.cli,r,null,null,e))):"mouseover"!==e.type&&this.closeMenu(null,e),!t){var o=this.getUlByNavIdx(),a=this.getLIByClass(o,u);a&&(a.setAttribute("aria-expanded","false"),a.classList.remove(u))}}this.keyType=""}},t.prototype.setLISelected=function(e){var t=this.getLIByClass(e.parentElement,u);t&&t.classList.remove(u),this.isMenu||e.classList.remove(c),e.classList.add(u)},t.prototype.getLIByClass=function(e,t){if(e)for(var i=0,s=e.children.length;i<s;i++)if(e.children[i].classList.contains(t))return e.children[i];return null},t.prototype.getItemIndex=function(e,t){var i;i="string"==typeof e?e:e.id;var s=!1!==t;return this.getIndex(i,s)},t.prototype.setItem=function(e,t,i){var s;s=i?t||e.id:t||e.text;var n=this.getIndex(s,i),r=this.getItem(n);Object.assign(r,e)},t.prototype.getItem=function(e){e=e.slice();var t=e.pop();return this.getItems(e)[t]},t.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},t.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])},t.prototype.getIdx=function(e,t,i){void 0===i&&(i=!0);var s=Array.prototype.indexOf.call(e.children,t);return i&&e.children[0].classList.contains(p)&&s--,s},t.prototype.getLI=function(e){return"LI"===e.tagName&&e.classList.contains("e-menu-item")?e:i.i(s.closest)(e,"li.e-menu-item")},t.prototype.updateItemsByNavIdx=function(){for(var e=this.items,t=0,i=0;i<this.navIdx.length&&(e=e[i].items);i++){t++;var s=this.getUlByNavIdx(t);if(!s)break;this.updateItem(s,e)}},t.prototype.removeChildElement=function(e){for(;e.firstElementChild;)e.removeChild(e.firstElementChild);return e},t.prototype.onPropertyChanged=function(e,t){for(var n=this,r=this.getWrapper(),d=this,h=0,c=Object.keys(e);h<c.length;h++){var p=c[h];!function(h){switch(h){case"cssClass":t.cssClass&&i.i(s.removeClass)([r],t.cssClass.split(" ")),e.cssClass&&i.i(s.addClass)([r],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":d.enableRtl?r.classList.add("e-rtl"):r.classList.remove("e-rtl");break;case"showItemOnClick":d.unWireEvents(),d.showItemOnClick=e.showItemOnClick,d.wireEvents();break;case"enableScrolling":if(e.enableScrolling){var c;d.element.classList.contains("e-vertical")?i.i(l.a)(d.createElement,r,d.element,"vscroll",d.enableRtl):i.i(l.a)(d.createElement,r,d.element,"hscroll",d.enableRtl),d.getPopups().forEach(function(e){c=i.i(s.select)(".e-ul",e),i.i(l.a)(n.createElement,e,c,"vscroll",n.enableRtl)})}else{var p=r.children[0];d.element.classList.contains("e-vertical")?i.i(l.b)(i.i(s.getInstance)(p,a.a),p):i.i(l.b)(i.i(s.getInstance)(p,o.a),p),r.style.overflow="",r.appendChild(d.element),d.getPopups().forEach(function(e){p=e.children[0],i.i(l.b)(i.i(s.getInstance)(p,a.a),p),e.style.overflow=""})}break;case"items":var u=void 0,f=void 0,m=void 0;if(d.isReact&&d.template&&d.clearTemplate(["template"]),Object.keys(t.items).length)for(var v=Object.keys(e.items),g=0;g<v.length;g++)f=d.getChangedItemIndex(e,[],Number(v[g])),f.length<=d.getWrapper().children.length&&(u=f.pop(),m=d.getItems(f),d.insertAfter([m[u]],m[u].text),d.removeItem(m,f,u),d.setItems(m,f)),f.length=0;else{if(d.updateItem(d.element,d.items),d.enableScrolling&&d.element.parentElement.classList.contains("e-custom-scroll")&&(d.element.classList.contains("e-vertical")?i.i(l.a)(d.createElement,r,d.element,"vscroll",d.enableRtl):i.i(l.a)(d.createElement,r,d.element,"hscroll",d.enableRtl)),!d.hamburgerMode)for(var g=1,y=r.childElementCount;g<y;g++)i.i(s.detach)(r.lastElementChild);d.navIdx=[]}}}(p)}},t.prototype.updateItem=function(e,t){if(i.i(s.isBlazor)()&&!this.isMenu)e=this.removeChildElement(e);else{if(this.enableScrolling){var n=this.getWrapper(),r=n.children[0];this.element.classList.contains("e-vertical")?i.i(l.b)(i.i(s.getInstance)(r,a.a),r):i.i(l.b)(i.i(s.getInstance)(r,o.a),r)}e.innerHTML=""}[].slice.call(this.createItems(t).children).forEach(function(t){e.appendChild(t)})},t.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],r=Object.keys(n.items).pop();r&&this.getChangedItemIndex(n,t,Number(r))}else"isParentArray"===s&&t.length>1&&t.pop();return t},t.prototype.removeItem=function(e,t,n){e.splice(n,1);var r=this.getWrapper().children;t.length<r.length&&i.i(s.detach)(r[t.length].children[n])},t.prototype.unWireEvents=function(e){void 0===e&&(e=this.target);var t=this.getWrapper();if(e){for(var n=void 0,o=void 0,a=i.i(s.selectAll)(e),l=0,d=a.length;l<d;l++)n=a[l],this.isMenu?s.EventHandler.remove(n,"click",this.menuHeaderClickHandler):s.Browser.isIos?(o=i.i(s.getInstance)(n,s.Touch))&&o.destroy():s.EventHandler.remove(n,"contextmenu",this.cmenuHandler);if(!this.isMenu){s.EventHandler.remove(this.targetElement,"scroll",this.scrollHandler);for(var h=0,c=i.i(r.getScrollableParent)(this.targetElement);h<c.length;h++){var p=c[h];s.EventHandler.remove(p,"scroll",this.scrollHandler)}}}s.Browser.isDevice||(s.EventHandler.remove(this.isMenu?document:t,"mouseover",this.delegateMoverHandler),s.EventHandler.remove(document,"mousedown",this.delegateMouseDownHandler)),s.EventHandler.remove(document,"click",this.delegateClickHandler),this.unWireKeyboardEvent(t),this.rippleFn()},t.prototype.unWireKeyboardEvent=function(e){var t=i.i(s.getInstance)(e,s.KeyboardEvents);t&&t.destroy()},t.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)},t.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),this.isMenu||s.EventHandler.add(e,"keydown",this.keyHandler,this)},t.prototype.end=function(e,t){if(t)if(!this.isMenu&&s.Browser.isDevice||(e.style.display="block"),e.style.maxHeight="",this.triggerOpen(e),e.querySelector("."+c))e.querySelector("."+c).focus();else{var n=this.getWrapper().children[this.getIdx(this.getWrapper(),e)-1];this.currentTarget?this.currentTarget.classList.contains("e-numerictextbox")||this.currentTarget.classList.contains("e-textbox")||"INPUT"===this.currentTarget.tagName||(n?n.querySelector("."+u).focus():this.element.focus()):n?n.querySelector("."+u).focus():this.element.focus()}else if(e===this.element){var r=this.getLIByClass(this.element,c);r&&r.classList.remove(c);var o=this.getLIByClass(this.element,u);o&&o.classList.remove(u),e.style.display="none"}else i.i(s.detach)(e)},t.prototype.getPersistData=function(){return""},t.prototype.getWrapper=function(){return i.i(s.closest)(this.element,".e-"+this.getModuleName()+"-wrapper")},t.prototype.getIndex=function(e,t,i,s,n,r){void 0===i&&(i=this.items),void 0===s&&(s=[]),void 0===n&&(n=!1),void 0===r&&(r=0);var o;r=n?r+1:0;for(var a=0,l=i.length;a<l;a++){if(o=i[a],(t?o[this.getField("itemId",r)]:o[this.getField("text",r)])===e){s.push(a);break}if(o[this.getField("children",r)]&&o[this.getField("children",r)].length){if(s=this.getIndex(e,t,o[this.getField("children",r)],s,!0,r),-1!==s[s.length-1]){s.unshift(a);break}a!==l-1&&s.pop()}else a===l-1&&s.push(-1)}return n||-1!==s[0]?s:[]},t.prototype.enableItems=function(e,t,n){void 0===t&&(t=!0);for(var r,o,a,l,d="e-disabled",h=0;h<e.length;h++){if(a=this.getIndex(e[h],n),this.navIdx.length){if(1!==a.length){l=!1;for(var c=0,p=a.length-1;c<p;c++)if(a[c]!==this.navIdx[c]){l=!0;break}if(l)continue}}else if(1!==a.length)continue;o=a.pop(),r=this.getUlByNavIdx(a.length),r&&!i.i(s.isNullOrUndefined)(o)&&(t?this.isMenu?(r.children[o].classList.remove(d),r.children[o].removeAttribute("aria-disabled")):s.Browser.isDevice&&!r.classList.contains("e-contextmenu")?r.children[o+1].classList.remove(d):r.children[o].classList.remove(d):this.isMenu?(r.children[o].classList.add(d),r.children[o].setAttribute("aria-disabled","true")):s.Browser.isDevice&&!r.classList.contains("e-contextmenu")?r.children[o+1].classList.add(d):r.children[o].classList.add(d))}},t.prototype.showItems=function(e,t){this.showHideItems(e,!1,t)},t.prototype.hideItems=function(e,t){this.showHideItems(e,!0,t)},t.prototype.showHideItems=function(e,t,i){for(var s,n,r,o,a=0;a<e.length;a++)if(r=this.getIndex(e[a],i),n=r.pop(),s=this.getUlByNavIdx(r.length),o=this.getItems(r),s){var l=i?s.children[n].id:o[n].text.toString();t&&l===e[a]?s.children[n].classList.add(m):t||l!==e[a]||s.children[n].classList.remove(m)}},t.prototype.removeItems=function(e,t){for(var n,r,o,a=0;a<e.length;a++)r=this.getIndex(e[a],t),n=r.pop(),o=this.getItems(r),i.i(s.isNullOrUndefined)(n)||this.removeItem(o,r,n)},t.prototype.insertAfter=function(e,t,i){this.insertItems(e,t,i)},t.prototype.insertBefore=function(e,t,i){this.insertItems(e,t,i,!1)},t.prototype.insertItems=function(e,t,n,r){void 0===r&&(r=!0);for(var o,a,l,d,h,c=0;c<e.length;c++){l=this.getIndex(t,n),a=l.pop(),d=this.getItems(l),h=new y(d[0],"items",e[c],!0),d.splice(r?a+1:a,0,h);var p=this.isMenu?[this.getWrapper()].concat(this.getPopups()):[].slice.call(this.getWrapper().children);if(!i.i(s.isNullOrUndefined)(a)&&l.length<p.length){a=r?a+1:a,o=this.createItems(d).children[a];var u=this.isMenu?i.i(s.select)(".e-menu-parent",p[l.length]):p[l.length];u.insertBefore(o,u.children[a])}}},t.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")})},t.prototype.destroy=function(){var t=this.getWrapper();if(t){if(this.unWireEvents(),this.isMenu)this.closeMenu(),i.i(s.isBlazor)()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML="",this.removeAttributes(),t.parentNode.insertBefore(this.element,t),this.clonedElement=null;else{if(this.clonedElement.style.display="","EJS-CONTEXTMENU"===this.clonedElement.tagName)i.i(s.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 n=this.clonedElement.nextElementSibling;n&&n!==t?this.clonedElement.parentElement.insertBefore(this.element,n):this.clonedElement.parentElement.appendChild(this.element),i.i(s.isBlazor)()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML="",i.i(s.append)([].slice.call(this.clonedElement.children),this.element),i.i(s.detach)(this.clonedElement),this.removeAttributes()}this.clonedElement=null}this.isMenu&&this.clonedElement?(i.i(s.detach)(this.element),t.style.display="",t.classList.remove("e-"+this.getModuleName()+"-wrapper"),t.removeAttribute("data-ripple")):i.i(s.detach)(t),e.prototype.destroy.call(this),this.template&&this.clearTemplate(["template"])}this.rippleFn=null},h([i.i(s.Event)()],t.prototype,"beforeItemRender",void 0),h([i.i(s.Event)()],t.prototype,"beforeOpen",void 0),h([i.i(s.Event)()],t.prototype,"onOpen",void 0),h([i.i(s.Event)()],t.prototype,"beforeClose",void 0),h([i.i(s.Event)()],t.prototype,"onClose",void 0),h([i.i(s.Event)()],t.prototype,"select",void 0),h([i.i(s.Event)()],t.prototype,"created",void 0),h([i.i(s.Property)("")],t.prototype,"cssClass",void 0),h([i.i(s.Property)(0)],t.prototype,"hoverDelay",void 0),h([i.i(s.Property)(!1)],t.prototype,"showItemOnClick",void 0),h([i.i(s.Property)("")],t.prototype,"target",void 0),h([i.i(s.Property)("")],t.prototype,"filter",void 0),h([i.i(s.Property)(null)],t.prototype,"template",void 0),h([i.i(s.Property)(!1)],t.prototype,"enableScrolling",void 0),h([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),h([i.i(s.Complex)({itemId:"id",text:"text",parentId:"parentId",iconCss:"iconCss",url:"url",separator:"separator",children:"items"},g)],t.prototype,"fields",void 0),h([i.i(s.Collection)([],y)],t.prototype,"items",void 0),h([i.i(s.Complex)({duration:400,easing:"ease",effect:"SlideDown"},b)],t.prototype,"animationSettings",void 0),t=h([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var s=i(0),n=(i.n(s),this&&this.__extends||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)}}()),r=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},o=function(e){function t(t,i){return e.call(this,t,i)||this}return n(t,e),t.prototype.preRender=function(){this.browser=s.Browser.info.name,this.browserCheck="mozilla"===this.browser,this.isDevice=s.Browser.isDevice,this.customStep=!0;var e=this.element;this.ieCheck="edge"===this.browser||"msie"===this.browser,this.initialize(),""===e.id&&(e.id=i.i(s.getUniqueID)("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add("e-rtl")},t.prototype.render=function(){this.touchModule=new s.Touch(this.element,{scroll:this.touchHandler.bind(this),swipe:this.swipeHandler.bind(this)}),s.EventHandler.add(this.scrollEle,"scroll",this.scrollEventHandler,this),this.isDevice?(this.element.classList.add("e-scroll-device"),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),s.EventHandler.add(this.element,"wheel",this.wheelEventHandler,this)},t.prototype.setScrollState=function(){i.i(s.isNullOrUndefined)(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},t.prototype.initialize=function(){var e=i.i(s.createElement)("div",{className:"e-vscroll-content"}),t=i.i(s.createElement)("div",{className:"e-vscroll-bar"});t.setAttribute("tabindex","-1");for(var n=this.element,r=[].slice.call(n.children),o=0,a=r;o<a.length;o++){var l=a[o];e.appendChild(l)}t.appendChild(e),n.appendChild(t),t.style.overflow="hidden",this.scrollEle=t,this.scrollItems=e},t.prototype.getPersistData=function(){var e=["scrollStep"];return this.addOnPersist(e)},t.prototype.getModuleName=function(){return"vScroll"},t.prototype.destroy=function(){var t=this.element;t.style.display="",i.i(s.removeClass)([this.element],["e-vscroll","e-scroll-device","e-rtl"]);var n=i.i(s.selectAll)(".e-"+t.id+"_nav.e-scroll-nav",t),r=i.i(s.selectAll)(".e-scroll-overlay",t);[].slice.call(r).forEach(function(e){i.i(s.detach)(e)});for(var o=0,a=[].slice.call(this.scrollItems.children);o<a.length;o++){var l=a[o];t.appendChild(l)}this.uniqueId&&this.element.removeAttribute("id"),i.i(s.detach)(this.scrollEle),n.length>0&&(i.i(s.detach)(n[0]),i.i(s.isNullOrUndefined)(n[1])||i.i(s.detach)(n[1])),s.EventHandler.remove(this.scrollEle,"scroll",this.scrollEventHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},t.prototype.disable=function(e){var t=i.i(s.selectAll)(".e-scroll-nav:not(.e-overlay)",this.element);e?this.element.classList.add("e-overlay"):this.element.classList.remove("e-overlay"),[].slice.call(t).forEach(function(t){t.setAttribute("tabindex",e?"-1":"0")})},t.prototype.createOverlayElement=function(e){var t=e.id.concat("_nav"),n=i.i(s.createElement)("div",{className:"e-scroll-overlay e-scroll-down-overlay"}),r="e-"+e.id.concat("_nav e-scroll-nav e-scroll-down-nav"),o=i.i(s.createElement)("div",{id:t.concat("down"),className:r}),a=i.i(s.createElement)("div",{className:"e-nav-down-arrow e-nav-arrow e-icons"});o.appendChild(a);var l=i.i(s.createElement)("div",{className:"e-scroll-overlay e-scroll-up-overlay"});this.ieCheck&&o.classList.add("e-ie-align"),e.appendChild(n),e.appendChild(o),e.insertBefore(l,e.firstChild),this.eventBinding([o])},t.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),n="e-"+e.id.concat("_nav e-scroll-nav e-scroll-down-nav"),r=i.i(s.createElement)("div",{id:t.concat("_down"),className:n});r.setAttribute("aria-disabled","false");var o=i.i(s.createElement)("div",{className:"e-nav-down-arrow e-nav-arrow e-icons"}),a="e-"+e.id.concat("_nav e-scroll-nav e-scroll-up-nav"),l=i.i(s.createElement)("div",{id:t.concat("_up"),className:a+" e-overlay"});l.setAttribute("aria-disabled","true");var d=i.i(s.createElement)("div",{className:"e-nav-up-arrow e-nav-arrow e-icons"});l.appendChild(d),r.appendChild(o),r.setAttribute("tabindex","0"),e.appendChild(r),e.insertBefore(l,e.firstChild),this.ieCheck&&(r.classList.add("e-ie-align"),l.classList.add("e-ie-align")),this.eventBinding([r,l])},t.prototype.onKeyPress=function(e){var t=this;if("Enter"===e.key){var i=function(){t.keyTimeout=!0,t.eleScrolling(10,e.target,!0)};this.keyTimer=window.setTimeout(function(){i()},100)}},t.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},t.prototype.eventBinding=function(e){var t=this;[].slice.call(e).forEach(function(e){new s.Touch(e,{tapHold:t.tabHoldHandler.bind(t),tapHoldThreshold:500}),e.addEventListener("keydown",t.onKeyPress.bind(t)),e.addEventListener("keyup",t.onKeyUp.bind(t)),e.addEventListener("mouseup",t.repeatScroll.bind(t)),e.addEventListener("touchend",t.repeatScroll.bind(t)),e.addEventListener("contextmenu",function(e){e.preventDefault()}),s.EventHandler.add(e,"click",t.clickEventHandler,t)})},t.prototype.repeatScroll=function(){clearInterval(this.timeout)},t.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,"e-scroll-nav")?i.firstElementChild:i;var s=function(){t.eleScrolling(10,i,!0)};this.timeout=window.setInterval(function(){s()},50)},t.prototype.contains=function(e,t){return e.classList.contains(t)},t.prototype.eleScrolling=function(e,t,i){var s=t.classList;s.contains("e-scroll-nav")&&(s=t.querySelector(".e-nav-arrow").classList),s.contains("e-nav-down-arrow")?this.frameScrollRequest(e,"add",i):s.contains("e-nav-up-arrow")&&this.frameScrollRequest(e,"",i)},t.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},t.prototype.wheelEventHandler=function(e){e.preventDefault(),this.frameScrollRequest(this.scrollStep,e.deltaY>0?"add":"",!1)},t.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 r=Math.sin(s);r<=0?window.cancelAnimationFrame(r):("Up"===e.swipeDirection?i.scrollTop+=t*r:"Down"===e.swipeDirection&&(i.scrollTop-=t*r),s-=.02,window.requestAnimationFrame(n))};n()},t.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollTop+=e:this.scrollEle.scrollTop-=e},t.prototype.frameScrollRequest=function(e,t,n){var r=this;if(n)return void this.scrollUpdating(e,t);this.customStep||[].slice.call(i.i(s.selectAll)(".e-scroll-overlay",this.element)).forEach(function(t){e-=t.offsetHeight});var o=function(){e<10?window.cancelAnimationFrame(10):(r.scrollUpdating(10,t),e-=10,window.requestAnimationFrame(o))};o()},t.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceY;"Up"===e.scrollDirection?t.scrollTop=t.scrollTop+i:"Down"===e.scrollDirection&&(t.scrollTop=t.scrollTop-i)},t.prototype.arrowDisabling=function(e,t){if(this.isDevice){var n=i.i(s.isNullOrUndefined)(e)?t:e,r=n.querySelector(".e-nav-arrow");i.i(s.isNullOrUndefined)(e)?i.i(s.classList)(r,["e-nav-down-arrow"],["e-nav-up-arrow"]):i.i(s.classList)(r,["e-nav-up-arrow"],["e-nav-down-arrow"])}else e.classList.add("e-overlay"),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),t.classList.remove("e-overlay"),t.setAttribute("aria-disabled","false"),t.setAttribute("tabindex","0");this.repeatScroll()},t.prototype.scrollEventHandler=function(e){var t=e.target,i=t.offsetHeight,s=this.element.querySelector(".e-scroll-up-nav"),n=this.element.querySelector(".e-scroll-down-nav"),r=this.element.querySelector(".e-scroll-up-overlay"),o=this.element.querySelector(".e-scroll-down-overlay"),a=t.scrollTop;if(a<=0&&(a=-a),this.isDevice&&(r.style.height=a<40?a+"px":"40px",t.scrollHeight-Math.ceil(i+a)<40?o.style.height=t.scrollHeight-Math.ceil(i+a)+"px":o.style.height="40px"),0===a)this.arrowDisabling(s,n);else if(Math.ceil(i+a+.1)>=t.scrollHeight)this.arrowDisabling(n,s);else{var l=this.element.querySelector(".e-scroll-nav.e-overlay");l&&(l.classList.remove("e-overlay"),l.setAttribute("aria-disabled","false"),l.setAttribute("tabindex","0"))}},t.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")}}},r([i.i(s.Property)(null)],t.prototype,"scrollStep",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t){e.exports=i},function(e,t){e.exports=s},function(e,t,i){"use strict";function s(e,t,i,s,r,o){var a,l,d=t.parentElement;if("vscroll"===s?(a=o||t.getBoundingClientRect().height,l=i.getBoundingClientRect().height):(a=t.getBoundingClientRect().width,l=i.getBoundingClientRect().width),a<l)return n(e,t,i,s,r,o);if(d){var h=d.getBoundingClientRect().width;return h<a&&"hscroll"===s?(l=h,t.style.maxWidth=h+"px",n(e,t,i,s,r,o)):i}return i}function n(e,t,s,n,r,d){var h=e("div",{className:"e-menu-"+n});t.appendChild(h),h.appendChild(s),d?(h.style.overflow="hidden",h.style.height=d+"px"):(h.style.maxHeight=t.style.maxHeight,t.style.overflow="hidden");var c;return"vscroll"===n?(c=new a.a({enableRtl:r},h),c.scrollStep=i.i(o.select)(".e-"+n+"-bar",t).offsetHeight/2):(c=new l.a({enableRtl:r},h),c.scrollStep=i.i(o.select)(".e-"+n+"-bar",t).offsetWidth),h}function r(e,t,s){if(e){var n=i.i(o.select)(".e-menu-parent",t);n?s&&s!==n||(e.destroy(),t.parentElement.appendChild(n),i.i(o.detach)(t)):(e.destroy(),i.i(o.detach)(t))}}t.a=s,t.b=r;var o=i(0),a=(i.n(o),i(4)),l=i(2)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"c",function(){return l}),i.d(t,"d",function(){return a}),i.d(t,"b",function(){return d});var s,n=i(0),r=(i.n(n),this&&this.__extends||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)}}()),o=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o};!function(e){e.NotStarted="NotStarted",e.InProgress="InProgress",e.Completed="Completed"}(s||(s={}));var a,l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([i.i(n.Property)("")],t.prototype,"cssClass",void 0),o([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),o([i.i(n.Property)("")],t.prototype,"iconCss",void 0),o([i.i(n.Property)(null)],t.prototype,"isValid",void 0),o([i.i(n.Property)("")],t.prototype,"label",void 0),o([i.i(n.Property)(!1)],t.prototype,"optional",void 0),o([i.i(n.Property)(s.NotStarted)],t.prototype,"status",void 0),o([i.i(n.Property)("")],t.prototype,"text",void 0),t}(n.ChildProperty);!function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"}(a||(a={}));var d=function(e){function t(t,i){return e.call(this,t,i)||this}return r(t,e),t.prototype.preRender=function(){},t.prototype.getModuleName=function(){return"stepperBase"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.render=function(){},t.prototype.updateOrientaion=function(e){(e.classList.contains("e-horizontal")||e.classList.contains("e-vertical"))&&(e.classList.contains("e-horizontal")?e.classList.remove("e-horizontal"):e.classList.remove("e-vertical")),e.classList.add("e-"+this.orientation.toLocaleLowerCase())},t.prototype.renderProgressBar=function(e){this.progressStep=this.createElement("div",{className:"e-stepper-progressbar"}),this.progressbar=this.createElement("div",{className:"e-progressbar-value"}),this.progressStep.appendChild(this.progressbar),e.prepend(this.progressStep),this.progressbar.style.setProperty("--progress-value","0%");var t=e.querySelector("li").querySelector(".e-step-label-container");if(e.classList.contains("e-vertical"))if(e.classList.contains("e-label-bottom")||e.classList.contains("e-label-top")){var i=e.querySelector(".e-stepper-steps");this.progressStep.style.setProperty("--progress-position",i.offsetWidth/2+"px")}else this.progressStep.style.setProperty("--progress-position",this.progressBarPosition/2-1+"px");t&&t.classList.contains("e-label-before")&&this.progressStep.style.setProperty("--progress-position",this.progressBarPosition-1+5+"px"),e.classList.contains("e-horizontal")&&this.setProgressPosition(e)},t.prototype.setProgressPosition=function(e,t){var i=e.querySelector(".e-step-container"),s=i.firstElementChild;if(1!=t){var n=0;n=e.classList.contains("e-label-before")?i.offsetParent.offsetHeight-s.offsetHeight/2-1:s.offsetHeight/2,this.progressStep.style.setProperty("--progress-top-position",n+"px")}var r=e.querySelector(".e-stepper-steps").lastChild.firstChild;if(e.classList.contains("e-rtl")){var o=s.offsetLeft+s.offsetWidth-e.querySelector(".e-stepper-steps").offsetWidth;this.progressStep.style.setProperty("--progress-left-position",Math.abs(o)+"px"),this.progressStep.style.setProperty("--progress-bar-width",Math.abs(r.offsetLeft-s.offsetLeft)+"px")}else this.progressStep.style.setProperty("--progress-left-position",s.offsetLeft+1+"px"),this.progressStep.style.setProperty("--progress-bar-width",r.offsetWidth+r.offsetLeft-2-(s.offsetLeft+2)+"px")},t.prototype.onPropertyChanged=function(e,t){},o([i.i(n.Collection)([],l)],t.prototype,"steps",void 0),o([i.i(n.Property)("")],t.prototype,"cssClass",void 0),o([i.i(n.Property)(!1)],t.prototype,"readOnly",void 0),o([i.i(n.Property)(a.Horizontal)],t.prototype,"orientation",void 0),o([i.i(n.Event)()],t.prototype,"created",void 0),t=o([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t,i){"use strict";i.d(t,"b",function(){return u}),i.d(t,"a",function(){return f});var s=i(0),n=(i.n(s),i(1)),r=(i.n(n),i(5)),o=(i.n(r),i(2)),a=i(4),l=this&&this.__extends||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)}}(),d=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},h="e-toolbar-items",c="e-toolbar-item",p="e-toolbar-popup",u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),d([i.i(s.Property)("")],t.prototype,"id",void 0),d([i.i(s.Property)("")],t.prototype,"text",void 0),d([i.i(s.Property)("auto")],t.prototype,"width",void 0),d([i.i(s.Property)("")],t.prototype,"cssClass",void 0),d([i.i(s.Property)(!1)],t.prototype,"showAlwaysInPopup",void 0),d([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),d([i.i(s.Property)("")],t.prototype,"prefixIcon",void 0),d([i.i(s.Property)("")],t.prototype,"suffixIcon",void 0),d([i.i(s.Property)(!0)],t.prototype,"visible",void 0),d([i.i(s.Property)("None")],t.prototype,"overflow",void 0),d([i.i(s.Property)("")],t.prototype,"template",void 0),d([i.i(s.Property)("Button")],t.prototype,"type",void 0),d([i.i(s.Property)("Both")],t.prototype,"showTextOn",void 0),d([i.i(s.Property)(null)],t.prototype,"htmlAttributes",void 0),d([i.i(s.Property)("")],t.prototype,"tooltipText",void 0),d([i.i(s.Property)("Left")],t.prototype,"align",void 0),d([i.i(s.Event)()],t.prototype,"click",void 0),d([i.i(s.Property)(-1)],t.prototype,"tabIndex",void 0),t}(s.ChildProperty),f=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.resizeContext=s.resize.bind(s),s.orientationChangeContext=s.orientationChange.bind(s),s.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},s}return l(t,e),t.prototype.destroy=function(){var t=this;(this.isReact||this.isAngular)&&this.clearTemplate();var n=this.element.querySelectorAll(".e-control.e-btn");for([].slice.call(n).forEach(function(e){i.i(s.isNullOrUndefined)(e)||i.i(s.isNullOrUndefined)(e.ej2_instances)||i.i(s.isNullOrUndefined)(e.ej2_instances[0])||e.ej2_instances[0].isDestroyed||e.ej2_instances[0].destroy()}),this.unwireEvents(),this.tempId.forEach(function(e){i.i(s.isNullOrUndefined)(t.element.querySelector(e))||(document.body.appendChild(t.element.querySelector(e)).style.display="none")}),this.destroyItems();this.element.lastElementChild;)this.element.removeChild(this.element.lastElementChild);this.trgtEle&&(this.element.appendChild(this.ctrlTem),this.trgtEle=null,this.ctrlTem=null),this.popObj&&(this.popObj.destroy(),i.i(s.detach)(this.popObj.element)),this.activeEle&&(this.activeEle=null),this.popObj=null,this.tbarAlign=null,this.tbarItemsCol=[],this.remove(this.element,"e-toolpop"),this.cssClass&&i.i(s.removeClass)([this.element],this.cssClass.split(" ")),this.element.removeAttribute("style"),["aria-disabled","aria-orientation","role"].forEach(function(e){return t.element.removeAttribute(e)}),e.prototype.destroy.call(this)},t.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("e-vertical"),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,"e-rtl")},t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),window.addEventListener("orientationchange",this.orientationChangeContext),this.allowKeyboard&&this.wireKeyboardEvent()},t.prototype.wireKeyboardEvent=function(){this.keyModule=new s.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs}),s.EventHandler.add(this.element,"keydown",this.docKeyDown,this),this.updateTabIndex("0")},t.prototype.updateTabIndex=function(e){var t=this.element.querySelector("."+c+":not(.e-overlay ):not(.e-separator ):not(.e-hidden )");if(!i.i(s.isNullOrUndefined)(t)&&!i.i(s.isNullOrUndefined)(t.firstElementChild)){var n=t.firstElementChild.getAttribute("data-tabindex");n&&"-1"===n&&"INPUT"!==t.firstElementChild.tagName&&t.firstElementChild.setAttribute("tabindex",e)}},t.prototype.unwireKeyboardEvent=function(){this.keyModule&&(s.EventHandler.remove(this.element,"keydown",this.docKeyDown),this.keyModule.destroy(),this.keyModule=null)},t.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var t=!i.i(s.isNullOrUndefined)(this.popObj)&&i.i(s.isVisible)(this.popObj.element)&&"Extended"!==this.overflowMode;9===e.keyCode&&!0===e.target.classList.contains("e-hor-nav")&&t&&this.popObj.hide({name:"FadeOut",duration:100});(40===e.keyCode||38===e.keyCode||35===e.keyCode||36===e.keyCode)&&e.preventDefault()}},t.prototype.unwireEvents=function(){s.EventHandler.remove(this.element,"click",this.clickHandler),this.destroyScroll(),this.unwireKeyboardEvent(),window.removeEventListener("resize",this.resizeContext),window.removeEventListener("orientationchange",this.orientationChangeContext),s.EventHandler.remove(document,"scroll",this.docEvent),s.EventHandler.remove(document,"click",this.docEvent)},t.prototype.clearProperty=function(){this.tbarEle=[],this.tbarAlgEle={lefts:[],centers:[],rights:[]}},t.prototype.docEvent=function(e){var t=i.i(s.closest)(e.target,".e-popup");this.popObj&&i.i(s.isVisible)(this.popObj.element)&&!t&&"Popup"===this.overflowMode&&this.popObj.hide({name:"FadeOut",duration:100})},t.prototype.destroyScroll=function(){this.scrollModule&&(this.tbarAlign&&this.add(this.scrollModule.element,"e-tbar-pos"),this.scrollModule.destroy(),this.scrollModule=null)},t.prototype.destroyItems=function(){if(this.element&&[].slice.call(this.element.querySelectorAll("."+c)).forEach(function(e){i.i(s.detach)(e)}),this.tbarAlign){var e=this.element.querySelector("."+h);[].slice.call(e.children).forEach(function(e){i.i(s.detach)(e)}),this.tbarAlign=!1,this.remove(e,"e-tbar-pos")}this.clearProperty()},t.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,"e-rtl"),this.destroyScroll()),this.remove(this.element,"e-tbar-extended"),this.remove(this.element,"e-extended-toolbar");var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,"e-toolbar-multirow"),this.popObj&&this.popupRefresh(this.popObj.element,!0)},t.prototype.add=function(e,t){e.classList.add(t)},t.prototype.remove=function(e,t){e.classList.remove(t)},t.prototype.elementFocus=function(e){var t=e.firstElementChild;t?(t.focus(),this.activeEleSwitch(e)):e.focus()},t.prototype.clstElement=function(e,t){return e&&this.popObj&&i.i(s.isVisible)(this.popObj.element)?this.popObj.element.querySelector("."+c):this.element===t||e?this.element.querySelector("."+c+":not(.e-overlay ):not(.e-separator ):not(.e-hidden )"):i.i(s.closest)(t,"."+c)},t.prototype.keyHandling=function(e,t,n,r,o){var a,l,d=this.popObj,p=this.element,u={name:"FadeOut",duration:100},f="moveUp"===t.action?"previous":"next";switch(t.action){case"moveRight":if(this.isVertical)return;p===n?this.elementFocus(e):r||this.eleFocus(e,"next");break;case"moveLeft":if(this.isVertical)return;r||this.eleFocus(e,"previous");break;case"home":case"end":if(e){var m=i.i(s.closest)(e,".e-popup"),v=this.element.querySelector(".e-toolbar-extended");"Extended"===this.overflowMode&&v&&v.classList.contains("e-popup-open")&&(m="end"===t.action?v:null),m?i.i(s.isVisible)(this.popObj.element)&&(l=[].slice.call(m.children),a="home"===t.action?this.focusFirstVisibleEle(l):this.focusLastVisibleEle(l)):(l=this.element.querySelectorAll("."+h+" ."+c+":not(.e-separator)"),a="home"===t.action?this.focusFirstVisibleEle(l):this.focusLastVisibleEle(l)),a&&this.elementFocus(a)}break;case"moveUp":case"moveDown":if(this.isVertical)"moveUp"===t.action?this.eleFocus(e,"previous"):this.eleFocus(e,"next");else if(d&&i.i(s.closest)(n,".e-popup")){var g=d.element,y=g.firstElementChild;"previous"===f&&y===e?g.lastElementChild.firstChild.focus():"next"===f&&g.lastElementChild===e?y.firstChild.focus():this.eleFocus(e,f)}else"moveDown"===t.action&&d&&i.i(s.isVisible)(d.element)&&this.elementFocus(e);break;case"tab":if(!o&&!r){var b=e.firstElementChild;p===n&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(b),b.focus()))}break;case"popupClose":d&&"Extended"!==this.overflowMode&&d.hide(u);break;case"popupOpen":if(!r)return;d&&!i.i(s.isVisible)(d.element)?(d.element.style.top=p.offsetHeight+"px",d.show({name:"FadeIn",duration:100})):d.hide(u)}},t.prototype.keyActionHandler=function(e){var t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!this.element.classList.contains("e-overlay")){e.preventDefault();var i=t.classList.contains("e-hor-nav"),s=t.classList.contains("e-scroll-nav"),n=this.clstElement(i,t);(n||s)&&this.keyHandling(n,e,t,i,s)}},t.prototype.disable=function(e){var t=this.element;e?t.classList.add("e-overlay"):t.classList.remove("e-overlay"),this.activeEle&&this.activeEle.setAttribute("tabindex",this.activeEle.getAttribute("data-tabindex")),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&(i.i(s.isVisible)(this.popObj.element)&&"Extended"!==this.overflowMode&&this.popObj.hide(),t.querySelector("#"+t.id+"_nav").setAttribute("tabindex",e?"-1":"0"))},t.prototype.eleContains=function(e){return e.classList.contains("e-separator")||e.classList.contains("e-overlay")||e.getAttribute("disabled")||e.classList.contains("e-hidden")||!i.i(s.isVisible)(e)||!e.classList.contains(c)},t.prototype.focusFirstVisibleEle=function(e){for(var t=0;t<e.length;){var i=e[parseInt(t.toString(),10)];if(!i.classList.contains("e-hidden")&&!i.classList.contains("e-overlay"))return i;t++}},t.prototype.focusLastVisibleEle=function(e){for(var t=e.length-1;t>=0;){var i=e[parseInt(t.toString(),10)];if(!i.classList.contains("e-hidden")&&!i.classList.contains("e-overlay"))return i;t--}},t.prototype.eleFocus=function(e,t){var n=Object(e)[t+"ElementSibling"];if(n){if(this.eleContains(n))return void this.eleFocus(n,t);this.elementFocus(n)}else if(this.tbarAlign){var r=Object(e.parentElement)[t+"ElementSibling"];if(i.i(s.isNullOrUndefined)(r)||0!==r.children.length||(r=Object(r)[t+"ElementSibling"]),!i.i(s.isNullOrUndefined)(r)&&r.children.length>0)if("next"===t){var o=r.querySelector("."+c);this.eleContains(o)?this.eleFocus(o,t):(o.firstElementChild.focus(),this.activeEleSwitch(o))}else{var o=r.lastElementChild;this.eleContains(o)?this.eleFocus(o,t):this.elementFocus(o)}}else if(!i.i(s.isNullOrUndefined)(e)){var a=this.element.querySelectorAll("."+h+" ."+c+":not(.e-separator):not(.e-overlay):not(.e-hidden)");"next"===t&&a?this.elementFocus(a[0]):"previous"===t&&a&&this.elementFocus(a[a.length-1])}},t.prototype.clickHandler=function(e){var t=this,n=e.target,r=this.element,o=!i.i(s.isNullOrUndefined)(i.i(s.closest)(n,".e-toolbar-pop")),a=n.classList,l=i.i(s.closest)(n,".e-hor-nav");l||(l=n),r.children[0].classList.contains("e-hscroll")||r.children[0].classList.contains("e-vscroll")||!a.contains("e-hor-nav")||(a=n.querySelector(".e-icons").classList),(a.contains("e-popup-up-icon")||a.contains("e-popup-down-icon"))&&this.popupClickHandler(r,l,"e-rtl");var d,h=i.i(s.closest)(e.target,"."+c);if(!i.i(s.isNullOrUndefined)(h)&&!h.classList.contains("e-overlay")||l.classList.contains("e-hor-nav")){if(h){d=this.items[this.tbarEle.indexOf(h)]}var p={originalEvent:e,item:d};(d&&!i.i(s.isNullOrUndefined)(d.click)&&"object"==typeof d.click?!i.i(s.isNullOrUndefined)(d.click.observers)&&d.click.observers.length>0:!i.i(s.isNullOrUndefined)(d)&&!i.i(s.isNullOrUndefined)(d.click))&&this.trigger("items["+this.tbarEle.indexOf(h)+"].click",p),p.cancel||this.trigger("clicked",p,function(e){!i.i(s.isNullOrUndefined)(t.popObj)&&o&&!e.cancel&&"Popup"===t.overflowMode&&e.item&&"Input"!==e.item.type&&t.popObj.hide({name:"FadeOut",duration:100})})}},t.prototype.popupClickHandler=function(e,t,n){var r=this.popObj;i.i(s.isVisible)(r.element)?(t.classList.remove("e-nav-active"),r.hide({name:"FadeOut",duration:100})):(e.classList.contains(n)&&(r.enableRtl=!0,r.position={X:"left",Y:"top"}),0!==r.offsetX||e.classList.contains(n)||(r.enableRtl=!1,r.position={X:"right",Y:"top"}),"Extended"===this.overflowMode&&(r.element.style.minHeight="0px",r.width=this.getToolbarPopupWidth(this.element)),r.dataBind(),r.refreshPosition(),r.element.style.top=this.getElementOffsetY()+"px",t.classList.add("e-nav-active"),r.show({name:"FadeIn",duration:100}))},t.prototype.getToolbarPopupWidth=function(e){var t=window.getComputedStyle(e);return parseFloat(t.width)+2*parseFloat(t.borderRightWidth)},t.prototype.render=function(){var e=this;this.initialize(),this.renderControl(),this.wireEvents(),this.renderComplete(),this.isReact&&this.portals&&this.portals.length>0&&this.renderReactTemplates(function(){e.refreshOverflow()})},t.prototype.initialize=function(){var e=i.i(s.formatUnit)(this.width),t=i.i(s.formatUnit)(this.height);"msie"===s.Browser.info.name&&"auto"===this.height&&"MultiRow"!==this.overflowMode||i.i(s.setStyleAttribute)(this.element,{height:t}),i.i(s.setStyleAttribute)(this.element,{width:e});var n={role:"toolbar","aria-disabled":"false","aria-orientation":this.isVertical?"vertical":"horizontal"};i.i(s.attributes)(this.element,n),this.cssClass&&i.i(s.addClass)([this.element],this.cssClass.split(" "))},t.prototype.renderControl=function(){var e=this.element;this.trgtEle=e.children.length>0?e.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderLayout()},t.prototype.renderLayout=function(){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),this.separator()},t.prototype.itemsAlign=function(e,t){var i,s;this.tbarEle||(this.tbarEle=[]);for(var n=0;n<e.length;n++)i=this.renderSubComponent(e[parseInt(n.toString(),10)],n),-1===this.tbarEle.indexOf(i)&&this.tbarEle.push(i),this.tbarAlign||this.tbarItemAlign(e[parseInt(n.toString(),10)],t,n),s=t.querySelector(".e-toolbar-"+e[parseInt(n.toString(),10)].align.toLowerCase()),s?(e[parseInt(n.toString(),10)].showAlwaysInPopup&&"Show"!==e[parseInt(n.toString(),10)].overflow||this.tbarAlgEle[(e[parseInt(n.toString(),10)].align+"s").toLowerCase()].push(i),s.appendChild(i)):t.appendChild(i);if(this.isReact){this.notify("render-react-toolbar-template",this.portals),this.renderReactTemplates()}},t.prototype.changeOrientation=function(){var e=this.element;this.isVertical?(e.classList.remove("e-vertical"),this.isVertical=!1,"auto"!==this.height&&"100%"!==this.height||(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add("e-vertical"),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),i.i(s.setStyleAttribute)(this.element,{height:i.i(s.formatUnit)(this.height),width:i.i(s.formatUnit)(this.width)})),this.destroyMode(),this.refreshOverflow()},t.prototype.initScroll=function(e,t){if(!this.scrollModule&&this.checkOverflow(e,t[0])){this.tbarAlign&&this.element.querySelector("."+h+" .e-toolbar-center").removeAttribute("style"),this.isVertical?this.scrollModule=new a.a({scrollStep:this.scrollStep,enableRtl:this.enableRtl},t[0]):this.scrollModule=new o.a({scrollStep:this.scrollStep,enableRtl:this.enableRtl},t[0]),this.cssClass&&i.i(s.addClass)([t[0]],this.cssClass.split(" "));var n=this.scrollModule.element.querySelector(".e-hscroll-bar, .e-vscroll-bar");n&&n.removeAttribute("tabindex"),this.remove(this.scrollModule.element,"e-tbar-pos"),i.i(s.setStyleAttribute)(this.element,{overflow:"hidden"})}},t.prototype.itemWidthCal=function(e){var t,n=this,r=0;return[].slice.call(i.i(s.selectAll)("."+c,e)).forEach(function(e){i.i(s.isVisible)(e)&&(t=window.getComputedStyle(e),r+=n.isVertical?e.offsetHeight:e.offsetWidth,r+=parseFloat(n.isVertical?t.marginTop:t.marginRight),r+=parseFloat(n.isVertical?t.marginBottom:t.marginLeft))}),r},t.prototype.getScrollCntEle=function(e){var t=this.isVertical?".e-vscroll-content":".e-hscroll-content";return e.querySelector(t)},t.prototype.checkOverflow=function(e,t){if(i.i(s.isNullOrUndefined)(e)||i.i(s.isNullOrUndefined)(t)||!i.i(s.isVisible)(e))return!1;var n=this.isVertical?e.offsetHeight:e.offsetWidth,r=this.isVertical?t.offsetHeight:t.offsetWidth;(this.tbarAlign||this.scrollModule||n===r)&&(r=this.itemWidthCal(this.scrollModule?this.getScrollCntEle(t):t));var o=e.querySelector(".e-hor-nav"),a=e.querySelector(".e-scroll-nav"),l=0;return o?l=this.isVertical?o.offsetHeight:o.offsetWidth:a&&(l=this.isVertical?2*a.offsetHeight:2*a.offsetWidth),r>n-l},t.prototype.refreshOverflow=function(){this.resize()},t.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,"e-tbar-pos"),this.itemPositioning())},t.prototype.renderOverflowMode=function(){var e=this.element,t=e.querySelector("."+h),n=this.popupPriCount>0;if(e&&e.children.length>0)switch(this.offsetWid=e.offsetWidth,this.remove(this.element,"e-toolpop"),"msie"===s.Browser.info.name&&"auto"===this.height&&(e.style.height=""),this.overflowMode){case"Scrollable":i.i(s.isNullOrUndefined)(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(h)));break;case"Popup":this.add(this.element,"e-toolpop"),this.tbarAlign&&this.removePositioning(),(this.checkOverflow(e,t)||n)&&this.setOverflowAttributes(e),this.toolbarAlign(t);break;case"MultiRow":this.add(t,"e-toolbar-multirow"),this.checkOverflow(e,t)&&this.tbarAlign&&(this.removePositioning(),this.add(t,"e-multirow-pos")),"hidden"===e.style.overflow&&(e.style.overflow=""),"msie"!==s.Browser.info.name&&"auto"===e.style.height||(e.style.height="auto");break;case"Extended":this.add(this.element,"e-extended-toolbar"),(this.checkOverflow(e,t)||n)&&(this.tbarAlign&&this.removePositioning(),this.setOverflowAttributes(e)),this.toolbarAlign(t)}},t.prototype.setOverflowAttributes=function(e){this.createPopupEle(e,[].slice.call(i.i(s.selectAll)("."+h+" ."+c,e)));var t={tabindex:"0",role:"button","aria-haspopup":"true","aria-label":"overflow"};i.i(s.attributes)(this.element.querySelector(".e-hor-nav"),t)},t.prototype.separator=function(){var e=this.element,t=[].slice.call(e.querySelectorAll(".e-separator")),i=e.querySelector(".e-multirow-separator"),s=e.querySelector(".e-extended-separator"),n="MultiRow"===this.overflowMode?i:s;null!==n&&("MultiRow"===this.overflowMode?n.classList.remove("e-multirow-separator"):"Extended"===this.overflowMode&&n.classList.remove("e-extended-separator"));for(var r=0;r<=t.length-1;r++)t[parseInt(r.toString(),10)].offsetLeft<30&&0!==t[parseInt(r.toString(),10)].offsetLeft&&("MultiRow"===this.overflowMode?t[parseInt(r.toString(),10)].classList.add("e-multirow-separator"):"Extended"===this.overflowMode&&t[parseInt(r.toString(),10)].classList.add("e-extended-separator"))},t.prototype.createPopupEle=function(e,t){var n=e.querySelector(".e-hor-nav"),r=this.isVertical;n||this.createPopupIcon(e),n=e.querySelector(".e-hor-nav");var o=r?n.offsetHeight:n.offsetWidth,a=(r?e.offsetHeight:e.offsetWidth)-o;this.element.classList.remove("e-rtl"),i.i(s.setStyleAttribute)(this.element,{direction:"initial"}),this.checkPriority(e,t,a,!0),this.enableRtl&&this.element.classList.add("e-rtl"),this.element.style.removeProperty("direction"),this.createPopup()},t.prototype.pushingPoppedEle=function(e,t,n,r,o){var a=e.element,l=[].slice.call(i.i(s.selectAll)("."+p,a.querySelector("."+h))),d=i.i(s.selectAll)(".e-overflow-show",n),u=0,f=0;l.forEach(function(a,l){d=i.i(s.selectAll)(".e-overflow-show",n),a.classList.contains("e-overflow-show")&&d.length>0?e.tbResize&&d.length>l?(n.insertBefore(a,d[parseInt(l.toString(),10)]),++f):(n.insertBefore(a,n.children[d.length]),++f):a.classList.contains("e-overflow-show")?(n.insertBefore(a,n.firstChild),++f):e.tbResize&&a.classList.contains("e-overflow-hide")&&n.children.length>0&&0===d.length?(n.insertBefore(a,n.firstChild),++f):a.classList.contains("e-overflow-hide")?t.push(a):e.tbResize?(n.insertBefore(a,n.childNodes[u+f]),++u):n.appendChild(a),a.classList.contains("e-separator")?i.i(s.setStyleAttribute)(a,{display:"",height:o+"px"}):i.i(s.setStyleAttribute)(a,{display:"",height:r+"px"})}),t.forEach(function(e){n.appendChild(e)});for(var m=i.i(s.selectAll)("."+c,a.querySelector("."+h)),v=m.length-1;v>=0;v--){var g=m[parseInt(v.toString(),10)];if(!g.classList.contains("e-separator")||"Extended"===this.overflowMode)break;i.i(s.setStyleAttribute)(g,{display:"none"})}},t.prototype.createPopup=function(){var e,t,n=this.element;"Extended"===this.overflowMode&&(t=n.querySelector(".e-separator"),e="auto"===n.style.height||""===n.style.height?null:t&&t.offsetHeight);var r,o=n.querySelector("."+c+":not(.e-separator):not(."+p+")"),a="auto"===n.style.height||""===n.style.height?null:o&&o.offsetHeight,l=[];if(i.i(s.select)("#"+n.id+"_popup.e-toolbar-pop",n))r=i.i(s.select)("#"+n.id+"_popup.e-toolbar-pop",n);else{var d=this.createElement("div",{id:n.id+"_popup",className:"e-toolbar-pop e-toolbar-extended"}),h=this.createElement("div",{id:n.id+"_popup",className:"e-toolbar-pop"});r="Extended"===this.overflowMode?d:h}this.pushingPoppedEle(this,l,r,a,e),this.popupInit(n,r)},t.prototype.getElementOffsetY=function(){return"Extended"===this.overflowMode&&"border-box"===window.getComputedStyle(this.element).getPropertyValue("box-sizing")?this.element.clientHeight:this.element.offsetHeight},t.prototype.popupInit=function(e,t){if(this.popObj){if("Extended"!==this.overflowMode){var r=this.popObj.element;i.i(s.setStyleAttribute)(r,{maxHeight:"",display:"block"}),i.i(s.setStyleAttribute)(r,{maxHeight:r.offsetHeight+"px",display:""})}}else{e.appendChild(t),this.cssClass&&i.i(s.addClass)([t],this.cssClass.split(" ")),i.i(s.setStyleAttribute)(this.element,{overflow:""});var o=(window.getComputedStyle(this.element),new n.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("Extended"===this.overflowMode&&(o.width=this.getToolbarPopupWidth(this.element),o.offsetX=0),o.appendTo(t),s.EventHandler.add(document,"scroll",this.docEvent.bind(this)),s.EventHandler.add(document,"click ",this.docEvent.bind(this)),"Extended"!==this.overflowMode&&(o.element.style.maxHeight=o.element.offsetHeight+"px"),this.isVertical&&(o.element.style.visibility="hidden"),this.isExtendedOpen){var a=this.element.querySelector(".e-hor-nav");a.classList.add("e-nav-active"),i.i(s.classList)(a.firstElementChild,["e-popup-up-icon"],["e-popup-down-icon"]),this.element.querySelector(".e-toolbar-extended").classList.add("e-popup-open")}else o.hide();this.popObj=o}},t.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,"e-tbar-extended"):this.remove(this.element,"e-tbar-extended"))},t.prototype.popupOpen=function(e){var t=this.popObj;this.isVertical||(t.offsetY=this.getElementOffsetY(),t.dataBind());var r=this.popObj.element,o=this.popObj.element.parentElement,a=o.querySelector(".e-hor-nav");a.setAttribute("aria-expanded","true"),"Extended"===this.overflowMode?t.element.style.minHeight="":(i.i(s.setStyleAttribute)(t.element,{height:"auto",maxHeight:""}),t.element.style.maxHeight=t.element.offsetHeight+"px");var l=r.offsetTop+r.offsetHeight+i.i(n.calculatePosition)(o).top,d=a.firstElementChild;a.classList.add("e-nav-active"),i.i(s.classList)(d,["e-popup-up-icon"],["e-popup-down-icon"]),this.tbarPopupHandler(!0);var h=i.i(s.isNullOrUndefined)(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+h<l&&this.element.offsetTop<r.offsetHeight){var c=r.offsetHeight-(l-window.innerHeight-h+5);t.height=c+"px";for(var p=0;p<=r.childElementCount;p++){var u=r.children[parseInt(p.toString(),10)];if(u.offsetTop+u.offsetHeight>c){c=u.offsetTop;break}}"Extended"!==this.overflowMode&&i.i(s.setStyleAttribute)(t.element,{maxHeight:c+"px"})}else if(this.isVertical&&"Extended"!==this.overflowMode){var f=this.element.getBoundingClientRect();i.i(s.setStyleAttribute)(t.element,{maxHeight:f.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}if(t){var m=r.getBoundingClientRect();m.right>document.documentElement.clientWidth&&m.width>o.getBoundingClientRect().width&&(t.collision={Y:"none"},t.dataBind()),t.refreshPosition()}},t.prototype.popupClose=function(e){var t=this.element,n=t.querySelector(".e-hor-nav");n.setAttribute("aria-expanded","false");var r=n.firstElementChild;n.classList.remove("e-nav-active"),i.i(s.classList)(r,["e-popup-down-icon"],["e-popup-up-icon"]),this.tbarPopupHandler(!1)},t.prototype.checkPriority=function(e,t,n,r){for(var o,a=this.popupPriCount>0,l=t.length,d=n,h=0,u=0,f=0,m=function(e,t){var i=!1;return t.forEach(function(t){e.classList.contains(t)&&(i=!0)}),i},v=l-1;v>=0;v--){var g=void 0,y=window.getComputedStyle(t[parseInt(v.toString(),10)]);this.isVertical?(g=parseFloat(y.marginTop),g+=parseFloat(y.marginBottom)):(g=parseFloat(y.marginRight),g+=parseFloat(y.marginLeft));var b=t[parseInt(v.toString(),10)]===this.tbarEle[0];b&&(this.tbarEleMrgn=g),o=this.isVertical?t[parseInt(v.toString(),10)].offsetHeight:t[parseInt(v.toString(),10)].offsetWidth;var C=b?o+g:o;if(m(t[parseInt(v.toString(),10)],["e-popup-alone"])&&a&&(t[parseInt(v.toString(),10)].classList.add(p),this.isVertical?i.i(s.setStyleAttribute)(t[parseInt(v.toString(),10)],{display:"none",minHeight:C+"px"}):i.i(s.setStyleAttribute)(t[parseInt(v.toString(),10)],{display:"none",minWidth:C+"px"}),f++),this.isVertical?t[parseInt(v.toString(),10)].offsetTop+t[parseInt(v.toString(),10)].offsetHeight+g>n:t[parseInt(v.toString(),10)].offsetLeft+t[parseInt(v.toString(),10)].offsetWidth+g>n){if(t[parseInt(v.toString(),10)].classList.contains("e-separator")){if("Extended"===this.overflowMode){var x=t[parseInt(v.toString(),10)];m(x,["e-separator","e-ignore"])&&(t[parseInt(v.toString(),10)].classList.add(p),f++),u++}else if("Popup"===this.overflowMode){if(h>0&&u===f){var x=t[v+u+(h-1)];m(x,["e-separator","e-ignore"])&&i.i(s.setStyleAttribute)(x,{display:"none"})}h++,u=0,f=0}}else u++;t[parseInt(v.toString(),10)].classList.contains("e-overflow-show")&&r?n-=(this.isVertical?t[parseInt(v.toString(),10)].offsetHeight:t[parseInt(v.toString(),10)].offsetWidth)+g:m(t[parseInt(v.toString(),10)],["e-separator","e-ignore"])?n-=(this.isVertical?t[parseInt(v.toString(),10)].offsetHeight:t[parseInt(v.toString(),10)].offsetWidth)+g:(t[parseInt(v.toString(),10)].classList.add(p),this.isVertical?i.i(s.setStyleAttribute)(t[parseInt(v.toString(),10)],{display:"none",minHeight:C+"px"}):i.i(s.setStyleAttribute)(t[parseInt(v.toString(),10)],{display:"none",minWidth:C+"px"}),f++)}}if(r){var S=i.i(s.selectAll)("."+c+":not(."+p+")",this.element);this.checkPriority(e,S,d,!1)}},t.prototype.createPopupIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav e-hor-nav");i="Extended"===this.overflowMode?i+" e-expended-nav":i;var n=this.createElement("div",{id:t,className:i});"msie"!==s.Browser.info.name&&"edge"!==s.Browser.info.name||n.classList.add("e-ie-align");var r=this.createElement("div",{className:"e-popup-down-icon e-icons"});n.appendChild(r),n.setAttribute("tabindex","0"),n.setAttribute("role","button"),e.appendChild(n)},t.prototype.tbarPriRef=function(e,t,n,r,o,a,l,d,h){var c=d,u=this.popObj.element,f=i.i(s.selectAll)("."+p+":not(.e-overflow-show)",u).length,m=function(e,t){return e.classList.contains(t)};if(0===i.i(s.selectAll)(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)",e).length){var v=e.children[t-(t-n)-1],g=!i.i(s.isNullOrUndefined)(v)&&m(v,"e-ignore");if(!i.i(s.isNullOrUndefined)(v)&&m(v,"e-separator")&&!i.i(s.isVisible)(v)||g){v.style.display="unset";var y=v.offsetWidth+2*parseFloat(window.getComputedStyle(v).marginRight),b=v.previousElementSibling;a+y<l||o?(e.insertBefore(r,e.children[t+c-(t-n)]),i.i(s.isNullOrUndefined)(b)||(b.style.display="")):(i.i(s.setStyleAttribute)(r,h),b.classList.contains("e-separator")&&(b.style.display="none")),v.style.display=""}else e.insertBefore(r,e.children[t+c-(t-n)])}else e.insertBefore(r,e.children[t+c-f])},t.prototype.popupRefresh=function(e,t){var n=this,r=this.element,o=this.isVertical,a=r.querySelector("."+h),l=r.querySelector(".e-hor-nav");if(!i.i(s.isNullOrUndefined)(l)){a.removeAttribute("style"),e.style.display="block";var d;d=o?r.offsetHeight-(l.offsetHeight+a.offsetHeight):r.offsetWidth-(l.offsetWidth+a.offsetWidth);var c=0;[].slice.call(e.children).forEach(function(e){c+=n.popupEleWidth(e),i.i(s.setStyleAttribute)(e,{position:""})}),d+(o?l.offsetHeight:l.offsetWidth)>c&&0===this.popupPriCount&&(t=!0),this.popupEleRefresh(d,e,t),e.style.display="",0===e.children.length&&l&&this.popObj&&(i.i(s.detach)(l),l=null,this.popObj.destroy(),i.i(s.detach)(this.popObj.element),this.popObj=null)}},t.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll(".e-ignore")),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},t.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(".e-hor-nav").offsetWidth,n=e.querySelector("."+h).offsetWidth;return t.style.removeProperty("display"),s>i+n},t.prototype.popupEleWidth=function(e){e.style.position="absolute";var t=this.isVertical?e.offsetHeight:e.offsetWidth,n=e.querySelector(".e-tbar-btn-text");if(e.classList.contains("e-tbtn-align")||e.classList.contains("e-popup-text")){var r=e.children[0];!i.i(s.isNullOrUndefined)(n)&&e.classList.contains("e-popup-text")?n.style.display="none":!i.i(s.isNullOrUndefined)(n)&&e.classList.contains("e-toolbar-text")&&(n.style.display="block"),r.style.minWidth="0%",t=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),r.style.minWidth="",r.style.minHeight="",i.i(s.isNullOrUndefined)(n)||(n.style.display="")}return t},t.prototype.popupEleRefresh=function(e,t,n){for(var r,o,a=this.popupPriCount>0,l=this.tbarEle,d=this.element.querySelector("."+h),c=0,u=this,f=0,m=[].slice.call(t.children);f<m.length;f++){var v=m[f];if("break"===function(t){if(t.classList.contains("e-popup-alone")&&a&&!n)return"continue";var f=u.popupEleWidth(t);if(t===u.tbarEle[0]&&(f+=u.tbarEleMrgn),t.style.position="",!(f<e||n))return"break";var m={minWidth:t.style.minWidth,height:t.style.height,minHeight:t.style.minHeight};if(i.i(s.setStyleAttribute)(t,{minWidth:"",height:"",minHeight:""}),t.classList.contains("e-overflow-hide")||t.classList.remove(p),o=u.tbarEle.indexOf(t),u.tbarAlign){var v=u.items[parseInt(o.toString(),10)].align;o=u.tbarAlgEle[(v+"s").toLowerCase()].indexOf(t),l=u.tbarAlgEle[(v+"s").toLowerCase()],d=u.element.querySelector("."+h+" .e-toolbar-"+v.toLowerCase())}var g=0;"Extended"!==u.overflowMode&&l.slice(0,o).forEach(function(t){(t.classList.contains("e-overflow-show")||t.classList.contains("e-separator"))&&(t.classList.contains("e-separator")&&(t.style.display="",e-=t.offsetWidth),g++)}),c=u.ignoreEleFetch(o,d),t.classList.contains("e-overflow-show")?(u.tbarPriRef(d,o,g,t,n,f,e,c,m),e-=t.offsetWidth):0===o?(d.insertBefore(t,d.firstChild),e-=t.offsetWidth):(r=i.i(s.selectAll)(".e-overflow-show",u.popObj.element).length,d.insertBefore(t,d.children[o+c-r]),e-=t.offsetWidth),t.style.height=""}(v))break}this.checkOverflow(this.element,this.element.getElementsByClassName(h)[0])&&!n&&this.renderOverflowMode()},t.prototype.removePositioning=function(){var e=this.element.querySelector("."+h);if(!i.i(s.isNullOrUndefined)(e)&&e.classList.contains("e-tbar-pos")){this.remove(e,"e-tbar-pos");var t=[].slice.call(e.childNodes);t[1].removeAttribute("style"),t[2].removeAttribute("style")}},t.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+h);this.add(e,"e-tbar-pos"),this.itemPositioning()},t.prototype.itemPositioning=function(){var e,t=this.element.querySelector("."+h);if(!i.i(s.isNullOrUndefined)(t)&&t.classList.contains("e-tbar-pos")){var n,r=this.element.querySelector(".e-hor-nav");if(this.scrollModule){var o=this.isVertical?"e-vscroll-content":"e-hscroll-content";n=[].slice.call(t.querySelector("."+o).children)}else n=[].slice.call(t.childNodes);e=this.isVertical?n[0].offsetHeight+n[2].offsetHeight:n[0].offsetWidth+n[2].offsetWidth;var a=this.isVertical?this.element.offsetHeight:this.element.offsetWidth;if(r){a-=this.isVertical?r.offsetHeight:r.offsetWidth;var l=(this.isVertical?r.offsetHeight:r.offsetWidth)+"px";n[2].removeAttribute("style"),this.isVertical?this.enableRtl?n[2].style.top=l:n[2].style.bottom=l:this.enableRtl?n[2].style.left=l:n[2].style.right=l}if(!(a<=e)){var d=(a-e-(this.isVertical?n[1].offsetHeight:n[1].offsetWidth))/2;n[1].removeAttribute("style");var c=(this.isVertical?n[0].offsetHeight:n[0].offsetWidth)+d+"px";this.isVertical?this.enableRtl?n[1].style.marginBottom=c:n[1].style.marginTop=c:this.enableRtl?n[1].style.marginRight=c:n[1].style.marginLeft=c}}},t.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:"e-toolbar-center"})),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,"e-tbar-pos");else if("Left"!==e.align){var r=t.childNodes,o=n[0];[].slice.call(r).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,"e-tbar-pos")}}},t.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,h),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach(function(t){"DIV"===t.tagName&&(e.tbarEle.push(t),i.i(s.isNullOrUndefined)(t.firstElementChild)||t.firstElementChild.setAttribute("aria-disabled","false"),e.add(t,c))})},t.prototype.renderItems=function(){var e=this.element,t=this.items;if(null!=this.trgtEle)this.ctrlTemplate();else if(e&&t.length>0){var i=void 0;e&&e.children.length>0&&(i=e.querySelector("."+h)),i||(i=this.createElement("div",{className:h})),this.itemsAlign(t,i),e.appendChild(i)}},t.prototype.setAttr=function(e,t){for(var i,s=Object.keys(e),n=0;n<s.length;n++)i=s[parseInt(n.toString(),10)],"class"===i?this.add(t,e[""+i]):t.setAttribute(i,e[""+i])},t.prototype.enableItems=function(e,t){var n,r=e,o=r.length;i.i(s.isNullOrUndefined)(t)&&(t=!0);var a=function(e,t){e?(t.classList.remove("e-overlay"),i.i(s.isNullOrUndefined)(t.firstElementChild)||t.firstElementChild.setAttribute("aria-disabled","false")):(t.classList.add("e-overlay"),i.i(s.isNullOrUndefined)(t.firstElementChild)||t.firstElementChild.setAttribute("aria-disabled","true"))};if(!i.i(s.isNullOrUndefined)(o)&&o>=1){for(var l=0,d=[].slice.call(r);l<o;l++){var h=d[parseInt(l.toString(),10)];if("number"==typeof h){if(n=this.getElementByIndex(h),i.i(s.isNullOrUndefined)(n))return;r[parseInt(l.toString(),10)]=n}else n=h;a(t,n)}t?i.i(s.removeClass)(r,"e-overlay"):i.i(s.addClass)(r,"e-overlay")}else{if("number"==typeof r){if(n=this.getElementByIndex(r),i.i(s.isNullOrUndefined)(n))return}else n=e;a(t,n)}},t.prototype.getElementByIndex=function(e){return this.tbarEle[parseInt(e.toString(),10)]?this.tbarEle[parseInt(e.toString(),10)]:null},t.prototype.addItems=function(e,t){var n;this.extendedOpen();var r=this.element.querySelector("."+h);if(i.i(s.isNullOrUndefined)(r))return void this.itemsRerender(e);var o,a="Left";i.i(s.isNullOrUndefined)(t)&&(t=0),e.forEach(function(e){i.i(s.isNullOrUndefined)(e.align)||"Left"===e.align||"Left"!==a||(a=e.align)});for(var l=0,d=e;l<d.length;l++){var p=d[l];if(i.i(s.isNullOrUndefined)(p.type)&&(p.type="Button"),n=i.i(s.selectAll)("."+c,this.element),p.align=a,o=this.renderSubComponent(p,t),this.tbarEle.length>=t&&n.length>=0){i.i(s.isNullOrUndefined)(this.scrollModule)&&this.destroyMode();var u="L"===p.align[0]?0:"C"===p.align[0]?1:2,f=void 0;this.tbarAlign||"Left"===a?this.tbarAlign?(f=i.i(s.closest)(n[0],"."+h).children[parseInt(u.toString(),10)],f.insertBefore(o,f.children[parseInt(t.toString(),10)]),this.tbarAlgEle[(p.align+"s").toLowerCase()].splice(t,0,o),this.refreshPositioning()):0===n.length?(n=i.i(s.selectAll)("."+h,this.element),n[0].appendChild(o)):n[0].parentNode.insertBefore(o,n[parseInt(t.toString(),10)]):(this.tbarItemAlign(p,r,1),this.tbarAlign=!0,f=i.i(s.closest)(n[0],"."+h).children[parseInt(u.toString(),10)],f.appendChild(o),this.tbarAlgEle[(p.align+"s").toLowerCase()].push(o),this.refreshPositioning()),this.items.splice(t,0,p),p.template&&this.tbarEle.splice(this.tbarEle.length-1,1),this.tbarEle.splice(t,0,o),t++,this.offsetWid=r.offsetWidth}}r.style.width="",this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()},t.prototype.removeItems=function(e){var t,n=e,r=[].slice.call(i.i(s.selectAll)("."+c,this.element));if("number"==typeof n)t=parseInt(e.toString(),10),this.removeItemByIndex(t,r);else if(n&&n.length>1)for(var o=0,a=[].slice.call(n);o<a.length;o++){var l=a[o];t=this.tbarEle.indexOf(l),this.removeItemByIndex(t,r),r=i.i(s.selectAll)("."+c,this.element)}else{var l=n&&n.length&&1===n.length?n[0]:e;t=r.indexOf(l),this.removeItemByIndex(t,r)}this.resize()},t.prototype.removeItemByIndex=function(e,t){if(this.tbarEle[parseInt(e.toString(),10)]&&t[parseInt(e.toString(),10)]){var n=this.tbarEle.indexOf(t[parseInt(e.toString(),10)]);if(this.tbarAlign){var r=this.tbarAlgEle[(this.items[parseInt(n.toString(),10)].align+"s").toLowerCase()].indexOf(this.tbarEle[parseInt(n.toString(),10)]);this.tbarAlgEle[(this.items[parseInt(n.toString(),10)].align+"s").toLowerCase()].splice(parseInt(r.toString(),10),1)}this.isReact&&this.clearToolbarTemplate(t[parseInt(e.toString(),10)]);var o=t[parseInt(e.toString(),10)].querySelector(".e-control.e-btn");i.i(s.isNullOrUndefined)(o)||i.i(s.isNullOrUndefined)(o.ej2_instances[0])||o.ej2_instances[0].isDestroyed||o.ej2_instances[0].destroy(),i.i(s.detach)(t[parseInt(e.toString(),10)]),this.items.splice(n,1),this.tbarEle.splice(n,1)}},t.prototype.templateRender=function(e,t,n,r){var o,a=n.type,l=e;if("object"==typeof e&&(o="function"==typeof l.appendTo),"string"!=typeof e&&o){if("Input"===a){var d=this.createElement("input");n.id?d.id=n.id:d.id=i.i(s.getUniqueID)("tbr-ipt"),t.appendChild(d),l.appendTo(d)}}else{var h=void 0,c=e,p=new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);c="string"==typeof e?e.trim():e;try{if("object"!=typeof e||i.i(s.isNullOrUndefined)(e.tagName))if("string"==typeof e&&p.test(c))t.innerHTML=c;else if(document.querySelectorAll(c).length){var d=document.querySelector(c),u=d.outerHTML.trim();t.appendChild(d),d.style.display="",i.i(s.isNullOrUndefined)(u)||this.tempId.push(c)}else h=i.i(s.compile)(c);else t.appendChild(e)}catch(e){h=i.i(s.compile)(c)}var f=void 0;if(!i.i(s.isNullOrUndefined)(h)){var m=this.element.id+r+"_template";f=h({},this,"template",m,this.isStringTemplate,void 0,void 0,this.root)}!i.i(s.isNullOrUndefined)(f)&&f.length>0&&[].slice.call(f).forEach(function(e){i.i(s.isNullOrUndefined)(e.tagName)||(e.style.display=""),t.appendChild(e)})}this.add(t,"e-template");var v=t.firstElementChild;i.i(s.isNullOrUndefined)(v)||(v.setAttribute("tabindex",i.i(s.isNullOrUndefined)(v.getAttribute("tabIndex"))?"-1":this.getDataTabindex(v)),v.setAttribute("data-tabindex",i.i(s.isNullOrUndefined)(v.getAttribute("tabIndex"))?"-1":this.getDataTabindex(v))),this.tbarEle.push(t)},t.prototype.buttonRendering=function(e,t){var n=this.createElement("button",{className:"e-tbar-btn"});n.setAttribute("type","button");var o,a,l=e.text;e.id?n.id=e.id:n.id=i.i(s.getUniqueID)("e-tbr-btn");var d=this.createElement("span",{className:"e-tbar-btn-text"});l?(d.innerHTML=this.enableHtmlSanitizer?s.SanitizeHtmlHelper.sanitize(l):l,n.appendChild(d),n.classList.add("e-tbtn-txt")):this.add(t,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(o=e.prefixIcon+" e-icons",a="Left"):(o=e.suffixIcon+" e-icons",a="Right"));var h=new r.Button({iconCss:o,iconPosition:a});return h.createElement=this.createElement,h.appendTo(n),e.width&&i.i(s.setStyleAttribute)(n,{width:i.i(s.formatUnit)(e.width)}),n},t.prototype.renderSubComponent=function(e,t){var n,r=this.createElement("div",{className:c}),o=this.createElement("div",{innerHTML:this.enableHtmlSanitizer&&!i.i(s.isNullOrUndefined)(e.tooltipText)?s.SanitizeHtmlHelper.sanitize(e.tooltipText):e.tooltipText});if(this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,r),e.tooltipText&&r.setAttribute("title",o.textContent),e.cssClass&&(r.className=r.className+" "+e.cssClass),e.template)this.templateRender(e.template,r,e,t);else switch(e.type){case"Button":n=this.buttonRendering(e,r),n.setAttribute("tabindex",i.i(s.isNullOrUndefined)(e.tabIndex)?"-1":e.tabIndex.toString()),n.setAttribute("data-tabindex",i.i(s.isNullOrUndefined)(e.tabIndex)?"-1":e.tabIndex.toString()),n.setAttribute("aria-label",e.text||e.tooltipText),n.setAttribute("aria-disabled","false"),r.appendChild(n),r.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(r,"e-separator")}if(e.showTextOn){var a=e.showTextOn;"Toolbar"===a?(this.add(r,"e-toolbar-text"),this.add(r,"e-tbtn-align")):"Overflow"===a&&this.add(r,"e-popup-text")}if(e.overflow){var l=e.overflow;"Show"===l?this.add(r,"e-overflow-show"):"Hide"===l&&(r.classList.contains("e-separator")||this.add(r,"e-overflow-hide"))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!r.classList.contains("e-separator")&&(this.add(r,"e-popup-alone"),this.popupPriCount++),e.disabled&&this.add(r,"e-overlay"),!1===e.visible&&this.add(r,"e-hidden"),r},t.prototype.getDataTabindex=function(e){return i.i(s.isNullOrUndefined)(e.getAttribute("data-tabindex"))?"-1":e.getAttribute("data-tabindex")},t.prototype.itemClick=function(e){this.activeEleSwitch(e.currentTarget)},t.prototype.activeEleSwitch=function(e){this.activeEleRemove(e.firstElementChild),this.activeEle.focus()},t.prototype.activeEleRemove=function(e){var t=this.element.querySelector("."+c+":not(.e-overlay ):not(.e-separator ):not(.e-hidden )");if(i.i(s.isNullOrUndefined)(this.activeEle)||(this.activeEle.setAttribute("tabindex",this.getDataTabindex(this.activeEle)),t&&t.removeAttribute("tabindex"),t=this.activeEle),this.activeEle=e,"-1"===this.getDataTabindex(this.activeEle))if(i.i(s.isNullOrUndefined)(this.trgtEle)&&!e.parentElement.classList.contains("e-template"))!i.i(s.isNullOrUndefined)(this.element.querySelector(".e-hor-nav"))&&this.element.querySelector(".e-hor-nav").classList.contains("e-nav-active")?(this.updateTabIndex("0"),"-1"===this.getDataTabindex(t)?t.setAttribute("tabindex","0"):t.setAttribute("tabindex",this.getDataTabindex(t))):this.updateTabIndex("-1"),e.removeAttribute("tabindex");else{var n=parseInt(this.getDataTabindex(this.activeEle))+1;this.activeEle.setAttribute("tabindex",n.toString())}},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.getModuleName=function(){return"toolbar"},t.prototype.itemsRerender=function(e){this.items=this.tbarItemsCol,(this.isReact||this.isAngular)&&this.clearTemplate(),this.destroyMode(),this.destroyItems(),this.items=e,this.tbarItemsCol=this.items,this.renderItems(),this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()},t.prototype.resize=function(){var e=this.element;this.tbResize=!0,this.tbarAlign&&this.itemPositioning(),this.popObj&&"Popup"===this.overflowMode&&this.popObj.hide();var t=this.checkOverflow(e,e.getElementsByClassName(h)[0]);if(!t){this.destroyScroll();var n=e.querySelector("."+h);i.i(s.isNullOrUndefined)(n)||(this.remove(n,"e-multirow-pos"),this.tbarAlign&&this.add(n,"e-tbar-pos"))}t&&this.scrollModule&&this.offsetWid===e.offsetWidth||((this.offsetWid>e.offsetWidth||t)&&this.renderOverflowMode(),this.popObj&&("Extended"===this.overflowMode&&(this.popObj.width=this.getToolbarPopupWidth(this.element)),this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()),this.element.querySelector(".e-hscroll-bar")&&(this.scrollStep=this.element.querySelector(".e-hscroll-bar").offsetWidth),this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator())},t.prototype.orientationChange=function(){var e=this;setTimeout(function(){e.resize()},500)},t.prototype.extendedOpen=function(){var e=this.element.querySelector(".e-toolbar-extended");"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains("e-popup-open"))},t.prototype.updateHideEleTabIndex=function(e,t,i,s,n){i&&(s=n.indexOf(e));for(var r=n[++s];r;){if(!this.eleContains(r)){var o=r.firstElementChild.getAttribute("data-tabindex");t&&"-1"===o?r.firstElementChild.setAttribute("tabindex","0"):o!==r.firstElementChild.getAttribute("tabindex")&&r.firstElementChild.setAttribute("tabindex",o);break}r=n[++s]}},t.prototype.clearToolbarTemplate=function(e){if(this.registeredTemplate&&this.registeredTemplate.template)for(var t=this.registeredTemplate,n=0;n<t.template.length;n++){var r=t.template[parseInt(n.toString(),10)].rootNodes[0],o=i.i(s.closest)(r,"."+c);if(!i.i(s.isNullOrUndefined)(o)&&o===e){this.clearTemplate(["template"],[t.template[parseInt(n.toString(),10)]]);break}}else if(this.portals&&this.portals.length>0)for(var a=this.portals,n=0;n<a.length;n++){var l=a[parseInt(n.toString(),10)],o=i.i(s.closest)(l.containerInfo,"."+c);if(!i.i(s.isNullOrUndefined)(o)&&o===e){this.clearTemplate(["template"],n);break}}},t.prototype.onPropertyChanged=function(e,t){var n=this.element;n.offsetWidth;this.extendedOpen();for(var r=0,o=Object.keys(e);r<o.length;r++){switch(o[r]){case"items":if(e.items instanceof Array&&t.items instanceof Array)this.itemsRerender(e.items);else for(var a=Object.keys(e.items),l=0;l<a.length;l++){var d=parseInt(Object.keys(e.items)[parseInt(l.toString(),10)],10),p=Object.keys(e.items[parseInt(d.toString(),10)])[0],u=Object(e.items[parseInt(d.toString(),10)])[""+p];if(this.tbarAlign||"align"===p){this.refresh(),this.trigger("created");break}var f="showAlwaysInPopup"===p&&!u,m="overflow"===p&&0!==this.popupPriCount;(f||this.items[parseInt(d.toString(),10)].showAlwaysInPopup&&m)&&--this.popupPriCount,i.i(s.isNullOrUndefined)(this.scrollModule)&&this.destroyMode();var v=[].slice.call(i.i(s.selectAll)("."+h+" ."+c,n));this.isReact&&this.items[parseInt(d.toString(),10)].template&&this.clearToolbarTemplate(v[parseInt(d.toString(),10)]),i.i(s.detach)(v[parseInt(d.toString(),10)]),this.tbarEle.splice(d,1),this.addItems([this.items[parseInt(d.toString(),10)]],d),this.items.splice(d,1),this.items[parseInt(d.toString(),10)].template&&this.tbarEle.splice(this.items.length,1)}break;case"width":i.i(s.setStyleAttribute)(n,{width:i.i(s.formatUnit)(e.width)}),this.refreshOverflow();break;case"height":i.i(s.setStyleAttribute)(this.element,{height:i.i(s.formatUnit)(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(n,"e-rtl"),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(n,"e-rtl"):this.remove(n,"e-rtl"),i.i(s.isNullOrUndefined)(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,"e-rtl"):this.remove(this.scrollModule.element,"e-rtl")),i.i(s.isNullOrUndefined)(this.popObj)||(e.enableRtl?this.add(this.popObj.element,"e-rtl"):this.remove(this.popObj.element,"e-rtl")),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"});break;case"cssClass":t.cssClass&&i.i(s.removeClass)([this.element],t.cssClass.split(" ")),e.cssClass&&i.i(s.addClass)([this.element],e.cssClass.split(" "));break;case"allowKeyboard":this.unwireKeyboardEvent(),e.allowKeyboard&&this.wireKeyboardEvent()}}},t.prototype.hideItem=function(e,t){var n,r="object"==typeof e,o=e;if(r||!i.i(s.isNullOrUndefined)(o)){var a=[].slice.call(i.i(s.selectAll)("."+c,this.element));if(r)n=e;else if(this.tbarEle[parseInt(o.toString(),10)]){var l=[].slice.call(i.i(s.selectAll)("."+c,this.element));n=l[parseInt(o.toString(),10)]}n&&(t?(n.classList.add("e-hidden"),n.classList.contains("e-separator")||(i.i(s.isNullOrUndefined)(n.firstElementChild.getAttribute("tabindex"))||"-1"!==n.firstElementChild.getAttribute("tabindex"))&&this.updateHideEleTabIndex(n,t,r,o,a)):(n.classList.remove("e-hidden"),n.classList.contains("e-separator")||this.updateHideEleTabIndex(n,t,r,o,a)),this.refreshOverflow())}},d([i.i(s.Collection)([],u)],t.prototype,"items",void 0),d([i.i(s.Property)("auto")],t.prototype,"width",void 0),d([i.i(s.Property)("auto")],t.prototype,"height",void 0),d([i.i(s.Property)("")],t.prototype,"cssClass",void 0),d([i.i(s.Property)("Scrollable")],t.prototype,"overflowMode",void 0),d([i.i(s.Property)()],t.prototype,"scrollStep",void 0),d([i.i(s.Property)(!0)],t.prototype,"enableCollision",void 0),d([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),d([i.i(s.Property)(!0)],t.prototype,"allowKeyboard",void 0),d([i.i(s.Event)()],t.prototype,"clicked",void 0),d([i.i(s.Event)()],t.prototype,"created",void 0),d([i.i(s.Event)()],t.prototype,"destroyed",void 0),d([i.i(s.Event)()],t.prototype,"beforeCreate",void 0),t=d([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";var s=i(23);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c}),i.d(t,"d",function(){return s.d})},function(e,t,i){"use strict";var s=i(24);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(25);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c})},function(e,t,i){"use strict";var s=i(26);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c})},function(e,t,i){"use strict";var s=i(2);i.d(t,"d",function(){return s.a});var n=i(4);i.d(t,"e",function(){return n.a});var r=i(7);i.d(t,"f",function(){return r.a}),i.d(t,"g",function(){return r.b});var o=i(3);i.d(t,"a",function(){return o.d}),i.d(t,"b",function(){return o.c}),i.d(t,"c",function(){return o.a})},function(e,t,i){"use strict";var s=i(27);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(29);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(30);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(8);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.c}),i.d(t,"c",function(){return s.d}),i.d(t,"d",function(){return s.b})},function(e,t,i){"use strict";var s=i(31);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c}),i.d(t,"d",function(){return s.d})},function(e,t,i){"use strict";var s=i(32);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c}),i.d(t,"d",function(){return s.d}),i.d(t,"e",function(){return s.e})},function(e,t,i){"use strict";var s=i(9);i.d(t,"a",function(){return s.b}),i.d(t,"b",function(){return s.a})},function(e,t,i){"use strict";var s=i(33);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c}),i.d(t,"d",function(){return s.d})},function(e,t,i){"use strict";i.d(t,"a",function(){return p}),i.d(t,"b",function(){return u}),i.d(t,"c",function(){return f}),i.d(t,"d",function(){return m});var s=i(0),n=(i.n(s),this&&this.__extends||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)}}()),r=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},o="e-accordion",a="e-acrdn-item",l="e-acrdn-header",d="e-acrdn-header-content",h="e-acrdn-panel",c="e-acrdn-content",p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),r([i.i(s.Property)("SlideDown")],t.prototype,"effect",void 0),r([i.i(s.Property)(400)],t.prototype,"duration",void 0),r([i.i(s.Property)("linear")],t.prototype,"easing",void 0),t}(s.ChildProperty),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),r([i.i(s.Complex)({effect:"SlideUp",duration:400,easing:"linear"},p)],t.prototype,"collapse",void 0),r([i.i(s.Complex)({effect:"SlideDown",duration:400,easing:"linear"},p)],t.prototype,"expand",void 0),t}(s.ChildProperty),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),r([i.i(s.Property)(null)],t.prototype,"content",void 0),r([i.i(s.Property)(null)],t.prototype,"header",void 0),r([i.i(s.Property)(null)],t.prototype,"cssClass",void 0),r([i.i(s.Property)(null)],t.prototype,"iconCss",void 0),r([i.i(s.Property)(!1)],t.prototype,"expanded",void 0),r([i.i(s.Property)(!0)],t.prototype,"visible",void 0),r([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),r([i.i(s.Property)()],t.prototype,"id",void 0),t}(s.ChildProperty),m=function(e){function t(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 n(t,e),t.prototype.destroy=function(){(this.isReact||this.isAngular||this.isVue)&&this.clearTemplate();var t=this.element;if(e.prototype.destroy.call(this),this.unWireEvents(),this.isDestroy=!0,this.restoreContent(null),[].slice.call(t.children).forEach(function(e){t.removeChild(e)}),this.trgtEle){for(this.trgtEle=null;this.ctrlTem.firstElementChild;)t.appendChild(this.ctrlTem.firstElementChild);this.ctrlTem=null}t.classList.remove("e-acrdn-root"),t.removeAttribute("style"),this.element.removeAttribute("data-ripple"),!this.isNested&&s.isRippleEnabled&&this.removeRippleEffect()},t.prototype.preRender=function(){var e=i.i(s.closest)(this.element,"."+h);this.isNested=!1,this.templateEle=[],this.isDestroy||(this.isDestroy=!1),e&&e.firstElementChild&&e.firstElementChild.firstElementChild?e.firstElementChild.firstElementChild.classList.contains(o)&&(e.classList.add("e-nested"),this.isNested=!0):this.element.classList.add("e-acrdn-root"),this.enableRtl&&this.add(this.element,"e-rtl")},t.prototype.add=function(e,t){e.classList.add(t)},t.prototype.remove=function(e,t){e.classList.remove(t)},t.prototype.render=function(){this.initializeHeaderTemplate(),this.initializeItemTemplate(),this.initialize(),this.renderControl(),this.wireEvents(),this.renderComplete()},t.prototype.initialize=function(){var e=i.i(s.formatUnit)(this.width),t=i.i(s.formatUnit)(this.height);i.i(s.setStyleAttribute)(this.element,{width:e,height:t}),i.i(s.isNullOrUndefined)(this.initExpand)&&(this.initExpand=[]),this.expandedIndices.length>0&&(this.initExpand=this.expandedIndices)},t.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?i.i(s.select)("div",this.element):null,this.renderItems(),this.initItemExpand()},t.prototype.wireFocusEvents=function(){for(var e=[].slice.call(this.element.querySelectorAll("."+a)),t=0,i=e;t<i.length;t++){var n=i[t],r=n.querySelector("."+l);n.childElementCount>0&&r&&(s.EventHandler.clearEvents(r),s.EventHandler.add(r,"focus",this.focusIn,this),s.EventHandler.add(r,"blur",this.focusOut,this))}},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.element,"click",this.clickHandler),i.i(s.isNullOrUndefined)(this.keyModule)||this.keyModule.destroy()},t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"click",this.clickHandler,this),this.isNested||this.isDestroy||(this.removeRippleEffect=i.i(s.rippleEffect)(this.element,{selector:"."+l})),this.isNested||(this.keyModule=new s.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}))},t.prototype.templateParser=function(e){if(e)try{return"function"!=typeof e&&document.querySelectorAll(e).length?i.i(s.compile)(document.querySelector(e).innerHTML.trim()):i.i(s.compile)(e)}catch(t){return i.i(s.compile)(e)}},t.prototype.initializeHeaderTemplate=function(){this.headerTemplate&&(this.headerTemplateFn=this.templateParser(this.headerTemplate))},t.prototype.initializeItemTemplate=function(){this.itemTemplate&&(this.itemTemplateFn=this.templateParser(this.itemTemplate))},t.prototype.getHeaderTemplate=function(){return this.headerTemplateFn},t.prototype.getItemTemplate=function(){return this.itemTemplateFn},t.prototype.focusIn=function(e){e.target.parentElement.classList.add("e-item-focus")},t.prototype.focusOut=function(e){e.target.parentElement.classList.remove("e-item-focus")},t.prototype.ctrlTemplate=function(){this.ctrlTem=this.element.cloneNode(!0);var e,t=i.i(s.select)(".e-accordion-container",this.element);e=t?t.children:this.element.children;var n=[];[].slice.call(e).forEach(function(e){n.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)}),t&&this.element.removeChild(t),this.setProperties({items:n},!0)},t.prototype.toggleIconGenerate=function(){var e=this.createElement("div",{className:"e-toggle-icon"}),t=this.createElement("span",{className:"e-tgl-collapse-icon e-icons"});return e.appendChild(t),e},t.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[parseInt(t.toString(),10)]);this.isReact&&this.renderReactTemplates()}},t.prototype.renderItems=function(){var e,t,n=this,r=this.element;if(i.i(s.isNullOrUndefined)(this.trgtEle)||this.ctrlTemplate(),this.dataSource.length>0)this.dataSource.forEach(function(e,i){t=n.renderInnerItem(e,i),r.appendChild(t),t.childElementCount>0&&(s.EventHandler.add(t.querySelector("."+l),"focus",n.focusIn,n),s.EventHandler.add(t.querySelector("."+l),"blur",n.focusOut,n))});else{var o=this.items;r&&o.length>0&&o.forEach(function(t,i){e=n.renderInnerItem(t,i),r.appendChild(e),e.childElementCount>0&&(s.EventHandler.add(e.querySelector("."+l),"focus",n.focusIn,n),s.EventHandler.add(e.querySelector("."+l),"blur",n.focusOut,n))})}this.isReact&&this.renderReactTemplates()},t.prototype.clickHandler=function(e){var t,n=e.target,r=this.getItems(),d={};if(i.i(s.closest)(n,"."+o)===this.element){n.classList.add("e-target");var c=i.i(s.closest)(n,"."+a),p=i.i(s.closest)(n,"."+l),u=i.i(s.closest)(n,"."+h);c&&(i.i(s.isNullOrUndefined)(p)||i.i(s.isNullOrUndefined)(u))&&(p=c.children[0],u=c.children[1]),p&&(t=i.i(s.select)(".e-toggle-icon",p));var f;p?f=i.i(s.closest)(p,"."+a):u&&(f=i.i(s.closest)(u,"."+a));var m=this.getIndexByItem(c);f&&(d.item=r[this.getIndexByItem(f)]),d.originalEvent=e,i.i(s.isNullOrUndefined)(t)||!(c.childElementCount<=1)||!i.i(s.isNullOrUndefined)(u)&&i.i(s.isNullOrUndefined)(i.i(s.select)(".e-acrdn-header .e-toggle-icon",f))?this.afterContentRender(n,d,c,p,u,f):(c.appendChild(this.contentRendering(m)),this.ariaAttrUpdate(c),this.afterContentRender(n,d,c,p,u,f)),this.isReact&&this.renderReactTemplates()}},t.prototype.afterContentRender=function(e,t,n,r,a,l){var d=this,p=[];this.trigger("clicked",t);var u=a&&!i.i(s.isNullOrUndefined)(i.i(s.select)(".e-target",a)),f=a&&!i.i(s.isNullOrUndefined)(i.i(s.select)("."+o,a))&&i.i(s.isNullOrUndefined)(i.i(s.closest)(e,".e-acrdn-panel .e-accordion")),m=a&&i.i(s.isNullOrUndefined)(i.i(s.select)("."+o,a))||!(i.i(s.closest)(e,"."+o)===this.element);if(u=u&&(f||m),e.classList.remove("e-target"),!(e.classList.contains(h)||e.classList.contains(c)||u)){var v=this.element.querySelector(".e-accordion-container"),g=v?v.children:this.element.children;[].slice.call(g).forEach(function(e){e.classList.contains("e-active")&&p.push(e)});var y=[].slice.call(this.element.querySelectorAll(".e-acrdn-item [e-animate]"));if(y.length>0)for(var b=0,C=y;b<C.length;b++){var x=C[b];p.push(x.parentElement)}var S=-1!==p.indexOf(l)&&"true"===a.getAttribute("e-animate"),I=!1;if(!i.i(s.isNullOrUndefined)(n)&&!i.i(s.isNullOrUndefined)(r)){var E=i.i(s.select)("."+h,n),N=i.i(s.closest)(n,".e-acrdn-root"),w=N.querySelector(".e-expand-state");if(i.i(s.isNullOrUndefined)(E))return;I=w===n,!i.i(s.isVisible)(E)||S&&!l.classList.contains("e-selected")?(p.length>0&&"Single"===this.expandMode&&!S&&p.forEach(function(e){d.collapse(i.i(s.select)("."+h,e)),e.classList.remove("e-expand-state")}),this.expand(E)):this.collapse(E),i.i(s.isNullOrUndefined)(w)||I||w.classList.remove("e-expand-state")}}},t.prototype.eleMoveFocus=function(e,t,n){var r,o=i.i(s.closest)(n,"."+a);n===t?r=("moveUp"===e?n.lastElementChild:n).querySelector("."+l):n.classList.contains(l)&&(o="moveUp"===e?o.previousElementSibling:o.nextElementSibling)&&(r=i.i(s.select)("."+l,o)),r&&r.focus()},t.prototype.keyActionHandler=function(e){var t=e.target,n=i.i(s.closest)(e.target,l);if(!i.i(s.isNullOrUndefined)(n)||t.classList.contains(o)||t.classList.contains(l)){var r,a,d=this.element;switch(e.action){case"moveUp":case"moveDown":this.eleMoveFocus(e.action,d,t);break;case"space":case"enter":a=t.nextElementSibling,!i.i(s.isNullOrUndefined)(a)&&a.classList.contains(h)?"true"!==a.getAttribute("e-animate")&&t.click():t.click(),e.preventDefault();break;case"home":case"end":r="home"===e.action?d.firstElementChild.children[0]:d.lastElementChild.children[0],r.focus(),e.preventDefault()}}},t.prototype.headerEleGenerate=function(){var e=this.createElement("div",{className:l,id:i.i(s.getUniqueID)("acrdn_header")}),t={tabindex:"0",role:"button","aria-disabled":"false","aria-expanded":"false"};return i.i(s.attributes)(e,t),e},t.prototype.renderInnerItem=function(e,t){var n=this.createElement("div",{className:a,id:e.id||i.i(s.getUniqueID)("acrdn_item")});if(this.headerTemplate){var r=this.headerEleGenerate(),o=this.createElement("div",{className:d});return r.appendChild(o),i.i(s.append)(this.getHeaderTemplate()(e,this,"headerTemplate",this.element.id+"_headerTemplate",!1),o),n.appendChild(r),r.appendChild(this.toggleIconGenerate()),this.add(n,"e-select"),n}if(e.header&&this.angularnativeCondiCheck(e,"header")){var h=e.header;this.enableHtmlSanitizer&&"string"==typeof e.header&&(h=s.SanitizeHtmlHelper.sanitize(e.header));var r=this.headerEleGenerate(),o=this.createElement("div",{className:d});r.appendChild(o),r.appendChild(this.fetchElement(o,h,t)),n.appendChild(r)}var c=i.i(s.select)("."+l,n);if(!e.expanded||i.i(s.isNullOrUndefined)(t)||this.enablePersistence||-1===this.initExpand.indexOf(t)&&this.initExpand.push(t),e.cssClass&&i.i(s.addClass)([n],e.cssClass.split(" ")),e.disabled&&i.i(s.addClass)([n],"e-overlay"),!1===e.visible&&i.i(s.addClass)([n],"e-hide"),e.iconCss){var p=this.createElement("div",{className:"e-acrdn-header-icon"}),u=this.createElement("span",{className:e.iconCss+" e-icons"});p.appendChild(u),i.i(s.isNullOrUndefined)(c)?(c=this.headerEleGenerate(),c.appendChild(p),n.appendChild(c)):c.insertBefore(p,c.childNodes[0])}if(e.content&&this.angularnativeCondiCheck(e,"content")){var f=this.toggleIconGenerate();i.i(s.isNullOrUndefined)(c)&&(c=this.headerEleGenerate(),n.appendChild(c)),c.appendChild(f),this.add(n,"e-select")}return n},t.prototype.angularnativeCondiCheck=function(e,t){var n="content"===t?e.content:e.header,r=n;if(this.isAngular&&!i.i(s.isNullOrUndefined)(r.elementRef)){var o=r.elementRef.nativeElement.data;if(i.i(s.isNullOrUndefined)(o)||""===o||-1===o.indexOf("bindings="))return!0;var a=JSON.parse(r.elementRef.nativeElement.data.replace("bindings=",""));return!(!i.i(s.isNullOrUndefined)(a)&&"false"===a["ng-reflect-ng-if"])}return!0},t.prototype.fetchElement=function(e,t,n){var r,o;try{if(document.querySelectorAll(t).length&&"Button"!==t){var a=document.querySelector(t);o=a.outerHTML.trim(),e.appendChild(a),a.style.display=""}else r=i.i(s.compile)(t)}catch(n){"string"==typeof t?e.innerHTML=this.enableHtmlSanitizer?s.SanitizeHtmlHelper.sanitize(t):t:t instanceof HTMLElement?(e.appendChild(t),this.trgtEle&&(e.firstElementChild.style.display="")):r=i.i(s.compile)(t)}var l;if(!i.i(s.isNullOrUndefined)(r)){this.isReact&&this.renderReactTemplates();var h=void 0,p=void 0;e.classList.contains(d)?(h=this.element.id+n+"_header",p="header"):e.classList.contains(c)&&(h=this.element.id+n+"_content",p="content"),l=r({},this,p,h,this.isStringTemplate)}return i.i(s.isNullOrUndefined)(l)||!(l.length>0)||i.i(s.isNullOrUndefined)(l[0].tagName)&&1===l.length?0===e.childElementCount&&(e.innerHTML=this.enableHtmlSanitizer?s.SanitizeHtmlHelper.sanitize(t):t):[].slice.call(l).forEach(function(t){i.i(s.isNullOrUndefined)(t.tagName)||(t.style.display=""),e.appendChild(t)}),i.i(s.isNullOrUndefined)(o)||-1===this.templateEle.indexOf(t)&&this.templateEle.push(t),e},t.prototype.ariaAttrUpdate=function(e){var t=i.i(s.select)("."+l,e),n=i.i(s.select)("."+h,e);t.setAttribute("aria-controls",n.id),n.setAttribute("aria-labelledby",t.id),n.setAttribute("role","region")},t.prototype.contentRendering=function(e){var t=this.createElement("div",{className:h+" e-content-hide",id:i.i(s.getUniqueID)("acrdn_panel")});i.i(s.attributes)(t,{"aria-hidden":"true"});var n=this.createElement("div",{className:c});if(this.dataSource.length>0)this.isReact&&this.renderReactTemplates(),i.i(s.append)(this.getItemTemplate()(this.dataSource[parseInt(e.toString(),10)],this,"itemTemplate",this.element.id+"_itemTemplate",!1),n),t.appendChild(n);else{var r=this.items[parseInt(e.toString(),10)].content;this.enableHtmlSanitizer&&"string"==typeof r&&(r=s.SanitizeHtmlHelper.sanitize(r)),t.appendChild(this.fetchElement(n,r,e))}return t},t.prototype.expand=function(e){var t=this,n=this.getItems(),r=i.i(s.closest)(e,"."+a);if(!(i.i(s.isNullOrUndefined)(e)||i.i(s.isVisible)(e)&&"true"!==e.getAttribute("e-animate")||r.classList.contains("e-overlay"))){var o=i.i(s.closest)(r,".e-acrdn-root"),l=o.querySelector(".e-expand-state"),d={name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing},c=i.i(s.select)(".e-toggle-icon",r).firstElementChild,p={element:r,item:n[this.getIndexByItem(r)],index:this.getIndexByItem(r),content:r.querySelector("."+h),isExpanded:!0};this.trigger("expanding",p,function(n){n.cancel||(c.classList.add("e-toggle-animation"),t.expandedItemsPush(r),i.i(s.isNullOrUndefined)(l)||l.classList.remove("e-expand-state"),r.classList.add("e-expand-state"),"None"===d.name&&"Enable"!==s.animationMode||"Disable"===s.animationMode?(t.expandProgress("begin",c,e,r,n),t.expandProgress("end",c,e,r,n)):t.expandAnimation(d.name,c,e,r,d,n))})}},t.prototype.expandAnimation=function(e,t,n,r,o,a){var l=this;"None"===e&&"Enable"===s.animationMode&&(e="SlideDown",o.name="SlideDown");var d;this.lastActiveItemId=r.id,"SlideDown"===e?(o.begin=function(){l.expandProgress("begin",t,n,r,a),n.style.position="absolute",d=r.offsetHeight,n.style.maxHeight=n.offsetHeight+"px",r.style.maxHeight=""},o.progress=function(){r.style.minHeight=d+n.offsetHeight+"px"},o.end=function(){i.i(s.setStyleAttribute)(n,{position:"",maxHeight:""}),r.style.minHeight="",l.expandProgress("end",t,n,r,a)}):(o.begin=function(){l.expandProgress("begin",t,n,r,a)},o.end=function(){l.expandProgress("end",t,n,r,a)}),new s.Animation(o).animate(n)},t.prototype.expandProgress=function(e,t,n,r,o){this.remove(n,"e-content-hide"),this.add(r,"e-selected"),this.add(t,"e-expand-icon"),"end"===e&&(this.add(r,"e-active"),n.setAttribute("aria-hidden","false"),i.i(s.attributes)(n.previousElementSibling,{"aria-expanded":"true"}),t.classList.remove("e-toggle-animation"),this.trigger("expanded",o))},t.prototype.expandedItemsPush=function(e){var t=this.getIndexByItem(e);if(-1===this.expandedIndices.indexOf(t)){var i=[].slice.call(this.expandedIndices);i.push(t),this.setProperties({expandedIndices:i},!0)}},t.prototype.getIndexByItem=function(e){var t=this.getItemElements();return[].slice.call(t).indexOf(e)},t.prototype.getItemElements=function(){var e=[],t=this.element.children;return[].slice.call(t).forEach(function(t){t.classList.contains(a)&&e.push(t)}),e},t.prototype.expandedItemsPop=function(e){var t=this.getIndexByItem(e),i=[].slice.call(this.expandedIndices);i.splice(i.indexOf(t),1),this.setProperties({expandedIndices:i},!0)},t.prototype.collapse=function(e){var t=this,n=this.getItems(),r=i.i(s.closest)(e,"."+a);if(!i.i(s.isNullOrUndefined)(e)&&i.i(s.isVisible)(e)&&!r.classList.contains("e-overlay")){var o={name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing},l=i.i(s.select)(".e-toggle-icon",r).firstElementChild,d={element:r,item:n[this.getIndexByItem(r)],index:this.getIndexByItem(r),content:r.querySelector("."+h),isExpanded:!1};this.trigger("expanding",d,function(i){i.cancel||(t.expandedItemsPop(r),r.classList.remove("e-expand-state"),l.classList.add("e-toggle-animation"),"None"===o.name&&"Enable"!==s.animationMode||"Disable"===s.animationMode?(t.collapseProgress("begin",l,e,r,i),t.collapseProgress("end",l,e,r,i)):t.collapseAnimation(o.name,e,r,l,o,i))})}},t.prototype.collapseAnimation=function(e,t,n,r,o,a){var l=this;"None"===e&&"Enable"===s.animationMode&&(e="SlideUp",o.name="SlideUp");var d,h,c,p;this.lastActiveItemId=n.id,"SlideUp"===e?(o.begin=function(){c=n.offsetHeight,n.style.minHeight=c+"px",t.style.position="absolute",d=n.offsetHeight,h=t.offsetHeight,t.style.maxHeight=h+"px",l.collapseProgress("begin",r,t,n,a)},o.progress=function(){(p=d-(h-t.offsetHeight))<c&&(n.style.minHeight=p+"px")},o.end=function(){t.style.display="none",l.collapseProgress("end",r,t,n,a),n.style.minHeight="",i.i(s.setStyleAttribute)(t,{position:"",maxHeight:"",display:""})}):(o.begin=function(){l.collapseProgress("begin",r,t,n,a)},o.end=function(){l.collapseProgress("end",r,t,n,a)}),new s.Animation(o).animate(t)},t.prototype.collapseProgress=function(e,t,n,r,o){this.remove(t,"e-expand-icon"),this.remove(r,"e-selected"),"end"===e&&(this.add(n,"e-content-hide"),t.classList.remove("e-toggle-animation"),this.remove(r,"e-active"),n.setAttribute("aria-hidden","true"),i.i(s.attributes)(n.previousElementSibling,{"aria-expanded":"false"}),this.trigger("expanded",o))},t.prototype.getModuleName=function(){return"accordion"},t.prototype.getItems=function(){return this.itemTemplate&&this.headerTemplate?this.dataSource:this.items},t.prototype.addItem=function(e,t){var n=this,r=this.element,o=this.getItemElements(),a=this.getItems();if(i.i(s.isNullOrUndefined)(t)&&(t=a.length),r.childElementCount>=t){(e instanceof Array?e:[e]).forEach(function(e,i){var d=t+i;a.splice(d,0,e);var h=n.renderInnerItem(e,d);r.childElementCount===d?r.appendChild(h):r.insertBefore(h,o[parseInt(d.toString(),10)]),s.EventHandler.add(h.querySelector("."+l),"focus",n.focusIn,n),s.EventHandler.add(h.querySelector("."+l),"blur",n.focusOut,n),n.expandedIndices=[],n.expandedItemRefresh(),e&&e.expanded&&n.expandItem(!0,d)})}this.isReact&&this.renderReactTemplates()},t.prototype.expandedItemRefresh=function(){var e=this,t=this.getItemElements();[].slice.call(t).forEach(function(t){t.classList.contains("e-selected")&&e.expandedItemsPush(t)})},t.prototype.removeItem=function(e){if(this.isReact||this.isAngular){var t=i.i(s.selectAll)("."+a,this.element)[parseInt(e.toString(),10)],n=i.i(s.select)("."+d,t),r=i.i(s.select)("."+c,t);this.clearAccordionTemplate(n,this.dataSource.length>0?"headerTemplate":"header",d),this.clearAccordionTemplate(r,this.dataSource.length>0?"itemTemplate":"content",c)}var o=this.getItemElements(),l=o[parseInt(e.toString(),10)],h=this.getItems();i.i(s.isNullOrUndefined)(l)||(this.restoreContent(e),i.i(s.detach)(l),h.splice(e,1),this.expandedIndices=[],this.expandedItemRefresh())},t.prototype.select=function(e){var t=this.getItemElements(),n=t[parseInt(e.toString(),10)];i.i(s.isNullOrUndefined)(n)||i.i(s.isNullOrUndefined)(i.i(s.select)("."+l,n))||n.children[0].focus()},t.prototype.hideItem=function(e,t){var n=this.getItemElements(),r=n[parseInt(e.toString(),10)];i.i(s.isNullOrUndefined)(r)||(i.i(s.isNullOrUndefined)(t)&&(t=!0),t?this.add(r,"e-hide"):this.remove(r,"e-hide"))},t.prototype.enableItem=function(e,t){var n=this.getItemElements(),r=n[parseInt(e.toString(),10)];if(!i.i(s.isNullOrUndefined)(r)){var o=r.firstElementChild;t?(this.remove(r,"e-overlay"),i.i(s.attributes)(o,{tabindex:"0","aria-disabled":"false"}),o.focus()):(r.classList.contains("e-active")&&(this.expandItem(!1,e),this.eleMoveFocus("movedown",this.element,o)),this.add(r,"e-overlay"),o.setAttribute("aria-disabled","true"),o.removeAttribute("tabindex"))}},t.prototype.expandItem=function(e,t){var n=this,r=this.getItemElements();if(i.i(s.isNullOrUndefined)(t))if("Single"===this.expandMode&&e){var o=r[r.length-1];this.itemExpand(e,o,this.getIndexByItem(o))}else{var a=i.i(s.select)("#"+this.lastActiveItemId,this.element);[].slice.call(r).forEach(function(t){n.itemExpand(e,t,n.getIndexByItem(t)),t.classList.remove("e-expand-state")});var l=i.i(s.select)(".e-expand-state",this.element);l&&l.classList.remove("e-expand-state"),a&&a.classList.add("e-expand-state")}else{var o=r[parseInt(t.toString(),10)];if(i.i(s.isNullOrUndefined)(o)||!o.classList.contains("e-select")||o.classList.contains("e-active")&&e)return;"Single"===this.expandMode&&this.expandItem(!1),this.itemExpand(e,o,t)}},t.prototype.itemExpand=function(e,t,n){var r=t.children[1];t.classList.contains("e-overlay")||(i.i(s.isNullOrUndefined)(r)&&e?(r=this.contentRendering(n),t.appendChild(r),this.ariaAttrUpdate(t),this.expand(r)):i.i(s.isNullOrUndefined)(r)||(e?this.expand(r):this.collapse(r)),this.isReact&&this.renderReactTemplates())},t.prototype.destroyItems=function(){this.restoreContent(null),(this.isReact||this.isAngular||this.isVue)&&this.clearTemplate(),[].slice.call(this.element.querySelectorAll("."+a)).forEach(function(e){i.i(s.detach)(e)})},t.prototype.restoreContent=function(e){var t;t=i.i(s.isNullOrUndefined)(e)?this.element:this.element.querySelectorAll("."+a)[parseInt(e.toString(),10)],this.templateEle.forEach(function(e){i.i(s.isNullOrUndefined)(t.querySelector(e))||(document.body.appendChild(t.querySelector(e)).style.display="none")})},t.prototype.updateItem=function(e,t){if(!i.i(s.isNullOrUndefined)(e)){var n=this.getItems(),r=n[parseInt(t.toString(),10)];n.splice(t,1),this.restoreContent(t);var o=i.i(s.select)("."+d,e),a=i.i(s.select)("."+c,e);(this.isReact||this.isAngular)&&(this.clearAccordionTemplate(o,"header",d),this.clearAccordionTemplate(a,"content",c)),i.i(s.detach)(e),this.addItem(r,t)}},t.prototype.setTemplate=function(e,t,i){this.fetchElement(t,e,i),this.isReact&&this.renderReactTemplates()},t.prototype.clearAccordionTemplate=function(e,t,n){if(this.registeredTemplate&&this.registeredTemplate[""+t])for(var r=this.registeredTemplate,o=0;o<r[""+t].length;o++){var a=r[""+t][parseInt(o.toString(),10)].rootNodes[0],l=i.i(s.closest)(a,"."+n);if(!i.i(s.isNullOrUndefined)(l)&&l===e||i.i(s.isNullOrUndefined)(a.parentNode)){this.clearTemplate([t],[r[""+t][parseInt(o.toString(),10)]]);break}}else if(this.portals&&this.portals.length>0)for(var d=this.portals,o=0;o<d.length;o++){var h=d[parseInt(o.toString(),10)],l=i.i(s.closest)(h.containerInfo,"."+n);if(!i.i(s.isNullOrUndefined)(l)&&l===e){this.clearTemplate([t],o);break}}},t.prototype.getPersistData=function(){var e=["expandedIndices"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){for(var n=this.element,r=!1,o=0,l=Object.keys(e);o<l.length;o++){switch(l[o]){case"items":if(e.items instanceof Array&&t.items instanceof Array)r=!0;else for(var d=Object.keys(e.items),p=0;p<d.length;p++)for(var u=parseInt(Object.keys(e.items)[parseInt(p.toString(),10)],10),f=Object.keys(e.items[parseInt(u.toString(),10)]),m=0;m<f.length;m++){var v=i.i(s.selectAll)("."+a,this.element)[parseInt(u.toString(),10)],g=Object(t.items[parseInt(u.toString(),10)])[""+f[parseInt(m.toString(),10)]],y=Object(e.items[parseInt(u.toString(),10)])[""+f[parseInt(m.toString(),10)]],b=f[parseInt(m.toString(),10)],C=i.i(s.select)("."+c,v);if(("header"===b||"iconCss"===b||"expanded"===b||"content"===b&&""===g)&&this.updateItem(v,u),"cssClass"!==f[parseInt(m.toString(),10)]||i.i(s.isNullOrUndefined)(v)||(g&&i.i(s.removeClass)([v],g.split(" ")),y&&i.i(s.addClass)([v],y.split(" "))),"visible"!==f[parseInt(m.toString(),10)]||i.i(s.isNullOrUndefined)(v)||(!1===Object(e.items[parseInt(u.toString(),10)])[""+f[parseInt(m.toString(),10)]]?v.classList.add("e-hide"):v.classList.remove("e-hide")),"disabled"!==f[parseInt(m.toString(),10)]||i.i(s.isNullOrUndefined)(v)||this.enableItem(u,!y),f.indexOf("header")<0&&"content"===f[parseInt(m.toString(),10)]&&!i.i(s.isNullOrUndefined)(v)&&2===v.children.length)if("function"==typeof y){(this.isAngular||this.isReact)&&this.clearAccordionTemplate(C,f[parseInt(m.toString(),10)],c);var x=v.querySelector("."+c);x.innerHTML="",this.setTemplate(y,x,u)}else v.classList.contains("e-selected")&&this.expandItem(!1,u),i.i(s.detach)(v.querySelector("."+h))}break;case"dataSource":case"expandedIndices":null===this.expandedIndices&&(this.expandedIndices=[]),r=!0;break;case"headerTemplate":this.initializeHeaderTemplate(),r=!0;break;case"itemTemplate":this.initializeItemTemplate(),r=!0;break;case"enableRtl":e.enableRtl?this.add(n,"e-rtl"):this.remove(n,"e-rtl");break;case"height":i.i(s.setStyleAttribute)(this.element,{height:i.i(s.formatUnit)(e.height)});break;case"width":i.i(s.setStyleAttribute)(this.element,{width:i.i(s.formatUnit)(e.width)});break;case"expandMode":"Single"===e.expandMode&&this.expandedIndices.length>1&&this.expandItem(!1)}}r&&(this.initExpand=[],this.expandedIndices.length>0&&(this.initExpand=this.expandedIndices),this.destroyItems(),this.renderItems(),this.initItemExpand())},r([i.i(s.Collection)([],f)],t.prototype,"items",void 0),r([i.i(s.Property)([])],t.prototype,"dataSource",void 0),r([i.i(s.Property)()],t.prototype,"itemTemplate",void 0),r([i.i(s.Property)()],t.prototype,"headerTemplate",void 0),r([i.i(s.Property)("100%")],t.prototype,"width",void 0),r([i.i(s.Property)("auto")],t.prototype,"height",void 0),r([i.i(s.Property)([])],t.prototype,"expandedIndices",void 0),r([i.i(s.Property)("Multiple")],t.prototype,"expandMode",void 0),r([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),r([i.i(s.Complex)({},u)],t.prototype,"animation",void 0),r([i.i(s.Event)()],t.prototype,"clicked",void 0),r([i.i(s.Event)()],t.prototype,"expanding",void 0),r([i.i(s.Event)()],t.prototype,"expanded",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),r([i.i(s.Event)()],t.prototype,"destroyed",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var s=i(0),n=(i.n(s),this&&this.__extends||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)}}()),r=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},o=function(e){function t(t,i){return e.call(this,t,i)||this}return n(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this),this.element.classList.remove("e-appbar"),this.element.removeAttribute("style"),this.element.removeAttribute("role")},t.prototype.getModuleName=function(){return"appbar"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.preRender=function(){},t.prototype.render=function(){this.element.classList.add("e-appbar"),"HEADER"!==this.element.tagName&&this.element.setAttribute("role","header"),this.cssClass&&i.i(s.addClass)([this.element],this.cssClass.split(" ")),"Bottom"===this.position&&this.element.classList.add("e-horizontal-bottom"),this.isSticky&&this.element.classList.add("e-sticky"),this.enableRtl&&this.element.classList.add("e-rtl"),this.setHeightMode(),this.setColorMode(),i.i(s.isNullOrUndefined)(this.htmlAttributes)||this.setHtmlAttributes(this.htmlAttributes,this.element)},t.prototype.onPropertyChanged=function(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"mode":i.i(s.removeClass)([this.element],["e-dense","e-prominent"]),this.setHeightMode();break;case"position":"Bottom"===this.position?i.i(s.addClass)([this.element],"e-horizontal-bottom"):i.i(s.removeClass)([this.element],"e-horizontal-bottom");break;case"cssClass":t.cssClass&&i.i(s.removeClass)([this.element],t.cssClass.split(" ")),e.cssClass&&i.i(s.addClass)([this.element],e.cssClass.split(" "));break;case"isSticky":this.isSticky?i.i(s.addClass)([this.element],"e-sticky"):i.i(s.removeClass)([this.element],"e-sticky");break;case"htmlAttributes":if(!i.i(s.isNullOrUndefined)(this.htmlAttributes)){if(!i.i(s.isNullOrUndefined)(t.htmlAttributes))for(var o=Object.keys(t.htmlAttributes),a=0,l=o;a<l.length;a++){var d=l[a];"class"===d?i.i(s.removeClass)([this.element],t.htmlAttributes[""+d]):this.element.removeAttribute(d)}this.setHtmlAttributes(e.htmlAttributes,this.element)}break;case"colorMode":i.i(s.removeClass)([this.element],["e-dark","e-primary","e-inherit","e-light"]),this.setColorMode();break;case"enableRtl":this.enableRtl?i.i(s.addClass)([this.element],"e-rtl"):i.i(s.removeClass)([this.element],"e-rtl")}}},t.prototype.setHtmlAttributes=function(e,t){for(var n=Object.keys(e),r=0,o=n;r<o.length;r++){var a=o[r];"class"===a?i.i(s.addClass)([t],e[""+a]):t.setAttribute(a,e[""+a])}},t.prototype.setHeightMode=function(){"Prominent"===this.mode?this.element.classList.add("e-prominent"):"Dense"===this.mode&&this.element.classList.add("e-dense")},t.prototype.setColorMode=function(){switch(this.colorMode){case"Light":this.element.classList.add("e-light");break;case"Dark":this.element.classList.add("e-dark");break;case"Primary":this.element.classList.add("e-primary");break;case"Inherit":this.element.classList.add("e-inherit")}},r([i.i(s.Property)("Regular")],t.prototype,"mode",void 0),r([i.i(s.Property)("Top")],t.prototype,"position",void 0),r([i.i(s.Property)()],t.prototype,"cssClass",void 0),r([i.i(s.Property)(!1)],t.prototype,"isSticky",void 0),r([i.i(s.Property)()],t.prototype,"htmlAttributes",void 0),r([i.i(s.Property)("Light")],t.prototype,"colorMode",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),r([i.i(s.Event)()],t.prototype,"destroyed",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return u}),i.d(t,"c",function(){return f});var s,n=i(0),r=(i.n(n),i(6)),o=(i.n(r),i(1)),a=(i.n(o),this&&this.__extends||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)}}()),l=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},d="e-icon-right",h="e-breadcrumb-menu",c="e-breadcrumb-wrap-mode",p="e-breadcrumb-scroll-mode";!function(e){e.Hidden="Hidden",e.Collapsed="Collapsed",e.Menu="Menu",e.Wrap="Wrap",e.Scroll="Scroll",e.None="None"}(s||(s={}));var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([i.i(n.Property)("")],t.prototype,"text",void 0),l([i.i(n.Property)("")],t.prototype,"url",void 0),l([i.i(n.Property)(null)],t.prototype,"iconCss",void 0),l([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),t}(n.ChildProperty),f=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.isPopupCreated=!1,s}return a(t,e),t.prototype.preRender=function(){},t.prototype.render=function(){this.initialize(),this.renderItems(this.items),this.wireEvents()},t.prototype.initialize=function(){this._maxItems=this.maxItems,i.i(n.isNullOrUndefined)(this.element.getAttribute("aria-label"))&&this.element.setAttribute("aria-label","breadcrumb"),this.cssClass&&i.i(n.addClass)([this.element],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.enableRtl&&this.element.classList.add("e-rtl"),this.disabled&&(this.element.classList.add("e-disabled"),this.element.setAttribute("aria-disabled","true")),"Wrap"===this.overflowMode?this.element.classList.add(c):"Scroll"===this.overflowMode&&this.element.classList.add(p),this.initItems(),this.initPvtProps()},t.prototype.initPvtProps=function(){"Hidden"===this.overflowMode&&this._maxItems>0&&(this.endIndex=this.getEndIndex(),this.startIndex=this.endIndex+1-(this._maxItems-1)),"Menu"===this.overflowMode&&(this._maxItems>=0?(this.startIndex=this._maxItems>1?1:0,this.endIndex=this.getEndIndex(),this.popupUl=this.createElement("ul",{attrs:{TABINDEX:"0",role:"menu"}})):this.startIndex=this.endIndex=null)},t.prototype.getEndIndex=function(){var e,t=this;return this.activeItem?this.items.forEach(function(i,s){i.url!==t.activeItem&&i.text!==t.activeItem||(e=s)}):e=this.items.length-1,e},t.prototype.initItems=function(){if(!this.items.length){var e=void 0,t=void 0,i=[];if(this.url){var s=new URL(this.url,window.location.origin);e=s.origin+"/",t=s.href.split(e)[1].split("/")}else e=window.location.origin+"/",t=window.location.href.split(e)[1].split("/");i.push({iconCss:"e-icons e-home",url:e});for(var n=0;n<t.length;n++)t[n]&&(i.push({text:t[n],url:e+t[n]}),e+=t[n]+"/");this.setProperties({items:i},!0)}},t.prototype.renderItems=function(e){var t,s,o=this,a=this.element.classList.contains(d),l=e.length;if(l){var h,c=void 0,p=void 0,u=0,f=void 0,m=2*l-1,v=!1,g=this.createElement("ol",{className:"Wrap"===this.overflowMode?"e-breadcrumb-wrapped-ol":""}),y=this.createElement("ol",{className:"Wrap"===this.overflowMode?"e-breadcrumb-first-ol":""}),b=this.hasField(e,"iconCss"),C="Collapsed"===this.overflowMode&&this._maxItems>0&&l>this._maxItems&&!this.isExpanded,x="Hidden"===this.overflowMode&&this._maxItems>0;"Menu"===this.overflowMode&&this.popupUl&&(this.popupUl.innerHTML="");for(var S={moduleName:this.getModuleName(),showIcon:b,itemNavigable:!0,itemCreated:function(e){var t=e.curData.isLastItem;t&&e.item.children.length&&!o.itemTemplate&&(delete e.curData.isLastItem,h||o.enableActiveItemNavigation||(e.item.innerHTML=o.createElement("span",{className:"e-breadcrumb-text",innerHTML:e.item.children[0].innerHTML}).outerHTML)),!e.curData.iconCss||e.curData.text||o.itemTemplate||e.item.classList.add("e-icon-item"),x&&e.item.setAttribute("item-index",u.toString());var s={item:i.i(n.extend)({},e.curData.properties?e.curData.properties:e.curData),element:e.item,cancel:!1};o.trigger("beforeItemRender",s),v=s.cancel;var r=a||s.element.classList.contains(d);r&&e.curData.iconCss&&!o.itemTemplate&&e.item.querySelector(".e-anchor-wrap").appendChild(e.item.querySelector(".e-breadcrumb-icon")),s.item.disabled&&(e.item.setAttribute("aria-disabled","true"),e.item.classList.add("e-disabled")),(s.item.disabled||o.disabled)&&e.item.children.length&&!o.itemTemplate&&e.item.children[0].setAttribute("tabindex","-1"),e.curData.isEmptyUrl&&(e.item.children[0].removeAttribute("href"),!(!t||t&&o.enableActiveItemNavigation)||s.item.disabled||o.disabled||(e.item.children[0].setAttribute("tabindex","0"),n.EventHandler.add(e.item.children[0],"keydown",o.keyDownHandler,o))),e.item.removeAttribute("role"),t&&e.item.setAttribute("data-active-item",""),o.itemTemplate||o.beforeItemRenderChanges(e.curData,s.item,e.item,r)}},I=0;I<m;I%2&&u++,I++)if(c=this.activeItem&&(this.activeItem===e[u].url||this.activeItem===e[u].text),!(C&&I>1&&I<m-2)&&(!x||!(u<this.startIndex||u>this.endIndex)||I%2&&u===this.startIndex-1||0===u)){I%2?(f=this.createElement("div",{className:"e-breadcrumb-item-wrapper"}),this.separatorTemplate&&"/"===this.separatorTemplate||i.i(n.isNullOrUndefined)(this.separatorTemplate)?S.template=i.i(n.initializeCSPTemplate)(function(){return"/"}):S.template=this.separatorTemplate,S.itemClass="e-breadcrumb-separator",s=!1,t=[{previousItem:e[u],nextItem:e[u+1]}]):(S.itemClass="",this.itemTemplate?(S.template=this.itemTemplate,s=!1):s=!0,t=[i.i(n.extend)({},e[u].properties?e[u].properties:e[u])],t[0].url||this.itemTemplate||(t=[i.i(n.extend)({},t[0],{isEmptyUrl:!0,url:"#"})]),p=(x||"Menu"===this.overflowMode)&&u===this.endIndex,((I===m-1||p)&&!this.itemTemplate||c)&&(t[0].isLastItem=!0));var E=g,N=this.startIndex+this.endIndex-this._maxItems;if("Menu"===this.overflowMode&&(u>=this.startIndex&&u<=N&&(!(I%2)||!(u===N))&&this.endIndex>=this._maxItems&&this._maxItems>0||0===this._maxItems)){if(I%2)continue;E=this.popupUl,p&&(h=!0)}else"Wrap"===this.overflowMode&&(E=0===I?y:f);var w=r.ListBase.createList(this.createElement,t,S,s,this).childNodes;if(v){if(x||C||"Menu"===this.overflowMode||"Wrap"===this.overflowMode)return e.splice(u,1),this.initPvtProps(),this.reRenderItems();(I===m-1||p)&&i.i(n.remove)(E.lastElementChild)}else i.i(n.append)(w,E);if("Wrap"===this.overflowMode&&0!==I&&I%2==0&&g.appendChild(f),C&&1===I){var O=this.createElement("li",{className:"e-icons e-breadcrumb-collapsed",attrs:{TABINDEX:"0"}});n.EventHandler.add(O,"keyup",this.expandHandler,this),g.appendChild(O)}if("Menu"===this.overflowMode&&this.startIndex===I&&this.endIndex>=this._maxItems&&this._maxItems>=0){var L=this.getMenuElement();n.EventHandler.add(L,"keyup",this.keyDownHandler,this),g.appendChild(L)}if(c||p)break;v&&I++}this.isReact&&this.renderReactTemplates(),"Wrap"===this.overflowMode&&this.element.appendChild(y),this.element.appendChild(g),this.calculateMaxItems()}},t.prototype.calculateMaxItems=function(){if("Hidden"===this.overflowMode||"Collapsed"===this.overflowMode||"Menu"===this.overflowMode){var e=void 0,t=this.element.offsetWidth,s=[].slice.call(this.element.children[0].children).reverse(),r="Menu"===this.overflowMode?0:s[s.length-1].offsetWidth+(s[s.length-2]?s[s.length-2].offsetWidth:0);if("Menu"===this.overflowMode){var o=this.getMenuElement();this.element.appendChild(o),r+=o.offsetWidth,i.i(n.remove)(o)}for(var a=0;a<s.length-2;a++){if(r>t){if(e=Math.ceil((a-1)/2)+("Menu"===this.overflowMode&&a<=2?0:1),(this.maxItems>e&&!(this.maxItems>-1&&-1===e)||-1===this.maxItems)&&this._maxItems!==e)return this._maxItems=e,this.initPvtProps(),this.reRenderItems();break}if("Menu"===this.overflowMode&&2===a&&(r+=s[s.length-1].offsetWidth+s[s.length-2].offsetWidth)>t)return this._maxItems=1,this.initPvtProps(),this.reRenderItems();"Menu"===this.overflowMode&&s[a].classList.contains(h)||(r+=s[a].offsetWidth)}}else if(("Wrap"===this.overflowMode||"Scroll"===this.overflowMode)&&this._maxItems>0){var t=0,s=this.element.querySelectorAll(".e-breadcrumb-item");if(s.length>this._maxItems+this._maxItems-1){for(var a="Wrap"===this.overflowMode?1:0;a<this._maxItems+this._maxItems-1;a++)t+=s[a].offsetWidth;t=t+5+2*parseInt(getComputedStyle(this.element.children[0]).paddingLeft,10),"Wrap"===this.overflowMode?this.element.querySelector(".e-breadcrumb-wrapped-ol").style.width=t+"px":this.element.style.width=t+"px"}}},t.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][""+t])return!0;return!1},t.prototype.getMenuElement=function(){return this.createElement("li",{className:"e-icons e-breadcrumb-menu",attrs:{TABINDEX:"0"}})},t.prototype.beforeItemRenderChanges=function(e,t,s,r){var o=s.querySelector(".e-anchor-wrap");if(o&&o.querySelector(".e-home")&&(o.parentElement.setAttribute("aria-label","home"),o.parentElement.setAttribute("role","link")),t.text!==e.text&&o.childNodes.forEach(function(e){e.nodeType===Node.TEXT_NODE&&(e.textContent=t.text)}),t.iconCss!==e.iconCss&&o){var a=s.querySelector(".e-breadcrumb-icon");if(a)t.iconCss?(i.i(n.removeClass)([a],e.iconCss.split(" ")),i.i(n.addClass)([a],t.iconCss.split(" "))):i.i(n.remove)(a);else if(t.iconCss){var l=this.createElement("span",{className:"e-breadcrumb-icon "+t.iconCss});r?i.i(n.append)([l],o):o.insertBefore(l,o.childNodes[0])}}if(t.url!==e.url&&this.enableNavigation){var d=s.querySelector("a.e-breadcrumb-text");d&&(t.url?d.setAttribute("href",t.url):d.removeAttribute("href"))}},t.prototype.reRenderItems=function(){this.element.innerHTML="",this.renderItems(this.items)},t.prototype.clickHandler=function(e){var t=i.i(n.closest)(e.target,".e-breadcrumb-item:not(.e-breadcrumb-separator)");if(this.enableNavigation||e.preventDefault(),t&&(i.i(n.closest)(e.target,".e-breadcrumb-text")||this.itemTemplate)){var s=void 0;s="Wrap"===this.overflowMode?[].slice.call(this.element.querySelectorAll(".e-breadcrumb-item")).indexOf(t):[].slice.call(t.parentElement.children).indexOf(t),"Menu"===this.overflowMode?i.i(n.closest)(e.target,".e-breadcrumb-popup")?(s+=this.startIndex,this.endIndex=s,"keydown"===e.type&&this.documentClickHandler(e)):this.element.querySelector("."+h)?s>[].slice.call(this.element.children[0].children).indexOf(this.element.querySelector("."+h))?(s+=2*this.popupUl.childElementCount-2,s=Math.floor(s/2),this.endIndex=s):this.startIndex=this.endIndex=s:(s=Math.floor(s/2),this.startIndex=this.endIndex=s):s=Math.floor(s/2),"Hidden"===this.overflowMode&&this._maxItems>0&&0!==this.endIndex&&(s=parseInt(t.getAttribute("item-index"),10),this.startIndex>1&&(this.startIndex-=this.endIndex-s),this.endIndex=s),this.trigger("itemClick",{element:t,item:this.items[s],event:e}),this.activeItem=this.items[s].url||this.items[s].text,this.dataBind()}e.target.classList.contains("e-breadcrumb-collapsed")&&(this.isExpanded=!0,this.reRenderItems()),e.target.classList.contains(h)&&!this.isPopupCreated&&this.renderPopup()},t.prototype.renderPopup=function(){var e=this,t=this.createElement("div",{className:"e-breadcrumb-popup "+this.cssClass+(this.enableRtl?" e-rtl":"")});document.body.appendChild(t),this.isPopupCreated=!0,this.popupObj=new o.Popup(t,{content:this.popupUl,relateTo:this.element.querySelector("."+h),enableRtl:this.enableRtl,position:{X:"left",Y:"bottom"},collision:{X:"fit",Y:"flip"},open:function(){e.popupUl.focus()}}),this.popupWireEvents(),this.popupObj.show()},t.prototype.documentClickHandler=function(e){"Menu"===this.overflowMode&&this.popupObj&&this.popupObj.element.classList.contains("e-popup-open")&&!i.i(n.closest)(e.target,"."+h)&&(this.popupObj.hide(),this.popupObj.destroy(),this.isPopupCreated=!1,i.i(n.detach)(this.popupObj.element))},t.prototype.resize=function(){this._maxItems=this.maxItems,this.initPvtProps(),this.reRenderItems()},t.prototype.expandHandler=function(e){"Enter"===e.key&&(this.isExpanded=!0,this.reRenderItems())},t.prototype.keyDownHandler=function(e){"Enter"===e.key&&this.clickHandler(e)},t.prototype.popupKeyDownHandler=function(e){"Escape"===e.key&&this.documentClickHandler(e)},t.prototype.onPropertyChanged=function(e,t){for(var s=0,r=Object.keys(e);s<r.length;s++){switch(r[s]){case"items":case"enableActiveItemNavigation":this.reRenderItems();break;case"activeItem":this._maxItems=this.maxItems,this.initPvtProps(),this.reRenderItems();break;case"overflowMode":case"maxItems":this._maxItems=this.maxItems,this.initPvtProps(),this.reRenderItems(),"Wrap"===t.overflowMode?this.element.classList.remove(c):"Wrap"===e.overflowMode&&this.element.classList.add(c),"Scroll"===t.overflowMode?this.element.classList.remove(p):"Scroll"===e.overflowMode&&this.element.classList.add(p);break;case"url":this.initItems(),this.reRenderItems();break;case"cssClass":t.cssClass&&i.i(n.removeClass)([this.element],t.cssClass.split(" ")),e.cssClass&&i.i(n.addClass)([this.element],e.cssClass.replace(/\s+/g," ").trim().split(" ")),(t.cssClass&&t.cssClass.indexOf(d)>-1&&!(e.cssClass&&e.cssClass.indexOf(d)>-1)||!(t.cssClass&&t.cssClass.indexOf(d)>-1)&&e.cssClass&&e.cssClass.indexOf(d)>-1)&&this.reRenderItems();break;case"enableRtl":this.element.classList.toggle("e-rtl");break;case"disabled":this.element.classList.toggle("e-disabled"),this.element.setAttribute("aria-disabled",e.disabled+"")}}},t.prototype.wireEvents=function(){this.delegateClickHanlder=this.documentClickHandler.bind(this),n.EventHandler.add(document,"click",this.delegateClickHanlder,this),n.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resize.bind(this))},t.prototype.popupWireEvents=function(){n.EventHandler.add(this.popupObj.element,"click",this.clickHandler,this),n.EventHandler.add(this.popupObj.element,"keydown",this.popupKeyDownHandler,this)},t.prototype.unWireEvents=function(){n.EventHandler.remove(document,"click",this.delegateClickHanlder),n.EventHandler.remove(this.element,"click",this.clickHandler),window.removeEventListener("resize",this.resize.bind(this)),this.popupObj&&(n.EventHandler.remove(this.popupObj.element,"click",this.clickHandler),n.EventHandler.remove(this.popupObj.element,"keydown",this.popupKeyDownHandler))},t.prototype.getPersistData=function(){return this.addOnPersist(["activeItem"])},t.prototype.getModuleName=function(){return"breadcrumb"},t.prototype.destroy=function(){var t=this,s=[],r=["aria-label"];this.cssClass&&s.concat(this.cssClass.split(" ")),this.enableRtl&&s.push("e-rtl"),this.disabled&&(s.push("e-disabled"),r.push("aria-disabled")),"Wrap"===this.overflowMode?s.push(c):"Scroll"===this.overflowMode&&s.push(p),this.unWireEvents(),this.element.innerHTML="",i.i(n.removeClass)([this.element],s),r.forEach(function(e){t.element.removeAttribute(e)}),e.prototype.destroy.call(this)},l([i.i(n.Property)("")],t.prototype,"url",void 0),l([i.i(n.Collection)([],u)],t.prototype,"items",void 0),l([i.i(n.Property)("")],t.prototype,"activeItem",void 0),l([i.i(n.Property)(-1)],t.prototype,"maxItems",void 0),l([i.i(n.Property)("Menu")],t.prototype,"overflowMode",void 0),l([i.i(n.Property)("")],t.prototype,"cssClass",void 0),l([i.i(n.Property)(null)],t.prototype,"itemTemplate",void 0),l([i.i(n.Property)("/")],t.prototype,"separatorTemplate",void 0),l([i.i(n.Property)(!0)],t.prototype,"enableNavigation",void 0),l([i.i(n.Property)(!1)],t.prototype,"enableActiveItemNavigation",void 0),l([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),l([i.i(n.Property)("")],t.prototype,"locale",void 0),l([i.i(n.Event)()],t.prototype,"beforeItemRender",void 0),l([i.i(n.Event)()],t.prototype,"itemClick",void 0),l([i.i(n.Event)()],t.prototype,"created",void 0),t=l([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return u}),i.d(t,"c",function(){return f});var s,n=i(0),r=(i.n(n),i(5)),o=(i.n(r),this&&this.__extends||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=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},l="e-carousel",d="e-carousel-items",h="e-carousel-item",c="e-carousel-navigators",p="e-carousel-hover";!function(e){e[e.Touch=1]="Touch",e[e.Mouse=2]="Mouse"}(s||(s={}));var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),a([i.i(n.Property)()],t.prototype,"cssClass",void 0),a([i.i(n.Property)()],t.prototype,"interval",void 0),a([i.i(n.Property)()],t.prototype,"template",void 0),a([i.i(n.Property)()],t.prototype,"htmlAttributes",void 0),t}(n.ChildProperty),f=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.isSwipe=!1,s}return o(t,e),t.prototype.getModuleName=function(){return l.replace("e-","")},t.prototype.getPersistData=function(){return this.addOnPersist(["selectedIndex"])},t.prototype.preRender=function(){this.keyConfigs={home:"home",end:"end",space:"space",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"};var e={nextSlide:"Next slide",of:"of",pauseSlideTransition:"Pause slide transition",playSlideTransition:"Play slide transition",previousSlide:"Previous slide",slide:"Slide",slideShow:"Slide show"};this.localeObj=new n.L10n(this.getModuleName(),e,this.locale)},t.prototype.render=function(){this.initialize(),this.renderSlides(),this.renderNavigators(),this.renderPlayButton(),this.renderIndicators(),this.applyAnimation(),this.wireEvents()},t.prototype.onPropertyChanged=function(e,t){for(var r,o,a=0,l=Object.keys(e);a<l.length;a++){var h=l[a];switch(h){case"animationEffect":this.applyAnimation();break;case"cssClass":i.i(n.classList)(this.element,[e.cssClass],[t.cssClass]);break;case"selectedIndex":this.setActiveSlide(this.selectedIndex,t.selectedIndex>this.selectedIndex?"Previous":"Next"),this.autoSlide();break;case"htmlAttributes":i.i(n.isNullOrUndefined)(this.htmlAttributes)||this.setHtmlAttributes(this.htmlAttributes,this.element);break;case"enableTouchSwipe":!this.enableTouchSwipe&&this.touchModule&&this.touchModule.destroy(),this.element.querySelector("."+d)&&this.renderTouchActions();break;case"loop":this.loop&&i.i(n.isNullOrUndefined)(this.autoSlideInterval)&&this.applySlideInterval(),this.handleNavigatorsActions(this.selectedIndex),(this.partialVisible||this.swipeMode!==(~s.Touch&~s.Mouse))&&this.reRenderSlides();break;case"enableRtl":if(o=[].slice.call(this.element.querySelectorAll(".e-previous-button,\n .e-next-button, .e-play-button")),o.push(this.element),this.enableRtl?i.i(n.addClass)(o,"e-rtl"):i.i(n.removeClass)(o,"e-rtl"),this.partialVisible||this.swipeMode!==(~s.Touch&~s.Mouse)){var p=this.loop?this.getNumOfItems():0,u=this.itemsContainer.firstElementChild.clientWidth;this.itemsContainer.style.transform=this.getTranslateX(u,this.selectedIndex+p)}break;case"buttonsVisibility":if(r=this.element.querySelector("."+c))switch(this.buttonsVisibility){case"Hidden":this.resetTemplates(["previousButtonTemplate","nextButtonTemplate"]),i.i(n.remove)(r);break;case"VisibleOnHover":i.i(n.addClass)([].slice.call(r.childNodes),"e-hover-arrows");break;case"Visible":i.i(n.removeClass)([].slice.call(r.childNodes),"e-hover-arrows")}else this.renderNavigators(),this.renderPlayButton();break;case"width":i.i(n.setStyleAttribute)(this.element,{width:i.i(n.formatUnit)(this.width)});break;case"height":i.i(n.setStyleAttribute)(this.element,{height:i.i(n.formatUnit)(this.height)});break;case"autoPlay":this.showPlayButton&&i.i(n.isNullOrUndefined)(this.playButtonTemplate)&&this.playButtonClickHandler(null,!0),this.autoSlide();break;case"interval":this.autoSlide();break;case"showIndicators":case"indicatorsType":r=this.element.querySelector(".e-carousel-indicators"),r&&(this.resetTemplates(["indicatorsTemplate"]),i.i(n.remove)(r)),this.renderIndicators();break;case"showPlayButton":r=this.element.querySelector(".e-play-pause"),!this.showPlayButton&&r&&(i.i(n.remove)(r),this.resetTemplates(["playButtonTemplate"])),this.renderPlayButton();break;case"items":case"dataSource":var f="dataSource"===h?this.dataSource:this.items;f.length>0&&this.selectedIndex>=f.length&&(this.setActiveSlide(f.length-1,"Previous"),this.autoSlide()),this.reRenderSlides(),this.reRenderIndicators();break;case"partialVisible":this.partialVisible?i.i(n.addClass)([this.element],"e-partial"):i.i(n.removeClass)([this.element],"e-partial"),this.reRenderSlides();break;case"swipeMode":n.EventHandler.remove(this.element,"mousedown touchstart",this.swipeStart),n.EventHandler.remove(this.element,"mousemove touchmove",this.swiping),n.EventHandler.remove(this.element,"mouseup touchend",this.swipStop),this.swipeModehandlers(),this.reRenderSlides()}}},t.prototype.reRenderSlides=function(){var e=this.element.querySelector("."+d);e&&(this.resetTemplates(["itemTemplate"]),i.i(n.remove)(e)),this.renderSlides()},t.prototype.reRenderIndicators=function(){var e=this.element.querySelector(".e-carousel-indicators");e&&(this.resetTemplates(["indicatorsTemplate"]),i.i(n.remove)(e)),this.renderIndicators()},t.prototype.initialize=function(){var e=[];e.push(l),this.cssClass&&e.push(this.cssClass),this.enableRtl&&e.push("e-rtl"),this.partialVisible&&e.push("e-partial"),this.swipeMode!==(~s.Touch&~s.Mouse)&&e.push("e-swipe"),i.i(n.addClass)([this.element],e),i.i(n.setStyleAttribute)(this.element,{width:i.i(n.formatUnit)(this.width),height:i.i(n.formatUnit)(this.height)}),i.i(n.attributes)(this.element,{role:"group","aria-roledescription":"carousel","aria-label":this.localeObj.getConstant("slideShow")}),i.i(n.isNullOrUndefined)(this.htmlAttributes)||this.setHtmlAttributes(this.htmlAttributes,this.element)},t.prototype.renderSlides=function(){var e=this,t=this.element.querySelector(".e-carousel-slide-container");t||(t=this.createElement("div",{className:"e-carousel-slide-container",attrs:{tabindex:"0",role:"tabpanel"}}),this.element.appendChild(t)),this.itemsContainer=this.createElement("div",{className:d,attrs:{"aria-live":this.autoPlay?"off":"polite"}}),t.appendChild(this.itemsContainer);var s=this.getNumOfItems();s>0&&this.loop&&(this.items.length>0?this.items.slice(-s).forEach(function(t,i){e.renderSlide(t,t.template,i,e.itemsContainer,!0)}):this.dataSource.length>0&&this.dataSource.slice(-s).forEach(function(t,i){e.renderSlide(t,e.itemTemplate,i,e.itemsContainer,!0)})),this.items.length>0?(this.slideItems=this.items,this.items.forEach(function(t,i){e.renderSlide(t,t.template,i,e.itemsContainer)})):this.dataSource.length>0&&(this.slideItems=this.dataSource,this.dataSource.forEach(function(t,i){e.renderSlide(t,e.itemTemplate,i,e.itemsContainer)})),s>0&&this.loop&&(this.items.length>0?this.items.slice(0,s).forEach(function(t,i){e.renderSlide(t,t.template,i,e.itemsContainer,!0)}):this.dataSource.length>0&&this.dataSource.slice(0,s).forEach(function(t,i){e.renderSlide(t,e.itemTemplate,i,e.itemsContainer,!0)})),this.renderTemplates(),this.itemsContainer.style.setProperty("--carousel-items-count",""+this.itemsContainer.children.length);var r=i.i(n.isNullOrUndefined)(this.itemsContainer.firstElementChild)?0:this.itemsContainer.firstElementChild.clientWidth;this.itemsContainer.style.transitionProperty="none";var o=this.loop?s:0;this.itemsContainer.style.transform=this.getTranslateX(r,this.selectedIndex+o),this.autoSlide(),this.renderTouchActions(),this.renderKeyboardActions()},t.prototype.getTranslateX=function(e,t){return void 0===t&&(t=1),this.enableRtl?"translateX("+e*t+"px)":"translateX("+-e*t+"px)"},t.prototype.renderSlide=function(e,t,s,r,o){void 0===o&&(o=!1);var a=this.createElement("div",{id:i.i(n.getUniqueID)("carousel_item"),className:h+" "+(e.cssClass?e.cssClass:"")+" "+(this.selectedIndex!==s||o?"":"e-active"),attrs:{"aria-hidden":this.selectedIndex!==s||o?"true":"false","data-index":s.toString(),role:"group","aria-roledescription":"slide"}});o&&a.classList.add("e-cloned"),i.i(n.isNullOrUndefined)(e.htmlAttributes)||this.setHtmlAttributes(e.htmlAttributes,a);var l=this.element.id+"_template",d=this.templateParser(t)(e,this,"itemTemplate",l,!1);i.i(n.append)(d,a),r.appendChild(a)},t.prototype.renderNavigators=function(){if("Hidden"!==this.buttonsVisibility){var e=this.createElement("div",{className:c});this.element.querySelector(".e-carousel-slide-container").insertAdjacentElement("afterend",e),!i.i(n.isNullOrUndefined)(this.slideItems)&&this.slideItems.length>1&&(this.renderNavigatorButton("Previous"),this.renderNavigatorButton("Next")),this.renderTemplates()}},t.prototype.renderNavigatorButton=function(e){var t=this.createElement("div",{className:("Previous"===e?"e-previous":"e-next")+" "+("VisibleOnHover"===this.buttonsVisibility?"e-hover-arrows":"")});if("Previous"===e&&this.previousButtonTemplate){i.i(n.addClass)([t],"e-template");var s=this.element.id+"_previousButtonTemplate",o=this.templateParser(this.previousButtonTemplate)({type:"Previous"},this,"previousButtonTemplate",s,!1);i.i(n.append)(o,t)}else if("Next"===e&&this.nextButtonTemplate){i.i(n.addClass)([t],"e-template");var s=this.element.id+"_nextButtonTemplate",o=this.templateParser(this.nextButtonTemplate)({type:"Next"},this,"nextButtonTemplate",s,!1);i.i(n.append)(o,t)}else{var a=this.createElement("button",{attrs:{"aria-label":this.localeObj.getConstant("Previous"===e?"previousSlide":"nextSlide"),type:"button"}}),l=new r.Button({cssClass:"e-flat e-round "+("Previous"===e?"e-previous-button":"e-next-button"),iconCss:"e-icons "+("Previous"===e?"e-previous-icon":"e-next-icon"),enableRtl:this.enableRtl,disabled:!this.loop&&this.selectedIndex===("Previous"===e?0:this.slideItems.length-1)});l.appendTo(a),t.appendChild(a)}this.element.querySelector("."+c).appendChild(t),n.EventHandler.add(t,"click",this.navigatorClickHandler,this)},t.prototype.renderPlayButton=function(){if(!(i.i(n.isNullOrUndefined)(this.slideItems)||"Hidden"===this.buttonsVisibility||!this.showPlayButton||this.slideItems.length<=1)){var e=this.createElement("div",{className:"e-play-pause "+("VisibleOnHover"===this.buttonsVisibility?"e-hover-arrows":"")});if(this.playButtonTemplate){i.i(n.addClass)([e],"e-template");var t=this.element.id+"_playButtonTemplate",s=this.templateParser(this.playButtonTemplate)({},this,"playButtonTemplate",t,!1);i.i(n.append)(s,e)}else{var o=this.createElement("button",{attrs:{"aria-label":this.localeObj.getConstant(this.autoPlay?"pauseSlideTransition":"playSlideTransition"),type:"button"}}),a=this.selectedIndex===this.slideItems.length-1&&!this.loop,l=new r.Button({cssClass:"e-flat e-round e-play-button",iconCss:"e-icons "+(this.autoPlay&&!a?"e-pause-icon":"e-play-icon"),isToggle:!0,enableRtl:this.enableRtl});a&&(this.setProperties({autoPlay:!1},!0),o.setAttribute("aria-label",this.localeObj.getConstant("playSlideTransition")),this.itemsContainer.setAttribute("aria-live","polite")),l.appendTo(o),e.appendChild(o)}var d=this.element.querySelector("."+c);d.insertBefore(e,d.lastElementChild),this.renderTemplates(),n.EventHandler.add(e,"click",this.playButtonClickHandler,this)}},t.prototype.renderIndicators=function(){var e=this;if(this.showIndicators){var t="e-default";this.indicatorsTemplate||(t="e-"+this.indicatorsType.toLowerCase());var i=this.createElement("div",{className:"e-carousel-indicators "+t}),s=this.createElement("div",{className:"e-indicator-bars"});i.appendChild(s);var o;if(this.slideItems)switch(this.indicatorsType){case"Fraction":this.indicatorsTemplate?this.renderIndicatorTemplate(s,this.selectedIndex+1):s.innerText=this.selectedIndex+1+" / "+this.slideItems.length;break;case"Progress":this.indicatorsTemplate?this.renderIndicatorTemplate(s,this.selectedIndex+1):(o=this.createElement("div",{className:"e-indicator-bar"}),o.style.setProperty("--carousel-items-current",""+(this.selectedIndex+1)),o.style.setProperty("--carousel-items-count",""+this.slideItems.length),s.appendChild(o));break;case"Default":case"Dynamic":this.slideItems.forEach(function(t,i){var o=e.createElement("div",{className:"e-indicator-bar "+(e.selectedIndex===i?"e-active":e.selectedIndex-1===i?"e-prev":e.selectedIndex+1===i?"e-next":""),attrs:{"data-index":i.toString(),"aria-current":e.selectedIndex===i?"true":"false"}});if(o.style.setProperty("--carousel-items-current",""+e.selectedIndex),e.indicatorsTemplate)e.renderIndicatorTemplate(o,i);else if("Default"===e.indicatorsType){var a=e.createElement("button",{className:"e-indicator",attrs:{type:"button","aria-label":e.localeObj.getConstant("slide")+" "+(i+1)+" "+e.localeObj.getConstant("of")+" "+e.slideItems.length}});o.appendChild(a),a.appendChild(e.createElement("div",{}));var l=new r.Button({cssClass:"e-flat e-small"});l.appendTo(a)}s.appendChild(o),"Default"===e.indicatorsType&&n.EventHandler.add(o,"click",e.indicatorClickHandler,e)})}this.element.appendChild(i)}},t.prototype.renderIndicatorTemplate=function(e,t){void 0===t&&(t=0),i.i(n.addClass)([e],"e-template");var s=this.element.id+"_indicatorsTemplate",r=this.templateParser(this.indicatorsTemplate)({index:t,selectedIndex:this.selectedIndex},this,"indicatorsTemplate",s,!1);i.i(n.append)(r,e)},t.prototype.renderKeyboardActions=function(){this.keyModule=new n.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:this.keyConfigs})},t.prototype.renderTouchActions=function(){this.enableTouchSwipe&&(this.touchModule=new n.Touch(this.element,{swipe:this.swipeHandler.bind(this)}))},t.prototype.applyAnimation=function(){switch(i.i(n.removeClass)([this.element],["e-carousel-custom-animation","e-carousel-fade-animation","e-carousel-slide-animation","e-carousel-animation-none"]),this.animationEffect){case"Slide":i.i(n.addClass)([this.element],"e-carousel-slide-animation");break;case"Fade":i.i(n.addClass)([this.element],"e-carousel-fade-animation");break;case"None":i.i(n.addClass)([this.element],"e-carousel-animation-none");break;case"Custom":i.i(n.addClass)([this.element],"e-carousel-custom-animation")}},t.prototype.autoSlide=function(){i.i(n.isNullOrUndefined)(this.slideItems)||this.slideItems.length<=1||(this.resetSlideInterval(),this.applySlideInterval())},t.prototype.autoSlideChange=function(){var e=this.element.querySelector(".e-active");if(!i.i(n.isNullOrUndefined)(e)){var t=parseInt(e.dataset.index,10);if(this.loop||t!==this.slideItems.length-1){var s=(t+1)%this.slideItems.length;this.element.classList.contains(p)||this.setActiveSlide(s,"Next"),this.autoSlide()}else this.resetSlideInterval()}},t.prototype.applySlideInterval=function(){var e=this;if(this.autoPlay&&!this.element.classList.contains(p)){var t=this.interval;this.items.length>0&&!i.i(n.isNullOrUndefined)(this.items[this.selectedIndex].interval)&&(t=this.items[this.selectedIndex].interval),this.autoSlideInterval=setInterval(function(){return e.autoSlideChange()},t)}},t.prototype.resetSlideInterval=function(){clearInterval(this.autoSlideInterval),this.autoSlideInterval=null},t.prototype.getSlideIndex=function(e){var t=this.selectedIndex;return"Previous"===e?--t<0&&(t=this.slideItems.length-1):++t===this.slideItems.length&&(t=0),t},t.prototype.setActiveSlide=function(e,t,s){var r=this;if(void 0===s&&(s=!1),!(this.element.querySelectorAll("."+h+".e-prev,."+h+".e-next").length>0)){var o=[].slice.call(this.element.querySelectorAll("."+h+":not(.e-cloned)")),a=this.element.querySelector("."+h+".e-active");if(i.i(n.isNullOrUndefined)(a)&&this.showIndicators){var l=this.element.querySelector(".e-indicator-bar.e-active"),d=parseInt(l.dataset.index,10);return void i.i(n.addClass)([o[parseInt(d.toString(),10)]],"e-active")}if(i.i(n.isNullOrUndefined)(a))return void i.i(n.addClass)([o[parseInt(e.toString(),10)]],"e-active");var c=parseInt(a.dataset.index,10),p=o[parseInt(e.toString(),10)],u={currentIndex:c,nextIndex:e,currentSlide:a,nextSlide:p,slideDirection:t,isSwiped:s,cancel:!1};this.trigger("slideChanging",u,function(a){if(!a.cancel){r.setProperties({selectedIndex:e},!0),i.i(n.attributes)(a.currentSlide,{"aria-hidden":"true"}),i.i(n.attributes)(a.nextSlide,{"aria-hidden":"false"}),r.refreshIndicators(c,e),r.slideChangedEventArgs={currentIndex:a.nextIndex,previousIndex:a.currentIndex,currentSlide:a.nextSlide,previousSlide:a.currentSlide,slideDirection:t,isSwiped:s};var l=o[parseInt(e.toString(),10)].clientWidth,d=r.getNumOfItems();r.isSwipe||(r.itemsContainer.style.transitionDuration="0.6s"),r.isSwipe=!1,"Fade"===r.animationEffect?r.itemsContainer.classList.add("e-fade-in-out"):r.itemsContainer.style.transitionProperty="transform",r.loop?0===r.slideChangedEventArgs.currentIndex&&"Next"===r.slideChangedEventArgs.slideDirection?r.itemsContainer.style.transform=r.getTranslateX(l,o.length+d):r.slideChangedEventArgs.currentIndex===r.slideItems.length-1&&"Previous"===r.slideChangedEventArgs.slideDirection?r.itemsContainer.style.transform=r.partialVisible?r.getTranslateX(l):"translateX(0px)":r.itemsContainer.style.transform=r.getTranslateX(l,e+d):r.itemsContainer.style.transform=r.getTranslateX(l,e),"Slide"===r.animationEffect?"Previous"===t?(i.i(n.addClass)([a.nextSlide],"e-prev"),a.nextSlide.setAttribute("data-slide-height",a.nextSlide.offsetHeight.toString()),i.i(n.addClass)([a.currentSlide,a.nextSlide],"e-transition-end")):(i.i(n.addClass)([a.nextSlide],"e-next"),a.nextSlide.setAttribute("data-slide-height",a.nextSlide.offsetHeight.toString()),i.i(n.addClass)([a.currentSlide,a.nextSlide],"e-transition-start")):"Fade"===r.animationEffect?(i.i(n.removeClass)([a.currentSlide],"e-active"),i.i(n.addClass)([a.nextSlide],"e-active")):"Custom"===r.animationEffect?"Previous"===t?(i.i(n.addClass)([a.nextSlide],"e-next"),i.i(n.addClass)([a.currentSlide],"e-prev")):(i.i(n.addClass)([a.currentSlide],"e-prev"),i.i(n.addClass)([a.nextSlide],"e-next")):r.onTransitionEnd(),r.handleNavigatorsActions(e)}})}},t.prototype.onTransitionEnd=function(){var e=this;i.i(n.removeClass)(this.element.querySelectorAll("."+d),"e-fade-in-out");var t=this.getNumOfItems();if(this.slideChangedEventArgs){if(this.itemsContainer.style.transitionProperty="none",this.loop&&(0===this.slideChangedEventArgs.currentIndex&&"Next"===this.slideChangedEventArgs.slideDirection||this.slideChangedEventArgs.currentIndex===this.slideItems.length-1&&"Previous"===this.slideChangedEventArgs.slideDirection)){var s=this.slideChangedEventArgs.currentSlide.clientWidth;this.itemsContainer.style.transform=this.getTranslateX(s,this.slideChangedEventArgs.currentIndex+t)}i.i(n.addClass)([this.slideChangedEventArgs.currentSlide],"e-active"),i.i(n.removeClass)([this.slideChangedEventArgs.previousSlide],"e-active"),this.trigger("slideChanged",this.slideChangedEventArgs,function(){i.i(n.removeClass)(e.element.querySelectorAll("."+h),["e-prev","e-next","e-transition-start","e-transition-end"]),e.slideChangedEventArgs=null})}},t.prototype.refreshIndicators=function(e,t){var s=this,r=this.element.querySelector(".e-indicator-bars");if(!i.i(n.isNullOrUndefined)(r)){var o=[].slice.call(r.childNodes);switch(this.indicatorsType){case"Default":case"Dynamic":i.i(n.attributes)(o[parseInt(e.toString(),10)],{"aria-current":"false"}),i.i(n.attributes)(o[parseInt(t.toString(),10)],{"aria-current":"true"}),i.i(n.removeClass)(o,["e-active","e-prev","e-next"]),i.i(n.addClass)([o[parseInt(t.toString(),10)]],"e-active"),o[t-1]&&i.i(n.addClass)([o[t-1]],"e-prev"),o[t+1]&&i.i(n.addClass)([o[t+1]],"e-next"),o.forEach(function(e){return e.style.setProperty("--carousel-items-current",""+s.selectedIndex)});break;case"Fraction":this.indicatorsTemplate?(r.children.length>0&&r.removeChild(r.firstElementChild),this.renderIndicatorTemplate(r,t+1)):r.innerText=this.selectedIndex+1+" / "+this.slideItems.length;break;case"Progress":this.indicatorsTemplate?(r.children.length>0&&r.removeChild(r.firstElementChild),this.renderIndicatorTemplate(r,t+1)):r.firstElementChild.style.setProperty("--carousel-items-current",""+(this.selectedIndex+1))}}},t.prototype.setHtmlAttributes=function(e,t){for(var s=Object.keys(e),r=0,o=s;r<o.length;r++){var a=o[r];"class"===a?i.i(n.addClass)([t],e[""+a]):t.setAttribute(a,e[""+a])}},t.prototype.templateParser=function(e){if(e)try{return"function"!=typeof e&&document.querySelectorAll(e).length?i.i(n.compile)(document.querySelector(e).innerHTML.trim()):i.i(n.compile)(e)}catch(t){return i.i(n.compile)(e)}},t.prototype.getNavigatorState=function(e,t){var s=e.querySelector("."+(t?"e-previous-button":"e-next-button"));if(s){return i.i(n.getInstance)(s,r.Button).disabled}return!1},t.prototype.navigatorClickHandler=function(e){var t=e.currentTarget;if(!this.getNavigatorState(t,t.classList.contains("e-previous"))){var i=t.classList.contains("e-previous")?"Previous":"Next";this.setActiveSlide(this.getSlideIndex(i),i),this.autoSlide()}},t.prototype.indicatorClickHandler=function(e){var t=i.i(n.closest)(e.target,".e-indicator-bar"),s=parseInt(t.dataset.index,10);this.selectedIndex!==s&&(this.setActiveSlide(s,this.selectedIndex>s?"Previous":"Next"),this.autoSlide())},t.prototype.playButtonClickHandler=function(e,t){void 0===t&&(t=!1);var s=this.element.querySelector(".e-play-button");if(s){var o=i.i(n.getInstance)(s,r.Button);t||this.setProperties({autoPlay:!this.autoPlay},!0),s.setAttribute("aria-label",this.localeObj.getConstant(this.autoPlay?"pauseSlideTransition":"playSlideTransition")),o.iconCss="e-icons "+(this.autoPlay?"e-pause-icon":"e-play-icon"),o.dataBind(),this.itemsContainer.setAttribute("aria-live",this.autoPlay?"off":"polite"),this.autoPlay&&!this.loop&&this.selectedIndex===this.slideItems.length-1&&this.setActiveSlide(0,"Next"),this.autoSlide()}},t.prototype.keyHandler=function(e){var t,s,r=!1,o=e.target;switch(e.preventDefault(),e.action){case"space":this.showIndicators&&o.classList.contains("e-indicator")?o.click():o.classList.contains(l)||o.classList.contains("e-play-button")?this.playButtonClickHandler(e):o.classList.contains("e-next-button")?this.next():o.classList.contains("e-previous-button")&&this.prev();break;case"end":s=this.slideItems.length-1,t="Next",r=!0;break;case"home":s=0,t="Previous",r=!0;break;case"moveUp":case"moveLeft":case"moveDown":case"moveRight":this.showIndicators&&i.i(n.isNullOrUndefined)(this.indicatorsTemplate)&&this.element.focus(),t="moveUp"===e.action||"moveLeft"===e.action?"Previous":"Next",s=this.getSlideIndex(t),r=!this.isSuspendSlideTransition(s,t)}r&&(this.setActiveSlide(s,t),this.autoSlide(),r=!1)},t.prototype.swipeHandler=function(e){if(!(this.element.classList.contains(p)||i.i(n.isNullOrUndefined)(this.slideItems)||this.slideItems.length<=1)){var t="Right"===e.swipeDirection?"Previous":"Next",s=this.getSlideIndex(t);this.isSuspendSlideTransition(s,t)||(this.setActiveSlide(s,t,!0),this.autoSlide())}},t.prototype.isSuspendSlideTransition=function(e,t){return!this.loop&&("Next"===t&&0===e||"Previous"===t&&e===this.slideItems.length-1)},t.prototype.handleNavigatorsActions=function(e){if("Hidden"!==this.buttonsVisibility){if(this.showPlayButton){var t=this.element.querySelector(".e-play-button"),s=this.selectedIndex===this.slideItems.length-1&&!this.loop,o=i.i(n.isNullOrUndefined)(this.playButtonTemplate)&&t&&s;if(i.i(n.isNullOrUndefined)(this.playButtonTemplate)&&t&&!s&&(o=!t.classList.contains("e-active")),o){this.setProperties({autoPlay:!s},!0),t.setAttribute("aria-label",this.localeObj.getConstant(this.autoPlay?"pauseSlideTransition":"playSlideTransition")),this.itemsContainer.setAttribute("aria-live",this.autoPlay?"off":"polite");var a=i.i(n.getInstance)(t,r.Button);a.iconCss="e-icons "+(this.autoPlay?"e-pause-icon":"e-play-icon"),a.dataBind()}}var l=this.element.querySelector(".e-previous-button");if(l&&i.i(n.isNullOrUndefined)(this.previousButtonTemplate)){var a=i.i(n.getInstance)(l,r.Button);a.disabled=!this.loop&&0===e,a.dataBind()}var d=this.element.querySelector(".e-next-button");if(d&&i.i(n.isNullOrUndefined)(this.nextButtonTemplate)){var a=i.i(n.getInstance)(d,r.Button);a.disabled=!this.loop&&e===this.slideItems.length-1,a.dataBind()}}},t.prototype.onHoverActions=function(e){var t=this.element.querySelector("."+c);switch(e.type){case"mouseenter":"VisibleOnHover"===this.buttonsVisibility&&t&&i.i(n.removeClass)([].slice.call(t.childNodes),"e-hover-arrows"),this.pauseOnHover&&i.i(n.addClass)([this.element],p);break;case"mouseleave":"VisibleOnHover"===this.buttonsVisibility&&t&&i.i(n.addClass)([].slice.call(t.childNodes),"e-hover-arrows"),i.i(n.removeClass)([this.element],p)}this.autoSlide()},t.prototype.onFocusActions=function(e){switch(e.type){case"focusin":i.i(n.addClass)([this.element],p);break;case"focusout":i.i(n.removeClass)([this.element],p)}this.autoSlide()},t.prototype.destroyButtons=function(){for(var e=[].slice.call(this.element.querySelectorAll(".e-control.e-btn")),t=0,s=e;t<s.length;t++){var o=s[t],a=i.i(n.getInstance)(o,r.Button);a&&a.destroy()}},t.prototype.getNumOfItems=function(){return this.partialVisible?2:1},t.prototype.getTranslateValue=function(e){var t=getComputedStyle(e);return window.WebKitCSSMatrix?new WebKitCSSMatrix(t.webkitTransform).m41:0},t.prototype.swipeStart=function(e){this.timeStampStart||(this.timeStampStart=Date.now()),this.isSwipe=!1,this.itemsContainer.classList.add("e-swipe-start"),this.prevPageX=e.touches?e.touches[0].pageX:e.pageX,this.initialTranslate=this.getTranslateValue(this.itemsContainer)},t.prototype.swiping=function(e){if(this.itemsContainer.classList.contains("e-swipe-start")){e.preventDefault();var t=e.touches?e.touches[0].pageX:e.pageX,i=this.prevPageX-t;!this.loop&&(this.enableRtl&&(0===this.selectedIndex&&i>0||this.selectedIndex===this.itemsContainer.childElementCount-1&&i<0)||!this.enableRtl&&(0===this.selectedIndex&&i<0||this.selectedIndex===this.itemsContainer.childElementCount-1&&i>0))||(this.itemsContainer.style.transform="translateX("+(this.initialTranslate+(this.enableRtl?i:-i))+"px)")}},t.prototype.swipStop=function(){this.isSwipe=!0;var e=Date.now()-this.timeStampStart,t=this.getTranslateValue(this.itemsContainer)-this.initialTranslate;if(t=t<0?-1*t:t,this.isSwipe){var i=t*(n.Browser.isDevice?6:1.66);this.itemsContainer.style.transitionDuration=(n.Browser.isDevice?t:i)/e/10+"s"}var s=this.itemsContainer.firstElementChild.clientWidth,r=s/2;this.itemsContainer.classList.remove("e-swipe-start");var o=this.getTranslateValue(this.itemsContainer);o-this.initialTranslate<-r?this.swipeNavigation(!this.enableRtl):o-this.initialTranslate>r?this.swipeNavigation(this.enableRtl):(this.itemsContainer.style.transform="translateX("+this.initialTranslate+"px)","Fade"===this.animationEffect&&this.itemsContainer.classList.add("e-fade-in-out"))},t.prototype.swipeNavigation=function(e){e?this.next():this.prev()},t.prototype.swipeModehandlers=function(){(this.swipeMode&s.Touch)===s.Touch&&(n.EventHandler.add(this.itemsContainer,"touchstart",this.swipeStart,this),n.EventHandler.add(this.itemsContainer,"touchmove",this.swiping,this),n.EventHandler.add(this.itemsContainer,"touchend",this.swipStop,this)),(this.swipeMode&s.Mouse)===s.Mouse&&(n.EventHandler.add(this.itemsContainer,"mousedown",this.swipeStart,this),n.EventHandler.add(this.itemsContainer,"mousemove",this.swiping,this),n.EventHandler.add(this.itemsContainer,"mouseup",this.swipStop,this)),0===this.swipeMode&&(this.swipeMode&s.Mouse&s.Touch)==(s.Mouse&s.Touch)&&(n.EventHandler.add(this.itemsContainer,"mousedown touchstart",this.swipeStart,this),n.EventHandler.add(this.itemsContainer,"mousemove touchmove",this.swiping,this),n.EventHandler.add(this.itemsContainer,"mouseup touchend",this.swipStop,this))},t.prototype.resizeHandler=function(){if(this.itemsContainer&&this.itemsContainer.firstElementChild){var e=this.getNumOfItems(),t=this.itemsContainer.firstElementChild.clientWidth;this.loop?this.itemsContainer.style.transform=this.getTranslateX(t,this.selectedIndex+e):this.itemsContainer.style.transform=this.getTranslateX(t,this.selectedIndex)}},t.prototype.wireEvents=function(){"Custom"!==this.animationEffect&&this.swipeModehandlers(),n.EventHandler.add(this.element,"focusin focusout",this.onFocusActions,this),n.EventHandler.add(this.element,"mouseenter mouseleave",this.onHoverActions,this),n.EventHandler.add(this.element.firstElementChild,"animationend",this.onTransitionEnd,this),n.EventHandler.add(this.element.firstElementChild,"transitionend",this.onTransitionEnd,this),n.EventHandler.add(window,"resize",this.resizeHandler,this)},t.prototype.unWireEvents=function(){var e=this;[].slice.call(this.element.querySelectorAll(".e-indicator-bar")).forEach(function(t){n.EventHandler.remove(t,"click",e.indicatorClickHandler)}),[].slice.call(this.element.querySelectorAll(".e-previous,.e-next")).forEach(function(t){n.EventHandler.remove(t,"click",e.navigatorClickHandler)});var t=this.element.querySelector(".e-play-pause");t&&n.EventHandler.remove(t,"click",this.playButtonClickHandler),n.EventHandler.remove(this.element.firstElementChild,"animationend",this.onTransitionEnd),n.EventHandler.remove(this.element.firstElementChild,"transitionend",this.onTransitionEnd),n.EventHandler.clearEvents(this.element),n.EventHandler.clearEvents(this.itemsContainer),n.EventHandler.remove(window,"resize",this.resizeHandler)},t.prototype.prev=function(){if(this.loop||0!==this.selectedIndex){var e=0===this.selectedIndex?this.slideItems.length-1:this.selectedIndex-1;this.setActiveSlide(e,"Previous"),this.autoSlide()}},t.prototype.next=function(){if(this.loop||this.selectedIndex!==this.slideItems.length-1){var e=this.selectedIndex===this.slideItems.length-1?0:this.selectedIndex+1;this.setActiveSlide(e,"Next"),this.autoSlide()}},t.prototype.play=function(){var e=this.element.querySelector(".e-play-icon");if(this.showPlayButton&&e){i.i(n.classList)(e,["e-pause-icon"],["e-play-icon"]);this.element.querySelector(".e-play-button").setAttribute("aria-label",this.localeObj.getConstant("pauseSlideTransition"))}this.setProperties({autoPlay:!0},!0),this.itemsContainer.setAttribute("aria-live","off"),this.applySlideInterval()},t.prototype.pause=function(){var e=this.element.querySelector(".e-pause-icon");if(this.showPlayButton&&e){this.element.querySelector(".e-play-button").setAttribute("aria-label",this.localeObj.getConstant("playSlideTransition")),i.i(n.classList)(e,["e-play-icon"],["e-pause-icon"])}this.setProperties({autoPlay:!1},!0),this.itemsContainer.setAttribute("aria-live","off"),this.resetSlideInterval()},t.prototype.renderTemplates=function(){(this.isAngular||this.isReact)&&this.renderReactTemplates()},t.prototype.resetTemplates=function(e){(this.isAngular||this.isReact)&&this.clearTemplate(e)},t.prototype.destroy=function(){var t=this;this.resetTemplates(),this.touchModule&&(this.touchModule.destroy(),this.touchModule=null),this.keyModule.destroy(),this.keyModule=null,this.resetSlideInterval(),this.destroyButtons(),this.unWireEvents(),[].slice.call(this.element.children).forEach(function(e){t.element.removeChild(e)}),i.i(n.removeClass)([this.element],[l,this.cssClass,"e-rtl","e-swipe"]),["role","style"].forEach(function(e){t.element.removeAttribute(e)}),this.itemsContainer=null,e.prototype.destroy.call(this)},a([i.i(n.Collection)([],u)],t.prototype,"items",void 0),a([i.i(n.Property)("Slide")],t.prototype,"animationEffect",void 0),a([i.i(n.Property)()],t.prototype,"previousButtonTemplate",void 0),a([i.i(n.Property)()],t.prototype,"nextButtonTemplate",void 0),a([i.i(n.Property)()],t.prototype,"indicatorsTemplate",void 0),a([i.i(n.Property)()],t.prototype,"playButtonTemplate",void 0),a([i.i(n.Property)()],t.prototype,"cssClass",void 0),a([i.i(n.Property)([])],t.prototype,"dataSource",void 0),a([i.i(n.Property)()],t.prototype,"itemTemplate",void 0),a([i.i(n.Property)(0)],t.prototype,"selectedIndex",void 0),a([i.i(n.Property)("100%")],t.prototype,"width",void 0),a([i.i(n.Property)("100%")],t.prototype,"height",void 0),a([i.i(n.Property)(5e3)],t.prototype,"interval",void 0),a([i.i(n.Property)(!0)],t.prototype,"autoPlay",void 0),a([i.i(n.Property)(!0)],t.prototype,"pauseOnHover",void 0),a([i.i(n.Property)(!0)],t.prototype,"loop",void 0),a([i.i(n.Property)(!1)],t.prototype,"showPlayButton",void 0),a([i.i(n.Property)(!0)],t.prototype,"enableTouchSwipe",void 0),a([i.i(n.Property)(!0)],t.prototype,"showIndicators",void 0),a([i.i(n.Property)("Default")],t.prototype,"indicatorsType",void 0),a([i.i(n.Property)("Visible")],t.prototype,"buttonsVisibility",void 0),a([i.i(n.Property)(!1)],t.prototype,"partialVisible",void 0),a([i.i(n.Property)(s.Touch)],t.prototype,"swipeMode",void 0),a([i.i(n.Property)()],t.prototype,"htmlAttributes",void 0),a([i.i(n.Event)()],t.prototype,"slideChanging",void 0),a([i.i(n.Event)()],t.prototype,"slideChanged",void 0),t=a([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var s=i(0),n=(i.n(s),i(1)),r=(i.n(n),i(3)),o=this&&this.__extends||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=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},l=function(e){function t(t,i){return e.call(this,t,i)||this}return o(t,e),t.prototype.preRender=function(){this.isMenu=!1,this.element.id=this.element.id||i.i(s.getUniqueID)("ej2-contextmenu"),e.prototype.preRender.call(this)},t.prototype.initialize=function(){e.prototype.initialize.call(this),i.i(s.attributes)(this.element,{role:"menubar",tabindex:"0"}),this.element.style.zIndex=i.i(n.getZindexPartial)(this.element).toString()},t.prototype.open=function(t,i,s){e.prototype.openMenu.call(this,null,null,t,i,null,s)},t.prototype.close=function(){e.prototype.closeMenu.call(this)},t.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()}}},t.prototype.getModuleName=function(){return"contextmenu"},a([i.i(s.Property)("")],t.prototype,"target",void 0),a([i.i(s.Property)("")],t.prototype,"filter",void 0),a([i.i(s.Collection)([],r.c)],t.prototype,"items",void 0),t=a([s.NotifyPropertyChanges],t)}(r.b)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(14);i.d(t,"MenuAnimationSettings",function(){return s.a}),i.d(t,"MenuItem",function(){return s.b}),i.d(t,"FieldSettings",function(){return s.c}),i.d(t,"HScroll",function(){return s.d}),i.d(t,"VScroll",function(){return s.e}),i.d(t,"addScrolling",function(){return s.f}),i.d(t,"destroyScroll",function(){return s.g});var n=i(21);i.d(t,"Item",function(){return n.a}),i.d(t,"Toolbar",function(){return n.b});var r=i(10);i.d(t,"AccordionActionSettings",function(){return r.a}),i.d(t,"AccordionAnimationSettings",function(){return r.b}),i.d(t,"AccordionItem",function(){return r.c}),i.d(t,"Accordion",function(){return r.d});var o=i(15);i.d(t,"ContextMenu",function(){return o.a});var a=i(16);i.d(t,"Menu",function(){return a.a});var l=i(20);i.d(t,"TabActionSettings",function(){return l.a}),i.d(t,"TabAnimationSettings",function(){return l.b}),i.d(t,"Header",function(){return l.c}),i.d(t,"TabItem",function(){return l.d}),i.d(t,"Tab",function(){return l.e});var d=i(22);i.d(t,"FieldsSettings",function(){return d.a}),i.d(t,"ActionSettings",function(){return d.b}),i.d(t,"NodeAnimationSettings",function(){return d.c}),i.d(t,"TreeView",function(){return d.d});var h=i(17);i.d(t,"Sidebar",function(){return h.a});var c=i(12);i.d(t,"BreadcrumbOverflowMode",function(){return c.a}),i.d(t,"BreadcrumbItem",function(){return c.b}),i.d(t,"Breadcrumb",function(){return c.c});var p=i(13);i.d(t,"CarouselSwipeMode",function(){return p.a}),i.d(t,"CarouselItem",function(){return p.b}),i.d(t,"Carousel",function(){return p.c});var u=i(11);i.d(t,"AppBar",function(){return u.a});var f=i(18);i.d(t,"StepStatus",function(){return f.a}),i.d(t,"Step",function(){return f.b}),i.d(t,"StepperOrientation",function(){return f.c}),i.d(t,"StepperBase",function(){return f.d});var m=i(19);i.d(t,"StepperAnimationSettings",function(){return m.a}),i.d(t,"StepLabelPosition",function(){return m.b}),i.d(t,"StepType",function(){return m.c}),i.d(t,"Stepper",function(){return m.d})},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var s=i(0),n=(i.n(s),i(3)),r=this&&this.__extends||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)}}(),o=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},a="e-vertical",l=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.tempItems=[],s}return r(t,e),t.prototype.getModuleName=function(){return"menu"},t.prototype.preRender=function(){if(this.isMenu=!0,this.element.id=this.element.id||i.i(s.getUniqueID)("ej2-menu"),this.template){try{"function"!=typeof this.template&&document.querySelectorAll(this.template).length&&(this.template=document.querySelector(this.template).innerHTML.trim(),this.clearChanges())}catch(e){}this.updateMenuItems(this.items)}else this.updateMenuItems(this.items);e.prototype.preRender.call(this)},t.prototype.initialize=function(){e.prototype.initialize.call(this),i.i(s.attributes)(this.element,{role:"menubar",tabindex:"0"}),"Vertical"===this.orientation?(this.element.classList.add(a),this.hamburgerMode&&!this.target&&this.element.previousElementSibling.classList.add(a),this.element.setAttribute("aria-orientation","vertical")):s.Browser.isDevice&&!this.enableScrolling&&this.element.parentElement.classList.add("e-scrollable"),this.hamburgerMode&&(this.element.parentElement.classList.add("e-hamburger"),"Horizontal"===this.orientation&&this.element.classList.add("e-hide-menu"))},t.prototype.updateMenuItems=function(e){this.tempItems=e,this.items=[],this.tempItems.map(this.createMenuItems,this),this.setProperties({items:this.items},!0),this.tempItems=[]},t.prototype.onPropertyChanged=function(t,i){for(var n=this,r=0,o=Object.keys(t);r<o.length;r++){switch(o[r]){case"orientation":"Vertical"===t.orientation?(this.element.classList.add(a),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.add(a),this.element.classList.remove("e-hide-menu")),this.element.setAttribute("aria-orientation","vertical")):(this.element.classList.remove(a),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.remove(a),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("e-hamburger"),[].slice.call(this.element.getElementsByClassName("e-blankicon")).forEach(function(e){e.style[n.enableRtl?"paddingRight":"paddingLeft"]=""})):(this.element.parentElement.classList.remove("e-hamburger"),"Vertical"===this.orientation&&this.setBlankIconStyle(this.element)),"Vertical"===this.orientation?(this.target||this.element.previousElementSibling.classList.add(a),this.element.classList.remove("e-hide-menu")):(this.target?this.element.previousElementSibling.classList.add(a):this.element.previousElementSibling.classList.remove(a),this.element.classList[t.hamburgerMode?"add":"remove"]("e-hide-menu"));break;case"title":this.hamburgerMode&&this.element.previousElementSibling&&(t.title=this.enableHtmlSanitizer?s.SanitizeHtmlHelper.sanitize(t.title):t.title,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(a):(this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),this.element.previousElementSibling.classList.remove(a)),this.element.classList.add("e-hide-menu")))}}e.prototype.onPropertyChanged.call(this,t,i)},t.prototype.createMenuItems=function(e){var t,i,s=this.items,n=this.getField("parentId");if(e[""+n]){for(t=this.getIndex(e[""+n].toString(),!0),i=0;i<t.length;i++)s[t[i]].items||(s[t[i]].items=[]),s=s[t[i]].items;s.push(e)}else this.items.push(e)},t.prototype.open=function(){e.prototype.openHamburgerMenu.call(this)},t.prototype.close=function(){e.prototype.closeHamburgerMenu.call(this)},o([i.i(s.Property)("Horizontal")],t.prototype,"orientation",void 0),o([i.i(s.Property)("")],t.prototype,"target",void 0),o([i.i(s.Property)(null)],t.prototype,"template",void 0),o([i.i(s.Property)(!1)],t.prototype,"enableScrolling",void 0),o([i.i(s.Property)(!1)],t.prototype,"hamburgerMode",void 0),o([i.i(s.Property)("Menu")],t.prototype,"title",void 0),o([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),o([i.i(s.Complex)({itemId:"id",text:"text",parentId:"parentId",iconCss:"iconCss",url:"url",separator:"separator",children:"items"},n.a)],t.prototype,"fields",void 0),t=o([s.NotifyPropertyChanges],t)}(n.b)},function(e,t,i){"use strict";i.d(t,"a",function(){return f});var s=i(0),n=(i.n(s),this&&this.__extends||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)}}()),r=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},o="e-sidebar",a="e-close",l="e-open",d="e-right",h="e-left",c="e-over",p="e-push",u="e-sidebar-context",f=function(e){function t(t,i){return e.call(this,t,i)||this}return n(t,e),t.prototype.preRender=function(){this.setWidth()},t.prototype.render=function(){this.initialize(),this.wireEvents(),this.renderComplete()},t.prototype.initialize=function(){this.setTarget(),this.addClass(),this.setZindex(),this.enableDock&&this.setDock(),this.isOpen?(this.show(),this.firstRender=!0):this.setMediaQuery(),this.checkType(!0),this.setType(this.type),this.setCloseOnDocumentClick(),this.setEnableRTL(),s.Browser.isDevice&&(this.windowWidth=window.innerWidth)},t.prototype.setEnableRTL=function(){(this.enableRtl?s.addClass:s.removeClass)([this.element],"e-rtl")},t.prototype.setTarget=function(){this.targetEle=this.element.nextElementSibling,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]),i.i(s.addClass)([this.element],"e-sidebar-absolute"),i.i(s.addClass)([this.target],u),this.targetEle=this.getTargetElement())},t.prototype.getTargetElement=function(){for(var e=this.element.nextElementSibling;!i.i(s.isNullOrUndefined)(e)&&e.classList.contains(o);)e=e.nextElementSibling;return e},t.prototype.setCloseOnDocumentClick=function(){this.closeOnDocumentClick?s.EventHandler.add(document,"mousedown touchstart",this.documentclickHandler,this):s.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler)},t.prototype.setWidth=function(){this.enableDock&&"Left"===this.position?i.i(s.setStyleAttribute)(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock&&"Right"===this.position?i.i(s.setStyleAttribute)(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock||i.i(s.setStyleAttribute)(this.element,{width:this.setDimension(this.width)})},t.prototype.setDimension=function(e){return e="number"==typeof e?i.i(s.formatUnit)(e):"string"==typeof e?e.match(/px|%|em/)?e:i.i(s.formatUnit)(e):"100%"},t.prototype.setZindex=function(){i.i(s.setStyleAttribute)(this.element,{"z-index":""+this.zIndex})},t.prototype.addClass=function(){"EJS-SIDEBAR"===this.element.tagName&&i.i(s.addClass)([this.element],"e-sidebar-display");var e=document.querySelector(".e-main-content");i.i(s.isNullOrUndefined)(e||this.targetEle)||i.i(s.addClass)([e||this.targetEle],["e-content-animation"]),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):null,this.enableDock||"Auto"===this.type||i.i(s.addClass)([this.element],["e-visibility"]),i.i(s.removeClass)([this.element],[l,a,d,h,"e-slide",p,c]),this.element.classList.add(o),i.i(s.addClass)([this.element],"Right"===this.position?d:h),this.enableDock&&i.i(s.addClass)([this.element],"e-dock"),i.i(s.isNullOrUndefined)(this.tabIndex)||this.element.setAttribute("tabindex",this.tabIndex),"Auto"!==this.type||s.Browser.isDevice?this.isOpen||i.i(s.addClass)([this.element],[a,"e-disable-animation"]):this.show()},t.prototype.checkType=function(e){"Push"!==this.type&&"Over"!==this.type&&"Slide"!==this.type?this.type="Auto":this.element.classList.contains(a)||e||this.hide()},t.prototype.transitionEnd=function(e){this.setDock(),i.i(s.isNullOrUndefined)(e)||this.firstRender||this.triggerChange(),this.firstRender=!1,s.EventHandler.remove(this.element,"transitionend",this.transitionEnd)},t.prototype.destroyBackDrop=function(){var e=document.querySelector(".e-main-content")||this.targetEle;this.target&&this.showBackdrop&&e&&!i.i(s.isNullOrUndefined)(this.defaultBackdropDiv)?i.i(s.removeClass)([this.defaultBackdropDiv],"e-sidebar-overlay"):this.showBackdrop&&this.modal&&(this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},t.prototype.hide=function(e){var t=this,n={model:this,element:this.element,cancel:!1,isInteracted:!i.i(s.isNullOrUndefined)(e),event:e||null};this.trigger("close",n,function(e){if(!e.cancel){if(t.element.classList.contains(a))return;t.element.classList.contains(l)&&!t.animate&&t.triggerChange(),i.i(s.addClass)([t.element],a),i.i(s.removeClass)([t.element],l),i.i(s.setStyleAttribute)(t.element,{width:i.i(s.formatUnit)(t.enableDock?t.dockSize:t.width)}),t.setType(t.type);var n=document.querySelector(".e-main-content")||t.targetEle;!t.enableDock&&n&&(n.style.transform="translateX(0px)",n.style["Left"===t.position?"marginLeft":"marginRight"]="0px"),t.destroyBackDrop(),t.setAnimation(),"Slide"===t.type&&document.body.classList.remove("e-sidebar-overflow"),t.setProperties({isOpen:!1},!0),t.enableDock&&setTimeout(function(){return t.setTimeOut()},50),s.EventHandler.add(t.element,"transitionend",t.transitionEnd,t)}})},t.prototype.setTimeOut=function(){var e=document.querySelector(".e-main-content")||this.targetEle,t=this.element.getBoundingClientRect().width;!this.element.classList.contains(l)||!e||"Over"===this.type&&this.enableDock?this.element.classList.contains(a)&&e&&("Left"===this.position?e.style.marginLeft=this.setDimension("auto"===this.dockSize?t:this.dockSize):e.style.marginRight=this.setDimension("auto"===this.dockSize?t:this.dockSize)):"Left"===this.position?e.style.marginLeft=this.setDimension("auto"===this.width?t:this.width):e.style.marginRight=this.setDimension("auto"===this.width?t:this.width)},t.prototype.show=function(e){var t=this,n={model:this,element:this.element,cancel:!1,isInteracted:!i.i(s.isNullOrUndefined)(e),event:e||null};this.trigger("open",n,function(e){if(!e.cancel){if(i.i(s.removeClass)([t.element],["e-visibility","e-disable-animation"]),t.element.classList.contains(l))return;t.element.classList.contains(a)&&!t.animate&&t.triggerChange(),i.i(s.addClass)([t.element],[l,"e-transition"]),i.i(s.setStyleAttribute)(t.element,{transform:""}),i.i(s.removeClass)([t.element],a),i.i(s.setStyleAttribute)(t.element,{width:i.i(s.formatUnit)(t.width)}),t.setType(t.type),t.createBackDrop(),t.setAnimation(),"Slide"===t.type&&document.body.classList.add("e-sidebar-overflow"),t.setProperties({isOpen:!0},!0),s.EventHandler.add(t.element,"transitionend",t.transitionEnd,t)}})},t.prototype.setAnimation=function(){this.animate?i.i(s.removeClass)([this.element],"e-disable-animation"):i.i(s.addClass)([this.element],"e-disable-animation")},t.prototype.triggerChange=function(){var e={name:"change",element:this.element};this.trigger("change",e)},t.prototype.setDock=function(){this.enableDock&&"Left"===this.position&&!this.getState()?i.i(s.setStyleAttribute)(this.element,{transform:"translateX(-100%) translateX("+this.setDimension(this.dockSize)+")"}):this.enableDock&&"Right"===this.position&&!this.getState()&&i.i(s.setStyleAttribute)(this.element,{transform:"translateX(100%) translateX(-"+this.setDimension(this.dockSize)+")"}),this.element.classList.contains(a)&&this.enableDock&&i.i(s.setStyleAttribute)(this.element,{width:this.setDimension(this.dockSize)})},t.prototype.createBackDrop=function(){if(this.target&&this.showBackdrop&&this.getState()){var e=this.target,t=document.querySelector(".e-main-content")||this.targetEle;this.defaultBackdropDiv=this.createElement("div"),i.i(s.addClass)([this.defaultBackdropDiv],"e-sidebar-overlay"),i.i(s.setStyleAttribute)(this.defaultBackdropDiv,{height:e.style.height}),t.appendChild(this.defaultBackdropDiv)}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))},t.prototype.getPersistData=function(){return this.addOnPersist(["type","position","isOpen"])},t.prototype.getModuleName=function(){return"sidebar"},t.prototype.toggle=function(){this.element.classList.contains(l)?this.hide():this.show()},t.prototype.getState=function(){return!!this.element.classList.contains(l)},t.prototype.setMediaQuery=function(){if(this.mediaQuery){var e=!1;e="string"==typeof this.mediaQuery?window.matchMedia(this.mediaQuery).matches:this.mediaQuery.matches,e&&this.windowWidth!==window.innerWidth?this.show():this.getState()&&this.windowWidth!==window.innerWidth&&this.hide()}},t.prototype.resize=function(){"Auto"===this.type&&(s.Browser.isDevice?i.i(s.addClass)([this.element],c):i.i(s.addClass)([this.element],p)),this.setMediaQuery(),s.Browser.isDevice&&(this.windowWidth=window.innerWidth)},t.prototype.documentclickHandler=function(e){i.i(s.closest)(e.target,".e-control."+o)||this.hide(e)},t.prototype.enableGestureHandler=function(e){!this.isOpen&&"Left"===this.position&&"Right"===e.swipeDirection&&e.startX<=20&&e.distanceX>=50&&e.velocity>=.5?this.show():this.isOpen&&"Left"===this.position&&"Left"===e.swipeDirection?this.hide():this.isOpen&&"Right"===this.position&&"Right"===e.swipeDirection?this.hide():!this.isOpen&&"Right"===this.position&&"Left"===e.swipeDirection&&window.innerWidth-e.startX<=20&&e.distanceX>=50&&e.velocity>=.5&&this.show()},t.prototype.setEnableGestures=function(){this.enableGestures?(this.mainContentEle=new s.Touch(document.body,{swipe:this.enableGestureHandler.bind(this)}),this.sidebarEle=new s.Touch(this.element,{swipe:this.enableGestureHandler.bind(this)})):this.mainContentEle&&this.sidebarEle&&(this.mainContentEle.destroy(),this.sidebarEle.destroy())},t.prototype.wireEvents=function(){this.setEnableGestures(),s.EventHandler.add(window,"resize",this.resize,this)},t.prototype.unWireEvents=function(){s.EventHandler.remove(window,"resize",this.resize),s.EventHandler.remove(document,"mousedown touchstart",this.documentclickHandler),this.mainContentEle&&this.mainContentEle.destroy(),this.sidebarEle&&this.sidebarEle.destroy()},t.prototype.onPropertyChanged=function(t,n){for(var r=document.querySelector(".e-main-content")||this.targetEle,o=this.isServerRendered,a=0,l=Object.keys(t);a<l.length;a++){switch(l[a]){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),i.i(s.removeClass)([this.element],["e-visibility"]),this.addClass(),i.i(s.addClass)([this.element],"Auto"===this.type?s.Browser.isDevice?["e-over"]:["e-push"]:["e-"+this.type.toLowerCase()]);break;case"position":this.element.style.transform="",this.setDock(),r&&(r.style["Left"===this.position?"marginRight":"marginLeft"]="0px"),"Right"===this.position?(i.i(s.removeClass)([this.element],h),i.i(s.addClass)([this.element],d)):(i.i(s.removeClass)([this.element],d),i.i(s.addClass)([this.element],h)),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),i.i(s.isNullOrUndefined)(this.target)&&(i.i(s.removeClass)([this.element],"e-sidebar-absolute"),i.i(s.removeClass)([n.target],u),i.i(s.setStyleAttribute)(r,{"margin-left":0,"margin-right":0}),document.body.insertAdjacentElement("afterbegin",this.element)),this.isServerRendered=!1,e.prototype.refresh.call(this),this.isServerRendered=o;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()}}},t.prototype.setType=function(e){var t=this.element.getBoundingClientRect().width;this.setZindex();var n=document.querySelector(".e-main-content")||this.targetEle;n&&(n.style.transform="translateX(0px)",s.Browser.isDevice||"Auto"===this.type||"Over"===this.type&&this.enableDock||(n.style["Left"===this.position?"marginLeft":"marginRight"]="0px"));var r=(this.position,t+"px"),o="Left"===this.position?t:-t;switch(i.i(s.removeClass)([this.element],[p,c,"e-slide"]),e){case"Push":i.i(s.addClass)([this.element],[p]),n&&(this.enableDock||this.element.classList.contains(l))&&(n.style["Left"===this.position?"marginLeft":"marginRight"]=r);break;case"Slide":i.i(s.addClass)([this.element],["e-slide"]),n&&(this.enableDock||this.element.classList.contains(l))&&(n.style.transform="translateX("+o+"px)");break;case"Over":i.i(s.addClass)([this.element],[c]),this.enableDock&&(this.element.classList.contains(a)||this.isOpen)&&n&&(n.style["Left"===this.position?"marginLeft":"marginRight"]=this.setDimension(this.dockSize));break;case"Auto":i.i(s.addClass)([this.element],["e-transition"]),s.Browser.isDevice?n&&this.enableDock&&!this.getState()?(n.style["Left"===this.position?"marginLeft":"marginRight"]=r,i.i(s.addClass)([this.element],p)):i.i(s.addClass)([this.element],c):(i.i(s.addClass)([this.element],p),n&&(this.enableDock||this.element.classList.contains(l))&&(n.style["Left"===this.position?"marginLeft":"marginRight"]=r)),this.createBackDrop()}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.target&&i.i(s.removeClass)([this.target],u),this.destroyBackDrop(),this.element&&(i.i(s.removeClass)([this.element],[l,a,p,"e-slide",c,h,d,"e-transition","e-disable-animation"]),i.i(s.removeClass)([this.element],"e-sidebar-absolute"),this.element.style.width="",this.element.style.zIndex="",this.element.style.transform="",i.i(s.isNullOrUndefined)(this.sidebarEleCopy.getAttribute("tabindex"))?this.element.removeAttribute("tabindex"):this.element.setAttribute("tabindex",this.tabIndex)),this.windowWidth=null;var t=document.querySelector(".e-main-content")||this.targetEle;i.i(s.isNullOrUndefined)(t)||(t.style.margin="",t.style.transform=""),this.unWireEvents()},r([i.i(s.Property)("auto")],t.prototype,"dockSize",void 0),r([i.i(s.Property)(null)],t.prototype,"mediaQuery",void 0),r([i.i(s.Property)(!1)],t.prototype,"enableDock",void 0),r([i.i(s.Property)("en-US")],t.prototype,"locale",void 0),r([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),r([i.i(s.Property)(!0)],t.prototype,"enableGestures",void 0),r([i.i(s.Property)(!1)],t.prototype,"isOpen",void 0),r([i.i(s.Property)(!1)],t.prototype,"enableRtl",void 0),r([i.i(s.Property)(!0)],t.prototype,"animate",void 0),r([i.i(s.Property)("auto")],t.prototype,"height",void 0),r([i.i(s.Property)(!1)],t.prototype,"closeOnDocumentClick",void 0),r([i.i(s.Property)("Left")],t.prototype,"position",void 0),r([i.i(s.Property)(null)],t.prototype,"target",void 0),r([i.i(s.Property)(!1)],t.prototype,"showBackdrop",void 0),r([i.i(s.Property)("Auto")],t.prototype,"type",void 0),r([i.i(s.Property)("auto")],t.prototype,"width",void 0),r([i.i(s.Property)(1e3)],t.prototype,"zIndex",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),r([i.i(s.Event)()],t.prototype,"close",void 0),r([i.i(s.Event)()],t.prototype,"open",void 0),r([i.i(s.Event)()],t.prototype,"change",void 0),r([i.i(s.Event)()],t.prototype,"destroyed",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return I}),i.d(t,"b",function(){return s}),i.d(t,"c",function(){return E}),i.d(t,"d",function(){return N});var s,n=i(0),r=(i.n(n),i(8)),o=i(1),a=(i.n(o),this&&this.__extends||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)}}()),l=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},d="e-indicator",h="e-step-text-container",c="e-step-selected",p="e-step-inprogress",u="e-step-notstarted",f="e-step-focus",m="e-step-completed",v="e-step-disabled",g="e-stepper-readonly",y="e-rtl",b="e-label-before",C="e-horizontal",x="e-step-type-indicator",S="e-step-type-label",I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),l([i.i(n.Property)(!0)],t.prototype,"enable",void 0),l([i.i(n.Property)(2e3)],t.prototype,"duration",void 0),l([i.i(n.Property)(0)],t.prototype,"delay",void 0),t}(n.ChildProperty);!function(e){e.Top="Top",e.Bottom="Bottom",e.Start="Start",e.End="End"}(s||(s={}));var E;!function(e){e.Default="Default",e.Label="Label",e.Indicator="Indicator"}(E||(E={}));var N=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.stepperItemElements=[],s}return a(t,e),t.prototype.preRender=function(){this.element.id||(this.element.id=i.i(n.getUniqueID)("e-"+this.getModuleName()));var e={optional:"Optional"};this.l10n=new n.L10n("stepper",e,this.locale),this.keyConfigs={downarrow:"downarrow",leftarrow:"leftarrow",rightarrow:"rightarrow",uparrow:"uparrow",space:"space",enter:"enter",home:"home",end:"end",tab:"tab",shiftTab:"shift+tab",escape:"escape"},this.tooltipOpen=!1},t.prototype.getModuleName=function(){return"stepper"},t.prototype.render=function(){this.initialize(),this.navigationHandler(this.activeStep,null,!1),this.updateStepperStatus(!0)},t.prototype.initialize=function(){var e=this;this.element.setAttribute("aria-label",this.element.id),this.updatePosition(),this.stepperItemList=this.createElement("ol",{className:"e-stepper-steps"}),this.updateOrientaion(this.element),this.updateStepType(),this.element.appendChild(this.stepperItemList),this.cssClass&&i.i(n.addClass)([this.element],this.cssClass.trim().split(" ")),this.readOnly&&this.element.classList.add(g),this.enableRtl&&this.element.classList.add(y),this.wireEvents(),this.updateTemplateFunction(),this.renderItems(),this.steps.length>0&&(this.steps.length>1&&(this.isAngular&&this.template?setTimeout(function(){e.renderProgressBar(e.element)}):this.renderProgressBar(this.element)),this.checkValidStep(),this.updateAnimation(),this.updateTooltip(),this.wireKeyboardEvent())},t.prototype.updatePosition=function(){this.progressBarPosition=this.beforeLabelWidth=this.textEleWidth=0},t.prototype.renderDefault=function(e){return!(this.steps[parseInt(e.toString(),10)].iconCss||this.steps[parseInt(e.toString(),10)].text||this.steps[parseInt(e.toString(),10)].label)},t.prototype.updateAnimation=function(){var e=this.element.querySelector(".e-progressbar-value");this.animation.enable?(this.animation.duration>=0&&e&&e.style.setProperty("--duration",this.animation.duration+"ms"),this.animation.delay>=0&&e&&e.style.setProperty("--delay",this.animation.delay+"ms")):e&&(e.style.setProperty("--delay","0ms"),e.style.setProperty("--duration","0ms"))},t.prototype.updateStepType=function(){this.stepType.toLowerCase(),"default"!==this.stepType.toLowerCase()&&this.element.classList.add("e-step-type-"+this.stepType.toLowerCase()),this.stepType.toLowerCase(),this.labelContainer&&this.clearLabelPosition()},t.prototype.wireEvents=function(){var e=this;n.EventHandler.add(window,"resize",function(){e.stepperItemList&&e.progressbar&&e.element.classList.contains(C)&&e.setProgressPosition(e.element,!0)},this),n.EventHandler.add(window,"click",function(){e.updateStepFocus()},this)},t.prototype.updateStepFocus=function(){if(this.isKeyNavFocus){this.isKeyNavFocus=!1;var e=this.element.querySelector("."+f);e&&(e.classList.remove(f),this.element.classList.remove("e-steps-focus"))}},t.prototype.updateStepperStatus=function(e){for(var t=0;t<this.steps.length;t++){var i=this.steps[parseInt(t.toString(),10)],s=i.status.toLowerCase();if(e&&0===this.activeStep&&0===t&&(i.status=r.a.InProgress),i&&"notstarted"!==s&&t===this.activeStep)for(var n=0;n<this.steps.length;n++){var o=this.stepperItemElements[parseInt(n.toString(),10)];o.classList.remove(c,p,m,u);var a=this.isProtectedOnChange;this.isProtectedOnChange=!0,"completed"===s?this.updateStatusClass(n,t,o):this.updateStatusClass(n,t,o,!0),this.isProtectedOnChange=a}else i&&"notstarted"!==s&&t!==this.activeStep&&this.navigationHandler(this.activeStep,null,!0)}},t.prototype.updateStatusClass=function(e,t,i,s){var n=this.steps[parseInt(e.toString(),10)];e<t?(i.classList.add(m),n.status=r.a.Completed):e===t?i.classList.add(s?p:m,c):i.classList.add(u)},t.prototype.renderItems=function(){for(var e=this,t=0;t<this.steps.length;t++){this.stepperItemContainer=this.createElement("li",{className:"e-step-container"}),this.stepperItemContainer.classList[0===t?"add":"remove"](c,p),this.stepperItemContainer.classList[0!==t?"add":"remove"](u),this.element.classList.contains(C)&&this.stepperItemContainer.style.setProperty("--max-width",100/this.steps.length+"%");var s=this.createElement("span",{className:"e-step"});if(this.renderDefault(t)&&(i.i(n.isNullOrUndefined)(this.template)||""===this.template)){var r=!this.element.classList.contains("e-step-type-default")&&"indicator"===this.stepType.toLowerCase();r&&s.classList.add("e-icons","e-step-indicator"),r||(s.classList.add("e-step-content"),s.innerHTML=(t+1).toString()),this.stepperItemContainer.appendChild(s)}else if(i.i(n.isNullOrUndefined)(this.template)||""===this.template){var o=!0,a=this.steps[parseInt(t.toString(),10)];if(a.iconCss&&(!a.text&&!a.label||!this.element.classList.contains(S))){var l=a.iconCss.trim().split(" ");s.classList.add(d);for(var f=0;f<l.length;f++)s.classList.add(l[parseInt(f.toString(),10)]);if(this.stepperItemContainer.appendChild(s),this.stepperItemContainer.classList.add("e-step-icon"),this.element.classList.contains(C)&&("start"===this.labelPosition.toLowerCase()||"end"===this.labelPosition.toLowerCase())&&a.label||this.element.classList.contains("e-vertical")&&("top"===this.labelPosition.toLowerCase()||"bottom"===this.labelPosition.toLowerCase())&&a.label){this.element.classList.add("e-label-"+this.labelPosition.toLowerCase());var m=this.createElement("span",{className:h+" e-text"});m.innerText=a.label,this.stepperItemContainer.appendChild(m),this.stepperItemContainer.classList.add("e-step-text"),o=!1}}if(a.text&&(!a.iconCss||!this.element.classList.contains(x))&&o&&(!a.iconCss||!a.label))if(!a.iconCss&&this.element.classList.contains(x)){this.checkValidState(a,s);var g=this.isProtectedOnChange;this.isProtectedOnChange=!0,a.label=null,this.isProtectedOnChange=g}else{this.textContainer=this.createElement("span",{className:h});var m=this.createElement("span",{className:"e-text"});if(a.label||(m.innerText=a.text,null===a.isValid||a.iconCss&&!this.element.classList.contains(S)?m.classList.add(h):this.textContainer.appendChild(m),this.stepperItemContainer.appendChild(null===a.isValid||a.iconCss&&!this.element.classList.contains(S)?m:this.textContainer),this.stepperItemContainer.classList.add("e-step-text")),(!a.iconCss||this.element.classList.contains(S))&&(this.stepperItemContainer.classList.add("e-step-text-only"),!a.label&&null!==a.isValid)){var y=this.createElement("span",{className:"e-step-validation-icon e-icons"});this.textContainer.appendChild(y)}a.label&&this.element.classList.contains(S)&&(m.innerText=a.label);var g=this.isProtectedOnChange;this.isProtectedOnChange=!0,a.text=a.label?null:a.text,this.isProtectedOnChange=g}if(a.cssClass&&i.i(n.addClass)([this.stepperItemContainer],a.cssClass.trim().split(" ")),a.disabled&&(this.stepperItemContainer.classList[a.disabled?"add":"remove"](v),i.i(n.attributes)(this.stepperItemContainer,{tabindex:"-1","aria-disabled":"true"})),a.label&&(!a.iconCss||!this.element.classList.contains(x))&&o)if(a.iconCss||a.text||!this.element.classList.contains(x)){if(!this.element.classList.contains(S)||!a.text||this.element.classList.contains(S)&&a.label){this.labelContainer=this.createElement("span",{className:"e-step-label-container"});var I=this.createElement("span",{className:"e-label"});if(I.innerText=a.label,this.labelContainer.appendChild(I),this.stepperItemContainer.classList.add("e-step-label"),this.updateLabelPosition(),(!a.iconCss&&!a.text||this.element.classList.contains(S))&&(this.stepperItemContainer.classList.add("e-step-label-only"),null!==a.isValid)){var y=this.createElement("span",{className:"e-step-validation-icon e-icons"});this.labelContainer.appendChild(y)}}}else this.checkValidState(a,s,!0);if(a.optional){var E=this.createElement("span",{className:"e-step-label-optional"});this.l10n.setLocale(this.locale);var N=this.l10n.getConstant("optional");E.innerText=N,a.label&&this.labelContainer&&(this.element.classList.contains("e-label-after")&&!this.stepperItemContainer.classList.contains("e-step-label-only")||this.element.classList.contains(C)&&this.element.classList.contains(b)&&!this.stepperItemContainer.classList.contains("e-step-label-only"))||this.element.classList.contains("e-vertical")&&this.element.classList.contains(b)?this.labelContainer.appendChild(E):this.stepperItemContainer.appendChild(E)}null!==a.isValid&&(a.isValid?this.stepperItemContainer.classList.add("e-step-valid"):this.stepperItemContainer.classList.add("e-step-error"))}this.renderItemContent(t,!1),this.stepperItemContainer.classList.contains(p)?i.i(n.attributes)(this.stepperItemContainer,{tabindex:"0","aria-current":"true"}):i.i(n.attributes)(this.stepperItemContainer,{tabindex:"-1"}),this.wireItemsEvents(this.stepperItemContainer,t),this.stepperItemElements.push(this.stepperItemContainer);var w={element:this.stepperItemContainer,index:t};this.trigger("beforeStepRender",w,function(t){e.stepperItemList.appendChild(t.element)}),this.isAngular&&this.template?setTimeout(function(){e.calculateProgressBarPosition()}):this.calculateProgressBarPosition()}if(this.element.classList.contains("e-vertical")&&this.element.classList.contains(b))for(var O=this.stepperItemList.querySelectorAll(".e-label"),f=0;f<O.length;f++){var L=O[parseInt(f.toString(),10)];L.style.setProperty("--label-width",this.beforeLabelWidth+5+"px")}},t.prototype.calculateProgressBarPosition=function(){var e=!!this.element.classList.contains(b);if(!!this.element.classList.contains("e-vertical")){var t=!(!this.stepperItemContainer.classList.contains("e-step-icon")||this.stepperItemContainer.classList.contains("e-step-text")||this.stepperItemContainer.classList.contains("e-step-label")),i=this.stepperItemContainer.querySelector("."+h);if(i&&(this.textEleWidth=this.textEleWidth<i.offsetWidth?i.offsetWidth:this.textEleWidth),e){var s=void 0,n=this.stepperItemContainer.querySelector(".e-label").offsetWidth+15;this.beforeLabelWidth<n&&(this.beforeLabelWidth=n),this.element.querySelector("ol").lastChild.querySelector("."+d)?s=this.beforeLabelWidth+this.stepperItemContainer.querySelector("."+d).offsetWidth/2:this.stepperItemContainer.querySelector("."+h)&&(s=this.beforeLabelWidth+this.stepperItemContainer.querySelector("."+h).offsetWidth/2),this.progressBarPosition<s&&(this.progressBarPosition=s)}else this.progressBarPosition<(t?this.stepperItemContainer.offsetWidth:this.element.querySelector("ol").lastChild.firstChild.offsetWidth)&&(this.progressBarPosition=t?this.stepperItemContainer.offsetWidth:this.element.querySelector("ol").lastChild.firstChild.offsetWidth)}},t.prototype.checkValidState=function(e,t,i){null==e.isValid?(t.classList.add("e-step-content"),t.innerHTML=i?e.label:e.label?e.label:e.text,this.stepperItemContainer.appendChild(t)):(t.classList.add(d),this.stepperItemContainer.appendChild(t),this.stepperItemContainer.classList.add("e-step-icon"))},t.prototype.updateCurrentLabel=function(){return this.element.classList.contains(C)?"top"===this.labelPosition.toLowerCase()?"before":"bottom"===this.labelPosition.toLowerCase()?"after":this.labelPosition.toLowerCase():"start"===this.labelPosition.toLowerCase()?"before":"end"===this.labelPosition.toLowerCase()?"after":this.labelPosition.toLowerCase()},t.prototype.updateLabelPosition=function(){this.clearLabelPosition(),this.labelContainer.classList.add("e-label-"+this.updateCurrentLabel()),"start"===this.labelPosition.toLowerCase()&&"vertical"===this.orientation.toLowerCase()&&this.stepperItemContainer.firstChild?this.stepperItemContainer.firstChild.before(this.labelContainer):this.stepperItemContainer.appendChild(this.labelContainer),this.element.classList.add("e-label-"+this.updateCurrentLabel())},t.prototype.clearLabelPosition=function(){var e=this.labelContainer.classList.value.match(/(e-label-[after|before]+)/g);e&&(i.i(n.removeClass)([this.labelContainer],e),i.i(n.removeClass)([this.element],e))},t.prototype.checkValidStep=function(){for(var e=0;e<this.steps.length;e++){var t=this.steps[parseInt(e.toString(),10)],i=this.stepperItemElements[parseInt(e.toString(),10)];if(null!==t.isValid){var s=void 0,n=void 0;this.element.classList.contains(x)&&!t.iconCss?s=i.querySelector("."+d):n=i.querySelector("."+d);var r=i.querySelector(".e-step-validation-icon"),o=t.iconCss.trim().split(" "),a=i.classList.contains("e-step-valid");if(s&&s.classList.add("e-icons",a?"e-check":"e-circle-info"),n){for(var l=0;l<o.length;l++)n.classList.remove(o[parseInt(l.toString(),10)]);n.classList.add("e-icons",a?"e-check":"e-circle-info")}if(r&&(r.classList.add(a?"e-circle-check":"e-circle-info"),this.element.classList.contains("e-vertical"))){var h=i.querySelector(".e-label"),c=i.querySelector(".e-text"),p=c?c.offsetWidth+c.getBoundingClientRect().left:h.offsetWidth+h.getBoundingClientRect().left;i.querySelector(".e-step-validation-icon").style.setProperty("--icon-position",p+20+"px")}}}},t.prototype.updateTooltip=function(){this.showTooltip?(this.tooltipObj=new o.Tooltip({target:".e-step-container",windowCollision:!0,opensOn:"Custom",cssClass:this.cssClass?"e-stepper-tooltip "+this.cssClass:"e-stepper-tooltip",position:"TopCenter"}),this.tooltipObj.appendTo(this.stepperItemList)):i.i(n.isNullOrUndefined)(this.tooltipObj)||(this.tooltipObj.destroy(),this.tooltipObj=null)},t.prototype.wireItemsEvents=function(e,t){var i=this;n.EventHandler.add(e,"click",function(s){if(i.linear){var n=t-i.activeStep;1===Math.abs(n)&&i.stepClickHandler(t,s,e)}else i.stepClickHandler(t,s,e)},this),n.EventHandler.add(e,"mouseover",function(){return i.openStepperTooltip(t)},this),n.EventHandler.add(e,"mouseleave",function(){return i.closeStepperTooltip()},this)},t.prototype.openStepperTooltip=function(e){var t=this.steps[parseInt(e.toString(),10)];if(this.showTooltip&&(t.label||t.text)&&!this.tooltipOpen){if(this.updateTooltipContent(e),this.tooltipObj.open(this.stepperItemElements[parseInt(e.toString(),10)]),"label"!==this.stepType.toLocaleLowerCase()&&("indicator"===this.stepType.toLocaleLowerCase()||""!==t.label&&""!==t.iconCss)){var i="inprogress"===t.status.toLowerCase()?"e-stepper-tooltip e-step-inprogress-tip "+(this.cssClass?this.cssClass:""):"e-stepper-tooltip "+(this.cssClass?this.cssClass:"");this.tooltipObj.setProperties({cssClass:i.trim()})}this.tooltipOpen=!0}},t.prototype.closeStepperTooltip=function(){this.tooltipOpen&&(this.tooltipObj.close(),this.tooltipOpen=!1)},t.prototype.updateTooltipContent=function(e){if(this.showTooltip){this.isReact&&this.clearTemplate(["stepperTooltipTemplate"]);var t=void 0,s=this.steps[parseInt(e.toString(),10)];if(this.tooltipTemplate){t=this.createElement("span",{className:"e-stepper-tooltip-content"});var r=this.getTemplateFunction(this.tooltipTemplate);i.i(n.append)(r({value:s},this,"stepperTooltipTemplate",this.element.id+"tooltipTemplate",this.isStringTemplate),t),this.tooltipObj.setProperties({content:t},!0)}else{var o=s.label?s.label:s.text;this.tooltipObj.setProperties({content:i.i(n.initializeCSPTemplate)(function(){return o})},!0)}this.renderReactTemplates()}},t.prototype.stepClickHandler=function(e,t,i){var s={element:i,event:t,previousStep:this.activeStep,activeStep:e};this.trigger("stepClick",s),this.navigateToStep(e,t,i,!0)},t.prototype.updateTemplateFunction=function(){this.templateFunction=this.template?this.getTemplateFunction(this.template):null},t.prototype.renderItemContent=function(e,t){var s=this.stepperItemList.querySelectorAll("li");if(t&&this.removeItemContent(s[parseInt(e.toString(),10)]),this.template){t?s[parseInt(e.toString(),10)].classList.add("e-step-template"):this.stepperItemContainer.classList.add("e-step-template");var r=this.steps[parseInt(e.toString(),10)];i.i(n.append)(this.templateFunction({step:r,currentStep:e},this,"stepperTemplate",this.element.id+"_stepperTemplate",this.isStringTemplate),t?s[parseInt(e.toString(),10)]:this.stepperItemContainer)}this.renderReactTemplates()},t.prototype.removeItemContent=function(e){e.classList.remove("e-step-template");for(var t=e.firstElementChild,i=0;i<e.childElementCount;i++)t.remove()},t.prototype.updateContent=function(){this.isReact&&this.clearTemplate(["stepperTemplate"]);for(var e=0;e<this.steps.length;e++)this.renderItemContent(e,!0)},t.prototype.getTemplateFunction=function(e){if("string"==typeof e){var t="";try{var s=i.i(n.select)(e);t=s?"SCRIPT"===s.tagName?s.innerHTML:s.outerHTML:e}catch(i){t=e}return i.i(n.compile)(t)}return i.i(n.compile)(e)},t.prototype.navigateToStep=function(e,t,i,s,n){var r=this,o={element:i,event:t,isInteracted:s,previousStep:this.activeStep,activeStep:e,cancel:!1};if(0!=n){var a=this.activeStep;this.trigger("stepChanging",o,function(n){if(!n.cancel){r.navigationHandler(e);var o={element:i,event:t,isInteracted:s,previousStep:a,activeStep:r.activeStep};r.trigger("stepChanged",o)}})}else this.navigationHandler(e)},t.prototype.navigationHandler=function(e,t,s){e=e>=this.steps.length-1?this.steps.length-1:e;var o=this.stepperItemElements.length;e>=0&&e<o-1&&(e=this.stepperItemElements[parseInt(e.toString(),10)].classList.contains(v)?this.activeStep:e);var a=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.activeStep=parseInt(e.toString(),10),this.isProtectedOnChange=a;for(var l=0;l<this.steps.length;l++){var h=this.stepperItemElements[parseInt(l.toString(),10)],f=this.steps[parseInt(l.toString(),10)];if(h.classList.remove(c,p,m,u),l===this.activeStep&&h.classList.add(c),this.activeStep>=0&&this.progressbar)if(this.element.classList.contains(C))if((this.element.classList.contains(b)||this.element.classList.contains("e-label-after"))&&!this.element.classList.contains(x)&&this.stepperItemElements[parseInt(this.activeStep.toString(),10)].classList.contains("e-step-icon")){var g=this.element.querySelector(".e-stepper-progressbar"),S=this.stepperItemElements[parseInt(this.activeStep.toString(),10)].firstChild,I=0===this.activeStep?0:(S.offsetLeft-g.offsetLeft+S.offsetWidth/2)/g.offsetWidth*100;this.element.classList.contains(y)?(I=(g.getBoundingClientRect().right-S.getBoundingClientRect().right+S.offsetWidth/2)/g.offsetWidth*100,this.progressbar.style.setProperty("--progress-value",I+"%")):this.progressbar.style.setProperty("--progress-value",I+"%")}else{for(var E=0,N=0,w=0;w<this.stepperItemElements.length;w++)E+=this.stepperItemElements[parseInt(w.toString(),10)].offsetWidth,w<=this.activeStep&&(w<this.activeStep?N+=this.stepperItemElements[parseInt(w.toString(),10)].offsetWidth:w==this.activeStep&&0!==w&&(N+=this.stepperItemElements[parseInt(w.toString(),10)].offsetWidth/2));var O=(this.stepperItemList.offsetWidth-E)/(this.stepperItemElements.length-1),L=(N+O*this.activeStep)/this.stepperItemList.offsetWidth*100;this.progressbar.style.setProperty("--progress-value",L+"%")}else this.progressbar.style.setProperty("--progress-value",100/(this.steps.length-1)*e+"%");else this.activeStep<0&&this.progressbar&&this.progressbar.style.setProperty("--progress-value","0%");l===this.activeStep?h.classList.add(p):this.activeStep>0&&l<this.activeStep?h.classList.add(m):h.classList.add(u),h.classList.contains(p)?i.i(n.attributes)(h,{tabindex:"0","aria-current":"true"}):i.i(n.attributes)(h,{tabindex:"-1","aria-current":"false"});var k=this.isProtectedOnChange;this.isProtectedOnChange=!0,!1!==s&&(l<this.activeStep||this.steps.length-1===this.activeStep&&"completed"===f.status.toLowerCase()?f.status=r.a.Completed:l===this.activeStep?f.status=r.a.InProgress:l>this.activeStep&&(f.status=r.a.NotStarted),t&&this.activeStep===l&&(f.status=t),"completed"===f.status.toLowerCase()&&(h.classList.remove(c,p,u),h.classList.add(m)),"notstarted"===f.status.toLowerCase()&&(h.classList.remove(c,p,m),h.classList.add(u))),this.isProtectedOnChange=k,this.renderDefault(l)&&this.element.classList.contains(x)&&(h.classList.contains(m)?(h.firstChild.classList.remove("e-icons","e-step-indicator"),h.firstChild.classList.add(d,"e-icons","e-check")):(h.classList.contains(p)||h.classList.contains(u))&&(h.firstChild.classList.remove(d,"e-icons","e-check"),h.firstChild.classList.add("e-icons","e-step-indicator")))}},t.prototype.removeItemElements=function(){for(var e=0;e<this.stepperItemElements.length;e++)i.i(n.remove)(this.stepperItemElements[parseInt(e.toString(),10)]);this.stepperItemElements=[]},t.prototype.nextStep=function(){this.activeStep!==this.steps.length-1&&this.navigateToStep(this.activeStep+1,null,null,!1)},t.prototype.previousStep=function(){this.activeStep>0&&this.navigateToStep(this.activeStep-1,null,null,!1)},t.prototype.reset=function(){if(0!==this.activeStep){var e=!!this.stepperItemElements[0].classList.contains(v);this.navigateToStep(e?-1:0,null,null,!1)}},t.prototype.updateElementClassArray=function(){var e=[y,g,"e-steps-focus","e-label-after",b,"e-label-top","e-label-bottom","e-label-start","e-label-end",x,S,"e-vertical",C];i.i(n.removeClass)([this.element],e)},t.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),n.EventHandler.remove(window,"resize",function(){t.stepperItemList&&t.progressbar&&t.setProgressPosition(t.element,!0)}),n.EventHandler.remove(window,"click",function(){t.updateStepFocus()}),this.removeItemElements(),this.clearTemplate(),this.stepperItemList&&i.i(n.remove)(this.stepperItemList),this.stepperItemList=null,this.progressStep&&i.i(n.remove)(this.progressStep),this.progressStep=null,this.progressbar=null,this.progressBarPosition=null,this.stepperItemContainer=null,this.textContainer=null,this.labelContainer=null,this.updateElementClassArray(),this.element.removeAttribute("aria-label"),this.showTooltip&&(this.tooltipObj.destroy(),this.tooltipObj=null),this.keyboardModuleStepper&&this.keyboardModuleStepper.destroy(),this.keyboardModuleStepper=null},t.prototype.wireKeyboardEvent=function(){this.keyboardModuleStepper=new n.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},t.prototype.keyActionHandler=function(e){if(!this.readOnly)switch(e.action){case"uparrow":case"downarrow":case"leftarrow":case"rightarrow":case"tab":case"shiftTab":this.handleNavigation(this.enableRtl&&this.element.classList.contains(C)?"leftarrow"===e.action||"tab"===e.action||"uparrow"===e.action:"rightarrow"===e.action||"tab"===e.action||"downarrow"===e.action,e);break;case"space":case"enter":case"escape":this.handleNavigation(null,e);break;case"home":case"end":this.handleNavigation(null,e,this.enableRtl)}},t.prototype.handleNavigation=function(e,t,i){this.isKeyNavFocus=!0,this.element.classList.add("e-steps-focus");var s=this.element.querySelector("."+f);s||(s=this.element.querySelector("."+c));var n=Array.prototype.slice.call(this.stepperItemList.children),r=n.indexOf(s);if("tab"===t.action||"shiftTab"===t.action||"downarrow"===t.action||"uparrow"===t.action||"space"===t.action||"home"===t.action||"end"===t.action)if("tab"===t.action&&r===n.length-1||"shiftTab"===t.action&&0===r){if(s.classList.contains(f))return void this.updateStepFocus()}else t.preventDefault();if("escape"===t.action&&(n[parseInt(r.toString(),10)].classList.remove(f),this.element.classList.remove("e-steps-focus")),"space"!==t.action&&"enter"!==t.action){var o=r;for(r=e?r+1:r-1;r>=0&&r<n.length&&n[parseInt(r.toString(),10)].classList.contains(v);)r=e?r+1:r-1;r=r<0?0:r>n.length-1?n.length-1:r,n[parseInt(o.toString(),10)].classList.contains(f)&&n[parseInt(o.toString(),10)].classList.remove(f),"home"!==t.action&&"end"!==t.action||(r="home"===t.action?i?n.length-1:0:i?0:n.length-1),r>=0&&r<n.length&&n[parseInt(r.toString(),10)].classList.add(f)}else if("space"===t.action||"enter"===t.action){var a=!1;if(this.linear){var l=this.activeStep-r;1===Math.abs(l)&&(this.navigateToStep(r,null,null,!0),a=!0)}else this.navigateToStep(r,null,null,!0),a=!0;a&&(this.updateStepFocus(),this.stepperItemElements[r].focus())}},t.prototype.renderStepperItems=function(e,t){this.updateElementClassArray(),this.removeItemElements(),this.element.querySelector(".e-stepper-progressbar").remove(),e&&this.updatePosition(),t&&this.updateStepType(),this.readOnly&&(this.element.classList.contains(g)||this.element.classList.add(g)),this.enableRtl&&(this.element.classList.contains(y)||this.element.classList.add(y)),this.updateOrientaion(this.element),this.renderItems(),this.renderProgressBar(this.element),this.checkValidStep(),this.updateAnimation(),this.navigateToStep(this.activeStep,null,this.stepperItemElements[this.activeStep],!0)},t.prototype.onPropertyChanged=function(e,t){for(var s=0,r=Object.keys(e);s<r.length;s++){switch(r[s]){case"steps":if(e.steps instanceof Array&&t.steps instanceof Array)this.renderStepperItems(!0,!0);else for(var o=Object.keys(e.steps),a=0;a<o.length;a++)for(var l=parseInt(Object.keys(e.steps)[a],10),d=Object.keys(e.steps[l]).length,h=0;h<d;h++){var c=Object.keys(e.steps[l])[h];"status"===c?this.activeStep===l?this.navigationHandler(l,e.steps[l].status):this.steps[l].status=t.steps[l].status:(this.removeItemElements(),this.renderItems(),this.updateStepperStatus()),this.checkValidStep()}break;case"orientation":this.updateOrientaion(this.element),this.renderStepperItems(!0);break;case"activeStep":if(this.activeStep=e.activeStep>this.steps.length-1||e.activeStep<-1?t.activeStep:this.activeStep,this.activeStep>=0&&this.stepperItemElements[parseInt(this.activeStep.toString(),10)].classList.contains(v)&&(this.activeStep=t.activeStep),this.linear){var p=t.activeStep-this.activeStep;1===Math.abs(p)&&this.navigateToStep(this.activeStep,null,null,!0)}else this.navigateToStep(this.activeStep,null,this.stepperItemElements[this.activeStep],!0);break;case"enableRtl":this.element.classList[this.enableRtl?"add":"remove"](y);break;case"readOnly":this.element.classList[this.readOnly?"add":"remove"](g);break;case"cssClass":t.cssClass&&i.i(n.removeClass)([this.element],t.cssClass.trim().split(" ")),e.cssClass&&i.i(n.addClass)([this.element],e.cssClass.trim().split(" ")),this.tooltipObj&&this.tooltipObj.setProperties({cssClass:this.cssClass?"e-stepper-tooltip "+this.cssClass:"e-stepper-tooltip"});break;case"labelPosition":this.renderStepperItems(!0);break;case"showTooltip":this.updateTooltip();break;case"stepType":this.renderStepperItems(!0,!0);break;case"template":this.updateTemplateFunction(),this.updateContent();break;case"animation":this.updateAnimation()}}},l([i.i(n.Property)(0)],t.prototype,"activeStep",void 0),l([i.i(n.Complex)({},I)],t.prototype,"animation",void 0),l([i.i(n.Property)(!1)],t.prototype,"linear",void 0),l([i.i(n.Property)(!1)],t.prototype,"showTooltip",void 0),l([i.i(n.Property)("")],t.prototype,"template",void 0),l([i.i(n.Property)("")],t.prototype,"tooltipTemplate",void 0),l([i.i(n.Property)(s.Bottom)],t.prototype,"labelPosition",void 0),l([i.i(n.Property)(E.Default)],t.prototype,"stepType",void 0),l([i.i(n.Event)()],t.prototype,"stepChanged",void 0),l([i.i(n.Event)()],t.prototype,"stepChanging",void 0),l([i.i(n.Event)()],t.prototype,"stepClick",void 0),l([i.i(n.Event)()],t.prototype,"beforeStepRender",void 0),t=l([n.NotifyPropertyChanges],t)}(r.b)},function(e,t,i){"use strict";i.d(t,"a",function(){return p}),i.d(t,"b",function(){return u}),i.d(t,"c",function(){return f}),i.d(t,"d",function(){return m}),i.d(t,"e",function(){return v});var s=i(0),n=(i.n(s),i(9)),r=this&&this.__extends||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)}}(),o=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},a="e-tab-header",l="e-tab-wrap",d="e-toolbar-items",h="e-toolbar-item",c="e-toolbar-popup",p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([i.i(s.Property)("SlideLeftIn")],t.prototype,"effect",void 0),o([i.i(s.Property)(600)],t.prototype,"duration",void 0),o([i.i(s.Property)("ease")],t.prototype,"easing",void 0),t}(s.ChildProperty),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([i.i(s.Complex)({effect:"SlideLeftIn",duration:600,easing:"ease"},p)],t.prototype,"previous",void 0),o([i.i(s.Complex)({effect:"SlideRightIn",duration:600,easing:"ease"},p)],t.prototype,"next",void 0),t}(s.ChildProperty),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([i.i(s.Property)("")],t.prototype,"text",void 0),o([i.i(s.Property)("")],t.prototype,"iconCss",void 0),o([i.i(s.Property)("left")],t.prototype,"iconPosition",void 0),t}(s.ChildProperty),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),o([i.i(s.Complex)({},f)],t.prototype,"header",void 0),o([i.i(s.Property)(null)],t.prototype,"headerTemplate",void 0),o([i.i(s.Property)("")],t.prototype,"content",void 0),o([i.i(s.Property)("")],t.prototype,"cssClass",void 0),o([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),o([i.i(s.Property)(!0)],t.prototype,"visible",void 0),o([i.i(s.Property)()],t.prototype,"id",void 0),o([i.i(s.Property)(-1)],t.prototype,"tabIndex",void 0),t}(s.ChildProperty),v=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.show={},s.hide={},s.maxHeight=0,s.title="Close",s.isInteracted=!1,s.lastIndex=0,s.isAdd=!1,s.isIconAlone=!1,s.draggableItems=[],s.resizeContext=s.refreshActiveTabBorder.bind(s),s.keyConfigs={tab:"tab",home:"home",end:"end",enter:"enter",space:"space",delete:"delete",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"},s}return r(t,e),t.prototype.destroy=function(){if((this.isReact||this.isAngular)&&this.clearTemplate(),i.i(s.isNullOrUndefined)(this.tbObj)||(this.tbObj.destroy(),this.tbObj=null),this.unWireEvents(),this.element.removeAttribute("aria-disabled"),this.expTemplateContent(),this.isTemplate){var t=i.i(s.select)(".e-tab > .e-content",this.element);this.element.classList.remove("e-template"),i.i(s.isNullOrUndefined)(t)||(t.innerHTML=this.cnt)}else for(;this.element.firstElementChild;)i.i(s.remove)(this.element.firstElementChild);if(this.btnCls&&(this.btnCls=null),this.hdrEle=null,this.cntEle=null,this.tbItems=null,this.tbItem=null,this.tbPop=null,this.prevItem=null,this.popEle=null,this.bdrLine=null,this.content=null,this.dragItem=null,this.cloneElement=null,this.draggingItems=[],this.draggableItems&&this.draggableItems.length>0){for(var n=0;n<this.draggableItems.length;n++)this.draggableItems[n].destroy(),this.draggableItems[n]=null;this.draggableItems=[]}e.prototype.destroy.call(this),this.trigger("destroyed")},t.prototype.refresh=function(){this.isReact&&this.clearTemplate(),e.prototype.refresh.call(this),this.isReact&&this.renderReactTemplates()},t.prototype.preRender=function(){var e=i.i(s.closest)(this.element,".e-content");this.prevIndex=0,this.isNested=!1,this.isPopup=!1,this.initRender=!0,this.isSwiped=!1,this.itemIndexArray=[],this.templateEle=[],this.allowDragAndDrop&&(this.dragArea=i.i(s.isNullOrUndefined)(this.dragArea)?"#"+this.element.id+" ."+a:this.dragArea),i.i(s.isNullOrUndefined)(e)||(e.parentElement.classList.add("e-nested"),this.isNested=!0);var t=s.Browser.info.name,n="msie"===t?"e-ie":"edge"===t?"e-edge":"safari"===t?"e-safari":"";i.i(s.setStyleAttribute)(this.element,{width:i.i(s.formatUnit)(this.width),height:i.i(s.formatUnit)(this.height)}),this.setCssClass(this.element,this.cssClass,!0),i.i(s.attributes)(this.element,{"aria-disabled":"false"}),this.setCssClass(this.element,n,!0),this.updatePopAnimationConfig()},t.prototype.render=function(){var e=this;this.btnCls=this.createElement("span",{className:"e-icons e-close-icon",attrs:{title:this.title}}),this.tabId=this.element.id.length>0?"-"+this.element.id:i.i(s.getRandomId)(),this.renderContainer(),this.wireEvents(),this.initRender=!1,this.isReact&&this.portals&&this.portals.length>0&&this.renderReactTemplates(function(){i.i(s.isNullOrUndefined)(e.tbObj)||e.tbObj.refreshOverflow(),e.refreshActiveBorder()})},t.prototype.renderContainer=function(){var e=this.element;if(this.items.forEach(function(e,t){i.i(s.isNullOrUndefined)(e.id)&&!i.i(s.isNullOrUndefined)(e.setProperties)&&e.setProperties({id:"tabitem_"+t.toString()},!0)}),this.items.length>0&&0===e.children.length)e.appendChild(this.createElement("div",{className:"e-content"})),this.setOrientation(this.headerPlacement,this.createElement("div",{className:a})),this.isTemplate=!1;else if(this.element.children.length>0){this.isTemplate=!0,e.classList.add("e-template");var t=e.querySelector("."+a);t&&"Bottom"===this.headerPlacement&&this.setOrientation(this.headerPlacement,t)}if(!i.i(s.isNullOrUndefined)(i.i(s.select)("."+a,this.element))&&!i.i(s.isNullOrUndefined)(i.i(s.select)(".e-content",this.element))){if(this.renderHeader(),this.tbItems=i.i(s.select)(".e-tab-header ."+d,this.element),i.i(s.isNullOrUndefined)(this.tbItems)||i.i(s.rippleEffect)(this.tbItems,{selector:".e-tab-wrap"}),this.renderContent(),i.i(s.selectAll)("."+h,this.element).length>0){this.tbItems=i.i(s.select)(".e-tab-header ."+d,this.element),this.bdrLine=this.createElement("div",{className:"e-indicator e-hidden e-ignore"});var n=i.i(s.select)("."+this.scrCntClass,this.tbItems);i.i(s.isNullOrUndefined)(n)?this.tbItems.insertBefore(this.bdrLine,this.tbItems.firstChild):n.insertBefore(this.bdrLine,n.firstChild),this.setContentHeight(!0),this.select(this.selectedItem)}this.setRTL(this.enableRtl)}},t.prototype.renderHeader=function(){var e=this,t=this.headerPlacement,r=[];if(this.hdrEle=this.getTabHeader(),this.addVerticalClass(),this.isTemplate){this.element.children.length>1&&this.element.children[1].classList.contains(a)&&this.setProperties({headerPlacement:"Bottom"},!0);for(var o=this.hdrEle.children.length,h=[],c=0;c<o;c++)h.push(this.hdrEle.children.item(c));if(o>0){var p=this.createElement("div",{className:"e-items"});this.hdrEle.appendChild(p),h.forEach(function(t,n){e.lastIndex=n;var r={className:"e-item",id:"e-item"+e.tabId+"_"+n},o=e.createElement("span",{className:"e-tab-text",attrs:{role:"presentation"}}).outerHTML,a=e.createElement("div",{className:"e-text-wrap",innerHTML:o+e.btnCls.outerHTML}).outerHTML,d=e.createElement("div",{className:l,innerHTML:a,attrs:{role:"tab",tabIndex:"-1","aria-selected":"false","aria-controls":"e-content"+e.tabId+"_"+n,"aria-disabled":"false"}});d.querySelector(".e-tab-text").appendChild(t),p.appendChild(e.createElement("div",r)),i.i(s.selectAll)(".e-item",p)[n].appendChild(d)})}}else r=this.parseObject(this.items,0);this.tbObj=new n.a({width:"Left"===t||"Right"===t?"auto":"100%",height:"Left"===t||"Right"===t?"100%":"auto",overflowMode:this.overflowMode,items:0!==r.length?r:[],clicked:this.clickHandler.bind(this),scrollStep:this.scrollStep,enableHtmlSanitizer:this.enableHtmlSanitizer,cssClass:this.cssClass}),this.tbObj.isStringTemplate=!0,this.tbObj.createElement=this.createElement,this.tbObj.appendTo(this.hdrEle),i.i(s.attributes)(this.hdrEle,{role:"tablist"}),i.i(s.isNullOrUndefined)(this.element.getAttribute("aria-label"))?i.i(s.isNullOrUndefined)(this.element.getAttribute("aria-labelledby"))||(this.hdrEle.setAttribute("aria-labelledby",this.element.getAttribute("aria-labelledby")),this.element.removeAttribute("aria-labelledby")):(this.hdrEle.setAttribute("aria-label",this.element.getAttribute("aria-label")),this.element.removeAttribute("aria-label")),this.setCloseButton(this.showCloseButton);var u=this.tbObj.element.querySelector("."+d);i.i(s.isNullOrUndefined)(u)||(i.i(s.isNullOrUndefined)(u.id)||""===u.id)&&(u.id=this.element.id+"_tab_header_items")},t.prototype.renderContent=function(){this.cntEle=i.i(s.select)(".e-content",this.element);var e=i.i(s.selectAll)("."+h,this.element);if(this.isTemplate){this.cnt=this.cntEle.children.length>0?this.cntEle.innerHTML:"";for(var t=this.cntEle.children,n=0;n<e.length;n++)t.length-1>=n&&(i.i(s.addClass)([t.item(n)],"e-item"),i.i(s.attributes)(t.item(n),{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_"+n}),t.item(n).id="e-content"+this.tabId+"_"+n)}},t.prototype.reRenderItems=function(){this.renderContainer(),i.i(s.isNullOrUndefined)(this.cntEle)||(this.touchModule=new s.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)}))},t.prototype.parseObject=function(e,t){var n=this,r=Array.prototype.slice.call(i.i(s.selectAll)(".e-tab-header ."+h,this.element)),o=this.lastIndex;if(!this.isReplace&&r.length>0){var a=[];r.forEach(function(e){a.push(n.getIndexFromEle(e.id))}),o=Math.max.apply(Math,a)}var d,c=[],p=[];return e.forEach(function(e,a){var h=i.i(s.isNullOrUndefined)(e.header)||i.i(s.isNullOrUndefined)(e.header.iconPosition)?"":e.header.iconPosition,u=i.i(s.isNullOrUndefined)(e.header)||i.i(s.isNullOrUndefined)(e.header.iconCss)?"":e.header.iconCss;if(i.i(s.isNullOrUndefined)(e.headerTemplate)&&(i.i(s.isNullOrUndefined)(e.header)||i.i(s.isNullOrUndefined)(e.header.text)||0===e.header.text.length&&""===u))return void p.push(a);var f=e.headerTemplate||e.header.text;"string"==typeof f&&n.enableHtmlSanitizer&&(f=s.SanitizeHtmlHelper.sanitize(f));var m;n.isReplace&&!i.i(s.isNullOrUndefined)(n.tbId)&&""!==n.tbId?(m=parseInt(n.tbId.substring(n.tbId.lastIndexOf("_")+1),10),n.tbId=""):m=t+a,n.lastIndex=0===r.length?a:n.isReplace?m:o+1+a;var v=e.disabled?" e-disable e-overlay":"",g=!1===e.visible?" e-hidden":"";d=n.createElement("div",{className:"e-tab-text",attrs:{role:"presentation"}});var y=f instanceof Object?f.outerHTML:f,b=!i.i(s.isNullOrUndefined)(y)&&""!==y;i.i(s.isNullOrUndefined)(f.tagName)?n.headerTextCompile(d,f,a):d.appendChild(f);var C=n.createElement("span",{className:"e-icons e-tab-icon e-icon-"+h+" "+u}),x=n.createElement("div",{className:"e-text-wrap"});x.appendChild(d),""!==f&&void 0!==f&&""!==u?("left"===h||"top"===h?x.insertBefore(C,x.firstElementChild):x.appendChild(C),d,n.isIconAlone=!1):(""===u?d:C)===C&&(i.i(s.detach)(d),x.appendChild(C),n.isIconAlone=!0);var S=i.i(s.isNullOrUndefined)(e.tabIndex)?"-1":e.tabIndex.toString(),I=e.disabled?{}:{tabIndex:S,"data-tabindex":S,role:"tab","aria-selected":"false","aria-disabled":"false"};x.appendChild(n.btnCls.cloneNode(!0));var E=n.createElement("div",{className:l,attrs:I});E.appendChild(x),n.itemIndexArray instanceof Array&&n.itemIndexArray.splice(t+a,0,"e-item"+n.tabId+"_"+n.lastIndex);var N={id:"e-item"+n.tabId+"_"+n.lastIndex,"data-id":e.id},w={htmlAttributes:N,template:E};w.cssClass=(void 0!==e.cssClass?e.cssClass:" ")+" "+v+" "+g+" "+(""!==u?"e-i"+h:"")+" "+(b?"":"e-icon"),"top"!==h&&"bottom"!==h||n.element.classList.add("e-vertical-icon"),c.push(w),a++}),this.isAdd||p.forEach(function(e){n.items.splice(e,1)}),this.isIconAlone?this.element.classList.add("e-icon-tab"):this.element.classList.remove("e-icon-tab"),c},t.prototype.removeActiveClass=function(){var e=this.getTabHeader();if(e){var t=i.i(s.selectAll)(".e-toolbar-item.e-active",e);[].slice.call(t).forEach(function(e){return e.classList.remove("e-active")}),[].slice.call(t).forEach(function(e){return e.firstElementChild.setAttribute("aria-selected","false")})}},t.prototype.checkPopupOverflow=function(e){this.tbPop=i.i(s.select)(".e-toolbar-pop",this.element);var t=i.i(s.select)(".e-hor-nav",this.element),n=i.i(s.select)("."+d,this.element),r=n.lastChild,o=!1;return!this.isVertical()&&(this.enableRtl&&t.offsetLeft+t.offsetWidth>n.offsetLeft||!this.enableRtl&&t.offsetLeft<n.offsetWidth)?o=!0:this.isVertical()&&t.offsetTop<r.offsetTop+r.offsetHeight&&(o=!0),o&&(e.classList.add(c),this.tbPop.insertBefore(e,i.i(s.selectAll)("."+c,this.tbPop)[0])),!0},t.prototype.popupHandler=function(e){var t=e.querySelector(".e-ripple-element");i.i(s.isNullOrUndefined)(t)||(t.outerHTML="",e.querySelector("."+l).classList.remove("e-ripple")),this.tbItem=i.i(s.selectAll)(".e-toolbar-items ."+h,this.hdrEle);var n=this.tbItem[this.tbItem.length-1];if(0!==this.tbItem.length){if(e.classList.remove(c),e.removeAttribute("style"),this.tbItems.appendChild(e),this.actEleId=e.id,this.checkPopupOverflow(n)){var r=this.tbItems.lastChild.previousElementSibling;this.checkPopupOverflow(r)}this.isPopup=!0}return i.i(s.selectAll)("."+h,this.tbItems).length-1},t.prototype.setCloseButton=function(e){var t=i.i(s.select)("."+a,this.element);!0===e?t.classList.add("e-close-show"):t.classList.remove("e-close-show"),this.tbObj.refreshOverflow(),this.refreshActiveTabBorder()},t.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},t.prototype.triggerPrevAnimation=function(e,t){var n=this,r=this.prevCtnAnimation(t,this.selectedItem);i.i(s.isNullOrUndefined)(r)?e.classList.remove("e-active"):(r.begin=function(){i.i(s.setStyleAttribute)(e,{position:"absolute"}),e.classList.add("e-progress"),e.classList.add("e-view")},r.end=function(){e.style.display="none",e.classList.remove("e-active"),e.classList.remove("e-progress"),e.classList.remove("e-view"),i.i(s.setStyleAttribute)(e,{display:"",position:""}),0!==e.childNodes.length||n.isTemplate||i.i(s.detach)(e)},new s.Animation(r).animate(e))},t.prototype.triggerAnimation=function(e,t){var n,r=this,o=this.prevIndex;[].slice.call(this.element.querySelector(".e-content").children).forEach(function(e){e.id===r.prevActiveEle&&(n=e)});var a=this.tbItem[o],l=this.getTrgContent(this.cntEle,this.extIndex(e));if(i.i(s.isNullOrUndefined)(n)&&!i.i(s.isNullOrUndefined)(a)){var d=this.extIndex(a.id);n=this.getTrgContent(this.cntEle,d)}i.i(s.isNullOrUndefined)(l)||(this.prevActiveEle=l.id);var h=i.i(s.isNullOrUndefined)(this.animation)||i.i(s.isNullOrUndefined)(this.animation.next.effect)||i.i(s.isNullOrUndefined)(this.animation.previous.effect)||"None"===this.animation.previous.effect||"None"===this.animation.next.effect;if(this.initRender||!1===t||h)return void(n&&n!==l&&n.classList.remove("e-active"));var c,p=i.i(s.select)(".e-content",this.element);if(this.prevIndex>this.selectedItem&&!this.isPopup){var u=this.animation.previous.effect;c={name:"None"===u?"":"SlideLeftIn"!==u?u:"SlideLeftIn",duration:0===this.animation.previous.duration&&"Enable"===s.animationMode?600:this.animation.previous.duration,timingFunction:this.animation.previous.easing}}else if(this.isPopup||this.prevIndex<this.selectedItem||this.prevIndex===this.selectedItem){var f=this.animation.next.effect;c={name:"None"===f?"":"SlideRightIn"!==f?f:"SlideRightIn",duration:0===this.animation.next.duration&&"Enable"===s.animationMode?600:this.animation.next.duration,timingFunction:this.animation.next.easing}}c.progress=function(){p.classList.add("e-progress"),r.setActiveBorder()},c.end=function(){p.classList.remove("e-progress"),l.classList.add("e-active")},this.initRender||i.i(s.isNullOrUndefined)(n)||this.triggerPrevAnimation(n,o),this.isPopup=!1,""===c.name?l.classList.add("e-active"):new s.Animation(c).animate(l)},t.prototype.keyPressed=function(e){var t=i.i(s.closest)(e,".e-tab-header ."+h),n=this.getEleIndex(t);!i.i(s.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():i.i(s.isNullOrUndefined)(t)||!1!==t.classList.contains("e-active")||(this.selectTab(n,null,!0),i.i(s.isNullOrUndefined)(this.popEle)||this.popObj.hide(this.hide))},t.prototype.getTabHeader=function(){if(!i.i(s.isNullOrUndefined)(this.element)){var e=[].slice.call(this.element.children).filter(function(e){return e.classList.contains(a)});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(a)})[0]}},t.prototype.getEleIndex=function(e){return Array.prototype.indexOf.call(i.i(s.selectAll)("."+h,this.getTabHeader()),e)},t.prototype.extIndex=function(e){return e.replace("e-item"+this.tabId+"_","")},t.prototype.expTemplateContent=function(){var e=this;this.templateEle.forEach(function(t){i.i(s.isNullOrUndefined)(e.element.querySelector(t))||(document.body.appendChild(e.element.querySelector(t)).style.display="none")})},t.prototype.templateCompile=function(e,t,i){var s=this.createElement("div");this.compileElement(s,t,"content",i),0!==s.childNodes.length&&e.appendChild(s),this.isReact&&this.renderReactTemplates()},t.prototype.compileElement=function(e,t,n,r){var o;"string"==typeof t?(t=t.trim(),this.isVue?o=i.i(s.compile)(this.enableHtmlSanitizer?s.SanitizeHtmlHelper.sanitize(t):t):e.innerHTML=this.enableHtmlSanitizer?s.SanitizeHtmlHelper.sanitize(t):t):o=i.i(s.compile)(t);var a;i.i(s.isNullOrUndefined)(o)||(a=o({},this,n)),!i.i(s.isNullOrUndefined)(o)&&a.length>0&&[].slice.call(a).forEach(function(t){e.appendChild(t)})},t.prototype.headerTextCompile=function(e,t,i){this.compileElement(e,t,"headerTemplate",i)},t.prototype.getContent=function(e,t,n,r){var o;if("string"==typeof(t=i.i(s.isNullOrUndefined)(t)?"":t)||i.i(s.isNullOrUndefined)(t.innerHTML))if("string"==typeof t&&this.enableHtmlSanitizer&&(t=s.SanitizeHtmlHelper.sanitize(t)),"."===t[0]||"#"===t[0])if(document.querySelectorAll(t).length){var a=document.querySelector(t);o=a.outerHTML.trim(),"clone"===n?e.appendChild(a.cloneNode(!0)):(e.appendChild(a),a.style.display="")}else this.templateCompile(e,t,r);else this.templateCompile(e,t,r);else e.appendChild(t);i.i(s.isNullOrUndefined)(o)||-1===this.templateEle.indexOf(t.toString())&&this.templateEle.push(t.toString())},t.prototype.getTrgContent=function(e,t){return this.element.classList.contains("e-nested")?i.i(s.select)(".e-nested> .e-content > #e-content"+this.tabId+"_"+t,this.element):this.findEle(e.children,"e-content"+this.tabId+"_"+t)},t.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},t.prototype.isVertical=function(){var e="Left"===this.headerPlacement||"Right"===this.headerPlacement;return this.scrCntClass=e?"e-vscroll-content":"e-hscroll-content",e},t.prototype.addVerticalClass=function(){if(this.isVertical()){var e="Left"===this.headerPlacement?"e-vertical-left":"e-vertical-right";i.i(s.addClass)([this.hdrEle],["e-vertical",e]),this.element.classList.contains("e-nested")?i.i(s.addClass)([this.hdrEle],["e-vertical-tab",e]):i.i(s.addClass)([this.element],["e-vertical-tab",e])}"Bottom"===this.headerPlacement&&i.i(s.addClass)([this.hdrEle],["e-horizontal-bottom"])},t.prototype.updatePopAnimationConfig=function(){this.show={name:this.isVertical()?"FadeIn":"SlideDown",duration:100},this.hide={name:this.isVertical()?"FadeOut":"SlideUp",duration:100}},t.prototype.changeOrientation=function(e){this.setOrientation(e,this.hdrEle);var t=this.hdrEle.querySelector(".e-active"),n=!!this.hdrEle.classList.contains("e-vertical");i.i(s.removeClass)([this.element],["e-vertical-tab"]),i.i(s.removeClass)([this.hdrEle],["e-vertical","e-vertical-left","e-vertical-right"]),n!==this.isVertical()&&(this.changeToolbarOrientation(),!i.i(s.isNullOrUndefined)(t)&&t.classList.contains(c)&&this.popupHandler(t)),this.addVerticalClass(),this.setActiveBorder(),this.focusItem()},t.prototype.focusItem=function(){var e=i.i(s.select)(" #e-item"+this.tabId+"_"+this.selectedItem,this.hdrEle);i.i(s.isNullOrUndefined)(e)||e.firstElementChild.focus()},t.prototype.changeToolbarOrientation=function(){this.tbObj.setProperties({height:this.isVertical()?"100%":"auto",width:this.isVertical()?"auto":"100%"},!0),this.tbObj.changeOrientation(),this.updatePopAnimationConfig()},t.prototype.setOrientation=function(e,t){var n=Array.prototype.indexOf.call(this.element.children,t),r=Array.prototype.indexOf.call(this.element.children,this.element.querySelector(".e-content"));"Bottom"===e&&r>n?this.element.appendChild(t):(i.i(s.removeClass)([t],["e-horizontal-bottom"]),this.element.insertBefore(t,i.i(s.select)(".e-content",this.element)))},t.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])},t.prototype.setContentHeight=function(e){if(this.element.classList.contains("e-fill-mode")&&i.i(s.removeClass)([this.element],["e-fill-mode"]),!i.i(s.isNullOrUndefined)(this.cntEle)){var t=this.getTabHeader();if("None"===this.heightAdjustMode){if("auto"===this.height)return;this.isVertical()||i.i(s.setStyleAttribute)(this.cntEle,{height:this.element.clientHeight-t.offsetHeight+"px"})}else if("Fill"===this.heightAdjustMode)i.i(s.addClass)([this.element],["e-fill-mode"]),i.i(s.setStyleAttribute)(this.element,{height:"100%"}),this.cntEle.style.height="calc(100% - "+this.hdrEle.offsetHeight+"px)";else if("Auto"===this.heightAdjustMode){if(!0===this.isTemplate)for(var n=i.i(s.selectAll)(".e-content > .e-item",this.element),r=0;r<n.length;r++)n[r].setAttribute("style","display:block; visibility: visible"),this.maxHeight=Math.max(this.maxHeight,this.getHeight(n[r])),n[r].style.removeProperty("display"),n[r].style.removeProperty("visibility");else{this.cntEle=i.i(s.select)(".e-content",this.element),!0===e&&this.cntEle.appendChild(this.createElement("div",{id:"e-content"+this.tabId+"_0",className:"e-item e-active",attrs:{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_0"}}));for(var o=this.cntEle.children.item(0),r=0;r<this.items.length;r++)for(this.getContent(o,this.items[r].content,"clone",r),this.maxHeight=Math.max(this.maxHeight,this.getHeight(o));o.firstChild;)o.removeChild(o.firstChild);(this.isReact||this.isAngular||this.isVue)&&this.clearTemplate(["content"]),this.templateEle=[],this.getContent(o,this.items[0].content,"render",0),this.prevIndex!==this.selectedItem&&o.classList.remove("e-active")}i.i(s.setStyleAttribute)(this.cntEle,{height:this.maxHeight+"px"})}else i.i(s.setStyleAttribute)(this.cntEle,{height:"auto"})}},t.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"))},t.prototype.setActiveBorder=function(){var e=this.getTabHeader(),t=i.i(s.select)(".e-toolbar-item.e-active",e);if(!i.i(s.isNullOrUndefined)(t)){this.reorderActiveTab?e&&e.classList.remove("e-reorder-active-item"):(t.classList.contains(c)&&!this.bdrLine.classList.contains("e-hidden")&&this.bdrLine.classList.add("e-hidden"),e&&!e.classList.contains("e-reorder-active-item")&&e.classList.add("e-reorder-active-item"));var n=i.i(s.closest)(t,".e-tab");if(this.element===n){this.tbItems=i.i(s.select)("."+d,e);var r=i.i(s.select)(".e-indicator",e),o=i.i(s.select)(".e-toolbar-items ."+this.scrCntClass,e);if(this.isVertical()){i.i(s.setStyleAttribute)(r,{left:"",right:""});0!==(i.i(s.isNullOrUndefined)(o)?this.tbItems.offsetHeight:o.offsetHeight)?i.i(s.setStyleAttribute)(r,{top:t.offsetTop+"px",height:t.offsetHeight+"px"}):i.i(s.setStyleAttribute)(r,{top:0,height:0})}else{if("MultiRow"===this.overflowMode){var a="Bottom"===this.headerPlacement?t.offsetTop:t.offsetHeight+t.offsetTop;i.i(s.setStyleAttribute)(r,{top:a+"px",height:""})}else i.i(s.setStyleAttribute)(r,{top:"",height:""});var l=i.i(s.isNullOrUndefined)(o)?this.tbItems.offsetWidth:o.offsetWidth;0!==l?i.i(s.setStyleAttribute)(r,{left:t.offsetLeft+"px",right:l-(t.offsetLeft+t.offsetWidth)+"px"}):i.i(s.setStyleAttribute)(r,{left:"auto",right:"auto"})}i.i(s.isNullOrUndefined)(this.bdrLine)||t.classList.contains(c)||this.bdrLine.classList.remove("e-hidden")}}},t.prototype.setActive=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this.tbItem=i.i(s.selectAll)("."+h,this.getTabHeader());var r=this.tbItem[e];if(!(e<0||isNaN(e)||0===this.tbItem.length||!i.i(s.isNullOrUndefined)(r)&&r.classList.contains("e-disable"))){if(e>=0&&!t&&(this.allowServerDataBinding=!1,this.setProperties({selectedItem:e},!0),this.allowServerDataBinding=!0,this.initRender||this.serverDataBind()),r.classList.contains("e-active"))return void this.setActiveBorder();this.isTemplate||i.i(s.attributes)(r.firstElementChild,{"aria-controls":"e-content"+this.tabId+"_"+e});var o=r.id;this.removeActiveClass(),r.classList.add("e-active"),r.firstElementChild.setAttribute("aria-selected","true");var a=Number(this.extIndex(o));if(i.i(s.isNullOrUndefined)(this.prevActiveEle)&&(this.prevActiveEle="e-content"+this.tabId+"_"+a),this.isTemplate){if(i.i(s.select)(".e-content",this.element).children.length>0){var l=this.findEle(i.i(s.select)(".e-content",this.element).children,"e-content"+this.tabId+"_"+a);i.i(s.isNullOrUndefined)(l)||l.classList.add("e-active"),this.triggerAnimation(o,this.enableAnimation)}}else{this.cntEle=i.i(s.select)(".e-tab > .e-content",this.element);var d=this.getTrgContent(this.cntEle,this.extIndex(o));if(i.i(s.isNullOrUndefined)(d)){this.cntEle.appendChild(this.createElement("div",{id:"e-content"+this.tabId+"_"+this.extIndex(o),className:"e-item e-active",attrs:{role:"tabpanel","aria-labelledby":"e-item"+this.tabId+"_"+this.extIndex(o)}}));var c=this.getTrgContent(this.cntEle,this.extIndex(o)),p=Array.prototype.indexOf.call(this.itemIndexArray,o);this.getContent(c,this.items[p].content,"render",p)}else d.classList.add("e-active");this.triggerAnimation(o,this.enableAnimation)}if(this.setActiveBorder(),this.refreshItemVisibility(r),!this.initRender&&!t){var u={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:r,selectedIndex:e,selectedContent:i.i(s.select)("#e-content"+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwiped,isInteracted:n,preventFocus:!1};this.trigger("selected",u,function(e){e.preventFocus||r.firstElementChild.focus()})}}},t.prototype.setItems=function(e){this.isReplace=!0,this.tbItems=i.i(s.select)("."+d,this.getTabHeader()),this.tbObj.items=this.parseObject(e,0),this.tbObj.dataBind(),this.isReplace=!1},t.prototype.setRTL=function(e){this.tbObj.enableRtl=e,this.tbObj.dataBind(),this.setCssClass(this.element,"e-rtl",e),this.refreshActiveBorder()},t.prototype.refreshActiveBorder=function(){i.i(s.isNullOrUndefined)(this.bdrLine)||this.bdrLine.classList.add("e-hidden"),this.setActiveBorder()},t.prototype.showPopup=function(e){var t=i.i(s.select)(".e-popup.e-toolbar-pop",this.hdrEle);if(t&&t.classList.contains("e-popup-close")){var n=t&&t.ej2_instances[0];n.position.X="Left"===this.headerPlacement||this.element.classList.contains("e-rtl")?"left":"right",n.dataBind(),n.show(e)}},t.prototype.bindDraggable=function(){var e=this;if(this.allowDragAndDrop){var t=this.element.querySelector("."+a);if(t){Array.prototype.slice.call(t.querySelectorAll("."+h)).forEach(function(t){e.initializeDrag(t)})}}},t.prototype.wireEvents=function(){this.bindDraggable(),window.addEventListener("resize",this.resizeContext),s.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),s.EventHandler.add(this.element,"keydown",this.spaceKeyDown,this),i.i(s.isNullOrUndefined)(this.cntEle)||(this.touchModule=new s.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)})),this.keyModule=new s.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:this.keyConfigs}),this.tabKeyModule=new s.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:{openPopup:"shift+f10",tab:"tab",shiftTab:"shift+tab"},eventName:"keydown"})},t.prototype.unWireEvents=function(){i.i(s.isNullOrUndefined)(this.keyModule)||this.keyModule.destroy(),i.i(s.isNullOrUndefined)(this.tabKeyModule)||this.tabKeyModule.destroy(),i.i(s.isNullOrUndefined)(this.cntEle)||i.i(s.isNullOrUndefined)(this.touchModule)||(this.touchModule.destroy(),this.touchModule=null),window.removeEventListener("resize",this.resizeContext),s.EventHandler.remove(this.element,"mouseover",this.hoverHandler),s.EventHandler.remove(this.element,"keydown",this.spaceKeyDown),this.element.classList.remove("e-rtl"),this.element.classList.remove("e-focused")},t.prototype.clickHandler=function(e){this.element.classList.remove("e-focused");var t=e.originalEvent.target,n=i.i(s.closest)(t,"."+h),r=this.getEleIndex(n);t.classList.contains("e-close-icon")?this.removeTab(r):this.isVertical()&&i.i(s.closest)(t,".e-hor-nav")?this.showPopup(this.show):(this.isPopup=!1,i.i(s.isNullOrUndefined)(n)||r===this.selectedItem||this.selectTab(r,e.originalEvent,!0))},t.prototype.swipeHandler=function(e){if(!(e.velocity<3&&i.i(s.isNullOrUndefined)(e.originalEvent.changedTouches))){this.isNested&&this.element.setAttribute("data-swipe","true");var t=this.element.querySelector('[data-swipe="true"]');if(t)return void t.removeAttribute("data-swipe");if(this.isSwiped=!0,"Right"===e.swipeDirection&&0!==this.selectedItem){for(var n=this.selectedItem-1;n>=0;n--)if(!this.tbItem[n].classList.contains("e-hidden")){this.selectTab(n,null,!0);break}}else if("Left"===e.swipeDirection&&this.selectedItem!==i.i(s.selectAll)("."+h,this.element).length-1)for(var r=this.selectedItem+1;r<this.tbItem.length;r++)if(!this.tbItem[r].classList.contains("e-hidden")){this.selectTab(r,null,!0);break}this.isSwiped=!1}},t.prototype.spaceKeyDown=function(e){if(32===e.keyCode&&32===e.which||35===e.keyCode&&35===e.which){var t=i.i(s.closest)(e.target,"."+a);i.i(s.isNullOrUndefined)(t)||e.preventDefault()}},t.prototype.keyHandler=function(e){if(!this.element.classList.contains("e-disable")){this.element.classList.add("e-focused");var t=e.target,n=this.getTabHeader(),r=i.i(s.select)(".e-active",n);this.popEle=i.i(s.select)(".e-toolbar-pop",n),i.i(s.isNullOrUndefined)(this.popEle)||(this.popObj=this.popEle.ej2_instances[0]);var o=i.i(s.closest)(document.activeElement,"."+h),a=i.i(s.closest)(t,"."+h);switch(e.action){case"space":case"enter":if(t.parentElement.classList.contains("e-disable"))return;if("enter"===e.action&&t.classList.contains("e-hor-nav")){this.showPopup(this.show);break}this.keyPressed(t);break;case"tab":case"shiftTab":t.classList.contains(l)&&!1===i.i(s.closest)(t,"."+h).classList.contains("e-active")&&t.setAttribute("tabindex",t.getAttribute("data-tabindex")),this.popObj&&i.i(s.isVisible)(this.popObj.element)&&this.popObj.hide(this.hide),i.i(s.isNullOrUndefined)(r)||"-1"!==r.children.item(0).getAttribute("tabindex")||r.children.item(0).setAttribute("tabindex","0");break;case"moveLeft":case"moveRight":i.i(s.isNullOrUndefined)(o)||this.refreshItemVisibility(o);break;case"openPopup":e.preventDefault(),!i.i(s.isNullOrUndefined)(this.popEle)&&this.popEle.classList.contains("e-popup-close")&&this.popObj.show(this.show);break;case"delete":if(!0===this.showCloseButton&&!i.i(s.isNullOrUndefined)(a)){var d=a.nextSibling;!i.i(s.isNullOrUndefined)(d)&&d.classList.contains(h)&&d.firstElementChild.focus(),this.removeTab(this.getEleIndex(a))}this.setActiveBorder()}}},t.prototype.refreshItemVisibility=function(e){var t=i.i(s.select)("."+this.scrCntClass,this.tbItems);if(!this.isVertical()&&!i.i(s.isNullOrUndefined)(t)){var n=i.i(s.select)(".e-hscroll-bar",this.tbItems),r=n.scrollLeft,o=r+n.offsetWidth,a=e.offsetLeft,l=e.offsetWidth,d=e.offsetLeft+e.offsetWidth;if(r<a&&o<d){var h=o-a;n.scrollLeft=r+(l-h)}else if(r>a&&o>d){var h=d-r;n.scrollLeft=r-(l-h)}}},t.prototype.getIndexFromEle=function(e){return parseInt(e.substring(e.lastIndexOf("_")+1),10)},t.prototype.hoverHandler=function(e){var t=e.target;!i.i(s.isNullOrUndefined)(t.classList)&&t.classList.contains("e-close-icon")&&t.setAttribute("title",new s.L10n("tab",{closeButtonTitle:this.title},this.locale).getConstant("closeButtonTitle"))},t.prototype.evalOnPropertyChangeItems=function(e,t){var n=this;if(e.items instanceof Array&&t.items instanceof Array)if(this.lastIndex=0,i.i(s.isNullOrUndefined)(this.tbObj))this.reRenderItems();else{(this.isReact||this.isAngular)&&this.clearTemplate(),this.setItems(e.items),this.templateEle.length>0&&this.expTemplateContent(),this.templateEle=[];for(var r=i.i(s.select)(".e-tab > .e-content",this.element);r.firstElementChild;)i.i(s.detach)(r.firstElementChild);this.select(this.selectedItem),this.draggableItems=[],this.bindDraggable()}else{for(var o=Object.keys(e.items),a=0;a<o.length;a++)for(var l=parseInt(Object.keys(e.items)[a],10),d=Object.keys(e.items[l]),c=0;c<d.length;c++){var p=Object(t.items[l])[d[c]],u=Object(e.items[l])[d[c]],f=this.element.querySelectorAll("."+h)[l],m=void 0;m=f&&!i.i(s.isNullOrUndefined)(f.id)&&""!==f.id?this.getIndexFromEle(f.id):l;var v=i.i(s.select)(".e-toolbar-items #e-item"+this.tabId+"_"+m,this.element),g=i.i(s.select)(".e-content #e-content"+this.tabId+"_"+m,this.element);if("header"===d[c]||"headerTemplate"===d[c]){var y=i.i(s.isNullOrUndefined)(this.items[l].header)||i.i(s.isNullOrUndefined)(this.items[l].header.iconCss)?"":this.items[l].header.iconCss,b=this.items[l].headerTemplate||this.items[l].header.text;if("headerTemplate"===d[c]&&this.clearTabTemplate(v,d[c],h),""===b&&""===y)this.removeTab(l);else{this.tbId=f.id;var C=[];C.push(this.items[l]),this.items.splice(l,1),this.itemIndexArray.splice(l,1),this.tbObj.items.splice(l,1);var x=v.classList.contains("e-hidden");i.i(s.detach)(v),this.isReplace=!0,this.addTab(C,l),x&&this.hideTab(l),this.isReplace=!1}}if("content"===d[c]&&!i.i(s.isNullOrUndefined)(g)){var S="string"==typeof u||i.i(s.isNullOrUndefined)(u.innerHTML);if(S&&("."===u[0]||"#"===u[0])&&u.length){var I=document.querySelector(u);g.appendChild(I),I.style.display=""}else""===u&&"#"===p[0]?(document.body.appendChild(this.element.querySelector(p)).style.display="none",g.innerHTML=u):this.isAngular||this.isReact?(this.clearTabTemplate(g,d[c],"e-item"),g.innerHTML="",this.templateCompile(g,u,l)):"function"!=typeof u&&(g.innerHTML=u)}"cssClass"===d[c]&&(i.i(s.isNullOrUndefined)(v)||(v.classList.remove(p),v.classList.add(u)),i.i(s.isNullOrUndefined)(g)||(g.classList.remove(p),g.classList.add(u))),"disabled"===d[c]&&this.enableTab(l,!0!==u),"visible"===d[c]&&this.hideTab(l,!0!==u)}this.isReact&&this.portals&&this.portals.length>0&&this.renderReactTemplates(function(){n.refreshActiveTabBorder()})}},t.prototype.clearTabTemplate=function(e,t,n){if(this.clearTemplates)if(this.registeredTemplate&&this.registeredTemplate[t])for(var r=this.registeredTemplate,o=0;o<r[t].length;o++){var a=r[t][o].rootNodes[0],l=i.i(s.closest)(a,"."+n);if(!i.i(s.isNullOrUndefined)(l)&&l===e){this.clearTemplate([t],[r[t][o]]);break}}else if(this.portals&&this.portals.length>0)for(var d=this.portals,o=0;o<d.length;o++){var h=d[o],l=i.i(s.closest)(h.containerInfo,"."+n);if(!i.i(s.isNullOrUndefined)(l)&&l===e){this.clearTemplate([t],o);break}}},t.prototype.initializeDrag=function(e){var t=this,n=new s.Draggable(e,{dragArea:this.dragArea,dragTarget:"."+h,clone:!0,helper:this.helper.bind(this),dragStart:this.itemDragStart.bind(this),drag:function(e){var n,r,o=t.getEleIndex(t.dragItem),d={draggedItem:t.dragItem,event:e.event,target:e.target,droppedItem:e.target.closest("."+h),clonedElement:t.cloneElement,index:o};if(i.i(s.isNullOrUndefined)(e.target.closest(".e-tab"))||e.target.closest(".e-tab").isEqualNode(t.element)||t.dragArea==="."+a){if(e.target.closest(t.dragArea)||"Popup"===t.overflowMode?(document.body.style.cursor="",t.dragItem.querySelector("."+l).style.visibility="hidden",t.cloneElement.classList.contains("e-hidden")&&i.i(s.removeClass)([t.cloneElement],"e-hidden")):(document.body.style.cursor="not-allowed",i.i(s.addClass)([t.cloneElement],"e-hidden"),t.dragItem.classList.contains("e-hidden")&&i.i(s.removeClass)([t.dragItem],"e-hidden"),t.dragItem.querySelector("."+l).style.visibility="visible"),"Scrollable"===t.overflowMode&&!i.i(s.isNullOrUndefined)(t.element.querySelector(".e-hscroll"))){var c=t.element.querySelector(".e-scroll-right-nav"),p=t.element.querySelector(".e-scroll-left-nav"),u=t.element.querySelector(".e-hscroll-bar");!i.i(s.isNullOrUndefined)(c)&&Math.abs(c.offsetWidth/2+c.offsetLeft)>t.cloneElement.offsetLeft+t.cloneElement.offsetWidth&&(u.scrollLeft-=10),!i.i(s.isNullOrUndefined)(p)&&Math.abs(p.offsetLeft+p.offsetWidth-t.cloneElement.offsetLeft)>p.offsetWidth/2&&(u.scrollLeft+=10)}t.cloneElement.style.pointerEvents="none",r=i.i(s.closest)(e.target,".e-toolbar-item.e-draggable");var f=0;"Scrollable"!==t.overflowMode||i.i(s.isNullOrUndefined)(t.element.querySelector(".e-hscroll"))||(f=t.element.querySelector(".e-hscroll-content").offsetWidth),null!=r&&!r.isSameNode(t.dragItem)&&r.closest(".e-tab").isSameNode(t.dragItem.closest(".e-tab"))&&(n=t.getEleIndex(r),n<o&&Math.abs(r.offsetLeft+r.offsetWidth-t.cloneElement.offsetLeft)>r.offsetWidth/2&&t.dragAction(r,o,n),n>o&&Math.abs(r.offsetWidth/2)+r.offsetLeft-f<t.cloneElement.offsetLeft+t.cloneElement.offsetWidth&&t.dragAction(r,o,n)),t.droppedIndex=t.getEleIndex(t.dragItem),t.trigger("dragging",d)}else t.trigger("dragging",d)},dragStop:this.itemDragStop.bind(this)});this.draggableItems.push(n)},t.prototype.helper=function(e){return this.cloneElement=this.createElement("div"),e.element&&(this.cloneElement=e.element.cloneNode(!0),i.i(s.addClass)([this.cloneElement],"e-tab-clone-element"),this.element.querySelector("."+a).classList.contains("e-close-show")&&i.i(s.addClass)([this.cloneElement],"e-close-show"),i.i(s.removeClass)([this.cloneElement.querySelector("."+l)],"e-ripple"),i.i(s.isNullOrUndefined)(this.cloneElement.querySelector(".e-ripple-element"))||i.i(s.remove)(this.cloneElement.querySelector(".e-ripple-element")),document.body.appendChild(this.cloneElement)),this.cloneElement},t.prototype.itemDragStart=function(e){var t=this;this.draggingItems=this.items.map(function(e){return e}),this.dragItem=e.element;var n={draggedItem:e.element,event:e.event,target:e.target,droppedItem:null,index:this.getEleIndex(this.dragItem),clonedElement:this.cloneElement,cancel:!1};this.trigger("onDragStart",n,function(n){if(n.cancel){var r=e.element.ej2_instances[0];i.i(s.isNullOrUndefined)(r)||r.intDestroy(e.event),i.i(s.detach)(t.cloneElement)}else t.removeActiveClass(),i.i(s.addClass)([t.tbItems.querySelector(".e-indicator")],"e-hidden"),t.dragItem.querySelector("."+l).style.visibility="hidden"})},t.prototype.dragAction=function(e,t,i){if(this.items.length>0){var s=this.draggingItems[t];this.draggingItems.splice(t,1),this.draggingItems.splice(i,0,s)}if("MultiRow"===this.overflowMode&&e.parentNode.insertBefore(this.dragItem,e.nextElementSibling),t>i)if(this.dragItem.parentElement.isSameNode(e.parentElement))this.dragItem.parentNode.insertBefore(this.dragItem,e);else if("Extended"===this.overflowMode)if(e.isSameNode(e.parentElement.lastChild)){var n=this.dragItem.parentNode;e.parentNode.insertBefore(this.dragItem,e),n.insertBefore(e.parentElement.lastChild,n.childNodes[0])}else this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e);else{var r=e.parentElement.lastChild;if(e.isSameNode(r)){var n=this.dragItem.parentNode;e.parentNode.insertBefore(this.dragItem,e),n.insertBefore(r,n.childNodes[0])}else this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e)}t<i&&(this.dragItem.parentElement.isSameNode(e.parentElement)?this.dragItem.parentNode.insertBefore(this.dragItem,e.nextElementSibling):"Extended"===this.overflowMode?(this.dragItem.parentElement.appendChild(e.parentElement.firstElementChild),e.parentNode.insertBefore(this.dragItem,e.nextSibling)):(this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e)))},t.prototype.itemDragStop=function(e){var t=this;i.i(s.detach)(this.cloneElement),this.cloneElement=null,this.dragItem.querySelector("."+l).style.visibility="visible",document.body.style.cursor="";var n={draggedItem:this.dragItem,event:e.event,target:e.target,droppedItem:this.tbItem[this.droppedIndex],clonedElement:null,index:this.droppedIndex,cancel:!1};this.trigger("dragged",n,function(e){e.cancel?t.refresh():t.items.length>0&&t.draggingItems.length>0?(t.items=t.draggingItems,t.selectedItem=t.droppedIndex,t.refresh()):(t.dragItem.querySelector("."+l).style.visibility="",i.i(s.removeClass)([t.tbItems.querySelector(".e-indicator")],"e-hidden"),t.selectTab(t.droppedIndex,null,!0))}),this.dragItem=null},t.prototype.enableTab=function(e,t){var n=i.i(s.selectAll)("."+h,this.element)[e];i.i(s.isNullOrUndefined)(n)||(!0===t?(n.classList.remove("e-disable","e-overlay"),n.firstElementChild.setAttribute("tabindex",n.firstElementChild.getAttribute("data-tabindex"))):(n.classList.add("e-disable","e-overlay"),n.firstElementChild.removeAttribute("tabindex"),n.classList.contains("e-active")&&this.select(e+1)),i.i(s.isNullOrUndefined)(this.items[e])||(this.items[e].disabled=!t,this.dataBind()),n.firstElementChild.setAttribute("aria-disabled",!0===t?"false":"true"))},t.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)}),this.isReact&&this.renderReactTemplates()},t.prototype.addingTabContent=function(e,t){var n=this,r=0;if(this.hdrEle=i.i(s.select)("."+a,this.element),i.i(s.isNullOrUndefined)(this.hdrEle))this.items=e,this.reRenderItems(),this.bindDraggable();else{var o=i.i(s.selectAll)(".e-tab-header ."+h,this.element).length;if(0!==o&&(r=this.lastIndex+1),i.i(s.isNullOrUndefined)(t)&&(t=o-1),o<t||t<0||isNaN(t))return;0!==o||i.i(s.isNullOrUndefined)(this.hdrEle)||(this.hdrEle.style.display=""),i.i(s.isNullOrUndefined)(this.bdrLine)||this.bdrLine.classList.add("e-hidden"),this.tbItems=i.i(s.select)("."+d,this.getTabHeader()),this.isAdd=!0;var l=this.parseObject(e,t);this.isAdd=!1;var c,p=0;e.forEach(function(e,o){if(c=e.headerTemplate||e.header.text,i.i(s.isNullOrUndefined)(e.headerTemplate||e.header)||i.i(s.isNullOrUndefined)(c)||0===c.length&&!i.i(s.isNullOrUndefined)(e.header)&&i.i(s.isNullOrUndefined)(e.header.iconCss)||(l[o]&&(i.i(s.isNullOrUndefined)(e.id)&&(e.id="e-item"+n.tabId+"_tabitem_"+(r+o).toString()),l[o].htmlAttributes["data-id"]=e.id),n.items.splice(t+p,0,e),p++),n.isTemplate&&!i.i(s.isNullOrUndefined)(e.header)&&!i.i(s.isNullOrUndefined)(e.header.text)){var a=r+o,d=n.createElement("div",{id:"e-content"+n.tabId+"_"+a,className:"e-item",attrs:{role:"tabpanel","aria-labelledby":"e-item_"+a}});n.cntEle.insertBefore(d,n.cntEle.children[t+o]);var h=n.getTrgContent(n.cntEle,a.toString());n.getContent(h,e.content,"render",t)}}),this.tbObj.addItems(l,t),this.isReplace||this.trigger("added",{addedItems:e}),this.selectedItem===t?this.select(t):(this.setActiveBorder(),this.tbItem=i.i(s.selectAll)("."+h,this.getTabHeader())),this.bindDraggable()}},t.prototype.removeTab=function(e){var t=this,n=i.i(s.selectAll)("."+h,this.element)[e];if(!i.i(s.isNullOrUndefined)(n)){var r={removedItem:n,removedIndex:e,cancel:!1};this.trigger("removing",r,function(r){if(!r.cancel){var o=i.i(s.select)("#e-item"+t.tabId+"_"+t.extIndex(n.id),i.i(s.select)("."+d,t.element));i.i(s.isNullOrUndefined)(o)||t.clearTabTemplate(o,"headerTemplate",h),t.tbObj.removeItems(e),t.allowDragAndDrop&&e!==Array.prototype.indexOf.call(t.itemIndexArray,n.id)&&(e=Array.prototype.indexOf.call(t.itemIndexArray,n.id));var a=t.itemIndexArray.indexOf(n.id);t.items.splice(a,1),t.itemIndexArray.splice(a,1),t.refreshActiveBorder();var l=i.i(s.select)("#e-content"+t.tabId+"_"+t.extIndex(n.id),i.i(s.select)(".e-content",t.element));i.i(s.isNullOrUndefined)(l)||(t.clearTabTemplate(l,"content","e-item"),i.i(s.detach)(l)),t.trigger("removed",r),t.draggableItems&&t.draggableItems.length>0&&(t.draggableItems[e].destroy(),t.draggableItems[e]=null,t.draggableItems.splice(e,1)),n.classList.contains("e-active")?(e=e>i.i(s.selectAll)(".e-toolbar-item:not(.e-toolbar-popup)",t.element).length-1?e-1:e,t.enableAnimation=!1,t.selectedItem=e,t.select(e)):e!==t.selectedItem&&(e<t.selectedItem&&(e=t.itemIndexArray.indexOf(t.tbItem[t.selectedItem].id),t.setProperties({selectedItem:e>-1?e:t.selectedItem},!0),t.prevIndex=t.selectedItem),t.tbItem=i.i(s.selectAll)("."+h,t.getTabHeader())),0===i.i(s.selectAll)("."+h,t.element).length&&(t.hdrEle.style.display="none"),t.enableAnimation=!0}})}},t.prototype.hideTab=function(e,t){var n,r=i.i(s.selectAll)("."+h,this.element)[e];if(!i.i(s.isNullOrUndefined)(r)){if(i.i(s.isNullOrUndefined)(t)&&(t=!0),this.bdrLine.classList.add("e-hidden"),!0===t)if(r.classList.add("e-hidden"),n=i.i(s.selectAll)(".e-toolbar-item:not(.e-hidden)",this.tbItems),0!==n.length&&r.classList.contains("e-active")){if(0!==e)for(var o=e-1;o>=0;o--){if(!this.tbItem[o].classList.contains("e-hidden")){this.select(o);break}if(0===o)for(var a=e+1;a<this.tbItem.length;a++)if(!this.tbItem[a].classList.contains("e-hidden")){this.select(a);break}}else for(var a=e+1;a<this.tbItem.length;a++)if(!this.tbItem[a].classList.contains("e-hidden")){this.select(a);break}}else 0===n.length&&this.element.classList.add("e-hidden");else this.element.classList.remove("e-hidden"),n=i.i(s.selectAll)(".e-toolbar-item:not(.e-hidden)",this.tbItems),r.classList.remove("e-hidden"),0===n.length&&this.select(e);this.setActiveBorder(),i.i(s.isNullOrUndefined)(r.firstElementChild)||r.firstElementChild.setAttribute("aria-hidden",""+t),"Popup"===this.overflowMode&&this.tbObj&&this.tbObj.refreshOverflow()}},t.prototype.selectTab=function(e,t,i){void 0===t&&(t=null),void 0===i&&(i=!1),this.isInteracted=i,this.select(e,t)},t.prototype.select=function(e,t){var n=this,r=this.getTabHeader();this.tbItems=i.i(s.select)("."+d,r),this.tbItem=i.i(s.selectAll)("."+h,r),this.content=i.i(s.select)(".e-content",this.element),this.prevItem=this.tbItem[this.prevIndex],i.i(s.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 o=this.tbItem[e];i.i(s.isNullOrUndefined)(o)?this.selectedID="0":this.selectingID=this.extIndex(o.id),i.i(s.isNullOrUndefined)(this.prevItem)||this.prevItem.classList.contains("e-disable")||this.prevItem.children.item(0).setAttribute("tabindex",this.prevItem.firstElementChild.getAttribute("tabindex"));var a={event:t,previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:this.tbItem[this.selectedItem],selectedIndex:this.selectedItem,selectedContent:i.i(s.isNullOrUndefined)(this.content)?null:i.i(s.select)("#e-content"+this.tabId+"_"+this.selectedID,this.content),selectingItem:o,selectingIndex:e,selectingContent:i.i(s.isNullOrUndefined)(this.content)?null:i.i(s.select)("#e-content"+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwiped,isInteracted:this.isInteracted,cancel:!1};this.initRender?this.selectingContent(e,this.isInteracted):this.trigger("selecting",a,function(t){t.cancel||n.selectingContent(e,n.isInteracted)}),this.isInteracted=!1},t.prototype.selectingContent=function(e,t){if("number"==typeof e){if(!i.i(s.isNullOrUndefined)(this.tbItem[e])&&(this.tbItem[e].classList.contains("e-disable")||this.tbItem[e].classList.contains("e-hidden")))for(var n=e+1;n<this.items.length;n++){if(!1===this.items[n].disabled&&!0===this.items[n].visible){e=n;break}e=0}if(this.tbItem.length>e&&e>=0&&!isNaN(e))if(this.prevIndex=this.selectedItem,this.prevItem=this.tbItem[this.prevIndex],this.tbItem[e].classList.contains(c)&&this.reorderActiveTab){if(this.setActive(this.popupHandler(this.tbItem[e]),null,t),!i.i(s.isNullOrUndefined)(this.items)&&this.items.length>0&&this.allowDragAndDrop){this.tbItem=i.i(s.selectAll)(".e-toolbar-items ."+h,this.hdrEle);var r=this.items[e];this.items.splice(e,1),this.items.splice(this.tbItem.length-1,0,r);var o=this.itemIndexArray[e];this.itemIndexArray.splice(e,1),this.itemIndexArray.splice(this.tbItem.length-1,0,o)}}else this.setActive(e,null,t);else this.setActive(0,null,t)}else e instanceof HTMLElement&&this.setActive(this.getEleIndex(e),null,t)},t.prototype.getItemIndex=function(e){for(var t,i=0;i<this.tbItem.length;i++){if(e===this.tbItem[i].getAttribute("data-id")){t=i;break}}return t},t.prototype.disable=function(e){this.setCssClass(this.element,"e-disable",e),this.element.setAttribute("aria-disabled",""+e)},t.prototype.getPersistData=function(){return this.addOnPersist(["selectedItem","actEleId"])},t.prototype.getModuleName=function(){return"tab"},t.prototype.onPropertyChanged=function(e,t){for(var n=this,r=Object.keys(e).sort(function(e,t){return"items"===e?-1:"items"===t?1:0}),o=0,l=r;o<l.length;o++){switch(l[o]){case"width":i.i(s.setStyleAttribute)(this.element,{width:i.i(s.formatUnit)(e.width)});break;case"height":i.i(s.setStyleAttribute)(this.element,{height:i.i(s.formatUnit)(e.height)}),this.setContentHeight(!1);break;case"cssClass":var d=this.element.querySelector("."+a);""===t.cssClass||i.i(s.isNullOrUndefined)(t.cssClass)?(this.setCssClass(this.element,e.cssClass,!0),i.i(s.isNullOrUndefined)(d)||this.setCssClass(d,e.cssClass,!0)):(this.setCssClass(this.element,t.cssClass,!1),this.setCssClass(this.element,e.cssClass,!0),i.i(s.isNullOrUndefined)(d)||(this.setCssClass(d,t.cssClass,!1),this.setCssClass(d,e.cssClass,!0)));break;case"items":this.evalOnPropertyChangeItems(e,t);break;case"showCloseButton":this.setCloseButton(e.showCloseButton);break;case"reorderActiveTab":this.refreshActiveTabBorder();break;case"selectedItem":this.selectedItem=t.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.refreshActiveTabBorder();break;case"heightAdjustMode":this.setContentHeight(!1),this.select(this.selectedItem);break;case"scrollStep":this.tbObj&&(this.tbObj.scrollStep=this.scrollStep);break;case"allowDragAndDrop":this.bindDraggable();break;case"dragArea":this.allowDragAndDrop&&(this.draggableItems.forEach(function(e){e.dragArea=n.dragArea}),this.refresh())}}},t.prototype.refreshActiveTab=function(){if(this.isReact&&this.isTemplate&&this.clearTemplate(),this.isTemplate){var e=this.element.querySelector("."+d),t=this.element.querySelector(".e-toolbar-item.e-active"),n=this.getIndexFromEle(t.id),r=t.innerText,o=this.element.querySelector(".e-content").querySelector(".e-active").children[0],a=o.innerHTML;i.i(s.detach)(t),i.i(s.detach)(o);var c={className:h+" e-template e-active",id:"e-item"+this.tabId+"_"+n},p=this.createElement("span",{className:"e-tab-text",innerHTML:r,attrs:{role:"presentation"}}).outerHTML,u=this.createElement("div",{className:"e-text-wrap",innerHTML:p+this.btnCls.outerHTML}).outerHTML,f=t.firstElementChild.getAttribute("data-tabindex"),m=this.createElement("div",{className:l,innerHTML:u,attrs:{tabIndex:f,"data-tabindex":f,role:"tab","aria-controls":"e-content"+this.tabId+"_"+n,"aria-selected":"true","aria-disabled":"false"}});e.insertBefore(this.createElement("div",c),e.children[n+1]),this.element.querySelector(".e-toolbar-item.e-active").appendChild(m);var v=this.createElement("div",{innerHTML:a});this.element.querySelector(".e-content").querySelector(".e-active").appendChild(v)}else if(this.element.querySelector(".e-toolbar-item.e-active")){i.i(s.detach)(this.element.querySelector(".e-toolbar-item.e-active").children[0]),i.i(s.detach)(this.element.querySelector(".e-content").querySelector(".e-active").children[0]);var g=this.items[this.selectedItem],y=i.i(s.isNullOrUndefined)(g.header)||i.i(s.isNullOrUndefined)(g.header.iconPosition)?"":g.header.iconPosition,b=i.i(s.isNullOrUndefined)(g.header)||i.i(s.isNullOrUndefined)(g.header.iconCss)?"":g.header.iconCss,C=g.headerTemplate||g.header.text,x=this.createElement("div",{className:"e-tab-text",attrs:{role:"presentation"}});i.i(s.isNullOrUndefined)(C.tagName)?this.headerTextCompile(x,C,this.selectedItem):x.appendChild(C);var S=this.createElement("span",{className:"e-icons e-tab-icon e-icon-"+y+" "+b}),I=this.createElement("div",{className:"e-text-wrap"});I.appendChild(x),""!==C&&void 0!==C&&""!==b?("left"===y||"top"===y?I.insertBefore(S,I.firstElementChild):I.appendChild(S),x,this.isIconAlone=!1):(""===b?x:S)===S&&(i.i(s.detach)(x),I.appendChild(S),this.isIconAlone=!0);var f=i.i(s.isNullOrUndefined)(g.tabIndex)?"-1":g.tabIndex.toString(),E=g.disabled?{}:{tabIndex:f,"data-tabindex":f,role:"tab","aria-selected":"true","aria-disabled":"false"};I.appendChild(this.btnCls.cloneNode(!0));var N=this.createElement("div",{className:l,attrs:E});N.appendChild(I),"top"!==y&&"bottom"!==y||this.element.classList.add("e-vertical-icon"),this.element.querySelector(".e-toolbar-item.e-active").appendChild(N);var v=this.createElement("div"),w=g.content,O=void 0;if("string"==typeof w||i.i(s.isNullOrUndefined)(w.innerHTML))if("string"==typeof w&&this.enableHtmlSanitizer&&(w=s.SanitizeHtmlHelper.sanitize(w)),"."===w[0]||"#"===w[0])if(document.querySelectorAll(w).length){var L=document.querySelector(w);O=L.outerHTML.trim(),v.appendChild(L),L.style.display=""}else this.compileElement(v,w,"content",this.selectedItem);else this.compileElement(v,w,"content",this.selectedItem);else v.appendChild(w);i.i(s.isNullOrUndefined)(O)||-1===this.templateEle.indexOf(w.toString())&&this.templateEle.push(w.toString()),this.element.querySelector(".e-item.e-active").appendChild(v)}this.isReact&&this.renderReactTemplates()},t.prototype.refreshActiveTabBorder=function(){var e=i.i(s.select)(".e-toolbar-item.e-toolbar-popup.e-active",this.element);!i.i(s.isNullOrUndefined)(e)&&this.reorderActiveTab&&this.select(this.getEleIndex(e)),this.refreshActiveBorder()},o([i.i(s.Collection)([],m)],t.prototype,"items",void 0),o([i.i(s.Property)("100%")],t.prototype,"width",void 0),o([i.i(s.Property)("auto")],t.prototype,"height",void 0),o([i.i(s.Property)("")],t.prototype,"cssClass",void 0),o([i.i(s.Property)(0)],t.prototype,"selectedItem",void 0),o([i.i(s.Property)("Top")],t.prototype,"headerPlacement",void 0),o([i.i(s.Property)("Content")],t.prototype,"heightAdjustMode",void 0),o([i.i(s.Property)("Scrollable")],t.prototype,"overflowMode",void 0),o([i.i(s.Property)("Dynamic")],t.prototype,"loadOn",void 0),o([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),o([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),o([i.i(s.Property)(!1)],t.prototype,"showCloseButton",void 0),o([i.i(s.Property)(!0)],t.prototype,"reorderActiveTab",void 0),o([i.i(s.Property)()],t.prototype,"scrollStep",void 0),o([i.i(s.Property)()],t.prototype,"dragArea",void 0),o([i.i(s.Property)(!1)],t.prototype,"allowDragAndDrop",void 0),o([i.i(s.Property)(!0)],t.prototype,"clearTemplates",void 0),o([i.i(s.Complex)({},u)],t.prototype,"animation",void 0),o([i.i(s.Event)()],t.prototype,"created",void 0),o([i.i(s.Event)()],t.prototype,"adding",void 0),o([i.i(s.Event)()],t.prototype,"added",void 0),o([i.i(s.Event)()],t.prototype,"selecting",void 0),o([i.i(s.Event)()],t.prototype,"selected",void 0),o([i.i(s.Event)()],t.prototype,"removing",void 0),o([i.i(s.Event)()],t.prototype,"removed",void 0),o([i.i(s.Event)()],t.prototype,"onDragStart",void 0),o([i.i(s.Event)()],t.prototype,"dragging",void 0),o([i.i(s.Event)()],t.prototype,"dragged",void 0),o([i.i(s.Event)()],t.prototype,"destroyed",void 0),t=o([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return A}),i.d(t,"b",function(){return T}),i.d(t,"c",function(){return P}),i.d(t,"d",function(){return D});var s=i(0),n=(i.n(s),i(34)),r=(i.n(n),i(6)),o=(i.n(r),i(5)),a=(i.n(o),i(35)),l=(i.n(a),i(1)),d=(i.n(l),this&&this.__extends||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)}}()),h=this&&this.__decorate||function(e,t,i,s){var n,r=arguments.length,o=r<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 a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},c="e-treeview",p="e-icon-collapsible",u="e-icon-expandable",f="e-list-item",m="e-list-text",v="e-list-parent",g="e-active",y="e-icons-spinner",b="e-process",C="e-icons",x="e-text-content",S="e-drop-in",I="e-drop-next",E="e-fullrow",N="e-selected",w="e-check",O="e-checkbox-wrapper",L="e-node-focus",k={treeRole:"group",itemRole:"treeitem",listRole:"group",itemText:"",wrapperRole:""},A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),h([i.i(s.Property)("child")],t.prototype,"child",void 0),h([i.i(s.Property)([])],t.prototype,"dataSource",void 0),h([i.i(s.Property)("expanded")],t.prototype,"expanded",void 0),h([i.i(s.Property)("hasChildren")],t.prototype,"hasChildren",void 0),h([i.i(s.Property)("htmlAttributes")],t.prototype,"htmlAttributes",void 0),h([i.i(s.Property)("iconCss")],t.prototype,"iconCss",void 0),h([i.i(s.Property)("id")],t.prototype,"id",void 0),h([i.i(s.Property)("imageUrl")],t.prototype,"imageUrl",void 0),h([i.i(s.Property)("isChecked")],t.prototype,"isChecked",void 0),h([i.i(s.Property)("parentID")],t.prototype,"parentID",void 0),h([i.i(s.Property)(null)],t.prototype,"query",void 0),h([i.i(s.Property)("selectable")],t.prototype,"selectable",void 0),h([i.i(s.Property)("selected")],t.prototype,"selected",void 0),h([i.i(s.Property)(null)],t.prototype,"tableName",void 0),h([i.i(s.Property)("text")],t.prototype,"text",void 0),h([i.i(s.Property)("tooltip")],t.prototype,"tooltip",void 0),h([i.i(s.Property)("navigateUrl")],t.prototype,"navigateUrl",void 0),t}(s.ChildProperty),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),h([i.i(s.Property)("SlideDown")],t.prototype,"effect",void 0),h([i.i(s.Property)(400)],t.prototype,"duration",void 0),h([i.i(s.Property)("linear")],t.prototype,"easing",void 0),t}(s.ChildProperty),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),h([i.i(s.Complex)({effect:"SlideUp",duration:400,easing:"linear"},T)],t.prototype,"collapse",void 0),h([i.i(s.Complex)({effect:"SlideDown",duration:400,easing:"linear"},T)],t.prototype,"expand",void 0),t}(s.ChildProperty),D=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.isRefreshed=!1,s.preventExpand=!1,s.checkedElement=[],s.disableNode=[],s.validArr=[],s.validNodes=[],s.expandChildren=[],s.isFieldChange=!1,s.changeDataSource=!1,s.hasTemplate=!1,s.isFirstRender=!1,s.isNodeDropped=!1,s.isInteracted=!1,s.isRightClick=!1,s.mouseDownStatus=!1,s}d(t,e),T=t,t.prototype.getModuleName=function(){return"treeview"},t.prototype.preRender=function(){var e=this;this.checkActionNodes=[],this.parentNodeCheck=[],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",shiftSpace:"shift+space",ctrlSpace:"ctrl+space"},this.listBaseOption={expandCollapse:!0,showIcon:!0,expandIconClass:u,ariaAttributes:k,expandIconPosition:"Left",itemCreated:function(t){e.beforeNodeCreate(t)},enableHtmlSanitizer:this.enableHtmlSanitizer,itemNavigable:this.fullRowNavigable},this.updateListProp(this.fields),this.aniObj=new s.Animation({}),this.treeList=[],this.isLoaded=!1,this.isInitalExpand=!1,this.expandChildren=[],this.index=0,this.setTouchClass(),i.i(s.isNullOrUndefined)(this.selectedNodes)&&this.setProperties({selectedNodes:[]},!0),i.i(s.isNullOrUndefined)(this.checkedNodes)&&this.setProperties({checkedNodes:[]},!0),i.i(s.isNullOrUndefined)(this.expandedNodes)?this.setProperties({expandedNodes:[]},!0):this.isInitalExpand=!0},t.prototype.getPersistData=function(){var e=["selectedNodes","checkedNodes","expandedNodes"];return this.addOnPersist(e)},t.prototype.render=function(){this.initialRender=!0,this.initialize(),this.setDataBinding(!1),this.setDisabledMode(),this.setExpandOnType(),this.disabled||this.setRipple(),this.wireEditingEvents(this.allowEditing),this.setDragAndDrop(this.allowDragAndDrop),this.disabled||this.wireEvents(),this.initialRender=!1,this.renderComplete()},t.prototype.initialize=function(){this.element.setAttribute("role","tree"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active"),this.setCssClass(null,this.cssClass),this.setEnableRtl(),this.setFullRow(this.fullRowSelect),this.setTextWrap(),this.nodeTemplateFn=this.templateComplier(this.nodeTemplate)},t.prototype.setDisabledMode=function(){this.disabled?(this.element.classList.add("e-disabled"),this.element.setAttribute("aria-disabled","true")):(this.element.classList.remove("e-disabled"),this.element.setAttribute("aria-disabled","false"))},t.prototype.setEnableRtl=function(){(this.enableRtl?s.addClass:s.removeClass)([this.element],"e-rtl")},t.prototype.setRipple=function(){var e={selector:".e-fullrow,.e-text-content",ignore:"."+x+" > ."+C+",.e-input-group,.e-input, ."+O};this.rippleFn=i.i(s.rippleEffect)(this.element,e);var t={selector:"."+x+" > ."+C,isCenterRipple:!0};this.rippleIconFn=i.i(s.rippleEffect)(this.element,t)},t.prototype.setFullRow=function(e){(e?s.addClass:s.removeClass)([this.element],"e-fullrow-wrap")},t.prototype.setMultiSelect=function(e){e?this.element.setAttribute("aria-multiselectable","true"):this.element.setAttribute("aria-multiselectable","false")},t.prototype.templateComplier=function(e){if(e){this.hasTemplate=!0;this.element.classList.add("e-interaction");try{return"function"!=typeof e&&document.querySelectorAll(e).length?i.i(s.compile)(document.querySelector(e).innerHTML.trim()):i.i(s.compile)(e)}catch(t){return i.i(s.compile)(e)}}this.element.classList.remove("e-interaction")},t.prototype.setDataBinding=function(e){var t=this;this.treeList.push("false"),this.fields.dataSource instanceof n.DataManager?(this.isOffline=this.fields.dataSource.dataSource.offline,this.fields.dataSource.ready?this.fields.dataSource.ready.then(function(e){t.isOffline=t.fields.dataSource.dataSource.offline,t.fields.dataSource instanceof n.DataManager&&t.isOffline&&(t.treeList.pop(),t.treeData=e.result,t.isNumberTypeId=t.getType(),t.setRootData(),t.renderItems(!0),0!==t.treeList.length||t.isLoaded||t.finalize())}).catch(function(e){t.trigger("actionFailure",{error:e})}):this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(i){t.treeList.pop(),t.treeData=i.result,t.isNumberTypeId=t.getType(),t.setRootData(),e&&(t.changeDataSource=!0),t.renderItems(!0),t.changeDataSource=!1,0!==t.treeList.length||t.isLoaded||t.finalize()}).catch(function(e){t.trigger("actionFailure",{error:e})})):(this.treeList.pop(),i.i(s.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()},t.prototype.getQuery=function(e,t){void 0===t&&(t=null);var o,a=[];if(e.query)o=e.query.clone();else{o=new n.Query;for(var l=this.getActualProperties(e),d=0,h=Object.keys(l);d<h.length;d++){var c=h[d];"dataSource"!==c&&"tableName"!==c&&"child"!==c&&e[c]&&"url"!==c&&-1===a.indexOf(e[c])&&a.push(e[c])}o.select(a),l.hasOwnProperty("tableName")&&o.from(e.tableName)}return r.ListBase.addSorting(this.sortOrder,e.text,o),i.i(s.isNullOrUndefined)(t)||i.i(s.isNullOrUndefined)(e.parentID)||o.where(e.parentID,"equal",this.isNumberTypeId?parseFloat(t):t),o},t.prototype.getType=function(){return!!this.treeData[0]&&"number"==typeof i.i(s.getValue)(this.fields.id,this.treeData[0])},t.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);i.i(s.isNullOrUndefined)(e)?this.rootData=[]:this.rootData=e}else this.rootData=this.treeData},t.prototype.isChildObject=function(){return"object"==typeof this.fields.child},t.prototype.renderItems=function(e){this.listBaseOption.ariaAttributes.level=1;var t=this.getSortedData(this.rootData);this.ulElement=r.ListBase.createList(this.createElement,e?this.rootData:t,this.listBaseOption),this.element.appendChild(this.ulElement);var n=this.ulElement.querySelectorAll(".e-list-item");if(!1===this.loadOnDemand)for(var o=0;o<n.length;)this.renderChildNodes(n[o],!0,null,!0),o++;(1===i.i(s.selectAll)("."+v,this.element).length&&n&&0!==n.length||this.loadOnDemand)&&this.finalizeNode(this.element),this.parentNodeCheck=[],this.parentCheckData=[],this.updateCheckedStateFromDS(),this.autoCheck&&this.showCheckBox&&!this.isLoaded&&this.updateParentCheckState()},t.prototype.updateCheckedStateFromDS=function(e){if(this.validNodes=[],this.treeData&&this.showCheckBox){if(1===this.dataType){for(var t=this.fields,r=new n.DataManager(this.treeData).executeLocal((new n.Query).where(t.isChecked,"equal",!0,!1)),o=0;o<r.length;o++){var a=r[o][this.fields.id]?r[o][this.fields.id].toString():null;r[o][this.fields.parentID]&&r[o][this.fields.parentID].toString();if(-1!==this.checkedNodes.indexOf(a)||this.isLoaded||this.checkedNodes.push(a),r[o][this.fields.hasChildren])for(var l=r[o][this.fields.id],d=new n.DataManager(this.treeData).executeLocal((new n.Query).where(t.parentID,"equal",l,!1)),h=0;h<d.length;h++){var c=d[h][this.fields.id]?d[h][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(c)&&this.autoCheck&&this.checkedNodes.push(c)}}for(var o=0;o<this.checkedNodes.length;o++){var p=this.fields,u=new n.DataManager(this.treeData).executeLocal((new n.Query).where(p.id,"equal",this.checkedNodes[o],!0));if(u[0]&&this.autoCheck&&(this.getCheckedNodeDetails(p,u),this.checkIndeterminateState(u[0])),u.length>0){var f=u[0][this.fields.id]?u[0][this.fields.id].toString():null;this.checkedNodes.indexOf(f)>-1&&-1===this.validNodes.indexOf(f)&&this.validNodes.push(f)}for(var m=new n.DataManager(this.treeData).executeLocal((new n.Query).where(p.parentID,"equal",this.checkedNodes[o],!0)),v=0;v<m.length;v++){var f=m[v][this.fields.id]?m[v][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(f)&&this.autoCheck&&this.checkedNodes.push(f),this.checkedNodes.indexOf(f)>-1&&-1===this.validNodes.indexOf(f)&&this.validNodes.push(f)}}}else if(2===this.dataType||this.fields.dataSource instanceof n.DataManager&&this.isOffline){for(var v=0;v<this.treeData.length;v++){var g=this.treeData[v][this.fields.id]?this.treeData[v][this.fields.id].toString():"";this.treeData[v][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(g)&&this.checkedNodes.push(g),this.checkedNodes.indexOf(g)>-1&&-1===this.validNodes.indexOf(g)&&this.validNodes.push(g);var y=i.i(s.getValue)(this.fields.child.toString(),this.treeData[v]);y&&this.updateChildCheckState(y,this.treeData[v])}this.validNodes=this.enablePersistence?this.checkedNodes:this.validNodes}this.setProperties({checkedNodes:this.validNodes},!0)}},t.prototype.getCheckedNodeDetails=function(e,t){var r=t[0][this.fields.parentID]?t[0][this.fields.parentID].toString():null,o=0,a=this.element.querySelector('[data-uid="'+t[0][this.fields.id]+'"]'),l=this.element.querySelector('[data-uid="'+t[0][this.fields.parentID]+'"]');if(a||l){if(l){var d=i.i(s.select)("."+w,l);d||this.changeState(l,"indeterminate",null,!0,!0)}}else{this.parentNodeCheck.length;-1===this.parentNodeCheck.indexOf(r)&&this.parentNodeCheck.push(r);for(var h=this.getChildNodes(this.treeData,r),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)&&o++,o===h.length&&-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r)}var u=new n.DataManager(this.treeData).executeLocal((new n.Query).where(e.id,"equal",r,!0));this.getCheckedNodeDetails(e,u)}},t.prototype.updateParentCheckState=function(){for(var e,t=i.i(s.selectAll)(".e-stop",this.element),r=0;r<t.length;r++){var o=i.i(s.closest)(t[r],"."+f),a=o.getAttribute("data-uid").toString();e=1===this.dataType?new n.DataManager(this.treeData).executeLocal((new n.Query).where(this.fields.parentID,"equal",a,!0)):this.getChildNodes(this.treeData,a);var l=0;if(e){for(var d=0;d<e.length;d++){var h=e[d][this.fields.id].toString();-1!==this.checkedNodes.indexOf(h)&&l++}if(l===e.length){var c=o.getAttribute("data-uid");-1===this.checkedNodes.indexOf(c)&&this.checkedNodes.push(c),this.changeState(o,"check",null,!0,!0)}else 0===l&&0===this.checkedNodes.length&&this.changeState(o,"uncheck",null,!0,!0)}}},t.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.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())}},t.prototype.updateChildCheckState=function(e,t){for(var n=0,r=t[this.fields.id]?t[this.fields.id].toString():"",o=0;o<e.length;o++){var a=e[o][this.fields.id]?e[o][this.fields.id].toString():"";e[o][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(a)&&this.checkedNodes.push(a),-1!==this.checkedNodes.indexOf(r)&&-1===this.checkedNodes.indexOf(a)&&this.autoCheck&&this.checkedNodes.push(a),-1!==this.checkedNodes.indexOf(a)&&this.autoCheck&&n++,this.checkedNodes.indexOf(a)>-1&&-1===this.validNodes.indexOf(a)&&this.validNodes.push(a);var l=i.i(s.getValue)(this.fields.child.toString(),e[o]);l&&l.length&&(-1===this.parentCheckData.indexOf(t)&&this.parentCheckData.push(t),this.updateChildCheckState(l,e[o])),n===e.length&&this.autoCheck&&-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r)}if(0!==n&&this.autoCheck){this.checkIndeterminateState(t);for(var d=0;d<this.parentCheckData.length;d++)t!==this.parentCheckData[d]&&this.parentCheckData[d]&&this.checkIndeterminateState(this.parentCheckData[d])}this.parentCheckData=[]},t.prototype.beforeNodeCreate=function(e){if(this.showCheckBox){var t=i.i(o.createCheckBox)(this.createElement,!0,{cssClass:this.touchClass}),n=i.i(s.select)("div."+C,e.item),r=e.item.getAttribute("data-uid");e.item.childNodes[0].insertBefore(t,e.item.childNodes[0].childNodes[i.i(s.isNullOrUndefined)(n)?0:1]);var a=i.i(s.getValue)(e.fields.isChecked,e.curData);this.checkedNodes.indexOf(r)>-1?(i.i(s.select)(".e-frame",t).classList.add(w),e.item.setAttribute("aria-checked","true"),this.addCheck(e.item),s.Browser.userAgent.indexOf("Edg")>-1&&t.setAttribute("aria-label","checked")):i.i(s.isNullOrUndefined)(a)||"true"!==a.toString()?(e.item.setAttribute("aria-checked","false"),s.Browser.userAgent.indexOf("Edg")>-1&&t.setAttribute("aria-label","unchecked")):(i.i(s.select)(".e-frame",t).classList.add(w),e.item.setAttribute("aria-checked","true"),this.addCheck(e.item),s.Browser.userAgent.indexOf("Edg")>-1&&t.setAttribute("aria-label","checked"));var l=i.i(s.select)(".e-frame",t);s.EventHandler.add(l,"mousedown",this.frameMouseHandler,this),s.EventHandler.add(l,"mouseup",this.frameMouseHandler,this)}this.fullRowSelect&&this.createFullRow(e.item),this.allowMultiSelection&&!e.item.classList.contains(N)&&e.item.setAttribute("aria-selected","false");var d=e.fields;if(this.addActionClass(e,d.selected,N),this.addActionClass(e,d.expanded,"e-expanded"),e.item.setAttribute("tabindex","-1"),s.EventHandler.add(e.item,"focus",this.focusIn,this),!i.i(s.isNullOrUndefined)(this.nodeTemplateFn)){var h=e.item.querySelector("."+m),c=e.item.getAttribute("data-uid");h.innerHTML="",this.renderNodeTemplate(e.curData,h,c)}var p={node:e.item,nodeData:e.curData,text:e.text};this.isRefreshed||(this.trigger("drawNode",p),!1!==e.curData[this.fields.selectable]||this.showCheckBox||(e.item.classList.add("e-prevent"),e.item.firstElementChild.setAttribute("style","cursor: not-allowed")))},t.prototype.frameMouseHandler=function(e){var t=i.i(s.select)(".e-ripple-container",e.target.parentElement);i.i(o.rippleMouseHandler)(e,t)},t.prototype.addActionClass=function(e,t,n){var r=e.curData,o=i.i(s.getValue)(t,r);i.i(s.isNullOrUndefined)(o)||"false"===o.toString()||e.item.classList.add(n)},t.prototype.getDataType=function(e,t){if(this.fields.dataSource instanceof n.DataManager){for(var r=0;r<e.length;r++)if(this.isOffline){if("string"==typeof t.child&&i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[r]))&&!i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.parentID,e[r])))return 1}else if("string"==typeof t.child&&i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[r])))return 1;return 2}for(var r=0,o=e.length;r<o;r++){if("string"==typeof t.child&&!i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[r])))return 2;if(this.isChildObject())return 2;if(!i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.parentID,e[r]))||!i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.hasChildren,e[r])))return 1}return 1},t.prototype.getGroupedData=function(e,t){for(var i=(new n.Query).group(t),s=r.ListBase.getDataSource(e,i),o=[],a=0;a<s.length;a++){var l=s[a].items;o.push(l)}return o},t.prototype.getSortedData=function(e){return e&&"None"!==this.sortOrder&&(e=r.ListBase.getDataSource(e,r.ListBase.addSorting(this.sortOrder,this.fields.text))),e},t.prototype.finalizeNode=function(e){for(var t=this,r=i.i(s.selectAll)(".e-list-img",e),o=0;o<r.length;o++)r[o].setAttribute("alt","e-list-img");if(this.isLoaded){for(var a=i.i(s.selectAll)("."+N,e),l=0;l<a.length;l++){this.selectNode(a[l],null);break}i.i(s.removeClass)(a,N)}for(var d=i.i(s.selectAll)(".e-list-item:not(.e-expanded)",e),h=0;h<d.length;h++){var c=i.i(s.select)("div."+C,d[h]);c&&c.classList.contains(u)&&this.disableExpandAttr(d[h])}var p=i.i(s.selectAll)(".e-expanded",e);if(!this.loadOnDemand&&this.fields.dataSource instanceof n.DataManager&&(this.isInitalExpand=this.treeData.filter(function(e){return 1==e[t.fields.expanded]}).length>0||this.isInitalExpand),!this.isInitalExpand)for(var l=0;l<p.length;l++)this.renderChildNodes(p[l]);i.i(s.removeClass)(p,"e-expanded"),this.updateList(),this.isLoaded&&this.updateCheckedProp()},t.prototype.updateCheckedProp=function(){if(this.showCheckBox){var e=[].concat([],this.checkedNodes);this.setProperties({checkedNodes:e},!0)}},t.prototype.ensureIndeterminate=function(){if(this.autoCheck)for(var e=i.i(s.selectAll)("li",this.element),t=void 0,n=0;n<e.length;n++)e[n].classList.contains(f)&&(t=i.i(s.select)("."+v,e[n]),t?this.ensureParentCheckState(e[n]):this.ensureChildCheckState(e[n]));else for(var r=i.i(s.selectAll)(".e-stop",this.element),n=0;n<r.length;n++)r[n].classList.remove("e-stop")},t.prototype.ensureParentCheckState=function(e){if(!i.i(s.isNullOrUndefined)(e)){if(e.classList.contains(c))return;var t=e;e.classList.contains(f)&&(t=i.i(s.select)("."+v,e));var n=i.i(s.selectAll)("."+w,t),r=i.i(s.selectAll)(".e-stop",t),o=i.i(s.selectAll)("."+f,t),a=e.getElementsByClassName(O)[0];o.length===n.length?this.changeState(a,"check",null,!0,!0):n.length>0||r.length>0?this.changeState(a,"indeterminate",null,!0,!0):0===n.length&&this.changeState(a,"uncheck",null,!0,!0);var l=i.i(s.closest)(e,"."+v);if(!i.i(s.isNullOrUndefined)(l)){var d=i.i(s.closest)(l,"."+f);this.ensureParentCheckState(d)}}},t.prototype.ensureChildCheckState=function(e,t){if(!i.i(s.isNullOrUndefined)(e)){var n=i.i(s.select)("."+v,e),r=void 0;if(!i.i(s.isNullOrUndefined)(n)){r=i.i(s.selectAll)("."+O,n);for(var o=e.getElementsByClassName("e-frame")[0].classList.contains(w),a=e.getElementsByClassName("e-frame")[0].classList.contains("e-stop"),l=n.querySelectorAll("li"),d=(n.parentElement.getAttribute("aria-expanded"),void 0),h=0;h<r.length;h++){var c=l[h].getAttribute("data-uid");if(i.i(s.isNullOrUndefined)(this.currentLoadData)||i.i(s.isNullOrUndefined)(i.i(s.getValue)(this.fields.isChecked,this.currentLoadData[h]))){var p=r[h].getElementsByClassName("e-frame")[0].classList.contains(w);o?d="check":p&&!this.isLoaded?d="check":-1!==this.checkedNodes.indexOf(c)&&this.isLoaded&&(a||o)?d="check":l[h].classList.contains("e-has-child")&&!i.i(s.isUndefined)(this.parentNodeCheck)&&this.autoCheck&&(o||a)&&-1!==this.parentNodeCheck.indexOf(c)?(d="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):1===this.dataType&&!i.i(s.isUndefined)(this.parentNodeCheck)&&this.autoCheck&&(o||a)&&-1!==this.parentNodeCheck.indexOf(c)?(d="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1)):d="uncheck"}else d=i.i(s.getValue)(this.fields.isChecked,this.currentLoadData[h])?"check":"uncheck",-1!==this.ele&&(d=o?"check":"uncheck"),"uncheck"===d&&!i.i(s.isUndefined)(this.parentNodeCheck)&&this.autoCheck&&-1!==this.parentNodeCheck.indexOf(c)&&(this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(c),1),d="indeterminate");this.changeState(r[h],d,t,!0,!0)}}this.autoCheck&&this.isLoaded&&this.updateParentCheckState()}},t.prototype.doCheckBoxAction=function(e,t){i.i(s.selectAll)("."+f,this.element);if(i.i(s.isNullOrUndefined)(e)){var n=i.i(s.selectAll)("."+O,this.element);if(this.loadOnDemand)for(var r=0;r<n.length;r++)this.updateFieldChecked(n[r],t),this.changeState(n[r],t?"check":"uncheck",null,null,null,t);else for(var r=0;r<n.length;r++)this.updateFieldChecked(n[r],t),this.changeState(n[r],t?"check":"uncheck")}else for(var o=e.length-1;o>=0;o--){var a=this.getElement(e[o]);if(i.i(s.isNullOrUndefined)(a)){var l=void 0;if(""!==(l=e[o-(e.length-1)]?e[o-(e.length-1)].toString():e[o]?e[o].toString():null)&&t&&l)this.setValidCheckedNode(l),this.dynamicCheckState(l,t);else if(-1!==this.checkedNodes.indexOf(l)&&""!==l&&!t){this.checkedNodes.splice(this.checkedNodes.indexOf(l),1);var d=this.getChildNodes(this.treeData,l);if(d){for(var h=0;h<d.length;h++){var c=d[h][this.fields.id]?d[h][this.fields.id].toString():null;if(-1!==this.checkedNodes.indexOf(c)){this.checkedNodes.splice(this.checkedNodes.indexOf(c),1);var p=this.element.querySelector('[data-uid="'+c+'"]');p&&this.changeState(p,"uncheck",null)}}-1!==this.parentNodeCheck.indexOf(l)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(l),1)}l&&this.dynamicCheckState(l,t),this.updateField(this.treeData,this.fields,l,"isChecked",null)}}else{var u=i.i(s.select)(".e-list-parent ."+O,a);this.validateCheckNode(u,!t,a,null)}}if(e)for(var m=0;m<e.length-1;m++){var l=e[m]?e[m].toString():"";t||this.updateField(this.treeData,this.fields,l,"isChecked",null)}this.autoCheck&&this.updateParentCheckState()},t.prototype.updateFieldChecked=function(e,t){var n=i.i(s.closest)(e,"."+f),r=n.getAttribute("data-uid");"true"!==this.getNodeData(n).isChecked||t||this.updateField(this.treeData,this.fields,r,"isChecked",null)},t.prototype.dynamicCheckState=function(e,t){if(1===this.dataType){var r=0,o=new n.DataManager(this.treeData).executeLocal((new n.Query).where(this.fields.id,"equal",e,!0));if(o[0]){var a=o[0][this.fields.id]?o[0][this.fields.id].toString():null,l=o[0][this.fields.parentID]?o[0][this.fields.parentID].toString():null,d=this.element.querySelector('[data-uid="'+l+'"]'),h=(d&&i.i(s.select)(".e-stop",d),d?i.i(s.select)("."+w,d):null),c=this.element.querySelector('[data-uid="'+a+'"]'),p=this.getChildNodes(this.treeData,l);if(p)for(var u=0;u<p.length;u++){var f=p[u][this.fields.id]?p[u][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(f)&&r++}-1!==this.checkedNodes.indexOf(e)&&d&&a===e&&this.autoCheck?this.changeState(d,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&c&&a===e&&!t?this.changeState(c,"uncheck",null):-1!==this.checkedNodes.indexOf(e)&&c&&a===e&&t?this.changeState(c,"check",null):-1===this.checkedNodes.indexOf(e)&&!c&&d&&a===e&&this.autoCheck&&0!==r?this.changeState(d,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&!c&&d&&a===e&&this.autoCheck&&0===r?this.changeState(d,"uncheck",null):c||d||a!==e||!this.autoCheck||this.updateIndeterminate(e,t)}}else if(2===this.dataType||this.fields.dataSource instanceof n.DataManager&&this.isOffline)for(var a=void 0,d=void 0,h=void 0,u=0;u<this.treeData.length;u++){a=this.treeData[u][this.fields.id]?this.treeData[u][this.fields.id].toString():"",d=this.element.querySelector('[data-uid="'+a+'"]'),h=d?i.i(s.select)("."+w,d):null,-1===this.checkedNodes.indexOf(a)&&d&&h&&!t&&this.changeState(d,"uncheck",null);var m=i.i(s.getValue)(this.fields.child.toString(),this.treeData[u]);m&&this.updateChildIndeterminate(m,a,e,t,a)}},t.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 r=this.getChildNodes(this.treeData,i);if(r)for(var o=0;o<r.length;o++){var a=r[o][this.fields.id]?r[o][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(a)&&n++}var l=this.element.querySelector('[data-uid="'+i+'"]');l&&t?this.changeState(l,"indeterminate",null):!t&&l&&-1===this.parentNodeCheck.indexOf(i)&&0!==n?this.changeState(l,"indeterminate",null):!t&&l&&-1===this.parentNodeCheck.indexOf(i)&&0===n?this.changeState(l,"uncheck",null):l||(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))},t.prototype.updateChildIndeterminate=function(e,t,n,r,o){for(var a=0,l=0;l<e.length;l++){var d=e[l][this.fields.id]?e[l][this.fields.id].toString():"";-1!==this.checkedNodes.indexOf(d)&&a++;var h=this.element.querySelector('[data-uid="'+t+'"]'),c=h?i.i(s.select)(".e-stop",h):null,p=h?i.i(s.select)("."+w,h):null,u=this.element.querySelector('[data-uid="'+d+'"]'),f=u?i.i(s.select)("."+w,u):null;if(-1!==this.checkedNodes.indexOf(n)&&h&&d===n&&this.autoCheck)this.changeState(h,"indeterminate",null);else if(-1!==this.checkedNodes.indexOf(n)||!h||u||d!==n||r){if(-1===this.checkedNodes.indexOf(n)&&u&&d===n&&!r)this.changeState(u,"uncheck",null);else if(-1===this.checkedNodes.indexOf(n)&&c&&d===n&&this.autoCheck&&0===a&&!r)c.classList.remove("e-stop");else if(-1===this.checkedNodes.indexOf(n)&&!u&&p&&d===n&&0===a)this.changeState(h,"uncheck",null);else if(-1===this.checkedNodes.indexOf(d)&&u&&f&&0===a)this.changeState(u,"uncheck",null);else if(!u&&!h&&d===n||-1!==this.parentNodeCheck.indexOf(t)&&this.autoCheck){var m=this.element.querySelector('[data-uid="'+o+'"]');r&&0!==a?this.changeState(m,"indeterminate",null):r&&a===e.length&&-1===this.checkedNodes.indexOf(t)?this.checkedNodes.push(t):r||0!==a||-1===this.parentNodeCheck.indexOf(t)||this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(t)),-1===this.parentNodeCheck.indexOf(t)&&this.parentNodeCheck.push(t)}}else this.autoCheck?this.changeState(h,"uncheck",null):0!==a?this.changeState(h,"indeterminate",null):this.changeState(h,"uncheck",null);var v=i.i(s.getValue)(this.fields.child.toString(),e[l]);v&&this.updateChildIndeterminate(v,d,n,r,o)}},t.prototype.changeState=function(e,t,n,r,o,a){var l,d=this,h=i.i(s.closest)(e,"."+f);e===h&&(e=i.i(s.select)("."+O,h)),r?this.nodeCheckAction(e,t,h,l,n,r,o,a):(this.checkActionNodes=[],l=this.getCheckEvent(h,t,n),this.trigger("nodeChecking",l,function(i){i.cancel||d.nodeCheckAction(e,t,h,i,n,r,o,a)}))},t.prototype.nodeCheckAction=function(e,t,n,r,o,a,l,d){var h,c=e.getElementsByClassName("e-frame")[0];if("check"!==t||c.classList.contains(w)?"uncheck"===t&&(c.classList.contains(w)||c.classList.contains("e-stop"))?(i.i(s.removeClass)([c],[w,"e-stop"]),this.removeCheck(n),h="false"):"indeterminate"===t&&this.autoCheck&&(c.classList.remove(w),c.classList.add("e-stop"),this.removeCheck(n),h="mixed"):(c.classList.remove("e-stop"),c.classList.add(w),this.addCheck(n),h="true"),h="check"===t?"true":"uncheck"===t?"false":h,i.i(s.isNullOrUndefined)(h)||(n.setAttribute("aria-checked",h),s.Browser.userAgent.indexOf("Edg")>-1&&("true"===h?e.setAttribute("aria-label","checked"):"false"===h?e.setAttribute("aria-label","unchecked"):"mixed"===h&&e.setAttribute("aria-label","indeterminate"))),l){var p=[].concat([],this.checkActionNodes);r=this.getCheckEvent(n,t,o),i.i(s.isUndefined)(a)&&(r.data=p)}void 0!==d&&this.ensureStateChange(n,d),a||i.i(s.isNullOrUndefined)(h)||(n.setAttribute("aria-checked",h),r.data[0].checked=h,this.trigger("nodeChecked",r),this.checkActionNodes=[])},t.prototype.addCheck=function(e){var t=e.getAttribute("data-uid");i.i(s.isNullOrUndefined)(t)||-1!==this.checkedNodes.indexOf(t)||this.checkedNodes.push(t)},t.prototype.removeCheck=function(e){var t=this.checkedNodes.indexOf(e.getAttribute("data-uid"));t>-1&&this.checkedNodes.splice(t,1)},t.prototype.getCheckEvent=function(e,t,n){this.checkActionNodes.push(this.getNodeData(e));var r=this.checkActionNodes;return{action:t,cancel:!1,isInteracted:!i.i(s.isNullOrUndefined)(n),node:e,data:r}},t.prototype.finalize=function(){var e=i.i(s.select)("."+v,this.element);if(!i.i(s.isNullOrUndefined)(e)){e.setAttribute("role",k.treeRole),this.setMultiSelect(this.allowMultiSelection);var t=i.i(s.select)("."+f,this.element);t&&(t.setAttribute("tabindex","0"),this.updateIdAttr(null,t)),this.allowTextWrap&&this.updateWrap(),this.renderReactTemplates(),this.hasPid=!!this.rootData[0]&&this.rootData[0].hasOwnProperty(this.fields.parentID),this.doExpandAction()}},t.prototype.setTextWrap=function(){(this.allowTextWrap?s.addClass:s.removeClass)([this.element],"e-text-wrap"),s.Browser.isIE&&(this.allowTextWrap?s.addClass:s.removeClass)([this.element],"e-ie-wrap")},t.prototype.updateWrap=function(e){if(this.fullRowSelect)for(var t=e?i.i(s.selectAll)("."+f,e):this.liList,n=t.length,r=0;r<n;r++)this.calculateWrap(t[r])},t.prototype.calculateWrap=function(e){var t=i.i(s.select)("."+E,e);t&&t.nextElementSibling&&(t.style.height=this.allowTextWrap?t.nextElementSibling.offsetHeight+"px":"")},t.prototype.doExpandAction=function(){var e=this,t=this.expandedNodes;if(!this.loadOnDemand&&this.fields.dataSource instanceof n.DataManager&&(this.isInitalExpand=this.treeData.filter(function(t){return 1==t[e.fields.expanded]}).length>0||this.isInitalExpand),this.isInitalExpand&&t.length>0)if(this.setProperties({expandedNodes:[]},!0),this.fields.dataSource instanceof n.DataManager)this.expandGivenNodes(t);else{for(var r=0;r<t.length;r++){var o=i.i(s.select)('[data-uid="'+t[r]+'"]',this.element);if(i.i(s.isNullOrUndefined)(o))t[r]&&-1===this.expandChildren.indexOf(t[r])&&this.expandChildren.push(t[r].toString());else{var a=i.i(s.select)("."+u,i.i(s.select)("."+x,o));i.i(s.isNullOrUndefined)(a)||this.expandAction(o,a,null)}}this.afterFinalized()}else this.afterFinalized()},t.prototype.expandGivenNodes=function(e){var t=this;this.expandCallback(e[this.index],function(){t.index++,t.index<e.length?t.expandGivenNodes(e):t.afterFinalized()})},t.prototype.expandCallback=function(e,t){var n=i.i(s.select)('[data-uid="'+e+'"]',this.element);if(i.i(s.isNullOrUndefined)(n))t();else{var r=i.i(s.select)("."+u,i.i(s.select)("."+x,n));i.i(s.isNullOrUndefined)(r)?t():this.expandAction(n,r,null,!1,t)}},t.prototype.afterFinalized=function(){if(this.doSelectionAction(),this.updateCheckedProp(),this.isAnimate=!0,this.isInitalExpand=!1,(!this.isLoaded||this.isFieldChange)&&!this.isNodeDropped){var e={data:this.treeData};this.trigger("dataBound",e)}this.isLoaded=!0,this.isNodeDropped=!1},t.prototype.doSelectionAction=function(){var e=i.i(s.selectAll)("."+N,this.element),t=this.selectedNodes;if(t.length>0){this.setProperties({selectedNodes:[]},!0);for(var n=0;n<t.length;n++){var r=i.i(s.select)('[data-uid="'+t[n]+'"]',this.element);if(r&&!r.classList.contains("e-active")?this.selectNode(r,null,!0):this.selectedNodes.push(t[n]),!this.allowMultiSelection)break}}else this.selectGivenNodes(e);i.i(s.removeClass)(e,N)},t.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++);},t.prototype.clickHandler=function(e){var t=s.Browser.isDevice&&e.originalEvent.changedTouches&&!s.Browser.isIos?document.elementFromPoint(e.originalEvent.changedTouches[0].clientX,e.originalEvent.changedTouches[0].clientY):e.originalEvent.target;if(s.EventHandler.remove(this.element,"contextmenu",this.preventContextMenu),t&&!this.dragStartAction){var n=t.classList,r=i.i(s.closest)(t,"."+f);if(r&&(!r.classList.contains("e-prevent")||n.contains(u)||n.contains(p))){if(3!==e.originalEvent.which){var o=i.i(s.select)(".e-ripple-element",r),a=i.i(s.select)("."+C,r);if(this.removeHover(),this.setFocusElement(r),this.showCheckBox&&!r.classList.contains("e-disable")){var l=i.i(s.closest)(t,"."+O);if(!i.i(s.isNullOrUndefined)(l)){var d=i.i(s.select)(".e-frame",l);return this.validateCheckNode(l,d.classList.contains(w),r,e.originalEvent),void this.triggerClickEvent(e.originalEvent,r)}}n.contains(u)?this.expandAction(r,t,e):n.contains(p)?this.collapseNode(r,t,e):o&&a?a.classList.contains("e-ripple")&&a.classList.contains(u)?this.expandAction(r,a,e):a.classList.contains("e-ripple")&&a.classList.contains(p)?this.collapseNode(r,a,e):n.contains(v)||n.contains(f)||this.toggleSelect(r,e.originalEvent,!1):n.contains(v)||n.contains(f)||this.toggleSelect(r,e.originalEvent,!1)}3===e.originalEvent.which&&(this.isRightClick=!0),this.triggerClickEvent(e.originalEvent,r)}}},t.prototype.nodeCheckedEvent=function(e,t,n){var r=(i.i(s.closest)(e,"."+f),this.getCheckEvent(e,t?"uncheck":"check",n));r.data=r.data.splice(0,r.data.length-1),this.trigger("nodeChecked",r)},t.prototype.triggerClickEvent=function(e,t){var i={event:e,node:t};this.trigger("nodeClicked",i)},t.prototype.expandNode=function(e,t,r){var o=this;if(this.renderReactTemplates(),t.classList.contains(y)&&this.hideSpinner(t),this.initialRender||t.classList.add("interaction"),!0!==r||!0===r&&e.classList.contains("e-expanded")){if(!0!==this.preventExpand){i.i(s.removeClass)([t],u),i.i(s.addClass)([t],p);var a=0,l=0,d=this,h=i.i(s.select)("."+v,e),c=e;this.setHeight(c,h);var f=i.i(s.select)(".e-list-item."+g,e);this.isAnimate&&!this.isRefreshed?this.aniObj.animate(h,{name:this.animation.expand.effect,duration:0===this.animation.expand.duration&&"Enable"===s.animationMode?400:this.animation.expand.duration,timingFunction:this.animation.expand.easing,begin:function(t){c.style.overflow="hidden",!i.i(s.isNullOrUndefined)(f)&&f instanceof HTMLElement&&f.classList.add("e-animation-active"),a=c.offsetHeight,l=i.i(s.select)("."+x,e).offsetHeight},progress:function(e){e.element.style.display="block",d.animateHeight(e,a,l)},end:function(e){e.element.style.display="block",!i.i(s.isNullOrUndefined)(f)&&f instanceof HTMLElement&&f.classList.remove("e-animation-active"),o.expandedNode(c,h,t)}}):this.expandedNode(c,h,t)}}else{i.i(s.select)("."+v,e).style.display="none",this.fields.dataSource instanceof n.DataManager==!0&&(this.preventExpand=!1)}this.initialRender&&t.classList.add("interaction")},t.prototype.expandedNode=function(e,t,n){t.style.display="block",e.style.display="block",e.style.overflow="",e.style.height="",i.i(s.removeClass)([n],b),this.addExpand(e),this.allowTextWrap&&this.isLoaded&&this.isFirstRender&&(this.updateWrap(e),this.isFirstRender=!1),this.isLoaded&&this.expandArgs&&!this.isRefreshed&&(this.expandArgs=this.getExpandEvent(e,null),this.expandArgs.isInteracted=this.isInteracted,this.trigger("nodeExpanded",this.expandArgs))},t.prototype.addExpand=function(e){e.setAttribute("aria-expanded","true"),i.i(s.removeClass)([e],"e-node-collapsed");var t=e.getAttribute("data-uid");i.i(s.isNullOrUndefined)(t)||-1!==this.expandedNodes.indexOf(t)||this.expandedNodes.push(t)},t.prototype.collapseNode=function(e,t,n){var r=this;if(!t.classList.contains(b)){i.i(s.addClass)([t],b);var o;this.isLoaded?(o=this.getExpandEvent(e,n),this.isInteracted=o.isInteracted,this.trigger("nodeCollapsing",o,function(n){n.cancel?i.i(s.removeClass)([t],b):r.nodeCollapseAction(e,t,n)})):this.nodeCollapseAction(e,t,o)}},t.prototype.nodeCollapseAction=function(e,t,n){var r=this;i.i(s.removeClass)([t],p),i.i(s.addClass)([t],u);var o=0,a=0,l=this,d=i.i(s.select)("."+v,e),h=e,c=i.i(s.select)(".e-list-item."+g,e);this.isAnimate?this.aniObj.animate(d,{name:this.animation.collapse.effect,duration:0===this.animation.collapse.duration&&"Enable"===s.animationMode?400:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing,begin:function(t){h.style.overflow="hidden",!i.i(s.isNullOrUndefined)(c)&&c instanceof HTMLElement&&c.classList.add("e-animation-active"),o=i.i(s.select)("."+x,e).offsetHeight,a=h.offsetHeight},progress:function(e){l.animateHeight(e,o,a)},end:function(e){e.element.style.display="none",!i.i(s.isNullOrUndefined)(c)&&c instanceof HTMLElement&&c.classList.remove("e-animation-active"),r.collapsedNode(h,d,t,n)}}):this.collapsedNode(h,d,t,n)},t.prototype.collapsedNode=function(e,t,n,r){t.style.display="none",e.style.overflow="",e.style.height="",i.i(s.removeClass)([n],b),this.removeExpand(e),this.isLoaded&&(r=this.getExpandEvent(e,null),r.isInteracted=this.isInteracted,this.trigger("nodeCollapsed",r))},t.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)},t.prototype.disableExpandAttr=function(e){e.setAttribute("aria-expanded","false"),i.i(s.addClass)([e],"e-node-collapsed")},t.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=""},t.prototype.animateHeight=function(e,t,i){var s=(e.duration-e.timeStamp)/e.duration,n=(i-t)*s+t;e.element.parentElement.style.height=n+"px"},t.prototype.renderChildNodes=function(e,t,o,a){var l=this,d=i.i(s.select)("div."+C,e);if(!i.i(s.isNullOrUndefined)(d)){this.showSpinner(d);var h;if(this.fields.dataSource instanceof n.DataManager){var c=this.parents(e,"."+v).length,p=this.getChildFields(this.fields,c,1);if(i.i(s.isNullOrUndefined)(p)||i.i(s.isNullOrUndefined)(p.dataSource))return i.i(s.detach)(d),void this.removeExpand(e,!0);this.treeList.push("false"),this.fields.dataSource instanceof n.DataManager&&this.isOffline?(this.treeList.pop(),h=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.loadChild(h,p,d,e,t,o,a)):p.dataSource.executeQuery(this.getQuery(p,e.getAttribute("data-uid"))).then(function(i){l.treeList.pop(),h=i.result,1===l.dataType&&(l.dataType=2),l.loadChild(h,p,d,e,t,o,a)}).catch(function(e){l.trigger("actionFailure",{error:e})})}else{if(h=this.getChildNodes(this.treeData,e.getAttribute("data-uid"),!1,parseFloat(e.getAttribute("aria-level"))+1),this.currentLoadData=this.getSortedData(h),i.i(s.isNullOrUndefined)(h)||0===h.length)return i.i(s.detach)(d),void this.removeExpand(e,!0);this.listBaseOption.ariaAttributes.level=parseFloat(e.getAttribute("aria-level"))+1,e.appendChild(r.ListBase.createList(this.createElement,this.currentLoadData,this.listBaseOption)),this.expandNode(e,d,a),this.setSelectionForChildNodes(h),this.ensureCheckNode(e),this.finalizeNode(e),this.disableTreeNodes(h),this.renderSubChild(e,t,a)}}},t.prototype.loadChild=function(e,t,o,a,l,d,h){if(this.currentLoadData=e,i.i(s.isNullOrUndefined)(e)||0===e.length)i.i(s.detach)(o),this.removeExpand(a,!0);else{if(this.updateListProp(t),this.fields.dataSource instanceof n.DataManager&&!this.isOffline){var c=a.getAttribute("data-uid"),p=this.getNodeObject(c);i.i(s.setValue)("child",e,p)}this.listBaseOption.ariaAttributes.level=parseFloat(a.getAttribute("aria-level"))+1,a.appendChild(r.ListBase.createList(this.createElement,e,this.listBaseOption)),this.expandNode(a,o,h),this.setSelectionForChildNodes(e),this.ensureCheckNode(a),this.finalizeNode(a),this.disableTreeNodes(e),this.renderSubChild(a,l,h)}d&&d(),l&&this.expandedNodes.push(a.getAttribute("data-uid")),0!==this.treeList.length||this.isLoaded||this.finalize()},t.prototype.disableTreeNodes=function(e){for(var t=0;t<e.length;){var i=e[t][this.fields.id]?e[t][this.fields.id].toString():null;void 0!==this.disableNode&&-1!==this.disableNode.indexOf(i)&&this.doDisableAction([i]),t++}},t.prototype.setSelectionForChildNodes=function(e){var t;for(t=0;t<e.length;t++){var i=e[t][this.fields.id]?e[t][this.fields.id].toString():null;void 0!==this.selectedNodes&&-1!==this.selectedNodes.indexOf(i)&&this.doSelectionAction()}},t.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},t.prototype.getFields=function(e,t,i){return t===i?e:this.getFields(this.getChildMapper(e),t,i+1)},t.prototype.getChildFields=function(e,t,i){return t===i?this.getChildMapper(e):this.getChildFields(this.getChildMapper(e),t,i+1)},t.prototype.getChildMapper=function(e){return"string"==typeof e.child||i.i(s.isNullOrUndefined)(e.child)?e:e.child},t.prototype.getChildNodes=function(e,t,n,r){var o=this;void 0===n&&(n=!1);var a;if(i.i(s.isNullOrUndefined)(e))return a;if(1===this.dataType)return this.getChildGroup(this.groupedData,t,n);if("string"==typeof this.fields.child){var l=e.findIndex(function(e){return i.i(s.getValue)(o.fields.id,e)&&i.i(s.getValue)(o.fields.id,e).toString()===t});if(-1!==l)return i.i(s.getValue)(this.fields.child,e[l]);if(-1===l)for(var d=0,h=e.length;d<h;d++){var c=i.i(s.getValue)(this.fields.child,e[d]),p=i.i(s.isNullOrUndefined)(c)?-1:c.findIndex(function(e){return i.i(s.getValue)(o.fields.id,e)&&i.i(s.getValue)(o.fields.id,e).toString()===t});if(-1!==p)return i.i(s.getValue)(this.fields.child,c[p]);if(!i.i(s.isNullOrUndefined)(c)&&void 0!==(a=this.getChildNodes(c,t)))break}}else if(this.isChildObject()){for(var u=i.i(s.isNullOrUndefined)(r)?this.fields.child:this.fields,d=1;d<r&&!i.i(s.isNullOrUndefined)(u.child);)u=u.child,d++;this.updateListProp(u);var l=e.findIndex(function(e){return i.i(s.getValue)(o.fields.id,e)&&i.i(s.getValue)(o.fields.id,e).toString()===t});if(-1!==l)return i.i(s.getValue)("child",e[l]);if(-1===l)for(var f=0,h=e.length;f<h;f++){var c=i.i(s.getValue)("child",e[f]),p=i.i(s.isNullOrUndefined)(c)?-1:c.findIndex(function(e){return i.i(s.getValue)(o.fields.child.id,e)&&i.i(s.getValue)(o.fields.child.id,e).toString()===t});if(-1!==p)return i.i(s.getValue)("child",c[p]);if(!i.i(s.isNullOrUndefined)(c)&&void 0!==(a=this.getChildNodes(c,t,!1,r)))break}}return a},t.prototype.getChildGroup=function(e,t,n){if(!i.i(s.isNullOrUndefined)(e))for(var r=0,o=e.length;r<o;r++){if(i.i(s.isNullOrUndefined)(e[r][0])||i.i(s.isNullOrUndefined)(i.i(s.getValue)(this.fields.parentID,e[r][0])))return n?e[r]:[];if(i.i(s.getValue)(this.fields.parentID,e[r][0]).toString()===t)return e[r]}},t.prototype.renderSubChild=function(e,t,n){if(t)for(var r=i.i(s.selectAll)("."+u,e),o=0,a=r.length;o<a;o++){var l=r[o];if(e.querySelector(".e-icons")!==r[o]){var d=i.i(s.closest)(l,"."+f);this.expandArgs=this.getExpandEvent(d,null),!0!==n&&this.trigger("nodeExpanding",this.expandArgs),this.renderChildNodes(d,t,null,n)}}},t.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))},t.prototype.isActive=function(e){return!!e.classList.contains(g)},t.prototype.selectNode=function(e,t,n){var r=this;if(i.i(s.isNullOrUndefined)(e)||!this.allowMultiSelection&&this.isActive(e)&&!i.i(s.isNullOrUndefined)(t))return void this.setFocusElement(e);var o;this.isLoaded?(o=this.getSelectEvent(e,"select",t),this.trigger("nodeSelecting",o,function(i){i.cancel||i.node.classList.contains("e-prevent")||r.nodeSelectAction(e,t,i,n)})):this.nodeSelectAction(e,t,o,n)},t.prototype.nodeSelectAction=function(e,t,n,r){if(this.allowMultiSelection&&(r||t&&(!t||t.ctrlKey||t.metaKey))||this.removeSelectAll(),this.allowMultiSelection&&t&&t.shiftKey){this.startNode||(this.startNode=e);var o=this.liList.indexOf(this.startNode),a=this.liList.indexOf(e);if(o>a){var l=o;o=a,a=l}for(var d=o;d<=a;d++){var h=this.liList[d];i.i(s.isVisible)(h)&&!h.classList.contains("e-disable")&&this.addSelect(h)}}else this.startNode=e,this.addSelect(e);this.isLoaded&&(n.nodeData=this.getNodeData(e),this.trigger("nodeSelected",n),this.isRightClick=!1),this.isRightClick=!1},t.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)},t.prototype.nodeUnselectAction=function(e,t){this.removeSelect(e),this.setFocusElement(e),this.isLoaded&&(t.nodeData=this.getNodeData(e),this.trigger("nodeSelected",t))},t.prototype.setFocusElement=function(e){if(!i.i(s.isNullOrUndefined)(e)){var t=this.getFocusedNode();t&&(i.i(s.removeClass)([t],L),t.setAttribute("tabindex","-1")),i.i(s.addClass)([e],L),e.setAttribute("tabindex","0"),s.EventHandler.add(e,"blur",this.focusOut,this),this.updateIdAttr(t,e)}},t.prototype.addSelect=function(e){e.setAttribute("aria-selected","true"),i.i(s.addClass)([e],g);var t=e.getAttribute("data-uid");i.i(s.isNullOrUndefined)(t)||-1!==this.selectedNodes.indexOf(t)||this.selectedNodes.push(t)},t.prototype.removeSelect=function(e){this.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),i.i(s.removeClass)([e],g);var t=this.selectedNodes.indexOf(e.getAttribute("data-uid"));t>-1&&this.selectedNodes.splice(t,1)},t.prototype.removeSelectAll=function(){for(var e=this.element.querySelectorAll("."+g),t=0,n=e;t<n.length;t++){var r=n[t];this.allowMultiSelection?r.setAttribute("aria-selected","false"):r.removeAttribute("aria-selected")}i.i(s.removeClass)(e,g),this.setProperties({selectedNodes:[]},!0)},t.prototype.getSelectEvent=function(e,t,n){var r=this.getNodeData(e);return{action:t,cancel:!1,isInteracted:!i.i(s.isNullOrUndefined)(n),node:e,nodeData:r}},t.prototype.setExpandOnType=function(){this.expandOnType="Auto"===this.expandOn?s.Browser.isDevice?"Click":"DblClick":this.expandOn},t.prototype.expandHandler=function(e){var t=s.Browser.isDevice&&e.originalEvent.changedTouches&&!s.Browser.isIos?document.elementFromPoint(e.originalEvent.changedTouches[0].clientX,e.originalEvent.changedTouches[0].clientY):e.originalEvent.target;!t||t.classList.contains("e-input")||t.classList.contains(c)||t.classList.contains(v)||t.classList.contains(f)||t.classList.contains(C)||this.showCheckBox&&i.i(s.closest)(t,"."+O)||this.expandCollapseAction(i.i(s.closest)(t,"."+f),e)},t.prototype.expandCollapseAction=function(e,t){var n=i.i(s.select)("div."+C,e);if(n&&!n.classList.contains(b)){var r=n.classList;r.contains(u)?this.expandAction(e,n,t):r.contains(p)&&this.collapseNode(e,n,t)}},t.prototype.expandAction=function(e,t,n,r,o){var a=this;t.classList.contains(b)||(i.i(s.addClass)([t],b),this.isLoaded&&!this.isRefreshed?(this.expandArgs=this.getExpandEvent(e,n),this.isInteracted=this.expandArgs.isInteracted,this.trigger("nodeExpanding",this.expandArgs,function(n){n.cancel?i.i(s.removeClass)([t],b):a.nodeExpandAction(e,t,r,o)})):this.nodeExpandAction(e,t,r,o))},t.prototype.nodeExpandAction=function(e,t,n,r){var o=i.i(s.select)("."+v,e);if(o&&"UL"===o.nodeName)this.expandNode(e,t);else{this.isFirstRender=!0,this.renderChildNodes(e,n,r);for(var a=i.i(s.selectAll)("."+f,e),l=0;l<a.length;l++){var d=this.getId(a[l]);if(-1!==this.expandChildren.indexOf(d)&&void 0!==this.expandChildren){var h=i.i(s.select)("."+u,i.i(s.select)("."+x,a[l]));i.i(s.isNullOrUndefined)(h)||this.expandAction(a[l],h,null),this.expandChildren.splice(this.expandChildren.indexOf(d),1)}}}},t.prototype.keyActionHandler=function(e){var t=this,n=e.target,r=this.getFocusedNode();if(n&&n.classList.contains("e-input")){var o=n;return void("enter"===e.action?o.blur():"escape"===e.action&&(o.value=this.oldText,o.blur()))}e.preventDefault();var a={cancel:!1,event:e,node:r};this.trigger("keyPress",a,function(n){if(!n.cancel)switch(e.action){case"space":t.showCheckBox?t.checkNode(e):t.toggleSelect(r,e);break;case"moveRight":t.openNode(!t.enableRtl,e);break;case"moveLeft":t.openNode(!!t.enableRtl,e);break;case"shiftDown":t.shiftKeySelect(!0,e);break;case"moveDown":case"ctrlDown":case"csDown":t.navigateNode(!0);break;case"shiftUp":t.shiftKeySelect(!1,e);break;case"moveUp":case"ctrlUp":case"csUp":t.navigateNode(!1);break;case"home":case"shiftHome":case"ctrlHome":case"csHome":t.navigateRootNode(!0);break;case"end":case"shiftEnd":case"ctrlEnd":case"csEnd":t.navigateRootNode(!1);break;case"enter":case"ctrlEnter":case"shiftEnter":case"csEnter":case"shiftSpace":case"ctrlSpace":t.toggleSelect(r,e);break;case"f2":t.allowEditing&&!r.classList.contains("e-disable")&&t.createTextbox(r,e);break;case"ctrlA":if(t.allowMultiSelection){var o=i.i(s.selectAll)(".e-list-item:not(.e-active)",t.element);t.selectGivenNodes(o)}}})},t.prototype.navigateToFocus=function(e){var t=this.getFocusedNode().querySelector("."+x),n=t.getBoundingClientRect(),r=this.getScrollParent(this.element);if(!i.i(s.isNullOrUndefined)(r)){var o=r.getBoundingClientRect();n.bottom>o.bottom?r.scrollTop+=n.bottom-o.bottom:n.top<o.top&&(r.scrollTop-=o.top-n.top)}this.isVisibleInViewport(t)||t.scrollIntoView(e)},t.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)},t.prototype.getScrollParent=function(e){return i.i(s.isNullOrUndefined)(e)?null:e.scrollHeight>e.clientHeight?e:this.getScrollParent(e.parentElement)},t.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)},t.prototype.checkNode=function(e){var t=this.getFocusedNode(),n=i.i(s.select)("."+O,t),r=i.i(s.select)(" .e-frame",n).classList.contains(w);t.classList.contains("e-disable")||0==t.getElementsByClassName("e-checkbox-disabled").length&&this.validateCheckNode(n,r,t,e)},t.prototype.validateCheckNode=function(e,t,n,r){var o=this,a=i.i(s.closest)(e,"."+f);this.checkActionNodes=[];var l=t?"false":"true";i.i(s.isNullOrUndefined)(l)||a.setAttribute("aria-checked",l);var d=this.getCheckEvent(a,t?"uncheck":"check",r);this.trigger("nodeChecking",d,function(i){i.cancel||o.nodeCheckingAction(e,t,n,i,r)})},t.prototype.nodeCheckingAction=function(e,t,n,r,o){if(-1===this.checkedElement.indexOf(n.getAttribute("data-uid"))&&(this.checkedElement.push(n.getAttribute("data-uid")),this.autoCheck)){var a=this.getChildNodes(this.treeData,n.getAttribute("data-uid"));null!==a?this.allCheckNode(a,this.checkedElement,null,null,!1):a=null}if(this.changeState(e,t?"uncheck":"check",o,!0),this.autoCheck){this.ensureChildCheckState(n),this.ensureParentCheckState(i.i(s.closest)(i.i(s.closest)(n,"."+v),"."+f));var l=void 0;"check"===r.action?l=!0:"uncheck"===r.action&&(l=!1),this.ensureStateChange(n,l)}this.nodeCheckedEvent(e,t,o)},t.prototype.ensureStateChange=function(e,t){var r=i.i(s.select)("."+v,e),o=e.getAttribute("data-uid"),a=this.fields;if(1===this.dataType&&this.autoCheck)for(var l=new n.DataManager(this.treeData).executeLocal((new n.Query).where(a.parentID,"equal",o,!0)),d=0;d<l.length;d++){var h=l[d][this.fields.id]?l[d][this.fields.id].toString():null,c=l[d][this.fields.isChecked]?l[d][this.fields.isChecked].toString():null;if(-1!==this.checkedNodes.indexOf(o)&&-1===this.checkedNodes.indexOf(h)){this.checkedNodes.push(h);var p=this.getChildNodes(this.treeData,h);this.getChildItems(p,t),-1!==this.parentNodeCheck.indexOf(h)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(h),1)}else if(-1===this.checkedNodes.indexOf(o)&&null===r&&-1!==this.checkedNodes.indexOf(h)){if(this.checkedNodes.splice(this.checkedNodes.indexOf(h),1),"true"===c&&this.updateField(this.treeData,this.fields,h,"isChecked",null),-1===this.checkedNodes.indexOf(o)&&null===r||-1!==this.parentNodeCheck.indexOf(h)){var u=this.getChildNodes(this.treeData,h);this.getChildItems(u,t),-1!==this.parentNodeCheck.indexOf(h)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(h),1)}}else{var p=this.getChildNodes(this.treeData,h);this.getChildItems(p,t)}}else if(1!==this.dataType||this.autoCheck){var p=this.getChildNodes(this.treeData,o);p&&this.childStateChange(p,o,r,t)}else if(t)for(var d=0;d<this.treeData.length;d++){var f=this.treeData[d][this.fields.id]?this.treeData[d][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(f)&&this.checkedNodes.push(f)}else{for(var m=new n.DataManager(this.treeData).executeLocal((new n.Query).where(a.isChecked,"equal",!0,!1)),d=0;d<m.length;d++){var g=m[d][this.fields.id]?m[d][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(g)&&this.checkedNodes.splice(this.checkedNodes.indexOf(g),1),this.updateField(this.treeData,this.fields,g,"isChecked",null)}this.checkedNodes=[]}},t.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 r=this.getChildNodes(this.treeData,s);r.length>0&&this.getChildItems(r,t)}},t.prototype.childStateChange=function(e,t,i,s){for(var n=0;n<e.length;n++){var r=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(r)?(this.checkedNodes.push(r),-1!==this.parentNodeCheck.indexOf(r)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(r),1)):-1!==this.checkedNodes.indexOf(t)||-1===this.checkedNodes.indexOf(r)||s||(this.checkedNodes.splice(this.checkedNodes.indexOf(r),1),"true"===o&&this.updateField(this.treeData,this.fields,r,"isChecked",null)):this.autoCheck||(s?-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r):(-1!==this.checkedNodes.indexOf(r)&&this.checkedNodes.splice(this.checkedNodes.indexOf(r),1),this.updateField(this.treeData,this.fields,r,"isChecked",null),this.checkedNodes=[]));var a=this.getChildNodes([e[n]],r);a&&this.childStateChange(a,t,i,s)}},t.prototype.allCheckNode=function(e,t,n,r,o){if(e)for(var a=0;a<e.length;a++){var l=i.i(s.getValue)(this.fields.id,e[a]),d=this.element.querySelector('[data-uid="'+l+'"]');!1!==o&&-1===this.checkedElement.indexOf(l.toString())&&(null===d&&!i.i(s.isNullOrUndefined)(e[a][this.fields.isChecked])&&-1===t.indexOf(l.toString())||0===r||2===n)&&(!1!==e[a][this.fields.isChecked]||2===n?t.push(l.toString()):r=null,r=!1!==e[a][this.fields.isChecked]||2===n?0:null),-1===t.indexOf(l.toString())&&i.i(s.isNullOrUndefined)(n)&&t.push(l.toString());var h=i.i(s.getValue)(this.fields.child.toString(),e[a]);if(!0===i.i(s.getValue)(this.fields.hasChildren,e[a])||h){var c=i.i(s.getValue)(this.fields.id,e[a]),p=void 0;p=1===this.dataType?this.getChildNodes(this.treeData,c.toString()):h,p&&(i.i(s.isNullOrUndefined)(o)?this.allCheckNode(p,t,n,r):this.allCheckNode(p,t,n,r,o),r=null)}r=null}},t.prototype.openNode=function(e,t){var n=this.getFocusedNode(),r=i.i(s.select)("div."+C,n);if(e){if(!r)return;r.classList.contains(u)?this.expandAction(n,r,t):this.focusNextNode(n,!0)}else if(r&&r.classList.contains(p))this.collapseNode(n,r,t);else{var o=i.i(s.closest)(i.i(s.closest)(n,"."+v),"."+f);if(!o)return;o.classList.contains("e-disable")||(this.setFocus(n,o),this.navigateToFocus(!0))}},t.prototype.navigateNode=function(e){var t=this.getFocusedNode();this.focusNextNode(t,e)},t.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))},t.prototype.getFocusedNode=function(){var e,t=i.i(s.select)('.e-list-item[tabindex="0"]',this.element);return i.i(s.isNullOrUndefined)(t)&&(e=i.i(s.select)("."+f,this.element)),i.i(s.isNullOrUndefined)(t)?i.i(s.isNullOrUndefined)(e)?this.element.firstElementChild:e:t},t.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")||i.classList.contains("e-prevent")){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(x)?this.focusNextNode(i,!1):this.focusNextNode(i,t)}},t.prototype.getNextNode=function(e){var t,n=this.liList.indexOf(e);do{if(n++,t=this.liList[n],i.i(s.isNullOrUndefined)(t))return e}while(!i.i(s.isVisible)(t));return t},t.prototype.getPrevNode=function(e){var t,n=this.liList.indexOf(e);do{if(n--,t=this.liList[n],i.i(s.isNullOrUndefined)(t))return e}while(!i.i(s.isVisible)(t));return t},t.prototype.getRootNode=function(){var e,t=0;do{e=this.liList[t],t++}while(!i.i(s.isVisible)(e));return e},t.prototype.getEndNode=function(){var e,t=this.liList.length-1;do{e=this.liList[t],t--}while(!i.i(s.isVisible)(e));return e},t.prototype.setFocus=function(e,t){i.i(s.removeClass)([e],L),e.setAttribute("tabindex","-1"),t.classList.contains("e-disable")||t.classList.contains("e-prevent")||(i.i(s.addClass)([t],L),t.setAttribute("tabindex","0"),t.focus(),s.EventHandler.add(t,"blur",this.focusOut,this),this.updateIdAttr(e,t))},t.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")},t.prototype.focusIn=function(){if(!this.mouseDownStatus){var e=this.getFocusedNode();e.classList.contains("e-disable")||e.classList.contains("e-prevent")?(e.setAttribute("tabindex","-1"),this.navigateNode(!0)):(e.setAttribute("tabindex","0"),i.i(s.addClass)([e],L),s.EventHandler.add(e,"blur",this.focusOut,this)),this.mouseDownStatus=!1}},t.prototype.focusOut=function(e){var t=this.getFocusedNode();e.target==t&&(i.i(s.removeClass)([t],L),s.EventHandler.remove(t,"blur",this.focusOut))},t.prototype.onMouseOver=function(e){if(!s.Browser.isDevice){var t=e.target,n=t.classList,r=i.i(s.closest)(t,"."+f);if(!r||n.contains(v)||n.contains(f))return void this.removeHover();r&&!r.classList.contains("e-disable")&&this.setHover(r)}},t.prototype.setHover=function(e){e.classList.contains("e-hover")||e.classList.contains("e-prevent")||(this.removeHover(),i.i(s.addClass)([e],"e-hover"))},t.prototype.onMouseLeave=function(e){this.removeHover()},t.prototype.removeHover=function(){var e=i.i(s.selectAll)(".e-hover",this.element);e&&e.length&&i.i(s.removeClass)(e,"e-hover")},t.prototype.getNodeData=function(e,t){if(!i.i(s.isNullOrUndefined)(e)&&e.classList.contains(f)&&!i.i(s.isNullOrUndefined)(i.i(s.closest)(e,".e-control"))&&i.i(s.closest)(e,".e-control").classList.contains(c)){var n=e.getAttribute("data-uid"),r=this.getText(e,t),o=i.i(s.closest)(e.parentNode,"."+f),a=o?o.getAttribute("data-uid"):null,l=e.classList.contains(g),d=!e.classList.contains("e-prevent"),h="true"===e.getAttribute("aria-expanded"),m=null!==e.getAttribute("aria-expanded")||null!=(i.i(s.select)("."+u,e)||i.i(s.select)("."+p,e)),v=null,y=i.i(s.select)("."+O,e);return this.showCheckBox&&y&&(v=e.getAttribute("aria-checked")),{id:n,text:r,parentID:a,selected:l,selectable:d,expanded:h,isChecked:v,hasChildren:m}}return{id:"",text:"",parentID:"",selected:!1,expanded:!1,isChecked:"",hasChildren:!1}},t.prototype.getText=function(e,t){if(t){var n=this.getNodeObject(e.getAttribute("data-uid")),r=parseFloat(e.getAttribute("aria-level")),o=this.getFields(this.fields,r,1);return i.i(s.getValue)(o.text,n)}return i.i(s.select)("."+m,e).textContent},t.prototype.getExpandEvent=function(e,t){var n=this.getNodeData(e);return{cancel:!1,isInteracted:!i.i(s.isNullOrUndefined)(t),node:e,nodeData:n,event:t}},t.prototype.renderNodeTemplate=function(e,t,n){var r=this.nodeTemplateFn(e,this,"nodeTemplate"+n,this.element.id+"nodeTemplate",this.isStringTemplate,void 0,t,this.root);r&&(r=Array.prototype.slice.call(r),i.i(s.append)(r,t))},t.prototype.destroyTemplate=function(e){this.clearTemplate(["nodeTemplate"+e.getAttribute("data-uid")])},t.prototype.reRenderNodes=function(){this.updateListProp(this.fields),s.Browser.isIE?(this.ulElement=this.element.querySelector(".e-list-parent.e-ul"),this.ulElement.parentElement.removeChild(this.ulElement)):this.element.innerHTML="",i.i(s.isNullOrUndefined)(this.nodeTemplateFn)||this.clearTemplate(),this.setTouchClass(),this.setProperties({selectedNodes:[],checkedNodes:[],expandedNodes:[]},!0),this.checkedElement=[],this.isLoaded=!1,this.setDataBinding(!0)},t.prototype.setCssClass=function(e,t){i.i(s.isNullOrUndefined)(e)||""===e||i.i(s.removeClass)([this.element],e.split(" ")),i.i(s.isNullOrUndefined)(t)||""===t||i.i(s.addClass)([this.element],t.split(" "))},t.prototype.editingHandler=function(e){var t=e.target;if(!(!t||t.classList.contains(c)||t.classList.contains(v)||t.classList.contains(f)||t.classList.contains(C)||t.classList.contains("e-input")||t.classList.contains("e-input-group"))){var n=i.i(s.closest)(t,"."+f);this.createTextbox(n,e)}},t.prototype.createTextbox=function(e,t){var n=this,r=i.i(s.select)(".e-tree-input",this.element);r&&r.blur();var o=i.i(s.select)("."+m,e);this.updateOldText(e);var a=this.createElement("input",{className:"e-tree-input",attrs:{value:this.oldText}}),l=this.getEditEvent(e,null,a.outerHTML);this.trigger("nodeEditing",l,function(t){if(!t.cancel){var r=o.offsetWidth+5,a="width:"+r+"px";i.i(s.addClass)([e],"e-editing"),i.i(s.isNullOrUndefined)(n.nodeTemplateFn)||n.destroyTemplate(e),n.isReact?setTimeout(function(){n.renderTextBox(l,o,a)},5):n.renderTextBox(l,o,a)}})},t.prototype.renderTextBox=function(e,t,n){t.innerHTML=e.innerHtml;var r=i.i(s.select)(".e-tree-input",t);this.inputObj=a.Input.createInput({element:r,properties:{enableRtl:this.enableRtl}},this.createElement),this.inputObj.container.setAttribute("style",n),r.focus();var o=r;o.setSelectionRange(0,o.value.length),this.wireInputEvents(r)},t.prototype.updateOldText=function(e){var t=e.getAttribute("data-uid");this.editData=this.getNodeObject(t);var n=parseFloat(e.getAttribute("aria-level"));this.editFields=this.getFields(this.fields,n,1),this.oldText=i.i(s.getValue)(this.editFields.text,this.editData)},t.prototype.inputFocusOut=function(e){if(i.i(s.select)(".e-tree-input",this.element)){var t=e.target,r=t.value,o=i.i(s.closest)(t,"."+m),a=i.i(s.closest)(t,"."+f);i.i(s.detach)(this.inputObj.container),this.fields.dataSource instanceof n.DataManager&&!this.isOffline?this.crudOperation("update",null,a,r,null,null,!0):this.appendNewText(a,o,r,!0)}},t.prototype.appendNewText=function(e,t,i,s){var n=this,r=this.getEditEvent(e,i,null);this.trigger("nodeEdited",r,function(r){i=r.cancel?r.oldText:r.newText,n.updateText(e,t,i,s),r.oldText!==i&&n.triggerEvent("nodeEdited",[n.getNode(e)])})},t.prototype.updateText=function(e,t,n,r){var o=i.i(s.setValue)(this.editFields.text,n,this.editData);if(i.i(s.isNullOrUndefined)(this.nodeTemplateFn))this.enableHtmlSanitizer?t.innerText=s.SanitizeHtmlHelper.sanitize(n):t.innerHTML=n;else{t.innerText="";var a=e.getAttribute("data-uid");this.renderNodeTemplate(o,t,a),this.renderReactTemplates()}r&&(i.i(s.removeClass)([e],"e-editing"),e.focus(),s.EventHandler.add(e,"blur",this.focusOut,this),i.i(s.addClass)([e],L)),this.allowTextWrap&&this.calculateWrap(e)},t.prototype.getElement=function(e){return i.i(s.isNullOrUndefined)(e)?null:"string"==typeof e?this.element.querySelector('[data-uid="'+e+'"]'):"object"==typeof e?i.i(s.getElement)(e):null},t.prototype.getId=function(e){return i.i(s.isNullOrUndefined)(e)?null:"string"==typeof e?e:"object"==typeof e?i.i(s.getElement)(e).getAttribute("data-uid"):null},t.prototype.getEditEvent=function(e,t,i){return{cancel:!1,newText:t,node:e,nodeData:this.getNodeData(e),oldText:this.oldText,innerHtml:i}},t.prototype.getNodeObject=function(e){if(!i.i(s.isNullOrUndefined)(e)){if(1!==this.dataType)return this.getChildNodeObject(this.treeData,this.fields,e);for(var t=0,n=this.treeData.length;t<n;t++){var r=i.i(s.getValue)(this.fields.id,this.treeData[t]);if(!i.i(s.isNullOrUndefined)(this.treeData[t])&&!i.i(s.isNullOrUndefined)(r)&&r.toString()===e)return this.treeData[t]}}},t.prototype.getChildNodeObject=function(e,t,r){var o;if(i.i(s.isNullOrUndefined)(e))return o;for(var a=0,l=e.length;a<l;a++){var d=i.i(s.getValue)(t.id,e[a]);if(e[a]&&d&&d.toString()===r)return e[a];if("string"!=typeof t.child||i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[a]))){if(this.fields.dataSource instanceof n.DataManager&&!i.i(s.isNullOrUndefined)(i.i(s.getValue)("child",e[a]))){if(void 0!==(o=this.getChildNodeObject(i.i(s.getValue)("child",e[a]),this.getChildMapper(t),r)))break}else if(this.isChildObject()){var h=i.i(s.getValue)("child",e[a]);if(void 0!==(o=this.getChildNodeObject(h,this.getChildMapper(t),r)))break}}else{var h=i.i(s.getValue)(t.child,e[a]);if(void 0!==(o=this.getChildNodeObject(h,this.getChildMapper(t),r)))break}}return o},t.prototype.setDragAndDrop=function(e){e&&!this.disabled?this.initializeDrag():this.destroyDrag()},t.prototype.initializeDrag=function(){var e,t=this,n=this;this.dragObj=new s.Draggable(this.element,{enableTailMode:!0,enableAutoScroll:!0,dragArea:this.dragArea,dragTarget:"."+x,enableTapHold:!0,tapHoldThreshold:100,helper:function(r){t.dragTarget=r.sender.target;var o=i.i(s.closest)(t.dragTarget,"."+c),a=i.i(s.closest)(t.dragTarget,"."+x);if(t.dragLi=i.i(s.closest)(t.dragTarget,"."+f),t.fullRowSelect&&!a&&t.dragTarget.classList.contains(E)&&(a=t.dragTarget.nextElementSibling),!t.dragTarget||!r.element.isSameNode(o)||!a||t.dragTarget.classList.contains(c)||t.dragTarget.classList.contains(v)||t.dragTarget.classList.contains(f)||t.dragLi.classList.contains("e-disable"))return!1;var l=a.cloneNode(!0);if(i.i(s.isNullOrUndefined)(i.i(s.select)("div."+C,l))){var d=n.createElement("div",{className:C+" "+u});l.insertBefore(d,l.children[0])}var h="e-drag-item "+c+" "+t.cssClass+" "+(t.enableRtl?"e-rtl":"");e=n.createElement("div",{className:h}),e.appendChild(l);var p=t.selectedNodes.length;if(p>1&&t.allowMultiSelection&&t.dragLi.classList.contains(g)){var m=n.createElement("span",{className:"e-drop-count",innerHTML:""+p});e.appendChild(m)}return document.body.appendChild(e),document.body.style.cursor="",t.dragData=t.getNodeData(t.dragLi),e},dragStart:function(n){i.i(s.addClass)([t.element],"e-dragging");var r,o=i.i(s.closest)(n.target,".e-list-item");o&&(r=parseInt(o.getAttribute("aria-level"),10));var a=t.getDragEvent(n.event,t,null,n.target,null,e,r);a.draggedNode.classList.contains("e-editing")?(t.dragObj.intDestroy(n.event),t.dragCancelAction(e)):t.trigger("nodeDragStart",a,function(i){i.cancel?(t.dragObj.intDestroy(n.event),t.dragCancelAction(e)):t.dragStartAction=!0})},drag:function(n){t.dragObj.setProperties({cursorAt:{top:!i.i(s.isNullOrUndefined)(n.event.targetTouches)||s.Browser.isDevice?60:-20}}),t.dragAction(n,e)},dragStop:function(e){i.i(s.removeClass)([t.element],"e-dragging"),t.removeVirtualEle();var n=e.target,r=i.i(s.closest)(n,".e-droppable"),o=!0;n&&r||(i.i(s.detach)(e.helper),document.body.style.cursor="",o=!1);var a,l=i.i(s.closest)(n,".e-list-item");l&&(a=parseInt(l.getAttribute("aria-level"),10));var d=t.getDragEvent(e.event,t,n,n,null,e.helper,a);d.preventTargetExpand=!1,t.trigger("nodeDragStop",d,function(n){t.dragParent=n.draggedParentNode,t.preventExpand=n.preventTargetExpand,n.cancel&&(e.helper.parentNode&&i.i(s.detach)(e.helper),document.body.style.cursor="",o=!1),t.dragStartAction=!1})}}),this.dropObj=new s.Droppable(this.element,{out:function(e){!i.i(s.isNullOrUndefined)(e)&&!e.target.classList.contains("e-sibling")&&t.dropObj.dragData.default&&t.dropObj.dragData.default.helper.classList.contains(c)&&(document.body.style.cursor="not-allowed")},over:function(e){document.body.style.cursor=""},drop:function(e){t.dropAction(e)}})},t.prototype.dragCancelAction=function(e){i.i(s.detach)(e),i.i(s.removeClass)([this.element],"e-dragging"),this.dragStartAction=!1},t.prototype.dragAction=function(e,t){var n=i.i(s.closest)(e.target,".e-droppable"),r=i.i(s.closest)(e.target,"."+x),o=i.i(s.select)("div."+C,t);i.i(s.removeClass)([o],[S,I,"e-drop-out","e-no-drop"]),this.removeVirtualEle(),document.body.style.cursor="";var a=e.target.classList;if(this.fullRowSelect&&!r&&!i.i(s.isNullOrUndefined)(a)&&a.contains(E)&&(r=e.target.nextElementSibling),n){var l=i.i(s.closest)(e.target,"."+f),d=i.i(s.closest)(e.target,"."+O),h=i.i(s.closest)(e.target,"."+p),m=i.i(s.closest)(e.target,"."+u);if(!n.classList.contains(c)||r&&!l.isSameNode(this.dragLi)&&!this.isDescendant(this.dragLi,l))if(this.hasTemplate&&l){var v=i.i(s.select)(this.fullRowSelect?"."+E:"."+x,l);if(e&&!m&&!h&&e.event.offsetY<7&&!d||m&&e.event.offsetY<5||h&&e.event.offsetX<3){var g=this.fullRowSelect?1:0;this.appendIndicator(l,o,g)}else if(e&&!m&&!h&&!d&&v&&e.event.offsetY>v.offsetHeight-10||m&&e.event.offsetY>19||h&&e.event.offsetX>19){var g=this.fullRowSelect?2:1;this.appendIndicator(l,o,g)}else i.i(s.addClass)([o],S)}else if(l&&e&&!m&&!h&&e.event.offsetY<7&&!d||m&&e.event.offsetY<5||h&&e.event.offsetX<3){var g=this.fullRowSelect?1:0;this.appendIndicator(l,o,g)}else if(l&&e&&!m&&!h&&e.target.offsetHeight>0&&e.event.offsetY>e.target.offsetHeight-10&&!d||m&&e.event.offsetY>19||h&&e.event.offsetX>19){var g=this.fullRowSelect?2:1;this.appendIndicator(l,o,g)}else i.i(s.addClass)([o],S);else"LI"!==e.target.nodeName||l.isSameNode(this.dragLi)||this.isDescendant(this.dragLi,l)?e.target.classList.contains("e-sibling")?i.i(s.addClass)([o],I):i.i(s.addClass)([o],"e-drop-out"):(i.i(s.addClass)([o],I),this.renderVirtualEle(e))}else i.i(s.addClass)([o],"e-no-drop"),document.body.style.cursor="not-allowed";var y,b=i.i(s.closest)(e.target,".e-list-item");b&&(y=parseInt(b.getAttribute("aria-level"),10));var N=this.getDragEvent(e.event,this,e.target,e.target,null,t,y);N.dropIndicator&&i.i(s.removeClass)([o],N.dropIndicator),this.trigger("nodeDragging",N),N.dropIndicator&&i.i(s.addClass)([o],N.dropIndicator)},t.prototype.appendIndicator=function(e,t,n){i.i(s.addClass)([t],I);var r=this.createElement("div",{className:"e-sibling"});e.insertBefore(r,e.children[n])},t.prototype.dropAction=function(e){var t,r,o,a=e.event.offsetY,l=e.target,d=!1,h=[],p=[];o=e.dragData.draggable;for(var u=0;u<o.ej2_instances.length;u++)if(o.ej2_instances[u]instanceof T){t=o.ej2_instances[u];break}if(t&&t.dragTarget){var m=t.dragTarget,v=i.i(s.closest)(m,"."+f),y=i.i(s.closest)(l,"."+f);if(p.push(v),null==y&&l.classList.contains(c)&&(y=l.firstElementChild),i.i(s.detach)(e.droppedElement),document.body.style.cursor="",!y||y.isSameNode(v)||this.isDescendant(v,y))return void(this.fields.dataSource instanceof n.DataManager==!1&&(this.preventExpand=!1));if(t.allowMultiSelection&&v.classList.contains(g)){var b=i.i(s.selectAll)("."+g,t.element);if(p=b,e.target.offsetHeight<=33&&a>e.target.offsetHeight-10&&a>6)for(var C=b.length-1;C>=0;C--)y.isSameNode(b[C])||this.isDescendant(b[C],y)||this.appendNode(l,b[C],y,e,t,a);else for(var x=0;x<b.length;x++)y.isSameNode(b[x])||this.isDescendant(b[x],y)||this.appendNode(l,b[x],y,e,t,a)}else this.appendNode(l,v,y,e,t,a);r=parseInt(v.getAttribute("aria-level"),10),d=!0}this.fields.dataSource instanceof n.DataManager==!1&&(this.preventExpand=!1);for(var S=0;S<p.length;S++)h.push(this.getNode(p[S]));this.trigger("nodeDropped",this.getDragEvent(e.event,t,l,e.target,e.dragData.draggedElement,null,r,d)),t.element.id!==this.element.id&&(t.triggerEvent("nodeDropped",h),this.isNodeDropped=!0,this.fields.dataSource=this.treeData),this.triggerEvent("nodeDropped",h)},t.prototype.appendNode=function(e,t,n,r,o,a){var l=i.i(s.closest)(e,"."+O),d=i.i(s.closest)(r.target,"."+p),h=i.i(s.closest)(r.target,"."+u);t.classList.contains("e-disable")||l||!(h&&r.event.offsetY<5||d&&r.event.offsetX<3||h&&r.event.offsetY>19||d&&r.event.offsetX>19||!h&&!d)?this.dropAsChildNode(t,n,o,null,r,a,!0):"LI"===e.nodeName?this.dropAsSiblingNode(t,n,r,o):e.firstElementChild&&e.classList.contains(c)?"UL"===e.firstElementChild.nodeName&&this.dropAsSiblingNode(t,n,r,o):e.classList.contains("e-icon-collapsible")||e.classList.contains("e-icon-expandable")?this.dropAsSiblingNode(t,n,r,o):this.dropAsChildNode(t,n,o,null,r,a),this.showCheckBox&&this.ensureIndeterminate()},t.prototype.dropAsSiblingNode=function(e,t,n,r){var o,a=i.i(s.closest)(t,"."+v),l=i.i(s.closest)(e,"."+v),d=i.i(s.closest)(l,"."+f);if(n.target.offsetHeight>0&&n.event.offsetY>n.target.offsetHeight-2?o=!1:n.event.offsetY<2?o=!0:(n.target.classList.contains("e-icon-expandable")||n.target.classList.contains("e-icon-collapsible"))&&(n.event.offsetY<5||n.event.offsetX<3?o=!0:(n.event.offsetY>15||n.event.offsetX>17)&&(o=!1)),n.target.classList.contains("e-icon-expandable")||n.target.classList.contains("e-icon-collapsible")){var h=n.target.closest("li");a.insertBefore(e,o?h:h.nextElementSibling)}else a.insertBefore(e,o?n.target:n.target.nextElementSibling);this.moveData(e,t,a,o,r),this.updateElement(l,d),this.updateAriaLevel(e),r.element.id===this.element.id?this.updateList():(r.updateInstance(),this.updateInstance())},t.prototype.dropAsChildNode=function(e,t,n,r,o,a,l){var d,h=i.i(s.closest)(e,"."+v),c=i.i(s.closest)(h,"."+f),p=i.i(s.closest)(t,"."+v);if(o&&o.target&&(d=i.i(s.select)(this.fullRowSelect?"."+E:"."+x,t)),o&&a<7&&!l)p.insertBefore(e,t),this.moveData(e,t,p,!0,n);else if(o&&o.target.offsetHeight>0&&a>o.target.offsetHeight-10&&!l&&!this.hasTemplate)p.insertBefore(e,t.nextElementSibling),this.moveData(e,t,p,!1,n);else if(this.hasTemplate&&d&&a>d.offsetHeight-10&&!l)p.insertBefore(e,t.nextElementSibling),this.moveData(e,t,p,!1,n);else{var u=this.expandParent(t),m=u.childNodes[r];u.insertBefore(e,m),this.moveData(e,m,u,!0,n)}this.updateElement(h,c),this.updateAriaLevel(e),n.element.id===this.element.id?this.updateList():(n.updateInstance(),this.updateInstance())},t.prototype.moveData=function(e,t,n,r,o){var a=i.i(s.closest)(n,"."+f),l=this.getId(e),d=o.updateChildField(o.treeData,o.fields,l,null,null,!0),h=this.getId(t),c=this.getDataPos(this.treeData,this.fields,h),p=this.getId(a);if(1===this.dataType){this.updateField(this.treeData,this.fields,p,"hasChildren",!0);var u=i.i(s.isNullOrUndefined)(c)?this.treeData.length:r?c:c+1;if(i.i(s.isNullOrUndefined)(p)&&!this.hasPid)delete d[0][this.fields.parentID];else{var m=this.isNumberTypeId?parseFloat(p):p;i.i(s.setValue)(this.fields.parentID,m,d[0])}if(this.treeData.splice(u,0,d[0]),o.element.id!==this.element.id){var v=o.removeChildNodes(l);u++;for(var g=0,y=v.length;g<y;g++)this.treeData.splice(u,0,v[g]),u++;o.groupedData=o.getGroupedData(o.treeData,o.fields.parentID)}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.addChildData(this.treeData,this.fields,p,d,r?c:c+1)},t.prototype.expandParent=function(e){var t=i.i(s.select)("div."+C,e);t&&t.classList.contains(u)&&!0!==this.preventExpand&&this.expandAction(e,t,null);var n=i.i(s.select)("."+v,e);if(!0===this.preventExpand&&!n&&t&&this.renderChildNodes(e),n=i.i(s.select)("."+v,e),i.i(s.isNullOrUndefined)(n)||!0!==this.preventExpand||(n.style.display="none"),i.i(s.isNullOrUndefined)(n)||!1!==this.preventExpand||(n.style.display="block"),i.i(s.isNullOrUndefined)(n)&&!0===this.preventExpand){i.i(s.isNullOrUndefined)(t)&&r.ListBase.generateIcon(this.createElement,e,u,this.listBaseOption);var o=i.i(s.select)("div."+C,e);o&&o.classList.add("e-icon-expandable"),n=r.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),o?i.i(s.removeClass)([o],p):r.ListBase.generateIcon(this.createElement,e,u,this.listBaseOption),e.setAttribute("aria-expanded","false"),n.style.display="none"}if(i.i(s.isNullOrUndefined)(n)){var a=this.expandArgs;(i.i(s.isNullOrUndefined)(a)||"nodeExpanding"!=a.name)&&this.trigger("nodeExpanding",this.getExpandEvent(e,null)),i.i(s.isNullOrUndefined)(t)&&r.ListBase.generateIcon(this.createElement,e,p,this.listBaseOption);var o=i.i(s.select)("div."+C,e);o?i.i(s.removeClass)([o],u):(r.ListBase.generateIcon(this.createElement,e,p,this.listBaseOption),o=i.i(s.select)("div."+C,e),i.i(s.removeClass)([o],u)),n=r.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(n),this.addExpand(e),this.trigger("nodeExpanded",this.getExpandEvent(e,null))}return n},t.prototype.updateElement=function(e,t){if(t&&0===e.childElementCount){var n=i.i(s.select)("div."+C,t);i.i(s.detach)(e),i.i(s.detach)(n);var r=this.getId(t);this.updateField(this.treeData,this.fields,r,"hasChildren",!1),this.removeExpand(t,!0)}},t.prototype.updateAriaLevel=function(e){var t=this.parents(e,"."+v).length;e.setAttribute("aria-level",""+t),this.updateChildAriaLevel(i.i(s.select)("."+v,e),t+1)},t.prototype.updateChildAriaLevel=function(e,t){if(!i.i(s.isNullOrUndefined)(e))for(var n=e.childNodes,r=0,o=n.length;r<o;r++){var a=n[r];a.setAttribute("aria-level",""+t),this.updateChildAriaLevel(i.i(s.select)("."+v,a),t+1)}},t.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:"e-sibling"}),s=this.fullRowSelect?t?1:2:t?0:1;e.target.insertBefore(i,e.target.children[s])},t.prototype.removeVirtualEle=function(){var e=i.i(s.select)(".e-sibling");e&&i.i(s.detach)(e)},t.prototype.destroyDrag=function(){this.dragObj&&this.dropObj&&(this.dragObj.destroy(),this.dropObj.destroy())},t.prototype.getDragEvent=function(e,t,r,o,a,l,d,h){var p=r?i.i(s.closest)(r,"."+f):null,u=p?this.getNodeData(p):null,m=t?t.dragLi:a,v=t?t.dragData:null,g=r?this.parents(r,"."+f):null,y=t.dragLi.parentElement,b=t.dragLi?i.i(s.closest)(y,"."+f):null,x=null,E=null,N=[I,S,"e-drop-out","e-no-drop"],w=null,O=!0===h?m:p,L=O?i.i(s.closest)(O,".e-list-parent"):null,k=0,A=null;if(b=t.dragLi&&null===b?i.i(s.closest)(y,"."+c):b,b=!0===h?this.dragParent:b,l)for(;k<4;){if(i.i(s.select)("."+C,l).classList.contains(N[k])){w=N[k];break}k++}if(L){var T=0;for(k=0;k<L.childElementCount;k++){if(T=!0!==h&&L.children[k]===m&&p!==m?++T:T,!0!==h&&L.children[k].classList.contains("e-hover")){E=e.offsetY>=23?k+1:k;break}if(L.children[k]===O){e.offsetY,E=k;break}}E=0!==T?--E:E,A="e-drop-in"==w?"Inside":e.offsetY<7?"Before":"After"}if(r&&(x=0===g.length?null:r.classList.contains(f)?g[0]:g[1]),p===m&&(x=p),r&&o.offsetHeight<=33&&e.offsetY<o.offsetHeight-10&&e.offsetY>6&&(x=p,!0!==h)){d=++d;var P=x?i.i(s.select)(".e-list-parent",x):null;if(E=P?P.children.length:0,!(this.fields.dataSource instanceof n.DataManager)&&null===P&&x){var D=x.hasAttribute("data-uid")?this.getChildNodes(this.fields.dataSource,x.getAttribute("data-uid").toString()):null;E=D?D.length:0}}return{cancel:!1,clonedNode:l,event:e,draggedNode:m,draggedNodeData:v,droppedNode:p,droppedNodeData:u,dropIndex:E,dropLevel:d,draggedParentNode:b,dropTarget:x,dropIndicator:w,target:o,position:A}},t.prototype.addFullRow=function(e){var t=this.liList.length;if(e)for(var n=0;n<t;n++)this.createFullRow(this.liList[n]);else for(var n=0;n<t;n++){var r=i.i(s.select)("."+E,this.liList[n]);i.i(s.detach)(r)}},t.prototype.createFullRow=function(e){var t=this.createElement("div",{className:E});e.insertBefore(t,e.childNodes[0])},t.prototype.addMultiSelect=function(e){if(e)for(var t=i.i(s.selectAll)('.e-list-item:not([aria-selected="true"])',this.element),n=0,r=t;n<r.length;n++){var o=r[n];o.setAttribute("aria-selected","false")}else for(var t=i.i(s.selectAll)('.e-list-item[aria-selected="false"]',this.element),a=0,l=t;a<l.length;a++){var o=l[a];o.removeAttribute("aria-selected")}},t.prototype.collapseByLevel=function(e,t,n){if(t>0&&!i.i(s.isNullOrUndefined)(e))for(var r=this.getVisibleNodes(n,e.childNodes),o=0,a=r.length;o<a;o++){var l=r[o],d=i.i(s.select)("."+p,i.i(s.select)("."+x,l));i.i(s.isNullOrUndefined)(d)||this.collapseNode(l,d,null),this.collapseByLevel(i.i(s.select)("."+v,l),t-1,n)}},t.prototype.collapseAllNodes=function(e){for(var t=this.getVisibleNodes(e,i.i(s.selectAll)("."+p,this.element)),n=0,r=t.length;n<r;n++){var o=t[n],a=i.i(s.closest)(o,"."+f);this.collapseNode(a,o,null)}},t.prototype.expandByLevel=function(e,t,n){if(t>0&&!i.i(s.isNullOrUndefined)(e))for(var r=this.getVisibleNodes(n,e.childNodes),o=0,a=r.length;o<a;o++){var l=r[o],d=i.i(s.select)("."+u,i.i(s.select)("."+x,l));i.i(s.isNullOrUndefined)(d)||this.expandAction(l,d,null),this.expandByLevel(i.i(s.select)("."+v,l),t-1,n)}},t.prototype.expandAllNodes=function(e){for(var t=this.getVisibleNodes(e,i.i(s.selectAll)("."+u,this.element)),n=0,r=t.length;n<r;n++){var o=t[n],a=i.i(s.closest)(o,"."+f);this.expandAction(a,o,null,!0)}},t.prototype.getVisibleNodes=function(e,t){var n=Array.prototype.slice.call(t);if(e)for(var r=0;r<n.length;r++)i.i(s.isVisible)(n[r])||(n.splice(r,1),r--);return n},t.prototype.removeNode=function(e){var t=i.i(s.closest)(e,"."+v),n=i.i(s.closest)(t,"."+f);i.i(s.isNullOrUndefined)(this.nodeTemplateFn)||this.destroyTemplate(e),i.i(s.detach)(e),this.updateElement(t,n),this.removeData(e)},t.prototype.updateInstance=function(){this.updateList(),this.updateSelectedNodes(),this.updateExpandedNodes()},t.prototype.updateList=function(){this.liList=Array.prototype.slice.call(i.i(s.selectAll)("."+f,this.element))},t.prototype.updateSelectedNodes=function(){this.setProperties({selectedNodes:[]},!0);var e=i.i(s.selectAll)("."+g,this.element);this.selectGivenNodes(e)},t.prototype.updateExpandedNodes=function(){this.setProperties({expandedNodes:[]},!0);for(var e=i.i(s.selectAll)('[aria-expanded="true"]',this.element),t=0,n=e.length;t<n;t++)this.addExpand(e[t])},t.prototype.removeData=function(e){if(1===this.dataType){var t=new n.DataManager(this.treeData),i=this.getId(e),s={},r=this.isNumberTypeId?parseFloat(i):i;s[this.fields.id]=r,t.remove(this.fields.id,s),this.removeChildNodes(i)}else{var i=this.getId(e);this.updateChildField(this.treeData,this.fields,i,null,null,!0)}},t.prototype.removeChildNodes=function(e){var t=this.getChildGroup(this.groupedData,e,!1),r=[];if(t)for(var o=0,a=t.length;o<a;o++){var l=new n.DataManager(this.treeData),d=i.i(s.getValue)(this.fields.id,t[o]).toString(),h={},c=this.isNumberTypeId?parseFloat(d):d;h[this.fields.id]=c;var p=l.remove(this.fields.id,h);r.push(p[0]),this.removeChildNodes(d)}return r},t.prototype.doGivenAction=function(e,t,n){for(var r=0,o=e.length;r<o;r++){var a=this.getElement(e[r]);if(!i.i(s.isNullOrUndefined)(a)){var l=i.i(s.select)("."+t,i.i(s.select)("."+x,a));i.i(s.isNullOrUndefined)(l)||(n?this.expandAction(a,l,null):this.collapseNode(a,l,null))}}},t.prototype.addGivenNodes=function(e,t,n,o,a){if(0!==e.length){var l=this.getSortedData(e),d=t?parseFloat(t.getAttribute("aria-level"))+1:1;o&&this.updateMapper(d);var h,c,p=r.ListBase.createListItemFromJson(this.createElement,l,this.listBaseOption,d),f=this.getId(t);i.i(s.isNullOrUndefined)(t)||(c=i.i(s.select)("div."+C,t)),1===this.dataType&&c&&c.classList.contains(u)&&!i.i(s.isNullOrUndefined)(this.element.offsetParent)&&!this.element.offsetParent.parentElement.classList.contains("e-filemanager")&&(this.preventExpand=!0),1!==this.dataType&&(this.addChildData(this.treeData,this.fields,f,e,n),this.isFirstRender=!1);var m;if(m=a||(t?this.expandParent(t):i.i(s.select)("."+v,this.element)),h=m.childNodes[n],!this.isFirstRender||1===this.dataType){var g=this.expandArgs;if(h||"None"===this.sortOrder){for(var y=0;y<p.length;y++)m.insertBefore(p[y],h);if(1===this.dataType&&!i.i(s.isNullOrUndefined)(t)&&!i.i(s.isNullOrUndefined)(this.element.offsetParent)&&!this.element.offsetParent.parentElement.classList.contains("e-filemanager")){this.preventExpand=!1;var b=i.i(s.select)("div."+C,t);b&&b.classList.contains(u)&&(i.i(s.isNullOrUndefined)(g)||"nodeExpanding"!=g.name)&&this.expandAction(t,b,null)}}if(!h&&("Ascending"===this.sortOrder||"Descending"===this.sortOrder))if(0===m.childNodes.length){for(var y=0;y<p.length;y++)m.insertBefore(p[y],h);if(1===this.dataType&&!i.i(s.isNullOrUndefined)(t)&&!i.i(s.isNullOrUndefined)(this.element.offsetParent)&&!this.element.offsetParent.parentElement.classList.contains("e-filemanager")){this.preventExpand=!1;var b=i.i(s.select)("div."+C,t);b&&b.classList.contains(u)&&(i.i(s.isNullOrUndefined)(g)||"nodeExpanding"!=g.name)&&this.expandAction(t,b,null)}}else for(var x=m.childNodes,y=0;y<p.length;y++)for(var S=0;S<x.length;S++){var I="Ascending"===this.sortOrder?x[S].textContent.toUpperCase()>p[y].innerText.toUpperCase():x[S].textContent.toUpperCase()<p[y].innerText.toUpperCase();if(I){m.insertBefore(p[y],x[S]);break}m.insertBefore(p[y],x[x.length])}}if(1===this.dataType){this.updateField(this.treeData,this.fields,f,"hasChildren",!0);for(var E=this.getId(h),N=i.i(s.isNullOrUndefined)(E)?this.treeData.length:this.getDataPos(this.treeData,this.fields,E),S=0;S<e.length;S++){if(!i.i(s.isNullOrUndefined)(f)){var w=this.isNumberTypeId?parseFloat(f):f;i.i(s.setValue)(this.fields.parentID,w,e[S])}this.treeData.splice(N,0,e[S]),N++}}this.finalizeNode(m)}},t.prototype.updateMapper=function(e){var t=1===e?this.fields:this.getChildFields(this.fields,e-1,1);this.updateListProp(t)},t.prototype.updateListProp=function(e){var t=this.getActualProperties(e);this.listBaseOption.fields=t,this.listBaseOption.fields.url=t.hasOwnProperty("navigateUrl")?t.navigateUrl:"navigateUrl"},t.prototype.getDataPos=function(e,t,r){for(var o=null,a=0,l=e.length;a<l;a++){var d=i.i(s.getValue)(t.id,e[a]);if(e[a]&&d&&d.toString()===r)return a;if("string"!=typeof t.child||i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[a]))){if(this.fields.dataSource instanceof n.DataManager&&!i.i(s.isNullOrUndefined)(i.i(s.getValue)("child",e[a]))){var h=i.i(s.getValue)("child",e[a]);if(null!==(o=this.getDataPos(h,this.getChildMapper(t),r)))break}}else{var c=i.i(s.getValue)(t.child,e[a]);if(null!==(o=this.getDataPos(c,this.getChildMapper(t),r)))break}}return o},t.prototype.addChildData=function(e,t,r,o,a){var l;if(i.i(s.isNullOrUndefined)(r)){a=i.i(s.isNullOrUndefined)(a)?e.length:a;for(var d=0,h=o.length;d<h;d++)e.splice(a,0,o[d]),a++;return l}for(var c=0,p=e.length;c<p;c++){var u=i.i(s.getValue)(t.id,e[c]);if(e[c]&&u&&u.toString()===r){if("string"==typeof t.child&&e[c].hasOwnProperty(t.child)&&null!==e[c][t.child]||this.fields.dataSource instanceof n.DataManager&&e[c].hasOwnProperty("child")){var f="string"==typeof t.child?t.child:"child",m=i.i(s.getValue)(f,e[c]);i.i(s.isNullOrUndefined)(m)&&(m=[]),a=i.i(s.isNullOrUndefined)(a)?m.length:a;for(var d=0,h=o.length;d<h;d++)m.splice(a,0,o[d]),a++}else{var f="string"==typeof t.child?t.child:"child";e[c][f]=o}return!0}if("string"!=typeof t.child||i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[c]))){if(this.fields.dataSource instanceof n.DataManager&&!i.i(s.isNullOrUndefined)(i.i(s.getValue)("child",e[c]))){var m=i.i(s.getValue)("child",e[c]);if(void 0!==(l=this.addChildData(m,this.getChildMapper(t),r,o,a)))break}}else{var v=i.i(s.getValue)(t.child,e[c]);if(void 0!==(l=this.addChildData(v,this.getChildMapper(t),r,o,a)))break}}return l},t.prototype.doDisableAction=function(e){var t=this.nodeType(e),n=this.checkValidId(t);this.validArr=[];for(var r=0,o=n.length;r<o;r++){var a=n[r][this.fields.id].toString();a&&-1===this.disableNode.indexOf(a)&&this.disableNode.push(a);var l=this.getElement(a);l&&(l.setAttribute("aria-disabled","true"),i.i(s.addClass)([l],"e-disable"))}},t.prototype.doEnableAction=function(e){for(var t=this.nodeType(e),n=0,r=t.length;n<r;n++){var o=this.getElement(t[n]),a=t[n];a&&-1!==this.disableNode.indexOf(a)&&this.disableNode.splice(this.disableNode.indexOf(a),1),o&&(o.removeAttribute("aria-disabled"),i.i(s.removeClass)([o],"e-disable"))}},t.prototype.nodeType=function(e){for(var t=[],i=0,s=e.length;i<s;i++){var n=void 0;"string"==typeof e[i]?n=e[i]?e[i].toString():null:"object"==typeof e[i]&&(n=e[i]?e[i].getAttribute("data-uid").toString():null),-1==t.indexOf(n)&&t.push(n)}return t},t.prototype.checkValidId=function(e){var t=this;if(1===this.dataType)this.validArr=this.treeData.filter(function(i){return-1!==e.indexOf(i[t.fields.id]?i[t.fields.id].toString():null)});else if(2===this.dataType)for(var n=0;n<this.treeData.length;n++){var r=this.treeData[n][this.fields.id]?this.treeData[n][this.fields.id].toString():null;-1!==e.indexOf(r)&&this.validArr.push(this.treeData[n]);var o=i.i(s.getValue)(this.fields.child.toString(),this.treeData[n]);o&&this.filterNestedChild(o,e)}return this.validArr},t.prototype.filterNestedChild=function(e,t){for(var n=0;n<e.length;n++){var r=e[n][this.fields.id]?e[n][this.fields.id].toString():null;-1!==t.indexOf(r)&&this.validArr.push(e[n]);var o=i.i(s.getValue)(this.fields.child.toString(),e[n]);o&&this.filterNestedChild(o,t)}},t.prototype.setTouchClass=function(){var e=i.i(s.closest)(this.element,".e-bigger");this.touchClass=i.i(s.isNullOrUndefined)(e)?"":"e-small"},t.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,r=s.length;n<r;n++)this.updateField(this.treeData,this.fields,s[n],"expanded",!0);if(this.showCheckBox){this.removeField(this.treeData,this.fields,["isChecked"]);for(var o=this.checkedNodes,a=0,r=o.length;a<r;a++)this.updateField(this.treeData,this.fields,o[a],"isChecked",!0)}},t.prototype.removeField=function(e,t,r){if(!i.i(s.isNullOrUndefined)(e)&&!i.i(s.isNullOrUndefined)(t))for(var o=0,a=e.length;o<a;o++){for(var l=0;l<r.length;l++){var d=this.getMapperProp(t,r[l]);i.i(s.isNullOrUndefined)(e[o][d])||delete e[o][d]}"string"!=typeof t.child||i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[o]))?this.fields.dataSource instanceof n.DataManager&&!i.i(s.isNullOrUndefined)(i.i(s.getValue)("child",e[o]))&&this.removeField(i.i(s.getValue)("child",e[o]),this.getChildMapper(t),r):this.removeField(i.i(s.getValue)(t.child,e[o]),this.getChildMapper(t),r)}},t.prototype.getMapperProp=function(e,t){switch(t){case"selected":return i.i(s.isNullOrUndefined)(e.selected)?"selected":e.selected;case"expanded":return i.i(s.isNullOrUndefined)(e.expanded)?"expanded":e.expanded;case"isChecked":return i.i(s.isNullOrUndefined)(e.isChecked)?"isChecked":e.isChecked;case"hasChildren":return i.i(s.isNullOrUndefined)(e.hasChildren)?"hasChildren":e.hasChildren;default:return t}},t.prototype.updateField=function(e,t,r,o,a){if(!i.i(s.isNullOrUndefined)(r))if(1===this.dataType){var l=this.isNumberTypeId?parseFloat(r):r,d=new n.DataManager(this.treeData).executeLocal((new n.Query).where(t.id,"equal",l,!1));i.i(s.setValue)(this.getMapperProp(t,o),a,d[0])}else this.updateChildField(e,t,r,o,a)},t.prototype.updateChildField=function(e,t,r,o,a,l){var d;if(i.i(s.isNullOrUndefined)(e))return d;for(var h=0,c=e.length;h<c;h++){var p=i.i(s.getValue)(t.id,e[h]);if(e[h]&&p&&p.toString()===r)return l?d=e.splice(h,1):(i.i(s.setValue)(this.getMapperProp(t,o),a,e[h]),d=[]),d;if("string"!=typeof t.child||i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[h]))){if(this.fields.dataSource instanceof n.DataManager&&!i.i(s.isNullOrUndefined)(i.i(s.getValue)("child",e[h]))){var u=i.i(s.getValue)("child",e[h]);if(void 0!==(d=this.updateChildField(u,this.getChildMapper(t),r,o,a,l)))break}}else{var f=i.i(s.getValue)(t.child,e[h]);if(void 0!==(d=this.updateChildField(f,this.getChildMapper(t),r,o,a,l)))break}}return d},t.prototype.triggerEvent=function(e,t){if(this.renderReactTemplates(),"addNodes"===e){for(var n=[],r=0;r<t.length;r++)n.push(this.getNode(this.getElement(i.i(s.isNullOrUndefined)(t[r][this.fields.id])?i.i(s.getValue)(this.fields.id,t[r]).toString():null)));t=n}var o={data:this.treeData,action:e,nodeData:t};this.trigger("dataSourceChanged",o)},t.prototype.wireInputEvents=function(e){s.EventHandler.add(e,"blur",this.inputFocusOut,this)},t.prototype.wireEditingEvents=function(e){var t=this;if(e&&!this.disabled){var i=this;this.touchEditObj=new s.Touch(this.element,{tap:function(e){t.isDoubleTapped(e)&&2===e.tapCount&&(e.originalEvent.preventDefault(),i.editingHandler(e.originalEvent))}})}else this.touchEditObj&&this.touchEditObj.destroy()},t.prototype.wireClickEvent=function(e){if(e){var t=this;this.touchClickObj=new s.Touch(this.element,{tap:function(e){t.clickHandler(e)}})}else this.touchClickObj&&this.touchClickObj.destroy()},t.prototype.wireExpandOnEvent=function(e){var t=this;if(e){var i=this;this.touchExpandObj=new s.Touch(this.element,{tap:function(e){("Click"===t.expandOnType||"DblClick"===t.expandOnType&&t.isDoubleTapped(e)&&2===e.tapCount)&&3!==e.originalEvent.which&&i.expandHandler(e)}})}else this.touchExpandObj&&this.touchExpandObj.destroy()},t.prototype.mouseDownHandler=function(e){this.mouseDownStatus=!0,(e.shiftKey||e.ctrlKey)&&e.preventDefault(),e.ctrlKey&&this.allowMultiSelection&&s.EventHandler.add(this.element,"contextmenu",this.preventContextMenu,this)},t.prototype.preventContextMenu=function(e){e.preventDefault()};t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"mousedown",this.mouseDownHandler,this),this.wireClickEvent(!0),"None"!==this.expandOnType&&this.wireExpandOnEvent(!0),s.EventHandler.add(this.element,"mouseover",this.onMouseOver,this),s.EventHandler.add(this.element,"mouseout",this.onMouseLeave,this),this.keyboardModule=new s.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler),this.wireClickEvent(!1),this.wireExpandOnEvent(!1),s.EventHandler.remove(this.element,"mouseover",this.onMouseOver),s.EventHandler.remove(this.element,"mouseout",this.onMouseLeave),this.disabled||this.keyboardModule.destroy()},t.prototype.parents=function(e,t){for(var n=[],r=e.parentNode;!i.i(s.isNullOrUndefined)(r);)i.i(s.matches)(r,t)&&n.push(r),r=r.parentNode;return n},t.prototype.isDoubleTapped=function(e){var t,n=e.originalEvent.target;return n&&e.tapCount&&(1===e.tapCount?this.firstTap=i.i(s.closest)(n,"."+f):2===e.tapCount&&(t=i.i(s.closest)(n,"."+f))),this.firstTap===t},t.prototype.isDescendant=function(e,t){for(var n=t.parentNode;!i.i(s.isNullOrUndefined)(n);){if(n===e)return!0;n=n.parentNode}return!1},t.prototype.showSpinner=function(e){i.i(s.addClass)([e],y),i.i(l.createSpinner)({target:e,width:s.Browser.isDevice?16:14},this.createElement),i.i(l.showSpinner)(e)},t.prototype.hideSpinner=function(e){i.i(l.hideSpinner)(e),e.innerHTML="",i.i(s.removeClass)([e],y)},t.prototype.setCheckedNodes=function(e){e=JSON.parse(JSON.stringify(e)),this.uncheckAll(this.checkedNodes),this.setIndeterminate(e),e.length>0&&this.checkAll(e)},t.prototype.setValidCheckedNode=function(e){if(1===this.dataType){var t=this.fields,r=new n.DataManager(this.treeData).executeLocal((new n.Query).where(t.id,"equal",e,!0));if(r[0]&&(this.setChildCheckState(r,e,r[0]),this.autoCheck)){for(var o=r[0][this.fields.parentID]?r[0][this.fields.parentID].toString():null,a=this.getChildNodes(this.treeData,o),l=0,d=0;d<a.length;d++){var h=a[d][this.fields.id].toString();-1!==this.checkedNodes.indexOf(h)&&l++}l===a.length&&-1===this.checkedNodes.indexOf(o)&&o&&this.checkedNodes.push(o)}}else if(2===this.dataType)for(var c=0;c<this.treeData.length;c++){var p=this.treeData[c][this.fields.id]?this.treeData[c][this.fields.id].toString():"";if(p===e&&-1===this.checkedNodes.indexOf(e)){this.checkedNodes.push(e);break}var u=i.i(s.getValue)(this.fields.child.toString(),this.treeData[c]);u&&this.setChildCheckState(u,e,this.treeData[c])}},t.prototype.setChildCheckState=function(e,t,n){var r,o=0;if(1===this.dataType){n&&(r=n[this.fields.id]?n[this.fields.id].toString():null);for(var a=0;a<e.length;a++){var l=e[a][this.fields.id]?e[a][this.fields.id].toString():null;n&&r&&this.autoCheck&&-1!==this.checkedNodes.indexOf(r)&&-1===this.checkedNodes.indexOf(l)&&this.checkedNodes.push(l),l===t&&-1===this.checkedNodes.indexOf(t)&&this.checkedNodes.push(t);var d=this.getChildNodes(this.treeData,l);d&&this.setChildCheckState(d,t,n)}}else{n&&(r=n[this.fields.id]?n[this.fields.id].toString():"");for(var a=0;a<e.length;a++){var h=e[a][this.fields.id]?e[a][this.fields.id].toString():"";n&&r&&this.autoCheck&&-1!==this.checkedNodes.indexOf(r)&&-1===this.checkedNodes.indexOf(h)&&this.checkedNodes.push(h),h===t&&-1===this.checkedNodes.indexOf(t)&&this.checkedNodes.push(t);var d=i.i(s.getValue)(this.fields.child.toString(),e[a]);d&&this.setChildCheckState(d,t,e[a]),-1!==this.checkedNodes.indexOf(h)&&this.autoCheck&&o++,o===e.length&&-1===this.checkedNodes.indexOf(r)&&this.autoCheck&&this.checkedNodes.push(r)}}},t.prototype.setIndeterminate=function(e){for(var t=0;t<e.length;t++)this.setValidCheckedNode(e[t])},t.prototype.updatePosition=function(e,t,i,s){if(1===this.dataType){var n=this.getDataPos(this.treeData,this.fields,e);if(this.treeData.splice(n,1,t),i){this.removeChildNodes(e);for(var r=0;r<s.length;r++)this.treeData.splice(n,0,s[r]),n++}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.updateChildPosition(this.treeData,this.fields,e,[t],void 0)},t.prototype.updateChildPosition=function(e,t,r,o,a){for(var l,d=0,h=e.length;d<h;d++){var c=i.i(s.getValue)(t.id,e[d]);if(e[d]&&c&&c.toString()===r)return e[d]=o[0],!0;if("string"!=typeof t.child||i.i(s.isNullOrUndefined)(i.i(s.getValue)(t.child,e[d]))){if(this.fields.dataSource instanceof n.DataManager&&!i.i(s.isNullOrUndefined)(i.i(s.getValue)("child",e[d]))){var p=i.i(s.getValue)("child",e[d]);if(void 0!==(l=this.updateChildPosition(p,this.getChildMapper(t),r,o,a)))break}}else{var u=i.i(s.getValue)(t.child,e[d]);if(void 0!==(l=this.updateChildPosition(u,this.getChildMapper(t),r,o,a)))break}}return l},t.prototype.dynamicState=function(){this.setDragAndDrop(this.allowDragAndDrop),this.wireEditingEvents(this.allowEditing),this.disabled?(this.unWireEvents(),this.rippleFn(),this.rippleIconFn()):(this.wireEvents(),this.setRipple())},t.prototype.crudOperation=function(e,t,n,r,o,a,l){var d,h=this,c=this.fields.dataSource,p=[],u=this.getQuery(this.fields),f=this.fields.id,m={addedRecords:[],deletedRecords:[],changedRecords:[]},v=[];t?v=this.nodeType(t):n&&("string"==typeof n?v[0]=n.toString():"object"==typeof n&&(v[0]=n.getAttribute("data-uid").toString()));for(var g=0,y=v.length;g<y;g++){var b=this.getElement(v[g]);if(!i.i(s.isNullOrUndefined)(b)){var C=this.getNodeObject(v[g]);p.push(C)}}switch(e){case"delete":1==t.length?d=c.remove(f,p[0],u.fromTable,u):(m.deletedRecords=p,d=c.saveChanges(m,f,u.fromTable,u)),d.then(function(e){return h.deleteSuccess(v)}).catch(function(e){return h.dmFailure(e)});break;case"update":p[0][this.fields.text]=r,d=c.update(f,p[0],u.fromTable,u),d.then(function(e){return h.editSucess(n,r,l)}).catch(function(e){return h.dmFailure(e,n,l)});break;case"insert":if(1==o.length)d=c.insert(o[0],u.fromTable,u);else{for(var x=[],g=0,y=o.length;g<y;g++)x.push(o[g]);m.addedRecords=x,d=c.saveChanges(m,f,u.fromTable,u)}d.then(function(e){var t=h.getElement(n);h.addSuccess(o,t,a),h.preventExpand=!1}).catch(function(e){return h.dmFailure(e)})}},t.prototype.deleteSuccess=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=this.getElement(e[n]);t.push(this.getNode(o)),i.i(s.isNullOrUndefined)(o)||this.removeNode(o)}this.updateInstance(),1===this.dataType&&(this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)),this.triggerEvent("removeNode",t)},t.prototype.editSucess=function(e,t,n){var r=this.getElement(e),o=i.i(s.select)("."+m,r);this.appendNewText(r,o,t,n)},t.prototype.addSuccess=function(e,t,i){var s,n=t?t.querySelector("."+C):null,r=this;t&&n&&n.classList.contains(u)&&null===t.querySelector("."+v)?r.renderChildNodes(t,null,function(){s=t.querySelector("."+v),r.addGivenNodes(e,t,i,!0,s),r.triggerEvent("addNodes",e)}):(this.addGivenNodes(e,t,i,!0),this.triggerEvent("addNodes",e))},t.prototype.dmFailure=function(e,t,i){t&&this.updatePreviousText(t,i),this.trigger("actionFailure",{error:e})},t.prototype.updatePreviousText=function(e,t){var n=this.getElement(e),r=i.i(s.select)("."+m,n);this.updateText(n,r,this.oldText,t)},t.prototype.getHierarchicalParentId=function(e,t,n){var r=this,o=t.findIndex(function(t){return t[r.fields.id]&&t[r.fields.id].toString()===e});if(-1==o)for(var a=0;a<t.length;a++){var l=i.i(s.getValue)(this.fields.child.toString(),t[a]);if(!i.i(s.isNullOrUndefined)(l)){if(-1!=(o=l.findIndex(function(t){return t[r.fields.id]&&t[r.fields.id].toString()===e}))){n.push(t[a][this.fields.id].toString()),this.getHierarchicalParentId(t[a][this.fields.id].toString(),this.treeData,n);break}this.getHierarchicalParentId(e,l,n)}}return n},t.prototype.onPropertyChanged=function(e,t){for(var r=0,o=Object.keys(e);r<o.length;r++){switch(o[r]){case"allowDragAndDrop":this.setDragAndDrop(this.allowDragAndDrop);break;case"dragArea":this.allowDragAndDrop&&(this.dragObj.dragArea=this.dragArea);break;case"allowEditing":this.wireEditingEvents(this.allowEditing);break;case"allowMultiSelection":if(this.selectedNodes.length>1){var a=this.getElement(this.selectedNodes[0]);this.isLoaded=!1,this.removeSelectAll(),this.selectNode(a,null),this.isLoaded=!0}this.setMultiSelect(this.allowMultiSelection),this.addMultiSelect(this.allowMultiSelection);break;case"allowTextWrap":this.setTextWrap(),this.updateWrap();break;case"checkedNodes":this.showCheckBox&&(this.checkedNodes=t.checkedNodes,this.setCheckedNodes(e.checkedNodes));break;case"autoCheck":this.showCheckBox&&(this.autoCheck=e.autoCheck,this.ensureIndeterminate());break;case"cssClass":this.setCssClass(t.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:i.i(s.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.disabled||this.wireExpandOnEvent(!0);break;case"disabled":this.setDisabledMode(),this.dynamicState();break;case"fields":this.isAnimate=!1,this.isFieldChange=!0,this.initialRender=!0,this.isReact&&(!this.isReact||this.fields.dataSource instanceof n.DataManager)||this.reRenderNodes(),this.initialRender=!1,this.isAnimate=!0,this.isFieldChange=!1;break;case"fullRowSelect":this.setFullRow(this.fullRowSelect),this.addFullRow(this.fullRowSelect),this.allowTextWrap&&(this.setTextWrap(),this.updateWrap());break;case"loadOnDemand":if(!1===this.loadOnDemand&&!this.onLoaded){for(var l=this.element.querySelectorAll("li"),d=0;d<l.length;)"true"!==l[d].getAttribute("aria-expanded")&&this.renderChildNodes(l[d],!0,null,!0),d++;this.onLoaded=!0}break;case"nodeTemplate":this.hasTemplate=!1,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();break;case"fullRowNavigable":this.setProperties({fullRowNavigable:e.fullRowNavigable},!0),this.listBaseOption.itemNavigable=e.fullRowNavigable,this.reRenderNodes()}}},t.prototype.destroy=function(){this.clearTemplate(),this.element.removeAttribute("aria-activedescendant"),this.unWireEvents(),this.wireEditingEvents(!1),this.disabled||(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),this.ulElement=null,this.liList=null,this.startNode=null,this.firstTap=null,this.expandArgs=null,this.dragLi=null,this.dragTarget=null,this.dragParent=null,this.dragObj=null,this.dropObj=null,this.inputObj=null,this.touchEditObj=null,this.touchExpandObj=null,this.touchClickObj=null,e.prototype.destroy.call(this)},t.prototype.addNodes=function(e,t,r,o){if(!i.i(s.isNullOrUndefined)(e)){e=JSON.parse(JSON.stringify(e));var a=this.getElement(t);if(this.preventExpand=o,this.fields.dataSource instanceof n.DataManager)this.isOffline?this.addSuccess(e,a,r):this.crudOperation("insert",null,t,null,e,r,this.preventExpand);else if(2===this.dataType)this.addGivenNodes(e,a,r);else{if(a)this.addGivenNodes(e,a,r);else{e=this.getSortedData(e);for(var l=0;l<e.length;l++){var d=i.i(s.getValue)(this.fields.parentID,e[l]);a=d?this.getElement(d.toString()):d,this.addGivenNodes([e[l]],a,r)}}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}this.updateCheckedStateFromDS(),this.showCheckBox&&a&&this.ensureParentCheckState(a),this.fields.dataSource instanceof n.DataManager==!1&&(this.preventExpand=!1,this.triggerEvent("addNodes",e))}},t.prototype.beginEdit=function(e){var t=this.getElement(e);i.i(s.isNullOrUndefined)(t)||this.disabled||this.createTextbox(t,null)},t.prototype.checkAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!0)},t.prototype.collapseAll=function(e,t,n){i.i(s.isNullOrUndefined)(e)?t>0?this.collapseByLevel(i.i(s.select)("."+v,this.element),t,n):this.collapseAllNodes(n):this.doGivenAction(e,p,!1)},t.prototype.disableNodes=function(e){i.i(s.isNullOrUndefined)(e)||this.doDisableAction(e)},t.prototype.enableNodes=function(e){i.i(s.isNullOrUndefined)(e)||this.doEnableAction(e)},t.prototype.ensureVisible=function(e){var t=[];if(1==this.dataType)for(var n=this.getTreeData(e);0!=n.length&&!i.i(s.isNullOrUndefined)(n[0][this.fields.parentID]);)t.push(n[0][this.fields.parentID].toString()),n=this.getTreeData(n[0][this.fields.parentID].toString());else 2==this.dataType&&(t=this.getHierarchicalParentId(e,this.treeData,t));this.expandAll(t.reverse());var r=this.getElement(e);if(!i.i(s.isNullOrUndefined)(r)){if("object"==typeof e){var o=this.parents(r,"."+f);this.expandAll(o)}setTimeout(function(){r.scrollIntoView({behavior:"smooth"})},450)}},t.prototype.expandAll=function(e,t,n){i.i(s.isNullOrUndefined)(e)?t>0?this.expandByLevel(i.i(s.select)("."+v,this.element),t,n):this.expandAllNodes(n):this.doGivenAction(e,u,!0)},t.prototype.getAllCheckedNodes=function(){return this.checkedNodes},t.prototype.getDisabledNodes=function(){return this.disableNode},t.prototype.getNode=function(e){var t=this.getElement(e);return this.getNodeData(t,!0)},t.prototype.getTreeData=function(e){var t=this.getId(e);if(this.updatePersistProp(),i.i(s.isNullOrUndefined)(t))return this.treeData;var n=this.getNodeObject(t);return i.i(s.isNullOrUndefined)(n)?[]:[n]},t.prototype.moveNodes=function(e,t,r,o){var a=this.getElement(t),l=[];if(!i.i(s.isNullOrUndefined)(a)){for(var d=0;d<e.length;d++){var h=this.getElement(e[d]);l.push(this.getNode(h)),i.i(s.isNullOrUndefined)(h)||a.isSameNode(h)||this.isDescendant(h,a)||(this.preventExpand=o,this.dropAsChildNode(h,a,this,r))}this.fields.dataSource instanceof n.DataManager==!1&&(this.preventExpand=!1),this.triggerEvent("moveNodes",l)}},t.prototype.refreshNode=function(e,t){if(!i.i(s.isNullOrUndefined)(e)&&!i.i(s.isNullOrUndefined)(t)){var n,o=!1;if(1==this.dataType&&t.length>1)o=!0;else if(2==this.dataType&&1===t.length){var a=i.i(s.getValue)(this.fields.child.toString(),t[0]);i.i(s.isNullOrUndefined)(a)||(o=!0)}var l=this.getElement(e);n=l?l.getAttribute("data-uid"):e?e.toString():null,this.refreshData=this.getNodeObject(n),t=JSON.parse(JSON.stringify(t));var d,h;if(1==this.dataType&&o){for(var c=0;c<t.length;c++)if(i.i(s.isNullOrUndefined)(t[c][this.fields.parentID])){h=t[c],t.splice(c,1);break}d=i.i(s.extend)({},this.refreshData,h)}else d=i.i(s.extend)({},this.refreshData,t[0]);if(i.i(s.isNullOrUndefined)(l))return void this.updatePosition(n,d,o,t);this.isRefreshed=!0;var f=parseFloat(l.getAttribute("aria-level")),m=r.ListBase.createListItemFromJson(this.createElement,[d],this.listBaseOption,f),y=i.i(s.select)("."+v,l),b=i.i(s.getValue)(this.fields.child.toString(),d);if(o&&y||o&&!i.i(s.isNullOrUndefined)(b)){var S=l.parentElement,I=Array.prototype.indexOf.call(S.childNodes,l);i.i(s.remove)(l),S.insertBefore(m[0],S.childNodes[I]),this.updatePosition(n,d,o,t),o&&y&&this.expandAll([n])}else{var N=i.i(s.select)("."+x,l),w=i.i(s.select)("."+x,m[0]),O=i.i(s.select)("div."+C,N),L=i.i(s.select)("div."+C,w);O&&L&&(L.classList.contains(u)&&O.classList.contains(p)?(i.i(s.removeClass)([L],u),i.i(s.addClass)([L],p)):L.classList.contains(p)&&O.classList.contains(u)?(i.i(s.removeClass)([L],p),i.i(s.addClass)([L],u)):O.classList.contains("interaction")&&i.i(s.addClass)([L],"interaction")),i.i(s.remove)(N);var k=i.i(s.select)("."+E,l);k.parentNode.insertBefore(w,k.nextSibling),this.updatePosition(n,d,o,t)}if(l=this.getElement(e),d[this.fields.tooltip]&&l.setAttribute("title",d[this.fields.tooltip]),d.hasOwnProperty(this.fields.htmlAttributes)&&d[this.fields.htmlAttributes]){var A={};i.i(s.merge)(A,d[this.fields.htmlAttributes]),A.class?(i.i(s.addClass)([l],A.class.split(" ")),delete A.class):i.i(s.attributes)(l,A)}-1!==this.selectedNodes.indexOf(n)&&(l.setAttribute("aria-selected","true"),i.i(s.addClass)([l],g)),this.isRefreshed=!1,this.triggerEvent("refreshNode",[this.getNode(l)])}},t.prototype.removeNodes=function(e){i.i(s.isNullOrUndefined)(e)||(this.fields.dataSource instanceof n.DataManager&&!this.isOffline?this.crudOperation("delete",e):this.deleteSuccess(e))},t.prototype.updateNode=function(e,t){var r=this;if(!i.i(s.isNullOrUndefined)(e)&&!i.i(s.isNullOrUndefined)(t)&&this.allowEditing){var o=this.getElement(e);if(!i.i(s.isNullOrUndefined)(o)){var a=i.i(s.select)("."+m,o);this.updateOldText(o);var l=this.getEditEvent(o,null,null);this.trigger("nodeEditing",l,function(i){i.cancel||(r.fields.dataSource instanceof n.DataManager&&!r.isOffline?r.crudOperation("update",null,e,t,null,null,!1):r.appendNewText(o,a,t,!1))})}}},t.prototype.uncheckAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!1)};var T;return h([i.i(s.Property)(!1)],t.prototype,"allowDragAndDrop",void 0),h([i.i(s.Property)(!1)],t.prototype,"allowEditing",void 0),h([i.i(s.Property)(!1)],t.prototype,"allowMultiSelection",void 0),h([i.i(s.Property)(!1)],t.prototype,"allowTextWrap",void 0),h([i.i(s.Complex)({},P)],t.prototype,"animation",void 0),h([i.i(s.Property)()],t.prototype,"checkedNodes",void 0),h([i.i(s.Property)("")],t.prototype,"cssClass",void 0),h([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),h([i.i(s.Property)(null)],t.prototype,"dragArea",void 0),h([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),h([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),h([i.i(s.Property)()],t.prototype,"expandedNodes",void 0),h([i.i(s.Property)("Auto")],t.prototype,"expandOn",void 0),h([i.i(s.Complex)({},A)],t.prototype,"fields",void 0),h([i.i(s.Property)(!0)],t.prototype,"fullRowSelect",void 0),h([i.i(s.Property)(!0)],t.prototype,"loadOnDemand",void 0),h([i.i(s.Property)()],t.prototype,"locale",void 0),h([i.i(s.Property)()],t.prototype,"nodeTemplate",void 0),h([i.i(s.Property)()],t.prototype,"selectedNodes",void 0),h([i.i(s.Property)("None")],t.prototype,"sortOrder",void 0),h([i.i(s.Property)(!1)],t.prototype,"showCheckBox",void 0),h([i.i(s.Property)(!0)],t.prototype,"autoCheck",void 0),h([i.i(s.Property)(!1)],t.prototype,"fullRowNavigable",void 0),h([i.i(s.Event)()],t.prototype,"actionFailure",void 0),h([i.i(s.Event)()],t.prototype,"created",void 0),h([i.i(s.Event)()],t.prototype,"dataBound",void 0),h([i.i(s.Event)()],t.prototype,"dataSourceChanged",void 0),h([i.i(s.Event)()],t.prototype,"drawNode",void 0),h([i.i(s.Event)()],t.prototype,"destroyed",void 0),h([i.i(s.Event)()],t.prototype,"keyPress",void 0),h([i.i(s.Event)()],t.prototype,"nodeChecked",void 0),h([i.i(s.Event)()],t.prototype,"nodeChecking",void 0),h([i.i(s.Event)()],t.prototype,"nodeClicked",void 0),h([i.i(s.Event)()],t.prototype,"nodeCollapsed",void 0),h([i.i(s.Event)()],t.prototype,"nodeCollapsing",void 0),h([i.i(s.Event)()],t.prototype,"nodeDragging",void 0),h([i.i(s.Event)()],t.prototype,"nodeDragStart",void 0),h([i.i(s.Event)()],t.prototype,"nodeDragStop",void 0),h([i.i(s.Event)()],t.prototype,"nodeDropped",void 0),h([i.i(s.Event)()],t.prototype,"nodeEdited",void 0),h([i.i(s.Event)()],t.prototype,"nodeEditing",void 0),h([i.i(s.Event)()],t.prototype,"nodeExpanded",void 0),h([i.i(s.Event)()],t.prototype,"nodeExpanding",void 0),h([i.i(s.Event)()],t.prototype,"nodeSelected",void 0),h([i.i(s.Event)()],t.prototype,"nodeSelecting",void 0),t=T=h([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t){e.exports=n},function(e,t){e.exports=r}])});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionLists"),require("SyncfusionPopups"),require("SyncfusionButtons"),require("SyncfusionData"),require("SyncfusionInputs")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionLists","SyncfusionPopups","SyncfusionButtons","SyncfusionData","SyncfusionInputs"],t):"object"==typeof exports?exports.SyncfusionNavigations=t(require("SyncfusionBase"),require("SyncfusionLists"),require("SyncfusionPopups"),require("SyncfusionButtons"),require("SyncfusionData"),require("SyncfusionInputs")):e.SyncfusionNavigations=t(e.SyncfusionBase,e.SyncfusionLists,e.SyncfusionPopups,e.SyncfusionButtons,e.SyncfusionData,e.SyncfusionInputs)}(self,((e,t,i,s,n,r)=>(()=>{"use strict";var o={766:t=>{t.exports=e},741:e=>{e.exports=s},74:e=>{e.exports=n},323:e=>{e.exports=r},90:e=>{e.exports=t},197:e=>{e.exports=i}},l={};function a(e){var t=l[e];if(void 0!==t)return t.exports;var i=l[e]={exports:{}};return o[e](i,i.exports,a),i.exports}a.d=(e,t)=>{for(var i in t)a.o(t,i)&&!a.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{a.r(d),a.d(d,{Accordion:()=>Ct,AccordionActionSettings:()=>vt,AccordionAnimationSettings:()=>yt,AccordionItem:()=>bt,ActionSettings:()=>hs,AppBar:()=>Xn,Breadcrumb:()=>Xs,BreadcrumbItem:()=>zs,BreadcrumbOverflowMode:()=>R,Carousel:()=>Dn,CarouselItem:()=>Pn,CarouselSwipeMode:()=>_s,ContextMenu:()=>Et,FieldSettings:()=>ae,FieldsSettings:()=>ds,HScroll:()=>y,Header:()=>fi,Item:()=>Ke,Menu:()=>Lt,MenuAnimationSettings:()=>he,MenuItem:()=>de,NodeAnimationSettings:()=>cs,Sidebar:()=>ks,Step:()=>Qn,StepLabelPosition:()=>Jn,StepStatus:()=>Tn,StepType:()=>Zn,Stepper:()=>Lr,StepperAnimationSettings:()=>wr,StepperBase:()=>$n,StepperOrientation:()=>Gn,Tab:()=>gi,TabActionSettings:()=>pi,TabAnimationSettings:()=>ui,TabItem:()=>mi,Toolbar:()=>Ye,TreeView:()=>ps,VScroll:()=>D,addScrolling:()=>M,destroyScroll:()=>U});var e,t=a(766),i=(e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},e(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}),s=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},n="e-rtl",r="e-overlay",o="e-nav-arrow",l="e-nav-right-arrow",h="e-nav-left-arrow",c="e-scroll-nav",p="e-scroll-right-nav",u="e-scroll-left-nav",f="e-scroll-device",m="e-scroll-overlay",g="e-scroll-right-overlay",v="e-scroll-left-overlay",y=function(e){function a(t,i){return e.call(this,t,i)||this}return i(a,e),a.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=(0,t.getUniqueID)("hscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(n)},a.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(f),this.createOverlay(this.element)):this.createNavIcon(this.element),this.setScrollState()},a.prototype.setScrollState=function(){(0,t.isNullOrUndefined)(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetWidth,this.customStep=!1):this.customStep=!0},a.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 r=n[s];e.appendChild(r)}t.appendChild(e),i.appendChild(t),t.style.overflowX="hidden",this.scrollEle=t,this.scrollItems=e},a.prototype.getPersistData=function(){return this.addOnPersist(["scrollStep"])},a.prototype.getModuleName=function(){return"hScroll"},a.prototype.destroy=function(){var i=this.element;i.style.display="",i.classList.remove("e-hscroll"),i.classList.remove(f),i.classList.remove(n);var s=(0,t.selectAll)(".e-"+i.id+"_nav."+c,i),r=(0,t.selectAll)("."+m,i);[].slice.call(r).forEach((function(e){(0,t.detach)(e)}));for(var o=0,l=[].slice.call(this.scrollItems.children);o<l.length;o++){var a=l[o];i.appendChild(a)}this.uniqueId&&this.element.removeAttribute("id"),(0,t.detach)(this.scrollEle),s.length>0&&((0,t.detach)(s[0]),(0,t.isNullOrUndefined)(s[1])||(0,t.detach)(s[1])),t.EventHandler.remove(this.scrollEle,"scroll",this.scrollHandler),this.touchModule.destroy(),this.touchModule=null,e.prototype.destroy.call(this)},a.prototype.disable=function(e){var i=(0,t.selectAll)(".e-scroll-nav:not(."+r+")",this.element);e?this.element.classList.add(r):this.element.classList.remove(r),[].slice.call(i).forEach((function(t){t.setAttribute("tabindex",e?"-1":"0")}))},a.prototype.createOverlay=function(e){var t=e.id.concat("_nav"),i=this.createElement("div",{className:m+" "+g}),s="e-"+e.id.concat("_nav "+c+" "+p),n=this.createElement("div",{id:t.concat("_right"),className:s}),r=this.createElement("div",{className:l+" "+o+" e-icons"});n.appendChild(r);var a=this.createElement("div",{className:m+" "+v});this.ieCheck&&n.classList.add("e-ie-align"),e.appendChild(i),e.appendChild(n),e.insertBefore(a,e.firstChild),this.eventBinding([n])},a.prototype.createNavIcon=function(e){var t=e.id.concat("_nav"),i="e-"+e.id.concat("_nav "+c+" "+p),s={role:"button",id:t.concat("_right"),"aria-label":"Scroll right"},n=this.createElement("div",{className:i,attrs:s});n.setAttribute("aria-disabled","false");var a=this.createElement("div",{className:l+" "+o+" e-icons"}),d="e-"+e.id.concat("_nav "+c+" "+u),f={role:"button",id:t.concat("_left"),"aria-label":"Scroll left"},m=this.createElement("div",{className:d+" "+r,attrs:f});m.setAttribute("aria-disabled","true");var g=this.createElement("div",{className:h+" "+o+" e-icons"});m.appendChild(g),n.appendChild(a),e.appendChild(n),e.insertBefore(m,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),m.classList.add("e-ie-align")),this.eventBinding([n,m])},a.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)}},a.prototype.onKeyUp=function(e){"Enter"===e.key&&(this.keyTimeout?this.keyTimeout=!1:e.target.click(),clearTimeout(this.keyTimer))},a.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)}))},a.prototype.repeatScroll=function(){clearInterval(this.timeout)},a.prototype.tabHoldHandler=function(e){var t=this,i=e.originalEvent.target;i=this.contains(i,c)?i.firstElementChild:i;this.timeout=window.setInterval((function(){t.eleScrolling(10,i,!0)}),50)},a.prototype.contains=function(e,t){return e.classList.contains(t)},a.prototype.eleScrolling=function(e,t,i){var s=this.element,r=t.classList;r.contains(c)&&(r=t.querySelector("."+o).classList),this.contains(s,n)&&this.browserCheck&&(e=-e),!this.contains(s,n)||this.browserCheck||this.ieCheck?r.contains(l)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i):r.contains(h)?this.frameScrollRequest(e,"add",i):this.frameScrollRequest(e,"",i)},a.prototype.clickEventHandler=function(e){this.eleScrolling(this.scrollStep,e.target,!1)},a.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 r=Math.sin(s);r<=0?window.cancelAnimationFrame(r):("Left"===e.swipeDirection?i.scrollLeft+=t*r:"Right"===e.swipeDirection&&(i.scrollLeft-=t*r),s-=.5,window.requestAnimationFrame(n))};n()},a.prototype.scrollUpdating=function(e,t){"add"===t?this.scrollEle.scrollLeft+=e:this.scrollEle.scrollLeft-=e,this.enableRtl&&this.scrollEle.scrollLeft>0&&(this.scrollEle.scrollLeft=0)},a.prototype.frameScrollRequest=function(e,i,s){var r=this;if(s)this.scrollUpdating(e,i);else{this.customStep||[].slice.call((0,t.selectAll)("."+m,this.element)).forEach((function(t){e-=t.offsetWidth}));var o=function(){var t,s;r.contains(r.element,n)&&r.browserCheck?(t=-e,s=-10):(t=e,s=10),t<10?window.cancelAnimationFrame(s):(r.scrollUpdating(s,i),e-=s,window.requestAnimationFrame(o))};o()}},a.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceX;this.ieCheck&&this.contains(this.element,n)&&(i=-i),"Left"===e.scrollDirection?t.scrollLeft=t.scrollLeft+i:"Right"===e.scrollDirection&&(t.scrollLeft=t.scrollLeft-i)},a.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=((0,t.isNullOrUndefined)(e)?i:e).querySelector("."+o);(0,t.isNullOrUndefined)(e)?(0,t.classList)(s,[l],[h]):(0,t.classList)(s,[h],[l])}else e&&i&&(e.classList.add(r),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove(r),i.setAttribute("aria-disabled","false"),i.setAttribute("tabindex","0"));this.repeatScroll()},a.prototype.scrollHandler=function(e){var t=e.target,i=t.offsetWidth,s=(this.element,this.element.querySelector("."+u)),n=this.element.querySelector("."+p),o=this.element.querySelector("."+v),l=this.element.querySelector("."+g),a=t.scrollLeft;if(a<=0&&(a=-a),this.isDevice&&(!this.enableRtl||this.browserCheck||this.ieCheck||(o=this.element.querySelector("."+g),l=this.element.querySelector("."+v)),o.style.width=a<40?a+"px":"40px",t.scrollWidth-Math.ceil(i+a)<40?l.style.width=t.scrollWidth-Math.ceil(i+a)+"px":l.style.width="40px"),0===a)this.arrowDisabling(s,n);else if(Math.ceil(i+a+.1)>=t.scrollWidth)this.arrowDisabling(n,s);else{var d=this.element.querySelector("."+c+"."+r);d&&(d.classList.remove(r),d.setAttribute("aria-disabled","false"),d.setAttribute("tabindex","0"))}},a.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(n):this.element.classList.remove(n)}}},s([(0,t.Property)(null)],a.prototype,"scrollStep",void 0),a=s([t.NotifyPropertyChanges],a)}(t.Component),b=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])},e(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)}}(),C=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},S="e-rtl",I="e-overlay",E="e-nav-arrow",x="e-nav-up-arrow",N="e-nav-down-arrow",O="e-scroll-nav",w="e-scroll-up-nav",L="e-scroll-down-nav",k="e-scroll-device",A="e-scroll-overlay",T="e-scroll-up-overlay",P="e-scroll-down-overlay",D=function(e){function i(t,i){return e.call(this,t,i)||this}return b(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=(0,t.getUniqueID)("vscroll"),this.uniqueId=!0),e.style.display="block",this.enableRtl&&e.classList.add(S)},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(k),this.createOverlayElement(this.element)):this.createNavIcon(this.element),this.setScrollState(),t.EventHandler.add(this.element,"wheel",this.wheelEventHandler,this)},i.prototype.setScrollState=function(){(0,t.isNullOrUndefined)(this.scrollStep)||this.scrollStep<0?(this.scrollStep=this.scrollEle.offsetHeight,this.customStep=!1):this.customStep=!0},i.prototype.initialize=function(){var e=(0,t.createElement)("div",{className:"e-vscroll-content"}),i=(0,t.createElement)("div",{className:"e-vscroll-bar"});i.setAttribute("tabindex","-1");for(var s=this.element,n=0,r=[].slice.call(s.children);n<r.length;n++){var o=r[n];e.appendChild(o)}i.appendChild(e),s.appendChild(i),i.style.overflow="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="",(0,t.removeClass)([this.element],["e-vscroll",k,S]);var s=(0,t.selectAll)(".e-"+i.id+"_nav."+O,i),n=(0,t.selectAll)("."+A,i);[].slice.call(n).forEach((function(e){(0,t.detach)(e)}));for(var r=0,o=[].slice.call(this.scrollItems.children);r<o.length;r++){var l=o[r];i.appendChild(l)}this.uniqueId&&this.element.removeAttribute("id"),(0,t.detach)(this.scrollEle),s.length>0&&((0,t.detach)(s[0]),(0,t.isNullOrUndefined)(s[1])||(0,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=(0,t.selectAll)(".e-scroll-nav:not(."+I+")",this.element);e?this.element.classList.add(I):this.element.classList.remove(I),[].slice.call(i).forEach((function(t){t.setAttribute("tabindex",e?"-1":"0")}))},i.prototype.createOverlayElement=function(e){var i=e.id.concat("_nav"),s=(0,t.createElement)("div",{className:A+" "+P}),n="e-"+e.id.concat("_nav "+O+" "+L),r=(0,t.createElement)("div",{id:i.concat("down"),className:n}),o=(0,t.createElement)("div",{className:N+" "+E+" e-icons"});r.appendChild(o);var l=(0,t.createElement)("div",{className:A+" "+T});this.ieCheck&&r.classList.add("e-ie-align"),e.appendChild(s),e.appendChild(r),e.insertBefore(l,e.firstChild),this.eventBinding([r])},i.prototype.createNavIcon=function(e){var i=e.id.concat("_nav"),s="e-"+e.id.concat("_nav "+O+" "+L),n=(0,t.createElement)("div",{id:i.concat("_down"),className:s});n.setAttribute("aria-disabled","false");var r=(0,t.createElement)("div",{className:N+" "+E+" e-icons"}),o="e-"+e.id.concat("_nav "+O+" "+w),l=(0,t.createElement)("div",{id:i.concat("_up"),className:o+" "+I});l.setAttribute("aria-disabled","true");var a=(0,t.createElement)("div",{className:x+" "+E+" e-icons"});l.appendChild(a),n.appendChild(r),n.setAttribute("tabindex","0"),e.appendChild(n),e.insertBefore(l,e.firstChild),this.ieCheck&&(n.classList.add("e-ie-align"),l.classList.add("e-ie-align")),this.eventBinding([n,l])},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,O)?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=t.classList;s.contains(O)&&(s=t.querySelector("."+E).classList),s.contains(N)?this.frameScrollRequest(e,"add",i):s.contains(x)&&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 r=Math.sin(s);r<=0?window.cancelAnimationFrame(r):("Up"===e.swipeDirection?i.scrollTop+=t*r:"Down"===e.swipeDirection&&(i.scrollTop-=t*r),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((0,t.selectAll)("."+A,this.element)).forEach((function(t){e-=t.offsetHeight}));var r=function(){e<10?window.cancelAnimationFrame(10):(n.scrollUpdating(10,i),e-=10,window.requestAnimationFrame(r))};r()}},i.prototype.touchHandler=function(e){var t=this.scrollEle,i=e.distanceY;"Up"===e.scrollDirection?t.scrollTop=t.scrollTop+i:"Down"===e.scrollDirection&&(t.scrollTop=t.scrollTop-i)},i.prototype.arrowDisabling=function(e,i){if(this.isDevice){var s=((0,t.isNullOrUndefined)(e)?i:e).querySelector("."+E);(0,t.isNullOrUndefined)(e)?(0,t.classList)(s,[N],[x]):(0,t.classList)(s,[x],[N])}else e.classList.add(I),e.setAttribute("aria-disabled","true"),e.removeAttribute("tabindex"),i.classList.remove(I),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.querySelector("."+w),n=this.element.querySelector("."+L),r=this.element.querySelector("."+T),o=this.element.querySelector("."+P),l=t.scrollTop;if(l<=0&&(l=-l),this.isDevice&&(r.style.height=l<40?l+"px":"40px",t.scrollHeight-Math.ceil(i+l)<40?o.style.height=t.scrollHeight-Math.ceil(i+l)+"px":o.style.height="40px"),0===l)this.arrowDisabling(s,n);else if(Math.ceil(i+l+.1)>=t.scrollHeight)this.arrowDisabling(n,s);else{var a=this.element.querySelector("."+O+"."+I);a&&(a.classList.remove(I),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(S):this.element.classList.remove(S)}}},C([(0,t.Property)(null)],i.prototype,"scrollStep",void 0),i=C([t.NotifyPropertyChanges],i)}(t.Component);function M(e,t,i,s,n,r){var o,l,a=t.parentElement;if("vscroll"===s?(o=r||t.getBoundingClientRect().height,l=i.getBoundingClientRect().height):(o=t.getBoundingClientRect().width,l=i.getBoundingClientRect().width),o<l)return H(e,t,i,s,n,r);if(a){var d=a.getBoundingClientRect().width;return d<o&&"hscroll"===s?(l=d,t.style.maxWidth=d+"px",H(e,t,i,s,n,r)):i}return i}function H(e,i,s,n,r,o){var l=e("div",{className:"e-menu-"+n});return i.appendChild(l),l.appendChild(s),o?(l.style.overflow="hidden",l.style.height=o+"px"):(l.style.maxHeight=i.style.maxHeight,i.style.overflow="hidden"),"vscroll"===n?new D({enableRtl:r},l).scrollStep=(0,t.select)(".e-"+n+"-bar",i).offsetHeight/2:new y({enableRtl:r},l).scrollStep=(0,t.select)(".e-"+n+"-bar",i).offsetWidth,l}function U(e,i,s){if(e){var n=(0,t.select)(".e-menu-parent",i);n?s&&s!==n||(e.destroy(),i.parentElement.appendChild(n),(0,t.detach)(i)):(e.destroy(),(0,t.detach)(i))}}var R,B=a(90),j=a(197),q=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])},e(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)}}(),W=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},F="enter",V="escape",_="e-focused",z="e-menu-header",X="e-selected",K="e-separator",Y="uparrow",G="downarrow",Q="leftarrow",J="rightarrow",Z="home",$="end",ee="tab",te="e-caret",ie="e-menu-item",se="e-disabled",ne="e-menu-hide",re="e-icons",oe="e-rtl",le="e-menu-popup",ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return q(i,e),W([(0,t.Property)("id")],i.prototype,"itemId",void 0),W([(0,t.Property)("parentId")],i.prototype,"parentId",void 0),W([(0,t.Property)("text")],i.prototype,"text",void 0),W([(0,t.Property)("iconCss")],i.prototype,"iconCss",void 0),W([(0,t.Property)("url")],i.prototype,"url",void 0),W([(0,t.Property)("separator")],i.prototype,"separator",void 0),W([(0,t.Property)("items")],i.prototype,"children",void 0),i}(t.ChildProperty),de=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return q(i,e),W([(0,t.Property)(null)],i.prototype,"iconCss",void 0),W([(0,t.Property)("")],i.prototype,"id",void 0),W([(0,t.Property)(!1)],i.prototype,"separator",void 0),W([(0,t.Collection)([],i)],i.prototype,"items",void 0),W([(0,t.Property)("")],i.prototype,"text",void 0),W([(0,t.Property)("")],i.prototype,"url",void 0),i}(t.ChildProperty),he=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return q(i,e),W([(0,t.Property)("SlideDown")],i.prototype,"effect",void 0),W([(0,t.Property)(400)],i.prototype,"duration",void 0),W([(0,t.Property)("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),ce=function(e){function i(i,s){var n=e.call(this,i,s)||this;return n.navIdx=[],n.animation=new t.Animation({}),n.isTapHold=!1,n.tempItem=[],n.showSubMenuOn="Auto",n}return q(i,e),i.prototype.preRender=function(){if(!this.isMenu){var e=void 0;if("EJS-CONTEXTMENU"===this.element.tagName){e=this.createElement("ul",{id:(0,t.getUniqueID)(this.getModuleName()),className:"e-control e-lib e-"+this.getModuleName()});var i=(0,t.getValue)("ej2_instances",this.element);(0,t.removeClass)([this.element],["e-control","e-lib","e-"+this.getModuleName()]),this.clonedElement=this.element,this.element=e,(0,t.setValue)("ej2_instances",i,this.element)}else{e=this.createElement("ul",{id:(0,t.getUniqueID)(this.getModuleName())}),(0,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,r=(0,t.getValue)("ej2_instances",n),o=(e=this.createElement("ul"),this.createElement("EJS-MENU",{className:"e-"+this.getModuleName()+"-wrapper"})),l=0,a=n.attributes.length;l<a;l++)e.setAttribute(n.attributes[l].nodeName,n.attributes[l].nodeValue);n.parentNode.insertBefore(o,n),(0,t.detach)(n),n=e,o.appendChild(n),(0,t.setValue)("ej2_instances",r,n),this.clonedElement=o,this.element=n,this.element.id||(this.element.id=(0,t.getUniqueID)(this.getModuleName()))}},i.prototype.render=function(){var e=this;this.initialize(),this.renderItems(),this.wireEvents(),this.renderComplete();var t=this.getWrapper();this.template&&this.enableScrolling&&(this.isReact||this.isAngular)&&requestAnimationFrame((function(){M(e.createElement,t,e.element,"hscroll",e.enableRtl)}))},i.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&&(0,t.addClass)([e],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.enableRtl&&e.classList.add(oe),e.appendChild(this.element),this.isMenu&&this.hamburgerMode&&(this.target||this.createHeaderContainer(e)),this.defaultOption=this.showItemOnClick},i.prototype.renderItems=function(){if(!this.items.length){var e=B.ListBase.createJsonFromElement(this.element,{fields:{child:"items"}});this.setProperties({items:e},!0),(0,t.isBlazor)()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML=""}var i=this.createItems(this.items);if((0,t.append)(Array.prototype.slice.call(i.children),this.element),this.element.classList.add("e-menu-parent"),this.isMenu){if(!this.hamburgerMode&&this.element.classList.contains("e-vertical")&&this.setBlankIconStyle(this.element),this.enableScrolling){var s=this.getWrapper();this.element.classList.contains("e-vertical")?M(this.createElement,s,this.element,"vscroll",this.enableRtl):M(this.createElement,s,this.element,"hscroll",this.enableRtl)}}else this.element.parentElement.setAttribute("role","dialog"),this.element.parentElement.setAttribute("aria-label","context menu")},i.prototype.wireEvents=function(){var e=this.getWrapper();if(this.target){for(var i=void 0,s=(0,t.selectAll)(this.target),n=0,r=s.length;n<r;n++)i=s[n],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){t.EventHandler.add(this.targetElement,"scroll",this.scrollHandler,this);for(var o=0,l=(0,j.getScrollableParent)(this.targetElement);o<l.length;o++){var a=l[o];t.EventHandler.add(a,"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=(0,t.rippleEffect)(e,{selector:"."+ie})},i.prototype.wireKeyboardEvent=function(e){var i={downarrow:G,uparrow:Y,enter:F,leftarrow:Q,rightarrow:J,escape:V};this.isMenu&&(i.home=Z,i.end=$,i.tab=ee),new t.KeyboardEvents(e,{keyAction:this.keyBoardHandler.bind(this),keyConfigs:i})},i.prototype.mouseDownHandler=function(e){(0,t.closest)(e.target,".e-"+this.getModuleName()+"-wrapper")===this.getWrapper()||(0,t.closest)(e.target,".e-"+this.getModuleName()+"-popup")||this.closeMenu(this.isMenu?null:this.navIdx.length,e)},i.prototype.keyHandler=function(e){38!==e.keyCode&&40!==e.keyCode||e.target&&(e.target.classList.contains("e-contextmenu")||e.target.classList.contains("e-menu-item"))&&e.preventDefault()},i.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([_,X],[(0,t.closest)(s,".e-"+this.getModuleName()+"-wrapper")]),n)switch(e.action){case J:i=J,e.action=G;break;case Q:i=Q,e.action=Y;break;case G:i=G,e.action=J;break;case Y:i=Y,e.action=""}else if(this.enableRtl)switch(e.action){case Q:n=!0,i=Q,e.action=J;break;case J:n=!0,i=J,e.action=Q}switch(e.action){case G:case Y:case $:case Z:case ee:this.upDownKeyHandler(e);break;case J:this.rightEnterKeyHandler(e);break;case Q:this.leftEscKeyHandler(e);break;case F:this.hamburgerMode&&"SPAN"===s.tagName&&s.classList.contains("e-menu-icon")?this.menuHeaderClickHandler(e):this.rightEnterKeyHandler(e);break;case V:this.leftEscKeyHandler(e)}n&&(e.action=i)},i.prototype.upDownKeyHandler=function(e){var t=this.getUlByNavIdx(),i=e.action===G||e.action===Z||e.action===ee?0:t.childElementCount-1,s=i,n=this.getLIByClass(t,_);n&&(e.action!==$&&e.action!==Z&&(s=this.getIdx(t,n)),n.classList.remove(_),e.action!==$&&e.action!==Z&&(e.action===G?s++:s--,s===(e.action===G?t.childElementCount:-1)&&(s=i)));var r=t.children[s];s=this.isValidLI(r,s,e.action),t.children[s].classList.add(_),t.children[s].focus()},i.prototype.isValidLI=function(e,t,i){var s=this.getUlByNavIdx(),n=i===G||i===Z||i===ee?0:s.childElementCount-1;return(e.classList.contains(K)||e.classList.contains(se)||e.classList.contains(ne))&&(i===G&&t===s.childElementCount-1||i===Y&&0===t?t=n:i===G||i===J||"tab"===i&&e.classList.contains(K)?t++:t--),(e=s.children[t])&&(e.classList.contains(K)||e.classList.contains(se)||e.classList.contains(ne))&&(t=this.isValidLI(e,t,i)),t},i.prototype.getUlByNavIdx=function(e){var i=this;if(void 0===e&&(e=this.navIdx.length),this.isMenu){var s=[this.getWrapper()].concat([].slice.call((0,t.selectAll)("."+le)))[e],n=[];return(0,t.selectAll)("."+le).forEach((function(e){(i.element.id===e.id.split("-")[2]||e.id.split("-")[2]+"-"+e.id.split("-")[3])&&n.push(e)})),s=[this.getWrapper()].concat([].slice.call(n))[e],(0,t.isNullOrUndefined)(s)?null:(0,t.select)(".e-menu-parent",s)}return document.body.contains(this.element)||0!==e?this.getWrapper().children[e]:null},i.prototype.rightEnterKeyHandler=function(e){var t,i=this.getUlByNavIdx(),s=this.getLIByClass(i,_);if(s){var n=this.getIdx(i,s),r=this.navIdx.concat(n),o=this.getItem(r);if(o.items.length)this.navIdx.push(n),this.keyType="right",this.action=e.action,this.openMenu(s,o,-1,-1,e);else if(e.action===F){this.isMenu&&0===this.navIdx.length?this.removeLIStateByClass([X],[this.getWrapper()]):s.classList.remove(_),s.classList.add(X),t={element:s,item:o,event:e},this.trigger("select",t);var l=s.querySelector(".e-menu-url");if(o.url&&l)switch(l.getAttribute("target")){case"_blank":window.open(o.url,"_blank");break;case"_parent":window.parent.location.href=o.url;break;default:window.location.href=o.url}this.closeMenu(null,e);var a=this.getLIByClass(this.getUlByNavIdx(),X);a&&(a.classList.add(_),a.focus())}}},i.prototype.leftEscKeyHandler=function(e){this.navIdx.length?(this.keyType="left",this.closeMenu(this.navIdx.length,e)):e.action===V&&this.closeMenu(null,e)},i.prototype.scrollHandler=function(e){this.closeMenu(null,e)},i.prototype.touchHandler=function(e){this.isTapHold=!0,this.cmenuHandler(e.originalEvent)},i.prototype.cmenuHandler=function(e){e.preventDefault(),this.currentTarget=e.target,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)},i.prototype.closeMenu=function(e,i,s){var n=this;if(void 0===e&&(e=0),void 0===i&&(i=null),this.isMenuVisible()){var r,o,l=void 0,a=this.getWrapper(),d=void 0,h=this.getPopups(),c=!1,p=this.isMenu?h.length+1:a.childElementCount,u=this.isMenu&&1!==p?(0,t.select)(".e-ul",h[p-2]):(0,t.selectAll)(".e-menu-parent",a)[p-1];if(this.isMenu&&u.classList.contains("e-menu")&&((l=this.getLIByClass(u,X))&&l.classList.remove(X),c=!0),!c){var f=i&&i.target&&this.getLI(i.target);this.cli=f||u.children[0],r=this.navIdx.length?this.getItem(this.navIdx):null,o=r?r.items:this.items,d={element:u,parentItem:r,items:o,event:i,cancel:!1,isFocused:!0},this.trigger("beforeClose",d,(function(l){var d,h,c,p,m,g,v="",y=!l.cancel;(y||n.isCMenu)&&(n.isMenu?(d=(0,t.closest)(u,"."+le),n.hamburgerMode&&(d.parentElement.style.minHeight="",(0,t.closest)(u,".e-menu-item").setAttribute("aria-expanded","false")),n.unWireKeyboardEvent(d),U((0,t.getInstance)(d.children[0],D),d.children[0]),(c=(0,t.getInstance)(d,j.Popup)).hide(),v=d.id,c.destroy(),(0,t.detach)(d)):n.toggleAnimation(u,!1),h={element:u,parentItem:r,items:o},n.trigger("onClose",h),n.navIdx.pop(),0===n.navIdx.length&&i&&"keyup"===i.type&&(n.showSubMenu=!1),n.isMenu||(t.EventHandler.remove(u,"keydown",n.keyHandler),"right"===n.keyType&&(n.keyType=""))),n.updateReactTemplate();var b=n.getWrapper()&&n.getUlByNavIdx();(n.isCMenu&&(n.canOpen(i.target)&&n.openMenu(null,null,n.pageY,n.pageX,i),n.isCMenu=!1),n.isMenu&&b&&v.length)?(p=new RegExp("(.*)-ej2menu-"+n.element.id+"-popup").exec(v)[1],m=b.querySelector('[id="'+p+'"]'),g=f&&b.querySelector('[id="'+f.id+'"]')):b&&(m=b.querySelector(".e-menu-item.e-selected"),g=f&&b.querySelector('[id="'+f.id+'"]'));var C=f&&f.querySelectorAll(".e-menu-item");if(y&&n.hamburgerMode&&e&&!C.length)n.afterCloseMenu(i);else if(y&&!n.hamburgerMode&&m&&!g&&"left"!==n.keyType&&(n.navIdx.length||!n.isMenu&&0===n.navIdx.length)){var S=i&&(i.target.classList.contains("e-vscroll")||i.target.classList.contains("e-scroll-nav"))?(0,t.closest)(i.target,".e-menu-wrapper"):null;S?(S=S.querySelector(".e-menu-item"),(n.showItemOnClick||S&&n.getIndex(S.id,!0).length<=n.navIdx.length)&&n.closeMenu(n.navIdx[n.navIdx.length-1],i,!0)):i&&i.target.classList.contains("e-nav-arrow")||n.closeMenu(n.navIdx[n.navIdx.length-1],i)}else if(y&&!s&&!e&&(n.hamburgerMode&&n.navIdx.length||1===n.navIdx.length&&f&&b!==f.parentElement))n.closeMenu(null,i);else if(y&&(0,t.isNullOrUndefined)(e)&&n.navIdx.length)n.closeMenu(null,i);else if(!y||n.isMenu||e||0!==n.navIdx.length||n.isMenusClosed||n.isCmenuHover)if(y&&n.isMenu&&i&&i.target&&0!==n.navIdx.length&&(0,t.closest)(i.target,".e-menu-parent.e-control"))n.closeMenu(0,i);else if(y&&!n.isMenu&&(0,t.selectAll)(".e-menu-parent",a)[e-1]&&3===i.which)n.closeMenu(null,i);else{if(!y||"right"!==n.keyType&&"click"!==n.keyType){var I=n.getUlByNavIdx(),E=n.getLIByClass(I,X);if(E&&(E.setAttribute("aria-expanded","false"),E.classList.remove(X),(l.isFocused&&f||"left"===n.keyType)&&(E.classList.add(_),i.target&&i.target.classList.contains("e-edit-template")||E.focus())),!y&&n.hamburgerMode&&f&&"false"===f.getAttribute("aria-expanded")&&"true"===f.getAttribute("aria-haspopup")){(0,t.closest)(f,".e-menu-parent.e-control")?n.navIdx=[]:n.navIdx.pop(),n.navIdx.push(n.cliIdx);var x=n.getItem(n.navIdx);f.setAttribute("aria-expanded","true"),n.openMenu(f,x,-1,-1,i)}}else n.afterCloseMenu(i);n.navIdx.length<1&&("Hover"!==n.showSubMenuOn&&"Click"!==n.showSubMenuOn||(n.showItemOnClick=n.defaultOption,n.showSubMenuOn="Auto"))}else n.isMenusClosed=!0,n.closeMenu(0,i);n.removeStateWrapper()}))}}},i.prototype.updateReactTemplate=function(){if(this.isReact&&this.template&&0===this.navIdx.length){var e=this.portals.splice(0,this.items.length);this.clearTemplate(["template"]),this.portals=e,this.renderReactTemplates()}},i.prototype.getMenuItemModel=function(e,i){if((0,t.isNullOrUndefined)(e))return null;(0,t.isNullOrUndefined)(i)&&(i=0);var s=this.getFields(i);return{text:e[s.text],id:e[s.id],items:e[s.child],separator:e[s.separator],iconCss:e[s.iconCss],url:e[s.url]}},i.prototype.getPopups=function(){var e=this,i=[];return[].slice.call(document.querySelectorAll("."+le)).forEach((function(s){!(0,t.isNullOrUndefined)(s.querySelector("."+ie))&&e.getIndex(s.querySelector("."+ie).id,!0).length&&i.push(s)})),i},i.prototype.isMenuVisible=function(){return this.navIdx.length>0||this.element.classList.contains("e-contextmenu")&&(0,t.isVisible)(this.element).valueOf()},i.prototype.canOpen=function(e){var i=!0;if(this.filter){i=!1;for(var s=this.filter.split(" "),n=0,r=s.length;n<r;n++)if((0,t.closest)(e,"."+s[n])){i=!0;break}}return i},i.prototype.openMenu=function(e,i,s,n,r,o){var l=this;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=null),void 0===o&&(o=this.targetElement);var a=this.getWrapper();this.lItem=e;var d=""!==this.element.id?this.element.id:"menu";if(this.isMenusClosed=!1,(0,t.isNullOrUndefined)(s)&&(s=-1),(0,t.isNullOrUndefined)(n)&&(n=-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:re+" e-previous"},c=new de(this.items[0],"items",h,!0),p=this.createItems([c]).children[0];p.classList.add(z),this.uList.insertBefore(p,this.uList.children[0])}this.isMenu?(this.popupWrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper "+le,id:e.id+"-ej2menu-"+d+"-popup"}),this.hamburgerMode?(s=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.template&&this.renderReactTemplates(),this.hamburgerMode?this.calculateIndentSize(this.uList,e):(this.cssClass&&(0,t.addClass)([this.popupWrapper],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.popupObj.hide()),this.hamburgerMode||this.showItemOnClick||!this.hoverDelay?this.triggerBeforeOpen(e,this.uList,i,r,0,0,"menu"):(window.clearInterval(this.timer),this.timer=window.setTimeout((function(){l.triggerBeforeOpen(e,l.uList,i,r,0,0,"menu")}),this.hoverDelay))):(this.uList.style.zIndex=this.element.style.zIndex,a.appendChild(this.uList),!this.showItemOnClick&&this.hoverDelay?(window.clearInterval(this.timer),this.timer=window.setTimeout((function(){l.triggerBeforeOpen(e,l.uList,i,r,s,n,"none")}),this.hoverDelay)):this.triggerBeforeOpen(e,this.uList,i,r,s,n,"none"))}else if(this.uList=this.element,this.uList.style.zIndex=(0,j.getZindexPartial)(o||this.element).toString(),(0,t.isNullOrUndefined)(r)){var u=document.createEvent("MouseEvents");u.initEvent("click",!0,!1);var f=this.copyObject(u,{});f.target=f.srcElement=o,f.currentTarget=o,this.triggerBeforeOpen(e,this.uList,i,f,s,n,"none")}else this.triggerBeforeOpen(e,this.uList,i,r,s,n,"none")},i.prototype.copyObject=function(e,t){for(var i in e)t[""+i]=e[""+i];return t},i.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)for(var r=e.querySelector(".e-menu-icon"),o=getComputedStyle(r),l=parseInt(o.marginRight,10)+r.offsetWidth+s,a=0;a<n.length;a++)n[a].style.textIndent=l+"px"},i.prototype.generatePopup=function(e,i,s,n){var r=this,o=new j.Popup(e,{actionOnScroll:this.hamburgerMode?"none":"reposition",relateTo:s,collision:this.hamburgerMode?{X:"none",Y:"none"}:{X:n||this.enableRtl?"none":"flip",Y:"fit"},position:n&&!this.hamburgerMode?{X:"right",Y:"top"}:{X:"left",Y:"bottom"},targetType:"relative",enableRtl:this.enableRtl,content:i,open:function(){var e=(0,t.select)(".e-menu-vscroll",o.element);e&&(e.style.height="inherit",e.style.maxHeight="");var i=(0,t.select)(".e-ul",o.element);o.element.style.maxHeight="",i.focus(),r.triggerOpen(i)}});return o},i.prototype.createHeaderContainer=function(e){e=e||this.getWrapper();var i=this.createElement("span",{className:"e-"+this.getModuleName()+"-header"}),s=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(this.title):this.title,n=this.createElement("span",{className:"e-"+this.getModuleName()+"-title",innerHTML:s}),r=this.createElement("span",{className:"e-icons e-"+this.getModuleName()+"-icon",attrs:{tabindex:"0"}});i.appendChild(n),i.appendChild(r),e.insertBefore(i,this.element)},i.prototype.openHamburgerMenu=function(e){this.hamburgerMode&&this.triggerBeforeOpen(null,this.element,null,e,0,0,"hamburger")},i.prototype.closeHamburgerMenu=function(e){var t=this,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}))}))},i.prototype.callFit=function(e,t,i,s,n){return(0,j.fit)(e,null,{X:t,Y:i},{top:s,left:n})},i.prototype.triggerBeforeOpen=function(e,i,s,n,r,o,l){var a=this,d=e?s[this.getField("children",this.navIdx.length-1)]:this.items,h={element:i,items:d,parentItem:s,event:n,cancel:!1,top:r,left:o,showSubMenuOn:"Auto"},c=l;this.trigger("beforeOpen",h,(function(r){switch(c){case"menu":a.hamburgerMode||("Auto"!==r.showSubMenuOn&&(a.showItemOnClick=!a.defaultOption,a.showSubMenuOn=r.showSubMenuOn),a.top=r.top,a.left=r.left),a.popupWrapper.style.display="block",a.hamburgerMode||(a.popupWrapper.style.maxHeight=a.popupWrapper.getBoundingClientRect().height+"px",a.enableScrolling&&M(a.createElement,a.popupWrapper,a.uList,"vscroll",a.enableRtl),a.checkScrollOffset(n)),a.hamburgerMode||a.left||a.top?(a.popupObj.collision={X:"none",Y:"none"},a.popupWrapper.style.display=""):(a.popupObj.refreshPosition(a.lItem,!0),a.left=parseInt(a.popupWrapper.style.left,10),a.top=parseInt(a.popupWrapper.style.top,10),a.enableRtl&&(a.left=a.isNestedOrVertical?a.left-a.popupWrapper.offsetWidth-a.lItem.parentElement.offsetWidth+2:a.left-a.popupWrapper.offsetWidth+a.lItem.offsetWidth),a.template&&(a.isReact||a.isAngular)?requestAnimationFrame((function(){a.collision(),a.popupWrapper.style.display=""})):(a.collision(),a.popupWrapper.style.display=""));break;case"none":a.top=r.top,a.left=r.left;break;case"hamburger":r.cancel||(a.element.classList.remove("e-hide-menu"),a.triggerOpen(a.element))}if("hamburger"!==c)if(r.cancel)a.isMenu?(a.popupObj.destroy(),(0,t.detach)(a.popupWrapper)):i.className.indexOf("e-ul")>-1&&(0,t.detach)(i),a.navIdx.pop();else if(a.isMenu)if(a.hamburgerMode)a.popupWrapper.style.top=a.top+"px",a.popupWrapper.style.left="0px",a.toggleAnimation(a.popupWrapper);else{a.setBlankIconStyle(a.popupWrapper),a.wireKeyboardEvent(a.popupWrapper),(0,t.rippleEffect)(a.popupWrapper,{selector:"."+ie}),a.popupWrapper.style.left=a.left+"px",a.popupWrapper.style.top=a.top+"px";var o="None"!==a.animationSettings.effect?{name:a.animationSettings.effect,duration:a.animationSettings.duration,timingFunction:a.animationSettings.easing}:null;a.popupObj.show(o,a.lItem)}else a.setBlankIconStyle(a.uList),a.setPosition(a.lItem,a.uList,a.top,a.left),a.toggleAnimation(a.uList);if("right"===a.keyType){var l=a.getUlByNavIdx();if(e.classList.remove(_),a.isMenu&&1===a.navIdx.length&&a.removeLIStateByClass([X],[a.getWrapper()]),e.classList.add(X),a.action===F){var d={element:e,item:s,event:n};a.trigger("select",d)}e.focus(),l=a.getUlByNavIdx();var h=a.isValidLI(l.children[0],0,a.action);l.children[h].classList.add(_),l.children[h].focus()}}))},i.prototype.collision=function(){var e;if(e=(0,j.isCollide)(this.popupWrapper,null,this.left,this.top),(this.isNestedOrVertical||this.enableRtl)&&(e.indexOf("right")>-1||e.indexOf("left")>-1)){this.popupObj.collision.X="none";var i=(0,t.closest)(this.lItem,".e-"+this.getModuleName()+"-wrapper").offsetWidth;this.left=this.enableRtl?(0,j.calculatePosition)(this.lItem,this.isNestedOrVertical?"right":"left","top").left:this.left-this.popupWrapper.offsetWidth-i+2}((e=(0,j.isCollide)(this.popupWrapper,null,this.left,this.top)).indexOf("left")>-1||e.indexOf("right")>-1)&&(this.left=this.callFit(this.popupWrapper,!0,!1,this.top,this.left).left),this.popupWrapper.style.left=this.left+"px"},i.prototype.setBlankIconStyle=function(e){var t=[].slice.call(e.getElementsByClassName("e-blankicon"));if(t.length){var i=e.querySelector(".e-menu-item:not(.e-blankicon):not(.e-separator)");if(i){var s=i.querySelector(".e-menu-icon");if(s){var n=this.enableRtl?{padding:"paddingRight",margin:"marginLeft"}:{padding:"paddingLeft",margin:"marginRight"},r=getComputedStyle(s),o=parseInt(r.fontSize,10);parseInt(r.width,10)&&parseInt(r.width,10)>o&&(o=parseInt(r.width,10));var l=o+parseInt(r[n.margin],10)+parseInt(getComputedStyle(i)[n.padding],10)+"px";t.forEach((function(e){e.style[n.padding]=l}))}}}},i.prototype.checkScrollOffset=function(e){var i=this.getWrapper();if(i.children[0].classList.contains("e-menu-hscroll")&&1===this.navIdx.length){var s=(0,t.isNullOrUndefined)(e)?this.element:(0,t.closest)(e.target,"."+ie),n=(0,t.select)(".e-hscroll-bar",i);n.scrollLeft>s.offsetLeft&&(n.scrollLeft-=n.scrollLeft-s.offsetLeft);var r=n.scrollLeft+n.offsetWidth,o=s.offsetLeft+s.offsetWidth;r<o&&(n.scrollLeft+=o-r)}},i.prototype.setPosition=function(e,i,s,n){var r="px";if(this.toggleVisiblity(i),i===this.element||n>-1&&s>-1){if((d=(0,j.isCollide)(i,null,n,s)).indexOf("right")>-1&&(n-=i.offsetWidth),d.indexOf("bottom")>-1)if((s=(l=this.callFit(i,!1,!0,s,n)).top-20)<0){var o=pageYOffset+document.documentElement.clientHeight-i.getBoundingClientRect().height;o>-1&&(s=o)}if((d=(0,j.isCollide)(i,null,n,s)).indexOf("left")>-1)n=(l=this.callFit(i,!0,!1,s,n)).left}else if(t.Browser.isDevice)s=Number(this.element.style.top.replace(r,"")),n=Number(this.element.style.left.replace(r,""));else{var l,a=this.enableRtl?"left":"right";s=(l=(0,j.calculatePosition)(e,a,"top")).top,n=l.left;var d,h=(d=(0,j.isCollide)(i,null,this.enableRtl?n-i.offsetWidth:n,s)).indexOf("left")>-1||d.indexOf("right")>-1;h&&(n=(l=(0,j.calculatePosition)(e,this.enableRtl?"right":"left","top")).left),(this.enableRtl||h)&&(n=this.enableRtl&&h?n:n-i.offsetWidth),d.indexOf("bottom")>-1&&(s=(l=this.callFit(i,!1,!0,s,n)).top)}this.toggleVisiblity(i,!1),i.style.top=s+r,i.style.left=n+r},i.prototype.toggleVisiblity=function(e,t){void 0===t&&(t=!0),e.style.visibility=t?"hidden":"",e.style.display=t?"block":"none"},i.prototype.createItems=function(e){var i=this,s=this.navIdx?this.navIdx.length:0,n=this.getFields(s),r=this.hasField(e,this.getField("iconCss",s)),o={showIcon:r,moduleName:"menu",fields:n,template:this.template,itemNavigable:!0,itemCreating:function(e){e.curData[e.fields[n.id]]||(e.curData[e.fields[n.id]]=(0,t.getUniqueID)("menuitem")),(0,t.isNullOrUndefined)(e.curData.htmlAttributes)&&(e.curData.htmlAttributes={}),t.Browser.isIE?(e.curData.htmlAttributes.role="menuitem",e.curData.htmlAttributes.tabindex="-1"):Object.assign(e.curData.htmlAttributes,{role:"menuitem",tabindex:"-1"}),i.isMenu&&!e.curData[i.getField("separator",s)]&&(e.curData.htmlAttributes["aria-label"]=e.curData[e.fields.text]?e.curData[e.fields.text]:e.curData[e.fields.id]),""===e.curData[e.fields[n.iconCss]]&&(e.curData[e.fields[n.iconCss]]=null)},itemCreated:function(e){if(e.curData[i.getField("separator",s)]&&(e.item.classList.add(K),e.item.setAttribute("role","separator")),!r||e.curData[e.fields.iconCss]||e.curData[i.getField("separator",s)]||e.item.classList.add("e-blankicon"),e.curData[e.fields.child]&&e.curData[e.fields.child].length){var t=i.createElement("span",{className:re+" "+te});e.item.appendChild(t),e.item.setAttribute("aria-haspopup","true"),e.item.setAttribute("aria-expanded","false"),e.item.classList.add("e-menu-caret-icon")}i.isMenu&&i.template&&(e.item.setAttribute("id",e.curData[e.fields.id].toString()),e.item.removeAttribute("data-uid"),e.item.classList.contains("e-level-1")&&e.item.classList.remove("e-level-1"),e.item.classList.contains("e-has-child")&&e.item.classList.remove("e-has-child"),e.item.removeAttribute("aria-level"));var n={item:e.curData,element:e.item};i.trigger("beforeItemRender",n)}};this.setProperties({items:this.items},!0),this.isMenu&&(o.templateID=this.element.id+"Template");var l=B.ListBase.createList(this.createElement,e,o,!this.template,this);return l.setAttribute("tabindex","0"),this.isMenu?l.setAttribute("role","menu"):l.setAttribute("role","menubar"),l},i.prototype.moverHandler=function(e){var i=e.target;this.liTrgt=i,this.isMenu||(this.isCmenuHover=!0);var s=this.getLI(i),n=s?(0,t.closest)(s,".e-"+this.getModuleName()+"-wrapper"):this.getWrapper(),r=this.getWrapper(),o=new RegExp("-ej2menu-(.*)-popup"),l=!1;if(n){if((""!==n.id?o.exec(n.id)[1]:n.querySelector("ul").id)!==this.element.id){if(this.removeLIStateByClass([_,X],[this.getWrapper()]),!this.navIdx.length)return;l=!0}s&&(0,t.closest)(s,".e-"+this.getModuleName()+"-wrapper")&&!l?(this.removeLIStateByClass([_],this.isMenu?[n].concat(this.getPopups()):[n]),this.removeLIStateByClass([_],this.isMenu?[r].concat(this.getPopups()):[r]),s.classList.add(_),this.showItemOnClick||this.clickHandler(e)):this.isMenu&&this.showItemOnClick&&!l&&this.removeLIStateByClass([_],[n].concat(this.getPopups())),this.isMenu&&(this.showItemOnClick||i.parentElement===n||(0,t.closest)(i,".e-"+this.getModuleName()+"-popup")||s&&(!s||this.getIndex(s.id,!0).length)||"Hover"===this.showSubMenuOn?l&&!this.showItemOnClick&&this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e)):(this.removeLIStateByClass([_],[n]),this.navIdx.length&&(this.isClosed=!0,this.closeMenu(null,e))),this.isClosed||this.removeStateWrapper(),this.isClosed=!1),this.isMenu||(this.isCmenuHover=!1)}},i.prototype.removeStateWrapper=function(){if(this.liTrgt){var e=(0,t.closest)(this.liTrgt,".e-menu-vscroll");"DIV"===this.liTrgt.tagName&&e&&this.removeLIStateByClass([_,X],[e])}},i.prototype.removeLIStateByClass=function(e,i){for(var s,n=function(n){e.forEach((function(e){(s=(0,t.select)("."+e,i[n]))&&s.classList.remove(e)}))},r=0;r<i.length;r++)n(r)},i.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()},i.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)}},i.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][""+t])return!0;return!1},i.prototype.menuHeaderClickHandler=function(e){var i=(0,t.closest)(e.target,".e-menu-wrapper");i&&i.querySelector("ul.e-menu-parent").id!==this.element.id||(this.element.className.indexOf("e-hide-menu")>-1?this.openHamburgerMenu(e):this.closeHamburgerMenu(e))},i.prototype.clickHandler=function(e){this.isTapHold=!this.isTapHold&&this.isTapHold;var i=this.getWrapper(),s=e.target,n=this.cli=this.getLI(s),r=new RegExp("-ej2menu-(.*)-popup"),o=n?(0,t.closest)(n,".e-"+this.getModuleName()+"-wrapper"):null,l=n&&o&&(this.isMenu?this.getIndex(n.id,!0).length>0:i.firstElementChild.id===o.firstElementChild.id);if(t.Browser.isDevice&&this.isMenu&&(this.removeLIStateByClass([_],[i].concat(this.getPopups())),this.mouseDownHandler(e)),n&&o&&this.isMenu){var a=o.id?r.exec(o.id)[1]:o.querySelector(".e-menu-parent").id;if(this.element.id!==a)return}if(l&&"click"===e.type&&!n.classList.contains(z)){this.setLISelected(n);var d=this.getIndex(n.id,!0),h={element:n,item:this.getItem(d),event:e};this.trigger("select",h)}if(l&&("mouseover"===e.type||t.Browser.isDevice||this.showItemOnClick)){var c=void 0;if(n.classList.contains(z))c=i.children[this.navIdx.length-1],this.toggleAnimation(c),(u=this.getLIByClass(c,X))&&u.classList.remove(X),(0,t.detach)(n.parentNode),this.navIdx.pop();else if(!n.classList.contains(K)){this.showSubMenu=!0;var p=n.parentNode;if((0,t.isNullOrUndefined)(p))return;if(this.cliIdx=this.getIdx(p,n),this.isMenu||!t.Browser.isDevice){var u,f=this.isMenu?Array.prototype.indexOf.call([i].concat(this.getPopups()),(0,t.closest)(p,".e-"+this.getModuleName()+"-wrapper")):this.getIdx(i,p);if(this.navIdx[f]===this.cliIdx&&(this.showSubMenu=!1),f!==this.navIdx.length&&("mouseover"!==e.type||this.showSubMenu))(u=this.getLIByClass(p,X))&&u.classList.remove(X),this.isClosed=!0,this.keyType="click",this.showItemOnClick&&(this.setLISelected(n),this.isMenu||(this.isCmenuHover=!0)),this.closeMenu(f+1,e),this.showItemOnClick&&(this.setLISelected(n),this.isMenu||(this.isCmenuHover=!1))}this.isClosed||this.afterCloseMenu(e),this.isClosed=!1}}else if(this.isMenu&&"DIV"===s.tagName&&this.navIdx.length&&(0,t.closest)(s,".e-menu-vscroll")){var m=(0,t.closest)(s,"."+le),g=Array.prototype.indexOf.call(this.getPopups(),m)+1;g<this.navIdx.length&&(this.closeMenu(g+1,e),m&&this.removeLIStateByClass([_,X],[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("."+ie).id,!0).length:s.parentElement===i)||(n||this.removeLIStateByClass([X],[i]),n&&n.querySelector("."+te)||this.closeMenu(null,e))},i.prototype.afterCloseMenu=function(e){if(!(0,t.isNullOrUndefined)(e)){var i;if(this.showSubMenu){i=this.showItemOnClick&&0===this.navIdx.length?(0,t.closest)(e.target,".e-menu-parent.e-control"):(0,t.closest)(this.element,".e-menu-parent.e-control");var s=this.navIdx.concat(this.cliIdx),n=this.getItem(s);if(n&&n[this.getField("children",s.length-1)]&&n[this.getField("children",s.length-1)].length?(("mouseover"===e.type||t.Browser.isDevice&&this.isMenu)&&this.setLISelected(this.cli),(!this.hamburgerMode&&i||this.hamburgerMode&&"false"===this.cli.getAttribute("aria-expanded"))&&(this.cli.setAttribute("aria-expanded","true"),this.navIdx.push(this.cliIdx),this.openMenu(this.cli,n,null,null,e))):"mouseover"!==e.type&&this.closeMenu(null,e),!i){var r=this.getUlByNavIdx(),o=this.getLIByClass(r,X);o&&(o.setAttribute("aria-expanded","false"),o.classList.remove(X))}}this.keyType=""}},i.prototype.setLISelected=function(e){var t=this.getLIByClass(e.parentElement,X);t&&t.classList.remove(X),this.isMenu||e.classList.remove(_),e.classList.add(X)},i.prototype.getLIByClass=function(e,t){if(e&&e.children)for(var i=0,s=e.children.length;i<s;i++)if(e.children[i].classList.contains(t))return e.children[i];return null},i.prototype.getItemIndex=function(e,t){var i;i="string"==typeof e?e:e.id;var s=!1!==t;return this.getIndex(i,s)},i.prototype.setItem=function(e,t,i){var s;s=i?t||e.id:t||e.text;var n=this.getIndex(s,i),r=this.getItem(n);Object.assign(r,e)},i.prototype.getItem=function(e){var t=(e=e.slice()).pop();return this.getItems(e)[t]},i.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},i.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])},i.prototype.getIdx=function(e,t,i){void 0===i&&(i=!0);var s=Array.prototype.indexOf.call(e.children,t);return i&&e.children[0].classList.contains(z)&&s--,s},i.prototype.getLI=function(e){return"LI"===e.tagName&&e.classList.contains("e-menu-item")?e:(0,t.closest)(e,"li.e-menu-item")},i.prototype.updateItemsByNavIdx=function(){for(var e=this.items,t=0,i=0;i<this.navIdx.length&&(e=e[i].items);i++){t++;var s=this.getUlByNavIdx(t);if(!s)break;this.updateItem(s,e)}},i.prototype.removeChildElement=function(e){for(;e.firstElementChild;)e.removeChild(e.firstElementChild);return e},i.prototype.onPropertyChanged=function(e,i){for(var s=this,n=this.getWrapper(),r=function(r){switch(r){case"cssClass":i.cssClass&&(0,t.removeClass)([n],i.cssClass.split(" ")),e.cssClass&&(0,t.addClass)([n],e.cssClass.replace(/\s+/g," ").trim().split(" "));break;case"enableRtl":o.enableRtl?n.classList.add(oe):n.classList.remove(oe);break;case"showItemOnClick":o.unWireEvents(),o.showItemOnClick=e.showItemOnClick,o.wireEvents();break;case"enableScrolling":if(e.enableScrolling){var l;o.element.classList.contains("e-vertical")?M(o.createElement,n,o.element,"vscroll",o.enableRtl):M(o.createElement,n,o.element,"hscroll",o.enableRtl),o.getPopups().forEach((function(e){l=(0,t.select)(".e-ul",e),M(s.createElement,e,l,"vscroll",s.enableRtl)}))}else{var a=n.children[0];o.element.classList.contains("e-vertical")?U((0,t.getInstance)(a,D),a):U((0,t.getInstance)(a,y),a),n.style.overflow="",n.appendChild(o.element),o.getPopups().forEach((function(e){a=e.children[0],U((0,t.getInstance)(a,D),a),e.style.overflow=""}))}break;case"items":var d=void 0,h=void 0,c=void 0;if(o.isReact&&o.template&&o.clearTemplate(["template"]),Object.keys(i.items).length){var p=Object.keys(e.items);for(u=0;u<p.length;u++)(h=o.getChangedItemIndex(e,[],Number(p[u]))).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{if(o.updateItem(o.element,o.items),o.enableScrolling&&o.element.parentElement.classList.contains("e-custom-scroll")&&(o.element.classList.contains("e-vertical")?M(o.createElement,n,o.element,"vscroll",o.enableRtl):M(o.createElement,n,o.element,"hscroll",o.enableRtl)),!o.hamburgerMode)for(var u=1,f=n.childElementCount;u<f;u++)(0,t.detach)(n.lastElementChild);o.navIdx=[]}}},o=this,l=0,a=Object.keys(e);l<a.length;l++){r(a[l])}},i.prototype.updateItem=function(e,i){if((0,t.isBlazor)()&&!this.isMenu)e=this.removeChildElement(e);else{if(this.enableScrolling){var s=this.getWrapper().children[0];this.element.classList.contains("e-vertical")?U((0,t.getInstance)(s,D),s):U((0,t.getInstance)(s,y),s)}e.innerHTML=""}[].slice.call(this.createItems(i).children).forEach((function(t){e.appendChild(t)}))},i.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],r=Object.keys(n.items).pop();r&&this.getChangedItemIndex(n,t,Number(r))}else"isParentArray"===s&&t.length>1&&t.pop();return t},i.prototype.removeItem=function(e,i,s){e.splice(s,1);var n=this.getWrapper().children;i.length<n.length&&(0,t.detach)(n[i.length].children[s])},i.prototype.unWireEvents=function(e){void 0===e&&(e=this.target);var i=this.getWrapper();if(e){for(var s=void 0,n=void 0,r=(0,t.selectAll)(e),o=0,l=r.length;o<l;o++)s=r[o],this.isMenu?t.EventHandler.remove(s,"click",this.menuHeaderClickHandler):t.Browser.isIos?(n=(0,t.getInstance)(s,t.Touch))&&n.destroy():t.EventHandler.remove(s,"contextmenu",this.cmenuHandler);if(!this.isMenu){t.EventHandler.remove(this.targetElement,"scroll",this.scrollHandler);for(var a=0,d=(0,j.getScrollableParent)(this.targetElement);a<d.length;a++){var h=d[a];t.EventHandler.remove(h,"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()},i.prototype.unWireKeyboardEvent=function(e){var i=(0,t.getInstance)(e,t.KeyboardEvents);i&&i.destroy()},i.prototype.toggleAnimation=function(e,t){var i,s,n=this;void 0===t&&(t=!0),"None"!==this.animationSettings.effect&&t?this.animation.animate(e,{name:this.animationSettings.effect,duration:this.animationSettings.duration,timingFunction:this.animationSettings.easing,begin:function(e){n.hamburgerMode?(s=e.element.parentElement,e.element.style.position="absolute",i=s.offsetHeight,e.element.style.maxHeight=e.element.offsetHeight+"px",s.style.maxHeight=""):(e.element.style.display="block",e.element.style.maxHeight=e.element.getBoundingClientRect().height+"px")},progress:function(e){n.hamburgerMode&&(s.style.minHeight=i+e.element.offsetHeight+"px")},end:function(e){n.hamburgerMode?(e.element.style.position="",e.element.style.maxHeight="",s.style.minHeight="",e.element.style.top="0px",e.element.children[0].focus(),n.triggerOpen(e.element.children[0])):n.end(e.element,t)}}):this.end(e,t)},i.prototype.triggerOpen=function(e){var i=this.navIdx.length?this.getItem(this.navIdx):null,s={element:e,parentItem:i,items:i?i.items:this.items};this.trigger("onOpen",s),this.isMenu||t.EventHandler.add(e,"keydown",this.keyHandler,this)},i.prototype.end=function(e,i){if(i)if(!this.isMenu&&t.Browser.isDevice||(e.style.display="block"),e.style.maxHeight="",this.triggerOpen(e),e.querySelector("."+_))e.querySelector("."+_).focus();else{var s=this.getWrapper().children[this.getIdx(this.getWrapper(),e)-1];this.currentTarget&&(this.currentTarget.classList.contains("e-numerictextbox")||this.currentTarget.classList.contains("e-textbox")||"INPUT"===this.currentTarget.tagName)||(s?s.querySelector("."+X).focus():this.element.focus())}else if(e===this.element){var n=this.getLIByClass(this.element,_);n&&n.classList.remove(_);var r=this.getLIByClass(this.element,X);r&&r.classList.remove(X),e.style.display="none"}else(0,t.detach)(e)},i.prototype.getPersistData=function(){return""},i.prototype.getWrapper=function(){return(0,t.closest)(this.element,".e-"+this.getModuleName()+"-wrapper")},i.prototype.getIndex=function(e,t,i,s,n,r){var o;void 0===i&&(i=this.items),void 0===s&&(s=[]),void 0===n&&(n=!1),void 0===r&&(r=0),r=n?r+1:0;for(var l=0,a=i.length;l<a;l++){if(o=i[l],(t?o[this.getField("itemId",r)]:o[this.getField("text",r)])===e){s.push(l);break}if(o[this.getField("children",r)]&&o[this.getField("children",r)].length){if(-1!==(s=this.getIndex(e,t,o[this.getField("children",r)],s,!0,r))[s.length-1]){s.unshift(l);break}l!==a-1&&s.pop()}else l===a-1&&s.push(-1)}return n||-1!==s[0]?s:[]},i.prototype.enableItems=function(e,i,s){var n,r,o;void 0===i&&(i=!0);for(var l,a=se,d=0;d<e.length;d++){if(o=this.getIndex(e[d],s),this.navIdx.length){if(1!==o.length){l=!1;for(var h=0,c=o.length-1;h<c;h++)if(o[h]!==this.navIdx[h]){l=!0;break}if(l)continue}}else if(1!==o.length)continue;r=o.pop(),(n=this.getUlByNavIdx(o.length))&&!(0,t.isNullOrUndefined)(r)&&(i?this.isMenu?(n.children[r].classList.remove(a),n.children[r].removeAttribute("aria-disabled")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[r+1].classList.remove(a):n.children[r].classList.remove(a):this.isMenu?(n.children[r].classList.add(a),n.children[r].setAttribute("aria-disabled","true")):t.Browser.isDevice&&!n.classList.contains("e-contextmenu")?n.children[r+1].classList.add(a):n.children[r].classList.add(a))}},i.prototype.showItems=function(e,t){this.showHideItems(e,!1,t)},i.prototype.hideItems=function(e,t){this.showHideItems(e,!0,t)},i.prototype.showHideItems=function(e,t,i){for(var s,n,r,o,l=0;l<e.length;l++)if(n=(r=this.getIndex(e[l],i)).pop(),s=this.getUlByNavIdx(r.length),o=this.getItems(r),s){var a=i?s.children[n].id:o[n].text.toString();t&&a===e[l]?s.children[n].classList.add(ne):t||a!==e[l]||s.children[n].classList.remove(ne)}},i.prototype.removeItems=function(e,i){for(var s,n,r,o=0;o<e.length;o++)s=(n=this.getIndex(e[o],i)).pop(),r=this.getItems(n),(0,t.isNullOrUndefined)(s)||this.removeItem(r,n,s)},i.prototype.insertAfter=function(e,t,i){this.insertItems(e,t,i)},i.prototype.insertBefore=function(e,t,i){this.insertItems(e,t,i,!1)},i.prototype.insertItems=function(e,i,s,n){var r,o,l,a,d;void 0===n&&(n=!0);for(var h=0;h<e.length;h++){o=(l=this.getIndex(i,s)).pop(),a=this.getItems(l),d=new de(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(!(0,t.isNullOrUndefined)(o)&&l.length<c.length){o=n?o+1:o,r=this.createItems(a).children[o];var p=this.isMenu?(0,t.select)(".e-menu-parent",c[l.length]):c[l.length];p.insertBefore(r,p.children[o])}}},i.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")}))},i.prototype.destroy=function(){var i=this.getWrapper();if(i){if(this.unWireEvents(),this.isMenu)this.closeMenu(),(0,t.isBlazor)()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML="",this.removeAttributes(),i.parentNode.insertBefore(this.element,i),this.clonedElement=null;else{if(this.clonedElement.style.display="","EJS-CONTEXTMENU"===this.clonedElement.tagName)(0,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),(0,t.isBlazor)()&&!this.isMenu?this.element=this.removeChildElement(this.element):this.element.innerHTML="",(0,t.append)([].slice.call(this.clonedElement.children),this.element),(0,t.detach)(this.clonedElement),this.removeAttributes()}this.clonedElement=null}this.isMenu&&this.clonedElement?((0,t.detach)(this.element),i.style.display="",i.classList.remove("e-"+this.getModuleName()+"-wrapper"),i.removeAttribute("data-ripple")):(0,t.detach)(i),e.prototype.destroy.call(this),this.template&&this.clearTemplate(["template"])}this.rippleFn=null},W([(0,t.Event)()],i.prototype,"beforeItemRender",void 0),W([(0,t.Event)()],i.prototype,"beforeOpen",void 0),W([(0,t.Event)()],i.prototype,"onOpen",void 0),W([(0,t.Event)()],i.prototype,"beforeClose",void 0),W([(0,t.Event)()],i.prototype,"onClose",void 0),W([(0,t.Event)()],i.prototype,"select",void 0),W([(0,t.Event)()],i.prototype,"created",void 0),W([(0,t.Property)("")],i.prototype,"cssClass",void 0),W([(0,t.Property)(0)],i.prototype,"hoverDelay",void 0),W([(0,t.Property)(!1)],i.prototype,"showItemOnClick",void 0),W([(0,t.Property)("")],i.prototype,"target",void 0),W([(0,t.Property)("")],i.prototype,"filter",void 0),W([(0,t.Property)(null)],i.prototype,"template",void 0),W([(0,t.Property)(!1)],i.prototype,"enableScrolling",void 0),W([(0,t.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),W([(0,t.Complex)({itemId:"id",text:"text",parentId:"parentId",iconCss:"iconCss",url:"url",separator:"separator",children:"items"},ae)],i.prototype,"fields",void 0),W([(0,t.Collection)([],de)],i.prototype,"items",void 0),W([(0,t.Complex)({duration:400,easing:"ease",effect:"SlideDown"},he)],i.prototype,"animationSettings",void 0),i=W([t.NotifyPropertyChanges],i)}(t.Component),pe=a(741),ue=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])},e(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)}}(),fe=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},me="e-vertical",ge="e-toolbar-items",ve="e-toolbar-item",ye="e-rtl",be="e-separator",Ce="e-popup-up-icon",Se="e-popup-down-icon",Ie="e-popup-open",Ee="e-template",xe="e-overlay",Ne="e-toolbar-text",Oe="e-popup-text",we="e-overflow-show",Le="e-overflow-hide",ke="e-hor-nav",Ae="e-scroll-nav",Te="e-toolbar-center",Pe="e-tbar-pos",De="e-hscroll-bar",Me="e-toolbar-pop",He="e-toolbar-popup",Ue="e-nav-active",Re="e-ignore",Be="e-popup-alone",je="e-hidden",qe="e-toolbar-multirow",We="e-multirow-pos",Fe="e-multirow-separator",Ve="e-extended-separator",_e="e-extended-toolbar",ze="e-toolbar-extended",Xe="e-tbar-extended",Ke=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ue(i,e),fe([(0,t.Property)("")],i.prototype,"id",void 0),fe([(0,t.Property)("")],i.prototype,"text",void 0),fe([(0,t.Property)("auto")],i.prototype,"width",void 0),fe([(0,t.Property)("")],i.prototype,"cssClass",void 0),fe([(0,t.Property)(!1)],i.prototype,"showAlwaysInPopup",void 0),fe([(0,t.Property)(!1)],i.prototype,"disabled",void 0),fe([(0,t.Property)("")],i.prototype,"prefixIcon",void 0),fe([(0,t.Property)("")],i.prototype,"suffixIcon",void 0),fe([(0,t.Property)(!0)],i.prototype,"visible",void 0),fe([(0,t.Property)("None")],i.prototype,"overflow",void 0),fe([(0,t.Property)("")],i.prototype,"template",void 0),fe([(0,t.Property)("Button")],i.prototype,"type",void 0),fe([(0,t.Property)("Both")],i.prototype,"showTextOn",void 0),fe([(0,t.Property)(null)],i.prototype,"htmlAttributes",void 0),fe([(0,t.Property)("")],i.prototype,"tooltipText",void 0),fe([(0,t.Property)("Left")],i.prototype,"align",void 0),fe([(0,t.Event)()],i.prototype,"click",void 0),fe([(0,t.Property)(-1)],i.prototype,"tabIndex",void 0),i}(t.ChildProperty),Ye=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.resizeContext=s.resize.bind(s),s.orientationChangeContext=s.orientationChange.bind(s),s.keyConfigs={moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow",popupOpen:"enter",popupClose:"escape",tab:"tab",home:"home",end:"end"},s}return ue(i,e),i.prototype.destroy=function(){var i=this;(this.isReact||this.isAngular)&&this.clearTemplate();var s=this.element.querySelectorAll(".e-control.e-btn");for([].slice.call(s).forEach((function(e){(0,t.isNullOrUndefined)(e)||(0,t.isNullOrUndefined)(e.ej2_instances)||(0,t.isNullOrUndefined)(e.ej2_instances[0])||e.ej2_instances[0].isDestroyed||e.ej2_instances[0].destroy()})),this.unwireEvents(),this.tempId.forEach((function(e){(0,t.isNullOrUndefined)(i.element.querySelector(e))||(document.body.appendChild(i.element.querySelector(e)).style.display="none")})),this.destroyItems();this.element.lastElementChild;)this.element.removeChild(this.element.lastElementChild);this.trgtEle&&(this.element.appendChild(this.ctrlTem),this.trgtEle=null,this.ctrlTem=null),this.popObj&&(this.popObj.destroy(),(0,t.detach)(this.popObj.element)),this.activeEle&&(this.activeEle=null),this.popObj=null,this.tbarAlign=null,this.tbarItemsCol=[],this.remove(this.element,"e-toolpop"),this.cssClass&&(0,t.removeClass)([this.element],this.cssClass.split(" ")),this.element.removeAttribute("style"),["aria-disabled","aria-orientation","role"].forEach((function(e){return i.element.removeAttribute(e)})),e.prototype.destroy.call(this)},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(me),this.isExtendedOpen=!1,this.popupPriCount=0,this.enableRtl&&this.add(this.element,ye)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resizeContext),window.addEventListener("orientationchange",this.orientationChangeContext),this.allowKeyboard&&this.wireKeyboardEvent()},i.prototype.wireKeyboardEvent=function(){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.updateTabIndex("0")},i.prototype.updateTabIndex=function(e){var i=this.element.querySelector("."+ve+":not(."+xe+" ):not(."+be+" ):not(."+je+" )");if(!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(i.firstElementChild)){var s=i.firstElementChild.getAttribute("data-tabindex");s&&"-1"===s&&"INPUT"!==i.firstElementChild.tagName&&i.firstElementChild.setAttribute("tabindex",e)}},i.prototype.unwireKeyboardEvent=function(){this.keyModule&&(t.EventHandler.remove(this.element,"keydown",this.docKeyDown),this.keyModule.destroy(),this.keyModule=null)},i.prototype.docKeyDown=function(e){if("INPUT"!==e.target.tagName){var i=!(0,t.isNullOrUndefined)(this.popObj)&&(0,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.unwireKeyboardEvent(),window.removeEventListener("resize",this.resizeContext),window.removeEventListener("orientationchange",this.orientationChangeContext),t.EventHandler.remove(document,"scroll",this.docEvent),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=(0,t.closest)(e.target,".e-popup");this.popObj&&(0,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,Pe),this.scrollModule.destroy(),this.scrollModule=null)},i.prototype.destroyItems=function(){if(this.element&&[].slice.call(this.element.querySelectorAll("."+ve)).forEach((function(e){(0,t.detach)(e)})),this.tbarAlign){var e=this.element.querySelector("."+ge);[].slice.call(e.children).forEach((function(e){(0,t.detach)(e)})),this.tbarAlign=!1,this.remove(e,Pe)}this.clearProperty()},i.prototype.destroyMode=function(){this.scrollModule&&(this.remove(this.scrollModule.element,ye),this.destroyScroll()),this.remove(this.element,Xe),this.remove(this.element,_e);var e=this.element.querySelector(".e-toolbar-multirow");e&&this.remove(e,qe),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&&(0,t.isVisible)(this.popObj.element)?this.popObj.element.querySelector("."+ve):this.element===i||e?this.element.querySelector("."+ve+":not(."+xe+" ):not(."+be+" ):not(."+je+" )"):(0,t.closest)(i,"."+ve)},i.prototype.keyHandling=function(e,i,s,n,r){var o,l,a=this.popObj,d=this.element,h={name:"FadeOut",duration:100},c="moveUp"===i.action?"previous":"next";switch(i.action){case"moveRight":if(this.isVertical)return;d===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":if(e){var p=(0,t.closest)(e,".e-popup"),u=this.element.querySelector("."+ze);"Extended"===this.overflowMode&&u&&u.classList.contains("e-popup-open")&&(p="end"===i.action?u:null),p?(0,t.isVisible)(this.popObj.element)&&(l=[].slice.call(p.children),o="home"===i.action?this.focusFirstVisibleEle(l):this.focusLastVisibleEle(l)):(l=this.element.querySelectorAll("."+ge+" ."+ve+":not(."+be+")"),o="home"===i.action?this.focusFirstVisibleEle(l):this.focusLastVisibleEle(l)),o&&this.elementFocus(o)}break;case"moveUp":case"moveDown":if(this.isVertical)"moveUp"===i.action?this.eleFocus(e,"previous"):this.eleFocus(e,"next");else if(a&&(0,t.closest)(s,".e-popup")){var f=a.element,m=f.firstElementChild;"previous"===c&&m===e?f.lastElementChild.firstChild.focus():"next"===c&&f.lastElementChild===e?m.firstChild.focus():this.eleFocus(e,c)}else"moveDown"===i.action&&a&&(0,t.isVisible)(a.element)&&this.elementFocus(e);break;case"tab":if(!r&&!n){var g=e.firstElementChild;d===s&&(this.activeEle?this.activeEle.focus():(this.activeEleRemove(g),g.focus()))}break;case"popupClose":a&&"Extended"!==this.overflowMode&&a.hide(h);break;case"popupOpen":if(!n)return;a&&!(0,t.isVisible)(a.element)?(a.element.style.top=d.offsetHeight+"px",a.show({name:"FadeIn",duration:100})):a.hide(h)}},i.prototype.keyActionHandler=function(e){var t=e.target;if("INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!this.element.classList.contains(xe)){e.preventDefault();var i=t.classList.contains(ke),s=t.classList.contains(Ae),n=this.clstElement(i,t);(n||s)&&this.keyHandling(n,e,t,i,s)}},i.prototype.disable=function(e){var i=this.element;e?i.classList.add(xe):i.classList.remove(xe),this.activeEle&&this.activeEle.setAttribute("tabindex",this.activeEle.getAttribute("data-tabindex")),this.scrollModule&&this.scrollModule.disable(e),this.popObj&&((0,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(be)||e.classList.contains(xe)||e.getAttribute("disabled")||e.classList.contains(je)||!(0,t.isVisible)(e)||!e.classList.contains(ve)},i.prototype.focusFirstVisibleEle=function(e){for(var t=0;t<e.length;){var i=e[parseInt(t.toString(),10)];if(!i.classList.contains(je)&&!i.classList.contains(xe))return i;t++}},i.prototype.focusLastVisibleEle=function(e){for(var t=e.length-1;t>=0;){var i=e[parseInt(t.toString(),10)];if(!i.classList.contains(je)&&!i.classList.contains(xe))return i;t--}},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((0,t.isNullOrUndefined)(n)||0!==n.children.length||(n=Object(n)[i+"ElementSibling"]),!(0,t.isNullOrUndefined)(n)&&n.children.length>0)if("next"===i){var r=n.querySelector("."+ve);this.eleContains(r)?this.eleFocus(r,i):(r.firstElementChild.focus(),this.activeEleSwitch(r))}else{r=n.lastElementChild;this.eleContains(r)?this.eleFocus(r,i):this.elementFocus(r)}}else if(!(0,t.isNullOrUndefined)(e)){var o=this.element.querySelectorAll("."+ge+" ."+ve+":not(."+be+"):not(."+xe+"):not(."+je+")");"next"===i&&o?this.elementFocus(o[0]):"previous"===i&&o&&this.elementFocus(o[o.length-1])}},i.prototype.clickHandler=function(e){var i,s=this,n=e.target,r=this.element,o=!(0,t.isNullOrUndefined)((0,t.closest)(n,"."+Me)),l=n.classList,a=(0,t.closest)(n,"."+ke);a||(a=n),r.children[0].classList.contains("e-hscroll")||r.children[0].classList.contains("e-vscroll")||!l.contains(ke)||(l=n.querySelector(".e-icons").classList),(l.contains(Ce)||l.contains(Se))&&this.popupClickHandler(r,a,ye);var d=(0,t.closest)(e.target,"."+ve);if(!(0,t.isNullOrUndefined)(d)&&!d.classList.contains(xe)||a.classList.contains(ke)){if(d)i=this.items[this.tbarEle.indexOf(d)];var h={originalEvent:e,item:i};(i&&!(0,t.isNullOrUndefined)(i.click)&&"object"==typeof i.click?!(0,t.isNullOrUndefined)(i.click.observers)&&i.click.observers.length>0:!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(i.click))&&this.trigger("items["+this.tbarEle.indexOf(d)+"].click",h),h.cancel||this.trigger("clicked",h,(function(e){!(0,t.isNullOrUndefined)(s.popObj)&&o&&!e.cancel&&"Popup"===s.overflowMode&&e.item&&"Input"!==e.item.type&&s.popObj.hide({name:"FadeOut",duration:100})}))}},i.prototype.popupClickHandler=function(e,i,s){var n=this.popObj;(0,t.isVisible)(n.element)?(i.classList.remove(Ue),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"}),"Extended"===this.overflowMode&&(n.element.style.minHeight="0px",n.width=this.getToolbarPopupWidth(this.element)),n.dataBind(),n.refreshPosition(),n.element.style.top=this.getElementOffsetY()+"px",i.classList.add(Ue),n.show({name:"FadeIn",duration:100}))},i.prototype.getToolbarPopupWidth=function(e){var t=window.getComputedStyle(e);return parseFloat(t.width)+2*parseFloat(t.borderRightWidth)},i.prototype.render=function(){var e=this;this.initialize(),this.renderControl(),this.wireEvents(),this.renderComplete(),this.isReact&&this.portals&&this.portals.length>0&&this.renderReactTemplates((function(){e.refreshOverflow()}))},i.prototype.initialize=function(){var e=(0,t.formatUnit)(this.width),i=(0,t.formatUnit)(this.height);"msie"===t.Browser.info.name&&"auto"===this.height&&"MultiRow"!==this.overflowMode||(0,t.setStyleAttribute)(this.element,{height:i}),(0,t.setStyleAttribute)(this.element,{width:e});var s={role:"toolbar","aria-disabled":"false","aria-orientation":this.isVertical?"vertical":"horizontal"};(0,t.attributes)(this.element,s),this.cssClass&&(0,t.addClass)([this.element],this.cssClass.split(" "))},i.prototype.renderControl=function(){var e=this.element;this.trgtEle=e.children.length>0?e.querySelector("div"):null,this.tbarAlgEle={lefts:[],centers:[],rights:[]},this.renderItems(),this.renderLayout()},i.prototype.renderLayout=function(){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),this.separator()},i.prototype.itemsAlign=function(e,t){var i,s;this.tbarEle||(this.tbarEle=[]);for(var n=0;n<e.length;n++)i=this.renderSubComponent(e[parseInt(n.toString(),10)],n),-1===this.tbarEle.indexOf(i)&&this.tbarEle.push(i),this.tbarAlign||this.tbarItemAlign(e[parseInt(n.toString(),10)],t,n),(s=t.querySelector(".e-toolbar-"+e[parseInt(n.toString(),10)].align.toLowerCase()))?(e[parseInt(n.toString(),10)].showAlwaysInPopup&&"Show"!==e[parseInt(n.toString(),10)].overflow||this.tbarAlgEle[(e[parseInt(n.toString(),10)].align+"s").toLowerCase()].push(i),s.appendChild(i)):t.appendChild(i);if(this.isReact){this.notify("render-react-toolbar-template",this.portals),this.renderReactTemplates()}},i.prototype.changeOrientation=function(){var e=this.element;this.isVertical?(e.classList.remove(me),this.isVertical=!1,"auto"!==this.height&&"100%"!==this.height||(e.style.height=this.height),e.setAttribute("aria-orientation","horizontal")):(e.classList.add(me),this.isVertical=!0,e.setAttribute("aria-orientation","vertical"),(0,t.setStyleAttribute)(this.element,{height:(0,t.formatUnit)(this.height),width:(0,t.formatUnit)(this.width)})),this.destroyMode(),this.refreshOverflow()},i.prototype.initScroll=function(e,i){if(!this.scrollModule&&this.checkOverflow(e,i[0])){this.tbarAlign&&this.element.querySelector("."+ge+" ."+Te).removeAttribute("style"),this.isVertical?this.scrollModule=new D({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]):this.scrollModule=new y({scrollStep:this.scrollStep,enableRtl:this.enableRtl},i[0]),this.cssClass&&(0,t.addClass)([i[0]],this.cssClass.split(" "));var s=this.scrollModule.element.querySelector("."+De+", .e-vscroll-bar");s&&s.removeAttribute("tabindex"),this.remove(this.scrollModule.element,Pe),(0,t.setStyleAttribute)(this.element,{overflow:"hidden"})}},i.prototype.itemWidthCal=function(e){var i,s=this,n=0;return[].slice.call((0,t.selectAll)("."+ve,e)).forEach((function(e){(0,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((0,t.isNullOrUndefined)(e)||(0,t.isNullOrUndefined)(i)||!(0,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 r=e.querySelector("."+ke),o=e.querySelector("."+Ae),l=0;return r?l=this.isVertical?r.offsetHeight:r.offsetWidth:o&&(l=this.isVertical?2*o.offsetHeight:2*o.offsetWidth),n>s-l},i.prototype.refreshOverflow=function(){this.resize()},i.prototype.toolbarAlign=function(e){this.tbarAlign&&(this.add(e,Pe),this.itemPositioning())},i.prototype.renderOverflowMode=function(){var e=this.element,i=e.querySelector("."+ge),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":(0,t.isNullOrUndefined)(this.scrollModule)&&this.initScroll(e,[].slice.call(e.getElementsByClassName(ge)));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,qe),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,_e),(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((0,t.selectAll)("."+ge+" ."+ve,e)));(0,t.attributes)(this.element.querySelector("."+ke),{tabindex:"0",role:"button","aria-haspopup":"true","aria-label":"overflow"})},i.prototype.separator=function(){var e=this.element,t=[].slice.call(e.querySelectorAll("."+be)),i=e.querySelector("."+Fe),s=e.querySelector("."+Ve),n="MultiRow"===this.overflowMode?i:s;null!==n&&("MultiRow"===this.overflowMode?n.classList.remove(Fe):"Extended"===this.overflowMode&&n.classList.remove(Ve));for(var r=0;r<=t.length-1;r++)t[parseInt(r.toString(),10)].offsetLeft<30&&0!==t[parseInt(r.toString(),10)].offsetLeft&&("MultiRow"===this.overflowMode?t[parseInt(r.toString(),10)].classList.add(Fe):"Extended"===this.overflowMode&&t[parseInt(r.toString(),10)].classList.add(Ve))},i.prototype.createPopupEle=function(e,i){var s=e.querySelector("."+ke),n=this.isVertical;s||this.createPopupIcon(e),s=e.querySelector("."+ke);var r=n?s.offsetHeight:s.offsetWidth,o=(n?e.offsetHeight:e.offsetWidth)-r;this.element.classList.remove("e-rtl"),(0,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,r){var o=e.element,l=[].slice.call((0,t.selectAll)("."+He,o.querySelector("."+ge))),a=(0,t.selectAll)("."+we,s),d=0,h=0;l.forEach((function(o,l){a=(0,t.selectAll)("."+we,s),o.classList.contains(we)&&a.length>0?e.tbResize&&a.length>l?(s.insertBefore(o,a[parseInt(l.toString(),10)]),++h):(s.insertBefore(o,s.children[a.length]),++h):o.classList.contains(we)||e.tbResize&&o.classList.contains(Le)&&s.children.length>0&&0===a.length?(s.insertBefore(o,s.firstChild),++h):o.classList.contains(Le)?i.push(o):e.tbResize?(s.insertBefore(o,s.childNodes[d+h]),++d):s.appendChild(o),o.classList.contains(be)?(0,t.setStyleAttribute)(o,{display:"",height:r+"px"}):(0,t.setStyleAttribute)(o,{display:"",height:n+"px"})})),i.forEach((function(e){s.appendChild(e)}));for(var c=(0,t.selectAll)("."+ve,o.querySelector("."+ge)),p=c.length-1;p>=0;p--){var u=c[parseInt(p.toString(),10)];if(!u.classList.contains(be)||"Extended"===this.overflowMode)break;(0,t.setStyleAttribute)(u,{display:"none"})}},i.prototype.createPopup=function(){var e,i,s=this.element;"Extended"===this.overflowMode&&(i=s.querySelector("."+be),e="auto"===s.style.height||""===s.style.height?null:i&&i.offsetHeight);var n,r=s.querySelector("."+ve+":not(."+be+"):not(."+He+")"),o="auto"===s.style.height||""===s.style.height?null:r&&r.offsetHeight;if((0,t.select)("#"+s.id+"_popup."+Me,s))n=(0,t.select)("#"+s.id+"_popup."+Me,s);else{var l=this.createElement("div",{id:s.id+"_popup",className:Me+" "+ze}),a=this.createElement("div",{id:s.id+"_popup",className:Me});n="Extended"===this.overflowMode?l:a}this.pushingPoppedEle(this,[],n,o,e),this.popupInit(s,n)},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){if("Extended"!==this.overflowMode){var s=this.popObj.element;(0,t.setStyleAttribute)(s,{maxHeight:"",display:"block"}),(0,t.setStyleAttribute)(s,{maxHeight:s.offsetHeight+"px",display:""})}}else{e.appendChild(i),this.cssClass&&(0,t.addClass)([i],this.cssClass.split(" ")),(0,t.setStyleAttribute)(this.element,{overflow:""});var n=new j.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("Extended"===this.overflowMode&&(n.width=this.getToolbarPopupWidth(this.element),n.offsetX=0),n.appendTo(i),t.EventHandler.add(document,"scroll",this.docEvent.bind(this)),t.EventHandler.add(document,"click ",this.docEvent.bind(this)),"Extended"!==this.overflowMode&&(n.element.style.maxHeight=n.element.offsetHeight+"px"),this.isVertical&&(n.element.style.visibility="hidden"),this.isExtendedOpen){var r=this.element.querySelector("."+ke);r.classList.add(Ue),(0,t.classList)(r.firstElementChild,[Ce],[Se]),this.element.querySelector("."+ze).classList.add(Ie)}else n.hide();this.popObj=n}},i.prototype.tbarPopupHandler=function(e){"Extended"===this.overflowMode&&(e?this.add(this.element,Xe):this.remove(this.element,Xe))},i.prototype.popupOpen=function(e){var i=this.popObj;this.isVertical||(i.offsetY=this.getElementOffsetY(),i.dataBind());var s=this.popObj.element,n=this.popObj.element.parentElement,r=n.querySelector("."+ke);r.setAttribute("aria-expanded","true"),"Extended"===this.overflowMode?i.element.style.minHeight="":((0,t.setStyleAttribute)(i.element,{height:"auto",maxHeight:""}),i.element.style.maxHeight=i.element.offsetHeight+"px");var o=s.offsetTop+s.offsetHeight+(0,j.calculatePosition)(n).top,l=r.firstElementChild;r.classList.add(Ue),(0,t.classList)(l,[Ce],[Se]),this.tbarPopupHandler(!0);var a=(0,t.isNullOrUndefined)(window.scrollY)?0:window.scrollY;if(!this.isVertical&&window.innerHeight+a<o&&this.element.offsetTop<s.offsetHeight){var d=s.offsetHeight-(o-window.innerHeight-a+5);i.height=d+"px";for(var h=0;h<=s.childElementCount;h++){var c=s.children[parseInt(h.toString(),10)];if(c.offsetTop+c.offsetHeight>d){d=c.offsetTop;break}}"Extended"!==this.overflowMode&&(0,t.setStyleAttribute)(i.element,{maxHeight:d+"px"})}else if(this.isVertical&&"Extended"!==this.overflowMode){var p=this.element.getBoundingClientRect();(0,t.setStyleAttribute)(i.element,{maxHeight:p.top+this.element.offsetHeight+"px",bottom:0,visibility:""})}if(i){var u=s.getBoundingClientRect();u.right>document.documentElement.clientWidth&&u.width>n.getBoundingClientRect().width&&(i.collision={Y:"none"},i.dataBind()),i.refreshPosition()}},i.prototype.popupClose=function(e){var i=this.element.querySelector("."+ke);i.setAttribute("aria-expanded","false");var s=i.firstElementChild;i.classList.remove(Ue),(0,t.classList)(s,[Se],[Ce]),this.tbarPopupHandler(!1)},i.prototype.checkPriority=function(e,i,s,n){for(var r,o=this.popupPriCount>0,l=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[parseInt(p.toString(),10)]);this.isVertical?(u=parseFloat(f.marginTop),u+=parseFloat(f.marginBottom)):(u=parseFloat(f.marginRight),u+=parseFloat(f.marginLeft));var m=i[parseInt(p.toString(),10)]===this.tbarEle[0];m&&(this.tbarEleMrgn=u),r=this.isVertical?i[parseInt(p.toString(),10)].offsetHeight:i[parseInt(p.toString(),10)].offsetWidth;var g=m?r+u:r;if(c(i[parseInt(p.toString(),10)],[Be])&&o&&(i[parseInt(p.toString(),10)].classList.add(He),this.isVertical?(0,t.setStyleAttribute)(i[parseInt(p.toString(),10)],{display:"none",minHeight:g+"px"}):(0,t.setStyleAttribute)(i[parseInt(p.toString(),10)],{display:"none",minWidth:g+"px"}),h++),this.isVertical?i[parseInt(p.toString(),10)].offsetTop+i[parseInt(p.toString(),10)].offsetHeight+u>s:i[parseInt(p.toString(),10)].offsetLeft+i[parseInt(p.toString(),10)].offsetWidth+u>s){if(i[parseInt(p.toString(),10)].classList.contains(be)){if("Extended"===this.overflowMode)c(v=i[parseInt(p.toString(),10)],[be,Re])&&(i[parseInt(p.toString(),10)].classList.add(He),h++),d++;else if("Popup"===this.overflowMode){var v;if(a>0&&d===h)c(v=i[p+d+(a-1)],[be,Re])&&(0,t.setStyleAttribute)(v,{display:"none"});a++,d=0,h=0}}else d++;i[parseInt(p.toString(),10)].classList.contains(we)&&n||c(i[parseInt(p.toString(),10)],[be,Re])?s-=(this.isVertical?i[parseInt(p.toString(),10)].offsetHeight:i[parseInt(p.toString(),10)].offsetWidth)+u:(i[parseInt(p.toString(),10)].classList.add(He),this.isVertical?(0,t.setStyleAttribute)(i[parseInt(p.toString(),10)],{display:"none",minHeight:g+"px"}):(0,t.setStyleAttribute)(i[parseInt(p.toString(),10)],{display:"none",minWidth:g+"px"}),h++)}}if(n){var y=(0,t.selectAll)("."+ve+":not(."+He+")",this.element);this.checkPriority(e,y,l,!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 r=this.createElement("div",{className:Se+" e-icons"});n.appendChild(r),n.setAttribute("tabindex","0"),n.setAttribute("role","button"),e.appendChild(n)},i.prototype.tbarPriRef=function(e,i,s,n,r,o,l,a,d){var h=a,c=this.popObj.element,p="."+ve+":not(."+be+"):not(."+we+")",u=(0,t.selectAll)("."+He+":not(."+we+")",c).length,f=function(e,t){return e.classList.contains(t)};if(0===(0,t.selectAll)(p,e).length){var m=e.children[i-(i-s)-1],g=!(0,t.isNullOrUndefined)(m)&&f(m,Re);if(!(0,t.isNullOrUndefined)(m)&&f(m,be)&&!(0,t.isVisible)(m)||g){m.style.display="unset";var v=m.offsetWidth+2*parseFloat(window.getComputedStyle(m).marginRight),y=m.previousElementSibling;o+v<l||r?(e.insertBefore(n,e.children[i+h-(i-s)]),(0,t.isNullOrUndefined)(y)||(y.style.display="")):((0,t.setStyleAttribute)(n,d),y.classList.contains(be)&&(y.style.display="none")),m.style.display=""}else e.insertBefore(n,e.children[i+h-(i-s)])}else e.insertBefore(n,e.children[i+h-u])},i.prototype.popupRefresh=function(e,i){var s=this,n=this.element,r=this.isVertical,o=n.querySelector("."+ge),l=n.querySelector("."+ke);if(!(0,t.isNullOrUndefined)(l)){var a;o.removeAttribute("style"),e.style.display="block",a=r?n.offsetHeight-(l.offsetHeight+o.offsetHeight):n.offsetWidth-(l.offsetWidth+o.offsetWidth);var d=0;[].slice.call(e.children).forEach((function(e){d+=s.popupEleWidth(e),(0,t.setStyleAttribute)(e,{position:""})})),a+(r?l.offsetHeight:l.offsetWidth)>d&&0===this.popupPriCount&&(i=!0),this.popupEleRefresh(a,e,i),e.style.display="",0===e.children.length&&l&&this.popObj&&((0,t.detach)(l),l=null,this.popObj.destroy(),(0,t.detach)(this.popObj.element),this.popObj=null)}},i.prototype.ignoreEleFetch=function(e,t){var i=[].slice.call(t.querySelectorAll("."+Re)),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("."+ke).offsetWidth,n=e.querySelector("."+ge).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(Oe)){var n=e.children[0];!(0,t.isNullOrUndefined)(s)&&e.classList.contains(Oe)?s.style.display="none":!(0,t.isNullOrUndefined)(s)&&e.classList.contains(Ne)&&(s.style.display="block"),n.style.minWidth="0%",i=parseFloat(this.isVertical?e.style.minHeight:e.style.minWidth),n.style.minWidth="",n.style.minHeight="",(0,t.isNullOrUndefined)(s)||(s.style.display="")}return i},i.prototype.popupEleRefresh=function(e,i,s){for(var n,r,o=this.popupPriCount>0,l=this.tbarEle,a=this.element.querySelector("."+ge),d=0,h=function(i){if(i.classList.contains(Be)&&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";var p={minWidth:i.style.minWidth,height:i.style.height,minHeight:i.style.minHeight};if((0,t.setStyleAttribute)(i,{minWidth:"",height:"",minHeight:""}),i.classList.contains(Le)||i.classList.remove(He),r=c.tbarEle.indexOf(i),c.tbarAlign){var u=c.items[parseInt(r.toString(),10)].align;r=c.tbarAlgEle[(u+"s").toLowerCase()].indexOf(i),l=c.tbarAlgEle[(u+"s").toLowerCase()],a=c.element.querySelector("."+ge+" .e-toolbar-"+u.toLowerCase())}var f=0;"Extended"!==c.overflowMode&&l.slice(0,r).forEach((function(t){(t.classList.contains(we)||t.classList.contains(be))&&(t.classList.contains(be)&&(t.style.display="",e-=t.offsetWidth),f++)})),d=c.ignoreEleFetch(r,a),i.classList.contains(we)?(c.tbarPriRef(a,r,f,i,s,h,e,d,p),e-=i.offsetWidth):0===r?(a.insertBefore(i,a.firstChild),e-=i.offsetWidth):(n=(0,t.selectAll)("."+we,c.popObj.element).length,a.insertBefore(i,a.children[r+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(ge)[0])&&!s&&this.renderOverflowMode()},i.prototype.removePositioning=function(){var e=this.element.querySelector("."+ge);if(!(0,t.isNullOrUndefined)(e)&&e.classList.contains(Pe)){this.remove(e,Pe);var i=[].slice.call(e.childNodes);i[1].removeAttribute("style"),i[2].removeAttribute("style")}},i.prototype.refreshPositioning=function(){var e=this.element.querySelector("."+ge);this.add(e,Pe),this.itemPositioning()},i.prototype.itemPositioning=function(){var e,i=this.element.querySelector("."+ge);if(!(0,t.isNullOrUndefined)(i)&&i.classList.contains(Pe)){var s,n=this.element.querySelector("."+ke);if(this.scrollModule){var r=this.isVertical?"e-vscroll-content":"e-hscroll-content";s=[].slice.call(i.querySelector("."+r).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 l=(this.isVertical?n.offsetHeight:n.offsetWidth)+"px";s[2].removeAttribute("style"),this.isVertical?this.enableRtl?s[2].style.top=l:s[2].style.bottom=l:this.enableRtl?s[2].style.left=l:s[2].style.right=l}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:Te})),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,Pe);else if("Left"!==e.align){var r=t.childNodes,o=n[0];[].slice.call(r).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,Pe)}}},i.prototype.ctrlTemplate=function(){var e=this;this.ctrlTem=this.trgtEle.cloneNode(!0),this.add(this.trgtEle,ge),this.tbarEle=[],[].slice.call(this.trgtEle.children).forEach((function(i){"DIV"===i.tagName&&(e.tbarEle.push(i),(0,t.isNullOrUndefined)(i.firstElementChild)||i.firstElementChild.setAttribute("aria-disabled","false"),e.add(i,ve))}))},i.prototype.renderItems=function(){var e=this.element,t=this.items;if(null!=this.trgtEle)this.ctrlTemplate();else if(e&&t.length>0){var i=void 0;e&&e.children.length>0&&(i=e.querySelector("."+ge)),i||(i=this.createElement("div",{className:ge})),this.itemsAlign(t,i),e.appendChild(i)}},i.prototype.setAttr=function(e,t){for(var i,s=Object.keys(e),n=0;n<s.length;n++)"class"===(i=s[parseInt(n.toString(),10)])?this.add(t,e[""+i]):t.setAttribute(i,e[""+i])},i.prototype.enableItems=function(e,i){var s,n=e,r=n.length;(0,t.isNullOrUndefined)(i)&&(i=!0);var o=function(e,i){e?(i.classList.remove(xe),(0,t.isNullOrUndefined)(i.firstElementChild)||i.firstElementChild.setAttribute("aria-disabled","false")):(i.classList.add(xe),(0,t.isNullOrUndefined)(i.firstElementChild)||i.firstElementChild.setAttribute("aria-disabled","true"))};if(!(0,t.isNullOrUndefined)(r)&&r>=1){for(var l=0,a=[].slice.call(n);l<r;l++){var d=a[parseInt(l.toString(),10)];if("number"==typeof d){if(s=this.getElementByIndex(d),(0,t.isNullOrUndefined)(s))return;n[parseInt(l.toString(),10)]=s}else s=d;o(i,s)}i?(0,t.removeClass)(n,xe):(0,t.addClass)(n,xe)}else{if("number"==typeof n){if(s=this.getElementByIndex(n),(0,t.isNullOrUndefined)(s))return}else s=e;o(i,s)}},i.prototype.getElementByIndex=function(e){return this.tbarEle[parseInt(e.toString(),10)]?this.tbarEle[parseInt(e.toString(),10)]:null},i.prototype.addItems=function(e,i){var s;this.extendedOpen();var n=this.element.querySelector("."+ge);if((0,t.isNullOrUndefined)(n))this.itemsRerender(e);else{var r,o="Left";(0,t.isNullOrUndefined)(i)&&(i=0),e.forEach((function(e){(0,t.isNullOrUndefined)(e.align)||"Left"===e.align||"Left"!==o||(o=e.align)}));for(var l=0,a=e;l<a.length;l++){var d=a[l];if((0,t.isNullOrUndefined)(d.type)&&(d.type="Button"),s=(0,t.selectAll)("."+ve,this.element),d.align=o,r=this.renderSubComponent(d,i),this.tbarEle.length>=i&&s.length>=0){(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=(0,t.closest)(s[0],"."+ge).children[parseInt(h.toString(),10)]).insertBefore(r,c.children[parseInt(i.toString(),10)]),this.tbarAlgEle[(d.align+"s").toLowerCase()].splice(i,0,r),this.refreshPositioning()):0===s.length?(s=(0,t.selectAll)("."+ge,this.element))[0].appendChild(r):s[0].parentNode.insertBefore(r,s[parseInt(i.toString(),10)]):(this.tbarItemAlign(d,n,1),this.tbarAlign=!0,(c=(0,t.closest)(s[0],"."+ge).children[parseInt(h.toString(),10)]).appendChild(r),this.tbarAlgEle[(d.align+"s").toLowerCase()].push(r),this.refreshPositioning()),this.items.splice(i,0,d),d.template&&this.tbarEle.splice(this.tbarEle.length-1,1),this.tbarEle.splice(i,0,r),i++,this.offsetWid=n.offsetWidth}}n.style.width="",this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()}},i.prototype.removeItems=function(e){var i,s=e,n=[].slice.call((0,t.selectAll)("."+ve,this.element));if("number"==typeof s)i=parseInt(e.toString(),10),this.removeItemByIndex(i,n);else if(s&&s.length>1)for(var r=0,o=[].slice.call(s);r<o.length;r++){var l=o[r];i=this.tbarEle.indexOf(l),this.removeItemByIndex(i,n),n=(0,t.selectAll)("."+ve,this.element)}else{l=s&&s.length&&1===s.length?s[0]:e;i=n.indexOf(l),this.removeItemByIndex(i,n)}this.resize()},i.prototype.removeItemByIndex=function(e,i){if(this.tbarEle[parseInt(e.toString(),10)]&&i[parseInt(e.toString(),10)]){var s=this.tbarEle.indexOf(i[parseInt(e.toString(),10)]);if(this.tbarAlign){var n=this.tbarAlgEle[(this.items[parseInt(s.toString(),10)].align+"s").toLowerCase()].indexOf(this.tbarEle[parseInt(s.toString(),10)]);this.tbarAlgEle[(this.items[parseInt(s.toString(),10)].align+"s").toLowerCase()].splice(parseInt(n.toString(),10),1)}this.isReact&&this.clearToolbarTemplate(i[parseInt(e.toString(),10)]);var r=i[parseInt(e.toString(),10)].querySelector(".e-control.e-btn");(0,t.isNullOrUndefined)(r)||(0,t.isNullOrUndefined)(r.ej2_instances[0])||r.ej2_instances[0].isDestroyed||r.ej2_instances[0].destroy(),(0,t.detach)(i[parseInt(e.toString(),10)]),this.items.splice(s,1),this.tbarEle.splice(s,1)}},i.prototype.templateRender=function(e,i,s,n){var r,o=s.type,l=e;if("object"==typeof e&&(r="function"==typeof l.appendTo),"string"!=typeof e&&r){if("Input"===o){c=this.createElement("input");s.id?c.id=s.id:c.id=(0,t.getUniqueID)("tbr-ipt"),i.appendChild(c),l.appendTo(c)}}else{var a,d=void 0,h=new RegExp(/<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i);a="string"==typeof e?e.trim():e;try{if("object"!=typeof e||(0,t.isNullOrUndefined)(e.tagName))if("string"==typeof e&&h.test(a))i.innerHTML=a;else if(document.querySelectorAll(a).length){var c,p=(c=document.querySelector(a)).outerHTML.trim();i.appendChild(c),c.style.display="",(0,t.isNullOrUndefined)(p)||this.tempId.push(a)}else d=(0,t.compile)(a);else i.appendChild(e)}catch(e){d=(0,t.compile)(a)}var u=void 0;if(!(0,t.isNullOrUndefined)(d))u=d({},this,"template",this.element.id+n+"_template",this.isStringTemplate,void 0,void 0,this.root);!(0,t.isNullOrUndefined)(u)&&u.length>0&&[].slice.call(u).forEach((function(e){(0,t.isNullOrUndefined)(e.tagName)||(e.style.display=""),i.appendChild(e)}))}this.add(i,Ee);var f=i.firstElementChild;(0,t.isNullOrUndefined)(f)||(f.setAttribute("tabindex",(0,t.isNullOrUndefined)(f.getAttribute("tabIndex"))?"-1":this.getDataTabindex(f)),f.setAttribute("data-tabindex",(0,t.isNullOrUndefined)(f.getAttribute("tabIndex"))?"-1":this.getDataTabindex(f))),this.tbarEle.push(i)},i.prototype.buttonRendering=function(e,i){var s=this.createElement("button",{className:"e-tbar-btn"});s.setAttribute("type","button");var n,r,o=e.text;e.id?s.id=e.id:s.id=(0,t.getUniqueID)("e-tbr-btn");var l=this.createElement("span",{className:"e-tbar-btn-text"});o?(l.innerHTML=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(o):o,s.appendChild(l),s.classList.add("e-tbtn-txt")):this.add(i,"e-tbtn-align"),(e.prefixIcon||e.suffixIcon)&&(e.prefixIcon&&e.suffixIcon||e.prefixIcon?(n=e.prefixIcon+" e-icons",r="Left"):(n=e.suffixIcon+" e-icons",r="Right"));var a=new pe.Button({iconCss:n,iconPosition:r});return a.createElement=this.createElement,a.appendTo(s),e.width&&(0,t.setStyleAttribute)(s,{width:(0,t.formatUnit)(e.width)}),s},i.prototype.renderSubComponent=function(e,i){var s,n=this.createElement("div",{className:ve}),r=this.createElement("div",{innerHTML:this.enableHtmlSanitizer&&!(0,t.isNullOrUndefined)(e.tooltipText)?t.SanitizeHtmlHelper.sanitize(e.tooltipText):e.tooltipText});if(this.tbarEle||(this.tbarEle=[]),e.htmlAttributes&&this.setAttr(e.htmlAttributes,n),e.tooltipText&&n.setAttribute("title",r.textContent),e.cssClass&&(n.className=n.className+" "+e.cssClass),e.template)this.templateRender(e.template,n,e,i);else switch(e.type){case"Button":(s=this.buttonRendering(e,n)).setAttribute("tabindex",(0,t.isNullOrUndefined)(e.tabIndex)?"-1":e.tabIndex.toString()),s.setAttribute("data-tabindex",(0,t.isNullOrUndefined)(e.tabIndex)?"-1":e.tabIndex.toString()),s.setAttribute("aria-label",e.text||e.tooltipText),s.setAttribute("aria-disabled","false"),n.appendChild(s),n.addEventListener("click",this.itemClick.bind(this));break;case"Separator":this.add(n,be)}if(e.showTextOn){var o=e.showTextOn;"Toolbar"===o?(this.add(n,Ne),this.add(n,"e-tbtn-align")):"Overflow"===o&&this.add(n,Oe)}if(e.overflow){var l=e.overflow;"Show"===l?this.add(n,we):"Hide"===l&&(n.classList.contains(be)||this.add(n,Le))}return"Show"!==e.overflow&&e.showAlwaysInPopup&&!n.classList.contains(be)&&(this.add(n,Be),this.popupPriCount++),e.disabled&&this.add(n,xe),!1===e.visible&&this.add(n,je),n},i.prototype.getDataTabindex=function(e){return(0,t.isNullOrUndefined)(e.getAttribute("data-tabindex"))?"-1":e.getAttribute("data-tabindex")},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){var i=this.element.querySelector("."+ve+":not(."+xe+" ):not(."+be+" ):not(."+je+" )");if((0,t.isNullOrUndefined)(this.activeEle)||(this.activeEle.setAttribute("tabindex",this.getDataTabindex(this.activeEle)),i&&i.removeAttribute("tabindex"),i=this.activeEle),this.activeEle=e,"-1"===this.getDataTabindex(this.activeEle))if((0,t.isNullOrUndefined)(this.trgtEle)&&!e.parentElement.classList.contains(Ee)){if(!(0,t.isNullOrUndefined)(this.element.querySelector(".e-hor-nav"))&&this.element.querySelector(".e-hor-nav").classList.contains("e-nav-active")){this.updateTabIndex("0");var s="-1"===this.getDataTabindex(i)?"0":this.getDataTabindex(i);i.setAttribute("tabindex",s)}else this.updateTabIndex("-1");e.removeAttribute("tabindex")}else{var n=parseInt(this.getDataTabindex(this.activeEle),10)+1;this.activeEle.setAttribute("tabindex",n.toString())}},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.getModuleName=function(){return"toolbar"},i.prototype.itemsRerender=function(e){this.items=this.tbarItemsCol,(this.isReact||this.isAngular)&&this.clearTemplate(),this.destroyMode(),this.destroyItems(),this.items=e,this.tbarItemsCol=this.items,this.renderItems(),this.renderOverflowMode(),this.isReact&&this.renderReactTemplates()},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(ge)[0]);if(!i){this.destroyScroll();var s=e.querySelector("."+ge);(0,t.isNullOrUndefined)(s)||(this.remove(s,We),this.tbarAlign&&this.add(s,Pe))}i&&this.scrollModule&&this.offsetWid===e.offsetWidth||((this.offsetWid>e.offsetWidth||i)&&this.renderOverflowMode(),this.popObj&&("Extended"===this.overflowMode&&(this.popObj.width=this.getToolbarPopupWidth(this.element)),this.tbarAlign&&this.removePositioning(),this.popupRefresh(this.popObj.element,!1),this.tbarAlign&&this.refreshPositioning()),this.element.querySelector("."+De)&&(this.scrollStep=this.element.querySelector("."+De).offsetWidth),this.offsetWid=e.offsetWidth,this.tbResize=!1,this.separator())},i.prototype.orientationChange=function(){var e=this;setTimeout((function(){e.resize()}),500)},i.prototype.extendedOpen=function(){var e=this.element.querySelector("."+ze);"Extended"===this.overflowMode&&e&&(this.isExtendedOpen=e.classList.contains(Ie))},i.prototype.updateHideEleTabIndex=function(e,t,i,s,n){i&&(s=n.indexOf(e));for(var r=n[++s];r;){if(!this.eleContains(r)){var o=r.firstElementChild.getAttribute("data-tabindex");t&&"-1"===o?r.firstElementChild.setAttribute("tabindex","0"):o!==r.firstElementChild.getAttribute("tabindex")&&r.firstElementChild.setAttribute("tabindex",o);break}r=n[++s]}},i.prototype.clearToolbarTemplate=function(e){if(this.registeredTemplate&&this.registeredTemplate.template)for(var i=this.registeredTemplate,s=0;s<i.template.length;s++){var n=i.template[parseInt(s.toString(),10)].rootNodes[0],r=(0,t.closest)(n,"."+ve);if(!(0,t.isNullOrUndefined)(r)&&r===e){this.clearTemplate(["template"],[i.template[parseInt(s.toString(),10)]]);break}}else if(this.portals&&this.portals.length>0){var o=this.portals;for(s=0;s<o.length;s++){var l=o[parseInt(s.toString(),10)];r=(0,t.closest)(l.containerInfo,"."+ve);if(!(0,t.isNullOrUndefined)(r)&&r===e){this.clearTemplate(["template"],s);break}}}},i.prototype.onPropertyChanged=function(e,i){var s=this.element;this.extendedOpen();for(var n=0,r=Object.keys(e);n<r.length;n++){switch(r[n]){case"items":if(e.items instanceof Array&&i.items instanceof Array)this.itemsRerender(e.items);else for(var o=Object.keys(e.items),l=0;l<o.length;l++){var a=parseInt(Object.keys(e.items)[parseInt(l.toString(),10)],10),d=Object.keys(e.items[parseInt(a.toString(),10)])[0],h=Object(e.items[parseInt(a.toString(),10)])[""+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[parseInt(a.toString(),10)].showAlwaysInPopup&&p)&&--this.popupPriCount,(0,t.isNullOrUndefined)(this.scrollModule)&&this.destroyMode();var u=[].slice.call((0,t.selectAll)("."+ge+" ."+ve,s));this.isReact&&this.items[parseInt(a.toString(),10)].template&&this.clearToolbarTemplate(u[parseInt(a.toString(),10)]),(0,t.detach)(u[parseInt(a.toString(),10)]),this.tbarEle.splice(a,1),this.addItems([this.items[parseInt(a.toString(),10)]],a),this.items.splice(a,1),this.items[parseInt(a.toString(),10)].template&&this.tbarEle.splice(this.items.length,1)}break;case"width":(0,t.setStyleAttribute)(s,{width:(0,t.formatUnit)(e.width)}),this.refreshOverflow();break;case"height":(0,t.setStyleAttribute)(this.element,{height:(0,t.formatUnit)(e.height)});break;case"overflowMode":this.destroyMode(),this.renderOverflowMode(),this.enableRtl&&this.add(s,ye),this.refreshOverflow();break;case"enableRtl":e.enableRtl?this.add(s,ye):this.remove(s,ye),(0,t.isNullOrUndefined)(this.scrollModule)||(e.enableRtl?this.add(this.scrollModule.element,ye):this.remove(this.scrollModule.element,ye)),(0,t.isNullOrUndefined)(this.popObj)||(e.enableRtl?this.add(this.popObj.element,ye):this.remove(this.popObj.element,ye)),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"});break;case"cssClass":i.cssClass&&(0,t.removeClass)([this.element],i.cssClass.split(" ")),e.cssClass&&(0,t.addClass)([this.element],e.cssClass.split(" "));break;case"allowKeyboard":this.unwireKeyboardEvent(),e.allowKeyboard&&this.wireKeyboardEvent()}}},i.prototype.hideItem=function(e,i){var s,n="object"==typeof e,r=e;if(n||!(0,t.isNullOrUndefined)(r)){var o=[].slice.call((0,t.selectAll)("."+ve,this.element));if(n)s=e;else if(this.tbarEle[parseInt(r.toString(),10)]){s=[].slice.call((0,t.selectAll)("."+ve,this.element))[parseInt(r.toString(),10)]}s&&(i?(s.classList.add(je),s.classList.contains(be)||((0,t.isNullOrUndefined)(s.firstElementChild.getAttribute("tabindex"))||"-1"!==s.firstElementChild.getAttribute("tabindex"))&&this.updateHideEleTabIndex(s,i,n,r,o)):(s.classList.remove(je),s.classList.contains(be)||this.updateHideEleTabIndex(s,i,n,r,o)),this.refreshOverflow())}},fe([(0,t.Collection)([],Ke)],i.prototype,"items",void 0),fe([(0,t.Property)("auto")],i.prototype,"width",void 0),fe([(0,t.Property)("auto")],i.prototype,"height",void 0),fe([(0,t.Property)("")],i.prototype,"cssClass",void 0),fe([(0,t.Property)("Scrollable")],i.prototype,"overflowMode",void 0),fe([(0,t.Property)()],i.prototype,"scrollStep",void 0),fe([(0,t.Property)(!0)],i.prototype,"enableCollision",void 0),fe([(0,t.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),fe([(0,t.Property)(!0)],i.prototype,"allowKeyboard",void 0),fe([(0,t.Event)()],i.prototype,"clicked",void 0),fe([(0,t.Event)()],i.prototype,"created",void 0),fe([(0,t.Event)()],i.prototype,"destroyed",void 0),fe([(0,t.Event)()],i.prototype,"beforeCreate",void 0),i=fe([t.NotifyPropertyChanges],i)}(t.Component),Ge=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])},e(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)}}(),Qe=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},Je="e-acrdn-root",Ze="e-accordion",$e="e-acrdn-item",et="e-item-focus",tt="e-hide",it="e-acrdn-header",st="e-acrdn-header-content",nt="e-acrdn-panel",rt="e-acrdn-content",ot="e-toggle-icon",lt="e-expand-icon",at="e-rtl",dt="e-content-hide",ht="e-select",ct="e-selected",pt="e-active",ut="e-overlay",ft="e-toggle-animation",mt="e-expand-state",gt="e-accordion-container",vt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ge(i,e),Qe([(0,t.Property)("SlideDown")],i.prototype,"effect",void 0),Qe([(0,t.Property)(400)],i.prototype,"duration",void 0),Qe([(0,t.Property)("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),yt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ge(i,e),Qe([(0,t.Complex)({effect:"SlideUp",duration:400,easing:"linear"},vt)],i.prototype,"collapse",void 0),Qe([(0,t.Complex)({effect:"SlideDown",duration:400,easing:"linear"},vt)],i.prototype,"expand",void 0),i}(t.ChildProperty),bt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ge(i,e),Qe([(0,t.Property)(null)],i.prototype,"content",void 0),Qe([(0,t.Property)(null)],i.prototype,"header",void 0),Qe([(0,t.Property)(null)],i.prototype,"cssClass",void 0),Qe([(0,t.Property)(null)],i.prototype,"iconCss",void 0),Qe([(0,t.Property)(!1)],i.prototype,"expanded",void 0),Qe([(0,t.Property)(!0)],i.prototype,"visible",void 0),Qe([(0,t.Property)(!1)],i.prototype,"disabled",void 0),Qe([(0,t.Property)()],i.prototype,"id",void 0),i}(t.ChildProperty),Ct=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 Ge(i,e),i.prototype.destroy=function(){(this.isReact||this.isAngular||this.isVue)&&this.clearTemplate();var i=this.element;if(e.prototype.destroy.call(this),this.unWireEvents(),this.isDestroy=!0,this.restoreContent(null),[].slice.call(i.children).forEach((function(e){i.removeChild(e)})),this.trgtEle){for(this.trgtEle=null;this.ctrlTem.firstElementChild;)i.appendChild(this.ctrlTem.firstElementChild);this.ctrlTem=null}i.classList.remove(Je),i.removeAttribute("style"),this.element.removeAttribute("data-ripple"),!this.isNested&&t.isRippleEnabled&&this.removeRippleEffect()},i.prototype.preRender=function(){var e=(0,t.closest)(this.element,"."+nt);this.isNested=!1,this.templateEle=[],this.isDestroy||(this.isDestroy=!1),e&&e.firstElementChild&&e.firstElementChild.firstElementChild?e.firstElementChild.firstElementChild.classList.contains(Ze)&&(e.classList.add("e-nested"),this.isNested=!0):this.element.classList.add(Je),this.enableRtl&&this.add(this.element,at)},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=(0,t.formatUnit)(this.width),i=(0,t.formatUnit)(this.height);(0,t.setStyleAttribute)(this.element,{width:e,height:i}),(0,t.isNullOrUndefined)(this.initExpand)&&(this.initExpand=[]),!(0,t.isNullOrUndefined)(this.expandedIndices)&&this.expandedIndices.length>0&&(this.initExpand=this.expandedIndices)},i.prototype.renderControl=function(){this.trgtEle=this.element.children.length>0?(0,t.select)("div",this.element):null,this.renderItems(),this.initItemExpand()},i.prototype.wireFocusEvents=function(){for(var e=0,i=[].slice.call(this.element.querySelectorAll("."+$e));e<i.length;e++){var s=i[e],n=s.querySelector("."+it);s.childElementCount>0&&n&&(t.EventHandler.clearEvents(n),t.EventHandler.add(n,"focus",this.focusIn,this),t.EventHandler.add(n,"blur",this.focusOut,this))}},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.clickHandler),(0,t.isNullOrUndefined)(this.keyModule)||this.keyModule.destroy()},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.clickHandler,this),this.isNested||this.isDestroy||(this.removeRippleEffect=(0,t.rippleEffect)(this.element,{selector:"."+it})),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{return"function"!=typeof e&&document.querySelectorAll(e).length?(0,t.compile)(document.querySelector(e).innerHTML.trim()):(0,t.compile)(e)}catch(i){return(0,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.focusIn=function(e){e.target.parentElement.classList.add(et)},i.prototype.focusOut=function(e){e.target.parentElement.classList.remove(et)},i.prototype.ctrlTemplate=function(){var e;this.ctrlTem=this.element.cloneNode(!0);var i=(0,t.select)("."+gt,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:ot}),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[parseInt(t.toString(),10)]);this.isReact&&this.renderReactTemplates()}},i.prototype.renderItems=function(){var e,i,s=this,n=this.element;if((0,t.isNullOrUndefined)(this.trgtEle)||this.ctrlTemplate(),!(0,t.isNullOrUndefined)(this.dataSource)&&this.dataSource.length>0)this.dataSource.forEach((function(e,r){i=s.renderInnerItem(e,r),n.appendChild(i),i.childElementCount>0&&(t.EventHandler.add(i.querySelector("."+it),"focus",s.focusIn,s),t.EventHandler.add(i.querySelector("."+it),"blur",s.focusOut,s))}));else{var r=this.items;n&&r.length>0&&r.forEach((function(i,r){e=s.renderInnerItem(i,r),n.appendChild(e),e.childElementCount>0&&(t.EventHandler.add(e.querySelector("."+it),"focus",s.focusIn,s),t.EventHandler.add(e.querySelector("."+it),"blur",s.focusOut,s))}))}this.isReact&&this.renderReactTemplates()},i.prototype.clickHandler=function(e){var i,s=e.target,n=this.getItems(),r={};if((0,t.closest)(s,"."+Ze)===this.element){s.classList.add("e-target");var o,l=(0,t.closest)(s,"."+$e),a=(0,t.closest)(s,"."+it),d=(0,t.closest)(s,"."+nt);l&&((0,t.isNullOrUndefined)(a)||(0,t.isNullOrUndefined)(d))&&(a=l.children[0],d=l.children[1]),a&&(i=(0,t.select)("."+ot,a)),a?o=(0,t.closest)(a,"."+$e):d&&(o=(0,t.closest)(d,"."+$e));var h=this.getIndexByItem(l);o&&(r.item=n[this.getIndexByItem(o)]),r.originalEvent=e,!(!(0,t.isNullOrUndefined)(i)&&l.childElementCount<=1)||!(0,t.isNullOrUndefined)(d)&&(0,t.isNullOrUndefined)((0,t.select)("."+it+" ."+ot,o))||(l.appendChild(this.contentRendering(h)),this.ariaAttrUpdate(l)),this.afterContentRender(s,r,l,a,d,o),this.isReact&&this.renderReactTemplates()}},i.prototype.afterContentRender=function(e,i,s,n,r,o){var l=this,a=[];this.trigger("clicked",i);var d=r&&!(0,t.isNullOrUndefined)((0,t.select)(".e-target",r)),h="."+nt+" ."+Ze,c=r&&!(0,t.isNullOrUndefined)((0,t.select)("."+Ze,r))&&(0,t.isNullOrUndefined)((0,t.closest)(e,h)),p=r&&(0,t.isNullOrUndefined)((0,t.select)("."+Ze,r))||!((0,t.closest)(e,"."+Ze)===this.element);if(d=d&&(c||p),e.classList.remove("e-target"),!(e.classList.contains(nt)||e.classList.contains(rt)||d)){var u=this.element.querySelector("."+gt),f=u?u.children:this.element.children;[].slice.call(f).forEach((function(e){e.classList.contains(pt)&&a.push(e)}));var m=[].slice.call(this.element.querySelectorAll("."+$e+" [e-animate]"));if(m.length>0)for(var g=0,v=m;g<v.length;g++){var y=v[g];a.push(y.parentElement)}var b=-1!==a.indexOf(o)&&"true"===r.getAttribute("e-animate"),C=!1;if(!(0,t.isNullOrUndefined)(s)&&!(0,t.isNullOrUndefined)(n)){var S=(0,t.select)("."+nt,s),I=(0,t.closest)(s,"."+Je).querySelector("."+mt);if((0,t.isNullOrUndefined)(S))return;C=I===s,!(0,t.isVisible)(S)||b&&!o.classList.contains(ct)?(a.length>0&&"Single"===this.expandMode&&!b&&a.forEach((function(e){l.collapse((0,t.select)("."+nt,e)),e.classList.remove(mt)})),this.expand(S)):this.collapse(S),(0,t.isNullOrUndefined)(I)||C||I.classList.remove(mt)}}},i.prototype.eleMoveFocus=function(e,i,s){var n,r=(0,t.closest)(s,"."+$e);s===i?n=("moveUp"===e?s.lastElementChild:s).querySelector("."+it):s.classList.contains(it)&&(r="moveUp"===e?r.previousElementSibling:r.nextElementSibling)&&(n=(0,t.select)("."+it,r)),n&&n.focus()},i.prototype.keyActionHandler=function(e){var i=e.target,s=(0,t.closest)(e.target,it);if(!(0,t.isNullOrUndefined)(s)||i.classList.contains(Ze)||i.classList.contains(it)){var n,r=this.element;switch(e.action){case"moveUp":case"moveDown":this.eleMoveFocus(e.action,r,i);break;case"space":case"enter":n=i.nextElementSibling,!(0,t.isNullOrUndefined)(n)&&n.classList.contains(nt)?"true"!==n.getAttribute("e-animate")&&i.click():i.click(),e.preventDefault();break;case"home":case"end":("home"===e.action?r.firstElementChild.children[0]:r.lastElementChild.children[0]).focus(),e.preventDefault()}}},i.prototype.headerEleGenerate=function(){var e=this.createElement("div",{className:it,id:(0,t.getUniqueID)("acrdn_header")});return(0,t.attributes)(e,{tabindex:"0",role:"button","aria-disabled":"false","aria-expanded":"false"}),e},i.prototype.renderInnerItem=function(e,i){var s=this.createElement("div",{className:$e,id:e.id||(0,t.getUniqueID)("acrdn_item")});if(this.headerTemplate){var n=this.headerEleGenerate(),r=this.createElement("div",{className:st});return n.appendChild(r),(0,t.append)(this.getHeaderTemplate()(e,this,"headerTemplate",this.element.id+"_headerTemplate",!1),r),s.appendChild(n),n.appendChild(this.toggleIconGenerate()),this.add(s,ht),s}if(e.header&&this.angularnativeCondiCheck(e,"header")){var o=e.header;this.enableHtmlSanitizer&&"string"==typeof e.header&&(o=t.SanitizeHtmlHelper.sanitize(e.header));n=this.headerEleGenerate(),r=this.createElement("div",{className:st});n.appendChild(r),n.appendChild(this.fetchElement(r,o,i)),s.appendChild(n)}var l=(0,t.select)("."+it,s);if(!e.expanded||(0,t.isNullOrUndefined)(i)||this.enablePersistence||-1===this.initExpand.indexOf(i)&&this.initExpand.push(i),e.cssClass&&(0,t.addClass)([s],e.cssClass.split(" ")),e.disabled&&(0,t.addClass)([s],ut),!1===e.visible&&(0,t.addClass)([s],tt),e.iconCss){var a=this.createElement("div",{className:"e-acrdn-header-icon"}),d=this.createElement("span",{className:e.iconCss+" e-icons"});a.appendChild(d),(0,t.isNullOrUndefined)(l)?((l=this.headerEleGenerate()).appendChild(a),s.appendChild(l)):l.insertBefore(a,l.childNodes[0])}if(e.content&&this.angularnativeCondiCheck(e,"content")){var h=this.toggleIconGenerate();(0,t.isNullOrUndefined)(l)&&(l=this.headerEleGenerate(),s.appendChild(l)),l.appendChild(h),this.add(s,ht)}return s},i.prototype.angularnativeCondiCheck=function(e,i){var s="content"===i?e.content:e.header;if(this.isAngular&&!(0,t.isNullOrUndefined)(s.elementRef)){var n=s.elementRef.nativeElement.data;if((0,t.isNullOrUndefined)(n)||""===n||-1===n.indexOf("bindings="))return!0;var r=JSON.parse(s.elementRef.nativeElement.data.replace("bindings=",""));return!(!(0,t.isNullOrUndefined)(r)&&"false"===r["ng-reflect-ng-if"])}return!0},i.prototype.fetchElement=function(e,i,s){var n,r,o;try{if(document.querySelectorAll(i).length&&"Button"!==i){var l=document.querySelector(i);r=l.outerHTML.trim(),e.appendChild(l),l.style.display=""}else n=(0,t.compile)(i)}catch(s){"string"==typeof i?e.innerHTML=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(i):i:i instanceof HTMLElement?(e.appendChild(i),this.trgtEle&&(e.firstElementChild.style.display="")):n=(0,t.compile)(i)}if(!(0,t.isNullOrUndefined)(n)){this.isReact&&this.renderReactTemplates();var a=void 0,d=void 0;e.classList.contains(st)?(a=this.element.id+s+"_header",d="header"):e.classList.contains(rt)&&(a=this.element.id+s+"_content",d="content"),o=n({},this,d,a,this.isStringTemplate)}return(0,t.isNullOrUndefined)(o)||!(o.length>0)||(0,t.isNullOrUndefined)(o[0].tagName)&&1===o.length?0===e.childElementCount&&(e.innerHTML=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(i):i):[].slice.call(o).forEach((function(i){(0,t.isNullOrUndefined)(i.tagName)||(i.style.display=""),e.appendChild(i)})),(0,t.isNullOrUndefined)(r)||-1===this.templateEle.indexOf(i)&&this.templateEle.push(i),e},i.prototype.ariaAttrUpdate=function(e){var i=(0,t.select)("."+it,e),s=(0,t.select)("."+nt,e);i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id),s.setAttribute("role","region")},i.prototype.contentRendering=function(e){var i=this.createElement("div",{className:nt+" "+dt,id:(0,t.getUniqueID)("acrdn_panel")});(0,t.attributes)(i,{"aria-hidden":"true"});var s=this.createElement("div",{className:rt});if(!(0,t.isNullOrUndefined)(this.dataSource)&&this.dataSource.length>0)this.isReact&&this.renderReactTemplates(),(0,t.append)(this.getItemTemplate()(this.dataSource[parseInt(e.toString(),10)],this,"itemTemplate",this.element.id+"_itemTemplate",!1),s),i.appendChild(s);else{var n=this.items[parseInt(e.toString(),10)].content;this.enableHtmlSanitizer&&"string"==typeof n&&(n=t.SanitizeHtmlHelper.sanitize(n)),i.appendChild(this.fetchElement(s,n,e))}return i},i.prototype.expand=function(e){var i=this,s=this.getItems(),n=(0,t.closest)(e,"."+$e);if(!((0,t.isNullOrUndefined)(e)||(0,t.isVisible)(e)&&"true"!==e.getAttribute("e-animate")||n.classList.contains(ut))){var r=(0,t.closest)(n,"."+Je).querySelector("."+mt),o={name:this.animation.expand.effect,duration:this.animation.expand.duration,timingFunction:this.animation.expand.easing},l=(0,t.select)("."+ot,n).firstElementChild,a={element:n,item:s[this.getIndexByItem(n)],index:this.getIndexByItem(n),content:n.querySelector("."+nt),isExpanded:!0};this.trigger("expanding",a,(function(s){s.cancel||(l.classList.add(ft),i.expandedItemsPush(n),(0,t.isNullOrUndefined)(r)||r.classList.remove(mt),n.classList.add(mt),"None"===o.name&&"Enable"!==t.animationMode||"Disable"===t.animationMode?(i.expandProgress("begin",l,e,n,s),i.expandProgress("end",l,e,n,s)):i.expandAnimation(o.name,l,e,n,o,s))}))}},i.prototype.expandAnimation=function(e,i,s,n,r,o){var l,a=this;"None"===e&&"Enable"===t.animationMode&&(e="SlideDown",r.name="SlideDown"),this.lastActiveItemId=n.id,"SlideDown"===e?(r.begin=function(){a.expandProgress("begin",i,s,n,o),s.style.position="absolute",l=n.offsetHeight,s.style.maxHeight=s.offsetHeight+"px",n.style.maxHeight=""},r.progress=function(){n.style.minHeight=l+s.offsetHeight+"px"},r.end=function(){(0,t.setStyleAttribute)(s,{position:"",maxHeight:""}),n.style.minHeight="",a.expandProgress("end",i,s,n,o)}):(r.begin=function(){a.expandProgress("begin",i,s,n,o)},r.end=function(){a.expandProgress("end",i,s,n,o)}),new t.Animation(r).animate(s)},i.prototype.expandProgress=function(e,i,s,n,r){this.remove(s,dt),this.add(n,ct),this.add(i,lt),"end"===e&&(this.add(n,pt),s.setAttribute("aria-hidden","false"),(0,t.attributes)(s.previousElementSibling,{"aria-expanded":"true"}),i.classList.remove(ft),this.trigger("expanded",r))},i.prototype.expandedItemsPush=function(e){var t=this.getIndexByItem(e);if(-1===this.expandedIndices.indexOf(t)){var i=[].slice.call(this.expandedIndices);i.push(t),this.setProperties({expandedIndices:i},!0)}},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($e)&&e.push(t)})),e},i.prototype.expandedItemsPop=function(e){var t=this.getIndexByItem(e),i=[].slice.call(this.expandedIndices);i.splice(i.indexOf(t),1),this.setProperties({expandedIndices:i},!0)},i.prototype.collapse=function(e){var i=this,s=this.getItems(),n=(0,t.closest)(e,"."+$e);if(!(0,t.isNullOrUndefined)(e)&&(0,t.isVisible)(e)&&!n.classList.contains(ut)){var r={name:this.animation.collapse.effect,duration:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing},o=(0,t.select)("."+ot,n).firstElementChild,l={element:n,item:s[this.getIndexByItem(n)],index:this.getIndexByItem(n),content:n.querySelector("."+nt),isExpanded:!1};this.trigger("expanding",l,(function(s){s.cancel||(i.expandedItemsPop(n),n.classList.remove(mt),o.classList.add(ft),"None"===r.name&&"Enable"!==t.animationMode||"Disable"===t.animationMode?(i.collapseProgress("begin",o,e,n,s),i.collapseProgress("end",o,e,n,s)):i.collapseAnimation(r.name,e,n,o,r,s))}))}},i.prototype.collapseAnimation=function(e,i,s,n,r,o){var l,a,d,h,c=this;"None"===e&&"Enable"===t.animationMode&&(e="SlideUp",r.name="SlideUp"),this.lastActiveItemId=s.id,"SlideUp"===e?(r.begin=function(){d=s.offsetHeight,s.style.minHeight=d+"px",i.style.position="absolute",l=s.offsetHeight,a=i.offsetHeight,i.style.maxHeight=a+"px",c.collapseProgress("begin",n,i,s,o)},r.progress=function(){(h=l-(a-i.offsetHeight))<d&&(s.style.minHeight=h+"px")},r.end=function(){i.style.display="none",c.collapseProgress("end",n,i,s,o),s.style.minHeight="",(0,t.setStyleAttribute)(i,{position:"",maxHeight:"",display:""})}):(r.begin=function(){c.collapseProgress("begin",n,i,s,o)},r.end=function(){c.collapseProgress("end",n,i,s,o)}),new t.Animation(r).animate(i)},i.prototype.collapseProgress=function(e,i,s,n,r){this.remove(i,lt),this.remove(n,ct),"end"===e&&(this.add(s,dt),i.classList.remove(ft),this.remove(n,pt),s.setAttribute("aria-hidden","true"),(0,t.attributes)(s.previousElementSibling,{"aria-expanded":"false"}),this.trigger("expanded",r))},i.prototype.getModuleName=function(){return"accordion"},i.prototype.getItems=function(){return this.itemTemplate&&this.headerTemplate?this.dataSource:this.items},i.prototype.addItem=function(e,i){var s=this,n=this.element,r=this.getItemElements(),o=this.getItems();((0,t.isNullOrUndefined)(i)&&(i=o.length),n.childElementCount>=i)&&(e instanceof Array?e:[e]).forEach((function(e,l){var a=i+l;o.splice(a,0,e);var d=s.renderInnerItem(e,a);n.childElementCount===a?n.appendChild(d):n.insertBefore(d,r[parseInt(a.toString(),10)]),t.EventHandler.add(d.querySelector("."+it),"focus",s.focusIn,s),t.EventHandler.add(d.querySelector("."+it),"blur",s.focusOut,s),s.expandedIndices=[],s.expandedItemRefresh(),e&&e.expanded&&s.expandItem(!0,a)}));this.isReact&&this.renderReactTemplates()},i.prototype.expandedItemRefresh=function(){var e=this,t=this.getItemElements();[].slice.call(t).forEach((function(t){t.classList.contains(ct)&&e.expandedItemsPush(t)}))},i.prototype.removeItem=function(e){if(this.isReact||this.isAngular){var i=(0,t.selectAll)("."+$e,this.element)[parseInt(e.toString(),10)],s=(0,t.select)("."+st,i),n=(0,t.select)("."+rt,i);this.clearAccordionTemplate(s,this.dataSource.length>0?"headerTemplate":"header",st),this.clearAccordionTemplate(n,this.dataSource.length>0?"itemTemplate":"content",rt)}var r=this.getItemElements()[parseInt(e.toString(),10)],o=this.getItems();(0,t.isNullOrUndefined)(r)||(this.restoreContent(e),(0,t.detach)(r),o.splice(e,1),this.expandedIndices=[],this.expandedItemRefresh())},i.prototype.select=function(e){var i=this.getItemElements()[parseInt(e.toString(),10)];(0,t.isNullOrUndefined)(i)||(0,t.isNullOrUndefined)((0,t.select)("."+it,i))||i.children[0].focus()},i.prototype.hideItem=function(e,i){var s=this.getItemElements()[parseInt(e.toString(),10)];(0,t.isNullOrUndefined)(s)||((0,t.isNullOrUndefined)(i)&&(i=!0),i?this.add(s,tt):this.remove(s,tt))},i.prototype.enableItem=function(e,i){var s=this.getItemElements()[parseInt(e.toString(),10)];if(!(0,t.isNullOrUndefined)(s)){var n=s.firstElementChild;i?(this.remove(s,ut),(0,t.attributes)(n,{tabindex:"0","aria-disabled":"false"}),n.focus()):(s.classList.contains(pt)&&(this.expandItem(!1,e),this.eleMoveFocus("movedown",this.element,n)),this.add(s,ut),n.setAttribute("aria-disabled","true"),n.removeAttribute("tabindex"))}},i.prototype.expandItem=function(e,i){var s=this,n=this.getItemElements();if((0,t.isNullOrUndefined)(i))if("Single"===this.expandMode&&e){var r=n[n.length-1];this.itemExpand(e,r,this.getIndexByItem(r))}else{var o=(0,t.select)("#"+this.lastActiveItemId,this.element);[].slice.call(n).forEach((function(t){s.itemExpand(e,t,s.getIndexByItem(t)),t.classList.remove(mt)}));var l=(0,t.select)("."+mt,this.element);l&&l.classList.remove(mt),o&&o.classList.add(mt)}else{r=n[parseInt(i.toString(),10)];if((0,t.isNullOrUndefined)(r)||!r.classList.contains(ht)||r.classList.contains(pt)&&e)return;"Single"===this.expandMode&&this.expandItem(!1),this.itemExpand(e,r,i)}},i.prototype.itemExpand=function(e,i,s){var n=i.children[1];i.classList.contains(ut)||((0,t.isNullOrUndefined)(n)&&e?(n=this.contentRendering(s),i.appendChild(n),this.ariaAttrUpdate(i),this.expand(n)):(0,t.isNullOrUndefined)(n)||(e?this.expand(n):this.collapse(n)),this.isReact&&this.renderReactTemplates())},i.prototype.destroyItems=function(){this.restoreContent(null),(this.isReact||this.isAngular||this.isVue)&&this.clearTemplate(),[].slice.call(this.element.querySelectorAll("."+$e)).forEach((function(e){(0,t.detach)(e)}))},i.prototype.restoreContent=function(e){var i;i=(0,t.isNullOrUndefined)(e)?this.element:this.element.querySelectorAll("."+$e)[parseInt(e.toString(),10)],this.templateEle.forEach((function(e){(0,t.isNullOrUndefined)(i.querySelector(e))||(document.body.appendChild(i.querySelector(e)).style.display="none")}))},i.prototype.updateItem=function(e,i){if(!(0,t.isNullOrUndefined)(e)){var s=this.getItems(),n=s[parseInt(i.toString(),10)];s.splice(i,1),this.restoreContent(i);var r=(0,t.select)("."+st,e),o=(0,t.select)("."+rt,e);(this.isReact||this.isAngular)&&(this.clearAccordionTemplate(r,"header",st),this.clearAccordionTemplate(o,"content",rt)),(0,t.detach)(e),this.addItem(n,i)}},i.prototype.setTemplate=function(e,t,i){this.fetchElement(t,e,i),this.isReact&&this.renderReactTemplates()},i.prototype.clearAccordionTemplate=function(e,i,s){if(this.registeredTemplate&&this.registeredTemplate[""+i])for(var n=this.registeredTemplate,r=0;r<n[""+i].length;r++){var o=n[""+i][parseInt(r.toString(),10)].rootNodes[0],l=(0,t.closest)(o,"."+s);if(!(0,t.isNullOrUndefined)(l)&&l===e||(0,t.isNullOrUndefined)(o.parentNode)){this.clearTemplate([i],[n[""+i][parseInt(r.toString(),10)]]);break}}else if(this.portals&&this.portals.length>0){var a=this.portals;for(r=0;r<a.length;r++){var d=a[parseInt(r.toString(),10)];l=(0,t.closest)(d.containerInfo,"."+s);if(!(0,t.isNullOrUndefined)(l)&&l===e){this.clearTemplate([i],r);break}}}},i.prototype.getPersistData=function(){return this.addOnPersist(["expandedIndices"])},i.prototype.onPropertyChanged=function(e,i){for(var s=this.element,n=!1,r=0,o=Object.keys(e);r<o.length;r++){switch(o[r]){case"items":if(e.items instanceof Array&&i.items instanceof Array)n=!0;else for(var l=Object.keys(e.items),a=0;a<l.length;a++)for(var d=parseInt(Object.keys(e.items)[parseInt(a.toString(),10)],10),h=Object.keys(e.items[parseInt(d.toString(),10)]),c=0;c<h.length;c++){var p=(0,t.selectAll)("."+$e,this.element)[parseInt(d.toString(),10)],u=Object(i.items[parseInt(d.toString(),10)])[""+h[parseInt(c.toString(),10)]],f=Object(e.items[parseInt(d.toString(),10)])[""+h[parseInt(c.toString(),10)]],m=h[parseInt(c.toString(),10)],g=(0,t.select)("."+rt,p);if(("header"===m||"iconCss"===m||"expanded"===m||"content"===m&&""===u)&&this.updateItem(p,d),"cssClass"!==h[parseInt(c.toString(),10)]||(0,t.isNullOrUndefined)(p)||(u&&(0,t.removeClass)([p],u.split(" ")),f&&(0,t.addClass)([p],f.split(" "))),"visible"!==h[parseInt(c.toString(),10)]||(0,t.isNullOrUndefined)(p)||(!1===Object(e.items[parseInt(d.toString(),10)])[""+h[parseInt(c.toString(),10)]]?p.classList.add(tt):p.classList.remove(tt)),"disabled"!==h[parseInt(c.toString(),10)]||(0,t.isNullOrUndefined)(p)||this.enableItem(d,!f),h.indexOf("header")<0&&"content"===h[parseInt(c.toString(),10)]&&!(0,t.isNullOrUndefined)(p)&&2===p.children.length)if("function"==typeof f){(this.isAngular||this.isReact)&&this.clearAccordionTemplate(g,h[parseInt(c.toString(),10)],rt);var v=p.querySelector("."+rt);v.innerHTML="",this.setTemplate(f,v,d)}else p.classList.contains(ct)&&this.expandItem(!1,d),(0,t.detach)(p.querySelector("."+nt))}break;case"dataSource":case"expandedIndices":null===this.expandedIndices&&(this.expandedIndices=[]),n=!0;break;case"headerTemplate":this.initializeHeaderTemplate(),n=!0;break;case"itemTemplate":this.initializeItemTemplate(),n=!0;break;case"enableRtl":e.enableRtl?this.add(s,at):this.remove(s,at);break;case"height":(0,t.setStyleAttribute)(this.element,{height:(0,t.formatUnit)(e.height)});break;case"width":(0,t.setStyleAttribute)(this.element,{width:(0,t.formatUnit)(e.width)});break;case"expandMode":"Single"===e.expandMode&&!(0,t.isNullOrUndefined)(this.expandedIndices)&&this.expandedIndices.length>1&&this.expandItem(!1)}}n&&(this.initExpand=[],!(0,t.isNullOrUndefined)(this.expandedIndices)&&this.expandedIndices.length>0&&(this.initExpand=this.expandedIndices),this.destroyItems(),this.renderItems(),this.initItemExpand())},Qe([(0,t.Collection)([],bt)],i.prototype,"items",void 0),Qe([(0,t.Property)([])],i.prototype,"dataSource",void 0),Qe([(0,t.Property)()],i.prototype,"itemTemplate",void 0),Qe([(0,t.Property)()],i.prototype,"headerTemplate",void 0),Qe([(0,t.Property)("100%")],i.prototype,"width",void 0),Qe([(0,t.Property)("auto")],i.prototype,"height",void 0),Qe([(0,t.Property)([])],i.prototype,"expandedIndices",void 0),Qe([(0,t.Property)("Multiple")],i.prototype,"expandMode",void 0),Qe([(0,t.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),Qe([(0,t.Complex)({},yt)],i.prototype,"animation",void 0),Qe([(0,t.Event)()],i.prototype,"clicked",void 0),Qe([(0,t.Event)()],i.prototype,"expanding",void 0),Qe([(0,t.Event)()],i.prototype,"expanded",void 0),Qe([(0,t.Event)()],i.prototype,"created",void 0),Qe([(0,t.Event)()],i.prototype,"destroyed",void 0),i=Qe([t.NotifyPropertyChanges],i)}(t.Component),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])},e(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)}}(),It=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},Et=function(e){function i(t,i){return e.call(this,t,i)||this}return St(i,e),i.prototype.preRender=function(){this.isMenu=!1,this.element.id=this.element.id||(0,t.getUniqueID)("ej2-contextmenu"),e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),(0,t.attributes)(this.element,{role:"menubar",tabindex:"0"}),this.element.style.zIndex=(0,j.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"},It([(0,t.Property)("")],i.prototype,"target",void 0),It([(0,t.Property)("")],i.prototype,"filter",void 0),It([(0,t.Collection)([],de)],i.prototype,"items",void 0),i=It([t.NotifyPropertyChanges],i)}(ce),xt=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])},e(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,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},Ot="e-vertical",wt="e-hamburger",Lt=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.tempItems=[],s}return xt(i,e),i.prototype.getModuleName=function(){return"menu"},i.prototype.preRender=function(){if(this.isMenu=!0,this.element.id=this.element.id||(0,t.getUniqueID)("ej2-menu"),this.template){try{"function"!=typeof this.template&&document.querySelectorAll(this.template).length&&(this.template=document.querySelector(this.template).innerHTML.trim(),this.clearChanges())}catch(e){}this.updateMenuItems(this.items)}else this.updateMenuItems(this.items);e.prototype.preRender.call(this)},i.prototype.initialize=function(){e.prototype.initialize.call(this),(0,t.attributes)(this.element,{role:"menubar",tabindex:"0"}),"Vertical"===this.orientation?(this.element.classList.add(Ot),this.hamburgerMode&&!this.target&&this.element.previousElementSibling.classList.add(Ot),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(wt),"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(i,s){for(var n=this,r=0,o=Object.keys(i);r<o.length;r++){switch(o[r]){case"orientation":"Vertical"===i.orientation?(this.element.classList.add(Ot),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.add(Ot),this.element.classList.remove("e-hide-menu")),this.element.setAttribute("aria-orientation","vertical")):(this.element.classList.remove(Ot),this.hamburgerMode&&(this.target||this.element.previousElementSibling.classList.remove(Ot),this.element.classList.add("e-hide-menu")),this.element.removeAttribute("aria-orientation"));break;case"items":Object.keys(s.items).length||this.updateMenuItems(i.items);break;case"hamburgerMode":this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),i.hamburgerMode?(this.element.parentElement.classList.add(wt),[].slice.call(this.element.getElementsByClassName("e-blankicon")).forEach((function(e){e.style[n.enableRtl?"paddingRight":"paddingLeft"]=""}))):(this.element.parentElement.classList.remove(wt),"Vertical"===this.orientation&&this.setBlankIconStyle(this.element)),"Vertical"===this.orientation?(this.target||this.element.previousElementSibling.classList.add(Ot),this.element.classList.remove("e-hide-menu")):(this.target?this.element.previousElementSibling.classList.add(Ot):this.element.previousElementSibling.classList.remove(Ot),this.element.classList[i.hamburgerMode?"add":"remove"]("e-hide-menu"));break;case"title":this.hamburgerMode&&this.element.previousElementSibling&&(i.title=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(i.title):i.title,this.element.previousElementSibling.querySelector(".e-menu-title").innerHTML=i.title);break;case"target":this.hamburgerMode&&(this.unWireEvents(s.target),this.wireEvents(),"Horizontal"===this.orientation&&(i.target?this.element.previousElementSibling.classList.add(Ot):(this.element.previousElementSibling||e.prototype.createHeaderContainer.call(this),this.element.previousElementSibling.classList.remove(Ot)),this.element.classList.add("e-hide-menu")))}}e.prototype.onPropertyChanged.call(this,i,s)},i.prototype.createMenuItems=function(e){var t,i,s=this.items,n=this.getField("parentId");if(e[""+n]){for(t=this.getIndex(e[""+n].toString(),!0),i=0;i<t.length;i++)s[t[i]].items||(s[t[i]].items=[]),s=s[t[i]].items;s.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([(0,t.Property)("Horizontal")],i.prototype,"orientation",void 0),Nt([(0,t.Property)("")],i.prototype,"target",void 0),Nt([(0,t.Property)(null)],i.prototype,"template",void 0),Nt([(0,t.Property)(!1)],i.prototype,"enableScrolling",void 0),Nt([(0,t.Property)(!1)],i.prototype,"hamburgerMode",void 0),Nt([(0,t.Property)("Menu")],i.prototype,"title",void 0),Nt([(0,t.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),Nt([(0,t.Complex)({itemId:"id",text:"text",parentId:"parentId",iconCss:"iconCss",url:"url",separator:"separator",children:"items"},ae)],i.prototype,"fields",void 0),i=Nt([t.NotifyPropertyChanges],i)}(ce),kt=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])},e(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,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},Tt="e-tab",Pt="e-tab-header",Dt="e-content",Mt="e-nested",Ht="e-item",Ut="e-template",Rt="e-rtl",Bt="e-active",jt="e-disable",qt="e-hidden",Wt="e-focused",Ft="e-icons",Vt="e-icon",_t="e-icon-tab",zt="e-close-icon",Xt="e-close-show",Kt="e-tab-text",Yt="e-indicator",Gt="e-tab-wrap",Qt="e-text-wrap",Jt="e-tab-icon",Zt="e-toolbar-items",$t="e-toolbar-item",ei="e-toolbar-pop",ti="e-toolbar-popup",ii="e-progress",si="e-overlay",ni="e-vertical-tab",ri="e-vertical",oi="e-vertical-left",li="e-vertical-right",ai="e-horizontal-bottom",di="e-fill-mode",hi="tabitem_",ci="e-reorder-active-item",pi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return kt(i,e),At([(0,t.Property)("SlideLeftIn")],i.prototype,"effect",void 0),At([(0,t.Property)(600)],i.prototype,"duration",void 0),At([(0,t.Property)("ease")],i.prototype,"easing",void 0),i}(t.ChildProperty),ui=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return kt(i,e),At([(0,t.Complex)({effect:"SlideLeftIn",duration:600,easing:"ease"},pi)],i.prototype,"previous",void 0),At([(0,t.Complex)({effect:"SlideRightIn",duration:600,easing:"ease"},pi)],i.prototype,"next",void 0),i}(t.ChildProperty),fi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return kt(i,e),At([(0,t.Property)("")],i.prototype,"text",void 0),At([(0,t.Property)("")],i.prototype,"iconCss",void 0),At([(0,t.Property)("left")],i.prototype,"iconPosition",void 0),i}(t.ChildProperty),mi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return kt(i,e),At([(0,t.Complex)({},fi)],i.prototype,"header",void 0),At([(0,t.Property)(null)],i.prototype,"headerTemplate",void 0),At([(0,t.Property)("")],i.prototype,"content",void 0),At([(0,t.Property)("")],i.prototype,"cssClass",void 0),At([(0,t.Property)(!1)],i.prototype,"disabled",void 0),At([(0,t.Property)(!0)],i.prototype,"visible",void 0),At([(0,t.Property)()],i.prototype,"id",void 0),At([(0,t.Property)(-1)],i.prototype,"tabIndex",void 0),i}(t.ChildProperty),gi=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.show={},s.hide={},s.maxHeight=0,s.title="Close",s.isInteracted=!1,s.lastIndex=0,s.isAdd=!1,s.isIconAlone=!1,s.draggableItems=[],s.resizeContext=s.refreshActiveTabBorder.bind(s),s.keyConfigs={tab:"tab",home:"home",end:"end",enter:"enter",space:"space",delete:"delete",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"},s}return kt(i,e),i.prototype.destroy=function(){if((this.isReact||this.isAngular)&&this.clearTemplate(),(0,t.isNullOrUndefined)(this.tbObj)||(this.tbObj.destroy(),this.tbObj=null),this.unWireEvents(),this.element.removeAttribute("aria-disabled"),this.expTemplateContent(),this.isTemplate){var i=(0,t.select)(".e-tab > ."+Dt,this.element);this.element.classList.remove(Ut),(0,t.isNullOrUndefined)(i)||(i.innerHTML=this.cnt)}else for(;this.element.firstElementChild;)(0,t.remove)(this.element.firstElementChild);if(this.btnCls&&(this.btnCls=null),this.hdrEle=null,this.cntEle=null,this.tbItems=null,this.tbItem=null,this.tbPop=null,this.prevItem=null,this.popEle=null,this.bdrLine=null,this.content=null,this.dragItem=null,this.cloneElement=null,this.draggingItems=[],this.draggableItems&&this.draggableItems.length>0){for(var s=0;s<this.draggableItems.length;s++)this.draggableItems[s].destroy(),this.draggableItems[s]=null;this.draggableItems=[]}e.prototype.destroy.call(this),this.trigger("destroyed")},i.prototype.refresh=function(){this.isReact&&this.clearTemplate(),e.prototype.refresh.call(this),this.isReact&&this.renderReactTemplates()},i.prototype.preRender=function(){var e=(0,t.closest)(this.element,"."+Dt);this.prevIndex=0,this.isNested=!1,this.isPopup=!1,this.initRender=!0,this.isSwiped=!1,this.itemIndexArray=[],this.templateEle=[],this.allowDragAndDrop&&(this.dragArea=(0,t.isNullOrUndefined)(this.dragArea)?"#"+this.element.id+" ."+Pt:this.dragArea),(0,t.isNullOrUndefined)(e)||(e.parentElement.classList.add(Mt),this.isNested=!0);var i=t.Browser.info.name,s="msie"===i?"e-ie":"edge"===i?"e-edge":"safari"===i?"e-safari":"";(0,t.setStyleAttribute)(this.element,{width:(0,t.formatUnit)(this.width),height:(0,t.formatUnit)(this.height)}),this.setCssClass(this.element,this.cssClass,!0),(0,t.attributes)(this.element,{"aria-disabled":"false"}),this.setCssClass(this.element,s,!0),this.updatePopAnimationConfig()},i.prototype.render=function(){var e=this;this.btnCls=this.createElement("span",{className:Ft+" "+zt,attrs:{title:this.title}}),this.tabId=this.element.id.length>0?"-"+this.element.id:(0,t.getRandomId)(),this.renderContainer(),this.wireEvents(),this.initRender=!1,this.isReact&&this.portals&&this.portals.length>0&&this.renderReactTemplates((function(){(0,t.isNullOrUndefined)(e.tbObj)||e.tbObj.refreshOverflow(),e.refreshActiveBorder()}))},i.prototype.renderContainer=function(){var e=this.element;if(this.items.forEach((function(e,i){(0,t.isNullOrUndefined)(e.id)&&!(0,t.isNullOrUndefined)(e.setProperties)&&e.setProperties({id:hi+i.toString()},!0)})),this.items.length>0&&0===e.children.length)e.appendChild(this.createElement("div",{className:Dt})),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(Ut);var i=e.querySelector("."+Pt);i&&"Bottom"===this.headerPlacement&&this.setOrientation(this.headerPlacement,i)}if(!(0,t.isNullOrUndefined)((0,t.select)("."+Pt,this.element))&&!(0,t.isNullOrUndefined)((0,t.select)("."+Dt,this.element))){if(this.renderHeader(),this.tbItems=(0,t.select)("."+Pt+" ."+Zt,this.element),(0,t.isNullOrUndefined)(this.tbItems)||(0,t.rippleEffect)(this.tbItems,{selector:".e-tab-wrap"}),this.renderContent(),(0,t.selectAll)("."+$t,this.element).length>0){this.tbItems=(0,t.select)("."+Pt+" ."+Zt,this.element),this.bdrLine=this.createElement("div",{className:Yt+" "+qt+" e-ignore"});var s=(0,t.select)("."+this.scrCntClass,this.tbItems);(0,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,r=[],o=0;o<n;o++)r.push(this.hdrEle.children.item(o));if(n>0){var l=this.createElement("div",{className:"e-items"});this.hdrEle.appendChild(l),r.forEach((function(i,s){e.lastIndex=s;var n={className:Ht,id:Ht+e.tabId+"_"+s},r=e.createElement("span",{className:Kt,attrs:{role:"presentation"}}).outerHTML,o=e.createElement("div",{className:Qt,innerHTML:r+e.btnCls.outerHTML}).outerHTML,a=e.createElement("div",{className:Gt,innerHTML:o,attrs:{role:"tab",tabIndex:"-1","aria-selected":"false","aria-controls":Dt+e.tabId+"_"+s,"aria-disabled":"false"}});a.querySelector("."+Kt).appendChild(i),l.appendChild(e.createElement("div",n)),(0,t.selectAll)("."+Ht,l)[s].appendChild(a)}))}}else s=this.parseObject(this.items,0);this.tbObj=new Ye({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,enableHtmlSanitizer:this.enableHtmlSanitizer,cssClass:this.cssClass}),this.tbObj.isStringTemplate=!0,this.tbObj.createElement=this.createElement,this.tbObj.appendTo(this.hdrEle),(0,t.attributes)(this.hdrEle,{role:"tablist"}),(0,t.isNullOrUndefined)(this.element.getAttribute("aria-label"))?(0,t.isNullOrUndefined)(this.element.getAttribute("aria-labelledby"))||(this.hdrEle.setAttribute("aria-labelledby",this.element.getAttribute("aria-labelledby")),this.element.removeAttribute("aria-labelledby")):(this.hdrEle.setAttribute("aria-label",this.element.getAttribute("aria-label")),this.element.removeAttribute("aria-label")),this.setCloseButton(this.showCloseButton);var a=this.tbObj.element.querySelector("."+Zt);(0,t.isNullOrUndefined)(a)||((0,t.isNullOrUndefined)(a.id)||""===a.id)&&(a.id=this.element.id+"_tab_header_items")},i.prototype.renderContent=function(){this.cntEle=(0,t.select)("."+Dt,this.element);var e=(0,t.selectAll)("."+$t,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&&((0,t.addClass)([i.item(s)],Ht),(0,t.attributes)(i.item(s),{role:"tabpanel","aria-labelledby":Ht+this.tabId+"_"+s}),i.item(s).id=Dt+this.tabId+"_"+s)}},i.prototype.reRenderItems=function(){this.renderContainer(),(0,t.isNullOrUndefined)(this.cntEle)||(this.touchModule=new t.Touch(this.cntEle,{swipe:this.swipeHandler.bind(this)}))},i.prototype.parseObject=function(e,i){var s=this,n=Array.prototype.slice.call((0,t.selectAll)(".e-tab-header ."+$t,this.element)),r=this.lastIndex;if(!this.isReplace&&n.length>0){var o=[];n.forEach((function(e){o.push(s.getIndexFromEle(e.id))})),r=Math.max.apply(Math,o)}var l,a=[],d=[];return e.forEach((function(e,o){var h=(0,t.isNullOrUndefined)(e.header)||(0,t.isNullOrUndefined)(e.header.iconPosition)?"":e.header.iconPosition,c=(0,t.isNullOrUndefined)(e.header)||(0,t.isNullOrUndefined)(e.header.iconCss)?"":e.header.iconCss;if((0,t.isNullOrUndefined)(e.headerTemplate)&&((0,t.isNullOrUndefined)(e.header)||(0,t.isNullOrUndefined)(e.header.text)||0===e.header.text.length&&""===c))d.push(o);else{var p,u=e.headerTemplate||e.header.text;"string"==typeof u&&s.enableHtmlSanitizer&&(u=t.SanitizeHtmlHelper.sanitize(u)),s.isReplace&&!(0,t.isNullOrUndefined)(s.tbId)&&""!==s.tbId?(p=parseInt(s.tbId.substring(s.tbId.lastIndexOf("_")+1),10),s.tbId=""):p=i+o,s.lastIndex=0===n.length?o:s.isReplace?p:r+1+o;var f=e.disabled?" "+jt+" "+si:"",m=!1===e.visible?" "+qt:"";l=s.createElement("div",{className:Kt,attrs:{role:"presentation"}});var g=u instanceof Object?u.outerHTML:u,v=!(0,t.isNullOrUndefined)(g)&&""!==g;(0,t.isNullOrUndefined)(u.tagName)?s.headerTextCompile(l,u,o):l.appendChild(u);var y=s.createElement("span",{className:Ft+" "+Jt+" "+Vt+"-"+h+" "+c}),b=s.createElement("div",{className:Qt});b.appendChild(l),""!==u&&void 0!==u&&""!==c?("left"===h||"top"===h?b.insertBefore(y,b.firstElementChild):b.appendChild(y),l,s.isIconAlone=!1):(""===c?l:y)===y&&((0,t.detach)(l),b.appendChild(y),s.isIconAlone=!0);var C=(0,t.isNullOrUndefined)(e.tabIndex)?"-1":e.tabIndex.toString(),S=e.disabled?{role:"tab","aria-disabled":"true"}:{tabIndex:C,"data-tabindex":C,role:"tab","aria-selected":"false","aria-disabled":"false"};b.appendChild(s.btnCls.cloneNode(!0));var I=s.createElement("div",{className:Gt,attrs:S});I.appendChild(b),s.itemIndexArray instanceof Array&&s.itemIndexArray.splice(i+o,0,Ht+s.tabId+"_"+s.lastIndex);var E={htmlAttributes:{id:Ht+s.tabId+"_"+s.lastIndex,"data-id":e.id},template:I};E.cssClass=(void 0!==e.cssClass?e.cssClass:" ")+" "+f+" "+m+" "+(""!==c?"e-i"+h:"")+" "+(v?"":Vt),"top"!==h&&"bottom"!==h||s.element.classList.add("e-vertical-icon"),a.push(E),o++}})),this.isAdd||d.forEach((function(e){s.items.splice(e,1)})),this.isIconAlone?this.element.classList.add(_t):this.element.classList.remove(_t),a},i.prototype.removeActiveClass=function(){var e=this.getTabHeader();if(e){var i=(0,t.selectAll)("."+$t+"."+Bt,e);[].slice.call(i).forEach((function(e){return e.classList.remove(Bt)})),[].slice.call(i).forEach((function(e){return e.firstElementChild.setAttribute("aria-selected","false")}))}},i.prototype.checkPopupOverflow=function(e){this.tbPop=(0,t.select)("."+ei,this.element);var i=(0,t.select)(".e-hor-nav",this.element),s=(0,t.select)("."+Zt,this.element),n=s.lastChild,r=!1;return(!this.isVertical()&&(this.enableRtl&&i.offsetLeft+i.offsetWidth>s.offsetLeft||!this.enableRtl&&i.offsetLeft<s.offsetWidth)||this.isVertical()&&i.offsetTop<n.offsetTop+n.offsetHeight)&&(r=!0),r&&(e.classList.add(ti),this.tbPop.insertBefore(e,(0,t.selectAll)("."+ti,this.tbPop)[0])),!0},i.prototype.popupHandler=function(e){var i=e.querySelector(".e-ripple-element");(0,t.isNullOrUndefined)(i)||(i.outerHTML="",e.querySelector("."+Gt).classList.remove("e-ripple")),this.tbItem=(0,t.selectAll)("."+Zt+" ."+$t,this.hdrEle);var s=this.tbItem[this.tbItem.length-1];if(0!==this.tbItem.length){if(e.classList.remove(ti),e.removeAttribute("style"),this.tbItems.appendChild(e),this.actEleId=e.id,this.checkPopupOverflow(s)){var n=this.tbItems.lastChild.previousElementSibling;this.checkPopupOverflow(n)}this.isPopup=!0}return(0,t.selectAll)("."+$t,this.tbItems).length-1},i.prototype.setCloseButton=function(e){var i=(0,t.select)("."+Pt,this.element);!0===e?i.classList.add(Xt):i.classList.remove(Xt),this.tbObj.refreshOverflow(),this.refreshActiveTabBorder()},i.prototype.prevCtnAnimation=function(e,t){this.enableRtl||this.element.classList.contains(Rt);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);(0,t.isNullOrUndefined)(n)?e.classList.remove(Bt):(n.begin=function(){(0,t.setStyleAttribute)(e,{position:"absolute"}),e.classList.add(ii),e.classList.add("e-view")},n.end=function(){e.style.display="none",e.classList.remove(Bt),e.classList.remove(ii),e.classList.remove("e-view"),(0,t.setStyleAttribute)(e,{display:"",position:""}),0!==e.childNodes.length||s.isTemplate||(0,t.detach)(e)},new t.Animation(n).animate(e))},i.prototype.triggerAnimation=function(e,i){var s,n=this,r=this.prevIndex;[].slice.call(this.element.querySelector("."+Dt).children).forEach((function(e){e.id===n.prevActiveEle&&(s=e)}));var o=this.tbItem[r],l=this.getTrgContent(this.cntEle,this.extIndex(e));if((0,t.isNullOrUndefined)(s)&&!(0,t.isNullOrUndefined)(o)){var a=this.extIndex(o.id);s=this.getTrgContent(this.cntEle,a)}(0,t.isNullOrUndefined)(l)||(this.prevActiveEle=l.id);var d=(0,t.isNullOrUndefined)(this.animation)||(0,t.isNullOrUndefined)(this.animation.next.effect)||(0,t.isNullOrUndefined)(this.animation.previous.effect)||"None"===this.animation.previous.effect||"None"===this.animation.next.effect;if(this.initRender||!1===i||d)s&&s!==l&&s.classList.remove(Bt);else{var h,c=(0,t.select)("."+Dt,this.element);if(this.prevIndex>this.selectedItem&&!this.isPopup){var p=this.animation.previous.effect;h={name:"None"===p?"":"SlideLeftIn"!==p?p:"SlideLeftIn",duration:0===this.animation.previous.duration&&"Enable"===t.animationMode?600: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:0===this.animation.next.duration&&"Enable"===t.animationMode?600:this.animation.next.duration,timingFunction:this.animation.next.easing}}h.progress=function(){c.classList.add(ii),n.setActiveBorder()},h.end=function(){c.classList.remove(ii),l.classList.add(Bt)},this.initRender||(0,t.isNullOrUndefined)(s)||this.triggerPrevAnimation(s,r),this.isPopup=!1,""===h.name?l.classList.add(Bt):new t.Animation(h).animate(l)}},i.prototype.keyPressed=function(e){var i=(0,t.closest)(e,"."+Pt+" ."+$t),s=this.getEleIndex(i);!(0,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():(0,t.isNullOrUndefined)(i)||!1!==i.classList.contains(Bt)||(this.selectTab(s,null,!0),(0,t.isNullOrUndefined)(this.popEle)||this.popObj.hide(this.hide))},i.prototype.getTabHeader=function(){if(!(0,t.isNullOrUndefined)(this.element)){var e=[].slice.call(this.element.children).filter((function(e){return e.classList.contains(Pt)}));if(e.length>0)return e[0];var i=[].slice.call(this.element.children).filter((function(e){return!e.classList.contains("blazor-template")}))[0];if(i)return[].slice.call(i.children).filter((function(e){return e.classList.contains(Pt)}))[0]}},i.prototype.getEleIndex=function(e){return Array.prototype.indexOf.call((0,t.selectAll)("."+$t,this.getTabHeader()),e)},i.prototype.extIndex=function(e){return e.replace(Ht+this.tabId+"_","")},i.prototype.expTemplateContent=function(){var e=this;this.templateEle.forEach((function(i){(0,t.isNullOrUndefined)(e.element.querySelector(i))||(document.body.appendChild(e.element.querySelector(i)).style.display="none")}))},i.prototype.templateCompile=function(e,t,i){var s=this.createElement("div");this.compileElement(s,t,"content",i),0!==s.childNodes.length&&e.appendChild(s),this.isReact&&this.renderReactTemplates()},i.prototype.compileElement=function(e,i,s,n){var r,o;"string"==typeof i?(i=i.trim(),this.isVue?r=(0,t.compile)(this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(i):i):e.innerHTML=this.enableHtmlSanitizer?t.SanitizeHtmlHelper.sanitize(i):i):r=(0,t.compile)(i),(0,t.isNullOrUndefined)(r)||(o=r({},this,s)),!(0,t.isNullOrUndefined)(r)&&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 r;if("string"==typeof(i=(0,t.isNullOrUndefined)(i)?"":i)||(0,t.isNullOrUndefined)(i.innerHTML))if("string"==typeof i&&this.enableHtmlSanitizer&&(i=t.SanitizeHtmlHelper.sanitize(i)),"."===i[0]||"#"===i[0])if(document.querySelectorAll(i).length){var o=document.querySelector(i);r=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);(0,t.isNullOrUndefined)(r)||-1===this.templateEle.indexOf(i.toString())&&this.templateEle.push(i.toString())},i.prototype.getTrgContent=function(e,i){return this.element.classList.contains(Mt)?(0,t.select)("."+Mt+"> ."+Dt+" > #"+Dt+this.tabId+"_"+i,this.element):this.findEle(e.children,Dt+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?oi:li;(0,t.addClass)([this.hdrEle],[ri,e]),this.element.classList.contains(Mt)?(0,t.addClass)([this.hdrEle],[ni,e]):(0,t.addClass)([this.element],[ni,e])}"Bottom"===this.headerPlacement&&(0,t.addClass)([this.hdrEle],[ai])},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.querySelector("."+Bt),s=!!this.hdrEle.classList.contains(ri);(0,t.removeClass)([this.element],[ni]),(0,t.removeClass)([this.hdrEle],[ri,oi,li]),s!==this.isVertical()&&(this.changeToolbarOrientation(),!(0,t.isNullOrUndefined)(i)&&i.classList.contains(ti)&&this.popupHandler(i)),this.addVerticalClass(),this.setActiveBorder(),this.focusItem()},i.prototype.focusItem=function(){var e=(0,t.select)(" #"+Ht+this.tabId+"_"+this.selectedItem,this.hdrEle);(0,t.isNullOrUndefined)(e)||e.firstElementChild.focus()},i.prototype.changeToolbarOrientation=function(){this.tbObj.setProperties({height:this.isVertical()?"100%":"auto",width:this.isVertical()?"auto":"100%"},!0),this.tbObj.changeOrientation(),this.updatePopAnimationConfig()},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("."+Dt));"Bottom"===e&&n>s?this.element.appendChild(i):((0,t.removeClass)([i],[ai]),this.element.insertBefore(i,(0,t.select)("."+Dt,this.element)))},i.prototype.setCssClass=function(e,i,s){if(""!==i&&!(0,t.isNullOrUndefined)(i))for(var n=i.split(" "),r=0;r<n.length;r++)s?e.classList.add(n[r]):e.classList.remove(n[r])},i.prototype.setContentHeight=function(e){if(this.element.classList.contains(di)&&(0,t.removeClass)([this.element],[di]),!(0,t.isNullOrUndefined)(this.cntEle)){var i=this.getTabHeader();if("None"===this.heightAdjustMode){if("auto"===this.height)return;this.isVertical()||(0,t.setStyleAttribute)(this.cntEle,{height:this.element.clientHeight-i.offsetHeight+"px"})}else if("Fill"===this.heightAdjustMode)(0,t.addClass)([this.element],[di]),(0,t.setStyleAttribute)(this.element,{height:"100%"}),this.cntEle.style.height="calc(100% - "+this.hdrEle.offsetHeight+"px)";else if("Auto"===this.heightAdjustMode){if(!0===this.isTemplate)for(var s=(0,t.selectAll)("."+Dt+" > ."+Ht,this.element),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=(0,t.select)("."+Dt,this.element),!0===e&&this.cntEle.appendChild(this.createElement("div",{id:Dt+this.tabId+"_0",className:Ht+" "+Bt,attrs:{role:"tabpanel","aria-labelledby":Ht+this.tabId+"_0"}}));var r=this.cntEle.children.item(0);for(n=0;n<this.items.length;n++)for(this.getContent(r,this.items[n].content,"clone",n),this.maxHeight=Math.max(this.maxHeight,this.getHeight(r));r.firstChild;)r.removeChild(r.firstChild);(this.isReact||this.isAngular||this.isVue)&&this.clearTemplate(["content"]),this.templateEle=[],this.getContent(r,this.items[0].content,"render",0),this.prevIndex!==this.selectedItem&&r.classList.remove(Bt)}(0,t.setStyleAttribute)(this.cntEle,{height:this.maxHeight+"px"})}else(0,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=this.getTabHeader(),i=(0,t.select)("."+$t+"."+Bt,e);if(!(0,t.isNullOrUndefined)(i)){this.reorderActiveTab?e&&e.classList.remove(ci):(i.classList.contains(ti)&&!this.bdrLine.classList.contains(qt)&&this.bdrLine.classList.add(qt),e&&!e.classList.contains(ci)&&e.classList.add(ci));var s=(0,t.closest)(i,"."+Tt);if(this.element===s){this.tbItems=(0,t.select)("."+Zt,e);var n=(0,t.select)("."+Yt,e),r=(0,t.select)("."+Zt+" ."+this.scrCntClass,e);if(this.isVertical()){(0,t.setStyleAttribute)(n,{left:"",right:""}),0!==((0,t.isNullOrUndefined)(r)?this.tbItems.offsetHeight:r.offsetHeight)?(0,t.setStyleAttribute)(n,{top:i.offsetTop+"px",height:i.offsetHeight+"px"}):(0,t.setStyleAttribute)(n,{top:0,height:0})}else{if("MultiRow"===this.overflowMode){var o="Bottom"===this.headerPlacement?i.offsetTop:i.offsetHeight+i.offsetTop;(0,t.setStyleAttribute)(n,{top:o+"px",height:""})}else(0,t.setStyleAttribute)(n,{top:"",height:""});var l=(0,t.isNullOrUndefined)(r)?this.tbItems.offsetWidth:r.offsetWidth;0!==l?(0,t.setStyleAttribute)(n,{left:i.offsetLeft+"px",right:l-(i.offsetLeft+i.offsetWidth)+"px"}):(0,t.setStyleAttribute)(n,{left:"auto",right:"auto"})}(0,t.isNullOrUndefined)(this.bdrLine)||i.classList.contains(ti)||this.bdrLine.classList.remove(qt)}}},i.prototype.setActive=function(e,i,s){void 0===i&&(i=!1),void 0===s&&(s=!1),this.tbItem=(0,t.selectAll)("."+$t,this.getTabHeader());var n=this.tbItem[e];if(!(e<0||isNaN(e)||0===this.tbItem.length||!(0,t.isNullOrUndefined)(n)&&n.classList.contains(jt)))if(e>=0&&!i&&(this.allowServerDataBinding=!1,this.setProperties({selectedItem:e},!0),this.allowServerDataBinding=!0,this.initRender||this.serverDataBind()),n.classList.contains(Bt))this.setActiveBorder();else{this.isTemplate||(0,t.attributes)(n.firstElementChild,{"aria-controls":Dt+this.tabId+"_"+e});var r=n.id;this.removeActiveClass(),n.classList.add(Bt),n.firstElementChild.setAttribute("aria-selected","true");var o=Number(this.extIndex(r));if((0,t.isNullOrUndefined)(this.prevActiveEle)&&(this.prevActiveEle=Dt+this.tabId+"_"+o),this.isTemplate){if((0,t.select)("."+Dt,this.element).children.length>0){var l=this.findEle((0,t.select)("."+Dt,this.element).children,Dt+this.tabId+"_"+o);(0,t.isNullOrUndefined)(l)||l.classList.add(Bt),this.triggerAnimation(r,this.enableAnimation)}}else{this.cntEle=(0,t.select)(".e-tab > ."+Dt,this.element);var a=this.getTrgContent(this.cntEle,this.extIndex(r));if((0,t.isNullOrUndefined)(a)){this.cntEle.appendChild(this.createElement("div",{id:Dt+this.tabId+"_"+this.extIndex(r),className:Ht+" "+Bt,attrs:{role:"tabpanel","aria-labelledby":Ht+this.tabId+"_"+this.extIndex(r)}}));var d=this.getTrgContent(this.cntEle,this.extIndex(r)),h=Array.prototype.indexOf.call(this.itemIndexArray,r);this.getContent(d,this.items[h].content,"render",h)}else a.classList.add(Bt);this.triggerAnimation(r,this.enableAnimation)}if(this.setActiveBorder(),this.refreshItemVisibility(n),!this.initRender&&!i){var c={previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:n,selectedIndex:e,selectedContent:(0,t.select)("#"+Dt+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwiped,isInteracted:s,preventFocus:!1};this.trigger("selected",c,(function(e){e.preventFocus||n.firstElementChild.focus()}))}}},i.prototype.setItems=function(e){this.isReplace=!0,this.tbItems=(0,t.select)("."+Zt,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,Rt,e),this.refreshActiveBorder()},i.prototype.refreshActiveBorder=function(){(0,t.isNullOrUndefined)(this.bdrLine)||this.bdrLine.classList.add(qt),this.setActiveBorder()},i.prototype.showPopup=function(e){var i=(0,t.select)(".e-popup.e-toolbar-pop",this.hdrEle);if(i&&i.classList.contains("e-popup-close")){var s=i&&i.ej2_instances[0];s.position.X="Left"===this.headerPlacement||this.element.classList.contains(Rt)?"left":"right",s.dataBind(),s.show(e)}},i.prototype.bindDraggable=function(){var e=this;if(this.allowDragAndDrop){var t=this.element.querySelector("."+Pt);if(t)Array.prototype.slice.call(t.querySelectorAll("."+$t)).forEach((function(t){e.initializeDrag(t)}))}},i.prototype.wireEvents=function(){this.bindDraggable(),window.addEventListener("resize",this.resizeContext),t.EventHandler.add(this.element,"mouseover",this.hoverHandler,this),t.EventHandler.add(this.element,"keydown",this.spaceKeyDown,this),(0,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(){(0,t.isNullOrUndefined)(this.keyModule)||this.keyModule.destroy(),(0,t.isNullOrUndefined)(this.tabKeyModule)||this.tabKeyModule.destroy(),(0,t.isNullOrUndefined)(this.cntEle)||(0,t.isNullOrUndefined)(this.touchModule)||(this.touchModule.destroy(),this.touchModule=null),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(Rt),this.element.classList.remove(Wt)},i.prototype.clickHandler=function(e){this.element.classList.remove(Wt);var i=e.originalEvent.target,s=(0,t.closest)(i,"."+$t),n=this.getEleIndex(s);i.classList.contains(zt)?this.removeTab(n):this.isVertical()&&(0,t.closest)(i,".e-hor-nav")?this.showPopup(this.show):(this.isPopup=!1,(0,t.isNullOrUndefined)(s)||n===this.selectedItem||this.selectTab(n,e.originalEvent,!0))},i.prototype.swipeHandler=function(e){if(!(e.velocity<3&&(0,t.isNullOrUndefined)(e.originalEvent.changedTouches))){this.isNested&&this.element.setAttribute("data-swipe","true");var i=this.element.querySelector('[data-swipe="true"]');if(i)i.removeAttribute("data-swipe");else{if(this.isSwiped=!0,"Right"===e.swipeDirection&&0!==this.selectedItem){for(var s=this.selectedItem-1;s>=0;s--)if(!this.tbItem[s].classList.contains(qt)){this.selectTab(s,null,!0);break}}else if("Left"===e.swipeDirection&&this.selectedItem!==(0,t.selectAll)("."+$t,this.element).length-1)for(var n=this.selectedItem+1;n<this.tbItem.length;n++)if(!this.tbItem[n].classList.contains(qt)){this.selectTab(n,null,!0);break}this.isSwiped=!1}}},i.prototype.spaceKeyDown=function(e){if(32===e.keyCode&&32===e.which||35===e.keyCode&&35===e.which){var i=(0,t.closest)(e.target,"."+Pt);(0,t.isNullOrUndefined)(i)||e.preventDefault()}},i.prototype.keyHandler=function(e){if(!this.element.classList.contains(jt)){this.element.classList.add(Wt);var i=e.target,s=this.getTabHeader(),n=(0,t.select)("."+Bt,s);this.popEle=(0,t.select)("."+ei,s),(0,t.isNullOrUndefined)(this.popEle)||(this.popObj=this.popEle.ej2_instances[0]);var r=(0,t.closest)(document.activeElement,"."+$t),o=(0,t.closest)(i,"."+$t);switch(e.action){case"space":case"enter":if(i.parentElement.classList.contains(jt))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(Gt)&&!1===(0,t.closest)(i,"."+$t).classList.contains(Bt)&&i.setAttribute("tabindex",i.getAttribute("data-tabindex")),this.popObj&&(0,t.isVisible)(this.popObj.element)&&this.popObj.hide(this.hide),(0,t.isNullOrUndefined)(n)||"-1"!==n.children.item(0).getAttribute("tabindex")||n.children.item(0).setAttribute("tabindex","0");break;case"moveLeft":case"moveRight":(0,t.isNullOrUndefined)(r)||this.refreshItemVisibility(r);break;case"openPopup":e.preventDefault(),!(0,t.isNullOrUndefined)(this.popEle)&&this.popEle.classList.contains("e-popup-close")&&this.popObj.show(this.show);break;case"delete":if(!0===this.showCloseButton&&!(0,t.isNullOrUndefined)(o)){var l=o.nextSibling;!(0,t.isNullOrUndefined)(l)&&l.classList.contains($t)&&l.firstElementChild.focus(),this.removeTab(this.getEleIndex(o))}this.setActiveBorder()}}},i.prototype.refreshItemVisibility=function(e){var i=(0,t.select)("."+this.scrCntClass,this.tbItems);if(!this.isVertical()&&!(0,t.isNullOrUndefined)(i)){var s=(0,t.select)(".e-hscroll-bar",this.tbItems),n=s.scrollLeft,r=n+s.offsetWidth,o=e.offsetLeft,l=e.offsetWidth,a=e.offsetLeft+e.offsetWidth;if(n<o&&r<a){var d=r-o;s.scrollLeft=n+(l-d)}else if(n>o&&r>a){d=a-n;s.scrollLeft=n-(l-d)}}},i.prototype.getIndexFromEle=function(e){return parseInt(e.substring(e.lastIndexOf("_")+1),10)},i.prototype.hoverHandler=function(e){var i=e.target;!(0,t.isNullOrUndefined)(i.classList)&&i.classList.contains(zt)&&i.setAttribute("title",new t.L10n("tab",{closeButtonTitle:this.title},this.locale).getConstant("closeButtonTitle"))},i.prototype.evalOnPropertyChangeItems=function(e,i){var s=this;if(e.items instanceof Array&&i.items instanceof Array)if(this.lastIndex=0,(0,t.isNullOrUndefined)(this.tbObj))this.reRenderItems();else{(this.isReact||this.isAngular)&&this.clearTemplate(),this.setItems(e.items),this.templateEle.length>0&&this.expTemplateContent(),this.templateEle=[];for(var n=(0,t.select)(".e-tab > ."+Dt,this.element);n.firstElementChild;)(0,t.detach)(n.firstElementChild);this.select(this.selectedItem),this.draggableItems=[],this.bindDraggable()}else{for(var r=Object.keys(e.items),o=0;o<r.length;o++)for(var l=parseInt(Object.keys(e.items)[o],10),a=Object.keys(e.items[l]),d=0;d<a.length;d++){var h=Object(i.items[l])[a[d]],c=Object(e.items[l])[a[d]],p=this.element.querySelectorAll("."+$t)[l],u=void 0;u=p&&!(0,t.isNullOrUndefined)(p.id)&&""!==p.id?this.getIndexFromEle(p.id):l;var f=(0,t.select)("."+Zt+" #"+Ht+this.tabId+"_"+u,this.element),m=(0,t.select)("."+Dt+" #"+Dt+this.tabId+"_"+u,this.element);if("header"===a[d]||"headerTemplate"===a[d]){var g=(0,t.isNullOrUndefined)(this.items[l].header)||(0,t.isNullOrUndefined)(this.items[l].header.iconCss)?"":this.items[l].header.iconCss,v=this.items[l].headerTemplate||this.items[l].header.text;if("headerTemplate"===a[d]&&this.clearTabTemplate(f,a[d],$t),""===v&&""===g)this.removeTab(l);else{this.tbId=p.id;var y=[];y.push(this.items[l]),this.items.splice(l,1),this.itemIndexArray.splice(l,1),this.tbObj.items.splice(l,1);var b=f.classList.contains(qt);(0,t.detach)(f),this.isReplace=!0,this.addTab(y,l),b&&this.hideTab(l),this.isReplace=!1}}if("content"===a[d]&&!(0,t.isNullOrUndefined)(m))if(("string"==typeof c||(0,t.isNullOrUndefined)(c.innerHTML))&&("."===c[0]||"#"===c[0])&&c.length){var C=document.querySelector(c);m.appendChild(C),C.style.display=""}else""===c&&"#"===h[0]?(document.body.appendChild(this.element.querySelector(h)).style.display="none",m.innerHTML=c):this.isAngular||this.isReact?(this.clearTabTemplate(m,a[d],Ht),m.innerHTML="",this.templateCompile(m,c,l)):"function"!=typeof c&&(m.innerHTML=c);"cssClass"===a[d]&&((0,t.isNullOrUndefined)(f)||(f.classList.remove(h),f.classList.add(c)),(0,t.isNullOrUndefined)(m)||(m.classList.remove(h),m.classList.add(c))),"disabled"===a[d]&&this.enableTab(l,!0!==c),"visible"===a[d]&&this.hideTab(l,!0!==c)}this.isReact&&this.portals&&this.portals.length>0&&this.renderReactTemplates((function(){s.refreshActiveTabBorder()}))}},i.prototype.clearTabTemplate=function(e,i,s){if(this.clearTemplates)if(this.registeredTemplate&&this.registeredTemplate[i])for(var n=this.registeredTemplate,r=0;r<n[i].length;r++){var o=n[i][r].rootNodes[0],l=(0,t.closest)(o,"."+s);if(!(0,t.isNullOrUndefined)(l)&&l===e){this.clearTemplate([i],[n[i][r]]);break}}else if(this.portals&&this.portals.length>0){var a=this.portals;for(r=0;r<a.length;r++){var d=a[r];l=(0,t.closest)(d.containerInfo,"."+s);if(!(0,t.isNullOrUndefined)(l)&&l===e){this.clearTemplate([i],r);break}}}},i.prototype.initializeDrag=function(e){var i=this,s=new t.Draggable(e,{dragArea:this.dragArea,dragTarget:"."+$t,clone:!0,helper:this.helper.bind(this),dragStart:this.itemDragStart.bind(this),drag:function(e){var s,n,r=i.getEleIndex(i.dragItem),o={draggedItem:i.dragItem,event:e.event,target:e.target,droppedItem:e.target.closest("."+$t),clonedElement:i.cloneElement,index:r};if((0,t.isNullOrUndefined)(e.target.closest("."+Tt))||e.target.closest("."+Tt).isEqualNode(i.element)||i.dragArea==="."+Pt){if(e.target.closest(i.dragArea)||"Popup"===i.overflowMode?(document.body.style.cursor="",i.dragItem.querySelector("."+Gt).style.visibility="hidden",i.cloneElement.classList.contains(qt)&&(0,t.removeClass)([i.cloneElement],qt)):(document.body.style.cursor="not-allowed",(0,t.addClass)([i.cloneElement],qt),i.dragItem.classList.contains(qt)&&(0,t.removeClass)([i.dragItem],qt),i.dragItem.querySelector("."+Gt).style.visibility="visible"),"Scrollable"===i.overflowMode&&!(0,t.isNullOrUndefined)(i.element.querySelector(".e-hscroll"))){var l=i.element.querySelector(".e-scroll-right-nav"),a=i.element.querySelector(".e-scroll-left-nav"),d=i.element.querySelector(".e-hscroll-bar");!(0,t.isNullOrUndefined)(l)&&Math.abs(l.offsetWidth/2+l.offsetLeft)>i.cloneElement.offsetLeft+i.cloneElement.offsetWidth&&(d.scrollLeft-=10),!(0,t.isNullOrUndefined)(a)&&Math.abs(a.offsetLeft+a.offsetWidth-i.cloneElement.offsetLeft)>a.offsetWidth/2&&(d.scrollLeft+=10)}i.cloneElement.style.pointerEvents="none",n=(0,t.closest)(e.target,"."+$t+".e-draggable");var h=0;"Scrollable"!==i.overflowMode||(0,t.isNullOrUndefined)(i.element.querySelector(".e-hscroll"))||(h=i.element.querySelector(".e-hscroll-content").offsetWidth),null!=n&&!n.isSameNode(i.dragItem)&&n.closest("."+Tt).isSameNode(i.dragItem.closest("."+Tt))&&((s=i.getEleIndex(n))<r&&Math.abs(n.offsetLeft+n.offsetWidth-i.cloneElement.offsetLeft)>n.offsetWidth/2&&i.dragAction(n,r,s),s>r&&Math.abs(n.offsetWidth/2)+n.offsetLeft-h<i.cloneElement.offsetLeft+i.cloneElement.offsetWidth&&i.dragAction(n,r,s)),i.droppedIndex=i.getEleIndex(i.dragItem),i.trigger("dragging",o)}else i.trigger("dragging",o)},dragStop:this.itemDragStop.bind(this)});this.draggableItems.push(s)},i.prototype.helper=function(e){return this.cloneElement=this.createElement("div"),e.element&&(this.cloneElement=e.element.cloneNode(!0),(0,t.addClass)([this.cloneElement],"e-tab-clone-element"),this.element.querySelector("."+Pt).classList.contains(Xt)&&(0,t.addClass)([this.cloneElement],Xt),(0,t.removeClass)([this.cloneElement.querySelector("."+Gt)],"e-ripple"),(0,t.isNullOrUndefined)(this.cloneElement.querySelector(".e-ripple-element"))||(0,t.remove)(this.cloneElement.querySelector(".e-ripple-element")),document.body.appendChild(this.cloneElement)),this.cloneElement},i.prototype.itemDragStart=function(e){var i=this;this.draggingItems=this.items.map((function(e){return e})),this.dragItem=e.element;var s={draggedItem:e.element,event:e.event,target:e.target,droppedItem:null,index:this.getEleIndex(this.dragItem),clonedElement:this.cloneElement,cancel:!1};this.trigger("onDragStart",s,(function(s){if(s.cancel){var n=e.element.ej2_instances[0];(0,t.isNullOrUndefined)(n)||n.intDestroy(e.event),(0,t.detach)(i.cloneElement)}else i.removeActiveClass(),(0,t.addClass)([i.tbItems.querySelector("."+Yt)],qt),i.dragItem.querySelector("."+Gt).style.visibility="hidden"}))},i.prototype.dragAction=function(e,t,i){if(this.items.length>0){var s=this.draggingItems[t];this.draggingItems.splice(t,1),this.draggingItems.splice(i,0,s)}if("MultiRow"===this.overflowMode&&e.parentNode.insertBefore(this.dragItem,e.nextElementSibling),t>i)if(this.dragItem.parentElement.isSameNode(e.parentElement))this.dragItem.parentNode.insertBefore(this.dragItem,e);else if("Extended"===this.overflowMode)if(e.isSameNode(e.parentElement.lastChild)){var n=this.dragItem.parentNode;e.parentNode.insertBefore(this.dragItem,e),n.insertBefore(e.parentElement.lastChild,n.childNodes[0])}else this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e);else{var r=e.parentElement.lastChild;if(e.isSameNode(r)){n=this.dragItem.parentNode;e.parentNode.insertBefore(this.dragItem,e),n.insertBefore(r,n.childNodes[0])}else this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e)}t<i&&(this.dragItem.parentElement.isSameNode(e.parentElement)?this.dragItem.parentNode.insertBefore(this.dragItem,e.nextElementSibling):"Extended"===this.overflowMode?(this.dragItem.parentElement.appendChild(e.parentElement.firstElementChild),e.parentNode.insertBefore(this.dragItem,e.nextSibling)):(this.dragItem.parentNode.insertBefore(e.parentElement.lastChild,this.dragItem.parentElement.childNodes[0]),e.parentNode.insertBefore(this.dragItem,e)))},i.prototype.itemDragStop=function(e){var i=this;(0,t.detach)(this.cloneElement),this.cloneElement=null,this.dragItem.querySelector("."+Gt).style.visibility="visible",document.body.style.cursor="";var s={draggedItem:this.dragItem,event:e.event,target:e.target,droppedItem:this.tbItem[this.droppedIndex],clonedElement:null,index:this.droppedIndex,cancel:!1};this.trigger("dragged",s,(function(e){e.cancel?i.refresh():i.items.length>0&&i.draggingItems.length>0?(i.items=i.draggingItems,i.selectedItem=i.droppedIndex,i.refresh()):(i.dragItem.querySelector("."+Gt).style.visibility="",(0,t.removeClass)([i.tbItems.querySelector("."+Yt)],qt),i.selectTab(i.droppedIndex,null,!0))})),this.dragItem=null},i.prototype.enableTab=function(e,i){var s=(0,t.selectAll)("."+$t,this.element)[e];(0,t.isNullOrUndefined)(s)||(!0===i?(s.classList.remove(jt,si),s.firstElementChild.setAttribute("tabindex",s.firstElementChild.getAttribute("data-tabindex"))):(s.classList.add(jt,si),s.firstElementChild.removeAttribute("tabindex"),s.classList.contains(Bt)&&this.select(e+1)),(0,t.isNullOrUndefined)(this.items[e])||(this.items[e].disabled=!i,this.dataBind()),s.firstElementChild.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)})),this.isReact&&this.renderReactTemplates()},i.prototype.addingTabContent=function(e,i){var s=this,n=0;if(this.hdrEle=(0,t.select)("."+Pt,this.element),(0,t.isNullOrUndefined)(this.hdrEle))this.items=e,this.reRenderItems(),this.bindDraggable();else{var r=(0,t.selectAll)(".e-tab-header ."+$t,this.element).length;if(0!==r&&(n=this.lastIndex+1),(0,t.isNullOrUndefined)(i)&&(i=r-1),r<i||i<0||isNaN(i))return;0!==r||(0,t.isNullOrUndefined)(this.hdrEle)||(this.hdrEle.style.display=""),(0,t.isNullOrUndefined)(this.bdrLine)||this.bdrLine.classList.add(qt),this.tbItems=(0,t.select)("."+Zt,this.getTabHeader()),this.isAdd=!0;var o=this.parseObject(e,i);this.isAdd=!1;var l,a=0;e.forEach((function(e,r){if(l=e.headerTemplate||e.header.text,(0,t.isNullOrUndefined)(e.headerTemplate||e.header)||(0,t.isNullOrUndefined)(l)||0===l.length&&!(0,t.isNullOrUndefined)(e.header)&&(0,t.isNullOrUndefined)(e.header.iconCss)||(o[r]&&((0,t.isNullOrUndefined)(e.id)&&(e.id=Ht+s.tabId+"_"+hi+(n+r).toString()),o[r].htmlAttributes["data-id"]=e.id),s.items.splice(i+a,0,e),a++),s.isTemplate&&!(0,t.isNullOrUndefined)(e.header)&&!(0,t.isNullOrUndefined)(e.header.text)){var d=n+r,h=s.createElement("div",{id:Dt+s.tabId+"_"+d,className:Ht,attrs:{role:"tabpanel","aria-labelledby":Ht+"_"+d}});s.cntEle.insertBefore(h,s.cntEle.children[i+r]);var c=s.getTrgContent(s.cntEle,d.toString());s.getContent(c,e.content,"render",i)}})),this.tbObj.addItems(o,i),this.isReplace||this.trigger("added",{addedItems:e}),this.selectedItem===i?this.select(i):(this.setActiveBorder(),this.tbItem=(0,t.selectAll)("."+$t,this.getTabHeader())),this.bindDraggable()}},i.prototype.removeTab=function(e){var i=this,s=(0,t.selectAll)("."+$t,this.element)[e];if(!(0,t.isNullOrUndefined)(s)){var n={removedItem:s,removedIndex:e,cancel:!1};this.trigger("removing",n,(function(n){if(!n.cancel){var r=(0,t.select)("#"+Ht+i.tabId+"_"+i.extIndex(s.id),(0,t.select)("."+Zt,i.element));(0,t.isNullOrUndefined)(r)||i.clearTabTemplate(r,"headerTemplate",$t),i.tbObj.removeItems(e),i.allowDragAndDrop&&e!==Array.prototype.indexOf.call(i.itemIndexArray,s.id)&&(e=Array.prototype.indexOf.call(i.itemIndexArray,s.id));var o=i.itemIndexArray.indexOf(s.id);i.items.splice(o,1),i.itemIndexArray.splice(o,1),i.refreshActiveBorder();var l=(0,t.select)("#"+Dt+i.tabId+"_"+i.extIndex(s.id),(0,t.select)("."+Dt,i.element));(0,t.isNullOrUndefined)(l)||(i.clearTabTemplate(l,"content",Ht),(0,t.detach)(l)),i.trigger("removed",n),i.draggableItems&&i.draggableItems.length>0&&(i.draggableItems[e].destroy(),i.draggableItems[e]=null,i.draggableItems.splice(e,1)),s.classList.contains(Bt)?(e=e>(0,t.selectAll)("."+$t+":not(."+ti+")",i.element).length-1?e-1:e,i.enableAnimation=!1,i.selectedItem=e,i.select(e)):e!==i.selectedItem&&(e<i.selectedItem&&(e=i.itemIndexArray.indexOf(i.tbItem[i.selectedItem].id),i.setProperties({selectedItem:e>-1?e:i.selectedItem},!0),i.prevIndex=i.selectedItem),i.tbItem=(0,t.selectAll)("."+$t,i.getTabHeader())),0===(0,t.selectAll)("."+$t,i.element).length&&(i.hdrEle.style.display="none"),i.enableAnimation=!0}}))}},i.prototype.hideTab=function(e,i){var s,n=(0,t.selectAll)("."+$t,this.element)[e];if(!(0,t.isNullOrUndefined)(n)){if((0,t.isNullOrUndefined)(i)&&(i=!0),this.bdrLine.classList.add(qt),!0===i)if(n.classList.add(qt),0!==(s=(0,t.selectAll)("."+$t+":not(."+qt+")",this.tbItems)).length&&n.classList.contains(Bt)){if(0!==e)for(var r=e-1;r>=0;r--){if(!this.tbItem[r].classList.contains(qt)){this.select(r);break}if(0===r)for(var o=e+1;o<this.tbItem.length;o++)if(!this.tbItem[o].classList.contains(qt)){this.select(o);break}}else for(o=e+1;o<this.tbItem.length;o++)if(!this.tbItem[o].classList.contains(qt)){this.select(o);break}}else 0===s.length&&this.element.classList.add(qt);else this.element.classList.remove(qt),s=(0,t.selectAll)("."+$t+":not(."+qt+")",this.tbItems),n.classList.remove(qt),0===s.length&&this.select(e);this.setActiveBorder(),(0,t.isNullOrUndefined)(n.firstElementChild)||n.firstElementChild.setAttribute("aria-hidden",""+i),"Popup"===this.overflowMode&&this.tbObj&&this.tbObj.refreshOverflow()}},i.prototype.selectTab=function(e,t,i){void 0===t&&(t=null),void 0===i&&(i=!1),this.isInteracted=i,this.select(e,t)},i.prototype.select=function(e,i){var s=this,n=this.getTabHeader();this.tbItems=(0,t.select)("."+Zt,n),this.tbItem=(0,t.selectAll)("."+$t,n),this.content=(0,t.select)("."+Dt,this.element),this.prevItem=this.tbItem[this.prevIndex],(0,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 r=this.tbItem[e];(0,t.isNullOrUndefined)(r)?this.selectedID="0":this.selectingID=this.extIndex(r.id),(0,t.isNullOrUndefined)(this.prevItem)||this.prevItem.classList.contains(jt)||this.prevItem.children.item(0).setAttribute("tabindex",this.prevItem.firstElementChild.getAttribute("tabindex"));var o={event:i,previousItem:this.prevItem,previousIndex:this.prevIndex,selectedItem:this.tbItem[this.selectedItem],selectedIndex:this.selectedItem,selectedContent:(0,t.isNullOrUndefined)(this.content)?null:(0,t.select)("#"+Dt+this.tabId+"_"+this.selectedID,this.content),selectingItem:r,selectingIndex:e,selectingContent:(0,t.isNullOrUndefined)(this.content)?null:(0,t.select)("#"+Dt+this.tabId+"_"+this.selectingID,this.content),isSwiped:this.isSwiped,isInteracted:this.isInteracted,cancel:!1};this.initRender?this.selectingContent(e,this.isInteracted):this.trigger("selecting",o,(function(t){t.cancel||s.selectingContent(e,s.isInteracted)})),this.isInteracted=!1},i.prototype.selectingContent=function(e,i){if("number"==typeof e){if(!(0,t.isNullOrUndefined)(this.tbItem[e])&&(this.tbItem[e].classList.contains(jt)||this.tbItem[e].classList.contains(qt)))for(var s=e+1;s<this.items.length;s++){if(!1===this.items[s].disabled&&!0===this.items[s].visible){e=s;break}e=0}if(this.tbItem.length>e&&e>=0&&!isNaN(e))if(this.prevIndex=this.selectedItem,this.prevItem=this.tbItem[this.prevIndex],this.tbItem[e].classList.contains(ti)&&this.reorderActiveTab){if(this.setActive(this.popupHandler(this.tbItem[e]),null,i),!(0,t.isNullOrUndefined)(this.items)&&this.items.length>0&&this.allowDragAndDrop){this.tbItem=(0,t.selectAll)("."+Zt+" ."+$t,this.hdrEle);var n=this.items[e];this.items.splice(e,1),this.items.splice(this.tbItem.length-1,0,n);var r=this.itemIndexArray[e];this.itemIndexArray.splice(e,1),this.itemIndexArray.splice(this.tbItem.length-1,0,r)}}else this.setActive(e,null,i);else this.setActive(0,null,i)}else e instanceof HTMLElement&&this.setActive(this.getEleIndex(e),null,i)},i.prototype.getItemIndex=function(e){for(var t,i=0;i<this.tbItem.length;i++){if(e===this.tbItem[i].getAttribute("data-id")){t=i;break}}return t},i.prototype.disable=function(e){this.setCssClass(this.element,jt,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=this,n=0,r=Object.keys(e).sort((function(e,t){return"items"===e?-1:"items"===t?1:0}));n<r.length;n++){switch(r[n]){case"width":(0,t.setStyleAttribute)(this.element,{width:(0,t.formatUnit)(e.width)});break;case"height":(0,t.setStyleAttribute)(this.element,{height:(0,t.formatUnit)(e.height)}),this.setContentHeight(!1);break;case"cssClass":var o=this.element.querySelector("."+Pt);""===i.cssClass||(0,t.isNullOrUndefined)(i.cssClass)?(this.setCssClass(this.element,e.cssClass,!0),(0,t.isNullOrUndefined)(o)||this.setCssClass(o,e.cssClass,!0)):(this.setCssClass(this.element,i.cssClass,!1),this.setCssClass(this.element,e.cssClass,!0),(0,t.isNullOrUndefined)(o)||(this.setCssClass(o,i.cssClass,!1),this.setCssClass(o,e.cssClass,!0)));break;case"items":this.evalOnPropertyChangeItems(e,i);break;case"showCloseButton":this.setCloseButton(e.showCloseButton);break;case"reorderActiveTab":this.refreshActiveTabBorder();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.refreshActiveTabBorder();break;case"heightAdjustMode":this.setContentHeight(!1),this.select(this.selectedItem);break;case"scrollStep":this.tbObj&&(this.tbObj.scrollStep=this.scrollStep);break;case"allowDragAndDrop":this.bindDraggable();break;case"dragArea":this.allowDragAndDrop&&(this.draggableItems.forEach((function(e){e.dragArea=s.dragArea})),this.refresh())}}},i.prototype.refreshActiveTab=function(){if(this.isReact&&this.isTemplate&&this.clearTemplate(),this.isTemplate){var e=this.element.querySelector("."+Zt),i=this.element.querySelector("."+$t+"."+Bt),s=this.getIndexFromEle(i.id),n=i.innerText,r=this.element.querySelector("."+Dt).querySelector("."+Bt).children[0],o=r.innerHTML;(0,t.detach)(i),(0,t.detach)(r);var l={className:$t+" "+Ut+" "+Bt,id:Ht+this.tabId+"_"+s},a=this.createElement("span",{className:Kt,innerHTML:n,attrs:{role:"presentation"}}).outerHTML,d=this.createElement("div",{className:Qt,innerHTML:a+this.btnCls.outerHTML}).outerHTML,h=(y=i.firstElementChild.getAttribute("data-tabindex"),this.createElement("div",{className:Gt,innerHTML:d,attrs:{tabIndex:y,"data-tabindex":y,role:"tab","aria-controls":Dt+this.tabId+"_"+s,"aria-selected":"true","aria-disabled":"false"}}));e.insertBefore(this.createElement("div",l),e.children[s+1]),this.element.querySelector("."+$t+"."+Bt).appendChild(h);S=this.createElement("div",{innerHTML:o});this.element.querySelector("."+Dt).querySelector("."+Bt).appendChild(S)}else if(this.element.querySelector("."+$t+"."+Bt)){(0,t.detach)(this.element.querySelector("."+$t+"."+Bt).children[0]),(0,t.detach)(this.element.querySelector("."+Dt).querySelector("."+Bt).children[0]);var c=this.items[this.selectedItem],p=(0,t.isNullOrUndefined)(c.header)||(0,t.isNullOrUndefined)(c.header.iconPosition)?"":c.header.iconPosition,u=(0,t.isNullOrUndefined)(c.header)||(0,t.isNullOrUndefined)(c.header.iconCss)?"":c.header.iconCss,f=c.headerTemplate||c.header.text,m=this.createElement("div",{className:Kt,attrs:{role:"presentation"}});(0,t.isNullOrUndefined)(f.tagName)?this.headerTextCompile(m,f,this.selectedItem):m.appendChild(f);var g=this.createElement("span",{className:Ft+" "+Jt+" "+Vt+"-"+p+" "+u}),v=this.createElement("div",{className:Qt});v.appendChild(m),""!==f&&void 0!==f&&""!==u?("left"===p||"top"===p?v.insertBefore(g,v.firstElementChild):v.appendChild(g),m,this.isIconAlone=!1):(""===u?m:g)===g&&((0,t.detach)(m),v.appendChild(g),this.isIconAlone=!0);var y=(0,t.isNullOrUndefined)(c.tabIndex)?"-1":c.tabIndex.toString(),b=c.disabled?{}:{tabIndex:y,"data-tabindex":y,role:"tab","aria-selected":"true","aria-disabled":"false"};v.appendChild(this.btnCls.cloneNode(!0));var C=this.createElement("div",{className:Gt,attrs:b});C.appendChild(v),"top"!==p&&"bottom"!==p||this.element.classList.add("e-vertical-icon"),this.element.querySelector("."+$t+"."+Bt).appendChild(C);var S=this.createElement("div"),I=c.content,E=void 0;if("string"==typeof I||(0,t.isNullOrUndefined)(I.innerHTML))if("string"==typeof I&&this.enableHtmlSanitizer&&(I=t.SanitizeHtmlHelper.sanitize(I)),"."===I[0]||"#"===I[0])if(document.querySelectorAll(I).length){var x=document.querySelector(I);E=x.outerHTML.trim(),S.appendChild(x),x.style.display=""}else this.compileElement(S,I,"content",this.selectedItem);else this.compileElement(S,I,"content",this.selectedItem);else S.appendChild(I);(0,t.isNullOrUndefined)(E)||-1===this.templateEle.indexOf(I.toString())&&this.templateEle.push(I.toString()),this.element.querySelector("."+Ht+"."+Bt).appendChild(S)}this.isReact&&this.renderReactTemplates()},i.prototype.refreshActiveTabBorder=function(){var e=(0,t.select)("."+$t+"."+ti+"."+Bt,this.element);!(0,t.isNullOrUndefined)(e)&&this.reorderActiveTab&&this.select(this.getEleIndex(e)),this.refreshActiveBorder()},At([(0,t.Collection)([],mi)],i.prototype,"items",void 0),At([(0,t.Property)("100%")],i.prototype,"width",void 0),At([(0,t.Property)("auto")],i.prototype,"height",void 0),At([(0,t.Property)("")],i.prototype,"cssClass",void 0),At([(0,t.Property)(0)],i.prototype,"selectedItem",void 0),At([(0,t.Property)("Top")],i.prototype,"headerPlacement",void 0),At([(0,t.Property)("Content")],i.prototype,"heightAdjustMode",void 0),At([(0,t.Property)("Scrollable")],i.prototype,"overflowMode",void 0),At([(0,t.Property)("Dynamic")],i.prototype,"loadOn",void 0),At([(0,t.Property)(!1)],i.prototype,"enablePersistence",void 0),At([(0,t.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),At([(0,t.Property)(!1)],i.prototype,"showCloseButton",void 0),At([(0,t.Property)(!0)],i.prototype,"reorderActiveTab",void 0),At([(0,t.Property)()],i.prototype,"scrollStep",void 0),At([(0,t.Property)()],i.prototype,"dragArea",void 0),At([(0,t.Property)(!1)],i.prototype,"allowDragAndDrop",void 0),At([(0,t.Property)(!0)],i.prototype,"clearTemplates",void 0),At([(0,t.Complex)({},ui)],i.prototype,"animation",void 0),At([(0,t.Event)()],i.prototype,"created",void 0),At([(0,t.Event)()],i.prototype,"adding",void 0),At([(0,t.Event)()],i.prototype,"added",void 0),At([(0,t.Event)()],i.prototype,"selecting",void 0),At([(0,t.Event)()],i.prototype,"selected",void 0),At([(0,t.Event)()],i.prototype,"removing",void 0),At([(0,t.Event)()],i.prototype,"removed",void 0),At([(0,t.Event)()],i.prototype,"onDragStart",void 0),At([(0,t.Event)()],i.prototype,"dragging",void 0),At([(0,t.Event)()],i.prototype,"dragged",void 0),At([(0,t.Event)()],i.prototype,"destroyed",void 0),i=At([t.NotifyPropertyChanges],i)}(t.Component),vi=a(74),yi=a(323),bi=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])},e(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)}}(),Ci=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},Si="e-treeview",Ii="e-control",Ei="e-icon-collapsible",xi="e-icon-expandable",Ni="e-list-item",Oi="e-list-text",wi="e-list-parent",Li="e-hover",ki="e-active",Ai="e-icons-spinner",Ti="e-process",Pi="e-icons",Di="e-text-content",Mi="e-input",Hi="e-input-group",Ui="e-tree-input",Ri="e-editing",Bi="e-rtl",ji="e-interaction",qi="e-droppable",Wi="e-dragging",Fi="e-sibling",Vi="e-drop-in",_i="e-drop-next",zi="e-drop-out",Xi="e-no-drop",Ki="e-fullrow",Yi="e-selected",Gi="e-expanded",Qi="e-node-collapsed",Ji="e-disable",Zi="e-check",$i="e-stop",es="e-checkbox-wrapper",ts="e-frame",is="e-ripple",ss="e-node-focus",ns="e-list-img",rs="e-animation-active",os="e-disabled",ls="e-prevent",as={treeRole:"group",itemRole:"treeitem",listRole:"group",itemText:"",wrapperRole:""},ds=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),Ci([(0,t.Property)("child")],i.prototype,"child",void 0),Ci([(0,t.Property)([])],i.prototype,"dataSource",void 0),Ci([(0,t.Property)("expanded")],i.prototype,"expanded",void 0),Ci([(0,t.Property)("hasChildren")],i.prototype,"hasChildren",void 0),Ci([(0,t.Property)("htmlAttributes")],i.prototype,"htmlAttributes",void 0),Ci([(0,t.Property)("iconCss")],i.prototype,"iconCss",void 0),Ci([(0,t.Property)("id")],i.prototype,"id",void 0),Ci([(0,t.Property)("imageUrl")],i.prototype,"imageUrl",void 0),Ci([(0,t.Property)("isChecked")],i.prototype,"isChecked",void 0),Ci([(0,t.Property)("parentID")],i.prototype,"parentID",void 0),Ci([(0,t.Property)(null)],i.prototype,"query",void 0),Ci([(0,t.Property)("selectable")],i.prototype,"selectable",void 0),Ci([(0,t.Property)("selected")],i.prototype,"selected",void 0),Ci([(0,t.Property)(null)],i.prototype,"tableName",void 0),Ci([(0,t.Property)("text")],i.prototype,"text",void 0),Ci([(0,t.Property)("tooltip")],i.prototype,"tooltip",void 0),Ci([(0,t.Property)("navigateUrl")],i.prototype,"navigateUrl",void 0),i}(t.ChildProperty),hs=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),Ci([(0,t.Property)("SlideDown")],i.prototype,"effect",void 0),Ci([(0,t.Property)(400)],i.prototype,"duration",void 0),Ci([(0,t.Property)("linear")],i.prototype,"easing",void 0),i}(t.ChildProperty),cs=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),Ci([(0,t.Complex)({effect:"SlideUp",duration:400,easing:"linear"},hs)],i.prototype,"collapse",void 0),Ci([(0,t.Complex)({effect:"SlideDown",duration:400,easing:"linear"},hs)],i.prototype,"expand",void 0),i}(t.ChildProperty),ps=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.isRefreshed=!1,s.preventExpand=!1,s.checkedElement=[],s.disableNode=[],s.validArr=[],s.validNodes=[],s.expandChildren=[],s.isFieldChange=!1,s.changeDataSource=!1,s.hasTemplate=!1,s.isFirstRender=!1,s.isNodeDropped=!1,s.isInteracted=!1,s.isRightClick=!1,s.mouseDownStatus=!1,s.isDropIn=!1,s}var s;return bi(i,e),s=i,i.prototype.getModuleName=function(){return"treeview"},i.prototype.preRender=function(){var e=this;this.checkActionNodes=[],this.parentNodeCheck=[],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",shiftSpace:"shift+space",ctrlSpace:"ctrl+space"},this.listBaseOption={expandCollapse:!0,showIcon:!0,expandIconClass:xi,ariaAttributes:as,expandIconPosition:"Left",itemCreated:function(t){e.beforeNodeCreate(t)},enableHtmlSanitizer:this.enableHtmlSanitizer,itemNavigable:this.fullRowNavigable},this.updateListProp(this.fields),this.aniObj=new t.Animation({}),this.treeList=[],this.isLoaded=!1,this.isInitalExpand=!1,this.expandChildren=[],this.index=0,this.setTouchClass(),(0,t.isNullOrUndefined)(this.selectedNodes)&&this.setProperties({selectedNodes:[]},!0),(0,t.isNullOrUndefined)(this.checkedNodes)&&this.setProperties({checkedNodes:[]},!0),(0,t.isNullOrUndefined)(this.expandedNodes)?this.setProperties({expandedNodes:[]},!0):this.isInitalExpand=!0},i.prototype.getPersistData=function(){return this.addOnPersist(["selectedNodes","checkedNodes","expandedNodes"])},i.prototype.render=function(){this.initialRender=!0,this.initialize(),this.setDataBinding(!1),this.setDisabledMode(),this.setExpandOnType(),this.disabled||this.setRipple(),this.wireEditingEvents(this.allowEditing),this.setDragAndDrop(this.allowDragAndDrop),this.disabled||this.wireEvents(),this.initialRender=!1,this.renderComplete()},i.prototype.initialize=function(){this.element.setAttribute("role","tree"),this.element.setAttribute("aria-activedescendant",this.element.id+"_active"),this.setCssClass(null,this.cssClass),this.setEnableRtl(),this.setFullRow(this.fullRowSelect),this.setTextWrap(),this.nodeTemplateFn=this.templateComplier(this.nodeTemplate)},i.prototype.setDisabledMode=function(){this.disabled?(this.element.classList.add(os),this.element.setAttribute("aria-disabled","true")):(this.element.classList.remove(os),this.element.setAttribute("aria-disabled","false"))},i.prototype.setEnableRtl=function(){(this.enableRtl?t.addClass:t.removeClass)([this.element],Bi)},i.prototype.setRipple=function(){var e={selector:"."+Ki+",."+Di,ignore:"."+Di+" > ."+Pi+",."+Hi+",."+Mi+", ."+es};this.rippleFn=(0,t.rippleEffect)(this.element,e);var i={selector:"."+Di+" > ."+Pi,isCenterRipple:!0};this.rippleIconFn=(0,t.rippleEffect)(this.element,i)},i.prototype.setFullRow=function(e){(e?t.addClass:t.removeClass)([this.element],"e-fullrow-wrap")},i.prototype.setMultiSelect=function(e){e?this.element.setAttribute("aria-multiselectable","true"):this.element.setAttribute("aria-multiselectable","false")},i.prototype.templateComplier=function(e){if(e){this.hasTemplate=!0,this.element.classList.add(ji);try{return"function"!=typeof e&&document.querySelectorAll(e).length?(0,t.compile)(document.querySelector(e).innerHTML.trim()):(0,t.compile)(e)}catch(i){return(0,t.compile)(e)}}this.element.classList.remove(ji)},i.prototype.setDataBinding=function(e){var i=this;this.treeList.push("false"),this.fields.dataSource instanceof vi.DataManager?(this.isOffline=this.fields.dataSource.dataSource.offline,this.fields.dataSource.ready?this.fields.dataSource.ready.then((function(e){i.isOffline=i.fields.dataSource.dataSource.offline,i.fields.dataSource instanceof vi.DataManager&&i.isOffline&&(i.treeList.pop(),i.treeData=e.result,i.isNumberTypeId=i.getType(),i.setRootData(),i.renderItems(!0),0!==i.treeList.length||i.isLoaded||i.finalize())})).catch((function(e){i.trigger("actionFailure",{error:e})})):this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then((function(t){i.treeList.pop(),i.treeData=t.result,i.isNumberTypeId=i.getType(),i.setRootData(),e&&(i.changeDataSource=!0),i.renderItems(!0),i.changeDataSource=!1,0!==i.treeList.length||i.isLoaded||i.finalize()})).catch((function(e){i.trigger("actionFailure",{error:e})}))):(this.treeList.pop(),(0,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()},i.prototype.getQuery=function(e,i){void 0===i&&(i=null);var s,n=[];if(e.query)s=e.query.clone();else{s=new vi.Query;for(var r=this.getActualProperties(e),o=0,l=Object.keys(r);o<l.length;o++){var a=l[o];"dataSource"!==a&&"tableName"!==a&&"child"!==a&&e[""+a]&&"url"!==a&&-1===n.indexOf(e[""+a])&&n.push(e[""+a])}s.select(n),Object.prototype.hasOwnProperty.call(r,"tableName")&&s.from(e.tableName)}return B.ListBase.addSorting(this.sortOrder,e.text,s),(0,t.isNullOrUndefined)(i)||(0,t.isNullOrUndefined)(e.parentID)||s.where(e.parentID,"equal",this.isNumberTypeId?parseFloat(i):i),s},i.prototype.getType=function(){return!!this.treeData[0]&&"number"==typeof(0,t.getValue)(this.fields.id,this.treeData[0])},i.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);(0,t.isNullOrUndefined)(e)?this.rootData=[]:this.rootData=e}else this.rootData=this.treeData},i.prototype.isChildObject=function(){return"object"==typeof this.fields.child},i.prototype.renderItems=function(e){this.listBaseOption.ariaAttributes.level=1;var i=this.getSortedData(this.rootData);this.ulElement=B.ListBase.createList(this.createElement,e?this.rootData:i,this.listBaseOption),this.element.appendChild(this.ulElement);var s=this.ulElement.querySelectorAll(".e-list-item");if(!1===this.loadOnDemand)for(var n=0;n<s.length;)this.renderChildNodes(s[parseInt(n.toString(),10)],!0,null,!0),n++;(1===(0,t.selectAll)("."+wi,this.element).length&&s&&0!==s.length||this.loadOnDemand)&&this.finalizeNode(this.element),this.parentNodeCheck=[],this.parentCheckData=[],this.updateCheckedStateFromDS(),this.autoCheck&&this.showCheckBox&&!this.isLoaded&&this.updateParentCheckState()},i.prototype.updateCheckedStateFromDS=function(){if(this.validNodes=[],this.treeData&&this.showCheckBox){if(1===this.dataType){for(var e=this.fields,i=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(e.isChecked,"equal",!0,!1)),s=0;s<i.length;s++){var n=i[parseInt(s.toString(),10)][this.fields.id]?i[parseInt(s.toString(),10)][this.fields.id].toString():null;if(-1!==this.checkedNodes.indexOf(n)||this.isLoaded||this.checkedNodes.push(n),i[parseInt(s.toString(),10)][this.fields.hasChildren])for(var r=i[parseInt(s.toString(),10)][this.fields.id],o=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(e.parentID,"equal",r,!1)),l=0;l<o.length;l++){var a=o[parseInt(l.toString(),10)][this.fields.id]?o[parseInt(l.toString(),10)][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(a)&&this.autoCheck&&this.checkedNodes.push(a)}}for(s=0;s<this.checkedNodes.length;s++){var d=this.fields,h=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(d.id,"equal",this.checkedNodes[parseInt(s.toString(),10)],!0));if(h[0]&&this.autoCheck&&(this.getCheckedNodeDetails(d,h),this.checkIndeterminateState(h[0])),h.length>0){var c=h[0][this.fields.id]?h[0][this.fields.id].toString():null;this.checkedNodes.indexOf(c)>-1&&-1===this.validNodes.indexOf(c)&&this.validNodes.push(c)}for(var p=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(d.parentID,"equal",this.checkedNodes[parseInt(s.toString(),10)],!0)),u=0;u<p.length;u++){c=p[parseInt(u.toString(),10)][this.fields.id]?p[parseInt(u.toString(),10)][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(c)&&this.autoCheck&&this.checkedNodes.push(c),this.checkedNodes.indexOf(c)>-1&&-1===this.validNodes.indexOf(c)&&this.validNodes.push(c)}}}else if(2===this.dataType||this.fields.dataSource instanceof vi.DataManager&&this.isOffline){for(u=0;u<this.treeData.length;u++){var f=this.treeData[parseInt(u.toString(),10)][this.fields.id]?this.treeData[parseInt(u.toString(),10)][this.fields.id].toString():"";this.treeData[parseInt(u.toString(),10)][this.fields.isChecked]&&!this.isLoaded&&-1===this.checkedNodes.indexOf(f)&&this.checkedNodes.push(f),this.checkedNodes.indexOf(f)>-1&&-1===this.validNodes.indexOf(f)&&this.validNodes.push(f);var m=(0,t.getValue)(this.fields.child.toString(),this.treeData[parseInt(u.toString(),10)]);m&&this.updateChildCheckState(m,this.treeData[parseInt(u.toString(),10)])}this.validNodes=this.enablePersistence?this.checkedNodes:this.validNodes}this.setProperties({checkedNodes:this.validNodes},!0)}},i.prototype.getCheckedNodeDetails=function(e,i){var s=i[0][this.fields.parentID]?i[0][this.fields.parentID].toString():null,n=0,r=this.element.querySelector('[data-uid="'+i[0][this.fields.id]+'"]'),o=this.element.querySelector('[data-uid="'+i[0][this.fields.parentID]+'"]');if(r||o){if(o){(0,t.select)("."+Zi,o)||this.changeState(o,"indeterminate",null,!0,!0)}}else{-1===this.parentNodeCheck.indexOf(s)&&this.parentNodeCheck.push(s);for(var l=this.getChildNodes(this.treeData,s),a=0;a<l.length;a++){var d=l[parseInt(a.toString(),10)][this.fields.id]?l[parseInt(a.toString(),10)][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(d)&&n++,n===l.length&&-1===this.checkedNodes.indexOf(s)&&this.checkedNodes.push(s)}var h=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(e.id,"equal",s,!0));this.getCheckedNodeDetails(e,h)}},i.prototype.updateParentCheckState=function(){for(var e,i=(0,t.selectAll)("."+$i,this.element),s=0;s<i.length;s++){var n=(0,t.closest)(i[parseInt(s.toString(),10)],"."+Ni),r=n.getAttribute("data-uid").toString(),o=0;if(e=1===this.dataType?new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(this.fields.parentID,"equal",r,!0)):this.getChildNodes(this.treeData,r)){for(var l=0;l<e.length;l++){var a=e[parseInt(l.toString(),10)][this.fields.id].toString();-1!==this.checkedNodes.indexOf(a)&&o++}if(o===e.length){var d=n.getAttribute("data-uid");-1===this.checkedNodes.indexOf(d)&&this.checkedNodes.push(d),this.changeState(n,"check",null,!0,!0)}else 0===o&&0===this.checkedNodes.length&&this.changeState(n,"uncheck",null,!0,!0)}}},i.prototype.checkIndeterminateState=function(e){var t;(t=1===this.dataType?this.element.querySelector('[data-uid="'+e[this.fields.parentID]+'"]'):this.element.querySelector('[data-uid="'+e[this.fields.id]+'"]'))?"true"!==t.getAttribute("aria-checked")&&this.changeState(t,"indeterminate",null,!0,!0):2===this.dataType&&-1===this.parentNodeCheck.indexOf(e[this.fields.id].toString())&&this.parentNodeCheck.push(e[this.fields.id].toString())},i.prototype.updateChildCheckState=function(e,i){for(var s=0,n=i[this.fields.id]?i[this.fields.id].toString():"",r=0;r<e.length;r++){var o=e[parseInt(r.toString(),10)][this.fields.id]?e[parseInt(r.toString(),10)][this.fields.id].toString():"";e[parseInt(r.toString(),10)][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++,this.checkedNodes.indexOf(o)>-1&&-1===this.validNodes.indexOf(o)&&this.validNodes.push(o);var l=(0,t.getValue)(this.fields.child.toString(),e[parseInt(r.toString(),10)]);l&&l.length&&(-1===this.parentCheckData.indexOf(i)&&this.parentCheckData.push(i),this.updateChildCheckState(l,e[parseInt(r.toString(),10)])),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[parseInt(a.toString(),10)]&&this.parentCheckData[parseInt(a.toString(),10)]&&this.checkIndeterminateState(this.parentCheckData[parseInt(a.toString(),10)])}this.parentCheckData=[]},i.prototype.beforeNodeCreate=function(e){if(this.showCheckBox){var i=(0,pe.createCheckBox)(this.createElement,!0,{cssClass:this.touchClass}),s=(0,t.select)("div."+Pi,e.item),n=e.item.getAttribute("data-uid");e.item.childNodes[0].insertBefore(i,e.item.childNodes[0].childNodes[(0,t.isNullOrUndefined)(s)?0:1]);var r=(0,t.getValue)(e.fields.isChecked,e.curData);this.checkedNodes.indexOf(n)>-1?((0,t.select)("."+ts,i).classList.add(Zi),e.item.setAttribute("aria-checked","true"),this.addCheck(e.item)):(0,t.isNullOrUndefined)(r)||"true"!==r.toString()?e.item.setAttribute("aria-checked","false"):((0,t.select)("."+ts,i).classList.add(Zi),e.item.setAttribute("aria-checked","true"),this.addCheck(e.item));var o=(0,t.select)("."+ts,i);t.EventHandler.add(o,"mousedown",this.frameMouseHandler,this),t.EventHandler.add(o,"mouseup",this.frameMouseHandler,this)}this.fullRowSelect&&this.createFullRow(e.item),this.allowMultiSelection&&!e.item.classList.contains(Yi)&&e.item.setAttribute("aria-selected","false");var l=e.fields;if(this.addActionClass(e,l.selected,Yi),this.addActionClass(e,l.expanded,Gi),e.item.setAttribute("tabindex","-1"),t.EventHandler.add(e.item,"focus",this.focusIn,this),!(0,t.isNullOrUndefined)(this.nodeTemplateFn)){var a=e.item.querySelector("."+Oi),d=e.item.getAttribute("data-uid");a.innerHTML="",this.renderNodeTemplate(e.curData,a,d)}var h={node:e.item,nodeData:e.curData,text:e.text};this.isRefreshed||(this.trigger("drawNode",h),!1!==e.curData[this.fields.selectable]||this.showCheckBox||(e.item.classList.add(ls),e.item.firstElementChild.setAttribute("style","cursor: not-allowed")))},i.prototype.frameMouseHandler=function(e){var i=(0,t.select)(".e-ripple-container",e.target.parentElement);(0,pe.rippleMouseHandler)(e,i)},i.prototype.addActionClass=function(e,i,s){var n=e.curData,r=(0,t.getValue)(i,n);(0,t.isNullOrUndefined)(r)||"false"===r.toString()||e.item.classList.add(s)},i.prototype.getDataType=function(e,i){if(this.fields.dataSource instanceof vi.DataManager){for(var s=0;s<e.length;s++)if(this.isOffline){if("string"==typeof i.child&&(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(s.toString(),10)]))&&!(0,t.isNullOrUndefined)((0,t.getValue)(i.parentID,e[parseInt(s.toString(),10)])))return 1}else if("string"==typeof i.child&&(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(s.toString(),10)])))return 1;return 2}s=0;for(var n=e.length;s<n;s++){if("string"==typeof i.child&&!(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(s.toString(),10)])))return 2;if(this.isChildObject())return 2;if(!(0,t.isNullOrUndefined)((0,t.getValue)(i.parentID,e[parseInt(s.toString(),10)]))||!(0,t.isNullOrUndefined)((0,t.getValue)(i.hasChildren,e[parseInt(s.toString(),10)])))return 1}return 1},i.prototype.getGroupedData=function(e,t){for(var i=(new vi.Query).group(t),s=B.ListBase.getDataSource(e,i),n=[],r=0;r<s.length;r++){var o=s[parseInt(r.toString(),10)].items;n.push(o)}return n},i.prototype.getSortedData=function(e){return e&&"None"!==this.sortOrder&&(e=B.ListBase.getDataSource(e,B.ListBase.addSorting(this.sortOrder,this.fields.text))),e},i.prototype.finalizeNode=function(e){for(var i=this,s=(0,t.selectAll)("."+ns,e),n=0;n<s.length;n++)s[parseInt(n.toString(),10)].setAttribute("alt",ns);if(this.isLoaded){for(var r=(0,t.selectAll)("."+Yi,e),o=0;o<r.length;o++){this.selectNode(r[parseInt(o.toString(),10)],null);break}(0,t.removeClass)(r,Yi)}for(var l=(0,t.selectAll)("."+Ni+":not(."+Gi+")",e),a=0;a<l.length;a++){var d=(0,t.select)("div."+Pi,l[parseInt(a.toString(),10)]);d&&d.classList.contains(xi)&&this.disableExpandAttr(l[parseInt(a.toString(),10)])}var h=(0,t.selectAll)("."+Gi,e);if(!this.loadOnDemand&&this.fields.dataSource instanceof vi.DataManager&&(this.isInitalExpand=this.treeData.filter((function(e){return!0===e[i.fields.expanded]})).length>0||this.isInitalExpand),!this.isInitalExpand)for(o=0;o<h.length;o++)this.renderChildNodes(h[parseInt(o.toString(),10)]);(0,t.removeClass)(h,Gi),this.updateList(),this.isLoaded&&this.updateCheckedProp()},i.prototype.updateCheckedProp=function(){if(this.showCheckBox){var e=[].concat([],this.checkedNodes);this.setProperties({checkedNodes:e},!0)}},i.prototype.ensureIndeterminate=function(){if(this.autoCheck)for(var e=(0,t.selectAll)("li",this.element),i=0;i<e.length;i++)e[parseInt(i.toString(),10)].classList.contains(Ni)&&((0,t.select)("."+wi,e[parseInt(i.toString(),10)])?this.ensureParentCheckState(e[parseInt(i.toString(),10)]):this.ensureChildCheckState(e[parseInt(i.toString(),10)]));else{var s=(0,t.selectAll)("."+$i,this.element);for(i=0;i<s.length;i++)s[parseInt(i.toString(),10)].classList.remove($i)}},i.prototype.ensureParentCheckState=function(e){if(!(0,t.isNullOrUndefined)(e)){if(e.classList.contains(Si))return;var i=e;e.classList.contains(Ni)&&(i=(0,t.select)("."+wi,e));var s=(0,t.selectAll)("."+Zi,i),n=(0,t.selectAll)("."+$i,i),r=(0,t.selectAll)("."+Ni,i),o=e.getElementsByClassName(es)[0];r.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 l=(0,t.closest)(e,"."+wi);if(!(0,t.isNullOrUndefined)(l)){var a=(0,t.closest)(l,"."+Ni);this.ensureParentCheckState(a)}}},i.prototype.ensureChildCheckState=function(e,i){if(!(0,t.isNullOrUndefined)(e)){var s=(0,t.select)("."+wi,e),n=void 0;if(!(0,t.isNullOrUndefined)(s)){n=(0,t.selectAll)("."+es,s);for(var r=e.getElementsByClassName(ts)[0].classList.contains(Zi),o=e.getElementsByClassName(ts)[0].classList.contains($i),l=s.querySelectorAll("li"),a=void 0,d=0;d<n.length;d++){var h=l[parseInt(d.toString(),10)].getAttribute("data-uid");if((0,t.isNullOrUndefined)(this.currentLoadData)||(0,t.isNullOrUndefined)((0,t.getValue)(this.fields.isChecked,this.currentLoadData[parseInt(d.toString(),10)]))){var c=n[parseInt(d.toString(),10)].getElementsByClassName(ts)[0].classList.contains(Zi);r||c&&!this.isLoaded||-1!==this.checkedNodes.indexOf(h)&&this.isLoaded&&(o||r)?a="check":l[parseInt(d.toString(),10)].classList.contains("e-has-child")&&!(0,t.isUndefined)(this.parentNodeCheck)&&this.autoCheck&&(r||o)&&-1!==this.parentNodeCheck.indexOf(h)||1===this.dataType&&!(0,t.isUndefined)(this.parentNodeCheck)&&this.autoCheck&&(r||o)&&-1!==this.parentNodeCheck.indexOf(h)?(a="indeterminate",this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(h),1)):a="uncheck"}else a=(0,t.getValue)(this.fields.isChecked,this.currentLoadData[parseInt(d.toString(),10)])?"check":"uncheck",-1!==this.ele&&(a=r?"check":"uncheck"),"uncheck"===a&&!(0,t.isUndefined)(this.parentNodeCheck)&&this.autoCheck&&-1!==this.parentNodeCheck.indexOf(h)&&(this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(h),1),a="indeterminate");this.changeState(n[parseInt(d.toString(),10)],a,i,!0,!0)}}this.autoCheck&&this.isLoaded&&this.updateParentCheckState()}},i.prototype.doCheckBoxAction=function(e,i){if((0,t.isNullOrUndefined)(e)){var s=(0,t.selectAll)("."+es,this.element);if(this.loadOnDemand)for(var n=0;n<s.length;n++)this.updateFieldChecked(s[parseInt(n.toString(),10)],i),this.changeState(s[parseInt(n.toString(),10)],i?"check":"uncheck",null,null,null,i);else for(n=0;n<s.length;n++)this.updateFieldChecked(s[parseInt(n.toString(),10)],i),this.changeState(s[parseInt(n.toString(),10)],i?"check":"uncheck")}else for(var r=e.length-1;r>=0;r--){var o=this.getElement(e[parseInt(r.toString(),10)]);if((0,t.isNullOrUndefined)(o)){if(""!==(u=e[r-(e.length-1)]?e[r-(e.length-1)].toString():e[parseInt(r.toString(),10)]?e[parseInt(r.toString(),10)].toString():null)&&i&&u)this.setValidCheckedNode(u),this.dynamicCheckState(u,i);else if(-1!==this.checkedNodes.indexOf(u)&&""!==u&&!i){this.checkedNodes.splice(this.checkedNodes.indexOf(u),1);var l=this.getChildNodes(this.treeData,u);if(l){for(var a=0;a<l.length;a++){var d=l[parseInt(a.toString(),10)][this.fields.id]?l[parseInt(a.toString(),10)][this.fields.id].toString():null;if(-1!==this.checkedNodes.indexOf(d)){this.checkedNodes.splice(this.checkedNodes.indexOf(d),1);var h=this.element.querySelector('[data-uid="'+d+'"]');h&&this.changeState(h,"uncheck",null)}}-1!==this.parentNodeCheck.indexOf(u)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(u),1)}u&&this.dynamicCheckState(u,i),this.updateField(this.treeData,this.fields,u,"isChecked",null)}}else{var c=(0,t.select)("."+wi+" ."+es,o);this.validateCheckNode(c,!i,o,null)}}if(e)for(var p=0;p<e.length-1;p++){var u=e[parseInt(p.toString(),10)]?e[parseInt(p.toString(),10)].toString():"";i||this.updateField(this.treeData,this.fields,u,"isChecked",null)}this.autoCheck&&this.updateParentCheckState()},i.prototype.updateFieldChecked=function(e,i){var s=(0,t.closest)(e,"."+Ni),n=s.getAttribute("data-uid");"true"!==this.getNodeData(s).isChecked||i||this.updateField(this.treeData,this.fields,n,"isChecked",null)},i.prototype.dynamicCheckState=function(e,i){if(1===this.dataType){var s=0,n=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(this.fields.id,"equal",e,!0));if(n[0]){var r=n[0][this.fields.id]?n[0][this.fields.id].toString():null,o=n[0][this.fields.parentID]?n[0][this.fields.parentID].toString():null,l=this.element.querySelector('[data-uid="'+o+'"]'),a=this.element.querySelector('[data-uid="'+r+'"]'),d=this.getChildNodes(this.treeData,o);if(d)for(var h=0;h<d.length;h++){var c=d[parseInt(h.toString(),10)][this.fields.id]?d[parseInt(h.toString(),10)][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(c)&&s++}-1!==this.checkedNodes.indexOf(e)&&l&&r===e&&this.autoCheck?this.changeState(l,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&a&&r===e&&!i?this.changeState(a,"uncheck",null):-1!==this.checkedNodes.indexOf(e)&&a&&r===e&&i?this.changeState(a,"check",null):-1===this.checkedNodes.indexOf(e)&&!a&&l&&r===e&&this.autoCheck&&0!==s?this.changeState(l,"indeterminate",null):-1===this.checkedNodes.indexOf(e)&&!a&&l&&r===e&&this.autoCheck&&0===s?this.changeState(l,"uncheck",null):a||l||r!==e||!this.autoCheck||this.updateIndeterminate(e,i)}}else if(2===this.dataType||this.fields.dataSource instanceof vi.DataManager&&this.isOffline){r=void 0,l=void 0;var p=void 0;for(h=0;h<this.treeData.length;h++){r=this.treeData[parseInt(h.toString(),10)][this.fields.id]?this.treeData[parseInt(h.toString(),10)][this.fields.id].toString():"",p=(l=this.element.querySelector('[data-uid="'+r+'"]'))?(0,t.select)("."+Zi,l):null,-1===this.checkedNodes.indexOf(r)&&l&&p&&!i&&this.changeState(l,"uncheck",null);var u=(0,t.getValue)(this.fields.child.toString(),this.treeData[parseInt(h.toString(),10)]);u&&this.updateChildIndeterminate(u,r,e,i,r)}}},i.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 r=this.getChildNodes(this.treeData,i);if(r)for(var o=0;o<r.length;o++){var l=r[parseInt(o.toString(),10)][this.fields.id]?r[parseInt(o.toString(),10)][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(l)&&n++}var a=this.element.querySelector('[data-uid="'+i+'"]');a&&t||!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))},i.prototype.updateChildIndeterminate=function(e,i,s,n,r){for(var o=0,l=0;l<e.length;l++){var a=e[parseInt(l.toString(),10)][this.fields.id]?e[parseInt(l.toString(),10)][this.fields.id].toString():"";-1!==this.checkedNodes.indexOf(a)&&o++;var d=this.element.querySelector('[data-uid="'+i+'"]'),h=d?(0,t.select)("."+$i,d):null,c=d?(0,t.select)("."+Zi,d):null,p=this.element.querySelector('[data-uid="'+a+'"]'),u=p?(0,t.select)("."+Zi,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($i);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="'+r+'"]');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=(0,t.getValue)(this.fields.child.toString(),e[parseInt(l.toString(),10)]);m&&this.updateChildIndeterminate(m,a,s,n,r)}},i.prototype.changeState=function(e,i,s,n,r,o){var l,a=this,d=(0,t.closest)(e,"."+Ni);e===d&&(e=(0,t.select)("."+es,d)),n?this.nodeCheckAction(e,i,d,l,s,n,r,o):(this.checkActionNodes=[],l=this.getCheckEvent(d,i,s),this.trigger("nodeChecking",l,(function(t){t.cancel||a.nodeCheckAction(e,i,d,t,s,n,r,o)})))},i.prototype.nodeCheckAction=function(e,i,s,n,r,o,l,a){var d,h=e.getElementsByClassName(ts)[0];if("check"!==i||h.classList.contains(Zi)?"uncheck"===i&&(h.classList.contains(Zi)||h.classList.contains($i))?((0,t.removeClass)([h],[Zi,$i]),this.removeCheck(s),d="false"):"indeterminate"===i&&this.autoCheck&&(h.classList.remove(Zi),h.classList.add($i),this.removeCheck(s),d="mixed"):(h.classList.remove($i),h.classList.add(Zi),this.addCheck(s),d="true"),d="check"===i?"true":"uncheck"===i?"false":d,(0,t.isNullOrUndefined)(d)||s.setAttribute("aria-checked",d),l){var c=[].concat([],this.checkActionNodes);n=this.getCheckEvent(s,i,r),(0,t.isUndefined)(o)&&(n.data=c)}void 0!==a&&this.ensureStateChange(s,a),o||(0,t.isNullOrUndefined)(d)||(s.setAttribute("aria-checked",d),n.data[0].checked=d,this.trigger("nodeChecked",n),this.checkActionNodes=[])},i.prototype.addCheck=function(e){var i=e.getAttribute("data-uid");(0,t.isNullOrUndefined)(i)||-1!==this.checkedNodes.indexOf(i)||this.checkedNodes.push(i)},i.prototype.removeCheck=function(e){var t=this.checkedNodes.indexOf(e.getAttribute("data-uid"));t>-1&&this.checkedNodes.splice(t,1)},i.prototype.getCheckEvent=function(e,i,s){this.checkActionNodes.push(this.getNodeData(e));var n=this.checkActionNodes;return{action:i,cancel:!1,isInteracted:!(0,t.isNullOrUndefined)(s),node:e,data:n}},i.prototype.finalize=function(){var e=(0,t.select)("."+wi,this.element);if(!(0,t.isNullOrUndefined)(e)){e.setAttribute("role",as.treeRole),this.setMultiSelect(this.allowMultiSelection);var i=(0,t.select)("."+Ni,this.element);i&&(i.setAttribute("tabindex","0"),this.updateIdAttr(null,i)),this.allowTextWrap&&this.updateWrap(),this.renderReactTemplates(),this.hasPid=!!this.rootData[0]&&Object.prototype.hasOwnProperty.call(this.rootData[0],this.fields.parentID),this.doExpandAction()}},i.prototype.setTextWrap=function(){(this.allowTextWrap?t.addClass:t.removeClass)([this.element],"e-text-wrap"),t.Browser.isIE&&(this.allowTextWrap?t.addClass:t.removeClass)([this.element],"e-ie-wrap")},i.prototype.updateWrap=function(e){if(this.fullRowSelect)for(var i=e?(0,t.selectAll)("."+Ni,e):this.liList,s=i.length,n=0;n<s;n++)this.calculateWrap(i[parseInt(n.toString(),10)])},i.prototype.calculateWrap=function(e){var i=(0,t.select)("."+Ki,e);i&&i.nextElementSibling&&(i.style.height=this.allowTextWrap?i.nextElementSibling.offsetHeight+"px":"")},i.prototype.doExpandAction=function(){var e=this,i=this.expandedNodes;if(!this.loadOnDemand&&this.fields.dataSource instanceof vi.DataManager&&(this.isInitalExpand=this.treeData.filter((function(t){return!0===t[e.fields.expanded]})).length>0||this.isInitalExpand),this.isInitalExpand&&i.length>0)if(this.setProperties({expandedNodes:[]},!0),this.fields.dataSource instanceof vi.DataManager)this.expandGivenNodes(i);else{for(var s=0;s<i.length;s++){var n=(0,t.select)('[data-uid="'+i[parseInt(s.toString(),10)]+'"]',this.element);if((0,t.isNullOrUndefined)(n))i[parseInt(s.toString(),10)]&&-1===this.expandChildren.indexOf(i[parseInt(s.toString(),10)])&&this.expandChildren.push(i[parseInt(s.toString(),10)].toString());else{var r=(0,t.select)("."+xi,(0,t.select)("."+Di,n));(0,t.isNullOrUndefined)(r)||this.expandAction(n,r,null)}}this.afterFinalized()}else this.afterFinalized()},i.prototype.expandGivenNodes=function(e){var t=this;this.expandCallback(e[this.index],(function(){t.index++,t.index<e.length?t.expandGivenNodes(e):t.afterFinalized()}))},i.prototype.expandCallback=function(e,i){var s=(0,t.select)('[data-uid="'+e+'"]',this.element);if((0,t.isNullOrUndefined)(s))i();else{var n=(0,t.select)("."+xi,(0,t.select)("."+Di,s));(0,t.isNullOrUndefined)(n)?i():this.expandAction(s,n,null,!1,i)}},i.prototype.afterFinalized=function(){if(this.doSelectionAction(),this.updateCheckedProp(),this.isAnimate=!0,this.isInitalExpand=!1,(!this.isLoaded||this.isFieldChange)&&!this.isNodeDropped){var e={data:this.treeData};this.trigger("dataBound",e)}this.isLoaded=!0,this.isNodeDropped=!1},i.prototype.doSelectionAction=function(){var e=(0,t.selectAll)("."+Yi,this.element),i=this.selectedNodes;if(i.length>0){this.setProperties({selectedNodes:[]},!0);for(var s=0;s<i.length;s++){var n=(0,t.select)('[data-uid="'+i[parseInt(s.toString(),10)]+'"]',this.element);if(n&&!n.classList.contains("e-active")?this.selectNode(n,null,!0):this.selectedNodes.push(i[parseInt(s.toString(),10)]),!this.allowMultiSelection)break}}else this.selectGivenNodes(e);(0,t.removeClass)(e,Yi)},i.prototype.selectGivenNodes=function(e){for(var t=0;t<e.length&&(e[parseInt(t.toString(),10)].classList.contains("e-disable")||this.selectNode(e[parseInt(t.toString(),10)],null,!0),this.allowMultiSelection);t++);},i.prototype.clickHandler=function(e){var i=t.Browser.isDevice&&e.originalEvent.changedTouches&&!t.Browser.isIos?document.elementFromPoint(e.originalEvent.changedTouches[0].clientX,e.originalEvent.changedTouches[0].clientY):e.originalEvent.target;if(t.EventHandler.remove(this.element,"contextmenu",this.preventContextMenu),i&&!this.dragStartAction){var s=i.classList,n=(0,t.closest)(i,"."+Ni);if(n&&(!n.classList.contains(ls)||s.contains(xi)||s.contains(Ei))){if(3!==e.originalEvent.which){var r=(0,t.select)(".e-ripple-element",n),o=(0,t.select)("."+Pi,n);if(this.removeHover(),this.setFocusElement(n),this.showCheckBox&&!n.classList.contains("e-disable")){var l=(0,t.closest)(i,"."+es);if(!(0,t.isNullOrUndefined)(l)){var a=(0,t.select)("."+ts,l);return this.validateCheckNode(l,a.classList.contains(Zi),n,e.originalEvent),void this.triggerClickEvent(e.originalEvent,n)}}s.contains(xi)?this.expandAction(n,i,e):s.contains(Ei)?this.collapseNode(n,i,e):r&&o?o.classList.contains(is)&&o.classList.contains(xi)?this.expandAction(n,o,e):o.classList.contains(is)&&o.classList.contains(Ei)?this.collapseNode(n,o,e):s.contains(wi)||s.contains(Ni)||this.toggleSelect(n,e.originalEvent,!1):s.contains(wi)||s.contains(Ni)||this.toggleSelect(n,e.originalEvent,!1)}3===e.originalEvent.which&&(this.isRightClick=!0),this.triggerClickEvent(e.originalEvent,n)}}},i.prototype.nodeCheckedEvent=function(e,t,i){var s=this.getCheckEvent(e,t?"uncheck":"check",i);s.data=s.data.splice(0,s.data.length-1),this.trigger("nodeChecked",s)},i.prototype.triggerClickEvent=function(e,t){var i={event:e,node:t};this.trigger("nodeClicked",i)},i.prototype.expandNode=function(e,i,s){var n=this;if(this.renderReactTemplates(),i.classList.contains(Ai)&&this.hideSpinner(i),this.initialRender||i.classList.add("interaction"),!0!==s||!0===s&&e.classList.contains("e-expanded")){if(!0!==this.preventExpand){(0,t.removeClass)([i],xi),(0,t.addClass)([i],Ei);var r=0,o=0,l=(0,t.select)("."+wi,e),a=e;this.setHeight(a,l);var d=(0,t.select)("."+Ni+"."+ki,e);this.isAnimate&&!this.isRefreshed?this.aniObj.animate(l,{name:this.animation.expand.effect,duration:0===this.animation.expand.duration&&"Enable"===t.animationMode?400:this.animation.expand.duration,timingFunction:this.animation.expand.easing,begin:function(){a.style.overflow="hidden",!(0,t.isNullOrUndefined)(d)&&d instanceof HTMLElement&&d.classList.add(rs),r=a.offsetHeight,o=(0,t.select)("."+Di,e).offsetHeight},progress:function(e){e.element.style.display="block",n.animateHeight(e,r,o)},end:function(e){e.element.style.display="block",!(0,t.isNullOrUndefined)(d)&&d instanceof HTMLElement&&d.classList.remove(rs),n.expandedNode(a,l,i)}}):this.expandedNode(a,l,i)}}else(0,t.select)("."+wi,e).style.display="none",this.fields.dataSource instanceof vi.DataManager==!0&&(this.preventExpand=!1);this.initialRender&&i.classList.add("interaction")},i.prototype.expandedNode=function(e,i,s){i.style.display="block",e.style.display="block",e.style.overflow="",e.style.height="",(0,t.removeClass)([s],Ti),this.addExpand(e),this.allowTextWrap&&this.isLoaded&&this.isFirstRender&&(this.updateWrap(e),this.isFirstRender=!1),this.isLoaded&&this.expandArgs&&!this.isRefreshed&&(this.expandArgs=this.getExpandEvent(e,null),this.expandArgs.isInteracted=this.isInteracted,this.trigger("nodeExpanded",this.expandArgs))},i.prototype.addExpand=function(e){e.setAttribute("aria-expanded","true"),(0,t.removeClass)([e],Qi);var i=e.getAttribute("data-uid");(0,t.isNullOrUndefined)(i)||-1!==this.expandedNodes.indexOf(i)||this.expandedNodes.push(i)},i.prototype.collapseNode=function(e,i,s){var n,r=this;i.classList.contains(Ti)||((0,t.addClass)([i],Ti),this.isLoaded?(n=this.getExpandEvent(e,s),this.isInteracted=n.isInteracted,this.trigger("nodeCollapsing",n,(function(s){s.cancel?(0,t.removeClass)([i],Ti):r.nodeCollapseAction(e,i,s)}))):this.nodeCollapseAction(e,i,n))},i.prototype.nodeCollapseAction=function(e,i,s){var n=this;(0,t.removeClass)([i],Ei),(0,t.addClass)([i],xi);var r=0,o=0,l=(0,t.select)("."+wi,e),a=e,d=(0,t.select)("."+Ni+"."+ki,e);this.isAnimate?this.aniObj.animate(l,{name:this.animation.collapse.effect,duration:0===this.animation.collapse.duration&&"Enable"===t.animationMode?400:this.animation.collapse.duration,timingFunction:this.animation.collapse.easing,begin:function(){a.style.overflow="hidden",!(0,t.isNullOrUndefined)(d)&&d instanceof HTMLElement&&d.classList.add(rs),r=(0,t.select)("."+Di,e).offsetHeight,o=a.offsetHeight},progress:function(e){n.animateHeight(e,r,o)},end:function(e){e.element.style.display="none",!(0,t.isNullOrUndefined)(d)&&d instanceof HTMLElement&&d.classList.remove(rs),n.collapsedNode(a,l,i,s)}}):this.collapsedNode(a,l,i,s)},i.prototype.collapsedNode=function(e,i,s,n){i.style.display="none",e.style.overflow="",e.style.height="",(0,t.removeClass)([s],Ti),this.removeExpand(e),this.isLoaded&&((n=this.getExpandEvent(e,null)).isInteracted=this.isInteracted,this.trigger("nodeCollapsed",n))},i.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)},i.prototype.disableExpandAttr=function(e){e.setAttribute("aria-expanded","false"),(0,t.addClass)([e],Qi)},i.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=""},i.prototype.animateHeight=function(e,t,i){var s=(i-t)*((e.duration-e.timeStamp)/e.duration)+t;e.element.parentElement.style.height=s+"px"},i.prototype.renderChildNodes=function(e,i,s,n){var r,o=this,l=(0,t.select)("div."+Pi,e);if(!(0,t.isNullOrUndefined)(l))if(this.showSpinner(l),this.fields.dataSource instanceof vi.DataManager){var a=this.parents(e,"."+wi).length,d=this.getChildFields(this.fields,a,1);if((0,t.isNullOrUndefined)(d)||(0,t.isNullOrUndefined)(d.dataSource))return(0,t.detach)(l),void this.removeExpand(e,!0);this.treeList.push("false"),this.fields.dataSource instanceof vi.DataManager&&this.isOffline?(this.treeList.pop(),r=this.getChildNodes(this.treeData,e.getAttribute("data-uid")),this.loadChild(r,d,l,e,i,s,n)):d.dataSource.executeQuery(this.getQuery(d,e.getAttribute("data-uid"))).then((function(t){o.treeList.pop(),r=t.result,1===o.dataType&&(o.dataType=2),o.loadChild(r,d,l,e,i,s,n)})).catch((function(e){o.trigger("actionFailure",{error:e})}))}else{if(r=this.getChildNodes(this.treeData,e.getAttribute("data-uid"),!1,parseFloat(e.getAttribute("aria-level"))+1),this.currentLoadData=this.getSortedData(r),(0,t.isNullOrUndefined)(r)||0===r.length)return(0,t.detach)(l),l.classList.contains(Ai)&&this.hideSpinner(l),void this.removeExpand(e,!0);this.listBaseOption.ariaAttributes.level=parseFloat(e.getAttribute("aria-level"))+1,e.appendChild(B.ListBase.createList(this.createElement,this.currentLoadData,this.listBaseOption)),this.expandNode(e,l,n),this.setSelectionForChildNodes(r),this.ensureCheckNode(e),this.finalizeNode(e),this.disableTreeNodes(r),this.renderSubChild(e,i,n)}},i.prototype.loadChild=function(e,i,s,n,r,o,l){if(this.currentLoadData=e,(0,t.isNullOrUndefined)(e)||0===e.length)(0,t.detach)(s),this.removeExpand(n,!0);else{if(this.updateListProp(i),this.fields.dataSource instanceof vi.DataManager&&!this.isOffline){var a=n.getAttribute("data-uid"),d=this.getNodeObject(a);(0,t.setValue)("child",e,d)}this.listBaseOption.ariaAttributes.level=parseFloat(n.getAttribute("aria-level"))+1,n.appendChild(B.ListBase.createList(this.createElement,e,this.listBaseOption)),this.expandNode(n,s,l),this.setSelectionForChildNodes(e),this.ensureCheckNode(n),this.finalizeNode(n),this.disableTreeNodes(e),this.renderSubChild(n,r,l)}o&&o(),r&&this.expandedNodes.push(n.getAttribute("data-uid")),0!==this.treeList.length||this.isLoaded||this.finalize()},i.prototype.disableTreeNodes=function(e){for(var t=0;t<e.length;){var i=e[parseInt(t.toString(),10)][this.fields.id]?e[parseInt(t.toString(),10)][this.fields.id].toString():null;void 0!==this.disableNode&&-1!==this.disableNode.indexOf(i)&&this.doDisableAction([i]),t++}},i.prototype.setSelectionForChildNodes=function(e){var t;for(t=0;t<e.length;t++){var i=e[parseInt(t.toString(),10)][this.fields.id]?e[parseInt(t.toString(),10)][this.fields.id].toString():null;void 0!==this.selectedNodes&&-1!==this.selectedNodes.indexOf(i)&&this.doSelectionAction()}},i.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},i.prototype.getFields=function(e,t,i){return t===i?e:this.getFields(this.getChildMapper(e),t,i+1)},i.prototype.getChildFields=function(e,t,i){return t===i?this.getChildMapper(e):this.getChildFields(this.getChildMapper(e),t,i+1)},i.prototype.getChildMapper=function(e){return"string"==typeof e.child||(0,t.isNullOrUndefined)(e.child)?e:e.child},i.prototype.getChildNodes=function(e,i,s,n){var r,o=this;if(void 0===s&&(s=!1),(0,t.isNullOrUndefined)(e))return r;if(1===this.dataType)return this.getChildGroup(this.groupedData,i,s);if("string"==typeof this.fields.child){if(-1!==(c=e.findIndex((function(e){return(0,t.getValue)(o.fields.id,e)&&(0,t.getValue)(o.fields.id,e).toString()===i}))))return(0,t.getValue)(this.fields.child,e[parseInt(c.toString(),10)]);if(-1===c)for(var l=0,a=e.length;l<a;l++){var d=(0,t.getValue)(this.fields.child,e[parseInt(l.toString(),10)]);if(-1!==(u=(0,t.isNullOrUndefined)(d)?-1:d.findIndex((function(e){return(0,t.getValue)(o.fields.id,e)&&(0,t.getValue)(o.fields.id,e).toString()===i}))))return(0,t.getValue)(this.fields.child,d[parseInt(u.toString(),10)]);if(!(0,t.isNullOrUndefined)(d)&&void 0!==(r=this.getChildNodes(d,i)))break}}else if(this.isChildObject()){var h=(0,t.isNullOrUndefined)(n)?this.fields.child:this.fields;for(l=1;l<n&&!(0,t.isNullOrUndefined)(h.child);)h=h.child,l++;var c;if(this.updateListProp(h),-1!==(c=e.findIndex((function(e){return(0,t.getValue)(o.fields.id,e)&&(0,t.getValue)(o.fields.id,e).toString()===i}))))return(0,t.getValue)("child",e[parseInt(c.toString(),10)]);if(-1===c){var p=0;for(a=e.length;p<a;p++){var u;d=(0,t.getValue)("child",e[parseInt(p.toString(),10)]);if(-1!==(u=(0,t.isNullOrUndefined)(d)?-1:d.findIndex((function(e){return(0,t.getValue)(o.fields.child.id,e)&&(0,t.getValue)(o.fields.child.id,e).toString()===i}))))return(0,t.getValue)("child",d[parseInt(u.toString(),10)]);if(!(0,t.isNullOrUndefined)(d)&&void 0!==(r=this.getChildNodes(d,i,!1,n)))break}}}return r},i.prototype.getChildGroup=function(e,i,s){var n;if((0,t.isNullOrUndefined)(e))return n;for(var r=0,o=e.length;r<o;r++){if((0,t.isNullOrUndefined)(e[parseInt(r.toString(),10)][0])||(0,t.isNullOrUndefined)((0,t.getValue)(this.fields.parentID,e[parseInt(r.toString(),10)][0])))return s?e[parseInt(r.toString(),10)]:[];if((0,t.getValue)(this.fields.parentID,e[parseInt(r.toString(),10)][0]).toString()===i)return e[parseInt(r.toString(),10)]}return n},i.prototype.renderSubChild=function(e,i,s){if(i)for(var n=(0,t.selectAll)("."+xi,e),r=0,o=n.length;r<o;r++){var l=n[parseInt(r.toString(),10)];if(e.querySelector(".e-icons")!==n[parseInt(r.toString(),10)]){var a=(0,t.closest)(l,"."+Ni);this.expandArgs=this.getExpandEvent(a,null),!0!==s&&this.trigger("nodeExpanding",this.expandArgs),this.renderChildNodes(a,i,null,s)}}},i.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))},i.prototype.isActive=function(e){return!!e.classList.contains(ki)},i.prototype.selectNode=function(e,i,s){var n,r=this;(0,t.isNullOrUndefined)(e)||!this.allowMultiSelection&&this.isActive(e)&&!(0,t.isNullOrUndefined)(i)?this.setFocusElement(e):this.isLoaded?(n=this.getSelectEvent(e,"select",i),this.trigger("nodeSelecting",n,(function(t){t.cancel||t.node.classList.contains(ls)||r.nodeSelectAction(e,i,t,s)}))):this.nodeSelectAction(e,i,n,s)},i.prototype.nodeSelectAction=function(e,i,s,n){if(this.allowMultiSelection&&(n||i&&(!i||i.ctrlKey||i.metaKey))||this.removeSelectAll(),this.allowMultiSelection&&i&&i.shiftKey){this.startNode||(this.startNode=e);var r=this.liList.indexOf(this.startNode),o=this.liList.indexOf(e);if(r>o){var l=r;r=o,o=l}for(var a=r;a<=o;a++){var d=this.liList[parseInt(a.toString(),10)];(0,t.isVisible)(d)&&!d.classList.contains("e-disable")&&this.addSelect(d)}}else this.startNode=e,this.addSelect(e);this.isLoaded&&(s.nodeData=this.getNodeData(e),this.trigger("nodeSelected",s),this.isRightClick=!1),this.isRightClick=!1},i.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)},i.prototype.nodeUnselectAction=function(e,t){this.removeSelect(e),this.setFocusElement(e),this.isLoaded&&(t.nodeData=this.getNodeData(e),this.trigger("nodeSelected",t))},i.prototype.setFocusElement=function(e){if(!(0,t.isNullOrUndefined)(e)){var i=this.getFocusedNode();i&&((0,t.removeClass)([i],ss),i.setAttribute("tabindex","-1")),(0,t.addClass)([e],ss),e.setAttribute("tabindex","0"),t.EventHandler.add(e,"blur",this.focusOut,this),this.updateIdAttr(i,e)}},i.prototype.addSelect=function(e){e.setAttribute("aria-selected","true"),(0,t.addClass)([e],ki);var i=e.getAttribute("data-uid");(0,t.isNullOrUndefined)(i)||-1!==this.selectedNodes.indexOf(i)||this.selectedNodes.push(i)},i.prototype.removeSelect=function(e){this.allowMultiSelection?e.setAttribute("aria-selected","false"):e.removeAttribute("aria-selected"),(0,t.removeClass)([e],ki);var i=this.selectedNodes.indexOf(e.getAttribute("data-uid"));i>-1&&this.selectedNodes.splice(i,1)},i.prototype.removeSelectAll=function(){for(var e=this.element.querySelectorAll("."+ki),i=0,s=e;i<s.length;i++){var n=s[i];this.allowMultiSelection?n.setAttribute("aria-selected","false"):n.removeAttribute("aria-selected")}(0,t.removeClass)(e,ki),this.setProperties({selectedNodes:[]},!0)},i.prototype.getSelectEvent=function(e,i,s){var n=this.getNodeData(e);return{action:i,cancel:!1,isInteracted:!(0,t.isNullOrUndefined)(s),node:e,nodeData:n}},i.prototype.setExpandOnType=function(){this.expandOnType="Auto"===this.expandOn?t.Browser.isDevice?"Click":"DblClick":this.expandOn},i.prototype.expandHandler=function(e){var i=t.Browser.isDevice&&e.originalEvent.changedTouches&&!t.Browser.isIos?document.elementFromPoint(e.originalEvent.changedTouches[0].clientX,e.originalEvent.changedTouches[0].clientY):e.originalEvent.target;!i||i.classList.contains(Mi)||i.classList.contains(Si)||i.classList.contains(wi)||i.classList.contains(Ni)||i.classList.contains(Pi)||this.showCheckBox&&(0,t.closest)(i,"."+es)||this.expandCollapseAction((0,t.closest)(i,"."+Ni),e)},i.prototype.expandCollapseAction=function(e,i){var s=(0,t.select)("div."+Pi,e);if(s&&!s.classList.contains(Ti)){var n=s.classList;n.contains(xi)?this.expandAction(e,s,i):n.contains(Ei)&&this.collapseNode(e,s,i)}},i.prototype.expandAction=function(e,i,s,n,r){var o=this;i.classList.contains(Ti)||((0,t.addClass)([i],Ti),this.isLoaded&&!this.isRefreshed?(this.expandArgs=this.getExpandEvent(e,s),this.isInteracted=this.expandArgs.isInteracted,this.trigger("nodeExpanding",this.expandArgs,(function(s){s.cancel?(0,t.removeClass)([i],Ti):o.nodeExpandAction(e,i,n,r)}))):this.nodeExpandAction(e,i,n,r))},i.prototype.nodeExpandAction=function(e,i,s,n){var r=(0,t.select)("."+wi,e);if(r&&"UL"===r.nodeName)this.expandNode(e,i);else{this.isFirstRender=!0,this.renderChildNodes(e,s,n);for(var o=(0,t.selectAll)("."+Ni,e),l=0;l<o.length;l++){var a=this.getId(o[parseInt(l.toString(),10)]);if(-1!==this.expandChildren.indexOf(a)&&void 0!==this.expandChildren){var d=(0,t.select)("."+xi,(0,t.select)("."+Di,o[parseInt(l.toString(),10)]));(0,t.isNullOrUndefined)(d)||this.expandAction(o[parseInt(l.toString(),10)],d,null),this.expandChildren.splice(this.expandChildren.indexOf(a),1)}}}},i.prototype.keyActionHandler=function(e){var i=this,s=e.target,n=this.getFocusedNode();if(s&&s.classList.contains(Mi)){var r=s;"enter"===e.action?r.blur():"escape"===e.action&&(r.value=this.oldText,r.blur())}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):i.toggleSelect(n,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":case"shiftSpace":case"ctrlSpace":i.toggleSelect(n,e);break;case"f2":i.allowEditing&&!n.classList.contains("e-disable")&&i.createTextbox(n);break;case"ctrlA":if(i.allowMultiSelection){var r=(0,t.selectAll)("."+Ni+":not(."+ki+")",i.element);i.selectGivenNodes(r)}}}))}},i.prototype.navigateToFocus=function(e){var i=this.getFocusedNode().querySelector("."+Di),s=i.getBoundingClientRect(),n=this.getScrollParent(this.element);if(!(0,t.isNullOrUndefined)(n)){var r=n.getBoundingClientRect();s.bottom>r.bottom?n.scrollTop+=s.bottom-r.bottom:s.top<r.top&&(n.scrollTop-=r.top-s.top)}this.isVisibleInViewport(i)||i.scrollIntoView(e)},i.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)},i.prototype.getScrollParent=function(e){return(0,t.isNullOrUndefined)(e)?null:e.scrollHeight>e.clientHeight?e:this.getScrollParent(e.parentElement)},i.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)},i.prototype.checkNode=function(e){var i=this.getFocusedNode(),s=(0,t.select)("."+es,i),n=(0,t.select)(" ."+ts,s).classList.contains(Zi);i.classList.contains("e-disable")||0===i.getElementsByClassName("e-checkbox-disabled").length&&this.validateCheckNode(s,n,i,e)},i.prototype.validateCheckNode=function(e,i,s,n){var r=this,o=(0,t.closest)(e,"."+Ni);this.checkActionNodes=[];var l=i?"false":"true";(0,t.isNullOrUndefined)(l)||o.setAttribute("aria-checked",l);var a=this.getCheckEvent(o,i?"uncheck":"check",n);this.trigger("nodeChecking",a,(function(t){t.cancel||r.nodeCheckingAction(e,i,s,t,n)}))},i.prototype.nodeCheckingAction=function(e,i,s,n,r){if(-1===this.checkedElement.indexOf(s.getAttribute("data-uid"))&&(this.checkedElement.push(s.getAttribute("data-uid")),this.autoCheck)){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",r,!0),this.autoCheck){this.ensureChildCheckState(s),this.ensureParentCheckState((0,t.closest)((0,t.closest)(s,"."+wi),"."+Ni));var l=void 0;"check"===n.action?l=!0:"uncheck"===n.action&&(l=!1),this.ensureStateChange(s,l)}this.nodeCheckedEvent(e,i,r)},i.prototype.ensureStateChange=function(e,i){var s=(0,t.select)("."+wi,e),n=e.getAttribute("data-uid"),r=this.fields;if(1===this.dataType&&this.autoCheck)for(var o=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(r.parentID,"equal",n,!0)),l=0;l<o.length;l++){var a=o[parseInt(l.toString(),10)][this.fields.id]?o[parseInt(l.toString(),10)][this.fields.id].toString():null,d=o[parseInt(l.toString(),10)][this.fields.isChecked]?o[parseInt(l.toString(),10)][this.fields.isChecked].toString():null;if(-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(a)){this.checkedNodes.push(a);var h=this.getChildNodes(this.treeData,a);this.getChildItems(h,i),-1!==this.parentNodeCheck.indexOf(a)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(a),1)}else if(-1===this.checkedNodes.indexOf(n)&&null===s&&-1!==this.checkedNodes.indexOf(a)){if(this.checkedNodes.splice(this.checkedNodes.indexOf(a),1),"true"===d&&this.updateField(this.treeData,this.fields,a,"isChecked",null),-1===this.checkedNodes.indexOf(n)&&null===s||-1!==this.parentNodeCheck.indexOf(a)){var c=this.getChildNodes(this.treeData,a);this.getChildItems(c,i),-1!==this.parentNodeCheck.indexOf(a)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(a),1)}}else{h=this.getChildNodes(this.treeData,a);this.getChildItems(h,i)}}else if(1!==this.dataType||this.autoCheck){(h=this.getChildNodes(this.treeData,n))&&this.childStateChange(h,n,s,i)}else if(i)for(l=0;l<this.treeData.length;l++){var p=this.treeData[parseInt(l.toString(),10)][this.fields.id]?this.treeData[parseInt(l.toString(),10)][this.fields.id].toString():null;-1===this.checkedNodes.indexOf(p)&&this.checkedNodes.push(p)}else{for(var u=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(r.isChecked,"equal",!0,!1)),l=0;l<u.length;l++){var f=u[parseInt(l.toString(),10)][this.fields.id]?u[parseInt(l.toString(),10)][this.fields.id].toString():null;-1!==this.checkedNodes.indexOf(f)&&this.checkedNodes.splice(this.checkedNodes.indexOf(f),1),this.updateField(this.treeData,this.fields,f,"isChecked",null)}this.checkedNodes=[]}},i.prototype.getChildItems=function(e,t){for(var i=0;i<e.length;i++){var s=e[parseInt(i.toString(),10)][this.fields.id]?e[parseInt(i.toString(),10)][this.fields.id].toString():null,n=e[parseInt(i.toString(),10)][this.fields.isChecked]?e[parseInt(i.toString(),10)][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 r=this.getChildNodes(this.treeData,s);r.length>0&&this.getChildItems(r,t)}},i.prototype.childStateChange=function(e,t,i,s){for(var n=0;n<e.length;n++){var r=e[parseInt(n.toString(),10)][this.fields.id]?e[parseInt(n.toString(),10)][this.fields.id].toString():"",o=e[parseInt(n.toString(),10)][this.fields.isChecked]?e[parseInt(n.toString(),10)][this.fields.isChecked].toString():null;this.autoCheck?-1!==this.checkedNodes.indexOf(t)&&-1===this.checkedNodes.indexOf(r)?(this.checkedNodes.push(r),-1!==this.parentNodeCheck.indexOf(r)&&this.parentNodeCheck.splice(this.parentNodeCheck.indexOf(r),1)):-1!==this.checkedNodes.indexOf(t)||-1===this.checkedNodes.indexOf(r)||s||(this.checkedNodes.splice(this.checkedNodes.indexOf(r),1),"true"===o&&this.updateField(this.treeData,this.fields,r,"isChecked",null)):this.autoCheck||(s?-1===this.checkedNodes.indexOf(r)&&this.checkedNodes.push(r):(-1!==this.checkedNodes.indexOf(r)&&this.checkedNodes.splice(this.checkedNodes.indexOf(r),1),this.updateField(this.treeData,this.fields,r,"isChecked",null),this.checkedNodes=[]));var l=this.getChildNodes([e[parseInt(n.toString(),10)]],r);l&&this.childStateChange(l,t,i,s)}},i.prototype.allCheckNode=function(e,i,s,n,r){if(e)for(var o=0;o<e.length;o++){var l=(0,t.getValue)(this.fields.id,e[parseInt(o.toString(),10)]),a=this.element.querySelector('[data-uid="'+l+'"]');!1!==r&&-1===this.checkedElement.indexOf(l.toString())&&(null===a&&!(0,t.isNullOrUndefined)(e[parseInt(o.toString(),10)][this.fields.isChecked])&&-1===i.indexOf(l.toString())||0===n||2===s)&&(!1!==e[parseInt(o.toString(),10)][this.fields.isChecked]||2===s?i.push(l.toString()):n=null,n=!1!==e[parseInt(o.toString(),10)][this.fields.isChecked]||2===s?0:null),-1===i.indexOf(l.toString())&&(0,t.isNullOrUndefined)(s)&&i.push(l.toString());var d=(0,t.getValue)(this.fields.child.toString(),e[parseInt(o.toString(),10)]);if(!0===(0,t.getValue)(this.fields.hasChildren,e[parseInt(o.toString(),10)])||d){var h=(0,t.getValue)(this.fields.id,e[parseInt(o.toString(),10)]),c=void 0;(c=1===this.dataType?this.getChildNodes(this.treeData,h.toString()):d)&&((0,t.isNullOrUndefined)(r)?this.allCheckNode(c,i,s,n):this.allCheckNode(c,i,s,n,r),n=null)}n=null}},i.prototype.openNode=function(e,i){var s=this.getFocusedNode(),n=(0,t.select)("div."+Pi,s);if(e){if(!n)return;n.classList.contains(xi)?this.expandAction(s,n,i):this.focusNextNode(s,!0)}else if(n&&n.classList.contains(Ei))this.collapseNode(s,n,i);else{var r=(0,t.closest)((0,t.closest)(s,"."+wi),"."+Ni);if(!r)return;r.classList.contains("e-disable")||(this.setFocus(s,r),this.navigateToFocus(!0))}},i.prototype.navigateNode=function(e){var t=this.getFocusedNode();this.focusNextNode(t,e)},i.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))},i.prototype.getFocusedNode=function(){var e,i=(0,t.select)("."+Ni+'[tabindex="0"]',this.element);return(0,t.isNullOrUndefined)(i)&&(e=(0,t.select)("."+Ni,this.element)),(0,t.isNullOrUndefined)(i)?(0,t.isNullOrUndefined)(e)?this.element.firstElementChild:e:i},i.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")||i.classList.contains("e-prevent")){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")||null==i.nextSibling&&s.classList.contains(Di)?this.focusNextNode(i,!1):this.focusNextNode(i,t)}},i.prototype.getNextNode=function(e){var i,s=this.liList.indexOf(e);do{if(s++,i=this.liList[parseInt(s.toString(),10)],(0,t.isNullOrUndefined)(i))return e}while(!(0,t.isVisible)(i));return i},i.prototype.getPrevNode=function(e){var i,s=this.liList.indexOf(e);do{if(s--,i=this.liList[parseInt(s.toString(),10)],(0,t.isNullOrUndefined)(i))return e}while(!(0,t.isVisible)(i));return i},i.prototype.getRootNode=function(){var e,i=0;do{e=this.liList[parseInt(i.toString(),10)],i++}while(!(0,t.isVisible)(e));return e},i.prototype.getEndNode=function(){var e,i=this.liList.length-1;do{e=this.liList[parseInt(i.toString(),10)],i--}while(!(0,t.isVisible)(e));return e},i.prototype.setFocus=function(e,i){(0,t.removeClass)([e],ss),e.setAttribute("tabindex","-1"),i.classList.contains("e-disable")||i.classList.contains(ls)||((0,t.addClass)([i],ss),i.setAttribute("tabindex","0"),i.focus(),t.EventHandler.add(i,"blur",this.focusOut,this),this.updateIdAttr(e,i))},i.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")},i.prototype.focusIn=function(){if(!this.mouseDownStatus){var e=this.getFocusedNode();e.classList.contains("e-disable")||e.classList.contains("e-prevent")?(e.setAttribute("tabindex","-1"),this.navigateNode(!0)):(e.setAttribute("tabindex","0"),(0,t.addClass)([e],ss),t.EventHandler.add(e,"blur",this.focusOut,this)),this.mouseDownStatus=!1}},i.prototype.focusOut=function(e){var i=this.getFocusedNode();e.target===i&&((0,t.removeClass)([i],ss),t.EventHandler.remove(i,"blur",this.focusOut))},i.prototype.onMouseOver=function(e){if(!t.Browser.isDevice){var i=e.target,s=i.classList,n=(0,t.closest)(i,"."+Ni);!n||s.contains(wi)||s.contains(Ni)?this.removeHover():n&&!n.classList.contains("e-disable")&&this.setHover(n)}},i.prototype.setHover=function(e){e.classList.contains(Li)||e.classList.contains(ls)||(this.removeHover(),(0,t.addClass)([e],Li))},i.prototype.onMouseLeave=function(){this.removeHover()},i.prototype.removeHover=function(){var e=(0,t.selectAll)("."+Li,this.element);e&&e.length&&(0,t.removeClass)(e,Li)},i.prototype.getNodeData=function(e,i){if(!(0,t.isNullOrUndefined)(e)&&e.classList.contains(Ni)&&!(0,t.isNullOrUndefined)((0,t.closest)(e,"."+Ii))&&(0,t.closest)(e,"."+Ii).classList.contains(Si)){var s=e.getAttribute("data-uid"),n=this.getText(e,i),r=(0,t.closest)(e.parentNode,"."+Ni),o=r?r.getAttribute("data-uid"):null,l=e.classList.contains(ki),a=!e.classList.contains(ls),d="true"===e.getAttribute("aria-expanded"),h=null!==e.getAttribute("aria-expanded")||null!=((0,t.select)("."+xi,e)||(0,t.select)("."+Ei,e)),c=null,p=(0,t.select)("."+es,e);return this.showCheckBox&&p&&(c=e.getAttribute("aria-checked")),{id:s,text:n,parentID:o,selected:l,selectable:a,expanded:d,isChecked:c,hasChildren:h}}return{id:"",text:"",parentID:"",selected:!1,expanded:!1,isChecked:"",hasChildren:!1}},i.prototype.getText=function(e,i){if(i){var s=this.getNodeObject(e.getAttribute("data-uid")),n=parseFloat(e.getAttribute("aria-level")),r=this.getFields(this.fields,n,1);return(0,t.getValue)(r.text,s)}return(0,t.select)("."+Oi,e).textContent},i.prototype.getExpandEvent=function(e,i){var s=this.getNodeData(e);return{cancel:!1,isInteracted:!(0,t.isNullOrUndefined)(i),node:e,nodeData:s,event:i}},i.prototype.renderNodeTemplate=function(e,i,s){var n=this.nodeTemplateFn(e,this,"nodeTemplate"+s,this.element.id+"nodeTemplate",this.isStringTemplate,void 0,i,this.root);n&&(n=Array.prototype.slice.call(n),(0,t.append)(n,i))},i.prototype.destroyTemplate=function(e){this.clearTemplate(["nodeTemplate"+e.getAttribute("data-uid")])},i.prototype.reRenderNodes=function(){this.updateListProp(this.fields),t.Browser.isIE?(this.ulElement=this.element.querySelector(".e-list-parent.e-ul"),this.ulElement.parentElement.removeChild(this.ulElement)):this.element.innerHTML="",(0,t.isNullOrUndefined)(this.nodeTemplateFn)||this.clearTemplate(),this.setTouchClass(),this.setProperties({selectedNodes:[],checkedNodes:[],expandedNodes:[]},!0),this.checkedElement=[],this.isLoaded=!1,this.setDataBinding(!0)},i.prototype.setCssClass=function(e,i){(0,t.isNullOrUndefined)(e)||""===e||(0,t.removeClass)([this.element],e.split(" ")),(0,t.isNullOrUndefined)(i)||""===i||(0,t.addClass)([this.element],i.split(" "))},i.prototype.editingHandler=function(e){var i=e.target;if(!(!i||i.classList.contains(Si)||i.classList.contains(wi)||i.classList.contains(Ni)||i.classList.contains(Pi)||i.classList.contains(Mi)||i.classList.contains(Hi))){var s=(0,t.closest)(i,"."+Ni);this.createTextbox(s)}},i.prototype.createTextbox=function(e){var i=this,s=(0,t.select)("."+Ui,this.element);s&&s.blur();var n=(0,t.select)("."+Oi,e);this.updateOldText(e);var r=this.createElement("input",{className:Ui,attrs:{value:this.oldText}}),o=this.getEditEvent(e,null,r.outerHTML);this.trigger("nodeEditing",o,(function(s){if(!s.cancel){var r="width:"+(n.offsetWidth+5)+"px";(0,t.addClass)([e],Ri),(0,t.isNullOrUndefined)(i.nodeTemplateFn)||i.destroyTemplate(e),i.isReact?setTimeout((function(){i.renderTextBox(o,n,r)}),5):i.renderTextBox(o,n,r)}}))},i.prototype.renderTextBox=function(e,i,s){i.innerHTML=e.innerHtml;var n=(0,t.select)("."+Ui,i);this.inputObj=yi.Input.createInput({element:n,properties:{enableRtl:this.enableRtl}},this.createElement),this.inputObj.container.setAttribute("style",s),n.focus();var r=n;r.setSelectionRange(0,r.value.length),this.wireInputEvents(n)},i.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=(0,t.getValue)(this.editFields.text,this.editData)},i.prototype.inputFocusOut=function(e){if((0,t.select)("."+Ui,this.element)){var i=e.target,s=i.value,n=(0,t.closest)(i,"."+Oi),r=(0,t.closest)(i,"."+Ni);(0,t.detach)(this.inputObj.container),yi.Input.destroy({element:i,properties:this.properties}),this.fields.dataSource instanceof vi.DataManager&&!this.isOffline?this.crudOperation("update",null,r,s,null,null,!0):this.appendNewText(r,n,s,!0),t.EventHandler.remove(i,"blur",this.inputFocusOut)}},i.prototype.appendNewText=function(e,t,i,s){var n=this,r=this.getEditEvent(e,i,null);this.trigger("nodeEdited",r,(function(r){i=r.cancel?r.oldText:r.newText,n.updateText(e,t,i,s),r.oldText!==i&&n.triggerEvent("nodeEdited",[n.getNode(e)])}))},i.prototype.updateText=function(e,i,s,n){var r=(0,t.setValue)(this.editFields.text,s,this.editData);if((0,t.isNullOrUndefined)(this.nodeTemplateFn))this.enableHtmlSanitizer?i.innerText=t.SanitizeHtmlHelper.sanitize(s):i.innerHTML=s;else{i.innerText="";var o=e.getAttribute("data-uid");this.renderNodeTemplate(r,i,o),this.renderReactTemplates()}n&&((0,t.removeClass)([e],Ri),e.focus(),t.EventHandler.add(e,"blur",this.focusOut,this),(0,t.addClass)([e],ss)),this.allowTextWrap&&this.calculateWrap(e)},i.prototype.getElement=function(e){return(0,t.isNullOrUndefined)(e)?null:"string"==typeof e?this.element.querySelector('[data-uid="'+e+'"]'):"object"==typeof e?(0,t.getElement)(e):null},i.prototype.getId=function(e){return(0,t.isNullOrUndefined)(e)?null:"string"==typeof e?e:"object"==typeof e?(0,t.getElement)(e).getAttribute("data-uid"):null},i.prototype.getEditEvent=function(e,t,i){return{cancel:!1,newText:t,node:e,nodeData:this.getNodeData(e),oldText:this.oldText,innerHtml:i}},i.prototype.getNodeObject=function(e){var i;if((0,t.isNullOrUndefined)(e))return i;if(1!==this.dataType)return this.getChildNodeObject(this.treeData,this.fields,e);for(var s=0,n=this.treeData.length;s<n;s++){var r=(0,t.getValue)(this.fields.id,this.treeData[parseInt(s.toString(),10)]);if(!(0,t.isNullOrUndefined)(this.treeData[parseInt(s.toString(),10)])&&!(0,t.isNullOrUndefined)(r)&&r.toString()===e)return this.treeData[parseInt(s.toString(),10)]}return i},i.prototype.getChildNodeObject=function(e,i,s){var n;if((0,t.isNullOrUndefined)(e))return n;for(var r=0,o=e.length;r<o;r++){var l=(0,t.getValue)(i.id,e[parseInt(r.toString(),10)]);if(e[parseInt(r.toString(),10)]&&l&&l.toString()===s)return e[parseInt(r.toString(),10)];if("string"!=typeof i.child||(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(r.toString(),10)]))){if(this.fields.dataSource instanceof vi.DataManager&&!(0,t.isNullOrUndefined)((0,t.getValue)("child",e[parseInt(r.toString(),10)]))){if(void 0!==(n=this.getChildNodeObject((0,t.getValue)("child",e[parseInt(r.toString(),10)]),this.getChildMapper(i),s)))break}else if(this.isChildObject()){a=(0,t.getValue)("child",e[parseInt(r.toString(),10)]);if(void 0!==(n=this.getChildNodeObject(a,this.getChildMapper(i),s)))break}}else{var a=(0,t.getValue)(i.child,e[parseInt(r.toString(),10)]);if(void 0!==(n=this.getChildNodeObject(a,this.getChildMapper(i),s)))break}}return n},i.prototype.setDragAndDrop=function(e){e&&!this.disabled?this.initializeDrag():this.destroyDrag()},i.prototype.initializeDrag=function(){var e,i=this;this.dragObj=new t.Draggable(this.element,{enableTailMode:!0,enableAutoScroll:!0,dragArea:this.dragArea,dragTarget:"."+Di,enableTapHold:!0,tapHoldThreshold:100,helper:function(s){i.dragTarget=s.sender.target;var n=(0,t.closest)(i.dragTarget,"."+Si),r=(0,t.closest)(i.dragTarget,"."+Di);if(i.dragLi=(0,t.closest)(i.dragTarget,"."+Ni),i.fullRowSelect&&!r&&i.dragTarget.classList.contains(Ki)&&(r=i.dragTarget.nextElementSibling),!i.dragTarget||!s.element.isSameNode(n)||!r||i.dragTarget.classList.contains(Si)||i.dragTarget.classList.contains(wi)||i.dragTarget.classList.contains(Ni)||i.dragLi.classList.contains("e-disable"))return!1;var o=r.cloneNode(!0);if((0,t.isNullOrUndefined)((0,t.select)("div."+Pi,o))){var l=i.createElement("div",{className:Pi+" "+xi});o.insertBefore(l,o.children[0])}var a="e-drag-item "+Si+" "+i.cssClass+" "+(i.enableRtl?Bi:"");(e=i.createElement("div",{className:a})).appendChild(o);var d=i.selectedNodes.length;if(d>1&&i.allowMultiSelection&&i.dragLi.classList.contains(ki)){var h=i.createElement("span",{className:"e-drop-count",innerHTML:""+d});e.appendChild(h)}return document.body.appendChild(e),document.body.style.cursor="",i.dragData=i.getNodeData(i.dragLi),e},dragStart:function(s){(0,t.addClass)([i.element],Wi);var n,r=(0,t.closest)(s.target,".e-list-item");r&&(n=parseInt(r.getAttribute("aria-level"),10));var o=i.getDragEvent(s.event,i,null,s.target,null,e,n);o.draggedNode.classList.contains(Ri)?(i.dragObj.intDestroy(s.event),i.dragCancelAction(e)):i.trigger("nodeDragStart",o,(function(t){t.cancel?(i.dragObj.intDestroy(s.event),i.dragCancelAction(e)):i.dragStartAction=!0}))},drag:function(s){i.dragObj.setProperties({cursorAt:{top:!(0,t.isNullOrUndefined)(s.event.targetTouches)||t.Browser.isDevice?60:-20}}),i.dragAction(s,e)},dragStop:function(e){(0,t.removeClass)([i.element],Wi),e.target.classList.contains("e-sibling")||i.removeVirtualEle();var s=e.target,n=(0,t.closest)(s,"."+qi);s&&n||((0,t.detach)(e.helper),document.body.style.cursor="");var r,o=(0,t.closest)(s,".e-list-item");o&&(r=parseInt(o.getAttribute("aria-level"),10));var l=i.getDragEvent(e.event,i,s,s,null,e.helper,r);l.preventTargetExpand=!1,i.trigger("nodeDragStop",l,(function(n){i.dragParent=n.draggedParentNode,i.preventExpand=n.preventTargetExpand,n.cancel&&(e.helper.parentNode&&(0,t.detach)(e.helper),document.body.style.cursor="",!1,s.classList.contains("e-sibling")&&i.removeVirtualEle()),i.dragStartAction=!1}))}}),this.dropObj=new t.Droppable(this.element,{out:function(e){!(0,t.isNullOrUndefined)(e)&&!e.target.classList.contains(Fi)&&i.dropObj.dragData.default&&i.dropObj.dragData.default.helper.classList.contains(Si)&&(document.body.style.cursor="not-allowed")},over:function(){document.body.style.cursor=""},drop:function(e){i.dropAction(e),i.removeVirtualEle()}})},i.prototype.dragCancelAction=function(e){(0,t.detach)(e),(0,t.removeClass)([this.element],Wi),this.dragStartAction=!1},i.prototype.dragAction=function(e,i){var s=(0,t.closest)(e.target,"."+qi),n=(0,t.closest)(e.target,"."+Di),r=(0,t.select)("div."+Pi,i);(0,t.removeClass)([r],[Vi,_i,zi,Xi]),this.isDropIn=!1,this.removeVirtualEle(),document.body.style.cursor="";var o=e.target.classList;if(this.fullRowSelect&&!n&&!(0,t.isNullOrUndefined)(o)&&o.contains(Ki)&&(n=e.target.nextElementSibling),s){var l=(0,t.closest)(e.target,"."+Ni),a=(0,t.closest)(e.target,"."+es),d=(0,t.closest)(e.target,"."+Ei),h=(0,t.closest)(e.target,"."+xi);if(!s.classList.contains(Si)||n&&!l.isSameNode(this.dragLi)&&!this.isDescendant(this.dragLi,l))if(this.hasTemplate&&l){var c=(0,t.select)(this.fullRowSelect?"."+Ki:"."+Di,l);if(e&&!h&&!d&&e.event.offsetY<7&&!a||h&&e.event.offsetY<5||d&&e.event.offsetX<3){var p=this.fullRowSelect?1:0;this.appendIndicator(l,r,p)}else if(e&&!h&&!d&&!a&&c&&e.event.offsetY>c.offsetHeight-10||h&&e.event.offsetY>19||d&&e.event.offsetX>19){p=this.fullRowSelect?2:1;this.appendIndicator(l,r,p)}else(0,t.addClass)([r],Vi),this.isDropIn=!0}else if(l&&e&&!h&&!d&&e.event.offsetY<7&&!a||h&&e.event.offsetY<5||d&&e.event.offsetX<3){p=this.fullRowSelect?1:0;this.appendIndicator(l,r,p)}else if(l&&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){p=this.fullRowSelect?2:1;this.appendIndicator(l,r,p)}else(0,t.addClass)([r],Vi),this.isDropIn=!0;else"LI"!==e.target.nodeName||l.isSameNode(this.dragLi)||this.isDescendant(this.dragLi,l)?e.target.classList.contains(Fi)?(0,t.addClass)([r],_i):(0,t.addClass)([r],zi):((0,t.addClass)([r],_i),this.renderVirtualEle(e))}else(0,t.addClass)([r],Xi),document.body.style.cursor="not-allowed";var u,f=(0,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&&(0,t.removeClass)([r],m.dropIndicator),this.trigger("nodeDragging",m),m.dropIndicator&&(0,t.addClass)([r],m.dropIndicator)},i.prototype.appendIndicator=function(e,i,s){(0,t.addClass)([i],_i);var n=this.createElement("div",{className:Fi});e.insertBefore(n,e.children[parseInt(s.toString(),10)])},i.prototype.dropAction=function(e){for(var i,n,r=e.event.offsetY,o=e.target,l=!1,a=[],d=[],h=e.dragData.draggable,c=0;c<h.ej2_instances.length;c++)if(h.ej2_instances[parseInt(c.toString(),10)]instanceof s){i=h.ej2_instances[parseInt(c.toString(),10)];break}if(i&&i.dragTarget){var p=i.dragTarget,u=(0,t.closest)(p,"."+Ni),f=(0,t.closest)(o,"."+Ni);if(d.push(u),null==f&&o.classList.contains(Si)&&(f=o.firstElementChild),(0,t.detach)(e.droppedElement),document.body.style.cursor="",!f||f.isSameNode(u)||this.isDescendant(u,f))return void(this.fields.dataSource instanceof vi.DataManager==!1&&(this.preventExpand=!1));if(i.allowMultiSelection&&u.classList.contains(ki)){var m=(0,t.selectAll)("."+ki,i.element);if(d=m,e.target.offsetHeight<=33&&r>e.target.offsetHeight-10&&r>6)for(c=m.length-1;c>=0;c--)f.isSameNode(m[parseInt(c.toString(),10)])||this.isDescendant(m[parseInt(c.toString(),10)],f)||this.appendNode(o,m[parseInt(c.toString(),10)],f,e,i,r);else for(c=0;c<m.length;c++)f.isSameNode(m[parseInt(c.toString(),10)])||this.isDescendant(m[parseInt(c.toString(),10)],f)||this.appendNode(o,m[parseInt(c.toString(),10)],f,e,i,r)}else this.appendNode(o,u,f,e,i,r);n=parseInt(u.getAttribute("aria-level"),10),l=!0}this.fields.dataSource instanceof vi.DataManager==!1&&(this.preventExpand=!1);for(c=0;c<d.length;c++)a.push(this.getNode(d[parseInt(c.toString(),10)]));this.trigger("nodeDropped",this.getDragEvent(e.event,i,o,e.target,e.dragData.draggedElement,null,n,l)),i.element.id!==this.element.id&&(i.triggerEvent("nodeDropped",a),this.isNodeDropped=!0,this.fields.dataSource=this.treeData),this.triggerEvent("nodeDropped",a)},i.prototype.appendNode=function(e,i,s,n,r,o){var l=(0,t.closest)(e,"."+es),a=(0,t.closest)(n.target,"."+Ei),d=(0,t.closest)(n.target,"."+xi);i.classList.contains("e-disable")||l||!(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,r,null,n,o,!0,e):"LI"===e.nodeName?this.dropAsSiblingNode(i,s,n,r):e.firstElementChild&&e.classList.contains(Si)?"UL"===e.firstElementChild.nodeName&&this.dropAsSiblingNode(i,s,n,r):e.classList.contains("e-icon-collapsible")||e.classList.contains("e-icon-expandable")?this.dropAsSiblingNode(i,s,n,r):this.dropAsChildNode(i,s,r,null,n,o,null,e),this.showCheckBox&&this.ensureIndeterminate()},i.prototype.dropAsSiblingNode=function(e,i,s,n){var r,o=(0,t.closest)(i,"."+wi),l=(0,t.closest)(e,"."+wi),a=(0,t.closest)(l,"."+Ni);if(s.target.offsetHeight>0&&s.event.offsetY>s.target.offsetHeight-2?r=!1:s.event.offsetY<2?r=!0:(s.target.classList.contains("e-icon-expandable")||s.target.classList.contains("e-icon-collapsible"))&&(s.event.offsetY<5||s.event.offsetX<3?r=!0:(s.event.offsetY>15||s.event.offsetX>17)&&(r=!1)),s.target.classList.contains("e-icon-expandable")||s.target.classList.contains("e-icon-collapsible")){var d=s.target.closest("li");o.insertBefore(e,r?d:d.nextElementSibling)}else o.insertBefore(e,r?s.target:s.target.nextElementSibling);this.moveData(e,i,o,r,n),this.updateElement(l,a),this.updateAriaLevel(e),n.element.id===this.element.id?this.updateList():(n.updateInstance(),this.updateInstance())},i.prototype.dropAsChildNode=function(e,i,s,n,r,o,l,a){var d,h=(0,t.closest)(e,"."+wi),c=(0,t.closest)(h,"."+Ni),p=(0,t.closest)(i,"."+wi);if(r&&r.target&&(d=(0,t.select)(this.fullRowSelect?"."+Ki:"."+Di,i)),r&&(o<7&&!a.classList.contains("e-sibling")||a.classList.contains("e-sibling")&&!i.lastChild.classList.contains("e-sibling"))&&!l)p.insertBefore(e,i),this.moveData(e,i,p,!0,s);else if(r&&r.target.offsetHeight>0&&o>r.target.offsetHeight-10&&!l&&!this.hasTemplate)p.insertBefore(e,i.nextElementSibling),this.moveData(e,i,p,!1,s);else if(this.hasTemplate&&d&&o>d.offsetHeight-10&&!l)p.insertBefore(e,i.nextElementSibling),this.moveData(e,i,p,!1,s);else{var u=this.expandParent(i),f=(0,t.isNullOrUndefined)(n)?null:u.childNodes[parseInt(n.toString(),10)];u.insertBefore(e,f),this.moveData(e,f,u,!0,s)}this.updateElement(h,c),this.updateAriaLevel(e),s.element.id===this.element.id?this.updateList():(s.updateInstance(),this.updateInstance())},i.prototype.moveData=function(e,i,s,n,r){var o=(0,t.closest)(s,"."+Ni),l=this.getId(e),a=r.updateChildField(r.treeData,r.fields,l,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=(0,t.isNullOrUndefined)(h)?this.treeData.length:n?h:h+1;if((0,t.isNullOrUndefined)(c)&&!this.hasPid)delete a[0][this.fields.parentID];else{var u=this.isNumberTypeId?parseFloat(c):c;(0,t.setValue)(this.fields.parentID,u,a[0])}if(this.treeData.splice(p,0,a[0]),r.element.id!==this.element.id){var f=r.removeChildNodes(l);p++;for(var m=0,g=f.length;m<g;m++)this.treeData.splice(p,0,f[parseInt(m.toString(),10)]),p++;r.groupedData=r.getGroupedData(r.treeData,r.fields.parentID)}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.addChildData(this.treeData,this.fields,c,a,n?h:h+1)},i.prototype.expandParent=function(e){var i=(0,t.select)("div."+Pi,e);i&&i.classList.contains(xi)&&!0!==this.preventExpand&&this.expandAction(e,i,null);var s=(0,t.select)("."+wi,e);(!0===this.preventExpand&&!s&&i&&this.renderChildNodes(e),s=(0,t.select)("."+wi,e),(0,t.isNullOrUndefined)(s)||!0!==this.preventExpand||(s.style.display="none"),(0,t.isNullOrUndefined)(s)||!1!==this.preventExpand||(s.style.display="block"),(0,t.isNullOrUndefined)(s)&&!0===this.preventExpand)&&((0,t.isNullOrUndefined)(i)&&B.ListBase.generateIcon(this.createElement,e,xi,this.listBaseOption),(n=(0,t.select)("div."+Pi,e))&&n.classList.add("e-icon-expandable"),s=B.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(s),n?(0,t.removeClass)([n],Ei):B.ListBase.generateIcon(this.createElement,e,xi,this.listBaseOption),e.setAttribute("aria-expanded","false"),s.style.display="none");if((0,t.isNullOrUndefined)(s)){var n,r=this.expandArgs;((0,t.isNullOrUndefined)(r)||r&&"nodeExpanding"!==r.name)&&this.trigger("nodeExpanding",this.getExpandEvent(e,null)),(0,t.isNullOrUndefined)(i)&&B.ListBase.generateIcon(this.createElement,e,Ei,this.listBaseOption),(n=(0,t.select)("div."+Pi,e))||(B.ListBase.generateIcon(this.createElement,e,Ei,this.listBaseOption),n=(0,t.select)("div."+Pi,e)),(0,t.removeClass)([n],xi),s=B.ListBase.generateUL(this.createElement,[],null,this.listBaseOption),e.appendChild(s),this.addExpand(e),this.trigger("nodeExpanded",this.getExpandEvent(e,null))}return s},i.prototype.updateElement=function(e,i){if(i&&0===e.childElementCount){var s=(0,t.select)("div."+Pi,i);(0,t.detach)(e),(0,t.detach)(s);var n=this.getId(i);this.updateField(this.treeData,this.fields,n,"hasChildren",!1),this.removeExpand(i,!0)}},i.prototype.updateAriaLevel=function(e){var i=this.parents(e,"."+wi).length;e.setAttribute("aria-level",""+i),this.updateChildAriaLevel((0,t.select)("."+wi,e),i+1)},i.prototype.updateChildAriaLevel=function(e,i){if(!(0,t.isNullOrUndefined)(e))for(var s=e.childNodes,n=0,r=s.length;n<r;n++){var o=s[parseInt(n.toString(),10)];o.setAttribute("aria-level",""+i),this.updateChildAriaLevel((0,t.select)("."+wi,o),i+1)}},i.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:Fi}),s=this.fullRowSelect?t?1:2:t?0:1;e.target.insertBefore(i,e.target.children[parseInt(s.toString(),10)])},i.prototype.removeVirtualEle=function(){var e=(0,t.select)("."+Fi);e&&(0,t.detach)(e)},i.prototype.destroyDrag=function(){this.dragObj&&this.dropObj&&(this.dragObj.destroy(),this.dropObj.destroy())},i.prototype.getDragEvent=function(e,i,s,n,r,o,l,a){var d=s?(0,t.closest)(s,"."+Ni):null,h=d?this.getNodeData(d):null,c=i?i.dragLi:r,p=i?i.dragData:null,u=s?this.parents(s,"."+Ni):null,f=i.dragLi.parentElement,m=i.dragLi?(0,t.closest)(f,"."+Ni):null,g=null,v=null,y=[_i,Vi,zi,Xi],b=null,C=!0===a?c:d,S=C?(0,t.closest)(C,".e-list-parent"):null,I=0,E=null;if(m=i.dragLi&&null===m?(0,t.closest)(f,"."+Si):m,m=!0===a?this.dragParent:m,o)for(;I<4;){if((0,t.select)("."+Pi,o).classList.contains(y[parseInt(I.toString(),10)])){b=y[parseInt(I.toString(),10)];break}I++}if(S){var x=0;for(I=0;I<S.childElementCount;I++){if(x=!0!==a&&S.children[parseInt(I.toString(),10)]===c&&d!==c?++x:x,!0!==a&&S.children[parseInt(I.toString(),10)].classList.contains("e-hover")){v=e.offsetY>=23?I+1:I;break}if(S.children[parseInt(I.toString(),10)]===C){e.offsetY,v=I;break}}v=0!==x?--v:v,E=this.isDropIn?"Inside":e.offsetY<7?"Before":"After"}if(s&&(g=0===u.length?null:s.classList.contains(Ni)?u[0]:u[1]),d===c&&(g=d),s&&n.offsetHeight<=33&&e.offsetY<n.offsetHeight-10&&e.offsetY>6&&(g=d,!0!==a)){l=++l;var N=g?(0,t.select)(".e-list-parent",g):null;if(v=N?N.children.length:0,!(this.fields.dataSource instanceof vi.DataManager)&&null===N&&g){var O=g.hasAttribute("data-uid")?this.getChildNodes(this.fields.dataSource,g.getAttribute("data-uid").toString()):null;v=O?O.length:0}}return{cancel:!1,clonedNode:o,event:e,draggedNode:c,draggedNodeData:p,droppedNode:d,droppedNodeData:h,dropIndex:v,dropLevel:l,draggedParentNode:m,dropTarget:g,dropIndicator:b,target:n,position:E}},i.prototype.addFullRow=function(e){var i=this.liList.length;if(e)for(var s=0;s<i;s++)this.createFullRow(this.liList[parseInt(s.toString(),10)]);else for(s=0;s<i;s++){var n=(0,t.select)("."+Ki,this.liList[parseInt(s.toString(),10)]);(0,t.detach)(n)}},i.prototype.createFullRow=function(e){var t=this.createElement("div",{className:Ki});e.insertBefore(t,e.childNodes[0])},i.prototype.addMultiSelect=function(e){if(e)for(var i=0,s=(0,t.selectAll)("."+Ni+':not([aria-selected="true"])',this.element);i<s.length;i++){s[i].setAttribute("aria-selected","false")}else for(var n=0,r=(0,t.selectAll)("."+Ni+'[aria-selected="false"]',this.element);n<r.length;n++){r[n].removeAttribute("aria-selected")}},i.prototype.collapseByLevel=function(e,i,s){if(i>0&&!(0,t.isNullOrUndefined)(e))for(var n=this.getVisibleNodes(s,e.childNodes),r=0,o=n.length;r<o;r++){var l=n[parseInt(r.toString(),10)],a=(0,t.select)("."+Ei,(0,t.select)("."+Di,l));(0,t.isNullOrUndefined)(a)||this.collapseNode(l,a,null),this.collapseByLevel((0,t.select)("."+wi,l),i-1,s)}},i.prototype.collapseAllNodes=function(e){for(var i=this.getVisibleNodes(e,(0,t.selectAll)("."+Ei,this.element)),s=0,n=i.length;s<n;s++){var r=i[parseInt(s.toString(),10)],o=(0,t.closest)(r,"."+Ni);this.collapseNode(o,r,null)}},i.prototype.expandByLevel=function(e,i,s){if(i>0&&!(0,t.isNullOrUndefined)(e))for(var n=this.getVisibleNodes(s,e.childNodes),r=0,o=n.length;r<o;r++){var l=n[parseInt(r.toString(),10)],a=(0,t.select)("."+xi,(0,t.select)("."+Di,l));(0,t.isNullOrUndefined)(a)||this.expandAction(l,a,null),this.expandByLevel((0,t.select)("."+wi,l),i-1,s)}},i.prototype.expandAllNodes=function(e){for(var i=this.getVisibleNodes(e,(0,t.selectAll)("."+xi,this.element)),s=0,n=i.length;s<n;s++){var r=i[parseInt(s.toString(),10)],o=(0,t.closest)(r,"."+Ni);this.expandAction(o,r,null,!0)}},i.prototype.getVisibleNodes=function(e,i){var s=Array.prototype.slice.call(i);if(e)for(var n=0;n<s.length;n++)(0,t.isVisible)(s[parseInt(n.toString(),10)])||(s.splice(n,1),n--);return s},i.prototype.removeNode=function(e){var i=(0,t.closest)(e,"."+wi),s=(0,t.closest)(i,"."+Ni);(0,t.isNullOrUndefined)(this.nodeTemplateFn)||this.destroyTemplate(e),(0,t.detach)(e),this.updateElement(i,s),this.removeData(e)},i.prototype.updateInstance=function(){this.updateList(),this.updateSelectedNodes(),this.updateExpandedNodes()},i.prototype.updateList=function(){this.liList=Array.prototype.slice.call((0,t.selectAll)("."+Ni,this.element))},i.prototype.updateSelectedNodes=function(){this.setProperties({selectedNodes:[]},!0);var e=(0,t.selectAll)("."+ki,this.element);this.selectGivenNodes(e)},i.prototype.updateExpandedNodes=function(){this.setProperties({expandedNodes:[]},!0);for(var e=(0,t.selectAll)('[aria-expanded="true"]',this.element),i=0,s=e.length;i<s;i++)this.addExpand(e[parseInt(i.toString(),10)])},i.prototype.removeData=function(e){if(1===this.dataType){var t=new vi.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)}},i.prototype.removeChildNodes=function(e){var i=this.getChildGroup(this.groupedData,e,!1),s=[];if(i)for(var n=0,r=i.length;n<r;n++){var o=new vi.DataManager(this.treeData),l=(0,t.getValue)(this.fields.id,i[parseInt(n.toString(),10)]).toString(),a={},d=this.isNumberTypeId?parseFloat(l):l;a[this.fields.id]=d;var h=o.remove(this.fields.id,a);s.push(h[0]),this.removeChildNodes(l)}return s},i.prototype.doGivenAction=function(e,i,s){for(var n=0,r=e.length;n<r;n++){var o=this.getElement(e[parseInt(n.toString(),10)]);if(!(0,t.isNullOrUndefined)(o)){var l=(0,t.select)("."+i,(0,t.select)("."+Di,o));(0,t.isNullOrUndefined)(l)||(s?this.expandAction(o,l,null):this.collapseNode(o,l,null))}}},i.prototype.addGivenNodes=function(e,i,s,n,r){if(0!==e.length){var o=this.getSortedData(e),l=i?parseFloat(i.getAttribute("aria-level"))+1:1;n&&this.updateMapper(l);var a,d,h=B.ListBase.createListItemFromJson(this.createElement,o,this.listBaseOption,l),c=this.getId(i);(0,t.isNullOrUndefined)(i)||(a=(0,t.select)("div."+Pi,i)),1===this.dataType&&a&&a.classList.contains(xi)&&!(0,t.isNullOrUndefined)(this.element.offsetParent)&&!this.element.offsetParent.parentElement.classList.contains("e-filemanager")&&(this.preventExpand=!0),1!==this.dataType&&(this.addChildData(this.treeData,this.fields,c,e,s),this.isFirstRender=!1),d=r||(i?this.expandParent(i):(0,t.select)("."+wi,this.element));var p=(0,t.isNullOrUndefined)(s)?null:d.childNodes[parseInt(s.toString(),10)];if(!this.isFirstRender||1===this.dataType){var u=this.expandArgs;if(p||"None"===this.sortOrder){for(var f=0;f<h.length;f++)d.insertBefore(h[parseInt(f.toString(),10)],p);if(1===this.dataType&&!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(this.element.offsetParent)&&!this.element.offsetParent.parentElement.classList.contains("e-filemanager"))this.preventExpand=!1,(m=(0,t.select)("div."+Pi,i))&&m.classList.contains(xi)&&((0,t.isNullOrUndefined)(u)||"nodeExpanding"!==u.name)&&this.expandAction(i,m,null)}if(!p&&("Ascending"===this.sortOrder||"Descending"===this.sortOrder))if(0===d.childNodes.length){for(f=0;f<h.length;f++)d.insertBefore(h[parseInt(f.toString(),10)],p);var m;if(1===this.dataType&&!(0,t.isNullOrUndefined)(i)&&!(0,t.isNullOrUndefined)(this.element.offsetParent)&&!this.element.offsetParent.parentElement.classList.contains("e-filemanager"))this.preventExpand=!1,(m=(0,t.select)("div."+Pi,i))&&m.classList.contains(xi)&&((0,t.isNullOrUndefined)(u)||"nodeExpanding"!==u.name)&&this.expandAction(i,m,null)}else{var g=d.childNodes;for(f=0;f<h.length;f++)for(var v=0;v<g.length;v++){if("Ascending"===this.sortOrder?g[parseInt(v.toString(),10)].textContent.toUpperCase()>h[parseInt(f.toString(),10)].innerText.toUpperCase():g[parseInt(v.toString(),10)].textContent.toUpperCase()<h[parseInt(f.toString(),10)].innerText.toUpperCase()){d.insertBefore(h[parseInt(f.toString(),10)],g[parseInt(v.toString(),10)]);break}d.insertBefore(h[parseInt(f.toString(),10)],g[g.length])}}}if(1===this.dataType){this.updateField(this.treeData,this.fields,c,"hasChildren",!0);var y=this.getId(p),b=(0,t.isNullOrUndefined)(y)?this.treeData.length:this.getDataPos(this.treeData,this.fields,y);for(v=0;v<e.length;v++){if(!(0,t.isNullOrUndefined)(c)){var C=this.isNumberTypeId?parseFloat(c):c;(0,t.setValue)(this.fields.parentID,C,e[parseInt(v.toString(),10)])}this.treeData.splice(b,0,e[parseInt(v.toString(),10)]),b++}}this.finalizeNode(d)}},i.prototype.updateMapper=function(e){var t=1===e?this.fields:this.getChildFields(this.fields,e-1,1);this.updateListProp(t)},i.prototype.updateListProp=function(e){var t=this.getActualProperties(e);this.listBaseOption.fields=t,this.listBaseOption.fields.url=Object.prototype.hasOwnProperty.call(t,"navigateUrl")?t.navigateUrl:"navigateUrl"},i.prototype.getDataPos=function(e,i,s){for(var n=null,r=0,o=e.length;r<o;r++){var l=(0,t.getValue)(i.id,e[parseInt(r.toString(),10)]);if(e[parseInt(r.toString(),10)]&&l&&l.toString()===s)return r;if("string"!=typeof i.child||(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(r.toString(),10)]))){if(this.fields.dataSource instanceof vi.DataManager&&!(0,t.isNullOrUndefined)((0,t.getValue)("child",e[parseInt(r.toString(),10)]))){var a=(0,t.getValue)("child",e[parseInt(r.toString(),10)]);if(null!==(n=this.getDataPos(a,this.getChildMapper(i),s)))break}}else{var d=(0,t.getValue)(i.child,e[parseInt(r.toString(),10)]);if(null!==(n=this.getDataPos(d,this.getChildMapper(i),s)))break}}return n},i.prototype.addChildData=function(e,i,s,n,r){var o;if((0,t.isNullOrUndefined)(s)){r=(0,t.isNullOrUndefined)(r)?e.length:r;for(var l=0,a=n.length;l<a;l++)e.splice(r,0,n[parseInt(l.toString(),10)]),r++;return o}for(var d=0,h=e.length;d<h;d++){var c=(0,t.getValue)(i.id,e[parseInt(d.toString(),10)]);if(e[parseInt(d.toString(),10)]&&c&&c.toString()===s){if("string"==typeof i.child&&Object.prototype.hasOwnProperty.call(e[parseInt(d.toString(),10)],i.child)&&null!==e[parseInt(d.toString(),10)][i.child]||this.fields.dataSource instanceof vi.DataManager&&Object.prototype.hasOwnProperty.call(e[parseInt(d.toString(),10)],"child")){var p="string"==typeof i.child?i.child:"child",u=(0,t.getValue)(p,e[parseInt(d.toString(),10)]);(0,t.isNullOrUndefined)(u)&&(u=[]),r=(0,t.isNullOrUndefined)(r)?u.length:r;for(l=0,a=n.length;l<a;l++)u.splice(r,0,n[parseInt(l.toString(),10)]),r++}else{p="string"==typeof i.child?i.child:"child";e[parseInt(d.toString(),10)][""+p]=n}return!0}if("string"!=typeof i.child||(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(d.toString(),10)]))){if(this.fields.dataSource instanceof vi.DataManager&&!(0,t.isNullOrUndefined)((0,t.getValue)("child",e[parseInt(d.toString(),10)]))){u=(0,t.getValue)("child",e[parseInt(d.toString(),10)]);if(void 0!==(o=this.addChildData(u,this.getChildMapper(i),s,n,r)))break}}else{var f=(0,t.getValue)(i.child,e[parseInt(d.toString(),10)]);if(void 0!==(o=this.addChildData(f,this.getChildMapper(i),s,n,r)))break}}return o},i.prototype.doDisableAction=function(e){var i=this.nodeType(e),s=this.checkValidId(i);this.validArr=[];for(var n=0,r=s.length;n<r;n++){var o=s[parseInt(n.toString(),10)][this.fields.id].toString();o&&-1===this.disableNode.indexOf(o)&&this.disableNode.push(o);var l=this.getElement(o);l&&(l.setAttribute("aria-disabled","true"),(0,t.addClass)([l],Ji))}},i.prototype.doEnableAction=function(e){for(var i=this.nodeType(e),s=0,n=i.length;s<n;s++){var r=this.getElement(i[parseInt(s.toString(),10)]),o=i[parseInt(s.toString(),10)];o&&-1!==this.disableNode.indexOf(o)&&this.disableNode.splice(this.disableNode.indexOf(o),1),r&&(r.removeAttribute("aria-disabled"),(0,t.removeClass)([r],Ji))}},i.prototype.nodeType=function(e){for(var t=[],i=0,s=e.length;i<s;i++){var n=void 0;"string"==typeof e[parseInt(i.toString(),10)]?n=e[parseInt(i.toString(),10)]?e[parseInt(i.toString(),10)].toString():null:"object"==typeof e[parseInt(i.toString(),10)]&&(n=e[parseInt(i.toString(),10)]?e[parseInt(i.toString(),10)].getAttribute("data-uid").toString():null),-1===t.indexOf(n)&&t.push(n)}return t},i.prototype.checkValidId=function(e){var i=this;if(1===this.dataType)this.validArr=this.treeData.filter((function(t){return-1!==e.indexOf(t[i.fields.id]?t[i.fields.id].toString():null)}));else if(2===this.dataType)for(var s=0;s<this.treeData.length;s++){var n=this.treeData[parseInt(s.toString(),10)][this.fields.id]?this.treeData[parseInt(s.toString(),10)][this.fields.id].toString():null;-1!==e.indexOf(n)&&this.validArr.push(this.treeData[parseInt(s.toString(),10)]);var r=(0,t.getValue)(this.fields.child.toString(),this.treeData[parseInt(s.toString(),10)]);r&&this.filterNestedChild(r,e)}return this.validArr},i.prototype.filterNestedChild=function(e,i){for(var s=0;s<e.length;s++){var n=e[parseInt(s.toString(),10)][this.fields.id]?e[parseInt(s.toString(),10)][this.fields.id].toString():null;-1!==i.indexOf(n)&&this.validArr.push(e[parseInt(s.toString(),10)]);var r=(0,t.getValue)(this.fields.child.toString(),e[parseInt(s.toString(),10)]);r&&this.filterNestedChild(r,i)}},i.prototype.setTouchClass=function(){var e=(0,t.closest)(this.element,".e-bigger");this.touchClass=(0,t.isNullOrUndefined)(e)?"":"e-small"},i.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[parseInt(t.toString(),10)],"selected",!0);for(var s=this.expandedNodes,n=0,r=s.length;n<r;n++)this.updateField(this.treeData,this.fields,s[parseInt(n.toString(),10)],"expanded",!0);if(this.showCheckBox){this.removeField(this.treeData,this.fields,["isChecked"]);var o=this.checkedNodes,l=0;for(r=o.length;l<r;l++)this.updateField(this.treeData,this.fields,o[parseInt(l.toString(),10)],"isChecked",!0)}},i.prototype.removeField=function(e,i,s){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(i))for(var n=0,r=e.length;n<r;n++){for(var o=0;o<s.length;o++){var l=this.getMapperProp(i,s[parseInt(o.toString(),10)]);(0,t.isNullOrUndefined)(e[parseInt(n.toString(),10)][""+l])||delete e[parseInt(n.toString(),10)][""+l]}"string"!=typeof i.child||(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(n.toString(),10)]))?this.fields.dataSource instanceof vi.DataManager&&!(0,t.isNullOrUndefined)((0,t.getValue)("child",e[parseInt(n.toString(),10)]))&&this.removeField((0,t.getValue)("child",e[parseInt(n.toString(),10)]),this.getChildMapper(i),s):this.removeField((0,t.getValue)(i.child,e[parseInt(n.toString(),10)]),this.getChildMapper(i),s)}},i.prototype.getMapperProp=function(e,i){switch(i){case"selected":return(0,t.isNullOrUndefined)(e.selected)?"selected":e.selected;case"expanded":return(0,t.isNullOrUndefined)(e.expanded)?"expanded":e.expanded;case"isChecked":return(0,t.isNullOrUndefined)(e.isChecked)?"isChecked":e.isChecked;case"hasChildren":return(0,t.isNullOrUndefined)(e.hasChildren)?"hasChildren":e.hasChildren;default:return i}},i.prototype.updateField=function(e,i,s,n,r){if(!(0,t.isNullOrUndefined)(s))if(1===this.dataType){var o=this.isNumberTypeId?parseFloat(s):s,l=new vi.DataManager(this.treeData).executeLocal((new vi.Query).where(i.id,"equal",o,!1));(0,t.setValue)(this.getMapperProp(i,n),r,l[0])}else this.updateChildField(e,i,s,n,r)},i.prototype.updateChildField=function(e,i,s,n,r,o){var l;if((0,t.isNullOrUndefined)(e))return l;for(var a=0,d=e.length;a<d;a++){var h=(0,t.getValue)(i.id,e[parseInt(a.toString(),10)]);if(e[parseInt(a.toString(),10)]&&h&&h.toString()===s)return o?l=e.splice(a,1):((0,t.setValue)(this.getMapperProp(i,n),r,e[parseInt(a.toString(),10)]),l=[]),l;if("string"!=typeof i.child||(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(a.toString(),10)]))){if(this.fields.dataSource instanceof vi.DataManager&&!(0,t.isNullOrUndefined)((0,t.getValue)("child",e[parseInt(a.toString(),10)]))){var c=(0,t.getValue)("child",e[parseInt(a.toString(),10)]);if(void 0!==(l=this.updateChildField(c,this.getChildMapper(i),s,n,r,o)))break}}else{var p=(0,t.getValue)(i.child,e[parseInt(a.toString(),10)]);if(void 0!==(l=this.updateChildField(p,this.getChildMapper(i),s,n,r,o)))break}}return l},i.prototype.triggerEvent=function(e,i){if(this.renderReactTemplates(),"addNodes"===e){for(var s=[],n=0;n<i.length;n++)s.push(this.getNode(this.getElement((0,t.isNullOrUndefined)(i[parseInt(n.toString(),10)][this.fields.id])?(0,t.getValue)(this.fields.id,i[parseInt(n.toString(),10)]).toString():null)));i=s}var r={data:this.treeData,action:e,nodeData:i};this.trigger("dataSourceChanged",r)},i.prototype.wireInputEvents=function(e){t.EventHandler.add(e,"blur",this.inputFocusOut,this)},i.prototype.wireEditingEvents=function(e){var i=this;e&&!this.disabled?this.touchEditObj=new t.Touch(this.element,{tap:function(e){i.isDoubleTapped(e)&&2===e.tapCount&&(e.originalEvent.preventDefault(),i.editingHandler(e.originalEvent))}}):this.touchEditObj&&this.touchEditObj.destroy()},i.prototype.wireClickEvent=function(e){var i=this;e?this.touchClickObj=new t.Touch(this.element,{tap:function(e){i.clickHandler(e)}}):this.touchClickObj&&this.touchClickObj.destroy()},i.prototype.wireExpandOnEvent=function(e){var i=this;e?this.touchExpandObj=new t.Touch(this.element,{tap:function(e){("Click"===i.expandOnType||"DblClick"===i.expandOnType&&i.isDoubleTapped(e)&&2===e.tapCount)&&3!==e.originalEvent.which&&i.expandHandler(e)}}):this.touchExpandObj&&this.touchExpandObj.destroy()},i.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)},i.prototype.preventContextMenu=function(e){e.preventDefault()},i.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,"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"})},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"mousedown",this.mouseDownHandler),this.wireClickEvent(!1),this.wireExpandOnEvent(!1),t.EventHandler.remove(this.element,"mouseover",this.onMouseOver),t.EventHandler.remove(this.element,"mouseout",this.onMouseLeave),this.disabled||this.keyboardModule.destroy()},i.prototype.parents=function(e,i){for(var s=[],n=e.parentNode;!(0,t.isNullOrUndefined)(n);)(0,t.matches)(n,i)&&s.push(n),n=n.parentNode;return s},i.prototype.isDoubleTapped=function(e){var i,s=e.originalEvent.target;return s&&e.tapCount&&(1===e.tapCount?this.firstTap=(0,t.closest)(s,"."+Ni):2===e.tapCount&&(i=(0,t.closest)(s,"."+Ni))),this.firstTap===i},i.prototype.isDescendant=function(e,i){for(var s=i.parentNode;!(0,t.isNullOrUndefined)(s);){if(s===e)return!0;s=s.parentNode}return!1},i.prototype.showSpinner=function(e){(0,t.addClass)([e],Ai),(0,j.createSpinner)({target:e,width:t.Browser.isDevice?16:14},this.createElement),(0,j.showSpinner)(e)},i.prototype.hideSpinner=function(e){(0,j.hideSpinner)(e),e.innerHTML="",(0,t.removeClass)([e],Ai)},i.prototype.setCheckedNodes=function(e){e=JSON.parse(JSON.stringify(e)),this.uncheckAll(this.checkedNodes),this.setIndeterminate(e),e.length>0&&this.checkAll(e)},i.prototype.setValidCheckedNode=function(e){if(1===this.dataType){var i=this.fields,s=new vi.DataManager(this.treeData).executeLocal((new vi.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,r=this.getChildNodes(this.treeData,n),o=0,l=0;l<r.length;l++){var a=r[parseInt(l.toString(),10)][this.fields.id].toString();-1!==this.checkedNodes.indexOf(a)&&o++}o===r.length&&-1===this.checkedNodes.indexOf(n)&&n&&this.checkedNodes.push(n)}}else if(2===this.dataType)for(var d=0;d<this.treeData.length;d++){if((this.treeData[parseInt(d.toString(),10)][this.fields.id]?this.treeData[parseInt(d.toString(),10)][this.fields.id].toString():"")===e&&-1===this.checkedNodes.indexOf(e)){this.checkedNodes.push(e);break}var h=(0,t.getValue)(this.fields.child.toString(),this.treeData[parseInt(d.toString(),10)]);h&&this.setChildCheckState(h,e,this.treeData[parseInt(d.toString(),10)])}},i.prototype.setChildCheckState=function(e,i,s){var n,r=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 l=e[parseInt(o.toString(),10)][this.fields.id]?e[parseInt(o.toString(),10)][this.fields.id].toString():null;s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(l)&&this.checkedNodes.push(l),l===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i),(a=this.getChildNodes(this.treeData,l))&&this.setChildCheckState(a,i,s)}}else{s&&(n=s[this.fields.id]?s[this.fields.id].toString():"");for(o=0;o<e.length;o++){var a,d=e[parseInt(o.toString(),10)][this.fields.id]?e[parseInt(o.toString(),10)][this.fields.id].toString():"";s&&n&&this.autoCheck&&-1!==this.checkedNodes.indexOf(n)&&-1===this.checkedNodes.indexOf(d)&&this.checkedNodes.push(d),d===i&&-1===this.checkedNodes.indexOf(i)&&this.checkedNodes.push(i),(a=(0,t.getValue)(this.fields.child.toString(),e[parseInt(o.toString(),10)]))&&this.setChildCheckState(a,i,e[parseInt(o.toString(),10)]),-1!==this.checkedNodes.indexOf(d)&&this.autoCheck&&r++,r===e.length&&-1===this.checkedNodes.indexOf(n)&&this.autoCheck&&this.checkedNodes.push(n)}}},i.prototype.setIndeterminate=function(e){for(var t=0;t<e.length;t++)this.setValidCheckedNode(e[parseInt(t.toString(),10)])},i.prototype.updatePosition=function(e,t,i,s){if(1===this.dataType){var n=this.getDataPos(this.treeData,this.fields,e);if(this.treeData.splice(n,1,t),i){this.removeChildNodes(e);for(var r=0;r<s.length;r++)this.treeData.splice(n,0,s[parseInt(r.toString(),10)]),n++}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}else this.updateChildPosition(this.treeData,this.fields,e,[t],void 0)},i.prototype.updateChildPosition=function(e,i,s,n,r){for(var o,l=0,a=e.length;l<a;l++){var d=(0,t.getValue)(i.id,e[parseInt(l.toString(),10)]);if(e[parseInt(l.toString(),10)]&&d&&d.toString()===s)return e[parseInt(l.toString(),10)]=n[0],!0;if("string"!=typeof i.child||(0,t.isNullOrUndefined)((0,t.getValue)(i.child,e[parseInt(l.toString(),10)]))){if(this.fields.dataSource instanceof vi.DataManager&&!(0,t.isNullOrUndefined)((0,t.getValue)("child",e[parseInt(l.toString(),10)]))){var h=(0,t.getValue)("child",e[parseInt(l.toString(),10)]);if(void 0!==(o=this.updateChildPosition(h,this.getChildMapper(i),s,n,r)))break}}else{var c=(0,t.getValue)(i.child,e[parseInt(l.toString(),10)]);if(void 0!==(o=this.updateChildPosition(c,this.getChildMapper(i),s,n,r)))break}}return o},i.prototype.dynamicState=function(){this.setDragAndDrop(this.allowDragAndDrop),this.wireEditingEvents(this.allowEditing),this.disabled?(this.unWireEvents(),this.rippleFn(),this.rippleIconFn()):(this.wireEvents(),this.setRipple())},i.prototype.crudOperation=function(e,i,s,n,r,o,l){var a,d=this,h=this.fields.dataSource,c=[],p=this.getQuery(this.fields),u=this.fields.id,f={addedRecords:[],deletedRecords:[],changedRecords:[]},m=[];i?m=this.nodeType(i):s&&("string"==typeof s?m[0]=s.toString():"object"==typeof s&&(m[0]=s.getAttribute("data-uid").toString()));for(var g=0,v=m.length;g<v;g++){var y=this.getElement(m[parseInt(g.toString(),10)]);if(!(0,t.isNullOrUndefined)(y)){var b=this.getNodeObject(m[parseInt(g.toString(),10)]);c.push(b)}}switch(e){case"delete":1===i.length?a=h.remove(u,c[0],p.fromTable,p):(f.deletedRecords=c,a=h.saveChanges(f,u,p.fromTable,p)),a.then((function(){return d.deleteSuccess(m)})).catch((function(e){return d.dmFailure(e)}));break;case"update":c[0][this.fields.text]=n,(a=h.update(u,c[0],p.fromTable,p)).then((function(){return d.editSucess(s,n,l)})).catch((function(e){return d.dmFailure(e,s,l)}));break;case"insert":if(1===r.length)a=h.insert(r[0],p.fromTable,p);else{var C=[];for(g=0,v=r.length;g<v;g++)C.push(r[parseInt(g.toString(),10)]);f.addedRecords=C,a=h.saveChanges(f,u,p.fromTable,p)}a.then((function(){var e=d.getElement(s);d.addSuccess(r,e,o),d.preventExpand=!1})).catch((function(e){return d.dmFailure(e)}))}},i.prototype.deleteSuccess=function(e){for(var i=[],s=0,n=e.length;s<n;s++){var r=this.getElement(e[parseInt(s.toString(),10)]);i.push(this.getNode(r)),(0,t.isNullOrUndefined)(r)||this.removeNode(r)}this.updateInstance(),1===this.dataType&&(this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)),this.triggerEvent("removeNode",i)},i.prototype.editSucess=function(e,i,s){var n=this.getElement(e),r=(0,t.select)("."+Oi,n);this.appendNewText(n,r,i,s)},i.prototype.addSuccess=function(e,t,i){var s,n=this,r=t?t.querySelector("."+Pi):null;t&&r&&r.classList.contains(xi)&&null===t.querySelector("."+wi)?this.renderChildNodes(t,null,(function(){s=t.querySelector("."+wi),n.addGivenNodes(e,t,i,!0,s),n.triggerEvent("addNodes",e)})):(this.addGivenNodes(e,t,i,!0),this.triggerEvent("addNodes",e))},i.prototype.dmFailure=function(e,t,i){t&&this.updatePreviousText(t,i),this.trigger("actionFailure",{error:e})},i.prototype.updatePreviousText=function(e,i){var s=this.getElement(e),n=(0,t.select)("."+Oi,s);this.updateText(s,n,this.oldText,i)},i.prototype.getHierarchicalParentId=function(e,i,s){var n=this,r=i.findIndex((function(t){return t[n.fields.id]&&t[n.fields.id].toString()===e}));if(-1===r)for(var o=0;o<i.length;o++){var l=(0,t.getValue)(this.fields.child.toString(),i[parseInt(o.toString(),10)]);if(!(0,t.isNullOrUndefined)(l)){if(r=l.findIndex((function(t){return t[n.fields.id]&&t[n.fields.id].toString()===e})),-1!==r){s.push(i[parseInt(o.toString(),10)][this.fields.id].toString()),this.getHierarchicalParentId(i[parseInt(o.toString(),10)][this.fields.id].toString(),this.treeData,s);break}this.getHierarchicalParentId(e,l,s)}}return s},i.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"dragArea":this.allowDragAndDrop&&(this.dragObj.dragArea=this.dragArea);break;case"allowEditing":this.wireEditingEvents(this.allowEditing);break;case"allowMultiSelection":if(this.selectedNodes.length>1){var r=this.getElement(this.selectedNodes[0]);this.isLoaded=!1,this.removeSelectAll(),this.selectNode(r,null),this.isLoaded=!0}this.setMultiSelect(this.allowMultiSelection),this.addMultiSelect(this.allowMultiSelection);break;case"allowTextWrap":this.setTextWrap(),this.updateWrap();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:(0,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.disabled||this.wireExpandOnEvent(!0);break;case"disabled":this.setDisabledMode(),this.dynamicState();break;case"fields":this.isAnimate=!1,this.isFieldChange=!0,this.initialRender=!0,this.isReact&&(!this.isReact||this.fields.dataSource instanceof vi.DataManager)||this.reRenderNodes(),this.initialRender=!1,this.isAnimate=!0,this.isFieldChange=!1;break;case"fullRowSelect":this.setFullRow(this.fullRowSelect),this.addFullRow(this.fullRowSelect),this.allowTextWrap&&(this.setTextWrap(),this.updateWrap());break;case"loadOnDemand":if(!1===this.loadOnDemand&&!this.onLoaded){for(var o=this.element.querySelectorAll("li"),l=0;l<o.length;)"true"!==o[parseInt(l.toString(),10)].getAttribute("aria-expanded")&&this.renderChildNodes(o[parseInt(l.toString(),10)],!0,null,!0),l++;this.onLoaded=!0}break;case"nodeTemplate":this.hasTemplate=!1,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();break;case"fullRowNavigable":this.setProperties({fullRowNavigable:e.fullRowNavigable},!0),this.listBaseOption.itemNavigable=e.fullRowNavigable,this.reRenderNodes()}}},i.prototype.destroy=function(){this.clearTemplate(),this.element.removeAttribute("aria-activedescendant"),this.unWireEvents(),this.wireEditingEvents(!1),this.disabled||(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),this.ulElement=null,this.liList=null,this.startNode=null,this.firstTap=null,this.expandArgs=null,this.dragLi=null,this.dragTarget=null,this.dragParent=null,this.dragObj=null,this.dropObj=null,this.inputObj=null,this.touchEditObj=null,this.touchExpandObj=null,this.touchClickObj=null,e.prototype.destroy.call(this)},i.prototype.addNodes=function(e,i,s,n){if(!(0,t.isNullOrUndefined)(e)){e=JSON.parse(JSON.stringify(e));var r=this.getElement(i);if(this.preventExpand=n,this.fields.dataSource instanceof vi.DataManager)this.isOffline?this.addSuccess(e,r,s):this.crudOperation("insert",null,i,null,e,s,this.preventExpand);else if(2===this.dataType)this.addGivenNodes(e,r,s);else{if(r)this.addGivenNodes(e,r,s);else{e=this.getSortedData(e);for(var o=0;o<e.length;o++){var l=(0,t.getValue)(this.fields.parentID,e[parseInt(o.toString(),10)]);r=l?this.getElement(l.toString()):l,this.addGivenNodes([e[parseInt(o.toString(),10)]],r,s)}}this.groupedData=this.getGroupedData(this.treeData,this.fields.parentID)}this.updateCheckedStateFromDS(),this.showCheckBox&&r&&this.ensureParentCheckState(r),this.fields.dataSource instanceof vi.DataManager==!1&&(this.preventExpand=!1,this.triggerEvent("addNodes",e))}},i.prototype.beginEdit=function(e){var i=this.getElement(e);(0,t.isNullOrUndefined)(i)||this.disabled||this.createTextbox(i)},i.prototype.checkAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!0)},i.prototype.collapseAll=function(e,i,s){(0,t.isNullOrUndefined)(e)?i>0?this.collapseByLevel((0,t.select)("."+wi,this.element),i,s):this.collapseAllNodes(s):this.doGivenAction(e,Ei,!1)},i.prototype.disableNodes=function(e){(0,t.isNullOrUndefined)(e)||this.doDisableAction(e)},i.prototype.enableNodes=function(e){(0,t.isNullOrUndefined)(e)||this.doEnableAction(e)},i.prototype.ensureVisible=function(e){var i=[];if(1===this.dataType)for(var s=this.getTreeData(e);0!==s.length&&!(0,t.isNullOrUndefined)(s[0][this.fields.parentID]);)i.push(s[0][this.fields.parentID].toString()),s=this.getTreeData(s[0][this.fields.parentID].toString());else 2===this.dataType&&(i=this.getHierarchicalParentId(e,this.treeData,i));this.expandAll(i.reverse());var n=this.getElement(e);if(!(0,t.isNullOrUndefined)(n)){if("object"==typeof e){var r=this.parents(n,"."+Ni);this.expandAll(r)}setTimeout((function(){n.scrollIntoView({behavior:"smooth"})}),450)}},i.prototype.expandAll=function(e,i,s){(0,t.isNullOrUndefined)(e)?i>0?this.expandByLevel((0,t.select)("."+wi,this.element),i,s):this.expandAllNodes(s):this.doGivenAction(e,xi,!0)},i.prototype.getAllCheckedNodes=function(){return this.checkedNodes},i.prototype.getDisabledNodes=function(){return this.disableNode},i.prototype.getNode=function(e){var t=this.getElement(e);return this.getNodeData(t,!0)},i.prototype.getTreeData=function(e){var i=this.getId(e);if(this.updatePersistProp(),(0,t.isNullOrUndefined)(i))return this.treeData;var s=this.getNodeObject(i);return(0,t.isNullOrUndefined)(s)?[]:[s]},i.prototype.moveNodes=function(e,i,s,n){var r=this.getElement(i),o=[];if(!(0,t.isNullOrUndefined)(r)){for(var l=0;l<e.length;l++){var a=this.getElement(e[parseInt(l.toString(),10)]);o.push(this.getNode(a)),(0,t.isNullOrUndefined)(a)||r.isSameNode(a)||this.isDescendant(a,r)||(this.preventExpand=n,this.dropAsChildNode(a,r,this,s,null,null,null,r))}this.fields.dataSource instanceof vi.DataManager==!1&&(this.preventExpand=!1),this.triggerEvent("moveNodes",o)}},i.prototype.refreshNode=function(e,i){if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(i)){var s=!1;if(1===this.dataType&&i.length>1)s=!0;else if(2===this.dataType&&1===i.length){var n=(0,t.getValue)(this.fields.child.toString(),i[0]);(0,t.isNullOrUndefined)(n)||(s=!0)}var r,o,l=this.getElement(e),a=l?l.getAttribute("data-uid"):e?e.toString():null;if(this.refreshData=this.getNodeObject(a),i=JSON.parse(JSON.stringify(i)),1===this.dataType&&s){for(var d=0;d<i.length;d++)if((0,t.isNullOrUndefined)(i[parseInt(d.toString(),10)][this.fields.parentID])){o=i[parseInt(d.toString(),10)],i.splice(d,1);break}r=(0,t.extend)({},this.refreshData,o)}else r=(0,t.extend)({},this.refreshData,i[0]);if((0,t.isNullOrUndefined)(l))this.updatePosition(a,r,s,i);else{this.isRefreshed=!0;var h=parseFloat(l.getAttribute("aria-level")),c=B.ListBase.createListItemFromJson(this.createElement,[r],this.listBaseOption,h),p=(0,t.select)("."+wi,l),u=(0,t.getValue)(this.fields.child.toString(),r);if(s&&p||s&&!(0,t.isNullOrUndefined)(u)){var f=l.parentElement,m=Array.prototype.indexOf.call(f.childNodes,l);(0,t.remove)(l),f.insertBefore(c[0],f.childNodes[parseInt(m.toString(),10)]),this.updatePosition(a,r,s,i),s&&p&&this.expandAll([a])}else{var g=(0,t.select)("."+Di,l),v=(0,t.select)("."+Di,c[0]),y=(0,t.select)("div."+Pi,g),b=(0,t.select)("div."+Pi,v);y&&b&&(b.classList.contains(xi)&&y.classList.contains(Ei)?((0,t.removeClass)([b],xi),(0,t.addClass)([b],Ei)):b.classList.contains(Ei)&&y.classList.contains(xi)?((0,t.removeClass)([b],Ei),(0,t.addClass)([b],xi)):y.classList.contains("interaction")&&(0,t.addClass)([b],"interaction")),(0,t.remove)(g);var C=(0,t.select)("."+Ki,l);C.parentNode.insertBefore(v,C.nextSibling),this.updatePosition(a,r,s,i)}if(l=this.getElement(e),r[this.fields.tooltip]&&l.setAttribute("title",r[this.fields.tooltip]),Object.prototype.hasOwnProperty.call(r,this.fields.htmlAttributes)&&r[this.fields.htmlAttributes]){var S={};(0,t.merge)(S,r[this.fields.htmlAttributes]),S.class?((0,t.addClass)([l],S.class.split(" ")),delete S.class):(0,t.attributes)(l,S)}-1!==this.selectedNodes.indexOf(a)&&(l.setAttribute("aria-selected","true"),(0,t.addClass)([l],ki)),this.isRefreshed=!1,this.triggerEvent("refreshNode",[this.getNode(l)])}}},i.prototype.removeNodes=function(e){(0,t.isNullOrUndefined)(e)||(this.fields.dataSource instanceof vi.DataManager&&!this.isOffline?this.crudOperation("delete",e):this.deleteSuccess(e))},i.prototype.updateNode=function(e,i){var s=this;if(!(0,t.isNullOrUndefined)(e)&&!(0,t.isNullOrUndefined)(i)&&this.allowEditing){var n=this.getElement(e);if(!(0,t.isNullOrUndefined)(n)){var r=(0,t.select)("."+Oi,n);this.updateOldText(n);var o=this.getEditEvent(n,null,null);this.trigger("nodeEditing",o,(function(t){t.cancel||(s.fields.dataSource instanceof vi.DataManager&&!s.isOffline?s.crudOperation("update",null,e,i,null,null,!1):s.appendNewText(n,r,i,!1))}))}}},i.prototype.uncheckAll=function(e){this.showCheckBox&&this.doCheckBoxAction(e,!1)},Ci([(0,t.Property)(!1)],i.prototype,"allowDragAndDrop",void 0),Ci([(0,t.Property)(!1)],i.prototype,"allowEditing",void 0),Ci([(0,t.Property)(!1)],i.prototype,"allowMultiSelection",void 0),Ci([(0,t.Property)(!1)],i.prototype,"allowTextWrap",void 0),Ci([(0,t.Complex)({},cs)],i.prototype,"animation",void 0),Ci([(0,t.Property)()],i.prototype,"checkedNodes",void 0),Ci([(0,t.Property)("")],i.prototype,"cssClass",void 0),Ci([(0,t.Property)(!1)],i.prototype,"disabled",void 0),Ci([(0,t.Property)(null)],i.prototype,"dragArea",void 0),Ci([(0,t.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),Ci([(0,t.Property)(!1)],i.prototype,"enablePersistence",void 0),Ci([(0,t.Property)()],i.prototype,"expandedNodes",void 0),Ci([(0,t.Property)("Auto")],i.prototype,"expandOn",void 0),Ci([(0,t.Complex)({},ds)],i.prototype,"fields",void 0),Ci([(0,t.Property)(!0)],i.prototype,"fullRowSelect",void 0),Ci([(0,t.Property)(!0)],i.prototype,"loadOnDemand",void 0),Ci([(0,t.Property)()],i.prototype,"locale",void 0),Ci([(0,t.Property)()],i.prototype,"nodeTemplate",void 0),Ci([(0,t.Property)()],i.prototype,"selectedNodes",void 0),Ci([(0,t.Property)("None")],i.prototype,"sortOrder",void 0),Ci([(0,t.Property)(!1)],i.prototype,"showCheckBox",void 0),Ci([(0,t.Property)(!0)],i.prototype,"autoCheck",void 0),Ci([(0,t.Property)(!1)],i.prototype,"fullRowNavigable",void 0),Ci([(0,t.Event)()],i.prototype,"actionFailure",void 0),Ci([(0,t.Event)()],i.prototype,"created",void 0),Ci([(0,t.Event)()],i.prototype,"dataBound",void 0),Ci([(0,t.Event)()],i.prototype,"dataSourceChanged",void 0),Ci([(0,t.Event)()],i.prototype,"drawNode",void 0),Ci([(0,t.Event)()],i.prototype,"destroyed",void 0),Ci([(0,t.Event)()],i.prototype,"keyPress",void 0),Ci([(0,t.Event)()],i.prototype,"nodeChecked",void 0),Ci([(0,t.Event)()],i.prototype,"nodeChecking",void 0),Ci([(0,t.Event)()],i.prototype,"nodeClicked",void 0),Ci([(0,t.Event)()],i.prototype,"nodeCollapsed",void 0),Ci([(0,t.Event)()],i.prototype,"nodeCollapsing",void 0),Ci([(0,t.Event)()],i.prototype,"nodeDragging",void 0),Ci([(0,t.Event)()],i.prototype,"nodeDragStart",void 0),Ci([(0,t.Event)()],i.prototype,"nodeDragStop",void 0),Ci([(0,t.Event)()],i.prototype,"nodeDropped",void 0),Ci([(0,t.Event)()],i.prototype,"nodeEdited",void 0),Ci([(0,t.Event)()],i.prototype,"nodeEditing",void 0),Ci([(0,t.Event)()],i.prototype,"nodeExpanded",void 0),Ci([(0,t.Event)()],i.prototype,"nodeExpanding",void 0),Ci([(0,t.Event)()],i.prototype,"nodeSelected",void 0),Ci([(0,t.Event)()],i.prototype,"nodeSelecting",void 0),i=s=Ci([t.NotifyPropertyChanges],i)}(t.Component),us=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])},e(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)}}(),fs=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},ms="e-sidebar",gs="e-close",vs="e-open",ys="e-transition",bs="e-sidebar-overlay",Cs="e-right",Ss="e-left",Is="e-over",Es="e-push",xs="e-slide",Ns="e-visibility",Os="e-disable-animation",ws="e-sidebar-context",Ls="e-sidebar-absolute",ks=function(e){function i(t,i){return e.call(this,t,i)||this}return us(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.firstRender=!0):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:t.removeClass)([this.element],"e-rtl")},i.prototype.setTarget=function(){this.targetEle=this.element.nextElementSibling,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]),(0,t.addClass)([this.element],Ls),(0,t.addClass)([this.target],ws),this.targetEle=this.getTargetElement())},i.prototype.getTargetElement=function(){for(var e=this.element.nextElementSibling;!(0,t.isNullOrUndefined)(e)&&e.classList.contains(ms);)e=e.nextElementSibling;return e},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||this.enableDock&&"Right"===this.position?(0,t.setStyleAttribute)(this.element,{width:this.setDimension(this.dockSize)}):this.enableDock||(0,t.setStyleAttribute)(this.element,{width:this.setDimension(this.width)})},i.prototype.setDimension=function(e){return e="number"==typeof e?(0,t.formatUnit)(e):"string"==typeof e?e.match(/px|%|em/)?e:(0,t.formatUnit)(e):"100%"},i.prototype.setZindex=function(){(0,t.setStyleAttribute)(this.element,{"z-index":""+this.zIndex})},i.prototype.addClass=function(){"EJS-SIDEBAR"===this.element.tagName&&(0,t.addClass)([this.element],"e-sidebar-display");var e=document.querySelector(".e-main-content");(0,t.isNullOrUndefined)(e||this.targetEle)||(0,t.addClass)([e||this.targetEle],["e-content-animation"]),this.tabIndex=this.element.hasAttribute("tabindex")?this.element.getAttribute("tabindex"):null,this.enableDock||"Auto"===this.type||(0,t.addClass)([this.element],[Ns]),(0,t.removeClass)([this.element],[vs,gs,Cs,Ss,xs,Es,Is]),this.element.classList.add(ms),(0,t.addClass)([this.element],"Right"===this.position?Cs:Ss),this.enableDock&&(0,t.addClass)([this.element],"e-dock"),(0,t.isNullOrUndefined)(this.tabIndex)||this.element.setAttribute("tabindex",this.tabIndex),"Auto"!==this.type||t.Browser.isDevice?this.isOpen||(0,t.addClass)([this.element],[gs,Os]):this.show()},i.prototype.checkType=function(e){"Push"!==this.type&&"Over"!==this.type&&"Slide"!==this.type?this.type="Auto":this.element.classList.contains(gs)||e||this.hide()},i.prototype.transitionEnd=function(e){this.setDock(),(0,t.isNullOrUndefined)(e)||this.firstRender||this.triggerChange(),this.firstRender=!1,t.EventHandler.remove(this.element,"transitionend",this.transitionEnd)},i.prototype.destroyBackDrop=function(){var e=document.querySelector(".e-main-content")||this.targetEle;this.target&&this.showBackdrop&&e&&!(0,t.isNullOrUndefined)(this.defaultBackdropDiv)?(0,t.removeClass)([this.defaultBackdropDiv],bs):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:!(0,t.isNullOrUndefined)(e),event:e||null};this.trigger("close",s,(function(e){if(!e.cancel){if(i.element.classList.contains(gs))return;i.element.classList.contains(vs)&&!i.animate&&i.triggerChange(),(0,t.addClass)([i.element],gs),(0,t.removeClass)([i.element],vs),(0,t.setStyleAttribute)(i.element,{width:(0,t.formatUnit)(i.enableDock?i.dockSize:i.width)}),i.setType(i.type);var s=document.querySelector(".e-main-content")||i.targetEle;!i.enableDock&&s&&(s.style.transform="translateX(0px)",s.style["Left"===i.position?"marginLeft":"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.targetEle,t=this.element.getBoundingClientRect().width;!this.element.classList.contains(vs)||!e||"Over"===this.type&&this.enableDock?this.element.classList.contains(gs)&&e&&("Left"===this.position?e.style.marginLeft=this.setDimension("auto"===this.dockSize?t:this.dockSize):e.style.marginRight=this.setDimension("auto"===this.dockSize?t:this.dockSize)):"Left"===this.position?e.style.marginLeft=this.setDimension("auto"===this.width?t:this.width):e.style.marginRight=this.setDimension("auto"===this.width?t:this.width)},i.prototype.show=function(e){var i=this,s={model:this,element:this.element,cancel:!1,isInteracted:!(0,t.isNullOrUndefined)(e),event:e||null};this.trigger("open",s,(function(e){if(!e.cancel){if((0,t.removeClass)([i.element],[Ns,Os]),i.element.classList.contains(vs))return;i.element.classList.contains(gs)&&!i.animate&&i.triggerChange(),(0,t.addClass)([i.element],[vs,ys]),(0,t.setStyleAttribute)(i.element,{transform:""}),(0,t.removeClass)([i.element],gs),(0,t.setStyleAttribute)(i.element,{width:(0,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?(0,t.removeClass)([this.element],Os):(0,t.addClass)([this.element],Os)},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()?(0,t.setStyleAttribute)(this.element,{transform:"translateX(-100%) translateX("+this.setDimension(this.dockSize)+")"}):this.enableDock&&"Right"===this.position&&!this.getState()&&(0,t.setStyleAttribute)(this.element,{transform:"translateX(100%) translateX(-"+this.setDimension(this.dockSize)+")"}),this.element.classList.contains(gs)&&this.enableDock&&(0,t.setStyleAttribute)(this.element,{width:this.setDimension(this.dockSize)})},i.prototype.createBackDrop=function(){if(this.target&&this.showBackdrop&&this.getState()){var e=this.target,i=document.querySelector(".e-main-content")||this.targetEle;this.defaultBackdropDiv=this.createElement("div"),(0,t.addClass)([this.defaultBackdropDiv],bs),(0,t.setStyleAttribute)(this.defaultBackdropDiv,{height:e.style.height}),i.appendChild(this.defaultBackdropDiv)}else this.showBackdrop&&!this.modal&&this.getState()&&(this.modal=this.createElement("div"),this.modal.className=bs,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(){this.element.classList.contains(vs)?this.hide():this.show()},i.prototype.getState=function(){return!!this.element.classList.contains(vs)},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(){"Auto"===this.type&&(t.Browser.isDevice?(0,t.addClass)([this.element],Is):(0,t.addClass)([this.element],Es)),this.setMediaQuery(),t.Browser.isDevice&&(this.windowWidth=window.innerWidth)},i.prototype.documentclickHandler=function(e){(0,t.closest)(e.target,".e-control."+ms)||this.hide(e)},i.prototype.enableGestureHandler=function(e){!this.isOpen&&"Left"===this.position&&"Right"===e.swipeDirection&&e.startX<=20&&e.distanceX>=50&&e.velocity>=.5?this.show():this.isOpen&&"Left"===this.position&&"Left"===e.swipeDirection||this.isOpen&&"Right"===this.position&&"Right"===e.swipeDirection?this.hide():!this.isOpen&&"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(),t.EventHandler.add(window,"resize",this.resize,this)},i.prototype.unWireEvents=function(){t.EventHandler.remove(window,"resize",this.resize),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.targetEle,r=this.isServerRendered,o=0,l=Object.keys(i);o<l.length;o++){switch(l[o]){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),(0,t.removeClass)([this.element],[Ns]),this.addClass(),(0,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&&(n.style["Left"===this.position?"marginRight":"marginLeft"]="0px"),"Right"===this.position?((0,t.removeClass)([this.element],Ss),(0,t.addClass)([this.element],Cs)):((0,t.removeClass)([this.element],Cs),(0,t.addClass)([this.element],Ss)),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),(0,t.isNullOrUndefined)(this.target)&&((0,t.removeClass)([this.element],Ls),(0,t.removeClass)([s.target],ws),(0,t.setStyleAttribute)(n,{"margin-left":0,"margin-right":0}),document.body.insertAdjacentElement("afterbegin",this.element)),this.isServerRendered=!1,e.prototype.refresh.call(this),this.isServerRendered=r;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.targetEle;s&&(s.style.transform="translateX(0px)",t.Browser.isDevice||"Auto"===this.type||"Over"===this.type&&this.enableDock||(s.style["Left"===this.position?"marginLeft":"marginRight"]="0px"));var n=(this.position,i+"px"),r="Left"===this.position?i:-i;switch((0,t.removeClass)([this.element],[Es,Is,xs]),e){case"Push":(0,t.addClass)([this.element],[Es]),s&&(this.enableDock||this.element.classList.contains(vs))&&(s.style["Left"===this.position?"marginLeft":"marginRight"]=n);break;case"Slide":(0,t.addClass)([this.element],[xs]),s&&(this.enableDock||this.element.classList.contains(vs))&&(s.style.transform="translateX("+r+"px)");break;case"Over":(0,t.addClass)([this.element],[Is]),this.enableDock&&(this.element.classList.contains(gs)||this.isOpen)&&s&&(s.style["Left"===this.position?"marginLeft":"marginRight"]=this.setDimension(this.dockSize));break;case"Auto":(0,t.addClass)([this.element],[ys]),t.Browser.isDevice?s&&this.enableDock&&!this.getState()?(s.style["Left"===this.position?"marginLeft":"marginRight"]=n,(0,t.addClass)([this.element],Es)):(0,t.addClass)([this.element],Is):((0,t.addClass)([this.element],Es),s&&(this.enableDock||this.element.classList.contains(vs))&&(s.style["Left"===this.position?"marginLeft":"marginRight"]=n)),this.createBackDrop()}},i.prototype.destroy=function(){e.prototype.destroy.call(this),this.target&&(0,t.removeClass)([this.target],ws),this.destroyBackDrop(),this.element&&((0,t.removeClass)([this.element],[vs,gs,Es,xs,Is,Ss,Cs,ys,Os]),(0,t.removeClass)([this.element],Ls),this.element.style.width="",this.element.style.zIndex="",this.element.style.transform="",(0,t.isNullOrUndefined)(this.sidebarEleCopy.getAttribute("tabindex"))?this.element.removeAttribute("tabindex"):this.element.setAttribute("tabindex",this.tabIndex)),this.windowWidth=null;var i=document.querySelector(".e-main-content")||this.targetEle;(0,t.isNullOrUndefined)(i)||(i.style.margin="",i.style.transform=""),this.unWireEvents()},fs([(0,t.Property)("auto")],i.prototype,"dockSize",void 0),fs([(0,t.Property)(null)],i.prototype,"mediaQuery",void 0),fs([(0,t.Property)(!1)],i.prototype,"enableDock",void 0),fs([(0,t.Property)("en-US")],i.prototype,"locale",void 0),fs([(0,t.Property)(!1)],i.prototype,"enablePersistence",void 0),fs([(0,t.Property)(!0)],i.prototype,"enableGestures",void 0),fs([(0,t.Property)(!1)],i.prototype,"isOpen",void 0),fs([(0,t.Property)(!1)],i.prototype,"enableRtl",void 0),fs([(0,t.Property)(!0)],i.prototype,"animate",void 0),fs([(0,t.Property)("auto")],i.prototype,"height",void 0),fs([(0,t.Property)(!1)],i.prototype,"closeOnDocumentClick",void 0),fs([(0,t.Property)("Left")],i.prototype,"position",void 0),fs([(0,t.Property)(null)],i.prototype,"target",void 0),fs([(0,t.Property)(!1)],i.prototype,"showBackdrop",void 0),fs([(0,t.Property)("Auto")],i.prototype,"type",void 0),fs([(0,t.Property)("auto")],i.prototype,"width",void 0),fs([(0,t.Property)(1e3)],i.prototype,"zIndex",void 0),fs([(0,t.Event)()],i.prototype,"created",void 0),fs([(0,t.Event)()],i.prototype,"close",void 0),fs([(0,t.Event)()],i.prototype,"open",void 0),fs([(0,t.Event)()],i.prototype,"change",void 0),fs([(0,t.Event)()],i.prototype,"destroyed",void 0),i=fs([t.NotifyPropertyChanges],i)}(t.Component),As=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])},e(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)}}(),Ts=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},Ps="e-icon-right",Ds="e-breadcrumb-text",Ms="e-breadcrumb-icon",Hs="e-breadcrumb-menu",Us="e-breadcrumb-item",Rs="e-breadcrumb-popup",Bs="e-breadcrumb-wrap-mode",js="e-breadcrumb-scroll-mode",qs="tabindex",Ws="e-disabled",Fs="aria-disabled",Vs=".";!function(e){e.Hidden="Hidden",e.Collapsed="Collapsed",e.Menu="Menu",e.Wrap="Wrap",e.Scroll="Scroll",e.None="None"}(R||(R={}));var _s,zs=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return As(i,e),Ts([(0,t.Property)("")],i.prototype,"text",void 0),Ts([(0,t.Property)("")],i.prototype,"id",void 0),Ts([(0,t.Property)("")],i.prototype,"url",void 0),Ts([(0,t.Property)(null)],i.prototype,"iconCss",void 0),Ts([(0,t.Property)(!1)],i.prototype,"disabled",void 0),i}(t.ChildProperty),Xs=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.isPopupCreated=!1,s}return As(i,e),i.prototype.preRender=function(){},i.prototype.render=function(){this.initialize(),this.renderItems(this.items),this.wireEvents()},i.prototype.initialize=function(){this._maxItems=this.maxItems,(0,t.isNullOrUndefined)(this.element.getAttribute("aria-label"))&&this.element.setAttribute("aria-label","breadcrumb"),this.cssClass&&(0,t.addClass)([this.element],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.enableRtl&&this.element.classList.add("e-rtl"),this.disabled&&(this.element.classList.add(Ws),this.element.setAttribute(Fs,"true")),"Wrap"===this.overflowMode?this.element.classList.add(Bs):"Scroll"===this.overflowMode&&this.element.classList.add(js),this.initItems(),this.initPvtProps()},i.prototype.initPvtProps=function(){"Hidden"===this.overflowMode&&this._maxItems>0&&(this.endIndex=this.getEndIndex(),this.startIndex=this.endIndex+1-(this._maxItems-1)),"Menu"===this.overflowMode&&(this._maxItems>=0?(this.startIndex=this._maxItems>1?1:0,this.endIndex=this.getEndIndex(),this.popupUl=this.createElement("ul",{attrs:{TABINDEX:"0",role:"menu"}})):this.startIndex=this.endIndex=null)},i.prototype.getEndIndex=function(){var e,t=this;return this.activeItem?this.items.forEach((function(i,s){i.url!==t.activeItem&&i.text!==t.activeItem||(e=s)})):e=this.items.length-1,e},i.prototype.initItems=function(){if(!this.items.length){var e=void 0,t=void 0,i=[];if(this.url){var s=new URL(this.url,window.location.origin);e=s.origin+"/",t=s.href.split(e)[1].split("/")}else e=window.location.origin+"/",t=window.location.href.split(e)[1].split("/");i.push({iconCss:"e-icons e-home",url:e});for(var n=0;n<t.length;n++)t[n]&&(i.push({text:t[n],url:e+t[n]}),e+=t[n]+"/");this.setProperties({items:i},!0)}},i.prototype.renderItems=function(e){var i,s,n=this,r=this.element.classList.contains(Ps),o=e.length;if(o){var l,a=void 0,d=void 0,h=0,c=void 0,p=2*o-1,u=!1,f=this.createElement("ol",{className:"Wrap"===this.overflowMode?"e-breadcrumb-wrapped-ol":""}),m=this.createElement("ol",{className:"Wrap"===this.overflowMode?"e-breadcrumb-first-ol":""}),g=this.hasField(e,"iconCss"),v="Collapsed"===this.overflowMode&&this._maxItems>0&&o>this._maxItems&&!this.isExpanded,y="Hidden"===this.overflowMode&&this._maxItems>0;"Menu"===this.overflowMode&&this.popupUl&&(this.popupUl.innerHTML="");for(var b={moduleName:this.getModuleName(),showIcon:g,itemNavigable:!0,itemCreated:function(e){var i=e.curData.isLastItem;i&&e.item.children.length&&!n.itemTemplate&&(delete e.curData.isLastItem,l||n.enableActiveItemNavigation||(e.item.innerHTML=n.createElement("span",{className:Ds,innerHTML:e.item.children[0].innerHTML}).outerHTML)),!e.curData.iconCss||e.curData.text||n.itemTemplate||e.item.classList.add("e-icon-item"),y&&e.item.setAttribute("item-index",h.toString());var s={item:(0,t.extend)({},e.curData.properties?e.curData.properties:e.curData),element:e.item,cancel:!1};n.trigger("beforeItemRender",s),u=s.cancel;var o=r||s.element.classList.contains(Ps);o&&e.curData.iconCss&&!n.itemTemplate&&e.item.querySelector(".e-anchor-wrap").appendChild(e.item.querySelector(Vs+Ms)),s.item.disabled&&(e.item.setAttribute(Fs,"true"),e.item.classList.add(Ws)),s.item.id&&e.item.setAttribute("id",s.item.id),(s.item.disabled||n.disabled)&&e.item.children.length&&!n.itemTemplate&&e.item.children[0].setAttribute(qs,"-1"),e.curData.isEmptyUrl&&(e.item.children[0].removeAttribute("href"),!(!i||i&&n.enableActiveItemNavigation)||s.item.disabled||n.disabled||(e.item.children[0].setAttribute(qs,"0"),t.EventHandler.add(e.item.children[0],"keydown",n.keyDownHandler,n))),e.item.removeAttribute("role"),i&&e.item.setAttribute("data-active-item",""),n.itemTemplate||n.beforeItemRenderChanges(e.curData,s.item,e.item,o)}},C=0;C<p;C%2&&h++,C++)if(a=this.activeItem&&(this.activeItem===e[h].url||this.activeItem===e[h].text),!(v&&C>1&&C<p-2)&&(!y||!(h<this.startIndex||h>this.endIndex)||C%2&&h===this.startIndex-1||0===h)){C%2?(c=this.createElement("div",{className:"e-breadcrumb-item-wrapper"}),this.separatorTemplate&&"/"===this.separatorTemplate||(0,t.isNullOrUndefined)(this.separatorTemplate)?b.template=(0,t.initializeCSPTemplate)((function(){return"/"})):b.template=this.separatorTemplate,b.itemClass="e-breadcrumb-separator",s=!1,i=[{previousItem:e[h],nextItem:e[h+1]}]):(b.itemClass="",this.itemTemplate?(b.template=this.itemTemplate,s=!1):s=!0,(i=[(0,t.extend)({},e[h].properties?e[h].properties:e[h])])[0].url||this.itemTemplate||(i=[(0,t.extend)({},i[0],{isEmptyUrl:!0,url:"#"})]),d=(y||"Menu"===this.overflowMode)&&h===this.endIndex,((C===p-1||d)&&!this.itemTemplate||a)&&(i[0].isLastItem=!0));var S=f,I=this.startIndex+this.endIndex-this._maxItems;if("Menu"===this.overflowMode&&(h>=this.startIndex&&h<=I&&(!(C%2)||h!==I)&&this.endIndex>=this._maxItems&&this._maxItems>0||0===this._maxItems)){if(C%2)continue;S=this.popupUl,d&&(l=!0)}else"Wrap"===this.overflowMode&&(S=0===C?m:c);var E=B.ListBase.createList(this.createElement,i,b,s,this).childNodes;if(u){if(y||v||"Menu"===this.overflowMode||"Wrap"===this.overflowMode)return e.splice(h,1),this.initPvtProps(),this.reRenderItems();(C===p-1||d)&&(0,t.remove)(S.lastElementChild)}else(0,t.append)(E,S);if("Wrap"===this.overflowMode&&0!==C&&C%2==0&&f.appendChild(c),v&&1===C){var x=this.createElement("li",{className:"e-icons e-breadcrumb-collapsed",attrs:{TABINDEX:"0"}});t.EventHandler.add(x,"keyup",this.expandHandler,this),f.appendChild(x)}if("Menu"===this.overflowMode&&this.startIndex===C&&this.endIndex>=this._maxItems&&this._maxItems>=0){var N=this.getMenuElement();t.EventHandler.add(N,"keyup",this.keyDownHandler,this),f.appendChild(N)}if(a||d)break;u&&C++}this.isReact&&(this.renderReactTemplates(),setTimeout((function(){n.calculateMaxItems()}),5)),"Wrap"===this.overflowMode&&this.element.appendChild(m),this.element.appendChild(f),this.isReact||this.calculateMaxItems()}},i.prototype.calculateMaxItems=function(){if("Hidden"===this.overflowMode||"Collapsed"===this.overflowMode||"Menu"===this.overflowMode){var e=void 0,i=this.element.offsetWidth,s=[].slice.call(this.element.children[0].children).reverse(),n="Menu"===this.overflowMode?0:s[s.length-1].offsetWidth+(s[s.length-2]?s[s.length-2].offsetWidth:0);if("Menu"===this.overflowMode){var r=this.getMenuElement();this.element.appendChild(r),n+=r.offsetWidth,(0,t.remove)(r)}for(var o=0;o<s.length-2;o++){if(n>i){if(e=Math.ceil((o-1)/2)+("Menu"===this.overflowMode&&o<=2?0:1),(this.maxItems>e&&!(this.maxItems>-1&&-1===e)||-1===this.maxItems)&&this._maxItems!==e)return this._maxItems=e,this.initPvtProps(),this.reRenderItems();break}if("Menu"===this.overflowMode&&2===o&&(n+=s[s.length-1].offsetWidth+s[s.length-2].offsetWidth)>i)return this._maxItems=1,this.initPvtProps(),this.reRenderItems();"Menu"===this.overflowMode&&s[o].classList.contains(Hs)||(n+=s[o].offsetWidth)}}else if(("Wrap"===this.overflowMode||"Scroll"===this.overflowMode)&&this._maxItems>0){i=0;if((s=this.element.querySelectorAll(Vs+Us)).length>this._maxItems+this._maxItems-1){for(o="Wrap"===this.overflowMode?1:0;o<this._maxItems+this._maxItems-1;o++)i+=s[o].offsetWidth;i=i+5+2*parseInt(getComputedStyle(this.element.children[0]).paddingLeft,10),"Wrap"===this.overflowMode?this.element.querySelector(".e-breadcrumb-wrapped-ol").style.width=i+"px":this.element.style.width=i+"px"}}},i.prototype.hasField=function(e,t){for(var i=0,s=e.length;i<s;i++)if(e[i][""+t])return!0;return!1},i.prototype.getMenuElement=function(){return this.createElement("li",{className:"e-icons e-breadcrumb-menu",attrs:{TABINDEX:"0"}})},i.prototype.beforeItemRenderChanges=function(e,i,s,n){var r=s.querySelector(".e-anchor-wrap");if(r&&r.parentElement.setAttribute("aria-label","home"),i.text!==e.text&&r&&r.childNodes.forEach((function(e){e.nodeType===Node.TEXT_NODE&&(e.textContent=i.text)})),i.iconCss!==e.iconCss&&r){var o=s.querySelector(Vs+Ms);if(o)i.iconCss?((0,t.removeClass)([o],e.iconCss.split(" ")),(0,t.addClass)([o],i.iconCss.split(" "))):(0,t.remove)(o);else if(i.iconCss){var l=this.createElement("span",{className:Ms+" "+i.iconCss});n?(0,t.append)([l],r):r.insertBefore(l,r.childNodes[0])}}if(i.url!==e.url&&this.enableNavigation){var a=s.querySelector("a."+Ds);a&&(i.url?a.setAttribute("href",i.url):a.removeAttribute("href"))}},i.prototype.reRenderItems=function(){this.element.innerHTML="",this.renderItems(this.items)},i.prototype.clickHandler=function(e){var i=(0,t.closest)(e.target,Vs+Us+":not(.e-breadcrumb-separator)");if(this.enableNavigation||e.preventDefault(),i&&((0,t.closest)(e.target,Vs+Ds)||this.itemTemplate)){var s=void 0;s="Wrap"===this.overflowMode?[].slice.call(this.element.querySelectorAll(Vs+Us)).indexOf(i):[].slice.call(i.parentElement.children).indexOf(i),"Menu"===this.overflowMode?(0,t.closest)(e.target,Vs+Rs)?(s+=this.startIndex,this.endIndex=s,"keydown"===e.type&&this.documentClickHandler(e)):this.element.querySelector(Vs+Hs)?s>[].slice.call(this.element.children[0].children).indexOf(this.element.querySelector(Vs+Hs))?(s+=2*this.popupUl.childElementCount-2,s=Math.floor(s/2),this.endIndex=s):this.startIndex=this.endIndex=s:(s=Math.floor(s/2),this.startIndex=this.endIndex=s):s=Math.floor(s/2),"Hidden"===this.overflowMode&&this._maxItems>0&&0!==this.endIndex&&(s=parseInt(i.getAttribute("item-index"),10),this.startIndex>1&&(this.startIndex-=this.endIndex-s),this.endIndex=s),this.trigger("itemClick",{element:i,item:this.items[s],event:e}),this.items[s]&&(this.activeItem=this.items[s].url||this.items[s].text),this.dataBind()}e.target.classList.contains("e-breadcrumb-collapsed")&&(this.isExpanded=!0,this.reRenderItems()),e.target.classList.contains(Hs)&&!this.isPopupCreated&&this.renderPopup()},i.prototype.renderPopup=function(){var e=this,t=this.createElement("div",{className:Rs+" "+this.cssClass+(this.enableRtl?" e-rtl":"")});document.body.appendChild(t),this.isPopupCreated=!0,this.popupObj=new j.Popup(t,{content:this.popupUl,relateTo:this.element.querySelector(Vs+Hs),enableRtl:this.enableRtl,position:{X:"left",Y:"bottom"},collision:{X:"fit",Y:"flip"},open:function(){e.popupUl&&e.popupUl.focus()}}),this.popupWireEvents(),this.popupObj.show()},i.prototype.documentClickHandler=function(e){"Menu"===this.overflowMode&&this.popupObj&&this.popupObj.element.classList.contains("e-popup-open")&&!(0,t.closest)(e.target,Vs+Hs)&&(this.popupObj.hide(),this.popupObj.destroy(),this.isPopupCreated=!1,(0,t.detach)(this.popupObj.element))},i.prototype.resize=function(){this._maxItems=this.maxItems,this.initPvtProps(),this.reRenderItems()},i.prototype.expandHandler=function(e){"Enter"===e.key&&(this.isExpanded=!0,this.reRenderItems())},i.prototype.keyDownHandler=function(e){"Enter"===e.key&&this.clickHandler(e)},i.prototype.popupKeyDownHandler=function(e){"Escape"===e.key&&this.documentClickHandler(e)},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"items":case"enableActiveItemNavigation":this.reRenderItems();break;case"activeItem":this._maxItems=this.maxItems,this.initPvtProps(),this.reRenderItems();break;case"overflowMode":case"maxItems":this._maxItems=this.maxItems,this.initPvtProps(),this.reRenderItems(),"Wrap"===i.overflowMode?this.element.classList.remove(Bs):"Wrap"===e.overflowMode&&this.element.classList.add(Bs),"Scroll"===i.overflowMode?this.element.classList.remove(js):"Scroll"===e.overflowMode&&this.element.classList.add(js);break;case"url":this.initItems(),this.reRenderItems();break;case"cssClass":i.cssClass&&(0,t.removeClass)([this.element],i.cssClass.split(" ")),e.cssClass&&(0,t.addClass)([this.element],e.cssClass.replace(/\s+/g," ").trim().split(" ")),(i.cssClass&&i.cssClass.indexOf(Ps)>-1&&!(e.cssClass&&e.cssClass.indexOf(Ps)>-1)||!(i.cssClass&&i.cssClass.indexOf(Ps)>-1)&&e.cssClass&&e.cssClass.indexOf(Ps)>-1)&&this.reRenderItems();break;case"enableRtl":this.element.classList.toggle("e-rtl");break;case"disabled":this.element.classList.toggle(Ws),this.element.setAttribute(Fs,e.disabled+"")}}},i.prototype.wireEvents=function(){this.delegateClickHanlder=this.documentClickHandler.bind(this),t.EventHandler.add(document,"click",this.delegateClickHanlder,this),t.EventHandler.add(this.element,"click",this.clickHandler,this),window.addEventListener("resize",this.resize.bind(this))},i.prototype.popupWireEvents=function(){t.EventHandler.add(this.popupObj.element,"click",this.clickHandler,this),t.EventHandler.add(this.popupObj.element,"keydown",this.popupKeyDownHandler,this)},i.prototype.unWireEvents=function(){t.EventHandler.remove(document,"click",this.delegateClickHanlder),t.EventHandler.remove(this.element,"click",this.clickHandler),window.removeEventListener("resize",this.resize.bind(this)),this.popupObj&&(t.EventHandler.remove(this.popupObj.element,"click",this.clickHandler),t.EventHandler.remove(this.popupObj.element,"keydown",this.popupKeyDownHandler))},i.prototype.getPersistData=function(){return this.addOnPersist(["activeItem"])},i.prototype.getModuleName=function(){return"breadcrumb"},i.prototype.destroy=function(){var i=this,s=[],n=["aria-label"];this.cssClass&&s.concat(this.cssClass.split(" ")),this.enableRtl&&s.push("e-rtl"),this.disabled&&(s.push(Ws),n.push(Fs)),"Wrap"===this.overflowMode?s.push(Bs):"Scroll"===this.overflowMode&&s.push(js),this.unWireEvents(),this.element.innerHTML="",(0,t.removeClass)([this.element],s),n.forEach((function(e){i.element.removeAttribute(e)})),e.prototype.destroy.call(this)},Ts([(0,t.Property)("")],i.prototype,"url",void 0),Ts([(0,t.Collection)([],zs)],i.prototype,"items",void 0),Ts([(0,t.Property)("")],i.prototype,"activeItem",void 0),Ts([(0,t.Property)(-1)],i.prototype,"maxItems",void 0),Ts([(0,t.Property)("Menu")],i.prototype,"overflowMode",void 0),Ts([(0,t.Property)("")],i.prototype,"cssClass",void 0),Ts([(0,t.Property)(null)],i.prototype,"itemTemplate",void 0),Ts([(0,t.Property)("/")],i.prototype,"separatorTemplate",void 0),Ts([(0,t.Property)(!0)],i.prototype,"enableNavigation",void 0),Ts([(0,t.Property)(!1)],i.prototype,"enableActiveItemNavigation",void 0),Ts([(0,t.Property)(!1)],i.prototype,"disabled",void 0),Ts([(0,t.Property)("")],i.prototype,"locale",void 0),Ts([(0,t.Event)()],i.prototype,"beforeItemRender",void 0),Ts([(0,t.Event)()],i.prototype,"itemClick",void 0),Ts([(0,t.Event)()],i.prototype,"created",void 0),i=Ts([t.NotifyPropertyChanges],i)}(t.Component),Ks=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])},e(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)}}(),Ys=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},Gs="e-carousel",Qs="e-active",Js="e-rtl",Zs="e-partial",$s="e-swipe",en="e-carousel-slide-container",tn="e-carousel-items",sn="e-carousel-item",nn="e-previous",rn="e-next",on="e-carousel-navigators",ln="e-carousel-indicators",an="e-indicator-bars",dn="e-indicator-bar",hn="e-indicator",cn="e-icons",pn="e-play-pause",un="e-play-icon",fn="e-pause-icon",mn="e-previous-button",gn="e-next-button",vn="e-play-button",yn="e-flat",bn="e-round",Cn="e-hover-arrows",Sn="e-carousel-hover",In="e-template",En="e-carousel-slide-animation",xn="e-carousel-fade-animation",Nn="e-carousel-custom-animation",On="e-carousel-animation-none",wn="e-prev",Ln="e-next",kn="e-transition-start",An="e-transition-end";!function(e){e[e.Touch=1]="Touch",e[e.Mouse=2]="Mouse"}(_s||(_s={}));var Tn,Pn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ks(i,e),Ys([(0,t.Property)()],i.prototype,"cssClass",void 0),Ys([(0,t.Property)()],i.prototype,"interval",void 0),Ys([(0,t.Property)()],i.prototype,"template",void 0),Ys([(0,t.Property)()],i.prototype,"htmlAttributes",void 0),i}(t.ChildProperty),Dn=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.isSwipe=!1,s}return Ks(i,e),i.prototype.getModuleName=function(){return Gs.replace("e-","")},i.prototype.getPersistData=function(){return this.addOnPersist(["selectedIndex"])},i.prototype.preRender=function(){this.keyConfigs={home:"home",end:"end",space:"space",moveLeft:"leftarrow",moveRight:"rightarrow",moveUp:"uparrow",moveDown:"downarrow"};this.localeObj=new t.L10n(this.getModuleName(),{nextSlide:"Next slide",of:"of",pauseSlideTransition:"Pause slide transition",playSlideTransition:"Play slide transition",previousSlide:"Previous slide",slide:"Slide",slideShow:"Slide show"},this.locale)},i.prototype.render=function(){this.initialize(),this.renderSlides(),this.renderNavigators(),this.renderPlayButton(),this.renderIndicators(),this.applyAnimation(),this.wireEvents()},i.prototype.onPropertyChanged=function(e,i){for(var s,n,r=0,o=Object.keys(e);r<o.length;r++){var l=o[r];switch(l){case"animationEffect":this.applyAnimation();break;case"cssClass":(0,t.classList)(this.element,[e.cssClass],[i.cssClass]);break;case"selectedIndex":this.setActiveSlide(this.selectedIndex,i.selectedIndex>this.selectedIndex?"Previous":"Next"),this.autoSlide();break;case"htmlAttributes":(0,t.isNullOrUndefined)(this.htmlAttributes)||this.setHtmlAttributes(this.htmlAttributes,this.element);break;case"enableTouchSwipe":!this.enableTouchSwipe&&this.touchModule&&this.touchModule.destroy(),this.element.querySelector("."+tn)&&this.renderTouchActions();break;case"loop":this.loop&&(0,t.isNullOrUndefined)(this.autoSlideInterval)&&this.applySlideInterval(),this.handleNavigatorsActions(this.selectedIndex),(this.partialVisible||this.swipeMode!==(~_s.Touch&~_s.Mouse))&&this.reRenderSlides();break;case"enableRtl":if((n=[].slice.call(this.element.querySelectorAll("."+mn+",\n ."+gn+", ."+vn))).push(this.element),this.enableRtl?(0,t.addClass)(n,Js):(0,t.removeClass)(n,Js),this.partialVisible||this.swipeMode!==(~_s.Touch&~_s.Mouse)){var a=this.loop?this.getNumOfItems():0,d=this.itemsContainer.firstElementChild.clientWidth;this.itemsContainer.style.transform=this.getTranslateX(d,this.selectedIndex+a)}break;case"buttonsVisibility":if(s=this.element.querySelector("."+on))switch(this.buttonsVisibility){case"Hidden":this.resetTemplates(["previousButtonTemplate","nextButtonTemplate"]),(0,t.remove)(s);break;case"VisibleOnHover":(0,t.addClass)([].slice.call(s.childNodes),Cn);break;case"Visible":(0,t.removeClass)([].slice.call(s.childNodes),Cn)}else this.renderNavigators(),this.renderPlayButton();break;case"width":(0,t.setStyleAttribute)(this.element,{width:(0,t.formatUnit)(this.width)});break;case"height":(0,t.setStyleAttribute)(this.element,{height:(0,t.formatUnit)(this.height)});break;case"autoPlay":this.showPlayButton&&(0,t.isNullOrUndefined)(this.playButtonTemplate)&&this.playButtonClickHandler(null,!0),this.autoSlide();break;case"interval":this.autoSlide();break;case"showIndicators":case"indicatorsType":(s=this.element.querySelector("."+ln))&&(this.resetTemplates(["indicatorsTemplate"]),(0,t.remove)(s)),this.renderIndicators();break;case"showPlayButton":s=this.element.querySelector("."+pn),!this.showPlayButton&&s&&((0,t.remove)(s),this.resetTemplates(["playButtonTemplate"])),this.renderPlayButton();break;case"items":case"dataSource":var h="dataSource"===l?this.dataSource:this.items;!(0,t.isNullOrUndefined)(h)&&h.length>0&&this.selectedIndex>=h.length&&(this.setActiveSlide(h.length-1,"Previous"),this.autoSlide()),this.reRenderSlides(),this.reRenderIndicators();break;case"partialVisible":this.partialVisible?(0,t.addClass)([this.element],Zs):(0,t.removeClass)([this.element],Zs),this.reRenderSlides();break;case"swipeMode":t.EventHandler.remove(this.element,"mousedown touchstart",this.swipeStart),t.EventHandler.remove(this.element,"mousemove touchmove",this.swiping),t.EventHandler.remove(this.element,"mouseup touchend",this.swipStop),this.swipeModehandlers(),this.reRenderSlides()}}},i.prototype.reRenderSlides=function(){var e=this.element.querySelector("."+tn);e&&(this.resetTemplates(["itemTemplate"]),(0,t.remove)(e)),this.renderSlides()},i.prototype.reRenderIndicators=function(){var e=this.element.querySelector("."+ln);e&&(this.resetTemplates(["indicatorsTemplate"]),(0,t.remove)(e)),this.renderIndicators()},i.prototype.initialize=function(){var e=[];e.push(Gs),this.cssClass&&e.push(this.cssClass),this.enableRtl&&e.push(Js),this.partialVisible&&e.push(Zs),this.swipeMode!==(~_s.Touch&~_s.Mouse)&&e.push($s),(0,t.addClass)([this.element],e),(0,t.setStyleAttribute)(this.element,{width:(0,t.formatUnit)(this.width),height:(0,t.formatUnit)(this.height)}),(0,t.attributes)(this.element,{role:"group","aria-roledescription":"carousel","aria-label":this.localeObj.getConstant("slideShow")}),(0,t.isNullOrUndefined)(this.htmlAttributes)||this.setHtmlAttributes(this.htmlAttributes,this.element)},i.prototype.renderSlides=function(){var e=this,i=this.element.querySelector("."+en);i||(i=this.createElement("div",{className:en,attrs:{tabindex:"0",role:"tabpanel"}}),this.element.appendChild(i)),this.itemsContainer=this.createElement("div",{className:tn,attrs:{"aria-live":this.autoPlay?"off":"polite"}}),i.appendChild(this.itemsContainer);var s=this.getNumOfItems();s>0&&this.loop&&(this.items.length>0?this.items.slice(-s).forEach((function(t,i){e.renderSlide(t,t.template,i,e.itemsContainer,!0)})):!(0,t.isNullOrUndefined)(this.dataSource)&&this.dataSource.length>0&&this.dataSource.slice(-s).forEach((function(t,i){e.renderSlide(t,e.itemTemplate,i,e.itemsContainer,!0)}))),this.items.length>0?(this.slideItems=this.items,this.items.forEach((function(t,i){e.renderSlide(t,t.template,i,e.itemsContainer)}))):!(0,t.isNullOrUndefined)(this.dataSource)&&this.dataSource.length>0&&(this.slideItems=this.dataSource,this.dataSource.forEach((function(t,i){e.renderSlide(t,e.itemTemplate,i,e.itemsContainer)}))),s>0&&this.loop&&(this.items.length>0?this.items.slice(0,s).forEach((function(t,i){e.renderSlide(t,t.template,i,e.itemsContainer,!0)})):!(0,t.isNullOrUndefined)(this.dataSource)&&this.dataSource.length>0&&this.dataSource.slice(0,s).forEach((function(t,i){e.renderSlide(t,e.itemTemplate,i,e.itemsContainer,!0)}))),this.renderTemplates(),this.itemsContainer.style.setProperty("--carousel-items-count",""+this.itemsContainer.children.length);var n=(0,t.isNullOrUndefined)(this.itemsContainer.firstElementChild)?0:this.itemsContainer.firstElementChild.clientWidth;this.itemsContainer.style.transitionProperty="none";var r=this.loop?s:0;this.itemsContainer.style.transform=this.getTranslateX(n,this.selectedIndex+r),this.autoSlide(),this.renderTouchActions(),this.renderKeyboardActions()},i.prototype.getTranslateX=function(e,t){return void 0===t&&(t=1),this.enableRtl?"translateX("+e*t+"px)":"translateX("+-e*t+"px)"},i.prototype.renderSlide=function(e,i,s,n,r){void 0===r&&(r=!1);var o=this.createElement("div",{id:(0,t.getUniqueID)("carousel_item"),className:sn+" "+(e.cssClass?e.cssClass:"")+" "+(this.selectedIndex!==s||r?"":Qs),attrs:{"aria-hidden":this.selectedIndex!==s||r?"true":"false","data-index":s.toString(),role:"group","aria-roledescription":"slide"}});r&&o.classList.add("e-cloned"),(0,t.isNullOrUndefined)(e.htmlAttributes)||this.setHtmlAttributes(e.htmlAttributes,o);var l=this.element.id+"_template",a=this.templateParser(i)(e,this,"itemTemplate",l,!1);(0,t.append)(a,o),n.appendChild(o)},i.prototype.renderNavigators=function(){if("Hidden"!==this.buttonsVisibility){var e=this.createElement("div",{className:on});this.element.querySelector("."+en).insertAdjacentElement("afterend",e),!(0,t.isNullOrUndefined)(this.slideItems)&&this.slideItems.length>1&&(this.renderNavigatorButton("Previous"),this.renderNavigatorButton("Next")),this.renderTemplates()}},i.prototype.renderNavigatorButton=function(e){var i=this.createElement("div",{className:("Previous"===e?nn:rn)+" "+("VisibleOnHover"===this.buttonsVisibility?Cn:"")});if("Previous"===e&&this.previousButtonTemplate){(0,t.addClass)([i],In);var s=this.element.id+"_previousButtonTemplate",n=this.templateParser(this.previousButtonTemplate)({type:"Previous"},this,"previousButtonTemplate",s,!1);(0,t.append)(n,i)}else if("Next"===e&&this.nextButtonTemplate){(0,t.addClass)([i],In);s=this.element.id+"_nextButtonTemplate",n=this.templateParser(this.nextButtonTemplate)({type:"Next"},this,"nextButtonTemplate",s,!1);(0,t.append)(n,i)}else{var r=this.createElement("button",{attrs:{"aria-label":this.localeObj.getConstant("Previous"===e?"previousSlide":"nextSlide"),type:"button"}});new pe.Button({cssClass:yn+" "+bn+" "+("Previous"===e?mn:gn),iconCss:cn+" "+("Previous"===e?"e-previous-icon":"e-next-icon"),enableRtl:this.enableRtl,disabled:!this.loop&&this.selectedIndex===("Previous"===e?0:this.slideItems.length-1)}).appendTo(r),i.appendChild(r)}this.element.querySelector("."+on).appendChild(i),t.EventHandler.add(i,"click",this.navigatorClickHandler,this)},i.prototype.renderPlayButton=function(){if(!((0,t.isNullOrUndefined)(this.slideItems)||"Hidden"===this.buttonsVisibility||!this.showPlayButton||this.slideItems.length<=1)){var e=this.createElement("div",{className:pn+" "+("VisibleOnHover"===this.buttonsVisibility?Cn:"")});if(this.playButtonTemplate){(0,t.addClass)([e],In);var i=this.element.id+"_playButtonTemplate",s=this.templateParser(this.playButtonTemplate)({},this,"playButtonTemplate",i,!1);(0,t.append)(s,e)}else{var n=this.createElement("button",{attrs:{"aria-label":this.localeObj.getConstant(this.autoPlay?"pauseSlideTransition":"playSlideTransition"),type:"button"}}),r=this.selectedIndex===this.slideItems.length-1&&!this.loop,o=new pe.Button({cssClass:yn+" "+bn+" "+vn,iconCss:cn+" "+(this.autoPlay&&!r?fn:un),isToggle:!0,enableRtl:this.enableRtl});r&&(this.setProperties({autoPlay:!1},!0),n.setAttribute("aria-label",this.localeObj.getConstant("playSlideTransition")),this.itemsContainer.setAttribute("aria-live","polite")),o.appendTo(n),e.appendChild(n)}var l=this.element.querySelector("."+on);l.insertBefore(e,l.lastElementChild),this.renderTemplates(),t.EventHandler.add(e,"click",this.playButtonClickHandler,this)}},i.prototype.renderIndicators=function(){var e=this;if(this.showIndicators&&!(0,t.isNullOrUndefined)(this.indicatorsType)){var i="e-default";this.indicatorsTemplate||(i="e-"+this.indicatorsType.toLowerCase());var s,n=this.createElement("div",{className:ln+" "+i}),r=this.createElement("div",{className:an});if(n.appendChild(r),this.slideItems)switch(this.indicatorsType){case"Fraction":this.indicatorsTemplate?this.renderIndicatorTemplate(r,this.selectedIndex+1):r.innerText=this.selectedIndex+1+" / "+this.slideItems.length;break;case"Progress":this.indicatorsTemplate?this.renderIndicatorTemplate(r,this.selectedIndex+1):((s=this.createElement("div",{className:dn})).style.setProperty("--carousel-items-current",""+(this.selectedIndex+1)),s.style.setProperty("--carousel-items-count",""+this.slideItems.length),r.appendChild(s));break;case"Default":case"Dynamic":this.slideItems.forEach((function(i,s){var n=e.createElement("div",{className:dn+" "+(e.selectedIndex===s?Qs:e.selectedIndex-1===s?wn:e.selectedIndex+1===s?Ln:""),attrs:{"data-index":s.toString(),"aria-current":e.selectedIndex===s?"true":"false"}});if(n.style.setProperty("--carousel-items-current",""+e.selectedIndex),e.indicatorsTemplate)e.renderIndicatorTemplate(n,s);else if("Default"===e.indicatorsType){var o=e.createElement("button",{className:hn,attrs:{type:"button","aria-label":e.localeObj.getConstant("slide")+" "+(s+1)+" "+e.localeObj.getConstant("of")+" "+e.slideItems.length}});n.appendChild(o),o.appendChild(e.createElement("div",{})),new pe.Button({cssClass:"e-flat e-small"}).appendTo(o)}r.appendChild(n),"Default"===e.indicatorsType&&t.EventHandler.add(n,"click",e.indicatorClickHandler,e)}))}this.element.appendChild(n)}},i.prototype.renderIndicatorTemplate=function(e,i){void 0===i&&(i=0),(0,t.addClass)([e],In);var s=this.element.id+"_indicatorsTemplate",n=this.templateParser(this.indicatorsTemplate)({index:i,selectedIndex:this.selectedIndex},this,"indicatorsTemplate",s,!1);(0,t.append)(n,e)},i.prototype.renderKeyboardActions=function(){this.keyModule=new t.KeyboardEvents(this.element,{keyAction:this.keyHandler.bind(this),keyConfigs:this.keyConfigs})},i.prototype.renderTouchActions=function(){this.enableTouchSwipe&&(this.touchModule=new t.Touch(this.element,{swipe:this.swipeHandler.bind(this)}))},i.prototype.applyAnimation=function(){switch((0,t.removeClass)([this.element],[Nn,xn,En,On]),this.animationEffect){case"Slide":(0,t.addClass)([this.element],En);break;case"Fade":(0,t.addClass)([this.element],xn);break;case"None":(0,t.addClass)([this.element],On);break;case"Custom":(0,t.addClass)([this.element],Nn)}},i.prototype.autoSlide=function(){(0,t.isNullOrUndefined)(this.slideItems)||this.slideItems.length<=1||(this.resetSlideInterval(),this.applySlideInterval())},i.prototype.autoSlideChange=function(){var e=this.element.querySelector("."+Qs);if(!(0,t.isNullOrUndefined)(e)){var i=parseInt(e.dataset.index,10);if(this.loop||i!==this.slideItems.length-1){var s=(i+1)%this.slideItems.length;this.element.classList.contains(Sn)||this.setActiveSlide(s,"Next"),this.autoSlide()}else this.resetSlideInterval()}},i.prototype.applySlideInterval=function(){var e=this;if(this.autoPlay&&!this.element.classList.contains(Sn)){var i=this.interval;this.items.length>0&&!(0,t.isNullOrUndefined)(this.items[this.selectedIndex||0].interval)&&(i=this.items[this.selectedIndex||0].interval),this.autoSlideInterval=setInterval((function(){return e.autoSlideChange()}),i)}},i.prototype.resetSlideInterval=function(){clearInterval(this.autoSlideInterval),this.autoSlideInterval=null},i.prototype.getSlideIndex=function(e){var t=this.selectedIndex||0;return"Previous"===e?--t<0&&(t=this.slideItems.length-1):++t===this.slideItems.length&&(t=0),t},i.prototype.setActiveSlide=function(e,i,s){var n=this;if(void 0===s&&(s=!1),!(this.element.querySelectorAll("."+sn+"."+wn+",."+sn+"."+Ln).length>0)){e=(0,t.isNullOrUndefined)(e)?0:e;var r=[].slice.call(this.element.querySelectorAll("."+sn+":not(.e-cloned)")),o=this.element.querySelector("."+sn+"."+Qs);if((0,t.isNullOrUndefined)(o)&&this.showIndicators){var l=this.element.querySelector("."+dn+"."+Qs),a=parseInt(l.dataset.index,10);(0,t.addClass)([r[parseInt(a.toString(),10)]],Qs)}else if((0,t.isNullOrUndefined)(o))(0,t.addClass)([r[parseInt(e.toString(),10)]],Qs);else{var d=parseInt(o.dataset.index,10),h=r[parseInt(e.toString(),10)],c={currentIndex:d,nextIndex:e,currentSlide:o,nextSlide:h,slideDirection:i,isSwiped:s,cancel:!1};this.trigger("slideChanging",c,(function(o){if(!o.cancel){n.setProperties({selectedIndex:e},!0),(0,t.attributes)(o.currentSlide,{"aria-hidden":"true"}),(0,t.attributes)(o.nextSlide,{"aria-hidden":"false"}),n.refreshIndicators(d,e),n.slideChangedEventArgs={currentIndex:o.nextIndex,previousIndex:o.currentIndex,currentSlide:o.nextSlide,previousSlide:o.currentSlide,slideDirection:i,isSwiped:s};var l=r[parseInt(e.toString(),10)].clientWidth,a=n.getNumOfItems();n.isSwipe||(n.itemsContainer.style.transitionDuration="0.6s"),n.isSwipe=!1,"Fade"===n.animationEffect?n.itemsContainer.classList.add("e-fade-in-out"):n.itemsContainer.style.transitionProperty="transform",n.loop?0===n.slideChangedEventArgs.currentIndex&&"Next"===n.slideChangedEventArgs.slideDirection?n.itemsContainer.style.transform=n.getTranslateX(l,r.length+a):n.slideChangedEventArgs.currentIndex===n.slideItems.length-1&&"Previous"===n.slideChangedEventArgs.slideDirection?n.itemsContainer.style.transform=n.partialVisible?n.getTranslateX(l):"translateX(0px)":n.itemsContainer.style.transform=n.getTranslateX(l,e+a):n.itemsContainer.style.transform=n.getTranslateX(l,e),"Slide"===n.animationEffect?"Previous"===i?((0,t.addClass)([o.nextSlide],wn),o.nextSlide.setAttribute("data-slide-height",o.nextSlide.offsetHeight.toString()),(0,t.addClass)([o.currentSlide,o.nextSlide],An)):((0,t.addClass)([o.nextSlide],Ln),o.nextSlide.setAttribute("data-slide-height",o.nextSlide.offsetHeight.toString()),(0,t.addClass)([o.currentSlide,o.nextSlide],kn)):"Fade"===n.animationEffect?((0,t.removeClass)([o.currentSlide],Qs),(0,t.addClass)([o.nextSlide],Qs)):"Custom"===n.animationEffect?"Previous"===i?((0,t.addClass)([o.nextSlide],Ln),(0,t.addClass)([o.currentSlide],wn)):((0,t.addClass)([o.currentSlide],wn),(0,t.addClass)([o.nextSlide],Ln)):n.onTransitionEnd(),n.handleNavigatorsActions(e)}}))}}},i.prototype.onTransitionEnd=function(){var e=this;(0,t.removeClass)(this.element.querySelectorAll("."+tn),"e-fade-in-out");var i=this.getNumOfItems();if(this.slideChangedEventArgs){if(this.itemsContainer.style.transitionProperty="none",this.loop&&(0===this.slideChangedEventArgs.currentIndex&&"Next"===this.slideChangedEventArgs.slideDirection||this.slideChangedEventArgs.currentIndex===this.slideItems.length-1&&"Previous"===this.slideChangedEventArgs.slideDirection)){var s=this.slideChangedEventArgs.currentSlide.clientWidth;this.itemsContainer.style.transform=this.getTranslateX(s,this.slideChangedEventArgs.currentIndex+i)}(0,t.addClass)([this.slideChangedEventArgs.currentSlide],Qs),(0,t.removeClass)([this.slideChangedEventArgs.previousSlide],Qs),this.trigger("slideChanged",this.slideChangedEventArgs,(function(){(0,t.removeClass)(e.element.querySelectorAll("."+sn),[wn,Ln,kn,An]),e.slideChangedEventArgs=null}))}},i.prototype.refreshIndicators=function(e,i){var s=this,n=this.element.querySelector("."+an);if(!(0,t.isNullOrUndefined)(n)){var r=[].slice.call(n.childNodes);switch(this.indicatorsType){case"Default":case"Dynamic":(0,t.attributes)(r[parseInt(e.toString(),10)],{"aria-current":"false"}),(0,t.attributes)(r[parseInt(i.toString(),10)],{"aria-current":"true"}),(0,t.removeClass)(r,[Qs,wn,Ln]),(0,t.addClass)([r[parseInt(i.toString(),10)]],Qs),r[i-1]&&(0,t.addClass)([r[i-1]],wn),r[i+1]&&(0,t.addClass)([r[i+1]],Ln),r.forEach((function(e){return e.style.setProperty("--carousel-items-current",""+s.selectedIndex)}));break;case"Fraction":this.indicatorsTemplate?(n.children.length>0&&n.removeChild(n.firstElementChild),this.renderIndicatorTemplate(n,i+1)):n.innerText=this.selectedIndex+1+" / "+this.slideItems.length;break;case"Progress":this.indicatorsTemplate?(n.children.length>0&&n.removeChild(n.firstElementChild),this.renderIndicatorTemplate(n,i+1)):n.firstElementChild.style.setProperty("--carousel-items-current",""+(this.selectedIndex+1))}}},i.prototype.setHtmlAttributes=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){var r=n[s];"class"===r?(0,t.addClass)([i],e[""+r]):i.setAttribute(r,e[""+r])}},i.prototype.templateParser=function(e){if(e)try{return"function"!=typeof e&&document.querySelectorAll(e).length?(0,t.compile)(document.querySelector(e).innerHTML.trim()):(0,t.compile)(e)}catch(i){return(0,t.compile)(e)}},i.prototype.getNavigatorState=function(e,i){var s=e.querySelector("."+(i?mn:gn));return!!s&&(0,t.getInstance)(s,pe.Button).disabled},i.prototype.navigatorClickHandler=function(e){var t=e.currentTarget;if(!this.getNavigatorState(t,t.classList.contains(nn))){var i=t.classList.contains(nn)?"Previous":"Next";this.setActiveSlide(this.getSlideIndex(i),i),this.autoSlide()}},i.prototype.indicatorClickHandler=function(e){var i=(0,t.closest)(e.target,"."+dn),s=parseInt(i.dataset.index,10);this.selectedIndex!==s&&(this.setActiveSlide(s,this.selectedIndex>s?"Previous":"Next"),this.autoSlide())},i.prototype.playButtonClickHandler=function(e,i){void 0===i&&(i=!1);var s=this.element.querySelector("."+vn);if(s){var n=(0,t.getInstance)(s,pe.Button);i||this.setProperties({autoPlay:!this.autoPlay},!0),s.setAttribute("aria-label",this.localeObj.getConstant(this.autoPlay?"pauseSlideTransition":"playSlideTransition")),n.iconCss=cn+" "+(this.autoPlay?fn:un),n.dataBind(),this.itemsContainer.setAttribute("aria-live",this.autoPlay?"off":"polite"),this.autoPlay&&!this.loop&&this.selectedIndex===this.slideItems.length-1&&this.setActiveSlide(0,"Next"),this.autoSlide()}},i.prototype.keyHandler=function(e){var i,s,n=!1,r=e.target;switch(e.preventDefault(),e.action){case"space":this.showIndicators&&r.classList.contains(hn)?r.click():r.classList.contains(Gs)||r.classList.contains(vn)?this.playButtonClickHandler(e):r.classList.contains(gn)?this.next():r.classList.contains(mn)&&this.prev();break;case"end":s=this.slideItems.length-1,i="Next",n=!0;break;case"home":s=0,i="Previous",n=!0;break;case"moveUp":case"moveLeft":case"moveDown":case"moveRight":this.showIndicators&&(0,t.isNullOrUndefined)(this.indicatorsTemplate)&&this.element.focus(),i="moveUp"===e.action||"moveLeft"===e.action?"Previous":"Next",s=this.getSlideIndex(i),n=!this.isSuspendSlideTransition(s,i)}n&&(this.setActiveSlide(s,i),this.autoSlide(),n=!1)},i.prototype.swipeHandler=function(e){if(!(this.element.classList.contains(Sn)||(0,t.isNullOrUndefined)(this.slideItems)||this.slideItems.length<=1)){var i="Right"===e.swipeDirection?"Previous":"Next",s=this.getSlideIndex(i);this.isSuspendSlideTransition(s,i)||(this.setActiveSlide(s,i,!0),this.autoSlide())}},i.prototype.isSuspendSlideTransition=function(e,t){return!this.loop&&("Next"===t&&0===e||"Previous"===t&&e===this.slideItems.length-1)},i.prototype.handleNavigatorsActions=function(e){if("Hidden"!==this.buttonsVisibility){if(this.showPlayButton){var i=this.element.querySelector("."+vn),s=this.selectedIndex===this.slideItems.length-1&&!this.loop,n=(0,t.isNullOrUndefined)(this.playButtonTemplate)&&i&&s;if((0,t.isNullOrUndefined)(this.playButtonTemplate)&&i&&!s&&(n=!i.classList.contains(Qs)),n)this.setProperties({autoPlay:!s},!0),i.setAttribute("aria-label",this.localeObj.getConstant(this.autoPlay?"pauseSlideTransition":"playSlideTransition")),this.itemsContainer.setAttribute("aria-live",this.autoPlay?"off":"polite"),(o=(0,t.getInstance)(i,pe.Button)).iconCss=cn+" "+(this.autoPlay?fn:un),o.dataBind()}var r=this.element.querySelector("."+mn);if(r&&(0,t.isNullOrUndefined)(this.previousButtonTemplate))(o=(0,t.getInstance)(r,pe.Button)).disabled=!this.loop&&0===e,o.dataBind();var o,l=this.element.querySelector("."+gn);if(l&&(0,t.isNullOrUndefined)(this.nextButtonTemplate))(o=(0,t.getInstance)(l,pe.Button)).disabled=!this.loop&&e===this.slideItems.length-1,o.dataBind()}},i.prototype.onHoverActions=function(e){var i=this.element.querySelector("."+on);switch(e.type){case"mouseenter":"VisibleOnHover"===this.buttonsVisibility&&i&&(0,t.removeClass)([].slice.call(i.childNodes),Cn),this.pauseOnHover&&(0,t.addClass)([this.element],Sn);break;case"mouseleave":"VisibleOnHover"===this.buttonsVisibility&&i&&(0,t.addClass)([].slice.call(i.childNodes),Cn),(0,t.removeClass)([this.element],Sn)}this.autoSlide()},i.prototype.onFocusActions=function(e){switch(e.type){case"focusin":(0,t.addClass)([this.element],Sn);break;case"focusout":(0,t.removeClass)([this.element],Sn)}this.autoSlide()},i.prototype.destroyButtons=function(){for(var e=0,i=[].slice.call(this.element.querySelectorAll(".e-control.e-btn"));e<i.length;e++){var s=i[e],n=(0,t.getInstance)(s,pe.Button);n&&n.destroy()}},i.prototype.getNumOfItems=function(){return this.partialVisible?2:1},i.prototype.getTranslateValue=function(e){var t=getComputedStyle(e);return window.WebKitCSSMatrix?new WebKitCSSMatrix(t.webkitTransform).m41:0},i.prototype.swipeStart=function(e){this.timeStampStart||(this.timeStampStart=Date.now()),this.isSwipe=!1,this.itemsContainer.classList.add("e-swipe-start"),this.prevPageX=e.touches?e.touches[0].pageX:e.pageX,this.initialTranslate=this.getTranslateValue(this.itemsContainer)},i.prototype.swiping=function(e){if(this.itemsContainer.classList.contains("e-swipe-start")){e.preventDefault();var t=e.touches?e.touches[0].pageX:e.pageX,i=this.prevPageX-t;!this.loop&&(this.enableRtl&&(0===this.selectedIndex&&i>0||this.selectedIndex===this.itemsContainer.childElementCount-1&&i<0)||!this.enableRtl&&(0===this.selectedIndex&&i<0||this.selectedIndex===this.itemsContainer.childElementCount-1&&i>0))||(this.itemsContainer.style.transform="translateX("+(this.initialTranslate+(this.enableRtl?i:-i))+"px)")}},i.prototype.swipStop=function(){this.isSwipe=!0;var e=Date.now()-this.timeStampStart,i=this.getTranslateValue(this.itemsContainer)-this.initialTranslate;if(i=i<0?-1*i:i,this.isSwipe){var s=i*(t.Browser.isDevice?6:1.66);this.itemsContainer.style.transitionDuration=(t.Browser.isDevice?i:s)/e/10+"s"}var n=this.itemsContainer.firstElementChild.clientWidth/2;this.itemsContainer.classList.remove("e-swipe-start");var r=this.getTranslateValue(this.itemsContainer);r-this.initialTranslate<-n?this.swipeNavigation(!this.enableRtl):r-this.initialTranslate>n?this.swipeNavigation(this.enableRtl):(this.itemsContainer.style.transform="translateX("+this.initialTranslate+"px)","Fade"===this.animationEffect&&this.itemsContainer.classList.add("e-fade-in-out"))},i.prototype.swipeNavigation=function(e){e?this.next():this.prev()},i.prototype.swipeModehandlers=function(){(this.swipeMode&_s.Touch)===_s.Touch&&(t.EventHandler.add(this.itemsContainer,"touchstart",this.swipeStart,this),t.EventHandler.add(this.itemsContainer,"touchmove",this.swiping,this),t.EventHandler.add(this.itemsContainer,"touchend",this.swipStop,this)),(this.swipeMode&_s.Mouse)===_s.Mouse&&(t.EventHandler.add(this.itemsContainer,"mousedown",this.swipeStart,this),t.EventHandler.add(this.itemsContainer,"mousemove",this.swiping,this),t.EventHandler.add(this.itemsContainer,"mouseup",this.swipStop,this)),0===this.swipeMode&&(this.swipeMode&_s.Mouse&_s.Touch)==(_s.Mouse&_s.Touch)&&(t.EventHandler.add(this.itemsContainer,"mousedown touchstart",this.swipeStart,this),t.EventHandler.add(this.itemsContainer,"mousemove touchmove",this.swiping,this),t.EventHandler.add(this.itemsContainer,"mouseup touchend",this.swipStop,this))},i.prototype.resizeHandler=function(){if(this.itemsContainer&&this.itemsContainer.firstElementChild){var e=this.getNumOfItems(),t=this.itemsContainer.firstElementChild.clientWidth;this.loop?this.itemsContainer.style.transform=this.getTranslateX(t,this.selectedIndex+e):this.itemsContainer.style.transform=this.getTranslateX(t,this.selectedIndex)}},i.prototype.wireEvents=function(){"Custom"!==this.animationEffect&&this.swipeModehandlers(),t.EventHandler.add(this.element,"focusin focusout",this.onFocusActions,this),t.EventHandler.add(this.element,"mouseenter mouseleave",this.onHoverActions,this),t.EventHandler.add(this.element.firstElementChild,"animationend",this.onTransitionEnd,this),t.EventHandler.add(this.element.firstElementChild,"transitionend",this.onTransitionEnd,this),t.EventHandler.add(window,"resize",this.resizeHandler,this)},i.prototype.unWireEvents=function(){var e=this;[].slice.call(this.element.querySelectorAll("."+dn)).forEach((function(i){t.EventHandler.remove(i,"click",e.indicatorClickHandler)})),[].slice.call(this.element.querySelectorAll("."+nn+",."+rn)).forEach((function(i){t.EventHandler.remove(i,"click",e.navigatorClickHandler)}));var i=this.element.querySelector("."+pn);i&&t.EventHandler.remove(i,"click",this.playButtonClickHandler),t.EventHandler.remove(this.element.firstElementChild,"animationend",this.onTransitionEnd),t.EventHandler.remove(this.element.firstElementChild,"transitionend",this.onTransitionEnd),t.EventHandler.clearEvents(this.element),t.EventHandler.clearEvents(this.itemsContainer),t.EventHandler.remove(window,"resize",this.resizeHandler)},i.prototype.prev=function(){if(this.loop||0!==this.selectedIndex){var e=0===this.selectedIndex?this.slideItems.length-1:this.selectedIndex-1;this.setActiveSlide(e,"Previous"),this.autoSlide()}},i.prototype.next=function(){if(this.loop||this.selectedIndex!==this.slideItems.length-1){var e=this.selectedIndex===this.slideItems.length-1?0:this.selectedIndex+1;this.setActiveSlide(e,"Next"),this.autoSlide()}},i.prototype.play=function(){var e=this.element.querySelector("."+un);this.showPlayButton&&e&&((0,t.classList)(e,[fn],[un]),this.element.querySelector("."+vn).setAttribute("aria-label",this.localeObj.getConstant("pauseSlideTransition")));this.setProperties({autoPlay:!0},!0),this.itemsContainer.setAttribute("aria-live","off"),this.applySlideInterval()},i.prototype.pause=function(){var e=this.element.querySelector("."+fn);this.showPlayButton&&e&&(this.element.querySelector("."+vn).setAttribute("aria-label",this.localeObj.getConstant("playSlideTransition")),(0,t.classList)(e,[un],[fn]));this.setProperties({autoPlay:!1},!0),this.itemsContainer.setAttribute("aria-live","off"),this.resetSlideInterval()},i.prototype.renderTemplates=function(){(this.isAngular||this.isReact)&&this.renderReactTemplates()},i.prototype.resetTemplates=function(e){(this.isAngular||this.isReact)&&this.clearTemplate(e)},i.prototype.destroy=function(){var i=this;this.resetTemplates(),this.touchModule&&(this.touchModule.destroy(),this.touchModule=null),this.keyModule.destroy(),this.keyModule=null,this.resetSlideInterval(),this.destroyButtons(),this.unWireEvents(),[].slice.call(this.element.children).forEach((function(e){i.element.removeChild(e)})),(0,t.removeClass)([this.element],[Gs,this.cssClass,Js,$s]),["role","style"].forEach((function(e){i.element.removeAttribute(e)})),this.itemsContainer=null,e.prototype.destroy.call(this)},Ys([(0,t.Collection)([],Pn)],i.prototype,"items",void 0),Ys([(0,t.Property)("Slide")],i.prototype,"animationEffect",void 0),Ys([(0,t.Property)()],i.prototype,"previousButtonTemplate",void 0),Ys([(0,t.Property)()],i.prototype,"nextButtonTemplate",void 0),Ys([(0,t.Property)()],i.prototype,"indicatorsTemplate",void 0),Ys([(0,t.Property)()],i.prototype,"playButtonTemplate",void 0),Ys([(0,t.Property)()],i.prototype,"cssClass",void 0),Ys([(0,t.Property)([])],i.prototype,"dataSource",void 0),Ys([(0,t.Property)()],i.prototype,"itemTemplate",void 0),Ys([(0,t.Property)(0)],i.prototype,"selectedIndex",void 0),Ys([(0,t.Property)("100%")],i.prototype,"width",void 0),Ys([(0,t.Property)("100%")],i.prototype,"height",void 0),Ys([(0,t.Property)(5e3)],i.prototype,"interval",void 0),Ys([(0,t.Property)(!0)],i.prototype,"autoPlay",void 0),Ys([(0,t.Property)(!0)],i.prototype,"pauseOnHover",void 0),Ys([(0,t.Property)(!0)],i.prototype,"loop",void 0),Ys([(0,t.Property)(!1)],i.prototype,"showPlayButton",void 0),Ys([(0,t.Property)(!0)],i.prototype,"enableTouchSwipe",void 0),Ys([(0,t.Property)(!0)],i.prototype,"showIndicators",void 0),Ys([(0,t.Property)("Default")],i.prototype,"indicatorsType",void 0),Ys([(0,t.Property)("Visible")],i.prototype,"buttonsVisibility",void 0),Ys([(0,t.Property)(!1)],i.prototype,"partialVisible",void 0),Ys([(0,t.Property)(_s.Touch)],i.prototype,"swipeMode",void 0),Ys([(0,t.Property)()],i.prototype,"htmlAttributes",void 0),Ys([(0,t.Event)()],i.prototype,"slideChanging",void 0),Ys([(0,t.Event)()],i.prototype,"slideChanged",void 0),i=Ys([t.NotifyPropertyChanges],i)}(t.Component),Mn=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])},e(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)}}(),Hn=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},Un="e-appbar",Rn="e-horizontal-bottom",Bn="e-sticky",jn="e-prominent",qn="e-dense",Wn="e-rtl",Fn="e-light",Vn="e-dark",_n="e-primary",zn="e-inherit",Xn=function(e){function i(t,i){return e.call(this,t,i)||this}return Mn(i,e),i.prototype.destroy=function(){e.prototype.destroy.call(this),this.element.classList.remove(Un),this.element.removeAttribute("style"),this.element.removeAttribute("role")},i.prototype.getModuleName=function(){return"appbar"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.preRender=function(){},i.prototype.render=function(){this.element.classList.add(Un),"HEADER"!==this.element.tagName&&this.element.setAttribute("role","banner"),this.cssClass&&(0,t.addClass)([this.element],this.cssClass.split(" ")),"Bottom"===this.position&&this.element.classList.add(Rn),this.isSticky&&this.element.classList.add(Bn),this.enableRtl&&this.element.classList.add(Wn),this.setHeightMode(),this.setColorMode(),(0,t.isNullOrUndefined)(this.htmlAttributes)||this.setHtmlAttributes(this.htmlAttributes,this.element)},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"mode":(0,t.removeClass)([this.element],[qn,jn]),this.setHeightMode();break;case"position":"Bottom"===this.position?(0,t.addClass)([this.element],Rn):(0,t.removeClass)([this.element],Rn);break;case"cssClass":i.cssClass&&(0,t.removeClass)([this.element],i.cssClass.split(" ")),e.cssClass&&(0,t.addClass)([this.element],e.cssClass.split(" "));break;case"isSticky":this.isSticky?(0,t.addClass)([this.element],Bn):(0,t.removeClass)([this.element],Bn);break;case"htmlAttributes":if(!(0,t.isNullOrUndefined)(this.htmlAttributes)){if(!(0,t.isNullOrUndefined)(i.htmlAttributes))for(var r=0,o=Object.keys(i.htmlAttributes);r<o.length;r++){var l=o[r];"class"===l?(0,t.removeClass)([this.element],i.htmlAttributes[""+l]):this.element.removeAttribute(l)}this.setHtmlAttributes(e.htmlAttributes,this.element)}break;case"colorMode":(0,t.removeClass)([this.element],[Vn,_n,zn,Fn]),this.setColorMode();break;case"enableRtl":this.enableRtl?(0,t.addClass)([this.element],Wn):(0,t.removeClass)([this.element],Wn)}}},i.prototype.setHtmlAttributes=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){var r=n[s];"class"===r?(0,t.addClass)([i],e[""+r]):i.setAttribute(r,e[""+r])}},i.prototype.setHeightMode=function(){"Prominent"===this.mode?this.element.classList.add(jn):"Dense"===this.mode&&this.element.classList.add(qn)},i.prototype.setColorMode=function(){switch(this.colorMode){case"Light":this.element.classList.add(Fn);break;case"Dark":this.element.classList.add(Vn);break;case"Primary":this.element.classList.add(_n);break;case"Inherit":this.element.classList.add(zn)}},Hn([(0,t.Property)("Regular")],i.prototype,"mode",void 0),Hn([(0,t.Property)("Top")],i.prototype,"position",void 0),Hn([(0,t.Property)()],i.prototype,"cssClass",void 0),Hn([(0,t.Property)(!1)],i.prototype,"isSticky",void 0),Hn([(0,t.Property)()],i.prototype,"htmlAttributes",void 0),Hn([(0,t.Property)("Light")],i.prototype,"colorMode",void 0),Hn([(0,t.Event)()],i.prototype,"created",void 0),Hn([(0,t.Event)()],i.prototype,"destroyed",void 0),i=Hn([t.NotifyPropertyChanges],i)}(t.Component),Kn=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])},e(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)}}(),Yn=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o};!function(e){e.NotStarted="NotStarted",e.InProgress="InProgress",e.Completed="Completed"}(Tn||(Tn={}));var Gn,Qn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Kn(i,e),Yn([(0,t.Property)("")],i.prototype,"cssClass",void 0),Yn([(0,t.Property)(!1)],i.prototype,"disabled",void 0),Yn([(0,t.Property)("")],i.prototype,"iconCss",void 0),Yn([(0,t.Property)(null)],i.prototype,"isValid",void 0),Yn([(0,t.Property)("")],i.prototype,"label",void 0),Yn([(0,t.Property)(!1)],i.prototype,"optional",void 0),Yn([(0,t.Property)(Tn.NotStarted)],i.prototype,"status",void 0),Yn([(0,t.Property)("")],i.prototype,"text",void 0),i}(t.ChildProperty);!function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"}(Gn||(Gn={}));var Jn,Zn,$n=function(e){function i(t,i){return e.call(this,t,i)||this}return Kn(i,e),i.prototype.preRender=function(){},i.prototype.getModuleName=function(){return"stepperBase"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.render=function(){},i.prototype.updateOrientaion=function(e){(e.classList.contains("e-horizontal")||e.classList.contains("e-vertical"))&&e.classList.remove("e-horizontal","e-vertical"),(0,t.isNullOrUndefined)(this.orientation)||e.classList.add("e-"+this.orientation.toLocaleLowerCase())},i.prototype.renderProgressBar=function(e){this.progressStep=this.createElement("div",{className:"e-stepper-progressbar"}),this.progressbar=this.createElement("div",{className:"e-progressbar-value"}),this.progressStep.appendChild(this.progressbar),e.prepend(this.progressStep),this.progressbar.style.setProperty("--progress-value","0%");var t=e.querySelector("li").querySelector(".e-step-label-container");if(e.classList.contains("e-vertical"))if(e.classList.contains("e-label-bottom")||e.classList.contains("e-label-top")){var i=e.querySelector(".e-stepper-steps");this.progressStep.style.setProperty("--progress-position",i.offsetWidth/2+"px")}else this.progressStep.style.setProperty("--progress-position",this.progressBarPosition/2-1+"px");t&&t.classList.contains("e-label-before")&&this.progressStep.style.setProperty("--progress-position",this.progressBarPosition-1+5+"px"),e.classList.contains("e-horizontal")&&this.setProgressPosition(e)},i.prototype.setProgressPosition=function(e,t){var i=e.querySelector(".e-step-container"),s=i.firstElementChild;if(!0!==t){var n=0;n=e.classList.contains("e-label-before")?i.offsetParent.offsetHeight-s.offsetHeight/2-1:s.offsetHeight/2,this.progressStep.style.setProperty("--progress-top-position",n+"px")}var r=e.querySelector(".e-stepper-steps").lastChild.firstChild;if(e.classList.contains("e-rtl")){var o=s.offsetLeft+s.offsetWidth-e.querySelector(".e-stepper-steps").offsetWidth;this.progressStep.style.setProperty("--progress-left-position",Math.abs(o)+"px"),this.progressStep.style.setProperty("--progress-bar-width",Math.abs(r.offsetLeft-s.offsetLeft)+"px")}else this.progressStep.style.setProperty("--progress-left-position",s.offsetLeft+1+"px"),this.progressStep.style.setProperty("--progress-bar-width",r.offsetWidth+r.offsetLeft-2-(s.offsetLeft+2)+"px")},i.prototype.onPropertyChanged=function(e,t){},Yn([(0,t.Collection)([],Qn)],i.prototype,"steps",void 0),Yn([(0,t.Property)("")],i.prototype,"cssClass",void 0),Yn([(0,t.Property)(!1)],i.prototype,"readOnly",void 0),Yn([(0,t.Property)(Gn.Horizontal)],i.prototype,"orientation",void 0),Yn([(0,t.Event)()],i.prototype,"created",void 0),i=Yn([t.NotifyPropertyChanges],i)}(t.Component),er=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])},e(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)}}(),tr=function(e,t,i,s){var n,r=arguments.length,o=r<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 l=e.length-1;l>=0;l--)(n=e[l])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},ir="e-indicator",sr="e-step-text-container",nr="e-step-selected",rr="e-step-inprogress",or="e-step-notstarted",lr="e-step-focus",ar="e-step-completed",dr="e-step-disabled",hr="e-stepper-readonly",cr="--progress-value",pr="e-rtl",ur="e-step-template",fr="e-label-after",mr="e-label-before",gr="e-vertical",vr="e-horizontal",yr="e-step-item",br="e-step-text",Cr="e-text",Sr="e-step-label",Ir="e-label",Er="e-step-type-indicator",xr="e-step-type-label",Nr="e-step-indicator",Or="e-stepper-tooltip",wr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return er(i,e),tr([(0,t.Property)(!0)],i.prototype,"enable",void 0),tr([(0,t.Property)(2e3)],i.prototype,"duration",void 0),tr([(0,t.Property)(0)],i.prototype,"delay",void 0),i}(t.ChildProperty);!function(e){e.Top="Top",e.Bottom="Bottom",e.Start="Start",e.End="End"}(Jn||(Jn={})),function(e){e.Default="Default",e.Label="Label",e.Indicator="Indicator"}(Zn||(Zn={}));var Lr=function(e){function i(t,i){var s=e.call(this,t,i)||this;return s.stepperItemElements=[],s}return er(i,e),i.prototype.preRender=function(){this.element.id||(this.element.id=(0,t.getUniqueID)("e-"+this.getModuleName()));this.l10n=new t.L10n("stepper",{optional:"Optional"},this.locale),this.keyConfigs={downarrow:"downarrow",leftarrow:"leftarrow",rightarrow:"rightarrow",uparrow:"uparrow",space:"space",enter:"enter",home:"home",end:"end",tab:"tab",shiftTab:"shift+tab",escape:"escape"},this.tooltipOpen=!1},i.prototype.getModuleName=function(){return"stepper"},i.prototype.render=function(){this.initialize(),this.navigationHandler(this.activeStep,null,!1),this.updateStepperStatus(!0)},i.prototype.initialize=function(){var e=this;this.element.setAttribute("aria-label",this.element.id),this.updatePosition(),this.stepperItemList=this.createElement("ol",{className:"e-stepper-steps"}),this.updateOrientaion(this.element),this.updateStepType(),this.element.appendChild(this.stepperItemList),this.cssClass&&(0,t.addClass)([this.element],this.cssClass.trim().split(" ")),this.readOnly&&this.element.classList.add(hr),this.enableRtl&&this.element.classList.add(pr),this.wireEvents(),this.updateTemplateFunction(),this.renderItems(),this.steps.length>0&&(this.steps.length>1&&(this.isAngular&&this.template?setTimeout((function(){e.renderProgressBar(e.element)})):this.renderProgressBar(this.element)),this.checkValidStep(),this.updateAnimation(),this.updateTooltip(),this.wireKeyboardEvent())},i.prototype.updatePosition=function(){this.progressBarPosition=this.beforeLabelWidth=this.textEleWidth=0},i.prototype.renderDefault=function(e){return!(this.steps[parseInt(e.toString(),10)].iconCss||this.steps[parseInt(e.toString(),10)].text||this.steps[parseInt(e.toString(),10)].label)},i.prototype.updateAnimation=function(){var e=this.element.querySelector(".e-progressbar-value");this.animation.enable?(this.animation.duration>=0&&e&&e.style.setProperty("--duration",this.animation.duration+"ms"),this.animation.delay>=0&&e&&e.style.setProperty("--delay",this.animation.delay+"ms")):e&&(e.style.setProperty("--delay","0ms"),e.style.setProperty("--duration","0ms"))},i.prototype.updateStepType=function(){(0,t.isNullOrUndefined)(this.stepType)||"indicator"!==this.stepType.toLowerCase()&&"label"!==this.stepType.toLowerCase()&&"default"!==this.stepType.toLowerCase()||("default"!==this.stepType.toLowerCase()&&this.element.classList.add("e-step-type-"+this.stepType.toLowerCase()),this.stepType.toLowerCase(),this.labelContainer&&this.clearLabelPosition())},i.prototype.wireEvents=function(){var e=this;t.EventHandler.add(window,"resize",(function(){e.stepperItemList&&e.progressbar&&e.element.classList.contains(vr)&&e.setProgressPosition(e.element,!0)}),this),t.EventHandler.add(window,"click",(function(){e.updateStepFocus()}),this)},i.prototype.updateStepFocus=function(){if(this.isKeyNavFocus){this.isKeyNavFocus=!1;var e=this.element.querySelector("."+lr);e&&(e.classList.remove(lr),this.element.classList.remove("e-steps-focus"))}},i.prototype.updateStepperStatus=function(e){for(var t=0;t<this.steps.length;t++){var i=this.steps[parseInt(t.toString(),10)],s=i.status.toLowerCase();if(e&&0===this.activeStep&&0===t){var n=this.isProtectedOnChange;this.isProtectedOnChange=!0,i.status=Tn.InProgress,this.isProtectedOnChange=n}if(i&&"notstarted"!==s&&t===this.activeStep)for(var r=0;r<this.steps.length;r++){var o=this.stepperItemElements[parseInt(r.toString(),10)];o.classList.remove(nr,rr,ar,or);n=this.isProtectedOnChange;this.isProtectedOnChange=!0,"completed"===s?this.updateStatusClass(r,t,o):this.updateStatusClass(r,t,o,!0),this.isProtectedOnChange=n}else i&&"notstarted"!==s&&t!==this.activeStep&&this.navigationHandler(this.activeStep,null,!0)}},i.prototype.updateStatusClass=function(e,t,i,s){var n=this.steps[parseInt(e.toString(),10)];e<t?(i.classList.add(ar),n.status=Tn.Completed):e===t?i.classList.add(s?rr:ar,nr):i.classList.add(or)},i.prototype.renderItems=function(){for(var e=this,i=0;i<this.steps.length;i++){this.stepperItemContainer=this.createElement("li",{className:"e-step-container"}),this.stepperItemContainer.classList[0===i?"add":"remove"](nr,rr),this.stepperItemContainer.classList[0!==i?"add":"remove"](or),this.element.classList.contains(vr)&&this.stepperItemContainer.style.setProperty("--max-width",100/this.steps.length+"%");var s=this.createElement("span",{className:"e-step"}),n=this.steps[parseInt(i.toString(),10)];if(this.renderDefault(i)&&((0,t.isNullOrUndefined)(this.template)||""===this.template)){var r=!this.element.classList.contains("e-step-type-default")&&"indicator"===this.stepType.toLowerCase();r&&s.classList.add("e-icons",Nr),r||null!=n.isValid||(s.classList.add("e-step-content"),s.innerHTML=(i+1).toString()),this.stepperItemContainer.appendChild(s)}else if((0,t.isNullOrUndefined)(this.template)||""===this.template){var o=!0;if((n.iconCss||!n.iconCss&&n.text&&n.label)&&(!n.text&&!n.label||!this.element.classList.contains(xr))){if(n.iconCss){var l=n.iconCss.trim().split(" ");s.classList.add(ir);for(var a=0;a<l.length;a++)s.classList.add(l[parseInt(a.toString(),10)]);this.stepperItemContainer.classList.add(yr)}else!n.iconCss&&n.text&&n.label&&(s.classList.add(ir),s.innerHTML=n.text,this.stepperItemContainer.classList.add(yr));if(this.stepperItemContainer.appendChild(s),this.element.classList.contains(vr)&&("start"===this.labelPosition.toLowerCase()||"end"===this.labelPosition.toLowerCase())&&n.label||this.element.classList.contains(gr)&&("top"===this.labelPosition.toLowerCase()||"bottom"===this.labelPosition.toLowerCase())&&n.label)this.element.classList.add("e-label-"+this.labelPosition.toLowerCase()),(h=this.createElement("span",{className:sr+" "+Cr})).innerText=n.label,this.stepperItemContainer.appendChild(h),this.stepperItemContainer.classList.add(br),o=!1}if(n.text&&(!n.iconCss||!this.element.classList.contains(Er))&&o&&(!n.iconCss||!n.label))if(!n.iconCss&&this.element.classList.contains(Er)||(!n.iconCss||this.element.classList.contains(xr))&&!n.label){n.iconCss||n.label||this.element.classList.add("e-step-type-indicator"),this.checkValidState(n,s);var d=this.isProtectedOnChange;this.isProtectedOnChange=!0,n.label=null,this.isProtectedOnChange=d}else{var h=this.createElement("span",{className:Cr});n.label||(h.innerText=n.text,h.classList.add(sr),this.stepperItemContainer.appendChild(h),this.stepperItemContainer.classList.add(br)),n.label&&this.element.classList.contains(xr)&&(h.innerText=n.label);d=this.isProtectedOnChange;this.isProtectedOnChange=!0,n.text=n.label?null:n.text,this.isProtectedOnChange=d}if(n.label&&(!n.iconCss||!this.element.classList.contains(Er))&&o)if(n.iconCss||n.text||!this.element.classList.contains(Er)){if(!this.element.classList.contains(xr)||!n.text||this.element.classList.contains(xr)&&n.label){this.labelContainer=this.createElement("span",{className:"e-step-label-container"});var c=this.createElement("span",{className:Ir});if(c.innerText=n.label,this.labelContainer.appendChild(c),this.stepperItemContainer.classList.add(Sr),this.updateLabelPosition(),(!n.iconCss&&!n.text&&!this.stepperItemContainer.classList.contains(yr)||this.element.classList.contains(xr))&&(this.stepperItemContainer.classList.add("e-step-label-only"),null!==n.isValid)){var p=this.createElement("span",{className:"e-step-validation-icon e-icons"});this.labelContainer.appendChild(p)}}}else this.checkValidState(n,s,!0)}if(n.optional){var u=this.createElement("span",{className:"e-step-label-optional"});this.l10n.setLocale(this.locale);var f=this.l10n.getConstant("optional");u.innerText=f,n.label&&this.labelContainer&&(this.element.classList.contains(fr)&&!this.stepperItemContainer.classList.contains("e-step-label-only")||this.element.classList.contains(vr)&&this.element.classList.contains(mr)&&!this.stepperItemContainer.classList.contains("e-step-label-only"))||this.element.classList.contains(gr)&&this.element.classList.contains(mr)?this.labelContainer.appendChild(u):this.stepperItemContainer.appendChild(u),null!==n.isValid&&this.stepperItemContainer.classList.add(n.isValid?"e-step-valid":"e-step-error")}n.cssClass&&(0,t.addClass)([this.stepperItemContainer],n.cssClass.trim().split(" ")),n.disabled&&(this.stepperItemContainer.classList[n.disabled?"add":"remove"](dr),(0,t.attributes)(this.stepperItemContainer,{tabindex:"-1","aria-disabled":"true"})),null!==n.isValid&&(n.isValid?this.stepperItemContainer.classList.add("e-step-valid"):this.stepperItemContainer.classList.add("e-step-error")),this.renderItemContent(i,!1),this.stepperItemContainer.classList.contains(rr)?(0,t.attributes)(this.stepperItemContainer,{tabindex:"0","aria-current":"true"}):(0,t.attributes)(this.stepperItemContainer,{tabindex:"-1"}),this.wireItemsEvents(this.stepperItemContainer,i),this.stepperItemElements.push(this.stepperItemContainer);var m={element:this.stepperItemContainer,index:i};this.trigger("beforeStepRender",m,(function(t){e.stepperItemList.appendChild(t.element)})),this.isAngular&&this.template?setTimeout((function(){e.calculateProgressBarPosition()})):this.calculateProgressBarPosition()}if(this.element.classList.contains(gr)&&this.element.classList.contains(mr)){var g=this.stepperItemList.querySelectorAll("."+Ir);for(a=0;a<g.length;a++){g[parseInt(a.toString(),10)].style.setProperty("--label-width",this.beforeLabelWidth+5+"px")}}},i.prototype.calculateProgressBarPosition=function(){var e=!!this.element.classList.contains(mr);if(!!this.element.classList.contains(gr)){var t=!(!this.stepperItemContainer.classList.contains(yr)||this.stepperItemContainer.classList.contains(br)||this.stepperItemContainer.classList.contains(Sr)),i=this.stepperItemContainer.querySelector("."+sr);if(i&&(this.textEleWidth=this.textEleWidth<i.offsetWidth?i.offsetWidth:this.textEleWidth),e){var s=void 0,n=this.stepperItemContainer.querySelector("."+Ir).offsetWidth+15;this.beforeLabelWidth<n&&(this.beforeLabelWidth=n),this.element.querySelector("ol").lastChild.querySelector("."+ir)?s=this.beforeLabelWidth+this.stepperItemContainer.querySelector("."+ir).offsetWidth/2:this.stepperItemContainer.querySelector("."+sr)&&(s=this.beforeLabelWidth+this.stepperItemContainer.querySelector("."+sr).offsetWidth/2),this.progressBarPosition<s&&(this.progressBarPosition=s)}else this.progressBarPosition<(t?this.stepperItemContainer.offsetWidth:this.element.querySelector("ol").lastChild.firstChild.offsetWidth)&&(this.progressBarPosition=t?this.stepperItemContainer.offsetWidth:this.element.querySelector("ol").lastChild.firstChild.offsetWidth)}},i.prototype.checkValidState=function(e,t,i){null==e.isValid?(t.classList.add("e-step-content"),t.innerHTML=i||e.label?e.label:e.text,this.stepperItemContainer.appendChild(t)):(t.classList.add(ir),this.stepperItemContainer.appendChild(t),this.stepperItemContainer.classList.add(yr))},i.prototype.updateCurrentLabel=function(){return this.element.classList.contains(vr)?"top"===this.labelPosition.toLowerCase()?"before":"bottom"===this.labelPosition.toLowerCase()?"after":this.labelPosition.toLowerCase():"start"===this.labelPosition.toLowerCase()?"before":"end"===this.labelPosition.toLowerCase()?"after":this.labelPosition.toLowerCase()},i.prototype.updateLabelPosition=function(){this.clearLabelPosition(),this.labelContainer.classList.add("e-label-"+this.updateCurrentLabel()),"start"===this.labelPosition.toLowerCase()&&"vertical"===this.orientation.toLowerCase()&&this.stepperItemContainer.firstChild?this.stepperItemContainer.firstChild.before(this.labelContainer):this.stepperItemContainer.appendChild(this.labelContainer),this.element.classList.add("e-label-"+this.updateCurrentLabel())},i.prototype.clearLabelPosition=function(){var e=this.labelContainer.classList.value.match(/(e-label-[after|before]+)/g);e&&((0,t.removeClass)([this.labelContainer],e),(0,t.removeClass)([this.element],e))},i.prototype.checkValidStep=function(){for(var e=0;e<this.steps.length;e++){var t=this.steps[parseInt(e.toString(),10)],i=this.stepperItemElements[parseInt(e.toString(),10)];if(null!==t.isValid){var s=void 0,n=void 0;this.element.classList.contains(Er)&&!t.iconCss?s=i.querySelector("."+ir):n=i.querySelector("."+ir),!s&&this.element.classList.contains(Er)&&this.renderDefault(e)&&(s=i.querySelector("."+Nr));var r=i.querySelector(".e-step-validation-icon"),o=t.iconCss.trim().split(" "),l=i.classList.contains("e-step-valid");if(s&&(s.classList.remove(Nr),""!==s.innerHTML&&(s.innerHTML=""),s.classList.add("e-icons",l?"e-check":"e-circle-info",ir)),this.renderDefault(e)&&!this.element.classList.contains(Er))i.querySelector(".e-step").classList.add("e-icons",l?"e-check":"e-circle-info",ir);if(n){if(""!==n.innerHTML)n.innerHTML="";else if(o.length>0)for(var a=0;a<o.length;a++)n.classList.remove(o[parseInt(a.toString(),10)]);n.classList.add("e-icons",l?"e-check":"e-circle-info")}if(r&&(r.classList.add(l?"e-circle-check":"e-circle-info"),this.element.classList.contains(gr))){var d=i.querySelector("."+Ir),h=i.querySelector("."+Cr),c=h?h.offsetWidth+h.getBoundingClientRect().left:d.offsetWidth+d.getBoundingClientRect().left;i.querySelector(".e-step-validation-icon").style.setProperty("--icon-position",c+20+"px")}}}},i.prototype.updateTooltip=function(){this.showTooltip?(this.tooltipObj=new j.Tooltip({target:".e-step-container",windowCollision:!0,opensOn:"Custom",cssClass:this.cssClass?Or+" "+this.cssClass:Or,position:"TopCenter"}),this.tooltipObj.appendTo(this.stepperItemList)):(0,t.isNullOrUndefined)(this.tooltipObj)||(this.tooltipObj.destroy(),this.tooltipObj=null)},i.prototype.wireItemsEvents=function(e,i){var s=this;t.EventHandler.add(e,"click",(function(t){if(s.linear){var n=i-s.activeStep;1===Math.abs(n)&&s.stepClickHandler(i,t,e)}else s.stepClickHandler(i,t,e)}),this),t.EventHandler.add(e,"mouseover",(function(){return s.openStepperTooltip(i)}),this),t.EventHandler.add(e,"mouseleave",(function(){return s.closeStepperTooltip()}),this)},i.prototype.openStepperTooltip=function(e){var t=this.steps[parseInt(e.toString(),10)];if(this.showTooltip&&(t.label||t.text)&&!this.tooltipOpen){if(this.updateTooltipContent(e),this.tooltipObj.open(this.stepperItemElements[parseInt(e.toString(),10)]),"label"!==this.stepType.toLocaleLowerCase()&&("indicator"===this.stepType.toLocaleLowerCase()||""!==t.label&&""!==t.iconCss||null===t.label&&""===t.iconCss&&""!==t.text)){var i="inprogress"===t.status.toLowerCase()?Or+" e-step-inprogress-tip "+(this.cssClass?this.cssClass:""):Or+" "+(this.cssClass?this.cssClass:"");this.tooltipObj.setProperties({cssClass:i.trim()})}this.tooltipOpen=!0}},i.prototype.closeStepperTooltip=function(){this.tooltipOpen&&(this.tooltipObj.close(),this.tooltipOpen=!1)},i.prototype.updateTooltipContent=function(e){if(this.showTooltip){this.isReact&&this.clearTemplate(["stepperTooltipTemplate"]);var i=void 0,s=this.steps[parseInt(e.toString(),10)];if(this.tooltipTemplate){i=this.createElement("span",{className:"e-stepper-tooltip-content"});var n=this.getTemplateFunction(this.tooltipTemplate);(0,t.append)(n({value:s},this,"stepperTooltipTemplate",this.element.id+"tooltipTemplate",this.isStringTemplate),i),this.tooltipObj.setProperties({content:i},!0)}else{var r=s.label?s.label:s.text;this.tooltipObj.setProperties({content:(0,t.initializeCSPTemplate)((function(){return r}))},!0)}this.renderReactTemplates()}},i.prototype.stepClickHandler=function(e,t,i){var s={element:i,event:t,previousStep:this.activeStep,activeStep:e};this.trigger("stepClick",s),this.navigateToStep(e,t,i,!0)},i.prototype.updateTemplateFunction=function(){this.templateFunction=this.template?this.getTemplateFunction(this.template):null},i.prototype.renderItemContent=function(e,i){var s=this.stepperItemList.querySelectorAll("li");if(i&&this.removeItemContent(s[parseInt(e.toString(),10)]),this.template){i?s[parseInt(e.toString(),10)].classList.add(ur):this.stepperItemContainer.classList.add(ur);var n=this.steps[parseInt(e.toString(),10)];(0,t.append)(this.templateFunction({step:n,currentStep:e},this,"stepperTemplate",this.element.id+"_stepperTemplate",this.isStringTemplate),i?s[parseInt(e.toString(),10)]:this.stepperItemContainer)}this.renderReactTemplates()},i.prototype.removeItemContent=function(e){e.classList.remove(ur);for(var t=e.firstElementChild,i=0;i<e.childElementCount;i++)t.remove()},i.prototype.updateContent=function(){this.isReact&&this.clearTemplate(["stepperTemplate"]);for(var e=0;e<this.steps.length;e++)this.renderItemContent(e,!0)},i.prototype.getTemplateFunction=function(e){if("string"==typeof e){var i="";try{var s=(0,t.select)(e);i=s?"SCRIPT"===s.tagName?s.innerHTML:s.outerHTML:e}catch(t){i=e}return(0,t.compile)(i)}return(0,t.compile)(e)},i.prototype.navigateToStep=function(e,t,i,s,n){var r=this,o={element:i,event:t,isInteracted:s,previousStep:this.activeStep,activeStep:e,cancel:!1};if(!1!==n){var l=this.activeStep;this.trigger("stepChanging",o,(function(n){if(!n.cancel){r.navigationHandler(e);var o={element:i,event:t,isInteracted:s,previousStep:l,activeStep:r.activeStep};r.trigger("stepChanged",o)}}))}else this.navigationHandler(e)},i.prototype.navigationHandler=function(e,i,s){e=e>=this.steps.length-1?this.steps.length-1:e;var n=this.stepperItemElements.length;e>=0&&e<n-1&&(e=this.stepperItemElements[parseInt(e.toString(),10)].classList.contains(dr)?this.activeStep:e);var r=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.activeStep=parseInt(e.toString(),10),this.isProtectedOnChange=r;for(var o=0;o<this.steps.length;o++){var l=this.stepperItemElements[parseInt(o.toString(),10)],a=this.steps[parseInt(o.toString(),10)];if(l.classList.remove(nr,rr,ar,or),o===this.activeStep&&l.classList.add(nr),this.activeStep>=0&&this.progressbar)if(this.element.classList.contains(vr))if((this.element.classList.contains(mr)||this.element.classList.contains(fr))&&!this.element.classList.contains(Er)&&this.stepperItemElements[parseInt(this.activeStep.toString(),10)].classList.contains(yr)){var d=this.element.querySelector(".e-stepper-progressbar"),h=this.stepperItemElements[parseInt(this.activeStep.toString(),10)].firstChild,c=0===this.activeStep?0:(h.offsetLeft-d.offsetLeft+h.offsetWidth/2)/d.offsetWidth*100;this.element.classList.contains(pr)?(c=(d.getBoundingClientRect().right-h.getBoundingClientRect().right+h.offsetWidth/2)/d.offsetWidth*100,this.progressbar.style.setProperty(cr,c+"%")):this.progressbar.style.setProperty(cr,c+"%")}else{for(var p=0,u=0,f=0;f<this.stepperItemElements.length;f++)p+=this.stepperItemElements[parseInt(f.toString(),10)].offsetWidth,f<=this.activeStep&&(f<this.activeStep?u+=this.stepperItemElements[parseInt(f.toString(),10)].offsetWidth:f===this.activeStep&&0!==f&&(u+=this.stepperItemElements[parseInt(f.toString(),10)].offsetWidth/2));var m=(u+(this.stepperItemList.offsetWidth-p)/(this.stepperItemElements.length-1)*this.activeStep)/this.stepperItemList.offsetWidth*100;this.progressbar.style.setProperty(cr,m+"%")}else this.progressbar.style.setProperty(cr,100/(this.steps.length-1)*e+"%");else this.activeStep<0&&this.progressbar&&this.progressbar.style.setProperty(cr,"0%");o===this.activeStep?l.classList.add(rr):this.activeStep>0&&o<this.activeStep?l.classList.add(ar):l.classList.add(or),l.classList.contains(rr)?(0,t.attributes)(l,{tabindex:"0","aria-current":"true"}):(0,t.attributes)(l,{tabindex:"-1","aria-current":"false"});var g=this.isProtectedOnChange;this.isProtectedOnChange=!0,!1!==s&&(o<this.activeStep||this.steps.length-1===this.activeStep&&"completed"===a.status.toLowerCase()?a.status=Tn.Completed:o===this.activeStep?a.status=Tn.InProgress:o>this.activeStep&&(a.status=Tn.NotStarted),i&&this.activeStep===o&&(a.status=i),"completed"===a.status.toLowerCase()&&(l.classList.remove(nr,rr,or),l.classList.add(ar)),"notstarted"===a.status.toLowerCase()&&(l.classList.remove(nr,rr,ar),l.classList.add(or))),this.isProtectedOnChange=g,this.renderDefault(o)&&this.element.classList.contains(Er)&&!l.classList.contains("e-step-valid")&&!l.classList.contains("e-step-error")&&(l.classList.contains(ar)?(l.firstChild.classList.remove("e-icons","e-step-indicator"),l.firstChild.classList.add(ir,"e-icons","e-check")):(l.classList.contains(rr)||l.classList.contains(or))&&(l.firstChild.classList.remove(ir,"e-icons","e-check"),l.firstChild.classList.add("e-icons","e-step-indicator")))}},i.prototype.removeItemElements=function(){for(var e=0;e<this.stepperItemElements.length;e++)(0,t.remove)(this.stepperItemElements[parseInt(e.toString(),10)]);this.stepperItemElements=[]},i.prototype.nextStep=function(){this.activeStep!==this.steps.length-1&&this.navigateToStep(this.activeStep+1,null,null,!1)},i.prototype.previousStep=function(){this.activeStep>0&&this.navigateToStep(this.activeStep-1,null,null,!1)},i.prototype.reset=function(){if(0!==this.activeStep){var e=!!this.stepperItemElements[0].classList.contains(dr);this.navigateToStep(e?-1:0,null,null,!1)}},i.prototype.updateElementClassArray=function(){var e=[pr,hr,"e-steps-focus",fr,mr,"e-label-top","e-label-bottom","e-label-start","e-label-end",Er,xr,gr,vr];(0,t.removeClass)([this.element],e)},i.prototype.destroy=function(){var i=this;e.prototype.destroy.call(this),t.EventHandler.remove(window,"resize",(function(){i.stepperItemList&&i.progressbar&&i.setProgressPosition(i.element,!0)})),t.EventHandler.remove(window,"click",(function(){i.updateStepFocus()})),this.removeItemElements(),this.clearTemplate(),this.stepperItemList&&(0,t.remove)(this.stepperItemList),this.stepperItemList=null,this.progressStep&&(0,t.remove)(this.progressStep),this.progressStep=null,this.progressbar=null,this.progressBarPosition=null,this.stepperItemContainer=null,this.textContainer=null,this.labelContainer=null,this.updateElementClassArray(),this.element.removeAttribute("aria-label"),this.showTooltip&&(this.tooltipObj.destroy(),this.tooltipObj=null),this.keyboardModuleStepper&&this.keyboardModuleStepper.destroy(),this.keyboardModuleStepper=null},i.prototype.wireKeyboardEvent=function(){this.keyboardModuleStepper=new t.KeyboardEvents(this.element,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.keyActionHandler=function(e){if(!this.readOnly)switch(e.action){case"uparrow":case"downarrow":case"leftarrow":case"rightarrow":case"tab":case"shiftTab":this.handleNavigation(this.enableRtl&&this.element.classList.contains(vr)?"leftarrow"===e.action||"tab"===e.action||"uparrow"===e.action:"rightarrow"===e.action||"tab"===e.action||"downarrow"===e.action,e);break;case"space":case"enter":case"escape":this.handleNavigation(null,e);break;case"home":case"end":this.handleNavigation(null,e,this.enableRtl)}},i.prototype.handleNavigation=function(e,t,i){this.isKeyNavFocus=!0,this.element.classList.add("e-steps-focus");var s=this.element.querySelector("."+lr);s||(s=this.element.querySelector("."+nr));var n=Array.prototype.slice.call(this.stepperItemList.children),r=n.indexOf(s);if("tab"===t.action||"shiftTab"===t.action||"downarrow"===t.action||"uparrow"===t.action||"space"===t.action||"home"===t.action||"end"===t.action)if("tab"===t.action&&r===n.length-1||"shiftTab"===t.action&&0===r){if(s.classList.contains(lr))return void this.updateStepFocus()}else t.preventDefault();if("escape"===t.action&&(n[parseInt(r.toString(),10)].classList.remove(lr),this.element.classList.remove("e-steps-focus")),"space"!==t.action&&"enter"!==t.action){var o=r;for(r=e?r+1:r-1;r>=0&&r<n.length&&n[parseInt(r.toString(),10)].classList.contains(dr);)r=e?r+1:r-1;r=r<0?0:r>n.length-1?n.length-1:r,n[parseInt(o.toString(),10)].classList.contains(lr)&&n[parseInt(o.toString(),10)].classList.remove(lr),"home"!==t.action&&"end"!==t.action||(r="home"===t.action?i?n.length-1:0:i?0:n.length-1),r>=0&&r<n.length&&n[parseInt(r.toString(),10)].classList.add(lr)}else if("space"===t.action||"enter"===t.action){var l=!1;if(this.linear){var a=this.activeStep-r;1===Math.abs(a)&&(this.navigateToStep(r,null,null,!0),l=!0)}else this.navigateToStep(r,null,null,!0),l=!0;l&&(this.updateStepFocus(),this.stepperItemElements[r].focus())}},i.prototype.renderStepperItems=function(e,t){this.updateElementClassArray(),this.removeItemElements(),this.element.querySelector(".e-stepper-progressbar").remove(),e&&this.updatePosition(),t&&this.updateStepType(),this.readOnly&&!this.element.classList.contains(hr)&&this.element.classList.add(hr),this.enableRtl&&!this.element.classList.contains(pr)&&this.element.classList.add(pr),this.updateOrientaion(this.element),this.renderItems(),this.renderProgressBar(this.element),this.checkValidStep(),this.updateAnimation(),this.navigateToStep(this.activeStep,null,this.stepperItemElements[this.activeStep],!0)},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"steps":if(e.steps instanceof Array&&i.steps instanceof Array)this.renderStepperItems(!0,!0);else for(var r=Object.keys(e.steps),o=0;o<r.length;o++)for(var l=parseInt(Object.keys(e.steps)[o],10),a=Object.keys(e.steps[l]).length,d=0;d<a;d++){"status"===Object.keys(e.steps[l])[d]?this.activeStep===l?this.navigationHandler(l,e.steps[l].status):this.steps[l].status=i.steps[l].status:(this.removeItemElements(),this.renderItems(),this.updateStepperStatus()),this.checkValidStep()}break;case"orientation":this.updateOrientaion(this.element),this.renderStepperItems(!0);break;case"activeStep":if(this.activeStep=e.activeStep>this.steps.length-1||e.activeStep<-1?i.activeStep:this.activeStep,this.activeStep>=0&&this.stepperItemElements[parseInt(this.activeStep.toString(),10)].classList.contains(dr)&&(this.activeStep=i.activeStep),this.linear){var h=i.activeStep-this.activeStep;1===Math.abs(h)&&this.navigateToStep(this.activeStep,null,null,!0)}else this.navigateToStep(this.activeStep,null,this.stepperItemElements[this.activeStep],!0);break;case"enableRtl":this.element.classList[this.enableRtl?"add":"remove"](pr);break;case"readOnly":this.element.classList[this.readOnly?"add":"remove"](hr);break;case"cssClass":i.cssClass&&(0,t.removeClass)([this.element],i.cssClass.trim().split(" ")),e.cssClass&&(0,t.addClass)([this.element],e.cssClass.trim().split(" ")),this.tooltipObj&&this.tooltipObj.setProperties({cssClass:this.cssClass?Or+" "+this.cssClass:Or});break;case"labelPosition":this.renderStepperItems(!0);break;case"showTooltip":this.updateTooltip();break;case"stepType":this.renderStepperItems(!0,!0);break;case"template":this.updateTemplateFunction(),this.updateContent();break;case"animation":this.updateAnimation()}}},tr([(0,t.Property)(0)],i.prototype,"activeStep",void 0),tr([(0,t.Complex)({},wr)],i.prototype,"animation",void 0),tr([(0,t.Property)(!1)],i.prototype,"linear",void 0),tr([(0,t.Property)(!1)],i.prototype,"showTooltip",void 0),tr([(0,t.Property)("")],i.prototype,"template",void 0),tr([(0,t.Property)("")],i.prototype,"tooltipTemplate",void 0),tr([(0,t.Property)(Jn.Bottom)],i.prototype,"labelPosition",void 0),tr([(0,t.Property)(Zn.Default)],i.prototype,"stepType",void 0),tr([(0,t.Event)()],i.prototype,"stepChanged",void 0),tr([(0,t.Event)()],i.prototype,"stepChanging",void 0),tr([(0,t.Event)()],i.prototype,"stepClick",void 0),tr([(0,t.Event)()],i.prototype,"beforeStepRender",void 0),i=tr([t.NotifyPropertyChanges],i)}($n)})(),d})()));