@syncfusion/ej2-inputs 25.2.6 → 26.1.35
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.
- package/.eslintrc.json +3 -2
- package/README.md +13 -0
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +1090 -449
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +1050 -389
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/otp-input.d.ts +4 -0
- package/otp-input.js +4 -0
- package/package.json +10 -10
- package/src/form-validator/form-validator.d.ts +6 -3
- package/src/form-validator/form-validator.js +31 -27
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/input/input.d.ts +2 -2
- package/src/input/input.js +63 -56
- package/src/maskedtextbox/base/mask-base.d.ts +1 -1
- package/src/maskedtextbox/base/mask-base.js +1 -1
- package/src/maskedtextbox/maskedtextbox/maskedtextbox-model.d.ts +2 -2
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.d.ts +1 -2
- package/src/maskedtextbox/maskedtextbox/maskedtextbox.js +6 -7
- package/src/numerictextbox/numerictextbox.d.ts +2 -3
- package/src/numerictextbox/numerictextbox.js +14 -18
- package/src/otp-input/index.d.ts +5 -0
- package/src/otp-input/index.js +4 -0
- package/src/otp-input/otp-input-model.d.ts +142 -0
- package/src/otp-input/otp-input.d.ts +313 -0
- package/src/otp-input/otp-input.js +651 -0
- package/src/rating/rating.d.ts +0 -2
- package/src/rating/rating.js +4 -4
- package/src/slider/slider-model.d.ts +11 -6
- package/src/slider/slider.d.ts +21 -8
- package/src/slider/slider.js +191 -101
- package/src/textarea/textarea-model.d.ts +8 -2
- package/src/textarea/textarea.d.ts +9 -4
- package/src/textarea/textarea.js +17 -21
- package/src/textbox/textbox.d.ts +1 -3
- package/src/textbox/textbox.js +15 -11
- package/src/uploader/uploader.d.ts +1 -3
- package/src/uploader/uploader.js +27 -47
- package/styles/bootstrap-dark.css +1041 -1031
- package/styles/bootstrap-dark.scss +35 -11
- package/styles/bootstrap.css +1040 -1027
- package/styles/bootstrap.scss +35 -11
- package/styles/bootstrap4.css +1097 -1080
- package/styles/bootstrap4.scss +35 -11
- package/styles/bootstrap5-dark.css +1236 -1219
- package/styles/bootstrap5-dark.scss +35 -11
- package/styles/bootstrap5.css +1236 -1219
- package/styles/bootstrap5.scss +35 -11
- package/styles/color-picker/_bds-definition.scss +11 -1
- package/styles/color-picker/_bootstrap-dark-definition.scss +0 -3
- package/styles/color-picker/_bootstrap5-definition.scss +0 -1
- package/styles/color-picker/_bootstrap5.3-definition.scss +132 -0
- package/styles/color-picker/_fabric-dark-definition.scss +0 -3
- package/styles/color-picker/_fluent-definition.scss +0 -1
- package/styles/color-picker/_fluent2-definition.scss +143 -0
- package/styles/color-picker/_fusionnew-definition.scss +0 -1
- package/styles/color-picker/_highcontrast-light-definition.scss +0 -3
- package/styles/color-picker/_layout.scss +69 -34
- package/styles/color-picker/_material-dark-definition.scss +0 -3
- package/styles/color-picker/_material3-definition.scss +0 -1
- package/styles/color-picker/_tailwind-definition.scss +0 -1
- package/styles/color-picker/_theme.scss +13 -2
- package/styles/color-picker/bootstrap-dark.css +54 -20
- package/styles/color-picker/bootstrap.css +54 -20
- package/styles/color-picker/bootstrap4.css +60 -23
- package/styles/color-picker/bootstrap5-dark.css +58 -22
- package/styles/color-picker/bootstrap5.css +58 -22
- package/styles/color-picker/fabric-dark.css +54 -20
- package/styles/color-picker/fabric.css +54 -20
- package/styles/color-picker/fluent-dark.css +54 -20
- package/styles/color-picker/fluent.css +54 -20
- package/styles/color-picker/fluent2.css +2025 -0
- package/styles/color-picker/fluent2.scss +11 -0
- package/styles/color-picker/highcontrast-light.css +54 -20
- package/styles/color-picker/highcontrast.css +54 -20
- package/styles/color-picker/icons/_bootstrap5.3.scss +9 -0
- package/styles/color-picker/icons/_fluent2.scss +9 -0
- package/styles/color-picker/material-dark.css +63 -21
- package/styles/color-picker/material.css +77 -23
- package/styles/color-picker/material3-dark.css +92 -29
- package/styles/color-picker/material3.css +92 -29
- package/styles/color-picker/tailwind-dark.css +54 -21
- package/styles/color-picker/tailwind.css +54 -21
- package/styles/data-form/_bootstrap5.3-definition.scss +41 -0
- package/styles/data-form/_fluent2-definition.scss +41 -0
- package/styles/data-form/_layout.scss +1 -4
- package/styles/data-form/_material3-definition.scss +0 -7
- package/styles/data-form/bootstrap-dark.css +47 -59
- package/styles/data-form/bootstrap.css +47 -59
- package/styles/data-form/bootstrap4.css +47 -59
- package/styles/data-form/bootstrap5-dark.css +47 -59
- package/styles/data-form/bootstrap5.css +47 -59
- package/styles/data-form/fabric-dark.css +47 -59
- package/styles/data-form/fabric.css +47 -59
- package/styles/data-form/fluent-dark.css +47 -59
- package/styles/data-form/fluent.css +47 -59
- package/styles/data-form/fluent2.css +1266 -0
- package/styles/data-form/fluent2.scss +3 -0
- package/styles/data-form/highcontrast-light.css +47 -59
- package/styles/data-form/highcontrast.css +47 -59
- package/styles/data-form/material-dark.css +47 -59
- package/styles/data-form/material.css +47 -59
- package/styles/data-form/material3-dark.css +48 -60
- package/styles/data-form/material3.css +48 -60
- package/styles/data-form/tailwind-dark.css +47 -59
- package/styles/data-form/tailwind.css +47 -59
- package/styles/fabric-dark.css +1015 -988
- package/styles/fabric-dark.scss +35 -11
- package/styles/fabric.css +1015 -988
- package/styles/fabric.scss +35 -11
- package/styles/fluent-dark.css +1081 -1044
- package/styles/fluent-dark.scss +35 -11
- package/styles/fluent.css +1081 -1044
- package/styles/fluent.scss +35 -11
- package/styles/fluent2.css +13375 -0
- package/styles/fluent2.scss +35 -0
- package/styles/highcontrast-light.css +1099 -1179
- package/styles/highcontrast-light.scss +35 -11
- package/styles/highcontrast.css +1096 -1176
- package/styles/highcontrast.scss +35 -11
- package/styles/input/_bds-definition.scss +2 -2
- package/styles/input/_bootstrap5.3-definition.scss +336 -0
- package/styles/input/_fluent2-definition.scss +769 -0
- package/styles/input/_layout.scss +1242 -1939
- package/styles/input/_material-dark-definition.scss +4 -3
- package/styles/input/_material-definition.scss +4 -3
- package/styles/input/_material3-definition.scss +4 -9
- package/styles/input/_theme.scss +929 -1794
- package/styles/input/bootstrap-dark.css +489 -773
- package/styles/input/bootstrap.css +489 -773
- package/styles/input/bootstrap4.css +484 -770
- package/styles/input/bootstrap5-dark.css +488 -787
- package/styles/input/bootstrap5.css +488 -787
- package/styles/input/fabric-dark.css +466 -740
- package/styles/input/fabric.css +466 -740
- package/styles/input/fluent-dark.css +494 -775
- package/styles/input/fluent.css +494 -775
- package/styles/input/fluent2.css +10185 -0
- package/styles/input/fluent2.scss +4 -0
- package/styles/input/highcontrast-light.css +530 -914
- package/styles/input/highcontrast.css +530 -914
- package/styles/input/icons/_bootstrap5.3.scss +17 -0
- package/styles/input/icons/_fluent2.scss +17 -0
- package/styles/input/material-dark.css +1883 -2791
- package/styles/input/material.css +1895 -2791
- package/styles/input/material3-dark.css +1883 -2773
- package/styles/input/material3.css +1883 -2773
- package/styles/input/tailwind-dark.css +464 -749
- package/styles/input/tailwind.css +464 -749
- package/styles/maskedtextbox/_bootstrap5.3-definition.scss +7 -0
- package/styles/maskedtextbox/_fluent2-definition.scss +7 -0
- package/styles/maskedtextbox/_theme.scss +1 -6
- package/styles/maskedtextbox/bootstrap-dark.css +1 -4
- package/styles/maskedtextbox/bootstrap4.css +1 -4
- package/styles/maskedtextbox/bootstrap5-dark.css +1 -4
- package/styles/maskedtextbox/bootstrap5.css +1 -4
- package/styles/maskedtextbox/fabric-dark.css +1 -4
- package/styles/maskedtextbox/fabric.css +1 -4
- package/styles/maskedtextbox/fluent2.css +1244 -0
- package/styles/maskedtextbox/fluent2.scss +4 -0
- package/styles/maskedtextbox/highcontrast-light.css +1 -4
- package/styles/maskedtextbox/highcontrast.css +1 -4
- package/styles/maskedtextbox/material-dark.css +10 -5
- package/styles/maskedtextbox/material.css +24 -7
- package/styles/maskedtextbox/material3-dark.css +25 -8
- package/styles/maskedtextbox/material3.css +25 -8
- package/styles/maskedtextbox/tailwind-dark.css +1 -4
- package/styles/maskedtextbox/tailwind.css +1 -4
- package/styles/material-dark.css +2497 -3126
- package/styles/material-dark.scss +35 -11
- package/styles/material.css +2395 -3052
- package/styles/material.scss +35 -11
- package/styles/material3-dark.css +2656 -3265
- package/styles/material3-dark.scss +35 -11
- package/styles/material3.css +2656 -3265
- package/styles/material3.scss +35 -11
- package/styles/numerictextbox/_bootstrap5.3-definition.scss +3 -0
- package/styles/numerictextbox/_fluent2-definition.scss +3 -0
- package/styles/numerictextbox/bootstrap-dark.css +2 -1
- package/styles/numerictextbox/bootstrap.css +2 -1
- package/styles/numerictextbox/fluent2.css +1261 -0
- package/styles/numerictextbox/fluent2.scss +5 -0
- package/styles/numerictextbox/icons/_bootstrap5.3.scss +11 -0
- package/styles/numerictextbox/icons/_fluent2.scss +11 -0
- package/styles/numerictextbox/material-dark.css +9 -1
- package/styles/numerictextbox/material.css +23 -3
- package/styles/numerictextbox/material3-dark.css +24 -4
- package/styles/numerictextbox/material3.css +24 -4
- package/styles/otp-input/_all.scss +2 -0
- package/styles/otp-input/_bds-definition.scss +58 -0
- package/styles/otp-input/_bootstrap-dark-definition.scss +58 -0
- package/styles/otp-input/_bootstrap-definition.scss +58 -0
- package/styles/otp-input/_bootstrap4-definition.scss +58 -0
- package/styles/otp-input/_bootstrap5-dark-definition.scss +1 -0
- package/styles/otp-input/_bootstrap5-definition.scss +58 -0
- package/styles/otp-input/_bootstrap5.3-definition.scss +58 -0
- package/styles/otp-input/_fabric-dark-definition.scss +58 -0
- package/styles/otp-input/_fabric-definition.scss +58 -0
- package/styles/otp-input/_fluent-dark-definition.scss +1 -0
- package/styles/otp-input/_fluent-definition.scss +58 -0
- package/styles/otp-input/_fluent2-definition.scss +58 -0
- package/styles/otp-input/_fusionnew-definition.scss +58 -0
- package/styles/otp-input/_highcontrast-definition.scss +58 -0
- package/styles/otp-input/_highcontrast-light-definition.scss +58 -0
- package/styles/otp-input/_layout.scss +158 -0
- package/styles/otp-input/_material-dark-definition.scss +58 -0
- package/styles/otp-input/_material-definition.scss +58 -0
- package/styles/otp-input/_material3-dark-definition.scss +1 -0
- package/styles/otp-input/_material3-definition.scss +58 -0
- package/styles/otp-input/_tailwind-dark-definition.scss +1 -0
- package/styles/otp-input/_tailwind-definition.scss +58 -0
- package/styles/otp-input/_theme.scss +67 -0
- package/styles/otp-input/bootstrap-dark.css +225 -0
- package/styles/otp-input/bootstrap-dark.scss +3 -0
- package/styles/otp-input/bootstrap.css +225 -0
- package/styles/otp-input/bootstrap.scss +3 -0
- package/styles/otp-input/bootstrap4.css +225 -0
- package/styles/otp-input/bootstrap4.scss +3 -0
- package/styles/otp-input/bootstrap5-dark.css +225 -0
- package/styles/otp-input/bootstrap5-dark.scss +3 -0
- package/styles/otp-input/bootstrap5.css +225 -0
- package/styles/otp-input/bootstrap5.scss +3 -0
- package/styles/otp-input/fabric-dark.css +225 -0
- package/styles/otp-input/fabric-dark.scss +3 -0
- package/styles/otp-input/fabric.css +225 -0
- package/styles/otp-input/fabric.scss +3 -0
- package/styles/otp-input/fluent-dark.css +225 -0
- package/styles/otp-input/fluent-dark.scss +3 -0
- package/styles/otp-input/fluent.css +225 -0
- package/styles/otp-input/fluent.scss +3 -0
- package/styles/otp-input/fluent2.css +1259 -0
- package/styles/otp-input/fluent2.scss +3 -0
- package/styles/otp-input/highcontrast-light.css +225 -0
- package/styles/otp-input/highcontrast-light.scss +3 -0
- package/styles/otp-input/highcontrast.css +225 -0
- package/styles/otp-input/highcontrast.scss +3 -0
- package/styles/otp-input/material-dark.css +225 -0
- package/styles/otp-input/material-dark.scss +3 -0
- package/styles/otp-input/material.css +225 -0
- package/styles/otp-input/material.scss +3 -0
- package/styles/otp-input/material3-dark.css +280 -0
- package/styles/otp-input/material3-dark.scss +4 -0
- package/styles/otp-input/material3.css +336 -0
- package/styles/otp-input/material3.scss +4 -0
- package/styles/otp-input/tailwind-dark.css +225 -0
- package/styles/otp-input/tailwind-dark.scss +3 -0
- package/styles/otp-input/tailwind.css +225 -0
- package/styles/otp-input/tailwind.scss +3 -0
- package/styles/rating/_bds-definition.scss +2 -2
- package/styles/rating/_bootstrap-dark-definition.scss +2 -2
- package/styles/rating/_bootstrap-definition.scss +2 -2
- package/styles/rating/_bootstrap4-definition.scss +2 -2
- package/styles/rating/_bootstrap5-definition.scss +2 -2
- package/styles/rating/_bootstrap5.3-definition.scss +47 -0
- package/styles/rating/_fabric-dark-definition.scss +2 -2
- package/styles/rating/_fabric-definition.scss +2 -2
- package/styles/rating/_fluent-definition.scss +2 -2
- package/styles/rating/_fluent2-definition.scss +47 -0
- package/styles/rating/_fusionnew-definition.scss +2 -2
- package/styles/rating/_highcontrast-definition.scss +2 -2
- package/styles/rating/_highcontrast-light-definition.scss +2 -2
- package/styles/rating/_layout.scss +22 -46
- package/styles/rating/_material-dark-definition.scss +2 -2
- package/styles/rating/_material-definition.scss +2 -2
- package/styles/rating/_material3-definition.scss +2 -2
- package/styles/rating/_tailwind-definition.scss +2 -2
- package/styles/rating/_theme.scss +1 -1
- package/styles/rating/bootstrap-dark.css +35 -9
- package/styles/rating/bootstrap.css +35 -9
- package/styles/rating/bootstrap4.css +35 -9
- package/styles/rating/bootstrap5-dark.css +35 -9
- package/styles/rating/bootstrap5.css +35 -9
- package/styles/rating/fabric-dark.css +35 -9
- package/styles/rating/fabric.css +35 -9
- package/styles/rating/fluent-dark.css +35 -9
- package/styles/rating/fluent.css +35 -9
- package/styles/rating/fluent2.css +1349 -0
- package/styles/rating/fluent2.scss +4 -0
- package/styles/rating/highcontrast-light.css +35 -9
- package/styles/rating/highcontrast.css +35 -9
- package/styles/rating/material-dark.css +35 -9
- package/styles/rating/material.css +35 -9
- package/styles/rating/material3-dark.css +35 -10
- package/styles/rating/material3.css +35 -10
- package/styles/rating/tailwind-dark.css +34 -9
- package/styles/rating/tailwind.css +34 -9
- package/styles/signature/_bootstrap5.3-definition.scss +3 -0
- package/styles/signature/_fluent2-definition.scss +3 -0
- package/styles/signature/fluent2.css +1043 -0
- package/styles/signature/fluent2.scss +3 -0
- package/styles/signature/material3-dark.css +1 -1
- package/styles/signature/material3.css +1 -1
- package/styles/slider/_bds-definition.scss +1 -0
- package/styles/slider/_bootstrap-dark-definition.scss +1 -0
- package/styles/slider/_bootstrap-definition.scss +1 -0
- package/styles/slider/_bootstrap4-definition.scss +1 -1
- package/styles/slider/_bootstrap5-definition.scss +1 -0
- package/styles/slider/_bootstrap5.3-definition.scss +91 -0
- package/styles/slider/_fluent-definition.scss +2 -0
- package/styles/slider/_fluent2-definition.scss +102 -0
- package/styles/slider/_highcontrast-definition.scss +1 -2
- package/styles/slider/_layout.scss +1623 -1986
- package/styles/slider/_material-dark-definition.scss +2 -2
- package/styles/slider/_material-definition.scss +4 -4
- package/styles/slider/_material3-definition.scss +1 -4
- package/styles/slider/_tailwind-definition.scss +1 -0
- package/styles/slider/_theme.scss +92 -120
- package/styles/slider/bootstrap-dark.css +132 -140
- package/styles/slider/bootstrap.css +132 -140
- package/styles/slider/bootstrap4.css +192 -193
- package/styles/slider/bootstrap5-dark.css +284 -270
- package/styles/slider/bootstrap5.css +284 -270
- package/styles/slider/fabric-dark.css +131 -131
- package/styles/slider/fabric.css +131 -131
- package/styles/slider/fluent-dark.css +170 -155
- package/styles/slider/fluent.css +170 -155
- package/styles/slider/fluent2.css +1642 -0
- package/styles/slider/fluent2.scss +5 -0
- package/styles/slider/highcontrast-light.css +157 -154
- package/styles/slider/highcontrast.css +155 -152
- package/styles/slider/material-dark.css +306 -298
- package/styles/slider/material.css +304 -296
- package/styles/slider/material3-dark.css +577 -535
- package/styles/slider/material3.css +577 -535
- package/styles/slider/tailwind-dark.css +256 -267
- package/styles/slider/tailwind.css +256 -267
- package/styles/tailwind-dark.css +1203 -1201
- package/styles/tailwind-dark.scss +35 -11
- package/styles/tailwind.css +1205 -1203
- package/styles/tailwind.scss +35 -11
- package/styles/textarea/_bootstrap5.3-definition.scss +1 -0
- package/styles/textarea/_fluent2-definition.scss +1 -0
- package/styles/textarea/_layout.scss +1 -1
- package/styles/textarea/bootstrap-dark.css +3 -2
- package/styles/textarea/bootstrap.css +3 -2
- package/styles/textarea/bootstrap4.css +3 -2
- package/styles/textarea/bootstrap5-dark.css +3 -2
- package/styles/textarea/bootstrap5.css +3 -2
- package/styles/textarea/fabric-dark.css +3 -2
- package/styles/textarea/fabric.css +3 -2
- package/styles/textarea/fluent-dark.css +3 -2
- package/styles/textarea/fluent.css +3 -2
- package/styles/textarea/fluent2.css +1247 -0
- package/styles/textarea/fluent2.scss +5 -0
- package/styles/textarea/highcontrast-light.css +3 -2
- package/styles/textarea/highcontrast.css +3 -2
- package/styles/textarea/material-dark.css +12 -3
- package/styles/textarea/material.css +26 -5
- package/styles/textarea/material3-dark.css +27 -6
- package/styles/textarea/material3.css +27 -6
- package/styles/textarea/tailwind-dark.css +3 -2
- package/styles/textarea/tailwind.css +3 -2
- package/styles/textbox/_bootstrap5.3-definition.scss +4 -0
- package/styles/textbox/_fluent2-definition.scss +4 -0
- package/styles/textbox/fluent2.css +1241 -0
- package/styles/textbox/fluent2.scss +4 -0
- package/styles/textbox/material-dark.css +9 -1
- package/styles/textbox/material.css +23 -3
- package/styles/textbox/material3-dark.css +24 -4
- package/styles/textbox/material3.css +24 -4
- package/styles/uploader/_bootstrap5.3-definition.scss +216 -0
- package/styles/uploader/_fluent2-definition.scss +232 -0
- package/styles/uploader/_layout.scss +5 -2
- package/styles/uploader/_material3-definition.scss +0 -24
- package/styles/uploader/_theme.scss +7 -4
- package/styles/uploader/bootstrap-dark.css +47 -12
- package/styles/uploader/bootstrap.css +47 -12
- package/styles/uploader/bootstrap4.css +47 -12
- package/styles/uploader/bootstrap5-dark.css +47 -12
- package/styles/uploader/bootstrap5.css +47 -12
- package/styles/uploader/fabric-dark.css +47 -12
- package/styles/uploader/fabric.css +47 -12
- package/styles/uploader/fluent-dark.css +47 -12
- package/styles/uploader/fluent.css +47 -12
- package/styles/uploader/fluent2.css +1880 -0
- package/styles/uploader/fluent2.scss +6 -0
- package/styles/uploader/highcontrast-light.css +47 -12
- package/styles/uploader/highcontrast.css +47 -12
- package/styles/uploader/icons/_bootstrap5.3.scss +34 -0
- package/styles/uploader/icons/_fluent2.scss +34 -0
- package/styles/uploader/material-dark.css +47 -12
- package/styles/uploader/material.css +47 -12
- package/styles/uploader/material3-dark.css +49 -13
- package/styles/uploader/material3.css +49 -13
- package/styles/uploader/tailwind-dark.css +49 -13
- package/styles/uploader/tailwind.css +49 -13
- package/CHANGELOG.md +0 -1313
package/dist/ej2-inputs.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-inputs.min.js
|
|
3
|
-
* version :
|
|
3
|
+
* version : 26.1.35
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionSplitbuttons"],t):"object"==typeof exports?exports.SyncfusionInputs=t(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons")):e.SyncfusionInputs=t(e.SyncfusionBase,e.SyncfusionPopups,e.SyncfusionSplitbuttons)}(this,function(e,t,i){return function(e){function t(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,s){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=21)}([function(t,i){t.exports=e},function(e,t,i){"use strict";i.d(t,"c",function(){return r}),i.d(t,"b",function(){return l}),i.d(t,"a",function(){return s});var s,n=i(0),a=(i.n(n),{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"}),r=["title","style","class"],l="e-input-focus";!function(e){function t(e,t){e.element.__eventHandlers={};var s=i.i(n.isNullOrUndefined)(t)?n.createElement:t,r={container:null,buttons:[],clearButton:null};if(ce=e.floatLabelType,me=e.bindClearAction,i.i(n.isNullOrUndefined)(e.floatLabelType)||"Never"===e.floatLabelType?(r.container=U(e,a.INPUTGROUP,a.INPUTCUSTOMTAG,"span",s),e.element.parentNode.insertBefore(r.container,e.element),i.i(n.addClass)([e.element],a.INPUT),r.container.appendChild(e.element)):y(e,r,s),h(e),i.i(n.isNullOrUndefined)(e.properties)||i.i(n.isNullOrUndefined)(e.properties.showClearButton)||!e.properties.showClearButton||(_(e.properties.showClearButton,e.element,r,!0,s),r.clearButton.setAttribute("role","button"),r.container.classList.contains(a.FLOATINPUT)&&i.i(n.addClass)([r.container],a.INPUTGROUP)),!i.i(n.isNullOrUndefined)(e.buttons))for(var l=0;l<e.buttons.length;l++)r.buttons.push(ae(e.buttons[l],r.container,s));return i.i(n.isNullOrUndefined)(e.element)||"TEXTAREA"!==e.element.tagName||i.i(n.addClass)([r.container],a.TEXTAREA),re(r.container,e.element),r=E(e,r),Z(r.container,s),pe=r,r}function s(t){var i=T(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 l(t){var i=T(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 o(e){u(e.floatLabelType,e.element)}function h(e){u(e.floatLabelType,e.element);var t=function(){return s(e)},i=function(){return l(e)},n=function(){return o(e)};e.element.addEventListener("focus",t),e.element.addEventListener("blur",i),e.element.addEventListener("input",n),e.element.__eventHandlers.inputFocusHandler={focusHandler:t},e.element.__eventHandlers.inputBlurHandler={blurHandler:i},e.element.__eventHandlers.inputHandler={inputHandler:n}}function d(e){if(!i.i(n.isNullOrUndefined)(e.element)&&!(i.i(n.isNullOrUndefined)(e.element.__eventHandlers)||i.i(n.isNullOrUndefined)(e.element.__eventHandlers.inputFocusHandler)||i.i(n.isNullOrUndefined)(e.element.__eventHandlers.inputBlurHandler)||i.i(n.isNullOrUndefined)(e.element.__eventHandlers.inputHandler))){var t=e.element.__eventHandlers.inputFocusHandler.focusHandler,s=e.element.__eventHandlers.inputBlurHandler.blurHandler,a=e.element.__eventHandlers.inputHandler.inputHandler;e.element.removeEventListener("focus",t),e.element.removeEventListener("blur",s),e.element.removeEventListener("input",a),delete e.element.__eventHandlers.inputFocusHandler,delete e.element.__eventHandlers.inputBlurHandler,delete e.element.__eventHandlers.inputHandler}}function u(e,t){var s=t.value,a=t.parentElement,r=a.parentElement;""===s||i.i(n.isNullOrUndefined)(s)?"Always"!==e&&(a&&a.classList.contains("e-input-group")?a.classList.remove("e-valid-input"):r&&r.classList.contains("e-input-group")&&r.classList.remove("e-valid-input")):a&&a.classList.contains("e-input-group")?a.classList.add("e-valid-input"):r&&r.classList.contains("e-input-group")&&r.classList.add("e-valid-input")}function c(){var e=T(this).getElementsByClassName("e-float-text")[0];i.i(n.isNullOrUndefined)(e)||(i.i(n.addClass)([e],a.LABELTOP),e.classList.contains(a.LABELBOTTOM)&&i.i(n.removeClass)([e],a.LABELBOTTOM))}function p(){var e=T(this);if(e.getElementsByTagName("textarea")[0]?""===e.getElementsByTagName("textarea")[0].value:""===e.getElementsByTagName("input")[0].value){var t=e.getElementsByClassName("e-float-text")[0];i.i(n.isNullOrUndefined)(t)||(t.classList.contains(a.LABELTOP)&&i.i(n.removeClass)([t],a.LABELTOP),i.i(n.addClass)([t],a.LABELBOTTOM))}}function m(e){e.addEventListener("focus",c),e.addEventListener("blur",p)}function v(e){i.i(n.isNullOrUndefined)(e)||(e.removeEventListener("focus",c),e.removeEventListener("blur",p))}function f(e){B(e.element,e.floatLabelType)}function g(e){B(e.element,e.floatLabelType)}function y(e,t,s){var r=i.i(n.isNullOrUndefined)(s)?n.createElement:s;"Auto"===e.floatLabelType&&m(e.element),i.i(n.isNullOrUndefined)(t.container)?(t.container=U(e,a.FLOATINPUT,a.FLOATCUSTOMTAG,"div",r),t.container.classList.add(a.INPUTGROUP),e.element.parentNode&&e.element.parentNode.insertBefore(t.container,e.element)):(i.i(n.isNullOrUndefined)(e.customTag)||t.container.classList.add(a.FLOATCUSTOMTAG),t.container.classList.add(a.FLOATINPUT));var l=r("span",{className:a.FLOATLINE}),o=r("label",{className:a.FLOATTEXT});if(i.i(n.isNullOrUndefined)(e.element.id)||""===e.element.id||(o.id="label_"+e.element.id.replace(/ /g,"_"),i.i(n.attributes)(e.element,{"aria-labelledby":o.id})),i.i(n.isNullOrUndefined)(e.element.placeholder)||""===e.element.placeholder||(o.innerText=R(e.element.placeholder),e.element.removeAttribute("placeholder")),i.i(n.isNullOrUndefined)(e.properties)||i.i(n.isNullOrUndefined)(e.properties.placeholder)||""===e.properties.placeholder||(o.innerText=R(e.properties.placeholder)),o.innerText||t.container.classList.add(a.NOFLOATLABEL),t.container.classList.contains("e-float-icon-left")){var h=t.container.querySelector(".e-input-in-wrap");h.appendChild(e.element),h.appendChild(l),h.appendChild(o)}else t.container.appendChild(e.element),t.container.appendChild(l),t.container.appendChild(o);if(S(e.element.value,o),"Always"===e.floatLabelType&&(o.classList.contains(a.LABELBOTTOM)&&i.i(n.removeClass)([o],a.LABELBOTTOM),i.i(n.addClass)([o],a.LABELTOP)),"Auto"===e.floatLabelType){var d=function(){return f(e)},u=function(){return g(e)};e.element.addEventListener("input",d),e.element.addEventListener("blur",u),e.element.__eventHandlers.floatInputHandler={inputFloatHandler:d},e.element.__eventHandlers.floatBlurHandler={blurFloatHandler:u}}else b(e);i.i(n.isNullOrUndefined)(e.element.getAttribute("id"))||o.setAttribute("for",e.element.getAttribute("id"))}function b(e){if(!(i.i(n.isNullOrUndefined)(e.element)||i.i(n.isNullOrUndefined)(e.element.__eventHandlers)||i.i(n.isNullOrUndefined)(e.element.__eventHandlers.floatInputHandler)||i.i(n.isNullOrUndefined)(e.element.__eventHandlers.floatBlurHandler))){var t=e.element.__eventHandlers.floatInputHandler.inputFloatHandler,s=e.element.__eventHandlers.floatBlurHandler.blurFloatHandler;e.element.removeEventListener("input",t),e.element.removeEventListener("blur",s),delete e.element.__eventHandlers.floatInputHandler,delete e.element.__eventHandlers.floatBlurHandler}}function C(e,t){"Always"===e&&t.classList.contains("e-outline")&&t.classList.add("e-valid-input")}function E(e,t){if(!i.i(n.isNullOrUndefined)(e.properties))for(var s=0,a=Object.keys(e.properties);s<a.length;s++){var r=a[s];switch(r){case"cssClass":F(e.properties.cssClass,[t.container]),C(e.floatLabelType,t.container);break;case"enabled":q(e.properties.enabled,e.element,e.floatLabelType,t.container);break;case"enableRtl":W(e.properties.enableRtl,[t.container]);break;case"placeholder":D(e.properties.placeholder,e.element);break;case"readonly":z(e.properties.readonly,e.element)}}return t}function x(e,t,s){i.i(n.isNullOrUndefined)(t)||(e&&!s?i.i(n.removeClass)([t],a.CLEARICONHIDE):i.i(n.addClass)([t],a.CLEARICONHIDE))}function S(e,t,s){if(void 0===s&&(s=null),e)i.i(n.addClass)([t],a.LABELTOP),t.classList.contains(a.LABELBOTTOM)&&i.i(n.removeClass)([t],a.LABELBOTTOM);else{(null==s||s!==document.activeElement)&&(t.classList.contains(a.LABELTOP)&&i.i(n.removeClass)([t],a.LABELTOP),i.i(n.addClass)([t],a.LABELBOTTOM))}}function T(e){var t=i.i(n.isNullOrUndefined)(e.parentNode)?e:e.parentNode;return t&&t.classList.contains("e-input-in-wrap")&&(t=t.parentNode),t}function k(e,t,s,r){var l=i.i(n.isNullOrUndefined)(r)?n.createElement:r,o=l("span",{className:a.CLEARICON}),h=t.container;if(i.i(n.isNullOrUndefined)(s)){(t.container.classList.contains(a.FLOATINPUT)?t.container.querySelector("."+a.FLOATTEXT):e).insertAdjacentElement("afterend",o)}else h.appendChild(o);return i.i(n.addClass)([o],a.CLEARICONHIDE),w(e,o,h),o.setAttribute("aria-label","close"),o}function L(e,t,s){t.classList.contains(a.DISABLE)||t.readOnly||(e.preventDefault(),t!==document.activeElement&&t.focus(),t.value="",i.i(n.addClass)([s],a.CLEARICONHIDE))}function P(e,t){x(e.value,t)}function O(e,t){x(e.value,t,e.readOnly)}function H(e,t){setTimeout(function(){i.i(n.isNullOrUndefined)(t)||(i.i(n.addClass)([t],a.CLEARICONHIDE),t=!i.i(n.isNullOrUndefined)(e)&&e.classList.contains("e-combobox")?null:t)},200)}function w(e,t,i){if(void 0===me||me){var s=function(i){return L(i,e,t)};t.addEventListener("click",s),e.__eventHandlers.clearClickHandler={clickHandlerEvent:s}}var n=function(){return P(e,t)},a=function(){return O(e,t)},r=function(){return H(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 N(e,t){if(!i.i(n.isNullOrUndefined)(e)&&!i.i(n.isNullOrUndefined)(e.__eventHandlers)){if(!i.i(n.isNullOrUndefined)(e.__eventHandlers.clearClickHandler)){var s=e.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===me||me)&&(i.i(n.isNullOrUndefined)(t)||t.removeEventListener("click",s)),delete e.__eventHandlers.clearClickHandler}if(!i.i(n.isNullOrUndefined)(e.__eventHandlers.clearInputHandler)&&!i.i(n.isNullOrUndefined)(e.__eventHandlers.clearFocusHandler)&&!i.i(n.isNullOrUndefined)(e.__eventHandlers.clearBlurHandler)){var a=e.__eventHandlers.clearInputHandler.inputHandlerEvent,r=e.__eventHandlers.clearFocusHandler.focusHandlerEvent,l=e.__eventHandlers.clearBlurHandler.blurHandlerEvent;e.removeEventListener("input",a),e.removeEventListener("focus",r),e.removeEventListener("blur",l),delete e.__eventHandlers.clearInputHandler,delete e.__eventHandlers.clearFocusHandler,delete e.__eventHandlers.clearBlurHandler}}}function A(e,t){void 0===t&&(t=null),d(e),"Auto"===e.floatLabelType&&b(e),e.properties.showClearButton&&N(e.element,t),i.i(n.isNullOrUndefined)(e.buttons)||J(!1,null,e.buttons),v(e.element),i.i(n.isNullOrUndefined)(e.element)||delete e.element.__eventHandlers,pe=null}function B(e,t){if(T(e).classList.contains(a.FLOATINPUT)&&"Auto"===t){var i=T(e).getElementsByClassName("e-float-text")[0];S(e.value,i,e)}}function U(e,t,s,a,r){var l,o=i.i(n.isNullOrUndefined)(r)?n.createElement:r;return i.i(n.isNullOrUndefined)(e.customTag)?l=o(a,{className:t}):(l=o(e.customTag,{className:t}),l.classList.add(s)),l.classList.add("e-control-wrapper"),l}function R(e){var t="";if(!i.i(n.isNullOrUndefined)(e)&&""!==e){var s=document.createElement("span");s.innerHTML='<input placeholder="'+e+'"/>';t=s.children[0].placeholder}return t}function V(e,t,s,r){if(t.value=e,"Never"!==s&&M(t,t.parentElement),i.i(n.isNullOrUndefined)(s)||"Auto"!==s||B(t,s),!i.i(n.isNullOrUndefined)(r)&&r){var l=T(t);if(!i.i(n.isNullOrUndefined)(l)){var o=l.getElementsByClassName(a.CLEARICON)[0];i.i(n.isNullOrUndefined)(o)||(t.value&&!i.i(n.isNullOrUndefined)(l)&&l.classList.contains("e-input-focus")?i.i(n.removeClass)([o],a.CLEARICONHIDE):i.i(n.addClass)([o],a.CLEARICONHIDE))}}u(s,t)}function F(e,t,s){i.i(n.isNullOrUndefined)(s)||""===s||i.i(n.removeClass)(t,s.split(" ")),i.i(n.isNullOrUndefined)(e)||""===e||i.i(n.addClass)(t,e.split(" "))}function M(e,t,s){if("multiselect"===s||Q(e)){var a="multiselect"===s?e:e.clientWidth-parseInt(getComputedStyle(e,null).getPropertyValue("padding-left"),10);i.i(n.isNullOrUndefined)(t.getElementsByClassName("e-float-text-content")[0])||(t.getElementsByClassName("e-float-text-content")[0].classList.contains("e-float-text-overflow")&&t.getElementsByClassName("e-float-text-content")[0].classList.remove("e-float-text-overflow"),(a<t.getElementsByClassName("e-float-text-content")[0].clientWidth||a===t.getElementsByClassName("e-float-text-content")[0].clientWidth)&&t.getElementsByClassName("e-float-text-content")[0].classList.add("e-float-text-overflow"))}}function I(e,t){"number"==typeof e?t.style.width=i.i(n.formatUnit)(e):"string"==typeof e&&(t.style.width=e.match(/px|%|em/)?e:i.i(n.formatUnit)(e)),M(t.firstChild,t)}function D(e,t){e=R(e);var s=T(t);s.classList.contains(a.FLOATINPUT)?i.i(n.isNullOrUndefined)(e)||""===e?(s.classList.add(a.NOFLOATLABEL),s.getElementsByClassName("e-float-text-content")[0]?s.getElementsByClassName(a.FLOATTEXT)[0].children[0].textContent="":s.getElementsByClassName(a.FLOATTEXT)[0].textContent=""):(s.getElementsByClassName("e-float-text-content")[0]?s.getElementsByClassName(a.FLOATTEXT)[0].children[0].textContent=e:s.getElementsByClassName(a.FLOATTEXT)[0].textContent=e,s.classList.remove(a.NOFLOATLABEL),t.removeAttribute("placeholder")):i.i(n.isNullOrUndefined)(e)||""===e?t.removeAttribute("placeholder"):i.i(n.attributes)(t,{placeholder:e})}function z(e,t,s){e?i.i(n.attributes)(t,{readonly:""}):t.removeAttribute("readonly"),i.i(n.isNullOrUndefined)(s)||B(t,s)}function W(e,t){e?i.i(n.addClass)(t,a.RTL):i.i(n.removeClass)(t,a.RTL)}function q(e,t,s,r){var l={disabled:"","aria-disabled":"true"},o=!i.i(n.isNullOrUndefined)(r);e?(t.classList.remove(a.DISABLE),j(l,t),o&&i.i(n.removeClass)([r],a.DISABLE)):(t.classList.add(a.DISABLE),X(l,t),o&&i.i(n.addClass)([r],a.DISABLE)),i.i(n.isNullOrUndefined)(s)||B(t,s)}function _(e,t,s,a,r){var l=i.i(n.isNullOrUndefined)(r)?n.createElement:r;e?s.clearButton=k(t,s,a,l):(i.i(n.remove)(s.clearButton),s.clearButton=null)}function j(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],r=T(t);"disabled"===n&&t.classList.remove(a.DISABLE),"disabled"===n&&r.classList.contains(a.INPUTGROUP)&&r.classList.remove(a.DISABLE),"placeholder"===n&&r.classList.contains(a.FLOATINPUT)?r.getElementsByClassName(a.FLOATTEXT)[0].textContent="":t.removeAttribute(n)}}function X(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i],r=T(t);"disabled"===n&&t.classList.add(a.DISABLE),"disabled"===n&&r.classList.contains(a.INPUTGROUP)&&r.classList.add(a.DISABLE),"placeholder"===n&&r.classList.contains(a.FLOATINPUT)?r.getElementsByClassName(a.FLOATTEXT)[0].textContent=e[""+n]:t.setAttribute(n,e[""+n])}}function K(e){var t=e.container;if(!i.i(n.isNullOrUndefined)(t)&&t.classList.contains(a.FLOATINPUT)){var s=t.querySelector("textarea")?t.querySelector("textarea"):t.querySelector("input"),r=t.querySelector("."+a.FLOATTEXT).textContent,l=null!==t.querySelector(".e-clear-icon");i.i(n.detach)(t.querySelector("."+a.FLOATLINE)),i.i(n.detach)(t.querySelector("."+a.FLOATTEXT)),i.i(n.classList)(t,[a.INPUTGROUP],[a.FLOATINPUT]),v(s),i.i(n.attributes)(s,{placeholder:r}),s.classList.add(a.INPUT),l||"INPUT"!==s.tagName||s.removeAttribute("required")}}function Y(e,t,s,r){var l=i.i(n.isNullOrUndefined)(r)?n.createElement:r,o=i.i(n.closest)(e,"."+a.INPUTGROUP);ce=t;var h=o.tagName;h="DIV"!==h&&"SPAN"!==h?h:null;var d={element:e,floatLabelType:t,customTag:h,properties:{placeholder:s}};if("Never"!==t){var u=o.querySelector(".e-clear-icon"),c={container:o};e.classList.remove(a.INPUT),y(d,c,l),Z(c.container,l),M(d.element,c.container);var p=o.classList.contains("e-float-icon-left");if(i.i(n.isNullOrUndefined)(u))if(p){var m=o.querySelector(".e-input-in-wrap");u=m.querySelector(".e-input-group-icon")}else u=o.querySelector(".e-input-group-icon");if(i.i(n.isNullOrUndefined)(u))p&&(u=o.querySelector(".e-input-group-icon"));else{var v=o.querySelector("."+a.FLOATLINE),f=o.querySelector("."+a.FLOATTEXT),g=p?o.querySelector(".e-input-in-wrap"):o;g.insertBefore(e,u),g.insertBefore(v,u),g.insertBefore(f,u)}}else b(d);C(t,e.parentElement)}function Z(e,t){if(e.classList.contains("e-outline")&&e.getElementsByClassName("e-float-text")[0]){var i=t("span",{className:a.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())].container)}function J(e,t,s){var a=[];a.push(s);var r=i.i(n.isNullOrUndefined)(s)?t.querySelectorAll(".e-input-group-icon"):a;if(e&&r.length>0)for(var l=0;l<r.length;l++)r[parseInt(l.toString())].addEventListener("mousedown",ee,!1),r[parseInt(l.toString())].addEventListener("mouseup",te,!1);else if(r.length>0)for(var l=0;l<r.length;l++)r[parseInt(l.toString())].removeEventListener("mousedown",ee),r[parseInt(l.toString())].removeEventListener("mouseup",te)}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++){var o=l[r];ae(o,i,n)}else for(var h=0,d=a;h<d.length;h++){var o=d[h];ne(o,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,t,s,a){var r=i.i(n.isNullOrUndefined)(a)?n.createElement:a,l=ie(e,r);t.classList.add("e-float-icon-left");var o=t.querySelector(".e-input-in-wrap");if(i.i(n.isNullOrUndefined)(o)){o=r("span",{className:"e-input-in-wrap"}),s.parentNode.insertBefore(o,s);var h=t.querySelectorAll(s.tagName+" ~ *");o.appendChild(s);for(var d=0;d<h.length;d++){var u=h[parseInt(d.toString())],c=o.parentElement;u.classList.contains("e-float-line")&&(c&&c.classList.contains("e-filled")||!c)||o.appendChild(u)}}return o.parentNode.insertBefore(l,o),J(!0,t,l),l}function ae(e,t,s){var a=i.i(n.isNullOrUndefined)(s)?n.createElement:s,r=ie(e,a);return(t.classList.contains("e-float-icon-left")?t.querySelector(".e-input-in-wrap"):t).appendChild(r),J(!0,t,r),r}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,t){if(!i.i(n.isNullOrUndefined)(e))for(var s=0,a=Object.keys(e);s<a.length;s++){var l=a[s];r.indexOf(l)<0&&t.setAttribute(l,e[""+l])}}function oe(e,t,i){F(he(e),[i],he(t))}function he(e){var t=e;return i.i(n.isNullOrUndefined)(e)||""===e||(t=e.replace(/\s+/g," ").trim()),t}function de(e,t){if(!i.i(n.isNullOrUndefined)(e))for(var s=0,a=Object.keys(e);s<a.length;s++){var l=a[s];if(r.indexOf(l)>-1)if("class"===l){var o=this.getInputValidClassList(e[""+l]);""!==o&&i.i(n.addClass)([t],o.split(" "))}else if("style"===l){var h=t.getAttribute(l);h=i.i(n.isNullOrUndefined)(h)?e[""+l]:h+e[""+l],t.setAttribute(l,h)}else t.setAttribute(l,e[""+l])}}function ue(e){return!e||/^\s*$/.test(e)}var ce,pe={container:null,buttons:[],clearButton:null},me=!0;e.createInput=t,e.bindInitialEvent=h,e.wireFloatingEvents=m,e.wireClearBtnEvents=w,e.destroy=A,e.setValue=V,e.setCssClass=F,e.calculateWidth=M,e.setWidth=I,e.setPlaceholder=D,e.setReadonly=z,e.setEnableRtl=W,e.setEnabled=q,e.setClearButton=_,e.removeAttributes=j,e.addAttributes=X,e.removeFloating=K,e.addFloating=Y,e.createSpanElement=Z,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=de,e.isBlank=ue}(s||(s={}))},function(e,i){e.exports=t},function(e,t,i){"use strict";var s=i(22);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c}),i.d(t,"d",function(){return s.d}),i.d(t,"e",function(){return s.e}),i.d(t,"f",function(){return s.f}),i.d(t,"g",function(){return s.g}),i.d(t,"h",function(){return s.h}),i.d(t,"i",function(){return s.i}),i.d(t,"j",function(){return s.j}),i.d(t,"k",function(){return s.k}),i.d(t,"l",function(){return s.l}),i.d(t,"m",function(){return s.m}),i.d(t,"n",function(){return s.n}),i.d(t,"o",function(){return s.o}),i.d(t,"p",function(){return s.p}),i.d(t,"q",function(){return s.q}),i.d(t,"r",function(){return s.r}),i.d(t,"s",function(){return s.s}),i.d(t,"t",function(){return s.t}),i.d(t,"u",function(){return s.u}),i.d(t,"v",function(){return s.v})},function(e,t,i){"use strict";var s=i(1);i.d(t,"a",function(){return s.c}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.a})},function(e,t,i){"use strict";var s=i(25);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return a});var s=i(0),n=(i.n(s),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()),a=function(e){function t(){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 n(t,e),t.prototype.initialize=function(e,t){this.clearArray=[],this.element=e,this.canvasContext=this.element.getContext("2d"),this.canvasContext.canvas.tabIndex=-1,t&&(this.dotnetRef=t,this.isBlazor=!0,this.signatureValue&&this.loadPersistedSignature()),this.setHTMLProperties(),i.i(s.isNullOrUndefined)(this.signatureValue)&&this.updateSnapCollection(!0),this.wireEvents(),this.isBlazor||this.trigger("created",null)},t.prototype.wireEvents=function(){!i.i(s.isNullOrUndefined)(this.pointColl)||this.isReadOnly||this.disabled?this.pointColl&&(s.EventHandler.add(this.canvasContext.canvas,"mousemove touchmove",this.mouseMoveHandler,this),s.EventHandler.add(this.canvasContext.canvas,"mouseup touchend",this.mouseUpHandler,this),s.EventHandler.add(document,"mouseup",this.mouseUpHandler,this)):(s.EventHandler.add(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler,this),s.EventHandler.add(this.canvasContext.canvas,"keydown",this.keyboardHandler,this),window.addEventListener("resize",this.resizeHandler.bind(this)))},t.prototype.unwireEvents=function(e){"mouseup"===e||"touchend"===e?(s.EventHandler.remove(this.canvasContext.canvas,"mousemove touchmove",this.mouseMoveHandler),s.EventHandler.remove(this.canvasContext.canvas,"mouseup touchend",this.mouseUpHandler),s.EventHandler.remove(document,"mouseup",this.mouseUpHandler)):(s.EventHandler.remove(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler),s.EventHandler.remove(this.canvasContext.canvas,"keydown",this.keyboardHandler),window.removeEventListener("resize",this.resizeHandler))},t.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)},t.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())},t.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))},t.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=[]},t.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()}},t.prototype.resizeHandler=function(){var e=this;if(this.isResponsive&&this.canRedraw){this.canvasContext.canvas.width=this.element.offsetWidth,this.canvasContext.canvas.height=this.element.offsetHeight,this.canvasContext.scale(1,1);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{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)}}},t.prototype.beginStroke=function(e){this.internalRefresh(),this.updateStroke(e)},t.prototype.updateStroke=function(e){var t=this.createPoint(e);this.addPoint(t)},t.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))},t.prototype.delay=function(){this.previous=Date.now(),this.timeout=null,this.updateStroke(this.storedArgs),this.timeout||(this.storedArgs=null)},t.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())},t.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}},t.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()))},t.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},t.prototype.endDraw=function(){if(!i.i(s.isNullOrUndefined)(this.pointColl)){var e=this.pointColl.length>2,t=this.pointColl[0];!e&&t&&this.strokeDraw(t)}},t.prototype.curveDraw=function(e,t){var i,s,n,a,r,l,o,h,d,u,c=this.canvasContext,p=t-e,m=this.bezierLengthCalc(),v=2*Math.ceil(m);for(c.beginPath(),s=0;s<v;s++)n=s/v,a=n*n,r=a*n,l=1-n,o=l*l,h=o*l,d=h*this.startPoint.x,d+=3*o*n*this.controlPoint1.x,d+=3*l*a*this.controlPoint2.x,d+=r*this.endPoint.x,u=h*this.startPoint.y,u+=3*o*n*this.controlPoint1.y,u+=3*l*a*this.controlPoint2.y,u+=r*this.endPoint.y,i=Math.min(e+r*p,this.maxStrokeWidth),this.arcDraw(d,u,i);c.closePath(),c.fill(),this.isSignatureEmpty=!1},t.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},t.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)},t.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),d=Math.sqrt(a*a+r*r),u=l.x-o.x,c=l.y-o.y,p=d/(h+d),m={x:o.x+u*p,y:o.y+c*p},v=t.x-m.x,f=t.y-m.y;return{controlPoint1:this.point(l.x+v,l.y+f,0),controlPoint2:this.point(o.x+v,o.y+f,0)}},t.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},t.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},t.prototype.pointVelocityCalc=function(e){return this.time!==e.time?this.distanceTo(e)/(this.time-e.time):0},t.prototype.distanceTo=function(e){return Math.sqrt(Math.pow(this.pointX-e.x,2)+Math.pow(this.pointY-e.y,2))},t.prototype.isRead=function(e){e?s.EventHandler.remove(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler):this.disabled||s.EventHandler.add(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler,this)},t.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))},t.prototype.updateSnapCollection=function(e){if(i.i(s.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 t=this.createElement("canvas",{className:"e-"+this.getModuleName()+"-wrapper"}),n=t.getContext("2d");t.width=this.canvasContext.canvas.width,t.height=this.canvasContext.canvas.height,n.drawImage(this.canvasContext.canvas,0,0,t.width,t.height),this.snapColl.push(t.toDataURL())}else this.snapColl.push(this.canvasContext.canvas.toDataURL());e&&this.clearArray.push(this.incStep)},t.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))},t.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()},t.prototype.loadPersistedSignature=function(){if(!i.i(s.isNullOrUndefined)(this.signatureValue)){var e=this,t=new Image;t.src=this.signatureValue,t.onload=function(){e.canvasContext.clearRect(0,0,e.element.width,e.element.height),e.canvasContext.drawImage(t,0,0),e.updateSnapCollection()},this.isSignatureEmpty=!1}},t.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})},t.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)},t.prototype.internalRefresh=function(){this.pointColl=[],this.lastVelocity=0,this.lastWidth=(this.minStrokeWidth+this.maxStrokeWidth)/2},t.prototype.refresh=function(){this.isResponsive=!1,this.setHTMLProperties(),this.resizeHandler(),this.internalRefresh()},t.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)},t.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)},t.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)},t.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)}},t.prototype.isEmpty=function(){return this.isSignatureEmpty},t.prototype.canUndo=function(){return this.incStep>0},t.prototype.canRedo=function(){return this.incStep<this.snapColl.length-1},t.prototype.draw=function(e,t,n,a,r){var l={actionName:"draw-text"};this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height),t=t||"Arial",n=n||30,this.canvasContext.font=n+"px "+t;var o=this.element.width/2,h=this.element.height/2;i.i(s.isNullOrUndefined)(a)&&i.i(s.isNullOrUndefined)(r)?(this.canvasContext.textAlign="center",this.canvasContext.textBaseline="middle"):(o=i.i(s.isNullOrUndefined)(a)?o:a,h=i.i(s.isNullOrUndefined)(r)?h+n/2:r+n/2),this.canvasContext.fillText(e,o,h),this.updateSnapCollection(),this.isSignatureEmpty=!1,this.trigger("change",l)},t.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},t.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)}}},t.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{var 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()},t.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--},t.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--},t.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+'">',a=i.innerHTML,r=n+a+"</svg>",l="data:image/svg+xml;base64,"+btoa(r);return null==e?l:(this.download(this.getBlob(l),e+".svg"),null)},t.prototype.saveAsBlob=function(){return this.getBlob(this.canvasContext.canvas.toDataURL("image/png"))},t.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")},t.prototype.getModuleName=function(){return"signature"},t.prototype.getPersistData=function(){return this.signatureValue=this.snapColl[this.incStep],this.addOnPersist(["signatureValue"])},t.prototype.destroy=function(){"image-editor"!==this.getModuleName()&&(this.unwireEvents(null),i.i(s.removeClass)([this.element],"e-"+this.getModuleName()),this.element.removeAttribute("tabindex"),this.pointColl=null),e.prototype.destroy.call(this)},t.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)}},t}(s.Component)},function(e,t,i){"use strict";i.d(t,"b",function(){return l}),i.d(t,"c",function(){return o}),i.d(t,"d",function(){return h}),i.d(t,"e",function(){return d}),i.d(t,"a",function(){return c});var s=i(0),n=(i.n(s),i(2)),a=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()),r=this&&this.__decorate||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},l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([i.i(s.Property)("None")],t.prototype,"placement",void 0),r([i.i(s.Property)(10)],t.prototype,"largeStep",void 0),r([i.i(s.Property)(1)],t.prototype,"smallStep",void 0),r([i.i(s.Property)(!1)],t.prototype,"showSmallTicks",void 0),r([i.i(s.Property)(null)],t.prototype,"format",void 0),t}(s.ChildProperty),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([i.i(s.Property)(null)],t.prototype,"color",void 0),r([i.i(s.Property)(null)],t.prototype,"start",void 0),r([i.i(s.Property)(null)],t.prototype,"end",void 0),t}(s.ChildProperty),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([i.i(s.Property)(!1)],t.prototype,"enabled",void 0),r([i.i(s.Property)(null)],t.prototype,"minStart",void 0),r([i.i(s.Property)(null)],t.prototype,"minEnd",void 0),r([i.i(s.Property)(null)],t.prototype,"maxStart",void 0),r([i.i(s.Property)(null)],t.prototype,"maxEnd",void 0),r([i.i(s.Property)(!1)],t.prototype,"startHandleFixed",void 0),r([i.i(s.Property)(!1)],t.prototype,"endHandleFixed",void 0),t}(s.ChildProperty),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([i.i(s.Property)("")],t.prototype,"cssClass",void 0),r([i.i(s.Property)("Before")],t.prototype,"placement",void 0),r([i.i(s.Property)("Focus")],t.prototype,"showOn",void 0),r([i.i(s.Property)(!1)],t.prototype,"isVisible",void 0),r([i.i(s.Property)(null)],t.prototype,"format",void 0),t}(s.ChildProperty),u={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"},c=function(e){function t(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 a(t,e),t.prototype.preRender=function(){var e={incrementTitle:"Increase",decrementTitle:"Decrease"};this.l10n=new s.L10n("slider",e,this.locale),this.isElementFocused=!1,this.tickElementCollection=[],this.tooltipFormatInfo={},this.ticksFormatInfo={},this.initCultureInfo(),this.initCultureFunc(),this.formChecker()},t.prototype.formChecker=function(){var e=i.i(s.closest)(this.element,"form");e?(this.isForm=!0,i.i(s.isNullOrUndefined)(this.formResetValue)||this.setProperties({value:this.formResetValue},!0),this.formResetValue=this.value,"Range"!==this.type||!i.i(s.isNullOrUndefined)(this.formResetValue)&&"object"==typeof this.formResetValue?i.i(s.isNullOrUndefined)(this.formResetValue)&&(this.formResetValue=parseFloat(i.i(s.formatUnit)(this.min))):this.formResetValue=[parseFloat(i.i(s.formatUnit)(this.min)),parseFloat(i.i(s.formatUnit)(this.max))],this.formElement=e):this.isForm=!1},t.prototype.initCultureFunc=function(){this.internationalization=new s.Internationalization(this.locale)},t.prototype.initCultureInfo=function(){this.tooltipFormatInfo.format=i.i(s.isNullOrUndefined)(this.tooltip.format)?null:this.tooltip.format,this.ticksFormatInfo.format=i.i(s.isNullOrUndefined)(this.ticks.format)?null:this.ticks.format},t.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}},t.prototype.formatNumber=function(e){var t=this.numberOfDecimals(e);return this.internationalization.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(e)},t.prototype.numberOfDecimals=function(e){var t=e.toString().split(".")[1];return t&&t.length?t.length:0},t.prototype.makeRoundNumber=function(e,t){var i=t||0;return Number(e.toFixed(i))},t.prototype.fractionalToInteger=function(e){e=0===this.numberOfDecimals(e)?Number(e).toFixed(this.noOfDecimals):e;for(var t=1,i=0;i<this.noOfDecimals;i++)t*=10;return e=Number((e*t).toFixed(0))},t.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)},t.prototype.initialize=function(){i.i(s.addClass)([this.element],u.root),this.setCSSClass()},t.prototype.setElementWidth=function(e){i.i(s.isNullOrUndefined)(e)||i.i(s.isNullOrUndefined)(this.sliderContainer)||("number"==typeof e?this.sliderContainer.style.width=i.i(s.formatUnit)(e):"string"==typeof e&&(this.sliderContainer.style.width=e.match(/px|%|em/)?e:i.i(s.formatUnit)(e)))},t.prototype.setCSSClass=function(e){e&&i.i(s.removeClass)([this.element],e.split(" ")),this.cssClass&&i.i(s.addClass)([this.element],this.cssClass.split(" "))},t.prototype.setEnabled=function(){this.enabled?(i.i(s.removeClass)([this.sliderContainer],[u.sliderDisabled]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.remove(u.sliderDisabled),this.wireEvents()):(i.i(s.addClass)([this.sliderContainer],[u.sliderDisabled]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.add(u.sliderDisabled),this.unwireEvents())},t.prototype.getTheme=function(e){return window.getComputedStyle(e,":after").getPropertyValue("content").replace(/['"]+/g,"")},t.prototype.initRender=function(){this.sliderContainer=this.createElement("div",{className:u.sliderContainer+" "+u.controlWrapper}),this.element.parentNode.insertBefore(this.sliderContainer,this.element),this.sliderContainer.appendChild(this.element),this.sliderTrack=this.createElement("div",{className:u.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:i.i(s.isNullOrUndefined)(this.value)?this.min.toString():this.value.toString(),name:this.element.getAttribute("name")||this.element.getAttribute("id")||"_"+(1e3*Math.random()).toFixed(0)+"slider",class:u.sliderHiddenInput}}),this.hiddenInput.tabIndex=-1,this.sliderContainer.appendChild(this.hiddenInput),this.showButtons&&this.setButtons(),this.setEnableRTL(),"Range"===this.type?this.rangeValueUpdate():this.value=i.i(s.isNullOrUndefined)(this.value)?parseFloat(i.i(s.formatUnit)(this.min.toString())):this.value,this.previousVal="Range"!==this.type?this.checkHandleValue(parseFloat(i.i(s.formatUnit)(this.value.toString()))):[this.checkHandleValue(parseFloat(i.i(s.formatUnit)(this.value[0].toString()))),this.checkHandleValue(parseFloat(i.i(s.formatUnit)(this.value[1].toString())))],this.previousChanged=this.previousVal,i.i(s.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?i.i(s.removeClass)([this.sliderContainer],[u.sliderDisabled]):i.i(s.addClass)([this.sliderContainer],[u.sliderDisabled]),this.readonly?i.i(s.addClass)([this.sliderContainer],[u.readonly]):i.i(s.removeClass)([this.sliderContainer],[u.readonly])},t.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.isBootstrap5="bootstrap5"===this.getTheme(this.sliderContainer),this.isFluent="FluentUI"===this.getTheme(this.sliderContainer),this.isMaterialTooltip=(this.isMaterial||this.isMaterial3)&&"Range"!==this.type&&this.tooltip.isVisible},t.prototype.createRangeBar=function(){"Default"!==this.type&&(this.rangeBar=this.createElement("div",{attrs:{class:u.rangeBar}}),this.element.appendChild(this.rangeBar),this.drag&&"Range"===this.type&&("Horizontal"===this.orientation?this.rangeBar.classList.add(u.dragHorizontal):this.rangeBar.classList.add(u.dragVertical)))},t.prototype.createLimitBar=function(){var e="Range"!==this.type?u.limitBarDefault:u.limitBarFirst;e+=" "+u.limits,this.limitBarFirst=this.createElement("div",{attrs:{class:e}}),this.element.appendChild(this.limitBarFirst),"Range"===this.type&&(this.limitBarSecond=this.createElement("div",{attrs:{class:u.limitBarSecond+" "+u.limits}}),this.element.appendChild(this.limitBarSecond))},t.prototype.setOrientClass=function(){"Vertical"!==this.orientation?(this.sliderContainer.classList.remove(u.verticalSlider),this.sliderContainer.classList.add(u.horizontalSlider),this.firstHandle.setAttribute("aria-orientation","horizontal"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","horizontal")):(this.sliderContainer.classList.remove(u.horizontalSlider),this.sliderContainer.classList.add(u.verticalSlider),this.firstHandle.setAttribute("aria-orientation","vertical"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","vertical"))},t.prototype.setAriaAttributes=function(e){var t=this,n=this.min,a=this.max;if(!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&(n=this.customValues[0],a=this.customValues[this.customValues.length-1]),"Range"!==this.type)i.i(s.attributes)(e,{"aria-valuemin":n.toString(),"aria-valuemax":a.toString()});else{(!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0?[[n.toString(),this.customValues[this.value[1]].toString()],[this.customValues[this.value[0]].toString(),a.toString()]]:[[n.toString(),this.value[1].toString()],[this.value[0].toString(),a.toString()]]).forEach(function(e,n){var a=0===n?t.firstHandle:t.secondHandle;a&&i.i(s.attributes)(a,{"aria-valuemin":e[0],"aria-valuemax":e[1]})})}},t.prototype.createSecondHandle=function(){this.secondHandle=this.createElement("div",{attrs:{class:u.sliderHandle,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.secondHandle.classList.add(u.sliderSecondHandle),this.element.appendChild(this.secondHandle)},t.prototype.createFirstHandle=function(){this.firstHandle=this.createElement("div",{attrs:{class:u.sliderHandle,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.firstHandle.classList.add(u.sliderFirstHandle),this.element.appendChild(this.firstHandle),this.isMaterialTooltip&&(this.materialHandle=this.createElement("div",{attrs:{class:u.sliderHandle+" "+u.sliderMaterialHandle}}),this.element.appendChild(this.materialHandle))},t.prototype.wireFirstHandleEvt=function(e){e?(s.EventHandler.remove(this.firstHandle,"mousedown touchstart",this.handleFocus),s.EventHandler.remove(this.firstHandle,"transitionend",this.transitionEnd),s.EventHandler.remove(this.firstHandle,"mouseenter touchenter",this.handleOver),s.EventHandler.remove(this.firstHandle,"mouseleave touchend",this.handleLeave)):(s.EventHandler.add(this.firstHandle,"mousedown touchstart",this.handleFocus,this),s.EventHandler.add(this.firstHandle,"transitionend",this.transitionEnd,this),s.EventHandler.add(this.firstHandle,"mouseenter touchenter",this.handleOver,this),s.EventHandler.add(this.firstHandle,"mouseleave touchend",this.handleLeave,this))},t.prototype.wireSecondHandleEvt=function(e){e?(s.EventHandler.remove(this.secondHandle,"mousedown touchstart",this.handleFocus),s.EventHandler.remove(this.secondHandle,"transitionend",this.transitionEnd),s.EventHandler.remove(this.secondHandle,"mouseenter touchenter",this.handleOver),s.EventHandler.remove(this.secondHandle,"mouseleave touchend",this.handleLeave)):(s.EventHandler.add(this.secondHandle,"mousedown touchstart",this.handleFocus,this),s.EventHandler.add(this.secondHandle,"transitionend",this.transitionEnd,this),s.EventHandler.add(this.secondHandle,"mouseenter touchenter",this.handleOver,this),s.EventHandler.add(this.secondHandle,"mouseleave touchend",this.handleLeave,this))},t.prototype.handleStart=function(){"Range"!==this.type&&(this.firstHandle.classList[0===this.handlePos1?"add":"remove"](u.sliderHandleStart),this.isMaterialTooltip&&(this.materialHandle.classList[0===this.handlePos1?"add":"remove"](u.sliderHandleStart),this.tooltipElement&&this.tooltipElement.classList[0===this.handlePos1?"add":"remove"](u.sliderTooltipStart)))},t.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())},t.prototype.handleFocusOut=function(){this.firstHandle.classList.contains(u.sliderHandleFocused)&&this.firstHandle.classList.remove(u.sliderHandleFocused),"Range"===this.type&&this.secondHandle.classList.contains(u.sliderHandleFocused)&&this.secondHandle.classList.remove(u.sliderHandleFocused)},t.prototype.handleFocus=function(e){this.focusSliderElement(),this.sliderBarClick(e),e.currentTarget===this.firstHandle?(this.firstHandle.classList.add(u.sliderHandleFocused),this.firstHandle.classList.add(u.sliderTabHandle)):(this.secondHandle.classList.add(u.sliderHandleFocused),this.secondHandle.classList.add(u.sliderTabHandle)),s.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),s.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},t.prototype.handleOver=function(e){this.tooltip.isVisible&&"Hover"===this.tooltip.showOn&&this.tooltipToggle(e.currentTarget),"Default"===this.type&&this.tooltipToggle(this.getHandle())},t.prototype.handleLeave=function(e){!this.tooltip.isVisible||"Hover"!==this.tooltip.showOn||e.currentTarget.classList.contains(u.sliderHandleFocused)||e.currentTarget.classList.contains(u.sliderTabHandle)||this.closeTooltip()},t.prototype.setHandler=function(){this.createFirstHandle(),"Range"===this.type&&this.createSecondHandle()},t.prototype.setEnableRTL=function(){this.enableRtl&&"Vertical"!==this.orientation?i.i(s.addClass)([this.sliderContainer],u.rtl):i.i(s.removeClass)([this.sliderContainer],u.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&&(i.i(s.setStyleAttribute)(this.firstHandle,{right:"",left:"auto"}),"Range"===this.type&&i.i(s.setStyleAttribute)(this.secondHandle,{top:"",left:"auto"})),this.setBarColor()},t.prototype.tooltipValue=function(){var e,t=this,n={value:this.value,text:""};this.initialTooltip&&(this.initialTooltip=!1,this.setTooltipContent(),n.text=e="function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,this.trigger("tooltipChange",n,function(n){if(t.addTooltipClass(n.text),e!==n.text){t.customAriaText=n.text,t.enableHtmlSanitizer?n.text=s.SanitizeHtmlHelper.sanitize(n.text.toString()):n.text=n.text.toString();var a=function(){return n.text};t.tooltipObj.content=i.i(s.initializeCSPTemplate)(a),t.setAriaAttrValue(t.firstHandle),"Range"===t.type&&t.setAriaAttrValue(t.secondHandle)}}),this.isMaterialTooltip&&this.setPreviousVal("change",this.value))},t.prototype.setTooltipContent=function(){var e;e=this.formatContent(this.tooltipFormatInfo,!1);var t=function(){return e};this.tooltipObj.content=i.i(s.initializeCSPTemplate)(t)},t.prototype.formatContent=function(e,t){var n="",a=this.handleVal1,r=this.handleVal2;return!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&(a=this.customValues[this.handleVal1],r=this.customValues[this.handleVal2]),t?("Range"===this.type?n=this.enableRtl&&"Vertical"!==this.orientation?i.i(s.isNullOrUndefined)(this.tooltip)||i.i(s.isNullOrUndefined)(this.tooltip.format)?r.toString()+" - "+a.toString():this.formatString(r,e).elementVal+" - "+this.formatString(a,e).elementVal:i.i(s.isNullOrUndefined)(this.tooltip)||i.i(s.isNullOrUndefined)(this.tooltip.format)?a.toString()+" - "+r.toString():this.formatString(a,e).elementVal+" - "+this.formatString(r,e).elementVal:i.i(s.isNullOrUndefined)(a)||(n=i.i(s.isNullOrUndefined)(this.tooltip)||i.i(s.isNullOrUndefined)(this.tooltip.format)?a.toString():this.formatString(a,e).elementVal),n):("Range"===this.type?n=this.enableRtl&&"Vertical"!==this.orientation?i.i(s.isNullOrUndefined)(e.format)?r.toString()+" - "+a.toString():this.formatString(r,e).formatString+" - "+this.formatString(a,e).formatString:i.i(s.isNullOrUndefined)(e.format)?a.toString()+" - "+r.toString():this.formatString(a,e).formatString+" - "+this.formatString(r,e).formatString:i.i(s.isNullOrUndefined)(a)||(n=i.i(s.isNullOrUndefined)(e.format)?a.toString():this.formatString(a,e).formatString),n)},t.prototype.addTooltipClass=function(e){if(this.isMaterialTooltip){var t=e.toString().length;if(this.tooltipElement){var i=t>4?{oldCss:u.sliderMaterialDefault,newCss:u.sliderMaterialRange}:{oldCss:u.sliderMaterialRange,newCss:u.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?u.sliderMaterialRange:u.sliderMaterialDefault;this.tooltipObj.cssClass=u.sliderTooltip+" "+i}}},t.prototype.tooltipPlacement=function(){return"Horizontal"===this.orientation?"Before"===this.tooltip.placement?"TopCenter":"BottomCenter":"Before"===this.tooltip.placement?"LeftCenter":"RightCenter"},t.prototype.tooltipBeforeOpen=function(e){this.tooltipElement=e.element,this.tooltip.cssClass&&i.i(s.addClass)([this.tooltipElement],this.tooltip.cssClass.split(" ").filter(function(e){return e})),e.target.removeAttribute("aria-describedby"),this.isMaterialTooltip&&(this.tooltipElement.firstElementChild.classList.add(u.materialTooltipHide),this.handleStart(),this.setTooltipTransform())},t.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)}}},t.prototype.materialTooltipEventCallBack=function(e){this.sliderBarClick(e),s.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),s.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},t.prototype.wireMaterialTooltipEvent=function(e){this.isMaterialTooltip&&(e?s.EventHandler.remove(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack):s.EventHandler.add(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack,this))},t.prototype.tooltipPositionCalculation=function(e){var t;switch(e){case"TopCenter":t=u.horizontalTooltipBefore;break;case"BottomCenter":t=u.horizontalTooltipAfter;break;case"LeftCenter":t=u.verticalTooltipBefore;break;case"RightCenter":t=u.verticalTooltipAfter}return t},t.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===u.horizontalTooltipBefore?{rotate:"rotate(45deg)",translate:"translateY("+i+"px)"}:{rotate:"rotate(225deg)",translate:"translateY("+-i+"px)"}:e===u.verticalTooltipBefore?{rotate:"rotate(-45deg)",translate:"translateX("+i+"px)"}:{rotate:"rotate(-225deg)",translate:"translateX("+-i+"px)"}}return t},t.prototype.openMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){this.refreshTooltip(this.firstHandle);var t=this.tooltipElement.firstElementChild;t.classList.remove(u.materialTooltipHide),t.classList.add(u.materialTooltipShow),this.firstHandle.style.cursor="default",this.tooltipElement.style.transition=this.scaleTransform,this.tooltipElement.classList.add(u.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)}},t.prototype.closeMaterialTooltip=function(){var e=this;if(this.isMaterialTooltip){var t=this.tooltipElement.firstElementChild;this.tooltipElement.style.transition=this.scaleTransform,t.classList.remove(u.materialTooltipShow),t.classList.add(u.materialTooltipHide),this.firstHandle.style.cursor="-webkit-grab",this.firstHandle.style.cursor="grab",this.materialHandle&&(this.materialHandle.style.transform="scale(1)"),this.tooltipElement.classList.remove(u.materialTooltipOpen),this.setTooltipTransform(),this.tooltipTarget=void 0,setTimeout(function(){e.tooltipElement&&(e.tooltipElement.style.transition="none")},2500)}},t.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(u.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()},t.prototype.setTooltipTransform=function(){var e=this.getTooltipTransformProperties(this.previousTooltipClass);i.i(s.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)")},t.prototype.renderTooltip=function(){this.tooltipObj=new n.Tooltip({showTipPointer:this.isBootstrap||this.isMaterial||this.isMaterial3||this.isBootstrap4||this.isTailwind||this.isBootstrap5||this.isFluent,cssClass:u.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()},t.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){i.i(s.isNullOrUndefined)(e)||(e.style.transition="none")}),this.isMaterialTooltip&&(this.sliderContainer.classList.add(u.materialSlider),this.tooltipValue(),this.tooltipObj.animation.close.effect="None",this.tooltipObj.open(this.firstHandle))},t.prototype.tooltipBeforeClose=function(){this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0},t.prototype.setButtons=function(){this.firstBtn=this.createElement("div",{className:u.sliderButton+" "+u.firstButton}),this.firstBtn.appendChild(this.createElement("span",{className:u.sliderButtonIcon})),this.isTailwind&&this.firstBtn.querySelector("span").classList.add("e-icons"),this.firstBtn.tabIndex=-1,this.secondBtn=this.createElement("div",{className:u.sliderButton+" "+u.secondButton}),this.secondBtn.appendChild(this.createElement("span",{className:u.sliderButtonIcon})),this.isTailwind&&this.secondBtn.querySelector("span").classList.add("e-icons"),this.secondBtn.tabIndex=-1,this.sliderContainer.classList.add(u.sliderButtonClass),this.sliderContainer.appendChild(this.firstBtn),this.sliderContainer.appendChild(this.secondBtn),this.sliderContainer.appendChild(this.element),this.buttonTitle()},t.prototype.buttonTitle=function(){var e=this.enableRtl&&"Vertical"!==this.orientation;this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("decrementTitle"),n=this.l10n.getConstant("incrementTitle");i.i(s.attributes)(e?this.secondBtn:this.firstBtn,{"aria-label":t,title:t}),i.i(s.attributes)(e?this.firstBtn:this.secondBtn,{"aria-label":n,title:n})},t.prototype.buttonFocusOut=function(){(this.isMaterial||this.isMaterial3)&&this.getHandle().classList.remove("e-large-thumb-size")},t.prototype.repeatButton=function(e){var t,i=this.handleValueUpdate(),s=this.enableRtl&&"Vertical"!==this.orientation;e.target.parentElement.classList.contains(u.firstButton)||e.target.classList.contains(u.firstButton)?t=s?this.add(i,parseFloat(this.step.toString()),!0):this.add(i,parseFloat(this.step.toString()),!1):(e.target.parentElement.classList.contains(u.secondButton)||e.target.classList.contains(u.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),this.tooltipToggle(this.getHandle()))},t.prototype.repeatHandlerMouse=function(e){e.preventDefault(),"mousedown"!==e.type&&"touchstart"!==e.type||(this.buttonClick(e),this.repeatInterval=setInterval(this.repeatButton.bind(this),180,e))},t.prototype.materialChange=function(){this.getHandle().classList.contains("e-large-thumb-size")||this.getHandle().classList.add("e-large-thumb-size")},t.prototype.focusHandle=function(){this.getHandle().classList.contains(u.sliderTabHandle)||this.getHandle().classList.add(u.sliderTabHandle)},t.prototype.repeatHandlerUp=function(e){this.changeEvent("changed",e),this.closeTooltip(),clearInterval(this.repeatInterval),this.getHandle().focus()},t.prototype.customTickCounter=function(e){var t=4;return!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&(e>4&&(t=3),e>7&&(t=2),e>14&&(t=1),e>28&&(t=0)),t},t.prototype.renderScale=function(){var e="Vertical"===this.orientation?"v":"h";this.noOfDecimals=this.numberOfDecimals(this.step),this.ul=this.createElement("ul",{className:u.scale+" e-"+e+"-scale "+u.tick+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation",tabIndex:"-1","aria-hidden":"true"}}),this.ul.style.zIndex="-1",s.Browser.isAndroid&&"h"===e&&this.ul.classList.add(u.sliderTickPosition);var t=this.ticks.smallStep;this.ticks.showSmallTicks?t<=0&&(t=parseFloat(i.i(s.formatUnit)(this.step))):t=this.ticks.largeStep>0?this.ticks.largeStep:parseFloat(i.i(s.formatUnit)(this.max))-parseFloat(i.i(s.formatUnit)(this.min));var n=this.fractionalToInteger(this.min),a=this.fractionalToInteger(this.max),r=this.fractionalToInteger(t),l=!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&this.customValues.length-1,o=this.customTickCounter(l),h=!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0?l*o+l:Math.abs((a-n)/r);this.element.appendChild(this.ul);var d,c=parseFloat(this.min.toString());"v"===e&&(c=parseFloat(this.max.toString()));var p,m=0,v=100/h;v===1/0&&(v=5);for(var f=0,g=!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0?this.customValues.length-1:0,y=0;f<=h;f++){if(d=this.createElement("li",{attrs:{class:u.tick,role:"presentation",tabIndex:"-1","aria-hidden":"true"}}),!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0)(p=f%(o+1)==0)&&("h"===e?(c=this.customValues[y],y++):(c=this.customValues[g],g--),d.setAttribute("title",c.toString()));else if(d.setAttribute("title",c.toString()),0===this.numberOfDecimals(this.max)&&0===this.numberOfDecimals(this.min)&&0===this.numberOfDecimals(this.step))p="h"===e?(c-parseFloat(this.min.toString()))%this.ticks.largeStep==0:Math.abs(c-parseFloat(this.max.toString()))%this.ticks.largeStep==0;else{var b=this.fractionalToInteger(this.ticks.largeStep),C=this.fractionalToInteger(c);p="h"===e?(C-n)%b==0:Math.abs(C-parseFloat(a.toString()))%b==0}p&&d.classList.add(u.large),"h"===e?d.style.width=v+"%":d.style.height=v+"%";var E=p?"Both"===this.ticks.placement?2:1:0;if(p)for(var x=0;x<E;x++)this.createTick(d,c,v);else i.i(s.isNullOrUndefined)(this.customValues)&&this.formatTicksValue(d,c);this.ul.appendChild(d),this.tickElementCollection.push(d);var S=void 0;i.i(s.isNullOrUndefined)(this.customValues)&&(S=this.numberOfDecimals(t)>this.numberOfDecimals(c)?this.numberOfDecimals(t):this.numberOfDecimals(c),c="h"===e?this.makeRoundNumber(c+t,S):this.min>this.max?this.makeRoundNumber(c+t,S):this.makeRoundNumber(c-t,S),m=this.makeRoundNumber(m+t,S))}this.ticksAlignment(e,v)},t.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(u.sliderFirstTick),this.lastChild.classList.add(u.sliderLastTick),this.sliderContainer.classList.add(u.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()},t.prototype.createTick=function(e,t,n){var a=this.createElement("span",{className:u.tickValue+" "+u.tick+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation",tabIndex:"-1","aria-hidden":"true"}});e.appendChild(a),i.i(s.isNullOrUndefined)(this.customValues)?this.formatTicksValue(e,t,a,n):this.enableHtmlSanitizer?a.innerHTML=s.SanitizeHtmlHelper.sanitize(t.toString()):a.innerHTML=t.toString()},t.prototype.formatTicksValue=function(e,t,n,a){var r=this,l=this.formatNumber(t),o=i.i(s.isNullOrUndefined)(this.ticks)||i.i(s.isNullOrUndefined)(this.ticks.format)?l:this.formatString(t,this.ticksFormatInfo).formatString,h={value:t,text:o,tickElement:e};this.trigger("renderingTicks",h,function(t){e.setAttribute("title",t.text.toString()),n&&(r.enableHtmlSanitizer?n.innerHTML=s.SanitizeHtmlHelper.sanitize(t.text.toString()):n.innerHTML=t.text.toString())})},t.prototype.scaleAlignment=function(){this.tickValuePosition();this.orientation;"Vertical"===this.orientation?this.element.getBoundingClientRect().width<=15?this.sliderContainer.classList.add(u.sliderSmallSize):this.sliderContainer.classList.remove(u.sliderSmallSize):this.element.getBoundingClientRect().height<=15?this.sliderContainer.classList.add(u.sliderSmallSize):this.sliderContainer.classList.remove(u.sliderSmallSize)},t.prototype.tickValuePosition=function(){this.firstChild=this.element.querySelector("ul").children[0];var e,t,n=this.firstChild.getBoundingClientRect(),a=this.ticks.smallStep,r=Math.abs(parseFloat(i.i(s.formatUnit)(this.max))-parseFloat(i.i(s.formatUnit)(this.min)))/a;this.firstChild.children.length>0&&(e=this.firstChild.children[0].getBoundingClientRect());var l,o=[this.sliderContainer.querySelectorAll("."+u.tick+"."+u.large+" ."+u.tickValue)];l="Both"===this.ticks.placement?[].slice.call(o[0],2):[].slice.call(o[0],1);for(var h="Vertical"===this.orientation?2*n.height:2*n.width,d=0;d<this.firstChild.children.length;d++)"Vertical"===this.orientation?this.firstChild.children[d].style.top=-e.height/2+"px":this.enableRtl?this.firstChild.children[d].style.left=(h-this.firstChild.children[d].getBoundingClientRect().width)/2+"px":this.firstChild.children[d].style.left=-e.width/2+"px";for(var d=0;d<l.length;d++)t=l[d].getBoundingClientRect(),"Vertical"===this.orientation?i.i(s.setStyleAttribute)(l[d],{top:(h-t.height)/2+"px"}):i.i(s.setStyleAttribute)(l[d],{left:(h-t.width)/2+"px"});this.enableRtl&&this.lastChild.children.length&&0!==r&&(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===r&&("Horizontal"===this.orientation&&(this.enableRtl?(this.firstChild.classList.remove(u.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(u.sliderLastTick),this.firstChild.style.left=this.firstHandle.style.left)),"Vertical"===this.orientation&&this.firstChild.classList.remove(u.sliderLastTick))},t.prototype.setAriaAttrValue=function(e){var t,n=!i.i(s.isNullOrUndefined)(this.ticks)&&!i.i(s.isNullOrUndefined)(this.ticks.format),a=n?this.formatContent(this.tooltipFormatInfo,!1):this.formatContent(this.ticksFormatInfo,!1),r=n?this.formatContent(this.ticksFormatInfo,!0):this.formatContent(this.tooltipFormatInfo,!0);a=this.customAriaText?this.customAriaText:a,t=2===a.split(" - ").length?a.split(" - "):[a,a],this.setAriaAttributes(e),"Range"!==this.type?i.i(s.attributes)(e,{"aria-valuenow":r,"aria-valuetext":a}):this.enableRtl?e===this.firstHandle?i.i(s.attributes)(e,{"aria-valuenow":r.split(" - ")[1],"aria-valuetext":t[1]}):i.i(s.attributes)(e,{"aria-valuenow":r.split(" - ")[0],"aria-valuetext":t[0]}):e===this.firstHandle?i.i(s.attributes)(e,{"aria-valuenow":r.split(" - ")[0],"aria-valuetext":t[0]}):i.i(s.attributes)(e,{"aria-valuenow":r.split(" - ")[1],"aria-valuetext":t[1]})},t.prototype.handleValueUpdate=function(){return"Range"===this.type?1===this.activeHandle?this.handleVal1:this.handleVal2:this.handleVal1},t.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]},t.prototype.focusSliderElement=function(){this.isElementFocused||(this.element.focus(),this.isElementFocused=!0)},t.prototype.buttonClick=function(e){this.focusSliderElement();var t,i=this.enableRtl&&"Vertical"!==this.orientation,n=this.handleValueUpdate();40===e.keyCode||37===e.keyCode||e.currentTarget.classList.contains(u.firstButton)?t=i?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(u.secondButton)?t=i?this.add(n,parseFloat(this.step.toString()),!1):this.add(n,parseFloat(this.step.toString()),!0):33===e.keyCode||e.currentTarget.classList.contains(u.firstButton)?t=i?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(u.secondButton)?t=i?this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):36===e.keyCode?t=parseFloat(this.min<this.max?this.min.toString():this.max.toString()):35===e.keyCode&&(t=parseFloat(this.min<this.max?this.max.toString():this.min.toString())),this.limits.enabled&&(t=this.getLimitCorrectedValues(t)),this.changeHandleValue(t),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(u.sliderTabHandle)||this.materialChange(),this.tooltipToggle(this.getHandle()),this.getHandle().focus(),this.focusHandle(),e.currentTarget.classList.contains(u.firstButton)&&s.EventHandler.add(this.firstBtn,"mouseup touchend",this.buttonUp,this),e.currentTarget.classList.contains(u.secondButton)&&s.EventHandler.add(this.secondBtn,"mouseup touchend",this.buttonUp,this)},t.prototype.tooltipToggle=function(e){this.isMaterialTooltip?this.tooltipElement.classList.contains(u.materialTooltipOpen)?this.refreshTooltip(this.firstHandle):this.openMaterialTooltip():this.tooltipElement?this.refreshTooltip(e):this.openTooltip(e)},t.prototype.buttonUp=function(e){e.currentTarget.classList.contains(u.firstButton)&&s.EventHandler.remove(this.firstBtn,"mouseup touchend",this.buttonUp),e.currentTarget.classList.contains(u.secondButton)&&s.EventHandler.remove(this.secondBtn,"mouseup touchend",this.buttonUp)},t.prototype.setRangeBar=function(){"Horizontal"!==this.orientation||i.i(s.isNullOrUndefined)(this.rangeBar)?i.i(s.isNullOrUndefined)(this.rangeBar)||("MinRange"===this.type?(this.rangeBar.style.bottom=this.min>this.max?this.handlePos1+"px":"0px",i.i(s.setStyleAttribute)(this.rangeBar,{height:i.i(s.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",i.i(s.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",i.i(s.setStyleAttribute)(this.rangeBar,{width:i.i(s.isNullOrUndefined)(this.handlePos1)?0:this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right=this.handlePos1+"px":this.rangeBar.style.left=this.handlePos1+"px",i.i(s.setStyleAttribute)(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"}))},t.prototype.checkValidValueAndPos=function(e){return e=this.checkHandleValue(e),e=this.checkHandlePosition(e)},t.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"))},t.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)}},t.prototype.getLimitValueAndPosition=function(e,t,n,a){return i.i(s.isNullOrUndefined)(t)&&(t=this.min<this.max?this.min:this.max,i.i(s.isNullOrUndefined)(e)&&a&&(e=t)),i.i(s.isNullOrUndefined)(n)&&(n=this.min<this.max?this.max:this.min,i.i(s.isNullOrUndefined)(e)&&a&&(e=n)),e<t&&(e=t),e>n&&(e=n),[e,this.checkHandlePosition(e)]},t.prototype.setValue=function(){if(!i.i(s.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&(this.min=0,this.max=this.customValues.length-1,this.setBarColor()),this.setAriaAttributes(this.firstHandle),this.handleVal1=i.i(s.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,i.i(s.isNullOrUndefined)(this.activeHandle)?"Range"===this.type?this.activeHandle=2:this.activeHandle=1:this.activeHandle=this.activeHandle,"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()},t.prototype.rangeValueUpdate=function(){null!==this.value&&"object"==typeof this.value||(this.value=[parseFloat(i.i(s.formatUnit)(this.min)),parseFloat(i.i(s.formatUnit)(this.max))])},t.prototype.validateRangeValue=function(){this.rangeValueUpdate(),this.setRangeValue()},t.prototype.modifyZindex=function(){"Range"!==this.type||i.i(s.isNullOrUndefined)(this.firstHandle)||i.i(s.isNullOrUndefined)(this.secondHandle)?this.isMaterialTooltip&&this.tooltipElement&&(this.tooltipElement.style.zIndex=i.i(n.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+"")},t.prototype.setHandlePosition=function(e){var t,i=this,s=1===this.activeHandle?this.handlePos1:this.handlePos2;t=this.isMaterialTooltip?[this.firstHandle,this.materialHandle]:[this.getHandle()],this.handleStart(),t.forEach(function(e){"Horizontal"===i.orientation?i.enableRtl?e.style.right=s+"px":e.style.left=s+"px":e.style.bottom=s+"px"}),this.changeEvent("change",e)},t.prototype.getHandle=function(){return 1===this.activeHandle?this.firstHandle:this.secondHandle},t.prototype.setRangeValue=function(){this.updateRangeValue(),this.activeHandle=1,this.setHandlePosition(null),this.activeHandle=2,this.setHandlePosition(null),this.activeHandle=1},t.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()},t.prototype.changeEventArgs=function(e,t){var n;return this.tooltip.isVisible&&this.tooltipObj&&this.initialTooltip?(this.tooltipValue(),n={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:!i.i(s.isNullOrUndefined)(t)}):n={value:this.value,previousValue:"change"===e?this.previousVal:this.previousChanged,action:e,text:i.i(s.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:!i.i(s.isNullOrUndefined)(t)},n},t.prototype.setPreviousVal=function(e,t){"change"===e?this.previousVal=t:this.previousChanged=t},t.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}},t.prototype.checkHandlePosition=function(e){var t;return e=100*(e-parseFloat(i.i(s.formatUnit)(this.min)))/(parseFloat(i.i(s.formatUnit)(this.max))-parseFloat(i.i(s.formatUnit)(this.min))),t="Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(e/100):this.element.getBoundingClientRect().height*(e/100),parseFloat(i.i(s.formatUnit)(this.max))===parseFloat(i.i(s.formatUnit)(this.min))&&(t="Horizontal"===this.orientation?this.element.getBoundingClientRect().width:this.element.getBoundingClientRect().height),t},t.prototype.checkHandleValue=function(e){if(this.min===this.max)return parseFloat(i.i(s.formatUnit)(this.max));var t=this.tempStartEnd();return e<t.start?e=t.start:e>t.end&&(e=t.end),e},t.prototype.reposition=function(){var e=this;i.i(s.isNullOrUndefined)(this.firstHandle)||(this.firstHandle.style.transition="none"),"Default"===this.type||i.i(s.isNullOrUndefined)(this.rangeBar)||(this.rangeBar.style.transition="none"),"Range"!==this.type||i.i(s.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&&!i.i(s.isNullOrUndefined)(this.materialHandle)&&(this.enableRtl?this.materialHandle.style.right=this.handlePos1+"px":this.materialHandle.style.left=this.handlePos1+"px"),"MinRange"!==this.type||i.i(s.isNullOrUndefined)(this.rangeBar)?"Range"!==this.type||i.i(s.isNullOrUndefined)(this.secondHandle)||i.i(s.isNullOrUndefined)(this.rangeBar)||(this.enableRtl?this.secondHandle.style.right=this.handlePos2+"px":this.secondHandle.style.left=this.handlePos2+"px",this.enableRtl?this.rangeBar.style.right=this.handlePos1+"px":this.rangeBar.style.left=this.handlePos1+"px",i.i(s.setStyleAttribute)(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",i.i(s.setStyleAttribute)(this.rangeBar,{width:i.i(s.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",i.i(s.setStyleAttribute)(this.rangeBar,{height:i.i(s.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",i.i(s.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(){i.i(s.isNullOrUndefined)(e.firstHandle)||(e.firstHandle.style.transition=e.scaleTransform),"Range"!==e.type||i.i(s.isNullOrUndefined)(e.secondHandle)||(e.secondHandle.style.transition=e.scaleTransform)}),this.refreshTooltip(this.tooltipTarget),this.setBarColor()},t.prototype.changeHandleValue=function(e){var t=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&&(t=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&&(t=this.preHandlePos2=this.handlePos2)),this.modifyZindex()),null!==t&&("Default"!==this.type&&this.setRangeBar(),this.setHandlePosition(null))},t.prototype.tempStartEnd=function(){return this.min>this.max?{start:this.max,end:this.min}:{start:this.min,end:this.max}},t.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)},t.prototype.stepValueCalculation=function(e){0===this.step&&(this.step=1);var t=parseFloat(i.i(s.formatUnit)(this.step))/((parseFloat(i.i(s.formatUnit)(this.max))-parseFloat(i.i(s.formatUnit)(this.min)))/100),n=e%Math.abs(t);return 0!==n&&(t/2>n?e-=n:e+=Math.abs(t)-n),e},t.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},t.prototype.positionToValue=function(e){var t,n=parseFloat(i.i(s.formatUnit)(this.max))-parseFloat(i.i(s.formatUnit)(this.min));return t="Horizontal"===this.orientation?e/this.element.getBoundingClientRect().width*n:e/this.element.getBoundingClientRect().height*n,this.add(t,parseFloat(this.min.toString()),!0)},t.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)){if(this.activeHandle=2,!this.limits.enabled||!this.limits.endHandleFixed){if(this.limits.enabled){var n=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd);s=n[0],i=n[1]}this.secondHandle.classList.add(u.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(u.sliderActiveHandle),this.handlePos1=this.preHandlePos1=i,this.handleVal1=s}this.modifyZindex(),this.firstHandle.focus()}this.isMaterialTooltip&&this.tooltipElement.classList.add(u.materialTooltipActive);var a=this.element.querySelector("."+u.sliderTabHandle);a&&this.getHandle()!==a&&a.classList.remove(u.sliderTabHandle);var r,l=1===this.activeHandle?this.firstHandle:this.secondHandle;if(("click"===e.type||"mousedown"===e.type)&&e.target===l){var o=e.clientX,h=e.clientY;r=document.elementFromPoint(o,h)}if(e.target===l&&r!=l)return!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(u.sliderTabHandle)||this.materialChange(),this.sliderBarUp(e),void this.tooltipToggle(this.getHandle());if(this.checkRepeatedValue(s)){var d=(this.isMaterial||this.isMaterial3)&&this.tooltip.isVisible?this.transitionOnMaterialTooltip:this.transition;this.getHandle().style.transition=d.handle,"Default"!==this.type&&(this.rangeBar.style.transition=d.rangeBar),this.setHandlePosition(e),this.isMaterialTooltip&&(this.initialTooltip=!1),e.target!=l&&this.changeEvent("changed",e),"Default"!==this.type&&this.setRangeBar()}},t.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)},t.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?(t=[e.clientX,e.clientY],n=t[0],a=t[1]):(i=[e.changedTouches[0].clientX,e.changedTouches[0].clientY],n=i[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()},t.prototype.sliderBarUp=function(e){this.changeEvent("changed",e),this.handleFocusOut(),this.firstHandle.classList.remove(u.sliderActiveHandle),"Range"===this.type&&(this.initialTooltip=!1,this.secondHandle.classList.remove(u.sliderActiveHandle)),this.closeTooltip(),(this.isMaterial||this.isMaterial3)&&(this.getHandle().classList.remove("e-large-thumb-size"),this.isMaterialTooltip&&this.tooltipElement.classList.remove(u.materialTooltipActive)),s.EventHandler.remove(document,"mousemove touchmove",this.sliderBarMove),s.EventHandler.remove(document,"mouseup touchend",this.sliderBarUp)},t.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(u.sliderActiveHandle)}if("Range"===this.type)if(1===this.activeHandle){if(this.firstHandle.classList.add(u.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))){if(this.limits.enabled){var a=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd);s=a[0],i=a[1]}this.handlePos1=this.preHandlePos1=i,this.handleVal1=s,this.activeHandle=1}}else if(2===this.activeHandle&&(this.secondHandle.classList.add(u.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(u.sliderTabHandle)||this.materialChange(),this.tooltipToggle(this.getHandle()),"Default"!==this.type&&this.setRangeBar())},t.prototype.dragRangeBarUp=function(e){this.rangeBarDragged?this.isDragComplete=!0:(this.focusSliderElement(),this.sliderBarClick(e)),this.changeEvent("changed",e),this.closeTooltip(),s.EventHandler.remove(document,"mousemove touchmove",this.dragRangeBarMove),s.EventHandler.remove(document,"mouseup touchend",this.dragRangeBarUp),this.rangeBarDragged=!1},t.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},t.prototype.refreshTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&(this.tooltipValue(),e&&(this.tooltipObj.refresh(e),this.tooltipTarget=e))},t.prototype.openTooltip=function(e){this.tooltip.isVisible&&this.tooltipObj&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.open(e),this.tooltipTarget=e)},t.prototype.closeTooltip=function(){this.tooltip.isVisible&&this.tooltipObj&&"Always"!==this.tooltip.showOn&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.close(),this.tooltipTarget=void 0)},t.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)}},t.prototype.wireButtonEvt=function(e){e?(s.EventHandler.remove(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut),s.EventHandler.remove(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut),s.EventHandler.remove(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse),s.EventHandler.remove(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),s.EventHandler.remove(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse),s.EventHandler.remove(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),s.EventHandler.remove(this.firstBtn,"focusout",this.sliderFocusOut),s.EventHandler.remove(this.secondBtn,"focusout",this.sliderFocusOut)):(s.EventHandler.add(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut,this),s.EventHandler.add(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut,this),s.EventHandler.add(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse,this),s.EventHandler.add(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),s.EventHandler.add(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse,this),s.EventHandler.add(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),s.EventHandler.add(this.firstBtn,"focusout",this.sliderFocusOut,this),s.EventHandler.add(this.secondBtn,"focusout",this.sliderFocusOut,this))},t.prototype.rangeBarMousedown=function(e){var t,i;if(e.preventDefault(),this.focusSliderElement(),"Range"===this.type&&this.drag&&e.target===this.rangeBar){var n=void 0,a=void 0;"mousedown"===e.type?(t=[e.clientX,e.clientY],n=t[0],a=t[1]):"touchstart"===e.type&&(i=[e.changedTouches[0].clientX,e.changedTouches[0].clientY],n=i[0],a=i[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("."+u.sliderTabHandle);r&&r.classList.remove(u.sliderTabHandle),s.EventHandler.add(document,"mousemove touchmove",this.dragRangeBarMove,this),s.EventHandler.add(document,"mouseup touchend",this.dragRangeBarUp,this)}},t.prototype.elementClick=function(e){if(this.isDragComplete)return void(this.isDragComplete=!1);e.preventDefault(),this.focusSliderElement(),this.sliderBarClick(e),this.focusHandle()},t.prototype.wireEvents=function(){this.onresize=this.reposition.bind(this),window.addEventListener("resize",this.onresize),this.enabled&&!this.readonly&&(s.EventHandler.add(this.element,"click",this.elementClick,this),"Range"===this.type&&this.drag&&s.EventHandler.add(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown,this),s.EventHandler.add(this.sliderContainer,"keydown",this.keyDown,this),s.EventHandler.add(this.sliderContainer,"keyup",this.keyUp,this),s.EventHandler.add(this.element,"focusout",this.sliderFocusOut,this),s.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&&s.EventHandler.add(this.formElement,"reset",this.formResetHandler,this))},t.prototype.unwireEvents=function(){s.EventHandler.remove(this.element,"click",this.elementClick),"Range"===this.type&&this.drag&&s.EventHandler.remove(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown),s.EventHandler.remove(this.sliderContainer,"keydown",this.keyDown),s.EventHandler.remove(this.sliderContainer,"keyup",this.keyUp),s.EventHandler.remove(this.element,"focusout",this.sliderFocusOut),s.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),s.EventHandler.remove(this.element,"reset",this.formResetHandler)},t.prototype.formResetHandler=function(){this.setProperties({value:this.formResetValue},!0),this.setValue()},t.prototype.keyUp=function(e){if(9===e.keyCode&&e.target.classList.contains(u.sliderHandle)&&(this.focusSliderElement(),!e.target.classList.contains(u.sliderTabHandle))){this.element.querySelector("."+u.sliderTabHandle)&&this.element.querySelector("."+u.sliderTabHandle).classList.remove(u.sliderTabHandle),e.target.classList.add(u.sliderTabHandle);var t=e.target.parentElement;t===this.element&&(t.querySelector("."+u.sliderTrack).classList.add(u.sliderTabTrack),"Range"!==this.type&&"MinRange"!==this.type||t.querySelector("."+u.rangeBar).classList.add(u.sliderTabRange)),"Range"===this.type&&(e.target.previousSibling.classList.contains(u.sliderHandle)?this.activeHandle=2:this.activeHandle=1),this.getHandle().focus(),this.tooltipToggle(this.getHandle())}this.closeTooltip(),this.changeEvent("changed",e)},t.prototype.hover=function(e){if(!i.i(s.isNullOrUndefined)(e))if("mouseover"===e.type||"touchmove"===e.type||"mousemove"===e.type||"pointermove"===e.type||"touchstart"===e.type)this.sliderContainer.classList.add(u.sliderHover);else{this.sliderContainer.classList.remove(u.sliderHover);var t=e.currentTarget;this.tooltip.isVisible&&"Always"!==this.tooltip.showOn&&this.tooltipObj&&this.isMaterialTooltip&&!t.classList.contains(u.sliderHandleFocused)&&!t.classList.contains(u.sliderTabHandle)&&this.closeMaterialTooltip()}},t.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("."+u.sliderTabHandle)&&this.element.querySelector("."+u.sliderTabHandle).classList.remove(u.sliderTabHandle),this.element.querySelector("."+u.sliderTabTrack)&&(this.element.querySelector("."+u.sliderTabTrack).classList.remove(u.sliderTabTrack),"Range"!==this.type&&"MinRange"!==this.type||!this.element.querySelector("."+u.sliderTabRange)||this.element.querySelector("."+u.sliderTabRange).classList.remove(u.sliderTabRange)),this.hiddenInput.focus(),this.hiddenInput.blur(),this.isElementFocused=!1)},t.prototype.removeElement=function(e){e.parentNode&&e.parentNode.removeChild(e)},t.prototype.changeSliderType=function(e,t){this.isMaterialTooltip&&this.materialHandle&&(this.sliderContainer.classList.remove(u.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&&!i.i(s.isNullOrUndefined)(this.tooltipObj)&&(this.tooltipObj.destroy(),this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0),this.limits.enabled&&("MinRange"===e||"Default"===e?i.i(s.isNullOrUndefined)(this.limitBarFirst)||(this.removeElement(this.limitBarFirst),this.limitBarFirst=void 0):i.i(s.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(!1),"Range"===this.type&&this.wireSecondHandleEvt(!1),this.setValue(),this.tooltip.isVisible&&(this.renderTooltip(),this.wireMaterialTooltipEvent(!1)),this.setBarColor(),"tooltip"!==t&&this.updateConfig(),this.readonly&&(this.sliderContainer.classList.remove(u.readonly),this.setReadOnly())},t.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;i.i(s.attributes)(e?this.secondBtn:this.firstBtn,{"aria-label":"Decrease",title:"Decrease"}),i.i(s.attributes)(e?this.firstBtn:this.secondBtn,{"aria-label":"Increase",title:"Increase"})}},t.prototype.changeOrientation=function(){this.changeSliderType(this.type,"null")},t.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()},t.prototype.limitsPropertyChange=function(){this.limits.enabled?(i.i(s.isNullOrUndefined)(this.limitBarFirst)&&"Range"!==this.type&&this.createLimitBar(),i.i(s.isNullOrUndefined)(this.limitBarFirst)&&i.i(s.isNullOrUndefined)(this.limitBarSecond)&&"Range"===this.type&&this.createLimitBar(),this.setLimitBar(),this.setValue()):(i.i(s.isNullOrUndefined)(this.limitBarFirst)||i.i(s.detach)(this.limitBarFirst),i.i(s.isNullOrUndefined)(this.limitBarSecond)||i.i(s.detach)(this.limitBarSecond))},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.unwireEvents(),window.removeEventListener("resize",this.onresize),i.i(s.removeClass)([this.sliderContainer],[u.sliderDisabled]),this.firstHandle.removeAttribute("aria-orientation"),"Range"===this.type&&this.secondHandle.removeAttribute("aria-orientation"),this.sliderContainer.parentNode.insertBefore(this.element,this.sliderContainer),i.i(s.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},t.prototype.onPropertyChanged=function(e,t){for(var n=this,a=0,r=Object.keys(e);a<r.length;a++){var l=r[a];switch(l){case"cssClass":this.setCSSClass(t.cssClass);break;case"value":if(e&&t){var o=i.i(s.isNullOrUndefined)(e.value)?"Range"===this.type?[this.min,this.max]:this.min:e.value;this.setProperties({value:o},!0),i.i(s.isNullOrUndefined)(t.value)||t.value.toString()===o.toString()||(this.setValue(),this.refreshTooltip(this.tooltipTarget),"Range"===this.type&&(i.i(s.isNullOrUndefined)(e.value)||t.value[1]===o[1]?this.activeHandle=1:this.activeHandle=2))}break;case"min":case"step":case"max":this.setMinMaxValue();break;case"tooltip":i.i(s.isNullOrUndefined)(e.tooltip)||i.i(s.isNullOrUndefined)(t.tooltip)||(this.initialTooltip=!0,this.setTooltip(l),this.showButtons||this.wireEvents());break;case"type":i.i(s.isNullOrUndefined)(t)||!Object.keys(t).length||i.i(s.isNullOrUndefined)(t.type)||(this.changeSliderType(t.type,l),this.setZindex());break;case"enableRtl":t.enableRtl!==e.enableRtl&&"Vertical"!==this.orientation&&(this.rtl=t.enableRtl,this.changeRtl());break;case"limits":this.limitsPropertyChange();break;case"orientation":this.changeOrientation();break;case"ticks":i.i(s.isNullOrUndefined)(this.sliderContainer.querySelector("."+u.scale))||(i.i(s.detach)(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,function(e){e.match(/e-scale-/)&&n.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(u.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()}}},t.prototype.setReadOnly=function(){this.readonly?(this.unwireEvents(),this.sliderContainer.classList.add(u.readonly)):(this.wireEvents(),this.sliderContainer.classList.remove(u.readonly))},t.prototype.setMinMaxValue=function(){var e=this;this.setValue(),this.refreshTooltip(this.tooltipTarget),i.i(s.isNullOrUndefined)(this.sliderContainer.querySelector("."+u.scale))||this.ul&&(i.i(s.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())},t.prototype.setZindex=function(){this.zIndex=6,i.i(s.isNullOrUndefined)(this.ticks)||"None"===this.ticks.placement||i.i(s.isNullOrUndefined)(this.ul)||i.i(s.isNullOrUndefined)(this.element)||(this.ul.style.zIndex=this.zIndex+-7+"",this.element.style.zIndex=this.zIndex+2+""),this.isMaterial||this.isMaterial3||i.i(s.isNullOrUndefined)(this.ticks)||"Both"!==this.ticks.placement||(this.element.style.zIndex=this.zIndex+2+""),i.i(s.isNullOrUndefined)(this.firstHandle)||(this.firstHandle.style.zIndex=this.zIndex+3+""),"Range"!==this.type||i.i(s.isNullOrUndefined)(this.secondHandle)||(this.secondHandle.style.zIndex=this.zIndex+4+"")},t.prototype.setTooltip=function(e){this.changeSliderType(this.type,e)},t.prototype.setBarColor=function(){for(var e,t,n=this.sliderTrack.lastElementChild;n;)this.sliderTrack.removeChild(n),n=this.sliderTrack.lastElementChild;for(var a=0;a<this.colorRange.length;a++)if(!i.i(s.isNullOrUndefined)(this.colorRange[a].start)&&!i.i(s.isNullOrUndefined)(this.colorRange[a].end)&&this.colorRange[a].end>this.colorRange[a].start){this.colorRange[a].start<this.min&&(this.colorRange[a].start=this.min),this.colorRange[a].end>this.max&&(this.colorRange[a].end=this.max);var r=this.checkHandlePosition(this.colorRange[a].start),l=this.checkHandlePosition(this.colorRange[a].end),o=this.createElement("div");o.style.backgroundColor=this.colorRange[a].color,o.style.border="1px solid "+this.colorRange[a].color,"Horizontal"===this.orientation?(t=u.sliderHorizantalColor,e=this.enableRtl?i.i(s.isNullOrUndefined)(this.customValues)?this.checkHandlePosition(this.max)-this.checkHandlePosition(this.colorRange[a].end):this.checkHandlePosition(this.customValues.length-this.colorRange[a].end-1):this.checkHandlePosition(this.colorRange[a].start),o.style.width=l-r+"px",o.style.left=e+"px"):(t=u.sliderVerticalColor,e=this.checkHandlePosition(this.colorRange[a].start),o.style.height=l-r+"px",o.style.bottom=e+"px"),o.classList.add(t),this.sliderTrack.appendChild(o)}},t.prototype.getModuleName=function(){return"slider"},r([i.i(s.Property)(null)],t.prototype,"value",void 0),r([i.i(s.Property)(null)],t.prototype,"customValues",void 0),r([i.i(s.Property)(1)],t.prototype,"step",void 0),r([i.i(s.Property)(null)],t.prototype,"width",void 0),r([i.i(s.Property)(0)],t.prototype,"min",void 0),r([i.i(s.Property)(100)],t.prototype,"max",void 0),r([i.i(s.Property)(!1)],t.prototype,"readonly",void 0),r([i.i(s.Property)("Default")],t.prototype,"type",void 0),r([i.i(s.Collection)([{}],o)],t.prototype,"colorRange",void 0),r([i.i(s.Complex)({},l)],t.prototype,"ticks",void 0),r([i.i(s.Complex)({},h)],t.prototype,"limits",void 0),r([i.i(s.Property)(!0)],t.prototype,"enabled",void 0),r([i.i(s.Complex)({},d)],t.prototype,"tooltip",void 0),r([i.i(s.Property)(!1)],t.prototype,"showButtons",void 0),r([i.i(s.Property)(!0)],t.prototype,"enableAnimation",void 0),r([i.i(s.Property)("Horizontal")],t.prototype,"orientation",void 0),r([i.i(s.Property)("")],t.prototype,"cssClass",void 0),r([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),r([i.i(s.Event)()],t.prototype,"change",void 0),r([i.i(s.Event)()],t.prototype,"changed",void 0),r([i.i(s.Event)()],t.prototype,"renderingTicks",void 0),r([i.i(s.Event)()],t.prototype,"renderedTicks",void 0),r([i.i(s.Event)()],t.prototype,"tooltipChange",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t){e.exports=i},function(e,t,i){"use strict";var s=i(19);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(6);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(20);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c})},function(e,t,i){"use strict";var s=i(3);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c}),i.d(t,"d",function(){return s.d}),i.d(t,"e",function(){return s.e}),i.d(t,"f",function(){return s.f}),i.d(t,"g",function(){return s.g}),i.d(t,"h",function(){return s.h}),i.d(t,"i",function(){return s.i}),i.d(t,"j",function(){return s.j}),i.d(t,"k",function(){return s.k}),i.d(t,"l",function(){return s.l}),i.d(t,"m",function(){return s.m}),i.d(t,"n",function(){return s.n}),i.d(t,"o",function(){return s.o}),i.d(t,"p",function(){return s.p}),i.d(t,"q",function(){return s.q}),i.d(t,"r",function(){return s.r}),i.d(t,"s",function(){return s.s}),i.d(t,"t",function(){return s.t}),i.d(t,"u",function(){return s.u}),i.d(t,"v",function(){return s.v});var n=i(23);i.d(t,"w",function(){return n.a})},function(e,t,i){"use strict";var s=i(26);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c})},function(e,t,i){"use strict";var s=i(27);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(7);i.d(t,"a",function(){return s.b}),i.d(t,"b",function(){return s.c}),i.d(t,"c",function(){return s.d}),i.d(t,"d",function(){return s.e}),i.d(t,"e",function(){return s.a})},function(e,t,i){"use strict";var s=i(28);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(29);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";var s=i(30);i.d(t,"a",function(){return s.a}),i.d(t,"b",function(){return s.b}),i.d(t,"c",function(){return s.c}),i.d(t,"d",function(){return s.d})},function(e,t,i){"use strict";i.d(t,"a",function(){return P});var s=i(0),n=(i.n(s),i(8)),a=(i.n(n),i(2)),r=(i.n(a),i(4)),l=i(5),o=i(7),h=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),d=this&&this.__decorate||function(e,t,i,s){var n,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},u="e-apply",c="e-ctrl-btn",p="e-switch-ctrl-btn",m="e-hide-hex-value",v="e-hide-switchable-value",f="e-hide-value",g="e-hsv-color",y="e-selected-value",b="e-mode-switch-btn",C="e-nocolor-item",E="e-opacity-value",x="e-preview-container",S="e-show-value",T="e-selected",k="e-tile",L={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"]},P=function(e){function t(t,i){return e.call(this,t,i)||this}return h(t,e),t.prototype.preRender=function(){var e=this.element;this.formElement=i.i(s.closest)(this.element,"form"),this.formElement&&s.EventHandler.add(this.formElement,"reset",this.formResetHandler,this);var t={Apply:"Apply",Cancel:"Cancel",ModeSwitcher:"Switch Mode"};this.l10n=new s.L10n("colorpicker",t,this.locale),e.getAttribute("ejs-for")&&!e.getAttribute("name")&&e.setAttribute("name",e.id)},t.prototype.render=function(){this.initWrapper(),this.inline?this.createWidget():this.createSplitBtn(),this.enableOpacity||i.i(s.addClass)([this.container.parentElement],"e-hide-opacity"),this.renderComplete()},t.prototype.initWrapper=function(){var e=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"});this.element.parentNode.insertBefore(e,this.element),e.appendChild(this.element),i.i(s.attributes)(this.element,{tabindex:"-1",spellcheck:"false","aria-label":"colorpicker"}),this.container=this.createElement("div",{className:"e-container"}),this.getWrapper().appendChild(this.container);var t=this.value?this.roundValue(this.value).toLowerCase():"#008000ff";this.noColor&&"Palette"===this.mode&&""===this.value&&(t="");var n=t.slice(0,7);i.i(s.isNullOrUndefined)(this.initialInputValue)&&(this.initialInputValue=n),this.element.value=n,this.enableOpacity?this.setProperties({value:t},!0):this.setProperties({value:n},!0),this.enableRtl&&e.classList.add("e-rtl"),this.cssClass&&i.i(s.addClass)([e],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.tileRipple=i.i(s.rippleEffect)(this.container,{selector:"."+k}),this.ctrlBtnRipple=i.i(s.rippleEffect)(this.container,{selector:".e-btn"})},t.prototype.getWrapper=function(){return this.element.parentElement},t.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),s.Browser.isDevice&&this.refreshPopupPos()},t.prototype.createSplitBtn=function(){var e=this,t=this.createElement("button",{className:"e-split-colorpicker"});this.getWrapper().appendChild(t),this.splitBtn=new n.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(t);var r=this.createElement("span",{className:"e-split-preview"});i.i(s.select)(".e-selected-color",t).appendChild(r),r.style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value));var l=this.getPopupEle();if(i.i(s.addClass)([l],"e-colorpicker-popup"),this.cssClass&&i.i(s.addClass)([l],this.cssClass.replace(/\s+/g," ").trim().split(" ")),s.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,l.style.zIndex=i.i(a.getZindexPartial)(this.splitBtn.element).toString()}this.bindCallBackEvent()},t.prototype.onOpen=function(){if(this.trigger("open",{element:this.container}),!s.Browser.isDevice){var e=this.getPopupInst();i.i(a.isCollide)(e.element).length>0&&(e.collision={X:"flip",Y:"fit"},e.position={X:"right",Y:"bottom"},e.targetType="container")}},t.prototype.getPopupInst=function(){return i.i(s.getInstance)(this.getPopupEle(),a.Popup)},t.prototype.bindCallBackEvent=function(){var e=this;this.splitBtn.beforeOpen=function(t){var r=new n.Deferred;return e.trigger("beforeOpen",t,function(n){if(!n.cancel){var l=e.getPopupEle();if(l.style.top=i.i(s.formatUnit)(0+pageYOffset),l.style.left=i.i(s.formatUnit)(0+pageXOffset),l.style.display="block",e.createWidget(),l.style.display="",s.Browser.isDevice){if(e.createPopupOnClick){var o=e.getPopupInst();o.relateTo=document.body,o.position={X:"center",Y:"center"},o.targetType="container",o.collision={X:"fit",Y:"fit"},o.offsetY=4,l.style.zIndex=i.i(a.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,l),document.body.className+=" e-colorpicker-overflow",e.modal.style.display="block",e.modal.style.zIndex=(Number(l.style.zIndex)-1).toString()}}t.cancel=n.cancel,r.resolve(n)}),r},this.splitBtn.beforeClose=function(t){var a=new n.Deferred;if(i.i(s.isNullOrUndefined)(t.event))a.resolve(t);else{var r={element:e.container,event:t.event,cancel:!1};e.trigger("beforeClose",r,function(i){s.Browser.isDevice&&t.event.target===e.modal&&(i.cancel=!0),i.cancel||e.onPopupClose(),t.cancel=i.cancel,a.resolve(i)})}return a}},t.prototype.onPopupClose=function(){this.unWireEvents(),this.destroyOtherComp(),this.container.style.width="",i.i(s.select)(".e-split-preview",this.splitBtn.element).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value)),this.container.innerHTML="",i.i(s.removeClass)([this.container],["e-color-picker","e-color-palette"]),s.Browser.isDevice&&this.modal&&(i.i(s.removeClass)([document.body],"e-colorpicker-overflow"),this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},t.prototype.createPalette=function(){if(i.i(s.classList)(this.container,["e-color-palette"],["e-color-picker"]),this.presetColors){var e=this.createElement("div",{className:"e-custom-palette"});this.appendElement(e);var t=Object.keys(this.presetColors);if(1===t.length)this.appendPalette(this.presetColors[t[0]],t[0],e);else for(var n=0,a=t.length;n<a;n++)this.appendPalette(this.presetColors[t[n]],t[n],e);i.i(s.selectAll)(".e-row",e).length>10&&i.i(s.addClass)([e],"e-palette-group")}else this.appendPalette(L.default,"default");"Palette"===this.mode&&!this.modeSwitcher&&this.noColor&&this.setNoColor();var r=parseInt(getComputedStyle(this.container).borderBottomWidth,10);this.container.style.width=i.i(s.formatUnit)(this.container.children[0].offsetWidth+r+r),this.rgb=this.hexToRgb(this.roundValue(this.value)),this.hsv=this.rgbToHsv.apply(this,this.rgb)},t.prototype.firstPaletteFocus=function(){i.i(s.select)("."+T,this.container.children[0])||i.i(s.selectAll)(".e-palette",this.container)[0].focus()},t.prototype.appendPalette=function(e,t,i){var s=this.createElement("div",{className:"e-palette",attrs:{tabindex:"0",role:"grid"}});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:k,attrs:{role:"gridcell","aria-label":r,"aria-selected":"false",tabindex:"0"}}),this.trigger("beforeTileRender",{element:a,presetName:t,value:e[l]}),n.appendChild(a),this.value===r&&(this.addTileSelection(a),s.focus()),a.style.backgroundColor=this.convertToRgbString(this.hexToRgb(r))},t.prototype.setNoColor=function(){var e=this.container.querySelector(".e-row").children[0];e.classList.add(C),this.value||(e.classList.add(T),i.i(s.closest)(e,".e-palette").focus()),["aria-selected","aria-label"].forEach(function(t){e.removeAttribute(t)}),e.style.backgroundColor=""},t.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)},t.prototype.addTileSelection=function(e){e.classList.add(T),e.setAttribute("aria-selected","true")},t.prototype.createPicker=function(){i.i(s.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:g}));var t=this.createElement("span",{className:"e-handler",attrs:{tabindex:"0"}});e.appendChild(t),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()},t.prototype.setHsvContainerBg=function(e){void 0===e&&(e=this.hsv[0]),this.getHsvContainer().style.backgroundColor=this.convertToRgbString(this.hsvToRgb(e,100,100,1))},t.prototype.getHsvContainer=function(){return i.i(s.select)(".e-hsv-container",this.container)},t.prototype.setHandlerPosition=function(){var e=this.getDragHandler(),t=i.i(s.select)("."+g,this.container);this.enableRtl?e.style.left=i.i(s.formatUnit)(t.offsetWidth*Math.abs(100-this.hsv[1])/100):e.style.left=i.i(s.formatUnit)(t.offsetWidth*this.hsv[1]/100),e.style.top=i.i(s.formatUnit)(t.offsetHeight*(100-this.hsv[2])/100)},t.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 o.a({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))},t.prototype.createOpacitySlider=function(e){this.opacitySlider=new o.a({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()},t.prototype.updateOpacitySliderBg=function(){var e=this.enableRtl?"to left":"to right",t=i.i(s.select)(".e-opacity-empty-track",this.opacitySlider.element);t&&(t.style.background="linear-gradient("+e+", rgba("+this.rgb.slice(0,3)+", 0) 0%, "+this.convertToRgbString(this.rgb.slice(0,3))+" 100%)")},t.prototype.hueChange=function(e){this.hsv[0]=e.value,this.setHsvContainerBg(),this.convertToOtherFormat()},t.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)},t.prototype.updateOpacityInput=function(e){if(this.enableOpacity&&!this.getWrapper().classList.contains(f)){var t=i.i(s.getInstance)(i.i(s.select)("."+E,this.container),l.a);t.value=e,t.dataBind()}},t.prototype.createPreview=function(e){var t=this.createElement("div",{className:x});e.appendChild(t);var i=this.createElement("span",{className:"e-preview e-current"});t.appendChild(i);var s=this.convertToRgbString(this.rgb);i.style.backgroundColor=s,i=this.createElement("span",{className:"e-preview e-previous"}),t.appendChild(i),i.style.backgroundColor=s},t.prototype.isPicker=function(){return!this.container.classList.contains("e-color-palette")},t.prototype.getPopupEle=function(){return this.container.parentElement},t.prototype.createNumericInput=function(e,t,i,s){var n=this,a=new l.a({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)},t.prototype.createInput=function(){var e=this.isPicker(),t=this.getWrapper();if(e&&!t.classList.contains(f)||!e&&t.classList.contains(S)){var i=this.createElement("div",{className:y});e?this.appendElement(i,2):this.appendElement(i,1);var s=this.createElement("div",{className:"e-input-container"});if(i.appendChild(s),t.classList.contains("e-hide-valueswitcher")||this.appendValueSwitchBtn(i),!t.classList.contains(m)){var n=this.createElement("input",{className:"e-hex",attrs:{maxlength:"7",spellcheck:"false","aria-label":"HEX"}});s.appendChild(n),r.c.createInput({element:n,floatLabelType:"Always",properties:{placeholder:"HEX",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker()}},this.createElement),r.c.setValue(this.value.slice(0,7),n),n.addEventListener("input",this.inputHandler.bind(this))}if(!t.classList.contains(v)){var a=void 0,l=void 0;this.isRgb?(a="RGB",l=this.rgb):(a="HSV",l=this.hsv);for(var o=["rh","gs","bv"],h=0;h<3;h++)this.createNumericInput(s.appendChild(this.createElement("input",{className:"e-"+o[h]+"-value"})),l[h],a[h],255);this.enableOpacity&&this.appendOpacityValue(s)}}},t.prototype.appendOpacityValue=function(e){this.createNumericInput(e.appendChild(this.createElement("input",{className:E})),100*this.rgb[3],"A",100)},t.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(v)&&t.addEventListener("click",this.formatSwitchHandler.bind(this))},t.prototype.createCtrlBtn=function(){if(this.modeSwitcher||this.showButtons){this.l10n.setLocale(this.locale);var e=this.createElement("div",{className:p});if(this.container.appendChild(e),this.showButtons){var t=this.createElement("div",{className:c});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 "+u,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()}},t.prototype.appendModeSwitchBtn=function(){var e=this.createElement("button",{className:"e-icons e-btn e-flat e-icon-btn "+b,attrs:{title:this.l10n.getConstant("ModeSwitcher")}});i.i(s.select)("."+p,this.container).insertBefore(e,i.i(s.select)("."+c,this.container))},t.prototype.createDragTooltip=function(){var e=this,t=new a.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"}}});t.createElement=this.createElement,t.appendTo(this.container),t.open(this.container),this.tooltipEle.style.zIndex=i.i(a.getZindexPartial)(this.tooltipEle).toString(),this.tooltipEle.setAttribute("aria-label","colorpicker-tooltip"),i.i(s.select)(".e-tip-content",this.tooltipEle).appendChild(this.createElement("div",{className:"e-tip-transparent"}))},t.prototype.getTooltipInst=function(){return i.i(s.getInstance)(this.container,a.Tooltip)},t.prototype.setTooltipOffset=function(e){this.getTooltipInst().offsetY=e},t.prototype.toggleDisabled=function(e){e?this.getWrapper().classList.add("e-disabled"):this.getWrapper().classList.remove("e-disabled"),this.showButtons&&[].slice.call(i.i(s.selectAll)(".e-btn",this.container)).forEach(function(t){e?i.i(s.attributes)(t,{disabled:""}):t.removeAttribute("disabled")})},t.prototype.convertToRgbString=function(e){return e.length?4===e.length?"rgba("+e.join()+")":"rgb("+e.join()+")":""},t.prototype.convertToHsvString=function(e){return 4===e.length?"hsva("+e.join()+")":"hsv("+e.join()+")"},t.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()},t.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)},t.prototype.updateInput=function(e){var t=this.getWrapper();t.classList.contains(f)||(t.classList.contains(m)||r.c.setValue(e.substr(0,7),i.i(s.select)(".e-hex",this.container)),t.classList.contains(v)||(this.isRgb?this.updateValue(this.rgb,!1):this.updateValue(this.hsv,!1)))},t.prototype.updatePreview=function(e){this.enableOpacity&&this.updateOpacitySliderBg(),i.i(s.select)(".e-tip-transparent",this.tooltipEle).style.backgroundColor=e,i.i(s.select)("."+x+" .e-current",this.container).style.backgroundColor=e,i.i(s.select)("."+x+" .e-previous",this.container).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value))},t.prototype.getDragHandler=function(){return i.i(s.select)(".e-handler",this.container)},t.prototype.removeTileSelection=function(){[].slice.call(i.i(s.selectAll)("."+T,this.container.children[0])).forEach(function(e){e.classList.remove(T),e.setAttribute("aria-selected","false")})},t.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)})},t.prototype.getValue=function(e,t){if(e||(e=this.value),t=t?t.toLowerCase():"hex","r"===e[0]){var i=this.convertRgbToNumberArray(e);if("hex"===t||"hexa"===t){var 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"},t.prototype.toggle=function(){this.container.parentElement.classList.contains("e-popup-close")?this.splitBtn.toggle():this.closePopup(null)},t.prototype.getModuleName=function(){return"colorpicker"},t.prototype.getPersistData=function(){return this.addOnPersist(["value"])},t.prototype.wireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();s.EventHandler.add(e,"keydown",this.pickerKeyDown,this);var t=i.i(s.select)("."+c,this.container);t&&s.EventHandler.add(t,"keydown",this.ctrlBtnKeyDown,this),s.EventHandler.add(this.getHsvContainer(),"mousedown touchstart",this.handlerDown,this),(this.modeSwitcher||this.showButtons)&&this.addCtrlSwitchEvent(),s.EventHandler.add(i.i(s.select)(".e-previous",this.container),"click",this.previewHandler,this)}else s.EventHandler.add(this.container,"click",this.paletteClickHandler,this),s.EventHandler.add(this.container,"keydown",this.paletteKeyDown,this)},t.prototype.formResetHandler=function(){this.value=this.initialInputValue,i.i(s.attributes)(this.element,{value:this.initialInputValue})},t.prototype.addCtrlSwitchEvent=function(){var e=i.i(s.select)("."+p,this.container);e&&s.EventHandler.add(e,"click",this.btnClickHandler,this)},t.prototype.ctrlBtnKeyDown=function(e){if(13===e.keyCode){if(i.i(s.select)("."+u,this.container)){var t=this.rgbToHex(this.rgb);this.triggerChangeEvent(t)}this.splitBtn.element.focus()}},t.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,e)}},t.prototype.enterKeyHandler=function(e,t){this.triggerChangeEvent(e),this.inline||this.splitBtn.element.focus()},t.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())})},t.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.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:i},!0),this.element.value=i||"#000000"},t.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)},t.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(),s.EventHandler.add(document,"mousemove touchmove",this.handlerMove,this),s.EventHandler.add(document,"mouseup touchend",this.handlerEnd,this)},t.prototype.handlerMove=function(e){"touchmove"!==e.type&&e.preventDefault();var t,n;"mousemove"===e.type?(t=Math.abs(e.pageX-pageXOffset),n=Math.abs(e.pageY-pageYOffset)):(t=Math.abs(e.changedTouches[0].pageX-pageXOffset),n=Math.abs(e.changedTouches[0].pageY-pageYOffset)),this.setHsv(t,n);var a=this.getDragHandler();this.updateHsv(),this.convertToOtherFormat(!1,e),this.getTooltipInst().refresh(a),this.tooltipEle.style.transform||(Math.abs(this.clientX-t)>8||Math.abs(this.clientY-n)>8)&&(i.i(s.select)("."+g,this.container).style.cursor="pointer",a.style.transition="none",this.inline||(this.tooltipEle.style.zIndex=(parseInt(this.getPopupEle().style.zIndex,10)+1).toString()),this.tooltipEle.style.transform="rotate(45deg)",a.classList.add("e-hide-handler"))},t.prototype.setHsv=function(e,t){var n=i.i(s.select)("."+g,this.container),a=n.getBoundingClientRect();e=this.enableRtl?e>a.right?0:Math.abs(e-a.right):e>a.left?Math.abs(e-a.left):0,t=t>a.top?Math.abs(t-a.top):0,this.hsv[2]=Math.round(10*Number(100*(n.offsetHeight-Math.max(0,Math.min(n.offsetHeight,t-n.offsetTop)))/n.offsetHeight))/10,this.hsv[1]=Math.round(10*Number(100*Math.max(0,Math.min(n.offsetWidth,e-n.offsetLeft))/n.offsetWidth))/10},t.prototype.handlerEnd=function(e){"touchend"!==e.type&&e.preventDefault(),s.EventHandler.remove(document,"mousemove touchmove",this.handlerMove),s.EventHandler.remove(document,"mouseup touchend",this.handlerEnd);var t=this.getDragHandler();i.i(s.select)("."+g,this.container).style.cursor="",this.tooltipEle.style.transform&&(this.tooltipEle.style.transform="",t.classList.remove("e-hide-handler")),this.inline||this.showButtons||this.closePopup(e)},t.prototype.btnClickHandler=function(e){var t=e.target;i.i(s.closest)(t,"."+b)?(e.stopPropagation(),this.switchToPalette()):(t.classList.contains(u)||t.classList.contains("e-cancel"))&&this.ctrlBtnClick(t,e)},t.prototype.switchToPalette=function(){this.trigger("beforeModeSwitch",{element:this.container,mode:"Palette"}),this.unWireEvents(),this.destroyOtherComp(),i.i(s.detach)(i.i(s.select)(".e-slider-preview",this.container)),this.getWrapper().classList.contains(f)||i.i(s.remove)(i.i(s.select)("."+y,this.container)),i.i(s.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"})},t.prototype.refreshImageEditorPopupPos=function(){if(s.Browser.isDevice){var e=this.getPopupEle();e.style.left=i.i(s.formatUnit)(0+pageXOffset),e.style.top=i.i(s.formatUnit)(0+pageYOffset);var t=document.querySelector("#"+this.element.parentElement.parentElement.id.split("-popup")[0]);t&&e.parentElement.ej2_instances[0].refreshPosition(t)}},t.prototype.refreshPopupPos=function(){if(!this.inline){var e=this.getPopupEle();e.style.left=i.i(s.formatUnit)(0+pageXOffset),e.style.top=i.i(s.formatUnit)(0+pageYOffset),this.getPopupInst().refreshPosition(this.splitBtn.element.parentElement)}},t.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)},t.prototype.updateValue=function(e,t,n,a){for(var r,o=["e-rh-value","e-gs-value","e-bv-value"],h=0,d=o.length;h<d;h++)r=i.i(s.getInstance)(i.i(s.select)("."+o[h],this.container),l.a),r.value=Math.round(e[h]),t&&(r.placeholder=o[h].substr(n,1).toUpperCase(),r.max=a?a[h]:255),r.dataBind()},t.prototype.previewHandler=function(e){var t=e.target,n=this.rgbToHex(this.rgb);this.rgb=this.convertRgbToNumberArray(t.style.backgroundColor),this.rgb[3]||(this.rgb[3]=1);var a=this.rgbToHex(this.rgb),r=this.rgbToHsv.apply(this,this.rgb);r[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:r[0]},!0),this.hueSlider.refresh()),this.setHsvContainerBg(r[0]),this.enableOpacity&&r[3]!==this.hsv[3]&&(this.opacitySlider.setProperties({value:100*r[3]},!0),this.opacitySlider.refresh(),this.updateOpacitySliderBg()),this.hsv=r,this.setHandlerPosition(),this.updateInput(a),i.i(s.select)("."+x+" .e-current",this.container).style.backgroundColor=this.convertToRgbString(this.rgb),this.triggerEvent(a,n,this.convertToRgbString(this.rgb),!1,e)},t.prototype.paletteClickHandler=function(e){e.preventDefault();var t=e.target;if(t.classList.contains(k)){if(this.removeTileSelection(),this.addTileSelection(t),t.classList.contains(C))this.noColorTile();else{var n=t.getAttribute("aria-label"),a=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(this.roundValue(n)),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(S)&&this.updateInput(n),this.triggerEvent(n,a,this.convertToRgbString(this.rgb),!1,e)}this.inline||this.showButtons||this.closePopup(e)}else i.i(s.closest)(t,"."+b)?this.switchToPicker():t.classList.contains(u)||t.classList.contains("e-cancel")?this.ctrlBtnClick(t,e):this.getWrapper().classList.contains(S)&&i.i(s.closest)(t,".e-value-switch-btn")&&this.formatSwitchHandler()},t.prototype.noColorTile=function(e){void 0===e&&(e=!1);var t=this.rgbToHex(this.rgb);this.rgb=[],this.hsv=[],this.triggerEvent("",t,"",e)},t.prototype.switchToPicker=function(){var e=this.getWrapper();this.trigger("beforeModeSwitch",{element:this.container,mode:"Picker"}),this.unWireEvents(),[].slice.call(i.i(s.selectAll)(".e-palette",this.container)).forEach(function(e){i.i(s.detach)(e)}),e.classList.contains(S)&&i.i(s.detach)(i.i(s.select)("."+y,this.container)),this.container.style.width="";var t=i.i(s.select)(".e-custom-palette",this.container);this.presetColors&&i.i(s.remove)(t),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"})},t.prototype.ctrlBtnClick=function(e,t){if(e.classList.contains(u)){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()},t.prototype.paletteKeyDown=function(e){var t=e.target;if(t.classList.contains("e-palette")){var n,a,r=[].slice.call(i.i(s.selectAll)("."+k,t)),l=r.filter(function(e){return e.classList.contains("e-selected")}).pop();switch(!e.altKey&&e.keyCode){case 39:e.preventDefault(),n=l?r[this.tilePosition(r,l,this.enableRtl?-1:1)]:r[this.enableRtl?r.length-1:0],this.keySelectionChanges(n);break;case 37:e.preventDefault(),n=l?r[this.tilePosition(r,l,this.enableRtl?1:-1)]:r[this.enableRtl?0:r.length-1],this.keySelectionChanges(n);break;case 38:e.preventDefault(),a=l?this.tilePosition(r,l,-this.columns):0,n=r[a]?r[a]:r[a-this.columns],this.keySelectionChanges(n);break;case 40:e.preventDefault(),a=l?this.tilePosition(r,l,this.columns):r.length-1,r[a]?n=r[a]:(a%=r.length,a+=r[r.length-1].parentElement.childElementCount,n=r[a]),this.keySelectionChanges(n);break;case 13:if(e.preventDefault(),l){var o=l.getAttribute("aria-label");this.enterKeyHandler(o||"",e)}}}},t.prototype.keySelectionChanges=function(e){if(this.removeTileSelection(),this.addTileSelection(e),e.classList.contains(C))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(S)&&this.updateInput(t),this.triggerEvent(t,i,this.convertToRgbString(this.rgb),!0)}},t.prototype.tilePosition=function(e,t,i){e=Array.prototype.slice.call(e);var s=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},t.prototype.inputHandler=function(e){var t=e.target;if(t.value.length){var n,a;switch(i.i(s.select)(".e-float-text",t.parentElement).textContent){case"HEX":var r="";if(("#"===t.value[0]&&5!==t.value.length||"#"!==t.value[0]&&4!==t.value.length)&&(r=this.roundValue(t.value)),9!==r.length)return;a=this.rgbToHex(this.rgb),this.rgb=this.hexToRgb(r+r.substr(-2)),this.inputValueChange(this.rgbToHsv.apply(this,this.rgb),a,t.value,e);break;case"R":this.rgb[0]!==Number(t.value)&&(a=this.rgbToHex(this.rgb),this.rgb[0]=Number(t.value),n=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(n,a,null,e));break;case"G":this.rgb[1]!==Number(t.value)&&(a=this.rgbToHex(this.rgb),this.rgb[1]=Number(t.value),n=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(n,a,null,e));break;case"B":this.rgb[2]!==Number(t.value)&&(a=this.rgbToHex(this.rgb),this.rgb[2]=Number(t.value),n=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(n,a,null,e));break;case"H":this.hueSlider.value=Number(t.value);break;case"S":this.hsv[1]!==Number(t.value)&&(this.hsv[1]=Number(t.value),this.updateHsv(),this.convertToOtherFormat(!1,e));break;case"V":this.hsv[2]!==Number(t.value)&&(this.hsv[2]=Number(t.value),this.updateHsv(),this.convertToOtherFormat(!1,e));break;case"A":this.opacitySlider.value=Number(t.value)}}},t.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)},t.prototype.triggerEvent=function(e,t,n,a,r){void 0===a&&(a=!1);var l=e.slice(0,7);i.i(s.isNullOrUndefined)(r)&&(r=new MouseEvent("click",{bubbles:!0,cancelable:!1})),this.showButtons||a?this.trigger("select",{currentValue:{hex:l,rgba:n},event:r,previousValue:{hex:t.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(t))}}):(this.trigger("change",{currentValue:{hex:l,rgba:n},event:r,previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:e}),this.enableOpacity?this.setProperties({value:e},!0):this.setProperties({value:l},!0),this.element.value=l||"#000000")},t.prototype.destroy=function(){var t=this,n=this.getWrapper();e.prototype.destroy.call(this),["tabindex","spellcheck"].forEach(function(e){t.element.removeAttribute(e)}),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&&i.i(s.detach)(this.element.nextElementSibling),n&&(n.parentElement.insertBefore(this.element,n),i.i(s.detach)(n)),this.container=null,this.formElement&&s.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},t.prototype.destroyOtherComp=function(){if(this.isPicker()){for(var e=i.i(s.closest)(this.hueSlider.element,".e-color-picker"),t=e.querySelectorAll(".e-numerictextbox"),n=0;n<t.length;n++)i.i(s.getInstance)(t[n],l.a).destroy();this.hueSlider.destroy(),this.enableOpacity&&(this.opacitySlider.destroy(),this.opacitySlider=null),this.hueSlider=null;var a=this.getTooltipInst();a.close(),a.destroy(),this.tooltipEle=null}},t.prototype.isPopupOpen=function(){return this.getPopupEle().classList.contains("e-popup-open")},t.prototype.unWireEvents=function(){if(this.isPicker()){var e=this.getDragHandler();s.EventHandler.remove(e,"keydown",this.pickerKeyDown);var t=i.i(s.select)("."+c,this.container);t&&s.EventHandler.remove(t,"keydown",this.ctrlBtnKeyDown),s.EventHandler.remove(this.getHsvContainer(),"mousedown touchstart",this.handlerDown),(this.modeSwitcher||this.showButtons)&&s.EventHandler.remove(i.i(s.select)("."+p,this.container),"click",this.btnClickHandler),s.EventHandler.remove(i.i(s.select)(".e-previous",this.container),"click",this.previewHandler)}else s.EventHandler.remove(this.container,"click",this.paletteClickHandler),s.EventHandler.remove(this.container,"keydown",this.paletteKeyDown)},t.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},t.prototype.hexToRgb=function(e){if(!e)return[];e=e.trim(),9!==e.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},t.prototype.rgbToHsv=function(e,t,n,a){if(this.rgb&&!this.rgb.length)return[];e/=255,t/=255,n/=255;var r,l=Math.max(e,t,n),o=Math.min(e,t,n),h=l,d=l-o,u=0===l?0:d/l;if(l===o)r=0;else{switch(l){case e:r=(t-n)/d+(t<n?6:0);break;case t:r=(n-e)/d+2;break;case n:r=(e-t)/d+4}r/=6}var c=[Math.round(360*r),Math.round(1e3*u)/10,Math.round(1e3*h)/10];return i.i(s.isNullOrUndefined)(a)||c.push(a),c},t.prototype.hsvToRgb=function(e,t,n,a){var r,l,o;if(t/=100,n/=100,0===t)return r=l=o=n,[Math.round(255*r),Math.round(255*l),Math.round(255*o),a];e/=60;var h=Math.floor(e),d=e-h,u=n*(1-t),c=n*(1-t*d),p=n*(1-t*(1-d));switch(h){case 0:r=n,l=p,o=u;break;case 1:r=c,l=n,o=u;break;case 2:r=u,l=n,o=p;break;case 3:r=u,l=c,o=n;break;case 4:r=p,l=u,o=n;break;default:r=n,l=u,o=c}var m=[Math.round(255*r),Math.round(255*l),Math.round(255*o)];return i.i(s.isNullOrUndefined)(a)||m.push(a),m},t.prototype.rgbToHex=function(e){return e.length?"#"+this.hex(e[0])+this.hex(e[1])+this.hex(e[2])+(i.i(s.isNullOrUndefined)(e[3])?"":0!==e[3]?(Math.round(255*e[3])+65536).toString(16).substr(-2):"00"):""},t.prototype.hex=function(e){return("0"+e.toString(16)).slice(-2)},t.prototype.changeModeSwitcherProp=function(e){var t=i.i(s.select)("."+p,this.container);e?t?this.appendModeSwitchBtn():(this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):t&&(this.showButtons?i.i(s.detach)(i.i(s.select)("."+b,t)):i.i(s.remove)(t))},t.prototype.changeShowBtnProps=function(e){var t=i.i(s.select)("."+p,this.container);e?(t&&i.i(s.remove)(t),this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):this.modeSwitcher?i.i(s.detach)(i.i(s.select)("."+c,t)):i.i(s.remove)(t)},t.prototype.changeValueProp=function(e){if(this.isPicker())this.rgb=this.hexToRgb(e),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHandlerPosition(),i.i(s.detach)(i.i(s.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 t=this.container.querySelector('span[aria-label="'+this.roundValue(e)+'"]');t&&this.addTileSelection(t)}},t.prototype.setInputEleProps=function(){i.i(s.remove)(i.i(s.select)("."+y,this.container)),this.createInput()},t.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())},t.prototype.changeCssClassProps=function(e,t){var n=this.getWrapper(),a=this.getPopupEle();t&&i.i(s.removeClass)([n,a],t.split(" ")),e&&i.i(s.addClass)([n,a],e.replace(/\s+/g," ").trim().split(" "))},t.prototype.changeRtlProps=function(e){e?i.i(s.addClass)([this.getWrapper()],"e-rtl"):i.i(s.removeClass)([this.getWrapper()],"e-rtl")},t.prototype.changePaletteProps=function(){i.i(s.detach)(this.container.children[0]),this.container.style.width="",this.createPalette()},t.prototype.changeOpacityProps=function(e){var t=this.getWrapper();e?(i.i(s.removeClass)([this.container.parentElement],"e-hide-opacity"),this.createOpacitySlider(i.i(s.select)(".e-colorpicker-slider",this.container).appendChild(this.createElement("div",{className:"e-opacity-slider"}))),t.classList.contains(f)||t.classList.contains(v)||this.appendOpacityValue(i.i(s.select)(".e-input-container",this.container))):(i.i(s.addClass)([this.container.parentElement],"e-hide-opacity"),this.opacitySlider.destroy(),i.i(s.remove)(this.opacitySlider.element),this.opacitySlider=null,t.classList.contains(f)||t.classList.contains(v)||i.i(s.remove)(i.i(s.select)("."+E,this.container).parentElement))},t.prototype.onPropertyChanged=function(e,t){var a=this;if(!i.i(s.isNullOrUndefined)(e.value)){var r=this.roundValue(e.value);if(9===r.length){this.element.value=this.roundValue(r).slice(0,7);var l=this.splitBtn&&i.i(s.select)(".e-split-preview",this.splitBtn.element);l&&(l.style.backgroundColor=this.convertToRgbString(this.hexToRgb(e.value)))}else if(this.noColor&&"Palette"===this.mode&&""===this.value){var l=this.splitBtn&&i.i(s.select)(".e-split-preview",this.splitBtn.element);l.style.backgroundColor=""}else this.value=t.value}if(!this.inline&&i.i(s.isNullOrUndefined)(e.inline)){var o=["disabled","enableRtl"];if(this.splitBtn.setProperties(i.i(n.getModel)(e,o)),!this.isPopupOpen())return this.changeCssClassProps(e.cssClass,t.cssClass),void this.changeRtlProps(e.enableRtl)}for(var h=this,d=0,u=Object.keys(e);d<u.length;d++){var c=u[d];!function(n){switch(n){case"inline":e.inline?(h.getWrapper().appendChild(h.container),h.splitBtn.destroy(),i.i(s.detach)(h.element.nextElementSibling),h.container.children.length||h.createWidget()):(h.destroyOtherComp(),h.unWireEvents(),h.container.innerHTML="",h.createSplitBtn());break;case"cssClass":h.changeCssClassProps(e.cssClass,t.cssClass);var r=e.cssClass.split(" ").concat(t.cssClass.split(" "));r=r.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[]);var l=0;r.forEach(function(e){if(0===l&&(e===f||"e-hide-valueswitcher"===e||e===S||e===m||e===v)){i.i(s.select)("."+y,a.container)&&i.i(s.remove)(i.i(s.select)("."+y,a.container)),a.createInput(),l++}});break;case"enableRtl":h.isPicker()&&(h.hueSlider.enableRtl=e.enableRtl,h.enableOpacity&&(h.opacitySlider.enableRtl=e.enableRtl),h.setInputEleProps()),h.changeRtlProps(e.enableRtl);break;case"disabled":h.changeDisabledProp(e.disabled);break;case"value":h.value!==t.value&&h.changeValueProp(e.value);break;case"showButtons":h.changeShowBtnProps(e.showButtons);break;case"mode":"Picker"===e.mode?h.switchToPicker():h.switchToPalette();break;case"modeSwitcher":h.changeModeSwitcherProp(e.modeSwitcher);break;case"columns":case"presetColors":h.isPicker()||h.changePaletteProps();break;case"noColor":e.noColor?"Palette"!==h.mode||h.modeSwitcher||h.setNoColor():h.changePaletteProps();break;case"enableOpacity":h.changeOpacityProps(e.enableOpacity)}}(c)}},t.prototype.focusIn=function(){this.element.parentElement.focus()},d([i.i(s.Property)("#008000ff")],t.prototype,"value",void 0),d([i.i(s.Property)("")],t.prototype,"cssClass",void 0),d([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),d([i.i(s.Property)("Picker")],t.prototype,"mode",void 0),d([i.i(s.Property)(!0)],t.prototype,"modeSwitcher",void 0),d([i.i(s.Property)(null)],t.prototype,"presetColors",void 0),d([i.i(s.Property)(!0)],t.prototype,"showButtons",void 0),d([i.i(s.Property)(10)],t.prototype,"columns",void 0),d([i.i(s.Property)(!1)],t.prototype,"inline",void 0),d([i.i(s.Property)(!1)],t.prototype,"noColor",void 0),d([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),d([i.i(s.Property)(!0)],t.prototype,"enableOpacity",void 0),d([i.i(s.Property)(!1)],t.prototype,"createPopupOnClick",void 0),d([i.i(s.Event)()],t.prototype,"select",void 0),d([i.i(s.Event)()],t.prototype,"change",void 0),d([i.i(s.Event)()],t.prototype,"beforeTileRender",void 0),d([i.i(s.Event)()],t.prototype,"beforeOpen",void 0),d([i.i(s.Event)()],t.prototype,"open",void 0),d([i.i(s.Event)()],t.prototype,"beforeClose",void 0),d([i.i(s.Event)()],t.prototype,"beforeModeSwitch",void 0),d([i.i(s.Event)()],t.prototype,"onModeSwitch",void 0),d([i.i(s.Event)()],t.prototype,"created",void 0),t=d([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return l}),i.d(t,"b",function(){return s}),i.d(t,"c",function(){return o});var s,n=i(0),a=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()),r=this&&this.__decorate||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},l={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"}(s||(s={}));var o=function(e){function t(t,s){var a=e.call(this,s,t)||this;if(a.validated=[],a.errorRules=[],a.allowSubmit=!1,a.required="required",a.infoElement=null,a.inputElement=null,a.selectQuery="input:not([type=reset]):not([type=button]), select, textarea",a.localyMessage={},a.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===a.rules&&(a.rules={}),a.l10n=new n.L10n("formValidator",a.defaultMessages,a.locale),a.locale&&a.localeFunc(),n.onIntlChange.on("notifyExternalChange",a.afterLocalization,a),t="string"==typeof t?i.i(n.select)(t,document):t,null!=a.element)return a.element.setAttribute("novalidate",""),a.inputElements=i.i(n.selectAll)(a.selectQuery,a.element),a.createHTML5Rules(),a.wireEvents(),a}a(t,e),o=t,t.prototype.addRules=function(e,t){e&&(this.rules.hasOwnProperty(e)?i.i(n.extend)(this.rules[""+e],t,{}):this.rules[""+e]=t)},t.prototype.removeRules=function(e,t){if(e||t)if(this.rules[""+e]&&!t)delete this.rules[""+e];else{if(i.i(n.isNullOrUndefined)(this.rules[""+e]&&t))return;for(var s=0;s<t.length;s++)delete this.rules[""+e][t[parseInt(s.toString())]]}else this.rules={}},t.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},t.prototype.reset=function(){this.element.reset(),this.clearForm()},t.prototype.getInputElement=function(e){return this.inputElement=i.i(n.select)('[name="'+e+'"]',this.element),this.inputElement},t.prototype.destroy=function(){this.reset(),this.unwireEvents(),this.rules={};for(var t=i.i(n.selectAll)("."+this.errorClass+", ."+this.validClass,this.element),s=0,a=t;s<a.length;s++){var r=a[s];i.i(n.detach)(r)}e.prototype.destroy.call(this),this.infoElement=null,n.onIntlChange.off("notifyExternalChange",this.afterLocalization)},t.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"locale":this.localeFunc()}}},t.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}},t.prototype.getModuleName=function(){return"formvalidator"},t.prototype.afterLocalization=function(e){this.locale=e.locale,this.localeFunc()},t.prototype.refresh=function(){this.unwireEvents(),this.inputElements=i.i(n.selectAll)(this.selectQuery,this.element),this.wireEvents()},t.prototype.clearForm=function(){this.errorRules=[],this.validated=[];for(var e=i.i(n.selectAll)(this.selectQuery,this.element),t=0,s=e;t<s.length;t++){var a=s[t],r=a;r.removeAttribute("aria-invalid");var l=r.parentElement,o=l.parentElement;l.classList.contains("e-control-wrapper")||l.classList.contains("e-wrapper")||r.classList.contains("e-input")&&l.classList.contains("e-input-group")?l.classList.remove(this.errorClass):null!=o&&(o.classList.contains("e-control-wrapper")||o.classList.contains("e-wrapper"))?o.classList.remove(this.errorClass):r.classList.remove(this.errorClass),r.name.length>0&&(this.getInputElement(r.name),this.getErrorElement(r.name),this.hideMessage(r.name)),l.classList.contains("e-control-wrapper")||l.classList.contains("e-wrapper")||r.classList.contains("e-input")&&l.classList.contains("e-input-group")?l.classList.remove(this.validClass):null!=o&&(o.classList.contains("e-control-wrapper")||o.classList.contains("e-wrapper"))?o.classList.remove(this.validClass):r.classList.remove(this.validClass)}},t.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)}},t.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 d=e.getAttribute(i).split(".");this.defRule(e,t,"equalTo",d[d.length-1]);break;case"regex":this.defRule(e,t,"regex",s)}},t.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},t.prototype.wireEvents=function(){for(var e=0,t=this.inputElements;e<t.length;e++){var i=t[e];o.isCheckable(i)?n.EventHandler.add(i,"click",this.clickHandler,this):"SELECT"===i.tagName?n.EventHandler.add(i,"change",this.changeHandler,this):(n.EventHandler.add(i,"focusout",this.focusOutHandler,this),n.EventHandler.add(i,"keyup",this.keyUpHandler,this))}n.EventHandler.add(this.element,"submit",this.submitHandler,this),n.EventHandler.add(this.element,"reset",this.resetHandler,this)},t.prototype.unwireEvents=function(){for(var e=0,t=this.inputElements;e<t.length;e++){var i=t[e];n.EventHandler.clearEvents(i)}n.EventHandler.remove(this.element,"submit",this.submitHandler),n.EventHandler.remove(this.element,"reset",this.resetHandler)},t.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))},t.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)},t.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)},t.prototype.changeHandler=function(e){this.trigger("change",e);var t=e.target;this.validate(t.name)},t.prototype.submitHandler=function(e){this.trigger("submit",e),this.allowSubmit||this.validate()?this.allowSubmit=!1:e.preventDefault()},t.prototype.resetHandler=function(){this.clearForm()},t.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),d={name:e,message:h},u={inputName:e,element:this.inputElement,message:h};if(!this.isValid(e,o)&&!this.inputElement.classList.contains(this.ignore)){this.removeErrorRules(e),this.errorRules.push(d),this.inputElement.setAttribute("aria-invalid","true"),this.inputElement.setAttribute("aria-describedby",this.inputElement.id+"-info");var c=this.inputElement.parentElement,p=c.parentElement;c.classList.contains("e-control-wrapper")||c.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&c.classList.contains("e-input-group")?(c.classList.add(this.errorClass),c.classList.remove(this.validClass)):null!=p&&(p.classList.contains("e-control-wrapper")||p.classList.contains("e-wrapper"))?(p.classList.add(this.errorClass),p.classList.remove(this.validClass)):(this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass)),this.infoElement?this.showMessage(d):this.createErrorElement(e,d.message,this.inputElement),u.errorElement=this.infoElement,u.status="failure",c.classList.contains("e-control-wrapper")||c.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&c.classList.contains("e-input-group")?(c.classList.add(this.errorClass),c.classList.remove(this.validClass)):null!=p&&(p.classList.contains("e-control-wrapper")||p.classList.contains("e-wrapper"))?(p.classList.add(this.errorClass),p.classList.remove(this.validClass)):(this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass)),this.optionalValidationStatus(e,u),this.trigger("validationComplete",u),"required"===o&&this.inputElement.setAttribute("aria-required","true");break}this.hideMessage(e),u.status="success",this.trigger("validationComplete",u)}}}},t.prototype.optionalValidationStatus=function(e,t){this.rules[""+e][this.required]||this.inputElement.value.length||i.i(n.isNullOrUndefined)(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),t.status="",this.hideMessage(e))},t.prototype.isValid=function(e,t){var s=this.rules[""+e][""+t],a=s instanceof Array&&"string"==typeof s[1]?s[0]:s,r=this.rules[""+e][""+t],l={value:this.inputElement.value,param:a,element:this.inputElement,formElement:this.element};if(this.trigger("validationBegin",l),!l.param&&"required"===t)return!0;if(r&&"function"==typeof r[0]){return r[0].call(this,{element:this.inputElement,value:this.inputElement.value})}return o.isCheckable(this.inputElement)?"required"!==t||i.i(n.selectAll)('input[name="'+e+'"]:checked',this.element).length>0:o.checkValidator[""+t](l)},t.prototype.getErrorMessage=function(e,t){var s=this.inputElement.getAttribute("data-"+t+"-message")?this.inputElement.getAttribute("data-"+t+"-message"):e instanceof Array&&"string"==typeof e[1]?e[1]:0!==Object.keys(this.localyMessage).length?this.localyMessage[""+t]:this.defaultMessages[""+t],a=s.match(/{(\d)}/g);if(!i.i(n.isNullOrUndefined)(a))for(var r=0;r<a.length;r++){var l=e instanceof Array?e[parseInt(r.toString())]:e;s=s.replace(a[parseInt(r.toString())],l)}return s},t.prototype.createErrorElement=function(e,t,a){var r=i.i(n.createElement)(this.errorElement,{className:this.errorClass,innerHTML:t,attrs:{for:e}});if(this.errorOption===s.Message&&(r.classList.remove(this.errorClass),r.classList.add("e-message"),r=i.i(n.createElement)(this.errorContainer,{className:this.errorClass,innerHTML:r.outerHTML})),r.id=this.inputElement.name+"-info",this.element.querySelector('[data-valmsg-for="'+a.id+'"]'))this.element.querySelector('[data-valmsg-for="'+a.id+'"]').appendChild(r);else if(!0===a.hasAttribute("data-msg-containerid")){var l=a.getAttribute("data-msg-containerid"),o=i.i(n.select)("#"+l,this.element);o.appendChild(r)}else if(null!=this.customPlacement)this.customPlacement.call(this,this.inputElement,r);else{var h=this.inputElement.parentElement,d=h.parentElement;h.classList.contains("e-control-wrapper")||h.classList.contains("e-wrapper")?d.insertBefore(r,h.nextSibling):d.classList.contains("e-control-wrapper")||d.classList.contains("e-wrapper")?d.parentElement.insertBefore(r,d.nextSibling):h.insertBefore(r,this.inputElement.nextSibling)}r.style.display="block",this.getErrorElement(e),this.validated.push(e),this.checkRequired(e)},t.prototype.getErrorElement=function(e){return this.infoElement=i.i(n.select)(this.errorElement+"."+this.errorClass,this.inputElement.parentElement),this.infoElement||(this.infoElement=i.i(n.select)(this.errorElement+"."+this.errorClass+'[for="'+e+'"]',this.element)),this.infoElement},t.prototype.removeErrorRules=function(e){for(var t=0;t<this.errorRules.length;t++){this.errorRules[parseInt(t.toString())].name===e&&this.errorRules.splice(t,1)}},t.prototype.showMessage=function(e){this.infoElement.style.display="block",this.infoElement.innerHTML=e.message,this.checkRequired(e.name)},t.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")}},t.prototype.checkRequired=function(e){this.rules[""+e][this.required]||this.inputElement.value.length||i.i(n.isNullOrUndefined)(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),this.hideMessage(e))},t.isCheckable=function(e){var t=e.getAttribute("type");return t&&("checkbox"===t||"radio"===t||"submit"===t)};var o;return t.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 l.EMAIL.test(e.value)},url:function(e){return l.URL.test(e.value)},dateIso:function(e){return l.DATE_ISO.test(e.value)},tel:function(e){return l.PHONE.test(e.value)},creditcard:function(e){return l.CREDITCARD.test(e.value)},number:function(e){return!isNaN(Number(e.value))&&-1===e.value.indexOf(" ")},digits:function(e){return l.DIGITS.test(e.value)},maxLength:function(e){return e.value.length<=e.param},minLength:function(e){return e.value.length>=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(i.i(n.isNullOrUndefined)(e.param)||"string"!=typeof e.param||""===e.param)return!isNaN(new Date(e.value).getTime());var t=new n.Internationalization,s={format:e.param.toString(),type:"dateTime",skeleton:"yMd"},a=t.parseDate(e.value,s);return!i.i(n.isNullOrUndefined)(a)&&a instanceof Date&&!isNaN(+a)},max:function(e){return isNaN(Number(e.value))?new Date(e.value).getTime()<=new Date(JSON.parse(JSON.stringify(e.param))).getTime():+e.value<=e.param},min:function(e){if(isNaN(Number(e.value))){if(-1!==e.value.indexOf(",")){var t=e.value.replace(/,/g,"");return parseFloat(t)>=e.param}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}},r([i.i(n.Property)("")],t.prototype,"locale",void 0),r([i.i(n.Property)("e-hidden")],t.prototype,"ignore",void 0),r([i.i(n.Property)()],t.prototype,"rules",void 0),r([i.i(n.Property)("e-error")],t.prototype,"errorClass",void 0),r([i.i(n.Property)("e-valid")],t.prototype,"validClass",void 0),r([i.i(n.Property)("label")],t.prototype,"errorElement",void 0),r([i.i(n.Property)("div")],t.prototype,"errorContainer",void 0),r([i.i(n.Property)(s.Label)],t.prototype,"errorOption",void 0),r([i.i(n.Event)()],t.prototype,"focusout",void 0),r([i.i(n.Event)()],t.prototype,"keyup",void 0),r([i.i(n.Event)()],t.prototype,"click",void 0),r([i.i(n.Event)()],t.prototype,"change",void 0),r([i.i(n.Event)()],t.prototype,"submit",void 0),r([i.i(n.Event)()],t.prototype,"validationBegin",void 0),r([i.i(n.Event)()],t.prototype,"validationComplete",void 0),r([i.i(n.Event)()],t.prototype,"customPlacement",void 0),t=o=r([n.NotifyPropertyChanges],t)}(n.Base)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(5);i.d(t,"NumericTextBox",function(){return s.a});var n=i(12);i.d(t,"regularExpressions",function(){return n.a}),i.d(t,"createMask",function(){return n.b}),i.d(t,"applyMask",function(){return n.c}),i.d(t,"wireEvents",function(){return n.d}),i.d(t,"unwireEvents",function(){return n.e}),i.d(t,"bindClearEvent",function(){return n.f}),i.d(t,"unstrippedValue",function(){return n.g}),i.d(t,"strippedValue",function(){return n.h}),i.d(t,"maskInputMouseDownHandler",function(){return n.i}),i.d(t,"maskInputMouseUpHandler",function(){return n.j}),i.d(t,"maskInputFocusHandler",function(){return n.k}),i.d(t,"triggerFocus",function(){return n.l}),i.d(t,"escapeRegExp",function(){return n.m}),i.d(t,"maskInputBlurHandler",function(){return n.n}),i.d(t,"maskInputDropHandler",function(){return n.o}),i.d(t,"mobileRemoveFunction",function(){return n.p}),i.d(t,"setMaskValue",function(){return n.q}),i.d(t,"setElementValue",function(){return n.r}),i.d(t,"maskInput",function(){return n.s}),i.d(t,"getVal",function(){return n.t}),i.d(t,"getMaskedVal",function(){return n.u}),i.d(t,"MaskUndo",function(){return n.v}),i.d(t,"MaskedTextBox",function(){return n.w});var a=i(4);i.d(t,"containerAttributes",function(){return a.a}),i.d(t,"TEXTBOX_FOCUS",function(){return a.b}),i.d(t,"Input",function(){return a.c});var r=i(15);i.d(t,"TicksData",function(){return r.a}),i.d(t,"ColorRangeData",function(){return r.b}),i.d(t,"LimitData",function(){return r.c}),i.d(t,"TooltipData",function(){return r.d}),i.d(t,"Slider",function(){return r.e});var l=i(11);i.d(t,"regex",function(){return l.a}),i.d(t,"ErrorOption",function(){return l.b}),i.d(t,"FormValidator",function(){return l.c});var o=i(18);i.d(t,"FilesProp",function(){return o.a}),i.d(t,"ButtonsProps",function(){return o.b}),i.d(t,"AsyncSettings",function(){return o.c}),i.d(t,"Uploader",function(){return o.d});var h=i(9);i.d(t,"ColorPicker",function(){return h.a});var d=i(17);i.d(t,"TextBox",function(){return d.a});var u=i(16);i.d(t,"TextArea",function(){return u.a});var c=i(14);i.d(t,"Signature",function(){return c.a});var p=i(13);i.d(t,"LabelPosition",function(){return p.a}),i.d(t,"PrecisionType",function(){return p.b}),i.d(t,"Rating",function(){return p.c});var m=i(10);i.d(t,"SignatureBase",function(){return m.a})},function(e,t,i){"use strict";function s(){if(i.i(X.attributes)(this.element,{role:"textbox",autocomplete:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive"}),this.mask){for(var e=this.mask.split("]"),t=0;t<e.length;t++)if("\\"===e[t][e[t].length-1]){e[t]=e[t]+"]";for(var s=e[t].split("["),n=0;n<s.length;n++)"\\"===s[n][s[n].length-1]&&(s[n]=s[n]+"["),p.call(this,s[n])}else{var s=e[t].split("[");if(s.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):p.call(this,s[n]);else p.call(this,s[0])}if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!i.i(X.isNullOrUndefined)(this.customCharacters))for(var t=0;t<this.promptMask.length;t++)i.i(X.isNullOrUndefined)(this.customCharacters[this.promptMask[t]])||(this.promptMask=this.promptMask.replace(new RegExp(this.promptMask[t],"g"),this.promptChar));var r=0;if(this.hiddenMask.match(new RegExp(/\\/)))for(var t=0;t<this.hiddenMask.length;t++){var n=0;t>=1&&(n=t),r=this.hiddenMask.length-this.promptMask.length,n-=r,t>0&&"\\"!==this.hiddenMask[t-1]&&(">"===this.hiddenMask[t]||"<"===this.hiddenMask[t]||"|"===this.hiddenMask[t])&&(this.promptMask=this.promptMask.substring(0,n)+this.promptMask.substring(t+1-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue.substring(t+1-r,this.escapeMaskValue.length)),"\\"===this.hiddenMask[t]&&(this.promptMask=this.promptMask.substring(0,n)+this.hiddenMask[t+1]+this.promptMask.substring(t+2-r,this.promptMask.length),this.escapeMaskValue=this.escapeMaskValue.substring(0,n)+this.escapeMaskValue[t+1]+this.escapeMaskValue.substring(t+2-r,this.escapeMaskValue.length))}else this.promptMask=this.promptMask.replace(/[>|<]/g,""),this.escapeMaskValue=this.hiddenMask.replace(/[>|<]/g,"");i.i(X.attributes)(this.element,{"aria-invalid":"false"})}}function n(){D.call(this,this.promptMask),I.call(this,this.value)}function a(){X.EventHandler.add(this.element,"keydown",T,this),X.EventHandler.add(this.element,"keypress",O,this),X.EventHandler.add(this.element,"keyup",w,this),X.EventHandler.add(this.element,"input",S,this),X.EventHandler.add(this.element,"focus",f,this),X.EventHandler.add(this.element,"blur",b,this),X.EventHandler.add(this.element,"paste",C,this),X.EventHandler.add(this.element,"cut",E,this),X.EventHandler.add(this.element,"drop",x,this),X.EventHandler.add(this.element,"mousedown",m,this),X.EventHandler.add(this.element,"mouseup",v,this),this.enabled&&(l.call(this),this.formElement&&X.EventHandler.add(this.formElement,"reset",d,this))}function r(){X.EventHandler.remove(this.element,"keydown",T),X.EventHandler.remove(this.element,"keypress",O),X.EventHandler.remove(this.element,"keyup",w),X.EventHandler.remove(this.element,"input",S),X.EventHandler.remove(this.element,"focus",f),X.EventHandler.remove(this.element,"blur",b),X.EventHandler.remove(this.element,"paste",C),X.EventHandler.remove(this.element,"drop",x),X.EventHandler.remove(this.element,"cut",E),X.EventHandler.remove(this.element,"mousedown",m),X.EventHandler.remove(this.element,"mouseup",v),this.formElement&&X.EventHandler.remove(this.formElement,"reset",d)}function l(){this.showClearButton&&X.EventHandler.add(this.inputObj.clearButton,"mousedown touchstart",o,this)}function o(e){e.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputObj.container.classList.contains("e-static-clear")||(h.call(this,e),this.value="")}function h(e){var t=this.element.value;D.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 d(){"EJS-MASKEDTEXTBOX"===this.element.tagName?D.call(this,this.promptMask):this.value=this.initInputValue}function u(e){return e.value}function c(e,t){var s="",n=0,a=!1,r=i.i(X.isNullOrUndefined)(t)?i.i(X.isNullOrUndefined)(e)||i.i(X.isNullOrUndefined)(this)?t:e.value:t;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&&!i.i(X.isNullOrUndefined)(this.customRegExpCollec[n])&&(this._callPasteHandler||!i.i(X.isNullOrUndefined)(this.regExpCollec[this.customRegExpCollec[n]])||this.customRegExpCollec[n].length>2&&"["===this.customRegExpCollec[n][0]&&"]"===this.customRegExpCollec[n][this.customRegExpCollec[n].length-1]||!i.i(X.isNullOrUndefined)(this.customCharacters)&&!i.i(X.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 p(e){for(var t=0;t<e.length;t++)this.hiddenMask+=e[t],"\\"!==e[t]&&this.customRegExpCollec.push(e[t])}function m(){this.isClicked=!0}function v(){this.isClicked=!1}function f(e){var t=this,s=this.element,n=0,a=c.call(this,s),r=!1,l=!1,o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:i.i(X.isNullOrUndefined)(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||g.call(this,o,s),this.mask&&(null!==a&&""!==a||"Always"===this.floatLabelType||null===this.placeholder||""===this.placeholder||(s.value=this.promptMask),setTimeout(function(){if(s.selectionStart===t.promptMask.length||s.value[s.selectionStart]===t.promptChar)r=!0;else for(var e=s.selectionStart;e<t.promptMask.length;e++){if(s.value[e]===t.promptChar){r=!0;break}if(s.value[e]!==t.promptMask[e]){r=!1;break}}}),setTimeout(function(){var e=s.selectionStart-1;if(e===t.promptMask.length-1||s.value[e]===t.promptChar)l=!0;else for(var i=e;i>=0;i--){if(s.value[i]===t.promptChar){l=!0;break}if(s.value[i]!==t.promptMask[i]){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:t.value,maskedValue:s.value,container:i.i(X.isNullOrUndefined)(t.inputObj)?t.inputObj:t.inputObj.container,selectionEnd:s.selectionEnd},g.call(t,o,s)},110);break}i.i(X.isNullOrUndefined)(s.value.match(y(this.promptChar)))&&(o={selectionStart:s.selectionStart,event:e,value:this.value,maskedValue:s.value,container:i.i(X.isNullOrUndefined)(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd},g.call(this,o,s)),this.isClicked=!1}}function g(e,t){this.trigger("focus",e,function(e){t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd})}function y(e){return i.i(X.isNullOrUndefined)(e)?e:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function b(e){if(this.blurEventArgs={event:e,value:this.value,maskedValue:this.element.value,container:i.i(X.isNullOrUndefined)(this.inputObj)?this.inputObj:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){D.call(this,"");var t=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!i.i(X.isNullOrUndefined)(t)&&t.classList.contains($)&&i.i(X.removeClass)([t],$)}}function C(e){var t=this;if(this.mask&&!this.readonly){var i=this.element.selectionStart,s=this.element.selectionEnd,n=this.element.value;D.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=c.call(t,t.element)),D.call(t,n),t.element.selectionStart=i,t.element.selectionEnd=s;var r=0;t.maskKeyPress=!0;do{B.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{B.call(t,a[l],!1,null),++l}while(l<a.length);t.maskKeyPress=!1}else H.call(t,e,n)},1)}}function E(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(){D.call(t,a),t.element.selectionStart=t.element.selectionEnd=s,t.element.value!==i&&H.call(t,e,null)},0)}}function x(e){e.preventDefault()}function S(e){if(!0!==X.Browser.isIE||""!==this.element.value||"Never"!==this.floatLabelType){var t={ctrlKey:!1,keyCode:229};if(i.i(X.extend)(e,t),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||P.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{B.call(this,a[r],e.ctrlKey,e),++r}while(r<a.length);this.element.value!==this.preEleVal&&H.call(this,e,null)}var l=c.call(this,this.element);this.prevValue=l,this.value=l,""===l&&(D.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function T(e){if(this.mask&&!this.readonly){229!==e.keyCode&&(!e.ctrlKey||89!==e.keyCode&&90!==e.keyCode||e.preventDefault(),P.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}),D.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}),D.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],D.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)):(D.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=t)}function L(e,t,i){return"input"===i.type&&(e=!1,t=this.element.value,D.call(this,this.promptMask),I.call(this,t)),e}function P(e){var t,s=!1,n=!1;this.element.value.length<this.promptMask.length&&(s=!0,t=this.element.value,s=L.call(this,s,t,e),k.call(this)),this.element.value.length>=this.promptMask.length&&"input"===e.type&&(s=L.call(this,s,t,e));var a=this.element.selectionStart,r=this.element.selectionEnd,l=this.element.selectionStart,o=this.element.selectionEnd,h=this.hiddenMask.replace(/[>|\\<]/g,""),d=h[l-1],u=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 c=!1,p=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&&(c=!0)):46===e.keyCode?++m:--m;for(var v=l;8===e.keyCode||s||c?v>m:v<m;8===e.keyCode||s||c?v--:v++)for(var f=l;8===e.keyCode||s||c?f>0:f<this.element.value.length;8===e.keyCode||s||c?f--:f++){var g=void 0;(8===e.keyCode||c)&&(a!==r&&a!==l||a===r)||s?(d=h[f-1],g=l-1):(d=h[f],g=l,++l);var y=this.element.value[g];if(i.i(X.isNullOrUndefined)(this.regExpCollec[""+d])&&!i.i(X.isNullOrUndefined)(this.customCharacters)&&i.i(X.isNullOrUndefined)(this.customCharacters[""+d])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&i.i(X.isNullOrUndefined)(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,e.preventDefault(),46!==e.keyCode||c||++this.element.selectionStart;else{var b=this.element.value,C=this.promptChar,E=b.substring(0,g)+C+b.substring(l,b.length);D.call(this,E),e.preventDefault(),46!==e.keyCode||c||g++,this.element.selectionStart=this.element.selectionEnd=g,n=!0}if(l=this.element.selectionStart,!n&&8===e.keyCode||c||!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&&!i.i(X.isNullOrUndefined)(this.customCharacters))break}}46===e.keyCode&&c&&n&&(this.element.selectionStart=this.element.selectionEnd=u),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(D.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!==p&&H.call(this,e,t)}}function O(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&&(B.call(this,i,e.ctrlKey,e),e.preventDefault()):(this.isIosInvalid=!0,B.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,t){var s=this.isProtectedOnChange;if(!i.i(X.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=c.call(this,this.element)),i.i(X.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,i.i(X.merge)(n,this.changeEventArgs),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",n)}this.preEleVal=this.element.value,this.prevValue=c.call(this,this.element)}function w(e){if(this.mask&&!this.readonly){var t=void 0;if(this.maskKeyPress||229!==e.keyCode)F.call(this);else{var i=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 s=this.element.selectionStart,n=this.element.value.length-this.promptMask.length,a=this.element.value.substring(s-n,s);if(this.undoCollec.length>0){t=this.undoCollec[this.undoCollec.length-1];var r=this.element.selectionStart;i=t.value;var l=t.value.substring(r-n,r);t=this.redoCollec[0],a=a.trim();var o=X.Browser.isAndroid&&""===a;o||l===a||t.value.substring(r-n,r)===a?o&&R.call(this,e,r-1,this.element.selectionEnd-1,a,e.ctrlKey,!1):B.call(this,a,e.ctrlKey,e)}else i=this.promptMask,B.call(this,a,e.ctrlKey,e);this.maskKeyPress=!1,H.call(this,e,i)}}var h=c.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==h||""===h&&this.value!==h)&&(this.prevValue=h,this.value=h)}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 N(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);D.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 A(e){this.maskKeyPress||N.call(this,e)}function B(e,t,s){if(A.call(this,e),!i.i(X.isNullOrUndefined)(this)&&!i.i(X.isNullOrUndefined)(e))for(var n,a,r=this.element.selectionStart,l=r,o=!1,h=this.element.value,d=!1,u=!1,c=0;c<e.length;c++){var p=e[c];if(r=this.element.selectionStart,this.maskKeyPress||l!==r||(r+=c),!this.maskKeyPress||r<this.promptMask.length){for(var m=r;m<this.promptMask.length;m++){var v=this.escapeMaskValue;n=v[r],"\\"===this.hiddenMask[r]&&this.hiddenMask[r+1]===e&&(u=!0),(i.i(X.isNullOrUndefined)(this.regExpCollec[""+n])&&(i.i(X.isNullOrUndefined)(this.customCharacters)||!i.i(X.isNullOrUndefined)(this.customCharacters)&&i.i(X.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&&i.i(X.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(i.i(X.isNullOrUndefined)(this.customCharacters)||i.i(X.isNullOrUndefined)(this.customCharacters[""+n]))!i.i(X.isNullOrUndefined)(this.regExpCollec[""+n])&&p.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]&&p.match(new RegExp(this.customRegExpCollec[r]))&&(o=!0);else for(var f=this.customCharacters[""+n],g=f.split(","),m=0;m<g.length;m++)if(p.match(new RegExp("["+g[m]+"]"))){o=!0;break}if((!this.maskKeyPress||r<this.hiddenMask.length)&&o){if(0===c)if(this.maskKeyPress)this.undoCollec.push({value:h,startIndex:r,endIndex:r});else{var y=this.element.selectionStart,b=this.element.selectionEnd;this.redoCollec.length>0?(a=this.redoCollec[0].value,D.call(this,a),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:r,endIndex:r}),a=this.promptMask,D.call(this,a)),this.element.selectionStart=y,this.element.selectionEnd=b}r=this.element.selectionStart,U.call(this,s,r,p,a,u),d=!0,c===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,R.call(this,s,r,l,e,t,d);c!==e.length-1||o||(!X.Browser.isAndroid||X.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||t||i.i(X.isNullOrUndefined)(s)||V.call(this)}}function U(e,t,i,s,n){if(this.hiddenMask.length>this.promptMask.length&&(i=M.call(this,i,this.element.value)),!n){var a=this.element.value,r=a.substring(0,t)+i+a.substring(t+1,a.length);D.call(this,r),this.element.selectionStart=this.element.selectionEnd=t+1}}function R(e,t,s,n,a,r){if(!this.maskKeyPress){var l=this.element.value;t>=this.promptMask.length?D.call(this,l.substring(0,t)):(s===t?D.call(this,l.substring(0,t)+l.substring(t+1,l.length)):this.promptMask.length===this.element.value.length?D.call(this,l.substring(0,t)+l.substring(t,l.length)):D.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?t:s),V.call(this)}1!==n.length||a||i.i(X.isNullOrUndefined)(e)||V.call(this)}function V(){var e=this,t=this.element.parentNode,s=200;t.classList.contains(Z)||t.classList.contains(G)?i.i(X.addClass)([t],Y):i.i(X.addClass)([this.element],Y),!0===this.isIosInvalid&&(s=400),i.i(X.attributes)(this.element,{"aria-invalid":"true"}),setTimeout(function(){e.maskKeyPress||F.call(e)},s)}function F(){var e=this.element.parentNode;i.i(X.isNullOrUndefined)(e)||i.i(X.removeClass)([e],Y),i.i(X.removeClass)([this.element],Y),i.i(X.attributes)(this.element,{"aria-invalid":"false"})}function M(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 I(e){if(this.mask&&void 0!==e&&(void 0===this.prevValue||this.prevValue!==e)){if(this.maskKeyPress=!0,D.call(this,this.promptMask),""===e||null===e&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==e)for(var t=0;t<e.length;t++)B.call(this,e[t],!1,null);var s=c.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&&!i.i(X.isNullOrUndefined)(n)&&n.classList.contains($)&&!this.isFocus&&(i.i(X.removeClass)([n],$),i.i(X.addClass)([n],Q),D.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&D.call(this,this.value)}function D(e,t){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&i.i(X.isNullOrUndefined)(this.value)&&(e="");var s=c.call(this,t||this.element,e);null===s||""===s?(K.a.setValue(e,t||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):K.a.setValue(e,t||this.element,this.floatLabelType,this.showClearButton)}function z(e){var t=W(e);n.call(t);var i=c.call(this,this.element);this.prevValue=i,this.value=i,e.mask&&(r.call(t),a.call(t))}function W(e){i.i(X.addClass)([e.element],J);var t={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:ee,customRegExpCollec:[],customCharacters:e.customCharacters,undoCollec:[],redoCollec:[],maskKeyPress:!1,prevValue:""};return s.call(t),t}function q(e){return c.call(j(e),e.element)}function _(e){return u.call(j(e),e.element)}function j(e){var t;return!i.i(X.isNullOrUndefined)(e)&&e.element.classList.contains(J)&&(t=W(e)),t}i.d(t,"a",function(){return ee}),t.b=s,t.c=n,t.d=a,t.e=r,t.f=l,t.g=u,t.h=c,t.i=m,t.j=v,t.k=f,t.l=g,t.m=y,t.n=b,t.o=x,t.p=k,t.q=I,t.r=D,t.s=z,t.t=q,t.u=_,i.d(t,"v",function(){return te});var X=i(0),K=(i.n(X),i(1)),Y="e-error",Z="e-input-group",G="e-float-input",J="e-utility-mask",$="e-label-top",Q="e-label-bottom",ee={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 ]"},te=function(){function e(){}return e}();new te},function(e,t,i){"use strict";var s=i(24);i.d(t,"a",function(){return s.a})},function(e,t,i){"use strict";i.d(t,"a",function(){return h});var s=i(0),n=(i.n(s),i(1)),a=i(3),r=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),l=this&&this.__decorate||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},o=["title","style","class"],h=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.initInputValue="",s.isAngular=!1,s.preventChange=!1,s.isClicked=!1,s.maskOptions=t,s}return r(t,e),t.prototype.getModuleName=function(){return"maskedtextbox"},t.prototype.preRender=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.regExpCollec=a.a,this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.changeEventArgs={},this.focusEventArgs={},this.blurEventArgs={},this.maskKeyPress=!1,this.isFocus=!1,this.isInitial=!1,this.isIosInvalid=!1;var e=i.i(s.getValue)("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),i.i(s.removeClass)([this.cloneElement],["e-control","e-maskedtextbox","e-lib"]),this.angularTagName=null,this.formElement=i.i(s.closest)(this.element,"form"),"EJS-MASKEDTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;for(var t=this.createElement("input"),n=0;n<this.element.attributes.length;n++)t.setAttribute(this.element.attributes[n].nodeName,this.element.attributes[n].nodeValue),t.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(t),this.element=t,i.i(s.setValue)("ej2_instances",e,this.element)}this.updateHTMLAttrToElement(),this.checkHtmlAttributes(!1),this.formElement&&(this.initInputValue=this.value)},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&("Never"===this.floatLabelType&&i.i(s.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,s.Browser.isDevice||"11.0"!==s.Browser.info.version&&"edge"!==s.Browser.info.name||this.element.blur(),s.Browser.isDevice&&s.Browser.isIos&&this.element.blur(),(this.element.getAttribute("value")||this.value)&&this.element.setAttribute("value",this.element.value),!i.i(s.isNullOrUndefined)(i.i(s.closest)(this.element,"fieldset"))&&i.i(s.closest)(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete())},t.prototype.updateHTMLAttrToElement=function(){if(!i.i(s.isNullOrUndefined)(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];o.indexOf(n)<0&&this.element.setAttribute(n,this.htmlAttributes[""+n])}},t.prototype.updateCssClass=function(e,t){n.a.setCssClass(this.getValidClassList(e),[this.inputObj.container],this.getValidClassList(t))},t.prototype.getValidClassList=function(e){var t=e;return i.i(s.isNullOrUndefined)(e)||""===e||(t=e.replace(/\s+/g," ").trim()),t},t.prototype.updateHTMLAttrToWrapper=function(){if(!i.i(s.isNullOrUndefined)(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];if(o.indexOf(n)>-1)if("class"===n){var a=this.htmlAttributes[""+n].replace(/\s+/g," ").trim();""!==a&&i.i(s.addClass)([this.inputObj.container],a.split(" "))}else if("style"===n){var r=this.inputObj.container.getAttribute(n);r=i.i(s.isNullOrUndefined)(r)?this.htmlAttributes[""+n]:r+this.htmlAttributes[""+n],this.inputObj.container.setAttribute(n,r)}else this.inputObj.container.setAttribute(n,this.htmlAttributes[""+n])}},t.prototype.resetMaskedTextBox=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.promptChar.length>1&&(this.promptChar=this.promptChar[0]),a.b.call(this),a.c.call(this),(null===this.mask||""===this.mask&&void 0!==this.value)&&a.r.call(this,this.value);var e=a.h.call(this,this.element);this.prevValue=e,this.value=e,this.isInitial||a.e.call(this),a.d.call(this)},t.prototype.setMaskPlaceholder=function(e,t){(t||this.placeholder)&&(n.a.setPlaceholder(this.placeholder,this.element),(this.element.value===this.promptMask&&e&&"Always"!==this.floatLabelType||this.element.value===this.promptMask&&"Never"===this.floatLabelType)&&a.r.call(this,""))},t.prototype.setWidth=function(e){if(!i.i(s.isNullOrUndefined)(e))if("number"==typeof e)this.inputObj.container.style.width=i.i(s.formatUnit)(e),this.element.style.width=i.i(s.formatUnit)(e);else if("string"==typeof e){var t=e.match(/px|%|em/)?e:i.i(s.formatUnit)(e);this.inputObj.container.style.width=t,this.element.style.width=t}},t.prototype.checkHtmlAttributes=function(e){for(var t=e?i.i(s.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"],n=0,a=t;n<a.length;n++){var r=a[n];if(!i.i(s.isNullOrUndefined)(this.element.getAttribute(r)))switch(r){case"placeholder":(i.i(s.isNullOrUndefined)(this.maskOptions)||void 0===this.maskOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"disabled":if(i.i(s.isNullOrUndefined)(this.maskOptions)||void 0===this.maskOptions.enabled||e){var l="disabled"!==this.element.getAttribute(r)&&""!==this.element.getAttribute(r)&&"true"!==this.element.getAttribute(r);this.setProperties({enabled:l},!e)}break;case"value":(i.i(s.isNullOrUndefined)(this.maskOptions)||void 0===this.maskOptions.value||e)&&this.setProperties({value:this.element.value},!e);break;case"readonly":if(i.i(s.isNullOrUndefined)(this.maskOptions)||void 0===this.maskOptions.readonly||e){var o="readonly"===this.element.getAttribute(r)||""===this.element.getAttribute(r)||"true"===this.element.getAttribute(r);this.setProperties({readonly:o},!e)}}}},t.prototype.createWrapper=function(){var e=this.cssClass;i.i(s.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(e=this.getValidClassList(this.cssClass)),this.inputObj=n.a.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{enableRtl:this.enableRtl,cssClass:e,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"))},t.prototype.onPropertyChanged=function(e,t){for(var i=0,s=Object.keys(e);i<s.length;i++){switch(s[i]){case"value":a.q.call(this,this.value),this.placeholder&&!this.isFocus&&this.setMaskPlaceholder(!1,!1),""===this.value&&null!=t.value&&(this.element.selectionStart=0,this.element.selectionEnd=0);break;case"placeholder":this.setMaskPlaceholder(!0,!0);break;case"width":this.setWidth(e.width),n.a.calculateWidth(this.element,this.inputObj.container);break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"enabled":n.a.setEnabled(e.enabled,this.element,this.floatLabelType,this.inputObj.container);break;case"readonly":n.a.setReadonly(e.readonly,this.element);break;case"enableRtl":n.a.setEnableRtl(e.enableRtl,[this.inputObj.container]);break;case"customCharacters":this.customCharacters=e.customCharacters,this.resetMaskedTextBox();break;case"showClearButton":n.a.setClearButton(e.showClearButton,this.element,this.inputObj,void 0,this.createElement),a.f.call(this);break;case"floatLabelType":this.floatLabelType=e.floatLabelType,n.a.removeFloating(this.inputObj),n.a.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement);break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHtmlAttributes(!0);break;case"mask":var r=this.value;this.mask=e.mask,this.updateValue(r);break;case"promptChar":e.promptChar.length>1&&(e.promptChar=e.promptChar[0]),e.promptChar?this.promptChar=e.promptChar:this.promptChar="_";var l=this.element.value.replace(new RegExp("["+t.promptChar+"]","g"),this.promptChar);this.promptMask===this.element.value&&(l=this.promptMask.replace(new RegExp("["+t.promptChar+"]","g"),this.promptChar)),this.promptMask=this.promptMask.replace(new RegExp("["+t.promptChar+"]","g"),this.promptChar),this.undoCollec=this.redoCollec=[],a.r.call(this,l)}}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange},t.prototype.updateValue=function(e){this.resetMaskedTextBox(),a.q.call(this,e)},t.prototype.getMaskedValue=function(){return a.g.call(this,this.element)},t.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.isFocus=!0,this.element.focus(),i.i(s.addClass)([this.inputObj.container],["e-input-focus"]))},t.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.isFocus=!1,this.element.blur(),i.i(s.removeClass)([this.inputObj.container],["e-input-focus"]))},t.prototype.destroy=function(){a.e.call(this),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]);for(var t=["aria-labelledby","role","autocomplete","aria-readonly","aria-disabled","autocapitalize","spellcheck","aria-autocomplete","aria-live","aria-invalid"],r=0;r<t.length;r++)this.element.removeAttribute(t[r]);this.element.classList.remove("e-input"),this.inputObj&&(this.inputObj.container.insertAdjacentElement("afterend",this.element),i.i(s.detach)(this.inputObj.container)),this.blurEventArgs=null,n.a.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),this.changeEventArgs=null,this.inputObj=null,e.prototype.destroy.call(this)},l([i.i(s.Property)(null)],t.prototype,"cssClass",void 0),l([i.i(s.Property)(null)],t.prototype,"width",void 0),l([i.i(s.Property)(null)],t.prototype,"placeholder",void 0),l([i.i(s.Property)("Never")],t.prototype,"floatLabelType",void 0),l([i.i(s.Property)({})],t.prototype,"htmlAttributes",void 0),l([i.i(s.Property)(!0)],t.prototype,"enabled",void 0),l([i.i(s.Property)(!1)],t.prototype,"readonly",void 0),l([i.i(s.Property)(!1)],t.prototype,"showClearButton",void 0),l([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),l([i.i(s.Property)(null)],t.prototype,"mask",void 0),l([i.i(s.Property)("_")],t.prototype,"promptChar",void 0),l([i.i(s.Property)(null)],t.prototype,"value",void 0),l([i.i(s.Property)(null)],t.prototype,"customCharacters",void 0),l([i.i(s.Event)()],t.prototype,"created",void 0),l([i.i(s.Event)()],t.prototype,"destroyed",void 0),l([i.i(s.Event)()],t.prototype,"change",void 0),l([i.i(s.Event)()],t.prototype,"focus",void 0),l([i.i(s.Event)()],t.prototype,"blur",void 0),t=l([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return u});var s=i(0),n=(i.n(s),i(1)),a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),r=this&&this.__decorate||function(e,t,i,s){var n,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},l="e-input-group-icon",o=new RegExp("^(-)?(\\d*)$"),h=["title","style","class"],d=0,u=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.isVue=!1,s.preventChange=!1,s.isAngular=!1,s.isDynamicChange=!1,s.numericOptions=t,s}return a(t,e),t.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var e=i.i(s.getValue)("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),i.i(s.removeClass)([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=i.i(s.closest)(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var t=this.createElement("input"),n=0;for(n;n<this.element.attributes.length;n++){var a=this.element.attributes[n].nodeName;"id"!==a&&"class"!==a?(t.setAttribute(this.element.attributes[n].nodeName,this.element.attributes[n].nodeValue),t.innerHTML=this.element.innerHTML):"class"===a&&t.setAttribute(a,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(t),this.element=t,i.i(s.setValue)("ej2_instances",e,this.element)}i.i(s.attributes)(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var r={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new s.L10n("numerictextbox",r,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",i.i(s.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()},t.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"),!i.i(s.isNullOrUndefined)(i.i(s.closest)(this.element,"fieldset"))&&i.i(s.closest)(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete())},t.prototype.checkAttributes=function(e){for(var t=e?i.i(s.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["value","min","max","step","disabled","readonly","style","name","placeholder"],n=0,a=t;n<a.length;n++){var r=a[n];if(!i.i(s.isNullOrUndefined)(this.element.getAttribute(r)))switch(r){case"disabled":if(i.i(s.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.enabled||e){var l="disabled"!==this.element.getAttribute(r)&&""!==this.element.getAttribute(r)&&"true"!==this.element.getAttribute(r);this.setProperties({enabled:l},!e)}break;case"readonly":if(i.i(s.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.readonly||e){var o="readonly"===this.element.getAttribute(r)||""===this.element.getAttribute(r)||"true"===this.element.getAttribute(r);this.setProperties({readonly:o},!e)}break;case"placeholder":(i.i(s.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":if(i.i(s.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.value||e){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(r));this.setProperties(i.i(s.setValue)(r,h,{}),!e)}break;case"min":if(i.i(s.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.min||e){var d=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(r));null===d||isNaN(d)||this.setProperties(i.i(s.setValue)(r,d,{}),!e)}break;case"max":if(i.i(s.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.max||e){var u=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(r));null===u||isNaN(u)||this.setProperties(i.i(s.setValue)(r,u,{}),!e)}break;case"step":if(i.i(s.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.step||e){var c=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(r));null===c||isNaN(c)||this.setProperties(i.i(s.setValue)(r,c,{}),!e)}break;case"style":this.inputStyle=this.element.getAttribute(r);break;case"name":this.inputName=this.element.getAttribute(r);break;default:var p=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(r));(null!==p&&!isNaN(p)||"value"===r)&&this.setProperties(i.i(s.setValue)(r,p,{}),!0)}}},t.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},t.prototype.initCultureFunc=function(){this.instance=new s.Internationalization(this.locale)},t.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==i.i(s.getValue)("currency",this)&&(i.i(s.setValue)("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},t.prototype.createWrapper=function(){var e=this.cssClass;i.i(s.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(e=this.getNumericValidClassList(this.cssClass));var t=n.a.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:e,enableRtl:this.enableRtl,showClearButton:this.showClearButton,enabled:this.enabled}},this.createElement);this.inputWrapper=t,this.container=t.container,this.container.setAttribute("class","e-control-wrapper e-numeric "+this.container.getAttribute("class")),this.updateHTMLAttrToWrapper(),this.readonly&&i.i(s.attributes)(this.element,{"aria-readonly":"true"}),this.hiddenInput=this.createElement("input",{attrs:{type:"text",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?i.i(s.attributes)(this.hiddenInput,{name:this.cloneElement.id}):i.i(s.attributes)(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.container.childNodes[1]),this.updateDataAttribute(!1),null!==this.inputStyle&&i.i(s.attributes)(this.container,{style:this.inputStyle})},t.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])}},t.prototype.updateHTMLAttrToElement=function(){if(!i.i(s.isNullOrUndefined)(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];h.indexOf(n)<0&&this.element.setAttribute(n,this.htmlAttributes[""+n])}},t.prototype.updateCssClass=function(e,t){n.a.setCssClass(this.getNumericValidClassList(e),[this.container],this.getNumericValidClassList(t))},t.prototype.getNumericValidClassList=function(e){var t=e;return i.i(s.isNullOrUndefined)(e)||""===e||(t=e.replace(/\s+/g," ").trim()),t},t.prototype.updateHTMLAttrToWrapper=function(){if(!i.i(s.isNullOrUndefined)(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];if(h.indexOf(n)>-1)if("class"===n){var a=this.getNumericValidClassList(this.htmlAttributes[""+n]);""!==a&&i.i(s.addClass)([this.container],a.split(" "))}else if("style"===n){var r=this.container.getAttribute(n);r=i.i(s.isNullOrUndefined)(r)?this.htmlAttributes[""+n]:r+this.htmlAttributes[""+n],this.container.setAttribute(n,r)}else this.container.setAttribute(n,this.htmlAttributes[""+n])}},t.prototype.setElementWidth=function(e){i.i(s.isNullOrUndefined)(e)||("number"==typeof e?this.container.style.width=i.i(s.formatUnit)(e):"string"==typeof e&&(this.container.style.width=e.match(/px|%|em/)?e:i.i(s.formatUnit)(e)))},t.prototype.spinBtnCreation=function(){this.spinDown=n.a.appendSpan(l+" e-spin-down",this.container,this.createElement),i.i(s.attributes)(this.spinDown,{title:this.l10n.getConstant("decrementTitle")}),this.spinUp=n.a.appendSpan(l+" e-spin-up",this.container,this.createElement),i.i(s.attributes)(this.spinUp,{title:this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},t.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&&i.i(s.attributes)(this.element,{"aria-valuemin":this.min.toString()}),this.max!==Number.MAX_VALUE&&i.i(s.attributes)(this.element,{"aria-valuemax":this.max.toString()})},t.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},t.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},t.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)},t.prototype.checkErrorClass=function(){this.isValidState?i.i(s.removeClass)([this.container],"e-error"):i.i(s.addClass)([this.container],"e-error"),i.i(s.attributes)(this.element,{"aria-invalid":this.isValidState?"false":"true"})},t.prototype.bindClearEvent=function(){this.showClearButton&&s.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},t.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)},t.prototype.clear=function(e){if(this.setProperties({value:null},!0),this.setElementValue(""),this.hiddenInput.value="",i.i(s.closest)(this.element,"form")){var t=this.element.nextElementSibling,n=document.createEvent("KeyboardEvent");n.initEvent("keyup",!1,!0),t.dispatchEvent(n)}},t.prototype.resetFormHandler=function(){"EJS-NUMERICTEXTBOX"===this.element.tagName?this.updateValue(null):this.updateValue(this.inputEleValue)},t.prototype.setSpinButton=function(){i.i(s.isNullOrUndefined)(this.spinDown)||i.i(s.attributes)(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),i.i(s.isNullOrUndefined)(this.spinUp)||i.i(s.attributes)(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")})},t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"focus",this.focusHandler,this),s.EventHandler.add(this.element,"blur",this.focusOutHandler,this),s.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),s.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),s.EventHandler.add(this.element,"input",this.inputHandler,this),s.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),s.EventHandler.add(this.element,"change",this.changeHandler,this),s.EventHandler.add(this.element,"paste",this.pasteHandler,this),this.enabled&&(this.bindClearEvent(),this.formEle&&s.EventHandler.add(this.formEle,"reset",this.resetFormHandler,this))},t.prototype.wireSpinBtnEvents=function(){s.EventHandler.add(this.spinUp,s.Browser.touchStartEvent,this.mouseDownOnSpinner,this),s.EventHandler.add(this.spinDown,s.Browser.touchStartEvent,this.mouseDownOnSpinner,this),s.EventHandler.add(this.spinUp,s.Browser.touchEndEvent,this.mouseUpOnSpinner,this),s.EventHandler.add(this.spinDown,s.Browser.touchEndEvent,this.mouseUpOnSpinner,this),s.EventHandler.add(this.spinUp,s.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),s.EventHandler.add(this.spinDown,s.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},t.prototype.unwireEvents=function(){s.EventHandler.remove(this.element,"focus",this.focusHandler),s.EventHandler.remove(this.element,"blur",this.focusOutHandler),s.EventHandler.remove(this.element,"keyup",this.keyUpHandler),s.EventHandler.remove(this.element,"input",this.inputHandler),s.EventHandler.remove(this.element,"keydown",this.keyDownHandler),s.EventHandler.remove(this.element,"keypress",this.keyPressHandler),s.EventHandler.remove(this.element,"change",this.changeHandler),s.EventHandler.remove(this.element,"paste",this.pasteHandler),this.formEle&&s.EventHandler.remove(this.formEle,"reset",this.resetFormHandler)},t.prototype.unwireSpinBtnEvents=function(){s.EventHandler.remove(this.spinUp,s.Browser.touchStartEvent,this.mouseDownOnSpinner),s.EventHandler.remove(this.spinDown,s.Browser.touchStartEvent,this.mouseDownOnSpinner),s.EventHandler.remove(this.spinUp,s.Browser.touchEndEvent,this.mouseUpOnSpinner),s.EventHandler.remove(this.spinDown,s.Browser.touchEndEvent,this.mouseUpOnSpinner),s.EventHandler.remove(this.spinUp,s.Browser.touchMoveEvent,this.touchMoveOnSpinner),s.EventHandler.remove(this.spinDown,s.Browser.touchMoveEvent,this.touchMoveOnSpinner)},t.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)},t.prototype.raiseChangeEvent=function(e){if(this.inputValue=i.i(s.isNullOrUndefined)(this.inputValue)||isNaN(this.inputValue)?null:this.inputValue,this.prevValue!==this.value||this.prevValue!==this.inputValue){var t={};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),i.i(s.merge)(t,this.changeEventArgs),this.prevValue=this.value,this.isInteract=!1,this.elementPrevValue=this.element.value,this.preventChange=!1,this.trigger("change",t)}},t.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)})}},t.prototype.preventHandler=function(){var e=this,t=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);setTimeout(function(){if(e.element.selectionStart>0){var n=e.element.selectionStart,a=e.element.selectionStart-1,r=e.element.value.split(""),l=i.i(s.getNumericObject)(e.locale),o=i.i(s.getValue)("decimal",l),h=o.charCodeAt(0);" "===e.element.value[a]&&e.element.selectionStart>0&&!t?(i.i(s.isNullOrUndefined)(e.prevVal)?e.element.value=e.element.value.trim():0!==a?e.element.value=e.prevVal:0===a&&(e.element.value=e.element.value.trim()),e.element.setSelectionRange(a,a)):isNaN(parseFloat(e.element.value[e.element.selectionStart-1]))&&45!==e.element.value[e.element.selectionStart-1].charCodeAt(0)?(r.indexOf(e.element.value[e.element.selectionStart-1])!==r.lastIndexOf(e.element.value[e.element.selectionStart-1])&&e.element.value[e.element.selectionStart-1].charCodeAt(0)===h||e.element.value[e.element.selectionStart-1].charCodeAt(0)!==h)&&(e.element.value=e.element.value.substring(0,a)+e.element.value.substring(n,e.element.value.length),e.element.setSelectionRange(a,a),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)&&(r.indexOf(e.element.value[e.element.selectionStart-2])!==r.lastIndexOf(e.element.value[e.element.selectionStart-2])&&e.element.value[e.element.selectionStart-2].charCodeAt(0)===h||e.element.value[e.element.selectionStart-2].charCodeAt(0)!==h)&&(e.element.setSelectionRange(a,a),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&&(i.i(s.isNullOrUndefined)(e.prevVal)?e.element.value=e.element.value:e.element.value=e.prevVal,e.element.setSelectionRange(e.element.selectionStart,e.element.selectionStart)),e.element.value[e.element.selectionStart-1]===o&&0===e.decimals&&e.validateDecimalOnType&&(e.element.value=e.element.value.substring(0,a)+e.element.value.substring(n,e.element.value.length))),e.prevVal=e.element.value}})},t.prototype.keyUpHandler=function(){if(this.enabled&&!this.readonly){!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&s.Browser.isDevice&&this.preventHandler();var e=this.instance.getNumberParser({format:"n"})(this.element.value);e=null===e||isNaN(e)?null:e,this.hiddenInput.value=e||0===e?e.toString():null;if(i.i(s.closest)(this.element,"form")){var t=this.element.nextElementSibling,n=document.createEvent("KeyboardEvent");n.initEvent("keyup",!1,!0),t.dispatchEvent(n)}}},t.prototype.inputHandler=function(e){var t=this;if(this.enabled&&!this.readonly){var n=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);if((navigator.userAgent.toLowerCase().indexOf("firefox")>-1||n)&&s.Browser.isDevice&&this.preventHandler(),this.isAngular&&this.element.value!==i.i(s.getValue)("decimal",i.i(s.getNumericObject)(this.locale))&&this.element.value!==i.i(s.getValue)("minusSign",i.i(s.getNumericObject)(this.locale))){var a=this.instance.getNumberParser({format:"n"})(this.element.value);a=isNaN(a)?null:a,t.localChange({value:a}),this.preventChange=!0}if(this.isVue){var r=this.instance.getNumberParser({format:"n"})(this.element.value),l=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])&&(r=this.value);var o={event:e,value:null===r||isNaN(r)?null:r,previousValue:null===l||isNaN(l)?null:l};this.preventChange=!0,this.elementPrevValue=this.element.value,this.trigger("input",o)}}},t.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)}},t.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},t.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},t.prototype.roundValue=function(e,t){t=t||0;var i=Math.pow(10,t);return e*=i,e=Math.round(e)/i},t.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.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.isDynamicChange||this.raiseChangeEvent(t)},t.prototype.updateCurrency=function(e,t){i.i(s.setValue)(e,t,this.cultureInfo),this.updateValue(this.value)},t.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()},t.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber(),t=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(t),i.i(s.attributes)(this.element,{"aria-valuenow":e}),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},t.prototype.setElementValue=function(e,t){n.a.setValue(e,t||this.element,this.floatLabelType,this.showClearButton)},t.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},t.prototype.getNumberOfDecimals=function(e){var t,n=new RegExp("[eE][-+]?([0-9]+)"),a=e.toString();if(n.test(a)){var r=n.exec(a);i.i(s.isNullOrUndefined)(r)||(a=e.toFixed(Math.min(parseInt(r[1],10),20)))}var l=a.split(".")[1];return t=l&&l.length?l.length:0,null!==this.decimals&&(t=t<this.decimals?t:this.decimals),t},t.prototype.formatNumber=function(){var e=this.getNumberOfDecimals(this.value);return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},t.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},t.prototype.roundNumber=function(e,t){var i=e,s=t||0,n=i.toString().split("e");i=Math.round(Number(n[0]+"e"+(n[1]?Number(n[1])+s:s)));var a=i.toString().split("e");return i=Number(a[0]+"e"+(a[1]?Number(a[1])-s:-s)),Number(i.toFixed(s))},t.prototype.cancelEvent=function(e){return e.preventDefault(),!1},t.prototype.keyPressHandler=function(e){if(!this.enabled||this.readonly)return!0;if(!s.Browser.isDevice&&"11.0"===s.Browser.info.version&&13===e.keyCode){var t=this.instance.getNumberParser({format:"n"})(this.element.value);return this.updateValue(t,e),!0}if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var n=String.fromCharCode(e.which),a=i.i(s.getValue)("decimal",i.i(s.getNumericObject)(this.locale)),r="NumpadDecimal"===e.code&&n!==a;r&&(n=a);var l=this.element.value;if(l=l.substring(0,this.element.selectionStart)+n+l.substring(this.element.selectionEnd),this.numericRegex().test(l)){if(r){var o=this.element.selectionStart+1;this.element.value=l,this.element.setSelectionRange(o,o),e.preventDefault(),e.stopPropagation()}return!0}return e.preventDefault(),e.stopPropagation(),!1},t.prototype.numericRegex=function(){var e=i.i(s.getNumericObject)(this.locale),t=i.i(s.getValue)("decimal",e),n="*";return"."===t&&(t="\\"+t),0===this.decimals&&this.validateDecimalOnType?o:(this.decimals&&this.validateDecimalOnType&&(n="{0,"+this.decimals+"}"),new RegExp("^(-)?(((\\d+("+t+"\\d"+n+")?)|("+t+"\\d"+n+")))?$"))},t.prototype.mouseWheel=function(e){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)},t.prototype.focusHandler=function(e){var t=this;if(clearTimeout(d),this.focusEventArgs={event:e,value:this.value,container:this.container},this.trigger("focus",this.focusEventArgs),this.enabled&&!this.readonly){if(this.isFocused=!0,i.i(s.removeClass)([this.container],"e-error"),this.prevValue=this.value,this.value||0===this.value){var n=this.formatNumber();if(this.setElementValue(n),!this.isPrevFocused)if(s.Browser.isDevice||"11.0"!==s.Browser.info.version){var a=s.Browser.isDevice&&s.Browser.isIos?600:0;d=setTimeout(function(){t.element.setSelectionRange(0,n.length)},a)}else this.element.setSelectionRange(0,n.length)}s.Browser.isDevice||s.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},t.prototype.focusOutHandler=function(e){var t=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(),s.Browser.isDevice){var n=this.element.value;this.element.focus(),this.isPrevFocused=!1;var a=this.element;setTimeout(function(){t.setElementValue(n,a)},200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var r=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(r),s.Browser.isDevice||s.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}if(i.i(s.closest)(this.element,"form")){var l=this.element.nextElementSibling,o=document.createEvent("FocusEvent");o.initEvent("focusout",!1,!0),l.dispatchEvent(o)}}},t.prototype.mouseDownOnSpinner=function(e){var t=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){var i=(this.getElementData(e),e.currentTarget),n=i.classList.contains("e-spin-up")?"increment":"decrement";s.EventHandler.add(i,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval(function(){t.isCalled=!0,t.action(n,e)},150),s.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},t.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(l)||clearInterval(this.timeOut)},t.prototype.mouseUpOnSpinner=function(e){if(this.prevValue=this.value,this.isPrevFocused&&(this.element.focus(),s.Browser.isDevice||(this.isPrevFocused=!1)),s.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var t=e.currentTarget,n=t.classList.contains("e-spin-up")?"increment":"decrement";s.EventHandler.remove(t,"mouseleave",this.mouseUpClick),this.isCalled||this.action(n,e),this.isCalled=!1,s.EventHandler.remove(document,"mouseup",this.mouseUpClick);if(i.i(s.closest)(this.element,"form")){var a=this.element.nextElementSibling,r=document.createEvent("KeyboardEvent");r.initEvent("keyup",!1,!0),a.dispatchEvent(r)}}},t.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},t.prototype.floatLabelTypeUpdate=function(){n.a.removeFloating(this.inputWrapper);var e=this.hiddenInput;this.hiddenInput.remove(),n.a.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement),this.container.insertBefore(e,this.container.childNodes[1])},t.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,this.spinUp&&s.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),this.spinDown&&s.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},t.prototype.increment=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,"increment")),this.raiseChangeEvent()},t.prototype.decrement=function(e){void 0===e&&(e=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,e,"decrement")),this.raiseChangeEvent()},t.prototype.destroy=function(){this.unwireEvents(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),i.i(s.detach)(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),i.i(s.detach)(this.spinUp),i.i(s.detach)(this.spinDown));for(var t=["aria-labelledby","role","autocomplete","aria-readonly","aria-disabled","autocapitalize","spellcheck","aria-autocomplete","tabindex","aria-valuemin","aria-valuemax","aria-valuenow","aria-invalid"],a=0;a<t.length;a++)this.element.removeAttribute(t[a]);this.element.classList.remove("e-input"),this.container.insertAdjacentElement("afterend",this.element),i.i(s.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,n.a.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),e.prototype.destroy.call(this)},t.prototype.getText=function(){return this.element.value},t.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.element.focus(),i.i(s.addClass)([this.container],["e-input-focus"]))},t.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),i.i(s.removeClass)([this.container],["e-input-focus"]))},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){for(var a=0,r=Object.keys(e);a<r.length;a++){var l=r[a];switch(l){case"width":this.setElementWidth(e.width),n.a.calculateWidth(this.element,this.container);break;case"cssClass":this.updateCssClass(e.cssClass,t.cssClass);break;case"enabled":n.a.setEnabled(e.enabled,this.element),this.bindClearEvent();break;case"enableRtl":n.a.setEnableRtl(e.enableRtl,[this.container]);break;case"readonly":n.a.setReadonly(e.readonly,this.element),this.readonly?i.i(s.attributes)(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.updateDataAttribute(!0),this.checkAttributes(!0),n.a.validateInputType(this.container,this.element);break;case"placeholder":n.a.setPlaceholder(e.placeholder,this.element),n.a.calculateWidth(this.element,this.container);break;case"step":this.step=e.step,this.validateStep();break;case"showSpinButton":this.updateSpinButton(e);break;case"showClearButton":this.updateClearButton(e);break;case"floatLabelType":this.floatLabelType=e.floatLabelType,this.floatLabelTypeUpdate();break;case"value":this.isDynamicChange=(this.isAngular||this.isVue)&&this.preventChange,this.updateValue(e.value),this.isDynamicChange&&(this.preventChange=!1,this.isDynamicChange=!1);break;case"min":case"max":i.i(s.setValue)(l,i.i(s.getValue)(l,e),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=e.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.setSpinButton(),this.updatePlaceholder(),n.a.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":var o=i.i(s.getValue)(l,e);this.setProperties({currencyCode:o},!0),this.updateCurrency(l,o);break;case"currencyCode":var h=i.i(s.getValue)(l,e);this.setProperties({currency:h},!0),this.updateCurrency("currency",h);break;case"format":i.i(s.setValue)(l,i.i(s.getValue)(l,e),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=e.decimals,this.updateValue(this.value)}}},t.prototype.updateClearButton=function(e){n.a.setClearButton(e.showClearButton,this.element,this.inputWrapper,void 0,this.createElement),this.bindClearEvent()},t.prototype.updateSpinButton=function(e){e.showSpinButton?this.spinBtnCreation():(i.i(s.detach)(this.spinUp),i.i(s.detach)(this.spinDown))},t.prototype.getModuleName=function(){return"numerictextbox"},r([i.i(s.Property)("")],t.prototype,"cssClass",void 0),r([i.i(s.Property)(null)],t.prototype,"value",void 0),r([i.i(s.Property)(-Number.MAX_VALUE)],t.prototype,"min",void 0),r([i.i(s.Property)(Number.MAX_VALUE)],t.prototype,"max",void 0),r([i.i(s.Property)(1)],t.prototype,"step",void 0),r([i.i(s.Property)(null)],t.prototype,"width",void 0),r([i.i(s.Property)(null)],t.prototype,"placeholder",void 0),r([i.i(s.Property)({})],t.prototype,"htmlAttributes",void 0),r([i.i(s.Property)(!0)],t.prototype,"showSpinButton",void 0),r([i.i(s.Property)(!1)],t.prototype,"readonly",void 0),r([i.i(s.Property)(!0)],t.prototype,"enabled",void 0),r([i.i(s.Property)(!1)],t.prototype,"showClearButton",void 0),r([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),r([i.i(s.Property)("n2")],t.prototype,"format",void 0),r([i.i(s.Property)(null)],t.prototype,"decimals",void 0),r([i.i(s.Property)(null)],t.prototype,"currency",void 0),r([i.i(s.Property)(null)],t.prototype,"currencyCode",void 0),r([i.i(s.Property)(!0)],t.prototype,"strictMode",void 0),r([i.i(s.Property)(!1)],t.prototype,"validateDecimalOnType",void 0),r([i.i(s.Property)("Never")],t.prototype,"floatLabelType",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),r([i.i(s.Event)()],t.prototype,"destroyed",void 0),r([i.i(s.Event)()],t.prototype,"change",void 0),r([i.i(s.Event)()],t.prototype,"focus",void 0),r([i.i(s.Event)()],t.prototype,"blur",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"b",function(){return d}),i.d(t,"c",function(){return u});var s,n=i(0),a=(i.n(n),i(2)),r=(i.n(a),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()),l=this&&this.__decorate||function(e,t,i,s){var n,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},o="e-rating-icon e-icons e-star-filled",h="e-rating-selected";!function(e){e.Top="Top",e.Bottom="Bottom",e.Left="Left",e.Right="Right"}(s||(s={}));var d;!function(e){e.Full="Full",e.Half="Half",e.Quarter="Quarter",e.Exact="Exact"}(d||(d={}));var u=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.itemElements=[],s}return r(t,e),t.prototype.preRender=function(){this.element.id||(this.element.id=i.i(n.getUniqueID)("e-"+this.getModuleName())),this.keyConfigs={downarrow:"downarrow",leftarrow:"leftarrow",rightarrow:"rightarrow",uparrow:"uparrow",space:"space"},this.tooltipOpen=!1,this.isTouchSelected=!1},t.prototype.render=function(){this.initialize(),this.updateMinValue(),this.updateTemplateFunction(),this.triggerChange(null,this.value,!1),this.renderItems(),this.displayLabel()},t.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),i.i(n.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&&i.i(n.addClass)([this.wrapper],this.cssClass.split(" ")),this.updateTooltip(),this.wireKeyboardEvent(),this.updateDisabled()},t.prototype.updateDisabled=function(){this.wrapper.classList[this.disabled?"add":"remove"]("e-disabled"),i.i(n.attributes)(this.ratingItemList,{tabindex:this.disabled?"-1":"0"}),this.updateResetButton()},t.prototype.updateResetButton=function(){if(this.allowReset){var e=this.value<=this.min||this.disabled;this.resetElement.classList[e?"add":"remove"]("e-disabled"),i.i(n.attributes)(this.resetElement,{tabindex:e?"-1":"0","aria-hidden":e.toString()})}},t.prototype.renderItemList=function(){var e=this;this.ratingItemList=this.createElement("div",{className:"e-rating-item-list",id:this.element.id+"_item-list"}),i.i(n.attributes)(this.ratingItemList,{"aria-label":"rating",role:"slider"}),this.wrapper.appendChild(this.ratingItemList),n.EventHandler.add(this.ratingItemList,"touchmove",function(t){return e.touchMoveHandler(t)},this),n.EventHandler.add(this.ratingItemList,n.Browser.touchEndEvent,this.touchEndHandler,this)},t.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,s=i/t.width*this.itemsCount;s=this.enableRtl?this.itemsCount-s:s,s=s<this.min?this.min:s>this.itemsCount?this.itemsCount:s,s=this.validateValue(s);var n=0===s?null:this.itemElements[parseInt((Math.ceil(s)-1).toString(),10)];if(s===this.currentValue)return void(this.showTooltip&&n&&this.openRatingTooltip(n,!1));var a=this.currentValue;this.triggerChange(e,s),this.updateCurrentValue(s),this.showTooltip&&(n?(Math.ceil(s)!==Math.ceil(a)&&this.closeRatingTooltip(),this.openRatingTooltip(n,!0)):this.closeRatingTooltip())},t.prototype.touchEndHandler=function(){this.closeRatingTooltip(),this.wrapper.classList.remove("e-touch-select")},t.prototype.updateTemplateFunction=function(){this.emptyTemplateFunction=this.emptyTemplate?this.getTemplateString(this.emptyTemplate):null,this.fullTemplateFunction=this.fullTemplate?this.getTemplateString(this.fullTemplate):null},t.prototype.renderItems=function(){for(var e=this,t=0;t<this.itemsCount;t++){var s=this.createElement("span",{className:"e-rating-item-container"}),a=this.createElement("span",{className:"e-rating-item"}),r=this.getRatingValue(this.value,t);this.renderItemContent(a,r,t,!1),s.appendChild(a),this.wireItemsEvents(s,t+1),this.itemElements.push(s);var l={element:s,value:t+1};this.trigger("beforeItemRender",l,function(t){e.ratingItemList.appendChild(t.element)})}i.i(n.attributes)(this.ratingItemList,{"aria-valuemax":this.itemsCount.toString()}),this.updateItemValue(!1)},t.prototype.renderItemContent=function(e,t,s,a){a&&this.removeItemContent(e),this.fullTemplate&&1===t?(e.classList.add("e-rating-full"),i.i(n.append)(this.fullTemplateFunction({index:s,ratingValue:t},this,"ratingFullTemplate",this.element.id+"fullTemplate",this.isStringTemplate),e)):this.emptyTemplate?(e.classList.add("e-rating-empty"),i.i(n.append)(this.emptyTemplateFunction({index:s,ratingValue:t},this,"ratingEmptyTemplate",this.element.id+"emptyTemplate",this.isStringTemplate),e)):i.i(n.addClass)([e],o.split(" "))},t.prototype.removeItemContent=function(e){e.classList.remove("e-rating-full","e-rating-empty"),i.i(n.removeClass)([e],o.split(" ")),e.firstChild&&(e.innerHTML="")},t.prototype.updateTooltip=function(){this.showTooltip?(this.tooltipObj=new a.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)):i.i(n.isNullOrUndefined)(this.tooltipObj)||(this.tooltipObj.destroy(),this.tooltipObj=null)},t.prototype.updateMinValue=function(){this.setProperties({min:this.validateValue(this.min)},!0),this.min>0&&this.value<this.min&&this.triggerChange(null,this.min,!1),i.i(n.attributes)(this.ratingItemList,{"aria-valuemin":this.min.toString()})},t.prototype.validateValue=function(e){return e=e>this.itemsCount?this.itemsCount:e<0?0:this.precision===d.Full||this.enableSingleSelection?Math.round(e):this.precision===d.Half?Math.round(2*e)/2:this.precision===d.Quarter?Math.round(4*e)/4:Math.round(10*e)/10},t.prototype.getRatingValue=function(e,t){return this.enableSingleSelection?e>t&&e<=t+1?1:0:e>=t+1?1:e<t?0:e-t},t.prototype.updateItemValue=function(e){void 0===e&&(e=!0),e&&this.isReact&&this.clearTemplate(["ratingEmptyTemplate","ratingFullTemplate"]);for(var t=0;t<this.itemsCount;t++){var s=this.itemElements[parseInt(t.toString(),10)];s.classList.remove(h,"e-rating-intermediate","e-selected-value");var a=this.getRatingValue(this.currentValue,t);1===a?s.classList.add(h):a>0?s.classList.add("e-rating-intermediate"):this.precision===d.Full&&t+1<=this.value&&!this.enableSingleSelection&&s.classList.add("e-selected-value"),e&&this.updateItemContent(a,t),s.style.setProperty("--rating-value",100*a+"%"),s.classList[0===this.value&&0===t||this.value===t+1||a>0&&a<1?"add":"remove"]("e-rating-focus")}e&&this.renderReactTemplates(),this.updateResetButton(),i.i(n.attributes)(this.ratingItemList,{"aria-valuenow":this.currentValue.toString()}),i.i(n.attributes)(this.element,{value:this.value.toString()})},t.prototype.updateItemContent=function(e,t){if(this.fullTemplate||this.emptyTemplate){var s=this.itemElements[parseInt(t.toString(),10)].querySelector(".e-rating-item");if(this.fullTemplate&&1===e){if(!this.isReact&&s.classList.contains("e-rating-full"))return;this.removeItemContent(s),s.classList.add("e-rating-full"),i.i(n.append)(this.fullTemplateFunction({ratingValue:e,index:t},this,"ratingFullTemplate",this.element.id+"fullTemplate"+t,this.isStringTemplate),s)}else if(this.emptyTemplate){if(!this.isReact&&s.classList.contains("e-rating-empty"))return;this.removeItemContent(s),s.classList.add("e-rating-empty"),i.i(n.append)(this.emptyTemplateFunction({ratingValue:e,index:t},this,"ratingEmptyTemplate",this.element.id+"emptyTemplate"+t,this.isStringTemplate),s)}else this.removeItemContent(s),i.i(n.addClass)([s],o.split(" "))}},t.prototype.updateTooltipContent=function(e){var t=this;if(this.showTooltip){this.isReact&&this.clearTemplate(["ratingTooltipTemplate"]);var s;if(this.tooltipTemplate){s=this.createElement("span",{className:"e-rating-tooltip-content"});var a=this.getTemplateString(this.tooltipTemplate);i.i(n.append)(a({value:this.currentValue},this,"ratingTooltipTemplate",this.element.id+"tooltipTemplate",this.isStringTemplate),s),this.tooltipObj.setProperties({content:s},e),this.isAngular&&setTimeout(function(){var e=t.ratingItemList.querySelectorAll(".e-rating-item-container."+h);t.tooltipObj.refresh(e[e.length-1])})}else s=this.currentValue.toString(),this.tooltipObj.setProperties({content:i.i(n.initializeCSPTemplate)(function(){return s})},e);this.renderReactTemplates()}},t.prototype.getTemplateString=function(e){var t="";try{if("function"!=typeof e){var s=i.i(n.select)(e);t=s?"SCRIPT"===s.tagName?s.innerHTML:s.outerHTML:e}else t=e}catch(i){t=e}return i.i(n.compile)(t)},t.prototype.displayLabel=function(){this.showLabel?(this.spanLabel=this.createElement("span",{className:"e-rating-label"}),this.updateLabel(),this.updateLabelPosition()):this.wrapper.contains(this.spanLabel)&&(i.i(n.remove)(this.spanLabel),this.spanLabel=null)},t.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);i.i(n.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},t.prototype.updateReset=function(){this.allowReset?(this.resetElement=this.createElement("span",{className:"e-icons e-reset",attrs:{"aria-label":"resetbutton",role:"button"}}),this.updateResetButton(),n.EventHandler.add(this.resetElement,"click",this.resetClicked,this),this.wrapper.insertBefore(this.resetElement,this.ratingItemList)):this.wrapper.contains(this.resetElement)&&(i.i(n.remove)(this.resetElement),this.resetElement=null)},t.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)},t.prototype.clearLabelPosition=function(){var e=this.spanLabel.classList.value.match(/(e-label-[top|bottom|right|left]+)/g);e&&i.i(n.removeClass)([this.spanLabel],e)},t.prototype.wireItemsEvents=function(e,t){var i=this;n.EventHandler.add(e,"click",function(e){return i.clickHandler(e)},this),n.EventHandler.add(e,"mousemove",function(e){return i.mouseMoveHandler(t,e)},this),n.EventHandler.add(e,"mouseleave",this.mouseLeaveHandler,this)},t.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()},t.prototype.updateValueChange=function(e,t,i){void 0===i&&(i=!0),this.triggerChange(e,t,i),this.updateItemValue(),this.updateLabel()},t.prototype.triggerChange=function(e,t,i){if(void 0===i&&(i=!0),t=this.validateValue(t),this.currentValue=t,this.currentValue!==this.value){var s={event:e,isInteracted:i,value:t,previousValue:this.value};this.setProperties({value:t},!0),this.trigger("valueChanged",s)}},t.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)},t.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))},t.prototype.closeRatingTooltip=function(){this.tooltipOpen&&(this.tooltipObj.close(),this.tooltipOpen=!1)},t.prototype.updateCurrentValue=function(e){this.currentValue=e,this.updateItemValue(),this.updateLabel()},t.prototype.mouseLeaveHandler=function(){this.closeRatingTooltip(),this.updateCurrentValue(this.value)},t.prototype.calculateCurrentValue=function(e,t){var i=e;return this.enableSingleSelection||this.precision===d.Full||(i=t.offsetX/this.itemElements[e-1].clientWidth,i=this.enableRtl?1-i:i,this.precision===d.Quarter?i=i<=.25?.25:i<=.5?.5:i<.75?.75:1:this.precision===d.Half&&(i=i<=.5?.5:1),i=i+e-1),i},t.prototype.reset=function(){this.resetClicked(null,!1)},t.prototype.resetClicked=function(e,t){void 0===t&&(t=!0),this.updateValueChange(e,this.min,t),this.updateResetButton()},t.prototype.wireKeyboardEvent=function(){this.keyboardModuleRating=new n.KeyboardEvents(this.wrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},t.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)}}},t.prototype.handleNavigation=function(e,t){if(!t&&this.value>this.min||t&&this.value<this.itemsCount){var i=this.precision===d.Full||this.enableSingleSelection?1:this.precision===d.Half?.5:this.precision===d.Quarter?.25:Math.round(1)/10;i=t?this.value+i:this.value-i,this.updateValueChange(e,i),this.updateResetButton()}},t.prototype.updateContent=function(){this.isReact&&this.clearTemplate(["ratingEmptyTemplate","ratingFullTemplate"]);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)}},t.prototype.getModuleName=function(){return"rating"},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.removeItemElements=function(){for(var e=0;e<this.itemElements.length;e++)i.i(n.remove)(this.itemElements[parseInt(e.toString(),10)]);this.itemElements=[]},t.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),this.removeItemElements(),this.clearTemplate(),this.spanLabel&&(i.i(n.remove)(this.spanLabel),this.spanLabel=null),this.resetElement&&(i.i(n.remove)(this.resetElement),this.resetElement=null),this.showTooltip&&(this.tooltipObj.destroy(),this.tooltipObj=null),i.i(n.remove)(this.ratingItemList),this.ratingItemList=null,this.wrapper.parentNode.insertBefore(this.element,this.wrapper),i.i(n.remove)(this.wrapper),this.wrapper=null,this.keyboardModuleRating.destroy(),this.keyboardModuleRating=null,["value","aria-label","name"].forEach(function(e){t.element.removeAttribute(e)})},t.prototype.onPropertyChanged=function(e,t){for(var s=0,a=Object.keys(e);s<a.length;s++){switch(a[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":t.cssClass&&i.i(n.removeClass)([this.wrapper],t.cssClass.split(" ")),e.cssClass&&i.i(n.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()}}},l([i.i(n.Property)(!1)],t.prototype,"allowReset",void 0),l([i.i(n.Property)("")],t.prototype,"cssClass",void 0),l([i.i(n.Property)(!1)],t.prototype,"disabled",void 0),l([i.i(n.Property)("")],t.prototype,"emptyTemplate",void 0),l([i.i(n.Property)(!0)],t.prototype,"enableAnimation",void 0),l([i.i(n.Property)(!1)],t.prototype,"enableSingleSelection",void 0),l([i.i(n.Property)("")],t.prototype,"fullTemplate",void 0),l([i.i(n.Property)(5)],t.prototype,"itemsCount",void 0),l([i.i(n.Property)(s.Right)],t.prototype,"labelPosition",void 0),l([i.i(n.Property)("")],t.prototype,"labelTemplate",void 0),l([i.i(n.Property)(0)],t.prototype,"min",void 0),l([i.i(n.Property)(d.Full)],t.prototype,"precision",void 0),l([i.i(n.Property)(!1)],t.prototype,"readOnly",void 0),l([i.i(n.Property)(!1)],t.prototype,"showLabel",void 0),l([i.i(n.Property)(!0)],t.prototype,"showTooltip",void 0),l([i.i(n.Property)("")],t.prototype,"tooltipTemplate",void 0),l([i.i(n.Property)(0)],t.prototype,"value",void 0),l([i.i(n.Property)(!0)],t.prototype,"visible",void 0),l([i.i(n.Event)()],t.prototype,"beforeItemRender",void 0),l([i.i(n.Event)()],t.prototype,"created",void 0),l([i.i(n.Event)()],t.prototype,"onItemHover",void 0),l([i.i(n.Event)()],t.prototype,"valueChanged",void 0),t=l([n.NotifyPropertyChanges],t)}(n.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var s=i(0),n=(i.n(s),i(6)),a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),r=this&&this.__decorate||function(e,t,i,s){var n,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},l=function(e){function t(t,i){return e.call(this,t,i)||this}return a(t,e),t.prototype.preRender=function(){},t.prototype.render=function(){this.initialize()},t.prototype.initialize=function(){this.element.setAttribute("role","img"),this.element.setAttribute("aria-label","signature"),i.i(s.addClass)([this.element],"e-"+this.getModuleName()),e.prototype.initialize.call(this,this.element),this.enablePersistence&&this.loadPersistedSignature()},t.prototype.getModuleName=function(){return"signature"},t.prototype.getPersistData=function(){return this.addOnPersist(["signatureValue"])},t.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"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)}}},r([i.i(s.Property)("")],t.prototype,"backgroundColor",void 0),r([i.i(s.Property)("")],t.prototype,"backgroundImage",void 0),r([i.i(s.Property)(!1)],t.prototype,"disabled",void 0),r([i.i(s.Property)(!1)],t.prototype,"isReadOnly",void 0),r([i.i(s.Property)(!0)],t.prototype,"saveWithBackground",void 0),r([i.i(s.Property)("#000000")],t.prototype,"strokeColor",void 0),r([i.i(s.Property)(.5)],t.prototype,"minStrokeWidth",void 0),r([i.i(s.Property)(2)],t.prototype,"maxStrokeWidth",void 0),r([i.i(s.Property)(.7)],t.prototype,"velocity",void 0),r([i.i(s.Property)("en-US")],t.prototype,"locale",void 0),r([i.i(s.Property)(!1)],t.prototype,"enableRtl",void 0),r([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),r([i.i(s.Event)()],t.prototype,"beforeSave",void 0),r([i.i(s.Event)()],t.prototype,"change",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),t=r([s.NotifyPropertyChanges],t)}(n.a)},function(e,t,i){"use strict";i.d(t,"a",function(){return o});var s=i(0),n=(i.n(s),i(1)),a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),r=this&&this.__decorate||function(e,t,i,s){var n,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},l="e-auto-width",o=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.previousValue=null,s.isForm=!1,s.inputPreviousValue=null,s.isAngular=!1,s.isVue=!1,s.textareaOptions=t,s}return a(t,e),t.prototype.onPropertyChanged=function(e,t){for(var a=0,r=Object.keys(e);a<r.length;a++){switch(r[a]){case"floatLabelType":n.a.removeFloating(this.textareaWrapper),n.a.addFloating(this.element,this.floatLabelType,this.placeholder),"Never"===this.floatLabelType&&this.element.removeAttribute("aria-labelledby");break;case"enabled":n.a.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(e.width),this.textareaWrapper.container.classList.add(l)):(this.textareaWrapper.container.classList.contains(l)&&this.textareaWrapper.container.classList.remove(l),n.a.setWidth(e.width,this.textareaWrapper.container));break;case"value":var o=this.isProtectedOnChange;this.isProtectedOnChange=!0,n.a.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=o,n.a.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):(i.i(s.isNullOrUndefined)(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&i.i(s.isNullOrUndefined)(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttributesToElement(),this.updateHTMLAttributesToWrapper(),this.checkAttributes(!0),n.a.validateInputType(this.textareaWrapper.container,this.element);break;case"readonly":n.a.setReadonly(this.readonly,this.element),this.readonly?this.element.setAttribute("aria-readonly","true"):this.element.removeAttribute("aria-readonly");break;case"showClearButton":n.a.setClearButton(this.showClearButton,this.element,this.textareaWrapper),this.bindClearEvent();break;case"enableRtl":n.a.setEnableRtl(this.enableRtl,[this.textareaWrapper.container]);break;case"placeholder":n.a.setPlaceholder(this.placeholder,this.element),n.a.calculateWidth(this.element,this.textareaWrapper.container);break;case"cssClass":n.a.updateCssClass(e.cssClass,t.cssClass,this.textareaWrapper.container);break;case"locale":this.globalize=new s.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),n.a.setPlaceholder(this.placeholder,this.element);break;case"rowsCount":this.rowsCount&&this.element.setAttribute("rows",this.rowsCount.toString());break;case"columnsCount":this.columnsCount&&(this.element.setAttribute("cols",this.columnsCount.toString()),null==this.width&&this.textareaWrapper.container.classList.add(l));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(t.resizeMode))&&this.element.classList.remove(this.getCurrentResizeClass(t.resizeMode)),this.element.classList.add(this.getCurrentResizeClass(this.resizeMode)),!this.element.style.width||"None"!==this.resizeMode&&"Vertical"!==this.resizeMode){var h=this.element.offsetWidth;this.element.style.width=h+"px",this.textareaWrapper.container.style.width&&(this.textareaWrapper.container.style.width="")}else n.a.setWidth(this.element.style.width,this.textareaWrapper.container);this.setWrapperWidth()}}}},t.prototype.preRender=function(){if(this.formElement=i.i(s.closest)(this.element,"form"),i.i(s.isNullOrUndefined)(this.formElement)||(this.isForm=!0),"EJS-TEXTAREA"===this.element.tagName){var e=i.i(s.getValue)("ej2_instances",this.element),t=this.createElement("textarea"),n=0;for(n;n<this.element.attributes.length;n++){var a=this.element.attributes[n].nodeName;"id"!==a&&"class"!==a?(t.setAttribute(a,this.element.attributes[n].nodeValue),t.innerHTML=this.element.innerHTML,"name"===a&&this.element.removeAttribute("name")):"class"===a&&t.setAttribute(a,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "))}this.element.appendChild(t),this.element=t,i.i(s.setValue)("ej2_instances",e,this.element)}this.updateHTMLAttributesToElement(),this.checkAttributes(!1),!i.i(s.isNullOrUndefined)(this.textareaOptions)&&void 0!==this.textareaOptions.value||""===this.element.value||this.setProperties({value:this.element.value},!0),this.globalize=new s.Internationalization(this.locale);var r={placeholder:this.placeholder};this.l10n=new s.L10n("textarea",r,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",i.i(s.getUniqueID)("textbox")),this.element.hasAttribute("name")||this.element.setAttribute("name",this.element.getAttribute("id")),this.rowsCount&&this.element.setAttribute("rows",this.rowsCount.toString()),this.columnsCount&&this.element.setAttribute("cols",this.columnsCount.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")},t.prototype.render=function(){var e=this.cssClass;i.i(s.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(e=n.a.getInputValidClassList(this.cssClass)),this.textareaWrapper=n.a.createInput({element:this.element,floatLabelType:this.floatLabelType,properties:{enabled:this.enabled,enableRtl:this.enableRtl,cssClass:e,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}}),this.updateHTMLAttributesToWrapper(),this.wireEvents(),i.i(s.isNullOrUndefined)(this.value)||n.a.setValue(this.value,this.element,this.floatLabelType,this.showClearButton),i.i(s.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,n.a.setWidth(this.width,this.textareaWrapper.container),this.setWrapperWidth(),this.renderComplete()},t.prototype.getModuleName=function(){return"textarea"},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.checkAttributes=function(e){for(var t=e?i.i(s.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"],n=0,a=t;n<a.length;n++){var r=a[n];if(!i.i(s.isNullOrUndefined)(this.element.getAttribute(r)))switch(r){case"disabled":if(i.i(s.isNullOrUndefined)(this.textareaOptions)||void 0===this.textareaOptions.enabled||e){var l="disabled"!==this.element.getAttribute(r)&&""!==this.element.getAttribute(r)&&"true"!==this.element.getAttribute(r);this.setProperties({enabled:l},!e)}break;case"readonly":if(i.i(s.isNullOrUndefined)(this.textareaOptions)||void 0===this.textareaOptions.readonly||e){var o="readonly"===this.element.getAttribute(r)||""===this.element.getAttribute(r)||"true"===this.element.getAttribute(r);this.setProperties({readonly:o},!e)}break;case"placeholder":(i.i(s.isNullOrUndefined)(this.textareaOptions)||void 0===this.textareaOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"value":(i.i(s.isNullOrUndefined)(this.textareaOptions)||void 0===this.textareaOptions.value||e)&&""!==this.element.value&&this.setProperties({value:this.element.value},!e)}}},t.prototype.wireEvents=function(){s.EventHandler.add(this.element,"focus",this.focusHandler,this),s.EventHandler.add(this.element,"blur",this.focusOutHandler,this),s.EventHandler.add(this.element,"keydown",this.keydownHandler,this),s.EventHandler.add(this.element,"input",this.inputHandler,this),s.EventHandler.add(this.element,"change",this.changeHandler,this),this.isForm&&s.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent()},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.element,"focus",this.focusHandler),s.EventHandler.remove(this.element,"blur",this.focusOutHandler),s.EventHandler.remove(this.element,"keydown",this.keydownHandler),s.EventHandler.remove(this.element,"input",this.inputHandler),s.EventHandler.remove(this.element,"change",this.changeHandler),this.isForm&&s.EventHandler.remove(this.formElement,"reset",this.resetForm)},t.prototype.destroy=function(){this.unWireEvents(),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.removeAttributes(["aria-disabled","aria-readonly","aria-labelledby","aria-multiline"]),i.i(s.isNullOrUndefined)(this.textareaWrapper)||(this.textareaWrapper.container.insertAdjacentElement("afterend",this.element),i.i(s.detach)(this.textareaWrapper.container)),this.textareaWrapper=null,this.formElement=null,n.a.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),e.prototype.destroy.call(this)},t.prototype.focusHandler=function(e){var t={container:this.textareaWrapper.container,event:e,value:this.value};this.trigger("focus",t)},t.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.trigger("blur",t)},t.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)},t.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()},t.prototype.changeHandler=function(e){this.setProperties({value:this.element.value},!0),this.previousValue!==this.value&&this.raiseChangeEvent(e,!0),e.stopPropagation()},t.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},t.prototype.updateHTMLAttributesToWrapper=function(){n.a.updateHTMLAttributesToWrapper(this.htmlAttributes,this.textareaWrapper.container)},t.prototype.updateHTMLAttributesToElement=function(){n.a.updateHTMLAttributesToElement(this.htmlAttributes,this.element)},t.prototype.bindClearEvent=function(){this.showClearButton&&(this.enabled?s.EventHandler.add(this.textareaWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):s.EventHandler.remove(this.textareaWrapper.clearButton,"mousedown touchstart",this.resetInputHandler))},t.prototype.resetInputHandler=function(e){e.preventDefault(),this.textareaWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.textareaWrapper.container.classList.contains("e-static-clear")||(n.a.setValue("",this.element,this.floatLabelType,this.showClearButton),this.setProperties({value:this.element.value},!0));var t={event:e,value:this.element.value,previousValue:this.inputPreviousValue,container:this.textareaWrapper.container};if(this.trigger("input",t),this.inputPreviousValue=this.element.value,this.raiseChangeEvent(e,!0),i.i(s.closest)(this.element,"form")){var a=this.element,r=document.createEvent("KeyboardEvent");r.initEvent("keyup",!1,!0),a.dispatchEvent(r)}},t.prototype.addAttributes=function(e){for(var t=0,i=Object.keys(e);t<i.length;t++){var s=i[t];"disabled"===s?(this.setProperties({enabled:!1},!0),n.a.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container)):"readonly"===s?(this.setProperties({readonly:!0},!0),n.a.setReadonly(this.readonly,this.element)):"class"===s?this.element.classList.add(e[""+s]):"placeholder"===s?(this.setProperties({placeholder:e[""+s]},!0),n.a.setPlaceholder(this.placeholder,this.element)):this.element.setAttribute(s,e[""+s])}},t.prototype.removeAttributes=function(e){for(var t=0,i=e;t<i.length;t++){var s=i[t];"disabled"===s?(this.setProperties({enabled:!0},!0),n.a.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container)):"readonly"===s?(this.setProperties({readonly:!1},!0),n.a.setReadonly(this.readonly,this.element)):"placeholder"===s?(this.setProperties({placeholder:null},!0),n.a.setPlaceholder(this.placeholder,this.element)):this.element.removeAttribute(s)}},t.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"))&&i.i(s.addClass)([this.textareaWrapper.container],[n.b]))},t.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"))&&i.i(s.removeClass)([this.textareaWrapper.container],[n.b]))},t.prototype.setWrapperWidth=function(){this.enabled&&("None"!==this.resizeMode&&"Vertical"!==this.resizeMode||this.columnsCount||this.element.getAttribute("cols"))?("None"!==this.resizeMode&&"Vertical"!==this.resizeMode&&this.textareaWrapper.container.style.width&&(this.setElementWidth(this.textareaWrapper.container.style.width),this.textareaWrapper.container.style.width="",this.textareaWrapper.container.classList.add(l)),this.textareaWrapper.container.classList.add(l)):this.textareaWrapper.container.classList.contains(l)&&this.textareaWrapper.container.classList.remove(l)},t.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!i.i(s.isNullOrUndefined)(this.textareaWrapper)){var e=this.textareaWrapper.container.querySelector(".e-float-text");i.i(s.isNullOrUndefined)(e)||"Always"===this.floatLabelType||(i.i(s.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")))}},t.prototype.resetValue=function(e){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=e,null==e&&this.textareaWrapper.container.classList.contains("e-valid-input")&&this.textareaWrapper.container.classList.remove("e-valid-input"),this.isProtectedOnChange=t},t.prototype.setElementWidth=function(e){"number"==typeof e?this.element.style.width=i.i(s.formatUnit)(e):"string"==typeof e&&(this.element.style.width=e.match(/px|%|em/)?e:i.i(s.formatUnit)(e))},t.prototype.getCurrentResizeClass=function(e){return"None"===e?"e-resize-none":"Both"===e?"e-resize-xy":"Horizontal"===e?"e-resize-x":"e-resize-y"},r([i.i(s.Property)(!1)],t.prototype,"readonly",void 0),r([i.i(s.Property)(null)],t.prototype,"value",void 0),r([i.i(s.Property)("Never")],t.prototype,"floatLabelType",void 0),r([i.i(s.Property)("")],t.prototype,"cssClass",void 0),r([i.i(s.Property)(null)],t.prototype,"placeholder",void 0),r([i.i(s.Property)({})],t.prototype,"htmlAttributes",void 0),r([i.i(s.Property)(!0)],t.prototype,"enabled",void 0),r([i.i(s.Property)(!1)],t.prototype,"showClearButton",void 0),r([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),r([i.i(s.Property)(null)],t.prototype,"width",void 0),r([i.i(s.Property)("Vertical")],t.prototype,"resizeMode",void 0),r([i.i(s.Property)(null)],t.prototype,"maxLength",void 0),r([i.i(s.Property)(null)],t.prototype,"columnsCount",void 0),r([i.i(s.Property)(null)],t.prototype,"rowsCount",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),r([i.i(s.Event)()],t.prototype,"destroyed",void 0),r([i.i(s.Event)()],t.prototype,"change",void 0),r([i.i(s.Event)()],t.prototype,"blur",void 0),r([i.i(s.Event)()],t.prototype,"focus",void 0),r([i.i(s.Event)()],t.prototype,"input",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return l});var s=i(0),n=(i.n(s),i(1)),a=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),r=this&&this.__decorate||function(e,t,i,s){var n,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},l=function(e){function t(t,i){var s=e.call(this,t,i)||this;return s.previousValue=null,s.isAngular=!1,s.isHiddenInput=!1,s.isForm=!1,s.inputPreviousValue=null,s.isVue=!1,s.isReact=!1,s.textboxOptions=t,s}return a(t,e),t.prototype.onPropertyChanged=function(e,t){for(var a=0,r=Object.keys(e);a<r.length;a++){switch(r[a]){case"floatLabelType":n.a.removeFloating(this.textboxWrapper),n.a.addFloating(this.respectiveElement,this.floatLabelType,this.placeholder);break;case"enabled":n.a.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container),this.bindClearEvent();break;case"width":n.a.setWidth(e.width,this.textboxWrapper.container);break;case"value":var l=this.isProtectedOnChange;this.isProtectedOnChange=!0,n.a.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=l,n.a.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):(i.i(s.isNullOrUndefined)(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&i.i(s.isNullOrUndefined)(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttributesToElement(),this.updateHTMLAttributesToWrapper(),this.checkAttributes(!0),this.multiline&&!i.i(s.isNullOrUndefined)(this.textarea)?n.a.validateInputType(this.textboxWrapper.container,this.textarea):n.a.validateInputType(this.textboxWrapper.container,this.element);break;case"readonly":n.a.setReadonly(this.readonly,this.respectiveElement);break;case"type":"TEXTAREA"!==this.respectiveElement.tagName&&(this.respectiveElement.setAttribute("type",this.type),n.a.validateInputType(this.textboxWrapper.container,this.element),this.raiseChangeEvent());break;case"showClearButton":n.a.setClearButton(this.showClearButton,this.respectiveElement,this.textboxWrapper),this.bindClearEvent();break;case"enableRtl":n.a.setEnableRtl(this.enableRtl,[this.textboxWrapper.container]);break;case"placeholder":n.a.setPlaceholder(this.placeholder,this.respectiveElement),n.a.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":n.a.updateCssClass(e.cssClass,t.cssClass,this.textboxWrapper.container);break;case"locale":this.globalize=new s.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),n.a.setPlaceholder(this.placeholder,this.respectiveElement)}}},t.prototype.getModuleName=function(){return"textbox"},t.prototype.preRender=function(){if(this.cloneElement=this.element.cloneNode(!0),this.formElement=i.i(s.closest)(this.element,"form"),i.i(s.isNullOrUndefined)(this.formElement)||(this.isForm=!0),"EJS-TEXTBOX"===this.element.tagName){var e=i.i(s.getValue)("ej2_instances",this.element),t=this.multiline?this.createElement("textarea"):this.createElement("input"),a=0;for(a;a<this.element.attributes.length;a++){var r=this.element.attributes[a].nodeName;"id"!==r&&"class"!==r?(t.setAttribute(r,this.element.attributes[a].nodeValue),t.innerHTML=this.element.innerHTML,"name"===r&&this.element.removeAttribute("name")):"class"===r&&t.setAttribute(r,this.element.className.split(" ").filter(function(e){return 0!==e.indexOf("ng-")}).join(" "))}this.element.appendChild(t),this.element=t,i.i(s.setValue)("ej2_instances",e,this.element)}this.updateHTMLAttributesToElement(),this.checkAttributes(!1),!i.i(s.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 s.Internationalization(this.locale);var l={placeholder:this.placeholder};if(this.l10n=new s.L10n("textbox",l,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",i.i(s.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",i.i(s.getUniqueID)("textarea"));for(var o=["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)&&n.c.indexOf(r)<0&&"id"!==r&&"type"!==r&&"e-mappinguid"!==r&&(this.textarea.setAttribute(r,this.element.attributes[a].nodeValue),o.indexOf(r)<0&&(this.element.removeAttribute(r),a--))}}},t.prototype.checkAttributes=function(e){for(var t=e?i.i(s.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly","type","autocomplete"],n=0,a=t;n<a.length;n++){var r=a[n];if(!i.i(s.isNullOrUndefined)(this.element.getAttribute(r)))switch(r){case"disabled":if(i.i(s.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.enabled||e){var l="disabled"!==this.element.getAttribute(r)&&""!==this.element.getAttribute(r)&&"true"!==this.element.getAttribute(r);this.setProperties({enabled:l},!e)}break;case"readonly":if(i.i(s.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.readonly||e){var o="readonly"===this.element.getAttribute(r)||""===this.element.getAttribute(r)||"true"===this.element.getAttribute(r);this.setProperties({readonly:o},!e)}break;case"placeholder":(i.i(s.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.placeholder||e)&&this.setProperties({placeholder:this.element.placeholder},!e);break;case"autocomplete":if(i.i(s.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.autocomplete||e){var h="off"===this.element.autocomplete?"off":"on";this.setProperties({autocomplete:h},!e)}break;case"value":(i.i(s.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.value||e)&&""!==this.element.value&&this.setProperties({value:this.element.value},!e);break;case"type":(i.i(s.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.type||e)&&this.setProperties({type:this.element.type},!e)}}},t.prototype.render=function(){var e=this.cssClass;i.i(s.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(e=n.a.getInputValidClassList(this.cssClass)),this.respectiveElement=this.isHiddenInput?this.textarea:this.element,this.textboxWrapper=n.a.createInput({element:this.respectiveElement,floatLabelType:this.floatLabelType,properties:{enabled:this.enabled,enableRtl:this.enableRtl,cssClass:e,readonly:this.readonly,placeholder:this.placeholder,showClearButton:this.showClearButton}}),this.updateHTMLAttributesToWrapper(),this.isHiddenInput&&this.respectiveElement.parentNode.insertBefore(this.element,this.respectiveElement),this.wireEvents(),i.i(s.isNullOrUndefined)(this.value)||(n.a.setValue(this.value,this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value)),i.i(s.isNullOrUndefined)(this.value)||(this.initialValue=this.value,this.setInitialValue()),"on"!==this.autocomplete&&""!==this.autocomplete?this.respectiveElement.autocomplete=this.autocomplete:i.i(s.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,n.a.setWidth(this.width,this.textboxWrapper.container),!i.i(s.isNullOrUndefined)(i.i(s.closest)(this.element,"fieldset"))&&i.i(s.closest)(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete()},t.prototype.updateHTMLAttributesToWrapper=function(){n.a.updateHTMLAttributesToWrapper(this.htmlAttributes,this.textboxWrapper.container)},t.prototype.updateHTMLAttributesToElement=function(){n.a.updateHTMLAttributesToElement(this.htmlAttributes,this.respectiveElement?this.respectiveElement:this.multiline&&!i.i(s.isNullOrUndefined)(this.textarea)?this.textarea:this.element)},t.prototype.setInitialValue=function(){this.isAngular||this.respectiveElement.setAttribute("value",this.initialValue)},t.prototype.wireEvents=function(){s.EventHandler.add(this.respectiveElement,"focus",this.focusHandler,this),s.EventHandler.add(this.respectiveElement,"blur",this.focusOutHandler,this),s.EventHandler.add(this.respectiveElement,"keydown",this.keydownHandler,this),s.EventHandler.add(this.respectiveElement,"input",this.inputHandler,this),s.EventHandler.add(this.respectiveElement,"change",this.changeHandler,this),this.isForm&&s.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent(),!i.i(s.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")&&s.EventHandler.add(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler,this)},t.prototype.animationHandler=function(){this.textboxWrapper.container.classList.add("e-valid-input");var e=this.textboxWrapper.container.querySelector(".e-float-text");i.i(s.isNullOrUndefined)(e)||(e.classList.add("e-label-top"),e.classList.contains("e-label-bottom")&&e.classList.remove("e-label-bottom"))},t.prototype.resetValue=function(e){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=e,null==e&&this.textboxWrapper.container.classList.contains("e-valid-input")&&this.textboxWrapper.container.classList.remove("e-valid-input"),this.isProtectedOnChange=t},t.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!i.i(s.isNullOrUndefined)(this.textboxWrapper)){var e=this.textboxWrapper.container.querySelector(".e-float-text");i.i(s.isNullOrUndefined)(e)||"Always"===this.floatLabelType||(i.i(s.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")))}},t.prototype.focusHandler=function(e){var t={container:this.textboxWrapper.container,event:e,value:this.value};this.trigger("focus",t)},t.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)},t.prototype.keydownHandler=function(e){13!==e.keyCode&&9!==e.keyCode||!(null!==this.previousValue&&""!==this.previousValue||null!==this.value&&""!==this.value||""!==this.respectiveElement.value)||this.setProperties({value:this.respectiveElement.value},!0)},t.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()},t.prototype.changeHandler=function(e){this.setProperties({value:this.respectiveElement.value},!0),this.previousValue!=this.value&&this.raiseChangeEvent(e,!0),e.stopPropagation()},t.prototype.raiseChangeEvent=function(e,t){var i={event:e,value:this.value,previousValue:this.previousValue,container:this.textboxWrapper.container,isInteraction:t||!1,isInteracted:t||!1};this.preventChange=!1,this.trigger("change",i),this.previousValue=this.value,"INPUT"===this.element.tagName&&this.multiline&&"mozilla"===s.Browser.info.name&&(this.element.value=this.respectiveElement.value)},t.prototype.bindClearEvent=function(){this.showClearButton&&(this.enabled?s.EventHandler.add(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):s.EventHandler.remove(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler))},t.prototype.resetInputHandler=function(e){if(e.preventDefault(),!this.textboxWrapper.clearButton.classList.contains("e-clear-icon-hide")||this.textboxWrapper.container.classList.contains("e-static-clear")){n.a.setValue("",this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value),this.setProperties({value:this.respectiveElement.value},!0);var t={event:e,value:this.respectiveElement.value,previousValue:this.inputPreviousValue,container:this.textboxWrapper.container};if(this.trigger("input",t),this.inputPreviousValue=this.respectiveElement.value,this.raiseChangeEvent(e,!0),i.i(s.closest)(this.element,"form")){var a=this.element,r=document.createEvent("KeyboardEvent");r.initEvent("keyup",!1,!0),a.dispatchEvent(r)}}},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.respectiveElement,"focus",this.focusHandler),s.EventHandler.remove(this.respectiveElement,"blur",this.focusOutHandler),s.EventHandler.remove(this.respectiveElement,"keydown",this.keydownHandler),s.EventHandler.remove(this.respectiveElement,"input",this.inputHandler),s.EventHandler.remove(this.respectiveElement,"change",this.changeHandler),this.isForm&&s.EventHandler.remove(this.formElement,"reset",this.resetForm),!i.i(s.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")&&s.EventHandler.remove(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler)},t.prototype.destroy=function(){this.unWireEvents(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),"INPUT"===this.element.tagName&&this.multiline&&(i.i(s.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"]),i.i(s.isNullOrUndefined)(this.textboxWrapper)||(this.textboxWrapper.container.insertAdjacentElement("afterend",this.respectiveElement),i.i(s.detach)(this.textboxWrapper.container)),this.textboxWrapper=null,n.a.destroy({element:this.respectiveElement,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),e.prototype.destroy.call(this)},t.prototype.addIcon=function(e,t){n.a.addIcon(e,t,this.textboxWrapper.container,this.respectiveElement,this.createElement)},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.addAttributes=function(e){for(var t=0,i=Object.keys(e);t<i.length;t++){var s=i[t];"disabled"===s?(this.setProperties({enabled:!1},!0),n.a.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===s?(this.setProperties({readonly:!0},!0),n.a.setReadonly(this.readonly,this.respectiveElement)):"class"===s?this.respectiveElement.classList.add(e[""+s]):"placeholder"===s?(this.setProperties({placeholder:e[""+s]},!0),n.a.setPlaceholder(this.placeholder,this.respectiveElement)):("rows"===s&&this.respectiveElement.tagName,this.respectiveElement.setAttribute(s,e[""+s]))}},t.prototype.removeAttributes=function(e){for(var t=0,i=e;t<i.length;t++){var s=i[t];"disabled"===s?(this.setProperties({enabled:!0},!0),n.a.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===s?(this.setProperties({readonly:!1},!0),n.a.setReadonly(this.readonly,this.respectiveElement)):"placeholder"===s?(this.setProperties({placeholder:null},!0),n.a.setPlaceholder(this.placeholder,this.respectiveElement)):this.respectiveElement.removeAttribute(s)}},t.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"))&&i.i(s.addClass)([this.textboxWrapper.container],[n.b]))},t.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"))&&i.i(s.removeClass)([this.textboxWrapper.container],[n.b]))},r([i.i(s.Property)("text")],t.prototype,"type",void 0),r([i.i(s.Property)(!1)],t.prototype,"readonly",void 0),r([i.i(s.Property)(null)],t.prototype,"value",void 0),r([i.i(s.Property)("Never")],t.prototype,"floatLabelType",void 0),r([i.i(s.Property)("")],t.prototype,"cssClass",void 0),r([i.i(s.Property)(null)],t.prototype,"placeholder",void 0),r([i.i(s.Property)("on")],t.prototype,"autocomplete",void 0),r([i.i(s.Property)({})],t.prototype,"htmlAttributes",void 0),r([i.i(s.Property)(!1)],t.prototype,"multiline",void 0),r([i.i(s.Property)(!0)],t.prototype,"enabled",void 0),r([i.i(s.Property)(!1)],t.prototype,"showClearButton",void 0),r([i.i(s.Property)(!1)],t.prototype,"enablePersistence",void 0),r([i.i(s.Property)(null)],t.prototype,"width",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),r([i.i(s.Event)()],t.prototype,"destroyed",void 0),r([i.i(s.Event)()],t.prototype,"change",void 0),r([i.i(s.Event)()],t.prototype,"blur",void 0),r([i.i(s.Event)()],t.prototype,"focus",void 0),r([i.i(s.Event)()],t.prototype,"input",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)},function(e,t,i){"use strict";i.d(t,"a",function(){return b}),i.d(t,"b",function(){return C}),i.d(t,"c",function(){return E}),i.d(t,"d",function(){return x});var s=i(0),n=(i.n(s),i(2)),a=(i.n(n),this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()),r=this&&this.__decorate||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},l="e-upload-file-list",o="e-file-status",h="e-file-remove-btn",d="e-file-delete-btn",u="e-file-abort-btn",c="e-file-reload-btn",p="e-upload-progress-wrap",m="e-upload-progress-bar",v="e-upload-success",f="e-upload-fails",g="e-file-pause-btn",y=["title","style","class"],b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([i.i(s.Property)("")],t.prototype,"name",void 0),r([i.i(s.Property)(null)],t.prototype,"size",void 0),r([i.i(s.Property)("")],t.prototype,"type",void 0),t}(s.ChildProperty),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([i.i(s.Property)("Browse...")],t.prototype,"browse",void 0),r([i.i(s.Property)("Upload")],t.prototype,"upload",void 0),r([i.i(s.Property)("Clear")],t.prototype,"clear",void 0),t}(s.ChildProperty),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([i.i(s.Property)("")],t.prototype,"saveUrl",void 0),r([i.i(s.Property)("")],t.prototype,"removeUrl",void 0),r([i.i(s.Property)(0)],t.prototype,"chunkSize",void 0),r([i.i(s.Property)(3)],t.prototype,"retryCount",void 0),r([i.i(s.Property)(500)],t.prototype,"retryAfterDelay",void 0),t}(s.ChildProperty),x=function(e){function t(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.isAngular=!1,s.fileList=[],s.filesData=[],s.uploaderOptions=t,s}return a(t,e),t.prototype.onPropertyChanged=function(e,t){for(var n=0,a=Object.keys(e);n<a.length;n++){switch(a[n]){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=i.i(s.isNullOrUndefined)(this.buttons.browse)?"":this.buttons.browse,this.buttons.clear=i.i(s.isNullOrUndefined)(this.buttons.clear)?"":this.buttons.clear,this.buttons.upload=i.i(s.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":i.i(s.getValue)("ej2_instances",this.element)[0].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=i.i(s.getValue)("currentLocale",this.l10n);break;case"cssClass":this.setCSSClass(t.cssClass)}}},t.prototype.setLocalizedTexts=function(){i.i(s.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&&!i.i(s.isNullOrUndefined)(this.uploadWrapper.querySelector(".e-file-drop"))&&(this.uploadWrapper.querySelector(".e-file-drop").innerHTML=this.localizedTexts("dropFilesHint"))),this.updateFileList())},t.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},t.prototype.updateFileList=function(){var e;if(this.fileList.length>0&&!i.i(s.isNullOrUndefined)(this.uploadWrapper.querySelector(".e-upload-files")))for(var t=0;t<this.fileList.length;t++)e=this.fileList[t].querySelector(".e-file-status"),e.innerHTML=this.localizedTexts(this.getKeyValue(this.filesData[t].status)),this.filesData[t].status=this.localizedTexts(this.getKeyValue(this.filesData[t].status)),this.fileList[t].classList.contains(v)&&this.fileList[t].querySelector(".e-icons").setAttribute("title",this.localizedTexts("delete")),this.fileList[t].querySelector(".e-file-play-btn")&&this.fileList[t].querySelector(".e-icons").setAttribute("title",this.localizedTexts("resume")),this.fileList[t].querySelector(".e-file-remove-btn")&&this.fileList[t].querySelector(".e-icons").setAttribute("title",this.localizedTexts("remove")),this.fileList[t].querySelector(".e-file-reload-btn")&&this.fileList[t].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")))},t.prototype.reRenderFileList=function(){this.listParent&&(i.i(s.detach)(this.listParent),this.listParent=null,this.fileList=[],this.internalCreateFileList(this.filesData),this.actionButtons&&(this.removeActionButtons(),this.renderActionButtons(),this.checkActionButtonStatus()))},t.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 s.L10n("uploader",this.localeText,this.locale),this.preLocaleObj=i.i(s.getValue)("currentLocale",this.l10n),this.formRendered(),this.updateHTMLAttrToElement(),this.checkHTMLAttributes(!1);var e=i.i(s.getValue)("ej2_instances",this.element);if("EJS-UPLOADER"===this.element.tagName){var t=this.createElement("input",{attrs:{type:"file"}}),n=0;for(n;n<this.element.attributes.length;n++)"id"!==this.element.attributes[n].nodeName?t.setAttribute(this.element.attributes[n].nodeName,this.element.attributes[n].nodeValue):"id"===this.element.attributes[n].nodeName&&t.setAttribute(this.element.attributes[n].nodeName,i.i(s.getUniqueID)("uploader")),t.innerHTML=this.element.innerHTML;t.hasAttribute("name")||t.setAttribute("name","UploadFiles"),this.element.appendChild(t),this.element=t,i.i(s.setValue)("ej2_instances",e,this.element)}e[0].isPureReactComponent&&(i.i(s.isNullOrUndefined)(e[0].props.name)?!i.i(s.isNullOrUndefined)(e[0].props.id)&&i.i(s.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)),i.i(s.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=s.Browser.info.name,this.uploaderName=this.element.getAttribute("name")},t.prototype.formRendered=function(){var e=i.i(s.closest)(this.element,"form");if(!i.i(s.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"))},t.prototype.getPersistData=function(){return this.addOnPersist(["filesData"])},t.prototype.getModuleName=function(){return"uploader"},t.prototype.updateDirectoryAttributes=function(){this.directoryUpload?(this.element.setAttribute("directory","true"),this.element.setAttribute("webkitdirectory","true")):(this.element.removeAttribute("directory"),this.element.removeAttribute("webkitdirectory"))},t.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()},t.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")},t.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}}),this.clearButton=this.createElement("button",{className:"e-file-clear-btn e-css e-btn e-flat",attrs:{type:"button",tabindex:this.btnTabIndex}}),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()},t.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())},t.prototype.wireActionButtonEvents=function(){s.EventHandler.add(this.uploadButton,"click",this.uploadButtonClick,this),s.EventHandler.add(this.clearButton,"click",this.clearButtonClick,this)},t.prototype.unwireActionButtonEvents=function(){s.EventHandler.remove(this.uploadButton,"click",this.uploadButtonClick),s.EventHandler.remove(this.clearButton,"click",this.clearButtonClick)},t.prototype.removeActionButtons=function(){this.actionButtons&&(this.unwireActionButtonEvents(),i.i(s.detach)(this.actionButtons),this.actionButtons=null)},t.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=i.i(s.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 t=i.i(s.isNullOrUndefined)(this.buttons.clear)?"Clear":this.buttons.clear;this.buttons.clear=t,"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))}},t.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()},t.prototype.renderPreLoadFiles=function(){if(this.files.length){if(this.enablePersistence&&this.filesData.length)return void this.internalCreateFileList(this.filesData);if(i.i(s.isNullOrUndefined)(this.files[0].size))return;this.isPreloadFiles=!0;var e=[].slice.call(this.files),t=[];this.multiple||(this.clearData(),e=[e[0]]);for(var n=0,a=e;n<a.length;n++){var r=a[n],l={name:r.name+"."+r.type.split(".")[r.type.split(".").length-1],rawFile:"",size:r.size,status:this.localizedTexts("uploadSuccessMessage"),type:r.type,validationMessages:{minSize:"",maxSize:""},statusCode:"2"};t.push(l),this.filesData.push(l)}this.internalCreateFileList(t),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}},t.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."+v).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")}},t.prototype.setDropArea=function(){var e=this.dropAreaWrapper.querySelector(".e-file-drop");if(this.dropArea){this.dropZoneElement="string"!=typeof this.dropArea?this.dropArea:i.i(s.select)(this.dropArea,document);for(var t=this.element,n=!1;t.parentNode;)(t=t.parentNode)===this.dropZoneElement&&(n=!0,e?e.innerHTML=this.localizedTexts("dropFilesHint"):this.createDropTextHint());!n&&e&&i.i(s.remove)(e)}else i.i(s.isNullOrUndefined)(this.uploaderOptions)||void 0!==this.uploaderOptions.dropArea||(this.createDropTextHint(),this.dropZoneElement=this.uploadWrapper,this.setProperties({dropArea:this.uploadWrapper},!0));this.bindDropEvents()},t.prototype.updateDropArea=function(){if(this.dropArea)this.setDropArea();else{this.dropZoneElement=null;var e=this.dropAreaWrapper.querySelector(".e-file-drop");e&&i.i(s.remove)(e)}},t.prototype.createDropTextHint=function(){var e=this.createElement("span",{className:"e-file-drop"});e.innerHTML=this.localizedTexts("dropFilesHint"),this.dropAreaWrapper.appendChild(e)},t.prototype.updateHTMLAttrToElement=function(){if(!i.i(s.isNullOrUndefined)(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];y.indexOf(n)<0&&this.element.setAttribute(n,this.htmlAttributes[""+n])}},t.prototype.updateHTMLAttrToWrapper=function(){if(!i.i(s.isNullOrUndefined)(this.htmlAttributes))for(var e=0,t=Object.keys(this.htmlAttributes);e<t.length;e++){var n=t[e];if(y.indexOf(n)>-1)if("class"===n){var a=this.htmlAttributes[""+n].replace(/\s+/g," ").trim();""!==a&&i.i(s.addClass)([this.uploadWrapper],a.split(" "))}else if("style"===n){var r=this.uploadWrapper.getAttribute(n);r=i.i(s.isNullOrUndefined)(r)?this.htmlAttributes[""+n]:r+this.htmlAttributes[""+n],this.uploadWrapper.setAttribute(n,r)}else this.uploadWrapper.setAttribute(n,this.htmlAttributes[""+n])}},t.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")},t.prototype.checkAutoUpload=function(e){this.autoUpload?(this.sequentialUpload?this.sequenceUpload(e):this.upload(e),this.removeActionButtons()):this.actionButtons||this.renderActionButtons(),this.checkActionButtonStatus()},t.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}},t.prototype.setCSSClass=function(e){var t=e;i.i(s.isNullOrUndefined)(e)||(t=e.replace(/\s+/g," ").trim()),i.i(s.isNullOrUndefined)(e)||""===t||i.i(s.removeClass)([this.uploadWrapper],t.split(" "));var n=this.cssClass;i.i(s.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(n=this.cssClass.replace(/\s+/g," ").trim()),i.i(s.isNullOrUndefined)(this.cssClass)||""===n||i.i(s.addClass)([this.uploadWrapper],n.split(n.indexOf(",")>-1?",":" "))},t.prototype.wireEvents=function(){s.EventHandler.add(this.browseButton,"click",this.browseButtonClick,this),s.EventHandler.add(this.element,"change",this.onSelectFiles,this),s.EventHandler.add(document,"click",this.removeFocus,this),this.keyboardModule=new s.KeyboardEvents(this.uploadWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.isForm&&s.EventHandler.add(this.formElement,"reset",this.resetForm,this)},t.prototype.unWireEvents=function(){s.EventHandler.remove(this.browseButton,"click",this.browseButtonClick),s.EventHandler.remove(this.element,"change",this.onSelectFiles),s.EventHandler.remove(document,"click",this.removeFocus),this.isForm&&s.EventHandler.remove(this.formElement,"reset",this.resetForm),this.keyboardModule&&this.keyboardModule.destroy()},t.prototype.resetForm=function(){this.clearAll()},t.prototype.keyActionHandler=function(e){var t=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(t.classList.contains(g)){var n=this.getCurrentMetaData(null,e);n.file.statusCode="4",n.file.status=this.localizedTexts("pauseUpload"),this.abortUpload(n,!1)}else if(t.classList.contains("e-file-play-btn"))this.resumeUpload(this.getCurrentMetaData(null,e),e);else if(t.classList.contains(c)){var n=this.getCurrentMetaData(null,e);if(i.i(s.isNullOrUndefined)(n)){var a=e.target.parentElement,r=this.filesData[this.fileList.indexOf(a)];this.retry(r)}else n.file.statusCode="1",n.file.status=this.localizedTexts("readyToUploadMessage"),this.chunkUpload(n.file)}else this.removeFiles(e),t.classList.contains(u)||this.browseButton.focus();e.preventDefault(),e.stopPropagation()}},t.prototype.getCurrentMetaData=function(e,t){var n,a;if(i.i(s.isNullOrUndefined)(e)){var r=t.target.parentElement;n=this.filesData[this.fileList.indexOf(r)]}else n=e;for(var l=0;l<this.uploadMetaData.length;l++)this.uploadMetaData[l].file.name===n.name&&(a=this.uploadMetaData[l]);return a},t.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"))},t.prototype.browseButtonClick=function(){this.element.click()},t.prototype.uploadButtonClick=function(){this.sequentialUpload?this.sequenceUpload(this.filesData):this.upload(this.filesData)},t.prototype.clearButtonClick=function(){this.clearAll(),this.sequentialUpload&&(this.count=-1),this.actionCompleteCount=0},t.prototype.bindDropEvents=function(){this.dropZoneElement&&(s.EventHandler.add(this.dropZoneElement,"drop",this.dropElement,this),s.EventHandler.add(this.dropZoneElement,"dragover",this.dragHover,this),s.EventHandler.add(this.dropZoneElement,"dragleave",this.onDragLeave,this),s.EventHandler.add(this.dropZoneElement,"paste",this.onPasteFile,this),s.EventHandler.add(this.dropZoneElement,"dragenter",this.onDragEnter,this))},t.prototype.unBindDropEvents=function(){this.dropZoneElement&&(s.EventHandler.remove(this.dropZoneElement,"drop",this.dropElement),s.EventHandler.remove(this.dropZoneElement,"dragover",this.dragHover),s.EventHandler.remove(this.dropZoneElement,"dragleave",this.onDragLeave),s.EventHandler.remove(this.dropZoneElement,"dragenter",this.onDragEnter))},t.prototype.onDragEnter=function(e){this.enabled&&(this.dropZoneElement.classList.add("e-upload-drag-hover"),this.dragCounter=this.dragCounter+1,e.preventDefault(),e.stopPropagation())},t.prototype.onDragLeave=function(){this.enabled&&(this.dragCounter=this.dragCounter-1,this.dragCounter||this.dropZoneElement.classList.remove("e-upload-drag-hover"))},t.prototype.dragHover=function(e){this.enabled&&("Default"!==this.dropEffect&&(e.dataTransfer.dropEffect=this.dropEffect.toLowerCase()),e.preventDefault(),e.stopPropagation())},t.prototype.dropElement=function(e){this.dragCounter=0,this.dropZoneElement.classList.remove("e-upload-drag-hover"),this.onSelectFiles(e),e.preventDefault(),e.stopPropagation()},t.prototype.onPasteFile=function(e){var t=e.clipboardData.items;if("paste"===e.type&&"msie"!==this.browserName&&"edge"!==this.browserName&&"safari"!==this.browserName&&(this.element.files=e.clipboardData.files),1===t.length||this.multiple)for(var i=0;i<t.length;i++){var s=[].slice.call(t)[i];("file"===s.kind||s.type.match("^image/"))&&this.renderSelectedFiles(e,[s.getAsFile()],!1,!0)}},t.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},t.prototype.removeFiles=function(e){if(this.enabled){var t=e.target.parentElement,a=this.fileList.indexOf(t),r=this.fileList[a],l=this.isFormUpload(),o=l?this.getSelectedFiles(a):this.getFilesInArray(this.filesData[a]);if(!i.i(s.isNullOrUndefined)(o)){if(e.target.classList.contains(u)&&!l){if(o[0].statusCode="5",!i.i(s.isNullOrUndefined)(r)){var h=r.querySelector("."+u);i.i(n.createSpinner)({target:h,width:"20px"}),i.i(n.showSpinner)(h)}this.sequentialUpload&&this.uploadSequential(),r.classList.contains("e-restrict-retry")||this.checkActionComplete(!0)}else i.i(s.closest)(e.target,".e-spinner-pane")||this.remove(o,!1,!1,!0,e);this.checkActionButtonStatus()}}},t.prototype.removeFilesData=function(e,t){var n;if(t)return void(this.showFileList||(n=this.filesData.indexOf(e),this.filesData.splice(n,1)));var a=this.getLiElement(e);i.i(s.isNullOrUndefined)(a)||(this.element.value="",i.i(s.detach)(a),n=this.fileList.indexOf(a),this.fileList.splice(n,1),this.filesData.splice(n,1),0!==this.fileList.length||i.i(s.isNullOrUndefined)(this.listParent)||(i.i(s.detach)(this.listParent),this.listParent=null,this.removeActionButtons()),this.sequentialUpload&&n<=this.count&&--this.count)},t.prototype.removeUploadedFile=function(e,t,i,n){var a=this,r=e,l=new s.Ajax(this.asyncSettings.removeUrl,"POST",!0,null);l.emitError=!1;var o=new FormData;l.beforeSend=function(s){t.currentRequest=l.httpRequest,i?a.removingEventCallback(t,o,r,e):a.trigger("removing",t,function(t){t.cancel?s.cancel=!0:a.removingEventCallback(t,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)},t.prototype.removingEventCallback=function(e,t,a,r){var l=this.element.getAttribute("name"),o=this.getLiElement(r);if(!(i.i(s.isNullOrUndefined)(o)||i.i(s.isNullOrUndefined)(o.querySelector("."+d))&&i.i(s.isNullOrUndefined)(o.querySelector("."+h)))){var u=o.querySelector("."+d)?o.querySelector("."+d):o.querySelector("."+h);i.i(n.createSpinner)({target:u,width:"20px"}),i.i(n.showSpinner)(u)}e.postRawFile&&!i.i(s.isNullOrUndefined)(a.rawFile)&&""!==a.rawFile?t.append(l,a.rawFile,a.name):t.append(l,a.name),this.updateFormData(t,e.customFormData)},t.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)},t.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)},t.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)},t.prototype.removeFailed=function(e,t,a){var r=e&&e.currentTarget?this.getResponse(e):null,l={e:e,response:r,operation:"remove",file:this.updateStatus(t,this.localizedTexts("removedFailedMessage"),"0")};if(!a){var h=this.filesData.indexOf(t),u=this.fileList[h];if(u){u.classList.remove(v),u.classList.add(f);var c=u.querySelector("."+o);c&&(c.classList.remove(v),c.classList.add(f))}this.checkActionButtonStatus()}this.trigger("failure",l);var p=this.getLiElement(t);if(!i.i(s.isNullOrUndefined)(p)&&!i.i(s.isNullOrUndefined)(p.querySelector("."+d))){var m=p.querySelector("."+d);i.i(n.hideSpinner)(m),i.i(s.detach)(p.querySelector(".e-spinner-pane"))}},t.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)},t.prototype.checkDirectoryUpload=function(e){for(var t=0;e&&t<e.length;t++){if(e[t].webkitGetAsEntry().isDirectory)return!0}return!1},t.prototype.traverseFileTree=function(e,t){if(e.isFile)this.filesEntries.push(e);else if(e.isDirectory){var i=e.createReader();this.readFileFromDirectory(i,t)}},t.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)})},t.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)},t.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()}},t.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)}})},t.prototype.renderSelectedFiles=function(e,t,i,n){var a=this;this.base64String=[];var r={event:e,cancel:!1,filesData:[],isModified:!1,modifiedFilesData:[],progressInterval:"",isCanceled:!1,currentRequest:null,customFormData:null};if(t.length<1)return r.isCanceled=!0,void this.trigger("selected",r);this.flag=!0;var l=[];this.multiple||(this.clearData(!0),this.actionCompleteCount=0,t=[t[0]]);for(var o=0;o<t.length;o++){var h=i?t[o].file:t[o];this.updateInitialFileDetails(e,t,h,o,l,i,n)}if(r.filesData=l,this.allowedExtensions.indexOf("*")>-1&&(this.allTypes=!0),this.enableHtmlSanitizer)for(var o=0;o<l.length;o++){for(var d=s.SanitizeHtmlHelper.beforeSanitize(),u=s.SanitizeHtmlHelper.serializeValue(d,l[parseInt(o.toString())].name),c=l[parseInt(o.toString())].name,p=!1,m=0;m<c.length;m++)if(c.charCodeAt(m)>127){p=!0;break}var v=/<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i,f=v.test(c);if(u!==l[parseInt(o.toString())].name&&(!p||f)){var g=t[parseInt(o.toString())].name.replace(/[\u00A0-\u9999<>\&]/g,function(e){return"&#"+e.charCodeAt(0)+";"});l[parseInt(o.toString())].name=g,l[parseInt(o.toString())].status=this.localizedTexts("invalidFileName"),l[parseInt(o.toString())].statusCode="0"}}this.allTypes||(l=this.checkExtension(l)),this.trigger("selected",r,function(e){a._internalRenderSelect(e,l)})},t.prototype.updateInitialFileDetails=function(e,t,n,a,r,l,o){var h=l?t[a].path.substring(1,t[a].path.length):o?i.i(s.getUniqueID)(n.name.substring(0,n.name.lastIndexOf(".")))+"."+this.getFileType(n.name):this.directoryUpload?t[a].webkitRelativePath:n.name,d={name:h,rawFile:n,size:n.size,status:this.localizedTexts("readyToUploadMessage"),type:this.getFileType(n.name),validationMessages:this.validatedFileSize(n.size),statusCode:"1",id:i.i(s.getUniqueID)(n.name.substring(0,n.name.lastIndexOf(".")))+"."+this.getFileType(n.name)};o&&(d.fileSource="paste"),d.status=""!==d.validationMessages.minSize?this.localizedTexts("invalidMinFileSize"):""!==d.validationMessages.maxSize?this.localizedTexts("invalidMaxFileSize"):d.status,""===d.validationMessages.minSize&&""===d.validationMessages.maxSize||(d.statusCode="0"),r.push(d)},t.prototype._internalRenderSelect=function(e,t){if(!e.cancel){if(this.selectedFiles=this.selectedFiles.concat(t),this.btnTabIndex=this.disableKeyboardNavigation?"-1":"0",this.showFileList){if(e.isModified&&e.modifiedFilesData.length>0){for(var n=0;n<e.modifiedFilesData.length;n++)for(var a=0;a<t.length;a++)e.modifiedFilesData[n].id===t[a].id&&(e.modifiedFilesData[n].rawFile=t[a].rawFile);var r=this.allTypes?e.modifiedFilesData:this.checkExtension(e.modifiedFilesData);this.updateSortedFileList(r),this.filesData=this.filesData.concat(r),this.isForm&&!this.allowUpload()||this.checkAutoUpload(r)}else{if(this.internalCreateFileList(t),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(t));this.filesData=this.filesData.concat(t),this.isForm&&!this.allowUpload()||this.checkAutoUpload(t)}i.i(s.isNullOrUndefined)(e.progressInterval)||""===e.progressInterval||(this.progressInterval=e.progressInterval)}else this.filesData=this.filesData.concat(t),this.autoUpload&&this.upload(this.filesData,!0);for(var l=0;l<this.filesData.length;l++)"0"===this.filesData[l].statusCode&&this.checkActionComplete(!0);this.isFirstFileOnSelection=!0}},t.prototype.allowUpload=function(){var e=!1;return this.isForm&&!i.i(s.isNullOrUndefined)(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl&&(e=!0),e},t.prototype.isFormUpload=function(){var e=!1;return!this.isForm||!i.i(s.isNullOrUndefined)(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl||!i.i(s.isNullOrUndefined)(this.asyncSettings.removeUrl)&&""!==this.asyncSettings.removeUrl||(e=!0),e},t.prototype.clearData=function(e){i.i(s.isNullOrUndefined)(this.listParent)||(i.i(s.detach)(this.listParent),this.listParent=null),"msie"===this.browserName||e||(this.element.value=""),this.fileList=[],this.filesData=[],this.removeActionButtons()},t.prototype.updateSortedFileList=function(e){var t=this.createElement("div",{id:"clonewrapper"}),i=-1;if(this.listParent){for(var n=0;n<this.listParent.querySelectorAll("li").length;n++){var a=this.listParent.querySelectorAll("li")[n];t.appendChild(a.cloneNode(!0))}this.removeActionButtons();var r=[].slice.call(t.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]),s.EventHandler.add(r[o].querySelector(".e-icons"),"click",this.removeFiles,this),this.fileList.push(r[o]),i=l);i!==l&&this.internalCreateFileList([e[l]])}}else this.internalCreateFileList(e)},t.prototype.isBlank=function(e){return!e||/^\s*$/.test(e)},t.prototype.checkExtension=function(e){var t=e;if(!this.isBlank(this.allowedExtensions)){for(var i=[],s=this.allowedExtensions.split(","),n=0,a=s;n<a.length;n++){var r=a[n];i.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===i.indexOf(("."+o).toLocaleLowerCase())&&(e[l].status=this.localizedTexts("invalidFileType"),e[l].statusCode="0")}}return t},t.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}},t.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},t.prototype.createCustomfileList=function(e){this.createParentUL();for(var t=0,n=e;t<n.length;t++){var a=n[t],r=this.createElement("li",{className:l,attrs:{"data-file-name":a.name}});this.uploadTemplateFn=this.templateComplier(this.template);var o=this.uploadTemplateFn(a,this,"template",this.element.id+"Template",this.isStringTemplate,null,r);if(o){var h=[].slice.call(o);i.i(s.append)(h,r)}var d=e.indexOf(a),u={element:r,fileInfo:a,index:d,isPreload:this.isPreLoadFile(a)},c={element:r,fileInfo:a,index:d,isPreload:this.isPreLoadFile(a)};this.trigger("rendering",u),this.trigger("fileListRendering",c),this.listParent.appendChild(r),this.fileList.push(r)}this.renderReactTemplates()},t.prototype.createParentUL=function(){i.i(s.isNullOrUndefined)(this.listParent)&&(this.listParent=this.createElement("ul",{className:"e-upload-files"}),this.uploadWrapper.appendChild(this.listParent))},t.prototype.formFileList=function(e,t){var n=this.createElement("li",{className:l});n.setAttribute("data-files-count",e.length+"");for(var a,r=this.createElement("span",{className:"e-file-container"}),d=0,u=e;d<u.length;d++){var c=u[d],p=this.createElement("span",{className:"e-file-name"});p.innerHTML=this.getFileNameOnly(c.name);var m=this.createElement("span",{className:"e-file-type"}),v=this.getFileType(c.name);if(m.innerHTML="."+v,v||m.classList.add("e-hidden"),this.enableRtl){var f=this.createElement("span",{className:"e-rtl-container"});f.appendChild(m),f.appendChild(p),r.appendChild(f)}else r.appendChild(p),r.appendChild(m);this.truncateName(p),a=this.formValidateFileInfo(c,n)}n.appendChild(r),this.setListToFileInfo(e,n);var g=this.listParent.querySelectorAll("li").length,y=this.createElement("span");if(n.classList.contains("e-file-invalid")?(y.classList.add(o),y.classList.add("e-file-invalid"),y.innerText=e.length>1?this.localizedTexts("invalidFileSelection"):a):(y.classList.add(e.length>1?"e-file-information":"e-file-size"),y.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)),r.appendChild(y),i.i(s.isNullOrUndefined)(n.querySelector(".e-icons"))){var b=this.createElement("span",{className:"e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&b.classList.add("e-msie"),b.setAttribute("title",this.localizedTexts("remove")),n.appendChild(r),n.appendChild(b),s.EventHandler.add(b,"click",this.removeFiles,this),b.classList.add(h)}var C={element:n,fileInfo:this.mergeFileInfo(e,n),index:g,isPreload:this.isPreLoadFile(this.mergeFileInfo(e,n))},E={element:n,fileInfo:this.mergeFileInfo(e,n),index:g,isPreload:this.isPreLoadFile(this.mergeFileInfo(e,n))};this.trigger("rendering",C),this.trigger("fileListRendering",E),this.listParent.appendChild(n),this.fileList.push(n)},t.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},t.prototype.addInvalidClass=function(e){e.classList.add("e-file-invalid")},t.prototype.createFormInput=function(e){if("safari"!==this.browserName){var t=this.element.cloneNode(!0);t.classList.add("e-hidden-file-input");for(var n=0,a=e;n<a.length;n++){a[n].input=t}t.setAttribute("id",i.i(s.getUniqueID)("hiddenUploader")),t.setAttribute("name",this.uploaderName),this.uploadWrapper.querySelector(".e-file-select").appendChild(t),"msie"!==this.browserName&&"edge"!==this.browserName&&(this.element.value="")}},t.prototype.getFileSize=function(e){for(var t=0,i=0,s=e;i<s.length;i++){t+=s[i].size}return t},t.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},t.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},t.prototype.formCustomFileList=function(e,t){this.createParentUL();var n=this.createElement("li",{className:l});n.setAttribute("data-files-count",e.length+""),this.setListToFileInfo(e,n);var a=this.mergeFileInfo(e,n);n.setAttribute("data-file-name",a.name),this.uploadTemplateFn=this.templateComplier(this.template);var r=this.uploadTemplateFn(a,this,"template",this.element.id+"Template",this.isStringTemplate,null,n);if(r){var o=[].slice.call(r);i.i(s.append)(o,n)}var h=this.listParent.querySelectorAll("li").length;n.classList.contains("e-file-invalid")||this.createFormInput(e);var d={element:n,fileInfo:a,index:h,isPreload:this.isPreLoadFile(a)},u={element:n,fileInfo:a,index:h,isPreload:this.isPreLoadFile(a)};this.trigger("rendering",d),this.trigger("fileListRendering",u),this.listParent.appendChild(n),this.fileList.push(n),this.renderReactTemplates()},t.prototype.createFileList=function(e){this.filesData=this.filesData&&this.filesData.length>0?this.filesData.concat(e):e,this.internalCreateFileList(e)},t.prototype.internalCreateFileList=function(e){if(this.createParentUL(),""===this.template||i.i(s.isNullOrUndefined)(this.template))if(this.isFormUpload())this.uploadWrapper.classList.add("e-form-upload"),this.formFileList(e,this.element.files);else for(var t=0,n=e;t<n.length;t++){var a=n[t],r=this.createElement("li",{className:l,attrs:{"data-file-name":a.name,"data-files-count":"1"}}),u=this.createElement("span",{className:"e-file-container"}),c=this.createElement("span",{className:"e-file-name",attrs:{title:a.name}});c.innerHTML=this.getFileNameOnly(a.name);var p=this.createElement("span",{className:"e-file-type"}),m=this.getFileType(a.name);if(p.innerHTML="."+m,m||p.classList.add("e-hidden"),this.enableRtl){var f=this.createElement("span",{className:"e-rtl-container"});f.appendChild(p),f.appendChild(c),u.appendChild(f)}else u.appendChild(c),u.appendChild(p);var g=this.createElement("span",{className:"e-file-size"});g.innerHTML=this.bytesToSize(a.size),u.appendChild(g);var y=this.createElement("span",{className:o});u.appendChild(y),y.innerHTML=a.status,r.appendChild(u);var b=this.createElement("span",{className:" e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&b.classList.add("e-msie"),b.setAttribute("title",this.localizedTexts("remove")),r.appendChild(b),s.EventHandler.add(b,"click",this.removeFiles,this),"2"===a.statusCode?(y.classList.add(v),b.classList.add(d),b.setAttribute("title",this.localizedTexts("delete"))):"1"!==a.statusCode&&(y.classList.remove(v),y.classList.add("e-validation-fails")),this.autoUpload&&"1"===a.statusCode&&""!==this.asyncSettings.saveUrl&&(y.innerHTML=""),b.classList.contains(d)||b.classList.add(h);var C=e.indexOf(a),E={element:r,fileInfo:a,index:C,isPreload:this.isPreLoadFile(a)},x={element:r,fileInfo:a,index:C,isPreload:this.isPreLoadFile(a)};this.trigger("rendering",E),this.trigger("fileListRendering",x),this.listParent.appendChild(r),this.fileList.push(r),this.truncateName(c);var S=this.flag;this.isPreLoadFile(a)&&(this.flag=!1,this.checkActionComplete(!0),this.flag=S)}else this.isFormUpload()?(this.uploadWrapper.classList.add("e-form-upload"),this.formCustomFileList(e,this.element.files)):this.createCustomfileList(e)},t.prototype.getSlicedName=function(e){var t=e.textContent;e.dataset.tail=t.slice(t.length-10)},t.prototype.setListToFileInfo=function(e,t){for(var i=0,s=e;i<s.length;i++){s[i].list=t}},t.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)},t.prototype.getFileType=function(e){var t,i=e.lastIndexOf(".");return i>=0&&(t=e.substring(i+1)),t||""},t.prototype.getFileNameOnly=function(e){var t=this.getFileType(e);return t=e.split("."+t)[0]},t.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)}},t.prototype.filterfileList=function(e){for(var t,n=[],a=0;a<e.length;a++)t=this.getLiElement(e[a]),i.i(s.isNullOrUndefined)(t)||t.classList.contains(v)?this.showFileList||"File uploaded successfully"===e[a].status||n.push(e[a]):n.push(e[a]);return n},t.prototype.updateStatus=function(e,t,n,a){if(void 0===a&&(a=!0),""===t||i.i(s.isNullOrUndefined)(t)||""===n||i.i(s.isNullOrUndefined)(n)||(e.status=t,e.statusCode=n),a){var r=this.getLiElement(e);i.i(s.isNullOrUndefined)(r)||i.i(s.isNullOrUndefined)(r.querySelector("."+o))||""===t||i.i(s.isNullOrUndefined)(t)||(r.querySelector("."+o).textContent=t)}return e},t.prototype.getLiElement=function(e){for(var t,n=0;n<this.filesData.length;n++)i.i(s.isNullOrUndefined)(e)||(i.i(s.isNullOrUndefined)(this.filesData[n].id)||i.i(s.isNullOrUndefined)(e.id)?this.filesData[n].name!==e.name:this.filesData[n].name!==e.name||this.filesData[n].id!==e.id)||(t=n);return this.fileList[t]},t.prototype.createProgressBar=function(e){var t=this.createElement("span",{className:p}),i=this.createElement("progressbar",{className:m,attrs:{value:"0",max:"100"}}),s=this.createElement("span",{className:"e-progress-inner-wrap"});i.setAttribute("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)},t.prototype.updateProgressbar=function(e,t){if(!isNaN(Math.round(e.loaded/e.total*100))&&!i.i(s.isNullOrUndefined)(t.querySelector("."+m)))if(i.i(s.isNullOrUndefined)(this.progressInterval)||""===this.progressInterval)this.changeProgressValue(t,Math.round(e.loaded/e.total*100).toString()+"%");else{var n=Math.round(e.loaded/e.total*100)%parseInt(this.progressInterval,10);0!==n&&100!==n||this.changeProgressValue(t,Math.round(e.loaded/e.total*100).toString()+"%")}},t.prototype.changeProgressValue=function(e,t){e.querySelector("."+m).setAttribute("style","width:"+t),e.querySelector(".e-progress-bar-text").textContent=t},t.prototype.uploadInProgress=function(e,t,n,a){var r=this.getLiElement(t);if(!i.i(s.isNullOrUndefined)(r)||n){if(i.i(s.isNullOrUndefined)(r))this.cancelUploadingFile(t,e,a);else{"5"===t.statusCode&&this.cancelUploadingFile(t,e,a,r),r.querySelectorAll("."+p).length>0||!r.querySelector("."+o)||(r.querySelector("."+o).classList.add("e-upload-progress"),this.createProgressBar(r),this.updateProgressBarClasses(r,"e-upload-progress"),r.querySelector("."+o).classList.remove(f)),this.updateProgressbar(e,r);var l=r.querySelector("."+h);i.i(s.isNullOrUndefined)(l)||(l.classList.add(u,"e-upload-progress"),l.setAttribute("title",this.localizedTexts("abort")),l.classList.remove(h))}var d={e:e,operation:"upload",file:this.updateStatus(t,this.localizedTexts("inProgress"),"3")};this.trigger("progress",d)}},t.prototype.cancelUploadingFile=function(e,t,a,r){var l=this;if("5"===e.statusCode){var o={event:t,fileData:e,cancel:!1,customFormData:[],currentRequest:null};this.trigger("canceling",o,function(t){if(t.cancel){if(e.statusCode="3",!i.i(s.isNullOrUndefined)(r)){var o=r.querySelector("."+u);i.i(s.isNullOrUndefined)(o)||(i.i(n.hideSpinner)(o),i.i(s.detach)(r.querySelector(".e-spinner-pane")))}}else{a.emitError=!1,a.httpRequest.abort();var h=new FormData;if("5"===e.statusCode){var d=l.element.getAttribute("name");h.append(d,e.name),h.append("cancel-uploading",e.name),l.updateFormData(h,t.customFormData);var c=new s.Ajax(l.asyncSettings.removeUrl,"POST",!0,null);c.emitError=!1,c.beforeSend=function(e){t.currentRequest&&l.updateCustomheader(c.httpRequest,t.currentRequest)},c.onLoad=function(t){return l.removecanceledFile(t,e),{}},c.send(h)}}})}},t.prototype.removecanceledFile=function(e,t){var a=this.getLiElement(t);if(!(i.i(s.isNullOrUndefined)(a)||a.querySelector("."+c)||i.i(s.isNullOrUndefined)(a.querySelector("."+u)))){this.updateStatus(t,this.localizedTexts("fileUploadCancel"),"5"),this.renderFailureState(e,t,a);var r=a.querySelector("."+h);i.i(s.isNullOrUndefined)(a)||(i.i(n.hideSpinner)(r),i.i(s.isNullOrUndefined)(a.querySelector(".e-spinner-pane"))||i.i(s.detach)(a.querySelector(".e-spinner-pane")));var l=e&&e.currentTarget?this.getResponse(e):null,o={event:e,response:l,operation:"cancel",file:t};this.trigger("success",o)}},t.prototype.renderFailureState=function(e,t,n){var a=this;this.updateProgressBarClasses(n,f),this.removeProgressbar(n,"failure"),i.i(s.isNullOrUndefined)(n.querySelector(".e-file-status"))||n.querySelector(".e-file-status").classList.add(f);var r=n.querySelector("."+u);if(!i.i(s.isNullOrUndefined)(r)){r.classList.remove(u,"e-upload-progress"),r.classList.add(h),r.setAttribute("title",this.localizedTexts("remove")),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}}),r.parentElement.insertBefore(this.pauseButton,r),this.pauseButton.setAttribute("title",this.localizedTexts("retry"));n.querySelector("."+c).addEventListener("click",function(e){a.reloadcanceledFile(e,t,n,!1)},!1)}},t.prototype.reloadcanceledFile=function(e,t,n,a){t.statusCode="1",t.status=this.localizedTexts("readyToUploadMessage"),a||(i.i(s.isNullOrUndefined)(n.querySelector("."+o))||n.querySelector("."+o).classList.remove(f),i.i(s.isNullOrUndefined)(n.querySelector("."+c))||i.i(s.detach)(n.querySelector("."+c)),this.pauseButton=null),i.i(s.isNullOrUndefined)(n)||n.classList.add("e-restrict-retry"),this.upload([t])},t.prototype.uploadComplete=function(e,t,n){var a=e.target;if(4===a.readyState&&a.status>=200&&a.status<=299){var r=this.getLiElement(t);if(i.i(s.isNullOrUndefined)(r)&&(!n||i.i(s.isNullOrUndefined)(n))&&this.showFileList)return;if(!i.i(s.isNullOrUndefined)(r)){this.updateProgressBarClasses(r,v),this.removeProgressbar(r,"success");var l=r.querySelector("."+u);i.i(s.isNullOrUndefined)(l)||(l.classList.add(d),l.setAttribute("title",this.localizedTexts("delete")),l.classList.remove(u),l.classList.remove("e-upload-progress"))}this.raiseSuccessEvent(e,t)}else this.uploadFailed(e,t)},t.prototype.getResponse=function(e){var t=e.currentTarget;return{readyState:t.readyState,statusCode:t.status,statusText:t.statusText,headers:t.getAllResponseHeaders(),withCredentials:t.withCredentials}},t.prototype.raiseSuccessEvent=function(e,t){var a=this,r=e&&e.currentTarget?this.getResponse(e):null,l=this.localizedTexts("uploadSuccessMessage"),o={e:e,response:r,operation:"upload",file:this.updateStatus(t,l,"2",!1),statusText:l},h=this.getLiElement(t);if(!i.i(s.isNullOrUndefined)(h)){var d=h.querySelector(".e-spinner-pane");i.i(s.isNullOrUndefined)(d)||(i.i(n.hideSpinner)(h),i.i(s.detach)(d))}this.trigger("success",o,function(e){a.updateStatus(t,e.statusText,"2"),a.uploadedFilesData.push(t),a.trigger("change",{file:a.uploadedFilesData}),a.checkActionButtonStatus(),a.fileList.length>0?a.getLiElement(t).classList.contains("e-restrict-retry")?a.getLiElement(t).classList.remove("e-restrict-retry"):(a.uploadSequential(),a.checkActionComplete(!0)):a.showFileList||a.checkActionComplete(!0)})},t.prototype.uploadFailed=function(e,t){var n=this,a=this.getLiElement(t),r=e&&e.currentTarget?this.getResponse(e):null,l=this.localizedTexts("uploadFailedMessage"),o={e:e,response:r,operation:"upload",file:this.updateStatus(t,l,"0",!1),statusText:l};i.i(s.isNullOrUndefined)(a)||this.renderFailureState(e,t,a),this.trigger("failure",o,function(e){n.updateStatus(t,e.statusText,"0"),n.checkActionButtonStatus(),n.uploadSequential(),n.checkActionComplete(!0)})},t.prototype.uploadSequential=function(){this.sequentialUpload&&(this.autoUpload?this.checkAutoUpload(this.filesData):this.uploadButtonClick())},t.prototype.checkActionComplete=function(e){e?++this.actionCompleteCount:--this.actionCompleteCount,this.raiseActionComplete()},t.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)}},t.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++)this.filesData[a].name===n.name&&this.filesData[a].status===n.status&&(t[i]=this.filesData[a],++i);return t},t.prototype.updateProgressBarClasses=function(e,t){var n=e.querySelector("."+m);i.i(s.isNullOrUndefined)(n)||n.classList.add(t)},t.prototype.removeProgressbar=function(e,t){var n=this;i.i(s.isNullOrUndefined)(e.querySelector("."+p))||(this.progressAnimation=new s.Animation({duration:1250}),this.progressAnimation.animate(e.querySelector("."+p),{name:"FadeOut"}),this.progressAnimation.animate(e.querySelector(".e-progress-bar-text"),{name:"FadeOut"}),setTimeout(function(){n.animateProgressBar(e,t)},750))},t.prototype.animateProgressBar=function(e,t){"success"===t?(e.classList.add(v),i.i(s.isNullOrUndefined)(e.querySelector("."+o))||(e.querySelector("."+o).classList.remove("e-upload-progress"),this.progressAnimation.animate(e.querySelector("."+o),{name:"FadeIn"}),e.querySelector("."+o).classList.add(v))):i.i(s.isNullOrUndefined)(e.querySelector("."+o))||(e.querySelector("."+o).classList.remove("e-upload-progress"),this.progressAnimation.animate(e.querySelector("."+o),{name:"FadeIn"}),e.querySelector("."+o).classList.add(f)),e.querySelector("."+p)&&i.i(s.detach)(e.querySelector("."+p))},t.prototype.setExtensions=function(e){""===e||i.i(s.isNullOrUndefined)(e)?this.element.removeAttribute("accept"):this.element.setAttribute("accept",e)},t.prototype.templateComplier=function(e){if(e)try{return"function"!=typeof e&&i.i(s.selectAll)(e,document).length?i.i(s.compile)(i.i(s.select)(e,document).innerHTML.trim()):i.i(s.compile)(e)}catch(t){return i.i(s.compile)(e)}},t.prototype.setRTL=function(){this.enableRtl?i.i(s.addClass)([this.uploadWrapper],"e-rtl"):i.i(s.removeClass)([this.uploadWrapper],"e-rtl")},t.prototype.localizedTexts=function(e){return this.l10n.setLocale(this.locale),this.l10n.getConstant(e)},t.prototype.setControlStatus=function(){this.enabled?(this.uploadWrapper.classList.contains("e-disabled")&&this.uploadWrapper.classList.remove("e-disabled"),!i.i(s.isNullOrUndefined)(this.browseButton)&&this.element.hasAttribute("disabled")&&(this.element.removeAttribute("disabled"),this.browseButton.removeAttribute("disabled")),!i.i(s.isNullOrUndefined)(this.clearButton)&&this.clearButton.hasAttribute("disabled")&&this.clearButton.removeAttribute("disabled"),!i.i(s.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"),i.i(s.isNullOrUndefined)(this.clearButton)||this.clearButton.setAttribute("disabled","disabled"),i.i(s.isNullOrUndefined)(this.uploadButton)||this.uploadButton.setAttribute("disabled","disabled"))},t.prototype.checkHTMLAttributes=function(e){for(var t=e?i.i(s.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["accept","multiple","disabled"],n=0,a=t;n<a.length;n++){var r=a[n];if(!i.i(s.isNullOrUndefined)(this.element.getAttribute(r)))switch(r){case"accept":(i.i(s.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(i.i(s.isNullOrUndefined)(this.uploaderOptions)||void 0===this.uploaderOptions.multiple||e){var l="multiple"===this.element.getAttribute(r)||""===this.element.getAttribute(r)||"true"===this.element.getAttribute(r);this.setProperties({multiple:l},!e),this.initialAttr.multiple=!0}break;case"disabled":if(i.i(s.isNullOrUndefined)(this.uploaderOptions)||void 0===this.uploaderOptions.enabled||e){var o="disabled"!==this.element.getAttribute(r)&&""!==this.element.getAttribute(r)&&"true"!==this.element.getAttribute(r);this.setProperties({enabled:o},!e),this.initialAttr.disabled=!0}}}},t.prototype.chunkUpload=function(e,t,i){var s=Math.min(this.asyncSettings.chunkSize,e.size),n=e.rawFile.slice(0,s),a={chunkIndex:0,blob:n,file:e,start:0,end:s,retryCount:0,request:null};this.sendRequest(e,a,t,i)},t.prototype.sendRequest=function(e,t,i,n){var a=this,r=new FormData,l=e.rawFile.slice(t.start,t.end);r.append(this.uploaderName,l,e.name),r.append("chunk-index",t.chunkIndex.toString()),r.append("chunkIndex",t.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 s.Ajax({url:this.asyncSettings.saveUrl,type:"POST",async:!0,contentType:null});h.emitError=!1,h.onLoad=function(e){return a.chunkUploadComplete(e,t,i),{}},h.onUploadProgress=function(e){return a.chunkUploadInProgress(e,t,i),{}};var d={fileData:e,customFormData:[],cancel:!1,chunkSize:0===this.asyncSettings.chunkSize?null:this.asyncSettings.chunkSize};h.beforeSend=function(i){d.currentRequest=h.httpRequest,d.currentChunkIndex=t.chunkIndex,0===d.currentChunkIndex?a.trigger("uploading",d,function(t){a.uploadingEventCallback(r,t,i,e)}):a.trigger("chunkUploading",d,function(t){a.uploadingEventCallback(r,t,i,e)})},h.onError=function(e){return a.chunkUploadFailed(e,t,i),{}},h.send(r),t.request=h},t.prototype.uploadingEventCallback=function(e,t,i,s){t.cancel?this.eventCancelByArgs(i,t,s):this.updateFormData(e,t.customFormData)},t.prototype.eventCancelByArgs=function(e,t,n){var a=this;if(e.cancel=!0,"5"!==t.fileData.statusCode){t.fileData.statusCode="5",t.fileData.status=this.localizedTexts("fileUploadCancel");var r=this.getLiElement(t.fileData);if(r){i.i(s.isNullOrUndefined)(r.querySelector("."+o))||(r.querySelector("."+o).innerHTML=this.localizedTexts("fileUploadCancel"),r.querySelector("."+o).classList.add(f)),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}});var l=r.querySelector("."+h);l&&l.parentElement.insertBefore(this.pauseButton,l),this.pauseButton.setAttribute("title",this.localizedTexts("retry")),this.pauseButton.addEventListener("click",function(e){a.reloadcanceledFile(e,n,r)},!1),this.checkActionButtonStatus()}}},t.prototype.checkChunkUpload=function(){return!(this.asyncSettings.chunkSize<=0||i.i(s.isNullOrUndefined)(this.asyncSettings.chunkSize))},t.prototype.chunkUploadComplete=function(e,t,a){var r,l=this,o=e.target;if(4===o.readyState&&o.status>=200&&o.status<300){var h=e&&e.currentTarget?this.getResponse(e):null,d=Math.max(Math.ceil(t.file.size/this.asyncSettings.chunkSize),1),c={event:e,file:t.file,chunkIndex:t.chunkIndex,totalChunk:d,chunkSize:this.asyncSettings.chunkSize,response:h};if(this.trigger("chunkSuccess",c),!i.i(s.isNullOrUndefined)(a)&&a||(r=this.getLiElement(t.file)),this.updateMetaData(t),t.end===t.file.size&&(t.file.statusCode="3"),"5"===t.file.statusCode){var p={event:e,fileData:t.file,cancel:!1,customFormData:[]};this.trigger("canceling",p,function(e){if(e.cancel){t.file.statusCode="3";var h=r.querySelector("."+u);i.i(s.isNullOrUndefined)(r)||i.i(s.isNullOrUndefined)(h)||(i.i(n.hideSpinner)(h),i.i(s.detach)(r.querySelector(".e-spinner-pane"))),l.sendNextRequest(t)}else{t.request.emitError=!1,o.abort();var d=new FormData,c=l.element.getAttribute("name");d.append(c,t.file.name),d.append("cancel-uploading",t.file.name),d.append("cancelUploading",t.file.name),l.updateFormData(d,e.customFormData);var p=new s.Ajax(l.asyncSettings.removeUrl,"POST",!0,null);p.emitError=!1,p.onLoad=function(e){return l.removeChunkFile(e,t,a),{}},p.send(d)}})}else{if(d-1===t.chunkIndex&&d>t.chunkIndex){var m=this.pausedData.indexOf(t);return m>=0&&this.pausedData.splice(m,1),i.i(s.isNullOrUndefined)(this.template)&&(i.i(s.isNullOrUndefined)(a)||!a)&&r&&(r&&!i.i(s.isNullOrUndefined)(r.querySelector("."+g))&&i.i(s.detach)(r.querySelector("."+g)),this.removeChunkProgressBar(t)),void this.raiseSuccessEvent(e,t.file)}"4"!==t.file.statusCode&&this.sendNextRequest(t)}}else this.chunkUploadFailed(e,t)},t.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)},t.prototype.removeChunkFile=function(e,t,a){if(i.i(s.isNullOrUndefined)(this.template)&&i.i(s.isNullOrUndefined)(a)&&!a){var r=this.getLiElement(t.file),l=r.querySelector("."+u),o=l;this.updateStatus(t.file,this.localizedTexts("fileUploadCancel"),"5"),this.updateProgressBarClasses(r,f),this.removeProgressbar(r,"failure"),l&&l.classList.remove(u),l&&l.classList.add(h),l&&l.setAttribute("title",this.localizedTexts("remove"));var d=r.querySelector("."+g);d&&d.classList.add(c),d&&d.classList.remove(g),d&&d.setAttribute("title",this.localizedTexts("retry")),i.i(s.isNullOrUndefined)(r)||i.i(s.isNullOrUndefined)(l)||i.i(s.isNullOrUndefined)(r.querySelector(".e-spinner-pane"))||(i.i(n.hideSpinner)(o),i.i(s.detach)(r.querySelector(".e-spinner-pane")))}},t.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)},t.prototype.abortUpload=function(e,t,n){"4"!==e.file.statusCode&&(e.request.emitError=!1,e.request.httpRequest.abort());var a=this.getLiElement(e.file);if(i.i(s.isNullOrUndefined)(this.template)&&(i.i(s.isNullOrUndefined)(t)||!t)){var r=a.querySelector("."+g);r.classList.remove(g),r.classList.add("e-file-play-btn"),r.setAttribute("title",this.localizedTexts("resume")),r.nextElementSibling.classList.add(h),r.nextElementSibling.classList.remove(u),r.nextElementSibling.setAttribute("title",this.localizedTexts("remove"))}for(var l=0;l<this.pausedData.length;l++)this.pausedData[l].file.name===e.file.name&&this.pausedData.splice(l,1);this.pausedData.push(e),this.trigger("pausing",n)},t.prototype.resumeUpload=function(e,t,n){var a,r=this.getLiElement(e.file);i.i(s.isNullOrUndefined)(r)||(a=r.querySelector(".e-file-play-btn")),i.i(s.isNullOrUndefined)(a)||!i.i(s.isNullOrUndefined)(n)&&n||(a.classList.remove("e-file-play-btn"),a.classList.add(g),a.setAttribute("title",this.localizedTexts("pause")),a.nextElementSibling.classList.remove(h),a.nextElementSibling.classList.add(u),a.nextElementSibling.setAttribute("title",this.localizedTexts("abort"))),e.file.status=this.localizedTexts("inProgress"),e.file.statusCode="3",this.updateMetaData(e);var l={event:t||null,file:e.file,chunkIndex:e.chunkIndex,chunkCount:Math.round(e.file.size/this.asyncSettings.chunkSize),chunkSize:this.asyncSettings.chunkSize};this.trigger("resuming",l);for(var o=0;o<this.pausedData.length;o++)this.pausedData[o].end===this.pausedData[o].file.size?this.chunkUploadComplete(t,e,n):this.pausedData[o].file.name===e.file.name&&(this.pausedData[o].start=this.pausedData[o].end,this.pausedData[o].end=this.pausedData[o].end+this.asyncSettings.chunkSize,this.pausedData[o].end=Math.min(this.pausedData[o].end,this.pausedData[o].file.size),this.pausedData[o].chunkIndex=this.pausedData[o].chunkIndex+1,this.sendRequest(this.pausedData[o].file,this.pausedData[o],n))},t.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))},t.prototype.removeChunkProgressBar=function(e){var t=this.getLiElement(e.file);if(!i.i(s.isNullOrUndefined)(t)){this.updateProgressBarClasses(t,v),this.removeProgressbar(t,"success");var n=t.querySelector("."+u);i.i(s.isNullOrUndefined)(n)||(n.classList.add(d),n.setAttribute("title",this.localizedTexts("delete")),n.classList.remove(u,"e-upload-progress"))}},t.prototype.chunkUploadFailed=function(e,t,n){var a,r=this,l=Math.max(Math.ceil(t.file.size/this.asyncSettings.chunkSize),1);!i.i(s.isNullOrUndefined)(this.template)||!i.i(s.isNullOrUndefined)(n)&&n||(a=this.getLiElement(t.file));var o=e&&e.currentTarget?this.getResponse(e):null,p={event:e,file:t.file,chunkIndex:t.chunkIndex,totalChunk:l,chunkSize:this.asyncSettings.chunkSize,cancel:!1,response:o};this.trigger("chunkFailure",p,function(l){if(!l.cancel)if(t.retryCount<r.asyncSettings.retryCount)setTimeout(function(){r.retryRequest(a,t,n)},r.asyncSettings.retryAfterDelay);else{if(!i.i(s.isNullOrUndefined)(a)){var p=a.querySelector("."+g)?a.querySelector("."+g):a.querySelector(".e-file-play-btn");i.i(s.isNullOrUndefined)(p)||(p.classList.add(c),p.classList.remove(g,"e-file-play-btn")),r.updateProgressBarClasses(a,f),r.removeProgressbar(a,"failure"),a.querySelector(".e-icons").classList.remove("e-upload-progress");var m=a.querySelector("."+u)?a.querySelector("."+u):a.querySelector("."+h);m.classList.remove(u),i.i(s.isNullOrUndefined)(a.querySelector("."+g))||i.i(s.detach)(a.querySelector("."+g)),t.start>0?(m.classList.add(d),m.setAttribute("title",r.localizedTexts("delete"))):(m.classList.add(h),m.setAttribute("title",r.localizedTexts("remove")))}t.retryCount=0;var v=t.file,y=r.localizedTexts("uploadFailedMessage"),b={e:e,response:o,operation:"upload",file:r.updateStatus(v,y,"0",!1),statusText:y};r.trigger("failure",b,function(e){r.updateStatus(v,e.statusText,"0"),r.uploadSequential(),r.checkActionComplete(!0)})}})},t.prototype.retryRequest=function(e,t,n){i.i(s.isNullOrUndefined)(this.template)&&(i.i(s.isNullOrUndefined)(n)||!n)&&e&&this.updateProgressBarClasses(e,f),t.retryCount+=1,this.sendRequest(t.file,t)},t.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(g)?this.pauseUpload(a,e):t.classList.contains("e-file-play-btn")?this.resumeUpload(a,e):t.classList.contains(c)&&(a.file.status===this.localizedTexts("fileUploadCancel")?this.retryUpload(a,!1):this.retryUpload(a,!0))},t.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")},t.prototype.chunkUploadInProgress=function(e,t,n){var a=this;if("4"!==t.file.statusCode){"4"!==t.file.statusCode&&"5"!==t.file.statusCode&&(t.file.statusCode="3",t.file.status=this.localizedTexts("inProgress")),this.updateMetaData(t);var r=this.getLiElement(t.file);if(!i.i(s.isNullOrUndefined)(r)){var l=r.querySelector("."+c);if(i.i(s.isNullOrUndefined)(l)||(l.classList.add(g),l.setAttribute("title",this.localizedTexts("pause")),l.classList.remove(c)),!i.i(s.isNullOrUndefined)(r)){if(!(r.querySelectorAll("."+p).length>0)){var m=r.querySelector("."+o);i.i(s.isNullOrUndefined)(this.template)&&(m.classList.add("e-upload-progress"),m.classList.remove(f),this.createProgressBar(r),this.updateProgressBarClasses(r,"e-upload-progress"));var v=r.querySelector("."+h)?r.querySelector("."+h):r.querySelector("."+d);i.i(s.isNullOrUndefined)(v)||(v.classList.add(u),v.setAttribute("title",this.localizedTexts("abort")),v.classList.remove(h))}if(!isNaN(Math.round(e.loaded/e.total*100))&&i.i(s.isNullOrUndefined)(this.template)&&"4"!==t.file.statusCode){var y=void 0,b=Math.ceil(t.file.size/this.asyncSettings.chunkSize)-1;this.asyncSettings.chunkSize&&b&&(y=Math.round(t.chunkIndex/b*100),this.changeProgressValue(r,y.toString()+"%"))}0===t.chunkIndex&&this.checkActionButtonStatus()}if(i.i(s.isNullOrUndefined)(r.querySelector("."+g))&&i.i(s.isNullOrUndefined)(this.template)&&i.i(s.isNullOrUndefined)(r.querySelector("."+d))){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 C=r.querySelector("."+u);C.parentElement.insertBefore(this.pauseButton,C),this.pauseButton.setAttribute("title",this.localizedTexts("pause")),this.pauseButton.addEventListener("click",function(e){a.checkPausePlayAction(e)},!1)}}}},t.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]},t.prototype.sortFileList=function(e){e=e||this.sortFilesList;for(var t=e,i=[],s=0;s<t.length;s++)i.push(t[s].name);for(var n=i.sort(),a=[],r=0,l=n;r<l.length;r++)for(var o=l[r],s=0;s<t.length;s++)o===t[s].name&&a.push(t[s]);return a},t.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 t=["aria-label","directory","webkitdirectory","tabindex"],n=0,a=t;n<a.length;n++){var r=a[n];this.element.removeAttribute(r)}i.i(s.isNullOrUndefined)(this.uploadWrapper)||(this.uploadWrapper.parentElement.appendChild(this.element),i.i(s.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)},t.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.uploadFiles(s,t)})}},t.prototype.getFilesInArray=function(e){var t=[];return e instanceof Array?t=e:t.push(e),t},t.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)}})},t.prototype.uploadFileCount=function(e){var t=this.filesData;return t&&0!==t.length?t.length:-1},t.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},t.prototype.getFileInfo=function(e,t){var i=this.filesData;return i&&0!==i.length&&i[e]?this.filesData[e]:null},t.prototype.uploadFiles=function(e,t){var n=[];if(""!==this.asyncSettings.saveUrl&&!i.i(s.isNullOrUndefined)(this.asyncSettings.saveUrl)){if(!t||i.i(s.isNullOrUndefined)(t))if(this.multiple)n=this.filterfileList(e);else{var a=[];a.push(e[0]),n=this.filterfileList(a)}else n=e;for(var r=0;r<n.length;r++)this.uploadFilesRequest(n,r,t)}},t.prototype.uploadFilesRequest=function(e,t,i){var n=this,a=this.checkChunkUpload(),r=new s.Ajax(this.asyncSettings.saveUrl,"POST",!0,null);r.emitError=!1;var l={fileData:e[t],customFormData:[],cancel:!1},o=new FormData;if(r.beforeSend=function(i){l.currentRequest=r.httpRequest,n.trigger("uploading",l,function(s){s.cancel&&n.eventCancelByArgs(i,s,e[t]),n.updateFormData(o,s.customFormData)})},"1"===e[t].statusCode){var h=this.element.getAttribute("name");o.append(h,e[t].rawFile,e[t].name),a&&e[t].size>this.asyncSettings.chunkSize?this.chunkUpload(e[t],i,t):(r.onLoad=function(s){return l.cancel?{}:(n.uploadComplete(s,e[t],i),{})},r.onUploadProgress=function(s){return l.cancel?{}:(n.uploadInProgress(s,e[t],i,r),{})},r.onError=function(i){return n.uploadFailed(i,e[t]),{}},r.send(o))}},t.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,l=r;l>=n;l--)i.splice(l,1)},t.prototype.remove=function(e,t,n,a,r){var l=this;i.i(s.isNullOrUndefined)(a)&&(a=!0);var o={event:r,cancel:!1,filesData:[],customFormData:[],postRawFile:a,currentRequest:null},d={cancel:!1,customFormData:[],currentRequest:null};this.trigger("beforeRemove",d,function(a){if(!a.cancel)if(l.isFormUpload())o.filesData=e,l.trigger("removing",o,function(t){if(!t.cancel)for(var n=l.getFilesInArray(e),a=!1,r=void 0,o=0,h=n;o<h.length;o++){var d=h[o];if(a||(r=l.fileList.indexOf(d.list)),r>-1){var u=i.i(s.isNullOrUndefined)(d.input)?null:d.input;u&&i.i(s.detach)(u),l.spliceFiles(r),i.i(s.detach)(l.fileList[r]),l.fileList.splice(r,1),a=!0,r=-1}}});else if(l.isForm&&(i.i(s.isNullOrUndefined)(l.asyncSettings.removeUrl)||""===l.asyncSettings.removeUrl))o.filesData=l.getFilesData(),l.trigger("removing",o,function(e){e.cancel||l.clearAll()});else{var d=[];e=i.i(s.isNullOrUndefined)(e)?l.filesData:e,e instanceof Array?d=e:d.push(e),o.filesData=d;for(var u=l.asyncSettings.removeUrl,c=""!==u&&!i.i(s.isNullOrUndefined)(u),p=0,m=d;p<m.length;p++){var v=m[p];!function(e){var i=l.uploadedFilesData.indexOf(e);("2"===e.statusCode||"4"===e.statusCode||"0"===e.statusCode&&-1!==i)&&c?l.removeUploadedFile(e,o,n,t):n?l.removeFilesData(e,t):l.trigger("removing",o,function(i){i.cancel||l.removeFilesData(e,t)}),r&&!r.target.classList.contains(h)&&l.checkActionComplete(!1)}(v)}}})},t.prototype.clearAll=function(){var e=this;if(i.i(s.isNullOrUndefined)(this.listParent))return"msie"!==this.browserName&&(this.element.value=""),void(this.filesData=[]);var t={cancel:!1,filesData:this.filesData};this.trigger("clearing",t,function(t){t.cancel||(e.clearData(),e.actionCompleteCount=0,e.count=-1)})},t.prototype.getFilesData=function(e){return i.i(s.isNullOrUndefined)(e)?this.filesData:this.getSelectedFiles(e)},t.prototype.pause=function(e,t){e=e||this.filesData;var i=this.getFilesInArray(e);this.pauseUploading(i,t)},t.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)},t.prototype.getFiles=function(e){var t=[];return i.i(s.isNullOrUndefined)(e)||e instanceof Array?t=e:t.push(e),t},t.prototype.resume=function(e,t){e=e||this.filesData;var i=this.getFilesInArray(e);this.resumeFiles(i,t)},t.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)},t.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)},t.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)}},t.prototype.cancel=function(e){e=e||this.filesData;var t=this.getFilesInArray(e);this.cancelUpload(t)},t.prototype.cancelUpload=function(e){var t=this.getFiles(e);if(this.asyncSettings.chunkSize>0){for(var i=0;i<t.length;i++)if("3"===t[i].statusCode){var s=this.getCurrentMetaData(t[i],null);s.file.statusCode="5",s.file.status=this.localizedTexts("fileUploadCancel"),this.updateMetaData(s),this.showHideUploadSpinner(t[i])}}else for(var i=0;i<t.length;i++)"3"===t[i].statusCode&&(t[i].statusCode="5",t[i].status=this.localizedTexts("fileUploadCancel"),this.showHideUploadSpinner(t[i]))},t.prototype.showHideUploadSpinner=function(e){var t=this.getLiElement(e);if(!i.i(s.isNullOrUndefined)(t)&&i.i(s.isNullOrUndefined)(this.template)){var a=t.querySelector("."+u);i.i(n.createSpinner)({target:a,width:"20px"}),i.i(n.showSpinner)(a)}},r([i.i(s.Complex)({saveUrl:"",removeUrl:""},E)],t.prototype,"asyncSettings",void 0),r([i.i(s.Property)(!1)],t.prototype,"sequentialUpload",void 0),r([i.i(s.Property)({})],t.prototype,"htmlAttributes",void 0),r([i.i(s.Property)("")],t.prototype,"cssClass",void 0),r([i.i(s.Property)(!0)],t.prototype,"enabled",void 0),r([i.i(s.Property)(null)],t.prototype,"template",void 0),r([i.i(s.Property)(!0)],t.prototype,"multiple",void 0),r([i.i(s.Property)(!0)],t.prototype,"autoUpload",void 0),r([i.i(s.Property)(!0)],t.prototype,"enableHtmlSanitizer",void 0),r([i.i(s.Complex)({},C)],t.prototype,"buttons",void 0),r([i.i(s.Property)("")],t.prototype,"allowedExtensions",void 0),r([i.i(s.Property)(0)],t.prototype,"minFileSize",void 0),r([i.i(s.Property)(3e7)],t.prototype,"maxFileSize",void 0),r([i.i(s.Property)(null)],t.prototype,"dropArea",void 0),r([i.i(s.Collection)([{}],b)],t.prototype,"files",void 0),r([i.i(s.Property)(!0)],t.prototype,"showFileList",void 0),r([i.i(s.Property)(!1)],t.prototype,"directoryUpload",void 0),r([i.i(s.Property)("Default")],t.prototype,"dropEffect",void 0),r([i.i(s.Event)()],t.prototype,"created",void 0),r([i.i(s.Event)()],t.prototype,"actionComplete",void 0),r([i.i(s.Event)()],t.prototype,"rendering",void 0),r([i.i(s.Event)()],t.prototype,"beforeUpload",void 0),r([i.i(s.Event)()],t.prototype,"fileListRendering",void 0),r([i.i(s.Event)()],t.prototype,"selected",void 0),r([i.i(s.Event)()],t.prototype,"uploading",void 0),r([i.i(s.Event)()],t.prototype,"success",void 0),r([i.i(s.Event)()],t.prototype,"failure",void 0),r([i.i(s.Event)()],t.prototype,"removing",void 0),r([i.i(s.Event)()],t.prototype,"beforeRemove",void 0),r([i.i(s.Event)()],t.prototype,"clearing",void 0),r([i.i(s.Event)()],t.prototype,"progress",void 0),r([i.i(s.Event)()],t.prototype,"change",void 0),r([i.i(s.Event)()],t.prototype,"chunkSuccess",void 0),r([i.i(s.Event)()],t.prototype,"chunkFailure",void 0),r([i.i(s.Event)()],t.prototype,"chunkUploading",void 0),r([i.i(s.Event)()],t.prototype,"canceling",void 0),r([i.i(s.Event)()],t.prototype,"pausing",void 0),r([i.i(s.Event)()],t.prototype,"resuming",void 0),t=r([s.NotifyPropertyChanges],t)}(s.Component)}])});
|
|
10
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionPopups","SyncfusionSplitbuttons"],e):"object"==typeof exports?exports.SyncfusionInputs=e(require("SyncfusionBase"),require("SyncfusionPopups"),require("SyncfusionSplitbuttons")):t.SyncfusionInputs=e(t.SyncfusionBase,t.SyncfusionPopups,t.SyncfusionSplitbuttons)}(self,((t,e,i)=>(()=>{"use strict";var s={766:e=>{e.exports=t},197:t=>{t.exports=e},295:t=>{t.exports=i}},n={};function a(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return s[t](i,i.exports,a),i.exports}a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{a.r(r),a.d(r,{AsyncSettings:()=>Vi,ButtonsProps:()=>Ri,ColorPicker:()=>gs,ColorRangeData:()=>Wt,ErrorOption:()=>Nt,FilesProp:()=>Ui,FormValidator:()=>Qe,Input:()=>t,LabelPosition:()=>$e,LimitData:()=>qt,MaskUndo:()=>At,MaskedTextBox:()=>Ft,NumericTextBox:()=>U,OtpInput:()=>en,OtpInputStyle:()=>Js,OtpInputType:()=>Zs,PrecisionType:()=>Ge,Rating:()=>$s,Signature:()=>Bs,SignatureBase:()=>Hs,Slider:()=>Xe,TEXTBOX_FOCUS:()=>E,TextArea:()=>ws,TextBox:()=>Cs,TicksData:()=>zt,TooltipData:()=>jt,Uploader:()=>Fi,applyMask:()=>q,bindClearEvent:()=>K,containerAttributes:()=>C,createMask:()=>W,escapeRegExp:()=>st,getMaskedVal:()=>Tt,getVal:()=>wt,maskInput:()=>Lt,maskInputBlurHandler:()=>nt,maskInputDropHandler:()=>lt,maskInputFocusHandler:()=>et,maskInputMouseDownHandler:()=>Q,maskInputMouseUpHandler:()=>tt,mobileRemoveFunction:()=>ut,regex:()=>Je,regularExpressions:()=>z,setElementValue:()=>Pt,setMaskValue:()=>kt,strippedValue:()=>$,triggerFocus:()=>it,unstrippedValue:()=>J,unwireEvents:()=>_,wireEvents:()=>j});var t,e=a(766),i="e-rtl",s="e-disabled",n="e-input",l="e-multi-line-input",o="e-input-group",h="e-float-input",u="e-float-line",d="e-float-text",p="e-float-text-content",c="e-clear-icon",m="e-clear-icon-hide",v="e-label-top",f="e-label-bottom",g="e-no-float-label",y="e-input-custom-tag",b="e-float-custom-tag",C=["title","style","class"],E="e-input-focus";!function(t){var a=!0;function r(e){E(e.floatLabelType,e.element);var i=function(){return function(e){var i=N(e.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.add("e-input-focus"),"Never"!==e.floatLabelType&&setTimeout((function(){t.calculateWidth(e.element,i)}),80)}(e)},s=function(){return function(e){var i=N(e.element);(i.classList.contains("e-input-group")||i.classList.contains("e-outline")||i.classList.contains("e-filled"))&&i.classList.remove("e-input-focus"),"Never"!==e.floatLabelType&&setTimeout((function(){t.calculateWidth(e.element,i)}),80)}(e)},n=function(){return function(t){E(t.floatLabelType,t.element)}(e)};e.element.addEventListener("focus",i),e.element.addEventListener("blur",s),e.element.addEventListener("input",n),e.element.__eventHandlers.inputFocusHandler={focusHandler:i},e.element.__eventHandlers.inputBlurHandler={blurHandler:s},e.element.__eventHandlers.inputHandler={inputHandler:n}}function E(t,i){var s=i.value,n=i.parentElement,a=n.parentElement;""===s||(0,e.isNullOrUndefined)(s)?"Always"!==t&&(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 x(){var t=N(this).getElementsByClassName("e-float-text")[0];(0,e.isNullOrUndefined)(t)||((0,e.addClass)([t],v),t.classList.contains(f)&&(0,e.removeClass)([t],f))}function S(){var t=N(this);if(t.getElementsByTagName("textarea")[0]?""===t.getElementsByTagName("textarea")[0].value:""===t.getElementsByTagName("input")[0].value){var i=t.getElementsByClassName("e-float-text")[0];(0,e.isNullOrUndefined)(i)||(i.classList.contains(v)&&(0,e.removeClass)([i],v),(0,e.addClass)([i],f))}}function k(t){t.addEventListener("focus",x),t.addEventListener("blur",S)}function P(t){(0,e.isNullOrUndefined)(t)||(t.removeEventListener("focus",x),t.removeEventListener("blur",S))}function L(t,i,s){var n=(0,e.isNullOrUndefined)(s)?e.createElement:s;"Auto"===t.floatLabelType&&k(t.element),(0,e.isNullOrUndefined)(i.container)?(i.container=U(t,h,b,"div",n),i.container.classList.add(o),t.element.parentNode&&t.element.parentNode.insertBefore(i.container,t.element)):((0,e.isNullOrUndefined)(t.customTag)||i.container.classList.add(b),i.container.classList.add(h));var a=n("span",{className:u}),r=n("label",{className:d});if((0,e.isNullOrUndefined)(t.element.id)||""===t.element.id||(r.id="label_"+t.element.id.replace(/ /g,"_"),(0,e.attributes)(t.element,{"aria-labelledby":r.id})),(0,e.isNullOrUndefined)(t.element.placeholder)||""===t.element.placeholder||(r.innerText=R(t.element.placeholder),t.element.removeAttribute("placeholder")),(0,e.isNullOrUndefined)(t.properties)||(0,e.isNullOrUndefined)(t.properties.placeholder)||""===t.properties.placeholder||(r.innerText=R(t.properties.placeholder)),r.innerText||i.container.classList.add(g),i.container.classList.contains("e-float-icon-left")){var l=i.container.querySelector(".e-input-in-wrap");l.appendChild(t.element),l.appendChild(a),l.appendChild(r)}else i.container.appendChild(t.element),i.container.appendChild(a),i.container.appendChild(r);if(H(t.element.value,r),"Always"===t.floatLabelType&&(r.classList.contains(f)&&(0,e.removeClass)([r],f),(0,e.addClass)([r],v)),"Auto"===t.floatLabelType){var p=function(){return function(t){B(t.element,t.floatLabelType)}(t)},c=function(){return function(t){B(t.element,t.floatLabelType)}(t)};t.element.addEventListener("input",p),t.element.addEventListener("blur",c),t.element.__eventHandlers.floatInputHandler={inputFloatHandler:p},t.element.__eventHandlers.floatBlurHandler={blurFloatHandler:c}}else O(t);(0,e.isNullOrUndefined)(t.element.getAttribute("id"))||r.setAttribute("for",t.element.getAttribute("id"))}function O(t){if(!((0,e.isNullOrUndefined)(t.element)||(0,e.isNullOrUndefined)(t.element.__eventHandlers)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.floatInputHandler)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.floatBlurHandler))){var i=t.element.__eventHandlers.floatInputHandler.inputFloatHandler,s=t.element.__eventHandlers.floatBlurHandler.blurFloatHandler;t.element.removeEventListener("input",i),t.element.removeEventListener("blur",s),delete t.element.__eventHandlers.floatInputHandler,delete t.element.__eventHandlers.floatBlurHandler}}function w(t,e){"Always"===t&&e.classList.contains("e-outline")&&e.classList.add("e-valid-input")}function T(t,i,s){(0,e.isNullOrUndefined)(i)||(t&&!s?(0,e.removeClass)([i],m):(0,e.addClass)([i],m))}function H(t,i,s){(void 0===s&&(s=null),t)?((0,e.addClass)([i],v),i.classList.contains(f)&&(0,e.removeClass)([i],f)):(null==s||s!==document.activeElement)&&(i.classList.contains(v)&&(0,e.removeClass)([i],v),(0,e.addClass)([i],f))}function N(t){var i=(0,e.isNullOrUndefined)(t.parentNode)?t:t.parentNode;return i&&i.classList.contains("e-input-in-wrap")&&(i=i.parentNode),i}function A(t,i,n){if(void 0===a||a){var r=function(n){return function(t,i,n){i.classList.contains(s)||i.readOnly||(t.preventDefault(),i!==document.activeElement&&i.focus(),i.value="",(0,e.addClass)([n],m))}(n,t,i)};i.addEventListener("click",r),t.__eventHandlers.clearClickHandler={clickHandlerEvent:r}}var l=function(){return function(t,e){T(t.value,e)}(t,i)},o=function(){return function(t,e){T(t.value,e,t.readOnly)}(t,i)},h=function(){return function(t,i){setTimeout((function(){(0,e.isNullOrUndefined)(i)||((0,e.addClass)([i],m),i=!(0,e.isNullOrUndefined)(t)&&t.classList.contains("e-combobox")?null:i)}),200)}(t,i)};t.addEventListener("input",l),t.addEventListener("focus",o),t.addEventListener("blur",h),t.__eventHandlers.clearInputHandler={inputHandlerEvent:l},t.__eventHandlers.clearFocusHandler={focusHandlerEvent:o},t.__eventHandlers.clearBlurHandler={blurHandlerEvent:h}}function B(t,e){if(N(t).classList.contains(h)&&"Auto"===e){var i=N(t).getElementsByClassName("e-float-text")[0];H(t.value,i,t)}}function U(t,i,s,n,a){var r,l=(0,e.isNullOrUndefined)(a)?e.createElement:a;return(0,e.isNullOrUndefined)(t.customTag)?r=l(n,{className:i}):(r=l(t.customTag,{className:i})).classList.add(s),r.classList.add("e-control-wrapper"),r}function R(t){var i="";if(!(0,e.isNullOrUndefined)(t)&&""!==t){var s=document.createElement("span");s.innerHTML='<input placeholder="'+t+'"/>',i=s.children[0].placeholder}return i}function V(t,i,s){(0,e.isNullOrUndefined)(s)||""===s||(0,e.removeClass)(i,s.split(" ")),(0,e.isNullOrUndefined)(t)||""===t||(0,e.addClass)(i,t.split(" "))}function F(t,i,s){if("multiselect"===s||function(t){if(!t)return!1;var e=t;for(;e&&e!==document.body;){if("none"===window.getComputedStyle(e).display)return!1;e=e.parentElement}return!0}(t)){var n="multiselect"===s?t:t.clientWidth-parseInt(getComputedStyle(t,null).getPropertyValue("padding-left"),10);(0,e.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 M(t,i){t=R(t);var s,n=N(i);n.classList.contains(h)?(0,e.isNullOrUndefined)(t)||""===t?(n.classList.add(g),(s=n.getElementsByClassName("e-float-text-content")[0])?s.children[0].textContent="":n.getElementsByClassName(d)[0].textContent=""):((s=n.getElementsByClassName("e-float-text-content")[0])?s.children[0].textContent=t:n.getElementsByClassName(d)[0].textContent=t,n.classList.remove(g),i.removeAttribute("placeholder")):(0,e.isNullOrUndefined)(t)||""===t?i.removeAttribute("placeholder"):(0,e.attributes)(i,{placeholder:t})}function I(t,i,s){t?(0,e.attributes)(i,{readonly:""}):i.removeAttribute("readonly"),(0,e.isNullOrUndefined)(s)||B(i,s)}function D(t,s){t?(0,e.addClass)(s,i):(0,e.removeClass)(s,i)}function z(t,i,n,a){var r={disabled:"","aria-disabled":"true"},l=!(0,e.isNullOrUndefined)(a);t?(i.classList.remove(s),q(r,i),l&&(0,e.removeClass)([a],s)):(i.classList.add(s),j(r,i),l&&(0,e.addClass)([a],s)),(0,e.isNullOrUndefined)(n)||B(i,n)}function W(t,i,s,n,a){var r=(0,e.isNullOrUndefined)(a)?e.createElement:a;t?s.clearButton=function(t,i,s,n){var a=((0,e.isNullOrUndefined)(n)?e.createElement:n)("span",{className:c}),r=i.container;return(0,e.isNullOrUndefined)(s)?(i.container.classList.contains(h)?i.container.querySelector("."+d):t).insertAdjacentElement("afterend",a):r.appendChild(a),(0,e.addClass)([a],m),A(t,a),a.setAttribute("aria-label","close"),a}(i,s,n,r):((0,e.remove)(s.clearButton),s.clearButton=null)}function q(t,e){for(var i=0,n=Object.keys(t);i<n.length;i++){var a=n[i],r=N(e);"disabled"===a&&e.classList.remove(s),"disabled"===a&&r.classList.contains(o)&&r.classList.remove(s),"placeholder"===a&&r.classList.contains(h)?r.getElementsByClassName(d)[0].textContent="":e.removeAttribute(a)}}function j(t,e){for(var i=0,n=Object.keys(t);i<n.length;i++){var a=n[i],r=N(e);"disabled"===a&&e.classList.add(s),"disabled"===a&&r.classList.contains(o)&&r.classList.add(s),"placeholder"===a&&r.classList.contains(h)?r.getElementsByClassName(d)[0].textContent=t[""+a]:e.setAttribute(a,t[""+a])}}function _(t,e){if(t.classList.contains("e-outline")&&t.getElementsByClassName("e-float-text")[0]){var i=e("span",{className:p});i.innerHTML=t.getElementsByClassName("e-float-text")[0].innerHTML,t.getElementsByClassName("e-float-text")[0].innerHTML="",t.getElementsByClassName("e-float-text")[0].appendChild(i)}}function K(t,i,s){var n=[];n.push(s);var a=(0,e.isNullOrUndefined)(s)?i.querySelectorAll(".e-input-group-icon"):n;if(t&&a.length>0)for(var r=0;r<a.length;r++)a[parseInt(r.toString(),10)].addEventListener("mousedown",X,!1),a[parseInt(r.toString(),10)].addEventListener("mouseup",Y,!1);else if(a.length>0)for(r=0;r<a.length;r++)a[parseInt(r.toString(),10)].removeEventListener("mousedown",X,this),a[parseInt(r.toString(),10)].removeEventListener("mouseup",Y,this)}function X(){for(var t,e,i=this.parentElement;!i.classList.contains("e-input-group");)i=i.parentElement;e=this,(t=i).classList.contains("e-disabled")||t.querySelector("input").readOnly||e.classList.add("e-input-btn-ripple")}function Y(){var t=this;setTimeout((function(){t.classList.remove("e-input-btn-ripple")}),500)}function Z(t,e){var i=e("span",{className:t});return i.classList.add("e-input-group-icon"),i}function J(t,i,s,n){var a=(0,e.isNullOrUndefined)(n)?e.createElement:n,r=Z(t,a);i.classList.add("e-float-icon-left");var l=i.querySelector(".e-input-in-wrap");if((0,e.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 u=o[parseInt(h.toString(),10)],d=l.parentElement;u.classList.contains("e-float-line")&&(d&&d.classList.contains("e-filled")||!d)||l.appendChild(u)}}return l.parentNode.insertBefore(r,l),K(!0,i,r),r}function $(t,i,s){var n=Z(t,(0,e.isNullOrUndefined)(s)?e.createElement:s);return(i.classList.contains("e-float-icon-left")?i.querySelector(".e-input-in-wrap"):i).appendChild(n),K(!0,i,n),n}function G(t,e){"hidden"===e.type?t.classList.add("e-hidden"):t.classList.contains("e-hidden")&&t.classList.remove("e-hidden")}function Q(t){var i=t;return(0,e.isNullOrUndefined)(t)||""===t||(i=t.replace(/\s+/g," ").trim()),i}t.createInput=function(t,i){t.element.__eventHandlers={};var s=(0,e.isNullOrUndefined)(i)?e.createElement:i,u={container:null,buttons:[],clearButton:null};if(t.floatLabelType,a=t.bindClearAction,(0,e.isNullOrUndefined)(t.floatLabelType)||"Never"===t.floatLabelType?(u.container=U(t,o,y,"span",s),t.element.parentNode.insertBefore(u.container,t.element),(0,e.addClass)([t.element],n),u.container.appendChild(t.element)):L(t,u,s),r(t),(0,e.isNullOrUndefined)(t.properties)||(0,e.isNullOrUndefined)(t.properties.showClearButton)||!t.properties.showClearButton||(W(t.properties.showClearButton,t.element,u,!0,s),u.clearButton.setAttribute("role","button"),u.container.classList.contains(h)&&(0,e.addClass)([u.container],o)),!(0,e.isNullOrUndefined)(t.buttons))for(var d=0;d<t.buttons.length;d++)u.buttons.push($(t.buttons[d],u.container,s));return(0,e.isNullOrUndefined)(t.element)||"TEXTAREA"!==t.element.tagName||(0,e.addClass)([u.container],l),G(u.container,t.element),_((u=function(t,i){if(!(0,e.isNullOrUndefined)(t.properties))for(var s=0,n=Object.keys(t.properties);s<n.length;s++){switch(n[s]){case"cssClass":V(t.properties.cssClass,[i.container]),w(t.floatLabelType,i.container);break;case"enabled":z(t.properties.enabled,t.element,t.floatLabelType,i.container);break;case"enableRtl":D(t.properties.enableRtl,[i.container]);break;case"placeholder":M(t.properties.placeholder,t.element);break;case"readonly":I(t.properties.readonly,t.element)}}return i}(t,u)).container,s),u},t.bindInitialEvent=r,t.wireFloatingEvents=k,t.wireClearBtnEvents=A,t.destroy=function(t,i){void 0===i&&(i=null),function(t){if(!(0,e.isNullOrUndefined)(t.element)&&!((0,e.isNullOrUndefined)(t.element.__eventHandlers)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.inputFocusHandler)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.inputBlurHandler)||(0,e.isNullOrUndefined)(t.element.__eventHandlers.inputHandler))){var i=t.element.__eventHandlers.inputFocusHandler.focusHandler,s=t.element.__eventHandlers.inputBlurHandler.blurHandler,n=t.element.__eventHandlers.inputHandler.inputHandler;t.element.removeEventListener("focus",i),t.element.removeEventListener("blur",s),t.element.removeEventListener("input",n),delete t.element.__eventHandlers.inputFocusHandler,delete t.element.__eventHandlers.inputBlurHandler,delete t.element.__eventHandlers.inputHandler}}(t),"Auto"===t.floatLabelType&&O(t),t.properties.showClearButton&&function(t,i){if(!(0,e.isNullOrUndefined)(t)&&!(0,e.isNullOrUndefined)(t.__eventHandlers)){if(!(0,e.isNullOrUndefined)(t.__eventHandlers.clearClickHandler)){var s=t.__eventHandlers.clearClickHandler.clickHandlerEvent;(void 0===a||a)&&((0,e.isNullOrUndefined)(i)||i.removeEventListener("click",s)),delete t.__eventHandlers.clearClickHandler}if(!(0,e.isNullOrUndefined)(t.__eventHandlers.clearInputHandler)&&!(0,e.isNullOrUndefined)(t.__eventHandlers.clearFocusHandler)&&!(0,e.isNullOrUndefined)(t.__eventHandlers.clearBlurHandler)){var n=t.__eventHandlers.clearInputHandler.inputHandlerEvent,r=t.__eventHandlers.clearFocusHandler.focusHandlerEvent,l=t.__eventHandlers.clearBlurHandler.blurHandlerEvent;t.removeEventListener("input",n),t.removeEventListener("focus",r),t.removeEventListener("blur",l),delete t.__eventHandlers.clearInputHandler,delete t.__eventHandlers.clearFocusHandler,delete t.__eventHandlers.clearBlurHandler}}}(t.element,i),(0,e.isNullOrUndefined)(t.buttons)||K(!1,null,t.buttons),P(t.element),(0,e.isNullOrUndefined)(t.element)||delete t.element.__eventHandlers,null},t.setValue=function(t,i,s,n){if(i.value=t,"Never"!==s&&F(i,i.parentElement),(0,e.isNullOrUndefined)(s)||"Auto"!==s||B(i,s),!(0,e.isNullOrUndefined)(n)&&n){var a=N(i);if(!(0,e.isNullOrUndefined)(a)){var r=a.getElementsByClassName(c)[0];(0,e.isNullOrUndefined)(r)||(i.value&&!(0,e.isNullOrUndefined)(a)&&a.classList.contains("e-input-focus")?(0,e.removeClass)([r],m):(0,e.addClass)([r],m))}}E(s,i)},t.setCssClass=V,t.calculateWidth=F,t.setWidth=function(t,i){"number"==typeof t?i.style.width=(0,e.formatUnit)(t):"string"==typeof t&&(i.style.width=t.match(/px|%|em/)?t:(0,e.formatUnit)(t)),F(i.firstChild,i)},t.setPlaceholder=M,t.setReadonly=I,t.setEnableRtl=D,t.setEnabled=z,t.setClearButton=W,t.removeAttributes=q,t.addAttributes=j,t.removeFloating=function(t){var i=t.container;if(!(0,e.isNullOrUndefined)(i)&&i.classList.contains(h)){var s=i.querySelector("textarea")?i.querySelector("textarea"):i.querySelector("input"),a=i.querySelector("."+d).textContent,r=null!==i.querySelector(".e-clear-icon");(0,e.detach)(i.querySelector("."+u)),(0,e.detach)(i.querySelector("."+d)),(0,e.classList)(i,[o],[h]),P(s),(0,e.attributes)(s,{placeholder:a}),s.classList.add(n),r||"INPUT"!==s.tagName||s.removeAttribute("required")}},t.addFloating=function(t,i,s,a){var r=(0,e.isNullOrUndefined)(a)?e.createElement:a,l=(0,e.closest)(t,"."+o);i;var h=l.tagName,p={element:t,floatLabelType:i,customTag:h="DIV"!==h&&"SPAN"!==h?h:null,properties:{placeholder:s}};if("Never"!==i){var c=l.querySelector(".e-clear-icon"),m={container:l};t.classList.remove(n),L(p,m,r),_(m.container,r),F(p.element,m.container);var v=l.classList.contains("e-float-icon-left");if((0,e.isNullOrUndefined)(c))if(v)c=l.querySelector(".e-input-in-wrap").querySelector(".e-input-group-icon");else c=l.querySelector(".e-input-group-icon");if((0,e.isNullOrUndefined)(c))v&&(c=l.querySelector(".e-input-group-icon"));else{var f=l.querySelector("."+u),g=l.querySelector("."+d),y=v?l.querySelector(".e-input-in-wrap"):l;y.insertBefore(t,c),y.insertBefore(f,c),y.insertBefore(g,c)}}else O(p);w(i,t.parentElement)},t.createSpanElement=_,t.setRipple=function(t,e){for(var i=0;i<e.length;i++)K(t,e[parseInt(i.toString(),10)].container)},t.addIcon=function(t,e,i,s,n){var a="string"==typeof e?e.split(","):e;if("append"===t.toLowerCase())for(var r=0,l=a;r<l.length;r++){$(l[r],i,n)}else for(var o=0,h=a;o<h.length;o++){J(h[o],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")},t.prependSpan=J,t.appendSpan=$,t.validateInputType=G,t.updateHTMLAttributesToElement=function(t,i){if(!(0,e.isNullOrUndefined)(t))for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];C.indexOf(a)<0&&i.setAttribute(a,t[""+a])}},t.updateCssClass=function(t,e,i){V(Q(t),[i],Q(e))},t.getInputValidClassList=Q,t.updateHTMLAttributesToWrapper=function(t,i){if(!(0,e.isNullOrUndefined)(t))for(var s=0,n=Object.keys(t);s<n.length;s++){var a=n[s];if(C.indexOf(a)>-1)if("class"===a){var r=this.getInputValidClassList(t[""+a]);""!==r&&(0,e.addClass)([i],r.split(" "))}else if("style"===a){var l=i.getAttribute(a);l=(0,e.isNullOrUndefined)(l)?t[""+a]:l+t[""+a],i.setAttribute(a,l)}else i.setAttribute(a,t[""+a])}},t.isBlank=function(t){return!t||/^\s*$/.test(t)}}(t||(t={}));var x,S=(x=function(t,e){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},x(t,e)},function(t,e){function i(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),k=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},P="e-input-group-icon",L="e-spin-up",O="e-error",w="increment",T="decrement",H=new RegExp("^(-)?(\\d*)$"),N="e-input-focus",A=["title","style","class"],B=0,U=function(i){function s(t,e){var s=i.call(this,t,e)||this;return s.preventChange=!1,s.isDynamicChange=!1,s.numericOptions=t,s}return S(s,i),s.prototype.preRender=function(){this.isPrevFocused=!1,this.decimalSeparator=".",this.intRegExp=new RegExp("/^(-)?(d*)$/"),this.isCalled=!1;var t=(0,e.getValue)("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),(0,e.removeClass)([this.cloneElement],["e-control","e-numerictextbox","e-lib"]),this.angularTagName=null,this.formEle=(0,e.closest)(this.element,"form"),"EJS-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;for(var i=this.createElement("input"),s=0;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(t){return 0!==t.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,(0,e.setValue)("ej2_instances",t,this.element)}(0,e.attributes)(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off"});var a={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:this.placeholder};this.l10n=new e.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",(0,e.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.setAttribute("aria-label","numerictextbox"),!(0,e.isNullOrUndefined)((0,e.closest)(this.element,"fieldset"))&&(0,e.closest)(this.element,"fieldset").disabled&&(this.enabled=!1),this.renderComplete())},s.prototype.checkAttributes=function(t){for(var i=0,s=t?(0,e.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(!(0,e.isNullOrUndefined)(this.element.getAttribute(n)))switch(n){case"disabled":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.enabled||t){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!t)}break;case"readonly":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.readonly||t){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!t)}break;case"placeholder":((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.placeholder||t)&&this.setProperties({placeholder:this.element.placeholder},!t);break;case"value":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.value||t){var l=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));this.setProperties((0,e.setValue)(n,l,{}),!t)}break;case"min":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.min||t){var o=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===o||isNaN(o)||this.setProperties((0,e.setValue)(n,o,{}),!t)}break;case"max":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.max||t){var h=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===h||isNaN(h)||this.setProperties((0,e.setValue)(n,h,{}),!t)}break;case"step":if((0,e.isNullOrUndefined)(this.numericOptions)||void 0===this.numericOptions.step||t){var u=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(n));null===u||isNaN(u)||this.setProperties((0,e.setValue)(n,u,{}),!t)}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((0,e.setValue)(n,d,{}),!0)}}},s.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},s.prototype.initCultureFunc=function(){this.instance=new e.Internationalization(this.locale)},s.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==(0,e.getValue)("currency",this)&&((0,e.setValue)("currency",this.currency,this.cultureInfo),this.setProperties({currencyCode:this.currency},!0))},s.prototype.createWrapper=function(){var i=this.cssClass;(0,e.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(i=this.getNumericValidClassList(this.cssClass));var s=t.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&&(0,e.attributes)(this.element,{"aria-readonly":"true"}),this.hiddenInput=this.createElement("input",{attrs:{type:"text",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?(0,e.attributes)(this.hiddenInput,{name:this.cloneElement.id}):(0,e.attributes)(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.container.childNodes[1]),this.updateDataAttribute(!1),null!==this.inputStyle&&(0,e.attributes)(this.container,{style:this.inputStyle})},s.prototype.updateDataAttribute=function(t){var e={};if(t)e=this.htmlAttributes;else for(var i=0;i<this.element.attributes.length;i++)e[this.element.attributes[i].name]=this.element.getAttribute(this.element.attributes[i].name);for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];0===a.indexOf("data")&&this.hiddenInput.setAttribute(a,e[""+a])}},s.prototype.updateHTMLAttrToElement=function(){if(!(0,e.isNullOrUndefined)(this.htmlAttributes))for(var t=0,i=Object.keys(this.htmlAttributes);t<i.length;t++){var s=i[t];A.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateCssClass=function(e,i){t.setCssClass(this.getNumericValidClassList(e),[this.container],this.getNumericValidClassList(i))},s.prototype.getNumericValidClassList=function(t){var i=t;return(0,e.isNullOrUndefined)(t)||""===t||(i=t.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!(0,e.isNullOrUndefined)(this.htmlAttributes))for(var t=0,i=Object.keys(this.htmlAttributes);t<i.length;t++){var s=i[t];if(A.indexOf(s)>-1)if("class"===s){var n=this.getNumericValidClassList(this.htmlAttributes[""+s]);""!==n&&(0,e.addClass)([this.container],n.split(" "))}else if("style"===s){var a=this.container.getAttribute(s);a=(0,e.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(t){(0,e.isNullOrUndefined)(t)||("number"==typeof t?this.container.style.width=(0,e.formatUnit)(t):"string"==typeof t&&(this.container.style.width=t.match(/px|%|em/)?t:(0,e.formatUnit)(t)))},s.prototype.spinBtnCreation=function(){this.spinDown=t.appendSpan(P+" e-spin-down",this.container,this.createElement),(0,e.attributes)(this.spinDown,{title:this.l10n.getConstant("decrementTitle")}),this.spinUp=t.appendSpan(P+" "+L,this.container,this.createElement),(0,e.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&&(0,e.attributes)(this.element,{"aria-valuemin":this.min.toString()}),this.max!==Number.MAX_VALUE&&(0,e.attributes)(this.element,{"aria-valuemax":this.max.toString()})},s.prototype.formattedValue=function(t,e){return this.instance.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(e)},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(t,e){this.isInteract=!0;var i=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(i,this.step,t)),this.raiseChangeEvent(e)},s.prototype.checkErrorClass=function(){this.isValidState?(0,e.removeClass)([this.container],O):(0,e.addClass)([this.container],O),(0,e.attributes)(this.element,{"aria-invalid":this.isValidState?"false":"true"})},s.prototype.bindClearEvent=function(){this.showClearButton&&e.EventHandler.add(this.inputWrapper.clearButton,"mousedown touchstart",this.resetHandler,this)},s.prototype.resetHandler=function(t){t.preventDefault(),this.inputWrapper.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputWrapper.container.classList.contains("e-static-clear")||this.clear(t),this.isInteract=!0,this.raiseChangeEvent(t)},s.prototype.clear=function(t){if(this.setProperties({value:null},!0),this.setElementValue(""),this.hiddenInput.value="",(0,e.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(){(0,e.isNullOrUndefined)(this.spinDown)||(0,e.attributes)(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),(0,e.isNullOrUndefined)(this.spinUp)||(0,e.attributes)(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")})},s.prototype.wireEvents=function(){e.EventHandler.add(this.element,"focus",this.focusHandler,this),e.EventHandler.add(this.element,"blur",this.focusOutHandler,this),e.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),e.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),e.EventHandler.add(this.element,"input",this.inputHandler,this),e.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),e.EventHandler.add(this.element,"change",this.changeHandler,this),e.EventHandler.add(this.element,"paste",this.pasteHandler,this),this.enabled&&(this.bindClearEvent(),this.formEle&&e.EventHandler.add(this.formEle,"reset",this.resetFormHandler,this))},s.prototype.wireSpinBtnEvents=function(){e.EventHandler.add(this.spinUp,e.Browser.touchStartEvent,this.mouseDownOnSpinner,this),e.EventHandler.add(this.spinDown,e.Browser.touchStartEvent,this.mouseDownOnSpinner,this),e.EventHandler.add(this.spinUp,e.Browser.touchEndEvent,this.mouseUpOnSpinner,this),e.EventHandler.add(this.spinDown,e.Browser.touchEndEvent,this.mouseUpOnSpinner,this),e.EventHandler.add(this.spinUp,e.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),e.EventHandler.add(this.spinDown,e.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},s.prototype.unwireEvents=function(){e.EventHandler.remove(this.element,"focus",this.focusHandler),e.EventHandler.remove(this.element,"blur",this.focusOutHandler),e.EventHandler.remove(this.element,"keyup",this.keyUpHandler),e.EventHandler.remove(this.element,"input",this.inputHandler),e.EventHandler.remove(this.element,"keydown",this.keyDownHandler),e.EventHandler.remove(this.element,"keypress",this.keyPressHandler),e.EventHandler.remove(this.element,"change",this.changeHandler),e.EventHandler.remove(this.element,"paste",this.pasteHandler),this.formEle&&e.EventHandler.remove(this.formEle,"reset",this.resetFormHandler)},s.prototype.unwireSpinBtnEvents=function(){e.EventHandler.remove(this.spinUp,e.Browser.touchStartEvent,this.mouseDownOnSpinner),e.EventHandler.remove(this.spinDown,e.Browser.touchStartEvent,this.mouseDownOnSpinner),e.EventHandler.remove(this.spinUp,e.Browser.touchEndEvent,this.mouseUpOnSpinner),e.EventHandler.remove(this.spinDown,e.Browser.touchEndEvent,this.mouseUpOnSpinner),e.EventHandler.remove(this.spinUp,e.Browser.touchMoveEvent,this.touchMoveOnSpinner),e.EventHandler.remove(this.spinDown,e.Browser.touchMoveEvent,this.touchMoveOnSpinner)},s.prototype.changeHandler=function(t){t.stopPropagation(),this.element.value.length||this.setProperties({value:null},!0);var e=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(e,t)},s.prototype.raiseChangeEvent=function(t){if(this.inputValue=(0,e.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:t},t&&(this.changeEventArgs.event=t),void 0===this.changeEventArgs.event&&(this.changeEventArgs.isInteracted=!1,this.changeEventArgs.isInteraction=!1),(0,e.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 t=this;if(this.enabled&&!this.readonly){var e=this.element.value;setTimeout((function(){t.numericRegex().test(t.element.value)||t.setElementValue(e)}))}},s.prototype.preventHandler=function(){var t=this,i=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);setTimeout((function(){if(t.element.selectionStart>0){var s=t.element.selectionStart,n=t.element.selectionStart-1,a=t.element.value.split(""),r=(0,e.getNumericObject)(t.locale),l=(0,e.getValue)("decimal",r),o=l.charCodeAt(0);" "===t.element.value[n]&&t.element.selectionStart>0&&!i?((0,e.isNullOrUndefined)(t.prevVal)?t.element.value=t.element.value.trim():0!==n?t.element.value=t.prevVal:0===n&&(t.element.value=t.element.value.trim()),t.element.setSelectionRange(n,n)):isNaN(parseFloat(t.element.value[t.element.selectionStart-1]))&&45!==t.element.value[t.element.selectionStart-1].charCodeAt(0)?(a.indexOf(t.element.value[t.element.selectionStart-1])!==a.lastIndexOf(t.element.value[t.element.selectionStart-1])&&t.element.value[t.element.selectionStart-1].charCodeAt(0)===o||t.element.value[t.element.selectionStart-1].charCodeAt(0)!==o)&&(t.element.value=t.element.value.substring(0,n)+t.element.value.substring(s,t.element.value.length),t.element.setSelectionRange(n,n),isNaN(parseFloat(t.element.value[t.element.selectionStart-1]))&&t.element.selectionStart>0&&t.element.value.length&&t.preventHandler()):isNaN(parseFloat(t.element.value[t.element.selectionStart-2]))&&t.element.selectionStart>1&&45!==t.element.value[t.element.selectionStart-2].charCodeAt(0)&&(a.indexOf(t.element.value[t.element.selectionStart-2])!==a.lastIndexOf(t.element.value[t.element.selectionStart-2])&&t.element.value[t.element.selectionStart-2].charCodeAt(0)===o||t.element.value[t.element.selectionStart-2].charCodeAt(0)!==o)&&(t.element.setSelectionRange(n,n),t.nextEle=t.element.value[t.element.selectionStart],t.cursorPosChanged=!0,t.preventHandler()),!0===t.cursorPosChanged&&t.element.value[t.element.selectionStart]===t.nextEle&&isNaN(parseFloat(t.element.value[t.element.selectionStart-1]))&&(t.element.setSelectionRange(t.element.selectionStart+1,t.element.selectionStart+1),t.cursorPosChanged=!1,t.nextEle=null),""===t.element.value.trim()&&t.element.setSelectionRange(0,0),t.element.selectionStart>0&&(45===t.element.value[t.element.selectionStart-1].charCodeAt(0)&&t.element.selectionStart>1&&((0,e.isNullOrUndefined)(t.prevVal)||(t.element.value=t.prevVal),t.element.setSelectionRange(t.element.selectionStart,t.element.selectionStart)),t.element.value[t.element.selectionStart-1]===l&&0===t.decimals&&t.validateDecimalOnType&&(t.element.value=t.element.value.substring(0,n)+t.element.value.substring(s,t.element.value.length))),t.prevVal=t.element.value}}))},s.prototype.keyUpHandler=function(){if(this.enabled&&!this.readonly){!(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&e.Browser.isDevice&&this.preventHandler();var t=this.instance.getNumberParser({format:"n"})(this.element.value);if(t=null===t||isNaN(t)?null:t,this.hiddenInput.value=t||0===t?t.toString():null,(0,e.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(t){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)&&e.Browser.isDevice&&this.preventHandler(),this.isAngular&&this.element.value!==(0,e.getValue)("decimal",(0,e.getNumericObject)(this.locale))&&this.element.value!==(0,e.getValue)("minusSign",(0,e.getNumericObject)(this.locale))){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:t,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(t){if(!this.readonly)switch(t.keyCode){case 38:t.preventDefault(),this.action(w,t);break;case 40:t.preventDefault(),this.action(T,t)}},s.prototype.performAction=function(t,e,i){(null===t||isNaN(t))&&(t=0);var s=i===w?t+e:t-e;return s=this.correctRounding(t,e,s),this.strictMode?this.trimValue(s):s},s.prototype.correctRounding=function(t,e,i){var s=new RegExp("[,.](.*)"),n=s.test(t.toString()),a=s.test(e.toString());if(n||a){var r=n?s.exec(t.toString())[0].length:0,l=a?s.exec(e.toString())[0].length:0,o=Math.max(r,l);return this.roundValue(i,o)}return i},s.prototype.roundValue=function(t,e){e=e||0;var i=Math.pow(10,e);return t*=i,Math.round(t)/i},s.prototype.updateValue=function(t,e){e&&(this.isInteract=!0),null===t||isNaN(t)||this.decimals&&(t=this.roundNumber(t,this.decimals)),this.inputValue=t,this.changeValue(null===t||isNaN(t)?null:this.strictMode?this.trimValue(t):t),this.isDynamicChange||this.raiseChangeEvent(e)},s.prototype.updateCurrency=function(t,i){(0,e.setValue)(t,i,this.cultureInfo),this.updateValue(this.value)},s.prototype.changeValue=function(t){if(t||0===t){var e=this.getNumberOfDecimals(t);this.setProperties({value:this.roundNumber(t,e)},!0)}else t=null,this.setProperties({value:t},!0);this.modifyText(),this.strictMode||this.validateState()},s.prototype.modifyText=function(){if(this.value||0===this.value){var t=this.formatNumber(),i=this.isFocused?t:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(i),(0,e.attributes)(this.element,{"aria-valuenow":t}),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(e,i){t.setValue(e,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(t){var i,s=new RegExp("[eE][-+]?([0-9]+)"),n=t.toString();if(s.test(n)){var a=s.exec(n);(0,e.isNullOrUndefined)(a)||(n=t.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 t=this.getNumberOfDecimals(this.value);return this.instance.getNumberFormat({maximumFractionDigits:t,minimumFractionDigits:t,useGrouping:!1})(this.value)},s.prototype.trimValue=function(t){return t>this.max?this.max:t<this.min?this.min:t},s.prototype.roundNumber=function(t,e){var i=t,s=e||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(t){return t.preventDefault(),!1},s.prototype.keyPressHandler=function(t){if(!this.enabled||this.readonly)return!0;if(!e.Browser.isDevice&&"11.0"===e.Browser.info.version&&13===t.keyCode){var i=this.instance.getNumberParser({format:"n"})(this.element.value);return this.updateValue(i,t),!0}if(0===t.which||t.metaKey||t.ctrlKey||8===t.keyCode||13===t.keyCode)return!0;var s=String.fromCharCode(t.which),n=(0,e.getValue)("decimal",(0,e.getNumericObject)(this.locale)),a="NumpadDecimal"===t.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),t.preventDefault(),t.stopPropagation()}return!0}return t.preventDefault(),t.stopPropagation(),!1},s.prototype.numericRegex=function(){var t=(0,e.getNumericObject)(this.locale),i=(0,e.getValue)("decimal",t),s="*";return"."===i&&(i="\\"+i),0===this.decimals&&this.validateDecimalOnType?H:(this.decimals&&this.validateDecimalOnType&&(s="{0,"+this.decimals+"}"),new RegExp("^(-)?(((\\d+("+i+"\\d"+s+")?)|("+i+"\\d"+s+")))?$"))},s.prototype.mouseWheel=function(t){var e;t.preventDefault();var i=t;i.wheelDelta?e=i.wheelDelta/120:i.detail&&(e=-i.detail/3),e>0?this.action(w,t):e<0&&this.action(T,t),this.cancelEvent(t)},s.prototype.focusHandler=function(t){var i=this;if(clearTimeout(B),this.focusEventArgs={event:t,value:this.value,container:this.container},this.trigger("focus",this.focusEventArgs),this.enabled&&!this.readonly){if(this.isFocused=!0,(0,e.removeClass)([this.container],O),this.prevValue=this.value,this.value||0===this.value){var s=this.formatNumber();if(this.setElementValue(s),!this.isPrevFocused)if(e.Browser.isDevice||"11.0"!==e.Browser.info.version){var n=e.Browser.isDevice&&e.Browser.isIos?600:0;B=setTimeout((function(){i.element.setSelectionRange(0,s.length)}),n)}else this.element.setSelectionRange(0,s.length)}e.Browser.isDevice||e.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},s.prototype.focusOutHandler=function(t){var i=this;if(this.blurEventArgs={event:t,value:this.value,container:this.container},this.trigger("blur",this.blurEventArgs),this.enabled&&!this.readonly){if(this.isPrevFocused){if(t.preventDefault(),e.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),e.Browser.isDevice||e.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}if((0,e.closest)(this.element,"form")){var r=this.element.nextElementSibling,l=document.createEvent("FocusEvent");l.initEvent("focusout",!1,!0),r.dispatchEvent(l)}}},s.prototype.mouseDownOnSpinner=function(t){var i=this;if(this.isFocused&&(this.isPrevFocused=!0,t.preventDefault()),this.getElementData(t)){this.getElementData(t);var s=t.currentTarget,n=s.classList.contains(L)?w:T;e.EventHandler.add(s,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval((function(){i.isCalled=!0,i.action(n,t)}),150),e.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},s.prototype.touchMoveOnSpinner=function(t){var e;if("touchmove"===t.type){var i=t.touches;e=i.length&&document.elementFromPoint(i[0].pageX,i[0].pageY)}else e=document.elementFromPoint(t.clientX,t.clientY);e.classList.contains(P)||clearInterval(this.timeOut)},s.prototype.mouseUpOnSpinner=function(t){if(this.prevValue=this.value,this.isPrevFocused&&(this.element.focus(),e.Browser.isDevice||(this.isPrevFocused=!1)),e.Browser.isDevice||t.preventDefault(),this.getElementData(t)){var i=t.currentTarget,s=i.classList.contains(L)?w:T;if(e.EventHandler.remove(i,"mouseleave",this.mouseUpClick),this.isCalled||this.action(s,t),this.isCalled=!1,e.EventHandler.remove(document,"mouseup",this.mouseUpClick),(0,e.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(t){return!(t.which&&3===t.which||t.button&&2===t.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},s.prototype.floatLabelTypeUpdate=function(){t.removeFloating(this.inputWrapper);var e=this.hiddenInput;this.hiddenInput.remove(),t.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement),this.container.insertBefore(e,this.container.childNodes[1])},s.prototype.mouseUpClick=function(t){t.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,this.spinUp&&e.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),this.spinDown&&e.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},s.prototype.increment=function(t){void 0===t&&(t=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,t,w)),this.raiseChangeEvent()},s.prototype.decrement=function(t){void 0===t&&(t=this.step),this.isInteract=!1,this.changeValue(this.performAction(this.value,t,T)),this.raiseChangeEvent()},s.prototype.destroy=function(){this.unwireEvents(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),(0,e.detach)(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),(0,e.detach)(this.spinUp),(0,e.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),(0,e.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,t.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(),(0,e.addClass)([this.container],[N]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.element.blur(),(0,e.removeClass)([this.container],[N]))},s.prototype.getPersistData=function(){return this.addOnPersist(["value"])},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),t.calculateWidth(this.element,this.container);break;case"cssClass":this.updateCssClass(i.cssClass,s.cssClass);break;case"enabled":t.setEnabled(i.enabled,this.element),this.bindClearEvent();break;case"enableRtl":t.setEnableRtl(i.enableRtl,[this.container]);break;case"readonly":t.setReadonly(i.readonly,this.element),this.readonly?(0,e.attributes)(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.updateDataAttribute(!0),this.checkAttributes(!0),t.validateInputType(this.container,this.element);break;case"placeholder":t.setPlaceholder(i.placeholder,this.element),t.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":(0,e.setValue)(r,(0,e.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(),t.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":var l=(0,e.getValue)(r,i);this.setProperties({currencyCode:l},!0),this.updateCurrency(r,l);break;case"currencyCode":var o=(0,e.getValue)(r,i);this.setProperties({currency:o},!0),this.updateCurrency("currency",o);break;case"format":(0,e.setValue)(r,(0,e.getValue)(r,i),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=i.decimals,this.updateValue(this.value)}}},s.prototype.updateClearButton=function(e){t.setClearButton(e.showClearButton,this.element,this.inputWrapper,void 0,this.createElement),this.bindClearEvent()},s.prototype.updateSpinButton=function(t){t.showSpinButton?this.spinBtnCreation():((0,e.detach)(this.spinUp),(0,e.detach)(this.spinDown))},s.prototype.getModuleName=function(){return"numerictextbox"},k([(0,e.Property)("")],s.prototype,"cssClass",void 0),k([(0,e.Property)(null)],s.prototype,"value",void 0),k([(0,e.Property)(-Number.MAX_VALUE)],s.prototype,"min",void 0),k([(0,e.Property)(Number.MAX_VALUE)],s.prototype,"max",void 0),k([(0,e.Property)(1)],s.prototype,"step",void 0),k([(0,e.Property)(null)],s.prototype,"width",void 0),k([(0,e.Property)(null)],s.prototype,"placeholder",void 0),k([(0,e.Property)({})],s.prototype,"htmlAttributes",void 0),k([(0,e.Property)(!0)],s.prototype,"showSpinButton",void 0),k([(0,e.Property)(!1)],s.prototype,"readonly",void 0),k([(0,e.Property)(!0)],s.prototype,"enabled",void 0),k([(0,e.Property)(!1)],s.prototype,"showClearButton",void 0),k([(0,e.Property)(!1)],s.prototype,"enablePersistence",void 0),k([(0,e.Property)("n2")],s.prototype,"format",void 0),k([(0,e.Property)(null)],s.prototype,"decimals",void 0),k([(0,e.Property)(null)],s.prototype,"currency",void 0),k([(0,e.Property)(null)],s.prototype,"currencyCode",void 0),k([(0,e.Property)(!0)],s.prototype,"strictMode",void 0),k([(0,e.Property)(!1)],s.prototype,"validateDecimalOnType",void 0),k([(0,e.Property)("Never")],s.prototype,"floatLabelType",void 0),k([(0,e.Event)()],s.prototype,"created",void 0),k([(0,e.Event)()],s.prototype,"destroyed",void 0),k([(0,e.Event)()],s.prototype,"change",void 0),k([(0,e.Event)()],s.prototype,"focus",void 0),k([(0,e.Event)()],s.prototype,"blur",void 0),s=k([e.NotifyPropertyChanges],s)}(e.Component),R="e-error",V="e-input-group",F="e-float-input",M="e-utility-mask",I="e-label-top",D="e-label-bottom",z={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 ]"};function W(){if((0,e.attributes)(this.element,{role:"textbox",autocomplete:"off",autocapitalize:"off",spellcheck:"false","aria-live":"assertive"}),this.mask){for(var t=this.mask.split("]"),i=0;i<t.length;i++)if("\\"===t[i][t[i].length-1]){t[i]=t[i]+"]";for(var s=t[i].split("["),n=0;n<s.length;n++)"\\"===s[n][s[n].length-1]&&(s[n]=s[n]+"["),G.call(this,s[n])}else{if((s=t[i].split("[")).length>1){var a=!1;for(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):G.call(this,s[n])}else G.call(this,s[0])}if(this.escapeMaskValue=this.hiddenMask,this.promptMask=this.hiddenMask.replace(/[09?LCAa#&]/g,this.promptChar),!(0,e.isNullOrUndefined)(this.customCharacters))for(i=0;i<this.promptMask.length;i++)(0,e.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,"");(0,e.attributes)(this.element,{"aria-invalid":"false"})}}function q(){Pt.call(this,this.promptMask),kt.call(this,this.value)}function j(){e.EventHandler.add(this.element,"keydown",ht,this),e.EventHandler.add(this.element,"keypress",ct,this),e.EventHandler.add(this.element,"keyup",vt,this),e.EventHandler.add(this.element,"input",ot,this),e.EventHandler.add(this.element,"focus",et,this),e.EventHandler.add(this.element,"blur",nt,this),e.EventHandler.add(this.element,"paste",at,this),e.EventHandler.add(this.element,"cut",rt,this),e.EventHandler.add(this.element,"drop",lt,this),e.EventHandler.add(this.element,"mousedown",Q,this),e.EventHandler.add(this.element,"mouseup",tt,this),this.enabled&&(K.call(this),this.formElement&&e.EventHandler.add(this.formElement,"reset",Z,this))}function _(){e.EventHandler.remove(this.element,"keydown",ht),e.EventHandler.remove(this.element,"keypress",ct),e.EventHandler.remove(this.element,"keyup",vt),e.EventHandler.remove(this.element,"input",ot),e.EventHandler.remove(this.element,"focus",et),e.EventHandler.remove(this.element,"blur",nt),e.EventHandler.remove(this.element,"paste",at),e.EventHandler.remove(this.element,"cut",rt),e.EventHandler.remove(this.element,"drop",lt),e.EventHandler.remove(this.element,"mousedown",Q),e.EventHandler.remove(this.element,"mouseup",tt),this.formElement&&e.EventHandler.remove(this.formElement,"reset",Z)}function K(){this.showClearButton&&e.EventHandler.add(this.inputObj.clearButton,"mousedown touchstart",X,this)}function X(t){t.preventDefault(),this.inputObj.clearButton.classList.contains("e-clear-icon-hide")&&!this.inputObj.container.classList.contains("e-static-clear")||(Y.call(this,t),this.value="")}function Y(t){var e=this.element.value;Pt.call(this,this.promptMask),this.redoCollec.unshift({value:this.promptMask,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),mt.call(this,t,e),this.element.setSelectionRange(0,0)}function Z(){"EJS-MASKEDTEXTBOX"===this.element.tagName?Pt.call(this,this.promptMask):this.value=this.initInputValue}function J(t){return t.value}function $(t,i){var s="",n=0,a=!1,r=(0,e.isNullOrUndefined)(i)?(0,e.isNullOrUndefined)(t)||(0,e.isNullOrUndefined)(this)?i:t.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&&!(0,e.isNullOrUndefined)(this.customRegExpCollec[n])&&(this._callPasteHandler||!(0,e.isNullOrUndefined)(this.regExpCollec[this.customRegExpCollec[n]])||this.customRegExpCollec[n].length>2&&"["===this.customRegExpCollec[n][0]&&"]"===this.customRegExpCollec[n][this.customRegExpCollec[n].length-1]||!(0,e.isNullOrUndefined)(this.customCharacters)&&!(0,e.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 G(t){for(var e=0;e<t.length;e++)this.hiddenMask+=t[e],"\\"!==t[e]&&this.customRegExpCollec.push(t[e])}function Q(){this.isClicked=!0}function tt(){this.isClicked=!1}function et(t){var i=this,s=this.element,n=0,a=$.call(this,s),r=!1,l=!1,o={selectionStart:s.selectionStart,event:t,value:this.value,maskedValue:s.value,container:(0,e.isNullOrUndefined)(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd};if(this.isClicked||it.call(this,o,s),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 t=s.selectionStart;t<i.promptMask.length;t++){if(s.value[t]===i.promptChar){r=!0;break}if(s.value[t]!==i.promptMask[t]){r=!1;break}}})),setTimeout((function(){var t=s.selectionStart-1;if(t===i.promptMask.length-1||s.value[t]===i.promptChar)l=!0;else for(var e=t;e>=0;e--){if(s.value[e]===i.promptChar){l=!0;break}if(s.value[e]!==i.promptMask[e]){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:t,value:i.value,maskedValue:s.value,container:(0,e.isNullOrUndefined)(i.inputObj)?i.inputObj:i.inputObj.container,selectionEnd:s.selectionEnd},it.call(i,o,s)}),110);break}(0,e.isNullOrUndefined)(s.value.match(st(this.promptChar)))&&(o={selectionStart:s.selectionStart,event:t,value:this.value,maskedValue:s.value,container:(0,e.isNullOrUndefined)(this.inputObj)?this.inputObj:this.inputObj.container,selectionEnd:s.selectionEnd},it.call(this,o,s)),this.isClicked=!1}}function it(t,e){this.trigger("focus",t,(function(t){e.selectionStart=t.selectionStart,e.selectionEnd=t.selectionEnd}))}function st(t){return(0,e.isNullOrUndefined)(t)?t:t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function nt(t){if(this.blurEventArgs={event:t,value:this.value,maskedValue:this.element.value,container:(0,e.isNullOrUndefined)(this.inputObj)?this.inputObj:this.inputObj.container},this.trigger("blur",this.blurEventArgs),this.mask&&(this.isFocus=!1,this.placeholder&&this.element.value===this.promptMask&&"Always"!==this.floatLabelType)){Pt.call(this,"");var i=this.element.parentNode.querySelector(".e-float-text");"Auto"===this.floatLabelType&&!(0,e.isNullOrUndefined)(i)&&i.classList.contains(I)&&(0,e.removeClass)([i],I)}}function at(t){var e=this;if(this.mask&&!this.readonly){var i=this.element.selectionStart,s=this.element.selectionEnd,n=this.element.value;Pt.call(this,""),this._callPasteHandler=!0,setTimeout((function(){var a=e.element.value.replace(/ /g,"");e.redoCollec.length>0&&e.redoCollec[0].value===e.element.value&&(a=$.call(e,e.element)),Pt.call(e,n),e.element.selectionStart=i,e.element.selectionEnd=s;var r=0;e.maskKeyPress=!0;do{yt.call(e,a[r],!1,null),++r}while(r<a.length);if(e.maskKeyPress=!1,e._callPasteHandler=!1,e.element.value===n){var l=0;e.maskKeyPress=!0;do{yt.call(e,a[l],!1,null),++l}while(l<a.length);e.maskKeyPress=!1}else mt.call(e,t,n)}),1)}}function rt(t){var e=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(){Pt.call(e,a),e.element.selectionStart=e.element.selectionEnd=s,e.element.value!==i&&mt.call(e,t,null)}),0)}}function lt(t){t.preventDefault()}function ot(t){if(!0!==e.Browser.isIE||""!==this.element.value||"Never"!==this.floatLabelType){if((0,e.extend)(t,{ctrlKey:!1,keyCode:229}),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||pt.call(this,t),this.element.value.length>this.promptMask.length){var i=this.element.selectionStart,s=this.element.value.length-this.promptMask.length,n=this.element.value.substring(i-s,i);this.maskKeyPress=!1;var a=0;do{yt.call(this,n[a],t.ctrlKey,t),++a}while(a<n.length);this.element.value!==this.preEleVal&&mt.call(this,t,null)}var r=$.call(this,this.element);this.prevValue=r,this.value=r,""===r&&(Pt.call(this,this.promptMask),this.element.setSelectionRange(0,0))}}}function ht(t){if(this.mask&&!this.readonly){229!==t.keyCode&&(!t.ctrlKey||89!==t.keyCode&&90!==t.keyCode||t.preventDefault(),pt.call(this,t));var e=this.element.value;if(t.ctrlKey&&(89===t.keyCode||90===t.keyCode)){var i=void 0;90===t.keyCode&&this.undoCollec.length>0&&e!==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}),Pt.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.undoCollec.splice(this.undoCollec.length-1,1)):89===t.keyCode&&this.redoCollec.length>0&&e!==this.redoCollec[0].value&&(i=this.redoCollec[0],this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),Pt.call(this,i.value),this.element.selectionStart=i.startIndex,this.element.selectionEnd=i.endIndex,this.redoCollec.splice(0,1))}}}function ut(){var t,e=this.element.selectionStart,i=this.element.selectionEnd;this.redoCollec.length>0?(t=this.redoCollec[0],Pt.call(this,t.value),t.startIndex-e==1?(this.element.selectionStart=t.startIndex,this.element.selectionEnd=t.endIndex):(this.element.selectionStart=e+1,this.element.selectionEnd=i+1)):(Pt.call(this,this.promptMask),this.element.selectionStart=this.element.selectionEnd=e)}function dt(t,e,i){return"input"===i.type&&(t=!1,e=this.element.value,Pt.call(this,this.promptMask),kt.call(this,e)),t}function pt(t){var i,s=!1,n=!1;this.element.value.length<this.promptMask.length&&(s=!0,i=this.element.value,s=dt.call(this,s,i,t),ut.call(this)),this.element.value.length>=this.promptMask.length&&"input"===t.type&&(s=dt.call(this,s,i,t));var a=this.element.selectionStart,r=this.element.selectionEnd,l=this.element.selectionStart,o=this.element.selectionEnd,h=this.hiddenMask.replace(/[>|\\<]/g,""),u=h[l-1],d=this.element.selectionEnd;if(s||8===t.keyCode||46===t.keyCode){this.undoCollec.push({value:this.element.value,startIndex:this.element.selectionStart,endIndex:o});var p=!1,c=this.element.value;if(l>0||(8===t.keyCode||46===t.keyCode)&&l<this.element.value.length&&this.element.selectionEnd-l!==this.element.value.length){var m=l;l!==o?(l=o,46===t.keyCode&&(p=!0)):46===t.keyCode?++m:--m;for(var v=l;8===t.keyCode||s||p?v>m:v<m;8===t.keyCode||s||p?v--:v++)for(var f=l;8===t.keyCode||s||p?f>0:f<this.element.value.length;8===t.keyCode||s||p?f--:f++){var g=void 0;(8===t.keyCode||p)&&(a!==r&&a!==l||a===r)||s?(u=h[f-1],g=l-1):(u=h[f],g=l,++l);var y=this.element.value[g];if((0,e.isNullOrUndefined)(this.regExpCollec[""+u])&&!(0,e.isNullOrUndefined)(this.customCharacters)&&(0,e.isNullOrUndefined)(this.customCharacters[""+u])&&this.hiddenMask[g]!==this.promptChar&&"["!==this.customRegExpCollec[g][0]&&"]"!==this.customRegExpCollec[g][this.customRegExpCollec[g].length-1]||this.promptMask[g]!==this.promptChar&&(0,e.isNullOrUndefined)(this.customCharacters))this.element.selectionStart=this.element.selectionEnd=g,t.preventDefault(),46!==t.keyCode||p||++this.element.selectionStart;else{var b=this.element.value,C=this.promptChar,E=b.substring(0,g)+C+b.substring(l,b.length);Pt.call(this,E),t.preventDefault(),46!==t.keyCode||p||g++,this.element.selectionStart=this.element.selectionEnd=g,n=!0}if(l=this.element.selectionStart,!n&&8===t.keyCode||p||!n&&46!==t.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&&!(0,e.isNullOrUndefined)(this.customCharacters))break}}46===t.keyCode&&p&&n&&(this.element.selectionStart=this.element.selectionEnd=d),0===this.element.selectionStart&&this.element.selectionEnd===this.element.value.length&&(Pt.call(this,this.promptMask),t.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&&mt.call(this,t,i)}}function ct(t){if(this.mask&&!this.readonly){var e=this.element.value;if(!t.ctrlKey&&!t.metaKey||(t.ctrlKey||t.metaKey)&&"KeyA"!==t.code&&"KeyY"!==t.code&&"KeyZ"!==t.code&&"KeyX"!==t.code&&"KeyC"!==t.code&&"KeyV"!==t.code){this.maskKeyPress=!0;var i=t.key;"Spacebar"===i&&(i=String.fromCharCode(t.keyCode)),i?i&&1===i.length&&(yt.call(this,i,t.ctrlKey,t),t.preventDefault()):(this.isIosInvalid=!0,yt.call(this,String.fromCharCode(t.keyCode),t.ctrlKey,t),t.preventDefault(),this.isIosInvalid=!1),32===t.keyCode&&" "===i&&" "===this.promptChar&&(this.element.selectionStart=this.element.selectionEnd=this.element.selectionStart-i.length)}this.element.value!==e&&mt.call(this,t,e)}}function mt(t,i){var s=this.isProtectedOnChange;if(!(0,e.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=$.call(this,this.element)),(0,e.isNullOrUndefined)(t)||(this.changeEventArgs.isInteracted=!0,this.changeEventArgs.isInteraction=!0,this.changeEventArgs.event=t),this.isProtectedOnChange=!0,this.value=this.changeEventArgs.value,this.isProtectedOnChange=s,(0,e.merge)(n,this.changeEventArgs),this.isAngular&&this.preventChange?this.preventChange=!1:this.trigger("change",n)}this.preEleVal=this.element.value,this.prevValue=$.call(this,this.element)}function vt(t){if(this.mask&&!this.readonly){var i=void 0;if(this.maskKeyPress||229!==t.keyCode)xt.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=e.Browser.isAndroid&&""===r;h||o===r||i.value.substring(l-a,l)===r?h&&Ct.call(this,t,l-1,this.element.selectionEnd-1,r,t.ctrlKey,!1):yt.call(this,r,t.ctrlKey,t)}else s=this.promptMask,yt.call(this,r,t.ctrlKey,t);this.maskKeyPress=!1,mt.call(this,t,s)}}var u=$.call(this,this.element);(0!==this.element.selectionStart||this.promptMask!==this.element.value||""!==u||""===u&&this.value!==u)&&(this.prevValue=u,this.value=u)}else mt.call(this,t);if(0===this.element.selectionStart&&0===this.element.selectionEnd){var d=this.element;setTimeout((function(){d.setSelectionRange(0,0)}),0)}}function ft(t){if(t.length>1&&this.promptMask.length+t.length<this.element.value.length){var e=this.redoCollec[0].value.substring(0,this.redoCollec[0].startIndex)+t+this.redoCollec[0].value.substring(this.redoCollec[0].startIndex,this.redoCollec[0].value.length);Pt.call(this,e),this.element.selectionStart=this.element.selectionEnd=this.redoCollec[0].startIndex+t.length}this.element.selectionStart=this.element.selectionStart-t.length,this.element.selectionEnd=this.element.selectionEnd-t.length}function gt(t){this.maskKeyPress||ft.call(this,t)}function yt(t,i,s){if(gt.call(this,t),!(0,e.isNullOrUndefined)(this)&&!(0,e.isNullOrUndefined)(t))for(var n,a,r=this.element.selectionStart,l=r,o=!1,h=this.element.value,u=!1,d=!1,p=0;p<t.length;p++){var c=t[p];if(r=this.element.selectionStart,this.maskKeyPress||l!==r||(r+=p),!this.maskKeyPress||r<this.promptMask.length){for(var m=r;m<this.promptMask.length;m++){n=this.escapeMaskValue[r],"\\"===this.hiddenMask[r]&&this.hiddenMask[r+1]===t&&(d=!0),((0,e.isNullOrUndefined)(this.regExpCollec[""+n])&&((0,e.isNullOrUndefined)(this.customCharacters)||!(0,e.isNullOrUndefined)(this.customCharacters)&&(0,e.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&&(0,e.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((0,e.isNullOrUndefined)(this.customCharacters)||(0,e.isNullOrUndefined)(this.customCharacters[""+n]))(!(0,e.isNullOrUndefined)(this.regExpCollec[""+n])&&c.match(new RegExp(this.regExpCollec[""+n]))&&this.promptMask[r]===this.promptChar||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{var v=this.customCharacters[""+n].split(",");for(m=0;m<v.length;m++)if(c.match(new RegExp("["+v[m]+"]"))){o=!0;break}}if((!this.maskKeyPress||r<this.hiddenMask.length)&&o){if(0===p)if(this.maskKeyPress)this.undoCollec.push({value:h,startIndex:r,endIndex:r});else{var f=this.element.selectionStart,g=this.element.selectionEnd;this.redoCollec.length>0?(a=this.redoCollec[0].value,Pt.call(this,a),this.undoCollec.push(this.redoCollec[0])):(this.undoCollec.push({value:this.promptMask,startIndex:r,endIndex:r}),a=this.promptMask,Pt.call(this,a)),this.element.selectionStart=f,this.element.selectionEnd=g}r=this.element.selectionStart,bt.call(this,s,r,c,a,d),u=!0,p===t.length-1&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd}),o=!1}else r=this.element.selectionStart,Ct.call(this,s,r,l,t,i,u);p!==t.length-1||o||(!e.Browser.isAndroid||e.Browser.isAndroid&&r<this.promptMask.length)&&this.redoCollec.unshift({value:this.element.value,startIndex:this.element.selectionStart,endIndex:this.element.selectionEnd})}else 1!==t.length||i||(0,e.isNullOrUndefined)(s)||Et.call(this)}}function bt(t,e,i,s,n){if(this.hiddenMask.length>this.promptMask.length&&(i=St.call(this,i,this.element.value)),!n){var a=this.element.value,r=a.substring(0,e)+i+a.substring(e+1,a.length);Pt.call(this,r),this.element.selectionStart=this.element.selectionEnd=e+1}}function Ct(t,i,s,n,a,r){if(!this.maskKeyPress){var l=this.element.value;i>=this.promptMask.length?Pt.call(this,l.substring(0,i)):(s===i?Pt.call(this,l.substring(0,i)+l.substring(i+1,l.length)):this.promptMask.length===this.element.value.length?Pt.call(this,l.substring(0,i)+l.substring(i,l.length)):Pt.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),Et.call(this)}1!==n.length||a||(0,e.isNullOrUndefined)(t)||Et.call(this)}function Et(){var t=this,i=this.element.parentNode,s=200;i.classList.contains(V)||i.classList.contains(F)?(0,e.addClass)([i],R):(0,e.addClass)([this.element],R),!0===this.isIosInvalid&&(s=400),(0,e.attributes)(this.element,{"aria-invalid":"true"}),setTimeout((function(){t.maskKeyPress||xt.call(t)}),s)}function xt(){var t=this.element.parentNode;(0,e.isNullOrUndefined)(t)||(0,e.removeClass)([t],R),(0,e.removeClass)([this.element],R),(0,e.attributes)(this.element,{"aria-invalid":"false"})}function St(t,e){var i,s,n=e,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]){t=t.toUpperCase();break}if("<"===i[s]){t=t.toLowerCase();break}if("|"===i[s])break}--s}return t}function kt(t){if(this.mask&&void 0!==t&&(void 0===this.prevValue||this.prevValue!==t)){if(this.maskKeyPress=!0,Pt.call(this,this.promptMask),""===t||null===t&&"Never"===this.floatLabelType&&this.placeholder||(this.element.selectionStart=0,this.element.selectionEnd=0),null!==t)for(var i=0;i<t.length;i++)yt.call(this,t[i],!1,null);var s=$.call(this,this.element);this.prevValue=s,this.value=s,mt.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&&!(0,e.isNullOrUndefined)(n)&&n.classList.contains(I)&&!this.isFocus&&((0,e.removeClass)([n],I),(0,e.addClass)([n],D),Pt.call(this,""))}(null===this.mask||""===this.mask&&void 0!==this.value)&&Pt.call(this,this.value)}function Pt(i,s){!this.isFocus&&"Auto"===this.floatLabelType&&this.placeholder&&(0,e.isNullOrUndefined)(this.value)&&(i="");var n=$.call(this,s||this.element,i);null===n||""===n?(t.setValue(i,s||this.element,this.floatLabelType,!1),this.showClearButton&&this.inputObj.clearButton.classList.add("e-clear-icon-hide")):t.setValue(i,s||this.element,this.floatLabelType,this.showClearButton)}function Lt(t){var e=Ot(t);q.call(e);var i=$.call(this,this.element);this.prevValue=i,this.value=i,t.mask&&(_.call(e),j.call(e))}function Ot(t){(0,e.addClass)([t.element],M);var i={element:t.element,mask:t.mask,promptMask:"",hiddenMask:"",escapeMaskValue:"",promptChar:t.promptChar?t.promptChar.length>1?t.promptChar=t.promptChar[0]:t.promptChar:"_",value:t.value?t.value:null,regExpCollec:z,customRegExpCollec:[],customCharacters:t.customCharacters,undoCollec:[],redoCollec:[],maskKeyPress:!1,prevValue:""};return W.call(i),i}function wt(t){return $.call(Ht(t),t.element)}function Tt(t){return J.call(Ht(t),t.element)}function Ht(t){var i;return!(0,e.isNullOrUndefined)(t)&&t.element.classList.contains(M)&&(i=Ot(t)),i}var Nt,At=function(){},Bt=(new At,function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()),Ut=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},Rt="e-input-focus",Vt=["title","style","class"],Ft=function(i){function s(t,e){var s=i.call(this,t,e)||this;return s.initInputValue="",s.preventChange=!1,s.isClicked=!1,s.maskOptions=t,s}return Bt(s,i),s.prototype.getModuleName=function(){return"maskedtextbox"},s.prototype.preRender=function(){this.promptMask="",this.hiddenMask="",this.escapeMaskValue="",this.regExpCollec=z,this.customRegExpCollec=[],this.undoCollec=[],this.redoCollec=[],this.changeEventArgs={},this.focusEventArgs={},this.blurEventArgs={},this.maskKeyPress=!1,this.isFocus=!1,this.isInitial=!1,this.isIosInvalid=!1;var t=(0,e.getValue)("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),(0,e.removeClass)([this.cloneElement],["e-control","e-maskedtextbox","e-lib"]),this.angularTagName=null,this.formElement=(0,e.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,(0,e.setValue)("ej2_instances",t,this.element)}this.updateHTMLAttrToElement(),this.checkHtmlAttributes(!1),this.formElement&&(this.initInputValue=this.value)},s.prototype.getPersistData=function(){return this.addOnPersist(["value"])},s.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&("Never"===this.floatLabelType&&(0,e.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,e.Browser.isDevice||"11.0"!==e.Browser.info.version&&"edge"!==e.Browser.info.name||this.element.blur(),e.Browser.isDevice&&e.Browser.isIos&&this.element.blur(),(this.element.getAttribute("value")||this.value)&&this.element.setAttribute("value",this.element.value),!(0,e.isNullOrUndefined)((0,e.closest)(this.element,"fieldset"))&&(0,e.closest)(this.element,"fieldset").disabled&&(this.enabled=!1),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.setAttribute("aria-label","maskedtextbox"),this.renderComplete())},s.prototype.updateHTMLAttrToElement=function(){if(!(0,e.isNullOrUndefined)(this.htmlAttributes))for(var t=0,i=Object.keys(this.htmlAttributes);t<i.length;t++){var s=i[t];Vt.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},s.prototype.updateCssClass=function(e,i){t.setCssClass(this.getValidClassList(e),[this.inputObj.container],this.getValidClassList(i))},s.prototype.getValidClassList=function(t){var i=t;return(0,e.isNullOrUndefined)(t)||""===t||(i=t.replace(/\s+/g," ").trim()),i},s.prototype.updateHTMLAttrToWrapper=function(){if(!(0,e.isNullOrUndefined)(this.htmlAttributes))for(var t=0,i=Object.keys(this.htmlAttributes);t<i.length;t++){var s=i[t];if(Vt.indexOf(s)>-1)if("class"===s){var n=this.htmlAttributes[""+s].replace(/\s+/g," ").trim();""!==n&&(0,e.addClass)([this.inputObj.container],n.split(" "))}else if("style"===s){var a=this.inputObj.container.getAttribute(s);a=(0,e.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.length>1&&(this.promptChar=this.promptChar[0]),W.call(this),q.call(this),(null===this.mask||""===this.mask&&void 0!==this.value)&&Pt.call(this,this.value);var t=$.call(this,this.element);this.prevValue=t,this.value=t,this.isInitial||_.call(this),j.call(this)},s.prototype.setMaskPlaceholder=function(e,i){(i||this.placeholder)&&(t.setPlaceholder(this.placeholder,this.element),(this.element.value===this.promptMask&&e&&"Always"!==this.floatLabelType||this.element.value===this.promptMask&&"Never"===this.floatLabelType)&&Pt.call(this,""))},s.prototype.setWidth=function(t){if(!(0,e.isNullOrUndefined)(t))if("number"==typeof t)this.inputObj.container.style.width=(0,e.formatUnit)(t),this.element.style.width=(0,e.formatUnit)(t);else if("string"==typeof t){var i=t.match(/px|%|em/)?t:(0,e.formatUnit)(t);this.inputObj.container.style.width=i,this.element.style.width=i}},s.prototype.checkHtmlAttributes=function(t){for(var i=0,s=t?(0,e.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"];i<s.length;i++){var n=s[i];if(!(0,e.isNullOrUndefined)(this.element.getAttribute(n)))switch(n){case"placeholder":((0,e.isNullOrUndefined)(this.maskOptions)||void 0===this.maskOptions.placeholder||t)&&this.setProperties({placeholder:this.element.placeholder},!t);break;case"disabled":if((0,e.isNullOrUndefined)(this.maskOptions)||void 0===this.maskOptions.enabled||t){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!t)}break;case"value":((0,e.isNullOrUndefined)(this.maskOptions)||void 0===this.maskOptions.value||t)&&this.setProperties({value:this.element.value},!t);break;case"readonly":if((0,e.isNullOrUndefined)(this.maskOptions)||void 0===this.maskOptions.readonly||t){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!t)}}}},s.prototype.createWrapper=function(){var i=this.cssClass;(0,e.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(i=this.getValidClassList(this.cssClass)),this.inputObj=t.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(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){switch(n[s]){case"value":kt.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(e.width),t.calculateWidth(this.element,this.inputObj.container);break;case"cssClass":this.updateCssClass(e.cssClass,i.cssClass);break;case"enabled":t.setEnabled(e.enabled,this.element,this.floatLabelType,this.inputObj.container);break;case"readonly":t.setReadonly(e.readonly,this.element);break;case"enableRtl":t.setEnableRtl(e.enableRtl,[this.inputObj.container]);break;case"customCharacters":this.customCharacters=e.customCharacters,this.resetMaskedTextBox();break;case"showClearButton":t.setClearButton(e.showClearButton,this.element,this.inputObj,void 0,this.createElement),K.call(this);break;case"floatLabelType":this.floatLabelType=e.floatLabelType,t.removeFloating(this.inputObj),t.addFloating(this.element,this.floatLabelType,this.placeholder,this.createElement);break;case"htmlAttributes":this.updateHTMLAttrToElement(),this.updateHTMLAttrToWrapper(),this.checkHtmlAttributes(!0);break;case"mask":var a=this.value;this.mask=e.mask,this.updateValue(a);break;case"promptChar":e.promptChar.length>1&&(e.promptChar=e.promptChar[0]),e.promptChar?this.promptChar=e.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=[],Pt.call(this,r)}}this.preventChange=this.isAngular&&this.preventChange?!this.preventChange:this.preventChange},s.prototype.updateValue=function(t){this.resetMaskedTextBox(),kt.call(this,t)},s.prototype.getMaskedValue=function(){return J.call(this,this.element)},s.prototype.focusIn=function(){document.activeElement!==this.element&&this.enabled&&(this.isFocus=!0,this.element.focus(),(0,e.addClass)([this.inputObj.container],[Rt]))},s.prototype.focusOut=function(){document.activeElement===this.element&&this.enabled&&(this.isFocus=!1,this.element.blur(),(0,e.removeClass)([this.inputObj.container],[Rt]))},s.prototype.destroy=function(){_.call(this),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),(0,e.detach)(this.inputObj.container)),this.blurEventArgs=null,t.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),this.changeEventArgs=null,this.inputObj=null,i.prototype.destroy.call(this)},Ut([(0,e.Property)(null)],s.prototype,"cssClass",void 0),Ut([(0,e.Property)(null)],s.prototype,"width",void 0),Ut([(0,e.Property)(null)],s.prototype,"placeholder",void 0),Ut([(0,e.Property)("Never")],s.prototype,"floatLabelType",void 0),Ut([(0,e.Property)({})],s.prototype,"htmlAttributes",void 0),Ut([(0,e.Property)(!0)],s.prototype,"enabled",void 0),Ut([(0,e.Property)(!1)],s.prototype,"readonly",void 0),Ut([(0,e.Property)(!1)],s.prototype,"showClearButton",void 0),Ut([(0,e.Property)(!1)],s.prototype,"enablePersistence",void 0),Ut([(0,e.Property)(null)],s.prototype,"mask",void 0),Ut([(0,e.Property)("_")],s.prototype,"promptChar",void 0),Ut([(0,e.Property)(null)],s.prototype,"value",void 0),Ut([(0,e.Property)(null)],s.prototype,"customCharacters",void 0),Ut([(0,e.Event)()],s.prototype,"created",void 0),Ut([(0,e.Event)()],s.prototype,"destroyed",void 0),Ut([(0,e.Event)()],s.prototype,"change",void 0),Ut([(0,e.Event)()],s.prototype,"focus",void 0),Ut([(0,e.Event)()],s.prototype,"blur",void 0),s=Ut([e.NotifyPropertyChanges],s)}(e.Component),Mt=a(197),It=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Dt=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},zt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return It(i,t),Dt([(0,e.Property)("None")],i.prototype,"placement",void 0),Dt([(0,e.Property)(10)],i.prototype,"largeStep",void 0),Dt([(0,e.Property)(1)],i.prototype,"smallStep",void 0),Dt([(0,e.Property)(!1)],i.prototype,"showSmallTicks",void 0),Dt([(0,e.Property)(null)],i.prototype,"format",void 0),i}(e.ChildProperty),Wt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return It(i,t),Dt([(0,e.Property)(null)],i.prototype,"color",void 0),Dt([(0,e.Property)(null)],i.prototype,"start",void 0),Dt([(0,e.Property)(null)],i.prototype,"end",void 0),i}(e.ChildProperty),qt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return It(i,t),Dt([(0,e.Property)(!1)],i.prototype,"enabled",void 0),Dt([(0,e.Property)(null)],i.prototype,"minStart",void 0),Dt([(0,e.Property)(null)],i.prototype,"minEnd",void 0),Dt([(0,e.Property)(null)],i.prototype,"maxStart",void 0),Dt([(0,e.Property)(null)],i.prototype,"maxEnd",void 0),Dt([(0,e.Property)(!1)],i.prototype,"startHandleFixed",void 0),Dt([(0,e.Property)(!1)],i.prototype,"endHandleFixed",void 0),i}(e.ChildProperty),jt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return It(i,t),Dt([(0,e.Property)("")],i.prototype,"cssClass",void 0),Dt([(0,e.Property)("Before")],i.prototype,"placement",void 0),Dt([(0,e.Property)("Focus")],i.prototype,"showOn",void 0),Dt([(0,e.Property)(!1)],i.prototype,"isVisible",void 0),Dt([(0,e.Property)(null)],i.prototype,"format",void 0),i}(e.ChildProperty),_t="e-slider",Kt="e-rtl",Xt="e-slider-input",Yt="e-control-wrapper",Zt="e-handle",Jt="e-range",$t="e-slider-button",Gt="e-first-button",Qt="e-second-button",te="e-scale",ee="e-tick",ie="e-large",se="e-tick-value",ne="e-slider-tooltip",ae="e-slider-hover",re="e-handle-first",le="e-handle-second",oe="e-disabled",he="e-slider-container",ue="e-slider-horizontal-before",de="e-slider-horizontal-after",pe="e-slider-vertical-before",ce="e-slider-vertical-after",me="e-material-tooltip-open",ve="e-tooltip-active",fe="e-material-slider",ge="e-slider-track",ye="e-slider-horizantal-color",be="e-slider-vertical-color",Ce="e-handle-focused",Ee="e-vertical",xe="e-horizontal",Se="e-handle-start",ke="e-material-tooltip-start",Pe="e-tab-handle",Le="e-button-icon",Oe="e-small-size",we="e-tick-pos",Te="e-first-tick",He="e-last-tick",Ne="e-slider-btn",Ae="e-tab-track",Be="e-tab-range",Ue="e-handle-active",Re="e-material-handle",Ve="e-material-range",Fe="e-material-default",Me="e-material-tooltip-show",Ie="e-material-tooltip-hide",De="e-read-only",ze="e-limits",We="e-limit-bar",qe="e-limit-first",je="e-limit-second",_e="e-drag-horizontal",Ke="e-drag-vertical",Xe=function(t){function i(e,i){var s=t.call(this,e,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 It(i,t),i.prototype.preRender=function(){this.l10n=new e.L10n("slider",{incrementTitle:"Increase",decrementTitle:"Decrease"},this.locale),this.isElementFocused=!1,this.tickElementCollection=[],this.tooltipFormatInfo={},this.ticksFormatInfo={},this.initCultureInfo(),this.initCultureFunc(),this.formChecker()},i.prototype.formChecker=function(){var t=(0,e.closest)(this.element,"form");t?(this.isForm=!0,(0,e.isNullOrUndefined)(this.formResetValue)||this.setProperties({value:this.formResetValue},!0),this.formResetValue=this.value,"Range"!==this.type||!(0,e.isNullOrUndefined)(this.formResetValue)&&"object"==typeof this.formResetValue?(0,e.isNullOrUndefined)(this.formResetValue)&&(this.formResetValue=parseFloat((0,e.formatUnit)(this.min))):this.formResetValue=[parseFloat((0,e.formatUnit)(this.min)),parseFloat((0,e.formatUnit)(this.max))],this.formElement=t):this.isForm=!1},i.prototype.initCultureFunc=function(){this.internationalization=new e.Internationalization(this.locale)},i.prototype.initCultureInfo=function(){this.tooltipFormatInfo.format=(0,e.isNullOrUndefined)(this.tooltip.format)?null:this.tooltip.format,this.ticksFormatInfo.format=(0,e.isNullOrUndefined)(this.ticks.format)?null:this.ticks.format},i.prototype.formatString=function(t,e){var i=null,s=null;if(t||0===t){i=this.formatNumber(t);var n=this.numberOfDecimals(t);s=this.internationalization.getNumberFormat(e)(this.makeRoundNumber(t,n))}return{elementVal:i,formatString:s}},i.prototype.formatNumber=function(t){var e=this.numberOfDecimals(t);return this.internationalization.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},i.prototype.numberOfDecimals=function(t){var e=t.toString().split(".")[1];return e&&e.length?e.length:0},i.prototype.makeRoundNumber=function(t,e){var i=e||0;return Number(t.toFixed(i))},i.prototype.fractionalToInteger=function(t){t=0===this.numberOfDecimals(t)?Number(t).toFixed(this.noOfDecimals):t;for(var e=1,i=0;i<this.noOfDecimals;i++)e*=10;return t=Number((t*e).toFixed(0))},i.prototype.render=function(){var t=this;this.initialize(),this.initRender(),this.wireEvents(),this.setZindex(),this.renderComplete(),"EJS-SLIDER"===this.element.tagName&&"none"===this.getTheme(this.sliderContainer)&&setTimeout((function(){t.refresh()}),0)},i.prototype.initialize=function(){(0,e.addClass)([this.element],_t),this.setCSSClass()},i.prototype.setElementWidth=function(t){(0,e.isNullOrUndefined)(t)||(0,e.isNullOrUndefined)(this.sliderContainer)||("number"==typeof t?this.sliderContainer.style.width=(0,e.formatUnit)(t):"string"==typeof t&&(this.sliderContainer.style.width=t.match(/px|%|em/)?t:(0,e.formatUnit)(t)))},i.prototype.setCSSClass=function(t){t&&(0,e.removeClass)([this.element],t.split(" ")),this.cssClass&&(0,e.addClass)([this.element],this.cssClass.split(" "))},i.prototype.setEnabled=function(){this.enabled?((0,e.removeClass)([this.sliderContainer],[oe]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.remove(oe),this.wireEvents()):((0,e.addClass)([this.sliderContainer],[oe]),this.tooltip.isVisible&&this.tooltipElement&&"Always"===this.tooltip.showOn&&this.tooltipElement.classList.add(oe),this.unwireEvents())},i.prototype.getTheme=function(t){return window.getComputedStyle(t,":after").getPropertyValue("content").replace(/['"]+/g,"")},i.prototype.initRender=function(){this.sliderContainer=this.createElement("div",{className:he+" "+Yt}),this.element.parentNode.insertBefore(this.sliderContainer,this.element),this.sliderContainer.appendChild(this.element),this.sliderTrack=this.createElement("div",{className:ge}),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:(0,e.isNullOrUndefined)(this.value)?(0,e.isNullOrUndefined)(this.min)?"0":this.min.toString():this.value.toString(),name:this.element.getAttribute("name")||this.element.getAttribute("id")||"_"+(1e3*Math.random()).toFixed(0)+"slider",class:Xt}}),this.hiddenInput.tabIndex=-1,this.sliderContainer.appendChild(this.hiddenInput),this.showButtons&&this.setButtons(),this.setEnableRTL(),"Range"===this.type?this.rangeValueUpdate():this.value=(0,e.isNullOrUndefined)(this.value)?(0,e.isNullOrUndefined)(this.min)?0:parseFloat((0,e.formatUnit)(this.min.toString())):this.value,this.previousVal="Range"!==this.type?this.checkHandleValue(parseFloat((0,e.formatUnit)(this.value.toString()))):[this.checkHandleValue(parseFloat((0,e.formatUnit)(this.value[0].toString()))),this.checkHandleValue(parseFloat((0,e.formatUnit)(this.value[1].toString())))],this.previousChanged=this.previousVal,(0,e.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?(0,e.removeClass)([this.sliderContainer],[oe]):(0,e.addClass)([this.sliderContainer],[oe]),this.readonly?(0,e.addClass)([this.sliderContainer],[De]):(0,e.removeClass)([this.sliderContainer],[De])},i.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.isBootstrap5="bootstrap5"===this.getTheme(this.sliderContainer),this.isFluent="FluentUI"===this.getTheme(this.sliderContainer),this.isFluent2="fluent2"===this.getTheme(this.sliderContainer),this.isMaterialTooltip=(this.isMaterial||this.isMaterial3)&&"Range"!==this.type&&this.tooltip.isVisible},i.prototype.createRangeBar=function(){"Default"!==this.type&&(this.rangeBar=this.createElement("div",{attrs:{class:Jt}}),this.element.appendChild(this.rangeBar),this.drag&&"Range"===this.type&&("Horizontal"===this.orientation?this.rangeBar.classList.add(_e):this.rangeBar.classList.add(Ke)))},i.prototype.createLimitBar=function(){var t="Range"!==this.type?We:qe;t+=" "+ze,this.limitBarFirst=this.createElement("div",{attrs:{class:t}}),this.element.appendChild(this.limitBarFirst),"Range"===this.type&&(this.limitBarSecond=this.createElement("div",{attrs:{class:je+" "+ze}}),this.element.appendChild(this.limitBarSecond))},i.prototype.setOrientClass=function(){"Vertical"!==this.orientation?(this.sliderContainer.classList.remove(Ee),this.sliderContainer.classList.add(xe),this.firstHandle.setAttribute("aria-orientation","horizontal"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","horizontal")):(this.sliderContainer.classList.remove(xe),this.sliderContainer.classList.add(Ee),this.firstHandle.setAttribute("aria-orientation","vertical"),"Range"===this.type&&this.secondHandle.setAttribute("aria-orientation","vertical"))},i.prototype.setAriaAttributes=function(t){var i=this,s=this.min,n=this.max;(!(0,e.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&(s=this.customValues[0],n=this.customValues[this.customValues.length-1]),"Range"!==this.type)?(0,e.attributes)(t,{"aria-valuemin":(0,e.isNullOrUndefined)(s)?"0":s.toString(),"aria-valuemax":(0,e.isNullOrUndefined)(n)?"100":n.toString()}):(!(0,e.isNullOrUndefined)(this.customValues)&&this.customValues.length>0?[[s.toString(),this.customValues[this.value[1]].toString()],[this.customValues[this.value[0]].toString(),n.toString()]]:[[s.toString(),this.value[1].toString()],[this.value[0].toString(),n.toString()]]).forEach((function(t,s){var n=0===s?i.firstHandle:i.secondHandle;n&&(0,e.attributes)(n,{"aria-valuemin":t[0],"aria-valuemax":t[1]})}))},i.prototype.createSecondHandle=function(){this.secondHandle=this.createElement("div",{attrs:{class:Zt,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.secondHandle.classList.add(le),this.element.appendChild(this.secondHandle)},i.prototype.createFirstHandle=function(){this.firstHandle=this.createElement("div",{attrs:{class:Zt,role:"slider",tabIndex:"0","aria-label":"slider"}}),this.firstHandle.classList.add(re),this.element.appendChild(this.firstHandle),this.isMaterialTooltip&&(this.materialHandle=this.createElement("div",{attrs:{class:Zt+" "+Re}}),this.element.appendChild(this.materialHandle))},i.prototype.wireFirstHandleEvt=function(t){t?(e.EventHandler.remove(this.firstHandle,"mousedown touchstart",this.handleFocus),e.EventHandler.remove(this.firstHandle,"transitionend",this.transitionEnd),e.EventHandler.remove(this.firstHandle,"mouseenter touchenter",this.handleOver),e.EventHandler.remove(this.firstHandle,"mouseleave touchend",this.handleLeave)):(e.EventHandler.add(this.firstHandle,"mousedown touchstart",this.handleFocus,this),e.EventHandler.add(this.firstHandle,"transitionend",this.transitionEnd,this),e.EventHandler.add(this.firstHandle,"mouseenter touchenter",this.handleOver,this),e.EventHandler.add(this.firstHandle,"mouseleave touchend",this.handleLeave,this))},i.prototype.wireSecondHandleEvt=function(t){t?(e.EventHandler.remove(this.secondHandle,"mousedown touchstart",this.handleFocus),e.EventHandler.remove(this.secondHandle,"transitionend",this.transitionEnd),e.EventHandler.remove(this.secondHandle,"mouseenter touchenter",this.handleOver),e.EventHandler.remove(this.secondHandle,"mouseleave touchend",this.handleLeave)):(e.EventHandler.add(this.secondHandle,"mousedown touchstart",this.handleFocus,this),e.EventHandler.add(this.secondHandle,"transitionend",this.transitionEnd,this),e.EventHandler.add(this.secondHandle,"mouseenter touchenter",this.handleOver,this),e.EventHandler.add(this.secondHandle,"mouseleave touchend",this.handleLeave,this))},i.prototype.handleStart=function(){"Range"!==this.type&&(this.firstHandle.classList[0===this.handlePos1?"add":"remove"](Se),this.isMaterialTooltip&&(this.materialHandle.classList[0===this.handlePos1?"add":"remove"](Se),this.tooltipElement&&this.tooltipElement.classList[0===this.handlePos1?"add":"remove"](ke)))},i.prototype.transitionEnd=function(t){"transform"!==t.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())},i.prototype.handleFocusOut=function(){this.firstHandle.classList.contains(Ce)&&this.firstHandle.classList.remove(Ce),"Range"===this.type&&this.secondHandle.classList.contains(Ce)&&this.secondHandle.classList.remove(Ce)},i.prototype.handleFocus=function(t){this.focusSliderElement(),this.sliderBarClick(t),t.currentTarget===this.firstHandle?(this.firstHandle.classList.add(Ce),this.firstHandle.classList.add(Pe)):(this.secondHandle.classList.add(Ce),this.secondHandle.classList.add(Pe)),e.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),e.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},i.prototype.handleOver=function(t){this.tooltip.isVisible&&"Hover"===this.tooltip.showOn&&this.tooltipToggle(t.currentTarget),"Default"===this.type&&this.tooltipToggle(this.getHandle())},i.prototype.handleLeave=function(t){!this.tooltip.isVisible||"Hover"!==this.tooltip.showOn||t.currentTarget.classList.contains(Ce)||t.currentTarget.classList.contains(Pe)||this.closeTooltip()},i.prototype.setHandler=function(){this.createFirstHandle(),"Range"===this.type&&this.createSecondHandle()},i.prototype.setEnableRTL=function(){this.enableRtl&&"Vertical"!==this.orientation?(0,e.addClass)([this.sliderContainer],Kt):(0,e.removeClass)([this.sliderContainer],Kt);var t="Vertical"!==this.orientation?this.horDir:this.verDir;this.enableRtl?(this.horDir="right",this.verDir="bottom"):(this.horDir="left",this.verDir="bottom"),t!==("Vertical"!==this.orientation?this.horDir:this.verDir)&&"Horizontal"===this.orientation&&((0,e.setStyleAttribute)(this.firstHandle,{right:"",left:"auto"}),"Range"===this.type&&(0,e.setStyleAttribute)(this.secondHandle,{top:"",left:"auto"})),this.setBarColor()},i.prototype.tooltipValue=function(){var t,i=this,s={value:this.value,text:""};this.initialTooltip&&(this.initialTooltip=!1,this.setTooltipContent(),s.text=t="function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,this.trigger("tooltipChange",s,(function(s){if(i.addTooltipClass(s.text),t!==s.text){i.customAriaText=s.text,i.enableHtmlSanitizer?s.text=e.SanitizeHtmlHelper.sanitize(s.text.toString()):s.text=s.text.toString();i.tooltipObj.content=(0,e.initializeCSPTemplate)((function(){return s.text})),i.setAriaAttrValue(i.firstHandle),"Range"===i.type&&i.setAriaAttrValue(i.secondHandle)}})),this.isMaterialTooltip&&this.setPreviousVal("change",this.value))},i.prototype.setTooltipContent=function(){var t=this.formatContent(this.tooltipFormatInfo,!1);this.tooltipObj.content=(0,e.initializeCSPTemplate)((function(){return t}))},i.prototype.formatContent=function(t,i){var s="",n=this.handleVal1,a=this.handleVal2;return!(0,e.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?(0,e.isNullOrUndefined)(this.tooltip)||(0,e.isNullOrUndefined)(this.tooltip.format)?a.toString()+" - "+n.toString():this.formatString(a,t).elementVal+" - "+this.formatString(n,t).elementVal:(0,e.isNullOrUndefined)(this.tooltip)||(0,e.isNullOrUndefined)(this.tooltip.format)?n.toString()+" - "+a.toString():this.formatString(n,t).elementVal+" - "+this.formatString(a,t).elementVal:(0,e.isNullOrUndefined)(n)||(s=(0,e.isNullOrUndefined)(this.tooltip)||(0,e.isNullOrUndefined)(this.tooltip.format)?n.toString():this.formatString(n,t).elementVal),s):("Range"===this.type?s=this.enableRtl&&"Vertical"!==this.orientation?(0,e.isNullOrUndefined)(t.format)?a.toString()+" - "+n.toString():this.formatString(a,t).formatString+" - "+this.formatString(n,t).formatString:(0,e.isNullOrUndefined)(t.format)?n.toString()+" - "+a.toString():this.formatString(n,t).formatString+" - "+this.formatString(a,t).formatString:(0,e.isNullOrUndefined)(n)||(s=(0,e.isNullOrUndefined)(t.format)?n.toString():this.formatString(n,t).formatString),s)},i.prototype.addTooltipClass=function(t){if(this.isMaterialTooltip){var e=t.toString().length;if(this.tooltipElement){i=e>4?{oldCss:Fe,newCss:Ve}:{oldCss:Ve,newCss:Fe};this.tooltipElement.classList.remove(i.oldCss),this.tooltipElement.classList.contains(i.newCss)||(this.tooltipElement.classList.add(i.newCss),this.tooltipElement.style.transform=e>4?"scale(1)":this.getTooltipTransformProperties(this.previousTooltipClass).rotate)}else{var i=e>4?Ve:Fe;this.tooltipObj.cssClass=ne+" "+i}}},i.prototype.tooltipPlacement=function(){return"Horizontal"===this.orientation?"Before"===this.tooltip.placement?"TopCenter":"BottomCenter":"Before"===this.tooltip.placement?"LeftCenter":"RightCenter"},i.prototype.tooltipBeforeOpen=function(t){this.tooltipElement=t.element,this.tooltip.cssClass&&(0,e.addClass)([this.tooltipElement],this.tooltip.cssClass.split(" ").filter((function(t){return t}))),t.target.removeAttribute("aria-describedby"),this.isMaterialTooltip&&(this.tooltipElement.firstElementChild.classList.add(Ie),this.handleStart(),this.setTooltipTransform())},i.prototype.tooltipCollision=function(t){if(this.isBootstrap||this.isBootstrap4||(this.isMaterial||this.isMaterial3)&&!this.isMaterialTooltip){var e=this.isBootstrap4?3:6;switch(t){case"TopCenter":this.tooltipObj.setProperties({offsetY:-e},!1);break;case"BottomCenter":this.tooltipObj.setProperties({offsetY:e},!1);break;case"LeftCenter":this.tooltipObj.setProperties({offsetX:-e},!1);break;case"RightCenter":this.tooltipObj.setProperties({offsetX:e},!1)}}},i.prototype.materialTooltipEventCallBack=function(t){this.sliderBarClick(t),e.EventHandler.add(document,"mousemove touchmove",this.sliderBarMove,this),e.EventHandler.add(document,"mouseup touchend",this.sliderBarUp,this)},i.prototype.wireMaterialTooltipEvent=function(t){this.isMaterialTooltip&&(t?e.EventHandler.remove(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack):e.EventHandler.add(this.tooltipElement,"mousedown touchstart",this.materialTooltipEventCallBack,this))},i.prototype.tooltipPositionCalculation=function(t){var e;switch(t){case"TopCenter":e=ue;break;case"BottomCenter":e=de;break;case"LeftCenter":e=pe;break;case"RightCenter":e=ce}return e},i.prototype.getTooltipTransformProperties=function(t){var e;if(this.tooltipElement){var i="Horizontal"===this.orientation?this.tooltipElement.clientHeight+14-this.tooltipElement.clientHeight/2:this.tooltipElement.clientWidth+14-this.tooltipElement.clientWidth/2;e="Horizontal"===this.orientation?t===ue?{rotate:"rotate(45deg)",translate:"translateY("+i+"px)"}:{rotate:"rotate(225deg)",translate:"translateY("+-i+"px)"}:t===pe?{rotate:"rotate(-45deg)",translate:"translateX("+i+"px)"}:{rotate:"rotate(-225deg)",translate:"translateX("+-i+"px)"}}return e},i.prototype.openMaterialTooltip=function(){var t=this;if(this.isMaterialTooltip){this.refreshTooltip(this.firstHandle);var e=this.tooltipElement.firstElementChild;e.classList.remove(Ie),e.classList.add(Me),this.firstHandle.style.cursor="default",this.tooltipElement.style.transition=this.scaleTransform,this.tooltipElement.classList.add(me),this.materialHandle.style.transform="scale(0)",e.innerText.length>4?this.tooltipElement.style.transform="scale(1)":this.tooltipElement.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate,"Default"===this.type?setTimeout((function(){t.tooltipElement&&(t.tooltipElement.style.transition=t.transition.handle)}),2500):setTimeout((function(){t.tooltipElement&&(t.tooltipElement.style.transition="none")}),2500)}},i.prototype.closeMaterialTooltip=function(){var t=this;if(this.isMaterialTooltip){var e=this.tooltipElement.firstElementChild;this.tooltipElement.style.transition=this.scaleTransform,e.classList.remove(Me),e.classList.add(Ie),this.firstHandle.style.cursor="-webkit-grab",this.firstHandle.style.cursor="grab",this.materialHandle&&(this.materialHandle.style.transform="scale(1)"),this.tooltipElement.classList.remove(me),this.setTooltipTransform(),this.tooltipTarget=void 0,setTimeout((function(){t.tooltipElement&&(t.tooltipElement.style.transition="none")}),2500)}},i.prototype.checkTooltipPosition=function(t){var e=this.tooltipPositionCalculation(t.collidedPosition);void 0!==this.tooltipCollidedPosition&&this.tooltipCollidedPosition===t.collidedPosition&&t.element.classList.contains(e)||(this.isMaterialTooltip&&(void 0!==e&&(t.element.classList.remove(this.previousTooltipClass),t.element.classList.add(e),this.previousTooltipClass=e),t.element.style.transform&&t.element.classList.contains(me)&&t.element.firstElementChild.innerText.length<=4&&(t.element.style.transform=this.getTooltipTransformProperties(this.previousTooltipClass).rotate)),this.tooltipCollidedPosition=t.collidedPosition),this.isMaterialTooltip&&this.tooltipElement&&-1!==this.tooltipElement.style.transform.indexOf("translate")&&this.setTooltipTransform()},i.prototype.setTooltipTransform=function(){var t=this.getTooltipTransformProperties(this.previousTooltipClass);(0,e.isNullOrUndefined)(this.tooltipElement)||(this.tooltipElement.firstElementChild.innerText.length>4?this.tooltipElement.style.transform=t.translate+" scale(0.01)":this.tooltipElement.style.transform=t.translate+" "+t.rotate+" scale(0.01)")},i.prototype.renderTooltip=function(){this.tooltipObj=new Mt.Tooltip({showTipPointer:this.isBootstrap||this.isMaterial||this.isMaterial3||this.isBootstrap4||this.isTailwind||this.isBootstrap5||this.isFluent||this.isFluent2,cssClass:ne,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()},i.prototype.initializeTooltipProps=function(){var t="Auto"===this.tooltip.showOn?"Hover":this.tooltip.showOn;this.setProperties({tooltip:{showOn:t}},!0),this.tooltipObj.position=this.tooltipPlacement(),this.tooltipCollision(this.tooltipObj.position),[this.firstHandle,this.rangeBar,this.secondHandle].forEach((function(t){(0,e.isNullOrUndefined)(t)||(t.style.transition="none")})),this.isMaterialTooltip&&(this.sliderContainer.classList.add(fe),this.tooltipValue(),this.tooltipObj.animation.close.effect="None",this.tooltipObj.open(this.firstHandle))},i.prototype.tooltipBeforeClose=function(){this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0},i.prototype.setButtons=function(){this.firstBtn=this.createElement("div",{className:$t+" "+Gt}),this.firstBtn.appendChild(this.createElement("span",{className:Le})),this.isTailwind&&this.firstBtn.querySelector("span").classList.add("e-icons"),this.firstBtn.tabIndex=-1,this.secondBtn=this.createElement("div",{className:$t+" "+Qt}),this.secondBtn.appendChild(this.createElement("span",{className:Le})),this.isTailwind&&this.secondBtn.querySelector("span").classList.add("e-icons"),this.secondBtn.tabIndex=-1,this.sliderContainer.classList.add(Ne),this.sliderContainer.appendChild(this.firstBtn),this.sliderContainer.appendChild(this.secondBtn),this.sliderContainer.appendChild(this.element),this.buttonTitle()},i.prototype.buttonTitle=function(){var t=this.enableRtl&&"Vertical"!==this.orientation;this.l10n.setLocale(this.locale);var i=this.l10n.getConstant("decrementTitle"),s=this.l10n.getConstant("incrementTitle");(0,e.attributes)(t?this.secondBtn:this.firstBtn,{"aria-label":i,title:i}),(0,e.attributes)(t?this.firstBtn:this.secondBtn,{"aria-label":s,title:s})},i.prototype.buttonFocusOut=function(){(this.isMaterial||this.isMaterial3)&&this.getHandle().classList.remove("e-large-thumb-size")},i.prototype.repeatButton=function(t){var e,i=this.handleValueUpdate(),s=this.enableRtl&&"Vertical"!==this.orientation;t.target.parentElement.classList.contains(Gt)||t.target.classList.contains(Gt)?e=s?this.add(i,parseFloat(this.step.toString()),!0):this.add(i,parseFloat(this.step.toString()),!1):(t.target.parentElement.classList.contains(Qt)||t.target.classList.contains(Qt))&&(e=s?this.add(i,parseFloat(this.step.toString()),!1):this.add(i,parseFloat(this.step.toString()),!0)),this.limits.enabled&&(e=this.getLimitCorrectedValues(e)),e>=this.min&&e<=this.max&&(this.changeHandleValue(e),this.tooltipToggle(this.getHandle()))},i.prototype.repeatHandlerMouse=function(t){t.preventDefault(),"mousedown"!==t.type&&"touchstart"!==t.type||(this.buttonClick(t),this.repeatInterval=setInterval(this.repeatButton.bind(this),180,t))},i.prototype.materialChange=function(){this.getHandle().classList.contains("e-large-thumb-size")||this.getHandle().classList.add("e-large-thumb-size")},i.prototype.focusHandle=function(){this.getHandle().classList.contains(Pe)||this.getHandle().classList.add(Pe)},i.prototype.repeatHandlerUp=function(t){this.changeEvent("changed",t),this.closeTooltip(),clearInterval(this.repeatInterval),this.getHandle().focus()},i.prototype.customTickCounter=function(t){var i=4;return!(0,e.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&(t>4&&(i=3),t>7&&(i=2),t>14&&(i=1),t>28&&(i=0)),i},i.prototype.renderScale=function(){var t="Vertical"===this.orientation?"v":"h";this.noOfDecimals=this.numberOfDecimals(this.step),this.ul=this.createElement("ul",{className:te+" e-"+t+"-scale "+ee+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation",tabIndex:"-1","aria-hidden":"true"}}),this.ul.style.zIndex="-1",e.Browser.isAndroid&&"h"===t&&this.ul.classList.add(we);var i=this.ticks.smallStep;this.ticks.showSmallTicks?i<=0&&(i=parseFloat((0,e.formatUnit)(this.step))):i=this.ticks.largeStep>0?this.ticks.largeStep:parseFloat((0,e.formatUnit)(this.max))-parseFloat((0,e.formatUnit)(this.min));var s,n=this.fractionalToInteger(this.min),a=this.fractionalToInteger(this.max),r=this.fractionalToInteger(i),l=!(0,e.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&this.customValues.length-1,o=this.customTickCounter(l),h=!(0,e.isNullOrUndefined)(this.customValues)&&this.customValues.length>0?l*o+l:Math.abs((a-n)/r);this.element.appendChild(this.ul);var u=parseFloat(this.min.toString());"v"===t&&(u=parseFloat(this.max.toString()));var d,p=0,c=100/h;c===1/0&&(c=5);for(var m=0,v=!(0,e.isNullOrUndefined)(this.customValues)&&this.customValues.length>0?this.customValues.length-1:0,f=0;m<=h;m++){if(s=this.createElement("li",{attrs:{class:ee,role:"presentation",tabIndex:"-1","aria-hidden":"true"}}),!(0,e.isNullOrUndefined)(this.customValues)&&this.customValues.length>0)(d=m%(o+1)==0)&&("h"===t?(u=this.customValues[f],f++):(u=this.customValues[v],v--),s.setAttribute("title",u.toString()));else if(s.setAttribute("title",u.toString()),0===this.numberOfDecimals(this.max)&&0===this.numberOfDecimals(this.min)&&0===this.numberOfDecimals(this.step))d="h"===t?(u-parseFloat(this.min.toString()))%this.ticks.largeStep==0:Math.abs(u-parseFloat(this.max.toString()))%this.ticks.largeStep==0;else{var g=this.fractionalToInteger(this.ticks.largeStep),y=this.fractionalToInteger(u);d="h"===t?(y-n)%g==0:Math.abs(y-parseFloat(a.toString()))%g==0}d&&s.classList.add(ie),"h"===t?s.style.width=c+"%":s.style.height=c+"%";var b=d?"Both"===this.ticks.placement?2:1:0;if(d)for(var C=0;C<b;C++)this.createTick(s,u,c);else(0,e.isNullOrUndefined)(this.customValues)&&this.formatTicksValue(s,u);this.ul.appendChild(s),this.tickElementCollection.push(s);var E=void 0;(0,e.isNullOrUndefined)(this.customValues)&&(E=this.numberOfDecimals(i)>this.numberOfDecimals(u)?this.numberOfDecimals(i):this.numberOfDecimals(u),u="h"===t||this.min>this.max?this.makeRoundNumber(u+i,E):this.makeRoundNumber(u-i,E),p=this.makeRoundNumber(p+i,E))}this.ticksAlignment(t,c)},i.prototype.ticksAlignment=function(t,e,i){void 0===i&&(i=!0),this.firstChild=this.ul.firstElementChild,this.lastChild=this.ul.lastElementChild,this.firstChild.classList.add(Te),this.lastChild.classList.add(He),this.sliderContainer.classList.add(te+"-"+this.ticks.placement.toLowerCase()),"h"===t?(this.firstChild.style.width=e/2+"%",this.lastChild.style.width=e/2+"%"):(this.firstChild.style.height=e/2+"%",this.lastChild.style.height=e/2+"%");var s={ticksWrapper:this.ul,tickElements:this.tickElementCollection};i&&this.trigger("renderedTicks",s),this.scaleAlignment()},i.prototype.createTick=function(t,i,s){var n=this.createElement("span",{className:se+" "+ee+"-"+this.ticks.placement.toLowerCase(),attrs:{role:"presentation",tabIndex:"-1","aria-hidden":"true"}});t.appendChild(n),(0,e.isNullOrUndefined)(this.customValues)?this.formatTicksValue(t,i,n):this.enableHtmlSanitizer?n.innerHTML=e.SanitizeHtmlHelper.sanitize(i.toString()):n.innerHTML=i.toString()},i.prototype.formatTicksValue=function(t,i,s){var n=this,a=this.formatNumber(i),r={value:i,text:(0,e.isNullOrUndefined)(this.ticks)||(0,e.isNullOrUndefined)(this.ticks.format)?a:this.formatString(i,this.ticksFormatInfo).formatString,tickElement:t};this.trigger("renderingTicks",r,(function(i){t.setAttribute("title",i.text.toString()),s&&(n.enableHtmlSanitizer?s.innerHTML=e.SanitizeHtmlHelper.sanitize(i.text.toString()):s.innerHTML=i.text.toString())}))},i.prototype.scaleAlignment=function(){this.tickValuePosition(),"Vertical"===this.orientation?this.element.getBoundingClientRect().width<=15?this.sliderContainer.classList.add(Oe):this.sliderContainer.classList.remove(Oe):this.element.getBoundingClientRect().height<=15?this.sliderContainer.classList.add(Oe):this.sliderContainer.classList.remove(Oe)},i.prototype.tickValuePosition=function(){this.firstChild=this.element.querySelector("ul").children[0];var t,i,s=this.firstChild.getBoundingClientRect(),n=this.ticks.smallStep,a=Math.abs(parseFloat((0,e.formatUnit)(this.max))-parseFloat((0,e.formatUnit)(this.min)))/n;this.firstChild.children.length>0&&(t=this.firstChild.children[0].getBoundingClientRect());var r,l=[this.sliderContainer.querySelectorAll("."+ee+"."+ie+" ."+se)];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=-t.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=-t.width/2+"px";for(h=0;h<r.length;h++)i=r[h].getBoundingClientRect(),"Vertical"===this.orientation?(0,e.setStyleAttribute)(r[h],{top:(o-i.height)/2+"px"}):(0,e.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(He),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(He),this.firstChild.style.left=this.firstHandle.style.left)),"Vertical"===this.orientation&&this.firstChild.classList.remove(He))},i.prototype.setAriaAttrValue=function(t){var i,s=!(0,e.isNullOrUndefined)(this.ticks)&&!(0,e.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(t),"Range"!==this.type?(0,e.attributes)(t,{"aria-valuenow":a,"aria-valuetext":n}):this.enableRtl?t===this.firstHandle?(0,e.attributes)(t,{"aria-valuenow":a.split(" - ")[1],"aria-valuetext":i[1]}):(0,e.attributes)(t,{"aria-valuenow":a.split(" - ")[0],"aria-valuetext":i[0]}):t===this.firstHandle?(0,e.attributes)(t,{"aria-valuenow":a.split(" - ")[0],"aria-valuetext":i[0]}):(0,e.attributes)(t,{"aria-valuenow":a.split(" - ")[1],"aria-valuetext":i[1]})},i.prototype.handleValueUpdate=function(){return"Range"===this.type?1===this.activeHandle?this.handleVal1:this.handleVal2:this.handleVal1},i.prototype.getLimitCorrectedValues=function(t){return t="MinRange"===this.type||"Default"===this.type||1===this.activeHandle?this.getLimitValueAndPosition(t,this.limits.minStart,this.limits.minEnd)[0]:this.getLimitValueAndPosition(t,this.limits.maxStart,this.limits.maxEnd)[0]},i.prototype.focusSliderElement=function(){this.isElementFocused||(this.element.focus(),this.isElementFocused=!0)},i.prototype.buttonClick=function(t){var i;this.focusSliderElement();var s=this.enableRtl&&"Vertical"!==this.orientation,n=this.handleValueUpdate();40===t.keyCode||37===t.keyCode||t.currentTarget.classList.contains(Gt)?i=s?this.add(n,parseFloat(this.step.toString()),!0):this.add(n,parseFloat(this.step.toString()),!1):38===t.keyCode||39===t.keyCode||t.currentTarget.classList.contains(Qt)?i=s?this.add(n,parseFloat(this.step.toString()),!1):this.add(n,parseFloat(this.step.toString()),!0):33===t.keyCode||t.currentTarget.classList.contains(Gt)?i=s?this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):34===t.keyCode||t.currentTarget.classList.contains(Qt)?i=s?this.add(n,parseFloat(this.ticks.largeStep.toString()),!0):this.add(n,parseFloat(this.ticks.largeStep.toString()),!1):36===t.keyCode?i=parseFloat(this.min<this.max?this.min.toString():this.max.toString()):35===t.keyCode&&(i=parseFloat(this.min<this.max?this.max.toString():this.min.toString())),this.limits.enabled&&(i=this.getLimitCorrectedValues(i)),this.changeHandleValue(i),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Pe)||this.materialChange(),this.tooltipToggle(this.getHandle()),this.getHandle().focus(),this.focusHandle(),t.currentTarget.classList.contains(Gt)&&e.EventHandler.add(this.firstBtn,"mouseup touchend",this.buttonUp,this),t.currentTarget.classList.contains(Qt)&&e.EventHandler.add(this.secondBtn,"mouseup touchend",this.buttonUp,this)},i.prototype.tooltipToggle=function(t){this.isMaterialTooltip?this.tooltipElement.classList.contains(me)?this.refreshTooltip(this.firstHandle):this.openMaterialTooltip():this.tooltipElement?this.refreshTooltip(t):this.openTooltip(t)},i.prototype.buttonUp=function(t){t.currentTarget.classList.contains(Gt)&&e.EventHandler.remove(this.firstBtn,"mouseup touchend",this.buttonUp),t.currentTarget.classList.contains(Qt)&&e.EventHandler.remove(this.secondBtn,"mouseup touchend",this.buttonUp)},i.prototype.setRangeBar=function(){"Horizontal"!==this.orientation||(0,e.isNullOrUndefined)(this.rangeBar)?(0,e.isNullOrUndefined)(this.rangeBar)||("MinRange"===this.type?(this.rangeBar.style.bottom=this.min>this.max?this.handlePos1+"px":"0px",(0,e.setStyleAttribute)(this.rangeBar,{height:(0,e.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",(0,e.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",(0,e.setStyleAttribute)(this.rangeBar,{width:(0,e.isNullOrUndefined)(this.handlePos1)?0:this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right=this.handlePos1+"px":this.rangeBar.style.left=this.handlePos1+"px",(0,e.setStyleAttribute)(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"}))},i.prototype.checkValidValueAndPos=function(t){return t=this.checkHandleValue(t),t=this.checkHandlePosition(t)},i.prototype.setLimitBarPositions=function(t,e,i,s){"Horizontal"===this.orientation?this.enableRtl?(this.limitBarFirst.style.right=t+"px",this.limitBarFirst.style.width=e-t+"px"):(this.limitBarFirst.style.left=t+"px",this.limitBarFirst.style.width=e-t+"px"):(this.limitBarFirst.style.bottom=(this.min<this.max?t:e)+"px",this.limitBarFirst.style.height=(this.min<this.max?e-t:t-e)+"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"))},i.prototype.setLimitBar=function(){if("Default"===this.type||"MinRange"===this.type){var t=this.getLimitValueAndPosition(this.limits.minStart,this.limits.minStart,this.limits.minEnd,!0)[0];t=this.checkValidValueAndPos(t);var e=this.getLimitValueAndPosition(this.limits.minEnd,this.limits.minStart,this.limits.minEnd,!0)[0];e=this.checkValidValueAndPos(e),this.setLimitBarPositions(t,e)}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)}},i.prototype.getLimitValueAndPosition=function(t,i,s,n){return(0,e.isNullOrUndefined)(i)&&(i=this.min<this.max?this.min:this.max,(0,e.isNullOrUndefined)(t)&&n&&(t=i)),(0,e.isNullOrUndefined)(s)&&(s=this.min<this.max?this.max:this.min,(0,e.isNullOrUndefined)(t)&&n&&(t=s)),t<i&&(t=i),t>s&&(t=s),[t,this.checkHandlePosition(t)]},i.prototype.setValue=function(){if(!(0,e.isNullOrUndefined)(this.customValues)&&this.customValues.length>0&&(this.min=0,this.max=this.customValues.length-1,this.setBarColor()),this.setAriaAttributes(this.firstHandle),this.handleVal1=(0,e.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,(0,e.isNullOrUndefined)(this.activeHandle)&&(this.activeHandle="Range"===this.type?2:1),"Default"===this.type||"MinRange"===this.type){if(this.limits.enabled){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.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()},i.prototype.rangeValueUpdate=function(){null!==this.value&&"object"==typeof this.value||(this.value=[parseFloat((0,e.formatUnit)(this.min)),parseFloat((0,e.formatUnit)(this.max))])},i.prototype.validateRangeValue=function(){this.rangeValueUpdate(),this.setRangeValue()},i.prototype.modifyZindex=function(){"Range"!==this.type||(0,e.isNullOrUndefined)(this.firstHandle)||(0,e.isNullOrUndefined)(this.secondHandle)?this.isMaterialTooltip&&this.tooltipElement&&(this.tooltipElement.style.zIndex=(0,Mt.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+"")},i.prototype.setHandlePosition=function(t){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(t){(0,e.isNullOrUndefined)(t)||("Horizontal"===s.orientation?s.enableRtl?t.style.right=n+"px":t.style.left=n+"px":t.style.bottom=n+"px")})),this.changeEvent("change",t)},i.prototype.getHandle=function(){return 1===this.activeHandle?this.firstHandle:this.secondHandle},i.prototype.setRangeValue=function(){this.updateRangeValue(),this.activeHandle=1,this.setHandlePosition(null),this.activeHandle=2,this.setHandlePosition(null),this.activeHandle=1},i.prototype.changeEvent=function(t,e){var i="change"===t?this.previousVal:this.previousChanged;if("Range"!==this.type)this.setProperties({value:this.handleVal1},!0),i===this.value||this.isMaterialTooltip&&this.initialTooltip||(this.trigger(t,this.changeEventArgs(t,e)),this.initialTooltip=!0,this.setPreviousVal(t,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(t,this.changeEventArgs(t,e)),this.initialTooltip=!0,this.setPreviousVal(t,this.value)),this.setAriaAttrValue(this.getHandle())}this.hiddenInput.value=this.value.toString()},i.prototype.changeEventArgs=function(t,i){var s;return this.tooltip.isVisible&&this.tooltipObj&&this.initialTooltip?(this.tooltipValue(),s={value:this.value,previousValue:"change"===t?this.previousVal:this.previousChanged,action:t,text:"function"==typeof this.tooltipObj.content?this.tooltipObj.content():this.tooltipObj.content,isInteracted:!(0,e.isNullOrUndefined)(i)}):s={value:this.value,previousValue:"change"===t?this.previousVal:this.previousChanged,action:t,text:(0,e.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:!(0,e.isNullOrUndefined)(i)},s},i.prototype.setPreviousVal=function(t,e){"change"===t?this.previousVal=e:this.previousChanged=e},i.prototype.updateRangeValue=function(){var t=this.value.toString().split(",").map(Number);if(this.enableRtl&&"Vertical"!==this.orientation||this.rtl?this.value=[t[1],t[0]]:this.value=[t[0],t[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 e=this.getLimitValueAndPosition(this.handleVal1,this.limits.minStart,this.limits.minEnd);this.handleVal1=e[0],this.handlePos1=e[1],this.preHandlePos1=this.handlePos1,this.activeHandle=2,e=this.getLimitValueAndPosition(this.handleVal2,this.limits.maxStart,this.limits.maxEnd),this.handleVal2=e[0],this.handlePos2=e[1],this.preHandlePos2=this.handlePos2}},i.prototype.checkHandlePosition=function(t){var i;return t=100*(t-parseFloat((0,e.formatUnit)(this.min)))/(parseFloat((0,e.formatUnit)(this.max))-parseFloat((0,e.formatUnit)(this.min))),i="Horizontal"===this.orientation?this.element.getBoundingClientRect().width*(t/100):this.element.getBoundingClientRect().height*(t/100),parseFloat((0,e.formatUnit)(this.max))===parseFloat((0,e.formatUnit)(this.min))&&(i="Horizontal"===this.orientation?this.element.getBoundingClientRect().width:this.element.getBoundingClientRect().height),i},i.prototype.checkHandleValue=function(t){if(this.min===this.max)return parseFloat((0,e.formatUnit)(this.max));var i=this.tempStartEnd();return t<i.start?t=i.start:t>i.end&&(t=i.end),t},i.prototype.reposition=function(){var t=this;(0,e.isNullOrUndefined)(this.firstHandle)||(this.firstHandle.style.transition="none"),"Default"===this.type||(0,e.isNullOrUndefined)(this.rangeBar)||(this.rangeBar.style.transition="none"),"Range"!==this.type||(0,e.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&&!(0,e.isNullOrUndefined)(this.materialHandle)&&(this.enableRtl?this.materialHandle.style.right=this.handlePos1+"px":this.materialHandle.style.left=this.handlePos1+"px"),"MinRange"!==this.type||(0,e.isNullOrUndefined)(this.rangeBar)?"Range"!==this.type||(0,e.isNullOrUndefined)(this.secondHandle)||(0,e.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"),(0,e.setStyleAttribute)(this.rangeBar,{width:this.handlePos2-this.handlePos1+"px"})):(this.enableRtl?this.rangeBar.style.right="0px":this.rangeBar.style.left="0px",(0,e.setStyleAttribute)(this.rangeBar,{width:(0,e.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",(0,e.setStyleAttribute)(this.rangeBar,{height:(0,e.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",(0,e.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(){(0,e.isNullOrUndefined)(t.firstHandle)||(t.firstHandle.style.transition=t.scaleTransform),"Range"!==t.type||(0,e.isNullOrUndefined)(t.secondHandle)||(t.secondHandle.style.transition=t.scaleTransform)})),this.refreshTooltip(this.tooltipTarget),this.setBarColor()},i.prototype.changeHandleValue=function(t){var e=null;1===this.activeHandle?(this.limits.enabled&&this.limits.startHandleFixed||(this.handleVal1=this.checkHandleValue(t),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&&(e=this.preHandlePos1=this.handlePos1)),this.modifyZindex()):(this.limits.enabled&&this.limits.endHandleFixed||(this.handleVal2=this.checkHandleValue(t),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&&(e=this.preHandlePos2=this.handlePos2)),this.modifyZindex()),null!==e&&("Default"!==this.type&&this.setRangeBar(),this.setHandlePosition(null))},i.prototype.tempStartEnd=function(){return this.min>this.max?{start:this.max,end:this.min}:{start:this.min,end:this.max}},i.prototype.xyToPosition=function(t){if(this.min===this.max)return 100;if("Horizontal"===this.orientation){var e=t.x-this.element.getBoundingClientRect().left,i=this.element.offsetWidth/100;this.val=e/i}else{var s=t.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)},i.prototype.stepValueCalculation=function(t){0===this.step&&(this.step=1);var i=parseFloat((0,e.formatUnit)(this.step))/((parseFloat((0,e.formatUnit)(this.max))-parseFloat((0,e.formatUnit)(this.min)))/100),s=t%Math.abs(i);return 0!==s&&(i/2>s?t-=s:t+=Math.abs(i)-s),t},i.prototype.add=function(t,e,i){var s=Math.pow(10,3);return i?(Math.round(t*s)+Math.round(e*s))/s:(Math.round(t*s)-Math.round(e*s))/s},i.prototype.positionToValue=function(t){var i,s=parseFloat((0,e.formatUnit)(this.max))-parseFloat((0,e.formatUnit)(this.min));return i="Horizontal"===this.orientation?t/this.element.getBoundingClientRect().width*s:t/this.element.getBoundingClientRect().height*s,this.add(i,parseFloat(this.min.toString()),!0)},i.prototype.sliderBarClick=function(t){var e;t.preventDefault(),"mousedown"===t.type||"mouseup"===t.type||"click"===t.type?e={x:t.clientX,y:t.clientY}:"touchend"!==t.type&&"touchstart"!==t.type||(e={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY});var i=this.xyToPosition(e),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)){if(this.activeHandle=2,!this.limits.enabled||!this.limits.endHandleFixed){if(this.limits.enabled)s=(n=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd))[0],i=n[1];this.secondHandle.classList.add(Ue),this.handlePos2=this.preHandlePos2=i,this.handleVal2=s}this.modifyZindex(),this.secondHandle.focus()}else{if(this.activeHandle=1,!this.limits.enabled||!this.limits.startHandleFixed){var n;if(this.limits.enabled)s=(n=this.getLimitValueAndPosition(s,this.limits.minStart,this.limits.minEnd))[0],i=n[1];this.firstHandle.classList.add(Ue),this.handlePos1=this.preHandlePos1=i,this.handleVal1=s}this.modifyZindex(),this.firstHandle.focus()}this.isMaterialTooltip&&this.tooltipElement.classList.add(ve);var a=this.element.querySelector("."+Pe);a&&this.getHandle()!==a&&a.classList.remove(Pe);var r,l=1===this.activeHandle?this.firstHandle:this.secondHandle;if(("click"===t.type||"mousedown"===t.type)&&t.target===l){var o=t.clientX,h=t.clientY;r=document.elementFromPoint(o,h)}if(t.target===l&&r!==l)return!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Pe)||this.materialChange(),this.sliderBarUp(t),void this.tooltipToggle(this.getHandle());if(this.checkRepeatedValue(s)){var u=(this.isMaterial||this.isMaterial3)&&this.tooltip.isVisible?this.transitionOnMaterialTooltip:this.transition;this.getHandle().style.transition=u.handle,"Default"!==this.type&&(this.rangeBar.style.transition=u.rangeBar),this.setHandlePosition(t),this.isMaterialTooltip&&(this.initialTooltip=!1),t.target!==l&&this.changeEvent("changed",t),"Default"!==this.type&&this.setRangeBar()}},i.prototype.handleValueAdjust=function(t,e,i){1===i?(this.handleVal1=e,this.handleVal2=this.handleVal1+this.minDiff):2===i&&(this.handleVal2=e,this.handleVal1=this.handleVal2-this.minDiff),this.handlePos1=this.checkHandlePosition(this.handleVal1),this.handlePos2=this.checkHandlePosition(this.handleVal2)},i.prototype.dragRangeBarMove=function(t){var e,i,s,n,a;if("touchmove"!==t.type&&t.preventDefault(),this.rangeBarDragged=!0,this.rangeBar.style.transition="none",this.firstHandle.style.transition="none",this.secondHandle.style.transition="none","mousemove"===t.type?(n=(e=[t.clientX,t.clientY])[0],a=e[1]):(n=(i=[t.changedTouches[0].clientX,t.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(t),this.activeHandle=2,this.setHandlePosition(t),this.tooltipToggle(this.rangeBar),this.setRangeBar()},i.prototype.sliderBarUp=function(t){this.changeEvent("changed",t),this.handleFocusOut(),this.firstHandle.classList.remove(Ue),"Range"===this.type&&(this.initialTooltip=!1,this.secondHandle.classList.remove(Ue)),this.closeTooltip(),(this.isMaterial||this.isMaterial3)&&(this.getHandle().classList.remove("e-large-thumb-size"),this.isMaterialTooltip&&this.tooltipElement.classList.remove(ve)),e.EventHandler.remove(document,"mousemove touchmove",this.sliderBarMove),e.EventHandler.remove(document,"mouseup touchend",this.sliderBarUp)},i.prototype.sliderBarMove=function(t){var e;"touchmove"!==t.type&&t.preventDefault(),e="mousemove"===t.type?{x:t.clientX,y:t.clientY}:{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY};var i=this.xyToPosition(e),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(Ue)}if("Range"===this.type)if(1===this.activeHandle){if(this.firstHandle.classList.add(Ue),!(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))){if(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(Ue),!(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)))){var a;if(this.limits.enabled)s=(a=this.getLimitValueAndPosition(s,this.limits.maxStart,this.limits.maxEnd))[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(t),!this.isMaterial&&!this.isMaterial3||this.tooltip.isVisible||this.getHandle().classList.contains(Pe)||this.materialChange(),this.tooltipToggle(this.getHandle()),"Default"!==this.type&&this.setRangeBar())},i.prototype.dragRangeBarUp=function(t){this.rangeBarDragged?this.isDragComplete=!0:(this.focusSliderElement(),this.sliderBarClick(t)),this.changeEvent("changed",t),this.closeTooltip(),e.EventHandler.remove(document,"mousemove touchmove",this.dragRangeBarMove),e.EventHandler.remove(document,"mouseup touchend",this.dragRangeBarUp),this.rangeBarDragged=!1},i.prototype.checkRepeatedValue=function(t){if("Range"===this.type){if(t===(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(t===this.previousVal)return 0;return 1},i.prototype.refreshTooltip=function(t){this.tooltip.isVisible&&this.tooltipObj&&(this.tooltipValue(),t&&(this.tooltipObj.refresh(t),this.tooltipTarget=t))},i.prototype.openTooltip=function(t){this.tooltip.isVisible&&this.tooltipObj&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.open(t),this.tooltipTarget=t)},i.prototype.closeTooltip=function(){this.tooltip.isVisible&&this.tooltipObj&&"Always"!==this.tooltip.showOn&&!this.isMaterialTooltip&&(this.tooltipValue(),this.tooltipObj.close(),this.tooltipTarget=void 0)},i.prototype.keyDown=function(t){switch(t.keyCode){case 37:case 38:case 39:case 40:case 33:case 34:case 36:case 35:t.preventDefault(),this.buttonClick(t)}},i.prototype.wireButtonEvt=function(t){t?(e.EventHandler.remove(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut),e.EventHandler.remove(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut),e.EventHandler.remove(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse),e.EventHandler.remove(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),e.EventHandler.remove(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse),e.EventHandler.remove(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp),e.EventHandler.remove(this.firstBtn,"focusout",this.sliderFocusOut),e.EventHandler.remove(this.secondBtn,"focusout",this.sliderFocusOut)):(e.EventHandler.add(this.firstBtn,"mouseleave touchleave",this.buttonFocusOut,this),e.EventHandler.add(this.secondBtn,"mouseleave touchleave",this.buttonFocusOut,this),e.EventHandler.add(this.firstBtn,"mousedown touchstart",this.repeatHandlerMouse,this),e.EventHandler.add(this.firstBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),e.EventHandler.add(this.secondBtn,"mousedown touchstart",this.repeatHandlerMouse,this),e.EventHandler.add(this.secondBtn,"mouseup mouseleave touchup touchend",this.repeatHandlerUp,this),e.EventHandler.add(this.firstBtn,"focusout",this.sliderFocusOut,this),e.EventHandler.add(this.secondBtn,"focusout",this.sliderFocusOut,this))},i.prototype.rangeBarMousedown=function(t){var i,s;if(t.preventDefault(),this.focusSliderElement(),"Range"===this.type&&this.drag&&t.target===this.rangeBar){var n=void 0,a=void 0;"mousedown"===t.type?(n=(i=[t.clientX,t.clientY])[0],a=i[1]):"touchstart"===t.type&&(n=(s=[t.changedTouches[0].clientX,t.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("."+Pe);r&&r.classList.remove(Pe),e.EventHandler.add(document,"mousemove touchmove",this.dragRangeBarMove,this),e.EventHandler.add(document,"mouseup touchend",this.dragRangeBarUp,this)}},i.prototype.elementClick=function(t){this.isDragComplete?this.isDragComplete=!1:(t.preventDefault(),this.focusSliderElement(),this.sliderBarClick(t),this.focusHandle())},i.prototype.wireEvents=function(){this.onresize=this.reposition.bind(this),window.addEventListener("resize",this.onresize),this.enabled&&!this.readonly&&(e.EventHandler.add(this.element,"click",this.elementClick,this),"Range"===this.type&&this.drag&&e.EventHandler.add(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown,this),e.EventHandler.add(this.sliderContainer,"keydown",this.keyDown,this),e.EventHandler.add(this.sliderContainer,"keyup",this.keyUp,this),e.EventHandler.add(this.element,"focusout",this.sliderFocusOut,this),e.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&&e.EventHandler.add(this.formElement,"reset",this.formResetHandler,this))},i.prototype.unwireEvents=function(){e.EventHandler.remove(this.element,"click",this.elementClick),"Range"===this.type&&this.drag&&e.EventHandler.remove(this.rangeBar,"mousedown touchstart",this.rangeBarMousedown),e.EventHandler.remove(this.sliderContainer,"keydown",this.keyDown),e.EventHandler.remove(this.sliderContainer,"keyup",this.keyUp),e.EventHandler.remove(this.element,"focusout",this.sliderFocusOut),e.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),e.EventHandler.remove(this.element,"reset",this.formResetHandler)},i.prototype.formResetHandler=function(){this.setProperties({value:this.formResetValue},!0),this.setValue()},i.prototype.keyUp=function(t){if(9===t.keyCode&&t.target.classList.contains(Zt)&&(this.focusSliderElement(),!t.target.classList.contains(Pe))){this.element.querySelector("."+Pe)&&this.element.querySelector("."+Pe).classList.remove(Pe),t.target.classList.add(Pe);var e=t.target.parentElement;if(e===this.element&&(e.querySelector("."+ge).classList.add(Ae),"Range"!==this.type&&"MinRange"!==this.type||e.querySelector("."+Jt).classList.add(Be)),"Range"===this.type){var i=t.target.previousSibling;i&&i.classList.contains(Zt)?this.activeHandle=2:this.activeHandle=1}this.getHandle().focus(),this.tooltipToggle(this.getHandle())}this.closeTooltip(),this.changeEvent("changed",t)},i.prototype.hover=function(t){if(!(0,e.isNullOrUndefined)(t))if("mouseover"===t.type||"touchmove"===t.type||"mousemove"===t.type||"pointermove"===t.type||"touchstart"===t.type)this.sliderContainer.classList.add(ae);else{this.sliderContainer.classList.remove(ae);var i=t.currentTarget;this.tooltip.isVisible&&"Always"!==this.tooltip.showOn&&this.tooltipObj&&this.isMaterialTooltip&&!i.classList.contains(Ce)&&!i.classList.contains(Pe)&&this.closeMaterialTooltip()}},i.prototype.sliderFocusOut=function(t){t.relatedTarget!==this.secondHandle&&t.relatedTarget!==this.firstHandle&&t.relatedTarget!==this.element&&t.relatedTarget!==this.firstBtn&&t.relatedTarget!==this.secondBtn&&(this.closeMaterialTooltip(),this.closeTooltip(),this.element.querySelector("."+Pe)&&this.element.querySelector("."+Pe).classList.remove(Pe),this.element.querySelector("."+Ae)&&(this.element.querySelector("."+Ae).classList.remove(Ae),"Range"!==this.type&&"MinRange"!==this.type||!this.element.querySelector("."+Be)||this.element.querySelector("."+Be).classList.remove(Be)),this.hiddenInput.focus(),this.hiddenInput.blur(),this.isElementFocused=!1)},i.prototype.removeElement=function(t){t.parentNode&&t.parentNode.removeChild(t)},i.prototype.changeSliderType=function(t,i){this.isMaterialTooltip&&this.materialHandle&&(this.sliderContainer.classList.remove(fe),this.removeElement(this.materialHandle),this.materialHandle=void 0),this.removeElement(this.firstHandle),this.firstHandle=void 0,"Default"!==t&&("Range"===t&&(this.removeElement(this.secondHandle),this.secondHandle=void 0),this.removeElement(this.rangeBar),this.rangeBar=void 0),this.tooltip.isVisible&&!(0,e.isNullOrUndefined)(this.tooltipObj)&&(this.tooltipObj.destroy(),this.tooltipElement=void 0,this.tooltipCollidedPosition=void 0),this.limits.enabled&&("MinRange"===t||"Default"===t?(0,e.isNullOrUndefined)(this.limitBarFirst)||(this.removeElement(this.limitBarFirst),this.limitBarFirst=void 0):(0,e.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(!1),"Range"===this.type&&this.wireSecondHandleEvt(!1),this.setValue(),this.tooltip.isVisible&&(this.renderTooltip(),this.wireMaterialTooltipEvent(!1)),this.setBarColor(),"tooltip"!==i&&this.updateConfig(),this.readonly&&(this.sliderContainer.classList.remove(De),this.setReadOnly())},i.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 t=this.enableRtl&&"Vertical"!==this.orientation;(0,e.attributes)(t?this.secondBtn:this.firstBtn,{"aria-label":"Decrease",title:"Decrease"}),(0,e.attributes)(t?this.firstBtn:this.secondBtn,{"aria-label":"Increase",title:"Increase"})}},i.prototype.changeOrientation=function(){this.changeSliderType(this.type,"null")},i.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()},i.prototype.limitsPropertyChange=function(){this.limits.enabled?((0,e.isNullOrUndefined)(this.limitBarFirst)&&"Range"!==this.type&&this.createLimitBar(),(0,e.isNullOrUndefined)(this.limitBarFirst)&&(0,e.isNullOrUndefined)(this.limitBarSecond)&&"Range"===this.type&&this.createLimitBar(),this.setLimitBar(),this.setValue()):((0,e.isNullOrUndefined)(this.limitBarFirst)||(0,e.detach)(this.limitBarFirst),(0,e.isNullOrUndefined)(this.limitBarSecond)||(0,e.detach)(this.limitBarSecond))},i.prototype.getPersistData=function(){return this.addOnPersist(["value"])},i.prototype.destroy=function(){t.prototype.destroy.call(this),this.unwireEvents(),window.removeEventListener("resize",this.onresize),(0,e.removeClass)([this.sliderContainer],[oe]),this.firstHandle.removeAttribute("aria-orientation"),"Range"===this.type&&this.secondHandle.removeAttribute("aria-orientation"),this.sliderContainer.parentNode&&this.sliderContainer.parentNode.insertBefore(this.element,this.sliderContainer),(0,e.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},i.prototype.onPropertyChanged=function(t,i){for(var s=this,n=0,a=Object.keys(t);n<a.length;n++){var r=a[n];switch(r){case"cssClass":this.setCSSClass(i.cssClass);break;case"value":if(t&&i){var l=(0,e.isNullOrUndefined)(t.value)?"Range"===this.type?[this.min,this.max]:this.min:t.value;this.setProperties({value:l},!0),(0,e.isNullOrUndefined)(i.value)||i.value.toString()===l.toString()||(this.setValue(),this.refreshTooltip(this.tooltipTarget),"Range"===this.type&&((0,e.isNullOrUndefined)(t.value)||i.value[1]===l[1]?this.activeHandle=1:this.activeHandle=2))}break;case"min":case"step":case"max":this.setMinMaxValue();break;case"tooltip":(0,e.isNullOrUndefined)(t.tooltip)||(0,e.isNullOrUndefined)(i.tooltip)||(this.initialTooltip=!0,this.setTooltip(r),this.showButtons||this.wireEvents());break;case"type":(0,e.isNullOrUndefined)(i)||!Object.keys(i).length||(0,e.isNullOrUndefined)(i.type)||(this.changeSliderType(i.type,r),this.setZindex());break;case"enableRtl":i.enableRtl!==t.enableRtl&&"Vertical"!==this.orientation&&(this.rtl=i.enableRtl,this.changeRtl());break;case"limits":this.limitsPropertyChange();break;case"orientation":this.changeOrientation();break;case"ticks":(0,e.isNullOrUndefined)(this.sliderContainer.querySelector("."+te))||((0,e.detach)(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,(function(t){t.match(/e-scale-/)&&s.sliderContainer.classList.remove(t)}))),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex());break;case"locale":this.showButtons&&this.buttonTitle();break;case"showButtons":t.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(Ne),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(t.width),this.setMinMaxValue(),this.limits&&this.limitsPropertyChange()}}},i.prototype.setReadOnly=function(){this.readonly?(this.unwireEvents(),this.sliderContainer.classList.add(De)):(this.wireEvents(),this.sliderContainer.classList.remove(De))},i.prototype.setMinMaxValue=function(){var t=this;this.setValue(),this.refreshTooltip(this.tooltipTarget),(0,e.isNullOrUndefined)(this.sliderContainer.querySelector("."+te))||this.ul&&((0,e.detach)(this.ul),Array.prototype.forEach.call(this.sliderContainer.classList,(function(e){e.match(/e-scale-/)&&t.sliderContainer.classList.remove(e)}))),"None"!==this.ticks.placement&&(this.renderScale(),this.setZindex())},i.prototype.setZindex=function(){this.zIndex=6,(0,e.isNullOrUndefined)(this.ticks)||"None"===this.ticks.placement||(0,e.isNullOrUndefined)(this.ul)||(0,e.isNullOrUndefined)(this.element)||(this.ul.style.zIndex=this.zIndex+-7+"",this.element.style.zIndex=this.zIndex+2+""),this.isMaterial||this.isMaterial3||(0,e.isNullOrUndefined)(this.ticks)||"Both"!==this.ticks.placement||(this.element.style.zIndex=this.zIndex+2+""),(0,e.isNullOrUndefined)(this.firstHandle)||(this.firstHandle.style.zIndex=this.zIndex+3+""),"Range"!==this.type||(0,e.isNullOrUndefined)(this.secondHandle)||(this.secondHandle.style.zIndex=this.zIndex+4+"")},i.prototype.setTooltip=function(t){this.changeSliderType(this.type,t)},i.prototype.setBarColor=function(){for(var t,i,s=this.sliderTrack.lastElementChild;s;)this.sliderTrack.removeChild(s),s=this.sliderTrack.lastElementChild;for(var n=0;n<this.colorRange.length;n++)if(!(0,e.isNullOrUndefined)(this.colorRange[n].start)&&!(0,e.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=ye,t=this.enableRtl?(0,e.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=t+"px"):(i=be,t=this.checkHandlePosition(this.colorRange[n].start),l.style.height=r-a+"px",l.style.bottom=t+"px"),l.classList.add(i),this.sliderTrack.appendChild(l)}},i.prototype.getModuleName=function(){return"slider"},Dt([(0,e.Property)(null)],i.prototype,"value",void 0),Dt([(0,e.Property)(null)],i.prototype,"customValues",void 0),Dt([(0,e.Property)(1)],i.prototype,"step",void 0),Dt([(0,e.Property)(null)],i.prototype,"width",void 0),Dt([(0,e.Property)(0)],i.prototype,"min",void 0),Dt([(0,e.Property)(100)],i.prototype,"max",void 0),Dt([(0,e.Property)(!1)],i.prototype,"readonly",void 0),Dt([(0,e.Property)("Default")],i.prototype,"type",void 0),Dt([(0,e.Collection)([{}],Wt)],i.prototype,"colorRange",void 0),Dt([(0,e.Complex)({},zt)],i.prototype,"ticks",void 0),Dt([(0,e.Complex)({},qt)],i.prototype,"limits",void 0),Dt([(0,e.Property)(!0)],i.prototype,"enabled",void 0),Dt([(0,e.Complex)({},jt)],i.prototype,"tooltip",void 0),Dt([(0,e.Property)(!1)],i.prototype,"showButtons",void 0),Dt([(0,e.Property)(!0)],i.prototype,"enableAnimation",void 0),Dt([(0,e.Property)("Horizontal")],i.prototype,"orientation",void 0),Dt([(0,e.Property)("")],i.prototype,"cssClass",void 0),Dt([(0,e.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),Dt([(0,e.Event)()],i.prototype,"created",void 0),Dt([(0,e.Event)()],i.prototype,"change",void 0),Dt([(0,e.Event)()],i.prototype,"changed",void 0),Dt([(0,e.Event)()],i.prototype,"renderingTicks",void 0),Dt([(0,e.Event)()],i.prototype,"renderedTicks",void 0),Dt([(0,e.Event)()],i.prototype,"tooltipChange",void 0),i=Dt([e.NotifyPropertyChanges],i)}(e.Component),Ye=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Ze=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},Je={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(t){t[t.Message=0]="Message",t[t.Label=1]="Label"}(Nt||(Nt={}));var $e,Ge,Qe=function(t){function i(i,s){var n=t.call(this,s,i)||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 e.L10n("formValidator",n.defaultMessages,n.locale),n.locale&&n.localeFunc(),e.onIntlChange.on("notifyExternalChange",n.afterLocalization,n),i="string"==typeof i?(0,e.select)(i,document):i,null!=n.element)return n.element.setAttribute("novalidate",""),n.inputElements=(0,e.selectAll)(n.selectQuery,n.element),n.createHTML5Rules(),n.wireEvents(),n}var s;return Ye(i,t),s=i,i.prototype.addRules=function(t,i){t&&(this.rules.hasOwnProperty(t)?(0,e.extend)(this.rules[""+t],i,{}):this.rules[""+t]=i)},i.prototype.removeRules=function(t,i){if(t||i)if(this.rules[""+t]&&!i)delete this.rules[""+t];else{if((0,e.isNullOrUndefined)(this.rules[""+t]&&i))return;for(var s=0;s<i.length;s++)delete this.rules[""+t][i[parseInt(s.toString(),10)]]}else this.rules={}},i.prototype.validate=function(t){var e=Object.keys(this.rules);if(t&&e.length)return this.validateRules(t),-1!==e.indexOf(t)&&0===this.errorRules.filter((function(e){return e.name===t})).length;this.errorRules=[];for(var i=0,s=e;i<s.length;i++){var n=s[i];this.validateRules(n)}return 0===this.errorRules.length},i.prototype.reset=function(){this.element.reset(),this.clearForm()},i.prototype.getInputElement=function(t){return this.inputElement=(0,e.select)('[name="'+t+'"]',this.element),this.inputElement},i.prototype.destroy=function(){this.reset(),this.unwireEvents(),this.rules={};for(var i=0,s=(0,e.selectAll)("."+this.errorClass+", ."+this.validClass,this.element);i<s.length;i++){var n=s[i];(0,e.detach)(n)}t.prototype.destroy.call(this),this.infoElement=null,e.onIntlChange.off("notifyExternalChange",this.afterLocalization)},i.prototype.onPropertyChanged=function(t,e){for(var i=0,s=Object.keys(t);i<s.length;i++){if("locale"===s[i])this.localeFunc()}},i.prototype.localeFunc=function(){for(var t=0,e=Object.keys(this.defaultMessages);t<e.length;t++){var i=e[t];this.l10n.setLocale(this.locale);var s=this.l10n.getConstant(i);this.localyMessage[""+i]=s}},i.prototype.getModuleName=function(){return"formvalidator"},i.prototype.afterLocalization=function(t){this.locale=t.locale,this.localeFunc()},i.prototype.refresh=function(){this.unwireEvents(),this.inputElements=(0,e.selectAll)(this.selectQuery,this.element),this.wireEvents()},i.prototype.clearForm=function(){this.errorRules=[],this.validated=[];for(var t=0,i=(0,e.selectAll)(this.selectQuery,this.element);t<i.length;t++){var s=i[t];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)}},i.prototype.createHTML5Rules=function(){for(var t=["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"],e=["hidden","email","url","date","number","tel"],i=0,s=this.inputElements;i<s.length;i++){for(var n=s[i],a={},r=0,l=t;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!==e.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)}},i.prototype.annotationRule=function(t,e,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(t,e,"required",s);break;case"creditcard":this.defRule(t,e,"creditcard",s);break;case"phone":this.defRule(t,e,"tel",s)}else if(-1!==a.indexOf(l))switch(l){case"maxlength":this.defRule(t,e,"maxLength",s);break;case"minlength":this.defRule(t,e,"minLength",s);break;case"range":var o=t.getAttribute("data-val-range-min"),h=t.getAttribute("data-val-range-max");this.defRule(t,e,"range",[o,h]);break;case"equalto":var u=t.getAttribute(i).split(".");this.defRule(t,e,"equalTo",u[u.length-1]);break;case"regex":this.defRule(t,e,"regex",s)}},i.prototype.defRule=function(t,e,i,s){var n,a=t.getAttribute("data-"+i+"-message"),r=t.getAttribute("data-val-"+i);this.rules[t.name]&&"validateHidden"!==i&&"hidden"!==i&&(this.getInputElement(t.name),n=this.getErrorMessage(this.rules[t.name][""+i],i)),a?s=[s,a]:r?s=[s,r]:n&&(s=[s,n]),e[""+i]=s},i.prototype.wireEvents=function(){for(var t=0,i=this.inputElements;t<i.length;t++){var n=i[t];s.isCheckable(n)?e.EventHandler.add(n,"click",this.clickHandler,this):"SELECT"===n.tagName?e.EventHandler.add(n,"change",this.changeHandler,this):(e.EventHandler.add(n,"focusout",this.focusOutHandler,this),e.EventHandler.add(n,"keyup",this.keyUpHandler,this))}e.EventHandler.add(this.element,"submit",this.submitHandler,this),e.EventHandler.add(this.element,"reset",this.resetHandler,this)},i.prototype.unwireEvents=function(){for(var t=0,i=this.inputElements;t<i.length;t++){var s=i[t];e.EventHandler.clearEvents(s)}e.EventHandler.remove(this.element,"submit",this.submitHandler),e.EventHandler.remove(this.element,"reset",this.resetHandler)},i.prototype.focusOutHandler=function(t){this.trigger("focusout",t);var e=t.target;this.rules[e.name]&&(this.rules[e.name][this.required]||e.value.length>0?this.validate(e.name):-1===this.validated.indexOf(e.name)&&this.validated.push(e.name))},i.prototype.keyUpHandler=function(t){this.trigger("keyup",t);var e=t.target;(9!==t.which||this.rules[e.name]&&(!this.rules[e.name]||this.rules[e.name][this.required]))&&-1!==this.validated.indexOf(e.name)&&this.rules[e.name]&&-1===[16,17,18,20,35,36,37,38,39,40,45,144,225].indexOf(t.which)&&this.validate(e.name)},i.prototype.clickHandler=function(t){this.trigger("click",t);var e=t.target;"submit"!==e.type?this.validate(e.name):null!==e.getAttribute("formnovalidate")&&(this.allowSubmit=!0)},i.prototype.changeHandler=function(t){this.trigger("change",t);var e=t.target;this.validate(e.name)},i.prototype.submitHandler=function(t){this.trigger("submit",t),this.allowSubmit||this.validate()?this.allowSubmit=!1:t.preventDefault()},i.prototype.resetHandler=function(){this.clearForm()},i.prototype.validateRules=function(t){if(this.rules[""+t]){var e=Object.keys(this.rules[""+t]),i=!1,s=!1,n=e.indexOf("validateHidden"),a=e.indexOf("hidden");if(this.getInputElement(t),-1!==a&&(i=!0),-1!==n&&(s=!0),!i||i&&s){-1!==n&&e.splice(n,1),-1!==a&&e.splice(a-1,1),this.getErrorElement(t);for(var r=0,l=e;r<l.length;r++){var o=l[r],h=this.getErrorMessage(this.rules[""+t][""+o],o),u={name:t,message:h},d={inputName:t,element:this.inputElement,message:h};if(!this.isValid(t,o)&&!this.inputElement.classList.contains(this.ignore)){this.removeErrorRules(t),this.errorRules.push(u),this.inputElement.setAttribute("aria-invalid","true"),this.inputElement.setAttribute("aria-describedby",this.inputElement.id+"-info");var p=this.inputElement.parentElement,c=p.parentElement;p.classList.contains("e-control-wrapper")||p.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&p.classList.contains("e-input-group")?(p.classList.add(this.errorClass),p.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(u):this.createErrorElement(t,u.message,this.inputElement),d.errorElement=this.infoElement,d.status="failure",p.classList.contains("e-control-wrapper")||p.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&p.classList.contains("e-input-group")?(p.classList.add(this.errorClass),p.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(t,d),this.trigger("validationComplete",d),"required"===o&&this.inputElement.setAttribute("aria-required","true");break}this.hideMessage(t),d.status="success",this.trigger("validationComplete",d)}}}},i.prototype.optionalValidationStatus=function(t,i){this.rules[""+t][this.required]||this.inputElement.value.length||(0,e.isNullOrUndefined)(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),i.status="",this.hideMessage(t))},i.prototype.isValid=function(t,i){var n=this.rules[""+t][""+i],a=n instanceof Array&&"string"==typeof n[1]?n[0]:n,r=this.rules[""+t][""+i],l={value:this.inputElement.value,param:a,element:this.inputElement,formElement:this.element};return this.trigger("validationBegin",l),!l.param&&"required"===i||(r&&"function"==typeof r[0]?r[0].call(this,{element:this.inputElement,value:this.inputElement.value}):s.isCheckable(this.inputElement)?"required"!==i||(0,e.selectAll)('input[name="'+t+'"]:checked',this.element).length>0:s.checkValidator[""+i](l))},i.prototype.getErrorMessage=function(t,i){var s=this.inputElement.getAttribute("data-"+i+"-message")?this.inputElement.getAttribute("data-"+i+"-message"):t instanceof Array&&"string"==typeof t[1]?t[1]:0!==Object.keys(this.localyMessage).length?this.localyMessage[""+i]:this.defaultMessages[""+i],n=s.match(/{(\d)}/g);if(!(0,e.isNullOrUndefined)(n))for(var a=0;a<n.length;a++){var r=t instanceof Array?t[parseInt(a.toString(),10)]:t;s=s.replace(n[parseInt(a.toString(),10)],r)}return s},i.prototype.createErrorElement=function(t,i,s){var n=(0,e.createElement)(this.errorElement,{className:this.errorClass,innerHTML:i,attrs:{for:t}});if(this.errorOption===Nt.Message&&(n.classList.remove(this.errorClass),n.classList.add("e-message"),n=(0,e.createElement)(this.errorContainer,{className:this.errorClass,innerHTML:n.outerHTML})),n.id=this.inputElement.name+"-info",this.element.querySelector('[data-valmsg-for="'+s.id+'"]'))this.element.querySelector('[data-valmsg-for="'+s.id+'"]').appendChild(n);else if(!0===s.hasAttribute("data-msg-containerid")){var a=s.getAttribute("data-msg-containerid");(0,e.select)("#"+a,this.element).appendChild(n)}else if(null!=this.customPlacement)this.customPlacement.call(this,this.inputElement,n);else{var r=this.inputElement.parentElement,l=r.parentElement;r.classList.contains("e-control-wrapper")||r.classList.contains("e-wrapper")?l.insertBefore(n,r.nextSibling):l.classList.contains("e-control-wrapper")||l.classList.contains("e-wrapper")?l.parentElement.insertBefore(n,l.nextSibling):r.insertBefore(n,this.inputElement.nextSibling)}n.style.display="block",this.getErrorElement(t),this.validated.push(t),this.checkRequired(t)},i.prototype.getErrorElement=function(t){return this.infoElement=(0,e.select)(this.errorElement+"."+this.errorClass,this.inputElement.parentElement),this.infoElement||(this.infoElement=(0,e.select)(this.errorElement+"."+this.errorClass+'[for="'+t+'"]',this.element)),this.infoElement},i.prototype.removeErrorRules=function(t){for(var e=0;e<this.errorRules.length;e++){this.errorRules[parseInt(e.toString(),10)].name===t&&this.errorRules.splice(e,1)}},i.prototype.showMessage=function(t){this.infoElement.style.display="block",this.infoElement.innerHTML=t.message,this.checkRequired(t.name)},i.prototype.hideMessage=function(t){if(this.infoElement){this.infoElement.style.display="none",this.removeErrorRules(t);var e=this.inputElement.parentElement,i=e.parentElement;e.classList.contains("e-control-wrapper")||e.classList.contains("e-wrapper")||this.inputElement.classList.contains("e-input")&&e.classList.contains("e-input-group")?(e.classList.add(this.validClass),e.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")}},i.prototype.checkRequired=function(t){this.rules[""+t][this.required]||this.inputElement.value.length||(0,e.isNullOrUndefined)(this.infoElement)||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),this.hideMessage(t))},i.isCheckable=function(t){var e=t.getAttribute("type");return e&&("checkbox"===e||"radio"===e||"submit"===e)},i.checkValidator={required:function(t){return isNaN(Date.parse(t.value))?t.value.toString().length>0:!isNaN(new Date(t.value).getTime())},email:function(t){return Je.EMAIL.test(t.value)},url:function(t){return Je.URL.test(t.value)},dateIso:function(t){return Je.DATE_ISO.test(t.value)},tel:function(t){return Je.PHONE.test(t.value)},creditcard:function(t){return Je.CREDITCARD.test(t.value)},number:function(t){return!isNaN(Number(t.value))&&-1===t.value.indexOf(" ")},digits:function(t){return Je.DIGITS.test(t.value)},maxLength:function(t){return t.value.length<=Number(t.param)},minLength:function(t){return t.value.length>=Number(t.param)},rangeLength:function(t){var e=t.param;return t.value.length>=e[0]&&t.value.length<=e[1]},range:function(t){var e=t.param;return!isNaN(Number(t.value))&&Number(t.value)>=e[0]&&Number(t.value)<=e[1]},date:function(t){if((0,e.isNullOrUndefined)(t.param)||"string"!=typeof t.param||""===t.param)return!isNaN(new Date(t.value).getTime());var i=new e.Internationalization,s={format:t.param.toString(),type:"dateTime",skeleton:"yMd"},n=i.parseDate(t.value,s);return!(0,e.isNullOrUndefined)(n)&&n instanceof Date&&!isNaN(+n)},max:function(t){return isNaN(Number(t.value))?new Date(t.value).getTime()<=new Date(JSON.parse(JSON.stringify(t.param))).getTime():+t.value<=+t.param},min:function(t){if(isNaN(Number(t.value))){if(-1!==t.value.indexOf(",")){var e=t.value.replace(/,/g,"");return parseFloat(e)>=Number(t.param)}return new Date(t.value).getTime()>=new Date(JSON.parse(JSON.stringify(t.param))).getTime()}return+t.value>=+t.param},regex:function(t){return new RegExp(t.param).test(t.value)},equalTo:function(t){var e=t.formElement.querySelector("#"+t.param);return t.param=e.value,t.param===t.value}},Ze([(0,e.Property)("")],i.prototype,"locale",void 0),Ze([(0,e.Property)("e-hidden")],i.prototype,"ignore",void 0),Ze([(0,e.Property)()],i.prototype,"rules",void 0),Ze([(0,e.Property)("e-error")],i.prototype,"errorClass",void 0),Ze([(0,e.Property)("e-valid")],i.prototype,"validClass",void 0),Ze([(0,e.Property)("label")],i.prototype,"errorElement",void 0),Ze([(0,e.Property)("div")],i.prototype,"errorContainer",void 0),Ze([(0,e.Property)(Nt.Label)],i.prototype,"errorOption",void 0),Ze([(0,e.Event)()],i.prototype,"focusout",void 0),Ze([(0,e.Event)()],i.prototype,"keyup",void 0),Ze([(0,e.Event)()],i.prototype,"click",void 0),Ze([(0,e.Event)()],i.prototype,"change",void 0),Ze([(0,e.Event)()],i.prototype,"submit",void 0),Ze([(0,e.Event)()],i.prototype,"validationBegin",void 0),Ze([(0,e.Event)()],i.prototype,"validationComplete",void 0),Ze([(0,e.Event)()],i.prototype,"customPlacement",void 0),i=s=Ze([e.NotifyPropertyChanges],i)}(e.Base),ti=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),ei=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},ii="e-file-select",si="e-file-drop",ni="e-upload-files",ai="e-upload-file-list",ri="e-file-status",li="e-file-name",oi="e-file-type",hi="e-file-size",ui="e-file-remove-btn",di="e-file-delete-btn",pi="e-spinner-pane",ci="e-file-abort-btn",mi="e-file-reload-btn",vi="e-upload-drag-hover",fi="e-upload-progress-wrap",gi="e-upload-progress-bar",yi="e-progress-bar-text",bi="e-upload-progress",Ci="e-upload-success",Ei="e-upload-fails",xi="e-file-container",Si="e-validation-fails",ki="e-rtl",Pi="e-disabled",Li="e-rtl-container",Oi="e-clear-icon-focus",wi="e-file-pause-btn",Ti="e-file-play-btn",Hi="e-restrict-retry",Ni=["title","style","class"],Ai="e-form-upload",Bi="e-file-invalid",Ui=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ti(i,t),ei([(0,e.Property)("")],i.prototype,"name",void 0),ei([(0,e.Property)(null)],i.prototype,"size",void 0),ei([(0,e.Property)("")],i.prototype,"type",void 0),i}(e.ChildProperty),Ri=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ti(i,t),ei([(0,e.Property)("Browse...")],i.prototype,"browse",void 0),ei([(0,e.Property)("Upload")],i.prototype,"upload",void 0),ei([(0,e.Property)("Clear")],i.prototype,"clear",void 0),i}(e.ChildProperty),Vi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ti(i,t),ei([(0,e.Property)("")],i.prototype,"saveUrl",void 0),ei([(0,e.Property)("")],i.prototype,"removeUrl",void 0),ei([(0,e.Property)(0)],i.prototype,"chunkSize",void 0),ei([(0,e.Property)(3)],i.prototype,"retryCount",void 0),ei([(0,e.Property)(500)],i.prototype,"retryAfterDelay",void 0),i}(e.ChildProperty),Fi=function(t){function i(e,i){var s=t.call(this,e,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=e,s}return ti(i,t),i.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);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=(0,e.isNullOrUndefined)(this.buttons.browse)?"":this.buttons.browse,this.buttons.clear=(0,e.isNullOrUndefined)(this.buttons.clear)?"":this.buttons.clear,this.buttons.upload=(0,e.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=(0,e.getValue)("currentLocale",this.l10n);break;case"cssClass":this.setCSSClass(i.cssClass)}}},i.prototype.setLocalizedTexts=function(){(0,e.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&&!(0,e.isNullOrUndefined)(this.uploadWrapper.querySelector("."+si))&&(this.uploadWrapper.querySelector("."+si).innerHTML=this.localizedTexts("dropFilesHint"))),this.updateFileList())},i.prototype.getKeyValue=function(t){for(var e,i=0,s=Object.keys(this.preLocaleObj);i<s.length;i++){var n=s[i];this.preLocaleObj[""+n]===t&&(e=n)}return e},i.prototype.updateFileList=function(){if(this.fileList.length>0&&!(0,e.isNullOrUndefined)(this.uploadWrapper.querySelector("."+ni)))for(var t=0;t<this.fileList.length;t++)this.fileList[t].querySelector(".e-file-status").innerHTML=this.localizedTexts(this.getKeyValue(this.filesData[t].status)),this.filesData[t].status=this.localizedTexts(this.getKeyValue(this.filesData[t].status)),this.fileList[t].classList.contains(Ci)&&this.fileList[t].querySelector(".e-icons").setAttribute("title",this.localizedTexts("delete")),this.fileList[t].querySelector(".e-file-play-btn")&&this.fileList[t].querySelector(".e-icons").setAttribute("title",this.localizedTexts("resume")),this.fileList[t].querySelector(".e-file-remove-btn")&&this.fileList[t].querySelector(".e-icons").setAttribute("title",this.localizedTexts("remove")),this.fileList[t].querySelector(".e-file-reload-btn")&&this.fileList[t].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")))},i.prototype.reRenderFileList=function(){this.listParent&&((0,e.detach)(this.listParent),this.listParent=null,this.fileList=[],this.internalCreateFileList(this.filesData),this.actionButtons&&(this.removeActionButtons(),this.renderActionButtons(),this.checkActionButtonStatus()))},i.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 e.L10n("uploader",this.localeText,this.locale),this.preLocaleObj=(0,e.getValue)("currentLocale",this.l10n),this.formRendered(),this.updateHTMLAttrToElement(),this.checkHTMLAttributes(!1);var t=(0,e.getValue)("ej2_instances",this.element);if("EJS-UPLOADER"===this.element.tagName){for(var i=this.createElement("input",{attrs:{type:"file"}}),s=0;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,(0,e.getUniqueID)("uploader")),i.innerHTML=this.element.innerHTML;i.hasAttribute("name")||i.setAttribute("name","UploadFiles"),this.element.appendChild(i),this.element=i,(0,e.setValue)("ej2_instances",t,this.element)}t[0].isPureReactComponent&&((0,e.isNullOrUndefined)(t[0].props.name)?!(0,e.isNullOrUndefined)(t[0].props.id)&&(0,e.isNullOrUndefined)(t[0].props.name)?this.element.setAttribute("name",t[0].props.id):this.element.setAttribute("name","UploadFiles"):this.element.setAttribute("name",t[0].props.name)),(0,e.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=e.Browser.info.name,this.uploaderName=this.element.getAttribute("name")},i.prototype.formRendered=function(){var t=(0,e.closest)(this.element,"form");if(!(0,e.isNullOrUndefined)(t))for(;t&&t!==document.documentElement;t=t.parentElement)"FORM"===t.tagName&&(this.isForm=!0,this.formElement=t,t.setAttribute("enctype","multipart/form-data"),t.setAttribute("encoding","multipart/form-data"))},i.prototype.getPersistData=function(){return this.addOnPersist(["filesData"])},i.prototype.getModuleName=function(){return"uploader"},i.prototype.updateDirectoryAttributes=function(){this.directoryUpload?(this.element.setAttribute("directory","true"),this.element.setAttribute("webkitdirectory","true")):(this.element.removeAttribute("directory"),this.element.removeAttribute("webkitdirectory"))},i.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()},i.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")},i.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}}),this.clearButton=this.createElement("button",{className:"e-file-clear-btn e-css e-btn e-flat",attrs:{type:"button",tabindex:this.btnTabIndex}}),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()},i.prototype.serverActionButtonsEventBind=function(t){t&&!this.isForm&&(this.browseButton.blur(),this.actionButtons=t,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())},i.prototype.wireActionButtonEvents=function(){e.EventHandler.add(this.uploadButton,"click",this.uploadButtonClick,this),e.EventHandler.add(this.clearButton,"click",this.clearButtonClick,this)},i.prototype.unwireActionButtonEvents=function(){e.EventHandler.remove(this.uploadButton,"click",this.uploadButtonClick),e.EventHandler.remove(this.clearButton,"click",this.clearButtonClick)},i.prototype.removeActionButtons=function(){this.actionButtons&&(this.unwireActionButtonEvents(),(0,e.detach)(this.actionButtons),this.actionButtons=null)},i.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 t=(0,e.isNullOrUndefined)(this.buttons.upload)?"Upload":this.buttons.upload;this.buttons.upload=t,"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=(0,e.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))}},i.prototype.initializeUpload=function(){this.element.setAttribute("tabindex","-1");var t=this.createElement("span",{className:ii});this.element.parentElement.insertBefore(t,this.element),this.dropAreaWrapper=this.createElement("div",{className:"e-file-select-wrap"}),this.element.parentElement.insertBefore(this.dropAreaWrapper,this.element),t.appendChild(this.element),this.dropAreaWrapper.appendChild(this.browseButton),this.dropAreaWrapper.appendChild(t),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()},i.prototype.renderPreLoadFiles=function(){if(this.files.length){if(this.enablePersistence&&this.filesData.length)return void this.internalCreateFileList(this.filesData);if((0,e.isNullOrUndefined)(this.files[0].size))return;this.isPreloadFiles=!0;var t=[].slice.call(this.files),i=[];this.multiple||(this.clearData(),t=[t[0]]);for(var s=0,n=t;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}},i.prototype.checkActionButtonStatus=function(){if(this.actionButtons){var t=this.uploadWrapper.querySelectorAll("."+Si).length+this.uploadWrapper.querySelectorAll(".e-upload-fails:not(.e-upload-progress)").length+this.uploadWrapper.querySelectorAll("span."+Ci).length+this.uploadWrapper.querySelectorAll("span."+bi).length;t>0&&t===this.uploadWrapper.querySelectorAll("li").length?this.uploadButton.setAttribute("disabled","disabled"):this.uploadButton.removeAttribute("disabled")}},i.prototype.setDropArea=function(){var t=this.dropAreaWrapper.querySelector(".e-file-drop");if(this.dropArea){this.dropZoneElement="string"!=typeof this.dropArea?this.dropArea:(0,e.select)(this.dropArea,document);for(var i=this.element,s=!1;i.parentNode;)(i=i.parentNode)===this.dropZoneElement&&(s=!0,t?t.innerHTML=this.localizedTexts("dropFilesHint"):this.createDropTextHint());!s&&t&&(0,e.remove)(t)}else(0,e.isNullOrUndefined)(this.uploaderOptions)||void 0!==this.uploaderOptions.dropArea||(this.createDropTextHint(),this.dropZoneElement=this.uploadWrapper,this.setProperties({dropArea:this.uploadWrapper},!0));this.bindDropEvents()},i.prototype.updateDropArea=function(){if(this.dropArea)this.setDropArea();else{this.dropZoneElement=null;var t=this.dropAreaWrapper.querySelector(".e-file-drop");t&&(0,e.remove)(t)}},i.prototype.createDropTextHint=function(){var t=this.createElement("span",{className:si});t.innerHTML=this.localizedTexts("dropFilesHint"),this.dropAreaWrapper.appendChild(t)},i.prototype.updateHTMLAttrToElement=function(){if(!(0,e.isNullOrUndefined)(this.htmlAttributes))for(var t=0,i=Object.keys(this.htmlAttributes);t<i.length;t++){var s=i[t];Ni.indexOf(s)<0&&this.element.setAttribute(s,this.htmlAttributes[""+s])}},i.prototype.updateHTMLAttrToWrapper=function(){if(!(0,e.isNullOrUndefined)(this.htmlAttributes))for(var t=0,i=Object.keys(this.htmlAttributes);t<i.length;t++){var s=i[t];if(Ni.indexOf(s)>-1)if("class"===s){var n=this.htmlAttributes[""+s].replace(/\s+/g," ").trim();""!==n&&(0,e.addClass)([this.uploadWrapper],n.split(" "))}else if("style"===s){var a=this.uploadWrapper.getAttribute(s);a=(0,e.isNullOrUndefined)(a)?this.htmlAttributes[""+s]:a+this.htmlAttributes[""+s],this.uploadWrapper.setAttribute(s,a)}else this.uploadWrapper.setAttribute(s,this.htmlAttributes[""+s])}},i.prototype.setMultipleSelection=function(){if(this.multiple&&!this.element.hasAttribute("multiple")){var t=document.createAttribute("multiple");t.value="multiple",this.element.setAttributeNode(t)}else this.multiple||this.element.removeAttribute("multiple")},i.prototype.checkAutoUpload=function(t){this.autoUpload?(this.sequentialUpload?this.sequenceUpload(t):this.upload(t),this.removeActionButtons()):this.actionButtons||this.renderActionButtons(),this.checkActionButtonStatus()},i.prototype.sequenceUpload=function(t){if(this.filesData.length-t.length==0||"1"!==this.filesData[this.filesData.length-t.length-1].statusCode){(this.multiple||this.count<0)&&++this.count;var e=!this.showFileList;"object"==typeof this.filesData[this.count]?(this.isFirstFileOnSelection=!1,this.upload(this.filesData[this.count],e),"0"===this.filesData[this.count].statusCode&&this.sequenceUpload(t)):--this.count}},i.prototype.setCSSClass=function(t){var i=t;(0,e.isNullOrUndefined)(t)||(i=t.replace(/\s+/g," ").trim()),(0,e.isNullOrUndefined)(t)||""===i||(0,e.removeClass)([this.uploadWrapper],i.split(" "));var s=this.cssClass;(0,e.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(s=this.cssClass.replace(/\s+/g," ").trim()),(0,e.isNullOrUndefined)(this.cssClass)||""===s||(0,e.addClass)([this.uploadWrapper],s.split(s.indexOf(",")>-1?",":" "))},i.prototype.wireEvents=function(){e.EventHandler.add(this.browseButton,"click",this.browseButtonClick,this),e.EventHandler.add(this.element,"change",this.onSelectFiles,this),e.EventHandler.add(document,"click",this.removeFocus,this),this.keyboardModule=new e.KeyboardEvents(this.uploadWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.isForm&&e.EventHandler.add(this.formElement,"reset",this.resetForm,this)},i.prototype.unWireEvents=function(){e.EventHandler.remove(this.browseButton,"click",this.browseButtonClick),e.EventHandler.remove(this.element,"change",this.onSelectFiles),e.EventHandler.remove(document,"click",this.removeFocus),this.isForm&&e.EventHandler.remove(this.formElement,"reset",this.resetForm),this.keyboardModule&&this.keyboardModule.destroy()},i.prototype.resetForm=function(){this.clearAll()},i.prototype.keyActionHandler=function(t){var i=t.target;if("enter"===t.action){if(t.target===this.clearButton)this.clearButtonClick();else if(t.target===this.uploadButton)this.uploadButtonClick();else if(t.target===this.browseButton)this.browseButtonClick();else if(i.classList.contains(wi)){(s=this.getCurrentMetaData(null,t)).file.statusCode="4",s.file.status=this.localizedTexts("pauseUpload"),this.abortUpload(s,!1)}else if(i.classList.contains(Ti))this.resumeUpload(this.getCurrentMetaData(null,t),t);else if(i.classList.contains(mi)){var s=this.getCurrentMetaData(null,t);if((0,e.isNullOrUndefined)(s)){var n=t.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(t),i.classList.contains(ci)||this.browseButton.focus();t.preventDefault(),t.stopPropagation()}},i.prototype.getCurrentMetaData=function(t,i){var s,n;if((0,e.isNullOrUndefined)(t)){var a=i.target.parentElement;s=this.filesData[this.fileList.indexOf(a)]}else s=t;for(var r=0;r<this.uploadMetaData.length;r++)this.uploadMetaData[r].file.name===s.name&&(n=this.uploadMetaData[r]);return n},i.prototype.removeFocus=function(){this.uploadWrapper&&this.listParent&&this.listParent.querySelector("."+Oi)&&(document.activeElement.blur(),this.listParent.querySelector("."+Oi).classList.remove(Oi))},i.prototype.browseButtonClick=function(){this.element.click()},i.prototype.uploadButtonClick=function(){this.sequentialUpload?this.sequenceUpload(this.filesData):this.upload(this.filesData)},i.prototype.clearButtonClick=function(){this.clearAll(),this.sequentialUpload&&(this.count=-1),this.actionCompleteCount=0},i.prototype.bindDropEvents=function(){this.dropZoneElement&&(e.EventHandler.add(this.dropZoneElement,"drop",this.dropElement,this),e.EventHandler.add(this.dropZoneElement,"dragover",this.dragHover,this),e.EventHandler.add(this.dropZoneElement,"dragleave",this.onDragLeave,this),e.EventHandler.add(this.dropZoneElement,"paste",this.onPasteFile,this),e.EventHandler.add(this.dropZoneElement,"dragenter",this.onDragEnter,this))},i.prototype.unBindDropEvents=function(){this.dropZoneElement&&(e.EventHandler.remove(this.dropZoneElement,"drop",this.dropElement),e.EventHandler.remove(this.dropZoneElement,"dragover",this.dragHover),e.EventHandler.remove(this.dropZoneElement,"dragleave",this.onDragLeave),e.EventHandler.remove(this.dropZoneElement,"dragenter",this.onDragEnter))},i.prototype.onDragEnter=function(t){this.enabled&&(this.dropZoneElement.classList.add(vi),this.dragCounter=this.dragCounter+1,t.preventDefault(),t.stopPropagation())},i.prototype.onDragLeave=function(){this.enabled&&(this.dragCounter=this.dragCounter-1,this.dragCounter||this.dropZoneElement.classList.remove(vi))},i.prototype.dragHover=function(t){this.enabled&&("Default"!==this.dropEffect&&(t.dataTransfer.dropEffect=this.dropEffect.toLowerCase()),t.preventDefault(),t.stopPropagation())},i.prototype.dropElement=function(t){this.dragCounter=0,this.dropZoneElement.classList.remove(vi),this.onSelectFiles(t),t.preventDefault(),t.stopPropagation()},i.prototype.onPasteFile=function(t){var e=t.clipboardData.items;if("paste"===t.type&&"msie"!==this.browserName&&"edge"!==this.browserName&&"safari"!==this.browserName&&(this.element.files=t.clipboardData.files),1===e.length||this.multiple)for(var i=0;i<e.length;i++){var s=[].slice.call(e)[i];("file"===s.kind||s.type.match("^image/"))&&this.renderSelectedFiles(t,[s.getAsFile()],!1,!0)}},i.prototype.getSelectedFiles=function(t){for(var e=[],i=this.fileList[t],s=this.getFilesData(),n=+i.getAttribute("data-files-count"),a=0,r=0;r<t;r++)a+=+this.fileList[r].getAttribute("data-files-count");for(var l=a;l<a+n;l++)e.push(s[l]);return e},i.prototype.removeFiles=function(t){if(this.enabled){var i=t.target.parentElement,s=this.fileList.indexOf(i),n=this.fileList[s],a=this.isFormUpload(),r=a?this.getSelectedFiles(s):this.getFilesInArray(this.filesData[s]);if(!(0,e.isNullOrUndefined)(r)){if(t.target.classList.contains(ci)&&!a){if(r[0].statusCode="5",!(0,e.isNullOrUndefined)(n)){var l=n.querySelector("."+ci);(0,Mt.createSpinner)({target:l,width:"20px"}),(0,Mt.showSpinner)(l)}this.sequentialUpload&&this.uploadSequential(),n.classList.contains(Hi)||this.checkActionComplete(!0)}else(0,e.closest)(t.target,"."+pi)||this.remove(r,!1,!1,!0,t);this.checkActionButtonStatus()}}},i.prototype.removeFilesData=function(t,i){var s;if(i)this.showFileList||(s=this.filesData.indexOf(t),this.filesData.splice(s,1));else{var n=this.getLiElement(t);(0,e.isNullOrUndefined)(n)||(this.element.value="",(0,e.detach)(n),s=this.fileList.indexOf(n),this.fileList.splice(s,1),this.filesData.splice(s,1),0!==this.fileList.length||(0,e.isNullOrUndefined)(this.listParent)||((0,e.detach)(this.listParent),this.listParent=null,this.removeActionButtons()),this.sequentialUpload&&s<=this.count&&--this.count)}},i.prototype.removeUploadedFile=function(t,i,s,n){var a=this,r=t,l=new e.Ajax(this.asyncSettings.removeUrl,"POST",!0,null);l.emitError=!1;var o=new FormData;l.beforeSend=function(e){i.currentRequest=l.httpRequest,s?a.removingEventCallback(i,o,r,t):a.trigger("removing",i,(function(i){i.cancel?e.cancel=!0:a.removingEventCallback(i,o,r,t)}))},l.onLoad=function(t){return a.removeCompleted(t,r,n),{}},l.onError=function(t){return a.removeFailed(t,r,n),{}},l.send(o)},i.prototype.removingEventCallback=function(t,i,s,n){var a=this.element.getAttribute("name"),r=this.getLiElement(n);if(!((0,e.isNullOrUndefined)(r)||(0,e.isNullOrUndefined)(r.querySelector("."+di))&&(0,e.isNullOrUndefined)(r.querySelector("."+ui)))){var l=r.querySelector("."+di)?r.querySelector("."+di):r.querySelector("."+ui);(0,Mt.createSpinner)({target:l,width:"20px"}),(0,Mt.showSpinner)(l)}t.postRawFile&&!(0,e.isNullOrUndefined)(s.rawFile)&&""!==s.rawFile?i.append(a,s.rawFile,s.name):i.append(a,s.name),this.updateFormData(i,t.customFormData)},i.prototype.updateFormData=function(t,e){if(e.length>0&&e[0])for(var i=function(i){var s=e[i],n=Object.keys(s).map((function(t){return s[""+t]}));t.append(Object.keys(s)[0],n)},s=0;s<e.length;s++)i(s)},i.prototype.updateCustomheader=function(t,e){if(e.length>0&&e[0])for(var i=function(i){var s=e[i],n=Object.keys(s).map((function(t){return s[""+t]}));t.setRequestHeader(Object.keys(s)[0],n)},s=0;s<e.length;s++)i(s)},i.prototype.removeCompleted=function(t,e,i){var s=t&&t.currentTarget?this.getResponse(t):null,n=t.target;if(4===n.readyState&&n.status>=200&&n.status<=299){var a={e:t,response:s,operation:"remove",file:this.updateStatus(e,this.localizedTexts("removedSuccessMessage"),"2")};this.trigger("success",a),this.removeFilesData(e,i);var r=this.uploadedFilesData.indexOf(e);this.uploadedFilesData.splice(r,1),this.trigger("change",{files:this.uploadedFilesData})}else this.removeFailed(t,e,i)},i.prototype.removeFailed=function(t,i,s){var n={e:t,response:t&&t.currentTarget?this.getResponse(t):null,operation:"remove",file:this.updateStatus(i,this.localizedTexts("removedFailedMessage"),"0")};if(!s){var a=this.filesData.indexOf(i),r=this.fileList[a];if(r){r.classList.remove(Ci),r.classList.add(Ei);var l=r.querySelector("."+ri);l&&(l.classList.remove(Ci),l.classList.add(Ei))}this.checkActionButtonStatus()}this.trigger("failure",n);var o=this.getLiElement(i);if(!(0,e.isNullOrUndefined)(o)&&!(0,e.isNullOrUndefined)(o.querySelector("."+di))){var h=o.querySelector("."+di);(0,Mt.hideSpinner)(h),(0,e.detach)(o.querySelector(".e-spinner-pane"))}},i.prototype.getFilesFromFolder=function(t){this.filesEntries=[];var e=this.multiple?t.dataTransfer.items:[t.dataTransfer.items[0]];if(this.checkDirectoryUpload(e))for(var i=function(i){var n=e[i].webkitGetAsEntry();if(n.isFile){var a=[];n.file((function(t){var e=n.fullPath;a.push({path:e,file:t})})),s.renderSelectedFiles(t,a,!0)}else n.isDirectory&&s.traverseFileTree(n,t)},s=this,n=0;n<e.length;n++)i(n)},i.prototype.checkDirectoryUpload=function(t){for(var e=0;t&&e<t.length;e++){if(t[e].webkitGetAsEntry().isDirectory)return!0}return!1},i.prototype.traverseFileTree=function(t,e){if(t.isFile)this.filesEntries.push(t);else if(t.isDirectory){var i=t.createReader();this.readFileFromDirectory(i,e)}},i.prototype.readFileFromDirectory=function(t,e){var i=this;t.readEntries((function(s){for(var n=0;n<s.length;n++)i.traverseFileTree(s[n],e);i.pushFilesEntries(e),s.length&&i.readFileFromDirectory(t)}))},i.prototype.pushFilesEntries=function(t){for(var e=this,i=[],s=function(s){n.filesEntries[s].file((function(n){if(e.filesEntries.length){var a=e.filesEntries[s].fullPath;i.push({path:a,file:n}),s===e.filesEntries.length-1&&(e.filesEntries=[],e.renderSelectedFiles(t,i,!0))}}))},n=this,a=0;a<this.filesEntries.length;a++)s(a)},i.prototype.onSelectFiles=function(t){if(this.enabled){var e;if("drop"===t.type)if(this.directoryUpload)this.getFilesFromFolder(t);else{var i=this.sortFilesList=t.dataTransfer.files;"msie"!==this.browserName&&"edge"!==this.browserName&&"safari"!==this.browserName&&(this.element.files=i),i.length>0&&(e=this.multiple?this.sortFileList(i):[i[0]],this.renderSelectedFiles(t,e))}else e=[].slice.call(t.target.files),this.renderSelectedFiles(t,e);(this.isAngular||this.isReact)&&t.stopPropagation()}},i.prototype.getBase64=function(t){return new Promise((function(e,i){var s=new FileReader;s.readAsDataURL(t),s.onload=function(){return e(s.result)},s.onerror=function(t){return i(t)}}))},i.prototype.renderSelectedFiles=function(t,i,s,n){var a=this;this.base64String=[];var r={event:t,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(var o=0;o<i.length;o++){var h=s?i[o].file:i[o];this.updateInitialFileDetails(t,i,h,o,l,s,n)}if(r.filesData=l,this.allowedExtensions.indexOf("*")>-1&&(this.allTypes=!0),this.enableHtmlSanitizer)for(o=0;o<l.length;o++){for(var u=e.SanitizeHtmlHelper.beforeSanitize(),d=e.SanitizeHtmlHelper.serializeValue(u,l[parseInt(o.toString(),10)].name),p=l[parseInt(o.toString(),10)].name,c=!1,m=0;m<p.length;m++)if(p.charCodeAt(m)>127){c=!0;break}var v=/<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i.test(p);if(d!==l[parseInt(o.toString(),10)].name&&(!c||v)){var f=i[parseInt(o.toString(),10)].name.replace(/[\u00A0-\u9999<>\\&]/g,(function(t){return"&#"+t.charCodeAt(0)+";"}));l[parseInt(o.toString(),10)].name=f,l[parseInt(o.toString(),10)].status=this.localizedTexts("invalidFileName"),l[parseInt(o.toString(),10)].statusCode="0"}}this.allTypes||(l=this.checkExtension(l)),this.trigger("selected",r,(function(t){a._internalRenderSelect(t,l)}))},i.prototype.updateInitialFileDetails=function(t,i,s,n,a,r,l){var o={name:r?i[n].path.substring(1,i[n].path.length):l?(0,e.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:(0,e.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"),a.push(o)},i.prototype._internalRenderSelect=function(t,i){if(!t.cancel){if(this.selectedFiles=this.selectedFiles.concat(i),this.btnTabIndex=this.disableKeyboardNavigation?"-1":"0",this.showFileList){if(t.isModified&&t.modifiedFilesData.length>0){for(var s=0;s<t.modifiedFilesData.length;s++)for(var n=0;n<i.length;n++)t.modifiedFilesData[s].id===i[n].id&&(t.modifiedFilesData[s].rawFile=i[n].rawFile);var a=this.allTypes?t.modifiedFilesData:this.checkExtension(t.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)}(0,e.isNullOrUndefined)(t.progressInterval)||""===t.progressInterval||(this.progressInterval=t.progressInterval)}else this.filesData=this.filesData.concat(i),this.autoUpload&&this.upload(this.filesData,!0);for(var r=0;r<this.filesData.length;r++)"0"===this.filesData[r].statusCode&&this.checkActionComplete(!0);this.isFirstFileOnSelection=!0}},i.prototype.allowUpload=function(){var t=!1;return this.isForm&&!(0,e.isNullOrUndefined)(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl&&(t=!0),t},i.prototype.isFormUpload=function(){var t=!1;return!this.isForm||!(0,e.isNullOrUndefined)(this.asyncSettings.saveUrl)&&""!==this.asyncSettings.saveUrl||!(0,e.isNullOrUndefined)(this.asyncSettings.removeUrl)&&""!==this.asyncSettings.removeUrl||(t=!0),t},i.prototype.clearData=function(t){(0,e.isNullOrUndefined)(this.listParent)||((0,e.detach)(this.listParent),this.listParent=null),"msie"===this.browserName||t||(this.element.value=""),this.fileList=[],this.filesData=[],this.removeActionButtons()},i.prototype.updateSortedFileList=function(t){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<t.length;l++){for(var o=0;o<this.filesData.length;o++)this.filesData[o].name===t[l].name&&(this.listParent.appendChild(r[o]),e.EventHandler.add(r[o].querySelector(".e-icons"),"click",this.removeFiles,this),this.fileList.push(r[o]),s=l);s!==l&&this.internalCreateFileList([t[l]])}}else this.internalCreateFileList(t)},i.prototype.isBlank=function(t){return!t||/^\s*$/.test(t)},i.prototype.checkExtension=function(t){var e=t;if(!this.isBlank(this.allowedExtensions)){for(var i=[],s=0,n=this.allowedExtensions.split(",");s<n.length;s++){var a=n[s];i.push(a.trim().toLocaleLowerCase())}for(var r=0;r<t.length;r++){var l=-1!==t[r].type.indexOf(".")?t[r].type.replace(".",""):t[r].type;-1===i.indexOf(("."+l).toLocaleLowerCase())&&(t[r].status=this.localizedTexts("invalidFileType"),t[r].statusCode="0")}}return e},i.prototype.validatedFileSize=function(t){var e="",i="";return t<this.minFileSize?e=this.localizedTexts("invalidMinFileSize"):t>this.maxFileSize?i=this.localizedTexts("invalidMaxFileSize"):(e="",i=""),{minSize:e,maxSize:i}},i.prototype.isPreLoadFile=function(t){for(var e=!1,i=0;i<this.files.length;i++)this.files[i].name===t.name.slice(0,t.name.lastIndexOf("."))&&this.files[i].type===t.type&&(e=!0);return e},i.prototype.createCustomfileList=function(t){this.createParentUL();for(var i=0,s=t;i<s.length;i++){var n=s[i],a=this.createElement("li",{className:ai,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);(0,e.append)(l,a)}var o=t.indexOf(n),h={element:a,fileInfo:n,index:o,isPreload:this.isPreLoadFile(n)},u={element:a,fileInfo:n,index:o,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",h),this.trigger("fileListRendering",u),this.listParent.appendChild(a),this.fileList.push(a)}this.renderReactTemplates()},i.prototype.createParentUL=function(){(0,e.isNullOrUndefined)(this.listParent)&&(this.listParent=this.createElement("ul",{className:ni}),this.uploadWrapper.appendChild(this.listParent))},i.prototype.formFileList=function(t,i){var s=this.createElement("li",{className:ai});s.setAttribute("data-files-count",t.length+"");for(var n,a=this.createElement("span",{className:xi}),r=0,l=t;r<l.length;r++){var o=l[r],h=this.createElement("span",{className:li});h.innerHTML=this.getFileNameOnly(o.name);var u=this.createElement("span",{className:oi}),d=this.getFileType(o.name);if(u.innerHTML="."+d,d||u.classList.add("e-hidden"),this.enableRtl){var p=this.createElement("span",{className:Li});p.appendChild(u),p.appendChild(h),a.appendChild(p)}else a.appendChild(h),a.appendChild(u);this.truncateName(h),n=this.formValidateFileInfo(o,s)}s.appendChild(a),this.setListToFileInfo(t,s);var c=this.listParent.querySelectorAll("li").length,m=this.createElement("span");if(s.classList.contains(Bi)?(m.classList.add(ri),m.classList.add(Bi),m.innerText=t.length>1?this.localizedTexts("invalidFileSelection"):n):(m.classList.add(t.length>1?"e-file-information":hi),m.innerText=t.length>1?this.localizedTexts("totalFiles")+": "+t.length+" , "+this.localizedTexts("size")+": "+this.bytesToSize(this.getFileSize(t)):this.bytesToSize(t[0].size),this.createFormInput(t)),a.appendChild(m),(0,e.isNullOrUndefined)(s.querySelector(".e-icons"))){var v=this.createElement("span",{className:"e-icons",attrs:{tabindex:this.btnTabIndex}});"msie"===this.browserName&&v.classList.add("e-msie"),v.setAttribute("title",this.localizedTexts("remove")),s.appendChild(a),s.appendChild(v),e.EventHandler.add(v,"click",this.removeFiles,this),v.classList.add(ui)}var f={element:s,fileInfo:this.mergeFileInfo(t,s),index:c,isPreload:this.isPreLoadFile(this.mergeFileInfo(t,s))},g={element:s,fileInfo:this.mergeFileInfo(t,s),index:c,isPreload:this.isPreLoadFile(this.mergeFileInfo(t,s))};this.trigger("rendering",f),this.trigger("fileListRendering",g),this.listParent.appendChild(s),this.fileList.push(s)},i.prototype.formValidateFileInfo=function(t,e){var i=t.status,s=this.validatedFileSize(t.size);""===s.minSize&&""===s.maxSize||(this.addInvalidClass(e),i=""!==s.minSize?this.localizedTexts("invalidMinFileSize"):""!==s.maxSize?this.localizedTexts("invalidMaxFileSize"):i);var n=this.checkExtension(this.getFilesInArray(t))[0].status;return n===this.localizedTexts("invalidFileType")&&(this.addInvalidClass(e),i=n),i},i.prototype.addInvalidClass=function(t){t.classList.add(Bi)},i.prototype.createFormInput=function(t){if("safari"!==this.browserName){var i=this.element.cloneNode(!0);i.classList.add("e-hidden-file-input");for(var s=0,n=t;s<n.length;s++){n[s].input=i}i.setAttribute("id",(0,e.getUniqueID)("hiddenUploader")),i.setAttribute("name",this.uploaderName),this.uploadWrapper.querySelector("."+ii).appendChild(i),"msie"!==this.browserName&&"edge"!==this.browserName&&(this.element.value="")}},i.prototype.getFileSize=function(t){for(var e=0,i=0,s=t;i<s.length;i++){e+=s[i].size}return e},i.prototype.mergeFileInfo=function(t,e){for(var i={name:"",rawFile:"",size:0,status:"",type:"",validationMessages:{minSize:"",maxSize:""},statusCode:"1",list:e},s=[],n="",a=0,r=t;a<r.length;a++){var l=r[a];s.push(l.name),n=l.type}return i.name=s.join(", "),i.size=this.getFileSize(t),i.type=n,i.status=this.statusForFormUpload(t,e),i},i.prototype.statusForFormUpload=function(t,e){for(var i,s=!0,n=0,a=t;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")+": "+t.length+" , "+this.localizedTexts("size")+": "+this.bytesToSize(this.getFileSize(t)):(e.classList.add(Bi),i=t.length>1?this.localizedTexts("invalidFileSelection"):i),i},i.prototype.formCustomFileList=function(t,i){this.createParentUL();var s=this.createElement("li",{className:ai});s.setAttribute("data-files-count",t.length+""),this.setListToFileInfo(t,s);var n=this.mergeFileInfo(t,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);(0,e.append)(r,s)}var l=this.listParent.querySelectorAll("li").length;s.classList.contains(Bi)||this.createFormInput(t);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()},i.prototype.createFileList=function(t){this.filesData=this.filesData&&this.filesData.length>0?this.filesData.concat(t):t,this.internalCreateFileList(t)},i.prototype.internalCreateFileList=function(t){if(this.createParentUL(),""===this.template||(0,e.isNullOrUndefined)(this.template))if(this.isFormUpload())this.uploadWrapper.classList.add(Ai),this.formFileList(t,this.element.files);else for(var i=0,s=t;i<s.length;i++){var n=s[i],a=this.createElement("li",{className:ai,attrs:{"data-file-name":n.name,"data-files-count":"1"}}),r=this.createElement("span",{className:xi}),l=this.createElement("span",{className:li,attrs:{title:n.name}});l.innerHTML=this.getFileNameOnly(n.name);var o=this.createElement("span",{className:oi}),h=this.getFileType(n.name);if(o.innerHTML="."+h,h||o.classList.add("e-hidden"),this.enableRtl){var u=this.createElement("span",{className:Li});u.appendChild(o),u.appendChild(l),r.appendChild(u)}else r.appendChild(l),r.appendChild(o);var d=this.createElement("span",{className:hi});d.innerHTML=this.bytesToSize(n.size),r.appendChild(d);var p=this.createElement("span",{className:ri});r.appendChild(p),p.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),e.EventHandler.add(c,"click",this.removeFiles,this),"2"===n.statusCode?(p.classList.add(Ci),c.classList.add(di),c.setAttribute("title",this.localizedTexts("delete"))):"1"!==n.statusCode&&(p.classList.remove(Ci),p.classList.add(Si)),this.autoUpload&&"1"===n.statusCode&&""!==this.asyncSettings.saveUrl&&(p.innerHTML=""),c.classList.contains(di)||c.classList.add(ui);var m=t.indexOf(n),v={element:a,fileInfo:n,index:m,isPreload:this.isPreLoadFile(n)},f={element:a,fileInfo:n,index:m,isPreload:this.isPreLoadFile(n)};this.trigger("rendering",v),this.trigger("fileListRendering",f),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(Ai),this.formCustomFileList(t,this.element.files)):this.createCustomfileList(t)},i.prototype.getSlicedName=function(t){var e=t.textContent;t.dataset.tail=e.slice(e.length-10)},i.prototype.setListToFileInfo=function(t,e){for(var i=0,s=t;i<s.length;i++){s[i].list=e}},i.prototype.truncateName=function(t){var e=t;("edge"!==this.browserName&&e.offsetWidth<e.scrollWidth||e.offsetWidth+1<e.scrollWidth)&&this.getSlicedName(e)},i.prototype.getFileType=function(t){var e,i=t.lastIndexOf(".");return i>=0&&(e=t.substring(i+1)),e||""},i.prototype.getFileNameOnly=function(t){var e=this.getFileType(t);return t.split("."+e)[0]},i.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 t=document.createAttribute("multiple");this.element.setAttributeNode(t)}},i.prototype.filterfileList=function(t){for(var i,s=[],n=0;n<t.length;n++)i=this.getLiElement(t[n]),((0,e.isNullOrUndefined)(i)||i.classList.contains(Ci))&&(this.showFileList||"File uploaded successfully"===t[n].status)||s.push(t[n]);return s},i.prototype.updateStatus=function(t,i,s,n){if(void 0===n&&(n=!0),""===i||(0,e.isNullOrUndefined)(i)||""===s||(0,e.isNullOrUndefined)(s)||(t.status=i,t.statusCode=s),n){var a=this.getLiElement(t);(0,e.isNullOrUndefined)(a)||(0,e.isNullOrUndefined)(a.querySelector("."+ri))||""===i||(0,e.isNullOrUndefined)(i)||(a.querySelector("."+ri).textContent=i)}return t},i.prototype.getLiElement=function(t){for(var i,s=0;s<this.filesData.length;s++)(0,e.isNullOrUndefined)(t)||((0,e.isNullOrUndefined)(this.filesData[s].id)||(0,e.isNullOrUndefined)(t.id)?this.filesData[s].name!==t.name:this.filesData[s].name!==t.name||this.filesData[s].id!==t.id)||(i=s);return this.fileList[i]},i.prototype.createProgressBar=function(t){var e=this.createElement("span",{className:fi}),i=this.createElement("progressbar",{className:gi,attrs:{value:"0",max:"100"}}),s=this.createElement("span",{className:"e-progress-inner-wrap"});i.setAttribute("style","width: 0%");var n=this.createElement("span",{className:yi});n.textContent="0%",s.appendChild(i),e.appendChild(s),e.appendChild(n),t.querySelector("."+xi).appendChild(e)},i.prototype.updateProgressbar=function(t,i){if(!isNaN(Math.round(t.loaded/t.total*100))&&!(0,e.isNullOrUndefined)(i.querySelector("."+gi)))if((0,e.isNullOrUndefined)(this.progressInterval)||""===this.progressInterval)this.changeProgressValue(i,Math.round(t.loaded/t.total*100).toString()+"%");else{var s=Math.round(t.loaded/t.total*100)%parseInt(this.progressInterval,10);0!==s&&100!==s||this.changeProgressValue(i,Math.round(t.loaded/t.total*100).toString()+"%")}},i.prototype.changeProgressValue=function(t,e){t.querySelector("."+gi).setAttribute("style","width:"+e),t.querySelector("."+yi).textContent=e},i.prototype.uploadInProgress=function(t,i,s,n){var a=this.getLiElement(i);if(!(0,e.isNullOrUndefined)(a)||s){if((0,e.isNullOrUndefined)(a))this.cancelUploadingFile(i,t,n);else{"5"===i.statusCode&&this.cancelUploadingFile(i,t,n,a),a.querySelectorAll("."+fi).length>0||!a.querySelector("."+ri)||(a.querySelector("."+ri).classList.add(bi),this.createProgressBar(a),this.updateProgressBarClasses(a,bi),a.querySelector("."+ri).classList.remove(Ei)),this.updateProgressbar(t,a);var r=a.querySelector("."+ui);(0,e.isNullOrUndefined)(r)||(r.classList.add(ci,bi),r.setAttribute("title",this.localizedTexts("abort")),r.classList.remove(ui))}var l={e:t,operation:"upload",file:this.updateStatus(i,this.localizedTexts("inProgress"),"3")};this.trigger("progress",l)}},i.prototype.cancelUploadingFile=function(t,i,s,n){var a=this;if("5"===t.statusCode){var r={event:i,fileData:t,cancel:!1,customFormData:[],currentRequest:null};this.trigger("canceling",r,(function(i){if(i.cancel){if(t.statusCode="3",!(0,e.isNullOrUndefined)(n)){var r=n.querySelector("."+ci);(0,e.isNullOrUndefined)(r)||((0,Mt.hideSpinner)(r),(0,e.detach)(n.querySelector(".e-spinner-pane")))}}else{s.emitError=!1,s.httpRequest.abort();var l=new FormData;if("5"===t.statusCode){var o=a.element.getAttribute("name");l.append(o,t.name),l.append("cancel-uploading",t.name),a.updateFormData(l,i.customFormData);var h=new e.Ajax(a.asyncSettings.removeUrl,"POST",!0,null);h.emitError=!1,h.beforeSend=function(t){i.currentRequest&&a.updateCustomheader(h.httpRequest,i.currentRequest)},h.onLoad=function(e){return a.removecanceledFile(e,t),{}},h.send(l)}}}))}},i.prototype.removecanceledFile=function(t,i){var s=this.getLiElement(i);if(!((0,e.isNullOrUndefined)(s)||s.querySelector("."+mi)||(0,e.isNullOrUndefined)(s.querySelector("."+ci)))){this.updateStatus(i,this.localizedTexts("fileUploadCancel"),"5"),this.renderFailureState(t,i,s);var n=s.querySelector("."+ui);(0,e.isNullOrUndefined)(s)||((0,Mt.hideSpinner)(n),(0,e.isNullOrUndefined)(s.querySelector(".e-spinner-pane"))||(0,e.detach)(s.querySelector(".e-spinner-pane")));var a={event:t,response:t&&t.currentTarget?this.getResponse(t):null,operation:"cancel",file:i};this.trigger("success",a)}},i.prototype.renderFailureState=function(t,i,s){var n=this;this.updateProgressBarClasses(s,Ei),this.removeProgressbar(s,"failure"),(0,e.isNullOrUndefined)(s.querySelector(".e-file-status"))||s.querySelector(".e-file-status").classList.add(Ei);var a=s.querySelector("."+ci);(0,e.isNullOrUndefined)(a)||(a.classList.remove(ci,bi),a.classList.add(ui),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")),s.querySelector("."+mi).addEventListener("click",(function(t){n.reloadcanceledFile(t,i,s,!1)}),!1))},i.prototype.reloadcanceledFile=function(t,i,s,n){i.statusCode="1",i.status=this.localizedTexts("readyToUploadMessage"),n||((0,e.isNullOrUndefined)(s.querySelector("."+ri))||s.querySelector("."+ri).classList.remove(Ei),(0,e.isNullOrUndefined)(s.querySelector("."+mi))||(0,e.detach)(s.querySelector("."+mi)),this.pauseButton=null),(0,e.isNullOrUndefined)(s)||s.classList.add(Hi),this.upload([i])},i.prototype.uploadComplete=function(t,i,s){var n=t.target;if(4===n.readyState&&n.status>=200&&n.status<=299){var a=this.getLiElement(i);if((0,e.isNullOrUndefined)(a)&&(!s||(0,e.isNullOrUndefined)(s))&&this.showFileList)return;if(!(0,e.isNullOrUndefined)(a)){this.updateProgressBarClasses(a,Ci),this.removeProgressbar(a,"success");var r=a.querySelector("."+ci);(0,e.isNullOrUndefined)(r)||(r.classList.add(di),r.setAttribute("title",this.localizedTexts("delete")),r.classList.remove(ci),r.classList.remove(bi))}this.raiseSuccessEvent(t,i)}else this.uploadFailed(t,i)},i.prototype.getResponse=function(t){var e=t.currentTarget;return{readyState:e.readyState,statusCode:e.status,statusText:e.statusText,headers:e.getAllResponseHeaders(),withCredentials:e.withCredentials}},i.prototype.raiseSuccessEvent=function(t,i){var s=this,n=t&&t.currentTarget?this.getResponse(t):null,a=this.localizedTexts("uploadSuccessMessage"),r={e:t,response:n,operation:"upload",file:this.updateStatus(i,a,"2",!1),statusText:a},l=this.getLiElement(i);if(!(0,e.isNullOrUndefined)(l)){var o=l.querySelector("."+pi);(0,e.isNullOrUndefined)(o)||((0,Mt.hideSpinner)(l),(0,e.detach)(o))}this.trigger("success",r,(function(t){s.updateStatus(i,t.statusText,"2"),s.uploadedFilesData.push(i),s.trigger("change",{file:s.uploadedFilesData}),s.checkActionButtonStatus(),s.fileList.length>0?s.getLiElement(i).classList.contains(Hi)?s.getLiElement(i).classList.remove(Hi):(s.uploadSequential(),s.checkActionComplete(!0)):s.showFileList||s.checkActionComplete(!0)}))},i.prototype.uploadFailed=function(t,i){var s=this,n=this.getLiElement(i),a=t&&t.currentTarget?this.getResponse(t):null,r=this.localizedTexts("uploadFailedMessage"),l={e:t,response:a,operation:"upload",file:this.updateStatus(i,r,"0",!1),statusText:r};(0,e.isNullOrUndefined)(n)||this.renderFailureState(t,i,n),this.trigger("failure",l,(function(t){s.updateStatus(i,t.statusText,"0"),s.checkActionButtonStatus(),s.uploadSequential(),s.checkActionComplete(!0)}))},i.prototype.uploadSequential=function(){this.sequentialUpload&&(this.autoUpload?this.checkAutoUpload(this.filesData):this.uploadButtonClick())},i.prototype.checkActionComplete=function(t){t?++this.actionCompleteCount:--this.actionCompleteCount,this.raiseActionComplete()},i.prototype.raiseActionComplete=function(){if(this.filesData.length===this.actionCompleteCount&&this.flag){this.flag=!1;var t={fileData:[]};t.fileData=this.getSelectedFileStatus(this.selectedFiles),this.trigger("actionComplete",t)}},i.prototype.getSelectedFileStatus=function(t){for(var e=[],i=0,s=0;s<t.length;s++)for(var n=t[s],a=0;a<this.filesData.length;a++)this.filesData[a].name===n.name&&this.filesData[a].status===n.status&&(e[i]=this.filesData[a],++i);return e},i.prototype.updateProgressBarClasses=function(t,i){var s=t.querySelector("."+gi);(0,e.isNullOrUndefined)(s)||s.classList.add(i)},i.prototype.removeProgressbar=function(t,i){var s=this;(0,e.isNullOrUndefined)(t.querySelector("."+fi))||(this.progressAnimation=new e.Animation({duration:1250}),this.progressAnimation.animate(t.querySelector("."+fi),{name:"FadeOut"}),this.progressAnimation.animate(t.querySelector("."+yi),{name:"FadeOut"}),setTimeout((function(){s.animateProgressBar(t,i)}),750))},i.prototype.animateProgressBar=function(t,i){"success"===i?(t.classList.add(Ci),(0,e.isNullOrUndefined)(t.querySelector("."+ri))||(t.querySelector("."+ri).classList.remove(bi),this.progressAnimation.animate(t.querySelector("."+ri),{name:"FadeIn"}),t.querySelector("."+ri).classList.add(Ci))):(0,e.isNullOrUndefined)(t.querySelector("."+ri))||(t.querySelector("."+ri).classList.remove(bi),this.progressAnimation.animate(t.querySelector("."+ri),{name:"FadeIn"}),t.querySelector("."+ri).classList.add(Ei)),t.querySelector("."+fi)&&(0,e.detach)(t.querySelector("."+fi))},i.prototype.setExtensions=function(t){""===t||(0,e.isNullOrUndefined)(t)?this.element.removeAttribute("accept"):this.element.setAttribute("accept",t)},i.prototype.templateComplier=function(t){if(t)try{return"function"!=typeof t&&(0,e.selectAll)(t,document).length?(0,e.compile)((0,e.select)(t,document).innerHTML.trim()):(0,e.compile)(t)}catch(i){return(0,e.compile)(t)}},i.prototype.setRTL=function(){this.enableRtl?(0,e.addClass)([this.uploadWrapper],ki):(0,e.removeClass)([this.uploadWrapper],ki)},i.prototype.localizedTexts=function(t){return this.l10n.setLocale(this.locale),this.l10n.getConstant(t)},i.prototype.setControlStatus=function(){this.enabled?(this.uploadWrapper.classList.contains(Pi)&&this.uploadWrapper.classList.remove(Pi),!(0,e.isNullOrUndefined)(this.browseButton)&&this.element.hasAttribute("disabled")&&(this.element.removeAttribute("disabled"),this.browseButton.removeAttribute("disabled")),!(0,e.isNullOrUndefined)(this.clearButton)&&this.clearButton.hasAttribute("disabled")&&this.clearButton.removeAttribute("disabled"),!(0,e.isNullOrUndefined)(this.uploadButton)&&this.uploadButton.hasAttribute("disabled")&&this.uploadButton.hasAttribute("disabled")):(this.uploadWrapper.classList.add(Pi),this.element.setAttribute("disabled","disabled"),this.browseButton.setAttribute("disabled","disabled"),(0,e.isNullOrUndefined)(this.clearButton)||this.clearButton.setAttribute("disabled","disabled"),(0,e.isNullOrUndefined)(this.uploadButton)||this.uploadButton.setAttribute("disabled","disabled"))},i.prototype.checkHTMLAttributes=function(t){for(var i=0,s=t?(0,e.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["accept","multiple","disabled"];i<s.length;i++){var n=s[i];if(!(0,e.isNullOrUndefined)(this.element.getAttribute(n)))switch(n){case"accept":((0,e.isNullOrUndefined)(this.uploaderOptions)||void 0===this.uploaderOptions.allowedExtensions||t)&&(this.setProperties({allowedExtensions:this.element.getAttribute("accept")},!t),this.initialAttr.accept=this.allowedExtensions);break;case"multiple":if((0,e.isNullOrUndefined)(this.uploaderOptions)||void 0===this.uploaderOptions.multiple||t){var a="multiple"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({multiple:a},!t),this.initialAttr.multiple=!0}break;case"disabled":if((0,e.isNullOrUndefined)(this.uploaderOptions)||void 0===this.uploaderOptions.enabled||t){var r="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:r},!t),this.initialAttr.disabled=!0}}}},i.prototype.chunkUpload=function(t,e,i){var s=Math.min(this.asyncSettings.chunkSize,t.size),n={chunkIndex:0,blob:t.rawFile.slice(0,s),file:t,start:0,end:s,retryCount:0,request:null};this.sendRequest(t,n,e,i)},i.prototype.sendRequest=function(t,i,s,n){var a=this,r=new FormData,l=t.rawFile.slice(i.start,i.end);r.append(this.uploaderName,l,t.name),r.append("chunk-index",i.chunkIndex.toString()),r.append("chunkIndex",i.chunkIndex.toString());var o=Math.max(Math.ceil(t.size/this.asyncSettings.chunkSize),1);r.append("total-chunk",o.toString()),r.append("totalChunk",o.toString());var h=new e.Ajax({url:this.asyncSettings.saveUrl,type:"POST",async:!0,contentType:null});h.emitError=!1,h.onLoad=function(t){return a.chunkUploadComplete(t,i,s),{}},h.onUploadProgress=function(t){return a.chunkUploadInProgress(t,i,s),{}};var u={fileData:t,customFormData:[],cancel:!1,chunkSize:0===this.asyncSettings.chunkSize?null:this.asyncSettings.chunkSize};h.beforeSend=function(e){u.currentRequest=h.httpRequest,u.currentChunkIndex=i.chunkIndex,0===u.currentChunkIndex?a.trigger("uploading",u,(function(i){a.uploadingEventCallback(r,i,e,t)})):a.trigger("chunkUploading",u,(function(i){a.uploadingEventCallback(r,i,e,t)}))},h.onError=function(t){return a.chunkUploadFailed(t,i,s),{}},h.send(r),i.request=h},i.prototype.uploadingEventCallback=function(t,e,i,s){e.cancel?this.eventCancelByArgs(i,e,s):this.updateFormData(t,e.customFormData)},i.prototype.eventCancelByArgs=function(t,i,s){var n=this;if(t.cancel=!0,"5"!==i.fileData.statusCode){i.fileData.statusCode="5",i.fileData.status=this.localizedTexts("fileUploadCancel");var a=this.getLiElement(i.fileData);if(a){(0,e.isNullOrUndefined)(a.querySelector("."+ri))||(a.querySelector("."+ri).innerHTML=this.localizedTexts("fileUploadCancel"),a.querySelector("."+ri).classList.add(Ei)),this.pauseButton=this.createElement("span",{className:"e-icons e-file-reload-btn",attrs:{tabindex:this.btnTabIndex}});var r=a.querySelector("."+ui);r&&r.parentElement.insertBefore(this.pauseButton,r),this.pauseButton.setAttribute("title",this.localizedTexts("retry")),this.pauseButton.addEventListener("click",(function(t){n.reloadcanceledFile(t,s,a)}),!1),this.checkActionButtonStatus()}}},i.prototype.checkChunkUpload=function(){return!(this.asyncSettings.chunkSize<=0||(0,e.isNullOrUndefined)(this.asyncSettings.chunkSize))},i.prototype.chunkUploadComplete=function(t,i,s){var n,a=this,r=t.target;if(4===r.readyState&&r.status>=200&&r.status<300){var l=t&&t.currentTarget?this.getResponse(t):null,o=Math.max(Math.ceil(i.file.size/this.asyncSettings.chunkSize),1),h={event:t,file:i.file,chunkIndex:i.chunkIndex,totalChunk:o,chunkSize:this.asyncSettings.chunkSize,response:l};if(this.trigger("chunkSuccess",h),!(0,e.isNullOrUndefined)(s)&&s||(n=this.getLiElement(i.file)),this.updateMetaData(i),i.end===i.file.size&&(i.file.statusCode="3"),"5"===i.file.statusCode){var u={event:t,fileData:i.file,cancel:!1,customFormData:[]};this.trigger("canceling",u,(function(t){if(t.cancel){i.file.statusCode="3";var l=n.querySelector("."+ci);(0,e.isNullOrUndefined)(n)||(0,e.isNullOrUndefined)(l)||((0,Mt.hideSpinner)(l),(0,e.detach)(n.querySelector(".e-spinner-pane"))),a.sendNextRequest(i)}else{i.request.emitError=!1,r.abort();var o=new FormData,h=a.element.getAttribute("name");o.append(h,i.file.name),o.append("cancel-uploading",i.file.name),o.append("cancelUploading",i.file.name),a.updateFormData(o,t.customFormData);var u=new e.Ajax(a.asyncSettings.removeUrl,"POST",!0,null);u.emitError=!1,u.onLoad=function(t){return a.removeChunkFile(t,i,s),{}},u.send(o)}}))}else{if(o-1===i.chunkIndex&&o>i.chunkIndex){var d=this.pausedData.indexOf(i);return d>=0&&this.pausedData.splice(d,1),(0,e.isNullOrUndefined)(this.template)&&((0,e.isNullOrUndefined)(s)||!s)&&n&&(n&&!(0,e.isNullOrUndefined)(n.querySelector("."+wi))&&(0,e.detach)(n.querySelector("."+wi)),this.removeChunkProgressBar(i)),void this.raiseSuccessEvent(t,i.file)}"4"!==i.file.statusCode&&this.sendNextRequest(i)}}else this.chunkUploadFailed(t,i)},i.prototype.sendNextRequest=function(t){t.start=t.end,t.end+=this.asyncSettings.chunkSize,t.end=Math.min(t.end,t.file.size),t.chunkIndex+=1,this.sendRequest(t.file,t)},i.prototype.removeChunkFile=function(t,i,s){if((0,e.isNullOrUndefined)(this.template)&&(0,e.isNullOrUndefined)(s)&&!s){var n=this.getLiElement(i.file),a=n.querySelector("."+ci),r=a;this.updateStatus(i.file,this.localizedTexts("fileUploadCancel"),"5"),this.updateProgressBarClasses(n,Ei),this.removeProgressbar(n,"failure"),a&&(a.classList.remove(ci),a.classList.add(ui),a.setAttribute("title",this.localizedTexts("remove")));var l=n.querySelector("."+wi);l&&(l.classList.add(mi),l.classList.remove(wi),l.setAttribute("title",this.localizedTexts("retry"))),(0,e.isNullOrUndefined)(n)||(0,e.isNullOrUndefined)(a)||(0,e.isNullOrUndefined)(n.querySelector(".e-spinner-pane"))||((0,Mt.hideSpinner)(r),(0,e.detach)(n.querySelector(".e-spinner-pane")))}},i.prototype.pauseUpload=function(t,e,i){t.file.statusCode="4",t.file.status=this.localizedTexts("pause"),this.updateMetaData(t);var s={event:e||null,file:t.file,chunkIndex:t.chunkIndex,chunkCount:Math.round(t.file.size/this.asyncSettings.chunkSize),chunkSize:this.asyncSettings.chunkSize};this.abortUpload(t,i,s)},i.prototype.abortUpload=function(t,i,s){"4"!==t.file.statusCode&&(t.request.emitError=!1,t.request.httpRequest.abort());var n=this.getLiElement(t.file);if((0,e.isNullOrUndefined)(this.template)&&((0,e.isNullOrUndefined)(i)||!i)){var a=n.querySelector("."+wi);a.classList.remove(wi),a.classList.add(Ti),a.setAttribute("title",this.localizedTexts("resume")),a.nextElementSibling.classList.add(ui),a.nextElementSibling.classList.remove(ci),a.nextElementSibling.setAttribute("title",this.localizedTexts("remove"))}for(var r=0;r<this.pausedData.length;r++)this.pausedData[r].file.name===t.file.name&&this.pausedData.splice(r,1);this.pausedData.push(t),this.trigger("pausing",s)},i.prototype.resumeUpload=function(t,i,s){var n,a=this.getLiElement(t.file);(0,e.isNullOrUndefined)(a)||(n=a.querySelector("."+Ti)),(0,e.isNullOrUndefined)(n)||!(0,e.isNullOrUndefined)(s)&&s||(n.classList.remove(Ti),n.classList.add(wi),n.setAttribute("title",this.localizedTexts("pause")),n.nextElementSibling.classList.remove(ui),n.nextElementSibling.classList.add(ci),n.nextElementSibling.setAttribute("title",this.localizedTexts("abort"))),t.file.status=this.localizedTexts("inProgress"),t.file.statusCode="3",this.updateMetaData(t);var r={event:i||null,file:t.file,chunkIndex:t.chunkIndex,chunkCount:Math.round(t.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,t,s):this.pausedData[l].file.name===t.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))},i.prototype.updateMetaData=function(t){-1===this.uploadMetaData.indexOf(t)||this.uploadMetaData.splice(this.uploadMetaData.indexOf(t),1),this.uploadMetaData.push(t)},i.prototype.removeChunkProgressBar=function(t){var i=this.getLiElement(t.file);if(!(0,e.isNullOrUndefined)(i)){this.updateProgressBarClasses(i,Ci),this.removeProgressbar(i,"success");var s=i.querySelector("."+ci);(0,e.isNullOrUndefined)(s)||(s.classList.add(di),s.setAttribute("title",this.localizedTexts("delete")),s.classList.remove(ci,bi))}},i.prototype.chunkUploadFailed=function(t,i,s){var n,a=this,r=Math.max(Math.ceil(i.file.size/this.asyncSettings.chunkSize),1);!(0,e.isNullOrUndefined)(this.template)||!(0,e.isNullOrUndefined)(s)&&s||(n=this.getLiElement(i.file));var l=t&&t.currentTarget?this.getResponse(t):null,o={event:t,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(!(0,e.isNullOrUndefined)(n)){var o=n.querySelector("."+wi)?n.querySelector("."+wi):n.querySelector("."+Ti);(0,e.isNullOrUndefined)(o)||(o.classList.add(mi),o.classList.remove(wi,Ti)),a.updateProgressBarClasses(n,Ei),a.removeProgressbar(n,"failure"),n.querySelector(".e-icons").classList.remove(bi);var h=n.querySelector("."+ci)?n.querySelector("."+ci):n.querySelector("."+ui);h.classList.remove(ci),(0,e.isNullOrUndefined)(n.querySelector("."+wi))||(0,e.detach)(n.querySelector("."+wi)),i.start>0?(h.classList.add(di),h.setAttribute("title",a.localizedTexts("delete"))):(h.classList.add(ui),h.setAttribute("title",a.localizedTexts("remove")))}i.retryCount=0;var u=i.file,d=a.localizedTexts("uploadFailedMessage"),p={e:t,response:l,operation:"upload",file:a.updateStatus(u,d,"0",!1),statusText:d};a.trigger("failure",p,(function(t){a.updateStatus(u,t.statusText,"0"),a.uploadSequential(),a.checkActionComplete(!0)}))}}))},i.prototype.retryRequest=function(t,i,s){(0,e.isNullOrUndefined)(this.template)&&((0,e.isNullOrUndefined)(s)||!s)&&t&&this.updateProgressBarClasses(t,Ei),i.retryCount+=1,this.sendRequest(i.file,i)},i.prototype.checkPausePlayAction=function(t){var e=t.target,i=t.target.parentElement,s=this.fileList.indexOf(i),n=this.filesData[s],a=this.getCurrentMetaData(n);e.classList.contains(wi)?this.pauseUpload(a,t):e.classList.contains(Ti)?this.resumeUpload(a,t):e.classList.contains(mi)&&(a.file.status===this.localizedTexts("fileUploadCancel")?this.retryUpload(a,!1):this.retryUpload(a,!0))},i.prototype.retryUpload=function(t,e){e?(t.end=t.end+this.asyncSettings.chunkSize,t.start=t.start+this.asyncSettings.chunkSize,this.sendRequest(t.file,t)):(t.file.statusCode="1",t.file.status=this.localizedTexts("readyToUploadMessage"),this.chunkUpload(t.file)),this.getLiElement(t.file).classList.add(Hi)},i.prototype.chunkUploadInProgress=function(t,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(!(0,e.isNullOrUndefined)(a)){var r=a.querySelector("."+mi);if((0,e.isNullOrUndefined)(r)||(r.classList.add(wi),r.setAttribute("title",this.localizedTexts("pause")),r.classList.remove(mi)),!(0,e.isNullOrUndefined)(a)){if(!(a.querySelectorAll("."+fi).length>0)){var l=a.querySelector("."+ri);(0,e.isNullOrUndefined)(this.template)&&(l.classList.add(bi),l.classList.remove(Ei),this.createProgressBar(a),this.updateProgressBarClasses(a,bi));var o=a.querySelector("."+ui)?a.querySelector("."+ui):a.querySelector("."+di);(0,e.isNullOrUndefined)(o)||(o.classList.add(ci),o.setAttribute("title",this.localizedTexts("abort")),o.classList.remove(ui))}if(!isNaN(Math.round(t.loaded/t.total*100))&&(0,e.isNullOrUndefined)(this.template)&&"4"!==i.file.statusCode){var h=void 0,u=Math.ceil(i.file.size/this.asyncSettings.chunkSize)-1;this.asyncSettings.chunkSize&&u&&(h=Math.round(i.chunkIndex/u*100),this.changeProgressValue(a,h.toString()+"%"))}0===i.chunkIndex&&this.checkActionButtonStatus()}if((0,e.isNullOrUndefined)(a.querySelector("."+wi))&&(0,e.isNullOrUndefined)(this.template)&&(0,e.isNullOrUndefined)(a.querySelector("."+di))){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("."+ci);d.parentElement.insertBefore(this.pauseButton,d),this.pauseButton.setAttribute("title",this.localizedTexts("pause")),this.pauseButton.addEventListener("click",(function(t){n.checkPausePlayAction(t)}),!1)}}}},i.prototype.bytesToSize=function(t){var e=-1;if(!t)return"0.0 KB";do{t/=1024,e++}while(t>99);return e>=2&&(t*=1024,e=1),Math.max(t,0).toFixed(1)+" "+["KB","MB"][e]},i.prototype.sortFileList=function(t){for(var e=t=t||this.sortFilesList,i=[],s=0;s<e.length;s++)i.push(e[s].name);for(var n=[],a=0,r=i.sort();a<r.length;a++){var l=r[a];for(s=0;s<e.length;s++)l===e[s].name&&n.push(e[s])}return n},i.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)}(0,e.isNullOrUndefined)(this.uploadWrapper)||(this.uploadWrapper.parentElement.appendChild(this.element),(0,e.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,t.prototype.destroy.call(this)},i.prototype.upload=function(t,e){var i=this;if(t=t||this.filesData,this.sequentialUpload&&(this.isFirstFileOnSelection||e))this.sequenceUpload(t);else{var s=this.getFilesInArray(t);this.trigger("beforeUpload",{customFormData:[],currentRequest:null,cancel:!1},(function(t){t.cancel||i.uploadFiles(s,e)}))}},i.prototype.getFilesInArray=function(t){var e=[];return t instanceof Array?e=t:e.push(t),e},i.prototype.serverReadFileBase64=function(t,e,i){var s=this;return new Promise((function(n,a){var r,l=s.fileStreams[t].rawFile;try{var o=new FileReader;o.onload=(r=o,function(){try{var t=r.result,e=t?t.split(";base64,")[1]:null;n(e)}catch(t){a(t)}}),o.readAsDataURL(l.slice(e,e+i))}catch(t){a(t)}}))},i.prototype.uploadFileCount=function(t){var e=this.filesData;return e&&0!==e.length?e.length:-1},i.prototype.getFileRead=function(t,e){var i=this.filesData;if(!i||0===i.length)return-1;var s=i[t],n=this.newFileRef++;return this.fileStreams[n]=s,n},i.prototype.uploadFiles=function(t,i){var s=[];if(""!==this.asyncSettings.saveUrl&&!(0,e.isNullOrUndefined)(this.asyncSettings.saveUrl)){if(!i||(0,e.isNullOrUndefined)(i))if(this.multiple)s=this.filterfileList(t);else{var n=[];n.push(t[0]),s=this.filterfileList(n)}else s=t;for(var a=0;a<s.length;a++)this.uploadFilesRequest(s,a,i)}},i.prototype.uploadFilesRequest=function(t,i,s){var n=this,a=this.checkChunkUpload(),r=new e.Ajax(this.asyncSettings.saveUrl,"POST",!0,null);r.emitError=!1;var l={fileData:t[i],customFormData:[],cancel:!1},o=new FormData;if(r.beforeSend=function(e){l.currentRequest=r.httpRequest,n.trigger("uploading",l,(function(s){s.cancel&&n.eventCancelByArgs(e,s,t[i]),n.updateFormData(o,s.customFormData)}))},"1"===t[i].statusCode){var h=this.element.getAttribute("name");o.append(h,t[i].rawFile,t[i].name),a&&t[i].size>this.asyncSettings.chunkSize?this.chunkUpload(t[i],s,i):(r.onLoad=function(e){return l.cancel||n.uploadComplete(e,t[i],s),{}},r.onUploadProgress=function(e){return l.cancel||n.uploadInProgress(e,t[i],s,r),{}},r.onError=function(e){return n.uploadFailed(e,t[i]),{}},r.send(o))}},i.prototype.spliceFiles=function(t){for(var e=this.fileList[t],i=this.getFilesData(),s=+e.getAttribute("data-files-count"),n=0,a=0;a<t;a++)n+=+this.fileList[a].getAttribute("data-files-count");for(var r=n+s-1;r>=n;r--)i.splice(r,1)},i.prototype.remove=function(t,i,s,n,a){var r=this;(0,e.isNullOrUndefined)(n)&&(n=!0);var l={event:a,cancel:!1,filesData:[],customFormData:[],postRawFile:n,currentRequest:null};this.trigger("beforeRemove",{cancel:!1,customFormData:[],currentRequest:null},(function(n){if(!n.cancel)if(r.isFormUpload())l.filesData=t,r.trigger("removing",l,(function(i){if(!i.cancel)for(var s=!1,n=void 0,a=0,l=r.getFilesInArray(t);a<l.length;a++){var o=l[a];if(s||(n=r.fileList.indexOf(o.list)),n>-1){var h=(0,e.isNullOrUndefined)(o.input)?null:o.input;h&&(0,e.detach)(h),r.spliceFiles(n),(0,e.detach)(r.fileList[n]),r.fileList.splice(n,1),s=!0,n=-1}}}));else if(r.isForm&&((0,e.isNullOrUndefined)(r.asyncSettings.removeUrl)||""===r.asyncSettings.removeUrl))l.filesData=r.getFilesData(),r.trigger("removing",l,(function(t){t.cancel||r.clearAll()}));else{var o=[];(t=(0,e.isNullOrUndefined)(t)?r.filesData:t)instanceof Array?o=t:o.push(t),l.filesData=o;for(var h=r.asyncSettings.removeUrl,u=""!==h&&!(0,e.isNullOrUndefined)(h),d=function(t){var e=r.uploadedFilesData.indexOf(t);("2"===t.statusCode||"4"===t.statusCode||"0"===t.statusCode&&-1!==e)&&u?r.removeUploadedFile(t,l,s,i):s?r.removeFilesData(t,i):r.trigger("removing",l,(function(e){e.cancel||r.removeFilesData(t,i)})),a&&!a.target.classList.contains(ui)&&r.checkActionComplete(!1)},p=0,c=o;p<c.length;p++){d(c[p])}}}))},i.prototype.clearAll=function(){var t=this;if((0,e.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(e){e.cancel||(t.clearData(),t.actionCompleteCount=0,t.count=-1)}))},i.prototype.getFilesData=function(t){return(0,e.isNullOrUndefined)(t)?this.filesData:this.getSelectedFiles(t)},i.prototype.pause=function(t,e){t=t||this.filesData;var i=this.getFilesInArray(t);this.pauseUploading(i,e)},i.prototype.pauseUploading=function(t,e){for(var i=this.getFiles(t),s=0;s<i.length;s++)"3"===i[s].statusCode&&this.pauseUpload(this.getCurrentMetaData(i[s],null),null,e)},i.prototype.getFiles=function(t){var i=[];return(0,e.isNullOrUndefined)(t)||t instanceof Array?i=t:i.push(t),i},i.prototype.resume=function(t,e){t=t||this.filesData;var i=this.getFilesInArray(t);this.resumeFiles(i,e)},i.prototype.resumeFiles=function(t,e){for(var i=this.getFiles(t),s=0;s<i.length;s++)"4"===i[s].statusCode&&this.resumeUpload(this.getCurrentMetaData(i[s],null),null,e)},i.prototype.retry=function(t,e,i){t=t||this.filesData;var s=this.getFilesInArray(t);this.sequentialUpload&&this.isFirstFileOnSelection&&(this.isFirstFileOnSelection=!1),this.retryFailedFiles(s,e,i)},i.prototype.retryFailedFiles=function(t,e,i){for(var s=this.getFiles(t),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),e);else{var a=void 0;i||(a=this.fileList[this.filesData.indexOf(s[n])]),this.reloadcanceledFile(null,s[n],a,i)}},i.prototype.cancel=function(t){t=t||this.filesData;var e=this.getFilesInArray(t);this.cancelUpload(e)},i.prototype.cancelUpload=function(t){var e=this.getFiles(t);if(this.asyncSettings.chunkSize>0){for(var i=0;i<e.length;i++)if("3"===e[i].statusCode){var s=this.getCurrentMetaData(e[i],null);s.file.statusCode="5",s.file.status=this.localizedTexts("fileUploadCancel"),this.updateMetaData(s),this.showHideUploadSpinner(e[i])}}else for(i=0;i<e.length;i++)"3"===e[i].statusCode&&(e[i].statusCode="5",e[i].status=this.localizedTexts("fileUploadCancel"),this.showHideUploadSpinner(e[i]))},i.prototype.showHideUploadSpinner=function(t){var i=this.getLiElement(t);if(!(0,e.isNullOrUndefined)(i)&&(0,e.isNullOrUndefined)(this.template)){var s=i.querySelector("."+ci);(0,Mt.createSpinner)({target:s,width:"20px"}),(0,Mt.showSpinner)(s)}},ei([(0,e.Complex)({saveUrl:"",removeUrl:""},Vi)],i.prototype,"asyncSettings",void 0),ei([(0,e.Property)(!1)],i.prototype,"sequentialUpload",void 0),ei([(0,e.Property)({})],i.prototype,"htmlAttributes",void 0),ei([(0,e.Property)("")],i.prototype,"cssClass",void 0),ei([(0,e.Property)(!0)],i.prototype,"enabled",void 0),ei([(0,e.Property)(null)],i.prototype,"template",void 0),ei([(0,e.Property)(!0)],i.prototype,"multiple",void 0),ei([(0,e.Property)(!0)],i.prototype,"autoUpload",void 0),ei([(0,e.Property)(!0)],i.prototype,"enableHtmlSanitizer",void 0),ei([(0,e.Complex)({},Ri)],i.prototype,"buttons",void 0),ei([(0,e.Property)("")],i.prototype,"allowedExtensions",void 0),ei([(0,e.Property)(0)],i.prototype,"minFileSize",void 0),ei([(0,e.Property)(3e7)],i.prototype,"maxFileSize",void 0),ei([(0,e.Property)(null)],i.prototype,"dropArea",void 0),ei([(0,e.Collection)([{}],Ui)],i.prototype,"files",void 0),ei([(0,e.Property)(!0)],i.prototype,"showFileList",void 0),ei([(0,e.Property)(!1)],i.prototype,"directoryUpload",void 0),ei([(0,e.Property)("Default")],i.prototype,"dropEffect",void 0),ei([(0,e.Event)()],i.prototype,"created",void 0),ei([(0,e.Event)()],i.prototype,"actionComplete",void 0),ei([(0,e.Event)()],i.prototype,"rendering",void 0),ei([(0,e.Event)()],i.prototype,"beforeUpload",void 0),ei([(0,e.Event)()],i.prototype,"fileListRendering",void 0),ei([(0,e.Event)()],i.prototype,"selected",void 0),ei([(0,e.Event)()],i.prototype,"uploading",void 0),ei([(0,e.Event)()],i.prototype,"success",void 0),ei([(0,e.Event)()],i.prototype,"failure",void 0),ei([(0,e.Event)()],i.prototype,"removing",void 0),ei([(0,e.Event)()],i.prototype,"beforeRemove",void 0),ei([(0,e.Event)()],i.prototype,"clearing",void 0),ei([(0,e.Event)()],i.prototype,"progress",void 0),ei([(0,e.Event)()],i.prototype,"change",void 0),ei([(0,e.Event)()],i.prototype,"chunkSuccess",void 0),ei([(0,e.Event)()],i.prototype,"chunkFailure",void 0),ei([(0,e.Event)()],i.prototype,"chunkUploading",void 0),ei([(0,e.Event)()],i.prototype,"canceling",void 0),ei([(0,e.Event)()],i.prototype,"pausing",void 0),ei([(0,e.Event)()],i.prototype,"resuming",void 0),i=ei([e.NotifyPropertyChanges],i)}(e.Component),Mi=a(295),Ii=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Di=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},zi="e-apply",Wi="e-cancel",qi="e-current",ji="e-ctrl-btn",_i="e-switch-ctrl-btn",Ki="e-disabled",Xi="e-value-switch-btn",Yi="e-handler",Zi="e-hex",Ji="e-hide-hex-value",$i="e-hide-opacity",Gi="e-hide-switchable-value",Qi="e-hide-value",ts="e-hide-valueswitcher",es="e-hsv-color",is="e-hsv-container",ss="e-selected-value",ns="e-mode-switch-btn",as="e-nocolor-item",rs="e-opacity-value",ls="e-palette",os="e-color-palette",hs="e-color-picker",us="e-preview-container",ds="e-previous",ps="e-show-value",cs="e-selected",ms="e-split-preview",vs="e-tile",fs=["#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"],gs=function(i){function s(t,e){return i.call(this,t,e)||this}return Ii(s,i),s.prototype.preRender=function(){var t=this.element;this.formElement=(0,e.closest)(this.element,"form"),this.formElement&&e.EventHandler.add(this.formElement,"reset",this.formResetHandler,this);this.l10n=new e.L10n("colorpicker",{Apply:"Apply",Cancel:"Cancel",ModeSwitcher:"Switch Mode"},this.locale),t.getAttribute("ejs-for")&&!t.getAttribute("name")&&t.setAttribute("name",t.id)},s.prototype.render=function(){this.initWrapper(),this.inline?this.createWidget():this.createSplitBtn(),this.enableOpacity||(0,e.addClass)([this.container.parentElement],$i),this.renderComplete()},s.prototype.initWrapper=function(){var t=this.createElement("div",{className:"e-"+this.getModuleName()+"-wrapper"});this.element.parentNode.insertBefore(t,this.element),t.appendChild(this.element),(0,e.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);(0,e.isNullOrUndefined)(this.initialInputValue)&&(this.initialInputValue=s),this.element.value=s,this.enableOpacity?this.setProperties({value:i},!0):this.setProperties({value:s},!0),this.enableRtl&&t.classList.add("e-rtl"),this.cssClass&&(0,e.addClass)([t],this.cssClass.replace(/\s+/g," ").trim().split(" ")),this.tileRipple=(0,e.rippleEffect)(this.container,{selector:"."+vs}),this.ctrlBtnRipple=(0,e.rippleEffect)(this.container,{selector:".e-btn"})},s.prototype.getWrapper=function(){return this.element.parentElement},s.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),e.Browser.isDevice&&this.refreshPopupPos()},s.prototype.createSplitBtn=function(){var t=this,i=this.createElement("button",{className:"e-split-colorpicker"});this.getWrapper().appendChild(i),this.splitBtn=new Mi.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 e=new MouseEvent("click",{bubbles:!0,cancelable:!1});t.trigger("change",{currentValue:{hex:t.value.slice(0,7),rgba:t.convertToRgbString(t.hexToRgb(t.value))},previousValue:{hex:null,rgba:null},value:t.value,event:e})}}),this.splitBtn.createElement=this.createElement,this.splitBtn.appendTo(i);var s=this.createElement("span",{className:ms});(0,e.select)(".e-selected-color",i).appendChild(s),s.style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value));var n=this.getPopupEle();if((0,e.addClass)([n],"e-colorpicker-popup"),this.cssClass&&(0,e.addClass)([n],this.cssClass.replace(/\s+/g," ").trim().split(" ")),e.Browser.isDevice&&!this.createPopupOnClick){var a=this.getPopupInst();a.relateTo=document.body,a.position={X:"center",Y:"center"},a.targetType="container",a.collision={X:"fit",Y:"fit"},a.offsetY=4,n.style.zIndex=(0,Mt.getZindexPartial)(this.splitBtn.element).toString()}this.bindCallBackEvent()},s.prototype.onOpen=function(){if(this.trigger("open",{element:this.container}),!e.Browser.isDevice){var t=this.getPopupInst();(0,Mt.isCollide)(t.element).length>0&&(t.collision={X:"flip",Y:"fit"},t.position={X:"right",Y:"bottom"},t.targetType="container")}},s.prototype.getPopupInst=function(){return(0,e.getInstance)(this.getPopupEle(),Mt.Popup)},s.prototype.bindCallBackEvent=function(){var t=this;this.splitBtn.beforeOpen=function(i){var s=new Mi.Deferred;return t.trigger("beforeOpen",i,(function(n){if(!n.cancel){var a=t.getPopupEle();if(a.style.top=(0,e.formatUnit)(0+pageYOffset),a.style.left=(0,e.formatUnit)(0+pageXOffset),a.style.display="block",t.createWidget(),a.style.display="",e.Browser.isDevice){if(t.createPopupOnClick){var r=t.getPopupInst();r.relateTo=document.body,r.position={X:"center",Y:"center"},r.targetType="container",r.collision={X:"fit",Y:"fit"},r.offsetY=4,a.style.zIndex=(0,Mt.getZindexPartial)(t.splitBtn.element).toString()}t.modal=t.createElement("div"),t.modal.className="e-"+t.getModuleName()+" e-modal",t.modal.style.display="none",document.body.insertBefore(t.modal,a),document.body.className+=" e-colorpicker-overflow",t.modal.style.display="block",t.modal.style.zIndex=(Number(a.style.zIndex)-1).toString()}}i.cancel=n.cancel,s.resolve(n)})),s},this.splitBtn.beforeClose=function(i){var s=new Mi.Deferred;if((0,e.isNullOrUndefined)(i.event))s.resolve(i);else{var n={element:t.container,event:i.event,cancel:!1};t.trigger("beforeClose",n,(function(n){e.Browser.isDevice&&i.event.target===t.modal&&(n.cancel=!0),n.cancel||t.onPopupClose(),i.cancel=n.cancel,s.resolve(n)}))}return s}},s.prototype.onPopupClose=function(){this.unWireEvents(),this.destroyOtherComp(),this.container.style.width="",(0,e.select)("."+ms,this.splitBtn.element).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value)),this.container.innerHTML="",(0,e.removeClass)([this.container],[hs,os]),e.Browser.isDevice&&this.modal&&((0,e.removeClass)([document.body],"e-colorpicker-overflow"),this.modal.style.display="none",this.modal.outerHTML="",this.modal=null)},s.prototype.createPalette=function(){if((0,e.classList)(this.container,[os],[hs]),this.presetColors){var t=this.createElement("div",{className:"e-custom-palette"});this.appendElement(t);var i=Object.keys(this.presetColors);if(1===i.length)this.appendPalette(this.presetColors[i[0]],i[0],t);else for(var s=0,n=i.length;s<n;s++)this.appendPalette(this.presetColors[i[s]],i[s],t);(0,e.selectAll)(".e-row",t).length>10&&(0,e.addClass)([t],"e-palette-group")}else this.appendPalette(fs,"default");"Palette"===this.mode&&!this.modeSwitcher&&this.noColor&&this.setNoColor();var a=parseInt(getComputedStyle(this.container).borderBottomWidth,10);this.container.style.width=(0,e.formatUnit)(this.container.children[0].offsetWidth+a+a),this.rgb=this.hexToRgb(this.roundValue(this.value)),this.hsv=this.rgbToHsv.apply(this,this.rgb)},s.prototype.firstPaletteFocus=function(){(0,e.select)("."+cs,this.container.children[0])||(0,e.selectAll)("."+ls,this.container)[0].focus()},s.prototype.appendPalette=function(t,e,i){var s,n,a,r=this.createElement("div",{className:ls,attrs:{tabindex:"0",role:"grid"}});i?i.appendChild(r):this.appendElement(r);for(var l=0,o=t.length;l<o;l++)0!==l&&l%this.columns!=0||(s=this.createElement("div",{className:"e-row",attrs:{role:"row"}}),r.appendChild(s)),a=this.roundValue(t[l]).toLowerCase(),n=this.createElement("span",{className:vs,attrs:{role:"gridcell","aria-label":a,"aria-selected":"false",tabindex:"0"}}),this.trigger("beforeTileRender",{element:n,presetName:e,value:t[l]}),s.appendChild(n),this.value===a&&(this.addTileSelection(n),r.focus()),n.style.backgroundColor=this.convertToRgbString(this.hexToRgb(a))},s.prototype.setNoColor=function(){var t=this.container.querySelector(".e-row").children[0];t.classList.add(as),this.value||(t.classList.add(cs),(0,e.closest)(t,"."+ls).focus()),["aria-selected","aria-label"].forEach((function(e){t.removeAttribute(e)})),t.style.backgroundColor=""},s.prototype.appendElement=function(t,e){void 0===e&&(e=0);var i=this.container.children[e];i?this.container.insertBefore(t,i):this.container.appendChild(t)},s.prototype.addTileSelection=function(t){t.classList.add(cs),t.setAttribute("aria-selected","true")},s.prototype.createPicker=function(){(0,e.classList)(this.container,[hs],[os]);var t=this.createElement("div",{className:is});this.appendElement(t),t.appendChild(this.createElement("div",{className:es}));var i=this.createElement("span",{className:Yi,attrs:{tabindex:"0"}});t.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()},s.prototype.setHsvContainerBg=function(t){void 0===t&&(t=this.hsv[0]),this.getHsvContainer().style.backgroundColor=this.convertToRgbString(this.hsvToRgb(t,100,100,1))},s.prototype.getHsvContainer=function(){return(0,e.select)("."+is,this.container)},s.prototype.setHandlerPosition=function(){var t=this.getDragHandler(),i=(0,e.select)("."+es,this.container);this.enableRtl?t.style.left=(0,e.formatUnit)(i.offsetWidth*Math.abs(100-this.hsv[1])/100):t.style.left=(0,e.formatUnit)(i.offsetWidth*this.hsv[1]/100),t.style.top=(0,e.formatUnit)(i.offsetHeight*(100-this.hsv[2])/100)},s.prototype.createSlider=function(){var t=this.createElement("div",{className:"e-slider-preview"});this.appendElement(t,1),this.createPreview(t);var e=this.createElement("div",{className:"e-colorpicker-slider"});t.insertBefore(e,t.children[0]);var i=this.createElement("div",{className:"e-hue-slider"});e.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"}),e.appendChild(i),this.createOpacitySlider(i))},s.prototype.createOpacitySlider=function(t){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(t);var e=this.createElement("div",{className:"e-opacity-empty-track"});t.appendChild(e),this.updateOpacitySliderBg()},s.prototype.updateOpacitySliderBg=function(){var t=this.enableRtl?"to left":"to right",i=(0,e.select)(".e-opacity-empty-track",this.opacitySlider.element);i&&(i.style.background="linear-gradient("+t+", rgba("+this.rgb.slice(0,3)+", 0) 0%, "+this.convertToRgbString(this.rgb.slice(0,3))+" 100%)")},s.prototype.hueChange=function(t){this.hsv[0]=t.value,this.setHsvContainerBg(),this.convertToOtherFormat()},s.prototype.opacityChange=function(t){var e=t.value,i=this.rgbToHex(this.rgb);this.hsv[3]=e/100,this.rgb[3]=e/100;var s=this.rgbToHex(this.rgb);this.updateOpacityInput(e);var n=this.convertToRgbString(this.rgb);this.updatePreview(n),this.triggerEvent(s,i,n)},s.prototype.updateOpacityInput=function(t){if(this.enableOpacity&&!this.getWrapper().classList.contains(Qi)){var i=(0,e.getInstance)((0,e.select)("."+rs,this.container),U);i.value=t,i.dataBind()}},s.prototype.createPreview=function(t){var e=this.createElement("div",{className:us});t.appendChild(e);var i=this.createElement("span",{className:"e-preview "+qi});e.appendChild(i);var s=this.convertToRgbString(this.rgb);i.style.backgroundColor=s,i=this.createElement("span",{className:"e-preview "+ds}),e.appendChild(i),i.style.backgroundColor=s},s.prototype.isPicker=function(){return!this.container.classList.contains(os)},s.prototype.getPopupEle=function(){return this.container.parentElement},s.prototype.createNumericInput=function(t,e,i,s){var n=this,a=new U({value:e,placeholder:i,min:0,max:s,format:"###.##",showSpinButton:!1,floatLabelType:"Always",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker(),change:function(t){t.event&&n.inputHandler(t.event)}});a.createElement=this.createElement,a.appendTo(t)},s.prototype.createInput=function(){var e=this.isPicker(),i=this.getWrapper();if(e&&!i.classList.contains(Qi)||!e&&i.classList.contains(ps)){var s=this.createElement("div",{className:ss});e?this.appendElement(s,2):this.appendElement(s,1);var n=this.createElement("div",{className:"e-input-container"});if(s.appendChild(n),i.classList.contains(ts)||this.appendValueSwitchBtn(s),!i.classList.contains(Ji)){var a=this.createElement("input",{className:Zi,attrs:{maxlength:"7",spellcheck:"false","aria-label":"HEX"}});n.appendChild(a),t.createInput({element:a,floatLabelType:"Always",properties:{placeholder:"HEX",enableRtl:this.enableRtl,enabled:!this.disabled,readonly:!this.isPicker()}},this.createElement),t.setValue(this.value.slice(0,7),a),a.addEventListener("input",this.inputHandler.bind(this))}if(!i.classList.contains(Gi)){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)}}},s.prototype.appendOpacityValue=function(t){this.createNumericInput(t.appendChild(this.createElement("input",{className:rs})),100*this.rgb[3],"A",100)},s.prototype.appendValueSwitchBtn=function(t){var e=this.createElement("button",{className:"e-icons e-css e-btn e-flat e-icon-btn "+Xi,attrs:{title:"Toggle format"}});t.appendChild(e),this.isPicker()&&!this.getWrapper().classList.contains(Gi)&&e.addEventListener("click",this.formatSwitchHandler.bind(this))},s.prototype.createCtrlBtn=function(){if(this.modeSwitcher||this.showButtons){this.l10n.setLocale(this.locale);var t=this.createElement("div",{className:_i});if(this.container.appendChild(t),this.showButtons){var e=this.createElement("div",{className:ji});t.appendChild(e);var i=this.l10n.getConstant("Apply");e.appendChild(this.createElement("button",{innerHTML:i,className:"e-btn e-css e-flat e-primary e-small "+zi,attrs:{title:i}}));var s=this.l10n.getConstant("Cancel");e.appendChild(this.createElement("button",{innerHTML:s,className:"e-btn e-css e-flat e-small "+Wi,attrs:{title:s}}))}this.modeSwitcher&&this.appendModeSwitchBtn()}},s.prototype.appendModeSwitchBtn=function(){var t=this.createElement("button",{className:"e-icons e-btn e-flat e-icon-btn "+ns,attrs:{title:this.l10n.getConstant("ModeSwitcher")}});(0,e.select)("."+_i,this.container).insertBefore(t,(0,e.select)("."+ji,this.container))},s.prototype.createDragTooltip=function(){var t=this,i=new Mt.Tooltip({opensOn:"Custom",showTipPointer:!1,cssClass:"e-color-picker-tooltip",htmlAttributes:{title:"tooltip"},beforeOpen:function(e){t.tooltipEle=e.element},animation:{open:{effect:"None"},close:{effect:"None"}}});i.createElement=this.createElement,i.appendTo(this.container),i.open(this.container),this.tooltipEle.style.zIndex=(0,Mt.getZindexPartial)(this.tooltipEle).toString(),this.tooltipEle.setAttribute("aria-label","colorpicker-tooltip"),(0,e.select)(".e-tip-content",this.tooltipEle).appendChild(this.createElement("div",{className:"e-tip-transparent"}))},s.prototype.getTooltipInst=function(){return(0,e.getInstance)(this.container,Mt.Tooltip)},s.prototype.setTooltipOffset=function(t){this.getTooltipInst().offsetY=t},s.prototype.toggleDisabled=function(t){t?this.getWrapper().classList.add(Ki):this.getWrapper().classList.remove(Ki),this.showButtons&&[].slice.call((0,e.selectAll)(".e-btn",this.container)).forEach((function(i){t?(0,e.attributes)(i,{disabled:""}):i.removeAttribute("disabled")}))},s.prototype.convertToRgbString=function(t){return t.length?4===t.length?"rgba("+t.join()+")":"rgb("+t.join()+")":""},s.prototype.convertToHsvString=function(t){return 4===t.length?"hsva("+t.join()+")":"hsv("+t.join()+")"},s.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()},s.prototype.convertToOtherFormat=function(t,e){void 0===t&&(t=!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,t,e)},s.prototype.updateInput=function(i){var s=this.getWrapper();s.classList.contains(Qi)||(s.classList.contains(Ji)||t.setValue(i.substr(0,7),(0,e.select)("."+Zi,this.container)),s.classList.contains(Gi)||(this.isRgb?this.updateValue(this.rgb,!1):this.updateValue(this.hsv,!1)))},s.prototype.updatePreview=function(t){this.enableOpacity&&this.updateOpacitySliderBg(),(0,e.select)(".e-tip-transparent",this.tooltipEle).style.backgroundColor=t,(0,e.select)("."+us+" ."+qi,this.container).style.backgroundColor=t,(0,e.select)("."+us+" ."+ds,this.container).style.backgroundColor=this.convertToRgbString(this.hexToRgb(this.value))},s.prototype.getDragHandler=function(){return(0,e.select)("."+Yi,this.container)},s.prototype.removeTileSelection=function(){[].slice.call((0,e.selectAll)("."+cs,this.container.children[0])).forEach((function(t){t.classList.remove(cs),t.setAttribute("aria-selected","false")}))},s.prototype.convertRgbToNumberArray=function(t){return t.slice(t.indexOf("(")+1,t.indexOf(")")).split(",").map((function(t,e){return 3!==e?parseInt(t,10):parseFloat(t)}))},s.prototype.getValue=function(t,e){if(t||(t=this.value),e=e?e.toLowerCase():"hex","r"===t[0]){var i=this.convertRgbToNumberArray(t);if("hex"===e||"hexa"===e){var s=this.rgbToHex(i);return"hex"===e?s.slice(0,7):s}return"hsv"===e?this.convertToHsvString(this.rgbToHsv.apply(this,i.slice(0,3))):"hsva"===e?this.convertToHsvString(this.rgbToHsv.apply(this,i)):"null"}if("h"===t[0]){i=this.hsvToRgb.apply(this,this.convertRgbToNumberArray(t));if("rgba"===e)return this.convertToRgbString(i);if("hex"===e||"hexa"===e){s=this.rgbToHex(i);return"hex"===e?s.slice(0,7):s}return"rgb"===e?this.convertToRgbString(i.slice(0,3)):"null"}t=this.roundValue(t);var n=this.hexToRgb(t);return"rgb"!==e&&"hsv"!==e||(n=n.slice(0,3)),"rgba"===e||"rgb"===e?this.convertToRgbString(n):"hsva"===e||"hsv"===e?this.convertToHsvString(this.rgbToHsv.apply(this,n)):"hex"===e?t.slice(0,7):"a"===e?n[3].toString():"null"},s.prototype.toggle=function(){this.container.parentElement.classList.contains("e-popup-close")?this.splitBtn.toggle():this.closePopup(null)},s.prototype.getModuleName=function(){return"colorpicker"},s.prototype.getPersistData=function(){return this.addOnPersist(["value"])},s.prototype.wireEvents=function(){if(this.isPicker()){var t=this.getDragHandler();e.EventHandler.add(t,"keydown",this.pickerKeyDown,this);var i=(0,e.select)("."+ji,this.container);i&&e.EventHandler.add(i,"keydown",this.ctrlBtnKeyDown,this),e.EventHandler.add(this.getHsvContainer(),"mousedown touchstart",this.handlerDown,this),(this.modeSwitcher||this.showButtons)&&this.addCtrlSwitchEvent(),e.EventHandler.add((0,e.select)("."+ds,this.container),"click",this.previewHandler,this)}else e.EventHandler.add(this.container,"click",this.paletteClickHandler,this),e.EventHandler.add(this.container,"keydown",this.paletteKeyDown,this)},s.prototype.formResetHandler=function(){this.value=this.initialInputValue,(0,e.attributes)(this.element,{value:this.initialInputValue})},s.prototype.addCtrlSwitchEvent=function(){var t=(0,e.select)("."+_i,this.container);t&&e.EventHandler.add(t,"click",this.btnClickHandler,this)},s.prototype.ctrlBtnKeyDown=function(t){if(13===t.keyCode){if((0,e.select)("."+zi,this.container)){var i=this.rgbToHex(this.rgb);this.triggerChangeEvent(i)}this.splitBtn.element.focus()}},s.prototype.pickerKeyDown=function(t){switch(t.keyCode){case 39:this.handlerDragPosition(1,this.enableRtl?-1:1,t);break;case 37:this.handlerDragPosition(1,this.enableRtl?1:-1,t);break;case 38:this.handlerDragPosition(2,1,t);break;case 40:this.handlerDragPosition(2,-1,t);break;case 13:t.preventDefault();var e=this.rgbToHex(this.rgb);this.enterKeyHandler(e,t)}},s.prototype.enterKeyHandler=function(t,e){this.triggerChangeEvent(t),this.inline||this.splitBtn.element.focus()},s.prototype.closePopup=function(t){var e=this,i={element:this.container,event:t,cancel:!1};this.trigger("beforeClose",i,(function(t){t.cancel||(e.splitBtn.toggle(),e.onPopupClose())}))},s.prototype.triggerChangeEvent=function(t,e){var i=t.slice(0,7);this.trigger("change",{currentValue:{hex:i,rgba:this.convertToRgbString(this.rgb)},event:e,previousValue:{hex:this.value.slice(0,7),rgba:this.convertToRgbString(this.hexToRgb(this.value))},value:this.enableOpacity?t:i}),this.enableOpacity?this.setProperties({value:t},!0):this.setProperties({value:i},!0),this.element.value=i||"#000000"},s.prototype.handlerDragPosition=function(t,e,i){i.preventDefault(),this.hsv[t]+=e*(i.ctrlKey?1:3),this.hsv[t]<0&&(this.hsv[t]=0),this.updateHsv(),this.convertToOtherFormat(!0,i)},s.prototype.handlerDown=function(t){t.preventDefault(),"mousedown"===t.type?(this.clientX=Math.abs(t.pageX-pageXOffset),this.clientY=Math.abs(t.pageY-pageYOffset),this.setTooltipOffset(8)):(this.clientX=Math.abs(t.changedTouches[0].pageX-pageXOffset),this.clientY=Math.abs(t.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,t),this.getDragHandler().focus(),e.EventHandler.add(document,"mousemove touchmove",this.handlerMove,this),e.EventHandler.add(document,"mouseup touchend",this.handlerEnd,this)},s.prototype.handlerMove=function(t){var i,s;"touchmove"!==t.type&&t.preventDefault(),"mousemove"===t.type?(i=Math.abs(t.pageX-pageXOffset),s=Math.abs(t.pageY-pageYOffset)):(i=Math.abs(t.changedTouches[0].pageX-pageXOffset),s=Math.abs(t.changedTouches[0].pageY-pageYOffset)),this.setHsv(i,s);var n=this.getDragHandler();this.updateHsv(),this.convertToOtherFormat(!1,t),this.getTooltipInst().refresh(n),this.tooltipEle.style.transform||(Math.abs(this.clientX-i)>8||Math.abs(this.clientY-s)>8)&&((0,e.select)("."+es,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"))},s.prototype.setHsv=function(t,i){var s=(0,e.select)("."+es,this.container),n=s.getBoundingClientRect();t=this.enableRtl?t>n.right?0:Math.abs(t-n.right):t>n.left?Math.abs(t-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,t-s.offsetLeft))/s.offsetWidth))/10},s.prototype.handlerEnd=function(t){"touchend"!==t.type&&t.preventDefault(),e.EventHandler.remove(document,"mousemove touchmove",this.handlerMove),e.EventHandler.remove(document,"mouseup touchend",this.handlerEnd);var i=this.getDragHandler();(0,e.select)("."+es,this.container).style.cursor="",this.tooltipEle.style.transform&&(this.tooltipEle.style.transform="",i.classList.remove("e-hide-handler")),this.inline||this.showButtons||this.closePopup(t)},s.prototype.btnClickHandler=function(t){var i=t.target;(0,e.closest)(i,"."+ns)?(t.stopPropagation(),this.switchToPalette()):(i.classList.contains(zi)||i.classList.contains(Wi))&&this.ctrlBtnClick(i,t)},s.prototype.switchToPalette=function(){this.trigger("beforeModeSwitch",{element:this.container,mode:"Palette"}),this.unWireEvents(),this.destroyOtherComp(),(0,e.detach)((0,e.select)(".e-slider-preview",this.container)),this.getWrapper().classList.contains(Qi)||(0,e.remove)((0,e.select)("."+ss,this.container)),(0,e.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"})},s.prototype.refreshImageEditorPopupPos=function(){if(e.Browser.isDevice){var t=this.getPopupEle();t.style.left=(0,e.formatUnit)(0+pageXOffset),t.style.top=(0,e.formatUnit)(0+pageYOffset);var i=document.querySelector("#"+this.element.parentElement.parentElement.id.split("-popup")[0]);i&&t.parentElement.ej2_instances[0].refreshPosition(i)}},s.prototype.refreshPopupPos=function(){if(!this.inline){var t=this.getPopupEle();t.style.left=(0,e.formatUnit)(0+pageXOffset),t.style.top=(0,e.formatUnit)(0+pageYOffset),this.getPopupInst().refreshPosition(this.splitBtn.element.parentElement)}},s.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)},s.prototype.updateValue=function(t,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=(0,e.getInstance)((0,e.select)("."+r[l],this.container),U)).value=Math.round(t[l]),i&&(a.placeholder=r[l].substr(s,1).toUpperCase(),a.max=n?n[l]:255),a.dataBind()},s.prototype.previewHandler=function(t){var i=t.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),(0,e.select)("."+us+" ."+qi,this.container).style.backgroundColor=this.convertToRgbString(this.rgb),this.triggerEvent(n,s,this.convertToRgbString(this.rgb),!1,t)},s.prototype.paletteClickHandler=function(t){t.preventDefault();var i=t.target;if(i.classList.contains(vs)){if(this.removeTileSelection(),this.addTileSelection(i),i.classList.contains(as))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(ps)&&this.updateInput(s),this.triggerEvent(s,n,this.convertToRgbString(this.rgb),!1,t)}this.inline||this.showButtons||this.closePopup(t)}else(0,e.closest)(i,"."+ns)?this.switchToPicker():i.classList.contains(zi)||i.classList.contains(Wi)?this.ctrlBtnClick(i,t):this.getWrapper().classList.contains(ps)&&(0,e.closest)(i,"."+Xi)&&this.formatSwitchHandler()},s.prototype.noColorTile=function(t){void 0===t&&(t=!1);var e=this.rgbToHex(this.rgb);this.rgb=[],this.hsv=[],this.triggerEvent("",e,"",t)},s.prototype.switchToPicker=function(){var t=this.getWrapper();this.trigger("beforeModeSwitch",{element:this.container,mode:"Picker"}),this.unWireEvents(),[].slice.call((0,e.selectAll)("."+ls,this.container)).forEach((function(t){(0,e.detach)(t)})),t.classList.contains(ps)&&(0,e.detach)((0,e.select)("."+ss,this.container)),this.container.style.width="";var i=(0,e.select)(".e-custom-palette",this.container);this.presetColors&&(0,e.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"})},s.prototype.ctrlBtnClick=function(t,e){if(t.classList.contains(zi)){var i=this.rgbToHex(this.rgb);this.triggerChangeEvent(i,e)}if(this.inline){if(t.classList.contains(Wi)){var s={element:this.container,event:e,cancel:!1};this.trigger("beforeClose",s)}}else this.closePopup(e),this.splitBtn.element.focus()},s.prototype.paletteKeyDown=function(t){var i=t.target;if(i.classList.contains(ls)){var s,n,a=[].slice.call((0,e.selectAll)("."+vs,i)),r=a.filter((function(t){return t.classList.contains("e-selected")})).pop();switch(!t.altKey&&t.keyCode){case 39:t.preventDefault(),s=r?a[this.tilePosition(a,r,this.enableRtl?-1:1)]:a[this.enableRtl?a.length-1:0],this.keySelectionChanges(s);break;case 37:t.preventDefault(),s=r?a[this.tilePosition(a,r,this.enableRtl?1:-1)]:a[this.enableRtl?0:a.length-1],this.keySelectionChanges(s);break;case 38:t.preventDefault(),s=a[n=r?this.tilePosition(a,r,-this.columns):0]?a[n]:a[n-this.columns],this.keySelectionChanges(s);break;case 40:t.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(t.preventDefault(),r){var l=r.getAttribute("aria-label");this.enterKeyHandler(l||"",t)}}}},s.prototype.keySelectionChanges=function(t){if(this.removeTileSelection(),this.addTileSelection(t),t.classList.contains(as))this.noColorTile(!0);else{var e=t.getAttribute("aria-label"),i=this.rgbToHex(this.rgb);this.rgb=this.hexToRgb(e),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.getWrapper().classList.contains(ps)&&this.updateInput(e),this.triggerEvent(e,i,this.convertToRgbString(this.rgb),!0)}},s.prototype.tilePosition=function(t,e,i){var s=(t=Array.prototype.slice.call(t)).length,n=this.columns-t[s-1].parentElement.childElementCount,a=t.indexOf(e);return(a+=i)<0?a+=s+n:a%=s+n,a},s.prototype.inputHandler=function(t){var i,s,n=t.target;if(n.value.length)switch((0,e.select)(".e-float-text",n.parentElement).textContent){case"HEX":var a="";if(("#"===n.value[0]&&5!==n.value.length||"#"!==n.value[0]&&4!==n.value.length)&&(a=this.roundValue(n.value)),9!==a.length)return;s=this.rgbToHex(this.rgb),this.rgb=this.hexToRgb(a+a.substr(-2)),this.inputValueChange(this.rgbToHsv.apply(this,this.rgb),s,n.value,t);break;case"R":this.rgb[0]!==Number(n.value)&&(s=this.rgbToHex(this.rgb),this.rgb[0]=Number(n.value),i=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(i,s,null,t));break;case"G":this.rgb[1]!==Number(n.value)&&(s=this.rgbToHex(this.rgb),this.rgb[1]=Number(n.value),i=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(i,s,null,t));break;case"B":this.rgb[2]!==Number(n.value)&&(s=this.rgbToHex(this.rgb),this.rgb[2]=Number(n.value),i=this.rgbToHsv.apply(this,this.rgb),this.inputValueChange(i,s,null,t));break;case"H":this.hueSlider.value=Number(n.value);break;case"S":this.hsv[1]!==Number(n.value)&&(this.hsv[1]=Number(n.value),this.updateHsv(),this.convertToOtherFormat(!1,t));break;case"V":this.hsv[2]!==Number(n.value)&&(this.hsv[2]=Number(n.value),this.updateHsv(),this.convertToOtherFormat(!1,t));break;case"A":this.opacitySlider.value=Number(n.value)}},s.prototype.inputValueChange=function(t,e,i,s){t[0]!==this.hsv[0]&&(this.hueSlider.setProperties({value:t[0]},!0),this.hueSlider.refresh(),this.setHsvContainerBg(t[0])),this.hsv=t;var n=this.rgbToHex(this.rgb);this.setHandlerPosition(),this.updateInput(i||n);var a=this.convertToRgbString(this.rgb);this.updatePreview(a),this.triggerEvent(n,e,a,!1,s)},s.prototype.triggerEvent=function(t,i,s,n,a){void 0===n&&(n=!1);var r=t.slice(0,7);(0,e.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:t}),this.enableOpacity?this.setProperties({value:t},!0):this.setProperties({value:r},!0),this.element.value=r||"#000000")},s.prototype.destroy=function(){var t=this,s=this.getWrapper();i.prototype.destroy.call(this),["tabindex","spellcheck"].forEach((function(e){t.element.removeAttribute(e)})),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&&(0,e.detach)(this.element.nextElementSibling),s&&(s.parentElement.insertBefore(this.element,s),(0,e.detach)(s)),this.container=null,this.formElement&&e.EventHandler.remove(this.formElement,"reset",this.formResetHandler)},s.prototype.destroyOtherComp=function(){if(this.isPicker()){for(var t=(0,e.closest)(this.hueSlider.element,".e-color-picker").querySelectorAll(".e-numerictextbox"),i=0;i<t.length;i++)(0,e.getInstance)(t[i],U).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}},s.prototype.isPopupOpen=function(){return this.getPopupEle().classList.contains("e-popup-open")},s.prototype.unWireEvents=function(){if(this.isPicker()){var t=this.getDragHandler();e.EventHandler.remove(t,"keydown",this.pickerKeyDown);var i=(0,e.select)("."+ji,this.container);i&&e.EventHandler.remove(i,"keydown",this.ctrlBtnKeyDown),e.EventHandler.remove(this.getHsvContainer(),"mousedown touchstart",this.handlerDown),(this.modeSwitcher||this.showButtons)&&e.EventHandler.remove((0,e.select)("."+_i,this.container),"click",this.btnClickHandler),e.EventHandler.remove((0,e.select)("."+ds,this.container),"click",this.previewHandler)}else e.EventHandler.remove(this.container,"click",this.paletteClickHandler),e.EventHandler.remove(this.container,"keydown",this.paletteKeyDown)},s.prototype.roundValue=function(t){if(!t)return"";"#"!==t[0]&&(t="#"+t);var e=t.length;if(4===e&&(t+="f",e=5),5===e){for(var i="",s=1,n=t.length;s<n;s++)i+=t.charAt(s)+t.charAt(s);t="#"+i,e=9}return 7===e&&(t+="ff"),t},s.prototype.hexToRgb=function(t){if(!t)return[];9!==(t=t.trim()).length&&(t=this.roundValue(t));var e=Number((parseInt(t.slice(-2),16)/255).toFixed(2));t=t.slice(1,7);var i=parseInt(t,16),s=[];return s.push(i>>16&255),s.push(i>>8&255),s.push(255&i),s.push(e),s},s.prototype.rgbToHsv=function(t,i,s,n){if(this.rgb&&!this.rgb.length)return[];t/=255,i/=255,s/=255;var a,r=Math.max(t,i,s),l=Math.min(t,i,s),o=r,h=r-l,u=0===r?0:h/r;if(r===l)a=0;else{switch(r){case t:a=(i-s)/h+(i<s?6:0);break;case i:a=(s-t)/h+2;break;case s:a=(t-i)/h+4}a/=6}var d=[Math.round(360*a),Math.round(1e3*u)/10,Math.round(1e3*o)/10];return(0,e.isNullOrUndefined)(n)||d.push(n),d},s.prototype.hsvToRgb=function(t,i,s,n){var a,r,l;if(s/=100,0===(i/=100))return a=r=l=s,[Math.round(255*a),Math.round(255*r),Math.round(255*l),n];t/=60;var o=Math.floor(t),h=t-o,u=s*(1-i),d=s*(1-i*h),p=s*(1-i*(1-h));switch(o){case 0:a=s,r=p,l=u;break;case 1:a=d,r=s,l=u;break;case 2:a=u,r=s,l=p;break;case 3:a=u,r=d,l=s;break;case 4:a=p,r=u,l=s;break;default:a=s,r=u,l=d}var c=[Math.round(255*a),Math.round(255*r),Math.round(255*l)];return(0,e.isNullOrUndefined)(n)||c.push(n),c},s.prototype.rgbToHex=function(t){return t.length?"#"+this.hex(t[0])+this.hex(t[1])+this.hex(t[2])+((0,e.isNullOrUndefined)(t[3])?"":0!==t[3]?(Math.round(255*t[3])+65536).toString(16).substr(-2):"00"):""},s.prototype.hex=function(t){return("0"+t.toString(16)).slice(-2)},s.prototype.changeModeSwitcherProp=function(t){var i=(0,e.select)("."+_i,this.container);t?i?this.appendModeSwitchBtn():(this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):i&&(this.showButtons?(0,e.detach)((0,e.select)("."+ns,i)):(0,e.remove)(i))},s.prototype.changeShowBtnProps=function(t){var i=(0,e.select)("."+_i,this.container);t?(i&&(0,e.remove)(i),this.createCtrlBtn(),this.isPicker()&&!this.disabled&&this.addCtrlSwitchEvent()):this.modeSwitcher?(0,e.detach)((0,e.select)("."+ji,i)):(0,e.remove)(i)},s.prototype.changeValueProp=function(t){if(this.isPicker())this.rgb=this.hexToRgb(t),this.hsv=this.rgbToHsv.apply(this,this.rgb),this.setHandlerPosition(),(0,e.detach)((0,e.closest)(this.hueSlider.element,".e-slider-preview")),this.createSlider(),this.setHsvContainerBg(),this.updateInput(t),4===this.rgb.length&&this.updateOpacityInput(100*this.rgb[3]);else{this.removeTileSelection();var i=this.container.querySelector('span[aria-label="'+this.roundValue(t)+'"]');i&&this.addTileSelection(i)}},s.prototype.setInputEleProps=function(){(0,e.remove)((0,e.select)("."+ss,this.container)),this.createInput()},s.prototype.changeDisabledProp=function(t){this.isPicker()&&(this.hueSlider.enabled=!t,this.opacitySlider.enabled=!t,this.setInputEleProps()),t?(this.toggleDisabled(!0),this.unWireEvents()):(this.toggleDisabled(!1),this.wireEvents())},s.prototype.changeCssClassProps=function(t,i){var s=this.getWrapper(),n=this.getPopupEle();i&&(0,e.removeClass)([s,n],i.split(" ")),t&&(0,e.addClass)([s,n],t.replace(/\s+/g," ").trim().split(" "))},s.prototype.changeRtlProps=function(t){t?(0,e.addClass)([this.getWrapper()],"e-rtl"):(0,e.removeClass)([this.getWrapper()],"e-rtl")},s.prototype.changePaletteProps=function(){(0,e.detach)(this.container.children[0]),this.container.style.width="",this.createPalette()},s.prototype.changeOpacityProps=function(t){var i=this.getWrapper();t?((0,e.removeClass)([this.container.parentElement],$i),this.createOpacitySlider((0,e.select)(".e-colorpicker-slider",this.container).appendChild(this.createElement("div",{className:"e-opacity-slider"}))),i.classList.contains(Qi)||i.classList.contains(Gi)||this.appendOpacityValue((0,e.select)(".e-input-container",this.container))):((0,e.addClass)([this.container.parentElement],$i),this.opacitySlider.destroy(),(0,e.remove)(this.opacitySlider.element),this.opacitySlider=null,i.classList.contains(Qi)||i.classList.contains(Gi)||(0,e.remove)((0,e.select)("."+rs,this.container).parentElement))},s.prototype.onPropertyChanged=function(t,i){var s=this;if(!(0,e.isNullOrUndefined)(t.value)){var n=this.roundValue(t.value);if(9===n.length)this.element.value=this.roundValue(n).slice(0,7),(a=this.splitBtn&&(0,e.select)("."+ms,this.splitBtn.element))&&(a.style.backgroundColor=this.convertToRgbString(this.hexToRgb(t.value)));else if(this.noColor&&"Palette"===this.mode&&""===this.value){var a;(a=this.splitBtn&&(0,e.select)("."+ms,this.splitBtn.element)).style.backgroundColor=""}else this.value=i.value}if(!this.inline&&(0,e.isNullOrUndefined)(t.inline)){if(this.splitBtn.setProperties((0,Mi.getModel)(t,["disabled","enableRtl"])),!this.isPopupOpen())return this.changeCssClassProps(t.cssClass,i.cssClass),void this.changeRtlProps(t.enableRtl)}for(var r=function(n){switch(n){case"inline":t.inline?(l.getWrapper().appendChild(l.container),l.splitBtn.destroy(),(0,e.detach)(l.element.nextElementSibling),l.container.children.length||l.createWidget()):(l.destroyOtherComp(),l.unWireEvents(),l.container.innerHTML="",l.createSplitBtn());break;case"cssClass":l.changeCssClassProps(t.cssClass,i.cssClass);var a=t.cssClass.split(" ").concat(i.cssClass.split(" "));a=a.reduce((function(t,e){return t.indexOf(e)<0&&t.push(e),t}),[]);var r=0;a.forEach((function(t){0!==r||t!==Qi&&t!==ts&&t!==ps&&t!==Ji&&t!==Gi||((0,e.select)("."+ss,s.container)&&(0,e.remove)((0,e.select)("."+ss,s.container)),s.createInput(),r++)}));break;case"enableRtl":l.isPicker()&&(l.hueSlider.enableRtl=t.enableRtl,l.enableOpacity&&(l.opacitySlider.enableRtl=t.enableRtl),l.setInputEleProps()),l.changeRtlProps(t.enableRtl);break;case"disabled":l.changeDisabledProp(t.disabled);break;case"value":l.value!==i.value&&l.changeValueProp(t.value);break;case"showButtons":l.changeShowBtnProps(t.showButtons);break;case"mode":"Picker"===t.mode?l.switchToPicker():l.switchToPalette();break;case"modeSwitcher":l.changeModeSwitcherProp(t.modeSwitcher);break;case"columns":case"presetColors":l.isPicker()||l.changePaletteProps();break;case"noColor":t.noColor?"Palette"!==l.mode||l.modeSwitcher||l.setNoColor():l.changePaletteProps();break;case"enableOpacity":l.changeOpacityProps(t.enableOpacity)}},l=this,o=0,h=Object.keys(t);o<h.length;o++){r(h[o])}},s.prototype.focusIn=function(){this.element.parentElement.focus()},Di([(0,e.Property)("#008000ff")],s.prototype,"value",void 0),Di([(0,e.Property)("")],s.prototype,"cssClass",void 0),Di([(0,e.Property)(!1)],s.prototype,"disabled",void 0),Di([(0,e.Property)("Picker")],s.prototype,"mode",void 0),Di([(0,e.Property)(!0)],s.prototype,"modeSwitcher",void 0),Di([(0,e.Property)(null)],s.prototype,"presetColors",void 0),Di([(0,e.Property)(!0)],s.prototype,"showButtons",void 0),Di([(0,e.Property)(10)],s.prototype,"columns",void 0),Di([(0,e.Property)(!1)],s.prototype,"inline",void 0),Di([(0,e.Property)(!1)],s.prototype,"noColor",void 0),Di([(0,e.Property)(!1)],s.prototype,"enablePersistence",void 0),Di([(0,e.Property)(!0)],s.prototype,"enableOpacity",void 0),Di([(0,e.Property)(!1)],s.prototype,"createPopupOnClick",void 0),Di([(0,e.Event)()],s.prototype,"select",void 0),Di([(0,e.Event)()],s.prototype,"change",void 0),Di([(0,e.Event)()],s.prototype,"beforeTileRender",void 0),Di([(0,e.Event)()],s.prototype,"beforeOpen",void 0),Di([(0,e.Event)()],s.prototype,"open",void 0),Di([(0,e.Event)()],s.prototype,"beforeClose",void 0),Di([(0,e.Event)()],s.prototype,"beforeModeSwitch",void 0),Di([(0,e.Event)()],s.prototype,"onModeSwitch",void 0),Di([(0,e.Event)()],s.prototype,"created",void 0),s=Di([e.NotifyPropertyChanges],s)}(e.Component),ys=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),bs=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},Cs=function(i){function s(t,e){var s=i.call(this,t,e)||this;return s.previousValue=null,s.isHiddenInput=!1,s.isForm=!1,s.inputPreviousValue=null,s.textboxOptions=t,s}return ys(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":t.removeFloating(this.textboxWrapper),t.addFloating(this.respectiveElement,this.floatLabelType,this.placeholder);break;case"enabled":t.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container),this.bindClearEvent();break;case"width":t.setWidth(i.width,this.textboxWrapper.container);break;case"value":var r=this.isProtectedOnChange;this.isProtectedOnChange=!0,t.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=r,t.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):((0,e.isNullOrUndefined)(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&(0,e.isNullOrUndefined)(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttributesToElement(),this.updateHTMLAttributesToWrapper(),this.checkAttributes(!0),this.multiline&&!(0,e.isNullOrUndefined)(this.textarea)?t.validateInputType(this.textboxWrapper.container,this.textarea):t.validateInputType(this.textboxWrapper.container,this.element);break;case"readonly":t.setReadonly(this.readonly,this.respectiveElement);break;case"type":"TEXTAREA"!==this.respectiveElement.tagName&&(this.respectiveElement.setAttribute("type",this.type),t.validateInputType(this.textboxWrapper.container,this.element),this.raiseChangeEvent());break;case"showClearButton":t.setClearButton(this.showClearButton,this.respectiveElement,this.textboxWrapper),this.bindClearEvent();break;case"enableRtl":t.setEnableRtl(this.enableRtl,[this.textboxWrapper.container]);break;case"placeholder":t.setPlaceholder(this.placeholder,this.respectiveElement),t.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":t.updateCssClass(i.cssClass,s.cssClass,this.textboxWrapper.container);break;case"locale":this.globalize=new e.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),t.setPlaceholder(this.placeholder,this.respectiveElement)}}},s.prototype.getModuleName=function(){return"textbox"},s.prototype.preRender=function(){if(this.cloneElement=this.element.cloneNode(!0),this.formElement=(0,e.closest)(this.element,"form"),(0,e.isNullOrUndefined)(this.formElement)||(this.isForm=!0),"EJS-TEXTBOX"===this.element.tagName){for(var t=(0,e.getValue)("ej2_instances",this.element),i=this.multiline?this.createElement("textarea"):this.createElement("input"),s=0;s<this.element.attributes.length;s++){"id"!==(r=this.element.attributes[s].nodeName)&&"class"!==r?(i.setAttribute(r,this.element.attributes[s].nodeValue),i.innerHTML=this.element.innerHTML,"name"===r&&this.element.removeAttribute("name")):"class"===r&&i.setAttribute(r,this.element.className.split(" ").filter((function(t){return 0!==t.indexOf("ng-")})).join(" "))}this.element.appendChild(i),this.element=i,(0,e.setValue)("ej2_instances",t,this.element)}this.updateHTMLAttributesToElement(),this.checkAttributes(!1),!(0,e.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 e.Internationalization(this.locale);var n={placeholder:this.placeholder};if(this.l10n=new e.L10n("textbox",n,this.locale),""!==this.l10n.getConstant("placeholder")&&this.setProperties({placeholder:this.placeholder||this.l10n.getConstant("placeholder")},!0),this.element.hasAttribute("id")||this.element.setAttribute("id",(0,e.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",(0,e.getUniqueID)("textarea"));var a=["placeholder","disabled","value","readonly","type","autocomplete"];for(s=0;s<this.element.attributes.length;s++){var r=this.element.attributes[s].nodeName;this.element.hasAttribute(r)&&C.indexOf(r)<0&&"id"!==r&&"type"!==r&&"e-mappinguid"!==r&&(this.textarea.setAttribute(r,this.element.attributes[s].nodeValue),a.indexOf(r)<0&&(this.element.removeAttribute(r),s--))}}},s.prototype.checkAttributes=function(t){for(var i=0,s=t?(0,e.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly","type","autocomplete"];i<s.length;i++){var n=s[i];if(!(0,e.isNullOrUndefined)(this.element.getAttribute(n)))switch(n){case"disabled":if((0,e.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.enabled||t){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!t)}break;case"readonly":if((0,e.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.readonly||t){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!t)}break;case"placeholder":((0,e.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.placeholder||t)&&this.setProperties({placeholder:this.element.placeholder},!t);break;case"autocomplete":if((0,e.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.autocomplete||t){var l="off"===this.element.autocomplete?"off":"on";this.setProperties({autocomplete:l},!t)}break;case"value":((0,e.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.value||t)&&""!==this.element.value&&this.setProperties({value:this.element.value},!t);break;case"type":((0,e.isNullOrUndefined)(this.textboxOptions)||void 0===this.textboxOptions.type||t)&&this.setProperties({type:this.element.type},!t)}}},s.prototype.render=function(){var i=this.cssClass;(0,e.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(i=t.getInputValidClassList(this.cssClass)),this.respectiveElement=this.isHiddenInput?this.textarea:this.element,this.textboxWrapper=t.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(),(0,e.isNullOrUndefined)(this.value)||(t.setValue(this.value,this.respectiveElement,this.floatLabelType,this.showClearButton),this.isHiddenInput&&(this.element.value=this.respectiveElement.value)),(0,e.isNullOrUndefined)(this.value)||(this.initialValue=this.value,this.setInitialValue()),"on"!==this.autocomplete&&""!==this.autocomplete?this.respectiveElement.autocomplete=this.autocomplete:(0,e.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,t.setWidth(this.width,this.textboxWrapper.container),!(0,e.isNullOrUndefined)((0,e.closest)(this.element,"fieldset"))&&(0,e.closest)(this.element,"fieldset").disabled&&(this.enabled=!1),this.element.hasAttribute("aria-labelledby")||this.element.hasAttribute("placeholder")||this.element.setAttribute("aria-label","textbox"),this.renderComplete()},s.prototype.updateHTMLAttributesToWrapper=function(){t.updateHTMLAttributesToWrapper(this.htmlAttributes,this.textboxWrapper.container)},s.prototype.updateHTMLAttributesToElement=function(){t.updateHTMLAttributesToElement(this.htmlAttributes,this.respectiveElement?this.respectiveElement:this.multiline&&!(0,e.isNullOrUndefined)(this.textarea)?this.textarea:this.element)},s.prototype.setInitialValue=function(){this.isAngular||this.respectiveElement.setAttribute("value",this.initialValue)},s.prototype.wireEvents=function(){e.EventHandler.add(this.respectiveElement,"focus",this.focusHandler,this),e.EventHandler.add(this.respectiveElement,"blur",this.focusOutHandler,this),e.EventHandler.add(this.respectiveElement,"keydown",this.keydownHandler,this),e.EventHandler.add(this.respectiveElement,"input",this.inputHandler,this),e.EventHandler.add(this.respectiveElement,"change",this.changeHandler,this),this.isForm&&e.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent(),!(0,e.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")&&e.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 t=this.textboxWrapper.container.querySelector(".e-float-text");(0,e.isNullOrUndefined)(t)||(t.classList.add("e-label-top"),t.classList.contains("e-label-bottom")&&t.classList.remove("e-label-bottom"))},s.prototype.resetValue=function(t){var e=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=t,null==t&&this.textboxWrapper.container.classList.contains("e-valid-input")&&this.textboxWrapper.container.classList.remove("e-valid-input"),this.isProtectedOnChange=e},s.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!(0,e.isNullOrUndefined)(this.textboxWrapper)){var t=this.textboxWrapper.container.querySelector(".e-float-text");(0,e.isNullOrUndefined)(t)||"Always"===this.floatLabelType||((0,e.isNullOrUndefined)(this.initialValue)||""===this.initialValue?(t.classList.add("e-label-bottom"),t.classList.remove("e-label-top")):""!==this.initialValue&&(t.classList.add("e-label-top"),t.classList.remove("e-label-bottom")))}},s.prototype.focusHandler=function(t){var e={container:this.textboxWrapper.container,event:t,value:this.value};this.trigger("focus",e)},s.prototype.focusOutHandler=function(t){null===this.previousValue&&null===this.value&&""===this.respectiveElement.value||this.previousValue===this.value||this.raiseChangeEvent(t,!0);var e={container:this.textboxWrapper.container,event:t,value:this.value};this.trigger("blur",e)},s.prototype.keydownHandler=function(t){13!==t.keyCode&&9!==t.keyCode||!(null!==this.previousValue&&""!==this.previousValue||null!==this.value&&""!==this.value||""!==this.respectiveElement.value)||this.setProperties({value:this.respectiveElement.value},!0)},s.prototype.inputHandler=function(t){var e=this,i={event:t,value:this.respectiveElement.value,previousValue:this.inputPreviousValue,container:this.textboxWrapper.container};this.inputPreviousValue=this.respectiveElement.value,this.isAngular&&(e.localChange({value:this.respectiveElement.value}),this.preventChange=!0),this.isVue&&(this.preventChange=!0),this.trigger("input",i),t.stopPropagation()},s.prototype.changeHandler=function(t){this.setProperties({value:this.respectiveElement.value},!0),this.previousValue!==this.value&&this.raiseChangeEvent(t,!0),t.stopPropagation()},s.prototype.raiseChangeEvent=function(t,i){var s={event:t,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"===e.Browser.info.name&&(this.element.value=this.respectiveElement.value)},s.prototype.bindClearEvent=function(){this.showClearButton&&(this.enabled?e.EventHandler.add(this.textboxWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):e.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")){t.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),(0,e.closest)(this.element,"form")){var n=this.element,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}}},s.prototype.unWireEvents=function(){e.EventHandler.remove(this.respectiveElement,"focus",this.focusHandler),e.EventHandler.remove(this.respectiveElement,"blur",this.focusOutHandler),e.EventHandler.remove(this.respectiveElement,"keydown",this.keydownHandler),e.EventHandler.remove(this.respectiveElement,"input",this.inputHandler),e.EventHandler.remove(this.respectiveElement,"change",this.changeHandler),this.isForm&&e.EventHandler.remove(this.formElement,"reset",this.resetForm),!(0,e.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")&&e.EventHandler.remove(this.textboxWrapper.container.querySelector(".e-float-text"),"animationstart",this.animationHandler)},s.prototype.destroy=function(){this.unWireEvents(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),"INPUT"===this.element.tagName&&this.multiline&&((0,e.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"]),(0,e.isNullOrUndefined)(this.textboxWrapper)||(this.textboxWrapper.container.insertAdjacentElement("afterend",this.respectiveElement),(0,e.detach)(this.textboxWrapper.container)),this.textboxWrapper=null,t.destroy({element:this.respectiveElement,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),i.prototype.destroy.call(this)},s.prototype.addIcon=function(e,i){t.addIcon(e,i,this.textboxWrapper.container,this.respectiveElement,this.createElement)},s.prototype.getPersistData=function(){return this.addOnPersist(["value"])},s.prototype.addAttributes=function(e){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!1},!0),t.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===n?(this.setProperties({readonly:!0},!0),t.setReadonly(this.readonly,this.respectiveElement)):"class"===n?this.respectiveElement.classList.add(e[""+n]):"placeholder"===n?(this.setProperties({placeholder:e[""+n]},!0),t.setPlaceholder(this.placeholder,this.respectiveElement)):("rows"===n&&this.respectiveElement.tagName,this.respectiveElement.setAttribute(n,e[""+n]))}},s.prototype.removeAttributes=function(e){for(var i=0,s=e;i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!0},!0),t.setEnabled(this.enabled,this.respectiveElement,this.floatLabelType,this.textboxWrapper.container)):"readonly"===n?(this.setProperties({readonly:!1},!0),t.setReadonly(this.readonly,this.respectiveElement)):"placeholder"===n?(this.setProperties({placeholder:null},!0),t.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"))&&(0,e.addClass)([this.textboxWrapper.container],[E]))},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"))&&(0,e.removeClass)([this.textboxWrapper.container],[E]))},bs([(0,e.Property)("text")],s.prototype,"type",void 0),bs([(0,e.Property)(!1)],s.prototype,"readonly",void 0),bs([(0,e.Property)(null)],s.prototype,"value",void 0),bs([(0,e.Property)("Never")],s.prototype,"floatLabelType",void 0),bs([(0,e.Property)("")],s.prototype,"cssClass",void 0),bs([(0,e.Property)(null)],s.prototype,"placeholder",void 0),bs([(0,e.Property)("on")],s.prototype,"autocomplete",void 0),bs([(0,e.Property)({})],s.prototype,"htmlAttributes",void 0),bs([(0,e.Property)(!1)],s.prototype,"multiline",void 0),bs([(0,e.Property)(!0)],s.prototype,"enabled",void 0),bs([(0,e.Property)(!1)],s.prototype,"showClearButton",void 0),bs([(0,e.Property)(!1)],s.prototype,"enablePersistence",void 0),bs([(0,e.Property)(null)],s.prototype,"width",void 0),bs([(0,e.Event)()],s.prototype,"created",void 0),bs([(0,e.Event)()],s.prototype,"destroyed",void 0),bs([(0,e.Event)()],s.prototype,"change",void 0),bs([(0,e.Event)()],s.prototype,"blur",void 0),bs([(0,e.Event)()],s.prototype,"focus",void 0),bs([(0,e.Event)()],s.prototype,"input",void 0),s=bs([e.NotifyPropertyChanges],s)}(e.Component),Es=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),xs=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},Ss="e-auto-width",ks="e-resize-x",Ps="e-resize-y",Ls="e-resize-xy",Os="e-resize-none",ws=function(i){function s(t,e){var s=i.call(this,t,e)||this;return s.previousValue=null,s.isForm=!1,s.inputPreviousValue=null,s.textareaOptions=t,s}return Es(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":t.removeFloating(this.textareaWrapper),t.addFloating(this.element,this.floatLabelType,this.placeholder),"Never"===this.floatLabelType&&this.element.removeAttribute("aria-labelledby");break;case"enabled":t.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(Os));break;case"width":"None"!==this.resizeMode&&"Vertical"!==this.resizeMode?(this.setElementWidth(i.width),this.textareaWrapper.container.classList.add(Ss)):(this.textareaWrapper.container.classList.contains(Ss)&&this.textareaWrapper.container.classList.remove(Ss),t.setWidth(i.width,this.textareaWrapper.container));break;case"value":var r=this.isProtectedOnChange;this.isProtectedOnChange=!0,t.isBlank(this.value)||(this.value=this.value.toString()),this.isProtectedOnChange=r,t.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):((0,e.isNullOrUndefined)(this.isAngular)||!this.isAngular||this.isAngular&&!this.preventChange||this.isAngular&&(0,e.isNullOrUndefined)(this.preventChange))&&this.raiseChangeEvent();break;case"htmlAttributes":this.updateHTMLAttributesToElement(),this.updateHTMLAttributesToWrapper(),this.checkAttributes(!0),t.validateInputType(this.textareaWrapper.container,this.element);break;case"readonly":t.setReadonly(this.readonly,this.element),this.readonly?this.element.setAttribute("aria-readonly","true"):this.element.removeAttribute("aria-readonly");break;case"showClearButton":t.setClearButton(this.showClearButton,this.element,this.textareaWrapper),this.bindClearEvent();break;case"enableRtl":t.setEnableRtl(this.enableRtl,[this.textareaWrapper.container]);break;case"placeholder":t.setPlaceholder(this.placeholder,this.element),t.calculateWidth(this.element,this.textareaWrapper.container);break;case"cssClass":t.updateCssClass(i.cssClass,s.cssClass,this.textareaWrapper.container);break;case"locale":this.globalize=new e.Internationalization(this.locale),this.l10n.setLocale(this.locale),this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0),t.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(Ss));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 t.setWidth(this.element.style.width,this.textareaWrapper.container);this.setWrapperWidth()}}}},s.prototype.preRender=function(){if(this.formElement=(0,e.closest)(this.element,"form"),(0,e.isNullOrUndefined)(this.formElement)||(this.isForm=!0),"EJS-TEXTAREA"===this.element.tagName){for(var t=(0,e.getValue)("ej2_instances",this.element),i=this.createElement("textarea"),s=0;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(t){return 0!==t.indexOf("ng-")})).join(" "))}this.element.appendChild(i),this.element=i,(0,e.setValue)("ej2_instances",t,this.element)}this.updateHTMLAttributesToElement(),this.checkAttributes(!1),!(0,e.isNullOrUndefined)(this.textareaOptions)&&void 0!==this.textareaOptions.value||""===this.element.value||this.setProperties({value:this.element.value},!0),this.globalize=new e.Internationalization(this.locale);var a={placeholder:this.placeholder};this.l10n=new e.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",(0,e.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;(0,e.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(i=t.getInputValidClassList(this.cssClass)),this.textareaWrapper=t.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(),(0,e.isNullOrUndefined)(this.value)||t.setValue(this.value,this.element,this.floatLabelType,this.showClearButton),(0,e.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,t.setWidth(this.width,this.textareaWrapper.container),this.setWrapperWidth(),this.renderComplete()},s.prototype.getModuleName=function(){return"textarea"},s.prototype.getPersistData=function(){return this.addOnPersist(["value"])},s.prototype.checkAttributes=function(t){for(var i=0,s=t?(0,e.isNullOrUndefined)(this.htmlAttributes)?[]:Object.keys(this.htmlAttributes):["placeholder","disabled","value","readonly"];i<s.length;i++){var n=s[i];if(!(0,e.isNullOrUndefined)(this.element.getAttribute(n)))switch(n){case"disabled":if((0,e.isNullOrUndefined)(this.textareaOptions)||void 0===this.textareaOptions.enabled||t){var a="disabled"!==this.element.getAttribute(n)&&""!==this.element.getAttribute(n)&&"true"!==this.element.getAttribute(n);this.setProperties({enabled:a},!t)}break;case"readonly":if((0,e.isNullOrUndefined)(this.textareaOptions)||void 0===this.textareaOptions.readonly||t){var r="readonly"===this.element.getAttribute(n)||""===this.element.getAttribute(n)||"true"===this.element.getAttribute(n);this.setProperties({readonly:r},!t)}break;case"placeholder":((0,e.isNullOrUndefined)(this.textareaOptions)||void 0===this.textareaOptions.placeholder||t)&&this.setProperties({placeholder:this.element.placeholder},!t);break;case"value":((0,e.isNullOrUndefined)(this.textareaOptions)||void 0===this.textareaOptions.value||t)&&""!==this.element.value&&this.setProperties({value:this.element.value},!t)}}},s.prototype.wireEvents=function(){e.EventHandler.add(this.element,"focus",this.focusHandler,this),e.EventHandler.add(this.element,"blur",this.focusOutHandler,this),e.EventHandler.add(this.element,"keydown",this.keydownHandler,this),e.EventHandler.add(this.element,"input",this.inputHandler,this),e.EventHandler.add(this.element,"change",this.changeHandler,this),this.isForm&&e.EventHandler.add(this.formElement,"reset",this.resetForm,this),this.bindClearEvent()},s.prototype.unWireEvents=function(){e.EventHandler.remove(this.element,"focus",this.focusHandler),e.EventHandler.remove(this.element,"blur",this.focusOutHandler),e.EventHandler.remove(this.element,"keydown",this.keydownHandler),e.EventHandler.remove(this.element,"input",this.inputHandler),e.EventHandler.remove(this.element,"change",this.changeHandler),this.isForm&&e.EventHandler.remove(this.formElement,"reset",this.resetForm)},s.prototype.destroy=function(){this.unWireEvents(),this.showClearButton&&(this.clearButton=document.getElementsByClassName("e-clear-icon")[0]),this.element.value=this.element.defaultValue,this.element.classList.remove("e-input",ks,Ps,Ls,Os),this.removeAttributes(["aria-disabled","aria-readonly","aria-labelledby","aria-multiline"]),(0,e.isNullOrUndefined)(this.textareaWrapper)||(this.textareaWrapper.container.insertAdjacentElement("afterend",this.element),(0,e.detach)(this.textareaWrapper.container)),this.textareaWrapper=null,t.destroy({element:this.element,floatLabelType:this.floatLabelType,properties:this.properties},this.clearButton),this.formElement=null,i.prototype.destroy.call(this)},s.prototype.focusHandler=function(t){var e={container:this.textareaWrapper.container,event:t,value:this.value};this.trigger("focus",e)},s.prototype.focusOutHandler=function(t){null===this.previousValue&&null===this.value||this.previousValue===this.value||this.raiseChangeEvent(t,!0);var e={container:this.textareaWrapper.container,event:t,value:this.value};this.trigger("blur",e)},s.prototype.keydownHandler=function(t){13!==t.keyCode&&9!==t.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(t){var e=this,i={event:t,value:this.element.value,previousValue:this.inputPreviousValue,container:this.textareaWrapper.container};this.inputPreviousValue=this.element.value,this.isAngular&&(e.localChange({value:this.element.value}),this.preventChange=!0),this.isVue&&(this.preventChange=!0),this.trigger("input",i),t.stopPropagation()},s.prototype.changeHandler=function(t){this.setProperties({value:this.element.value},!0),this.previousValue!==this.value&&this.raiseChangeEvent(t,!0),t.stopPropagation()},s.prototype.raiseChangeEvent=function(t,e){var i={event:t,value:this.value,previousValue:this.previousValue,container:this.textareaWrapper.container,isInteraction:e||!1,isInteracted:e||!1};this.preventChange=!1,this.trigger("change",i),this.previousValue=this.value},s.prototype.updateHTMLAttributesToWrapper=function(){t.updateHTMLAttributesToWrapper(this.htmlAttributes,this.textareaWrapper.container)},s.prototype.updateHTMLAttributesToElement=function(){t.updateHTMLAttributesToElement(this.htmlAttributes,this.element)},s.prototype.bindClearEvent=function(){this.showClearButton&&(this.enabled?e.EventHandler.add(this.textareaWrapper.clearButton,"mousedown touchstart",this.resetInputHandler,this):e.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")||(t.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),(0,e.closest)(this.element,"form")){var n=this.element,a=document.createEvent("KeyboardEvent");a.initEvent("keyup",!1,!0),n.dispatchEvent(a)}},s.prototype.addAttributes=function(e){for(var i=0,s=Object.keys(e);i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!1},!0),t.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container)):"readonly"===n?(this.setProperties({readonly:!0},!0),t.setReadonly(this.readonly,this.element)):"class"===n?this.element.classList.add(e[""+n]):"placeholder"===n?(this.setProperties({placeholder:e[""+n]},!0),t.setPlaceholder(this.placeholder,this.element)):this.element.setAttribute(n,e[""+n])}},s.prototype.removeAttributes=function(e){for(var i=0,s=e;i<s.length;i++){var n=s[i];"disabled"===n?(this.setProperties({enabled:!0},!0),t.setEnabled(this.enabled,this.element,this.floatLabelType,this.textareaWrapper.container)):"readonly"===n?(this.setProperties({readonly:!1},!0),t.setReadonly(this.readonly,this.element)):"placeholder"===n?(this.setProperties({placeholder:null},!0),t.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"))&&(0,e.addClass)([this.textareaWrapper.container],[E]))},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"))&&(0,e.removeClass)([this.textareaWrapper.container],[E]))},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&&(this.setElementWidth(this.textareaWrapper.container.style.width),this.textareaWrapper.container.style.width="",this.textareaWrapper.container.classList.add(Ss)),this.textareaWrapper.container.classList.add(Ss)):this.textareaWrapper.container.classList.contains(Ss)&&this.textareaWrapper.container.classList.remove(Ss)},s.prototype.resetForm=function(){if(this.isAngular?this.resetValue(""):this.resetValue(this.initialValue),!(0,e.isNullOrUndefined)(this.textareaWrapper)){var t=this.textareaWrapper.container.querySelector(".e-float-text");(0,e.isNullOrUndefined)(t)||"Always"===this.floatLabelType||((0,e.isNullOrUndefined)(this.initialValue)||""===this.initialValue?(t.classList.add("e-label-bottom"),t.classList.remove("e-label-top")):""!==this.initialValue&&(t.classList.add("e-label-top"),t.classList.remove("e-label-bottom")))}},s.prototype.resetValue=function(t){var e=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=t,null==t&&this.textareaWrapper.container.classList.contains("e-valid-input")&&this.textareaWrapper.container.classList.remove("e-valid-input"),this.isProtectedOnChange=e},s.prototype.setElementWidth=function(t){"number"==typeof t?this.element.style.width=(0,e.formatUnit)(t):"string"==typeof t&&(this.element.style.width=t.match(/px|%|em/)?t:(0,e.formatUnit)(t))},s.prototype.getCurrentResizeClass=function(t){return"None"===t?Os:"Both"===t?Ls:"Horizontal"===t?ks:Ps},xs([(0,e.Property)(!1)],s.prototype,"readonly",void 0),xs([(0,e.Property)(null)],s.prototype,"value",void 0),xs([(0,e.Property)("Never")],s.prototype,"floatLabelType",void 0),xs([(0,e.Property)("")],s.prototype,"cssClass",void 0),xs([(0,e.Property)(null)],s.prototype,"placeholder",void 0),xs([(0,e.Property)({})],s.prototype,"htmlAttributes",void 0),xs([(0,e.Property)(!0)],s.prototype,"enabled",void 0),xs([(0,e.Property)(!1)],s.prototype,"showClearButton",void 0),xs([(0,e.Property)(!1)],s.prototype,"enablePersistence",void 0),xs([(0,e.Property)(null)],s.prototype,"width",void 0),xs([(0,e.Property)("Both")],s.prototype,"resizeMode",void 0),xs([(0,e.Property)(null)],s.prototype,"maxLength",void 0),xs([(0,e.Property)(null)],s.prototype,"cols",void 0),xs([(0,e.Property)(null)],s.prototype,"rows",void 0),xs([(0,e.Event)()],s.prototype,"created",void 0),xs([(0,e.Event)()],s.prototype,"destroyed",void 0),xs([(0,e.Event)()],s.prototype,"change",void 0),xs([(0,e.Event)()],s.prototype,"blur",void 0),xs([(0,e.Event)()],s.prototype,"focus",void 0),xs([(0,e.Event)()],s.prototype,"input",void 0),s=xs([e.NotifyPropertyChanges],s)}(e.Component),Ts=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Hs=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.minDistance=5,e.previous=0,e.interval=30,e.timeout=null,e.isSignatureEmpty=!0,e.backgroundLoaded=null,e.isBlazor=!1,e.isResponsive=!1,e.signPointsColl=[],e.signRatioPointsColl=[],e.canRedraw=!0,e}return Ts(i,t),i.prototype.initialize=function(t,i){this.clearArray=[],this.element=t,this.canvasContext=this.element.getContext("2d"),this.canvasContext.canvas.tabIndex=-1,i&&(this.dotnetRef=i,this.isBlazor=!0,this.signatureValue&&this.loadPersistedSignature()),this.setHTMLProperties(),(0,e.isNullOrUndefined)(this.signatureValue)&&this.updateSnapCollection(!0),this.wireEvents(),this.isBlazor||this.trigger("created",null)},i.prototype.wireEvents=function(){!(0,e.isNullOrUndefined)(this.pointColl)||this.isReadOnly||this.disabled?this.pointColl&&(e.EventHandler.add(this.canvasContext.canvas,"mousemove touchmove",this.mouseMoveHandler,this),e.EventHandler.add(this.canvasContext.canvas,"mouseup touchend",this.mouseUpHandler,this),e.EventHandler.add(document,"mouseup",this.mouseUpHandler,this)):(e.EventHandler.add(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler,this),e.EventHandler.add(this.canvasContext.canvas,"keydown",this.keyboardHandler,this),window.addEventListener("resize",this.resizeHandler.bind(this)))},i.prototype.unwireEvents=function(t){"mouseup"===t||"touchend"===t?(e.EventHandler.remove(this.canvasContext.canvas,"mousemove touchmove",this.mouseMoveHandler),e.EventHandler.remove(this.canvasContext.canvas,"mouseup touchend",this.mouseUpHandler),e.EventHandler.remove(document,"mouseup",this.mouseUpHandler)):(e.EventHandler.remove(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler),e.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(t){1!==t.buttons&&2!==t.buttons&&"touchstart"!==t.type||("touchstart"===t.type&&(t.preventDefault(),t.stopPropagation()),this.beginStroke(t),this.wireEvents())},i.prototype.mouseMoveHandler=function(t){1!==t.buttons&&2!==t.buttons&&"touchmove"!==t.type||("touchmove"===t.type&&(t.preventDefault(),t.stopPropagation()),this.interval?this.updateStrokeWithThrottle(t):this.updateStroke(t))},i.prototype.mouseUpHandler=function(t){"touchstart"===t.type&&(t.preventDefault(),t.stopPropagation()),this.endDraw(),this.updateSnapCollection(),this.unwireEvents(t.type),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","mouseUp"):this.trigger("change",{actionName:"strokeUpdate"}),this.signatureValue=this.snapColl[this.incStep];for(var e=0;e<this.signPointsColl.length;e++)this.signRatioPointsColl.push({x:this.signPointsColl[e].x/this.canvasContext.canvas.width,y:this.signPointsColl[e].y/this.canvasContext.canvas.height});this.signPointsColl=[]},i.prototype.keyboardHandler=function(t){var e=this,i={fileName:"Signature",type:"Png",cancel:!1};switch(t.key){case"Delete":this.clear();break;case t.ctrlKey&&"s":this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","beforeSave"):this.trigger("beforeSave",i,(function(t){i.cancel||e.save(t.type,t.fileName)})),t.preventDefault(),t.stopImmediatePropagation();break;case t.ctrlKey&&"z":this.undo();break;case t.ctrlKey&&"y":this.redo()}},i.prototype.resizeHandler=function(){var t=this;if(this.isResponsive&&this.canRedraw){this.canvasContext.canvas.width=this.element.offsetWidth,this.canvasContext.canvas.height=this.element.offsetHeight,this.canvasContext.scale(1,1);for(var e=(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,e);this.signPointsColl=[],this.canvasContext.closePath(),this.canvasContext.fill()}else{var s=new Image;s.src=this.snapColl[this.incStep],s.onload=function(){t.canvasContext.clearRect(0,0,t.element.width,t.element.height),t.canvasContext.drawImage(s,0,0,t.element.width,t.element.height)}}},i.prototype.beginStroke=function(t){this.internalRefresh(),this.updateStroke(t)},i.prototype.updateStroke=function(t){var e=this.createPoint(t);this.addPoint(e)},i.prototype.updateStrokeWithThrottle=function(t){var e=Date.now(),i=this.interval-(e-this.previous);this.storedArgs=t,i<=0||i>this.interval?(this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.previous=e,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(t){var e=this.canvasContext.canvas.getBoundingClientRect();return"mousedown"===t.type||"mousemove"===t.type?this.point(t.clientX-e.left,t.clientY-e.top,(new Date).getTime()):this.point(t.touches[0].clientX-e.left,t.touches[0].clientY-e.top,(new Date).getTime())},i.prototype.point=function(t,e,i){return this.pointX=t,this.pointY=e,this.time=i||(new Date).getTime(),{x:this.pointX,y:this.pointY,time:this.time}},i.prototype.addPoint=function(t){var e,i,s=this.pointColl,n=s.length>0&&s[s.length-1],a=!!n&&this.distanceTo(n)<=this.minDistance;n&&n&&a||(s.push(t),s.length>2&&(3===s.length&&s.unshift(s[0]),e=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=e,this.controlPoint2=i,this.endPoint=s[2],this.startDraw(),s.shift()))},i.prototype.startDraw=function(){var t;t=this.pointVelocityCalc(this.startPoint),t=this.velocity*t+(1-this.velocity)*this.lastVelocity;var e=Math.max(this.maxStrokeWidth/(t+1),this.minStrokeWidth);this.curveDraw(this.lastWidth,e),this.lastVelocity=t,this.lastWidth=e},i.prototype.endDraw=function(){if(!(0,e.isNullOrUndefined)(this.pointColl)){var t=this.pointColl.length>2,i=this.pointColl[0];!t&&i&&this.strokeDraw(i)}},i.prototype.curveDraw=function(t,e){var i,s,n,a,r,l,o,h,u,d,p=this.canvasContext,c=e-t,m=this.bezierLengthCalc(),v=2*Math.ceil(m);for(p.beginPath(),s=0;s<v;s++)r=(a=(n=s/v)*n)*n,u=(h=(o=(l=1-n)*l)*l)*this.startPoint.x,u+=3*o*n*this.controlPoint1.x,u+=3*l*a*this.controlPoint2.x,u+=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(t+r*c,this.maxStrokeWidth),this.arcDraw(u,d,i);p.closePath(),p.fill(),this.isSignatureEmpty=!1},i.prototype.strokeDraw=function(t){var e=this.canvasContext,i=(this.minStrokeWidth+this.maxStrokeWidth)/2;e.beginPath(),this.arcDraw(t.x,t.y,i),e.closePath(),e.fill(),this.isSignatureEmpty=!1},i.prototype.arcDraw=function(t,e,i){this.signPointsColl.push({x:t,y:e});var s=this.canvasContext;s.moveTo(t,e),s.arc(t,e,i,0,2*Math.PI,!1)},i.prototype.calculateCurveControlPoints=function(t,e,i){var s=t.x-e.x,n=t.y-e.y,a=e.x-i.x,r=e.y-i.y,l=(t.x+e.x)/2,o=(t.y+e.y)/2,h=(e.x+i.x)/2,u=(e.y+i.y)/2,d=Math.sqrt(s*s+n*n),p=Math.sqrt(a*a+r*r),c=p/(d+p),m=h+(l-h)*c,v=u+(o-u)*c,f=e.x-m,g=e.y-v;return{controlPoint1:this.point(l+f,o+g,0),controlPoint2:this.point(h+f,u+g,0)}},i.prototype.bezierLengthCalc=function(){var t,e,i,s,n,a,r,l,o=0;for(t=0;t<=10;t++)e=t/10,i=this.bezierPointCalc(e,this.startPoint.x,this.controlPoint1.x,this.controlPoint2.x,this.endPoint.x),s=this.bezierPointCalc(e,this.startPoint.y,this.controlPoint1.y,this.controlPoint2.y,this.endPoint.y),t>0&&(r=i-n,l=s-a,o+=Math.sqrt(r*r+l*l)),n=i,a=s;return o},i.prototype.bezierPointCalc=function(t,e,i,s,n){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*s*(1-t)*t*t+n*t*t*t},i.prototype.pointVelocityCalc=function(t){return this.time!==t.time?this.distanceTo(t)/(this.time-t.time):0},i.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.pointX-t.x,2)+Math.pow(this.pointY-t.y,2))},i.prototype.isRead=function(t){t?e.EventHandler.remove(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler):this.disabled||e.EventHandler.add(this.canvasContext.canvas,"mousedown touchstart",this.mouseDownHandler,this)},i.prototype.enableOrDisable=function(t){this.disabled=t,t?(this.canvasContext.canvas.style.filter="opacity(0.5)",this.isRead(!0)):(this.canvasContext.canvas.style.filter="",this.isRead(!1))},i.prototype.updateSnapCollection=function(t){if((0,e.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");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());t&&this.clearArray.push(this.incStep)},i.prototype.setBackgroundImage=function(t,e){var i=this,s=new Image;s.crossOrigin="anonymous",s.src=t,"temp"==e?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(t){var e,i,s=this.canvasContext;for(s.strokeStyle=t,e=1;e<=s.canvas.width;e++)for(i=1;i<=s.canvas.height;i++)s.strokeRect(0,0,e,i);this.updateSnapCollection()},i.prototype.loadPersistedSignature=function(){if(!(0,e.isNullOrUndefined)(this.signatureValue)){var t=this,i=new Image;i.src=this.signatureValue,i.onload=function(){t.canvasContext.clearRect(0,0,t.element.width,t.element.height),t.canvasContext.drawImage(i,0,0),t.updateSnapCollection()},this.isSignatureEmpty=!1}},i.prototype.getBlob=function(t){for(var e=t.split(","),i=e[0].match(/:(.*?);/)[1],s=atob(e[1]),n=s.length,a=new Uint8Array(n);n--;)a[n]=s.charCodeAt(n);return new Blob([a],{type:i})},i.prototype.download=function(t,e){var i=URL.createObjectURL(t),s=document.createElement("a");s.href=i,s.target="_parent",s.download=e,(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(){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",{actionName:"clear"})},i.prototype.undo=function(){var t=this;if(this.incStep>0){this.incStep--;var e=new Image;e.src=this.snapColl[this.incStep],e.onload=function(){t.canvasContext.clearRect(0,0,t.element.width,t.element.height),t.canvasContext.drawImage(e,0,0,t.element.width,t.element.height)}}this.isClear(),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","Undo"):this.trigger("change",{actionName:"undo"})},i.prototype.redo=function(){var t=this;if(this.incStep<this.snapColl.length-1){this.incStep++;var e=new Image;e.src=this.snapColl[this.incStep],e.onload=function(){t.canvasContext.clearRect(0,0,t.element.width,t.element.height),t.canvasContext.drawImage(e,0,0,t.element.width,t.element.height)}}this.isClear(),this.isBlazor?this.dotnetRef.invokeMethodAsync("TriggerEventAsync","Redo"):this.trigger("change",{actionName:"redo"})},i.prototype.isClear=function(){if(this.clearArray){for(var t=!1,e=0;e<this.clearArray.length;e++)this.clearArray[e]===this.incStep&&(this.isSignatureEmpty=!0,t=!0);t||(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(t,i,s,n,a){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 r=this.element.width/2,l=this.element.height/2;(0,e.isNullOrUndefined)(n)&&(0,e.isNullOrUndefined)(a)?(this.canvasContext.textAlign="center",this.canvasContext.textBaseline="middle"):(r=(0,e.isNullOrUndefined)(n)?r:n,l=(0,e.isNullOrUndefined)(a)?l+s/2:a+s/2),this.canvasContext.fillText(t,r,l),this.updateSnapCollection(),this.isSignatureEmpty=!1,this.trigger("change",{actionName:"draw-text"})},i.prototype.load=function(t,e,i){i=i||this.element.height,e=e||this.element.width,this.canvasContext.clearRect(0,0,this.canvasContext.canvas.width,this.canvasContext.canvas.height);var s=this,n=new Image;n.src=t,"data"!==t.slice(0,4)&&(n.crossOrigin="anonymous"),n.onload=function(){Promise.all([createImageBitmap(n,0,0,e,i)]).then((function(n){var a=document.createElement("canvas");a.width=e,a.height=i,a.getContext("2d").drawImage(n[0],0,0),"data"!==t.slice(0,4)&&(s.canvasContext.globalCompositeOperation="source-over"),s.canvasContext.drawImage(a,0,0,e,i,0,0,s.element.width,s.element.height),s.updateSnapCollection()}))},this.isSignatureEmpty=this.canRedraw=!1},i.prototype.saveBackground=function(t){var e;if(e=t&&this.backgroundImage?this.snapColl[this.incStep-1]:this.snapColl[this.incStep],t||(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),t=!0)),t){var i=this,s=new Image;s.crossOrigin="anonymous",s.src=e,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(t,e){if(this.saveWithBackground&&null==this.backgroundLoaded&&(this.backgroundImage||this.backgroundColor))this.backgroundLoaded=!1,this.fileType=t,this.fileName=e,this.saveBackground(!1);else if("Svg"===t)e=e||"Signature",this.toSVG(e);else if("Jpeg"===t)if(e=e||"Signature",!this.saveWithBackground||this.saveWithBackground&&!this.backgroundImage&&!this.backgroundColor)this.toJPEG(e);else{var i=this.canvasContext.canvas.toDataURL("image/jpeg");this.download(this.getBlob(i),e+".jpeg")}else{e=e||"Signature";i=this.canvasContext.canvas.toDataURL("image/png");this.download(this.getBlob(i),e+".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 t=this,e=new Image;e.src=this.snapColl[this.incStep-1],e.onload=function(){t.canvasContext.drawImage(e,0,0,t.element.width,t.element.height),t.updateSnapCollection()},this.backgroundLoaded=null,this.snapColl.pop(),this.incStep--,this.snapColl.pop(),this.incStep--},i.prototype.toJPEG=function(t){var e=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),t+".jpeg"),s.canvasContext.clearRect(0,0,s.canvasContext.canvas.width,s.canvasContext.canvas.height),e.resizeHandler()},this.snapColl.pop(),this.incStep--},i.prototype.toSVG=function(t,e){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",e),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+'">',a=i.innerHTML,r="data:image/svg+xml;base64,"+btoa(n+a+"</svg>");return null==t?r:(this.download(this.getBlob(r),t+".svg"),null)},i.prototype.saveAsBlob=function(){return this.getBlob(this.canvasContext.canvas.toDataURL("image/png"))},i.prototype.getSignature=function(t){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"!==t||(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"===t?this.tempCanvas.toDataURL("image/jpeg"):"Svg"===t?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),(0,e.removeClass)([this.element],"e-"+this.getModuleName()),this.element.removeAttribute("tabindex"),this.pointColl=null),t.prototype.destroy.call(this)},i.prototype.propertyChanged=function(t,e){var i=this.canvasContext;switch(t){case"backgroundColor":i.canvas.style.backgroundColor=e,this.backgroundColor=e;break;case"backgroundImage":i.canvas.style.backgroundImage="url("+e+")",this.backgroundImage=e,this.saveWithBackground&&this.setBackgroundImage(this.backgroundImage,"temp");break;case"strokeColor":i.fillStyle=e,this.strokeColor=e;break;case"saveWithBackground":this.saveWithBackground=e;break;case"maxStrokeWidth":this.maxStrokeWidth=e;break;case"minStrokeWidth":this.minStrokeWidth=e;break;case"velocity":this.velocity=e;break;case"isReadOnly":this.isRead(e);break;case"disabled":this.enableOrDisable(e)}},i}(e.Component),Ns=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),As=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},Bs=function(t){function i(e,i){return t.call(this,e,i)||this}return Ns(i,t),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"),(0,e.addClass)([this.element],"e-"+this.getModuleName()),t.prototype.initialize.call(this,this.element),this.enablePersistence&&this.loadPersistedSignature()},i.prototype.getModuleName=function(){return"signature"},i.prototype.getPersistData=function(){return this.addOnPersist(["signatureValue"])},i.prototype.onPropertyChanged=function(e,i){for(var s=0,n=Object.keys(e);s<n.length;s++){var a=n[s];switch(a){case"backgroundColor":t.prototype.propertyChanged.call(this,a,e.backgroundColor);break;case"backgroundImage":t.prototype.propertyChanged.call(this,a,e.backgroundImage);break;case"strokeColor":e.strokeColor!==i.strokeColor&&t.prototype.propertyChanged.call(this,a,e.strokeColor);break;case"saveWithBackground":t.prototype.propertyChanged.call(this,a,e.saveWithBackground);break;case"isReadOnly":t.prototype.propertyChanged.call(this,a,e.isReadOnly);break;case"disabled":t.prototype.propertyChanged.call(this,a,e.disabled)}}},As([(0,e.Property)("")],i.prototype,"backgroundColor",void 0),As([(0,e.Property)("")],i.prototype,"backgroundImage",void 0),As([(0,e.Property)(!1)],i.prototype,"disabled",void 0),As([(0,e.Property)(!1)],i.prototype,"isReadOnly",void 0),As([(0,e.Property)(!0)],i.prototype,"saveWithBackground",void 0),As([(0,e.Property)("#000000")],i.prototype,"strokeColor",void 0),As([(0,e.Property)(.5)],i.prototype,"minStrokeWidth",void 0),As([(0,e.Property)(2)],i.prototype,"maxStrokeWidth",void 0),As([(0,e.Property)(.7)],i.prototype,"velocity",void 0),As([(0,e.Property)("en-US")],i.prototype,"locale",void 0),As([(0,e.Property)(!1)],i.prototype,"enableRtl",void 0),As([(0,e.Property)(!1)],i.prototype,"enablePersistence",void 0),As([(0,e.Event)()],i.prototype,"beforeSave",void 0),As([(0,e.Event)()],i.prototype,"change",void 0),As([(0,e.Event)()],i.prototype,"created",void 0),i=As([e.NotifyPropertyChanges],i)}(Hs),Us=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Rs=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},Vs="e-rating-icon e-icons e-star-filled",Fs="e-rating-item-list",Ms="e-rating-item-container",Is="e-rating-selected",Ds="e-rating-intermediate",zs="e-rating-hidden",Ws="e-disabled",qs="e-rating-readonly",js="e-rtl",_s="e-rating-animation",Ks="e-rating-full",Xs="e-rating-empty",Ys="e-selected-value";!function(t){t.Top="Top",t.Bottom="Bottom",t.Left="Left",t.Right="Right"}($e||($e={})),function(t){t.Full="Full",t.Half="Half",t.Quarter="Quarter",t.Exact="Exact"}(Ge||(Ge={}));var Zs,Js,$s=function(t){function i(e,i){var s=t.call(this,e,i)||this;return s.itemElements=[],s}return Us(i,t),i.prototype.preRender=function(){this.element.id||(this.element.id=(0,e.getUniqueID)("e-"+this.getModuleName())),this.keyConfigs={downarrow:"downarrow",leftarrow:"leftarrow",rightarrow:"rightarrow",uparrow:"uparrow",space:"space"},this.tooltipOpen=!1,this.isTouchSelected=!1},i.prototype.render=function(){this.initialize(),this.updateMinValue(),this.updateTemplateFunction(),this.triggerChange(null,this.value,!1),this.renderItems(),this.displayLabel()},i.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),(0,e.attributes)(this.element,{"aria-label":"rating"}),this.renderItemList(),this.updateReset(),this.readOnly&&this.wrapper.classList.add(qs),this.visible||this.wrapper.classList.add(zs),this.enableRtl&&this.wrapper.classList.add(js),this.enableAnimation&&this.wrapper.classList.add(_s),this.cssClass&&(0,e.addClass)([this.wrapper],this.cssClass.split(" ")),this.updateTooltip(),this.wireKeyboardEvent(),this.updateDisabled()},i.prototype.updateDisabled=function(){this.wrapper.classList[this.disabled?"add":"remove"](Ws),(0,e.attributes)(this.ratingItemList,{tabindex:this.disabled?"-1":"0"}),this.updateResetButton()},i.prototype.updateResetButton=function(){if(this.allowReset){var t=this.value<=this.min||this.disabled;this.resetElement.classList[t?"add":"remove"](Ws),(0,e.attributes)(this.resetElement,{tabindex:t?"-1":"0","aria-hidden":t.toString()})}},i.prototype.renderItemList=function(){var t=this;this.ratingItemList=this.createElement("div",{className:Fs,id:this.element.id+"_item-list"}),(0,e.attributes)(this.ratingItemList,{"aria-label":"rating",role:"slider"}),this.wrapper.appendChild(this.ratingItemList),e.EventHandler.add(this.ratingItemList,"touchmove",(function(e){return t.touchMoveHandler(e)}),this),e.EventHandler.add(this.ratingItemList,e.Browser.touchEndEvent,this.touchEndHandler,this)},i.prototype.touchMoveHandler=function(t){this.isTouchSelected||(this.wrapper.classList.add("e-rating-touch"),this.isTouchSelected=!0),this.wrapper.classList.add("e-touch-select");var e=this.ratingItemList.getBoundingClientRect(),i=(t.touches[0].clientX-e.x)/e.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){var n=this.currentValue;this.triggerChange(t,i),this.updateCurrentValue(i),this.showTooltip&&(s?(Math.ceil(i)!==Math.ceil(n)&&this.closeRatingTooltip(),this.openRatingTooltip(s,!0)):this.closeRatingTooltip())}else this.showTooltip&&s&&this.openRatingTooltip(s,!1)},i.prototype.touchEndHandler=function(){this.closeRatingTooltip(),this.wrapper.classList.remove("e-touch-select")},i.prototype.updateTemplateFunction=function(){this.emptyTemplateFunction=this.emptyTemplate?this.getTemplateString(this.emptyTemplate):null,this.fullTemplateFunction=this.fullTemplate?this.getTemplateString(this.fullTemplate):null},i.prototype.renderItems=function(){for(var t=this,i=0;i<this.itemsCount;i++){var s=this.createElement("span",{className:Ms}),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(e){t.ratingItemList.appendChild(e.element)}))}(0,e.attributes)(this.ratingItemList,{"aria-valuemax":this.itemsCount.toString()}),this.updateItemValue(!1)},i.prototype.renderItemContent=function(t,i,s,n){n&&this.removeItemContent(t),this.fullTemplate&&1===i?(t.classList.add(Ks),(0,e.append)(this.fullTemplateFunction({index:s,ratingValue:i},this,"ratingFullTemplate",this.element.id+"fullTemplate",this.isStringTemplate),t)):this.emptyTemplate?(t.classList.add(Xs),(0,e.append)(this.emptyTemplateFunction({index:s,ratingValue:i},this,"ratingEmptyTemplate",this.element.id+"emptyTemplate",this.isStringTemplate),t)):(0,e.addClass)([t],Vs.split(" "))},i.prototype.removeItemContent=function(t){t.classList.remove(Ks,Xs),(0,e.removeClass)([t],Vs.split(" ")),t.firstChild&&(t.innerHTML="")},i.prototype.updateTooltip=function(){this.showTooltip?(this.tooltipObj=new Mt.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)):(0,e.isNullOrUndefined)(this.tooltipObj)||(this.tooltipObj.destroy(),this.tooltipObj=null)},i.prototype.updateMinValue=function(){this.setProperties({min:this.validateValue(this.min)},!0),this.min>0&&this.value<this.min&&this.triggerChange(null,this.min,!1),(0,e.attributes)(this.ratingItemList,{"aria-valuemin":this.min.toString()})},i.prototype.validateValue=function(t){return t=t>this.itemsCount?this.itemsCount:t<0?0:this.precision===Ge.Full||this.enableSingleSelection?Math.round(t):this.precision===Ge.Half?Math.round(2*t)/2:this.precision===Ge.Quarter?Math.round(4*t)/4:Math.round(10*t)/10},i.prototype.getRatingValue=function(t,e){return this.enableSingleSelection?t>e&&t<=e+1?1:0:t>=e+1?1:t<e?0:t-e},i.prototype.updateItemValue=function(t){void 0===t&&(t=!0),t&&this.isReact&&this.clearTemplate(["ratingEmptyTemplate","ratingFullTemplate"]);for(var i=0;i<this.itemsCount;i++){var s=this.itemElements[parseInt(i.toString(),10)];s.classList.remove(Is,Ds,Ys);var n=this.getRatingValue(this.currentValue,i);1===n?s.classList.add(Is):n>0?s.classList.add(Ds):this.precision===Ge.Full&&i+1<=this.value&&!this.enableSingleSelection&&s.classList.add(Ys),t&&this.updateItemContent(n,i),s.style.setProperty("--rating-value",100*n+"%"),s.classList[0===this.value&&0===i||this.value===i+1||n>0&&n<1?"add":"remove"]("e-rating-focus")}t&&this.renderReactTemplates(),this.updateResetButton(),(0,e.attributes)(this.ratingItemList,{"aria-valuenow":this.currentValue.toString()}),(0,e.attributes)(this.element,{value:this.value.toString()})},i.prototype.updateItemContent=function(t,i){if(this.fullTemplate||this.emptyTemplate){var s=this.itemElements[parseInt(i.toString(),10)].querySelector(".e-rating-item");if(this.fullTemplate&&1===t){if(!this.isReact&&s.classList.contains(Ks))return;this.removeItemContent(s),s.classList.add(Ks),(0,e.append)(this.fullTemplateFunction({ratingValue:t,index:i},this,"ratingFullTemplate",this.element.id+"fullTemplate"+i,this.isStringTemplate),s)}else if(this.emptyTemplate){if(!this.isReact&&s.classList.contains(Xs))return;this.removeItemContent(s),s.classList.add(Xs),(0,e.append)(this.emptyTemplateFunction({ratingValue:t,index:i},this,"ratingEmptyTemplate",this.element.id+"emptyTemplate"+i,this.isStringTemplate),s)}else this.removeItemContent(s),(0,e.addClass)([s],Vs.split(" "))}},i.prototype.updateTooltipContent=function(t){var i=this;if(this.showTooltip){var s;if(this.isReact&&this.clearTemplate(["ratingTooltipTemplate"]),this.tooltipTemplate){s=this.createElement("span",{className:"e-rating-tooltip-content"});var n=this.getTemplateString(this.tooltipTemplate);(0,e.append)(n({value:this.currentValue},this,"ratingTooltipTemplate",this.element.id+"tooltipTemplate",this.isStringTemplate),s),this.tooltipObj.setProperties({content:s},t),this.isAngular&&setTimeout((function(){var t=i.ratingItemList.querySelectorAll("."+Ms+"."+Is);i.tooltipObj.refresh(t[t.length-1])}))}else s=this.currentValue.toString(),this.tooltipObj.setProperties({content:(0,e.initializeCSPTemplate)((function(){return s}))},t);this.renderReactTemplates()}},i.prototype.getTemplateString=function(t){var i="";try{if("function"!=typeof t){var s=(0,e.select)(t);i=s?"SCRIPT"===s.tagName?s.innerHTML:s.outerHTML:t}else i=t}catch(e){i=t}return(0,e.compile)(i)},i.prototype.displayLabel=function(){this.showLabel?(this.spanLabel=this.createElement("span",{className:"e-rating-label"}),this.updateLabel(),this.updateLabelPosition()):this.wrapper.contains(this.spanLabel)&&((0,e.remove)(this.spanLabel),this.spanLabel=null)},i.prototype.updateLabel=function(){if(this.showLabel)if(this.labelTemplate){this.isReact&&this.clearTemplate(["ratingLabelTemplate"]),this.spanLabel.firstChild&&(this.spanLabel.innerHTML="");var t=this.getTemplateString(this.labelTemplate);(0,e.append)(t({value:this.currentValue},this,"ratingLabelTemplate",this.element.id+"labelTemplate",this.isStringTemplate),this.spanLabel),this.renderReactTemplates()}else this.spanLabel.textContent=this.currentValue+" / "+this.itemsCount},i.prototype.updateReset=function(){this.allowReset?(this.resetElement=this.createElement("span",{className:"e-icons e-reset",attrs:{"aria-label":"resetbutton",role:"button"}}),this.updateResetButton(),e.EventHandler.add(this.resetElement,"click",this.resetClicked,this),this.wrapper.insertBefore(this.resetElement,this.ratingItemList)):this.wrapper.contains(this.resetElement)&&((0,e.remove)(this.resetElement),this.resetElement=null)},i.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)},i.prototype.clearLabelPosition=function(){var t=this.spanLabel.classList.value.match(/(e-label-[top|bottom|right|left]+)/g);t&&(0,e.removeClass)([this.spanLabel],t)},i.prototype.wireItemsEvents=function(t,i){var s=this;e.EventHandler.add(t,"click",(function(t){return s.clickHandler(t)}),this),e.EventHandler.add(t,"mousemove",(function(t){return s.mouseMoveHandler(i,t)}),this),e.EventHandler.add(t,"mouseleave",this.mouseLeaveHandler,this)},i.prototype.clickHandler=function(t){this.currentValue=this.min>0&&this.currentValue<this.min?this.min:this.currentValue,this.triggerChange(t,this.currentValue),this.updateItemValue(),this.updateLabel(),this.updateResetButton()},i.prototype.updateValueChange=function(t,e,i){void 0===i&&(i=!0),this.triggerChange(t,e,i),this.updateItemValue(),this.updateLabel()},i.prototype.triggerChange=function(t,e,i){if(void 0===i&&(i=!0),e=this.validateValue(e),this.currentValue=e,this.currentValue!==this.value){var s={event:t,isInteracted:i,value:e,previousValue:this.value};this.setProperties({value:e},!0),this.trigger("valueChanged",s)}},i.prototype.mouseMoveHandler=function(t,e){this.isTouchSelected&&(this.wrapper.classList.remove("e-rating-touch"),this.isTouchSelected=!1);var i=this.calculateCurrentValue(t,e);i=this.validateValue(i);var s=this.itemElements[parseInt((t-1).toString(),10)];if(i!==this.currentValue){this.updateCurrentValue(i),this.openRatingTooltip(s,!0);var n={element:s,event:e,value:i};this.trigger("onItemHover",n)}else this.openRatingTooltip(s,!1)},i.prototype.openRatingTooltip=function(t,e){this.showTooltip&&(this.tooltipOpen?e&&(this.updateTooltipContent(!0),this.tooltipObj.refresh(t)):(this.updateTooltipContent(!1),this.tooltipObj.open(t),this.tooltipOpen=!0))},i.prototype.closeRatingTooltip=function(){this.tooltipOpen&&(this.tooltipObj.close(),this.tooltipOpen=!1)},i.prototype.updateCurrentValue=function(t){this.currentValue=t,this.updateItemValue(),this.updateLabel()},i.prototype.mouseLeaveHandler=function(){this.closeRatingTooltip(),this.updateCurrentValue(this.value)},i.prototype.calculateCurrentValue=function(t,e){var i=t;return this.enableSingleSelection||this.precision===Ge.Full||(i=e.offsetX/this.itemElements[t-1].clientWidth,i=this.enableRtl?1-i:i,this.precision===Ge.Quarter?i=i<=.25?.25:i<=.5?.5:i<.75?.75:1:this.precision===Ge.Half&&(i=i<=.5?.5:1),i=i+t-1),i},i.prototype.reset=function(){this.resetClicked(null,!1)},i.prototype.resetClicked=function(t,e){void 0===e&&(e=!0),this.updateValueChange(t,this.min,e),this.updateResetButton()},i.prototype.wireKeyboardEvent=function(){this.keyboardModuleRating=new e.KeyboardEvents(this.wrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},i.prototype.keyActionHandler=function(t){if(t.preventDefault(),!this.disabled&&!this.readOnly){if(t.target.classList.contains(Fs))switch(t.action){case"uparrow":this.handleNavigation(t,!0);break;case"downarrow":this.handleNavigation(t,!1);break;case"leftarrow":this.handleNavigation(t,this.enableRtl);break;case"rightarrow":this.handleNavigation(t,!this.enableRtl)}if(this.allowReset&&t.target.classList.contains("e-reset")&&"space"===t.action)this.resetClicked(t)}},i.prototype.handleNavigation=function(t,e){if(!e&&this.value>this.min||e&&this.value<this.itemsCount){var i=this.precision===Ge.Full||this.enableSingleSelection?1:this.precision===Ge.Half?.5:this.precision===Ge.Quarter?.25:Math.round(1)/10;i=e?this.value+i:this.value-i,this.updateValueChange(t,i),this.updateResetButton()}},i.prototype.updateContent=function(){this.isReact&&this.clearTemplate(["ratingEmptyTemplate","ratingFullTemplate"]);for(var t=0;t<this.itemsCount;t++){var e=this.itemElements[parseInt(t.toString(),10)].firstElementChild;this.renderItemContent(e,this.getRatingValue(this.value,t),t,!0)}},i.prototype.getModuleName=function(){return"rating"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.removeItemElements=function(){for(var t=0;t<this.itemElements.length;t++)(0,e.remove)(this.itemElements[parseInt(t.toString(),10)]);this.itemElements=[]},i.prototype.destroy=function(){var i=this;t.prototype.destroy.call(this),this.removeItemElements(),this.clearTemplate(),this.spanLabel&&((0,e.remove)(this.spanLabel),this.spanLabel=null),this.resetElement&&((0,e.remove)(this.resetElement),this.resetElement=null),this.showTooltip&&(this.tooltipObj.destroy(),this.tooltipObj=null),(0,e.remove)(this.ratingItemList),this.ratingItemList=null,this.wrapper.parentNode.insertBefore(this.element,this.wrapper),(0,e.remove)(this.wrapper),this.wrapper=null,this.keyboardModuleRating.destroy(),this.keyboardModuleRating=null,["value","aria-label","name"].forEach((function(t){i.element.removeAttribute(t)}))},i.prototype.onPropertyChanged=function(t,i){for(var s=0,n=Object.keys(t);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"](zs);break;case"disabled":this.updateDisabled();break;case"readOnly":this.wrapper.classList[this.readOnly?"add":"remove"](qs);break;case"allowReset":this.updateReset();break;case"enableRtl":this.wrapper.classList[this.enableRtl?"add":"remove"](js);break;case"cssClass":i.cssClass&&(0,e.removeClass)([this.wrapper],i.cssClass.split(" ")),t.cssClass&&(0,e.addClass)([this.wrapper],t.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"](_s);break;case"emptyTemplate":case"fullTemplate":this.updateTemplateFunction(),this.updateContent();break;case"labelTemplate":this.updateLabel();break;case"itemsCount":this.removeItemElements(),this.renderItems(),this.updateLabel()}}},Rs([(0,e.Property)(!1)],i.prototype,"allowReset",void 0),Rs([(0,e.Property)("")],i.prototype,"cssClass",void 0),Rs([(0,e.Property)(!1)],i.prototype,"disabled",void 0),Rs([(0,e.Property)("")],i.prototype,"emptyTemplate",void 0),Rs([(0,e.Property)(!0)],i.prototype,"enableAnimation",void 0),Rs([(0,e.Property)(!1)],i.prototype,"enableSingleSelection",void 0),Rs([(0,e.Property)("")],i.prototype,"fullTemplate",void 0),Rs([(0,e.Property)(5)],i.prototype,"itemsCount",void 0),Rs([(0,e.Property)($e.Right)],i.prototype,"labelPosition",void 0),Rs([(0,e.Property)("")],i.prototype,"labelTemplate",void 0),Rs([(0,e.Property)(0)],i.prototype,"min",void 0),Rs([(0,e.Property)(Ge.Full)],i.prototype,"precision",void 0),Rs([(0,e.Property)(!1)],i.prototype,"readOnly",void 0),Rs([(0,e.Property)(!1)],i.prototype,"showLabel",void 0),Rs([(0,e.Property)(!0)],i.prototype,"showTooltip",void 0),Rs([(0,e.Property)("")],i.prototype,"tooltipTemplate",void 0),Rs([(0,e.Property)(0)],i.prototype,"value",void 0),Rs([(0,e.Property)(!0)],i.prototype,"visible",void 0),Rs([(0,e.Event)()],i.prototype,"beforeItemRender",void 0),Rs([(0,e.Event)()],i.prototype,"created",void 0),Rs([(0,e.Event)()],i.prototype,"onItemHover",void 0),Rs([(0,e.Event)()],i.prototype,"valueChanged",void 0),i=Rs([e.NotifyPropertyChanges],i)}(e.Component),Gs=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),Qs=function(t,e,i,s){var n,a=arguments.length,r=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(a<3?n(r):a>3?n(e,i,r):n(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r},tn="e-rtl";!function(t){t.Number="number",t.Text="text",t.Password="password"}(Zs||(Zs={})),function(t){t.Outlined="outlined",t.Underlined="underlined",t.Filled="filled"}(Js||(Js={}));var en=function(t){function i(e,i){var s=t.call(this,e,i)||this;return s.inputs=[],s.previousValue="",s.separatorElements=[],s.shouldFireFocus=!0,s.shouldFireBlur=!0,s.isFocusInCalled=!1,s.isFocusOutCalled=!1,s}return Gs(i,t),i.prototype.preRender=function(){this.element.id||(this.element.id=(0,e.getUniqueID)("e-"+this.getModuleName()))},i.prototype.render=function(){this.initialize()},i.prototype.initialize=function(){(0,e.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(tn),this.previousValue=this.value.toString()},i.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 t=0;t<this.length;t++)this.createOtpInput(t)},i.prototype.createOtpInput=function(t){var e=this.getDefaultValue(),i="";if(e)if("number"===this.type){var s=e[parseInt(t.toString(),10)];isNaN(Number(s))||(i=s)}else i=e[parseInt(t.toString(),10)]||"";var n=this.createElement("input",{id:this.element.id+"-"+(t+1),className:"e-otp-input-field e-input",attrs:{maxlength:"1",type:this.type,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,t)},i.prototype.renderSeparator=function(t,e){if(this.separator.length>0)for(var i=t;i<e;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)])}},i.prototype.updateSeparatorValue=function(){if(""!==this.separator)for(t=0;t<this.separatorElements.length;t++)this.separatorElements[parseInt(t.toString(),10)].textContent=this.separator;else{for(var t=0;t<this.separatorElements.length;t++)(0,e.remove)(this.separatorElements[parseInt(t.toString(),10)]);this.separatorElements=[]}},i.prototype.addPlaceHolder=function(){for(var t=0;t<this.inputs.length;t++)this.setElementAttributes({placeholder:1===this.placeholder.length||0===this.placeholder.length?this.placeholder:this.placeholder.charAt(t)},this.inputs[parseInt(t.toString(),10)])},i.prototype.updateInputType=function(t){this.inputs.forEach((function(e){e.type=t,e.setAttribute("inputmode","number"===t?"numeric":"text")}))},i.prototype.getDefaultValue=function(){var t=("number"==typeof this.value?this.value.toString():this.value).replace(/\s/g,"");if(t.length>0)return t.split("")},i.prototype.handleInputChange=function(t,e){var i=this.inputs[parseInt(t.toString(),10)];if(i&&t<this.length-1&&i.value.length>0){var s=this.inputs[parseInt(t.toString(),10)+1];this.shouldFireFocus=this.shouldFireBlur=!1,s.focus(),s&&s.value.length>0&&s.select()}var n=e.target;n.value.length>1&&(n.value=n.value.slice(0,1)),this.triggerInputEvent(e),this.triggerValuechanged(e,!0)},i.prototype.handleKeyAction=function(t,e){e.key.length>1&&!(0===t&&"Backspace"===e.key||t===this.length-1&&"Delete"===e.key)&&(this.shouldFireFocus=this.shouldFireBlur=!1);var i=this.inputs[parseInt(t.toString(),10)],s=this.inputs[parseInt(t.toString(),10)-1],n=this.inputs[parseInt(t.toString(),10)+1];if("Delete"===e.key){var a="";i.value.length>0?(a=i.value,i.value=""):t!==this.inputs.length-1&&(a=n.value,n.value="",n.focus()),a.length>0&&this.triggerInputEvent(e)}else if("Backspace"===e.key){if(0!==t&&0===i.value.length){var r=s.value;s.value="",s.focus(),r.length>0&&this.triggerInputEvent(e)}}else"ArrowLeft"===e.key||"ArrowRight"===e.key?("ArrowLeft"===e.key?t>0&&(s.focus(),s.select()):t<this.inputs.length-1&&(n.focus(),n.select()),e.preventDefault()):"ArrowUp"===e.key||"ArrowDown"===e.key?e.preventDefault():"Tab"===e.key||e.shiftKey||e.ctrlKey||"number"===this.type&&/\D/.test(e.key.toLocaleLowerCase())&&e.preventDefault()},i.prototype.handleSelection=function(t){var e=this.inputs[parseInt(t.toString(),10)];e.value&&e.select()},i.prototype.handleFocus=function(t,i){if((0,e.addClass)([this.inputs[parseInt(t.toString(),10)]],"e-otp-input-focus"),this.shouldFireFocus){var s={element:this.element,event:i,isInteracted:!this.isFocusInCalled,value:this.value};this.trigger("focus",s)}this.shouldFireFocus=!0},i.prototype.handleBlur=function(t,i){if((0,e.removeClass)([this.inputs[parseInt(t.toString(),10)]],"e-otp-input-focus"),this.shouldFireBlur){var s={element:this.element,event:i,isInteracted:!this.isFocusOutCalled,value:this.value};this.trigger("blur",s)}this.shouldFireBlur=!0},i.prototype.handlePaste=function(t,e){var i=e.clipboardData;if(i){for(var s=i.getData("text").split(""),n=0,a=t;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(e,!0)}},i.prototype.triggerInputEvent=function(t){var e=this.value.toString();this.updateValueProperty();var i={element:this.element,event:t,previousValue:e,value:this.value.toString()};this.trigger("input",i)},i.prototype.triggerValuechanged=function(t,e){if(this.length===this.value.toString().length&&this.previousValue!==this.value){var i={element:this.element,event:t,isInteracted:e||!1,previousValue:this.previousValue,value:this.value};this.trigger("valueChanged",i),this.previousValue=this.value.toString()}},i.prototype.wireEvents=function(t,e){t.addEventListener("focus",this.handleFocus.bind(this,e)),t.addEventListener("blur",this.handleBlur.bind(this,e)),t.addEventListener("input",this.handleInputChange.bind(this,e)),t.addEventListener("keydown",this.handleKeyAction.bind(this,e)),t.addEventListener("click",this.handleSelection.bind(this,e)),t.addEventListener("paste",this.handlePaste.bind(this,e))},i.prototype.unWireEvents=function(){for(var t=0;t<this.inputs.length;t++){var e=this.inputs[parseInt(t.toString(),10)];e.removeEventListener("focus",this.handleFocus.bind(this,t)),e.removeEventListener("blur",this.handleBlur.bind(this,t)),e.removeEventListener("input",this.handleInputChange.bind(this,t)),e.removeEventListener("keydown",this.handleKeyAction.bind(this,t)),e.removeEventListener("click",this.handleSelection.bind(this,t)),e.removeEventListener("paste",this.handlePaste.bind(this,t))}},i.prototype.updateValueProperty=function(){var t="";this.inputs.forEach((function(e){t+=e.value}));var e=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value="number"==typeof this.value?parseInt(t,10):t,this.isProtectedOnChange=e,this.hiddenInputEle.value=this.value.toString()},i.prototype.updateInputValue=function(t){for(var e=this.value.toString(),i=0;i<this.inputs.length;i++){t.toString().charAt(i)!==e.charAt(i)&&(this.inputs[parseInt(i.toString(),10)].value=e.charAt(i),this.hiddenInputEle.value=e)}this.focusIn()},i.prototype.updateCssClass=function(t,e){var i,s,n;void 0===e&&(e=""),e&&(n=e.trim().split(" "),(i=this.element.classList).remove.apply(i,n)),t&&(n=t.trim().split(" "),(s=this.element.classList).add.apply(s,n))},i.prototype.updateVariantClass=function(){var t=this.stylingMode.toLocaleLowerCase();"underlined"!==(t="outlined"===t?"outline":t)&&"filled"!==t&&"outline"!==t||((0,e.removeClass)([this.element],["e-underlined","e-filled","e-outline"]),(0,e.addClass)([this.element],"e-"+t))},i.prototype.updateAriaLabel=function(t){this.inputs.forEach((function(e,i){var s="Enter Otp Character "+(i+1),n=t&&t.length>0&&t[parseInt(i.toString(),10)]||s;e.setAttribute("aria-label",n)}))},i.prototype.updateDisabledState=function(){var t=this;this.inputs.forEach((function(e){t.disabled?e.setAttribute("disabled","disabled"):e.removeAttribute("disabled")}))},i.prototype.setElementAttributes=function(t,i){if(!(0,e.isNullOrUndefined)(t))for(var s in t)if("class"===s){var n=t.class.replace(/\s+/g," ").trim();n&&(0,e.addClass)([i],n.split(" "))}else"name"===s&&this.element.id===i.id?this.hiddenInputEle.setAttribute(s,t[""+s]):i.setAttribute(s,t[""+s])},i.prototype.handleLengthChange=function(t,i){if(t-i>0){for(var s=i;s<t;s++)this.createOtpInput(s);this.renderSeparator(i,t),this.addPlaceHolder(),this.updateAriaLabel(this.ariaLabels)}else if(t>=0&&this.inputs.length>0){for(s=t;s<this.inputs.length;s++)(0,e.remove)(this.inputs[parseInt(s.toString(),10)]);if(this.inputs.splice(t),this.separatorElements.length>0){var n=0===t?0:t-1;for(s=n;s<this.separatorElements.length;s++)(0,e.remove)(this.separatorElements[parseInt(s.toString(),10)]);this.separatorElements.splice(n)}}},i.prototype.getModuleName=function(){return"otpinput"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.destroy=function(){t.prototype.destroy.call(this),this.unWireEvents();for(var i=0;i<this.inputs.length;i++)(0,e.remove)(this.inputs[parseInt(i.toString(),10)]);for(i=0;i<this.separatorElements.length;i++)(0,e.remove)(this.separatorElements[parseInt(i.toString(),10)]);(0,e.remove)(this.hiddenInputEle),(0,e.removeClass)([this.element],["e-underlined","e-filled","e-outline","e-rtl"]),this.cssClass&&(0,e.removeClass)([this.element],this.cssClass.trim().split(" ")),this.element.removeAttribute("role"),this.inputs=[],this.separatorElements=[],this.hiddenInputEle=null},i.prototype.focusIn=function(){this.isFocusInCalled=!0;var t=0;this.inputs.forEach((function(e,i){e.value.length>0&&(t=i)})),this.inputs[parseInt(t.toString(),10)].focus(),this.isFocusInCalled=!1},i.prototype.focusOut=function(){this.isFocusOutCalled=!0,this.inputs.forEach((function(t){t.blur()})),this.isFocusOutCalled=!1},i.prototype.onPropertyChanged=function(t,e){for(var i=0,s=Object.keys(t);i<s.length;i++){switch(s[i]){case"value":this.updateInputValue(e.value),this.triggerValuechanged();break;case"placeholder":this.addPlaceHolder();break;case"disabled":this.updateDisabledState();break;case"cssClass":this.updateCssClass(t.cssClass,e.cssClass);break;case"separator":""===e.separator?this.renderSeparator(1,this.inputs.length):this.updateSeparatorValue();break;case"type":this.updateInputType(t.type);break;case"stylingMode":this.updateVariantClass();break;case"ariaLabels":this.updateAriaLabel(t.ariaLabels);break;case"length":this.handleLengthChange(t.length,e.length);break;case"enableRtl":this.element.classList[this.enableRtl?"add":"remove"](tn)}}},Qs([(0,e.Property)(4)],i.prototype,"length",void 0),Qs([(0,e.Property)("")],i.prototype,"value",void 0),Qs([(0,e.Property)(Zs.Number)],i.prototype,"type",void 0),Qs([(0,e.Property)("")],i.prototype,"separator",void 0),Qs([(0,e.Property)("")],i.prototype,"placeholder",void 0),Qs([(0,e.Property)(Js.Outlined)],i.prototype,"stylingMode",void 0),Qs([(0,e.Property)(!1)],i.prototype,"disabled",void 0),Qs([(0,e.Property)("")],i.prototype,"cssClass",void 0),Qs([(0,e.Property)({})],i.prototype,"htmlAttributes",void 0),Qs([(0,e.Property)([])],i.prototype,"ariaLabels",void 0),Qs([(0,e.Event)()],i.prototype,"created",void 0),Qs([(0,e.Event)()],i.prototype,"valueChanged",void 0),Qs([(0,e.Event)()],i.prototype,"focus",void 0),Qs([(0,e.Event)()],i.prototype,"blur",void 0),Qs([(0,e.Event)()],i.prototype,"input",void 0),i=Qs([e.NotifyPropertyChanges],i)}(e.Component)})(),r})()));
|