@ukic/web-components 3.27.0 → 3.29.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 (275) hide show
  1. package/components/close-icon.js +1 -2
  2. package/components/close-icon.js.map +1 -1
  3. package/components/ic-breadcrumb-group.js +16 -12
  4. package/components/ic-breadcrumb-group.js.map +1 -1
  5. package/components/ic-data-list.js +1 -1
  6. package/components/ic-data-list.js.map +1 -1
  7. package/components/ic-data-row.js +1 -1
  8. package/components/ic-data-row.js.map +1 -1
  9. package/components/ic-menu-item2.js +7 -2
  10. package/components/ic-menu-item2.js.map +1 -1
  11. package/components/ic-menu2.js +1153 -306
  12. package/components/ic-menu2.js.map +1 -1
  13. package/components/ic-pagination-bar.js.map +1 -1
  14. package/components/ic-pagination-item2.js +1 -1
  15. package/components/ic-pagination-item2.js.map +1 -1
  16. package/components/ic-pagination2.js +12 -8
  17. package/components/ic-pagination2.js.map +1 -1
  18. package/components/ic-popover-menu.js +46 -12
  19. package/components/ic-popover-menu.js.map +1 -1
  20. package/components/ic-radio-group.js.map +1 -1
  21. package/components/ic-search-bar.js +2 -6
  22. package/components/ic-search-bar.js.map +1 -1
  23. package/components/ic-section-container2.js +2 -2
  24. package/components/ic-skeleton.js +2 -2
  25. package/components/ic-skip-link.js +2 -2
  26. package/components/ic-status-tag.js +2 -2
  27. package/components/ic-step.js +13 -13
  28. package/components/ic-stepper.js +2 -2
  29. package/components/ic-switch.js +4 -4
  30. package/components/ic-switch.js.map +1 -1
  31. package/components/ic-tab-context.js +1 -1
  32. package/components/ic-tab-group.js +2 -2
  33. package/components/ic-tab-panel.js +2 -2
  34. package/components/ic-theme.js +1 -1
  35. package/components/ic-toast-region.js +1 -1
  36. package/components/ic-toast.js +5 -5
  37. package/components/ic-toggle-button-group.js +2 -2
  38. package/components/ic-toggle-button.js +2 -2
  39. package/dist/cjs/{close-icon-7f6ef8e4.js → close-icon-30d8bb41.js} +2 -3
  40. package/dist/cjs/close-icon-30d8bb41.js.map +1 -0
  41. package/dist/cjs/core.cjs.js +1 -1
  42. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +16 -12
  44. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-data-list.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1153 -306
  51. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-menu-item.cjs.entry.js +5 -1
  53. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-pagination_3.cjs.entry.js +12 -8
  57. package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-popover-menu.cjs.entry.js +44 -11
  59. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-search-bar.cjs.entry.js +2 -6
  61. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  63. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  65. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  66. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -2
  67. package/dist/cjs/ic-step.cjs.entry.js +13 -13
  68. package/dist/cjs/ic-stepper.cjs.entry.js +2 -2
  69. package/dist/cjs/ic-switch.cjs.entry.js +4 -4
  70. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-tab-group.cjs.entry.js +2 -2
  72. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  73. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  75. package/dist/cjs/ic-toast.cjs.entry.js +6 -6
  76. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +2 -2
  77. package/dist/cjs/ic-toggle-button.cjs.entry.js +2 -2
  78. package/dist/cjs/loader.cjs.js +1 -1
  79. package/dist/collection/assets/close-icon.svg +1 -2
  80. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +17 -13
  81. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
  82. package/dist/collection/components/ic-data-list/ic-data-list.css +4 -0
  83. package/dist/collection/components/ic-data-row/ic-data-row.css +1 -1
  84. package/dist/collection/components/ic-menu-item/ic-menu-item.css +9 -14
  85. package/dist/collection/components/ic-menu-item/ic-menu-item.js +24 -0
  86. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  87. package/dist/collection/components/ic-pagination/ic-pagination.js +12 -8
  88. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  89. package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +2 -1
  90. package/dist/collection/components/ic-popover-menu/ic-popover-menu.css +4 -4
  91. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +67 -11
  92. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  93. package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +241 -1
  94. package/dist/collection/components/ic-search-bar/ic-search-bar.js +1 -1
  95. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  96. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  97. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  98. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  99. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  100. package/dist/collection/components/ic-step/ic-step.js +13 -13
  101. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  102. package/dist/collection/components/ic-switch/ic-switch.js +4 -4
  103. package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -1
  104. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  105. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  106. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  107. package/dist/collection/components/ic-toast/ic-toast.js +5 -5
  108. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  109. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
  110. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
  111. package/dist/components/close-icon.js +1 -2
  112. package/dist/components/close-icon.js.map +1 -1
  113. package/dist/components/ic-breadcrumb-group.js +16 -12
  114. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  115. package/dist/components/ic-data-list.js +1 -1
  116. package/dist/components/ic-data-list.js.map +1 -1
  117. package/dist/components/ic-data-row.js +1 -1
  118. package/dist/components/ic-data-row.js.map +1 -1
  119. package/dist/components/ic-hero.js.map +1 -1
  120. package/dist/components/ic-menu-item2.js +7 -2
  121. package/dist/components/ic-menu-item2.js.map +1 -1
  122. package/dist/components/ic-menu2.js +1153 -306
  123. package/dist/components/ic-menu2.js.map +1 -1
  124. package/dist/components/ic-pagination-bar.js.map +1 -1
  125. package/dist/components/ic-pagination-item2.js +1 -1
  126. package/dist/components/ic-pagination-item2.js.map +1 -1
  127. package/dist/components/ic-pagination2.js +12 -8
  128. package/dist/components/ic-pagination2.js.map +1 -1
  129. package/dist/components/ic-popover-menu.js +46 -12
  130. package/dist/components/ic-popover-menu.js.map +1 -1
  131. package/dist/components/ic-radio-group.js.map +1 -1
  132. package/dist/components/ic-search-bar.js +2 -6
  133. package/dist/components/ic-search-bar.js.map +1 -1
  134. package/dist/components/ic-section-container2.js +2 -2
  135. package/dist/components/ic-skeleton.js +2 -2
  136. package/dist/components/ic-skeleton.js.map +1 -1
  137. package/dist/components/ic-skip-link.js +2 -2
  138. package/dist/components/ic-status-tag.js +2 -2
  139. package/dist/components/ic-step.js +13 -13
  140. package/dist/components/ic-stepper.js +2 -2
  141. package/dist/components/ic-switch.js +4 -4
  142. package/dist/components/ic-switch.js.map +1 -1
  143. package/dist/components/ic-tab-context.js +1 -1
  144. package/dist/components/ic-tab-group.js +2 -2
  145. package/dist/components/ic-tab-panel.js +2 -2
  146. package/dist/components/ic-theme.js +1 -1
  147. package/dist/components/ic-toast-region.js +1 -1
  148. package/dist/components/ic-toast.js +5 -5
  149. package/dist/components/ic-toggle-button-group.js +2 -2
  150. package/dist/components/ic-toggle-button.js +2 -2
  151. package/dist/core/core.esm.js +1 -1
  152. package/dist/core/core.esm.js.map +1 -1
  153. package/dist/core/{p-23fb87be.entry.js → p-0558baed.entry.js} +2 -2
  154. package/dist/core/{p-a0c54a50.entry.js → p-0740be66.entry.js} +2 -2
  155. package/dist/core/{p-d0dd9f2c.entry.js → p-0cd21e04.entry.js} +2 -2
  156. package/dist/core/p-0cd21e04.entry.js.map +1 -0
  157. package/dist/core/{p-bb52e752.entry.js → p-1043f3dd.entry.js} +2 -2
  158. package/dist/core/{p-74a3a450.entry.js → p-1843357b.entry.js} +2 -2
  159. package/dist/core/{p-b58fb588.entry.js → p-2251df98.entry.js} +2 -2
  160. package/dist/core/{p-cf87b6db.entry.js → p-2bb815ef.entry.js} +2 -2
  161. package/dist/core/p-305d9639.entry.js +3 -0
  162. package/dist/core/p-305d9639.entry.js.map +1 -0
  163. package/dist/core/p-308be45e.entry.js +2 -0
  164. package/dist/core/p-308be45e.entry.js.map +1 -0
  165. package/dist/core/p-4b61e92e.entry.js +2 -0
  166. package/dist/core/{p-99b20121.entry.js.map → p-4b61e92e.entry.js.map} +1 -1
  167. package/dist/core/{p-fd9ea62a.entry.js → p-75f91c8c.entry.js} +2 -2
  168. package/dist/core/p-77f011e7.entry.js +2 -0
  169. package/dist/core/p-77f011e7.entry.js.map +1 -0
  170. package/dist/core/{p-70ca7796.entry.js → p-85db7e71.entry.js} +2 -2
  171. package/dist/core/{p-ab104baa.entry.js → p-987b08f9.entry.js} +2 -2
  172. package/dist/core/{p-85ac0d78.entry.js → p-9b144bed.entry.js} +2 -2
  173. package/dist/core/{p-d1220d2a.entry.js → p-a8d98164.entry.js} +2 -2
  174. package/dist/core/{p-a7c263bd.entry.js → p-ba8799ea.entry.js} +2 -2
  175. package/dist/core/p-ba8799ea.entry.js.map +1 -0
  176. package/dist/core/p-be8bbed8.entry.js +2 -0
  177. package/dist/core/p-be8bbed8.entry.js.map +1 -0
  178. package/dist/core/{p-85232cec.entry.js → p-bf06d022.entry.js} +2 -2
  179. package/dist/core/{p-c41fd2cf.entry.js → p-c0f6f568.entry.js} +2 -2
  180. package/dist/core/p-c391e323.js +2 -0
  181. package/dist/core/{p-271ee0bc.entry.js → p-c75c316b.entry.js} +2 -2
  182. package/dist/core/{p-970e190c.entry.js → p-e0b52a71.entry.js} +2 -2
  183. package/dist/core/p-ef289935.entry.js +2 -0
  184. package/dist/core/p-ef289935.entry.js.map +1 -0
  185. package/dist/core/{p-3da9774b.entry.js → p-ef91cf17.entry.js} +2 -2
  186. package/dist/core/p-f8aa89ff.entry.js +2 -0
  187. package/dist/core/p-f8aa89ff.entry.js.map +1 -0
  188. package/dist/core/{p-d7c6fc8d.entry.js → p-f8e5d8f8.entry.js} +2 -2
  189. package/dist/core/{p-6b5edd6b.entry.js → p-f9daecc7.entry.js} +2 -2
  190. package/dist/esm/{close-icon-539ec8d1.js → close-icon-0db44bf2.js} +2 -3
  191. package/dist/esm/close-icon-0db44bf2.js.map +1 -0
  192. package/dist/esm/core.js +1 -1
  193. package/dist/esm/ic-alert.entry.js +1 -1
  194. package/dist/esm/ic-breadcrumb-group.entry.js +16 -12
  195. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  196. package/dist/esm/ic-data-list.entry.js +1 -1
  197. package/dist/esm/ic-data-list.entry.js.map +1 -1
  198. package/dist/esm/ic-data-row.entry.js +1 -1
  199. package/dist/esm/ic-data-row.entry.js.map +1 -1
  200. package/dist/esm/ic-dialog.entry.js +1 -1
  201. package/dist/esm/ic-input-component-container_3.entry.js +1153 -306
  202. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  203. package/dist/esm/ic-menu-item.entry.js +5 -1
  204. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  205. package/dist/esm/ic-pagination-item.entry.js +1 -1
  206. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  207. package/dist/esm/ic-pagination_3.entry.js +12 -8
  208. package/dist/esm/ic-pagination_3.entry.js.map +1 -1
  209. package/dist/esm/ic-popover-menu.entry.js +45 -12
  210. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  211. package/dist/esm/ic-search-bar.entry.js +2 -6
  212. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  213. package/dist/esm/ic-section-container.entry.js +2 -2
  214. package/dist/esm/ic-side-navigation.entry.js +1 -1
  215. package/dist/esm/ic-skeleton.entry.js +2 -2
  216. package/dist/esm/ic-skip-link.entry.js +2 -2
  217. package/dist/esm/ic-status-tag.entry.js +2 -2
  218. package/dist/esm/ic-step.entry.js +13 -13
  219. package/dist/esm/ic-stepper.entry.js +2 -2
  220. package/dist/esm/ic-switch.entry.js +4 -4
  221. package/dist/esm/ic-tab-context.entry.js +1 -1
  222. package/dist/esm/ic-tab-group.entry.js +2 -2
  223. package/dist/esm/ic-tab-panel.entry.js +2 -2
  224. package/dist/esm/ic-theme.entry.js +1 -1
  225. package/dist/esm/ic-toast-region.entry.js +1 -1
  226. package/dist/esm/ic-toast.entry.js +6 -6
  227. package/dist/esm/ic-toggle-button-group.entry.js +2 -2
  228. package/dist/esm/ic-toggle-button.entry.js +2 -2
  229. package/dist/esm/loader.js +1 -1
  230. package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +6 -1
  231. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +4 -0
  232. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +8 -0
  233. package/dist/types/components.d.ts +18 -2
  234. package/hydrate/index.js +1284 -393
  235. package/hydrate/index.mjs +1284 -393
  236. package/package.json +12 -9
  237. package/vscode-data.json +20 -1
  238. package/dist/cjs/close-icon-7f6ef8e4.js.map +0 -1
  239. package/dist/collection/assets/clear-icon.svg +0 -3
  240. package/dist/core/p-023cf5d9.entry.js +0 -2
  241. package/dist/core/p-023cf5d9.entry.js.map +0 -1
  242. package/dist/core/p-2424f82f.entry.js +0 -2
  243. package/dist/core/p-2424f82f.entry.js.map +0 -1
  244. package/dist/core/p-2b1ce5b7.entry.js +0 -2
  245. package/dist/core/p-2b1ce5b7.entry.js.map +0 -1
  246. package/dist/core/p-99b20121.entry.js +0 -2
  247. package/dist/core/p-a7c263bd.entry.js.map +0 -1
  248. package/dist/core/p-d0dd9f2c.entry.js.map +0 -1
  249. package/dist/core/p-d5fcd4f9.entry.js +0 -2
  250. package/dist/core/p-d5fcd4f9.entry.js.map +0 -1
  251. package/dist/core/p-e0b66371.entry.js +0 -2
  252. package/dist/core/p-e0b66371.entry.js.map +0 -1
  253. package/dist/core/p-f074ef5b.js +0 -2
  254. package/dist/core/p-fdc4376e.entry.js +0 -3
  255. package/dist/core/p-fdc4376e.entry.js.map +0 -1
  256. package/dist/esm/close-icon-539ec8d1.js.map +0 -1
  257. /package/dist/core/{p-23fb87be.entry.js.map → p-0558baed.entry.js.map} +0 -0
  258. /package/dist/core/{p-a0c54a50.entry.js.map → p-0740be66.entry.js.map} +0 -0
  259. /package/dist/core/{p-bb52e752.entry.js.map → p-1043f3dd.entry.js.map} +0 -0
  260. /package/dist/core/{p-74a3a450.entry.js.map → p-1843357b.entry.js.map} +0 -0
  261. /package/dist/core/{p-b58fb588.entry.js.map → p-2251df98.entry.js.map} +0 -0
  262. /package/dist/core/{p-cf87b6db.entry.js.map → p-2bb815ef.entry.js.map} +0 -0
  263. /package/dist/core/{p-fd9ea62a.entry.js.map → p-75f91c8c.entry.js.map} +0 -0
  264. /package/dist/core/{p-70ca7796.entry.js.map → p-85db7e71.entry.js.map} +0 -0
  265. /package/dist/core/{p-ab104baa.entry.js.map → p-987b08f9.entry.js.map} +0 -0
  266. /package/dist/core/{p-85ac0d78.entry.js.map → p-9b144bed.entry.js.map} +0 -0
  267. /package/dist/core/{p-d1220d2a.entry.js.map → p-a8d98164.entry.js.map} +0 -0
  268. /package/dist/core/{p-85232cec.entry.js.map → p-bf06d022.entry.js.map} +0 -0
  269. /package/dist/core/{p-c41fd2cf.entry.js.map → p-c0f6f568.entry.js.map} +0 -0
  270. /package/dist/core/{p-f074ef5b.js.map → p-c391e323.js.map} +0 -0
  271. /package/dist/core/{p-271ee0bc.entry.js.map → p-c75c316b.entry.js.map} +0 -0
  272. /package/dist/core/{p-970e190c.entry.js.map → p-e0b52a71.entry.js.map} +0 -0
  273. /package/dist/core/{p-3da9774b.entry.js.map → p-ef91cf17.entry.js.map} +0 -0
  274. /package/dist/core/{p-d7c6fc8d.entry.js.map → p-f8e5d8f8.entry.js.map} +0 -0
  275. /package/dist/core/{p-6b5edd6b.entry.js.map → p-f9daecc7.entry.js.map} +0 -0
package/hydrate/index.mjs CHANGED
@@ -4281,8 +4281,7 @@ class ActionChip {
4281
4281
  }
4282
4282
 
4283
4283
  var closeIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
4284
- <path d="M0 0h24v24H0z" fill="none"/>
4285
- <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
4284
+ <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" fill="currentColor"/>
4286
4285
  <title>close icon</title>
4287
4286
  </svg>
