@ukic/web-components 3.10.0 → 3.12.0

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 (676) hide show
  1. package/dist/cjs/constants-3a9ba64a.js +191 -0
  2. package/dist/cjs/constants-3a9ba64a.js.map +1 -0
  3. package/dist/cjs/core.cjs.js +1 -1
  4. package/dist/cjs/{helpers-a0e78e2e.js → helpers-478d1107.js} +6 -187
  5. package/dist/cjs/helpers-478d1107.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +2 -1
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +2 -1
  9. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-action-chip.cjs.entry.js +2 -1
  11. package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-alert.cjs.entry.js +4 -3
  13. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-back-to-top.cjs.entry.js +2 -1
  15. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-badge.cjs.entry.js +2 -1
  17. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +2 -1
  19. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -1
  21. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-button_3.cjs.entry.js +27 -20
  23. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-card-vertical.cjs.entry.js +2 -1
  25. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-checkbox-group.cjs.entry.js +8 -4
  27. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-checkbox.cjs.entry.js +5 -4
  29. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-chip.cjs.entry.js +7 -5
  31. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-data-list.cjs.entry.js +2 -2
  33. package/dist/cjs/ic-data-row.cjs.entry.js +4 -3
  34. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-dialog.cjs.entry.js +7 -4
  36. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-divider.cjs.entry.js +2 -1
  38. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-empty-state.cjs.entry.js +4 -3
  40. package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -1
  42. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-footer-link.cjs.entry.js +4 -3
  44. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-footer.cjs.entry.js +10 -9
  46. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-hero.cjs.entry.js +6 -5
  48. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +7 -6
  50. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1388 -12
  52. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-input-label_2.cjs.entry.js +27 -12
  54. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-layout-grid-item.cjs.entry.js +2 -2
  56. package/dist/cjs/ic-layout-grid.cjs.entry.js +2 -2
  57. package/dist/cjs/ic-link.cjs.entry.js +5 -4
  58. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-menu-group.cjs.entry.js +3 -2
  60. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-menu-item.cjs.entry.js +2 -1
  62. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-navigation-button.cjs.entry.js +3 -2
  64. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -2
  66. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-navigation-item.cjs.entry.js +2 -1
  68. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-navigation-menu.cjs.entry.js +6 -5
  70. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-page-header.cjs.entry.js +8 -7
  72. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-pagination-item.cjs.entry.js +3 -2
  74. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-pagination.cjs.entry.js +6 -5
  76. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-popover-menu.cjs.entry.js +6 -5
  78. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-radio-group.cjs.entry.js +15 -7
  80. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-radio-option.cjs.entry.js +7 -6
  82. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-search-bar.cjs.entry.js +11 -10
  84. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  86. package/dist/cjs/ic-select.cjs.entry.js +21 -13
  87. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-side-navigation.cjs.entry.js +6 -5
  89. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  91. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  92. package/dist/cjs/ic-status-tag.cjs.entry.js +4 -3
  93. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-step.cjs.entry.js +67 -54
  95. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  96. package/dist/cjs/ic-stepper.cjs.entry.js +21 -3
  97. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-switch.cjs.entry.js +6 -5
  99. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-tab-context.cjs.entry.js +10 -2
  101. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-tab-group.cjs.entry.js +4 -3
  103. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  105. package/dist/cjs/ic-tab.cjs.entry.js +2 -1
  106. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  107. package/dist/cjs/ic-text-field.cjs.entry.js +32 -23
  108. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  109. package/dist/cjs/ic-theme.cjs.entry.js +5 -4
  110. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  111. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  112. package/dist/cjs/ic-toast.cjs.entry.js +7 -6
  113. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  114. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +4 -3
  115. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  116. package/dist/cjs/ic-toggle-button.cjs.entry.js +4 -3
  117. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  118. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -1
  119. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  120. package/dist/cjs/ic-typography.cjs.entry.js +4 -3
  121. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  122. package/dist/cjs/index.cjs.js +16 -0
  123. package/dist/cjs/index.cjs.js.map +1 -1
  124. package/dist/cjs/loader.cjs.js +1 -1
  125. package/dist/collection/assets/ai-icon.svg +1 -1
  126. package/dist/collection/assets/error-icon.svg +4 -4
  127. package/dist/collection/assets/info-icon.svg +4 -4
  128. package/dist/collection/assets/neutral-icon.svg +4 -4
  129. package/dist/collection/assets/success-icon.svg +4 -4
  130. package/dist/collection/assets/warning-icon.svg +4 -4
  131. package/dist/collection/components/ic-alert/ic-alert.js +1 -1
  132. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  133. package/dist/collection/components/ic-button/ic-button.js +14 -8
  134. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  135. package/dist/collection/components/ic-button/ic-button.stories.js +191 -0
  136. package/dist/collection/components/ic-card-vertical/ic-card-vertical.stories.js +10 -10
  137. package/dist/collection/components/ic-checkbox/ic-checkbox.css +5 -0
  138. package/dist/collection/components/ic-checkbox/ic-checkbox.js +2 -2
  139. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  140. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +3 -3
  141. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +5 -2
  142. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  143. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +11 -28
  144. package/dist/collection/components/ic-chip/ic-chip.css +4 -0
  145. package/dist/collection/components/ic-chip/ic-chip.js +4 -3
  146. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  147. package/dist/collection/components/ic-data-list/ic-data-list.js +2 -2
  148. package/dist/collection/components/ic-data-list/ic-data-list.stories.js +30 -6
  149. package/dist/collection/components/ic-data-row/ic-data-row.js +2 -2
  150. package/dist/collection/components/ic-dialog/ic-dialog.js +5 -3
  151. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  152. package/dist/collection/components/ic-dialog/ic-dialog.stories.js +40 -1
  153. package/dist/collection/components/ic-empty-state/ic-empty-state.js +2 -2
  154. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
  155. package/dist/collection/components/ic-hero/ic-hero.js +4 -4
  156. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +5 -5
  157. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -3
  158. package/dist/collection/components/ic-input-container/ic-input-container.js +2 -2
  159. package/dist/collection/components/ic-input-label/ic-input-label.js +2 -2
  160. package/dist/collection/components/ic-input-validation/ic-input-validation.css +9 -1
  161. package/dist/collection/components/ic-input-validation/ic-input-validation.js +27 -10
  162. package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
  163. package/dist/collection/components/ic-layout-grid/ic-layout-grid.js +2 -2
  164. package/dist/collection/components/ic-layout-grid-item/ic-layout-grid-item.js +2 -2
  165. package/dist/collection/components/ic-link/ic-link.js +1 -1
  166. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +5 -5
  167. package/dist/collection/components/ic-menu/ic-menu.css +2 -2
  168. package/dist/collection/components/ic-menu/ic-menu.js +6 -5
  169. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  170. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  171. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +1 -1
  172. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +4 -4
  173. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  174. package/dist/collection/components/ic-page-header/ic-page-header.js +6 -6
  175. package/dist/collection/components/ic-pagination/ic-pagination.js +4 -4
  176. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +1 -1
  177. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
  178. package/dist/collection/components/ic-radio-group/ic-radio-group.css +2 -2
  179. package/dist/collection/components/ic-radio-group/ic-radio-group.js +40 -7
  180. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  181. package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +178 -15
  182. package/dist/collection/components/ic-radio-option/ic-radio-option.css +37 -1
  183. package/dist/collection/components/ic-radio-option/ic-radio-option.js +4 -4
  184. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  185. package/dist/collection/components/ic-search-bar/ic-search-bar.js +9 -9
  186. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  187. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  188. package/dist/collection/components/ic-select/ic-select.js +44 -11
  189. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  190. package/dist/collection/components/ic-select/ic-select_(multi).stories.js +22 -8
  191. package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +16 -3
  192. package/dist/collection/components/ic-select/ic-select_(single).stories.js +119 -10
  193. package/dist/collection/components/ic-select/test/a11y/ic-select.test.a11y.js +60 -0
  194. package/dist/collection/components/ic-select/test/a11y/ic-select.test.a11y.js.map +1 -0
  195. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +4 -4
  196. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  197. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  198. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  199. package/dist/collection/components/ic-step/ic-step.js +89 -53
  200. package/dist/collection/components/ic-step/ic-step.js.map +1 -1
  201. package/dist/collection/components/ic-step/ic-step.types.js.map +1 -1
  202. package/dist/collection/components/ic-stepper/ic-stepper.js +43 -2
  203. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  204. package/dist/collection/components/ic-stepper/ic-stepper.stories.js +75 -0
  205. package/dist/collection/components/ic-switch/ic-switch.js +4 -4
  206. package/dist/collection/components/ic-tab-context/ic-tab-context.js +27 -2
  207. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  208. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  209. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  210. package/dist/collection/components/ic-text-field/ic-text-field.css +4 -0
  211. package/dist/collection/components/ic-text-field/ic-text-field.js +53 -19
  212. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  213. package/dist/collection/components/ic-text-field/ic-text-field.stories.js +102 -4
  214. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  215. package/dist/collection/components/ic-toast/ic-toast.js +3 -3
  216. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  217. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  218. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
  219. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  220. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
  221. package/dist/collection/components/ic-tooltip/ic-tooltip.js +6 -4
  222. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  223. package/dist/collection/components/ic-typography/ic-typography.js +2 -2
  224. package/dist/collection/index.js +1 -1
  225. package/dist/collection/index.js.map +1 -1
  226. package/dist/collection/utils/common-helpers.js +17 -0
  227. package/dist/collection/utils/common-helpers.js.map +1 -0
  228. package/dist/collection/utils/constants.js +1 -0
  229. package/dist/collection/utils/constants.js.map +1 -1
  230. package/dist/collection/utils/types.js.map +1 -1
  231. package/dist/components/constants.js +177 -0
  232. package/dist/components/constants.js.map +1 -0
  233. package/dist/components/helpers.js +2 -174
  234. package/dist/components/helpers.js.map +1 -1
  235. package/dist/components/ic-action-chip.js +1 -1
  236. package/dist/components/ic-alert.js +3 -2
  237. package/dist/components/ic-alert.js.map +1 -1
  238. package/dist/components/ic-back-to-top.js +1 -1
  239. package/dist/components/ic-badge.js +1 -1
  240. package/dist/components/ic-breadcrumb-group.js +1 -1
  241. package/dist/components/ic-breadcrumb2.js +1 -1
  242. package/dist/components/ic-button2.js +17 -11
  243. package/dist/components/ic-button2.js.map +1 -1
  244. package/dist/components/ic-card-vertical.js +1 -1
  245. package/dist/components/ic-checkbox-group.js +7 -4
  246. package/dist/components/ic-checkbox-group.js.map +1 -1
  247. package/dist/components/ic-checkbox.js +4 -4
  248. package/dist/components/ic-checkbox.js.map +1 -1
  249. package/dist/components/ic-chip.js +6 -5
  250. package/dist/components/ic-chip.js.map +1 -1
  251. package/dist/components/ic-data-list.js +2 -2
  252. package/dist/components/ic-data-row.js +3 -3
  253. package/dist/components/ic-dialog.js +6 -4
  254. package/dist/components/ic-dialog.js.map +1 -1
  255. package/dist/components/ic-divider2.js +1 -1
  256. package/dist/components/ic-empty-state.js +3 -3
  257. package/dist/components/ic-footer-link-group.js +1 -1
  258. package/dist/components/ic-footer-link.js +3 -3
  259. package/dist/components/ic-footer.js +2 -1
  260. package/dist/components/ic-footer.js.map +1 -1
  261. package/dist/components/ic-hero.js +5 -5
  262. package/dist/components/ic-horizontal-scroll2.js +6 -6
  263. package/dist/components/ic-input-component-container2.js +5 -4
  264. package/dist/components/ic-input-component-container2.js.map +1 -1
  265. package/dist/components/ic-input-container2.js +2 -2
  266. package/dist/components/ic-input-label2.js +3 -3
  267. package/dist/components/ic-input-validation2.js +24 -7
  268. package/dist/components/ic-input-validation2.js.map +1 -1
  269. package/dist/components/ic-layout-grid-item.js +2 -2
  270. package/dist/components/ic-layout-grid.js +2 -2
  271. package/dist/components/ic-link2.js +3 -2
  272. package/dist/components/ic-link2.js.map +1 -1
  273. package/dist/components/ic-loading-indicator2.js +5 -5
  274. package/dist/components/ic-menu-group.js +2 -2
  275. package/dist/components/ic-menu-item2.js +1 -1
  276. package/dist/components/ic-menu2.js +1383 -7
  277. package/dist/components/ic-menu2.js.map +1 -1
  278. package/dist/components/ic-navigation-button.js +2 -1
  279. package/dist/components/ic-navigation-button.js.map +1 -1
  280. package/dist/components/ic-navigation-group.js +2 -2
  281. package/dist/components/ic-navigation-item.js +1 -1
  282. package/dist/components/ic-navigation-menu2.js +5 -5
  283. package/dist/components/ic-navigation-menu2.js.map +1 -1
  284. package/dist/components/ic-page-header.js +7 -7
  285. package/dist/components/ic-pagination-item2.js +2 -2
  286. package/dist/components/ic-pagination.js +4 -4
  287. package/dist/components/ic-popover-menu.js +5 -5
  288. package/dist/components/ic-popover-menu.js.map +1 -1
  289. package/dist/components/ic-radio-group.js +15 -7
  290. package/dist/components/ic-radio-group.js.map +1 -1
  291. package/dist/components/ic-radio-option.js +6 -6
  292. package/dist/components/ic-radio-option.js.map +1 -1
  293. package/dist/components/ic-search-bar.js +10 -10
  294. package/dist/components/ic-search-bar.js.map +1 -1
  295. package/dist/components/ic-section-container2.js +2 -2
  296. package/dist/components/ic-select.js +21 -12
  297. package/dist/components/ic-select.js.map +1 -1
  298. package/dist/components/ic-side-navigation.js +5 -5
  299. package/dist/components/ic-skeleton.js +2 -2
  300. package/dist/components/ic-skip-link.js +2 -2
  301. package/dist/components/ic-status-tag.js +2 -2
  302. package/dist/components/ic-step.js +67 -54
  303. package/dist/components/ic-step.js.map +1 -1
  304. package/dist/components/ic-stepper.js +20 -2
  305. package/dist/components/ic-stepper.js.map +1 -1
  306. package/dist/components/ic-switch.js +5 -5
  307. package/dist/components/ic-tab-context.js +11 -2
  308. package/dist/components/ic-tab-context.js.map +1 -1
  309. package/dist/components/ic-tab-group.js +2 -2
  310. package/dist/components/ic-tab-panel.js +2 -2
  311. package/dist/components/ic-text-field.js +31 -21
  312. package/dist/components/ic-text-field.js.map +1 -1
  313. package/dist/components/ic-theme.js +3 -2
  314. package/dist/components/ic-theme.js.map +1 -1
  315. package/dist/components/ic-toast-region.js +1 -1
  316. package/dist/components/ic-toast.js +5 -4
  317. package/dist/components/ic-toast.js.map +1 -1
  318. package/dist/components/ic-toggle-button-group.js +2 -2
  319. package/dist/components/ic-toggle-button.js +3 -3
  320. package/dist/components/ic-toggle-button.js.map +1 -1
  321. package/dist/components/ic-tooltip2.js +6 -4
  322. package/dist/components/ic-tooltip2.js.map +1 -1
  323. package/dist/components/ic-top-navigation.js +1 -1
  324. package/dist/components/ic-typography2.js +2 -2
  325. package/dist/components/index.js +1 -0
  326. package/dist/components/index.js.map +1 -1
  327. package/dist/core/core.css +32 -4
  328. package/dist/core/core.esm.js +1 -1
  329. package/dist/core/core.esm.js.map +1 -1
  330. package/dist/core/index.esm.js +1 -1
  331. package/dist/core/p-0123dde7.entry.js +2 -0
  332. package/dist/core/p-0123dde7.entry.js.map +1 -0
  333. package/dist/core/p-01e018cb.entry.js +2 -0
  334. package/dist/core/{p-f309d3af.entry.js.map → p-01e018cb.entry.js.map} +1 -1
  335. package/dist/core/p-02af2b59.entry.js +2 -0
  336. package/dist/core/{p-ef4b5469.entry.js.map → p-02af2b59.entry.js.map} +1 -1
  337. package/dist/core/p-05036675.entry.js +2 -0
  338. package/dist/core/p-05036675.entry.js.map +1 -0
  339. package/dist/core/p-0c36ce84.entry.js +2 -0
  340. package/dist/core/{p-661ae402.entry.js.map → p-0c36ce84.entry.js.map} +1 -1
  341. package/dist/core/p-0ec76cff.entry.js +2 -0
  342. package/dist/core/{p-1d37ac1c.entry.js.map → p-0ec76cff.entry.js.map} +1 -1
  343. package/dist/core/p-13e093d0.entry.js +2 -0
  344. package/dist/core/{p-9eeb5e85.entry.js.map → p-13e093d0.entry.js.map} +1 -1
  345. package/dist/core/p-1423bd4a.entry.js +2 -0
  346. package/dist/core/{p-9f36791b.entry.js.map → p-1423bd4a.entry.js.map} +1 -1
  347. package/dist/core/p-2126d37b.entry.js +2 -0
  348. package/dist/core/{p-0c0c6a9e.entry.js.map → p-2126d37b.entry.js.map} +1 -1
  349. package/dist/core/p-228bc12d.entry.js +2 -0
  350. package/dist/core/{p-41f92698.entry.js.map → p-228bc12d.entry.js.map} +1 -1
  351. package/dist/core/p-25bef09d.entry.js +2 -0
  352. package/dist/core/{p-cf631191.entry.js.map → p-25bef09d.entry.js.map} +1 -1
  353. package/dist/core/p-27e67d45.entry.js +2 -0
  354. package/dist/core/{p-313a8a2f.entry.js.map → p-27e67d45.entry.js.map} +1 -1
  355. package/dist/core/p-2800fc30.entry.js +2 -0
  356. package/dist/core/{p-6ed0ac48.entry.js.map → p-2800fc30.entry.js.map} +1 -1
  357. package/dist/core/p-33582352.entry.js +2 -0
  358. package/dist/core/{p-317e005f.entry.js.map → p-33582352.entry.js.map} +1 -1
  359. package/dist/core/p-33789b23.entry.js +3 -0
  360. package/dist/core/p-33789b23.entry.js.map +1 -0
  361. package/dist/core/{p-287e5c17.entry.js → p-37d217b5.entry.js} +2 -2
  362. package/dist/core/{p-df88ff5b.entry.js → p-37daa8fe.entry.js} +2 -2
  363. package/dist/core/p-3e36f281.entry.js +2 -0
  364. package/dist/core/{p-711bfeed.entry.js.map → p-3e36f281.entry.js.map} +1 -1
  365. package/dist/core/p-45097448.entry.js +2 -0
  366. package/dist/core/{p-cbe0d1bb.entry.js.map → p-45097448.entry.js.map} +1 -1
  367. package/dist/core/{p-45dd12ee.entry.js → p-4747c39f.entry.js} +2 -2
  368. package/dist/core/p-4747c39f.entry.js.map +1 -0
  369. package/dist/core/{p-ffac41d6.entry.js → p-492fcb51.entry.js} +2 -2
  370. package/dist/core/p-514daffe.entry.js +2 -0
  371. package/dist/core/p-514daffe.entry.js.map +1 -0
  372. package/dist/core/p-54803e3b.entry.js +2 -0
  373. package/dist/core/{p-2f4f392f.entry.js.map → p-54803e3b.entry.js.map} +1 -1
  374. package/dist/core/{p-6e8ef73c.entry.js → p-57721431.entry.js} +2 -2
  375. package/dist/core/{p-5fbc8e62.entry.js → p-5fcfcfb6.entry.js} +2 -2
  376. package/dist/core/p-6058d4c9.entry.js +2 -0
  377. package/dist/core/{p-ea778379.entry.js.map → p-6058d4c9.entry.js.map} +1 -1
  378. package/dist/core/p-675bb3e4.entry.js +2 -0
  379. package/dist/core/{p-52748d5c.entry.js.map → p-675bb3e4.entry.js.map} +1 -1
  380. package/dist/core/p-6dbe70f1.entry.js +2 -0
  381. package/dist/core/{p-4ca782eb.entry.js.map → p-6dbe70f1.entry.js.map} +1 -1
  382. package/dist/core/p-6e139e6e.entry.js +2 -0
  383. package/dist/core/{p-0d680d19.entry.js.map → p-6e139e6e.entry.js.map} +1 -1
  384. package/dist/core/p-80317cd1.entry.js +2 -0
  385. package/dist/core/{p-9c013333.entry.js.map → p-80317cd1.entry.js.map} +1 -1
  386. package/dist/core/p-80e0f66e.entry.js +2 -0
  387. package/dist/core/{p-493eaabb.entry.js.map → p-80e0f66e.entry.js.map} +1 -1
  388. package/dist/core/p-813ad03c.entry.js +2 -0
  389. package/dist/core/{p-6a576a8b.entry.js.map → p-813ad03c.entry.js.map} +1 -1
  390. package/dist/core/p-8558b9b7.entry.js +2 -0
  391. package/dist/core/{p-21cf2beb.entry.js.map → p-8558b9b7.entry.js.map} +1 -1
  392. package/dist/core/p-8684efeb.entry.js +2 -0
  393. package/dist/core/{p-fc3b1155.entry.js.map → p-8684efeb.entry.js.map} +1 -1
  394. package/dist/core/p-8b99a806.entry.js +2 -0
  395. package/dist/core/{p-8a4b12e4.entry.js.map → p-8b99a806.entry.js.map} +1 -1
  396. package/dist/core/p-93479c36.entry.js +2 -0
  397. package/dist/core/{p-19cf2327.entry.js.map → p-93479c36.entry.js.map} +1 -1
  398. package/dist/core/p-95d3d1a7.entry.js +2 -0
  399. package/dist/core/{p-6014ab64.entry.js.map → p-95d3d1a7.entry.js.map} +1 -1
  400. package/dist/core/p-99793b64.entry.js +2 -0
  401. package/dist/core/p-99793b64.entry.js.map +1 -0
  402. package/dist/core/{p-ea061ccf.entry.js → p-9a8bcb78.entry.js} +2 -2
  403. package/dist/core/{p-8b5022bc.entry.js → p-9cf6ccfd.entry.js} +2 -2
  404. package/dist/core/p-a06c1e4e.entry.js +2 -0
  405. package/dist/core/{p-f6a02202.entry.js.map → p-a06c1e4e.entry.js.map} +1 -1
  406. package/dist/core/p-a1857d24.entry.js +2 -0
  407. package/dist/core/p-a1857d24.entry.js.map +1 -0
  408. package/dist/core/p-a1e2e029.entry.js +2 -0
  409. package/dist/core/{p-a77364f5.entry.js.map → p-a1e2e029.entry.js.map} +1 -1
  410. package/dist/core/p-abd88929.entry.js +2 -0
  411. package/dist/core/{p-af9c391d.entry.js.map → p-abd88929.entry.js.map} +1 -1
  412. package/dist/core/p-b0376079.entry.js +2 -0
  413. package/dist/core/{p-41ef74a7.entry.js.map → p-b0376079.entry.js.map} +1 -1
  414. package/dist/core/p-b1838ad8.entry.js +2 -0
  415. package/dist/core/p-b1838ad8.entry.js.map +1 -0
  416. package/dist/core/{p-999f0a5d.entry.js → p-b4a2f6fa.entry.js} +2 -2
  417. package/dist/core/p-b57e59b7.js +2 -0
  418. package/dist/core/p-b57e59b7.js.map +1 -0
  419. package/dist/core/p-b9bdd9a9.entry.js +2 -0
  420. package/dist/core/p-b9bdd9a9.entry.js.map +1 -0
  421. package/dist/core/p-bddf799a.js +2 -0
  422. package/dist/core/p-bddf799a.js.map +1 -0
  423. package/dist/core/p-c04e1fab.entry.js +2 -0
  424. package/dist/core/{p-1e2f40b0.entry.js.map → p-c04e1fab.entry.js.map} +1 -1
  425. package/dist/core/p-c2d5e301.entry.js +2 -0
  426. package/dist/core/p-c2d5e301.entry.js.map +1 -0
  427. package/dist/core/p-c975cced.entry.js +2 -0
  428. package/dist/core/{p-15dbccc2.entry.js.map → p-c975cced.entry.js.map} +1 -1
  429. package/dist/core/p-cc00cbce.entry.js +2 -0
  430. package/dist/core/p-cc00cbce.entry.js.map +1 -0
  431. package/dist/core/p-cf868a24.entry.js +2 -0
  432. package/dist/core/p-cf868a24.entry.js.map +1 -0
  433. package/dist/core/p-d58ad080.entry.js +2 -0
  434. package/dist/core/{p-b52000d9.entry.js.map → p-d58ad080.entry.js.map} +1 -1
  435. package/dist/core/p-de32a223.entry.js +2 -0
  436. package/dist/core/{p-43324339.entry.js.map → p-de32a223.entry.js.map} +1 -1
  437. package/dist/core/p-e6dacbe2.entry.js +2 -0
  438. package/dist/core/{p-b0d488d0.entry.js.map → p-e6dacbe2.entry.js.map} +1 -1
  439. package/dist/core/p-e9d28e02.entry.js +2 -0
  440. package/dist/core/p-e9d28e02.entry.js.map +1 -0
  441. package/dist/core/p-ea06792a.entry.js +2 -0
  442. package/dist/core/{p-72a9909c.entry.js.map → p-ea06792a.entry.js.map} +1 -1
  443. package/dist/core/p-eb0e7153.entry.js +2 -0
  444. package/dist/core/{p-3dc54847.entry.js.map → p-eb0e7153.entry.js.map} +1 -1
  445. package/dist/core/p-f609ca37.entry.js +2 -0
  446. package/dist/core/{p-9323c234.entry.js.map → p-f609ca37.entry.js.map} +1 -1
  447. package/dist/core/p-fb69fbc0.entry.js +2 -0
  448. package/dist/core/{p-7cd4f6a6.entry.js.map → p-fb69fbc0.entry.js.map} +1 -1
  449. package/dist/core/p-fb734a59.entry.js +2 -0
  450. package/dist/core/p-fb734a59.entry.js.map +1 -0
  451. package/dist/esm/constants-7960cba4.js +177 -0
  452. package/dist/esm/constants-7960cba4.js.map +1 -0
  453. package/dist/esm/core.js +1 -1
  454. package/dist/esm/{helpers-56631aa0.js → helpers-4ddac6ed.js} +3 -175
  455. package/dist/esm/helpers-4ddac6ed.js.map +1 -0
  456. package/dist/esm/ic-accordion-group.entry.js +2 -1
  457. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  458. package/dist/esm/ic-accordion.entry.js +2 -1
  459. package/dist/esm/ic-accordion.entry.js.map +1 -1
  460. package/dist/esm/ic-action-chip.entry.js +2 -1
  461. package/dist/esm/ic-action-chip.entry.js.map +1 -1
  462. package/dist/esm/ic-alert.entry.js +3 -2
  463. package/dist/esm/ic-alert.entry.js.map +1 -1
  464. package/dist/esm/ic-back-to-top.entry.js +2 -1
  465. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  466. package/dist/esm/ic-badge.entry.js +2 -1
  467. package/dist/esm/ic-badge.entry.js.map +1 -1
  468. package/dist/esm/ic-breadcrumb-group.entry.js +2 -1
  469. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  470. package/dist/esm/ic-breadcrumb.entry.js +2 -1
  471. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  472. package/dist/esm/ic-button_3.entry.js +25 -18
  473. package/dist/esm/ic-button_3.entry.js.map +1 -1
  474. package/dist/esm/ic-card-vertical.entry.js +2 -1
  475. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  476. package/dist/esm/ic-checkbox-group.entry.js +8 -4
  477. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  478. package/dist/esm/ic-checkbox.entry.js +5 -4
  479. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  480. package/dist/esm/ic-chip.entry.js +7 -5
  481. package/dist/esm/ic-chip.entry.js.map +1 -1
  482. package/dist/esm/ic-data-list.entry.js +2 -2
  483. package/dist/esm/ic-data-row.entry.js +4 -3
  484. package/dist/esm/ic-data-row.entry.js.map +1 -1
  485. package/dist/esm/ic-dialog.entry.js +7 -4
  486. package/dist/esm/ic-dialog.entry.js.map +1 -1
  487. package/dist/esm/ic-divider.entry.js +2 -1
  488. package/dist/esm/ic-divider.entry.js.map +1 -1
  489. package/dist/esm/ic-empty-state.entry.js +4 -3
  490. package/dist/esm/ic-empty-state.entry.js.map +1 -1
  491. package/dist/esm/ic-footer-link-group.entry.js +2 -1
  492. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  493. package/dist/esm/ic-footer-link.entry.js +4 -3
  494. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  495. package/dist/esm/ic-footer.entry.js +2 -1
  496. package/dist/esm/ic-footer.entry.js.map +1 -1
  497. package/dist/esm/ic-hero.entry.js +6 -5
  498. package/dist/esm/ic-hero.entry.js.map +1 -1
  499. package/dist/esm/ic-horizontal-scroll.entry.js +7 -6
  500. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  501. package/dist/esm/ic-input-component-container_3.entry.js +1388 -12
  502. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  503. package/dist/esm/ic-input-label_2.entry.js +24 -9
  504. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  505. package/dist/esm/ic-layout-grid-item.entry.js +2 -2
  506. package/dist/esm/ic-layout-grid.entry.js +2 -2
  507. package/dist/esm/ic-link.entry.js +3 -2
  508. package/dist/esm/ic-link.entry.js.map +1 -1
  509. package/dist/esm/ic-menu-group.entry.js +3 -2
  510. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  511. package/dist/esm/ic-menu-item.entry.js +2 -1
  512. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  513. package/dist/esm/ic-navigation-button.entry.js +2 -1
  514. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  515. package/dist/esm/ic-navigation-group.entry.js +3 -2
  516. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  517. package/dist/esm/ic-navigation-item.entry.js +2 -1
  518. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  519. package/dist/esm/ic-navigation-menu.entry.js +6 -5
  520. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  521. package/dist/esm/ic-page-header.entry.js +8 -7
  522. package/dist/esm/ic-page-header.entry.js.map +1 -1
  523. package/dist/esm/ic-pagination-item.entry.js +3 -2
  524. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  525. package/dist/esm/ic-pagination.entry.js +6 -5
  526. package/dist/esm/ic-pagination.entry.js.map +1 -1
  527. package/dist/esm/ic-popover-menu.entry.js +6 -5
  528. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  529. package/dist/esm/ic-radio-group.entry.js +15 -7
  530. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  531. package/dist/esm/ic-radio-option.entry.js +7 -6
  532. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  533. package/dist/esm/ic-search-bar.entry.js +11 -10
  534. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  535. package/dist/esm/ic-section-container.entry.js +2 -2
  536. package/dist/esm/ic-select.entry.js +20 -12
  537. package/dist/esm/ic-select.entry.js.map +1 -1
  538. package/dist/esm/ic-side-navigation.entry.js +6 -5
  539. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  540. package/dist/esm/ic-skeleton.entry.js +2 -2
  541. package/dist/esm/ic-skip-link.entry.js +2 -2
  542. package/dist/esm/ic-status-tag.entry.js +4 -3
  543. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  544. package/dist/esm/ic-step.entry.js +67 -54
  545. package/dist/esm/ic-step.entry.js.map +1 -1
  546. package/dist/esm/ic-stepper.entry.js +21 -3
  547. package/dist/esm/ic-stepper.entry.js.map +1 -1
  548. package/dist/esm/ic-switch.entry.js +6 -5
  549. package/dist/esm/ic-switch.entry.js.map +1 -1
  550. package/dist/esm/ic-tab-context.entry.js +10 -2
  551. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  552. package/dist/esm/ic-tab-group.entry.js +4 -3
  553. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  554. package/dist/esm/ic-tab-panel.entry.js +2 -2
  555. package/dist/esm/ic-tab.entry.js +2 -1
  556. package/dist/esm/ic-tab.entry.js.map +1 -1
  557. package/dist/esm/ic-text-field.entry.js +30 -21
  558. package/dist/esm/ic-text-field.entry.js.map +1 -1
  559. package/dist/esm/ic-theme.entry.js +3 -2
  560. package/dist/esm/ic-theme.entry.js.map +1 -1
  561. package/dist/esm/ic-toast-region.entry.js +1 -1
  562. package/dist/esm/ic-toast.entry.js +5 -4
  563. package/dist/esm/ic-toast.entry.js.map +1 -1
  564. package/dist/esm/ic-toggle-button-group.entry.js +4 -3
  565. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  566. package/dist/esm/ic-toggle-button.entry.js +4 -3
  567. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  568. package/dist/esm/ic-top-navigation.entry.js +2 -1
  569. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  570. package/dist/esm/ic-typography.entry.js +4 -3
  571. package/dist/esm/ic-typography.entry.js.map +1 -1
  572. package/dist/esm/index.js +1 -1
  573. package/dist/esm/loader.js +1 -1
  574. package/dist/types/components/ic-button/ic-button.d.ts +1 -0
  575. package/dist/types/components/ic-dialog/ic-dialog.d.ts +1 -0
  576. package/dist/types/components/ic-input-validation/ic-input-validation.d.ts +4 -3
  577. package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +6 -2
  578. package/dist/types/components/ic-select/ic-select.d.ts +5 -1
  579. package/dist/types/components/ic-select/test/a11y/ic-select.test.a11y.d.ts +1 -0
  580. package/dist/types/components/ic-step/ic-step.d.ts +5 -1
  581. package/dist/types/components/ic-step/ic-step.types.d.ts +10 -0
  582. package/dist/types/components/ic-stepper/ic-stepper.d.ts +5 -1
  583. package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +4 -0
  584. package/dist/types/components/ic-text-field/ic-text-field.d.ts +6 -1
  585. package/dist/types/components.d.ts +51 -9
  586. package/dist/types/index.d.ts +1 -0
  587. package/dist/types/interface.d.ts +0 -1
  588. package/dist/types/utils/common-helpers.d.ts +2 -0
  589. package/dist/types/utils/constants.d.ts +1 -0
  590. package/dist/types/utils/types.d.ts +2 -0
  591. package/hydrate/index.js +1721 -254
  592. package/hydrate/index.mjs +1721 -254
  593. package/package.json +5 -4
  594. package/vscode-data.json +51 -0
  595. package/dist/cjs/helpers-a0e78e2e.js.map +0 -1
  596. package/dist/collection/components/ic-input-validation/ic-input-validation.types.js +0 -2
  597. package/dist/collection/components/ic-input-validation/ic-input-validation.types.js.map +0 -1
  598. package/dist/core/p-0c0c6a9e.entry.js +0 -2
  599. package/dist/core/p-0d680d19.entry.js +0 -2
  600. package/dist/core/p-15dbccc2.entry.js +0 -2
  601. package/dist/core/p-19cf2327.entry.js +0 -2
  602. package/dist/core/p-1d37ac1c.entry.js +0 -2
  603. package/dist/core/p-1e2f40b0.entry.js +0 -2
  604. package/dist/core/p-21cf2beb.entry.js +0 -2
  605. package/dist/core/p-25007ec9.js +0 -2
  606. package/dist/core/p-25007ec9.js.map +0 -1
  607. package/dist/core/p-28efe829.entry.js +0 -2
  608. package/dist/core/p-28efe829.entry.js.map +0 -1
  609. package/dist/core/p-2f4f392f.entry.js +0 -2
  610. package/dist/core/p-313a8a2f.entry.js +0 -2
  611. package/dist/core/p-317e005f.entry.js +0 -2
  612. package/dist/core/p-3dc54847.entry.js +0 -2
  613. package/dist/core/p-3e5d7a3d.entry.js +0 -2
  614. package/dist/core/p-3e5d7a3d.entry.js.map +0 -1
  615. package/dist/core/p-41ef74a7.entry.js +0 -2
  616. package/dist/core/p-41f92698.entry.js +0 -2
  617. package/dist/core/p-43324339.entry.js +0 -2
  618. package/dist/core/p-45dd12ee.entry.js.map +0 -1
  619. package/dist/core/p-47f6dac2.entry.js +0 -2
  620. package/dist/core/p-47f6dac2.entry.js.map +0 -1
  621. package/dist/core/p-493eaabb.entry.js +0 -2
  622. package/dist/core/p-4ca782eb.entry.js +0 -2
  623. package/dist/core/p-4d1a3036.entry.js +0 -2
  624. package/dist/core/p-4d1a3036.entry.js.map +0 -1
  625. package/dist/core/p-52748d5c.entry.js +0 -2
  626. package/dist/core/p-595a4d06.entry.js +0 -2
  627. package/dist/core/p-595a4d06.entry.js.map +0 -1
  628. package/dist/core/p-5f68f62b.entry.js +0 -2
  629. package/dist/core/p-5f68f62b.entry.js.map +0 -1
  630. package/dist/core/p-6014ab64.entry.js +0 -2
  631. package/dist/core/p-661ae402.entry.js +0 -2
  632. package/dist/core/p-6a576a8b.entry.js +0 -2
  633. package/dist/core/p-6ed0ac48.entry.js +0 -2
  634. package/dist/core/p-711bfeed.entry.js +0 -2
  635. package/dist/core/p-72a9909c.entry.js +0 -2
  636. package/dist/core/p-742a9181.entry.js +0 -2
  637. package/dist/core/p-742a9181.entry.js.map +0 -1
  638. package/dist/core/p-7cd4f6a6.entry.js +0 -2
  639. package/dist/core/p-8a4b12e4.entry.js +0 -2
  640. package/dist/core/p-9323c234.entry.js +0 -2
  641. package/dist/core/p-97b93ddf.entry.js +0 -2
  642. package/dist/core/p-97b93ddf.entry.js.map +0 -1
  643. package/dist/core/p-9c013333.entry.js +0 -2
  644. package/dist/core/p-9eeb5e85.entry.js +0 -2
  645. package/dist/core/p-9f36791b.entry.js +0 -2
  646. package/dist/core/p-a602a8e1.entry.js +0 -2
  647. package/dist/core/p-a602a8e1.entry.js.map +0 -1
  648. package/dist/core/p-a77364f5.entry.js +0 -2
  649. package/dist/core/p-af9c391d.entry.js +0 -2
  650. package/dist/core/p-b0d488d0.entry.js +0 -2
  651. package/dist/core/p-b52000d9.entry.js +0 -2
  652. package/dist/core/p-bb4ce810.entry.js +0 -2
  653. package/dist/core/p-bb4ce810.entry.js.map +0 -1
  654. package/dist/core/p-cbe0d1bb.entry.js +0 -2
  655. package/dist/core/p-ceea1712.entry.js +0 -2
  656. package/dist/core/p-ceea1712.entry.js.map +0 -1
  657. package/dist/core/p-cf631191.entry.js +0 -2
  658. package/dist/core/p-e652ab09.entry.js +0 -2
  659. package/dist/core/p-e652ab09.entry.js.map +0 -1
  660. package/dist/core/p-e876e47c.entry.js +0 -2
  661. package/dist/core/p-e876e47c.entry.js.map +0 -1
  662. package/dist/core/p-ea778379.entry.js +0 -2
  663. package/dist/core/p-ef4b5469.entry.js +0 -2
  664. package/dist/core/p-f309d3af.entry.js +0 -2
  665. package/dist/core/p-f6a02202.entry.js +0 -2
  666. package/dist/core/p-fc3b1155.entry.js +0 -2
  667. package/dist/esm/helpers-56631aa0.js.map +0 -1
  668. package/dist/types/components/ic-input-validation/ic-input-validation.types.d.ts +0 -1
  669. /package/dist/core/{p-287e5c17.entry.js.map → p-37d217b5.entry.js.map} +0 -0
  670. /package/dist/core/{p-df88ff5b.entry.js.map → p-37daa8fe.entry.js.map} +0 -0
  671. /package/dist/core/{p-ffac41d6.entry.js.map → p-492fcb51.entry.js.map} +0 -0
  672. /package/dist/core/{p-6e8ef73c.entry.js.map → p-57721431.entry.js.map} +0 -0
  673. /package/dist/core/{p-5fbc8e62.entry.js.map → p-5fcfcfb6.entry.js.map} +0 -0
  674. /package/dist/core/{p-ea061ccf.entry.js.map → p-9a8bcb78.entry.js.map} +0 -0
  675. /package/dist/core/{p-8b5022bc.entry.js.map → p-9cf6ccfd.entry.js.map} +0 -0
  676. /package/dist/core/{p-999f0a5d.entry.js.map → p-b4a2f6fa.entry.js.map} +0 -0
