@baloise/ds-core 18.2.0 → 18.3.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 (560) hide show
  1. package/components/bal-accordion-trigger.js +67 -29
  2. package/components/bal-app.js +2 -2
  3. package/components/bal-badge2.js +1 -1
  4. package/components/bal-button-group2.js +2 -2
  5. package/components/bal-card-actions.js +1 -1
  6. package/components/bal-card-button.js +1 -1
  7. package/components/bal-card-content2.js +1 -1
  8. package/components/bal-card-subtitle.js +1 -1
  9. package/components/bal-card-title.js +1 -1
  10. package/components/bal-card2.js +2 -2
  11. package/components/bal-carousel.js +1 -1
  12. package/components/bal-checkbox-button.js +1 -1
  13. package/components/bal-checkbox2.js +1 -1
  14. package/components/bal-close2.js +1 -1
  15. package/components/bal-content2.js +1 -1
  16. package/components/bal-data-item.js +1 -1
  17. package/components/bal-data-label.js +1 -1
  18. package/components/bal-data-value.js +1 -1
  19. package/components/bal-data.js +1 -1
  20. package/components/bal-date-calendar-cell2.js +1 -1
  21. package/components/bal-date-calendar2.js +1 -1
  22. package/components/bal-date.js +1 -1
  23. package/components/bal-divider.js +1 -1
  24. package/components/bal-dropdown.js +2 -2
  25. package/components/bal-field-control.js +2 -2
  26. package/components/bal-field-hint.js +1 -1
  27. package/components/bal-field-label.js +1 -1
  28. package/components/bal-field-message.js +2 -2
  29. package/components/bal-field.js +2 -2
  30. package/components/bal-file-upload.js +4 -4
  31. package/components/bal-footer.js +3 -3
  32. package/components/bal-form-col.js +2 -2
  33. package/components/bal-form-grid.js +1 -1
  34. package/components/bal-form.js +1 -1
  35. package/components/bal-heading2.js +1 -1
  36. package/components/bal-hint-text2.js +1 -1
  37. package/components/bal-hint-title2.js +1 -1
  38. package/components/bal-icon2.js +1692 -311
  39. package/components/bal-input-date2.js +2 -2
  40. package/components/bal-input-group2.js +1 -1
  41. package/components/bal-input-slider.js +3 -3
  42. package/components/bal-input-stepper.js +3 -3
  43. package/components/bal-input.js +1 -1
  44. package/components/bal-label2.js +1 -1
  45. package/components/bal-list-item-content2.js +2 -2
  46. package/components/bal-list-item-icon2.js +2 -2
  47. package/components/bal-list-item-subtitle2.js +1 -1
  48. package/components/bal-list-item-title2.js +1 -1
  49. package/components/bal-list2.js +1 -1
  50. package/components/bal-modal-body.js +1 -1
  51. package/components/bal-modal-header.js +1 -1
  52. package/components/bal-modal.js +5 -5
  53. package/components/bal-nav-link-grid-col2.js +1 -1
  54. package/components/bal-nav-link-grid2.js +1 -1
  55. package/components/bal-nav-link-group.js +1 -1
  56. package/components/bal-nav-link2.js +2 -2
  57. package/components/bal-nav-menu-bar2.js +1 -1
  58. package/components/bal-nav-menu-flyout2.js +1 -1
  59. package/components/bal-nav-meta-bar2.js +1 -1
  60. package/components/bal-nav.js +2 -2
  61. package/components/bal-navbar-brand.js +1 -1
  62. package/components/bal-navbar-menu-end.js +1 -1
  63. package/components/bal-navbar-menu-start.js +1 -1
  64. package/components/bal-navbar-menu.js +1 -1
  65. package/components/bal-navbar.js +1 -1
  66. package/components/bal-notices.js +1 -1
  67. package/components/bal-notification.js +1 -1
  68. package/components/bal-number-input.js +1 -1
  69. package/components/bal-option-list.js +1 -1
  70. package/components/bal-option.js +1 -1
  71. package/components/bal-pagination.js +4 -4
  72. package/components/bal-popover-content2.js +1 -1
  73. package/components/bal-popup.js +1 -1
  74. package/components/bal-progress-bar.js +1 -1
  75. package/components/bal-radio-button.js +1 -1
  76. package/components/bal-radio2.js +1 -1
  77. package/components/bal-segment-item.js +1 -1
  78. package/components/bal-segment.js +1 -1
  79. package/components/bal-select-option2.js +1 -1
  80. package/components/bal-select2.js +5 -5
  81. package/components/bal-shape2.js +4 -4
  82. package/components/bal-sheet.js +1 -1
  83. package/components/bal-snackbar.js +1 -1
  84. package/components/bal-spinner2.js +1 -1
  85. package/components/bal-stack2.js +1 -1
  86. package/components/bal-stage-back-link.js +2 -2
  87. package/components/bal-stage-body.js +1 -1
  88. package/components/bal-stage-foot.js +1 -1
  89. package/components/bal-stage-head.js +1 -1
  90. package/components/bal-stage-image.js +1 -1
  91. package/components/bal-stage.js +1 -1
  92. package/components/bal-step-item.js +2 -2
  93. package/components/bal-tab-item.js +2 -2
  94. package/components/bal-table.js +1 -1
  95. package/components/bal-tabs2.js +2 -2
  96. package/components/bal-tag-group.js +1 -1
  97. package/components/bal-tag2.js +1 -1
  98. package/components/bal-text2.js +2 -2
  99. package/components/bal-textarea.js +1 -1
  100. package/components/bal-time-input.js +1 -1
  101. package/components/bal-toast.js +1 -1
  102. package/components/bal-tooltip.js +1 -1
  103. package/components/index.js +1 -1
  104. package/components/tokens.esm.js +1 -1
  105. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  106. package/dist/baloise-design-system/index.esm.js +1 -1
  107. package/dist/baloise-design-system/{p-c22c22090f.system.entry.js → p-00e75d0c35.system.entry.js} +1 -1
  108. package/dist/baloise-design-system/{p-c9cbfd5a61.entry.js → p-038c618cc5.entry.js} +1 -1
  109. package/dist/baloise-design-system/{p-0b851cd59c.system.entry.js → p-0aeaf649aa.system.entry.js} +1 -1
  110. package/dist/baloise-design-system/{p-187e7da1ed.entry.js → p-0f9d3cbaaf.entry.js} +1 -1
  111. package/dist/baloise-design-system/{p-b46a35c33c.system.entry.js → p-108886df74.system.entry.js} +1 -1
  112. package/dist/baloise-design-system/{p-cb0d5c384b.system.entry.js → p-11447dc62e.system.entry.js} +1 -1
  113. package/dist/baloise-design-system/{p-fb87f31739.system.entry.js → p-13d1a22814.system.entry.js} +1 -1
  114. package/dist/baloise-design-system/{p-fe6d53dfdf.system.entry.js → p-14901b6156.system.entry.js} +1 -1
  115. package/dist/baloise-design-system/{p-c4aabcc6bc.system.entry.js → p-152b86b426.system.entry.js} +1 -1
  116. package/dist/baloise-design-system/{p-7c074055e7.system.entry.js → p-1812c4e712.system.entry.js} +1 -1
  117. package/dist/baloise-design-system/{p-a7b46eaa9f.system.entry.js → p-190cd62ab2.system.entry.js} +1 -1
  118. package/dist/baloise-design-system/{p-225aca33c2.entry.js → p-1ba2dc4b48.entry.js} +1 -1
  119. package/dist/baloise-design-system/p-1d482bc569.entry.js +1 -0
  120. package/dist/baloise-design-system/{p-a0737d5595.entry.js → p-1d78f65898.entry.js} +1 -1
  121. package/dist/baloise-design-system/{p-e0a3b80c8c.system.entry.js → p-24898ae0b6.system.entry.js} +1 -1
  122. package/dist/baloise-design-system/{p-4c695be0.system.js → p-25617878.system.js} +1 -1
  123. package/dist/baloise-design-system/{p-5c31de6847.system.entry.js → p-259e90ef2b.system.entry.js} +1 -1
  124. package/dist/baloise-design-system/{p-36a4ecfe.system.js → p-2697b3c0.system.js} +1 -1
  125. package/dist/baloise-design-system/{p-ea8491b628.entry.js → p-277384b233.entry.js} +1 -1
  126. package/dist/baloise-design-system/{p-221c096477.entry.js → p-28fbcf6fc9.entry.js} +1 -1
  127. package/dist/baloise-design-system/{p-f2234a5a71.entry.js → p-29908af0fd.entry.js} +1 -1
  128. package/dist/baloise-design-system/{p-04a8a75fb8.entry.js → p-2e7c157f61.entry.js} +1 -1
  129. package/dist/baloise-design-system/{p-5c7352eada.entry.js → p-3113f8a2a0.entry.js} +1 -1
  130. package/dist/baloise-design-system/{p-8d49461b8f.entry.js → p-32322fa69a.entry.js} +1 -1
  131. package/dist/baloise-design-system/p-345aa92d.system.js +1 -1
  132. package/dist/baloise-design-system/{p-9276f29a07.entry.js → p-34caa16d21.entry.js} +1 -1
  133. package/dist/baloise-design-system/{p-421a77b6c1.system.entry.js → p-38a74d2653.system.entry.js} +1 -1
  134. package/dist/baloise-design-system/p-3913c6ae.js +1 -1
  135. package/dist/baloise-design-system/{p-b4b88e4c03.system.entry.js → p-3928a3ae1f.system.entry.js} +1 -1
  136. package/dist/baloise-design-system/{p-4d857d11b6.system.entry.js → p-3a022b8d82.system.entry.js} +1 -1
  137. package/dist/baloise-design-system/{p-ebecd76c66.system.entry.js → p-3c02768646.system.entry.js} +1 -1
  138. package/dist/baloise-design-system/{p-7ddbde5c84.entry.js → p-3f3ebc8590.entry.js} +1 -1
  139. package/dist/baloise-design-system/p-3f6d4b4d69.entry.js +1 -0
  140. package/dist/baloise-design-system/{p-448d3298a1.entry.js → p-3f86c5d396.entry.js} +1 -1
  141. package/dist/baloise-design-system/{p-fb4f6a95a6.entry.js → p-40977d8619.entry.js} +1 -1
  142. package/dist/baloise-design-system/p-42e06975cf.system.entry.js +2 -0
  143. package/dist/baloise-design-system/{p-4c9ac6263c.entry.js → p-470ce384f4.entry.js} +1 -1
  144. package/dist/baloise-design-system/{p-9a00ac7fc8.system.entry.js → p-471441221c.system.entry.js} +1 -1
  145. package/dist/baloise-design-system/{p-327cd52735.entry.js → p-47d8602fd8.entry.js} +1 -1
  146. package/dist/baloise-design-system/{p-7496834468.system.entry.js → p-4915eb7e22.system.entry.js} +1 -1
  147. package/dist/baloise-design-system/p-4a2f22bde2.entry.js +1 -0
  148. package/dist/baloise-design-system/{p-774cad80b8.entry.js → p-4d4dd885fc.entry.js} +1 -1
  149. package/dist/baloise-design-system/p-50084ba924.entry.js +1 -0
  150. package/dist/baloise-design-system/{p-1288c2ed8a.entry.js → p-50e3e41042.entry.js} +1 -1
  151. package/dist/baloise-design-system/{p-607d361ba3.system.entry.js → p-513711e292.system.entry.js} +1 -1
  152. package/dist/baloise-design-system/{p-b51a692e99.entry.js → p-5218b32665.entry.js} +1 -1
  153. package/dist/baloise-design-system/{p-4155b8f059.system.entry.js → p-52a97b97f8.system.entry.js} +1 -1
  154. package/dist/baloise-design-system/{p-253668db69.entry.js → p-57b6f2900e.entry.js} +1 -1
  155. package/dist/baloise-design-system/p-58c4ff0652.entry.js +1 -0
  156. package/dist/baloise-design-system/{p-908a7c5cfd.system.entry.js → p-5d84d62ded.system.entry.js} +1 -1
  157. package/dist/baloise-design-system/{p-0ad80f603a.entry.js → p-60c0470d4a.entry.js} +1 -1
  158. package/dist/baloise-design-system/{p-4857a7ee.js → p-60c0b0fb.js} +1 -1
  159. package/dist/baloise-design-system/{p-4bc159376b.system.entry.js → p-61f268e54c.system.entry.js} +1 -1
  160. package/dist/baloise-design-system/{p-0e506e98e2.system.entry.js → p-63297f8b3b.system.entry.js} +1 -1
  161. package/dist/baloise-design-system/{p-afabc522e1.entry.js → p-63a1bc9737.entry.js} +1 -1
  162. package/dist/baloise-design-system/p-659ecadc.system.js +1 -1
  163. package/dist/baloise-design-system/{p-8723e490bf.system.entry.js → p-68a9ea13a0.system.entry.js} +1 -1
  164. package/dist/baloise-design-system/{p-9ed80c87cf.entry.js → p-68bcae4459.entry.js} +1 -1
  165. package/dist/baloise-design-system/{p-191459a962.entry.js → p-69ceb45b58.entry.js} +1 -1
  166. package/dist/baloise-design-system/{p-bfb6c67686.entry.js → p-6ce02b4115.entry.js} +1 -1
  167. package/dist/baloise-design-system/{p-864cf36d45.system.entry.js → p-712e5c9739.system.entry.js} +1 -1
  168. package/dist/baloise-design-system/{p-a8a62f0a85.system.entry.js → p-72a3289f25.system.entry.js} +1 -1
  169. package/dist/baloise-design-system/p-7467605b28.entry.js +1 -0
  170. package/dist/baloise-design-system/{p-eeb954c6bc.system.entry.js → p-74cf083d69.system.entry.js} +1 -1
  171. package/dist/baloise-design-system/{p-4e7c82ad7e.system.entry.js → p-7a3ec63587.system.entry.js} +1 -1
  172. package/dist/baloise-design-system/{p-dce0104d78.system.entry.js → p-7f87eea164.system.entry.js} +1 -1
  173. package/dist/baloise-design-system/{p-cca78c7a8e.entry.js → p-82c5915caf.entry.js} +1 -1
  174. package/dist/baloise-design-system/p-84fb413164.entry.js +1 -0
  175. package/dist/baloise-design-system/{p-808cc1fd05.entry.js → p-86997be9b6.entry.js} +1 -1
  176. package/dist/baloise-design-system/{p-5d9f23045a.system.entry.js → p-8839179d19.system.entry.js} +1 -1
  177. package/dist/baloise-design-system/{p-0242cdf474.entry.js → p-89d4432ac2.entry.js} +1 -1
  178. package/dist/baloise-design-system/{p-3ae755102b.system.entry.js → p-8ffd1803be.system.entry.js} +1 -1
  179. package/dist/baloise-design-system/{p-dcb77164fc.system.entry.js → p-9070cf534c.system.entry.js} +1 -1
  180. package/dist/baloise-design-system/p-90a7f09c63.entry.js +1 -0
  181. package/dist/baloise-design-system/{p-e3c51dd5ce.system.entry.js → p-91a7fe0fc1.system.entry.js} +1 -1
  182. package/dist/baloise-design-system/{p-7162e44f.system.js → p-934c6104.system.js} +1 -1
  183. package/dist/baloise-design-system/{p-0724c5fc39.entry.js → p-96876b3902.entry.js} +1 -1
  184. package/dist/baloise-design-system/{p-894409314e.system.entry.js → p-97ca986ad0.system.entry.js} +1 -1
  185. package/dist/baloise-design-system/{p-e6196821f7.system.entry.js → p-9b78ab02f8.system.entry.js} +1 -1
  186. package/dist/baloise-design-system/{p-676d07ed2e.system.entry.js → p-9ca539a218.system.entry.js} +1 -1
  187. package/dist/baloise-design-system/{p-3bcfc7b117.system.entry.js → p-9da6a64729.system.entry.js} +1 -1
  188. package/dist/baloise-design-system/{p-1b7a378e4b.system.entry.js → p-9ee4bb3be6.system.entry.js} +1 -1
  189. package/dist/baloise-design-system/p-9effa7fc0c.system.entry.js +1 -0
  190. package/dist/baloise-design-system/{p-d4996fd889.system.entry.js → p-a01e0d6335.system.entry.js} +1 -1
  191. package/dist/baloise-design-system/{p-08ba87f822.entry.js → p-a13164e512.entry.js} +1 -1
  192. package/dist/baloise-design-system/p-a1d4fd7a40.entry.js +2 -0
  193. package/dist/baloise-design-system/{p-27d9d109b4.entry.js → p-a2dff75011.entry.js} +1 -1
  194. package/dist/baloise-design-system/{p-40d5ef4e.system.js → p-a2ea159e.system.js} +1 -1
  195. package/dist/baloise-design-system/{p-15f77798ad.entry.js → p-a3cb7f216f.entry.js} +1 -1
  196. package/dist/baloise-design-system/{p-5429e0223f.system.entry.js → p-a779279aae.system.entry.js} +1 -1
  197. package/dist/baloise-design-system/{p-1b31484d81.entry.js → p-a8b8e39162.entry.js} +1 -1
  198. package/dist/baloise-design-system/{p-3c447e2884.entry.js → p-a8f4c51f7d.entry.js} +1 -1
  199. package/dist/baloise-design-system/{p-eaf6fe83b7.entry.js → p-a9cd77d64b.entry.js} +1 -1
  200. package/dist/baloise-design-system/{p-4b22207353.system.entry.js → p-ac2d4c2c2b.system.entry.js} +1 -1
  201. package/dist/baloise-design-system/{p-c9c007a260.entry.js → p-ac4e801e21.entry.js} +1 -1
  202. package/dist/baloise-design-system/{p-a2f19988.js → p-ade97788.js} +1 -1
  203. package/dist/baloise-design-system/p-aebe807c86.entry.js +1 -0
  204. package/dist/baloise-design-system/{p-e6d0ea6084.entry.js → p-b21ea8fd1f.entry.js} +1 -1
  205. package/dist/baloise-design-system/{p-9b9a37274f.system.entry.js → p-b4b81faccc.system.entry.js} +1 -1
  206. package/dist/baloise-design-system/{p-1f0ddd16a2.system.entry.js → p-b5e8f8c5b5.system.entry.js} +1 -1
  207. package/dist/baloise-design-system/p-b75d2a74cd.system.entry.js +1 -0
  208. package/dist/baloise-design-system/{p-5f3e40e522.system.entry.js → p-ba40faa1d5.system.entry.js} +1 -1
  209. package/dist/baloise-design-system/{p-447bb8d6ce.entry.js → p-bd4f20f9ed.entry.js} +1 -1
  210. package/dist/baloise-design-system/{p-2568bb635f.entry.js → p-c0c4b24075.entry.js} +1 -1
  211. package/dist/baloise-design-system/{p-702d0efef4.entry.js → p-c1a3776980.entry.js} +1 -1
  212. package/dist/baloise-design-system/p-c2c574cb.js +1 -0
  213. package/dist/baloise-design-system/{p-29709a5fee.system.entry.js → p-c4320b3a46.system.entry.js} +1 -1
  214. package/dist/baloise-design-system/{p-1d09b5700d.system.entry.js → p-c72db97c1c.system.entry.js} +1 -1
  215. package/dist/baloise-design-system/p-c7cf7b2c6d.entry.js +1 -0
  216. package/dist/baloise-design-system/{p-eeb7176703.system.entry.js → p-c7e205efa7.system.entry.js} +1 -1
  217. package/dist/baloise-design-system/{p-9c204d3ac7.entry.js → p-ca80a03f51.entry.js} +1 -1
  218. package/dist/baloise-design-system/{p-1fd9b1f748.system.entry.js → p-cce29204c3.system.entry.js} +1 -1
  219. package/dist/baloise-design-system/{p-53093cf5c3.system.entry.js → p-cd8072c189.system.entry.js} +1 -1
  220. package/dist/baloise-design-system/{p-3114657eb7.system.entry.js → p-cec9dcd5f0.system.entry.js} +1 -1
  221. package/dist/baloise-design-system/{p-380ca15c13.system.entry.js → p-d49d8917c3.system.entry.js} +1 -1
  222. package/dist/baloise-design-system/{p-778ff1954d.system.entry.js → p-d4f12ff22c.system.entry.js} +1 -1
  223. package/dist/baloise-design-system/{p-ba23bf69be.system.entry.js → p-dc18c95e40.system.entry.js} +1 -1
  224. package/dist/baloise-design-system/{p-56021799ec.entry.js → p-e50a9800ba.entry.js} +1 -1
  225. package/dist/baloise-design-system/{p-7bf3e88ae4.entry.js → p-e6646714bb.entry.js} +1 -1
  226. package/dist/baloise-design-system/{p-b7ea548704.system.entry.js → p-e85c10c09b.system.entry.js} +1 -1
  227. package/dist/baloise-design-system/{p-6e37071912.entry.js → p-eedc7103b3.entry.js} +1 -1
  228. package/dist/baloise-design-system/{p-a0d0cd2901.entry.js → p-ef911c2b87.entry.js} +1 -1
  229. package/dist/baloise-design-system/{p-3a0896c8a9.entry.js → p-f1186421ec.entry.js} +1 -1
  230. package/dist/baloise-design-system/{p-a5c70dd2dd.system.entry.js → p-f863ef794a.system.entry.js} +1 -1
  231. package/dist/baloise-design-system/{p-7b7968e8d3.system.entry.js → p-fb95929111.system.entry.js} +1 -1
  232. package/dist/baloise-design-system/{p-93906ca075.entry.js → p-fed37bccaa.entry.js} +1 -1
  233. package/dist/cjs/bal-accordion_4.cjs.entry.js +62 -27
  234. package/dist/cjs/bal-app.cjs.entry.js +2 -2
  235. package/dist/cjs/bal-badge.cjs.entry.js +1 -1
  236. package/dist/cjs/bal-button_2.cjs.entry.js +2 -2
  237. package/dist/cjs/bal-card_6.cjs.entry.js +7 -7
  238. package/dist/cjs/bal-carousel_2.cjs.entry.js +4 -4
  239. package/dist/cjs/bal-checkbox-button.cjs.entry.js +1 -1
  240. package/dist/cjs/bal-checkbox_2.cjs.entry.js +1 -1
  241. package/dist/cjs/bal-close.cjs.entry.js +1 -1
  242. package/dist/cjs/bal-content.cjs.entry.js +1 -1
  243. package/dist/cjs/bal-data_4.cjs.entry.js +4 -4
  244. package/dist/cjs/bal-date-calendar-cell.cjs.entry.js +1 -1
  245. package/dist/cjs/bal-date-calendar_2.cjs.entry.js +3 -3
  246. package/dist/cjs/bal-date.cjs.entry.js +1 -1
  247. package/dist/cjs/bal-divider.cjs.entry.js +1 -1
  248. package/dist/cjs/bal-dropdown.cjs.entry.js +2 -2
  249. package/dist/cjs/bal-field_5.cjs.entry.js +8 -8
  250. package/dist/cjs/bal-file-upload.cjs.entry.js +4 -4
  251. package/dist/cjs/bal-footer.cjs.entry.js +3 -3
  252. package/dist/cjs/bal-form-col_2.cjs.entry.js +3 -3
  253. package/dist/cjs/bal-form.cjs.entry.js +1 -1
  254. package/dist/cjs/bal-heading_2.cjs.entry.js +3 -3
  255. package/dist/cjs/bal-hint_5.cjs.entry.js +6 -6
  256. package/dist/cjs/bal-icon.cjs.entry.js +1684 -311
  257. package/dist/cjs/bal-input-group.cjs.entry.js +1 -1
  258. package/dist/cjs/bal-input-slider.cjs.entry.js +3 -3
  259. package/dist/cjs/bal-input-stepper.cjs.entry.js +3 -3
  260. package/dist/cjs/bal-input.cjs.entry.js +1 -1
  261. package/dist/cjs/bal-label.cjs.entry.js +1 -1
  262. package/dist/cjs/bal-list_8.cjs.entry.js +10 -10
  263. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  264. package/dist/cjs/bal-modal_3.cjs.entry.js +7 -7
  265. package/dist/cjs/bal-nav_8.cjs.entry.js +13 -13
  266. package/dist/cjs/bal-navbar_5.cjs.entry.js +8 -8
  267. package/dist/cjs/bal-notices_3.cjs.entry.js +3 -3
  268. package/dist/cjs/bal-notification.cjs.entry.js +1 -1
  269. package/dist/cjs/bal-number-input.cjs.entry.js +1 -1
  270. package/dist/cjs/bal-option_2.cjs.entry.js +2 -2
  271. package/dist/cjs/bal-pagination.cjs.entry.js +7 -7
  272. package/dist/cjs/bal-popup.cjs.entry.js +1 -1
  273. package/dist/cjs/bal-progress-bar.cjs.entry.js +5 -5
  274. package/dist/cjs/bal-radio-button.cjs.entry.js +1 -1
  275. package/dist/cjs/bal-radio_2.cjs.entry.js +1 -1
  276. package/dist/cjs/bal-segment_2.cjs.entry.js +6 -6
  277. package/dist/cjs/bal-select_2.cjs.entry.js +6 -6
  278. package/dist/cjs/bal-shape.cjs.entry.js +5 -5
  279. package/dist/cjs/bal-sheet.cjs.entry.js +1 -1
  280. package/dist/cjs/bal-spinner.cjs.entry.js +1 -1
  281. package/dist/cjs/bal-stack.cjs.entry.js +1 -1
  282. package/dist/cjs/bal-stage_6.cjs.entry.js +7 -7
  283. package/dist/cjs/bal-step-item.cjs.entry.js +2 -2
  284. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  285. package/dist/cjs/bal-tab-item_2.cjs.entry.js +7 -7
  286. package/dist/cjs/bal-table.cjs.entry.js +1 -1
  287. package/dist/cjs/bal-tag_2.cjs.entry.js +2 -2
  288. package/dist/cjs/bal-textarea.cjs.entry.js +1 -1
  289. package/dist/cjs/bal-time-input.cjs.entry.js +1 -1
  290. package/dist/cjs/bal-tooltip.cjs.entry.js +1 -1
  291. package/dist/cjs/baloise-design-system.cjs.js +1 -1
  292. package/dist/cjs/{breakpoints.decorator-90762be4.js → breakpoints.decorator-a75a8dbc.js} +1 -1
  293. package/dist/cjs/{breakpoints.subject-7ee9fb88.js → breakpoints.subject-99007fbd.js} +1 -1
  294. package/dist/cjs/index.cjs.js +2 -2
  295. package/dist/cjs/initialize-2e8978a4.js +1 -1
  296. package/dist/cjs/loader.cjs.js +1 -1
  297. package/dist/cjs/{tokens.esm-aa5d038b.js → tokens.esm-836b8c42.js} +1 -1
  298. package/dist/cjs/{window-resize.decorator-30d9f5ca.js → window-resize.decorator-dd0ecc12.js} +1 -1
  299. package/dist/collection/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.css +1 -1
  300. package/dist/collection/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.js +77 -12
  301. package/dist/collection/components/bal-accordion/bal-accordion.i18n.js +20 -20
  302. package/dist/collection/components/bal-app/bal-app.js +2 -2
  303. package/dist/collection/components/bal-badge/bal-badge.js +1 -1
  304. package/dist/collection/components/bal-button/bal-button-group/bal-button-group.js +2 -2
  305. package/dist/collection/components/bal-card/bal-card-actions/bal-card-actions.js +1 -1
  306. package/dist/collection/components/bal-card/bal-card-button/bal-card-button.js +1 -1
  307. package/dist/collection/components/bal-card/bal-card-content/bal-card-content.js +1 -1
  308. package/dist/collection/components/bal-card/bal-card-subtitle/bal-card-subtitle.js +1 -1
  309. package/dist/collection/components/bal-card/bal-card-title/bal-card-title.js +1 -1
  310. package/dist/collection/components/bal-card/bal-card.js +2 -2
  311. package/dist/collection/components/bal-carousel/bal-carousel.js +1 -1
  312. package/dist/collection/components/bal-checkbox/bal-checkbox-button/bal-checkbox-button.js +1 -1
  313. package/dist/collection/components/bal-checkbox/bal-checkbox.js +1 -1
  314. package/dist/collection/components/bal-close/bal-close.js +1 -1
  315. package/dist/collection/components/bal-content/bal-content.js +1 -1
  316. package/dist/collection/components/bal-data/bal-data-item/bal-data-item.js +1 -1
  317. package/dist/collection/components/bal-data/bal-data-label/bal-data-label.js +1 -1
  318. package/dist/collection/components/bal-data/bal-data-value/bal-data-value.js +1 -1
  319. package/dist/collection/components/bal-data/bal-data.js +1 -1
  320. package/dist/collection/components/bal-date/bal-date-calendar/bal-date-calendar.js +1 -1
  321. package/dist/collection/components/bal-date/bal-date-calendar-cell/bal-date-calendar-cell.js +1 -1
  322. package/dist/collection/components/bal-date/bal-date.js +1 -1
  323. package/dist/collection/components/bal-divider/bal-divider.js +1 -1
  324. package/dist/collection/components/bal-dropdown/bal-dropdown.js +2 -2
  325. package/dist/collection/components/bal-field/bal-field-control/bal-field-control.js +2 -2
  326. package/dist/collection/components/bal-field/bal-field-hint/bal-field-hint.js +1 -1
  327. package/dist/collection/components/bal-field/bal-field-label/bal-field-label.js +1 -1
  328. package/dist/collection/components/bal-field/bal-field-message/bal-field-message.js +2 -2
  329. package/dist/collection/components/bal-field/bal-field.js +2 -2
  330. package/dist/collection/components/bal-file-upload/bal-file-upload.js +4 -4
  331. package/dist/collection/components/bal-footer/bal-footer.js +3 -3
  332. package/dist/collection/components/bal-form/bal-form.js +1 -1
  333. package/dist/collection/components/bal-form-grid/bal-form-col/bal-form-col.js +2 -2
  334. package/dist/collection/components/bal-form-grid/bal-form-grid.js +1 -1
  335. package/dist/collection/components/bal-heading/bal-heading.js +1 -1
  336. package/dist/collection/components/bal-hint/bal-hint-text/bal-hint-text.js +1 -1
  337. package/dist/collection/components/bal-hint/bal-hint-title/bal-hint-title.js +1 -1
  338. package/dist/collection/components/bal-icon/bal-icon.css +1 -1
  339. package/dist/collection/components/bal-icon/bal-icon.js +85 -8
  340. package/dist/collection/components/bal-input/bal-input-date/bal-input-date.js +2 -2
  341. package/dist/collection/components/bal-input/bal-input.js +1 -1
  342. package/dist/collection/components/bal-input-group/bal-input-group.js +1 -1
  343. package/dist/collection/components/bal-input-slider/bal-input-slider.js +3 -3
  344. package/dist/collection/components/bal-input-stepper/bal-input-stepper.js +3 -3
  345. package/dist/collection/components/bal-label/bal-label.js +1 -1
  346. package/dist/collection/components/bal-list/bal-list-item-content/bal-list-item-content.js +2 -2
  347. package/dist/collection/components/bal-list/bal-list-item-icon/bal-list-item-icon.js +2 -2
  348. package/dist/collection/components/bal-list/bal-list-item-subtitle/bal-list-item-subtitle.js +1 -1
  349. package/dist/collection/components/bal-list/bal-list-item-title/bal-list-item-title.js +1 -1
  350. package/dist/collection/components/bal-list/bal-list.js +1 -1
  351. package/dist/collection/components/bal-modal/bal-modal-body/bal-modal-body.js +1 -1
  352. package/dist/collection/components/bal-modal/bal-modal-header/bal-modal-header.js +1 -1
  353. package/dist/collection/components/bal-modal/bal-modal.js +5 -5
  354. package/dist/collection/components/bal-nav/bal-nav-link/bal-nav-link.js +2 -2
  355. package/dist/collection/components/bal-nav/bal-nav-link-grid/bal-nav-link-grid.js +1 -1
  356. package/dist/collection/components/bal-nav/bal-nav-link-grid-col/bal-nav-link-grid-col.js +1 -1
  357. package/dist/collection/components/bal-nav/bal-nav-link-group/bal-nav-link-group.js +1 -1
  358. package/dist/collection/components/bal-nav/bal-nav-menu-bar/bal-nav-menu-bar.js +1 -1
  359. package/dist/collection/components/bal-nav/bal-nav-menu-flyout/bal-nav-menu-flyout.js +1 -1
  360. package/dist/collection/components/bal-nav/bal-nav-meta-bar/bal-nav-meta-bar.js +1 -1
  361. package/dist/collection/components/bal-nav/bal-nav.js +2 -2
  362. package/dist/collection/components/bal-navbar/bal-navbar-brand/bal-navbar-brand.js +1 -1
  363. package/dist/collection/components/bal-navbar/bal-navbar-menu/bal-navbar-menu.js +1 -1
  364. package/dist/collection/components/bal-navbar/bal-navbar-menu-end/bal-navbar-menu-end.js +1 -1
  365. package/dist/collection/components/bal-navbar/bal-navbar-menu-start/bal-navbar-menu-start.js +1 -1
  366. package/dist/collection/components/bal-navbar/bal-navbar.js +1 -1
  367. package/dist/collection/components/bal-notices/bal-notices.js +1 -1
  368. package/dist/collection/components/bal-notification/bal-notification.js +1 -1
  369. package/dist/collection/components/bal-number-input/bal-number-input.js +1 -1
  370. package/dist/collection/components/bal-option/bal-option.js +1 -1
  371. package/dist/collection/components/bal-option-list/bal-option-list.js +1 -1
  372. package/dist/collection/components/bal-pagination/bal-pagination.js +4 -4
  373. package/dist/collection/components/bal-popover/bal-popover-content/bal-popover-content.js +1 -1
  374. package/dist/collection/components/bal-popup/bal-popup.js +1 -1
  375. package/dist/collection/components/bal-progress-bar/bal-progress-bar.js +1 -1
  376. package/dist/collection/components/bal-radio/bal-radio-button/bal-radio-button.js +1 -1
  377. package/dist/collection/components/bal-radio/bal-radio.js +1 -1
  378. package/dist/collection/components/bal-segment/bal-segment-item/bal-segment-item.js +1 -1
  379. package/dist/collection/components/bal-segment/bal-segment.js +1 -1
  380. package/dist/collection/components/bal-select/bal-select-option/bal-select-option.js +1 -1
  381. package/dist/collection/components/bal-select/bal-select.js +5 -5
  382. package/dist/collection/components/bal-shape/bal-shape.js +4 -4
  383. package/dist/collection/components/bal-sheet/bal-sheet.js +1 -1
  384. package/dist/collection/components/bal-snackbar/bal-snackbar.js +1 -1
  385. package/dist/collection/components/bal-spinner/bal-spinner.js +1 -1
  386. package/dist/collection/components/bal-stack/bal-stack.js +1 -1
  387. package/dist/collection/components/bal-stage/bal-stage-back-link/bal-stage-back-link.js +2 -2
  388. package/dist/collection/components/bal-stage/bal-stage-body/bal-stage-body.js +1 -1
  389. package/dist/collection/components/bal-stage/bal-stage-foot/bal-stage-foot.js +1 -1
  390. package/dist/collection/components/bal-stage/bal-stage-head/bal-stage-head.js +1 -1
  391. package/dist/collection/components/bal-stage/bal-stage-image/bal-stage-image.js +1 -1
  392. package/dist/collection/components/bal-stage/bal-stage.js +1 -1
  393. package/dist/collection/components/bal-steps/bal-step-item/bal-step-item.js +2 -2
  394. package/dist/collection/components/bal-table/bal-table.js +1 -1
  395. package/dist/collection/components/bal-tabs/bal-tab-item/bal-tab-item.js +2 -2
  396. package/dist/collection/components/bal-tabs/bal-tabs.js +2 -2
  397. package/dist/collection/components/bal-tag/bal-tag-group/bal-tag-group.js +1 -1
  398. package/dist/collection/components/bal-tag/bal-tag.js +1 -1
  399. package/dist/collection/components/bal-text/bal-text.js +2 -2
  400. package/dist/collection/components/bal-textarea/bal-textarea.js +1 -1
  401. package/dist/collection/components/bal-time-input/bal-time-input.js +1 -1
  402. package/dist/collection/components/bal-toast/bal-toast.js +1 -1
  403. package/dist/collection/components/bal-tooltip/bal-tooltip.js +1 -1
  404. package/dist/collection/utils/constants/version.constant.js +1 -1
  405. package/dist/esm/bal-accordion_4.entry.js +62 -27
  406. package/dist/esm/bal-app.entry.js +2 -2
  407. package/dist/esm/bal-badge.entry.js +1 -1
  408. package/dist/esm/bal-button_2.entry.js +2 -2
  409. package/dist/esm/bal-card_6.entry.js +7 -7
  410. package/dist/esm/bal-carousel_2.entry.js +4 -4
  411. package/dist/esm/bal-checkbox-button.entry.js +1 -1
  412. package/dist/esm/bal-checkbox_2.entry.js +1 -1
  413. package/dist/esm/bal-close.entry.js +1 -1
  414. package/dist/esm/bal-content.entry.js +1 -1
  415. package/dist/esm/bal-data_4.entry.js +4 -4
  416. package/dist/esm/bal-date-calendar-cell.entry.js +1 -1
  417. package/dist/esm/bal-date-calendar_2.entry.js +3 -3
  418. package/dist/esm/bal-date.entry.js +1 -1
  419. package/dist/esm/bal-divider.entry.js +1 -1
  420. package/dist/esm/bal-dropdown.entry.js +2 -2
  421. package/dist/esm/bal-field_5.entry.js +8 -8
  422. package/dist/esm/bal-file-upload.entry.js +4 -4
  423. package/dist/esm/bal-footer.entry.js +3 -3
  424. package/dist/esm/bal-form-col_2.entry.js +3 -3
  425. package/dist/esm/bal-form.entry.js +1 -1
  426. package/dist/esm/bal-heading_2.entry.js +3 -3
  427. package/dist/esm/bal-hint_5.entry.js +6 -6
  428. package/dist/esm/bal-icon.entry.js +1684 -311
  429. package/dist/esm/bal-input-group.entry.js +1 -1
  430. package/dist/esm/bal-input-slider.entry.js +3 -3
  431. package/dist/esm/bal-input-stepper.entry.js +3 -3
  432. package/dist/esm/bal-input.entry.js +1 -1
  433. package/dist/esm/bal-label.entry.js +1 -1
  434. package/dist/esm/bal-list_8.entry.js +10 -10
  435. package/dist/esm/bal-logo.entry.js +3 -3
  436. package/dist/esm/bal-modal_3.entry.js +7 -7
  437. package/dist/esm/bal-nav_8.entry.js +13 -13
  438. package/dist/esm/bal-navbar_5.entry.js +8 -8
  439. package/dist/esm/bal-notices_3.entry.js +3 -3
  440. package/dist/esm/bal-notification.entry.js +1 -1
  441. package/dist/esm/bal-number-input.entry.js +1 -1
  442. package/dist/esm/bal-option_2.entry.js +2 -2
  443. package/dist/esm/bal-pagination.entry.js +7 -7
  444. package/dist/esm/bal-popup.entry.js +1 -1
  445. package/dist/esm/bal-progress-bar.entry.js +5 -5
  446. package/dist/esm/bal-radio-button.entry.js +1 -1
  447. package/dist/esm/bal-radio_2.entry.js +1 -1
  448. package/dist/esm/bal-segment_2.entry.js +6 -6
  449. package/dist/esm/bal-select_2.entry.js +6 -6
  450. package/dist/esm/bal-shape.entry.js +5 -5
  451. package/dist/esm/bal-sheet.entry.js +1 -1
  452. package/dist/esm/bal-spinner.entry.js +1 -1
  453. package/dist/esm/bal-stack.entry.js +1 -1
  454. package/dist/esm/bal-stage_6.entry.js +7 -7
  455. package/dist/esm/bal-step-item.entry.js +2 -2
  456. package/dist/esm/bal-steps.entry.js +3 -3
  457. package/dist/esm/bal-tab-item_2.entry.js +7 -7
  458. package/dist/esm/bal-table.entry.js +1 -1
  459. package/dist/esm/bal-tag_2.entry.js +2 -2
  460. package/dist/esm/bal-textarea.entry.js +1 -1
  461. package/dist/esm/bal-time-input.entry.js +1 -1
  462. package/dist/esm/bal-tooltip.entry.js +1 -1
  463. package/dist/esm/baloise-design-system.js +1 -1
  464. package/dist/esm/{breakpoints.decorator-2074b85a.js → breakpoints.decorator-3c6214ed.js} +1 -1
  465. package/dist/esm/{breakpoints.subject-3329beee.js → breakpoints.subject-6b4e30ba.js} +1 -1
  466. package/dist/esm/index.js +3 -3
  467. package/dist/esm/initialize-be160cc4.js +1 -1
  468. package/dist/esm/loader.js +1 -1
  469. package/dist/esm/{tokens.esm-9895930d.js → tokens.esm-2ce9e0f4.js} +1 -1
  470. package/dist/esm/{window-resize.decorator-9c64a902.js → window-resize.decorator-3ffd7301.js} +1 -1
  471. package/dist/esm-es5/bal-accordion_4.entry.js +1 -1
  472. package/dist/esm-es5/bal-app.entry.js +1 -1
  473. package/dist/esm-es5/bal-badge.entry.js +1 -1
  474. package/dist/esm-es5/bal-button_2.entry.js +1 -1
  475. package/dist/esm-es5/bal-card_6.entry.js +1 -1
  476. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  477. package/dist/esm-es5/bal-checkbox-button.entry.js +1 -1
  478. package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
  479. package/dist/esm-es5/bal-close.entry.js +1 -1
  480. package/dist/esm-es5/bal-content.entry.js +1 -1
  481. package/dist/esm-es5/bal-data_4.entry.js +1 -1
  482. package/dist/esm-es5/bal-date-calendar-cell.entry.js +1 -1
  483. package/dist/esm-es5/bal-date-calendar_2.entry.js +1 -1
  484. package/dist/esm-es5/bal-date.entry.js +1 -1
  485. package/dist/esm-es5/bal-divider.entry.js +1 -1
  486. package/dist/esm-es5/bal-dropdown.entry.js +1 -1
  487. package/dist/esm-es5/bal-field_5.entry.js +1 -1
  488. package/dist/esm-es5/bal-file-upload.entry.js +1 -1
  489. package/dist/esm-es5/bal-footer.entry.js +1 -1
  490. package/dist/esm-es5/bal-form-col_2.entry.js +1 -1
  491. package/dist/esm-es5/bal-form.entry.js +1 -1
  492. package/dist/esm-es5/bal-heading_2.entry.js +1 -1
  493. package/dist/esm-es5/bal-hint_5.entry.js +1 -1
  494. package/dist/esm-es5/bal-icon.entry.js +2 -1
  495. package/dist/esm-es5/bal-input-group.entry.js +1 -1
  496. package/dist/esm-es5/bal-input-slider.entry.js +1 -1
  497. package/dist/esm-es5/bal-input-stepper.entry.js +1 -1
  498. package/dist/esm-es5/bal-input.entry.js +1 -1
  499. package/dist/esm-es5/bal-label.entry.js +1 -1
  500. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  501. package/dist/esm-es5/bal-logo.entry.js +1 -1
  502. package/dist/esm-es5/bal-modal_3.entry.js +1 -1
  503. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  504. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  505. package/dist/esm-es5/bal-notices_3.entry.js +1 -1
  506. package/dist/esm-es5/bal-notification.entry.js +1 -1
  507. package/dist/esm-es5/bal-number-input.entry.js +1 -1
  508. package/dist/esm-es5/bal-option_2.entry.js +1 -1
  509. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  510. package/dist/esm-es5/bal-popup.entry.js +1 -1
  511. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  512. package/dist/esm-es5/bal-radio-button.entry.js +1 -1
  513. package/dist/esm-es5/bal-radio_2.entry.js +1 -1
  514. package/dist/esm-es5/bal-segment_2.entry.js +1 -1
  515. package/dist/esm-es5/bal-select_2.entry.js +1 -1
  516. package/dist/esm-es5/bal-shape.entry.js +1 -1
  517. package/dist/esm-es5/bal-sheet.entry.js +1 -1
  518. package/dist/esm-es5/bal-spinner.entry.js +1 -1
  519. package/dist/esm-es5/bal-stack.entry.js +1 -1
  520. package/dist/esm-es5/bal-stage_6.entry.js +1 -1
  521. package/dist/esm-es5/bal-step-item.entry.js +1 -1
  522. package/dist/esm-es5/bal-steps.entry.js +1 -1
  523. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  524. package/dist/esm-es5/bal-table.entry.js +1 -1
  525. package/dist/esm-es5/bal-tag_2.entry.js +1 -1
  526. package/dist/esm-es5/bal-textarea.entry.js +1 -1
  527. package/dist/esm-es5/bal-time-input.entry.js +1 -1
  528. package/dist/esm-es5/bal-tooltip.entry.js +1 -1
  529. package/dist/esm-es5/baloise-design-system.js +1 -1
  530. package/dist/esm-es5/{breakpoints.decorator-2074b85a.js → breakpoints.decorator-3c6214ed.js} +1 -1
  531. package/dist/esm-es5/{breakpoints.subject-3329beee.js → breakpoints.subject-6b4e30ba.js} +1 -1
  532. package/dist/esm-es5/index.js +1 -1
  533. package/dist/esm-es5/initialize-be160cc4.js +1 -1
  534. package/dist/esm-es5/loader.js +1 -1
  535. package/dist/esm-es5/{window-resize.decorator-9c64a902.js → window-resize.decorator-3ffd7301.js} +1 -1
  536. package/dist/html.html-data.json +24 -1
  537. package/dist/types/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.d.ts +42 -1
  538. package/dist/types/components/bal-accordion/bal-accordion.interfaces.d.ts +1 -0
  539. package/dist/types/components/bal-icon/bal-icon.d.ts +21 -2
  540. package/dist/types/components/bal-icon/bal-icon.interfaces.d.ts +1 -0
  541. package/dist/types/components.d.ts +26 -2
  542. package/package.json +7 -6
  543. package/dist/baloise-design-system/p-01d99206b2.entry.js +0 -1
  544. package/dist/baloise-design-system/p-309f1f7d4e.entry.js +0 -1
  545. package/dist/baloise-design-system/p-35ca0dde1e.entry.js +0 -1
  546. package/dist/baloise-design-system/p-36f131eec6.entry.js +0 -1
  547. package/dist/baloise-design-system/p-3cfd6d7831.entry.js +0 -1
  548. package/dist/baloise-design-system/p-4d9a45256c.entry.js +0 -1
  549. package/dist/baloise-design-system/p-5c6d332a4e.entry.js +0 -1
  550. package/dist/baloise-design-system/p-5d6f66047b.system.entry.js +0 -1
  551. package/dist/baloise-design-system/p-6c29304485.system.entry.js +0 -1
  552. package/dist/baloise-design-system/p-75051cae.js +0 -1
  553. package/dist/baloise-design-system/p-76e1b06450.system.entry.js +0 -1
  554. package/dist/baloise-design-system/p-7c4d5ab726.entry.js +0 -1
  555. package/dist/baloise-design-system/p-8255d835fe.entry.js +0 -1
  556. package/dist/baloise-design-system/p-a1d210ca31.entry.js +0 -1
  557. package/dist/baloise-design-system/p-bab48d7af7.entry.js +0 -1
  558. /package/dist/baloise-design-system/{p-105f0019.system.js → p-1f610a13.system.js} +0 -0
  559. /package/dist/baloise-design-system/{p-8b3520e9.js → p-c8c2e2d9.js} +0 -0
  560. /package/dist/esm-es5/{tokens.esm-9895930d.js → tokens.esm-2ce9e0f4.js} +0 -0