4288
4287
  `;
@@ -4955,6 +4954,8 @@ class BreadcrumbGroup {
4955
4954
  this.deviceSize = DEVICE_SIZES.XL;
4956
4955
  /**
4957
4956
  * If `true`, display only a single breadcrumb for the parent page with a back icon.
4957
+ * Requires at least two `ic-breadcrumb` children, as the displayed breadcrumb
4958
+ * shows the title of the parent (second-to-last) page.
4958
4959
  */
4959
4960
  this.backBreadcrumbOnly = false;
4960
4961
  /**
@@ -4987,12 +4988,10 @@ class BreadcrumbGroup {
4987
4988
  this.revertLastParentCollapsedBreadcrumb();
4988
4989
  }
4989
4990
  };
4990
- this.setBackBreadcrumbAttr = () => {
4991
- if (this.lastParentBreadcrumb) {
4992
- this.lastParentBreadcrumb.classList.add("show");
4993
- this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON, "true");
4994
- }
4995
- };
4991
+ /**
4992
+ * Returns the second-to-last breadcrumb (the "parent" page), or `null`
4993
+ * if fewer than two breadcrumbs are present.
4994
+ */
4996
4995
  this.getLastParentBreadcrumb = () => {
4997
4996
  const allBreadcrumbs = this.el.querySelectorAll(this.IC_BREADCRUMB);
4998
4997
  return allBreadcrumbs.length > 1
@@ -5068,11 +5067,15 @@ class BreadcrumbGroup {
5068
5067
  };
5069
5068
  this.setLastParentCollapsedBackBreadcrumb = () => {
5070
5069
  this.lastParentBreadcrumb = this.getLastParentBreadcrumb();
5071
- this.setBackBreadcrumbAttr();
5072
- if (this.lastParentBreadcrumb) {
5073
- this.lastParentBreadcrumb.classList.remove("hide");
5074
- this.lastParentBreadcrumb.classList.add("show");
5070
+ if (this.lastParentBreadcrumb === null) {
5071
+ console.warn("ic-breadcrumb-group: backBreadcrumbOnly requires at least two " +
5072
+ "ic-breadcrumb children. The back breadcrumb displays the title " +
5073
+ "of the parent page, so a minimum of two breadcrumbs is needed.");
5074
+ return;
5075
5075
  }
5076
+ this.lastParentBreadcrumb.classList.add("show");
5077
+ this.lastParentBreadcrumb.classList.remove("hide");
5078
+ this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON, "true");
5076
5079
  };
5077
5080
  this.revertLastParentCollapsedBreadcrumb = () => {
5078
5081
  if (this.lastParentBreadcrumb) {
@@ -5155,11 +5158,11 @@ class BreadcrumbGroup {
5155
5158
  }
5156
5159
  render() {
5157
5160
  const { backBreadcrumbOnly, collapsed, theme } = this;
5158
- return (hAsync(Host, { key: '6bee18e1a84707b5d493149d23094af6a0fb1be8', class: {
5161
+ return (hAsync(Host, { key: '6f0f099c548cb049c02a6338d7cdec696e75a82c', class: {
5159
5162
  "ic-breadcrumb-group-back": backBreadcrumbOnly,
5160
5163
  "ic-breadcrumb-group-collapsed": collapsed,
5161
5164
  [`ic-theme-${theme}`]: theme !== "inherit",
5162
- } }, hAsync("nav", { key: '144ad11cead96e18ae62eba8fc2dead82e188854', "aria-label": "breadcrumbs" }, hAsync("ol", { key: 'c101766f5e9b0e5d9a5aaebd5d0d8eda63ffc9ea' }, hAsync("slot", { key: 'c761cdbb01472d0d8c2550254063b59fa714f722' })))));
5165
+ } }, hAsync("nav", { key: '86b02604932d3d54d48383f85482f2241102f8c7', "aria-label": "breadcrumbs" }, hAsync("ol", { key: 'ffe25df4eee620a28a3e427e1d65c8cdbe0e2f84' }, hAsync("slot", { key: '818515360bb8783b6151a1651eb6319f4a533242' })))));
5163
5166
  }
5164
5167
  get el() { return getElement(this); }
5165
5168
  static get watchers() { return {
@@ -6642,7 +6645,7 @@ class ClassificationBanner {
6642
6645
  }; }
6643
6646
  }
6644
6647
 
6645
- const icDataListCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}.heading{--ic-typography-color:var(--ic-data-list-text-heading);color:var(--ic-data-list-text-heading)}.rows{display:flex;flex-direction:column;gap:var(--ic-space-md)}:host(.ic-data-list-small) .rows{gap:var(--ic-space-xs)}.divider{margin-top:var(--ic-space-lg);margin-bottom:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-data-list-keyline-heading)}.divider-no-heading{margin-top:0}:host(.ic-data-list-small) .divider{margin-top:var(--ic-space-sm);margin-bottom:var(--ic-space-xs)}@media (forced-colors: active){.divider{background-color:canvastext}}";
6648
+ const icDataListCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}.heading{--ic-typography-color:var(--ic-data-list-text-heading);color:var(--ic-data-list-text-heading)}.rows{display:flex;flex-direction:column;gap:var(--ic-space-md)}:host(.ic-data-list-small) .rows{gap:var(--ic-space-xs)}.divider{margin-top:var(--ic-space-lg);margin-bottom:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-data-list-keyline-heading)}.divider-no-heading{margin-top:0}:host(.ic-data-list-small) .divider{margin-top:var(--ic-space-sm);margin-bottom:var(--ic-space-xs)}:host(.ic-data-list-small) .divider.divider-no-heading{margin-top:0}@media (forced-colors: active){.divider{background-color:canvastext}}";
6646
6649
  var IcDataListStyle0 = icDataListCss;
6647
6650
 
6648
6651
  /**
@@ -6687,7 +6690,7 @@ class DataList {
6687
6690
  }; }
6688
6691
  }
6689
6692
 
6690
- const icDataRowCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:relative;display:block}.data{display:flex;align-items:top}.text-cells{display:flex;flex-grow:1;min-width:0;--ic-typography-color:var(--ic-data-list-text-cell);color:var(--ic-data-list-text-cell)}.label{width:var(--data-row-label-width, 12.5rem);min-width:12.5rem;margin-right:var(--ic-space-md);--ic-typography-color:var(--ic-data-list-text-label);color:var(--ic-data-list-text-label)}.value{flex-grow:1}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]){margin-top:calc(var(--ic-space-xs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[small][readonly][hide-label]){margin-top:calc(var(--ic-space-xxs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]){margin-top:calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs))}.end-component{width:-moz-fit-content;width:fit-content;margin-left:3.5rem}.divider{margin-top:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-data-list-keyline-cell)}:host(.ic-data-row-small) .divider{margin-top:var(--ic-space-xs)}:host(.breakpoint-medium) .label{width:10rem;min-width:10rem}:host(.breakpoint-xs) .text-cells{flex-direction:column}:host(.breakpoint-xs) .label{width:8rem;margin-bottom:var(--ic-space-xs)}:host(.breakpoint-xs) .value{max-width:95%}:host(.breakpoint-xs) .end-component{margin-left:0}@media (forced-colors: active){.divider{background-color:canvastext}}";
6693
+ const icDataRowCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{position:relative;display:block}.data{display:flex;align-items:top}.text-cells{display:flex;flex-grow:1;min-width:0;--ic-typography-color:var(--ic-data-list-text-cell);color:var(--ic-data-list-text-cell)}.label{width:var(--data-row-label-width, 12.5rem);min-width:12.5rem;margin-right:var(--ic-space-md);--ic-typography-color:var(--ic-data-list-text-label);color:var(--ic-data-list-text-label)}.value{flex-grow:1}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label]){margin-top:calc(var(--ic-space-xs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[size=\"small\"][readonly][hide-label]){margin-top:calc(var(--ic-space-xxs) * -1)}slot[name=\"value\"]::slotted(ic-text-field[readonly][hide-label][rows]){margin-top:calc(var(--ic-space-xxs) * -1 - var(--ic-space-xxxs))}.end-component{width:-moz-fit-content;width:fit-content;margin-left:3.5rem}.divider{margin-top:var(--ic-space-md);height:var(--ic-border-width);background-color:var(--ic-data-list-keyline-cell)}:host(.ic-data-row-small) .divider{margin-top:var(--ic-space-xs)}:host(.breakpoint-medium) .label{width:10rem;min-width:10rem}:host(.breakpoint-xs) .text-cells{flex-direction:column}:host(.breakpoint-xs) .label{width:8rem;margin-bottom:var(--ic-space-xs)}:host(.breakpoint-xs) .value{max-width:95%}:host(.breakpoint-xs) .end-component{margin-left:0}@media (forced-colors: active){.divider{background-color:canvastext}}";
6691
6694
  var IcDataRowStyle0 = icDataRowCss;
6692
6695
 
6693
6696
  /**
@@ -10625,28 +10628,69 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
10625
10628
 
10626
10629
  var purify = {exports: {}};
10627
10630
 
10628
- /*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE */
10631
+ /*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
10629
10632
 
10630
10633
  (function (module, exports) {
10631
10634
  (function (global, factory) {
10632
10635
  module.exports = factory() ;
10633
10636
  })(commonjsGlobal, (function () {
10634
- const {
10635
- entries,
10636
- setPrototypeOf,
10637
- isFrozen,
10638
- getPrototypeOf,
10639
- getOwnPropertyDescriptor
10640
- } = Object;
10641
- let {
10642
- freeze,
10643
- seal,
10644
- create
10645
- } = Object; // eslint-disable-line import/no-mutable-exports
10646
- let {
10647
- apply,
10648
- construct
10649
- } = typeof Reflect !== 'undefined' && Reflect;
10637
+ function _arrayLikeToArray(r, a) {
10638
+ (null == a || a > r.length) && (a = r.length);
10639
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
10640
+ return n;
10641
+ }
10642
+ function _arrayWithHoles(r) {
10643
+ if (Array.isArray(r)) return r;
10644
+ }
10645
+ function _iterableToArrayLimit(r, l) {
10646
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
10647
+ if (null != t) {
10648
+ var e,
10649
+ n,
10650
+ i,
10651
+ u,
10652
+ a = [],
10653
+ f = true,
10654
+ o = false;
10655
+ try {
10656
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
10657
+ } catch (r) {
10658
+ o = true, n = r;
10659
+ } finally {
10660
+ try {
10661
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
10662
+ } finally {
10663
+ if (o) throw n;
10664
+ }
10665
+ }
10666
+ return a;
10667
+ }
10668
+ }
10669
+ function _nonIterableRest() {
10670
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
10671
+ }
10672
+ function _slicedToArray(r, e) {
10673
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
10674
+ }
10675
+ function _unsupportedIterableToArray(r, a) {
10676
+ if (r) {
10677
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
10678
+ var t = {}.toString.call(r).slice(8, -1);
10679
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
10680
+ }
10681
+ }
10682
+
10683
+ const entries = Object.entries,
10684
+ setPrototypeOf = Object.setPrototypeOf,
10685
+ isFrozen = Object.isFrozen,
10686
+ getPrototypeOf = Object.getPrototypeOf,
10687
+ getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
10688
+ let freeze = Object.freeze,
10689
+ seal = Object.seal,
10690
+ create = Object.create; // eslint-disable-line import/no-mutable-exports
10691
+ let _ref = typeof Reflect !== 'undefined' && Reflect,
10692
+ apply = _ref.apply,
10693
+ construct = _ref.construct;
10650
10694
  if (!freeze) {
10651
10695
  freeze = function freeze(x) {
10652
10696
  return x;
@@ -10678,13 +10722,19 @@ var purify = {exports: {}};
10678
10722
  const arrayPop = unapply(Array.prototype.pop);
10679
10723
  const arrayPush = unapply(Array.prototype.push);
10680
10724
  const arraySplice = unapply(Array.prototype.splice);
10725
+ const arrayIsArray = Array.isArray;
10681
10726
  const stringToLowerCase = unapply(String.prototype.toLowerCase);
10682
10727
  const stringToString = unapply(String.prototype.toString);
10683
10728
  const stringMatch = unapply(String.prototype.match);
10684
10729
  const stringReplace = unapply(String.prototype.replace);
10685
10730
  const stringIndexOf = unapply(String.prototype.indexOf);
10686
10731
  const stringTrim = unapply(String.prototype.trim);
10732
+ const numberToString = unapply(Number.prototype.toString);
10733
+ const booleanToString = unapply(Boolean.prototype.toString);
10734
+ const bigintToString = typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);
10735
+ const symbolToString = typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);
10687
10736
  const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
10737
+ const objectToString = unapply(Object.prototype.toString);
10688
10738
  const regExpTest = unapply(RegExp.prototype.test);
10689
10739
  const typeErrorCreate = unconstruct(TypeError);
10690
10740
  /**
@@ -10734,6 +10784,9 @@ var purify = {exports: {}};
10734
10784
  // Prevent prototype setters from intercepting set as a this value.
10735
10785
  setPrototypeOf(set, null);
10736
10786
  }
10787
+ if (!arrayIsArray(array)) {
10788
+ return set;
10789
+ }
10737
10790
  let l = array.length;
10738
10791
  while (l--) {
10739
10792
  let element = array[l];
@@ -10774,10 +10827,13 @@ var purify = {exports: {}};
10774
10827
  */
10775
10828
  function clone(object) {
10776
10829
  const newObject = create(null);
10777
- for (const [property, value] of entries(object)) {
10830
+ for (const _ref2 of entries(object)) {
10831
+ var _ref3 = _slicedToArray(_ref2, 2);
10832
+ const property = _ref3[0];
10833
+ const value = _ref3[1];
10778
10834
  const isPropertyExist = objectHasOwnProperty(object, property);
10779
10835
  if (isPropertyExist) {
10780
- if (Array.isArray(value)) {
10836
+ if (arrayIsArray(value)) {
10781
10837
  newObject[property] = cleanArray(value);
10782
10838
  } else if (value && typeof value === 'object' && value.constructor === Object) {
10783
10839
  newObject[property] = clone(value);
@@ -10788,6 +10844,58 @@ var purify = {exports: {}};
10788
10844
  }
10789
10845
  return newObject;
10790
10846
  }
10847
+ /**
10848
+ * Convert non-node values into strings without depending on direct property access.
10849
+ *
10850
+ * @param value - The value to stringify.
10851
+ * @returns A string representation of the provided value.
10852
+ */
10853
+ function stringifyValue(value) {
10854
+ switch (typeof value) {
10855
+ case 'string':
10856
+ {
10857
+ return value;
10858
+ }
10859
+ case 'number':
10860
+ {
10861
+ return numberToString(value);
10862
+ }
10863
+ case 'boolean':
10864
+ {
10865
+ return booleanToString(value);
10866
+ }
10867
+ case 'bigint':
10868
+ {
10869
+ return bigintToString ? bigintToString(value) : '0';
10870
+ }
10871
+ case 'symbol':
10872
+ {
10873
+ return symbolToString ? symbolToString(value) : 'Symbol()';
10874
+ }
10875
+ case 'undefined':
10876
+ {
10877
+ return objectToString(value);
10878
+ }
10879
+ case 'function':
10880
+ case 'object':
10881
+ {
10882
+ if (value === null) {
10883
+ return objectToString(value);
10884
+ }
10885
+ const valueAsRecord = value;
10886
+ const valueToString = lookupGetter(valueAsRecord, 'toString');
10887
+ if (typeof valueToString === 'function') {
10888
+ const stringified = valueToString(valueAsRecord);
10889
+ return typeof stringified === 'string' ? stringified : objectToString(stringified);
10890
+ }
10891
+ return objectToString(value);
10892
+ }
10893
+ default:
10894
+ {
10895
+ return objectToString(value);
10896
+ }
10897
+ }
10898
+ }
10791
10899
  /**
10792
10900
  * This method automatically checks if the prop is function or getter and behaves accordingly.
10793
10901
  *
@@ -10813,6 +10921,14 @@ var purify = {exports: {}};
10813
10921
  }
10814
10922
  return fallbackValue;
10815
10923
  }
10924
+ function isRegex(value) {
10925
+ try {
10926
+ regExpTest(value, '');
10927
+ return true;
10928
+ } catch (_unused) {
10929
+ return false;
10930
+ }
10931
+ }
10816
10932
 
10817
10933
  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', 'search', 'section', 'select', 'shadow', 'slot', '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']);
10818
10934
  const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
@@ -10828,15 +10944,14 @@ var purify = {exports: {}};
10828
10944
  const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
10829
10945
  const text = freeze(['#text']);
10830
10946
 
10831
- 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', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', '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', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
10947
+ const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'command', 'commandfor', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', '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', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns']);
10832
10948
  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', 'mask-type', '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']);
10833
10949
  const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', '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']);
10834
10950
  const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
10835
10951
 
10836
- // eslint-disable-next-line unicorn/better-regex
10837
- const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
10838
- const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
10839
- const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
10952
+ const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
10953
+ const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
10954
+ const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
10840
10955
  const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
10841
10956
  const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
10842
10957
  const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
@@ -10846,30 +10961,31 @@ var purify = {exports: {}};
10846
10961
  );
10847
10962
  const DOCTYPE_NAME = seal(/^html$/i);
10848
10963
  const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
10964
+ // Markup-significant character probes used by _sanitizeElements.
10965
+ // Shared module-level instances are safe despite the sticky /g flags:
10966
+ // unapply() resets lastIndex for RegExp receivers before every call.
10967
+ const ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g);
10968
+ const COMMENT_MARKUP_PROBE = seal(/<[/\w]/g);
10969
+ const FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i);
10970
+ const SELF_CLOSING_TAG = seal(/\/>/i);
10849
10971
 
10850
- var EXPRESSIONS = /*#__PURE__*/Object.freeze({
10851
- __proto__: null,
10852
- ARIA_ATTR: ARIA_ATTR,
10853
- ATTR_WHITESPACE: ATTR_WHITESPACE,
10854
- CUSTOM_ELEMENT: CUSTOM_ELEMENT,
10855
- DATA_ATTR: DATA_ATTR,
10856
- DOCTYPE_NAME: DOCTYPE_NAME,
10857
- ERB_EXPR: ERB_EXPR,
10858
- IS_ALLOWED_URI: IS_ALLOWED_URI,
10859
- IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
10860
- MUSTACHE_EXPR: MUSTACHE_EXPR,
10861
- TMPLIT_EXPR: TMPLIT_EXPR
10862
- });
10863
-
10864
- /* eslint-disable @typescript-eslint/indent */
10865
10972
  // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
10866
10973
  const NODE_TYPE = {
10867
10974
  element: 1,
10975
+ attribute: 2,
10868
10976
  text: 3,
10977
+ cdataSection: 4,
10978
+ entityReference: 5,
10869
10979
  // Deprecated
10870
- progressingInstruction: 7,
10980
+ entityNode: 6,
10981
+ // Deprecated
10982
+ processingInstruction: 7,
10871
10983
  comment: 8,
10872
- document: 9};
10984
+ document: 9,
10985
+ documentType: 10,
10986
+ documentFragment: 11,
10987
+ notation: 12 // Deprecated
10988
+ };
10873
10989
  const getGlobal = function getGlobal() {
10874
10990
  return typeof window === 'undefined' ? null : window;
10875
10991
  };
@@ -10924,10 +11040,25 @@ var purify = {exports: {}};
10924
11040
  uponSanitizeShadowNode: []
10925
11041
  };
10926
11042
  };
11043
+ /**
11044
+ * Resolve a set-valued configuration option: a fresh set built from
11045
+ * cfg[key] when it is an own array property (seeded with a clone of
11046
+ * options.base when given, case-normalized via options.transform),
11047
+ * the fallback set otherwise.
11048
+ *
11049
+ * @param cfg the cloned, prototype-free configuration object
11050
+ * @param key the configuration property to read
11051
+ * @param fallback the set to use when the option is absent or not an array
11052
+ * @param options transform and optional base set to merge into
11053
+ * @returns the resolved set
11054
+ */
11055
+ const _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {
11056
+ return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;
11057
+ };
10927
11058
  function createDOMPurify() {
10928
11059
  let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
10929
11060
  const DOMPurify = root => createDOMPurify(root);
10930
- DOMPurify.version = '3.4.0';
11061
+ DOMPurify.version = '3.4.11';
10931
11062
  DOMPurify.removed = [];
10932
11063
  if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
10933
11064
  // Not running in a browser, provide a factory function
@@ -10935,28 +11066,25 @@ var purify = {exports: {}};
10935
11066
  DOMPurify.isSupported = false;
10936
11067
  return DOMPurify;
10937
11068
  }
10938
- let {
10939
- document
10940
- } = window;
11069
+ let document = window.document;
10941
11070
  const originalDocument = document;
10942
11071
  const currentScript = originalDocument.currentScript;
10943
- const {
10944
- DocumentFragment,
10945
- HTMLTemplateElement,
10946
- Node,
10947
- Element,
10948
- NodeFilter,
10949
- NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
10950
- HTMLFormElement,
10951
- DOMParser,
10952
- trustedTypes
10953
- } = window;
11072
+ const HTMLTemplateElement = window.HTMLTemplateElement,
11073
+ Node = window.Node,
11074
+ Element = window.Element,
11075
+ NodeFilter = window.NodeFilter;
11076
+ const DOMParser = window.DOMParser,
11077
+ trustedTypes = window.trustedTypes;
10954
11078
  const ElementPrototype = Element.prototype;
10955
11079
  const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
10956
11080
  const remove = lookupGetter(ElementPrototype, 'remove');
10957
11081
  const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
10958
11082
  const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
10959
11083
  const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
11084
+ const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');
11085
+ const getAttributes = lookupGetter(ElementPrototype, 'attributes');
11086
+ const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;
11087
+ const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;
10960
11088
  // As per issue #47, the web-components registry is inherited by a
10961
11089
  // new document created via createHTMLDocument. As per the spec
10962
11090
  // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
@@ -10971,33 +11099,74 @@ var purify = {exports: {}};
10971
11099
  }
10972
11100
  let trustedTypesPolicy;
10973
11101
  let emptyHTML = '';
10974
- const {
10975
- implementation,
10976
- createNodeIterator,
10977
- createDocumentFragment,
10978
- getElementsByTagName
10979
- } = document;
10980
- const {
10981
- importNode
10982
- } = originalDocument;
11102
+ // The instance's own internal Trusted Types policy. Unlike a caller-supplied
11103
+ // `TRUSTED_TYPES_POLICY`, this is created at most once — Trusted Types throws
11104
+ // on duplicate policy names — and is the only policy allowed to persist
11105
+ // across configurations and survive `clearConfig()`.
11106
+ let defaultTrustedTypesPolicy;
11107
+ let defaultTrustedTypesPolicyResolved = false;
11108
+ // Tracks whether we are already inside a call to the configured Trusted Types
11109
+ // policy (`createHTML` or `createScriptURL`). If a supplied policy callback
11110
+ // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would
11111
+ // re-enter the policy and recurse until the stack overflows. We detect that
11112
+ // re-entry and throw a clear, actionable error instead. The guard is shared
11113
+ // across both callbacks, because either one re-entering `sanitize` triggers
11114
+ // the same unbounded recursion.
11115
+ let IN_TRUSTED_TYPES_POLICY = 0;
11116
+ const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {
11117
+ if (IN_TRUSTED_TYPES_POLICY > 0) {
11118
+ throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + 'infinite recursion. Do not pass a policy whose callbacks wrap ' + 'DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted ' + 'Types" section of the README.');
11119
+ }
11120
+ };
11121
+ const _createTrustedHTML = function _createTrustedHTML(html) {
11122
+ _assertNotInTrustedTypesPolicy();
11123
+ IN_TRUSTED_TYPES_POLICY++;
11124
+ try {
11125
+ return trustedTypesPolicy.createHTML(html);
11126
+ } finally {
11127
+ IN_TRUSTED_TYPES_POLICY--;
11128
+ }
11129
+ };
11130
+ const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {
11131
+ _assertNotInTrustedTypesPolicy();
11132
+ IN_TRUSTED_TYPES_POLICY++;
11133
+ try {
11134
+ return trustedTypesPolicy.createScriptURL(scriptUrl);
11135
+ } finally {
11136
+ IN_TRUSTED_TYPES_POLICY--;
11137
+ }
11138
+ };
11139
+ // Lazily resolve (and cache) the instance's internal default policy.
11140
+ // Resolution is attempted at most once: a successful `createPolicy` cannot be
11141
+ // repeated (Trusted Types throws on duplicate names), and a failed or
11142
+ // unsupported attempt must not be retried on every parse.
11143
+ const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {
11144
+ if (!defaultTrustedTypesPolicyResolved) {
11145
+ defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
11146
+ defaultTrustedTypesPolicyResolved = true;
11147
+ }
11148
+ return defaultTrustedTypesPolicy;
11149
+ };
11150
+ const _document = document,
11151
+ implementation = _document.implementation,
11152
+ createNodeIterator = _document.createNodeIterator,
11153
+ createDocumentFragment = _document.createDocumentFragment,
11154
+ getElementsByTagName = _document.getElementsByTagName;
11155
+ const importNode = originalDocument.importNode;
10983
11156
  let hooks = _createHooksMap();
10984
11157
  /**
10985
11158
  * Expose whether this browser supports running the full DOMPurify.
10986
11159
  */
10987
11160
  DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
10988
- const {
10989
- MUSTACHE_EXPR,
10990
- ERB_EXPR,
10991
- TMPLIT_EXPR,
10992
- DATA_ATTR,
10993
- ARIA_ATTR,
10994
- IS_SCRIPT_OR_DATA,
10995
- ATTR_WHITESPACE,
10996
- CUSTOM_ELEMENT
10997
- } = EXPRESSIONS;
10998
- let {
10999
- IS_ALLOWED_URI: IS_ALLOWED_URI$1
11000
- } = EXPRESSIONS;
11161
+ const MUSTACHE_EXPR$1 = MUSTACHE_EXPR,
11162
+ ERB_EXPR$1 = ERB_EXPR,
11163
+ TMPLIT_EXPR$1 = TMPLIT_EXPR,
11164
+ DATA_ATTR$1 = DATA_ATTR,
11165
+ ARIA_ATTR$1 = ARIA_ATTR,
11166
+ IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,
11167
+ ATTR_WHITESPACE$1 = ATTR_WHITESPACE,
11168
+ CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
11169
+ let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
11001
11170
  /**
11002
11171
  * We consider the elements and attributes below to be safe. Ideally
11003
11172
  * don't add any new ones but feel free to remove unwanted ones.
@@ -11074,6 +11243,13 @@ var purify = {exports: {}};
11074
11243
  let WHOLE_DOCUMENT = false;
11075
11244
  /* Track whether config is already set on this instance of DOMPurify. */
11076
11245
  let SET_CONFIG = false;
11246
+ /* Pristine allowlist bindings captured at setConfig() time. On the
11247
+ * persistent-config path sanitize() restores the sets from these before
11248
+ * the per-walk hook clone-guard, so a hook's in-call widening cannot
11249
+ * carry across calls. Null until setConfig() is called; reset by
11250
+ * clearConfig(). */
11251
+ let SET_CONFIG_ALLOWED_TAGS = null;
11252
+ let SET_CONFIG_ALLOWED_ATTR = null;
11077
11253
  /* Decide if all elements (e.g. style, script) must be children of
11078
11254
  * document.body. By default, browsers might move them to document.head */
11079
11255
  let FORCE_BODY = false;
@@ -11116,7 +11292,17 @@ var purify = {exports: {}};
11116
11292
  let USE_PROFILES = {};
11117
11293
  /* Tags to ignore content of when KEEP_CONTENT is true */
11118
11294
  let FORBID_CONTENTS = null;
11119
- 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']);
11295
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',
11296
+ // <selectedcontent> mirrors the selected <option>'s subtree, cloned by
11297
+ // the UA (customizable <select>) — including any on* handlers — and the
11298
+ // engine re-mirrors synchronously whenever a removal changes which
11299
+ // option/selectedcontent is current, even inside DOMPurify's inert
11300
+ // DOMParser document. Hoisting its children on removal re-inserts a fresh
11301
+ // mirror target ahead of the walk, which the engine refills, looping
11302
+ // forever (DoS) and amplifying output. Dropping its content on removal
11303
+ // (rather than hoisting) breaks that cascade; the content is a duplicate
11304
+ // of the option, which is sanitized on its own. See campaign-3 F1/F6.
11305
+ 'selectedcontent', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
11120
11306
  /* Tags that are safe for data: URIs */
11121
11307
  let DATA_URI_TAGS = null;
11122
11308
  const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
@@ -11132,8 +11318,10 @@ var purify = {exports: {}};
11132
11318
  /* Allowed XHTML+XML namespaces */
11133
11319
  let ALLOWED_NAMESPACES = null;
11134
11320
  const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
11135
- let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
11136
- let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
11321
+ const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(['mi', 'mo', 'mn', 'ms', 'mtext']);
11322
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
11323
+ const DEFAULT_HTML_INTEGRATION_POINTS = freeze(['annotation-xml']);
11324
+ let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);
11137
11325
  // Certain elements are allowed in both SVG and HTML
11138
11326
  // namespace. We need to specify them explicitly
11139
11327
  // so that they don't get erroneously deleted from
@@ -11175,15 +11363,33 @@ var purify = {exports: {}};
11175
11363
  // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
11176
11364
  transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
11177
11365
  /* Set configuration parameters */
11178
- ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
11179
- ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
11180
- ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
11181
- 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;
11182
- 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;
11183
- FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
11184
- FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
11185
- FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
11186
- USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
11366
+ ALLOWED_TAGS = _resolveSetOption(cfg, 'ALLOWED_TAGS', DEFAULT_ALLOWED_TAGS, {
11367
+ transform: transformCaseFunc
11368
+ });
11369
+ ALLOWED_ATTR = _resolveSetOption(cfg, 'ALLOWED_ATTR', DEFAULT_ALLOWED_ATTR, {
11370
+ transform: transformCaseFunc
11371
+ });
11372
+ ALLOWED_NAMESPACES = _resolveSetOption(cfg, 'ALLOWED_NAMESPACES', DEFAULT_ALLOWED_NAMESPACES, {
11373
+ transform: stringToString
11374
+ });
11375
+ URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, 'ADD_URI_SAFE_ATTR', DEFAULT_URI_SAFE_ATTRIBUTES, {
11376
+ transform: transformCaseFunc,
11377
+ base: DEFAULT_URI_SAFE_ATTRIBUTES
11378
+ });
11379
+ DATA_URI_TAGS = _resolveSetOption(cfg, 'ADD_DATA_URI_TAGS', DEFAULT_DATA_URI_TAGS, {
11380
+ transform: transformCaseFunc,
11381
+ base: DEFAULT_DATA_URI_TAGS
11382
+ });
11383
+ FORBID_CONTENTS = _resolveSetOption(cfg, 'FORBID_CONTENTS', DEFAULT_FORBID_CONTENTS, {
11384
+ transform: transformCaseFunc
11385
+ });
11386
+ FORBID_TAGS = _resolveSetOption(cfg, 'FORBID_TAGS', clone({}), {
11387
+ transform: transformCaseFunc
11388
+ });
11389
+ FORBID_ATTR = _resolveSetOption(cfg, 'FORBID_ATTR', clone({}), {
11390
+ transform: transformCaseFunc
11391
+ });
11392
+ USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
11187
11393
  ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
11188
11394
  ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
11189
11395
  ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
@@ -11199,20 +11405,22 @@ var purify = {exports: {}};
11199
11405
  SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
11200
11406
  KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
11201
11407
  IN_PLACE = cfg.IN_PLACE || false; // Default false
11202
- IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
11203
- NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
11204
- MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
11205
- HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
11206
- CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || create(null);
11207
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
11208
- CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
11209
- }
11210
- if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
11211
- CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
11212
- }
11213
- if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
11214
- CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
11215
- }
11408
+ IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp
11409
+ NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace
11410
+ MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS); // Default built-in map
11411
+ HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS); // Default built-in map
11412
+ const customElementHandling = objectHasOwnProperty(cfg, 'CUSTOM_ELEMENT_HANDLING') && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === 'object' ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
11413
+ CUSTOM_ELEMENT_HANDLING = create(null);
11414
+ if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {
11415
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck; // Default undefined
11416
+ }
11417
+ if (objectHasOwnProperty(customElementHandling, 'attributeNameCheck') && isRegexOrFunction(customElementHandling.attributeNameCheck)) {
11418
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck; // Default undefined
11419
+ }
11420
+ if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {
11421
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined
11422
+ }
11423
+ seal(CUSTOM_ELEMENT_HANDLING);
11216
11424
  if (SAFE_FOR_TEMPLATES) {
11217
11425
  ALLOW_DATA_ATTR = false;
11218
11426
  }
@@ -11248,36 +11456,36 @@ var purify = {exports: {}};
11248
11456
  EXTRA_ELEMENT_HANDLING.tagCheck = null;
11249
11457
  EXTRA_ELEMENT_HANDLING.attributeCheck = null;
11250
11458
  /* Merge configuration parameters */
11251
- if (cfg.ADD_TAGS) {
11459
+ if (objectHasOwnProperty(cfg, 'ADD_TAGS')) {
11252
11460
  if (typeof cfg.ADD_TAGS === 'function') {
11253
11461
  EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
11254
- } else {
11462
+ } else if (arrayIsArray(cfg.ADD_TAGS)) {
11255
11463
  if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
11256
11464
  ALLOWED_TAGS = clone(ALLOWED_TAGS);
11257
11465
  }
11258
11466
  addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
11259
11467
  }
11260
11468
  }
11261
- if (cfg.ADD_ATTR) {
11469
+ if (objectHasOwnProperty(cfg, 'ADD_ATTR')) {
11262
11470
  if (typeof cfg.ADD_ATTR === 'function') {
11263
11471
  EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
11264
- } else {
11472
+ } else if (arrayIsArray(cfg.ADD_ATTR)) {
11265
11473
  if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
11266
11474
  ALLOWED_ATTR = clone(ALLOWED_ATTR);
11267
11475
  }
11268
11476
  addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
11269
11477
  }
11270
11478
  }
11271
- if (cfg.ADD_URI_SAFE_ATTR) {
11479
+ if (objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') && arrayIsArray(cfg.ADD_URI_SAFE_ATTR)) {
11272
11480
  addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
11273
11481
  }
11274
- if (cfg.FORBID_CONTENTS) {
11482
+ if (objectHasOwnProperty(cfg, 'FORBID_CONTENTS') && arrayIsArray(cfg.FORBID_CONTENTS)) {
11275
11483
  if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
11276
11484
  FORBID_CONTENTS = clone(FORBID_CONTENTS);
11277
11485
  }
11278
11486
  addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
11279
11487
  }
11280
- if (cfg.ADD_FORBID_CONTENTS) {
11488
+ if (objectHasOwnProperty(cfg, 'ADD_FORBID_CONTENTS') && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
11281
11489
  if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
11282
11490
  FORBID_CONTENTS = clone(FORBID_CONTENTS);
11283
11491
  }
@@ -11296,6 +11504,13 @@ var purify = {exports: {}};
11296
11504
  addToSet(ALLOWED_TAGS, ['tbody']);
11297
11505
  delete FORBID_TAGS.tbody;
11298
11506
  }
11507
+ // Re-derive the active Trusted Types policy from this configuration on
11508
+ // every parse. The active policy must never be sticky closure state that
11509
+ // outlives the config that set it: a caller-supplied policy left in place
11510
+ // after `clearConfig()` — or after a later call that supplied none, or
11511
+ // `TRUSTED_TYPES_POLICY: null` — could sign a subsequent "default"
11512
+ // `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.
11513
+ // See GHSA-vxr8-fq34-vvx9.
11299
11514
  if (cfg.TRUSTED_TYPES_POLICY) {
11300
11515
  if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
11301
11516
  throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
@@ -11303,18 +11518,45 @@ var purify = {exports: {}};
11303
11518
  if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
11304
11519
  throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
11305
11520
  }
