@syncfusion/ej2-inputs 32.1.20 → 32.1.24

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 (1956) hide show
  1. package/README.md +1 -1
  2. package/dist/ej2-inputs.min.js +2 -2
  3. package/dist/ej2-inputs.umd.min.js +2 -2
  4. package/dist/ej2-inputs.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-inputs.es2015.js +13 -1
  6. package/dist/es6/ej2-inputs.es2015.js.map +1 -1
  7. package/dist/es6/ej2-inputs.es5.js +17 -5
  8. package/dist/es6/ej2-inputs.es5.js.map +1 -1
  9. package/dist/global/ej2-inputs.min.js +2 -2
  10. package/dist/global/ej2-inputs.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +5 -5
  13. package/src/numerictextbox/numerictextbox.js +1 -0
  14. package/src/uploader/uploader.js +16 -5
  15. package/styles/bds-lite.css +684 -11
  16. package/styles/bds-lite.scss +14 -14
  17. package/styles/bds.css +1206 -128
  18. package/styles/bds.scss +24 -24
  19. package/styles/bootstrap-dark-lite.css +6 -4
  20. package/styles/bootstrap-dark-lite.scss +14 -14
  21. package/styles/bootstrap-dark.css +9 -4
  22. package/styles/bootstrap-dark.scss +24 -24
  23. package/styles/bootstrap-lite.css +6 -4
  24. package/styles/bootstrap-lite.scss +14 -14
  25. package/styles/bootstrap.css +9 -4
  26. package/styles/bootstrap.scss +24 -24
  27. package/styles/bootstrap4-lite.css +6 -4
  28. package/styles/bootstrap4-lite.scss +14 -14
  29. package/styles/bootstrap4.css +9 -4
  30. package/styles/bootstrap4.scss +24 -24
  31. package/styles/bootstrap5-dark-lite.css +6 -4
  32. package/styles/bootstrap5-dark-lite.scss +14 -14
  33. package/styles/bootstrap5-dark.css +9 -4
  34. package/styles/bootstrap5-dark.scss +24 -24
  35. package/styles/bootstrap5-lite.css +6 -4
  36. package/styles/bootstrap5-lite.scss +14 -14
  37. package/styles/bootstrap5.3-lite.css +2359 -89
  38. package/styles/bootstrap5.3-lite.scss +14 -14
  39. package/styles/bootstrap5.3.css +3391 -110
  40. package/styles/bootstrap5.3.scss +24 -24
  41. package/styles/bootstrap5.css +9 -4
  42. package/styles/bootstrap5.scss +24 -24
  43. package/styles/color-picker/_all.bds.scss +2 -0
  44. package/styles/color-picker/_all.bootstrap-dark.scss +2 -0
  45. package/styles/color-picker/_all.bootstrap.scss +2 -0
  46. package/styles/color-picker/_all.bootstrap4.scss +2 -0
  47. package/styles/color-picker/_all.bootstrap5-dark.scss +2 -0
  48. package/styles/color-picker/_all.bootstrap5.3.scss +2 -0
  49. package/styles/color-picker/_all.bootstrap5.scss +2 -0
  50. package/styles/color-picker/_all.fabric-dark.scss +2 -0
  51. package/styles/color-picker/_all.fabric.scss +2 -0
  52. package/styles/color-picker/_all.fluent-dark.scss +2 -0
  53. package/styles/color-picker/_all.fluent.scss +2 -0
  54. package/styles/color-picker/_all.fluent2.scss +2 -0
  55. package/styles/color-picker/_all.highcontrast-light.scss +2 -0
  56. package/styles/color-picker/_all.highcontrast.scss +2 -0
  57. package/styles/color-picker/_all.material-dark.scss +2 -0
  58. package/styles/color-picker/_all.material.scss +2 -0
  59. package/styles/color-picker/_all.material3-dark.scss +2 -0
  60. package/styles/color-picker/_all.material3.scss +2 -0
  61. package/styles/color-picker/_all.tailwind-dark.scss +2 -0
  62. package/styles/color-picker/_all.tailwind.scss +2 -0
  63. package/styles/color-picker/_all.tailwind3.scss +2 -0
  64. package/styles/color-picker/_bigger.bds.scss +3 -0
  65. package/styles/color-picker/_bigger.bootstrap-dark.scss +3 -0
  66. package/styles/color-picker/_bigger.bootstrap.scss +3 -0
  67. package/styles/color-picker/_bigger.bootstrap4.scss +3 -0
  68. package/styles/color-picker/_bigger.bootstrap5-dark.scss +3 -0
  69. package/styles/color-picker/_bigger.bootstrap5.3.scss +3 -0
  70. package/styles/color-picker/_bigger.bootstrap5.scss +3 -0
  71. package/styles/color-picker/_bigger.fabric-dark.scss +3 -0
  72. package/styles/color-picker/_bigger.fabric.scss +3 -0
  73. package/styles/color-picker/_bigger.fluent-dark.scss +3 -0
  74. package/styles/color-picker/_bigger.fluent.scss +3 -0
  75. package/styles/color-picker/_bigger.fluent2.scss +3 -0
  76. package/styles/color-picker/_bigger.highcontrast-light.scss +3 -0
  77. package/styles/color-picker/_bigger.highcontrast.scss +3 -0
  78. package/styles/color-picker/_bigger.material-dark.scss +3 -0
  79. package/styles/color-picker/_bigger.material.scss +3 -0
  80. package/styles/color-picker/_bigger.material3-dark.scss +3 -0
  81. package/styles/color-picker/_bigger.material3.scss +3 -0
  82. package/styles/color-picker/_bigger.scss +0 -1
  83. package/styles/color-picker/_bigger.tailwind-dark.scss +3 -0
  84. package/styles/color-picker/_bigger.tailwind.scss +3 -0
  85. package/styles/color-picker/_bigger.tailwind3.scss +3 -0
  86. package/styles/color-picker/_bootstrap5.3-definition.scss +0 -1
  87. package/styles/color-picker/_fluent2-definition.scss +0 -1
  88. package/styles/color-picker/_layout.bds.scss +3 -0
  89. package/styles/color-picker/_layout.bootstrap-dark.scss +3 -0
  90. package/styles/color-picker/_layout.bootstrap.scss +3 -0
  91. package/styles/color-picker/_layout.bootstrap4.scss +3 -0
  92. package/styles/color-picker/_layout.bootstrap5-dark.scss +3 -0
  93. package/styles/color-picker/_layout.bootstrap5.3.scss +3 -0
  94. package/styles/color-picker/_layout.bootstrap5.scss +3 -0
  95. package/styles/color-picker/_layout.fabric-dark.scss +3 -0
  96. package/styles/color-picker/_layout.fabric.scss +3 -0
  97. package/styles/color-picker/_layout.fluent-dark.scss +3 -0
  98. package/styles/color-picker/_layout.fluent.scss +3 -0
  99. package/styles/color-picker/_layout.fluent2.scss +3 -0
  100. package/styles/color-picker/_layout.highcontrast-light.scss +3 -0
  101. package/styles/color-picker/_layout.highcontrast.scss +3 -0
  102. package/styles/color-picker/_layout.material-dark.scss +3 -0
  103. package/styles/color-picker/_layout.material.scss +3 -0
  104. package/styles/color-picker/_layout.material3-dark.scss +3 -0
  105. package/styles/color-picker/_layout.material3.scss +3 -0
  106. package/styles/color-picker/_layout.scss +0 -2
  107. package/styles/color-picker/_layout.tailwind-dark.scss +3 -0
  108. package/styles/color-picker/_layout.tailwind.scss +3 -0
  109. package/styles/color-picker/_layout.tailwind3.scss +3 -0
  110. package/styles/color-picker/_material3-dark-definition.scss +0 -1
  111. package/styles/color-picker/_material3-definition.scss +0 -1
  112. package/styles/color-picker/_tailwind3-definition.scss +0 -1
  113. package/styles/color-picker/_theme-variables.bds.scss +1 -0
  114. package/styles/color-picker/_theme-variables.bootstrap-dark.scss +1 -0
  115. package/styles/color-picker/_theme-variables.bootstrap.scss +1 -0
  116. package/styles/color-picker/_theme-variables.bootstrap4.scss +1 -0
  117. package/styles/color-picker/_theme-variables.bootstrap5-dark.scss +1 -0
  118. package/styles/color-picker/_theme-variables.bootstrap5.3.scss +1 -0
  119. package/styles/color-picker/_theme-variables.bootstrap5.scss +1 -0
  120. package/styles/color-picker/_theme-variables.fabric-dark.scss +1 -0
  121. package/styles/color-picker/_theme-variables.fabric.scss +1 -0
  122. package/styles/color-picker/_theme-variables.fluent-dark.scss +1 -0
  123. package/styles/color-picker/_theme-variables.fluent.scss +1 -0
  124. package/styles/color-picker/_theme-variables.fluent2.scss +1 -0
  125. package/styles/color-picker/_theme-variables.highcontrast-light.scss +1 -0
  126. package/styles/color-picker/_theme-variables.highcontrast.scss +1 -0
  127. package/styles/color-picker/_theme-variables.material-dark.scss +1 -0
  128. package/styles/color-picker/_theme-variables.material.scss +1 -0
  129. package/styles/color-picker/_theme-variables.material3-dark.scss +1 -0
  130. package/styles/color-picker/_theme-variables.material3.scss +1 -0
  131. package/styles/color-picker/_theme-variables.tailwind-dark.scss +1 -0
  132. package/styles/color-picker/_theme-variables.tailwind.scss +1 -0
  133. package/styles/color-picker/_theme.bds.scss +4 -0
  134. package/styles/color-picker/_theme.bootstrap-dark.scss +4 -0
  135. package/styles/color-picker/_theme.bootstrap.scss +4 -0
  136. package/styles/color-picker/_theme.bootstrap4.scss +4 -0
  137. package/styles/color-picker/_theme.bootstrap5-dark.scss +4 -0
  138. package/styles/color-picker/_theme.bootstrap5.3.scss +4 -0
  139. package/styles/color-picker/_theme.bootstrap5.scss +4 -0
  140. package/styles/color-picker/_theme.fabric-dark.scss +4 -0
  141. package/styles/color-picker/_theme.fabric.scss +4 -0
  142. package/styles/color-picker/_theme.fluent-dark.scss +4 -0
  143. package/styles/color-picker/_theme.fluent.scss +4 -0
  144. package/styles/color-picker/_theme.fluent2.scss +4 -0
  145. package/styles/color-picker/_theme.highcontrast-light.scss +4 -0
  146. package/styles/color-picker/_theme.highcontrast.scss +4 -0
  147. package/styles/color-picker/_theme.material-dark.scss +4 -0
  148. package/styles/color-picker/_theme.material.scss +4 -0
  149. package/styles/color-picker/_theme.material3-dark.scss +4 -0
  150. package/styles/color-picker/_theme.material3.scss +4 -0
  151. package/styles/color-picker/_theme.scss +0 -1
  152. package/styles/color-picker/_theme.tailwind-dark.scss +4 -0
  153. package/styles/color-picker/_theme.tailwind.scss +4 -0
  154. package/styles/color-picker/_theme.tailwind3.scss +4 -0
  155. package/styles/color-picker/bds.css +204 -2
  156. package/styles/color-picker/bds.scss +2 -2
  157. package/styles/color-picker/bootstrap-dark.css +0 -2
  158. package/styles/color-picker/bootstrap-dark.scss +2 -2
  159. package/styles/color-picker/bootstrap.css +0 -2
  160. package/styles/color-picker/bootstrap.scss +2 -2
  161. package/styles/color-picker/bootstrap4.css +0 -2
  162. package/styles/color-picker/bootstrap4.scss +2 -2
  163. package/styles/color-picker/bootstrap5-dark.css +0 -2
  164. package/styles/color-picker/bootstrap5-dark.scss +2 -2
  165. package/styles/color-picker/bootstrap5.3.css +252 -2
  166. package/styles/color-picker/bootstrap5.3.scss +2 -2
  167. package/styles/color-picker/bootstrap5.css +0 -2
  168. package/styles/color-picker/bootstrap5.scss +2 -2
  169. package/styles/color-picker/fabric-dark.css +0 -2
  170. package/styles/color-picker/fabric-dark.scss +2 -2
  171. package/styles/color-picker/fabric.css +0 -2
  172. package/styles/color-picker/fabric.scss +2 -2
  173. package/styles/color-picker/fluent-dark.css +0 -2
  174. package/styles/color-picker/fluent-dark.scss +2 -2
  175. package/styles/color-picker/fluent.css +0 -2
  176. package/styles/color-picker/fluent.scss +2 -2
  177. package/styles/color-picker/fluent2.css +258 -2
  178. package/styles/color-picker/fluent2.scss +2 -2
  179. package/styles/color-picker/highcontrast-light.css +0 -2
  180. package/styles/color-picker/highcontrast-light.scss +2 -2
  181. package/styles/color-picker/highcontrast.css +0 -2
  182. package/styles/color-picker/highcontrast.scss +2 -2
  183. package/styles/color-picker/material-dark.css +0 -2
  184. package/styles/color-picker/material-dark.scss +2 -2
  185. package/styles/color-picker/material.css +0 -2
  186. package/styles/color-picker/material.scss +2 -2
  187. package/styles/color-picker/material3-dark.css +246 -2
  188. package/styles/color-picker/material3-dark.scss +2 -2
  189. package/styles/color-picker/material3.css +252 -2
  190. package/styles/color-picker/material3.scss +2 -2
  191. package/styles/color-picker/tailwind-dark.css +0 -2
  192. package/styles/color-picker/tailwind-dark.scss +2 -2
  193. package/styles/color-picker/tailwind.css +0 -2
  194. package/styles/color-picker/tailwind.scss +2 -2
  195. package/styles/color-picker/tailwind3.css +222 -2
  196. package/styles/color-picker/tailwind3.scss +2 -2
  197. package/styles/data-form/_all.bds.scss +2 -0
  198. package/styles/data-form/_all.bootstrap-dark.scss +2 -0
  199. package/styles/data-form/_all.bootstrap.scss +2 -0
  200. package/styles/data-form/_all.bootstrap4.scss +2 -0
  201. package/styles/data-form/_all.bootstrap5-dark.scss +2 -0
  202. package/styles/data-form/_all.bootstrap5.3.scss +2 -0
  203. package/styles/data-form/_all.bootstrap5.scss +2 -0
  204. package/styles/data-form/_all.fabric-dark.scss +2 -0
  205. package/styles/data-form/_all.fabric.scss +2 -0
  206. package/styles/data-form/_all.fluent-dark.scss +2 -0
  207. package/styles/data-form/_all.fluent.scss +2 -0
  208. package/styles/data-form/_all.fluent2.scss +2 -0
  209. package/styles/data-form/_all.highcontrast-light.scss +2 -0
  210. package/styles/data-form/_all.highcontrast.scss +2 -0
  211. package/styles/data-form/_all.material-dark.scss +2 -0
  212. package/styles/data-form/_all.material.scss +2 -0
  213. package/styles/data-form/_all.material3-dark.scss +2 -0
  214. package/styles/data-form/_all.material3.scss +2 -0
  215. package/styles/data-form/_all.tailwind-dark.scss +2 -0
  216. package/styles/data-form/_all.tailwind.scss +2 -0
  217. package/styles/data-form/_all.tailwind3.scss +2 -0
  218. package/styles/data-form/_layout.bds.scss +3 -0
  219. package/styles/data-form/_layout.bootstrap-dark.scss +3 -0
  220. package/styles/data-form/_layout.bootstrap.scss +3 -0
  221. package/styles/data-form/_layout.bootstrap4.scss +3 -0
  222. package/styles/data-form/_layout.bootstrap5-dark.scss +3 -0
  223. package/styles/data-form/_layout.bootstrap5.3.scss +3 -0
  224. package/styles/data-form/_layout.bootstrap5.scss +3 -0
  225. package/styles/data-form/_layout.fabric-dark.scss +3 -0
  226. package/styles/data-form/_layout.fabric.scss +3 -0
  227. package/styles/data-form/_layout.fluent-dark.scss +3 -0
  228. package/styles/data-form/_layout.fluent.scss +3 -0
  229. package/styles/data-form/_layout.fluent2.scss +3 -0
  230. package/styles/data-form/_layout.highcontrast-light.scss +3 -0
  231. package/styles/data-form/_layout.highcontrast.scss +3 -0
  232. package/styles/data-form/_layout.material-dark.scss +3 -0
  233. package/styles/data-form/_layout.material.scss +3 -0
  234. package/styles/data-form/_layout.material3-dark.scss +3 -0
  235. package/styles/data-form/_layout.material3.scss +3 -0
  236. package/styles/data-form/_layout.scss +0 -1
  237. package/styles/data-form/_layout.tailwind-dark.scss +3 -0
  238. package/styles/data-form/_layout.tailwind.scss +3 -0
  239. package/styles/data-form/_layout.tailwind3.scss +3 -0
  240. package/styles/data-form/_theme-variables.bds.scss +1 -0
  241. package/styles/data-form/_theme-variables.bootstrap-dark.scss +1 -0
  242. package/styles/data-form/_theme-variables.bootstrap.scss +1 -0
  243. package/styles/data-form/_theme-variables.bootstrap4.scss +1 -0
  244. package/styles/data-form/_theme-variables.bootstrap5-dark.scss +1 -0
  245. package/styles/data-form/_theme-variables.bootstrap5.3.scss +1 -0
  246. package/styles/data-form/_theme-variables.bootstrap5.scss +1 -0
  247. package/styles/data-form/_theme-variables.fabric-dark.scss +1 -0
  248. package/styles/data-form/_theme-variables.fabric.scss +1 -0
  249. package/styles/data-form/_theme-variables.fluent-dark.scss +1 -0
  250. package/styles/data-form/_theme-variables.fluent.scss +1 -0
  251. package/styles/data-form/_theme-variables.fluent2.scss +1 -0
  252. package/styles/data-form/_theme-variables.highcontrast-light.scss +1 -0
  253. package/styles/data-form/_theme-variables.highcontrast.scss +1 -0
  254. package/styles/data-form/_theme-variables.material-dark.scss +1 -0
  255. package/styles/data-form/_theme-variables.material.scss +1 -0
  256. package/styles/data-form/_theme-variables.material3-dark.scss +1 -0
  257. package/styles/data-form/_theme-variables.material3.scss +1 -0
  258. package/styles/data-form/_theme-variables.tailwind-dark.scss +1 -0
  259. package/styles/data-form/_theme-variables.tailwind.scss +1 -0
  260. package/styles/data-form/_theme.bds.scss +4 -0
  261. package/styles/data-form/_theme.bootstrap-dark.scss +4 -0
  262. package/styles/data-form/_theme.bootstrap.scss +4 -0
  263. package/styles/data-form/_theme.bootstrap4.scss +4 -0
  264. package/styles/data-form/_theme.bootstrap5-dark.scss +4 -0
  265. package/styles/data-form/_theme.bootstrap5.3.scss +4 -0
  266. package/styles/data-form/_theme.bootstrap5.scss +4 -0
  267. package/styles/data-form/_theme.fabric-dark.scss +4 -0
  268. package/styles/data-form/_theme.fabric.scss +4 -0
  269. package/styles/data-form/_theme.fluent-dark.scss +4 -0
  270. package/styles/data-form/_theme.fluent.scss +4 -0
  271. package/styles/data-form/_theme.fluent2.scss +4 -0
  272. package/styles/data-form/_theme.highcontrast-light.scss +4 -0
  273. package/styles/data-form/_theme.highcontrast.scss +4 -0
  274. package/styles/data-form/_theme.material-dark.scss +4 -0
  275. package/styles/data-form/_theme.material.scss +4 -0
  276. package/styles/data-form/_theme.material3-dark.scss +4 -0
  277. package/styles/data-form/_theme.material3.scss +4 -0
  278. package/styles/data-form/_theme.scss +0 -1
  279. package/styles/data-form/_theme.tailwind-dark.scss +4 -0
  280. package/styles/data-form/_theme.tailwind.scss +4 -0
  281. package/styles/data-form/_theme.tailwind3.scss +4 -0
  282. package/styles/data-form/bds.css +10 -0
  283. package/styles/data-form/bds.scss +1 -1
  284. package/styles/data-form/bootstrap-dark.css +2 -0
  285. package/styles/data-form/bootstrap-dark.scss +1 -1
  286. package/styles/data-form/bootstrap.css +2 -0
  287. package/styles/data-form/bootstrap.scss +1 -1
  288. package/styles/data-form/bootstrap4.css +2 -0
  289. package/styles/data-form/bootstrap4.scss +1 -1
  290. package/styles/data-form/bootstrap5-dark.css +2 -0
  291. package/styles/data-form/bootstrap5-dark.scss +1 -1
  292. package/styles/data-form/bootstrap5.3.css +170 -0
  293. package/styles/data-form/bootstrap5.3.scss +1 -1
  294. package/styles/data-form/bootstrap5.css +2 -0
  295. package/styles/data-form/bootstrap5.scss +1 -1
  296. package/styles/data-form/fabric-dark.css +2 -0
  297. package/styles/data-form/fabric-dark.scss +1 -1
  298. package/styles/data-form/fabric.css +2 -0
  299. package/styles/data-form/fabric.scss +1 -1
  300. package/styles/data-form/fluent-dark.css +2 -0
  301. package/styles/data-form/fluent-dark.scss +1 -1
  302. package/styles/data-form/fluent.css +2 -0
  303. package/styles/data-form/fluent.scss +1 -1
  304. package/styles/data-form/fluent2.css +174 -0
  305. package/styles/data-form/fluent2.scss +1 -1
  306. package/styles/data-form/highcontrast-light.css +2 -0
  307. package/styles/data-form/highcontrast-light.scss +1 -1
  308. package/styles/data-form/highcontrast.css +2 -0
  309. package/styles/data-form/highcontrast.scss +1 -1
  310. package/styles/data-form/material-dark.css +2 -0
  311. package/styles/data-form/material-dark.scss +1 -1
  312. package/styles/data-form/material.css +2 -0
  313. package/styles/data-form/material.scss +1 -1
  314. package/styles/data-form/material3-dark.css +166 -0
  315. package/styles/data-form/material3-dark.scss +1 -1
  316. package/styles/data-form/material3.css +170 -0
  317. package/styles/data-form/material3.scss +1 -1
  318. package/styles/data-form/tailwind-dark.css +2 -0
  319. package/styles/data-form/tailwind-dark.scss +1 -1
  320. package/styles/data-form/tailwind.css +2 -0
  321. package/styles/data-form/tailwind.scss +1 -1
  322. package/styles/data-form/tailwind3.css +150 -0
  323. package/styles/data-form/tailwind3.scss +1 -1
  324. package/styles/fabric-dark-lite.css +6 -4
  325. package/styles/fabric-dark-lite.scss +14 -14
  326. package/styles/fabric-dark.css +9 -4
  327. package/styles/fabric-dark.scss +24 -24
  328. package/styles/fabric-lite.css +6 -4
  329. package/styles/fabric-lite.scss +14 -14
  330. package/styles/fabric.css +9 -4
  331. package/styles/fabric.scss +24 -24
  332. package/styles/fluent-dark-lite.css +6 -4
  333. package/styles/fluent-dark-lite.scss +14 -14
  334. package/styles/fluent-dark.css +9 -4
  335. package/styles/fluent-dark.scss +24 -24
  336. package/styles/fluent-lite.css +6 -4
  337. package/styles/fluent-lite.scss +14 -14
  338. package/styles/fluent.css +9 -4
  339. package/styles/fluent.scss +24 -24
  340. package/styles/fluent2-lite.css +3476 -567
  341. package/styles/fluent2-lite.scss +14 -14
  342. package/styles/fluent2.css +5435 -1101
  343. package/styles/fluent2.scss +24 -24
  344. package/styles/highcontrast-light-lite.css +6 -4
  345. package/styles/highcontrast-light-lite.scss +14 -14
  346. package/styles/highcontrast-light.css +9 -4
  347. package/styles/highcontrast-light.scss +24 -24
  348. package/styles/highcontrast-lite.css +6 -4
  349. package/styles/highcontrast-lite.scss +14 -14
  350. package/styles/highcontrast.css +9 -4
  351. package/styles/highcontrast.scss +24 -24
  352. package/styles/input/_all.bds.scss +2 -0
  353. package/styles/input/_all.bootstrap-dark.scss +2 -0
  354. package/styles/input/_all.bootstrap.scss +2 -0
  355. package/styles/input/_all.bootstrap4.scss +2 -0
  356. package/styles/input/_all.bootstrap5-dark.scss +2 -0
  357. package/styles/input/_all.bootstrap5.3.scss +2 -0
  358. package/styles/input/_all.bootstrap5.scss +2 -0
  359. package/styles/input/_all.fabric-dark.scss +2 -0
  360. package/styles/input/_all.fabric.scss +2 -0
  361. package/styles/input/_all.fluent-dark.scss +2 -0
  362. package/styles/input/_all.fluent.scss +2 -0
  363. package/styles/input/_all.fluent2.scss +2 -0
  364. package/styles/input/_all.highcontrast-light.scss +2 -0
  365. package/styles/input/_all.highcontrast.scss +2 -0
  366. package/styles/input/_all.material-dark.scss +2 -0
  367. package/styles/input/_all.material.scss +2 -0
  368. package/styles/input/_all.material3-dark.scss +2 -0
  369. package/styles/input/_all.material3.scss +2 -0
  370. package/styles/input/_all.tailwind-dark.scss +2 -0
  371. package/styles/input/_all.tailwind.scss +2 -0
  372. package/styles/input/_all.tailwind3.scss +2 -0
  373. package/styles/input/_bigger.bds.scss +3 -0
  374. package/styles/input/_bigger.bootstrap-dark.scss +3 -0
  375. package/styles/input/_bigger.bootstrap.scss +3 -0
  376. package/styles/input/_bigger.bootstrap4.scss +3 -0
  377. package/styles/input/_bigger.bootstrap5-dark.scss +3 -0
  378. package/styles/input/_bigger.bootstrap5.3.scss +3 -0
  379. package/styles/input/_bigger.bootstrap5.scss +3 -0
  380. package/styles/input/_bigger.fabric-dark.scss +3 -0
  381. package/styles/input/_bigger.fabric.scss +3 -0
  382. package/styles/input/_bigger.fluent-dark.scss +3 -0
  383. package/styles/input/_bigger.fluent.scss +3 -0
  384. package/styles/input/_bigger.fluent2.scss +3 -0
  385. package/styles/input/_bigger.highcontrast-light.scss +3 -0
  386. package/styles/input/_bigger.highcontrast.scss +3 -0
  387. package/styles/input/_bigger.material-dark.scss +3 -0
  388. package/styles/input/_bigger.material.scss +3 -0
  389. package/styles/input/_bigger.material3-dark.scss +3 -0
  390. package/styles/input/_bigger.material3.scss +3 -0
  391. package/styles/input/_bigger.scss +1 -5
  392. package/styles/input/_bigger.tailwind-dark.scss +3 -0
  393. package/styles/input/_bigger.tailwind.scss +3 -0
  394. package/styles/input/_bigger.tailwind3.scss +3 -0
  395. package/styles/input/_layout.bds.scss +3 -0
  396. package/styles/input/_layout.bootstrap-dark.scss +3 -0
  397. package/styles/input/_layout.bootstrap.scss +3 -0
  398. package/styles/input/_layout.bootstrap4.scss +3 -0
  399. package/styles/input/_layout.bootstrap5-dark.scss +3 -0
  400. package/styles/input/_layout.bootstrap5.3.scss +3 -0
  401. package/styles/input/_layout.bootstrap5.scss +3 -0
  402. package/styles/input/_layout.fabric-dark.scss +3 -0
  403. package/styles/input/_layout.fabric.scss +3 -0
  404. package/styles/input/_layout.fluent-dark.scss +3 -0
  405. package/styles/input/_layout.fluent.scss +3 -0
  406. package/styles/input/_layout.fluent2.scss +3 -0
  407. package/styles/input/_layout.highcontrast-light.scss +3 -0
  408. package/styles/input/_layout.highcontrast.scss +3 -0
  409. package/styles/input/_layout.material-dark.scss +3 -0
  410. package/styles/input/_layout.material.scss +3 -0
  411. package/styles/input/_layout.material3-dark.scss +3 -0
  412. package/styles/input/_layout.material3.scss +3 -0
  413. package/styles/input/_layout.scss +0 -1
  414. package/styles/input/_layout.tailwind-dark.scss +3 -0
  415. package/styles/input/_layout.tailwind.scss +3 -0
  416. package/styles/input/_layout.tailwind3.scss +3 -0
  417. package/styles/input/_material3-dark-definition.scss +3 -3
  418. package/styles/input/_material3-definition.scss +3 -3
  419. package/styles/input/_theme-variables.bds.scss +1 -0
  420. package/styles/input/_theme-variables.bootstrap-dark.scss +1 -0
  421. package/styles/input/_theme-variables.bootstrap.scss +1 -0
  422. package/styles/input/_theme-variables.bootstrap4.scss +1 -0
  423. package/styles/input/_theme-variables.bootstrap5-dark.scss +1 -0
  424. package/styles/input/_theme-variables.bootstrap5.3.scss +1 -0
  425. package/styles/input/_theme-variables.bootstrap5.scss +1 -0
  426. package/styles/input/_theme-variables.fabric-dark.scss +1 -0
  427. package/styles/input/_theme-variables.fabric.scss +1 -0
  428. package/styles/input/_theme-variables.fluent-dark.scss +1 -0
  429. package/styles/input/_theme-variables.fluent.scss +1 -0
  430. package/styles/input/_theme-variables.fluent2.scss +1 -0
  431. package/styles/input/_theme-variables.highcontrast-light.scss +1 -0
  432. package/styles/input/_theme-variables.highcontrast.scss +1 -0
  433. package/styles/input/_theme-variables.material-dark.scss +1 -0
  434. package/styles/input/_theme-variables.material.scss +1 -0
  435. package/styles/input/_theme-variables.material3-dark.scss +1 -0
  436. package/styles/input/_theme-variables.material3.scss +1 -0
  437. package/styles/input/_theme-variables.tailwind-dark.scss +1 -0
  438. package/styles/input/_theme-variables.tailwind.scss +1 -0
  439. package/styles/input/_theme.bds.scss +4 -0
  440. package/styles/input/_theme.bootstrap-dark.scss +4 -0
  441. package/styles/input/_theme.bootstrap.scss +4 -0
  442. package/styles/input/_theme.bootstrap4.scss +4 -0
  443. package/styles/input/_theme.bootstrap5-dark.scss +4 -0
  444. package/styles/input/_theme.bootstrap5.3.scss +4 -0
  445. package/styles/input/_theme.bootstrap5.scss +4 -0
  446. package/styles/input/_theme.fabric-dark.scss +4 -0
  447. package/styles/input/_theme.fabric.scss +4 -0
  448. package/styles/input/_theme.fluent-dark.scss +4 -0
  449. package/styles/input/_theme.fluent.scss +4 -0
  450. package/styles/input/_theme.fluent2.scss +4 -0
  451. package/styles/input/_theme.highcontrast-light.scss +4 -0
  452. package/styles/input/_theme.highcontrast.scss +4 -0
  453. package/styles/input/_theme.material-dark.scss +4 -0
  454. package/styles/input/_theme.material.scss +4 -0
  455. package/styles/input/_theme.material3-dark.scss +4 -0
  456. package/styles/input/_theme.material3.scss +4 -0
  457. package/styles/input/_theme.scss +0 -1
  458. package/styles/input/_theme.tailwind-dark.scss +4 -0
  459. package/styles/input/_theme.tailwind.scss +4 -0
  460. package/styles/input/_theme.tailwind3.scss +4 -0
  461. package/styles/input/bds.css +450 -1
  462. package/styles/input/bds.scss +2 -2
  463. package/styles/input/bootstrap-dark.css +3 -1
  464. package/styles/input/bootstrap-dark.scss +2 -2
  465. package/styles/input/bootstrap.css +3 -1
  466. package/styles/input/bootstrap.scss +2 -2
  467. package/styles/input/bootstrap4.css +3 -1
  468. package/styles/input/bootstrap4.scss +2 -2
  469. package/styles/input/bootstrap5-dark.css +3 -1
  470. package/styles/input/bootstrap5-dark.scss +2 -2
  471. package/styles/input/bootstrap5.3.css +255 -1
  472. package/styles/input/bootstrap5.3.scss +2 -2
  473. package/styles/input/bootstrap5.css +3 -1
  474. package/styles/input/bootstrap5.scss +2 -2
  475. package/styles/input/fabric-dark.css +3 -1
  476. package/styles/input/fabric-dark.scss +2 -2
  477. package/styles/input/fabric.css +3 -1
  478. package/styles/input/fabric.scss +2 -2
  479. package/styles/input/fluent-dark.css +3 -1
  480. package/styles/input/fluent-dark.scss +2 -2
  481. package/styles/input/fluent.css +3 -1
  482. package/styles/input/fluent.scss +2 -2
  483. package/styles/input/fluent2.css +1074 -229
  484. package/styles/input/fluent2.scss +2 -2
  485. package/styles/input/highcontrast-light.css +3 -1
  486. package/styles/input/highcontrast-light.scss +2 -2
  487. package/styles/input/highcontrast.css +3 -1
  488. package/styles/input/highcontrast.scss +2 -2
  489. package/styles/input/material-dark.css +24 -1
  490. package/styles/input/material-dark.scss +2 -2
  491. package/styles/input/material.css +54 -1
  492. package/styles/input/material.scss +2 -2
  493. package/styles/input/material3-dark.css +304 -5
  494. package/styles/input/material3-dark.scss +2 -2
  495. package/styles/input/material3.css +310 -5
  496. package/styles/input/material3.scss +2 -2
  497. package/styles/input/tailwind-dark.css +3 -1
  498. package/styles/input/tailwind-dark.scss +2 -2
  499. package/styles/input/tailwind.css +3 -1
  500. package/styles/input/tailwind.scss +2 -2
  501. package/styles/input/tailwind3.css +405 -1
  502. package/styles/input/tailwind3.scss +2 -2
  503. package/styles/maskedtextbox/_all.bds.scss +2 -0
  504. package/styles/maskedtextbox/_all.bootstrap-dark.scss +2 -0
  505. package/styles/maskedtextbox/_all.bootstrap.scss +2 -0
  506. package/styles/maskedtextbox/_all.bootstrap4.scss +2 -0
  507. package/styles/maskedtextbox/_all.bootstrap5-dark.scss +2 -0
  508. package/styles/maskedtextbox/_all.bootstrap5.3.scss +2 -0
  509. package/styles/maskedtextbox/_all.bootstrap5.scss +2 -0
  510. package/styles/maskedtextbox/_all.fabric-dark.scss +2 -0
  511. package/styles/maskedtextbox/_all.fabric.scss +2 -0
  512. package/styles/maskedtextbox/_all.fluent-dark.scss +2 -0
  513. package/styles/maskedtextbox/_all.fluent.scss +2 -0
  514. package/styles/maskedtextbox/_all.fluent2.scss +2 -0
  515. package/styles/maskedtextbox/_all.highcontrast-light.scss +2 -0
  516. package/styles/maskedtextbox/_all.highcontrast.scss +2 -0
  517. package/styles/maskedtextbox/_all.material-dark.scss +2 -0
  518. package/styles/maskedtextbox/_all.material.scss +2 -0
  519. package/styles/maskedtextbox/_all.material3-dark.scss +2 -0
  520. package/styles/maskedtextbox/_all.material3.scss +2 -0
  521. package/styles/maskedtextbox/_all.tailwind-dark.scss +2 -0
  522. package/styles/maskedtextbox/_all.tailwind.scss +2 -0
  523. package/styles/maskedtextbox/_all.tailwind3.scss +2 -0
  524. package/styles/maskedtextbox/_bigger.bds.scss +3 -0
  525. package/styles/maskedtextbox/_bigger.bootstrap-dark.scss +3 -0
  526. package/styles/maskedtextbox/_bigger.bootstrap.scss +3 -0
  527. package/styles/maskedtextbox/_bigger.bootstrap4.scss +3 -0
  528. package/styles/maskedtextbox/_bigger.bootstrap5-dark.scss +3 -0
  529. package/styles/maskedtextbox/_bigger.bootstrap5.3.scss +3 -0
  530. package/styles/maskedtextbox/_bigger.bootstrap5.scss +3 -0
  531. package/styles/maskedtextbox/_bigger.fabric-dark.scss +3 -0
  532. package/styles/maskedtextbox/_bigger.fabric.scss +3 -0
  533. package/styles/maskedtextbox/_bigger.fluent-dark.scss +3 -0
  534. package/styles/maskedtextbox/_bigger.fluent.scss +3 -0
  535. package/styles/maskedtextbox/_bigger.fluent2.scss +3 -0
  536. package/styles/maskedtextbox/_bigger.highcontrast-light.scss +3 -0
  537. package/styles/maskedtextbox/_bigger.highcontrast.scss +3 -0
  538. package/styles/maskedtextbox/_bigger.material-dark.scss +3 -0
  539. package/styles/maskedtextbox/_bigger.material.scss +3 -0
  540. package/styles/maskedtextbox/_bigger.material3-dark.scss +3 -0
  541. package/styles/maskedtextbox/_bigger.material3.scss +3 -0
  542. package/styles/maskedtextbox/_bigger.scss +0 -1
  543. package/styles/maskedtextbox/_bigger.tailwind-dark.scss +3 -0
  544. package/styles/maskedtextbox/_bigger.tailwind.scss +3 -0
  545. package/styles/maskedtextbox/_bigger.tailwind3.scss +3 -0
  546. package/styles/maskedtextbox/_layout.bds.scss +3 -0
  547. package/styles/maskedtextbox/_layout.bootstrap-dark.scss +3 -0
  548. package/styles/maskedtextbox/_layout.bootstrap.scss +3 -0
  549. package/styles/maskedtextbox/_layout.bootstrap4.scss +3 -0
  550. package/styles/maskedtextbox/_layout.bootstrap5-dark.scss +3 -0
  551. package/styles/maskedtextbox/_layout.bootstrap5.3.scss +3 -0
  552. package/styles/maskedtextbox/_layout.bootstrap5.scss +3 -0
  553. package/styles/maskedtextbox/_layout.fabric-dark.scss +3 -0
  554. package/styles/maskedtextbox/_layout.fabric.scss +3 -0
  555. package/styles/maskedtextbox/_layout.fluent-dark.scss +3 -0
  556. package/styles/maskedtextbox/_layout.fluent.scss +3 -0
  557. package/styles/maskedtextbox/_layout.fluent2.scss +3 -0
  558. package/styles/maskedtextbox/_layout.highcontrast-light.scss +3 -0
  559. package/styles/maskedtextbox/_layout.highcontrast.scss +3 -0
  560. package/styles/maskedtextbox/_layout.material-dark.scss +3 -0
  561. package/styles/maskedtextbox/_layout.material.scss +3 -0
  562. package/styles/maskedtextbox/_layout.material3-dark.scss +3 -0
  563. package/styles/maskedtextbox/_layout.material3.scss +3 -0
  564. package/styles/maskedtextbox/_layout.scss +0 -1
  565. package/styles/maskedtextbox/_layout.tailwind-dark.scss +3 -0
  566. package/styles/maskedtextbox/_layout.tailwind.scss +3 -0
  567. package/styles/maskedtextbox/_layout.tailwind3.scss +3 -0
  568. package/styles/maskedtextbox/_theme-variables.bds.scss +1 -0
  569. package/styles/maskedtextbox/_theme-variables.bootstrap-dark.scss +1 -0
  570. package/styles/maskedtextbox/_theme-variables.bootstrap.scss +1 -0
  571. package/styles/maskedtextbox/_theme-variables.bootstrap4.scss +1 -0
  572. package/styles/maskedtextbox/_theme-variables.bootstrap5-dark.scss +1 -0
  573. package/styles/maskedtextbox/_theme-variables.bootstrap5.3.scss +1 -0
  574. package/styles/maskedtextbox/_theme-variables.bootstrap5.scss +1 -0
  575. package/styles/maskedtextbox/_theme-variables.fabric-dark.scss +1 -0
  576. package/styles/maskedtextbox/_theme-variables.fabric.scss +1 -0
  577. package/styles/maskedtextbox/_theme-variables.fluent-dark.scss +1 -0
  578. package/styles/maskedtextbox/_theme-variables.fluent.scss +1 -0
  579. package/styles/maskedtextbox/_theme-variables.fluent2.scss +1 -0
  580. package/styles/maskedtextbox/_theme-variables.highcontrast-light.scss +1 -0
  581. package/styles/maskedtextbox/_theme-variables.highcontrast.scss +1 -0
  582. package/styles/maskedtextbox/_theme-variables.material-dark.scss +1 -0
  583. package/styles/maskedtextbox/_theme-variables.material.scss +1 -0
  584. package/styles/maskedtextbox/_theme-variables.material3-dark.scss +1 -0
  585. package/styles/maskedtextbox/_theme-variables.material3.scss +1 -0
  586. package/styles/maskedtextbox/_theme-variables.tailwind-dark.scss +1 -0
  587. package/styles/maskedtextbox/_theme-variables.tailwind.scss +1 -0
  588. package/styles/maskedtextbox/_theme.bds.scss +4 -0
  589. package/styles/maskedtextbox/_theme.bootstrap-dark.scss +4 -0
  590. package/styles/maskedtextbox/_theme.bootstrap.scss +4 -0
  591. package/styles/maskedtextbox/_theme.bootstrap4.scss +4 -0
  592. package/styles/maskedtextbox/_theme.bootstrap5-dark.scss +4 -0
  593. package/styles/maskedtextbox/_theme.bootstrap5.3.scss +4 -0
  594. package/styles/maskedtextbox/_theme.bootstrap5.scss +4 -0
  595. package/styles/maskedtextbox/_theme.fabric-dark.scss +4 -0
  596. package/styles/maskedtextbox/_theme.fabric.scss +4 -0
  597. package/styles/maskedtextbox/_theme.fluent-dark.scss +4 -0
  598. package/styles/maskedtextbox/_theme.fluent.scss +4 -0
  599. package/styles/maskedtextbox/_theme.fluent2.scss +4 -0
  600. package/styles/maskedtextbox/_theme.highcontrast-light.scss +4 -0
  601. package/styles/maskedtextbox/_theme.highcontrast.scss +4 -0
  602. package/styles/maskedtextbox/_theme.material-dark.scss +4 -0
  603. package/styles/maskedtextbox/_theme.material.scss +4 -0
  604. package/styles/maskedtextbox/_theme.material3-dark.scss +4 -0
  605. package/styles/maskedtextbox/_theme.material3.scss +4 -0
  606. package/styles/maskedtextbox/_theme.scss +0 -1
  607. package/styles/maskedtextbox/_theme.tailwind-dark.scss +4 -0
  608. package/styles/maskedtextbox/_theme.tailwind.scss +4 -0
  609. package/styles/maskedtextbox/_theme.tailwind3.scss +4 -0
  610. package/styles/maskedtextbox/bds.css +12 -0
  611. package/styles/maskedtextbox/bds.scss +2 -2
  612. package/styles/maskedtextbox/bootstrap-dark.scss +2 -2
  613. package/styles/maskedtextbox/bootstrap.scss +2 -2
  614. package/styles/maskedtextbox/bootstrap4.scss +2 -2
  615. package/styles/maskedtextbox/bootstrap5-dark.scss +2 -2
  616. package/styles/maskedtextbox/bootstrap5.3.css +252 -0
  617. package/styles/maskedtextbox/bootstrap5.3.scss +2 -2
  618. package/styles/maskedtextbox/bootstrap5.scss +2 -2
  619. package/styles/maskedtextbox/fabric-dark.scss +2 -2
  620. package/styles/maskedtextbox/fabric.scss +2 -2
  621. package/styles/maskedtextbox/fluent-dark.scss +2 -2
  622. package/styles/maskedtextbox/fluent.scss +2 -2
  623. package/styles/maskedtextbox/fluent2.css +258 -0
  624. package/styles/maskedtextbox/fluent2.scss +2 -2
  625. package/styles/maskedtextbox/highcontrast-light.scss +2 -2
  626. package/styles/maskedtextbox/highcontrast.scss +2 -2
  627. package/styles/maskedtextbox/material-dark.scss +2 -2
  628. package/styles/maskedtextbox/material.scss +2 -2
  629. package/styles/maskedtextbox/material3-dark.css +246 -0
  630. package/styles/maskedtextbox/material3-dark.scss +2 -2
  631. package/styles/maskedtextbox/material3.css +252 -0
  632. package/styles/maskedtextbox/material3.scss +2 -2
  633. package/styles/maskedtextbox/tailwind-dark.scss +2 -2
  634. package/styles/maskedtextbox/tailwind.scss +2 -2
  635. package/styles/maskedtextbox/tailwind3.css +222 -0
  636. package/styles/maskedtextbox/tailwind3.scss +2 -2
  637. package/styles/material-dark-lite.css +27 -4
  638. package/styles/material-dark-lite.scss +14 -14
  639. package/styles/material-dark.css +44 -4
  640. package/styles/material-dark.scss +24 -24
  641. package/styles/material-lite.css +57 -4
  642. package/styles/material-lite.scss +14 -14
  643. package/styles/material.css +94 -4
  644. package/styles/material.scss +24 -24
  645. package/styles/material3-dark-lite.css +2486 -219
  646. package/styles/material3-dark-lite.scss +14 -14
  647. package/styles/material3-dark.css +3620 -332
  648. package/styles/material3-dark.scss +24 -24
  649. package/styles/material3-lite.css +2568 -247
  650. package/styles/material3-lite.scss +14 -14
  651. package/styles/material3.css +3701 -335
  652. package/styles/material3.scss +24 -24
  653. package/styles/numerictextbox/_all.bds.scss +2 -0
  654. package/styles/numerictextbox/_all.bootstrap-dark.scss +2 -0
  655. package/styles/numerictextbox/_all.bootstrap.scss +2 -0
  656. package/styles/numerictextbox/_all.bootstrap4.scss +2 -0
  657. package/styles/numerictextbox/_all.bootstrap5-dark.scss +2 -0
  658. package/styles/numerictextbox/_all.bootstrap5.3.scss +2 -0
  659. package/styles/numerictextbox/_all.bootstrap5.scss +2 -0
  660. package/styles/numerictextbox/_all.fabric-dark.scss +2 -0
  661. package/styles/numerictextbox/_all.fabric.scss +2 -0
  662. package/styles/numerictextbox/_all.fluent-dark.scss +2 -0
  663. package/styles/numerictextbox/_all.fluent.scss +2 -0
  664. package/styles/numerictextbox/_all.fluent2.scss +2 -0
  665. package/styles/numerictextbox/_all.highcontrast-light.scss +2 -0
  666. package/styles/numerictextbox/_all.highcontrast.scss +2 -0
  667. package/styles/numerictextbox/_all.material-dark.scss +2 -0
  668. package/styles/numerictextbox/_all.material.scss +2 -0
  669. package/styles/numerictextbox/_all.material3-dark.scss +2 -0
  670. package/styles/numerictextbox/_all.material3.scss +2 -0
  671. package/styles/numerictextbox/_all.tailwind-dark.scss +2 -0
  672. package/styles/numerictextbox/_all.tailwind.scss +2 -0
  673. package/styles/numerictextbox/_all.tailwind3.scss +2 -0
  674. package/styles/numerictextbox/_bigger.bds.scss +4 -0
  675. package/styles/numerictextbox/_bigger.bootstrap-dark.scss +4 -0
  676. package/styles/numerictextbox/_bigger.bootstrap.scss +4 -0
  677. package/styles/numerictextbox/_bigger.bootstrap4.scss +4 -0
  678. package/styles/numerictextbox/_bigger.bootstrap5-dark.scss +4 -0
  679. package/styles/numerictextbox/_bigger.bootstrap5.3.scss +4 -0
  680. package/styles/numerictextbox/_bigger.bootstrap5.scss +4 -0
  681. package/styles/numerictextbox/_bigger.fabric-dark.scss +4 -0
  682. package/styles/numerictextbox/_bigger.fabric.scss +4 -0
  683. package/styles/numerictextbox/_bigger.fluent-dark.scss +4 -0
  684. package/styles/numerictextbox/_bigger.fluent.scss +4 -0
  685. package/styles/numerictextbox/_bigger.fluent2.scss +4 -0
  686. package/styles/numerictextbox/_bigger.highcontrast-light.scss +4 -0
  687. package/styles/numerictextbox/_bigger.highcontrast.scss +4 -0
  688. package/styles/numerictextbox/_bigger.material-dark.scss +4 -0
  689. package/styles/numerictextbox/_bigger.material.scss +4 -0
  690. package/styles/numerictextbox/_bigger.material3-dark.scss +4 -0
  691. package/styles/numerictextbox/_bigger.material3.scss +4 -0
  692. package/styles/numerictextbox/_bigger.scss +0 -2
  693. package/styles/numerictextbox/_bigger.tailwind-dark.scss +4 -0
  694. package/styles/numerictextbox/_bigger.tailwind.scss +4 -0
  695. package/styles/numerictextbox/_bigger.tailwind3.scss +4 -0
  696. package/styles/numerictextbox/_layout.bds.scss +3 -0
  697. package/styles/numerictextbox/_layout.bootstrap-dark.scss +3 -0
  698. package/styles/numerictextbox/_layout.bootstrap.scss +3 -0
  699. package/styles/numerictextbox/_layout.bootstrap4.scss +3 -0
  700. package/styles/numerictextbox/_layout.bootstrap5-dark.scss +3 -0
  701. package/styles/numerictextbox/_layout.bootstrap5.3.scss +3 -0
  702. package/styles/numerictextbox/_layout.bootstrap5.scss +3 -0
  703. package/styles/numerictextbox/_layout.fabric-dark.scss +3 -0
  704. package/styles/numerictextbox/_layout.fabric.scss +3 -0
  705. package/styles/numerictextbox/_layout.fluent-dark.scss +3 -0
  706. package/styles/numerictextbox/_layout.fluent.scss +3 -0
  707. package/styles/numerictextbox/_layout.fluent2.scss +3 -0
  708. package/styles/numerictextbox/_layout.highcontrast-light.scss +3 -0
  709. package/styles/numerictextbox/_layout.highcontrast.scss +3 -0
  710. package/styles/numerictextbox/_layout.material-dark.scss +3 -0
  711. package/styles/numerictextbox/_layout.material.scss +3 -0
  712. package/styles/numerictextbox/_layout.material3-dark.scss +3 -0
  713. package/styles/numerictextbox/_layout.material3.scss +3 -0
  714. package/styles/numerictextbox/_layout.scss +0 -1
  715. package/styles/numerictextbox/_layout.tailwind-dark.scss +3 -0
  716. package/styles/numerictextbox/_layout.tailwind.scss +3 -0
  717. package/styles/numerictextbox/_layout.tailwind3.scss +3 -0
  718. package/styles/numerictextbox/_theme-variables.bds.scss +1 -0
  719. package/styles/numerictextbox/_theme-variables.bootstrap-dark.scss +1 -0
  720. package/styles/numerictextbox/_theme-variables.bootstrap.scss +1 -0
  721. package/styles/numerictextbox/_theme-variables.bootstrap4.scss +1 -0
  722. package/styles/numerictextbox/_theme-variables.bootstrap5-dark.scss +1 -0
  723. package/styles/numerictextbox/_theme-variables.bootstrap5.3.scss +1 -0
  724. package/styles/numerictextbox/_theme-variables.bootstrap5.scss +1 -0
  725. package/styles/numerictextbox/_theme-variables.fabric-dark.scss +1 -0
  726. package/styles/numerictextbox/_theme-variables.fabric.scss +1 -0
  727. package/styles/numerictextbox/_theme-variables.fluent-dark.scss +1 -0
  728. package/styles/numerictextbox/_theme-variables.fluent.scss +1 -0
  729. package/styles/numerictextbox/_theme-variables.fluent2.scss +1 -0
  730. package/styles/numerictextbox/_theme-variables.highcontrast-light.scss +1 -0
  731. package/styles/numerictextbox/_theme-variables.highcontrast.scss +1 -0
  732. package/styles/numerictextbox/_theme-variables.material-dark.scss +1 -0
  733. package/styles/numerictextbox/_theme-variables.material.scss +1 -0
  734. package/styles/numerictextbox/_theme-variables.material3-dark.scss +1 -0
  735. package/styles/numerictextbox/_theme-variables.material3.scss +1 -0
  736. package/styles/numerictextbox/_theme-variables.tailwind-dark.scss +1 -0
  737. package/styles/numerictextbox/_theme-variables.tailwind.scss +1 -0
  738. package/styles/numerictextbox/_theme.bds.scss +5 -0
  739. package/styles/numerictextbox/_theme.bootstrap-dark.scss +5 -0
  740. package/styles/numerictextbox/_theme.bootstrap.scss +5 -0
  741. package/styles/numerictextbox/_theme.bootstrap4.scss +5 -0
  742. package/styles/numerictextbox/_theme.bootstrap5-dark.scss +5 -0
  743. package/styles/numerictextbox/_theme.bootstrap5.3.scss +5 -0
  744. package/styles/numerictextbox/_theme.bootstrap5.scss +5 -0
  745. package/styles/numerictextbox/_theme.fabric-dark.scss +5 -0
  746. package/styles/numerictextbox/_theme.fabric.scss +5 -0
  747. package/styles/numerictextbox/_theme.fluent-dark.scss +5 -0
  748. package/styles/numerictextbox/_theme.fluent.scss +5 -0
  749. package/styles/numerictextbox/_theme.fluent2.scss +5 -0
  750. package/styles/numerictextbox/_theme.highcontrast-light.scss +5 -0
  751. package/styles/numerictextbox/_theme.highcontrast.scss +5 -0
  752. package/styles/numerictextbox/_theme.material-dark.scss +5 -0
  753. package/styles/numerictextbox/_theme.material.scss +5 -0
  754. package/styles/numerictextbox/_theme.material3-dark.scss +5 -0
  755. package/styles/numerictextbox/_theme.material3.scss +5 -0
  756. package/styles/numerictextbox/_theme.scss +0 -2
  757. package/styles/numerictextbox/_theme.tailwind-dark.scss +5 -0
  758. package/styles/numerictextbox/_theme.tailwind.scss +5 -0
  759. package/styles/numerictextbox/_theme.tailwind3.scss +5 -0
  760. package/styles/numerictextbox/bds.css +312 -0
  761. package/styles/numerictextbox/bds.scss +2 -2
  762. package/styles/numerictextbox/bootstrap-dark.css +2 -0
  763. package/styles/numerictextbox/bootstrap-dark.scss +2 -2
  764. package/styles/numerictextbox/bootstrap.css +2 -0
  765. package/styles/numerictextbox/bootstrap.scss +2 -2
  766. package/styles/numerictextbox/bootstrap4.css +2 -0
  767. package/styles/numerictextbox/bootstrap4.scss +2 -2
  768. package/styles/numerictextbox/bootstrap5-dark.css +2 -0
  769. package/styles/numerictextbox/bootstrap5-dark.scss +2 -2
  770. package/styles/numerictextbox/bootstrap5.3.css +422 -0
  771. package/styles/numerictextbox/bootstrap5.3.scss +2 -2
  772. package/styles/numerictextbox/bootstrap5.css +2 -0
  773. package/styles/numerictextbox/bootstrap5.scss +2 -2
  774. package/styles/numerictextbox/fabric-dark.css +2 -0
  775. package/styles/numerictextbox/fabric-dark.scss +2 -2
  776. package/styles/numerictextbox/fabric.css +2 -0
  777. package/styles/numerictextbox/fabric.scss +2 -2
  778. package/styles/numerictextbox/fluent-dark.css +2 -0
  779. package/styles/numerictextbox/fluent-dark.scss +2 -2
  780. package/styles/numerictextbox/fluent.css +2 -0
  781. package/styles/numerictextbox/fluent.scss +2 -2
  782. package/styles/numerictextbox/fluent2.css +824 -2
  783. package/styles/numerictextbox/fluent2.scss +2 -2
  784. package/styles/numerictextbox/highcontrast-light.css +2 -0
  785. package/styles/numerictextbox/highcontrast-light.scss +2 -2
  786. package/styles/numerictextbox/highcontrast.css +2 -0
  787. package/styles/numerictextbox/highcontrast.scss +2 -2
  788. package/styles/numerictextbox/material-dark.css +16 -0
  789. package/styles/numerictextbox/material-dark.scss +2 -2
  790. package/styles/numerictextbox/material.css +36 -0
  791. package/styles/numerictextbox/material.scss +2 -2
  792. package/styles/numerictextbox/material3-dark.css +446 -0
  793. package/styles/numerictextbox/material3-dark.scss +2 -2
  794. package/styles/numerictextbox/material3.css +456 -0
  795. package/styles/numerictextbox/material3.scss +2 -2
  796. package/styles/numerictextbox/tailwind-dark.css +2 -0
  797. package/styles/numerictextbox/tailwind-dark.scss +2 -2
  798. package/styles/numerictextbox/tailwind.css +2 -0
  799. package/styles/numerictextbox/tailwind.scss +2 -2
  800. package/styles/numerictextbox/tailwind3.css +492 -0
  801. package/styles/numerictextbox/tailwind3.scss +2 -2
  802. package/styles/otp-input/_all.bds.scss +2 -0
  803. package/styles/otp-input/_all.bootstrap-dark.scss +2 -0
  804. package/styles/otp-input/_all.bootstrap.scss +2 -0
  805. package/styles/otp-input/_all.bootstrap4.scss +2 -0
  806. package/styles/otp-input/_all.bootstrap5-dark.scss +2 -0
  807. package/styles/otp-input/_all.bootstrap5.3.scss +2 -0
  808. package/styles/otp-input/_all.bootstrap5.scss +2 -0
  809. package/styles/otp-input/_all.fabric-dark.scss +2 -0
  810. package/styles/otp-input/_all.fabric.scss +2 -0
  811. package/styles/otp-input/_all.fluent-dark.scss +2 -0
  812. package/styles/otp-input/_all.fluent.scss +2 -0
  813. package/styles/otp-input/_all.fluent2.scss +2 -0
  814. package/styles/otp-input/_all.highcontrast-light.scss +2 -0
  815. package/styles/otp-input/_all.highcontrast.scss +2 -0
  816. package/styles/otp-input/_all.material-dark.scss +2 -0
  817. package/styles/otp-input/_all.material.scss +2 -0
  818. package/styles/otp-input/_all.material3-dark.scss +2 -0
  819. package/styles/otp-input/_all.material3.scss +2 -0
  820. package/styles/otp-input/_all.tailwind-dark.scss +2 -0
  821. package/styles/otp-input/_all.tailwind.scss +2 -0
  822. package/styles/otp-input/_all.tailwind3.scss +2 -0
  823. package/styles/otp-input/_bigger.bds.scss +3 -0
  824. package/styles/otp-input/_bigger.bootstrap-dark.scss +3 -0
  825. package/styles/otp-input/_bigger.bootstrap.scss +3 -0
  826. package/styles/otp-input/_bigger.bootstrap4.scss +3 -0
  827. package/styles/otp-input/_bigger.bootstrap5-dark.scss +3 -0
  828. package/styles/otp-input/_bigger.bootstrap5.3.scss +3 -0
  829. package/styles/otp-input/_bigger.bootstrap5.scss +3 -0
  830. package/styles/otp-input/_bigger.fabric-dark.scss +3 -0
  831. package/styles/otp-input/_bigger.fabric.scss +3 -0
  832. package/styles/otp-input/_bigger.fluent-dark.scss +3 -0
  833. package/styles/otp-input/_bigger.fluent.scss +3 -0
  834. package/styles/otp-input/_bigger.fluent2.scss +3 -0
  835. package/styles/otp-input/_bigger.highcontrast-light.scss +3 -0
  836. package/styles/otp-input/_bigger.highcontrast.scss +3 -0
  837. package/styles/otp-input/_bigger.material-dark.scss +3 -0
  838. package/styles/otp-input/_bigger.material.scss +3 -0
  839. package/styles/otp-input/_bigger.material3-dark.scss +3 -0
  840. package/styles/otp-input/_bigger.material3.scss +3 -0
  841. package/styles/otp-input/_bigger.scss +0 -1
  842. package/styles/otp-input/_bigger.tailwind-dark.scss +3 -0
  843. package/styles/otp-input/_bigger.tailwind.scss +3 -0
  844. package/styles/otp-input/_bigger.tailwind3.scss +3 -0
  845. package/styles/otp-input/_layout.bds.scss +3 -0
  846. package/styles/otp-input/_layout.bootstrap-dark.scss +3 -0
  847. package/styles/otp-input/_layout.bootstrap.scss +3 -0
  848. package/styles/otp-input/_layout.bootstrap4.scss +3 -0
  849. package/styles/otp-input/_layout.bootstrap5-dark.scss +3 -0
  850. package/styles/otp-input/_layout.bootstrap5.3.scss +3 -0
  851. package/styles/otp-input/_layout.bootstrap5.scss +3 -0
  852. package/styles/otp-input/_layout.fabric-dark.scss +3 -0
  853. package/styles/otp-input/_layout.fabric.scss +3 -0
  854. package/styles/otp-input/_layout.fluent-dark.scss +3 -0
  855. package/styles/otp-input/_layout.fluent.scss +3 -0
  856. package/styles/otp-input/_layout.fluent2.scss +3 -0
  857. package/styles/otp-input/_layout.highcontrast-light.scss +3 -0
  858. package/styles/otp-input/_layout.highcontrast.scss +3 -0
  859. package/styles/otp-input/_layout.material-dark.scss +3 -0
  860. package/styles/otp-input/_layout.material.scss +3 -0
  861. package/styles/otp-input/_layout.material3-dark.scss +3 -0
  862. package/styles/otp-input/_layout.material3.scss +3 -0
  863. package/styles/otp-input/_layout.scss +0 -1
  864. package/styles/otp-input/_layout.tailwind-dark.scss +3 -0
  865. package/styles/otp-input/_layout.tailwind.scss +3 -0
  866. package/styles/otp-input/_layout.tailwind3.scss +3 -0
  867. package/styles/otp-input/_theme-variables.bds.scss +1 -0
  868. package/styles/otp-input/_theme-variables.bootstrap-dark.scss +1 -0
  869. package/styles/otp-input/_theme-variables.bootstrap.scss +1 -0
  870. package/styles/otp-input/_theme-variables.bootstrap4.scss +1 -0
  871. package/styles/otp-input/_theme-variables.bootstrap5-dark.scss +1 -0
  872. package/styles/otp-input/_theme-variables.bootstrap5.3.scss +1 -0
  873. package/styles/otp-input/_theme-variables.bootstrap5.scss +1 -0
  874. package/styles/otp-input/_theme-variables.fabric-dark.scss +1 -0
  875. package/styles/otp-input/_theme-variables.fabric.scss +1 -0
  876. package/styles/otp-input/_theme-variables.fluent-dark.scss +1 -0
  877. package/styles/otp-input/_theme-variables.fluent.scss +1 -0
  878. package/styles/otp-input/_theme-variables.fluent2.scss +1 -0
  879. package/styles/otp-input/_theme-variables.highcontrast-light.scss +1 -0
  880. package/styles/otp-input/_theme-variables.highcontrast.scss +1 -0
  881. package/styles/otp-input/_theme-variables.material-dark.scss +1 -0
  882. package/styles/otp-input/_theme-variables.material.scss +1 -0
  883. package/styles/otp-input/_theme-variables.material3-dark.scss +1 -0
  884. package/styles/otp-input/_theme-variables.material3.scss +1 -0
  885. package/styles/otp-input/_theme-variables.tailwind-dark.scss +1 -0
  886. package/styles/otp-input/_theme-variables.tailwind.scss +1 -0
  887. package/styles/otp-input/_theme.bds.scss +4 -0
  888. package/styles/otp-input/_theme.bootstrap-dark.scss +4 -0
  889. package/styles/otp-input/_theme.bootstrap.scss +4 -0
  890. package/styles/otp-input/_theme.bootstrap4.scss +4 -0
  891. package/styles/otp-input/_theme.bootstrap5-dark.scss +4 -0
  892. package/styles/otp-input/_theme.bootstrap5.3.scss +4 -0
  893. package/styles/otp-input/_theme.bootstrap5.scss +4 -0
  894. package/styles/otp-input/_theme.fabric-dark.scss +4 -0
  895. package/styles/otp-input/_theme.fabric.scss +4 -0
  896. package/styles/otp-input/_theme.fluent-dark.scss +4 -0
  897. package/styles/otp-input/_theme.fluent.scss +4 -0
  898. package/styles/otp-input/_theme.fluent2.scss +4 -0
  899. package/styles/otp-input/_theme.highcontrast-light.scss +4 -0
  900. package/styles/otp-input/_theme.highcontrast.scss +4 -0
  901. package/styles/otp-input/_theme.material-dark.scss +4 -0
  902. package/styles/otp-input/_theme.material.scss +4 -0
  903. package/styles/otp-input/_theme.material3-dark.scss +4 -0
  904. package/styles/otp-input/_theme.material3.scss +4 -0
  905. package/styles/otp-input/_theme.scss +0 -1
  906. package/styles/otp-input/_theme.tailwind-dark.scss +4 -0
  907. package/styles/otp-input/_theme.tailwind.scss +4 -0
  908. package/styles/otp-input/_theme.tailwind3.scss +4 -0
  909. package/styles/otp-input/bds.css +12 -0
  910. package/styles/otp-input/bds.scss +2 -2
  911. package/styles/otp-input/bootstrap-dark.scss +2 -2
  912. package/styles/otp-input/bootstrap.scss +2 -2
  913. package/styles/otp-input/bootstrap4.scss +2 -2
  914. package/styles/otp-input/bootstrap5-dark.scss +2 -2
  915. package/styles/otp-input/bootstrap5.3.css +252 -0
  916. package/styles/otp-input/bootstrap5.3.scss +2 -2
  917. package/styles/otp-input/bootstrap5.scss +2 -2
  918. package/styles/otp-input/fabric-dark.scss +2 -2
  919. package/styles/otp-input/fabric.scss +2 -2
  920. package/styles/otp-input/fluent-dark.scss +2 -2
  921. package/styles/otp-input/fluent.scss +2 -2
  922. package/styles/otp-input/fluent2.css +258 -0
  923. package/styles/otp-input/fluent2.scss +2 -2
  924. package/styles/otp-input/highcontrast-light.scss +2 -2
  925. package/styles/otp-input/highcontrast.scss +2 -2
  926. package/styles/otp-input/material-dark.scss +2 -2
  927. package/styles/otp-input/material.scss +2 -2
  928. package/styles/otp-input/material3-dark.css +246 -0
  929. package/styles/otp-input/material3-dark.scss +2 -2
  930. package/styles/otp-input/material3.css +252 -0
  931. package/styles/otp-input/material3.scss +2 -2
  932. package/styles/otp-input/tailwind-dark.scss +2 -2
  933. package/styles/otp-input/tailwind.scss +2 -2
  934. package/styles/otp-input/tailwind3.css +222 -0
  935. package/styles/otp-input/tailwind3.scss +2 -2
  936. package/styles/rating/_all.bds.scss +2 -0
  937. package/styles/rating/_all.bootstrap-dark.scss +2 -0
  938. package/styles/rating/_all.bootstrap.scss +2 -0
  939. package/styles/rating/_all.bootstrap4.scss +2 -0
  940. package/styles/rating/_all.bootstrap5-dark.scss +2 -0
  941. package/styles/rating/_all.bootstrap5.3.scss +2 -0
  942. package/styles/rating/_all.bootstrap5.scss +2 -0
  943. package/styles/rating/_all.fabric-dark.scss +2 -0
  944. package/styles/rating/_all.fabric.scss +2 -0
  945. package/styles/rating/_all.fluent-dark.scss +2 -0
  946. package/styles/rating/_all.fluent.scss +2 -0
  947. package/styles/rating/_all.fluent2.scss +2 -0
  948. package/styles/rating/_all.highcontrast-light.scss +2 -0
  949. package/styles/rating/_all.highcontrast.scss +2 -0
  950. package/styles/rating/_all.material-dark.scss +2 -0
  951. package/styles/rating/_all.material.scss +2 -0
  952. package/styles/rating/_all.material3-dark.scss +2 -0
  953. package/styles/rating/_all.material3.scss +2 -0
  954. package/styles/rating/_all.tailwind-dark.scss +2 -0
  955. package/styles/rating/_all.tailwind.scss +2 -0
  956. package/styles/rating/_all.tailwind3.scss +2 -0
  957. package/styles/rating/_bigger.bds.scss +4 -0
  958. package/styles/rating/_bigger.bootstrap-dark.scss +4 -0
  959. package/styles/rating/_bigger.bootstrap.scss +4 -0
  960. package/styles/rating/_bigger.bootstrap4.scss +4 -0
  961. package/styles/rating/_bigger.bootstrap5-dark.scss +4 -0
  962. package/styles/rating/_bigger.bootstrap5.3.scss +4 -0
  963. package/styles/rating/_bigger.bootstrap5.scss +4 -0
  964. package/styles/rating/_bigger.fabric-dark.scss +4 -0
  965. package/styles/rating/_bigger.fabric.scss +4 -0
  966. package/styles/rating/_bigger.fluent-dark.scss +4 -0
  967. package/styles/rating/_bigger.fluent.scss +4 -0
  968. package/styles/rating/_bigger.fluent2.scss +4 -0
  969. package/styles/rating/_bigger.highcontrast-light.scss +4 -0
  970. package/styles/rating/_bigger.highcontrast.scss +4 -0
  971. package/styles/rating/_bigger.material-dark.scss +4 -0
  972. package/styles/rating/_bigger.material.scss +4 -0
  973. package/styles/rating/_bigger.material3-dark.scss +4 -0
  974. package/styles/rating/_bigger.material3.scss +4 -0
  975. package/styles/rating/_bigger.scss +0 -2
  976. package/styles/rating/_bigger.tailwind-dark.scss +4 -0
  977. package/styles/rating/_bigger.tailwind.scss +4 -0
  978. package/styles/rating/_bigger.tailwind3.scss +4 -0
  979. package/styles/rating/_layout.bds.scss +3 -0
  980. package/styles/rating/_layout.bootstrap-dark.scss +3 -0
  981. package/styles/rating/_layout.bootstrap.scss +3 -0
  982. package/styles/rating/_layout.bootstrap4.scss +3 -0
  983. package/styles/rating/_layout.bootstrap5-dark.scss +3 -0
  984. package/styles/rating/_layout.bootstrap5.3.scss +3 -0
  985. package/styles/rating/_layout.bootstrap5.scss +3 -0
  986. package/styles/rating/_layout.fabric-dark.scss +3 -0
  987. package/styles/rating/_layout.fabric.scss +3 -0
  988. package/styles/rating/_layout.fluent-dark.scss +3 -0
  989. package/styles/rating/_layout.fluent.scss +3 -0
  990. package/styles/rating/_layout.fluent2.scss +3 -0
  991. package/styles/rating/_layout.highcontrast-light.scss +3 -0
  992. package/styles/rating/_layout.highcontrast.scss +3 -0
  993. package/styles/rating/_layout.material-dark.scss +3 -0
  994. package/styles/rating/_layout.material.scss +3 -0
  995. package/styles/rating/_layout.material3-dark.scss +3 -0
  996. package/styles/rating/_layout.material3.scss +3 -0
  997. package/styles/rating/_layout.scss +0 -1
  998. package/styles/rating/_layout.tailwind-dark.scss +3 -0
  999. package/styles/rating/_layout.tailwind.scss +3 -0
  1000. package/styles/rating/_layout.tailwind3.scss +3 -0
  1001. package/styles/rating/_theme-variables.bds.scss +1 -0
  1002. package/styles/rating/_theme-variables.bootstrap-dark.scss +1 -0
  1003. package/styles/rating/_theme-variables.bootstrap.scss +1 -0
  1004. package/styles/rating/_theme-variables.bootstrap4.scss +1 -0
  1005. package/styles/rating/_theme-variables.bootstrap5-dark.scss +1 -0
  1006. package/styles/rating/_theme-variables.bootstrap5.3.scss +1 -0
  1007. package/styles/rating/_theme-variables.bootstrap5.scss +1 -0
  1008. package/styles/rating/_theme-variables.fabric-dark.scss +1 -0
  1009. package/styles/rating/_theme-variables.fabric.scss +1 -0
  1010. package/styles/rating/_theme-variables.fluent-dark.scss +1 -0
  1011. package/styles/rating/_theme-variables.fluent.scss +1 -0
  1012. package/styles/rating/_theme-variables.fluent2.scss +1 -0
  1013. package/styles/rating/_theme-variables.highcontrast-light.scss +1 -0
  1014. package/styles/rating/_theme-variables.highcontrast.scss +1 -0
  1015. package/styles/rating/_theme-variables.material-dark.scss +1 -0
  1016. package/styles/rating/_theme-variables.material.scss +1 -0
  1017. package/styles/rating/_theme-variables.material3-dark.scss +1 -0
  1018. package/styles/rating/_theme-variables.material3.scss +1 -0
  1019. package/styles/rating/_theme-variables.tailwind-dark.scss +1 -0
  1020. package/styles/rating/_theme-variables.tailwind.scss +1 -0
  1021. package/styles/rating/_theme.bds.scss +4 -0
  1022. package/styles/rating/_theme.bootstrap-dark.scss +4 -0
  1023. package/styles/rating/_theme.bootstrap.scss +4 -0
  1024. package/styles/rating/_theme.bootstrap4.scss +4 -0
  1025. package/styles/rating/_theme.bootstrap5-dark.scss +4 -0
  1026. package/styles/rating/_theme.bootstrap5.3.scss +4 -0
  1027. package/styles/rating/_theme.bootstrap5.scss +4 -0
  1028. package/styles/rating/_theme.fabric-dark.scss +4 -0
  1029. package/styles/rating/_theme.fabric.scss +4 -0
  1030. package/styles/rating/_theme.fluent-dark.scss +4 -0
  1031. package/styles/rating/_theme.fluent.scss +4 -0
  1032. package/styles/rating/_theme.fluent2.scss +4 -0
  1033. package/styles/rating/_theme.highcontrast-light.scss +4 -0
  1034. package/styles/rating/_theme.highcontrast.scss +4 -0
  1035. package/styles/rating/_theme.material-dark.scss +4 -0
  1036. package/styles/rating/_theme.material.scss +4 -0
  1037. package/styles/rating/_theme.material3-dark.scss +4 -0
  1038. package/styles/rating/_theme.material3.scss +4 -0
  1039. package/styles/rating/_theme.scss +0 -1
  1040. package/styles/rating/_theme.tailwind-dark.scss +4 -0
  1041. package/styles/rating/_theme.tailwind.scss +4 -0
  1042. package/styles/rating/_theme.tailwind3.scss +4 -0
  1043. package/styles/rating/bds.css +16 -0
  1044. package/styles/rating/bds.scss +2 -2
  1045. package/styles/rating/bootstrap-dark.scss +2 -2
  1046. package/styles/rating/bootstrap.scss +2 -2
  1047. package/styles/rating/bootstrap4.scss +2 -2
  1048. package/styles/rating/bootstrap5-dark.scss +2 -2
  1049. package/styles/rating/bootstrap5.3.css +336 -0
  1050. package/styles/rating/bootstrap5.3.scss +2 -2
  1051. package/styles/rating/bootstrap5.scss +2 -2
  1052. package/styles/rating/fabric-dark.scss +2 -2
  1053. package/styles/rating/fabric.scss +2 -2
  1054. package/styles/rating/fluent-dark.scss +2 -2
  1055. package/styles/rating/fluent.scss +2 -2
  1056. package/styles/rating/fluent2.css +344 -0
  1057. package/styles/rating/fluent2.scss +2 -2
  1058. package/styles/rating/highcontrast-light.scss +2 -2
  1059. package/styles/rating/highcontrast.scss +2 -2
  1060. package/styles/rating/material-dark.scss +2 -2
  1061. package/styles/rating/material.scss +2 -2
  1062. package/styles/rating/material3-dark.css +328 -0
  1063. package/styles/rating/material3-dark.scss +2 -2
  1064. package/styles/rating/material3.css +336 -0
  1065. package/styles/rating/material3.scss +2 -2
  1066. package/styles/rating/tailwind-dark.scss +2 -2
  1067. package/styles/rating/tailwind.scss +2 -2
  1068. package/styles/rating/tailwind3.css +296 -0
  1069. package/styles/rating/tailwind3.scss +2 -2
  1070. package/styles/signature/_all.bds.scss +2 -0
  1071. package/styles/signature/_all.bootstrap-dark.scss +2 -0
  1072. package/styles/signature/_all.bootstrap.scss +2 -0
  1073. package/styles/signature/_all.bootstrap4.scss +2 -0
  1074. package/styles/signature/_all.bootstrap5-dark.scss +2 -0
  1075. package/styles/signature/_all.bootstrap5.3.scss +2 -0
  1076. package/styles/signature/_all.bootstrap5.scss +2 -0
  1077. package/styles/signature/_all.fabric-dark.scss +2 -0
  1078. package/styles/signature/_all.fabric.scss +2 -0
  1079. package/styles/signature/_all.fluent-dark.scss +2 -0
  1080. package/styles/signature/_all.fluent.scss +2 -0
  1081. package/styles/signature/_all.fluent2.scss +2 -0
  1082. package/styles/signature/_all.highcontrast-light.scss +2 -0
  1083. package/styles/signature/_all.highcontrast.scss +2 -0
  1084. package/styles/signature/_all.material-dark.scss +2 -0
  1085. package/styles/signature/_all.material.scss +2 -0
  1086. package/styles/signature/_all.material3-dark.scss +2 -0
  1087. package/styles/signature/_all.material3.scss +2 -0
  1088. package/styles/signature/_all.tailwind-dark.scss +2 -0
  1089. package/styles/signature/_all.tailwind.scss +2 -0
  1090. package/styles/signature/_all.tailwind3.scss +2 -0
  1091. package/styles/signature/_layout.bds.scss +3 -0
  1092. package/styles/signature/_layout.bootstrap-dark.scss +3 -0
  1093. package/styles/signature/_layout.bootstrap.scss +3 -0
  1094. package/styles/signature/_layout.bootstrap4.scss +3 -0
  1095. package/styles/signature/_layout.bootstrap5-dark.scss +3 -0
  1096. package/styles/signature/_layout.bootstrap5.3.scss +3 -0
  1097. package/styles/signature/_layout.bootstrap5.scss +3 -0
  1098. package/styles/signature/_layout.fabric-dark.scss +3 -0
  1099. package/styles/signature/_layout.fabric.scss +3 -0
  1100. package/styles/signature/_layout.fluent-dark.scss +3 -0
  1101. package/styles/signature/_layout.fluent.scss +3 -0
  1102. package/styles/signature/_layout.fluent2.scss +3 -0
  1103. package/styles/signature/_layout.highcontrast-light.scss +3 -0
  1104. package/styles/signature/_layout.highcontrast.scss +3 -0
  1105. package/styles/signature/_layout.material-dark.scss +3 -0
  1106. package/styles/signature/_layout.material.scss +3 -0
  1107. package/styles/signature/_layout.material3-dark.scss +3 -0
  1108. package/styles/signature/_layout.material3.scss +3 -0
  1109. package/styles/signature/_layout.scss +0 -1
  1110. package/styles/signature/_layout.tailwind-dark.scss +3 -0
  1111. package/styles/signature/_layout.tailwind.scss +3 -0
  1112. package/styles/signature/_layout.tailwind3.scss +3 -0
  1113. package/styles/signature/_theme-variables.bds.scss +1 -0
  1114. package/styles/signature/_theme-variables.bootstrap-dark.scss +1 -0
  1115. package/styles/signature/_theme-variables.bootstrap.scss +1 -0
  1116. package/styles/signature/_theme-variables.bootstrap4.scss +1 -0
  1117. package/styles/signature/_theme-variables.bootstrap5-dark.scss +1 -0
  1118. package/styles/signature/_theme-variables.bootstrap5.3.scss +1 -0
  1119. package/styles/signature/_theme-variables.bootstrap5.scss +1 -0
  1120. package/styles/signature/_theme-variables.fabric-dark.scss +1 -0
  1121. package/styles/signature/_theme-variables.fabric.scss +1 -0
  1122. package/styles/signature/_theme-variables.fluent-dark.scss +1 -0
  1123. package/styles/signature/_theme-variables.fluent.scss +1 -0
  1124. package/styles/signature/_theme-variables.fluent2.scss +1 -0
  1125. package/styles/signature/_theme-variables.highcontrast-light.scss +1 -0
  1126. package/styles/signature/_theme-variables.highcontrast.scss +1 -0
  1127. package/styles/signature/_theme-variables.material-dark.scss +1 -0
  1128. package/styles/signature/_theme-variables.material.scss +1 -0
  1129. package/styles/signature/_theme-variables.material3-dark.scss +1 -0
  1130. package/styles/signature/_theme-variables.material3.scss +1 -0
  1131. package/styles/signature/_theme-variables.tailwind-dark.scss +1 -0
  1132. package/styles/signature/_theme-variables.tailwind.scss +1 -0
  1133. package/styles/signature/_theme.bds.scss +4 -0
  1134. package/styles/signature/_theme.bootstrap-dark.scss +4 -0
  1135. package/styles/signature/_theme.bootstrap.scss +4 -0
  1136. package/styles/signature/_theme.bootstrap4.scss +4 -0
  1137. package/styles/signature/_theme.bootstrap5-dark.scss +4 -0
  1138. package/styles/signature/_theme.bootstrap5.3.scss +4 -0
  1139. package/styles/signature/_theme.bootstrap5.scss +4 -0
  1140. package/styles/signature/_theme.fabric-dark.scss +4 -0
  1141. package/styles/signature/_theme.fabric.scss +4 -0
  1142. package/styles/signature/_theme.fluent-dark.scss +4 -0
  1143. package/styles/signature/_theme.fluent.scss +4 -0
  1144. package/styles/signature/_theme.fluent2.scss +4 -0
  1145. package/styles/signature/_theme.highcontrast-light.scss +4 -0
  1146. package/styles/signature/_theme.highcontrast.scss +4 -0
  1147. package/styles/signature/_theme.material-dark.scss +4 -0
  1148. package/styles/signature/_theme.material.scss +4 -0
  1149. package/styles/signature/_theme.material3-dark.scss +4 -0
  1150. package/styles/signature/_theme.material3.scss +4 -0
  1151. package/styles/signature/_theme.scss +0 -1
  1152. package/styles/signature/_theme.tailwind-dark.scss +4 -0
  1153. package/styles/signature/_theme.tailwind.scss +4 -0
  1154. package/styles/signature/_theme.tailwind3.scss +4 -0
  1155. package/styles/signature/bds.css +8 -0
  1156. package/styles/signature/bds.scss +1 -1
  1157. package/styles/signature/bootstrap-dark.scss +1 -1
  1158. package/styles/signature/bootstrap.scss +1 -1
  1159. package/styles/signature/bootstrap4.scss +1 -1
  1160. package/styles/signature/bootstrap5-dark.scss +1 -1
  1161. package/styles/signature/bootstrap5.3.css +168 -0
  1162. package/styles/signature/bootstrap5.3.scss +1 -1
  1163. package/styles/signature/bootstrap5.scss +1 -1
  1164. package/styles/signature/fabric-dark.scss +1 -1
  1165. package/styles/signature/fabric.scss +1 -1
  1166. package/styles/signature/fluent-dark.scss +1 -1
  1167. package/styles/signature/fluent.scss +1 -1
  1168. package/styles/signature/fluent2.css +172 -0
  1169. package/styles/signature/fluent2.scss +1 -1
  1170. package/styles/signature/highcontrast-light.scss +1 -1
  1171. package/styles/signature/highcontrast.scss +1 -1
  1172. package/styles/signature/material-dark.scss +1 -1
  1173. package/styles/signature/material.scss +1 -1
  1174. package/styles/signature/material3-dark.css +164 -0
  1175. package/styles/signature/material3-dark.scss +1 -1
  1176. package/styles/signature/material3.css +168 -0
  1177. package/styles/signature/material3.scss +1 -1
  1178. package/styles/signature/tailwind-dark.scss +1 -1
  1179. package/styles/signature/tailwind.scss +1 -1
  1180. package/styles/signature/tailwind3.css +148 -0
  1181. package/styles/signature/tailwind3.scss +1 -1
  1182. package/styles/slider/_all.bds.scss +2 -0
  1183. package/styles/slider/_all.bootstrap-dark.scss +2 -0
  1184. package/styles/slider/_all.bootstrap.scss +2 -0
  1185. package/styles/slider/_all.bootstrap4.scss +2 -0
  1186. package/styles/slider/_all.bootstrap5-dark.scss +2 -0
  1187. package/styles/slider/_all.bootstrap5.3.scss +2 -0
  1188. package/styles/slider/_all.bootstrap5.scss +2 -0
  1189. package/styles/slider/_all.fabric-dark.scss +2 -0
  1190. package/styles/slider/_all.fabric.scss +2 -0
  1191. package/styles/slider/_all.fluent-dark.scss +2 -0
  1192. package/styles/slider/_all.fluent.scss +2 -0
  1193. package/styles/slider/_all.fluent2.scss +2 -0
  1194. package/styles/slider/_all.highcontrast-light.scss +2 -0
  1195. package/styles/slider/_all.highcontrast.scss +2 -0
  1196. package/styles/slider/_all.material-dark.scss +2 -0
  1197. package/styles/slider/_all.material.scss +2 -0
  1198. package/styles/slider/_all.material3-dark.scss +2 -0
  1199. package/styles/slider/_all.material3.scss +2 -0
  1200. package/styles/slider/_all.tailwind-dark.scss +2 -0
  1201. package/styles/slider/_all.tailwind.scss +2 -0
  1202. package/styles/slider/_all.tailwind3.scss +2 -0
  1203. package/styles/slider/_bigger.bds.scss +3 -0
  1204. package/styles/slider/_bigger.bootstrap-dark.scss +3 -0
  1205. package/styles/slider/_bigger.bootstrap.scss +3 -0
  1206. package/styles/slider/_bigger.bootstrap4.scss +3 -0
  1207. package/styles/slider/_bigger.bootstrap5-dark.scss +3 -0
  1208. package/styles/slider/_bigger.bootstrap5.3.scss +3 -0
  1209. package/styles/slider/_bigger.bootstrap5.scss +3 -0
  1210. package/styles/slider/_bigger.fabric-dark.scss +3 -0
  1211. package/styles/slider/_bigger.fabric.scss +3 -0
  1212. package/styles/slider/_bigger.fluent-dark.scss +3 -0
  1213. package/styles/slider/_bigger.fluent.scss +3 -0
  1214. package/styles/slider/_bigger.fluent2.scss +3 -0
  1215. package/styles/slider/_bigger.highcontrast-light.scss +3 -0
  1216. package/styles/slider/_bigger.highcontrast.scss +3 -0
  1217. package/styles/slider/_bigger.material-dark.scss +3 -0
  1218. package/styles/slider/_bigger.material.scss +3 -0
  1219. package/styles/slider/_bigger.material3-dark.scss +3 -0
  1220. package/styles/slider/_bigger.material3.scss +3 -0
  1221. package/styles/slider/_bigger.scss +0 -1
  1222. package/styles/slider/_bigger.tailwind-dark.scss +3 -0
  1223. package/styles/slider/_bigger.tailwind.scss +3 -0
  1224. package/styles/slider/_bigger.tailwind3.scss +3 -0
  1225. package/styles/slider/_layout.bds.scss +3 -0
  1226. package/styles/slider/_layout.bootstrap-dark.scss +3 -0
  1227. package/styles/slider/_layout.bootstrap.scss +3 -0
  1228. package/styles/slider/_layout.bootstrap4.scss +3 -0
  1229. package/styles/slider/_layout.bootstrap5-dark.scss +3 -0
  1230. package/styles/slider/_layout.bootstrap5.3.scss +3 -0
  1231. package/styles/slider/_layout.bootstrap5.scss +3 -0
  1232. package/styles/slider/_layout.fabric-dark.scss +3 -0
  1233. package/styles/slider/_layout.fabric.scss +3 -0
  1234. package/styles/slider/_layout.fluent-dark.scss +3 -0
  1235. package/styles/slider/_layout.fluent.scss +3 -0
  1236. package/styles/slider/_layout.fluent2.scss +3 -0
  1237. package/styles/slider/_layout.highcontrast-light.scss +3 -0
  1238. package/styles/slider/_layout.highcontrast.scss +3 -0
  1239. package/styles/slider/_layout.material-dark.scss +3 -0
  1240. package/styles/slider/_layout.material.scss +3 -0
  1241. package/styles/slider/_layout.material3-dark.scss +3 -0
  1242. package/styles/slider/_layout.material3.scss +3 -0
  1243. package/styles/slider/_layout.scss +0 -1
  1244. package/styles/slider/_layout.tailwind-dark.scss +3 -0
  1245. package/styles/slider/_layout.tailwind.scss +3 -0
  1246. package/styles/slider/_layout.tailwind3.scss +3 -0
  1247. package/styles/slider/_theme-variables.bds.scss +1 -0
  1248. package/styles/slider/_theme-variables.bootstrap-dark.scss +1 -0
  1249. package/styles/slider/_theme-variables.bootstrap.scss +1 -0
  1250. package/styles/slider/_theme-variables.bootstrap4.scss +1 -0
  1251. package/styles/slider/_theme-variables.bootstrap5-dark.scss +1 -0
  1252. package/styles/slider/_theme-variables.bootstrap5.3.scss +1 -0
  1253. package/styles/slider/_theme-variables.bootstrap5.scss +1 -0
  1254. package/styles/slider/_theme-variables.fabric-dark.scss +1 -0
  1255. package/styles/slider/_theme-variables.fabric.scss +1 -0
  1256. package/styles/slider/_theme-variables.fluent-dark.scss +1 -0
  1257. package/styles/slider/_theme-variables.fluent.scss +1 -0
  1258. package/styles/slider/_theme-variables.fluent2.scss +1 -0
  1259. package/styles/slider/_theme-variables.highcontrast-light.scss +1 -0
  1260. package/styles/slider/_theme-variables.highcontrast.scss +1 -0
  1261. package/styles/slider/_theme-variables.material-dark.scss +1 -0
  1262. package/styles/slider/_theme-variables.material.scss +1 -0
  1263. package/styles/slider/_theme-variables.material3-dark.scss +1 -0
  1264. package/styles/slider/_theme-variables.material3.scss +1 -0
  1265. package/styles/slider/_theme-variables.tailwind-dark.scss +1 -0
  1266. package/styles/slider/_theme-variables.tailwind.scss +1 -0
  1267. package/styles/slider/_theme.bds.scss +4 -0
  1268. package/styles/slider/_theme.bootstrap-dark.scss +4 -0
  1269. package/styles/slider/_theme.bootstrap.scss +4 -0
  1270. package/styles/slider/_theme.bootstrap4.scss +4 -0
  1271. package/styles/slider/_theme.bootstrap5-dark.scss +4 -0
  1272. package/styles/slider/_theme.bootstrap5.3.scss +4 -0
  1273. package/styles/slider/_theme.bootstrap5.scss +4 -0
  1274. package/styles/slider/_theme.fabric-dark.scss +4 -0
  1275. package/styles/slider/_theme.fabric.scss +4 -0
  1276. package/styles/slider/_theme.fluent-dark.scss +4 -0
  1277. package/styles/slider/_theme.fluent.scss +4 -0
  1278. package/styles/slider/_theme.fluent2.scss +4 -0
  1279. package/styles/slider/_theme.highcontrast-light.scss +4 -0
  1280. package/styles/slider/_theme.highcontrast.scss +4 -0
  1281. package/styles/slider/_theme.material-dark.scss +4 -0
  1282. package/styles/slider/_theme.material.scss +4 -0
  1283. package/styles/slider/_theme.material3-dark.scss +4 -0
  1284. package/styles/slider/_theme.material3.scss +4 -0
  1285. package/styles/slider/_theme.scss +0 -1
  1286. package/styles/slider/_theme.tailwind-dark.scss +4 -0
  1287. package/styles/slider/_theme.tailwind.scss +4 -0
  1288. package/styles/slider/_theme.tailwind3.scss +4 -0
  1289. package/styles/slider/bds.css +12 -1
  1290. package/styles/slider/bds.scss +2 -2
  1291. package/styles/slider/bootstrap-dark.css +0 -1
  1292. package/styles/slider/bootstrap-dark.scss +2 -2
  1293. package/styles/slider/bootstrap.css +0 -1
  1294. package/styles/slider/bootstrap.scss +2 -2
  1295. package/styles/slider/bootstrap4.css +0 -1
  1296. package/styles/slider/bootstrap4.scss +2 -2
  1297. package/styles/slider/bootstrap5-dark.css +0 -1
  1298. package/styles/slider/bootstrap5-dark.scss +2 -2
  1299. package/styles/slider/bootstrap5.3.css +252 -1
  1300. package/styles/slider/bootstrap5.3.scss +2 -2
  1301. package/styles/slider/bootstrap5.css +0 -1
  1302. package/styles/slider/bootstrap5.scss +2 -2
  1303. package/styles/slider/fabric-dark.css +0 -1
  1304. package/styles/slider/fabric-dark.scss +2 -2
  1305. package/styles/slider/fabric.css +0 -1
  1306. package/styles/slider/fabric.scss +2 -2
  1307. package/styles/slider/fluent-dark.css +0 -1
  1308. package/styles/slider/fluent-dark.scss +2 -2
  1309. package/styles/slider/fluent.css +0 -1
  1310. package/styles/slider/fluent.scss +2 -2
  1311. package/styles/slider/fluent2.css +258 -1
  1312. package/styles/slider/fluent2.scss +2 -2
  1313. package/styles/slider/highcontrast-light.css +0 -1
  1314. package/styles/slider/highcontrast-light.scss +2 -2
  1315. package/styles/slider/highcontrast.css +0 -1
  1316. package/styles/slider/highcontrast.scss +2 -2
  1317. package/styles/slider/material-dark.css +0 -1
  1318. package/styles/slider/material-dark.scss +2 -2
  1319. package/styles/slider/material.css +0 -1
  1320. package/styles/slider/material.scss +2 -2
  1321. package/styles/slider/material3-dark.css +246 -1
  1322. package/styles/slider/material3-dark.scss +2 -2
  1323. package/styles/slider/material3.css +252 -1
  1324. package/styles/slider/material3.scss +2 -2
  1325. package/styles/slider/tailwind-dark.css +0 -1
  1326. package/styles/slider/tailwind-dark.scss +2 -2
  1327. package/styles/slider/tailwind.css +0 -1
  1328. package/styles/slider/tailwind.scss +2 -2
  1329. package/styles/slider/tailwind3.css +222 -1
  1330. package/styles/slider/tailwind3.scss +2 -2
  1331. package/styles/smart-textarea/_all.bds.scss +2 -0
  1332. package/styles/smart-textarea/_all.bootstrap-dark.scss +2 -0
  1333. package/styles/smart-textarea/_all.bootstrap.scss +2 -0
  1334. package/styles/smart-textarea/_all.bootstrap4.scss +2 -0
  1335. package/styles/smart-textarea/_all.bootstrap5-dark.scss +2 -0
  1336. package/styles/smart-textarea/_all.bootstrap5.3.scss +2 -0
  1337. package/styles/smart-textarea/_all.bootstrap5.scss +2 -0
  1338. package/styles/smart-textarea/_all.fabric-dark.scss +2 -0
  1339. package/styles/smart-textarea/_all.fabric.scss +2 -0
  1340. package/styles/smart-textarea/_all.fluent-dark.scss +2 -0
  1341. package/styles/smart-textarea/_all.fluent.scss +2 -0
  1342. package/styles/smart-textarea/_all.fluent2.scss +2 -0
  1343. package/styles/smart-textarea/_all.highcontrast-light.scss +2 -0
  1344. package/styles/smart-textarea/_all.highcontrast.scss +2 -0
  1345. package/styles/smart-textarea/_all.material-dark.scss +2 -0
  1346. package/styles/smart-textarea/_all.material.scss +2 -0
  1347. package/styles/smart-textarea/_all.material3-dark.scss +2 -0
  1348. package/styles/smart-textarea/_all.material3.scss +2 -0
  1349. package/styles/smart-textarea/_all.tailwind-dark.scss +2 -0
  1350. package/styles/smart-textarea/_all.tailwind.scss +2 -0
  1351. package/styles/smart-textarea/_all.tailwind3.scss +2 -0
  1352. package/styles/smart-textarea/_layout.bds.scss +3 -0
  1353. package/styles/smart-textarea/_layout.bootstrap-dark.scss +3 -0
  1354. package/styles/smart-textarea/_layout.bootstrap.scss +3 -0
  1355. package/styles/smart-textarea/_layout.bootstrap4.scss +3 -0
  1356. package/styles/smart-textarea/_layout.bootstrap5-dark.scss +3 -0
  1357. package/styles/smart-textarea/_layout.bootstrap5.3.scss +3 -0
  1358. package/styles/smart-textarea/_layout.bootstrap5.scss +3 -0
  1359. package/styles/smart-textarea/_layout.fabric-dark.scss +3 -0
  1360. package/styles/smart-textarea/_layout.fabric.scss +3 -0
  1361. package/styles/smart-textarea/_layout.fluent-dark.scss +3 -0
  1362. package/styles/smart-textarea/_layout.fluent.scss +3 -0
  1363. package/styles/smart-textarea/_layout.fluent2.scss +3 -0
  1364. package/styles/smart-textarea/_layout.highcontrast-light.scss +3 -0
  1365. package/styles/smart-textarea/_layout.highcontrast.scss +3 -0
  1366. package/styles/smart-textarea/_layout.material-dark.scss +3 -0
  1367. package/styles/smart-textarea/_layout.material.scss +3 -0
  1368. package/styles/smart-textarea/_layout.material3-dark.scss +3 -0
  1369. package/styles/smart-textarea/_layout.material3.scss +3 -0
  1370. package/styles/smart-textarea/_layout.scss +0 -1
  1371. package/styles/smart-textarea/_layout.tailwind-dark.scss +3 -0
  1372. package/styles/smart-textarea/_layout.tailwind.scss +3 -0
  1373. package/styles/smart-textarea/_layout.tailwind3.scss +3 -0
  1374. package/styles/smart-textarea/_theme-variables.bds.scss +1 -0
  1375. package/styles/smart-textarea/_theme-variables.bootstrap-dark.scss +1 -0
  1376. package/styles/smart-textarea/_theme-variables.bootstrap.scss +1 -0
  1377. package/styles/smart-textarea/_theme-variables.bootstrap4.scss +1 -0
  1378. package/styles/smart-textarea/_theme-variables.bootstrap5-dark.scss +1 -0
  1379. package/styles/smart-textarea/_theme-variables.bootstrap5.3.scss +1 -0
  1380. package/styles/smart-textarea/_theme-variables.bootstrap5.scss +1 -0
  1381. package/styles/smart-textarea/_theme-variables.fabric-dark.scss +1 -0
  1382. package/styles/smart-textarea/_theme-variables.fabric.scss +1 -0
  1383. package/styles/smart-textarea/_theme-variables.fluent-dark.scss +1 -0
  1384. package/styles/smart-textarea/_theme-variables.fluent.scss +1 -0
  1385. package/styles/smart-textarea/_theme-variables.fluent2.scss +1 -0
  1386. package/styles/smart-textarea/_theme-variables.highcontrast-light.scss +1 -0
  1387. package/styles/smart-textarea/_theme-variables.highcontrast.scss +1 -0
  1388. package/styles/smart-textarea/_theme-variables.material-dark.scss +1 -0
  1389. package/styles/smart-textarea/_theme-variables.material.scss +1 -0
  1390. package/styles/smart-textarea/_theme-variables.material3-dark.scss +1 -0
  1391. package/styles/smart-textarea/_theme-variables.material3.scss +1 -0
  1392. package/styles/smart-textarea/_theme-variables.tailwind-dark.scss +1 -0
  1393. package/styles/smart-textarea/_theme-variables.tailwind.scss +1 -0
  1394. package/styles/smart-textarea/_theme.bds.scss +4 -0
  1395. package/styles/smart-textarea/_theme.bootstrap-dark.scss +4 -0
  1396. package/styles/smart-textarea/_theme.bootstrap.scss +4 -0
  1397. package/styles/smart-textarea/_theme.bootstrap4.scss +4 -0
  1398. package/styles/smart-textarea/_theme.bootstrap5-dark.scss +4 -0
  1399. package/styles/smart-textarea/_theme.bootstrap5.3.scss +4 -0
  1400. package/styles/smart-textarea/_theme.bootstrap5.scss +4 -0
  1401. package/styles/smart-textarea/_theme.fabric-dark.scss +4 -0
  1402. package/styles/smart-textarea/_theme.fabric.scss +4 -0
  1403. package/styles/smart-textarea/_theme.fluent-dark.scss +4 -0
  1404. package/styles/smart-textarea/_theme.fluent.scss +4 -0
  1405. package/styles/smart-textarea/_theme.fluent2.scss +4 -0
  1406. package/styles/smart-textarea/_theme.highcontrast-light.scss +4 -0
  1407. package/styles/smart-textarea/_theme.highcontrast.scss +4 -0
  1408. package/styles/smart-textarea/_theme.material-dark.scss +4 -0
  1409. package/styles/smart-textarea/_theme.material.scss +4 -0
  1410. package/styles/smart-textarea/_theme.material3-dark.scss +4 -0
  1411. package/styles/smart-textarea/_theme.material3.scss +4 -0
  1412. package/styles/smart-textarea/_theme.scss +0 -1
  1413. package/styles/smart-textarea/_theme.tailwind-dark.scss +4 -0
  1414. package/styles/smart-textarea/_theme.tailwind.scss +4 -0
  1415. package/styles/smart-textarea/_theme.tailwind3.scss +4 -0
  1416. package/styles/smart-textarea/bds.css +8 -0
  1417. package/styles/smart-textarea/bds.scss +1 -1
  1418. package/styles/smart-textarea/bootstrap-dark.scss +1 -1
  1419. package/styles/smart-textarea/bootstrap.scss +1 -1
  1420. package/styles/smart-textarea/bootstrap4.scss +1 -1
  1421. package/styles/smart-textarea/bootstrap5-dark.scss +1 -1
  1422. package/styles/smart-textarea/bootstrap5.3.css +168 -0
  1423. package/styles/smart-textarea/bootstrap5.3.scss +1 -1
  1424. package/styles/smart-textarea/bootstrap5.scss +1 -1
  1425. package/styles/smart-textarea/fabric-dark.scss +1 -1
  1426. package/styles/smart-textarea/fabric.scss +1 -1
  1427. package/styles/smart-textarea/fluent-dark.scss +1 -1
  1428. package/styles/smart-textarea/fluent.scss +1 -1
  1429. package/styles/smart-textarea/fluent2.css +172 -0
  1430. package/styles/smart-textarea/fluent2.scss +1 -1
  1431. package/styles/smart-textarea/highcontrast-light.scss +1 -1
  1432. package/styles/smart-textarea/highcontrast.scss +1 -1
  1433. package/styles/smart-textarea/material-dark.scss +1 -1
  1434. package/styles/smart-textarea/material.scss +1 -1
  1435. package/styles/smart-textarea/material3-dark.css +164 -0
  1436. package/styles/smart-textarea/material3-dark.scss +1 -1
  1437. package/styles/smart-textarea/material3.css +168 -0
  1438. package/styles/smart-textarea/material3.scss +1 -1
  1439. package/styles/smart-textarea/tailwind-dark.scss +1 -1
  1440. package/styles/smart-textarea/tailwind.scss +1 -1
  1441. package/styles/smart-textarea/tailwind3.css +148 -0
  1442. package/styles/smart-textarea/tailwind3.scss +1 -1
  1443. package/styles/speech-to-text/_all.bds.scss +2 -0
  1444. package/styles/speech-to-text/_all.bootstrap-dark.scss +2 -0
  1445. package/styles/speech-to-text/_all.bootstrap.scss +2 -0
  1446. package/styles/speech-to-text/_all.bootstrap4.scss +2 -0
  1447. package/styles/speech-to-text/_all.bootstrap5-dark.scss +2 -0
  1448. package/styles/speech-to-text/_all.bootstrap5.3.scss +2 -0
  1449. package/styles/speech-to-text/_all.bootstrap5.scss +2 -0
  1450. package/styles/speech-to-text/_all.fabric-dark.scss +2 -0
  1451. package/styles/speech-to-text/_all.fabric.scss +2 -0
  1452. package/styles/speech-to-text/_all.fluent-dark.scss +2 -0
  1453. package/styles/speech-to-text/_all.fluent.scss +2 -0
  1454. package/styles/speech-to-text/_all.fluent2.scss +2 -0
  1455. package/styles/speech-to-text/_all.highcontrast-light.scss +2 -0
  1456. package/styles/speech-to-text/_all.highcontrast.scss +2 -0
  1457. package/styles/speech-to-text/_all.material-dark.scss +2 -0
  1458. package/styles/speech-to-text/_all.material.scss +2 -0
  1459. package/styles/speech-to-text/_all.material3-dark.scss +2 -0
  1460. package/styles/speech-to-text/_all.material3.scss +2 -0
  1461. package/styles/speech-to-text/_all.tailwind-dark.scss +2 -0
  1462. package/styles/speech-to-text/_all.tailwind.scss +2 -0
  1463. package/styles/speech-to-text/_all.tailwind3.scss +2 -0
  1464. package/styles/speech-to-text/_bigger.bds.scss +3 -0
  1465. package/styles/speech-to-text/_bigger.bootstrap-dark.scss +3 -0
  1466. package/styles/speech-to-text/_bigger.bootstrap.scss +3 -0
  1467. package/styles/speech-to-text/_bigger.bootstrap4.scss +3 -0
  1468. package/styles/speech-to-text/_bigger.bootstrap5-dark.scss +3 -0
  1469. package/styles/speech-to-text/_bigger.bootstrap5.3.scss +3 -0
  1470. package/styles/speech-to-text/_bigger.bootstrap5.scss +3 -0
  1471. package/styles/speech-to-text/_bigger.fabric-dark.scss +3 -0
  1472. package/styles/speech-to-text/_bigger.fabric.scss +3 -0
  1473. package/styles/speech-to-text/_bigger.fluent-dark.scss +3 -0
  1474. package/styles/speech-to-text/_bigger.fluent.scss +3 -0
  1475. package/styles/speech-to-text/_bigger.fluent2.scss +3 -0
  1476. package/styles/speech-to-text/_bigger.highcontrast-light.scss +3 -0
  1477. package/styles/speech-to-text/_bigger.highcontrast.scss +3 -0
  1478. package/styles/speech-to-text/_bigger.material-dark.scss +3 -0
  1479. package/styles/speech-to-text/_bigger.material.scss +3 -0
  1480. package/styles/speech-to-text/_bigger.material3-dark.scss +3 -0
  1481. package/styles/speech-to-text/_bigger.material3.scss +3 -0
  1482. package/styles/speech-to-text/_bigger.scss +0 -1
  1483. package/styles/speech-to-text/_bigger.tailwind-dark.scss +3 -0
  1484. package/styles/speech-to-text/_bigger.tailwind.scss +3 -0
  1485. package/styles/speech-to-text/_bigger.tailwind3.scss +3 -0
  1486. package/styles/speech-to-text/_layout.bds.scss +3 -0
  1487. package/styles/speech-to-text/_layout.bootstrap-dark.scss +3 -0
  1488. package/styles/speech-to-text/_layout.bootstrap.scss +3 -0
  1489. package/styles/speech-to-text/_layout.bootstrap4.scss +3 -0
  1490. package/styles/speech-to-text/_layout.bootstrap5-dark.scss +3 -0
  1491. package/styles/speech-to-text/_layout.bootstrap5.3.scss +3 -0
  1492. package/styles/speech-to-text/_layout.bootstrap5.scss +3 -0
  1493. package/styles/speech-to-text/_layout.fabric-dark.scss +3 -0
  1494. package/styles/speech-to-text/_layout.fabric.scss +3 -0
  1495. package/styles/speech-to-text/_layout.fluent-dark.scss +3 -0
  1496. package/styles/speech-to-text/_layout.fluent.scss +3 -0
  1497. package/styles/speech-to-text/_layout.fluent2.scss +3 -0
  1498. package/styles/speech-to-text/_layout.highcontrast-light.scss +3 -0
  1499. package/styles/speech-to-text/_layout.highcontrast.scss +3 -0
  1500. package/styles/speech-to-text/_layout.material-dark.scss +3 -0
  1501. package/styles/speech-to-text/_layout.material.scss +3 -0
  1502. package/styles/speech-to-text/_layout.material3-dark.scss +3 -0
  1503. package/styles/speech-to-text/_layout.material3.scss +3 -0
  1504. package/styles/speech-to-text/_layout.scss +0 -1
  1505. package/styles/speech-to-text/_layout.tailwind-dark.scss +3 -0
  1506. package/styles/speech-to-text/_layout.tailwind.scss +3 -0
  1507. package/styles/speech-to-text/_layout.tailwind3.scss +3 -0
  1508. package/styles/speech-to-text/_theme-variables.bds.scss +1 -0
  1509. package/styles/speech-to-text/_theme-variables.bootstrap-dark.scss +1 -0
  1510. package/styles/speech-to-text/_theme-variables.bootstrap.scss +1 -0
  1511. package/styles/speech-to-text/_theme-variables.bootstrap4.scss +1 -0
  1512. package/styles/speech-to-text/_theme-variables.bootstrap5-dark.scss +1 -0
  1513. package/styles/speech-to-text/_theme-variables.bootstrap5.3.scss +1 -0
  1514. package/styles/speech-to-text/_theme-variables.bootstrap5.scss +1 -0
  1515. package/styles/speech-to-text/_theme-variables.fabric-dark.scss +1 -0
  1516. package/styles/speech-to-text/_theme-variables.fabric.scss +1 -0
  1517. package/styles/speech-to-text/_theme-variables.fluent-dark.scss +1 -0
  1518. package/styles/speech-to-text/_theme-variables.fluent.scss +1 -0
  1519. package/styles/speech-to-text/_theme-variables.fluent2.scss +1 -0
  1520. package/styles/speech-to-text/_theme-variables.highcontrast-light.scss +1 -0
  1521. package/styles/speech-to-text/_theme-variables.highcontrast.scss +1 -0
  1522. package/styles/speech-to-text/_theme-variables.material-dark.scss +1 -0
  1523. package/styles/speech-to-text/_theme-variables.material.scss +1 -0
  1524. package/styles/speech-to-text/_theme-variables.material3-dark.scss +1 -0
  1525. package/styles/speech-to-text/_theme-variables.material3.scss +1 -0
  1526. package/styles/speech-to-text/_theme-variables.tailwind-dark.scss +1 -0
  1527. package/styles/speech-to-text/_theme-variables.tailwind.scss +1 -0
  1528. package/styles/speech-to-text/_theme.bds.scss +4 -0
  1529. package/styles/speech-to-text/_theme.bootstrap-dark.scss +4 -0
  1530. package/styles/speech-to-text/_theme.bootstrap.scss +4 -0
  1531. package/styles/speech-to-text/_theme.bootstrap4.scss +4 -0
  1532. package/styles/speech-to-text/_theme.bootstrap5-dark.scss +4 -0
  1533. package/styles/speech-to-text/_theme.bootstrap5.3.scss +4 -0
  1534. package/styles/speech-to-text/_theme.bootstrap5.scss +4 -0
  1535. package/styles/speech-to-text/_theme.fabric-dark.scss +4 -0
  1536. package/styles/speech-to-text/_theme.fabric.scss +4 -0
  1537. package/styles/speech-to-text/_theme.fluent-dark.scss +4 -0
  1538. package/styles/speech-to-text/_theme.fluent.scss +4 -0
  1539. package/styles/speech-to-text/_theme.fluent2.scss +4 -0
  1540. package/styles/speech-to-text/_theme.highcontrast-light.scss +4 -0
  1541. package/styles/speech-to-text/_theme.highcontrast.scss +4 -0
  1542. package/styles/speech-to-text/_theme.material-dark.scss +4 -0
  1543. package/styles/speech-to-text/_theme.material.scss +4 -0
  1544. package/styles/speech-to-text/_theme.material3-dark.scss +4 -0
  1545. package/styles/speech-to-text/_theme.material3.scss +4 -0
  1546. package/styles/speech-to-text/_theme.scss +0 -1
  1547. package/styles/speech-to-text/_theme.tailwind-dark.scss +4 -0
  1548. package/styles/speech-to-text/_theme.tailwind.scss +4 -0
  1549. package/styles/speech-to-text/_theme.tailwind3.scss +4 -0
  1550. package/styles/speech-to-text/bds.css +12 -0
  1551. package/styles/speech-to-text/bds.scss +2 -2
  1552. package/styles/speech-to-text/bootstrap-dark.scss +2 -2
  1553. package/styles/speech-to-text/bootstrap.scss +2 -2
  1554. package/styles/speech-to-text/bootstrap4.scss +2 -2
  1555. package/styles/speech-to-text/bootstrap5-dark.scss +2 -2
  1556. package/styles/speech-to-text/bootstrap5.3.css +252 -0
  1557. package/styles/speech-to-text/bootstrap5.3.scss +2 -2
  1558. package/styles/speech-to-text/bootstrap5.scss +2 -2
  1559. package/styles/speech-to-text/fabric-dark.scss +2 -2
  1560. package/styles/speech-to-text/fabric.scss +2 -2
  1561. package/styles/speech-to-text/fluent-dark.scss +2 -2
  1562. package/styles/speech-to-text/fluent.scss +2 -2
  1563. package/styles/speech-to-text/fluent2.css +258 -0
  1564. package/styles/speech-to-text/fluent2.scss +2 -2
  1565. package/styles/speech-to-text/highcontrast-light.scss +2 -2
  1566. package/styles/speech-to-text/highcontrast.scss +2 -2
  1567. package/styles/speech-to-text/material-dark.scss +2 -2
  1568. package/styles/speech-to-text/material.scss +2 -2
  1569. package/styles/speech-to-text/material3-dark.css +246 -0
  1570. package/styles/speech-to-text/material3-dark.scss +2 -2
  1571. package/styles/speech-to-text/material3.css +252 -0
  1572. package/styles/speech-to-text/material3.scss +2 -2
  1573. package/styles/speech-to-text/tailwind-dark.scss +2 -2
  1574. package/styles/speech-to-text/tailwind.scss +2 -2
  1575. package/styles/speech-to-text/tailwind3.css +222 -0
  1576. package/styles/speech-to-text/tailwind3.scss +2 -2
  1577. package/styles/tailwind-dark-lite.css +6 -4
  1578. package/styles/tailwind-dark-lite.scss +14 -14
  1579. package/styles/tailwind-dark.css +9 -4
  1580. package/styles/tailwind-dark.scss +24 -24
  1581. package/styles/tailwind-lite.css +6 -4
  1582. package/styles/tailwind-lite.scss +14 -14
  1583. package/styles/tailwind.css +9 -4
  1584. package/styles/tailwind.scss +24 -24
  1585. package/styles/tailwind3-lite.css +2329 -149
  1586. package/styles/tailwind3-lite.scss +14 -14
  1587. package/styles/tailwind3.css +3513 -322
  1588. package/styles/tailwind3.scss +24 -24
  1589. package/styles/textarea/_all.bds.scss +1 -0
  1590. package/styles/textarea/_all.bootstrap-dark.scss +1 -0
  1591. package/styles/textarea/_all.bootstrap.scss +1 -0
  1592. package/styles/textarea/_all.bootstrap4.scss +1 -0
  1593. package/styles/textarea/_all.bootstrap5-dark.scss +1 -0
  1594. package/styles/textarea/_all.bootstrap5.3.scss +1 -0
  1595. package/styles/textarea/_all.bootstrap5.scss +1 -0
  1596. package/styles/textarea/_all.fabric-dark.scss +1 -0
  1597. package/styles/textarea/_all.fabric.scss +1 -0
  1598. package/styles/textarea/_all.fluent-dark.scss +1 -0
  1599. package/styles/textarea/_all.fluent.scss +1 -0
  1600. package/styles/textarea/_all.fluent2.scss +1 -0
  1601. package/styles/textarea/_all.highcontrast-light.scss +1 -0
  1602. package/styles/textarea/_all.highcontrast.scss +1 -0
  1603. package/styles/textarea/_all.material-dark.scss +1 -0
  1604. package/styles/textarea/_all.material.scss +1 -0
  1605. package/styles/textarea/_all.material3-dark.scss +1 -0
  1606. package/styles/textarea/_all.material3.scss +1 -0
  1607. package/styles/textarea/_all.tailwind-dark.scss +1 -0
  1608. package/styles/textarea/_all.tailwind.scss +1 -0
  1609. package/styles/textarea/_all.tailwind3.scss +1 -0
  1610. package/styles/textarea/_layout.bds.scss +3 -0
  1611. package/styles/textarea/_layout.bootstrap-dark.scss +3 -0
  1612. package/styles/textarea/_layout.bootstrap.scss +3 -0
  1613. package/styles/textarea/_layout.bootstrap4.scss +3 -0
  1614. package/styles/textarea/_layout.bootstrap5-dark.scss +3 -0
  1615. package/styles/textarea/_layout.bootstrap5.3.scss +3 -0
  1616. package/styles/textarea/_layout.bootstrap5.scss +3 -0
  1617. package/styles/textarea/_layout.fabric-dark.scss +3 -0
  1618. package/styles/textarea/_layout.fabric.scss +3 -0
  1619. package/styles/textarea/_layout.fluent-dark.scss +3 -0
  1620. package/styles/textarea/_layout.fluent.scss +3 -0
  1621. package/styles/textarea/_layout.fluent2.scss +3 -0
  1622. package/styles/textarea/_layout.highcontrast-light.scss +3 -0
  1623. package/styles/textarea/_layout.highcontrast.scss +3 -0
  1624. package/styles/textarea/_layout.material-dark.scss +3 -0
  1625. package/styles/textarea/_layout.material.scss +3 -0
  1626. package/styles/textarea/_layout.material3-dark.scss +3 -0
  1627. package/styles/textarea/_layout.material3.scss +3 -0
  1628. package/styles/textarea/_layout.scss +0 -1
  1629. package/styles/textarea/_layout.tailwind-dark.scss +3 -0
  1630. package/styles/textarea/_layout.tailwind.scss +3 -0
  1631. package/styles/textarea/_layout.tailwind3.scss +3 -0
  1632. package/styles/textarea/_theme-variables.bds.scss +1 -0
  1633. package/styles/textarea/_theme-variables.bootstrap-dark.scss +1 -0
  1634. package/styles/textarea/_theme-variables.bootstrap.scss +1 -0
  1635. package/styles/textarea/_theme-variables.bootstrap4.scss +1 -0
  1636. package/styles/textarea/_theme-variables.bootstrap5-dark.scss +1 -0
  1637. package/styles/textarea/_theme-variables.bootstrap5.3.scss +1 -0
  1638. package/styles/textarea/_theme-variables.bootstrap5.scss +1 -0
  1639. package/styles/textarea/_theme-variables.fabric-dark.scss +1 -0
  1640. package/styles/textarea/_theme-variables.fabric.scss +1 -0
  1641. package/styles/textarea/_theme-variables.fluent-dark.scss +1 -0
  1642. package/styles/textarea/_theme-variables.fluent.scss +1 -0
  1643. package/styles/textarea/_theme-variables.fluent2.scss +1 -0
  1644. package/styles/textarea/_theme-variables.highcontrast-light.scss +1 -0
  1645. package/styles/textarea/_theme-variables.highcontrast.scss +1 -0
  1646. package/styles/textarea/_theme-variables.material-dark.scss +1 -0
  1647. package/styles/textarea/_theme-variables.material.scss +1 -0
  1648. package/styles/textarea/_theme-variables.material3-dark.scss +1 -0
  1649. package/styles/textarea/_theme-variables.material3.scss +1 -0
  1650. package/styles/textarea/_theme-variables.tailwind-dark.scss +1 -0
  1651. package/styles/textarea/_theme-variables.tailwind.scss +1 -0
  1652. package/styles/textarea/bds.css +4 -0
  1653. package/styles/textarea/bds.scss +1 -1
  1654. package/styles/textarea/bootstrap-dark.scss +1 -1
  1655. package/styles/textarea/bootstrap.scss +1 -1
  1656. package/styles/textarea/bootstrap4.scss +1 -1
  1657. package/styles/textarea/bootstrap5-dark.scss +1 -1
  1658. package/styles/textarea/bootstrap5.3.css +84 -0
  1659. package/styles/textarea/bootstrap5.3.scss +1 -1
  1660. package/styles/textarea/bootstrap5.scss +1 -1
  1661. package/styles/textarea/fabric-dark.scss +1 -1
  1662. package/styles/textarea/fabric.scss +1 -1
  1663. package/styles/textarea/fluent-dark.scss +1 -1
  1664. package/styles/textarea/fluent.scss +1 -1
  1665. package/styles/textarea/fluent2.css +86 -0
  1666. package/styles/textarea/fluent2.scss +1 -1
  1667. package/styles/textarea/highcontrast-light.scss +1 -1
  1668. package/styles/textarea/highcontrast.scss +1 -1
  1669. package/styles/textarea/material-dark.scss +1 -1
  1670. package/styles/textarea/material.scss +1 -1
  1671. package/styles/textarea/material3-dark.css +82 -0
  1672. package/styles/textarea/material3-dark.scss +1 -1
  1673. package/styles/textarea/material3.css +84 -0
  1674. package/styles/textarea/material3.scss +1 -1
  1675. package/styles/textarea/tailwind-dark.scss +1 -1
  1676. package/styles/textarea/tailwind.scss +1 -1
  1677. package/styles/textarea/tailwind3.css +74 -0
  1678. package/styles/textarea/tailwind3.scss +1 -1
  1679. package/styles/textbox/_all.bds.scss +1 -0
  1680. package/styles/textbox/_all.bootstrap-dark.scss +1 -0
  1681. package/styles/textbox/_all.bootstrap.scss +1 -0
  1682. package/styles/textbox/_all.bootstrap4.scss +1 -0
  1683. package/styles/textbox/_all.bootstrap5-dark.scss +1 -0
  1684. package/styles/textbox/_all.bootstrap5.3.scss +1 -0
  1685. package/styles/textbox/_all.bootstrap5.scss +1 -0
  1686. package/styles/textbox/_all.fabric-dark.scss +1 -0
  1687. package/styles/textbox/_all.fabric.scss +1 -0
  1688. package/styles/textbox/_all.fluent-dark.scss +1 -0
  1689. package/styles/textbox/_all.fluent.scss +1 -0
  1690. package/styles/textbox/_all.fluent2.scss +1 -0
  1691. package/styles/textbox/_all.highcontrast-light.scss +1 -0
  1692. package/styles/textbox/_all.highcontrast.scss +1 -0
  1693. package/styles/textbox/_all.material-dark.scss +1 -0
  1694. package/styles/textbox/_all.material.scss +1 -0
  1695. package/styles/textbox/_all.material3-dark.scss +1 -0
  1696. package/styles/textbox/_all.material3.scss +1 -0
  1697. package/styles/textbox/_all.tailwind-dark.scss +1 -0
  1698. package/styles/textbox/_all.tailwind.scss +1 -0
  1699. package/styles/textbox/_all.tailwind3.scss +1 -0
  1700. package/styles/textbox/_bigger.bds.scss +3 -0
  1701. package/styles/textbox/_bigger.bootstrap-dark.scss +3 -0
  1702. package/styles/textbox/_bigger.bootstrap.scss +3 -0
  1703. package/styles/textbox/_bigger.bootstrap4.scss +3 -0
  1704. package/styles/textbox/_bigger.bootstrap5-dark.scss +3 -0
  1705. package/styles/textbox/_bigger.bootstrap5.3.scss +3 -0
  1706. package/styles/textbox/_bigger.bootstrap5.scss +3 -0
  1707. package/styles/textbox/_bigger.fabric-dark.scss +3 -0
  1708. package/styles/textbox/_bigger.fabric.scss +3 -0
  1709. package/styles/textbox/_bigger.fluent-dark.scss +3 -0
  1710. package/styles/textbox/_bigger.fluent.scss +3 -0
  1711. package/styles/textbox/_bigger.fluent2.scss +3 -0
  1712. package/styles/textbox/_bigger.highcontrast-light.scss +3 -0
  1713. package/styles/textbox/_bigger.highcontrast.scss +3 -0
  1714. package/styles/textbox/_bigger.material-dark.scss +3 -0
  1715. package/styles/textbox/_bigger.material.scss +3 -0
  1716. package/styles/textbox/_bigger.material3-dark.scss +3 -0
  1717. package/styles/textbox/_bigger.material3.scss +3 -0
  1718. package/styles/textbox/_bigger.scss +0 -1
  1719. package/styles/textbox/_bigger.tailwind-dark.scss +3 -0
  1720. package/styles/textbox/_bigger.tailwind.scss +3 -0
  1721. package/styles/textbox/_bigger.tailwind3.scss +3 -0
  1722. package/styles/textbox/_layout.bds.scss +3 -0
  1723. package/styles/textbox/_layout.bootstrap-dark.scss +3 -0
  1724. package/styles/textbox/_layout.bootstrap.scss +3 -0
  1725. package/styles/textbox/_layout.bootstrap4.scss +3 -0
  1726. package/styles/textbox/_layout.bootstrap5-dark.scss +3 -0
  1727. package/styles/textbox/_layout.bootstrap5.3.scss +3 -0
  1728. package/styles/textbox/_layout.bootstrap5.scss +3 -0
  1729. package/styles/textbox/_layout.fabric-dark.scss +3 -0
  1730. package/styles/textbox/_layout.fabric.scss +3 -0
  1731. package/styles/textbox/_layout.fluent-dark.scss +3 -0
  1732. package/styles/textbox/_layout.fluent.scss +3 -0
  1733. package/styles/textbox/_layout.fluent2.scss +3 -0
  1734. package/styles/textbox/_layout.highcontrast-light.scss +3 -0
  1735. package/styles/textbox/_layout.highcontrast.scss +3 -0
  1736. package/styles/textbox/_layout.material-dark.scss +3 -0
  1737. package/styles/textbox/_layout.material.scss +3 -0
  1738. package/styles/textbox/_layout.material3-dark.scss +3 -0
  1739. package/styles/textbox/_layout.material3.scss +3 -0
  1740. package/styles/textbox/_layout.scss +0 -1
  1741. package/styles/textbox/_layout.tailwind-dark.scss +3 -0
  1742. package/styles/textbox/_layout.tailwind.scss +3 -0
  1743. package/styles/textbox/_layout.tailwind3.scss +3 -0
  1744. package/styles/textbox/_theme-variables.bds.scss +1 -0
  1745. package/styles/textbox/_theme-variables.bootstrap-dark.scss +1 -0
  1746. package/styles/textbox/_theme-variables.bootstrap.scss +1 -0
  1747. package/styles/textbox/_theme-variables.bootstrap4.scss +1 -0
  1748. package/styles/textbox/_theme-variables.bootstrap5-dark.scss +1 -0
  1749. package/styles/textbox/_theme-variables.bootstrap5.3.scss +1 -0
  1750. package/styles/textbox/_theme-variables.bootstrap5.scss +1 -0
  1751. package/styles/textbox/_theme-variables.fabric-dark.scss +1 -0
  1752. package/styles/textbox/_theme-variables.fabric.scss +1 -0
  1753. package/styles/textbox/_theme-variables.fluent-dark.scss +1 -0
  1754. package/styles/textbox/_theme-variables.fluent.scss +1 -0
  1755. package/styles/textbox/_theme-variables.fluent2.scss +1 -0
  1756. package/styles/textbox/_theme-variables.highcontrast-light.scss +1 -0
  1757. package/styles/textbox/_theme-variables.highcontrast.scss +1 -0
  1758. package/styles/textbox/_theme-variables.material-dark.scss +1 -0
  1759. package/styles/textbox/_theme-variables.material.scss +1 -0
  1760. package/styles/textbox/_theme-variables.material3-dark.scss +1 -0
  1761. package/styles/textbox/_theme-variables.material3.scss +1 -0
  1762. package/styles/textbox/_theme-variables.tailwind-dark.scss +1 -0
  1763. package/styles/textbox/_theme-variables.tailwind.scss +1 -0
  1764. package/styles/textbox/bds.css +10 -0
  1765. package/styles/textbox/bds.scss +2 -2
  1766. package/styles/textbox/bootstrap-dark.css +2 -0
  1767. package/styles/textbox/bootstrap-dark.scss +2 -2
  1768. package/styles/textbox/bootstrap.css +2 -0
  1769. package/styles/textbox/bootstrap.scss +2 -2
  1770. package/styles/textbox/bootstrap4.css +2 -0
  1771. package/styles/textbox/bootstrap4.scss +2 -2
  1772. package/styles/textbox/bootstrap5-dark.css +2 -0
  1773. package/styles/textbox/bootstrap5-dark.scss +2 -2
  1774. package/styles/textbox/bootstrap5.3.css +170 -0
  1775. package/styles/textbox/bootstrap5.3.scss +2 -2
  1776. package/styles/textbox/bootstrap5.css +2 -0
  1777. package/styles/textbox/bootstrap5.scss +2 -2
  1778. package/styles/textbox/fabric-dark.css +2 -0
  1779. package/styles/textbox/fabric-dark.scss +2 -2
  1780. package/styles/textbox/fabric.css +2 -0
  1781. package/styles/textbox/fabric.scss +2 -2
  1782. package/styles/textbox/fluent-dark.css +2 -0
  1783. package/styles/textbox/fluent-dark.scss +2 -2
  1784. package/styles/textbox/fluent.css +2 -0
  1785. package/styles/textbox/fluent.scss +2 -2
  1786. package/styles/textbox/fluent2.css +174 -0
  1787. package/styles/textbox/fluent2.scss +2 -2
  1788. package/styles/textbox/highcontrast-light.css +2 -0
  1789. package/styles/textbox/highcontrast-light.scss +2 -2
  1790. package/styles/textbox/highcontrast.css +2 -0
  1791. package/styles/textbox/highcontrast.scss +2 -2
  1792. package/styles/textbox/material-dark.css +2 -0
  1793. package/styles/textbox/material-dark.scss +2 -2
  1794. package/styles/textbox/material.css +2 -0
  1795. package/styles/textbox/material.scss +2 -2
  1796. package/styles/textbox/material3-dark.css +166 -0
  1797. package/styles/textbox/material3-dark.scss +2 -2
  1798. package/styles/textbox/material3.css +170 -0
  1799. package/styles/textbox/material3.scss +2 -2
  1800. package/styles/textbox/tailwind-dark.css +2 -0
  1801. package/styles/textbox/tailwind-dark.scss +2 -2
  1802. package/styles/textbox/tailwind.css +2 -0
  1803. package/styles/textbox/tailwind.scss +2 -2
  1804. package/styles/textbox/tailwind3.css +150 -0
  1805. package/styles/textbox/tailwind3.scss +2 -2
  1806. package/styles/uploader/_all.bds.scss +2 -0
  1807. package/styles/uploader/_all.bootstrap-dark.scss +2 -0
  1808. package/styles/uploader/_all.bootstrap.scss +2 -0
  1809. package/styles/uploader/_all.bootstrap4.scss +2 -0
  1810. package/styles/uploader/_all.bootstrap5-dark.scss +2 -0
  1811. package/styles/uploader/_all.bootstrap5.3.scss +2 -0
  1812. package/styles/uploader/_all.bootstrap5.scss +2 -0
  1813. package/styles/uploader/_all.fabric-dark.scss +2 -0
  1814. package/styles/uploader/_all.fabric.scss +2 -0
  1815. package/styles/uploader/_all.fluent-dark.scss +2 -0
  1816. package/styles/uploader/_all.fluent.scss +2 -0
  1817. package/styles/uploader/_all.fluent2.scss +2 -0
  1818. package/styles/uploader/_all.highcontrast-light.scss +2 -0
  1819. package/styles/uploader/_all.highcontrast.scss +2 -0
  1820. package/styles/uploader/_all.material-dark.scss +2 -0
  1821. package/styles/uploader/_all.material.scss +2 -0
  1822. package/styles/uploader/_all.material3-dark.scss +2 -0
  1823. package/styles/uploader/_all.material3.scss +2 -0
  1824. package/styles/uploader/_all.tailwind-dark.scss +2 -0
  1825. package/styles/uploader/_all.tailwind.scss +2 -0
  1826. package/styles/uploader/_all.tailwind3.scss +2 -0
  1827. package/styles/uploader/_bigger.bds.scss +3 -0
  1828. package/styles/uploader/_bigger.bootstrap-dark.scss +3 -0
  1829. package/styles/uploader/_bigger.bootstrap.scss +3 -0
  1830. package/styles/uploader/_bigger.bootstrap4.scss +3 -0
  1831. package/styles/uploader/_bigger.bootstrap5-dark.scss +3 -0
  1832. package/styles/uploader/_bigger.bootstrap5.3.scss +3 -0
  1833. package/styles/uploader/_bigger.bootstrap5.scss +3 -0
  1834. package/styles/uploader/_bigger.fabric-dark.scss +3 -0
  1835. package/styles/uploader/_bigger.fabric.scss +3 -0
  1836. package/styles/uploader/_bigger.fluent-dark.scss +3 -0
  1837. package/styles/uploader/_bigger.fluent.scss +3 -0
  1838. package/styles/uploader/_bigger.fluent2.scss +3 -0
  1839. package/styles/uploader/_bigger.highcontrast-light.scss +3 -0
  1840. package/styles/uploader/_bigger.highcontrast.scss +3 -0
  1841. package/styles/uploader/_bigger.material-dark.scss +3 -0
  1842. package/styles/uploader/_bigger.material.scss +3 -0
  1843. package/styles/uploader/_bigger.material3-dark.scss +3 -0
  1844. package/styles/uploader/_bigger.material3.scss +3 -0
  1845. package/styles/uploader/_bigger.scss +0 -1
  1846. package/styles/uploader/_bigger.tailwind-dark.scss +3 -0
  1847. package/styles/uploader/_bigger.tailwind.scss +3 -0
  1848. package/styles/uploader/_bigger.tailwind3.scss +3 -0
  1849. package/styles/uploader/_layout.bds.scss +3 -0
  1850. package/styles/uploader/_layout.bootstrap-dark.scss +3 -0
  1851. package/styles/uploader/_layout.bootstrap.scss +3 -0
  1852. package/styles/uploader/_layout.bootstrap4.scss +3 -0
  1853. package/styles/uploader/_layout.bootstrap5-dark.scss +3 -0
  1854. package/styles/uploader/_layout.bootstrap5.3.scss +3 -0
  1855. package/styles/uploader/_layout.bootstrap5.scss +3 -0
  1856. package/styles/uploader/_layout.fabric-dark.scss +3 -0
  1857. package/styles/uploader/_layout.fabric.scss +3 -0
  1858. package/styles/uploader/_layout.fluent-dark.scss +3 -0
  1859. package/styles/uploader/_layout.fluent.scss +3 -0
  1860. package/styles/uploader/_layout.fluent2.scss +3 -0
  1861. package/styles/uploader/_layout.highcontrast-light.scss +3 -0
  1862. package/styles/uploader/_layout.highcontrast.scss +3 -0
  1863. package/styles/uploader/_layout.material-dark.scss +3 -0
  1864. package/styles/uploader/_layout.material.scss +3 -0
  1865. package/styles/uploader/_layout.material3-dark.scss +3 -0
  1866. package/styles/uploader/_layout.material3.scss +3 -0
  1867. package/styles/uploader/_layout.scss +0 -1
  1868. package/styles/uploader/_layout.tailwind-dark.scss +3 -0
  1869. package/styles/uploader/_layout.tailwind.scss +3 -0
  1870. package/styles/uploader/_layout.tailwind3.scss +3 -0
  1871. package/styles/uploader/_theme-variables.bds.scss +1 -0
  1872. package/styles/uploader/_theme-variables.bootstrap-dark.scss +1 -0
  1873. package/styles/uploader/_theme-variables.bootstrap.scss +1 -0
  1874. package/styles/uploader/_theme-variables.bootstrap4.scss +1 -0
  1875. package/styles/uploader/_theme-variables.bootstrap5-dark.scss +1 -0
  1876. package/styles/uploader/_theme-variables.bootstrap5.3.scss +1 -0
  1877. package/styles/uploader/_theme-variables.bootstrap5.scss +1 -0
  1878. package/styles/uploader/_theme-variables.fabric-dark.scss +1 -0
  1879. package/styles/uploader/_theme-variables.fabric.scss +1 -0
  1880. package/styles/uploader/_theme-variables.fluent-dark.scss +1 -0
  1881. package/styles/uploader/_theme-variables.fluent.scss +1 -0
  1882. package/styles/uploader/_theme-variables.fluent2.scss +1 -0
  1883. package/styles/uploader/_theme-variables.highcontrast-light.scss +1 -0
  1884. package/styles/uploader/_theme-variables.highcontrast.scss +1 -0
  1885. package/styles/uploader/_theme-variables.material-dark.scss +1 -0
  1886. package/styles/uploader/_theme-variables.material.scss +1 -0
  1887. package/styles/uploader/_theme-variables.material3-dark.scss +1 -0
  1888. package/styles/uploader/_theme-variables.material3.scss +1 -0
  1889. package/styles/uploader/_theme-variables.tailwind-dark.scss +1 -0
  1890. package/styles/uploader/_theme-variables.tailwind.scss +1 -0
  1891. package/styles/uploader/_theme.bds.scss +4 -0
  1892. package/styles/uploader/_theme.bootstrap-dark.scss +4 -0
  1893. package/styles/uploader/_theme.bootstrap.scss +4 -0
  1894. package/styles/uploader/_theme.bootstrap4.scss +4 -0
  1895. package/styles/uploader/_theme.bootstrap5-dark.scss +4 -0
  1896. package/styles/uploader/_theme.bootstrap5.3.scss +4 -0
  1897. package/styles/uploader/_theme.bootstrap5.scss +4 -0
  1898. package/styles/uploader/_theme.fabric-dark.scss +4 -0
  1899. package/styles/uploader/_theme.fabric.scss +4 -0
  1900. package/styles/uploader/_theme.fluent-dark.scss +4 -0
  1901. package/styles/uploader/_theme.fluent.scss +4 -0
  1902. package/styles/uploader/_theme.fluent2.scss +4 -0
  1903. package/styles/uploader/_theme.highcontrast-light.scss +4 -0
  1904. package/styles/uploader/_theme.highcontrast.scss +4 -0
  1905. package/styles/uploader/_theme.material-dark.scss +4 -0
  1906. package/styles/uploader/_theme.material.scss +4 -0
  1907. package/styles/uploader/_theme.material3-dark.scss +4 -0
  1908. package/styles/uploader/_theme.material3.scss +4 -0
  1909. package/styles/uploader/_theme.scss +0 -1
  1910. package/styles/uploader/_theme.tailwind-dark.scss +4 -0
  1911. package/styles/uploader/_theme.tailwind.scss +4 -0
  1912. package/styles/uploader/_theme.tailwind3.scss +4 -0
  1913. package/styles/uploader/bds.css +12 -0
  1914. package/styles/uploader/bds.scss +2 -2
  1915. package/styles/uploader/bootstrap-dark.scss +2 -2
  1916. package/styles/uploader/bootstrap.scss +2 -2
  1917. package/styles/uploader/bootstrap4.scss +2 -2
  1918. package/styles/uploader/bootstrap5-dark.scss +2 -2
  1919. package/styles/uploader/bootstrap5.3.css +252 -0
  1920. package/styles/uploader/bootstrap5.3.scss +2 -2
  1921. package/styles/uploader/bootstrap5.scss +2 -2
  1922. package/styles/uploader/fabric-dark.scss +2 -2
  1923. package/styles/uploader/fabric.scss +2 -2
  1924. package/styles/uploader/fluent-dark.scss +2 -2
  1925. package/styles/uploader/fluent.scss +2 -2
  1926. package/styles/uploader/fluent2.css +258 -0
  1927. package/styles/uploader/fluent2.scss +2 -2
  1928. package/styles/uploader/highcontrast-light.scss +2 -2
  1929. package/styles/uploader/highcontrast.scss +2 -2
  1930. package/styles/uploader/material-dark.scss +2 -2
  1931. package/styles/uploader/material.scss +2 -2
  1932. package/styles/uploader/material3-dark.css +246 -0
  1933. package/styles/uploader/material3-dark.scss +2 -2
  1934. package/styles/uploader/material3.css +252 -0
  1935. package/styles/uploader/material3.scss +2 -2
  1936. package/styles/uploader/tailwind-dark.scss +2 -2
  1937. package/styles/uploader/tailwind.scss +2 -2
  1938. package/styles/uploader/tailwind3.css +222 -0
  1939. package/styles/uploader/tailwind3.scss +2 -2
  1940. package/.eslintrc.json +0 -263
  1941. package/aceconfig.js +0 -17
  1942. package/tslint.json +0 -111
  1943. /package/styles/color-picker/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1944. /package/styles/data-form/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1945. /package/styles/input/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1946. /package/styles/maskedtextbox/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1947. /package/styles/numerictextbox/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1948. /package/styles/otp-input/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1949. /package/styles/rating/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1950. /package/styles/signature/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1951. /package/styles/slider/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1952. /package/styles/smart-textarea/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1953. /package/styles/speech-to-text/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1954. /package/styles/textarea/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1955. /package/styles/textbox/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
  1956. /package/styles/uploader/{_theme-variables.scss → _theme-variables.tailwind3.scss} +0 -0
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * filename: ej2-inputs.min.js
3
- * version : 32.1.20
3
+ * version : 32.1.24
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. 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
- this.ej=this.ej||{},this.ej.inputs=function(e,t,i,s,n){"use strict";function a(){if(t.attributes(this.element,{role:"textbox",autocomplete:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive"}),this.mask){for(var e=this.mask.split("]"),i=0;i<e.length;i++)if("\\"===e[i][e[i].length-1]){e[i]=e[i]+"]";for(var s=e[i].split("["),n=0;n<s.length;n++)"\\"===s[n][s[n].length-1]&&(s[n]=s[n]+"["),f.call(this,s[n])}else if((s=e[i].split("[")).length>1)for(var a=!1,n=0;n<s.length;n++)"\\"===s[n]?(this.customRegExpCollec.push("["),this.hiddenMask+=s[n]+"["):""===s[n]?a=!0:""!==s[n]&&a||n===s.length-1?(this.customRegExpCollec.push("["+s[n]+"]"),this.hiddenMask+=this.promptChar,a=!1):f.call(this,s[n]);else f.call(this,s[0]);if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!t.isNullOrUndefined(this.customCharacters))for(i=0;i<this.promptMask.length;i++)t.isNullOrUndefined(this.customCharacters[this.promptMask[i]])||(this.promptMask=this.promptMask.replace(new RegExp(this.promptMask[i],"g"),this.promptChar));var r=0;if(this.hiddenMask.match(new RegExp(/\\/)))for(i=0;i<this.hiddenMask.length;i++){n=0;i>=1&&(n=i),n-=r=this.hiddenMask.length-this.promptMask.length,i>0&&"\\"!==this.hiddenMask[i-1]&&(">"===this.hiddenMask[i]||"<"===this.hiddenMask[i]||"|"===this.hiddenMask[i])&&(this.promptMask=this.promptMask.substring(0,n)+this.promptMask.substring(i+1-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue.substring(i+1-r,this.escapeMaskValue.length)),"\\"===this.hiddenMask[i]&&(this.promptMask=this.promptMask.substring(0,n)+this.hiddenMask[i+1]+this.promptMask.substring(i+2-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue[i+1]+this.escapeMaskValue.substring(i+2-r,this.escapeMaskValue.length))}else this.promptMask=this.promptMask.replace(/[>|<]/g,""),this.escapeMaskValue=this.hiddenMask.replace(/[>|<]/g,"");t.attributes(this.element,{"aria-invalid":"false"})}}function r(){z.call(this,this.promptMask),W.call(this,this.value)}function l(){t.EventHandler.add(this.element,"keydown",O,this),t.EventHandler.add(this.element,"keypress",A,this),t.EventHandler.add(this.element,"keyup",N,this),t.EventHandler.add(this.element,"input",P,this),t.EventHandler.add(this.element,"focus",y,this),t.EventHandler.add(this.element,"blur",E,this),t.EventHandler.add(this.element,"paste",x,this),t.EventHandler.add(this.element,"cut",T,this),t.EventHandler.add(this.element,"drop",S,this),t.EventHandler.add(this.element,"mousedown",v,this),t.EventHandler.add(this.element,"mouseup",g,this),this.enabled&&(h.call(this),this.formElement&&t.EventHandler.add(this.formElement,"reset",u,this))}function o(){t.EventHandler.remove(this.element,"keydown",O),t.EventHandler.remove(this.element,"keypress",A),t.EventHandler.remove(this.element,"keyup",N),t.EventHandler.remove(this.element,"input",P),t.EventHandler.remove(this.element,"focus",y),t.EventHandler.remove(this.element,"blur",E),t.EventHandler.remove(this.element,"paste",x),t.EventHandler.remove(this.element,"cut",T),t.EventHandler.remove(this.element,"drop",S),t.EventHandler.remove(this.element,"mousedown",v),t.EventHandler.remove(this.element,"mouseup",g),this.formElement&&t.EventHandler.remove(this.formElement,"reset",u)}function h(){this.showClearButton&&t.EventHandler.add(this.inputObj.clearButton,"mousedown touchstart",p,this)}function p(e){e.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputObj.container.classList.contains("e-static-clear")||(d.call(this,e),this.value="")}function d(e){var t=this.element.value;z.call(this,this.promptMask),this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),H.call(this,e,t),this.element.setSelectionRange(0,0)}function u(){"EJS-MASKEDTEXTBOX"===this.element.tagName?z.call(this,this.promptMask):this.value=this.initInputValue}function c(e){return e.value}function m(e,i){var s="",n=0,a=!1,r=t.isNullOrUndefined(i)?t.isNullOrUndefined(e)||t.isNullOrUndefined(this)?i:e.value:i;if(r!==this.promptMask)for(var l=0;l<this.customRegExpCollec.length;l++)a&&(a=!1),">"!==this.customRegExpCollec[n]&&"<"!==this.customRegExpCollec[n]&&"|"!==this.customRegExpCollec[n]&&"\\"!==this.customRegExpCollec[n]||(--l,a=!0),a||r[l]!==this.promptChar&&!t.isNullOrUndefined(this.customRegExpCollec[n])&&(this._callPasteHandler||!t.isNullOrUndefined(this.regExpCollec[this.customRegExpCollec[n]])&&!this.maskedRegExp.includes(this.customRegExpCollec[n])||this.customRegExpCollec[n].length>2&&"["===this.customRegExpCollec[n][0]&&"]"===this.customRegExpCollec[n][this.customRegExpCollec[n].length-1]||!t.isNullOrUndefined(this.customCharacters)&&!t.isNullOrUndefined(this.customCharacters[this.customRegExpCollec[n]]))&&""!==r&&(s+=r[l]),++n;return(null===this.mask||""===this.mask&&void 0!==this.value)&&(s=r),s}function f(e){for(var i=0;i<e.length;i++)this.hiddenMask+=e[i],"\\"!==e[i]?this.customRegExpCollec.push(e[i]):"\\"!==e[i]||t.isNullOrUndefined(this.regExpCollec[e[i+1]])||this.maskedRegExp.push(e[i+1])}function v(){this.isClicked=!0}function g(){this.isClicked=!1}function y(e){var i=this,s=this.element,n=0,a=m.call(this,s),r=!1,l=!1,o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||b.call(this,o,s),"Never"!==this.floatLabelType&&this.inputObj&&this.inputObj.container){var h=this.inputObj.container.querySelector(".e-float-text");h&&h.removeAttribute("style")}var p=this.inputObj.container.querySelector(".e-float-text");if(p&&"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){p&&(p.style.width="auto")}.bind(this),5),this.mask&&(null!==a&&""!==a||"Always"===this.floatLabelType||null===this.placeholder||""===this.placeholder||(s.value=this.promptMask),setTimeout(function(){if(s.selectionStart===i.promptMask.length||s.value[s.selectionStart]===i.promptChar)r=!0;else for(var e=s.selectionStart;e<i.promptMask.length;e++){if(s.value[e]===i.promptChar){r=!0;break}if(s.value[e]!==i.promptMask[e]){r=!1;break}}}),setTimeout(function(){var e=s.selectionStart-1;if(e===i.promptMask.length-1||s.value[e]===i.promptChar)l=!0;else for(var t=e;t>=0;t--){if(s.value[t]===i.promptChar){l=!0;break}if(s.value[t]!==i.promptMask[t]){l=!1;break}}}),this.isClicked||"Always"!==this.floatLabelType&&(null===a||""===a)&&null!==this.placeholder&&""!==this.placeholder)){for(n=0;n<this.promptMask.length;n++)if(s.value[n]===this.promptChar){setTimeout(function(){(r||l)&&(s.selectionEnd=n,s.selectionStart=n),o={selectionStart:s.selectionStart,event:e,value:i.value,maskedValue:s.value,container:t.isNullOrUndefined(i.inputObj)?i.inputObj:i.inputObj.container,selectionEnd:s.selectionEnd},b.call(i,o,s)},110);break}t.isNullOrUndefined(s.value.match(C(this.promptChar)))&&(o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd},b.call(this,o,s)),this.isClicked=!1}}function b(e,t){this.trigger("focus",e,function(e){t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd})}function C(e){return t.isNullOrUndefined(e)?e:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function E(e){this.blurEventArgs={event:e,value:this.value,maskedValue:this.element.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.updateFloatLabelOverflowWidth();var i=this.inputObj.container.querySelector(".e-float-text");if("Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&i&&setTimeout(function(){i&&this.prependedElement&&!this.enableRtl?i.style.marginLeft=this.prependedElement.offsetWidth+"px":i&&this.prependedElement&&this.enableRtl&&(i.style.marginRight=this.prependedElement.offsetWidth+"px"),i&&(i.style.width=this.element.offsetWidth+"px")}.bind(this),5),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){z.call(this,"");var s=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!t.isNullOrUndefined(s)&&s.classList.contains(le)&&t.removeClass([s],le)}}function x(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.selectionStart,s=this.element.selectionEnd,n=this.element.value;z.call(this,""),this._callPasteHandler=!0,setTimeout(function(){var a=t.element.value.replace(/ /g,"");t.redoCollec.length>0&&t.redoCollec[0].value===t.element.value&&(a=m.call(t,t.element)),z.call(t,n),t.element.selectionStart=i,t.element.selectionEnd=s;var r=0;t.maskKeyPress=!0;do{U.call(t,a[r],!1,null),++r}while(r<a.length);if(t.maskKeyPress=!1,t._callPasteHandler=!1,t.element.value===n){var l=0;t.maskKeyPress=!0;do{U.call(t,a[l],!1,null),++l}while(l<a.length);t.maskKeyPress=!1}else H.call(t,e,n)},1)}}function T(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.value,s=this.element.selectionStart,n=this.element.selectionEnd;this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd});var a=this.element.value.substring(0,s)+this.promptMask.substring(s,n)+this.element.value.substring(n);setTimeout(function(){z.call(t,a),t.element.selectionStart=t.element.selectionEnd=s,t.element.value!==i&&H.call(t,e,null)},0)}}function S(e){e.preventDefault()}function P(e){if(!0!==t.Browser.isIE||""!==this.element.value||"Never"!==this.floatLabelType){var i={ctrlKey:!1,keyCode:229};if(t.extend(e,i),this.mask){if(""===this.element.value&&this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this._callPasteHandler||t.Browser.isDevice||L.call(this,e),this.element.value.length>this.promptMask.length){var s=this.element.selectionStart,n=this.element.value.length-this.promptMask.length,a=this.element.value.substring(s-n,s);this.maskKeyPress=!1;var r=0;do{U.call(this,a[r],e.ctrlKey,e),++r}while(r<a.length);this.element.value!==this.preEleVal&&H.call(this,e,null)}var l=m.call(this,this.element);this.prevValue=l,this.value=l,""===l&&(z.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function O(e){if(this.mask&&!this.readonly){229!==e.keyCode&&(!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||e.preventDefault(),L.call(this,e));var t=this.element.value;if(e.ctrlKey&&(89===e.keyCode||90===e.keyCode)){var i=void 0;90===e.keyCode&&this.undoCollec.length>0&&t!==this.undoCollec[this.undoCollec.length-1].value?(i=this.undoCollec[this.undoCollec.length-1],this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),z.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.undoCollec.splice(this.undoCollec.length-1,1)):89===e.keyCode&&this.redoCollec.length>0&&t!==this.redoCollec[0].value&&(i=this.redoCollec[0],this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),z.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.redoCollec.splice(0,1))}}}function k(){var e,t=this.element.selectionStart,i=this.element.selectionEnd;this.redoCollec.length>0?(e=this.redoCollec[0],z.call(this,e.value),e.startIndex-t==1?(this.element.selectionStart=e.startIndex,this.element.selectionEnd=e.endIndex):(this.element.selectionStart=t+1,this.element.selectionEnd=i+1)):(z.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=t)}function w(e,t,i){return"input"===i.type&&(e=!1,t=this.element.value,z.call(this,this.promptMask),W.call(this,t)),e}function L(e){var i,s=!1,n=!1;this.element.value.length<this.promptMask.length&&(s=!0,i=this.element.value,s=w.call(this,s,i,e),k.call(this)),this.element.value.length>=this.promptMask.length&&"input"===e.type&&(s=w.call(this,s,i,e));var a=this.element.selectionStart,r=this.element.selectionEnd,l=this.element.selectionStart,o=this.element.selectionEnd,h=this.hiddenMask.replace(/[>|\\<]/g,""),p=h[l-1],d=this.element.selectionEnd;if(s||8===e.keyCode||46===e.keyCode){this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:o});var u=!1,c=this.element.value;if(l>0||(8===e.keyCode||46===e.keyCode)&&l<this.element.value.length&&this.element.selectionEnd-l!==this.element.value.length){var m=l;l!==o?(l=o,46===e.keyCode&&(u=!0)):46===e.keyCode?++m:--m;for(var f=l;8===e.keyCode||s||u?f>m:f<m;8===e.keyCode||s||u?f--:f++)for(var v=l;8===e.keyCode||s||u?v>0:v<this.element.value.length;8===e.keyCode||s||u?v--:v++){var g=void 0;(8===e.keyCode||u)&&(a!==r&&a!==l||a===r)||s?(p=h[v-1],g=l-1):(p=h[v],g=l,++l);var y=this.element.value[g];if(t.isNullOrUndefined(this.regExpCollec[""+p])&&!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[""+p])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,e.preventDefault(),46!==e.keyCode||u||++this.element.selectionStart;else{var b=this.element.value,C=this.promptChar,E=b.substring(0,g)+C+b.substring(l,b.length);z.call(this,E),e.preventDefault(),46!==e.keyCode||u||g++,this.element.selectionStart=this.element.selectionEnd=g,n=!0}if(l=this.element.selectionStart,!n&&8===e.keyCode||u||!n&&46!==e.keyCode?g=l-1:(g=l,n=!1),y=this.element.value[g],a!==r&&this.element.selectionStart===a||this.promptMask[g]===this.promptChar||y!==this.promptMask[g]&&this.promptMask[g]!==this.promptChar&&!t.isNullOrUndefined(this.customCharacters))break}}46===e.keyCode&&u&&n&&(this.element.selectionStart=this.element.selectionEnd=d),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(z.call(this,this.promptMask),e.preventDefault(),this.element.selectionStart=this.element.selectionEnd=l),this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),this.element.value!==c&&H.call(this,e,i)}}function A(e){if(this.mask&&!this.readonly){var t=this.element.value;if(!e.ctrlKey&&!e.metaKey||(e.ctrlKey||e.metaKey)&&"KeyA"!==e.code&&"KeyY"!==e.code&&"KeyZ"!==e.code&&"KeyX"!==e.code&&"KeyC"!==e.code&&"KeyV"!==e.code){this.maskKeyPress=!0;var i=e.key;"Spacebar"===i&&(i=String.fromCharCode(e.keyCode)),i?i&&1===i.length&&(U.call(this,i,e.ctrlKey,e),e.preventDefault()):(this.isIosInvalid=!0,U.call(this,String.fromCharCode(e.keyCode),e.ctrlKey,e),e.preventDefault(),this.isIosInvalid=!1),32===e.keyCode&&" "===i&&" "===this.promptChar&&(this.element.selectionStart=this.element.selectionEnd=this.element.selectionStart-i.length)}this.element.value!==t&&H.call(this,e,t)}}function H(e,i){var s=this.isProtectedOnChange;if(!t.isNullOrUndefined(this.changeEventArgs)&&!this.isInitial){var n={};this.changeEventArgs={value:this.element.value,maskedValue:this.element.value,isInteraction:!1,isInteracted:!1},this.mask&&(this.changeEventArgs.value=m.call(this,this.element)),t.isNullOrUndefined(e)||(this.changeEventArgs.isInteracted=!0,this.changeEventArgs.isInteraction=!0,this.changeEventArgs.event=e),this.isProtectedOnChange=!0,this.value=this.changeEventArgs.value,this.isProtectedOnChange=s,t.merge(n,this.changeEventArgs),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",n)}this.preEleVal=this.element.value,this.prevValue=m.call(this,this.element)}function N(e){if(this.mask&&!this.readonly){var i=void 0;if(this.maskKeyPress||229!==e.keyCode)M.call(this);else{var s=void 0;if(1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this.element.value.length>this.promptMask.length){var n=this.element.selectionStart,a=this.element.value.length-this.promptMask.length,r=this.element.value.substring(n-a,n);if(this.undoCollec.length>0){i=this.undoCollec[this.undoCollec.length-1];var l=this.element.selectionStart;s=i.value;var o=i.value.substring(l-a,l);i=this.redoCollec[0],r=r.trim();var h=t.Browser.isAndroid&&""===r;h||o===r||i.value.substring(l-a,l)===r?h&&F.call(this,e,l-1,this.element.selectionEnd-1,r,e.ctrlKey,!1):U.call(this,r,e.ctrlKey,e)}else s=this.promptMask,U.call(this,r,e.ctrlKey,e);this.maskKeyPress=!1,H.call(this,e,s)}}var p=m.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==p||""===p&&this.value!==p)&&(this.prevValue=p,this.value=p)}else H.call(this,e);if(0===this.element.selectionStart&&0===this.element.selectionEnd){var d=this.element;setTimeout(function(){d.setSelectionRange(0,0)},0)}}function B(e){if(e.length>1&&this.promptMask.length+e.length<this.element.value.length){var t=this.redoCollec[0].value.substring(0,this.redoCollec[0].startIndex)+e+this.redoCollec[0].value.substring(this.redoCollec[0].startIndex,this.redoCollec[0].value.length);z.call(this,t),this.element.selectionStart=this.element.selectionEnd=this.redoCollec[0].startIndex+e.length}this.element.selectionStart=this.element.selectionStart-e.length,this.element.selectionEnd=this.element.selectionEnd-e.length}function R(e){this.maskKeyPress||B.call(this,e)}function U(e,i,s){if(R.call(this,e),!t.isNullOrUndefined(this)&&!t.isNullOrUndefined(e))for(var n,a,r=this.element.selectionStart,l=r,o=!1,h=this.element.value,p=!1,d=!1,u=0;u<e.length;u++){var c=e[u];if(r=this.element.selectionStart,this.maskKeyPress||l!==r||(r+=u),!this.maskKeyPress||r<this.promptMask.length){for(f=r;f<this.promptMask.length;f++)n=this.escapeMaskValue[r],"\\"===this.hiddenMask[r]&&this.hiddenMask[r+1]===e&&(d=!0),(t.isNullOrUndefined(this.regExpCollec[""+n])&&(t.isNullOrUndefined(this.customCharacters)||!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[""+n]))&&this.hiddenMask[r]!==this.promptChar&&"["!==this.customRegExpCollec[r][0]&&"]"!==this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]||this.promptMask[r]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters)||this.promptChar===n&&this.escapeMaskValue===this.mask)&&(this.element.selectionStart=this.element.selectionEnd=r+1,r=this.element.selectionStart,n=this.hiddenMask[r]);if(t.isNullOrUndefined(this.customCharacters)||t.isNullOrUndefined(this.customCharacters[""+n]))!t.isNullOrUndefined(this.regExpCollec[""+n])&&c.match(new RegExp(this.regExpCollec[""+n]))&&this.promptMask[r]===this.promptChar?o=!0:this.promptMask[r]===this.promptChar&&"["===this.customRegExpCollec[r][0]&&"]"===this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]&&c.match(new RegExp(this.customRegExpCollec[r]))&&(o=!0);else for(var m=this.customCharacters[""+n].split(","),f=0;f<m.length;f++)if(c.match(new RegExp("["+m[f]+"]"))){o=!0;break}if((!this.maskKeyPress||r<this.hiddenMask.length)&&o){if(0===u)if(this.maskKeyPress)this.undoCollec.push({value:h,startIndex:r,endIndex:r});else{var v=this.element.selectionStart,g=this.element.selectionEnd;this.redoCollec.length>0?(a=this.redoCollec[0].value,z.call(this,a),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:r,endIndex:r}),a=this.promptMask,z.call(this,a)),this.element.selectionStart=v,this.element.selectionEnd=g}r=this.element.selectionStart,I.call(this,s,r,c,a,d),p=!0,u===e.length-1&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),o=!1}else r=this.element.selectionStart,F.call(this,s,r,l,e,i,p);u!==e.length-1||o||(!t.Browser.isAndroid||t.Browser.isAndroid&&r<this.promptMask.length)&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd})}else 1!==e.length||i||t.isNullOrUndefined(s)||V.call(this)}}function I(e,t,i,s,n){if(this.hiddenMask.length>this.promptMask.length&&(i=D.call(this,i,this.element.value)),!n){var a=this.element.value,r=a.substring(0,t)+i+a.substring(t+1,a.length);z.call(this,r),this.element.selectionStart=this.element.selectionEnd=t+1}}function F(e,i,s,n,a,r){if(!this.maskKeyPress){var l=this.element.value;i>=this.promptMask.length?z.call(this,l.substring(0,i)):(s===i?z.call(this,l.substring(0,i)+l.substring(i+1,l.length)):this.promptMask.length===this.element.value.length?z.call(this,l.substring(0,i)+l.substring(i,l.length)):z.call(this,l.substring(0,s)+l.substring(s+1,l.length)),this.element.selectionStart=this.element.selectionEnd=r||this.element.value[s]!==this.promptChar?i:s),V.call(this)}1!==n.length||a||t.isNullOrUndefined(e)||V.call(this)}function V(){var e=this,i=this.element.parentNode,s=200;i.classList.contains(ne)||i.classList.contains(ae)?t.addClass([i],se):t.addClass([this.element],se),!0===this.isIosInvalid&&(s=400),t.attributes(this.element,{"aria-invalid":"true"}),setTimeout(function(){e.maskKeyPress||M.call(e)},s)}function M(){var e=this.element.parentNode;t.isNullOrUndefined(e)||t.removeClass([e],se),t.removeClass([this.element],se),t.attributes(this.element,{"aria-invalid":"false"})}function D(e,t){var i,s,n=t,a=0;for(s=0;s<this.hiddenMask.length;s++)if("\\"===this.hiddenMask[s]&&(i=n.substring(0,s)+"\\"+n.substring(s,n.length)),">"!==this.hiddenMask[s]&&"<"!==this.hiddenMask[s]&&"|"!==this.hiddenMask[s]||(this.hiddenMask[s]!==n[s]&&(i=n.substring(0,s)+this.hiddenMask[s]+n.substring(s,n.length)),++a),i){if(i[s]===this.promptChar&&s>this.element.selectionStart||this.element.value.indexOf(this.promptChar)<0&&this.element.selectionStart+a===s){a=0;break}n=i}for(;s>=0&&i;){if(0===s||"\\"!==i[s-1]){if(">"===i[s]){e=e.toUpperCase();break}if("<"===i[s]){e=e.toLowerCase();break}if("|"===i[s])break}--s}return e}function W(e){if(this.mask&&void 0!==e&&(void 0===this.prevValue||this.prevValue!==e)){if(this.maskKeyPress=!0,z.call(this,this.promptMask),""===e||null===e&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==e)for(var i=0;i<e.length;i++)U.call(this,e[i],!1,null);var s=m.call(this,this.element);this.prevValue=s,this.value=s,H.call(this,null,null),this.maskKeyPress=!1;var n=this.element.parentNode.querySelector(".e-float-text");this.element.value===this.promptMask&&"Auto"===this.floatLabelType&&this.placeholder&&!t.isNullOrUndefined(n)&&n.classList.contains(le)&&!this.isFocus&&(t.removeClass([n],le),t.addClass([n],oe),z.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&z.call(this,this.value)}function z(i,s){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&t.isNullOrUndefined(this.value)&&(i="");var n=m.call(this,s||this.element,i);null===n||""===n?(e.Input.setValue(i,s||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):e.Input.setValue(i,s||this.element,this.floatLabelType,this.showClearButton)}function q(e){var t=j(e);r.call(t);var i=m.call(this,this.element);this.prevValue=i,this.value=i,e.mask&&(o.call(t),l.call(t))}function j(e){t.addClass([e.element],re);var i={element:e.element,mask:e.mask,promptMask:"",hiddenMask:"",escapeMaskValue:"",promptChar:e.promptChar?e.promptChar.length>1?e.promptChar=e.promptChar[0]:e.promptChar:"_",value:e.value?e.value:null,regExpCollec:he,customRegExpCollec:[],customCharacters:e.customCharacters,undoCollec:[],redoCollec:[],maskKeyPress:!1,prevValue:""};return a.call(i),i}function _(e){return m.call(K(e),e.element)}function X(e){return c.call(K(e),e.element)}function K(e){var i;return!t.isNullOrUndefined(e)&&e.element.classList.contains(re)&&(i=j(e)),i}var Y={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",TEXTAREA:"e-multi-line-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",FLOATTEXTCONTENT:"e-float-text-content",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"},Z=["title","style","class"];!function(e){function i(e,i){e.element.__eventHandlers={};var s=t.isNullOrUndefined(i)?t.createElement:i,n={container:null,buttons:[],clearButton:null};if(ue=e.floatLabelType,ce=e.bindClearAction,t.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(n.container=H(e,Y.INPUTGROUP,Y.INPUTCUSTOMTAG,"span",s),e.element.parentNode.insertBefore(n.container,e.element),t.addClass([e.element],Y.INPUT),n.container.appendChild(e.element)):f(e,n,s),r(e),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(z(e.properties.showClearButton,e.element,n,!0,s),n.clearButton.setAttribute("role","button"),n.container.classList.contains(Y.FLOATINPUT)&&t.addClass([n.container],Y.INPUTGROUP)),!t.isNullOrUndefined(e.buttons))for(var a=0;a<e.buttons.length;a++)n.buttons.push(ae(e.buttons[a],n.container,s));return t.isNullOrUndefined(e.element)||"TEXTAREA"!==e.element.tagName||t.addClass([n.container],Y.TEXTAREA),re(n.container,e.element),n=y(e,n),K(n.container,s),n}function s(t){var i=E(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.add("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout(function(){e.calculateWidth(t.element,i)},80)}function n(t){var i=E(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.remove("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout(function(){e.calculateWidth(t.element,i)},80)}function a(e){o(e.floatLabelType,e.element)}function r(e){o(e.floatLabelType,e.element);var t=function(){return s(e)},i=function(){return n(e)},r=function(){return a(e)};e.element.addEventListener("focus",t),e.element.addEventListener("blur",i),e.element.addEventListener("input",r),e.element.__eventHandlers.inputFocusHandler={focusHandler:t},e.element.__eventHandlers.inputBlurHandler={blurHandler:i},e.element.__eventHandlers.inputHandler={inputHandler:r}}function l(e){if(!t.isNullOrUndefined(e.element)&&!(t.isNullOrUndefined(e.element.__eventHandlers)||t.isNullOrUndefined(e.element.__eventHandlers.inputFocusHandler)||t.isNullOrUndefined(e.element.__eventHandlers.inputBlurHandler)||t.isNullOrUndefined(e.element.__eventHandlers.inputHandler))){var i=e.element.__eventHandlers.inputFocusHandler.focusHandler,s=e.element.__eventHandlers.inputBlurHandler.blurHandler,n=e.element.__eventHandlers.inputHandler.inputHandler;e.element.removeEventListener("focus",i),e.element.removeEventListener("blur",s),e.element.removeEventListener("input",n),delete e.element.__eventHandlers.inputFocusHandler,delete e.element.__eventHandlers.inputBlurHandler,delete e.element.__eventHandlers.inputHandler}}function o(e,i){var s=i.value,n=i.parentElement,a=n&&n.parentElement;""===s||t.isNullOrUndefined(s)?"Always"!==e&&(n&&n.classList.contains("e-input-group")?n.classList.remove("e-valid-input"):a&&a.classList.contains("e-input-group")&&a.classList.remove("e-valid-input")):n&&n.classList.contains("e-input-group")?n.classList.add("e-valid-input"):a&&a.classList.contains("e-input-group")&&a.classList.add("e-valid-input")}function h(){var e=E(this).getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(e)||(t.addClass([e],Y.LABELTOP),e.classList.contains(Y.LABELBOTTOM)&&t.removeClass([e],Y.LABELBOTTOM))}function p(){var e=E(this);if(e.getElementsByTagName("textarea")[0]?""===e.getElementsByTagName("textarea")[0].value:""===e.getElementsByTagName("input")[0].value){var i=e.getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(i)||(i.classList.contains(Y.LABELTOP)&&t.removeClass([i],Y.LABELTOP),t.addClass([i],Y.LABELBOTTOM))}}function d(e){e.addEventListener("focus",h),e.addEventListener("blur",p)}function u(e){t.isNullOrUndefined(e)||(e.removeEventListener("focus",h),e.removeEventListener("blur",p))}function c(e){A(e.element,e.floatLabelType)}function m(e){A(e.element,e.floatLabelType)}function f(e,i,s){var n=t.isNullOrUndefined(s)?t.createElement:s;"Auto"===e.floatLabelType&&d(e.element),t.isNullOrUndefined(i.container)?(i.container=H(e,Y.FLOATINPUT,Y.FLOATCUSTOMTAG,"div",n),i.container.classList.add(Y.INPUTGROUP),e.element.parentNode&&e.element.parentNode.insertBefore(i.container,e.element)):(t.isNullOrUndefined(e.customTag)||i.container.classList.add(Y.FLOATCUSTOMTAG),i.container.classList.add(Y.FLOATINPUT));var a=n("span",{className:Y.FLOATLINE}),r=n("label",{className:Y.FLOATTEXT});if(t.isNullOrUndefined(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),t.attributes(e.element,{"aria-labelledby":r.id})),t.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(r.innerText=N(e.element.placeholder),e.element.removeAttribute("placeholder")),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(r.innerText=N(e.properties.placeholder)),r.innerText||i.container.classList.add(Y.NOFLOATLABEL),i.container.classList.contains("e-float-icon-left")){var l=i.container.querySelector(".e-input-in-wrap");l.appendChild(e.element),l.appendChild(a),l.appendChild(r)}else i.container.appendChild(e.element),i.container.appendChild(a),i.container.appendChild(r);if(C(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(Y.LABELBOTTOM)&&t.removeClass([r],Y.LABELBOTTOM),t.addClass([r],Y.LABELTOP)),"Auto"===e.floatLabelType){var o=function(){return c(e)},h=function(){return m(e)};e.element.addEventListener("input",o),e.element.addEventListener("blur",h),e.element.__eventHandlers.floatInputHandler={inputFloatHandler:o},e.element.__eventHandlers.floatBlurHandler={blurFloatHandler:h}}else v(e);t.isNullOrUndefined(e.element.getAttribute("id"))||r.setAttribute("for",e.element.getAttribute("id"))}function v(e){if(!(t.isNullOrUndefined(e.element)||t.isNullOrUndefined(e.element.__eventHandlers)||t.isNullOrUndefined(e.element.__eventHandlers.floatInputHandler)||t.isNullOrUndefined(e.element.__eventHandlers.floatBlurHandler))){var i=e.element.__eventHandlers.floatInputHandler.inputFloatHandler,s=e.element.__eventHandlers.floatBlurHandler.blurFloatHandler;e.element.removeEventListener("input",i),e.element.removeEventListener("blur",s),delete e.element.__eventHandlers.floatInputHandler,delete e.element.__eventHandlers.floatBlurHandler}}function g(e,t){"Always"===e&&t.classList.contains("e-outline")&&t.classList.add("e-valid-input")}function y(e,i){if(!t.isNullOrUndefined(e.properties))for(var s=0,n=Object.keys(e.properties);s<n.length;s++)switch(n[s]){case"cssClass":U(e.properties.cssClass,[i.container]),g(e.floatLabelType,i.container);break;case"enabled":W(e.properties.enabled,e.element,e.floatLabelType,i.container);break;case"enableRtl":D(e.properties.enableRtl,[i.container]);break;case"placeholder":V(e.properties.placeholder,e.element);break;case"readonly":M(e.properties.readonly,e.element)}return i}function b(e,i,s){t.isNullOrUndefined(i)||(e&&!s?t.removeClass([i],Y.CLEARICONHIDE):t.addClass([i],Y.CLEARICONHIDE))}function C(e,i,s){void 0===s&&(s=null),e?(t.addClass([i],Y.LABELTOP),i.classList.contains(Y.LABELBOTTOM)&&t.removeClass([i],Y.LABELBOTTOM)):(null==s||s!==document.activeElement)&&(i.classList.contains(Y.LABELTOP)&&t.removeClass([i],Y.LABELTOP),t.addClass([i],Y.LABELBOTTOM))}function E(e){var i=t.isNullOrUndefined(e.parentNode)?e:e.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function x(e,i,s,n){var a=(t.isNullOrUndefined(n)?t.createElement:n)("span",{className:Y.CLEARICON}),r=i.container;return t.isNullOrUndefined(s)?(i.container.classList.contains(Y.FLOATINPUT)?i.container.querySelector("."+Y.FLOATTEXT):e).insertAdjacentElement("afterend",a):r.appendChild(a),t.addClass([a],Y.CLEARICONHIDE),k(e,a),a.setAttribute("aria-label","close"),a}function T(e,i,s){i.classList.contains(Y.DISABLE)||i.readOnly||(e.preventDefault(),i!==document.activeElement&&i.focus(),i.value="",t.addClass([s],Y.CLEARICONHIDE))}function S(e,t){b(e.value,t)}function P(e,t){b(e.value,t,e.readOnly)}function O(e,i){setTimeout(function(){t.isNullOrUndefined(i)||(t.addClass([i],Y.CLEARICONHIDE),i=!t.isNullOrUndefined(e)&&e.classList.contains("e-combobox")?null:i)},200)}function k(e,t,i){if(void 0===ce||ce){var s=function(i){return T(i,e,t)};t.addEventListener("click",s),e.__eventHandlers.clearClickHandler={clickHandlerEvent:s}}var n=function(){return S(e,t)},a=function(){return P(e,t)},r=function(){return O(e,t)};e.addEventListener("input",n),e.addEventListener("focus",a),e.addEventListener("blur",r),e.__eventHandlers.clearInputHandler={inputHandlerEvent:n},e.__eventHandlers.clearFocusHandler={focusHandlerEvent:a},e.__eventHandlers.clearBlurHandler={blurHandlerEvent:r}}function w(e,i){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(e.__eventHandlers)){if(!t.isNullOrUndefined(e.__eventHandlers.clearClickHandler)){var s=e.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===ce||ce)&&(t.isNullOrUndefined(i)||i.removeEventListener("click",s)),delete e.__eventHandlers.clearClickHandler}if(!t.isNullOrUndefined(e.__eventHandlers.clearInputHandler)&&!t.isNullOrUndefined(e.__eventHandlers.clearFocusHandler)&&!t.isNullOrUndefined(e.__eventHandlers.clearBlurHandler)){var n=e.__eventHandlers.clearInputHandler.inputHandlerEvent,a=e.__eventHandlers.clearFocusHandler.focusHandlerEvent,r=e.__eventHandlers.clearBlurHandler.blurHandlerEvent;e.removeEventListener("input",n),e.removeEventListener("focus",a),e.removeEventListener("blur",r),delete e.__eventHandlers.clearInputHandler,delete e.__eventHandlers.clearFocusHandler,delete e.__eventHandlers.clearBlurHandler}}}function L(e,i){void 0===i&&(i=null),l(e),"Auto"===e.floatLabelType&&v(e),e.properties.showClearButton&&w(e.element,i),t.isNullOrUndefined(e.buttons)||J(!1,null,e.buttons),u(e.element),t.isNullOrUndefined(e.element)||(delete e.element.__eventHandlers,e.element.classList.contains(Y.INPUT)&&e.element.classList.remove(Y.INPUT))}function A(e,t){if(E(e).classList.contains(Y.FLOATINPUT)&&"Auto"===t){var i=E(e).getElementsByClassName("e-float-text")[0];C(e.value,i,e)}}function H(e,i,s,n,a){var r,l=t.isNullOrUndefined(a)?t.createElement:a;return t.isNullOrUndefined(e.customTag)?r=l(n,{className:i}):(r=l(e.customTag,{className:i})).classList.add(s),r.classList.add("e-control-wrapper"),r}function N(e){return null==e||""===e?"":B(e)}function B(e){var t={"&amp;":"&","&quot;":'"',"&#39;":"'","&lt;":"<","&gt;":">","&eacute;":"é"};return e.replace(/&[a-zA-Z#0-9]+;/g,function(e){return t[e]||e})}function R(e,i,s,n){if(i.value=e,"Never"!==s&&I(i,i.parentElement),t.isNullOrUndefined(s)||"Auto"!==s||A(i,s),!t.isNullOrUndefined(n)&&n){var a=E(i);if(!t.isNullOrUndefined(a)){var r=a.getElementsByClassName(Y.CLEARICON)[0];t.isNullOrUndefined(r)||(i.value&&!t.isNullOrUndefined(a)&&a.classList.contains("e-input-focus")?t.removeClass([r],Y.CLEARICONHIDE):t.addClass([r],Y.CLEARICONHIDE))}}o(s,i)}function U(e,i,s){t.isNullOrUndefined(s)||""===s||t.removeClass(i,s.split(" ")),t.isNullOrUndefined(e)||""===e||t.addClass(i,e.split(" "))}function I(e,i,s){if("multiselect"===s||Q(e)){var n="multiselect"===s?e:e.clientWidth-parseInt(getComputedStyle(e,null).getPropertyValue("padding-left"),10);t.isNullOrUndefined(i)||t.isNullOrUndefined(i.getElementsByClassName("e-float-text-content")[0])||(i.getElementsByClassName("e-float-text-content")[0].classList.contains("e-float-text-overflow")&&i.getElementsByClassName("e-float-text-content")[0].classList.remove("e-float-text-overflow"),(n<i.getElementsByClassName("e-float-text-content")[0].clientWidth||n===i.getElementsByClassName("e-float-text-content")[0].clientWidth)&&i.getElementsByClassName("e-float-text-content")[0].classList.add("e-float-text-overflow"))}}function F(e,i){"number"==typeof e?i.style.width=t.formatUnit(e):"string"==typeof e&&(i.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)),I(i.firstChild,i)}function V(e,i){e=N(e);var s=E(i);if(s.classList.contains(Y.FLOATINPUT))if(t.isNullOrUndefined(e)||""===e){s.classList.add(Y.NOFLOATLABEL);var n=s.getElementsByClassName("e-float-text-content")[0];if(n&&n.children[0])n.children[0].textContent="";else{a=s.getElementsByClassName(Y.FLOATTEXT)[0];t.isNullOrUndefined(a)||(a.textContent="")}}else{if((n=s.getElementsByClassName("e-float-text-content")[0])&&n.children[0])n.children[0].textContent=e;else{var a=s.getElementsByClassName(Y.FLOATTEXT)[0];t.isNullOrUndefined(a)||(a.textContent=e)}s.classList.remove(Y.NOFLOATLABEL),i.removeAttribute("placeholder")}else t.isNullOrUndefined(e)||""===e?i.removeAttribute("placeholder"):t.attributes(i,{placeholder:e})}function M(e,i,s){e?t.attributes(i,{readonly:""}):i.removeAttribute("readonly"),t.isNullOrUndefined(s)||A(i,s)}function D(e,i){e?t.addClass(i,Y.RTL):t.removeClass(i,Y.RTL)}function W(e,i,s,n){var a={disabled:"","aria-disabled":"true"},r=!t.isNullOrUndefined(n);e?(i.classList.remove(Y.DISABLE),q(a,i),r&&t.removeClass([n],Y.DISABLE)):(i.classList.add(Y.DISABLE),j(a,i),r&&t.addClass([n],Y.DISABLE)),t.isNullOrUndefined(s)||A(i,s)}function z(e,i,s,n,a){var r=t.isNullOrUndefined(a)?t.createElement:a;e?s.clearButton=x(i,s,n,r):(t.remove(s.clearButton),s.clearButton=null)}function q(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=E(t);"disabled"===n&&t.classList.remove(Y.DISABLE),"disabled"===n&&a.classList.contains(Y.INPUTGROUP)&&a.classList.remove(Y.DISABLE),"placeholder"===n&&a.classList.contains(Y.FLOATINPUT)?a.getElementsByClassName(Y.FLOATTEXT)[0].textContent="":t.removeAttribute(n)}}function j(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=E(t);"disabled"===n&&t.classList.add(Y.DISABLE),"disabled"===n&&a.classList.contains(Y.INPUTGROUP)&&a.classList.add(Y.DISABLE),"placeholder"===n&&a.classList.contains(Y.FLOATINPUT)?a.getElementsByClassName(Y.FLOATTEXT)[0].textContent=e[""+n]:t.setAttribute(n,e[""+n])}}function _(e){var i=e.container;if(!t.isNullOrUndefined(i)&&i.classList.contains(Y.FLOATINPUT)){var s=i.querySelector("textarea")?i.querySelector("textarea"):i.querySelector("input"),n=i.querySelector("."+Y.FLOATTEXT).textContent,a=null!==i.querySelector(".e-clear-icon");t.detach(i.querySelector("."+Y.FLOATLINE)),t.detach(i.querySelector("."+Y.FLOATTEXT)),t.classList(i,[Y.INPUTGROUP],[Y.FLOATINPUT]),u(s),t.attributes(s,{placeholder:n}),s.classList.add(Y.INPUT),a||"INPUT"!==s.tagName||s.removeAttribute("required")}}function X(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=t.closest(e,"."+Y.INPUTGROUP);ue=i;var l=r.tagName,o={element:e,floatLabelType:i,customTag:l="DIV"!==l&&"SPAN"!==l?l:null,properties:{placeholder:s}};if("Never"!==i){var h=r.querySelector(".e-clear-icon"),p={container:r};e.classList.remove(Y.INPUT),f(o,p,a),K(p.container,a),I(o.element,p.container);var d=r.classList.contains("e-float-icon-left");if(t.isNullOrUndefined(h)&&(h=d?r.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon"):r.querySelector(".e-input-group-icon")),t.isNullOrUndefined(h))d&&(h=r.querySelector(".e-input-group-icon"));else{var u=r.querySelector("."+Y.FLOATLINE),c=r.querySelector("."+Y.FLOATTEXT),m=d?r.querySelector(".e-input-in-wrap"):r;m.insertBefore(e,h),m.insertBefore(u,h),m.insertBefore(c,h)}}else v(o);g(i,e.parentElement)}function K(e,t){if(e.classList.contains("e-outline")&&e.getElementsByClassName("e-float-text")[0]){var i=t("span",{className:Y.FLOATTEXTCONTENT});i.innerHTML=e.getElementsByClassName("e-float-text")[0].innerHTML,e.getElementsByClassName("e-float-text")[0].innerHTML="",e.getElementsByClassName("e-float-text")[0].appendChild(i)}}function G(e,t){for(var i=0;i<t.length;i++)J(e,t[parseInt(i.toString(),10)].container)}function J(e,i,s){var n=[];n.push(s);var a=t.isNullOrUndefined(s)?i.querySelectorAll(".e-input-group-icon"):n;if(e&&a.length>0)for(r=0;r<a.length;r++)a[parseInt(r.toString(),10)].addEventListener("mousedown",ee,!1),a[parseInt(r.toString(),10)].addEventListener("mouseup",te,!1);else if(a.length>0)for(var r=0;r<a.length;r++)a[parseInt(r.toString(),10)].removeEventListener("mousedown",ee,this),a[parseInt(r.toString(),10)].removeEventListener("mouseup",te,this)}function $(e,t){e.classList.contains("e-disabled")||e.querySelector("input").readOnly||t.classList.add("e-input-btn-ripple")}function Q(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if("none"===window.getComputedStyle(t).display)return!1;t=t.parentElement}return!0}function ee(){for(var e=this,t=this.parentElement;!t.classList.contains("e-input-group");)t=t.parentElement;$(t,e)}function te(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}function ie(e,t){var i=t("span",{className:e});return i.classList.add("e-input-group-icon"),i}function se(e,t,i,s,n){var a="string"==typeof t?t.split(","):t;if("append"===e.toLowerCase())for(var r=0,l=a;r<l.length;r++)ae(p=l[r],i,n);else for(var o=0,h=a;o<h.length;o++){var p=h[o];ne(p,i,s,n)}i.getElementsByClassName("e-input-group-icon")[0]&&i.getElementsByClassName("e-float-text-overflow")[0]&&i.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon")}function ne(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=ie(e,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if(t.isNullOrUndefined(l)){l=a("span",{className:"e-input-in-wrap"}),s.parentNode.insertBefore(l,s);var o=i.querySelectorAll(s.tagName+" ~ *");l.appendChild(s);for(var h=0;h<o.length;h++){var p=o[parseInt(h.toString(),10)],d=l.parentElement;p.classList.contains("e-float-line")&&(d&&d.classList.contains("e-filled")||!d)||l.appendChild(p)}}return l.parentNode.insertBefore(r,l),J(!0,i,r),r}function ae(e,i,s){var n=ie(e,t.isNullOrUndefined(s)?t.createElement:s);return(i.classList.contains("e-float-icon-left")?i.querySelector(".e-input-in-wrap"):i).appendChild(n),J(!0,i,n),n}function re(e,t){"hidden"===t.type?e.classList.add("e-hidden"):e.classList.contains("e-hidden")&&e.classList.remove("e-hidden")}function le(e,i){if(!t.isNullOrUndefined(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];Z.indexOf(a)<0&&i.setAttribute(a,e[""+a])}}function oe(e,t,i){U(he(e),[i],he(t))}function he(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i}function pe(e,i){if(!t.isNullOrUndefined(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];if(Z.indexOf(a)>-1)if("class"===a){var r=this.getInputValidClassList(e[""+a]);""!==r&&t.addClass([i],r.split(" "))}else if("style"===a){var l=i.getAttribute(a);l=t.isNullOrUndefined(l)?e[""+a]:l+e[""+a],i.setAttribute(a,l)}else i.setAttribute(a,e[""+a])}}function de(e){return!e||/^\s*$/.test(e)}var ue,ce=!0;e.createInput=i,e.bindInitialEvent=r,e.wireFloatingEvents=d,e.wireClearBtnEvents=k,e.destroy=L,e.setValue=R,e.setCssClass=U,e.calculateWidth=I,e.setWidth=F,e.setPlaceholder=V,e.setReadonly=M,e.setEnableRtl=D,e.setEnabled=W,e.setClearButton=z,e.removeAttributes=q,e.addAttributes=j,e.removeFloating=_,e.addFloating=X,e.createSpanElement=K,e.setRipple=G,e.addIcon=se,e.prependSpan=ne,e.appendSpan=ae,e.validateInputType=re,e.updateHTMLAttributesToElement=le,e.updateCssClass=oe,e.getInputValidClassList=he,e.updateHTMLAttributesToWrapper=pe,e.isBlank=de}(e.Input||(e.Input={}));var G=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)}}(),J=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},$="e-input-group-icon",Q=new RegExp("^(-)?(\\d*)$"),ee=["title","style","class"],te=0,ie=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.preventChange=!1,s.isDynamicChange=!1,s.numericOptions=e,s}return G(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var e=t.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=t.closest(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var i=this.createElement("input"),s=0;for(s;s<this.element.attributes.length;s++){var n=this.element.attributes[s].nodeName;"id"!==n&&"class"!==n?(i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML):"class"===n&&i.setAttribute(n,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "))}this.element.hasAttribute("name")&&this.element.removeAttribute("name"),this.element.classList.remove("e-control","e-numerictextbox"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}t.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var a={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new t.L10n("numerictextbox",a,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",t.getUniqueID("numerictextbox")),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.prevValue=this.value,this.updateHTMLAttrToElement(),this.checkAttributes(!1),this.formEle&&(this.inputEleValue=this.value),this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},s.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),this.setElementWidth(this.width),this.container.classList.contains("e-input-group")||this.container.classList.add("e-input-group"),this.changeValue(null===this.value||isNaN(this.value)?null:this.strictMode?this.trimValue(this.value):this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0),(this.element.getAttribute("value")||this.value)&&(this.element.setAttribute("value",this.element.value),this.hiddenInput.setAttribute("value",this.hiddenInput.value)),this.elementPrevValue=this.element.value,this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.hasAttribute("aria-label")||this.element.setAttribute("aria-label","numerictextbox"),!t.isNullOrUndefined(t.closest(this.element,"fieldset"))&&t.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.updateFloatLabelOverflowWidth(),this.createPrependTemplate(),this.createAppendTemplate(),this.renderComplete())},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["value","min","max","step","disabled","readonly","style","name","placeholder"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.value||e){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties(t.setValue(n,l,{}),!e)}break;case"min":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.min||e){var o=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===o||isNaN(o)||this.setProperties(t.setValue(n,o,{}),!e)}break;case"max":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.max||e){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties(t.setValue(n,h,{}),!e)}break;case"step":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.step||e){var p=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===p||isNaN(p)||this.setProperties(t.setValue(n,p,{}),!e)}break;case"style":this.inputStyle=this.element.getAttribute(n);break;case"name":this.inputName=this.element.getAttribute(n);break;default:var d=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));(null!==d&&!isNaN(d)||"value"===n)&&this.setProperties(t.setValue(n,d,{}),!0)}}},s.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},s.prototype.initCultureFunc=function(){this.instance=new t.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==t.getValue("currency",this)&&(t.setValue("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},s.prototype.createWrapper=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getNumericValidClassList(this.cssClass));var s=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:i,enableRtl:this.enableRtl,showClearButton:this.showClearButton,enabled:this.enabled}},this.createElement);this.inputWrapper=s,this.container=s.container,this.container.setAttribute("class","e-control-wrapper e-numeric "+this.container.getAttribute("class")),this.updateHTMLAttrToWrapper(),this.readonly&&t.attributes(this.element,{"aria-readonly":"true"}),this.hiddenInput=this.createElement("input",{attrs:{type:"text","data-validateHidden":"true","aria-label":"hidden",class:"e-numeric-hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),this.isAngular&&"EJS-NUMERICTEXTBOX"===this.angularTagName&&this.cloneElement.id.length>0?t.attributes(this.hiddenInput,{name:this.cloneElement.id}):t.attributes(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.container.childNodes[1]),this.updateDataAttribute(!1),null!==this.inputStyle&&t.attributes(this.container,{style:this.inputStyle})},s.prototype.updateDataAttribute=function(e){var t={};if(e)t=this.htmlAttributes;else for(var i=0;i<this.element.attributes.length;i++)t[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name);for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];0===a.indexOf("data")&&this.hiddenInput.setAttribute(a,t[""+a])}},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];ee.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateCssClass=function(t,i){e.Input.setCssClass(this.getNumericValidClassList(t),[this.container],this.getNumericValidClassList(i))},s.prototype.getNumericValidClassList=function(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(ee.indexOf(s)>-1)if("class"===s){var n=this.getNumericValidClassList(this.htmlAttributes[""+s]);""!==n&&t.addClass([this.container],n.split(" "))}else if("style"===s){var a=this.container.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[""+s]:a+this.htmlAttributes[""+s],this.container.setAttribute(s,a)}else this.container.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.setElementWidth=function(e){t.isNullOrUndefined(e)||("number"==typeof e?this.container.style.width=t.formatUnit(e):"string"==typeof e&&(this.container.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.spinBtnCreation=function(){this.spinDown=e.Input.appendSpan($+" e-spin-down",this.container,this.createElement),t.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle")}),this.spinUp=e.Input.appendSpan($+" e-spin-up",this.container,this.createElement),t.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},s.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),this.min!==-Number.MAX_VALUE&&t.attributes(this.element,{"aria-valuemin":this.min.toString()}),this.max!==Number.MAX_VALUE&&t.attributes(this.element,{"aria-valuemax":this.max.toString()})},s.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},s.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},s.prototype.action=function(e,t){this.isInteract=!0;var i=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(i,this.step,e)),this.raiseChangeEvent(t)},s.prototype.checkErrorClass=function(){this.isValidState?t.removeClass([this.container],"e-error"):t.addClass([this.container],"e-error"),t.attributes(this.element,{"aria-invalid":this.isValidState?"false":"true"})},s.prototype.bindClearEvent=function(){this.showClearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},s.prototype.resetHandler=function(e){e.preventDefault(),this.inputWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputWrapper.container.classList.contains("e-static-clear")||this.clear(e),this.isInteract=!0,this.raiseChangeEvent(e)},s.prototype.clear=function(e){if(this.setProperties({value:null},!0),this.setElementValue(""),this.hiddenInput.value="",t.closest(this.element,"form")){var i=this.element.nextElementSibling,s=document.createEvent("KeyboardEvent");s.initEvent("keyup",!1,!0),i.dispatchEvent(s)}},s.prototype.resetFormHandler=function(){"EJS-NUMERICTEXTBOX"===this.element.tagName?this.updateValue(null):this.updateValue(this.inputEleValue)},s.prototype.setSpinButton=function(){t.isNullOrUndefined(this.spinDown)||t.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),t.isNullOrUndefined(this.spinUp)||t.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"blur",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"input",this.inputHandler,this),t.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(this.element,"paste",this.pasteHandler,this),this.enabled&&(this.bindClearEvent(),this.formEle&&t.EventHandler.add(this.formEle,"reset",this.resetFormHandler,this))},s.prototype.wireSpinBtnEvents=function(){t.EventHandler.add(this.spinUp,t.Browser.touchStartEvent,this.mouseDownOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchStartEvent,this.mouseDownOnSpinner,this),t.EventHandler.add(this.spinUp,t.Browser.touchEndEvent,this.mouseUpOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchEndEvent,this.mouseUpOnSpinner,this),t.EventHandler.add(this.spinUp,t.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},s.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"blur",this.focusOutHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"input",this.inputHandler),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keypress",this.keyPressHandler),t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(this.element,"paste",this.pasteHandler),this.formEle&&t.EventHandler.remove(this.formEle,"reset",this.resetFormHandler)},s.prototype.unwireSpinBtnEvents=function(){t.EventHandler.remove(this.spinUp,t.Browser.touchStartEvent,this.mouseDownOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchStartEvent,this.mouseDownOnSpinner),t.EventHandler.remove(this.spinUp,t.Browser.touchEndEvent,this.mouseUpOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchEndEvent,this.mouseUpOnSpinner),t.EventHandler.remove(this.spinUp,t.Browser.touchMoveEvent,this.touchMoveOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchMoveEvent,this.touchMoveOnSpinner)},s.prototype.updatePrependTemplate=function(){this.removePrependTemplate(),this.createPrependTemplate()},s.prototype.updateAppendTemplate=function(){this.removeAppendTemplate(),this.createAppendTemplate()},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.createPrependTemplate=function(){if(!t.isNullOrUndefined(this.prependTemplate)){var e=this.container;this.prependedElement=this.createElement("div",{className:"e-prepend-template"}),this.iconTemplateFunction=this.templateComplier(this.prependTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.prependedElement);if(i){var s=[].slice.call(i);t.append(s,this.prependedElement)}var n=e.querySelector("input");e.classList.add("e-prepend-wrapper"),n?e.insertBefore(this.prependedElement,n):e.insertBefore(this.prependedElement,e.firstChild),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.createAppendTemplate=function(){if(!t.isNullOrUndefined(this.appendTemplate)){var e=this.container;this.appendedElement=this.createElement("div",{className:"e-append-template"}),this.iconTemplateFunction=this.templateComplier(this.appendTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.appendedElement);if(i){var s=[].slice.call(i);t.append(s,this.appendedElement)}e.classList.add("e-append-wrapper");var n=e.querySelector(".e-spin-down");this.showSpinButton&&n?e.insertBefore(this.appendedElement,n):e.appendChild(this.appendedElement),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.handleFloatLabel=function(){var e=this.container.querySelector(".e-float-text");e&&"Auto"===this.floatLabelType&&setTimeout(function(){e&&this.prependedElement&&!this.enableRtl?(e.style.marginLeft=this.prependedElement.offsetWidth+"px",e.style.marginRight="0"):e&&this.prependedElement&&this.enableRtl&&(e.style.marginRight=this.prependedElement.offsetWidth+"px",e.style.marginLeft="0"),e&&e.classList.contains("e-label-bottom")&&(e.style.width=this.element.offsetWidth+"px")}.bind(this),5)},s.prototype.removePrependTemplate=function(){t.isNullOrUndefined(this.prependedElement)||(t.detach(this.prependedElement),this.prependedElement=null)},s.prototype.removeAppendTemplate=function(){t.isNullOrUndefined(this.appendedElement)||(t.detach(this.appendedElement),this.appendedElement=null)},s.prototype.changeHandler=function(e){e.stopPropagation(),this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},s.prototype.raiseChangeEvent=function(e){if(this.inputValue=t.isNullOrUndefined(this.inputValue)||isNaN(this.inputValue)?null:this.inputValue,this.prevValue!==this.value||this.prevValue!==this.inputValue){var i={};this.changeEventArgs={value:this.value,previousValue:this.prevValue,isInteracted:this.isInteract,isInteraction:this.isInteract,event:e},e&&(this.changeEventArgs.event=e),void 0===this.changeEventArgs.event&&(this.changeEventArgs.isInteracted=!1,this.changeEventArgs.isInteraction=!1),t.merge(i,this.changeEventArgs),this.prevValue=this.value,this.isInteract=!1,this.elementPrevValue=this.element.value,this.preventChange=!1,this.trigger("change",i)}},s.prototype.pasteHandler=function(){var e=this;if(this.enabled&&!this.readonly){var t=this.element.value;setTimeout(function(){e.numericRegex().test(e.element.value)||e.setElementValue(t)})}},s.prototype.preventHandler=function(){var e=this,i=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);setTimeout(function(){if(e.element.selectionStart>0){var s=e.element.selectionStart,n=e.element.selectionStart-1,a=e.element.value.split(""),r=t.getNumericObject(e.locale),l=t.getValue("decimal",r),o=l.charCodeAt(0);" "===e.element.value[n]&&e.element.selectionStart>0&&!i?(t.isNullOrUndefined(e.prevVal)?e.element.value=e.element.value.trim():0!==n?e.element.value=e.prevVal:0===n&&(e.element.value=e.element.value.trim()),e.element.setSelectionRange(n,n)):isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&45!==e.element.value[e.element.selectionStart-1].charCodeAt(0)?(a.indexOf(e.element.value[e.element.selectionStart-1])!==a.lastIndexOf(e.element.value[e.element.selectionStart-1])&&e.element.value[e.element.selectionStart-1].charCodeAt(0)===o||e.element.value[e.element.selectionStart-1].charCodeAt(0)!==o)&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(s,e.element.value.length),e.element.setSelectionRange(n,n),isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&e.element.selectionStart>0&&e.element.value.length&&e.preventHandler()):isNaN(parseFloat(e.element.value[e.element.selectionStart-2]))&&e.element.selectionStart>1&&45!==e.element.value[e.element.selectionStart-2].charCodeAt(0)&&(a.indexOf(e.element.value[e.element.selectionStart-2])!==a.lastIndexOf(e.element.value[e.element.selectionStart-2])&&e.element.value[e.element.selectionStart-2].charCodeAt(0)===o||e.element.value[e.element.selectionStart-2].charCodeAt(0)!==o)&&(e.element.setSelectionRange(n,n),e.nextEle=e.element.value[e.element.selectionStart],e.cursorPosChanged=!0,e.preventHandler()),!0===e.cursorPosChanged&&e.element.value[e.element.selectionStart]===e.nextEle&&isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&(e.element.setSelectionRange(e.element.selectionStart+1,e.element.selectionStart+1),e.cursorPosChanged=!1,e.nextEle=null),""===e.element.value.trim()&&e.element.setSelectionRange(0,0),e.element.selectionStart>0&&(45===e.element.value[e.element.selectionStart-1].charCodeAt(0)&&e.element.selectionStart>1&&(t.isNullOrUndefined(e.prevVal)||(e.element.value=e.prevVal),e.element.setSelectionRange(e.element.selectionStart,e.element.selectionStart)),e.element.value[e.element.selectionStart-1]===l&&0===e.decimals&&e.validateDecimalOnType&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(s,e.element.value.length))),e.prevVal=e.element.value}})},s.prototype.keyUpHandler=function(){if(this.enabled&&!this.readonly){!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&t.Browser.isDevice&&this.preventHandler();var e=this.instance.getNumberParser({format:"n"})(this.element.value);if(e=null===e||isNaN(e)?null:e,this.hiddenInput.value=e||0===e?e.toString():null,t.closest(this.element,"form")){var i=this.element.nextElementSibling,s=document.createEvent("KeyboardEvent");s.initEvent("keyup",!1,!0),i.dispatchEvent(s)}}},s.prototype.inputHandler=function(e){var i=this;if(this.enabled&&!this.readonly){var s=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);if((navigator.userAgent.toLowerCase().indexOf("firefox")>-1||s)&&t.Browser.isDevice&&this.preventHandler(),this.isAngular&&this.element.value!==t.getValue("decimal",t.getNumericObject(this.locale))&&this.element.value!==t.getValue("minusSign",t.getNumericObject(this.locale))&&this.numericRegex().test(this.element.value)){var n=this.instance.getNumberParser({format:"n"})(this.element.value);n=isNaN(n)?null:n,i.localChange({value:n}),this.preventChange=!0}if(this.isVue){var a=this.instance.getNumberParser({format:"n"})(this.element.value),r=this.instance.getNumberParser({format:"n"})(this.elementPrevValue);(new RegExp("[^0-9]+$").test(this.element.value)||(-1!==this.elementPrevValue.indexOf(".")||-1!==this.elementPrevValue.indexOf("-"))&&"0"===this.element.value[this.element.value.length-1])&&(a=this.value);var l={event:e,value:null===a||isNaN(a)?null:a,previousValue:null===r||isNaN(r)?null:r};this.preventChange=!0,this.elementPrevValue=this.element.value,this.trigger("input",l)}}},s.prototype.keyDownHandler=function(e){if(!this.readonly)switch(e.keyCode){case 38:e.preventDefault(),this.action("increment",e);break;case 40:e.preventDefault(),this.action("decrement",e)}},s.prototype.performAction=function(e,t,i){(null===e||isNaN(e))&&(e=0);var s="increment"===i?e+t:e-t;return s=this.correctRounding(e,t,s),this.strictMode?this.trimValue(s):s},s.prototype.correctRounding=function(e,t,i){var s=new RegExp("[,.](.*)"),n=s.test(e.toString()),a=s.test(t.toString());if(n||a){var r=n?s.exec(e.toString())[0].length:0,l=a?s.exec(t.toString())[0].length:0,o=Math.max(r,l);return e=this.roundValue(i,o)}return i},s.prototype.roundValue=function(e,t){t=t||0;var i=Math.pow(10,t);return e*=i,e=Math.round(e)/i},s.prototype.updateValue=function(e,t){t&&(this.isInteract=!0),null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.inputValue=e,this.isVue&&this.element&&this.element.hasAttribute("modelvalue")&&this.isDynamicChange||this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.isDynamicChange||this.raiseChangeEvent(t)},s.prototype.updateCurrency=function(e,i){t.setValue(e,i,this.cultureInfo),this.updateValue(this.value)},s.prototype.changeValue=function(e){if(e||0===e){var t=this.getNumberOfDecimals(e);this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},s.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber(),i=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(i),t.attributes(this.element,{"aria-valuenow":e}),t.isNullOrUndefined(this.hiddenInput)||(this.hiddenInput.value=this.value.toString(),null!==this.value&&this.serverDecimalSeparator&&(this.hiddenInput.value=this.hiddenInput.value.replace(".",this.serverDecimalSeparator)))}else this.setElementValue(""),this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},s.prototype.setElementValue=function(t,i){e.Input.setValue(t,i||this.element,this.floatLabelType,this.showClearButton)},s.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},s.prototype.getNumberOfDecimals=function(e){var i,s=new RegExp("[eE][-+]?([0-9]+)"),n=e.toString();if(s.test(n))if(/[eE]/.test(n))"."===(n=e.toFixed(20).replace(/0+$/,"")).charAt(n.length-1)&&(n=n.slice(0,n.length-1));else{var a=s.exec(n);t.isNullOrUndefined(a)||(n=e.toFixed(Math.min(parseInt(a[1],10),20)))}var r=n.split(".")[1];return i=r&&r.length?r.length:0,null!==this.decimals&&(i=i<this.decimals?i:this.decimals),i},s.prototype.formatNumber=function(){var e=this.getNumberOfDecimals(this.value);return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},s.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},s.prototype.roundNumber=function(e,t){var i=e,s=t||0,n=i.toString().split("e"),a=(i=Math.round(Number(n[0]+"e"+(n[1]?Number(n[1])+s:s)))).toString().split("e");return i=Number(a[0]+"e"+(a[1]?Number(a[1])-s:-s)),Number(i.toFixed(s))},s.prototype.cancelEvent=function(e){return e.preventDefault(),!1},s.prototype.keyPressHandler=function(e){if(!this.enabled||this.readonly)return!0;if(!t.Browser.isDevice&&"11.0"===t.Browser.info.version&&13===e.keyCode){var i=this.instance.getNumberParser({format:"n"})(this.element.value);return this.updateValue(i,e),!0}if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var s=String.fromCharCode(e.which),n=t.getValue("decimal",t.getNumericObject(this.locale)),a="NumpadDecimal"===e.code&&s!==n;a&&(s=n);var r=this.element.value;if(r=r.substring(0,this.element.selectionStart)+s+r.substring(this.element.selectionEnd),this.numericRegex().test(r)){if(a){var l=this.element.selectionStart+1;this.element.value=r,this.element.setSelectionRange(l,l),e.preventDefault(),e.stopPropagation()}return!0}return e.preventDefault(),e.stopPropagation(),!1},s.prototype.numericRegex=function(){var e=t.getNumericObject(this.locale),i=t.getValue("decimal",e),s="*";return"."===i&&(i="\\"+i),0===this.decimals&&this.validateDecimalOnType?Q:(this.decimals&&this.validateDecimalOnType&&(s="{0,"+this.decimals+"}"),new RegExp("^\\s*(-)?(((\\d+("+i+"\\d"+s+")?)|("+i+"\\d"+s+")))?$"))},s.prototype.mouseWheel=function(e){if(this.allowMouseWheel){e.preventDefault();var t,i=e;i.wheelDelta?t=i.wheelDelta/120:i.detail&&(t=-i.detail/3),t>0?this.action("increment",e):t<0&&this.action("decrement",e),this.cancelEvent(e)}},s.prototype.focusHandler=function(e){var i=this;if(clearTimeout(te),this.focusEventArgs={event:e,value:this.value,container:this.container},this.trigger("focus",this.focusEventArgs),this.enabled&&!this.readonly){if(this.isFocused=!0,"Never"!==this.floatLabelType&&this.inputWrapper&&this.inputWrapper.container){var s=this.inputWrapper.container.querySelector(".e-float-text");s&&s.removeAttribute("style")}if(this.prevValue=this.value,this.value||0===this.value){var n=this.formatNumber();if(this.setElementValue(n),!this.isPrevFocused)if(t.Browser.isDevice||"11.0"!==t.Browser.info.version){var a=t.Browser.isDevice&&t.Browser.isIos?600:0;te=setTimeout(function(){i.element.setSelectionRange(0,n.length)},a)}else this.element.setSelectionRange(0,n.length)}!t.Browser.isDevice&&this.allowMouseWheel&&t.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this);var r=this.container.querySelector(".e-float-text");"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&r&&setTimeout(function(){r&&(r.style.width="auto")}.bind(this),5)}},s.prototype.focusOutHandler=function(e){var i=this;if(this.blurEventArgs={event:e,value:this.value,container:this.container},this.trigger("blur",this.blurEventArgs),this.enabled&&!this.readonly){if(this.isPrevFocused){if(e.preventDefault(),t.Browser.isDevice){var s=this.element.value;this.element.focus(),this.isPrevFocused=!1;var n=this.element;setTimeout(function(){i.setElementValue(s,n)},200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var a=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(a),t.Browser.isDevice||t.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}this.updateFloatLabelOverflowWidth();var r=this.container.querySelector(".e-float-text");if("Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&r&&setTimeout(function(){r&&this.prependedElement&&!this.enableRtl?r.style.marginLeft=this.prependedElement.offsetWidth+"px":r&&this.prependedElement&&this.enableRtl&&(r.style.marginRight=this.prependedElement.offsetWidth+"px"),r&&r.classList.contains("e-label-bottom")&&(r.style.width=this.element.offsetWidth+"px")}.bind(this),5),t.closest(this.element,"form")){var l=this.element.nextElementSibling,o=document.createEvent("FocusEvent");o.initEvent("focusout",!1,!0),l.dispatchEvent(o)}}},s.prototype.mouseDownOnSpinner=function(e){var i=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){this.getElementData(e);var s=e.currentTarget,n=s.classList.contains("e-spin-up")?"increment":"decrement";t.EventHandler.add(s,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval(function(){i.isCalled=!0,i.action(n,e)},150),t.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},s.prototype.touchMoveOnSpinner=function(e){var t;if("touchmove"===e.type){var i=e.touches;t=i.length&&document.elementFromPoint(i[0].pageX,i[0].pageY)}else t=document.elementFromPoint(e.clientX,e.clientY);t.classList.contains($)||clearInterval(this.timeOut)},s.prototype.mouseUpOnSpinner=function(e){if(this.prevValue=this.value,this.isPrevFocused&&(this.element.focus(),t.Browser.isDevice||(this.isPrevFocused=!1)),t.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var i=e.currentTarget,s=i.classList.contains("e-spin-up")?"increment":"decrement";if(t.EventHandler.remove(i,"mouseleave",this.mouseUpClick),this.isCalled||this.action(s,e),this.isCalled=!1,t.EventHandler.remove(document,"mouseup",this.mouseUpClick),t.closest(this.element,"form")){var n=this.element.nextElementSibling,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}}},s.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},s.prototype.floatLabelTypeUpdate=function(){e.Input.removeFloating(this.inputWrapper);var t=this.hiddenInput;this.hiddenInput.remove(),e.Input.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement),this.container.insertBefore(t,this.container.childNodes[1])},s.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,this.spinUp&&t.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),this.spinDown&&t.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},s.prototype.increment=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,"increment")),this.raiseChangeEvent()},s.prototype.decrement=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,"decrement")),this.raiseChangeEvent()},s.prototype.destroy=function(){this.unwireEvents(),this.removePrependTemplate(),this.removeAppendTemplate(),this.clearTemplate(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),t.detach(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),t.detach(this.spinUp),t.detach(this.spinDown));for(var s=["aria-labelledby","role","autocomplete","aria-readonly","aria-disabled","autocapitalize","spellcheck","aria-autocomplete","tabindex","aria-valuemin","aria-valuemax","aria-valuenow","aria-invalid"],n=0;n<s.length;n++)this.element.removeAttribute(s[n]);this.element.classList.remove("e-input"),this.container.insertAdjacentElement("afterend",this.element),t.detach(this.container),this.spinUp=null,this.spinDown=null,this.container=null,this.hiddenInput=null,this.changeEventArgs=null,this.blurEventArgs=null,this.focusEventArgs=null,this.inputWrapper=null,e.Input.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),i.prototype.destroy.call(this)},s.prototype.getText=function(){return this.element.value},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),t.addClass([this.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),t.removeClass([this.container],["e-input-focus"]))},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.onPropertyChanged=function(i,s){for(var n=0,a=Object.keys(i);n<a.length;n++){var r=a[n];switch(r){case"width":this.setElementWidth(i.width),e.Input.calculateWidth(this.element,this.container);break;case"cssClass":this.updateCssClass(i.cssClass,s.cssClass);break;case"enabled":e.Input.setEnabled(i.enabled,this.element),this.bindClearEvent();break;case"enableRtl":e.Input.setEnableRtl(i.enableRtl,[this.container]),this.handleFloatLabel();break;case"readonly":e.Input.setReadonly(i.readonly,this.element),this.readonly?t.attributes(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.updateDataAttribute(!0),this.checkAttributes(!0),e.Input.validateInputType(this.container,this.element);break;case"placeholder":e.Input.setPlaceholder(i.placeholder,this.element),e.Input.calculateWidth(this.element,this.container);break;case"step":this.step=i.step,this.validateStep();break;case"showSpinButton":this.updateSpinButton(i);break;case"showClearButton":this.updateClearButton(i);break;case"floatLabelType":this.floatLabelType=i.floatLabelType,this.floatLabelTypeUpdate();break;case"value":this.isDynamicChange=(this.isAngular||this.isVue)&&this.preventChange,this.updateValue(i.value),this.isDynamicChange&&(this.preventChange=!1,this.isDynamicChange=!1);break;case"min":case"max":t.setValue(r,t.getValue(r,i),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=i.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.setSpinButton(),this.updatePlaceholder(),e.Input.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":var l=t.getValue(r,i);this.setProperties({currencyCode:l},!0),this.updateCurrency(r,l);break;case"currencyCode":var o=t.getValue(r,i);this.setProperties({currency:o},!0),this.updateCurrency("currency",o);break;case"format":t.setValue(r,t.getValue(r,i),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=i.decimals,this.updateValue(this.value);break;case"allowMouseWheel":this.allowMouseWheel&&this.isFocused&&t.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this);break;case"prependTemplate":this.updatePrependTemplate();break;case"appendTemplate":this.updateAppendTemplate()}}},s.prototype.updateClearButton=function(t){e.Input.setClearButton(t.showClearButton,this.element,this.inputWrapper,void 0,this.createElement),this.bindClearEvent()},s.prototype.updateSpinButton=function(e){e.showSpinButton?this.spinBtnCreation():(t.detach(this.spinUp),t.detach(this.spinDown))},s.prototype.getRightIconsWidth=function(){for(var e=0,t=this.inputWrapper.container.querySelectorAll(".e-input-group-icon, .e-clear-icon"),i=0;i<t.length;i++)e+=t[i].offsetWidth;return e},s.prototype.updateFloatLabelOverflowWidth=function(){var e=this.inputWrapper.container,t=e.querySelector(".e-float-text-overflow")||e.querySelector(".e-float-text"),i=e.clientWidth-this.getRightIconsWidth();!t||!i||this.cssClass&&-1!==this.cssClass.split(" ").indexOf("e-outline")||(t.style.width=i+"px")},s.prototype.getModuleName=function(){return"numerictextbox"},J([t.Property("")],s.prototype,"cssClass",void 0),J([t.Property(null)],s.prototype,"value",void 0),J([t.Property(-Number.MAX_VALUE)],s.prototype,"min",void 0),J([t.Property(Number.MAX_VALUE)],s.prototype,"max",void 0),J([t.Property(1)],s.prototype,"step",void 0),J([t.Property(null)],s.prototype,"width",void 0),J([t.Property(null)],s.prototype,"placeholder",void 0),J([t.Property({})],s.prototype,"htmlAttributes",void 0),J([t.Property(!0)],s.prototype,"showSpinButton",void 0),J([t.Property(!1)],s.prototype,"readonly",void 0),J([t.Property(!0)],s.prototype,"enabled",void 0),J([t.Property(!1)],s.prototype,"showClearButton",void 0),J([t.Property(!1)],s.prototype,"enablePersistence",void 0),J([t.Property("n2")],s.prototype,"format",void 0),J([t.Property(null)],s.prototype,"decimals",void 0),J([t.Property(null)],s.prototype,"currency",void 0),J([t.Property(null)],s.prototype,"currencyCode",void 0),J([t.Property(!0)],s.prototype,"strictMode",void 0),J([t.Property(!1)],s.prototype,"validateDecimalOnType",void 0),J([t.Property(!0)],s.prototype,"allowMouseWheel",void 0),J([t.Property("Never")],s.prototype,"floatLabelType",void 0),J([t.Property(null)],s.prototype,"prependTemplate",void 0),J([t.Property(null)],s.prototype,"appendTemplate",void 0),J([t.Event()],s.prototype,"created",void 0),J([t.Event()],s.prototype,"destroyed",void 0),J([t.Event()],s.prototype,"change",void 0),J([t.Event()],s.prototype,"focus",void 0),J([t.Event()],s.prototype,"blur",void 0),s=J([t.NotifyPropertyChanges],s)}(t.Component),se="e-error",ne="e-input-group",ae="e-float-input",re="e-utility-mask",le="e-label-top",oe="e-label-bottom",he={0:"[0-9]",9:"[0-9 ]","#":"[0-9 +-]",L:"[A-Za-z]","?":"[A-Za-z ]","&":"[^ ]+",C:"[^]+",A:"[A-Za-z0-9]",a:"[A-Za-z0-9 ]"},pe=function(){function e(){}return e}(),de=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ue=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ce=["title","style","class"],me=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.initInputValue="",s.preventChange=!1,s.isClicked=!1,s.maskOptions=e,s}return de(s,i),s.prototype.getModuleName=function(){return"maskedtextbox"},s.prototype.preRender=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.regExpCollec=he,this.customRegExpCollec=[],this.maskedRegExp=[],this.undoCollec=[],this.redoCollec=[],this.changeEventArgs={},this.focusEventArgs={},this.blurEventArgs={},this.maskKeyPress=!1,this.isFocus=!1,this.isInitial=!1,this.isIosInvalid=!1;var e=t.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],["e-control","e-maskedtextbox","e-lib"]),this.angularTagName=null,this.formElement=t.closest(this.element,"form"),"EJS-MASKEDTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;for(var i=this.createElement("input"),s=0;s<this.element.attributes.length;s++)i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML;this.element.hasAttribute("id")&&this.element.removeAttribute("id"),this.element.hasAttribute("name")&&this.element.removeAttribute("name"),this.element.classList.remove("e-control","e-maskedtextbox"),this.element.classList.add("e-mask-container"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}this.updateHTMLAttrToElement(),this.checkHtmlAttributes(!1),this.formElement&&(this.initInputValue=this.value)},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&("Never"===this.floatLabelType&&t.addClass([this.element],"e-input"),this.createWrapper(),this.updateHTMLAttrToWrapper(),""===this.element.name&&this.element.setAttribute("name",this.element.id),this.isInitial=!0,this.resetMaskedTextBox(),this.isInitial=!1,this.setMaskPlaceholder(!0,!1),this.setWidth(this.width),this.preEleVal=this.element.value,t.Browser.isDevice||"11.0"!==t.Browser.info.version&&"edge"!==t.Browser.info.name||this.element.blur(),t.Browser.isDevice&&t.Browser.isIos&&this.element.blur(),(this.element.getAttribute("value")||this.value)&&this.element.setAttribute("value",this.element.value),!t.isNullOrUndefined(t.closest(this.element,"fieldset"))&&t.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.hasAttribute("aria-label")||this.element.setAttribute("aria-label","maskedtextbox"),this.updateFloatLabelOverflowWidth(),this.createPrependTemplate(),this.createAppendTemplate(),this.renderComplete())},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];ce.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateCssClass=function(t,i){e.Input.setCssClass(this.getValidClassList(t),[this.inputObj.container],this.getValidClassList(i))},s.prototype.getValidClassList=function(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(ce.indexOf(s)>-1)if("class"===s){var n=this.htmlAttributes[""+s].replace(/\s+/g," ").trim();""!==n&&t.addClass([this.inputObj.container],n.split(" "))}else if("style"===s){var a=this.inputObj.container.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[""+s]:a+this.htmlAttributes[""+s],this.inputObj.container.setAttribute(s,a)}else this.inputObj.container.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.resetMaskedTextBox=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.promptChar&&this.promptChar.length>1&&(this.promptChar=this.promptChar[0]),a.call(this),r.call(this),(null===this.mask||""===this.mask&&void 0!==this.value)&&z.call(this,this.value);var e=m.call(this,this.element);this.prevValue=e,this.value=e,this.isInitial||o.call(this),l.call(this)},s.prototype.setMaskPlaceholder=function(t,i){(i||this.placeholder)&&(e.Input.setPlaceholder(this.placeholder,this.element),(this.element.value===this.promptMask&&t&&"Always"!==this.floatLabelType||this.element.value===this.promptMask&&"Never"===this.floatLabelType)&&z.call(this,""))},s.prototype.setWidth=function(e){if(!t.isNullOrUndefined(e))if("number"==typeof e)this.inputObj.container.style.width=t.formatUnit(e),this.element.style.width=t.formatUnit(e);else if("string"==typeof e){var i=e.match(/px|%|em/)?e:t.formatUnit(e);this.inputObj.container.style.width=i,this.element.style.width=i}},s.prototype.checkHtmlAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"placeholder":(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"disabled":if(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"value":(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.value||e)&&this.setProperties({value:this.element.value},!e);break;case"readonly":if(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}}}},s.prototype.createWrapper=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getValidClassList(this.cssClass)),this.inputObj=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{enableRtl:this.enableRtl,cssClass:i,enabled:this.enabled,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}},this.createElement),this.inputObj.container.setAttribute("class","e-control-wrapper e-mask "+this.inputObj.container.getAttribute("class"))},s.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++)switch(n[s]){case"value":W.call(this,this.value),this.placeholder&&!this.isFocus&&this.setMaskPlaceholder(!1,!1),""===this.value&&null!=i.value&&(this.element.selectionStart=0,this.element.selectionEnd=0);break;case"placeholder":this.setMaskPlaceholder(!0,!0);break;case"width":this.setWidth(t.width),e.Input.calculateWidth(this.element,this.inputObj.container);break;case"cssClass":this.updateCssClass(t.cssClass,i.cssClass);break;case"enabled":e.Input.setEnabled(t.enabled,this.element,this.floatLabelType,this.inputObj.container);break;case"readonly":e.Input.setReadonly(t.readonly,this.element);break;case"enableRtl":e.Input.setEnableRtl(t.enableRtl,[this.inputObj.container]),this.handleFloatLabel();break;case"customCharacters":this.customCharacters=t.customCharacters,this.resetMaskedTextBox();break;case"showClearButton":e.Input.setClearButton(t.showClearButton,this.element,this.inputObj,void 0,this.createElement),h.call(this);break;case"floatLabelType":this.floatLabelType=t.floatLabelType,e.Input.removeFloating(this.inputObj),e.Input.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement);break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHtmlAttributes(!0);break;case"prependTemplate":this.updatePrependTemplate();break;case"appendTemplate":this.updateAppendTemplate();break;case"mask":var a=this.value;this.mask=t.mask,this.maskedRegExp=[],this.updateValue(a);break;case"promptChar":t.promptChar.length>1&&(t.promptChar=t.promptChar[0]),t.promptChar?this.promptChar=t.promptChar:this.promptChar="_";var r=this.element.value.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar);this.promptMask===this.element.value&&(r=this.promptMask.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar)),this.promptMask=this.promptMask.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar),this.undoCollec=this.redoCollec=[],z.call(this,r)}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange},s.prototype.updatePrependTemplate=function(){this.removePrependTemplate(),this.createPrependTemplate()},s.prototype.updateAppendTemplate=function(){this.removeAppendTemplate(),this.createAppendTemplate()},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.createPrependTemplate=function(){if(!t.isNullOrUndefined(this.prependTemplate)){var e=this.inputObj.container;this.prependedElement=this.createElement("div",{className:"e-prepend-template"}),this.iconTemplateFunction=this.templateComplier(this.prependTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.prependedElement);if(i){var s=[].slice.call(i);t.append(s,this.prependedElement)}var n=e.querySelector("input");e.classList.add("e-prepend-wrapper"),n?e.insertBefore(this.prependedElement,n):e.insertBefore(this.prependedElement,e.firstChild),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.createAppendTemplate=function(){if(!t.isNullOrUndefined(this.appendTemplate)){var e=this.inputObj.container;this.appendedElement=this.createElement("div",{className:"e-append-template"}),this.iconTemplateFunction=this.templateComplier(this.appendTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.appendedElement);if(i){var s=[].slice.call(i);t.append(s,this.appendedElement)}e.classList.add("e-append-wrapper"),e.appendChild(this.appendedElement),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.handleFloatLabel=function(){var e=this.inputObj.container.querySelector(".e-float-text");e&&"Auto"===this.floatLabelType&&setTimeout(function(){e&&this.prependedElement&&!this.enableRtl?(e.style.marginLeft=this.prependedElement.offsetWidth+"px",e.style.marginRight="0"):e&&this.prependedElement&&this.enableRtl&&(e.style.marginRight=this.prependedElement.offsetWidth+"px",e.style.marginLeft="0"),e&&e.classList.contains("e-label-bottom")&&(e.style.width=this.element.offsetWidth+"px")}.bind(this),5)},s.prototype.removePrependTemplate=function(){t.isNullOrUndefined(this.prependedElement)||(t.detach(this.prependedElement),this.prependedElement=null)},s.prototype.removeAppendTemplate=function(){t.isNullOrUndefined(this.appendedElement)||(t.detach(this.appendedElement),this.appendedElement=null)},s.prototype.updateValue=function(e){this.resetMaskedTextBox(),W.call(this,e)},s.prototype.getMaskedValue=function(){return c.call(this,this.element)},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.isFocus=!0,this.element.focus(),t.addClass([this.inputObj.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.isFocus=!1,this.element.blur(),t.removeClass([this.inputObj.container],["e-input-focus"]))},s.prototype.getRightIconsWidth=function(){for(var e=0,t=this.inputObj.container.querySelectorAll(".e-input-group-icon, .e-clear-icon"),i=0;i<t.length;i++)e+=t[i].offsetWidth;return e},s.prototype.updateFloatLabelOverflowWidth=function(){var e=this.inputObj.container,t=e.querySelector(".e-float-text-overflow")||e.querySelector(".e-float-text"),i=e.clientWidth-this.getRightIconsWidth();!t||!i||this.cssClass&&-1!==this.cssClass.split(" ").indexOf("e-outline")||(t.style.width=i+"px")},s.prototype.destroy=function(){o.call(this),this.removePrependTemplate(),this.removeAppendTemplate(),this.clearTemplate(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]);for(var s=["aria-labelledby","role","autocomplete","aria-readonly","aria-disabled","autocapitalize","spellcheck","aria-autocomplete","aria-live","aria-invalid"],n=0;n<s.length;n++)this.element.removeAttribute(s[n]);this.element.classList.remove("e-input"),this.inputObj&&(this.inputObj.container.insertAdjacentElement("afterend",this.element),t.detach(this.inputObj.container)),this.blurEventArgs=null,e.Input.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),this.changeEventArgs=null,this.inputObj=null,i.prototype.destroy.call(this)},ue([t.Property(null)],s.prototype,"cssClass",void 0),ue([t.Property(null)],s.prototype,"width",void 0),ue([t.Property(null)],s.prototype,"placeholder",void 0),ue([t.Property("Never")],s.prototype,"floatLabelType",void 0),ue([t.Property({})],s.prototype,"htmlAttributes",void 0),ue([t.Property(!0)],s.prototype,"enabled",void 0),ue([t.Property(!1)],s.prototype,"readonly",void 0),ue([t.Property(!1)],s.prototype,"showClearButton",void 0),ue([t.Property(!1)],s.prototype,"enablePersistence",void 0),ue([t.Property(null)],s.prototype,"mask",void 0),ue([t.Property("_")],s.prototype,"promptChar",void 0),ue([t.Property(null)],s.prototype,"value",void 0),ue([t.Property(null)],s.prototype,"customCharacters",void 0),ue([t.Property(null)],s.prototype,"prependTemplate",void 0),ue([t.Property(null)],s.prototype,"appendTemplate",void 0),ue([t.Event()],s.prototype,"created",void 0),ue([t.Event()],s.prototype,"destroyed",void 0),ue([t.Event()],s.prototype,"change",void 0),ue([t.Event()],s.prototype,"focus",void 0),ue([t.Event()],s.prototype,"blur",void 0),s=ue([t.NotifyPropertyChanges],s)}(t.Component),fe=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)}}(),ve=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ge=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return fe(i,e),ve([t.Property("None")],i.prototype,"placement",void 0),ve([t.Property(10)],i.prototype,"largeStep",void 0),ve([t.Property(1)],i.prototype,"smallStep",void 0),ve([t.Property(!1)],i.prototype,"showSmallTicks",void 0),ve([t.Property(null)],i.prototype,"format",void 0),i}(t.ChildProperty),ye=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return fe(i,e),ve([t.Property(null)],i.prototype,"color",void 0),ve([t.Property(null)],i.prototype,"start",void 0),ve([t.Property(null)],i.prototype,"end",void 0),i}(t.ChildProperty),be=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return fe(i,e),ve([t.Property(!1)],i.prototype,"enabled",void 0),ve([t.Property(null)],i.prototype,"minStart",void 0),ve([t.Property(null)],i.prototype,"minEnd",void 0),ve([t.Property(null)],i.prototype,"maxStart",void 0),ve([t.Property(null)],i.prototype,"maxEnd",void 0),ve([t.Property(!1)],i.prototype,"startHandleFixed",void 0),ve([t.Property(!1)],i.prototype,"endHandleFixed",void 0),i}(t.ChildProperty),Ce=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return fe(i,e),ve([t.Property("")],i.prototype,"cssClass",void 0),ve([t.Property("Before")],i.prototype,"placement",void 0),ve([t.Property("Focus")],i.prototype,"showOn",void 0),ve([t.Property(!1)],i.prototype,"isVisible",void 0),ve([t.Property(null)],i.prototype,"format",void 0),i}(t.ChildProperty),Ee={root:"e-slider",rtl:"e-rtl",sliderHiddenInput:"e-slider-input",controlWrapper:"e-control-wrapper",sliderHandle:"e-handle",rangeBar:"e-range",sliderButton:"e-slider-button",firstButton:"e-first-button",secondButton:"e-second-button",scale:"e-scale",tick:"e-tick",large:"e-large",tickValue:"e-tick-value",sliderTooltip:"e-slider-tooltip",sliderHover:"e-slider-hover",sliderFirstHandle:"e-handle-first",sliderSecondHandle:"e-handle-second",sliderDisabled:"e-disabled",sliderContainer:"e-slider-container",horizontalTooltipBefore:"e-slider-horizontal-before",horizontalTooltipAfter:"e-slider-horizontal-after",verticalTooltipBefore:"e-slider-vertical-before",verticalTooltipAfter:"e-slider-vertical-after",materialTooltip:"e-material-tooltip",materialTooltipOpen:"e-material-tooltip-open",materialTooltipActive:"e-tooltip-active",materialSlider:"e-material-slider",sliderTrack:"e-slider-track",sliderHorizantalColor:"e-slider-horizantal-color",sliderVerticalColor:"e-slider-vertical-color",sliderHandleFocused:"e-handle-focused",verticalSlider:"e-vertical",horizontalSlider:"e-horizontal",sliderHandleStart:"e-handle-start",sliderTooltipStart:"e-material-tooltip-start",sliderTabHandle:"e-tab-handle",sliderButtonIcon:"e-button-icon",sliderSmallSize:"e-small-size",sliderTickPosition:"e-tick-pos",sliderFirstTick:"e-first-tick",sliderLastTick:"e-last-tick",sliderButtonClass:"e-slider-btn",sliderTooltipWrapper:"e-tooltip-wrap",sliderTabTrack:"e-tab-track",sliderTabRange:"e-tab-range",sliderActiveHandle:"e-handle-active",sliderMaterialHandle:"e-material-handle",sliderMaterialRange:"e-material-range",sliderMaterialDefault:"e-material-default",materialTooltipShow:"e-material-tooltip-show",materialTooltipHide:"e-material-tooltip-hide",readonly:"e-read-only",limits:"e-limits",limitBarDefault:"e-limit-bar",limitBarFirst:"e-limit-first",limitBarSecond:"e-limit-second",dragHorizontal:"e-drag-horizontal",dragVertical:"e-drag-vertical"},xe=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.horDir="left",s.verDir="bottom",s.transition={handle:"left .4s cubic-bezier(.25, .8, .25, 1), right .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1) , bottom .4s cubic-bezier(.25, .8, .25, 1)",rangeBar:"all .4s cubic-bezier(.25, .8, .25, 1)"},s.transitionOnMaterialTooltip={handle:"left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, top 1ms ease-out",rangeBar:"left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, width 1ms ease-out, height 1ms ease-out"},s.scaleTransform="transform .4s cubic-bezier(.25, .8, .25, 1)",s.customAriaText=null,s.drag=!0,s.isDragComplete=!1,s.initialTooltip=!0,s}return fe(s,e),s.prototype.preRender=function(){var e={incrementTitle:"Increase",decrementTitle:"Decrease"};this.l10n=new t.L10n("slider",e,this.locale),this.isElementFocused=!1,this.tickElementCollection=[],this.tooltipFormatInfo={},this.ticksFormatInfo={},this.initCultureInfo(),this.initCultureFunc(),this.formChecker()},s.prototype.formChecker=function(){var e=t.closest(this.element,"form");e?(this.isForm=!0,t.isNullOrUndefined(this.formResetValue)||this.setProperties({value:this.formResetValue},!0),this.formResetValue=this.value,"Range"!==this.type||!t.isNullOrUndefined(this.formResetValue)&&"object"==typeof this.formResetValue?t.isNullOrUndefined(this.formResetValue)&&(this.formResetValue=parseFloat(t.formatUnit(this.min))):this.formResetValue=[parseFloat(t.formatUnit(this.min)),parseFloat(t.formatUnit(this.max))],this.formElement=e):this.isForm=!1},s.prototype.initCultureFunc=function(){this.internationalization=new t.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.tooltipFormatInfo.format=t.isNullOrUndefined(this.tooltip.format)?null:this.tooltip.format,this.ticksFormatInfo.format=t.isNullOrUndefined(this.ticks.format)?null:this.ticks.format},s.prototype.formatString=function(e,t){var i=null,s=null;if(e||0===e){i=this.formatNumber(e);var n=this.numberOfDecimals(e);s=this.internationalization.getNumberFormat(t)(this.makeRoundNumber(e,n))}return{elementVal:i,formatString:s}},s.prototype.formatNumber=function(e){var t=this.numberOfDecimals(e);return this.internationalization.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(e)},s.prototype.numberOfDecimals=function(e){var t=e.toString().split(".")[1];return t&&t.length?t.length:0},s.prototype.makeRoundNumber=function(e,t){var i=t||0;return Number(e.toFixed(i))},s.prototype.render=function(){var e=this;this.initialize(),this.initRender(),this.wireEvents(),this.setZindex(),this.renderComplete(),"EJS-SLIDER"===this.element.tagName&&"none"===this.getTheme(this.sliderContainer)&&setTimeout(function(){e.refresh()},0)},s.prototype.initialize=function(){t.addClass([this.element],Ee.root),this.setCSSClass()},s.prototype.setElementWidth=function(e){t.isNullOrUndefined(e)||t.isNullOrUndefined(this.sliderContainer)||("number"==typeof e?this.sliderContainer.style.width=t.formatUnit(e):"string"==typeof e&&(this.sliderContainer.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.setCSSClass=function(e){e&&t.removeClass([this.element],e.split(" ")),this.cssClass&&t.addClass([this.element],this.cssClass.split(" "))},s.prototype.setEnabled=function(){this.enabled?(t.removeClass([this.sliderContainer],[Ee.sliderDisabled]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.remove(Ee.sliderDisabled),this.wireEvents()):(t.addClass([this.sliderContainer],[Ee.sliderDisabled]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.add(Ee.sliderDisabled),this.unwireEvents())},s.prototype.getTheme=function(e){return window.getComputedStyle(e,":after").getPropertyValue("content").replace(/['"]+/g,"")},s.prototype.secureRandom=function(){var e=new Uint32Array(1);return window.crypto.getRandomValues(e),e[0]/4294967296},s.prototype.initRender=function(){this.sliderContainer=this.createElement("div",{className:Ee.sliderContainer+" "+Ee.controlWrapper}),this.element.parentNode.insertBefore(this.sliderContainer,this.element),this.sliderContainer.appendChild(this.element),this.sliderTrack=this.createElement("div",{className:Ee.sliderTrack}),this.element.appendChild(this.sliderTrack),this.setElementWidth(this.width),this.element.tabIndex=-1,this.getThemeInitialization(),this.setHandler(),this.createRangeBar(),this.limits.enabled&&this.createLimitBar(),this.setOrientClass(),this.hiddenInput=this.createElement("input",{attrs:{type:"hidden",value:t.isNullOrUndefined(this.value)?t.isNullOrUndefined(this.min)?"0":this.min.toString():this.value.toString(),name:this.element.getAttribute("name")||this.element.getAttribute("id")||"_"+(1e3*this.secureRandom()).toFixed(0)+"slider",class:Ee.sliderHiddenInput}}),this.hiddenInput.tabIndex=-1,this.sliderContainer.appendChild(this.hiddenInput),this.showButtons&&this.setButtons(),this.setEnableRTL(),"Range"===this.type?this.rangeValueUpdate():this.value=t.isNullOrUndefined(this.value)?t.isNullOrUndefined(this.min)?0:parseFloat(t.formatUnit(this.min.toString())):this.value,this.previousVal="Range"!==this.type?this.checkHandleValue(parseFloat(t.formatUnit(this.value.toString()))):[this.checkHandleValue(parseFloat(t.formatUnit(this.value[0].toString()))),this.checkHandleValue(parseFloat(t.formatUnit(this.value[1].toString())))],this.previousChanged=this.previousVal,t.isNullOrUndefined(this.element.hasAttribute("name"))||this.element.removeAttribute("name"),this.setValue(),this.limits.enabled&&this.setLimitBar(),"None"!==this.ticks.placement&&this.renderScale(),this.tooltip.isVisible&&this.renderTooltip(),this.enabled?t.removeClass([this.sliderContainer],[Ee.sliderDisabled]):t.addClass([this.sliderContainer],[Ee.sliderDisabled]),this.readonly?t.addClass([this.sliderContainer],[Ee.readonly]):t.removeClass([this.sliderContainer],[Ee.readonly])},s.prototype.getThemeInitialization=function(){this.isMaterial="material"===this.getTheme(this.sliderContainer)||"material-dark"===this.getTheme(this.sliderContainer),this.isMaterial3="Material3"===this.getTheme(this.sliderContainer)||"Material3-dark"===this.getTheme(this.sliderContainer),this.isBootstrap="bootstrap"===this.getTheme(this.sliderContainer)||"bootstrap-dark"===this.getTheme(this.sliderContainer),this.isBootstrap4="bootstrap4"===this.getTheme(this.sliderContainer),this.isTailwind="tailwind"===this.getTheme(this.sliderContainer)||"tailwind-dark"===this.getTheme(this.sliderContainer),this.isTailwind3="tailwind3"===this.getTheme(this.sliderContainer)||"tailwind3-dark"===this.getTheme(this.sliderContainer),this.isBootstrap5="bootstrap5"===this.getTheme(this.sliderContainer),this.isFluent="FluentUI"===this.getTheme(this.sliderContainer),this.isFluent2="fluent2"===this.getTheme(this.sliderContainer),this.isBootstrap5Dot3="bootstrap5.3"===this.getTheme(this.sliderContainer),this.isMaterialTooltip=(this.isMaterial||this.isMaterial3)&&"Range"!==this.type&&this.tooltip.isVisible},s.prototype.createRangeBar=function(){"Default"!==this.type&&(this.rangeBar=this.createElement("div",{attrs:{class:Ee.rangeBar}}),this.element.appendChild(this.rangeBar),this.drag&&"Range"===this.type&&("Horizontal"===this.orientation?this.rangeBar.classList.add(Ee.dragHorizontal):this.rangeBar.classList.add(Ee.dragVertical)))},s.prototype.createLimitBar=function(){var e="Range"!==this.type?Ee.limitBarDefault:Ee.limitBarFirst;e+=" "+Ee.limits,this.limitBarFirst=this.createElement("div",{attrs:{class:e}}),this.element.appendChild(this.limitBarFirst),"Range"===this.type&&(this.limitBarSecond=this.createElement("div",{attrs:{class:Ee.limitBarSecond+" "+Ee.limits}}),this.element.appendChild(this.limitBarSecond))},s.prototype.setOrientClass=function(){"Vertical"!==this.orientation?(this.sliderContainer.classList.remove(Ee.verticalSlider),this.sliderContainer.classList.add(Ee.horizontalSlider),this.firstHandle.setAttribute("aria-orientation","horizontal"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","horizontal")):(this.sliderContainer.classList.remove(Ee.horizontalSlider),this.sliderContainer.classList.add(Ee.verticalSlider),this.firstHandle.setAttribute("aria-orientation","vertical"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","vertical"))},s.prototype.setAriaAttributes=function(e){var i=this,s=this.min,n=this.max;!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(s=this.customValues[0],n=this.customValues[this.customValues.length-1]),"Range"!==this.type?t.attributes(e,{"aria-valuemin":t.isNullOrUndefined(s)?"0":s.toString(),"aria-valuemax":t.isNullOrUndefined(n)?"100":n.toString()}):(!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?[[t.isNullOrUndefined(s)?"":s.toString(),this.value.length>1&&!t.isNullOrUndefined(this.customValues[this.value[1]])?this.customValues[this.value[1]].toString():""],[this.value.length>0&&!t.isNullOrUndefined(this.customValues[this.value[0]])?this.customValues[this.value[0]].toString():"",t.isNullOrUndefined(n)?"":n.toString()]]:[[t.isNullOrUndefined(s)?"":s.toString(),this.value.length>1&&!t.isNullOrUndefined(this.value[1])?this.value[1].toString():""],[this.value.length>0&&!t.isNullOrUndefined(this.value[0])?this.value[0].toString():"",t.isNullOrUndefined(n)?"":n.toString()]]).forEach(function(e,s){var n=0===s?i.firstHandle:i.secondHandle;n&&t.attributes(n,{"aria-valuemin":e[0],"aria-valuemax":e[1]})})},s.prototype.createSecondHandle=function(){this.secondHandle=this.createElement("div",{attrs:{class:Ee.sliderHandle,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.secondHandle.classList.add(Ee.sliderSecondHandle),this.element.appendChild(this.secondHandle)},s.prototype.createFirstHandle=function(){this.firstHandle=this.createElement("div",{attrs:{class:Ee.sliderHandle,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.firstHandle.classList.add(Ee.sliderFirstHandle),this.element.appendChild(this.firstHandle),this.isMaterialTooltip&&(this.materialHandle=this.createElement("div",{attrs:{class:Ee.sliderHandle+" "+Ee.sliderMaterialHandle}}),this.element.appendChild(this.materialHandle))},s.prototype.wireFirstHandleEvt=function(e){e?(t.EventHandler.remove(this.firstHandle,"mousedown touchstart",this.handleFocus),t.EventHandler.remove(this.firstHandle,"transitionend",this.transitionEnd),t.EventHandler.remove(this.firstHandle,"mouseenter touchenter",this.handleOver),t.EventHandler.remove(this.firstHandle,"mouseleave touchend",this.handleLeave)):(t.EventHandler.add(this.firstHandle,"mousedown touchstart",this.handleFocus,this),t.EventHandler.add(this.firstHandle,"transitionend",this.transitionEnd,this),t.EventHandler.add(this.firstHandle,"mouseenter touchenter",this.handleOver,this),t.EventHandler.add(this.firstHandle,"mouseleave touchend",this.handleLeave,this))},s.prototype.wireSecondHandleEvt=function(e){e?(t.EventHandler.remove(this.secondHandle,"mousedown touchstart",this.handleFocus),t.EventHandler.remove(this.secondHandle,"transitionend",this.transitionEnd),t.EventHandler.remove(this.secondHandle,"mouseenter touchenter",this.handleOver),t.EventHandler.remove(this.secondHandle,"mouseleave touchend",this.handleLeave)):(t.EventHandler.add(this.secondHandle,"mousedown touchstart",this.handleFocus,this),t.EventHandler.add(this.secondHandle,"transitionend",this.transitionEnd,this),t.EventHandler.add(this.secondHandle,"mouseenter touchenter",this.handleOver,this),t.EventHandler.add(this.secondHandle,"mouseleave touchend",this.handleLeave,this))},s.prototype.handleStart=function(){"Range"!==this.type&&(this.firstHandle.classList[0===this.handlePos1?"add":"remove"](Ee.sliderHandleStart),this.isMaterialTooltip&&(this.materialHandle.classList[0===this.handlePos1?"add":"remove"](Ee.sliderHandleStart),this.tooltipElement&&this.tooltipElement.classList[0===this.handlePos1?"add":"remove"](Ee.sliderTooltipStart)))},s.prototype.transitionEnd=function(e){"transform"!==e.propertyName&&(this.handleStart(),this.enableAnimation||(this.getHandle().style.transition="none"),"Default"!==this.type&&(this.rangeBar.style.transition="none"),(this.isMaterial||this.isMaterial3)&&this.tooltip.isVisible&&"Default"===this.type&&(this.tooltipElement.style.transition=this.transition.handle),this.tooltipToggle(this.getHandle()),this.closeTooltip())},s.prototype.handleFocusOut=function(){this.firstHandle.classList.contains(Ee.sliderHandleFocused)&&this.firstHandle.classList.remove(Ee.sliderHandleFocused),"Range"===this.type&&this.secondHandle.classList.contains(Ee.sliderHandleFocused)&&this.secondHandle.classList.remove(Ee.sliderHandleFocused)},s.prototype.handleFocus=function(e){this.focusSliderElement(),this.sliderBarClick(e),e.currentTarget===this.firstHandle?(this.firstHandle.classList.add(Ee.sliderHandleFocused),this.firstHandle.classList.add(Ee.sliderTabHandle)):(this.secondHandle.classList.add(Ee.sliderHandleFocused),this.secondHandle.classList.add(Ee.sliderTabHandle)),t.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},s.prototype.handleOver=function(e){this.tooltip.isVisible&&"Hover"===this.tooltip.showOn&&this.tooltipToggle(e.currentTarget),"Default"===this.type&&this.tooltipToggle(this.getHandle())},s.prototype.handleLeave=function(e){!this.tooltip.isVisible||"Hover"!==this.tooltip.showOn||e.currentTarget.classList.contains(Ee.sliderHandleFocused)||e.currentTarget.classList.contains(Ee.sliderTabHandle)||this.closeTooltip()},s.prototype.setHandler=function(){this.createFirstHandle(),"Range"===this.type&&this.createSecondHandle()},s.prototype.setEnableRTL=function(){this.enableRtl&&"Vertical"!==this.orientation?t.addClass([this.sliderContainer],Ee.rtl):t.removeClass([this.sliderContainer],Ee.rtl);var e="Vertical"!==this.orientation?this.horDir:this.verDir;this.enableRtl?(this.horDir="right",this.verDir="bottom"):(this.horDir="left",this.verDir="bottom"),e!==("Vertical"!==this.orientation?this.horDir:this.verDir)&&"Horizontal"===this.orientation&&(t.setStyleAttribute(this.firstHandle,{right:"",left:"auto"}),"Range"===this.type&&t.setStyleAttribute(this.secondHandle,{top:"",left:"auto"})),this.setBarColor()},s.prototype.tooltipValue=function(){var e,i=this,s={value:this.value,text:""};this.initialTooltip&&(this.initialTooltip=!1,this.setTooltipContent(),s.text=e="function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,this.trigger("tooltipChange",s,function(s){if(i.addTooltipClass(s.text),e!==s.text){i.customAriaText=s.text,i.enableHtmlSanitizer?s.text=t.SanitizeHtmlHelper.sanitize(s.text.toString()):s.text=s.text.toString();var n=function(){return s.text};i.tooltipObj.content=t.initializeCSPTemplate(n),i.setAriaAttrValue(i.firstHandle),"Range"===i.type&&i.setAriaAttrValue(i.secondHandle)}}),this.isMaterialTooltip&&this.setPreviousVal("change",this.value))},s.prototype.setTooltipContent=function(){var e=this.formatContent(this.tooltipFormatInfo,!1),i=function(){return e};this.tooltipObj.content=t.initializeCSPTemplate(i)},s.prototype.formatContent=function(e,i){var s="",n=this.handleVal1,a=this.handleVal2;return!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(n=this.customValues[this.handleVal1],a=this.customValues[this.handleVal2]),i?("Range"===this.type?s=this.enableRtl&&"Vertical"!==this.orientation?t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?a.toString()+" - "+n.toString():this.formatString(a,e).elementVal+" - "+this.formatString(n,e).elementVal:t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?n.toString()+" - "+a.toString():this.formatString(n,e).elementVal+" - "+this.formatString(a,e).elementVal:t.isNullOrUndefined(n)||(s=t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?n.toString():this.formatString(n,e).elementVal),s):("Range"===this.type?s=this.enableRtl&&"Vertical"!==this.orientation?t.isNullOrUndefined(e.format)?a.toString()+" - "+n.toString():this.formatString(a,e).formatString+" - "+this.formatString(n,e).formatString:t.isNullOrUndefined(e.format)?n.toString()+" - "+a.toString():this.formatString(n,e).formatString+" - "+this.formatString(a,e).formatString:t.isNullOrUndefined(n)||(s=t.isNullOrUndefined(e.format)?n.toString():this.formatString(n,e).formatString),s)},s.prototype.addTooltipClass=function(e){if(this.isMaterialTooltip){var t=e.toString().length;if(this.tooltipElement){i=t>4?{oldCss:Ee.sliderMaterialDefault,newCss:Ee.sliderMaterialRange}:{oldCss:Ee.sliderMaterialRange,newCss:Ee.sliderMaterialDefault};this.tooltipElement.classList.remove(i.oldCss),this.tooltipElement.classList.contains(i.newCss)||(this.tooltipElement.classList.add(i.newCss),this.tooltipElement.style.transform=t>4?"scale(1)":this.getTooltipTransformProperties(this.previousTooltipClass).rotate)}else{var i=t>4?Ee.sliderMaterialRange:Ee.sliderMaterialDefault;this.tooltipObj.cssClass=Ee.sliderTooltip+" "+i}}},s.prototype.tooltipPlacement=function(){return"Horizontal"===this.orientation?"Before"===this.tooltip.placement?"TopCenter":"BottomCenter":"Before"===this.tooltip.placement?"LeftCenter":"RightCenter"},s.prototype.tooltipBeforeOpen=function(e){this.tooltipElement=e.element,this.tooltip.cssClass&&t.addClass([this.tooltipElement],this.tooltip.cssClass.split(" ").filter(function(e){return e})),e.target.removeAttribute("aria-describedby"),this.isMaterialTooltip&&(this.tooltipElement.firstElementChild.classList.add(Ee.materialTooltipHide),this.handleStart(),this.setTooltipTransform())},s.prototype.tooltipCollision=function(e){if(this.isBootstrap||this.isBootstrap4||(this.isMaterial||this.isMaterial3)&&!this.isMaterialTooltip){var t=this.isBootstrap4?3:6;switch(e){case"TopCenter":this.tooltipObj.setProperties({offsetY:-t},!1);break;case"BottomCenter":this.tooltipObj.setProperties({offsetY:t},!1);break;case"LeftCenter":this.tooltipObj.setProperties({offsetX:-t},!1);break;case"RightCenter":this.tooltipObj.setProperties({offsetX:t},!1)}}},s.prototype.materialTooltipEventCallBack=function(e){this.sliderBarClick(e),t.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},s.prototype.wireMaterialTooltipEvent=function(e){this.isMaterialTooltip&&(e?t.EventHandler.remove(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack):t.EventHandler.add(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack,this))},s.prototype.tooltipPositionCalculation=function(e){var t;switch(e){case"TopCenter":t=Ee.horizontalTooltipBefore;break;case"BottomCenter":t=Ee.horizontalTooltipAfter;break;case"LeftCenter":t=Ee.verticalTooltipBefore;break;case"RightCenter":t=Ee.verticalTooltipAfter}return t},s.prototype.getTooltipTransformProperties=function(e){var t;if(this.tooltipElement){var i="Horizontal"===this.orientation?this.tooltipElement.clientHeight+14-this.tooltipElement.clientHeight/2:this.tooltipElement.clientWidth+14-this.tooltipElement.clientWidth/2;t="Horizontal"===this.orientation?e===Ee.horizontalTooltipBefore?{rotate:"rotate(45deg)",translate:"translateY("+i+"px)"}:{rotate:"rotate(225deg)",translate:"translateY("+-i+"px)"}:e===Ee.verticalTooltipBefore?{rotate:"rotate(-45deg)",translate:"translateX("+i+"px)"}:{rotate:"rotate(-225deg)",translate:"translateX("+-i+"px)"}}return t},s.prototype.openMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){this.refreshTooltip(this.firstHandle);var t=this.tooltipElement.firstElementChild;t.classList.remove(Ee.materialTooltipHide),t.classList.add(Ee.materialTooltipShow),this.firstHandle.style.cursor="default",this.tooltipElement.style.transition=this.scaleTransform,this.tooltipElement.classList.add(Ee.materialTooltipOpen),this.materialHandle.style.transform="scale(0)",t.innerText.length>4?this.tooltipElement.style.transform="scale(1)":this.tooltipElement.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate,"Default"===this.type?setTimeout(function(){e.tooltipElement&&(e.tooltipElement.style.transition=e.transition.handle)},2500):setTimeout(function(){e.tooltipElement&&(e.tooltipElement.style.transition="none")},2500)}},s.prototype.closeMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){var t=this.tooltipElement.firstElementChild;this.tooltipElement.style.transition=this.scaleTransform,t.classList.remove(Ee.materialTooltipShow),t.classList.add(Ee.materialTooltipHide),this.firstHandle.style.cursor="-webkit-grab",this.firstHandle.style.cursor="grab",this.materialHandle&&(this.materialHandle.style.transform="scale(1)"),this.tooltipElement.classList.remove(Ee.materialTooltipOpen),this.setTooltipTransform(),this.tooltipTarget=void 0,setTimeout(function(){e.tooltipElement&&(e.tooltipElement.style.transition="none")},2500)}},s.prototype.checkTooltipPosition=function(e){var t=this.tooltipPositionCalculation(e.collidedPosition);void 0!==this.tooltipCollidedPosition&&this.tooltipCollidedPosition===e.collidedPosition&&e.element.classList.contains(t)||(this.isMaterialTooltip&&(void 0!==t&&(e.element.classList.remove(this.previousTooltipClass),e.element.classList.add(t),this.previousTooltipClass=t),e.element.style.transform&&e.element.classList.contains(Ee.materialTooltipOpen)&&e.element.firstElementChild.innerText.length<=4&&(e.element.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate)),this.tooltipCollidedPosition=e.collidedPosition),this.isMaterialTooltip&&this.tooltipElement&&-1!==this.tooltipElement.style.transform.indexOf("translate")&&this.setTooltipTransform()},s.prototype.setTooltipTransform=function(){var e=this.getTooltipTransformProperties(this.previousTooltipClass);t.isNullOrUndefined(this.tooltipElement)||(this.tooltipElement.firstElementChild.innerText.length>4?this.tooltipElement.style.transform=e.translate+" scale(0.01)":this.tooltipElement.style.transform=e.translate+" "+e.rotate+" scale(0.01)")},s.prototype.renderTooltip=function(){this.tooltipObj=new i.Tooltip({showTipPointer:this.isBootstrap||this.isMaterial||this.isMaterial3||this.isBootstrap4||this.isTailwind||this.isTailwind3||this.isBootstrap5||this.isFluent||this.isFluent2||this.isBootstrap5Dot3,cssClass:Ee.sliderTooltip,height:this.isMaterial||this.isMaterial3?30:"auto",animation:{open:{effect:"None"},close:{effect:"FadeOut",duration:500}},opensOn:"Custom",beforeOpen:this.tooltipBeforeOpen.bind(this),beforeCollision:this.checkTooltipPosition.bind(this),beforeClose:this.tooltipBeforeClose.bind(this),enableHtmlSanitizer:this.enableHtmlSanitizer}),this.tooltipObj.appendTo(this.firstHandle),this.initializeTooltipProps()},s.prototype.initializeTooltipProps=function(){var e="Auto"===this.tooltip.showOn?"Hover":this.tooltip.showOn;this.setProperties({tooltip:{showOn:e}},!0),this.tooltipObj.position=this.tooltipPlacement(),this.tooltipCollision(this.tooltipObj.position),[this.firstHandle,this.rangeBar,this.secondHandle].forEach(function(e){t.isNullOrUndefined(e)||(e.style.transition="none")}),this.isMaterialTooltip&&(this.sliderContainer.classList.add(Ee.materialSlider),this.tooltipValue(),this.tooltipObj.animation.close.effect="None",this.tooltipObj.open(this.firstHandle))},s.prototype.tooltipBeforeClose=function(){this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0},s.prototype.setButtons=function(){this.firstBtn=this.createElement("div",{className:Ee.sliderButton+" "+Ee.firstButton}),this.firstBtn.appendChild(this.createElement("span",{className:Ee.sliderButtonIcon})),(this.isTailwind||this.isTailwind3)&&this.firstBtn.querySelector("span").classList.add("e-icons"),this.firstBtn.tabIndex=-1,this.secondBtn=this.createElement("div",{className:Ee.sliderButton+" "+Ee.secondButton}),this.secondBtn.appendChild(this.createElement("span",{className:Ee.sliderButtonIcon})),(this.isTailwind||this.isTailwind3)&&this.secondBtn.querySelector("span").classList.add("e-icons"),this.secondBtn.tabIndex=-1,this.sliderContainer.classList.add(Ee.sliderButtonClass),this.sliderContainer.appendChild(this.firstBtn),this.sliderContainer.appendChild(this.secondBtn),this.sliderContainer.appendChild(this.element),this.buttonTitle()},s.prototype.buttonTitle=function(){var e=this.enableRtl&&"Vertical"!==this.orientation;this.l10n.setLocale(this.locale);var i=this.l10n.getConstant("decrementTitle"),s=this.l10n.getConstant("incrementTitle");t.attributes(e?this.secondBtn:this.firstBtn,{"aria-label":i,title:i}),t.attributes(e?this.firstBtn:this.secondBtn,{"aria-label":s,title:s})},s.prototype.buttonFocusOut=function(){(this.isMaterial||this.isMaterial3)&&this.getHandle().classList.remove("e-large-thumb-size")},s.prototype.repeatButton=function(e){var t,i=this.handleValueUpdate(),s=this.enableRtl&&"Vertical"!==this.orientation;e.target.parentElement.classList.contains(Ee.firstButton)||e.target.classList.contains(Ee.firstButton)?t=s?this.add(i,parseFloat(this.step.toString()),!0):this.add(i,parseFloat(this.step.toString()),!1):(e.target.parentElement.classList.contains(Ee.secondButton)||e.target.classList.contains(Ee.secondButton))&&(t=s?this.add(i,parseFloat(this.step.toString()),!1):this.add(i,parseFloat(this.step.toString()),!0)),this.limits.enabled&&(t=this.getLimitCorrectedValues(t)),t>=this.min&&t<=this.max&&(this.changeHandleValue(t,e),this.tooltipToggle(this.getHandle()))},s.prototype.repeatHandlerMouse=function(e){e.preventDefault(),"mousedown"!==e.type&&"touchstart"!==e.type||(this.buttonClick(e),this.repeatInterval=setInterval(this.repeatButton.bind(this),180,e))},s.prototype.materialChange=function(){this.getHandle().classList.contains("e-large-thumb-size")||this.getHandle().classList.add("e-large-thumb-size")},s.prototype.focusHandle=function(){this.getHandle().classList.contains(Ee.sliderTabHandle)||this.getHandle().classList.add(Ee.sliderTabHandle)},s.prototype.repeatHandlerUp=function(e){this.changeEvent("changed",e),this.closeTooltip(),clearInterval(this.repeatInterval),this.getHandle().focus()},s.prototype.customTickCounter=function(e){var i=4;return!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(e>4&&(i=3),e>7&&(i=2),e>14&&(i=1),e>28&&(i=0)),i},s.prototype.renderScale=function(){var e="Vertical"===this.orientation?"v":"h";this.ul=this.createElement("ul",{className:Ee.scale+" e-"+e+"-scale "+Ee.tick+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation","aria-hidden":"true"}}),this.ul.style.zIndex="-1",t.Browser.isAndroid&&"h"===e&&this.ul.classList.add(Ee.sliderTickPosition);var i=this.ticks.smallStep;this.ticks.showSmallTicks?i<=0&&(i=parseFloat(t.formatUnit(this.step))):i=this.ticks.largeStep>0?this.ticks.largeStep:parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min));var s=parseFloat(t.formatUnit(this.min)),n=parseFloat(t.formatUnit(this.max)),a=parseFloat(t.formatUnit(i)),r=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&this.customValues.length-1,l=this.customTickCounter(r),o=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?r*l+r:Math.abs((n-s)/a);this.element.appendChild(this.ul);var h,p=parseFloat(this.min.toString());"v"===e&&(p=parseFloat(this.max.toString()));var d,u=0,c=100/o;c===1/0&&(c=5);for(var m=0,f=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?this.customValues.length-1:0,v=0;m<=o;m++){if(h=this.createElement("li",{attrs:{class:Ee.tick,role:"presentation","aria-hidden":"true"}}),!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0)(d=m%(l+1)==0)&&("h"===e?(p=this.customValues[v],v++):(p=this.customValues[f],f--),h.setAttribute("title",p.toString()));else if(h.setAttribute("title",p.toString()),0===this.numberOfDecimals(this.max)&&0===this.numberOfDecimals(this.min)&&0===this.numberOfDecimals(this.step))if("h"===e){b=(p-parseFloat(this.min.toString()))%this.ticks.largeStep;d=Math.abs(b)<1e-10||Math.abs(this.ticks.largeStep-b)<1e-10}else{b=Math.abs(p-parseFloat(this.max.toString()))%this.ticks.largeStep;d=Math.abs(b)<1e-10||Math.abs(this.ticks.largeStep-b)<1e-10}else{var g=this.ticks.largeStep,y=p;if("h"===e){b=(y-s)%g;d=Math.abs(b)<1e-10||Math.abs(g-b)<1e-10}else{var b=Math.abs(y-parseFloat(n.toString()))%g;d=Math.abs(b)<1e-10||Math.abs(g-b)<1e-10}}d&&h.classList.add(Ee.large),"h"===e?h.style.width=c+"%":h.style.height=c+"%";var C=d?"Both"===this.ticks.placement?2:1:0;if(d)for(var E=0;E<C;E++)this.createTick(h,p);else t.isNullOrUndefined(this.customValues)&&this.formatTicksValue(h,p);this.ul.appendChild(h),this.tickElementCollection.push(h);var x=void 0;t.isNullOrUndefined(this.customValues)&&(x=this.numberOfDecimals(i)>this.numberOfDecimals(p)?this.numberOfDecimals(i):this.numberOfDecimals(p),p="h"===e?this.makeRoundNumber(p+i,x):this.min>this.max?this.makeRoundNumber(p+i,x):this.makeRoundNumber(p-i,x),u=this.makeRoundNumber(u+i,x))}this.ticksAlignment(e,c)},s.prototype.ticksAlignment=function(e,t,i){void 0===i&&(i=!0),this.firstChild=this.ul.firstElementChild,this.lastChild=this.ul.lastElementChild,this.firstChild.classList.add(Ee.sliderFirstTick),this.lastChild.classList.add(Ee.sliderLastTick),this.sliderContainer.classList.add(Ee.scale+"-"+this.ticks.placement.toLowerCase()),"h"===e?(this.firstChild.style.width=t/2+"%",this.lastChild.style.width=t/2+"%"):(this.firstChild.style.height=t/2+"%",this.lastChild.style.height=t/2+"%");var s={ticksWrapper:this.ul,tickElements:this.tickElementCollection};i&&this.trigger("renderedTicks",s),this.scaleAlignment()},s.prototype.createTick=function(e,i){var s=this.createElement("span",{className:Ee.tickValue+" "+Ee.tick+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation","aria-hidden":"true"}});e.appendChild(s),t.isNullOrUndefined(this.customValues)?this.formatTicksValue(e,i,s):this.enableHtmlSanitizer?s.innerHTML=t.SanitizeHtmlHelper.sanitize(i.toString()):s.innerHTML=i.toString()},s.prototype.formatTicksValue=function(e,i,s){var n=this,a=this.formatNumber(i),r={value:i,text:t.isNullOrUndefined(this.ticks)||t.isNullOrUndefined(this.ticks.format)?a:this.formatString(i,this.ticksFormatInfo).formatString,tickElement:e};this.trigger("renderingTicks",r,function(i){e.setAttribute("title",i.text.toString()),s&&(n.enableHtmlSanitizer?s.innerHTML=t.SanitizeHtmlHelper.sanitize(i.text.toString()):s.innerHTML=i.text.toString())})},s.prototype.scaleAlignment=function(){this.tickValuePosition(),"Vertical"===this.orientation?this.element.getBoundingClientRect().width<=15?this.sliderContainer.classList.add(Ee.sliderSmallSize):this.sliderContainer.classList.remove(Ee.sliderSmallSize):this.element.getBoundingClientRect().height<=15?this.sliderContainer.classList.add(Ee.sliderSmallSize):this.sliderContainer.classList.remove(Ee.sliderSmallSize)},s.prototype.tickValuePosition=function(){this.firstChild=this.element.querySelector("ul").children[0];var e,i,s=this.firstChild.getBoundingClientRect(),n=this.ticks.smallStep,a=Math.abs(parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min)))/n;this.firstChild.children.length>0&&(e=this.firstChild.children[0].getBoundingClientRect());var r,l=[this.sliderContainer.querySelectorAll("."+Ee.tick+"."+Ee.large+" ."+Ee.tickValue)];r="Both"===this.ticks.placement?[].slice.call(l[0],2):[].slice.call(l[0],1);for(var o="Vertical"===this.orientation?2*s.height:2*s.width,h=0;h<this.firstChild.children.length;h++)"Vertical"===this.orientation?this.firstChild.children[h].style.top=-e.height/2+"px":this.enableRtl?this.firstChild.children[h].style.left=(o-this.firstChild.children[h].getBoundingClientRect().width)/2+"px":this.firstChild.children[h].style.left=-e.width/2+"px";for(h=0;h<r.length;h++)i=r[h].getBoundingClientRect(),"Vertical"===this.orientation?t.setStyleAttribute(r[h],{top:(o-i.height)/2+"px"}):t.setStyleAttribute(r[h],{left:(o-i.width)/2+"px"});this.enableRtl&&this.lastChild.children.length&&0!==a&&(this.lastChild.children[0].style.left=-this.lastChild.getBoundingClientRect().width/2+"px","Both"===this.ticks.placement&&(this.lastChild.children[1].style.left=-this.lastChild.getBoundingClientRect().width/2+"px")),0===a&&("Horizontal"===this.orientation&&(this.enableRtl?(this.firstChild.classList.remove(Ee.sliderLastTick),this.firstChild.style.right=this.firstHandle.style.right,this.firstChild.children[0].style.left=this.firstChild.getBoundingClientRect().width/2+2+"px","Both"===this.ticks.placement&&(this.firstChild.children[1].style.left=this.firstChild.getBoundingClientRect().width/2+2+"px")):(this.firstChild.classList.remove(Ee.sliderLastTick),this.firstChild.style.left=this.firstHandle.style.left)),"Vertical"===this.orientation&&this.firstChild.classList.remove(Ee.sliderLastTick))},s.prototype.setAriaAttrValue=function(e){var i,s=!t.isNullOrUndefined(this.ticks)&&!t.isNullOrUndefined(this.ticks.format),n=s?this.formatContent(this.tooltipFormatInfo,!1):this.formatContent(this.ticksFormatInfo,!1),a=s?this.formatContent(this.ticksFormatInfo,!0):this.formatContent(this.tooltipFormatInfo,!0);i=2===(n=this.customAriaText?this.customAriaText:n).split(" - ").length?n.split(" - "):[n,n],this.setAriaAttributes(e),"Range"!==this.type?t.attributes(e,{"aria-valuenow":a,"aria-valuetext":n}):this.enableRtl?e===this.firstHandle?t.attributes(e,{"aria-valuenow":a.split(" - ")[1],"aria-valuetext":i[1]}):t.attributes(e,{"aria-valuenow":a.split(" - ")[0],"aria-valuetext":i[0]}):e===this.firstHandle?t.attributes(e,{"aria-valuenow":a.split(" - ")[0],"aria-valuetext":i[0]}):t.attributes(e,{"aria-valuenow":a.split(" - ")[1],"aria-valuetext":i[1]})},s.prototype.handleValueUpdate=function(){return"Range"===this.type?1===this.activeHandle?this.handleVal1:this.handleVal2:this.handleVal1},s.prototype.getLimitCorrectedValues=function(e){return e="MinRange"===this.type||"Default"===this.type?this.getLimitValueAndPosition(e,this.limits.minStart,this.limits.minEnd)[0]:1===this.activeHandle?this.getLimitValueAndPosition(e,this.limits.minStart,this.limits.minEnd)[0]:this.getLimitValueAndPosition(e,this.limits.maxStart,this.limits.maxEnd)[0]},s.prototype.focusSliderElement=function(){this.isElementFocused||(this.element.focus(),this.isElementFocused=!0)},s.prototype.buttonClick=function(e){this.focusSliderElement();var i,s=this.enableRtl&&"Vertical"!==this.orientation,n=this.handleValueUpdate();40===e.keyCode||37===e.keyCode||e.currentTarget.classList.contains(Ee.firstButton)?i=s?this.add(n,parseFloat(this.step.toString()),!0):this.add(n,parseFloat(this.step.toString()),!1):38===e.keyCode||39===e.keyCode||e.currentTarget.classList.contains(Ee.secondButton)?i=s?this.add(n,parseFloat(this.step.toString()),!1):this.add(n,parseFloat(this.step.toString()),!0):33===e.keyCode||e.currentTarget.classList.contains(Ee.firstButton)?i=s?this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):34===e.keyCode||e.currentTarget.classList.contains(Ee.secondButton)?i=s?this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):36===e.keyCode?i=parseFloat(this.min<this.max?this.min.toString():this.max.toString()):35===e.keyCode&&(i=parseFloat(this.min<this.max?this.max.toString():this.min.toString())),this.limits.enabled&&(i=this.getLimitCorrectedValues(i)),this.changeHandleValue(i,e),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Ee.sliderTabHandle)||this.materialChange(),this.tooltipToggle(this.getHandle()),this.getHandle().focus(),this.focusHandle(),e.currentTarget.classList.contains(Ee.firstButton)&&t.EventHandler.add(this.firstBtn,"mouseup touchend",this.buttonUp,this),e.currentTarget.classList.contains(Ee.secondButton)&&t.EventHandler.add(this.secondBtn,"mouseup touchend",this.buttonUp,this)},s.prototype.tooltipToggle=function(e){this.isMaterialTooltip?this.tooltipElement.classList.contains(Ee.materialTooltipOpen)?this.refreshTooltip(this.firstHandle):this.openMaterialTooltip():this.tooltipElement?this.refreshTooltip(e):this.openTooltip(e)},s.prototype.buttonUp=function(e){e.currentTarget.classList.contains(Ee.firstButton)&&t.EventHandler.remove(this.firstBtn,"mouseup touchend",this.buttonUp),e.currentTarget.classList.contains(Ee.secondButton)&&t.EventHandler.remove(this.secondBtn,"mouseup touchend",this.buttonUp)},s.prototype.setRangeBar=function(){"Horizontal"!==this.orientation||t.isNullOrUndefined(this.rangeBar)?t.isNullOrUndefined(this.rangeBar)||("MinRange"===this.type?(this.rangeBar.style.bottom=this.min>this.max?this.handlePos1+"px":"0px",t.setStyleAttribute(this.rangeBar,{height:t.isNullOrUndefined(this.handlePos1)?0:this.min>this.max?this.element.clientHeight-this.handlePos1+"px":this.handlePos1+"px"})):(this.rangeBar.style.bottom=this.min>this.max?this.handlePos2+"px":this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{height:this.min>this.max?this.handlePos1-this.handlePos2+"px":this.handlePos2-this.handlePos1+"px"}))):"MinRange"===this.type?(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",t.setStyleAttribute(this.rangeBar,{width:t.isNullOrUndefined(this.handlePos1)?0:this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right=this.handlePos1+"px":this.rangeBar.style.left=this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"}))},s.prototype.checkValidValueAndPos=function(e){return e=this.checkHandleValue(e),e=this.checkHandlePosition(e)},s.prototype.setLimitBarPositions=function(e,t,i,s){"Horizontal"===this.orientation?this.enableRtl?(this.limitBarFirst.style.right=e+"px",this.limitBarFirst.style.width=t-e+"px"):(this.limitBarFirst.style.left=e+"px",this.limitBarFirst.style.width=t-e+"px"):(this.limitBarFirst.style.bottom=(this.min<this.max?e:t)+"px",this.limitBarFirst.style.height=(this.min<this.max?t-e:e-t)+"px"),"Range"===this.type&&("Horizontal"===this.orientation?this.enableRtl?(this.limitBarSecond.style.right=i+"px",this.limitBarSecond.style.width=s-i+"px"):(this.limitBarSecond.style.left=i+"px",this.limitBarSecond.style.width=s-i+"px"):(this.limitBarSecond.style.bottom=(this.min<this.max?i:s)+"px",this.limitBarSecond.style.height=(this.min<this.max?s-i:i-s)+"px"))},s.prototype.setLimitBar=function(){if("Default"===this.type||"MinRange"===this.type){var e=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];e=this.checkValidValueAndPos(e);var t=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];t=this.checkValidValueAndPos(t),this.setLimitBarPositions(e,t)}else if("Range"===this.type){var i=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];i=this.checkValidValueAndPos(i);var s=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];s=this.checkValidValueAndPos(s);var n=this.getLimitValueAndPosition(this.limits.maxStart,this.limits.maxStart,this.limits.maxEnd,!0)[0];n=this.checkValidValueAndPos(n);var a=this.getLimitValueAndPosition(this.limits.maxEnd,this.limits.maxStart,this.limits.maxEnd,!0)[0];a=this.checkValidValueAndPos(a),this.setLimitBarPositions(i,s,n,a)}},s.prototype.getLimitValueAndPosition=function(e,i,s,n){return t.isNullOrUndefined(i)&&(i=this.min<this.max?this.min:this.max,t.isNullOrUndefined(e)&&n&&(e=i)),t.isNullOrUndefined(s)&&(s=this.min<this.max?this.max:this.min,t.isNullOrUndefined(e)&&n&&(e=s)),e<i&&(e=i),e>s&&(e=s),[e,this.checkHandlePosition(e)]},s.prototype.setValue=function(){if(!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(this.min=0,this.max=this.customValues.length-1,this.setBarColor()),this.setAriaAttributes(this.firstHandle),this.handleVal1=t.isNullOrUndefined(this.value)?this.checkHandleValue(parseFloat(this.min.toString())):this.checkHandleValue(parseFloat(this.value.toString())),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.preHandlePos1=this.handlePos1,t.isNullOrUndefined(this.activeHandle)&&(this.activeHandle="Range"===this.type?2:1),"Default"===this.type||"MinRange"===this.type){if(this.limits.enabled){var e=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=e[0],this.handlePos1=e[1],this.preHandlePos1=this.handlePos1}this.setHandlePosition(null),this.handleStart(),this.value=this.handleVal1,this.setAriaAttrValue(this.firstHandle),this.changeEvent("changed",null)}else this.validateRangeValue();"Default"!==this.type&&this.setRangeBar(),this.limits.enabled&&this.setLimitBar()},s.prototype.rangeValueUpdate=function(){null!==this.value&&"object"==typeof this.value||(this.value=[parseFloat(t.formatUnit(this.min)),parseFloat(t.formatUnit(this.max))])},s.prototype.validateRangeValue=function(){this.rangeValueUpdate(),this.setRangeValue()},s.prototype.modifyZindex=function(){"Range"!==this.type||t.isNullOrUndefined(this.firstHandle)||t.isNullOrUndefined(this.secondHandle)?this.isMaterialTooltip&&this.tooltipElement&&(this.tooltipElement.style.zIndex=i.getZindexPartial(this.element)+""):1===this.activeHandle?(this.firstHandle.style.zIndex=this.zIndex+4+"",this.secondHandle.style.zIndex=this.zIndex+3+""):(this.firstHandle.style.zIndex=this.zIndex+3+"",this.secondHandle.style.zIndex=this.zIndex+4+"")},s.prototype.setHandlePosition=function(e){var i,s=this,n=1===this.activeHandle?this.handlePos1:this.handlePos2;i=this.isMaterialTooltip?[this.firstHandle,this.materialHandle]:[this.getHandle()],this.handleStart(),i.forEach(function(e){t.isNullOrUndefined(e)||("Horizontal"===s.orientation?s.enableRtl?e.style.right=n+"px":e.style.left=n+"px":e.style.bottom=n+"px")}),this.changeEvent("change",e)},s.prototype.getHandle=function(){return 1===this.activeHandle?this.firstHandle:this.secondHandle},s.prototype.setRangeValue=function(){this.updateRangeValue(),this.activeHandle=1,this.setHandlePosition(null),this.activeHandle=2,this.setHandlePosition(null),this.activeHandle=1},s.prototype.changeEvent=function(e,t){var i="change"===e?this.previousVal:this.previousChanged;if("Range"!==this.type)this.setProperties({value:this.handleVal1},!0),i===this.value||this.isMaterialTooltip&&this.initialTooltip||(this.trigger(e,this.changeEventArgs(e,t)),this.initialTooltip=!0,this.setPreviousVal(e,this.value)),this.setAriaAttrValue(this.firstHandle);else{var s=this.value=[this.handleVal1,this.handleVal2];this.setProperties({value:s},!0),(i.length===this.value.length&&this.value[0]!==i[0]||this.value[1]!==i[1])&&(this.initialTooltip=!1,this.trigger(e,this.changeEventArgs(e,t)),this.initialTooltip=!0,this.setPreviousVal(e,this.value)),this.setAriaAttrValue(this.getHandle())}this.hiddenInput.value=this.value.toString()},s.prototype.changeEventArgs=function(e,i){var s;return this.tooltip.isVisible&&this.tooltipObj&&this.initialTooltip?(this.tooltipValue(),s={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:"function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,isInteracted:!t.isNullOrUndefined(i)}):s={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:t.isNullOrUndefined(this.ticksFormatInfo.format)?this.value.toString():"Range"!==this.type?this.formatString(this.value,this.ticksFormatInfo).formatString:this.formatString(this.value[0],this.ticksFormatInfo).formatString+" - "+this.formatString(this.value[1],this.ticksFormatInfo).formatString,isInteracted:!t.isNullOrUndefined(i)},s},s.prototype.setPreviousVal=function(e,t){"change"===e?this.previousVal=t:this.previousChanged=t},s.prototype.updateRangeValue=function(){var e=this.value.toString().split(",").map(Number);if(this.enableRtl&&"Vertical"!==this.orientation||this.rtl?this.value=[e[1],e[0]]:this.value=[e[0],e[1]],this.enableRtl&&"Vertical"!==this.orientation?(this.handleVal1=this.checkHandleValue(this.value[1]),this.handleVal2=this.checkHandleValue(this.value[0])):(this.handleVal1=this.checkHandleValue(this.value[0]),this.handleVal2=this.checkHandleValue(this.value[1])),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2),this.min<this.max&&this.handlePos1>this.handlePos2&&(this.handlePos1=this.handlePos2,this.handleVal1=this.handleVal2),this.min>this.max&&this.handlePos1<this.handlePos2&&(this.handlePos2=this.handlePos1,this.handleVal2=this.handleVal1),this.preHandlePos1=this.handlePos1,this.preHandlePos2=this.handlePos2,this.limits.enabled){this.activeHandle=1;var t=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=t[0],this.handlePos1=t[1],this.preHandlePos1=this.handlePos1,this.activeHandle=2,t=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=t[0],this.handlePos2=t[1],this.preHandlePos2=this.handlePos2}},s.prototype.checkHandlePosition=function(e){var i;return e=100*(e-parseFloat(t.formatUnit(this.min)))/(parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min))),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(e/100):this.element.getBoundingClientRect().height*(e/100),parseFloat(t.formatUnit(this.max))===parseFloat(t.formatUnit(this.min))&&(i="Horizontal"===this.orientation?this.element.getBoundingClientRect().width:this.element.getBoundingClientRect().height),i},s.prototype.checkHandleValue=function(e){if(this.min===this.max)return parseFloat(t.formatUnit(this.max));var i=this.tempStartEnd();return e<i.start?e=i.start:e>i.end&&(e=i.end),e},s.prototype.reposition=function(){var e=this;t.isNullOrUndefined(this.firstHandle)||(this.firstHandle.style.transition="none"),"Default"===this.type||t.isNullOrUndefined(this.rangeBar)||(this.rangeBar.style.transition="none"),"Range"!==this.type||t.isNullOrUndefined(this.secondHandle)||(this.secondHandle.style.transition="none"),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handleVal2&&(this.handlePos2=this.checkHandlePosition(this.handleVal2)),"Horizontal"===this.orientation?(this.enableRtl?this.firstHandle.style.right=this.handlePos1+"px":this.firstHandle.style.left=this.handlePos1+"px",this.isMaterialTooltip&&!t.isNullOrUndefined(this.materialHandle)&&(this.enableRtl?this.materialHandle.style.right=this.handlePos1+"px":this.materialHandle.style.left=this.handlePos1+"px"),"MinRange"!==this.type||t.isNullOrUndefined(this.rangeBar)?"Range"!==this.type||t.isNullOrUndefined(this.secondHandle)||t.isNullOrUndefined(this.rangeBar)||(this.enableRtl?(this.secondHandle.style.right=this.handlePos2+"px",this.rangeBar.style.right=this.handlePos1+"px"):(this.secondHandle.style.left=this.handlePos2+"px",this.rangeBar.style.left=this.handlePos1+"px"),t.setStyleAttribute(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",t.setStyleAttribute(this.rangeBar,{width:t.isNullOrUndefined(this.handlePos1)?0:this.handlePos1+"px"}))):(this.firstHandle.style.bottom=this.handlePos1+"px",this.isMaterialTooltip&&(this.materialHandle.style.bottom=this.handlePos1+"px"),"MinRange"===this.type?(this.rangeBar.style.bottom=this.min>this.max?this.handlePos1+"px":"0px",t.setStyleAttribute(this.rangeBar,{height:t.isNullOrUndefined(this.handlePos1)?0:this.min>this.max?this.element.clientHeight-this.handlePos1+"px":this.handlePos1+"px"})):"Range"===this.type&&(this.secondHandle.style.bottom=this.handlePos2+"px",this.rangeBar.style.bottom=this.min>this.max?this.handlePos2+"px":this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{height:this.min>this.max?this.handlePos1-this.handlePos2+"px":this.handlePos2-this.handlePos1+"px"}))),this.limits.enabled&&this.setLimitBar(),"None"!==this.ticks.placement&&this.ul&&(this.removeElement(this.ul),this.ul=void 0,this.renderScale()),this.handleStart(),this.tooltip.isVisible||setTimeout(function(){t.isNullOrUndefined(e.firstHandle)||(e.firstHandle.style.transition=e.scaleTransform),"Range"!==e.type||t.isNullOrUndefined(e.secondHandle)||(e.secondHandle.style.transition=e.scaleTransform)}),this.refreshTooltip(this.tooltipTarget),this.setBarColor()},s.prototype.changeHandleValue=function(e,t){var i=null;1===this.activeHandle?(this.limits.enabled&&this.limits.startHandleFixed||(this.handleVal1=this.checkHandleValue(e),this.handlePos1=this.checkHandlePosition(this.handleVal1),"Range"===this.type&&(this.handlePos1>this.handlePos2&&this.min<this.max||this.handlePos1<this.handlePos2&&this.min>this.max)&&(this.handlePos1=this.handlePos2,this.handleVal1=this.handleVal2),this.handlePos1!==this.preHandlePos1&&(i=this.preHandlePos1=this.handlePos1)),this.modifyZindex()):(this.limits.enabled&&this.limits.endHandleFixed||(this.handleVal2=this.checkHandleValue(e),this.handlePos2=this.checkHandlePosition(this.handleVal2),"Range"===this.type&&(this.handlePos2<this.handlePos1&&this.min<this.max||this.handlePos2>this.handlePos1&&this.min>this.max)&&(this.handlePos2=this.handlePos1,this.handleVal2=this.handleVal1),this.handlePos2!==this.preHandlePos2&&(i=this.preHandlePos2=this.handlePos2)),this.modifyZindex()),null!==i&&("Default"!==this.type&&this.setRangeBar(),this.setHandlePosition(t))},s.prototype.tempStartEnd=function(){return this.min>this.max?{start:this.max,end:this.min}:{start:this.min,end:this.max}},s.prototype.xyToPosition=function(e){if(this.min===this.max)return 100;if("Horizontal"===this.orientation){var t=e.x-this.element.getBoundingClientRect().left,i=this.element.offsetWidth/100;this.val=t/i}else{var s=e.y-this.element.getBoundingClientRect().top,i=this.element.offsetHeight/100;this.val=100-s/i}var n=this.stepValueCalculation(this.val);return n<0?n=0:n>100&&(n=100),this.enableRtl&&"Vertical"!==this.orientation&&(n=100-n),"Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(n/100):this.element.getBoundingClientRect().height*(n/100)},s.prototype.stepValueCalculation=function(e){0===this.step&&(this.step=1);var i=parseFloat(t.formatUnit(this.step))/((parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min)))/100),s=e%Math.abs(i);return 0!==s&&(i/2>s?e-=s:e+=Math.abs(i)-s),e},s.prototype.add=function(e,t,i){var s=Math.pow(10,3);return i?(Math.round(e*s)+Math.round(t*s))/s:(Math.round(e*s)-Math.round(t*s))/s},s.prototype.positionToValue=function(e){var i,s=parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min));return i="Horizontal"===this.orientation?e/this.element.getBoundingClientRect().width*s:e/this.element.getBoundingClientRect().height*s,this.add(i,parseFloat(this.min.toString()),!0)},s.prototype.sliderBarClick=function(e){e.preventDefault();var t;"mousedown"===e.type||"mouseup"===e.type||"click"===e.type?t={x:e.clientX,y:e.clientY}:"touchend"!==e.type&&"touchstart"!==e.type||(t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY});var i=this.xyToPosition(t),s=this.positionToValue(i);if("Range"===this.type&&(this.min<this.max&&this.handlePos2-i<i-this.handlePos1||this.min>this.max&&this.handlePos1-i>i-this.handlePos2))this.activeHandle=2,this.limits.enabled&&this.limits.endHandleFixed||(this.limits.enabled&&(s=(n=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd))[0],i=n[1]),this.secondHandle.classList.add(Ee.sliderActiveHandle),this.handlePos2=this.preHandlePos2=i,this.handleVal2=s),this.modifyZindex(),this.secondHandle.focus();else{if(this.activeHandle=1,!this.limits.enabled||!this.limits.startHandleFixed){if(this.limits.enabled){var n=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd);s=n[0],i=n[1]}this.firstHandle.classList.add(Ee.sliderActiveHandle),this.handlePos1=this.preHandlePos1=i,this.handleVal1=s}this.modifyZindex(),this.firstHandle.focus()}this.isMaterialTooltip&&this.tooltipElement.classList.add(Ee.materialTooltipActive);var a=this.element.querySelector("."+Ee.sliderTabHandle);a&&this.getHandle()!==a&&a.classList.remove(Ee.sliderTabHandle);var r=1===this.activeHandle?this.firstHandle:this.secondHandle;if(("click"===e.type||"mousedown"===e.type)&&e.target===r){var l=e.clientX,o=e.clientY;document.elementFromPoint(l,o)}if(this.checkRepeatedValue(s)){var h=(this.isMaterial||this.isMaterial3)&&this.tooltip.isVisible?this.transitionOnMaterialTooltip:this.transition;this.getHandle().style.transition=h.handle,"Default"!==this.type&&(this.rangeBar.style.transition=h.rangeBar),this.setHandlePosition(e),this.isMaterialTooltip&&(this.initialTooltip=!1),e.target!==r&&this.changeEvent("changed",e),"Default"!==this.type&&this.setRangeBar()}},s.prototype.handleValueAdjust=function(e,t,i){1===i?(this.handleVal1=t,this.handleVal2=this.handleVal1+this.minDiff):2===i&&(this.handleVal2=t,this.handleVal1=this.handleVal2-this.minDiff),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2)},s.prototype.dragRangeBarMove=function(e){var t,i;"touchmove"!==e.type&&e.preventDefault(),this.rangeBarDragged=!0;var s;this.rangeBar.style.transition="none",this.firstHandle.style.transition="none",this.secondHandle.style.transition="none";var n,a;if("mousemove"===e.type?(n=(t=[e.clientX,e.clientY])[0],a=t[1]):(n=(i=[e.changedTouches[0].clientX,e.changedTouches[0].clientY])[0],a=i[1]),!(this.limits.enabled&&this.limits.startHandleFixed||this.limits.enabled&&this.limits.endHandleFixed)){if(s=this.enableRtl?{x:n+this.secondPartRemain,y:a+this.secondPartRemain}:{x:n-this.firstPartRemain,y:a+this.secondPartRemain},this.min>this.max?(this.handlePos2=this.xyToPosition(s),this.handleVal2=this.positionToValue(this.handlePos2)):(this.handlePos1=this.xyToPosition(s),this.handleVal1=this.positionToValue(this.handlePos1)),s=this.enableRtl?{x:n-this.firstPartRemain,y:a-this.firstPartRemain}:{x:n+this.secondPartRemain,y:a-this.firstPartRemain},this.min>this.max?(this.handlePos1=this.xyToPosition(s),this.handleVal1=this.positionToValue(this.handlePos1)):(this.handlePos2=this.xyToPosition(s),this.handleVal2=this.positionToValue(this.handlePos2)),this.limits.enabled){var r=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=r[0],this.handlePos1=r[1],this.handleVal1===this.limits.minEnd&&this.handleValueAdjust(this.handleVal1,this.limits.minEnd,1),this.handleVal1===this.limits.minStart&&this.handleValueAdjust(this.handleVal1,this.limits.minStart,1),r=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=r[0],this.handlePos2=r[1],this.handleVal2===this.limits.maxStart&&this.handleValueAdjust(this.handleVal2,this.limits.maxStart,2),this.handleVal2===this.limits.maxEnd&&this.handleValueAdjust(this.handleVal2,this.limits.maxEnd,2)}this.handleVal2===(this.min>this.max?this.min:this.max)&&this.handleValueAdjust(this.handleVal2,this.min>this.max?this.min:this.max,2),this.handleVal1===(this.min>this.max?this.max:this.min)&&this.handleValueAdjust(this.handleVal1,this.min>this.max?this.max:this.min,1)}this.activeHandle=1,this.setHandlePosition(e),this.activeHandle=2,this.setHandlePosition(e),this.tooltipToggle(this.rangeBar),this.setRangeBar()},s.prototype.sliderBarUp=function(e){this.changeEvent("changed",e),this.handleFocusOut(),this.firstHandle.classList.remove(Ee.sliderActiveHandle),"Range"===this.type&&(this.initialTooltip=!1,this.secondHandle.classList.remove(Ee.sliderActiveHandle)),this.closeTooltip(),(this.isMaterial||this.isMaterial3)&&(this.getHandle().classList.remove("e-large-thumb-size"),this.isMaterialTooltip&&this.tooltipElement.classList.remove(Ee.materialTooltipActive)),t.EventHandler.remove(document,"mousemove touchmove",this.sliderBarMove),t.EventHandler.remove(document,"mouseup touchend",this.sliderBarUp)},s.prototype.sliderBarMove=function(e){"touchmove"!==e.type&&e.preventDefault();var t;t="mousemove"===e.type?{x:e.clientX,y:e.clientY}:{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};var i=this.xyToPosition(t),s=this.positionToValue(i);if(i=Math.round(i),"Range"!==this.type&&1===this.activeHandle){if(!this.limits.enabled||!this.limits.startHandleFixed){if(this.limits.enabled){var n=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd);i=n[1],s=n[0]}this.handlePos1=i,this.handleVal1=s}this.firstHandle.classList.add(Ee.sliderActiveHandle)}if("Range"===this.type)if(1===this.activeHandle)this.firstHandle.classList.add(Ee.sliderActiveHandle),this.limits.enabled&&this.limits.startHandleFixed||((this.min<this.max&&i>this.handlePos2||this.min>this.max&&i<this.handlePos2)&&(i=this.handlePos2,s=this.handleVal2),i!==this.preHandlePos1&&(this.limits.enabled&&(s=(a=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd))[0],i=a[1]),this.handlePos1=this.preHandlePos1=i,this.handleVal1=s,this.activeHandle=1));else if(2===this.activeHandle&&(this.secondHandle.classList.add(Ee.sliderActiveHandle),!(this.limits.enabled&&this.limits.endHandleFixed||((this.min<this.max&&i<this.handlePos1||this.min>this.max&&i>this.handlePos1)&&(i=this.handlePos1,s=this.handleVal1),i===this.preHandlePos2)))){if(this.limits.enabled){var a=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd);s=a[0],i=a[1]}this.handlePos2=this.preHandlePos2=i,this.handleVal2=s,this.activeHandle=2}this.checkRepeatedValue(s)&&(this.getHandle().style.transition=this.scaleTransform,"Default"!==this.type&&(this.rangeBar.style.transition="none"),this.setHandlePosition(e),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Ee.sliderTabHandle)||this.materialChange(),this.tooltipToggle(this.getHandle()),"Default"!==this.type&&this.setRangeBar())},s.prototype.dragRangeBarUp=function(e){this.rangeBarDragged?this.isDragComplete=!0:(this.focusSliderElement(),this.sliderBarClick(e)),this.changeEvent("changed",e),this.closeTooltip(),t.EventHandler.remove(document,"mousemove touchmove",this.dragRangeBarMove),t.EventHandler.remove(document,"mouseup touchend",this.dragRangeBarUp),this.rangeBarDragged=!1},s.prototype.checkRepeatedValue=function(e){if("Range"===this.type){if(e===(this.enableRtl&&"Vertical"!==this.orientation?1===this.activeHandle?this.previousVal[1]:this.previousVal[0]:1===this.activeHandle?this.previousVal[0]:this.previousVal[1]))return 0}else if(e===this.previousVal)return 0;return 1},s.prototype.refreshTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&(this.tooltipValue(),e&&(this.tooltipObj.refresh(e),this.tooltipTarget=e))},s.prototype.openTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.open(e),this.tooltipTarget=e)},s.prototype.closeTooltip=function(){this.tooltip.isVisible&&this.tooltipObj&&"Always"!==this.tooltip.showOn&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.close(),this.tooltipTarget=void 0)},s.prototype.keyDown=function(e){switch(e.keyCode){case 37:case 38:case 39:case 40:case 33:case 34:case 36:case 35:e.preventDefault(),this.buttonClick(e)}},s.prototype.wireButtonEvt=function(e){e?(t.EventHandler.remove(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut),t.EventHandler.remove(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut),t.EventHandler.remove(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse),t.EventHandler.remove(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),t.EventHandler.remove(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse),t.EventHandler.remove(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),t.EventHandler.remove(this.firstBtn,"focusout",this.sliderFocusOut),t.EventHandler.remove(this.secondBtn,"focusout",this.sliderFocusOut)):(t.EventHandler.add(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut,this),t.EventHandler.add(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut,this),t.EventHandler.add(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse,this),t.EventHandler.add(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),t.EventHandler.add(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse,this),t.EventHandler.add(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),t.EventHandler.add(this.firstBtn,"focusout",this.sliderFocusOut,this),t.EventHandler.add(this.secondBtn,"focusout",this.sliderFocusOut,this))},s.prototype.rangeBarMousedown=function(e){var i,s;if(e.preventDefault(),this.focusSliderElement(),"Range"===this.type&&this.drag&&e.target===this.rangeBar){var n=void 0,a=void 0;"mousedown"===e.type?(n=(i=[e.clientX,e.clientY])[0],a=i[1]):"touchstart"===e.type&&(n=(s=[e.changedTouches[0].clientX,e.changedTouches[0].clientY])[0],a=s[1]),"Horizontal"===this.orientation?(this.firstPartRemain=n-this.rangeBar.getBoundingClientRect().left,this.secondPartRemain=this.rangeBar.getBoundingClientRect().right-n):(this.firstPartRemain=a-this.rangeBar.getBoundingClientRect().top,this.secondPartRemain=this.rangeBar.getBoundingClientRect().bottom-a),this.minDiff=this.handleVal2-this.handleVal1,this.tooltipToggle(this.rangeBar);var r=this.element.querySelector("."+Ee.sliderTabHandle);r&&r.classList.remove(Ee.sliderTabHandle),t.EventHandler.add(document,"mousemove touchmove",this.dragRangeBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.dragRangeBarUp,this)}},s.prototype.elementClick=function(e){if(this.isDragComplete)return void(this.isDragComplete=!1);e.preventDefault(),this.focusSliderElement(),this.sliderBarClick(e),this.focusHandle()},s.prototype.wireEvents=function(){this.onresize=this.reposition.bind(this),window.addEventListener("resize",this.onresize),this.enabled&&!this.readonly&&(t.EventHandler.add(this.element,"click",this.elementClick,this),"Range"===this.type&&this.drag&&t.EventHandler.add(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown,this),t.EventHandler.add(this.sliderContainer,"keydown",this.keyDown,this),t.EventHandler.add(this.sliderContainer,"keyup",this.keyUp,this),t.EventHandler.add(this.element,"focusout",this.sliderFocusOut,this),t.EventHandler.add(this.sliderContainer,"mouseover mouseout touchstart touchend",this.hover,this),this.wireFirstHandleEvt(!1),"Range"===this.type&&this.wireSecondHandleEvt(!1),this.showButtons&&this.wireButtonEvt(!1),this.wireMaterialTooltipEvent(!1),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this))},s.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.elementClick),"Range"===this.type&&this.drag&&t.EventHandler.remove(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown),t.EventHandler.remove(this.sliderContainer,"keydown",this.keyDown),t.EventHandler.remove(this.sliderContainer,"keyup",this.keyUp),t.EventHandler.remove(this.element,"focusout",this.sliderFocusOut),t.EventHandler.remove(this.sliderContainer,"mouseover mouseout touchstart touchend",this.hover),this.wireFirstHandleEvt(!0),"Range"===this.type&&this.wireSecondHandleEvt(!0),this.showButtons&&this.wireButtonEvt(!0),this.wireMaterialTooltipEvent(!0),t.EventHandler.remove(this.element,"reset",this.formResetHandler)},s.prototype.formResetHandler=function(){this.setProperties({value:this.formResetValue},!0),this.setValue()},s.prototype.keyUp=function(e){if(9===e.keyCode&&e.target.classList.contains(Ee.sliderHandle)&&(this.focusSliderElement(),!e.target.classList.contains(Ee.sliderTabHandle))){this.element.querySelector("."+Ee.sliderTabHandle)&&this.element.querySelector("."+Ee.sliderTabHandle).classList.remove(Ee.sliderTabHandle),e.target.classList.add(Ee.sliderTabHandle);var t=e.target.parentElement;if(t===this.element&&(t.querySelector("."+Ee.sliderTrack).classList.add(Ee.sliderTabTrack),"Range"!==this.type&&"MinRange"!==this.type||t.querySelector("."+Ee.rangeBar).classList.add(Ee.sliderTabRange)),"Range"===this.type){var i=e.target.previousSibling;i&&i.classList.contains(Ee.sliderHandle)?this.activeHandle=2:this.activeHandle=1}this.getHandle().focus(),this.tooltipToggle(this.getHandle())}this.closeTooltip(),this.changeEvent("changed",e)},s.prototype.hover=function(e){if(!t.isNullOrUndefined(e))if("mouseover"===e.type||"touchmove"===e.type||"mousemove"===e.type||"pointermove"===e.type||"touchstart"===e.type)this.sliderContainer.classList.add(Ee.sliderHover);else{this.sliderContainer.classList.remove(Ee.sliderHover);var i=e.currentTarget;this.tooltip.isVisible&&"Always"!==this.tooltip.showOn&&this.tooltipObj&&this.isMaterialTooltip&&!i.classList.contains(Ee.sliderHandleFocused)&&!i.classList.contains(Ee.sliderTabHandle)&&this.closeMaterialTooltip()}},s.prototype.sliderFocusOut=function(e){e.relatedTarget!==this.secondHandle&&e.relatedTarget!==this.firstHandle&&e.relatedTarget!==this.element&&e.relatedTarget!==this.firstBtn&&e.relatedTarget!==this.secondBtn&&(this.closeMaterialTooltip(),this.closeTooltip(),this.element.querySelector("."+Ee.sliderTabHandle)&&this.element.querySelector("."+Ee.sliderTabHandle).classList.remove(Ee.sliderTabHandle),this.element.querySelector("."+Ee.sliderTabTrack)&&(this.element.querySelector("."+Ee.sliderTabTrack).classList.remove(Ee.sliderTabTrack),"Range"!==this.type&&"MinRange"!==this.type||!this.element.querySelector("."+Ee.sliderTabRange)||this.element.querySelector("."+Ee.sliderTabRange).classList.remove(Ee.sliderTabRange)),this.hiddenInput.focus(),this.hiddenInput.blur(),this.isElementFocused=!1)},s.prototype.removeElement=function(e){e.parentNode&&e.parentNode.removeChild(e)},s.prototype.changeSliderType=function(e,i){this.isMaterialTooltip&&this.materialHandle&&(this.sliderContainer.classList.remove(Ee.materialSlider),this.removeElement(this.materialHandle),this.materialHandle=void 0),this.removeElement(this.firstHandle),this.firstHandle=void 0,"Default"!==e&&("Range"===e&&(this.removeElement(this.secondHandle),this.secondHandle=void 0),this.removeElement(this.rangeBar),this.rangeBar=void 0),this.tooltip.isVisible&&!t.isNullOrUndefined(this.tooltipObj)&&(this.tooltipObj.destroy(),this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0),this.limits.enabled&&("MinRange"===e||"Default"===e?t.isNullOrUndefined(this.limitBarFirst)||(this.removeElement(this.limitBarFirst),this.limitBarFirst=void 0):t.isNullOrUndefined(this.limitBarSecond)||(this.removeElement(this.limitBarSecond),this.limitBarSecond=void 0)),this.activeHandle=1,this.getThemeInitialization(),"Range"===this.type&&this.rangeValueUpdate(),this.createRangeBar(),this.limits.enabled&&this.createLimitBar(),this.setHandler(),this.setOrientClass(),this.wireFirstHandleEvt(!this.enabled),"Range"===this.type&&this.wireSecondHandleEvt(!this.enabled),this.setValue(),this.tooltip.isVisible&&(this.renderTooltip(),this.wireMaterialTooltipEvent(!1)),this.setBarColor(),"tooltip"!==i&&this.updateConfig(),this.readonly&&(this.sliderContainer.classList.remove(Ee.readonly),this.setReadOnly())},s.prototype.changeRtl=function(){if(this.enableRtl||"Range"!==this.type||(this.value=[this.handleVal2,this.handleVal1]),this.updateConfig(),this.tooltip.isVisible&&this.tooltipObj.refresh(this.firstHandle),this.showButtons){var e=this.enableRtl&&"Vertical"!==this.orientation;t.attributes(e?this.secondBtn:this.firstBtn,{"aria-label":"Decrease",title:"Decrease"}),t.attributes(e?this.firstBtn:this.secondBtn,{"aria-label":"Increase",title:"Increase"})}},s.prototype.changeOrientation=function(){this.changeSliderType(this.type,"null")},s.prototype.updateConfig=function(){this.setEnableRTL(),this.setValue(),this.tooltip.isVisible&&this.refreshTooltip(this.tooltipTarget),"None"!==this.ticks.placement&&this.ul&&(this.removeElement(this.ul),this.ul=void 0,this.renderScale()),this.limitsPropertyChange()},s.prototype.limitsPropertyChange=function(){this.limits.enabled?(t.isNullOrUndefined(this.limitBarFirst)&&"Range"!==this.type&&this.createLimitBar(),t.isNullOrUndefined(this.limitBarFirst)&&t.isNullOrUndefined(this.limitBarSecond)&&"Range"===this.type&&this.createLimitBar(),this.setLimitBar(),this.setValue()):(t.isNullOrUndefined(this.limitBarFirst)||t.detach(this.limitBarFirst),t.isNullOrUndefined(this.limitBarSecond)||t.detach(this.limitBarSecond))},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.unwireEvents(),window.removeEventListener("resize",this.onresize),t.removeClass([this.sliderContainer],[Ee.sliderDisabled]),this.firstHandle.removeAttribute("aria-orientation"),"Range"===this.type&&this.secondHandle.removeAttribute("aria-orientation"),this.sliderContainer.parentNode&&this.sliderContainer.parentNode.insertBefore(this.element,this.sliderContainer),t.detach(this.sliderContainer),this.tooltip.isVisible&&this.tooltipObj.destroy(),this.element.innerHTML="",this.hiddenInput=null,this.sliderContainer=null,this.sliderTrack=null,this.rangeBar=null,this.firstHandle=null,this.secondHandle=null,this.tickElementCollection=null,this.ul=null,this.firstBtn=null,this.secondBtn=null,this.materialHandle=null,this.tooltipObj=null,this.tooltipTarget=null,this.limitBarFirst=null,this.limitBarSecond=null,this.firstChild=null,this.lastChild=null,this.tooltipElement=null},s.prototype.onPropertyChanged=function(e,i){for(var s=this,n=0,a=Object.keys(e);n<a.length;n++){var r=a[n];switch(r){case"cssClass":this.setCSSClass(i.cssClass);break;case"value":if(e&&i){var l=t.isNullOrUndefined(e.value)?"Range"===this.type?[this.min,this.max]:this.min:e.value;this.setProperties({value:l},!0),t.isNullOrUndefined(i.value)||i.value.toString()===l.toString()||(this.setValue(),this.refreshTooltip(this.tooltipTarget),"Range"===this.type&&(t.isNullOrUndefined(e.value)||i.value[1]===l[1]?this.activeHandle=1:this.activeHandle=2))}break;case"min":case"step":case"max":this.setMinMaxValue();break;case"tooltip":t.isNullOrUndefined(e.tooltip)||t.isNullOrUndefined(i.tooltip)||(this.initialTooltip=!0,this.setTooltip(r),this.showButtons||this.wireEvents());break;case"type":t.isNullOrUndefined(i)||!Object.keys(i).length||t.isNullOrUndefined(i.type)||(this.changeSliderType(i.type,r),this.setZindex());break;case"enableRtl":i.enableRtl!==e.enableRtl&&"Vertical"!==this.orientation&&(this.rtl=i.enableRtl,this.changeRtl());break;case"limits":this.limitsPropertyChange();break;case"orientation":this.changeOrientation();break;case"ticks":t.isNullOrUndefined(this.sliderContainer.querySelector("."+Ee.scale))||(t.detach(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,function(e){e.match(/e-scale-/)&&s.sliderContainer.classList.remove(e)})),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex());break;case"locale":this.showButtons&&this.buttonTitle();break;case"showButtons":e.showButtons?(this.setButtons(),this.reposition(),this.enabled&&!this.readonly&&this.wireButtonEvt(!1)):this.firstBtn&&this.secondBtn&&(this.sliderContainer.removeChild(this.firstBtn),this.sliderContainer.removeChild(this.secondBtn),this.sliderContainer.classList.remove(Ee.sliderButtonClass),this.firstBtn=void 0,this.secondBtn=void 0,this.reposition());break;case"enabled":this.setEnabled();break;case"readonly":this.setReadOnly();break;case"customValues":this.setValue(),this.reposition();break;case"colorRange":this.reposition();break;case"width":this.setElementWidth(e.width),this.setMinMaxValue(),this.limits&&this.limitsPropertyChange()}}},s.prototype.setReadOnly=function(){this.readonly?(this.unwireEvents(),this.sliderContainer.classList.add(Ee.readonly)):(this.wireEvents(),this.sliderContainer.classList.remove(Ee.readonly))},s.prototype.setMinMaxValue=function(){var e=this;this.setValue(),this.refreshTooltip(this.tooltipTarget),t.isNullOrUndefined(this.sliderContainer.querySelector("."+Ee.scale))||this.ul&&(t.detach(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,function(t){t.match(/e-scale-/)&&e.sliderContainer.classList.remove(t)})),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex())},s.prototype.setZindex=function(){this.zIndex=6,t.isNullOrUndefined(this.ticks)||"None"===this.ticks.placement||t.isNullOrUndefined(this.ul)||t.isNullOrUndefined(this.element)||(this.ul.style.zIndex=this.zIndex+-7+"",this.element.style.zIndex=this.zIndex+2+""),this.isMaterial||this.isMaterial3||t.isNullOrUndefined(this.ticks)||"Both"!==this.ticks.placement||(this.element.style.zIndex=this.zIndex+2+""),t.isNullOrUndefined(this.firstHandle)||(this.firstHandle.style.zIndex=this.zIndex+3+""),"Range"!==this.type||t.isNullOrUndefined(this.secondHandle)||(this.secondHandle.style.zIndex=this.zIndex+4+"")},s.prototype.setTooltip=function(e){this.changeSliderType(this.type,e)},s.prototype.setBarColor=function(){for(var e,i,s=this.sliderTrack.lastElementChild;s;)this.sliderTrack.removeChild(s),s=this.sliderTrack.lastElementChild;for(var n=0;n<this.colorRange.length;n++)if(!t.isNullOrUndefined(this.colorRange[n].start)&&!t.isNullOrUndefined(this.colorRange[n].end)&&this.colorRange[n].end>this.colorRange[n].start){this.colorRange[n].start<this.min&&(this.colorRange[n].start=this.min),this.colorRange[n].end>this.max&&(this.colorRange[n].end=this.max);var a=this.checkHandlePosition(this.colorRange[n].start),r=this.checkHandlePosition(this.colorRange[n].end),l=this.createElement("div");l.style.backgroundColor=this.colorRange[n].color,l.style.border="1px solid "+this.colorRange[n].color,"Horizontal"===this.orientation?(i=Ee.sliderHorizantalColor,e=this.enableRtl?t.isNullOrUndefined(this.customValues)?this.checkHandlePosition(this.max)-this.checkHandlePosition(this.colorRange[n].end):this.checkHandlePosition(this.customValues.length-this.colorRange[n].end-1):this.checkHandlePosition(this.colorRange[n].start),l.style.width=r-a+"px",l.style.left=e+"px"):(i=Ee.sliderVerticalColor,e=this.checkHandlePosition(this.colorRange[n].start),l.style.height=r-a+"px",l.style.bottom=e+"px"),l.classList.add(i),this.sliderTrack.appendChild(l)}},s.prototype.getModuleName=function(){return"slider"},ve([t.Property(null)],s.prototype,"value",void 0),ve([t.Property(null)],s.prototype,"customValues",void 0),ve([t.Property(1)],s.prototype,"step",void 0),ve([t.Property(null)],s.prototype,"width",void 0),ve([t.Property(0)],s.prototype,"min",void 0),ve([t.Property(100)],s.prototype,"max",void 0),ve([t.Property(!1)],s.prototype,"readonly",void 0),ve([t.Property("Default")],s.prototype,"type",void 0),ve([t.Collection([{}],ye)],s.prototype,"colorRange",void 0),ve([t.Complex({},ge)],s.prototype,"ticks",void 0),ve([t.Complex({},be)],s.prototype,"limits",void 0),ve([t.Property(!0)],s.prototype,"enabled",void 0),ve([t.Complex({},Ce)],s.prototype,"tooltip",void 0),ve([t.Property(!1)],s.prototype,"showButtons",void 0),ve([t.Property(!0)],s.prototype,"enableAnimation",void 0),ve([t.Property("Horizontal")],s.prototype,"orientation",void 0),ve([t.Property("")],s.prototype,"cssClass",void 0),ve([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),ve([t.Event()],s.prototype,"created",void 0),ve([t.Event()],s.prototype,"change",void 0),ve([t.Event()],s.prototype,"changed",void 0),ve([t.Event()],s.prototype,"renderingTicks",void 0),ve([t.Event()],s.prototype,"renderedTicks",void 0),ve([t.Event()],s.prototype,"tooltipChange",void 0),s=ve([t.NotifyPropertyChanges],s)}(t.Component),Te=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Se=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Pe={EMAIL:new RegExp("^[A-Za-z0-9._%+-]{1,}@[A-Za-z0-9._%+-]{1,}([.]{1}[a-zA-Z0-9]{2,}|[.]{1}[a-zA-Z0-9]{2,4}[.]{1}[a-zA-Z0-9]{2,4})$"),URL:/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/m,DATE_ISO:new RegExp("^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"),DIGITS:new RegExp("^[0-9]*$"),PHONE:new RegExp("^[+]?[0-9]{9,13}$"),CREDITCARD:new RegExp("^\\d{13,16}$")};!function(e){e[e.Message=0]="Message",e[e.Label=1]="Label"}(e.ErrorOption||(e.ErrorOption={}));var Oe=function(i){function s(e,s){var n=i.call(this,s,e)||this;if(n.validated=[],n.errorRules=[],n.allowSubmit=!1,n.required="required",n.infoElement=null,n.inputElement=null,n.selectQuery="input:not([type=reset]):not([type=button]), select, textarea",n.localyMessage={},n.defaultMessages={required:"This field is required.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateIso:"Please enter a valid date ( ISO ).",creditcard:"Please enter valid card number",number:"Please enter a valid number.",digits:"Please enter only digits.",maxLength:"Please enter no more than {0} characters.",minLength:"Please enter at least {0} characters.",rangeLength:"Please enter a value between {0} and {1} characters long.",range:"Please enter a value between {0} and {1}.",max:"Please enter a value less than or equal to {0}.",min:"Please enter a value greater than or equal to {0}.",regex:"Please enter a correct value.",tel:"Please enter a valid phone number.",pattern:"Please enter a correct pattern value.",equalTo:"Please enter the valid match text"},void 0===n.rules&&(n.rules={}),n.l10n=new t.L10n("formValidator",n.defaultMessages,n.locale),n.locale&&n.localeFunc(),t.onIntlChange.on("notifyExternalChange",n.afterLocalization,n),e="string"==typeof e?t.select(e,document):e,null!=n.element)return n.element.setAttribute("novalidate",""),n.inputElements=t.selectAll(n.selectQuery,n.element),n.createHTML5Rules(),n.wireEvents(),n}Te(s,i),n=s,s.prototype.addRules=function(e,i){e&&(this.rules.hasOwnProperty(e)?t.extend(this.rules[""+e],i,{}):this.rules[""+e]=i)},s.prototype.removeRules=function(e,i){if(e||i)if(this.rules[""+e]&&!i)delete this.rules[""+e];else{if(t.isNullOrUndefined(this.rules[""+e]&&i))return;for(var s=0;s<i.length;s++)delete this.rules[""+e][i[parseInt(s.toString(),10)]]}else this.rules={}},s.prototype.validate=function(e){var t=Object.keys(this.rules);if(e&&t.length)return this.validateRules(e),-1!==t.indexOf(e)&&0===this.errorRules.filter(function(t){return t.name===e}).length;this.errorRules=[];for(var i=0,s=t;i<s.length;i++){var n=s[i];this.validateRules(n)}return 0===this.errorRules.length},s.prototype.reset=function(){this.element.reset(),this.clearForm()},s.prototype.getInputElement=function(e){return this.inputElement=t.select('[name="'+e+'"]',this.element),this.inputElement},s.prototype.destroy=function(){this.reset(),this.unwireEvents(),this.rules={};for(var e=0,s=t.selectAll("."+this.errorClass+", ."+this.validClass,this.element);e<s.length;e++){var n=s[e];t.detach(n)}i.prototype.destroy.call(this),this.infoElement=null,t.onIntlChange.off("notifyExternalChange",this.afterLocalization)},s.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"locale":this.localeFunc()}},s.prototype.localeFunc=function(){for(var e=0,t=Object.keys(this.defaultMessages);e<t.length;e++){var i=t[e];this.l10n.setLocale(this.locale);var s=this.l10n.getConstant(i);this.localyMessage[""+i]=s}},s.prototype.getModuleName=function(){return"formvalidator"},s.prototype.afterLocalization=function(e){this.locale=e.locale,this.localeFunc()},s.prototype.refresh=function(){this.unwireEvents(),this.inputElements=t.selectAll(this.selectQuery,this.element),this.wireEvents()},s.prototype.clearForm=function(){this.errorRules=[],this.validated=[];for(var e=0,i=t.selectAll(this.selectQuery,this.element);e<i.length;e++){var s=i[e];s.removeAttribute("aria-invalid");var n=s.parentElement,a=n.parentElement;n.classList.contains("e-control-wrapper")||n.classList.contains("e-wrapper")||s.classList.contains("e-input")&&n.classList.contains("e-input-group")?n.classList.remove(this.errorClass):null!=a&&(a.classList.contains("e-control-wrapper")||a.classList.contains("e-wrapper"))?a.classList.remove(this.errorClass):s.classList.remove(this.errorClass),s.name.length>0&&(this.getInputElement(s.name),this.getErrorElement(s.name),this.hideMessage(s.name)),n.classList.contains("e-control-wrapper")||n.classList.contains("e-wrapper")||s.classList.contains("e-input")&&n.classList.contains("e-input-group")?n.classList.remove(this.validClass):null!=a&&(a.classList.contains("e-control-wrapper")||a.classList.contains("e-wrapper"))?a.classList.remove(this.validClass):s.classList.remove(this.validClass)}},s.prototype.createHTML5Rules=function(){for(var e=["required","validateHidden","regex","rangeLength","maxLength","minLength","dateIso","digits","pattern","data-val-required","type","data-validation","min","max","range","equalTo","data-val-minlength-min","data-val-equalto-other","data-val-maxlength-max","data-val-range-min","data-val-regex-pattern","data-val-length-max","data-val-creditcard","data-val-phone"],t=["hidden","email","url","date","number","tel"],i=0,s=this.inputElements;i<s.length;i++){for(var n=s[i],a={},r=0,l=e;r<l.length;r++){var o=l[r];if(null!==n.getAttribute(o))switch(o){case"required":this.defRule(n,a,o,n.required);break;case"data-validation":o=n.getAttribute(o),this.defRule(n,a,o,!0);break;case"type":-1!==t.indexOf(n.type)&&this.defRule(n,a,n.type,!0);break;case"rangeLength":case"range":this.defRule(n,a,o,JSON.parse(n.getAttribute(o)));break;case"equalTo":var h=n.getAttribute(o);this.defRule(n,a,o,h);break;default:"true"===n.getAttribute("data-val")?this.annotationRule(n,a,o,n.getAttribute(o)):this.defRule(n,a,o,n.getAttribute(o))}}0!==Object.keys(a).length&&this.addRules(n.name,a)}},s.prototype.annotationRule=function(e,t,i,s){var n=i.split("-"),a=["required","creditcard","phone","maxlength","minlength","range","regex","equalto"],r=n[n.length-1],l=n[n.length-2];if(-1!==a.indexOf(r))switch(r){case"required":this.defRule(e,t,"required",s);break;case"creditcard":this.defRule(e,t,"creditcard",s);break;case"phone":this.defRule(e,t,"tel",s)}else if(-1!==a.indexOf(l))switch(l){case"maxlength":this.defRule(e,t,"maxLength",s);break;case"minlength":this.defRule(e,t,"minLength",s);break;case"range":var o=e.getAttribute("data-val-range-min"),h=e.getAttribute("data-val-range-max");this.defRule(e,t,"range",[o,h]);break;case"equalto":var p=e.getAttribute(i).split(".");this.defRule(e,t,"equalTo",p[p.length-1]);break;case"regex":this.defRule(e,t,"regex",s)}},s.prototype.defRule=function(e,t,i,s){var n,a=e.getAttribute("data-"+i+"-message"),r=e.getAttribute("data-val-"+i);this.rules[e.name]&&"validateHidden"!==i&&"hidden"!==i&&(this.getInputElement(e.name),n=this.getErrorMessage(this.rules[e.name][""+i],i)),a?s=[s,a]:r?s=[s,r]:n&&(s=[s,n]),t[""+i]=s},s.prototype.wireEvents=function(){for(var e=0,i=this.inputElements;e<i.length;e++){var s=i[e];n.isCheckable(s)?t.EventHandler.add(s,"click",this.clickHandler,this):"SELECT"===s.tagName?t.EventHandler.add(s,"change",this.changeHandler,this):(t.EventHandler.add(s,"focusout",this.focusOutHandler,this),t.EventHandler.add(s,"keyup",this.keyUpHandler,this))}t.EventHandler.add(this.element,"submit",this.submitHandler,this),t.EventHandler.add(this.element,"reset",this.resetHandler,this)},s.prototype.unwireEvents=function(){for(var e=0,i=this.inputElements;e<i.length;e++){var s=i[e];t.EventHandler.clearEvents(s)}t.EventHandler.remove(this.element,"submit",this.submitHandler),t.EventHandler.remove(this.element,"reset",this.resetHandler)},s.prototype.focusOutHandler=function(e){this.trigger("focusout",e);var t=e.target;this.rules[t.name]&&(this.rules[t.name][this.required]||t.value.length>0?this.validate(t.name):-1===this.validated.indexOf(t.name)&&this.validated.push(t.name))},s.prototype.keyUpHandler=function(e){this.trigger("keyup",e);var t=e.target,i=[16,17,18,20,35,36,37,38,39,40,45,144,225];(9!==e.which||this.rules[t.name]&&(!this.rules[t.name]||this.rules[t.name][this.required]))&&-1!==this.validated.indexOf(t.name)&&this.rules[t.name]&&-1===i.indexOf(e.which)&&this.validate(t.name)},s.prototype.clickHandler=function(e){this.trigger("click",e);var t=e.target;"submit"!==t.type?this.validate(t.name):null!==t.getAttribute("formnovalidate")&&(this.allowSubmit=!0)},s.prototype.changeHandler=function(e){this.trigger("change",e);var t=e.target;this.validate(t.name)},s.prototype.submitHandler=function(e){this.trigger("submit",e),this.allowSubmit||this.validate()?this.allowSubmit=!1:e.preventDefault()},s.prototype.resetHandler=function(){this.clearForm()},s.prototype.validateRules=function(e){if(this.rules[""+e]){var t=Object.keys(this.rules[""+e]),i=!1,s=!1,n=t.indexOf("validateHidden"),a=t.indexOf("hidden");if(this.getInputElement(e),-1!==a&&(i=!0),-1!==n&&(s=!0),!i||i&&s){-1!==n&&t.splice(n,1),-1!==a&&t.splice(a-1,1),this.getErrorElement(e);for(var r=0,l=t;r<l.length;r++){var o=l[r],h=this.getErrorMessage(this.rules[""+e][""+o],o),p={name:e,message:h},d={inputName:e,element:this.inputElement,message:h};if(!this.isValid(e,o)&&!this.inputElement.classList.contains(this.ignore)){this.removeErrorRules(e),this.errorRules.push(p),this.inputElement.setAttribute("aria-invalid","true"),this.inputElement.setAttribute("aria-describedby",this.inputElement.id+"-info");var u=this.inputElement.parentElement,c=u.parentElement;u.classList.contains("e-control-wrapper")||u.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&u.classList.contains("e-input-group")?(u.classList.add(this.errorClass),u.classList.remove(this.validClass)):null!=c&&(c.classList.contains("e-control-wrapper")||c.classList.contains("e-wrapper"))?(c.classList.add(this.errorClass),c.classList.remove(this.validClass)):(this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass)),this.infoElement?this.showMessage(p):this.createErrorElement(e,p.message,this.inputElement),d.errorElement=this.infoElement,d.status="failure",u.classList.contains("e-control-wrapper")||u.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&u.classList.contains("e-input-group")?(u.classList.add(this.errorClass),u.classList.remove(this.validClass)):null!=c&&(c.classList.contains("e-control-wrapper")||c.classList.contains("e-wrapper"))?(c.classList.add(this.errorClass),c.classList.remove(this.validClass)):(this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass)),this.optionalValidationStatus(e,d),this.trigger("validationComplete",d),"required"===o&&this.inputElement.setAttribute("aria-required","true");break}this.hideMessage(e),d.status="success",this.trigger("validationComplete",d)}}}},s.prototype.optionalValidationStatus=function(e,i){this.rules[""+e][this.required]||this.inputElement.value.length||t.isNullOrUndefined(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),i.status="",this.hideMessage(e))},s.prototype.isValid=function(e,i){var s=this.rules[""+e][""+i],a=s instanceof Array&&"string"==typeof s[1]?s[0]:s,r=this.rules[""+e][""+i],l="min"!==i&&"max"!==i||!this.rules[""+e].date||"string"!=typeof this.rules[""+e].date?null:this.rules[""+e].date,o={value:this.inputElement.value,param:a,element:this.inputElement,formElement:this.element,format:l,culture:this.locale};return this.trigger("validationBegin",o),!o.param&&"required"===i||(r&&"function"==typeof r[0]?r[0].call(this,{element:this.inputElement,value:this.inputElement.value}):n.isCheckable(this.inputElement)?"required"!==i||t.selectAll('input[name="'+e+'"]:checked',this.element).length>0:n.checkValidator[""+i](o))},s.prototype.getErrorMessage=function(e,i){var s=this.inputElement.getAttribute("data-"+i+"-message")?this.inputElement.getAttribute("data-"+i+"-message"):e instanceof Array&&"string"==typeof e[1]?e[1]:0!==Object.keys(this.localyMessage).length?this.localyMessage[""+i]:this.defaultMessages[""+i],n=s.match(/{(\d)}/g);if(!t.isNullOrUndefined(n))for(var a=0;a<n.length;a++){var r=e instanceof Array?e[parseInt(a.toString(),10)]:e;s=s.replace(n[parseInt(a.toString(),10)],r)}return s},s.prototype.createErrorElement=function(i,s,n){var a=t.createElement(this.errorElement,{className:this.errorClass,innerHTML:s,attrs:{for:i}});if(this.errorOption===e.ErrorOption.Message&&(a.classList.remove(this.errorClass),a.classList.add("e-message"),a=t.createElement(this.errorContainer,{className:this.errorClass,innerHTML:a.outerHTML})),a.id=this.inputElement.name+"-info",this.element.querySelector('[data-valmsg-for="'+n.id+'"]'))this.element.querySelector('[data-valmsg-for="'+n.id+'"]').appendChild(a);else if(!0===n.hasAttribute("data-msg-containerid")){var r=n.getAttribute("data-msg-containerid");t.select("#"+r,this.element).appendChild(a)}else if(null!=this.customPlacement)this.customPlacement.call(this,this.inputElement,a);else{var l=this.inputElement.parentElement,o=l.parentElement;l.classList.contains("e-control-wrapper")||l.classList.contains("e-wrapper")?o.insertBefore(a,l.nextSibling):o.classList.contains("e-control-wrapper")||o.classList.contains("e-wrapper")?o.parentElement.insertBefore(a,o.nextSibling):l.insertBefore(a,this.inputElement.nextSibling)}a.style.display="block",this.getErrorElement(i),this.validated.push(i),this.checkRequired(i)},s.prototype.getErrorElement=function(e){return this.infoElement=t.select(this.errorElement+"."+this.errorClass,this.inputElement.parentElement),this.infoElement||(this.infoElement=t.select(this.errorElement+"."+this.errorClass+'[for="'+e+'"]',this.element)),this.infoElement},s.prototype.removeErrorRules=function(e){for(var t=0;t<this.errorRules.length;t++)this.errorRules[parseInt(t.toString(),10)].name===e&&this.errorRules.splice(t,1)},s.prototype.showMessage=function(e){this.infoElement.style.display="block",this.infoElement.innerHTML=e.message,this.checkRequired(e.name)},s.prototype.hideMessage=function(e){if(this.infoElement){this.infoElement.style.display="none",this.removeErrorRules(e);var t=this.inputElement.parentElement,i=t.parentElement;t.classList.contains("e-control-wrapper")||t.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&t.classList.contains("e-input-group")?(t.classList.add(this.validClass),t.classList.remove(this.errorClass)):null!=i&&(i.classList.contains("e-control-wrapper")||i.classList.contains("e-wrapper"))?(i.classList.add(this.validClass),i.classList.remove(this.errorClass)):(this.inputElement.classList.add(this.validClass),this.inputElement.classList.remove(this.errorClass)),this.inputElement.setAttribute("aria-invalid","false")}},s.prototype.checkRequired=function(e){this.rules[""+e][this.required]||this.inputElement.value.length||t.isNullOrUndefined(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),this.hideMessage(e))},s.isCheckable=function(e){var t=e.getAttribute("type");return t&&("checkbox"===t||"radio"===t||"submit"===t)};var n;return s.checkValidator={required:function(e){return isNaN(Date.parse(e.value))?e.value.toString().length>0:!isNaN(new Date(e.value).getTime())},email:function(e){return Pe.EMAIL.test(e.value)},url:function(e){return Pe.URL.test(e.value)},dateIso:function(e){return Pe.DATE_ISO.test(e.value)},tel:function(e){return Pe.PHONE.test(e.value)},creditcard:function(e){return Pe.CREDITCARD.test(e.value)},number:function(e){return!isNaN(Number(e.value))&&-1===String(e.value).indexOf(" ")},digits:function(e){return Pe.DIGITS.test(e.value)},maxLength:function(e){return e.value.length<=Number(e.param)},minLength:function(e){return e.value.length>=Number(e.param)},rangeLength:function(e){var t=e.param;return e.value.length>=t[0]&&e.value.length<=t[1]},range:function(e){var t=e.param;return!isNaN(Number(e.value))&&Number(e.value)>=t[0]&&Number(e.value)<=t[1]},date:function(e){if(t.isNullOrUndefined(e.param)||"string"!=typeof e.param||""===e.param)return!isNaN(new Date(e.value).getTime());var i=e.culture&&""!==e.culture?new t.Internationalization(e.culture):new t.Internationalization,s={format:e.param.toString(),type:"dateTime",skeleton:"yMd"},n=i.parseDate(e.value,s);return!t.isNullOrUndefined(n)&&n instanceof Date&&!isNaN(+n)},max:function(e){if(!isNaN(Number(e.value)))return+e.value<=+e.param;if(e.format&&""!==e.format){var i=e.culture&&""!==e.culture?new t.Internationalization(e.culture):new t.Internationalization,s={format:e.format.toString(),type:"dateTime",skeleton:"yMd"},n=i.parseDate(e.value,s),a="string"==typeof e.param?i.parseDate(JSON.parse(JSON.stringify(e.param)),s):e.param;return new Date(n).getTime()<=new Date(a).getTime()}return new Date(e.value).getTime()<=new Date(JSON.parse(JSON.stringify(e.param))).getTime()},min:function(e){if(isNaN(Number(e.value))){if(-1!==e.value.indexOf(",")){var i=e.value.replace(/,/g,"");return parseFloat(i)>=Number(e.param)}if(e.format&&""!==e.format){var s=e.culture&&""!==e.culture?new t.Internationalization(e.culture):new t.Internationalization,n={format:e.format.toString(),type:"dateTime",skeleton:"yMd"},a=s.parseDate(e.value,n),r="string"==typeof e.param?s.parseDate(JSON.parse(JSON.stringify(e.param)),n):e.param;return new Date(a).getTime()>=new Date(r).getTime()}return new Date(e.value).getTime()>=new Date(JSON.parse(JSON.stringify(e.param))).getTime()}return+e.value>=+e.param},regex:function(e){return new RegExp(e.param).test(e.value)},equalTo:function(e){var t=e.formElement.querySelector("#"+e.param);return e.param=t.value,e.param===e.value}},Se([t.Property("")],s.prototype,"locale",void 0),Se([t.Property("e-hidden")],s.prototype,"ignore",void 0),Se([t.Property()],s.prototype,"rules",void 0),Se([t.Property("e-error")],s.prototype,"errorClass",void 0),Se([t.Property("e-valid")],s.prototype,"validClass",void 0),Se([t.Property("label")],s.prototype,"errorElement",void 0),Se([t.Property("div")],s.prototype,"errorContainer",void 0),Se([t.Property(e.ErrorOption.Label)],s.prototype,"errorOption",void 0),Se([t.Event()],s.prototype,"focusout",void 0),Se([t.Event()],s.prototype,"keyup",void 0),Se([t.Event()],s.prototype,"click",void 0),Se([t.Event()],s.prototype,"change",void 0),Se([t.Event()],s.prototype,"submit",void 0),Se([t.Event()],s.prototype,"validationBegin",void 0),Se([t.Event()],s.prototype,"validationComplete",void 0),Se([t.Event()],s.prototype,"customPlacement",void 0),s=n=Se([t.NotifyPropertyChanges],s)}(t.Base),ke=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)}}(),we=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Le="e-upload-file-list",Ae="e-file-status",He="e-file-remove-btn",Ne="e-file-delete-btn",Be="e-file-abort-btn",Re="e-file-reload-btn",Ue="e-upload-progress-wrap",Ie="e-upload-progress-bar",Fe="e-upload-success",Ve="e-upload-fails",Me="e-file-pause-btn",De=["title","style","class"],We=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),we([t.Property("")],i.prototype,"name",void 0),we([t.Property(null)],i.prototype,"size",void 0),we([t.Property("")],i.prototype,"type",void 0),i}(t.ChildProperty),ze=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),we([t.Property("Browse...")],i.prototype,"browse",void 0),we([t.Property("Upload")],i.prototype,"upload",void 0),we([t.Property("Clear")],i.prototype,"clear",void 0),i}(t.ChildProperty),qe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),we([t.Property("")],i.prototype,"saveUrl",void 0),we([t.Property("")],i.prototype,"removeUrl",void 0),we([t.Property(0)],i.prototype,"chunkSize",void 0),we([t.Property(3)],i.prototype,"retryCount",void 0),we([t.Property(500)],i.prototype,"retryAfterDelay",void 0),i}(t.ChildProperty),je=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.initialAttr={accept:null,multiple:!1,disabled:!1},s.uploadedFilesData=[],s.base64String=[],s.isForm=!1,s.allTypes=!1,s.pausedData=[],s.uploadMetaData=[],s.tabIndex="0",s.btnTabIndex="0",s.disableKeyboardNavigation=!1,s.count=-1,s.actionCompleteCount=0,s.flag=!0,s.selectedFiles=[],s.uploaderName="UploadFiles",s.fileStreams=[],s.newFileRef=0,s.isFirstFileOnSelection=!1,s.dragCounter=0,s.fileList=[],s.filesData=[],s.uploaderOptions=t,s}return ke(s,e),s.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"allowedExtensions":this.setExtensions(this.allowedExtensions),this.clearAll();break;case"enabled":this.setControlStatus();break;case"multiple":this.setMultipleSelection();break;case"enableRtl":this.setRTL(),this.reRenderFileList();break;case"buttons":this.buttons.browse=t.isNullOrUndefined(this.buttons.browse)?"":this.buttons.browse,this.buttons.clear=t.isNullOrUndefined(this.buttons.clear)?"":this.buttons.clear,this.buttons.upload=t.isNullOrUndefined(this.buttons.upload)?"":this.buttons.upload,this.renderButtonTemplates();break;case"dropArea":this.unBindDropEvents(),this.updateDropArea();break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHTMLAttributes(!0);break;case"files":this.renderPreLoadFiles();break;case"directoryUpload":this.updateDirectoryAttributes();break;case"template":this.isReact?this.reRenderFileList():this.clearAll();break;case"minFileSize":case"maxFileSize":case"autoUpload":case"sequentialUpload":this.clearAll();break;case"locale":this.l10n.setLocale(this.locale),this.setLocalizedTexts(),this.preLocaleObj=t.getValue("currentLocale",this.l10n);break;case"cssClass":this.setCSSClass(i.cssClass)}},s.prototype.setLocalizedTexts=function(){t.isNullOrUndefined(this.template)&&("string"==typeof this.buttons.browse&&(this.browseButton.innerText="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.innerText),this.uploadWrapper&&!t.isNullOrUndefined(this.uploadWrapper.querySelector(".e-file-drop"))&&(this.uploadWrapper.querySelector(".e-file-drop").innerHTML=this.localizedTexts("dropFilesHint"))),this.updateFileList())},s.prototype.getKeyValue=function(e){for(var t,i=0,s=Object.keys(this.preLocaleObj);i<s.length;i++){var n=s[i];this.preLocaleObj[""+n]===e&&(t=n)}return t},s.prototype.updateFileList=function(){if(this.fileList.length>0&&!t.isNullOrUndefined(this.uploadWrapper.querySelector(".e-upload-files")))for(var e=0;e<this.fileList.length;e++)this.fileList[e].querySelector(".e-file-status").innerHTML=this.localizedTexts(this.getKeyValue(this.filesData[e].status)),this.filesData[e].status=this.localizedTexts(this.getKeyValue(this.filesData[e].status)),this.fileList[e].classList.contains(Fe)&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("delete")),this.fileList[e].querySelector(".e-file-play-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("resume")),this.fileList[e].querySelector(".e-file-remove-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("remove")),this.fileList[e].querySelector(".e-file-reload-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("retry")),this.autoUpload||(this.uploadButton.innerText="Upload"===this.buttons.upload?this.localizedTexts("Upload"):this.buttons.upload,this.uploadButton.setAttribute("title",this.localizedTexts("Upload")),this.clearButton.innerText="Clear"===this.buttons.clear?this.localizedTexts("Clear"):this.buttons.clear,this.clearButton.setAttribute("title",this.localizedTexts("Clear")))},s.prototype.reRenderFileList=function(){this.listParent&&(t.detach(this.listParent),this.listParent=null,this.fileList=[],this.internalCreateFileList(this.filesData),this.actionButtons&&(this.removeActionButtons(),this.renderActionButtons(),this.checkActionButtonStatus()))},s.prototype.preRender=function(){this.localeText={Browse:"Browse...",Clear:"Clear",Upload:"Upload",invalidFileName:"File Name is not allowed",dropFilesHint:"Or drop files here",invalidMaxFileSize:"File size is too large",invalidMinFileSize:"File size is too small",invalidFileType:"File type is not allowed",uploadFailedMessage:"File failed to upload",uploadSuccessMessage:"File uploaded successfully",removedSuccessMessage:"File removed successfully",removedFailedMessage:"Unable to remove file",inProgress:"Uploading",readyToUploadMessage:"Ready to upload",abort:"Abort",remove:"Remove",cancel:"Cancel",delete:"Delete file",pauseUpload:"File upload paused",pause:"Pause",resume:"Resume",retry:"Retry",fileUploadCancel:"File upload canceled",invalidFileSelection:"Invalid files selected",totalFiles:"Total files",size:"Size"},this.l10n=new t.L10n("uploader",this.localeText,this.locale),this.preLocaleObj=t.getValue("currentLocale",this.l10n),this.formRendered(),this.updateHTMLAttrToElement(),this.checkHTMLAttributes(!1);var e=t.getValue("ej2_instances",this.element);if("EJS-UPLOADER"===this.element.tagName){var i=this.createElement("input",{attrs:{type:"file"}}),s=0;for(s;s<this.element.attributes.length;s++)"id"!==this.element.attributes[s].nodeName?i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue):"id"===this.element.attributes[s].nodeName&&i.setAttribute(this.element.attributes[s].nodeName,t.getUniqueID("uploader")),i.innerHTML=this.element.innerHTML;i.hasAttribute("name")||i.setAttribute("name","UploadFiles"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}e[0].isPureReactComponent&&(t.isNullOrUndefined(e[0].props.name)?!t.isNullOrUndefined(e[0].props.id)&&t.isNullOrUndefined(e[0].props.name)?this.element.setAttribute("name",e[0].props.id):this.element.setAttribute("name","UploadFiles"):this.element.setAttribute("name",e[0].props.name)),t.isNullOrUndefined(this.element.getAttribute("name"))&&this.element.setAttribute("name",this.element.getAttribute("id")),this.element.hasAttribute("type")||this.element.setAttribute("type","file"),this.updateDirectoryAttributes(),this.keyConfigs={enter:"enter"},this.element.hasAttribute("tabindex")&&(this.tabIndex=this.element.getAttribute("tabindex")),this.browserName=t.Browser.info.name,this.uploaderName=this.element.getAttribute("name")},s.prototype.formRendered=function(){var e=t.closest(this.element,"form");if(!t.isNullOrUndefined(e))for(;e&&e!==document.documentElement;e=e.parentElement)"FORM"===e.tagName&&(this.isForm=!0,this.formElement=e,e.setAttribute("enctype","multipart/form-data"),e.setAttribute("encoding","multipart/form-data"))},s.prototype.getPersistData=function(){return this.addOnPersist(["filesData"])},s.prototype.getModuleName=function(){return"uploader"},s.prototype.updateDirectoryAttributes=function(){this.directoryUpload?(this.element.setAttribute("directory","true"),this.element.setAttribute("webkitdirectory","true")):(this.element.removeAttribute("directory"),this.element.removeAttribute("webkitdirectory"))},s.prototype.render=function(){this.renderBrowseButton(),this.initializeUpload(),this.updateHTMLAttrToWrapper(),this.wireEvents(),this.setMultipleSelection(),this.setExtensions(this.allowedExtensions),this.setRTL(),this.renderPreLoadFiles(),this.setControlStatus(),this.setCSSClass()},s.prototype.renderBrowseButton=function(){this.browseButton=this.createElement("button",{className:"e-css e-btn",attrs:{type:"button"}}),this.browseButton.setAttribute("tabindex",this.tabIndex),"string"==typeof this.buttons.browse?(this.browseButton.textContent="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.innerText)):this.browseButton.appendChild(this.buttons.browse),this.element.setAttribute("aria-label","Uploader")},s.prototype.renderActionButtons=function(){this.element.setAttribute("tabindex","-1"),this.actionButtons=this.createElement("div",{className:"e-upload-actions"}),this.uploadButton=this.createElement("button",{className:"e-file-upload-btn e-css e-btn e-flat e-primary",attrs:{type:"button",tabindex:this.btnTabIndex,"aria-label":this.localizedTexts("Upload")}}),this.clearButton=this.createElement("button",{className:"e-file-clear-btn e-css e-btn e-flat",attrs:{type:"button",tabindex:this.btnTabIndex,"aria-label":this.localizedTexts("Clear")}}),this.actionButtons.appendChild(this.clearButton),this.actionButtons.appendChild(this.uploadButton),this.renderButtonTemplates(),this.uploadWrapper.appendChild(this.actionButtons),this.browseButton.blur(),this.isPreloadFiles||this.uploadButton.focus(),this.wireActionButtonEvents()},s.prototype.serverActionButtonsEventBind=function(e){e&&!this.isForm&&(this.browseButton.blur(),this.actionButtons=e,this.uploadButton=this.actionButtons.querySelector(".e-file-upload-btn"),this.clearButton=this.actionButtons.querySelector(".e-file-clear-btn"),this.uploadButton.focus(),this.unwireActionButtonEvents(),this.wireActionButtonEvents(),this.checkActionButtonStatus())},s.prototype.wireActionButtonEvents=function(){t.EventHandler.add(this.uploadButton,"click",this.uploadButtonClick,this),t.EventHandler.add(this.clearButton,"click",this.clearButtonClick,this)},s.prototype.unwireActionButtonEvents=function(){t.EventHandler.remove(this.uploadButton,"click",this.uploadButtonClick),t.EventHandler.remove(this.clearButton,"click",this.clearButtonClick)},s.prototype.removeActionButtons=function(){this.actionButtons&&(this.unwireActionButtonEvents(),t.detach(this.actionButtons),this.actionButtons=null)},s.prototype.renderButtonTemplates=function(){if("string"==typeof this.buttons.browse?(this.browseButton.textContent="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.textContent)):(this.browseButton.innerHTML="",this.browseButton.appendChild(this.buttons.browse)),this.uploadButton){var e=t.isNullOrUndefined(this.buttons.upload)?"Upload":this.buttons.upload;this.buttons.upload=e,"string"==typeof this.buttons.upload?(this.uploadButton.textContent="Upload"===this.buttons.upload?this.localizedTexts("Upload"):this.buttons.upload,this.uploadButton.setAttribute("title",this.uploadButton.textContent)):(this.uploadButton.innerHTML="",this.uploadButton.appendChild(this.buttons.upload))}if(this.clearButton){var i=t.isNullOrUndefined(this.buttons.clear)?"Clear":this.buttons.clear;this.buttons.clear=i,"string"==typeof this.buttons.clear?(this.clearButton.textContent="Clear"===this.buttons.clear?this.localizedTexts("Clear"):this.buttons.clear,this.clearButton.setAttribute("title",this.clearButton.textContent)):(this.clearButton.innerHTML="",this.clearButton.appendChild(this.buttons.clear))}},s.prototype.initializeUpload=function(){this.element.setAttribute("tabindex","-1");var e=this.createElement("span",{className:"e-file-select"});this.element.parentElement.insertBefore(e,this.element),this.dropAreaWrapper=this.createElement("div",{className:"e-file-select-wrap"}),this.element.parentElement.insertBefore(this.dropAreaWrapper,this.element),e.appendChild(this.element),this.dropAreaWrapper.appendChild(this.browseButton),this.dropAreaWrapper.appendChild(e),this.uploadWrapper=this.createElement("div",{className:"e-upload e-control-wrapper"}),this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper,this.dropAreaWrapper),this.uploadWrapper.appendChild(this.dropAreaWrapper),this.setDropArea()},s.prototype.renderPreLoadFiles=function(){if(this.files.length){if(this.enablePersistence&&this.filesData.length)return void this.internalCreateFileList(this.filesData);if(t.isNullOrUndefined(this.files[0].size))return;this.isPreloadFiles=!0;var e=[].slice.call(this.files),i=[];this.multiple||(this.clearData(),e=[e[0]]);for(var s=0,n=e;s<n.length;s++){var a=n[s],r={name:a.name+"."+a.type.split(".")[a.type.split(".").length-1],rawFile:"",size:a.size,status:this.localizedTexts("uploadSuccessMessage"),type:a.type,validationMessages:{minSize:"",maxSize:""},statusCode:"2"};i.push(r),this.filesData.push(r)}this.internalCreateFileList(i),this.autoUpload||!this.listParent||this.actionButtons||this.isForm&&!this.allowUpload()||!this.showFileList||this.renderActionButtons(),this.checkActionButtonStatus(),this.sequentialUpload&&(this.count=this.filesData.length-1),this.isPreloadFiles=!1}},s.prototype.checkActionButtonStatus=function(){if(this.actionButtons){var e=this.uploadWrapper.querySelectorAll(".e-validation-fails").length+this.uploadWrapper.querySelectorAll(".e-upload-fails:not(.e-upload-progress)").length+this.uploadWrapper.querySelectorAll("span."+Fe).length+this.uploadWrapper.querySelectorAll("span.e-upload-progress").length;e>0&&e===this.uploadWrapper.querySelectorAll("li").length?this.uploadButton.setAttribute("disabled","disabled"):this.uploadButton.removeAttribute("disabled")}},s.prototype.setDropArea=function(){var e=this.dropAreaWrapper.querySelector(".e-file-drop");if(this.dropArea){this.dropZoneElement="string"!=typeof this.dropArea?this.dropArea:t.select(this.dropArea,document);for(var i=this.element,s=!1;i.parentNode;)(i=i.parentNode)===this.dropZoneElement&&(s=!0,e?e.innerHTML=this.localizedTexts("dropFilesHint"):this.createDropTextHint());!s&&e&&t.remove(e)}else t.isNullOrUndefined(this.uploaderOptions)||void 0!==this.uploaderOptions.dropArea||(this.createDropTextHint(),this.dropZoneElement=this.uploadWrapper,this.setProperties({dropArea:this.uploadWrapper},!0));this.bindDropEvents()},s.prototype.updateDropArea=function(){if(this.dropArea)this.setDropArea();else{this.dropZoneElement=null;var e=this.dropAreaWrapper.querySelector(".e-file-drop");e&&t.remove(e)}},s.prototype.createDropTextHint=function(){var e=this.createElement("span",{className:"e-file-drop"});e.innerHTML=this.localizedTexts("dropFilesHint"),this.dropAreaWrapper.appendChild(e)},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];De.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(De.indexOf(s)>-1)if("class"===s){var n=this.htmlAttributes[""+s].replace(/\s+/g," ").trim();""!==n&&t.addClass([this.uploadWrapper],n.split(" "))}else if("style"===s){var a=this.uploadWrapper.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[""+s]:a+this.htmlAttributes[""+s],this.uploadWrapper.setAttribute(s,a)}else this.uploadWrapper.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.setMultipleSelection=function(){if(this.multiple&&!this.element.hasAttribute("multiple")){var e=document.createAttribute("multiple");e.value="multiple",this.element.setAttributeNode(e)}else this.multiple||this.element.removeAttribute("multiple")},s.prototype.checkAutoUpload=function(e){this.autoUpload?(this.sequentialUpload?this.sequenceUpload(e):this.upload(e),this.removeActionButtons()):this.actionButtons||this.renderActionButtons(),this.checkActionButtonStatus()},s.prototype.sequenceUpload=function(e){if(this.filesData.length-e.length==0||"1"!==this.filesData[this.filesData.length-e.length-1].statusCode){(this.multiple||this.count<0)&&++this.count;var t=!this.showFileList;"object"==typeof this.filesData[this.count]?(this.isFirstFileOnSelection=!1,this.upload(this.filesData[this.count],t),"0"===this.filesData[this.count].statusCode&&this.sequenceUpload(e)):--this.count}},s.prototype.setCSSClass=function(e){var i=e;t.isNullOrUndefined(e)||(i=e.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e)||""===i||t.removeClass([this.uploadWrapper],i.split(" "));var s=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(s=this.cssClass.replace(/\s+/g," ").trim()),t.isNullOrUndefined(this.cssClass)||""===s||t.addClass([this.uploadWrapper],s.split(s.indexOf(",")>-1?",":" "))},s.prototype.wireEvents=function(){t.EventHandler.add(this.browseButton,"click",this.browseButtonClick,this),t.EventHandler.add(this.element,"change",this.onSelectFiles,this),t.EventHandler.add(document,"click",this.removeFocus,this),this.keyboardModule=new t.KeyboardEvents(this.uploadWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.resetForm,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.browseButton,"click",this.browseButtonClick),t.EventHandler.remove(this.element,"change",this.onSelectFiles),t.EventHandler.remove(document,"click",this.removeFocus),this.isForm&&t.EventHandler.remove(this.formElement,"reset",this.resetForm),this.keyboardModule&&this.keyboardModule.destroy()},s.prototype.resetForm=function(){this.clearAll()},s.prototype.keyActionHandler=function(e){var i=e.target;switch(e.action){case"enter":if(e.target===this.clearButton)this.clearButtonClick();else if(e.target===this.uploadButton)this.uploadButtonClick();else if(e.target===this.browseButton)this.browseButtonClick();else if(i.classList.contains(Me))(s=this.getCurrentMetaData(null,e)).file.statusCode="4",s.file.status=this.localizedTexts("pauseUpload"),this.abortUpload(s,!1);else if(i.classList.contains("e-file-play-btn"))this.resumeUpload(this.getCurrentMetaData(null,e),e);else if(i.classList.contains(Re)){var s=this.getCurrentMetaData(null,e);if(t.isNullOrUndefined(s)){var n=e.target.parentElement,a=this.filesData[this.fileList.indexOf(n)];this.retry(a)}else s.file.statusCode="1",s.file.status=this.localizedTexts("readyToUploadMessage"),this.chunkUpload(s.file)}else this.removeFiles(e),i.classList.contains(Be)||this.browseButton.focus();e.preventDefault(),e.stopPropagation()}},s.prototype.getCurrentMetaData=function(e,i){var s,n;if(t.isNullOrUndefined(e)){var a=i.target.parentElement;s=this.filesData[this.fileList.indexOf(a)]}else s=e;for(var r=0;r<this.uploadMetaData.length;r++)this.uploadMetaData[r].file.name===s.name&&(n=this.uploadMetaData[r]);return n},s.prototype.removeFocus=function(){this.uploadWrapper&&this.listParent&&this.listParent.querySelector(".e-clear-icon-focus")&&(document.activeElement.blur(),this.listParent.querySelector(".e-clear-icon-focus").classList.remove("e-clear-icon-focus"))},s.prototype.browseButtonClick=function(){this.element.click()},s.prototype.uploadButtonClick=function(){this.sequentialUpload?this.sequenceUpload(this.filesData):this.upload(this.filesData)},s.prototype.clearButtonClick=function(){this.clearAll(),this.sequentialUpload&&(this.count=-1),this.actionCompleteCount=0},s.prototype.bindDropEvents=function(){this.dropZoneElement&&(t.EventHandler.add(this.dropZoneElement,"drop",this.dropElement,this),t.EventHandler.add(this.dropZoneElement,"dragover",this.dragHover,this),t.EventHandler.add(this.dropZoneElement,"dragleave",this.onDragLeave,this),t.EventHandler.add(this.dropZoneElement,"paste",this.onPasteFile,this),t.EventHandler.add(this.dropZoneElement,"dragenter",this.onDragEnter,this))},s.prototype.unBindDropEvents=function(){this.dropZoneElement&&(t.EventHandler.remove(this.dropZoneElement,"drop",this.dropElement),t.EventHandler.remove(this.dropZoneElement,"dragover",this.dragHover),t.EventHandler.remove(this.dropZoneElement,"dragleave",this.onDragLeave),t.EventHandler.remove(this.dropZoneElement,"dragenter",this.onDragEnter))},s.prototype.onDragEnter=function(e){this.enabled&&(this.dropZoneElement.classList.add("e-upload-drag-hover"),this.dragCounter=this.dragCounter+1,e.preventDefault(),e.stopPropagation())},s.prototype.onDragLeave=function(){this.enabled&&(this.dragCounter=this.dragCounter-1,this.dragCounter||this.dropZoneElement.classList.remove("e-upload-drag-hover"))},s.prototype.dragHover=function(e){this.enabled&&("Default"!==this.dropEffect&&(e.dataTransfer.dropEffect=this.dropEffect.toLowerCase()),e.preventDefault(),e.stopPropagation())},s.prototype.dropElement=function(e){this.dragCounter=0,this.dropZoneElement.classList.remove("e-upload-drag-hover"),this.onSelectFiles(e),e.preventDefault(),e.stopPropagation()},s.prototype.onPasteFile=function(e){var i=e.clipboardData.items;if("paste"===e.type&&"msie"!==this.browserName&&"edge"!==this.browserName&&"safari"!==this.browserName&&(this.element.files=e.clipboardData.files),1===i.length||this.multiple)for(var s=0;s<i.length;s++){var n=[].slice.call(i)[s];t.isNullOrUndefined(n.getAsFile())||"file"!==n.kind&&!n.type.match("^image/")||this.renderSelectedFiles(e,[n.getAsFile()],!1,!0)}},s.prototype.getSelectedFiles=function(e){for(var t=[],i=this.fileList[e],s=this.getFilesData(),n=+i.getAttribute("data-files-count"),a=0,r=0;r<e;r++)a+=+this.fileList[r].getAttribute("data-files-count");for(var l=a;l<a+n;l++)t.push(s[l]);return t},s.prototype.removeFiles=function(e){if(this.enabled){var s=e.target.parentElement,n=this.fileList.indexOf(s),a=this.fileList[n],r=this.isFormUpload(),l=r?this.getSelectedFiles(n):this.getFilesInArray(this.filesData[n]);if(!t.isNullOrUndefined(l)){if(e.target.classList.contains(Be)&&!r){if(l[0].statusCode="5",!t.isNullOrUndefined(a)){var o=a.querySelector("."+Be);i.createSpinner({target:o,width:"20px"}),i.showSpinner(o)}this.sequentialUpload&&this.uploadSequential(),a.classList.contains("e-restrict-retry")||this.checkActionComplete(!0)}else t.closest(e.target,".e-spinner-pane")||this.remove(l,!1,!1,!0,e);if(this.isForm&&a&&a.classList.contains("e-file-invalid")&&(this.element.value=""),this.checkActionButtonStatus(),this.actionButtons&&this.clearButton&&this.uploadWrapper){var h=this.uploadWrapper.querySelectorAll(".e-upload-progress-bar.e-upload-progress:not(.e-upload-success):not(.e-upload-fails)");1===h.length&&s.contains(h[0])&&this.clearButton.hasAttribute("disabled")&&this.clearButton.removeAttribute("disabled")}}}},s.prototype.removeFilesData=function(e,i){var s;if(i)return void(this.showFileList||(s=this.filesData.indexOf(e),this.filesData.splice(s,1)));var n=this.getLiElement(e);t.isNullOrUndefined(n)||(this.element.value="",t.detach(n),s=this.fileList.indexOf(n),this.fileList.splice(s,1),this.filesData.splice(s,1),0!==this.fileList.length||t.isNullOrUndefined(this.listParent)||(t.detach(this.listParent),this.listParent=null,this.removeActionButtons()),this.sequentialUpload&&s<=this.count&&--this.count)},s.prototype.removeUploadedFile=function(e,i,s,n){var a=this,r=e,l=new t.Ajax(this.asyncSettings.removeUrl,"POST",!0,null);l.emitError=!1;var o=new FormData;l.beforeSend=function(t){i.currentRequest=l.httpRequest,s?a.removingEventCallback(i,o,r,e):a.trigger("removing",i,function(i){i.cancel?t.cancel=!0:a.removingEventCallback(i,o,r,e)})},l.onLoad=function(e){return a.removeCompleted(e,r,n),{}},l.onError=function(e){return a.removeFailed(e,r,n),{}},l.send(o)},s.prototype.removingEventCallback=function(e,s,n,a){var r=this.element.getAttribute("name"),l=this.getLiElement(a);if(!(t.isNullOrUndefined(l)||t.isNullOrUndefined(l.querySelector("."+Ne))&&t.isNullOrUndefined(l.querySelector("."+He)))){var o=l.querySelector("."+Ne)?l.querySelector("."+Ne):l.querySelector("."+He);i.createSpinner({target:o,width:"20px"}),i.showSpinner(o)}e.postRawFile&&!t.isNullOrUndefined(n.rawFile)&&""!==n.rawFile?s.append(r,n.rawFile,n.name):s.append(r,n.name),this.updateFormData(s,e.customFormData)},s.prototype.updateFormData=function(e,t){if(t.length>0&&t[0])for(var i=0;i<t.length;i++)!function(i){var s=t[i],n=Object.keys(s).map(function(e){return s[""+e]});e.append(Object.keys(s)[0],n)}(i)},s.prototype.updateCustomheader=function(e,t){if(t.length>0&&t[0])for(var i=0;i<t.length;i++)!function(i){var s=t[i],n=Object.keys(s).map(function(e){return s[""+e]});e.setRequestHeader(Object.keys(s)[0],n)}(i)},s.prototype.removeCompleted=function(e,t,i){var s=e&&e.currentTarget?this.getResponse(e):null,n=e.target;if(4===n.readyState&&n.status>=200&&n.status<=299){var a={e:e,response:s,operation:"remove",file:this.updateStatus(t,this.localizedTexts("removedSuccessMessage"),"2")};this.trigger("success",a),this.removeFilesData(t,i);var r=this.uploadedFilesData.indexOf(t);this.uploadedFilesData.splice(r,1),this.trigger("change",{files:this.uploadedFilesData})}else this.removeFailed(e,t,i)},s.prototype.removeFailed=function(e,s,n){var a={e:e,response:e&&e.currentTarget?this.getResponse(e):null,operation:"remove",file:this.updateStatus(s,this.localizedTexts("removedFailedMessage"),"0")};if(!n){var r=this.filesData.indexOf(s),l=this.fileList[r];if(l){l.classList.remove(Fe),l.classList.add(Ve);var o=l.querySelector("."+Ae);o&&(o.classList.remove(Fe),o.classList.add(Ve))}this.checkActionButtonStatus()}this.trigger("failure",a);var h=this.getLiElement(s);if(!t.isNullOrUndefined(h)&&!t.isNullOrUndefined(h.querySelector("."+Ne))){var p=h.querySelector("."+Ne);i.hideSpinner(p),t.detach(h.querySelector(".e-spinner-pane"))}},s.prototype.getFilesFromFolder=function(e){this.filesEntries=[];var t=this.multiple?e.dataTransfer.items:[e.dataTransfer.items[0]];if(this.checkDirectoryUpload(t))for(var i=this,s=0;s<t.length;s++)!function(s){var n=t[s].webkitGetAsEntry();if(n.isFile){var a=[];n.file(function(e){var t=n.fullPath;a.push({path:t,file:e})}),i.renderSelectedFiles(e,a,!0)}else n.isDirectory&&i.traverseFileTree(n,e)}(s)},s.prototype.checkDirectoryUpload=function(e){for(var t=0;e&&t<e.length;t++)if(e[t].webkitGetAsEntry().isDirectory)return!0;return!1},s.prototype.traverseFileTree=function(e,t){if(e.isFile)this.filesEntries.push(e);else if(e.isDirectory){var i=e.createReader();this.readFileFromDirectory(i,t)}},s.prototype.readFileFromDirectory=function(e,t){var i=this;e.readEntries(function(s){for(var n=0;n<s.length;n++)i.traverseFileTree(s[n],t);i.pushFilesEntries(t),s.length&&i.readFileFromDirectory(e)})},s.prototype.pushFilesEntries=function(e){for(var t=this,i=[],s=this,n=0;n<this.filesEntries.length;n++)!function(n){s.filesEntries[n].file(function(s){if(t.filesEntries.length){var a=t.filesEntries[n].fullPath;i.push({path:a,file:s}),n===t.filesEntries.length-1&&(t.filesEntries=[],t.renderSelectedFiles(e,i,!0))}})}(n)},s.prototype.onSelectFiles=function(e){if(this.enabled){var t;if("drop"===e.type)if(this.directoryUpload)this.getFilesFromFolder(e);else{var i=this.sortFilesList=e.dataTransfer.files;"msie"!==this.browserName&&"edge"!==this.browserName&&"safari"!==this.browserName&&(this.element.files=i),i.length>0&&(t=this.multiple?this.sortFileList(i):[i[0]],this.renderSelectedFiles(e,t))}else t=[].slice.call(e.target.files),this.renderSelectedFiles(e,t);(this.isAngular||this.isReact)&&e.stopPropagation()}},s.prototype.getBase64=function(e){return new Promise(function(t,i){var s=new FileReader;s.readAsDataURL(e),s.onload=function(){return t(s.result)},s.onerror=function(e){return i(e)}})},s.prototype.renderSelectedFiles=function(e,i,s,n){var a=this;this.base64String=[];var r={event:e,cancel:!1,filesData:[],isModified:!1,modifiedFilesData:[],progressInterval:"",isCanceled:!1,currentRequest:null,customFormData:null};if(i.length<1)return r.isCanceled=!0,void this.trigger("selected",r);this.flag=!0;var l=[];this.multiple||(this.clearData(!0),this.actionCompleteCount=0,i=[i[0]]);for(h=0;h<i.length;h++){var o=s?i[h].file:i[h];this.updateInitialFileDetails(e,i,o,h,l,s,n)}if(r.filesData=l,!t.isNullOrUndefined(this.allowedExtensions)&&this.allowedExtensions.indexOf("*")>-1&&(this.allTypes=!0),this.enableHtmlSanitizer)for(var h=0;h<l.length;h++){for(var p=t.SanitizeHtmlHelper.beforeSanitize(),d=t.SanitizeHtmlHelper.serializeValue(p,l[parseInt(h.toString(),10)].name),u=l[parseInt(h.toString(),10)].name,c=!1,m=0;m<u.length;m++)if(u.charCodeAt(m)>127){c=!0;break}var f=/<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i.test(u);if(d!==l[parseInt(h.toString(),10)].name&&(!c||f)){var v=i[parseInt(h.toString(),10)].name.replace(/[\u00A0-\u9999<>\\&]/g,function(e){return"&#"+e.charCodeAt(0)+";"});l[parseInt(h.toString(),10)].name=v,l[parseInt(h.toString(),10)].status=this.localizedTexts("invalidFileName"),l[parseInt(h.toString(),10)].statusCode="0"}}this.allTypes||(l=this.checkExtension(l)),this.trigger("selected",r,function(e){a._internalRenderSelect(e,l)})},s.prototype.updateInitialFileDetails=function(e,i,s,n,a,r,l){var o={name:r?i[n].path.substring(1,i[n].path.length):l?t.getUniqueID(s.name.substring(0,s.name.lastIndexOf(".")))+"."+this.getFileType(s.name):this.directoryUpload?i[n].webkitRelativePath:s.name,rawFile:s,size:s.size,status:this.localizedTexts("readyToUploadMessage"),type:this.getFileType(s.name),validationMessages:this.validatedFileSize(s.size),statusCode:"1",id:t.getUniqueID(s.name.substring(0,s.name.lastIndexOf(".")))+"."+this.getFileType(s.name)};l&&(o.fileSource="paste"),o.status=""!==o.validationMessages.minSize?this.localizedTexts("invalidMinFileSize"):""!==o.validationMessages.maxSize?this.localizedTexts("invalidMaxFileSize"):o.status,""===o.validationMessages.minSize&&""===o.validationMessages.maxSize||(o.statusCode="0",this.checkActionComplete(!0)),a.push(o)},s.prototype._internalRenderSelect=function(e,i){if(!e.cancel){if(this.selectedFiles=this.selectedFiles.concat(i),this.btnTabIndex=this.disableKeyboardNavigation?"-1":"0",this.showFileList){if(e.isModified&&e.modifiedFilesData.length>0){for(var s=0;s<e.modifiedFilesData.length;s++)for(var n=0;n<i.length;n++)e.modifiedFilesData[s].id===i[n].id&&(e.modifiedFilesData[s].rawFile=i[n].rawFile);var a=this.allTypes?e.modifiedFilesData:this.checkExtension(e.modifiedFilesData);this.updateSortedFileList(a),this.filesData=this.filesData.concat(a),this.isForm&&!this.allowUpload()||this.checkAutoUpload(a)}else{if(this.internalCreateFileList(i),this.autoUpload&&this.sequenceUpload&&this.sequentialUpload&&this.filesData.length>0&&"2"!==this.filesData[this.filesData.length-1].statusCode&&"0"!==this.filesData[this.filesData.length-1].statusCode)return void(this.filesData=this.filesData.concat(i));this.filesData=this.filesData.concat(i),this.isForm&&!this.allowUpload()||this.checkAutoUpload(i)}t.isNullOrUndefined(e.progressInterval)||""===e.progressInterval||(this.progressInterval=e.progressInterval)}else this.filesData=this.filesData.concat(i),this.autoUpload&&this.upload(this.filesData,!0);this.raiseActionComplete(),this.isFirstFileOnSelection=!0}},s.prototype.allowUpload=function(){var e=!1;return this.isForm&&!t.isNullOrUndefined(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl&&(e=!0),e},s.prototype.isFormUpload=function(){var e=!1;return!this.isForm||!t.isNullOrUndefined(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl||!t.isNullOrUndefined(this.asyncSettings.removeUrl)&&""!==this.asyncSettings.removeUrl||(e=!0),e},s.prototype.clearData=function(e){if(t.isNullOrUndefined(this.listParent)||(t.detach(this.listParent),this.listParent=null),"msie"===this.browserName||e||(this.element.value=""),this.isFormUpload()&&this.uploadWrapper.querySelector(".e-file-select")){var i=this.uploadWrapper.querySelector(".e-file-select").querySelector(".e-hidden-file-input");i&&this.uploadWrapper.querySelector(".e-file-select").removeChild(i)}this.fileList=[],this.filesData=[],this.removeActionButtons()},s.prototype.updateSortedFileList=function(e){var i=this.createElement("div",{id:"clonewrapper"}),s=-1;if(this.listParent){for(var n=0;n<this.listParent.querySelectorAll("li").length;n++){var a=this.listParent.querySelectorAll("li")[n];i.appendChild(a.cloneNode(!0))}this.removeActionButtons();var r=[].slice.call(i.childNodes);this.createParentUL();for(var l=0;l<e.length;l++){for(var o=0;o<this.filesData.length;o++)this.filesData[o].name===e[l].name&&(this.listParent.appendChild(r[o]),t.EventHandler.add(r[o].querySelector(".e-icons"),"click",this.removeFiles,this),this.fileList.push(r[o]),s=l);s!==l&&this.internalCreateFileList([e[l]])}}else this.internalCreateFileList(e)},s.prototype.isBlank=function(e){return!e||/^\s*$/.test(e)},s.prototype.checkGenericExtension=function(e,t){var i=[];switch(e.toLowerCase()){case"image/*":i.push("jpg","jpeg","png","gif","bmp","tiff","svg","webp","heic");break;case"audio/*":i.push("mp3","wav","aac","flac","ogg","m4a");break;case"video/*":i.push("mp4","mov","avi","mkv","flv","wmv","webm","mpeg");break;case"application/*":i.push("doc","docx","xls","xlsx","ppt","pptx","zip","rar","7z","tar","pdf");break;case"text/*":i.push("txt","csv","html","css","js","json","xml","md")}return i.includes(t.toLowerCase())},s.prototype.checkExtension=function(e){var i=e;if(!this.isBlank(this.allowedExtensions)){for(var s=[],n=0,a=t.isNullOrUndefined(s)?[""]:this.allowedExtensions.split(",");n<a.length;n++){var r=a[n];s.push(r.trim().toLocaleLowerCase())}for(var l=0;l<e.length;l++){var o=-1!==e[l].type.indexOf(".")?e[l].type.replace(".",""):e[l].type;-1!==s[0].indexOf("/*")?this.checkGenericExtension(s[0],o)||(e[l].status=this.localizedTexts("invalidFileType"),e[l].statusCode="0"):-1===s.indexOf(("."+o).toLocaleLowerCase())&&(e[l].status=this.localizedTexts("invalidFileType"),e[l].statusCode="0")}}return i},s.prototype.validatedFileSize=function(e){var t="",i="";return e<this.minFileSize?t=this.localizedTexts("invalidMinFileSize"):e>this.maxFileSize?i=this.localizedTexts("invalidMaxFileSize"):(t="",i=""),{minSize:t,maxSize:i}},s.prototype.isPreLoadFile=function(e){for(var t=!1,i=0;i<this.files.length;i++)this.files[i].name===e.name.slice(0,e.name.lastIndexOf("."))&&this.files[i].type===e.type&&(t=!0);return t},s.prototype.createCustomfileList=function(e){this.createParentUL();for(var i=0,s=e;i<s.length;i++){var n=s[i],a=this.createElement("li",{className:Le,attrs:{"data-file-name":n.name}});this.uploadTemplateFn=this.templateComplier(this.template);var r=this.uploadTemplateFn(n,this,"template",this.element.id+"Template",this.isStringTemplate,null,a);if(r){var l=[].slice.call(r);t.append(l,a)}var o=e.indexOf(n),h={element:a,fileInfo:n,index:o,isPreload:this.isPreLoadFile(n)},p={element:a,fileInfo:n,index:o,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",h),this.trigger("fileListRendering",p),this.listParent.appendChild(a),this.fileList.push(a)}this.renderReactTemplates()},s.prototype.createParentUL=function(){t.isNullOrUndefined(this.listParent)&&(this.listParent=this.createElement("ul",{className:"e-upload-files"}),this.uploadWrapper.appendChild(this.listParent))},s.prototype.formFileList=function(e,i){var s=this.createElement("li",{className:Le});s.setAttribute("data-files-count",e.length+"");for(var n,a=this.createElement("span",{className:"e-file-container"}),r=0,l=e;r<l.length;r++){var o=l[r],h=this.createElement("span",{className:"e-file-name"});h.innerHTML=this.getFileNameOnly(o.name);var p=this.createElement("span",{className:"e-file-type"}),d=this.getFileType(o.name);if(p.innerHTML="."+d,d||p.classList.add("e-hidden"),this.enableRtl){var u=this.createElement("span",{className:"e-rtl-container"});u.appendChild(p),u.appendChild(h),a.appendChild(u)}else a.appendChild(h),a.appendChild(p);this.truncateName(h),n=this.formValidateFileInfo(o,s)}s.appendChild(a),this.setListToFileInfo(e,s);var c=this.listParent.querySelectorAll("li").length,m=this.createElement("span");if(s.classList.contains("e-file-invalid")?(m.classList.add(Ae),m.classList.add("e-file-invalid"),m.innerText=e.length>1?this.localizedTexts("invalidFileSelection"):n):(m.classList.add(e.length>1?"e-file-information":"e-file-size"),m.innerText=e.length>1?this.localizedTexts("totalFiles")+": "+e.length+" , "+this.localizedTexts("size")+": "+this.bytesToSize(this.getFileSize(e)):this.bytesToSize(e[0].size),this.createFormInput(e)),a.appendChild(m),t.isNullOrUndefined(s.querySelector(".e-icons"))){var f=this.createElement("span",{className:"e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&f.classList.add("e-msie"),f.setAttribute("title",this.localizedTexts("remove")),s.appendChild(a),s.appendChild(f),t.EventHandler.add(f,"click",this.removeFiles,this),f.classList.add(He)}var v={element:s,fileInfo:this.mergeFileInfo(e,s),index:c,isPreload:this.isPreLoadFile(this.mergeFileInfo(e,s))},g={element:s,fileInfo:this.mergeFileInfo(e,s),index:c,isPreload:this.isPreLoadFile(this.mergeFileInfo(e,s))};this.trigger("rendering",v),this.trigger("fileListRendering",g),this.listParent.appendChild(s),this.fileList.push(s)},s.prototype.formValidateFileInfo=function(e,t){var i=e.status,s=this.validatedFileSize(e.size);""===s.minSize&&""===s.maxSize||(this.addInvalidClass(t),i=""!==s.minSize?this.localizedTexts("invalidMinFileSize"):""!==s.maxSize?this.localizedTexts("invalidMaxFileSize"):i);var n=this.checkExtension(this.getFilesInArray(e))[0].status;return n===this.localizedTexts("invalidFileType")&&(this.addInvalidClass(t),i=n),i},s.prototype.addInvalidClass=function(e){e.classList.add("e-file-invalid")},s.prototype.createFormInput=function(e){if("safari"!==this.browserName){var i=this.element.cloneNode(!0);i.classList.add("e-hidden-file-input");for(var s=0,n=e;s<n.length;s++)n[s].input=i;i.setAttribute("id",t.getUniqueID("hiddenUploader")),i.setAttribute("name",this.uploaderName),this.uploadWrapper.querySelector(".e-file-select").appendChild(i),"msie"!==this.browserName&&"edge"!==this.browserName&&(this.element.value="")}},s.prototype.getFileSize=function(e){for(var t=0,i=0,s=e;i<s.length;i++)t+=s[i].size;return t},s.prototype.mergeFileInfo=function(e,t){for(var i={name:"",rawFile:"",size:0,status:"",type:"",validationMessages:{minSize:"",maxSize:""},statusCode:"1",list:t},s=[],n="",a=0,r=e;a<r.length;a++){var l=r[a];s.push(l.name),n=l.type}return i.name=s.join(", "),i.size=this.getFileSize(e),i.type=n,i.status=this.statusForFormUpload(e,t),i},s.prototype.statusForFormUpload=function(e,t){for(var i,s=!0,n=0,a=e;n<a.length;n++){var r=a[n];i=r.status;var l=this.validatedFileSize(r.size);""===l.minSize&&""===l.maxSize||(s=!1,i=""!==l.minSize?this.localizedTexts("invalidMinFileSize"):""!==l.maxSize?this.localizedTexts("invalidMaxFileSize"):i);var o=this.checkExtension(this.getFilesInArray(r))[0].status;o===this.localizedTexts("invalidFileType")&&(s=!1,i=o)}return s?i=this.localizedTexts("totalFiles")+": "+e.length+" , "+this.localizedTexts("size")+": "+this.bytesToSize(this.getFileSize(e)):(t.classList.add("e-file-invalid"),i=e.length>1?this.localizedTexts("invalidFileSelection"):i),i},s.prototype.formCustomFileList=function(e,i){this.createParentUL();var s=this.createElement("li",{className:Le});s.setAttribute("data-files-count",e.length+""),this.setListToFileInfo(e,s);var n=this.mergeFileInfo(e,s);s.setAttribute("data-file-name",n.name),this.uploadTemplateFn=this.templateComplier(this.template);var a=this.uploadTemplateFn(n,this,"template",this.element.id+"Template",this.isStringTemplate,null,s);if(a){var r=[].slice.call(a);t.append(r,s)}var l=this.listParent.querySelectorAll("li").length;s.classList.contains("e-file-invalid")||this.createFormInput(e);var o={element:s,fileInfo:n,index:l,isPreload:this.isPreLoadFile(n)},h={element:s,fileInfo:n,index:l,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",o),this.trigger("fileListRendering",h),this.listParent.appendChild(s),this.fileList.push(s),this.renderReactTemplates()},s.prototype.createFileList=function(e){this.filesData=this.filesData&&this.filesData.length>0?this.filesData.concat(e):e,this.internalCreateFileList(e)},s.prototype.internalCreateFileList=function(e){if(this.createParentUL(),""===this.template||t.isNullOrUndefined(this.template))if(this.isFormUpload())this.uploadWrapper.classList.add("e-form-upload"),this.formFileList(e,this.element.files);else for(var i=0,s=e;i<s.length;i++){var n=s[i],a=this.createElement("li",{className:Le,attrs:{"data-file-name":n.name,"data-files-count":"1"}}),r=this.createElement("span",{className:"e-file-container"}),l=this.createElement("span",{className:"e-file-name",attrs:{title:n.name}});l.innerHTML=this.getFileNameOnly(n.name);var o=this.createElement("span",{className:"e-file-type"}),h=this.getFileType(n.name);if(o.innerHTML="."+h,h||o.classList.add("e-hidden"),this.enableRtl){var p=this.createElement("span",{className:"e-rtl-container"});p.appendChild(o),p.appendChild(l),r.appendChild(p)}else r.appendChild(l),r.appendChild(o);var d=this.createElement("span",{className:"e-file-size"});d.innerHTML=this.bytesToSize(n.size),r.appendChild(d);var u=this.createElement("span",{className:Ae});r.appendChild(u),u.innerHTML=n.status,a.appendChild(r);var c=this.createElement("span",{className:" e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&c.classList.add("e-msie"),c.setAttribute("title",this.localizedTexts("remove")),a.appendChild(c),t.EventHandler.add(c,"click",this.removeFiles,this),"2"===n.statusCode?(u.classList.add(Fe),c.classList.add(Ne),c.setAttribute("title",this.localizedTexts("delete")),c.setAttribute("aria-label",this.localizedTexts("delete"))):"1"!==n.statusCode&&(u.classList.remove(Fe),u.classList.add("e-validation-fails")),this.autoUpload&&"1"===n.statusCode&&""!==this.asyncSettings.saveUrl&&(u.innerHTML=""),c.classList.contains(Ne)||(c.classList.add(He),c.setAttribute("aria-label",this.localizedTexts("remove")));var m=e.indexOf(n),f={element:a,fileInfo:n,index:m,isPreload:this.isPreLoadFile(n)},v={element:a,fileInfo:n,index:m,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",f),this.trigger("fileListRendering",v),this.listParent.appendChild(a),this.fileList.push(a),this.truncateName(l);var g=this.flag;this.isPreLoadFile(n)&&(this.flag=!1,this.checkActionComplete(!0),this.flag=g)}else this.isFormUpload()?(this.uploadWrapper.classList.add("e-form-upload"),this.formCustomFileList(e,this.element.files)):this.createCustomfileList(e)},s.prototype.getSlicedName=function(e){var t=e.textContent;e.dataset.tail=t.slice(t.length-10)},s.prototype.setListToFileInfo=function(e,t){for(var i=0,s=e;i<s.length;i++)s[i].list=t},s.prototype.truncateName=function(e){var t=e;"edge"!==this.browserName&&t.offsetWidth<t.scrollWidth?this.getSlicedName(t):t.offsetWidth+1<t.scrollWidth&&this.getSlicedName(t)},s.prototype.getFileType=function(e){var t,i=e.lastIndexOf(".");return i>=0&&(t=e.substring(i+1)),t||""},s.prototype.getFileNameOnly=function(e){var t=this.getFileType(e);return t=e.split("."+t)[0]},s.prototype.setInitialAttributes=function(){if(this.initialAttr.accept&&this.element.setAttribute("accept",this.initialAttr.accept),this.initialAttr.disabled&&this.element.setAttribute("disabled","disabled"),this.initialAttr.multiple){var e=document.createAttribute("multiple");this.element.setAttributeNode(e)}},s.prototype.filterfileList=function(e){for(var i,s=[],n=0;n<e.length;n++)i=this.getLiElement(e[n]),t.isNullOrUndefined(i)||i.classList.contains(Fe)?this.showFileList||"File uploaded successfully"===e[n].status||s.push(e[n]):s.push(e[n]);return s},s.prototype.updateStatus=function(e,i,s,n){if(void 0===n&&(n=!0),""===i||t.isNullOrUndefined(i)||""===s||t.isNullOrUndefined(s)||(e.status=i,e.statusCode=s),n){var a=this.getLiElement(e);t.isNullOrUndefined(a)||t.isNullOrUndefined(a.querySelector("."+Ae))||""===i||t.isNullOrUndefined(i)||(a.querySelector("."+Ae).textContent=i)}return e},s.prototype.getLiElement=function(e){for(var i,s=0;s<this.filesData.length;s++)t.isNullOrUndefined(e)||(t.isNullOrUndefined(this.filesData[s].id)||t.isNullOrUndefined(e.id)?this.filesData[s].name!==e.name:this.filesData[s].name!==e.name||this.filesData[s].id!==e.id)||(i=s);return this.fileList[i]},s.prototype.createProgressBar=function(e){var t=this.createElement("span",{className:Ue}),i=this.createElement("progressbar",{className:Ie,attrs:{value:"0",max:"100"}}),s=this.createElement("span",{className:"e-progress-inner-wrap"});i.style.width="0%";var n=this.createElement("span",{className:"e-progress-bar-text"});n.textContent="0%",s.appendChild(i),t.appendChild(s),t.appendChild(n),e.querySelector(".e-file-container").appendChild(t)},s.prototype.updateProgressbar=function(e,i){if(!isNaN(Math.round(e.loaded/e.total*100))&&!t.isNullOrUndefined(i.querySelector("."+Ie)))if(t.isNullOrUndefined(this.progressInterval)||""===this.progressInterval)this.changeProgressValue(i,Math.round(e.loaded/e.total*100).toString()+"%");else{var s=Math.round(e.loaded/e.total*100)%parseInt(this.progressInterval,10);0!==s&&100!==s||this.changeProgressValue(i,Math.round(e.loaded/e.total*100).toString()+"%")}},s.prototype.changeProgressValue=function(e,t){e.querySelector("."+Ie).style.width=t,e.querySelector(".e-progress-bar-text").textContent=t},s.prototype.uploadInProgress=function(e,i,s,n){var a=this.getLiElement(i);if(!t.isNullOrUndefined(a)||s){if(t.isNullOrUndefined(a))this.cancelUploadingFile(i,e,n);else{"5"===i.statusCode&&this.cancelUploadingFile(i,e,n,a),a.querySelectorAll("."+Ue).length>0||!a.querySelector("."+Ae)||(a.querySelector("."+Ae).classList.add("e-upload-progress"),this.createProgressBar(a),this.updateProgressBarClasses(a,"e-upload-progress"),a.querySelector("."+Ae).classList.remove(Ve)),this.updateProgressbar(e,a);var r=a.querySelector("."+He);t.isNullOrUndefined(r)||(r.classList.add(Be,"e-upload-progress"),r.setAttribute("title",this.localizedTexts("abort")),r.classList.remove(He))}var l={e:e,operation:"upload",file:this.updateStatus(i,this.localizedTexts("inProgress"),"3")};this.trigger("progress",l)}},s.prototype.cancelUploadingFile=function(e,s,n,a){var r=this;if("5"===e.statusCode){var l={event:s,fileData:e,cancel:!1,customFormData:[],currentRequest:null};this.trigger("canceling",l,function(s){if(s.cancel){if(e.statusCode="3",!t.isNullOrUndefined(a)){var l=a.querySelector("."+Be);t.isNullOrUndefined(l)||(i.hideSpinner(l),t.detach(a.querySelector(".e-spinner-pane")))}}else{n.emitError=!1,n.httpRequest.abort();var o=new FormData;if("5"===e.statusCode){var h=r.element.getAttribute("name");o.append(h,e.name),o.append("cancel-uploading",e.name),r.updateFormData(o,s.customFormData);var p=new t.Ajax(r.asyncSettings.removeUrl,"POST",!0,null);p.emitError=!1,p.beforeSend=function(e){s.currentRequest&&r.updateCustomheader(p.httpRequest,s.currentRequest)},p.onLoad=function(t){return r.removecanceledFile(t,e),{}},p.send(o)}}})}},s.prototype.removecanceledFile=function(e,s){var n=this.getLiElement(s);if(!(t.isNullOrUndefined(n)||n.querySelector("."+Re)||t.isNullOrUndefined(n.querySelector("."+Be)))){this.updateStatus(s,this.localizedTexts("fileUploadCancel"),"5"),this.renderFailureState(e,s,n);var a=n.querySelector("."+He);t.isNullOrUndefined(n)||(i.hideSpinner(a),t.isNullOrUndefined(n.querySelector(".e-spinner-pane"))||t.detach(n.querySelector(".e-spinner-pane")));var r={event:e,response:e&&e.currentTarget?this.getResponse(e):null,operation:"cancel",file:s};this.trigger("success",r)}},s.prototype.renderFailureState=function(e,i,s){var n=this;this.updateProgressBarClasses(s,Ve),this.removeProgressbar(s,"failure"),t.isNullOrUndefined(s.querySelector(".e-file-status"))||s.querySelector(".e-file-status").classList.add(Ve);var a=s.querySelector("."+Be);t.isNullOrUndefined(a)||(a.classList.remove(Be,"e-upload-progress"),a.classList.add(He),a.setAttribute("title",this.localizedTexts("remove")),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}}),a.parentElement.insertBefore(this.pauseButton,a),this.pauseButton.setAttribute("title",this.localizedTexts("retry")),this.pauseButton.setAttribute("aria-label",this.localizedTexts("retry")),s.querySelector("."+Re).addEventListener("click",function(e){n.reloadcanceledFile(e,i,s,!1)},!1))},s.prototype.reloadcanceledFile=function(e,i,s,n){i.statusCode="1",i.status=this.localizedTexts("readyToUploadMessage"),n||(t.isNullOrUndefined(s.querySelector("."+Ae))||s.querySelector("."+Ae).classList.remove(Ve),t.isNullOrUndefined(s.querySelector("."+Re))||t.detach(s.querySelector("."+Re)),this.pauseButton=null),t.isNullOrUndefined(s)||s.classList.add("e-restrict-retry"),this.upload([i])},s.prototype.uploadComplete=function(e,i,s){var n=e.target;if(4===n.readyState&&n.status>=200&&n.status<=299){var a=this.getLiElement(i);if(t.isNullOrUndefined(a)&&(!s||t.isNullOrUndefined(s))&&this.showFileList)return;if(!t.isNullOrUndefined(a)){this.updateProgressBarClasses(a,Fe),this.removeProgressbar(a,"success");var r=a.querySelector("."+Be);t.isNullOrUndefined(r)||(r.classList.add(Ne),r.setAttribute("title",this.localizedTexts("delete")),r.setAttribute("aria-label",this.localizedTexts("delete")),r.classList.remove(Be),r.classList.remove("e-upload-progress"))}this.raiseSuccessEvent(e,i)}else this.uploadFailed(e,i)},s.prototype.getResponse=function(e){var t=e.currentTarget;return{readyState:t.readyState,statusCode:t.status,statusText:t.statusText,headers:t.getAllResponseHeaders(),withCredentials:t.withCredentials}},s.prototype.raiseSuccessEvent=function(e,s){var n=this,a=e&&e.currentTarget?this.getResponse(e):null,r=this.localizedTexts("uploadSuccessMessage"),l={e:e,response:a,operation:"upload",file:this.updateStatus(s,r,"2",!1),statusText:r},o=this.getLiElement(s);if(!t.isNullOrUndefined(o)){var h=o.querySelector(".e-spinner-pane");t.isNullOrUndefined(h)||(i.hideSpinner(o),t.detach(h))}this.trigger("success",l,function(e){n.updateStatus(s,e.statusText,"2"),n.multiple?n.uploadedFilesData.push(s):n.uploadedFilesData=[s],n.trigger("change",{file:n.uploadedFilesData}),n.checkActionButtonStatus(),n.fileList.length>0?n.getLiElement(s).classList.contains("e-restrict-retry")?n.getLiElement(s).classList.remove("e-restrict-retry"):(n.uploadSequential(),n.checkActionComplete(!0)):n.showFileList||n.checkActionComplete(!0)})},s.prototype.uploadFailed=function(e,i){var s=this,n=this.getLiElement(i),a=e&&e.currentTarget?this.getResponse(e):null,r=this.localizedTexts("uploadFailedMessage"),l={e:e,response:a,operation:"upload",file:this.updateStatus(i,r,"0",!1),statusText:r};t.isNullOrUndefined(n)||this.renderFailureState(e,i,n),this.trigger("failure",l,function(e){s.updateStatus(i,e.statusText,"0"),s.checkActionButtonStatus(),s.uploadSequential(),s.checkActionComplete(!0)})},s.prototype.uploadSequential=function(){this.sequentialUpload&&(this.autoUpload?this.checkAutoUpload(this.filesData):this.uploadButtonClick())},s.prototype.checkActionComplete=function(e){e?++this.actionCompleteCount:--this.actionCompleteCount,this.raiseActionComplete()},s.prototype.raiseActionComplete=function(){if(this.filesData.length===this.actionCompleteCount&&this.flag){this.flag=!1;var e={fileData:[]};e.fileData=this.getSelectedFileStatus(this.selectedFiles),this.trigger("actionComplete",e)}},s.prototype.getSelectedFileStatus=function(e){for(var t=[],i=0,s=0;s<e.length;s++)for(var n=e[s],a=0;a<this.filesData.length;a++)if(this.filesData[a].name===n.name&&this.filesData[a].status===n.status){t[i]=this.filesData[a],++i;break}return t},s.prototype.updateProgressBarClasses=function(e,i){var s=e.querySelector("."+Ie);t.isNullOrUndefined(s)||(s.classList.add(i),this.actionButtons&&this.clearButton&&this.uploadWrapper&&("e-upload-progress"!==i||this.clearButton.hasAttribute("disabled")?"e-upload-success"!==i&&"e-upload-fails"!==i||0!==this.uploadWrapper.querySelectorAll(".e-upload-progress-bar.e-upload-progress:not(.e-upload-success):not(.e-upload-fails)").length||!this.clearButton.hasAttribute("disabled")||this.clearButton.removeAttribute("disabled"):this.clearButton.setAttribute("disabled","disabled")))},s.prototype.removeProgressbar=function(e,i){var s=this;t.isNullOrUndefined(e.querySelector("."+Ue))||(this.progressAnimation=new t.Animation({duration:1250}),this.progressAnimation.animate(e.querySelector("."+Ue),{name:"FadeOut"}),this.progressAnimation.animate(e.querySelector(".e-progress-bar-text"),{name:"FadeOut"}),setTimeout(function(){s.animateProgressBar(e,i)},750))},s.prototype.animateProgressBar=function(e,i){"success"===i?(e.classList.add(Fe),t.isNullOrUndefined(e.querySelector("."+Ae))||(e.querySelector("."+Ae).classList.remove("e-upload-progress"),this.progressAnimation.animate(e.querySelector("."+Ae),{name:"FadeIn"}),e.querySelector("."+Ae).classList.add(Fe))):t.isNullOrUndefined(e.querySelector("."+Ae))||(e.querySelector("."+Ae).classList.remove("e-upload-progress"),this.progressAnimation.animate(e.querySelector("."+Ae),{name:"FadeIn"}),e.querySelector("."+Ae).classList.add(Ve)),e.querySelector("."+Ue)&&t.detach(e.querySelector("."+Ue))},s.prototype.setExtensions=function(e){""===e||t.isNullOrUndefined(e)?this.element.removeAttribute("accept"):this.element.setAttribute("accept",e)},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.setRTL=function(){this.enableRtl?t.addClass([this.uploadWrapper],"e-rtl"):t.removeClass([this.uploadWrapper],"e-rtl")},s.prototype.localizedTexts=function(e){return this.l10n.setLocale(this.locale),this.l10n.getConstant(e)},s.prototype.setControlStatus=function(){this.enabled?(this.uploadWrapper.classList.contains("e-disabled")&&this.uploadWrapper.classList.remove("e-disabled"),!t.isNullOrUndefined(this.browseButton)&&this.element.hasAttribute("disabled")&&(this.element.removeAttribute("disabled"),this.browseButton.removeAttribute("disabled")),!t.isNullOrUndefined(this.clearButton)&&this.clearButton.hasAttribute("disabled")&&this.clearButton.removeAttribute("disabled"),!t.isNullOrUndefined(this.uploadButton)&&this.uploadButton.hasAttribute("disabled")&&this.uploadButton.hasAttribute("disabled")):(this.uploadWrapper.classList.add("e-disabled"),this.element.setAttribute("disabled","disabled"),this.browseButton.setAttribute("disabled","disabled"),t.isNullOrUndefined(this.clearButton)||this.clearButton.setAttribute("disabled","disabled"),t.isNullOrUndefined(this.uploadButton)||this.uploadButton.setAttribute("disabled","disabled"))},s.prototype.checkHTMLAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["accept","multiple","disabled"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"accept":(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.allowedExtensions||e)&&(this.setProperties({allowedExtensions:this.element.getAttribute("accept")},!e),this.initialAttr.accept=this.allowedExtensions);break;case"multiple":if(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.multiple||e){var a="multiple"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({multiple:a},!e),this.initialAttr.multiple=!0}break;case"disabled":if(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.enabled||e){var r="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:r},!e),this.initialAttr.disabled=!0}}}},s.prototype.chunkUpload=function(e,t,i){var s=Math.min(this.asyncSettings.chunkSize,e.size),n={chunkIndex:0,blob:e.rawFile.slice(0,s),file:e,start:0,end:s,retryCount:0,request:null};this.sendRequest(e,n,t,i)},s.prototype.sendRequest=function(e,i,s,n){var a=this,r=new FormData,l=e.rawFile.slice(i.start,i.end);r.append(this.uploaderName,l,e.name),r.append("chunk-index",i.chunkIndex.toString()),r.append("chunkIndex",i.chunkIndex.toString());var o=Math.max(Math.ceil(e.size/this.asyncSettings.chunkSize),1);r.append("total-chunk",o.toString()),r.append("totalChunk",o.toString());var h=new t.Ajax({url:this.asyncSettings.saveUrl,type:"POST",async:!0,contentType:null});h.emitError=!1,h.onLoad=function(e){return a.chunkUploadComplete(e,i,s),{}},h.onUploadProgress=function(e){return a.chunkUploadInProgress(e,i,s),{}};var p={fileData:e,customFormData:[],cancel:!1,chunkSize:0===this.asyncSettings.chunkSize?null:this.asyncSettings.chunkSize};h.beforeSend=function(t){p.currentRequest=h.httpRequest,p.currentChunkIndex=i.chunkIndex,0===p.currentChunkIndex?a.trigger("uploading",p,function(i){a.uploadingEventCallback(r,i,t,e)}):a.trigger("chunkUploading",p,function(i){a.uploadingEventCallback(r,i,t,e)})},h.onError=function(e){return a.chunkUploadFailed(e,i,s),{}},h.send(r),i.request=h},s.prototype.uploadingEventCallback=function(e,t,i,s){t.cancel?this.eventCancelByArgs(i,t,s):this.updateFormData(e,t.customFormData)},s.prototype.eventCancelByArgs=function(e,i,s){var n=this;if(e.cancel=!0,"5"!==i.fileData.statusCode){i.fileData.statusCode="5",i.fileData.status=this.localizedTexts("fileUploadCancel");var a=this.getLiElement(i.fileData);if(a){t.isNullOrUndefined(a.querySelector("."+Ae))||(a.querySelector("."+Ae).innerHTML=this.localizedTexts("fileUploadCancel"),a.querySelector("."+Ae).classList.add(Ve)),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}});var r=a.querySelector("."+He);r&&r.parentElement.insertBefore(this.pauseButton,r),this.pauseButton.setAttribute("title",this.localizedTexts("retry")),this.pauseButton.addEventListener("click",function(e){n.reloadcanceledFile(e,s,a)},!1),this.checkActionButtonStatus()}}},s.prototype.checkChunkUpload=function(){return!(this.asyncSettings.chunkSize<=0||t.isNullOrUndefined(this.asyncSettings.chunkSize))},s.prototype.chunkUploadComplete=function(e,s,n){var a,r=this,l=e.target;if(4===l.readyState&&l.status>=200&&l.status<300){var o=e&&e.currentTarget?this.getResponse(e):null,h=Math.max(Math.ceil(s.file.size/this.asyncSettings.chunkSize),1),p={event:e,file:s.file,chunkIndex:s.chunkIndex,totalChunk:h,chunkSize:this.asyncSettings.chunkSize,response:o};if(this.trigger("chunkSuccess",p),!t.isNullOrUndefined(n)&&n||(a=this.getLiElement(s.file)),this.updateMetaData(s),s.end===s.file.size&&(s.file.statusCode="3"),"5"===s.file.statusCode){var d={event:e,fileData:s.file,cancel:!1,customFormData:[]};this.trigger("canceling",d,function(e){if(e.cancel){s.file.statusCode="3";var o=a.querySelector("."+Be);t.isNullOrUndefined(a)||t.isNullOrUndefined(o)||(i.hideSpinner(o),t.detach(a.querySelector(".e-spinner-pane"))),r.sendNextRequest(s)}else{s.request.emitError=!1,l.abort();var h=new FormData,p=r.element.getAttribute("name");h.append(p,s.file.name),h.append("cancel-uploading",s.file.name),h.append("cancelUploading",s.file.name),r.updateFormData(h,e.customFormData);var d=new t.Ajax(r.asyncSettings.removeUrl,"POST",!0,null);d.emitError=!1,d.onLoad=function(e){return r.removeChunkFile(e,s,n),{}},d.send(h)}})}else{if(h-1===s.chunkIndex&&h>s.chunkIndex){var u=this.pausedData.indexOf(s);return u>=0&&this.pausedData.splice(u,1),t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(n)||!n)&&a&&(a&&!t.isNullOrUndefined(a.querySelector("."+Me))&&t.detach(a.querySelector("."+Me)),this.removeChunkProgressBar(s)),void this.raiseSuccessEvent(e,s.file)}"4"!==s.file.statusCode&&this.sendNextRequest(s)}}else this.chunkUploadFailed(e,s)},s.prototype.sendNextRequest=function(e){e.start=e.end,e.end+=this.asyncSettings.chunkSize,e.end=Math.min(e.end,e.file.size),e.chunkIndex+=1,this.sendRequest(e.file,e)},s.prototype.removeChunkFile=function(e,s,n){if(t.isNullOrUndefined(this.template)&&t.isNullOrUndefined(n)&&!n){var a=this.getLiElement(s.file),r=a.querySelector("."+Be),l=r;this.updateStatus(s.file,this.localizedTexts("fileUploadCancel"),"5"),this.updateProgressBarClasses(a,Ve),this.removeProgressbar(a,"failure"),r&&(r.classList.remove(Be),r.classList.add(He),r.setAttribute("title",this.localizedTexts("remove")));var o=a.querySelector("."+Me);o&&(o.classList.add(Re),o.classList.remove(Me),o.setAttribute("title",this.localizedTexts("retry"))),t.isNullOrUndefined(a)||t.isNullOrUndefined(r)||t.isNullOrUndefined(a.querySelector(".e-spinner-pane"))||(i.hideSpinner(l),t.detach(a.querySelector(".e-spinner-pane")))}},s.prototype.pauseUpload=function(e,t,i){e.file.statusCode="4",e.file.status=this.localizedTexts("pause"),this.updateMetaData(e);var s={event:t||null,file:e.file,chunkIndex:e.chunkIndex,chunkCount:Math.round(e.file.size/this.asyncSettings.chunkSize),chunkSize:this.asyncSettings.chunkSize};this.abortUpload(e,i,s),this.sequentialUpload&&this.uploadSequential()},s.prototype.abortUpload=function(e,i,s){"4"!==e.file.statusCode&&(e.request.emitError=!1,e.request.httpRequest.abort());var n=this.getLiElement(e.file);if(t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(i)||!i)&&n){var a=n.querySelector("."+Me);a.classList.remove(Me),a.classList.add("e-file-play-btn"),a.setAttribute("title",this.localizedTexts("resume")),a.nextElementSibling.classList.add(He),a.nextElementSibling.classList.remove(Be),a.nextElementSibling.setAttribute("title",this.localizedTexts("remove"))}for(var r=0;r<this.pausedData.length;r++)this.pausedData[r].file.name===e.file.name&&this.pausedData.splice(r,1);this.pausedData.push(e),this.trigger("pausing",s)},s.prototype.resumeUpload=function(e,i,s){var n,a=this.getLiElement(e.file);t.isNullOrUndefined(a)||(n=a.querySelector(".e-file-play-btn")),t.isNullOrUndefined(n)||!t.isNullOrUndefined(s)&&s||(n.classList.remove("e-file-play-btn"),n.classList.add(Me),n.setAttribute("title",this.localizedTexts("pause")),n.nextElementSibling.classList.remove(He),n.nextElementSibling.classList.add(Be),n.nextElementSibling.setAttribute("title",this.localizedTexts("abort"))),e.file.status=this.localizedTexts("inProgress"),e.file.statusCode="3",this.updateMetaData(e);var r={event:i||null,file:e.file,chunkIndex:e.chunkIndex,chunkCount:Math.round(e.file.size/this.asyncSettings.chunkSize),chunkSize:this.asyncSettings.chunkSize};this.trigger("resuming",r);for(var l=0;l<this.pausedData.length;l++)this.pausedData[l].end===this.pausedData[l].file.size?this.chunkUploadComplete(i,e,s):this.pausedData[l].file.name===e.file.name&&(this.pausedData[l].start=this.pausedData[l].end,this.pausedData[l].end=this.pausedData[l].end+this.asyncSettings.chunkSize,this.pausedData[l].end=Math.min(this.pausedData[l].end,this.pausedData[l].file.size),this.pausedData[l].chunkIndex=this.pausedData[l].chunkIndex+1,this.sendRequest(this.pausedData[l].file,this.pausedData[l],s))},s.prototype.updateMetaData=function(e){-1===this.uploadMetaData.indexOf(e)?this.uploadMetaData.push(e):(this.uploadMetaData.splice(this.uploadMetaData.indexOf(e),1),this.uploadMetaData.push(e))},s.prototype.removeChunkProgressBar=function(e){var i=this.getLiElement(e.file);if(!t.isNullOrUndefined(i)){this.updateProgressBarClasses(i,Fe),this.removeProgressbar(i,"success");var s=i.querySelector("."+Be);t.isNullOrUndefined(s)||(s.classList.add(Ne),s.setAttribute("title",this.localizedTexts("delete")),s.classList.remove(Be,"e-upload-progress"))}},s.prototype.chunkUploadFailed=function(e,i,s){var n,a=this,r=Math.max(Math.ceil(i.file.size/this.asyncSettings.chunkSize),1);!t.isNullOrUndefined(this.template)||!t.isNullOrUndefined(s)&&s||(n=this.getLiElement(i.file));var l=e&&e.currentTarget?this.getResponse(e):null,o={event:e,file:i.file,chunkIndex:i.chunkIndex,totalChunk:r,chunkSize:this.asyncSettings.chunkSize,cancel:!1,response:l};this.trigger("chunkFailure",o,function(r){if(!r.cancel)if(i.retryCount<a.asyncSettings.retryCount)setTimeout(function(){a.retryRequest(n,i,s)},a.asyncSettings.retryAfterDelay);else{if(!t.isNullOrUndefined(n)){var o=n.querySelector("."+Me)?n.querySelector("."+Me):n.querySelector(".e-file-play-btn");t.isNullOrUndefined(o)||(o.classList.add(Re),o.classList.remove(Me,"e-file-play-btn")),a.updateProgressBarClasses(n,Ve),a.removeProgressbar(n,"failure"),n.querySelector(".e-icons").classList.remove("e-upload-progress");var h=n.querySelector("."+Be)?n.querySelector("."+Be):n.querySelector("."+He);h.classList.remove(Be),t.isNullOrUndefined(n.querySelector("."+Me))||t.detach(n.querySelector("."+Me)),i.start>0?(h.classList.add(Ne),h.setAttribute("title",a.localizedTexts("delete"))):(h.classList.add(He),h.setAttribute("title",a.localizedTexts("remove")))}i.retryCount=0;var p=i.file,d=a.localizedTexts("uploadFailedMessage"),u={e:e,response:l,operation:"upload",file:a.updateStatus(p,d,"0",!1),statusText:d};a.trigger("failure",u,function(e){a.updateStatus(p,e.statusText,"0"),a.uploadSequential(),a.checkActionComplete(!0)})}})},s.prototype.retryRequest=function(e,i,s){t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(s)||!s)&&e&&this.updateProgressBarClasses(e,Ve),i&&(i.retryCount+=1,this.sendRequest(i.file,i))},s.prototype.checkPausePlayAction=function(e){var t=e.target,i=e.target.parentElement,s=this.fileList.indexOf(i),n=this.filesData[s],a=this.getCurrentMetaData(n);t.classList.contains(Me)?this.pauseUpload(a,e):t.classList.contains("e-file-play-btn")?this.resumeUpload(a,e):t.classList.contains(Re)&&(a.file.status===this.localizedTexts("fileUploadCancel")?this.retryUpload(a,!1):this.retryUpload(a,!0))},s.prototype.retryUpload=function(e,t){t?(e.end=e.end+this.asyncSettings.chunkSize,e.start=e.start+this.asyncSettings.chunkSize,this.sendRequest(e.file,e)):(e.file.statusCode="1",e.file.status=this.localizedTexts("readyToUploadMessage"),this.chunkUpload(e.file)),this.getLiElement(e.file).classList.add("e-restrict-retry")},s.prototype.chunkUploadInProgress=function(e,i,s){var n=this;if("4"!==i.file.statusCode){"4"!==i.file.statusCode&&"5"!==i.file.statusCode&&(i.file.statusCode="3",i.file.status=this.localizedTexts("inProgress")),this.updateMetaData(i);var a=this.getLiElement(i.file);if(!t.isNullOrUndefined(a)){var r=a.querySelector("."+Re);if(t.isNullOrUndefined(r)||(r.classList.add(Me),r.setAttribute("title",this.localizedTexts("pause")),r.classList.remove(Re)),!t.isNullOrUndefined(a)){if(!(a.querySelectorAll("."+Ue).length>0)){var l=a.querySelector("."+Ae);t.isNullOrUndefined(this.template)&&(l.classList.add("e-upload-progress"),l.classList.remove(Ve),this.createProgressBar(a),this.updateProgressBarClasses(a,"e-upload-progress"));var o=a.querySelector("."+He)?a.querySelector("."+He):a.querySelector("."+Ne);t.isNullOrUndefined(o)||(o.classList.add(Be),o.setAttribute("title",this.localizedTexts("abort")),o.classList.remove(He))}if(!isNaN(Math.round(e.loaded/e.total*100))&&t.isNullOrUndefined(this.template)&&"4"!==i.file.statusCode){var h=void 0,p=Math.ceil(i.file.size/this.asyncSettings.chunkSize)-1;this.asyncSettings.chunkSize&&p&&(h=Math.round(i.chunkIndex/p*100),this.changeProgressValue(a,h.toString()+"%"))}0===i.chunkIndex&&this.checkActionButtonStatus()}if(t.isNullOrUndefined(a.querySelector("."+Me))&&t.isNullOrUndefined(this.template)&&t.isNullOrUndefined(a.querySelector("."+Ne))){this.pauseButton=this.createElement("span",{className:"e-icons e-file-pause-btn",attrs:{tabindex:this.btnTabIndex}}),"msie"===this.browserName&&this.pauseButton.classList.add("e-msie");var d=a.querySelector("."+Be);d.parentElement.insertBefore(this.pauseButton,d),this.pauseButton.setAttribute("title",this.localizedTexts("pause")),this.pauseButton.addEventListener("click",function(e){n.checkPausePlayAction(e)},!1)}}}},s.prototype.bytesToSize=function(e){var t=-1;if(!e)return"0.0 KB";do{e/=1024,t++}while(e>99);return t>=2&&(e*=1024,t=1),Math.max(e,0).toFixed(1)+" "+["KB","MB"][t]},s.prototype.sortFileList=function(e){for(var t=e=e||this.sortFilesList,i=[],s=0;s<t.length;s++)i.push(t[s].name);for(var n=[],a=0,r=i.sort();a<r.length;a++)for(var l=r[a],s=0;s<t.length;s++)l===t[s].name&&n.push(t[s]);return n},s.prototype.destroy=function(){this.element.value=null,this.clearTemplate(),this.clearAll(),this.unWireEvents(),this.unBindDropEvents(),this.multiple&&this.element.removeAttribute("multiple"),this.enabled||this.element.removeAttribute("disabled"),this.element.removeAttribute("accept"),this.setInitialAttributes();for(var i=0,s=["aria-label","directory","webkitdirectory","tabindex"];i<s.length;i++){var n=s[i];this.element.removeAttribute(n)}t.isNullOrUndefined(this.uploadWrapper)||(this.uploadWrapper.parentElement.appendChild(this.element),t.detach(this.uploadWrapper)),this.uploadWrapper=null,this.uploadWrapper=null,this.browseButton=null,this.dropAreaWrapper=null,this.dropZoneElement=null,this.dropArea=null,this.keyboardModule=null,this.clearButton=null,this.uploadButton=null,e.prototype.destroy.call(this)},s.prototype.upload=function(e,t){var i=this;if(e=e||this.filesData,this.sequentialUpload&&(this.isFirstFileOnSelection||t))this.sequenceUpload(e);else{var s=this.getFilesInArray(e),n={customFormData:[],currentRequest:null,cancel:!1};this.trigger("beforeUpload",n,function(e){e.cancel||(i.customFormDatas=e.customFormData&&e.customFormData.length>0?e.customFormData:i.customFormDatas,i.uploadFiles(s,t))})}},s.prototype.getFilesInArray=function(e){var t=[];return e&&(e instanceof Array?t=e:t.push(e)),t},s.prototype.serverReadFileBase64=function(e,t,i){var s=this;return new Promise(function(n,a){var r=s.fileStreams[e].rawFile;try{var l=new FileReader;l.onload=function(e){return function(){try{var t=e.result,i=t?t.split(";base64,")[1]:null;n(i)}catch(e){a(e)}}}(l),l.readAsDataURL(r.slice(t,t+i))}catch(e){a(e)}})},s.prototype.uploadFileCount=function(e){var t=this.filesData;return t&&0!==t.length?t.length:-1},s.prototype.getFileRead=function(e,t){var i=this.filesData;if(!i||0===i.length)return-1;var s=i[e],n=this.newFileRef++;return this.fileStreams[n]=s,n},s.prototype.uploadFiles=function(e,i){var s=[];if(""!==this.asyncSettings.saveUrl&&!t.isNullOrUndefined(this.asyncSettings.saveUrl)){if(!i||t.isNullOrUndefined(i))if(this.multiple)s=this.filterfileList(e);else{var n=[];n.push(e[0]),s=this.filterfileList(n)}else s=e;for(var a=0;a<s.length;a++)this.uploadFilesRequest(s,a,i)}},s.prototype.uploadFilesRequest=function(e,i,s){var n=this,a=this.checkChunkUpload(),r=new t.Ajax(this.asyncSettings.saveUrl,"POST",!0,null);r.emitError=!1;var l={fileData:e[i],customFormData:[],cancel:!1},o=new FormData;if(r.beforeSend=function(t){l.currentRequest=r.httpRequest,n.trigger("uploading",l,function(s){s.cancel&&n.eventCancelByArgs(t,s,e[i]),n.customFormDatas&&n.customFormDatas.length>0&&n.updateFormData(o,n.customFormDatas),n.updateFormData(o,s.customFormData)})},"1"===e[i].statusCode){var h=this.element.getAttribute("name");o.append(h,e[i].rawFile,e[i].name),a&&e[i].size>this.asyncSettings.chunkSize?this.chunkUpload(e[i],s,i):(r.onLoad=function(t){return l.cancel?{}:(n.uploadComplete(t,e[i],s),{})},r.onUploadProgress=function(t){return l.cancel?{}:(n.uploadInProgress(t,e[i],s,r),{})},r.onError=function(t){return n.uploadFailed(t,e[i]),{}},r.send(o))}},s.prototype.spliceFiles=function(e){for(var t=this.fileList[e],i=this.getFilesData(),s=+t.getAttribute("data-files-count"),n=0,a=0;a<e;a++)n+=+this.fileList[a].getAttribute("data-files-count");for(var r=n+s-1;r>=n;r--)i.splice(r,1)},s.prototype.remove=function(e,i,s,n,a){var r=this;t.isNullOrUndefined(n)&&(n=!0);var l={event:a,cancel:!1,filesData:[],customFormData:[],postRawFile:n,currentRequest:null},o={cancel:!1,customFormData:[],currentRequest:null};this.trigger("beforeRemove",o,function(n){if(!n.cancel)if(r.isFormUpload())l.filesData=e,r.trigger("removing",l,function(i){if(!i.cancel)for(var s=!1,n=void 0,a=0,l=r.getFilesInArray(e);a<l.length;a++){var o=l[a];if(s||(n=r.fileList.indexOf(o.list)),n>-1){var h=t.isNullOrUndefined(o.input)?null:o.input;h&&t.detach(h),r.spliceFiles(n),t.detach(r.fileList[n]),r.fileList.splice(n,1),s=!0,n=-1}}});else if(r.isForm&&(t.isNullOrUndefined(r.asyncSettings.removeUrl)||""===r.asyncSettings.removeUrl))l.filesData=r.getFilesData(),r.trigger("removing",l,function(e){e.cancel||r.clearAll()});else{var o=[];(e=t.isNullOrUndefined(e)?r.filesData:e)instanceof Array?o=e:o.push(e),l.filesData=o;for(var h=r.asyncSettings.removeUrl,p=""!==h&&!t.isNullOrUndefined(h),d=0,u=o;d<u.length;d++)!function(e){var t=r.uploadedFilesData.indexOf(e);("2"===e.statusCode||"4"===e.statusCode||"0"===e.statusCode&&-1!==t)&&p?r.removeUploadedFile(e,l,s,i):s?r.removeFilesData(e,i):r.trigger("removing",l,function(t){t.cancel||r.removeFilesData(e,i)}),a&&!a.target.classList.contains(He)&&r.checkActionComplete(!1)}(u[d])}})},s.prototype.clearAll=function(){var e=this;if(t.isNullOrUndefined(this.listParent))return"msie"!==this.browserName&&(this.element.value=""),void(this.filesData=[]);var i={cancel:!1,filesData:this.filesData};this.trigger("clearing",i,function(t){t.cancel||(e.clearData(),e.actionCompleteCount=0,e.count=-1)})},s.prototype.getFilesData=function(e){return t.isNullOrUndefined(e)?this.filesData:this.getSelectedFiles(e)},s.prototype.pause=function(e,t){e=e||this.filesData;var i=this.getFilesInArray(e);this.pauseUploading(i,t)},s.prototype.pauseUploading=function(e,t){for(var i=this.getFiles(e),s=0;s<i.length;s++)"3"===i[s].statusCode&&this.pauseUpload(this.getCurrentMetaData(i[s],null),null,t)},s.prototype.getFiles=function(e){var i=[];return t.isNullOrUndefined(e)||e instanceof Array?i=e:i.push(e),i},s.prototype.resume=function(e,t){e=e||this.filesData;var i=this.getFilesInArray(e);this.resumeFiles(i,t)},s.prototype.resumeFiles=function(e,t){for(var i=this.getFiles(e),s=0;s<i.length;s++)"4"===i[s].statusCode&&this.resumeUpload(this.getCurrentMetaData(i[s],null),null,t)},s.prototype.retry=function(e,t,i){e=e||this.filesData;var s=this.getFilesInArray(e);this.sequentialUpload&&this.isFirstFileOnSelection&&(this.isFirstFileOnSelection=!1),this.retryFailedFiles(s,t,i)},s.prototype.retryFailedFiles=function(e,t,i){for(var s=this.getFiles(e),n=0;n<s.length;n++)if("5"===s[n].statusCode||"0"===s[n].statusCode)if(this.asyncSettings.chunkSize>0&&this.getCurrentMetaData(s[n],null))this.retryUpload(this.getCurrentMetaData(s[n],null),t);else{var a=void 0;i||(a=this.fileList[this.filesData.indexOf(s[n])]),this.reloadcanceledFile(null,s[n],a,i)}},s.prototype.cancel=function(e){e=e||this.filesData;var t=this.getFilesInArray(e);this.cancelUpload(t)},s.prototype.cancelUpload=function(e){var t=this.getFiles(e);if(this.asyncSettings.chunkSize>0){for(s=0;s<t.length;s++)if("3"===t[s].statusCode){var i=this.getCurrentMetaData(t[s],null);i.file.statusCode="5",i.file.status=this.localizedTexts("fileUploadCancel"),this.updateMetaData(i),this.showHideUploadSpinner(t[s])}}else for(var s=0;s<t.length;s++)"3"===t[s].statusCode&&(t[s].statusCode="5",t[s].status=this.localizedTexts("fileUploadCancel"),this.showHideUploadSpinner(t[s]))},s.prototype.showHideUploadSpinner=function(e){var s=this.getLiElement(e);if(!t.isNullOrUndefined(s)&&t.isNullOrUndefined(this.template)){var n=s.querySelector("."+Be);i.createSpinner({target:n,width:"20px"}),i.showSpinner(n)}},we([t.Complex({saveUrl:"",removeUrl:""},qe)],s.prototype,"asyncSettings",void 0),we([t.Property(!1)],s.prototype,"sequentialUpload",void 0),we([t.Property({})],s.prototype,"htmlAttributes",void 0),we([t.Property("")],s.prototype,"cssClass",void 0),we([t.Property(!0)],s.prototype,"enabled",void 0),we([t.Property(null)],s.prototype,"template",void 0),we([t.Property(!0)],s.prototype,"multiple",void 0),we([t.Property(!0)],s.prototype,"autoUpload",void 0),we([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),we([t.Complex({},ze)],s.prototype,"buttons",void 0),we([t.Property("")],s.prototype,"allowedExtensions",void 0),we([t.Property(0)],s.prototype,"minFileSize",void 0),we([t.Property(3e7)],s.prototype,"maxFileSize",void 0),we([t.Property(null)],s.prototype,"dropArea",void 0),we([t.Collection([{}],We)],s.prototype,"files",void 0),we([t.Property(!0)],s.prototype,"showFileList",void 0),we([t.Property(!1)],s.prototype,"directoryUpload",void 0),we([t.Property("Default")],s.prototype,"dropEffect",void 0),we([t.Event()],s.prototype,"created",void 0),we([t.Event()],s.prototype,"actionComplete",void 0),we([t.Event()],s.prototype,"rendering",void 0),we([t.Event()],s.prototype,"beforeUpload",void 0),we([t.Event()],s.prototype,"fileListRendering",void 0),we([t.Event()],s.prototype,"selected",void 0),we([t.Event()],s.prototype,"uploading",void 0),we([t.Event()],s.prototype,"success",void 0),we([t.Event()],s.prototype,"failure",void 0),we([t.Event()],s.prototype,"removing",void 0),we([t.Event()],s.prototype,"beforeRemove",void 0),we([t.Event()],s.prototype,"clearing",void 0),we([t.Event()],s.prototype,"progress",void 0),we([t.Event()],s.prototype,"change",void 0),we([t.Event()],s.prototype,"chunkSuccess",void 0),we([t.Event()],s.prototype,"chunkFailure",void 0),we([t.Event()],s.prototype,"chunkUploading",void 0),we([t.Event()],s.prototype,"canceling",void 0),we([t.Event()],s.prototype,"pausing",void 0),we([t.Event()],s.prototype,"resuming",void 0),s=we([t.NotifyPropertyChanges],s)}(t.Component),_e=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Xe=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ke="e-apply",Ye="e-ctrl-btn",Ze="e-switch-ctrl-btn",Ge="e-hide-hex-value",Je="e-hide-switchable-value",$e="e-hide-value",Qe="e-hsv-color",et="e-selected-value",tt="e-mode-switch-btn",it="e-nocolor-item",st="e-opacity-value",nt="e-preview-container",at="e-show-value",rt="e-selected",lt="e-tile",ot={default:["#000000","#f44336","#e91e63","#9c27b0","#673ab7","#2196f3","#03a9f4","#00bcd4","#009688","#ffeb3b","#ffffff","#ffebee","#fce4ec","#f3e5f5","#ede7f6","#e3f2fd","#e1f5fe","#e0f7fa","#e0f2f1","#fffde7","#f2f2f2","#ffcdd2","#f8bbd0","#e1bee7","#d1c4e9","#bbdefb","#b3e5fc","#b2ebf2","#b2dfdb","#fff9c4","#e6e6e6","#ef9a9a","#f48fb1","#ce93d8","#b39ddb","#90caf9","#81d4fa","#80deea","#80cbc4","#fff59d","#cccccc","#e57373","#f06292","#ba68c8","#9575cd","#64b5f6","#4fc3f7","#4dd0e1","#4db6ac","#fff176","#b3b3b3","#ef5350","#ec407a","#ab47bc","#7e57c2","#42a5f5","#29b6f6","#26c6da","#26a69a","#ffee58","#999999","#e53935","#d81b60","#8e24aa","#5e35b1","#1e88e5","#039be5","#00acc1","#00897b","#fdd835","#808080","#d32f2f","#c2185b","#7b1fa2","#512da8","#1976d2","#0288d1","#0097a7","#00796b","#fbc02d","#666666","#c62828","#ad1457","#6a1b9a","#4527a0","#1565c0","#0277bd","#00838f","#00695c","#f9a825","#4d4d4d","#b71c1c","#880e4f","#4a148c","#311b92","#0d47a1","#01579b","#006064","#004d40","#f57f17"]},ht=function(n){function a(e,t){var i=n.call(this,e,t)||this;return i.recentColors=[],i}return _e(a,n),a.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this);var i={Apply:"Apply",Cancel:"Cancel",ModeSwitcher:"Switch Mode",RecentColors:"Recent colors",CurrentColor:"Current",PreviousColor:"Previous"};this.l10n=new t.L10n("colorpicker",i,this.locale),e.getAttribute("ejs-for")&&!e.getAttribute("name")&&e.setAttribute("name",e.id)},a.prototype.render=function(){this.initWrapper(),this.inline?this.createWidget():this.createSplitBtn(),this.enableOpacity||t.addClass([this.container.parentElement],"e-hide-opacity"),this.renderComplete()},a.prototype.initWrapper=function(){var e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"});this.element.parentNode.insertBefore(e,this.element),e.appendChild(this.element),t.attributes(this.element,{tabindex:"-1",spellcheck:"false","aria-label":"colorpicker"}),this.container=this.createElement("div",{className:"e-container"}),this.getWrapper().appendChild(this.container);var i=this.value?this.roundValue(this.value).toLowerCase():"#008000ff";this.noColor&&"Palette"===this.mode&&""===this.value&&(i="");var s=i.slice(0,7);t.isNullOrUndefined(this.initialInputValue)&&(this.initialInputValue=s),this.element.value=s,this.enableOpacity?this.setProperties({value:i},!0):this.setProperties({value:s},!0),this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.tileRipple=t.rippleEffect(this.container,{selector:"."+lt}),this.ctrlBtnRipple=t.rippleEffect(this.container,{selector:".e-btn"})},a.prototype.getWrapper=function(){return this.element.parentElement},a.prototype.createWidget=function(){"Palette"===this.mode?(this.createPalette(),this.inline||this.firstPaletteFocus()):(this.createPicker(),this.inline||this.getDragHandler().focus()),this.isRgb=!0,this.createInput(),this.createCtrlBtn(),this.disabled||this.wireEvents(),this.inline&&this.disabled&&this.toggleDisabled(!0),t.Browser.isDevice&&this.refreshPopupPos()},a.prototype.createSplitBtn=function(){var e=this,n=this.createElement("button",{className:"e-split-colorpicker"});this.getWrapper().appendChild(n),this.splitBtn=new s.SplitButton({iconCss:"e-selected-color",target:this.container,disabled:this.disabled,enableRtl:this.enableRtl,createPopupOnClick:this.createPopupOnClick,open:this.onOpen.bind(this),click:function(){var t=new MouseEvent("click",{bubbles:!0,cancelable:!1});e.trigger("change",{currentValue:{hex:e.value.slice(0,7),rgba:e.convertToRgbString(e.hexToRgb(e.value))},previousValue:{hex:null,rgba:null},value:e.value,event:t})}}),this.splitBtn.createElement=this.createElement,this.splitBtn.appendTo(n),this.splitBtn.element.setAttribute("aria-label","colorpicker");var a=this.createElement("span",{className:"e-split-preview"});t.select(".e-selected-color",n).appendChild(a),a.style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value));var r=this.getPopupEle();if(t.addClass([r],"e-colorpicker-popup"),this.cssClass){var l=this.cssClass.replace(/\s+/g," ").trim().split(" ");r&&t.addClass([r],l),this.splitBtn&&this.splitBtn.activeElem&&this.splitBtn.activeElem[0]&&t.addClass([this.splitBtn.activeElem[0]],l),this.splitBtn&&this.splitBtn.activeElem&&this.splitBtn.activeElem[1]&&t.addClass([this.splitBtn.activeElem[1]],l),this.splitBtn&&this.splitBtn.element&&this.splitBtn.element.parentElement&&t.addClass([this.splitBtn.element.parentElement],l)}if(t.Browser.isDevice&&!this.createPopupOnClick){var o=this.getPopupInst();o.relateTo=document.body,o.position={X:"center",Y:"center"},o.targetType="container",o.collision={X:"fit",Y:"fit"},o.offsetY=4,r.style.zIndex=i.getZindexPartial(this.splitBtn.element).toString()}this.bindCallBackEvent()},a.prototype.onOpen=function(){if(this.trigger("open",{element:this.container}),!t.Browser.isDevice){var e=this.getPopupInst();i.isCollide(e.element).length>0&&(e.collision={X:"flip",Y:"fit"},e.position={X:"right",Y:"bottom"},e.targetType="container")}},a.prototype.getPopupInst=function(){return t.getInstance(this.getPopupEle(),i.Popup)},a.prototype.bindCallBackEvent=function(){var e=this;this.splitBtn.beforeOpen=function(n){var a=new s.Deferred;return e.trigger("beforeOpen",n,function(s){if(!s.cancel){var r=e.getPopupEle();if(r.style.top=t.formatUnit(0+pageYOffset),r.style.left=t.formatUnit(0+pageXOffset),r.style.display="block",e.createWidget(),r.style.display="",t.Browser.isDevice){if(e.createPopupOnClick){var l=e.getPopupInst();l.relateTo=document.body,l.position={X:"center",Y:"center"},l.targetType="container",l.collision={X:"fit",Y:"fit"},l.offsetY=4,r.style.zIndex=i.getZindexPartial(e.splitBtn.element).toString()}e.modal=e.createElement("div"),e.modal.className="e-"+e.getModuleName()+" e-modal",e.modal.style.display="none",document.body.insertBefore(e.modal,r),document.body.className+=" e-colorpicker-overflow",e.modal.style.display="block",e.modal.style.zIndex=(Number(r.style.zIndex)-1).toString()}}n.cancel=s.cancel,a.resolve(s)}),a},this.splitBtn.beforeClose=function(i){var n=new s.Deferred;if(t.isNullOrUndefined(i.event))n.resolve(i);else{var a={element:e.container,event:i.event,cancel:!1};e.trigger("beforeClose",a,function(s){t.Browser.isDevice&&i.event.target===e.modal&&(s.cancel=!0),s.cancel||(e.onPopupClose(),"keydown"===i.event.type&&27===i.event.keyCode&&e.splitBtn.element.focus()),i.cancel=s.cancel,n.resolve(s)})}return n}},a.prototype.onPopupClose=function(){this.unWireEvents(),this.destroyOtherComp(),this.container.style.width="",t.select(".e-split-preview",this.splitBtn.element).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value)),this.container.innerHTML="",t.removeClass([this.container],["e-color-picker","e-color-palette"]),t.Browser.isDevice&&this.modal&&(t.removeClass([document.body],"e-colorpicker-overflow"),this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},a.prototype.createPalette=function(){if(t.classList(this.container,["e-color-palette"],["e-color-picker"]),this.presetColors){var e=this.createElement("div",{className:"e-custom-palette"});this.appendElement(e);var i=Object.keys(this.presetColors);if(1===i.length)this.appendPalette(this.presetColors[i[0]],i[0],e);else for(var s=0,n=i.length;s<n;s++)this.appendPalette(this.presetColors[i[s]],i[s],e);t.selectAll(".e-row",e).length>10&&t.addClass([e],"e-palette-group")}else this.appendPalette(ot.default,"default");"Palette"===this.mode&&!this.modeSwitcher&&this.noColor&&this.setNoColor(),this.showRecentColors&&this.recentColors&&this.recentColors.length>0&&this.renderRecentColor();var a=parseInt(getComputedStyle(this.container).borderBottomWidth,10);this.container.style.width=t.formatUnit(this.container.children[0].offsetWidth+a+a),this.rgb=this.hexToRgb(this.roundValue(this.value)),this.hsv=this.rgbToHsv.apply(this,this.rgb)},a.prototype.renderRecentColor=function(){var e=this,i=this.container.querySelector(".e-clr-pal-rec-wpr");i&&t.detach(i);var s=this.createElement("div",{className:"e-clr-pal-rec-wpr"}),n=this.container.querySelector(".e-switch-ctrl-btn");n?this.container.insertBefore(s,n):this.container.appendChild(s);var a=this.createElement("label",{className:"e-recent-clr-span"});if(a.textContent=this.l10n.getConstant("RecentColors"),s.appendChild(a),this.recentColors.length>0){for(this.recentColors=this.recentColors.filter(function(t,i){return e.recentColors.indexOf(t)===i});this.recentColors.length>10;)this.recentColors.pop();this.appendPalette(this.recentColors,"recent-color",s)}},a.prototype.firstPaletteFocus=function(){t.select("."+rt,this.container.children[0])||t.selectAll(".e-palette",this.container)[0].focus()},a.prototype.appendPalette=function(e,t,i){var s=this.createElement("div",{className:"e-palette",attrs:{tabindex:"0",role:"grid"}});"recent-color"===t&&s.classList.add("e-recent-palette"),i?i.appendChild(s):this.appendElement(s);for(var n,a,r,l=0,o=e.length;l<o;l++)0!==l&&l%this.columns!=0||(n=this.createElement("div",{className:"e-row",attrs:{role:"row"}}),s.appendChild(n)),r=this.roundValue(e[l]).toLowerCase(),a=this.createElement("span",{className:lt,attrs:{role:"gridcell","aria-label":r,"aria-selected":"false"}}),this.trigger("beforeTileRender",{element:a,presetName:t,value:e[l]}),n.appendChild(a),this.value===r&&"recent-color"!==t&&(this.addTileSelection(a),s.focus()),a.style.backgroundColor=this.convertToRgbString(this.hexToRgb(r))},a.prototype.setNoColor=function(){var e=this.container.querySelector(".e-row").children[0];e.classList.add(it),this.value||(e.classList.add(rt),t.closest(e,".e-palette").focus()),["aria-selected","aria-label"].forEach(function(t){e.removeAttribute(t)}),e.style.backgroundColor=""},a.prototype.appendElement=function(e,t){void 0===t&&(t=0);var i=this.container.children[t];i?this.container.insertBefore(e,i):this.container.appendChild(e)},a.prototype.addTileSelection=function(e){e&&(e.classList.add(rt),e.setAttribute("aria-selected","true"))},a.prototype.createPicker=function(){t.classList(this.container,["e-color-picker"],["e-color-palette"]);var e=this.createElement("div",{className:"e-hsv-container"});this.appendElement(e),e.appendChild(this.createElement("div",{className:Qe}));var i=this.createElement("span",{className:"e-handler",attrs:{tabindex:"0"}});e.appendChild(i),null!==this.value&&""!==this.value||(this.value="#008000ff"),this.rgb=this.hexToRgb(this.value),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHsvContainerBg(),this.setHandlerPosition(),this.createSlider(),this.createDragTooltip()},a.prototype.setHsvContainerBg=function(e){void 0===e&&(e=this.hsv[0]),this.getHsvContainer().style.backgroundColor=this.convertToRgbString(this.hsvToRgb(e,100,100,1))},a.prototype.getHsvContainer=function(){return t.select(".e-hsv-container",this.container)},a.prototype.setHandlerPosition=function(){var e=this.getDragHandler(),i=t.select("."+Qe,this.container);this.enableRtl?e.style.left=t.formatUnit((i.offsetWidth-e.offsetWidth/2.5)*Math.abs(100-this.hsv[1])/100):e.style.left=t.formatUnit((i.offsetWidth-e.offsetWidth/2.5)*this.hsv[1]/100),e.style.top=t.formatUnit((i.offsetHeight-e.offsetHeight/2.5)*(100-this.hsv[2])/100)},a.prototype.createSlider=function(){var e=this.createElement("div",{className:"e-slider-preview"});this.appendElement(e,1),this.createPreview(e);var t=this.createElement("div",{className:"e-colorpicker-slider"});e.insertBefore(t,e.children[0]);var i=this.createElement("div",{className:"e-hue-slider"});t.appendChild(i),this.hueSlider=new xe({value:this.hsv[0],min:0,max:359,enableRtl:this.enableRtl,enabled:!this.disabled,change:this.hueChange.bind(this)}),this.hueSlider.createElement=this.createElement,this.hueSlider.appendTo(i),this.enableOpacity&&(i=this.createElement("div",{className:"e-opacity-slider"}),t.appendChild(i),this.createOpacitySlider(i))},a.prototype.createOpacitySlider=function(e){this.opacitySlider=new xe({value:100*this.rgb[3],min:0,max:100,enableRtl:this.enableRtl,enabled:!this.disabled,change:this.opacityChange.bind(this)}),this.opacitySlider.createElement=this.createElement,this.opacitySlider.appendTo(e);var t=this.createElement("div",{className:"e-opacity-empty-track"});e.appendChild(t),this.updateOpacitySliderBg()},a.prototype.updateOpacitySliderBg=function(){var e=this.enableRtl?"to left":"to right",i=t.select(".e-opacity-empty-track",this.opacitySlider.element);i&&(i.style.background="linear-gradient("+e+", rgba("+this.rgb.slice(0,3)+", 0) 0%, "+this.convertToRgbString(this.rgb.slice(0,3))+" 100%)")},a.prototype.hueChange=function(e){this.hsv[0]=e.value,this.setHsvContainerBg(),this.convertToOtherFormat()},a.prototype.opacityChange=function(e){var t=e.value,i=this.rgbToHex(this.rgb);this.hsv[3]=t/100,this.rgb[3]=t/100;var s=this.rgbToHex(this.rgb);this.updateOpacityInput(t);var n=this.convertToRgbString(this.rgb);this.updatePreview(n),this.triggerEvent(s,i,n)},a.prototype.updateOpacityInput=function(e){if(this.enableOpacity&&!this.getWrapper().classList.contains($e)){var i=t.getInstance(t.select("."+st,this.container),ie);i.value=e,i.dataBind()}},a.prototype.createPreview=function(e){var t=this.createElement("div",{className:nt});e.appendChild(t);var i=this.createElement("span",{className:"e-preview e-current",attrs:{title:this.l10n.getConstant("CurrentColor")}});t.appendChild(i);var s=this.convertToRgbString(this.rgb);i.style.backgroundColor=s,i=this.createElement("span",{className:"e-preview e-previous",attrs:{title:this.l10n.getConstant("PreviousColor")}}),t.appendChild(i),i.style.backgroundColor=s},a.prototype.isPicker=function(){return!this.container.classList.contains("e-color-palette")},a.prototype.getPopupEle=function(){return this.container.parentElement},a.prototype.createNumericInput=function(e,t,i,s){var n=this,a=new ie({value:t,placeholder:i,min:0,max:s,format:"###.##",showSpinButton:!1,floatLabelType:"Always",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker(),change:function(e){e.event&&n.inputHandler(e.event)}});a.createElement=this.createElement,a.appendTo(e)},a.prototype.createInput=function(){var t=this.isPicker(),i=this.getWrapper();if(t&&!i.classList.contains($e)||!t&&i.classList.contains(at)){var s=this.createElement("div",{className:et});t?this.appendElement(s,2):this.appendElement(s,1);var n=this.createElement("div",{className:"e-input-container"});if(s.appendChild(n),i.classList.contains("e-hide-valueswitcher")||this.appendValueSwitchBtn(s),!i.classList.contains(Ge)){var a=this.createElement("input",{className:"e-hex",attrs:{maxlength:"7",spellcheck:"false","aria-label":"HEX"}});n.appendChild(a),e.Input.createInput({element:a,floatLabelType:"Always",properties:{placeholder:"HEX",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker()}},this.createElement),e.Input.setValue(this.value.slice(0,7),a),a.addEventListener("input",this.inputHandler.bind(this))}if(!i.classList.contains(Je)){var r=void 0,l=void 0;this.isRgb?(r="RGB",l=this.rgb):(r="HSV",l=this.hsv);for(var o=["rh","gs","bv"],h=0;h<3;h++)this.createNumericInput(n.appendChild(this.createElement("input",{className:"e-"+o[h]+"-value"})),l[h],r[h],255);this.enableOpacity&&this.appendOpacityValue(n)}}},a.prototype.appendOpacityValue=function(e){this.createNumericInput(e.appendChild(this.createElement("input",{className:st})),100*this.rgb[3],"A",100)},a.prototype.appendValueSwitchBtn=function(e){var t=this.createElement("button",{className:"e-icons e-css e-btn e-flat e-icon-btn e-value-switch-btn",attrs:{title:"Toggle format"}});e.appendChild(t),this.isPicker()&&!this.getWrapper().classList.contains(Je)&&t.addEventListener("click",this.formatSwitchHandler.bind(this))},a.prototype.createCtrlBtn=function(){if(this.modeSwitcher||this.showButtons){this.l10n.setLocale(this.locale);var e=this.createElement("div",{className:Ze});if(this.container.appendChild(e),this.showButtons){var t=this.createElement("div",{className:Ye});e.appendChild(t);var i=this.l10n.getConstant("Apply");t.appendChild(this.createElement("button",{innerHTML:i,className:"e-btn e-css e-flat e-primary e-small "+Ke,attrs:{title:i}}));var s=this.l10n.getConstant("Cancel");t.appendChild(this.createElement("button",{innerHTML:s,className:"e-btn e-css e-flat e-small e-cancel",attrs:{title:s}}))}this.modeSwitcher&&this.appendModeSwitchBtn()}},a.prototype.appendModeSwitchBtn=function(){var e=this.createElement("button",{className:"e-icons e-btn e-flat e-icon-btn "+tt,attrs:{title:this.l10n.getConstant("ModeSwitcher")}});t.select("."+Ze,this.container).insertBefore(e,t.select("."+Ye,this.container))},a.prototype.createDragTooltip=function(){var e=this,s=new i.Tooltip({opensOn:"Custom",showTipPointer:!1,cssClass:"e-color-picker-tooltip",htmlAttributes:{title:"tooltip"},beforeOpen:function(t){e.tooltipEle=t.element},animation:{open:{effect:"None"},close:{effect:"None"}}});s.createElement=this.createElement,s.appendTo(this.container),s.open(this.container),this.tooltipEle.style.zIndex=i.getZindexPartial(this.tooltipEle).toString(),this.tooltipEle.setAttribute("aria-label","colorpicker-tooltip"),t.select(".e-tip-content",this.tooltipEle).appendChild(this.createElement("div",{className:"e-tip-transparent"}))},a.prototype.getTooltipInst=function(){return t.getInstance(this.container,i.Tooltip)},a.prototype.setTooltipOffset=function(e){this.getTooltipInst().offsetY=e},a.prototype.toggleDisabled=function(e){e?this.getWrapper().classList.add("e-disabled"):this.getWrapper().classList.remove("e-disabled"),this.showButtons&&[].slice.call(t.selectAll(".e-btn",this.container)).forEach(function(i){e?t.attributes(i,{disabled:""}):i.removeAttribute("disabled")})},a.prototype.convertToRgbString=function(e){return e.length?4===e.length?"rgba("+e.join()+")":"rgb("+e.join()+")":""},a.prototype.convertToHsvString=function(e){return 4===e.length?"hsva("+e.join()+")":"hsv("+e.join()+")"},a.prototype.updateHsv=function(){this.hsv[1]=this.hsv[1]>100?100:this.hsv[1],this.hsv[2]=this.hsv[2]>100?100:this.hsv[2],this.setHandlerPosition()},a.prototype.convertToOtherFormat=function(e,t){void 0===e&&(e=!1);var i=this.rgbToHex(this.rgb);this.rgb=this.hsvToRgb.apply(this,this.hsv);var s=this.rgbToHex(this.rgb),n=this.convertToRgbString(this.rgb);this.updatePreview(n),this.updateInput(s),this.triggerEvent(s,i,n,e,t)},a.prototype.updateInput=function(i){var s=this.getWrapper();s.classList.contains($e)||(s.classList.contains(Ge)||e.Input.setValue(i.substr(0,7),t.select(".e-hex",this.container)),s.classList.contains(Je)||(this.isRgb?this.updateValue(this.rgb,!1):this.updateValue(this.hsv,!1)))},a.prototype.updatePreview=function(e){this.enableOpacity&&this.updateOpacitySliderBg(),t.select(".e-tip-transparent",this.tooltipEle).style.backgroundColor=e,t.select("."+nt+" .e-current",this.container).style.backgroundColor=e,t.select("."+nt+" .e-previous",this.container).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value))},a.prototype.getDragHandler=function(){return t.select(".e-handler",this.container)},a.prototype.removeTileSelection=function(){[].slice.call(t.selectAll("."+rt,this.container)).forEach(function(e){e.classList.remove(rt),e.setAttribute("aria-selected","false")})},a.prototype.convertRgbToNumberArray=function(e){return e.slice(e.indexOf("(")+1,e.indexOf(")")).split(",").map(function(e,t){return 3!==t?parseInt(e,10):parseFloat(e)})},a.prototype.getValue=function(e,t){if(e||(e=this.value),t=t?t.toLowerCase():"hex","r"===e[0]){i=this.convertRgbToNumberArray(e);if("hex"===t||"hexa"===t){s=this.rgbToHex(i);return"hex"===t?s.slice(0,7):s}return"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i.slice(0,3))):"hsva"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i)):"null"}if("h"===e[0]){var i=this.hsvToRgb.apply(this,this.convertRgbToNumberArray(e));if("rgba"===t)return this.convertToRgbString(i);if("hex"===t||"hexa"===t){var s=this.rgbToHex(i);return"hex"===t?s.slice(0,7):s}return"rgb"===t?this.convertToRgbString(i.slice(0,3)):"null"}e=this.roundValue(e);var n=this.hexToRgb(e);return"rgb"!==t&&"hsv"!==t||(n=n.slice(0,3)),"rgba"===t||"rgb"===t?this.convertToRgbString(n):"hsva"===t||"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,n)):"hex"===t?e.slice(0,7):"a"===t?n[3].toString():"null"},a.prototype.toggle=function(){this.container.parentElement.classList.contains("e-popup-close")?this.splitBtn.toggle():this.closePopup(null)},a.prototype.getModuleName=function(){return"colorpicker"},a.prototype.getPersistData=function(){return this.addOnPersist(["value"])},a.prototype.wireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();t.EventHandler.add(e,"keydown",this.pickerKeyDown,this);var i=t.select("."+Ye,this.container);i&&t.EventHandler.add(i,"keydown",this.ctrlBtnKeyDown,this),t.EventHandler.add(this.getHsvContainer(),"mousedown touchstart",this.handlerDown,this),(this.modeSwitcher||this.showButtons)&&this.addCtrlSwitchEvent(),t.EventHandler.add(t.select(".e-previous",this.container),"click",this.previewHandler,this)}else t.EventHandler.add(this.container,"click",this.paletteClickHandler,this),t.EventHandler.add(this.container,"keydown",this.paletteKeyDown,this)},a.prototype.formResetHandler=function(){this.value=this.initialInputValue,t.attributes(this.element,{value:this.initialInputValue})},a.prototype.addCtrlSwitchEvent=function(){var e=t.select("."+Ze,this.container);e&&t.EventHandler.add(e,"click",this.btnClickHandler,this)},a.prototype.ctrlBtnKeyDown=function(e){if(13===e.keyCode){if(t.select("."+Ke,this.container)){var i=this.rgbToHex(this.rgb);this.triggerChangeEvent(i)}this.splitBtn.element.focus()}},a.prototype.pickerKeyDown=function(e){switch(e.keyCode){case 39:this.handlerDragPosition(1,this.enableRtl?-1:1,e);break;case 37:this.handlerDragPosition(1,this.enableRtl?1:-1,e);break;case 38:this.handlerDragPosition(2,1,e);break;case 40:this.handlerDragPosition(2,-1,e);break;case 13:e.preventDefault();var t=this.rgbToHex(this.rgb);this.enterKeyHandler(t)}},a.prototype.enterKeyHandler=function(e){this.triggerChangeEvent(e),this.inline||this.splitBtn.element.focus()},a.prototype.closePopup=function(e){var t=this,i={element:this.container,event:e,cancel:!1};this.trigger("beforeClose",i,function(e){e.cancel||(t.splitBtn.toggle(),t.onPopupClose())})},a.prototype.triggerChangeEvent=function(e,t){var i=e.slice(0,7);this.trigger("change",{currentValue:{hex:i,rgba:this.convertToRgbString(this.rgb)},event:t,previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:this.enableOpacity?e:i}),this.showRecentColors&&(this.recentColors.unshift(i),this.inline&&this.renderRecentColor()),this.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:i},!0),this.element.value=i||"#000000"},a.prototype.handlerDragPosition=function(e,t,i){i.preventDefault(),this.hsv[e]+=t*(i.ctrlKey?1:3),this.hsv[e]<0&&(this.hsv[e]=0),this.updateHsv(),this.convertToOtherFormat(!0,i)},a.prototype.handlerDown=function(e){e.preventDefault(),"mousedown"===e.type?(this.clientX=Math.abs(e.pageX-pageXOffset),this.clientY=Math.abs(e.pageY-pageYOffset),this.setTooltipOffset(8)):(this.clientX=Math.abs(e.changedTouches[0].pageX-pageXOffset),this.clientY=Math.abs(e.changedTouches[0].pageY-pageYOffset),this.setTooltipOffset(-8)),this.setHsv(this.clientX,this.clientY),this.getDragHandler().style.transition="left .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1)",this.updateHsv(),this.convertToOtherFormat(!1,e),this.getDragHandler().focus(),t.EventHandler.add(document,"mousemove touchmove",this.handlerMove,this),t.EventHandler.add(document,"mouseup touchend",this.handlerEnd,this)},a.prototype.handlerMove=function(e){"touchmove"!==e.type&&e.preventDefault();var i,s;"mousemove"===e.type?(i=Math.abs(e.pageX-pageXOffset),s=Math.abs(e.pageY-pageYOffset)):(i=Math.abs(e.changedTouches[0].pageX-pageXOffset),s=Math.abs(e.changedTouches[0].pageY-pageYOffset)),this.setHsv(i,s);var n=this.getDragHandler();this.updateHsv(),this.convertToOtherFormat(!1,e),this.getTooltipInst().refresh(n),this.tooltipEle.style.transform||(Math.abs(this.clientX-i)>8||Math.abs(this.clientY-s)>8)&&(t.select("."+Qe,this.container).style.cursor="pointer",n.style.transition="none",this.inline||(this.tooltipEle.style.zIndex=(parseInt(this.getPopupEle().style.zIndex,10)+1).toString()),this.tooltipEle.style.transform="rotate(45deg)",n.classList.add("e-hide-handler"))},a.prototype.setHsv=function(e,i){var s=t.select("."+Qe,this.container),n=s.getBoundingClientRect();e=this.enableRtl?e>n.right?0:Math.abs(e-n.right):e>n.left?Math.abs(e-n.left):0,i=i>n.top?Math.abs(i-n.top):0,this.hsv[2]=Math.round(10*Number(100*(s.offsetHeight-Math.max(0,Math.min(s.offsetHeight,i-s.offsetTop)))/s.offsetHeight))/10,this.hsv[1]=Math.round(10*Number(100*Math.max(0,Math.min(s.offsetWidth,e-s.offsetLeft))/s.offsetWidth))/10},a.prototype.handlerEnd=function(e){"touchend"!==e.type&&e.preventDefault(),t.EventHandler.remove(document,"mousemove touchmove",this.handlerMove),t.EventHandler.remove(document,"mouseup touchend",this.handlerEnd);var i=this.getDragHandler();t.select("."+Qe,this.container).style.cursor="",this.tooltipEle.style.transform&&(this.tooltipEle.style.transform="",i.classList.remove("e-hide-handler")),this.inline||this.showButtons||this.closePopup(e)},a.prototype.btnClickHandler=function(e){var i=e.target;t.closest(i,"."+tt)?(e.stopPropagation(),this.switchToPalette()):(i.classList.contains(Ke)||i.classList.contains("e-cancel"))&&this.ctrlBtnClick(i,e)},a.prototype.switchToPalette=function(){this.trigger("beforeModeSwitch",{element:this.container,mode:"Palette"}),this.unWireEvents(),this.destroyOtherComp(),t.detach(t.select(".e-slider-preview",this.container)),this.getWrapper().classList.contains($e)||t.remove(t.select("."+et,this.container)),t.detach(this.getHsvContainer()),this.createPalette(),this.firstPaletteFocus(),this.createInput(),this.refreshPopupPos(),this.element.parentElement&&this.element.parentElement.parentElement&&this.element.parentElement.parentElement.classList.contains("e-ie-ddb-popup")&&this.refreshImageEditorPopupPos(),this.wireEvents(),this.trigger("onModeSwitch",{element:this.container,mode:"Palette"})},a.prototype.refreshImageEditorPopupPos=function(){if(t.Browser.isDevice){var e=this.getPopupEle();e.style.left=t.formatUnit(0+pageXOffset),e.style.top=t.formatUnit(0+pageYOffset);var i=document.querySelector("#"+this.element.parentElement.parentElement.id.split("-popup")[0]);i&&e.parentElement.ej2_instances[0].refreshPosition(i)}},a.prototype.refreshPopupPos=function(){if(!this.inline){var e=this.getPopupEle();e.style.left=t.formatUnit(0+pageXOffset),e.style.top=t.formatUnit(0+pageYOffset),this.getPopupInst().refreshPosition(this.splitBtn.element.parentElement)}},a.prototype.formatSwitchHandler=function(){this.isRgb?(this.updateValue(this.hsv,!0,3,[360,100,100]),this.isRgb=!1):(this.updateValue(this.rgb,!0,2),this.isRgb=!0)},a.prototype.updateValue=function(e,i,s,n){for(var a,r=["e-rh-value","e-gs-value","e-bv-value"],l=0,o=r.length;l<o;l++)(a=t.getInstance(t.select("."+r[l],this.container),ie)).value=Math.round(e[l]),i&&(a.placeholder=r[l].substr(s,1).toUpperCase(),a.max=n?n[l]:255),a.dataBind()},a.prototype.previewHandler=function(e){var i=e.target,s=this.rgbToHex(this.rgb);this.rgb=this.convertRgbToNumberArray(i.style.backgroundColor),this.rgb[3]||(this.rgb[3]=1);var n=this.rgbToHex(this.rgb),a=this.rgbToHsv.apply(this,this.rgb);a[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:a[0]},!0),this.hueSlider.refresh()),this.setHsvContainerBg(a[0]),this.enableOpacity&&a[3]!==this.hsv[3]&&(this.opacitySlider.setProperties({value:100*a[3]},!0),this.opacitySlider.refresh(),this.updateOpacitySliderBg()),this.hsv=a,this.setHandlerPosition(),this.updateInput(n),t.select("."+nt+" .e-current",this.container).style.backgroundColor=this.convertToRgbString(this.rgb),this.triggerEvent(n,s,this.convertToRgbString(this.rgb),!1,e)},a.prototype.paletteClickHandler=function(e){e.preventDefault();var i=e.target;if(i.classList.contains(lt)){if(this.removeTileSelection(),this.addTileSelection(i),i.classList.contains(it))this.noColorTile();else{var s=i.getAttribute("aria-label"),n=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(this.roundValue(s)),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(at)&&this.updateInput(s),this.triggerEvent(s,n,this.convertToRgbString(this.rgb),!1,e)}this.inline||this.showButtons||this.closePopup(e)}else t.closest(i,"."+tt)?this.switchToPicker():i.classList.contains(Ke)||i.classList.contains("e-cancel")?this.ctrlBtnClick(i,e):this.getWrapper().classList.contains(at)&&t.closest(i,".e-value-switch-btn")&&this.formatSwitchHandler()},a.prototype.noColorTile=function(e){void 0===e&&(e=!1);var t=this.rgbToHex(this.rgb);this.rgb=[],this.hsv=[],this.triggerEvent("",t,"",e)},a.prototype.switchToPicker=function(){var e=this.getWrapper();this.trigger("beforeModeSwitch",{element:this.container,mode:"Picker"}),this.unWireEvents(),[].slice.call(t.selectAll(".e-palette",this.container)).forEach(function(e){t.detach(e)}),this.container.querySelector(".e-clr-pal-rec-wpr")&&t.detach(this.container.querySelector(".e-clr-pal-rec-wpr")),e.classList.contains(at)&&t.detach(t.select("."+et,this.container)),this.container.style.width="";var i=t.select(".e-custom-palette",this.container);this.presetColors&&t.remove(i),this.createPicker(),this.getDragHandler().focus(),this.createInput(),this.refreshPopupPos(),this.element.parentElement&&this.element.parentElement.parentElement&&this.element.parentElement.parentElement.classList.contains("e-ie-ddb-popup")&&this.refreshImageEditorPopupPos(),this.wireEvents(),this.trigger("onModeSwitch",{element:this.container,mode:"Picker"})},a.prototype.ctrlBtnClick=function(e,t){if(e.classList.contains(Ke)){var i=this.rgbToHex(this.rgb);this.triggerChangeEvent(i,t)}if(this.inline){if(e.classList.contains("e-cancel")){var s={element:this.container,event:t,cancel:!1};this.trigger("beforeClose",s)}}else this.closePopup(t),this.splitBtn.element.focus()},a.prototype.paletteKeyDown=function(e){var i=e.target;if(i.classList.contains("e-palette")){var s,n,a=[].slice.call(t.selectAll("."+lt,i)),r=a.filter(function(e){return e.classList.contains("e-selected")}).pop();switch(!e.altKey&&e.keyCode){case 39:e.preventDefault(),a[n=r&&(!this.enableRtl&&a.indexOf(r)===a.length-1||this.enableRtl&&0===a.indexOf(r))?this.enableRtl?a.length-1:0:r?this.tilePosition(a,r,this.enableRtl?-1:1):this.enableRtl?a.length-1:0]&&(s=a[n]),this.keySelectionChanges(s);break;case 37:e.preventDefault(),a[n=r&&(!this.enableRtl&&0===a.indexOf(r)||this.enableRtl&&a.indexOf(r)===a.length-1)?this.enableRtl?0:a.length-1:r?this.tilePosition(a,r,this.enableRtl?1:-1):this.enableRtl?0:a.length-1]&&(s=a[n]),this.keySelectionChanges(s);break;case 38:e.preventDefault(),s=a[n=r?this.tilePosition(a,r,-this.columns):0]?a[n]:a[n-this.columns],this.keySelectionChanges(s);break;case 40:e.preventDefault(),a[n=r?this.tilePosition(a,r,this.columns):a.length-1]?s=a[n]:(n%=a.length,s=a[n+=a[a.length-1].parentElement.childElementCount]),this.keySelectionChanges(s);break;case 13:if(e.preventDefault(),r){var l=r.getAttribute("aria-label");this.enterKeyHandler(l||"")}}}},a.prototype.keySelectionChanges=function(e){if(this.removeTileSelection(),this.addTileSelection(e),e.classList.contains(it))this.noColorTile(!0);else{var t=e.getAttribute("aria-label"),i=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(t),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(at)&&this.updateInput(t),this.triggerEvent(t,i,this.convertToRgbString(this.rgb),!0)}},a.prototype.tilePosition=function(e,t,i){var s=(e=Array.prototype.slice.call(e)).length,n=this.columns-e[s-1].parentElement.childElementCount,a=e.indexOf(t);return a+=i,a<0?a+=s+n:a%=s+n,a},a.prototype.inputHandler=function(e){var i=e.target;if(i.value.length){var s,n;switch(t.select(".e-float-text",i.parentElement).textContent){case"HEX":var a="";if(("#"===i.value[0]&&5!==i.value.length||"#"!==i.value[0]&&4!==i.value.length)&&(a=this.roundValue(i.value)),9!==a.length)return;n=this.rgbToHex(this.rgb),this.rgb=this.hexToRgb(a+a.substr(-2)),this.inputValueChange(this.rgbToHsv.apply(this,this.rgb),n,i.value,e);break;case"R":this.rgb[0]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[0]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n,null,e));break;case"G":this.rgb[1]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[1]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n,null,e));break;case"B":this.rgb[2]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[2]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n,null,e));break;case"H":this.hueSlider.value=Number(i.value);break;case"S":this.hsv[1]!==Number(i.value)&&(this.hsv[1]=Number(i.value),this.updateHsv(),this.convertToOtherFormat(!1,e));break;case"V":this.hsv[2]!==Number(i.value)&&(this.hsv[2]=Number(i.value),this.updateHsv(),this.convertToOtherFormat(!1,e));break;case"A":this.opacitySlider.value=Number(i.value)}}},a.prototype.inputValueChange=function(e,t,i,s){e[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:e[0]},!0),this.hueSlider.refresh(),this.setHsvContainerBg(e[0])),this.hsv=e;var n=this.rgbToHex(this.rgb);this.setHandlerPosition(),this.updateInput(i||n);var a=this.convertToRgbString(this.rgb);this.updatePreview(a),this.triggerEvent(n,t,a,!1,s)},a.prototype.triggerEvent=function(e,i,s,n,a){void 0===n&&(n=!1);var r=e.slice(0,7);t.isNullOrUndefined(a)&&(a=new MouseEvent("click",{bubbles:!0,cancelable:!1})),this.showButtons||n?this.trigger("select",{currentValue:{hex:r,rgba:s},event:a,previousValue:{hex:i.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(i))}}):(this.trigger("change",{currentValue:{hex:r,rgba:s},event:a,previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:e}),this.showRecentColors&&(this.recentColors.unshift(r),this.inline&&this.renderRecentColor()),this.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:r},!0),this.element.value=r||"#000000")},a.prototype.destroy=function(){var e=this,i=this.getWrapper();n.prototype.destroy.call(this),["tabindex","spellcheck"].forEach(function(t){e.element.removeAttribute(t)}),this.inline?(this.unWireEvents(),this.destroyOtherComp()):(this.isPopupOpen()&&(this.unWireEvents(),this.destroyOtherComp()),this.splitBtn.destroy(),this.splitBtn=null),this.tileRipple(),this.tileRipple=null,this.ctrlBtnRipple(),this.ctrlBtnRipple=null,this.element.nextElementSibling&&t.detach(this.element.nextElementSibling),i&&(i.parentElement.insertBefore(this.element,i),t.detach(i)),this.container=null,this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},a.prototype.destroyOtherComp=function(){if(this.isPicker()){for(var e=t.closest(this.hueSlider.element,".e-color-picker").querySelectorAll(".e-numerictextbox"),i=0;i<e.length;i++)t.getInstance(e[i],ie).destroy();this.hueSlider.destroy(),this.enableOpacity&&(this.opacitySlider.destroy(),this.opacitySlider=null),this.hueSlider=null;var s=this.getTooltipInst();s.close(),s.destroy(),this.tooltipEle=null}},a.prototype.isPopupOpen=function(){return this.getPopupEle().classList.contains("e-popup-open")},a.prototype.unWireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();t.EventHandler.remove(e,"keydown",this.pickerKeyDown);var i=t.select("."+Ye,this.container);i&&t.EventHandler.remove(i,"keydown",this.ctrlBtnKeyDown),t.EventHandler.remove(this.getHsvContainer(),"mousedown touchstart",this.handlerDown),(this.modeSwitcher||this.showButtons)&&t.EventHandler.remove(t.select("."+Ze,this.container),"click",this.btnClickHandler),t.EventHandler.remove(t.select(".e-previous",this.container),"click",this.previewHandler)}else t.EventHandler.remove(this.container,"click",this.paletteClickHandler),t.EventHandler.remove(this.container,"keydown",this.paletteKeyDown)},a.prototype.roundValue=function(e){if(!e)return"";"#"!==e[0]&&(e="#"+e);var t=e.length;if(4===t&&(e+="f",t=5),5===t){for(var i="",s=1,n=e.length;s<n;s++)i+=e.charAt(s)+e.charAt(s);e="#"+i,t=9}return 7===t&&(e+="ff"),e},a.prototype.hexToRgb=function(e){if(!e)return[];9!==(e=e.trim()).length&&(e=this.roundValue(e));var t=Number((parseInt(e.slice(-2),16)/255).toFixed(2));e=e.slice(1,7);var i=parseInt(e,16),s=[];return s.push(i>>16&255),s.push(i>>8&255),s.push(255&i),s.push(t),s},a.prototype.rgbToHsv=function(e,i,s,n){if(this.rgb&&!this.rgb.length)return[];e/=255,i/=255,s/=255;var a,r=Math.max(e,i,s),l=Math.min(e,i,s),o=r,h=r-l,p=0===r?0:h/r;if(r===l)a=0;else{switch(r){case e:a=(i-s)/h+(i<s?6:0);break;case i:a=(s-e)/h+2;break;case s:a=(e-i)/h+4}a/=6}var d=[Math.round(360*a),Math.round(1e3*p)/10,Math.round(1e3*o)/10];return t.isNullOrUndefined(n)||d.push(n),d},a.prototype.hsvToRgb=function(e,i,s,n){var a,r,l;if(i/=100,s/=100,0===i)return a=r=l=s,[Math.round(255*a),Math.round(255*r),Math.round(255*l),n];e/=60;var o=Math.floor(e),h=e-o,p=s*(1-i),d=s*(1-i*h),u=s*(1-i*(1-h));switch(o){case 0:a=s,r=u,l=p;break;case 1:a=d,r=s,l=p;break;case 2:a=p,r=s,l=u;break;case 3:a=p,r=d,l=s;break;case 4:a=u,r=p,l=s;break;default:a=s,r=p,l=d}var c=[Math.round(255*a),Math.round(255*r),Math.round(255*l)];return t.isNullOrUndefined(n)||c.push(n),c},a.prototype.rgbToHex=function(e){return e.length?"#"+this.hex(e[0])+this.hex(e[1])+this.hex(e[2])+(t.isNullOrUndefined(e[3])?"":0!==e[3]?(Math.round(255*e[3])+65536).toString(16).substr(-2):"00"):""},a.prototype.hex=function(e){return("0"+e.toString(16)).slice(-2)},a.prototype.changeModeSwitcherProp=function(e){var i=t.select("."+Ze,this.container);e?i?this.appendModeSwitchBtn():(this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):i&&(this.showButtons?t.detach(t.select("."+tt,i)):t.remove(i))},a.prototype.changeShowBtnProps=function(e){var i=t.select("."+Ze,this.container);e?(i&&t.remove(i),this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):this.modeSwitcher?t.detach(t.select("."+Ye,i)):t.remove(i)},a.prototype.changeValueProp=function(e){if(this.isPicker())this.rgb=this.hexToRgb(e),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHandlerPosition(),t.detach(t.closest(this.hueSlider.element,".e-slider-preview")),this.createSlider(),this.setHsvContainerBg(),this.updateInput(e),4===this.rgb.length&&this.updateOpacityInput(100*this.rgb[3]);else{this.removeTileSelection();var i=this.container.querySelector('span[aria-label="'+this.roundValue(e)+'"]');i&&this.addTileSelection(i)}},a.prototype.setInputEleProps=function(){t.remove(t.select("."+et,this.container)),this.createInput()},a.prototype.changeDisabledProp=function(e){this.isPicker()&&(this.hueSlider.enabled=!e,this.opacitySlider.enabled=!e,this.setInputEleProps()),e?(this.toggleDisabled(!0),this.unWireEvents()):(this.toggleDisabled(!1),this.wireEvents())},a.prototype.changeCssClassProps=function(e,i){var s=this.getWrapper(),n=this.getPopupEle();i&&(t.removeClass([s,n],i.split(" ")),this.splitBtn&&this.splitBtn.activeElem&&this.splitBtn.activeElem[0]&&this.splitBtn.activeElem[1]&&t.removeClass([this.splitBtn.activeElem[0],this.splitBtn.activeElem[1]],i.split(" ")),this.splitBtn&&this.splitBtn.element&&this.splitBtn.element.parentElement&&t.removeClass([this.splitBtn.element.parentElement],i.split(" "))),e&&(t.addClass([s,n],e.replace(/\s+/g," ").trim().split(" ")),this.splitBtn&&this.splitBtn.activeElem&&this.splitBtn.activeElem[0]&&this.splitBtn.activeElem[1]&&t.addClass([this.splitBtn.activeElem[0],this.splitBtn.activeElem[1]],e.replace(/\s+/g," ").trim().split(" ")),this.splitBtn&&this.splitBtn.element&&this.splitBtn.element.parentElement&&t.addClass([this.splitBtn.element.parentElement],e.replace(/\s+/g," ").trim().split(" ")))},a.prototype.changeRtlProps=function(e){e?t.addClass([this.getWrapper()],"e-rtl"):t.removeClass([this.getWrapper()],"e-rtl")},a.prototype.changePaletteProps=function(){t.detach(this.container.children[0]),this.container.style.width="",this.createPalette()},a.prototype.changeOpacityProps=function(e){var i=this.getWrapper();e?(t.removeClass([this.container.parentElement],"e-hide-opacity"),this.createOpacitySlider(t.select(".e-colorpicker-slider",this.container).appendChild(this.createElement("div",{className:"e-opacity-slider"}))),i.classList.contains($e)||i.classList.contains(Je)||this.appendOpacityValue(t.select(".e-input-container",this.container))):(t.addClass([this.container.parentElement],"e-hide-opacity"),this.opacitySlider.destroy(),t.remove(this.opacitySlider.element),this.opacitySlider=null,i.classList.contains($e)||i.classList.contains(Je)||t.remove(t.select("."+st,this.container).parentElement))},a.prototype.onPropertyChanged=function(e,i){var n=this;if(!t.isNullOrUndefined(e.value)){var a=this.roundValue(e.value);if(9===a.length)this.element.value=this.roundValue(a).slice(0,7),(r=this.splitBtn&&t.select(".e-split-preview",this.splitBtn.element))&&(r.style.backgroundColor=this.convertToRgbString(this.hexToRgb(e.value)));else if(this.noColor&&"Palette"===this.mode&&""===this.value){var r=this.splitBtn&&t.select(".e-split-preview",this.splitBtn.element);r.style.backgroundColor=""}else this.value=i.value}if(!this.inline&&t.isNullOrUndefined(e.inline)){var l=["disabled","enableRtl"];if(this.splitBtn.setProperties(s.getModel(e,l)),!this.isPopupOpen())return this.changeCssClassProps(e.cssClass,i.cssClass),void this.changeRtlProps(e.enableRtl)}for(var o=this,h=0,p=Object.keys(e);h<p.length;h++)!function(s){switch(s){case"inline":e.inline?(o.getWrapper().appendChild(o.container),o.splitBtn.destroy(),t.detach(o.element.nextElementSibling),o.container.children.length||o.createWidget()):(o.destroyOtherComp(),o.unWireEvents(),o.container.innerHTML="",o.createSplitBtn());break;case"cssClass":o.changeCssClassProps(e.cssClass,i.cssClass);var a=e.cssClass.split(" ").concat(i.cssClass.split(" ")),r=0;(a=a.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[])).forEach(function(e){0!==r||e!==$e&&"e-hide-valueswitcher"!==e&&e!==at&&e!==Ge&&e!==Je||(t.select("."+et,n.container)&&t.remove(t.select("."+et,n.container)),n.createInput(),r++)});break;case"enableRtl":o.isPicker()&&(o.hueSlider.enableRtl=e.enableRtl,o.enableOpacity&&(o.opacitySlider.enableRtl=e.enableRtl),o.setInputEleProps()),o.changeRtlProps(e.enableRtl);break;case"disabled":o.changeDisabledProp(e.disabled);break;case"value":o.value!==i.value&&o.changeValueProp(e.value);break;case"showButtons":o.changeShowBtnProps(e.showButtons);break;case"mode":"Picker"===e.mode?o.switchToPicker():o.switchToPalette();break;case"modeSwitcher":o.changeModeSwitcherProp(e.modeSwitcher);break;case"columns":case"presetColors":o.isPicker()||o.changePaletteProps();break;case"noColor":e.noColor?"Palette"!==o.mode||o.modeSwitcher||o.setNoColor():o.changePaletteProps();break;case"enableOpacity":o.changeOpacityProps(e.enableOpacity);break;case"showRecentColors":if(!e.showRecentColors){var l=o.container.querySelector(".e-clr-pal-rec-wpr");l&&t.detach(l)}o.recentColors=[]}}(p[h])},a.prototype.focusIn=function(){this.element.parentElement.focus()},Xe([t.Property("#008000ff")],a.prototype,"value",void 0),Xe([t.Property("")],a.prototype,"cssClass",void 0),Xe([t.Property(!1)],a.prototype,"disabled",void 0),Xe([t.Property("Picker")],a.prototype,"mode",void 0),Xe([t.Property(!0)],a.prototype,"modeSwitcher",void 0),Xe([t.Property(null)],a.prototype,"presetColors",void 0),Xe([t.Property(!0)],a.prototype,"showButtons",void 0),Xe([t.Property(10)],a.prototype,"columns",void 0),Xe([t.Property(!1)],a.prototype,"inline",void 0),Xe([t.Property(!1)],a.prototype,"noColor",void 0),Xe([t.Property(!1)],a.prototype,"enablePersistence",void 0),Xe([t.Property(!0)],a.prototype,"enableOpacity",void 0),Xe([t.Property(!1)],a.prototype,"createPopupOnClick",void 0),Xe([t.Property(!1)],a.prototype,"showRecentColors",void 0),Xe([t.Event()],a.prototype,"select",void 0),Xe([t.Event()],a.prototype,"change",void 0),Xe([t.Event()],a.prototype,"beforeTileRender",void 0),Xe([t.Event()],a.prototype,"beforeOpen",void 0),Xe([t.Event()],a.prototype,"open",void 0),Xe([t.Event()],a.prototype,"beforeClose",void 0),Xe([t.Event()],a.prototype,"beforeModeSwitch",void 0),Xe([t.Event()],a.prototype,"onModeSwitch",void 0),Xe([t.Event()],a.prototype,"created",void 0),a=Xe([t.NotifyPropertyChanges],a)}(t.Component),pt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),dt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ut=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.previousValue=null,s.isHiddenInput=!1,s.isForm=!1,s.inputPreviousValue=null,s.textboxOptions=e,s}return pt(s,i),s.prototype.onPropertyChanged=function(i,s){for(var n=0,a=Object.keys(i);n<a.length;n++)switch(a[n]){case"floatLabelType":e.Input.removeFloating(this.textboxWrapper),e.Input.addFloating(this.respectiveElement,this.floatLabelType,this.placeholder);break;case"enabled":e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container),this.bindClearEvent();break;case"width":e.Input.setWidth(i.width,this.textboxWrapper.container);break;case"value":var r=this.isProtectedOnChange;this.isProtectedOnChange=!0,e.Input.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=r,e.Input.setValue(this.value,this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value),this.inputPreviousValue=this.respectiveElement.value,(this.isAngular||this.isVue)&&!0===this.preventChange?(this.previousValue=this.isAngular?this.value:this.previousValue,this.preventChange=!1):(t.isNullOrUndefined(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&t.isNullOrUndefined(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttributesToElement(),this.updateHTMLAttributesToWrapper(),this.checkAttributes(!0),this.multiline&&!t.isNullOrUndefined(this.textarea)?e.Input.validateInputType(this.textboxWrapper.container,this.textarea):e.Input.validateInputType(this.textboxWrapper.container,this.element);break;case"readonly":e.Input.setReadonly(this.readonly,this.respectiveElement);break;case"type":"TEXTAREA"!==this.respectiveElement.tagName&&(this.respectiveElement.setAttribute("type",this.type),e.Input.validateInputType(this.textboxWrapper.container,this.element),this.raiseChangeEvent());break;case"showClearButton":e.Input.setClearButton(this.showClearButton,this.respectiveElement,this.textboxWrapper),this.bindClearEvent();break;case"enableRtl":e.Input.setEnableRtl(this.enableRtl,[this.textboxWrapper.container]),this.handleFloatLabel();break;case"placeholder":e.Input.setPlaceholder(this.placeholder,this.respectiveElement),e.Input.calculateWidth(this.respectiveElement,this.textboxWrapper.container);break;case"autocomplete":"on"!==this.autocomplete&&""!==this.autocomplete?this.respectiveElement.autocomplete=this.autocomplete:this.removeAttributes(["autocomplete"]);break;case"cssClass":e.Input.updateCssClass(i.cssClass,s.cssClass,this.textboxWrapper.container);break;case"locale":this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement);break;case"prependTemplate":this.updatePrependTemplate();break;case"appendTemplate":this.updateAppendTemplate()}},s.prototype.getModuleName=function(){return"textbox"},s.prototype.preRender=function(){if(this.cloneElement=this.element.cloneNode(!0),this.formElement=t.closest(this.element,"form"),t.isNullOrUndefined(this.formElement)||(this.isForm=!0),"EJS-TEXTBOX"===this.element.tagName){var e=t.getValue("ej2_instances",this.element),i=this.multiline?this.createElement("textarea"):this.createElement("input");for(a=0;a<this.element.attributes.length;a++)"id"!==(r=this.element.attributes[a].nodeName)&&"class"!==r?(i.setAttribute(r,this.element.attributes[a].nodeValue),i.innerHTML=this.element.innerHTML,"name"===r&&this.element.removeAttribute("name")):"class"===r&&i.setAttribute(r,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "));this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}this.updateHTMLAttributesToElement(),this.checkAttributes(!1),!t.isNullOrUndefined(this.textboxOptions)&&void 0!==this.textboxOptions.value||""===this.element.value||this.setProperties({value:this.element.value},!0),"TEXTAREA"!==this.element.tagName&&this.element.setAttribute("type",this.type),("text"===this.type||"INPUT"===this.element.tagName&&this.multiline&&this.isReact)&&this.element.setAttribute("role","textbox"),this.globalize=new t.Internationalization(this.locale);var s={placeholder:this.placeholder};if(this.l10n=new t.L10n("textbox",s,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",t.getUniqueID("textbox")),this.element.hasAttribute("name")||this.element.setAttribute("name",this.element.getAttribute("id")),"INPUT"===this.element.tagName&&this.multiline){this.isHiddenInput=!0,this.textarea=this.createElement("textarea"),this.element.parentNode.insertBefore(this.textarea,this.element),this.element.setAttribute("type","hidden"),this.textarea.setAttribute("name",this.element.getAttribute("name")),this.element.removeAttribute("name"),this.textarea.setAttribute("role",this.element.getAttribute("role")),this.element.removeAttribute("role"),this.textarea.setAttribute("id",t.getUniqueID("textarea"));for(var n=["placeholder","disabled","value","readonly","type","autocomplete"],a=0;a<this.element.attributes.length;a++){var r=this.element.attributes[a].nodeName;this.element.hasAttribute(r)&&Z.indexOf(r)<0&&"id"!==r&&"type"!==r&&"e-mappinguid"!==r&&(this.textarea.setAttribute(r,this.element.attributes[a].nodeValue),n.indexOf(r)<0&&(this.element.removeAttribute(r),a--))}}},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly","type","autocomplete"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"autocomplete":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.autocomplete||e){var l="off"===this.element.autocomplete?"off":"on";this.setProperties({autocomplete:l},!e)}break;case"value":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.value||e)&&""!==this.element.value&&this.setProperties({value:this.element.value},!e);break;case"type":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.type||e)&&this.setProperties({type:this.element.type},!e)}}},s.prototype.render=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=e.Input.getInputValidClassList(this.cssClass)),this.respectiveElement=this.isHiddenInput?this.textarea:this.element,this.textboxWrapper=e.Input.createInput({element:this.respectiveElement,floatLabelType:this.floatLabelType,properties:{enabled:this.enabled,enableRtl:this.enableRtl,cssClass:i,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}}),this.updateHTMLAttributesToWrapper(),this.isHiddenInput&&this.respectiveElement.parentNode.insertBefore(this.element,this.respectiveElement),this.wireEvents(),t.isNullOrUndefined(this.value)||(e.Input.setValue(this.value,this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value)),t.isNullOrUndefined(this.value)||(this.initialValue=this.value,this.setInitialValue()),"on"!==this.autocomplete&&""!==this.autocomplete?this.respectiveElement.autocomplete=this.autocomplete:t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.autocomplete||this.removeAttributes(["autocomplete"]),this.previousValue=this.value,this.inputPreviousValue=this.value,this.respectiveElement.defaultValue=this.respectiveElement.value,e.Input.setWidth(this.width,this.textboxWrapper.container),!t.isNullOrUndefined(t.closest(this.element,"fieldset"))&&t.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.hasAttribute("aria-label")||this.element.setAttribute("aria-label","textbox"),this.createPrependTemplate(),this.createAppendTemplate(),this.multiline&&"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&void 0!==window.ResizeObserver&&new window.ResizeObserver(function(e){for(var t=0,i=e;t<i.length;t++){var s=i[t],n=s.target&&s.target.parentElement?s.target.parentElement.querySelector(".e-float-text.e-label-bottom"):null;n&&n.classList.contains("e-label-bottom")?n.style.width=s.contentRect.width+"px":n&&n.classList.contains("e-label-top")&&(n.style.width="auto")}}).observe(this.textarea),this.renderComplete()},s.prototype.updateHTMLAttributesToWrapper=function(){e.Input.updateHTMLAttributesToWrapper(this.htmlAttributes,this.textboxWrapper.container)},s.prototype.updateHTMLAttributesToElement=function(){e.Input.updateHTMLAttributesToElement(this.htmlAttributes,this.respectiveElement?this.respectiveElement:this.multiline&&!t.isNullOrUndefined(this.textarea)?this.textarea:this.element)},s.prototype.setInitialValue=function(){this.isAngular||this.respectiveElement.setAttribute("value",this.initialValue)},s.prototype.updatePrependTemplate=function(){this.removePrependTemplate(),this.createPrependTemplate()},s.prototype.updateAppendTemplate=function(){this.removeAppendTemplate(),this.createAppendTemplate()},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.createPrependTemplate=function(){if(!t.isNullOrUndefined(this.prependTemplate)){var e=this.textboxWrapper.container;this.prependedElement=this.createElement("div",{className:"e-prepend-template"}),this.iconTemplateFunction=this.templateComplier(this.prependTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.prependedElement);if(i){var s=[].slice.call(i);t.append(s,this.prependedElement)}var n=e.querySelector("input");e.classList.add("e-prepend-wrapper"),n?e.insertBefore(this.prependedElement,n):e.insertBefore(this.prependedElement,e.firstChild),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.createAppendTemplate=function(){if(!t.isNullOrUndefined(this.appendTemplate)){var e=this.textboxWrapper.container;this.appendedElement=this.createElement("div",{className:"e-append-template"}),this.iconTemplateFunction=this.templateComplier(this.appendTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.appendedElement);if(i){var s=[].slice.call(i);t.append(s,this.appendedElement)}e.classList.add("e-append-wrapper"),e.appendChild(this.appendedElement),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.handleFloatLabel=function(){var e=this.textboxWrapper.container.querySelector(".e-float-text");e&&"Auto"===this.floatLabelType&&setTimeout(function(){e&&this.prependedElement&&!this.enableRtl?(e.style.marginLeft=this.prependedElement.offsetWidth+"px",e.style.marginRight="0"):e&&this.prependedElement&&this.enableRtl&&(e.style.marginRight=this.prependedElement.offsetWidth+"px",e.style.marginLeft="0"),e&&e.classList.contains("e-label-bottom")&&(e.style.width=this.element.offsetWidth+"px")}.bind(this),5)},s.prototype.removePrependTemplate=function(){t.isNullOrUndefined(this.prependedElement)||(t.detach(this.prependedElement),this.prependedElement=null)},s.prototype.removeAppendTemplate=function(){t.isNullOrUndefined(this.appendedElement)||(t.detach(this.appendedElement),this.appendedElement=null)},s.prototype.wireEvents=function(){t.EventHandler.add(this.respectiveElement,"focus",this.focusHandler,this),t.EventHandler.add(this.respectiveElement,"blur",this.focusOutHandler,this),t.EventHandler.add(this.respectiveElement,"keydown",this.keydownHandler,this),t.EventHandler.add(this.respectiveElement,"input",this.inputHandler,this),t.EventHandler.add(this.respectiveElement,"change",this.changeHandler,this),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent(),!t.isNullOrUndefined(this.textboxWrapper.container.querySelector(".e-float-text"))&&"Auto"===this.floatLabelType&&this.textboxWrapper.container.classList.contains("e-autofill")&&this.textboxWrapper.container.classList.contains("e-outline")&&t.EventHandler.add(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler,this)},s.prototype.animationHandler=function(){this.textboxWrapper.container.classList.add("e-valid-input");var e=this.textboxWrapper.container.querySelector(".e-float-text");t.isNullOrUndefined(e)||(e.classList.add("e-label-top"),e.classList.contains("e-label-bottom")&&e.classList.remove("e-label-bottom"))},s.prototype.resetValue=function(e){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=e,null!=e||!this.textboxWrapper.container.classList.contains("e-valid-input")||"Always"===this.floatLabelType&&this.textboxWrapper.container.classList.contains("e-outline")||this.textboxWrapper.container.classList.remove("e-valid-input"),this.isProtectedOnChange=t},s.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!t.isNullOrUndefined(this.textboxWrapper)){var e=this.textboxWrapper.container.querySelector(".e-float-text");t.isNullOrUndefined(e)||"Always"===this.floatLabelType||(t.isNullOrUndefined(this.initialValue)||""===this.initialValue?(e.classList.add("e-label-bottom"),e.classList.remove("e-label-top")):""!==this.initialValue&&(e.classList.add("e-label-top"),e.classList.remove("e-label-bottom")))}},s.prototype.focusHandler=function(e){var t={container:this.textboxWrapper.container,event:e,value:this.value};this.trigger("focus",t),"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){var e=this.textboxWrapper?this.textboxWrapper.container.querySelector(".e-float-text"):null;e&&(e.style.width="auto")}.bind(this),5)},s.prototype.focusOutHandler=function(e){null===this.previousValue&&null===this.value&&""===this.respectiveElement.value||this.previousValue===this.value||this.raiseChangeEvent(e,!0);var t={container:this.textboxWrapper.container,event:e,value:this.value};this.trigger("blur",t),"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){var e=this.textboxWrapper?this.textboxWrapper.container.querySelector(".e-float-text.e-label-bottom"):null;e&&(e.style.width=this.multiline?this.textarea.offsetWidth:this.element.offsetWidth+"px")}.bind(this),5)},s.prototype.keydownHandler=function(e){var t=e.ctrlKey&&90===e.keyCode;(13===e.keyCode||9===e.keyCode||t)&&(null!==this.previousValue&&""!==this.previousValue||null!==this.value&&""!==this.value||""!==this.respectiveElement.value)&&this.setProperties({value:this.respectiveElement.value},!0)},s.prototype.inputHandler=function(e){var t=this,i={event:e,value:this.respectiveElement.value,previousValue:this.inputPreviousValue,container:this.textboxWrapper.container};this.inputPreviousValue=this.respectiveElement.value,this.isAngular&&(t.localChange({value:this.respectiveElement.value}),this.preventChange=!0),this.isVue&&(this.preventChange=!0),this.trigger("input",i),e.stopPropagation()},s.prototype.changeHandler=function(e){this.setProperties({value:this.respectiveElement.value},!0),this.previousValue!==this.value&&this.raiseChangeEvent(e,!0),e.stopPropagation()},s.prototype.raiseChangeEvent=function(e,i){var s={event:e,value:this.value,previousValue:this.previousValue,container:this.textboxWrapper.container,isInteraction:i||!1,isInteracted:i||!1};this.preventChange=!1,this.trigger("change",s),this.previousValue=this.value,"INPUT"===this.element.tagName&&this.multiline&&"mozilla"===t.Browser.info.name&&(this.element.value=this.respectiveElement.value)},s.prototype.bindClearEvent=function(){this.showClearButton&&(this.enabled?t.EventHandler.add(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):t.EventHandler.remove(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler))},s.prototype.resetInputHandler=function(i){if(i.preventDefault(),!this.textboxWrapper.clearButton.classList.contains("e-clear-icon-hide")||this.textboxWrapper.container.classList.contains("e-static-clear")){e.Input.setValue("",this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value),this.setProperties({value:this.respectiveElement.value},!0);var s={event:i,value:this.respectiveElement.value,previousValue:this.inputPreviousValue,container:this.textboxWrapper.container};if(this.trigger("input",s),this.inputPreviousValue=this.respectiveElement.value,this.raiseChangeEvent(i,!0),t.closest(this.element,"form")){var n=this.element,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}}},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.respectiveElement,"focus",this.focusHandler),t.EventHandler.remove(this.respectiveElement,"blur",this.focusOutHandler),t.EventHandler.remove(this.respectiveElement,"keydown",this.keydownHandler),t.EventHandler.remove(this.respectiveElement,"input",this.inputHandler),t.EventHandler.remove(this.respectiveElement,"change",this.changeHandler),this.isForm&&t.EventHandler.remove(this.formElement,"reset",this.resetForm),!t.isNullOrUndefined(this.textboxWrapper.container.querySelector(".e-float-text"))&&"Auto"===this.floatLabelType&&this.textboxWrapper.container.classList.contains("e-outline")&&this.textboxWrapper.container.classList.contains("e-autofill")&&t.EventHandler.remove(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler)},s.prototype.destroy=function(){this.unWireEvents(),this.removePrependTemplate(),this.removeAppendTemplate(),this.clearTemplate(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),"INPUT"===this.element.tagName&&this.multiline&&(t.detach(this.textboxWrapper.container.getElementsByTagName("textarea")[0]),this.respectiveElement=this.element,this.element.removeAttribute("type")),this.respectiveElement.value=this.respectiveElement.defaultValue,this.respectiveElement.classList.remove("e-input"),this.removeAttributes(["aria-disabled","aria-readonly","aria-labelledby"]),t.isNullOrUndefined(this.textboxWrapper)||(this.textboxWrapper.container.insertAdjacentElement("afterend",this.respectiveElement),t.detach(this.textboxWrapper.container)),this.textboxWrapper=null,e.Input.destroy({element:this.respectiveElement,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),i.prototype.destroy.call(this)},s.prototype.addIcon=function(t,i){e.Input.addIcon(t,i,this.textboxWrapper.container,this.respectiveElement,this.createElement);var s=this.textboxWrapper.container,n=s.querySelector("span.e-icons"),a=s.querySelector("label");if(n&&a){var r=this.element.parentElement.offsetWidth-n.offsetWidth;a.style.width=r+"px"}},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.addAttributes=function(t){for(var i=0,s=Object.keys(t);i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!1},!0),e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===n?(this.setProperties({readonly:!0},!0),e.Input.setReadonly(this.readonly,this.respectiveElement)):"class"===n?this.respectiveElement.classList.add(t[""+n]):"placeholder"===n?(this.setProperties({placeholder:t[""+n]},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement)):("rows"===n&&this.respectiveElement.tagName,this.respectiveElement.setAttribute(n,t[""+n]))}},s.prototype.removeAttributes=function(t){for(var i=0,s=t;i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!0},!0),e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===n?(this.setProperties({readonly:!1},!0),e.Input.setReadonly(this.readonly,this.respectiveElement)):"placeholder"===n?(this.setProperties({placeholder:null},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement)):this.respectiveElement.removeAttribute(n)}},s.prototype.focusIn=function(){document.activeElement!==this.respectiveElement&&this.enabled&&(this.respectiveElement.focus(),(this.textboxWrapper.container.classList.contains("e-input-group")||this.textboxWrapper.container.classList.contains("e-outline")||this.textboxWrapper.container.classList.contains("e-filled"))&&t.addClass([this.textboxWrapper.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.respectiveElement&&this.enabled&&(this.respectiveElement.blur(),(this.textboxWrapper.container.classList.contains("e-input-group")||this.textboxWrapper.container.classList.contains("e-outline")||this.textboxWrapper.container.classList.contains("e-filled"))&&t.removeClass([this.textboxWrapper.container],["e-input-focus"]))},dt([t.Property("text")],s.prototype,"type",void 0),dt([t.Property(!1)],s.prototype,"readonly",void 0),dt([t.Property(null)],s.prototype,"value",void 0),dt([t.Property("Never")],s.prototype,"floatLabelType",void 0),dt([t.Property("")],s.prototype,"cssClass",void 0),dt([t.Property(null)],s.prototype,"placeholder",void 0),dt([t.Property("on")],s.prototype,"autocomplete",void 0),dt([t.Property({})],s.prototype,"htmlAttributes",void 0),dt([t.Property(!1)],s.prototype,"multiline",void 0),dt([t.Property(!0)],s.prototype,"enabled",void 0),dt([t.Property(!1)],s.prototype,"showClearButton",void 0),dt([t.Property(!1)],s.prototype,"enablePersistence",void 0),dt([t.Property(null)],s.prototype,"width",void 0),dt([t.Property(null)],s.prototype,"prependTemplate",void 0),dt([t.Property(null)],s.prototype,"appendTemplate",void 0),dt([t.Event()],s.prototype,"created",void 0),dt([t.Event()],s.prototype,"destroyed",void 0),dt([t.Event()],s.prototype,"change",void 0),dt([t.Event()],s.prototype,"blur",void 0),dt([t.Event()],s.prototype,"focus",void 0),dt([t.Event()],s.prototype,"input",void 0),s=dt([t.NotifyPropertyChanges],s)}(t.Component),ct=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)}}(),mt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ft="e-auto-width",vt=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.previousValue=null,s.isForm=!1,s.inputPreviousValue=null,s.textareaOptions=e,s}return ct(s,i),s.prototype.onPropertyChanged=function(i,s){for(var n=0,a=Object.keys(i);n<a.length;n++)switch(a[n]){case"floatLabelType":e.Input.removeFloating(this.textareaWrapper),e.Input.addFloating(this.element,this.floatLabelType,this.placeholder),"Never"===this.floatLabelType&&this.element.removeAttribute("aria-labelledby");break;case"enabled":e.Input.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container),this.bindClearEvent(),this.enabled||"None"===this.resizeMode?this.element.classList.add(this.getCurrentResizeClass(this.resizeMode)):(this.element.classList.remove(this.getCurrentResizeClass(this.resizeMode)),this.element.classList.add("e-resize-none"));break;case"width":"None"!==this.resizeMode&&"Vertical"!==this.resizeMode?(this.setElementWidth(i.width),this.textareaWrapper.container.classList.add(ft)):(this.textareaWrapper.container.classList.contains(ft)&&this.textareaWrapper.container.classList.remove(ft),e.Input.setWidth(i.width,this.textareaWrapper.container));break;case"value":var r=this.isProtectedOnChange;this.isProtectedOnChange=!0,e.Input.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=r,e.Input.setValue(this.value,this.element,this.floatLabelType,this.showClearButton),this.inputPreviousValue=this.element.value,(this.isAngular||this.isVue)&&!0===this.preventChange?(this.previousValue=this.isAngular?this.value:this.previousValue,this.preventChange=!1):(t.isNullOrUndefined(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&t.isNullOrUndefined(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttributesToElement(),this.updateHTMLAttributesToWrapper(),this.checkAttributes(!0),e.Input.validateInputType(this.textareaWrapper.container,this.element);break;case"readonly":e.Input.setReadonly(this.readonly,this.element),this.readonly?this.element.setAttribute("aria-readonly","true"):this.element.removeAttribute("aria-readonly");break;case"showClearButton":e.Input.setClearButton(this.showClearButton,this.element,this.textareaWrapper),this.bindClearEvent();break;case"enableRtl":e.Input.setEnableRtl(this.enableRtl,[this.textareaWrapper.container]),this.handleAdornmentFloatLabel();break;case"placeholder":e.Input.setPlaceholder(this.placeholder,this.element),e.Input.calculateWidth(this.element,this.textareaWrapper.container);break;case"cssClass":e.Input.updateCssClass(i.cssClass,s.cssClass,this.textareaWrapper.container);break;case"locale":this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),e.Input.setPlaceholder(this.placeholder,this.element);break;case"rows":this.rows&&this.element.setAttribute("rows",this.rows.toString());break;case"cols":this.cols&&(this.element.setAttribute("cols",this.cols.toString()),null==this.width&&this.textareaWrapper.container.classList.add(ft));break;case"maxLength":this.maxLength&&this.element.setAttribute("maxlength",this.maxLength.toString());break;case"resizeMode":if(this.enabled){if(this.element.classList.contains(this.getCurrentResizeClass(s.resizeMode))&&this.element.classList.remove(this.getCurrentResizeClass(s.resizeMode)),this.element.classList.add(this.getCurrentResizeClass(this.resizeMode)),!this.element.style.width||"None"!==this.resizeMode&&"Vertical"!==this.resizeMode){var l=this.element.offsetWidth;this.element.style.width=l+"px",this.textareaWrapper.container.style.width&&(this.textareaWrapper.container.style.width="")}else e.Input.setWidth(this.element.style.width,this.textareaWrapper.container);this.setWrapperWidth()}break;case"prependTemplate":this.handleAdornmentDirection(),this.updatePrependTemplate();break;case"appendTemplate":this.handleAdornmentDirection(!0),this.updateAppendTemplate();break;case"adornmentFlow":case"adornmentOrientation":this.handleAdornmentDirection(),this.updatePrependTemplate(),this.updateAppendTemplate()}},s.prototype.preRender=function(){if(this.formElement=t.closest(this.element,"form"),t.isNullOrUndefined(this.formElement)||(this.isForm=!0),"EJS-TEXTAREA"===this.element.tagName||"EJS-SMARTTEXTAREA"===this.element.tagName){var e=t.getValue("ej2_instances",this.element),i=this.createElement("textarea"),s=0;for(s;s<this.element.attributes.length;s++){var n=this.element.attributes[s].nodeName;"id"!==n&&"class"!==n?(i.setAttribute(n,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML,"name"===n&&this.element.removeAttribute("name")):"class"===n&&i.setAttribute(n,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "))}this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}this.updateHTMLAttributesToElement(),this.checkAttributes(!1),!t.isNullOrUndefined(this.textareaOptions)&&void 0!==this.textareaOptions.value||""===this.element.value||this.setProperties({value:this.element.value},!0),this.globalize=new t.Internationalization(this.locale);var a={placeholder:this.placeholder};this.l10n=new t.L10n("textarea",a,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",t.getUniqueID("textbox")),this.element.hasAttribute("name")||this.element.setAttribute("name",this.element.getAttribute("id")),this.rows&&this.element.setAttribute("rows",this.rows.toString()),this.cols&&this.element.setAttribute("cols",this.cols.toString()),this.maxLength&&this.element.setAttribute("maxlength",this.maxLength.toString()),!this.element.style.resize&&this.enabled&&this.element.classList.add(this.getCurrentResizeClass(this.resizeMode)),this.enabled&&this.element.setAttribute("aria-multiline","true")},s.prototype.render=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=e.Input.getInputValidClassList(this.cssClass)),this.textareaWrapper=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{enabled:this.enabled,enableRtl:this.enableRtl,cssClass:i,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}}),this.updateHTMLAttributesToWrapper(),this.wireEvents(),t.isNullOrUndefined(this.value)||e.Input.setValue(this.value,this.element,this.floatLabelType,this.showClearButton),t.isNullOrUndefined(this.value)||(this.initialValue=this.value,this.isAngular||this.element.setAttribute("value",this.initialValue)),this.previousValue=this.value,this.inputPreviousValue=this.value,this.element.defaultValue=this.element.value,e.Input.setWidth(this.width,this.textareaWrapper.container),this.setWrapperWidth(),this.updateFloatLabelOverflowWidth(),this.handleAdornmentDirection(),this.createPrependTemplate(),this.createAppendTemplate(),this.renderComplete(),"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&void 0!==window.ResizeObserver&&new window.ResizeObserver(function(e){for(var t=0,i=e;t<i.length;t++){var s=i[t],n=s.target&&s.target.parentElement?s.target.parentElement.querySelector(".e-float-text"):null;n&&n.classList.contains("e-label-bottom")?n.style.width=s.contentRect.width+"px":n&&n.classList.contains("e-label-top")&&(n.style.width="auto")}}).observe(this.element)},s.prototype.updatePrependTemplate=function(){this.removePrependTemplate(),this.createPrependTemplate()},s.prototype.updateAppendTemplate=function(){this.removeAppendTemplate(),this.createAppendTemplate()},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.createPrependTemplate=function(){if(!t.isNullOrUndefined(this.prependTemplate)){var e=this.textareaWrapper.container;this.prependedElement=this.createElement("div",{className:"e-prepend-template"}),this.iconTemplateFn=this.templateComplier(this.prependTemplate);var i=this.iconTemplateFn(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.prependedElement);if(i){var s=[].slice.call(i);t.append(s,this.prependedElement)}var n=e.querySelector("textarea");e.classList.add("e-prepend-wrapper"),n?e.insertBefore(this.prependedElement,n):e.insertBefore(this.prependedElement,e.firstChild),this.handleAdornmentFloatLabel(),this.renderReactTemplates()}},s.prototype.createAppendTemplate=function(){if(!t.isNullOrUndefined(this.appendTemplate)){var e=this.textareaWrapper.container;this.appendedElement=this.createElement("div",{className:"e-append-template"}),this.iconTemplateFn=this.templateComplier(this.appendTemplate);var i=this.iconTemplateFn(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.appendedElement);if(i){var s=[].slice.call(i);t.append(s,this.appendedElement)}e.classList.add("e-append-wrapper"),e.appendChild(this.appendedElement),this.renderReactTemplates()}},s.prototype.handleAdornmentDirection=function(e){var t=this.textareaWrapper.container.querySelector(".e-float-text");t&&"Auto"===this.floatLabelType&&!e&&(t.style.marginLeft="0",t.style.marginRight="0",t.style.marginTop="0"),"Vertical"===this.adornmentFlow&&(this.appendTemplate||this.prependTemplate)?(this.textareaWrapper.container.classList.add("e-adornment-flow-vertical"),this.textareaWrapper.container.classList.remove("e-adornment-flow-horizontal")):(this.appendTemplate||this.prependTemplate)&&(this.textareaWrapper.container.classList.add("e-adornment-flow-horizontal"),this.textareaWrapper.container.classList.remove("e-adornment-flow-vertical")),"Vertical"===this.adornmentOrientation&&(this.appendTemplate||this.prependTemplate)?(this.textareaWrapper.container.classList.add("e-adornment-orientation-vertical"),this.textareaWrapper.container.classList.remove("e-adornment-orientation-horizontal")):(this.appendTemplate||this.prependTemplate)&&(this.textareaWrapper.container.classList.add("e-adornment-orientation-horizontal"),this.textareaWrapper.container.classList.remove("e-adornment-orientation-vertical"))},s.prototype.handleAdornmentFloatLabel=function(){var e=this.textareaWrapper.container.querySelector(".e-float-text");e&&"Auto"===this.floatLabelType&&setTimeout(function(){e&&this.prependedElement&&"Vertical"!==this.adornmentFlow&&!this.enableRtl?(e.style.marginLeft=this.prependedElement.offsetWidth+"px",e.style.marginRight="0"):e&&this.prependedElement&&"Vertical"!==this.adornmentFlow&&this.enableRtl&&(e.style.marginRight=this.prependedElement.offsetWidth+"px",e.style.marginLeft="0"),"Vertical"===this.adornmentFlow&&"Vertical"===this.adornmentOrientation&&e&&this.prependedElement&&(e.style.marginTop=this.prependedElement.offsetHeight+"px"),"Vertical"===this.adornmentFlow&&"Horizontal"===this.adornmentOrientation&&e&&this.prependedElement&&(e.style.marginTop=this.prependedElement.offsetHeight+"px")}.bind(this),10)},s.prototype.removePrependTemplate=function(){t.isNullOrUndefined(this.prependedElement)||(t.detach(this.prependedElement),this.prependedElement=null)},s.prototype.removeAppendTemplate=function(){t.isNullOrUndefined(this.appendedElement)||(t.detach(this.appendedElement),this.appendedElement=null)},s.prototype.getModuleName=function(){return"textarea"},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.textareaOptions)||void 0===this.textareaOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.textareaOptions)||void 0===this.textareaOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.textareaOptions)||void 0===this.textareaOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":(t.isNullOrUndefined(this.textareaOptions)||void 0===this.textareaOptions.value||e)&&""!==this.element.value&&this.setProperties({value:this.element.value},!e)}}},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"blur",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keydownHandler,this),t.EventHandler.add(this.element,"input",this.inputHandler,this),t.EventHandler.add(this.element,"change",this.changeHandler,this),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent()},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"blur",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keydownHandler),t.EventHandler.remove(this.element,"input",this.inputHandler),t.EventHandler.remove(this.element,"change",this.changeHandler),this.isForm&&t.EventHandler.remove(this.formElement,"reset",this.resetForm)},s.prototype.destroy=function(){this.unWireEvents(),this.removePrependTemplate(),this.removeAppendTemplate(),this.clearTemplate(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),this.element.value=this.element.defaultValue,this.element.classList.remove("e-input","e-resize-x","e-resize-y","e-resize-xy","e-resize-none"),this.textareaWrapper.container.style.width.includes("%")&&t.EventHandler.remove(this.element,"mousemove",this.onMouseMove),this.removeAttributes(["aria-disabled","aria-readonly","aria-labelledby","aria-multiline"]),t.isNullOrUndefined(this.textareaWrapper)||(this.textareaWrapper.container.insertAdjacentElement("afterend",this.element),t.detach(this.textareaWrapper.container)),this.textareaWrapper=null,e.Input.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),this.formElement=null,i.prototype.destroy.call(this)},s.prototype.focusHandler=function(e){var t={container:this.textareaWrapper.container,event:e,value:this.value};if("Never"!==this.floatLabelType&&this.textareaWrapper&&this.textareaWrapper.container){var i=this.textareaWrapper.container.querySelector(".e-float-text");i&&i.removeAttribute("style")}this.trigger("focus",t),"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){var e=this.textareaWrapper?this.textareaWrapper.container.querySelector(".e-float-text"):null;e&&(e.style.width="auto")}.bind(this),5)},s.prototype.focusOutHandler=function(e){null===this.previousValue&&null===this.value||this.previousValue===this.value||this.raiseChangeEvent(e,!0);var t={container:this.textareaWrapper.container,event:e,value:this.value};this.updateFloatLabelOverflowWidth(),this.handleAdornmentFloatLabel(),this.trigger("blur",t)},s.prototype.keydownHandler=function(e){13!==e.keyCode&&9!==e.keyCode||!(null!==this.previousValue&&""!==this.previousValue||null!==this.value&&""!==this.value||""!==this.element.value)||this.setProperties({value:this.element.value},!0)},s.prototype.inputHandler=function(e){var t=this,i={event:e,value:this.element.value,previousValue:this.inputPreviousValue,container:this.textareaWrapper.container};this.inputPreviousValue=this.element.value,this.isAngular&&(t.localChange({value:this.element.value}),this.preventChange=!0),this.isVue&&(this.preventChange=!0),this.trigger("input",i),e.stopPropagation()},s.prototype.changeHandler=function(e){this.setProperties({value:this.element.value},!0),this.previousValue!==this.value&&this.raiseChangeEvent(e,!0),e.stopPropagation()},s.prototype.raiseChangeEvent=function(e,t){var i={event:e,value:this.value,previousValue:this.previousValue,container:this.textareaWrapper.container,isInteraction:t||!1,isInteracted:t||!1};this.preventChange=!1,this.trigger("change",i),this.previousValue=this.value},s.prototype.updateHTMLAttributesToWrapper=function(){e.Input.updateHTMLAttributesToWrapper(this.htmlAttributes,this.textareaWrapper.container)},s.prototype.updateHTMLAttributesToElement=function(){e.Input.updateHTMLAttributesToElement(this.htmlAttributes,this.element)},s.prototype.bindClearEvent=function(){this.showClearButton&&(this.enabled?t.EventHandler.add(this.textareaWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):t.EventHandler.remove(this.textareaWrapper.clearButton,"mousedown touchstart",this.resetInputHandler))},s.prototype.resetInputHandler=function(i){i.preventDefault(),this.textareaWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.textareaWrapper.container.classList.contains("e-static-clear")||(e.Input.setValue("",this.element,this.floatLabelType,this.showClearButton),this.setProperties({value:this.element.value},!0));var s={event:i,value:this.element.value,previousValue:this.inputPreviousValue,container:this.textareaWrapper.container};if(this.trigger("input",s),this.inputPreviousValue=this.element.value,this.raiseChangeEvent(i,!0),t.closest(this.element,"form")){var n=this.element,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}},s.prototype.addAttributes=function(t){for(var i=0,s=Object.keys(t);i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!1},!0),e.Input.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container)):"readonly"===n?(this.setProperties({readonly:!0},!0),e.Input.setReadonly(this.readonly,this.element)):"class"===n?this.element.classList.add(t[""+n]):"placeholder"===n?(this.setProperties({placeholder:t[""+n]},!0),e.Input.setPlaceholder(this.placeholder,this.element)):this.element.setAttribute(n,t[""+n])}},s.prototype.removeAttributes=function(t){for(var i=0,s=t;i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!0},!0),e.Input.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container)):"readonly"===n?(this.setProperties({readonly:!1},!0),e.Input.setReadonly(this.readonly,this.element)):"placeholder"===n?(this.setProperties({placeholder:null},!0),e.Input.setPlaceholder(this.placeholder,this.element)):this.element.removeAttribute(n)}},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),(this.textareaWrapper.container.classList.contains("e-input-group")||this.textareaWrapper.container.classList.contains("e-outline")||this.textareaWrapper.container.classList.contains("e-filled"))&&t.addClass([this.textareaWrapper.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),(this.textareaWrapper.container.classList.contains("e-input-group")||this.textareaWrapper.container.classList.contains("e-outline")||this.textareaWrapper.container.classList.contains("e-filled"))&&t.removeClass([this.textareaWrapper.container],["e-input-focus"]))},s.prototype.setWrapperWidth=function(){this.enabled&&("None"!==this.resizeMode&&"Vertical"!==this.resizeMode||this.cols||this.element.getAttribute("cols"))?("None"===this.resizeMode||"Vertical"===this.resizeMode||this.textareaWrapper.container.style.width.includes("%")||this.setElementWidth(this.textareaWrapper.container.style.width),this.textareaWrapper.container.style.width.includes("%")||(this.textareaWrapper.container.classList.add(ft),this.textareaWrapper.container.style.width=""),this.textareaWrapper.container.style.width.includes("%")&&t.EventHandler.add(this.element,"mousemove",this.onMouseMove,this)):this.textareaWrapper.container.classList.contains(ft)&&this.textareaWrapper.container.classList.remove(ft)},s.prototype.onMouseMove=function(){var e=this;if("auto"!==this.textareaWrapper.container.style.width){var t=this.element.style.width;setTimeout(function(){var i=e.element.style.width;t!==i&&(e.textareaWrapper.container.style.width="auto")},5)}},s.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!t.isNullOrUndefined(this.textareaWrapper)){var e=this.textareaWrapper.container.querySelector(".e-float-text");t.isNullOrUndefined(e)||"Always"===this.floatLabelType||(t.isNullOrUndefined(this.initialValue)||""===this.initialValue?(e.classList.add("e-label-bottom"),e.classList.remove("e-label-top")):""!==this.initialValue&&(e.classList.add("e-label-top"),e.classList.remove("e-label-bottom")))}},s.prototype.resetValue=function(e){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=e,null!=e||!this.textareaWrapper.container.classList.contains("e-valid-input")||"Always"===this.floatLabelType&&this.textareaWrapper.container.classList.contains("e-outline")||this.textareaWrapper.container.classList.remove("e-valid-input"),this.isProtectedOnChange=t},s.prototype.setElementWidth=function(e){"number"==typeof e?this.element.style.width=t.formatUnit(e):"string"==typeof e&&(this.element.style.width=e.match(/px|%|em/)?e:t.formatUnit(e))},s.prototype.getCurrentResizeClass=function(e){return"None"===e?"e-resize-none":"Both"===e?"e-resize-xy":"Horizontal"===e?"e-resize-x":"e-resize-y"},s.prototype.getRightIconsWidth=function(){for(var e=0,t=this.textareaWrapper.container.querySelectorAll(".e-input-group-icon, .e-clear-icon"),i=0;i<t.length;i++)e+=t[i].offsetWidth;return e},s.prototype.updateFloatLabelOverflowWidth=function(){var e=this.textareaWrapper.container,t=e.querySelector(".e-float-text-overflow")||e.querySelector(".e-float-text"),i=e.clientWidth-this.getRightIconsWidth();!t||!i||this.cssClass&&-1!==this.cssClass.split(" ").indexOf("e-outline")||this.prependTemplate&&this.appendTemplate?"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){var t=e?e.querySelector(".e-float-text.e-label-bottom"):null;t&&(t.style.width=this.element.offsetWidth+"px")}.bind(this),10):t.style.width=i+"px"},mt([t.Property(!1)],s.prototype,"readonly",void 0),mt([t.Property(null)],s.prototype,"value",void 0),mt([t.Property("Never")],s.prototype,"floatLabelType",void 0),mt([t.Property("")],s.prototype,"cssClass",void 0),mt([t.Property(null)],s.prototype,"placeholder",void 0),mt([t.Property({})],s.prototype,"htmlAttributes",void 0),mt([t.Property(!0)],s.prototype,"enabled",void 0),mt([t.Property(!1)],s.prototype,"showClearButton",void 0),mt([t.Property(!1)],s.prototype,"enablePersistence",void 0),mt([t.Property(null)],s.prototype,"width",void 0),mt([t.Property("Both")],s.prototype,"resizeMode",void 0),mt([t.Property(null)],s.prototype,"maxLength",void 0),mt([t.Property(null)],s.prototype,"cols",void 0),mt([t.Property(null)],s.prototype,"rows",void 0),mt([t.Property(null)],s.prototype,"prependTemplate",void 0),mt([t.Property(null)],s.prototype,"appendTemplate",void 0),mt([t.Property("Horizontal")],s.prototype,"adornmentFlow",void 0),mt([t.Property("Horizontal")],s.prototype,"adornmentOrientation",void 0),mt([t.Event()],s.prototype,"created",void 0),mt([t.Event()],s.prototype,"destroyed",void 0),mt([t.Event()],s.prototype,"change",void 0),mt([t.Event()],s.prototype,"blur",void 0),mt([t.Event()],s.prototype,"focus",void 0),mt([t.Event()],s.prototype,"input",void 0),s=mt([t.NotifyPropertyChanges],s)}(t.Component),gt=function(){function e(){}return e.createStyledDiv=function(e,t){var i=document.createElement("div"),s={position:"absolute",left:-9999,top:0,zIndex:-2e3};this.properties.forEach(function(t){s[""+t]=getComputedStyle(e)[t]}),Object.keys(s).forEach(function(e){i.style[""+e]=s[""+e]});var n=e.offsetWidth-e.clientWidth;return i.style.width=e.clientWidth+n+"px",i.innerHTML=t,e&&e.parentNode&&e.parentNode.insertBefore(i,e.nextSibling),i},e.createCaretMarker=function(e,t){var i=this.createStyledDiv(e,t),s=i.ownerDocument.getElementById("caret-position-marker"),n={left:s.offsetLeft,top:s.offsetTop,height:s.offsetHeight};return i&&i.parentNode&&i.parentNode.removeChild(i),n},e.escapeHtml=function(e){return e.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>")},e.getCaretPosition=function(e){var t=e.selectionStart||0,i=e.value.slice(0,t),s=e.value.slice(t),n='<span style="position: relative; display: inline;">'+this.escapeHtml(i)+"</span>";n+='<span id="caret-position-marker" style="position: relative; display: inline;">|</span>',n+='<span style="position: relative; display: inline;">'+this.escapeHtml(s)+"</span>";var a=this.createCaretMarker(e,n);return a.pos=t,a},e.adjustScrollToCaretPosition=function(e){var t=this.getCaretPosition(e),i=parseFloat(window.getComputedStyle(e).lineHeight);t.top>e.clientHeight+e.scrollTop-i&&(e.scrollTop=t.top-e.clientHeight+i)},e.getTextAreaPosition=function(e){var t=window.getComputedStyle(e),i=this.getCaretPosition(e);return{top:i.top+parseFloat(t.borderTopWidth)+e.offsetTop-e.scrollTop,left:i.left+parseFloat(t.borderLeftWidth)+e.offsetLeft-e.scrollLeft-.25,height:i.height,elemStyle:t}},e.insertCharacter=function(e,t){var i=e.selectionStart,s=e.selectionEnd;e.value=e.value.substring(0,i)+t+e.value.substring(s),i+=t.length,e.setSelectionRange(i,i)},e.properties=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap","width"],e}(),yt=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)}}(),bt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ct=function(e,t,i,s){return new(i||(i=Promise))(function(n,a){function r(e){try{o(s.next(e))}catch(e){a(e)}}function l(e){try{o(s.throw(e))}catch(e){a(e)}}function o(e){e.done?n(e.value):new i(function(t){t(e.value)}).then(r,l)}o((s=s.apply(e,t||[])).next())})},Et=function(e,t){function i(e){return function(t){return s([e,t])}}function s(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(r=2&i[0]?a.return:i[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,i[1])).done)return r;switch(a=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,a=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(r=o.trys,!(r=r.length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){o.label=i[1];break}if(6===i[0]&&o.label<r[1]){o.label=r[1],r=i;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(i);break}r[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],a=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var n,a,r,l,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return l={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l};!function(e){e.System="system",e.User="user",e.Assistant="assistant"}(e.ChatMessageRole||(e.ChatMessageRole={}));var xt=function(i){function s(e,t){return i.call(this,e,t)||this}return yt(s,i),s.prototype.render=function(){if(i.prototype.render.call(this),this.element instanceof HTMLTextAreaElement){this.textArea=this.element;var e=t.createElement("smart-textarea");if(e.classList.add("e-smart-textarea"),this.textArea.after(e),"None"!==this.showSuggestionOnPopup){var s="Enable"===this.showSuggestionOnPopup?"false":"true";this.textArea.setAttribute("data-inline-suggestions",s)}this.suggestionDisplay=this.shouldShowInlineSuggestions(this.textArea)?new Tt(this,e,this.textArea):new St(this,e,this.textArea)}},s.prototype.wireEvents=function(){var e=this;i.prototype.wireEvents.call(this),t.EventHandler.add(this.element,"keyup",this.handleKeyUp,this),t.EventHandler.add(this.element,"keydown",this.handleKeyDown,this),t.EventHandler.add(this.element,"mousedown",this.removeExistingOrPendingSuggestion,this),t.EventHandler.add(this.element,"focusout",this.removeExistingOrPendingSuggestion,this),this.element.addEventListener("scroll",function(){return e.suggestionDisplay.reject()},{passive:!0})},s.prototype.unWireEvents=function(){var e=this;i.prototype.unWireEvents.call(this),t.EventHandler.remove(this.element,"keyup",this.handleKeyUp),t.EventHandler.remove(this.element,"keydown",this.handleKeyDown),t.EventHandler.remove(this.element,"mousedown",this.removeExistingOrPendingSuggestion),t.EventHandler.remove(this.element,"focusout",this.removeExistingOrPendingSuggestion),this.element.removeEventListener("scroll",function(){return e.suggestionDisplay.reject()})},s.prototype.keydownHandler=function(){},s.prototype.shouldShowInlineSuggestions=function(e){var t=e.getAttribute("data-inline-suggestions");return t?"true"===t.toLowerCase():!("ontouchstart"in window)},s.prototype.handleKeyDown=function(e){switch(e.key){case"Tab":this.suggestionDisplay.isShowing()&&(this.suggestionDisplay.accept(),e.preventDefault());break;case"Alt":case"Control":case"Shift":case"Command":break;default:this.suggestionDisplay.isShowing()&&this.suggestionDisplay.currentSuggestion.startsWith(e.key)?(gt.insertCharacter(this.textArea,e.key),e.preventDefault(),this.suggestionDisplay.show(this.suggestionDisplay.currentSuggestion.substring(e.key.length)),gt.adjustScrollToCaretPosition(this.textArea)):this.removeExistingOrPendingSuggestion()}},s.prototype.handleKeyUp=function(){var e=this;this.suggestionDisplay.isShowing()||(clearTimeout(this.typingDebounceTimeout),this.typingDebounceTimeout=setTimeout(function(){return e.handleTypingPaused()},350))},s.prototype.handleTypingPaused=function(){return Ct(this,void 0,void 0,function(){return Et(this,function(e){switch(e.label){case 0:return document.activeElement!==this.textArea?[2]:this.textArea.selectionStart!==this.textArea.selectionEnd||this.textArea.selectionStart!==this.textArea.value.length&&"\n"!==this.textArea.value[this.textArea.selectionStart]?[3,2]:[4,this.requestSuggestionAsync()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},s.prototype.removeExistingOrPendingSuggestion=function(){clearTimeout(this.typingDebounceTimeout),this.pendingSuggestionAbort&&(this.pendingSuggestionAbort.abort(),this.pendingSuggestionAbort=null),this.suggestionDisplay.reject()},s.prototype.createSuggestionPrompt=function(t,i){var s="Predict what text the user in the given ROLE would insert at the cursor position indicated by ^^^.\nOnly give predictions for which you have an EXTREMELY high confidence that the user would insert that EXACT text.\nDo not make up new information. If you are not sure, just reply with NO_PREDICTION.\n\nRULES:\n1. Reply with OK:, then in square brackets the predicted text, then END_INSERTION, and no other output.\n2. When a specific value or quantity cannot be inferred and would need to be provided, use the word NEED_INFO.\n3. If there is not enough information to predict any words that the user would type next, just reply with the word NO_PREDICTION.\n4. NEVER invent new information. If you can not be sure what the user is about to type, ALWAYS stop the prediction with END_INSERTION.",n=this.UserPhrases;if(n&&n.length>0){s+="\nAlways try to use variations on the following phrases as part of the predictions:\n";for(var a=0,r=n;a<r.length;a++)s+="- "+r[a]+"\n"}return{messages:[{role:e.ChatMessageRole.System,content:s},{role:e.ChatMessageRole.User,content:"ROLE: Family member sending a text\nUSER_TEXT: Hey, it is a nice day - the weather is ^^^"},{role:e.ChatMessageRole.Assistant,content:"OK:[great!]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Customer service assistant\nUSER_TEXT: You can find more information on^^^\n\nAlternatively, phone us."},{role:e.ChatMessageRole.Assistant,content:"OK:[ our website at NEED_INFO]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Casual\nUSER_TEXT: Oh I see!\n\nWell sure thing, we can"},{role:e.ChatMessageRole.Assistant,content:"OK:[ help you out with that!]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Storyteller\nUSER_TEXT: Sir Digby Chicken Caesar, also know^^^"},{role:e.ChatMessageRole.Assistant,content:"OK:[n as NEED_INFO]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Customer support agent\nUSER_TEXT: Goodbye for now.^^^"},{role:e.ChatMessageRole.Assistant,content:"NO_PREDICTION END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Pirate\nUSER_TEXT: Have you found^^^"},{role:e.ChatMessageRole.Assistant,content:"OK:[ the treasure, me hearties?]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: "+this.userRole+"\nUSER_TEXT: "+t+"^^^"+i}],temperature:0,maxTokens:400,stopSequences:["END_INSERTION","NEED_INFO"],frequencyPenalty:0,presencePenalty:0}},s.prototype.requestSuggestionAsync=function(){return Ct(this,void 0,void 0,function(){var e,t,i,s,n,a;return Et(this,function(r){switch(r.label){case 0:return this.pendingSuggestionAbort?(this.pendingSuggestionAbort.abort(),[2]):(this.pendingSuggestionAbort=new AbortController,e={textAreaValue:this.textArea.value,cursorPosition:this.textArea.selectionStart},t={textBefore:e.textAreaValue.substring(0,e.cursorPosition),textAfter:e.textAreaValue.substring(e.cursorPosition)},i=this.createSuggestionPrompt(t.textBefore,t.textAfter),"function"!=typeof this.aiSuggestionHandler?[3,2]:[4,this.aiSuggestionHandler(i)]);case 1:n=r.sent(),s=this.validateSuggestion(n,t.textBefore),r.label=2;case 2:if(s&&e.textAreaValue===this.textArea.value&&e.cursorPosition===this.textArea.selectionStart){if(s.endsWith(" ")||(s+=" "),a={text:s,cancel:!1},this.trigger("beforeSuggestionInsert",a),a.cancel)return[2];this.suggestionDisplay.show(a.text)}return[2]}})})},s.prototype.validateSuggestion=function(e,t){var i;if("string"!=typeof e||e.length<=5||0!==e.indexOf("OK:["))return"";var s=this.indexOfAny(e,[".","?","!"]);return s>0&&e.length>s+1&&" "===e[s+1]&&(e=e.substring(0,s+1)),i=e.substring(4).replace(/[\]\s]+$/,""),t.length>0&&" "===t[t.length-1]&&(i=i.replace(/^\s+/,"")),i},s.prototype.indexOfAny=function(e,t){for(var i=0;i<e.length;i++)if(-1!==t.indexOf(e[""+i]))return i;return-1},s.prototype.getModuleName=function(){return"smarttextarea"},s.prototype.destroy=function(){i.prototype.destroy.call(this),this.textArea=null,this.suggestionDisplay=null,this.typingDebounceTimeout=null},bt([t.Event()],s.prototype,"beforeSuggestionInsert",void 0),bt([t.Event()],s.prototype,"afterSuggestionInsert",void 0),bt([t.Property("")],s.prototype,"userRole",void 0),bt([t.Property([])],s.prototype,"UserPhrases",void 0),bt([t.Property()],s.prototype,"aiSuggestionHandler",void 0),bt([t.Property("None")],s.prototype,"showSuggestionOnPopup",void 0),s}(vt),Tt=function(){function e(e,t,i){this.smartTextArea=e,this.owner=t,this.textArea=i,this.latestSuggestionText="",this.suggestionStartPos=null,this.suggestionEndPos=null,this.virtualCaret=null,this.originalValueProperty=this.getOriginalValueProperty(i,"value")}return Object.defineProperty(e.prototype,"value",{get:function(){var e=this.originalValueProperty.get.call(this.textArea);return this.isShowing()?e.substring(0,this.suggestionStartPos)+e.substring(this.suggestionEndPos):e},set:function(e){this.originalValueProperty.set.call(this.textArea,e)},enumerable:!0,configurable:!0}),e.prototype.getOriginalValueProperty=function(e,t){for(;e;){var i=Object.getOwnPropertyDescriptor(e,t);if(i)return i;e=Object.getPrototypeOf(e)}throw new Error("Property "+t+" not found on object or its prototype chain")},Object.defineProperty(e.prototype,"valueIncludingSuggestion",{get:function(){return this.originalValueProperty.get.call(this.textArea)},set:function(e){this.originalValueProperty.set.call(this.textArea,e)},enumerable:!0,configurable:!0}),e.prototype.isShowing=function(){return null!==this.suggestionStartPos},e.prototype.show=function(e){this.latestSuggestionText=e,this.suggestionStartPos=this.textArea.selectionStart,this.suggestionEndPos=this.suggestionStartPos+e.length,this.textArea.setAttribute("data-suggestion-visible",""),this.valueIncludingSuggestion=this.valueIncludingSuggestion.substring(0,this.suggestionStartPos)+e+this.valueIncludingSuggestion.substring(this.suggestionStartPos),this.textArea.setSelectionRange(this.suggestionStartPos,this.suggestionEndPos),this.virtualCaret||(this.virtualCaret=new Pt(this.owner,this.textArea)),this.virtualCaret.show()},Object.defineProperty(e.prototype,"currentSuggestion",{get:function(){return this.latestSuggestionText},enumerable:!0,configurable:!0}),e.prototype.accept=function(){var e=this.currentSuggestion;this.textArea.setSelectionRange(this.suggestionEndPos,this.suggestionEndPos),this.suggestionStartPos=null,this.suggestionEndPos=null,this.virtualCaret&&this.virtualCaret.hide(),this.textArea.removeAttribute("data-suggestion-visible"),gt.adjustScrollToCaretPosition(this.textArea),this.smartTextArea.trigger("afterSuggestionInsert",{insertedText:e})},e.prototype.reject=function(){if(this.isShowing()){var e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.valueIncludingSuggestion=this.valueIncludingSuggestion.substring(0,this.suggestionStartPos)+this.valueIncludingSuggestion.substring(this.suggestionEndPos),this.suggestionStartPos===e&&this.suggestionEndPos===t&&this.textArea.setSelectionRange(e,e),this.suggestionStartPos=null,this.suggestionEndPos=null,this.textArea.removeAttribute("data-suggestion-visible"),this.virtualCaret&&this.virtualCaret.hide()}},e}(),St=function(){function e(e,t,i){var s=this;this.latestSuggestionText="",this.showing=!1,this.smartTextArea=e,this.textArea=i,this.suggestionElement=document.createElement("div"),this.suggestionElement.classList.add("smart-textarea-suggestion-overlay"),this.suggestionElement.addEventListener("mousedown",function(e){return s.handleSuggestionClicked(e)}),this.suggestionElement.addEventListener("touchend",function(e){return s.handleSuggestionClicked(e)}),this.suggestionPrefixElement=document.createElement("span"),this.suggestionTextElement=document.createElement("span"),this.suggestionElement.appendChild(this.suggestionPrefixElement),this.suggestionElement.appendChild(this.suggestionTextElement),this.suggestionPrefixElement.style.opacity="0.3";var n=window.getComputedStyle(this.textArea);this.suggestionElement.style.font=n.font,this.suggestionElement.style.marginTop=1.4*parseFloat(n.fontSize)+"px",t.appendChild(this.suggestionElement)}return Object.defineProperty(e.prototype,"currentSuggestion",{get:function(){return this.latestSuggestionText},enumerable:!0,configurable:!0}),e.prototype.show=function(e){this.latestSuggestionText=e,this.suggestionPrefixElement.textContent=" "!==e[0]?this.getPrefixText(this.textArea,20):"",this.suggestionTextElement.textContent=e;var t=gt.getTextAreaPosition(this.textArea),i=this.suggestionElement.style;i.minWidth=null,this.suggestionElement.classList.add("smart-textarea-suggestion-overlay-visible"),i.zIndex=this.textArea.style.zIndex+1,i.top=t.top+"px";var s=t.left-this.suggestionPrefixElement.offsetWidth;(!i.left||Math.abs(parseFloat(i.left)-s)>10)&&(i.left=s+"px"),this.showing=!0;var n=window.getComputedStyle(this.suggestionElement),a=parseFloat(n.lineHeight),r=parseFloat(n.paddingTop),l=parseFloat(n.paddingBottom),o=Math.round((this.suggestionElement.offsetHeight-r-l)/a);if(o>2){var h=this.suggestionElement.offsetWidth;i.minWidth="calc(min(70vw, "+o*h/2+"px))"}var p=this.suggestionElement.getBoundingClientRect();p.right>document.body.clientWidth-20&&(i.left="calc("+(parseFloat(i.left)-(p.right-document.body.clientWidth))+"px - 2rem)")},e.prototype.accept=function(){if(this.showing){var e=this.currentSuggestion;gt.insertCharacter(this.textArea,e),gt.adjustScrollToCaretPosition(this.textArea),this.hide(),this.smartTextArea.trigger("afterSuggestionInsert",{insertedText:e})}},e.prototype.reject=function(){this.hide()},e.prototype.hide=function(){this.showing&&(this.showing=!1,this.suggestionElement.classList.remove("smart-textarea-suggestion-overlay-visible"))},e.prototype.isShowing=function(){return this.showing},e.prototype.handleSuggestionClicked=function(e){e.preventDefault(),e.stopImmediatePropagation(),this.accept()},e.prototype.getPrefixText=function(e,t){for(var i=e.value,s=e.selectionStart,n=s-1;n>s-t;n--)if(n<0||/\s/.test(i[""+n]))return i.substring(n+1,s);return""},e}(),Pt=function(){function e(e,t){this.textArea=t,this.caretDiv=document.createElement("div"),this.caretDiv.classList.add("smart-textarea-caret"),e.appendChild(this.caretDiv)}return e.prototype.show=function(){var e=gt.getTextAreaPosition(this.textArea),t=this.caretDiv.style;t.display="block",t.top=e.top+"px",t.left=e.left+"px",t.height=e.height+"px",t.zIndex=this.textArea.style.zIndex,t.backgroundColor=e.elemStyle.caretColor},e.prototype.hide=function(){this.caretDiv.style.display="none"},e}(),Ot=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)}}(),kt=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.minDistance=5,t.previous=0,t.interval=30,t.timeout=null,t.isSignatureEmpty=!0,t.backgroundLoaded=null,t.isBlazor=!1,t.isResponsive=!1,t.signPointsColl=[],t.signRatioPointsColl=[],t.canRedraw=!0,t}return Ot(i,e),i.prototype.initialize=function(e,i){this.clearArray=[],this.element=e,this.canvasContext=this.element.getContext("2d"),this.canvasContext.canvas.tabIndex=-1,i&&(this.dotnetRef=i,this.isBlazor=!0,this.signatureValue&&this.loadPersistedSignature()),this.setHTMLProperties(),t.isNullOrUndefined(this.signatureValue)&&this.updateSnapCollection(!0),this.wireEvents(),this.isBlazor||this.trigger("created",null)},i.prototype.wireEvents=function(){!t.isNullOrUndefined(this.pointColl)||this.isReadOnly||this.disabled?this.pointColl&&(t.EventHandler.add(this.canvasContext.canvas,"mousemove touchmove",this.mouseMoveHandler,this),t.EventHandler.add(this.canvasContext.canvas,"mouseup touchend",this.mouseUpHandler,this),t.EventHandler.add(document,"mouseup",this.mouseUpHandler,this)):(t.EventHandler.add(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler,this),t.EventHandler.add(this.canvasContext.canvas,"keydown",this.keyboardHandler,this),window.addEventListener("resize",this.resizeHandler.bind(this)))},i.prototype.unwireEvents=function(e){"mouseup"===e||"touchend"===e?(this.canvasContext&&(t.EventHandler.remove(this.canvasContext.canvas,"mousemove touchmove",this.mouseMoveHandler),t.EventHandler.remove(this.canvasContext.canvas,"mouseup touchend",this.mouseUpHandler)),t.EventHandler.remove(document,"mouseup",this.mouseUpHandler)):(this.canvasContext&&(t.EventHandler.remove(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler),t.EventHandler.remove(this.canvasContext.canvas,"keydown",this.keyboardHandler)),window.removeEventListener("resize",this.resizeHandler))},i.prototype.setHTMLProperties=function(){150===this.element.height&&300===this.element.width&&0!==this.element.offsetHeight&&0!==this.element.offsetWidth?(this.element.height=this.element.offsetHeight,this.element.width=this.element.offsetWidth,this.isResponsive=!0):this.element.height===this.element.offsetHeight-1&&this.element.width===this.element.offsetWidth-1||0===this.element.offsetHeight||0===this.element.offsetWidth||(this.element.height=this.element.offsetHeight,this.element.width=this.element.offsetWidth),this.canvasContext.fillStyle=this.strokeColor,this.tempCanvas=this.createElement("canvas",{className:"e-"+this.getModuleName()+"-temp"}),this.tempContext=this.tempCanvas.getContext("2d"),this.tempCanvas.width=this.element.width,this.tempCanvas.height=this.element.height,this.backgroundImage?(this.canvasContext.canvas.style.backgroundImage="url("+this.backgroundImage+")",this.canvasContext.canvas.style.backgroundRepeat="no-repeat",this.saveWithBackground&&this.setBackgroundImage(this.backgroundImage,"temp")):this.backgroundColor&&(this.canvasContext.canvas.style.backgroundColor=this.backgroundColor)},i.prototype.mouseDownHandler=function(e){1!==e.buttons&&2!==e.buttons&&"touchstart"!==e.type||("touchstart"===e.type&&(e.preventDefault(),e.stopPropagation()),this.beginStroke(e),this.wireEvents())},i.prototype.mouseMoveHandler=function(e){1!==e.buttons&&2!==e.buttons&&"touchmove"!==e.type||("touchmove"===e.type&&(e.preventDefault(),e.stopPropagation()),this.interval?this.updateStrokeWithThrottle(e):this.updateStroke(e))},i.prototype.mouseUpHandler=function(e){var t={actionName:"strokeUpdate"};"touchstart"===e.type&&(e.preventDefault(),e.stopPropagation()),this.endDraw(),this.updateSnapCollection(),this.unwireEvents(e.type),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","mouseUp"):this.trigger("change",t),this.signatureValue=this.snapColl[this.incStep];for(var i=0;i<this.signPointsColl.length;i++)this.signRatioPointsColl.push({x:this.signPointsColl[i].x/this.canvasContext.canvas.width,y:this.signPointsColl[i].y/this.canvasContext.canvas.height});this.signPointsColl=[]},i.prototype.keyboardHandler=function(e){var t=this,i={fileName:"Signature",type:"Png",cancel:!1};switch(e.key){case"Delete":this.clear();break;case e.ctrlKey&&"s":this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","beforeSave"):this.trigger("beforeSave",i,function(e){i.cancel||t.save(e.type,e.fileName)}),e.preventDefault(),e.stopImmediatePropagation();break;case e.ctrlKey&&"z":this.undo();break;case e.ctrlKey&&"y":this.redo()}},i.prototype.resizeHandler=function(){var e=this;if(this.isResponsive&&this.canRedraw&&this.canvasContext&&this.element){this.canvasContext.canvas.width=this.element.offsetWidth,this.canvasContext.canvas.height=this.element.offsetHeight,this.canvasContext.scale(1,1),this.canvasContext.fillStyle=this.strokeColor;for(var t=(this.minStrokeWidth+this.maxStrokeWidth)/2,i=0;i<this.signRatioPointsColl.length;i++)this.arcDraw(this.signRatioPointsColl[i].x*this.canvasContext.canvas.width,this.signRatioPointsColl[i].y*this.canvasContext.canvas.height,t);this.signPointsColl=[],this.canvasContext.closePath(),this.canvasContext.fill()}else if(this.canvasContext&&this.element){var s=new Image;s.src=this.snapColl[this.incStep],s.onload=function(){e.canvasContext.clearRect(0,0,e.element.width,e.element.height),e.canvasContext.drawImage(s,0,0,e.element.width,e.element.height)}}},i.prototype.beginStroke=function(e){this.internalRefresh(),this.updateStroke(e)},i.prototype.updateStroke=function(e){var t=this.createPoint(e);this.addPoint(t)},i.prototype.updateStrokeWithThrottle=function(e){var t=Date.now(),i=this.interval-(t-this.previous);this.storedArgs=e,i<=0||i>this.interval?(this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.previous=t,this.updateStroke(this.storedArgs),this.timeout||(this.storedArgs=null)):this.timeout||(this.timeout=window.setTimeout(this.delay.bind(this),i))},i.prototype.delay=function(){this.previous=Date.now(),this.timeout=null,this.updateStroke(this.storedArgs),this.timeout||(this.storedArgs=null)},i.prototype.createPoint=function(e){var t=this.canvasContext.canvas.getBoundingClientRect();return"mousedown"===e.type||"mousemove"===e.type?this.point(e.clientX-t.left,e.clientY-t.top,(new Date).getTime()):this.point(e.touches[0].clientX-t.left,e.touches[0].clientY-t.top,(new Date).getTime())},i.prototype.point=function(e,t,i){return this.pointX=e,this.pointY=t,this.time=i||(new Date).getTime(),{x:this.pointX,y:this.pointY,time:this.time}},i.prototype.addPoint=function(e){var t,i,s=this.pointColl,n=s.length>0&&s[s.length-1],a=!!n&&this.distanceTo(n)<=this.minDistance;n&&n&&a||(s.push(e),s.length>2&&(3===s.length&&s.unshift(s[0]),t=this.calculateCurveControlPoints(s[0],s[1],s[2]).controlPoint2,i=this.calculateCurveControlPoints(s[1],s[2],s[3]).controlPoint1,this.startPoint=s[1],this.controlPoint1=t,this.controlPoint2=i,this.endPoint=s[2],this.startDraw(),s.shift()))},i.prototype.startDraw=function(){var e;e=this.pointVelocityCalc(this.startPoint),e=this.velocity*e+(1-this.velocity)*this.lastVelocity;var t=Math.max(this.maxStrokeWidth/(e+1),this.minStrokeWidth);this.curveDraw(this.lastWidth,t),this.lastVelocity=e,this.lastWidth=t},i.prototype.endDraw=function(){if(!t.isNullOrUndefined(this.pointColl)){var e=this.pointColl.length>2,i=this.pointColl[0];!e&&i&&this.strokeDraw(i)}},i.prototype.curveDraw=function(e,t){var i,s,n,a,r,l,o,h,p,d,u=this.canvasContext,c=t-e,m=this.bezierLengthCalc(),f=2*Math.ceil(m);for(u.beginPath(),s=0;s<f;s++)r=(a=(n=s/f)*n)*n,p=(h=(o=(l=1-n)*l)*l)*this.startPoint.x,p+=3*o*n*this.controlPoint1.x,p+=3*l*a*this.controlPoint2.x,p+=r*this.endPoint.x,d=h*this.startPoint.y,d+=3*o*n*this.controlPoint1.y,d+=3*l*a*this.controlPoint2.y,d+=r*this.endPoint.y,i=Math.min(e+r*c,this.maxStrokeWidth),this.arcDraw(p,d,i);u.closePath(),u.fill(),this.isSignatureEmpty=!1},i.prototype.strokeDraw=function(e){var t=this.canvasContext,i=(this.minStrokeWidth+this.maxStrokeWidth)/2;t.beginPath(),this.arcDraw(e.x,e.y,i),t.closePath(),t.fill(),this.isSignatureEmpty=!1},i.prototype.arcDraw=function(e,t,i){this.signPointsColl.push({x:e,y:t});var s=this.canvasContext;s.moveTo(e,t),s.arc(e,t,i,0,2*Math.PI,!1)},i.prototype.calculateCurveControlPoints=function(e,t,i){var s=e.x-t.x,n=e.y-t.y,a=t.x-i.x,r=t.y-i.y,l={x:(e.x+t.x)/2,y:(e.y+t.y)/2},o={x:(t.x+i.x)/2,y:(t.y+i.y)/2},h=Math.sqrt(s*s+n*n),p=Math.sqrt(a*a+r*r),d=l.x-o.x,u=l.y-o.y,c=p/(h+p),m={x:o.x+d*c,y:o.y+u*c},f=t.x-m.x,v=t.y-m.y;return{controlPoint1:this.point(l.x+f,l.y+v,0),controlPoint2:this.point(o.x+f,o.y+v,0)}},i.prototype.bezierLengthCalc=function(){var e,t,i,s,n,a,r,l,o=0;for(e=0;e<=10;e++)t=e/10,i=this.bezierPointCalc(t,this.startPoint.x,this.controlPoint1.x,this.controlPoint2.x,this.endPoint.x),s=this.bezierPointCalc(t,this.startPoint.y,this.controlPoint1.y,this.controlPoint2.y,this.endPoint.y),e>0&&(r=i-n,l=s-a,o+=Math.sqrt(r*r+l*l)),n=i,a=s;return o},i.prototype.bezierPointCalc=function(e,t,i,s,n){return t*(1-e)*(1-e)*(1-e)+3*i*(1-e)*(1-e)*e+3*s*(1-e)*e*e+n*e*e*e},i.prototype.pointVelocityCalc=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0},i.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.pointX-e.x,2)+Math.pow(this.pointY-e.y,2))},i.prototype.isRead=function(e){e?t.EventHandler.remove(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler):this.disabled||t.EventHandler.add(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler,this)},i.prototype.enableOrDisable=function(e){this.disabled=e,e?(this.canvasContext.canvas.style.filter="opacity(0.5)",this.isRead(!0)):(this.canvasContext.canvas.style.filter="",this.isRead(!1))},i.prototype.updateSnapCollection=function(e){if(t.isNullOrUndefined(this.incStep)?(this.incStep=-1,this.incStep++,this.snapColl=[],this.clearArray=[]):this.incStep++,this.incStep<this.snapColl.length&&(this.snapColl.length=this.incStep),this.incStep>0){var i=this.createElement("canvas",{className:"e-"+this.getModuleName()+"-wrapper"}),s=i.getContext("2d");this.canvasContext&&(i.width=this.canvasContext.canvas.width,i.height=this.canvasContext.canvas.height,s.drawImage(this.canvasContext.canvas,0,0,i.width,i.height),this.snapColl.push(i.toDataURL()))}else this.snapColl.push(this.canvasContext.canvas.toDataURL());e&&this.clearArray.push(this.incStep)},i.prototype.setBackgroundImage=function(e,t){var i=this,s=new Image;s.crossOrigin="anonymous",s.src=e,"temp"===t?s.onload=function(){i.tempContext.globalCompositeOperation="source-over",i.tempContext.drawImage(s,0,0,i.element.width,i.element.height)}:(s.onload=function(){i.canvasContext.globalCompositeOperation="source-over",i.canvasContext.drawImage(s,0,0,i.element.width,i.element.height),i.updateSnapCollection(),i.saveBackground(!0)},this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height))},i.prototype.setBackgroundColor=function(e){var t=this.canvasContext;t.strokeStyle=e;var i,s;for(i=1;i<=t.canvas.width;i++)for(s=1;s<=t.canvas.height;s++)t.strokeRect(0,0,i,s);this.updateSnapCollection()},i.prototype.loadPersistedSignature=function(){if(!t.isNullOrUndefined(this.signatureValue)){var e=this,i=new Image;i.src=this.signatureValue,i.onload=function(){e.canvasContext.clearRect(0,0,e.element.width,e.element.height),e.canvasContext.drawImage(i,0,0),e.updateSnapCollection()},this.isSignatureEmpty=!1}},i.prototype.getBlob=function(e){for(var t=e.split(","),i=t[0].match(/:(.*?);/)[1],s=atob(t[1]),n=s.length,a=new Uint8Array(n);n--;)a[n]=s.charCodeAt(n);return new Blob([a],{type:i})},i.prototype.download=function(e,t){var i=URL.createObjectURL(e),s=document.createElement("a");s.href=i,s.target="_parent",s.download=t,(document.body||document.documentElement).appendChild(s),s.click(),s.parentNode.removeChild(s)},i.prototype.internalRefresh=function(){this.pointColl=[],this.lastVelocity=0,this.lastWidth=(this.minStrokeWidth+this.maxStrokeWidth)/2},i.prototype.refresh=function(){this.isResponsive=!1,this.setHTMLProperties(),this.resizeHandler(),this.internalRefresh()},i.prototype.clear=function(){var e={actionName:"clear"};this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height),this.tempContext.clearRect(0,0,this.tempContext.canvas.width,this.tempContext.canvas.height),this.saveWithBackground&&this.backgroundImage&&this.setBackgroundImage(this.backgroundImage,"temp"),this.internalRefresh(),this.signRatioPointsColl=[],this.updateSnapCollection(!0),this.isSignatureEmpty=this.canRedraw=!0,this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","Clear"):this.trigger("change",e)},i.prototype.undo=function(){var e={actionName:"undo"},t=this;if(this.incStep>0){this.incStep--;var i=new Image;i.src=this.snapColl[this.incStep],i.onload=function(){t.canvasContext.clearRect(0,0,t.element.width,t.element.height),t.canvasContext.drawImage(i,0,0,t.element.width,t.element.height)}}this.isClear(),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","Undo"):this.trigger("change",e)},i.prototype.redo=function(){var e={actionName:"redo"},t=this;if(this.incStep<this.snapColl.length-1){this.incStep++;var i=new Image;i.src=this.snapColl[this.incStep],i.onload=function(){t.canvasContext.clearRect(0,0,t.element.width,t.element.height),t.canvasContext.drawImage(i,0,0,t.element.width,t.element.height)}}this.isClear(),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","Redo"):this.trigger("change",e)},i.prototype.isClear=function(){if(this.clearArray){for(var e=!1,t=0;t<this.clearArray.length;t++)this.clearArray[t]===this.incStep&&(this.isSignatureEmpty=!0,e=!0);e||(this.isSignatureEmpty=!1)}},i.prototype.isEmpty=function(){return this.isSignatureEmpty},i.prototype.canUndo=function(){return this.incStep>0},i.prototype.canRedo=function(){return this.incStep<this.snapColl.length-1},i.prototype.draw=function(e,i,s,n,a){var r={actionName:"draw-text"};this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height),i=i||"Arial",s=s||30,this.canvasContext.font=s+"px "+i;var l=this.element.width/2,o=this.element.height/2;t.isNullOrUndefined(n)&&t.isNullOrUndefined(a)?(this.canvasContext.textAlign="center",this.canvasContext.textBaseline="middle"):(l=t.isNullOrUndefined(n)?l:n,o=t.isNullOrUndefined(a)?o+s/2:a+s/2),this.canvasContext.fillText(e,l,o),this.updateSnapCollection(),this.isSignatureEmpty=!1,this.trigger("change",r)},i.prototype.load=function(e,t,i){i=i||this.element.height,t=t||this.element.width,this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height);var s=this,n=new Image;n.src=e,"data"!==e.slice(0,4)&&(n.crossOrigin="anonymous"),n.onload=function(){Promise.all([createImageBitmap(n,0,0,t,i)]).then(function(n){var a=document.createElement("canvas");a.width=t,a.height=i,a.getContext("2d").drawImage(n[0],0,0),"data"!==e.slice(0,4)&&(s.canvasContext.globalCompositeOperation="source-over"),s.canvasContext.drawImage(a,0,0,t,i,0,0,s.element.width,s.element.height),s.updateSnapCollection()})},this.isSignatureEmpty=this.canRedraw=!1},i.prototype.saveBackground=function(e){var t;if(t=e&&this.backgroundImage?this.snapColl[this.incStep-1]:this.snapColl[this.incStep],e||(this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height),this.backgroundImage?this.setBackgroundImage(this.backgroundImage):this.backgroundColor&&(this.setBackgroundColor(this.backgroundColor),e=!0)),e){var i=this,s=new Image;s.crossOrigin="anonymous",s.src=t,s.onload=function(){i.backgroundLoaded=!0,i.canvasContext.globalCompositeOperation="source-over",i.canvasContext.drawImage(s,0,0,i.element.width,i.element.height),i.save(i.fileType,i.fileName)}}},i.prototype.save=function(e,t){if(this.saveWithBackground&&null==this.backgroundLoaded&&(this.backgroundImage||this.backgroundColor))this.backgroundLoaded=!1,this.fileType=e,this.fileName=t,this.saveBackground(!1);else if("Svg"===e)t=t||"Signature",this.toSVG(t);else if("Jpeg"===e)if(t=t||"Signature",!this.saveWithBackground||this.saveWithBackground&&!this.backgroundImage&&!this.backgroundColor)this.toJPEG(t);else{i=this.canvasContext.canvas.toDataURL("image/jpeg");this.download(this.getBlob(i),t+".jpeg")}else{t=t||"Signature";var i=this.canvasContext.canvas.toDataURL("image/png");this.download(this.getBlob(i),t+".png")}this.saveWithBackground&&this.backgroundLoaded&&this.resetSnap()},i.prototype.resetSnap=function(){this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height);var e=this,t=new Image;t.src=this.snapColl[this.incStep-1],t.onload=function(){e.canvasContext.drawImage(t,0,0,e.element.width,e.element.height),e.updateSnapCollection()},this.backgroundLoaded=null,this.snapColl.pop(),this.incStep--,this.snapColl.pop(),this.incStep--},i.prototype.toJPEG=function(e){var t=this,i=this.snapColl[this.incStep];this.setBackgroundColor("#ffffff");var s=this,n=new Image;n.crossOrigin="anonymous",n.src=i,n.onload=function(){s.canvasContext.globalCompositeOperation="source-over",s.canvasContext.drawImage(n,0,0,s.element.width,s.element.height);var i=s.canvasContext.canvas.toDataURL("image/jpeg");s.download(s.getBlob(i),e+".jpeg"),s.canvasContext.clearRect(0,0,s.canvasContext.canvas.width,s.canvasContext.canvas.height),t.resizeHandler()},this.snapColl.pop(),this.incStep--},i.prototype.toSVG=function(e,t){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("width",this.canvasContext.canvas.width.toString()),i.setAttribute("height",this.canvasContext.canvas.height.toString());var s=document.createElementNS("http://www.w3.org/2000/svg","image");s.setAttributeNS(null,"height",this.canvasContext.canvas.height.toString()),s.setAttributeNS(null,"width",this.canvasContext.canvas.width.toString()),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t),i.appendChild(s);var n='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+this.canvasContext.canvas.width+'" height="'+this.canvasContext.canvas.height+'">'+i.innerHTML+"</svg>",a="data:image/svg+xml;base64,"+btoa(n);return null==e?a:(this.download(this.getBlob(a),e+".svg"),null)},i.prototype.saveAsBlob=function(){return this.getBlob(this.canvasContext.canvas.toDataURL("image/png"))},i.prototype.getSignature=function(e){return this.saveWithBackground&&this.backgroundColor&&!this.backgroundImage?(this.tempContext.fillStyle=this.backgroundColor,this.tempContext.fillRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height)):this.backgroundColor||this.backgroundImage||"Jpeg"!==e||(this.tempContext.fillStyle="#fff",this.tempContext.fillRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height)),this.tempContext.drawImage(this.element,0,0),"Jpeg"===e?this.tempCanvas.toDataURL("image/jpeg"):"Svg"===e?this.toSVG(null,this.tempCanvas.toDataURL("image/png")):this.tempCanvas.toDataURL("image/png")},i.prototype.getModuleName=function(){return"signature"},i.prototype.getPersistData=function(){return this.signatureValue=this.snapColl[this.incStep],this.addOnPersist(["signatureValue"])},i.prototype.destroy=function(){"image-editor"!==this.getModuleName()&&(this.unwireEvents(null),t.removeClass([this.element],"e-"+this.getModuleName()),this.element.removeAttribute("tabindex"),this.pointColl=null,this.tempContext=null,this.tempCanvas=null,this.canvasContext=null),e.prototype.destroy.call(this),this.element=null},i.prototype.propertyChanged=function(e,t){var i=this.canvasContext;switch(e){case"backgroundColor":i.canvas.style.backgroundColor=t,this.backgroundColor=t;break;case"backgroundImage":i.canvas.style.backgroundImage="url("+t+")",this.backgroundImage=t,this.saveWithBackground&&this.setBackgroundImage(this.backgroundImage,"temp");break;case"strokeColor":i.fillStyle=t,this.strokeColor=t;break;case"saveWithBackground":this.saveWithBackground=t;break;case"maxStrokeWidth":this.maxStrokeWidth=t;break;case"minStrokeWidth":this.minStrokeWidth=t;break;case"velocity":this.velocity=t;break;case"isReadOnly":this.isRead(t);break;case"disabled":this.enableOrDisable(t)}},i}(t.Component),wt=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)}}(),Lt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},At=function(e){function i(t,i){return e.call(this,t,i)||this}return wt(i,e),i.prototype.preRender=function(){},i.prototype.render=function(){this.initialize()},i.prototype.initialize=function(){this.element.setAttribute("role","img"),this.element.setAttribute("aria-label","signature"),t.addClass([this.element],"e-"+this.getModuleName()),e.prototype.initialize.call(this,this.element),this.enablePersistence&&this.loadPersistedSignature()},i.prototype.getModuleName=function(){return e.prototype.getModuleName.call(this)},i.prototype.getPersistData=function(){return e.prototype.getPersistData.call(this)},i.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];switch(a){case"backgroundColor":e.prototype.propertyChanged.call(this,a,t.backgroundColor);break;case"backgroundImage":e.prototype.propertyChanged.call(this,a,t.backgroundImage);break;case"strokeColor":t.strokeColor!==i.strokeColor&&e.prototype.propertyChanged.call(this,a,t.strokeColor);break;case"maxStrokeWidth":t.maxStrokeWidth!==i.maxStrokeWidth&&e.prototype.propertyChanged.call(this,a,t.maxStrokeWidth);break;case"minStrokeWidth":t.minStrokeWidth!==i.minStrokeWidth&&e.prototype.propertyChanged.call(this,a,t.minStrokeWidth);break;case"velocity":t.velocity!==i.velocity&&e.prototype.propertyChanged.call(this,a,t.velocity);break;case"saveWithBackground":e.prototype.propertyChanged.call(this,a,t.saveWithBackground);break;case"isReadOnly":e.prototype.propertyChanged.call(this,a,t.isReadOnly);break;case"disabled":e.prototype.propertyChanged.call(this,a,t.disabled)}}},Lt([t.Property("")],i.prototype,"backgroundColor",void 0),Lt([t.Property("")],i.prototype,"backgroundImage",void 0),Lt([t.Property(!1)],i.prototype,"disabled",void 0),Lt([t.Property(!1)],i.prototype,"isReadOnly",void 0),Lt([t.Property(!0)],i.prototype,"saveWithBackground",void 0),Lt([t.Property("#000000")],i.prototype,"strokeColor",void 0),Lt([t.Property(.5)],i.prototype,"minStrokeWidth",void 0),Lt([t.Property(2)],i.prototype,"maxStrokeWidth",void 0),Lt([t.Property(.7)],i.prototype,"velocity",void 0),Lt([t.Property("en-US")],i.prototype,"locale",void 0),Lt([t.Property(!1)],i.prototype,"enableRtl",void 0),Lt([t.Property(!1)],i.prototype,"enablePersistence",void 0),Lt([t.Event()],i.prototype,"beforeSave",void 0),Lt([t.Event()],i.prototype,"change",void 0),Lt([t.Event()],i.prototype,"created",void 0),i=Lt([t.NotifyPropertyChanges],i)}(kt),Ht=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Nt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Bt="e-rating-icon e-icons e-star-filled",Rt="e-rating-selected";!function(e){e.Top="Top",e.Bottom="Bottom",e.Left="Left",e.Right="Right"}(e.LabelPosition||(e.LabelPosition={})),function(e){e.Full="Full",e.Half="Half",e.Quarter="Quarter",e.Exact="Exact"}(e.PrecisionType||(e.PrecisionType={}));var Ut=function(s){function n(e,t){var i=s.call(this,e,t)||this;return i.itemElements=[],i}return Ht(n,s),n.prototype.preRender=function(){this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.keyConfigs={downarrow:"downarrow",leftarrow:"leftarrow",rightarrow:"rightarrow",uparrow:"uparrow",space:"space"},this.tooltipOpen=!1,this.isTouchSelected=!1,t.closest(this.element,"form")&&this.element.getAttribute("value")&&this.setProperties({value:this.element.getAttribute("value")},!0)},n.prototype.render=function(){this.initialize(),this.updateMinValue(),this.updateTemplateFunction(),this.triggerChange(null,this.value,!1,!0),this.renderItems(),this.displayLabel()},n.prototype.initialize=function(){this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-container "}),this.element.parentNode.insertBefore(this.wrapper,this.element),this.wrapper.appendChild(this.element),null==this.element.getAttribute("name")&&this.element.setAttribute("name",this.element.id),t.attributes(this.element,{"aria-label":"rating"}),this.renderItemList(),this.updateReset(),this.readOnly&&this.wrapper.classList.add("e-rating-readonly"),this.visible||this.wrapper.classList.add("e-rating-hidden"),this.enableRtl&&this.wrapper.classList.add("e-rtl"),this.enableAnimation&&this.wrapper.classList.add("e-rating-animation"),this.cssClass&&t.addClass([this.wrapper],this.cssClass.split(" ")),this.updateTooltip(),this.wireKeyboardEvent(),this.updateDisabled()},n.prototype.updateDisabled=function(){this.wrapper.classList[this.disabled?"add":"remove"]("e-disabled"),t.attributes(this.ratingItemList,{tabindex:this.disabled?"-1":"0"}),this.updateResetButton()},n.prototype.updateResetButton=function(){if(this.allowReset){this.resetElement&&this.resetElement.blur();var e=this.value<=this.min||this.disabled;this.resetElement.classList[e?"add":"remove"]("e-disabled"),t.attributes(this.resetElement,{tabindex:e?"-1":"0","aria-hidden":e.toString()})}},n.prototype.renderItemList=function(){var e=this;this.ratingItemList=this.createElement("div",{className:"e-rating-item-list",id:this.element.id+"_item-list"}),t.attributes(this.ratingItemList,{"aria-label":"rating",role:"slider"}),this.wrapper.appendChild(this.ratingItemList),t.EventHandler.add(this.ratingItemList,"touchmove",function(t){return e.touchMoveHandler(t)},this),t.EventHandler.add(this.ratingItemList,t.Browser.touchEndEvent,this.touchEndHandler,this)},n.prototype.touchMoveHandler=function(e){this.isTouchSelected||(this.wrapper.classList.add("e-rating-touch"),this.isTouchSelected=!0),this.wrapper.classList.add("e-touch-select");var t=this.ratingItemList.getBoundingClientRect(),i=(e.touches[0].clientX-t.x)/t.width*this.itemsCount;i=(i=this.enableRtl?this.itemsCount-i:i)<this.min?this.min:i>this.itemsCount?this.itemsCount:i;var s=0===(i=this.validateValue(i))?null:this.itemElements[parseInt((Math.ceil(i)-1).toString(),10)];if(i===this.currentValue)return void(this.showTooltip&&s&&this.openRatingTooltip(s,!1));var n=this.currentValue;this.triggerChange(e,i),this.updateCurrentValue(i),this.showTooltip&&(s?(Math.ceil(i)!==Math.ceil(n)&&this.closeRatingTooltip(),this.openRatingTooltip(s,!0)):this.closeRatingTooltip())},n.prototype.touchEndHandler=function(){this.closeRatingTooltip(),this.wrapper.classList.remove("e-touch-select")},n.prototype.updateTemplateFunction=function(){this.emptyTemplateFunction=this.emptyTemplate?this.getTemplateString(this.emptyTemplate):null,this.fullTemplateFunction=this.fullTemplate?this.getTemplateString(this.fullTemplate):null},n.prototype.renderItems=function(){for(var e=this,i=0;i<this.itemsCount;i++){var s=this.createElement("span",{className:"e-rating-item-container"}),n=this.createElement("span",{className:"e-rating-item"}),a=this.getRatingValue(this.value,i);this.renderItemContent(n,a,i,!1),s.appendChild(n),this.wireItemsEvents(s,i+1),this.itemElements.push(s);var r={element:s,value:i+1};this.trigger("beforeItemRender",r,function(t){e.ratingItemList.appendChild(t.element)})}t.attributes(this.ratingItemList,{"aria-valuemax":this.itemsCount.toString()}),this.updateItemValue(!1)},n.prototype.renderItemContent=function(e,i,s,n){n&&this.removeItemContent(e),this.fullTemplate&&1===i?(e.classList.add("e-rating-full"),t.append(this.fullTemplateFunction({index:s,ratingValue:i},this,"ratingFullTemplate",this.element.id+"fullTemplate",this.isStringTemplate),e)):this.emptyTemplate?(e.classList.add("e-rating-empty"),t.append(this.emptyTemplateFunction({index:s,ratingValue:i},this,"ratingEmptyTemplate",this.element.id+"emptyTemplate",this.isStringTemplate),e)):t.addClass([e],Bt.split(" "))},n.prototype.removeItemContent=function(e){e.classList.remove("e-rating-full","e-rating-empty"),t.removeClass([e],Bt.split(" ")),e.firstChild&&(e.innerHTML="")},n.prototype.updateTooltip=function(){this.showTooltip?(this.tooltipObj=new i.Tooltip({target:".e-rating-item-container",windowCollision:!0,opensOn:"Custom",cssClass:this.cssClass?"e-rating-tooltip "+this.cssClass:"e-rating-tooltip"}),this.tooltipObj.appendTo(this.ratingItemList)):t.isNullOrUndefined(this.tooltipObj)||(this.tooltipObj.destroy(),this.tooltipObj=null)},n.prototype.updateMinValue=function(){this.setProperties({min:this.validateValue(this.min)},!0),this.min>0&&this.value<this.min&&this.triggerChange(null,this.min,!1),t.attributes(this.ratingItemList,{"aria-valuemin":this.min.toString()})},n.prototype.validateValue=function(t){return t=t>this.itemsCount?this.itemsCount:t<0?0:this.precision===e.PrecisionType.Full||this.enableSingleSelection?Math.round(t):this.precision===e.PrecisionType.Half?Math.round(2*t)/2:this.precision===e.PrecisionType.Quarter?Math.round(4*t)/4:Math.round(10*t)/10},n.prototype.getRatingValue=function(e,t){return this.enableSingleSelection?e>t&&e<=t+1?1:0:e>=t+1?1:e<t?0:e-t},n.prototype.updateItemValue=function(i){void 0===i&&(i=!0);for(var s=0;s<this.itemsCount;s++){var n=this.itemElements[parseInt(s.toString(),10)];n.classList.remove(Rt,"e-rating-intermediate","e-selected-value");var a=this.getRatingValue(this.currentValue,s);1===a?n.classList.add(Rt):a>0?n.classList.add("e-rating-intermediate"):this.precision===e.PrecisionType.Full&&s+1<=this.value&&!this.enableSingleSelection&&n.classList.add("e-selected-value"),i&&this.updateItemContent(a,s),n.style.setProperty("--rating-value",100*a+"%"),n.classList[0===this.value&&0===s||this.value===s+1||a>0&&a<1?"add":"remove"]("e-rating-focus")}i&&this.renderReactTemplates(),this.updateResetButton(),t.attributes(this.ratingItemList,{"aria-valuenow":this.currentValue.toString()}),t.attributes(this.element,{value:this.value.toString()})},n.prototype.updateItemContent=function(e,i){if(this.fullTemplate||this.emptyTemplate){var s=this.itemElements[parseInt(i.toString(),10)].querySelector(".e-rating-item");if(this.fullTemplate&&1===e){if(s.classList.contains("e-rating-full"))return;this.removeItemContent(s),s.classList.add("e-rating-full"),t.append(this.fullTemplateFunction({ratingValue:e,index:i},this,"ratingFullTemplate",this.element.id+"fullTemplate"+i,this.isStringTemplate),s)}else if(this.emptyTemplate){if(s.classList.contains("e-rating-empty"))return;this.removeItemContent(s),s.classList.add("e-rating-empty"),t.append(this.emptyTemplateFunction({ratingValue:e,index:i},this,"ratingEmptyTemplate",this.element.id+"emptyTemplate"+i,this.isStringTemplate),s)}else this.removeItemContent(s),t.addClass([s],Bt.split(" "))}},n.prototype.updateTooltipContent=function(e){var i=this;if(this.showTooltip){this.isReact&&this.clearTemplate(["ratingTooltipTemplate"]);var s;if(this.tooltipTemplate){s=this.createElement("span",{className:"e-rating-tooltip-content"});var n=this.getTemplateString(this.tooltipTemplate);t.append(n({value:this.currentValue},this,"ratingTooltipTemplate",this.element.id+"tooltipTemplate",this.isStringTemplate),s),this.tooltipObj.setProperties({content:s},e),this.isAngular&&setTimeout(function(){var e=i.ratingItemList.querySelectorAll(".e-rating-item-container."+Rt);i.tooltipObj.refresh(e[e.length-1])})}else s=this.currentValue.toString(),this.tooltipObj.setProperties({content:t.initializeCSPTemplate(function(){return s})},e);this.renderReactTemplates()}},n.prototype.getTemplateString=function(e){var i="";try{if("function"!=typeof e){var s=t.select(e);i=s?"SCRIPT"===s.tagName?s.innerHTML:s.outerHTML:e}else i=e}catch(t){i=e}return t.compile(i)},n.prototype.displayLabel=function(){this.showLabel?(this.spanLabel=this.createElement("span",{className:"e-rating-label"}),this.updateLabel(),this.updateLabelPosition()):this.wrapper.contains(this.spanLabel)&&(t.remove(this.spanLabel),this.spanLabel=null)},n.prototype.updateLabel=function(){if(this.showLabel)if(this.labelTemplate){this.isReact&&this.clearTemplate(["ratingLabelTemplate"]),this.spanLabel.firstChild&&(this.spanLabel.innerHTML="");var e=this.getTemplateString(this.labelTemplate);t.append(e({value:this.currentValue},this,"ratingLabelTemplate",this.element.id+"labelTemplate",this.isStringTemplate),this.spanLabel),this.renderReactTemplates()}else this.spanLabel.textContent=this.currentValue+" / "+this.itemsCount},n.prototype.updateReset=function(){this.allowReset?(this.resetElement=this.createElement("span",{className:"e-icons e-reset",attrs:{"aria-label":"resetbutton",role:"button"}}),this.updateResetButton(),t.EventHandler.add(this.resetElement,"click",this.resetClicked,this),this.wrapper.insertBefore(this.resetElement,this.ratingItemList)):this.wrapper.contains(this.resetElement)&&(t.remove(this.resetElement),this.resetElement=null)},n.prototype.updateLabelPosition=function(){this.clearLabelPosition(),this.spanLabel.classList.add("e-label-"+this.labelPosition.toLowerCase()),"Left"===this.labelPosition||"Top"===this.labelPosition?this.wrapper.firstChild.after(this.spanLabel):this.wrapper.appendChild(this.spanLabel)},n.prototype.clearLabelPosition=function(){var e=this.spanLabel.classList.value.match(/(e-label-[top|bottom|right|left]+)/g);e&&t.removeClass([this.spanLabel],e)},n.prototype.wireItemsEvents=function(e,i){var s=this;t.EventHandler.add(e,"click",function(e){return s.clickHandler(e)},this),t.EventHandler.add(e,"mousemove",function(e){return s.mouseMoveHandler(i,e)},this),t.EventHandler.add(e,"mouseleave",this.mouseLeaveHandler,this)},n.prototype.clickHandler=function(e){this.currentValue=this.min>0&&this.currentValue<this.min?this.min:this.currentValue,this.triggerChange(e,this.currentValue),this.updateItemValue(),this.updateLabel(),this.updateResetButton()},n.prototype.updateValueChange=function(e,t,i){void 0===i&&(i=!0),this.triggerChange(e,t,i),this.updateItemValue(),this.updateLabel()},n.prototype.triggerChange=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=this;if(t=this.validateValue(t),this.currentValue=t,this.currentValue!==this.value){var a={event:e,isInteracted:i,value:t,previousValue:this.value};this.setProperties({value:t},!0),this.isAngular&&!s&&n.localChange({value:t}),s||this.trigger("valueChanged",a)}},n.prototype.mouseMoveHandler=function(e,t){this.isTouchSelected&&(this.wrapper.classList.remove("e-rating-touch"),this.isTouchSelected=!1);var i=this.calculateCurrentValue(e,t);i=this.validateValue(i);var s=this.itemElements[parseInt((e-1).toString(),10)];if(i===this.currentValue)return void this.openRatingTooltip(s,!1);this.updateCurrentValue(i),this.openRatingTooltip(s,!0);var n={element:s,event:t,value:i};this.trigger("onItemHover",n)},n.prototype.openRatingTooltip=function(e,t){this.showTooltip&&(this.tooltipOpen?t&&(this.updateTooltipContent(!0),this.tooltipObj.refresh(e)):(this.updateTooltipContent(!1),this.tooltipObj.open(e),this.tooltipOpen=!0))},n.prototype.closeRatingTooltip=function(){this.tooltipOpen&&(this.tooltipObj.close(),this.tooltipOpen=!1)},n.prototype.updateCurrentValue=function(e){this.currentValue=e,this.updateItemValue(),this.updateLabel()},n.prototype.mouseLeaveHandler=function(){this.closeRatingTooltip(),this.updateCurrentValue(this.value)},n.prototype.calculateCurrentValue=function(t,i){var s=t;return this.enableSingleSelection||this.precision===e.PrecisionType.Full||(s=i.offsetX/this.itemElements[t-1].clientWidth,s=this.enableRtl?1-s:s,this.precision===e.PrecisionType.Quarter?s=s<=.25?.25:s<=.5?.5:s<.75?.75:1:this.precision===e.PrecisionType.Half&&(s=s<=.5?.5:1),s=s+t-1),s},n.prototype.reset=function(){this.resetClicked(null,!1)},n.prototype.resetClicked=function(e,t){void 0===t&&(t=!0),this.updateValueChange(e,this.min,t),this.updateResetButton()},n.prototype.wireKeyboardEvent=function(){this.keyboardModuleRating=new t.KeyboardEvents(this.wrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},n.prototype.keyActionHandler=function(e){if(e.preventDefault(),!this.disabled&&!this.readOnly){if(e.target.classList.contains("e-rating-item-list"))switch(e.action){case"uparrow":this.handleNavigation(e,!0);break;case"downarrow":this.handleNavigation(e,!1);break;case"leftarrow":this.handleNavigation(e,this.enableRtl);break;case"rightarrow":this.handleNavigation(e,!this.enableRtl)}if(this.allowReset&&e.target.classList.contains("e-reset"))switch(e.action){case"space":this.resetClicked(e)}}},n.prototype.handleNavigation=function(t,i){if(!i&&this.value>this.min||i&&this.value<this.itemsCount){var s=this.precision===e.PrecisionType.Full||this.enableSingleSelection?1:this.precision===e.PrecisionType.Half?.5:this.precision===e.PrecisionType.Quarter?.25:Math.round(1)/10;s=i?this.value+s:this.value-s,this.updateValueChange(t,s),this.updateResetButton()}},n.prototype.updateContent=function(){for(var e=0;e<this.itemsCount;e++){var t=this.itemElements[parseInt(e.toString(),10)].firstElementChild;this.renderItemContent(t,this.getRatingValue(this.value,e),e,!0)}},n.prototype.getModuleName=function(){return"rating"},n.prototype.getPersistData=function(){return this.addOnPersist([])},n.prototype.removeItemElements=function(){for(var e=0;e<this.itemElements.length;e++)t.remove(this.itemElements[parseInt(e.toString(),10)]);this.itemElements=[]},n.prototype.destroy=function(){var e=this;s.prototype.destroy.call(this),this.removeItemElements(),this.clearTemplate(),this.spanLabel&&(t.remove(this.spanLabel),this.spanLabel=null),this.resetElement&&(t.remove(this.resetElement),this.resetElement=null),this.showTooltip&&(this.tooltipObj.destroy(),this.tooltipObj=null),t.remove(this.ratingItemList),this.ratingItemList=null,this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper),this.wrapper=null,this.keyboardModuleRating.destroy(),this.keyboardModuleRating=null,["value","aria-label","name"].forEach(function(t){e.element.removeAttribute(t)})},n.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"value":this.updateValueChange(null,this.value>this.min?this.value:this.min,!1);break;case"min":this.updateMinValue(),this.updateItemValue(),this.updateLabel();break;case"showLabel":this.displayLabel();break;case"visible":this.wrapper.classList[this.visible?"remove":"add"]("e-rating-hidden");break;case"disabled":this.updateDisabled();break;case"readOnly":this.wrapper.classList[this.readOnly?"add":"remove"]("e-rating-readonly");break;case"allowReset":this.updateReset();break;case"enableRtl":this.wrapper.classList[this.enableRtl?"add":"remove"]("e-rtl");break;case"cssClass":i.cssClass&&t.removeClass([this.wrapper],i.cssClass.split(" ")),e.cssClass&&t.addClass([this.wrapper],e.cssClass.split(" ")),this.tooltipObj&&this.tooltipObj.setProperties({cssClass:this.cssClass?"e-rating-tooltip "+this.cssClass:"e-rating-tooltip"});break;case"labelPosition":this.updateLabelPosition();break;case"showTooltip":this.updateTooltip();break;case"precision":this.updateMinValue(),this.triggerChange(null,this.value,!1),this.updateItemValue(),this.updateLabel();break;case"enableSingleSelection":this.updateValueChange(null,this.currentValue,!1);break;case"enableAnimation":this.wrapper.classList[this.enableAnimation?"add":"remove"]("e-rating-animation");break;case"emptyTemplate":case"fullTemplate":this.updateTemplateFunction(),this.updateContent();break;case"labelTemplate":this.updateLabel();break;case"itemsCount":this.removeItemElements(),this.renderItems(),this.updateLabel()}},Nt([t.Property(!1)],n.prototype,"allowReset",void 0),Nt([t.Property("")],n.prototype,"cssClass",void 0),Nt([t.Property(!1)],n.prototype,"disabled",void 0),Nt([t.Property("")],n.prototype,"emptyTemplate",void 0),Nt([t.Property(!0)],n.prototype,"enableAnimation",void 0),Nt([t.Property(!1)],n.prototype,"enableSingleSelection",void 0),Nt([t.Property("")],n.prototype,"fullTemplate",void 0),Nt([t.Property(5)],n.prototype,"itemsCount",void 0),Nt([t.Property(e.LabelPosition.Right)],n.prototype,"labelPosition",void 0),Nt([t.Property("")],n.prototype,"labelTemplate",void 0),Nt([t.Property(0)],n.prototype,"min",void 0),Nt([t.Property(e.PrecisionType.Full)],n.prototype,"precision",void 0),Nt([t.Property(!1)],n.prototype,"readOnly",void 0),Nt([t.Property(!1)],n.prototype,"showLabel",void 0),Nt([t.Property(!0)],n.prototype,"showTooltip",void 0),Nt([t.Property("")],n.prototype,"tooltipTemplate",void 0),Nt([t.Property(0)],n.prototype,"value",void 0),Nt([t.Property(!0)],n.prototype,"visible",void 0),Nt([t.Event()],n.prototype,"beforeItemRender",void 0),Nt([t.Event()],n.prototype,"created",void 0),Nt([t.Event()],n.prototype,"onItemHover",void 0),Nt([t.Event()],n.prototype,"valueChanged",void 0),n=Nt([t.NotifyPropertyChanges],n)}(t.Component),It=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Ft=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.Number="number",e.Text="text",e.Password="password"}(e.OtpInputType||(e.OtpInputType={})),function(e){e.Outlined="outlined",e.Underlined="underlined",e.Filled="filled"}(e.OtpInputStyle||(e.OtpInputStyle={})),function(e){e.None="none",e.Uppercase="uppercase",e.Lowercase="lowercase"}(e.TextTransform||(e.TextTransform={}));var Vt=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.inputs=[],s.previousValue="",s.separatorElements=[],s.shouldFireFocus=!0,s.shouldFireBlur=!0,s.isFocusInCalled=!1,s.isFocusOutCalled=!1,s.handleWheelEvent=function(e){e.preventDefault()},s}return It(s,i),s.prototype.preRender=function(){this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){t.attributes(this.element,{role:"group"}),this.renderInputs(),this.renderSeparator(1,this.inputs.length),this.addPlaceHolder(),this.updateCssClass(this.cssClass),this.updateVariantClass(),this.updateAriaLabel(this.ariaLabels),this.setElementAttributes(this.htmlAttributes,this.element),this.enableRtl&&this.element.classList.add("e-rtl"),this.previousValue=this.value.toString(),this.autoFocus&&this.focusIn()},s.prototype.renderInputs=function(){this.hiddenInputEle=this.createElement("input",{id:"otpInput_hidden",attrs:{name:this.element.id,type:"hidden",value:"number"===this.type?this.value.toString().replace(/\D/g,""):this.value.toString(),autoComplete:"off"}}),this.element.appendChild(this.hiddenInputEle);for(var e=0;e<this.length;e++)this.createOtpInput(e)},s.prototype.createOtpInput=function(e){var t=this.getDefaultValue(),i="";if(t){var s=t[parseInt(e.toString(),10)];"number"===this.type?isNaN(Number(s))||(i=s):i=s||""}var n=this.createElement("input",{id:this.element.id+"-"+(e+1),className:"e-otp-input-field e-input",attrs:{maxlength:"1",type:this.type,inputmode:this.htmlAttributes.inputmode||("number"===this.type?"numeric":"text")}});this.disabled&&n.setAttribute("disabled","disabled"),this.element.appendChild(n),this.inputs.push(n),i&&(n.value=i),this.wireEvents(n,e)},s.prototype.renderSeparator=function(e,t){if(this.separator.length>0)for(var i=e;i<t;i++){var s=this.createElement("span",{className:"e-otp-separator"});s.textContent=this.separator,this.separatorElements.push(s),this.element.insertBefore(s,this.inputs[parseInt(i.toString(),10)])}},s.prototype.updateSeparatorValue=function(){var e=this;""===this.separator?(this.separatorElements.forEach(function(e){return t.remove(e)}),this.separatorElements=[]):this.separatorElements.forEach(function(t){t.textContent=e.separator})},s.prototype.addPlaceHolder=function(){for(var e=0;e<this.inputs.length;e++){var t=this.placeholder.length<=1?this.placeholder:this.placeholder.charAt(e);this.setElementAttributes({placeholder:t},this.inputs[parseInt(e.toString(),10)])}},s.prototype.updateInputType=function(e){var t=this.htmlAttributes.inputmode||("number"===e?"numeric":"text");this.inputs.forEach(function(i){i.type=e,i.setAttribute("inputmode",t)})},s.prototype.getDefaultValue=function(){var e="number"==typeof this.value?this.value.toString():this.value;this.textTransform&&(e=this.getTransformedText(e));var t=e.replace(/\s/g,"");return t.length>0?t.split(""):void 0},s.prototype.getTransformedText=function(t){return this.textTransform.toLowerCase()===e.TextTransform.Lowercase?t.toLowerCase():this.textTransform.toLowerCase()===e.TextTransform.Uppercase?t.toUpperCase():t},s.prototype.handleInputChange=function(e,t){var i=this.inputs[parseInt(e.toString(),10)];if(i&&e<this.length-1&&i.value.length>0){var s=this.inputs[parseInt(e.toString(),10)+1];this.shouldFireFocus=this.shouldFireBlur=!1,s.focus(),s&&s.value.length>0&&s.select()}var n=t.target;n.value.length>1&&(n.value=n.value.slice(0,1)),this.textTransform&&(n.value=this.getTransformedText(n.value)),this.triggerInputEvent(e,t),this.triggerValuechanged(t,!0)},s.prototype.handleKeyAction=function(e,t){t.key.length>1&&!(0===e&&"Backspace"===t.key||e===this.length-1&&"Delete"===t.key)&&(this.shouldFireFocus=this.shouldFireBlur=!1);var i=this.inputs[parseInt(e.toString(),10)],s=this.inputs[parseInt(e.toString(),10)-1],n=this.inputs[parseInt(e.toString(),10)+1];if("Delete"===t.key){var a="";i.value.length>0?(a=i.value,i.value=""):e!==this.inputs.length-1&&(a=n.value,n.value="",n.focus()),a.length>0&&this.triggerInputEvent(e,t)}else if("Backspace"===t.key){if(0!==e&&0===i.value.length){var r=s.value;s.value="",s.focus(),r.length>0&&this.triggerInputEvent(e,t)}}else"ArrowLeft"===t.key||"ArrowRight"===t.key?("ArrowLeft"===t.key&&e>0?(s.focus(),s.select()):"ArrowRight"===t.key&&e<this.inputs.length-1&&(n.focus(),n.select()),t.preventDefault()):"ArrowUp"===t.key||"ArrowDown"===t.key?t.preventDefault():"Tab"===t.key||t.shiftKey||t.ctrlKey||"number"===this.type&&/\D/.test(t.key.toLocaleLowerCase())&&t.preventDefault()},s.prototype.handleSelection=function(e){var t=this.inputs[parseInt(e.toString(),10)];t.value&&t.select()},s.prototype.handleFocus=function(e,i){if(t.addClass([this.inputs[parseInt(e.toString(),10)]],"e-otp-input-focus"),this.shouldFireFocus){var s={element:this.element,event:i,index:e,isInteracted:!this.isFocusInCalled,value:this.value};this.trigger("focus",s)}this.shouldFireFocus=!0},s.prototype.handleBlur=function(e,i){if(t.removeClass([this.inputs[parseInt(e.toString(),10)]],"e-otp-input-focus"),this.shouldFireBlur){var s={element:this.element,event:i,value:this.value,index:e,isInteracted:!this.isFocusOutCalled};this.trigger("blur",s)}this.shouldFireBlur=!0},s.prototype.handlePaste=function(e,t){var i=t.clipboardData;if(i){for(var s=i.getData("text").split(""),n=0,a=e;a<this.inputs.length;a++)s.length>0&&s[parseInt(n.toString(),10)]&&(this.inputs[parseInt(a.toString(),10)].value=s[parseInt(n.toString(),10)],n++,this.updateValueProperty());this.focusIn(),this.triggerValuechanged(t,!0)}},s.prototype.triggerInputEvent=function(e,t){var i=this.value.toString();this.updateValueProperty();var s={element:this.element,event:t,previousValue:i,value:this.value.toString(),index:e};this.trigger("input",s)},s.prototype.triggerValuechanged=function(e,t){if(this.length===this.value.toString().length&&this.previousValue!==this.value){var i={element:this.element,event:e,isInteracted:t||!1,previousValue:this.previousValue,value:this.value};this.trigger("valueChanged",i),this.previousValue=this.value.toString()}},s.prototype.wireEvents=function(e,i){t.EventHandler.add(e,"focus",this.handleFocus.bind(this,i),this),t.EventHandler.add(e,"blur",this.handleBlur.bind(this,i),this),t.EventHandler.add(e,"input",this.handleInputChange.bind(this,i),this),t.EventHandler.add(e,"keydown",this.handleKeyAction.bind(this,i),this),t.EventHandler.add(e,"click",this.handleSelection.bind(this,i),this),t.EventHandler.add(e,"paste",this.handlePaste.bind(this,i),this),t.EventHandler.add(e,"wheel",this.handleWheelEvent,this)},s.prototype.unWireEvents=function(){for(var e=0;e<this.inputs.length;e++){var i=this.inputs[parseInt(e.toString(),10)];t.EventHandler.remove(i,"focus",this.handleFocus.bind(this,e)),t.EventHandler.remove(i,"blur",this.handleBlur.bind(this,e)),t.EventHandler.remove(i,"input",this.handleInputChange.bind(this,e)),t.EventHandler.remove(i,"keydown",this.handleKeyAction.bind(this,e)),t.EventHandler.remove(i,"click",this.handleSelection.bind(this,e)),t.EventHandler.remove(i,"paste",this.handlePaste.bind(this,e)),t.EventHandler.remove(i,"wheel",this.handleWheelEvent)}},s.prototype.updateValueProperty=function(){var e="";this.inputs.forEach(function(t){e+=t.value});var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value="number"==typeof this.value?parseInt(e,10):e,this.isProtectedOnChange=t,this.hiddenInputEle.value=this.value.toString()},s.prototype.updateInputValue=function(e){var t=this.value.toString();this.textTransform&&(t=this.getTransformedText(t));for(var i=e.toString(),s=0;s<this.inputs.length;s++)i.charAt(s)!==t.charAt(s)&&(this.inputs[parseInt(s.toString(),10)].value=t.charAt(s),this.hiddenInputEle.value=t);this.focusIn()},s.prototype.updateCssClass=function(e,t){void 0===t&&(t="");var i,s,n;t&&(n=t.trim().split(" "),(i=this.element.classList).remove.apply(i,n)),e&&(n=e.trim().split(" "),(s=this.element.classList).add.apply(s,n))},s.prototype.updateVariantClass=function(){var e="outlined"===this.stylingMode.toLocaleLowerCase()?"outline":this.stylingMode.toLocaleLowerCase(),i=["underlined","filled","outline"];-1!==i.indexOf(e)&&(t.removeClass([this.element],i.map(function(e){return"e-"+e})),t.addClass([this.element],"e-"+e))},s.prototype.updateAriaLabel=function(e){this.inputs.forEach(function(t,i){var s="Enter Otp Character "+(i+1),n=e&&e.length>0?e[parseInt(i.toString(),10)]||s:s;t.setAttribute("aria-label",n)})},s.prototype.updateDisabledState=function(){var e=this;this.inputs.forEach(function(t){e.disabled?t.setAttribute("disabled","disabled"):t.removeAttribute("disabled")})},s.prototype.setElementAttributes=function(e,i){if(!t.isNullOrUndefined(e))for(var s in e)if("class"===s){var n=e.class.replace(/\s+/g," ").trim();n&&t.addClass([i],n.split(" "))}else"inputmode"===s?this.setInputMode(e[""+s]):"name"===s&&this.element.id===i.id?this.hiddenInputEle.setAttribute(s,e[""+s]):i.setAttribute(s,e[""+s])},s.prototype.setInputMode=function(e){for(var t=0;t<this.inputs.length;t++)this.inputs[parseInt(t.toString(),10)].setAttribute("inputmode",e)},s.prototype.handleLengthChange=function(e,i){if(e-i>0){for(n=i;n<e;n++)this.createOtpInput(n);this.renderSeparator(i,e),this.addPlaceHolder(),this.updateAriaLabel(this.ariaLabels)}else if(e>=0&&this.inputs.length>0){for(n=e;n<this.inputs.length;n++)t.remove(this.inputs[parseInt(n.toString(),10)]);if(this.inputs.splice(e),this.separatorElements.length>0){for(var s=0===e?0:e-1,n=s;n<this.separatorElements.length;n++)t.remove(this.separatorElements[parseInt(n.toString(),10)]);this.separatorElements.splice(s)}}},s.prototype.getModuleName=function(){return"otpinput"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.destroy=function(){i.prototype.destroy.call(this),this.unWireEvents(),this.inputs.forEach(function(e){t.remove(e)}),this.separatorElements.forEach(function(e){t.remove(e)}),t.remove(this.hiddenInputEle),t.removeClass([this.element],["e-underlined","e-filled","e-outline","e-rtl"]),this.cssClass&&t.removeClass([this.element],this.cssClass.trim().split(" ")),this.element.removeAttribute("role"),this.inputs=[],this.separatorElements=[],this.hiddenInputEle=null},s.prototype.focusIn=function(){this.isFocusInCalled=!0;for(var e=this.inputs.length-1,t=0;t<this.inputs.length;t++)if(!(this.inputs[parseInt(t.toString(),10)].value.length>0)){e=t;break}this.inputs[parseInt(e.toString(),10)].focus(),this.isFocusInCalled=!1},s.prototype.focusOut=function(){this.isFocusOutCalled=!0,this.inputs.forEach(function(e){e.blur()}),this.isFocusOutCalled=!1},s.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"textTransform":this.updateInputValue(this.value);break;case"value":this.updateInputValue(t.value),this.triggerValuechanged();break;case"placeholder":this.addPlaceHolder();break;case"disabled":this.updateDisabledState();break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"separator":""===t.separator?this.renderSeparator(1,this.inputs.length):this.updateSeparatorValue();break;case"htmlAttributes":this.setElementAttributes(e.htmlAttributes,this.element);break;case"type":this.updateInputType(e.type);break;case"stylingMode":this.updateVariantClass();break;case"ariaLabels":this.updateAriaLabel(e.ariaLabels);break;case"length":this.handleLengthChange(e.length,t.length);break;case"enableRtl":this.element.classList[this.enableRtl?"add":"remove"]("e-rtl");break;case"autoFocus":this.autoFocus&&this.focusIn()}},Ft([t.Property(4)],s.prototype,"length",void 0),Ft([t.Property("")],s.prototype,"value",void 0),Ft([t.Property(e.OtpInputType.Number)],s.prototype,"type",void 0),Ft([t.Property("")],s.prototype,"separator",void 0),Ft([t.Property("")],s.prototype,"placeholder",void 0),Ft([t.Property(e.OtpInputStyle.Outlined)],s.prototype,"stylingMode",void 0),Ft([t.Property(!1)],s.prototype,"disabled",void 0),Ft([t.Property("")],s.prototype,"cssClass",void 0),Ft([t.Property(!1)],s.prototype,"autoFocus",void 0),Ft([t.Property(e.TextTransform.None)],s.prototype,"textTransform",void 0),Ft([t.Property({})],s.prototype,"htmlAttributes",void 0),Ft([t.Property([])],s.prototype,"ariaLabels",void 0),Ft([t.Event()],s.prototype,"created",void 0),Ft([t.Event()],s.prototype,"valueChanged",void 0),Ft([t.Event()],s.prototype,"focus",void 0),Ft([t.Event()],s.prototype,"blur",void 0),Ft([t.Event()],s.prototype,"input",void 0),s=Ft([t.NotifyPropertyChanges],s)}(t.Component),Mt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Dt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Mt(i,e),Dt([t.Property("")],i.prototype,"content",void 0),Dt([t.Property("")],i.prototype,"stopContent",void 0),Dt([t.Property("")],i.prototype,"iconCss",void 0),Dt([t.Property("")],i.prototype,"stopIconCss",void 0),Dt([t.Property("Left")],i.prototype,"iconPosition",void 0),Dt([t.Property(!1)],i.prototype,"isPrimary",void 0),i}(t.ChildProperty),zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Mt(i,e),Dt([t.Property("Start listening")],i.prototype,"content",void 0),Dt([t.Property("Stop listening")],i.prototype,"stopContent",void 0),Dt([t.Property("TopCenter")],i.prototype,"position",void 0),i}(t.ChildProperty);!function(e){e.Inactive="Inactive",e.Listening="Listening",e.Stopped="Stopped"}(e.SpeechToTextState||(e.SpeechToTextState={}));var qt=function(s){function a(e,t){var i=s.call(this,e,t)||this;return i.fullTranscript="",i.isClicked=!1,i.isUserInteracted=!1,i.hasStarted=!1,i}return Mt(a,s),a.prototype.preRender=function(){this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},a.prototype.getDirective=function(){return"EJS-SPEECHTOTEXT"},a.prototype.getModuleName=function(){return"speech-to-text"},a.prototype.getPersistData=function(){return this.addOnPersist([])},a.prototype.render=function(){this.renderSpeechToText(),this.initializeSpeechRecognition(),t.isNullOrUndefined(this.listeningState)||this.handleStateChange(),this.wireEvents()},a.prototype.initializeLocale=function(){this.l10n=new t.L10n(this.getModuleName(),{abortedError:"Speech recognition was aborted.",audioCaptureError:"No microphone detected. Ensure your microphone is connected.",defaultError:"An unknown error occurred.",networkError:"Network error occurred. Check your internet connection.",noSpeechError:"No speech detected. Please speak into the microphone.",notAllowedError:"Microphone access denied. Allow microphone permissions.",serviceNotAllowedError:"Speech recognition service is not allowed in this context.",unsupportedBrowserError:"The browser does not support the SpeechRecognition API.",startAriaLabel:"Press to start speaking and transcribe your words",stopAriaLabel:"Press to stop speaking and end transcription",startTooltipText:"Start listening",stopTooltipText:"Stop listening"},this.locale)},a.prototype.renderSpeechToText=function(){this.initializeLocale();var e=t.isNullOrUndefined(this.buttonSettings.iconCss)||""===this.buttonSettings.iconCss?"e-icons e-listen-icon":this.buttonSettings.iconCss;this.buttonInst=new n.Button({iconCss:e,isPrimary:this.buttonSettings.isPrimary,cssClass:this.updateButtonCssClass(),disabled:this.disabled,content:this.buttonSettings.content,iconPosition:this.buttonSettings.iconPosition,enableRtl:this.enableRtl}),this.buttonInst.appendTo(this.element),this.updateTooltip(),this.updateCssClass(this.cssClass,""),this.updateAriaLabel(),t.isNullOrUndefined(this.htmlAttributes)||this.addHtmlAttributes(this.htmlAttributes)},a.prototype.updateAriaLabel=function(){var e;e=this.htmlAttributes&&this.htmlAttributes["aria-label"]?this.htmlAttributes["aria-label"]:this.micOn?this.l10n.getConstant("stopAriaLabel"):this.l10n.getConstant("startAriaLabel"),this.element.setAttribute("aria-label",e)},a.prototype.updateCssClass=function(e,i){i&&t.removeClass([this.element],i.trim().split(" ")),e&&t.addClass([this.element],e.trim().split(" "))},a.prototype.updateButtonCssClass=function(){var e;return""===(this.isClicked?this.buttonSettings.stopContent:this.buttonSettings.content)&&(e="e-round"),this.micOn&&(e+=" e-listening-state"),e},a.prototype.updateTooltip=function(){this.showTooltip?(this.tooltipSettings&&("Start listening"===this.tooltipSettings.content&&(this.tooltipSettings.content=this.l10n.getConstant("startTooltipText")),"Stop listening"===this.tooltipSettings.stopContent&&(this.tooltipSettings.stopContent=this.l10n.getConstant("stopTooltipText"))),this.tooltipInst=new i.Tooltip({content:this.hasStarted?this.tooltipSettings.stopContent:this.tooltipSettings.content,position:this.tooltipSettings.position,windowCollision:!0,cssClass:this.cssClass?"e-speech-to-text-tooltip "+this.cssClass:"e-speech-to-text-tooltip",opensOn:"Hover",enableRtl:this.enableRtl}),this.tooltipInst.appendTo(this.element)):t.isNullOrUndefined(this.tooltipInst)||(this.tooltipInst.destroy(),this.tooltipInst=null)},a.prototype.handleStateChange=function(){if(!this.disabled)if(this.listeningState===e.SpeechToTextState.Listening)this.micOn=!0,this.startSpeechRecognition();else if(this.listeningState===e.SpeechToTextState.Inactive||this.listeningState===e.SpeechToTextState.Stopped)if(this.micOn)this.micOn=!1,this.stopSpeechRecognition();else{var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.listeningState=e.SpeechToTextState.Inactive,this.isProtectedOnChange=t}},a.prototype.addHtmlAttributes=function(e){if(e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.element.setAttribute(t,e[t])},a.prototype.removeHtmlAttributes=function(e){if(e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.element.removeAttribute(t)},a.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.handleButtonClick,this)},a.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.handleButtonClick)},a.prototype.handleButtonClick=function(e){this.isUserInteracted=!0,this.micOn=!this.micOn,this.micOn?this.startSpeechRecognition(e):this.stopSpeechRecognition(e)},a.prototype.triggerUnSupportedError=function(){var e={error:"unsupported-browser",errorMessage:this.l10n.getConstant("unsupportedBrowserError")};this.trigger("onError",e)},a.prototype.initializeSpeechRecognition=function(){var t=this,i=window,s=i.SpeechRecognition||i.webkitSpeechRecognition;if(!s)return void this.triggerUnSupportedError();this.recognition=new s,this.recognition.continuous=!0,this.recognition.lang=this.lang,this.recognition.interimResults=this.allowInterimResults,this.recognition.onstart=function(i){var s=t.isProtectedOnChange;t.isProtectedOnChange=!0,t.transcript=t.fullTranscript="",t.isProtectedOnChange=s;var n={cancel:!1,listeningState:e.SpeechToTextState.Listening,event:i,isInteracted:t.isUserInteracted};t.trigger("onStart",n,function(){n.cancel?(t.recognition.abort(),t.micOn=!1):t.handleStartRecognition()})},this.recognition.onend=function(e){t.hasStarted&&(t.micOn=!1,t.handleStopRecognition(e))},this.recognition.onerror=function(e){var i="";switch(e.error){case"not-allowed":i=t.l10n.getConstant("notAllowedError");break;case"audio-capture":i=t.l10n.getConstant("audioCaptureError");break;case"network":i=t.l10n.getConstant("networkError");break;case"no-speech":i=t.l10n.getConstant("noSpeechError");break;case"aborted":i=t.l10n.getConstant("abortedError");break;case"service-not-allowed":i=t.l10n.getConstant("serviceNotAllowedError");break;default:i=t.l10n.getConstant("defaultError")}var s={event:e,error:e.error,errorMessage:i};t.trigger("onError",s),t.isUserInteracted=!1},this.recognition.onresult=function(e){var i=e.results[e.resultIndex],s="",n=t.isProtectedOnChange;t.isProtectedOnChange=!0,i.isFinal?(t.fullTranscript+=i[0].transcript,t.transcript=t.fullTranscript):(s+=i[0].transcript,t.transcript=t.fullTranscript+s);var a={event:e,transcript:t.transcript,isInterimResult:!i.isFinal};t.trigger("transcriptChanged",a,function(){if(a.transcript!==t.transcript){var e=t.isProtectedOnChange;t.isProtectedOnChange=!0,t.transcript=t.fullTranscript=a.transcript,t.isProtectedOnChange=e}}),t.isProtectedOnChange=n}},a.prototype.handleStartRecognition=function(){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.hasStarted=!0,this.listeningState=e.SpeechToTextState.Listening,t.isNullOrUndefined(this.tooltipInst)||(this.tooltipInst.content=this.tooltipSettings.stopContent),this.updateAriaLabel(),this.isClicked=!0,this.buttonInst.cssClass=this.updateButtonCssClass(),this.buttonInst.content=this.buttonSettings.stopContent;var s=t.isNullOrUndefined(this.buttonSettings.stopIconCss)||""===this.buttonSettings.stopIconCss?"e-icons e-listen-stop":this.buttonSettings.stopIconCss;this.buttonInst.iconCss=s,this.isProtectedOnChange=i},a.prototype.triggerUnSupportedStart=function(t){var i=this,s=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.transcript="",this.isProtectedOnChange=s;var n={cancel:!1,listeningState:e.SpeechToTextState.Listening,event:t,isInteracted:this.isUserInteracted};this.trigger("onStart",n,function(){n.cancel||i.handleStartRecognition()})},a.prototype.startSpeechRecognition=function(e){this.hasStarted||(this.recognition?this.recognition.start():this.triggerUnSupportedStart(e))},a.prototype.stopSpeechRecognition=function(e){this.recognition?this.recognition.stop():this.handleStopRecognition(e)},a.prototype.handleStopRecognition=function(i){if(this.hasStarted){var s=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.listeningState=e.SpeechToTextState.Stopped,t.isNullOrUndefined(this.tooltipInst)||(this.tooltipInst.content=this.tooltipSettings.content),this.updateAriaLabel(),this.isClicked=!1,this.buttonInst.cssClass=this.updateButtonCssClass(),this.buttonInst.content=this.buttonSettings.content;var n={listeningState:e.SpeechToTextState.Stopped,event:i,isInteracted:this.isUserInteracted};this.trigger("onStop",n),this.listeningState=e.SpeechToTextState.Inactive;var a=t.isNullOrUndefined(this.buttonSettings.iconCss)||""===this.buttonSettings.iconCss?"e-icons e-listen-icon":this.buttonSettings.iconCss;this.buttonInst.iconCss=a,this.hasStarted=!1,this.isProtectedOnChange=s}},a.prototype.buttonSettingsChanges=function(e,i){if(e.content===i.content&&e.stopContent===i.stopContent||(this.buttonInst.content=this.hasStarted?this.buttonSettings.stopContent:this.buttonSettings.content,this.buttonInst.cssClass=this.updateButtonCssClass()),e.iconCss!==i.iconCss||e.stopIconCss!==i.stopIconCss){var s=t.isNullOrUndefined(this.buttonSettings.iconCss)||""===this.buttonSettings.iconCss?"e-icons e-listen-icon":this.buttonSettings.iconCss,n=t.isNullOrUndefined(this.buttonSettings.stopIconCss)||""===this.buttonSettings.stopIconCss?"e-icons e-listen-stop":this.buttonSettings.stopIconCss;this.buttonInst.iconCss=this.hasStarted?n:s}e.iconPosition!==i.iconPosition&&(this.buttonInst.iconPosition=this.buttonSettings.iconPosition),e.isPrimary!==i.isPrimary&&(this.buttonInst.isPrimary=this.buttonSettings.isPrimary)},a.prototype.destroyAndNullify=function(e){e&&(e.destroy(),e=null)},a.prototype.destroy=function(){s.prototype.destroy.call(this),this.unWireEvents(),this.destroyAndNullify(this.buttonInst),this.destroyAndNullify(this.tooltipInst),this.recognition=null,this.micOn=null,this.htmlAttributes=this.tooltipSettings=this.buttonSettings=null,this.element.classList.remove("e-rtl")},a.prototype.startListening=function(){this.disabled||this.isClicked||(this.isUserInteracted=!1,this.micOn=!0,this.startSpeechRecognition())},a.prototype.stopListening=function(){!this.disabled&&this.isClicked&&(this.isUserInteracted=!1,this.micOn=!1,this.stopSpeechRecognition())},a.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"lang":this.recognition&&(this.recognition.lang=this.lang);break;case"allowInterimResults":this.recognition&&(this.recognition.interimResults=this.allowInterimResults);break;case"buttonSettings":this.buttonSettingsChanges(t.buttonSettings,e.buttonSettings);break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"disabled":this.buttonInst.disabled=this.disabled,this.handleStateChange();break;case"htmlAttributes":this.removeHtmlAttributes(t.htmlAttributes),this.addHtmlAttributes(e.htmlAttributes);break;case"listeningState":this.handleStateChange();break;case"tooltipSettings":case"showTooltip":this.updateTooltip();break;case"transcript":this.transcript=this.fullTranscript=e.transcript;break;case"enableRtl":this.buttonInst.enableRtl=this.tooltipInst.enableRtl=this.enableRtl;break;case"locale":this.l10n.setLocale(this.locale),this.updateAriaLabel(),this.updateTooltip()}},Dt([t.Property("")],a.prototype,"transcript",void 0),Dt([t.Property("")],a.prototype,"lang",void 0),Dt([t.Property(!0)],a.prototype,"allowInterimResults",void 0),Dt([t.Property(!0)],a.prototype,"showTooltip",void 0),Dt([t.Property("Inactive")],a.prototype,"listeningState",void 0),Dt([t.Complex({},Wt)],a.prototype,"buttonSettings",void 0),Dt([t.Complex({},zt)],a.prototype,"tooltipSettings",void 0),Dt([t.Property(!1)],a.prototype,"disabled",void 0),Dt([t.Property("")],a.prototype,"cssClass",void 0),Dt([t.Property({})],a.prototype,"htmlAttributes",void 0),Dt([t.Event()],a.prototype,"created",void 0),Dt([t.Event()],a.prototype,"onStart",void 0),Dt([t.Event()],a.prototype,"onStop",void 0),Dt([t.Event()],a.prototype,"onError",void 0),Dt([t.Event()],a.prototype,"transcriptChanged",void 0),a=Dt([t.NotifyPropertyChanges],a)}(t.Component);return e.AsyncSettings=qe,e.ButtonSettings=Wt,e.ButtonsProps=ze,e.ColorPicker=ht,e.ColorRangeData=ye,e.FilesProp=We,e.FormValidator=Oe,e.LimitData=be,e.MaskUndo=pe,e.MaskedTextBox=me,e.NumericTextBox=ie,e.OtpInput=Vt,e.Rating=Ut,e.Signature=At,e.SignatureBase=kt,e.Slider=xe,e.SmartTextArea=xt,e.SpeechToText=qt,e.TEXTBOX_FOCUS="e-input-focus",e.TextArea=vt,e.TextBox=ut,e.TicksData=ge,e.TooltipData=Ce,e.TooltipSettings=zt,e.Uploader=je,e.applyMask=r,e.bindClearEvent=h,e.containerAttributes=Z,e.createMask=a,e.escapeRegExp=C,e.getMaskedVal=X,e.getVal=_,e.maskInput=q,e.maskInputBlurHandler=E,e.maskInputDropHandler=S,e.maskInputFocusHandler=y,e.maskInputMouseDownHandler=v,e.maskInputMouseUpHandler=g,e.mobileRemoveFunction=k,e.regex=Pe,e.regularExpressions=he,e.setElementValue=z,e.setMaskValue=W,e.strippedValue=m,e.triggerFocus=b,e.unstrippedValue=c,e.unwireEvents=o,e.wireEvents=l,e}({},ej.base,ej.popups,ej.splitbuttons,ej.buttons),this.ejs=ej;
10
+ this.ej=this.ej||{},this.ej.inputs=function(e,t,i,s,n){"use strict";function a(){if(t.attributes(this.element,{role:"textbox",autocomplete:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive"}),this.mask){for(var e=this.mask.split("]"),i=0;i<e.length;i++)if("\\"===e[i][e[i].length-1]){e[i]=e[i]+"]";for(var s=e[i].split("["),n=0;n<s.length;n++)"\\"===s[n][s[n].length-1]&&(s[n]=s[n]+"["),f.call(this,s[n])}else if((s=e[i].split("[")).length>1)for(var a=!1,n=0;n<s.length;n++)"\\"===s[n]?(this.customRegExpCollec.push("["),this.hiddenMask+=s[n]+"["):""===s[n]?a=!0:""!==s[n]&&a||n===s.length-1?(this.customRegExpCollec.push("["+s[n]+"]"),this.hiddenMask+=this.promptChar,a=!1):f.call(this,s[n]);else f.call(this,s[0]);if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!t.isNullOrUndefined(this.customCharacters))for(i=0;i<this.promptMask.length;i++)t.isNullOrUndefined(this.customCharacters[this.promptMask[i]])||(this.promptMask=this.promptMask.replace(new RegExp(this.promptMask[i],"g"),this.promptChar));var r=0;if(this.hiddenMask.match(new RegExp(/\\/)))for(i=0;i<this.hiddenMask.length;i++){n=0;i>=1&&(n=i),n-=r=this.hiddenMask.length-this.promptMask.length,i>0&&"\\"!==this.hiddenMask[i-1]&&(">"===this.hiddenMask[i]||"<"===this.hiddenMask[i]||"|"===this.hiddenMask[i])&&(this.promptMask=this.promptMask.substring(0,n)+this.promptMask.substring(i+1-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue.substring(i+1-r,this.escapeMaskValue.length)),"\\"===this.hiddenMask[i]&&(this.promptMask=this.promptMask.substring(0,n)+this.hiddenMask[i+1]+this.promptMask.substring(i+2-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue[i+1]+this.escapeMaskValue.substring(i+2-r,this.escapeMaskValue.length))}else this.promptMask=this.promptMask.replace(/[>|<]/g,""),this.escapeMaskValue=this.hiddenMask.replace(/[>|<]/g,"");t.attributes(this.element,{"aria-invalid":"false"})}}function r(){z.call(this,this.promptMask),W.call(this,this.value)}function l(){t.EventHandler.add(this.element,"keydown",O,this),t.EventHandler.add(this.element,"keypress",A,this),t.EventHandler.add(this.element,"keyup",N,this),t.EventHandler.add(this.element,"input",P,this),t.EventHandler.add(this.element,"focus",y,this),t.EventHandler.add(this.element,"blur",E,this),t.EventHandler.add(this.element,"paste",x,this),t.EventHandler.add(this.element,"cut",T,this),t.EventHandler.add(this.element,"drop",S,this),t.EventHandler.add(this.element,"mousedown",v,this),t.EventHandler.add(this.element,"mouseup",g,this),this.enabled&&(h.call(this),this.formElement&&t.EventHandler.add(this.formElement,"reset",u,this))}function o(){t.EventHandler.remove(this.element,"keydown",O),t.EventHandler.remove(this.element,"keypress",A),t.EventHandler.remove(this.element,"keyup",N),t.EventHandler.remove(this.element,"input",P),t.EventHandler.remove(this.element,"focus",y),t.EventHandler.remove(this.element,"blur",E),t.EventHandler.remove(this.element,"paste",x),t.EventHandler.remove(this.element,"cut",T),t.EventHandler.remove(this.element,"drop",S),t.EventHandler.remove(this.element,"mousedown",v),t.EventHandler.remove(this.element,"mouseup",g),this.formElement&&t.EventHandler.remove(this.formElement,"reset",u)}function h(){this.showClearButton&&t.EventHandler.add(this.inputObj.clearButton,"mousedown touchstart",p,this)}function p(e){e.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputObj.container.classList.contains("e-static-clear")||(d.call(this,e),this.value="")}function d(e){var t=this.element.value;z.call(this,this.promptMask),this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),H.call(this,e,t),this.element.setSelectionRange(0,0)}function u(){"EJS-MASKEDTEXTBOX"===this.element.tagName?z.call(this,this.promptMask):this.value=this.initInputValue}function c(e){return e.value}function m(e,i){var s="",n=0,a=!1,r=t.isNullOrUndefined(i)?t.isNullOrUndefined(e)||t.isNullOrUndefined(this)?i:e.value:i;if(r!==this.promptMask)for(var l=0;l<this.customRegExpCollec.length;l++)a&&(a=!1),">"!==this.customRegExpCollec[n]&&"<"!==this.customRegExpCollec[n]&&"|"!==this.customRegExpCollec[n]&&"\\"!==this.customRegExpCollec[n]||(--l,a=!0),a||r[l]!==this.promptChar&&!t.isNullOrUndefined(this.customRegExpCollec[n])&&(this._callPasteHandler||!t.isNullOrUndefined(this.regExpCollec[this.customRegExpCollec[n]])&&!this.maskedRegExp.includes(this.customRegExpCollec[n])||this.customRegExpCollec[n].length>2&&"["===this.customRegExpCollec[n][0]&&"]"===this.customRegExpCollec[n][this.customRegExpCollec[n].length-1]||!t.isNullOrUndefined(this.customCharacters)&&!t.isNullOrUndefined(this.customCharacters[this.customRegExpCollec[n]]))&&""!==r&&(s+=r[l]),++n;return(null===this.mask||""===this.mask&&void 0!==this.value)&&(s=r),s}function f(e){for(var i=0;i<e.length;i++)this.hiddenMask+=e[i],"\\"!==e[i]?this.customRegExpCollec.push(e[i]):"\\"!==e[i]||t.isNullOrUndefined(this.regExpCollec[e[i+1]])||this.maskedRegExp.push(e[i+1])}function v(){this.isClicked=!0}function g(){this.isClicked=!1}function y(e){var i=this,s=this.element,n=0,a=m.call(this,s),r=!1,l=!1,o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||b.call(this,o,s),"Never"!==this.floatLabelType&&this.inputObj&&this.inputObj.container){var h=this.inputObj.container.querySelector(".e-float-text");h&&h.removeAttribute("style")}var p=this.inputObj.container.querySelector(".e-float-text");if(p&&"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){p&&(p.style.width="auto")}.bind(this),5),this.mask&&(null!==a&&""!==a||"Always"===this.floatLabelType||null===this.placeholder||""===this.placeholder||(s.value=this.promptMask),setTimeout(function(){if(s.selectionStart===i.promptMask.length||s.value[s.selectionStart]===i.promptChar)r=!0;else for(var e=s.selectionStart;e<i.promptMask.length;e++){if(s.value[e]===i.promptChar){r=!0;break}if(s.value[e]!==i.promptMask[e]){r=!1;break}}}),setTimeout(function(){var e=s.selectionStart-1;if(e===i.promptMask.length-1||s.value[e]===i.promptChar)l=!0;else for(var t=e;t>=0;t--){if(s.value[t]===i.promptChar){l=!0;break}if(s.value[t]!==i.promptMask[t]){l=!1;break}}}),this.isClicked||"Always"!==this.floatLabelType&&(null===a||""===a)&&null!==this.placeholder&&""!==this.placeholder)){for(n=0;n<this.promptMask.length;n++)if(s.value[n]===this.promptChar){setTimeout(function(){(r||l)&&(s.selectionEnd=n,s.selectionStart=n),o={selectionStart:s.selectionStart,event:e,value:i.value,maskedValue:s.value,container:t.isNullOrUndefined(i.inputObj)?i.inputObj:i.inputObj.container,selectionEnd:s.selectionEnd},b.call(i,o,s)},110);break}t.isNullOrUndefined(s.value.match(C(this.promptChar)))&&(o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd},b.call(this,o,s)),this.isClicked=!1}}function b(e,t){this.trigger("focus",e,function(e){t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd})}function C(e){return t.isNullOrUndefined(e)?e:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function E(e){this.blurEventArgs={event:e,value:this.value,maskedValue:this.element.value,container:t.isNullOrUndefined(this.inputObj)?this.inputObj:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.updateFloatLabelOverflowWidth();var i=this.inputObj.container.querySelector(".e-float-text");if("Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&i&&setTimeout(function(){i&&this.prependedElement&&!this.enableRtl?i.style.marginLeft=this.prependedElement.offsetWidth+"px":i&&this.prependedElement&&this.enableRtl&&(i.style.marginRight=this.prependedElement.offsetWidth+"px"),i&&(i.style.width=this.element.offsetWidth+"px")}.bind(this),5),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){z.call(this,"");var s=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!t.isNullOrUndefined(s)&&s.classList.contains(le)&&t.removeClass([s],le)}}function x(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.selectionStart,s=this.element.selectionEnd,n=this.element.value;z.call(this,""),this._callPasteHandler=!0,setTimeout(function(){var a=t.element.value.replace(/ /g,"");t.redoCollec.length>0&&t.redoCollec[0].value===t.element.value&&(a=m.call(t,t.element)),z.call(t,n),t.element.selectionStart=i,t.element.selectionEnd=s;var r=0;t.maskKeyPress=!0;do{U.call(t,a[r],!1,null),++r}while(r<a.length);if(t.maskKeyPress=!1,t._callPasteHandler=!1,t.element.value===n){var l=0;t.maskKeyPress=!0;do{U.call(t,a[l],!1,null),++l}while(l<a.length);t.maskKeyPress=!1}else H.call(t,e,n)},1)}}function T(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.value,s=this.element.selectionStart,n=this.element.selectionEnd;this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd});var a=this.element.value.substring(0,s)+this.promptMask.substring(s,n)+this.element.value.substring(n);setTimeout(function(){z.call(t,a),t.element.selectionStart=t.element.selectionEnd=s,t.element.value!==i&&H.call(t,e,null)},0)}}function S(e){e.preventDefault()}function P(e){if(!0!==t.Browser.isIE||""!==this.element.value||"Never"!==this.floatLabelType){var i={ctrlKey:!1,keyCode:229};if(t.extend(e,i),this.mask){if(""===this.element.value&&this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this._callPasteHandler||t.Browser.isDevice||L.call(this,e),this.element.value.length>this.promptMask.length){var s=this.element.selectionStart,n=this.element.value.length-this.promptMask.length,a=this.element.value.substring(s-n,s);this.maskKeyPress=!1;var r=0;do{U.call(this,a[r],e.ctrlKey,e),++r}while(r<a.length);this.element.value!==this.preEleVal&&H.call(this,e,null)}var l=m.call(this,this.element);this.prevValue=l,this.value=l,""===l&&(z.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function O(e){if(this.mask&&!this.readonly){229!==e.keyCode&&(!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||e.preventDefault(),L.call(this,e));var t=this.element.value;if(e.ctrlKey&&(89===e.keyCode||90===e.keyCode)){var i=void 0;90===e.keyCode&&this.undoCollec.length>0&&t!==this.undoCollec[this.undoCollec.length-1].value?(i=this.undoCollec[this.undoCollec.length-1],this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),z.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.undoCollec.splice(this.undoCollec.length-1,1)):89===e.keyCode&&this.redoCollec.length>0&&t!==this.redoCollec[0].value&&(i=this.redoCollec[0],this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),z.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.redoCollec.splice(0,1))}}}function k(){var e,t=this.element.selectionStart,i=this.element.selectionEnd;this.redoCollec.length>0?(e=this.redoCollec[0],z.call(this,e.value),e.startIndex-t==1?(this.element.selectionStart=e.startIndex,this.element.selectionEnd=e.endIndex):(this.element.selectionStart=t+1,this.element.selectionEnd=i+1)):(z.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=t)}function w(e,t,i){return"input"===i.type&&(e=!1,t=this.element.value,z.call(this,this.promptMask),W.call(this,t)),e}function L(e){var i,s=!1,n=!1;this.element.value.length<this.promptMask.length&&(s=!0,i=this.element.value,s=w.call(this,s,i,e),k.call(this)),this.element.value.length>=this.promptMask.length&&"input"===e.type&&(s=w.call(this,s,i,e));var a=this.element.selectionStart,r=this.element.selectionEnd,l=this.element.selectionStart,o=this.element.selectionEnd,h=this.hiddenMask.replace(/[>|\\<]/g,""),p=h[l-1],d=this.element.selectionEnd;if(s||8===e.keyCode||46===e.keyCode){this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:o});var u=!1,c=this.element.value;if(l>0||(8===e.keyCode||46===e.keyCode)&&l<this.element.value.length&&this.element.selectionEnd-l!==this.element.value.length){var m=l;l!==o?(l=o,46===e.keyCode&&(u=!0)):46===e.keyCode?++m:--m;for(var f=l;8===e.keyCode||s||u?f>m:f<m;8===e.keyCode||s||u?f--:f++)for(var v=l;8===e.keyCode||s||u?v>0:v<this.element.value.length;8===e.keyCode||s||u?v--:v++){var g=void 0;(8===e.keyCode||u)&&(a!==r&&a!==l||a===r)||s?(p=h[v-1],g=l-1):(p=h[v],g=l,++l);var y=this.element.value[g];if(t.isNullOrUndefined(this.regExpCollec[""+p])&&!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[""+p])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,e.preventDefault(),46!==e.keyCode||u||++this.element.selectionStart;else{var b=this.element.value,C=this.promptChar,E=b.substring(0,g)+C+b.substring(l,b.length);z.call(this,E),e.preventDefault(),46!==e.keyCode||u||g++,this.element.selectionStart=this.element.selectionEnd=g,n=!0}if(l=this.element.selectionStart,!n&&8===e.keyCode||u||!n&&46!==e.keyCode?g=l-1:(g=l,n=!1),y=this.element.value[g],a!==r&&this.element.selectionStart===a||this.promptMask[g]===this.promptChar||y!==this.promptMask[g]&&this.promptMask[g]!==this.promptChar&&!t.isNullOrUndefined(this.customCharacters))break}}46===e.keyCode&&u&&n&&(this.element.selectionStart=this.element.selectionEnd=d),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(z.call(this,this.promptMask),e.preventDefault(),this.element.selectionStart=this.element.selectionEnd=l),this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),this.element.value!==c&&H.call(this,e,i)}}function A(e){if(this.mask&&!this.readonly){var t=this.element.value;if(!e.ctrlKey&&!e.metaKey||(e.ctrlKey||e.metaKey)&&"KeyA"!==e.code&&"KeyY"!==e.code&&"KeyZ"!==e.code&&"KeyX"!==e.code&&"KeyC"!==e.code&&"KeyV"!==e.code){this.maskKeyPress=!0;var i=e.key;"Spacebar"===i&&(i=String.fromCharCode(e.keyCode)),i?i&&1===i.length&&(U.call(this,i,e.ctrlKey,e),e.preventDefault()):(this.isIosInvalid=!0,U.call(this,String.fromCharCode(e.keyCode),e.ctrlKey,e),e.preventDefault(),this.isIosInvalid=!1),32===e.keyCode&&" "===i&&" "===this.promptChar&&(this.element.selectionStart=this.element.selectionEnd=this.element.selectionStart-i.length)}this.element.value!==t&&H.call(this,e,t)}}function H(e,i){var s=this.isProtectedOnChange;if(!t.isNullOrUndefined(this.changeEventArgs)&&!this.isInitial){var n={};this.changeEventArgs={value:this.element.value,maskedValue:this.element.value,isInteraction:!1,isInteracted:!1},this.mask&&(this.changeEventArgs.value=m.call(this,this.element)),t.isNullOrUndefined(e)||(this.changeEventArgs.isInteracted=!0,this.changeEventArgs.isInteraction=!0,this.changeEventArgs.event=e),this.isProtectedOnChange=!0,this.value=this.changeEventArgs.value,this.isProtectedOnChange=s,t.merge(n,this.changeEventArgs),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",n)}this.preEleVal=this.element.value,this.prevValue=m.call(this,this.element)}function N(e){if(this.mask&&!this.readonly){var i=void 0;if(this.maskKeyPress||229!==e.keyCode)M.call(this);else{var s=void 0;if(1===this.element.value.length&&(this.element.value=this.element.value+this.promptMask,this.element.setSelectionRange(1,1)),this.element.value.length>this.promptMask.length){var n=this.element.selectionStart,a=this.element.value.length-this.promptMask.length,r=this.element.value.substring(n-a,n);if(this.undoCollec.length>0){i=this.undoCollec[this.undoCollec.length-1];var l=this.element.selectionStart;s=i.value;var o=i.value.substring(l-a,l);i=this.redoCollec[0],r=r.trim();var h=t.Browser.isAndroid&&""===r;h||o===r||i.value.substring(l-a,l)===r?h&&F.call(this,e,l-1,this.element.selectionEnd-1,r,e.ctrlKey,!1):U.call(this,r,e.ctrlKey,e)}else s=this.promptMask,U.call(this,r,e.ctrlKey,e);this.maskKeyPress=!1,H.call(this,e,s)}}var p=m.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==p||""===p&&this.value!==p)&&(this.prevValue=p,this.value=p)}else H.call(this,e);if(0===this.element.selectionStart&&0===this.element.selectionEnd){var d=this.element;setTimeout(function(){d.setSelectionRange(0,0)},0)}}function B(e){if(e.length>1&&this.promptMask.length+e.length<this.element.value.length){var t=this.redoCollec[0].value.substring(0,this.redoCollec[0].startIndex)+e+this.redoCollec[0].value.substring(this.redoCollec[0].startIndex,this.redoCollec[0].value.length);z.call(this,t),this.element.selectionStart=this.element.selectionEnd=this.redoCollec[0].startIndex+e.length}this.element.selectionStart=this.element.selectionStart-e.length,this.element.selectionEnd=this.element.selectionEnd-e.length}function R(e){this.maskKeyPress||B.call(this,e)}function U(e,i,s){if(R.call(this,e),!t.isNullOrUndefined(this)&&!t.isNullOrUndefined(e))for(var n,a,r=this.element.selectionStart,l=r,o=!1,h=this.element.value,p=!1,d=!1,u=0;u<e.length;u++){var c=e[u];if(r=this.element.selectionStart,this.maskKeyPress||l!==r||(r+=u),!this.maskKeyPress||r<this.promptMask.length){for(f=r;f<this.promptMask.length;f++)n=this.escapeMaskValue[r],"\\"===this.hiddenMask[r]&&this.hiddenMask[r+1]===e&&(d=!0),(t.isNullOrUndefined(this.regExpCollec[""+n])&&(t.isNullOrUndefined(this.customCharacters)||!t.isNullOrUndefined(this.customCharacters)&&t.isNullOrUndefined(this.customCharacters[""+n]))&&this.hiddenMask[r]!==this.promptChar&&"["!==this.customRegExpCollec[r][0]&&"]"!==this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]||this.promptMask[r]!==this.promptChar&&t.isNullOrUndefined(this.customCharacters)||this.promptChar===n&&this.escapeMaskValue===this.mask)&&(this.element.selectionStart=this.element.selectionEnd=r+1,r=this.element.selectionStart,n=this.hiddenMask[r]);if(t.isNullOrUndefined(this.customCharacters)||t.isNullOrUndefined(this.customCharacters[""+n]))!t.isNullOrUndefined(this.regExpCollec[""+n])&&c.match(new RegExp(this.regExpCollec[""+n]))&&this.promptMask[r]===this.promptChar?o=!0:this.promptMask[r]===this.promptChar&&"["===this.customRegExpCollec[r][0]&&"]"===this.customRegExpCollec[r][this.customRegExpCollec[r].length-1]&&c.match(new RegExp(this.customRegExpCollec[r]))&&(o=!0);else for(var m=this.customCharacters[""+n].split(","),f=0;f<m.length;f++)if(c.match(new RegExp("["+m[f]+"]"))){o=!0;break}if((!this.maskKeyPress||r<this.hiddenMask.length)&&o){if(0===u)if(this.maskKeyPress)this.undoCollec.push({value:h,startIndex:r,endIndex:r});else{var v=this.element.selectionStart,g=this.element.selectionEnd;this.redoCollec.length>0?(a=this.redoCollec[0].value,z.call(this,a),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:r,endIndex:r}),a=this.promptMask,z.call(this,a)),this.element.selectionStart=v,this.element.selectionEnd=g}r=this.element.selectionStart,I.call(this,s,r,c,a,d),p=!0,u===e.length-1&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),o=!1}else r=this.element.selectionStart,F.call(this,s,r,l,e,i,p);u!==e.length-1||o||(!t.Browser.isAndroid||t.Browser.isAndroid&&r<this.promptMask.length)&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd})}else 1!==e.length||i||t.isNullOrUndefined(s)||V.call(this)}}function I(e,t,i,s,n){if(this.hiddenMask.length>this.promptMask.length&&(i=D.call(this,i,this.element.value)),!n){var a=this.element.value,r=a.substring(0,t)+i+a.substring(t+1,a.length);z.call(this,r),this.element.selectionStart=this.element.selectionEnd=t+1}}function F(e,i,s,n,a,r){if(!this.maskKeyPress){var l=this.element.value;i>=this.promptMask.length?z.call(this,l.substring(0,i)):(s===i?z.call(this,l.substring(0,i)+l.substring(i+1,l.length)):this.promptMask.length===this.element.value.length?z.call(this,l.substring(0,i)+l.substring(i,l.length)):z.call(this,l.substring(0,s)+l.substring(s+1,l.length)),this.element.selectionStart=this.element.selectionEnd=r||this.element.value[s]!==this.promptChar?i:s),V.call(this)}1!==n.length||a||t.isNullOrUndefined(e)||V.call(this)}function V(){var e=this,i=this.element.parentNode,s=200;i.classList.contains(ne)||i.classList.contains(ae)?t.addClass([i],se):t.addClass([this.element],se),!0===this.isIosInvalid&&(s=400),t.attributes(this.element,{"aria-invalid":"true"}),setTimeout(function(){e.maskKeyPress||M.call(e)},s)}function M(){var e=this.element.parentNode;t.isNullOrUndefined(e)||t.removeClass([e],se),t.removeClass([this.element],se),t.attributes(this.element,{"aria-invalid":"false"})}function D(e,t){var i,s,n=t,a=0;for(s=0;s<this.hiddenMask.length;s++)if("\\"===this.hiddenMask[s]&&(i=n.substring(0,s)+"\\"+n.substring(s,n.length)),">"!==this.hiddenMask[s]&&"<"!==this.hiddenMask[s]&&"|"!==this.hiddenMask[s]||(this.hiddenMask[s]!==n[s]&&(i=n.substring(0,s)+this.hiddenMask[s]+n.substring(s,n.length)),++a),i){if(i[s]===this.promptChar&&s>this.element.selectionStart||this.element.value.indexOf(this.promptChar)<0&&this.element.selectionStart+a===s){a=0;break}n=i}for(;s>=0&&i;){if(0===s||"\\"!==i[s-1]){if(">"===i[s]){e=e.toUpperCase();break}if("<"===i[s]){e=e.toLowerCase();break}if("|"===i[s])break}--s}return e}function W(e){if(this.mask&&void 0!==e&&(void 0===this.prevValue||this.prevValue!==e)){if(this.maskKeyPress=!0,z.call(this,this.promptMask),""===e||null===e&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==e)for(var i=0;i<e.length;i++)U.call(this,e[i],!1,null);var s=m.call(this,this.element);this.prevValue=s,this.value=s,H.call(this,null,null),this.maskKeyPress=!1;var n=this.element.parentNode.querySelector(".e-float-text");this.element.value===this.promptMask&&"Auto"===this.floatLabelType&&this.placeholder&&!t.isNullOrUndefined(n)&&n.classList.contains(le)&&!this.isFocus&&(t.removeClass([n],le),t.addClass([n],oe),z.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&z.call(this,this.value)}function z(i,s){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&t.isNullOrUndefined(this.value)&&(i="");var n=m.call(this,s||this.element,i);null===n||""===n?(e.Input.setValue(i,s||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):e.Input.setValue(i,s||this.element,this.floatLabelType,this.showClearButton)}function q(e){var t=j(e);r.call(t);var i=m.call(this,this.element);this.prevValue=i,this.value=i,e.mask&&(o.call(t),l.call(t))}function j(e){t.addClass([e.element],re);var i={element:e.element,mask:e.mask,promptMask:"",hiddenMask:"",escapeMaskValue:"",promptChar:e.promptChar?e.promptChar.length>1?e.promptChar=e.promptChar[0]:e.promptChar:"_",value:e.value?e.value:null,regExpCollec:he,customRegExpCollec:[],customCharacters:e.customCharacters,undoCollec:[],redoCollec:[],maskKeyPress:!1,prevValue:""};return a.call(i),i}function _(e){return m.call(K(e),e.element)}function X(e){return c.call(K(e),e.element)}function K(e){var i;return!t.isNullOrUndefined(e)&&e.element.classList.contains(re)&&(i=j(e)),i}var Y={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",TEXTAREA:"e-multi-line-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",FLOATTEXTCONTENT:"e-float-text-content",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"},Z=["title","style","class"];!function(e){function i(e,i){e.element.__eventHandlers={};var s=t.isNullOrUndefined(i)?t.createElement:i,n={container:null,buttons:[],clearButton:null};if(ue=e.floatLabelType,ce=e.bindClearAction,t.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(n.container=H(e,Y.INPUTGROUP,Y.INPUTCUSTOMTAG,"span",s),e.element.parentNode.insertBefore(n.container,e.element),t.addClass([e.element],Y.INPUT),n.container.appendChild(e.element)):f(e,n,s),r(e),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(z(e.properties.showClearButton,e.element,n,!0,s),n.clearButton.setAttribute("role","button"),n.container.classList.contains(Y.FLOATINPUT)&&t.addClass([n.container],Y.INPUTGROUP)),!t.isNullOrUndefined(e.buttons))for(var a=0;a<e.buttons.length;a++)n.buttons.push(ae(e.buttons[a],n.container,s));return t.isNullOrUndefined(e.element)||"TEXTAREA"!==e.element.tagName||t.addClass([n.container],Y.TEXTAREA),re(n.container,e.element),n=y(e,n),K(n.container,s),n}function s(t){var i=E(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.add("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout(function(){e.calculateWidth(t.element,i)},80)}function n(t){var i=E(t.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.remove("e-input-focus"),"Never"!==t.floatLabelType&&setTimeout(function(){e.calculateWidth(t.element,i)},80)}function a(e){o(e.floatLabelType,e.element)}function r(e){o(e.floatLabelType,e.element);var t=function(){return s(e)},i=function(){return n(e)},r=function(){return a(e)};e.element.addEventListener("focus",t),e.element.addEventListener("blur",i),e.element.addEventListener("input",r),e.element.__eventHandlers.inputFocusHandler={focusHandler:t},e.element.__eventHandlers.inputBlurHandler={blurHandler:i},e.element.__eventHandlers.inputHandler={inputHandler:r}}function l(e){if(!t.isNullOrUndefined(e.element)&&!(t.isNullOrUndefined(e.element.__eventHandlers)||t.isNullOrUndefined(e.element.__eventHandlers.inputFocusHandler)||t.isNullOrUndefined(e.element.__eventHandlers.inputBlurHandler)||t.isNullOrUndefined(e.element.__eventHandlers.inputHandler))){var i=e.element.__eventHandlers.inputFocusHandler.focusHandler,s=e.element.__eventHandlers.inputBlurHandler.blurHandler,n=e.element.__eventHandlers.inputHandler.inputHandler;e.element.removeEventListener("focus",i),e.element.removeEventListener("blur",s),e.element.removeEventListener("input",n),delete e.element.__eventHandlers.inputFocusHandler,delete e.element.__eventHandlers.inputBlurHandler,delete e.element.__eventHandlers.inputHandler}}function o(e,i){var s=i.value,n=i.parentElement,a=n&&n.parentElement;""===s||t.isNullOrUndefined(s)?"Always"!==e&&(n&&n.classList.contains("e-input-group")?n.classList.remove("e-valid-input"):a&&a.classList.contains("e-input-group")&&a.classList.remove("e-valid-input")):n&&n.classList.contains("e-input-group")?n.classList.add("e-valid-input"):a&&a.classList.contains("e-input-group")&&a.classList.add("e-valid-input")}function h(){var e=E(this).getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(e)||(t.addClass([e],Y.LABELTOP),e.classList.contains(Y.LABELBOTTOM)&&t.removeClass([e],Y.LABELBOTTOM))}function p(){var e=E(this);if(e.getElementsByTagName("textarea")[0]?""===e.getElementsByTagName("textarea")[0].value:""===e.getElementsByTagName("input")[0].value){var i=e.getElementsByClassName("e-float-text")[0];t.isNullOrUndefined(i)||(i.classList.contains(Y.LABELTOP)&&t.removeClass([i],Y.LABELTOP),t.addClass([i],Y.LABELBOTTOM))}}function d(e){e.addEventListener("focus",h),e.addEventListener("blur",p)}function u(e){t.isNullOrUndefined(e)||(e.removeEventListener("focus",h),e.removeEventListener("blur",p))}function c(e){A(e.element,e.floatLabelType)}function m(e){A(e.element,e.floatLabelType)}function f(e,i,s){var n=t.isNullOrUndefined(s)?t.createElement:s;"Auto"===e.floatLabelType&&d(e.element),t.isNullOrUndefined(i.container)?(i.container=H(e,Y.FLOATINPUT,Y.FLOATCUSTOMTAG,"div",n),i.container.classList.add(Y.INPUTGROUP),e.element.parentNode&&e.element.parentNode.insertBefore(i.container,e.element)):(t.isNullOrUndefined(e.customTag)||i.container.classList.add(Y.FLOATCUSTOMTAG),i.container.classList.add(Y.FLOATINPUT));var a=n("span",{className:Y.FLOATLINE}),r=n("label",{className:Y.FLOATTEXT});if(t.isNullOrUndefined(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),t.attributes(e.element,{"aria-labelledby":r.id})),t.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(r.innerText=N(e.element.placeholder),e.element.removeAttribute("placeholder")),t.isNullOrUndefined(e.properties)||t.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(r.innerText=N(e.properties.placeholder)),r.innerText||i.container.classList.add(Y.NOFLOATLABEL),i.container.classList.contains("e-float-icon-left")){var l=i.container.querySelector(".e-input-in-wrap");l.appendChild(e.element),l.appendChild(a),l.appendChild(r)}else i.container.appendChild(e.element),i.container.appendChild(a),i.container.appendChild(r);if(C(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(Y.LABELBOTTOM)&&t.removeClass([r],Y.LABELBOTTOM),t.addClass([r],Y.LABELTOP)),"Auto"===e.floatLabelType){var o=function(){return c(e)},h=function(){return m(e)};e.element.addEventListener("input",o),e.element.addEventListener("blur",h),e.element.__eventHandlers.floatInputHandler={inputFloatHandler:o},e.element.__eventHandlers.floatBlurHandler={blurFloatHandler:h}}else v(e);t.isNullOrUndefined(e.element.getAttribute("id"))||r.setAttribute("for",e.element.getAttribute("id"))}function v(e){if(!(t.isNullOrUndefined(e.element)||t.isNullOrUndefined(e.element.__eventHandlers)||t.isNullOrUndefined(e.element.__eventHandlers.floatInputHandler)||t.isNullOrUndefined(e.element.__eventHandlers.floatBlurHandler))){var i=e.element.__eventHandlers.floatInputHandler.inputFloatHandler,s=e.element.__eventHandlers.floatBlurHandler.blurFloatHandler;e.element.removeEventListener("input",i),e.element.removeEventListener("blur",s),delete e.element.__eventHandlers.floatInputHandler,delete e.element.__eventHandlers.floatBlurHandler}}function g(e,t){"Always"===e&&t.classList.contains("e-outline")&&t.classList.add("e-valid-input")}function y(e,i){if(!t.isNullOrUndefined(e.properties))for(var s=0,n=Object.keys(e.properties);s<n.length;s++)switch(n[s]){case"cssClass":U(e.properties.cssClass,[i.container]),g(e.floatLabelType,i.container);break;case"enabled":W(e.properties.enabled,e.element,e.floatLabelType,i.container);break;case"enableRtl":D(e.properties.enableRtl,[i.container]);break;case"placeholder":V(e.properties.placeholder,e.element);break;case"readonly":M(e.properties.readonly,e.element)}return i}function b(e,i,s){t.isNullOrUndefined(i)||(e&&!s?t.removeClass([i],Y.CLEARICONHIDE):t.addClass([i],Y.CLEARICONHIDE))}function C(e,i,s){void 0===s&&(s=null),e?(t.addClass([i],Y.LABELTOP),i.classList.contains(Y.LABELBOTTOM)&&t.removeClass([i],Y.LABELBOTTOM)):(null==s||s!==document.activeElement)&&(i.classList.contains(Y.LABELTOP)&&t.removeClass([i],Y.LABELTOP),t.addClass([i],Y.LABELBOTTOM))}function E(e){var i=t.isNullOrUndefined(e.parentNode)?e:e.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function x(e,i,s,n){var a=(t.isNullOrUndefined(n)?t.createElement:n)("span",{className:Y.CLEARICON}),r=i.container;return t.isNullOrUndefined(s)?(i.container.classList.contains(Y.FLOATINPUT)?i.container.querySelector("."+Y.FLOATTEXT):e).insertAdjacentElement("afterend",a):r.appendChild(a),t.addClass([a],Y.CLEARICONHIDE),k(e,a),a.setAttribute("aria-label","close"),a}function T(e,i,s){i.classList.contains(Y.DISABLE)||i.readOnly||(e.preventDefault(),i!==document.activeElement&&i.focus(),i.value="",t.addClass([s],Y.CLEARICONHIDE))}function S(e,t){b(e.value,t)}function P(e,t){b(e.value,t,e.readOnly)}function O(e,i){setTimeout(function(){t.isNullOrUndefined(i)||(t.addClass([i],Y.CLEARICONHIDE),i=!t.isNullOrUndefined(e)&&e.classList.contains("e-combobox")?null:i)},200)}function k(e,t,i){if(void 0===ce||ce){var s=function(i){return T(i,e,t)};t.addEventListener("click",s),e.__eventHandlers.clearClickHandler={clickHandlerEvent:s}}var n=function(){return S(e,t)},a=function(){return P(e,t)},r=function(){return O(e,t)};e.addEventListener("input",n),e.addEventListener("focus",a),e.addEventListener("blur",r),e.__eventHandlers.clearInputHandler={inputHandlerEvent:n},e.__eventHandlers.clearFocusHandler={focusHandlerEvent:a},e.__eventHandlers.clearBlurHandler={blurHandlerEvent:r}}function w(e,i){if(!t.isNullOrUndefined(e)&&!t.isNullOrUndefined(e.__eventHandlers)){if(!t.isNullOrUndefined(e.__eventHandlers.clearClickHandler)){var s=e.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===ce||ce)&&(t.isNullOrUndefined(i)||i.removeEventListener("click",s)),delete e.__eventHandlers.clearClickHandler}if(!t.isNullOrUndefined(e.__eventHandlers.clearInputHandler)&&!t.isNullOrUndefined(e.__eventHandlers.clearFocusHandler)&&!t.isNullOrUndefined(e.__eventHandlers.clearBlurHandler)){var n=e.__eventHandlers.clearInputHandler.inputHandlerEvent,a=e.__eventHandlers.clearFocusHandler.focusHandlerEvent,r=e.__eventHandlers.clearBlurHandler.blurHandlerEvent;e.removeEventListener("input",n),e.removeEventListener("focus",a),e.removeEventListener("blur",r),delete e.__eventHandlers.clearInputHandler,delete e.__eventHandlers.clearFocusHandler,delete e.__eventHandlers.clearBlurHandler}}}function L(e,i){void 0===i&&(i=null),l(e),"Auto"===e.floatLabelType&&v(e),e.properties.showClearButton&&w(e.element,i),t.isNullOrUndefined(e.buttons)||J(!1,null,e.buttons),u(e.element),t.isNullOrUndefined(e.element)||(delete e.element.__eventHandlers,e.element.classList.contains(Y.INPUT)&&e.element.classList.remove(Y.INPUT))}function A(e,t){if(E(e).classList.contains(Y.FLOATINPUT)&&"Auto"===t){var i=E(e).getElementsByClassName("e-float-text")[0];C(e.value,i,e)}}function H(e,i,s,n,a){var r,l=t.isNullOrUndefined(a)?t.createElement:a;return t.isNullOrUndefined(e.customTag)?r=l(n,{className:i}):(r=l(e.customTag,{className:i})).classList.add(s),r.classList.add("e-control-wrapper"),r}function N(e){return null==e||""===e?"":B(e)}function B(e){var t={"&amp;":"&","&quot;":'"',"&#39;":"'","&lt;":"<","&gt;":">","&eacute;":"é"};return e.replace(/&[a-zA-Z#0-9]+;/g,function(e){return t[e]||e})}function R(e,i,s,n){if(i.value=e,"Never"!==s&&I(i,i.parentElement),t.isNullOrUndefined(s)||"Auto"!==s||A(i,s),!t.isNullOrUndefined(n)&&n){var a=E(i);if(!t.isNullOrUndefined(a)){var r=a.getElementsByClassName(Y.CLEARICON)[0];t.isNullOrUndefined(r)||(i.value&&!t.isNullOrUndefined(a)&&a.classList.contains("e-input-focus")?t.removeClass([r],Y.CLEARICONHIDE):t.addClass([r],Y.CLEARICONHIDE))}}o(s,i)}function U(e,i,s){t.isNullOrUndefined(s)||""===s||t.removeClass(i,s.split(" ")),t.isNullOrUndefined(e)||""===e||t.addClass(i,e.split(" "))}function I(e,i,s){if("multiselect"===s||Q(e)){var n="multiselect"===s?e:e.clientWidth-parseInt(getComputedStyle(e,null).getPropertyValue("padding-left"),10);t.isNullOrUndefined(i)||t.isNullOrUndefined(i.getElementsByClassName("e-float-text-content")[0])||(i.getElementsByClassName("e-float-text-content")[0].classList.contains("e-float-text-overflow")&&i.getElementsByClassName("e-float-text-content")[0].classList.remove("e-float-text-overflow"),(n<i.getElementsByClassName("e-float-text-content")[0].clientWidth||n===i.getElementsByClassName("e-float-text-content")[0].clientWidth)&&i.getElementsByClassName("e-float-text-content")[0].classList.add("e-float-text-overflow"))}}function F(e,i){"number"==typeof e?i.style.width=t.formatUnit(e):"string"==typeof e&&(i.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)),I(i.firstChild,i)}function V(e,i){e=N(e);var s=E(i);if(s.classList.contains(Y.FLOATINPUT))if(t.isNullOrUndefined(e)||""===e){s.classList.add(Y.NOFLOATLABEL);var n=s.getElementsByClassName("e-float-text-content")[0];if(n&&n.children[0])n.children[0].textContent="";else{a=s.getElementsByClassName(Y.FLOATTEXT)[0];t.isNullOrUndefined(a)||(a.textContent="")}}else{if((n=s.getElementsByClassName("e-float-text-content")[0])&&n.children[0])n.children[0].textContent=e;else{var a=s.getElementsByClassName(Y.FLOATTEXT)[0];t.isNullOrUndefined(a)||(a.textContent=e)}s.classList.remove(Y.NOFLOATLABEL),i.removeAttribute("placeholder")}else t.isNullOrUndefined(e)||""===e?i.removeAttribute("placeholder"):t.attributes(i,{placeholder:e})}function M(e,i,s){e?t.attributes(i,{readonly:""}):i.removeAttribute("readonly"),t.isNullOrUndefined(s)||A(i,s)}function D(e,i){e?t.addClass(i,Y.RTL):t.removeClass(i,Y.RTL)}function W(e,i,s,n){var a={disabled:"","aria-disabled":"true"},r=!t.isNullOrUndefined(n);e?(i.classList.remove(Y.DISABLE),q(a,i),r&&t.removeClass([n],Y.DISABLE)):(i.classList.add(Y.DISABLE),j(a,i),r&&t.addClass([n],Y.DISABLE)),t.isNullOrUndefined(s)||A(i,s)}function z(e,i,s,n,a){var r=t.isNullOrUndefined(a)?t.createElement:a;e?s.clearButton=x(i,s,n,r):(t.remove(s.clearButton),s.clearButton=null)}function q(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=E(t);"disabled"===n&&t.classList.remove(Y.DISABLE),"disabled"===n&&a.classList.contains(Y.INPUTGROUP)&&a.classList.remove(Y.DISABLE),"placeholder"===n&&a.classList.contains(Y.FLOATINPUT)?a.getElementsByClassName(Y.FLOATTEXT)[0].textContent="":t.removeAttribute(n)}}function j(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],a=E(t);"disabled"===n&&t.classList.add(Y.DISABLE),"disabled"===n&&a.classList.contains(Y.INPUTGROUP)&&a.classList.add(Y.DISABLE),"placeholder"===n&&a.classList.contains(Y.FLOATINPUT)?a.getElementsByClassName(Y.FLOATTEXT)[0].textContent=e[""+n]:t.setAttribute(n,e[""+n])}}function _(e){var i=e.container;if(!t.isNullOrUndefined(i)&&i.classList.contains(Y.FLOATINPUT)){var s=i.querySelector("textarea")?i.querySelector("textarea"):i.querySelector("input"),n=i.querySelector("."+Y.FLOATTEXT).textContent,a=null!==i.querySelector(".e-clear-icon");t.detach(i.querySelector("."+Y.FLOATLINE)),t.detach(i.querySelector("."+Y.FLOATTEXT)),t.classList(i,[Y.INPUTGROUP],[Y.FLOATINPUT]),u(s),t.attributes(s,{placeholder:n}),s.classList.add(Y.INPUT),a||"INPUT"!==s.tagName||s.removeAttribute("required")}}function X(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=t.closest(e,"."+Y.INPUTGROUP);ue=i;var l=r.tagName,o={element:e,floatLabelType:i,customTag:l="DIV"!==l&&"SPAN"!==l?l:null,properties:{placeholder:s}};if("Never"!==i){var h=r.querySelector(".e-clear-icon"),p={container:r};e.classList.remove(Y.INPUT),f(o,p,a),K(p.container,a),I(o.element,p.container);var d=r.classList.contains("e-float-icon-left");if(t.isNullOrUndefined(h)&&(h=d?r.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon"):r.querySelector(".e-input-group-icon")),t.isNullOrUndefined(h))d&&(h=r.querySelector(".e-input-group-icon"));else{var u=r.querySelector("."+Y.FLOATLINE),c=r.querySelector("."+Y.FLOATTEXT),m=d?r.querySelector(".e-input-in-wrap"):r;m.insertBefore(e,h),m.insertBefore(u,h),m.insertBefore(c,h)}}else v(o);g(i,e.parentElement)}function K(e,t){if(e.classList.contains("e-outline")&&e.getElementsByClassName("e-float-text")[0]){var i=t("span",{className:Y.FLOATTEXTCONTENT});i.innerHTML=e.getElementsByClassName("e-float-text")[0].innerHTML,e.getElementsByClassName("e-float-text")[0].innerHTML="",e.getElementsByClassName("e-float-text")[0].appendChild(i)}}function G(e,t){for(var i=0;i<t.length;i++)J(e,t[parseInt(i.toString(),10)].container)}function J(e,i,s){var n=[];n.push(s);var a=t.isNullOrUndefined(s)?i.querySelectorAll(".e-input-group-icon"):n;if(e&&a.length>0)for(r=0;r<a.length;r++)a[parseInt(r.toString(),10)].addEventListener("mousedown",ee,!1),a[parseInt(r.toString(),10)].addEventListener("mouseup",te,!1);else if(a.length>0)for(var r=0;r<a.length;r++)a[parseInt(r.toString(),10)].removeEventListener("mousedown",ee,this),a[parseInt(r.toString(),10)].removeEventListener("mouseup",te,this)}function $(e,t){e.classList.contains("e-disabled")||e.querySelector("input").readOnly||t.classList.add("e-input-btn-ripple")}function Q(e){if(!e)return!1;for(var t=e;t&&t!==document.body;){if("none"===window.getComputedStyle(t).display)return!1;t=t.parentElement}return!0}function ee(){for(var e=this,t=this.parentElement;!t.classList.contains("e-input-group");)t=t.parentElement;$(t,e)}function te(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}function ie(e,t){var i=t("span",{className:e});return i.classList.add("e-input-group-icon"),i}function se(e,t,i,s,n){var a="string"==typeof t?t.split(","):t;if("append"===e.toLowerCase())for(var r=0,l=a;r<l.length;r++)ae(p=l[r],i,n);else for(var o=0,h=a;o<h.length;o++){var p=h[o];ne(p,i,s,n)}i.getElementsByClassName("e-input-group-icon")[0]&&i.getElementsByClassName("e-float-text-overflow")[0]&&i.getElementsByClassName("e-float-text-overflow")[0].classList.add("e-icon")}function ne(e,i,s,n){var a=t.isNullOrUndefined(n)?t.createElement:n,r=ie(e,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if(t.isNullOrUndefined(l)){l=a("span",{className:"e-input-in-wrap"}),s.parentNode.insertBefore(l,s);var o=i.querySelectorAll(s.tagName+" ~ *");l.appendChild(s);for(var h=0;h<o.length;h++){var p=o[parseInt(h.toString(),10)],d=l.parentElement;p.classList.contains("e-float-line")&&(d&&d.classList.contains("e-filled")||!d)||l.appendChild(p)}}return l.parentNode.insertBefore(r,l),J(!0,i,r),r}function ae(e,i,s){var n=ie(e,t.isNullOrUndefined(s)?t.createElement:s);return(i.classList.contains("e-float-icon-left")?i.querySelector(".e-input-in-wrap"):i).appendChild(n),J(!0,i,n),n}function re(e,t){"hidden"===t.type?e.classList.add("e-hidden"):e.classList.contains("e-hidden")&&e.classList.remove("e-hidden")}function le(e,i){if(!t.isNullOrUndefined(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];Z.indexOf(a)<0&&i.setAttribute(a,e[""+a])}}function oe(e,t,i){U(he(e),[i],he(t))}function he(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i}function pe(e,i){if(!t.isNullOrUndefined(e))for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];if(Z.indexOf(a)>-1)if("class"===a){var r=this.getInputValidClassList(e[""+a]);""!==r&&t.addClass([i],r.split(" "))}else if("style"===a){var l=i.getAttribute(a);l=t.isNullOrUndefined(l)?e[""+a]:l+e[""+a],i.setAttribute(a,l)}else i.setAttribute(a,e[""+a])}}function de(e){return!e||/^\s*$/.test(e)}var ue,ce=!0;e.createInput=i,e.bindInitialEvent=r,e.wireFloatingEvents=d,e.wireClearBtnEvents=k,e.destroy=L,e.setValue=R,e.setCssClass=U,e.calculateWidth=I,e.setWidth=F,e.setPlaceholder=V,e.setReadonly=M,e.setEnableRtl=D,e.setEnabled=W,e.setClearButton=z,e.removeAttributes=q,e.addAttributes=j,e.removeFloating=_,e.addFloating=X,e.createSpanElement=K,e.setRipple=G,e.addIcon=se,e.prependSpan=ne,e.appendSpan=ae,e.validateInputType=re,e.updateHTMLAttributesToElement=le,e.updateCssClass=oe,e.getInputValidClassList=he,e.updateHTMLAttributesToWrapper=pe,e.isBlank=de}(e.Input||(e.Input={}));var G=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)}}(),J=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},$="e-input-group-icon",Q=new RegExp("^(-)?(\\d*)$"),ee=["title","style","class"],te=0,ie=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.preventChange=!1,s.isDynamicChange=!1,s.numericOptions=e,s}return G(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var e=t.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=t.closest(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var i=this.createElement("input"),s=0;for(s;s<this.element.attributes.length;s++){var n=this.element.attributes[s].nodeName;"id"!==n&&"class"!==n?(i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML):"class"===n&&i.setAttribute(n,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "))}this.element.hasAttribute("name")&&this.element.removeAttribute("name"),this.element.classList.remove("e-control","e-numerictextbox"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}t.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var a={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new t.L10n("numerictextbox",a,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",t.getUniqueID("numerictextbox")),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.prevValue=this.value,this.updateHTMLAttrToElement(),this.checkAttributes(!1),this.formEle&&(this.inputEleValue=this.value),this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},s.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),this.setElementWidth(this.width),this.container.classList.contains("e-input-group")||this.container.classList.add("e-input-group"),this.changeValue(null===this.value||isNaN(this.value)?null:this.strictMode?this.trimValue(this.value):this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0),(this.element.getAttribute("value")||this.value)&&(this.element.setAttribute("value",this.element.value),this.hiddenInput.setAttribute("value",this.hiddenInput.value)),this.elementPrevValue=this.element.value,this.element.hasAttribute("data-val")&&this.element.setAttribute("data-val","false"),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.hasAttribute("aria-label")||this.element.setAttribute("aria-label","numerictextbox"),!t.isNullOrUndefined(t.closest(this.element,"fieldset"))&&t.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.updateFloatLabelOverflowWidth(),this.createPrependTemplate(),this.createAppendTemplate(),this.renderComplete())},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["value","min","max","step","disabled","readonly","style","name","placeholder"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.value||e){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties(t.setValue(n,l,{}),!e)}break;case"min":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.min||e){var o=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===o||isNaN(o)||this.setProperties(t.setValue(n,o,{}),!e)}break;case"max":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.max||e){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties(t.setValue(n,h,{}),!e)}break;case"step":if(t.isNullOrUndefined(this.numericOptions)||void 0===this.numericOptions.step||e){var p=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===p||isNaN(p)||this.setProperties(t.setValue(n,p,{}),!e)}break;case"style":this.inputStyle=this.element.getAttribute(n);break;case"name":this.inputName=this.element.getAttribute(n);break;default:var d=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));(null!==d&&!isNaN(d)||"value"===n)&&this.setProperties(t.setValue(n,d,{}),!0)}}},s.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},s.prototype.initCultureFunc=function(){this.instance=new t.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==t.getValue("currency",this)&&(t.setValue("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},s.prototype.createWrapper=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getNumericValidClassList(this.cssClass));var s=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:i,enableRtl:this.enableRtl,showClearButton:this.showClearButton,enabled:this.enabled}},this.createElement);this.inputWrapper=s,this.container=s.container,this.container.setAttribute("class","e-control-wrapper e-numeric "+this.container.getAttribute("class")),this.updateHTMLAttrToWrapper(),this.readonly&&t.attributes(this.element,{"aria-readonly":"true"}),this.hiddenInput=this.createElement("input",{attrs:{type:"text","data-validateHidden":"true","aria-label":"hidden",class:"e-numeric-hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),this.isAngular&&"EJS-NUMERICTEXTBOX"===this.angularTagName&&this.cloneElement.id.length>0?t.attributes(this.hiddenInput,{name:this.cloneElement.id}):t.attributes(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.container.childNodes[1]),this.updateDataAttribute(!1),null!==this.inputStyle&&t.attributes(this.container,{style:this.inputStyle})},s.prototype.updateDataAttribute=function(e){var t={};if(e)t=this.htmlAttributes;else for(var i=0;i<this.element.attributes.length;i++)t[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name);for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];0===a.indexOf("data")&&this.hiddenInput.setAttribute(a,t[""+a])}},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];ee.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateCssClass=function(t,i){e.Input.setCssClass(this.getNumericValidClassList(t),[this.container],this.getNumericValidClassList(i))},s.prototype.getNumericValidClassList=function(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(ee.indexOf(s)>-1)if("class"===s){var n=this.getNumericValidClassList(this.htmlAttributes[""+s]);""!==n&&t.addClass([this.container],n.split(" "))}else if("style"===s){var a=this.container.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[""+s]:a+this.htmlAttributes[""+s],this.container.setAttribute(s,a)}else this.container.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.setElementWidth=function(e){t.isNullOrUndefined(e)||("number"==typeof e?this.container.style.width=t.formatUnit(e):"string"==typeof e&&(this.container.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.spinBtnCreation=function(){this.spinDown=e.Input.appendSpan($+" e-spin-down",this.container,this.createElement),t.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle")}),this.spinUp=e.Input.appendSpan($+" e-spin-up",this.container,this.createElement),t.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},s.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),this.min!==-Number.MAX_VALUE&&t.attributes(this.element,{"aria-valuemin":this.min.toString()}),this.max!==Number.MAX_VALUE&&t.attributes(this.element,{"aria-valuemax":this.max.toString()})},s.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},s.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},s.prototype.action=function(e,t){this.isInteract=!0;var i=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(i,this.step,e)),this.raiseChangeEvent(t)},s.prototype.checkErrorClass=function(){this.isValidState?t.removeClass([this.container],"e-error"):t.addClass([this.container],"e-error"),t.attributes(this.element,{"aria-invalid":this.isValidState?"false":"true"})},s.prototype.bindClearEvent=function(){this.showClearButton&&t.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},s.prototype.resetHandler=function(e){e.preventDefault(),this.inputWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputWrapper.container.classList.contains("e-static-clear")||this.clear(e),this.isInteract=!0,this.raiseChangeEvent(e)},s.prototype.clear=function(e){if(this.prevValue=this.instance.getNumberParser({format:"n"})(this.element.value),this.setProperties({value:null},!0),this.setElementValue(""),this.hiddenInput.value="",t.closest(this.element,"form")){var i=this.element.nextElementSibling,s=document.createEvent("KeyboardEvent");s.initEvent("keyup",!1,!0),i.dispatchEvent(s)}},s.prototype.resetFormHandler=function(){"EJS-NUMERICTEXTBOX"===this.element.tagName?this.updateValue(null):this.updateValue(this.inputEleValue)},s.prototype.setSpinButton=function(){t.isNullOrUndefined(this.spinDown)||t.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),t.isNullOrUndefined(this.spinUp)||t.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")})},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"blur",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),t.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),t.EventHandler.add(this.element,"input",this.inputHandler,this),t.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),t.EventHandler.add(this.element,"change",this.changeHandler,this),t.EventHandler.add(this.element,"paste",this.pasteHandler,this),this.enabled&&(this.bindClearEvent(),this.formEle&&t.EventHandler.add(this.formEle,"reset",this.resetFormHandler,this))},s.prototype.wireSpinBtnEvents=function(){t.EventHandler.add(this.spinUp,t.Browser.touchStartEvent,this.mouseDownOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchStartEvent,this.mouseDownOnSpinner,this),t.EventHandler.add(this.spinUp,t.Browser.touchEndEvent,this.mouseUpOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchEndEvent,this.mouseUpOnSpinner,this),t.EventHandler.add(this.spinUp,t.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),t.EventHandler.add(this.spinDown,t.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},s.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"blur",this.focusOutHandler),t.EventHandler.remove(this.element,"keyup",this.keyUpHandler),t.EventHandler.remove(this.element,"input",this.inputHandler),t.EventHandler.remove(this.element,"keydown",this.keyDownHandler),t.EventHandler.remove(this.element,"keypress",this.keyPressHandler),t.EventHandler.remove(this.element,"change",this.changeHandler),t.EventHandler.remove(this.element,"paste",this.pasteHandler),this.formEle&&t.EventHandler.remove(this.formEle,"reset",this.resetFormHandler)},s.prototype.unwireSpinBtnEvents=function(){t.EventHandler.remove(this.spinUp,t.Browser.touchStartEvent,this.mouseDownOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchStartEvent,this.mouseDownOnSpinner),t.EventHandler.remove(this.spinUp,t.Browser.touchEndEvent,this.mouseUpOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchEndEvent,this.mouseUpOnSpinner),t.EventHandler.remove(this.spinUp,t.Browser.touchMoveEvent,this.touchMoveOnSpinner),t.EventHandler.remove(this.spinDown,t.Browser.touchMoveEvent,this.touchMoveOnSpinner)},s.prototype.updatePrependTemplate=function(){this.removePrependTemplate(),this.createPrependTemplate()},s.prototype.updateAppendTemplate=function(){this.removeAppendTemplate(),this.createAppendTemplate()},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.createPrependTemplate=function(){if(!t.isNullOrUndefined(this.prependTemplate)){var e=this.container;this.prependedElement=this.createElement("div",{className:"e-prepend-template"}),this.iconTemplateFunction=this.templateComplier(this.prependTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.prependedElement);if(i){var s=[].slice.call(i);t.append(s,this.prependedElement)}var n=e.querySelector("input");e.classList.add("e-prepend-wrapper"),n?e.insertBefore(this.prependedElement,n):e.insertBefore(this.prependedElement,e.firstChild),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.createAppendTemplate=function(){if(!t.isNullOrUndefined(this.appendTemplate)){var e=this.container;this.appendedElement=this.createElement("div",{className:"e-append-template"}),this.iconTemplateFunction=this.templateComplier(this.appendTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.appendedElement);if(i){var s=[].slice.call(i);t.append(s,this.appendedElement)}e.classList.add("e-append-wrapper");var n=e.querySelector(".e-spin-down");this.showSpinButton&&n?e.insertBefore(this.appendedElement,n):e.appendChild(this.appendedElement),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.handleFloatLabel=function(){var e=this.container.querySelector(".e-float-text");e&&"Auto"===this.floatLabelType&&setTimeout(function(){e&&this.prependedElement&&!this.enableRtl?(e.style.marginLeft=this.prependedElement.offsetWidth+"px",e.style.marginRight="0"):e&&this.prependedElement&&this.enableRtl&&(e.style.marginRight=this.prependedElement.offsetWidth+"px",e.style.marginLeft="0"),e&&e.classList.contains("e-label-bottom")&&(e.style.width=this.element.offsetWidth+"px")}.bind(this),5)},s.prototype.removePrependTemplate=function(){t.isNullOrUndefined(this.prependedElement)||(t.detach(this.prependedElement),this.prependedElement=null)},s.prototype.removeAppendTemplate=function(){t.isNullOrUndefined(this.appendedElement)||(t.detach(this.appendedElement),this.appendedElement=null)},s.prototype.changeHandler=function(e){e.stopPropagation(),this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},s.prototype.raiseChangeEvent=function(e){if(this.inputValue=t.isNullOrUndefined(this.inputValue)||isNaN(this.inputValue)?null:this.inputValue,this.prevValue!==this.value||this.prevValue!==this.inputValue){var i={};this.changeEventArgs={value:this.value,previousValue:this.prevValue,isInteracted:this.isInteract,isInteraction:this.isInteract,event:e},e&&(this.changeEventArgs.event=e),void 0===this.changeEventArgs.event&&(this.changeEventArgs.isInteracted=!1,this.changeEventArgs.isInteraction=!1),t.merge(i,this.changeEventArgs),this.prevValue=this.value,this.isInteract=!1,this.elementPrevValue=this.element.value,this.preventChange=!1,this.trigger("change",i)}},s.prototype.pasteHandler=function(){var e=this;if(this.enabled&&!this.readonly){var t=this.element.value;setTimeout(function(){e.numericRegex().test(e.element.value)||e.setElementValue(t)})}},s.prototype.preventHandler=function(){var e=this,i=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);setTimeout(function(){if(e.element.selectionStart>0){var s=e.element.selectionStart,n=e.element.selectionStart-1,a=e.element.value.split(""),r=t.getNumericObject(e.locale),l=t.getValue("decimal",r),o=l.charCodeAt(0);" "===e.element.value[n]&&e.element.selectionStart>0&&!i?(t.isNullOrUndefined(e.prevVal)?e.element.value=e.element.value.trim():0!==n?e.element.value=e.prevVal:0===n&&(e.element.value=e.element.value.trim()),e.element.setSelectionRange(n,n)):isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&45!==e.element.value[e.element.selectionStart-1].charCodeAt(0)?(a.indexOf(e.element.value[e.element.selectionStart-1])!==a.lastIndexOf(e.element.value[e.element.selectionStart-1])&&e.element.value[e.element.selectionStart-1].charCodeAt(0)===o||e.element.value[e.element.selectionStart-1].charCodeAt(0)!==o)&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(s,e.element.value.length),e.element.setSelectionRange(n,n),isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&e.element.selectionStart>0&&e.element.value.length&&e.preventHandler()):isNaN(parseFloat(e.element.value[e.element.selectionStart-2]))&&e.element.selectionStart>1&&45!==e.element.value[e.element.selectionStart-2].charCodeAt(0)&&(a.indexOf(e.element.value[e.element.selectionStart-2])!==a.lastIndexOf(e.element.value[e.element.selectionStart-2])&&e.element.value[e.element.selectionStart-2].charCodeAt(0)===o||e.element.value[e.element.selectionStart-2].charCodeAt(0)!==o)&&(e.element.setSelectionRange(n,n),e.nextEle=e.element.value[e.element.selectionStart],e.cursorPosChanged=!0,e.preventHandler()),!0===e.cursorPosChanged&&e.element.value[e.element.selectionStart]===e.nextEle&&isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&(e.element.setSelectionRange(e.element.selectionStart+1,e.element.selectionStart+1),e.cursorPosChanged=!1,e.nextEle=null),""===e.element.value.trim()&&e.element.setSelectionRange(0,0),e.element.selectionStart>0&&(45===e.element.value[e.element.selectionStart-1].charCodeAt(0)&&e.element.selectionStart>1&&(t.isNullOrUndefined(e.prevVal)||(e.element.value=e.prevVal),e.element.setSelectionRange(e.element.selectionStart,e.element.selectionStart)),e.element.value[e.element.selectionStart-1]===l&&0===e.decimals&&e.validateDecimalOnType&&(e.element.value=e.element.value.substring(0,n)+e.element.value.substring(s,e.element.value.length))),e.prevVal=e.element.value}})},s.prototype.keyUpHandler=function(){if(this.enabled&&!this.readonly){!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&t.Browser.isDevice&&this.preventHandler();var e=this.instance.getNumberParser({format:"n"})(this.element.value);if(e=null===e||isNaN(e)?null:e,this.hiddenInput.value=e||0===e?e.toString():null,t.closest(this.element,"form")){var i=this.element.nextElementSibling,s=document.createEvent("KeyboardEvent");s.initEvent("keyup",!1,!0),i.dispatchEvent(s)}}},s.prototype.inputHandler=function(e){var i=this;if(this.enabled&&!this.readonly){var s=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);if((navigator.userAgent.toLowerCase().indexOf("firefox")>-1||s)&&t.Browser.isDevice&&this.preventHandler(),this.isAngular&&this.element.value!==t.getValue("decimal",t.getNumericObject(this.locale))&&this.element.value!==t.getValue("minusSign",t.getNumericObject(this.locale))&&this.numericRegex().test(this.element.value)){var n=this.instance.getNumberParser({format:"n"})(this.element.value);n=isNaN(n)?null:n,i.localChange({value:n}),this.preventChange=!0}if(this.isVue){var a=this.instance.getNumberParser({format:"n"})(this.element.value),r=this.instance.getNumberParser({format:"n"})(this.elementPrevValue);(new RegExp("[^0-9]+$").test(this.element.value)||(-1!==this.elementPrevValue.indexOf(".")||-1!==this.elementPrevValue.indexOf("-"))&&"0"===this.element.value[this.element.value.length-1])&&(a=this.value);var l={event:e,value:null===a||isNaN(a)?null:a,previousValue:null===r||isNaN(r)?null:r};this.preventChange=!0,this.elementPrevValue=this.element.value,this.trigger("input",l)}}},s.prototype.keyDownHandler=function(e){if(!this.readonly)switch(e.keyCode){case 38:e.preventDefault(),this.action("increment",e);break;case 40:e.preventDefault(),this.action("decrement",e)}},s.prototype.performAction=function(e,t,i){(null===e||isNaN(e))&&(e=0);var s="increment"===i?e+t:e-t;return s=this.correctRounding(e,t,s),this.strictMode?this.trimValue(s):s},s.prototype.correctRounding=function(e,t,i){var s=new RegExp("[,.](.*)"),n=s.test(e.toString()),a=s.test(t.toString());if(n||a){var r=n?s.exec(e.toString())[0].length:0,l=a?s.exec(t.toString())[0].length:0,o=Math.max(r,l);return e=this.roundValue(i,o)}return i},s.prototype.roundValue=function(e,t){t=t||0;var i=Math.pow(10,t);return e*=i,e=Math.round(e)/i},s.prototype.updateValue=function(e,t){t&&(this.isInteract=!0),null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.inputValue=e,this.isVue&&this.element&&this.element.hasAttribute("modelvalue")&&this.isDynamicChange||this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.isDynamicChange||this.raiseChangeEvent(t)},s.prototype.updateCurrency=function(e,i){t.setValue(e,i,this.cultureInfo),this.updateValue(this.value)},s.prototype.changeValue=function(e){if(e||0===e){var t=this.getNumberOfDecimals(e);this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},s.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber(),i=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(i),t.attributes(this.element,{"aria-valuenow":e}),t.isNullOrUndefined(this.hiddenInput)||(this.hiddenInput.value=this.value.toString(),null!==this.value&&this.serverDecimalSeparator&&(this.hiddenInput.value=this.hiddenInput.value.replace(".",this.serverDecimalSeparator)))}else this.setElementValue(""),this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},s.prototype.setElementValue=function(t,i){e.Input.setValue(t,i||this.element,this.floatLabelType,this.showClearButton)},s.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},s.prototype.getNumberOfDecimals=function(e){var i,s=new RegExp("[eE][-+]?([0-9]+)"),n=e.toString();if(s.test(n))if(/[eE]/.test(n))"."===(n=e.toFixed(20).replace(/0+$/,"")).charAt(n.length-1)&&(n=n.slice(0,n.length-1));else{var a=s.exec(n);t.isNullOrUndefined(a)||(n=e.toFixed(Math.min(parseInt(a[1],10),20)))}var r=n.split(".")[1];return i=r&&r.length?r.length:0,null!==this.decimals&&(i=i<this.decimals?i:this.decimals),i},s.prototype.formatNumber=function(){var e=this.getNumberOfDecimals(this.value);return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},s.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},s.prototype.roundNumber=function(e,t){var i=e,s=t||0,n=i.toString().split("e"),a=(i=Math.round(Number(n[0]+"e"+(n[1]?Number(n[1])+s:s)))).toString().split("e");return i=Number(a[0]+"e"+(a[1]?Number(a[1])-s:-s)),Number(i.toFixed(s))},s.prototype.cancelEvent=function(e){return e.preventDefault(),!1},s.prototype.keyPressHandler=function(e){if(!this.enabled||this.readonly)return!0;if(!t.Browser.isDevice&&"11.0"===t.Browser.info.version&&13===e.keyCode){var i=this.instance.getNumberParser({format:"n"})(this.element.value);return this.updateValue(i,e),!0}if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var s=String.fromCharCode(e.which),n=t.getValue("decimal",t.getNumericObject(this.locale)),a="NumpadDecimal"===e.code&&s!==n;a&&(s=n);var r=this.element.value;if(r=r.substring(0,this.element.selectionStart)+s+r.substring(this.element.selectionEnd),this.numericRegex().test(r)){if(a){var l=this.element.selectionStart+1;this.element.value=r,this.element.setSelectionRange(l,l),e.preventDefault(),e.stopPropagation()}return!0}return e.preventDefault(),e.stopPropagation(),!1},s.prototype.numericRegex=function(){var e=t.getNumericObject(this.locale),i=t.getValue("decimal",e),s="*";return"."===i&&(i="\\"+i),0===this.decimals&&this.validateDecimalOnType?Q:(this.decimals&&this.validateDecimalOnType&&(s="{0,"+this.decimals+"}"),new RegExp("^\\s*(-)?(((\\d+("+i+"\\d"+s+")?)|("+i+"\\d"+s+")))?$"))},s.prototype.mouseWheel=function(e){if(this.allowMouseWheel){e.preventDefault();var t,i=e;i.wheelDelta?t=i.wheelDelta/120:i.detail&&(t=-i.detail/3),t>0?this.action("increment",e):t<0&&this.action("decrement",e),this.cancelEvent(e)}},s.prototype.focusHandler=function(e){var i=this;if(clearTimeout(te),this.focusEventArgs={event:e,value:this.value,container:this.container},this.trigger("focus",this.focusEventArgs),this.enabled&&!this.readonly){if(this.isFocused=!0,"Never"!==this.floatLabelType&&this.inputWrapper&&this.inputWrapper.container){var s=this.inputWrapper.container.querySelector(".e-float-text");s&&s.removeAttribute("style")}if(this.prevValue=this.value,this.value||0===this.value){var n=this.formatNumber();if(this.setElementValue(n),!this.isPrevFocused)if(t.Browser.isDevice||"11.0"!==t.Browser.info.version){var a=t.Browser.isDevice&&t.Browser.isIos?600:0;te=setTimeout(function(){i.element.setSelectionRange(0,n.length)},a)}else this.element.setSelectionRange(0,n.length)}!t.Browser.isDevice&&this.allowMouseWheel&&t.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this);var r=this.container.querySelector(".e-float-text");"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&r&&setTimeout(function(){r&&(r.style.width="auto")}.bind(this),5)}},s.prototype.focusOutHandler=function(e){var i=this;if(this.blurEventArgs={event:e,value:this.value,container:this.container},this.trigger("blur",this.blurEventArgs),this.enabled&&!this.readonly){if(this.isPrevFocused){if(e.preventDefault(),t.Browser.isDevice){var s=this.element.value;this.element.focus(),this.isPrevFocused=!1;var n=this.element;setTimeout(function(){i.setElementValue(s,n)},200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var a=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(a),t.Browser.isDevice||t.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}this.updateFloatLabelOverflowWidth();var r=this.container.querySelector(".e-float-text");if("Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&r&&setTimeout(function(){r&&this.prependedElement&&!this.enableRtl?r.style.marginLeft=this.prependedElement.offsetWidth+"px":r&&this.prependedElement&&this.enableRtl&&(r.style.marginRight=this.prependedElement.offsetWidth+"px"),r&&r.classList.contains("e-label-bottom")&&(r.style.width=this.element.offsetWidth+"px")}.bind(this),5),t.closest(this.element,"form")){var l=this.element.nextElementSibling,o=document.createEvent("FocusEvent");o.initEvent("focusout",!1,!0),l.dispatchEvent(o)}}},s.prototype.mouseDownOnSpinner=function(e){var i=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){this.getElementData(e);var s=e.currentTarget,n=s.classList.contains("e-spin-up")?"increment":"decrement";t.EventHandler.add(s,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval(function(){i.isCalled=!0,i.action(n,e)},150),t.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},s.prototype.touchMoveOnSpinner=function(e){var t;if("touchmove"===e.type){var i=e.touches;t=i.length&&document.elementFromPoint(i[0].pageX,i[0].pageY)}else t=document.elementFromPoint(e.clientX,e.clientY);t.classList.contains($)||clearInterval(this.timeOut)},s.prototype.mouseUpOnSpinner=function(e){if(this.prevValue=this.value,this.isPrevFocused&&(this.element.focus(),t.Browser.isDevice||(this.isPrevFocused=!1)),t.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var i=e.currentTarget,s=i.classList.contains("e-spin-up")?"increment":"decrement";if(t.EventHandler.remove(i,"mouseleave",this.mouseUpClick),this.isCalled||this.action(s,e),this.isCalled=!1,t.EventHandler.remove(document,"mouseup",this.mouseUpClick),t.closest(this.element,"form")){var n=this.element.nextElementSibling,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}}},s.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},s.prototype.floatLabelTypeUpdate=function(){e.Input.removeFloating(this.inputWrapper);var t=this.hiddenInput;this.hiddenInput.remove(),e.Input.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement),this.container.insertBefore(t,this.container.childNodes[1])},s.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,this.spinUp&&t.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),this.spinDown&&t.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},s.prototype.increment=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,"increment")),this.raiseChangeEvent()},s.prototype.decrement=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,"decrement")),this.raiseChangeEvent()},s.prototype.destroy=function(){this.unwireEvents(),this.removePrependTemplate(),this.removeAppendTemplate(),this.clearTemplate(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),t.detach(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),t.detach(this.spinUp),t.detach(this.spinDown));for(var s=["aria-labelledby","role","autocomplete","aria-readonly","aria-disabled","autocapitalize","spellcheck","aria-autocomplete","tabindex","aria-valuemin","aria-valuemax","aria-valuenow","aria-invalid"],n=0;n<s.length;n++)this.element.removeAttribute(s[n]);this.element.classList.remove("e-input"),this.container.insertAdjacentElement("afterend",this.element),t.detach(this.container),this.spinUp=null,this.spinDown=null,this.container=null,this.hiddenInput=null,this.changeEventArgs=null,this.blurEventArgs=null,this.focusEventArgs=null,this.inputWrapper=null,e.Input.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),i.prototype.destroy.call(this)},s.prototype.getText=function(){return this.element.value},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),t.addClass([this.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),t.removeClass([this.container],["e-input-focus"]))},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.onPropertyChanged=function(i,s){for(var n=0,a=Object.keys(i);n<a.length;n++){var r=a[n];switch(r){case"width":this.setElementWidth(i.width),e.Input.calculateWidth(this.element,this.container);break;case"cssClass":this.updateCssClass(i.cssClass,s.cssClass);break;case"enabled":e.Input.setEnabled(i.enabled,this.element),this.bindClearEvent();break;case"enableRtl":e.Input.setEnableRtl(i.enableRtl,[this.container]),this.handleFloatLabel();break;case"readonly":e.Input.setReadonly(i.readonly,this.element),this.readonly?t.attributes(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.updateDataAttribute(!0),this.checkAttributes(!0),e.Input.validateInputType(this.container,this.element);break;case"placeholder":e.Input.setPlaceholder(i.placeholder,this.element),e.Input.calculateWidth(this.element,this.container);break;case"step":this.step=i.step,this.validateStep();break;case"showSpinButton":this.updateSpinButton(i);break;case"showClearButton":this.updateClearButton(i);break;case"floatLabelType":this.floatLabelType=i.floatLabelType,this.floatLabelTypeUpdate();break;case"value":this.isDynamicChange=(this.isAngular||this.isVue)&&this.preventChange,this.updateValue(i.value),this.isDynamicChange&&(this.preventChange=!1,this.isDynamicChange=!1);break;case"min":case"max":t.setValue(r,t.getValue(r,i),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=i.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.setSpinButton(),this.updatePlaceholder(),e.Input.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":var l=t.getValue(r,i);this.setProperties({currencyCode:l},!0),this.updateCurrency(r,l);break;case"currencyCode":var o=t.getValue(r,i);this.setProperties({currency:o},!0),this.updateCurrency("currency",o);break;case"format":t.setValue(r,t.getValue(r,i),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=i.decimals,this.updateValue(this.value);break;case"allowMouseWheel":this.allowMouseWheel&&this.isFocused&&t.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this);break;case"prependTemplate":this.updatePrependTemplate();break;case"appendTemplate":this.updateAppendTemplate()}}},s.prototype.updateClearButton=function(t){e.Input.setClearButton(t.showClearButton,this.element,this.inputWrapper,void 0,this.createElement),this.bindClearEvent()},s.prototype.updateSpinButton=function(e){e.showSpinButton?this.spinBtnCreation():(t.detach(this.spinUp),t.detach(this.spinDown))},s.prototype.getRightIconsWidth=function(){for(var e=0,t=this.inputWrapper.container.querySelectorAll(".e-input-group-icon, .e-clear-icon"),i=0;i<t.length;i++)e+=t[i].offsetWidth;return e},s.prototype.updateFloatLabelOverflowWidth=function(){var e=this.inputWrapper.container,t=e.querySelector(".e-float-text-overflow")||e.querySelector(".e-float-text"),i=e.clientWidth-this.getRightIconsWidth();!t||!i||this.cssClass&&-1!==this.cssClass.split(" ").indexOf("e-outline")||(t.style.width=i+"px")},s.prototype.getModuleName=function(){return"numerictextbox"},J([t.Property("")],s.prototype,"cssClass",void 0),J([t.Property(null)],s.prototype,"value",void 0),J([t.Property(-Number.MAX_VALUE)],s.prototype,"min",void 0),J([t.Property(Number.MAX_VALUE)],s.prototype,"max",void 0),J([t.Property(1)],s.prototype,"step",void 0),J([t.Property(null)],s.prototype,"width",void 0),J([t.Property(null)],s.prototype,"placeholder",void 0),J([t.Property({})],s.prototype,"htmlAttributes",void 0),J([t.Property(!0)],s.prototype,"showSpinButton",void 0),J([t.Property(!1)],s.prototype,"readonly",void 0),J([t.Property(!0)],s.prototype,"enabled",void 0),J([t.Property(!1)],s.prototype,"showClearButton",void 0),J([t.Property(!1)],s.prototype,"enablePersistence",void 0),J([t.Property("n2")],s.prototype,"format",void 0),J([t.Property(null)],s.prototype,"decimals",void 0),J([t.Property(null)],s.prototype,"currency",void 0),J([t.Property(null)],s.prototype,"currencyCode",void 0),J([t.Property(!0)],s.prototype,"strictMode",void 0),J([t.Property(!1)],s.prototype,"validateDecimalOnType",void 0),J([t.Property(!0)],s.prototype,"allowMouseWheel",void 0),J([t.Property("Never")],s.prototype,"floatLabelType",void 0),J([t.Property(null)],s.prototype,"prependTemplate",void 0),J([t.Property(null)],s.prototype,"appendTemplate",void 0),J([t.Event()],s.prototype,"created",void 0),J([t.Event()],s.prototype,"destroyed",void 0),J([t.Event()],s.prototype,"change",void 0),J([t.Event()],s.prototype,"focus",void 0),J([t.Event()],s.prototype,"blur",void 0),s=J([t.NotifyPropertyChanges],s)}(t.Component),se="e-error",ne="e-input-group",ae="e-float-input",re="e-utility-mask",le="e-label-top",oe="e-label-bottom",he={0:"[0-9]",9:"[0-9 ]","#":"[0-9 +-]",L:"[A-Za-z]","?":"[A-Za-z ]","&":"[^ ]+",C:"[^]+",A:"[A-Za-z0-9]",a:"[A-Za-z0-9 ]"},pe=function(){function e(){}return e}(),de=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ue=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ce=["title","style","class"],me=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.initInputValue="",s.preventChange=!1,s.isClicked=!1,s.maskOptions=e,s}return de(s,i),s.prototype.getModuleName=function(){return"maskedtextbox"},s.prototype.preRender=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.regExpCollec=he,this.customRegExpCollec=[],this.maskedRegExp=[],this.undoCollec=[],this.redoCollec=[],this.changeEventArgs={},this.focusEventArgs={},this.blurEventArgs={},this.maskKeyPress=!1,this.isFocus=!1,this.isInitial=!1,this.isIosInvalid=!1;var e=t.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),t.removeClass([this.cloneElement],["e-control","e-maskedtextbox","e-lib"]),this.angularTagName=null,this.formElement=t.closest(this.element,"form"),"EJS-MASKEDTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;for(var i=this.createElement("input"),s=0;s<this.element.attributes.length;s++)i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML;this.element.hasAttribute("id")&&this.element.removeAttribute("id"),this.element.hasAttribute("name")&&this.element.removeAttribute("name"),this.element.classList.remove("e-control","e-maskedtextbox"),this.element.classList.add("e-mask-container"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}this.updateHTMLAttrToElement(),this.checkHtmlAttributes(!1),this.formElement&&(this.initInputValue=this.value)},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&("Never"===this.floatLabelType&&t.addClass([this.element],"e-input"),this.createWrapper(),this.updateHTMLAttrToWrapper(),""===this.element.name&&this.element.setAttribute("name",this.element.id),this.isInitial=!0,this.resetMaskedTextBox(),this.isInitial=!1,this.setMaskPlaceholder(!0,!1),this.setWidth(this.width),this.preEleVal=this.element.value,t.Browser.isDevice||"11.0"!==t.Browser.info.version&&"edge"!==t.Browser.info.name||this.element.blur(),t.Browser.isDevice&&t.Browser.isIos&&this.element.blur(),(this.element.getAttribute("value")||this.value)&&this.element.setAttribute("value",this.element.value),!t.isNullOrUndefined(t.closest(this.element,"fieldset"))&&t.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.hasAttribute("aria-label")||this.element.setAttribute("aria-label","maskedtextbox"),this.updateFloatLabelOverflowWidth(),this.createPrependTemplate(),this.createAppendTemplate(),this.renderComplete())},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];ce.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateCssClass=function(t,i){e.Input.setCssClass(this.getValidClassList(t),[this.inputObj.container],this.getValidClassList(i))},s.prototype.getValidClassList=function(e){var i=e;return t.isNullOrUndefined(e)||""===e||(i=e.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(ce.indexOf(s)>-1)if("class"===s){var n=this.htmlAttributes[""+s].replace(/\s+/g," ").trim();""!==n&&t.addClass([this.inputObj.container],n.split(" "))}else if("style"===s){var a=this.inputObj.container.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[""+s]:a+this.htmlAttributes[""+s],this.inputObj.container.setAttribute(s,a)}else this.inputObj.container.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.resetMaskedTextBox=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.promptChar&&this.promptChar.length>1&&(this.promptChar=this.promptChar[0]),a.call(this),r.call(this),(null===this.mask||""===this.mask&&void 0!==this.value)&&z.call(this,this.value);var e=m.call(this,this.element);this.prevValue=e,this.value=e,this.isInitial||o.call(this),l.call(this)},s.prototype.setMaskPlaceholder=function(t,i){(i||this.placeholder)&&(e.Input.setPlaceholder(this.placeholder,this.element),(this.element.value===this.promptMask&&t&&"Always"!==this.floatLabelType||this.element.value===this.promptMask&&"Never"===this.floatLabelType)&&z.call(this,""))},s.prototype.setWidth=function(e){if(!t.isNullOrUndefined(e))if("number"==typeof e)this.inputObj.container.style.width=t.formatUnit(e),this.element.style.width=t.formatUnit(e);else if("string"==typeof e){var i=e.match(/px|%|em/)?e:t.formatUnit(e);this.inputObj.container.style.width=i,this.element.style.width=i}},s.prototype.checkHtmlAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"placeholder":(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"disabled":if(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"value":(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.value||e)&&this.setProperties({value:this.element.value},!e);break;case"readonly":if(t.isNullOrUndefined(this.maskOptions)||void 0===this.maskOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}}}},s.prototype.createWrapper=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=this.getValidClassList(this.cssClass)),this.inputObj=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{enableRtl:this.enableRtl,cssClass:i,enabled:this.enabled,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}},this.createElement),this.inputObj.container.setAttribute("class","e-control-wrapper e-mask "+this.inputObj.container.getAttribute("class"))},s.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++)switch(n[s]){case"value":W.call(this,this.value),this.placeholder&&!this.isFocus&&this.setMaskPlaceholder(!1,!1),""===this.value&&null!=i.value&&(this.element.selectionStart=0,this.element.selectionEnd=0);break;case"placeholder":this.setMaskPlaceholder(!0,!0);break;case"width":this.setWidth(t.width),e.Input.calculateWidth(this.element,this.inputObj.container);break;case"cssClass":this.updateCssClass(t.cssClass,i.cssClass);break;case"enabled":e.Input.setEnabled(t.enabled,this.element,this.floatLabelType,this.inputObj.container);break;case"readonly":e.Input.setReadonly(t.readonly,this.element);break;case"enableRtl":e.Input.setEnableRtl(t.enableRtl,[this.inputObj.container]),this.handleFloatLabel();break;case"customCharacters":this.customCharacters=t.customCharacters,this.resetMaskedTextBox();break;case"showClearButton":e.Input.setClearButton(t.showClearButton,this.element,this.inputObj,void 0,this.createElement),h.call(this);break;case"floatLabelType":this.floatLabelType=t.floatLabelType,e.Input.removeFloating(this.inputObj),e.Input.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement);break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHtmlAttributes(!0);break;case"prependTemplate":this.updatePrependTemplate();break;case"appendTemplate":this.updateAppendTemplate();break;case"mask":var a=this.value;this.mask=t.mask,this.maskedRegExp=[],this.updateValue(a);break;case"promptChar":t.promptChar.length>1&&(t.promptChar=t.promptChar[0]),t.promptChar?this.promptChar=t.promptChar:this.promptChar="_";var r=this.element.value.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar);this.promptMask===this.element.value&&(r=this.promptMask.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar)),this.promptMask=this.promptMask.replace(new RegExp("["+i.promptChar+"]","g"),this.promptChar),this.undoCollec=this.redoCollec=[],z.call(this,r)}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange},s.prototype.updatePrependTemplate=function(){this.removePrependTemplate(),this.createPrependTemplate()},s.prototype.updateAppendTemplate=function(){this.removeAppendTemplate(),this.createAppendTemplate()},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.createPrependTemplate=function(){if(!t.isNullOrUndefined(this.prependTemplate)){var e=this.inputObj.container;this.prependedElement=this.createElement("div",{className:"e-prepend-template"}),this.iconTemplateFunction=this.templateComplier(this.prependTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.prependedElement);if(i){var s=[].slice.call(i);t.append(s,this.prependedElement)}var n=e.querySelector("input");e.classList.add("e-prepend-wrapper"),n?e.insertBefore(this.prependedElement,n):e.insertBefore(this.prependedElement,e.firstChild),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.createAppendTemplate=function(){if(!t.isNullOrUndefined(this.appendTemplate)){var e=this.inputObj.container;this.appendedElement=this.createElement("div",{className:"e-append-template"}),this.iconTemplateFunction=this.templateComplier(this.appendTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.appendedElement);if(i){var s=[].slice.call(i);t.append(s,this.appendedElement)}e.classList.add("e-append-wrapper"),e.appendChild(this.appendedElement),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.handleFloatLabel=function(){var e=this.inputObj.container.querySelector(".e-float-text");e&&"Auto"===this.floatLabelType&&setTimeout(function(){e&&this.prependedElement&&!this.enableRtl?(e.style.marginLeft=this.prependedElement.offsetWidth+"px",e.style.marginRight="0"):e&&this.prependedElement&&this.enableRtl&&(e.style.marginRight=this.prependedElement.offsetWidth+"px",e.style.marginLeft="0"),e&&e.classList.contains("e-label-bottom")&&(e.style.width=this.element.offsetWidth+"px")}.bind(this),5)},s.prototype.removePrependTemplate=function(){t.isNullOrUndefined(this.prependedElement)||(t.detach(this.prependedElement),this.prependedElement=null)},s.prototype.removeAppendTemplate=function(){t.isNullOrUndefined(this.appendedElement)||(t.detach(this.appendedElement),this.appendedElement=null)},s.prototype.updateValue=function(e){this.resetMaskedTextBox(),W.call(this,e)},s.prototype.getMaskedValue=function(){return c.call(this,this.element)},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.isFocus=!0,this.element.focus(),t.addClass([this.inputObj.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.isFocus=!1,this.element.blur(),t.removeClass([this.inputObj.container],["e-input-focus"]))},s.prototype.getRightIconsWidth=function(){for(var e=0,t=this.inputObj.container.querySelectorAll(".e-input-group-icon, .e-clear-icon"),i=0;i<t.length;i++)e+=t[i].offsetWidth;return e},s.prototype.updateFloatLabelOverflowWidth=function(){var e=this.inputObj.container,t=e.querySelector(".e-float-text-overflow")||e.querySelector(".e-float-text"),i=e.clientWidth-this.getRightIconsWidth();!t||!i||this.cssClass&&-1!==this.cssClass.split(" ").indexOf("e-outline")||(t.style.width=i+"px")},s.prototype.destroy=function(){o.call(this),this.removePrependTemplate(),this.removeAppendTemplate(),this.clearTemplate(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]);for(var s=["aria-labelledby","role","autocomplete","aria-readonly","aria-disabled","autocapitalize","spellcheck","aria-autocomplete","aria-live","aria-invalid"],n=0;n<s.length;n++)this.element.removeAttribute(s[n]);this.element.classList.remove("e-input"),this.inputObj&&(this.inputObj.container.insertAdjacentElement("afterend",this.element),t.detach(this.inputObj.container)),this.blurEventArgs=null,e.Input.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),this.changeEventArgs=null,this.inputObj=null,i.prototype.destroy.call(this)},ue([t.Property(null)],s.prototype,"cssClass",void 0),ue([t.Property(null)],s.prototype,"width",void 0),ue([t.Property(null)],s.prototype,"placeholder",void 0),ue([t.Property("Never")],s.prototype,"floatLabelType",void 0),ue([t.Property({})],s.prototype,"htmlAttributes",void 0),ue([t.Property(!0)],s.prototype,"enabled",void 0),ue([t.Property(!1)],s.prototype,"readonly",void 0),ue([t.Property(!1)],s.prototype,"showClearButton",void 0),ue([t.Property(!1)],s.prototype,"enablePersistence",void 0),ue([t.Property(null)],s.prototype,"mask",void 0),ue([t.Property("_")],s.prototype,"promptChar",void 0),ue([t.Property(null)],s.prototype,"value",void 0),ue([t.Property(null)],s.prototype,"customCharacters",void 0),ue([t.Property(null)],s.prototype,"prependTemplate",void 0),ue([t.Property(null)],s.prototype,"appendTemplate",void 0),ue([t.Event()],s.prototype,"created",void 0),ue([t.Event()],s.prototype,"destroyed",void 0),ue([t.Event()],s.prototype,"change",void 0),ue([t.Event()],s.prototype,"focus",void 0),ue([t.Event()],s.prototype,"blur",void 0),s=ue([t.NotifyPropertyChanges],s)}(t.Component),fe=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)}}(),ve=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ge=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return fe(i,e),ve([t.Property("None")],i.prototype,"placement",void 0),ve([t.Property(10)],i.prototype,"largeStep",void 0),ve([t.Property(1)],i.prototype,"smallStep",void 0),ve([t.Property(!1)],i.prototype,"showSmallTicks",void 0),ve([t.Property(null)],i.prototype,"format",void 0),i}(t.ChildProperty),ye=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return fe(i,e),ve([t.Property(null)],i.prototype,"color",void 0),ve([t.Property(null)],i.prototype,"start",void 0),ve([t.Property(null)],i.prototype,"end",void 0),i}(t.ChildProperty),be=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return fe(i,e),ve([t.Property(!1)],i.prototype,"enabled",void 0),ve([t.Property(null)],i.prototype,"minStart",void 0),ve([t.Property(null)],i.prototype,"minEnd",void 0),ve([t.Property(null)],i.prototype,"maxStart",void 0),ve([t.Property(null)],i.prototype,"maxEnd",void 0),ve([t.Property(!1)],i.prototype,"startHandleFixed",void 0),ve([t.Property(!1)],i.prototype,"endHandleFixed",void 0),i}(t.ChildProperty),Ce=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return fe(i,e),ve([t.Property("")],i.prototype,"cssClass",void 0),ve([t.Property("Before")],i.prototype,"placement",void 0),ve([t.Property("Focus")],i.prototype,"showOn",void 0),ve([t.Property(!1)],i.prototype,"isVisible",void 0),ve([t.Property(null)],i.prototype,"format",void 0),i}(t.ChildProperty),Ee={root:"e-slider",rtl:"e-rtl",sliderHiddenInput:"e-slider-input",controlWrapper:"e-control-wrapper",sliderHandle:"e-handle",rangeBar:"e-range",sliderButton:"e-slider-button",firstButton:"e-first-button",secondButton:"e-second-button",scale:"e-scale",tick:"e-tick",large:"e-large",tickValue:"e-tick-value",sliderTooltip:"e-slider-tooltip",sliderHover:"e-slider-hover",sliderFirstHandle:"e-handle-first",sliderSecondHandle:"e-handle-second",sliderDisabled:"e-disabled",sliderContainer:"e-slider-container",horizontalTooltipBefore:"e-slider-horizontal-before",horizontalTooltipAfter:"e-slider-horizontal-after",verticalTooltipBefore:"e-slider-vertical-before",verticalTooltipAfter:"e-slider-vertical-after",materialTooltip:"e-material-tooltip",materialTooltipOpen:"e-material-tooltip-open",materialTooltipActive:"e-tooltip-active",materialSlider:"e-material-slider",sliderTrack:"e-slider-track",sliderHorizantalColor:"e-slider-horizantal-color",sliderVerticalColor:"e-slider-vertical-color",sliderHandleFocused:"e-handle-focused",verticalSlider:"e-vertical",horizontalSlider:"e-horizontal",sliderHandleStart:"e-handle-start",sliderTooltipStart:"e-material-tooltip-start",sliderTabHandle:"e-tab-handle",sliderButtonIcon:"e-button-icon",sliderSmallSize:"e-small-size",sliderTickPosition:"e-tick-pos",sliderFirstTick:"e-first-tick",sliderLastTick:"e-last-tick",sliderButtonClass:"e-slider-btn",sliderTooltipWrapper:"e-tooltip-wrap",sliderTabTrack:"e-tab-track",sliderTabRange:"e-tab-range",sliderActiveHandle:"e-handle-active",sliderMaterialHandle:"e-material-handle",sliderMaterialRange:"e-material-range",sliderMaterialDefault:"e-material-default",materialTooltipShow:"e-material-tooltip-show",materialTooltipHide:"e-material-tooltip-hide",readonly:"e-read-only",limits:"e-limits",limitBarDefault:"e-limit-bar",limitBarFirst:"e-limit-first",limitBarSecond:"e-limit-second",dragHorizontal:"e-drag-horizontal",dragVertical:"e-drag-vertical"},xe=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.horDir="left",s.verDir="bottom",s.transition={handle:"left .4s cubic-bezier(.25, .8, .25, 1), right .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1) , bottom .4s cubic-bezier(.25, .8, .25, 1)",rangeBar:"all .4s cubic-bezier(.25, .8, .25, 1)"},s.transitionOnMaterialTooltip={handle:"left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, top 1ms ease-out",rangeBar:"left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, width 1ms ease-out, height 1ms ease-out"},s.scaleTransform="transform .4s cubic-bezier(.25, .8, .25, 1)",s.customAriaText=null,s.drag=!0,s.isDragComplete=!1,s.initialTooltip=!0,s}return fe(s,e),s.prototype.preRender=function(){var e={incrementTitle:"Increase",decrementTitle:"Decrease"};this.l10n=new t.L10n("slider",e,this.locale),this.isElementFocused=!1,this.tickElementCollection=[],this.tooltipFormatInfo={},this.ticksFormatInfo={},this.initCultureInfo(),this.initCultureFunc(),this.formChecker()},s.prototype.formChecker=function(){var e=t.closest(this.element,"form");e?(this.isForm=!0,t.isNullOrUndefined(this.formResetValue)||this.setProperties({value:this.formResetValue},!0),this.formResetValue=this.value,"Range"!==this.type||!t.isNullOrUndefined(this.formResetValue)&&"object"==typeof this.formResetValue?t.isNullOrUndefined(this.formResetValue)&&(this.formResetValue=parseFloat(t.formatUnit(this.min))):this.formResetValue=[parseFloat(t.formatUnit(this.min)),parseFloat(t.formatUnit(this.max))],this.formElement=e):this.isForm=!1},s.prototype.initCultureFunc=function(){this.internationalization=new t.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.tooltipFormatInfo.format=t.isNullOrUndefined(this.tooltip.format)?null:this.tooltip.format,this.ticksFormatInfo.format=t.isNullOrUndefined(this.ticks.format)?null:this.ticks.format},s.prototype.formatString=function(e,t){var i=null,s=null;if(e||0===e){i=this.formatNumber(e);var n=this.numberOfDecimals(e);s=this.internationalization.getNumberFormat(t)(this.makeRoundNumber(e,n))}return{elementVal:i,formatString:s}},s.prototype.formatNumber=function(e){var t=this.numberOfDecimals(e);return this.internationalization.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(e)},s.prototype.numberOfDecimals=function(e){var t=e.toString().split(".")[1];return t&&t.length?t.length:0},s.prototype.makeRoundNumber=function(e,t){var i=t||0;return Number(e.toFixed(i))},s.prototype.render=function(){var e=this;this.initialize(),this.initRender(),this.wireEvents(),this.setZindex(),this.renderComplete(),"EJS-SLIDER"===this.element.tagName&&"none"===this.getTheme(this.sliderContainer)&&setTimeout(function(){e.refresh()},0)},s.prototype.initialize=function(){t.addClass([this.element],Ee.root),this.setCSSClass()},s.prototype.setElementWidth=function(e){t.isNullOrUndefined(e)||t.isNullOrUndefined(this.sliderContainer)||("number"==typeof e?this.sliderContainer.style.width=t.formatUnit(e):"string"==typeof e&&(this.sliderContainer.style.width=e.match(/px|%|em/)?e:t.formatUnit(e)))},s.prototype.setCSSClass=function(e){e&&t.removeClass([this.element],e.split(" ")),this.cssClass&&t.addClass([this.element],this.cssClass.split(" "))},s.prototype.setEnabled=function(){this.enabled?(t.removeClass([this.sliderContainer],[Ee.sliderDisabled]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.remove(Ee.sliderDisabled),this.wireEvents()):(t.addClass([this.sliderContainer],[Ee.sliderDisabled]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.add(Ee.sliderDisabled),this.unwireEvents())},s.prototype.getTheme=function(e){return window.getComputedStyle(e,":after").getPropertyValue("content").replace(/['"]+/g,"")},s.prototype.secureRandom=function(){var e=new Uint32Array(1);return window.crypto.getRandomValues(e),e[0]/4294967296},s.prototype.initRender=function(){this.sliderContainer=this.createElement("div",{className:Ee.sliderContainer+" "+Ee.controlWrapper}),this.element.parentNode.insertBefore(this.sliderContainer,this.element),this.sliderContainer.appendChild(this.element),this.sliderTrack=this.createElement("div",{className:Ee.sliderTrack}),this.element.appendChild(this.sliderTrack),this.setElementWidth(this.width),this.element.tabIndex=-1,this.getThemeInitialization(),this.setHandler(),this.createRangeBar(),this.limits.enabled&&this.createLimitBar(),this.setOrientClass(),this.hiddenInput=this.createElement("input",{attrs:{type:"hidden",value:t.isNullOrUndefined(this.value)?t.isNullOrUndefined(this.min)?"0":this.min.toString():this.value.toString(),name:this.element.getAttribute("name")||this.element.getAttribute("id")||"_"+(1e3*this.secureRandom()).toFixed(0)+"slider",class:Ee.sliderHiddenInput}}),this.hiddenInput.tabIndex=-1,this.sliderContainer.appendChild(this.hiddenInput),this.showButtons&&this.setButtons(),this.setEnableRTL(),"Range"===this.type?this.rangeValueUpdate():this.value=t.isNullOrUndefined(this.value)?t.isNullOrUndefined(this.min)?0:parseFloat(t.formatUnit(this.min.toString())):this.value,this.previousVal="Range"!==this.type?this.checkHandleValue(parseFloat(t.formatUnit(this.value.toString()))):[this.checkHandleValue(parseFloat(t.formatUnit(this.value[0].toString()))),this.checkHandleValue(parseFloat(t.formatUnit(this.value[1].toString())))],this.previousChanged=this.previousVal,t.isNullOrUndefined(this.element.hasAttribute("name"))||this.element.removeAttribute("name"),this.setValue(),this.limits.enabled&&this.setLimitBar(),"None"!==this.ticks.placement&&this.renderScale(),this.tooltip.isVisible&&this.renderTooltip(),this.enabled?t.removeClass([this.sliderContainer],[Ee.sliderDisabled]):t.addClass([this.sliderContainer],[Ee.sliderDisabled]),this.readonly?t.addClass([this.sliderContainer],[Ee.readonly]):t.removeClass([this.sliderContainer],[Ee.readonly])},s.prototype.getThemeInitialization=function(){this.isMaterial="material"===this.getTheme(this.sliderContainer)||"material-dark"===this.getTheme(this.sliderContainer),this.isMaterial3="Material3"===this.getTheme(this.sliderContainer)||"Material3-dark"===this.getTheme(this.sliderContainer),this.isBootstrap="bootstrap"===this.getTheme(this.sliderContainer)||"bootstrap-dark"===this.getTheme(this.sliderContainer),this.isBootstrap4="bootstrap4"===this.getTheme(this.sliderContainer),this.isTailwind="tailwind"===this.getTheme(this.sliderContainer)||"tailwind-dark"===this.getTheme(this.sliderContainer),this.isTailwind3="tailwind3"===this.getTheme(this.sliderContainer)||"tailwind3-dark"===this.getTheme(this.sliderContainer),this.isBootstrap5="bootstrap5"===this.getTheme(this.sliderContainer),this.isFluent="FluentUI"===this.getTheme(this.sliderContainer),this.isFluent2="fluent2"===this.getTheme(this.sliderContainer),this.isBootstrap5Dot3="bootstrap5.3"===this.getTheme(this.sliderContainer),this.isMaterialTooltip=(this.isMaterial||this.isMaterial3)&&"Range"!==this.type&&this.tooltip.isVisible},s.prototype.createRangeBar=function(){"Default"!==this.type&&(this.rangeBar=this.createElement("div",{attrs:{class:Ee.rangeBar}}),this.element.appendChild(this.rangeBar),this.drag&&"Range"===this.type&&("Horizontal"===this.orientation?this.rangeBar.classList.add(Ee.dragHorizontal):this.rangeBar.classList.add(Ee.dragVertical)))},s.prototype.createLimitBar=function(){var e="Range"!==this.type?Ee.limitBarDefault:Ee.limitBarFirst;e+=" "+Ee.limits,this.limitBarFirst=this.createElement("div",{attrs:{class:e}}),this.element.appendChild(this.limitBarFirst),"Range"===this.type&&(this.limitBarSecond=this.createElement("div",{attrs:{class:Ee.limitBarSecond+" "+Ee.limits}}),this.element.appendChild(this.limitBarSecond))},s.prototype.setOrientClass=function(){"Vertical"!==this.orientation?(this.sliderContainer.classList.remove(Ee.verticalSlider),this.sliderContainer.classList.add(Ee.horizontalSlider),this.firstHandle.setAttribute("aria-orientation","horizontal"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","horizontal")):(this.sliderContainer.classList.remove(Ee.horizontalSlider),this.sliderContainer.classList.add(Ee.verticalSlider),this.firstHandle.setAttribute("aria-orientation","vertical"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","vertical"))},s.prototype.setAriaAttributes=function(e){var i=this,s=this.min,n=this.max;!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(s=this.customValues[0],n=this.customValues[this.customValues.length-1]),"Range"!==this.type?t.attributes(e,{"aria-valuemin":t.isNullOrUndefined(s)?"0":s.toString(),"aria-valuemax":t.isNullOrUndefined(n)?"100":n.toString()}):(!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?[[t.isNullOrUndefined(s)?"":s.toString(),this.value.length>1&&!t.isNullOrUndefined(this.customValues[this.value[1]])?this.customValues[this.value[1]].toString():""],[this.value.length>0&&!t.isNullOrUndefined(this.customValues[this.value[0]])?this.customValues[this.value[0]].toString():"",t.isNullOrUndefined(n)?"":n.toString()]]:[[t.isNullOrUndefined(s)?"":s.toString(),this.value.length>1&&!t.isNullOrUndefined(this.value[1])?this.value[1].toString():""],[this.value.length>0&&!t.isNullOrUndefined(this.value[0])?this.value[0].toString():"",t.isNullOrUndefined(n)?"":n.toString()]]).forEach(function(e,s){var n=0===s?i.firstHandle:i.secondHandle;n&&t.attributes(n,{"aria-valuemin":e[0],"aria-valuemax":e[1]})})},s.prototype.createSecondHandle=function(){this.secondHandle=this.createElement("div",{attrs:{class:Ee.sliderHandle,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.secondHandle.classList.add(Ee.sliderSecondHandle),this.element.appendChild(this.secondHandle)},s.prototype.createFirstHandle=function(){this.firstHandle=this.createElement("div",{attrs:{class:Ee.sliderHandle,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.firstHandle.classList.add(Ee.sliderFirstHandle),this.element.appendChild(this.firstHandle),this.isMaterialTooltip&&(this.materialHandle=this.createElement("div",{attrs:{class:Ee.sliderHandle+" "+Ee.sliderMaterialHandle}}),this.element.appendChild(this.materialHandle))},s.prototype.wireFirstHandleEvt=function(e){e?(t.EventHandler.remove(this.firstHandle,"mousedown touchstart",this.handleFocus),t.EventHandler.remove(this.firstHandle,"transitionend",this.transitionEnd),t.EventHandler.remove(this.firstHandle,"mouseenter touchenter",this.handleOver),t.EventHandler.remove(this.firstHandle,"mouseleave touchend",this.handleLeave)):(t.EventHandler.add(this.firstHandle,"mousedown touchstart",this.handleFocus,this),t.EventHandler.add(this.firstHandle,"transitionend",this.transitionEnd,this),t.EventHandler.add(this.firstHandle,"mouseenter touchenter",this.handleOver,this),t.EventHandler.add(this.firstHandle,"mouseleave touchend",this.handleLeave,this))},s.prototype.wireSecondHandleEvt=function(e){e?(t.EventHandler.remove(this.secondHandle,"mousedown touchstart",this.handleFocus),t.EventHandler.remove(this.secondHandle,"transitionend",this.transitionEnd),t.EventHandler.remove(this.secondHandle,"mouseenter touchenter",this.handleOver),t.EventHandler.remove(this.secondHandle,"mouseleave touchend",this.handleLeave)):(t.EventHandler.add(this.secondHandle,"mousedown touchstart",this.handleFocus,this),t.EventHandler.add(this.secondHandle,"transitionend",this.transitionEnd,this),t.EventHandler.add(this.secondHandle,"mouseenter touchenter",this.handleOver,this),t.EventHandler.add(this.secondHandle,"mouseleave touchend",this.handleLeave,this))},s.prototype.handleStart=function(){"Range"!==this.type&&(this.firstHandle.classList[0===this.handlePos1?"add":"remove"](Ee.sliderHandleStart),this.isMaterialTooltip&&(this.materialHandle.classList[0===this.handlePos1?"add":"remove"](Ee.sliderHandleStart),this.tooltipElement&&this.tooltipElement.classList[0===this.handlePos1?"add":"remove"](Ee.sliderTooltipStart)))},s.prototype.transitionEnd=function(e){"transform"!==e.propertyName&&(this.handleStart(),this.enableAnimation||(this.getHandle().style.transition="none"),"Default"!==this.type&&(this.rangeBar.style.transition="none"),(this.isMaterial||this.isMaterial3)&&this.tooltip.isVisible&&"Default"===this.type&&(this.tooltipElement.style.transition=this.transition.handle),this.tooltipToggle(this.getHandle()),this.closeTooltip())},s.prototype.handleFocusOut=function(){this.firstHandle.classList.contains(Ee.sliderHandleFocused)&&this.firstHandle.classList.remove(Ee.sliderHandleFocused),"Range"===this.type&&this.secondHandle.classList.contains(Ee.sliderHandleFocused)&&this.secondHandle.classList.remove(Ee.sliderHandleFocused)},s.prototype.handleFocus=function(e){this.focusSliderElement(),this.sliderBarClick(e),e.currentTarget===this.firstHandle?(this.firstHandle.classList.add(Ee.sliderHandleFocused),this.firstHandle.classList.add(Ee.sliderTabHandle)):(this.secondHandle.classList.add(Ee.sliderHandleFocused),this.secondHandle.classList.add(Ee.sliderTabHandle)),t.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},s.prototype.handleOver=function(e){this.tooltip.isVisible&&"Hover"===this.tooltip.showOn&&this.tooltipToggle(e.currentTarget),"Default"===this.type&&this.tooltipToggle(this.getHandle())},s.prototype.handleLeave=function(e){!this.tooltip.isVisible||"Hover"!==this.tooltip.showOn||e.currentTarget.classList.contains(Ee.sliderHandleFocused)||e.currentTarget.classList.contains(Ee.sliderTabHandle)||this.closeTooltip()},s.prototype.setHandler=function(){this.createFirstHandle(),"Range"===this.type&&this.createSecondHandle()},s.prototype.setEnableRTL=function(){this.enableRtl&&"Vertical"!==this.orientation?t.addClass([this.sliderContainer],Ee.rtl):t.removeClass([this.sliderContainer],Ee.rtl);var e="Vertical"!==this.orientation?this.horDir:this.verDir;this.enableRtl?(this.horDir="right",this.verDir="bottom"):(this.horDir="left",this.verDir="bottom"),e!==("Vertical"!==this.orientation?this.horDir:this.verDir)&&"Horizontal"===this.orientation&&(t.setStyleAttribute(this.firstHandle,{right:"",left:"auto"}),"Range"===this.type&&t.setStyleAttribute(this.secondHandle,{top:"",left:"auto"})),this.setBarColor()},s.prototype.tooltipValue=function(){var e,i=this,s={value:this.value,text:""};this.initialTooltip&&(this.initialTooltip=!1,this.setTooltipContent(),s.text=e="function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,this.trigger("tooltipChange",s,function(s){if(i.addTooltipClass(s.text),e!==s.text){i.customAriaText=s.text,i.enableHtmlSanitizer?s.text=t.SanitizeHtmlHelper.sanitize(s.text.toString()):s.text=s.text.toString();var n=function(){return s.text};i.tooltipObj.content=t.initializeCSPTemplate(n),i.setAriaAttrValue(i.firstHandle),"Range"===i.type&&i.setAriaAttrValue(i.secondHandle)}}),this.isMaterialTooltip&&this.setPreviousVal("change",this.value))},s.prototype.setTooltipContent=function(){var e=this.formatContent(this.tooltipFormatInfo,!1),i=function(){return e};this.tooltipObj.content=t.initializeCSPTemplate(i)},s.prototype.formatContent=function(e,i){var s="",n=this.handleVal1,a=this.handleVal2;return!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(n=this.customValues[this.handleVal1],a=this.customValues[this.handleVal2]),i?("Range"===this.type?s=this.enableRtl&&"Vertical"!==this.orientation?t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?a.toString()+" - "+n.toString():this.formatString(a,e).elementVal+" - "+this.formatString(n,e).elementVal:t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?n.toString()+" - "+a.toString():this.formatString(n,e).elementVal+" - "+this.formatString(a,e).elementVal:t.isNullOrUndefined(n)||(s=t.isNullOrUndefined(this.tooltip)||t.isNullOrUndefined(this.tooltip.format)?n.toString():this.formatString(n,e).elementVal),s):("Range"===this.type?s=this.enableRtl&&"Vertical"!==this.orientation?t.isNullOrUndefined(e.format)?a.toString()+" - "+n.toString():this.formatString(a,e).formatString+" - "+this.formatString(n,e).formatString:t.isNullOrUndefined(e.format)?n.toString()+" - "+a.toString():this.formatString(n,e).formatString+" - "+this.formatString(a,e).formatString:t.isNullOrUndefined(n)||(s=t.isNullOrUndefined(e.format)?n.toString():this.formatString(n,e).formatString),s)},s.prototype.addTooltipClass=function(e){if(this.isMaterialTooltip){var t=e.toString().length;if(this.tooltipElement){i=t>4?{oldCss:Ee.sliderMaterialDefault,newCss:Ee.sliderMaterialRange}:{oldCss:Ee.sliderMaterialRange,newCss:Ee.sliderMaterialDefault};this.tooltipElement.classList.remove(i.oldCss),this.tooltipElement.classList.contains(i.newCss)||(this.tooltipElement.classList.add(i.newCss),this.tooltipElement.style.transform=t>4?"scale(1)":this.getTooltipTransformProperties(this.previousTooltipClass).rotate)}else{var i=t>4?Ee.sliderMaterialRange:Ee.sliderMaterialDefault;this.tooltipObj.cssClass=Ee.sliderTooltip+" "+i}}},s.prototype.tooltipPlacement=function(){return"Horizontal"===this.orientation?"Before"===this.tooltip.placement?"TopCenter":"BottomCenter":"Before"===this.tooltip.placement?"LeftCenter":"RightCenter"},s.prototype.tooltipBeforeOpen=function(e){this.tooltipElement=e.element,this.tooltip.cssClass&&t.addClass([this.tooltipElement],this.tooltip.cssClass.split(" ").filter(function(e){return e})),e.target.removeAttribute("aria-describedby"),this.isMaterialTooltip&&(this.tooltipElement.firstElementChild.classList.add(Ee.materialTooltipHide),this.handleStart(),this.setTooltipTransform())},s.prototype.tooltipCollision=function(e){if(this.isBootstrap||this.isBootstrap4||(this.isMaterial||this.isMaterial3)&&!this.isMaterialTooltip){var t=this.isBootstrap4?3:6;switch(e){case"TopCenter":this.tooltipObj.setProperties({offsetY:-t},!1);break;case"BottomCenter":this.tooltipObj.setProperties({offsetY:t},!1);break;case"LeftCenter":this.tooltipObj.setProperties({offsetX:-t},!1);break;case"RightCenter":this.tooltipObj.setProperties({offsetX:t},!1)}}},s.prototype.materialTooltipEventCallBack=function(e){this.sliderBarClick(e),t.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},s.prototype.wireMaterialTooltipEvent=function(e){this.isMaterialTooltip&&(e?t.EventHandler.remove(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack):t.EventHandler.add(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack,this))},s.prototype.tooltipPositionCalculation=function(e){var t;switch(e){case"TopCenter":t=Ee.horizontalTooltipBefore;break;case"BottomCenter":t=Ee.horizontalTooltipAfter;break;case"LeftCenter":t=Ee.verticalTooltipBefore;break;case"RightCenter":t=Ee.verticalTooltipAfter}return t},s.prototype.getTooltipTransformProperties=function(e){var t;if(this.tooltipElement){var i="Horizontal"===this.orientation?this.tooltipElement.clientHeight+14-this.tooltipElement.clientHeight/2:this.tooltipElement.clientWidth+14-this.tooltipElement.clientWidth/2;t="Horizontal"===this.orientation?e===Ee.horizontalTooltipBefore?{rotate:"rotate(45deg)",translate:"translateY("+i+"px)"}:{rotate:"rotate(225deg)",translate:"translateY("+-i+"px)"}:e===Ee.verticalTooltipBefore?{rotate:"rotate(-45deg)",translate:"translateX("+i+"px)"}:{rotate:"rotate(-225deg)",translate:"translateX("+-i+"px)"}}return t},s.prototype.openMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){this.refreshTooltip(this.firstHandle);var t=this.tooltipElement.firstElementChild;t.classList.remove(Ee.materialTooltipHide),t.classList.add(Ee.materialTooltipShow),this.firstHandle.style.cursor="default",this.tooltipElement.style.transition=this.scaleTransform,this.tooltipElement.classList.add(Ee.materialTooltipOpen),this.materialHandle.style.transform="scale(0)",t.innerText.length>4?this.tooltipElement.style.transform="scale(1)":this.tooltipElement.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate,"Default"===this.type?setTimeout(function(){e.tooltipElement&&(e.tooltipElement.style.transition=e.transition.handle)},2500):setTimeout(function(){e.tooltipElement&&(e.tooltipElement.style.transition="none")},2500)}},s.prototype.closeMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){var t=this.tooltipElement.firstElementChild;this.tooltipElement.style.transition=this.scaleTransform,t.classList.remove(Ee.materialTooltipShow),t.classList.add(Ee.materialTooltipHide),this.firstHandle.style.cursor="-webkit-grab",this.firstHandle.style.cursor="grab",this.materialHandle&&(this.materialHandle.style.transform="scale(1)"),this.tooltipElement.classList.remove(Ee.materialTooltipOpen),this.setTooltipTransform(),this.tooltipTarget=void 0,setTimeout(function(){e.tooltipElement&&(e.tooltipElement.style.transition="none")},2500)}},s.prototype.checkTooltipPosition=function(e){var t=this.tooltipPositionCalculation(e.collidedPosition);void 0!==this.tooltipCollidedPosition&&this.tooltipCollidedPosition===e.collidedPosition&&e.element.classList.contains(t)||(this.isMaterialTooltip&&(void 0!==t&&(e.element.classList.remove(this.previousTooltipClass),e.element.classList.add(t),this.previousTooltipClass=t),e.element.style.transform&&e.element.classList.contains(Ee.materialTooltipOpen)&&e.element.firstElementChild.innerText.length<=4&&(e.element.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate)),this.tooltipCollidedPosition=e.collidedPosition),this.isMaterialTooltip&&this.tooltipElement&&-1!==this.tooltipElement.style.transform.indexOf("translate")&&this.setTooltipTransform()},s.prototype.setTooltipTransform=function(){var e=this.getTooltipTransformProperties(this.previousTooltipClass);t.isNullOrUndefined(this.tooltipElement)||(this.tooltipElement.firstElementChild.innerText.length>4?this.tooltipElement.style.transform=e.translate+" scale(0.01)":this.tooltipElement.style.transform=e.translate+" "+e.rotate+" scale(0.01)")},s.prototype.renderTooltip=function(){this.tooltipObj=new i.Tooltip({showTipPointer:this.isBootstrap||this.isMaterial||this.isMaterial3||this.isBootstrap4||this.isTailwind||this.isTailwind3||this.isBootstrap5||this.isFluent||this.isFluent2||this.isBootstrap5Dot3,cssClass:Ee.sliderTooltip,height:this.isMaterial||this.isMaterial3?30:"auto",animation:{open:{effect:"None"},close:{effect:"FadeOut",duration:500}},opensOn:"Custom",beforeOpen:this.tooltipBeforeOpen.bind(this),beforeCollision:this.checkTooltipPosition.bind(this),beforeClose:this.tooltipBeforeClose.bind(this),enableHtmlSanitizer:this.enableHtmlSanitizer}),this.tooltipObj.appendTo(this.firstHandle),this.initializeTooltipProps()},s.prototype.initializeTooltipProps=function(){var e="Auto"===this.tooltip.showOn?"Hover":this.tooltip.showOn;this.setProperties({tooltip:{showOn:e}},!0),this.tooltipObj.position=this.tooltipPlacement(),this.tooltipCollision(this.tooltipObj.position),[this.firstHandle,this.rangeBar,this.secondHandle].forEach(function(e){t.isNullOrUndefined(e)||(e.style.transition="none")}),this.isMaterialTooltip&&(this.sliderContainer.classList.add(Ee.materialSlider),this.tooltipValue(),this.tooltipObj.animation.close.effect="None",this.tooltipObj.open(this.firstHandle))},s.prototype.tooltipBeforeClose=function(){this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0},s.prototype.setButtons=function(){this.firstBtn=this.createElement("div",{className:Ee.sliderButton+" "+Ee.firstButton}),this.firstBtn.appendChild(this.createElement("span",{className:Ee.sliderButtonIcon})),(this.isTailwind||this.isTailwind3)&&this.firstBtn.querySelector("span").classList.add("e-icons"),this.firstBtn.tabIndex=-1,this.secondBtn=this.createElement("div",{className:Ee.sliderButton+" "+Ee.secondButton}),this.secondBtn.appendChild(this.createElement("span",{className:Ee.sliderButtonIcon})),(this.isTailwind||this.isTailwind3)&&this.secondBtn.querySelector("span").classList.add("e-icons"),this.secondBtn.tabIndex=-1,this.sliderContainer.classList.add(Ee.sliderButtonClass),this.sliderContainer.appendChild(this.firstBtn),this.sliderContainer.appendChild(this.secondBtn),this.sliderContainer.appendChild(this.element),this.buttonTitle()},s.prototype.buttonTitle=function(){var e=this.enableRtl&&"Vertical"!==this.orientation;this.l10n.setLocale(this.locale);var i=this.l10n.getConstant("decrementTitle"),s=this.l10n.getConstant("incrementTitle");t.attributes(e?this.secondBtn:this.firstBtn,{"aria-label":i,title:i}),t.attributes(e?this.firstBtn:this.secondBtn,{"aria-label":s,title:s})},s.prototype.buttonFocusOut=function(){(this.isMaterial||this.isMaterial3)&&this.getHandle().classList.remove("e-large-thumb-size")},s.prototype.repeatButton=function(e){var t,i=this.handleValueUpdate(),s=this.enableRtl&&"Vertical"!==this.orientation;e.target.parentElement.classList.contains(Ee.firstButton)||e.target.classList.contains(Ee.firstButton)?t=s?this.add(i,parseFloat(this.step.toString()),!0):this.add(i,parseFloat(this.step.toString()),!1):(e.target.parentElement.classList.contains(Ee.secondButton)||e.target.classList.contains(Ee.secondButton))&&(t=s?this.add(i,parseFloat(this.step.toString()),!1):this.add(i,parseFloat(this.step.toString()),!0)),this.limits.enabled&&(t=this.getLimitCorrectedValues(t)),t>=this.min&&t<=this.max&&(this.changeHandleValue(t,e),this.tooltipToggle(this.getHandle()))},s.prototype.repeatHandlerMouse=function(e){e.preventDefault(),"mousedown"!==e.type&&"touchstart"!==e.type||(this.buttonClick(e),this.repeatInterval=setInterval(this.repeatButton.bind(this),180,e))},s.prototype.materialChange=function(){this.getHandle().classList.contains("e-large-thumb-size")||this.getHandle().classList.add("e-large-thumb-size")},s.prototype.focusHandle=function(){this.getHandle().classList.contains(Ee.sliderTabHandle)||this.getHandle().classList.add(Ee.sliderTabHandle)},s.prototype.repeatHandlerUp=function(e){this.changeEvent("changed",e),this.closeTooltip(),clearInterval(this.repeatInterval),this.getHandle().focus()},s.prototype.customTickCounter=function(e){var i=4;return!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(e>4&&(i=3),e>7&&(i=2),e>14&&(i=1),e>28&&(i=0)),i},s.prototype.renderScale=function(){var e="Vertical"===this.orientation?"v":"h";this.ul=this.createElement("ul",{className:Ee.scale+" e-"+e+"-scale "+Ee.tick+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation","aria-hidden":"true"}}),this.ul.style.zIndex="-1",t.Browser.isAndroid&&"h"===e&&this.ul.classList.add(Ee.sliderTickPosition);var i=this.ticks.smallStep;this.ticks.showSmallTicks?i<=0&&(i=parseFloat(t.formatUnit(this.step))):i=this.ticks.largeStep>0?this.ticks.largeStep:parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min));var s=parseFloat(t.formatUnit(this.min)),n=parseFloat(t.formatUnit(this.max)),a=parseFloat(t.formatUnit(i)),r=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&this.customValues.length-1,l=this.customTickCounter(r),o=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?r*l+r:Math.abs((n-s)/a);this.element.appendChild(this.ul);var h,p=parseFloat(this.min.toString());"v"===e&&(p=parseFloat(this.max.toString()));var d,u=0,c=100/o;c===1/0&&(c=5);for(var m=0,f=!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0?this.customValues.length-1:0,v=0;m<=o;m++){if(h=this.createElement("li",{attrs:{class:Ee.tick,role:"presentation","aria-hidden":"true"}}),!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0)(d=m%(l+1)==0)&&("h"===e?(p=this.customValues[v],v++):(p=this.customValues[f],f--),h.setAttribute("title",p.toString()));else if(h.setAttribute("title",p.toString()),0===this.numberOfDecimals(this.max)&&0===this.numberOfDecimals(this.min)&&0===this.numberOfDecimals(this.step))if("h"===e){b=(p-parseFloat(this.min.toString()))%this.ticks.largeStep;d=Math.abs(b)<1e-10||Math.abs(this.ticks.largeStep-b)<1e-10}else{b=Math.abs(p-parseFloat(this.max.toString()))%this.ticks.largeStep;d=Math.abs(b)<1e-10||Math.abs(this.ticks.largeStep-b)<1e-10}else{var g=this.ticks.largeStep,y=p;if("h"===e){b=(y-s)%g;d=Math.abs(b)<1e-10||Math.abs(g-b)<1e-10}else{var b=Math.abs(y-parseFloat(n.toString()))%g;d=Math.abs(b)<1e-10||Math.abs(g-b)<1e-10}}d&&h.classList.add(Ee.large),"h"===e?h.style.width=c+"%":h.style.height=c+"%";var C=d?"Both"===this.ticks.placement?2:1:0;if(d)for(var E=0;E<C;E++)this.createTick(h,p);else t.isNullOrUndefined(this.customValues)&&this.formatTicksValue(h,p);this.ul.appendChild(h),this.tickElementCollection.push(h);var x=void 0;t.isNullOrUndefined(this.customValues)&&(x=this.numberOfDecimals(i)>this.numberOfDecimals(p)?this.numberOfDecimals(i):this.numberOfDecimals(p),p="h"===e?this.makeRoundNumber(p+i,x):this.min>this.max?this.makeRoundNumber(p+i,x):this.makeRoundNumber(p-i,x),u=this.makeRoundNumber(u+i,x))}this.ticksAlignment(e,c)},s.prototype.ticksAlignment=function(e,t,i){void 0===i&&(i=!0),this.firstChild=this.ul.firstElementChild,this.lastChild=this.ul.lastElementChild,this.firstChild.classList.add(Ee.sliderFirstTick),this.lastChild.classList.add(Ee.sliderLastTick),this.sliderContainer.classList.add(Ee.scale+"-"+this.ticks.placement.toLowerCase()),"h"===e?(this.firstChild.style.width=t/2+"%",this.lastChild.style.width=t/2+"%"):(this.firstChild.style.height=t/2+"%",this.lastChild.style.height=t/2+"%");var s={ticksWrapper:this.ul,tickElements:this.tickElementCollection};i&&this.trigger("renderedTicks",s),this.scaleAlignment()},s.prototype.createTick=function(e,i){var s=this.createElement("span",{className:Ee.tickValue+" "+Ee.tick+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation","aria-hidden":"true"}});e.appendChild(s),t.isNullOrUndefined(this.customValues)?this.formatTicksValue(e,i,s):this.enableHtmlSanitizer?s.innerHTML=t.SanitizeHtmlHelper.sanitize(i.toString()):s.innerHTML=i.toString()},s.prototype.formatTicksValue=function(e,i,s){var n=this,a=this.formatNumber(i),r={value:i,text:t.isNullOrUndefined(this.ticks)||t.isNullOrUndefined(this.ticks.format)?a:this.formatString(i,this.ticksFormatInfo).formatString,tickElement:e};this.trigger("renderingTicks",r,function(i){e.setAttribute("title",i.text.toString()),s&&(n.enableHtmlSanitizer?s.innerHTML=t.SanitizeHtmlHelper.sanitize(i.text.toString()):s.innerHTML=i.text.toString())})},s.prototype.scaleAlignment=function(){this.tickValuePosition(),"Vertical"===this.orientation?this.element.getBoundingClientRect().width<=15?this.sliderContainer.classList.add(Ee.sliderSmallSize):this.sliderContainer.classList.remove(Ee.sliderSmallSize):this.element.getBoundingClientRect().height<=15?this.sliderContainer.classList.add(Ee.sliderSmallSize):this.sliderContainer.classList.remove(Ee.sliderSmallSize)},s.prototype.tickValuePosition=function(){this.firstChild=this.element.querySelector("ul").children[0];var e,i,s=this.firstChild.getBoundingClientRect(),n=this.ticks.smallStep,a=Math.abs(parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min)))/n;this.firstChild.children.length>0&&(e=this.firstChild.children[0].getBoundingClientRect());var r,l=[this.sliderContainer.querySelectorAll("."+Ee.tick+"."+Ee.large+" ."+Ee.tickValue)];r="Both"===this.ticks.placement?[].slice.call(l[0],2):[].slice.call(l[0],1);for(var o="Vertical"===this.orientation?2*s.height:2*s.width,h=0;h<this.firstChild.children.length;h++)"Vertical"===this.orientation?this.firstChild.children[h].style.top=-e.height/2+"px":this.enableRtl?this.firstChild.children[h].style.left=(o-this.firstChild.children[h].getBoundingClientRect().width)/2+"px":this.firstChild.children[h].style.left=-e.width/2+"px";for(h=0;h<r.length;h++)i=r[h].getBoundingClientRect(),"Vertical"===this.orientation?t.setStyleAttribute(r[h],{top:(o-i.height)/2+"px"}):t.setStyleAttribute(r[h],{left:(o-i.width)/2+"px"});this.enableRtl&&this.lastChild.children.length&&0!==a&&(this.lastChild.children[0].style.left=-this.lastChild.getBoundingClientRect().width/2+"px","Both"===this.ticks.placement&&(this.lastChild.children[1].style.left=-this.lastChild.getBoundingClientRect().width/2+"px")),0===a&&("Horizontal"===this.orientation&&(this.enableRtl?(this.firstChild.classList.remove(Ee.sliderLastTick),this.firstChild.style.right=this.firstHandle.style.right,this.firstChild.children[0].style.left=this.firstChild.getBoundingClientRect().width/2+2+"px","Both"===this.ticks.placement&&(this.firstChild.children[1].style.left=this.firstChild.getBoundingClientRect().width/2+2+"px")):(this.firstChild.classList.remove(Ee.sliderLastTick),this.firstChild.style.left=this.firstHandle.style.left)),"Vertical"===this.orientation&&this.firstChild.classList.remove(Ee.sliderLastTick))},s.prototype.setAriaAttrValue=function(e){var i,s=!t.isNullOrUndefined(this.ticks)&&!t.isNullOrUndefined(this.ticks.format),n=s?this.formatContent(this.tooltipFormatInfo,!1):this.formatContent(this.ticksFormatInfo,!1),a=s?this.formatContent(this.ticksFormatInfo,!0):this.formatContent(this.tooltipFormatInfo,!0);i=2===(n=this.customAriaText?this.customAriaText:n).split(" - ").length?n.split(" - "):[n,n],this.setAriaAttributes(e),"Range"!==this.type?t.attributes(e,{"aria-valuenow":a,"aria-valuetext":n}):this.enableRtl?e===this.firstHandle?t.attributes(e,{"aria-valuenow":a.split(" - ")[1],"aria-valuetext":i[1]}):t.attributes(e,{"aria-valuenow":a.split(" - ")[0],"aria-valuetext":i[0]}):e===this.firstHandle?t.attributes(e,{"aria-valuenow":a.split(" - ")[0],"aria-valuetext":i[0]}):t.attributes(e,{"aria-valuenow":a.split(" - ")[1],"aria-valuetext":i[1]})},s.prototype.handleValueUpdate=function(){return"Range"===this.type?1===this.activeHandle?this.handleVal1:this.handleVal2:this.handleVal1},s.prototype.getLimitCorrectedValues=function(e){return e="MinRange"===this.type||"Default"===this.type?this.getLimitValueAndPosition(e,this.limits.minStart,this.limits.minEnd)[0]:1===this.activeHandle?this.getLimitValueAndPosition(e,this.limits.minStart,this.limits.minEnd)[0]:this.getLimitValueAndPosition(e,this.limits.maxStart,this.limits.maxEnd)[0]},s.prototype.focusSliderElement=function(){this.isElementFocused||(this.element.focus(),this.isElementFocused=!0)},s.prototype.buttonClick=function(e){this.focusSliderElement();var i,s=this.enableRtl&&"Vertical"!==this.orientation,n=this.handleValueUpdate();40===e.keyCode||37===e.keyCode||e.currentTarget.classList.contains(Ee.firstButton)?i=s?this.add(n,parseFloat(this.step.toString()),!0):this.add(n,parseFloat(this.step.toString()),!1):38===e.keyCode||39===e.keyCode||e.currentTarget.classList.contains(Ee.secondButton)?i=s?this.add(n,parseFloat(this.step.toString()),!1):this.add(n,parseFloat(this.step.toString()),!0):33===e.keyCode||e.currentTarget.classList.contains(Ee.firstButton)?i=s?this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):34===e.keyCode||e.currentTarget.classList.contains(Ee.secondButton)?i=s?this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):36===e.keyCode?i=parseFloat(this.min<this.max?this.min.toString():this.max.toString()):35===e.keyCode&&(i=parseFloat(this.min<this.max?this.max.toString():this.min.toString())),this.limits.enabled&&(i=this.getLimitCorrectedValues(i)),this.changeHandleValue(i,e),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Ee.sliderTabHandle)||this.materialChange(),this.tooltipToggle(this.getHandle()),this.getHandle().focus(),this.focusHandle(),e.currentTarget.classList.contains(Ee.firstButton)&&t.EventHandler.add(this.firstBtn,"mouseup touchend",this.buttonUp,this),e.currentTarget.classList.contains(Ee.secondButton)&&t.EventHandler.add(this.secondBtn,"mouseup touchend",this.buttonUp,this)},s.prototype.tooltipToggle=function(e){this.isMaterialTooltip?this.tooltipElement.classList.contains(Ee.materialTooltipOpen)?this.refreshTooltip(this.firstHandle):this.openMaterialTooltip():this.tooltipElement?this.refreshTooltip(e):this.openTooltip(e)},s.prototype.buttonUp=function(e){e.currentTarget.classList.contains(Ee.firstButton)&&t.EventHandler.remove(this.firstBtn,"mouseup touchend",this.buttonUp),e.currentTarget.classList.contains(Ee.secondButton)&&t.EventHandler.remove(this.secondBtn,"mouseup touchend",this.buttonUp)},s.prototype.setRangeBar=function(){"Horizontal"!==this.orientation||t.isNullOrUndefined(this.rangeBar)?t.isNullOrUndefined(this.rangeBar)||("MinRange"===this.type?(this.rangeBar.style.bottom=this.min>this.max?this.handlePos1+"px":"0px",t.setStyleAttribute(this.rangeBar,{height:t.isNullOrUndefined(this.handlePos1)?0:this.min>this.max?this.element.clientHeight-this.handlePos1+"px":this.handlePos1+"px"})):(this.rangeBar.style.bottom=this.min>this.max?this.handlePos2+"px":this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{height:this.min>this.max?this.handlePos1-this.handlePos2+"px":this.handlePos2-this.handlePos1+"px"}))):"MinRange"===this.type?(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",t.setStyleAttribute(this.rangeBar,{width:t.isNullOrUndefined(this.handlePos1)?0:this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right=this.handlePos1+"px":this.rangeBar.style.left=this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"}))},s.prototype.checkValidValueAndPos=function(e){return e=this.checkHandleValue(e),e=this.checkHandlePosition(e)},s.prototype.setLimitBarPositions=function(e,t,i,s){"Horizontal"===this.orientation?this.enableRtl?(this.limitBarFirst.style.right=e+"px",this.limitBarFirst.style.width=t-e+"px"):(this.limitBarFirst.style.left=e+"px",this.limitBarFirst.style.width=t-e+"px"):(this.limitBarFirst.style.bottom=(this.min<this.max?e:t)+"px",this.limitBarFirst.style.height=(this.min<this.max?t-e:e-t)+"px"),"Range"===this.type&&("Horizontal"===this.orientation?this.enableRtl?(this.limitBarSecond.style.right=i+"px",this.limitBarSecond.style.width=s-i+"px"):(this.limitBarSecond.style.left=i+"px",this.limitBarSecond.style.width=s-i+"px"):(this.limitBarSecond.style.bottom=(this.min<this.max?i:s)+"px",this.limitBarSecond.style.height=(this.min<this.max?s-i:i-s)+"px"))},s.prototype.setLimitBar=function(){if("Default"===this.type||"MinRange"===this.type){var e=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];e=this.checkValidValueAndPos(e);var t=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];t=this.checkValidValueAndPos(t),this.setLimitBarPositions(e,t)}else if("Range"===this.type){var i=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];i=this.checkValidValueAndPos(i);var s=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];s=this.checkValidValueAndPos(s);var n=this.getLimitValueAndPosition(this.limits.maxStart,this.limits.maxStart,this.limits.maxEnd,!0)[0];n=this.checkValidValueAndPos(n);var a=this.getLimitValueAndPosition(this.limits.maxEnd,this.limits.maxStart,this.limits.maxEnd,!0)[0];a=this.checkValidValueAndPos(a),this.setLimitBarPositions(i,s,n,a)}},s.prototype.getLimitValueAndPosition=function(e,i,s,n){return t.isNullOrUndefined(i)&&(i=this.min<this.max?this.min:this.max,t.isNullOrUndefined(e)&&n&&(e=i)),t.isNullOrUndefined(s)&&(s=this.min<this.max?this.max:this.min,t.isNullOrUndefined(e)&&n&&(e=s)),e<i&&(e=i),e>s&&(e=s),[e,this.checkHandlePosition(e)]},s.prototype.setValue=function(){if(!t.isNullOrUndefined(this.customValues)&&this.customValues.length>0&&(this.min=0,this.max=this.customValues.length-1,this.setBarColor()),this.setAriaAttributes(this.firstHandle),this.handleVal1=t.isNullOrUndefined(this.value)?this.checkHandleValue(parseFloat(this.min.toString())):this.checkHandleValue(parseFloat(this.value.toString())),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.preHandlePos1=this.handlePos1,t.isNullOrUndefined(this.activeHandle)&&(this.activeHandle="Range"===this.type?2:1),"Default"===this.type||"MinRange"===this.type){if(this.limits.enabled){var e=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=e[0],this.handlePos1=e[1],this.preHandlePos1=this.handlePos1}this.setHandlePosition(null),this.handleStart(),this.value=this.handleVal1,this.setAriaAttrValue(this.firstHandle),this.changeEvent("changed",null)}else this.validateRangeValue();"Default"!==this.type&&this.setRangeBar(),this.limits.enabled&&this.setLimitBar()},s.prototype.rangeValueUpdate=function(){null!==this.value&&"object"==typeof this.value||(this.value=[parseFloat(t.formatUnit(this.min)),parseFloat(t.formatUnit(this.max))])},s.prototype.validateRangeValue=function(){this.rangeValueUpdate(),this.setRangeValue()},s.prototype.modifyZindex=function(){"Range"!==this.type||t.isNullOrUndefined(this.firstHandle)||t.isNullOrUndefined(this.secondHandle)?this.isMaterialTooltip&&this.tooltipElement&&(this.tooltipElement.style.zIndex=i.getZindexPartial(this.element)+""):1===this.activeHandle?(this.firstHandle.style.zIndex=this.zIndex+4+"",this.secondHandle.style.zIndex=this.zIndex+3+""):(this.firstHandle.style.zIndex=this.zIndex+3+"",this.secondHandle.style.zIndex=this.zIndex+4+"")},s.prototype.setHandlePosition=function(e){var i,s=this,n=1===this.activeHandle?this.handlePos1:this.handlePos2;i=this.isMaterialTooltip?[this.firstHandle,this.materialHandle]:[this.getHandle()],this.handleStart(),i.forEach(function(e){t.isNullOrUndefined(e)||("Horizontal"===s.orientation?s.enableRtl?e.style.right=n+"px":e.style.left=n+"px":e.style.bottom=n+"px")}),this.changeEvent("change",e)},s.prototype.getHandle=function(){return 1===this.activeHandle?this.firstHandle:this.secondHandle},s.prototype.setRangeValue=function(){this.updateRangeValue(),this.activeHandle=1,this.setHandlePosition(null),this.activeHandle=2,this.setHandlePosition(null),this.activeHandle=1},s.prototype.changeEvent=function(e,t){var i="change"===e?this.previousVal:this.previousChanged;if("Range"!==this.type)this.setProperties({value:this.handleVal1},!0),i===this.value||this.isMaterialTooltip&&this.initialTooltip||(this.trigger(e,this.changeEventArgs(e,t)),this.initialTooltip=!0,this.setPreviousVal(e,this.value)),this.setAriaAttrValue(this.firstHandle);else{var s=this.value=[this.handleVal1,this.handleVal2];this.setProperties({value:s},!0),(i.length===this.value.length&&this.value[0]!==i[0]||this.value[1]!==i[1])&&(this.initialTooltip=!1,this.trigger(e,this.changeEventArgs(e,t)),this.initialTooltip=!0,this.setPreviousVal(e,this.value)),this.setAriaAttrValue(this.getHandle())}this.hiddenInput.value=this.value.toString()},s.prototype.changeEventArgs=function(e,i){var s;return this.tooltip.isVisible&&this.tooltipObj&&this.initialTooltip?(this.tooltipValue(),s={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:"function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,isInteracted:!t.isNullOrUndefined(i)}):s={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:t.isNullOrUndefined(this.ticksFormatInfo.format)?this.value.toString():"Range"!==this.type?this.formatString(this.value,this.ticksFormatInfo).formatString:this.formatString(this.value[0],this.ticksFormatInfo).formatString+" - "+this.formatString(this.value[1],this.ticksFormatInfo).formatString,isInteracted:!t.isNullOrUndefined(i)},s},s.prototype.setPreviousVal=function(e,t){"change"===e?this.previousVal=t:this.previousChanged=t},s.prototype.updateRangeValue=function(){var e=this.value.toString().split(",").map(Number);if(this.enableRtl&&"Vertical"!==this.orientation||this.rtl?this.value=[e[1],e[0]]:this.value=[e[0],e[1]],this.enableRtl&&"Vertical"!==this.orientation?(this.handleVal1=this.checkHandleValue(this.value[1]),this.handleVal2=this.checkHandleValue(this.value[0])):(this.handleVal1=this.checkHandleValue(this.value[0]),this.handleVal2=this.checkHandleValue(this.value[1])),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2),this.min<this.max&&this.handlePos1>this.handlePos2&&(this.handlePos1=this.handlePos2,this.handleVal1=this.handleVal2),this.min>this.max&&this.handlePos1<this.handlePos2&&(this.handlePos2=this.handlePos1,this.handleVal2=this.handleVal1),this.preHandlePos1=this.handlePos1,this.preHandlePos2=this.handlePos2,this.limits.enabled){this.activeHandle=1;var t=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=t[0],this.handlePos1=t[1],this.preHandlePos1=this.handlePos1,this.activeHandle=2,t=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=t[0],this.handlePos2=t[1],this.preHandlePos2=this.handlePos2}},s.prototype.checkHandlePosition=function(e){var i;return e=100*(e-parseFloat(t.formatUnit(this.min)))/(parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min))),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(e/100):this.element.getBoundingClientRect().height*(e/100),parseFloat(t.formatUnit(this.max))===parseFloat(t.formatUnit(this.min))&&(i="Horizontal"===this.orientation?this.element.getBoundingClientRect().width:this.element.getBoundingClientRect().height),i},s.prototype.checkHandleValue=function(e){if(this.min===this.max)return parseFloat(t.formatUnit(this.max));var i=this.tempStartEnd();return e<i.start?e=i.start:e>i.end&&(e=i.end),e},s.prototype.reposition=function(){var e=this;t.isNullOrUndefined(this.firstHandle)||(this.firstHandle.style.transition="none"),"Default"===this.type||t.isNullOrUndefined(this.rangeBar)||(this.rangeBar.style.transition="none"),"Range"!==this.type||t.isNullOrUndefined(this.secondHandle)||(this.secondHandle.style.transition="none"),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handleVal2&&(this.handlePos2=this.checkHandlePosition(this.handleVal2)),"Horizontal"===this.orientation?(this.enableRtl?this.firstHandle.style.right=this.handlePos1+"px":this.firstHandle.style.left=this.handlePos1+"px",this.isMaterialTooltip&&!t.isNullOrUndefined(this.materialHandle)&&(this.enableRtl?this.materialHandle.style.right=this.handlePos1+"px":this.materialHandle.style.left=this.handlePos1+"px"),"MinRange"!==this.type||t.isNullOrUndefined(this.rangeBar)?"Range"!==this.type||t.isNullOrUndefined(this.secondHandle)||t.isNullOrUndefined(this.rangeBar)||(this.enableRtl?(this.secondHandle.style.right=this.handlePos2+"px",this.rangeBar.style.right=this.handlePos1+"px"):(this.secondHandle.style.left=this.handlePos2+"px",this.rangeBar.style.left=this.handlePos1+"px"),t.setStyleAttribute(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",t.setStyleAttribute(this.rangeBar,{width:t.isNullOrUndefined(this.handlePos1)?0:this.handlePos1+"px"}))):(this.firstHandle.style.bottom=this.handlePos1+"px",this.isMaterialTooltip&&(this.materialHandle.style.bottom=this.handlePos1+"px"),"MinRange"===this.type?(this.rangeBar.style.bottom=this.min>this.max?this.handlePos1+"px":"0px",t.setStyleAttribute(this.rangeBar,{height:t.isNullOrUndefined(this.handlePos1)?0:this.min>this.max?this.element.clientHeight-this.handlePos1+"px":this.handlePos1+"px"})):"Range"===this.type&&(this.secondHandle.style.bottom=this.handlePos2+"px",this.rangeBar.style.bottom=this.min>this.max?this.handlePos2+"px":this.handlePos1+"px",t.setStyleAttribute(this.rangeBar,{height:this.min>this.max?this.handlePos1-this.handlePos2+"px":this.handlePos2-this.handlePos1+"px"}))),this.limits.enabled&&this.setLimitBar(),"None"!==this.ticks.placement&&this.ul&&(this.removeElement(this.ul),this.ul=void 0,this.renderScale()),this.handleStart(),this.tooltip.isVisible||setTimeout(function(){t.isNullOrUndefined(e.firstHandle)||(e.firstHandle.style.transition=e.scaleTransform),"Range"!==e.type||t.isNullOrUndefined(e.secondHandle)||(e.secondHandle.style.transition=e.scaleTransform)}),this.refreshTooltip(this.tooltipTarget),this.setBarColor()},s.prototype.changeHandleValue=function(e,t){var i=null;1===this.activeHandle?(this.limits.enabled&&this.limits.startHandleFixed||(this.handleVal1=this.checkHandleValue(e),this.handlePos1=this.checkHandlePosition(this.handleVal1),"Range"===this.type&&(this.handlePos1>this.handlePos2&&this.min<this.max||this.handlePos1<this.handlePos2&&this.min>this.max)&&(this.handlePos1=this.handlePos2,this.handleVal1=this.handleVal2),this.handlePos1!==this.preHandlePos1&&(i=this.preHandlePos1=this.handlePos1)),this.modifyZindex()):(this.limits.enabled&&this.limits.endHandleFixed||(this.handleVal2=this.checkHandleValue(e),this.handlePos2=this.checkHandlePosition(this.handleVal2),"Range"===this.type&&(this.handlePos2<this.handlePos1&&this.min<this.max||this.handlePos2>this.handlePos1&&this.min>this.max)&&(this.handlePos2=this.handlePos1,this.handleVal2=this.handleVal1),this.handlePos2!==this.preHandlePos2&&(i=this.preHandlePos2=this.handlePos2)),this.modifyZindex()),null!==i&&("Default"!==this.type&&this.setRangeBar(),this.setHandlePosition(t))},s.prototype.tempStartEnd=function(){return this.min>this.max?{start:this.max,end:this.min}:{start:this.min,end:this.max}},s.prototype.xyToPosition=function(e){if(this.min===this.max)return 100;if("Horizontal"===this.orientation){var t=e.x-this.element.getBoundingClientRect().left,i=this.element.offsetWidth/100;this.val=t/i}else{var s=e.y-this.element.getBoundingClientRect().top,i=this.element.offsetHeight/100;this.val=100-s/i}var n=this.stepValueCalculation(this.val);return n<0?n=0:n>100&&(n=100),this.enableRtl&&"Vertical"!==this.orientation&&(n=100-n),"Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(n/100):this.element.getBoundingClientRect().height*(n/100)},s.prototype.stepValueCalculation=function(e){0===this.step&&(this.step=1);var i=parseFloat(t.formatUnit(this.step))/((parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min)))/100),s=e%Math.abs(i);return 0!==s&&(i/2>s?e-=s:e+=Math.abs(i)-s),e},s.prototype.add=function(e,t,i){var s=Math.pow(10,3);return i?(Math.round(e*s)+Math.round(t*s))/s:(Math.round(e*s)-Math.round(t*s))/s},s.prototype.positionToValue=function(e){var i,s=parseFloat(t.formatUnit(this.max))-parseFloat(t.formatUnit(this.min));return i="Horizontal"===this.orientation?e/this.element.getBoundingClientRect().width*s:e/this.element.getBoundingClientRect().height*s,this.add(i,parseFloat(this.min.toString()),!0)},s.prototype.sliderBarClick=function(e){e.preventDefault();var t;"mousedown"===e.type||"mouseup"===e.type||"click"===e.type?t={x:e.clientX,y:e.clientY}:"touchend"!==e.type&&"touchstart"!==e.type||(t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY});var i=this.xyToPosition(t),s=this.positionToValue(i);if("Range"===this.type&&(this.min<this.max&&this.handlePos2-i<i-this.handlePos1||this.min>this.max&&this.handlePos1-i>i-this.handlePos2))this.activeHandle=2,this.limits.enabled&&this.limits.endHandleFixed||(this.limits.enabled&&(s=(n=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd))[0],i=n[1]),this.secondHandle.classList.add(Ee.sliderActiveHandle),this.handlePos2=this.preHandlePos2=i,this.handleVal2=s),this.modifyZindex(),this.secondHandle.focus();else{if(this.activeHandle=1,!this.limits.enabled||!this.limits.startHandleFixed){if(this.limits.enabled){var n=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd);s=n[0],i=n[1]}this.firstHandle.classList.add(Ee.sliderActiveHandle),this.handlePos1=this.preHandlePos1=i,this.handleVal1=s}this.modifyZindex(),this.firstHandle.focus()}this.isMaterialTooltip&&this.tooltipElement.classList.add(Ee.materialTooltipActive);var a=this.element.querySelector("."+Ee.sliderTabHandle);a&&this.getHandle()!==a&&a.classList.remove(Ee.sliderTabHandle);var r=1===this.activeHandle?this.firstHandle:this.secondHandle;if(("click"===e.type||"mousedown"===e.type)&&e.target===r){var l=e.clientX,o=e.clientY;document.elementFromPoint(l,o)}if(this.checkRepeatedValue(s)){var h=(this.isMaterial||this.isMaterial3)&&this.tooltip.isVisible?this.transitionOnMaterialTooltip:this.transition;this.getHandle().style.transition=h.handle,"Default"!==this.type&&(this.rangeBar.style.transition=h.rangeBar),this.setHandlePosition(e),this.isMaterialTooltip&&(this.initialTooltip=!1),e.target!==r&&this.changeEvent("changed",e),"Default"!==this.type&&this.setRangeBar()}},s.prototype.handleValueAdjust=function(e,t,i){1===i?(this.handleVal1=t,this.handleVal2=this.handleVal1+this.minDiff):2===i&&(this.handleVal2=t,this.handleVal1=this.handleVal2-this.minDiff),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2)},s.prototype.dragRangeBarMove=function(e){var t,i;"touchmove"!==e.type&&e.preventDefault(),this.rangeBarDragged=!0;var s;this.rangeBar.style.transition="none",this.firstHandle.style.transition="none",this.secondHandle.style.transition="none";var n,a;if("mousemove"===e.type?(n=(t=[e.clientX,e.clientY])[0],a=t[1]):(n=(i=[e.changedTouches[0].clientX,e.changedTouches[0].clientY])[0],a=i[1]),!(this.limits.enabled&&this.limits.startHandleFixed||this.limits.enabled&&this.limits.endHandleFixed)){if(s=this.enableRtl?{x:n+this.secondPartRemain,y:a+this.secondPartRemain}:{x:n-this.firstPartRemain,y:a+this.secondPartRemain},this.min>this.max?(this.handlePos2=this.xyToPosition(s),this.handleVal2=this.positionToValue(this.handlePos2)):(this.handlePos1=this.xyToPosition(s),this.handleVal1=this.positionToValue(this.handlePos1)),s=this.enableRtl?{x:n-this.firstPartRemain,y:a-this.firstPartRemain}:{x:n+this.secondPartRemain,y:a-this.firstPartRemain},this.min>this.max?(this.handlePos1=this.xyToPosition(s),this.handleVal1=this.positionToValue(this.handlePos1)):(this.handlePos2=this.xyToPosition(s),this.handleVal2=this.positionToValue(this.handlePos2)),this.limits.enabled){var r=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=r[0],this.handlePos1=r[1],this.handleVal1===this.limits.minEnd&&this.handleValueAdjust(this.handleVal1,this.limits.minEnd,1),this.handleVal1===this.limits.minStart&&this.handleValueAdjust(this.handleVal1,this.limits.minStart,1),r=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=r[0],this.handlePos2=r[1],this.handleVal2===this.limits.maxStart&&this.handleValueAdjust(this.handleVal2,this.limits.maxStart,2),this.handleVal2===this.limits.maxEnd&&this.handleValueAdjust(this.handleVal2,this.limits.maxEnd,2)}this.handleVal2===(this.min>this.max?this.min:this.max)&&this.handleValueAdjust(this.handleVal2,this.min>this.max?this.min:this.max,2),this.handleVal1===(this.min>this.max?this.max:this.min)&&this.handleValueAdjust(this.handleVal1,this.min>this.max?this.max:this.min,1)}this.activeHandle=1,this.setHandlePosition(e),this.activeHandle=2,this.setHandlePosition(e),this.tooltipToggle(this.rangeBar),this.setRangeBar()},s.prototype.sliderBarUp=function(e){this.changeEvent("changed",e),this.handleFocusOut(),this.firstHandle.classList.remove(Ee.sliderActiveHandle),"Range"===this.type&&(this.initialTooltip=!1,this.secondHandle.classList.remove(Ee.sliderActiveHandle)),this.closeTooltip(),(this.isMaterial||this.isMaterial3)&&(this.getHandle().classList.remove("e-large-thumb-size"),this.isMaterialTooltip&&this.tooltipElement.classList.remove(Ee.materialTooltipActive)),t.EventHandler.remove(document,"mousemove touchmove",this.sliderBarMove),t.EventHandler.remove(document,"mouseup touchend",this.sliderBarUp)},s.prototype.sliderBarMove=function(e){"touchmove"!==e.type&&e.preventDefault();var t;t="mousemove"===e.type?{x:e.clientX,y:e.clientY}:{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};var i=this.xyToPosition(t),s=this.positionToValue(i);if(i=Math.round(i),"Range"!==this.type&&1===this.activeHandle){if(!this.limits.enabled||!this.limits.startHandleFixed){if(this.limits.enabled){var n=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd);i=n[1],s=n[0]}this.handlePos1=i,this.handleVal1=s}this.firstHandle.classList.add(Ee.sliderActiveHandle)}if("Range"===this.type)if(1===this.activeHandle)this.firstHandle.classList.add(Ee.sliderActiveHandle),this.limits.enabled&&this.limits.startHandleFixed||((this.min<this.max&&i>this.handlePos2||this.min>this.max&&i<this.handlePos2)&&(i=this.handlePos2,s=this.handleVal2),i!==this.preHandlePos1&&(this.limits.enabled&&(s=(a=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd))[0],i=a[1]),this.handlePos1=this.preHandlePos1=i,this.handleVal1=s,this.activeHandle=1));else if(2===this.activeHandle&&(this.secondHandle.classList.add(Ee.sliderActiveHandle),!(this.limits.enabled&&this.limits.endHandleFixed||((this.min<this.max&&i<this.handlePos1||this.min>this.max&&i>this.handlePos1)&&(i=this.handlePos1,s=this.handleVal1),i===this.preHandlePos2)))){if(this.limits.enabled){var a=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd);s=a[0],i=a[1]}this.handlePos2=this.preHandlePos2=i,this.handleVal2=s,this.activeHandle=2}this.checkRepeatedValue(s)&&(this.getHandle().style.transition=this.scaleTransform,"Default"!==this.type&&(this.rangeBar.style.transition="none"),this.setHandlePosition(e),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Ee.sliderTabHandle)||this.materialChange(),this.tooltipToggle(this.getHandle()),"Default"!==this.type&&this.setRangeBar())},s.prototype.dragRangeBarUp=function(e){this.rangeBarDragged?this.isDragComplete=!0:(this.focusSliderElement(),this.sliderBarClick(e)),this.changeEvent("changed",e),this.closeTooltip(),t.EventHandler.remove(document,"mousemove touchmove",this.dragRangeBarMove),t.EventHandler.remove(document,"mouseup touchend",this.dragRangeBarUp),this.rangeBarDragged=!1},s.prototype.checkRepeatedValue=function(e){if("Range"===this.type){if(e===(this.enableRtl&&"Vertical"!==this.orientation?1===this.activeHandle?this.previousVal[1]:this.previousVal[0]:1===this.activeHandle?this.previousVal[0]:this.previousVal[1]))return 0}else if(e===this.previousVal)return 0;return 1},s.prototype.refreshTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&(this.tooltipValue(),e&&(this.tooltipObj.refresh(e),this.tooltipTarget=e))},s.prototype.openTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.open(e),this.tooltipTarget=e)},s.prototype.closeTooltip=function(){this.tooltip.isVisible&&this.tooltipObj&&"Always"!==this.tooltip.showOn&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.close(),this.tooltipTarget=void 0)},s.prototype.keyDown=function(e){switch(e.keyCode){case 37:case 38:case 39:case 40:case 33:case 34:case 36:case 35:e.preventDefault(),this.buttonClick(e)}},s.prototype.wireButtonEvt=function(e){e?(t.EventHandler.remove(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut),t.EventHandler.remove(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut),t.EventHandler.remove(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse),t.EventHandler.remove(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),t.EventHandler.remove(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse),t.EventHandler.remove(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),t.EventHandler.remove(this.firstBtn,"focusout",this.sliderFocusOut),t.EventHandler.remove(this.secondBtn,"focusout",this.sliderFocusOut)):(t.EventHandler.add(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut,this),t.EventHandler.add(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut,this),t.EventHandler.add(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse,this),t.EventHandler.add(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),t.EventHandler.add(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse,this),t.EventHandler.add(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),t.EventHandler.add(this.firstBtn,"focusout",this.sliderFocusOut,this),t.EventHandler.add(this.secondBtn,"focusout",this.sliderFocusOut,this))},s.prototype.rangeBarMousedown=function(e){var i,s;if(e.preventDefault(),this.focusSliderElement(),"Range"===this.type&&this.drag&&e.target===this.rangeBar){var n=void 0,a=void 0;"mousedown"===e.type?(n=(i=[e.clientX,e.clientY])[0],a=i[1]):"touchstart"===e.type&&(n=(s=[e.changedTouches[0].clientX,e.changedTouches[0].clientY])[0],a=s[1]),"Horizontal"===this.orientation?(this.firstPartRemain=n-this.rangeBar.getBoundingClientRect().left,this.secondPartRemain=this.rangeBar.getBoundingClientRect().right-n):(this.firstPartRemain=a-this.rangeBar.getBoundingClientRect().top,this.secondPartRemain=this.rangeBar.getBoundingClientRect().bottom-a),this.minDiff=this.handleVal2-this.handleVal1,this.tooltipToggle(this.rangeBar);var r=this.element.querySelector("."+Ee.sliderTabHandle);r&&r.classList.remove(Ee.sliderTabHandle),t.EventHandler.add(document,"mousemove touchmove",this.dragRangeBarMove,this),t.EventHandler.add(document,"mouseup touchend",this.dragRangeBarUp,this)}},s.prototype.elementClick=function(e){if(this.isDragComplete)return void(this.isDragComplete=!1);e.preventDefault(),this.focusSliderElement(),this.sliderBarClick(e),this.focusHandle()},s.prototype.wireEvents=function(){this.onresize=this.reposition.bind(this),window.addEventListener("resize",this.onresize),this.enabled&&!this.readonly&&(t.EventHandler.add(this.element,"click",this.elementClick,this),"Range"===this.type&&this.drag&&t.EventHandler.add(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown,this),t.EventHandler.add(this.sliderContainer,"keydown",this.keyDown,this),t.EventHandler.add(this.sliderContainer,"keyup",this.keyUp,this),t.EventHandler.add(this.element,"focusout",this.sliderFocusOut,this),t.EventHandler.add(this.sliderContainer,"mouseover mouseout touchstart touchend",this.hover,this),this.wireFirstHandleEvt(!1),"Range"===this.type&&this.wireSecondHandleEvt(!1),this.showButtons&&this.wireButtonEvt(!1),this.wireMaterialTooltipEvent(!1),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this))},s.prototype.unwireEvents=function(){t.EventHandler.remove(this.element,"click",this.elementClick),"Range"===this.type&&this.drag&&t.EventHandler.remove(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown),t.EventHandler.remove(this.sliderContainer,"keydown",this.keyDown),t.EventHandler.remove(this.sliderContainer,"keyup",this.keyUp),t.EventHandler.remove(this.element,"focusout",this.sliderFocusOut),t.EventHandler.remove(this.sliderContainer,"mouseover mouseout touchstart touchend",this.hover),this.wireFirstHandleEvt(!0),"Range"===this.type&&this.wireSecondHandleEvt(!0),this.showButtons&&this.wireButtonEvt(!0),this.wireMaterialTooltipEvent(!0),t.EventHandler.remove(this.element,"reset",this.formResetHandler)},s.prototype.formResetHandler=function(){this.setProperties({value:this.formResetValue},!0),this.setValue()},s.prototype.keyUp=function(e){if(9===e.keyCode&&e.target.classList.contains(Ee.sliderHandle)&&(this.focusSliderElement(),!e.target.classList.contains(Ee.sliderTabHandle))){this.element.querySelector("."+Ee.sliderTabHandle)&&this.element.querySelector("."+Ee.sliderTabHandle).classList.remove(Ee.sliderTabHandle),e.target.classList.add(Ee.sliderTabHandle);var t=e.target.parentElement;if(t===this.element&&(t.querySelector("."+Ee.sliderTrack).classList.add(Ee.sliderTabTrack),"Range"!==this.type&&"MinRange"!==this.type||t.querySelector("."+Ee.rangeBar).classList.add(Ee.sliderTabRange)),"Range"===this.type){var i=e.target.previousSibling;i&&i.classList.contains(Ee.sliderHandle)?this.activeHandle=2:this.activeHandle=1}this.getHandle().focus(),this.tooltipToggle(this.getHandle())}this.closeTooltip(),this.changeEvent("changed",e)},s.prototype.hover=function(e){if(!t.isNullOrUndefined(e))if("mouseover"===e.type||"touchmove"===e.type||"mousemove"===e.type||"pointermove"===e.type||"touchstart"===e.type)this.sliderContainer.classList.add(Ee.sliderHover);else{this.sliderContainer.classList.remove(Ee.sliderHover);var i=e.currentTarget;this.tooltip.isVisible&&"Always"!==this.tooltip.showOn&&this.tooltipObj&&this.isMaterialTooltip&&!i.classList.contains(Ee.sliderHandleFocused)&&!i.classList.contains(Ee.sliderTabHandle)&&this.closeMaterialTooltip()}},s.prototype.sliderFocusOut=function(e){e.relatedTarget!==this.secondHandle&&e.relatedTarget!==this.firstHandle&&e.relatedTarget!==this.element&&e.relatedTarget!==this.firstBtn&&e.relatedTarget!==this.secondBtn&&(this.closeMaterialTooltip(),this.closeTooltip(),this.element.querySelector("."+Ee.sliderTabHandle)&&this.element.querySelector("."+Ee.sliderTabHandle).classList.remove(Ee.sliderTabHandle),this.element.querySelector("."+Ee.sliderTabTrack)&&(this.element.querySelector("."+Ee.sliderTabTrack).classList.remove(Ee.sliderTabTrack),"Range"!==this.type&&"MinRange"!==this.type||!this.element.querySelector("."+Ee.sliderTabRange)||this.element.querySelector("."+Ee.sliderTabRange).classList.remove(Ee.sliderTabRange)),this.hiddenInput.focus(),this.hiddenInput.blur(),this.isElementFocused=!1)},s.prototype.removeElement=function(e){e.parentNode&&e.parentNode.removeChild(e)},s.prototype.changeSliderType=function(e,i){this.isMaterialTooltip&&this.materialHandle&&(this.sliderContainer.classList.remove(Ee.materialSlider),this.removeElement(this.materialHandle),this.materialHandle=void 0),this.removeElement(this.firstHandle),this.firstHandle=void 0,"Default"!==e&&("Range"===e&&(this.removeElement(this.secondHandle),this.secondHandle=void 0),this.removeElement(this.rangeBar),this.rangeBar=void 0),this.tooltip.isVisible&&!t.isNullOrUndefined(this.tooltipObj)&&(this.tooltipObj.destroy(),this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0),this.limits.enabled&&("MinRange"===e||"Default"===e?t.isNullOrUndefined(this.limitBarFirst)||(this.removeElement(this.limitBarFirst),this.limitBarFirst=void 0):t.isNullOrUndefined(this.limitBarSecond)||(this.removeElement(this.limitBarSecond),this.limitBarSecond=void 0)),this.activeHandle=1,this.getThemeInitialization(),"Range"===this.type&&this.rangeValueUpdate(),this.createRangeBar(),this.limits.enabled&&this.createLimitBar(),this.setHandler(),this.setOrientClass(),this.wireFirstHandleEvt(!this.enabled),"Range"===this.type&&this.wireSecondHandleEvt(!this.enabled),this.setValue(),this.tooltip.isVisible&&(this.renderTooltip(),this.wireMaterialTooltipEvent(!1)),this.setBarColor(),"tooltip"!==i&&this.updateConfig(),this.readonly&&(this.sliderContainer.classList.remove(Ee.readonly),this.setReadOnly())},s.prototype.changeRtl=function(){if(this.enableRtl||"Range"!==this.type||(this.value=[this.handleVal2,this.handleVal1]),this.updateConfig(),this.tooltip.isVisible&&this.tooltipObj.refresh(this.firstHandle),this.showButtons){var e=this.enableRtl&&"Vertical"!==this.orientation;t.attributes(e?this.secondBtn:this.firstBtn,{"aria-label":"Decrease",title:"Decrease"}),t.attributes(e?this.firstBtn:this.secondBtn,{"aria-label":"Increase",title:"Increase"})}},s.prototype.changeOrientation=function(){this.changeSliderType(this.type,"null")},s.prototype.updateConfig=function(){this.setEnableRTL(),this.setValue(),this.tooltip.isVisible&&this.refreshTooltip(this.tooltipTarget),"None"!==this.ticks.placement&&this.ul&&(this.removeElement(this.ul),this.ul=void 0,this.renderScale()),this.limitsPropertyChange()},s.prototype.limitsPropertyChange=function(){this.limits.enabled?(t.isNullOrUndefined(this.limitBarFirst)&&"Range"!==this.type&&this.createLimitBar(),t.isNullOrUndefined(this.limitBarFirst)&&t.isNullOrUndefined(this.limitBarSecond)&&"Range"===this.type&&this.createLimitBar(),this.setLimitBar(),this.setValue()):(t.isNullOrUndefined(this.limitBarFirst)||t.detach(this.limitBarFirst),t.isNullOrUndefined(this.limitBarSecond)||t.detach(this.limitBarSecond))},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.destroy=function(){e.prototype.destroy.call(this),this.unwireEvents(),window.removeEventListener("resize",this.onresize),t.removeClass([this.sliderContainer],[Ee.sliderDisabled]),this.firstHandle.removeAttribute("aria-orientation"),"Range"===this.type&&this.secondHandle.removeAttribute("aria-orientation"),this.sliderContainer.parentNode&&this.sliderContainer.parentNode.insertBefore(this.element,this.sliderContainer),t.detach(this.sliderContainer),this.tooltip.isVisible&&this.tooltipObj.destroy(),this.element.innerHTML="",this.hiddenInput=null,this.sliderContainer=null,this.sliderTrack=null,this.rangeBar=null,this.firstHandle=null,this.secondHandle=null,this.tickElementCollection=null,this.ul=null,this.firstBtn=null,this.secondBtn=null,this.materialHandle=null,this.tooltipObj=null,this.tooltipTarget=null,this.limitBarFirst=null,this.limitBarSecond=null,this.firstChild=null,this.lastChild=null,this.tooltipElement=null},s.prototype.onPropertyChanged=function(e,i){for(var s=this,n=0,a=Object.keys(e);n<a.length;n++){var r=a[n];switch(r){case"cssClass":this.setCSSClass(i.cssClass);break;case"value":if(e&&i){var l=t.isNullOrUndefined(e.value)?"Range"===this.type?[this.min,this.max]:this.min:e.value;this.setProperties({value:l},!0),t.isNullOrUndefined(i.value)||i.value.toString()===l.toString()||(this.setValue(),this.refreshTooltip(this.tooltipTarget),"Range"===this.type&&(t.isNullOrUndefined(e.value)||i.value[1]===l[1]?this.activeHandle=1:this.activeHandle=2))}break;case"min":case"step":case"max":this.setMinMaxValue();break;case"tooltip":t.isNullOrUndefined(e.tooltip)||t.isNullOrUndefined(i.tooltip)||(this.initialTooltip=!0,this.setTooltip(r),this.showButtons||this.wireEvents());break;case"type":t.isNullOrUndefined(i)||!Object.keys(i).length||t.isNullOrUndefined(i.type)||(this.changeSliderType(i.type,r),this.setZindex());break;case"enableRtl":i.enableRtl!==e.enableRtl&&"Vertical"!==this.orientation&&(this.rtl=i.enableRtl,this.changeRtl());break;case"limits":this.limitsPropertyChange();break;case"orientation":this.changeOrientation();break;case"ticks":t.isNullOrUndefined(this.sliderContainer.querySelector("."+Ee.scale))||(t.detach(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,function(e){e.match(/e-scale-/)&&s.sliderContainer.classList.remove(e)})),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex());break;case"locale":this.showButtons&&this.buttonTitle();break;case"showButtons":e.showButtons?(this.setButtons(),this.reposition(),this.enabled&&!this.readonly&&this.wireButtonEvt(!1)):this.firstBtn&&this.secondBtn&&(this.sliderContainer.removeChild(this.firstBtn),this.sliderContainer.removeChild(this.secondBtn),this.sliderContainer.classList.remove(Ee.sliderButtonClass),this.firstBtn=void 0,this.secondBtn=void 0,this.reposition());break;case"enabled":this.setEnabled();break;case"readonly":this.setReadOnly();break;case"customValues":this.setValue(),this.reposition();break;case"colorRange":this.reposition();break;case"width":this.setElementWidth(e.width),this.setMinMaxValue(),this.limits&&this.limitsPropertyChange()}}},s.prototype.setReadOnly=function(){this.readonly?(this.unwireEvents(),this.sliderContainer.classList.add(Ee.readonly)):(this.wireEvents(),this.sliderContainer.classList.remove(Ee.readonly))},s.prototype.setMinMaxValue=function(){var e=this;this.setValue(),this.refreshTooltip(this.tooltipTarget),t.isNullOrUndefined(this.sliderContainer.querySelector("."+Ee.scale))||this.ul&&(t.detach(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,function(t){t.match(/e-scale-/)&&e.sliderContainer.classList.remove(t)})),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex())},s.prototype.setZindex=function(){this.zIndex=6,t.isNullOrUndefined(this.ticks)||"None"===this.ticks.placement||t.isNullOrUndefined(this.ul)||t.isNullOrUndefined(this.element)||(this.ul.style.zIndex=this.zIndex+-7+"",this.element.style.zIndex=this.zIndex+2+""),this.isMaterial||this.isMaterial3||t.isNullOrUndefined(this.ticks)||"Both"!==this.ticks.placement||(this.element.style.zIndex=this.zIndex+2+""),t.isNullOrUndefined(this.firstHandle)||(this.firstHandle.style.zIndex=this.zIndex+3+""),"Range"!==this.type||t.isNullOrUndefined(this.secondHandle)||(this.secondHandle.style.zIndex=this.zIndex+4+"")},s.prototype.setTooltip=function(e){this.changeSliderType(this.type,e)},s.prototype.setBarColor=function(){for(var e,i,s=this.sliderTrack.lastElementChild;s;)this.sliderTrack.removeChild(s),s=this.sliderTrack.lastElementChild;for(var n=0;n<this.colorRange.length;n++)if(!t.isNullOrUndefined(this.colorRange[n].start)&&!t.isNullOrUndefined(this.colorRange[n].end)&&this.colorRange[n].end>this.colorRange[n].start){this.colorRange[n].start<this.min&&(this.colorRange[n].start=this.min),this.colorRange[n].end>this.max&&(this.colorRange[n].end=this.max);var a=this.checkHandlePosition(this.colorRange[n].start),r=this.checkHandlePosition(this.colorRange[n].end),l=this.createElement("div");l.style.backgroundColor=this.colorRange[n].color,l.style.border="1px solid "+this.colorRange[n].color,"Horizontal"===this.orientation?(i=Ee.sliderHorizantalColor,e=this.enableRtl?t.isNullOrUndefined(this.customValues)?this.checkHandlePosition(this.max)-this.checkHandlePosition(this.colorRange[n].end):this.checkHandlePosition(this.customValues.length-this.colorRange[n].end-1):this.checkHandlePosition(this.colorRange[n].start),l.style.width=r-a+"px",l.style.left=e+"px"):(i=Ee.sliderVerticalColor,e=this.checkHandlePosition(this.colorRange[n].start),l.style.height=r-a+"px",l.style.bottom=e+"px"),l.classList.add(i),this.sliderTrack.appendChild(l)}},s.prototype.getModuleName=function(){return"slider"},ve([t.Property(null)],s.prototype,"value",void 0),ve([t.Property(null)],s.prototype,"customValues",void 0),ve([t.Property(1)],s.prototype,"step",void 0),ve([t.Property(null)],s.prototype,"width",void 0),ve([t.Property(0)],s.prototype,"min",void 0),ve([t.Property(100)],s.prototype,"max",void 0),ve([t.Property(!1)],s.prototype,"readonly",void 0),ve([t.Property("Default")],s.prototype,"type",void 0),ve([t.Collection([{}],ye)],s.prototype,"colorRange",void 0),ve([t.Complex({},ge)],s.prototype,"ticks",void 0),ve([t.Complex({},be)],s.prototype,"limits",void 0),ve([t.Property(!0)],s.prototype,"enabled",void 0),ve([t.Complex({},Ce)],s.prototype,"tooltip",void 0),ve([t.Property(!1)],s.prototype,"showButtons",void 0),ve([t.Property(!0)],s.prototype,"enableAnimation",void 0),ve([t.Property("Horizontal")],s.prototype,"orientation",void 0),ve([t.Property("")],s.prototype,"cssClass",void 0),ve([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),ve([t.Event()],s.prototype,"created",void 0),ve([t.Event()],s.prototype,"change",void 0),ve([t.Event()],s.prototype,"changed",void 0),ve([t.Event()],s.prototype,"renderingTicks",void 0),ve([t.Event()],s.prototype,"renderedTicks",void 0),ve([t.Event()],s.prototype,"tooltipChange",void 0),s=ve([t.NotifyPropertyChanges],s)}(t.Component),Te=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Se=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Pe={EMAIL:new RegExp("^[A-Za-z0-9._%+-]{1,}@[A-Za-z0-9._%+-]{1,}([.]{1}[a-zA-Z0-9]{2,}|[.]{1}[a-zA-Z0-9]{2,4}[.]{1}[a-zA-Z0-9]{2,4})$"),URL:/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/m,DATE_ISO:new RegExp("^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"),DIGITS:new RegExp("^[0-9]*$"),PHONE:new RegExp("^[+]?[0-9]{9,13}$"),CREDITCARD:new RegExp("^\\d{13,16}$")};!function(e){e[e.Message=0]="Message",e[e.Label=1]="Label"}(e.ErrorOption||(e.ErrorOption={}));var Oe=function(i){function s(e,s){var n=i.call(this,s,e)||this;if(n.validated=[],n.errorRules=[],n.allowSubmit=!1,n.required="required",n.infoElement=null,n.inputElement=null,n.selectQuery="input:not([type=reset]):not([type=button]), select, textarea",n.localyMessage={},n.defaultMessages={required:"This field is required.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateIso:"Please enter a valid date ( ISO ).",creditcard:"Please enter valid card number",number:"Please enter a valid number.",digits:"Please enter only digits.",maxLength:"Please enter no more than {0} characters.",minLength:"Please enter at least {0} characters.",rangeLength:"Please enter a value between {0} and {1} characters long.",range:"Please enter a value between {0} and {1}.",max:"Please enter a value less than or equal to {0}.",min:"Please enter a value greater than or equal to {0}.",regex:"Please enter a correct value.",tel:"Please enter a valid phone number.",pattern:"Please enter a correct pattern value.",equalTo:"Please enter the valid match text"},void 0===n.rules&&(n.rules={}),n.l10n=new t.L10n("formValidator",n.defaultMessages,n.locale),n.locale&&n.localeFunc(),t.onIntlChange.on("notifyExternalChange",n.afterLocalization,n),e="string"==typeof e?t.select(e,document):e,null!=n.element)return n.element.setAttribute("novalidate",""),n.inputElements=t.selectAll(n.selectQuery,n.element),n.createHTML5Rules(),n.wireEvents(),n}Te(s,i),n=s,s.prototype.addRules=function(e,i){e&&(this.rules.hasOwnProperty(e)?t.extend(this.rules[""+e],i,{}):this.rules[""+e]=i)},s.prototype.removeRules=function(e,i){if(e||i)if(this.rules[""+e]&&!i)delete this.rules[""+e];else{if(t.isNullOrUndefined(this.rules[""+e]&&i))return;for(var s=0;s<i.length;s++)delete this.rules[""+e][i[parseInt(s.toString(),10)]]}else this.rules={}},s.prototype.validate=function(e){var t=Object.keys(this.rules);if(e&&t.length)return this.validateRules(e),-1!==t.indexOf(e)&&0===this.errorRules.filter(function(t){return t.name===e}).length;this.errorRules=[];for(var i=0,s=t;i<s.length;i++){var n=s[i];this.validateRules(n)}return 0===this.errorRules.length},s.prototype.reset=function(){this.element.reset(),this.clearForm()},s.prototype.getInputElement=function(e){return this.inputElement=t.select('[name="'+e+'"]',this.element),this.inputElement},s.prototype.destroy=function(){this.reset(),this.unwireEvents(),this.rules={};for(var e=0,s=t.selectAll("."+this.errorClass+", ."+this.validClass,this.element);e<s.length;e++){var n=s[e];t.detach(n)}i.prototype.destroy.call(this),this.infoElement=null,t.onIntlChange.off("notifyExternalChange",this.afterLocalization)},s.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"locale":this.localeFunc()}},s.prototype.localeFunc=function(){for(var e=0,t=Object.keys(this.defaultMessages);e<t.length;e++){var i=t[e];this.l10n.setLocale(this.locale);var s=this.l10n.getConstant(i);this.localyMessage[""+i]=s}},s.prototype.getModuleName=function(){return"formvalidator"},s.prototype.afterLocalization=function(e){this.locale=e.locale,this.localeFunc()},s.prototype.refresh=function(){this.unwireEvents(),this.inputElements=t.selectAll(this.selectQuery,this.element),this.wireEvents()},s.prototype.clearForm=function(){this.errorRules=[],this.validated=[];for(var e=0,i=t.selectAll(this.selectQuery,this.element);e<i.length;e++){var s=i[e];s.removeAttribute("aria-invalid");var n=s.parentElement,a=n.parentElement;n.classList.contains("e-control-wrapper")||n.classList.contains("e-wrapper")||s.classList.contains("e-input")&&n.classList.contains("e-input-group")?n.classList.remove(this.errorClass):null!=a&&(a.classList.contains("e-control-wrapper")||a.classList.contains("e-wrapper"))?a.classList.remove(this.errorClass):s.classList.remove(this.errorClass),s.name.length>0&&(this.getInputElement(s.name),this.getErrorElement(s.name),this.hideMessage(s.name)),n.classList.contains("e-control-wrapper")||n.classList.contains("e-wrapper")||s.classList.contains("e-input")&&n.classList.contains("e-input-group")?n.classList.remove(this.validClass):null!=a&&(a.classList.contains("e-control-wrapper")||a.classList.contains("e-wrapper"))?a.classList.remove(this.validClass):s.classList.remove(this.validClass)}},s.prototype.createHTML5Rules=function(){for(var e=["required","validateHidden","regex","rangeLength","maxLength","minLength","dateIso","digits","pattern","data-val-required","type","data-validation","min","max","range","equalTo","data-val-minlength-min","data-val-equalto-other","data-val-maxlength-max","data-val-range-min","data-val-regex-pattern","data-val-length-max","data-val-creditcard","data-val-phone"],t=["hidden","email","url","date","number","tel"],i=0,s=this.inputElements;i<s.length;i++){for(var n=s[i],a={},r=0,l=e;r<l.length;r++){var o=l[r];if(null!==n.getAttribute(o))switch(o){case"required":this.defRule(n,a,o,n.required);break;case"data-validation":o=n.getAttribute(o),this.defRule(n,a,o,!0);break;case"type":-1!==t.indexOf(n.type)&&this.defRule(n,a,n.type,!0);break;case"rangeLength":case"range":this.defRule(n,a,o,JSON.parse(n.getAttribute(o)));break;case"equalTo":var h=n.getAttribute(o);this.defRule(n,a,o,h);break;default:"true"===n.getAttribute("data-val")?this.annotationRule(n,a,o,n.getAttribute(o)):this.defRule(n,a,o,n.getAttribute(o))}}0!==Object.keys(a).length&&this.addRules(n.name,a)}},s.prototype.annotationRule=function(e,t,i,s){var n=i.split("-"),a=["required","creditcard","phone","maxlength","minlength","range","regex","equalto"],r=n[n.length-1],l=n[n.length-2];if(-1!==a.indexOf(r))switch(r){case"required":this.defRule(e,t,"required",s);break;case"creditcard":this.defRule(e,t,"creditcard",s);break;case"phone":this.defRule(e,t,"tel",s)}else if(-1!==a.indexOf(l))switch(l){case"maxlength":this.defRule(e,t,"maxLength",s);break;case"minlength":this.defRule(e,t,"minLength",s);break;case"range":var o=e.getAttribute("data-val-range-min"),h=e.getAttribute("data-val-range-max");this.defRule(e,t,"range",[o,h]);break;case"equalto":var p=e.getAttribute(i).split(".");this.defRule(e,t,"equalTo",p[p.length-1]);break;case"regex":this.defRule(e,t,"regex",s)}},s.prototype.defRule=function(e,t,i,s){var n,a=e.getAttribute("data-"+i+"-message"),r=e.getAttribute("data-val-"+i);this.rules[e.name]&&"validateHidden"!==i&&"hidden"!==i&&(this.getInputElement(e.name),n=this.getErrorMessage(this.rules[e.name][""+i],i)),a?s=[s,a]:r?s=[s,r]:n&&(s=[s,n]),t[""+i]=s},s.prototype.wireEvents=function(){for(var e=0,i=this.inputElements;e<i.length;e++){var s=i[e];n.isCheckable(s)?t.EventHandler.add(s,"click",this.clickHandler,this):"SELECT"===s.tagName?t.EventHandler.add(s,"change",this.changeHandler,this):(t.EventHandler.add(s,"focusout",this.focusOutHandler,this),t.EventHandler.add(s,"keyup",this.keyUpHandler,this))}t.EventHandler.add(this.element,"submit",this.submitHandler,this),t.EventHandler.add(this.element,"reset",this.resetHandler,this)},s.prototype.unwireEvents=function(){for(var e=0,i=this.inputElements;e<i.length;e++){var s=i[e];t.EventHandler.clearEvents(s)}t.EventHandler.remove(this.element,"submit",this.submitHandler),t.EventHandler.remove(this.element,"reset",this.resetHandler)},s.prototype.focusOutHandler=function(e){this.trigger("focusout",e);var t=e.target;this.rules[t.name]&&(this.rules[t.name][this.required]||t.value.length>0?this.validate(t.name):-1===this.validated.indexOf(t.name)&&this.validated.push(t.name))},s.prototype.keyUpHandler=function(e){this.trigger("keyup",e);var t=e.target,i=[16,17,18,20,35,36,37,38,39,40,45,144,225];(9!==e.which||this.rules[t.name]&&(!this.rules[t.name]||this.rules[t.name][this.required]))&&-1!==this.validated.indexOf(t.name)&&this.rules[t.name]&&-1===i.indexOf(e.which)&&this.validate(t.name)},s.prototype.clickHandler=function(e){this.trigger("click",e);var t=e.target;"submit"!==t.type?this.validate(t.name):null!==t.getAttribute("formnovalidate")&&(this.allowSubmit=!0)},s.prototype.changeHandler=function(e){this.trigger("change",e);var t=e.target;this.validate(t.name)},s.prototype.submitHandler=function(e){this.trigger("submit",e),this.allowSubmit||this.validate()?this.allowSubmit=!1:e.preventDefault()},s.prototype.resetHandler=function(){this.clearForm()},s.prototype.validateRules=function(e){if(this.rules[""+e]){var t=Object.keys(this.rules[""+e]),i=!1,s=!1,n=t.indexOf("validateHidden"),a=t.indexOf("hidden");if(this.getInputElement(e),-1!==a&&(i=!0),-1!==n&&(s=!0),!i||i&&s){-1!==n&&t.splice(n,1),-1!==a&&t.splice(a-1,1),this.getErrorElement(e);for(var r=0,l=t;r<l.length;r++){var o=l[r],h=this.getErrorMessage(this.rules[""+e][""+o],o),p={name:e,message:h},d={inputName:e,element:this.inputElement,message:h};if(!this.isValid(e,o)&&!this.inputElement.classList.contains(this.ignore)){this.removeErrorRules(e),this.errorRules.push(p),this.inputElement.setAttribute("aria-invalid","true"),this.inputElement.setAttribute("aria-describedby",this.inputElement.id+"-info");var u=this.inputElement.parentElement,c=u.parentElement;u.classList.contains("e-control-wrapper")||u.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&u.classList.contains("e-input-group")?(u.classList.add(this.errorClass),u.classList.remove(this.validClass)):null!=c&&(c.classList.contains("e-control-wrapper")||c.classList.contains("e-wrapper"))?(c.classList.add(this.errorClass),c.classList.remove(this.validClass)):(this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass)),this.infoElement?this.showMessage(p):this.createErrorElement(e,p.message,this.inputElement),d.errorElement=this.infoElement,d.status="failure",u.classList.contains("e-control-wrapper")||u.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&u.classList.contains("e-input-group")?(u.classList.add(this.errorClass),u.classList.remove(this.validClass)):null!=c&&(c.classList.contains("e-control-wrapper")||c.classList.contains("e-wrapper"))?(c.classList.add(this.errorClass),c.classList.remove(this.validClass)):(this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass)),this.optionalValidationStatus(e,d),this.trigger("validationComplete",d),"required"===o&&this.inputElement.setAttribute("aria-required","true");break}this.hideMessage(e),d.status="success",this.trigger("validationComplete",d)}}}},s.prototype.optionalValidationStatus=function(e,i){this.rules[""+e][this.required]||this.inputElement.value.length||t.isNullOrUndefined(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),i.status="",this.hideMessage(e))},s.prototype.isValid=function(e,i){var s=this.rules[""+e][""+i],a=s instanceof Array&&"string"==typeof s[1]?s[0]:s,r=this.rules[""+e][""+i],l="min"!==i&&"max"!==i||!this.rules[""+e].date||"string"!=typeof this.rules[""+e].date?null:this.rules[""+e].date,o={value:this.inputElement.value,param:a,element:this.inputElement,formElement:this.element,format:l,culture:this.locale};return this.trigger("validationBegin",o),!o.param&&"required"===i||(r&&"function"==typeof r[0]?r[0].call(this,{element:this.inputElement,value:this.inputElement.value}):n.isCheckable(this.inputElement)?"required"!==i||t.selectAll('input[name="'+e+'"]:checked',this.element).length>0:n.checkValidator[""+i](o))},s.prototype.getErrorMessage=function(e,i){var s=this.inputElement.getAttribute("data-"+i+"-message")?this.inputElement.getAttribute("data-"+i+"-message"):e instanceof Array&&"string"==typeof e[1]?e[1]:0!==Object.keys(this.localyMessage).length?this.localyMessage[""+i]:this.defaultMessages[""+i],n=s.match(/{(\d)}/g);if(!t.isNullOrUndefined(n))for(var a=0;a<n.length;a++){var r=e instanceof Array?e[parseInt(a.toString(),10)]:e;s=s.replace(n[parseInt(a.toString(),10)],r)}return s},s.prototype.createErrorElement=function(i,s,n){var a=t.createElement(this.errorElement,{className:this.errorClass,innerHTML:s,attrs:{for:i}});if(this.errorOption===e.ErrorOption.Message&&(a.classList.remove(this.errorClass),a.classList.add("e-message"),a=t.createElement(this.errorContainer,{className:this.errorClass,innerHTML:a.outerHTML})),a.id=this.inputElement.name+"-info",this.element.querySelector('[data-valmsg-for="'+n.id+'"]'))this.element.querySelector('[data-valmsg-for="'+n.id+'"]').appendChild(a);else if(!0===n.hasAttribute("data-msg-containerid")){var r=n.getAttribute("data-msg-containerid");t.select("#"+r,this.element).appendChild(a)}else if(null!=this.customPlacement)this.customPlacement.call(this,this.inputElement,a);else{var l=this.inputElement.parentElement,o=l.parentElement;l.classList.contains("e-control-wrapper")||l.classList.contains("e-wrapper")?o.insertBefore(a,l.nextSibling):o.classList.contains("e-control-wrapper")||o.classList.contains("e-wrapper")?o.parentElement.insertBefore(a,o.nextSibling):l.insertBefore(a,this.inputElement.nextSibling)}a.style.display="block",this.getErrorElement(i),this.validated.push(i),this.checkRequired(i)},s.prototype.getErrorElement=function(e){return this.infoElement=t.select(this.errorElement+"."+this.errorClass,this.inputElement.parentElement),this.infoElement||(this.infoElement=t.select(this.errorElement+"."+this.errorClass+'[for="'+e+'"]',this.element)),this.infoElement},s.prototype.removeErrorRules=function(e){for(var t=0;t<this.errorRules.length;t++)this.errorRules[parseInt(t.toString(),10)].name===e&&this.errorRules.splice(t,1)},s.prototype.showMessage=function(e){this.infoElement.style.display="block",this.infoElement.innerHTML=e.message,this.checkRequired(e.name)},s.prototype.hideMessage=function(e){if(this.infoElement){this.infoElement.style.display="none",this.removeErrorRules(e);var t=this.inputElement.parentElement,i=t.parentElement;t.classList.contains("e-control-wrapper")||t.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&t.classList.contains("e-input-group")?(t.classList.add(this.validClass),t.classList.remove(this.errorClass)):null!=i&&(i.classList.contains("e-control-wrapper")||i.classList.contains("e-wrapper"))?(i.classList.add(this.validClass),i.classList.remove(this.errorClass)):(this.inputElement.classList.add(this.validClass),this.inputElement.classList.remove(this.errorClass)),this.inputElement.setAttribute("aria-invalid","false")}},s.prototype.checkRequired=function(e){this.rules[""+e][this.required]||this.inputElement.value.length||t.isNullOrUndefined(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),this.hideMessage(e))},s.isCheckable=function(e){var t=e.getAttribute("type");return t&&("checkbox"===t||"radio"===t||"submit"===t)};var n;return s.checkValidator={required:function(e){return isNaN(Date.parse(e.value))?e.value.toString().length>0:!isNaN(new Date(e.value).getTime())},email:function(e){return Pe.EMAIL.test(e.value)},url:function(e){return Pe.URL.test(e.value)},dateIso:function(e){return Pe.DATE_ISO.test(e.value)},tel:function(e){return Pe.PHONE.test(e.value)},creditcard:function(e){return Pe.CREDITCARD.test(e.value)},number:function(e){return!isNaN(Number(e.value))&&-1===String(e.value).indexOf(" ")},digits:function(e){return Pe.DIGITS.test(e.value)},maxLength:function(e){return e.value.length<=Number(e.param)},minLength:function(e){return e.value.length>=Number(e.param)},rangeLength:function(e){var t=e.param;return e.value.length>=t[0]&&e.value.length<=t[1]},range:function(e){var t=e.param;return!isNaN(Number(e.value))&&Number(e.value)>=t[0]&&Number(e.value)<=t[1]},date:function(e){if(t.isNullOrUndefined(e.param)||"string"!=typeof e.param||""===e.param)return!isNaN(new Date(e.value).getTime());var i=e.culture&&""!==e.culture?new t.Internationalization(e.culture):new t.Internationalization,s={format:e.param.toString(),type:"dateTime",skeleton:"yMd"},n=i.parseDate(e.value,s);return!t.isNullOrUndefined(n)&&n instanceof Date&&!isNaN(+n)},max:function(e){if(!isNaN(Number(e.value)))return+e.value<=+e.param;if(e.format&&""!==e.format){var i=e.culture&&""!==e.culture?new t.Internationalization(e.culture):new t.Internationalization,s={format:e.format.toString(),type:"dateTime",skeleton:"yMd"},n=i.parseDate(e.value,s),a="string"==typeof e.param?i.parseDate(JSON.parse(JSON.stringify(e.param)),s):e.param;return new Date(n).getTime()<=new Date(a).getTime()}return new Date(e.value).getTime()<=new Date(JSON.parse(JSON.stringify(e.param))).getTime()},min:function(e){if(isNaN(Number(e.value))){if(-1!==e.value.indexOf(",")){var i=e.value.replace(/,/g,"");return parseFloat(i)>=Number(e.param)}if(e.format&&""!==e.format){var s=e.culture&&""!==e.culture?new t.Internationalization(e.culture):new t.Internationalization,n={format:e.format.toString(),type:"dateTime",skeleton:"yMd"},a=s.parseDate(e.value,n),r="string"==typeof e.param?s.parseDate(JSON.parse(JSON.stringify(e.param)),n):e.param;return new Date(a).getTime()>=new Date(r).getTime()}return new Date(e.value).getTime()>=new Date(JSON.parse(JSON.stringify(e.param))).getTime()}return+e.value>=+e.param},regex:function(e){return new RegExp(e.param).test(e.value)},equalTo:function(e){var t=e.formElement.querySelector("#"+e.param);return e.param=t.value,e.param===e.value}},Se([t.Property("")],s.prototype,"locale",void 0),Se([t.Property("e-hidden")],s.prototype,"ignore",void 0),Se([t.Property()],s.prototype,"rules",void 0),Se([t.Property("e-error")],s.prototype,"errorClass",void 0),Se([t.Property("e-valid")],s.prototype,"validClass",void 0),Se([t.Property("label")],s.prototype,"errorElement",void 0),Se([t.Property("div")],s.prototype,"errorContainer",void 0),Se([t.Property(e.ErrorOption.Label)],s.prototype,"errorOption",void 0),Se([t.Event()],s.prototype,"focusout",void 0),Se([t.Event()],s.prototype,"keyup",void 0),Se([t.Event()],s.prototype,"click",void 0),Se([t.Event()],s.prototype,"change",void 0),Se([t.Event()],s.prototype,"submit",void 0),Se([t.Event()],s.prototype,"validationBegin",void 0),Se([t.Event()],s.prototype,"validationComplete",void 0),Se([t.Event()],s.prototype,"customPlacement",void 0),s=n=Se([t.NotifyPropertyChanges],s)}(t.Base),ke=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)}}(),we=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Le="e-upload-file-list",Ae="e-file-status",He="e-file-remove-btn",Ne="e-file-delete-btn",Be="e-file-abort-btn",Re="e-file-reload-btn",Ue="e-upload-progress-wrap",Ie="e-upload-progress-bar",Fe="e-upload-success",Ve="e-upload-fails",Me="e-file-pause-btn",De=["title","style","class"],We=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),we([t.Property("")],i.prototype,"name",void 0),we([t.Property(null)],i.prototype,"size",void 0),we([t.Property("")],i.prototype,"type",void 0),i}(t.ChildProperty),ze=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),we([t.Property("Browse...")],i.prototype,"browse",void 0),we([t.Property("Upload")],i.prototype,"upload",void 0),we([t.Property("Clear")],i.prototype,"clear",void 0),i}(t.ChildProperty),qe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ke(i,e),we([t.Property("")],i.prototype,"saveUrl",void 0),we([t.Property("")],i.prototype,"removeUrl",void 0),we([t.Property(0)],i.prototype,"chunkSize",void 0),we([t.Property(3)],i.prototype,"retryCount",void 0),we([t.Property(500)],i.prototype,"retryAfterDelay",void 0),i}(t.ChildProperty),je=function(e){function s(t,i){var s=e.call(this,t,i)||this;return s.initialAttr={accept:null,multiple:!1,disabled:!1},s.uploadedFilesData=[],s.base64String=[],s.isForm=!1,s.allTypes=!1,s.pausedData=[],s.uploadMetaData=[],s.tabIndex="0",s.btnTabIndex="0",s.disableKeyboardNavigation=!1,s.count=-1,s.actionCompleteCount=0,s.flag=!0,s.selectedFiles=[],s.uploaderName="UploadFiles",s.fileStreams=[],s.newFileRef=0,s.isFirstFileOnSelection=!1,s.dragCounter=0,s.fileList=[],s.filesData=[],s.uploaderOptions=t,s}return ke(s,e),s.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"allowedExtensions":this.setExtensions(this.allowedExtensions),this.clearAll();break;case"enabled":this.setControlStatus();break;case"multiple":this.setMultipleSelection();break;case"enableRtl":this.setRTL(),this.reRenderFileList();break;case"buttons":this.buttons.browse=t.isNullOrUndefined(this.buttons.browse)?"":this.buttons.browse,this.buttons.clear=t.isNullOrUndefined(this.buttons.clear)?"":this.buttons.clear,this.buttons.upload=t.isNullOrUndefined(this.buttons.upload)?"":this.buttons.upload,this.renderButtonTemplates();break;case"dropArea":this.unBindDropEvents(),this.updateDropArea();break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHTMLAttributes(!0);break;case"files":this.renderPreLoadFiles();break;case"directoryUpload":this.updateDirectoryAttributes();break;case"template":this.isReact?this.reRenderFileList():this.clearAll();break;case"minFileSize":case"maxFileSize":case"autoUpload":case"sequentialUpload":this.clearAll();break;case"locale":this.l10n.setLocale(this.locale),this.setLocalizedTexts(),this.preLocaleObj=t.getValue("currentLocale",this.l10n);break;case"cssClass":this.setCSSClass(i.cssClass)}},s.prototype.setLocalizedTexts=function(){t.isNullOrUndefined(this.template)&&("string"==typeof this.buttons.browse&&(this.browseButton.innerText="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.innerText),this.uploadWrapper&&!t.isNullOrUndefined(this.uploadWrapper.querySelector(".e-file-drop"))&&(this.uploadWrapper.querySelector(".e-file-drop").innerHTML=this.localizedTexts("dropFilesHint"))),this.updateFileList())},s.prototype.getKeyValue=function(e){for(var t,i=0,s=Object.keys(this.preLocaleObj);i<s.length;i++){var n=s[i];this.preLocaleObj[""+n]===e&&(t=n)}return t},s.prototype.updateFileList=function(){if(this.fileList.length>0&&!t.isNullOrUndefined(this.uploadWrapper.querySelector(".e-upload-files")))for(var e=0;e<this.fileList.length;e++)this.fileList[e].querySelector(".e-file-status").innerHTML=this.localizedTexts(this.getKeyValue(this.filesData[e].status)),this.filesData[e].status=this.localizedTexts(this.getKeyValue(this.filesData[e].status)),this.fileList[e].classList.contains(Fe)&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("delete")),this.fileList[e].querySelector(".e-file-play-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("resume")),this.fileList[e].querySelector(".e-file-remove-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("remove")),this.fileList[e].querySelector(".e-file-reload-btn")&&this.fileList[e].querySelector(".e-icons").setAttribute("title",this.localizedTexts("retry")),this.autoUpload||(this.uploadButton.innerText="Upload"===this.buttons.upload?this.localizedTexts("Upload"):this.buttons.upload,this.uploadButton.setAttribute("title",this.localizedTexts("Upload")),this.clearButton.innerText="Clear"===this.buttons.clear?this.localizedTexts("Clear"):this.buttons.clear,this.clearButton.setAttribute("title",this.localizedTexts("Clear")))},s.prototype.reRenderFileList=function(){this.listParent&&(t.detach(this.listParent),this.listParent=null,this.fileList=[],this.internalCreateFileList(this.filesData),this.actionButtons&&(this.removeActionButtons(),this.renderActionButtons(),this.checkActionButtonStatus()))},s.prototype.preRender=function(){this.localeText={Browse:"Browse...",Clear:"Clear",Upload:"Upload",invalidFileName:"File Name is not allowed",dropFilesHint:"Or drop files here",invalidMaxFileSize:"File size is too large",invalidMinFileSize:"File size is too small",invalidFileType:"File type is not allowed",uploadFailedMessage:"File failed to upload",uploadSuccessMessage:"File uploaded successfully",removedSuccessMessage:"File removed successfully",removedFailedMessage:"Unable to remove file",inProgress:"Uploading",readyToUploadMessage:"Ready to upload",abort:"Abort",remove:"Remove",cancel:"Cancel",delete:"Delete file",pauseUpload:"File upload paused",pause:"Pause",resume:"Resume",retry:"Retry",fileUploadCancel:"File upload canceled",invalidFileSelection:"Invalid files selected",totalFiles:"Total files",size:"Size"},this.l10n=new t.L10n("uploader",this.localeText,this.locale),this.preLocaleObj=t.getValue("currentLocale",this.l10n),this.formRendered(),this.updateHTMLAttrToElement(),this.checkHTMLAttributes(!1);var e=t.getValue("ej2_instances",this.element);if("EJS-UPLOADER"===this.element.tagName){var i=this.createElement("input",{attrs:{type:"file"}}),s=0;for(s;s<this.element.attributes.length;s++)"id"!==this.element.attributes[s].nodeName?i.setAttribute(this.element.attributes[s].nodeName,this.element.attributes[s].nodeValue):"id"===this.element.attributes[s].nodeName&&i.setAttribute(this.element.attributes[s].nodeName,t.getUniqueID("uploader")),i.innerHTML=this.element.innerHTML;i.hasAttribute("name")||i.setAttribute("name","UploadFiles"),this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}e[0].isPureReactComponent&&(t.isNullOrUndefined(e[0].props.name)?!t.isNullOrUndefined(e[0].props.id)&&t.isNullOrUndefined(e[0].props.name)?this.element.setAttribute("name",e[0].props.id):this.element.setAttribute("name","UploadFiles"):this.element.setAttribute("name",e[0].props.name)),t.isNullOrUndefined(this.element.getAttribute("name"))&&this.element.setAttribute("name",this.element.getAttribute("id")),this.element.hasAttribute("type")||this.element.setAttribute("type","file"),this.updateDirectoryAttributes(),this.keyConfigs={enter:"enter"},this.element.hasAttribute("tabindex")&&(this.tabIndex=this.element.getAttribute("tabindex")),this.browserName=t.Browser.info.name,this.uploaderName=this.element.getAttribute("name")},s.prototype.formRendered=function(){var e=t.closest(this.element,"form");if(!t.isNullOrUndefined(e))for(;e&&e!==document.documentElement;e=e.parentElement)"FORM"===e.tagName&&(this.isForm=!0,this.formElement=e,e.setAttribute("enctype","multipart/form-data"),e.setAttribute("encoding","multipart/form-data"))},s.prototype.getPersistData=function(){return this.addOnPersist(["filesData"])},s.prototype.getModuleName=function(){return"uploader"},s.prototype.updateDirectoryAttributes=function(){this.directoryUpload?(this.element.setAttribute("directory","true"),this.element.setAttribute("webkitdirectory","true")):(this.element.removeAttribute("directory"),this.element.removeAttribute("webkitdirectory"))},s.prototype.render=function(){this.renderBrowseButton(),this.initializeUpload(),this.updateHTMLAttrToWrapper(),this.wireEvents(),this.setMultipleSelection(),this.setExtensions(this.allowedExtensions),this.setRTL(),this.renderPreLoadFiles(),this.setControlStatus(),this.setCSSClass()},s.prototype.renderBrowseButton=function(){this.browseButton=this.createElement("button",{className:"e-css e-btn",attrs:{type:"button"}}),this.browseButton.setAttribute("tabindex",this.tabIndex),"string"==typeof this.buttons.browse?(this.browseButton.textContent="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.innerText)):this.browseButton.appendChild(this.buttons.browse),this.element.setAttribute("aria-label","Uploader")},s.prototype.renderActionButtons=function(){this.element.setAttribute("tabindex","-1"),this.actionButtons=this.createElement("div",{className:"e-upload-actions"}),this.uploadButton=this.createElement("button",{className:"e-file-upload-btn e-css e-btn e-flat e-primary",attrs:{type:"button",tabindex:this.btnTabIndex,"aria-label":this.localizedTexts("Upload")}}),this.clearButton=this.createElement("button",{className:"e-file-clear-btn e-css e-btn e-flat",attrs:{type:"button",tabindex:this.btnTabIndex,"aria-label":this.localizedTexts("Clear")}}),this.actionButtons.appendChild(this.clearButton),this.actionButtons.appendChild(this.uploadButton),this.renderButtonTemplates(),this.uploadWrapper.appendChild(this.actionButtons),this.browseButton.blur(),this.isPreloadFiles||this.uploadButton.focus(),this.wireActionButtonEvents()},s.prototype.serverActionButtonsEventBind=function(e){e&&!this.isForm&&(this.browseButton.blur(),this.actionButtons=e,this.uploadButton=this.actionButtons.querySelector(".e-file-upload-btn"),this.clearButton=this.actionButtons.querySelector(".e-file-clear-btn"),this.uploadButton.focus(),this.unwireActionButtonEvents(),this.wireActionButtonEvents(),this.checkActionButtonStatus())},s.prototype.wireActionButtonEvents=function(){t.EventHandler.add(this.uploadButton,"click",this.uploadButtonClick,this),t.EventHandler.add(this.clearButton,"click",this.clearButtonClick,this)},s.prototype.unwireActionButtonEvents=function(){t.EventHandler.remove(this.uploadButton,"click",this.uploadButtonClick),t.EventHandler.remove(this.clearButton,"click",this.clearButtonClick)},s.prototype.removeActionButtons=function(){this.actionButtons&&(this.unwireActionButtonEvents(),t.detach(this.actionButtons),this.actionButtons=null)},s.prototype.renderButtonTemplates=function(){if("string"==typeof this.buttons.browse?(this.browseButton.textContent="Browse..."===this.buttons.browse?this.localizedTexts("Browse"):this.buttons.browse,this.browseButton.setAttribute("title",this.browseButton.textContent)):(this.browseButton.innerHTML="",this.browseButton.appendChild(this.buttons.browse)),this.uploadButton){var e=t.isNullOrUndefined(this.buttons.upload)?"Upload":this.buttons.upload;this.buttons.upload=e,"string"==typeof this.buttons.upload?(this.uploadButton.textContent="Upload"===this.buttons.upload?this.localizedTexts("Upload"):this.buttons.upload,this.uploadButton.setAttribute("title",this.uploadButton.textContent)):(this.uploadButton.innerHTML="",this.uploadButton.appendChild(this.buttons.upload))}if(this.clearButton){var i=t.isNullOrUndefined(this.buttons.clear)?"Clear":this.buttons.clear;this.buttons.clear=i,"string"==typeof this.buttons.clear?(this.clearButton.textContent="Clear"===this.buttons.clear?this.localizedTexts("Clear"):this.buttons.clear,this.clearButton.setAttribute("title",this.clearButton.textContent)):(this.clearButton.innerHTML="",this.clearButton.appendChild(this.buttons.clear))}},s.prototype.initializeUpload=function(){this.element.setAttribute("tabindex","-1");var e=this.createElement("span",{className:"e-file-select"});this.element.parentElement.insertBefore(e,this.element),this.dropAreaWrapper=this.createElement("div",{className:"e-file-select-wrap"}),this.element.parentElement.insertBefore(this.dropAreaWrapper,this.element),e.appendChild(this.element),this.dropAreaWrapper.appendChild(this.browseButton),this.dropAreaWrapper.appendChild(e),this.uploadWrapper=this.createElement("div",{className:"e-upload e-control-wrapper"}),this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper,this.dropAreaWrapper),this.uploadWrapper.appendChild(this.dropAreaWrapper),this.setDropArea()},s.prototype.renderPreLoadFiles=function(){if(this.files.length){if(this.enablePersistence&&this.filesData.length)return void this.internalCreateFileList(this.filesData);if(t.isNullOrUndefined(this.files[0].size))return;this.isPreloadFiles=!0;var e=[].slice.call(this.files),i=[];this.multiple||(this.clearData(),e=[e[0]]);for(var s=0,n=e;s<n.length;s++){var a=n[s],r={name:a.name+"."+a.type.split(".")[a.type.split(".").length-1],rawFile:"",size:a.size,status:this.localizedTexts("uploadSuccessMessage"),type:a.type,validationMessages:{minSize:"",maxSize:""},statusCode:"2"};i.push(r),this.filesData.push(r)}this.internalCreateFileList(i),this.autoUpload||!this.listParent||this.actionButtons||this.isForm&&!this.allowUpload()||!this.showFileList||this.renderActionButtons(),this.checkActionButtonStatus(),this.sequentialUpload&&(this.count=this.filesData.length-1),this.isPreloadFiles=!1}},s.prototype.checkActionButtonStatus=function(){if(this.actionButtons){var e=this.uploadWrapper.querySelectorAll(".e-validation-fails").length+this.uploadWrapper.querySelectorAll(".e-upload-fails:not(.e-upload-progress)").length+this.uploadWrapper.querySelectorAll("span."+Fe).length+this.uploadWrapper.querySelectorAll("span.e-upload-progress").length;e>0&&e===this.uploadWrapper.querySelectorAll("li").length?this.uploadButton.setAttribute("disabled","disabled"):this.uploadButton.removeAttribute("disabled")}},s.prototype.setDropArea=function(){var e=this.dropAreaWrapper.querySelector(".e-file-drop");if(this.dropArea){this.dropZoneElement="string"!=typeof this.dropArea?this.dropArea:t.select(this.dropArea,document);for(var i=this.element,s=!1;i.parentNode;)(i=i.parentNode)===this.dropZoneElement&&(s=!0,e?e.innerHTML=this.localizedTexts("dropFilesHint"):this.createDropTextHint());!s&&e&&t.remove(e)}else t.isNullOrUndefined(this.uploaderOptions)||void 0!==this.uploaderOptions.dropArea||(this.createDropTextHint(),this.dropZoneElement=this.uploadWrapper,this.setProperties({dropArea:this.uploadWrapper},!0));this.bindDropEvents()},s.prototype.updateDropArea=function(){if(this.dropArea)this.setDropArea();else{this.dropZoneElement=null;var e=this.dropAreaWrapper.querySelector(".e-file-drop");e&&t.remove(e)}},s.prototype.createDropTextHint=function(){var e=this.createElement("span",{className:"e-file-drop"});e.innerHTML=this.localizedTexts("dropFilesHint"),this.dropAreaWrapper.appendChild(e)},s.prototype.updateHTMLAttrToElement=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];De.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateHTMLAttrToWrapper=function(){if(!t.isNullOrUndefined(this.htmlAttributes))for(var e=0,i=Object.keys(this.htmlAttributes);e<i.length;e++){var s=i[e];if(De.indexOf(s)>-1)if("class"===s){var n=this.htmlAttributes[""+s].replace(/\s+/g," ").trim();""!==n&&t.addClass([this.uploadWrapper],n.split(" "))}else if("style"===s){var a=this.uploadWrapper.getAttribute(s);a=t.isNullOrUndefined(a)?this.htmlAttributes[""+s]:a+this.htmlAttributes[""+s],this.uploadWrapper.setAttribute(s,a)}else this.uploadWrapper.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.setMultipleSelection=function(){if(this.multiple&&!this.element.hasAttribute("multiple")){var e=document.createAttribute("multiple");e.value="multiple",this.element.setAttributeNode(e)}else this.multiple||this.element.removeAttribute("multiple")},s.prototype.checkAutoUpload=function(e){this.autoUpload?(this.sequentialUpload?this.sequenceUpload(e):this.upload(e),this.removeActionButtons()):this.actionButtons||this.renderActionButtons(),this.checkActionButtonStatus()},s.prototype.sequenceUpload=function(e){if(this.filesData.length-e.length==0||"1"!==this.filesData[this.filesData.length-e.length-1].statusCode){(this.multiple||this.count<0)&&++this.count;var t=!this.showFileList;"object"==typeof this.filesData[this.count]?(this.isFirstFileOnSelection=!1,this.upload(this.filesData[this.count],t),"0"===this.filesData[this.count].statusCode&&this.sequenceUpload(e)):--this.count}},s.prototype.setCSSClass=function(e){var i=e;t.isNullOrUndefined(e)||(i=e.replace(/\s+/g," ").trim()),t.isNullOrUndefined(e)||""===i||t.removeClass([this.uploadWrapper],i.split(" "));var s=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(s=this.cssClass.replace(/\s+/g," ").trim()),t.isNullOrUndefined(this.cssClass)||""===s||t.addClass([this.uploadWrapper],s.split(s.indexOf(",")>-1?",":" "))},s.prototype.wireEvents=function(){t.EventHandler.add(this.browseButton,"click",this.browseButtonClick,this),t.EventHandler.add(this.element,"change",this.onSelectFiles,this),t.EventHandler.add(document,"click",this.removeFocus,this),this.keyboardModule=new t.KeyboardEvents(this.uploadWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.resetForm,this)},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.browseButton,"click",this.browseButtonClick),t.EventHandler.remove(this.element,"change",this.onSelectFiles),t.EventHandler.remove(document,"click",this.removeFocus),this.isForm&&t.EventHandler.remove(this.formElement,"reset",this.resetForm),this.keyboardModule&&this.keyboardModule.destroy()},s.prototype.resetForm=function(){this.clearAll()},s.prototype.keyActionHandler=function(e){var i=e.target;switch(e.action){case"enter":if(e.target===this.clearButton)this.clearButtonClick();else if(e.target===this.uploadButton)this.uploadButtonClick();else if(e.target===this.browseButton)this.browseButtonClick();else if(i.classList.contains(Me))(s=this.getCurrentMetaData(null,e)).file.statusCode="4",s.file.status=this.localizedTexts("pauseUpload"),this.abortUpload(s,!1);else if(i.classList.contains("e-file-play-btn"))this.resumeUpload(this.getCurrentMetaData(null,e),e);else if(i.classList.contains(Re)){var s=this.getCurrentMetaData(null,e);if(t.isNullOrUndefined(s)){var n=e.target.parentElement,a=this.filesData[this.fileList.indexOf(n)];this.retry(a)}else s.file.statusCode="1",s.file.status=this.localizedTexts("readyToUploadMessage"),this.chunkUpload(s.file)}else this.removeFiles(e),i.classList.contains(Be)||this.browseButton.focus();e.preventDefault(),e.stopPropagation()}},s.prototype.getCurrentMetaData=function(e,i){var s,n;if(t.isNullOrUndefined(e)){var a=i.target.parentElement;s=this.filesData[this.fileList.indexOf(a)]}else s=e;for(var r=0;r<this.uploadMetaData.length;r++)this.uploadMetaData[r].file.name===s.name&&(n=this.uploadMetaData[r]);return n},s.prototype.removeFocus=function(){this.uploadWrapper&&this.listParent&&this.listParent.querySelector(".e-clear-icon-focus")&&(document.activeElement.blur(),this.listParent.querySelector(".e-clear-icon-focus").classList.remove("e-clear-icon-focus"))},s.prototype.browseButtonClick=function(){this.element.click()},s.prototype.uploadButtonClick=function(){this.sequentialUpload?this.sequenceUpload(this.filesData):this.upload(this.filesData)},s.prototype.clearButtonClick=function(){this.clearAll(),this.sequentialUpload&&(this.count=-1),this.actionCompleteCount=0},s.prototype.bindDropEvents=function(){this.dropZoneElement&&(t.EventHandler.add(this.dropZoneElement,"drop",this.dropElement,this),t.EventHandler.add(this.dropZoneElement,"dragover",this.dragHover,this),t.EventHandler.add(this.dropZoneElement,"dragleave",this.onDragLeave,this),t.EventHandler.add(this.dropZoneElement,"paste",this.onPasteFile,this),t.EventHandler.add(this.dropZoneElement,"dragenter",this.onDragEnter,this))},s.prototype.unBindDropEvents=function(){this.dropZoneElement&&(t.EventHandler.remove(this.dropZoneElement,"drop",this.dropElement),t.EventHandler.remove(this.dropZoneElement,"dragover",this.dragHover),t.EventHandler.remove(this.dropZoneElement,"dragleave",this.onDragLeave),t.EventHandler.remove(this.dropZoneElement,"dragenter",this.onDragEnter))},s.prototype.onDragEnter=function(e){this.enabled&&(this.dropZoneElement.classList.add("e-upload-drag-hover"),this.dragCounter=this.dragCounter+1,e.preventDefault(),e.stopPropagation())},s.prototype.onDragLeave=function(){this.enabled&&(this.dragCounter=this.dragCounter-1,this.dragCounter||this.dropZoneElement.classList.remove("e-upload-drag-hover"))},s.prototype.dragHover=function(e){this.enabled&&("Default"!==this.dropEffect&&(e.dataTransfer.dropEffect=this.dropEffect.toLowerCase()),e.preventDefault(),e.stopPropagation())},s.prototype.dropElement=function(e){this.dragCounter=0,this.dropZoneElement.classList.remove("e-upload-drag-hover"),this.onSelectFiles(e),e.preventDefault(),e.stopPropagation()},s.prototype.onPasteFile=function(e){var i=e.clipboardData.items;if("paste"===e.type&&"msie"!==this.browserName&&"edge"!==this.browserName&&"safari"!==this.browserName&&(this.element.files=e.clipboardData.files),1===i.length||this.multiple)for(var s=0;s<i.length;s++){var n=[].slice.call(i)[s];t.isNullOrUndefined(n.getAsFile())||"file"!==n.kind&&!n.type.match("^image/")||this.renderSelectedFiles(e,[n.getAsFile()],!1,!0)}},s.prototype.getSelectedFiles=function(e){for(var t=[],i=this.fileList[e],s=this.getFilesData(),n=+i.getAttribute("data-files-count"),a=0,r=0;r<e;r++)a+=+this.fileList[r].getAttribute("data-files-count");for(var l=a;l<a+n;l++)t.push(s[l]);return t},s.prototype.removeFiles=function(e){if(this.enabled){var s=e.target.parentElement,n=this.fileList.indexOf(s),a=this.fileList[n],r=this.isFormUpload(),l=r?this.getSelectedFiles(n):this.getFilesInArray(this.filesData[n]);if(!t.isNullOrUndefined(l)){if(e.target.classList.contains(Be)&&!r){if(l[0].statusCode="5",!t.isNullOrUndefined(a)){var o=a.querySelector("."+Be);i.createSpinner({target:o,width:"20px"}),i.showSpinner(o)}this.sequentialUpload&&this.uploadSequential(),a.classList.contains("e-restrict-retry")||this.checkActionComplete(!0)}else t.closest(e.target,".e-spinner-pane")||this.remove(l,!1,!1,!0,e);if(this.isForm&&a&&a.classList.contains("e-file-invalid")&&(this.element.value=""),this.checkActionButtonStatus(),this.actionButtons&&this.clearButton&&this.uploadWrapper){var h=this.uploadWrapper.querySelectorAll(".e-upload-progress-bar.e-upload-progress:not(.e-upload-success):not(.e-upload-fails)");1===h.length&&s.contains(h[0])&&this.clearButton.hasAttribute("disabled")&&this.clearButton.removeAttribute("disabled")}}}},s.prototype.removeFilesData=function(e,i){var s;if(i)return void(this.showFileList||(s=this.filesData.indexOf(e),this.filesData.splice(s,1)));var n=this.getLiElement(e);t.isNullOrUndefined(n)||(this.element.value="",t.detach(n),s=this.fileList.indexOf(n),this.fileList.splice(s,1),this.filesData.splice(s,1),0!==this.fileList.length||t.isNullOrUndefined(this.listParent)||(t.detach(this.listParent),this.listParent=null,this.removeActionButtons()),this.sequentialUpload&&s<=this.count&&--this.count)},s.prototype.removeUploadedFile=function(e,i,s,n){var a=this,r=e,l=new t.Ajax(this.asyncSettings.removeUrl,"POST",!0,null);l.emitError=!1;var o=new FormData;l.beforeSend=function(t){i.currentRequest=l.httpRequest,s?a.removingEventCallback(i,o,r,e):a.trigger("removing",i,function(i){i.cancel?t.cancel=!0:a.removingEventCallback(i,o,r,e)})},l.onLoad=function(e){return a.removeCompleted(e,r,n),{}},l.onError=function(e){return a.removeFailed(e,r,n),{}},l.send(o)},s.prototype.removingEventCallback=function(e,s,n,a){var r=this.element.getAttribute("name"),l=this.getLiElement(a);if(!(t.isNullOrUndefined(l)||t.isNullOrUndefined(l.querySelector("."+Ne))&&t.isNullOrUndefined(l.querySelector("."+He)))){var o=l.querySelector("."+Ne)?l.querySelector("."+Ne):l.querySelector("."+He);i.createSpinner({target:o,width:"20px"}),i.showSpinner(o)}e.postRawFile&&!t.isNullOrUndefined(n.rawFile)&&""!==n.rawFile?s.append(r,n.rawFile,n.name):s.append(r,n.name),this.updateFormData(s,e.customFormData)},s.prototype.updateFormData=function(e,t){if(t.length>0&&t[0])for(var i=0;i<t.length;i++)!function(i){var s=t[i],n=Object.keys(s).map(function(e){return s[""+e]});e.append(Object.keys(s)[0],n)}(i)},s.prototype.updateCustomheader=function(e,t){if(t.length>0&&t[0])for(var i=0;i<t.length;i++)!function(i){var s=t[i],n=Object.keys(s).map(function(e){return s[""+e]});e.setRequestHeader(Object.keys(s)[0],n)}(i)},s.prototype.removeCompleted=function(e,t,i){var s=e&&e.currentTarget?this.getResponse(e):null,n=e.target;if(4===n.readyState&&n.status>=200&&n.status<=299){var a={e:e,response:s,operation:"remove",file:this.updateStatus(t,this.localizedTexts("removedSuccessMessage"),"2")};this.trigger("success",a),this.removeFilesData(t,i);var r=this.uploadedFilesData.indexOf(t);this.uploadedFilesData.splice(r,1),this.trigger("change",{files:this.uploadedFilesData})}else this.removeFailed(e,t,i)},s.prototype.removeFailed=function(e,s,n){var a={e:e,response:e&&e.currentTarget?this.getResponse(e):null,operation:"remove",file:this.updateStatus(s,this.localizedTexts("removedFailedMessage"),"0")};if(!n){var r=this.filesData.indexOf(s),l=this.fileList[r];if(l){l.classList.remove(Fe),l.classList.add(Ve);var o=l.querySelector("."+Ae);o&&(o.classList.remove(Fe),o.classList.add(Ve))}this.checkActionButtonStatus()}this.trigger("failure",a);var h=this.getLiElement(s);if(!t.isNullOrUndefined(h)&&!t.isNullOrUndefined(h.querySelector("."+Ne))){var p=h.querySelector("."+Ne);i.hideSpinner(p),t.detach(h.querySelector(".e-spinner-pane"))}},s.prototype.getFilesFromFolder=function(e){this.filesEntries=[];var t=this.multiple?e.dataTransfer.items:[e.dataTransfer.items[0]];if(this.checkDirectoryUpload(t))for(var i=this,s=0;s<t.length;s++)!function(s){var n=t[s].webkitGetAsEntry();if(n.isFile){var a=[];n.file(function(e){var t=n.fullPath;a.push({path:t,file:e})}),i.renderSelectedFiles(e,a,!0)}else n.isDirectory&&i.traverseFileTree(n,e)}(s)},s.prototype.checkDirectoryUpload=function(e){for(var t=0;e&&t<e.length;t++)if(e[t].webkitGetAsEntry().isDirectory)return!0;return!1},s.prototype.traverseFileTree=function(e,t){if(e.isFile)this.filesEntries.push(e);else if(e.isDirectory){var i=e.createReader();this.readFileFromDirectory(i,t)}},s.prototype.readFileFromDirectory=function(e,t){var i=this;e.readEntries(function(s){for(var n=0;n<s.length;n++)i.traverseFileTree(s[n],t);i.pushFilesEntries(t),s.length&&i.readFileFromDirectory(e)})},s.prototype.pushFilesEntries=function(e){for(var t=this,i=[],s=this,n=0;n<this.filesEntries.length;n++)!function(n){s.filesEntries[n].file(function(s){if(t.filesEntries.length){var a=t.filesEntries[n].fullPath;i.push({path:a,file:s}),n===t.filesEntries.length-1&&(t.filesEntries=[],t.renderSelectedFiles(e,i,!0))}})}(n)},s.prototype.onSelectFiles=function(e){if(this.enabled){var t;if("drop"===e.type)if(this.directoryUpload)this.getFilesFromFolder(e);else{var i=this.sortFilesList=e.dataTransfer.files;"msie"!==this.browserName&&"edge"!==this.browserName&&"safari"!==this.browserName&&(this.element.files=i),i.length>0&&(t=this.multiple?this.sortFileList(i):[i[0]],this.renderSelectedFiles(e,t))}else t=[].slice.call(e.target.files),this.renderSelectedFiles(e,t);(this.isAngular||this.isReact)&&e.stopPropagation()}},s.prototype.getBase64=function(e){return new Promise(function(t,i){var s=new FileReader;s.readAsDataURL(e),s.onload=function(){return t(s.result)},s.onerror=function(e){return i(e)}})},s.prototype.renderSelectedFiles=function(e,i,s,n){var a=this;this.base64String=[];var r={event:e,cancel:!1,filesData:[],isModified:!1,modifiedFilesData:[],progressInterval:"",isCanceled:!1,currentRequest:null,customFormData:null};if(i.length<1)return r.isCanceled=!0,void this.trigger("selected",r);this.flag=!0;var l=[];this.multiple||(this.clearData(!0),this.actionCompleteCount=0,i=[i[0]]);for(h=0;h<i.length;h++){var o=s?i[h].file:i[h];this.updateInitialFileDetails(e,i,o,h,l,s,n)}if(r.filesData=l,!t.isNullOrUndefined(this.allowedExtensions)&&this.allowedExtensions.indexOf("*")>-1&&(this.allTypes=!0),this.enableHtmlSanitizer)for(var h=0;h<l.length;h++){for(var p=t.SanitizeHtmlHelper.beforeSanitize(),d=t.SanitizeHtmlHelper.serializeValue(p,l[parseInt(h.toString(),10)].name),u=l[parseInt(h.toString(),10)].name,c=!1,m=0;m<u.length;m++)if(u.charCodeAt(m)>127){c=!0;break}var f=/<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i.test(u);if(d!==l[parseInt(h.toString(),10)].name&&(!c||f)){var v=i[parseInt(h.toString(),10)].name.replace(/[\u00A0-\u9999<>\\&]/g,function(e){return"&#"+e.charCodeAt(0)+";"});l[parseInt(h.toString(),10)].name=v,l[parseInt(h.toString(),10)].status=this.localizedTexts("invalidFileName"),l[parseInt(h.toString(),10)].statusCode="0"}}this.allTypes||(l=this.checkExtension(l)),this.trigger("selected",r,function(e){a._internalRenderSelect(e,l)})},s.prototype.updateInitialFileDetails=function(e,i,s,n,a,r,l){var o={name:r?i[n].path.substring(1,i[n].path.length):l?t.getUniqueID(s.name.substring(0,s.name.lastIndexOf(".")))+"."+this.getFileType(s.name):this.directoryUpload?i[n].webkitRelativePath:s.name,rawFile:s,size:s.size,status:this.localizedTexts("readyToUploadMessage"),type:this.getFileType(s.name),validationMessages:this.validatedFileSize(s.size),statusCode:"1",id:t.getUniqueID(s.name.substring(0,s.name.lastIndexOf(".")))+"."+this.getFileType(s.name)};l&&(o.fileSource="paste"),o.status=""!==o.validationMessages.minSize?this.localizedTexts("invalidMinFileSize"):""!==o.validationMessages.maxSize?this.localizedTexts("invalidMaxFileSize"):o.status,""===o.validationMessages.minSize&&""===o.validationMessages.maxSize||(o.statusCode="0",this.checkActionComplete(!0)),a.push(o)},s.prototype._internalRenderSelect=function(e,i){if(!e.cancel){if(this.selectedFiles=this.selectedFiles.concat(i),this.btnTabIndex=this.disableKeyboardNavigation?"-1":"0",this.showFileList){if(e.isModified&&e.modifiedFilesData.length>0){for(var s=0;s<e.modifiedFilesData.length;s++)for(var n=0;n<i.length;n++)e.modifiedFilesData[s].id===i[n].id&&(e.modifiedFilesData[s].rawFile=i[n].rawFile);var a=this.allTypes?e.modifiedFilesData:this.checkExtension(e.modifiedFilesData);this.updateSortedFileList(a),this.filesData=this.filesData.concat(a),this.isForm&&!this.allowUpload()||this.checkAutoUpload(a)}else{if(this.internalCreateFileList(i),this.autoUpload&&this.sequenceUpload&&this.sequentialUpload&&this.filesData.length>0&&"2"!==this.filesData[this.filesData.length-1].statusCode&&"0"!==this.filesData[this.filesData.length-1].statusCode)return void(this.filesData=this.filesData.concat(i));this.filesData=this.filesData.concat(i),this.isForm&&!this.allowUpload()||this.checkAutoUpload(i)}t.isNullOrUndefined(e.progressInterval)||""===e.progressInterval||(this.progressInterval=e.progressInterval)}else this.filesData=this.filesData.concat(i),this.autoUpload&&this.upload(this.filesData,!0);this.raiseActionComplete(),this.isFirstFileOnSelection=!0}},s.prototype.allowUpload=function(){var e=!1;return this.isForm&&!t.isNullOrUndefined(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl&&(e=!0),e},s.prototype.isFormUpload=function(){var e=!1;return!this.isForm||!t.isNullOrUndefined(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl||!t.isNullOrUndefined(this.asyncSettings.removeUrl)&&""!==this.asyncSettings.removeUrl||(e=!0),e},s.prototype.clearData=function(e){if(t.isNullOrUndefined(this.listParent)||(t.detach(this.listParent),this.listParent=null),"msie"===this.browserName||e||(this.element.value=""),this.isFormUpload()&&this.uploadWrapper.querySelector(".e-file-select")){var i=this.uploadWrapper.querySelector(".e-file-select").querySelector(".e-hidden-file-input");i&&this.uploadWrapper.querySelector(".e-file-select").removeChild(i)}this.fileList=[],this.filesData=[],this.removeActionButtons()},s.prototype.updateSortedFileList=function(e){var i=this.createElement("div",{id:"clonewrapper"}),s=-1;if(this.listParent){for(var n=0;n<this.listParent.querySelectorAll("li").length;n++){var a=this.listParent.querySelectorAll("li")[n];i.appendChild(a.cloneNode(!0))}this.removeActionButtons();var r=[].slice.call(i.childNodes);this.createParentUL();for(var l=0;l<e.length;l++){for(var o=0;o<this.filesData.length;o++)this.filesData[o].name===e[l].name&&(this.listParent.appendChild(r[o]),t.EventHandler.add(r[o].querySelector(".e-icons"),"click",this.removeFiles,this),this.fileList.push(r[o]),s=l);s!==l&&this.internalCreateFileList([e[l]])}}else this.internalCreateFileList(e)},s.prototype.isBlank=function(e){return!e||/^\s*$/.test(e)},s.prototype.checkGenericExtension=function(e,t){var i=[];switch(e.toLowerCase()){case"image/*":i.push("jpg","jpeg","png","gif","bmp","tiff","svg","webp","heic");break;case"audio/*":i.push("mp3","wav","aac","flac","ogg","m4a");break;case"video/*":i.push("mp4","mov","avi","mkv","flv","wmv","webm","mpeg");break;case"application/*":i.push("doc","docx","xls","xlsx","ppt","pptx","zip","rar","7z","tar","pdf");break;case"text/*":i.push("txt","csv","html","css","js","json","xml","md")}return i.includes(t.toLowerCase())},s.prototype.checkExtension=function(e){var i=e;if(!this.isBlank(this.allowedExtensions)){for(var s=[],n=0,a=t.isNullOrUndefined(s)?[""]:this.allowedExtensions.split(",");n<a.length;n++){var r=a[n];s.push(r.trim().toLocaleLowerCase())}for(var l=0;l<e.length;l++){var o=-1!==e[l].type.indexOf(".")?e[l].type.replace(".",""):e[l].type;-1!==s[0].indexOf("/*")?this.checkGenericExtension(s[0],o)||(e[l].status=this.localizedTexts("invalidFileType"),e[l].statusCode="0"):-1===s.indexOf(("."+o).toLocaleLowerCase())&&(e[l].status=this.localizedTexts("invalidFileType"),e[l].statusCode="0")}}return i},s.prototype.validatedFileSize=function(e){var t="",i="";return e<this.minFileSize?t=this.localizedTexts("invalidMinFileSize"):e>this.maxFileSize?i=this.localizedTexts("invalidMaxFileSize"):(t="",i=""),{minSize:t,maxSize:i}},s.prototype.isPreLoadFile=function(e){for(var t=!1,i=0;i<this.files.length;i++)this.files[i].name===e.name.slice(0,e.name.lastIndexOf("."))&&this.files[i].type===e.type&&(t=!0);return t},s.prototype.createCustomfileList=function(e){this.createParentUL();for(var i=0,s=e;i<s.length;i++){var n=s[i],a=this.createElement("li",{className:Le,attrs:{"data-file-name":n.name}});this.uploadTemplateFn=this.templateComplier(this.template);var r=this.uploadTemplateFn(n,this,"template",this.element.id+"Template",this.isStringTemplate,null,a);if(r){var l=[].slice.call(r);t.append(l,a)}var o=e.indexOf(n),h={element:a,fileInfo:n,index:o,isPreload:this.isPreLoadFile(n)},p={element:a,fileInfo:n,index:o,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",h),this.trigger("fileListRendering",p),this.listParent.appendChild(a),this.fileList.push(a)}this.renderReactTemplates()},s.prototype.createParentUL=function(){t.isNullOrUndefined(this.listParent)&&(this.listParent=this.createElement("ul",{className:"e-upload-files"}),this.uploadWrapper.appendChild(this.listParent))},s.prototype.formFileList=function(e,i){var s=this.createElement("li",{className:Le});s.setAttribute("data-files-count",e.length+"");for(var n,a=this.createElement("span",{className:"e-file-container"}),r=0,l=e;r<l.length;r++){var o=l[r],h=this.createElement("span",{className:"e-file-name"});h.innerHTML=this.getFileNameOnly(o.name);var p=this.createElement("span",{className:"e-file-type"}),d=this.getFileType(o.name);if(p.innerHTML="."+d,d||p.classList.add("e-hidden"),this.enableRtl){var u=this.createElement("span",{className:"e-rtl-container"});u.appendChild(p),u.appendChild(h),a.appendChild(u)}else a.appendChild(h),a.appendChild(p);this.truncateName(h),n=this.formValidateFileInfo(o,s)}s.appendChild(a),this.setListToFileInfo(e,s);var c=this.listParent.querySelectorAll("li").length,m=this.createElement("span");if(s.classList.contains("e-file-invalid")?(m.classList.add(Ae),m.classList.add("e-file-invalid"),m.innerText=e.length>1?this.localizedTexts("invalidFileSelection"):n):(m.classList.add(e.length>1?"e-file-information":"e-file-size"),m.innerText=e.length>1?this.localizedTexts("totalFiles")+": "+e.length+" , "+this.localizedTexts("size")+": "+this.bytesToSize(this.getFileSize(e)):this.bytesToSize(e[0].size),this.createFormInput(e)),a.appendChild(m),t.isNullOrUndefined(s.querySelector(".e-icons"))){var f=this.createElement("span",{className:"e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&f.classList.add("e-msie"),f.setAttribute("title",this.localizedTexts("remove")),s.appendChild(a),s.appendChild(f),t.EventHandler.add(f,"click",this.removeFiles,this),f.classList.add(He)}var v={element:s,fileInfo:this.mergeFileInfo(e,s),index:c,isPreload:this.isPreLoadFile(this.mergeFileInfo(e,s))},g={element:s,fileInfo:this.mergeFileInfo(e,s),index:c,isPreload:this.isPreLoadFile(this.mergeFileInfo(e,s))};this.trigger("rendering",v),this.trigger("fileListRendering",g),this.listParent.appendChild(s),this.fileList.push(s)},s.prototype.formValidateFileInfo=function(e,t){var i=e.status,s=this.validatedFileSize(e.size);""===s.minSize&&""===s.maxSize||(this.addInvalidClass(t),i=""!==s.minSize?this.localizedTexts("invalidMinFileSize"):""!==s.maxSize?this.localizedTexts("invalidMaxFileSize"):i);var n=this.checkExtension(this.getFilesInArray(e))[0].status;return n===this.localizedTexts("invalidFileType")&&(this.addInvalidClass(t),i=n),i},s.prototype.addInvalidClass=function(e){e.classList.add("e-file-invalid")},s.prototype.createFormInput=function(e){if("safari"!==this.browserName){var i=this.element.cloneNode(!0);i.classList.add("e-hidden-file-input");for(var s=0,n=e;s<n.length;s++)n[s].input=i;i.setAttribute("id",t.getUniqueID("hiddenUploader")),i.setAttribute("name",this.uploaderName),this.uploadWrapper.querySelector(".e-file-select").appendChild(i),"msie"!==this.browserName&&"edge"!==this.browserName&&(this.element.value="")}},s.prototype.getFileSize=function(e){for(var t=0,i=0,s=e;i<s.length;i++)t+=s[i].size;return t},s.prototype.mergeFileInfo=function(e,t){for(var i={name:"",rawFile:"",size:0,status:"",type:"",validationMessages:{minSize:"",maxSize:""},statusCode:"1",list:t},s=[],n="",a=0,r=e;a<r.length;a++){var l=r[a];s.push(l.name),n=l.type}return i.name=s.join(", "),i.size=this.getFileSize(e),i.type=n,i.status=this.statusForFormUpload(e,t),i},s.prototype.statusForFormUpload=function(e,t){for(var i,s=!0,n=0,a=e;n<a.length;n++){var r=a[n];i=r.status;var l=this.validatedFileSize(r.size);""===l.minSize&&""===l.maxSize||(s=!1,i=""!==l.minSize?this.localizedTexts("invalidMinFileSize"):""!==l.maxSize?this.localizedTexts("invalidMaxFileSize"):i);var o=this.checkExtension(this.getFilesInArray(r))[0].status;o===this.localizedTexts("invalidFileType")&&(s=!1,i=o)}return s?i=this.localizedTexts("totalFiles")+": "+e.length+" , "+this.localizedTexts("size")+": "+this.bytesToSize(this.getFileSize(e)):(t.classList.add("e-file-invalid"),i=e.length>1?this.localizedTexts("invalidFileSelection"):i),i},s.prototype.formCustomFileList=function(e,i){this.createParentUL();var s=this.createElement("li",{className:Le});s.setAttribute("data-files-count",e.length+""),this.setListToFileInfo(e,s);var n=this.mergeFileInfo(e,s);s.setAttribute("data-file-name",n.name),this.uploadTemplateFn=this.templateComplier(this.template);var a=this.uploadTemplateFn(n,this,"template",this.element.id+"Template",this.isStringTemplate,null,s);if(a){var r=[].slice.call(a);t.append(r,s)}var l=this.listParent.querySelectorAll("li").length;s.classList.contains("e-file-invalid")||this.createFormInput(e);var o={element:s,fileInfo:n,index:l,isPreload:this.isPreLoadFile(n)},h={element:s,fileInfo:n,index:l,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",o),this.trigger("fileListRendering",h),this.listParent.appendChild(s),this.fileList.push(s),this.renderReactTemplates()},s.prototype.createFileList=function(e){this.filesData=this.filesData&&this.filesData.length>0?this.filesData.concat(e):e,this.internalCreateFileList(e)},s.prototype.internalCreateFileList=function(e){if(this.createParentUL(),""===this.template||t.isNullOrUndefined(this.template))if(this.isFormUpload())this.uploadWrapper.classList.add("e-form-upload"),this.formFileList(e,this.element.files);else for(var i=0,s=e;i<s.length;i++){var n=s[i],a=this.createElement("li",{className:Le,attrs:{"data-file-name":n.name,"data-files-count":"1"}}),r=this.createElement("span",{className:"e-file-container"}),l=this.createElement("span",{className:"e-file-name",attrs:{title:n.name}});l.innerHTML=this.getFileNameOnly(n.name);var o=this.createElement("span",{className:"e-file-type"}),h=this.getFileType(n.name);if(o.innerHTML="."+h,h||o.classList.add("e-hidden"),this.enableRtl){var p=this.createElement("span",{className:"e-rtl-container"});p.appendChild(o),p.appendChild(l),r.appendChild(p)}else r.appendChild(l),r.appendChild(o);var d=this.createElement("span",{className:"e-file-size"});d.innerHTML=this.bytesToSize(n.size),r.appendChild(d);var u=this.createElement("span",{className:Ae});r.appendChild(u),u.innerHTML=n.status,a.appendChild(r);var c=this.createElement("span",{className:" e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&c.classList.add("e-msie"),c.setAttribute("title",this.localizedTexts("remove")),a.appendChild(c),t.EventHandler.add(c,"click",this.removeFiles,this),"2"===n.statusCode?(u.classList.add(Fe),c.classList.add(Ne),c.setAttribute("title",this.localizedTexts("delete")),c.setAttribute("aria-label",this.localizedTexts("delete"))):"1"!==n.statusCode&&(u.classList.remove(Fe),u.classList.add("e-validation-fails")),this.autoUpload&&"1"===n.statusCode&&""!==this.asyncSettings.saveUrl&&(u.innerHTML=""),c.classList.contains(Ne)||(c.classList.add(He),c.setAttribute("aria-label",this.localizedTexts("remove")));var m=e.indexOf(n),f={element:a,fileInfo:n,index:m,isPreload:this.isPreLoadFile(n)},v={element:a,fileInfo:n,index:m,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",f),this.trigger("fileListRendering",v),this.listParent.appendChild(a),this.fileList.push(a),this.truncateName(l);var g=this.flag;this.isPreLoadFile(n)&&(this.flag=!1,this.checkActionComplete(!0),this.flag=g)}else this.isFormUpload()?(this.uploadWrapper.classList.add("e-form-upload"),this.formCustomFileList(e,this.element.files)):this.createCustomfileList(e)},s.prototype.getSlicedName=function(e){var t=e.textContent;e.dataset.tail=t.slice(t.length-10)},s.prototype.setListToFileInfo=function(e,t){for(var i=0,s=e;i<s.length;i++)s[i].list=t},s.prototype.truncateName=function(e){var t=e;"edge"!==this.browserName&&t.offsetWidth<t.scrollWidth?this.getSlicedName(t):t.offsetWidth+1<t.scrollWidth&&this.getSlicedName(t)},s.prototype.getFileType=function(e){var t,i=e.lastIndexOf(".");return i>=0&&(t=e.substring(i+1)),t||""},s.prototype.getFileNameOnly=function(e){var t=this.getFileType(e);return t=e.split("."+t)[0]},s.prototype.setInitialAttributes=function(){if(this.initialAttr.accept&&this.element.setAttribute("accept",this.initialAttr.accept),this.initialAttr.disabled&&this.element.setAttribute("disabled","disabled"),this.initialAttr.multiple){var e=document.createAttribute("multiple");this.element.setAttributeNode(e)}},s.prototype.filterfileList=function(e){for(var i,s=[],n=0;n<e.length;n++)i=this.getLiElement(e[n]),t.isNullOrUndefined(i)||i.classList.contains(Fe)?this.showFileList||"File uploaded successfully"===e[n].status||s.push(e[n]):s.push(e[n]);return s},s.prototype.updateStatus=function(e,i,s,n){if(void 0===n&&(n=!0),""===i||t.isNullOrUndefined(i)||""===s||t.isNullOrUndefined(s)||(e.status=i,e.statusCode=s),n){var a=this.getLiElement(e);t.isNullOrUndefined(a)||t.isNullOrUndefined(a.querySelector("."+Ae))||""===i||t.isNullOrUndefined(i)||(a.querySelector("."+Ae).textContent=i)}return e},s.prototype.getLiElement=function(e){for(var i,s=0;s<this.filesData.length;s++)t.isNullOrUndefined(e)||(t.isNullOrUndefined(this.filesData[s].id)||t.isNullOrUndefined(e.id)?this.filesData[s].name!==e.name:this.filesData[s].name!==e.name||this.filesData[s].id!==e.id)||(i=s);return this.fileList[i]},s.prototype.createProgressBar=function(e){var t=this.createElement("span",{className:Ue}),i=this.createElement("progressbar",{className:Ie,attrs:{value:"0",max:"100"}}),s=this.createElement("span",{className:"e-progress-inner-wrap"});i.style.width="0%";var n=this.createElement("span",{className:"e-progress-bar-text"});n.textContent="0%",s.appendChild(i),t.appendChild(s),t.appendChild(n),e.querySelector(".e-file-container").appendChild(t)},s.prototype.updateProgressbar=function(e,i){if(!isNaN(Math.round(e.loaded/e.total*100))&&!t.isNullOrUndefined(i.querySelector("."+Ie)))if(t.isNullOrUndefined(this.progressInterval)||""===this.progressInterval)this.changeProgressValue(i,Math.round(e.loaded/e.total*100).toString()+"%");else{var s=Math.round(e.loaded/e.total*100)%parseInt(this.progressInterval,10);0!==s&&100!==s||this.changeProgressValue(i,Math.round(e.loaded/e.total*100).toString()+"%")}},s.prototype.changeProgressValue=function(e,t){e.querySelector("."+Ie).style.width=t,e.querySelector(".e-progress-bar-text").textContent=t},s.prototype.uploadInProgress=function(e,i,s,n){var a=this.getLiElement(i);if(!t.isNullOrUndefined(a)||s){if(t.isNullOrUndefined(a))this.cancelUploadingFile(i,e,n);else{"5"===i.statusCode&&this.cancelUploadingFile(i,e,n,a),a.querySelectorAll("."+Ue).length>0||!a.querySelector("."+Ae)||(a.querySelector("."+Ae).classList.add("e-upload-progress"),this.createProgressBar(a),this.updateProgressBarClasses(a,"e-upload-progress"),a.querySelector("."+Ae).classList.remove(Ve)),this.updateProgressbar(e,a);var r=a.querySelector("."+He);t.isNullOrUndefined(r)||(r.classList.add(Be,"e-upload-progress"),r.setAttribute("title",this.localizedTexts("abort")),r.classList.remove(He))}var l={e:e,operation:"upload",file:this.updateStatus(i,this.localizedTexts("inProgress"),"3")};this.trigger("progress",l)}},s.prototype.cancelUploadingFile=function(e,s,n,a){var r=this;if("5"===e.statusCode){var l={event:s,fileData:e,cancel:!1,customFormData:[],currentRequest:null};this.trigger("canceling",l,function(s){if(s.cancel){if(e.statusCode="3",!t.isNullOrUndefined(a)){var l=a.querySelector("."+Be);t.isNullOrUndefined(l)||(i.hideSpinner(l),t.detach(a.querySelector(".e-spinner-pane")))}}else{n.emitError=!1,n.httpRequest.abort();var o=new FormData;if("5"===e.statusCode){var h=r.element.getAttribute("name");o.append(h,e.name),o.append("cancel-uploading",e.name),r.updateFormData(o,s.customFormData);var p=new t.Ajax(r.asyncSettings.removeUrl,"POST",!0,null);p.emitError=!1,p.beforeSend=function(e){s.currentRequest&&r.updateCustomheader(p.httpRequest,s.currentRequest)},p.onLoad=function(t){return r.removecanceledFile(t,e),{}},p.send(o)}}})}},s.prototype.removecanceledFile=function(e,s){var n=this.getLiElement(s);if(!(t.isNullOrUndefined(n)||n.querySelector("."+Re)||t.isNullOrUndefined(n.querySelector("."+Be)))){this.updateStatus(s,this.localizedTexts("fileUploadCancel"),"5"),this.renderFailureState(e,s,n);var a=n.querySelector("."+He);t.isNullOrUndefined(n)||(i.hideSpinner(a),t.isNullOrUndefined(n.querySelector(".e-spinner-pane"))||t.detach(n.querySelector(".e-spinner-pane")));var r={event:e,response:e&&e.currentTarget?this.getResponse(e):null,operation:"cancel",file:s};this.trigger("success",r)}},s.prototype.renderFailureState=function(e,i,s){var n=this;this.updateProgressBarClasses(s,Ve),this.removeProgressbar(s,"failure"),t.isNullOrUndefined(s.querySelector(".e-file-status"))||s.querySelector(".e-file-status").classList.add(Ve);var a=s.querySelector("."+Be);t.isNullOrUndefined(a)||(a.classList.remove(Be,"e-upload-progress"),a.classList.add(He),a.setAttribute("title",this.localizedTexts("remove")),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}}),a.parentElement.insertBefore(this.pauseButton,a),this.pauseButton.setAttribute("title",this.localizedTexts("retry")),this.pauseButton.setAttribute("aria-label",this.localizedTexts("retry")),s.querySelector("."+Re).addEventListener("click",function(e){n.reloadcanceledFile(e,i,s,!1)},!1))},s.prototype.reloadcanceledFile=function(e,i,s,n){i.statusCode="1",i.status=this.localizedTexts("readyToUploadMessage"),n||(t.isNullOrUndefined(s.querySelector("."+Ae))||s.querySelector("."+Ae).classList.remove(Ve),t.isNullOrUndefined(s.querySelector("."+Re))||t.detach(s.querySelector("."+Re)),this.pauseButton=null),t.isNullOrUndefined(s)||s.classList.add("e-restrict-retry"),this.upload([i])},s.prototype.uploadComplete=function(e,i,s){var n=e.target;if(4===n.readyState&&n.status>=200&&n.status<=299){var a=this.getLiElement(i);if(t.isNullOrUndefined(a)&&(!s||t.isNullOrUndefined(s))&&this.showFileList)return;if(!t.isNullOrUndefined(a)){this.updateProgressBarClasses(a,Fe),this.removeProgressbar(a,"success");var r=a.querySelector("."+Be);t.isNullOrUndefined(r)||(r.classList.add(Ne),r.setAttribute("title",this.localizedTexts("delete")),r.setAttribute("aria-label",this.localizedTexts("delete")),r.classList.remove(Be),r.classList.remove("e-upload-progress"))}this.raiseSuccessEvent(e,i)}else this.uploadFailed(e,i)},s.prototype.getResponse=function(e){var t=e.currentTarget;return{readyState:t.readyState,statusCode:t.status,statusText:t.statusText,headers:t.getAllResponseHeaders(),withCredentials:t.withCredentials}},s.prototype.raiseSuccessEvent=function(e,s){var n=this,a=e&&e.currentTarget?this.getResponse(e):null,r=this.localizedTexts("uploadSuccessMessage"),l={e:e,response:a,operation:"upload",file:this.updateStatus(s,r,"2",!1),statusText:r},o=this.getLiElement(s);if(!t.isNullOrUndefined(o)){var h=o.querySelector(".e-spinner-pane");t.isNullOrUndefined(h)||(i.hideSpinner(o),t.detach(h))}this.trigger("success",l,function(e){n.updateStatus(s,e.statusText,"2"),n.multiple?n.uploadedFilesData.push(s):n.uploadedFilesData=[s],n.trigger("change",{file:n.uploadedFilesData}),n.checkActionButtonStatus(),n.fileList.length>0?n.getLiElement(s).classList.contains("e-restrict-retry")?n.getLiElement(s).classList.remove("e-restrict-retry"):(n.uploadSequential(),n.checkActionComplete(!0)):n.showFileList||n.checkActionComplete(!0)})},s.prototype.uploadFailed=function(e,i){var s=this,n=this.getLiElement(i),a=e&&e.currentTarget?this.getResponse(e):null,r=this.localizedTexts("uploadFailedMessage"),l={e:e,response:a,operation:"upload",file:this.updateStatus(i,r,"0",!1),statusText:r};t.isNullOrUndefined(n)||this.renderFailureState(e,i,n),this.trigger("failure",l,function(e){s.updateStatus(i,e.statusText,"0"),s.checkActionButtonStatus(),s.uploadSequential(),s.checkActionComplete(!0)})},s.prototype.uploadSequential=function(){this.sequentialUpload&&(this.autoUpload?this.checkAutoUpload(this.filesData):this.uploadButtonClick())},s.prototype.checkActionComplete=function(e){e?++this.actionCompleteCount:--this.actionCompleteCount,this.raiseActionComplete()},s.prototype.raiseActionComplete=function(){if(this.filesData.length===this.actionCompleteCount&&this.flag){this.flag=!1;var e={fileData:[]};e.fileData=this.getSelectedFileStatus(this.selectedFiles),this.trigger("actionComplete",e)}},s.prototype.getSelectedFileStatus=function(e){for(var t=[],i=0,s=0;s<e.length;s++)for(var n=e[s],a=0;a<this.filesData.length;a++)if(this.filesData[a].name===n.name&&this.filesData[a].status===n.status){t[i]=this.filesData[a],++i;break}return t},s.prototype.updateProgressBarClasses=function(e,i){var s=e.querySelector("."+Ie);t.isNullOrUndefined(s)||(s.classList.add(i),this.actionButtons&&this.clearButton&&this.uploadWrapper&&("e-upload-progress"!==i||this.clearButton.hasAttribute("disabled")?"e-upload-success"!==i&&"e-upload-fails"!==i||0!==this.uploadWrapper.querySelectorAll(".e-upload-progress-bar.e-upload-progress:not(.e-upload-success):not(.e-upload-fails)").length||!this.clearButton.hasAttribute("disabled")||this.clearButton.removeAttribute("disabled"):this.clearButton.setAttribute("disabled","disabled")))},s.prototype.removeProgressbar=function(e,i){var s=this;t.isNullOrUndefined(e.querySelector("."+Ue))||(this.progressAnimation=new t.Animation({duration:1250}),this.progressAnimation.animate(e.querySelector("."+Ue),{name:"FadeOut"}),this.progressAnimation.animate(e.querySelector(".e-progress-bar-text"),{name:"FadeOut"}),setTimeout(function(){s.animateProgressBar(e,i)},750))},s.prototype.animateProgressBar=function(e,i){"success"===i?(e.classList.add(Fe),t.isNullOrUndefined(e.querySelector("."+Ae))||(e.querySelector("."+Ae).classList.remove("e-upload-progress"),this.progressAnimation.animate(e.querySelector("."+Ae),{name:"FadeIn"}),e.querySelector("."+Ae).classList.add(Fe))):t.isNullOrUndefined(e.querySelector("."+Ae))||(e.querySelector("."+Ae).classList.remove("e-upload-progress"),this.progressAnimation.animate(e.querySelector("."+Ae),{name:"FadeIn"}),e.querySelector("."+Ae).classList.add(Ve)),e.querySelector("."+Ue)&&t.detach(e.querySelector("."+Ue))},s.prototype.setExtensions=function(e){""===e||t.isNullOrUndefined(e)?this.element.removeAttribute("accept"):this.element.setAttribute("accept",e)},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.setRTL=function(){this.enableRtl?t.addClass([this.uploadWrapper],"e-rtl"):t.removeClass([this.uploadWrapper],"e-rtl")},s.prototype.localizedTexts=function(e){return this.l10n.setLocale(this.locale),this.l10n.getConstant(e)},s.prototype.setControlStatus=function(){this.enabled?(this.uploadWrapper.classList.contains("e-disabled")&&this.uploadWrapper.classList.remove("e-disabled"),!t.isNullOrUndefined(this.browseButton)&&this.element.hasAttribute("disabled")&&(this.element.removeAttribute("disabled"),this.browseButton.removeAttribute("disabled")),!t.isNullOrUndefined(this.clearButton)&&this.clearButton.hasAttribute("disabled")&&this.clearButton.removeAttribute("disabled"),!t.isNullOrUndefined(this.uploadButton)&&this.uploadButton.hasAttribute("disabled")&&this.uploadButton.hasAttribute("disabled")):(this.uploadWrapper.classList.add("e-disabled"),this.element.setAttribute("disabled","disabled"),this.browseButton.setAttribute("disabled","disabled"),t.isNullOrUndefined(this.clearButton)||this.clearButton.setAttribute("disabled","disabled"),t.isNullOrUndefined(this.uploadButton)||this.uploadButton.setAttribute("disabled","disabled"))},s.prototype.checkHTMLAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["accept","multiple","disabled"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"accept":(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.allowedExtensions||e)&&(this.setProperties({allowedExtensions:this.element.getAttribute("accept")},!e),this.initialAttr.accept=this.allowedExtensions);break;case"multiple":if(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.multiple||e){var a="multiple"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({multiple:a},!e),this.initialAttr.multiple=!0}break;case"disabled":if(t.isNullOrUndefined(this.uploaderOptions)||void 0===this.uploaderOptions.enabled||e){var r="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:r},!e),this.initialAttr.disabled=!0}}}},s.prototype.chunkUpload=function(e,t,i){var s=Math.min(this.asyncSettings.chunkSize,e.size),n={chunkIndex:0,blob:e.rawFile.slice(0,s),file:e,start:0,end:s,retryCount:0,request:null};this.sendRequest(e,n,t,i)},s.prototype.sendRequest=function(e,i,s,n){var a=this,r=new FormData,l=e.rawFile.slice(i.start,i.end);r.append(this.uploaderName,l,e.name),r.append("chunk-index",i.chunkIndex.toString()),r.append("chunkIndex",i.chunkIndex.toString());var o=Math.max(Math.ceil(e.size/this.asyncSettings.chunkSize),1);r.append("total-chunk",o.toString()),r.append("totalChunk",o.toString());var h=new t.Ajax({url:this.asyncSettings.saveUrl,type:"POST",async:!0,contentType:null});h.emitError=!1,h.onLoad=function(e){return a.chunkUploadComplete(e,i,s),{}},h.onUploadProgress=function(e){return a.chunkUploadInProgress(e,i,s),{}};var p={fileData:e,customFormData:[],cancel:!1,chunkSize:0===this.asyncSettings.chunkSize?null:this.asyncSettings.chunkSize};h.beforeSend=function(t){p.currentRequest=h.httpRequest,p.currentChunkIndex=i.chunkIndex,0===p.currentChunkIndex?a.trigger("uploading",p,function(i){a.uploadingEventCallback(r,i,t,e)}):a.trigger("chunkUploading",p,function(i){a.uploadingEventCallback(r,i,t,e)})},h.onError=function(e){return a.chunkUploadFailed(e,i,s),{}},h.send(r),i.request=h},s.prototype.uploadingEventCallback=function(e,t,i,s){t.cancel?this.eventCancelByArgs(i,t,s):this.updateFormData(e,t.customFormData)},s.prototype.eventCancelByArgs=function(e,i,s){var n=this;if(e.cancel=!0,"5"!==i.fileData.statusCode){i.fileData.statusCode="5",i.fileData.status=this.localizedTexts("fileUploadCancel");var a=this.getLiElement(i.fileData);if(a){t.isNullOrUndefined(a.querySelector("."+Ae))||(a.querySelector("."+Ae).innerHTML=this.localizedTexts("fileUploadCancel"),a.querySelector("."+Ae).classList.add(Ve)),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}});var r=a.querySelector("."+He);r&&r.parentElement.insertBefore(this.pauseButton,r),this.pauseButton.setAttribute("title",this.localizedTexts("retry")),this.pauseButton.addEventListener("click",function(e){n.reloadcanceledFile(e,s,a)},!1),this.checkActionButtonStatus()}}},s.prototype.checkChunkUpload=function(){return!(this.asyncSettings.chunkSize<=0||t.isNullOrUndefined(this.asyncSettings.chunkSize))},s.prototype.chunkUploadComplete=function(e,s,n){var a,r=this,l=e.target;if(4===l.readyState&&l.status>=200&&l.status<300){var o=e&&e.currentTarget?this.getResponse(e):null,h=Math.max(Math.ceil(s.file.size/this.asyncSettings.chunkSize),1),p={event:e,file:s.file,chunkIndex:s.chunkIndex,totalChunk:h,chunkSize:this.asyncSettings.chunkSize,response:o};if(this.trigger("chunkSuccess",p),!t.isNullOrUndefined(n)&&n||(a=this.getLiElement(s.file)),this.updateMetaData(s),s.end===s.file.size&&(s.file.statusCode="3"),"5"===s.file.statusCode){var d={event:e,fileData:s.file,cancel:!1,customFormData:[],currentRequest:null};this.trigger("canceling",d,function(e){if(e.cancel){s.file.statusCode="3";var o=a.querySelector("."+Be);t.isNullOrUndefined(a)||t.isNullOrUndefined(o)||(i.hideSpinner(o),t.detach(a.querySelector(".e-spinner-pane"))),r.sendNextRequest(s)}else{s.request.emitError=!1,l.abort();var h=new FormData,p=r.element.getAttribute("name");h.append(p,s.file.name),h.append("cancel-uploading",s.file.name),h.append("cancelUploading",s.file.name),r.updateFormData(h,e.customFormData);var d=new t.Ajax(r.asyncSettings.removeUrl,"POST",!0,null);d.emitError=!1,d.beforeSend=function(t){Array.isArray(e.currentRequest)&&r.updateCustomheader(d.httpRequest,e.currentRequest)},d.onLoad=function(e){return r.removeChunkFile(e,s,n),{}},d.send(h)}})}else{if(h-1===s.chunkIndex&&h>s.chunkIndex){var u=this.pausedData.indexOf(s);return u>=0&&this.pausedData.splice(u,1),t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(n)||!n)&&a&&(a&&!t.isNullOrUndefined(a.querySelector("."+Me))&&t.detach(a.querySelector("."+Me)),this.removeChunkProgressBar(s)),void this.raiseSuccessEvent(e,s.file)}"4"!==s.file.statusCode&&this.sendNextRequest(s)}}else this.chunkUploadFailed(e,s)},s.prototype.sendNextRequest=function(e){e.start=e.end,e.end+=this.asyncSettings.chunkSize,e.end=Math.min(e.end,e.file.size),e.chunkIndex+=1,this.sendRequest(e.file,e)},s.prototype.removeChunkFile=function(e,s,n){if(t.isNullOrUndefined(this.template)&&t.isNullOrUndefined(n)&&!n){var a=this.getLiElement(s.file),r=a.querySelector("."+Be),l=r;this.updateStatus(s.file,this.localizedTexts("fileUploadCancel"),"5"),this.updateProgressBarClasses(a,Ve),this.removeProgressbar(a,"failure"),r&&(r.classList.remove(Be),r.classList.add(He),r.setAttribute("title",this.localizedTexts("remove")));var o=a.querySelector("."+Me);o&&(o.classList.add(Re),o.classList.remove(Me),o.setAttribute("title",this.localizedTexts("retry"))),t.isNullOrUndefined(a)||t.isNullOrUndefined(r)||t.isNullOrUndefined(a.querySelector(".e-spinner-pane"))||(i.hideSpinner(l),t.detach(a.querySelector(".e-spinner-pane")))}},s.prototype.pauseUpload=function(e,t,i){e.file.statusCode="4",e.file.status=this.localizedTexts("pause"),this.updateMetaData(e);var s={event:t||null,file:e.file,chunkIndex:e.chunkIndex,chunkCount:Math.round(e.file.size/this.asyncSettings.chunkSize),chunkSize:this.asyncSettings.chunkSize};this.abortUpload(e,i,s),this.sequentialUpload&&this.uploadSequential()},s.prototype.abortUpload=function(e,i,s){"4"!==e.file.statusCode&&(e.request.emitError=!1,e.request.httpRequest.abort());var n=this.getLiElement(e.file);if(t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(i)||!i)&&n){var a=n.querySelector("."+Me);a.classList.remove(Me),a.classList.add("e-file-play-btn"),a.setAttribute("title",this.localizedTexts("resume")),a.nextElementSibling.classList.add(He),a.nextElementSibling.classList.remove(Be),a.nextElementSibling.setAttribute("title",this.localizedTexts("remove"))}for(var r=0;r<this.pausedData.length;r++)this.pausedData[r].file.name===e.file.name&&this.pausedData.splice(r,1);this.pausedData.push(e),this.trigger("pausing",s)},s.prototype.resumeUpload=function(e,i,s){var n,a=this.getLiElement(e.file);t.isNullOrUndefined(a)||(n=a.querySelector(".e-file-play-btn")),t.isNullOrUndefined(n)||!t.isNullOrUndefined(s)&&s||(n.classList.remove("e-file-play-btn"),n.classList.add(Me),n.setAttribute("title",this.localizedTexts("pause")),n.nextElementSibling.classList.remove(He),n.nextElementSibling.classList.add(Be),n.nextElementSibling.setAttribute("title",this.localizedTexts("abort"))),e.file.status=this.localizedTexts("inProgress"),e.file.statusCode="3",this.updateMetaData(e);var r={event:i||null,file:e.file,chunkIndex:e.chunkIndex,chunkCount:Math.round(e.file.size/this.asyncSettings.chunkSize),chunkSize:this.asyncSettings.chunkSize};this.trigger("resuming",r);for(var l=0;l<this.pausedData.length;l++)this.pausedData[l].end===this.pausedData[l].file.size?this.chunkUploadComplete(i,e,s):this.pausedData[l].file.name===e.file.name&&(this.pausedData[l].start=this.pausedData[l].end,this.pausedData[l].end=this.pausedData[l].end+this.asyncSettings.chunkSize,this.pausedData[l].end=Math.min(this.pausedData[l].end,this.pausedData[l].file.size),this.pausedData[l].chunkIndex=this.pausedData[l].chunkIndex+1,this.sendRequest(this.pausedData[l].file,this.pausedData[l],s))},s.prototype.updateMetaData=function(e){-1===this.uploadMetaData.indexOf(e)?this.uploadMetaData.push(e):(this.uploadMetaData.splice(this.uploadMetaData.indexOf(e),1),this.uploadMetaData.push(e))},s.prototype.removeChunkProgressBar=function(e){var i=this.getLiElement(e.file);if(!t.isNullOrUndefined(i)){this.updateProgressBarClasses(i,Fe),this.removeProgressbar(i,"success");var s=i.querySelector("."+Be);t.isNullOrUndefined(s)||(s.classList.add(Ne),s.setAttribute("title",this.localizedTexts("delete")),s.classList.remove(Be,"e-upload-progress"))}},s.prototype.chunkUploadFailed=function(e,i,s){var n,a=this,r=Math.max(Math.ceil(i.file.size/this.asyncSettings.chunkSize),1);!t.isNullOrUndefined(this.template)||!t.isNullOrUndefined(s)&&s||(n=this.getLiElement(i.file));var l=e&&e.currentTarget?this.getResponse(e):null,o={event:e,file:i.file,chunkIndex:i.chunkIndex,totalChunk:r,chunkSize:this.asyncSettings.chunkSize,cancel:!1,response:l};this.trigger("chunkFailure",o,function(r){if(!r.cancel)if(i.retryCount<a.asyncSettings.retryCount)setTimeout(function(){a.retryRequest(n,i,s)},a.asyncSettings.retryAfterDelay);else{if(!t.isNullOrUndefined(n)){var o=n.querySelector("."+Me)?n.querySelector("."+Me):n.querySelector(".e-file-play-btn");t.isNullOrUndefined(o)||(o.classList.add(Re),o.classList.remove(Me,"e-file-play-btn")),a.updateProgressBarClasses(n,Ve),a.removeProgressbar(n,"failure"),n.querySelector(".e-icons").classList.remove("e-upload-progress");var h=n.querySelector("."+Be)?n.querySelector("."+Be):n.querySelector("."+He);h.classList.remove(Be),t.isNullOrUndefined(n.querySelector("."+Me))||t.detach(n.querySelector("."+Me)),i.start>0?(h.classList.add(Ne),h.setAttribute("title",a.localizedTexts("delete"))):(h.classList.add(He),h.setAttribute("title",a.localizedTexts("remove")))}i.retryCount=0;var p=i.file,d=a.localizedTexts("uploadFailedMessage"),u={e:e,response:l,operation:"upload",file:a.updateStatus(p,d,"0",!1),statusText:d};a.trigger("failure",u,function(e){a.updateStatus(p,e.statusText,"0"),a.uploadSequential(),a.checkActionComplete(!0)})}})},s.prototype.retryRequest=function(e,i,s){t.isNullOrUndefined(this.template)&&(t.isNullOrUndefined(s)||!s)&&e&&this.updateProgressBarClasses(e,Ve),i&&(i.retryCount+=1,this.sendRequest(i.file,i))},s.prototype.checkPausePlayAction=function(e){var t=e.target,i=e.target.parentElement,s=this.fileList.indexOf(i),n=this.filesData[s],a=this.getCurrentMetaData(n);t.classList.contains(Me)?this.pauseUpload(a,e):t.classList.contains("e-file-play-btn")?this.resumeUpload(a,e):t.classList.contains(Re)&&(a.file.status===this.localizedTexts("fileUploadCancel")?this.retryUpload(a,!1):this.retryUpload(a,!0))},s.prototype.retryUpload=function(e,t){t?(e.end=e.end+this.asyncSettings.chunkSize,e.start=e.start+this.asyncSettings.chunkSize,this.sendRequest(e.file,e)):(e.file.statusCode="1",e.file.status=this.localizedTexts("readyToUploadMessage"),this.chunkUpload(e.file)),this.getLiElement(e.file).classList.add("e-restrict-retry")},s.prototype.chunkUploadInProgress=function(e,i,s){var n=this;if("4"!==i.file.statusCode){"4"!==i.file.statusCode&&"5"!==i.file.statusCode&&(i.file.statusCode="3",i.file.status=this.localizedTexts("inProgress")),this.updateMetaData(i);var a=this.getLiElement(i.file);if(!t.isNullOrUndefined(a)){var r=a.querySelector("."+Re);if(t.isNullOrUndefined(r)||(r.classList.add(Me),r.setAttribute("title",this.localizedTexts("pause")),r.classList.remove(Re)),!t.isNullOrUndefined(a)){if(!(a.querySelectorAll("."+Ue).length>0)){var l=a.querySelector("."+Ae);t.isNullOrUndefined(this.template)&&(l.classList.add("e-upload-progress"),l.classList.remove(Ve),this.createProgressBar(a),this.updateProgressBarClasses(a,"e-upload-progress"));var o=a.querySelector("."+He)?a.querySelector("."+He):a.querySelector("."+Ne);t.isNullOrUndefined(o)||(o.classList.add(Be),o.setAttribute("title",this.localizedTexts("abort")),o.classList.remove(He))}if(!isNaN(Math.round(e.loaded/e.total*100))&&t.isNullOrUndefined(this.template)&&"4"!==i.file.statusCode){var h=void 0,p=Math.ceil(i.file.size/this.asyncSettings.chunkSize)-1;this.asyncSettings.chunkSize&&p&&(h=Math.round(i.chunkIndex/p*100),this.changeProgressValue(a,h.toString()+"%"))}0===i.chunkIndex&&this.checkActionButtonStatus()}if(t.isNullOrUndefined(a.querySelector("."+Me))&&t.isNullOrUndefined(this.template)&&t.isNullOrUndefined(a.querySelector("."+Ne))){this.pauseButton=this.createElement("span",{className:"e-icons e-file-pause-btn",attrs:{tabindex:this.btnTabIndex}}),"msie"===this.browserName&&this.pauseButton.classList.add("e-msie");var d=a.querySelector("."+Be);d.parentElement.insertBefore(this.pauseButton,d),this.pauseButton.setAttribute("title",this.localizedTexts("pause")),this.pauseButton.addEventListener("click",function(e){n.checkPausePlayAction(e)},!1)}}}},s.prototype.bytesToSize=function(e){var t=-1;if(!e)return"0.0 KB";do{e/=1024,t++}while(e>99);return t>=2&&(e*=1024,t=1),Math.max(e,0).toFixed(1)+" "+["KB","MB"][t]},s.prototype.sortFileList=function(e){for(var t=e=e||this.sortFilesList,i=[],s=0;s<t.length;s++)i.push(t[s].name);for(var n=[],a=0,r=i.sort();a<r.length;a++)for(var l=r[a],s=0;s<t.length;s++)l===t[s].name&&n.push(t[s]);return n},s.prototype.destroy=function(){this.element.value=null,this.clearTemplate(),this.clearAll(),this.unWireEvents(),this.unBindDropEvents(),this.multiple&&this.element.removeAttribute("multiple"),this.enabled||this.element.removeAttribute("disabled"),this.element.removeAttribute("accept"),this.setInitialAttributes();for(var i=0,s=["aria-label","directory","webkitdirectory","tabindex"];i<s.length;i++){var n=s[i];this.element.removeAttribute(n)}t.isNullOrUndefined(this.uploadWrapper)||(this.uploadWrapper.parentElement.appendChild(this.element),t.detach(this.uploadWrapper)),this.uploadWrapper=null,this.uploadWrapper=null,this.browseButton=null,this.dropAreaWrapper=null,this.dropZoneElement=null,this.dropArea=null,this.keyboardModule=null,this.clearButton=null,this.uploadButton=null,e.prototype.destroy.call(this)},s.prototype.upload=function(e,t){var i=this;if(e=e||this.filesData,this.sequentialUpload&&(this.isFirstFileOnSelection||t))this.sequenceUpload(e);else{var s=this.getFilesInArray(e),n={customFormData:[],currentRequest:null,cancel:!1};this.trigger("beforeUpload",n,function(e){e.cancel||(i.customFormDatas=e.customFormData&&e.customFormData.length>0?e.customFormData:i.customFormDatas,i.uploadFiles(s,t))})}},s.prototype.getFilesInArray=function(e){var t=[];return e&&(e instanceof Array?t=e:t.push(e)),t},s.prototype.serverReadFileBase64=function(e,t,i){var s=this;return new Promise(function(n,a){var r=s.fileStreams[e].rawFile;try{var l=new FileReader;l.onload=function(e){return function(){try{var t=e.result,i=t?t.split(";base64,")[1]:null;n(i)}catch(e){a(e)}}}(l),l.readAsDataURL(r.slice(t,t+i))}catch(e){a(e)}})},s.prototype.uploadFileCount=function(e){var t=this.filesData;return t&&0!==t.length?t.length:-1},s.prototype.getFileRead=function(e,t){var i=this.filesData;if(!i||0===i.length)return-1;var s=i[e],n=this.newFileRef++;return this.fileStreams[n]=s,n},s.prototype.uploadFiles=function(e,i){var s=[];if(""!==this.asyncSettings.saveUrl&&!t.isNullOrUndefined(this.asyncSettings.saveUrl)){if(!i||t.isNullOrUndefined(i))if(this.multiple)s=this.filterfileList(e);else{var n=[];n.push(e[0]),s=this.filterfileList(n)}else s=e;for(var a=0;a<s.length;a++)this.uploadFilesRequest(s,a,i)}},s.prototype.uploadFilesRequest=function(e,i,s){var n=this,a=this.checkChunkUpload(),r=new t.Ajax(this.asyncSettings.saveUrl,"POST",!0,null);r.emitError=!1;var l={fileData:e[i],customFormData:[],cancel:!1},o=new FormData;if(r.beforeSend=function(t){l.currentRequest=r.httpRequest,n.trigger("uploading",l,function(s){s.cancel&&n.eventCancelByArgs(t,s,e[i]),n.customFormDatas&&n.customFormDatas.length>0&&n.updateFormData(o,n.customFormDatas),n.updateFormData(o,s.customFormData)})},"1"===e[i].statusCode){var h=this.element.getAttribute("name");o.append(h,e[i].rawFile,e[i].name),a&&e[i].size>this.asyncSettings.chunkSize?this.chunkUpload(e[i],s,i):(r.onLoad=function(t){return l.cancel?{}:(n.uploadComplete(t,e[i],s),{})},r.onUploadProgress=function(t){return l.cancel?{}:(n.uploadInProgress(t,e[i],s,r),{})},r.onError=function(t){return n.uploadFailed(t,e[i]),{}},r.send(o))}},s.prototype.spliceFiles=function(e){for(var t=this.fileList[e],i=this.getFilesData(),s=+t.getAttribute("data-files-count"),n=0,a=0;a<e;a++)n+=+this.fileList[a].getAttribute("data-files-count");for(var r=n+s-1;r>=n;r--)i.splice(r,1)},s.prototype.remove=function(e,i,s,n,a){var r=this;t.isNullOrUndefined(n)&&(n=!0);var l={event:a,cancel:!1,filesData:[],customFormData:[],postRawFile:n,currentRequest:null},o={cancel:!1,customFormData:[],currentRequest:null};this.trigger("beforeRemove",o,function(n){if(!n.cancel)if(r.isFormUpload())l.filesData=e,r.trigger("removing",l,function(i){if(!i.cancel)for(var s=!1,n=void 0,a=0,l=r.getFilesInArray(e);a<l.length;a++){var o=l[a];if(s||(n=r.fileList.indexOf(o.list)),n>-1){var h=t.isNullOrUndefined(o.input)?null:o.input;h&&t.detach(h),r.spliceFiles(n),t.detach(r.fileList[n]),r.fileList.splice(n,1),s=!0,n=-1}}});else if(r.isForm&&(t.isNullOrUndefined(r.asyncSettings.removeUrl)||""===r.asyncSettings.removeUrl))l.filesData=r.getFilesData(),r.trigger("removing",l,function(e){e.cancel||r.clearAll()});else{var o=[];(e=t.isNullOrUndefined(e)?r.filesData:e)instanceof Array?o=e:o.push(e),l.filesData=o;for(var h=r.asyncSettings.removeUrl,p=""!==h&&!t.isNullOrUndefined(h),d=0,u=o;d<u.length;d++)!function(e){var t=r.uploadedFilesData.indexOf(e);("2"===e.statusCode||"4"===e.statusCode||"0"===e.statusCode&&-1!==t)&&p?r.removeUploadedFile(e,l,s,i):s?r.removeFilesData(e,i):r.trigger("removing",l,function(t){t.cancel||r.removeFilesData(e,i)}),a&&!a.target.classList.contains(He)&&r.checkActionComplete(!1)}(u[d])}})},s.prototype.clearAll=function(){var e=this;if(t.isNullOrUndefined(this.listParent))return"msie"!==this.browserName&&(this.element.value=""),void(this.filesData=[]);var i={cancel:!1,filesData:this.filesData};this.trigger("clearing",i,function(t){t.cancel||(e.clearData(),e.actionCompleteCount=0,e.count=-1)})},s.prototype.getFilesData=function(e){return t.isNullOrUndefined(e)?this.filesData:this.getSelectedFiles(e)},s.prototype.pause=function(e,t){e=e||this.filesData;var i=this.getFilesInArray(e);this.pauseUploading(i,t)},s.prototype.pauseUploading=function(e,t){for(var i=this.getFiles(e),s=0;s<i.length;s++)"3"===i[s].statusCode&&this.pauseUpload(this.getCurrentMetaData(i[s],null),null,t)},s.prototype.getFiles=function(e){var i=[];return t.isNullOrUndefined(e)||e instanceof Array?i=e:i.push(e),i},s.prototype.resume=function(e,t){e=e||this.filesData;var i=this.getFilesInArray(e);this.resumeFiles(i,t)},s.prototype.resumeFiles=function(e,t){for(var i=this.getFiles(e),s=0;s<i.length;s++)"4"===i[s].statusCode&&this.resumeUpload(this.getCurrentMetaData(i[s],null),null,t)},s.prototype.retry=function(e,t,i){e=e||this.filesData;var s=this.getFilesInArray(e);this.sequentialUpload&&this.isFirstFileOnSelection&&(this.isFirstFileOnSelection=!1),this.retryFailedFiles(s,t,i)},s.prototype.retryFailedFiles=function(e,t,i){for(var s=this.getFiles(e),n=0;n<s.length;n++)if("5"===s[n].statusCode||"0"===s[n].statusCode)if(this.asyncSettings.chunkSize>0&&this.getCurrentMetaData(s[n],null))this.retryUpload(this.getCurrentMetaData(s[n],null),t);else{var a=void 0;i||(a=this.fileList[this.filesData.indexOf(s[n])]),this.reloadcanceledFile(null,s[n],a,i)}},s.prototype.cancel=function(e){e=e||this.filesData;var t=this.getFilesInArray(e);this.cancelUpload(t)},s.prototype.cancelUpload=function(e){var t=this.getFiles(e);if(this.asyncSettings.chunkSize>0){for(s=0;s<t.length;s++)if("3"===t[s].statusCode){var i=this.getCurrentMetaData(t[s],null);i.file.statusCode="5",i.file.status=this.localizedTexts("fileUploadCancel"),this.updateMetaData(i),this.showHideUploadSpinner(t[s])}}else for(var s=0;s<t.length;s++)"3"===t[s].statusCode&&(t[s].statusCode="5",t[s].status=this.localizedTexts("fileUploadCancel"),this.showHideUploadSpinner(t[s]))},s.prototype.showHideUploadSpinner=function(e){var s=this.getLiElement(e);if(!t.isNullOrUndefined(s)&&t.isNullOrUndefined(this.template)){var n=s.querySelector("."+Be);i.createSpinner({target:n,width:"20px"}),i.showSpinner(n)}},we([t.Complex({saveUrl:"",removeUrl:""},qe)],s.prototype,"asyncSettings",void 0),we([t.Property(!1)],s.prototype,"sequentialUpload",void 0),we([t.Property({})],s.prototype,"htmlAttributes",void 0),we([t.Property("")],s.prototype,"cssClass",void 0),we([t.Property(!0)],s.prototype,"enabled",void 0),we([t.Property(null)],s.prototype,"template",void 0),we([t.Property(!0)],s.prototype,"multiple",void 0),we([t.Property(!0)],s.prototype,"autoUpload",void 0),we([t.Property(!0)],s.prototype,"enableHtmlSanitizer",void 0),we([t.Complex({},ze)],s.prototype,"buttons",void 0),we([t.Property("")],s.prototype,"allowedExtensions",void 0),we([t.Property(0)],s.prototype,"minFileSize",void 0),we([t.Property(3e7)],s.prototype,"maxFileSize",void 0),we([t.Property(null)],s.prototype,"dropArea",void 0),we([t.Collection([{}],We)],s.prototype,"files",void 0),we([t.Property(!0)],s.prototype,"showFileList",void 0),we([t.Property(!1)],s.prototype,"directoryUpload",void 0),we([t.Property("Default")],s.prototype,"dropEffect",void 0),we([t.Event()],s.prototype,"created",void 0),we([t.Event()],s.prototype,"actionComplete",void 0),we([t.Event()],s.prototype,"rendering",void 0),we([t.Event()],s.prototype,"beforeUpload",void 0),we([t.Event()],s.prototype,"fileListRendering",void 0),we([t.Event()],s.prototype,"selected",void 0),we([t.Event()],s.prototype,"uploading",void 0),we([t.Event()],s.prototype,"success",void 0),we([t.Event()],s.prototype,"failure",void 0),we([t.Event()],s.prototype,"removing",void 0),we([t.Event()],s.prototype,"beforeRemove",void 0),we([t.Event()],s.prototype,"clearing",void 0),we([t.Event()],s.prototype,"progress",void 0),we([t.Event()],s.prototype,"change",void 0),we([t.Event()],s.prototype,"chunkSuccess",void 0),we([t.Event()],s.prototype,"chunkFailure",void 0),we([t.Event()],s.prototype,"chunkUploading",void 0),we([t.Event()],s.prototype,"canceling",void 0),we([t.Event()],s.prototype,"pausing",void 0),we([t.Event()],s.prototype,"resuming",void 0),s=we([t.NotifyPropertyChanges],s)}(t.Component),_e=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Xe=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ke="e-apply",Ye="e-ctrl-btn",Ze="e-switch-ctrl-btn",Ge="e-hide-hex-value",Je="e-hide-switchable-value",$e="e-hide-value",Qe="e-hsv-color",et="e-selected-value",tt="e-mode-switch-btn",it="e-nocolor-item",st="e-opacity-value",nt="e-preview-container",at="e-show-value",rt="e-selected",lt="e-tile",ot={default:["#000000","#f44336","#e91e63","#9c27b0","#673ab7","#2196f3","#03a9f4","#00bcd4","#009688","#ffeb3b","#ffffff","#ffebee","#fce4ec","#f3e5f5","#ede7f6","#e3f2fd","#e1f5fe","#e0f7fa","#e0f2f1","#fffde7","#f2f2f2","#ffcdd2","#f8bbd0","#e1bee7","#d1c4e9","#bbdefb","#b3e5fc","#b2ebf2","#b2dfdb","#fff9c4","#e6e6e6","#ef9a9a","#f48fb1","#ce93d8","#b39ddb","#90caf9","#81d4fa","#80deea","#80cbc4","#fff59d","#cccccc","#e57373","#f06292","#ba68c8","#9575cd","#64b5f6","#4fc3f7","#4dd0e1","#4db6ac","#fff176","#b3b3b3","#ef5350","#ec407a","#ab47bc","#7e57c2","#42a5f5","#29b6f6","#26c6da","#26a69a","#ffee58","#999999","#e53935","#d81b60","#8e24aa","#5e35b1","#1e88e5","#039be5","#00acc1","#00897b","#fdd835","#808080","#d32f2f","#c2185b","#7b1fa2","#512da8","#1976d2","#0288d1","#0097a7","#00796b","#fbc02d","#666666","#c62828","#ad1457","#6a1b9a","#4527a0","#1565c0","#0277bd","#00838f","#00695c","#f9a825","#4d4d4d","#b71c1c","#880e4f","#4a148c","#311b92","#0d47a1","#01579b","#006064","#004d40","#f57f17"]},ht=function(n){function a(e,t){var i=n.call(this,e,t)||this;return i.recentColors=[],i}return _e(a,n),a.prototype.preRender=function(){var e=this.element;this.formElement=t.closest(this.element,"form"),this.formElement&&t.EventHandler.add(this.formElement,"reset",this.formResetHandler,this);var i={Apply:"Apply",Cancel:"Cancel",ModeSwitcher:"Switch Mode",RecentColors:"Recent colors",CurrentColor:"Current",PreviousColor:"Previous"};this.l10n=new t.L10n("colorpicker",i,this.locale),e.getAttribute("ejs-for")&&!e.getAttribute("name")&&e.setAttribute("name",e.id)},a.prototype.render=function(){this.initWrapper(),this.inline?this.createWidget():this.createSplitBtn(),this.enableOpacity||t.addClass([this.container.parentElement],"e-hide-opacity"),this.renderComplete()},a.prototype.initWrapper=function(){var e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"});this.element.parentNode.insertBefore(e,this.element),e.appendChild(this.element),t.attributes(this.element,{tabindex:"-1",spellcheck:"false","aria-label":"colorpicker"}),this.container=this.createElement("div",{className:"e-container"}),this.getWrapper().appendChild(this.container);var i=this.value?this.roundValue(this.value).toLowerCase():"#008000ff";this.noColor&&"Palette"===this.mode&&""===this.value&&(i="");var s=i.slice(0,7);t.isNullOrUndefined(this.initialInputValue)&&(this.initialInputValue=s),this.element.value=s,this.enableOpacity?this.setProperties({value:i},!0):this.setProperties({value:s},!0),this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&t.addClass([e],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.tileRipple=t.rippleEffect(this.container,{selector:"."+lt}),this.ctrlBtnRipple=t.rippleEffect(this.container,{selector:".e-btn"})},a.prototype.getWrapper=function(){return this.element.parentElement},a.prototype.createWidget=function(){"Palette"===this.mode?(this.createPalette(),this.inline||this.firstPaletteFocus()):(this.createPicker(),this.inline||this.getDragHandler().focus()),this.isRgb=!0,this.createInput(),this.createCtrlBtn(),this.disabled||this.wireEvents(),this.inline&&this.disabled&&this.toggleDisabled(!0),t.Browser.isDevice&&this.refreshPopupPos()},a.prototype.createSplitBtn=function(){var e=this,n=this.createElement("button",{className:"e-split-colorpicker"});this.getWrapper().appendChild(n),this.splitBtn=new s.SplitButton({iconCss:"e-selected-color",target:this.container,disabled:this.disabled,enableRtl:this.enableRtl,createPopupOnClick:this.createPopupOnClick,open:this.onOpen.bind(this),click:function(){var t=new MouseEvent("click",{bubbles:!0,cancelable:!1});e.trigger("change",{currentValue:{hex:e.value.slice(0,7),rgba:e.convertToRgbString(e.hexToRgb(e.value))},previousValue:{hex:null,rgba:null},value:e.value,event:t})}}),this.splitBtn.createElement=this.createElement,this.splitBtn.appendTo(n),this.splitBtn.element.setAttribute("aria-label","colorpicker");var a=this.createElement("span",{className:"e-split-preview"});t.select(".e-selected-color",n).appendChild(a),a.style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value));var r=this.getPopupEle();if(t.addClass([r],"e-colorpicker-popup"),this.cssClass){var l=this.cssClass.replace(/\s+/g," ").trim().split(" ");r&&t.addClass([r],l),this.splitBtn&&this.splitBtn.activeElem&&this.splitBtn.activeElem[0]&&t.addClass([this.splitBtn.activeElem[0]],l),this.splitBtn&&this.splitBtn.activeElem&&this.splitBtn.activeElem[1]&&t.addClass([this.splitBtn.activeElem[1]],l),this.splitBtn&&this.splitBtn.element&&this.splitBtn.element.parentElement&&t.addClass([this.splitBtn.element.parentElement],l)}if(t.Browser.isDevice&&!this.createPopupOnClick){var o=this.getPopupInst();o.relateTo=document.body,o.position={X:"center",Y:"center"},o.targetType="container",o.collision={X:"fit",Y:"fit"},o.offsetY=4,r.style.zIndex=i.getZindexPartial(this.splitBtn.element).toString()}this.bindCallBackEvent()},a.prototype.onOpen=function(){if(this.trigger("open",{element:this.container}),!t.Browser.isDevice){var e=this.getPopupInst();i.isCollide(e.element).length>0&&(e.collision={X:"flip",Y:"fit"},e.position={X:"right",Y:"bottom"},e.targetType="container")}},a.prototype.getPopupInst=function(){return t.getInstance(this.getPopupEle(),i.Popup)},a.prototype.bindCallBackEvent=function(){var e=this;this.splitBtn.beforeOpen=function(n){var a=new s.Deferred;return e.trigger("beforeOpen",n,function(s){if(!s.cancel){var r=e.getPopupEle();if(r.style.top=t.formatUnit(0+pageYOffset),r.style.left=t.formatUnit(0+pageXOffset),r.style.display="block",e.createWidget(),r.style.display="",t.Browser.isDevice){if(e.createPopupOnClick){var l=e.getPopupInst();l.relateTo=document.body,l.position={X:"center",Y:"center"},l.targetType="container",l.collision={X:"fit",Y:"fit"},l.offsetY=4,r.style.zIndex=i.getZindexPartial(e.splitBtn.element).toString()}e.modal=e.createElement("div"),e.modal.className="e-"+e.getModuleName()+" e-modal",e.modal.style.display="none",document.body.insertBefore(e.modal,r),document.body.className+=" e-colorpicker-overflow",e.modal.style.display="block",e.modal.style.zIndex=(Number(r.style.zIndex)-1).toString()}}n.cancel=s.cancel,a.resolve(s)}),a},this.splitBtn.beforeClose=function(i){var n=new s.Deferred;if(t.isNullOrUndefined(i.event))n.resolve(i);else{var a={element:e.container,event:i.event,cancel:!1};e.trigger("beforeClose",a,function(s){t.Browser.isDevice&&i.event.target===e.modal&&(s.cancel=!0),s.cancel||(e.onPopupClose(),"keydown"===i.event.type&&27===i.event.keyCode&&e.splitBtn.element.focus()),i.cancel=s.cancel,n.resolve(s)})}return n}},a.prototype.onPopupClose=function(){this.unWireEvents(),this.destroyOtherComp(),this.container.style.width="",t.select(".e-split-preview",this.splitBtn.element).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value)),this.container.innerHTML="",t.removeClass([this.container],["e-color-picker","e-color-palette"]),t.Browser.isDevice&&this.modal&&(t.removeClass([document.body],"e-colorpicker-overflow"),this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},a.prototype.createPalette=function(){if(t.classList(this.container,["e-color-palette"],["e-color-picker"]),this.presetColors){var e=this.createElement("div",{className:"e-custom-palette"});this.appendElement(e);var i=Object.keys(this.presetColors);if(1===i.length)this.appendPalette(this.presetColors[i[0]],i[0],e);else for(var s=0,n=i.length;s<n;s++)this.appendPalette(this.presetColors[i[s]],i[s],e);t.selectAll(".e-row",e).length>10&&t.addClass([e],"e-palette-group")}else this.appendPalette(ot.default,"default");"Palette"===this.mode&&!this.modeSwitcher&&this.noColor&&this.setNoColor(),this.showRecentColors&&this.recentColors&&this.recentColors.length>0&&this.renderRecentColor();var a=parseInt(getComputedStyle(this.container).borderBottomWidth,10);this.container.style.width=t.formatUnit(this.container.children[0].offsetWidth+a+a),this.rgb=this.hexToRgb(this.roundValue(this.value)),this.hsv=this.rgbToHsv.apply(this,this.rgb)},a.prototype.renderRecentColor=function(){var e=this,i=this.container.querySelector(".e-clr-pal-rec-wpr");i&&t.detach(i);var s=this.createElement("div",{className:"e-clr-pal-rec-wpr"}),n=this.container.querySelector(".e-switch-ctrl-btn");n?this.container.insertBefore(s,n):this.container.appendChild(s);var a=this.createElement("label",{className:"e-recent-clr-span"});if(a.textContent=this.l10n.getConstant("RecentColors"),s.appendChild(a),this.recentColors.length>0){for(this.recentColors=this.recentColors.filter(function(t,i){return e.recentColors.indexOf(t)===i});this.recentColors.length>10;)this.recentColors.pop();this.appendPalette(this.recentColors,"recent-color",s)}},a.prototype.firstPaletteFocus=function(){t.select("."+rt,this.container.children[0])||t.selectAll(".e-palette",this.container)[0].focus()},a.prototype.appendPalette=function(e,t,i){var s=this.createElement("div",{className:"e-palette",attrs:{tabindex:"0",role:"grid"}});"recent-color"===t&&s.classList.add("e-recent-palette"),i?i.appendChild(s):this.appendElement(s);for(var n,a,r,l=0,o=e.length;l<o;l++)0!==l&&l%this.columns!=0||(n=this.createElement("div",{className:"e-row",attrs:{role:"row"}}),s.appendChild(n)),r=this.roundValue(e[l]).toLowerCase(),a=this.createElement("span",{className:lt,attrs:{role:"gridcell","aria-label":r,"aria-selected":"false"}}),this.trigger("beforeTileRender",{element:a,presetName:t,value:e[l]}),n.appendChild(a),this.value===r&&"recent-color"!==t&&(this.addTileSelection(a),s.focus()),a.style.backgroundColor=this.convertToRgbString(this.hexToRgb(r))},a.prototype.setNoColor=function(){var e=this.container.querySelector(".e-row").children[0];e.classList.add(it),this.value||(e.classList.add(rt),t.closest(e,".e-palette").focus()),["aria-selected","aria-label"].forEach(function(t){e.removeAttribute(t)}),e.style.backgroundColor=""},a.prototype.appendElement=function(e,t){void 0===t&&(t=0);var i=this.container.children[t];i?this.container.insertBefore(e,i):this.container.appendChild(e)},a.prototype.addTileSelection=function(e){e&&(e.classList.add(rt),e.setAttribute("aria-selected","true"))},a.prototype.createPicker=function(){t.classList(this.container,["e-color-picker"],["e-color-palette"]);var e=this.createElement("div",{className:"e-hsv-container"});this.appendElement(e),e.appendChild(this.createElement("div",{className:Qe}));var i=this.createElement("span",{className:"e-handler",attrs:{tabindex:"0"}});e.appendChild(i),null!==this.value&&""!==this.value||(this.value="#008000ff"),this.rgb=this.hexToRgb(this.value),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHsvContainerBg(),this.setHandlerPosition(),this.createSlider(),this.createDragTooltip()},a.prototype.setHsvContainerBg=function(e){void 0===e&&(e=this.hsv[0]),this.getHsvContainer().style.backgroundColor=this.convertToRgbString(this.hsvToRgb(e,100,100,1))},a.prototype.getHsvContainer=function(){return t.select(".e-hsv-container",this.container)},a.prototype.setHandlerPosition=function(){var e=this.getDragHandler(),i=t.select("."+Qe,this.container);this.enableRtl?e.style.left=t.formatUnit((i.offsetWidth-e.offsetWidth/2.5)*Math.abs(100-this.hsv[1])/100):e.style.left=t.formatUnit((i.offsetWidth-e.offsetWidth/2.5)*this.hsv[1]/100),e.style.top=t.formatUnit((i.offsetHeight-e.offsetHeight/2.5)*(100-this.hsv[2])/100)},a.prototype.createSlider=function(){var e=this.createElement("div",{className:"e-slider-preview"});this.appendElement(e,1),this.createPreview(e);var t=this.createElement("div",{className:"e-colorpicker-slider"});e.insertBefore(t,e.children[0]);var i=this.createElement("div",{className:"e-hue-slider"});t.appendChild(i),this.hueSlider=new xe({value:this.hsv[0],min:0,max:359,enableRtl:this.enableRtl,enabled:!this.disabled,change:this.hueChange.bind(this)}),this.hueSlider.createElement=this.createElement,this.hueSlider.appendTo(i),this.enableOpacity&&(i=this.createElement("div",{className:"e-opacity-slider"}),t.appendChild(i),this.createOpacitySlider(i))},a.prototype.createOpacitySlider=function(e){this.opacitySlider=new xe({value:100*this.rgb[3],min:0,max:100,enableRtl:this.enableRtl,enabled:!this.disabled,change:this.opacityChange.bind(this)}),this.opacitySlider.createElement=this.createElement,this.opacitySlider.appendTo(e);var t=this.createElement("div",{className:"e-opacity-empty-track"});e.appendChild(t),this.updateOpacitySliderBg()},a.prototype.updateOpacitySliderBg=function(){var e=this.enableRtl?"to left":"to right",i=t.select(".e-opacity-empty-track",this.opacitySlider.element);i&&(i.style.background="linear-gradient("+e+", rgba("+this.rgb.slice(0,3)+", 0) 0%, "+this.convertToRgbString(this.rgb.slice(0,3))+" 100%)")},a.prototype.hueChange=function(e){this.hsv[0]=e.value,this.setHsvContainerBg(),this.convertToOtherFormat()},a.prototype.opacityChange=function(e){var t=e.value,i=this.rgbToHex(this.rgb);this.hsv[3]=t/100,this.rgb[3]=t/100;var s=this.rgbToHex(this.rgb);this.updateOpacityInput(t);var n=this.convertToRgbString(this.rgb);this.updatePreview(n),this.triggerEvent(s,i,n)},a.prototype.updateOpacityInput=function(e){if(this.enableOpacity&&!this.getWrapper().classList.contains($e)){var i=t.getInstance(t.select("."+st,this.container),ie);i.value=e,i.dataBind()}},a.prototype.createPreview=function(e){var t=this.createElement("div",{className:nt});e.appendChild(t);var i=this.createElement("span",{className:"e-preview e-current",attrs:{title:this.l10n.getConstant("CurrentColor")}});t.appendChild(i);var s=this.convertToRgbString(this.rgb);i.style.backgroundColor=s,i=this.createElement("span",{className:"e-preview e-previous",attrs:{title:this.l10n.getConstant("PreviousColor")}}),t.appendChild(i),i.style.backgroundColor=s},a.prototype.isPicker=function(){return!this.container.classList.contains("e-color-palette")},a.prototype.getPopupEle=function(){return this.container.parentElement},a.prototype.createNumericInput=function(e,t,i,s){var n=this,a=new ie({value:t,placeholder:i,min:0,max:s,format:"###.##",showSpinButton:!1,floatLabelType:"Always",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker(),change:function(e){e.event&&n.inputHandler(e.event)}});a.createElement=this.createElement,a.appendTo(e)},a.prototype.createInput=function(){var t=this.isPicker(),i=this.getWrapper();if(t&&!i.classList.contains($e)||!t&&i.classList.contains(at)){var s=this.createElement("div",{className:et});t?this.appendElement(s,2):this.appendElement(s,1);var n=this.createElement("div",{className:"e-input-container"});if(s.appendChild(n),i.classList.contains("e-hide-valueswitcher")||this.appendValueSwitchBtn(s),!i.classList.contains(Ge)){var a=this.createElement("input",{className:"e-hex",attrs:{maxlength:"7",spellcheck:"false","aria-label":"HEX"}});n.appendChild(a),e.Input.createInput({element:a,floatLabelType:"Always",properties:{placeholder:"HEX",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker()}},this.createElement),e.Input.setValue(this.value.slice(0,7),a),a.addEventListener("input",this.inputHandler.bind(this))}if(!i.classList.contains(Je)){var r=void 0,l=void 0;this.isRgb?(r="RGB",l=this.rgb):(r="HSV",l=this.hsv);for(var o=["rh","gs","bv"],h=0;h<3;h++)this.createNumericInput(n.appendChild(this.createElement("input",{className:"e-"+o[h]+"-value"})),l[h],r[h],255);this.enableOpacity&&this.appendOpacityValue(n)}}},a.prototype.appendOpacityValue=function(e){this.createNumericInput(e.appendChild(this.createElement("input",{className:st})),100*this.rgb[3],"A",100)},a.prototype.appendValueSwitchBtn=function(e){var t=this.createElement("button",{className:"e-icons e-css e-btn e-flat e-icon-btn e-value-switch-btn",attrs:{title:"Toggle format"}});e.appendChild(t),this.isPicker()&&!this.getWrapper().classList.contains(Je)&&t.addEventListener("click",this.formatSwitchHandler.bind(this))},a.prototype.createCtrlBtn=function(){if(this.modeSwitcher||this.showButtons){this.l10n.setLocale(this.locale);var e=this.createElement("div",{className:Ze});if(this.container.appendChild(e),this.showButtons){var t=this.createElement("div",{className:Ye});e.appendChild(t);var i=this.l10n.getConstant("Apply");t.appendChild(this.createElement("button",{innerHTML:i,className:"e-btn e-css e-flat e-primary e-small "+Ke,attrs:{title:i}}));var s=this.l10n.getConstant("Cancel");t.appendChild(this.createElement("button",{innerHTML:s,className:"e-btn e-css e-flat e-small e-cancel",attrs:{title:s}}))}this.modeSwitcher&&this.appendModeSwitchBtn()}},a.prototype.appendModeSwitchBtn=function(){var e=this.createElement("button",{className:"e-icons e-btn e-flat e-icon-btn "+tt,attrs:{title:this.l10n.getConstant("ModeSwitcher")}});t.select("."+Ze,this.container).insertBefore(e,t.select("."+Ye,this.container))},a.prototype.createDragTooltip=function(){var e=this,s=new i.Tooltip({opensOn:"Custom",showTipPointer:!1,cssClass:"e-color-picker-tooltip",htmlAttributes:{title:"tooltip"},beforeOpen:function(t){e.tooltipEle=t.element},animation:{open:{effect:"None"},close:{effect:"None"}}});s.createElement=this.createElement,s.appendTo(this.container),s.open(this.container),this.tooltipEle.style.zIndex=i.getZindexPartial(this.tooltipEle).toString(),this.tooltipEle.setAttribute("aria-label","colorpicker-tooltip"),t.select(".e-tip-content",this.tooltipEle).appendChild(this.createElement("div",{className:"e-tip-transparent"}))},a.prototype.getTooltipInst=function(){return t.getInstance(this.container,i.Tooltip)},a.prototype.setTooltipOffset=function(e){this.getTooltipInst().offsetY=e},a.prototype.toggleDisabled=function(e){e?this.getWrapper().classList.add("e-disabled"):this.getWrapper().classList.remove("e-disabled"),this.showButtons&&[].slice.call(t.selectAll(".e-btn",this.container)).forEach(function(i){e?t.attributes(i,{disabled:""}):i.removeAttribute("disabled")})},a.prototype.convertToRgbString=function(e){return e.length?4===e.length?"rgba("+e.join()+")":"rgb("+e.join()+")":""},a.prototype.convertToHsvString=function(e){return 4===e.length?"hsva("+e.join()+")":"hsv("+e.join()+")"},a.prototype.updateHsv=function(){this.hsv[1]=this.hsv[1]>100?100:this.hsv[1],this.hsv[2]=this.hsv[2]>100?100:this.hsv[2],this.setHandlerPosition()},a.prototype.convertToOtherFormat=function(e,t){void 0===e&&(e=!1);var i=this.rgbToHex(this.rgb);this.rgb=this.hsvToRgb.apply(this,this.hsv);var s=this.rgbToHex(this.rgb),n=this.convertToRgbString(this.rgb);this.updatePreview(n),this.updateInput(s),this.triggerEvent(s,i,n,e,t)},a.prototype.updateInput=function(i){var s=this.getWrapper();s.classList.contains($e)||(s.classList.contains(Ge)||e.Input.setValue(i.substr(0,7),t.select(".e-hex",this.container)),s.classList.contains(Je)||(this.isRgb?this.updateValue(this.rgb,!1):this.updateValue(this.hsv,!1)))},a.prototype.updatePreview=function(e){this.enableOpacity&&this.updateOpacitySliderBg(),t.select(".e-tip-transparent",this.tooltipEle).style.backgroundColor=e,t.select("."+nt+" .e-current",this.container).style.backgroundColor=e,t.select("."+nt+" .e-previous",this.container).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value))},a.prototype.getDragHandler=function(){return t.select(".e-handler",this.container)},a.prototype.removeTileSelection=function(){[].slice.call(t.selectAll("."+rt,this.container)).forEach(function(e){e.classList.remove(rt),e.setAttribute("aria-selected","false")})},a.prototype.convertRgbToNumberArray=function(e){return e.slice(e.indexOf("(")+1,e.indexOf(")")).split(",").map(function(e,t){return 3!==t?parseInt(e,10):parseFloat(e)})},a.prototype.getValue=function(e,t){if(e||(e=this.value),t=t?t.toLowerCase():"hex","r"===e[0]){i=this.convertRgbToNumberArray(e);if("hex"===t||"hexa"===t){s=this.rgbToHex(i);return"hex"===t?s.slice(0,7):s}return"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i.slice(0,3))):"hsva"===t?this.convertToHsvString(this.rgbToHsv.apply(this,i)):"null"}if("h"===e[0]){var i=this.hsvToRgb.apply(this,this.convertRgbToNumberArray(e));if("rgba"===t)return this.convertToRgbString(i);if("hex"===t||"hexa"===t){var s=this.rgbToHex(i);return"hex"===t?s.slice(0,7):s}return"rgb"===t?this.convertToRgbString(i.slice(0,3)):"null"}e=this.roundValue(e);var n=this.hexToRgb(e);return"rgb"!==t&&"hsv"!==t||(n=n.slice(0,3)),"rgba"===t||"rgb"===t?this.convertToRgbString(n):"hsva"===t||"hsv"===t?this.convertToHsvString(this.rgbToHsv.apply(this,n)):"hex"===t?e.slice(0,7):"a"===t?n[3].toString():"null"},a.prototype.toggle=function(){this.container.parentElement.classList.contains("e-popup-close")?this.splitBtn.toggle():this.closePopup(null)},a.prototype.getModuleName=function(){return"colorpicker"},a.prototype.getPersistData=function(){return this.addOnPersist(["value"])},a.prototype.wireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();t.EventHandler.add(e,"keydown",this.pickerKeyDown,this);var i=t.select("."+Ye,this.container);i&&t.EventHandler.add(i,"keydown",this.ctrlBtnKeyDown,this),t.EventHandler.add(this.getHsvContainer(),"mousedown touchstart",this.handlerDown,this),(this.modeSwitcher||this.showButtons)&&this.addCtrlSwitchEvent(),t.EventHandler.add(t.select(".e-previous",this.container),"click",this.previewHandler,this)}else t.EventHandler.add(this.container,"click",this.paletteClickHandler,this),t.EventHandler.add(this.container,"keydown",this.paletteKeyDown,this)},a.prototype.formResetHandler=function(){this.value=this.initialInputValue,t.attributes(this.element,{value:this.initialInputValue})},a.prototype.addCtrlSwitchEvent=function(){var e=t.select("."+Ze,this.container);e&&t.EventHandler.add(e,"click",this.btnClickHandler,this)},a.prototype.ctrlBtnKeyDown=function(e){if(13===e.keyCode){if(t.select("."+Ke,this.container)){var i=this.rgbToHex(this.rgb);this.triggerChangeEvent(i)}this.splitBtn.element.focus()}},a.prototype.pickerKeyDown=function(e){switch(e.keyCode){case 39:this.handlerDragPosition(1,this.enableRtl?-1:1,e);break;case 37:this.handlerDragPosition(1,this.enableRtl?1:-1,e);break;case 38:this.handlerDragPosition(2,1,e);break;case 40:this.handlerDragPosition(2,-1,e);break;case 13:e.preventDefault();var t=this.rgbToHex(this.rgb);this.enterKeyHandler(t)}},a.prototype.enterKeyHandler=function(e){this.triggerChangeEvent(e),this.inline||this.splitBtn.element.focus()},a.prototype.closePopup=function(e){var t=this,i={element:this.container,event:e,cancel:!1};this.trigger("beforeClose",i,function(e){e.cancel||(t.splitBtn.toggle(),t.onPopupClose())})},a.prototype.triggerChangeEvent=function(e,t){var i=e.slice(0,7);this.trigger("change",{currentValue:{hex:i,rgba:this.convertToRgbString(this.rgb)},event:t,previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:this.enableOpacity?e:i}),this.showRecentColors&&(this.recentColors.unshift(i),this.inline&&this.renderRecentColor()),this.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:i},!0),this.element.value=i||"#000000"},a.prototype.handlerDragPosition=function(e,t,i){i.preventDefault(),this.hsv[e]+=t*(i.ctrlKey?1:3),this.hsv[e]<0&&(this.hsv[e]=0),this.updateHsv(),this.convertToOtherFormat(!0,i)},a.prototype.handlerDown=function(e){e.preventDefault(),"mousedown"===e.type?(this.clientX=Math.abs(e.pageX-pageXOffset),this.clientY=Math.abs(e.pageY-pageYOffset),this.setTooltipOffset(8)):(this.clientX=Math.abs(e.changedTouches[0].pageX-pageXOffset),this.clientY=Math.abs(e.changedTouches[0].pageY-pageYOffset),this.setTooltipOffset(-8)),this.setHsv(this.clientX,this.clientY),this.getDragHandler().style.transition="left .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1)",this.updateHsv(),this.convertToOtherFormat(!1,e),this.getDragHandler().focus(),t.EventHandler.add(document,"mousemove touchmove",this.handlerMove,this),t.EventHandler.add(document,"mouseup touchend",this.handlerEnd,this)},a.prototype.handlerMove=function(e){"touchmove"!==e.type&&e.preventDefault();var i,s;"mousemove"===e.type?(i=Math.abs(e.pageX-pageXOffset),s=Math.abs(e.pageY-pageYOffset)):(i=Math.abs(e.changedTouches[0].pageX-pageXOffset),s=Math.abs(e.changedTouches[0].pageY-pageYOffset)),this.setHsv(i,s);var n=this.getDragHandler();this.updateHsv(),this.convertToOtherFormat(!1,e),this.getTooltipInst().refresh(n),this.tooltipEle.style.transform||(Math.abs(this.clientX-i)>8||Math.abs(this.clientY-s)>8)&&(t.select("."+Qe,this.container).style.cursor="pointer",n.style.transition="none",this.inline||(this.tooltipEle.style.zIndex=(parseInt(this.getPopupEle().style.zIndex,10)+1).toString()),this.tooltipEle.style.transform="rotate(45deg)",n.classList.add("e-hide-handler"))},a.prototype.setHsv=function(e,i){var s=t.select("."+Qe,this.container),n=s.getBoundingClientRect();e=this.enableRtl?e>n.right?0:Math.abs(e-n.right):e>n.left?Math.abs(e-n.left):0,i=i>n.top?Math.abs(i-n.top):0,this.hsv[2]=Math.round(10*Number(100*(s.offsetHeight-Math.max(0,Math.min(s.offsetHeight,i-s.offsetTop)))/s.offsetHeight))/10,this.hsv[1]=Math.round(10*Number(100*Math.max(0,Math.min(s.offsetWidth,e-s.offsetLeft))/s.offsetWidth))/10},a.prototype.handlerEnd=function(e){"touchend"!==e.type&&e.preventDefault(),t.EventHandler.remove(document,"mousemove touchmove",this.handlerMove),t.EventHandler.remove(document,"mouseup touchend",this.handlerEnd);var i=this.getDragHandler();t.select("."+Qe,this.container).style.cursor="",this.tooltipEle.style.transform&&(this.tooltipEle.style.transform="",i.classList.remove("e-hide-handler")),this.inline||this.showButtons||this.closePopup(e)},a.prototype.btnClickHandler=function(e){var i=e.target;t.closest(i,"."+tt)?(e.stopPropagation(),this.switchToPalette()):(i.classList.contains(Ke)||i.classList.contains("e-cancel"))&&this.ctrlBtnClick(i,e)},a.prototype.switchToPalette=function(){this.trigger("beforeModeSwitch",{element:this.container,mode:"Palette"}),this.unWireEvents(),this.destroyOtherComp(),t.detach(t.select(".e-slider-preview",this.container)),this.getWrapper().classList.contains($e)||t.remove(t.select("."+et,this.container)),t.detach(this.getHsvContainer()),this.createPalette(),this.firstPaletteFocus(),this.createInput(),this.refreshPopupPos(),this.element.parentElement&&this.element.parentElement.parentElement&&this.element.parentElement.parentElement.classList.contains("e-ie-ddb-popup")&&this.refreshImageEditorPopupPos(),this.wireEvents(),this.trigger("onModeSwitch",{element:this.container,mode:"Palette"})},a.prototype.refreshImageEditorPopupPos=function(){if(t.Browser.isDevice){var e=this.getPopupEle();e.style.left=t.formatUnit(0+pageXOffset),e.style.top=t.formatUnit(0+pageYOffset);var i=document.querySelector("#"+this.element.parentElement.parentElement.id.split("-popup")[0]);i&&e.parentElement.ej2_instances[0].refreshPosition(i)}},a.prototype.refreshPopupPos=function(){if(!this.inline){var e=this.getPopupEle();e.style.left=t.formatUnit(0+pageXOffset),e.style.top=t.formatUnit(0+pageYOffset),this.getPopupInst().refreshPosition(this.splitBtn.element.parentElement)}},a.prototype.formatSwitchHandler=function(){this.isRgb?(this.updateValue(this.hsv,!0,3,[360,100,100]),this.isRgb=!1):(this.updateValue(this.rgb,!0,2),this.isRgb=!0)},a.prototype.updateValue=function(e,i,s,n){for(var a,r=["e-rh-value","e-gs-value","e-bv-value"],l=0,o=r.length;l<o;l++)(a=t.getInstance(t.select("."+r[l],this.container),ie)).value=Math.round(e[l]),i&&(a.placeholder=r[l].substr(s,1).toUpperCase(),a.max=n?n[l]:255),a.dataBind()},a.prototype.previewHandler=function(e){var i=e.target,s=this.rgbToHex(this.rgb);this.rgb=this.convertRgbToNumberArray(i.style.backgroundColor),this.rgb[3]||(this.rgb[3]=1);var n=this.rgbToHex(this.rgb),a=this.rgbToHsv.apply(this,this.rgb);a[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:a[0]},!0),this.hueSlider.refresh()),this.setHsvContainerBg(a[0]),this.enableOpacity&&a[3]!==this.hsv[3]&&(this.opacitySlider.setProperties({value:100*a[3]},!0),this.opacitySlider.refresh(),this.updateOpacitySliderBg()),this.hsv=a,this.setHandlerPosition(),this.updateInput(n),t.select("."+nt+" .e-current",this.container).style.backgroundColor=this.convertToRgbString(this.rgb),this.triggerEvent(n,s,this.convertToRgbString(this.rgb),!1,e)},a.prototype.paletteClickHandler=function(e){e.preventDefault();var i=e.target;if(i.classList.contains(lt)){if(this.removeTileSelection(),this.addTileSelection(i),i.classList.contains(it))this.noColorTile();else{var s=i.getAttribute("aria-label"),n=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(this.roundValue(s)),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(at)&&this.updateInput(s),this.triggerEvent(s,n,this.convertToRgbString(this.rgb),!1,e)}this.inline||this.showButtons||this.closePopup(e)}else t.closest(i,"."+tt)?this.switchToPicker():i.classList.contains(Ke)||i.classList.contains("e-cancel")?this.ctrlBtnClick(i,e):this.getWrapper().classList.contains(at)&&t.closest(i,".e-value-switch-btn")&&this.formatSwitchHandler()},a.prototype.noColorTile=function(e){void 0===e&&(e=!1);var t=this.rgbToHex(this.rgb);this.rgb=[],this.hsv=[],this.triggerEvent("",t,"",e)},a.prototype.switchToPicker=function(){var e=this.getWrapper();this.trigger("beforeModeSwitch",{element:this.container,mode:"Picker"}),this.unWireEvents(),[].slice.call(t.selectAll(".e-palette",this.container)).forEach(function(e){t.detach(e)}),this.container.querySelector(".e-clr-pal-rec-wpr")&&t.detach(this.container.querySelector(".e-clr-pal-rec-wpr")),e.classList.contains(at)&&t.detach(t.select("."+et,this.container)),this.container.style.width="";var i=t.select(".e-custom-palette",this.container);this.presetColors&&t.remove(i),this.createPicker(),this.getDragHandler().focus(),this.createInput(),this.refreshPopupPos(),this.element.parentElement&&this.element.parentElement.parentElement&&this.element.parentElement.parentElement.classList.contains("e-ie-ddb-popup")&&this.refreshImageEditorPopupPos(),this.wireEvents(),this.trigger("onModeSwitch",{element:this.container,mode:"Picker"})},a.prototype.ctrlBtnClick=function(e,t){if(e.classList.contains(Ke)){var i=this.rgbToHex(this.rgb);this.triggerChangeEvent(i,t)}if(this.inline){if(e.classList.contains("e-cancel")){var s={element:this.container,event:t,cancel:!1};this.trigger("beforeClose",s)}}else this.closePopup(t),this.splitBtn.element.focus()},a.prototype.paletteKeyDown=function(e){var i=e.target;if(i.classList.contains("e-palette")){var s,n,a=[].slice.call(t.selectAll("."+lt,i)),r=a.filter(function(e){return e.classList.contains("e-selected")}).pop();switch(!e.altKey&&e.keyCode){case 39:e.preventDefault(),a[n=r&&(!this.enableRtl&&a.indexOf(r)===a.length-1||this.enableRtl&&0===a.indexOf(r))?this.enableRtl?a.length-1:0:r?this.tilePosition(a,r,this.enableRtl?-1:1):this.enableRtl?a.length-1:0]&&(s=a[n]),this.keySelectionChanges(s);break;case 37:e.preventDefault(),a[n=r&&(!this.enableRtl&&0===a.indexOf(r)||this.enableRtl&&a.indexOf(r)===a.length-1)?this.enableRtl?0:a.length-1:r?this.tilePosition(a,r,this.enableRtl?1:-1):this.enableRtl?0:a.length-1]&&(s=a[n]),this.keySelectionChanges(s);break;case 38:e.preventDefault(),s=a[n=r?this.tilePosition(a,r,-this.columns):0]?a[n]:a[n-this.columns],this.keySelectionChanges(s);break;case 40:e.preventDefault(),a[n=r?this.tilePosition(a,r,this.columns):a.length-1]?s=a[n]:(n%=a.length,s=a[n+=a[a.length-1].parentElement.childElementCount]),this.keySelectionChanges(s);break;case 13:if(e.preventDefault(),r){var l=r.getAttribute("aria-label");this.enterKeyHandler(l||"")}}}},a.prototype.keySelectionChanges=function(e){if(this.removeTileSelection(),this.addTileSelection(e),e.classList.contains(it))this.noColorTile(!0);else{var t=e.getAttribute("aria-label"),i=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(t),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(at)&&this.updateInput(t),this.triggerEvent(t,i,this.convertToRgbString(this.rgb),!0)}},a.prototype.tilePosition=function(e,t,i){var s=(e=Array.prototype.slice.call(e)).length,n=this.columns-e[s-1].parentElement.childElementCount,a=e.indexOf(t);return a+=i,a<0?a+=s+n:a%=s+n,a},a.prototype.inputHandler=function(e){var i=e.target;if(i.value.length){var s,n;switch(t.select(".e-float-text",i.parentElement).textContent){case"HEX":var a="";if(("#"===i.value[0]&&5!==i.value.length||"#"!==i.value[0]&&4!==i.value.length)&&(a=this.roundValue(i.value)),9!==a.length)return;n=this.rgbToHex(this.rgb),this.rgb=this.hexToRgb(a+a.substr(-2)),this.inputValueChange(this.rgbToHsv.apply(this,this.rgb),n,i.value,e);break;case"R":this.rgb[0]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[0]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n,null,e));break;case"G":this.rgb[1]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[1]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n,null,e));break;case"B":this.rgb[2]!==Number(i.value)&&(n=this.rgbToHex(this.rgb),this.rgb[2]=Number(i.value),s=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(s,n,null,e));break;case"H":this.hueSlider.value=Number(i.value);break;case"S":this.hsv[1]!==Number(i.value)&&(this.hsv[1]=Number(i.value),this.updateHsv(),this.convertToOtherFormat(!1,e));break;case"V":this.hsv[2]!==Number(i.value)&&(this.hsv[2]=Number(i.value),this.updateHsv(),this.convertToOtherFormat(!1,e));break;case"A":this.opacitySlider.value=Number(i.value)}}},a.prototype.inputValueChange=function(e,t,i,s){e[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:e[0]},!0),this.hueSlider.refresh(),this.setHsvContainerBg(e[0])),this.hsv=e;var n=this.rgbToHex(this.rgb);this.setHandlerPosition(),this.updateInput(i||n);var a=this.convertToRgbString(this.rgb);this.updatePreview(a),this.triggerEvent(n,t,a,!1,s)},a.prototype.triggerEvent=function(e,i,s,n,a){void 0===n&&(n=!1);var r=e.slice(0,7);t.isNullOrUndefined(a)&&(a=new MouseEvent("click",{bubbles:!0,cancelable:!1})),this.showButtons||n?this.trigger("select",{currentValue:{hex:r,rgba:s},event:a,previousValue:{hex:i.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(i))}}):(this.trigger("change",{currentValue:{hex:r,rgba:s},event:a,previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:e}),this.showRecentColors&&(this.recentColors.unshift(r),this.inline&&this.renderRecentColor()),this.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:r},!0),this.element.value=r||"#000000")},a.prototype.destroy=function(){var e=this,i=this.getWrapper();n.prototype.destroy.call(this),["tabindex","spellcheck"].forEach(function(t){e.element.removeAttribute(t)}),this.inline?(this.unWireEvents(),this.destroyOtherComp()):(this.isPopupOpen()&&(this.unWireEvents(),this.destroyOtherComp()),this.splitBtn.destroy(),this.splitBtn=null),this.tileRipple(),this.tileRipple=null,this.ctrlBtnRipple(),this.ctrlBtnRipple=null,this.element.nextElementSibling&&t.detach(this.element.nextElementSibling),i&&(i.parentElement.insertBefore(this.element,i),t.detach(i)),this.container=null,this.formElement&&t.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},a.prototype.destroyOtherComp=function(){if(this.isPicker()){for(var e=t.closest(this.hueSlider.element,".e-color-picker").querySelectorAll(".e-numerictextbox"),i=0;i<e.length;i++)t.getInstance(e[i],ie).destroy();this.hueSlider.destroy(),this.enableOpacity&&(this.opacitySlider.destroy(),this.opacitySlider=null),this.hueSlider=null;var s=this.getTooltipInst();s.close(),s.destroy(),this.tooltipEle=null}},a.prototype.isPopupOpen=function(){return this.getPopupEle().classList.contains("e-popup-open")},a.prototype.unWireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();t.EventHandler.remove(e,"keydown",this.pickerKeyDown);var i=t.select("."+Ye,this.container);i&&t.EventHandler.remove(i,"keydown",this.ctrlBtnKeyDown),t.EventHandler.remove(this.getHsvContainer(),"mousedown touchstart",this.handlerDown),(this.modeSwitcher||this.showButtons)&&t.EventHandler.remove(t.select("."+Ze,this.container),"click",this.btnClickHandler),t.EventHandler.remove(t.select(".e-previous",this.container),"click",this.previewHandler)}else t.EventHandler.remove(this.container,"click",this.paletteClickHandler),t.EventHandler.remove(this.container,"keydown",this.paletteKeyDown)},a.prototype.roundValue=function(e){if(!e)return"";"#"!==e[0]&&(e="#"+e);var t=e.length;if(4===t&&(e+="f",t=5),5===t){for(var i="",s=1,n=e.length;s<n;s++)i+=e.charAt(s)+e.charAt(s);e="#"+i,t=9}return 7===t&&(e+="ff"),e},a.prototype.hexToRgb=function(e){if(!e)return[];9!==(e=e.trim()).length&&(e=this.roundValue(e));var t=Number((parseInt(e.slice(-2),16)/255).toFixed(2));e=e.slice(1,7);var i=parseInt(e,16),s=[];return s.push(i>>16&255),s.push(i>>8&255),s.push(255&i),s.push(t),s},a.prototype.rgbToHsv=function(e,i,s,n){if(this.rgb&&!this.rgb.length)return[];e/=255,i/=255,s/=255;var a,r=Math.max(e,i,s),l=Math.min(e,i,s),o=r,h=r-l,p=0===r?0:h/r;if(r===l)a=0;else{switch(r){case e:a=(i-s)/h+(i<s?6:0);break;case i:a=(s-e)/h+2;break;case s:a=(e-i)/h+4}a/=6}var d=[Math.round(360*a),Math.round(1e3*p)/10,Math.round(1e3*o)/10];return t.isNullOrUndefined(n)||d.push(n),d},a.prototype.hsvToRgb=function(e,i,s,n){var a,r,l;if(i/=100,s/=100,0===i)return a=r=l=s,[Math.round(255*a),Math.round(255*r),Math.round(255*l),n];e/=60;var o=Math.floor(e),h=e-o,p=s*(1-i),d=s*(1-i*h),u=s*(1-i*(1-h));switch(o){case 0:a=s,r=u,l=p;break;case 1:a=d,r=s,l=p;break;case 2:a=p,r=s,l=u;break;case 3:a=p,r=d,l=s;break;case 4:a=u,r=p,l=s;break;default:a=s,r=p,l=d}var c=[Math.round(255*a),Math.round(255*r),Math.round(255*l)];return t.isNullOrUndefined(n)||c.push(n),c},a.prototype.rgbToHex=function(e){return e.length?"#"+this.hex(e[0])+this.hex(e[1])+this.hex(e[2])+(t.isNullOrUndefined(e[3])?"":0!==e[3]?(Math.round(255*e[3])+65536).toString(16).substr(-2):"00"):""},a.prototype.hex=function(e){return("0"+e.toString(16)).slice(-2)},a.prototype.changeModeSwitcherProp=function(e){var i=t.select("."+Ze,this.container);e?i?this.appendModeSwitchBtn():(this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):i&&(this.showButtons?t.detach(t.select("."+tt,i)):t.remove(i))},a.prototype.changeShowBtnProps=function(e){var i=t.select("."+Ze,this.container);e?(i&&t.remove(i),this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):this.modeSwitcher?t.detach(t.select("."+Ye,i)):t.remove(i)},a.prototype.changeValueProp=function(e){if(this.isPicker())this.rgb=this.hexToRgb(e),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHandlerPosition(),t.detach(t.closest(this.hueSlider.element,".e-slider-preview")),this.createSlider(),this.setHsvContainerBg(),this.updateInput(e),4===this.rgb.length&&this.updateOpacityInput(100*this.rgb[3]);else{this.removeTileSelection();var i=this.container.querySelector('span[aria-label="'+this.roundValue(e)+'"]');i&&this.addTileSelection(i)}},a.prototype.setInputEleProps=function(){t.remove(t.select("."+et,this.container)),this.createInput()},a.prototype.changeDisabledProp=function(e){this.isPicker()&&(this.hueSlider.enabled=!e,this.opacitySlider.enabled=!e,this.setInputEleProps()),e?(this.toggleDisabled(!0),this.unWireEvents()):(this.toggleDisabled(!1),this.wireEvents())},a.prototype.changeCssClassProps=function(e,i){var s=this.getWrapper(),n=this.getPopupEle();i&&(t.removeClass([s,n],i.split(" ")),this.splitBtn&&this.splitBtn.activeElem&&this.splitBtn.activeElem[0]&&this.splitBtn.activeElem[1]&&t.removeClass([this.splitBtn.activeElem[0],this.splitBtn.activeElem[1]],i.split(" ")),this.splitBtn&&this.splitBtn.element&&this.splitBtn.element.parentElement&&t.removeClass([this.splitBtn.element.parentElement],i.split(" "))),e&&(t.addClass([s,n],e.replace(/\s+/g," ").trim().split(" ")),this.splitBtn&&this.splitBtn.activeElem&&this.splitBtn.activeElem[0]&&this.splitBtn.activeElem[1]&&t.addClass([this.splitBtn.activeElem[0],this.splitBtn.activeElem[1]],e.replace(/\s+/g," ").trim().split(" ")),this.splitBtn&&this.splitBtn.element&&this.splitBtn.element.parentElement&&t.addClass([this.splitBtn.element.parentElement],e.replace(/\s+/g," ").trim().split(" ")))},a.prototype.changeRtlProps=function(e){e?t.addClass([this.getWrapper()],"e-rtl"):t.removeClass([this.getWrapper()],"e-rtl")},a.prototype.changePaletteProps=function(){t.detach(this.container.children[0]),this.container.style.width="",this.createPalette()},a.prototype.changeOpacityProps=function(e){var i=this.getWrapper();e?(t.removeClass([this.container.parentElement],"e-hide-opacity"),this.createOpacitySlider(t.select(".e-colorpicker-slider",this.container).appendChild(this.createElement("div",{className:"e-opacity-slider"}))),i.classList.contains($e)||i.classList.contains(Je)||this.appendOpacityValue(t.select(".e-input-container",this.container))):(t.addClass([this.container.parentElement],"e-hide-opacity"),this.opacitySlider.destroy(),t.remove(this.opacitySlider.element),this.opacitySlider=null,i.classList.contains($e)||i.classList.contains(Je)||t.remove(t.select("."+st,this.container).parentElement))},a.prototype.onPropertyChanged=function(e,i){var n=this;if(!t.isNullOrUndefined(e.value)){var a=this.roundValue(e.value);if(9===a.length)this.element.value=this.roundValue(a).slice(0,7),(r=this.splitBtn&&t.select(".e-split-preview",this.splitBtn.element))&&(r.style.backgroundColor=this.convertToRgbString(this.hexToRgb(e.value)));else if(this.noColor&&"Palette"===this.mode&&""===this.value){var r=this.splitBtn&&t.select(".e-split-preview",this.splitBtn.element);r.style.backgroundColor=""}else this.value=i.value}if(!this.inline&&t.isNullOrUndefined(e.inline)){var l=["disabled","enableRtl"];if(this.splitBtn.setProperties(s.getModel(e,l)),!this.isPopupOpen())return this.changeCssClassProps(e.cssClass,i.cssClass),void this.changeRtlProps(e.enableRtl)}for(var o=this,h=0,p=Object.keys(e);h<p.length;h++)!function(s){switch(s){case"inline":e.inline?(o.getWrapper().appendChild(o.container),o.splitBtn.destroy(),t.detach(o.element.nextElementSibling),o.container.children.length||o.createWidget()):(o.destroyOtherComp(),o.unWireEvents(),o.container.innerHTML="",o.createSplitBtn());break;case"cssClass":o.changeCssClassProps(e.cssClass,i.cssClass);var a=e.cssClass.split(" ").concat(i.cssClass.split(" ")),r=0;(a=a.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[])).forEach(function(e){0!==r||e!==$e&&"e-hide-valueswitcher"!==e&&e!==at&&e!==Ge&&e!==Je||(t.select("."+et,n.container)&&t.remove(t.select("."+et,n.container)),n.createInput(),r++)});break;case"enableRtl":o.isPicker()&&(o.hueSlider.enableRtl=e.enableRtl,o.enableOpacity&&(o.opacitySlider.enableRtl=e.enableRtl),o.setInputEleProps()),o.changeRtlProps(e.enableRtl);break;case"disabled":o.changeDisabledProp(e.disabled);break;case"value":o.value!==i.value&&o.changeValueProp(e.value);break;case"showButtons":o.changeShowBtnProps(e.showButtons);break;case"mode":"Picker"===e.mode?o.switchToPicker():o.switchToPalette();break;case"modeSwitcher":o.changeModeSwitcherProp(e.modeSwitcher);break;case"columns":case"presetColors":o.isPicker()||o.changePaletteProps();break;case"noColor":e.noColor?"Palette"!==o.mode||o.modeSwitcher||o.setNoColor():o.changePaletteProps();break;case"enableOpacity":o.changeOpacityProps(e.enableOpacity);break;case"showRecentColors":if(!e.showRecentColors){var l=o.container.querySelector(".e-clr-pal-rec-wpr");l&&t.detach(l)}o.recentColors=[]}}(p[h])},a.prototype.focusIn=function(){this.element.parentElement.focus()},Xe([t.Property("#008000ff")],a.prototype,"value",void 0),Xe([t.Property("")],a.prototype,"cssClass",void 0),Xe([t.Property(!1)],a.prototype,"disabled",void 0),Xe([t.Property("Picker")],a.prototype,"mode",void 0),Xe([t.Property(!0)],a.prototype,"modeSwitcher",void 0),Xe([t.Property(null)],a.prototype,"presetColors",void 0),Xe([t.Property(!0)],a.prototype,"showButtons",void 0),Xe([t.Property(10)],a.prototype,"columns",void 0),Xe([t.Property(!1)],a.prototype,"inline",void 0),Xe([t.Property(!1)],a.prototype,"noColor",void 0),Xe([t.Property(!1)],a.prototype,"enablePersistence",void 0),Xe([t.Property(!0)],a.prototype,"enableOpacity",void 0),Xe([t.Property(!1)],a.prototype,"createPopupOnClick",void 0),Xe([t.Property(!1)],a.prototype,"showRecentColors",void 0),Xe([t.Event()],a.prototype,"select",void 0),Xe([t.Event()],a.prototype,"change",void 0),Xe([t.Event()],a.prototype,"beforeTileRender",void 0),Xe([t.Event()],a.prototype,"beforeOpen",void 0),Xe([t.Event()],a.prototype,"open",void 0),Xe([t.Event()],a.prototype,"beforeClose",void 0),Xe([t.Event()],a.prototype,"beforeModeSwitch",void 0),Xe([t.Event()],a.prototype,"onModeSwitch",void 0),Xe([t.Event()],a.prototype,"created",void 0),a=Xe([t.NotifyPropertyChanges],a)}(t.Component),pt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),dt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ut=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.previousValue=null,s.isHiddenInput=!1,s.isForm=!1,s.inputPreviousValue=null,s.textboxOptions=e,s}return pt(s,i),s.prototype.onPropertyChanged=function(i,s){for(var n=0,a=Object.keys(i);n<a.length;n++)switch(a[n]){case"floatLabelType":e.Input.removeFloating(this.textboxWrapper),e.Input.addFloating(this.respectiveElement,this.floatLabelType,this.placeholder);break;case"enabled":e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container),this.bindClearEvent();break;case"width":e.Input.setWidth(i.width,this.textboxWrapper.container);break;case"value":var r=this.isProtectedOnChange;this.isProtectedOnChange=!0,e.Input.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=r,e.Input.setValue(this.value,this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value),this.inputPreviousValue=this.respectiveElement.value,(this.isAngular||this.isVue)&&!0===this.preventChange?(this.previousValue=this.isAngular?this.value:this.previousValue,this.preventChange=!1):(t.isNullOrUndefined(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&t.isNullOrUndefined(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttributesToElement(),this.updateHTMLAttributesToWrapper(),this.checkAttributes(!0),this.multiline&&!t.isNullOrUndefined(this.textarea)?e.Input.validateInputType(this.textboxWrapper.container,this.textarea):e.Input.validateInputType(this.textboxWrapper.container,this.element);break;case"readonly":e.Input.setReadonly(this.readonly,this.respectiveElement);break;case"type":"TEXTAREA"!==this.respectiveElement.tagName&&(this.respectiveElement.setAttribute("type",this.type),e.Input.validateInputType(this.textboxWrapper.container,this.element),this.raiseChangeEvent());break;case"showClearButton":e.Input.setClearButton(this.showClearButton,this.respectiveElement,this.textboxWrapper),this.bindClearEvent();break;case"enableRtl":e.Input.setEnableRtl(this.enableRtl,[this.textboxWrapper.container]),this.handleFloatLabel();break;case"placeholder":e.Input.setPlaceholder(this.placeholder,this.respectiveElement),e.Input.calculateWidth(this.respectiveElement,this.textboxWrapper.container);break;case"autocomplete":"on"!==this.autocomplete&&""!==this.autocomplete?this.respectiveElement.autocomplete=this.autocomplete:this.removeAttributes(["autocomplete"]);break;case"cssClass":e.Input.updateCssClass(i.cssClass,s.cssClass,this.textboxWrapper.container);break;case"locale":this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement);break;case"prependTemplate":this.updatePrependTemplate();break;case"appendTemplate":this.updateAppendTemplate()}},s.prototype.getModuleName=function(){return"textbox"},s.prototype.preRender=function(){if(this.cloneElement=this.element.cloneNode(!0),this.formElement=t.closest(this.element,"form"),t.isNullOrUndefined(this.formElement)||(this.isForm=!0),"EJS-TEXTBOX"===this.element.tagName){var e=t.getValue("ej2_instances",this.element),i=this.multiline?this.createElement("textarea"):this.createElement("input");for(a=0;a<this.element.attributes.length;a++)"id"!==(r=this.element.attributes[a].nodeName)&&"class"!==r?(i.setAttribute(r,this.element.attributes[a].nodeValue),i.innerHTML=this.element.innerHTML,"name"===r&&this.element.removeAttribute("name")):"class"===r&&i.setAttribute(r,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "));this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}this.updateHTMLAttributesToElement(),this.checkAttributes(!1),!t.isNullOrUndefined(this.textboxOptions)&&void 0!==this.textboxOptions.value||""===this.element.value||this.setProperties({value:this.element.value},!0),"TEXTAREA"!==this.element.tagName&&this.element.setAttribute("type",this.type),("text"===this.type||"INPUT"===this.element.tagName&&this.multiline&&this.isReact)&&this.element.setAttribute("role","textbox"),this.globalize=new t.Internationalization(this.locale);var s={placeholder:this.placeholder};if(this.l10n=new t.L10n("textbox",s,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",t.getUniqueID("textbox")),this.element.hasAttribute("name")||this.element.setAttribute("name",this.element.getAttribute("id")),"INPUT"===this.element.tagName&&this.multiline){this.isHiddenInput=!0,this.textarea=this.createElement("textarea"),this.element.parentNode.insertBefore(this.textarea,this.element),this.element.setAttribute("type","hidden"),this.textarea.setAttribute("name",this.element.getAttribute("name")),this.element.removeAttribute("name"),this.textarea.setAttribute("role",this.element.getAttribute("role")),this.element.removeAttribute("role"),this.textarea.setAttribute("id",t.getUniqueID("textarea"));for(var n=["placeholder","disabled","value","readonly","type","autocomplete"],a=0;a<this.element.attributes.length;a++){var r=this.element.attributes[a].nodeName;this.element.hasAttribute(r)&&Z.indexOf(r)<0&&"id"!==r&&"type"!==r&&"e-mappinguid"!==r&&(this.textarea.setAttribute(r,this.element.attributes[a].nodeValue),n.indexOf(r)<0&&(this.element.removeAttribute(r),a--))}}},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly","type","autocomplete"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"autocomplete":if(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.autocomplete||e){var l="off"===this.element.autocomplete?"off":"on";this.setProperties({autocomplete:l},!e)}break;case"value":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.value||e)&&""!==this.element.value&&this.setProperties({value:this.element.value},!e);break;case"type":(t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.type||e)&&this.setProperties({type:this.element.type},!e)}}},s.prototype.render=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=e.Input.getInputValidClassList(this.cssClass)),this.respectiveElement=this.isHiddenInput?this.textarea:this.element,this.textboxWrapper=e.Input.createInput({element:this.respectiveElement,floatLabelType:this.floatLabelType,properties:{enabled:this.enabled,enableRtl:this.enableRtl,cssClass:i,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}}),this.updateHTMLAttributesToWrapper(),this.isHiddenInput&&this.respectiveElement.parentNode.insertBefore(this.element,this.respectiveElement),this.wireEvents(),t.isNullOrUndefined(this.value)||(e.Input.setValue(this.value,this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value)),t.isNullOrUndefined(this.value)||(this.initialValue=this.value,this.setInitialValue()),"on"!==this.autocomplete&&""!==this.autocomplete?this.respectiveElement.autocomplete=this.autocomplete:t.isNullOrUndefined(this.textboxOptions)||void 0===this.textboxOptions.autocomplete||this.removeAttributes(["autocomplete"]),this.previousValue=this.value,this.inputPreviousValue=this.value,this.respectiveElement.defaultValue=this.respectiveElement.value,e.Input.setWidth(this.width,this.textboxWrapper.container),!t.isNullOrUndefined(t.closest(this.element,"fieldset"))&&t.closest(this.element,"fieldset").disabled&&(this.enabled=!1),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.hasAttribute("aria-label")||this.element.setAttribute("aria-label","textbox"),this.createPrependTemplate(),this.createAppendTemplate(),this.multiline&&"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&void 0!==window.ResizeObserver&&new window.ResizeObserver(function(e){for(var t=0,i=e;t<i.length;t++){var s=i[t],n=s.target&&s.target.parentElement?s.target.parentElement.querySelector(".e-float-text.e-label-bottom"):null;n&&n.classList.contains("e-label-bottom")?n.style.width=s.contentRect.width+"px":n&&n.classList.contains("e-label-top")&&(n.style.width="auto")}}).observe(this.textarea),this.renderComplete()},s.prototype.updateHTMLAttributesToWrapper=function(){e.Input.updateHTMLAttributesToWrapper(this.htmlAttributes,this.textboxWrapper.container)},s.prototype.updateHTMLAttributesToElement=function(){e.Input.updateHTMLAttributesToElement(this.htmlAttributes,this.respectiveElement?this.respectiveElement:this.multiline&&!t.isNullOrUndefined(this.textarea)?this.textarea:this.element)},s.prototype.setInitialValue=function(){this.isAngular||this.respectiveElement.setAttribute("value",this.initialValue)},s.prototype.updatePrependTemplate=function(){this.removePrependTemplate(),this.createPrependTemplate()},s.prototype.updateAppendTemplate=function(){this.removeAppendTemplate(),this.createAppendTemplate()},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.createPrependTemplate=function(){if(!t.isNullOrUndefined(this.prependTemplate)){var e=this.textboxWrapper.container;this.prependedElement=this.createElement("div",{className:"e-prepend-template"}),this.iconTemplateFunction=this.templateComplier(this.prependTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.prependedElement);if(i){var s=[].slice.call(i);t.append(s,this.prependedElement)}var n=e.querySelector("input");e.classList.add("e-prepend-wrapper"),n?e.insertBefore(this.prependedElement,n):e.insertBefore(this.prependedElement,e.firstChild),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.createAppendTemplate=function(){if(!t.isNullOrUndefined(this.appendTemplate)){var e=this.textboxWrapper.container;this.appendedElement=this.createElement("div",{className:"e-append-template"}),this.iconTemplateFunction=this.templateComplier(this.appendTemplate);var i=this.iconTemplateFunction(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.appendedElement);if(i){var s=[].slice.call(i);t.append(s,this.appendedElement)}e.classList.add("e-append-wrapper"),e.appendChild(this.appendedElement),this.handleFloatLabel(),this.renderReactTemplates()}},s.prototype.handleFloatLabel=function(){var e=this.textboxWrapper.container.querySelector(".e-float-text");e&&"Auto"===this.floatLabelType&&setTimeout(function(){e&&this.prependedElement&&!this.enableRtl?(e.style.marginLeft=this.prependedElement.offsetWidth+"px",e.style.marginRight="0"):e&&this.prependedElement&&this.enableRtl&&(e.style.marginRight=this.prependedElement.offsetWidth+"px",e.style.marginLeft="0"),e&&e.classList.contains("e-label-bottom")&&(e.style.width=this.element.offsetWidth+"px")}.bind(this),5)},s.prototype.removePrependTemplate=function(){t.isNullOrUndefined(this.prependedElement)||(t.detach(this.prependedElement),this.prependedElement=null)},s.prototype.removeAppendTemplate=function(){t.isNullOrUndefined(this.appendedElement)||(t.detach(this.appendedElement),this.appendedElement=null)},s.prototype.wireEvents=function(){t.EventHandler.add(this.respectiveElement,"focus",this.focusHandler,this),t.EventHandler.add(this.respectiveElement,"blur",this.focusOutHandler,this),t.EventHandler.add(this.respectiveElement,"keydown",this.keydownHandler,this),t.EventHandler.add(this.respectiveElement,"input",this.inputHandler,this),t.EventHandler.add(this.respectiveElement,"change",this.changeHandler,this),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent(),!t.isNullOrUndefined(this.textboxWrapper.container.querySelector(".e-float-text"))&&"Auto"===this.floatLabelType&&this.textboxWrapper.container.classList.contains("e-autofill")&&this.textboxWrapper.container.classList.contains("e-outline")&&t.EventHandler.add(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler,this)},s.prototype.animationHandler=function(){this.textboxWrapper.container.classList.add("e-valid-input");var e=this.textboxWrapper.container.querySelector(".e-float-text");t.isNullOrUndefined(e)||(e.classList.add("e-label-top"),e.classList.contains("e-label-bottom")&&e.classList.remove("e-label-bottom"))},s.prototype.resetValue=function(e){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=e,null!=e||!this.textboxWrapper.container.classList.contains("e-valid-input")||"Always"===this.floatLabelType&&this.textboxWrapper.container.classList.contains("e-outline")||this.textboxWrapper.container.classList.remove("e-valid-input"),this.isProtectedOnChange=t},s.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!t.isNullOrUndefined(this.textboxWrapper)){var e=this.textboxWrapper.container.querySelector(".e-float-text");t.isNullOrUndefined(e)||"Always"===this.floatLabelType||(t.isNullOrUndefined(this.initialValue)||""===this.initialValue?(e.classList.add("e-label-bottom"),e.classList.remove("e-label-top")):""!==this.initialValue&&(e.classList.add("e-label-top"),e.classList.remove("e-label-bottom")))}},s.prototype.focusHandler=function(e){var t={container:this.textboxWrapper.container,event:e,value:this.value};this.trigger("focus",t),"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){var e=this.textboxWrapper?this.textboxWrapper.container.querySelector(".e-float-text"):null;e&&(e.style.width="auto")}.bind(this),5)},s.prototype.focusOutHandler=function(e){null===this.previousValue&&null===this.value&&""===this.respectiveElement.value||this.previousValue===this.value||this.raiseChangeEvent(e,!0);var t={container:this.textboxWrapper.container,event:e,value:this.value};this.trigger("blur",t),"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){var e=this.textboxWrapper?this.textboxWrapper.container.querySelector(".e-float-text.e-label-bottom"):null;e&&(e.style.width=this.multiline?this.textarea.offsetWidth:this.element.offsetWidth+"px")}.bind(this),5)},s.prototype.keydownHandler=function(e){var t=e.ctrlKey&&90===e.keyCode;(13===e.keyCode||9===e.keyCode||t)&&(null!==this.previousValue&&""!==this.previousValue||null!==this.value&&""!==this.value||""!==this.respectiveElement.value)&&this.setProperties({value:this.respectiveElement.value},!0)},s.prototype.inputHandler=function(e){var t=this,i={event:e,value:this.respectiveElement.value,previousValue:this.inputPreviousValue,container:this.textboxWrapper.container};this.inputPreviousValue=this.respectiveElement.value,this.isAngular&&(t.localChange({value:this.respectiveElement.value}),this.preventChange=!0),this.isVue&&(this.preventChange=!0),this.trigger("input",i),e.stopPropagation()},s.prototype.changeHandler=function(e){this.setProperties({value:this.respectiveElement.value},!0),this.previousValue!==this.value&&this.raiseChangeEvent(e,!0),e.stopPropagation()},s.prototype.raiseChangeEvent=function(e,i){var s={event:e,value:this.value,previousValue:this.previousValue,container:this.textboxWrapper.container,isInteraction:i||!1,isInteracted:i||!1};this.preventChange=!1,this.trigger("change",s),this.previousValue=this.value,"INPUT"===this.element.tagName&&this.multiline&&"mozilla"===t.Browser.info.name&&(this.element.value=this.respectiveElement.value)},s.prototype.bindClearEvent=function(){this.showClearButton&&(this.enabled?t.EventHandler.add(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):t.EventHandler.remove(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler))},s.prototype.resetInputHandler=function(i){if(i.preventDefault(),!this.textboxWrapper.clearButton.classList.contains("e-clear-icon-hide")||this.textboxWrapper.container.classList.contains("e-static-clear")){e.Input.setValue("",this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value),this.setProperties({value:this.respectiveElement.value},!0);var s={event:i,value:this.respectiveElement.value,previousValue:this.inputPreviousValue,container:this.textboxWrapper.container};if(this.trigger("input",s),this.inputPreviousValue=this.respectiveElement.value,this.raiseChangeEvent(i,!0),t.closest(this.element,"form")){var n=this.element,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}}},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.respectiveElement,"focus",this.focusHandler),t.EventHandler.remove(this.respectiveElement,"blur",this.focusOutHandler),t.EventHandler.remove(this.respectiveElement,"keydown",this.keydownHandler),t.EventHandler.remove(this.respectiveElement,"input",this.inputHandler),t.EventHandler.remove(this.respectiveElement,"change",this.changeHandler),this.isForm&&t.EventHandler.remove(this.formElement,"reset",this.resetForm),!t.isNullOrUndefined(this.textboxWrapper.container.querySelector(".e-float-text"))&&"Auto"===this.floatLabelType&&this.textboxWrapper.container.classList.contains("e-outline")&&this.textboxWrapper.container.classList.contains("e-autofill")&&t.EventHandler.remove(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler)},s.prototype.destroy=function(){this.unWireEvents(),this.removePrependTemplate(),this.removeAppendTemplate(),this.clearTemplate(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),"INPUT"===this.element.tagName&&this.multiline&&(t.detach(this.textboxWrapper.container.getElementsByTagName("textarea")[0]),this.respectiveElement=this.element,this.element.removeAttribute("type")),this.respectiveElement.value=this.respectiveElement.defaultValue,this.respectiveElement.classList.remove("e-input"),this.removeAttributes(["aria-disabled","aria-readonly","aria-labelledby"]),t.isNullOrUndefined(this.textboxWrapper)||(this.textboxWrapper.container.insertAdjacentElement("afterend",this.respectiveElement),t.detach(this.textboxWrapper.container)),this.textboxWrapper=null,e.Input.destroy({element:this.respectiveElement,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),i.prototype.destroy.call(this)},s.prototype.addIcon=function(t,i){e.Input.addIcon(t,i,this.textboxWrapper.container,this.respectiveElement,this.createElement);var s=this.textboxWrapper.container,n=s.querySelector("span.e-icons"),a=s.querySelector("label");if(n&&a){var r=this.element.parentElement.offsetWidth-n.offsetWidth;a.style.width=r+"px"}},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.addAttributes=function(t){for(var i=0,s=Object.keys(t);i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!1},!0),e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===n?(this.setProperties({readonly:!0},!0),e.Input.setReadonly(this.readonly,this.respectiveElement)):"class"===n?this.respectiveElement.classList.add(t[""+n]):"placeholder"===n?(this.setProperties({placeholder:t[""+n]},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement)):("rows"===n&&this.respectiveElement.tagName,this.respectiveElement.setAttribute(n,t[""+n]))}},s.prototype.removeAttributes=function(t){for(var i=0,s=t;i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!0},!0),e.Input.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===n?(this.setProperties({readonly:!1},!0),e.Input.setReadonly(this.readonly,this.respectiveElement)):"placeholder"===n?(this.setProperties({placeholder:null},!0),e.Input.setPlaceholder(this.placeholder,this.respectiveElement)):this.respectiveElement.removeAttribute(n)}},s.prototype.focusIn=function(){document.activeElement!==this.respectiveElement&&this.enabled&&(this.respectiveElement.focus(),(this.textboxWrapper.container.classList.contains("e-input-group")||this.textboxWrapper.container.classList.contains("e-outline")||this.textboxWrapper.container.classList.contains("e-filled"))&&t.addClass([this.textboxWrapper.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.respectiveElement&&this.enabled&&(this.respectiveElement.blur(),(this.textboxWrapper.container.classList.contains("e-input-group")||this.textboxWrapper.container.classList.contains("e-outline")||this.textboxWrapper.container.classList.contains("e-filled"))&&t.removeClass([this.textboxWrapper.container],["e-input-focus"]))},dt([t.Property("text")],s.prototype,"type",void 0),dt([t.Property(!1)],s.prototype,"readonly",void 0),dt([t.Property(null)],s.prototype,"value",void 0),dt([t.Property("Never")],s.prototype,"floatLabelType",void 0),dt([t.Property("")],s.prototype,"cssClass",void 0),dt([t.Property(null)],s.prototype,"placeholder",void 0),dt([t.Property("on")],s.prototype,"autocomplete",void 0),dt([t.Property({})],s.prototype,"htmlAttributes",void 0),dt([t.Property(!1)],s.prototype,"multiline",void 0),dt([t.Property(!0)],s.prototype,"enabled",void 0),dt([t.Property(!1)],s.prototype,"showClearButton",void 0),dt([t.Property(!1)],s.prototype,"enablePersistence",void 0),dt([t.Property(null)],s.prototype,"width",void 0),dt([t.Property(null)],s.prototype,"prependTemplate",void 0),dt([t.Property(null)],s.prototype,"appendTemplate",void 0),dt([t.Event()],s.prototype,"created",void 0),dt([t.Event()],s.prototype,"destroyed",void 0),dt([t.Event()],s.prototype,"change",void 0),dt([t.Event()],s.prototype,"blur",void 0),dt([t.Event()],s.prototype,"focus",void 0),dt([t.Event()],s.prototype,"input",void 0),s=dt([t.NotifyPropertyChanges],s)}(t.Component),ct=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)}}(),mt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ft="e-auto-width",vt=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.previousValue=null,s.isForm=!1,s.inputPreviousValue=null,s.textareaOptions=e,s}return ct(s,i),s.prototype.onPropertyChanged=function(i,s){for(var n=0,a=Object.keys(i);n<a.length;n++)switch(a[n]){case"floatLabelType":e.Input.removeFloating(this.textareaWrapper),e.Input.addFloating(this.element,this.floatLabelType,this.placeholder),"Never"===this.floatLabelType&&this.element.removeAttribute("aria-labelledby");break;case"enabled":e.Input.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container),this.bindClearEvent(),this.enabled||"None"===this.resizeMode?this.element.classList.add(this.getCurrentResizeClass(this.resizeMode)):(this.element.classList.remove(this.getCurrentResizeClass(this.resizeMode)),this.element.classList.add("e-resize-none"));break;case"width":"None"!==this.resizeMode&&"Vertical"!==this.resizeMode?(this.setElementWidth(i.width),this.textareaWrapper.container.classList.add(ft)):(this.textareaWrapper.container.classList.contains(ft)&&this.textareaWrapper.container.classList.remove(ft),e.Input.setWidth(i.width,this.textareaWrapper.container));break;case"value":var r=this.isProtectedOnChange;this.isProtectedOnChange=!0,e.Input.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=r,e.Input.setValue(this.value,this.element,this.floatLabelType,this.showClearButton),this.inputPreviousValue=this.element.value,(this.isAngular||this.isVue)&&!0===this.preventChange?(this.previousValue=this.isAngular?this.value:this.previousValue,this.preventChange=!1):(t.isNullOrUndefined(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&t.isNullOrUndefined(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttributesToElement(),this.updateHTMLAttributesToWrapper(),this.checkAttributes(!0),e.Input.validateInputType(this.textareaWrapper.container,this.element);break;case"readonly":e.Input.setReadonly(this.readonly,this.element),this.readonly?this.element.setAttribute("aria-readonly","true"):this.element.removeAttribute("aria-readonly");break;case"showClearButton":e.Input.setClearButton(this.showClearButton,this.element,this.textareaWrapper),this.bindClearEvent();break;case"enableRtl":e.Input.setEnableRtl(this.enableRtl,[this.textareaWrapper.container]),this.handleAdornmentFloatLabel();break;case"placeholder":e.Input.setPlaceholder(this.placeholder,this.element),e.Input.calculateWidth(this.element,this.textareaWrapper.container);break;case"cssClass":e.Input.updateCssClass(i.cssClass,s.cssClass,this.textareaWrapper.container);break;case"locale":this.globalize=new t.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),e.Input.setPlaceholder(this.placeholder,this.element);break;case"rows":this.rows&&this.element.setAttribute("rows",this.rows.toString());break;case"cols":this.cols&&(this.element.setAttribute("cols",this.cols.toString()),null==this.width&&this.textareaWrapper.container.classList.add(ft));break;case"maxLength":this.maxLength&&this.element.setAttribute("maxlength",this.maxLength.toString());break;case"resizeMode":if(this.enabled){if(this.element.classList.contains(this.getCurrentResizeClass(s.resizeMode))&&this.element.classList.remove(this.getCurrentResizeClass(s.resizeMode)),this.element.classList.add(this.getCurrentResizeClass(this.resizeMode)),!this.element.style.width||"None"!==this.resizeMode&&"Vertical"!==this.resizeMode){var l=this.element.offsetWidth;this.element.style.width=l+"px",this.textareaWrapper.container.style.width&&(this.textareaWrapper.container.style.width="")}else e.Input.setWidth(this.element.style.width,this.textareaWrapper.container);this.setWrapperWidth()}break;case"prependTemplate":this.handleAdornmentDirection(),this.updatePrependTemplate();break;case"appendTemplate":this.handleAdornmentDirection(!0),this.updateAppendTemplate();break;case"adornmentFlow":case"adornmentOrientation":this.handleAdornmentDirection(),this.updatePrependTemplate(),this.updateAppendTemplate()}},s.prototype.preRender=function(){if(this.formElement=t.closest(this.element,"form"),t.isNullOrUndefined(this.formElement)||(this.isForm=!0),"EJS-TEXTAREA"===this.element.tagName||"EJS-SMARTTEXTAREA"===this.element.tagName){var e=t.getValue("ej2_instances",this.element),i=this.createElement("textarea"),s=0;for(s;s<this.element.attributes.length;s++){var n=this.element.attributes[s].nodeName;"id"!==n&&"class"!==n?(i.setAttribute(n,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML,"name"===n&&this.element.removeAttribute("name")):"class"===n&&i.setAttribute(n,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "))}this.element.appendChild(i),this.element=i,t.setValue("ej2_instances",e,this.element)}this.updateHTMLAttributesToElement(),this.checkAttributes(!1),!t.isNullOrUndefined(this.textareaOptions)&&void 0!==this.textareaOptions.value||""===this.element.value||this.setProperties({value:this.element.value},!0),this.globalize=new t.Internationalization(this.locale);var a={placeholder:this.placeholder};this.l10n=new t.L10n("textarea",a,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",t.getUniqueID("textbox")),this.element.hasAttribute("name")||this.element.setAttribute("name",this.element.getAttribute("id")),this.rows&&this.element.setAttribute("rows",this.rows.toString()),this.cols&&this.element.setAttribute("cols",this.cols.toString()),this.maxLength&&this.element.setAttribute("maxlength",this.maxLength.toString()),!this.element.style.resize&&this.enabled&&this.element.classList.add(this.getCurrentResizeClass(this.resizeMode)),this.enabled&&this.element.setAttribute("aria-multiline","true")},s.prototype.render=function(){var i=this.cssClass;t.isNullOrUndefined(this.cssClass)||""===this.cssClass||(i=e.Input.getInputValidClassList(this.cssClass)),this.textareaWrapper=e.Input.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{enabled:this.enabled,enableRtl:this.enableRtl,cssClass:i,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}}),this.updateHTMLAttributesToWrapper(),this.wireEvents(),t.isNullOrUndefined(this.value)||e.Input.setValue(this.value,this.element,this.floatLabelType,this.showClearButton),t.isNullOrUndefined(this.value)||(this.initialValue=this.value,this.isAngular||this.element.setAttribute("value",this.initialValue)),this.previousValue=this.value,this.inputPreviousValue=this.value,this.element.defaultValue=this.element.value,e.Input.setWidth(this.width,this.textareaWrapper.container),this.setWrapperWidth(),this.updateFloatLabelOverflowWidth(),this.handleAdornmentDirection(),this.createPrependTemplate(),this.createAppendTemplate(),this.renderComplete(),"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&void 0!==window.ResizeObserver&&new window.ResizeObserver(function(e){for(var t=0,i=e;t<i.length;t++){var s=i[t],n=s.target&&s.target.parentElement?s.target.parentElement.querySelector(".e-float-text"):null;n&&n.classList.contains("e-label-bottom")?n.style.width=s.contentRect.width+"px":n&&n.classList.contains("e-label-top")&&(n.style.width="auto")}}).observe(this.element)},s.prototype.updatePrependTemplate=function(){this.removePrependTemplate(),this.createPrependTemplate()},s.prototype.updateAppendTemplate=function(){this.removeAppendTemplate(),this.createAppendTemplate()},s.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&t.selectAll(e,document).length?t.compile(t.select(e,document).innerHTML.trim()):t.compile(e)}catch(i){return t.compile(e)}},s.prototype.createPrependTemplate=function(){if(!t.isNullOrUndefined(this.prependTemplate)){var e=this.textareaWrapper.container;this.prependedElement=this.createElement("div",{className:"e-prepend-template"}),this.iconTemplateFn=this.templateComplier(this.prependTemplate);var i=this.iconTemplateFn(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.prependedElement);if(i){var s=[].slice.call(i);t.append(s,this.prependedElement)}var n=e.querySelector("textarea");e.classList.add("e-prepend-wrapper"),n?e.insertBefore(this.prependedElement,n):e.insertBefore(this.prependedElement,e.firstChild),this.handleAdornmentFloatLabel(),this.renderReactTemplates()}},s.prototype.createAppendTemplate=function(){if(!t.isNullOrUndefined(this.appendTemplate)){var e=this.textareaWrapper.container;this.appendedElement=this.createElement("div",{className:"e-append-template"}),this.iconTemplateFn=this.templateComplier(this.appendTemplate);var i=this.iconTemplateFn(null,this,"template",this.element.id+"Template",this.isStringTemplate,null,this.appendedElement);if(i){var s=[].slice.call(i);t.append(s,this.appendedElement)}e.classList.add("e-append-wrapper"),e.appendChild(this.appendedElement),this.renderReactTemplates()}},s.prototype.handleAdornmentDirection=function(e){var t=this.textareaWrapper.container.querySelector(".e-float-text");t&&"Auto"===this.floatLabelType&&!e&&(t.style.marginLeft="0",t.style.marginRight="0",t.style.marginTop="0"),"Vertical"===this.adornmentFlow&&(this.appendTemplate||this.prependTemplate)?(this.textareaWrapper.container.classList.add("e-adornment-flow-vertical"),this.textareaWrapper.container.classList.remove("e-adornment-flow-horizontal")):(this.appendTemplate||this.prependTemplate)&&(this.textareaWrapper.container.classList.add("e-adornment-flow-horizontal"),this.textareaWrapper.container.classList.remove("e-adornment-flow-vertical")),"Vertical"===this.adornmentOrientation&&(this.appendTemplate||this.prependTemplate)?(this.textareaWrapper.container.classList.add("e-adornment-orientation-vertical"),this.textareaWrapper.container.classList.remove("e-adornment-orientation-horizontal")):(this.appendTemplate||this.prependTemplate)&&(this.textareaWrapper.container.classList.add("e-adornment-orientation-horizontal"),this.textareaWrapper.container.classList.remove("e-adornment-orientation-vertical"))},s.prototype.handleAdornmentFloatLabel=function(){var e=this.textareaWrapper.container.querySelector(".e-float-text");e&&"Auto"===this.floatLabelType&&setTimeout(function(){e&&this.prependedElement&&"Vertical"!==this.adornmentFlow&&!this.enableRtl?(e.style.marginLeft=this.prependedElement.offsetWidth+"px",e.style.marginRight="0"):e&&this.prependedElement&&"Vertical"!==this.adornmentFlow&&this.enableRtl&&(e.style.marginRight=this.prependedElement.offsetWidth+"px",e.style.marginLeft="0"),"Vertical"===this.adornmentFlow&&"Vertical"===this.adornmentOrientation&&e&&this.prependedElement&&(e.style.marginTop=this.prependedElement.offsetHeight+"px"),"Vertical"===this.adornmentFlow&&"Horizontal"===this.adornmentOrientation&&e&&this.prependedElement&&(e.style.marginTop=this.prependedElement.offsetHeight+"px")}.bind(this),10)},s.prototype.removePrependTemplate=function(){t.isNullOrUndefined(this.prependedElement)||(t.detach(this.prependedElement),this.prependedElement=null)},s.prototype.removeAppendTemplate=function(){t.isNullOrUndefined(this.appendedElement)||(t.detach(this.appendedElement),this.appendedElement=null)},s.prototype.getModuleName=function(){return"textarea"},s.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},s.prototype.checkAttributes=function(e){for(var i=0,s=e?t.isNullOrUndefined(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"];i<s.length;i++){var n=s[i];if(!t.isNullOrUndefined(this.element.getAttribute(n)))switch(n){case"disabled":if(t.isNullOrUndefined(this.textareaOptions)||void 0===this.textareaOptions.enabled||e){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!e)}break;case"readonly":if(t.isNullOrUndefined(this.textareaOptions)||void 0===this.textareaOptions.readonly||e){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!e)}break;case"placeholder":(t.isNullOrUndefined(this.textareaOptions)||void 0===this.textareaOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":(t.isNullOrUndefined(this.textareaOptions)||void 0===this.textareaOptions.value||e)&&""!==this.element.value&&this.setProperties({value:this.element.value},!e)}}},s.prototype.wireEvents=function(){t.EventHandler.add(this.element,"focus",this.focusHandler,this),t.EventHandler.add(this.element,"blur",this.focusOutHandler,this),t.EventHandler.add(this.element,"keydown",this.keydownHandler,this),t.EventHandler.add(this.element,"input",this.inputHandler,this),t.EventHandler.add(this.element,"change",this.changeHandler,this),this.isForm&&t.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent()},s.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"focus",this.focusHandler),t.EventHandler.remove(this.element,"blur",this.focusOutHandler),t.EventHandler.remove(this.element,"keydown",this.keydownHandler),t.EventHandler.remove(this.element,"input",this.inputHandler),t.EventHandler.remove(this.element,"change",this.changeHandler),this.isForm&&t.EventHandler.remove(this.formElement,"reset",this.resetForm)},s.prototype.destroy=function(){this.unWireEvents(),this.removePrependTemplate(),this.removeAppendTemplate(),this.clearTemplate(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),this.element.value=this.element.defaultValue,this.element.classList.remove("e-input","e-resize-x","e-resize-y","e-resize-xy","e-resize-none"),this.textareaWrapper.container.style.width.includes("%")&&t.EventHandler.remove(this.element,"mousemove",this.onMouseMove),this.removeAttributes(["aria-disabled","aria-readonly","aria-labelledby","aria-multiline"]),t.isNullOrUndefined(this.textareaWrapper)||(this.textareaWrapper.container.insertAdjacentElement("afterend",this.element),t.detach(this.textareaWrapper.container)),this.textareaWrapper=null,e.Input.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),this.formElement=null,i.prototype.destroy.call(this)},s.prototype.focusHandler=function(e){var t={container:this.textareaWrapper.container,event:e,value:this.value};if("Never"!==this.floatLabelType&&this.textareaWrapper&&this.textareaWrapper.container){var i=this.textareaWrapper.container.querySelector(".e-float-text");i&&i.removeAttribute("style")}this.trigger("focus",t),"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){var e=this.textareaWrapper?this.textareaWrapper.container.querySelector(".e-float-text"):null;e&&(e.style.width="auto")}.bind(this),5)},s.prototype.focusOutHandler=function(e){null===this.previousValue&&null===this.value||this.previousValue===this.value||this.raiseChangeEvent(e,!0);var t={container:this.textareaWrapper.container,event:e,value:this.value};this.updateFloatLabelOverflowWidth(),this.handleAdornmentFloatLabel(),this.trigger("blur",t)},s.prototype.keydownHandler=function(e){13!==e.keyCode&&9!==e.keyCode||!(null!==this.previousValue&&""!==this.previousValue||null!==this.value&&""!==this.value||""!==this.element.value)||this.setProperties({value:this.element.value},!0)},s.prototype.inputHandler=function(e){var t=this,i={event:e,value:this.element.value,previousValue:this.inputPreviousValue,container:this.textareaWrapper.container};this.inputPreviousValue=this.element.value,this.isAngular&&(t.localChange({value:this.element.value}),this.preventChange=!0),this.isVue&&(this.preventChange=!0),this.trigger("input",i),e.stopPropagation()},s.prototype.changeHandler=function(e){this.setProperties({value:this.element.value},!0),this.previousValue!==this.value&&this.raiseChangeEvent(e,!0),e.stopPropagation()},s.prototype.raiseChangeEvent=function(e,t){var i={event:e,value:this.value,previousValue:this.previousValue,container:this.textareaWrapper.container,isInteraction:t||!1,isInteracted:t||!1};this.preventChange=!1,this.trigger("change",i),this.previousValue=this.value},s.prototype.updateHTMLAttributesToWrapper=function(){e.Input.updateHTMLAttributesToWrapper(this.htmlAttributes,this.textareaWrapper.container)},s.prototype.updateHTMLAttributesToElement=function(){e.Input.updateHTMLAttributesToElement(this.htmlAttributes,this.element)},s.prototype.bindClearEvent=function(){this.showClearButton&&(this.enabled?t.EventHandler.add(this.textareaWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):t.EventHandler.remove(this.textareaWrapper.clearButton,"mousedown touchstart",this.resetInputHandler))},s.prototype.resetInputHandler=function(i){i.preventDefault(),this.textareaWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.textareaWrapper.container.classList.contains("e-static-clear")||(e.Input.setValue("",this.element,this.floatLabelType,this.showClearButton),this.setProperties({value:this.element.value},!0));var s={event:i,value:this.element.value,previousValue:this.inputPreviousValue,container:this.textareaWrapper.container};if(this.trigger("input",s),this.inputPreviousValue=this.element.value,this.raiseChangeEvent(i,!0),t.closest(this.element,"form")){var n=this.element,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}},s.prototype.addAttributes=function(t){for(var i=0,s=Object.keys(t);i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!1},!0),e.Input.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container)):"readonly"===n?(this.setProperties({readonly:!0},!0),e.Input.setReadonly(this.readonly,this.element)):"class"===n?this.element.classList.add(t[""+n]):"placeholder"===n?(this.setProperties({placeholder:t[""+n]},!0),e.Input.setPlaceholder(this.placeholder,this.element)):this.element.setAttribute(n,t[""+n])}},s.prototype.removeAttributes=function(t){for(var i=0,s=t;i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!0},!0),e.Input.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container)):"readonly"===n?(this.setProperties({readonly:!1},!0),e.Input.setReadonly(this.readonly,this.element)):"placeholder"===n?(this.setProperties({placeholder:null},!0),e.Input.setPlaceholder(this.placeholder,this.element)):this.element.removeAttribute(n)}},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),(this.textareaWrapper.container.classList.contains("e-input-group")||this.textareaWrapper.container.classList.contains("e-outline")||this.textareaWrapper.container.classList.contains("e-filled"))&&t.addClass([this.textareaWrapper.container],["e-input-focus"]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),(this.textareaWrapper.container.classList.contains("e-input-group")||this.textareaWrapper.container.classList.contains("e-outline")||this.textareaWrapper.container.classList.contains("e-filled"))&&t.removeClass([this.textareaWrapper.container],["e-input-focus"]))},s.prototype.setWrapperWidth=function(){this.enabled&&("None"!==this.resizeMode&&"Vertical"!==this.resizeMode||this.cols||this.element.getAttribute("cols"))?("None"===this.resizeMode||"Vertical"===this.resizeMode||this.textareaWrapper.container.style.width.includes("%")||this.setElementWidth(this.textareaWrapper.container.style.width),this.textareaWrapper.container.style.width.includes("%")||(this.textareaWrapper.container.classList.add(ft),this.textareaWrapper.container.style.width=""),this.textareaWrapper.container.style.width.includes("%")&&t.EventHandler.add(this.element,"mousemove",this.onMouseMove,this)):this.textareaWrapper.container.classList.contains(ft)&&this.textareaWrapper.container.classList.remove(ft)},s.prototype.onMouseMove=function(){var e=this;if("auto"!==this.textareaWrapper.container.style.width){var t=this.element.style.width;setTimeout(function(){var i=e.element.style.width;t!==i&&(e.textareaWrapper.container.style.width="auto")},5)}},s.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!t.isNullOrUndefined(this.textareaWrapper)){var e=this.textareaWrapper.container.querySelector(".e-float-text");t.isNullOrUndefined(e)||"Always"===this.floatLabelType||(t.isNullOrUndefined(this.initialValue)||""===this.initialValue?(e.classList.add("e-label-bottom"),e.classList.remove("e-label-top")):""!==this.initialValue&&(e.classList.add("e-label-top"),e.classList.remove("e-label-bottom")))}},s.prototype.resetValue=function(e){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=e,null!=e||!this.textareaWrapper.container.classList.contains("e-valid-input")||"Always"===this.floatLabelType&&this.textareaWrapper.container.classList.contains("e-outline")||this.textareaWrapper.container.classList.remove("e-valid-input"),this.isProtectedOnChange=t},s.prototype.setElementWidth=function(e){"number"==typeof e?this.element.style.width=t.formatUnit(e):"string"==typeof e&&(this.element.style.width=e.match(/px|%|em/)?e:t.formatUnit(e))},s.prototype.getCurrentResizeClass=function(e){return"None"===e?"e-resize-none":"Both"===e?"e-resize-xy":"Horizontal"===e?"e-resize-x":"e-resize-y"},s.prototype.getRightIconsWidth=function(){for(var e=0,t=this.textareaWrapper.container.querySelectorAll(".e-input-group-icon, .e-clear-icon"),i=0;i<t.length;i++)e+=t[i].offsetWidth;return e},s.prototype.updateFloatLabelOverflowWidth=function(){var e=this.textareaWrapper.container,t=e.querySelector(".e-float-text-overflow")||e.querySelector(".e-float-text"),i=e.clientWidth-this.getRightIconsWidth();!t||!i||this.cssClass&&-1!==this.cssClass.split(" ").indexOf("e-outline")||this.prependTemplate&&this.appendTemplate?"Auto"===this.floatLabelType&&(this.prependTemplate||this.appendTemplate)&&setTimeout(function(){var t=e?e.querySelector(".e-float-text.e-label-bottom"):null;t&&(t.style.width=this.element.offsetWidth+"px")}.bind(this),10):t.style.width=i+"px"},mt([t.Property(!1)],s.prototype,"readonly",void 0),mt([t.Property(null)],s.prototype,"value",void 0),mt([t.Property("Never")],s.prototype,"floatLabelType",void 0),mt([t.Property("")],s.prototype,"cssClass",void 0),mt([t.Property(null)],s.prototype,"placeholder",void 0),mt([t.Property({})],s.prototype,"htmlAttributes",void 0),mt([t.Property(!0)],s.prototype,"enabled",void 0),mt([t.Property(!1)],s.prototype,"showClearButton",void 0),mt([t.Property(!1)],s.prototype,"enablePersistence",void 0),mt([t.Property(null)],s.prototype,"width",void 0),mt([t.Property("Both")],s.prototype,"resizeMode",void 0),mt([t.Property(null)],s.prototype,"maxLength",void 0),mt([t.Property(null)],s.prototype,"cols",void 0),mt([t.Property(null)],s.prototype,"rows",void 0),mt([t.Property(null)],s.prototype,"prependTemplate",void 0),mt([t.Property(null)],s.prototype,"appendTemplate",void 0),mt([t.Property("Horizontal")],s.prototype,"adornmentFlow",void 0),mt([t.Property("Horizontal")],s.prototype,"adornmentOrientation",void 0),mt([t.Event()],s.prototype,"created",void 0),mt([t.Event()],s.prototype,"destroyed",void 0),mt([t.Event()],s.prototype,"change",void 0),mt([t.Event()],s.prototype,"blur",void 0),mt([t.Event()],s.prototype,"focus",void 0),mt([t.Event()],s.prototype,"input",void 0),s=mt([t.NotifyPropertyChanges],s)}(t.Component),gt=function(){function e(){}return e.createStyledDiv=function(e,t){var i=document.createElement("div"),s={position:"absolute",left:-9999,top:0,zIndex:-2e3};this.properties.forEach(function(t){s[""+t]=getComputedStyle(e)[t]}),Object.keys(s).forEach(function(e){i.style[""+e]=s[""+e]});var n=e.offsetWidth-e.clientWidth;return i.style.width=e.clientWidth+n+"px",i.innerHTML=t,e&&e.parentNode&&e.parentNode.insertBefore(i,e.nextSibling),i},e.createCaretMarker=function(e,t){var i=this.createStyledDiv(e,t),s=i.ownerDocument.getElementById("caret-position-marker"),n={left:s.offsetLeft,top:s.offsetTop,height:s.offsetHeight};return i&&i.parentNode&&i.parentNode.removeChild(i),n},e.escapeHtml=function(e){return e.replace(/<|>|`|"|&/g,"?").replace(/\r\n|\r|\n/g,"<br/>")},e.getCaretPosition=function(e){var t=e.selectionStart||0,i=e.value.slice(0,t),s=e.value.slice(t),n='<span style="position: relative; display: inline;">'+this.escapeHtml(i)+"</span>";n+='<span id="caret-position-marker" style="position: relative; display: inline;">|</span>',n+='<span style="position: relative; display: inline;">'+this.escapeHtml(s)+"</span>";var a=this.createCaretMarker(e,n);return a.pos=t,a},e.adjustScrollToCaretPosition=function(e){var t=this.getCaretPosition(e),i=parseFloat(window.getComputedStyle(e).lineHeight);t.top>e.clientHeight+e.scrollTop-i&&(e.scrollTop=t.top-e.clientHeight+i)},e.getTextAreaPosition=function(e){var t=window.getComputedStyle(e),i=this.getCaretPosition(e);return{top:i.top+parseFloat(t.borderTopWidth)+e.offsetTop-e.scrollTop,left:i.left+parseFloat(t.borderLeftWidth)+e.offsetLeft-e.scrollLeft-.25,height:i.height,elemStyle:t}},e.insertCharacter=function(e,t){var i=e.selectionStart,s=e.selectionEnd;e.value=e.value.substring(0,i)+t+e.value.substring(s),i+=t.length,e.setSelectionRange(i,i)},e.properties=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopWidth","boxSizing","fontFamily","fontSize","fontWeight","height","letterSpacing","lineHeight","marginBottom","marginLeft","marginRight","marginTop","outlineWidth","overflow","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","textAlign","textOverflow","textTransform","whiteSpace","wordBreak","wordWrap","width"],e}(),yt=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)}}(),bt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ct=function(e,t,i,s){return new(i||(i=Promise))(function(n,a){function r(e){try{o(s.next(e))}catch(e){a(e)}}function l(e){try{o(s.throw(e))}catch(e){a(e)}}function o(e){e.done?n(e.value):new i(function(t){t(e.value)}).then(r,l)}o((s=s.apply(e,t||[])).next())})},Et=function(e,t){function i(e){return function(t){return s([e,t])}}function s(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(r=2&i[0]?a.return:i[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,i[1])).done)return r;switch(a=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,a=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(r=o.trys,!(r=r.length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){o.label=i[1];break}if(6===i[0]&&o.label<r[1]){o.label=r[1],r=i;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(i);break}r[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],a=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var n,a,r,l,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return l={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l};!function(e){e.System="system",e.User="user",e.Assistant="assistant"}(e.ChatMessageRole||(e.ChatMessageRole={}));var xt=function(i){function s(e,t){return i.call(this,e,t)||this}return yt(s,i),s.prototype.render=function(){if(i.prototype.render.call(this),this.element instanceof HTMLTextAreaElement){this.textArea=this.element;var e=t.createElement("smart-textarea");if(e.classList.add("e-smart-textarea"),this.textArea.after(e),"None"!==this.showSuggestionOnPopup){var s="Enable"===this.showSuggestionOnPopup?"false":"true";this.textArea.setAttribute("data-inline-suggestions",s)}this.suggestionDisplay=this.shouldShowInlineSuggestions(this.textArea)?new Tt(this,e,this.textArea):new St(this,e,this.textArea)}},s.prototype.wireEvents=function(){var e=this;i.prototype.wireEvents.call(this),t.EventHandler.add(this.element,"keyup",this.handleKeyUp,this),t.EventHandler.add(this.element,"keydown",this.handleKeyDown,this),t.EventHandler.add(this.element,"mousedown",this.removeExistingOrPendingSuggestion,this),t.EventHandler.add(this.element,"focusout",this.removeExistingOrPendingSuggestion,this),this.element.addEventListener("scroll",function(){return e.suggestionDisplay.reject()},{passive:!0})},s.prototype.unWireEvents=function(){var e=this;i.prototype.unWireEvents.call(this),t.EventHandler.remove(this.element,"keyup",this.handleKeyUp),t.EventHandler.remove(this.element,"keydown",this.handleKeyDown),t.EventHandler.remove(this.element,"mousedown",this.removeExistingOrPendingSuggestion),t.EventHandler.remove(this.element,"focusout",this.removeExistingOrPendingSuggestion),this.element.removeEventListener("scroll",function(){return e.suggestionDisplay.reject()})},s.prototype.keydownHandler=function(){},s.prototype.shouldShowInlineSuggestions=function(e){var t=e.getAttribute("data-inline-suggestions");return t?"true"===t.toLowerCase():!("ontouchstart"in window)},s.prototype.handleKeyDown=function(e){switch(e.key){case"Tab":this.suggestionDisplay.isShowing()&&(this.suggestionDisplay.accept(),e.preventDefault());break;case"Alt":case"Control":case"Shift":case"Command":break;default:this.suggestionDisplay.isShowing()&&this.suggestionDisplay.currentSuggestion.startsWith(e.key)?(gt.insertCharacter(this.textArea,e.key),e.preventDefault(),this.suggestionDisplay.show(this.suggestionDisplay.currentSuggestion.substring(e.key.length)),gt.adjustScrollToCaretPosition(this.textArea)):this.removeExistingOrPendingSuggestion()}},s.prototype.handleKeyUp=function(){var e=this;this.suggestionDisplay.isShowing()||(clearTimeout(this.typingDebounceTimeout),this.typingDebounceTimeout=setTimeout(function(){return e.handleTypingPaused()},350))},s.prototype.handleTypingPaused=function(){return Ct(this,void 0,void 0,function(){return Et(this,function(e){switch(e.label){case 0:return document.activeElement!==this.textArea?[2]:this.textArea.selectionStart!==this.textArea.selectionEnd||this.textArea.selectionStart!==this.textArea.value.length&&"\n"!==this.textArea.value[this.textArea.selectionStart]?[3,2]:[4,this.requestSuggestionAsync()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},s.prototype.removeExistingOrPendingSuggestion=function(){clearTimeout(this.typingDebounceTimeout),this.pendingSuggestionAbort&&(this.pendingSuggestionAbort.abort(),this.pendingSuggestionAbort=null),this.suggestionDisplay.reject()},s.prototype.createSuggestionPrompt=function(t,i){var s="Predict what text the user in the given ROLE would insert at the cursor position indicated by ^^^.\nOnly give predictions for which you have an EXTREMELY high confidence that the user would insert that EXACT text.\nDo not make up new information. If you are not sure, just reply with NO_PREDICTION.\n\nRULES:\n1. Reply with OK:, then in square brackets the predicted text, then END_INSERTION, and no other output.\n2. When a specific value or quantity cannot be inferred and would need to be provided, use the word NEED_INFO.\n3. If there is not enough information to predict any words that the user would type next, just reply with the word NO_PREDICTION.\n4. NEVER invent new information. If you can not be sure what the user is about to type, ALWAYS stop the prediction with END_INSERTION.",n=this.UserPhrases;if(n&&n.length>0){s+="\nAlways try to use variations on the following phrases as part of the predictions:\n";for(var a=0,r=n;a<r.length;a++)s+="- "+r[a]+"\n"}return{messages:[{role:e.ChatMessageRole.System,content:s},{role:e.ChatMessageRole.User,content:"ROLE: Family member sending a text\nUSER_TEXT: Hey, it is a nice day - the weather is ^^^"},{role:e.ChatMessageRole.Assistant,content:"OK:[great!]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Customer service assistant\nUSER_TEXT: You can find more information on^^^\n\nAlternatively, phone us."},{role:e.ChatMessageRole.Assistant,content:"OK:[ our website at NEED_INFO]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Casual\nUSER_TEXT: Oh I see!\n\nWell sure thing, we can"},{role:e.ChatMessageRole.Assistant,content:"OK:[ help you out with that!]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Storyteller\nUSER_TEXT: Sir Digby Chicken Caesar, also know^^^"},{role:e.ChatMessageRole.Assistant,content:"OK:[n as NEED_INFO]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Customer support agent\nUSER_TEXT: Goodbye for now.^^^"},{role:e.ChatMessageRole.Assistant,content:"NO_PREDICTION END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: Pirate\nUSER_TEXT: Have you found^^^"},{role:e.ChatMessageRole.Assistant,content:"OK:[ the treasure, me hearties?]END_INSERTION"},{role:e.ChatMessageRole.User,content:"ROLE: "+this.userRole+"\nUSER_TEXT: "+t+"^^^"+i}],temperature:0,maxTokens:400,stopSequences:["END_INSERTION","NEED_INFO"],frequencyPenalty:0,presencePenalty:0}},s.prototype.requestSuggestionAsync=function(){return Ct(this,void 0,void 0,function(){var e,t,i,s,n,a;return Et(this,function(r){switch(r.label){case 0:return this.pendingSuggestionAbort?(this.pendingSuggestionAbort.abort(),[2]):(this.pendingSuggestionAbort=new AbortController,e={textAreaValue:this.textArea.value,cursorPosition:this.textArea.selectionStart},t={textBefore:e.textAreaValue.substring(0,e.cursorPosition),textAfter:e.textAreaValue.substring(e.cursorPosition)},i=this.createSuggestionPrompt(t.textBefore,t.textAfter),"function"!=typeof this.aiSuggestionHandler?[3,2]:[4,this.aiSuggestionHandler(i)]);case 1:n=r.sent(),s=this.validateSuggestion(n,t.textBefore),r.label=2;case 2:if(s&&e.textAreaValue===this.textArea.value&&e.cursorPosition===this.textArea.selectionStart){if(s.endsWith(" ")||(s+=" "),a={text:s,cancel:!1},this.trigger("beforeSuggestionInsert",a),a.cancel)return[2];this.suggestionDisplay.show(a.text)}return[2]}})})},s.prototype.validateSuggestion=function(e,t){var i;if("string"!=typeof e||e.length<=5||0!==e.indexOf("OK:["))return"";var s=this.indexOfAny(e,[".","?","!"]);return s>0&&e.length>s+1&&" "===e[s+1]&&(e=e.substring(0,s+1)),i=e.substring(4).replace(/[\]\s]+$/,""),t.length>0&&" "===t[t.length-1]&&(i=i.replace(/^\s+/,"")),i},s.prototype.indexOfAny=function(e,t){for(var i=0;i<e.length;i++)if(-1!==t.indexOf(e[""+i]))return i;return-1},s.prototype.getModuleName=function(){return"smarttextarea"},s.prototype.destroy=function(){i.prototype.destroy.call(this),this.textArea=null,this.suggestionDisplay=null,this.typingDebounceTimeout=null},bt([t.Event()],s.prototype,"beforeSuggestionInsert",void 0),bt([t.Event()],s.prototype,"afterSuggestionInsert",void 0),bt([t.Property("")],s.prototype,"userRole",void 0),bt([t.Property([])],s.prototype,"UserPhrases",void 0),bt([t.Property()],s.prototype,"aiSuggestionHandler",void 0),bt([t.Property("None")],s.prototype,"showSuggestionOnPopup",void 0),s}(vt),Tt=function(){function e(e,t,i){this.smartTextArea=e,this.owner=t,this.textArea=i,this.latestSuggestionText="",this.suggestionStartPos=null,this.suggestionEndPos=null,this.virtualCaret=null,this.originalValueProperty=this.getOriginalValueProperty(i,"value")}return Object.defineProperty(e.prototype,"value",{get:function(){var e=this.originalValueProperty.get.call(this.textArea);return this.isShowing()?e.substring(0,this.suggestionStartPos)+e.substring(this.suggestionEndPos):e},set:function(e){this.originalValueProperty.set.call(this.textArea,e)},enumerable:!0,configurable:!0}),e.prototype.getOriginalValueProperty=function(e,t){for(;e;){var i=Object.getOwnPropertyDescriptor(e,t);if(i)return i;e=Object.getPrototypeOf(e)}throw new Error("Property "+t+" not found on object or its prototype chain")},Object.defineProperty(e.prototype,"valueIncludingSuggestion",{get:function(){return this.originalValueProperty.get.call(this.textArea)},set:function(e){this.originalValueProperty.set.call(this.textArea,e)},enumerable:!0,configurable:!0}),e.prototype.isShowing=function(){return null!==this.suggestionStartPos},e.prototype.show=function(e){this.latestSuggestionText=e,this.suggestionStartPos=this.textArea.selectionStart,this.suggestionEndPos=this.suggestionStartPos+e.length,this.textArea.setAttribute("data-suggestion-visible",""),this.valueIncludingSuggestion=this.valueIncludingSuggestion.substring(0,this.suggestionStartPos)+e+this.valueIncludingSuggestion.substring(this.suggestionStartPos),this.textArea.setSelectionRange(this.suggestionStartPos,this.suggestionEndPos),this.virtualCaret||(this.virtualCaret=new Pt(this.owner,this.textArea)),this.virtualCaret.show()},Object.defineProperty(e.prototype,"currentSuggestion",{get:function(){return this.latestSuggestionText},enumerable:!0,configurable:!0}),e.prototype.accept=function(){var e=this.currentSuggestion;this.textArea.setSelectionRange(this.suggestionEndPos,this.suggestionEndPos),this.suggestionStartPos=null,this.suggestionEndPos=null,this.virtualCaret&&this.virtualCaret.hide(),this.textArea.removeAttribute("data-suggestion-visible"),gt.adjustScrollToCaretPosition(this.textArea),this.smartTextArea.trigger("afterSuggestionInsert",{insertedText:e})},e.prototype.reject=function(){if(this.isShowing()){var e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.valueIncludingSuggestion=this.valueIncludingSuggestion.substring(0,this.suggestionStartPos)+this.valueIncludingSuggestion.substring(this.suggestionEndPos),this.suggestionStartPos===e&&this.suggestionEndPos===t&&this.textArea.setSelectionRange(e,e),this.suggestionStartPos=null,this.suggestionEndPos=null,this.textArea.removeAttribute("data-suggestion-visible"),this.virtualCaret&&this.virtualCaret.hide()}},e}(),St=function(){function e(e,t,i){var s=this;this.latestSuggestionText="",this.showing=!1,this.smartTextArea=e,this.textArea=i,this.suggestionElement=document.createElement("div"),this.suggestionElement.classList.add("smart-textarea-suggestion-overlay"),this.suggestionElement.addEventListener("mousedown",function(e){return s.handleSuggestionClicked(e)}),this.suggestionElement.addEventListener("touchend",function(e){return s.handleSuggestionClicked(e)}),this.suggestionPrefixElement=document.createElement("span"),this.suggestionTextElement=document.createElement("span"),this.suggestionElement.appendChild(this.suggestionPrefixElement),this.suggestionElement.appendChild(this.suggestionTextElement),this.suggestionPrefixElement.style.opacity="0.3";var n=window.getComputedStyle(this.textArea);this.suggestionElement.style.font=n.font,this.suggestionElement.style.marginTop=1.4*parseFloat(n.fontSize)+"px",t.appendChild(this.suggestionElement)}return Object.defineProperty(e.prototype,"currentSuggestion",{get:function(){return this.latestSuggestionText},enumerable:!0,configurable:!0}),e.prototype.show=function(e){this.latestSuggestionText=e,this.suggestionPrefixElement.textContent=" "!==e[0]?this.getPrefixText(this.textArea,20):"",this.suggestionTextElement.textContent=e;var t=gt.getTextAreaPosition(this.textArea),i=this.suggestionElement.style;i.minWidth=null,this.suggestionElement.classList.add("smart-textarea-suggestion-overlay-visible"),i.zIndex=this.textArea.style.zIndex+1,i.top=t.top+"px";var s=t.left-this.suggestionPrefixElement.offsetWidth;(!i.left||Math.abs(parseFloat(i.left)-s)>10)&&(i.left=s+"px"),this.showing=!0;var n=window.getComputedStyle(this.suggestionElement),a=parseFloat(n.lineHeight),r=parseFloat(n.paddingTop),l=parseFloat(n.paddingBottom),o=Math.round((this.suggestionElement.offsetHeight-r-l)/a);if(o>2){var h=this.suggestionElement.offsetWidth;i.minWidth="calc(min(70vw, "+o*h/2+"px))"}var p=this.suggestionElement.getBoundingClientRect();p.right>document.body.clientWidth-20&&(i.left="calc("+(parseFloat(i.left)-(p.right-document.body.clientWidth))+"px - 2rem)")},e.prototype.accept=function(){if(this.showing){var e=this.currentSuggestion;gt.insertCharacter(this.textArea,e),gt.adjustScrollToCaretPosition(this.textArea),this.hide(),this.smartTextArea.trigger("afterSuggestionInsert",{insertedText:e})}},e.prototype.reject=function(){this.hide()},e.prototype.hide=function(){this.showing&&(this.showing=!1,this.suggestionElement.classList.remove("smart-textarea-suggestion-overlay-visible"))},e.prototype.isShowing=function(){return this.showing},e.prototype.handleSuggestionClicked=function(e){e.preventDefault(),e.stopImmediatePropagation(),this.accept()},e.prototype.getPrefixText=function(e,t){for(var i=e.value,s=e.selectionStart,n=s-1;n>s-t;n--)if(n<0||/\s/.test(i[""+n]))return i.substring(n+1,s);return""},e}(),Pt=function(){function e(e,t){this.textArea=t,this.caretDiv=document.createElement("div"),this.caretDiv.classList.add("smart-textarea-caret"),e.appendChild(this.caretDiv)}return e.prototype.show=function(){var e=gt.getTextAreaPosition(this.textArea),t=this.caretDiv.style;t.display="block",t.top=e.top+"px",t.left=e.left+"px",t.height=e.height+"px",t.zIndex=this.textArea.style.zIndex,t.backgroundColor=e.elemStyle.caretColor},e.prototype.hide=function(){this.caretDiv.style.display="none"},e}(),Ot=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)}}(),kt=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.minDistance=5,t.previous=0,t.interval=30,t.timeout=null,t.isSignatureEmpty=!0,t.backgroundLoaded=null,t.isBlazor=!1,t.isResponsive=!1,t.signPointsColl=[],t.signRatioPointsColl=[],t.canRedraw=!0,t}return Ot(i,e),i.prototype.initialize=function(e,i){this.clearArray=[],this.element=e,this.canvasContext=this.element.getContext("2d"),this.canvasContext.canvas.tabIndex=-1,i&&(this.dotnetRef=i,this.isBlazor=!0,this.signatureValue&&this.loadPersistedSignature()),this.setHTMLProperties(),t.isNullOrUndefined(this.signatureValue)&&this.updateSnapCollection(!0),this.wireEvents(),this.isBlazor||this.trigger("created",null)},i.prototype.wireEvents=function(){!t.isNullOrUndefined(this.pointColl)||this.isReadOnly||this.disabled?this.pointColl&&(t.EventHandler.add(this.canvasContext.canvas,"mousemove touchmove",this.mouseMoveHandler,this),t.EventHandler.add(this.canvasContext.canvas,"mouseup touchend",this.mouseUpHandler,this),t.EventHandler.add(document,"mouseup",this.mouseUpHandler,this)):(t.EventHandler.add(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler,this),t.EventHandler.add(this.canvasContext.canvas,"keydown",this.keyboardHandler,this),window.addEventListener("resize",this.resizeHandler.bind(this)))},i.prototype.unwireEvents=function(e){"mouseup"===e||"touchend"===e?(this.canvasContext&&(t.EventHandler.remove(this.canvasContext.canvas,"mousemove touchmove",this.mouseMoveHandler),t.EventHandler.remove(this.canvasContext.canvas,"mouseup touchend",this.mouseUpHandler)),t.EventHandler.remove(document,"mouseup",this.mouseUpHandler)):(this.canvasContext&&(t.EventHandler.remove(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler),t.EventHandler.remove(this.canvasContext.canvas,"keydown",this.keyboardHandler)),window.removeEventListener("resize",this.resizeHandler))},i.prototype.setHTMLProperties=function(){150===this.element.height&&300===this.element.width&&0!==this.element.offsetHeight&&0!==this.element.offsetWidth?(this.element.height=this.element.offsetHeight,this.element.width=this.element.offsetWidth,this.isResponsive=!0):this.element.height===this.element.offsetHeight-1&&this.element.width===this.element.offsetWidth-1||0===this.element.offsetHeight||0===this.element.offsetWidth||(this.element.height=this.element.offsetHeight,this.element.width=this.element.offsetWidth),this.canvasContext.fillStyle=this.strokeColor,this.tempCanvas=this.createElement("canvas",{className:"e-"+this.getModuleName()+"-temp"}),this.tempContext=this.tempCanvas.getContext("2d"),this.tempCanvas.width=this.element.width,this.tempCanvas.height=this.element.height,this.backgroundImage?(this.canvasContext.canvas.style.backgroundImage="url("+this.backgroundImage+")",this.canvasContext.canvas.style.backgroundRepeat="no-repeat",this.saveWithBackground&&this.setBackgroundImage(this.backgroundImage,"temp")):this.backgroundColor&&(this.canvasContext.canvas.style.backgroundColor=this.backgroundColor)},i.prototype.mouseDownHandler=function(e){1!==e.buttons&&2!==e.buttons&&"touchstart"!==e.type||("touchstart"===e.type&&(e.preventDefault(),e.stopPropagation()),this.beginStroke(e),this.wireEvents())},i.prototype.mouseMoveHandler=function(e){1!==e.buttons&&2!==e.buttons&&"touchmove"!==e.type||("touchmove"===e.type&&(e.preventDefault(),e.stopPropagation()),this.interval?this.updateStrokeWithThrottle(e):this.updateStroke(e))},i.prototype.mouseUpHandler=function(e){var t={actionName:"strokeUpdate"};"touchstart"===e.type&&(e.preventDefault(),e.stopPropagation()),this.endDraw(),this.updateSnapCollection(),this.unwireEvents(e.type),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","mouseUp"):this.trigger("change",t),this.signatureValue=this.snapColl[this.incStep];for(var i=0;i<this.signPointsColl.length;i++)this.signRatioPointsColl.push({x:this.signPointsColl[i].x/this.canvasContext.canvas.width,y:this.signPointsColl[i].y/this.canvasContext.canvas.height});this.signPointsColl=[]},i.prototype.keyboardHandler=function(e){var t=this,i={fileName:"Signature",type:"Png",cancel:!1};switch(e.key){case"Delete":this.clear();break;case e.ctrlKey&&"s":this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","beforeSave"):this.trigger("beforeSave",i,function(e){i.cancel||t.save(e.type,e.fileName)}),e.preventDefault(),e.stopImmediatePropagation();break;case e.ctrlKey&&"z":this.undo();break;case e.ctrlKey&&"y":this.redo()}},i.prototype.resizeHandler=function(){var e=this;if(this.isResponsive&&this.canRedraw&&this.canvasContext&&this.element){this.canvasContext.canvas.width=this.element.offsetWidth,this.canvasContext.canvas.height=this.element.offsetHeight,this.canvasContext.scale(1,1),this.canvasContext.fillStyle=this.strokeColor;for(var t=(this.minStrokeWidth+this.maxStrokeWidth)/2,i=0;i<this.signRatioPointsColl.length;i++)this.arcDraw(this.signRatioPointsColl[i].x*this.canvasContext.canvas.width,this.signRatioPointsColl[i].y*this.canvasContext.canvas.height,t);this.signPointsColl=[],this.canvasContext.closePath(),this.canvasContext.fill()}else if(this.canvasContext&&this.element){var s=new Image;s.src=this.snapColl[this.incStep],s.onload=function(){e.canvasContext.clearRect(0,0,e.element.width,e.element.height),e.canvasContext.drawImage(s,0,0,e.element.width,e.element.height)}}},i.prototype.beginStroke=function(e){this.internalRefresh(),this.updateStroke(e)},i.prototype.updateStroke=function(e){var t=this.createPoint(e);this.addPoint(t)},i.prototype.updateStrokeWithThrottle=function(e){var t=Date.now(),i=this.interval-(t-this.previous);this.storedArgs=e,i<=0||i>this.interval?(this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.previous=t,this.updateStroke(this.storedArgs),this.timeout||(this.storedArgs=null)):this.timeout||(this.timeout=window.setTimeout(this.delay.bind(this),i))},i.prototype.delay=function(){this.previous=Date.now(),this.timeout=null,this.updateStroke(this.storedArgs),this.timeout||(this.storedArgs=null)},i.prototype.createPoint=function(e){var t=this.canvasContext.canvas.getBoundingClientRect();return"mousedown"===e.type||"mousemove"===e.type?this.point(e.clientX-t.left,e.clientY-t.top,(new Date).getTime()):this.point(e.touches[0].clientX-t.left,e.touches[0].clientY-t.top,(new Date).getTime())},i.prototype.point=function(e,t,i){return this.pointX=e,this.pointY=t,this.time=i||(new Date).getTime(),{x:this.pointX,y:this.pointY,time:this.time}},i.prototype.addPoint=function(e){var t,i,s=this.pointColl,n=s.length>0&&s[s.length-1],a=!!n&&this.distanceTo(n)<=this.minDistance;n&&n&&a||(s.push(e),s.length>2&&(3===s.length&&s.unshift(s[0]),t=this.calculateCurveControlPoints(s[0],s[1],s[2]).controlPoint2,i=this.calculateCurveControlPoints(s[1],s[2],s[3]).controlPoint1,this.startPoint=s[1],this.controlPoint1=t,this.controlPoint2=i,this.endPoint=s[2],this.startDraw(),s.shift()))},i.prototype.startDraw=function(){var e;e=this.pointVelocityCalc(this.startPoint),e=this.velocity*e+(1-this.velocity)*this.lastVelocity;var t=Math.max(this.maxStrokeWidth/(e+1),this.minStrokeWidth);this.curveDraw(this.lastWidth,t),this.lastVelocity=e,this.lastWidth=t},i.prototype.endDraw=function(){if(!t.isNullOrUndefined(this.pointColl)){var e=this.pointColl.length>2,i=this.pointColl[0];!e&&i&&this.strokeDraw(i)}},i.prototype.curveDraw=function(e,t){var i,s,n,a,r,l,o,h,p,d,u=this.canvasContext,c=t-e,m=this.bezierLengthCalc(),f=2*Math.ceil(m);for(u.beginPath(),s=0;s<f;s++)r=(a=(n=s/f)*n)*n,p=(h=(o=(l=1-n)*l)*l)*this.startPoint.x,p+=3*o*n*this.controlPoint1.x,p+=3*l*a*this.controlPoint2.x,p+=r*this.endPoint.x,d=h*this.startPoint.y,d+=3*o*n*this.controlPoint1.y,d+=3*l*a*this.controlPoint2.y,d+=r*this.endPoint.y,i=Math.min(e+r*c,this.maxStrokeWidth),this.arcDraw(p,d,i);u.closePath(),u.fill(),this.isSignatureEmpty=!1},i.prototype.strokeDraw=function(e){var t=this.canvasContext,i=(this.minStrokeWidth+this.maxStrokeWidth)/2;t.beginPath(),this.arcDraw(e.x,e.y,i),t.closePath(),t.fill(),this.isSignatureEmpty=!1},i.prototype.arcDraw=function(e,t,i){this.signPointsColl.push({x:e,y:t});var s=this.canvasContext;s.moveTo(e,t),s.arc(e,t,i,0,2*Math.PI,!1)},i.prototype.calculateCurveControlPoints=function(e,t,i){var s=e.x-t.x,n=e.y-t.y,a=t.x-i.x,r=t.y-i.y,l={x:(e.x+t.x)/2,y:(e.y+t.y)/2},o={x:(t.x+i.x)/2,y:(t.y+i.y)/2},h=Math.sqrt(s*s+n*n),p=Math.sqrt(a*a+r*r),d=l.x-o.x,u=l.y-o.y,c=p/(h+p),m={x:o.x+d*c,y:o.y+u*c},f=t.x-m.x,v=t.y-m.y;return{controlPoint1:this.point(l.x+f,l.y+v,0),controlPoint2:this.point(o.x+f,o.y+v,0)}},i.prototype.bezierLengthCalc=function(){var e,t,i,s,n,a,r,l,o=0;for(e=0;e<=10;e++)t=e/10,i=this.bezierPointCalc(t,this.startPoint.x,this.controlPoint1.x,this.controlPoint2.x,this.endPoint.x),s=this.bezierPointCalc(t,this.startPoint.y,this.controlPoint1.y,this.controlPoint2.y,this.endPoint.y),e>0&&(r=i-n,l=s-a,o+=Math.sqrt(r*r+l*l)),n=i,a=s;return o},i.prototype.bezierPointCalc=function(e,t,i,s,n){return t*(1-e)*(1-e)*(1-e)+3*i*(1-e)*(1-e)*e+3*s*(1-e)*e*e+n*e*e*e},i.prototype.pointVelocityCalc=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0},i.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.pointX-e.x,2)+Math.pow(this.pointY-e.y,2))},i.prototype.isRead=function(e){e?t.EventHandler.remove(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler):this.disabled||t.EventHandler.add(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler,this)},i.prototype.enableOrDisable=function(e){this.disabled=e,e?(this.canvasContext.canvas.style.filter="opacity(0.5)",this.isRead(!0)):(this.canvasContext.canvas.style.filter="",this.isRead(!1))},i.prototype.updateSnapCollection=function(e){if(t.isNullOrUndefined(this.incStep)?(this.incStep=-1,this.incStep++,this.snapColl=[],this.clearArray=[]):this.incStep++,this.incStep<this.snapColl.length&&(this.snapColl.length=this.incStep),this.incStep>0){var i=this.createElement("canvas",{className:"e-"+this.getModuleName()+"-wrapper"}),s=i.getContext("2d");this.canvasContext&&(i.width=this.canvasContext.canvas.width,i.height=this.canvasContext.canvas.height,s.drawImage(this.canvasContext.canvas,0,0,i.width,i.height),this.snapColl.push(i.toDataURL()))}else this.snapColl.push(this.canvasContext.canvas.toDataURL());e&&this.clearArray.push(this.incStep)},i.prototype.setBackgroundImage=function(e,t){var i=this,s=new Image;s.crossOrigin="anonymous",s.src=e,"temp"===t?s.onload=function(){i.tempContext.globalCompositeOperation="source-over",i.tempContext.drawImage(s,0,0,i.element.width,i.element.height)}:(s.onload=function(){i.canvasContext.globalCompositeOperation="source-over",i.canvasContext.drawImage(s,0,0,i.element.width,i.element.height),i.updateSnapCollection(),i.saveBackground(!0)},this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height))},i.prototype.setBackgroundColor=function(e){var t=this.canvasContext;t.strokeStyle=e;var i,s;for(i=1;i<=t.canvas.width;i++)for(s=1;s<=t.canvas.height;s++)t.strokeRect(0,0,i,s);this.updateSnapCollection()},i.prototype.loadPersistedSignature=function(){if(!t.isNullOrUndefined(this.signatureValue)){var e=this,i=new Image;i.src=this.signatureValue,i.onload=function(){e.canvasContext.clearRect(0,0,e.element.width,e.element.height),e.canvasContext.drawImage(i,0,0),e.updateSnapCollection()},this.isSignatureEmpty=!1}},i.prototype.getBlob=function(e){for(var t=e.split(","),i=t[0].match(/:(.*?);/)[1],s=atob(t[1]),n=s.length,a=new Uint8Array(n);n--;)a[n]=s.charCodeAt(n);return new Blob([a],{type:i})},i.prototype.download=function(e,t){var i=URL.createObjectURL(e),s=document.createElement("a");s.href=i,s.target="_parent",s.download=t,(document.body||document.documentElement).appendChild(s),s.click(),s.parentNode.removeChild(s)},i.prototype.internalRefresh=function(){this.pointColl=[],this.lastVelocity=0,this.lastWidth=(this.minStrokeWidth+this.maxStrokeWidth)/2},i.prototype.refresh=function(){this.isResponsive=!1,this.setHTMLProperties(),this.resizeHandler(),this.internalRefresh()},i.prototype.clear=function(){var e={actionName:"clear"};this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height),this.tempContext.clearRect(0,0,this.tempContext.canvas.width,this.tempContext.canvas.height),this.saveWithBackground&&this.backgroundImage&&this.setBackgroundImage(this.backgroundImage,"temp"),this.internalRefresh(),this.signRatioPointsColl=[],this.updateSnapCollection(!0),this.isSignatureEmpty=this.canRedraw=!0,this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","Clear"):this.trigger("change",e)},i.prototype.undo=function(){var e={actionName:"undo"},t=this;if(this.incStep>0){this.incStep--;var i=new Image;i.src=this.snapColl[this.incStep],i.onload=function(){t.canvasContext.clearRect(0,0,t.element.width,t.element.height),t.canvasContext.drawImage(i,0,0,t.element.width,t.element.height)}}this.isClear(),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","Undo"):this.trigger("change",e)},i.prototype.redo=function(){var e={actionName:"redo"},t=this;if(this.incStep<this.snapColl.length-1){this.incStep++;var i=new Image;i.src=this.snapColl[this.incStep],i.onload=function(){t.canvasContext.clearRect(0,0,t.element.width,t.element.height),t.canvasContext.drawImage(i,0,0,t.element.width,t.element.height)}}this.isClear(),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","Redo"):this.trigger("change",e)},i.prototype.isClear=function(){if(this.clearArray){for(var e=!1,t=0;t<this.clearArray.length;t++)this.clearArray[t]===this.incStep&&(this.isSignatureEmpty=!0,e=!0);e||(this.isSignatureEmpty=!1)}},i.prototype.isEmpty=function(){return this.isSignatureEmpty},i.prototype.canUndo=function(){return this.incStep>0},i.prototype.canRedo=function(){return this.incStep<this.snapColl.length-1},i.prototype.draw=function(e,i,s,n,a){var r={actionName:"draw-text"};this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height),i=i||"Arial",s=s||30,this.canvasContext.font=s+"px "+i;var l=this.element.width/2,o=this.element.height/2;t.isNullOrUndefined(n)&&t.isNullOrUndefined(a)?(this.canvasContext.textAlign="center",this.canvasContext.textBaseline="middle"):(l=t.isNullOrUndefined(n)?l:n,o=t.isNullOrUndefined(a)?o+s/2:a+s/2),this.canvasContext.fillText(e,l,o),this.updateSnapCollection(),this.isSignatureEmpty=!1,this.trigger("change",r)},i.prototype.load=function(e,t,i){i=i||this.element.height,t=t||this.element.width,this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height);var s=this,n=new Image;n.src=e,"data"!==e.slice(0,4)&&(n.crossOrigin="anonymous"),n.onload=function(){Promise.all([createImageBitmap(n,0,0,t,i)]).then(function(n){var a=document.createElement("canvas");a.width=t,a.height=i,a.getContext("2d").drawImage(n[0],0,0),"data"!==e.slice(0,4)&&(s.canvasContext.globalCompositeOperation="source-over"),s.canvasContext.drawImage(a,0,0,t,i,0,0,s.element.width,s.element.height),s.updateSnapCollection()})},this.isSignatureEmpty=this.canRedraw=!1},i.prototype.saveBackground=function(e){var t;if(t=e&&this.backgroundImage?this.snapColl[this.incStep-1]:this.snapColl[this.incStep],e||(this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height),this.backgroundImage?this.setBackgroundImage(this.backgroundImage):this.backgroundColor&&(this.setBackgroundColor(this.backgroundColor),e=!0)),e){var i=this,s=new Image;s.crossOrigin="anonymous",s.src=t,s.onload=function(){i.backgroundLoaded=!0,i.canvasContext.globalCompositeOperation="source-over",i.canvasContext.drawImage(s,0,0,i.element.width,i.element.height),i.save(i.fileType,i.fileName)}}},i.prototype.save=function(e,t){if(this.saveWithBackground&&null==this.backgroundLoaded&&(this.backgroundImage||this.backgroundColor))this.backgroundLoaded=!1,this.fileType=e,this.fileName=t,this.saveBackground(!1);else if("Svg"===e)t=t||"Signature",this.toSVG(t);else if("Jpeg"===e)if(t=t||"Signature",!this.saveWithBackground||this.saveWithBackground&&!this.backgroundImage&&!this.backgroundColor)this.toJPEG(t);else{i=this.canvasContext.canvas.toDataURL("image/jpeg");this.download(this.getBlob(i),t+".jpeg")}else{t=t||"Signature";var i=this.canvasContext.canvas.toDataURL("image/png");this.download(this.getBlob(i),t+".png")}this.saveWithBackground&&this.backgroundLoaded&&this.resetSnap()},i.prototype.resetSnap=function(){this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height);var e=this,t=new Image;t.src=this.snapColl[this.incStep-1],t.onload=function(){e.canvasContext.drawImage(t,0,0,e.element.width,e.element.height),e.updateSnapCollection()},this.backgroundLoaded=null,this.snapColl.pop(),this.incStep--,this.snapColl.pop(),this.incStep--},i.prototype.toJPEG=function(e){var t=this,i=this.snapColl[this.incStep];this.setBackgroundColor("#ffffff");var s=this,n=new Image;n.crossOrigin="anonymous",n.src=i,n.onload=function(){s.canvasContext.globalCompositeOperation="source-over",s.canvasContext.drawImage(n,0,0,s.element.width,s.element.height);var i=s.canvasContext.canvas.toDataURL("image/jpeg");s.download(s.getBlob(i),e+".jpeg"),s.canvasContext.clearRect(0,0,s.canvasContext.canvas.width,s.canvasContext.canvas.height),t.resizeHandler()},this.snapColl.pop(),this.incStep--},i.prototype.toSVG=function(e,t){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("width",this.canvasContext.canvas.width.toString()),i.setAttribute("height",this.canvasContext.canvas.height.toString());var s=document.createElementNS("http://www.w3.org/2000/svg","image");s.setAttributeNS(null,"height",this.canvasContext.canvas.height.toString()),s.setAttributeNS(null,"width",this.canvasContext.canvas.width.toString()),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t),i.appendChild(s);var n='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+this.canvasContext.canvas.width+'" height="'+this.canvasContext.canvas.height+'">'+i.innerHTML+"</svg>",a="data:image/svg+xml;base64,"+btoa(n);return null==e?a:(this.download(this.getBlob(a),e+".svg"),null)},i.prototype.saveAsBlob=function(){return this.getBlob(this.canvasContext.canvas.toDataURL("image/png"))},i.prototype.getSignature=function(e){return this.saveWithBackground&&this.backgroundColor&&!this.backgroundImage?(this.tempContext.fillStyle=this.backgroundColor,this.tempContext.fillRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height)):this.backgroundColor||this.backgroundImage||"Jpeg"!==e||(this.tempContext.fillStyle="#fff",this.tempContext.fillRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height)),this.tempContext.drawImage(this.element,0,0),"Jpeg"===e?this.tempCanvas.toDataURL("image/jpeg"):"Svg"===e?this.toSVG(null,this.tempCanvas.toDataURL("image/png")):this.tempCanvas.toDataURL("image/png")},i.prototype.getModuleName=function(){return"signature"},i.prototype.getPersistData=function(){return this.signatureValue=this.snapColl[this.incStep],this.addOnPersist(["signatureValue"])},i.prototype.destroy=function(){"image-editor"!==this.getModuleName()&&(this.unwireEvents(null),t.removeClass([this.element],"e-"+this.getModuleName()),this.element.removeAttribute("tabindex"),this.pointColl=null,this.tempContext=null,this.tempCanvas=null,this.canvasContext=null),e.prototype.destroy.call(this),this.element=null},i.prototype.propertyChanged=function(e,t){var i=this.canvasContext;switch(e){case"backgroundColor":i.canvas.style.backgroundColor=t,this.backgroundColor=t;break;case"backgroundImage":i.canvas.style.backgroundImage="url("+t+")",this.backgroundImage=t,this.saveWithBackground&&this.setBackgroundImage(this.backgroundImage,"temp");break;case"strokeColor":i.fillStyle=t,this.strokeColor=t;break;case"saveWithBackground":this.saveWithBackground=t;break;case"maxStrokeWidth":this.maxStrokeWidth=t;break;case"minStrokeWidth":this.minStrokeWidth=t;break;case"velocity":this.velocity=t;break;case"isReadOnly":this.isRead(t);break;case"disabled":this.enableOrDisable(t)}},i}(t.Component),wt=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)}}(),Lt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},At=function(e){function i(t,i){return e.call(this,t,i)||this}return wt(i,e),i.prototype.preRender=function(){},i.prototype.render=function(){this.initialize()},i.prototype.initialize=function(){this.element.setAttribute("role","img"),this.element.setAttribute("aria-label","signature"),t.addClass([this.element],"e-"+this.getModuleName()),e.prototype.initialize.call(this,this.element),this.enablePersistence&&this.loadPersistedSignature()},i.prototype.getModuleName=function(){return e.prototype.getModuleName.call(this)},i.prototype.getPersistData=function(){return e.prototype.getPersistData.call(this)},i.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];switch(a){case"backgroundColor":e.prototype.propertyChanged.call(this,a,t.backgroundColor);break;case"backgroundImage":e.prototype.propertyChanged.call(this,a,t.backgroundImage);break;case"strokeColor":t.strokeColor!==i.strokeColor&&e.prototype.propertyChanged.call(this,a,t.strokeColor);break;case"maxStrokeWidth":t.maxStrokeWidth!==i.maxStrokeWidth&&e.prototype.propertyChanged.call(this,a,t.maxStrokeWidth);break;case"minStrokeWidth":t.minStrokeWidth!==i.minStrokeWidth&&e.prototype.propertyChanged.call(this,a,t.minStrokeWidth);break;case"velocity":t.velocity!==i.velocity&&e.prototype.propertyChanged.call(this,a,t.velocity);break;case"saveWithBackground":e.prototype.propertyChanged.call(this,a,t.saveWithBackground);break;case"isReadOnly":e.prototype.propertyChanged.call(this,a,t.isReadOnly);break;case"disabled":e.prototype.propertyChanged.call(this,a,t.disabled)}}},Lt([t.Property("")],i.prototype,"backgroundColor",void 0),Lt([t.Property("")],i.prototype,"backgroundImage",void 0),Lt([t.Property(!1)],i.prototype,"disabled",void 0),Lt([t.Property(!1)],i.prototype,"isReadOnly",void 0),Lt([t.Property(!0)],i.prototype,"saveWithBackground",void 0),Lt([t.Property("#000000")],i.prototype,"strokeColor",void 0),Lt([t.Property(.5)],i.prototype,"minStrokeWidth",void 0),Lt([t.Property(2)],i.prototype,"maxStrokeWidth",void 0),Lt([t.Property(.7)],i.prototype,"velocity",void 0),Lt([t.Property("en-US")],i.prototype,"locale",void 0),Lt([t.Property(!1)],i.prototype,"enableRtl",void 0),Lt([t.Property(!1)],i.prototype,"enablePersistence",void 0),Lt([t.Event()],i.prototype,"beforeSave",void 0),Lt([t.Event()],i.prototype,"change",void 0),Lt([t.Event()],i.prototype,"created",void 0),i=Lt([t.NotifyPropertyChanges],i)}(kt),Ht=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Nt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Bt="e-rating-icon e-icons e-star-filled",Rt="e-rating-selected";!function(e){e.Top="Top",e.Bottom="Bottom",e.Left="Left",e.Right="Right"}(e.LabelPosition||(e.LabelPosition={})),function(e){e.Full="Full",e.Half="Half",e.Quarter="Quarter",e.Exact="Exact"}(e.PrecisionType||(e.PrecisionType={}));var Ut=function(s){function n(e,t){var i=s.call(this,e,t)||this;return i.itemElements=[],i}return Ht(n,s),n.prototype.preRender=function(){this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName())),this.keyConfigs={downarrow:"downarrow",leftarrow:"leftarrow",rightarrow:"rightarrow",uparrow:"uparrow",space:"space"},this.tooltipOpen=!1,this.isTouchSelected=!1,t.closest(this.element,"form")&&this.element.getAttribute("value")&&this.setProperties({value:this.element.getAttribute("value")},!0)},n.prototype.render=function(){this.initialize(),this.updateMinValue(),this.updateTemplateFunction(),this.triggerChange(null,this.value,!1,!0),this.renderItems(),this.displayLabel()},n.prototype.initialize=function(){this.wrapper=this.createElement("div",{className:"e-"+this.getModuleName()+"-container "}),this.element.parentNode.insertBefore(this.wrapper,this.element),this.wrapper.appendChild(this.element),null==this.element.getAttribute("name")&&this.element.setAttribute("name",this.element.id),t.attributes(this.element,{"aria-label":"rating"}),this.renderItemList(),this.updateReset(),this.readOnly&&this.wrapper.classList.add("e-rating-readonly"),this.visible||this.wrapper.classList.add("e-rating-hidden"),this.enableRtl&&this.wrapper.classList.add("e-rtl"),this.enableAnimation&&this.wrapper.classList.add("e-rating-animation"),this.cssClass&&t.addClass([this.wrapper],this.cssClass.split(" ")),this.updateTooltip(),this.wireKeyboardEvent(),this.updateDisabled()},n.prototype.updateDisabled=function(){this.wrapper.classList[this.disabled?"add":"remove"]("e-disabled"),t.attributes(this.ratingItemList,{tabindex:this.disabled?"-1":"0"}),this.updateResetButton()},n.prototype.updateResetButton=function(){if(this.allowReset){this.resetElement&&this.resetElement.blur();var e=this.value<=this.min||this.disabled;this.resetElement.classList[e?"add":"remove"]("e-disabled"),t.attributes(this.resetElement,{tabindex:e?"-1":"0","aria-hidden":e.toString()})}},n.prototype.renderItemList=function(){var e=this;this.ratingItemList=this.createElement("div",{className:"e-rating-item-list",id:this.element.id+"_item-list"}),t.attributes(this.ratingItemList,{"aria-label":"rating",role:"slider"}),this.wrapper.appendChild(this.ratingItemList),t.EventHandler.add(this.ratingItemList,"touchmove",function(t){return e.touchMoveHandler(t)},this),t.EventHandler.add(this.ratingItemList,t.Browser.touchEndEvent,this.touchEndHandler,this)},n.prototype.touchMoveHandler=function(e){this.isTouchSelected||(this.wrapper.classList.add("e-rating-touch"),this.isTouchSelected=!0),this.wrapper.classList.add("e-touch-select");var t=this.ratingItemList.getBoundingClientRect(),i=(e.touches[0].clientX-t.x)/t.width*this.itemsCount;i=(i=this.enableRtl?this.itemsCount-i:i)<this.min?this.min:i>this.itemsCount?this.itemsCount:i;var s=0===(i=this.validateValue(i))?null:this.itemElements[parseInt((Math.ceil(i)-1).toString(),10)];if(i===this.currentValue)return void(this.showTooltip&&s&&this.openRatingTooltip(s,!1));var n=this.currentValue;this.triggerChange(e,i),this.updateCurrentValue(i),this.showTooltip&&(s?(Math.ceil(i)!==Math.ceil(n)&&this.closeRatingTooltip(),this.openRatingTooltip(s,!0)):this.closeRatingTooltip())},n.prototype.touchEndHandler=function(){this.closeRatingTooltip(),this.wrapper.classList.remove("e-touch-select")},n.prototype.updateTemplateFunction=function(){this.emptyTemplateFunction=this.emptyTemplate?this.getTemplateString(this.emptyTemplate):null,this.fullTemplateFunction=this.fullTemplate?this.getTemplateString(this.fullTemplate):null},n.prototype.renderItems=function(){for(var e=this,i=0;i<this.itemsCount;i++){var s=this.createElement("span",{className:"e-rating-item-container"}),n=this.createElement("span",{className:"e-rating-item"}),a=this.getRatingValue(this.value,i);this.renderItemContent(n,a,i,!1),s.appendChild(n),this.wireItemsEvents(s,i+1),this.itemElements.push(s);var r={element:s,value:i+1};this.trigger("beforeItemRender",r,function(t){e.ratingItemList.appendChild(t.element)})}t.attributes(this.ratingItemList,{"aria-valuemax":this.itemsCount.toString()}),this.updateItemValue(!1)},n.prototype.renderItemContent=function(e,i,s,n){n&&this.removeItemContent(e),this.fullTemplate&&1===i?(e.classList.add("e-rating-full"),t.append(this.fullTemplateFunction({index:s,ratingValue:i},this,"ratingFullTemplate",this.element.id+"fullTemplate",this.isStringTemplate),e)):this.emptyTemplate?(e.classList.add("e-rating-empty"),t.append(this.emptyTemplateFunction({index:s,ratingValue:i},this,"ratingEmptyTemplate",this.element.id+"emptyTemplate",this.isStringTemplate),e)):t.addClass([e],Bt.split(" "))},n.prototype.removeItemContent=function(e){e.classList.remove("e-rating-full","e-rating-empty"),t.removeClass([e],Bt.split(" ")),e.firstChild&&(e.innerHTML="")},n.prototype.updateTooltip=function(){this.showTooltip?(this.tooltipObj=new i.Tooltip({target:".e-rating-item-container",windowCollision:!0,opensOn:"Custom",cssClass:this.cssClass?"e-rating-tooltip "+this.cssClass:"e-rating-tooltip"}),this.tooltipObj.appendTo(this.ratingItemList)):t.isNullOrUndefined(this.tooltipObj)||(this.tooltipObj.destroy(),this.tooltipObj=null)},n.prototype.updateMinValue=function(){this.setProperties({min:this.validateValue(this.min)},!0),this.min>0&&this.value<this.min&&this.triggerChange(null,this.min,!1),t.attributes(this.ratingItemList,{"aria-valuemin":this.min.toString()})},n.prototype.validateValue=function(t){return t=t>this.itemsCount?this.itemsCount:t<0?0:this.precision===e.PrecisionType.Full||this.enableSingleSelection?Math.round(t):this.precision===e.PrecisionType.Half?Math.round(2*t)/2:this.precision===e.PrecisionType.Quarter?Math.round(4*t)/4:Math.round(10*t)/10},n.prototype.getRatingValue=function(e,t){return this.enableSingleSelection?e>t&&e<=t+1?1:0:e>=t+1?1:e<t?0:e-t},n.prototype.updateItemValue=function(i){void 0===i&&(i=!0);for(var s=0;s<this.itemsCount;s++){var n=this.itemElements[parseInt(s.toString(),10)];n.classList.remove(Rt,"e-rating-intermediate","e-selected-value");var a=this.getRatingValue(this.currentValue,s);1===a?n.classList.add(Rt):a>0?n.classList.add("e-rating-intermediate"):this.precision===e.PrecisionType.Full&&s+1<=this.value&&!this.enableSingleSelection&&n.classList.add("e-selected-value"),i&&this.updateItemContent(a,s),n.style.setProperty("--rating-value",100*a+"%"),n.classList[0===this.value&&0===s||this.value===s+1||a>0&&a<1?"add":"remove"]("e-rating-focus")}i&&this.renderReactTemplates(),this.updateResetButton(),t.attributes(this.ratingItemList,{"aria-valuenow":this.currentValue.toString()}),t.attributes(this.element,{value:this.value.toString()})},n.prototype.updateItemContent=function(e,i){if(this.fullTemplate||this.emptyTemplate){var s=this.itemElements[parseInt(i.toString(),10)].querySelector(".e-rating-item");if(this.fullTemplate&&1===e){if(s.classList.contains("e-rating-full"))return;this.removeItemContent(s),s.classList.add("e-rating-full"),t.append(this.fullTemplateFunction({ratingValue:e,index:i},this,"ratingFullTemplate",this.element.id+"fullTemplate"+i,this.isStringTemplate),s)}else if(this.emptyTemplate){if(s.classList.contains("e-rating-empty"))return;this.removeItemContent(s),s.classList.add("e-rating-empty"),t.append(this.emptyTemplateFunction({ratingValue:e,index:i},this,"ratingEmptyTemplate",this.element.id+"emptyTemplate"+i,this.isStringTemplate),s)}else this.removeItemContent(s),t.addClass([s],Bt.split(" "))}},n.prototype.updateTooltipContent=function(e){var i=this;if(this.showTooltip){this.isReact&&this.clearTemplate(["ratingTooltipTemplate"]);var s;if(this.tooltipTemplate){s=this.createElement("span",{className:"e-rating-tooltip-content"});var n=this.getTemplateString(this.tooltipTemplate);t.append(n({value:this.currentValue},this,"ratingTooltipTemplate",this.element.id+"tooltipTemplate",this.isStringTemplate),s),this.tooltipObj.setProperties({content:s},e),this.isAngular&&setTimeout(function(){var e=i.ratingItemList.querySelectorAll(".e-rating-item-container."+Rt);i.tooltipObj.refresh(e[e.length-1])})}else s=this.currentValue.toString(),this.tooltipObj.setProperties({content:t.initializeCSPTemplate(function(){return s})},e);this.renderReactTemplates()}},n.prototype.getTemplateString=function(e){var i="";try{if("function"!=typeof e){var s=t.select(e);i=s?"SCRIPT"===s.tagName?s.innerHTML:s.outerHTML:e}else i=e}catch(t){i=e}return t.compile(i)},n.prototype.displayLabel=function(){this.showLabel?(this.spanLabel=this.createElement("span",{className:"e-rating-label"}),this.updateLabel(),this.updateLabelPosition()):this.wrapper.contains(this.spanLabel)&&(t.remove(this.spanLabel),this.spanLabel=null)},n.prototype.updateLabel=function(){if(this.showLabel)if(this.labelTemplate){this.isReact&&this.clearTemplate(["ratingLabelTemplate"]),this.spanLabel.firstChild&&(this.spanLabel.innerHTML="");var e=this.getTemplateString(this.labelTemplate);t.append(e({value:this.currentValue},this,"ratingLabelTemplate",this.element.id+"labelTemplate",this.isStringTemplate),this.spanLabel),this.renderReactTemplates()}else this.spanLabel.textContent=this.currentValue+" / "+this.itemsCount},n.prototype.updateReset=function(){this.allowReset?(this.resetElement=this.createElement("span",{className:"e-icons e-reset",attrs:{"aria-label":"resetbutton",role:"button"}}),this.updateResetButton(),t.EventHandler.add(this.resetElement,"click",this.resetClicked,this),this.wrapper.insertBefore(this.resetElement,this.ratingItemList)):this.wrapper.contains(this.resetElement)&&(t.remove(this.resetElement),this.resetElement=null)},n.prototype.updateLabelPosition=function(){this.clearLabelPosition(),this.spanLabel.classList.add("e-label-"+this.labelPosition.toLowerCase()),"Left"===this.labelPosition||"Top"===this.labelPosition?this.wrapper.firstChild.after(this.spanLabel):this.wrapper.appendChild(this.spanLabel)},n.prototype.clearLabelPosition=function(){var e=this.spanLabel.classList.value.match(/(e-label-[top|bottom|right|left]+)/g);e&&t.removeClass([this.spanLabel],e)},n.prototype.wireItemsEvents=function(e,i){var s=this;t.EventHandler.add(e,"click",function(e){return s.clickHandler(e)},this),t.EventHandler.add(e,"mousemove",function(e){return s.mouseMoveHandler(i,e)},this),t.EventHandler.add(e,"mouseleave",this.mouseLeaveHandler,this)},n.prototype.clickHandler=function(e){this.currentValue=this.min>0&&this.currentValue<this.min?this.min:this.currentValue,this.triggerChange(e,this.currentValue),this.updateItemValue(),this.updateLabel(),this.updateResetButton()},n.prototype.updateValueChange=function(e,t,i){void 0===i&&(i=!0),this.triggerChange(e,t,i),this.updateItemValue(),this.updateLabel()},n.prototype.triggerChange=function(e,t,i,s){void 0===i&&(i=!0),void 0===s&&(s=!1);var n=this;if(t=this.validateValue(t),this.currentValue=t,this.currentValue!==this.value){var a={event:e,isInteracted:i,value:t,previousValue:this.value};this.setProperties({value:t},!0),this.isAngular&&!s&&n.localChange({value:t}),s||this.trigger("valueChanged",a)}},n.prototype.mouseMoveHandler=function(e,t){this.isTouchSelected&&(this.wrapper.classList.remove("e-rating-touch"),this.isTouchSelected=!1);var i=this.calculateCurrentValue(e,t);i=this.validateValue(i);var s=this.itemElements[parseInt((e-1).toString(),10)];if(i===this.currentValue)return void this.openRatingTooltip(s,!1);this.updateCurrentValue(i),this.openRatingTooltip(s,!0);var n={element:s,event:t,value:i};this.trigger("onItemHover",n)},n.prototype.openRatingTooltip=function(e,t){this.showTooltip&&(this.tooltipOpen?t&&(this.updateTooltipContent(!0),this.tooltipObj.refresh(e)):(this.updateTooltipContent(!1),this.tooltipObj.open(e),this.tooltipOpen=!0))},n.prototype.closeRatingTooltip=function(){this.tooltipOpen&&(this.tooltipObj.close(),this.tooltipOpen=!1)},n.prototype.updateCurrentValue=function(e){this.currentValue=e,this.updateItemValue(),this.updateLabel()},n.prototype.mouseLeaveHandler=function(){this.closeRatingTooltip(),this.updateCurrentValue(this.value)},n.prototype.calculateCurrentValue=function(t,i){var s=t;return this.enableSingleSelection||this.precision===e.PrecisionType.Full||(s=i.offsetX/this.itemElements[t-1].clientWidth,s=this.enableRtl?1-s:s,this.precision===e.PrecisionType.Quarter?s=s<=.25?.25:s<=.5?.5:s<.75?.75:1:this.precision===e.PrecisionType.Half&&(s=s<=.5?.5:1),s=s+t-1),s},n.prototype.reset=function(){this.resetClicked(null,!1)},n.prototype.resetClicked=function(e,t){void 0===t&&(t=!0),this.updateValueChange(e,this.min,t),this.updateResetButton()},n.prototype.wireKeyboardEvent=function(){this.keyboardModuleRating=new t.KeyboardEvents(this.wrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},n.prototype.keyActionHandler=function(e){if(e.preventDefault(),!this.disabled&&!this.readOnly){if(e.target.classList.contains("e-rating-item-list"))switch(e.action){case"uparrow":this.handleNavigation(e,!0);break;case"downarrow":this.handleNavigation(e,!1);break;case"leftarrow":this.handleNavigation(e,this.enableRtl);break;case"rightarrow":this.handleNavigation(e,!this.enableRtl)}if(this.allowReset&&e.target.classList.contains("e-reset"))switch(e.action){case"space":this.resetClicked(e)}}},n.prototype.handleNavigation=function(t,i){if(!i&&this.value>this.min||i&&this.value<this.itemsCount){var s=this.precision===e.PrecisionType.Full||this.enableSingleSelection?1:this.precision===e.PrecisionType.Half?.5:this.precision===e.PrecisionType.Quarter?.25:Math.round(1)/10;s=i?this.value+s:this.value-s,this.updateValueChange(t,s),this.updateResetButton()}},n.prototype.updateContent=function(){for(var e=0;e<this.itemsCount;e++){var t=this.itemElements[parseInt(e.toString(),10)].firstElementChild;this.renderItemContent(t,this.getRatingValue(this.value,e),e,!0)}},n.prototype.getModuleName=function(){return"rating"},n.prototype.getPersistData=function(){return this.addOnPersist([])},n.prototype.removeItemElements=function(){for(var e=0;e<this.itemElements.length;e++)t.remove(this.itemElements[parseInt(e.toString(),10)]);this.itemElements=[]},n.prototype.destroy=function(){var e=this;s.prototype.destroy.call(this),this.removeItemElements(),this.clearTemplate(),this.spanLabel&&(t.remove(this.spanLabel),this.spanLabel=null),this.resetElement&&(t.remove(this.resetElement),this.resetElement=null),this.showTooltip&&(this.tooltipObj.destroy(),this.tooltipObj=null),t.remove(this.ratingItemList),this.ratingItemList=null,this.wrapper.parentNode.insertBefore(this.element,this.wrapper),t.remove(this.wrapper),this.wrapper=null,this.keyboardModuleRating.destroy(),this.keyboardModuleRating=null,["value","aria-label","name"].forEach(function(t){e.element.removeAttribute(t)})},n.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++)switch(n[s]){case"value":this.updateValueChange(null,this.value>this.min?this.value:this.min,!1);break;case"min":this.updateMinValue(),this.updateItemValue(),this.updateLabel();break;case"showLabel":this.displayLabel();break;case"visible":this.wrapper.classList[this.visible?"remove":"add"]("e-rating-hidden");break;case"disabled":this.updateDisabled();break;case"readOnly":this.wrapper.classList[this.readOnly?"add":"remove"]("e-rating-readonly");break;case"allowReset":this.updateReset();break;case"enableRtl":this.wrapper.classList[this.enableRtl?"add":"remove"]("e-rtl");break;case"cssClass":i.cssClass&&t.removeClass([this.wrapper],i.cssClass.split(" ")),e.cssClass&&t.addClass([this.wrapper],e.cssClass.split(" ")),this.tooltipObj&&this.tooltipObj.setProperties({cssClass:this.cssClass?"e-rating-tooltip "+this.cssClass:"e-rating-tooltip"});break;case"labelPosition":this.updateLabelPosition();break;case"showTooltip":this.updateTooltip();break;case"precision":this.updateMinValue(),this.triggerChange(null,this.value,!1),this.updateItemValue(),this.updateLabel();break;case"enableSingleSelection":this.updateValueChange(null,this.currentValue,!1);break;case"enableAnimation":this.wrapper.classList[this.enableAnimation?"add":"remove"]("e-rating-animation");break;case"emptyTemplate":case"fullTemplate":this.updateTemplateFunction(),this.updateContent();break;case"labelTemplate":this.updateLabel();break;case"itemsCount":this.removeItemElements(),this.renderItems(),this.updateLabel()}},Nt([t.Property(!1)],n.prototype,"allowReset",void 0),Nt([t.Property("")],n.prototype,"cssClass",void 0),Nt([t.Property(!1)],n.prototype,"disabled",void 0),Nt([t.Property("")],n.prototype,"emptyTemplate",void 0),Nt([t.Property(!0)],n.prototype,"enableAnimation",void 0),Nt([t.Property(!1)],n.prototype,"enableSingleSelection",void 0),Nt([t.Property("")],n.prototype,"fullTemplate",void 0),Nt([t.Property(5)],n.prototype,"itemsCount",void 0),Nt([t.Property(e.LabelPosition.Right)],n.prototype,"labelPosition",void 0),Nt([t.Property("")],n.prototype,"labelTemplate",void 0),Nt([t.Property(0)],n.prototype,"min",void 0),Nt([t.Property(e.PrecisionType.Full)],n.prototype,"precision",void 0),Nt([t.Property(!1)],n.prototype,"readOnly",void 0),Nt([t.Property(!1)],n.prototype,"showLabel",void 0),Nt([t.Property(!0)],n.prototype,"showTooltip",void 0),Nt([t.Property("")],n.prototype,"tooltipTemplate",void 0),Nt([t.Property(0)],n.prototype,"value",void 0),Nt([t.Property(!0)],n.prototype,"visible",void 0),Nt([t.Event()],n.prototype,"beforeItemRender",void 0),Nt([t.Event()],n.prototype,"created",void 0),Nt([t.Event()],n.prototype,"onItemHover",void 0),Nt([t.Event()],n.prototype,"valueChanged",void 0),n=Nt([t.NotifyPropertyChanges],n)}(t.Component),It=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Ft=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.Number="number",e.Text="text",e.Password="password"}(e.OtpInputType||(e.OtpInputType={})),function(e){e.Outlined="outlined",e.Underlined="underlined",e.Filled="filled"}(e.OtpInputStyle||(e.OtpInputStyle={})),function(e){e.None="none",e.Uppercase="uppercase",e.Lowercase="lowercase"}(e.TextTransform||(e.TextTransform={}));var Vt=function(i){function s(e,t){var s=i.call(this,e,t)||this;return s.inputs=[],s.previousValue="",s.separatorElements=[],s.shouldFireFocus=!0,s.shouldFireBlur=!0,s.isFocusInCalled=!1,s.isFocusOutCalled=!1,s.handleWheelEvent=function(e){e.preventDefault()},s}return It(s,i),s.prototype.preRender=function(){this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},s.prototype.render=function(){this.initialize()},s.prototype.initialize=function(){t.attributes(this.element,{role:"group"}),this.renderInputs(),this.renderSeparator(1,this.inputs.length),this.addPlaceHolder(),this.updateCssClass(this.cssClass),this.updateVariantClass(),this.updateAriaLabel(this.ariaLabels),this.setElementAttributes(this.htmlAttributes,this.element),this.enableRtl&&this.element.classList.add("e-rtl"),this.previousValue=this.value.toString(),this.autoFocus&&this.focusIn()},s.prototype.renderInputs=function(){this.hiddenInputEle=this.createElement("input",{id:"otpInput_hidden",attrs:{name:this.element.id,type:"hidden",value:"number"===this.type?this.value.toString().replace(/\D/g,""):this.value.toString(),autoComplete:"off"}}),this.element.appendChild(this.hiddenInputEle);for(var e=0;e<this.length;e++)this.createOtpInput(e)},s.prototype.createOtpInput=function(e){var t=this.getDefaultValue(),i="";if(t){var s=t[parseInt(e.toString(),10)];"number"===this.type?isNaN(Number(s))||(i=s):i=s||""}var n=this.createElement("input",{id:this.element.id+"-"+(e+1),className:"e-otp-input-field e-input",attrs:{maxlength:"1",type:this.type,inputmode:this.htmlAttributes.inputmode||("number"===this.type?"numeric":"text")}});this.disabled&&n.setAttribute("disabled","disabled"),this.element.appendChild(n),this.inputs.push(n),i&&(n.value=i),this.wireEvents(n,e)},s.prototype.renderSeparator=function(e,t){if(this.separator.length>0)for(var i=e;i<t;i++){var s=this.createElement("span",{className:"e-otp-separator"});s.textContent=this.separator,this.separatorElements.push(s),this.element.insertBefore(s,this.inputs[parseInt(i.toString(),10)])}},s.prototype.updateSeparatorValue=function(){var e=this;""===this.separator?(this.separatorElements.forEach(function(e){return t.remove(e)}),this.separatorElements=[]):this.separatorElements.forEach(function(t){t.textContent=e.separator})},s.prototype.addPlaceHolder=function(){for(var e=0;e<this.inputs.length;e++){var t=this.placeholder.length<=1?this.placeholder:this.placeholder.charAt(e);this.setElementAttributes({placeholder:t},this.inputs[parseInt(e.toString(),10)])}},s.prototype.updateInputType=function(e){var t=this.htmlAttributes.inputmode||("number"===e?"numeric":"text");this.inputs.forEach(function(i){i.type=e,i.setAttribute("inputmode",t)})},s.prototype.getDefaultValue=function(){var e="number"==typeof this.value?this.value.toString():this.value;this.textTransform&&(e=this.getTransformedText(e));var t=e.replace(/\s/g,"");return t.length>0?t.split(""):void 0},s.prototype.getTransformedText=function(t){return this.textTransform.toLowerCase()===e.TextTransform.Lowercase?t.toLowerCase():this.textTransform.toLowerCase()===e.TextTransform.Uppercase?t.toUpperCase():t},s.prototype.handleInputChange=function(e,t){var i=this.inputs[parseInt(e.toString(),10)];if(i&&e<this.length-1&&i.value.length>0){var s=this.inputs[parseInt(e.toString(),10)+1];this.shouldFireFocus=this.shouldFireBlur=!1,s.focus(),s&&s.value.length>0&&s.select()}var n=t.target;n.value.length>1&&(n.value=n.value.slice(0,1)),this.textTransform&&(n.value=this.getTransformedText(n.value)),this.triggerInputEvent(e,t),this.triggerValuechanged(t,!0)},s.prototype.handleKeyAction=function(e,t){t.key.length>1&&!(0===e&&"Backspace"===t.key||e===this.length-1&&"Delete"===t.key)&&(this.shouldFireFocus=this.shouldFireBlur=!1);var i=this.inputs[parseInt(e.toString(),10)],s=this.inputs[parseInt(e.toString(),10)-1],n=this.inputs[parseInt(e.toString(),10)+1];if("Delete"===t.key){var a="";i.value.length>0?(a=i.value,i.value=""):e!==this.inputs.length-1&&(a=n.value,n.value="",n.focus()),a.length>0&&this.triggerInputEvent(e,t)}else if("Backspace"===t.key){if(0!==e&&0===i.value.length){var r=s.value;s.value="",s.focus(),r.length>0&&this.triggerInputEvent(e,t)}}else"ArrowLeft"===t.key||"ArrowRight"===t.key?("ArrowLeft"===t.key&&e>0?(s.focus(),s.select()):"ArrowRight"===t.key&&e<this.inputs.length-1&&(n.focus(),n.select()),t.preventDefault()):"ArrowUp"===t.key||"ArrowDown"===t.key?t.preventDefault():"Tab"===t.key||t.shiftKey||t.ctrlKey||"number"===this.type&&/\D/.test(t.key.toLocaleLowerCase())&&t.preventDefault()},s.prototype.handleSelection=function(e){var t=this.inputs[parseInt(e.toString(),10)];t.value&&t.select()},s.prototype.handleFocus=function(e,i){if(t.addClass([this.inputs[parseInt(e.toString(),10)]],"e-otp-input-focus"),this.shouldFireFocus){var s={element:this.element,event:i,index:e,isInteracted:!this.isFocusInCalled,value:this.value};this.trigger("focus",s)}this.shouldFireFocus=!0},s.prototype.handleBlur=function(e,i){if(t.removeClass([this.inputs[parseInt(e.toString(),10)]],"e-otp-input-focus"),this.shouldFireBlur){var s={element:this.element,event:i,value:this.value,index:e,isInteracted:!this.isFocusOutCalled};this.trigger("blur",s)}this.shouldFireBlur=!0},s.prototype.handlePaste=function(e,t){var i=t.clipboardData;if(i){for(var s=i.getData("text").split(""),n=0,a=e;a<this.inputs.length;a++)s.length>0&&s[parseInt(n.toString(),10)]&&(this.inputs[parseInt(a.toString(),10)].value=s[parseInt(n.toString(),10)],n++,this.updateValueProperty());this.focusIn(),this.triggerValuechanged(t,!0)}},s.prototype.triggerInputEvent=function(e,t){var i=this.value.toString();this.updateValueProperty();var s={element:this.element,event:t,previousValue:i,value:this.value.toString(),index:e};this.trigger("input",s)},s.prototype.triggerValuechanged=function(e,t){if(this.length===this.value.toString().length&&this.previousValue!==this.value){var i={element:this.element,event:e,isInteracted:t||!1,previousValue:this.previousValue,value:this.value};this.trigger("valueChanged",i),this.previousValue=this.value.toString()}},s.prototype.wireEvents=function(e,i){t.EventHandler.add(e,"focus",this.handleFocus.bind(this,i),this),t.EventHandler.add(e,"blur",this.handleBlur.bind(this,i),this),t.EventHandler.add(e,"input",this.handleInputChange.bind(this,i),this),t.EventHandler.add(e,"keydown",this.handleKeyAction.bind(this,i),this),t.EventHandler.add(e,"click",this.handleSelection.bind(this,i),this),t.EventHandler.add(e,"paste",this.handlePaste.bind(this,i),this),t.EventHandler.add(e,"wheel",this.handleWheelEvent,this)},s.prototype.unWireEvents=function(){for(var e=0;e<this.inputs.length;e++){var i=this.inputs[parseInt(e.toString(),10)];t.EventHandler.remove(i,"focus",this.handleFocus.bind(this,e)),t.EventHandler.remove(i,"blur",this.handleBlur.bind(this,e)),t.EventHandler.remove(i,"input",this.handleInputChange.bind(this,e)),t.EventHandler.remove(i,"keydown",this.handleKeyAction.bind(this,e)),t.EventHandler.remove(i,"click",this.handleSelection.bind(this,e)),t.EventHandler.remove(i,"paste",this.handlePaste.bind(this,e)),t.EventHandler.remove(i,"wheel",this.handleWheelEvent)}},s.prototype.updateValueProperty=function(){var e="";this.inputs.forEach(function(t){e+=t.value});var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value="number"==typeof this.value?parseInt(e,10):e,this.isProtectedOnChange=t,this.hiddenInputEle.value=this.value.toString()},s.prototype.updateInputValue=function(e){var t=this.value.toString();this.textTransform&&(t=this.getTransformedText(t));for(var i=e.toString(),s=0;s<this.inputs.length;s++)i.charAt(s)!==t.charAt(s)&&(this.inputs[parseInt(s.toString(),10)].value=t.charAt(s),this.hiddenInputEle.value=t);this.focusIn()},s.prototype.updateCssClass=function(e,t){void 0===t&&(t="");var i,s,n;t&&(n=t.trim().split(" "),(i=this.element.classList).remove.apply(i,n)),e&&(n=e.trim().split(" "),(s=this.element.classList).add.apply(s,n))},s.prototype.updateVariantClass=function(){var e="outlined"===this.stylingMode.toLocaleLowerCase()?"outline":this.stylingMode.toLocaleLowerCase(),i=["underlined","filled","outline"];-1!==i.indexOf(e)&&(t.removeClass([this.element],i.map(function(e){return"e-"+e})),t.addClass([this.element],"e-"+e))},s.prototype.updateAriaLabel=function(e){this.inputs.forEach(function(t,i){var s="Enter Otp Character "+(i+1),n=e&&e.length>0?e[parseInt(i.toString(),10)]||s:s;t.setAttribute("aria-label",n)})},s.prototype.updateDisabledState=function(){var e=this;this.inputs.forEach(function(t){e.disabled?t.setAttribute("disabled","disabled"):t.removeAttribute("disabled")})},s.prototype.setElementAttributes=function(e,i){if(!t.isNullOrUndefined(e))for(var s in e)if("class"===s){var n=e.class.replace(/\s+/g," ").trim();n&&t.addClass([i],n.split(" "))}else"inputmode"===s?this.setInputMode(e[""+s]):"name"===s&&this.element.id===i.id?this.hiddenInputEle.setAttribute(s,e[""+s]):i.setAttribute(s,e[""+s])},s.prototype.setInputMode=function(e){for(var t=0;t<this.inputs.length;t++)this.inputs[parseInt(t.toString(),10)].setAttribute("inputmode",e)},s.prototype.handleLengthChange=function(e,i){if(e-i>0){for(n=i;n<e;n++)this.createOtpInput(n);this.renderSeparator(i,e),this.addPlaceHolder(),this.updateAriaLabel(this.ariaLabels)}else if(e>=0&&this.inputs.length>0){for(n=e;n<this.inputs.length;n++)t.remove(this.inputs[parseInt(n.toString(),10)]);if(this.inputs.splice(e),this.separatorElements.length>0){for(var s=0===e?0:e-1,n=s;n<this.separatorElements.length;n++)t.remove(this.separatorElements[parseInt(n.toString(),10)]);this.separatorElements.splice(s)}}},s.prototype.getModuleName=function(){return"otpinput"},s.prototype.getPersistData=function(){return this.addOnPersist([])},s.prototype.destroy=function(){i.prototype.destroy.call(this),this.unWireEvents(),this.inputs.forEach(function(e){t.remove(e)}),this.separatorElements.forEach(function(e){t.remove(e)}),t.remove(this.hiddenInputEle),t.removeClass([this.element],["e-underlined","e-filled","e-outline","e-rtl"]),this.cssClass&&t.removeClass([this.element],this.cssClass.trim().split(" ")),this.element.removeAttribute("role"),this.inputs=[],this.separatorElements=[],this.hiddenInputEle=null},s.prototype.focusIn=function(){this.isFocusInCalled=!0;for(var e=this.inputs.length-1,t=0;t<this.inputs.length;t++)if(!(this.inputs[parseInt(t.toString(),10)].value.length>0)){e=t;break}this.inputs[parseInt(e.toString(),10)].focus(),this.isFocusInCalled=!1},s.prototype.focusOut=function(){this.isFocusOutCalled=!0,this.inputs.forEach(function(e){e.blur()}),this.isFocusOutCalled=!1},s.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"textTransform":this.updateInputValue(this.value);break;case"value":this.updateInputValue(t.value),this.triggerValuechanged();break;case"placeholder":this.addPlaceHolder();break;case"disabled":this.updateDisabledState();break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"separator":""===t.separator?this.renderSeparator(1,this.inputs.length):this.updateSeparatorValue();break;case"htmlAttributes":this.setElementAttributes(e.htmlAttributes,this.element);break;case"type":this.updateInputType(e.type);break;case"stylingMode":this.updateVariantClass();break;case"ariaLabels":this.updateAriaLabel(e.ariaLabels);break;case"length":this.handleLengthChange(e.length,t.length);break;case"enableRtl":this.element.classList[this.enableRtl?"add":"remove"]("e-rtl");break;case"autoFocus":this.autoFocus&&this.focusIn()}},Ft([t.Property(4)],s.prototype,"length",void 0),Ft([t.Property("")],s.prototype,"value",void 0),Ft([t.Property(e.OtpInputType.Number)],s.prototype,"type",void 0),Ft([t.Property("")],s.prototype,"separator",void 0),Ft([t.Property("")],s.prototype,"placeholder",void 0),Ft([t.Property(e.OtpInputStyle.Outlined)],s.prototype,"stylingMode",void 0),Ft([t.Property(!1)],s.prototype,"disabled",void 0),Ft([t.Property("")],s.prototype,"cssClass",void 0),Ft([t.Property(!1)],s.prototype,"autoFocus",void 0),Ft([t.Property(e.TextTransform.None)],s.prototype,"textTransform",void 0),Ft([t.Property({})],s.prototype,"htmlAttributes",void 0),Ft([t.Property([])],s.prototype,"ariaLabels",void 0),Ft([t.Event()],s.prototype,"created",void 0),Ft([t.Event()],s.prototype,"valueChanged",void 0),Ft([t.Event()],s.prototype,"focus",void 0),Ft([t.Event()],s.prototype,"blur",void 0),Ft([t.Event()],s.prototype,"input",void 0),s=Ft([t.NotifyPropertyChanges],s)}(t.Component),Mt=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Dt=function(e,t,i,s){var n,a=arguments.length,r=a<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(a<3?n(r):a>3?n(t,i,r):n(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Mt(i,e),Dt([t.Property("")],i.prototype,"content",void 0),Dt([t.Property("")],i.prototype,"stopContent",void 0),Dt([t.Property("")],i.prototype,"iconCss",void 0),Dt([t.Property("")],i.prototype,"stopIconCss",void 0),Dt([t.Property("Left")],i.prototype,"iconPosition",void 0),Dt([t.Property(!1)],i.prototype,"isPrimary",void 0),i}(t.ChildProperty),zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Mt(i,e),Dt([t.Property("Start listening")],i.prototype,"content",void 0),Dt([t.Property("Stop listening")],i.prototype,"stopContent",void 0),Dt([t.Property("TopCenter")],i.prototype,"position",void 0),i}(t.ChildProperty);!function(e){e.Inactive="Inactive",e.Listening="Listening",e.Stopped="Stopped"}(e.SpeechToTextState||(e.SpeechToTextState={}));var qt=function(s){function a(e,t){var i=s.call(this,e,t)||this;return i.fullTranscript="",i.isClicked=!1,i.isUserInteracted=!1,i.hasStarted=!1,i}return Mt(a,s),a.prototype.preRender=function(){this.element.id||(this.element.id=t.getUniqueID("e-"+this.getModuleName()))},a.prototype.getDirective=function(){return"EJS-SPEECHTOTEXT"},a.prototype.getModuleName=function(){return"speech-to-text"},a.prototype.getPersistData=function(){return this.addOnPersist([])},a.prototype.render=function(){this.renderSpeechToText(),this.initializeSpeechRecognition(),t.isNullOrUndefined(this.listeningState)||this.handleStateChange(),this.wireEvents()},a.prototype.initializeLocale=function(){this.l10n=new t.L10n(this.getModuleName(),{abortedError:"Speech recognition was aborted.",audioCaptureError:"No microphone detected. Ensure your microphone is connected.",defaultError:"An unknown error occurred.",networkError:"Network error occurred. Check your internet connection.",noSpeechError:"No speech detected. Please speak into the microphone.",notAllowedError:"Microphone access denied. Allow microphone permissions.",serviceNotAllowedError:"Speech recognition service is not allowed in this context.",unsupportedBrowserError:"The browser does not support the SpeechRecognition API.",startAriaLabel:"Press to start speaking and transcribe your words",stopAriaLabel:"Press to stop speaking and end transcription",startTooltipText:"Start listening",stopTooltipText:"Stop listening"},this.locale)},a.prototype.renderSpeechToText=function(){this.initializeLocale();var e=t.isNullOrUndefined(this.buttonSettings.iconCss)||""===this.buttonSettings.iconCss?"e-icons e-listen-icon":this.buttonSettings.iconCss;this.buttonInst=new n.Button({iconCss:e,isPrimary:this.buttonSettings.isPrimary,cssClass:this.updateButtonCssClass(),disabled:this.disabled,content:this.buttonSettings.content,iconPosition:this.buttonSettings.iconPosition,enableRtl:this.enableRtl}),this.buttonInst.appendTo(this.element),this.updateTooltip(),this.updateCssClass(this.cssClass,""),this.updateAriaLabel(),t.isNullOrUndefined(this.htmlAttributes)||this.addHtmlAttributes(this.htmlAttributes)},a.prototype.updateAriaLabel=function(){var e;e=this.htmlAttributes&&this.htmlAttributes["aria-label"]?this.htmlAttributes["aria-label"]:this.micOn?this.l10n.getConstant("stopAriaLabel"):this.l10n.getConstant("startAriaLabel"),this.element.setAttribute("aria-label",e)},a.prototype.updateCssClass=function(e,i){i&&t.removeClass([this.element],i.trim().split(" ")),e&&t.addClass([this.element],e.trim().split(" "))},a.prototype.updateButtonCssClass=function(){var e;return""===(this.isClicked?this.buttonSettings.stopContent:this.buttonSettings.content)&&(e="e-round"),this.micOn&&(e+=" e-listening-state"),e},a.prototype.updateTooltip=function(){this.showTooltip?(this.tooltipSettings&&("Start listening"===this.tooltipSettings.content&&(this.tooltipSettings.content=this.l10n.getConstant("startTooltipText")),"Stop listening"===this.tooltipSettings.stopContent&&(this.tooltipSettings.stopContent=this.l10n.getConstant("stopTooltipText"))),this.tooltipInst=new i.Tooltip({content:this.hasStarted?this.tooltipSettings.stopContent:this.tooltipSettings.content,position:this.tooltipSettings.position,windowCollision:!0,cssClass:this.cssClass?"e-speech-to-text-tooltip "+this.cssClass:"e-speech-to-text-tooltip",opensOn:"Hover",enableRtl:this.enableRtl}),this.tooltipInst.appendTo(this.element)):t.isNullOrUndefined(this.tooltipInst)||(this.tooltipInst.destroy(),this.tooltipInst=null)},a.prototype.handleStateChange=function(){if(!this.disabled)if(this.listeningState===e.SpeechToTextState.Listening)this.micOn=!0,this.startSpeechRecognition();else if(this.listeningState===e.SpeechToTextState.Inactive||this.listeningState===e.SpeechToTextState.Stopped)if(this.micOn)this.micOn=!1,this.stopSpeechRecognition();else{var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.listeningState=e.SpeechToTextState.Inactive,this.isProtectedOnChange=t}},a.prototype.addHtmlAttributes=function(e){if(e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.element.setAttribute(t,e[t])},a.prototype.removeHtmlAttributes=function(e){if(e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.element.removeAttribute(t)},a.prototype.wireEvents=function(){t.EventHandler.add(this.element,"click",this.handleButtonClick,this)},a.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,"click",this.handleButtonClick)},a.prototype.handleButtonClick=function(e){this.isUserInteracted=!0,this.micOn=!this.micOn,this.micOn?this.startSpeechRecognition(e):this.stopSpeechRecognition(e)},a.prototype.triggerUnSupportedError=function(){var e={error:"unsupported-browser",errorMessage:this.l10n.getConstant("unsupportedBrowserError")};this.trigger("onError",e)},a.prototype.initializeSpeechRecognition=function(){var t=this,i=window,s=i.SpeechRecognition||i.webkitSpeechRecognition;if(!s)return void this.triggerUnSupportedError();this.recognition=new s,this.recognition.continuous=!0,this.recognition.lang=this.lang,this.recognition.interimResults=this.allowInterimResults,this.recognition.onstart=function(i){var s=t.isProtectedOnChange;t.isProtectedOnChange=!0,t.transcript=t.fullTranscript="",t.isProtectedOnChange=s;var n={cancel:!1,listeningState:e.SpeechToTextState.Listening,event:i,isInteracted:t.isUserInteracted};t.trigger("onStart",n,function(){n.cancel?(t.recognition.abort(),t.micOn=!1):t.handleStartRecognition()})},this.recognition.onend=function(e){t.hasStarted&&(t.micOn=!1,t.handleStopRecognition(e))},this.recognition.onerror=function(e){var i="";switch(e.error){case"not-allowed":i=t.l10n.getConstant("notAllowedError");break;case"audio-capture":i=t.l10n.getConstant("audioCaptureError");break;case"network":i=t.l10n.getConstant("networkError");break;case"no-speech":i=t.l10n.getConstant("noSpeechError");break;case"aborted":i=t.l10n.getConstant("abortedError");break;case"service-not-allowed":i=t.l10n.getConstant("serviceNotAllowedError");break;default:i=t.l10n.getConstant("defaultError")}var s={event:e,error:e.error,errorMessage:i};t.trigger("onError",s),t.isUserInteracted=!1},this.recognition.onresult=function(e){var i=e.results[e.resultIndex],s="",n=t.isProtectedOnChange;t.isProtectedOnChange=!0,i.isFinal?(t.fullTranscript+=i[0].transcript,t.transcript=t.fullTranscript):(s+=i[0].transcript,t.transcript=t.fullTranscript+s);var a={event:e,transcript:t.transcript,isInterimResult:!i.isFinal};t.trigger("transcriptChanged",a,function(){if(a.transcript!==t.transcript){var e=t.isProtectedOnChange;t.isProtectedOnChange=!0,t.transcript=t.fullTranscript=a.transcript,t.isProtectedOnChange=e}}),t.isProtectedOnChange=n}},a.prototype.handleStartRecognition=function(){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.hasStarted=!0,this.listeningState=e.SpeechToTextState.Listening,t.isNullOrUndefined(this.tooltipInst)||(this.tooltipInst.content=this.tooltipSettings.stopContent),this.updateAriaLabel(),this.isClicked=!0,this.buttonInst.cssClass=this.updateButtonCssClass(),this.buttonInst.content=this.buttonSettings.stopContent;var s=t.isNullOrUndefined(this.buttonSettings.stopIconCss)||""===this.buttonSettings.stopIconCss?"e-icons e-listen-stop":this.buttonSettings.stopIconCss;this.buttonInst.iconCss=s,this.isProtectedOnChange=i},a.prototype.triggerUnSupportedStart=function(t){var i=this,s=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.transcript="",this.isProtectedOnChange=s;var n={cancel:!1,listeningState:e.SpeechToTextState.Listening,event:t,isInteracted:this.isUserInteracted};this.trigger("onStart",n,function(){n.cancel||i.handleStartRecognition()})},a.prototype.startSpeechRecognition=function(e){this.hasStarted||(this.recognition?this.recognition.start():this.triggerUnSupportedStart(e))},a.prototype.stopSpeechRecognition=function(e){this.recognition?this.recognition.stop():this.handleStopRecognition(e)},a.prototype.handleStopRecognition=function(i){if(this.hasStarted){var s=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.listeningState=e.SpeechToTextState.Stopped,t.isNullOrUndefined(this.tooltipInst)||(this.tooltipInst.content=this.tooltipSettings.content),this.updateAriaLabel(),this.isClicked=!1,this.buttonInst.cssClass=this.updateButtonCssClass(),this.buttonInst.content=this.buttonSettings.content;var n={listeningState:e.SpeechToTextState.Stopped,event:i,isInteracted:this.isUserInteracted};this.trigger("onStop",n),this.listeningState=e.SpeechToTextState.Inactive;var a=t.isNullOrUndefined(this.buttonSettings.iconCss)||""===this.buttonSettings.iconCss?"e-icons e-listen-icon":this.buttonSettings.iconCss;this.buttonInst.iconCss=a,this.hasStarted=!1,this.isProtectedOnChange=s}},a.prototype.buttonSettingsChanges=function(e,i){if(e.content===i.content&&e.stopContent===i.stopContent||(this.buttonInst.content=this.hasStarted?this.buttonSettings.stopContent:this.buttonSettings.content,this.buttonInst.cssClass=this.updateButtonCssClass()),e.iconCss!==i.iconCss||e.stopIconCss!==i.stopIconCss){var s=t.isNullOrUndefined(this.buttonSettings.iconCss)||""===this.buttonSettings.iconCss?"e-icons e-listen-icon":this.buttonSettings.iconCss,n=t.isNullOrUndefined(this.buttonSettings.stopIconCss)||""===this.buttonSettings.stopIconCss?"e-icons e-listen-stop":this.buttonSettings.stopIconCss;this.buttonInst.iconCss=this.hasStarted?n:s}e.iconPosition!==i.iconPosition&&(this.buttonInst.iconPosition=this.buttonSettings.iconPosition),e.isPrimary!==i.isPrimary&&(this.buttonInst.isPrimary=this.buttonSettings.isPrimary)},a.prototype.destroyAndNullify=function(e){e&&(e.destroy(),e=null)},a.prototype.destroy=function(){s.prototype.destroy.call(this),this.unWireEvents(),this.destroyAndNullify(this.buttonInst),this.destroyAndNullify(this.tooltipInst),this.recognition=null,this.micOn=null,this.htmlAttributes=this.tooltipSettings=this.buttonSettings=null,this.element.classList.remove("e-rtl")},a.prototype.startListening=function(){this.disabled||this.isClicked||(this.isUserInteracted=!1,this.micOn=!0,this.startSpeechRecognition())},a.prototype.stopListening=function(){!this.disabled&&this.isClicked&&(this.isUserInteracted=!1,this.micOn=!1,this.stopSpeechRecognition())},a.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++)switch(s[i]){case"lang":this.recognition&&(this.recognition.lang=this.lang);break;case"allowInterimResults":this.recognition&&(this.recognition.interimResults=this.allowInterimResults);break;case"buttonSettings":this.buttonSettingsChanges(t.buttonSettings,e.buttonSettings);break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"disabled":this.buttonInst.disabled=this.disabled,this.handleStateChange();break;case"htmlAttributes":this.removeHtmlAttributes(t.htmlAttributes),this.addHtmlAttributes(e.htmlAttributes);break;case"listeningState":this.handleStateChange();break;case"tooltipSettings":case"showTooltip":this.updateTooltip();break;case"transcript":this.transcript=this.fullTranscript=e.transcript;break;case"enableRtl":this.buttonInst.enableRtl=this.tooltipInst.enableRtl=this.enableRtl;break;case"locale":this.l10n.setLocale(this.locale),this.updateAriaLabel(),this.updateTooltip()}},Dt([t.Property("")],a.prototype,"transcript",void 0),Dt([t.Property("")],a.prototype,"lang",void 0),Dt([t.Property(!0)],a.prototype,"allowInterimResults",void 0),Dt([t.Property(!0)],a.prototype,"showTooltip",void 0),Dt([t.Property("Inactive")],a.prototype,"listeningState",void 0),Dt([t.Complex({},Wt)],a.prototype,"buttonSettings",void 0),Dt([t.Complex({},zt)],a.prototype,"tooltipSettings",void 0),Dt([t.Property(!1)],a.prototype,"disabled",void 0),Dt([t.Property("")],a.prototype,"cssClass",void 0),Dt([t.Property({})],a.prototype,"htmlAttributes",void 0),Dt([t.Event()],a.prototype,"created",void 0),Dt([t.Event()],a.prototype,"onStart",void 0),Dt([t.Event()],a.prototype,"onStop",void 0),Dt([t.Event()],a.prototype,"onError",void 0),Dt([t.Event()],a.prototype,"transcriptChanged",void 0),a=Dt([t.NotifyPropertyChanges],a)}(t.Component);return e.AsyncSettings=qe,e.ButtonSettings=Wt,e.ButtonsProps=ze,e.ColorPicker=ht,e.ColorRangeData=ye,e.FilesProp=We,e.FormValidator=Oe,e.LimitData=be,e.MaskUndo=pe,e.MaskedTextBox=me,e.NumericTextBox=ie,e.OtpInput=Vt,e.Rating=Ut,e.Signature=At,e.SignatureBase=kt,e.Slider=xe,e.SmartTextArea=xt,e.SpeechToText=qt,e.TEXTBOX_FOCUS="e-input-focus",e.TextArea=vt,e.TextBox=ut,e.TicksData=ge,e.TooltipData=Ce,e.TooltipSettings=zt,e.Uploader=je,e.applyMask=r,e.bindClearEvent=h,e.containerAttributes=Z,e.createMask=a,e.escapeRegExp=C,e.getMaskedVal=X,e.getVal=_,e.maskInput=q,e.maskInputBlurHandler=E,e.maskInputDropHandler=S,e.maskInputFocusHandler=y,e.maskInputMouseDownHandler=v,e.maskInputMouseUpHandler=g,e.mobileRemoveFunction=k,e.regex=Pe,e.regularExpressions=he,e.setElementValue=z,e.setMaskValue=W,e.strippedValue=m,e.triggerFocus=b,e.unstrippedValue=c,e.unwireEvents=o,e.wireEvents=l,e}({},ej.base,ej.popups,ej.splitbuttons,ej.buttons),this.ejs=ej;
11
11
  //# sourceMappingURL=ej2-inputs.min.js.map