@luftborn/custom-elements 1.1.44 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/README.md +2 -2
  2. package/assets/style.css +277 -277
  3. package/azure-pipeline.yml +54 -0
  4. package/demo/index.html +585 -585
  5. package/demo/index.js +6109 -0
  6. package/demo/index.min.js +6110 -0
  7. package/demo/index.min.js.map +1 -0
  8. package/demo/index.ts +11 -11
  9. package/demo/old/index.html +586 -586
  10. package/demo/old/index.js +10849 -10849
  11. package/demo/old/index.min.js +10850 -10850
  12. package/demo/old/index.ts +10 -10
  13. package/dist/custom-form.d.ts +20 -20
  14. package/dist/custom-form.js +147 -146
  15. package/dist/custom-form.js.map +1 -1
  16. package/dist/elements/Address/AddressElement.d.ts +28 -28
  17. package/dist/elements/Address/AddressElement.js +206 -206
  18. package/dist/elements/BankField/BankFieldElement.d.ts +22 -22
  19. package/dist/elements/BankField/BankFieldElement.js +127 -127
  20. package/dist/elements/CPRElement/CPRElement.d.ts +14 -14
  21. package/dist/elements/CPRElement/CPRElement.js +82 -82
  22. package/dist/elements/CVRElement/CVRElement.d.ts +14 -14
  23. package/dist/elements/CVRElement/CVRElement.js +82 -82
  24. package/dist/elements/CheckBoxElement/CheckBoxElement.d.ts +14 -14
  25. package/dist/elements/CheckBoxElement/CheckBoxElement.js +96 -96
  26. package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
  27. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.d.ts +12 -12
  28. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +82 -82
  29. package/dist/elements/DateField/DateFieldElement.d.ts +12 -12
  30. package/dist/elements/DateField/DateFieldElement.js +85 -85
  31. package/dist/elements/DropDownList/DropDownListElement.d.ts +14 -14
  32. package/dist/elements/DropDownList/DropDownListElement.js +93 -93
  33. package/dist/elements/DropDownList/DropDownListElement.js.map +1 -1
  34. package/dist/elements/Elements.d.ts +18 -18
  35. package/dist/elements/Elements.js +37 -37
  36. package/dist/elements/EmailField/EmailFieldElement.d.ts +13 -13
  37. package/dist/elements/EmailField/EmailFieldElement.js +83 -83
  38. package/dist/elements/FileField/FileFieldElement.d.ts +15 -12
  39. package/dist/elements/FileField/FileFieldElement.js +103 -83
  40. package/dist/elements/FileField/FileFieldElement.js.map +1 -1
  41. package/dist/elements/IdentificationElement/IdentificationElement.d.ts +18 -18
  42. package/dist/elements/IdentificationElement/IdentificationElement.js +94 -94
  43. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.d.ts +16 -16
  44. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +114 -108
  45. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js.map +1 -1
  46. package/dist/elements/NumericField/NumericFieldElement.d.ts +12 -12
  47. package/dist/elements/NumericField/NumericFieldElement.js +91 -91
  48. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.d.ts +14 -14
  49. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +99 -99
  50. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
  51. package/dist/elements/TextAreaElement/TextAreaElement.d.ts +12 -12
  52. package/dist/elements/TextAreaElement/TextAreaElement.js +79 -79
  53. package/dist/elements/TextField/TextFieldElement.d.ts +12 -12
  54. package/dist/elements/TextField/TextFieldElement.js +79 -79
  55. package/dist/elements/TypeAhead/TypeAheadElement.d.ts +24 -24
  56. package/dist/elements/TypeAhead/TypeAheadElement.js +209 -209
  57. package/dist/framework/CustomEvents.d.ts +21 -21
  58. package/dist/framework/CustomEvents.js +47 -47
  59. package/dist/framework/CustomInputElement.d.ts +50 -50
  60. package/dist/framework/CustomInputElement.js +258 -257
  61. package/dist/framework/CustomInputElement.js.map +1 -1
  62. package/dist/framework/Language/Languages/Base/BaseDictionary.d.ts +4 -4
  63. package/dist/framework/Language/Languages/Base/BaseDictionary.js +20 -20
  64. package/dist/framework/Language/Languages/CzechDictionary.d.ts +4 -0
  65. package/dist/framework/Language/Languages/CzechDictionary.js +40 -0
  66. package/dist/framework/Language/Languages/CzechDictionary.js.map +1 -0
  67. package/dist/framework/Language/Languages/DanishDictionary.d.ts +4 -4
  68. package/dist/framework/Language/Languages/DanishDictionary.js +39 -39
  69. package/dist/framework/Language/Languages/DutchDictionary.d.ts +4 -0
  70. package/dist/framework/Language/Languages/DutchDictionary.js +40 -0
  71. package/dist/framework/Language/Languages/DutchDictionary.js.map +1 -0
  72. package/dist/framework/Language/Languages/EnglishDictionary.d.ts +4 -4
  73. package/dist/framework/Language/Languages/EnglishDictionary.js +39 -39
  74. package/dist/framework/Language/Languages/EstonianDictionary.d.ts +4 -0
  75. package/dist/framework/Language/Languages/EstonianDictionary.js +40 -0
  76. package/dist/framework/Language/Languages/EstonianDictionary.js.map +1 -0
  77. package/dist/framework/Language/Languages/FinnishDictionary.d.ts +4 -0
  78. package/dist/framework/Language/Languages/FinnishDictionary.js +40 -0
  79. package/dist/framework/Language/Languages/FinnishDictionary.js.map +1 -0
  80. package/dist/framework/Language/Languages/FrenchDictionary.d.ts +4 -0
  81. package/dist/framework/Language/Languages/FrenchDictionary.js +40 -0
  82. package/dist/framework/Language/Languages/FrenchDictionary.js.map +1 -0
  83. package/dist/framework/Language/Languages/GermanDictionary.d.ts +4 -0
  84. package/dist/framework/Language/Languages/GermanDictionary.js +40 -0
  85. package/dist/framework/Language/Languages/GermanDictionary.js.map +1 -0
  86. package/dist/framework/Language/Languages/GreekDictionary.d.ts +4 -0
  87. package/dist/framework/Language/Languages/GreekDictionary.js +40 -0
  88. package/dist/framework/Language/Languages/GreekDictionary.js.map +1 -0
  89. package/dist/framework/Language/Languages/HungarianDictionary.d.ts +4 -0
  90. package/dist/framework/Language/Languages/HungarianDictionary.js +40 -0
  91. package/dist/framework/Language/Languages/HungarianDictionary.js.map +1 -0
  92. package/dist/framework/Language/Languages/IcelandicDictionary.d.ts +4 -0
  93. package/dist/framework/Language/Languages/IcelandicDictionary.js +40 -0
  94. package/dist/framework/Language/Languages/IcelandicDictionary.js.map +1 -0
  95. package/dist/framework/Language/Languages/ItalianDictionary.d.ts +4 -0
  96. package/dist/framework/Language/Languages/ItalianDictionary.js +40 -0
  97. package/dist/framework/Language/Languages/ItalianDictionary.js.map +1 -0
  98. package/dist/framework/Language/Languages/LatvianDictionary.d.ts +4 -0
  99. package/dist/framework/Language/Languages/LatvianDictionary.js +40 -0
  100. package/dist/framework/Language/Languages/LatvianDictionary.js.map +1 -0
  101. package/dist/framework/Language/Languages/LituanianDictionary.d.ts +4 -0
  102. package/dist/framework/Language/Languages/LituanianDictionary.js +40 -0
  103. package/dist/framework/Language/Languages/LituanianDictionary.js.map +1 -0
  104. package/dist/framework/Language/Languages/NorwegianDictionary.d.ts +4 -0
  105. package/dist/framework/Language/Languages/NorwegianDictionary.js +40 -0
  106. package/dist/framework/Language/Languages/NorwegianDictionary.js.map +1 -0
  107. package/dist/framework/Language/Languages/PolishDictionary.d.ts +4 -0
  108. package/dist/framework/Language/Languages/PolishDictionary.js +40 -0
  109. package/dist/framework/Language/Languages/PolishDictionary.js.map +1 -0
  110. package/dist/framework/Language/Languages/PortugueseDictionary.d.ts +4 -0
  111. package/dist/framework/Language/Languages/PortugueseDictionary.js +40 -0
  112. package/dist/framework/Language/Languages/PortugueseDictionary.js.map +1 -0
  113. package/dist/framework/Language/Languages/SpanishDictionary.d.ts +4 -0
  114. package/dist/framework/Language/Languages/SpanishDictionary.js +40 -0
  115. package/dist/framework/Language/Languages/SpanishDictionary.js.map +1 -0
  116. package/dist/framework/Language/Languages/SwedishDictionary.d.ts +4 -0
  117. package/dist/framework/Language/Languages/SwedishDictionary.js +40 -0
  118. package/dist/framework/Language/Languages/SwedishDictionary.js.map +1 -0
  119. package/dist/framework/Language/Translator.d.ts +23 -6
  120. package/dist/framework/Language/Translator.js +115 -32
  121. package/dist/framework/Language/Translator.js.map +1 -1
  122. package/dist/framework/Models/OptionWithDescription.d.ts +6 -6
  123. package/dist/framework/Models/OptionWithDescription.js +9 -9
  124. package/dist/framework/Polyfills/getAttributeNamesPolyfill.d.ts +1 -1
  125. package/dist/framework/Polyfills/getAttributeNamesPolyfill.js +17 -17
  126. package/dist/framework/Translations/CaseConverter.d.ts +5 -5
  127. package/dist/framework/Translations/CaseConverter.js +50 -50
  128. package/dist/framework/Utilities/ArrayUtil.d.ts +6 -0
  129. package/dist/framework/Utilities/ArrayUtil.js +37 -0
  130. package/dist/framework/Utilities/ArrayUtil.js.map +1 -0
  131. package/dist/framework/Utilities/DomUtil.d.ts +21 -0
  132. package/dist/framework/Utilities/DomUtil.js +102 -0
  133. package/dist/framework/Utilities/DomUtil.js.map +1 -0
  134. package/dist/framework/Utilities/DomUtility.d.ts +3 -3
  135. package/dist/framework/Utilities/DomUtility.js +12 -12
  136. package/dist/framework/Utilities/MakeRequest.d.ts +8 -0
  137. package/dist/framework/Utilities/MakeRequest.js +49 -0
  138. package/dist/framework/Utilities/MakeRequest.js.map +1 -0
  139. package/dist/framework/Utilities/StringUtil.d.ts +4 -0
  140. package/dist/framework/Utilities/StringUtil.js +17 -0
  141. package/dist/framework/Utilities/StringUtil.js.map +1 -0
  142. package/dist/framework/Utilities/ViewportUtil.d.ts +8 -0
  143. package/dist/framework/Utilities/ViewportUtil.js +43 -0
  144. package/dist/framework/Utilities/ViewportUtil.js.map +1 -0
  145. package/dist/framework/Utilities/debouncer.d.ts +8 -8
  146. package/dist/framework/Utilities/debouncer.js +51 -51
  147. package/dist/framework/Validation/IValidator.interface.d.ts +3 -3
  148. package/dist/framework/Validation/IValidator.interface.js +2 -2
  149. package/dist/framework/Validation/Validators/BankAccount.d.ts +4 -4
  150. package/dist/framework/Validation/Validators/BankAccount.js +12 -12
  151. package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.d.ts +4 -4
  152. package/dist/framework/Validation/Validators/BankAccountRegistrationNumber.js +12 -12
  153. package/dist/framework/Validation/Validators/BankIdNorway.d.ts +5 -5
  154. package/dist/framework/Validation/Validators/BankIdNorway.js +21 -21
  155. package/dist/framework/Validation/Validators/BankIdSweden.d.ts +5 -5
  156. package/dist/framework/Validation/Validators/BankIdSweden.js +21 -21
  157. package/dist/framework/Validation/Validators/CPR.d.ts +9 -9
  158. package/dist/framework/Validation/Validators/CPR.js +75 -75
  159. package/dist/framework/Validation/Validators/CVR.d.ts +5 -5
  160. package/dist/framework/Validation/Validators/CVR.js +30 -30
  161. package/dist/framework/custom-element.decorator.d.ts +9 -9
  162. package/dist/framework/custom-element.decorator.js +51 -51
  163. package/dist/index.d.ts +7 -7
  164. package/dist/index.js +14 -14
  165. package/node_modules/@webcomponents/webcomponentsjs/CHANGELOG.md +15 -0
  166. package/node_modules/@webcomponents/webcomponentsjs/README.md +13 -0
  167. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js +31 -31
  168. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-ce.js.map +1 -1
  169. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js +15 -13
  170. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_dom.js.map +1 -1
  171. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-pf_js.js.map +1 -1
  172. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js +237 -223
  173. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce-pf.js.map +1 -1
  174. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js +188 -176
  175. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js.map +1 -1
  176. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js +155 -144
  177. package/node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd.js.map +1 -1
  178. package/node_modules/@webcomponents/webcomponentsjs/package.json +31 -64
  179. package/node_modules/@webcomponents/webcomponentsjs/src/entrypoints/webcomponents-pf_dom-index.js +2 -0
  180. package/node_modules/@webcomponents/webcomponentsjs/src/platform/event-listener-options.js +122 -0
  181. package/node_modules/@webcomponents/webcomponentsjs/src/platform/toggle-attribute.js +39 -0
  182. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.d.ts +1 -0
  183. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js +239 -225
  184. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js.map +1 -1
  185. package/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js +35 -3
  186. package/package.json +38 -39
  187. package/src/custom-form.ts +140 -139
  188. package/src/elements/Address/AddressElement.ts +216 -216
  189. package/src/elements/BankField/BankFieldElement.ts +127 -127
  190. package/src/elements/CPRElement/CPRElement.ts +74 -74
  191. package/src/elements/CVRElement/CVRElement.ts +75 -75
  192. package/src/elements/CheckBoxElement/CheckBoxElement.ts +99 -99
  193. package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +75 -75
  194. package/src/elements/DateField/DateFieldElement.ts +78 -78
  195. package/src/elements/DropDownList/DropDownListElement.ts +100 -100
  196. package/src/elements/Elements.ts +37 -37
  197. package/src/elements/EmailField/EmailFieldElement.ts +78 -78
  198. package/src/elements/FileField/FileFieldElement.ts +96 -76
  199. package/src/elements/IdentificationElement/IdentificationElement.ts +104 -104
  200. package/src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts +116 -111
  201. package/src/elements/NumericField/NumericFieldElement.ts +84 -84
  202. package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +103 -103
  203. package/src/elements/TextAreaElement/TextAreaElement.ts +72 -72
  204. package/src/elements/TextField/TextFieldElement.ts +72 -72
  205. package/src/elements/TypeAhead/TypeAheadElement.ts +248 -248
  206. package/src/framework/CustomEvents.ts +47 -47
  207. package/src/framework/CustomInputElement.ts +277 -276
  208. package/src/framework/Language/Languages/Base/BaseDictionary.ts +15 -15
  209. package/src/framework/Language/Languages/CzechDictionary.ts +18 -0
  210. package/src/framework/Language/Languages/DanishDictionary.ts +17 -17
  211. package/src/framework/Language/Languages/DutchDictionary.ts +18 -0
  212. package/src/framework/Language/Languages/EnglishDictionary.ts +18 -18
  213. package/src/framework/Language/Languages/EstonianDictionary.ts +18 -0
  214. package/src/framework/Language/Languages/FinnishDictionary.ts +18 -0
  215. package/src/framework/Language/Languages/FrenchDictionary.ts +18 -0
  216. package/src/framework/Language/Languages/GermanDictionary.ts +18 -0
  217. package/src/framework/Language/Languages/GreekDictionary.ts +18 -0
  218. package/src/framework/Language/Languages/HungarianDictionary.ts +18 -0
  219. package/src/framework/Language/Languages/IcelandicDictionary.ts +18 -0
  220. package/src/framework/Language/Languages/ItalianDictionary.ts +18 -0
  221. package/src/framework/Language/Languages/LatvianDictionary.ts +18 -0
  222. package/src/framework/Language/Languages/LituanianDictionary.ts +18 -0
  223. package/src/framework/Language/Languages/NorwegianDictionary.ts +18 -0
  224. package/src/framework/Language/Languages/PolishDictionary.ts +18 -0
  225. package/src/framework/Language/Languages/PortugueseDictionary.ts +18 -0
  226. package/src/framework/Language/Languages/SpanishDictionary.ts +18 -0
  227. package/src/framework/Language/Languages/SwedishDictionary.ts +18 -0
  228. package/src/framework/Language/Translator.ts +110 -26
  229. package/src/framework/Models/OptionWithDescription.ts +8 -8
  230. package/src/framework/Polyfills/getAttributeNamesPolyfill.ts +13 -13
  231. package/src/framework/Translations/CaseConverter.ts +43 -43
  232. package/src/framework/Utilities/ArrayUtil.ts +31 -0
  233. package/src/framework/Utilities/DomUtil.ts +117 -0
  234. package/src/framework/Utilities/DomUtility.ts +6 -6
  235. package/src/framework/Utilities/MakeRequest.ts +47 -0
  236. package/src/framework/Utilities/StringUtil.ts +9 -0
  237. package/src/framework/Utilities/ViewportUtil.ts +46 -0
  238. package/src/framework/Utilities/debouncer.ts +66 -66
  239. package/src/framework/Validation/IValidator.interface.ts +3 -3
  240. package/src/framework/Validation/Validators/BankAccount.ts +7 -7
  241. package/src/framework/Validation/Validators/BankAccountRegistrationNumber.ts +8 -8
  242. package/src/framework/Validation/Validators/BankIdNorway.ts +21 -21
  243. package/src/framework/Validation/Validators/BankIdSweden.ts +21 -21
  244. package/src/framework/Validation/Validators/CPR.ts +82 -82
  245. package/src/framework/Validation/Validators/CVR.ts +27 -27
  246. package/src/framework/custom-element.decorator.ts +57 -57
  247. package/src/index.ts +12 -12