11306
- // Overwrite existing TrustedTypes policy.
11521
+ // A caller-supplied policy applies to this configuration only.
11522
+ const previousTrustedTypesPolicy = trustedTypesPolicy;
11307
11523
  trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
11308
- // Sign local variables required by `sanitize`.
11309
- emptyHTML = trustedTypesPolicy.createHTML('');
11524
+ // Sign local variables required by `sanitize`. If the supplied policy's
11525
+ // `createHTML` is circular (i.e. it calls `DOMPurify.sanitize`), this
11526
+ // throws via the re-entrancy guard. Restore the previous policy first so
11527
+ // the instance is not left in a poisoned state. See #1422.
11528
+ try {
11529
+ emptyHTML = _createTrustedHTML('');
11530
+ } catch (error) {
11531
+ trustedTypesPolicy = previousTrustedTypesPolicy;
11532
+ throw error;
11533
+ }
11534
+ } else if (cfg.TRUSTED_TYPES_POLICY === null) {
11535
+ // Explicit opt-out for this call: perform no Trusted Types signing and
11536
+ // create nothing (so a strict `trusted-types` CSP that disallows a
11537
+ // `dompurify` policy can still call `sanitize` from inside its own
11538
+ // policy — see #1422). Resetting to `undefined` rather than a sticky
11539
+ // `null` also drops any previously retained caller policy, so it cannot
11540
+ // resurface on a later call, while still allowing the next config-less
11541
+ // call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.
11542
+ trustedTypesPolicy = undefined;
11543
+ emptyHTML = '';
11310
11544
  } else {
11311
- // Uninitialized policy, attempt to initialize the internal dompurify policy.
11545
+ // No policy supplied: keep the currently active policy if one is set — a
11546
+ // previously supplied policy is intentionally sticky across config-less
11547
+ // calls — otherwise fall back to the instance's own internal policy,
11548
+ // created at most once. (A policy supplied for a *single* call still
11549
+ // lingers by design; what must not linger is a policy whose configuration
11550
+ // has been torn down via `clearConfig()`, which restores the default.)
11312
11551
  if (trustedTypesPolicy === undefined) {
11313
- trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
11552
+ trustedTypesPolicy = _getDefaultTrustedTypesPolicy();
11314
11553
  }
11315
- // If creating the internal policy succeeded sign internal variables.
11316
- if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
11317
- emptyHTML = trustedTypesPolicy.createHTML('');
11554
+ // Sign internal variables only when a policy is active. A falsy policy
11555
+ // (Trusted Types unsupported, creation failed, or an explicit opt-out)
11556
+ // leaves `emptyHTML` as a plain string, so we never call `.createHTML` on
11557
+ // a non-policy and throw. See #1422.
11558
+ if (trustedTypesPolicy && typeof emptyHTML === 'string') {
11559
+ emptyHTML = _createTrustedHTML('');
11318
11560
  }
11319
11561
  }
11320
11562
  // Prevent further manipulation of configuration.
@@ -11329,6 +11571,77 @@ var purify = {exports: {}};
11329
11571
  * correctly. */
11330
11572
  const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
11331
11573
  const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
11574
+ /**
11575
+ * Namespace rules for an element in the SVG namespace.
11576
+ *
11577
+ * @param tagName the element's lowercase tag name
11578
+ * @param parent the (possibly simulated) parent node
11579
+ * @param parentTagName the parent's lowercase tag name
11580
+ * @returns true if a spec-compliant parser could produce this element
11581
+ */
11582
+ const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {
11583
+ // The only way to switch from HTML namespace to SVG
11584
+ // is via <svg>. If it happens via any other tag, then
11585
+ // it should be killed.
11586
+ if (parent.namespaceURI === HTML_NAMESPACE) {
11587
+ return tagName === 'svg';
11588
+ }
11589
+ // The only way to switch from MathML to SVG is via <svg>
11590
+ // if the parent is either <annotation-xml> or a MathML
11591
+ // text integration point.
11592
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
11593
+ return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
11594
+ }
11595
+ // We only allow elements that are defined in SVG
11596
+ // spec. All others are disallowed in SVG namespace.
11597
+ return Boolean(ALL_SVG_TAGS[tagName]);
11598
+ };
11599
+ /**
11600
+ * Namespace rules for an element in the MathML namespace.
11601
+ *
11602
+ * @param tagName the element's lowercase tag name
11603
+ * @param parent the (possibly simulated) parent node
11604
+ * @param parentTagName the parent's lowercase tag name
11605
+ * @returns true if a spec-compliant parser could produce this element
11606
+ */
11607
+ const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {
11608
+ // The only way to switch from HTML namespace to MathML
11609
+ // is via <math>. If it happens via any other tag, then
11610
+ // it should be killed.
11611
+ if (parent.namespaceURI === HTML_NAMESPACE) {
11612
+ return tagName === 'math';
11613
+ }
11614
+ // The only way to switch from SVG to MathML is via
11615
+ // <math> and HTML integration points
11616
+ if (parent.namespaceURI === SVG_NAMESPACE) {
11617
+ return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
11618
+ }
11619
+ // We only allow elements that are defined in MathML
11620
+ // spec. All others are disallowed in MathML namespace.
11621
+ return Boolean(ALL_MATHML_TAGS[tagName]);
11622
+ };
11623
+ /**
11624
+ * Namespace rules for an element in the HTML namespace.
11625
+ *
11626
+ * @param tagName the element's lowercase tag name
11627
+ * @param parent the (possibly simulated) parent node
11628
+ * @param parentTagName the parent's lowercase tag name
11629
+ * @returns true if a spec-compliant parser could produce this element
11630
+ */
11631
+ const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {
11632
+ // The only way to switch from SVG to HTML is via
11633
+ // HTML integration points, and from MathML to HTML
11634
+ // is via MathML text integration points
11635
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
11636
+ return false;
11637
+ }
11638
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
11639
+ return false;
11640
+ }
11641
+ // We disallow tags that are specific for MathML
11642
+ // or SVG and should never appear in HTML namespace
11643
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
11644
+ };
11332
11645
  /**
11333
11646
  * @param element a DOM element whose namespace is being checked
11334
11647
  * @returns Return false if the element has a
@@ -11351,51 +11664,13 @@ var purify = {exports: {}};
11351
11664
  return false;
11352
11665
  }
11353
11666
  if (element.namespaceURI === SVG_NAMESPACE) {
11354
- // The only way to switch from HTML namespace to SVG
11355
- // is via <svg>. If it happens via any other tag, then
11356
- // it should be killed.
11357
- if (parent.namespaceURI === HTML_NAMESPACE) {
11358
- return tagName === 'svg';
11359
- }
11360
- // The only way to switch from MathML to SVG is via`
11361
- // svg if parent is either <annotation-xml> or MathML
11362
- // text integration points.
11363
- if (parent.namespaceURI === MATHML_NAMESPACE) {
11364
- return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
11365
- }
11366
- // We only allow elements that are defined in SVG
11367
- // spec. All others are disallowed in SVG namespace.
11368
- return Boolean(ALL_SVG_TAGS[tagName]);
11667
+ return _checkSvgNamespace(tagName, parent, parentTagName);
11369
11668
  }
11370
11669
  if (element.namespaceURI === MATHML_NAMESPACE) {
11371
- // The only way to switch from HTML namespace to MathML
11372
- // is via <math>. If it happens via any other tag, then
11373
- // it should be killed.
11374
- if (parent.namespaceURI === HTML_NAMESPACE) {
11375
- return tagName === 'math';
11376
- }
11377
- // The only way to switch from SVG to MathML is via
11378
- // <math> and HTML integration points
11379
- if (parent.namespaceURI === SVG_NAMESPACE) {
11380
- return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
11381
- }
11382
- // We only allow elements that are defined in MathML
11383
- // spec. All others are disallowed in MathML namespace.
11384
- return Boolean(ALL_MATHML_TAGS[tagName]);
11670
+ return _checkMathMlNamespace(tagName, parent, parentTagName);
11385
11671
  }
11386
11672
  if (element.namespaceURI === HTML_NAMESPACE) {
11387
- // The only way to switch from SVG to HTML is via
11388
- // HTML integration points, and from MathML to HTML
11389
- // is via MathML text integration points
11390
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
11391
- return false;
11392
- }
11393
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
11394
- return false;
11395
- }
11396
- // We disallow tags that are specific for MathML
11397
- // or SVG and should never appear in HTML namespace
11398
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
11673
+ return _checkHtmlNamespace(tagName, parent, parentTagName);
11399
11674
  }
11400
11675
  // For XHTML and XML documents that support custom namespaces
11401
11676
  if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
@@ -11420,7 +11695,74 @@ var purify = {exports: {}};
11420
11695
  // eslint-disable-next-line unicorn/prefer-dom-node-remove
11421
11696
  getParentNode(node).removeChild(node);
11422
11697
  } catch (_) {
11698
+ /* The normal detach failed — this is reached for a parentless node
11699
+ (getParentNode() is null, so .removeChild throws). Element.prototype
11700
+ .remove() is itself a spec no-op on a parentless node, so a recorded
11701
+ "removal" would otherwise hand the caller back an intact,
11702
+ payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or
11703
+ the style-with-element-child rule decided to kill). Fail closed by
11704
+ throwing — exactly as a clobbered root does at the IN_PLACE entry —
11705
+ rather than trying to "neutralize" the node via its own methods.
11706
+ Neutralizing would mean calling getAttributeNames()/removeAttribute()
11707
+ on the node, both of which a <form> root can clobber via a named child
11708
+ (and _isClobbered does not even probe getAttributeNames), so the
11709
+ neutralize step could itself be silently defeated, leaving the payload
11710
+ intact. A throw touches only the cached, clobber-safe remove() and
11711
+ getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)
11712
+ to every root-kill reason. REPORT-3.
11713
+ This lives inside the catch, so it never fires for a normally-removed
11714
+ in-tree node: those have a parent, removeChild() succeeds, and the
11715
+ catch is not entered. Only a kept (parentless) root reaches here. */
11423
11716
  remove(node);
11717
+ if (!getParentNode(node)) {
11718
+ throw typeErrorCreate('a node selected for removal could not be detached from its tree ' + 'and cannot be safely returned; refusing to sanitize in place');
11719
+ }
11720
+ }
11721
+ };
11722
+ /**
11723
+ * _neutralizeRoot
11724
+ *
11725
+ * Fail-closed teardown of an in-place root after the sanitize walk aborts
11726
+ * (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered
11727
+ * custom element's reaction detaches a node so `_forceRemove`'s deliberate
11728
+ * parentless guard throws, or any other re-entrant engine mutation — would
11729
+ * otherwise leave the caller's *live* tree half-sanitized, with everything
11730
+ * after the abort point still carrying its handlers. There is no safe way
11731
+ * to resume the walk (the tree mutated under us), so we strip the root bare:
11732
+ * remove every child and every attribute, then let the caller's catch see
11733
+ * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`
11734
+ * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).
11735
+ *
11736
+ * @param root the in-place root to empty
11737
+ */
11738
+ const _neutralizeRoot = function _neutralizeRoot(root) {
11739
+ const childNodes = getChildNodes(root);
11740
+ if (childNodes) {
11741
+ const snapshot = [];
11742
+ arrayForEach(childNodes, child => {
11743
+ arrayPush(snapshot, child);
11744
+ });
11745
+ arrayForEach(snapshot, child => {
11746
+ try {
11747
+ remove(child);
11748
+ } catch (_) {
11749
+ /* Best-effort teardown; a still-attached child is handled below */
11750
+ }
11751
+ });
11752
+ }
11753
+ const attributes = getAttributes(root);
11754
+ if (attributes) {
11755
+ for (let i = attributes.length - 1; i >= 0; --i) {
11756
+ const attribute = attributes[i];
11757
+ const name = attribute && attribute.name;
11758
+ if (typeof name === 'string') {
11759
+ try {
11760
+ root.removeAttribute(name);
11761
+ } catch (_) {
11762
+ /* Clobbered removeAttribute — ignore (fail-closed best effort) */
11763
+ }
11764
+ }
11765
+ }
11424
11766
  }
11425
11767
  };
11426
11768
  /**
@@ -11455,6 +11797,72 @@ var purify = {exports: {}};
11455
11797
  }
11456
11798
  }
11457
11799
  };
11800
+ /**
11801
+ * _stripDisallowedAttributes
11802
+ *
11803
+ * Removes every attribute the active configuration does not allow from a
11804
+ * single element, using the same allowlist as the main attribute pass (so
11805
+ * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to
11806
+ * neutralise nodes that are being discarded from an in-place tree.
11807
+ *
11808
+ * @param element the element to strip
11809
+ */
11810
+ const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {
11811
+ const attributes = getAttributes(element);
11812
+ if (!attributes) {
11813
+ return;
11814
+ }
11815
+ for (let i = attributes.length - 1; i >= 0; --i) {
11816
+ const attribute = attributes[i];
11817
+ const name = attribute && attribute.name;
11818
+ if (typeof name !== 'string' || ALLOWED_ATTR[transformCaseFunc(name)]) {
11819
+ continue;
11820
+ }
11821
+ try {
11822
+ element.removeAttribute(name);
11823
+ } catch (_) {
11824
+ /* Clobbered removeAttribute on a doomed node — ignore */
11825
+ }
11826
+ }
11827
+ };
11828
+ /**
11829
+ * _neutralizeSubtree
11830
+ *
11831
+ * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT
11832
+ * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,
11833
+ * namespace, comment, processing-instruction and KEEP_CONTENT:false removals
11834
+ * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path
11835
+ * those dropped nodes are detached from the caller's LIVE tree but a
11836
+ * handler-bearing original among them (an `<img onerror>`/`<video>` that was
11837
+ * loading) keeps its queued resource event, which fires in page scope after
11838
+ * sanitize returns. This walks a removed subtree and strips every attribute
11839
+ * the active configuration does not allow — so `on*` handlers are cancelled
11840
+ * through the SAME allowlist that governs kept nodes, not a separate `/^on/`
11841
+ * blocklist. Run synchronously before sanitize returns, i.e. before any
11842
+ * queued event can fire. Hook-free by design: these nodes leave the output,
11843
+ * so firing attribute hooks for them would be surprising. Clobber-safe reads;
11844
+ * a doomed clobbered node may shadow `removeAttribute` (its own attributes are
11845
+ * irrelevant — it is discarded — while its non-clobbered descendants, e.g.
11846
+ * the `<img>`, are reached and scrubbed).
11847
+ *
11848
+ * @param root the root of a removed subtree to neutralise
11849
+ */
11850
+ const _neutralizeSubtree = function _neutralizeSubtree(root) {
11851
+ const stack = [root];
11852
+ while (stack.length > 0) {
11853
+ const node = stack.pop();
11854
+ const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
11855
+ if (nodeType === NODE_TYPE.element) {
11856
+ _stripDisallowedAttributes(node);
11857
+ }
11858
+ const childNodes = getChildNodes(node);
11859
+ if (childNodes) {
11860
+ for (let i = childNodes.length - 1; i >= 0; --i) {
11861
+ stack.push(childNodes[i]);
11862
+ }
11863
+ }
11864
+ }
11865
+ };
11458
11866
  /**
11459
11867
  * _initDocument
11460
11868
  *
@@ -11476,7 +11884,7 @@ var purify = {exports: {}};
11476
11884
  // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
11477
11885
  dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
11478
11886
  }
11479
- const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
11887
+ const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;
11480
11888
  /*
11481
11889
  * Use the DOMParser API by default, fallback later if needs be
11482
11890
  * DOMParser not work for svg when has multiple root element.
@@ -11516,29 +11924,254 @@ var purify = {exports: {}};
11516
11924
  // eslint-disable-next-line no-bitwise
11517
11925
  NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
11518
11926
  };
11927
+ /**
11928
+ * Replace template expression syntax (mustache, ERB, template
11929
+ * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub
11930
+ * sites. Order matters: mustache, then ERB, then template literal.
11931
+ *
11932
+ * @param value the string to scrub
11933
+ * @returns the scrubbed string
11934
+ */
11935
+ const _stripTemplateExpressions = function _stripTemplateExpressions(value) {
11936
+ value = stringReplace(value, MUSTACHE_EXPR$1, ' ');
11937
+ value = stringReplace(value, ERB_EXPR$1, ' ');
11938
+ value = stringReplace(value, TMPLIT_EXPR$1, ' ');
11939
+ return value;
11940
+ };
11941
+ /**
11942
+ * Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the
11943
+ * character data of an element subtree. Used as the final safety net for
11944
+ * SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions
11945
+ * which only form after text-node normalization (e.g. fragments split across
11946
+ * stripped elements) cannot survive into a template-evaluating framework.
11947
+ *
11948
+ * Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`
11949
+ * in place rather than round-tripping through innerHTML. This preserves
11950
+ * descendant node references (important for IN_PLACE callers), avoids a
11951
+ * serialize/reparse cycle, and reads literal character data — which means
11952
+ * `<%...%>` in text content matches the ERB regex against its real bytes
11953
+ * instead of the HTML-entity-escaped form innerHTML would produce.
11954
+ *
11955
+ * Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for
11956
+ * attributes is performed during the per-node `_sanitizeAttributes` pass.
11957
+ *
11958
+ * @param node The root element whose character data should be scrubbed.
11959
+ */
11960
+ const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
11961
+ var _node$querySelectorAl;
11962
+ node.normalize();
11963
+ const walker = createNodeIterator.call(node.ownerDocument || node, node,
11964
+ // eslint-disable-next-line no-bitwise
11965
+ NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
11966
+ let currentNode = walker.nextNode();
11967
+ while (currentNode) {
11968
+ currentNode.data = _stripTemplateExpressions(currentNode.data);
11969
+ currentNode = walker.nextNode();
11970
+ }
11971
+ // NodeIterator does not descend into <template>.content per the DOM spec,
11972
+ // so we must explicitly recurse into each template's content fragment,
11973
+ // mirroring the approach used by _sanitizeShadowDOM.
11974
+ const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, 'template');
11975
+ if (templates) {
11976
+ arrayForEach(templates, tmpl => {
11977
+ if (_isDocumentFragment(tmpl.content)) {
11978
+ _scrubTemplateExpressions2(tmpl.content);
11979
+ }
11980
+ });
11981
+ }
11982
+ };
11519
11983
  /**
11520
11984
  * _isClobbered
11521
11985
  *
11986
+ * Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML
11987
+ * interface with [LegacyOverrideBuiltIns]; a descendant element with a
11988
+ * `name` attribute matching a prototype property shadows that property
11989
+ * on direct reads. We use this check at the IN_PLACE entry-point and
11990
+ * during attribute sanitization to refuse clobbered forms.
11991
+ *
11522
11992
  * @param element element to check for clobbering attacks
11523
11993
  * @return true if clobbered, false if safe
11524
11994
  */