@@ -5,6 +5,1356 @@ import { B as BEM } from './bem.js';
5
5
  import { d as defaultConfig } from './config.default.js';
6
6
  import { L as ListenToConfig } from './config.decorator.js';
7
7
 
8
+ var purify = {exports: {}};
9
+
10
+ /*! @license DOMPurify 3.2.4 | (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.4/LICENSE */
11
+
12
+ (function (module, exports) {
13
+ (function (global, factory) {
14
+ module.exports = factory() ;
15
+ })(commonjsGlobal, (function () {
16
+ const {
17
+ entries,
18
+ setPrototypeOf,
19
+ isFrozen,
20
+ getPrototypeOf,
21
+ getOwnPropertyDescriptor
22
+ } = Object;
23
+ let {
24
+ freeze,
25
+ seal,
26
+ create
27
+ } = Object; // eslint-disable-line import/no-mutable-exports
28
+ let {
29
+ apply,
30
+ construct
31
+ } = typeof Reflect !== 'undefined' && Reflect;
32
+ if (!freeze) {
33
+ freeze = function freeze(x) {
34
+ return x;
35
+ };
36
+ }
37
+ if (!seal) {
38
+ seal = function seal(x) {
39
+ return x;
40
+ };
41
+ }
42
+ if (!apply) {
43
+ apply = function apply(fun, thisValue, args) {
44
+ return fun.apply(thisValue, args);
45
+ };
46
+ }
47
+ if (!construct) {
48
+ construct = function construct(Func, args) {
49
+ return new Func(...args);
50
+ };
51
+ }
52
+ const arrayForEach = unapply(Array.prototype.forEach);
53
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
54
+ const arrayPop = unapply(Array.prototype.pop);
55
+ const arrayPush = unapply(Array.prototype.push);
56
+ const arraySplice = unapply(Array.prototype.splice);
57
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
58
+ const stringToString = unapply(String.prototype.toString);
59
+ const stringMatch = unapply(String.prototype.match);
60
+ const stringReplace = unapply(String.prototype.replace);
61
+ const stringIndexOf = unapply(String.prototype.indexOf);
62
+ const stringTrim = unapply(String.prototype.trim);
63
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
64
+ const regExpTest = unapply(RegExp.prototype.test);
65
+ const typeErrorCreate = unconstruct(TypeError);
66
+ /**
67
+ * Creates a new function that calls the given function with a specified thisArg and arguments.
68
+ *
69
+ * @param func - The function to be wrapped and called.
70
+ * @returns A new function that calls the given function with a specified thisArg and arguments.
71
+ */
72
+ function unapply(func) {
73
+ return function (thisArg) {
74
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
75
+ args[_key - 1] = arguments[_key];
76
+ }
77
+ return apply(func, thisArg, args);
78
+ };
79
+ }
80
+ /**
81
+ * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
82
+ *
83
+ * @param func - The constructor function to be wrapped and called.
84
+ * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
85
+ */
86
+ function unconstruct(func) {
87
+ return function () {
88
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
89
+ args[_key2] = arguments[_key2];
90
+ }
91
+ return construct(func, args);
92
+ };
93
+ }
94
+ /**
95
+ * Add properties to a lookup table
96
+ *
97
+ * @param set - The set to which elements will be added.
98
+ * @param array - The array containing elements to be added to the set.
99
+ * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
100
+ * @returns The modified set with added elements.
101
+ */
102
+ function addToSet(set, array) {
103
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
104
+ if (setPrototypeOf) {
105
+ // Make 'in' and truthy checks like Boolean(set.constructor)
106
+ // independent of any properties defined on Object.prototype.
107
+ // Prevent prototype setters from intercepting set as a this value.
108
+ setPrototypeOf(set, null);
109
+ }
110
+ let l = array.length;
111
+ while (l--) {
112
+ let element = array[l];
113
+ if (typeof element === 'string') {
114
+ const lcElement = transformCaseFunc(element);
115
+ if (lcElement !== element) {
116
+ // Config presets (e.g. tags.js, attrs.js) are immutable.
117
+ if (!isFrozen(array)) {
118
+ array[l] = lcElement;
119
+ }
120
+ element = lcElement;
121
+ }
122
+ }
123
+ set[element] = true;
124
+ }
125
+ return set;
126
+ }
127
+ /**
128
+ * Clean up an array to harden against CSPP
129
+ *
130
+ * @param array - The array to be cleaned.
131
+ * @returns The cleaned version of the array
132
+ */
133
+ function cleanArray(array) {
134
+ for (let index = 0; index < array.length; index++) {
135
+ const isPropertyExist = objectHasOwnProperty(array, index);
136
+ if (!isPropertyExist) {
137
+ array[index] = null;
138
+ }
139
+ }
140
+ return array;
141
+ }
142
+ /**
143
+ * Shallow clone an object
144
+ *
145
+ * @param object - The object to be cloned.
146
+ * @returns A new object that copies the original.
147
+ */
148
+ function clone(object) {
149
+ const newObject = create(null);
150
+ for (const [property, value] of entries(object)) {
151
+ const isPropertyExist = objectHasOwnProperty(object, property);
152
+ if (isPropertyExist) {
153
+ if (Array.isArray(value)) {
154
+ newObject[property] = cleanArray(value);
155
+ } else if (value && typeof value === 'object' && value.constructor === Object) {
156
+ newObject[property] = clone(value);
157
+ } else {
158
+ newObject[property] = value;
159
+ }
160
+ }
161
+ }
162
+ return newObject;
163
+ }
164
+ /**
165
+ * This method automatically checks if the prop is function or getter and behaves accordingly.
166
+ *
167
+ * @param object - The object to look up the getter function in its prototype chain.
168
+ * @param prop - The property name for which to find the getter function.
169
+ * @returns The getter function found in the prototype chain or a fallback function.
170
+ */
171
+ function lookupGetter(object, prop) {
172
+ while (object !== null) {
173
+ const desc = getOwnPropertyDescriptor(object, prop);
174
+ if (desc) {
175
+ if (desc.get) {
176
+ return unapply(desc.get);
177
+ }
178
+ if (typeof desc.value === 'function') {
179
+ return unapply(desc.value);
180
+ }
181
+ }
182
+ object = getPrototypeOf(object);
183
+ }
184
+ function fallbackValue() {
185
+ return null;
186
+ }
187
+ return fallbackValue;
188
+ }
189
+
190
+ 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']);
191
+ 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']);
192
+ 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']);
193
+ // List of SVG elements that are disallowed by default.
194
+ // We still need to know them so that we can do namespace
195
+ // checks properly in case one wants to add them to
196
+ // allow-list.
197
+ 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']);
198
+ 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']);
199
+ // Similarly to SVG, we want to know all MathML elements,
200
+ // even those that we disallow by default.
201
+ const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
202
+ const text = freeze(['#text']);
203
+
204
+ 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']);
205
+ 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']);
206
+ 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']);
207
+ const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
208
+
209
+ // eslint-disable-next-line unicorn/better-regex
210
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
211
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
212
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
213
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
214
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
215
+ const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
216
+ );
217
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
218
+ const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
219
+ );
220
+ const DOCTYPE_NAME = seal(/^html$/i);
221
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
222
+
223
+ var EXPRESSIONS = /*#__PURE__*/Object.freeze({
224
+ __proto__: null,
225
+ ARIA_ATTR: ARIA_ATTR,
226
+ ATTR_WHITESPACE: ATTR_WHITESPACE,
227
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT,
228
+ DATA_ATTR: DATA_ATTR,
229
+ DOCTYPE_NAME: DOCTYPE_NAME,
230
+ ERB_EXPR: ERB_EXPR,
231
+ IS_ALLOWED_URI: IS_ALLOWED_URI,
232
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
233
+ MUSTACHE_EXPR: MUSTACHE_EXPR,
234
+ TMPLIT_EXPR: TMPLIT_EXPR
235
+ });
236
+
237
+ /* eslint-disable @typescript-eslint/indent */
238
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
239
+ const NODE_TYPE = {
240
+ element: 1,
241
+ attribute: 2,
242
+ text: 3,
243
+ cdataSection: 4,
244
+ entityReference: 5,
245
+ // Deprecated
246
+ entityNode: 6,
247
+ // Deprecated
248
+ progressingInstruction: 7,
249
+ comment: 8,
250
+ document: 9,
251
+ documentType: 10,
252
+ documentFragment: 11,
253
+ notation: 12 // Deprecated
254
+ };
255
+ const getGlobal = function getGlobal() {
256
+ return typeof window === 'undefined' ? null : window;
257
+ };
258
+ /**
259
+ * Creates a no-op policy for internal use only.
260
+ * Don't export this function outside this module!
261
+ * @param trustedTypes The policy factory.
262
+ * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
263
+ * @return The policy created (or null, if Trusted Types
264
+ * are not supported or creating the policy failed).
265
+ */
266
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
267
+ if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
268
+ return null;
269
+ }
270
+ // Allow the callers to control the unique policy name
271
+ // by adding a data-tt-policy-suffix to the script element with the DOMPurify.
272
+ // Policy creation with duplicate names throws in Trusted Types.
273
+ let suffix = null;
274
+ const ATTR_NAME = 'data-tt-policy-suffix';
275
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
276
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
277
+ }
278
+ const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
279
+ try {
280
+ return trustedTypes.createPolicy(policyName, {
281
+ createHTML(html) {
282
+ return html;
283
+ },
284
+ createScriptURL(scriptUrl) {
285
+ return scriptUrl;
286
+ }
287
+ });
288
+ } catch (_) {
289
+ // Policy creation failed (most likely another DOMPurify script has
290
+ // already run). Skip creating the policy, as this will only cause errors
291
+ // if TT are enforced.
292
+ console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
293
+ return null;
294
+ }
295
+ };
296
+ const _createHooksMap = function _createHooksMap() {
297
+ return {
298
+ afterSanitizeAttributes: [],
299
+ afterSanitizeElements: [],
300
+ afterSanitizeShadowDOM: [],
301
+ beforeSanitizeAttributes: [],
302
+ beforeSanitizeElements: [],
303
+ beforeSanitizeShadowDOM: [],
304
+ uponSanitizeAttribute: [],
305
+ uponSanitizeElement: [],
306
+ uponSanitizeShadowNode: []
307
+ };
308
+ };
309
+ function createDOMPurify() {
310
+ let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
311
+ const DOMPurify = root => createDOMPurify(root);
312
+ DOMPurify.version = '3.2.4';
313
+ DOMPurify.removed = [];
314
+ if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
315
+ // Not running in a browser, provide a factory function
316
+ // so that you can pass your own Window
317
+ DOMPurify.isSupported = false;
318
+ return DOMPurify;
319
+ }
320
+ let {
321
+ document
322
+ } = window;
323
+ const originalDocument = document;
324
+ const currentScript = originalDocument.currentScript;
325
+ const {
326
+ DocumentFragment,
327
+ HTMLTemplateElement,
328
+ Node,
329
+ Element,
330
+ NodeFilter,
331
+ NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
332
+ HTMLFormElement,
333
+ DOMParser,
334
+ trustedTypes
335
+ } = window;
336
+ const ElementPrototype = Element.prototype;
337
+ const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
338
+ const remove = lookupGetter(ElementPrototype, 'remove');
339
+ const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
340
+ const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
341
+ const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
342
+ // As per issue #47, the web-components registry is inherited by a
343
+ // new document created via createHTMLDocument. As per the spec
344
+ // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
345
+ // a new empty registry is used when creating a template contents owner
346
+ // document, so we use that as our parent document to ensure nothing
347
+ // is inherited.
348
+ if (typeof HTMLTemplateElement === 'function') {
349
+ const template = document.createElement('template');
350
+ if (template.content && template.content.ownerDocument) {
351
+ document = template.content.ownerDocument;
352
+ }
353
+ }
354
+ let trustedTypesPolicy;
355
+ let emptyHTML = '';
356
+ const {
357
+ implementation,
358
+ createNodeIterator,
359
+ createDocumentFragment,
360
+ getElementsByTagName
361
+ } = document;
362
+ const {
363
+ importNode
364
+ } = originalDocument;
365
+ let hooks = _createHooksMap();
366
+ /**
367
+ * Expose whether this browser supports running the full DOMPurify.
368
+ */
369
+ DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
370
+ const {
371
+ MUSTACHE_EXPR,
372
+ ERB_EXPR,
373
+ TMPLIT_EXPR,
374
+ DATA_ATTR,
375
+ ARIA_ATTR,
376
+ IS_SCRIPT_OR_DATA,
377
+ ATTR_WHITESPACE,
378
+ CUSTOM_ELEMENT
379
+ } = EXPRESSIONS;
380
+ let {
381
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
382
+ } = EXPRESSIONS;
383
+ /**
384
+ * We consider the elements and attributes below to be safe. Ideally
385
+ * don't add any new ones but feel free to remove unwanted ones.
386
+ */
387
+ /* allowed element names */
388
+ let ALLOWED_TAGS = null;
389
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
390
+ /* Allowed attribute names */
391
+ let ALLOWED_ATTR = null;
392
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
393
+ /*
394
+ * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
395
+ * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
396
+ * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
397
+ * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
398
+ */
399
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
400
+ tagNameCheck: {
401
+ writable: true,
402
+ configurable: false,
403
+ enumerable: true,
404
+ value: null
405
+ },
406
+ attributeNameCheck: {
407
+ writable: true,
408
+ configurable: false,
409
+ enumerable: true,
410
+ value: null
411
+ },
412
+ allowCustomizedBuiltInElements: {
413
+ writable: true,
414
+ configurable: false,
415
+ enumerable: true,
416
+ value: false
417
+ }
418
+ }));
419
+ /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
420
+ let FORBID_TAGS = null;
421
+ /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
422
+ let FORBID_ATTR = null;
423
+ /* Decide if ARIA attributes are okay */
424
+ let ALLOW_ARIA_ATTR = true;
425
+ /* Decide if custom data attributes are okay */
426
+ let ALLOW_DATA_ATTR = true;
427
+ /* Decide if unknown protocols are okay */
428
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
429
+ /* Decide if self-closing tags in attributes are allowed.
430
+ * Usually removed due to a mXSS issue in jQuery 3.0 */
431
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
432
+ /* Output should be safe for common template engines.
433
+ * This means, DOMPurify removes data attributes, mustaches and ERB
434
+ */
435
+ let SAFE_FOR_TEMPLATES = false;
436
+ /* Output should be safe even for XML used within HTML and alike.
437
+ * This means, DOMPurify removes comments when containing risky content.
438
+ */
439
+ let SAFE_FOR_XML = true;
440
+ /* Decide if document with <html>... should be returned */
441
+ let WHOLE_DOCUMENT = false;
442
+ /* Track whether config is already set on this instance of DOMPurify. */
443
+ let SET_CONFIG = false;
444
+ /* Decide if all elements (e.g. style, script) must be children of
445
+ * document.body. By default, browsers might move them to document.head */
446
+ let FORCE_BODY = false;
447
+ /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
448
+ * string (or a TrustedHTML object if Trusted Types are supported).
449
+ * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
450
+ */
451
+ let RETURN_DOM = false;
452
+ /* Decide if a DOM `DocumentFragment` should be returned, instead of a html
453
+ * string (or a TrustedHTML object if Trusted Types are supported) */
454
+ let RETURN_DOM_FRAGMENT = false;
455
+ /* Try to return a Trusted Type object instead of a string, return a string in
456
+ * case Trusted Types are not supported */
457
+ let RETURN_TRUSTED_TYPE = false;
458
+ /* Output should be free from DOM clobbering attacks?
459
+ * This sanitizes markups named with colliding, clobberable built-in DOM APIs.
460
+ */
461
+ let SANITIZE_DOM = true;
462
+ /* Achieve full DOM Clobbering protection by isolating the namespace of named
463
+ * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
464
+ *
465
+ * HTML/DOM spec rules that enable DOM Clobbering:
466
+ * - Named Access on Window (§7.3.3)
467
+ * - DOM Tree Accessors (§3.1.5)
468
+ * - Form Element Parent-Child Relations (§4.10.3)
469
+ * - Iframe srcdoc / Nested WindowProxies (§4.8.5)
470
+ * - HTMLCollection (§4.2.10.2)
471
+ *
472
+ * Namespace isolation is implemented by prefixing `id` and `name` attributes
473
+ * with a constant string, i.e., `user-content-`
474
+ */
475
+ let SANITIZE_NAMED_PROPS = false;
476
+ const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
477
+ /* Keep element content when removing element? */
478
+ let KEEP_CONTENT = true;
479
+ /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
480
+ * of importing it into a new Document and returning a sanitized copy */
481
+ let IN_PLACE = false;
482
+ /* Allow usage of profiles like html, svg and mathMl */
483
+ let USE_PROFILES = {};
484
+ /* Tags to ignore content of when KEEP_CONTENT is true */
485
+ let FORBID_CONTENTS = null;
486
+ 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']);
487
+ /* Tags that are safe for data: URIs */
488
+ let DATA_URI_TAGS = null;
489
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
490
+ /* Attributes safe for values like "javascript:" */
491
+ let URI_SAFE_ATTRIBUTES = null;
492
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
493
+ const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
494
+ const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
495
+ const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
496
+ /* Document namespace */
497
+ let NAMESPACE = HTML_NAMESPACE;
498
+ let IS_EMPTY_INPUT = false;
499
+ /* Allowed XHTML+XML namespaces */
500
+ let ALLOWED_NAMESPACES = null;
501
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
502
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
503
+ let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
504
+ // Certain elements are allowed in both SVG and HTML
505
+ // namespace. We need to specify them explicitly
506
+ // so that they don't get erroneously deleted from
507
+ // HTML namespace.
508
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
509
+ /* Parsing of strict XHTML documents */
510
+ let PARSER_MEDIA_TYPE = null;
511
+ const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
512
+ const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
513
+ let transformCaseFunc = null;
514
+ /* Keep a reference to config to pass to hooks */
515
+ let CONFIG = null;
516
+ /* Ideally, do not touch anything below this line */
517
+ /* ______________________________________________ */
518
+ const formElement = document.createElement('form');
519
+ const isRegexOrFunction = function isRegexOrFunction(testValue) {
520
+ return testValue instanceof RegExp || testValue instanceof Function;
521
+ };
522
+ /**
523
+ * _parseConfig
524
+ *
525
+ * @param cfg optional config literal
526
+ */
527
+ // eslint-disable-next-line complexity
528
+ const _parseConfig = function _parseConfig() {
529
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
530
+ if (CONFIG && CONFIG === cfg) {
531
+ return;
532
+ }
533
+ /* Shield configuration object from tampering */
534
+ if (!cfg || typeof cfg !== 'object') {
535
+ cfg = {};
536
+ }
537
+ /* Shield configuration object from prototype pollution */
538
+ cfg = clone(cfg);
539
+ PARSER_MEDIA_TYPE =
540
+ // eslint-disable-next-line unicorn/prefer-includes
541
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
542
+ // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
543
+ transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
544
+ /* Set configuration parameters */
545
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
546
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
547
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
548
+ 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;
549
+ 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;
550
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
551
+ FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
552
+ FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
553
+ USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
554
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
555
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
556
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
557
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
558
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
559
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
560
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
561
+ RETURN_DOM = cfg.RETURN_DOM || false; // Default false
562
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
563
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
564
+ FORCE_BODY = cfg.FORCE_BODY || false; // Default false
565
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
566
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
567
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
568
+ IN_PLACE = cfg.IN_PLACE || false; // Default false
569
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
570
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
571
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
572
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
573
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
574
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
575
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
576
+ }
577
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
578
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
579
+ }
580
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
581
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
582
+ }
583
+ if (SAFE_FOR_TEMPLATES) {
584
+ ALLOW_DATA_ATTR = false;
585
+ }
586
+ if (RETURN_DOM_FRAGMENT) {
587
+ RETURN_DOM = true;
588
+ }
589
+ /* Parse profile info */
590
+ if (USE_PROFILES) {
591
+ ALLOWED_TAGS = addToSet({}, text);
592
+ ALLOWED_ATTR = [];
593
+ if (USE_PROFILES.html === true) {
594
+ addToSet(ALLOWED_TAGS, html$1);
595
+ addToSet(ALLOWED_ATTR, html);
596
+ }
597
+ if (USE_PROFILES.svg === true) {
598
+ addToSet(ALLOWED_TAGS, svg$1);
599
+ addToSet(ALLOWED_ATTR, svg);
600
+ addToSet(ALLOWED_ATTR, xml);
601
+ }
602
+ if (USE_PROFILES.svgFilters === true) {
603
+ addToSet(ALLOWED_TAGS, svgFilters);
604
+ addToSet(ALLOWED_ATTR, svg);
605
+ addToSet(ALLOWED_ATTR, xml);
606
+ }
607
+ if (USE_PROFILES.mathMl === true) {
608
+ addToSet(ALLOWED_TAGS, mathMl$1);
609
+ addToSet(ALLOWED_ATTR, mathMl);
610
+ addToSet(ALLOWED_ATTR, xml);
611
+ }
612
+ }
613
+ /* Merge configuration parameters */
614
+ if (cfg.ADD_TAGS) {
615
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
616
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
617
+ }
618
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
619
+ }
620
+ if (cfg.ADD_ATTR) {
621
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
622
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
623
+ }
624
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
625
+ }
626
+ if (cfg.ADD_URI_SAFE_ATTR) {
627
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
628
+ }
629
+ if (cfg.FORBID_CONTENTS) {
630
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
631
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
632
+ }
633
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
634
+ }
635
+ /* Add #text in case KEEP_CONTENT is set to true */
636
+ if (KEEP_CONTENT) {
637
+ ALLOWED_TAGS['#text'] = true;
638
+ }
639
+ /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
640
+ if (WHOLE_DOCUMENT) {
641
+ addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
642
+ }
643
+ /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
644
+ if (ALLOWED_TAGS.table) {
645
+ addToSet(ALLOWED_TAGS, ['tbody']);
646
+ delete FORBID_TAGS.tbody;
647
+ }
648
+ if (cfg.TRUSTED_TYPES_POLICY) {
649
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
650
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
651
+ }
652
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
653
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
654
+ }
655
+ // Overwrite existing TrustedTypes policy.
656
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
657
+ // Sign local variables required by `sanitize`.
658
+ emptyHTML = trustedTypesPolicy.createHTML('');
659
+ } else {
660
+ // Uninitialized policy, attempt to initialize the internal dompurify policy.
661
+ if (trustedTypesPolicy === undefined) {
662
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
663
+ }
664
+ // If creating the internal policy succeeded sign internal variables.
665
+ if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
666
+ emptyHTML = trustedTypesPolicy.createHTML('');
667
+ }
668
+ }
669
+ // Prevent further manipulation of configuration.
670
+ // Not available in IE8, Safari 5, etc.
671
+ if (freeze) {
672
+ freeze(cfg);
673
+ }
674
+ CONFIG = cfg;
675
+ };
676
+ /* Keep track of all possible SVG and MathML tags
677
+ * so that we can perform the namespace checks
678
+ * correctly. */
679
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
680
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
681
+ /**
682
+ * @param element a DOM element whose namespace is being checked
683
+ * @returns Return false if the element has a
684
+ * namespace that a spec-compliant parser would never
685
+ * return. Return true otherwise.
686
+ */
687
+ const _checkValidNamespace = function _checkValidNamespace(element) {
688
+ let parent = getParentNode(element);
689
+ // In JSDOM, if we're inside shadow DOM, then parentNode
690
+ // can be null. We just simulate parent in this case.
691
+ if (!parent || !parent.tagName) {
692
+ parent = {
693
+ namespaceURI: NAMESPACE,
694
+ tagName: 'template'
695
+ };
696
+ }
697
+ const tagName = stringToLowerCase(element.tagName);
698
+ const parentTagName = stringToLowerCase(parent.tagName);
699
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
700
+ return false;
701
+ }
702
+ if (element.namespaceURI === SVG_NAMESPACE) {
703
+ // The only way to switch from HTML namespace to SVG
704
+ // is via <svg>. If it happens via any other tag, then
705
+ // it should be killed.
706
+ if (parent.namespaceURI === HTML_NAMESPACE) {
707
+ return tagName === 'svg';
708
+ }
709
+ // The only way to switch from MathML to SVG is via`
710
+ // svg if parent is either <annotation-xml> or MathML
711
+ // text integration points.
712
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
713
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
714
+ }
715
+ // We only allow elements that are defined in SVG
716
+ // spec. All others are disallowed in SVG namespace.
717
+ return Boolean(ALL_SVG_TAGS[tagName]);
718
+ }
719
+ if (element.namespaceURI === MATHML_NAMESPACE) {
720
+ // The only way to switch from HTML namespace to MathML
721
+ // is via <math>. If it happens via any other tag, then
722
+ // it should be killed.
723
+ if (parent.namespaceURI === HTML_NAMESPACE) {
724
+ return tagName === 'math';
725
+ }
726
+ // The only way to switch from SVG to MathML is via
727
+ // <math> and HTML integration points
728
+ if (parent.namespaceURI === SVG_NAMESPACE) {
729
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
730
+ }
731
+ // We only allow elements that are defined in MathML
732
+ // spec. All others are disallowed in MathML namespace.
733
+ return Boolean(ALL_MATHML_TAGS[tagName]);
734
+ }
735
+ if (element.namespaceURI === HTML_NAMESPACE) {
736
+ // The only way to switch from SVG to HTML is via
737
+ // HTML integration points, and from MathML to HTML
738
+ // is via MathML text integration points
739
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
740
+ return false;
741
+ }
742
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
743
+ return false;
744
+ }
745
+ // We disallow tags that are specific for MathML
746
+ // or SVG and should never appear in HTML namespace
747
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
748
+ }
749
+ // For XHTML and XML documents that support custom namespaces
750
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
751
+ return true;
752
+ }
753
+ // The code should never reach this place (this means
754
+ // that the element somehow got namespace that is not
755
+ // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
756
+ // Return false just in case.
757
+ return false;
758
+ };
759
+ /**
760
+ * _forceRemove
761
+ *
762
+ * @param node a DOM node
763
+ */
764
+ const _forceRemove = function _forceRemove(node) {
765
+ arrayPush(DOMPurify.removed, {
766
+ element: node
767
+ });
768
+ try {
769
+ // eslint-disable-next-line unicorn/prefer-dom-node-remove
770
+ getParentNode(node).removeChild(node);
771
+ } catch (_) {
772
+ remove(node);
773
+ }
774
+ };
775
+ /**
776
+ * _removeAttribute
777
+ *
778
+ * @param name an Attribute name
779
+ * @param element a DOM node
780
+ */
781
+ const _removeAttribute = function _removeAttribute(name, element) {
782
+ try {
783
+ arrayPush(DOMPurify.removed, {
784
+ attribute: element.getAttributeNode(name),
785
+ from: element
786
+ });
787
+ } catch (_) {
788
+ arrayPush(DOMPurify.removed, {
789
+ attribute: null,
790
+ from: element
791
+ });
792
+ }
793
+ element.removeAttribute(name);
794
+ // We void attribute values for unremovable "is" attributes
795
+ if (name === 'is') {
796
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
797
+ try {
798
+ _forceRemove(element);
799
+ } catch (_) {}
800
+ } else {
801
+ try {
802
+ element.setAttribute(name, '');
803
+ } catch (_) {}
804
+ }
805
+ }
806
+ };
807
+ /**
808
+ * _initDocument
809
+ *
810
+ * @param dirty - a string of dirty markup
811
+ * @return a DOM, filled with the dirty markup
812
+ */
813
+ const _initDocument = function _initDocument(dirty) {
814
+ /* Create a HTML document */
815
+ let doc = null;
816
+ let leadingWhitespace = null;
817
+ if (FORCE_BODY) {
818
+ dirty = '<remove></remove>' + dirty;
819
+ } else {
820
+ /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
821
+ const matches = stringMatch(dirty, /^[\r\n\t ]+/);
822
+ leadingWhitespace = matches && matches[0];
823
+ }
824
+ if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
825
+ // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
826
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
827
+ }
828
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
829
+ /*
830
+ * Use the DOMParser API by default, fallback later if needs be
831
+ * DOMParser not work for svg when has multiple root element.
832
+ */
833
+ if (NAMESPACE === HTML_NAMESPACE) {
834
+ try {
835
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
836
+ } catch (_) {}
837
+ }
838
+ /* Use createHTMLDocument in case DOMParser is not available */
839
+ if (!doc || !doc.documentElement) {
840
+ doc = implementation.createDocument(NAMESPACE, 'template', null);
841
+ try {
842
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
843
+ } catch (_) {
844
+ // Syntax error if dirtyPayload is invalid xml
845
+ }
846
+ }
847
+ const body = doc.body || doc.documentElement;
848
+ if (dirty && leadingWhitespace) {
849
+ body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
850
+ }
851
+ /* Work on whole document or just its body */
852
+ if (NAMESPACE === HTML_NAMESPACE) {
853
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
854
+ }
855
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
856
+ };
857
+ /**
858
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
859
+ *
860
+ * @param root The root element or node to start traversing on.
861
+ * @return The created NodeIterator
862
+ */
863
+ const _createNodeIterator = function _createNodeIterator(root) {
864
+ return createNodeIterator.call(root.ownerDocument || root, root,
865
+ // eslint-disable-next-line no-bitwise
866
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
867
+ };
868
+ /**
869
+ * _isClobbered
870
+ *
871
+ * @param element element to check for clobbering attacks
872
+ * @return true if clobbered, false if safe
873
+ */
874
+ const _isClobbered = function _isClobbered(element) {
875
+ 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');
876
+ };
877
+ /**
878
+ * Checks whether the given object is a DOM node.
879
+ *
880
+ * @param value object to check whether it's a DOM node
881
+ * @return true is object is a DOM node
882
+ */
883
+ const _isNode = function _isNode(value) {
884
+ return typeof Node === 'function' && value instanceof Node;
885
+ };
886
+ function _executeHooks(hooks, currentNode, data) {
887
+ arrayForEach(hooks, hook => {
888
+ hook.call(DOMPurify, currentNode, data, CONFIG);
889
+ });
890
+ }
891
+ /**
892
+ * _sanitizeElements
893
+ *
894
+ * @protect nodeName
895
+ * @protect textContent
896
+ * @protect removeChild
897
+ * @param currentNode to check for permission to exist
898
+ * @return true if node was killed, false if left alive
899
+ */
900
+ const _sanitizeElements = function _sanitizeElements(currentNode) {
901
+ let content = null;
902
+ /* Execute a hook if present */
903
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
904
+ /* Check if element is clobbered or can clobber */
905
+ if (_isClobbered(currentNode)) {
906
+ _forceRemove(currentNode);
907
+ return true;
908
+ }
909
+ /* Now let's check the element's type and name */
910
+ const tagName = transformCaseFunc(currentNode.nodeName);
911
+ /* Execute a hook if present */
912
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
913
+ tagName,
914
+ allowedTags: ALLOWED_TAGS
915
+ });
916
+ /* Detect mXSS attempts abusing namespace confusion */
917
+ if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
918
+ _forceRemove(currentNode);
919
+ return true;
920
+ }
921
+ /* Remove any occurrence of processing instructions */
922
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
923
+ _forceRemove(currentNode);
924
+ return true;
925
+ }
926
+ /* Remove any kind of possibly harmful comments */
927
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
928
+ _forceRemove(currentNode);
929
+ return true;
930
+ }
931
+ /* Remove element if anything forbids its presence */
932
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
933
+ /* Check if we have a custom element to handle */
934
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
935
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
936
+ return false;
937
+ }
938
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
939
+ return false;
940
+ }
941
+ }
942
+ /* Keep content except for bad-listed elements */
943
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
944
+ const parentNode = getParentNode(currentNode) || currentNode.parentNode;
945
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
946
+ if (childNodes && parentNode) {
947
+ const childCount = childNodes.length;
948
+ for (let i = childCount - 1; i >= 0; --i) {
949
+ const childClone = cloneNode(childNodes[i], true);
950
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
951
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
952
+ }
953
+ }
954
+ }
955
+ _forceRemove(currentNode);
956
+ return true;
957
+ }
958
+ /* Check whether element has a valid namespace */
959
+ if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
960
+ _forceRemove(currentNode);
961
+ return true;
962
+ }
963
+ /* Make sure that older browsers don't get fallback-tag mXSS */
964
+ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
965
+ _forceRemove(currentNode);
966
+ return true;
967
+ }
968
+ /* Sanitize element content to be template-safe */
969
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
970
+ /* Get the element's text content */
971
+ content = currentNode.textContent;
972
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
973
+ content = stringReplace(content, expr, ' ');
974
+ });
975
+ if (currentNode.textContent !== content) {
976
+ arrayPush(DOMPurify.removed, {
977
+ element: currentNode.cloneNode()
978
+ });
979
+ currentNode.textContent = content;
980
+ }
981
+ }
982
+ /* Execute a hook if present */
983
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
984
+ return false;
985
+ };
986
+ /**
987
+ * _isValidAttribute
988
+ *
989
+ * @param lcTag Lowercase tag name of containing element.
990
+ * @param lcName Lowercase attribute name.
991
+ * @param value Attribute value.
992
+ * @return Returns true if `value` is valid, otherwise false.
993
+ */
994
+ // eslint-disable-next-line complexity
995
+ const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
996
+ /* Make sure attribute cannot clobber */
997
+ if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
998
+ return false;
999
+ }
1000
+ /* Allow valid data-* attributes: At least one character after "-"
1001
+ (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
1002
+ XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
1003
+ We don't need to check the value; it's always URI safe. */
1004
+ 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]) {
1005
+ if (
1006
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1007
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1008
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1009
+ _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)) ||
1010
+ // Alternative, second condition checks if it's an `is`-attribute, AND
1011
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1012
+ 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 {
1013
+ return false;
1014
+ }
1015
+ /* Check value is safe. First, is attr inert? If so, is safe */
1016
+ } 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) {
1017
+ return false;
1018
+ } else ;
1019
+ return true;
1020
+ };
1021
+ /**
1022
+ * _isBasicCustomElement
1023
+ * checks if at least one dash is included in tagName, and it's not the first char
1024
+ * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
1025
+ *
1026
+ * @param tagName name of the tag of the node to sanitize
1027
+ * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
1028
+ */
1029
+ const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
1030
+ return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
1031
+ };
1032
+ /**
1033
+ * _sanitizeAttributes
1034
+ *
1035
+ * @protect attributes
1036
+ * @protect nodeName
1037
+ * @protect removeAttribute
1038
+ * @protect setAttribute
1039
+ *
1040
+ * @param currentNode to sanitize
1041
+ */
1042
+ const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
1043
+ /* Execute a hook if present */
1044
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
1045
+ const {
1046
+ attributes
1047
+ } = currentNode;
1048
+ /* Check if we have attributes; if not we might have a text node */
1049
+ if (!attributes || _isClobbered(currentNode)) {
1050
+ return;
1051
+ }
1052
+ const hookEvent = {
1053
+ attrName: '',
1054
+ attrValue: '',
1055
+ keepAttr: true,
1056
+ allowedAttributes: ALLOWED_ATTR,
1057
+ forceKeepAttr: undefined
1058
+ };
1059
+ let l = attributes.length;
1060
+ /* Go backwards over all attributes; safely remove bad ones */
1061
+ while (l--) {
1062
+ const attr = attributes[l];
1063
+ const {
1064
+ name,
1065
+ namespaceURI,
1066
+ value: attrValue
1067
+ } = attr;
1068
+ const lcName = transformCaseFunc(name);
1069
+ let value = name === 'value' ? attrValue : stringTrim(attrValue);
1070
+ /* Execute a hook if present */
1071
+ hookEvent.attrName = lcName;
1072
+ hookEvent.attrValue = value;
1073
+ hookEvent.keepAttr = true;
1074
+ hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
1075
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
1076
+ value = hookEvent.attrValue;
1077
+ /* Full DOM Clobbering protection via namespace isolation,
1078
+ * Prefix id and name attributes with `user-content-`
1079
+ */
1080
+ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
1081
+ // Remove the attribute with this value
1082
+ _removeAttribute(name, currentNode);
1083
+ // Prefix the value and later re-create the attribute with the sanitized value
1084
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
1085
+ }
1086
+ /* Work around a security issue with comments inside attributes */
1087
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
1088
+ _removeAttribute(name, currentNode);
1089
+ continue;
1090
+ }
1091
+ /* Did the hooks approve of the attribute? */
1092
+ if (hookEvent.forceKeepAttr) {
1093
+ continue;
1094
+ }
1095
+ /* Remove attribute */
1096
+ _removeAttribute(name, currentNode);
1097
+ /* Did the hooks approve of the attribute? */
1098
+ if (!hookEvent.keepAttr) {
1099
+ continue;
1100
+ }
1101
+ /* Work around a security issue in jQuery 3.0 */
1102
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
1103
+ _removeAttribute(name, currentNode);
1104
+ continue;
1105
+ }
1106
+ /* Sanitize attribute content to be template-safe */
1107
+ if (SAFE_FOR_TEMPLATES) {
1108
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1109
+ value = stringReplace(value, expr, ' ');
1110
+ });
1111
+ }
1112
+ /* Is `value` valid for this attribute? */
1113
+ const lcTag = transformCaseFunc(currentNode.nodeName);
1114
+ if (!_isValidAttribute(lcTag, lcName, value)) {
1115
+ continue;
1116
+ }
1117
+ /* Handle attributes that require Trusted Types */
1118
+ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
1119
+ if (namespaceURI) ; else {
1120
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
1121
+ case 'TrustedHTML':
1122
+ {
1123
+ value = trustedTypesPolicy.createHTML(value);
1124
+ break;
1125
+ }
1126
+ case 'TrustedScriptURL':
1127
+ {
1128
+ value = trustedTypesPolicy.createScriptURL(value);
1129
+ break;
1130
+ }
1131
+ }
1132
+ }
1133
+ }
1134
+ /* Handle invalid data-* attribute set by try-catching it */
1135
+ try {
1136
+ if (namespaceURI) {
1137
+ currentNode.setAttributeNS(namespaceURI, name, value);
1138
+ } else {
1139
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
1140
+ currentNode.setAttribute(name, value);
1141
+ }
1142
+ if (_isClobbered(currentNode)) {
1143
+ _forceRemove(currentNode);
1144
+ } else {
1145
+ arrayPop(DOMPurify.removed);
1146
+ }
1147
+ } catch (_) {}
1148
+ }
1149
+ /* Execute a hook if present */
1150
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
1151
+ };
1152
+ /**
1153
+ * _sanitizeShadowDOM
1154
+ *
1155
+ * @param fragment to iterate over recursively
1156
+ */
1157
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
1158
+ let shadowNode = null;
1159
+ const shadowIterator = _createNodeIterator(fragment);
1160
+ /* Execute a hook if present */
1161
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
1162
+ while (shadowNode = shadowIterator.nextNode()) {
1163
+ /* Execute a hook if present */
1164
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
1165
+ /* Sanitize tags and elements */
1166
+ _sanitizeElements(shadowNode);
1167
+ /* Check attributes next */
1168
+ _sanitizeAttributes(shadowNode);
1169
+ /* Deep shadow DOM detected */
1170
+ if (shadowNode.content instanceof DocumentFragment) {
1171
+ _sanitizeShadowDOM(shadowNode.content);
1172
+ }
1173
+ }
1174
+ /* Execute a hook if present */
1175
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
1176
+ };
1177
+ // eslint-disable-next-line complexity
1178
+ DOMPurify.sanitize = function (dirty) {
1179
+ let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1180
+ let body = null;
1181
+ let importedNode = null;
1182
+ let currentNode = null;
1183
+ let returnNode = null;
1184
+ /* Make sure we have a string to sanitize.
1185
+ DO NOT return early, as this will return the wrong type if
1186
+ the user has requested a DOM object rather than a string */
1187
+ IS_EMPTY_INPUT = !dirty;
1188
+ if (IS_EMPTY_INPUT) {
1189
+ dirty = '<!-->';
1190
+ }
1191
+ /* Stringify, in case dirty is an object */
1192
+ if (typeof dirty !== 'string' && !_isNode(dirty)) {
1193
+ if (typeof dirty.toString === 'function') {
1194
+ dirty = dirty.toString();
1195
+ if (typeof dirty !== 'string') {
1196
+ throw typeErrorCreate('dirty is not a string, aborting');
1197
+ }
1198
+ } else {
1199
+ throw typeErrorCreate('toString is not a function');
1200
+ }
1201
+ }
1202
+ /* Return dirty HTML if DOMPurify cannot run */
1203
+ if (!DOMPurify.isSupported) {
1204
+ return dirty;
1205
+ }
1206
+ /* Assign config vars */
1207
+ if (!SET_CONFIG) {
1208
+ _parseConfig(cfg);
1209
+ }
1210
+ /* Clean up removed elements */
1211
+ DOMPurify.removed = [];
1212
+ /* Check if dirty is correctly typed for IN_PLACE */
1213
+ if (typeof dirty === 'string') {
1214
+ IN_PLACE = false;
1215
+ }
1216
+ if (IN_PLACE) {
1217
+ /* Do some early pre-sanitization to avoid unsafe root nodes */
1218
+ if (dirty.nodeName) {
1219
+ const tagName = transformCaseFunc(dirty.nodeName);
1220
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
1221
+ throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
1222
+ }
1223
+ }
1224
+ } else if (dirty instanceof Node) {
1225
+ /* If dirty is a DOM element, append to an empty document to avoid
1226
+ elements being stripped by the parser */
1227
+ body = _initDocument('<!---->');
1228
+ importedNode = body.ownerDocument.importNode(dirty, true);
1229
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
1230
+ /* Node is already a body, use as is */
1231
+ body = importedNode;
1232
+ } else if (importedNode.nodeName === 'HTML') {
1233
+ body = importedNode;
1234
+ } else {
1235
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1236
+ body.appendChild(importedNode);
1237
+ }
1238
+ } else {
1239
+ /* Exit directly if we have nothing to do */
1240
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
1241
+ // eslint-disable-next-line unicorn/prefer-includes
1242
+ dirty.indexOf('<') === -1) {
1243
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
1244
+ }
1245
+ /* Initialize the document to work on */
1246
+ body = _initDocument(dirty);
1247
+ /* Check we have a DOM node from the data */
1248
+ if (!body) {
1249
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
1250
+ }
1251
+ }
1252
+ /* Remove first element node (ours) if FORCE_BODY is set */
1253
+ if (body && FORCE_BODY) {
1254
+ _forceRemove(body.firstChild);
1255
+ }
1256
+ /* Get node iterator */
1257
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
1258
+ /* Now start iterating over the created document */
1259
+ while (currentNode = nodeIterator.nextNode()) {
1260
+ /* Sanitize tags and elements */
1261
+ _sanitizeElements(currentNode);
1262
+ /* Check attributes next */
1263
+ _sanitizeAttributes(currentNode);
1264
+ /* Shadow DOM detected, sanitize it */
1265
+ if (currentNode.content instanceof DocumentFragment) {
1266
+ _sanitizeShadowDOM(currentNode.content);
1267
+ }
1268
+ }
1269
+ /* If we sanitized `dirty` in-place, return it. */
1270
+ if (IN_PLACE) {
1271
+ return dirty;
1272
+ }
1273
+ /* Return sanitized string or DOM */
1274
+ if (RETURN_DOM) {
1275
+ if (RETURN_DOM_FRAGMENT) {
1276
+ returnNode = createDocumentFragment.call(body.ownerDocument);
1277
+ while (body.firstChild) {
1278
+ // eslint-disable-next-line unicorn/prefer-dom-node-append
1279
+ returnNode.appendChild(body.firstChild);
1280
+ }
1281
+ } else {
1282
+ returnNode = body;
1283
+ }
1284
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
1285
+ /*
1286
+ AdoptNode() is not used because internal state is not reset
1287
+ (e.g. the past names map of a HTMLFormElement), this is safe
1288
+ in theory but we would rather not risk another attack vector.
1289
+ The state that is cloned by importNode() is explicitly defined
1290
+ by the specs.
1291
+ */
1292
+ returnNode = importNode.call(originalDocument, returnNode, true);
1293
+ }
1294
+ return returnNode;
1295
+ }
1296
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
1297
+ /* Serialize doctype if allowed */
1298
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
1299
+ serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
1300
+ }
1301
+ /* Sanitize final string template-safe */
1302
+ if (SAFE_FOR_TEMPLATES) {
1303
+ arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
1304
+ serializedHTML = stringReplace(serializedHTML, expr, ' ');
1305
+ });
1306
+ }
1307
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
1308
+ };
1309
+ DOMPurify.setConfig = function () {
1310
+ let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1311
+ _parseConfig(cfg);
1312
+ SET_CONFIG = true;
1313
+ };
1314
+ DOMPurify.clearConfig = function () {
1315
+ CONFIG = null;
1316
+ SET_CONFIG = false;
1317
+ };
1318
+ DOMPurify.isValidAttribute = function (tag, attr, value) {
1319
+ /* Initialize shared config vars if necessary. */
1320
+ if (!CONFIG) {
1321
+ _parseConfig({});
1322
+ }
1323
+ const lcTag = transformCaseFunc(tag);
1324
+ const lcName = transformCaseFunc(attr);
1325
+ return _isValidAttribute(lcTag, lcName, value);
1326
+ };
1327
+ DOMPurify.addHook = function (entryPoint, hookFunction) {
1328
+ if (typeof hookFunction !== 'function') {
1329
+ return;
1330
+ }
1331
+ arrayPush(hooks[entryPoint], hookFunction);
1332
+ };
1333
+ DOMPurify.removeHook = function (entryPoint, hookFunction) {
1334
+ if (hookFunction !== undefined) {
1335
+ const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
1336
+ return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
1337
+ }
1338
+ return arrayPop(hooks[entryPoint]);
1339
+ };
1340
+ DOMPurify.removeHooks = function (entryPoint) {
1341
+ hooks[entryPoint] = [];
1342
+ };
1343
+ DOMPurify.removeAllHooks = function () {
1344
+ hooks = _createHooksMap();
1345
+ };
1346
+ return DOMPurify;
1347
+ }
1348
+ var purify = createDOMPurify();
1349
+
1350
+ return purify;
1351
+
1352
+ }));
1353
+
1354
+ }(purify));
1355
+
1356
+ const DOMPurify = purify.exports;
1357
+
8
1358
  /**
9
1359
  * lodash (Custom Build) <https://lodash.com/>
10
1360
  * Build: `lodash modularize exports="npm" -o ./`
@@ -20,35 +1370,141 @@ var INFINITY$1 = 1 / 0;
20
1370
  /** `Object#toString` result references. */