@@ -1,33 +1,116 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var DanishDictionary_1 = require("./Languages/DanishDictionary");
4
- var EnglishDictionary_1 = require("./Languages/EnglishDictionary");
5
- var Translator = /** @class */ (function () {
6
- function Translator() {
7
- }
8
- Translator.Translate = function (key, language) {
9
- if (language === void 0) { language = 'da'; }
10
- language = language.toLowerCase();
11
- var isSupportedLanguage = Translator.langauges.indexOf(language) != -1;
12
- if (!isSupportedLanguage) {
13
- language = 'da';
14
- }
15
- switch (language) {
16
- case 'da':
17
- return this.danishDictionary.get(key);
18
- break;
19
- case 'en':
20
- return this.englishDictionary.get(key);
21
- break;
22
- }
23
- };
24
- Translator.langauges = [
25
- 'en',
26
- 'da'
27
- ];
28
- Translator.danishDictionary = new DanishDictionary_1.default();
29
- Translator.englishDictionary = new EnglishDictionary_1.default();
30
- return Translator;
31
- }());
32
- exports.default = Translator;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var DanishDictionary_1 = require("./Languages/DanishDictionary");
4
+ var EnglishDictionary_1 = require("./Languages/EnglishDictionary");
5
+ var CzechDictionary_1 = require("./Languages/CzechDictionary");
6
+ var GermanDictionary_1 = require("./Languages/GermanDictionary");
7
+ var GreekDictionary_1 = require("./Languages/GreekDictionary");
8
+ var SpanishDictionary_1 = require("./Languages/SpanishDictionary");
9
+ var EstonianDictionary_1 = require("./Languages/EstonianDictionary");
10
+ var FinnishDictionary_1 = require("./Languages/FinnishDictionary");
11
+ var FrenchDictionary_1 = require("./Languages/FrenchDictionary");
12
+ var HungarianDictionary_1 = require("./Languages/HungarianDictionary");
13
+ var IcelandicDictionary_1 = require("./Languages/IcelandicDictionary");
14
+ var ItalianDictionary_1 = require("./Languages/ItalianDictionary");
15
+ var LatvianDictionary_1 = require("./Languages/LatvianDictionary");
16
+ var LituanianDictionary_1 = require("./Languages/LituanianDictionary");
17
+ var DutchDictionary_1 = require("./Languages/DutchDictionary");
18
+ var NorwegianDictionary_1 = require("./Languages/NorwegianDictionary");
19
+ var PolishDictionary_1 = require("./Languages/PolishDictionary");
20
+ var PortugueseDictionary_1 = require("./Languages/PortugueseDictionary");
21
+ var SwedishDictionary_1 = require("./Languages/SwedishDictionary");
22
+ var Translator = /** @class */ (function () {
23
+ function Translator() {
24
+ }
25
+ Translator.Translate = function (key, language) {
26
+ if (language === void 0) { language = 'da'; }
27
+ language = language.toLowerCase();
28
+ var isSupportedLanguage = Translator.langauges.indexOf(language) != -1;
29
+ if (!isSupportedLanguage) {
30
+ language = 'da';
31
+ }
32
+ switch (language) {
33
+ case 'da':
34
+ return this.danishDictionary.get(key);
35
+ case 'en':
36
+ return this.englishDictionary.get(key);
37
+ case 'cs':
38
+ return this.czechDictionary.get(key);
39
+ case 'de':
40
+ return this.germanDictionary.get(key);
41
+ case 'el':
42
+ return this.greekDictionary.get(key);
43
+ case 'es':
44
+ return this.spanishDictionary.get(key);
45
+ case 'et':
46
+ return this.estonianDictionary.get(key);
47
+ case 'fi':
48
+ return this.finnishDictionary.get(key);
49
+ case 'fr':
50
+ return this.frenchDictionary.get(key);
51
+ case 'hu':
52
+ return this.hungarianDictionary.get(key);
53
+ case 'is':
54
+ return this.icelandicDictionary.get(key);
55
+ case 'it':
56
+ return this.italianDictionary.get(key);
57
+ case 'lt':
58
+ return this.latvianDictionary.get(key);
59
+ case 'lv':
60
+ return this.lituanianDictionary.get(key);
61
+ case 'nl':
62
+ return this.dutchDictionary.get(key);
63
+ case 'no':
64
+ return this.norwegianDictionary.get(key);
65
+ case 'pl':
66
+ return this.polishDictionary.get(key);
67
+ case 'pt':
68
+ return this.portugueseDictionary.get(key);
69
+ case 'sv':
70
+ return this.swedishDictionary.get(key);
71
+ }
72
+ };
73
+ Translator.langauges = [
74
+ 'en',
75
+ 'da',
76
+ 'cs',
77
+ 'de',
78
+ 'el',
79
+ 'es',
80
+ 'et',
81
+ 'fi',
82
+ 'fr',
83
+ 'hu',
84
+ 'is',
85
+ 'it',
86
+ 'lt',
87
+ 'lv',
88
+ 'nl',
89
+ 'no',
90
+ 'pl',
91
+ 'pt',
92
+ 'sv',
93
+ ];
94
+ Translator.danishDictionary = new DanishDictionary_1.default();
95
+ Translator.englishDictionary = new EnglishDictionary_1.default();
96
+ Translator.czechDictionary = new CzechDictionary_1.default();
97
+ Translator.germanDictionary = new GermanDictionary_1.default();
98
+ Translator.greekDictionary = new GreekDictionary_1.default();
99
+ Translator.spanishDictionary = new SpanishDictionary_1.default();
100
+ Translator.estonianDictionary = new EstonianDictionary_1.default();
101
+ Translator.finnishDictionary = new FinnishDictionary_1.default();
102
+ Translator.frenchDictionary = new FrenchDictionary_1.default();
103
+ Translator.hungarianDictionary = new HungarianDictionary_1.default();
104
+ Translator.icelandicDictionary = new IcelandicDictionary_1.default();
105
+ Translator.italianDictionary = new ItalianDictionary_1.default();
106
+ Translator.latvianDictionary = new LatvianDictionary_1.default();
107
+ Translator.lituanianDictionary = new LituanianDictionary_1.default();
108
+ Translator.dutchDictionary = new DutchDictionary_1.default();
109
+ Translator.norwegianDictionary = new NorwegianDictionary_1.default();
110
+ Translator.polishDictionary = new PolishDictionary_1.default();
111
+ Translator.portugueseDictionary = new PortugueseDictionary_1.default();
112
+ Translator.swedishDictionary = new SwedishDictionary_1.default();
113
+ return Translator;
114
+ }());
115
+ exports.default = Translator;
33
116
  //# sourceMappingURL=Translator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Translator.js","sourceRoot":"","sources":["../../../src/framework/Language/Translator.ts"],"names":[],"mappings":";;AAAA,iEAA4D;AAC5D,mEAA8D;AAE9D;IAAA;IAuBA,CAAC;IAfO,oB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IAC9C,4BAAiB,GAAG,IAAI,2BAAiB,EAAE,CAAC;IAC5C,2BAAgB,GAAG,IAAI,0BAAgB,EAAE,CAAC;IAC1C,8BAAmB,GAAG,IAAI,6BAAmB,EAAE,CAAC;IAChD,8BAAmB,GAAG,IAAI,6BAAmB,EAAE,CAAC;IAChD,4BAAiB,GAAG,IAAI,2BAAiB,EAAE,CAAC;IAC5C,4BAAiB,GAAG,IAAI,2BAAiB,EAAE,CAAC;IAC5C,8BAAmB,GAAG,IAAI,6BAAmB,EAAE,CAAC;IAChD,0BAAe,GAAG,IAAI,yBAAe,EAAE,CAAC;IACxC,8BAAmB,GAAG,IAAI,6BAAmB,EAAE,CAAC;IAChD,2BAAgB,GAAG,IAAI,0BAAgB,EAAE,CAAC;IAC1C,+BAAoB,GAAG,IAAI,8BAAoB,EAAE,CAAC;IAClD,4BAAiB,GAAG,IAAI,2BAAiB,EAAE,CAAC;IAiD/D,iBAAC;CAAA,AA1FD,IA0FC;kBA1FoB,UAAU"}