11525
11995
  const _isClobbered = function _isClobbered(element) {
11526
- 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');
11996
+ // Realm-independent tag-name probe. If we can't determine the tag
11997
+ // name at all, we can't reason about clobbering — return false
11998
+ // (the caller's other defences still apply).
11999
+ const realTagName = getNodeName ? getNodeName(element) : null;
12000
+ if (typeof realTagName !== 'string') {
12001
+ return false;
12002
+ }
12003
+ if (transformCaseFunc(realTagName) !== 'form') {
12004
+ return false;
12005
+ }
12006
+ return typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' ||
12007
+ // Realm-safe NamedNodeMap detection: equality against the cached
12008
+ // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
12009
+ // makes the direct read diverge from the cached read; a clean form
12010
+ // (same-realm OR foreign-realm) has both reads pointing at the same
12011
+ // canonical NamedNodeMap.
12012
+ element.attributes !== getAttributes(element) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function' ||
12013
+ // NodeType clobbering probe. Cached Node.prototype.nodeType getter
12014
+ // returns the integer 1 for any Element regardless of realm; direct
12015
+ // read on a clobbered form (e.g. <input name="nodeType">) returns
12016
+ // the named child element. Cheap addition — nodeType is read from
12017
+ // an internal slot, no serialization cost — and removes a residual
12018
+ // clobbering surface used by several mXSS / PI / comment branches
12019
+ // in _sanitizeElements that compare currentNode.nodeType directly.
12020
+ element.nodeType !== getNodeType(element) ||
12021
+ // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
12022
+ // "childNodes" shadows the prototype getter. Direct reads of
12023
+ // form.childNodes from a clobbered form return the named child
12024
+ // instead of the real NodeList, so any walk that reads it directly
12025
+ // skips the form's real children. Compare the direct read to the
12026
+ // cached Node.prototype getter — when the form's named-property
12027
+ // getter intercepts the read, the two values differ and we flag
12028
+ // the form. This catches every clobbering child type (input,
12029
+ // select, etc.) regardless of whether the named child happens to
12030
+ // carry a numeric .length, which a typeof-based probe would miss
12031
+ // (e.g. HTMLSelectElement.length is a defined unsigned-long).
12032
+ element.childNodes !== getChildNodes(element);
11527
12033
  };
11528
12034
  /**
11529
- * Checks whether the given object is a DOM node.
12035
+ * Checks whether the given value is a DocumentFragment from any realm.
12036
+ *
12037
+ * The realm-independent replacement reads `nodeType` through the cached
12038
+ * Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE
12039
+ * constant (11). nodeType is a numeric value resolved from the node's
12040
+ * internal slot, identical across realms for the same kind of node.
12041
+ *
12042
+ * @param value object to check
12043
+ * @return true if value is a DocumentFragment-shaped node from any realm
12044
+ */
12045
+ const _isDocumentFragment = function _isDocumentFragment(value) {
12046
+ if (!getNodeType || typeof value !== 'object' || value === null) {
12047
+ return false;
12048
+ }
12049
+ try {
12050
+ return getNodeType(value) === NODE_TYPE.documentFragment;
12051
+ } catch (_) {
12052
+ return false;
12053
+ }
12054
+ };
12055
+ /**
12056
+ * Checks whether the given object is a DOM node, including nodes that
12057
+ * originate from a different window/realm (e.g. an iframe's
12058
+ * contentDocument). The previous `value instanceof Node` check was
12059
+ * realm-bound: nodes from a different window failed it, causing
12060
+ * sanitize() to silently stringify them and reset IN_PLACE to false,
12061
+ * returning the original node unsanitized. See GHSA-4w3q-35jp-p934.
11530
12062
  *
11531
12063
  * @param value object to check whether it's a DOM node
11532
- * @return true is object is a DOM node
12064
+ * @return true if value is a DOM node from any realm
11533
12065
  */
11534
12066
  const _isNode = function _isNode(value) {
11535
- return typeof Node === 'function' && value instanceof Node;
12067
+ if (!getNodeType || typeof value !== 'object' || value === null) {
12068
+ return false;
12069
+ }
12070
+ try {
12071
+ return typeof getNodeType(value) === 'number';
12072
+ } catch (_) {
12073
+ return false;
12074
+ }
11536
12075
  };
11537
12076
  function _executeHooks(hooks, currentNode, data) {
12077
+ if (hooks.length === 0) {
12078
+ return;
12079
+ }
11538
12080
  arrayForEach(hooks, hook => {
11539
12081
  hook.call(DOMPurify, currentNode, data, CONFIG);
11540
12082
  });
11541
12083
  }
12084
+ /**
12085
+ * Structural-threat checks that condemn a node regardless of the
12086
+ * allowlists: mXSS via namespace confusion, risky CSS construction,
12087
+ * processing instructions, markup-bearing comments. Pure predicate;
12088
+ * the caller removes. Check order is load-bearing.
12089
+ *
12090
+ * @param currentNode the node to inspect
12091
+ * @param tagName the node's transformCaseFunc'd tag name
12092
+ * @return true if the node must be removed
12093
+ */
12094
+ const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
12095
+ /* Detect mXSS attempts abusing namespace confusion */
12096
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {
12097
+ return true;
12098
+ }
12099
+ /* Remove risky CSS construction leading to mXSS */
12100
+ if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {
12101
+ return true;
12102
+ }
12103
+ /* Remove any occurrence of processing instructions */
12104
+ if (currentNode.nodeType === NODE_TYPE.processingInstruction) {
12105
+ return true;
12106
+ }
12107
+ /* Remove any kind of possibly harmful comments */
12108
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) {
12109
+ return true;
12110
+ }
12111
+ return false;
12112
+ };
12113
+ /**
12114
+ * Handle a node whose tag is forbidden or not allowlisted: keep
12115
+ * allowed custom elements (false return exits _sanitizeElements
12116
+ * early - namespace/fallback checks and the afterSanitizeElements
12117
+ * hook are intentionally skipped for kept custom elements), else
12118
+ * hoist content per KEEP_CONTENT and remove.
12119
+ *
12120
+ * @param currentNode the disallowed node
12121
+ * @param tagName the node's transformCaseFunc'd tag name
12122
+ * @return true if the node was removed, false if kept
12123
+ */
12124
+ const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName) {
12125
+ /* Check if we have a custom element to handle */
12126
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
12127
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
12128
+ return false;
12129
+ }
12130
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
12131
+ return false;
12132
+ }
12133
+ }
12134
+ /* Keep content except for bad-listed elements.
12135
+ Use the cached prototype getters exclusively — the previous code
12136
+ had `|| currentNode.parentNode` / `|| currentNode.childNodes`
12137
+ fallbacks, but the cached getters always return the canonical
12138
+ value (or null for a real parent-less node), so the fallback
12139
+ path was dead in safe cases and a clobbering surface in unsafe
12140
+ ones. Falsy cached results stay falsy; the `if (childNodes &&
12141
+ parentNode)` check already gates correctly. */
12142
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
12143
+ const parentNode = getParentNode(currentNode);
12144
+ const childNodes = getChildNodes(currentNode);
12145
+ if (childNodes && parentNode) {
12146
+ const childCount = childNodes.length;
12147
+ /* In-place: hoist the *original* children so the iterator visits
12148
+ and sanitises them through the same allowlist pass as every other
12149
+ node. The caller built the tree in the live document, so the
12150
+ originals carry already-queued resource events (`<img onerror>`,
12151
+ `<video>`/`<audio>` error, lazy/`onload`, …); cloning would leave
12152
+ those originals detached but still armed, firing in page scope
12153
+ while the returned tree looked clean. Moving is safe in-place: the
12154
+ root is pre-validated as an allowed tag and so is never the node
12155
+ being removed, which keeps `parentNode` inside the iterator root
12156
+ and the relocated child inside the serialised tree.
12157
+ Otherwise (string / DOM-copy paths): clone. The iterator is rooted
12158
+ at — and the result serialised from — `body`, so a restrictive
12159
+ ALLOWED_TAGS that removes `body` itself must leave its content in
12160
+ place, which only cloning does; and those paths parse into an
12161
+ inert document, so their discarded originals never had a queued
12162
+ event to neutralise.
12163
+ `childNodes` is live; a tail-to-head walk keeps `childNodes[i]`
12164
+ valid whether we move (drops the trailing entry) or clone (leaves
12165
+ the list intact). */
12166
+ for (let i = childCount - 1; i >= 0; --i) {
12167
+ const hoisted = IN_PLACE ? childNodes[i] : cloneNode(childNodes[i], true);
12168
+ parentNode.insertBefore(hoisted, getNextSibling(currentNode));
12169
+ }
12170
+ }
12171
+ }
12172
+ _forceRemove(currentNode);
12173
+ return true;
12174
+ };
11542
12175
  /**
11543
12176
  * _sanitizeElements
11544
12177
  *
@@ -11549,7 +12182,6 @@ var purify = {exports: {}};
11549
12182
  * @return true if node was killed, false if left alive
11550
12183
  */
11551
12184
  const _sanitizeElements = function _sanitizeElements(currentNode) {
11552
- let content = null;
11553
12185
  /* Execute a hook if present */
11554
12186
  _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
11555
12187
  /* Check if element is clobbered or can clobber */
@@ -11558,76 +12190,41 @@ var purify = {exports: {}};
11558
12190
  return true;
11559
12191
  }
11560
12192
  /* Now let's check the element's type and name */
11561
- const tagName = transformCaseFunc(currentNode.nodeName);
12193
+ const tagName = transformCaseFunc(getNodeName ? getNodeName(currentNode) : currentNode.nodeName);
11562
12194
  /* Execute a hook if present */
11563
12195
  _executeHooks(hooks.uponSanitizeElement, currentNode, {
11564
12196
  tagName,
11565
12197
  allowedTags: ALLOWED_TAGS
11566
12198
  });
11567
- /* Detect mXSS attempts abusing namespace confusion */
11568
- if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
11569
- _forceRemove(currentNode);
11570
- return true;
11571
- }
11572
- /* Remove risky CSS construction leading to mXSS */
11573
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {
11574
- _forceRemove(currentNode);
11575
- return true;
11576
- }
11577
- /* Remove any occurrence of processing instructions */
11578
- if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
11579
- _forceRemove(currentNode);
11580
- return true;
11581
- }
11582
- /* Remove any kind of possibly harmful comments */
11583
- if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
12199
+ /* Remove mXSS vectors, processing instructions and risky comments */
12200
+ if (_isUnsafeNode(currentNode, tagName)) {
11584
12201
  _forceRemove(currentNode);
11585
12202
  return true;
11586
12203
  }
11587
12204
  /* Remove element if anything forbids its presence */
11588
12205
  if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
11589
- /* Check if we have a custom element to handle */
11590
- if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
11591
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
11592
- return false;
11593
- }
11594
- if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
11595
- return false;
11596
- }
11597
- }
11598
- /* Keep content except for bad-listed elements */
11599
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
11600
- const parentNode = getParentNode(currentNode) || currentNode.parentNode;
11601
- const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
11602
- if (childNodes && parentNode) {
11603
- const childCount = childNodes.length;
11604
- for (let i = childCount - 1; i >= 0; --i) {
11605
- const childClone = cloneNode(childNodes[i], true);
11606
- childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
11607
- parentNode.insertBefore(childClone, getNextSibling(currentNode));
11608
- }
11609
- }
11610
- }
11611
- _forceRemove(currentNode);
11612
- return true;
11613
- }
11614
- /* Check whether element has a valid namespace */
11615
- if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
12206
+ return _sanitizeDisallowedNode(currentNode, tagName);
12207
+ }
12208
+ /* Check whether element has a valid namespace.
12209
+ Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype
12210
+ nodeType getter rather than `instanceof Element`, which is realm-
12211
+ bound and short-circuits to false for any node minted in a different
12212
+ realm — letting a foreign-realm element with a forbidden namespace
12213
+ slip past the namespace check entirely. */
12214
+ const nt = getNodeType ? getNodeType(currentNode) : currentNode.nodeType;
12215
+ if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
11616
12216
  _forceRemove(currentNode);
11617
12217
  return true;
11618
12218
  }
11619
12219
  /* Make sure that older browsers don't get fallback-tag mXSS */
11620
- if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
12220
+ if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {
11621
12221
  _forceRemove(currentNode);
11622
12222
  return true;
11623
12223
  }
11624
12224
  /* Sanitize element content to be template-safe */
11625
12225
  if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
11626
12226
  /* Get the element's text content */
11627
- content = currentNode.textContent;
11628
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
11629
- content = stringReplace(content, expr, ' ');
11630
- });
12227
+ const content = _stripTemplateExpressions(currentNode.textContent);
11631
12228
  if (currentNode.textContent !== content) {
11632
12229
  arrayPush(DOMPurify.removed, {
11633
12230
  element: currentNode.cloneNode()
@@ -11657,11 +12254,12 @@ var purify = {exports: {}};
11657
12254
  if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
11658
12255
  return false;
11659
12256
  }
12257
+ const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
11660
12258
  /* Allow valid data-* attributes: At least one character after "-"
11661
12259
  (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
11662
12260
  XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
11663
12261
  We don't need to check the value; it's always URI safe. */
11664
- if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
12262
+ if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!nameIsPermitted) {
11665
12263
  if (
11666
12264
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
11667
12265
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
@@ -11673,11 +12271,15 @@ var purify = {exports: {}};
11673
12271
  return false;
11674
12272
  }
11675
12273
  /* Check value is safe. First, is attr inert? If so, is safe */
11676
- } 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) {
12274
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; 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$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (value) {
11677
12275
  return false;
11678
12276
  } else ;
11679
12277
  return true;
11680
12278
  };
12279
+ /* Names the HTML spec reserves from valid-custom-element-name; these must
12280
+ * never be treated as basic custom elements even when a permissive
12281
+ * CUSTOM_ELEMENT_HANDLING.tagNameCheck is configured. */
12282
+ const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ['annotation-xml', 'color-profile', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'missing-glyph']);
11681
12283
  /**
11682
12284
  * _isBasicCustomElement
11683
12285
  * checks if at least one dash is included in tagName, and it's not the first char
@@ -11687,7 +12289,64 @@ var purify = {exports: {}};
11687
12289
  * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
11688
12290
  */
11689
12291
  const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
11690
- return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
12292
+ return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
12293
+ };
12294
+ /**
12295
+ * Wrap an attribute value in the matching Trusted Types object when
12296
+ * the active policy requires it. Namespaced attributes pass through
12297
+ * unchanged (no TT support yet, see
12298
+ * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).
12299
+ *
12300
+ * @param lcTag lowercase tag name of the containing element
12301
+ * @param lcName lowercase attribute name
12302
+ * @param namespaceURI the attribute's namespace, if any
12303
+ * @param value the attribute value to wrap
12304
+ * @return the value, wrapped when Trusted Types demand it
12305
+ */
12306
+ const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {
12307
+ if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function' && !namespaceURI) {
12308
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
12309
+ case 'TrustedHTML':
12310
+ {
12311
+ return _createTrustedHTML(value);
12312
+ }
12313
+ case 'TrustedScriptURL':
12314
+ {
12315
+ return _createTrustedScriptURL(value);
12316
+ }
12317
+ }
12318
+ }
12319
+ return value;
12320
+ };
12321
+ /**
12322
+ * Write a modified attribute value back onto the element. On
12323
+ * success, re-probe for clobbering introduced by the new value and
12324
+ * remove the element when found; otherwise pop the removal entry
12325
+ * recorded by the earlier _removeAttribute (long-standing pairing
12326
+ * with the SANITIZE_NAMED_PROPS path - do not "fix" casually). On
12327
+ * failure, remove the attribute instead.
12328
+ *
12329
+ * @param currentNode the element carrying the attribute
12330
+ * @param name the attribute name as present on the element
12331
+ * @param namespaceURI the attribute's namespace, if any
12332
+ * @param value the new attribute value
12333
+ */
12334
+ const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {
12335
+ try {
12336
+ if (namespaceURI) {
12337
+ currentNode.setAttributeNS(namespaceURI, name, value);
12338
+ } else {
12339
+ /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
12340
+ currentNode.setAttribute(name, value);
12341
+ }
12342
+ if (_isClobbered(currentNode)) {
12343
+ _forceRemove(currentNode);
12344
+ } else {
12345
+ arrayPop(DOMPurify.removed);
12346
+ }
12347
+ } catch (_) {
12348
+ _removeAttribute(name, currentNode);
12349
+ }
11691
12350
  };
11692
12351
  /**
11693
12352
  * _sanitizeAttributes
@@ -11702,9 +12361,7 @@ var purify = {exports: {}};
11702
12361
  const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
11703
12362
  /* Execute a hook if present */
11704
12363
  _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
11705
- const {
11706
- attributes
11707
- } = currentNode;
12364
+ const attributes = currentNode.attributes;
11708
12365
  /* Check if we have attributes; if not we might have a text node */
11709
12366
  if (!attributes || _isClobbered(currentNode)) {
11710
12367
  return;
@@ -11717,14 +12374,13 @@ var purify = {exports: {}};
11717
12374
  forceKeepAttr: undefined
11718
12375
  };
11719
12376
  let l = attributes.length;
12377
+ const lcTag = transformCaseFunc(currentNode.nodeName);
11720
12378
  /* Go backwards over all attributes; safely remove bad ones */
11721
12379
  while (l--) {
11722
12380
  const attr = attributes[l];
11723
- const {
11724
- name,
11725
- namespaceURI,
11726
- value: attrValue
11727
- } = attr;
12381
+ const name = attr.name,
12382
+ namespaceURI = attr.namespaceURI,
12383
+ attrValue = attr.value;
11728
12384
  const lcName = transformCaseFunc(name);
11729
12385
  const initValue = attrValue;
11730
12386
  let value = name === 'value' ? initValue : stringTrim(initValue);
@@ -11738,12 +12394,14 @@ var purify = {exports: {}};
11738
12394
  /* Full DOM Clobbering protection via namespace isolation,
11739
12395
  * Prefix id and name attributes with `user-content-`
11740
12396
  */
11741
- if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
12397
+ if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name') && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
11742
12398
  // Remove the attribute with this value
11743
12399
  _removeAttribute(name, currentNode);
11744
12400
  // Prefix the value and later re-create the attribute with the sanitized value
11745
12401
  value = SANITIZE_NAMED_PROPS_PREFIX + value;
11746
12402
  }
12403
+ // Else: already prefixed, leave the attribute alone — the prefix is
12404
+ // itself the clobbering protection, and re-applying it is incorrect.
11747
12405
  /* Work around a security issue with comments inside attributes */
11748
12406
  if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
11749
12407
  _removeAttribute(name, currentNode);
@@ -11754,7 +12412,7 @@ var purify = {exports: {}};
11754
12412
  _removeAttribute(name, currentNode);
11755
12413
  continue;
11756
12414
  }
11757
- /* Did the hooks approve of the attribute? */
12415
+ /* Did the hooks force-keep the attribute? */
11758
12416
  if (hookEvent.forceKeepAttr) {
11759
12417
  continue;
11760
12418
  }
@@ -11764,56 +12422,24 @@ var purify = {exports: {}};
11764
12422
  continue;
11765
12423
  }
11766
12424
  /* Work around a security issue in jQuery 3.0 */
11767
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
12425
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
11768
12426
  _removeAttribute(name, currentNode);
11769
12427
  continue;
11770
12428
  }
11771
12429
  /* Sanitize attribute content to be template-safe */
11772
12430
  if (SAFE_FOR_TEMPLATES) {
11773
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
11774
- value = stringReplace(value, expr, ' ');
11775
- });
12431
+ value = _stripTemplateExpressions(value);
11776
12432
  }
11777
12433
  /* Is `value` valid for this attribute? */