21
1371
  var symbolTag$1 = '[object Symbol]';
22
1372
 
1373
+ /** Used to match words composed of alphanumeric characters. */
1374
+ var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
1375
+
1376
+ /** Used to match Latin Unicode letters (excluding mathematical operators). */
1377
+ var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
1378
+
23
1379
  /** Used to compose unicode character classes. */
24
1380
  var rsAstralRange$1 = '\\ud800-\\udfff',
25
1381
  rsComboMarksRange$1 = '\\u0300-\\u036f\\ufe20-\\ufe23',
26
1382
  rsComboSymbolsRange$1 = '\\u20d0-\\u20f0',
27
- rsVarRange$1 = '\\ufe0e\\ufe0f';
1383
+ rsDingbatRange = '\\u2700-\\u27bf',
1384
+ rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
1385
+ rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
1386
+ rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
1387
+ rsPunctuationRange = '\\u2000-\\u206f',
1388
+ rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
1389
+ rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
1390
+ rsVarRange$1 = '\\ufe0e\\ufe0f',
1391
+ rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
28
1392
 
29
1393
  /** Used to compose unicode capture groups. */
30
- var rsAstral$1 = '[' + rsAstralRange$1 + ']',
1394
+ var rsApos = "['\u2019]",
1395
+ rsAstral$1 = '[' + rsAstralRange$1 + ']',
1396
+ rsBreak = '[' + rsBreakRange + ']',
31
1397
  rsCombo$1 = '[' + rsComboMarksRange$1 + rsComboSymbolsRange$1 + ']',