@@ -1,12 +1,1388 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
2
2
  import { c as checkIcon } from './check-icon.js';
3
- import { K as isMacDevice, o as onComponentRequiredPropUndefined, L as getOptionsWithoutGroupTitlesCount } from './helpers.js';
3
+ import { E as isMacDevice, o as onComponentRequiredPropUndefined, F as getOptionsWithoutGroupTitlesCount } from './helpers.js';
4
+ import { f as IC_CUSTOM_ALLOWED_COMPONENTS } from './constants.js';
4
5
  import { d as defineCustomElement$4 } from './ic-button2.js';
5
6
  import { d as defineCustomElement$3 } from './ic-loading-indicator2.js';
6
7
  import { c as createPopper, d as defineCustomElement$2 } from './ic-tooltip2.js';
7
8
  import { d as defineCustomElement$1 } from './ic-typography2.js';
8
9
 
9
- const icMenuCss = "html.sc-ic-menu{line-height:1.15;-webkit-text-size-adjust:100%}body.sc-ic-menu{margin:0}main.sc-ic-menu{display:block}h1.sc-ic-menu{font-size:2em;margin:0.67em 0}hr.sc-ic-menu{box-sizing:content-box;height:0;overflow:visible}pre.sc-ic-menu{font-family:monospace, monospace;font-size:1em}a.sc-ic-menu{background-color:transparent}abbr[title].sc-ic-menu{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b.sc-ic-menu,strong.sc-ic-menu{font-weight:bolder}code.sc-ic-menu,kbd.sc-ic-menu,samp.sc-ic-menu{font-family:monospace, monospace;font-size:1em}small.sc-ic-menu{font-size:80%}sub.sc-ic-menu,sup.sc-ic-menu{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-ic-menu{bottom:-0.25em}sup.sc-ic-menu{top:-0.5em}img.sc-ic-menu{border-style:none}button.sc-ic-menu,input.sc-ic-menu,optgroup.sc-ic-menu,select.sc-ic-menu,textarea.sc-ic-menu{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-ic-menu,input.sc-ic-menu{overflow:visible}button.sc-ic-menu,select.sc-ic-menu{text-transform:none}button.sc-ic-menu,[type=\"button\"].sc-ic-menu,[type=\"reset\"].sc-ic-menu,[type=\"submit\"].sc-ic-menu{-webkit-appearance:button}button.sc-ic-menu::-moz-focus-inner,[type=\"button\"].sc-ic-menu::-moz-focus-inner,[type=\"reset\"].sc-ic-menu::-moz-focus-inner,[type=\"submit\"].sc-ic-menu::-moz-focus-inner{border-style:none;padding:0}button.sc-ic-menu:-moz-focusring,[type=\"button\"].sc-ic-menu:-moz-focusring,[type=\"reset\"].sc-ic-menu:-moz-focusring,[type=\"submit\"].sc-ic-menu:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-ic-menu{padding:0.35em 0.75em 0.625em}legend.sc-ic-menu{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-ic-menu{vertical-align:baseline}textarea.sc-ic-menu{overflow:auto}[type=\"checkbox\"].sc-ic-menu,[type=\"radio\"].sc-ic-menu{box-sizing:border-box;padding:0}[type=\"number\"].sc-ic-menu::-webkit-inner-spin-button,[type=\"number\"].sc-ic-menu::-webkit-outer-spin-button{height:auto}[type=\"search\"].sc-ic-menu{-webkit-appearance:textfield;outline-offset:-2px}[type=\"search\"].sc-ic-menu::-webkit-search-decoration{-webkit-appearance:none}.sc-ic-menu::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-ic-menu{display:block}summary.sc-ic-menu{display:list-item}template.sc-ic-menu{display:none}[hidden].sc-ic-menu{display:none}html.sc-ic-menu,body.sc-ic-menu,div.sc-ic-menu,span.sc-ic-menu,applet.sc-ic-menu,object.sc-ic-menu,iframe.sc-ic-menu,h1.sc-ic-menu,h2.sc-ic-menu,h3.sc-ic-menu,h4.sc-ic-menu,h5.sc-ic-menu,h6.sc-ic-menu,p.sc-ic-menu,blockquote.sc-ic-menu,pre.sc-ic-menu,a.sc-ic-menu,abbr.sc-ic-menu,acronym.sc-ic-menu,address.sc-ic-menu,big.sc-ic-menu,cite.sc-ic-menu,code.sc-ic-menu,del.sc-ic-menu,dfn.sc-ic-menu,em.sc-ic-menu,img.sc-ic-menu,ins.sc-ic-menu,kbd.sc-ic-menu,q.sc-ic-menu,s.sc-ic-menu,samp.sc-ic-menu,small.sc-ic-menu,strike.sc-ic-menu,strong.sc-ic-menu,sub.sc-ic-menu,sup.sc-ic-menu,tt.sc-ic-menu,var.sc-ic-menu,b.sc-ic-menu,u.sc-ic-menu,i.sc-ic-menu,center.sc-ic-menu,dl.sc-ic-menu,dt.sc-ic-menu,dd.sc-ic-menu,ol.sc-ic-menu,ul.sc-ic-menu,li.sc-ic-menu,fieldset.sc-ic-menu,form.sc-ic-menu,label.sc-ic-menu,legend.sc-ic-menu,table.sc-ic-menu,caption.sc-ic-menu,tbody.sc-ic-menu,tfoot.sc-ic-menu,thead.sc-ic-menu,tr.sc-ic-menu,th.sc-ic-menu,td.sc-ic-menu,article.sc-ic-menu,aside.sc-ic-menu,canvas.sc-ic-menu,details.sc-ic-menu,embed.sc-ic-menu,figure.sc-ic-menu,figcaption.sc-ic-menu,footer.sc-ic-menu,header.sc-ic-menu,hgroup.sc-ic-menu,menu.sc-ic-menu,nav.sc-ic-menu,output.sc-ic-menu,ruby.sc-ic-menu,section.sc-ic-menu,summary.sc-ic-menu,time.sc-ic-menu,mark.sc-ic-menu,audio.sc-ic-menu,video.sc-ic-menu{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{max-height:0;width:var(--menu-width, var(--input-width, 20rem));color:var(--menu-item-text-color, var(--ic-menu-list-option-text-color));--ic-typography-color:var(\n --menu-item-text-color,\n var(--ic-menu-list-option-text-color)\n );background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);border-radius:var(--ic-border-radius)}.ic-menu-open.sc-ic-menu-h:not(.ic-menu-no-focus):focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}.ic-select-select-all-focused.sc-ic-menu-h{box-shadow:var(--ic-elevation-overlay) !important}#retry-button.sc-ic-menu::part(button){height:var(--ic-space-lg)}.small.sc-ic-menu #retry-button.sc-ic-menu::part(button){height:var(--ic-space-md)}.on-dialog.sc-ic-menu-h{inset:auto !important}.menu.sc-ic-menu{text-decoration:none;list-style-type:none;border-radius:1px;background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );visibility:hidden;max-height:0;overflow-y:hidden}.menu.sc-ic-menu:has(+.option-bar).sc-ic-menu{border-radius:0 0 1px 1px}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.ic-menu-open.sc-ic-menu-h{max-height:none;display:flex;flex-direction:column-reverse;border:var(--ic-border-width) solid\n var(--menu-border-color, var(--ic-menu-border-color));transition:box-shadow var(--ic-easing-transition-fast)}.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.ic-menu-open.sc-ic-menu-h .option-bar.sc-ic-menu{visibility:visible}.ic-menu-open.sc-ic-menu-h .select-all-button.sc-ic-menu{display:block}.ic-menu-full-width.sc-ic-menu-h{width:100%}.option.sc-ic-menu{padding:var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));cursor:pointer;display:flex;align-items:center}.loading-option.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.ic-menu-small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.ic-menu-large.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))}.option.sc-ic-menu:last-child{border-radius:0 0 1px 1px}.sc-ic-menu:not(.menu:has(+.option-bar)).sc-ic-menu .option.sc-ic-menu:first-child{border-radius:1px 1px 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-menu-list-option-hover-background-color)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-menu-list-option-pressed-background-color)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{--ic-typography-color:var(\n --menu-item-desc-text-color,\n var(--ic-menu-list-option-description-text-color)\n )}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.option.sc-ic-menu .option-label.sc-ic-menu ic-typography.sc-ic-menu{max-width:100%;word-wrap:break-word}.option.sc-ic-menu .option-element.sc-ic-menu{margin-top:var(--ic-space-xxs)}.option.sc-ic-menu .option-icon.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);margin-top:var(--ic-space-xxs);margin-right:var(--ic-space-xxxs)}.option-text-container.sc-ic-menu{pointer-events:none;width:100%}.option-text-container.show-check-icon.sc-ic-menu{width:calc(var(--ic-space-lg) * 10 + var(--ic-space-xl))}.option.loading-option.sc-ic-menu .option-text-container.sc-ic-menu{margin-left:calc(var(--ic-space-xs) + var(--ic-space-xxxs));color:var(--ic-menu-loading-list-option-text-color);--ic-typography-color:var(--ic-menu-loading-list-option-text-color)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-atoms-status-icon-error);align-self:center;display:flex;margin-right:calc(var(--ic-space-xxs) * 1.2)}.loading-error-info.sc-ic-menu{display:flex}.check-icon.sc-ic-menu{height:var(--ic-space-lg);min-width:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-xs);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.option-group-title.sc-ic-menu{padding:var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);--ic-typography-color:var(--ic-menu-option-group-label-text-color)}.ic-menu-small.sc-ic-menu-h .option-group-title.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs)}.last-recommended-option.sc-ic-menu{border-bottom:var(--ic-menu-last-recommended-option-border)}.disabled-option.sc-ic-menu{color:var(--ic-atoms-list-option-text-disabled-light);--ic-typography-color:var(--ic-atoms-list-option-text-disabled-light);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-color-focus-inner) !important;color:var(--ic-atoms-list-option-text-focused-light) !important;--ic-typography-color:var(\n --ic-atoms-list-option-text-focused-light\n ) !important}.no-results.sc-ic-menu-h li.sc-ic-menu{cursor:no-drop}.no-results.sc-ic-menu-h li.sc-ic-menu:hover{background-color:transparent}.option-bar.sc-ic-menu{padding:var(--ic-space-xxs) var(--ic-space-xs);display:flex;align-items:center;justify-content:space-between;background-color:var(--ic-menu-option-bar-background-color);visibility:hidden;border-bottom:var(--ic-border-width) solid\n var(--ic-menu-option-bar-divider-color);border-radius:1px 1px 0 0}.option-bar.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.ic-menu-large.sc-ic-menu-h .option-bar.sc-ic-menu{padding:var(--ic-space-xs)}.select-all-button.sc-ic-menu{display:none}.select-all-button.sc-ic-menu:focus{z-index:calc(var(--ic-z-index-menu) + 1)}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}.disabled-option.sc-ic-menu{color:GrayText;--ic-typography-color:GrayText}}";
10
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
11
+
12
+ var purify = {exports: {}};
13
+
14
+ /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
15
+
16
+ (function (module, exports) {
17
+ (function (global, factory) {
18
+ module.exports = factory() ;
19
+ })(commonjsGlobal, (function () {
20
+ const {
21
+ entries,
22
+ setPrototypeOf,
23
+ isFrozen,
24
+ getPrototypeOf,
25
+ getOwnPropertyDescriptor
26
+ } = Object;
27
+ let {
28
+ freeze,
29
+ seal,
30
+ create
31
+ } = Object; // eslint-disable-line import/no-mutable-exports
32
+ let {
33
+ apply,
34
+ construct
35
+ } = typeof Reflect !== 'undefined' && Reflect;
36
+ if (!freeze) {
37
+ freeze = function freeze(x) {
38
+ return x;
39
+ };
40
+ }
41
+ if (!seal) {
42
+ seal = function seal(x) {
43
+ return x;
44
+ };
45
+ }
46
+ if (!apply) {
47
+ apply = function apply(fun, thisValue, args) {
48
+ return fun.apply(thisValue, args);
49
+ };
50
+ }
51
+ if (!construct) {
52
+ construct = function construct(Func, args) {
53
+ return new Func(...args);
54
+ };
55
+ }
56
+ const arrayForEach = unapply(Array.prototype.forEach);
57
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
58
+ const arrayPop = unapply(Array.prototype.pop);
59
+ const arrayPush = unapply(Array.prototype.push);
60
+ const arraySplice = unapply(Array.prototype.splice);
61
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
62
+ const stringToString = unapply(String.prototype.toString);
63
+ const stringMatch = unapply(String.prototype.match);
64
+ const stringReplace = unapply(String.prototype.replace);
65
+ const stringIndexOf = unapply(String.prototype.indexOf);
66
+ const stringTrim = unapply(String.prototype.trim);
67
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
68
+ const regExpTest = unapply(RegExp.prototype.test);
69
+ const typeErrorCreate = unconstruct(TypeError);
70
+ /**
71
+ * Creates a new function that calls the given function with a specified thisArg and arguments.
72
+ *
73
+ * @param func - The function to be wrapped and called.
74
+ * @returns A new function that calls the given function with a specified thisArg and arguments.
75
+ */
76
+ function unapply(func) {
77
+ return function (thisArg) {
78
+ if (thisArg instanceof RegExp) {
79
+ thisArg.lastIndex = 0;
80
+ }
81
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
82
+ args[_key - 1] = arguments[_key];
83
+ }
84
+ return apply(func, thisArg, args);
85
+ };
86
+ }
87
+ /**
88
+ * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
89
+ *
90
+ * @param func - The constructor function to be wrapped and called.
91
+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
92
+ */
93
+ function unconstruct(func) {
94
+ return function () {
95
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
96
+ args[_key2] = arguments[_key2];
97
+ }
98
+ return construct(func, args);
99
+ };
100
+ }
101
+ /**
102
+ * Add properties to a lookup table
103
+ *
104
+ * @param set - The set to which elements will be added.
105
+ * @param array - The array containing elements to be added to the set.
106
+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
107
+ * @returns The modified set with added elements.
108
+ */
109
+ function addToSet(set, array) {
110
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
111
+ if (setPrototypeOf) {
112
+ // Make 'in' and truthy checks like Boolean(set.constructor)
113
+ // independent of any properties defined on Object.prototype.
114
+ // Prevent prototype setters from intercepting set as a this value.
115
+ setPrototypeOf(set, null);
116
+ }
117
+ let l = array.length;
118
+ while (l--) {
119
+ let element = array[l];
120
+ if (typeof element === 'string') {
121
+ const lcElement = transformCaseFunc(element);
122
+ if (lcElement !== element) {
123
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
124
+ if (!isFrozen(array)) {
125
+ array[l] = lcElement;
126
+ }
127
+ element = lcElement;
128
+ }
129
+ }
130
+ set[element] = true;
131
+ }
132
+ return set;
133
+ }
134
+ /**
135
+ * Clean up an array to harden against CSPP
136
+ *
137
+ * @param array - The array to be cleaned.
138
+ * @returns The cleaned version of the array
139
+ */
140
+ function cleanArray(array) {
141
+ for (let index = 0; index < array.length; index++) {
142
+ const isPropertyExist = objectHasOwnProperty(array, index);
143
+ if (!isPropertyExist) {
144
+ array[index] = null;
145
+ }
146
+ }
147
+ return array;
148
+ }
149
+ /**
150
+ * Shallow clone an object
151
+ *
152
+ * @param object - The object to be cloned.
153
+ * @returns A new object that copies the original.
154
+ */
155
+ function clone(object) {
156
+ const newObject = create(null);
157
+ for (const [property, value] of entries(object)) {
158
+ const isPropertyExist = objectHasOwnProperty(object, property);
159
+ if (isPropertyExist) {
160
+ if (Array.isArray(value)) {
161
+ newObject[property] = cleanArray(value);
162
+ } else if (value && typeof value === 'object' && value.constructor === Object) {
163
+ newObject[property] = clone(value);
164
+ } else {
165
+ newObject[property] = value;
166
+ }
167
+ }
168
+ }
169
+ return newObject;
170
+ }
171
+ /**
172
+ * This method automatically checks if the prop is function or getter and behaves accordingly.
173
+ *
174
+ * @param object - The object to look up the getter function in its prototype chain.
175
+ * @param prop - The property name for which to find the getter function.
176
+ * @returns The getter function found in the prototype chain or a fallback function.
177
+ */
178
+ function lookupGetter(object, prop) {
179
+ while (object !== null) {
180
+ const desc = getOwnPropertyDescriptor(object, prop);
181
+ if (desc) {
182
+ if (desc.get) {
183
+ return unapply(desc.get);
184
+ }
185
+ if (typeof desc.value === 'function') {
186
+ return unapply(desc.value);
187
+ }
188
+ }
189
+ object = getPrototypeOf(object);
190
+ }
191
+ function fallbackValue() {
192
+ return null;
193
+ }
194
+ return fallbackValue;
195
+ }
196
+
197
+ const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
198
+ const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
199
+ const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
200
+ // List of SVG elements that are disallowed by default.
201
+ // We still need to know them so that we can do namespace
202
+ // checks properly in case one wants to add them to
203
+ // allow-list.
204
+ const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
205
+ const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
206
+ // Similarly to SVG, we want to know all MathML elements,
207
+ // even those that we disallow by default.
208
+ const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
209
+ const text = freeze(['#text']);
210
+
211
+ const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
212
+ const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
213
+ const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
214
+ const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
215
+
216
+ // eslint-disable-next-line unicorn/better-regex
217
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
218
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
219
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
220
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
221
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
222
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
223
+ );
224
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
225
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
226
+ );
227
+ const DOCTYPE_NAME = seal(/^html$/i);
228
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
229
+
230
+ var EXPRESSIONS = /*#__PURE__*/Object.freeze({
231
+ __proto__: null,
232
+ ARIA_ATTR: ARIA_ATTR,
233
+ ATTR_WHITESPACE: ATTR_WHITESPACE,
234
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT,
235
+ DATA_ATTR: DATA_ATTR,
236
+ DOCTYPE_NAME: DOCTYPE_NAME,
237
+ ERB_EXPR: ERB_EXPR,
238
+ IS_ALLOWED_URI: IS_ALLOWED_URI,
239
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
240
+ MUSTACHE_EXPR: MUSTACHE_EXPR,
241
+ TMPLIT_EXPR: TMPLIT_EXPR
242
+ });
243
+
244
+ /* eslint-disable @typescript-eslint/indent */
245
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
246
+ const NODE_TYPE = {
247
+ element: 1,
248
+ attribute: 2,
249
+ text: 3,
250
+ cdataSection: 4,
251
+ entityReference: 5,
252
+ // Deprecated
253
+ entityNode: 6,
254
+ // Deprecated
255
+ progressingInstruction: 7,
256
+ comment: 8,
257
+ document: 9,
258
+ documentType: 10,
259
+ documentFragment: 11,
260
+ notation: 12 // Deprecated
261
+ };
262
+ const getGlobal = function getGlobal() {
263
+ return typeof window === 'undefined' ? null : window;
264
+ };
265
+ /**
266
+ * Creates a no-op policy for internal use only.
267
+ * Don't export this function outside this module!
268
+ * @param trustedTypes The policy factory.
269
+ * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
270
+ * @return The policy created (or null, if Trusted Types
271
+ * are not supported or creating the policy failed).
272
+ */
273
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
274
+ if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
275
+ return null;
276
+ }
277
+ // Allow the callers to control the unique policy name
278
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
279
+ // Policy creation with duplicate names throws in Trusted Types.
280
+ let suffix = null;
281
+ const ATTR_NAME = 'data-tt-policy-suffix';
282
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
283
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
284
+ }
285
+ const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
286
+ try {
287
+ return trustedTypes.createPolicy(policyName, {
288
+ createHTML(html) {
289
+ return html;
290
+ },
291
+ createScriptURL(scriptUrl) {
292
+ return scriptUrl;
293
+ }
294
+ });
295
+ } catch (_) {
296
+ // Policy creation failed (most likely another DOMPurify script has
297
+ // already run). Skip creating the policy, as this will only cause errors
298
+ // if TT are enforced.
299
+ console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
300
+ return null;
301
+ }
302
+ };
303
+ const _createHooksMap = function _createHooksMap() {
304
+ return {
305
+ afterSanitizeAttributes: [],
306
+ afterSanitizeElements: [],
307
+ afterSanitizeShadowDOM: [],
308
+ beforeSanitizeAttributes: [],
309
+ beforeSanitizeElements: [],
310
+ beforeSanitizeShadowDOM: [],
311
+ uponSanitizeAttribute: [],
312
+ uponSanitizeElement: [],
313
+ uponSanitizeShadowNode: []
314
+ };
315
+ };
316
+ function createDOMPurify() {
317
+ let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
318
+ const DOMPurify = root => createDOMPurify(root);
319
+ DOMPurify.version = '3.2.6';
320
+ DOMPurify.removed = [];
321
+ if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
322
+ // Not running in a browser, provide a factory function
323
+ // so that you can pass your own Window
324
+ DOMPurify.isSupported = false;
325
+ return DOMPurify;
326
+ }
327
+ let {
328
+ document
329
+ } = window;
330
+ const originalDocument = document;
331
+ const currentScript = originalDocument.currentScript;
332
+ const {
333
+ DocumentFragment,
334
+ HTMLTemplateElement,
335
+ Node,
336
+ Element,
337
+ NodeFilter,
338
+ NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
339
+ HTMLFormElement,
340
+ DOMParser,
341
+ trustedTypes
342
+ } = window;
343
+ const ElementPrototype = Element.prototype;
344
+ const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
345
+ const remove = lookupGetter(ElementPrototype, 'remove');
346
+ const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
347
+ const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
348
+ const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
349
+ // As per issue #47, the web-components registry is inherited by a
350
+ // new document created via createHTMLDocument. As per the spec
351
+ // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
352
+ // a new empty registry is used when creating a template contents owner
353
+ // document, so we use that as our parent document to ensure nothing
354
+ // is inherited.
355
+ if (typeof HTMLTemplateElement === 'function') {
356
+ const template = document.createElement('template');
357
+ if (template.content && template.content.ownerDocument) {
358
+ document = template.content.ownerDocument;
359
+ }
360
+ }
361
+ let trustedTypesPolicy;
362
+ let emptyHTML = '';
363
+ const {
364
+ implementation,
365
+ createNodeIterator,
366
+ createDocumentFragment,
367
+ getElementsByTagName
368
+ } = document;
369
+ const {
370
+ importNode
371
+ } = originalDocument;
372
+ let hooks = _createHooksMap();
373
+ /**
374
+ * Expose whether this browser supports running the full DOMPurify.
375
+ */
376
+ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
377
+ const {
378
+ MUSTACHE_EXPR,
379
+ ERB_EXPR,
380
+ TMPLIT_EXPR,
381
+ DATA_ATTR,
382
+ ARIA_ATTR,
383
+ IS_SCRIPT_OR_DATA,
384
+ ATTR_WHITESPACE,
385
+ CUSTOM_ELEMENT
386
+ } = EXPRESSIONS;
387
+ let {
388
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
389
+ } = EXPRESSIONS;
390
+ /**
391
+ * We consider the elements and attributes below to be safe. Ideally
392
+ * don't add any new ones but feel free to remove unwanted ones.
393
+ */
394
+ /* allowed element names */
395
+ let ALLOWED_TAGS = null;
396
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
397
+ /* Allowed attribute names */
398
+ let ALLOWED_ATTR = null;
399
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
400
+ /*
401
+ * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
402
+ * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
403
+ * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
404
+ * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
405
+ */
406
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
407
+ tagNameCheck: {
408
+ writable: true,
409
+ configurable: false,
410
+ enumerable: true,
411
+ value: null
412
+ },
413
+ attributeNameCheck: {
414
+ writable: true,
415
+ configurable: false,
416
+ enumerable: true,
417
+ value: null
418
+ },
419
+ allowCustomizedBuiltInElements: {
420
+ writable: true,
421
+ configurable: false,
422
+ enumerable: true,
423
+ value: false
424
+ }
425
+ }));
426
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
427
+ let FORBID_TAGS = null;
428
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
429
+ let FORBID_ATTR = null;
430
+ /* Decide if ARIA attributes are okay */
431
+ let ALLOW_ARIA_ATTR = true;
432
+ /* Decide if custom data attributes are okay */
433
+ let ALLOW_DATA_ATTR = true;
434
+ /* Decide if unknown protocols are okay */
435
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
436
+ /* Decide if self-closing tags in attributes are allowed.
437
+ * Usually removed due to a mXSS issue in jQuery 3.0 */
438
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
439
+ /* Output should be safe for common template engines.
440
+ * This means, DOMPurify removes data attributes, mustaches and ERB
441
+ */
442
+ let SAFE_FOR_TEMPLATES = false;
443
+ /* Output should be safe even for XML used within HTML and alike.
444
+ * This means, DOMPurify removes comments when containing risky content.
445
+ */
446
+ let SAFE_FOR_XML = true;
447
+ /* Decide if document with <html>... should be returned */
448
+ let WHOLE_DOCUMENT = false;
449
+ /* Track whether config is already set on this instance of DOMPurify. */
450
+ let SET_CONFIG = false;
451
+ /* Decide if all elements (e.g. style, script) must be children of
452
+ * document.body. By default, browsers might move them to document.head */
453
+ let FORCE_BODY = false;
454
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
455
+ * string (or a TrustedHTML object if Trusted Types are supported).
456
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
457
+ */
458
+ let RETURN_DOM = false;
459
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
460
+ * string (or a TrustedHTML object if Trusted Types are supported) */
461
+ let RETURN_DOM_FRAGMENT = false;
462
+ /* Try to return a Trusted Type object instead of a string, return a string in
463
+ * case Trusted Types are not supported */
464
+ let RETURN_TRUSTED_TYPE = false;
465
+ /* Output should be free from DOM clobbering attacks?
466
+ * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
467
+ */
468
+ let SANITIZE_DOM = true;
469
+ /* Achieve full DOM Clobbering protection by isolating the namespace of named
470
+ * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
471
+ *
472
+ * HTML/DOM spec rules that enable DOM Clobbering:
473
+ * - Named Access on Window (§7.3.3)
474
+ * - DOM Tree Accessors (§3.1.5)
475
+ * - Form Element Parent-Child Relations (§4.10.3)
476
+ * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
477
+ * - HTMLCollection (§4.2.10.2)
478
+ *
479
+ * Namespace isolation is implemented by prefixing `id` and `name` attributes
480
+ * with a constant string, i.e., `user-content-`
481
+ */
482
+ let SANITIZE_NAMED_PROPS = false;
483
+ const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
484
+ /* Keep element content when removing element? */
485
+ let KEEP_CONTENT = true;
486
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
487
+ * of importing it into a new Document and returning a sanitized copy */
488
+ let IN_PLACE = false;
489
+ /* Allow usage of profiles like html, svg and mathMl */
490
+ let USE_PROFILES = {};
491
+ /* Tags to ignore content of when KEEP_CONTENT is true */
492
+ let FORBID_CONTENTS = null;
493
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
494
+ /* Tags that are safe for data: URIs */
495
+ let DATA_URI_TAGS = null;
496
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
497
+ /* Attributes safe for values like "javascript:" */
498
+ let URI_SAFE_ATTRIBUTES = null;
499
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
500
+ const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
501
+ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
502
+ const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
503
+ /* Document namespace */
504
+ let NAMESPACE = HTML_NAMESPACE;
505
+ let IS_EMPTY_INPUT = false;
506
+ /* Allowed XHTML+XML namespaces */
507
+ let ALLOWED_NAMESPACES = null;
508
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
509
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
510
+ let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
511
+ // Certain elements are allowed in both SVG and HTML
512
+ // namespace. We need to specify them explicitly
513
+ // so that they don't get erroneously deleted from
514
+ // HTML namespace.
515
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
516
+ /* Parsing of strict XHTML documents */
517
+ let PARSER_MEDIA_TYPE = null;
518
+ const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
519
+ const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
520
+ let transformCaseFunc = null;
521
+ /* Keep a reference to config to pass to hooks */
522
+ let CONFIG = null;
523
+ /* Ideally, do not touch anything below this line */
524
+ /* ______________________________________________ */
525
+ const formElement = document.createElement('form');
526
+ const isRegexOrFunction = function isRegexOrFunction(testValue) {
527
+ return testValue instanceof RegExp || testValue instanceof Function;
528
+ };
529
+ /**
530
+ * _parseConfig
531
+ *
532
+ * @param cfg optional config literal
533
+ */
534
+ // eslint-disable-next-line complexity
535
+ const _parseConfig = function _parseConfig() {
536
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
537
+ if (CONFIG && CONFIG === cfg) {
538
+ return;
539
+ }
540
+ /* Shield configuration object from tampering */
541
+ if (!cfg || typeof cfg !== 'object') {
542
+ cfg = {};
543
+ }
544
+ /* Shield configuration object from prototype pollution */
545
+ cfg = clone(cfg);
546
+ PARSER_MEDIA_TYPE =
547
+ // eslint-disable-next-line unicorn/prefer-includes
548
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
549
+ // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
550
+ transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
551
+ /* Set configuration parameters */
552
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
553
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
554
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
555
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
556
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
557
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
558
+ FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
559
+ FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
560
+ USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
561
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
562
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
563
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
564
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
565
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
566
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
567
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
568
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
569
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
570
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
571
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
572
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
573
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
574
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
575
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
576
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
577
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
578
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
579
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
580
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
581
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
582
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
583
+ }
584
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
585
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
586
+ }
587
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
588
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
589
+ }
590
+ if (SAFE_FOR_TEMPLATES) {
591
+ ALLOW_DATA_ATTR = false;
592
+ }
593
+ if (RETURN_DOM_FRAGMENT) {
594
+ RETURN_DOM = true;
595
+ }
596
+ /* Parse profile info */
597
+ if (USE_PROFILES) {
598
+ ALLOWED_TAGS = addToSet({}, text);
599
+ ALLOWED_ATTR = [];
600
+ if (USE_PROFILES.html === true) {
601
+ addToSet(ALLOWED_TAGS, html$1);
602
+ addToSet(ALLOWED_ATTR, html);
603
+ }
604
+ if (USE_PROFILES.svg === true) {
605
+ addToSet(ALLOWED_TAGS, svg$1);
606
+ addToSet(ALLOWED_ATTR, svg);
607
+ addToSet(ALLOWED_ATTR, xml);
608
+ }
609
+ if (USE_PROFILES.svgFilters === true) {
610
+ addToSet(ALLOWED_TAGS, svgFilters);
611
+ addToSet(ALLOWED_ATTR, svg);
612
+ addToSet(ALLOWED_ATTR, xml);
613
+ }
614
+ if (USE_PROFILES.mathMl === true) {
615
+ addToSet(ALLOWED_TAGS, mathMl$1);
616
+ addToSet(ALLOWED_ATTR, mathMl);
617
+ addToSet(ALLOWED_ATTR, xml);
618
+ }
619
+ }
620
+ /* Merge configuration parameters */
621
+ if (cfg.ADD_TAGS) {
622
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
623
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
624
+ }
625
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
626
+ }
627
+ if (cfg.ADD_ATTR) {
628
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
629
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
630
+ }
631
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
632
+ }
633
+ if (cfg.ADD_URI_SAFE_ATTR) {
634
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
635
+ }
636
+ if (cfg.FORBID_CONTENTS) {
637
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
638
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
639
+ }
640
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
641
+ }
642
+ /* Add #text in case KEEP_CONTENT is set to true */
643
+ if (KEEP_CONTENT) {
644
+ ALLOWED_TAGS['#text'] = true;
645
+ }
646
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
647
+ if (WHOLE_DOCUMENT) {
648
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
649
+ }
650
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
651
+ if (ALLOWED_TAGS.table) {
652
+ addToSet(ALLOWED_TAGS, ['tbody']);
653
+ delete FORBID_TAGS.tbody;
654
+ }
655
+ if (cfg.TRUSTED_TYPES_POLICY) {
656
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
657
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
658
+ }
659
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
660
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
661
+ }
662
+ // Overwrite existing TrustedTypes policy.
663
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
664
+ // Sign local variables required by `sanitize`.
665
+ emptyHTML = trustedTypesPolicy.createHTML('');
666
+ } else {
667
+ // Uninitialized policy, attempt to initialize the internal dompurify policy.
668
+ if (trustedTypesPolicy === undefined) {
669
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
670
+ }
671
+ // If creating the internal policy succeeded sign internal variables.
672
+ if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
673
+ emptyHTML = trustedTypesPolicy.createHTML('');
674
+ }
675
+ }
676
+ // Prevent further manipulation of configuration.
677
+ // Not available in IE8, Safari 5, etc.
678
+ if (freeze) {
679
+ freeze(cfg);
680
+ }
681
+ CONFIG = cfg;
682
+ };
683
+ /* Keep track of all possible SVG and MathML tags
684
+ * so that we can perform the namespace checks
685
+ * correctly. */
686
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
687
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
688
+ /**
689
+ * @param element a DOM element whose namespace is being checked
690
+ * @returns Return false if the element has a
691
+ * namespace that a spec-compliant parser would never
692
+ * return. Return true otherwise.
693
+ */
694
+ const _checkValidNamespace = function _checkValidNamespace(element) {
695
+ let parent = getParentNode(element);
696
+ // In JSDOM, if we're inside shadow DOM, then parentNode
697
+ // can be null. We just simulate parent in this case.
698
+ if (!parent || !parent.tagName) {
699
+ parent = {
700
+ namespaceURI: NAMESPACE,
701
+ tagName: 'template'
702
+ };
703
+ }
704
+ const tagName = stringToLowerCase(element.tagName);
705
+ const parentTagName = stringToLowerCase(parent.tagName);
706
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
707
+ return false;
708
+ }
709
+ if (element.namespaceURI === SVG_NAMESPACE) {
710
+ // The only way to switch from HTML namespace to SVG
711
+ // is via <svg>. If it happens via any other tag, then
712
+ // it should be killed.
713
+ if (parent.namespaceURI === HTML_NAMESPACE) {
714
+ return tagName === 'svg';
715
+ }
716
+ // The only way to switch from MathML to SVG is via`
717
+ // svg if parent is either <annotation-xml> or MathML
718
+ // text integration points.
719
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
720
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
721
+ }
722
+ // We only allow elements that are defined in SVG
723
+ // spec. All others are disallowed in SVG namespace.
724
+ return Boolean(ALL_SVG_TAGS[tagName]);
725
+ }
726
+ if (element.namespaceURI === MATHML_NAMESPACE) {
727
+ // The only way to switch from HTML namespace to MathML
728
+ // is via <math>. If it happens via any other tag, then
729
+ // it should be killed.
730
+ if (parent.namespaceURI === HTML_NAMESPACE) {
731
+ return tagName === 'math';
732
+ }
733
+ // The only way to switch from SVG to MathML is via
734
+ // <math> and HTML integration points
735
+ if (parent.namespaceURI === SVG_NAMESPACE) {
736
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
737
+ }
738
+ // We only allow elements that are defined in MathML
739
+ // spec. All others are disallowed in MathML namespace.
740
+ return Boolean(ALL_MATHML_TAGS[tagName]);
741
+ }
742
+ if (element.namespaceURI === HTML_NAMESPACE) {
743
+ // The only way to switch from SVG to HTML is via
744
+ // HTML integration points, and from MathML to HTML
745
+ // is via MathML text integration points
746
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
747
+ return false;
748
+ }
749
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
750
+ return false;
751
+ }
752
+ // We disallow tags that are specific for MathML
753
+ // or SVG and should never appear in HTML namespace
754
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
755
+ }
756
+ // For XHTML and XML documents that support custom namespaces
757
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
758
+ return true;
759
+ }
760
+ // The code should never reach this place (this means
761
+ // that the element somehow got namespace that is not
762
+ // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
763
+ // Return false just in case.
764
+ return false;
765
+ };
766
+ /**
767
+ * _forceRemove
768
+ *
769
+ * @param node a DOM node
770
+ */
771
+ const _forceRemove = function _forceRemove(node) {
772
+ arrayPush(DOMPurify.removed, {
773
+ element: node
774
+ });
775
+ try {
776
+ // eslint-disable-next-line unicorn/prefer-dom-node-remove
777
+ getParentNode(node).removeChild(node);
778
+ } catch (_) {
779
+ remove(node);
780
+ }
781
+ };
782
+ /**
783
+ * _removeAttribute
784
+ *
785
+ * @param name an Attribute name
786
+ * @param element a DOM node
787
+ */
788
+ const _removeAttribute = function _removeAttribute(name, element) {
789
+ try {
790
+ arrayPush(DOMPurify.removed, {
791
+ attribute: element.getAttributeNode(name),
792
+ from: element
793
+ });
794
+ } catch (_) {
795
+ arrayPush(DOMPurify.removed, {
796
+ attribute: null,
797
+ from: element
798
+ });
799
+ }
800
+ element.removeAttribute(name);
801
+ // We void attribute values for unremovable "is" attributes
802
+ if (name === 'is') {
803
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
804
+ try {
805
+ _forceRemove(element);
806
+ } catch (_) {}
807
+ } else {
808
+ try {
809
+ element.setAttribute(name, '');
810
+ } catch (_) {}
811
+ }
812
+ }
813
+ };
814
+ /**
815
+ * _initDocument
816
+ *
817
+ * @param dirty - a string of dirty markup
818
+ * @return a DOM, filled with the dirty markup
819
+ */
820
+ const _initDocument = function _initDocument(dirty) {
821
+ /* Create a HTML document */
822
+ let doc = null;
823
+ let leadingWhitespace = null;
824
+ if (FORCE_BODY) {
825
+ dirty = '<remove></remove>' + dirty;
826
+ } else {
827
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
828
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
829
+ leadingWhitespace = matches && matches[0];
830
+ }
831
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
832
+ // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
833
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
834
+ }
835
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
836
+ /*
837
+ * Use the DOMParser API by default, fallback later if needs be
838
+ * DOMParser not work for svg when has multiple root element.
839
+ */
840
+ if (NAMESPACE === HTML_NAMESPACE) {
841
+ try {
842
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
843
+ } catch (_) {}
844
+ }
845
+ /* Use createHTMLDocument in case DOMParser is not available */
846
+ if (!doc || !doc.documentElement) {
847
+ doc = implementation.createDocument(NAMESPACE, 'template', null);
848
+ try {
849
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
850
+ } catch (_) {
851
+ // Syntax error if dirtyPayload is invalid xml
852
+ }
853
+ }
854
+ const body = doc.body || doc.documentElement;
855
+ if (dirty && leadingWhitespace) {
856
+ body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
857
+ }
858
+ /* Work on whole document or just its body */
859
+ if (NAMESPACE === HTML_NAMESPACE) {
860
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
861
+ }
862
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
863
+ };
864
+ /**
865
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
866
+ *
867
+ * @param root The root element or node to start traversing on.
868
+ * @return The created NodeIterator
869
+ */
870
+ const _createNodeIterator = function _createNodeIterator(root) {
871
+ return createNodeIterator.call(root.ownerDocument || root, root,
872
+ // eslint-disable-next-line no-bitwise
873
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
874
+ };
875
+ /**
876
+ * _isClobbered
877
+ *
878
+ * @param element element to check for clobbering attacks
879
+ * @return true if clobbered, false if safe
880
+ */
881
+ const _isClobbered = function _isClobbered(element) {
882
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
883
+ };
884
+ /**
885
+ * Checks whether the given object is a DOM node.
886
+ *
887
+ * @param value object to check whether it's a DOM node
888
+ * @return true is object is a DOM node
889
+ */
890
+ const _isNode = function _isNode(value) {
891
+ return typeof Node === 'function' && value instanceof Node;
892
+ };
893
+ function _executeHooks(hooks, currentNode, data) {
894
+ arrayForEach(hooks, hook => {
895
+ hook.call(DOMPurify, currentNode, data, CONFIG);
896
+ });
897
+ }
898
+ /**
899
+ * _sanitizeElements
900
+ *
901
+ * @protect nodeName
902
+ * @protect textContent
903
+ * @protect removeChild
904
+ * @param currentNode to check for permission to exist
905
+ * @return true if node was killed, false if left alive
906
+ */
907
+ const _sanitizeElements = function _sanitizeElements(currentNode) {
908
+ let content = null;
909
+ /* Execute a hook if present */
910
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
911
+ /* Check if element is clobbered or can clobber */
912
+ if (_isClobbered(currentNode)) {
913
+ _forceRemove(currentNode);
914
+ return true;
915
+ }
916
+ /* Now let's check the element's type and name */
917
+ const tagName = transformCaseFunc(currentNode.nodeName);
918
+ /* Execute a hook if present */
919
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
920
+ tagName,
921
+ allowedTags: ALLOWED_TAGS
922
+ });
923
+ /* Detect mXSS attempts abusing namespace confusion */
924
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
925
+ _forceRemove(currentNode);
926
+ return true;
927
+ }
928
+ /* Remove any occurrence of processing instructions */
929
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
930
+ _forceRemove(currentNode);
931
+ return true;
932
+ }
933
+ /* Remove any kind of possibly harmful comments */
934
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
935
+ _forceRemove(currentNode);
936
+ return true;
937
+ }
938
+ /* Remove element if anything forbids its presence */
939
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
940
+ /* Check if we have a custom element to handle */
941
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
942
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
943
+ return false;
944
+ }
945
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
946
+ return false;
947
+ }
948
+ }
949
+ /* Keep content except for bad-listed elements */
950
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
951
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
952
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
953
+ if (childNodes && parentNode) {
954
+ const childCount = childNodes.length;
955
+ for (let i = childCount - 1; i >= 0; --i) {
956
+ const childClone = cloneNode(childNodes[i], true);
957
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
958
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
959
+ }
960
+ }
961
+ }
962
+ _forceRemove(currentNode);
963
+ return true;
964
+ }
965
+ /* Check whether element has a valid namespace */
966
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
967
+ _forceRemove(currentNode);
968
+ return true;
969
+ }
970
+ /* Make sure that older browsers don't get fallback-tag mXSS */
971
+ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
972
+ _forceRemove(currentNode);
973
+ return true;
974
+ }
975
+ /* Sanitize element content to be template-safe */
976
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
977
+ /* Get the element's text content */
978
+ content = currentNode.textContent;
979
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
980
+ content = stringReplace(content, expr, ' ');
981
+ });
982
+ if (currentNode.textContent !== content) {
983
+ arrayPush(DOMPurify.removed, {
984
+ element: currentNode.cloneNode()
985
+ });
986
+ currentNode.textContent = content;
987
+ }
988
+ }
989
+ /* Execute a hook if present */
990
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
991
+ return false;
992
+ };
993
+ /**
994
+ * _isValidAttribute
995
+ *
996
+ * @param lcTag Lowercase tag name of containing element.
997
+ * @param lcName Lowercase attribute name.
998
+ * @param value Attribute value.
999
+ * @return Returns true if `value` is valid, otherwise false.
1000
+ */
1001
+ // eslint-disable-next-line complexity
1002
+ const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
1003
+ /* Make sure attribute cannot clobber */
1004
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
1005
+ return false;
1006
+ }
1007
+ /* Allow valid data-* attributes: At least one character after "-"
1008
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1009
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1010
+ We don't need to check the value; it's always URI safe. */
1011
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
1012
+ if (
1013
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1014
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1015
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1016
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
1017
+ // Alternative, second condition checks if it's an `is`-attribute, AND
1018
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1019
+ lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
1020
+ return false;
1021
+ }
1022
+ /* Check value is safe. First, is attr inert? If so, is safe */
1023
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
1024
+ return false;
1025
+ } else ;
1026
+ return true;
1027
+ };
1028
+ /**
1029
+ * _isBasicCustomElement
1030
+ * checks if at least one dash is included in tagName, and it's not the first char
1031
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1032
+ *
1033
+ * @param tagName name of the tag of the node to sanitize
1034
+ * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1035
+ */
1036
+ const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1037
+ return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
1038
+ };
1039
+ /**
1040
+ * _sanitizeAttributes
1041
+ *
1042
+ * @protect attributes
1043
+ * @protect nodeName
1044
+ * @protect removeAttribute
1045
+ * @protect setAttribute
1046
+ *
1047
+ * @param currentNode to sanitize
1048
+ */
1049
+ const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1050
+ /* Execute a hook if present */
1051
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1052
+ const {
1053
+ attributes
1054
+ } = currentNode;
1055
+ /* Check if we have attributes; if not we might have a text node */
1056
+ if (!attributes || _isClobbered(currentNode)) {
1057
+ return;
1058
+ }
1059
+ const hookEvent = {
1060
+ attrName: '',
1061
+ attrValue: '',
1062
+ keepAttr: true,
1063
+ allowedAttributes: ALLOWED_ATTR,
1064
+ forceKeepAttr: undefined
1065
+ };
1066
+ let l = attributes.length;
1067
+ /* Go backwards over all attributes; safely remove bad ones */
1068
+ while (l--) {
1069
+ const attr = attributes[l];
1070
+ const {
1071
+ name,
1072
+ namespaceURI,
1073
+ value: attrValue
1074
+ } = attr;
1075
+ const lcName = transformCaseFunc(name);
1076
+ const initValue = attrValue;
1077
+ let value = name === 'value' ? initValue : stringTrim(initValue);
1078
+ /* Execute a hook if present */
1079
+ hookEvent.attrName = lcName;
1080
+ hookEvent.attrValue = value;
1081
+ hookEvent.keepAttr = true;
1082
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1083
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1084
+ value = hookEvent.attrValue;
1085
+ /* Full DOM Clobbering protection via namespace isolation,
1086
+ * Prefix id and name attributes with `user-content-`
1087
+ */
1088
+ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1089
+ // Remove the attribute with this value
1090
+ _removeAttribute(name, currentNode);
1091
+ // Prefix the value and later re-create the attribute with the sanitized value
1092
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
1093
+ }
1094
+ /* Work around a security issue with comments inside attributes */
1095
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
1096
+ _removeAttribute(name, currentNode);
1097
+ continue;
1098
+ }
1099
+ /* Did the hooks approve of the attribute? */
1100
+ if (hookEvent.forceKeepAttr) {
1101
+ continue;
1102
+ }
1103
+ /* Did the hooks approve of the attribute? */
1104
+ if (!hookEvent.keepAttr) {
1105
+ _removeAttribute(name, currentNode);
1106
+ continue;
1107
+ }
1108
+ /* Work around a security issue in jQuery 3.0 */
1109
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1110
+ _removeAttribute(name, currentNode);
1111
+ continue;
1112
+ }
1113
+ /* Sanitize attribute content to be template-safe */
1114
+ if (SAFE_FOR_TEMPLATES) {
1115
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1116
+ value = stringReplace(value, expr, ' ');
1117
+ });
1118
+ }
1119
+ /* Is `value` valid for this attribute? */
1120
+ const lcTag = transformCaseFunc(currentNode.nodeName);
1121
+ if (!_isValidAttribute(lcTag, lcName, value)) {
1122
+ _removeAttribute(name, currentNode);
1123
+ continue;
1124
+ }
1125
+ /* Handle attributes that require Trusted Types */
1126
+ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1127
+ if (namespaceURI) ; else {
1128
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1129
+ case 'TrustedHTML':
1130
+ {
1131
+ value = trustedTypesPolicy.createHTML(value);
1132
+ break;
1133
+ }
1134
+ case 'TrustedScriptURL':
1135
+ {
1136
+ value = trustedTypesPolicy.createScriptURL(value);
1137
+ break;
1138
+ }
1139
+ }
1140
+ }
1141
+ }
1142
+ /* Handle invalid data-* attribute set by try-catching it */
1143
+ if (value !== initValue) {
1144
+ try {
1145
+ if (namespaceURI) {
1146
+ currentNode.setAttributeNS(namespaceURI, name, value);
1147
+ } else {
1148
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1149
+ currentNode.setAttribute(name, value);
1150
+ }
1151
+ if (_isClobbered(currentNode)) {
1152
+ _forceRemove(currentNode);
1153
+ } else {
1154
+ arrayPop(DOMPurify.removed);
1155
+ }
1156
+ } catch (_) {
1157
+ _removeAttribute(name, currentNode);
1158
+ }
1159
+ }
1160
+ }
1161
+ /* Execute a hook if present */
1162
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1163
+ };
1164
+ /**
1165
+ * _sanitizeShadowDOM
1166
+ *
1167
+ * @param fragment to iterate over recursively
1168
+ */
1169
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1170
+ let shadowNode = null;
1171
+ const shadowIterator = _createNodeIterator(fragment);
1172
+ /* Execute a hook if present */
1173
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1174
+ while (shadowNode = shadowIterator.nextNode()) {
1175
+ /* Execute a hook if present */
1176
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1177
+ /* Sanitize tags and elements */
1178
+ _sanitizeElements(shadowNode);
1179
+ /* Check attributes next */
1180
+ _sanitizeAttributes(shadowNode);
1181
+ /* Deep shadow DOM detected */
1182
+ if (shadowNode.content instanceof DocumentFragment) {
1183
+ _sanitizeShadowDOM(shadowNode.content);
1184
+ }
1185
+ }
1186
+ /* Execute a hook if present */
1187
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1188
+ };
1189
+ // eslint-disable-next-line complexity
1190
+ DOMPurify.sanitize = function (dirty) {
1191
+ let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1192
+ let body = null;
1193
+ let importedNode = null;
1194
+ let currentNode = null;
1195
+ let returnNode = null;
1196
+ /* Make sure we have a string to sanitize.
1197
+ DO NOT return early, as this will return the wrong type if
1198
+ the user has requested a DOM object rather than a string */
1199
+ IS_EMPTY_INPUT = !dirty;
1200
+ if (IS_EMPTY_INPUT) {
1201
+ dirty = '<!-->';
1202
+ }
1203
+ /* Stringify, in case dirty is an object */
1204
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
1205
+ if (typeof dirty.toString === 'function') {
1206
+ dirty = dirty.toString();
1207
+ if (typeof dirty !== 'string') {
1208
+ throw typeErrorCreate('dirty is not a string, aborting');
1209
+ }
1210
+ } else {
1211
+ throw typeErrorCreate('toString is not a function');
1212
+ }
1213
+ }
1214
+ /* Return dirty HTML if DOMPurify cannot run */
1215
+ if (!DOMPurify.isSupported) {
1216
+ return dirty;
1217
+ }
1218
+ /* Assign config vars */
1219
+ if (!SET_CONFIG) {
1220
+ _parseConfig(cfg);
1221
+ }
1222
+ /* Clean up removed elements */
1223
+ DOMPurify.removed = [];
1224
+ /* Check if dirty is correctly typed for IN_PLACE */
1225
+ if (typeof dirty === 'string') {
1226
+ IN_PLACE = false;
1227
+ }
1228
+ if (IN_PLACE) {
1229
+ /* Do some early pre-sanitization to avoid unsafe root nodes */
1230
+ if (dirty.nodeName) {
1231
+ const tagName = transformCaseFunc(dirty.nodeName);
1232
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1233
+ throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1234
+ }
1235
+ }
1236
+ } else if (dirty instanceof Node) {
1237
+ /* If dirty is a DOM element, append to an empty document to avoid
1238
+ elements being stripped by the parser */
1239
+ body = _initDocument('<!---->');
1240
+ importedNode = body.ownerDocument.importNode(dirty, true);
1241
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
1242
+ /* Node is already a body, use as is */
1243
+ body = importedNode;
1244
+ } else if (importedNode.nodeName === 'HTML') {
1245
+ body = importedNode;
1246
+ } else {
1247
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1248
+ body.appendChild(importedNode);
1249
+ }
1250
+ } else {
1251
+ /* Exit directly if we have nothing to do */
1252
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1253
+ // eslint-disable-next-line unicorn/prefer-includes
1254
+ dirty.indexOf('<') === -1) {
1255
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1256
+ }
1257
+ /* Initialize the document to work on */
1258
+ body = _initDocument(dirty);
1259
+ /* Check we have a DOM node from the data */
1260
+ if (!body) {
1261
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1262
+ }
1263
+ }
1264
+ /* Remove first element node (ours) if FORCE_BODY is set */
1265
+ if (body && FORCE_BODY) {
1266
+ _forceRemove(body.firstChild);
1267
+ }
1268
+ /* Get node iterator */
1269
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
1270
+ /* Now start iterating over the created document */
1271
+ while (currentNode = nodeIterator.nextNode()) {
1272
+ /* Sanitize tags and elements */
1273
+ _sanitizeElements(currentNode);
1274
+ /* Check attributes next */
1275
+ _sanitizeAttributes(currentNode);
1276
+ /* Shadow DOM detected, sanitize it */
1277
+ if (currentNode.content instanceof DocumentFragment) {
1278
+ _sanitizeShadowDOM(currentNode.content);
1279
+ }
1280
+ }
1281
+ /* If we sanitized `dirty` in-place, return it. */
1282
+ if (IN_PLACE) {
1283
+ return dirty;
1284
+ }
1285
+ /* Return sanitized string or DOM */
1286
+ if (RETURN_DOM) {
1287
+ if (RETURN_DOM_FRAGMENT) {
1288
+ returnNode = createDocumentFragment.call(body.ownerDocument);
1289
+ while (body.firstChild) {
1290
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1291
+ returnNode.appendChild(body.firstChild);
1292
+ }
1293
+ } else {
1294
+ returnNode = body;
1295
+ }
1296
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
1297
+ /*
1298
+ AdoptNode() is not used because internal state is not reset
1299
+ (e.g. the past names map of a HTMLFormElement), this is safe
1300
+ in theory but we would rather not risk another attack vector.
1301
+ The state that is cloned by importNode() is explicitly defined
1302
+ by the specs.
1303
+ */
1304
+ returnNode = importNode.call(originalDocument, returnNode, true);
1305
+ }
1306
+ return returnNode;
1307
+ }
1308
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1309
+ /* Serialize doctype if allowed */
1310
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1311
+ serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1312
+ }
1313
+ /* Sanitize final string template-safe */
1314
+ if (SAFE_FOR_TEMPLATES) {
1315
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1316
+ serializedHTML = stringReplace(serializedHTML, expr, ' ');
1317
+ });
1318
+ }
1319
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1320
+ };
1321
+ DOMPurify.setConfig = function () {
1322
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1323
+ _parseConfig(cfg);
1324
+ SET_CONFIG = true;
1325
+ };
1326
+ DOMPurify.clearConfig = function () {
1327
+ CONFIG = null;
1328
+ SET_CONFIG = false;
1329
+ };
1330
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
1331
+ /* Initialize shared config vars if necessary. */
1332
+ if (!CONFIG) {
1333
+ _parseConfig({});
1334
+ }
1335
+ const lcTag = transformCaseFunc(tag);
1336
+ const lcName = transformCaseFunc(attr);
1337
+ return _isValidAttribute(lcTag, lcName, value);
1338
+ };
1339
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
1340
+ if (typeof hookFunction !== 'function') {
1341
+ return;
1342
+ }
1343
+ arrayPush(hooks[entryPoint], hookFunction);
1344
+ };
1345
+ DOMPurify.removeHook = function (entryPoint, hookFunction) {
1346
+ if (hookFunction !== undefined) {
1347
+ const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
1348
+ return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
1349
+ }
1350
+ return arrayPop(hooks[entryPoint]);
1351
+ };
1352
+ DOMPurify.removeHooks = function (entryPoint) {
1353
+ hooks[entryPoint] = [];
1354
+ };
1355
+ DOMPurify.removeAllHooks = function () {
1356
+ hooks = _createHooksMap();
1357
+ };
1358
+ return DOMPurify;
1359
+ }
1360
+ var purify = createDOMPurify();
1361
+
1362
+ return purify;
1363
+
1364
+ }));
1365
+
1366
+ }(purify));
1367
+
1368
+ const purifier = purify.exports;
1369
+
1370
+ /* istanbul ignore next */
1371
+ const getCustomElementHandling = (allowICPrefix) => ({
1372
+ CUSTOM_ELEMENT_HANDLING: {
1373
+ tagNameCheck: (tagName) => (allowICPrefix && tagName.startsWith("ic-")) ||
1374
+ IC_CUSTOM_ALLOWED_COMPONENTS.includes(tagName),
1375
+ attributeNameCheck: /.*/,
1376
+ },
1377
+ });
1378
+ const sanitizeHTMLString = (html) => {
1379
+ return purifier.sanitize(html, getCustomElementHandling(true));
1380
+ };
1381
+ const sanitizeHTMLIconString = (html) => {
1382
+ return purifier.sanitize(html, getCustomElementHandling(false));
1383
+ };
1384
+
1385
+ const icMenuCss = "html.sc-ic-menu{line-height:1.15;-webkit-text-size-adjust:100%}body.sc-ic-menu{margin:0}main.sc-ic-menu{display:block}h1.sc-ic-menu{font-size:2em;margin:0.67em 0}hr.sc-ic-menu{box-sizing:content-box;height:0;overflow:visible}pre.sc-ic-menu{font-family:monospace, monospace;font-size:1em}a.sc-ic-menu{background-color:transparent}abbr[title].sc-ic-menu{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b.sc-ic-menu,strong.sc-ic-menu{font-weight:bolder}code.sc-ic-menu,kbd.sc-ic-menu,samp.sc-ic-menu{font-family:monospace, monospace;font-size:1em}small.sc-ic-menu{font-size:80%}sub.sc-ic-menu,sup.sc-ic-menu{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-ic-menu{bottom:-0.25em}sup.sc-ic-menu{top:-0.5em}img.sc-ic-menu{border-style:none}button.sc-ic-menu,input.sc-ic-menu,optgroup.sc-ic-menu,select.sc-ic-menu,textarea.sc-ic-menu{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-ic-menu,input.sc-ic-menu{overflow:visible}button.sc-ic-menu,select.sc-ic-menu{text-transform:none}button.sc-ic-menu,[type=\"button\"].sc-ic-menu,[type=\"reset\"].sc-ic-menu,[type=\"submit\"].sc-ic-menu{-webkit-appearance:button}button.sc-ic-menu::-moz-focus-inner,[type=\"button\"].sc-ic-menu::-moz-focus-inner,[type=\"reset\"].sc-ic-menu::-moz-focus-inner,[type=\"submit\"].sc-ic-menu::-moz-focus-inner{border-style:none;padding:0}button.sc-ic-menu:-moz-focusring,[type=\"button\"].sc-ic-menu:-moz-focusring,[type=\"reset\"].sc-ic-menu:-moz-focusring,[type=\"submit\"].sc-ic-menu:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-ic-menu{padding:0.35em 0.75em 0.625em}legend.sc-ic-menu{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-ic-menu{vertical-align:baseline}textarea.sc-ic-menu{overflow:auto}[type=\"checkbox\"].sc-ic-menu,[type=\"radio\"].sc-ic-menu{box-sizing:border-box;padding:0}[type=\"number\"].sc-ic-menu::-webkit-inner-spin-button,[type=\"number\"].sc-ic-menu::-webkit-outer-spin-button{height:auto}[type=\"search\"].sc-ic-menu{-webkit-appearance:textfield;outline-offset:-2px}[type=\"search\"].sc-ic-menu::-webkit-search-decoration{-webkit-appearance:none}.sc-ic-menu::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-ic-menu{display:block}summary.sc-ic-menu{display:list-item}template.sc-ic-menu{display:none}[hidden].sc-ic-menu{display:none}html.sc-ic-menu,body.sc-ic-menu,div.sc-ic-menu,span.sc-ic-menu,applet.sc-ic-menu,object.sc-ic-menu,iframe.sc-ic-menu,h1.sc-ic-menu,h2.sc-ic-menu,h3.sc-ic-menu,h4.sc-ic-menu,h5.sc-ic-menu,h6.sc-ic-menu,p.sc-ic-menu,blockquote.sc-ic-menu,pre.sc-ic-menu,a.sc-ic-menu,abbr.sc-ic-menu,acronym.sc-ic-menu,address.sc-ic-menu,big.sc-ic-menu,cite.sc-ic-menu,code.sc-ic-menu,del.sc-ic-menu,dfn.sc-ic-menu,em.sc-ic-menu,img.sc-ic-menu,ins.sc-ic-menu,kbd.sc-ic-menu,q.sc-ic-menu,s.sc-ic-menu,samp.sc-ic-menu,small.sc-ic-menu,strike.sc-ic-menu,strong.sc-ic-menu,sub.sc-ic-menu,sup.sc-ic-menu,tt.sc-ic-menu,var.sc-ic-menu,b.sc-ic-menu,u.sc-ic-menu,i.sc-ic-menu,center.sc-ic-menu,dl.sc-ic-menu,dt.sc-ic-menu,dd.sc-ic-menu,ol.sc-ic-menu,ul.sc-ic-menu,li.sc-ic-menu,fieldset.sc-ic-menu,form.sc-ic-menu,label.sc-ic-menu,legend.sc-ic-menu,table.sc-ic-menu,caption.sc-ic-menu,tbody.sc-ic-menu,tfoot.sc-ic-menu,thead.sc-ic-menu,tr.sc-ic-menu,th.sc-ic-menu,td.sc-ic-menu,article.sc-ic-menu,aside.sc-ic-menu,canvas.sc-ic-menu,details.sc-ic-menu,embed.sc-ic-menu,figure.sc-ic-menu,figcaption.sc-ic-menu,footer.sc-ic-menu,header.sc-ic-menu,hgroup.sc-ic-menu,menu.sc-ic-menu,nav.sc-ic-menu,output.sc-ic-menu,ruby.sc-ic-menu,section.sc-ic-menu,summary.sc-ic-menu,time.sc-ic-menu,mark.sc-ic-menu,audio.sc-ic-menu,video.sc-ic-menu{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{max-height:0;width:var(--menu-width, var(--input-width, 20rem));color:var(--menu-item-text-color, var(--ic-menu-list-option-text-color));--ic-typography-color:var(\n --menu-item-text-color,\n var(--ic-menu-list-option-text-color)\n );background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);border-radius:var(--ic-border-radius)}.ic-menu-open.sc-ic-menu-h:not(.ic-menu-no-focus):focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}.ic-select-select-all-focused.sc-ic-menu-h{box-shadow:var(--ic-elevation-overlay) !important}#retry-button.sc-ic-menu::part(button){height:var(--ic-space-lg)}.small.sc-ic-menu #retry-button.sc-ic-menu::part(button){height:var(--ic-space-md)}.on-dialog.sc-ic-menu-h{inset:auto !important}.menu.sc-ic-menu{text-decoration:none;list-style-type:none;border-radius:1px;background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );visibility:hidden;max-height:0;overflow-y:hidden}.menu.sc-ic-menu:has(+.option-bar).sc-ic-menu{border-radius:0 0 1px 1px}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.ic-menu-open.sc-ic-menu-h{max-height:none;display:flex;flex-direction:column-reverse;border:var(--ic-border-width) solid\n var(--menu-border-color, var(--ic-menu-border-color));transition:box-shadow var(--ic-easing-transition-fast)}.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.ic-menu-open.sc-ic-menu-h .option-bar.sc-ic-menu{visibility:visible}.ic-menu-open.sc-ic-menu-h .select-all-button.sc-ic-menu{display:block}.ic-menu-full-width.sc-ic-menu-h{width:100%}.option.sc-ic-menu{padding:var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));cursor:pointer;display:flex;align-items:center;gap:var(--ic-space-xs)}.loading-option.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.ic-menu-small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.ic-menu-large.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))}.option.sc-ic-menu:last-child{border-radius:0 0 1px 1px}.sc-ic-menu:not(.menu:has(+.option-bar)).sc-ic-menu .option.sc-ic-menu:first-child{border-radius:1px 1px 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-menu-list-option-hover-background-color)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-menu-list-option-pressed-background-color)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{--ic-typography-color:var(\n --menu-item-desc-text-color,\n var(--ic-menu-list-option-description-text-color)\n )}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.option.sc-ic-menu .option-label.sc-ic-menu ic-typography.sc-ic-menu{max-width:100%;word-wrap:break-word}.option.sc-ic-menu .option-element.sc-ic-menu{margin-top:var(--ic-space-xxs)}.option.sc-ic-menu .option-icon.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);margin-top:var(--ic-space-xxs);margin-right:var(--ic-space-xxxs)}.option-text-container.sc-ic-menu{pointer-events:none;width:100%}.option-text-container.show-check-icon.sc-ic-menu{flex-grow:1}.option.loading-option.sc-ic-menu .option-text-container.sc-ic-menu{margin-left:calc(var(--ic-space-xs) + var(--ic-space-xxxs));color:var(--ic-menu-loading-list-option-text-color);--ic-typography-color:var(--ic-menu-loading-list-option-text-color)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-atoms-status-icon-error);align-self:center;display:flex;margin-right:calc(var(--ic-space-xxs) * 1.2)}.loading-error-info.sc-ic-menu{display:flex}.check-icon.sc-ic-menu{height:var(--ic-space-lg);min-width:var(--ic-space-lg);width:var(--ic-space-lg);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.option-group-title.sc-ic-menu{padding:var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);--ic-typography-color:var(--ic-menu-option-group-label-text-color)}.ic-menu-small.sc-ic-menu-h .option-group-title.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs)}.last-recommended-option.sc-ic-menu{border-bottom:var(--ic-menu-last-recommended-option-border)}.disabled-option.sc-ic-menu{color:var(--ic-atoms-list-option-text-disabled-light);--ic-typography-color:var(--ic-atoms-list-option-text-disabled-light);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-color-focus-inner) !important;color:var(--ic-atoms-list-option-text-focused-light) !important;--ic-typography-color:var(\n --ic-atoms-list-option-text-focused-light\n ) !important}.no-results.sc-ic-menu-h li.sc-ic-menu{cursor:no-drop}.no-results.sc-ic-menu-h li.sc-ic-menu:hover{background-color:transparent}.option-bar.sc-ic-menu{padding:var(--ic-space-xxs) var(--ic-space-xs);display:flex;align-items:center;justify-content:space-between;background-color:var(--ic-menu-option-bar-background-color);visibility:hidden;border-bottom:var(--ic-border-width) solid\n var(--ic-menu-option-bar-divider-color);border-radius:1px 1px 0 0}.option-bar.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.ic-menu-large.sc-ic-menu-h .option-bar.sc-ic-menu{padding:var(--ic-space-xs)}.select-all-button.sc-ic-menu{display:none}.select-all-button.sc-ic-menu:focus{z-index:calc(var(--ic-z-index-menu) + 1)}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}.disabled-option.sc-ic-menu{color:GrayText;--ic-typography-color:GrayText}}";
10
1386
  const IcMenuStyle0 = icMenuCss;