11778
- const lcTag = transformCaseFunc(currentNode.nodeName);
11779
12434
  if (!_isValidAttribute(lcTag, lcName, value)) {
11780
12435
  _removeAttribute(name, currentNode);
11781
12436
  continue;
11782
12437
  }
11783
12438
  /* Handle attributes that require Trusted Types */
11784
- if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
11785
- if (namespaceURI) ; else {
11786
- switch (trustedTypes.getAttributeType(lcTag, lcName)) {
11787
- case 'TrustedHTML':
11788
- {
11789
- value = trustedTypesPolicy.createHTML(value);
11790
- break;
11791
- }
11792
- case 'TrustedScriptURL':
11793
- {
11794
- value = trustedTypesPolicy.createScriptURL(value);
11795
- break;
11796
- }
11797
- }
11798
- }
11799
- }
12439
+ value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
11800
12440
  /* Handle invalid data-* attribute set by try-catching it */
11801
12441
  if (value !== initValue) {
11802
- try {
11803
- if (namespaceURI) {
11804
- currentNode.setAttributeNS(namespaceURI, name, value);
11805
- } else {
11806
- /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
11807
- currentNode.setAttribute(name, value);
11808
- }
11809
- if (_isClobbered(currentNode)) {
11810
- _forceRemove(currentNode);
11811
- } else {
11812
- arrayPop(DOMPurify.removed);
11813
- }
11814
- } catch (_) {
11815
- _removeAttribute(name, currentNode);
11816
- }
12442
+ _setAttributeValue(currentNode, name, namespaceURI, value);
11817
12443
  }
11818
12444
  }
11819
12445
  /* Execute a hook if present */
@@ -11836,14 +12462,133 @@ var purify = {exports: {}};
11836
12462
  _sanitizeElements(shadowNode);
11837
12463
  /* Check attributes next */
11838
12464
  _sanitizeAttributes(shadowNode);
11839
- /* Deep shadow DOM detected */
11840
- if (shadowNode.content instanceof DocumentFragment) {
12465
+ /* Deep shadow DOM detected.
12466
+ Realm-safe check (GHSA-hpcv-96wg-7vj8): use nodeType against the
12467
+ DOCUMENT_FRAGMENT_NODE constant rather than instanceof, so we
12468
+ recurse into <template>.content from foreign realms too. */
12469
+ if (_isDocumentFragment(shadowNode.content)) {
11841
12470
  _sanitizeShadowDOM2(shadowNode.content);
11842
12471
  }
12472
+ /* An element iterated here may itself host an attached
12473
+ shadow root. The default NodeIterator does not enter shadow
12474
+ trees, so a shadow root nested inside template.content was
12475
+ previously reached by no walk at all (the pre-pass at
12476
+ _sanitizeAttachedShadowRoots descends via childNodes, which
12477
+ doesn't enter template.content; the template-content recursion
12478
+ above iterates the content but never inspected shadowRoot).
12479
+ Walk it explicitly. The nodeType guard avoids reading
12480
+ shadowRoot off text / comment / CDATA / PI nodes that the
12481
+ iterator also surfaces. */
12482
+ const shadowNodeType = getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType;
12483
+ if (shadowNodeType === NODE_TYPE.element) {
12484
+ const innerSr = getShadowRoot(shadowNode);
12485
+ if (_isDocumentFragment(innerSr)) {
12486
+ _sanitizeAttachedShadowRoots(innerSr);
12487
+ _sanitizeShadowDOM2(innerSr);
12488
+ }
12489
+ }
11843
12490
  }
11844
12491
  /* Execute a hook if present */
11845
12492
  _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
11846
12493
  };
12494
+ /**
12495
+ * _sanitizeAttachedShadowRoots
12496
+ *
12497
+ * Walks `root` and feeds every attached shadow root we encounter into
12498
+ * the existing _sanitizeShadowDOM pipeline. The default node iterator
12499
+ * does not descend into shadow trees, so nodes inside an attached
12500
+ * shadow root would otherwise be skipped entirely.
12501
+ *
12502
+ * Two real input paths put attached shadow roots in front of us:
12503
+ * 1. IN_PLACE on a DOM node that already has shadow roots attached.
12504
+ * 2. DOM-node input where importNode(dirty, true) deep-clones the
12505
+ * shadow root because it was created with `clonable: true`.
12506
+ *
12507
+ * This pass runs once, up front, so the main iteration loop (and the
12508
+ * existing _sanitizeShadowDOM template-content recursion) stay
12509
+ * untouched — string-input paths are not affected.
12510
+ *
12511
+ * @param root the subtree root to walk for attached shadow roots
12512
+ */
12513
+ const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {
12514
+ /* Iterative (explicit stack) rather than per-child recursion. DOM APIs
12515
+ impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data
12516
+ built straight into the DOM — the IN_PLACE surface) deeper than the JS
12517
+ call-stack budget would otherwise overflow native recursion here and
12518
+ throw at the IN_PLACE entry pre-pass, before a single node is
12519
+ sanitized, leaving the caller's live tree untouched (fail-open). See
12520
+ campaign-3 F4. A heap stack keeps depth off the call stack.
12521
+ Each work item is either a node to descend into, or a deferred
12522
+ `_sanitizeShadowDOM` for an already-walked shadow root. The deferred
12523
+ form preserves the original post-order discipline: a shadow root's
12524
+ nested shadow roots are discovered before the outer shadow is
12525
+ sanitized (which may remove hosts). Pushes are in reverse of the
12526
+ desired processing order (LIFO): template content, then children, then
12527
+ the shadow-sanitize, then the shadow walk — so the order matches the
12528
+ previous recursion exactly. */
12529
+ const stack = [{
12530
+ node: root,
12531
+ shadow: null
12532
+ }];
12533
+ while (stack.length > 0) {
12534
+ const item = stack.pop();
12535
+ /* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */
12536
+ if (item.shadow) {
12537
+ _sanitizeShadowDOM2(item.shadow);
12538
+ continue;
12539
+ }
12540
+ const node = item.node;
12541
+ const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
12542
+ const isElement = nodeType === NODE_TYPE.element;
12543
+ /* (pushed last → processed first) Children, snapshotted in reverse so
12544
+ the first child is processed first. Snapshotting matters because a
12545
+ hook may detach siblings mid-walk. */
12546
+ const childNodes = getChildNodes(node);
12547
+ if (childNodes) {
12548
+ for (let i = childNodes.length - 1; i >= 0; --i) {
12549
+ stack.push({
12550
+ node: childNodes[i],
12551
+ shadow: null
12552
+ });
12553
+ }
12554
+ }
12555
+ /* (pushed before children → processed after them, matching the old
12556
+ "template content last" order) When the node is a <template>,
12557
+ descend into its content. */
12558
+ if (isElement) {
12559
+ const rootName = getNodeName ? getNodeName(node) : null;
12560
+ if (typeof rootName === 'string' && transformCaseFunc(rootName) === 'template') {
12561
+ const content = node.content;
12562
+ if (_isDocumentFragment(content)) {
12563
+ stack.push({
12564
+ node: content,
12565
+ shadow: null
12566
+ });
12567
+ }
12568
+ }
12569
+ }
12570
+ /* Shadow root (processed first): walk its subtree, then sanitise it.
12571
+ Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection
12572
+ rather than `instanceof DocumentFragment`, which is realm-bound and
12573
+ silently skipped foreign-realm shadow roots (e.g.
12574
+ iframe.contentDocument attachShadow). */
12575
+ if (isElement) {
12576
+ const sr = getShadowRoot(node);
12577
+ if (_isDocumentFragment(sr)) {
12578
+ /* Push the deferred sanitise first so it pops after the shadow
12579
+ walk we push next, i.e. nested shadow roots are discovered
12580
+ before this one is sanitised. */
12581
+ stack.push({
12582
+ node: null,
12583
+ shadow: sr
12584
+ }, {
12585
+ node: sr,
12586
+ shadow: null
12587
+ });
12588
+ }
12589
+ }
12590
+ }
12591
+ };
11847
12592
  // eslint-disable-next-line complexity
11848
12593
  DOMPurify.sanitize = function (dirty) {
11849
12594
  let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -11860,13 +12605,9 @@ var purify = {exports: {}};
11860
12605
  }
11861
12606
  /* Stringify, in case dirty is an object */
11862
12607
  if (typeof dirty !== 'string' && !_isNode(dirty)) {
11863
- if (typeof dirty.toString === 'function') {
11864
- dirty = dirty.toString();
11865
- if (typeof dirty !== 'string') {
11866
- throw typeErrorCreate('dirty is not a string, aborting');
11867
- }
11868
- } else {
11869
- throw typeErrorCreate('toString is not a function');
12608
+ dirty = stringifyValue(dirty);
12609
+ if (typeof dirty !== 'string') {
12610
+ throw typeErrorCreate('dirty is not a string, aborting');
11870
12611
  }
11871
12612
  }
11872
12613
  /* Return dirty HTML if DOMPurify cannot run */
@@ -11874,24 +12615,78 @@ var purify = {exports: {}};
11874
12615
  return dirty;
11875
12616
  }
11876
12617
  /* Assign config vars */
11877
- if (!SET_CONFIG) {
12618
+ if (SET_CONFIG) {
12619
+ /* Persistent setConfig() path: _parseConfig is skipped, so the sets are
12620
+ * not re-derived per call. Restore them from the pristine bindings
12621
+ * captured at setConfig() time so a previous call's hook clone (mutated
12622
+ * below) does not carry over. */
12623
+ ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
12624
+ ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
12625
+ } else {
11878
12626
  _parseConfig(cfg);
11879
12627
  }
12628
+ /* Clone the hook-mutable allowlists before the walk whenever an
12629
+ * uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS
12630
+ * and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so
12631
+ * a hook that widens them would otherwise mutate the shared set
12632
+ * permanently: across later calls and across every element. Cloning per
12633
+ * walk keeps documented in-call widening working while scoping it to the
12634
+ * call. A single guard for both config paths - the per-call path rebinds
12635
+ * the sets in _parseConfig each call, the persistent path restores them
12636
+ * from the captured bindings just above - so the two cannot diverge. */
12637
+ if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {
12638
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
12639
+ }
12640
+ if (hooks.uponSanitizeAttribute.length > 0) {
12641
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
12642
+ }
11880
12643
  /* Clean up removed elements */
11881
12644
  DOMPurify.removed = [];
11882
- /* Check if dirty is correctly typed for IN_PLACE */
11883
- if (typeof dirty === 'string') {
11884
- IN_PLACE = false;
11885
- }
11886
- if (IN_PLACE) {
11887
- /* Do some early pre-sanitization to avoid unsafe root nodes */
11888
- if (dirty.nodeName) {
11889
- const tagName = transformCaseFunc(dirty.nodeName);
12645
+ /* Resolve IN_PLACE for this call without mutating persistent config.
12646
+ Writing the IN_PLACE closure variable here leaks under setConfig(),
12647
+ where _parseConfig is skipped on later calls: a single string call would
12648
+ disable in-place mode for every subsequent node call, returning a
12649
+ sanitized copy while leaving the caller's node — which in-place callers
12650
+ keep using and whose return value they ignore unsanitized. REPORT-2. */
12651
+ const inPlace = IN_PLACE && typeof dirty !== 'string' && _isNode(dirty);
12652
+ if (inPlace) {
12653
+ /* Do some early pre-sanitization to avoid unsafe root nodes.
12654
+ Read nodeName through the cached prototype getter — a clobbering
12655
+ child named "nodeName" on the form root would otherwise shadow
12656
+ the property and let this check skip the root-allowlist
12657
+ validation entirely. */
12658
+ const nn = getNodeName ? getNodeName(dirty) : dirty.nodeName;
12659
+ if (typeof nn === 'string') {
12660
+ const tagName = transformCaseFunc(nn);
11890
12661
  if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
11891
12662
  throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
11892
12663
  }
11893
12664
  }
11894
- } else if (dirty instanceof Node) {
12665
+ /* Pre-flight the root through _isClobbered. The iterator-driven
12666
+ removal path can not detach a parent-less root: _forceRemove
12667
+ falls through to Element.prototype.remove(), which per spec
12668
+ is a no-op on a node with no parent. A clobbered root would
12669
+ then survive the main loop with its attributes uninspected,
12670
+ because _sanitizeAttributes early-returns on _isClobbered. The
12671
+ result would be an attacker-controlled form, complete with any
12672
+ event-handler attributes the caller passed in, handed back to
12673
+ the application unsanitized. Refuse to sanitize such a root
12674
+ the same way we refuse a forbidden tag. GHSA-r47g-fvhr-h676. */
12675
+ if (_isClobbered(dirty)) {
12676
+ throw typeErrorCreate('root node is clobbered and cannot be sanitized in-place');
12677
+ }
12678
+ /* Sanitize attached shadow roots before the main iterator runs.
12679
+ The iterator does not descend into shadow trees. Same fail-closed
12680
+ barrier as the main walk (campaign-3 F2): a custom-element reaction
12681
+ inside a shadow root could abort this pre-pass before the walk runs,
12682
+ which would otherwise leave the entire live tree unsanitized. */
12683
+ try {
12684
+ _sanitizeAttachedShadowRoots(dirty);
12685
+ } catch (error) {
12686
+ _neutralizeRoot(dirty);
12687
+ throw error;
12688
+ }
12689
+ } else if (_isNode(dirty)) {
11895
12690
  /* If dirty is a DOM element, append to an empty document to avoid
11896
12691
  elements being stripped by the parser */
11897
12692
  body = _initDocument('<!---->');
@@ -11905,12 +12700,18 @@ var purify = {exports: {}};
11905
12700
  // eslint-disable-next-line unicorn/prefer-dom-node-append
11906
12701
  body.appendChild(importedNode);
11907
12702
  }
12703
+ /* Clonable shadow roots are deep-cloned by importNode(); sanitize
12704
+ them before the main iterator runs, since the iterator does not
12705
+ descend into shadow trees. The walk routes every read through a
12706
+ cached prototype getter so clobbering descendants on a form root
12707
+ cannot hide a shadow host from this pass. */
12708
+ _sanitizeAttachedShadowRoots(importedNode);
11908
12709
  } else {
11909
12710
  /* Exit directly if we have nothing to do */
11910
12711
  if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
11911
12712
  // eslint-disable-next-line unicorn/prefer-includes
11912
12713
  dirty.indexOf('<') === -1) {
11913
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
12714
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;
11914
12715
  }
11915
12716
  /* Initialize the document to work on */
11916
12717
  body = _initDocument(dirty);
@@ -11924,31 +12725,59 @@ var purify = {exports: {}};
11924
12725
  _forceRemove(body.firstChild);
11925
12726
  }
11926
12727
  /* Get node iterator */
11927
- const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
11928
- /* Now start iterating over the created document */
11929
- while (currentNode = nodeIterator.nextNode()) {
11930
- /* Sanitize tags and elements */
11931
- _sanitizeElements(currentNode);
11932
- /* Check attributes next */
11933
- _sanitizeAttributes(currentNode);
11934
- /* Shadow DOM detected, sanitize it */
11935
- if (currentNode.content instanceof DocumentFragment) {
11936
- _sanitizeShadowDOM2(currentNode.content);
12728
+ const nodeIterator = _createNodeIterator(inPlace ? dirty : body);
12729
+ /* Now start iterating over the created document.
12730
+ The walk runs inside an exception barrier (campaign-3 F2): a re-entrant
12731
+ engine/custom-element mutation can detach a node mid-walk so
12732
+ `_forceRemove`'s parentless guard throws, aborting the loop. Without the
12733
+ barrier the caller's in-place tree would be left half-sanitized with the
12734
+ unvisited tail still armed. On any throw we fail closed — strip the
12735
+ in-place root bare then rethrow so the existing throw contract is
12736
+ preserved. (String/DOM-copy paths never return the partial body, so the
12737
+ propagating throw is already fail-closed there.) */
12738
+ try {
12739
+ while (currentNode = nodeIterator.nextNode()) {
12740
+ /* Sanitize tags and elements */
12741
+ _sanitizeElements(currentNode);
12742
+ /* Check attributes next */
12743
+ _sanitizeAttributes(currentNode);
12744
+ /* Shadow DOM detected, sanitize it.
12745
+ Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection
12746
+ instead of instanceof, so foreign-realm <template>.content is
12747
+ walked correctly. */
12748
+ if (_isDocumentFragment(currentNode.content)) {
12749
+ _sanitizeShadowDOM2(currentNode.content);
12750
+ }
12751
+ }
12752
+ } catch (error) {
12753
+ if (inPlace) {
12754
+ _neutralizeRoot(dirty);
11937
12755
  }
12756
+ throw error;
11938
12757
  }
11939
12758
  /* If we sanitized `dirty` in-place, return it. */
11940
- if (IN_PLACE) {
12759
+ if (inPlace) {
12760
+ /* Fail-closed completion of the audit-5 F1 fix: every node removed from
12761
+ the caller's live tree is detached but may still hold a queued
12762
+ resource-event handler that fires in page scope after we return. The
12763
+ move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the
12764
+ non-allow-listed attributes off every other removed subtree (clobber,
12765
+ mXSS, namespace, comments, KEEP_CONTENT:false, …) so those handlers are
12766
+ cancelled before any event can fire. Runs synchronously, pre-return. */
12767
+ arrayForEach(DOMPurify.removed, entry => {
12768
+ if (entry.element) {
12769
+ _neutralizeSubtree(entry.element);
12770
+ }
12771
+ });
12772
+ if (SAFE_FOR_TEMPLATES) {
12773
+ _scrubTemplateExpressions2(dirty);
12774
+ }
11941
12775
  return dirty;
11942
12776
  }
11943
12777
  /* Return sanitized string or DOM */
11944
12778
  if (RETURN_DOM) {
11945
12779
  if (SAFE_FOR_TEMPLATES) {
11946
- body.normalize();
11947
- let html = body.innerHTML;
11948
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
11949
- html = stringReplace(html, expr, ' ');
11950
- });
11951
- body.innerHTML = html;
12780
+ _scrubTemplateExpressions2(body);
11952
12781
  }
11953
12782
  if (RETURN_DOM_FRAGMENT) {
11954
12783
  returnNode = createDocumentFragment.call(body.ownerDocument);
@@ -11978,20 +12807,28 @@ var purify = {exports: {}};
11978
12807
  }
11979
12808
  /* Sanitize final string template-safe */
11980
12809
  if (SAFE_FOR_TEMPLATES) {
11981
- arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
11982
- serializedHTML = stringReplace(serializedHTML, expr, ' ');
11983
- });
12810
+ serializedHTML = _stripTemplateExpressions(serializedHTML);
11984
12811
  }
11985
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
12812
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;
11986
12813
  };
11987
12814
  DOMPurify.setConfig = function () {
11988
12815
  let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11989
12816
  _parseConfig(cfg);
11990
12817
  SET_CONFIG = true;
12818
+ SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
12819
+ SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
11991
12820
  };
11992
12821
  DOMPurify.clearConfig = function () {
11993
12822
  CONFIG = null;
11994
12823
  SET_CONFIG = false;
12824
+ SET_CONFIG_ALLOWED_TAGS = null;
12825
+ SET_CONFIG_ALLOWED_ATTR = null;
12826
+ // Drop any caller-supplied Trusted Types policy so it cannot poison later
12827
+ // `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and
12828
+ // never recreated — Trusted Types throws on duplicate names) is restored by
12829
+ // the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.
12830
+ trustedTypesPolicy = defaultTrustedTypesPolicy;
12831
+ emptyHTML = '';
11995
12832
  };
11996
12833
  DOMPurify.isValidAttribute = function (tag, attr, value) {
11997
12834
  /* Initialize shared config vars if necessary. */
@@ -12006,9 +12843,19 @@ var purify = {exports: {}};
12006
12843
  if (typeof hookFunction !== 'function') {
12007
12844
  return;
12008
12845
  }
12846
+ /* Reject unknown entry points. Without this, a non-hook key (e.g.
12847
+ * '__proto__') indexes off the prototype chain rather than a real
12848
+ * hook array, and arrayPush then writes to Object.prototype. Guard
12849
+ * with an own-property check against the known hook names. */
12850
+ if (!objectHasOwnProperty(hooks, entryPoint)) {
12851
+ return;
12852
+ }
12009
12853
  arrayPush(hooks[entryPoint], hookFunction);
12010
12854
  };
12011
12855
  DOMPurify.removeHook = function (entryPoint, hookFunction) {
12856
+ if (!objectHasOwnProperty(hooks, entryPoint)) {
12857
+ return undefined;
12858
+ }
12012
12859
  if (hookFunction !== undefined) {
12013
12860
  const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
12014
12861
  return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
@@ -12016,6 +12863,9 @@ var purify = {exports: {}};
12016
12863
  return arrayPop(hooks[entryPoint]);
12017
12864
  };
12018
12865
  DOMPurify.removeHooks = function (entryPoint) {
12866
+ if (!objectHasOwnProperty(hooks, entryPoint)) {
12867
+ return;
12868
+ }
12019
12869
  hooks[entryPoint] = [];
12020
12870
  };
12021
12871
  DOMPurify.removeAllHooks = function () {
@@ -13195,7 +14045,7 @@ class MenuGroup {
13195
14045
  }; }
13196
14046
  }
13197
14047
 