1398
+ rsDigits = '\\d+',
1399
+ rsDingbat = '[' + rsDingbatRange + ']',
1400
+ rsLower = '[' + rsLowerRange + ']',
1401
+ rsMisc = '[^' + rsAstralRange$1 + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
32
1402
  rsFitz$1 = '\\ud83c[\\udffb-\\udfff]',
33
1403
  rsModifier$1 = '(?:' + rsCombo$1 + '|' + rsFitz$1 + ')',
34
1404
  rsNonAstral$1 = '[^' + rsAstralRange$1 + ']',
35
1405
  rsRegional$1 = '(?:\\ud83c[\\udde6-\\uddff]){2}',
36
1406
  rsSurrPair$1 = '[\\ud800-\\udbff][\\udc00-\\udfff]',
1407
+ rsUpper = '[' + rsUpperRange + ']',
37
1408
  rsZWJ$1 = '\\u200d';
38
1409
 
39
1410
  /** Used to compose unicode regexes. */
40
- var reOptMod$1 = rsModifier$1 + '?',
1411
+ var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
1412
+ rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
1413
+ rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
1414
+ rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
1415
+ reOptMod$1 = rsModifier$1 + '?',
41
1416
  rsOptVar$1 = '[' + rsVarRange$1 + ']?',
42
1417
  rsOptJoin$1 = '(?:' + rsZWJ$1 + '(?:' + [rsNonAstral$1, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsOptVar$1 + reOptMod$1 + ')*',
43
1418
  rsSeq$1 = rsOptVar$1 + reOptMod$1 + rsOptJoin$1,
1419
+ rsEmoji = '(?:' + [rsDingbat, rsRegional$1, rsSurrPair$1].join('|') + ')' + rsSeq$1,
44
1420
  rsSymbol$1 = '(?:' + [rsNonAstral$1 + rsCombo$1 + '?', rsCombo$1, rsRegional$1, rsSurrPair$1, rsAstral$1].join('|') + ')';
45
1421
 
1422
+ /** Used to match apostrophes. */
1423
+ var reApos = RegExp(rsApos, 'g');
1424
+
1425
+ /**
1426
+ * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
1427
+ * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
1428
+ */
1429
+ var reComboMark = RegExp(rsCombo$1, 'g');
1430
+
46
1431
  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
47
1432
  var reUnicode$1 = RegExp(rsFitz$1 + '(?=' + rsFitz$1 + ')|' + rsSymbol$1 + rsSeq$1, 'g');
48
1433
 
1434
+ /** Used to match complex or compound words. */
1435
+ var reUnicodeWord = RegExp([
1436
+ rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
1437
+ rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
1438
+ rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
1439
+ rsUpper + '+' + rsOptUpperContr,
1440
+ rsDigits,
1441
+ rsEmoji
1442
+ ].join('|'), 'g');
1443
+
49
1444
  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
50
1445
  var reHasUnicode$1 = RegExp('[' + rsZWJ$1 + rsAstralRange$1 + rsComboMarksRange$1 + rsComboSymbolsRange$1 + rsVarRange$1 + ']');
51
1446
 
1447
+ /** Used to detect strings that need a more robust regexp to match words. */
1448
+ var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
1449
+
1450
+ /** Used to map Latin Unicode letters to basic Latin letters. */
1451
+ var deburredLetters = {
1452
+ // Latin-1 Supplement block.
1453
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
1454
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
1455
+ '\xc7': 'C', '\xe7': 'c',
1456
+ '\xd0': 'D', '\xf0': 'd',
1457
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
1458
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
1459
+ '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
1460
+ '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
1461
+ '\xd1': 'N', '\xf1': 'n',
1462
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
1463
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
1464
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
1465
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
1466
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
1467
+ '\xc6': 'Ae', '\xe6': 'ae',
1468
+ '\xde': 'Th', '\xfe': 'th',
1469
+ '\xdf': 'ss',
1470
+ // Latin Extended-A block.
1471
+ '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
1472
+ '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
1473
+ '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
1474
+ '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
1475
+ '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
1476
+ '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
1477
+ '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
1478
+ '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
1479
+ '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
1480
+ '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
1481
+ '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
1482
+ '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
1483
+ '\u0134': 'J', '\u0135': 'j',
1484
+ '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
1485
+ '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
1486
+ '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
1487
+ '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
1488
+ '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
1489
+ '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
1490
+ '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
1491
+ '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
1492
+ '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
1493
+ '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
1494
+ '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
1495
+ '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
1496
+ '\u0163': 't', '\u0165': 't', '\u0167': 't',
1497
+ '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
1498
+ '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
1499
+ '\u0174': 'W', '\u0175': 'w',
1500
+ '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
1501
+ '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
1502
+ '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
1503
+ '\u0132': 'IJ', '\u0133': 'ij',
1504
+ '\u0152': 'Oe', '\u0153': 'oe',
1505
+ '\u0149': "'n", '\u017f': 'ss'
1506
+ };
1507
+
52
1508
  /** Detect free variable `global` from Node.js. */
53
1509
  var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
54
1510
 
@@ -58,6 +1514,31 @@ var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && se
58
1514
  /** Used as a reference to the global object. */
59
1515
  var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
60
1516
 
1517
+ /**
1518
+ * A specialized version of `_.reduce` for arrays without support for
1519
+ * iteratee shorthands.
1520
+ *
1521
+ * @private
1522
+ * @param {Array} [array] The array to iterate over.
1523
+ * @param {Function} iteratee The function invoked per iteration.
1524
+ * @param {*} [accumulator] The initial value.
1525
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
1526
+ * the initial value.
1527
+ * @returns {*} Returns the accumulated value.
1528
+ */
1529
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
1530
+ var index = -1,
1531
+ length = array ? array.length : 0;
1532
+
1533
+ if (initAccum && length) {
1534
+ accumulator = array[++index];
1535
+ }
1536
+ while (++index < length) {
1537
+ accumulator = iteratee(accumulator, array[index], index, array);
1538
+ }
1539
+ return accumulator;
1540
+ }
1541
+
61
1542
  /**
62
1543
  * Converts an ASCII `string` to an array.
63
1544
  *
@@ -69,6 +1550,40 @@ function asciiToArray$1(string) {
69
1550
  return string.split('');
70
1551
  }
71
1552
 
1553
+ /**
1554
+ * Splits an ASCII `string` into an array of its words.
1555
+ *
1556
+ * @private
1557
+ * @param {string} The string to inspect.
1558
+ * @returns {Array} Returns the words of `string`.
1559
+ */
1560
+ function asciiWords(string) {
1561
+ return string.match(reAsciiWord) || [];
1562
+ }
1563
+
1564
+ /**
1565
+ * The base implementation of `_.propertyOf` without support for deep paths.
1566
+ *
1567
+ * @private
1568
+ * @param {Object} object The object to query.
1569
+ * @returns {Function} Returns the new accessor function.
1570
+ */
1571
+ function basePropertyOf(object) {
1572
+ return function(key) {
1573
+ return object == null ? undefined : object[key];
1574
+ };
1575
+ }
1576
+
1577
+ /**
1578
+ * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
1579
+ * letters to basic Latin letters.
1580
+ *
1581
+ * @private
1582
+ * @param {string} letter The matched letter to deburr.
1583
+ * @returns {string} Returns the deburred letter.
1584
+ */
1585
+ var deburrLetter = basePropertyOf(deburredLetters);
1586
+
72
1587
  /**
73
1588
  * Checks if `string` contains Unicode symbols.
74
1589
  *
@@ -80,6 +1595,17 @@ function hasUnicode$1(string) {
80
1595
  return reHasUnicode$1.test(string);
81
1596
  }
82
1597
 
1598
+ /**
1599
+ * Checks if `string` contains a word composed of Unicode symbols.
1600
+ *
1601
+ * @private
1602
+ * @param {string} string The string to inspect.
1603
+ * @returns {boolean} Returns `true` if a word is found, else `false`.
1604
+ */
1605
+ function hasUnicodeWord(string) {
1606
+ return reHasUnicodeWord.test(string);
1607
+ }
1608
+
83
1609
  /**
84
1610
  * Converts `string` to an array.
85
1611
  *
@@ -104,6 +1630,17 @@ function unicodeToArray$1(string) {
104
1630
  return string.match(reUnicode$1) || [];
105
1631
  }
106
1632
 
1633
+ /**
1634
+ * Splits a Unicode `string` into an array of its words.
1635
+ *
1636
+ * @private
1637
+ * @param {string} The string to inspect.
1638
+ * @returns {Array} Returns the words of `string`.
1639
+ */
1640
+ function unicodeWords(string) {
1641
+ return string.match(reUnicodeWord) || [];
1642
+ }
1643
+
107
1644
  /** Used for built-in method references. */