@@ -1,6 +1,6 @@
1
- export default class OptionWithDescription {
2
- title: string;
3
- value: string;
4
- description: string;
5
- constructor(option: Partial<OptionWithDescription>);
6
- }
1
+ export default class OptionWithDescription {
2
+ title: string;
3
+ value: string;
4
+ description: string;
5
+ constructor(option: Partial<OptionWithDescription>);
6
+ }
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var OptionWithDescription = /** @class */ (function () {
4
- function OptionWithDescription(option) {
5
- Object.assign(this, option);
6
- }
7
- return OptionWithDescription;
8
- }());
9
- exports.default = OptionWithDescription;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var OptionWithDescription = /** @class */ (function () {
4
+ function OptionWithDescription(option) {
5
+ Object.assign(this, option);
6
+ }
7
+ return OptionWithDescription;
8
+ }());
9
+ exports.default = OptionWithDescription;
10
10
  //# sourceMappingURL=OptionWithDescription.js.map
@@ -1 +1 @@
1
- export default function getAttributeNamesPolyfill(): void;
1
+ export default function getAttributeNamesPolyfill(): void;
@@ -1,18 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function getAttributeNamesPolyfill() {
4
- if (Element.prototype.getAttributeNames == undefined) {
5
- Element.prototype.getAttributeNames = function () {
6
- var attributes = this.attributes;
7
- var length = attributes.length;
8
- var result = new Array(length);
9
- for (var i = 0; i < length; i++) {
10
- result[i] = attributes[i].name;
11
- }
12
- return result;
13
- };
14
- }
15
- }
16
- exports.default = getAttributeNamesPolyfill;
17
- ;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function getAttributeNamesPolyfill() {
4
+ if (Element.prototype.getAttributeNames == undefined) {
5
+ Element.prototype.getAttributeNames = function () {
6
+ var attributes = this.attributes;
7
+ var length = attributes.length;
8
+ var result = new Array(length);
9
+ for (var i = 0; i < length; i++) {
10
+ result[i] = attributes[i].name;
11
+ }
12
+ return result;
13
+ };
14
+ }
15
+ }
16
+ exports.default = getAttributeNamesPolyfill;
17
+ ;
18
18
  //# sourceMappingURL=getAttributeNamesPolyfill.js.map