13198
- const icMenuItemCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host ::part(button){color:var(--ic-popover-menu-item-check);--ic-typography-color:var(--ic-popover-menu-item-check);padding:calc(var(--ic-space-xxxs) / 2);display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:0;min-height:2.5rem;height:auto}.focus-border{display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:var(--ic-border-radius);margin:calc(var(--ic-space-xxxs) / 2);padding:var(--ic-space-xxs);border:var(--ic-space-xxxs) dashed transparent;--icon-height:auto}:host(.ic-menu-item-disabled) ::part(button){color:var(--ic-popover-menu-item-check-disabled) !important;--ic-typography-color:var(--ic-popover-menu-item-check-disabled) !important;pointer-events:none}:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host(.ic-menu-item-variant-destructive) ::part(button){color:var(--ic-popover-menu-destructive-item-icon);--ic-typography-color:var(--ic-popover-menu-destructive-item-label)}:host ::part(button):hover{background-color:var(--ic-popover-background-hover)}:host ::part(button):focus-visible,:host ::part(button):focus{color:var(--ic-popover-menu-item-icon-focused);--ic-typography-color:purple;background-color:var(--ic-popover-background-focus);box-shadow:none}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{color:var(--ic-popover-menu-item-icon-disabled) !important;--ic-typography-color:orange !important}:host(.ic-menu-item-variant-destructive) ::part(button):focus-visible,:host(.ic-menu-item-variant-destructive) ::part(button):focus{background-color:var(--ic-popover-destructive-background-focus)}ic-button:focus-within .menu-item-label,ic-button:focus-within .shortcut,ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-focused)}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:var(--ic-popover-menu-border)}:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-item-label) !important;--ic-typography-color:var(--ic-popover-menu-item-label) !important}:host(.ic-menu-item-variant-destructive) ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-destructive-item-label) !important;--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.menu-item-info{display:flex;flex-direction:column;flex:1;align-items:baseline;white-space:pre-line;text-align:left}.menu-labels{display:flex;align-items:baseline;gap:var(--ic-space-xs)}.menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}.shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut);display:flex;flex:min-content}:host(.ic-menu-item-variant-destructive) .menu-item-label{text-transform:uppercase;font-weight:600;letter-spacing:0.025em}ic-button:active .menu-item-label{--ic-typography-color:var(--ic-popover-menu-item-label)}ic-button:active .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}ic-button:active .shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut)}:host(.ic-menu-item-variant-destructive) ic-button:active .menu-item-label{--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.icon,.check-icon,.submenu-icon,.icon ::slotted(svg),.check-icon svg,.submenu-icon svg{width:var(--ic-space-lg);height:var(--ic-space-lg)}.check-icon.hide{visibility:hidden}@media (forced-colors: active){:host ::part(button){border:canvas}:host ::part(button):focus-visible{outline:var(--ic-space-xxxs) solid transparent}.focus-border{border-color:canvas}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:GrayText}:host(.ic-menu-item-disabled) .menu-item-info,:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-info,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:GrayText !important}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{outline-color:GrayText !important}}";
14048
+ const icMenuItemCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host ::part(button){color:var(--ic-popover-menu-item-check);--ic-typography-color:var(--ic-popover-menu-item-check);padding:calc(var(--ic-space-xxxs) / 2);display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:0;min-height:2.5rem;height:auto}.focus-border{display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:var(--ic-border-radius);margin:calc(var(--ic-space-xxxs) / 2);padding:var(--ic-space-xxs);border:var(--ic-space-xxxs) dashed transparent;--icon-height:auto}:host(.ic-menu-item-disabled) ::part(button){color:var(--ic-popover-menu-item-check-disabled) !important;--ic-typography-color:var(--ic-popover-menu-item-check-disabled) !important;pointer-events:none}:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host(.ic-menu-item-variant-destructive) ::part(button){color:var(--ic-popover-menu-destructive-item-icon);--ic-typography-color:var(--ic-popover-menu-destructive-item-label)}:host(.ic-menu-item-variant-destructive) ::part(button):focus{background-color:var(--ic-popover-destructive-background-focus)}:host ::part(button):hover{background-color:var(--ic-popover-background-hover)}:host ::part(button):focus{box-shadow:none}:host ::part(button):focus,:host ::part(button):focus-visible{color:var(--ic-popover-menu-item-icon-focused);--ic-typography-color:var(--ic-popover-menu-item-label-focused);background-color:var(--ic-popover-background-focus)}ic-button:focus-within .menu-item-label,ic-button:focus-within .shortcut,ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-focused)}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:var(--ic-popover-menu-border)}:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-item-label) !important;--ic-typography-color:var(--ic-popover-menu-item-label) !important}:host(.ic-menu-item-variant-destructive) ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-destructive-item-label) !important;--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.menu-item-info{display:flex;flex-direction:column;flex:1;align-items:baseline;white-space:pre-line;text-align:left}.menu-labels{display:flex;align-items:baseline;gap:var(--ic-space-xs)}.menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}.shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut);display:flex;flex:min-content}:host(.ic-menu-item-variant-destructive) .menu-item-label{text-transform:uppercase;font-weight:600;letter-spacing:0.025em}ic-button:active .menu-item-label{--ic-typography-color:var(--ic-popover-menu-item-label)}ic-button:active .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}ic-button:active .shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut)}:host(.ic-menu-item-variant-destructive) ic-button:active .menu-item-label{--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.icon,.check-icon,.submenu-icon,.icon ::slotted(svg),.check-icon svg,.submenu-icon svg{width:var(--ic-space-lg);height:var(--ic-space-lg)}.check-icon.hide{visibility:hidden}@media (forced-colors: active){:host ::part(button){border:canvas}:host ::part(button):focus-visible{outline:var(--ic-space-xxxs) solid transparent}.focus-border{border-color:canvas}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:GrayText}:host(.ic-menu-item-disabled) .menu-item-info,:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-info,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:GrayText !important}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{outline-color:GrayText !important}}";
13199
14049
  var IcMenuItemStyle0 = icMenuItemCss;
13200
14050
 
13201
14051
  /**
@@ -13220,6 +14070,10 @@ class MenuItem {
13220
14070
  * The variant of the menu item.
13221
14071
  */
13222
14072
  this.variant = "default";
14073
+ /**
14074
+ * If `true`, the menu will close when this menu item is clicked.
14075
+ */
14076
+ this.closeMenuOnSelect = true;
13223
14077
  this.handleClick = (e) => {
13224
14078
  if (isPropDefined(this.submenuTriggerFor)) {
13225
14079
  this.triggerPopoverMenuInstance.emit();
@@ -13320,7 +14174,8 @@ class MenuItem {
13320
14174
  "rel": [1],
13321
14175
  "submenuTriggerFor": [1, "submenu-trigger-for"],
13322
14176
  "target": [1],
13323
- "variant": [1537]
14177
+ "variant": [1537],
14178
+ "closeMenuOnSelect": [4, "close-menu-on-select"]
13324
14179
  },
13325
14180
  "$listeners$": [[2, "click", "handleHostClick"]],
13326
14181
  "$lazyBundleId$": "-",
@@ -14422,16 +15277,20 @@ class Pagination {
14422
15277
  };
14423
15278
  // button rendering abstracted from component render methods for clarity
14424
15279
  this.firstButton = () => {
14425
- return (hAsync("ic-button", { id: "first-page-button", "aria-label": "Go to first page", theme: this.theme, onClick: this.handleClickFirst, class: "page-button first-last", disabled: this.currentPage === 1 || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationFirstLast }));
15280
+ var _a;
15281
+ return (hAsync("ic-button", { id: "first-page-button", "aria-label": `Go to first ${(_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`, theme: this.theme, onClick: this.handleClickFirst, class: "page-button first-last", disabled: this.currentPage === 1 || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationFirstLast }));
14426
15282
  };
14427
15283
  this.previousButton = () => {
14428
- return (hAsync("ic-button", { id: "previous-page-button", "aria-label": "Go to previous page", theme: this.theme, onClick: this.handleClickPrevious, class: "page-button next-previous flip", disabled: this.currentPage === 1 || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationNextPrevious }));
15284
+ var _a;
15285
+ return (hAsync("ic-button", { id: "previous-page-button", "aria-label": `Go to previous ${(_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`, theme: this.theme, onClick: this.handleClickPrevious, class: "page-button next-previous flip", disabled: this.currentPage === 1 || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationNextPrevious }));
14429
15286
  };
14430
15287
  this.nextButton = () => {
14431
- return (hAsync("ic-button", { id: "next-page-button", "aria-label": "Go to next page", theme: this.theme, onClick: this.handleClickNext, class: "page-button next-previous", disabled: this.currentPage === this.pages || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationNextPrevious }));
15288
+ var _a;
15289
+ return (hAsync("ic-button", { id: "next-page-button", "aria-label": `Go to next ${(_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`, theme: this.theme, onClick: this.handleClickNext, class: "page-button next-previous", disabled: this.currentPage === this.pages || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationNextPrevious }));
14432
15290
  };
14433
15291
  this.lastButton = () => {
14434
- return (hAsync("ic-button", { id: "last-page-button", "aria-label": "Go to last page", theme: this.theme, onClick: this.handleClickLast, class: "page-button first-last flip", disabled: this.currentPage === this.pages || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationFirstLast }));
15292
+ var _a;
15293
+ return (hAsync("ic-button", { id: "last-page-button", "aria-label": `Go to last ${(_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()}`, theme: this.theme, onClick: this.handleClickLast, class: "page-button first-last flip", disabled: this.currentPage === this.pages || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationFirstLast }));
14435
15294
  };
14436
15295
  this.renderStartEllipsis = () => {
14437
15296
  return (hAsync("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, type: "ellipsis", id: "start-ellipsis", disabled: this.disabled }));
@@ -14615,14 +15474,14 @@ class Pagination {
14615
15474
  }
14616
15475
  render() {
14617
15476
  const { type, currentPage, hideCurrentPage, disabled, hideFirstAndLastPageButton, label, theme, monochrome, } = this;
14618
- return (hAsync(Host, { key: 'b6438410825fba931acc4eb7282ea11341f4a2ab', class: {
15477
+ return (hAsync(Host, { key: '17e45e030ef6620c592d73a21d9b6dded9978565', class: {
14619
15478
  [`ic-theme-${theme}`]: theme !== "inherit",
14620
15479
  ["ic-pagination-monochrome"]: !!monochrome,
14621
- } }, type === "simple" && (hAsync("nav", { key: 'c76e2d21aaed0bb12c976778e1e6399157002b4f', class: {
15480
+ } }, type === "simple" && (hAsync("nav", { key: 'a42e658ed8d67797390d5d256786f9abaa258ede', class: {
14622
15481
  ["disabled"]: !!disabled,
14623
- }, role: "navigation", "aria-label": this.accessibleLabel }, hideFirstAndLastPageButton ? null : this.firstButton(), this.previousButton(), hAsync("ic-pagination-item", { key: 'c5b391e53945f6545e3b2694bcd32a8d9fdab18e', theme: this.theme, monochrome: this.monochrome, type: "simple-current", page: currentPage, label: label, class: { ["hide-current-page"]: !!hideCurrentPage }, disabled: disabled }), this.nextButton(), hideFirstAndLastPageButton ? null : this.lastButton())), type === "complex" && (hAsync("nav", { key: 'faa2aa8655d7e1de8877efca2d43233ae3de7d49', class: {
15482
+ }, role: "navigation", "aria-label": this.accessibleLabel }, hideFirstAndLastPageButton ? null : this.firstButton(), this.previousButton(), hAsync("ic-pagination-item", { key: 'ce42e8e0c6c0227554cb17c83a1b36f688112a01', theme: this.theme, monochrome: this.monochrome, type: "simple-current", page: currentPage, label: label, class: { ["hide-current-page"]: !!hideCurrentPage }, disabled: disabled }), this.nextButton(), hideFirstAndLastPageButton ? null : this.lastButton())), type === "complex" && (hAsync("nav", { key: '5b2c3a6da6dfde3eb51594a47f617bb7cc2fdcdb', class: {
14624
15483
  ["disabled"]: !!disabled,
14625
- }, role: "navigation", "aria-label": this.accessibleLabel }, hideFirstAndLastPageButton ? null : this.firstButton(), this.previousButton(), this.renderStartItems(), this.startEllipsis && this.renderStartEllipsis(), this.renderMiddleItems(), this.endEllipsis && this.renderEndEllipsis(), this.renderEndItems(), this.nextButton(), hideFirstAndLastPageButton ? null : this.lastButton())), type === "complex" && (hAsync("span", { key: 'fb40e41bc8e509eb8d3119c40e0b8c2d43b1a19f', class: "sr-only", "aria-live": "polite" }, "Page ", this.currentPage))));
15484
+ }, role: "navigation", "aria-label": this.accessibleLabel }, hideFirstAndLastPageButton ? null : this.firstButton(), this.previousButton(), this.renderStartItems(), this.startEllipsis && this.renderStartEllipsis(), this.renderMiddleItems(), this.endEllipsis && this.renderEndEllipsis(), this.renderEndItems(), this.nextButton(), hideFirstAndLastPageButton ? null : this.lastButton())), type === "complex" && (hAsync("span", { key: 'fe85a33cfa0b3d2e2d556f15e6ade209dd0099eb', class: "sr-only", "aria-live": "polite" }, "Page ", this.currentPage))));
14626
15485
  }
14627
15486
  get el() { return getElement(this); }
14628
15487
  static get watchers() { return {
@@ -15085,7 +15944,7 @@ class PaginationBar {
15085
15944
  }; }
15086
15945
  }
15087
15946
 
15088
- const icPaginationItemCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}a{text-align:center}.item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--ic-space-xl) + var(--ic-space-sm));height:var(--ic-space-xl);margin:var(--ic-space-xxs) var(--ic-space-xxxs);cursor:pointer;text-decoration:none}button{background:none;border:none;outline:inherit;position:relative}.ellipsis{pointer-events:none;--ic-typography-color:var(--ic-pagination-ellipsis)}.monochrome .ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome)}.item-container:focus{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.page{--ic-typography-color:var(--ic-pagination-page-number)}.monochrome .page{--ic-typography-color:var(--ic-pagination-page-number-monochrome)}.simple-current{min-width:calc(var(--ic-space-xxl) + var(--ic-space-md));height:var(--ic-space-lg);cursor:default}.item-container.page:hover:not(.selected):not(:focus){border-radius:var(--ic-border-radius);background-color:var(--ic-pagination-hover)}.item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed)}.monochrome .item-container.page:hover:not(.selected):not(:focus){background-color:var(--ic-pagination-hover-monochrome)}.monochrome .item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed-monochrome)}.selected{pointer-events:none;outline:none}.selected::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-pagination-selected-banner)}.monochrome .selected::after{background-color:var(--ic-pagination-selected-banner-monochrome)}.page-selected{--ic-typography-color:var(--ic-pagination-text)}.item-container.page.light:hover:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-hover)}.item-container.page.light:active:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-pressed)}ic-typography.light,ic-typography.page-selected.light{--ic-typography-color:var(--ic-architectural-white)}.selected.light::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-monochrome)}.item-container.page.dark:hover:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-hover)}.item-container.page.dark:active:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-pressed)}ic-typography.dark{--ic-typography-color:var(--ic-color-text-primary)}.selected.dark::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-monochrome-dark)}.disabled{--ic-typography-color:var(--ic-pagination-text-disabled);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.disabled.page ic-typography{--ic-typography-color:var(--ic-pagination-page-number-disabled)}.disabled.ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-disabled)}.monochrome .disabled.page{--ic-typography-color:var(--ic-pagination-page-number-monochrome-disabled)}.monochrome .disabled.ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome-disabled)}@media (forced-colors: active){.selected::after{background-color:Highlight}.selected.light::after{background-color:Highlight}.selected.dark::after{background-color:Highlight}.disabled{--ic-typography-color:GrayText}}@media (prefers-reduced-motion: reduce){.item-container:focus{transition:none}}";
15947
+ const icPaginationItemCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}a{text-align:center}.item-container{display:flex;justify-content:center;align-items:center;width:calc(var(--ic-space-xl) + var(--ic-space-sm));height:var(--ic-space-xl);margin:var(--ic-space-xxs) var(--ic-space-xxxs);cursor:pointer;text-decoration:none}button{background:none;border:none;outline:inherit;position:relative}.ellipsis{pointer-events:none;--ic-typography-color:var(--ic-pagination-ellipsis)}.monochrome .ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome)}.item-container:focus{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.page{--ic-typography-color:var(--ic-pagination-page-number)}.monochrome .page{--ic-typography-color:var(--ic-pagination-page-number-monochrome)}.simple-current{min-width:calc(var(--ic-space-xxl));padding:0 var(--ic-space-xs);height:var(--ic-space-lg);cursor:default}.item-container.page:hover:not(.selected):not(:focus){border-radius:var(--ic-border-radius);background-color:var(--ic-pagination-hover)}.item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed)}.monochrome .item-container.page:hover:not(.selected):not(:focus){background-color:var(--ic-pagination-hover-monochrome)}.monochrome .item-container.page:active:not(.selected):not(:focus){background-color:var(--ic-pagination-pressed-monochrome)}.selected{pointer-events:none;outline:none}.selected::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-pagination-selected-banner)}.monochrome .selected::after{background-color:var(--ic-pagination-selected-banner-monochrome)}.page-selected{--ic-typography-color:var(--ic-pagination-text)}.item-container.page.light:hover:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-hover)}.item-container.page.light:active:not(.selected):not(:focus){background-color:var(--ic-action-light-bg-pressed)}ic-typography.light,ic-typography.page-selected.light{--ic-typography-color:var(--ic-architectural-white)}.selected.light::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-monochrome)}.item-container.page.dark:hover:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-hover)}.item-container.page.dark:active:not(.selected):not(:focus){background-color:var(--ic-action-dark-bg-pressed)}ic-typography.dark{--ic-typography-color:var(--ic-color-text-primary)}.selected.dark::after{content:\"\";height:var(--ic-space-xxs);width:100%;position:absolute;bottom:0;background-color:var(--ic-action-monochrome-dark)}.disabled{--ic-typography-color:var(--ic-pagination-text-disabled);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.disabled.page ic-typography{--ic-typography-color:var(--ic-pagination-page-number-disabled)}.disabled.ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-disabled)}.monochrome .disabled.page{--ic-typography-color:var(--ic-pagination-page-number-monochrome-disabled)}.monochrome .disabled.ellipsis{--ic-typography-color:var(--ic-pagination-ellipsis-monochrome-disabled)}@media (forced-colors: active){.selected::after{background-color:Highlight}.selected.light::after{background-color:Highlight}.selected.dark::after{background-color:Highlight}.disabled{--ic-typography-color:GrayText}}@media (prefers-reduced-motion: reduce){.item-container:focus{transition:none}}";
15089
15948
  var IcPaginationItemStyle0 = icPaginationItemCss;
15090
15949
 
15091
15950
  class PaginationItem {
@@ -15170,10 +16029,13 @@ class PaginationItem {
15170
16029
  }; }
15171
16030
  }
15172
16031
 