108
1645
  var objectProto$1 = Object.prototype;
109
1646
 
@@ -213,6 +1750,19 @@ function createCaseFirst$1(methodName) {
213
1750
  };
214
1751
  }
215
1752
 
1753
+ /**
1754
+ * Creates a function like `_.camelCase`.
1755
+ *
1756
+ * @private
1757
+ * @param {Function} callback The function to combine each word.
1758
+ * @returns {Function} Returns the new compounder function.
1759
+ */
1760
+ function createCompounder(callback) {
1761
+ return function(string) {
1762
+ return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
1763
+ };
1764
+ }
1765
+
216
1766
  /**
217
1767
  * Checks if `value` is object-like. A value is object-like if it's not `null`
218
1768
  * and has a `typeof` result of "object".
@@ -288,6 +1838,73 @@ function toString$1(value) {
288
1838
  return value == null ? '' : baseToString$1(value);
289
1839
  }
290
1840
 
1841
+ /**
1842
+ * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
1843
+ *
1844
+ * @static
1845
+ * @memberOf _
1846
+ * @since 3.0.0
1847
+ * @category String
1848
+ * @param {string} [string=''] The string to convert.
1849
+ * @returns {string} Returns the camel cased string.
1850
+ * @example
1851
+ *
1852
+ * _.camelCase('Foo Bar');
1853
+ * // => 'fooBar'
1854
+ *
1855
+ * _.camelCase('--foo-bar--');
1856
+ * // => 'fooBar'
1857
+ *
1858
+ * _.camelCase('__FOO_BAR__');
1859
+ * // => 'fooBar'
1860
+ */
1861
+ var camelCase = createCompounder(function(result, word, index) {
1862
+ word = word.toLowerCase();
1863
+ return result + (index ? capitalize(word) : word);
1864
+ });
1865
+
1866
+ /**
1867
+ * Converts the first character of `string` to upper case and the remaining
1868
+ * to lower case.
1869
+ *
1870
+ * @static
1871
+ * @memberOf _
1872
+ * @since 3.0.0
1873
+ * @category String
1874
+ * @param {string} [string=''] The string to capitalize.
1875
+ * @returns {string} Returns the capitalized string.
1876
+ * @example
1877
+ *
1878
+ * _.capitalize('FRED');
1879
+ * // => 'Fred'
1880
+ */
1881
+ function capitalize(string) {
1882
+ return upperFirst$1(toString$1(string).toLowerCase());
1883
+ }
1884
+
1885
+ /**
1886
+ * Deburrs `string` by converting
1887
+ * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
1888
+ * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
1889
+ * letters to basic Latin letters and removing
1890
+ * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
1891
+ *
1892
+ * @static
1893
+ * @memberOf _
1894
+ * @since 3.0.0
1895
+ * @category String
1896
+ * @param {string} [string=''] The string to deburr.
1897
+ * @returns {string} Returns the deburred string.
1898
+ * @example
1899
+ *
1900
+ * _.deburr('déjà vu');
1901
+ * // => 'deja vu'
1902
+ */
1903
+ function deburr(string) {
1904
+ string = toString$1(string);
1905
+ return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
1906
+ }
1907
+
291
1908
  /**
292
1909
  * Converts the first character of `string` to upper case.
293
1910
  *
@@ -307,7 +1924,36 @@ function toString$1(value) {
307
1924
  */