@@ -1,5 +1,5 @@
1
- export default class CaseConverter {
2
- data: any;
3
- constructor(data: any);
4
- camel(): any;
5
- }
1
+ export default class CaseConverter {
2
+ data: any;
3
+ constructor(data: any);
4
+ camel(): any;
5
+ }
@@ -1,51 +1,51 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var CaseConverter = /** @class */ (function () {
4
- function CaseConverter(data) {
5
- this.data = data;
6
- }
7
- CaseConverter.prototype.camel = function () {
8
- var _loop_1 = function (prop) {
9
- if (this_1.data.hasOwnProperty(prop)) {
10
- var camelcaseProperty = prop.substring(0, 1).toLowerCase() + prop.substring(1);
11
- var arrayConverter_1 = function (array) {
12
- var tempArray = [];
13
- for (var index = 0; index < array.length; index++) {
14
- if (array[index] === null || array[index] === undefined) {
15
- continue;
16
- }
17
- var elementType = typeof array[index];
18
- if (elementType === 'string' || elementType === 'number') {
19
- tempArray.push(array[index]);
20
- continue;
21
- }
22
- if (Array.isArray(array[index])) {
23
- tempArray.push(arrayConverter_1(array[index]));
24
- continue;
25
- }
26
- if (typeof array[index] === 'object') {
27
- tempArray.push(new CaseConverter(array[index]).camel());
28
- continue;
29
- }
30
- }
31
- return tempArray;
32
- };
33
- if (Array.isArray(this_1.data[prop])) {
34
- this_1.data[camelcaseProperty] = arrayConverter_1(this_1.data[prop]);
35
- delete this_1.data[prop];
36
- return "continue";
37
- }
38
- this_1.data[camelcaseProperty] = this_1.data[prop];
39
- delete this_1.data[prop];
40
- }
41
- };
42
- var this_1 = this;
43
- for (var prop in this.data) {
44
- _loop_1(prop);
45
- }
46
- return this.data;
47
- };
48
- return CaseConverter;
49
- }());
50
- exports.default = CaseConverter;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var CaseConverter = /** @class */ (function () {
4
+ function CaseConverter(data) {
5
+ this.data = data;
6
+ }
7
+ CaseConverter.prototype.camel = function () {
8
+ var _loop_1 = function (prop) {
9
+ if (this_1.data.hasOwnProperty(prop)) {
10
+ var camelcaseProperty = prop.substring(0, 1).toLowerCase() + prop.substring(1);
11
+ var arrayConverter_1 = function (array) {
12
+ var tempArray = [];
13
+ for (var index = 0; index < array.length; index++) {
14
+ if (array[index] === null || array[index] === undefined) {
15
+ continue;
16
+ }
17
+ var elementType = typeof array[index];
18
+ if (elementType === 'string' || elementType === 'number') {
19
+ tempArray.push(array[index]);
20
+ continue;
21
+ }
22
+ if (Array.isArray(array[index])) {
23
+ tempArray.push(arrayConverter_1(array[index]));
24
+ continue;
25
+ }
26
+ if (typeof array[index] === 'object') {
27
+ tempArray.push(new CaseConverter(array[index]).camel());
28
+ continue;
29
+ }
30
+ }
31
+ return tempArray;
32
+ };
33
+ if (Array.isArray(this_1.data[prop])) {
34
+ this_1.data[camelcaseProperty] = arrayConverter_1(this_1.data[prop]);
35
+ delete this_1.data[prop];
36
+ return "continue";
37
+ }
38
+ this_1.data[camelcaseProperty] = this_1.data[prop];
39
+ delete this_1.data[prop];
40
+ }
41
+ };
42
+ var this_1 = this;
43
+ for (var prop in this.data) {
44
+ _loop_1(prop);
45
+ }
46
+ return this.data;
47
+ };
48
+ return CaseConverter;
49
+ }());
50
+ exports.default = CaseConverter;
51
51
  //# sourceMappingURL=CaseConverter.js.map