15173
- const icPopoverMenuCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host .opening-from-parent{animation:slide-in var(--ic-transition-duration-slow) ease-in-out}:host .opening-from-child{animation:slide-out var(--ic-transition-duration-slow) ease-in-out}}:host{border-radius:var(--ic-border-radius);color:var(--ic-popover-nav-text);--ic-typography-color:var(--ic-popover-nav-text);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}:host(.on-dialog){inset:auto !important}:host(.on-dialog-fix-translate){transform:translate(0, var(--ic-space-xs)) !important}:host(.on-dialog-translate-y){transform:translate(0, calc(-1 * var(--translate-y))) !important}.menu{border:var(--ic-border-default);border-color:var(--ic-popover-border);border-radius:var(--ic-border-radius);background-color:var(--ic-popover-background);visibility:hidden;height:0;display:flex;flex-direction:column}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.ic-popover-menu-open){display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host(.ic-popover-menu-open) .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{--ic-typography-color:var(--ic-popover-parent-label);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}";
16032
+ const icPopoverMenuCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host .opening-from-parent{animation:slide-in var(--ic-transition-duration-slow) ease-in-out}:host .opening-from-child{animation:slide-out var(--ic-transition-duration-slow) ease-in-out}}:host .ic-popover-menu{border-radius:var(--ic-border-radius);color:var(--ic-popover-nav-text);--ic-typography-color:var(--ic-popover-nav-text);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}:host(.on-dialog){inset:auto !important}:host(.on-dialog-fix-translate){transform:translate(0, var(--ic-space-xs)) !important}:host(.on-dialog-translate-y){transform:translate(0, calc(-1 * var(--translate-y))) !important}.menu{border:var(--ic-border-default);border-color:var(--ic-popover-border);border-radius:var(--ic-border-radius);background-color:var(--ic-popover-background);visibility:hidden;height:0;display:flex;flex-direction:column}:host .ic-popover-menu:focus-within{box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host .ic-popover-menu-open{display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host .ic-popover-menu-open .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{--ic-typography-color:var(--ic-popover-parent-label);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}";
15174
16033
  var IcPopoverMenuStyle0 = icPopoverMenuCss;
15175
16034
 
15176
16035
  const MENU_SELECTOR = "div.menu-body";
16036
+ /**
16037
+ * @slot anchor - The default anchor element for the popover menu. This will take precedence over the `anchor` prop.
16038
+ */
15177
16039
  class PopoverMenu {
15178
16040
  constructor(hostRef) {
15179
16041
  registerInstance(this, hostRef);
@@ -15199,6 +16061,10 @@ class PopoverMenu {
15199
16061
  * If `true`, the popover menu will be displayed.
15200
16062
  */
15201
16063
  this.open = undefined;
16064
+ /**
16065
+ * If `always`, the popover menu will close when any menu item is clicked. If `toggle`, the popover menu will close when a non-toggle menu item is clicked. If `never`, the popover menu will not close when any menu item is clicked.
16066
+ */
16067
+ this.closeOnItemSelect = "always";
15202
16068
  this.setButtonFocus = () => {
15203
16069
  var _a;
15204
16070
  (_a = this.popoverMenuEls[this.currentFocus]) === null || _a === void 0 ? void 0 : _a.focus();
@@ -15219,8 +16085,11 @@ class PopoverMenu {
15219
16085
  return anchorElement;
15220
16086
  };
15221
16087
  this.isNotPopoverMenuEl = (ev) => {
15222
- const { id, tagName } = ev.target;
15223
- return (id !== this.anchor &&
16088
+ const target = ev.target;
16089
+ const { id, tagName } = target;
16090
+ const isAnchor = this.anchorEl && target === this.anchorEl;
16091
+ return (!isAnchor &&
16092
+ id !== this.anchor &&
15224
16093
  tagName !== "IC-MENU-ITEM" &&
15225
16094
  tagName !== "IC-MENU-GROUP" &&
15226
16095
  tagName !== "IC-POPOVER-MENU");
@@ -15257,7 +16126,16 @@ class PopoverMenu {
15257
16126
  }
15258
16127
  };
15259
16128
  this.getMenuAriaLabel = () => {
15260
- const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);
16129
+ let ariaLabel = this.el.getAttribute(this.ARIA_LABEL);
16130
+ if (ariaLabel) {
16131
+ this.menuAriaLabel = ariaLabel;
16132
+ this.el.removeAttribute(this.ARIA_LABEL);
16133
+ }
16134
+ else if (this.menuAriaLabel) {
16135
+ ariaLabel = this.menuAriaLabel;
16136
+ }
16137
+ if (!ariaLabel)
16138
+ return null;
15261
16139
  if (isPropDefined(this.submenuId)) {
15262
16140
  return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;
15263
16141
  }
@@ -15271,8 +16149,10 @@ class PopoverMenu {
15271
16149
  this.open = false;
15272
16150
  };
15273
16151
  this.initPopperJS = () => {
16152
+ var _a;
16153
+ const popoverMenu = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".ic-popover-menu");
15274
16154
  if (this.anchorEl) {
15275
- this.popperInstance = createPopper(this.anchorEl, this.el, Object.assign({ strategy: this.fixedPositioning ? "fixed" : "absolute", placement: "bottom-start", modifiers: [
16155
+ this.popperInstance = createPopper(this.anchorEl, popoverMenu, Object.assign({ strategy: this.fixedPositioning ? "fixed" : "absolute", placement: "bottom-start", modifiers: [
15276
16156
  {
15277
16157
  name: "offset",
15278
16158
  options: {
@@ -15343,7 +16223,13 @@ class PopoverMenu {
15343
16223
  this.watchOpenHandler();
15344
16224
  }
15345
16225
  componentWillRender() {
15346
- this.anchorEl = this.findAnchorEl(this.anchor);
16226
+ const slottedAnchor = this.el.querySelector('[slot="anchor"]');
16227
+ if (slottedAnchor) {
16228
+ this.anchorEl = slottedAnchor;
16229
+ }
16230
+ else {
16231
+ this.anchorEl = this.findAnchorEl(this.anchor);
16232
+ }
15347
16233
  }
15348
16234
  componentDidRender() {
15349
16235
  if (this.open && !this.popperInstance) {
@@ -15352,6 +16238,13 @@ class PopoverMenu {
15352
16238
  }
15353
16239
  handleMenuItemClick(ev) {
15354
16240
  if (!ev.detail.submenuTriggerFor && ev.detail.label !== "Back") {
16241
+ if (this.closeOnItemSelect === "never" ||
16242
+ (ev.detail.variant === "toggle" &&
16243
+ this.closeOnItemSelect === "toggle") ||
16244
+ ev.detail.closeMenuOnSelect === false) {
16245
+ this.currentFocus = this.popoverMenuEls.findIndex((menuItem) => menuItem === ev.detail);
16246
+ return;
16247
+ }
15355
16248
  this.closeMenu(false, ev.detail);
15356
16249
  }
15357
16250
  }
@@ -15447,17 +16340,19 @@ class PopoverMenu {
15447
16340
  this.popperProps = props;
15448
16341
  }
15449
16342
  render() {
15450
- return (hAsync(Host, { key: '331cedc179eb4d558f29f7704df951210f43fa77', class: {
15451
- ["ic-popover-menu-open"]: !!this.open,
16343
+ return (hAsync(Host, { key: 'b664e4a0944016c88fe19232ea7b1cf2fa65cbd9', class: {
15452
16344
  [`ic-theme-${this.theme}`]: this.theme !== "inherit",
15453
- } }, hAsync("div", { key: '4efbe811a462e960af2d7a5ab63d3df5f69209cb', id: this.parentPopover === undefined
16345
+ } }, isSlotUsed(this.el, "anchor") && hAsync("slot", { key: '978425aac1a58c1f19ad59e8ebe9869492fe8a5d', name: "anchor" }), hAsync("div", { key: 'c36a21a4f9913deebed1c418ce4c85995fa49054', class: {
16346
+ ["ic-popover-menu"]: true,
16347
+ ["ic-popover-menu-open"]: !!this.open,
16348
+ } }, hAsync("div", { key: '5e54d43f8699270ea59ee2d408d099e73b51a5e0', id: this.parentPopover === undefined
15454
16349
  ? `ic-popover-submenu-${this.submenuId}`
15455
16350
  : "", class: {
15456
16351
  menu: true,
15457
- } }, hAsync("span", { key: '25207afa860d6d4b897a8d7b7406d5a450652949', class: {
16352
+ } }, hAsync("span", { key: '50b901cdd6ce1c6e51839cdacb61034f45972a3a', class: {
15458
16353
  "opening-from-parent": this.openingFromParent,
15459
16354
  "opening-from-child": this.openingFromChild,
15460
- } }, isPropDefined(this.submenuId) && (hAsync("span", { key: '21bebc9796ecd62d6c0a51247f450eb0f61de6fb' }, hAsync("span", { key: 'bf64a9672b93e4831bce7309514121108e79f26c', role: "menu" }, hAsync("ic-menu-item", { key: 'a6bbb41562f8047a34e81f7afb72f6fdf7489b53', class: "ic-popover-submenu-back-button", ref: (el) => (this.backButton = el), label: "Back", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, hAsync("svg", { key: 'a5267871273dfffa86198105d325adf3b62f2728', slot: "icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "submenu-back-icon" }, hAsync("path", { key: 'cfba5502e9594fe2dc299d7e8922a39e64e6e282', d: "M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z", fill: "currentColor" })))), hAsync("ic-typography", { key: '4c718558761258605c42ad71966c54cc09fc7bac', variant: "subtitle-small", class: "parent-label" }, this.parentLabel))), hAsync("div", { key: '8c127ed3e934a257795e0b3472c6d901e8e3fb62', class: "menu-body", "aria-label": this.getMenuAriaLabel(), role: "menu" }, hAsync("slot", { key: '8f06fc83099461573082afc75d008e37ee84cf65' }))))));
16355
+ } }, isPropDefined(this.submenuId) && (hAsync("span", { key: 'b152354aff6888ea5dd18850fb7ce40f3e7d975c' }, hAsync("span", { key: 'b7f43d96c7980573f740ff5d6495aa5416b6b89c', role: "menu" }, hAsync("ic-menu-item", { key: '62eb52181ef3b9c647573202a90940f3f90b2b1f', class: "ic-popover-submenu-back-button", ref: (el) => (this.backButton = el), label: "Back", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, hAsync("svg", { key: 'ea5fe2b6bedb7a97c146e9bf19f0c4538bcd7cc4', slot: "icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "submenu-back-icon" }, hAsync("path", { key: '57795916b6c3026915b4b166647512bc7b2571e0', d: "M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z", fill: "currentColor" })))), hAsync("ic-typography", { key: 'c6b1a275a79f431eb9c32b8b811302c2bc7e86a2', variant: "subtitle-small", class: "parent-label" }, this.parentLabel))), hAsync("div", { key: 'a227dd549ab5bc60aad95d62d4ab8a13fdd4e46f', class: "menu-body", "aria-label": this.getMenuAriaLabel(), role: "menu" }, hAsync("slot", { key: '5f991353095b3d406ff76d101be9c72dd1ff26b7' })))))));
15461
16356
  }
15462
16357
  static get delegatesFocus() { return true; }
15463
16358
  get el() { return getElement(this); }
@@ -15477,6 +16372,7 @@ class PopoverMenu {
15477
16372
  "submenuLevel": [2, "submenu-level"],
15478
16373
  "theme": [1],
15479
16374
  "open": [1540],
16375
+ "closeOnItemSelect": [1, "close-on-item-select"],
15480
16376
  "openingFromChild": [32],
15481
16377
  "openingFromParent": [32],
15482
16378
  "popperProps": [32],
@@ -15963,11 +16859,6 @@ class RadioOption {
15963
16859
  }; }
15964
16860
  }
15965
16861
 
15966
- var clearIcon = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
15967
- <path d="M15.8327 5.34199L14.6577 4.16699L9.99935 8.82533L5.34102 4.16699L4.16602 5.34199L8.82435 10.0003L4.16602 14.6587L5.34102 15.8337L9.99935 11.1753L14.6577 15.8337L15.8327 14.6587L11.1743 10.0003L15.8327 5.34199Z" fill="currentColor"/>
15968
- </svg>
15969
- `;
15970
-
15971
16862
  var searchIcon = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
15972
16863
  <path d="M13.1292 11.8792H12.4708L12.2375 11.6542C13.0542 10.7042 13.5458 9.47083 13.5458 8.12916C13.5458 5.13749 11.1208 2.71249 8.12916 2.71249C5.13749 2.71249 2.71249 5.13749 2.71249 8.12916C2.71249 11.1208 5.13749 13.5458 8.12916 13.5458C9.47083 13.5458 10.7042 13.0542 11.6542 12.2375L11.8792 12.4708V13.1292L16.0458 17.2875L17.2875 16.0458L13.1292 11.8792ZM8.12916 11.8792C6.05416 11.8792 4.37916 10.2042 4.37916 8.12916C4.37916 6.05416 6.05416 4.37916 8.12916 4.37916C10.2042 4.37916 11.8792 6.05416 11.8792 8.12916C11.8792 10.2042 10.2042 11.8792 8.12916 11.8792Z" fill="currentColor"/>
15973
16864
  </svg>`;
@@ -16529,7 +17420,7 @@ class SearchBar {
16529
17420
  } }, hAsync("ic-button", { key: 'd0a3c5b6288c249ba8be2a4bcbbd2a33f1a30025', id: "clear-button", class: {
16530
17421
  "clear-button": true,
16531
17422
  "clear-button-unfocused": !clearButtonFocused,
16532
- }, "aria-label": "Clear", innerHTML: clearIcon, onClick: this.handleClear, onMouseDown: this.handleMouseDown, size: size, onFocus: this.handleFocusClearButton, onBlur: this.handleClearBlur, onKeyDown: this.handleClear, type: "button", variant: "icon-tertiary", theme: clearButtonFocused ? "light" : "dark" }), hAsync("div", { key: '3965e828aba0dd8f88051ec717c7fafcb237a271', class: "divider" })), hAsync("div", { key: 'c143dbc227dce558f5f87e1e2f7e3a014b9d250c', class: {
17423
+ }, "aria-label": "Clear", innerHTML: closeIcon, onClick: this.handleClear, onMouseDown: this.handleMouseDown, size: size, onFocus: this.handleFocusClearButton, onBlur: this.handleClearBlur, onKeyDown: this.handleClear, type: "button", variant: "icon-tertiary", theme: clearButtonFocused ? "light" : "dark" }), hAsync("div", { key: '3965e828aba0dd8f88051ec717c7fafcb237a271', class: "divider" })), hAsync("div", { key: 'c143dbc227dce558f5f87e1e2f7e3a014b9d250c', class: {
16533
17424
  "search-submit-button-container": true,
16534
17425
  "search-submit-button-disabled": this.isSubmitDisabled(),
16535
17426
  } }, hAsync("ic-button", { key: '98e79886a69703ab39c8d6f5f97c147fb406870d', id: "search-submit-button", "aria-label": "Search", ref: (el) => (this.searchSubmitButton = el), class: {
@@ -16629,12 +17520,12 @@ class SectionContainer {
16629
17520
  }
16630
17521
  render() {
16631
17522
  const { aligned, fullHeight } = this;
16632
- return (hAsync(Host, { key: 'b72248434ac227221b9854880dd5103733052170', class: {
17523
+ return (hAsync(Host, { key: '0a16e4a8d03980586c8487b21a2933b69d0cdda5', class: {
16633
17524
  ["aligned-left"]: aligned === "left" || aligned === null,
16634
17525
  ["aligned-center"]: aligned === "center",
16635
17526
  ["aligned-full-width"]: aligned === "full-width",
16636
17527
  ["no-vertical-padding"]: !!fullHeight,
16637
- } }, hAsync("slot", { key: '749c9299c6116291ec9555bbd2a9586585e7480d' })));
17528
+ } }, hAsync("slot", { key: 'be7133e0e0c321e7998d99d76834e50f15dea0d5' })));
16638
17529
  }
16639
17530
  static get style() { return IcSectionContainerStyle0; }
16640
17531
  static get cmpMeta() { return {
@@ -17945,11 +18836,11 @@ class Skeleton {
17945
18836
  width: el.style.width || width || DEFAULT_WIDTHS[variant],
17946
18837
  }
17947
18838
  : undefined;
17948
- return (hAsync(Host, { key: '67c1971600feaaaf5849048b4bc5ad3d4903ffb4', class: {
18839
+ return (hAsync(Host, { key: 'af96b9a43dfb19241c8bbdd5766f9c161060f0ec', class: {
17949
18840
  skeleton: true,
17950
18841
  "ic-skeleton-circle": variant === "circle",
17951
18842
  [`ic-theme-${theme}`]: theme !== "inherit",
17952
- }, style: style, "aria-disabled": "true" }, hAsync("slot", { key: 'caf8562f7997131daa69e85d6766b3edf2531259' })));
18843
+ }, style: style, "aria-disabled": "true" }, hAsync("slot", { key: 'b969c0a541cfa1c00543f614220d2eac7e98bc0f' })));
17953
18844
  }
17954
18845
  get el() { return getElement(this); }
17955
18846
  static get style() { return IcSkeletonStyle0; }
@@ -18008,9 +18899,9 @@ class SkipLink {
18008
18899
  }
18009
18900
  render() {
18010
18901
  const { fullWidth, inline, label, monochrome, target, theme, transparentBackground, } = this;
18011
- return (hAsync(Host, { key: '2f344a07df5cb31b39b5cd4ca8bc257229646b31', class: {
18902
+ return (hAsync(Host, { key: 'd892c64907f8bdcc7d793e0f07eab510d5d88921', class: {
18012
18903
  [`ic-theme-${theme}`]: theme !== "inherit",
18013
- } }, hAsync("ic-link", { key: '9b844b5a2f207d08eaa8cbb621d54ed56f5cc28d', class: {
18904
+ } }, hAsync("ic-link", { key: 'af5685af2563e68b9f84db45d39b84ba97fa80e8', class: {
18014
18905
  "display-top": !inline,
18015
18906
  "full-width": !!fullWidth,
18016
18907
  "show-background": !transparentBackground,
@@ -18075,12 +18966,12 @@ class StatusTag {
18075
18966
  }
18076
18967
  render() {
18077
18968
  const { label, status, variant, size, announced, theme, uppercase } = this;
18078
- return (hAsync(Host, { key: '06426990cc94da53c570547331c63d161675f620', class: { [`ic-theme-${theme}`]: theme !== "inherit" }, role: announced ? "status" : null, "aria-label": "Status" }, hAsync("strong", { key: '2c6d0e05018d59bfc7c1acab4b8ffda5ba4cfce3', class: {
18969
+ return (hAsync(Host, { key: 'c8599ea4942bb14073e77f10f4a0a0fbf39e9930', class: { [`ic-theme-${theme}`]: theme !== "inherit" }, role: announced ? "status" : null, "aria-label": "Status" }, hAsync("strong", { key: '7e2ec2e04c901980e1171373a9b671b75b6a7d07', class: {
18079
18970
  ["tag"]: true,
18080
18971
  [`${variant}-${status}`]: true,
18081
18972
  ["outlined"]: variant === "outlined",
18082
18973
  [`${size}`]: true,
18083
- } }, hAsync("ic-typography", { key: '3af29b781e35ed4817043d4f2f697f468502189a', variant: uppercase ? "label-uppercase" : "label", "apply-vertical-margins": false }, hAsync("span", { key: '4f4759e8dabfff3d686ed3e4cd3975cc0b0c33b4' }, label)))));
18974
+ } }, hAsync("ic-typography", { key: '060d641be483e3f6406ef415931f5cebdb8da2c8', variant: uppercase ? "label-uppercase" : "label", "apply-vertical-margins": false }, hAsync("span", { key: '4e78eb5d8af2fdcb5b4d083ad0cb1adc4b61ec0e' }, label)))));
18084
18975
  }
18085
18976
  static get style() { return IcStatusTagStyle0; }
18086
18977
  static get cmpMeta() { return {
@@ -18184,27 +19075,27 @@ class Step {
18184
19075
  // STATUS ICON FOR COMPACT STEP
18185
19076
  let statusIcon;
18186
19077
  if (type === "completed" || compactStepStyling === "completed") {
18187
- statusIcon = (hAsync("span", { key: '4d1011a9a12449bd324aff3f404522fde6912be3', class: "check-icon step-icon", "aria-hidden": "true", innerHTML: checkIcon }));
19078
+ statusIcon = (hAsync("span", { key: 'b90ba4eba47bd4dda8a547010d3e701f07e96ff1', class: "check-icon step-icon", "aria-hidden": "true", innerHTML: checkIcon }));
18188
19079
  }
18189
19080
  else if (type === "disabled" || compactStepStyling === "disabled") {
18190
- statusIcon = (hAsync("span", { key: '7825f61e87546bcaa9100c439239022abb0f3eb7', class: "warning-icon step-icon", "aria-hidden": "true", innerHTML: warningIcon }));
19081
+ statusIcon = (hAsync("span", { key: '46566361dcad0d5a29ad7f28fe2224f5ac813152', class: "warning-icon step-icon", "aria-hidden": "true", innerHTML: warningIcon }));
18191
19082
  }
18192
19083
  // COMPACT STEP COMPONENT
18193
- const compactStep = (hAsync("div", { key: '82c7c26c90ce286582f7ef477129d2ce241200c1', class: {
19084
+ const compactStep = (hAsync("div", { key: 'f5f4f7d6a4923975cb16a023a128e948f6af8d37', class: {
18194
19085
  ["step"]: true,
18195
19086
  ["current"]: !!current,
18196
19087
  [`compact-step-${compactStepStyling}`]: !!compactStepStyling,
18197
19088
  ["disabled"]: type === "disabled" || compactStepStyling === "disabled",
18198
- } }, hAsync("ic-loading-indicator", { key: 'd3d1b2aa382bd8b307433f16aa05f644b275902f', class: {
19089
+ } }, hAsync("ic-loading-indicator", { key: '9c68a687dfe74aef9d5402a22b849be5adde9e9e', class: {
18199
19090
  "compact-step-progress-indicator": true,
18200
19091
  "not-required": type === "disabled" || compactStepStyling === "disabled",
18201
- }, "aria-hidden": "true", size: "small", "inner-label": stepNum, progress: progress }), hAsync("div", { key: 'd0f78f477b4fe29b2ac33798712b70c0c3d2ce41', class: "heading-area" }, isSlotUsed(this.el, "heading") ? (hAsync("slot", { name: "heading" })) : (hAsync("ic-typography", { variant: "h4", class: "heading" }, heading)), hAsync("div", { key: 'f9a074c126d393ec82cf72621e5941c32dbd72fb', class: "info-line" }, hAsync("ic-typography", { key: '1b6bd91bcb1013fa1e23a9e9af49d3da1f25448e', variant: "caption", class: "step-num" }, `${stepNum} ${icI18n.of} ${lastStepNum}`, hAsync("span", { key: '753bbc4c12a2b968cde11238f46ff4ffbc4f39fd', class: "visually-hidden" }, ` ${icI18n.steps}`)), (this.subheading ||
19092
+ }, "aria-hidden": "true", size: "small", "inner-label": stepNum, progress: progress }), hAsync("div", { key: 'e084007d227386e58d9f709bc5c2cf7b4a316626', class: "heading-area" }, isSlotUsed(this.el, "heading") ? (hAsync("slot", { name: "heading" })) : (hAsync("ic-typography", { variant: "h4", class: "heading" }, heading)), hAsync("div", { key: '4010df0644f1cffe57f8f34bf165ede6743836b9', class: "info-line" }, hAsync("ic-typography", { key: 'cd19369014430c710590a2e8feba86224022444e', variant: "caption", class: "step-num" }, `${stepNum} ${icI18n.of} ${lastStepNum}`, hAsync("span", { key: '75135b7a00db90e483ad6dcfdd624cc3f8e90202', class: "visually-hidden" }, ` ${icI18n.steps}`)), (this.subheading ||
18202
19093
  type === "completed" ||
18203
19094
  type === "disabled" ||
18204
19095
  (this.variant === "compact" &&
18205
19096
  !!compactStepStyling &&
18206
19097
  compactStepStyling !== "active") ||
18207
- !!status) && (hAsync("div", { key: '93968f9752cf90df5f67994a3942f38d94323b50', class: "step-status" }, statusIcon !== undefined && statusIcon, (subheading || stepType) && (hAsync("ic-typography", { key: 'd1879f9dc5a7ea2e9b468fc95593056527e08095', variant: "caption" }, subheading !== null && isPropDefined(subheading)
19098
+ !!status) && (hAsync("div", { key: 'adeabd1fd1668c0689ccba491b17579d5491dc2d', class: "step-status" }, statusIcon !== undefined && statusIcon, (subheading || stepType) && (hAsync("ic-typography", { key: 'f3454673badfbbdd1b5e15e92902050c51a2b07b', variant: "caption" }, subheading !== null && isPropDefined(subheading)
18208
19099
  ? subheading
18209
19100
  : type === "disabled" ||
18210
19101
  (variant === "compact" &&
@@ -18217,26 +19108,26 @@ class Step {
18217
19108
  // ICON FOR DEFAULT STEP
18218
19109
  let icon;
18219
19110
  if (type !== "completed") {
18220
- icon = (hAsync("ic-typography", { key: 'e76d3c6f2fc82ae27e9f19af2ad29374c75271b1', variant: "subtitle-small" }, hAsync("span", { key: '2ada7f696f0e90ecca298a2109d9aaeb70777a1a', class: "step-icon-inner", "aria-hidden": "true" }, this.stepNum)));
19111
+ icon = (hAsync("ic-typography", { key: '44128ff95829366b8b12045763fdb2a5aea9e21b', variant: "subtitle-small" }, hAsync("span", { key: 'd3bacdb5ba89356a38cd92470eb84272a3996fde', class: "step-icon-inner", "aria-hidden": "true" }, this.stepNum)));
18221
19112
  }
18222
19113
  else {
18223
- icon = (hAsync("div", { key: '195a5f5dd31061a4059020d7fa1d65b15eb29a11', class: "step-icon-inner", "aria-hidden": "true" }, hAsync("span", { key: 'd11d3bf512968fa286309bcd69faa20cd12d3396', class: "check-icon", innerHTML: checkIcon })));
19114
+ icon = (hAsync("div", { key: 'fb984a7273ba46b3fdc088349e9fce02b8f3d586', class: "step-icon-inner", "aria-hidden": "true" }, hAsync("span", { key: '510ba94dc70ec87727f9d2cdc603e032c22922ce', class: "check-icon", innerHTML: checkIcon })));
18224
19115
  }
18225
19116
  // STEP CONNECT FOR DEFAULT STEP
18226
- const partialBar = type === "current" && (hAsync("div", { key: '5564ceeb1d40367572f3ae679e7212a2a2a53578', class: "step-connect-inner" }));
18227
- const finalStep = !lastStep && (hAsync("div", { key: 'fae846f5c7d46ad65c7d21a2785526ed6d841444', class: {
19117
+ const partialBar = type === "current" && (hAsync("div", { key: '4b5eff7f3e115a8416a0d7b57780e1cab7681058', class: "step-connect-inner" }));
19118
+ const finalStep = !lastStep && (hAsync("div", { key: 'e3550d0d527981b7e455d7f2c36ad925f551bde2', class: {
18228
19119
  ["step-connect"]: true,
18229
19120
  ["aligned-full-width"]: !!(((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.classList.contains("ic-stepper-default")) &&
18230
19121
  !this.el.parentElement.classList.contains("ic-stepper-aligned-left")),
18231
19122
  } }, partialBar));
18232
19123
  // DEFAULT STEP COMPONENT
18233
- const defaultStep = (hAsync("div", { key: 'f02d7139a59a46207e7bd308cf90ffd42c14a93e', class: {
19124
+ const defaultStep = (hAsync("div", { key: '244453c9e732a101832a953a438c93322e2e0e09', class: {
18234
19125
  ["step"]: true,
18235
19126
  [`${type}`]: true,
18236
- } }, hAsync("div", { key: 'd3cb91eb9ae01c50255fefe75c9cf15dac9899a2', class: "step-top" }, hAsync("div", { key: '71afc47b70d57c6d98aacd824c304e661d97a97d', class: "step-icon" }, icon), finalStep), (hasHeading || subheading || status) && (hAsync("div", { key: '7b11bdfc83c4071d6aff8f026e7ab32f2033a666', class: "heading-area" }, isSlotUsed(this.el, "heading") ? (hAsync("slot", { name: "heading" })) : (hAsync("ic-typography", { variant: "subtitle-large", class: "heading" }, heading)), hasHeading && (subheading || status) && (hAsync("ic-typography", { key: '10da1844c1af5252f89bc59254e23c45c5400a2d', variant: "caption", class: "subheading" }, subheading !== null && isPropDefined(subheading)
19127
+ } }, hAsync("div", { key: '65bed254efe5970c3c115d18cd60f597670ce6b0', class: "step-top" }, hAsync("div", { key: 'a8e79bfa9ded3a224d634a30062799611ff654ff', class: "step-icon" }, icon), finalStep), (hasHeading || subheading || status) && (hAsync("div", { key: '526d11252e72905887bf6fbfd0a40efdb3a15f60', class: "heading-area" }, isSlotUsed(this.el, "heading") ? (hAsync("slot", { name: "heading" })) : (hAsync("ic-typography", { variant: "subtitle-large", class: "heading" }, heading)), hasHeading && (subheading || status) && (hAsync("ic-typography", { key: '13c8779c38422f01ad9b1b38acf224fcb85a0767', variant: "caption", class: "subheading" }, subheading !== null && isPropDefined(subheading)
18237
19128
  ? subheading
18238
19129
  : stepStatus))))));
18239
- return (hAsync(Host, { key: '6605252cf1e05ba81b2adbcf6e41f2c9c23b1f09', role: "listitem", "aria-label": `${icI18n.step} ${stepNum}${ariaLabel}`, "aria-current": (current || type === "current") && "step", class: {
19130
+ return (hAsync(Host, { key: '92aa3a74f7b073e325a21c446b7d4cce619b9dea', role: "listitem", "aria-label": `${icI18n.step} ${stepNum}${ariaLabel}`, "aria-current": (current || type === "current") && "step", class: {
18240
19131
  ["aligned-full-width"]: !!(((_b = this.el.parentElement) === null || _b === void 0 ? void 0 : _b.classList.contains("ic-stepper-default")) &&
18241
19132
  !this.el.parentElement.classList.contains("ic-stepper-aligned-left")),
18242
19133
  [`ic-step-${variant}`]: true,
@@ -18556,11 +19447,11 @@ class Stepper {
18556
19447
  checkResizeObserver(this.runResizeObserver);
18557
19448
  }
18558
19449
  render() {
18559
- return (hAsync(Host, { key: '4fbff633235fba3d0c146427b74d1c4e69cff419', class: {
19450
+ return (hAsync(Host, { key: '43ebd8034b0dc4cad15543c27a8c668b9e7326af', class: {
18560
19451
  [`ic-stepper-${this.variant}`]: true,
18561
19452
  ["ic-stepper-aligned-left"]: this.variant === "default" && this.aligned === "left",
18562
19453
  [`ic-theme-${this.theme}`]: this.theme !== "inherit",
18563
- } }, hAsync("ul", { key: '452b6724f1b286aa3ff75fd460cdc4dfa36e8e55', class: "step-item-list" }, hAsync("slot", { key: 'e6e6465ee3c505fab2bbe1c7c502defa7e587571' }))));
19454
+ } }, hAsync("ul", { key: '8952857df3eb9fef64eb467ee2c89c78672b9c22', class: "step-item-list" }, hAsync("slot", { key: 'e22c1e35f0679a1caf67c1552ea3534932c76949' }))));
18564
19455
  }
18565
19456
  get el() { return getElement(this); }
18566
19457
  static get watchers() { return {
@@ -18690,15 +19581,15 @@ class Switch {
18690
19581
  render() {
18691
19582
  const { label, checkedState, size, disabled, name, value, hideLabel, helperText, inputId, theme, } = this;
18692
19583
  renderHiddenInput(this.el, checkedState ? value : "", name, disabled);
18693
- return (hAsync(Host, { key: '5c000ca3e49cd14427153c3621794df417e8cf20', class: {
19584
+ return (hAsync(Host, { key: '85b905e7a3d8cb86e6d61ef5b54f330f50c2d3c1', class: {
18694
19585
  [`ic-theme-${theme}`]: theme !== "inherit",
18695
- } }, hAsync("label", { key: '8460399d045a653d8c5e3c93f87d2759b99d4095', class: {
19586
+ } }, hAsync("label", { key: '9e22110d5b1de8c730a24ca2149ae7b6e5d74c82', class: {
18696
19587
  "ic-switch-container": true,
18697
19588
  "ic-switch-disabled": !!disabled,
18698
19589
  [`ic-switch-${size}`]: true,
18699
- }, htmlFor: inputId }, !hideLabel && (hAsync("ic-input-label", { key: '5bd95a31f589a3569373427072b91153b9af825d', for: inputId, label: label, helperText: helperText, readonly: false, disabled: disabled, class: {
19590
+ }, htmlFor: inputId }, !hideLabel && (hAsync("ic-input-label", { key: '7bdf109dc8ba30c4112d21ce8f8bdab24712b2cc', for: inputId, label: label, helperText: helperText, readonly: false, disabled: disabled, class: {
18700
19591
  "ic-switch-label": true,
18701
- } }, hAsync("slot", { key: 'a89047529ee17453676191651624842e5b1643ff', name: "helper-text", slot: "helper-text" }))), !hideLabel && hAsync("span", { key: 'ef6b29d8bfa4ad565aca3fdadc61f9d7e9c8a51c', class: "ic-switch-line-break" }), hAsync("input", { key: '0299a7208ea94969af14ded8f92a3c602e4d9260', checked: checkedState, disabled: disabled, "aria-label": label, "aria-checked": checkedState ? "true" : "false", "aria-describedby": getInputDescribedByText(this.el, inputId, helperText !== "", false), role: "switch", class: "ic-switch-input", type: "checkbox", name: "toggle", id: inputId, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.handleChange }), hAsync("span", { key: '5576c0aff81d9a5825111f62a00dfc69516ff52d', class: "ic-switch-toggle" }, hAsync("span", { key: '3bd162d8cd5b5d08b1a71625edaa7905d837414b', class: "ic-switch-icon-line", "aria-hidden": "true" }), hAsync("svg", { key: '592dd6027032283ed67502269b80fd6a5ca922ae', class: "ic-switch-icon", "aria-hidden": "true", focusable: "false", viewBox: "0 0 8 8", xmlns: "http://www.w3.org/2000/svg", fill: "none" }, hAsync("circle", { key: '6479b349e98272f1578e84b7213949ed064e84f7', class: "ic-switch-icon-circle", fill: "none", cx: "4", cy: "4", r: "3.5", "vector-effect": "non-scaling-stroke" }))), hAsync("slot", { key: '66d14ab0f462f8f050ffb425a154bde647821377', name: "right-adornment" }))));
19592
+ } }, hAsync("slot", { key: '1f3f4de4efbc6cdd0b5b0306ff27ac8780e1e47f', name: "helper-text", slot: "helper-text" }))), !hideLabel && hAsync("span", { key: '86baca2c69733b230b44b1bdc7e77abbf0cea409', class: "ic-switch-line-break" }), hAsync("input", { key: '001d2c6d58ded2aa77dcb5f6d2a80e2a8cdb3524', checked: checkedState, disabled: disabled, "aria-label": label, "aria-checked": checkedState ? "true" : "false", "aria-describedby": getInputDescribedByText(this.el, inputId, helperText !== "", false), role: "switch", class: "ic-switch-input", type: "checkbox", name: "toggle", id: inputId, onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.handleChange }), hAsync("span", { key: 'bc1e5f01e53597a87540a46caff33e9ffed4ff0f', class: "ic-switch-toggle" }, hAsync("span", { key: 'ba85178e18aae2eb3e194cebb753e7b8897ed82e', class: "ic-switch-icon-line", "aria-hidden": "true" }), hAsync("svg", { key: '8de43ad4d2131a4baca546ff67d5be97e023f7a5', class: "ic-switch-icon", "aria-hidden": "true", focusable: "false", viewBox: "0 0 8 8", xmlns: "http://www.w3.org/2000/svg", fill: "none" }, hAsync("circle", { key: '094881005f0b9d3141fdad8396dac30d6a275f66', class: "ic-switch-icon-circle", fill: "none", cx: "4", cy: "4", r: "3.5", "vector-effect": "non-scaling-stroke" }))), hAsync("slot", { key: '432b56eaca3fb21d04bd97e3faec9241959aee25', name: "right-adornment" }))));
18702
19593
  }
18703
19594
  static get delegatesFocus() { return true; }
18704
19595
  get el() { return getElement(this); }
@@ -19083,7 +19974,7 @@ class TabContext {
19083
19974
  }
19084
19975
  }
19085
19976
  render() {
19086
- return hAsync("slot", { key: '717530e623d11f274e79fe3be4bcbd0ff9e71033' });
19977
+ return hAsync("slot", { key: 'f2db3869afceb11de996c0f653c07951c7305e5d' });
19087
19978
  }
19088
19979
  get el() { return getElement(this); }
19089
19980
  static get watchers() { return {
@@ -19130,11 +20021,11 @@ class TabGroup {
19130
20021
  }
19131
20022
  render() {
19132
20023
  const { inline, theme, label, monochrome } = this;
19133
- return (hAsync(Host, { key: '1681c117c989b999a55a9646350f26efe3dac55c', role: "tablist", "aria-label": label, class: {
20024
+ return (hAsync(Host, { key: '746c326f525b2691bfb8b9e9f791ed31f8a81294', role: "tablist", "aria-label": label, class: {
19134
20025
  ["ic-tab-group-inline"]: !!inline,
19135
20026
  [`ic-theme-${theme}`]: theme !== "inherit",
19136
20027
  ["ic-tab-group-monochrome"]: !!monochrome,
19137
- } }, hAsync("ic-horizontal-scroll", { key: '86003202cd06e1bbd9f99124c10ceebe9414049d', theme: theme, "focus-trigger": "tabFocus", monochrome: monochrome }, hAsync("div", { key: '4e1b79906c19817adf8a4d01332f8066e8d5e1c4', class: "tabs-container" }, hAsync("slot", { key: '697f2ce044588082937aff666d1f04976b310785' })))));
20028
+ } }, hAsync("ic-horizontal-scroll", { key: '1320fc43a99bceeda1f8e96951b5a418223e16f5', theme: theme, "focus-trigger": "tabFocus", monochrome: monochrome }, hAsync("div", { key: '496f3884e5247d4beeabe7bb76e99bd3d00119a5', class: "tabs-container" }, hAsync("slot", { key: '06c43c2548f716780e1f91feace9740ddb87381b' })))));
19138
20029
  }
19139
20030
  static get delegatesFocus() { return true; }
19140
20031
  static get style() { return IcTabGroupStyle0; }
@@ -19177,10 +20068,10 @@ class TabPanel {
19177
20068
  }
19178
20069
  render() {
19179
20070
  const { active, theme } = this;
19180
- return (hAsync(Host, { key: 'c00d3917329516768eb37409203d897251b75d76', class: {
20071
+ return (hAsync(Host, { key: '502d4cbb643330e279c6afde8c450b2dc779c1bd', class: {
19181
20072
  [`ic-theme-${theme}`]: theme !== "inherit",
19182
20073
  "ic-tab-panel-hidden": !active,
19183
- }, role: "tabpanel", "aria-hidden": `${!active}` }, hAsync("div", { key: 'f5cc419286a31c1b6da62a34926dcf8060c12dfd' }, hAsync("slot", { key: '05c9bfb071d304e758c0bb8dd780bf000b3d8bf1' }))));
20074
+ }, role: "tabpanel", "aria-hidden": `${!active}` }, hAsync("div", { key: '190467658b87437167436d21350a69f33950666d' }, hAsync("slot", { key: '17420f5488493a8ce0e3ad31dca3f1bb3a78722e' }))));
19184
20075
  }
19185
20076
  get el() { return getElement(this); }
19186
20077
  static get style() { return IcTabPanelStyle0; }
@@ -19751,7 +20642,7 @@ class Theme {
19751
20642
  }
19752
20643
  render() {
19753
20644
  const { themeClass } = this;
19754
- return (hAsync(Host, { key: '63d492e3dd31089565a15df543420f375dbad1b6', class: themeClass }, hAsync("slot", { key: '479a3cbc49286aa2e3853956721f26a5ee37e9ef' })));
20645
+ return (hAsync(Host, { key: '5f64aa19e0ea1f3762574949daabfd2ad9f99054', class: themeClass }, hAsync("slot", { key: '3f115261b958d3c4287b95fc80564b7f0788fd04' })));
19755
20646
  }
19756
20647
  static get watchers() { return {
19757
20648
  "brandColor": ["watchBrandColorPropHandler"],
@@ -19981,20 +20872,20 @@ class Toast {
19981
20872
  }
19982
20873
  render() {
19983
20874
  const { variant, heading, message, visible, isManual, dismissButtonAriaLabel, theme, } = this;
19984
- return (hAsync(Host, { key: '57c068f4c9a9e3017733432a596f78e2bcbffae6', class: {
20875
+ return (hAsync(Host, { key: 'cef80fb621cd0b6201b4b2d5fd851e4a498d5142', class: {
19985
20876
  [`ic-theme-${theme}`]: theme !== "inherit",
19986
20877
  ["ic-toast-hidden"]: !visible,
19987
20878
  [`ic-toast-variant-${variant}`]: variant !== undefined,
19988
- }, tabindex: "0", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? "dialog" : "alert", "aria-live": isManual ? null : "polite" }, hAsync("div", { key: 'e24bd72e435cc443c375eee309ae98fc9e030c0b', class: {
20879
+ }, tabindex: "0", onFocus: this.onFocus, onBlur: this.onBlur, role: isManual ? "dialog" : "alert", "aria-live": isManual ? null : "polite" }, hAsync("div", { key: '10abf5970e3c5db7db3045cc056afbcf5e8bbb13', class: {
19989
20880
  ["container"]: true,
19990
20881
  [`container-${variant}`]: variant !== undefined,
19991
- } }, variant && visible && (hAsync("div", { key: 'bdabfabb04efcd93ab88ecb691b3baa73fc9da0a', class: "toast-icon-container" }, hAsync("div", { key: 'bede66dcf6189ac321e9bee90dc144e9d38a09dc', class: {
20882
+ } }, variant && visible && (hAsync("div", { key: '4924bda7ebc227ed24d396a7f3c4263b28a1a9e4', class: "toast-icon-container" }, hAsync("div", { key: '95c259f5a27fc76ce6e9cc613c06d82dd9042e51', class: {
19992
20883
  ["divider"]: true,
19993
20884
  [`divider-${variant}`]: true,
19994
- } }), variant === "neutral" ? (hAsync("slot", { name: "neutral-icon" })) : (hAsync("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), hAsync("div", { key: '57480804dc55695e555a16dd818c5febcaffbe00', class: {
20885
+ } }), variant === "neutral" ? (hAsync("slot", { name: "neutral-icon" })) : (hAsync("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), hAsync("div", { key: '285745e35591ea6e756cd6e454bb85bf53ebe881', class: {
19995
20886
  ["toast-content"]: true,
19996
20887
  ["no-icon"]: variant === "neutral" && !isSlotUsed(this.el, "neutral-icon"),
19997
- } }, hAsync("div", { key: '8540288f9f34f0b72c86fa3039d579c93be1277f', class: "toast-text" }, hAsync("ic-typography", { key: 'c5e8f2d0a2fe026b430dddf7a81e825845f5ce72', variant: "subtitle-large", class: "toast-heading" }, visible && (isManual ? hAsync("h5", null, heading) : hAsync("p", null, heading))), message && (hAsync("ic-typography", { key: '89fe3df8f98581ef66c1ea74930d9042a579a359', variant: "body", class: "toast-message" }, visible && hAsync("p", { key: 'd805d260febad5f8d58aeffe2dfef9f84d6d0911' }, message)))), isSlotUsed(this.el, "action") && (hAsync("div", { key: 'c9cfd3cd4bf5f77cea072bb15f8629ab4a368ad0', class: "toast-action-container" }, hAsync("slot", { key: '26b2fb447b937f327719edfe531e5b1260fa7c6c', name: "action" })))), !isManual ? (hAsync("ic-loading-indicator", { class: "toast-dismiss-timer", theme: "dark", monochrome: true, size: "icon", progress: this.timerProgress, description: "Dismiss timer" })) : (hAsync("ic-button", { id: "dismiss-button", innerHTML: closeIcon, onClick: this.dismissAction, variant: "icon-tertiary", "aria-label": dismissButtonAriaLabel })))));
20888
+ } }, hAsync("div", { key: 'dc166897b94413e2c3866eb0c0328d62cbf0f0a5', class: "toast-text" }, hAsync("ic-typography", { key: '26ea18b090584efff61a52b0f2f844a9c1cfef60', variant: "subtitle-large", class: "toast-heading" }, visible && (isManual ? hAsync("h5", null, heading) : hAsync("p", null, heading))), message && (hAsync("ic-typography", { key: 'd227ddebf0c720551df72337aeaebb072eb89bea', variant: "body", class: "toast-message" }, visible && hAsync("p", { key: '79847b1d2d0811d36fac74c91b581c4a9a61eb8c' }, message)))), isSlotUsed(this.el, "action") && (hAsync("div", { key: 'b5267c41c27c60988c3db05f7a3259b3df9243fb', class: "toast-action-container" }, hAsync("slot", { key: 'e4c2998404cfc36697eb6e47d981fe229d6941f5', name: "action" })))), !isManual ? (hAsync("ic-loading-indicator", { class: "toast-dismiss-timer", theme: "dark", monochrome: true, size: "icon", progress: this.timerProgress, description: "Dismiss timer" })) : (hAsync("ic-button", { id: "dismiss-button", innerHTML: closeIcon, onClick: this.dismissAction, variant: "icon-tertiary", "aria-label": dismissButtonAriaLabel })))));
19998
20889
  }
19999
20890
  get el() { return getElement(this); }
20000
20891
  static get watchers() { return {
@@ -20067,7 +20958,7 @@ class ToastRegion {
20067
20958
  }
20068
20959
  }
20069
20960
  render() {
20070
- return hAsync("slot", { key: '28f5e26c6dbfb2de076cff231b72722f1ff403c7' });
20961
+ return hAsync("slot", { key: 'fbf09e6464725a2f68a81254e49305ba33c88632' });
20071
20962
  }
20072
20963
  get el() { return getElement(this); }
20073
20964
  static get watchers() { return {
@@ -20240,7 +21131,7 @@ class ToggleButton {
20240
21131
  render() {
20241
21132
  const { accessibleLabel, checked, disabled, fullWidth, iconPlacement, monochrome, label, loading, outline, size, theme, tooltipPlacement, variant, } = this;
20242
21133
  const iconVariant = variant === "icon";
20243
- return (hAsync(Host, { key: 'a90e2a846a52531dc542d039724dc8516a00ae14', class: {
21134
+ return (hAsync(Host, { key: '51e7ef6d36426ee5d3d5e9d351cdc187ca33073b', class: {
20244
21135
  "ic-toggle-button-checked": checked,
20245
21136
  "ic-toggle-button-disabled": disabled,
20246
21137
  "ic-toggle-button-icon": iconVariant,
@@ -20250,7 +21141,7 @@ class ToggleButton {
20250
21141
  "ic-toggle-button-hide-outline": !outline,
20251
21142
  [`ic-toggle-button-${size}`]: true,
20252
21143
  [`ic-theme-${theme}`]: theme !== "inherit",
20253
- }, onFocus: this.handleFocus }, hAsync("ic-button", { key: '6f15f0c63675bd099d370ce02e2b02eeac4e913a', "aria-pressed": `${checked}`, variant: iconVariant ? "icon-tertiary" : "secondary", onClick: this.handleClick, title: accessibleLabel, "aria-label": `${accessibleLabel ? accessibleLabel : label}, ${checked ? "ticked" : "unticked"}`, disabled: disabled, size: size, fullWidth: fullWidth, loading: loading, tooltipPlacement: tooltipPlacement }, !iconVariant && label, hAsync("slot", { key: '2503823bad70fa984db6c71d16cc863daaede0e3' }), isSlotUsed(this.el, "icon") && (hAsync("slot", { key: '53969441b6446ec012b538c2f3d468ea0e793547', name: "icon", slot: `${iconPlacement}-icon` })), isSlotUsed(this.el, "badge") && (hAsync("slot", { key: '2619be7d1528115db996708b102aadd611fd1b4b', name: "badge", slot: "badge" })))));
21144
+ }, onFocus: this.handleFocus }, hAsync("ic-button", { key: '5cdffac929f622e9cb9f68223e19790b2d88d88b', "aria-pressed": `${checked}`, variant: iconVariant ? "icon-tertiary" : "secondary", onClick: this.handleClick, title: accessibleLabel, "aria-label": `${accessibleLabel ? accessibleLabel : label}, ${checked ? "ticked" : "unticked"}`, disabled: disabled, size: size, fullWidth: fullWidth, loading: loading, tooltipPlacement: tooltipPlacement }, !iconVariant && label, hAsync("slot", { key: 'a44c32ddde5e25fb5578fbbf401b2748383108c5' }), isSlotUsed(this.el, "icon") && (hAsync("slot", { key: '1c3d1b51c2d982329362451693fede634b3949fc', name: "icon", slot: `${iconPlacement}-icon` })), isSlotUsed(this.el, "badge") && (hAsync("slot", { key: 'bb1f9f00737980b895aee938af606246c2b667c5', name: "badge", slot: "badge" })))));
20254
21145
  }
20255
21146
  static get delegatesFocus() { return true; }
20256
21147
  get el() { return getElement(this); }
@@ -20530,14 +21421,14 @@ class ToggleButtonGroup {
20530
21421
  }
20531
21422
  render() {
20532
21423
  const { accessibleLabel, disabled, fullWidth, loading, monochrome, outline, theme, } = this;
20533
- return (hAsync(Host, { key: 'b312b6cae074758bad82c66446709925e19cf5ce', role: "group", "aria-label": accessibleLabel, tabindex: disabled ? -1 : 0, class: {
21424
+ return (hAsync(Host, { key: 'ab56f2045174be8e5968420734bf6c8b9f5a256b', role: "group", "aria-label": accessibleLabel, tabindex: disabled ? -1 : 0, class: {
20534
21425
  "ic-toggle-button-group-disabled": disabled,
20535
21426
  "ic-toggle-button-group-full-width": fullWidth,
20536
21427
  "ic-toggle-button-group-loading": loading,
20537
21428
  "ic-toggle-button-group-monochrome": monochrome,
20538
21429
  "ic-toggle-button-group-hide-outline": !outline,
20539
21430
  [`ic-theme-${theme}`]: theme !== "inherit",
20540
- }, onFocus: this.handleHostFocus }, hAsync("slot", { key: '8b09d946e7a8983b66f8bef384901899f88a54af' })));
21431
+ }, onFocus: this.handleHostFocus }, hAsync("slot", { key: 'fcc57106e303e056f7c2160808e174981978a665' })));
20541
21432
  }
20542
21433
  get el() { return getElement(this); }
20543
21434
  static get watchers() { return {