308
1925
  var upperFirst$1 = createCaseFirst$1('toUpperCase');
309
1926
 
310
- var lodash_upperfirst = upperFirst$1;
1927
+ /**
1928
+ * Splits `string` into an array of its words.
1929
+ *
1930
+ * @static
1931
+ * @memberOf _
1932
+ * @since 3.0.0
1933
+ * @category String
1934
+ * @param {string} [string=''] The string to inspect.
1935
+ * @param {RegExp|string} [pattern] The pattern to match words.
1936
+ * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
1937
+ * @returns {Array} Returns the words of `string`.
1938
+ * @example
1939
+ *
1940
+ * _.words('fred, barney, & pebbles');
1941
+ * // => ['fred', 'barney', 'pebbles']
1942
+ *
1943
+ * _.words('fred, barney, & pebbles', /[^, ]+/g);
1944
+ * // => ['fred', 'barney', '&', 'pebbles']
1945
+ */
1946
+ function words(string, pattern, guard) {
1947
+ string = toString$1(string);
1948
+ pattern = guard ? undefined : pattern;
1949
+
1950
+ if (pattern === undefined) {
1951
+ return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
1952
+ }
1953
+ return string.match(pattern) || [];
1954
+ }
1955
+
1956
+ var lodash_camelcase = camelCase;
311
1957
 