@@ -0,0 +1,6 @@
1
+ export default class ArrayUtil {
2
+ static FromNodeList<T extends Node>(list: NodeListOf<T>): T[];
3
+ private static addToCurrent;
4
+ private static addToNew;
5
+ static divideAccordingProperty<T>(array: T[], selector: (item: T) => any): T[][];
6
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ArrayUtil = /** @class */ (function () {
4
+ function ArrayUtil() {
5
+ }
6
+ ArrayUtil.FromNodeList = function (list) {
7
+ return Array.prototype.concat.apply([], list);
8
+ };
9
+ ArrayUtil.addToCurrent = function (chunks, item) {
10
+ if (!chunks.length) {
11
+ chunks[0] = [];
12
+ }
13
+ chunks[chunks.length - 1].push(item);
14
+ };
15
+ ArrayUtil.addToNew = function (chunks, item) {
16
+ chunks[chunks.length] = [];
17
+ chunks[chunks.length - 1].push(item);
18
+ };
19
+ ArrayUtil.divideAccordingProperty = function (array, selector) {
20
+ var _this = this;
21
+ var chunks = [];
22
+ chunks[0] = [array[0]];
23
+ array.reduce(function (a, b) {
24
+ if (selector(a) === selector(b)) {
25
+ _this.addToCurrent(chunks, b);
26
+ }
27
+ else {
28
+ _this.addToNew(chunks, b);
29
+ }
30
+ return b;
31
+ });
32
+ return chunks;
33
+ };
34
+ return ArrayUtil;
35
+ }());
36
+ exports.default = ArrayUtil;
37
+ //# sourceMappingURL=ArrayUtil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrayUtil.js","sourceRoot":"","sources":["../../../src/framework/Utilities/ArrayUtil.ts"],"names":[],"mappings":";;AAAA;IAAA;IA8BA,CAAC;IA7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: Element);
5
+ getDataAttr(attr: string, defaultvalue?: string): any;
6
+ setDataAttr(attr: string, value: string): any;
7
+ getAttr(attr: string, defaultvalue?: string): any;
8
+ setAttr(attr: string, value: string): void;
9
+ removeAttr(attr: string): void;
10
+ removeDataAttr(attr: string): void;
11
+ hasAttr(attr: string): boolean;
12
+ shake(): void;
13
+ error(): void;
14
+ focus(): void;
15
+ removeClass(classname: any): void;
16
+ appendClass(classname: any): void;
17
+ deleteElement(): void;
18
+ setChildElementByAttrName(name: string, value: string): void;
19
+ hasClass(className: string): boolean;
20
+ getStyle(ruleName: string): any;
21
+ }
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var ViewportUtil_1 = require("./ViewportUtil");
4
+ var DomUtil = /** @class */ (function () {
5
+ function DomUtil(element) {
6
+ this.element = element;
7
+ this.viewPortUtil = new ViewportUtil_1.ViewportUtil(this.element);
8
+ }
9
+ DomUtil.prototype.getDataAttr = function (attr, defaultvalue) {
10
+ if (!this.element) {
11
+ return null;
12
+ }
13
+ var value = this.element.getAttribute("data-" + attr);
14
+ return value !== undefined ? value : defaultvalue;
15
+ };
16
+ DomUtil.prototype.setDataAttr = function (attr, value) {
17
+ if (!this.element) {
18
+ return null;
19
+ }
20
+ return this.element.setAttribute("data-" + attr, value);
21
+ };
22
+ DomUtil.prototype.getAttr = function (attr, defaultvalue) {
23
+ if (!this.element) {
24
+ return null;
25
+ }
26
+ var value = this.element.getAttribute(attr);
27
+ return value !== undefined ? value : defaultvalue;
28
+ };
29
+ DomUtil.prototype.setAttr = function (attr, value) {
30
+ if (!this.element) {
31
+ return null;
32
+ }
33
+ this.element.setAttribute(attr, value);
34
+ };
35
+ DomUtil.prototype.removeAttr = function (attr) {
36
+ if (!this.element) {
37
+ return null;
38
+ }
39
+ this.element.removeAttribute(attr);
40
+ };
41
+ DomUtil.prototype.removeDataAttr = function (attr) {
42
+ if (!this.element) {
43
+ return null;
44
+ }
45
+ this.element.removeAttribute("data-" + attr);
46
+ };
47
+ DomUtil.prototype.hasAttr = function (attr) {
48
+ if (!this.element) {
49
+ return null;
50
+ }
51
+ return this.element.hasAttribute(attr);
52
+ };
53
+ DomUtil.prototype.shake = function () {
54
+ var _this = this;
55
+ this.appendClass('shake');
56
+ setTimeout(function () {
57
+ _this.removeClass('shake');
58
+ _this.element.readOnly = false;
59
+ }, 600);
60
+ };
61
+ DomUtil.prototype.error = function () {
62
+ var _this = this;
63
+ this.appendClass('error');
64
+ setTimeout(function () {
65
+ _this.removeClass('error');
66
+ _this.element.readOnly = false;
67
+ }, 5000);
68
+ };
69
+ DomUtil.prototype.focus = function () {
70
+ if (!this.viewPortUtil.IsVisible()) {
71
+ this.element.scrollIntoView();
72
+ }
73
+ };
74
+ DomUtil.prototype.removeClass = function (classname) {
75
+ this.element.classList.remove(classname);
76
+ };
77
+ DomUtil.prototype.appendClass = function (classname) {
78
+ this.element.classList.add(classname);
79
+ };
80
+ DomUtil.prototype.deleteElement = function () {
81
+ if (!this.element) {
82
+ return null;
83
+ }
84
+ this.element.remove();
85
+ };
86
+ DomUtil.prototype.setChildElementByAttrName = function (name, value) {
87
+ var firstLetter = name.replace(/^\w/, function (c) { return c.toUpperCase(); });
88
+ var SubElement = this.element.querySelector("[name=\"" + firstLetter + "\"]");
89
+ if (SubElement) {
90
+ SubElement.value = value;
91
+ }
92
+ };
93
+ DomUtil.prototype.hasClass = function (className) {
94
+ return this.element.classList.contains(className);
95
+ };
96
+ DomUtil.prototype.getStyle = function (ruleName) {
97
+ return getComputedStyle(this.element)[ruleName];
98
+ };
99
+ return DomUtil;
100
+ }());
101
+ exports.default = DomUtil;
102
+ //# sourceMappingURL=DomUtil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DomUtil.js","sourceRoot":"","sources":["../../../src/framework/Utilities/DomUtil.ts"],"names":[],"mappings":";;AAAA,+CAA8C;AAE9C;IAGI,iBAAY,OAAgB;QACxB,IAAI,CAAC,OAAO,GAAG,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AAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAEM,+BAAa,GAApB;QACI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,OAAO,IAAI,CAAC;SACf;QACD,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IAC1B,CAAC;IAEM,2CAAyB,GAAhC,UAAiC,IAAY,EAAE,KAAa;QACxD,IAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,WAAW,EAAE,EAAf,CAAe,CAAC,CAAC;QAC9D,IAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CACzC,aAAU,WAAW,QAAI,CACR,CAAC;QACtB,IAAI,UAAU,EAAE;YACZ,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;SAC5B;IACL,CAAC;IAEM,0BAAQ,GAAf,UAAgB,SAAiB;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC;IAEM,0BAAQ,GAAf,UAAgB,QAAgB;QAC5B,OAAO,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC;IACL,cAAC;AAAD,CAAC,AAlHD,IAkHC"}
@@ -1,3 +1,3 @@
1
- export default class DomUtility {
2
- static boldenText(inputText: string, matchindTextToBolden: string): string;
3
- }
1
+ export default class DomUtility {
2
+ static boldenText(inputText: string, matchindTextToBolden: string): string;
3
+ }
@@ -1,13 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var DomUtility = /** @class */ (function () {
4
- function DomUtility() {
5
- }
6
- // https://stackoverflow.com/questions/1230445/javascript-regex-how-to-bold-specific-words-with-regex
7
- DomUtility.boldenText = function (inputText, matchindTextToBolden) {
8
- return inputText.replace(new RegExp('(^|)(' + matchindTextToBolden + ')(|$)', 'ig'), '$1<b>$2</b>$3');
9
- };
10
- return DomUtility;
11
- }());
12
- exports.default = DomUtility;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var DomUtility = /** @class */ (function () {
4
+ function DomUtility() {
5
+ }
6
+ // https://stackoverflow.com/questions/1230445/javascript-regex-how-to-bold-specific-words-with-regex
7
+ DomUtility.boldenText = function (inputText, matchindTextToBolden) {
8
+ return inputText.replace(new RegExp('(^|)(' + matchindTextToBolden + ')(|$)', 'ig'), '$1<b>$2</b>$3');
9
+ };
10
+ return DomUtility;
11
+ }());
12
+ exports.default = DomUtility;
13
13
  //# sourceMappingURL=DomUtility.js.map