11
1387
 
12
1388
  const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
@@ -740,7 +2116,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
740
2116
  return (h(Fragment, null, option.loading && h("ic-loading-indicator", { size: "icon" }), h("div", { class: {
741
2117
  "option-text-container": true,
742
2118
  "show-check-icon": showCheckIcon,
743
- } }, h("div", { class: "option-label" }, option.icon && (h("div", { class: "option-icon", innerHTML: option.icon, "aria-hidden": "true" })), h("ic-typography", { variant: "body", "aria-hidden": "true" }, option[this.labelField])), option.description && (h("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, h("p", null, option.description))), option.element && (h("div", { class: "option-element", innerHTML: option.element.component, "aria-hidden": "true" }))), showCheckIcon && h("span", { class: "check-icon", innerHTML: checkIcon })));
2119
+ } }, h("div", { class: "option-label" }, option.icon && (h("div", { class: "option-icon", innerHTML: sanitizeHTMLIconString(option.icon), "aria-hidden": "true" })), h("ic-typography", { variant: "body", "aria-hidden": "true" }, option[this.labelField])), option.description && (h("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, h("p", null, option.description))), option.element && (h("div", { class: "option-element", innerHTML: sanitizeHTMLString(option.element.component), "aria-hidden": "true" }))), showCheckIcon && h("span", { class: "check-icon", innerHTML: checkIcon })));
744
2120
  };
745
2121
  this.displayOption = (option, selected, index, parentOption) => {
746
2122
  const { open, keyboardNav, isManualMode, initialOptionsListRender, optionHighlighted, options, } = this;
@@ -762,7 +2138,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
762
2138
  ? "0"
763
2139
  : "-1", "aria-label": this.getOptionAriaLabel(option, parentOption), "aria-selected": selected ? "true" : "false", "aria-disabled": option.disabled ? "true" : "false", onClick: !option.timedOut && !option.loading
764
2140
  ? this.handleOptionClick
765
- : undefined, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, "data-value": option[this.valueField], "data-label": option[this.labelField] }, option.timedOut ? (h(Fragment, null, h("div", { class: "loading-error-info" }, h("svg", { class: "error-icon-svg", "aria-labelledby": "error-title", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#000000" }, h("title", { id: "error-title" }, "Error"), h("g", { id: "close-octagon" }, h("path", { id: "Vector", d: "M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" }))), h("ic-typography", { variant: "label" }, option[this.labelField])), h("ic-button", { size: "small", variant: "tertiary", onClick: this.handleRetry, onKeyDown: this.handleRetryKeyDown, onBlur: this.handleTimeoutBlur, id: "retry-button" }, "Retry"))) : (this.optionContent(option, selected))));
2141
+ : undefined, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, "data-value": option[this.valueField], "data-label": option[this.labelField] }, option.timedOut ? (h(Fragment, null, h("div", { class: "loading-error-info" }, h("svg", { class: "error-icon-svg", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#000000" }, h("title", null, "Error"), h("g", null, h("path", { d: "M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" }))), h("ic-typography", { variant: "label" }, option[this.labelField])), h("ic-button", { size: "small", variant: "tertiary", onClick: this.handleRetry, onKeyDown: this.handleRetryKeyDown, onBlur: this.handleTimeoutBlur, id: "retry-button" }, "Retry"))) : (this.optionContent(option, selected))));
766
2142
  };
767
2143
  }
768
2144
  watchOpenHandler() {
@@ -929,7 +2305,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
929
2305
  const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, parentEl, SEARCH_BAR_TAG, multiSelect, } = this;
930
2306
  const selectAllButtonText = `${(value === null || value === void 0 ? void 0 : value.length) === this.ungroupedOptions.length ? "Clear" : "Select"} all`;
931
2307
  const hasNoResults = this.host.classList.contains("no-results");
932
- return (h(Host, { key: '61aef706407716bbd85f087d6baeac4e393f5bb5', class: {
2308
+ return (h(Host, { key: 'e17a70bcf59709dd5b9d0cc7b404520ff06bcf35', class: {
933
2309
  "ic-menu-full-width": !!fullWidth,
934
2310
  "ic-menu-no-focus": ((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === "INPUT" &&
935
2311
  (parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) !== SEARCH_BAR_TAG) ||
@@ -938,7 +2314,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
938
2314
  [`ic-menu-${size}`]: true,
939
2315
  "ic-menu-open": open && options.length !== 0,
940
2316
  "ic-menu-multiple": multiSelect,
941
- } }, options.length !== 0 && (h("ul", { key: '5800fadeb848cfad908cdbd2bb7bfd7ecba08811', id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": multiSelect ? "true" : "false", tabindex: open &&
2317
+ } }, options.length !== 0 && (h("ul", { key: '438cd6126c1296a14e216edc0a5d790a4705b143', id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": multiSelect ? "true" : "false", tabindex: open &&
942
2318
  !keyboardNav &&
943
2319
  ((inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== "INPUT" ||
944
2320
  (parentEl === null || parentEl === void 0 ? void 0 : parentEl.tagName) === SEARCH_BAR_TAG)
@@ -966,7 +2342,7 @@ const Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {
966
2342
  multiSelect &&
967
2343
  !isLoading &&
968
2344
  !hasTimedOut &&
969
- !hasNoResults && (h("div", { key: '3036b8e8b5727e354d45e9ae4a64a5e61b0caf59', class: "option-bar" }, h("ic-typography", { key: 'a797367880dd2a45638c65dcb353e6b4892e5db0' }, h("p", { key: 'ba309efe02198f93aa62329cf99d05e2e538434d' }, `${value ? value.length : 0}/${getOptionsWithoutGroupTitlesCount(this.options)} selected`)), h("ic-button", { key: '785eba9a6e82e745c7f4ccb054a1fbaf87df281e', class: "select-all-button", "aria-label": `${selectAllButtonText} options for ${inputLabel}`, ref: (el) => (this.selectAllButton = el), variant: "tertiary", onClick: this.handleSelectAllClick, onMouseDown: this.handleSelectAllMouseDown, onBlur: this.handleSelectAllBlur, onFocus: this.handleSelectAllFocus, size: size === "small" ? "small" : "medium" }, selectAllButtonText)))));
2345
+ !hasNoResults && (h("div", { key: '5732c5ac4fa70ff249a7851d61aee8ccf46082d1', class: "option-bar" }, h("ic-typography", { key: '48ce8543a189cad706804715a077575b3774e490' }, h("p", { key: '63537752e580815f650c3d9bbf38b23267c5229c' }, `${value ? value.length : 0}/${getOptionsWithoutGroupTitlesCount(this.options)} selected`)), h("ic-button", { key: '60c446e5303a3939494284b9ce7772feb1fe547c', class: "select-all-button", "aria-label": `${selectAllButtonText} options for ${inputLabel}`, ref: (el) => (this.selectAllButton = el), variant: "tertiary", onClick: this.handleSelectAllClick, onMouseDown: this.handleSelectAllMouseDown, onBlur: this.handleSelectAllBlur, onFocus: this.handleSelectAllFocus, size: size === "small" ? "small" : "medium" }, selectAllButtonText)))));
970
2346
  }
971
2347
  get host() { return this; }
972
2348
  static get watchers() { return {