312
1958
  /**
313
1959
  * lodash (Custom Build) <https://lodash.com/>
@@ -324,141 +1970,35 @@ var INFINITY = 1 / 0;
324
1970
  /** `Object#toString` result references. */
325
1971
  var symbolTag = '[object Symbol]';
326
1972
 
327
- /** Used to match words composed of alphanumeric characters. */
328
- var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
329
-
330
- /** Used to match Latin Unicode letters (excluding mathematical operators). */
331
- var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
332
-
333
1973
  /** Used to compose unicode character classes. */
334
1974
  var rsAstralRange = '\\ud800-\\udfff',
335
1975
  rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
336
1976
  rsComboSymbolsRange = '\\u20d0-\\u20f0',
337
- rsDingbatRange = '\\u2700-\\u27bf',
338
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
339
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
340
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
341
- rsPunctuationRange = '\\u2000-\\u206f',
342
- rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
343
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
344
- rsVarRange = '\\ufe0e\\ufe0f',
345
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
1977
+ rsVarRange = '\\ufe0e\\ufe0f';
346
1978
 
347
1979
  /** Used to compose unicode capture groups. */
348
- var rsApos = "['\u2019]",
349
- rsAstral = '[' + rsAstralRange + ']',
350
- rsBreak = '[' + rsBreakRange + ']',
1980
+ var rsAstral = '[' + rsAstralRange + ']',
351
1981
  rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
352
- rsDigits = '\\d+',
353
- rsDingbat = '[' + rsDingbatRange + ']',
354
- rsLower = '[' + rsLowerRange + ']',
355
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
356
1982
  rsFitz = '\\ud83c[\\udffb-\\udfff]',
357
1983
  rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
358
1984
  rsNonAstral = '[^' + rsAstralRange + ']',
359
1985
  rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
360
1986
  rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
361
- rsUpper = '[' + rsUpperRange + ']',
362
1987
  rsZWJ = '\\u200d';
363
1988
 
364
1989
  /** Used to compose unicode regexes. */
365
- var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
366
- rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
367
- rsOptLowerContr = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
368
- rsOptUpperContr = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
369
- reOptMod = rsModifier + '?',
1990
+ var reOptMod = rsModifier + '?',
370
1991
  rsOptVar = '[' + rsVarRange + ']?',
371
1992
  rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
372
1993
  rsSeq = rsOptVar + reOptMod + rsOptJoin,
373
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
374
1994
  rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
375
1995
 
376
- /** Used to match apostrophes. */
377
- var reApos = RegExp(rsApos, 'g');
378
-
379
- /**
380
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
381
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
382
- */
383
- var reComboMark = RegExp(rsCombo, 'g');
384
-
385
1996
  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
386
- var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
387
-
388
- /** Used to match complex or compound words. */
389
- var reUnicodeWord = RegExp([
390
- rsUpper + '?' + rsLower + '+' + rsOptLowerContr + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
391
- rsUpperMisc + '+' + rsOptUpperContr + '(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
392
- rsUpper + '?' + rsLowerMisc + '+' + rsOptLowerContr,
393
- rsUpper + '+' + rsOptUpperContr,
394
- rsDigits,
395
- rsEmoji
396
- ].join('|'), 'g');
1997
+ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
397
1998
 
398
1999
  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
399
2000
  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
400
2001
 
401
- /** Used to detect strings that need a more robust regexp to match words. */
402
- var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
403
-
404
- /** Used to map Latin Unicode letters to basic Latin letters. */
405
- var deburredLetters = {
406
- // Latin-1 Supplement block.
407
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
408
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
409
- '\xc7': 'C', '\xe7': 'c',
410
- '\xd0': 'D', '\xf0': 'd',
411
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
412
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
413
- '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
414
- '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
415
- '\xd1': 'N', '\xf1': 'n',
416
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
417
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
418
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
419
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
420
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
421
- '\xc6': 'Ae', '\xe6': 'ae',
422
- '\xde': 'Th', '\xfe': 'th',
423
- '\xdf': 'ss',
424
- // Latin Extended-A block.
425
- '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
426
- '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
427
- '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
428
- '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
429
- '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
430
- '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
431
- '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
432
- '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
433
- '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
434
- '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
435
- '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
436
- '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
437
- '\u0134': 'J', '\u0135': 'j',
438
- '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
439
- '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
440
- '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
441
- '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
442
- '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
443
- '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
444
- '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
445
- '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
446
- '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
447
- '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
448
- '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
449
- '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
450
- '\u0163': 't', '\u0165': 't', '\u0167': 't',
451
- '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
452
- '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
453
- '\u0174': 'W', '\u0175': 'w',
454
- '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
455
- '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
456
- '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
457
- '\u0132': 'IJ', '\u0133': 'ij',
458
- '\u0152': 'Oe', '\u0153': 'oe',
459
- '\u0149': "'n", '\u017f': 'ss'
460
- };
461
-
462
2002
  /** Detect free variable `global` from Node.js. */
463
2003
  var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
464
2004
 
@@ -468,31 +2008,6 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self
468
2008
  /** Used as a reference to the global object. */
469
2009
  var root = freeGlobal || freeSelf || Function('return this')();
470
2010
 
471
- /**
472
- * A specialized version of `_.reduce` for arrays without support for
473
- * iteratee shorthands.
474
- *
475
- * @private
476
- * @param {Array} [array] The array to iterate over.
477
- * @param {Function} iteratee The function invoked per iteration.
478
- * @param {*} [accumulator] The initial value.
479
- * @param {boolean} [initAccum] Specify using the first element of `array` as
480
- * the initial value.
481
- * @returns {*} Returns the accumulated value.
482
- */
483
- function arrayReduce(array, iteratee, accumulator, initAccum) {
484
- var index = -1,
485
- length = array ? array.length : 0;
486
-
487
- if (initAccum && length) {
488
- accumulator = array[++index];
489
- }
490
- while (++index < length) {
491
- accumulator = iteratee(accumulator, array[index], index, array);
492
- }
493
- return accumulator;
494
- }
495
-
496
2011
  /**
497
2012
  * Converts an ASCII `string` to an array.
498
2013
  *
@@ -504,40 +2019,6 @@ function asciiToArray(string) {
504
2019
  return string.split('');
505
2020
  }
506
2021
 
507
- /**
508
- * Splits an ASCII `string` into an array of its words.
509
- *
510
- * @private
511
- * @param {string} The string to inspect.
512
- * @returns {Array} Returns the words of `string`.
513
- */
514
- function asciiWords(string) {
515
- return string.match(reAsciiWord) || [];
516
- }
517
-
518
- /**
519
- * The base implementation of `_.propertyOf` without support for deep paths.
520
- *
521
- * @private
522
- * @param {Object} object The object to query.
523
- * @returns {Function} Returns the new accessor function.
524
- */
525
- function basePropertyOf(object) {
526
- return function(key) {
527
- return object == null ? undefined : object[key];
528
- };
529
- }
530
-
531
- /**
532
- * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
533
- * letters to basic Latin letters.
534
- *
535
- * @private
536
- * @param {string} letter The matched letter to deburr.
537
- * @returns {string} Returns the deburred letter.
538
- */
539
- var deburrLetter = basePropertyOf(deburredLetters);
540
-
541
2022
  /**
542
2023
  * Checks if `string` contains Unicode symbols.
543
2024
  *
@@ -549,17 +2030,6 @@ function hasUnicode(string) {
549
2030
  return reHasUnicode.test(string);
550
2031
  }
551
2032
 
552
- /**
553
- * Checks if `string` contains a word composed of Unicode symbols.
554
- *
555
- * @private
556
- * @param {string} string The string to inspect.
557
- * @returns {boolean} Returns `true` if a word is found, else `false`.
558
- */
559
- function hasUnicodeWord(string) {
560
- return reHasUnicodeWord.test(string);
561
- }
562
-
563
2033
  /**
564
2034
  * Converts `string` to an array.
565
2035
  *
@@ -584,17 +2054,6 @@ function unicodeToArray(string) {
584
2054
  return string.match(reUnicode) || [];
585
2055
  }
586
2056
 
587
- /**
588
- * Splits a Unicode `string` into an array of its words.
589
- *
590
- * @private
591
- * @param {string} The string to inspect.
592
- * @returns {Array} Returns the words of `string`.
593
- */
594
- function unicodeWords(string) {
595
- return string.match(reUnicodeWord) || [];
596
- }
597
-
598
2057
  /** Used for built-in method references. */
599
2058
  var objectProto = Object.prototype;
600
2059
 
@@ -704,19 +2163,6 @@ function createCaseFirst(methodName) {
704
2163
  };
705
2164
  }
706
2165
 
707
- /**
708
- * Creates a function like `_.camelCase`.
709
- *
710
- * @private
711
- * @param {Function} callback The function to combine each word.
712
- * @returns {Function} Returns the new compounder function.
713
- */
714
- function createCompounder(callback) {
715
- return function(string) {
716
- return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
717
- };
718
- }
719
-
720
2166
  /**
721
2167
  * Checks if `value` is object-like. A value is object-like if it's not `null`
722
2168
  * and has a `typeof` result of "object".
@@ -792,73 +2238,6 @@ function toString(value) {
792
2238
  return value == null ? '' : baseToString(value);
793
2239
  }
794
2240
 
795
- /**
796
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
797
- *
798
- * @static
799
- * @memberOf _
800
- * @since 3.0.0
801
- * @category String
802
- * @param {string} [string=''] The string to convert.
803
- * @returns {string} Returns the camel cased string.
804
- * @example
805
- *
806
- * _.camelCase('Foo Bar');
807
- * // => 'fooBar'
808
- *
809
- * _.camelCase('--foo-bar--');
810
- * // => 'fooBar'
811
- *
812
- * _.camelCase('__FOO_BAR__');
813
- * // => 'fooBar'
814
- */
815
- var camelCase = createCompounder(function(result, word, index) {
816
- word = word.toLowerCase();
817
- return result + (index ? capitalize(word) : word);
818
- });
819
-
820
- /**
821
- * Converts the first character of `string` to upper case and the remaining
822
- * to lower case.
823
- *
824
- * @static
825
- * @memberOf _
826
- * @since 3.0.0
827
- * @category String
828
- * @param {string} [string=''] The string to capitalize.
829
- * @returns {string} Returns the capitalized string.
830
- * @example
831
- *
832
- * _.capitalize('FRED');
833
- * // => 'Fred'
834
- */
835
- function capitalize(string) {
836
- return upperFirst(toString(string).toLowerCase());
837
- }
838
-
839
- /**
840
- * Deburrs `string` by converting
841
- * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
842
- * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
843
- * letters to basic Latin letters and removing
844
- * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
845
- *
846
- * @static
847
- * @memberOf _
848
- * @since 3.0.0
849
- * @category String
850
- * @param {string} [string=''] The string to deburr.
851
- * @returns {string} Returns the deburred string.
852
- * @example
853
- *
854
- * _.deburr('déjà vu');
855
- * // => 'deja vu'
856
- */
857
- function deburr(string) {
858
- string = toString(string);
859
- return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
860
- }
861
-
862
2241
  /**
863
2242
  * Converts the first character of `string` to upper case.
864
2243
  *
@@ -878,38 +2257,9 @@ function deburr(string) {
878
2257
  */
879
2258
  var upperFirst = createCaseFirst('toUpperCase');
880
2259
 
881
- /**
882
- * Splits `string` into an array of its words.
883
- *
884
- * @static
885
- * @memberOf _
886
- * @since 3.0.0
887
- * @category String
888
- * @param {string} [string=''] The string to inspect.
889
- * @param {RegExp|string} [pattern] The pattern to match words.
890
- * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
891
- * @returns {Array} Returns the words of `string`.
892
- * @example
893
- *
894
- * _.words('fred, barney, & pebbles');
895
- * // => ['fred', 'barney', 'pebbles']
896
- *
897
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
898
- * // => ['fred', 'barney', '&', 'pebbles']
899
- */
900
- function words(string, pattern, guard) {
901
- string = toString(string);
902
- pattern = guard ? undefined : pattern;
903
-
904
- if (pattern === undefined) {
905
- return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
906
- }
907
- return string.match(pattern) || [];
908
- }
909
-
910
- var lodash_camelcase = camelCase;
2260
+ var lodash_upperfirst = upperFirst;
911
2261
 