@@ -0,0 +1,8 @@
1
+ export default class MakeRequest {
2
+ method: string;
3
+ url: string;
4
+ headers: any;
5
+ constructor(url: string, method?: string, headers?: any);
6
+ private setHeaders;
7
+ send(data?: any): Promise<unknown>;
8
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var MakeRequest = /** @class */ (function () {
4
+ function MakeRequest(url, method, headers) {
5
+ if (method === void 0) { method = 'get'; }
6
+ if (headers === void 0) { headers = {}; }
7
+ this.method = method;
8
+ this.url = url;
9
+ this.headers = headers;
10
+ }
11
+ MakeRequest.prototype.setHeaders = function (httpRequest) {
12
+ for (var header in this.headers) {
13
+ httpRequest.setRequestHeader(header, this.headers[header]);
14
+ }
15
+ };
16
+ MakeRequest.prototype.send = function (data) {
17
+ var _this = this;
18
+ if (data === void 0) { data = null; }
19
+ return new Promise(function (resolve, reject) {
20
+ var xmlHttpRequest = new XMLHttpRequest();
21
+ xmlHttpRequest.open(_this.method, _this.url);
22
+ _this.setHeaders(xmlHttpRequest);
23
+ xmlHttpRequest.onload = function () {
24
+ if (xmlHttpRequest.status >= 200 &&
25
+ xmlHttpRequest.status < 300) {
26
+ resolve(xmlHttpRequest.response);
27
+ }
28
+ else {
29
+ reject({
30
+ status: xmlHttpRequest.status,
31
+ statusText: xmlHttpRequest.statusText,
32
+ body: xmlHttpRequest.response,
33
+ });
34
+ }
35
+ };
36
+ xmlHttpRequest.onerror = function () {
37
+ reject({
38
+ status: xmlHttpRequest.status,
39
+ statusText: xmlHttpRequest.statusText,
40
+ body: xmlHttpRequest.response,
41
+ });
42
+ };
43
+ xmlHttpRequest.send(data);
44
+ });
45
+ };
46
+ return MakeRequest;
47
+ }());
48
+ exports.default = MakeRequest;
49
+ //# sourceMappingURL=MakeRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MakeRequest.js","sourceRoot":"","sources":["../../../src/framework/Utilities/MakeRequest.ts"],"names":[],"mappings":";;AAAA;IAKI,qBAAY,GAAW,EAAE,MAAsB,EAAE,OAAiB;QAAzC,uBAAA,EAAA,cAAsB;QAAE,wBAAA,EAAA,YAAiB;QAC9D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEO,gCAAU,GAAlB,UAAmB,WAA2B;QAC1C,KAAK,IAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;YAC/B,WAAW,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;SAC9D;IACL,CAAC;IAED,0BAAI,GAAJ,UAAK,IAAgB;QAArB,iBA4BC;QA5BI,qBAAA,EAAA,WAAgB;QACjB,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAC/B,IAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;YAC5C,cAAc,CAAC,IAAI,CAAC,KAAI,CAAC,MAAM,EAAE,KAAI,CAAC,GAAG,CAAC,CAAC;YAC3C,KAAI,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;YAChC,cAAc,CAAC,MAAM,GAAG;gBACpB,IACI,cAAc,CAAC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