912
- const balIconCss = ":root,:host{--bal-icon-color-grey:var(--bal-color-grey-5);--bal-icon-color-grey-light:var(--bal-color-border-grey-dark);--bal-icon-color-grey-dark:var(--bal-color-grey-6);--bal-icon-color-success:var(--bal-color-success);--bal-icon-color-success-dark:var(--bal-color-success-5);--bal-icon-color-success-darker:var(--bal-color-success-6);--bal-icon-color-warning:var(--bal-color-warning);--bal-icon-color-warning-dark:var(--bal-color-warning-5);--bal-icon-color-warning-darker:var(--bal-color-warning-6);--bal-icon-color-danger:var(--bal-color-danger);--bal-icon-color-danger-dark:var(--bal-color-danger-5);--bal-icon-color-danger-darker:var(--bal-color-danger-6);--bal-icon-color-primary:var(--bal-color-primary);--bal-icon-color-primary-dark:var(--bal-color-primary-6);--bal-icon-color-blue:var(--bal-color-primary);--bal-icon-color-light-blue:var(--bal-color-light-blue-5);--bal-icon-color-primary-light:var(--bal-color-primary-3);--bal-icon-color-white:var(--bal-color-white)}.bal-icon{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:static;pointer-events:visible;width:1.125rem;max-height:1.125rem}.bal-icon--shadow svg{-webkit-filter:drop-shadow(0px 0px 5rem rgba(0, 0, 0, 0.5));filter:drop-shadow(0px 0px 5rem rgba(0, 0, 0, 0.5))}.bal-icon--is-inline{display:-ms-inline-flexbox;display:inline-flex}.bal-icon__inner{display:block;position:static;-webkit-transition:-webkit-transform .2s ease-in-out;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out, -webkit-transform .2s ease-in-out;padding:.063rem;width:1.125rem;max-height:1.125rem}.bal-icon__inner--turn-plus{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.bal-icon__inner--turn-caret-down,.bal-icon__inner--turn-caret-up{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.bal-icon__inner--turn-nav-go-down{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.bal-icon__inner>svg{vertical-align:top}.bal-icon--is-xsmall{width:.75rem;max-height:.75rem}.bal-icon--is-x-small{width:.75rem;max-height:.75rem}.bal-icon--is-small{width:.875rem;max-height:.875rem}.bal-icon--is-medium{width:1.625rem;max-height:1.625rem}.bal-icon--is-large{width:2.5rem;max-height:2.5rem;padding:0}.bal-icon--is-x-large{width:5rem;max-height:5rem;padding:0}.bal-icon--is-xx-large{width:11rem;max-height:11rem;padding:0}.bal-icon--is-grey svg,.bal-icon--is-grey g,.bal-icon--is-grey path,.bal-icon--is-grey circle{fill:var(--bal-icon-color-grey)}.bal-icon--is-grey-light svg,.bal-icon--is-grey-light g,.bal-icon--is-grey-light path,.bal-icon--is-grey-light circle{fill:var(--bal-icon-color-grey-light)}.bal-icon--is-grey-dark svg,.bal-icon--is-grey-dark g,.bal-icon--is-grey-dark path,.bal-icon--is-grey-dark circle{fill:var(--bal-icon-color-grey-dark)}.bal-icon--is-success svg,.bal-icon--is-success g,.bal-icon--is-success path,.bal-icon--is-success circle{fill:var(--bal-icon-color-success)}.bal-icon--is-success-dark svg,.bal-icon--is-success-dark g,.bal-icon--is-success-dark path,.bal-icon--is-success-dark circle{fill:var(--bal-icon-color-success-dark)}.bal-icon--is-success-darker svg,.bal-icon--is-success-darker g,.bal-icon--is-success-darker path,.bal-icon--is-success-darker circle{fill:var(--bal-icon-color-success-darker)}.bal-icon--is-warning svg,.bal-icon--is-warning g,.bal-icon--is-warning path,.bal-icon--is-warning circle{fill:var(--bal-icon-color-warning)}.bal-icon--is-warning-dark svg,.bal-icon--is-warning-dark g,.bal-icon--is-warning-dark path,.bal-icon--is-warning-dark circle{fill:var(--bal-icon-color-warning-dark)}.bal-icon--is-warning-darker svg,.bal-icon--is-warning-darker g,.bal-icon--is-warning-darker path,.bal-icon--is-warning-darker circle{fill:var(--bal-icon-color-warning-darker)}.bal-icon--is-danger svg,.bal-icon--is-danger g,.bal-icon--is-danger path,.bal-icon--is-danger circle{fill:var(--bal-icon-color-danger)}.bal-icon--is-danger-dark svg,.bal-icon--is-danger-dark g,.bal-icon--is-danger-dark path,.bal-icon--is-danger-dark circle{fill:var(--bal-icon-color-danger-dark)}.bal-icon--is-danger-darker svg,.bal-icon--is-danger-darker g,.bal-icon--is-danger-darker path,.bal-icon--is-danger-darker circle{fill:var(--bal-icon-color-danger-darker)}.bal-icon--is-primary svg,.bal-icon--is-primary g,.bal-icon--is-primary path,.bal-icon--is-primary circle{fill:var(--bal-icon-color-primary)}.bal-icon--is-primary-dark svg,.bal-icon--is-primary-dark g,.bal-icon--is-primary-dark path,.bal-icon--is-primary-dark circle{fill:var(--bal-icon-color-primary-dark)}.bal-icon--is-blue svg,.bal-icon--is-blue g,.bal-icon--is-blue path,.bal-icon--is-blue circle{fill:var(--bal-icon-color-blue)}.bal-icon--is-light-blue svg,.bal-icon--is-light-blue g,.bal-icon--is-light-blue path,.bal-icon--is-light-blue circle{fill:var(--bal-icon-color-light-blue)}.bal-icon--is-primary-light svg,.bal-icon--is-primary-light g,.bal-icon--is-primary-light path,.bal-icon--is-primary-light circle{fill:var(--bal-icon-color-primary-light)}.bal-icon--is-white svg,.bal-icon--is-white g,.bal-icon--is-white path,.bal-icon--is-white circle,.bal-icon--is-inverted svg,.bal-icon--is-inverted g,.bal-icon--is-inverted path,.bal-icon--is-inverted circle{fill:var(--bal-icon-color-white)}.icon-text{-ms-flex-align:center;align-items:center;color:inherit;display:-ms-inline-flexbox;display:inline-flex;vertical-align:top;-ms-flex-wrap:nowrap;flex-wrap:nowrap;word-break:break-word;line-height:1.5rem}.icon-text.is-small{line-height:1.75rem}.icon-text.is-medium{line-height:1.5rem}.icon-text.is-large{line-height:3rem}.icon-text.is-x-large{line-height:4rem}.icon-text.is-xlarge{line-height:4rem}.icon-text .icon{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.icon-text .icon:not(:last-child){margin-right:.5rem}.icon-text .icon:not(:first-child){margin-right:.5rem}div.icon-text{display:-ms-flexbox;display:flex}";
2262
+ const balIconCss = ":root,:host{--bal-icon-color-grey:var(--bal-color-grey-5);--bal-icon-color-grey-light:var(--bal-color-border-grey-dark);--bal-icon-color-grey-dark:var(--bal-color-grey-6);--bal-icon-color-success:var(--bal-color-success);--bal-icon-color-success-dark:var(--bal-color-success-5);--bal-icon-color-success-darker:var(--bal-color-success-6);--bal-icon-color-warning:var(--bal-color-warning);--bal-icon-color-warning-dark:var(--bal-color-warning-5);--bal-icon-color-warning-darker:var(--bal-color-warning-6);--bal-icon-color-danger:var(--bal-color-danger);--bal-icon-color-danger-dark:var(--bal-color-danger-5);--bal-icon-color-danger-darker:var(--bal-color-danger-6);--bal-icon-color-primary:var(--bal-color-primary);--bal-icon-color-primary-dark:var(--bal-color-primary-6);--bal-icon-color-blue:var(--bal-color-primary);--bal-icon-color-light-blue:var(--bal-color-light-blue-5);--bal-icon-color-primary-light:var(--bal-color-primary-3);--bal-icon-color-white:var(--bal-color-white)}.bal-icon{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:static;pointer-events:visible;width:1.125rem;max-height:1.125rem}.bal-icon--shadow svg{-webkit-filter:drop-shadow(0px 0px 5rem rgba(0, 0, 0, 0.5));filter:drop-shadow(0px 0px 5rem rgba(0, 0, 0, 0.5))}.bal-icon--is-inline{display:-ms-inline-flexbox;display:inline-flex}.bal-icon__inner{display:block;position:static;-webkit-transition:-webkit-transform .2s ease-in-out;transition:-webkit-transform .2s ease-in-out;transition:transform .2s ease-in-out;transition:transform .2s ease-in-out, -webkit-transform .2s ease-in-out;padding:.063rem;width:1.125rem;max-height:1.125rem}.bal-icon__inner--turn-plus{-webkit-transform:rotate(225deg);transform:rotate(225deg)}.bal-icon__inner--turn-caret-down,.bal-icon__inner--turn-caret-up{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.bal-icon__inner--turn-nav-go-down{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.bal-icon__inner>svg{vertical-align:top}.bal-icon--is-xsmall{width:.75rem;max-height:.75rem}.bal-icon--is-x-small{width:.75rem;max-height:.75rem}.bal-icon--is-small{width:.875rem;max-height:.875rem}.bal-icon--is-medium{width:1.625rem;max-height:1.625rem}.bal-icon--is-large{width:2.5rem;max-height:2.5rem;padding:0}.bal-icon--is-x-large{width:5rem;max-height:5rem;padding:0}.bal-icon--is-xx-large{width:11rem;max-height:11rem;padding:0}.bal-icon--tile{background:var(--bal-color-purple-1);border-radius:var(--bal-radius-normal);height:2rem;width:2rem;max-height:2rem}@media screen and (min-width: 769px),print{.bal-icon--tile{height:3.5rem;width:3.5rem;max-height:3.5rem}}.bal-icon--tile-color-green{background:var(--bal-color-green-1)}.bal-icon--tile-color-red{background:var(--bal-color-red-1)}.bal-icon--tile-color-yellow{background:var(--bal-color-yellow-1)}.bal-icon__inner--tile{width:2rem;max-height:2rem}@media screen and (min-width: 769px),print{.bal-icon__inner--tile{width:3rem;max-height:3rem}}.bal-icon--is-grey svg,.bal-icon--is-grey g,.bal-icon--is-grey path,.bal-icon--is-grey circle{fill:var(--bal-icon-color-grey)}.bal-icon--is-grey-light svg,.bal-icon--is-grey-light g,.bal-icon--is-grey-light path,.bal-icon--is-grey-light circle{fill:var(--bal-icon-color-grey-light)}.bal-icon--is-grey-dark svg,.bal-icon--is-grey-dark g,.bal-icon--is-grey-dark path,.bal-icon--is-grey-dark circle{fill:var(--bal-icon-color-grey-dark)}.bal-icon--is-success svg,.bal-icon--is-success g,.bal-icon--is-success path,.bal-icon--is-success circle{fill:var(--bal-icon-color-success)}.bal-icon--is-success-dark svg,.bal-icon--is-success-dark g,.bal-icon--is-success-dark path,.bal-icon--is-success-dark circle{fill:var(--bal-icon-color-success-dark)}.bal-icon--is-success-darker svg,.bal-icon--is-success-darker g,.bal-icon--is-success-darker path,.bal-icon--is-success-darker circle{fill:var(--bal-icon-color-success-darker)}.bal-icon--is-warning svg,.bal-icon--is-warning g,.bal-icon--is-warning path,.bal-icon--is-warning circle{fill:var(--bal-icon-color-warning)}.bal-icon--is-warning-dark svg,.bal-icon--is-warning-dark g,.bal-icon--is-warning-dark path,.bal-icon--is-warning-dark circle{fill:var(--bal-icon-color-warning-dark)}.bal-icon--is-warning-darker svg,.bal-icon--is-warning-darker g,.bal-icon--is-warning-darker path,.bal-icon--is-warning-darker circle{fill:var(--bal-icon-color-warning-darker)}.bal-icon--is-danger svg,.bal-icon--is-danger g,.bal-icon--is-danger path,.bal-icon--is-danger circle{fill:var(--bal-icon-color-danger)}.bal-icon--is-danger-dark svg,.bal-icon--is-danger-dark g,.bal-icon--is-danger-dark path,.bal-icon--is-danger-dark circle{fill:var(--bal-icon-color-danger-dark)}.bal-icon--is-danger-darker svg,.bal-icon--is-danger-darker g,.bal-icon--is-danger-darker path,.bal-icon--is-danger-darker circle{fill:var(--bal-icon-color-danger-darker)}.bal-icon--is-primary svg,.bal-icon--is-primary g,.bal-icon--is-primary path,.bal-icon--is-primary circle{fill:var(--bal-icon-color-primary)}.bal-icon--is-primary-dark svg,.bal-icon--is-primary-dark g,.bal-icon--is-primary-dark path,.bal-icon--is-primary-dark circle{fill:var(--bal-icon-color-primary-dark)}.bal-icon--is-blue svg,.bal-icon--is-blue g,.bal-icon--is-blue path,.bal-icon--is-blue circle{fill:var(--bal-icon-color-blue)}.bal-icon--is-light-blue svg,.bal-icon--is-light-blue g,.bal-icon--is-light-blue path,.bal-icon--is-light-blue circle{fill:var(--bal-icon-color-light-blue)}.bal-icon--is-primary-light svg,.bal-icon--is-primary-light g,.bal-icon--is-primary-light path,.bal-icon--is-primary-light circle{fill:var(--bal-icon-color-primary-light)}.bal-icon--is-white svg,.bal-icon--is-white g,.bal-icon--is-white path,.bal-icon--is-white circle,.bal-icon--is-inverted svg,.bal-icon--is-inverted g,.bal-icon--is-inverted path,.bal-icon--is-inverted circle{fill:var(--bal-icon-color-white)}.icon-text{-ms-flex-align:center;align-items:center;color:inherit;display:-ms-inline-flexbox;display:inline-flex;vertical-align:top;-ms-flex-wrap:nowrap;flex-wrap:nowrap;word-break:break-word;line-height:1.5rem}.icon-text.is-small{line-height:1.75rem}.icon-text.is-medium{line-height:1.5rem}.icon-text.is-large{line-height:3rem}.icon-text.is-x-large{line-height:4rem}.icon-text.is-xlarge{line-height:4rem}.icon-text .icon{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}.icon-text .icon:not(:last-child){margin-right:.5rem}.icon-text .icon:not(:first-child){margin-right:.5rem}div.icon-text{display:-ms-flexbox;display:flex}";
913
2263
  const BalIconStyle0 = balIconCss;
914
2264
 
915
2265
  const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
@@ -920,7 +2270,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
920
2270
  * PRIVATE METHODS
921
2271
  * ------------------------------------------------------
922
2272
  */
923
- this.svgContent = (iconName) => {
2273
+ this.generateSvgContent = (iconName) => {
924
2274
  const hasIcons = Object.keys(this.icons).length > 0;
925
2275
  if (hasIcons && iconName && iconName.length > 0) {
926
2276
  // We are doing this to avoid breaking change.
@@ -932,16 +2282,22 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
932
2282
  }
933
2283
  const icon = this.icons[`balIcon${lodash_upperfirst(lodash_camelcase(iconName))}`];
934
2284
  if (icon) {
935
- return icon;
2285
+ this.svgContent = icon;
2286
+ return;
936
2287
  }
937
2288
  }
938
- return this.svg || '';
2289
+ this.svgContent = DOMPurify.sanitize(this.svg) || '';
939
2290
  };
940
2291
  this.icons = defaultConfig.icons;
2292
+ this.svgContent = '';
2293
+ this.innerColor = '';
2294
+ this.innerSize = '';
941
2295
  this.name = '';
942
2296
  this.svg = '';
943
2297
  this.size = '';
944
2298
  this.color = '';
2299
+ this.tile = false;
2300
+ this.tileColor = '';
945
2301
  this.inline = false;
946
2302
  this.inverted = false;
947
2303
  this.turn = false;
@@ -951,6 +2307,19 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
951
2307
  this.hovered = false;
952
2308
  this.pressed = false;
953
2309
  }
2310
+ nameChanged() {
2311
+ this.generateSvgContent(this.name);
2312
+ }
2313
+ svgChanged() {
2314
+ this.generateSvgContent(this.name);
2315
+ }
2316
+ /**
2317
+ * LIFE CYCLE
2318
+ * ------------------------------------------------------
2319
+ */
2320
+ connectedCallback() {
2321
+ this.generateSvgContent(this.name);
2322
+ }
954
2323
  /**
955
2324
  * LISTENERS
956
2325
  * ------------------------------------------------------
@@ -960,6 +2329,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
960
2329
  */
961
2330
  async configChanged(state) {
962
2331
  this.icons = state.icons;
2332
+ this.generateSvgContent(this.name);
963
2333
  }
964
2334
  parseColor() {
965
2335
  if (!!this.disabled) {
@@ -1014,15 +2384,20 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
1014
2384
  render() {
1015
2385
  const color = this.parseColor();
1016
2386
  const block = BEM.block('icon');
1017
- const svgContent = this.svgContent(this.name);
1018
- return (h(Host, { key: '8a997585e6ac61a483a4d417707bfb38ee4240bb', "aria-hidden": "true", class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('is-inverted').class(this.inverted)), block.modifier('is-inline').class(this.inline)), block.modifier('shadow').class(this.shadow)), block.modifier(`is-${this.size}`).class(!!this.size)), block.modifier(`is-${color}`).class()) }, h("div", { key: '1978890263e8a3fd0a4551ff67f84f16c378989e', class: Object.assign(Object.assign(Object.assign({}, block.element('inner').class()), block.element('inner').modifier(`turn-${this.name}`).class(this.turn)), block.modifier(`is-${this.size}`).class(!!this.size)), innerHTML: svgContent })));
2387
+ return (h(Host, { key: '7878580914412bb12603f9854d765106c7acc5ef', "aria-hidden": "true", class: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier('tile').class(this.tile)), block.modifier(`tile-color-${this.tileColor}`).class(this.tile && !!this.tileColor)), block.modifier('is-inverted').class(this.inverted)), block.modifier('is-inline').class(this.inline)), block.modifier('shadow').class(this.shadow)), block.modifier(`is-${this.size}`).class(!!this.size)), block.modifier(`is-${color}`).class()) }, h("div", { key: '3ca28f2b9329ccb31c4bc435e2c0e2b416681167', class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.element('inner').class()), block.element('inner').modifier(`turn-${this.name}`).class(this.turn)), block.element('inner').modifier('tile').class(this.tile)), block.modifier(`is-${this.size}`).class(!!this.size)), innerHTML: this.svgContent })));
1019
2388
  }
2389
+ static get watchers() { return {
2390
+ "name": ["nameChanged"],
2391
+ "svg": ["svgChanged"]
2392
+ }; }
1020
2393
  static get style() { return BalIconStyle0; }
1021
2394
  }, [0, "bal-icon", {
1022
2395
  "name": [1537],
1023
2396
  "svg": [1],
1024
2397
  "size": [1],
1025
2398
  "color": [1],
2399
+ "tile": [4],
2400
+ "tileColor": [1, "tile-color"],
1026
2401
  "inline": [4],
1027
2402
  "inverted": [4],
1028
2403
  "turn": [4],
@@ -1032,7 +2407,13 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
1032
2407
  "hovered": [4],
1033
2408
  "pressed": [4],
1034
2409
  "icons": [32],
2410
+ "svgContent": [32],
2411
+ "innerColor": [32],
2412
+ "innerSize": [32],
1035
2413
  "configChanged": [64]
2414
+ }, undefined, {
2415
+ "name": ["nameChanged"],
2416
+ "svg": ["svgChanged"]
1036
2417
  }]);
1037
2418
  __decorate([
1038
2419
  ListenToConfig(),