@xplortech/apollo-core 3.3.0 → 3.4.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 (370) hide show
  1. package/AGENTS.md +17 -0
  2. package/build/components/dropdown.css +1 -1
  3. package/build/components/icon.css +1 -1
  4. package/build/components/nav-item.css +1 -1
  5. package/build/components/secondary-nav.css +1 -1
  6. package/build/components/top-nav.css +1 -1
  7. package/build/core.css +1 -1
  8. package/build/style.css +1 -1
  9. package/build/variables/apollo.css +1 -0
  10. package/build/variables/field-edge.css +1 -0
  11. package/build/vendor/flatpickr.css +1 -1
  12. package/dist/apollo-core/apollo-core.css +1 -1
  13. package/dist/apollo-core/apollo-core.esm.js +1 -1
  14. package/dist/apollo-core/{p-18486aba.entry.js → p-00e96d61.entry.js} +1 -1
  15. package/dist/apollo-core/{p-439d5cdd.entry.js → p-02a2d1a3.entry.js} +1 -1
  16. package/dist/apollo-core/{p-d204ed1a.entry.js → p-035ed1ad.entry.js} +1 -1
  17. package/dist/apollo-core/{p-af188297.entry.js → p-066d3199.entry.js} +1 -1
  18. package/dist/apollo-core/{p-9955c4f2.entry.js → p-066eccd6.entry.js} +1 -1
  19. package/dist/apollo-core/{p-2b813212.entry.js → p-0e8514ff.entry.js} +1 -1
  20. package/dist/apollo-core/{p-a73b0ca4.entry.js → p-18115cd4.entry.js} +1 -1
  21. package/dist/apollo-core/{p-79d306a2.entry.js → p-19d22455.entry.js} +1 -1
  22. package/dist/apollo-core/{p-9d091b05.entry.js → p-1b00e924.entry.js} +1 -1
  23. package/dist/apollo-core/{p-19fb0e5f.entry.js → p-1ca46c11.entry.js} +1 -1
  24. package/dist/apollo-core/{p-7fd3da3a.entry.js → p-1e07745c.entry.js} +1 -1
  25. package/dist/apollo-core/{p-3e3ab332.entry.js → p-31cbb36f.entry.js} +1 -1
  26. package/dist/apollo-core/{p-cfb00d23.entry.js → p-321319c0.entry.js} +1 -1
  27. package/dist/apollo-core/{p-325a3b43.entry.js → p-3222e5a7.entry.js} +1 -1
  28. package/dist/apollo-core/{p-aece2c3d.entry.js → p-325466bf.entry.js} +1 -1
  29. package/dist/apollo-core/{p-cab7d816.entry.js → p-32ac676a.entry.js} +1 -1
  30. package/dist/apollo-core/{p-6de10879.entry.js → p-33063e8c.entry.js} +1 -1
  31. package/dist/apollo-core/{p-4249ee9b.entry.js → p-34d84be8.entry.js} +1 -1
  32. package/dist/apollo-core/{p-08ea8939.entry.js → p-36965939.entry.js} +1 -1
  33. package/dist/apollo-core/{p-2111cc38.entry.js → p-43fbf2aa.entry.js} +1 -1
  34. package/dist/apollo-core/{p-d1571245.entry.js → p-44a1fd8b.entry.js} +1 -1
  35. package/dist/apollo-core/{p-d9f78325.entry.js → p-462a804c.entry.js} +1 -1
  36. package/dist/apollo-core/{p-38fa8398.entry.js → p-47a4f0a8.entry.js} +1 -1
  37. package/dist/apollo-core/{p-01c55c74.entry.js → p-5cf30b9d.entry.js} +1 -1
  38. package/dist/apollo-core/{p-7f00b542.entry.js → p-606153e1.entry.js} +1 -1
  39. package/dist/apollo-core/{p-17e38eaf.entry.js → p-60e3a798.entry.js} +1 -1
  40. package/dist/apollo-core/{p-a149351a.entry.js → p-663e9521.entry.js} +1 -1
  41. package/dist/apollo-core/{p-b9c85394.entry.js → p-6e22ab86.entry.js} +1 -1
  42. package/dist/apollo-core/{p-fdd1b7da.entry.js → p-7781b569.entry.js} +1 -1
  43. package/dist/apollo-core/{p-73a1c68d.entry.js → p-787a361c.entry.js} +1 -1
  44. package/dist/apollo-core/{p-fc73497e.entry.js → p-7b46b656.entry.js} +1 -1
  45. package/dist/apollo-core/{p-9b757459.entry.js → p-7bfd9cfb.entry.js} +1 -1
  46. package/dist/apollo-core/{p-4b949aeb.entry.js → p-8127dd6b.entry.js} +1 -1
  47. package/dist/apollo-core/{p-3d4a6de1.entry.js → p-88367287.entry.js} +1 -1
  48. package/dist/apollo-core/{p-d13a07ea.entry.js → p-8a59605f.entry.js} +1 -1
  49. package/dist/apollo-core/p-8df2b9e8.entry.js +1 -0
  50. package/dist/apollo-core/{p-e99503a2.entry.js → p-9466f566.entry.js} +1 -1
  51. package/dist/apollo-core/{p-620fc472.entry.js → p-95b6e6e6.entry.js} +1 -1
  52. package/dist/apollo-core/{p-14f5d98a.entry.js → p-966f3702.entry.js} +1 -1
  53. package/dist/apollo-core/{p-cca0f1a2.entry.js → p-9d7ead72.entry.js} +1 -1
  54. package/dist/apollo-core/p-CgJEmBQY.js +3 -0
  55. package/dist/apollo-core/{p-b2dcdb19.entry.js → p-a21c7976.entry.js} +1 -1
  56. package/dist/apollo-core/{p-d060572b.entry.js → p-a30b51c8.entry.js} +1 -1
  57. package/dist/apollo-core/{p-b55951a2.entry.js → p-a3537a74.entry.js} +1 -1
  58. package/dist/apollo-core/{p-6aee7d6b.entry.js → p-ac105b6c.entry.js} +1 -1
  59. package/dist/apollo-core/{p-cd2d73ee.entry.js → p-adc14e6e.entry.js} +1 -1
  60. package/dist/apollo-core/{p-c4fd031e.entry.js → p-b41b7950.entry.js} +1 -1
  61. package/dist/apollo-core/{p-0a7d57ab.entry.js → p-b44a72e9.entry.js} +1 -1
  62. package/dist/apollo-core/{p-e21af3d1.entry.js → p-b6f20359.entry.js} +1 -1
  63. package/dist/apollo-core/{p-dad5d377.entry.js → p-b7f75498.entry.js} +1 -1
  64. package/dist/apollo-core/{p-890c641b.entry.js → p-b9136f21.entry.js} +1 -1
  65. package/dist/apollo-core/{p-e7145461.entry.js → p-c526f16d.entry.js} +1 -1
  66. package/dist/apollo-core/{p-3f8dc5b9.entry.js → p-c7b8a325.entry.js} +1 -1
  67. package/dist/apollo-core/{p-1c2135e3.entry.js → p-c9246567.entry.js} +1 -1
  68. package/dist/apollo-core/{p-b7b91f27.entry.js → p-cc04d4e7.entry.js} +1 -1
  69. package/dist/apollo-core/{p-13253d8f.entry.js → p-cc27a41f.entry.js} +1 -1
  70. package/dist/apollo-core/{p-01ed2bb5.entry.js → p-d58523b6.entry.js} +1 -1
  71. package/dist/apollo-core/{p-a5ddb3c4.entry.js → p-d7fba438.entry.js} +1 -1
  72. package/dist/apollo-core/p-db998e2a.entry.js +1 -0
  73. package/dist/apollo-core/{p-9c7a0229.entry.js → p-e1f095dd.entry.js} +1 -1
  74. package/dist/apollo-core/{p-651b49c3.entry.js → p-e30d204d.entry.js} +1 -1
  75. package/dist/apollo-core/{p-54053547.entry.js → p-e4649020.entry.js} +1 -1
  76. package/dist/apollo-core/{p-9c41d07f.entry.js → p-ebe6a1d6.entry.js} +1 -1
  77. package/dist/apollo-core/{p-d3720611.entry.js → p-f0897ee2.entry.js} +1 -1
  78. package/dist/apollo-core/{p-ba85f686.entry.js → p-f13e14bd.entry.js} +1 -1
  79. package/dist/apollo-core/{p-38a6a53d.entry.js → p-f88eefaf.entry.js} +1 -1
  80. package/dist/apollo-core/{p-9832bc63.entry.js → p-fd2e7bb0.entry.js} +1 -1
  81. package/dist/cjs/apollo-core.cjs.js +1 -1
  82. package/dist/cjs/{index-EdmnG7t8.js → index-CQbPtJas.js} +1 -154
  83. package/dist/cjs/loader.cjs.js +1 -1
  84. package/dist/cjs/xpl-accordion.cjs.entry.js +1 -1
  85. package/dist/cjs/xpl-application-shell.cjs.entry.js +1 -1
  86. package/dist/cjs/xpl-avatar_3.cjs.entry.js +1 -1
  87. package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -1
  88. package/dist/cjs/xpl-badge.cjs.entry.js +1 -1
  89. package/dist/cjs/xpl-banner.cjs.entry.js +1 -1
  90. package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +1 -1
  91. package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +1 -1
  92. package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
  93. package/dist/cjs/xpl-button.cjs.entry.js +1 -1
  94. package/dist/cjs/xpl-calendar.cjs.entry.js +2 -2
  95. package/dist/cjs/xpl-checkbox.cjs.entry.js +1 -1
  96. package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
  97. package/dist/cjs/xpl-content-area.cjs.entry.js +1 -1
  98. package/dist/cjs/xpl-dashboard.cjs.entry.js +1 -1
  99. package/dist/cjs/xpl-data-card.cjs.entry.js +3 -3
  100. package/dist/cjs/xpl-dropdown_4.cjs.entry.js +1 -1
  101. package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +1 -1
  102. package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +1 -1
  103. package/dist/cjs/xpl-dynamic-table.cjs.entry.js +1 -1
  104. package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
  105. package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
  106. package/dist/cjs/xpl-header-accordion.cjs.entry.js +1 -1
  107. package/dist/cjs/xpl-icon.cjs.entry.js +3 -6
  108. package/dist/cjs/xpl-input-color.cjs.entry.js +9 -9
  109. package/dist/cjs/xpl-input-phone.cjs.entry.js +1 -1
  110. package/dist/cjs/xpl-input-time.cjs.entry.js +1 -1
  111. package/dist/cjs/xpl-input_4.cjs.entry.js +4 -4
  112. package/dist/cjs/xpl-large-card.cjs.entry.js +2 -2
  113. package/dist/cjs/xpl-list-item.cjs.entry.js +1 -1
  114. package/dist/cjs/xpl-list.cjs.entry.js +3 -3
  115. package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
  116. package/dist/cjs/xpl-modal.cjs.entry.js +1 -1
  117. package/dist/cjs/xpl-nav-header-menu.cjs.entry.js +3 -3
  118. package/dist/cjs/xpl-nav-item.cjs.entry.js +1 -1
  119. package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
  120. package/dist/cjs/xpl-panel.cjs.entry.js +1 -1
  121. package/dist/cjs/xpl-popover.cjs.entry.js +1 -1
  122. package/dist/cjs/xpl-progress-bar.cjs.entry.js +1 -1
  123. package/dist/cjs/xpl-progress-indicator.cjs.entry.js +1 -1
  124. package/dist/cjs/xpl-secondary-nav.cjs.entry.js +1 -1
  125. package/dist/cjs/xpl-select_2.cjs.entry.js +1 -1
  126. package/dist/cjs/xpl-side-nav-header-item.cjs.entry.js +1 -1
  127. package/dist/cjs/xpl-side-nav-item.cjs.entry.js +1 -1
  128. package/dist/cjs/xpl-side-nav-section.cjs.entry.js +1 -1
  129. package/dist/cjs/xpl-side-nav.cjs.entry.js +3 -3
  130. package/dist/cjs/xpl-skeleton.cjs.entry.js +1 -1
  131. package/dist/cjs/xpl-slideout.cjs.entry.js +1 -1
  132. package/dist/cjs/xpl-spotlight.cjs.entry.js +1 -1
  133. package/dist/cjs/xpl-tab-panel.cjs.entry.js +3 -3
  134. package/dist/cjs/xpl-tab.cjs.entry.js +1 -1
  135. package/dist/cjs/xpl-table-body.cjs.entry.js +1 -1
  136. package/dist/cjs/xpl-table-cell_3.cjs.entry.js +1 -1
  137. package/dist/cjs/xpl-table-footer.cjs.entry.js +1 -1
  138. package/dist/cjs/xpl-table-header.cjs.entry.js +1 -1
  139. package/dist/cjs/xpl-table-row.cjs.entry.js +1 -1
  140. package/dist/cjs/xpl-table.cjs.entry.js +1 -1
  141. package/dist/cjs/xpl-tabs.cjs.entry.js +1 -1
  142. package/dist/cjs/xpl-toast.cjs.entry.js +1 -1
  143. package/dist/cjs/xpl-toggle.cjs.entry.js +1 -1
  144. package/dist/cjs/xpl-toolbar.cjs.entry.js +1 -1
  145. package/dist/cjs/xpl-tooltip.cjs.entry.js +1 -1
  146. package/dist/cjs/xpl-top-nav-item.cjs.entry.js +3 -3
  147. package/dist/cjs/xpl-top-nav-menu.cjs.entry.js +3 -3
  148. package/dist/cjs/xpl-top-nav.cjs.entry.js +6 -6
  149. package/dist/cjs/xpl-utility-bar.cjs.entry.js +1 -1
  150. package/dist/collection/components/xpl-avatar/xpl-avatar.js +8 -8
  151. package/dist/collection/components/xpl-badge/xpl-badge.js +2 -2
  152. package/dist/collection/components/xpl-calendar/xpl-calendar.js +1 -1
  153. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +1 -1
  154. package/dist/collection/components/xpl-data-card/xpl-data-card.js +2 -2
  155. package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
  156. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +6 -6
  157. package/dist/collection/components/xpl-icon/xpl-icon.js +2 -12
  158. package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +8 -8
  159. package/dist/collection/components/xpl-input/xpl-input-date/xpl-input-date.js +3 -3
  160. package/dist/collection/components/xpl-large-card/xpl-large-card.js +1 -1
  161. package/dist/collection/components/xpl-list/xpl-list-item/xpl-list-item.js +2 -2
  162. package/dist/collection/components/xpl-list/xpl-list.js +4 -4
  163. package/dist/collection/components/xpl-popover/xpl-popover.js +2 -2
  164. package/dist/collection/components/xpl-select/xpl-select.js +1 -1
  165. package/dist/collection/components/xpl-side-nav/xpl-side-nav.js +2 -2
  166. package/dist/collection/components/xpl-spotlight/xpl-spotlight.js +4 -4
  167. package/dist/collection/components/xpl-tab/xpl-tab.js +2 -2
  168. package/dist/collection/components/xpl-tab-panel/xpl-tab-panel.js +3 -3
  169. package/dist/collection/components/xpl-table/xpl-table-header-cell/xpl-table-header-cell.js +2 -2
  170. package/dist/collection/components/xpl-table/xpl-table.js +4 -4
  171. package/dist/collection/components/xpl-tag/xpl-tag.js +4 -4
  172. package/dist/collection/components/xpl-top-nav/xpl-nav-header-menu/xpl-nav-header-menu.js +2 -2
  173. package/dist/collection/components/xpl-top-nav/xpl-top-nav-item/xpl-top-nav-item.js +2 -2
  174. package/dist/collection/components/xpl-top-nav/xpl-top-nav-menu/xpl-top-nav-menu.js +2 -2
  175. package/dist/collection/components/xpl-top-nav/xpl-top-nav.js +5 -5
  176. package/dist/components/index.js +1 -1
  177. package/dist/components/{p-Bh-U2qmp.js → p-6-DvgBzG.js} +1 -1
  178. package/dist/components/{p-DHxDWgLP.js → p-B54F4o_Z.js} +1 -1
  179. package/dist/components/{p-Cop4KmAG.js → p-BFUtaXqX.js} +1 -1
  180. package/dist/components/{p-3R1VKKds.js → p-BHRO2whA.js} +1 -1
  181. package/dist/components/{p-CZg3Gb0I.js → p-BKajYWw6.js} +1 -1
  182. package/dist/components/{p-rQFFXcXl.js → p-BU4pW_6c.js} +1 -1
  183. package/dist/components/p-B_6p2HCL.js +1 -0
  184. package/dist/components/{p-BowQ58XR.js → p-Biie85R2.js} +1 -1
  185. package/dist/components/{p-CetimlcM.js → p-CIcKTXQj.js} +1 -1
  186. package/dist/components/{p-n-yq7lf4.js → p-COq-vU2g.js} +1 -1
  187. package/dist/components/{p-ClLyaOG7.js → p-CTy7V3XS.js} +1 -1
  188. package/dist/components/{p-JjlTuq8d.js → p-Cq8V05oj.js} +1 -1
  189. package/dist/components/{p-BZrSTAV1.js → p-CthHapLu.js} +1 -1
  190. package/dist/components/{p-DbN9vTl7.js → p-DGxQJj8d.js} +1 -1
  191. package/dist/components/{p-CcPrBo53.js → p-Dn1Qsv0Y.js} +1 -1
  192. package/dist/components/{p-d4i2Qqvl.js → p-Dn6HsGUr.js} +1 -1
  193. package/dist/components/{p-BNOkHymY.js → p-DxjcChRd.js} +1 -1
  194. package/dist/components/{p-2XxO7M15.js → p-FS6KZMQV.js} +1 -1
  195. package/dist/components/{p-BWAytJnz.js → p-Fj_zi29t.js} +1 -1
  196. package/dist/components/{p-CjzUVpyd.js → p-L9wSxXlk.js} +1 -1
  197. package/dist/components/{p-DORBnmT4.js → p-ULcrhk_V.js} +1 -1
  198. package/dist/components/{p-Dl__XgUD.js → p-WTdJQHaL.js} +1 -1
  199. package/dist/components/{p-CWXfIUHo.js → p-fstojyQr.js} +1 -1
  200. package/dist/components/{p-CfZI7bBe.js → p-gs07oY0j.js} +1 -1
  201. package/dist/components/{p-sjDW_E4p.js → p-nRygucMK.js} +1 -1
  202. package/dist/components/{p-yc1qXhah.js → p-q4zX9LQ0.js} +1 -1
  203. package/dist/components/xpl-accordion.js +1 -1
  204. package/dist/components/xpl-application-shell.js +1 -1
  205. package/dist/components/xpl-avatar.js +1 -1
  206. package/dist/components/xpl-backdrop.js +1 -1
  207. package/dist/components/xpl-badge.js +1 -1
  208. package/dist/components/xpl-banner.js +1 -1
  209. package/dist/components/xpl-breadcrumb-item.js +1 -1
  210. package/dist/components/xpl-breadcrumbs.js +1 -1
  211. package/dist/components/xpl-button-row.js +1 -1
  212. package/dist/components/xpl-button.js +1 -1
  213. package/dist/components/xpl-calendar.js +1 -1
  214. package/dist/components/xpl-checkbox.js +1 -1
  215. package/dist/components/xpl-choicelist.js +1 -1
  216. package/dist/components/xpl-content-area.js +1 -1
  217. package/dist/components/xpl-dashboard.js +1 -1
  218. package/dist/components/xpl-data-card.js +1 -1
  219. package/dist/components/xpl-divider.js +1 -1
  220. package/dist/components/xpl-dropdown-group.js +1 -1
  221. package/dist/components/xpl-dropdown-heading.js +1 -1
  222. package/dist/components/xpl-dropdown-option.js +1 -1
  223. package/dist/components/xpl-dropdown.js +1 -1
  224. package/dist/components/xpl-dynamic-table-cell.js +1 -1
  225. package/dist/components/xpl-dynamic-table-row.js +1 -1
  226. package/dist/components/xpl-dynamic-table.js +1 -1
  227. package/dist/components/xpl-grid-item.js +1 -1
  228. package/dist/components/xpl-grid.js +1 -1
  229. package/dist/components/xpl-header-accordion.js +1 -1
  230. package/dist/components/xpl-icon.js +1 -1
  231. package/dist/components/xpl-input-color.js +1 -1
  232. package/dist/components/xpl-input-date.js +1 -1
  233. package/dist/components/xpl-input-file.js +1 -1
  234. package/dist/components/xpl-input-phone.js +1 -1
  235. package/dist/components/xpl-input-search.js +1 -1
  236. package/dist/components/xpl-input-time.js +1 -1
  237. package/dist/components/xpl-input.js +1 -1
  238. package/dist/components/xpl-large-card.js +1 -1
  239. package/dist/components/xpl-list-item.js +1 -1
  240. package/dist/components/xpl-list.js +1 -1
  241. package/dist/components/xpl-main-nav.js +1 -1
  242. package/dist/components/xpl-modal.js +1 -1
  243. package/dist/components/xpl-nav-header-menu.js +1 -1
  244. package/dist/components/xpl-nav-item.js +1 -1
  245. package/dist/components/xpl-pagination.js +1 -1
  246. package/dist/components/xpl-panel.js +1 -1
  247. package/dist/components/xpl-popover.js +1 -1
  248. package/dist/components/xpl-progress-bar.js +1 -1
  249. package/dist/components/xpl-progress-indicator.js +1 -1
  250. package/dist/components/xpl-radio.js +1 -1
  251. package/dist/components/xpl-secondary-nav.js +1 -1
  252. package/dist/components/xpl-select.js +1 -1
  253. package/dist/components/xpl-side-nav-header-item.js +1 -1
  254. package/dist/components/xpl-side-nav-item.js +1 -1
  255. package/dist/components/xpl-side-nav-section.js +1 -1
  256. package/dist/components/xpl-side-nav.js +1 -1
  257. package/dist/components/xpl-skeleton.js +1 -1
  258. package/dist/components/xpl-slideout.js +1 -1
  259. package/dist/components/xpl-spotlight.js +1 -1
  260. package/dist/components/xpl-tab-panel.js +1 -1
  261. package/dist/components/xpl-tab.js +1 -1
  262. package/dist/components/xpl-table-body.js +1 -1
  263. package/dist/components/xpl-table-cell.js +1 -1
  264. package/dist/components/xpl-table-footer-cell.js +1 -1
  265. package/dist/components/xpl-table-footer.js +1 -1
  266. package/dist/components/xpl-table-header-cell.js +1 -1
  267. package/dist/components/xpl-table-header.js +1 -1
  268. package/dist/components/xpl-table-row.js +1 -1
  269. package/dist/components/xpl-table.js +1 -1
  270. package/dist/components/xpl-tabs.js +1 -1
  271. package/dist/components/xpl-tag.js +1 -1
  272. package/dist/components/xpl-toast.js +1 -1
  273. package/dist/components/xpl-toggle.js +1 -1
  274. package/dist/components/xpl-toolbar.js +1 -1
  275. package/dist/components/xpl-tooltip.js +1 -1
  276. package/dist/components/xpl-top-nav-item.js +1 -1
  277. package/dist/components/xpl-top-nav-menu.js +1 -1
  278. package/dist/components/xpl-top-nav.js +1 -1
  279. package/dist/components/xpl-utility-bar.js +1 -1
  280. package/dist/docs/xpl-avatar/readme.md +1 -1
  281. package/dist/docs/xpl-dropdown/readme.md +10 -1
  282. package/dist/docs/xpl-list/readme.md +1 -1
  283. package/dist/docs/xpl-nav-item/readme.md +1 -1
  284. package/dist/docs/xpl-pagination/readme.md +1 -1
  285. package/dist/docs/xpl-secondary-nav/readme.md +4 -2
  286. package/dist/docs/xpl-toolbar/readme.md +1 -1
  287. package/dist/docs/xpl-top-nav/xpl-nav-header-menu/readme.md +1 -1
  288. package/dist/docs.json +168 -168
  289. package/dist/esm/apollo-core.js +2 -2
  290. package/dist/esm/{index-CJABLO_1.js → index-CgJEmBQY.js} +1 -154
  291. package/dist/esm/loader.js +2 -2
  292. package/dist/esm/xpl-accordion.entry.js +1 -1
  293. package/dist/esm/xpl-application-shell.entry.js +1 -1
  294. package/dist/esm/xpl-avatar_3.entry.js +1 -1
  295. package/dist/esm/xpl-backdrop.entry.js +1 -1
  296. package/dist/esm/xpl-badge.entry.js +1 -1
  297. package/dist/esm/xpl-banner.entry.js +1 -1
  298. package/dist/esm/xpl-breadcrumb-item.entry.js +1 -1
  299. package/dist/esm/xpl-breadcrumbs.entry.js +1 -1
  300. package/dist/esm/xpl-button-row.entry.js +1 -1
  301. package/dist/esm/xpl-button.entry.js +1 -1
  302. package/dist/esm/xpl-calendar.entry.js +2 -2
  303. package/dist/esm/xpl-checkbox.entry.js +1 -1
  304. package/dist/esm/xpl-choicelist.entry.js +1 -1
  305. package/dist/esm/xpl-content-area.entry.js +1 -1
  306. package/dist/esm/xpl-dashboard.entry.js +1 -1
  307. package/dist/esm/xpl-data-card.entry.js +3 -3
  308. package/dist/esm/xpl-dropdown_4.entry.js +1 -1
  309. package/dist/esm/xpl-dynamic-table-cell.entry.js +1 -1
  310. package/dist/esm/xpl-dynamic-table-row.entry.js +1 -1
  311. package/dist/esm/xpl-dynamic-table.entry.js +1 -1
  312. package/dist/esm/xpl-grid-item.entry.js +1 -1
  313. package/dist/esm/xpl-grid.entry.js +1 -1
  314. package/dist/esm/xpl-header-accordion.entry.js +1 -1
  315. package/dist/esm/xpl-icon.entry.js +3 -6
  316. package/dist/esm/xpl-input-color.entry.js +9 -9
  317. package/dist/esm/xpl-input-phone.entry.js +1 -1
  318. package/dist/esm/xpl-input-time.entry.js +1 -1
  319. package/dist/esm/xpl-input_4.entry.js +4 -4
  320. package/dist/esm/xpl-large-card.entry.js +2 -2
  321. package/dist/esm/xpl-list-item.entry.js +1 -1
  322. package/dist/esm/xpl-list.entry.js +3 -3
  323. package/dist/esm/xpl-main-nav.entry.js +1 -1
  324. package/dist/esm/xpl-modal.entry.js +1 -1
  325. package/dist/esm/xpl-nav-header-menu.entry.js +3 -3
  326. package/dist/esm/xpl-nav-item.entry.js +1 -1
  327. package/dist/esm/xpl-pagination.entry.js +1 -1
  328. package/dist/esm/xpl-panel.entry.js +1 -1
  329. package/dist/esm/xpl-popover.entry.js +1 -1
  330. package/dist/esm/xpl-progress-bar.entry.js +1 -1
  331. package/dist/esm/xpl-progress-indicator.entry.js +1 -1
  332. package/dist/esm/xpl-secondary-nav.entry.js +1 -1
  333. package/dist/esm/xpl-select_2.entry.js +1 -1
  334. package/dist/esm/xpl-side-nav-header-item.entry.js +1 -1
  335. package/dist/esm/xpl-side-nav-item.entry.js +1 -1
  336. package/dist/esm/xpl-side-nav-section.entry.js +1 -1
  337. package/dist/esm/xpl-side-nav.entry.js +3 -3
  338. package/dist/esm/xpl-skeleton.entry.js +1 -1
  339. package/dist/esm/xpl-slideout.entry.js +1 -1
  340. package/dist/esm/xpl-spotlight.entry.js +1 -1
  341. package/dist/esm/xpl-tab-panel.entry.js +3 -3
  342. package/dist/esm/xpl-tab.entry.js +1 -1
  343. package/dist/esm/xpl-table-body.entry.js +1 -1
  344. package/dist/esm/xpl-table-cell_3.entry.js +1 -1
  345. package/dist/esm/xpl-table-footer.entry.js +1 -1
  346. package/dist/esm/xpl-table-header.entry.js +1 -1
  347. package/dist/esm/xpl-table-row.entry.js +1 -1
  348. package/dist/esm/xpl-table.entry.js +1 -1
  349. package/dist/esm/xpl-tabs.entry.js +1 -1
  350. package/dist/esm/xpl-toast.entry.js +1 -1
  351. package/dist/esm/xpl-toggle.entry.js +1 -1
  352. package/dist/esm/xpl-toolbar.entry.js +1 -1
  353. package/dist/esm/xpl-tooltip.entry.js +1 -1
  354. package/dist/esm/xpl-top-nav-item.entry.js +3 -3
  355. package/dist/esm/xpl-top-nav-menu.entry.js +3 -3
  356. package/dist/esm/xpl-top-nav.entry.js +6 -6
  357. package/dist/esm/xpl-utility-bar.entry.js +1 -1
  358. package/hydrate/index.js +35 -145
  359. package/hydrate/index.mjs +35 -145
  360. package/package.json +11 -11
  361. package/dist/apollo-core/p-CJABLO_1.js +0 -3
  362. package/dist/apollo-core/p-a2c3a38a.entry.js +0 -1
  363. package/dist/apollo-core/p-ec99c433.entry.js +0 -1
  364. package/dist/collection/components/xpl-icon/xpl-icon.css +0 -5
  365. package/dist/components/p-BqhTjJWq.js +0 -1
  366. /package/dist/{utils → collection/utils}/form-bindings.js +0 -0
  367. /package/dist/{utils → collection/utils}/story-vrt.js +0 -0
  368. /package/dist/types/{third-party.d.ts → types/third-party.d.ts} +0 -0
  369. /package/dist/types/{home/runner/work/apollo/apollo/packages/apollo-core/.stencil/utils → utils}/form-bindings.d.ts +0 -0
  370. /package/dist/types/{home/runner/work/apollo/apollo/packages/apollo-core/.stencil/utils → utils}/story-vrt.d.ts +0 -0
@@ -1 +1 @@
1
- import{r as e,c as s,h as i,H as a}from"./p-CJABLO_1.js";import{v as t}from"./p-CK3_k8jD.js";const c=class{constructor(i){e(this,i),this.checkboxChange=s(this,"checkboxChange",7),this.id=t(),this.ariaLabel="",this.onChange=e=>{this.checkboxChange.emit(e.target.checked)}}render(){return i(a,{key:"1c22f9cae18b7ef0ab38b01b0a1bcb0267047201",class:{"xpl-checkbox-radio-container":!0,styled:!!this.styled,disabled:!!this.disabled}},i("input",{key:"b82e9eef1e504bdf76faf441c5215b3ef95bd006",class:"xpl-checkbox",type:"checkbox","aria-label":(this.ariaLabel??"").trim()||void 0,checked:this.checked,"data-id":this.dataId,disabled:this.disabled,id:this.id,indeterminate:this.indeterminate,onChange:this.onChange,name:this.name,required:this.required,value:this.value}),i("label",{key:"0f605fbd6dbee4e412e12c461bc530b47926d01b",class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},i("slot",{key:"1f165c4cad532b4daa6726ca1cd0607c26d7bbee"}),this.description&&i("small",{key:"21d04363115f6762600d4fa47ea2bdd2ae1a9c78",class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)))}};export{c as xpl_checkbox}
1
+ import{r as e,c as s,h as i,H as a}from"./p-CgJEmBQY.js";import{v as t}from"./p-CK3_k8jD.js";const c=class{constructor(i){e(this,i),this.checkboxChange=s(this,"checkboxChange",7),this.id=t(),this.ariaLabel="",this.onChange=e=>{this.checkboxChange.emit(e.target.checked)}}render(){return i(a,{key:"1c22f9cae18b7ef0ab38b01b0a1bcb0267047201",class:{"xpl-checkbox-radio-container":!0,styled:!!this.styled,disabled:!!this.disabled}},i("input",{key:"b82e9eef1e504bdf76faf441c5215b3ef95bd006",class:"xpl-checkbox",type:"checkbox","aria-label":(this.ariaLabel??"").trim()||void 0,checked:this.checked,"data-id":this.dataId,disabled:this.disabled,id:this.id,indeterminate:this.indeterminate,onChange:this.onChange,name:this.name,required:this.required,value:this.value}),i("label",{key:"0f605fbd6dbee4e412e12c461bc530b47926d01b",class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},i("slot",{key:"1f165c4cad532b4daa6726ca1cd0607c26d7bbee"}),this.description&&i("small",{key:"21d04363115f6762600d4fa47ea2bdd2ae1a9c78",class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)))}};export{c as xpl_checkbox}
@@ -1 +1 @@
1
- import{r as e,c as s,h as t,H as l}from"./p-CJABLO_1.js";import{v as a}from"./p-CK3_k8jD.js";const i=class{constructor(t){e(this,t),this.toggleChange=s(this,"toggleChange",7),this.variant="default",this.id=a(),this.onChange=e=>{this.toggleChange.emit(e.target.checked)}}render(){let e="xpl-toggle-container";this.disabled&&(e+=" xpl-toggle-container--disabled");let s="xpl-toggle";return"small"===this.variant&&(s+=" xpl-toggle--small"),t(l,{key:"79915f2091093b5440ca3a8e63584e448137f479",class:e},(this.heading||this.description)&&t("label",{key:"6660a95ec66eec9ed33016efcf58aaf0940f6f47",class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},this.heading,this.description&&t("small",{key:"160f0a90739142bc37779af28725183979de5a4c",class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)),t("input",{key:"b136188b1de98d1ede875bf9f80b97c9ee66321d",class:s,type:"checkbox",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name,onChange:this.onChange}),this.label&&t("label",{key:"0329f2badfa3b3e8c1153c2e5baa4ee76e40ac5d",htmlFor:this.id},this.label))}};export{i as xpl_toggle}
1
+ import{r as e,c as s,h as t,H as l}from"./p-CgJEmBQY.js";import{v as a}from"./p-CK3_k8jD.js";const i=class{constructor(t){e(this,t),this.toggleChange=s(this,"toggleChange",7),this.variant="default",this.id=a(),this.onChange=e=>{this.toggleChange.emit(e.target.checked)}}render(){let e="xpl-toggle-container";this.disabled&&(e+=" xpl-toggle-container--disabled");let s="xpl-toggle";return"small"===this.variant&&(s+=" xpl-toggle--small"),t(l,{key:"79915f2091093b5440ca3a8e63584e448137f479",class:e},(this.heading||this.description)&&t("label",{key:"6660a95ec66eec9ed33016efcf58aaf0940f6f47",class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},this.heading,this.description&&t("small",{key:"160f0a90739142bc37779af28725183979de5a4c",class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)),t("input",{key:"b136188b1de98d1ede875bf9f80b97c9ee66321d",class:s,type:"checkbox",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name,onChange:this.onChange}),this.label&&t("label",{key:"0329f2badfa3b3e8c1153c2e5baa4ee76e40ac5d",htmlFor:this.id},this.label))}};export{i as xpl_toggle}
@@ -1 +1 @@
1
- import{r as a,h as c,H as d}from"./p-CJABLO_1.js";const s=class{constructor(c){a(this,c)}render(){return c(d,{key:"dac516d62e2171dcd43f7c7d28fc4af39a880d63"},c("dl",{key:"9ebe4177da5919058c8cdcc7aba2b07fcc9617a0",class:"xpl-dashboard"},c("slot",{key:"eb261b674f1ae29b4b9837c98865b64a78fe4949"})))}};export{s as xpl_dashboard}
1
+ import{r as a,h as c,H as d}from"./p-CgJEmBQY.js";const s=class{constructor(c){a(this,c)}render(){return c(d,{key:"dac516d62e2171dcd43f7c7d28fc4af39a880d63"},c("dl",{key:"9ebe4177da5919058c8cdcc7aba2b07fcc9617a0",class:"xpl-dashboard"},c("slot",{key:"eb261b674f1ae29b4b9837c98865b64a78fe4949"})))}};export{s as xpl_dashboard}
@@ -1 +1 @@
1
- import{r as e,h as t,H as s,g as a}from"./p-CJABLO_1.js";const i=class{constructor(t){e(this,t),this.disabled=!1}componentDidLoad(){this.updateSlottedComponentsWhenDisabled()}componentDidUpdate(){this.updateSlottedComponentsWhenDisabled()}updateSlottedComponentsWhenDisabled(){(this.hostElement?.querySelectorAll("*")??[]).forEach((e=>{"disabled"in e&&(e.disabled=this.disabled)}))}render(){const e=this.el.parentElement?Array.from(this.el.parentElement.children).indexOf(this.el)+1:0;return t(s,{key:"fb0813824c87078ee6a2cda5e3d4f40f86160c30",role:"gridcell","aria-colindex":e,class:"xpl-dynamic-table-cell",ref:e=>{this.hostElement=e??void 0}},t("slot",{key:"3a09f63ca7320971d3080458d48eb7f87423008a"}))}get el(){return a(this)}};export{i as xpl_dynamic_table_cell}
1
+ import{r as e,h as t,H as s,g as a}from"./p-CgJEmBQY.js";const i=class{constructor(t){e(this,t),this.disabled=!1}componentDidLoad(){this.updateSlottedComponentsWhenDisabled()}componentDidUpdate(){this.updateSlottedComponentsWhenDisabled()}updateSlottedComponentsWhenDisabled(){(this.hostElement?.querySelectorAll("*")??[]).forEach((e=>{"disabled"in e&&(e.disabled=this.disabled)}))}render(){const e=this.el.parentElement?Array.from(this.el.parentElement.children).indexOf(this.el)+1:0;return t(s,{key:"fb0813824c87078ee6a2cda5e3d4f40f86160c30",role:"gridcell","aria-colindex":e,class:"xpl-dynamic-table-cell",ref:e=>{this.hostElement=e??void 0}},t("slot",{key:"3a09f63ca7320971d3080458d48eb7f87423008a"}))}get el(){return a(this)}};export{i as xpl_dynamic_table_cell}
@@ -1 +1 @@
1
- import{r as s,c as i,h as t,H as e}from"./p-CJABLO_1.js";import{v as h}from"./p-CK3_k8jD.js";const c=class{constructor(e){s(this,e),this.choicelistChange=i(this,"choicelistChange",7),this.choicelistValueChange=i(this,"choicelistValueChange",7),this.name=h(),this.onChoiceChange=(s,i)=>{const t=this.choices[i];if(this.multi){if(this.selected=this.selected.map(((s,t)=>t===i?!s:s)),void 0!==t?.value){const s=this.choices.filter(((s,i)=>this.selected[i])).map(((s,i)=>s.value??this.selected[i]));this.choicelistValueChange.emit(s)}}else this.selected=this.selected.map(((s,t)=>t===i)),void 0!==t?.value&&this.choicelistValueChange.emit(t.value)},this.renderChoice=({description:s,label:i,value:e,checked:h},c)=>this.multi?t("xpl-checkbox",{value:e,description:s,name:this.name,checked:h,onCheckboxChange:s=>this.onChoiceChange(s.detail,c)},i):t("xpl-radio",{value:e,description:s,name:this.name,checked:h,onRadioChange:s=>this.onChoiceChange(s.detail,c)},i)}onChoicesPropChange(s){this.selected=null!=s&&s.length>0?s.map((s=>s.checked||!1)):[]}onSelectedChange(s){this.choicelistChange.emit(s)}componentWillLoad(){this.onChoicesPropChange(this.choices)}render(){return t(e,{key:"c1588b70760e078e599ee7a0ffa9b63b65bfb7e4",class:"xpl-choicelist-container"},void 0!==this.heading||void 0!==this.description?t("div",{class:"xpl-choicelist-heading"},this.heading&&t("h3",null,this.heading),this.description&&t("p",null,this.description)):null,this.choices&&t("ul",{key:"0ea89dcd0aa52724e2659b0a075299c0624eb682",class:{"xpl-choicelist":!0,"xpl-choicelist--styled":!!this.styled}},this.choices.map(((s,i)=>{const e=this.renderChoice(s,i);return t("li",{class:{selected:!!this.styled&&!!this.selected[i]}},e,s.children&&t("ul",null,s.children.map(((s,i)=>{const e=this.renderChoice(s,i);return t("li",null,e)}))))}))))}static get watchers(){return{choices:[{onChoicesPropChange:0}],selected:[{onSelectedChange:0}]}}};export{c as xpl_choicelist}
1
+ import{r as s,c as i,h as t,H as e}from"./p-CgJEmBQY.js";import{v as h}from"./p-CK3_k8jD.js";const c=class{constructor(e){s(this,e),this.choicelistChange=i(this,"choicelistChange",7),this.choicelistValueChange=i(this,"choicelistValueChange",7),this.name=h(),this.onChoiceChange=(s,i)=>{const t=this.choices[i];if(this.multi){if(this.selected=this.selected.map(((s,t)=>t===i?!s:s)),void 0!==t?.value){const s=this.choices.filter(((s,i)=>this.selected[i])).map(((s,i)=>s.value??this.selected[i]));this.choicelistValueChange.emit(s)}}else this.selected=this.selected.map(((s,t)=>t===i)),void 0!==t?.value&&this.choicelistValueChange.emit(t.value)},this.renderChoice=({description:s,label:i,value:e,checked:h},c)=>this.multi?t("xpl-checkbox",{value:e,description:s,name:this.name,checked:h,onCheckboxChange:s=>this.onChoiceChange(s.detail,c)},i):t("xpl-radio",{value:e,description:s,name:this.name,checked:h,onRadioChange:s=>this.onChoiceChange(s.detail,c)},i)}onChoicesPropChange(s){this.selected=null!=s&&s.length>0?s.map((s=>s.checked||!1)):[]}onSelectedChange(s){this.choicelistChange.emit(s)}componentWillLoad(){this.onChoicesPropChange(this.choices)}render(){return t(e,{key:"c1588b70760e078e599ee7a0ffa9b63b65bfb7e4",class:"xpl-choicelist-container"},void 0!==this.heading||void 0!==this.description?t("div",{class:"xpl-choicelist-heading"},this.heading&&t("h3",null,this.heading),this.description&&t("p",null,this.description)):null,this.choices&&t("ul",{key:"0ea89dcd0aa52724e2659b0a075299c0624eb682",class:{"xpl-choicelist":!0,"xpl-choicelist--styled":!!this.styled}},this.choices.map(((s,i)=>{const e=this.renderChoice(s,i);return t("li",{class:{selected:!!this.styled&&!!this.selected[i]}},e,s.children&&t("ul",null,s.children.map(((s,i)=>{const e=this.renderChoice(s,i);return t("li",null,e)}))))}))))}static get watchers(){return{choices:[{onChoicesPropChange:0}],selected:[{onSelectedChange:0}]}}};export{c as xpl_choicelist}
@@ -1 +1 @@
1
- import{r as e,h as r,H as b}from"./p-CJABLO_1.js";const o=class{constructor(r){e(this,r)}render(){return r(b,{key:"0a5e05dbbc4f089b7907464693943ce76e76cbc3",class:"xpl-table-body",role:"rowgroup"},r("slot",{key:"f8781515706b3843fd288f5be832cb9e9b78a971"}))}};export{o as xpl_table_body}
1
+ import{r as e,h as r,H as b}from"./p-CgJEmBQY.js";const o=class{constructor(r){e(this,r)}render(){return r(b,{key:"0a5e05dbbc4f089b7907464693943ce76e76cbc3",class:"xpl-table-body",role:"rowgroup"},r("slot",{key:"f8781515706b3843fd288f5be832cb9e9b78a971"}))}};export{o as xpl_table_body}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,H as s,g as c}from"./p-CgJEmBQY.js";import{h as a}from"./p-_r9-FML8.js";const i="graph-content",r=class{constructor(t){e(this,t),this.graphContentPresent=!1}connectedCallback(){this.syncGraphContentSlot(),this.connectGraphContentSlotObserver()}disconnectedCallback(){void 0!==this.graphContentSlotSyncTimeoutId&&(clearTimeout(this.graphContentSlotSyncTimeoutId),this.graphContentSlotSyncTimeoutId=void 0),this.disconnectGraphContentSlotObserver()}componentWillLoad(){this.syncGraphContentSlot()}componentDidLoad(){if(this.link){const e=this.el.getElementsByTagName("a")[0]||this.el.getElementsByTagName("button")[0],t=document.createTextNode(this.name),s=document.createElement("span");s.appendChild(t),e.setAttribute("class","xpl-large-card__anchor"),e.appendChild(s)}}componentWillRender(){this.disconnectGraphContentSlotObserver()}componentDidRender(){this.scheduleGraphContentSlotSync()}connectGraphContentSlotObserver(){this.disconnectGraphContentSlotObserver(),"undefined"!=typeof MutationObserver&&(this.graphContentSlotObserver=new MutationObserver((()=>{this.scheduleGraphContentSlotSync()})),this.graphContentSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectGraphContentSlotObserver(){this.graphContentSlotObserver?.disconnect(),this.graphContentSlotObserver=void 0}scheduleGraphContentSlotSync(){void 0!==this.graphContentSlotSyncTimeoutId&&clearTimeout(this.graphContentSlotSyncTimeoutId),this.graphContentSlotSyncTimeoutId=setTimeout((()=>{this.graphContentSlotSyncTimeoutId=void 0,this.el.isConnected&&(this.syncGraphContentSlot(),this.connectGraphContentSlotObserver())}),0)}syncGraphContentSlot(){const e=a(this.el,i);e!==this.graphContentPresent&&(this.graphContentPresent=e)}render(){return t(s,{key:"a488db2794b82683d4c1ec3eb99d912ac44c6c01",role:"group",class:"xpl-large-card "+(this.link?"xpl-large-card__link":""),tabindex:"0"},t("dt",{key:"7120ad4c237b26f39a7778068426b88b070cac91",class:"xpl-large-card__header"},t("header",{key:"7c40707298086c2b478b93b189d63af3eec7bcfd"},t("slot",{key:"4cf184079ab33c2ffcd680e848eacdac5af7bcb3",name:"title"},this.name),this.link&&t("span",{key:"5b5397cea4222e30f21a57df7a6c953c7e0870b0",class:"xpl-large-card__header-arrow"},t("xpl-icon",{key:"63ae7e85989f006e566ef27c17bd0b8645aa1293",icon:"chevron-right",size:16}))),this.description&&t("div",{key:"bce1ce5e8f2f3e8d55eb187aef2a8a3c9ba756fb",class:"xpl-large-card__description"},this.description)),t("dd",{key:"5af4c4720b6fb563383d98d16c59914dcce2624b",class:"xpl-large-card__body"},this.graphContentPresent&&t("slot",{key:"71663b175e0bba01c5d49c97b65e86f07f1682d4",name:i})))}get el(){return c(this)}};export{r as xpl_large_card}
@@ -1 +1 @@
1
- import{r,h as a,H as s}from"./p-CJABLO_1.js";const t=class{constructor(a){r(this,a),this.relative=!1}render(){return a(s,{key:"85f3504a4f62941f97a81da862a210822b13376c",class:{"xpl-backdrop":!0,"xpl-backdrop--fixed":!this.relative,"xpl-backdrop--relative":this.relative},"aria-hidden":"true"})}};export{t as xpl_backdrop}
1
+ import{r,h as a,H as s}from"./p-CgJEmBQY.js";const t=class{constructor(a){r(this,a),this.relative=!1}render(){return a(s,{key:"85f3504a4f62941f97a81da862a210822b13376c",class:{"xpl-backdrop":!0,"xpl-backdrop--fixed":!this.relative,"xpl-backdrop--relative":this.relative},"aria-hidden":"true"})}};export{t as xpl_backdrop}
@@ -1 +1 @@
1
- import{r as e,c as i,h as t,H as s}from"./p-CJABLO_1.js";const n=class{constructor(t){e(this,t),this.action=i(this,"action",7),this.dismiss=i(this,"dismiss",7),this.secondaryAction=i(this,"secondaryAction",7),this.appearance="information",this.hasIcon=!0,this.isDismissible=!0,this.isSection=!1,this.truncateDesc=!1}getIcon(){switch(this.appearance){case"positive":return"circle-check";case"warning":return"triangle-warning";case"error":return"octagon-warning";default:return"circle-info"}}getActionButtonState(){return this.isSection&&"positive"===this.appearance?"success":"error"===this.appearance?"warning":void 0}getActionButtonVariant(){return this.isSection?"subtle":"error"===this.appearance?"primary":"subtle"}getAriaLabel(){return this.isSection?this.heading?.trim()||"Section banner":{information:"Information banner",positive:"Positive banner",warning:"Warning banner",error:"Error banner"}[this.appearance]}render(){const e=!!this.actionText?.trim(),i=!!this.secondaryActionText?.trim(),n=this.getActionButtonVariant(),a=this.getActionButtonState(),r=!!this.heading?.trim(),c=!!this.description?.trim();return t(s,{key:"3ec080a23996280ec5223f06f75db2f308c4af9e",class:{"xpl-banner":!0,"xpl-banner--section":this.isSection,[`xpl-banner--${this.appearance}`]:!0,"xpl-banner--truncate-desc":this.truncateDesc,"xpl-banner--no-icon":this.isSection&&!this.hasIcon},role:"region","aria-label":this.getAriaLabel()},(!this.isSection||this.hasIcon)&&t("div",{key:"b6a41b971e0a7f07aefa8bd457e39cd16dbaeb3b",class:"xpl-banner__icon","aria-hidden":"true"},t("xpl-icon",{key:"cefc593e0ab2134c4853e7e5e49be548d6b32a24",icon:this.getIcon(),size:24})),t("div",{key:"c26947f4579889550ce9d9edf272274c96981ff7",class:"xpl-banner__body"},r&&t("p",{key:"ccc03db846014aaa25b9938373108feae99150d3",class:"xpl-banner__heading"},this.heading),c&&t("p",{key:"14493ae4ebd31a9d2677b45f148d98c0b6a443e8",class:"xpl-banner__description",title:this.truncateDesc?this.description:void 0},this.description)),(e||i)&&t("div",{key:"37347b1eb78e4664498410a3e5918f26cb670725",class:"xpl-banner__actions"},e&&t("xpl-button",{key:"e84704a48a07fd2ca75252c8821f59084275975c",size:"xs",variant:n,state:a,onClick:()=>this.action.emit()},this.actionText),i&&t("xpl-button",{key:"e02ac8ed8b9c4146d6275262359a9d5d3e401e9c",size:"xs",variant:n,state:a,onClick:()=>this.secondaryAction.emit()},this.secondaryActionText)),this.isDismissible&&t("button",{key:"8f7c5451c1fcadd30915f59064738e42a1e72948",class:"xpl-banner__dismiss",type:"button","aria-label":`Dismiss ${this.isSection?"section ":""}banner`,onClick:()=>this.dismiss.emit()},t("xpl-icon",{key:"6775534525f9363551699f9efa879225d51363f4",icon:"xmark",size:24,"aria-hidden":"true"})))}};export{n as xpl_banner}
1
+ import{r as e,c as i,h as t,H as s}from"./p-CgJEmBQY.js";const n=class{constructor(t){e(this,t),this.action=i(this,"action",7),this.dismiss=i(this,"dismiss",7),this.secondaryAction=i(this,"secondaryAction",7),this.appearance="information",this.hasIcon=!0,this.isDismissible=!0,this.isSection=!1,this.truncateDesc=!1}getIcon(){switch(this.appearance){case"positive":return"circle-check";case"warning":return"triangle-warning";case"error":return"octagon-warning";default:return"circle-info"}}getActionButtonState(){return this.isSection&&"positive"===this.appearance?"success":"error"===this.appearance?"warning":void 0}getActionButtonVariant(){return this.isSection?"subtle":"error"===this.appearance?"primary":"subtle"}getAriaLabel(){return this.isSection?this.heading?.trim()||"Section banner":{information:"Information banner",positive:"Positive banner",warning:"Warning banner",error:"Error banner"}[this.appearance]}render(){const e=!!this.actionText?.trim(),i=!!this.secondaryActionText?.trim(),n=this.getActionButtonVariant(),a=this.getActionButtonState(),r=!!this.heading?.trim(),c=!!this.description?.trim();return t(s,{key:"3ec080a23996280ec5223f06f75db2f308c4af9e",class:{"xpl-banner":!0,"xpl-banner--section":this.isSection,[`xpl-banner--${this.appearance}`]:!0,"xpl-banner--truncate-desc":this.truncateDesc,"xpl-banner--no-icon":this.isSection&&!this.hasIcon},role:"region","aria-label":this.getAriaLabel()},(!this.isSection||this.hasIcon)&&t("div",{key:"b6a41b971e0a7f07aefa8bd457e39cd16dbaeb3b",class:"xpl-banner__icon","aria-hidden":"true"},t("xpl-icon",{key:"cefc593e0ab2134c4853e7e5e49be548d6b32a24",icon:this.getIcon(),size:24})),t("div",{key:"c26947f4579889550ce9d9edf272274c96981ff7",class:"xpl-banner__body"},r&&t("p",{key:"ccc03db846014aaa25b9938373108feae99150d3",class:"xpl-banner__heading"},this.heading),c&&t("p",{key:"14493ae4ebd31a9d2677b45f148d98c0b6a443e8",class:"xpl-banner__description",title:this.truncateDesc?this.description:void 0},this.description)),(e||i)&&t("div",{key:"37347b1eb78e4664498410a3e5918f26cb670725",class:"xpl-banner__actions"},e&&t("xpl-button",{key:"e84704a48a07fd2ca75252c8821f59084275975c",size:"xs",variant:n,state:a,onClick:()=>this.action.emit()},this.actionText),i&&t("xpl-button",{key:"e02ac8ed8b9c4146d6275262359a9d5d3e401e9c",size:"xs",variant:n,state:a,onClick:()=>this.secondaryAction.emit()},this.secondaryActionText)),this.isDismissible&&t("button",{key:"8f7c5451c1fcadd30915f59064738e42a1e72948",class:"xpl-banner__dismiss",type:"button","aria-label":`Dismiss ${this.isSection?"section ":""}banner`,onClick:()=>this.dismiss.emit()},t("xpl-icon",{key:"6775534525f9363551699f9efa879225d51363f4",icon:"xmark",size:24,"aria-hidden":"true"})))}};export{n as xpl_banner}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as e,g as a}from"./p-CJABLO_1.js";import{g as l,t as n,a as r}from"./p-BQtbf88X.js";const h=class{constructor(i){t(this,i),this.tabChange=s(this,"tabChange",7),this.badgeVariant="purple",this.disabled=!1,this.fullWidth=!1,this.groupDisabled=!1,this.iconPosition="start",this.selected=!1,this.variant="tabs",this.handleTabClick=()=>{this.effectivelyDisabled||this.tabChange.emit(this.target)}}async getFocusableElement(){return this.el.querySelector(this.isSegment?"xpl-button button":".xpl-tab__button")}async setTabIndex(t){const s=await this.getFocusableElement();s&&(s.tabIndex=t)}async focusTrigger(){const t=await this.getFocusableElement();t?.focus()}get a11yIds(){const t=l(this.el),s=this.target??"";return{panelId:r(t,s),triggerId:n(t,s)}}get effectivelyDisabled(){return this.disabled||this.groupDisabled}get isSegment(){return"segment"===this.variant}get hasBadge(){return null!=this.badge&&this.badge.length>0}renderBadge(){return this.hasBadge?i("xpl-badge",{class:"xpl-tab__badge",dotOnly:!0,variant:this.badgeVariant},this.badge):null}render(){const t=this.isSegment,{panelId:s,triggerId:a}=this.a11yIds,l=this.selected?"true":"false",n={"xpl-tab":!0,"xpl-tab--selected":this.selected,"xpl-tab--segment":t,"xpl-tab--disabled":this.effectivelyDisabled};if(t)return i(e,{class:n},i("xpl-button",{controlAttrs:{id:a,role:"tab","aria-controls":s,"aria-selected":l},disabled:this.effectivelyDisabled,fullWidth:this.fullWidth,icon:this.icon??"",iconPosition:this.iconPosition,onClick:this.handleTabClick,size:"sm",type:"button",variant:this.selected?"primary":"tertiary"},i("slot",null),this.renderBadge()));const r=this.icon?i("xpl-icon",{class:"xpl-tab__icon",icon:this.icon,size:16}):null;return i(e,{class:n},i("button",{"aria-controls":s,"aria-selected":l,class:"xpl-tab__button",disabled:this.effectivelyDisabled,id:a,onClick:this.handleTabClick,role:"tab",type:"button"},"start"===this.iconPosition?r:null,i("slot",null),"end"===this.iconPosition?r:null,this.renderBadge()))}get el(){return a(this)}};export{h as xpl_tab}
1
+ import{r as t,c as s,h as i,H as e,g as a}from"./p-CgJEmBQY.js";import{g as l,t as n,a as r}from"./p-BQtbf88X.js";const h=class{constructor(i){t(this,i),this.tabChange=s(this,"tabChange",7),this.badgeVariant="purple",this.disabled=!1,this.fullWidth=!1,this.groupDisabled=!1,this.iconPosition="start",this.selected=!1,this.variant="tabs",this.handleTabClick=()=>{this.effectivelyDisabled||this.tabChange.emit(this.target)}}async getFocusableElement(){return this.el.querySelector(this.isSegment?"xpl-button button":".xpl-tab__button")}async setTabIndex(t){const s=await this.getFocusableElement();s&&(s.tabIndex=t)}async focusTrigger(){const t=await this.getFocusableElement();t?.focus()}get a11yIds(){const t=l(this.el),s=this.target??"";return{panelId:r(t,s),triggerId:n(t,s)}}get effectivelyDisabled(){return this.disabled||this.groupDisabled}get isSegment(){return"segment"===this.variant}get hasBadge(){return null!=this.badge&&this.badge.length>0}renderBadge(){return this.hasBadge?i("xpl-badge",{class:"xpl-tab__badge",dotOnly:!0,variant:this.badgeVariant},this.badge):null}render(){const t=this.isSegment,{panelId:s,triggerId:a}=this.a11yIds,l=this.selected?"true":"false",n={"xpl-tab":!0,"xpl-tab--selected":this.selected,"xpl-tab--segment":t,"xpl-tab--disabled":this.effectivelyDisabled};if(t)return i(e,{class:n},i("xpl-button",{controlAttrs:{id:a,role:"tab","aria-controls":s,"aria-selected":l},disabled:this.effectivelyDisabled,fullWidth:this.fullWidth,icon:this.icon??"",iconPosition:this.iconPosition,onClick:this.handleTabClick,size:"sm",type:"button",variant:this.selected?"primary":"tertiary"},i("slot",null),this.renderBadge()));const r=this.icon?i("xpl-icon",{class:"xpl-tab__icon",icon:this.icon,size:16}):null;return i(e,{class:n},i("button",{"aria-controls":s,"aria-selected":l,class:"xpl-tab__button",disabled:this.effectivelyDisabled,id:a,onClick:this.handleTabClick,role:"tab",type:"button"},"start"===this.iconPosition?r:null,i("slot",null),"end"===this.iconPosition?r:null,this.renderBadge()))}get el(){return a(this)}};export{h as xpl_tab}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,F as e,H as h,g as n}from"./p-CJABLO_1.js";import{t as a}from"./p-CzwViN3U.js";import{i as l}from"./p-Dqb1pIRo.js";import{v as o}from"./p-CK3_k8jD.js";import"./p-BFTU3MAI.js";let c;function r(t){return t.label||t.value||""}function d(t){return t.value||t.label||""}function p(t){return t.flatMap((t=>t.groupName&&t.options?t.options:[t]))}const g=class{constructor(i){t(this,i),this.selectChange=s(this,"selectChange",7),this.changeEvent=s(this,"changeEvent",7),this.dropdownStateChange=s(this,"dropdownStateChange",7),this.triggerDropdown=s(this,"triggerDropdown",7),this.choices=[],this.selectIcon="chevron-down",this.dropdownPlacement="bottom-start",this.mode="single",this.truncate=!0,this.active=!1,this.id=o(),this.keepFocus=!1,this.visibleChoices=1/0,this.choicesState=[],this.value=this.calculateValue(),this.dropdownOpenState=!1,this.container=null,this.dropdown=null,this.handleResizeThrottled=a((()=>{this.maybeTruncateChoices()}),250),this.handleTabKeyDown=t=>{"Tab"===t.key&&(this.keepFocus=!0)},this.handleTagRemove=t=>{const s=s=>t?.value&&s.value===t.value||t?.label&&s.label===t.label;this.choicesState=this.choicesState.map((t=>({...t,isSelected:!s(t)&&t.isSelected,options:t.options?.map((t=>({...t,isSelected:!s(t)&&t.isSelected})))})))},this.handleDropdownScroll=t=>{const s=this.dropdown?.querySelector(".xpl-dropdown-list");if(!s)return;const{scrollTop:i,scrollHeight:e,clientHeight:h}=s;(0===i&&t.deltaY<0||i+h>=e&&t.deltaY>0)&&t.preventDefault()}}onChoicesPropChanged(t){this.choicesState=this.initializeChoicesState()}onSelectedValuesPropChanged(){this.choicesState=this.initializeChoicesState()}onChoicesStateChanged(){this.update()}handleValueStateChange(t){this.selectChange.emit(t),this.changeEvent.emit("single"===this.mode?t:t?.length?t.split("|"):[]),this.customDisplayValue&&null!==this.container&&(this.container.querySelectorAll(".custom-display-value").forEach((s=>{s.classList.toggle("display-active",t.length>0),s.classList.toggle("display-inactive",0===t.length)})),this.container.querySelectorAll(".placeholder").forEach((s=>{s.classList.toggle("placeholder-hidden",t.length>0)})))}onDropdownOpenStateChanged(t){this.dropdownStateChange.emit(t)}initializeChoicesState(){return(this.choices??[]).map((t=>{const s="string"==typeof this.selectedValues?[this.selectedValues]:this.selectedValues;return{...t,isSelected:t.isSelected||!0===s?.includes(d(t)),options:t.options?.map((t=>({...t,isSelected:t.isSelected||!0===s?.includes(d(t))})))}}))}maybeTruncateChoices(){if(!l())return;if("single"===this.mode||!this.truncate)return;const t=this.container?.getBoundingClientRect().width;let s=0,i=0;const e=p(this.choicesState)?.filter((t=>t.isSelected));if(!e.length)return;const h=e.length;e.forEach(((h,n)=>(i+=function(t){const s=l()?(void 0===c&&(c=document.createElement("canvas").getContext("2d"),c&&(c.font="14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif")),c):null;return s?s.measureText(t).width+50:0}(r(e[n])),i>(t??0)-140||(s+=1),null))),s>=h&&(s=1/0),s<1&&(s=1),this.visibleChoices=s}closeDropdown(){this.dropdown?.isOpen&&(this.dropdown.isOpen=!1,this.active=!1)}calculateValue(){const t=p(this.choicesState).filter((t=>t.isSelected));return t.length?"single"===this.mode?d(t[0]):t.map((t=>d(t))).join("|"):""}update(){this.value=this.calculateValue(),this.maybeTruncateChoices()}renderLabel(){return this.label||this.description?i("label",{class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},this.label,this.description&&i("small",{class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)):null}renderSelectedTags(){let t=0;const s=p(this.choicesState).filter((t=>t.isSelected));return s.length?s.map(((e,h)=>t>=this.visibleChoices?null:(t+=1,i("xpl-tag",{disabled:this.disabled,onClose:()=>this.handleTagRemove(s[h])},r(s[h]))))):null}renderError(){return this.error?i("label",{class:"xpl-input-error",htmlFor:this.id},i("xpl-icon",{icon:"circle-warning"}),this.error):null}componentWillLoad(){this.choicesState=this.initializeChoicesState()}handleClickEvent(t){const s=t.target.closest(".xpl-select");null!==s&&s===this.container||this.closeDropdown()}handleKeyDown(t){"Escape"===t.key&&(this.active||this.container?.contains(document.activeElement))&&this.closeDropdown()}handleResize(){this.handleResizeThrottled()}componentDidLoad(){void 0!==this.truncateRafId&&cancelAnimationFrame(this.truncateRafId),this.truncateRafId=requestAnimationFrame((()=>{this.truncateRafId=void 0,this.maybeTruncateChoices()}))}disconnectedCallback(){this.handleResizeThrottled?.cancel(),void 0!==this.truncateRafId&&(cancelAnimationFrame(this.truncateRafId),this.truncateRafId=void 0)}handleDropdownTrigger(){if(this.disabled)return;const t=this.dropdown?.isOpen??!1,s=!t;this.triggerDropdown.emit({prevState:t,nextState:s}).defaultPrevented||(this.dropdownOpenState=s,this.dropdown&&(this.dropdown.isOpen=s))}async reset(){this.closeDropdown(),this.choicesState=this.choicesState.map((t=>({...t,isSelected:!1,options:t.options?.map((t=>({...t,isSelected:!1})))})))}render(){const t=p(this.choicesState).filter((t=>t.isSelected)),s=t[0]?.label||t[0]?.value,n=t.length>1&&this.visibleChoices<1/0&&this.truncate&&!this.customDisplayValue,a=`+ ${Math.abs(this.choicesState.filter((t=>t.isSelected)).length-this.visibleChoices)} more`;return i(h,{key:"b28e9dbd835634f20311d80b0793c722bb516d10",class:{"xpl-select":!0,"xpl-select--disabled":!!this.disabled,"xpl-select--no-truncate":!this.truncate,[this.classNames??""]:!!this.classNames},onKeyDown:this.handleTabKeyDown,ref:t=>{this.container=t}},this.renderLabel(),i("div",{key:"9becbbb7cc7ad5f36912adb9b2bafbfbd200729c",class:{"xpl-input":!0,"xpl-input--disabled":!!this.disabled,"xpl-input--error":void 0!==this.error}},i("div",{key:"725575d6e2ebde606deb2efa6d135cd93a358c6f",class:"xpl-input-wrapper"},i("button",{key:"e7c3d24ce1366bbb42817eb1627b89dfc9b7f669",class:"xpl-select__trigger",disabled:this.disabled,id:this.id,onKeyDown:this.handleTabKeyDown,onClick:t=>{t.preventDefault(),this.handleDropdownTrigger()},type:"button"},i("div",{key:"b32057bdf81dfb44a89a15a596e35efe9b1c56fb",class:{"xpl-select-value":!0,"xpl-select-value--active":"multi"===this.mode&&this.value.length>0,"has-value":this.value.length>0}},(()=>this.customDisplayValue?i(e,null,i("div",{class:{"custom-display-value":!0,"custom-display-value--inactive":0===this.value.length}},i("slot",{name:"custom-display-value"})),i("span",{class:{"xpl-placeholder--hidden":this.value.length>0}},this.placeholder)):"single"===this.mode?s||this.placeholder:this.value.length>0?this.renderSelectedTags():this.placeholder)(),n&&a),i("xpl-icon",{key:"f552cedcb15ff028a763ef6e8b5ee30f7a4e6720",class:"xpl-select__chevron-down",icon:this.selectIcon??"chevron-down"}))),!this.disabled&&i("xpl-dropdown",{key:"ef09a2f9fabb75050e0e69c1bc375b64d6584429",ref:t=>{this.dropdown=t??null},isOpen:this.dropdownOpenState,options:this.choicesState,selectedValues:this.selectedValues,mode:this.mode,triggerId:this.id,update:(t,{component:s})=>{const{options:i}=s;i&&i.length>0&&(this.choicesState=i)},onIsOpenChange:t=>{this.dropdownOpenState=t.detail},onWheel:this.handleDropdownScroll,anchorToTrigger:!0,flipFallbackPlacements:this.dropdownFlipFallbackPlacements,placement:this.dropdownPlacement}),this.renderError()),i("input",{key:"3963614dbc087fe3a10d44ab4554046755a581d2",type:"hidden",name:this.name,value:this.value}))}static get watchers(){return{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}}},u=class{constructor(i){t(this,i),this.close=s(this,"close",7),this.tagDragEnd=s(this,"tagDragEnd",7),this.tagDragStart=s(this,"tagDragStart",7),this.tagRemove=s(this,"tagRemove",7),this.dismissAriaLabelSuffix="tag",this.isDragging=!1,this.disabled=!1,this.dismissible=!0,this.isDraggable=!1,this.size="default",this.handleTagClick=()=>{this.disabled||this.isDraggable||this.close.emit()},this.setDragPreviewToHost=t=>{if(t.dataTransfer)try{const s=this.el.getBoundingClientRect(),i=Math.max(0,t.clientX-s.left),e=Math.max(0,t.clientY-s.top);t.dataTransfer.setDragImage(this.el,i,e)}catch{}},this.handleContentKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||t.preventDefault()},this.handleDismissClick=t=>{t.stopPropagation(),this.disabled||(this.close.emit(),this.tagRemove.emit())},this.handleDragStart=t=>{this.isDragging=!0,t.dataTransfer&&(t.dataTransfer.effectAllowed="move",this.setDragPreviewToHost(t),this.tagId&&t.dataTransfer.setData("application/x-tag-id",this.tagId),t.dataTransfer.setData("text/plain",this.getContentLabelText())),this.tagDragStart.emit({tagId:this.tagId,content:this.getContentLabelText(),originalEvent:t})},this.handleDragEnd=t=>{this.isDragging=!1,this.tagDragEnd.emit({tagId:this.tagId,dropped:"move"===t.dataTransfer?.dropEffect,originalEvent:t})},this.handleDragOver=t=>{!this.disabled&&this.isDraggable&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"))},this.handleDragEnter=t=>{!this.disabled&&this.isDraggable&&t.preventDefault()},this.handleHostDragStart=t=>{t.target===this.el&&this.isDraggable&&t.preventDefault()}}onDisabledChange(t){t&&this.isDragging&&(this.isDragging=!1)}onIsDraggableChange(t){!t&&this.isDragging&&(this.isDragging=!1)}componentDidRender(){queueMicrotask((()=>this.syncDismissAriaLabelSuffix()))}getContentLabelText(){return(this.el.querySelector(".xpl-tag__content")?.textContent??"").trim()}syncDismissAriaLabelSuffix(){if(!this.el.isConnected)return;const t=this.getContentLabelText(),s=""===t?"tag":t;s!==this.dismissAriaLabelSuffix&&(this.dismissAriaLabelSuffix=s)}render(){const t=this.isDraggable&&!this.disabled;return i(h,{key:"bc92bc270f366844ffba7cce7d126a033c80d751",class:{"xpl-tag":!0,"xpl-tag-container":!0,"xpl-tag--disabled":this.disabled,"xpl-tag--dismissible":this.dismissible,"xpl-tag--dragging":this.isDragging,"xpl-tag--draggable":t,"xpl-tag--sm":"sm"===this.size},onDragOver:t?this.handleDragOver:void 0,onDragEnter:t?this.handleDragEnter:void 0,onDragStart:this.isDraggable?this.handleHostDragStart:void 0},t?i("div",{class:"xpl-tag__content xpl-tag",role:"button",tabIndex:0,draggable:!0,"aria-grabbed":String(this.isDragging),onClick:this.handleTagClick,onKeyDown:this.handleContentKeyDown,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd},i("slot",null)):i("button",{class:"xpl-tag__content xpl-tag",type:"button",disabled:this.disabled,onClick:this.handleTagClick},i("slot",null)),this.dismissible&&i("button",{key:"8826de6d590d5eea611c4cc406293c94d61593b2",class:"xpl-tag__dismiss xpl-tag__close",type:"button",draggable:!1,disabled:this.disabled,"aria-label":`Dismiss ${this.dismissAriaLabelSuffix}`,onClick:this.handleDismissClick},i("xpl-icon",{key:"b8e6763f53f23444b993c9331616e4cbb1440526",icon:"xmark",size:10})))}get el(){return n(this)}static get watchers(){return{disabled:[{onDisabledChange:0}],isDraggable:[{onIsDraggableChange:0}]}}};export{g as xpl_select,u as xpl_tag}
1
+ import{r as t,c as s,h as i,F as e,H as h,g as n}from"./p-CgJEmBQY.js";import{t as a}from"./p-CzwViN3U.js";import{i as l}from"./p-Dqb1pIRo.js";import{v as o}from"./p-CK3_k8jD.js";import"./p-BFTU3MAI.js";let c;function r(t){return t.label||t.value||""}function d(t){return t.value||t.label||""}function p(t){return t.flatMap((t=>t.groupName&&t.options?t.options:[t]))}const g=class{constructor(i){t(this,i),this.selectChange=s(this,"selectChange",7),this.changeEvent=s(this,"changeEvent",7),this.dropdownStateChange=s(this,"dropdownStateChange",7),this.triggerDropdown=s(this,"triggerDropdown",7),this.choices=[],this.selectIcon="chevron-down",this.dropdownPlacement="bottom-start",this.mode="single",this.truncate=!0,this.active=!1,this.id=o(),this.keepFocus=!1,this.visibleChoices=1/0,this.choicesState=[],this.value=this.calculateValue(),this.dropdownOpenState=!1,this.container=null,this.dropdown=null,this.handleResizeThrottled=a((()=>{this.maybeTruncateChoices()}),250),this.handleTabKeyDown=t=>{"Tab"===t.key&&(this.keepFocus=!0)},this.handleTagRemove=t=>{const s=s=>t?.value&&s.value===t.value||t?.label&&s.label===t.label;this.choicesState=this.choicesState.map((t=>({...t,isSelected:!s(t)&&t.isSelected,options:t.options?.map((t=>({...t,isSelected:!s(t)&&t.isSelected})))})))},this.handleDropdownScroll=t=>{const s=this.dropdown?.querySelector(".xpl-dropdown-list");if(!s)return;const{scrollTop:i,scrollHeight:e,clientHeight:h}=s;(0===i&&t.deltaY<0||i+h>=e&&t.deltaY>0)&&t.preventDefault()}}onChoicesPropChanged(t){this.choicesState=this.initializeChoicesState()}onSelectedValuesPropChanged(){this.choicesState=this.initializeChoicesState()}onChoicesStateChanged(){this.update()}handleValueStateChange(t){this.selectChange.emit(t),this.changeEvent.emit("single"===this.mode?t:t?.length?t.split("|"):[]),this.customDisplayValue&&null!==this.container&&(this.container.querySelectorAll(".custom-display-value").forEach((s=>{s.classList.toggle("display-active",t.length>0),s.classList.toggle("display-inactive",0===t.length)})),this.container.querySelectorAll(".placeholder").forEach((s=>{s.classList.toggle("placeholder-hidden",t.length>0)})))}onDropdownOpenStateChanged(t){this.dropdownStateChange.emit(t)}initializeChoicesState(){return(this.choices??[]).map((t=>{const s="string"==typeof this.selectedValues?[this.selectedValues]:this.selectedValues;return{...t,isSelected:t.isSelected||!0===s?.includes(d(t)),options:t.options?.map((t=>({...t,isSelected:t.isSelected||!0===s?.includes(d(t))})))}}))}maybeTruncateChoices(){if(!l())return;if("single"===this.mode||!this.truncate)return;const t=this.container?.getBoundingClientRect().width;let s=0,i=0;const e=p(this.choicesState)?.filter((t=>t.isSelected));if(!e.length)return;const h=e.length;e.forEach(((h,n)=>(i+=function(t){const s=l()?(void 0===c&&(c=document.createElement("canvas").getContext("2d"),c&&(c.font="14px apple-system, system-ui, 'Segoe UI', Arial, Helvetica, Roboto, sans-serif")),c):null;return s?s.measureText(t).width+50:0}(r(e[n])),i>(t??0)-140||(s+=1),null))),s>=h&&(s=1/0),s<1&&(s=1),this.visibleChoices=s}closeDropdown(){this.dropdown?.isOpen&&(this.dropdown.isOpen=!1,this.active=!1)}calculateValue(){const t=p(this.choicesState).filter((t=>t.isSelected));return t.length?"single"===this.mode?d(t[0]):t.map((t=>d(t))).join("|"):""}update(){this.value=this.calculateValue(),this.maybeTruncateChoices()}renderLabel(){return this.label||this.description?i("label",{class:{"xpl-label":!0,"xpl-label--disabled":!!this.disabled},htmlFor:this.id},this.label,this.description&&i("small",{class:{"xpl-description":!0,"xpl-description--disabled":!!this.disabled}},this.description)):null}renderSelectedTags(){let t=0;const s=p(this.choicesState).filter((t=>t.isSelected));return s.length?s.map(((e,h)=>t>=this.visibleChoices?null:(t+=1,i("xpl-tag",{disabled:this.disabled,onClose:()=>this.handleTagRemove(s[h])},r(s[h]))))):null}renderError(){return this.error?i("label",{class:"xpl-input-error",htmlFor:this.id},i("xpl-icon",{icon:"circle-warning"}),this.error):null}componentWillLoad(){this.choicesState=this.initializeChoicesState()}handleClickEvent(t){const s=t.target.closest(".xpl-select");null!==s&&s===this.container||this.closeDropdown()}handleKeyDown(t){"Escape"===t.key&&(this.active||this.container?.contains(document.activeElement))&&this.closeDropdown()}handleResize(){this.handleResizeThrottled()}componentDidLoad(){void 0!==this.truncateRafId&&cancelAnimationFrame(this.truncateRafId),this.truncateRafId=requestAnimationFrame((()=>{this.truncateRafId=void 0,this.maybeTruncateChoices()}))}disconnectedCallback(){this.handleResizeThrottled?.cancel(),void 0!==this.truncateRafId&&(cancelAnimationFrame(this.truncateRafId),this.truncateRafId=void 0)}handleDropdownTrigger(){if(this.disabled)return;const t=this.dropdown?.isOpen??!1,s=!t;this.triggerDropdown.emit({prevState:t,nextState:s}).defaultPrevented||(this.dropdownOpenState=s,this.dropdown&&(this.dropdown.isOpen=s))}async reset(){this.closeDropdown(),this.choicesState=this.choicesState.map((t=>({...t,isSelected:!1,options:t.options?.map((t=>({...t,isSelected:!1})))})))}render(){const t=p(this.choicesState).filter((t=>t.isSelected)),s=t[0]?.label||t[0]?.value,n=t.length>1&&this.visibleChoices<1/0&&this.truncate&&!this.customDisplayValue,a=`+ ${Math.abs(this.choicesState.filter((t=>t.isSelected)).length-this.visibleChoices)} more`;return i(h,{key:"b28e9dbd835634f20311d80b0793c722bb516d10",class:{"xpl-select":!0,"xpl-select--disabled":!!this.disabled,"xpl-select--no-truncate":!this.truncate,[this.classNames??""]:!!this.classNames},onKeyDown:this.handleTabKeyDown,ref:t=>{this.container=t}},this.renderLabel(),i("div",{key:"9becbbb7cc7ad5f36912adb9b2bafbfbd200729c",class:{"xpl-input":!0,"xpl-input--disabled":!!this.disabled,"xpl-input--error":void 0!==this.error}},i("div",{key:"725575d6e2ebde606deb2efa6d135cd93a358c6f",class:"xpl-input-wrapper"},i("button",{key:"e7c3d24ce1366bbb42817eb1627b89dfc9b7f669",class:"xpl-select__trigger",disabled:this.disabled,id:this.id,onKeyDown:this.handleTabKeyDown,onClick:t=>{t.preventDefault(),this.handleDropdownTrigger()},type:"button"},i("div",{key:"b32057bdf81dfb44a89a15a596e35efe9b1c56fb",class:{"xpl-select-value":!0,"xpl-select-value--active":"multi"===this.mode&&this.value.length>0,"has-value":this.value.length>0}},(()=>this.customDisplayValue?i(e,null,i("div",{class:{"custom-display-value":!0,"custom-display-value--inactive":0===this.value.length}},i("slot",{name:"custom-display-value"})),i("span",{class:{"xpl-placeholder--hidden":this.value.length>0}},this.placeholder)):"single"===this.mode?s||this.placeholder:this.value.length>0?this.renderSelectedTags():this.placeholder)(),n&&a),i("xpl-icon",{key:"f552cedcb15ff028a763ef6e8b5ee30f7a4e6720",class:"xpl-select__chevron-down",icon:this.selectIcon??"chevron-down"}))),!this.disabled&&i("xpl-dropdown",{key:"ef09a2f9fabb75050e0e69c1bc375b64d6584429",ref:t=>{this.dropdown=t??null},isOpen:this.dropdownOpenState,options:this.choicesState,selectedValues:this.selectedValues,mode:this.mode,triggerId:this.id,update:(t,{component:s})=>{const{options:i}=s;i&&i.length>0&&(this.choicesState=i)},onIsOpenChange:t=>{this.dropdownOpenState=t.detail},onWheel:this.handleDropdownScroll,anchorToTrigger:!0,flipFallbackPlacements:this.dropdownFlipFallbackPlacements,placement:this.dropdownPlacement}),this.renderError()),i("input",{key:"3963614dbc087fe3a10d44ab4554046755a581d2",type:"hidden",name:this.name,value:this.value}))}static get watchers(){return{choices:[{onChoicesPropChanged:0}],selectedValues:[{onSelectedValuesPropChanged:0}],choicesState:[{onChoicesStateChanged:0}],value:[{handleValueStateChange:0}],dropdownOpenState:[{onDropdownOpenStateChanged:0}]}}},u=class{constructor(i){t(this,i),this.close=s(this,"close",7),this.tagDragEnd=s(this,"tagDragEnd",7),this.tagDragStart=s(this,"tagDragStart",7),this.tagRemove=s(this,"tagRemove",7),this.dismissAriaLabelSuffix="tag",this.isDragging=!1,this.disabled=!1,this.dismissible=!0,this.isDraggable=!1,this.size="default",this.handleTagClick=()=>{this.disabled||this.isDraggable||this.close.emit()},this.setDragPreviewToHost=t=>{if(t.dataTransfer)try{const s=this.el.getBoundingClientRect(),i=Math.max(0,t.clientX-s.left),e=Math.max(0,t.clientY-s.top);t.dataTransfer.setDragImage(this.el,i,e)}catch{}},this.handleContentKeyDown=t=>{this.disabled||"Enter"!==t.key&&" "!==t.key||t.preventDefault()},this.handleDismissClick=t=>{t.stopPropagation(),this.disabled||(this.close.emit(),this.tagRemove.emit())},this.handleDragStart=t=>{this.isDragging=!0,t.dataTransfer&&(t.dataTransfer.effectAllowed="move",this.setDragPreviewToHost(t),this.tagId&&t.dataTransfer.setData("application/x-tag-id",this.tagId),t.dataTransfer.setData("text/plain",this.getContentLabelText())),this.tagDragStart.emit({tagId:this.tagId,content:this.getContentLabelText(),originalEvent:t})},this.handleDragEnd=t=>{this.isDragging=!1,this.tagDragEnd.emit({tagId:this.tagId,dropped:"move"===t.dataTransfer?.dropEffect,originalEvent:t})},this.handleDragOver=t=>{!this.disabled&&this.isDraggable&&(t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"))},this.handleDragEnter=t=>{!this.disabled&&this.isDraggable&&t.preventDefault()},this.handleHostDragStart=t=>{t.target===this.el&&this.isDraggable&&t.preventDefault()}}onDisabledChange(t){t&&this.isDragging&&(this.isDragging=!1)}onIsDraggableChange(t){!t&&this.isDragging&&(this.isDragging=!1)}componentDidRender(){queueMicrotask((()=>this.syncDismissAriaLabelSuffix()))}getContentLabelText(){return(this.el.querySelector(".xpl-tag__content")?.textContent??"").trim()}syncDismissAriaLabelSuffix(){if(!this.el.isConnected)return;const t=this.getContentLabelText(),s=""===t?"tag":t;s!==this.dismissAriaLabelSuffix&&(this.dismissAriaLabelSuffix=s)}render(){const t=this.isDraggable&&!this.disabled;return i(h,{key:"bc92bc270f366844ffba7cce7d126a033c80d751",class:{"xpl-tag":!0,"xpl-tag-container":!0,"xpl-tag--disabled":this.disabled,"xpl-tag--dismissible":this.dismissible,"xpl-tag--dragging":this.isDragging,"xpl-tag--draggable":t,"xpl-tag--sm":"sm"===this.size},onDragOver:t?this.handleDragOver:void 0,onDragEnter:t?this.handleDragEnter:void 0,onDragStart:this.isDraggable?this.handleHostDragStart:void 0},t?i("div",{class:"xpl-tag__content xpl-tag",role:"button",tabIndex:0,draggable:!0,"aria-grabbed":String(this.isDragging),onClick:this.handleTagClick,onKeyDown:this.handleContentKeyDown,onDragStart:this.handleDragStart,onDragEnd:this.handleDragEnd},i("slot",null)):i("button",{class:"xpl-tag__content xpl-tag",type:"button",disabled:this.disabled,onClick:this.handleTagClick},i("slot",null)),this.dismissible&&i("button",{key:"8826de6d590d5eea611c4cc406293c94d61593b2",class:"xpl-tag__dismiss xpl-tag__close",type:"button",draggable:!1,disabled:this.disabled,"aria-label":`Dismiss ${this.dismissAriaLabelSuffix}`,onClick:this.handleDismissClick},i("xpl-icon",{key:"b8e6763f53f23444b993c9331616e4cbb1440526",icon:"xmark",size:10})))}get el(){return n(this)}static get watchers(){return{disabled:[{onDisabledChange:0}],isDraggable:[{onIsDraggableChange:0}]}}};export{g as xpl_select,u as xpl_tag}
@@ -0,0 +1,3 @@
1
+ var t=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(t||{}),n=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(n||{}),e="type",o="value",l="serialized:";function s(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var r=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=s(Object.getPrototypeOf(t),e,!0)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(e)?t[e]=n.l.get(e):void 0!==o&&(t[e]=o)}}))},i=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&r(t,n))},u=(t,n)=>n in t,f=(t,n)=>(0,console.error)(t,n),a=new Map,d=new Map,v="s-id",p="c-id",$="http://www.w3.org/1999/xlink",h="undefined"!=typeof window?window:{},m={u:0,v:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},b=t=>Promise.resolve(t),y=!1,g=[],w=[],j=()=>{var t;return(null==(t=h.document)?void 0:t.hidden)?S(N):m.raf(N)},O=(t,n)=>e=>{t.push(e),y||(y=!0,n&&4&m.u?S(N):j())},k=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){f(t)}t.length=0},N=()=>{k(g),k(w),(y=g.length>0)&&j()},S=t=>b().then(t),x=O(w,!0),E=t=>{const n=A(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&M(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!I(t,C(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&A(t,"childNodes").length&&E(t)}};function M(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||C(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...M(A(o,"childNodes"),n,e)]}return s}var I=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)C(l)!==n||!e&&l["s-sr"]||o.push(l);return o},L=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,T=(t,n,e,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,r=A(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=A(s,"childNodes"),n=[l];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>r.call(s,t)))}else r.call(s,l);t["s-ol"]=l,t["s-sh"]=n["s-hn"]},C=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function R(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===C(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}function A(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var F=new WeakMap,D=t=>"sc-"+t.p,P=t=>"object"==(t=typeof t)||"function"===t,U=(t,n,...e)=>{let o=null,l=null,s=null,r=!1,i=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)if(o=n[e],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(r="function"!=typeof t&&!P(o))o+="";else if("function"!=typeof t&&void 0===o.u){f("Invalid vNode child");continue}r&&i?c[c.length-1].$+=o:c.push(r?V(null,o):o),i=r}};if(u(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,H);const a=V(t,null);return a.h=n,c.length>0&&(a.m=c),a.j=l,a.O=s,a},V=(t,n)=>({u:0,k:t,$:null!=n?n:null,N:null,m:null,h:null,j:null,O:null}),B={},H={forEach:(t,n)=>t.map(_).forEach(n),map:(t,n)=>t.map(_).map(n).map(z)},_=t=>({vattrs:t.h,vchildren:t.m,vkey:t.j,vname:t.O,vtag:t.k,vtext:t.$}),z=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),U(t.vtag,n,...t.vchildren||[])}const n=V(t.vtag,t.vtext);return n.h=t.vattrs,n.m=t.vchildren,n.j=t.vkey,n.O=t.vname,n},W=(t,n,e,o,l,s,r,i=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(p),c&&(u=c.split("."),u[0]===r||"0"===u[0])){f=Y({u:0,S:u[0],M:u[1],I:u[2],L:u[3],k:s.tagName.toLowerCase(),N:s,h:{class:s.className||""}}),n.push(f),s.removeAttribute(p),t.m||(t.m=[]);const o=f.N.getAttribute("s-sn");"string"==typeof o&&("slot-fb"===f.k&&G(o,u[2],f,s,t,n,e,0,i),f.N["s-sn"]=o,f.N.removeAttribute("s-sn")),void 0!==f.L&&(t.m[f.L]=f),t=f}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)W(t,n,e,o,l,s.shadowRoot.childNodes[a],r,i);const d=s.__childNodes||s.childNodes;for(a=d.length-1;a>=0;a--)W(t,n,e,o,l,d[a],r,i)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===r||"0"===u[1])&&(c=u[0],f=Y({S:u[1],M:u[2],I:u[3],L:u[4]||"0",N:s,h:null,m:null,j:null,O:null,k:null,$:null}),"t"===c?(f.N=Z(s,3),f.N&&3===f.N.nodeType&&(f.$=f.N.textContent,n.push(f),s.remove(),r===f.S&&(t.m||(t.m=[]),t.m[f.L]=f))):"c"===c?(f.N=Z(s,8),f.N&&8===f.N.nodeType&&(n.push(f),s.remove())):f.S===r&&("s"===c?G(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,0,i):"r"===c&&(l["s-cr"]=s,s["s-cn"]=!0)));else if(t&&"style"===t.k){const n=V(null,s.textContent);n.N=s,n.L="0",t.m=[n]}return t},q=(t,n)=>{if(1===t.nodeType){const e=t[v]||t.getAttribute(v);e&&n.set(e,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)q(t.shadowRoot.childNodes[o],n);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)q(l[o],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},Y=t=>({u:0,S:null,M:null,I:null,L:"0",N:null,h:null,m:null,j:null,O:null,k:null,$:null,...t});function G(t,n,e,o,l,s,r,i,c){o["s-sr"]=!0,e.O=t||null,e.k="slot";const u=(null==l?void 0:l.N)?l.N["s-id"]||l.N.getAttribute("s-id"):"";{const s=e.N,r=u&&u!==e.S&&l.N.shadowRoot;J(c,n,t,o,r?u:e.S),R(o),r&&l.N.insertBefore(s,l.N.children[0])}s.push(e),r.push(e),l.m||(l.m=[]),l.m[e.L]=e}var J=(t,n,e,o,l)=>{var s,r;let i=o.nextSibling;if(t[n]=t[n]||[],i&&!(null==(s=i.nodeValue)?void 0:s.startsWith("s.")))do{!i||(i.getAttribute&&i.getAttribute("slot")||i["s-sn"])!==e&&(""!==e||i["s-sn"]||i.getAttribute&&i.getAttribute("slot")||8!==i.nodeType&&3!==i.nodeType)||(i["s-sn"]=e,t[n].push({slot:o,node:i,hostId:l})),i=null==i?void 0:i.nextSibling}while(i&&!(null==(r=i.nodeValue)?void 0:r.startsWith("s.")))},Z=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},K=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},Q=class l{static fromLocalValue(t){const n=t[e],s=o in t?t[o]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((t=>l.fromLocalValue(t)));case"date":return new Date(s);case"map":const t=new Map;for(const[n,e]of s){const o="object"==typeof n&&null!==n?l.fromLocalValue(n):n,s=l.fromLocalValue(e);t.set(o,s)}return t;case"object":const e={};for(const[t,n]of s)e[t]=l.fromLocalValue(n);return e;case"regexp":const{pattern:o,flags:r}=s;return RegExp(o,r);case"set":const i=new Set;for(const t of s)i.add(l.fromLocalValue(t));return i;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(t){return t.map((t=>l.fromLocalValue(t)))}static isLocalValueObject(l){if("object"!=typeof l||null===l)return!1;if(!l.hasOwnProperty(e))return!1;const s=l[e];return!!Object.values({...t,...n}).includes(s)&&("null"===s||"undefined"===s||l.hasOwnProperty(o))}};var X,tt,nt=(t,n)=>"string"==typeof t&&t.startsWith(l)?t=function(t){return"string"==typeof t&&t.startsWith(l)?Q.fromLocalValue(JSON.parse(function(t){const n=atob(t),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return(new TextDecoder).decode(e)}(t.slice(11)))):t}(t):null==t||P(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?t+"":t,et=t=>{var n;return null==(n=i(t))?void 0:n.$hostElement$},ot=(t,n,e)=>{const o=et(t);return{emit:t=>lt(o,n,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:t})}},lt=(t,n,e)=>{const o=m.ce(n,e);return t.dispatchEvent(o),o},st=(t,n,e,o,l,s,r)=>{if(e===o)return;let c=u(t,n),f=n.toLowerCase();if("class"===n){const n=t.classList,l=ut(e);let s=ut(o);if((t["s-si"]||t["s-sc"])&&r){const e=t["s-sc"]||t["s-si"];s.push(e),l.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...l.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===n){for(const n in e)o&&null!=o[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in o)e&&o[n]===e[n]||(n.includes("-")?t.style.setProperty(n,o[n]):t.style[n]=o[n])}else if("key"===n);else if("ref"===n)o&&Lt(o,t);else if(c||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let l;{const n=i(t);if(n&&n.o&&n.o.t){const t=n.o.t[e];t&&t[1]&&(l=t[1])}}return l||(l=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===o?"":o))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=o}catch(t){}return}{const r=P(o);if((c||r&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[n]!==o&&(t[n]=o);else{const l=null==o?"":o;"list"===n?c=!1:null!=e&&t[n]===l||("function"==typeof t.__lookupSetter__(n)?t[n]=l:t.setAttribute(n,l))}}catch(t){}let i=!1;f!==(f=f.replace(/^xlink\:?/,""))&&(n=f,i=!0),null==o||!1===o?(!1!==o||""===t.getAttribute(n)||4&s&&!it(n))&&(i?t.removeAttributeNS($,n):t.removeAttribute(n)):(!c||4&s||l)&&!r&&1===t.nodeType&&(o=!0===o?"":o,i?t.setAttributeNS($,n,o):t.setAttribute(n,o))}}else if(n="-"===n[2]?n.slice(3):u(h,f)?f.slice(2):f[2]+n.slice(3),e||o){const l=n.endsWith(ft);n=n.replace(at,""),e&&m.rel(t,n,e,l),o&&m.ael(t,n,o,l)}},rt=new Set(["draggable","contenteditable","spellcheck"]),it=t=>rt.has(t)||t.startsWith("aria-"),ct=/\s/,ut=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(ct):[]),ft="Capture",at=RegExp(ft+"$"),dt=(t,n,e,o)=>{const l=11===n.N.nodeType&&n.N.host?n.N.host:n.N,s=t&&t.h||{},r=n.h||{};for(const t of vt(Object.keys(s)))t in r||st(l,t,s[t],void 0,e,n.u,o);for(const t of vt(Object.keys(r)))st(l,t,s[t],r[t],e,n.u,o)};function vt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var pt=!1,$t=!1,ht=!1,mt=!1,bt=[],yt=[],gt=(t,n,e)=>{var o;const l=n.m[e];let s,r,i,c=0;if(pt||(ht=!0,"slot"===l.k&&(l.u|=l.m?2:1)),null!=l.$)s=l.N=h.document.createTextNode(l.$);else if(1&l.u)s=l.N=h.document.createTextNode(""),dt(null,l,mt);else{if(mt||(mt="svg"===l.k),!h.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.N=h.document.createElementNS(mt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!pt&&2&l.u?"slot-fb":l.k),mt&&"foreignObject"===l.k&&(mt=!1),dt(null,l,mt),l.m){const n="template"===l.k?s.content:s;for(c=0;c<l.m.length;++c)r=gt(t,l,c),r&&n.appendChild(r)}"svg"===l.k?mt=!1:"foreignObject"===s.tagName&&(mt=!0)}return s["s-hn"]=tt,3&l.u&&(s["s-sr"]=!0,s["s-cr"]=X,s["s-sn"]=l.O||"",s["s-rf"]=null==(o=l.h)?void 0:o.ref,R(s),i=t&&t.m&&t.m[e],i&&i.k===l.k&&t.N&&wt(t.N)),s},wt=t=>{m.u|=1;const n=t.closest(tt.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(Tt(n,t,null!=e?e:null),t["s-sh"]=void 0,ht=!0)}m.u&=-2},jt=(t,n)=>{m.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===tt&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==tt&&o["s-ol"]&&(Tt(St(o).parentNode,o,St(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,ht=!0),n&&jt(o,n)}m.u&=-2},Ot=(t,n,e,o,l,s)=>{let r,i=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.k&&(i=i.content);l<=s;++l)o[l]&&(r=gt(null,e,l),r&&(o[l].N=r,Tt(i,r,St(n))))},kt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.N;It(n),t&&($t=!0,t["s-ol"]?t["s-ol"].remove():jt(t,!0),t.remove())}}},Nt=(t,n,e=!1)=>t.k===n.k&&("slot"===t.k?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),St=t=>t&&t["s-ol"]||t,xt=(t,n,e=!1)=>{const o=n.N=t.N,l=t.m,s=n.m,r=n.k,i=n.$;let c;null==i?(mt="svg"===r||"foreignObject"!==r&&mt,"slot"!==r||pt||t.O!==n.O&&(n.N["s-sn"]=n.O||"",wt(n.N.parentElement)),dt(t,n,mt,e),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,r,i=0,c=0,u=0,f=0,a=n.length-1,d=n[0],v=n[a],p=o.length-1,$=o[0],h=o[p];const m="template"===e.k?t.content:t;for(;i<=a&&c<=p;)if(null==d)d=n[++i];else if(null==v)v=n[--a];else if(null==$)$=o[++c];else if(null==h)h=o[--p];else if(Nt(d,$,l))xt(d,$,l),d=n[++i],$=o[++c];else if(Nt(v,h,l))xt(v,h,l),v=n[--a],h=o[--p];else if(Nt(d,h,l))"slot"!==d.k&&"slot"!==h.k||jt(d.N.parentNode,!1),xt(d,h,l),Tt(m,d.N,v.N.nextSibling),d=n[++i],h=o[--p];else if(Nt(v,$,l))"slot"!==d.k&&"slot"!==h.k||jt(v.N.parentNode,!1),xt(v,$,l),Tt(m,v.N,d.N),v=n[--a],$=o[++c];else{for(u=-1,f=i;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===$.j){u=f;break}u>=0?(r=n[u],r.k!==$.k?s=gt(n&&n[c],e,u):(xt(r,$,l),n[u]=void 0,s=r.N),$=o[++c]):(s=gt(n&&n[c],e,c),$=o[++c]),s&&Tt(St(d.N).parentNode,s,St(d.N))}i>a?Ot(t,null==o[p+1]?null:o[p+1].N,e,o,c,p):c>p&&kt(n,i,a)})(o,l,n,s,e):null!==s?(null!==t.$&&(o.textContent=""),Ot(o,null,n,s,0,s.length-1)):e||null===l?e&&null!==l&&null===s&&(n.m=l):kt(l,0,l.length-1),mt&&"svg"===r&&(mt=!1)):(c=o["s-cr"])?c.parentNode.textContent=i:t.$!==i&&(o.data=i)},Et=[],Mt=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!n["s-cn"]&&!n["s-nr"]&&n["s-hn"]!==t["s-hn"]&&(!n["s-sh"]||n["s-sh"]!==t["s-hn"]||""!==l&&C(n)===l))if(L(n,l)){let e=Et.find((t=>t.T===n));$t=!0,n["s-sn"]=n["s-sn"]||l,e?(e.T["s-sh"]=t["s-hn"],e.C=t):(n["s-sh"]=t["s-hn"],Et.push({C:t,T:n})),n["s-sr"]&&Et.map((t=>{L(t.T,n["s-sn"])&&(e=Et.find((t=>t.T===n)),e&&!t.C&&(t.C=e.C))}))}else Et.some((t=>t.T===n))||Et.push({T:n})}1===t.nodeType&&Mt(t)}},It=t=>{t.h&&t.h.ref&&bt.push((()=>t.h.ref(null))),t.m&&t.m.map(It)},Lt=(t,n)=>{yt.push((()=>t(n)))},Tt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=C(t)||"";return{slotNode:M(A(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(l),n}return(null==t?void 0:t.__insertBefore)?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)},Ct=(t,n)=>{if(n&&!t.R&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.R=()=>{n["s-p"].splice(e-1,1),o()})))}},Rt=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);Ct(t,t.A);const e=()=>At(t,n);if(!n)return x(e);queueMicrotask((()=>{e()}))},At=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return n?(t.F&&(t.F=!1,_t(o,"connectedCallback",void 0,e)),t.u|=256,t.D&&(t.D.map((([t,n])=>_t(o,t,n,e))),t.D=void 0),t.P.length&&t.P.forEach((t=>t(e))),l=_t(o,"componentWillLoad",void 0,e)):l=_t(o,"componentWillUpdate",void 0,e),l=Ft(l,(()=>_t(o,"componentWillRender",void 0,e))),Ft(l,(()=>Pt(t,o,n)))},Ft=(t,n)=>Dt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Dt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Pt=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];Ut(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>Vt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},Ut=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var o,l,s,r,i;const c=t.$hostElement$,u=t.o,f=t.U||V(null,null),a=(t=>t&&t.k===B)(n)?n:U(null,null,n);if(tt=c.tagName,u.V&&(a.h=a.h||{},u.V.forEach((([t,n])=>{a.h[n]=c[t]}))),e&&a.h)for(const t of Object.keys(a.h))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.h[t]=c[t]);if(a.k=null,a.u|=4,t.U=a,a.N=f.N=c,pt=!1,X=c["s-cr"],$t=!1,xt(f,a,e),m.u|=1,ht){Mt(a.N);for(const t of Et){const n=t.T;if(!n["s-ol"]&&h.document){const t=h.document.createTextNode("");t["s-nr"]=n,Tt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of Et){const n=t.T,i=t.C;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),i){const t=i.parentNode;let o=i.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(Tt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=h.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,Tt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(r=n["s-ih"])&&r)}n&&"function"==typeof i["s-rf"]&&i["s-rf"](i)}else 1===n.nodeType&&(n.hidden=!0)}}if($t&&E(a.N),m.u&=-2,Et.length=0,!pt&&!(1&u.u)&&c["s-cr"]){const t=a.N.__childNodes||a.N.childNodes;for(const n of t)if(n["s-hn"]!==tt&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(i=n.hidden)&&i),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=h.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],Tt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}X=void 0,bt.forEach((t=>t())),bt.length=0,yt.forEach((t=>t())),yt.length=0})(t,n,o)}catch(n){f(n,t.$hostElement$)}return null},Vt=t=>{const n=t.$hostElement$,e=t.i,o=t.A;_t(e,"componentDidRender",void 0,n),64&t.u?_t(e,"componentDidUpdate",void 0,n):(t.u|=64,zt(n),_t(e,"componentDidLoad",void 0,n),t.B(n),o||Ht()),t.H(n),t.R&&(t.R(),t.R=void 0),512&t.u&&S((()=>Rt(t,!1))),t.u&=-517},Bt=t=>{var n;{const e=i(t),o=null==(n=null==e?void 0:e.$hostElement$)?void 0:n.isConnected;return o&&2==(18&e.u)&&Rt(e,!1),o}},Ht=()=>{var t;S((()=>lt(h,"appload",{detail:{namespace:"apollo-core"}}))),(null==(t=m._)?void 0:t.size)&&m._.clear()},_t=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){f(t,o)}},zt=t=>t.classList.add("hydrated"),Wt=(t,n,e,o)=>{const l=i(t);if(!l)return;if(!l)throw Error(`Couldn't find host element for "${o.p}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=l.$hostElement$,r=l.l.get(n),c=l.u,u=l.i;if(e=nt(e,o.t[n][0]),!(8&c&&void 0!==r||e===r||Number.isNaN(r)&&Number.isNaN(e))){if(l.l.set(n,e),o.W){const t=o.W[n];t&&t.map((t=>{try{const[[o,s]]=Object.entries(t);(128&c||1&s)&&(u?u[o](e,r,n):l.P.push((()=>{l.i[o](e,r,n)})))}catch(t){f(t,s)}}))}if(2&c){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,r,n)&&!(16&c))return;16&c||Rt(l,!1)}}},qt=(t,n,e)=>{var o,l;const r=t.prototype;{t.watchers&&!n.W&&(n.W=K(t.watchers)),t.deserializers&&!n.q&&(n.q=t.deserializers),t.serializers&&!n.Y&&(n.Y=t.serializers);const c=Object.entries(null!=(o=n.t)?o:{});if(c.map((([t,[o]])=>{if(31&o||2&e&&32&o){const{get:l,set:c}=s(r,t)||{};l&&(n.t[t][0]|=2048),c&&(n.t[t][0]|=4096),(1&e||!l)&&Object.defineProperty(r,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>i(this).l.get(n))(0,t);const e=i(this),o=e?e.i:r;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(l){const s=i(this);if(s){if(c)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),c.call(this,nt(l,o)),void Wt(this,t,l=32&o?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return Wt(this,t,l,n),void(1&e&&!s.i&&s.P.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=l)})));const r=()=>{const e=s.i[t];!s.l.get(t)&&e&&s.l.set(t,e),s.i[t]=nt(l,o),Wt(this,t,s.i[t],n)};s.i?r():s.P.push((()=>{r()}))}}}})}else 1&e&&64&o&&Object.defineProperty(r,t,{value(...n){var e;const o=i(this);return null==(e=null==o?void 0:o.G)?void 0:e.then((()=>{var e;return null==(e=o.i)?void 0:e[t](...n)}))}})})),1&e){const e=new Map;r.attributeChangedCallback=function(t,o,l){m.jmp((()=>{var s;const u=e.get(t),f=i(this);if(this.hasOwnProperty(u)&&(l=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==l)return;if(null==u){const e=null==f?void 0:f.u;if(f&&e&&!(8&e)&&l!==o){const r=f.i,i=null==(s=n.W)?void 0:s[t];null==i||i.forEach((n=>{const[[s,i]]=Object.entries(n);null!=r[s]&&(128&e||1&i)&&r[s].call(r,l,o,t)}))}return}const a=c.find((([t])=>t===u)),d=a?a[1][0]:0,v=4&d;if(512&d&&8&d&&!P(this[u])&&(t=>null==t||!1===t?null:!0===t?"":t+"")(this[u])===l)return;const p=v&&null===l&&void 0===this[u];v&&(l=null!==l&&"false"!==l);const $=Object.getOwnPropertyDescriptor(r,u);p||l==this[u]||$.get&&!$.set||(this[u]=l)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.W)?l:{}),...c.filter((([t,n])=>31&n[0])).map((([t,o])=>{var l;const s=o[1]||t;return e.set(s,t),512&o[0]&&(null==(l=n.V)||l.push([t,s])),s}))]))}}return t},Yt=async(t,n,e)=>{var o;let l;try{if(!(32&n.u))if(n.u|=32,n.u&=-1025,e.J){const s=((t,n)=>{var e;const o=t.p.replace(/-/g,"_"),l=t.J;if(!l)return;const s=a.get(l);if(s)return s[o];const r=null!=(e=d.get(l))?e:0,i=[r>0?"s-retry="+r:"",""].filter(Boolean).join("&");
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
3
+ return import(`./${l}.entry.js${i?"?"+i:""}`).then((t=>(d.delete(l),a.set(l,t),t[o])),(t=>{d.set(l,r+1),f(t,n.$hostElement$)}))})(e,n);if(s&&"then"in s){const t=()=>{};l=await s,t()}else l=s;if(!l)throw n.u&=-33,n.Z=(null!=(o=n.Z)?o:0)+1,n.Z<3&&(n.u|=1024),Error(`Constructor for "${e.p}#${n.K}" was not found`);l.isProxied||(e.W=K(l.watchers),e.Y=l.serializers,e.q=l.deserializers,qt(l,e,2),l.isProxied=!0);const r=()=>{};n.u|=8;try{new l(n)}catch(n){f(n,t)}n.u&=-9,n.u|=128,r(),4&e.u?n.F=!0:Gt(n.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));const s=n.A,r=()=>Rt(n,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()}catch(e){f(e,t),n.R&&(n.R(),n.R=void 0),!n.B||1024&n.u||n.B(t)}},Gt=(t,n)=>{_t(t,"connectedCallback",void 0,n)},Jt=t=>{if(!h.document)return;const n=t["s-cr"]=h.document.createComment("");n["s-cn"]=!0,Tt(t,n,t.firstChild)},Zt=(t,n)=>{_t(t,"disconnectedCallback",void 0,n||t)},Kt=(t,n={})=>{var e;if(!h.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],l=n.exclude||[],s=h.customElements,r=h.document.head,c=r.querySelector("meta[charset]"),u=h.document.createElement("style"),f=[];let a,d=!0;Object.assign(m,n),m.v=new URL(n.resourcesUrl||"./",h.document.baseURI).href,m.u|=2;let p=!1;if(t.map((t=>{t[1].map((n=>{var e,r;const c={u:n[0],p:n[1],t:n[2],X:n[3]};4&c.u&&(p=!0),c.t=n[2],c.X=n[3],c.V=[],c.W=K(n[4]),c.Y=null!=(e=n[5])?e:{},c.q=null!=(r=n[6])?r:{};const u=c.p,$=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,tt:new Map};e.G=new Promise((t=>e.H=t)),e.nt=new Promise((t=>e.B=t)),t["s-p"]=[],t["s-rc"]=[],e.P=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,c)}connectedCallback(){const t=i(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Xt(this,t,c.X)),a&&(clearTimeout(a),a=null),d?f.push(this):m.jmp((()=>(t=>{if(!(1&m.u)){const n=i(t);if(!n)return;const e=n.o,o=()=>{};if(1&n.u)Xt(t,n,e.X),(null==n?void 0:n.i)?Gt(n.i,t):1024&n.u?setTimeout((()=>Yt(t,n,e)),1e3):(null==n?void 0:n.nt)&&n.nt.then((()=>Gt(n.i,t)));else{let o;n.u|=1,o=t.getAttribute(v),o&&((t,n,e,o)=>{var l,s,r,c;const u=t.shadowRoot,f=[],a=[],d=V(n,null);d.N=t,!h.document||m._&&m._.size||q(h.document.body,m._=new Map),t[v]=e,t.removeAttribute(v),o.U=W(d,f,[],null,t,t,e,a);let p=0;const $=f.length;let b;for(;p<$;p++){b=f[p];const e=b.S+"."+b.M,o=m._.get(e),s=b.N;if(u){if((null==(l=b.k)?void 0:(""+l).includes("-"))&&"slot-fb"!==b.k&&!b.N.shadowRoot){const t=i(b.N);if(t){const n=D(t.o),e=h.document.querySelector(`style[sty-id="${n}"]`);e&&null.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===b.k&&(s["s-cr"]=t["s-cr"]);"slot"===b.k&&(b.O=b.N["s-sn"]||b.N.name||null,b.m?(b.u|=2,b.N.childNodes.length||b.m.forEach((t=>{b.N.appendChild(t.N)}))):b.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),u||(s["s-oo"]=parseInt(b.M))),o&&!o["s-id"]&&m._.delete(e)}const y=[],g=a.length;let w,j,O,k,N=0,S=0;for(;N<g;N++)if(w=a[N],w&&w.length)for(O=w.length,j=0;j<O;j++){if(k=w[j],y[k.hostId]||(y[k.hostId]=m._.get(k.hostId)),!y[k.hostId])continue;const t=y[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(r=null==(s=w[j-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),T(k.node,k.slot,0,k.node["s-oo"]||S),(null==(c=k.node.parentElement)?void 0:c.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),S=(k.node["s-oo"]||S)+1}o.$hostElement$=t})(t,e.p,o,n),o||12&e.u&&Jt(t);{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){Ct(n,n.A=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),Yt(t,n,e)}o()}})(this))))}disconnectedCallback(){m.jmp((()=>(async t=>{if(!(1&m.u)){const n=i(t);(null==n?void 0:n.et)&&(n.et.map((t=>t())),n.et=void 0),(null==n?void 0:n.i)?Zt(n.i,t):(null==n?void 0:n.nt)&&n.nt.then((()=>Zt(n.i,t)))}F.has(t)&&F.delete(t),t.shadowRoot&&F.has(t.shadowRoot)&&F.delete(t.shadowRoot)})(this))),S((()=>{var t;const n=i(this);if(!n)return;const e=f.findIndex((t=>t===this));e>-1&&f.splice(e,1),(null==(t=null==n?void 0:n.U)?void 0:t.N)instanceof Node&&!n.U.N.isConnected&&delete n.U.N}))}componentOnReady(){var t;return null==(t=i(this))?void 0:t.nt}};c.J=t[0],l.includes(u)||s.get(u)||(o.push(u),s.define(u,qt($,c,1)))}))})),o.length>0&&(p&&(u.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),u.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=m.ot)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=h.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}d=!1,f.length?f.map((t=>t.connectedCallback())):m.jmp((()=>a=setTimeout(Ht,30)))},Qt=(t,n)=>n,Xt=(t,n,e)=>{e&&h.document&&e.map((([e,o,l])=>{const s=nn(h.document,t,e),r=tn(n,l),i=en(e);m.ael(s,o,r,i),(n.et=n.et||[]).push((()=>m.rel(s,o,r,i)))}))},tn=(t,n)=>e=>{var o;try{256&t.u?null==(o=t.i)||o[n](e):(t.D=t.D||[]).push([n,e])}catch(n){f(n,t.$hostElement$)}},nn=(t,n,e)=>4&e?t:8&e?h:n,en=t=>({passive:!!(1&t),capture:!!(2&t)}),on=t=>m.ot=t;export{Qt as F,B as H,Kt as b,ot as c,Bt as f,et as g,U as h,b as p,c as r,on as s}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e,g as n}from"./p-CJABLO_1.js";import{T as h,i as o}from"./p-Dqb1pIRo.js";import{T as r}from"./p-CWdQxaaX.js";const a="hoverClose",l=class{constructor(s){t(this,s),this.navItemClick=i(this,"navItemClick",7),this.openChange=i(this,"openChange",7),this.dropdownPanelId=`xpl-top-nav-item-dropdown-${Math.random().toString(36).slice(2,11)}`,this.hoverOpened=!1,this.timers=new h,this.hasActiveDescendant=!1,this.hasDropdown=!1,this.isLeadingIconSlotPresent=!1,this.isMobileViewport=!1,this.hostListitemRole=!1,this.isTrailingIconSlotPresent=!1,this.active=!1,this.icon="",this.open=!1,this.openMode="click",this.selected=!1,this.onDocClickCapture=t=>{if(!this.hasDropdown||!this.open)return;const i=t.target;i&&!this.el.contains(i)&&(this.open=!1)},this.onDocKeyDownCapture=t=>{this.hasDropdown&&this.open&&"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.open=!1,this.focusTriggerAfterEscape())},this.handleClick=t=>{if(this.hasDropdown){if(t.preventDefault(),t.stopPropagation(),this.timers.clearCoalesced(a),this.open&&this.hoverOpened&&this.hoverModeActive()&&t.detail>0)return;return this.hoverOpened=!1,void(this.open=!this.open)}this.navItemClick.emit(t)},this.handleKeyDown=t=>{if(null!=this.href&&!this.hasDropdown&&" "===t.key){t.preventDefault();const i=this.el.querySelector(".xpl-top-nav-item__inner");i?.click()}},this.onMobileViewportChange=()=>{this.isMobileViewport=this.mobileMq?.matches??!1},this.handleMouseEnter=()=>{this.hasDropdown&&this.hoverModeActive()&&(this.timers.clearCoalesced(a),this.open||(this.hoverOpened=!0,this.open=!0))},this.handleMouseLeave=()=>{this.hasDropdown&&this.open&&this.hoverOpened&&this.timers.scheduleCoalesced(a,(()=>{this.hoverOpened&&!this.el.contains(this.el.ownerDocument.activeElement)&&(this.open=!1)}),150)}}onHasDropdownChanged(){this.hasDropdown||(this.open=!1),this.syncDropdownDocListeners()}onOpenChanged(t){this.openChange.emit(t),t||(this.hoverOpened=!1),t&&this.hasDropdown&&this.broadcastCloseOtherDropdownHosts()}connectedCallback(){o()&&"function"==typeof window.matchMedia&&(this.hoverOpenMq=window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: 768px)"),this.mobileMq=window.matchMedia(r),this.mobileMq.addEventListener("change",this.onMobileViewportChange),this.isMobileViewport=this.mobileMq.matches),this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners(),this.connectDropdownSlotObserver()}disconnectedCallback(){this.timers.dispose(),this.hoverOpenMq=void 0,this.mobileMq?.removeEventListener("change",this.onMobileViewportChange),this.mobileMq=void 0,this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers();const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0)}componentWillLoad(){this.syncHostListitemRole(),this.syncHasDropdownFromDom()}componentWillRender(){this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers()}componentDidRender(){this.schedulePostRenderTopNavItemWork()}handleCloseNavDropdownRequest(){this.hasDropdown&&this.open&&(this.open=!1)}async closeMenu(){this.hasDropdown&&(this.open=!1)}async openMenu(){this.hasDropdown&&(this.timers.clearCoalesced(a),this.hoverOpened=!1,this.open=!0)}async toggleMenu(){this.hasDropdown&&(this.open=!this.open)}scheduleHasDropdownSyncFromObserver(){this.timers.scheduleCoalesced("hasDropdownSync",(()=>{this.el.isConnected&&this.syncHasDropdownFromDom()}))}connectDropdownSlotObserver(){this.disconnectDropdownSlotObserver(),"undefined"!=typeof MutationObserver&&(this.dropdownSlotObserver=new MutationObserver((()=>{this.scheduleHasDropdownSyncFromObserver()})),this.dropdownSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectDropdownSlotObserver(){this.dropdownSlotObserver?.disconnect(),this.dropdownSlotObserver=void 0}disconnectListitemContextObservers(){this.parentListitemContextObserver?.disconnect(),this.parentListitemContextObserver=void 0,this.selfListitemContextObserver?.disconnect(),this.selfListitemContextObserver=void 0}connectListitemContextObservers(){if(this.disconnectListitemContextObservers(),"undefined"==typeof MutationObserver||!this.el.isConnected)return;this.selfListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()})),this.selfListitemContextObserver.observe(this.el,{attributes:!0,attributeFilter:["class","slot"]});const t=this.el.parentElement;if(t){this.parentListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()}));const i="xpl-top-nav"===t.tagName.toLowerCase()&&"left-aside"===this.el.getAttribute("slot")?t.querySelector(".xpl-top-nav__left-primary"):null;this.parentListitemContextObserver.observe(i??t,{attributes:!0,attributeFilter:["role"],subtree:!1})}}schedulePostRenderTopNavItemWork(){this.timers.scheduleCoalesced("postRender",(()=>{this.el.isConnected&&(this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.connectListitemContextObservers(),this.connectDropdownSlotObserver())}))}syncDropdownDocListeners(){if(!o())return;const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0),this.hasDropdown&&(t.addEventListener("click",this.onDocClickCapture,!0),t.addEventListener("keydown",this.onDocKeyDownCapture,!0))}hasSlottedChildOwnedByThisHost(t){return Array.from(this.el.querySelectorAll(`[slot="${t}"]`)).some((t=>t.closest("xpl-top-nav-item")===this.el))}syncHasDropdownFromDom(){const t=null!=this.el.querySelector('[slot="dropdown"]');t!==this.hasDropdown&&(this.hasDropdown=t);const i=this.hasSlottedChildOwnedByThisHost("leading-icon");i!==this.isLeadingIconSlotPresent&&(this.isLeadingIconSlotPresent=i);const s=this.hasSlottedChildOwnedByThisHost("trailing-icon");s!==this.isTrailingIconSlotPresent&&(this.isTrailingIconSlotPresent=s);const e=!!t&&(null!==this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--active')||null!==this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--selected'));e!==this.hasActiveDescendant&&(this.hasActiveDescendant=e)}getNavDropdownBroadcastRoot(){return this.el.closest("xpl-top-nav-menu")??this.el.closest("xpl-nav-header-menu")??this.el.closest("xpl-top-nav")??this.el.ownerDocument}broadcastCloseOtherDropdownHosts(){this.getNavDropdownBroadcastRoot().querySelectorAll("xpl-top-nav-item").forEach((t=>{t!==this.el&&t.parentElement===this.el.parentElement&&t.dispatchEvent(new CustomEvent("_xplCloseNavDropdown",{bubbles:!1}))}))}hoverModeActive(){return"hover"===this.openMode&&(this.hoverOpenMq?.matches??!1)}focusTriggerAfterEscape(){this.timers.scheduleCoalesced("focusTriggerAfterEscape",(()=>{this.el.isConnected&&this.el.querySelector(".xpl-top-nav-item__inner")?.focus()}))}static isInternalRenderedHostChild(t){return t.classList.contains("xpl-top-nav-item__inner")||t.classList.contains("xpl-top-nav-item__dropdown")}hasNonDropdownLightDomChild(){return Array.from(this.el.childNodes).some((t=>{if(t.nodeType===Node.TEXT_NODE)return Boolean(t.textContent?.trim());if(t.nodeType===Node.ELEMENT_NODE){const i=t;if(l.isInternalRenderedHostChild(i))return!1;const s=i.getAttribute("slot");return null==s||""===s}return!1}))}getInnerAriaLabel(){if(this.label?.trim())return;if(this.hasNonDropdownLightDomChild())return;const t=this.itemAriaLabel?.trim();return t||(this.icon?.trim()||this.isLeadingIconSlotPresent?"Navigation item":void 0)}computeHostListitemRole(){const{el:t}=this;if(t.classList.contains("xpl-top-nav__brand"))return!1;if("right-aside-mobile"===t.getAttribute("slot"))return!1;const i=t.parentElement;return"list"===i?.getAttribute("role")||null!=i&&"xpl-nav-header-menu"===i.tagName.toLowerCase()||null!=i&&"xpl-top-nav-menu"===i.tagName.toLowerCase()||"left-aside"===t.getAttribute("slot")&&"xpl-top-nav"===i?.tagName.toLowerCase()&&null!=i.querySelector('.xpl-top-nav__left-primary[role="list"]')}syncHostListitemRole(){const t=this.computeHostListitemRole();this.hostListitemRole!==t&&(this.hostListitemRole=t)}renderLabelContent(){if(!this.label)return s("slot",null);const t=this.description?.trim();return t?s("span",{class:"xpl-top-nav-item__label-group"},s("span",{class:"xpl-top-nav-item__label",title:this.label},this.label),s("span",{class:"xpl-top-nav-item__description"},t)):s("span",{class:"xpl-top-nav-item__label",title:this.label},this.label)}renderLeading(){return this.isLeadingIconSlotPresent?s("span",{class:"xpl-top-nav-item__leading"},s("slot",{name:"leading-icon"})):this.icon?s("span",{class:"xpl-top-nav-item__leading"},s("xpl-icon",{size:16,icon:this.icon})):null}renderTrailing(){return this.isTrailingIconSlotPresent?s("span",{class:"xpl-top-nav-item__trailing"},s("slot",{name:"trailing-icon"})):this.hasDropdown?s("span",{class:"xpl-top-nav-item__trailing"},s("xpl-icon",{icon:this.isMobileViewport?"chevron-right":"chevron-down"})):null}renderInner(){const t=this.selected?"page":void 0,i=this.hasDropdown?this.open?"true":"false":void 0,e=this.getInnerAriaLabel(),n={class:"xpl-top-nav-item__inner",tabIndex:0,"aria-current":t,"aria-expanded":i,"aria-haspopup":this.hasDropdown?"true":void 0,"aria-controls":this.hasDropdown?this.dropdownPanelId:void 0,...e?{"aria-label":e}:{},onClick:this.handleClick,onKeyDown:this.handleKeyDown};return null==this.href||this.hasDropdown?s("button",{...n,type:"button"},this.renderLeading(),this.renderLabelContent(),this.renderTrailing()):s("a",{...n,href:this.href},this.renderLeading(),this.renderLabelContent(),this.renderTrailing())}render(){return s(e,{key:"59b96ce313362796a55a0e109a3cd3918b88a6b3",class:{"xpl-top-nav-item":!0,"xpl-top-nav-item--active":this.active,"xpl-top-nav-item--dropdown-open":this.hasDropdown&&this.open,"xpl-top-nav-item--has-active-descendant":this.hasActiveDescendant,"xpl-top-nav-item--has-dropdown":this.hasDropdown,"xpl-top-nav-item--selected":this.selected,dark:!0},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,...this.hostListitemRole?{role:"listitem"}:{}},this.renderInner(),this.hasDropdown&&s("div",{key:"8daced29efc97c4a36934dfd70764768440acbef",id:this.dropdownPanelId,class:"xpl-top-nav-item__dropdown"},s("slot",{key:"aa1f47af8c810d24e21b18ded427c8a80f20ead2",name:"dropdown"})))}get el(){return n(this)}static get watchers(){return{hasDropdown:[{onHasDropdownChanged:0}],open:[{onOpenChanged:0}]}}};export{l as xpl_top_nav_item}
1
+ import{r as t,c as i,h as s,H as e,g as n}from"./p-CgJEmBQY.js";import{T as h,i as o}from"./p-Dqb1pIRo.js";import{T as r}from"./p-CWdQxaaX.js";const a="hoverClose",l=class{constructor(s){t(this,s),this.navItemClick=i(this,"navItemClick",7),this.openChange=i(this,"openChange",7),this.dropdownPanelId=`xpl-top-nav-item-dropdown-${Math.random().toString(36).slice(2,11)}`,this.hoverOpened=!1,this.timers=new h,this.hasActiveDescendant=!1,this.hasDropdown=!1,this.isLeadingIconSlotPresent=!1,this.isMobileViewport=!1,this.hostListitemRole=!1,this.isTrailingIconSlotPresent=!1,this.active=!1,this.icon="",this.open=!1,this.openMode="click",this.selected=!1,this.onDocClickCapture=t=>{if(!this.hasDropdown||!this.open)return;const i=t.target;i&&!this.el.contains(i)&&(this.open=!1)},this.onDocKeyDownCapture=t=>{this.hasDropdown&&this.open&&"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.open=!1,this.focusTriggerAfterEscape())},this.handleClick=t=>{if(this.hasDropdown){if(t.preventDefault(),t.stopPropagation(),this.timers.clearCoalesced(a),this.open&&this.hoverOpened&&this.hoverModeActive()&&t.detail>0)return;return this.hoverOpened=!1,void(this.open=!this.open)}this.navItemClick.emit(t)},this.handleKeyDown=t=>{if(null!=this.href&&!this.hasDropdown&&" "===t.key){t.preventDefault();const i=this.el.querySelector(".xpl-top-nav-item__inner");i?.click()}},this.onMobileViewportChange=()=>{this.isMobileViewport=this.mobileMq?.matches??!1},this.handleMouseEnter=()=>{this.hasDropdown&&this.hoverModeActive()&&(this.timers.clearCoalesced(a),this.open||(this.hoverOpened=!0,this.open=!0))},this.handleMouseLeave=()=>{this.hasDropdown&&this.open&&this.hoverOpened&&this.timers.scheduleCoalesced(a,(()=>{this.hoverOpened&&!this.el.contains(this.el.ownerDocument.activeElement)&&(this.open=!1)}),150)}}onHasDropdownChanged(){this.hasDropdown||(this.open=!1),this.syncDropdownDocListeners()}onOpenChanged(t){this.openChange.emit(t),t||(this.hoverOpened=!1),t&&this.hasDropdown&&this.broadcastCloseOtherDropdownHosts()}connectedCallback(){o()&&"function"==typeof window.matchMedia&&(this.hoverOpenMq=window.matchMedia("(hover: hover) and (pointer: fine) and (min-width: 768px)"),this.mobileMq=window.matchMedia(r),this.mobileMq.addEventListener("change",this.onMobileViewportChange),this.isMobileViewport=this.mobileMq.matches),this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.syncDropdownDocListeners(),this.connectDropdownSlotObserver()}disconnectedCallback(){this.timers.dispose(),this.hoverOpenMq=void 0,this.mobileMq?.removeEventListener("change",this.onMobileViewportChange),this.mobileMq=void 0,this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers();const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0)}componentWillLoad(){this.syncHostListitemRole(),this.syncHasDropdownFromDom()}componentWillRender(){this.disconnectDropdownSlotObserver(),this.disconnectListitemContextObservers()}componentDidRender(){this.schedulePostRenderTopNavItemWork()}handleCloseNavDropdownRequest(){this.hasDropdown&&this.open&&(this.open=!1)}async closeMenu(){this.hasDropdown&&(this.open=!1)}async openMenu(){this.hasDropdown&&(this.timers.clearCoalesced(a),this.hoverOpened=!1,this.open=!0)}async toggleMenu(){this.hasDropdown&&(this.open=!this.open)}scheduleHasDropdownSyncFromObserver(){this.timers.scheduleCoalesced("hasDropdownSync",(()=>{this.el.isConnected&&this.syncHasDropdownFromDom()}))}connectDropdownSlotObserver(){this.disconnectDropdownSlotObserver(),"undefined"!=typeof MutationObserver&&(this.dropdownSlotObserver=new MutationObserver((()=>{this.scheduleHasDropdownSyncFromObserver()})),this.dropdownSlotObserver.observe(this.el,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot"]}))}disconnectDropdownSlotObserver(){this.dropdownSlotObserver?.disconnect(),this.dropdownSlotObserver=void 0}disconnectListitemContextObservers(){this.parentListitemContextObserver?.disconnect(),this.parentListitemContextObserver=void 0,this.selfListitemContextObserver?.disconnect(),this.selfListitemContextObserver=void 0}connectListitemContextObservers(){if(this.disconnectListitemContextObservers(),"undefined"==typeof MutationObserver||!this.el.isConnected)return;this.selfListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()})),this.selfListitemContextObserver.observe(this.el,{attributes:!0,attributeFilter:["class","slot"]});const t=this.el.parentElement;if(t){this.parentListitemContextObserver=new MutationObserver((()=>{this.schedulePostRenderTopNavItemWork()}));const i="xpl-top-nav"===t.tagName.toLowerCase()&&"left-aside"===this.el.getAttribute("slot")?t.querySelector(".xpl-top-nav__left-primary"):null;this.parentListitemContextObserver.observe(i??t,{attributes:!0,attributeFilter:["role"],subtree:!1})}}schedulePostRenderTopNavItemWork(){this.timers.scheduleCoalesced("postRender",(()=>{this.el.isConnected&&(this.syncHostListitemRole(),this.syncHasDropdownFromDom(),this.connectListitemContextObservers(),this.connectDropdownSlotObserver())}))}syncDropdownDocListeners(){if(!o())return;const t=this.el.ownerDocument;t.removeEventListener("click",this.onDocClickCapture,!0),t.removeEventListener("keydown",this.onDocKeyDownCapture,!0),this.hasDropdown&&(t.addEventListener("click",this.onDocClickCapture,!0),t.addEventListener("keydown",this.onDocKeyDownCapture,!0))}hasSlottedChildOwnedByThisHost(t){return Array.from(this.el.querySelectorAll(`[slot="${t}"]`)).some((t=>t.closest("xpl-top-nav-item")===this.el))}syncHasDropdownFromDom(){const t=null!=this.el.querySelector('[slot="dropdown"]');t!==this.hasDropdown&&(this.hasDropdown=t);const i=this.hasSlottedChildOwnedByThisHost("leading-icon");i!==this.isLeadingIconSlotPresent&&(this.isLeadingIconSlotPresent=i);const s=this.hasSlottedChildOwnedByThisHost("trailing-icon");s!==this.isTrailingIconSlotPresent&&(this.isTrailingIconSlotPresent=s);const e=!!t&&(null!==this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--active')||null!==this.el.querySelector('[slot="dropdown"] .xpl-top-nav-item--selected'));e!==this.hasActiveDescendant&&(this.hasActiveDescendant=e)}getNavDropdownBroadcastRoot(){return this.el.closest("xpl-top-nav-menu")??this.el.closest("xpl-nav-header-menu")??this.el.closest("xpl-top-nav")??this.el.ownerDocument}broadcastCloseOtherDropdownHosts(){this.getNavDropdownBroadcastRoot().querySelectorAll("xpl-top-nav-item").forEach((t=>{t!==this.el&&t.parentElement===this.el.parentElement&&t.dispatchEvent(new CustomEvent("_xplCloseNavDropdown",{bubbles:!1}))}))}hoverModeActive(){return"hover"===this.openMode&&(this.hoverOpenMq?.matches??!1)}focusTriggerAfterEscape(){this.timers.scheduleCoalesced("focusTriggerAfterEscape",(()=>{this.el.isConnected&&this.el.querySelector(".xpl-top-nav-item__inner")?.focus()}))}static isInternalRenderedHostChild(t){return t.classList.contains("xpl-top-nav-item__inner")||t.classList.contains("xpl-top-nav-item__dropdown")}hasNonDropdownLightDomChild(){return Array.from(this.el.childNodes).some((t=>{if(t.nodeType===Node.TEXT_NODE)return Boolean(t.textContent?.trim());if(t.nodeType===Node.ELEMENT_NODE){const i=t;if(l.isInternalRenderedHostChild(i))return!1;const s=i.getAttribute("slot");return null==s||""===s}return!1}))}getInnerAriaLabel(){if(this.label?.trim())return;if(this.hasNonDropdownLightDomChild())return;const t=this.itemAriaLabel?.trim();return t||(this.icon?.trim()||this.isLeadingIconSlotPresent?"Navigation item":void 0)}computeHostListitemRole(){const{el:t}=this;if(t.classList.contains("xpl-top-nav__brand"))return!1;if("right-aside-mobile"===t.getAttribute("slot"))return!1;const i=t.parentElement;return"list"===i?.getAttribute("role")||null!=i&&"xpl-nav-header-menu"===i.tagName.toLowerCase()||null!=i&&"xpl-top-nav-menu"===i.tagName.toLowerCase()||"left-aside"===t.getAttribute("slot")&&"xpl-top-nav"===i?.tagName.toLowerCase()&&null!=i.querySelector('.xpl-top-nav__left-primary[role="list"]')}syncHostListitemRole(){const t=this.computeHostListitemRole();this.hostListitemRole!==t&&(this.hostListitemRole=t)}renderLabelContent(){if(!this.label)return s("slot",null);const t=this.description?.trim();return t?s("span",{class:"xpl-top-nav-item__label-group"},s("span",{class:"xpl-top-nav-item__label",title:this.label},this.label),s("span",{class:"xpl-top-nav-item__description"},t)):s("span",{class:"xpl-top-nav-item__label",title:this.label},this.label)}renderLeading(){return this.isLeadingIconSlotPresent?s("span",{class:"xpl-top-nav-item__leading"},s("slot",{name:"leading-icon"})):this.icon?s("span",{class:"xpl-top-nav-item__leading"},s("xpl-icon",{size:16,icon:this.icon})):null}renderTrailing(){return this.isTrailingIconSlotPresent?s("span",{class:"xpl-top-nav-item__trailing"},s("slot",{name:"trailing-icon"})):this.hasDropdown?s("span",{class:"xpl-top-nav-item__trailing"},s("xpl-icon",{icon:this.isMobileViewport?"chevron-right":"chevron-down"})):null}renderInner(){const t=this.selected?"page":void 0,i=this.hasDropdown?this.open?"true":"false":void 0,e=this.getInnerAriaLabel(),n={class:"xpl-top-nav-item__inner",tabIndex:0,"aria-current":t,"aria-expanded":i,"aria-haspopup":this.hasDropdown?"true":void 0,"aria-controls":this.hasDropdown?this.dropdownPanelId:void 0,...e?{"aria-label":e}:{},onClick:this.handleClick,onKeyDown:this.handleKeyDown};return null==this.href||this.hasDropdown?s("button",{...n,type:"button"},this.renderLeading(),this.renderLabelContent(),this.renderTrailing()):s("a",{...n,href:this.href},this.renderLeading(),this.renderLabelContent(),this.renderTrailing())}render(){return s(e,{key:"bc734cbb385801e337ce2dbe6c4526312e266d1c",class:{"xpl-top-nav-item":!0,"xpl-top-nav-item--active":this.active,"xpl-top-nav-item--dropdown-open":this.hasDropdown&&this.open,"xpl-top-nav-item--has-active-descendant":this.hasActiveDescendant,"xpl-top-nav-item--has-dropdown":this.hasDropdown,"xpl-top-nav-item--selected":this.selected,dark:!0},onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,...this.hostListitemRole?{role:"listitem"}:{}},this.renderInner(),this.hasDropdown&&s("div",{key:"1d30786f440f2c7cab378a8b495e3e4a7f24da72",id:this.dropdownPanelId,class:"xpl-top-nav-item__dropdown"},s("slot",{key:"6ac2aaaf93c5efae76ad36e0e15b784456a61a36",name:"dropdown"})))}get el(){return n(this)}static get watchers(){return{hasDropdown:[{onHasDropdownChanged:0}],open:[{onOpenChanged:0}]}}};export{l as xpl_top_nav_item}
@@ -1 +1 @@
1
- import{r as s,h as t,H as i,g as e}from"./p-CJABLO_1.js";let a=!1;const c=class{constructor(i){s(this,i),this.caption="",this.dismissible=!0,this.showIcon=!0,this.timeout=8e3,this.variant="neutral",this.handleAnimationEnd=()=>{this.el?.classList.contains("xpl-toast--dismissed")&&this.el?.remove()},this.getIcon=()=>{switch(this.variant){case"warning":return t("xpl-icon",{size:24,icon:"octagon-warning"});case"success":return t("xpl-icon",{size:24,icon:"circle-check"});default:return t("xpl-icon",{size:24,icon:"message-writing"})}},this.dismiss=()=>{this.el?.classList.add("xpl-toast--dismissed")}}handleDismissableChange(){void 0!==this.dismissable&&(a||(a=!0,console.warn('[xpl-toast] The "dismissable" prop is deprecated (misspelled). Use "dismissible" instead.')))}handleTimeoutChange(){this.scheduleAutoDismiss()}disconnectedCallback(){this.clearAutoDismissTimer()}componentWillLoad(){this.handleDismissableChange()}componentDidLoad(){this.scheduleAutoDismiss()}get isDismissible(){return this.dismissable??this.dismissible}clearAutoDismissTimer(){void 0!==this.dismissTimerId&&(clearTimeout(this.dismissTimerId),this.dismissTimerId=void 0)}scheduleAutoDismiss(){this.clearAutoDismissTimer(),(this.actionSlot?.children?.length??0)<1&&this.timeout>0&&(this.dismissTimerId=setTimeout((()=>{this.dismiss()}),this.timeout))}render(){return t(i,{key:"75b3b05b745ac16a614f752cf83380428b1a4f9a",class:`xpl-toast xpl-toast--${this.variant}`,onAnimationEnd:this.handleAnimationEnd},t("div",{key:"997a55f5deb3016410ea517e89b369368a6c44d7",class:"xpl-toast__left"},this.showIcon&&t("div",{key:"6d60772a0b8f7f9839c59150a3f5f388553e7572",class:`xpl-toast__icon xpl-toast__icon--${this.variant}`},this.getIcon()),t("div",{key:"f813c6fc2abb9f3ab1ca730be25537292f414963",class:"xpl-toast__notification"},t("p",{key:"067e06ef8702892d3c1c513c47c0e03d1e025843",class:"xpl-toast__title"},t("slot",{key:"24c8844bb360cc53f189c816789d4c112dee4bb2",name:"title"})),""!==this.caption&&t("p",{key:"8b1e9e9342187c2b5c6158679f42c98073b9f369",class:"xpl-toast__caption"},this.caption?.substring(0,85)))),t("div",{key:"016cc84afb7161149c321cd73bc40272e59f0e01",class:"xpl-toast__action",ref:s=>{s&&(this.actionSlot=s)}},t("slot",{key:"e3491fe293e3ee7b3b30483a8e7b19d7c584794e",name:"action"})),this.isDismissible&&t("div",{key:"dd7e8aa57d116045287f13b164ae63e603a81f01",class:"xpl-toast__close"},t("xpl-button",{key:"e1af234f5991651a039eba58f21c58e76d3d75eb",variant:"tertiary",size:"sm",iconOnly:!0,icon:"xmark",type:"button","aria-label":"Dismiss notification",onClick:this.dismiss})))}get el(){return e(this)}static get watchers(){return{dismissable:[{handleDismissableChange:0}],timeout:[{handleTimeoutChange:0}]}}};export{c as xpl_toast}
1
+ import{r as s,h as t,H as i,g as e}from"./p-CgJEmBQY.js";let a=!1;const c=class{constructor(i){s(this,i),this.caption="",this.dismissible=!0,this.showIcon=!0,this.timeout=8e3,this.variant="neutral",this.handleAnimationEnd=()=>{this.el?.classList.contains("xpl-toast--dismissed")&&this.el?.remove()},this.getIcon=()=>{switch(this.variant){case"warning":return t("xpl-icon",{size:24,icon:"octagon-warning"});case"success":return t("xpl-icon",{size:24,icon:"circle-check"});default:return t("xpl-icon",{size:24,icon:"message-writing"})}},this.dismiss=()=>{this.el?.classList.add("xpl-toast--dismissed")}}handleDismissableChange(){void 0!==this.dismissable&&(a||(a=!0,console.warn('[xpl-toast] The "dismissable" prop is deprecated (misspelled). Use "dismissible" instead.')))}handleTimeoutChange(){this.scheduleAutoDismiss()}disconnectedCallback(){this.clearAutoDismissTimer()}componentWillLoad(){this.handleDismissableChange()}componentDidLoad(){this.scheduleAutoDismiss()}get isDismissible(){return this.dismissable??this.dismissible}clearAutoDismissTimer(){void 0!==this.dismissTimerId&&(clearTimeout(this.dismissTimerId),this.dismissTimerId=void 0)}scheduleAutoDismiss(){this.clearAutoDismissTimer(),(this.actionSlot?.children?.length??0)<1&&this.timeout>0&&(this.dismissTimerId=setTimeout((()=>{this.dismiss()}),this.timeout))}render(){return t(i,{key:"75b3b05b745ac16a614f752cf83380428b1a4f9a",class:`xpl-toast xpl-toast--${this.variant}`,onAnimationEnd:this.handleAnimationEnd},t("div",{key:"997a55f5deb3016410ea517e89b369368a6c44d7",class:"xpl-toast__left"},this.showIcon&&t("div",{key:"6d60772a0b8f7f9839c59150a3f5f388553e7572",class:`xpl-toast__icon xpl-toast__icon--${this.variant}`},this.getIcon()),t("div",{key:"f813c6fc2abb9f3ab1ca730be25537292f414963",class:"xpl-toast__notification"},t("p",{key:"067e06ef8702892d3c1c513c47c0e03d1e025843",class:"xpl-toast__title"},t("slot",{key:"24c8844bb360cc53f189c816789d4c112dee4bb2",name:"title"})),""!==this.caption&&t("p",{key:"8b1e9e9342187c2b5c6158679f42c98073b9f369",class:"xpl-toast__caption"},this.caption?.substring(0,85)))),t("div",{key:"016cc84afb7161149c321cd73bc40272e59f0e01",class:"xpl-toast__action",ref:s=>{s&&(this.actionSlot=s)}},t("slot",{key:"e3491fe293e3ee7b3b30483a8e7b19d7c584794e",name:"action"})),this.isDismissible&&t("div",{key:"dd7e8aa57d116045287f13b164ae63e603a81f01",class:"xpl-toast__close"},t("xpl-button",{key:"e1af234f5991651a039eba58f21c58e76d3d75eb",variant:"tertiary",size:"sm",iconOnly:!0,icon:"xmark",type:"button","aria-label":"Dismiss notification",onClick:this.dismiss})))}get el(){return e(this)}static get watchers(){return{dismissable:[{handleDismissableChange:0}],timeout:[{handleTimeoutChange:0}]}}};export{c as xpl_toast}
@@ -1 +1 @@
1
- import{r as a,h as e,H as t,g as c}from"./p-CJABLO_1.js";const s=class{constructor(e){a(this,e),this.selectedItemCount=0}componentDidLoad(){const a=this.el.querySelector('[slot="actions-right"]');null!==a&&(a.style.marginLeft="auto")}listenToSelectedItemCountChange(a){this.selectedItemCount=a.detail.length}render(){return e(t,{key:"627eed07ad6f3c06145126cad4b9780a3bec7258",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},e("div",{key:"ccae2ca6612e91c87bae43479bc7aa4bf8731ad3",class:"toolbar"},e("p",{key:"360658d3ed621e4d6d5920baf41c63f8649a7a9f",class:"selected-item-count"},this.selectedItemCount," Selected"),e("div",{key:"386e61abd7294286aca11f0e365f24b466193088",class:"actions"},e("slot",{key:"4999110aaf0762dd60fdb4fbc3540040dadac003",name:"actions-left"}),e("slot",{key:"621b28dcb128f6a89d8ca3f7ec54503c3660a5bc",name:"actions-right"}))))}get el(){return c(this)}};export{s as xpl_toolbar}
1
+ import{r as a,h as e,H as t,g as c}from"./p-CgJEmBQY.js";const s=class{constructor(e){a(this,e),this.selectedItemCount=0}componentDidLoad(){const a=this.el.querySelector('[slot="actions-right"]');null!==a&&(a.style.marginLeft="auto")}listenToSelectedItemCountChange(a){this.selectedItemCount=a.detail.length}render(){return e(t,{key:"627eed07ad6f3c06145126cad4b9780a3bec7258",class:{"xpl-toolbar":!0,dark:!0,hidden:0===this.selectedItemCount}},e("div",{key:"ccae2ca6612e91c87bae43479bc7aa4bf8731ad3",class:"toolbar"},e("p",{key:"360658d3ed621e4d6d5920baf41c63f8649a7a9f",class:"selected-item-count"},this.selectedItemCount," Selected"),e("div",{key:"386e61abd7294286aca11f0e365f24b466193088",class:"actions"},e("slot",{key:"4999110aaf0762dd60fdb4fbc3540040dadac003",name:"actions-left"}),e("slot",{key:"621b28dcb128f6a89d8ca3f7ec54503c3660a5bc",name:"actions-right"}))))}get el(){return c(this)}};export{s as xpl_toolbar}
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,g as i}from"./p-CJABLO_1.js";const a=class{constructor(s){t(this,s),this.selectedItemCountChange=e(this,"selectedItemCountChange",7),this.colCount=0,this.hasAccordion=!1,this.selectedItemCount=0}updateColumnCount(){const t=this.el.querySelectorAll("xpl-table-header-cell");if(t.length===this.colCount)return;const e=Array.from(t).map((t=>null!==t.getAttribute("width")?`${t.getAttribute("width")}px`:"1fr"));this.el.style.setProperty("--xpl-column-widths",e.join(" ")),this.colCount=t.length}listenToDeselectEvent(){this.selectedItemCount=0,this.selectedItemCountChange.emit([])}listenToChangeEvent(){const t=document.querySelectorAll('.xpl-dynamic-table xpl-checkbox:not([class^="xpl-header-accordion__parent-checkbox"]) input:not([disabled])'),e=Array.from(t).filter((t=>t.checked)).map((t=>t.getAttribute("data-id")??""));this.selectedItemCount=e.length,this.selectedItemCountChange.emit(e)}updateRowGap(){this.hasAccordion=null!==this.el.querySelector("xpl-header-accordion")}componentDidLoad(){this.updateColumnCount(),this.updateRowGap()}componentDidUpdate(){this.updateColumnCount()}render(){return s("div",{key:"71265471c7289f1a983b57e15fe122e5fe9a8292",role:"grid",class:{"xpl-dynamic-table":!0,"xpl-dynamic-table--accordion":this.hasAccordion},"aria-colcount":this.colCount},s("slot",{key:"3d7184014570b31d6f7e2eae04b9480f984747e2",name:"header"}),s("slot",{key:"880d79c4c7b2f15d04669e985b5478f3c4095e3c",name:"body"}))}get el(){return i(this)}};export{a as xpl_dynamic_table}
1
+ import{r as t,c as e,h as s,g as i}from"./p-CgJEmBQY.js";const a=class{constructor(s){t(this,s),this.selectedItemCountChange=e(this,"selectedItemCountChange",7),this.colCount=0,this.hasAccordion=!1,this.selectedItemCount=0}updateColumnCount(){const t=this.el.querySelectorAll("xpl-table-header-cell");if(t.length===this.colCount)return;const e=Array.from(t).map((t=>null!==t.getAttribute("width")?`${t.getAttribute("width")}px`:"1fr"));this.el.style.setProperty("--xpl-column-widths",e.join(" ")),this.colCount=t.length}listenToDeselectEvent(){this.selectedItemCount=0,this.selectedItemCountChange.emit([])}listenToChangeEvent(){const t=document.querySelectorAll('.xpl-dynamic-table xpl-checkbox:not([class^="xpl-header-accordion__parent-checkbox"]) input:not([disabled])'),e=Array.from(t).filter((t=>t.checked)).map((t=>t.getAttribute("data-id")??""));this.selectedItemCount=e.length,this.selectedItemCountChange.emit(e)}updateRowGap(){this.hasAccordion=null!==this.el.querySelector("xpl-header-accordion")}componentDidLoad(){this.updateColumnCount(),this.updateRowGap()}componentDidUpdate(){this.updateColumnCount()}render(){return s("div",{key:"71265471c7289f1a983b57e15fe122e5fe9a8292",role:"grid",class:{"xpl-dynamic-table":!0,"xpl-dynamic-table--accordion":this.hasAccordion},"aria-colcount":this.colCount},s("slot",{key:"3d7184014570b31d6f7e2eae04b9480f984747e2",name:"header"}),s("slot",{key:"880d79c4c7b2f15d04669e985b5478f3c4095e3c",name:"body"}))}get el(){return i(this)}};export{a as xpl_dynamic_table}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e}from"./p-CJABLO_1.js";function h(t){const[i,s]=t.split(":"),e=Number(i)>=12?"PM":"AM";return[(Number(i)%12||12).toString(),s,e]}const n=class{constructor(s){t(this,s),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.max="23:59",this.min="00:00",this.step=30,this.mode="single",this.timeFormat="24h",this.allowCustomOption=!1,this.showOptions=!1,this.options=[],this.handleInput=t=>{const i=t.target,s=i.value?.replace(/[^0-9:apmAPM]/g,"");this.value=s},this.handleFocus=()=>{this.showOptions=!0},this.handleBlur=()=>{const t=function(t){if(!t||""===t.trim()||0===t.replace(/[^0-9]/g,"").length)return null;let i=t.trim().toLowerCase();i=i.replace(/(\d)\s+(am|pm)/g,"$1$2"),/^\d{1,2}(am|pm)?$/.test(i)&&(i=i.replace(/(am|pm)?$/,":00$1")),/^\d{1,2}$/.test(i)&&(i=`${i}:00`),/^\d{1,2}:\d{1}$/.test(i)&&(i=`${i}0`);const[s,e]=i.split(":"),h=e.replace(/[^0-9]/g,""),n=i.includes("am");return i.includes("pm")||n?n?`${(Number(s)%12).toString().padStart(2,"0")}:${h}`:`${Number(s)%12+12}:${h}`:`${s.padStart(2,"0")}:${h}`}(this.value??"");this.value=t??void 0},this.handleClick=()=>{this.showOptions=!0}}onValueChange(t){this.valueChange.emit(t),this.updateState(t)}updateState(t){this.formattedValue=this.formatDisplayedTime(t),this.amPm=this.formatDisplayedAmPm(t),this.validateValue()}formatDisplayedTime(t){if(!t)return"";if("12h"===this.timeFormat&&t.includes(":")){const[i,s]=h(t);return`${i}:${s}`}return t}formatDisplayedAmPm(t){if(!t||"12h"!==this.timeFormat)return"";const[,,i]=h(t);return i}validateValue(){if(!this.value)return void(this.hasErrorState=this.required?"required":null);if(!this.value.includes(":")||this.value.trim().length<4||this.value.trim().length>5)return void(this.hasErrorState="Invalid time format, must be HH:MM");const t=String(this.min??"00:00"),i=String(this.max??"23:59");this.hasErrorState=this.value<t||this.value>i?"Out of range":this.allowCustomOption||this.options.some((t=>t.value===this.value))?null:"Invalid option"}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}componentDidLoad(){"range"===this.mode&&console.warn("Range mode is not supported for time inputs at this time."),this.dropdown?.addEventListener("isOpenChange",(t=>{this.showOptions=t.detail}))}componentWillLoad(){this.options=this.getOptions(),this.value&&this.updateState(this.value)}getOptions(){return function(t,i,s,e){const n=t=>{const[i,s]=t.split(":").map(Number);return 60*i+s},r=n(i.toString()),a=n(s.toString()),o=[];for(let i=r;i<=a;i+=t)o.push((u=i,`${Math.floor(u/60).toString().padStart(2,"0")}:${(u%60).toString().padStart(2,"0")}`));var u;return o.map((t=>({label:"12h"===e?function(t){const[i,s,e]=h(t);return`${i}:${s} ${e}`}(t):t,value:t})))}(this.step,String(this.min??"00:00"),String(this.max??"23:59"),this.timeFormat??"24h").map((({label:t,value:i})=>({label:t,value:i,onClick:()=>{this.value=i,this.showOptions=!1}})))}render(){return s(e,{key:"098ef69d355f6bdf03b4bfbab59956f84d5967b4",class:{"xpl-input-time":!0,[`xpl-input-time--mode-${this.mode}`]:!0,"xpl-input-time--error":!!this.hasErrorState}},s("xpl-input",{key:"e73a120a00a6f110e99e1a7d54bc75c024a2e1dc",pre:s("xpl-icon",{class:"xpl-input-time__clock-icon",icon:"clock",size:24}),post:"12h"===this.timeFormat?this.amPm||"AM":void 0,type:"text",_id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,onInput:this.handleInput,value:this.formattedValue,onFocusEvent:this.handleFocus,onBlurEvent:this.handleBlur,onClick:this.handleClick}),!this.readonly&&!this.disabled&&s("xpl-dropdown",{key:"454de00fca4a891eaffc71738538425fa9f4e34f",options:this.options,isOpen:this.showOptions,ref:t=>{this.dropdown=t??void 0},class:"xpl-input-time__dropdown"}))}static get watchers(){return{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}}};export{n as xpl_input_time}
1
+ import{r as t,c as i,h as s,H as e}from"./p-CgJEmBQY.js";function h(t){const[i,s]=t.split(":"),e=Number(i)>=12?"PM":"AM";return[(Number(i)%12||12).toString(),s,e]}const n=class{constructor(s){t(this,s),this.valueChange=i(this,"valueChange",7),this.hasErrorStateChanged=i(this,"hasErrorStateChanged",7),this.max="23:59",this.min="00:00",this.step=30,this.mode="single",this.timeFormat="24h",this.allowCustomOption=!1,this.showOptions=!1,this.options=[],this.handleInput=t=>{const i=t.target,s=i.value?.replace(/[^0-9:apmAPM]/g,"");this.value=s},this.handleFocus=()=>{this.showOptions=!0},this.handleBlur=()=>{const t=function(t){if(!t||""===t.trim()||0===t.replace(/[^0-9]/g,"").length)return null;let i=t.trim().toLowerCase();i=i.replace(/(\d)\s+(am|pm)/g,"$1$2"),/^\d{1,2}(am|pm)?$/.test(i)&&(i=i.replace(/(am|pm)?$/,":00$1")),/^\d{1,2}$/.test(i)&&(i=`${i}:00`),/^\d{1,2}:\d{1}$/.test(i)&&(i=`${i}0`);const[s,e]=i.split(":"),h=e.replace(/[^0-9]/g,""),n=i.includes("am");return i.includes("pm")||n?n?`${(Number(s)%12).toString().padStart(2,"0")}:${h}`:`${Number(s)%12+12}:${h}`:`${s.padStart(2,"0")}:${h}`}(this.value??"");this.value=t??void 0},this.handleClick=()=>{this.showOptions=!0}}onValueChange(t){this.valueChange.emit(t),this.updateState(t)}updateState(t){this.formattedValue=this.formatDisplayedTime(t),this.amPm=this.formatDisplayedAmPm(t),this.validateValue()}formatDisplayedTime(t){if(!t)return"";if("12h"===this.timeFormat&&t.includes(":")){const[i,s]=h(t);return`${i}:${s}`}return t}formatDisplayedAmPm(t){if(!t||"12h"!==this.timeFormat)return"";const[,,i]=h(t);return i}validateValue(){if(!this.value)return void(this.hasErrorState=this.required?"required":null);if(!this.value.includes(":")||this.value.trim().length<4||this.value.trim().length>5)return void(this.hasErrorState="Invalid time format, must be HH:MM");const t=String(this.min??"00:00"),i=String(this.max??"23:59");this.hasErrorState=this.value<t||this.value>i?"Out of range":this.allowCustomOption||this.options.some((t=>t.value===this.value))?null:"Invalid option"}onHasErrorStateChanged(t){this.hasErrorStateChanged.emit(t)}componentDidLoad(){"range"===this.mode&&console.warn("Range mode is not supported for time inputs at this time."),this.dropdown?.addEventListener("isOpenChange",(t=>{this.showOptions=t.detail}))}componentWillLoad(){this.options=this.getOptions(),this.value&&this.updateState(this.value)}getOptions(){return function(t,i,s,e){const n=t=>{const[i,s]=t.split(":").map(Number);return 60*i+s},r=n(i.toString()),a=n(s.toString()),o=[];for(let i=r;i<=a;i+=t)o.push((u=i,`${Math.floor(u/60).toString().padStart(2,"0")}:${(u%60).toString().padStart(2,"0")}`));var u;return o.map((t=>({label:"12h"===e?function(t){const[i,s,e]=h(t);return`${i}:${s} ${e}`}(t):t,value:t})))}(this.step,String(this.min??"00:00"),String(this.max??"23:59"),this.timeFormat??"24h").map((({label:t,value:i})=>({label:t,value:i,onClick:()=>{this.value=i,this.showOptions=!1}})))}render(){return s(e,{key:"098ef69d355f6bdf03b4bfbab59956f84d5967b4",class:{"xpl-input-time":!0,[`xpl-input-time--mode-${this.mode}`]:!0,"xpl-input-time--error":!!this.hasErrorState}},s("xpl-input",{key:"e73a120a00a6f110e99e1a7d54bc75c024a2e1dc",pre:s("xpl-icon",{class:"xpl-input-time__clock-icon",icon:"clock",size:24}),post:"12h"===this.timeFormat?this.amPm||"AM":void 0,type:"text",_id:this.inputId,disabled:this.disabled,name:this.name,required:this.required,readonly:this.readonly,placeholder:this.placeholder,max:this.max,min:this.min,onInput:this.handleInput,value:this.formattedValue,onFocusEvent:this.handleFocus,onBlurEvent:this.handleBlur,onClick:this.handleClick}),!this.readonly&&!this.disabled&&s("xpl-dropdown",{key:"454de00fca4a891eaffc71738538425fa9f4e34f",options:this.options,isOpen:this.showOptions,ref:t=>{this.dropdown=t??void 0},class:"xpl-input-time__dropdown"}))}static get watchers(){return{value:[{onValueChange:0}],hasErrorState:[{onHasErrorStateChanged:0}]}}};export{n as xpl_input_time}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e,H as i,g as o}from"./p-CJABLO_1.js";import{a as n,c as a,o as l,f as h,b as c,h as d}from"./p-1M1pu0C2.js";import{i as r}from"./p-Dqb1pIRo.js";const p=4;function f(t){const{offsetPx:s=p,flipFallbackPlacements:e,sizeApply:i}=t;return[l(s),h(e&&e.length>0?{fallbackPlacements:e}:{}),c({apply:i}),d()]}const u={rowHeight:45,overscan:20,virtualizeFrom:200};function m(t,s){const{groupName:i,options:o,subtitle:n,...a}=t;if(i)return e("xpl-dropdown-group",{groupName:i,options:o,...a});const l=void 0!==s;return e("xpl-dropdown-option",{class:l?"xpl-dropdown-option--virtual":void 0,style:l?{transform:`translateY(${s*u.rowHeight}px)`}:void 0,subtitle:n,...a})}const g=class{constructor(e){t(this,e),this.isOpenChange=s(this,"isOpenChange",7),this.virtualEnd=0,this.virtualStart=0,this.isOpen=!1,this.closeOnSelect=!0,this.mode="single",this.anchorToTrigger=!1,this.placement="bottom-start",this.selectOnFocus=!1,this.floating=null,this.virtualScrollRaf=null,this.openAlignmentRaf=null,this.previousOptionCount=0,this.handleClickOutside=({target:t})=>{const{triggerId:s}=this,e=t,i=s?document.getElementById(s):null,o=i?.contains(e),n=this.hostElement.contains(e),a=e?.closest("label"),l=!!a&&!!s&&a.getAttribute("for")===s;n||o||l||!this.isOpen||(this.isOpen=!1)},this.handleKeyDown=t=>{"Escape"===t.key&&this.isOpen&&(this.isOpen=!1)},this.handleVirtualScroll=()=>{null===this.virtualScrollRaf&&(this.virtualScrollRaf=requestAnimationFrame((()=>{this.virtualScrollRaf=null,this.updateVirtualRange()})))},this.setListEl=t=>{t!==this.listEl&&(this.listEl=t,this.listResizeObserver?.disconnect(),t&&"undefined"!=typeof ResizeObserver&&(this.listResizeObserver??(this.listResizeObserver=new ResizeObserver((()=>{this.isVirtualized&&this.handleVirtualScroll()}))),this.listResizeObserver.observe(t)))},this.scheduleOpenAlignment=()=>{null===this.openAlignmentRaf&&(this.openAlignmentRaf=requestAnimationFrame((()=>{this.openAlignmentRaf=null,this.scrollSelectedIntoView(),this.updateVirtualRange()})))}}onOptionsChanged(){const t=this.options?.length??0,s=t!==this.previousOptionCount;if(this.previousOptionCount=t,!this.isVirtualized)return this.virtualStart=0,void(this.virtualEnd=0);const e=this.listEl;if(e){const i=Math.max(0,t*u.rowHeight-e.clientHeight);if(e.scrollTop>i&&(e.scrollTop=i),this.isOpen&&s){const t=this.options?.findIndex((t=>t.isSelected))??-1;t>=0&&(t<this.virtualStart||t>=this.virtualEnd)&&this.scrollSelectedIntoView()}}this.updateVirtualRange()}onAnchorToTriggerChanged(){this.isOpen&&this.startPositioning()}onFlipFallbackPlacementsChanged(){this.isOpen&&this.anchorToTrigger&&this.startPositioning()}onPlacementChanged(){this.isOpen&&this.anchorToTrigger&&this.startPositioning()}onTriggerIdChanged(){this.isOpen&&this.startPositioning()}onSelectedValuesChanged(t,s=!1){if(this.options&&this.options.length>0){this.options.flatMap((t=>t.groupName&&t.options?t.options:[t])).forEach((s=>{const e=s.value||s.label||"";if("single"===this.mode)s.isSelected=e===t;else{const i=Array.isArray(t)?t:[];s.isSelected=i.includes(e)}}));const e=t=>(t.options=t.groupName?t.options?.map(e):void 0,t);this.options=this.options.map(e),this.update&&!s&&this.update(null,{component:this})}}onIsOpenStateChange(t){this.isOpenChange.emit(t),t?(this.startPositioning(),this.alignOnOpen()):(this.stopPositioning(),this.cancelVirtualScroll(),this.virtualStart=0,this.virtualEnd=0)}connectedCallback(){r()&&(document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("keydown",this.handleKeyDown))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleKeyDown),this.stopPositioning(),this.cancelVirtualScroll(),this.listResizeObserver?.disconnect()}componentWillLoad(){this.handleSelect=this.handleSelect.bind(this),this.selectedValues&&this.onSelectedValuesChanged(this.selectedValues,!0),this.previousOptionCount=this.options?.length??0}componentDidLoad(){this.isOpen&&(this.startPositioning(),this.alignOnOpen())}async handleSelect(t,{component:s}){const{hostElement:e,mode:i,options:o,update:n}=this,a="single"===i,l="multi"===i;if(o){const t=s.hostElement.value||s.hostElement.label;if(o.some((t=>t.groupName))){o.flatMap((t=>t.groupName&&t.options?t.options:[t])).forEach((e=>{const i=(e.value||e.label)===t;a?(e.isSelected=i,s.hostElement.isSelected=!0):l&&i&&(e.isSelected=!e.isSelected,s.hostElement.isSelected=e.isSelected)}));const e=t=>(t.options=t.groupName?t.options?.map(e):void 0,t);this.options=o.map(e)}else o.forEach((e=>{const i=(e.value||e.label)===t;a?(e.isSelected=i,i&&(s.hostElement.isSelected=!0)):l&&i&&(e.isSelected=!e.isSelected,s.hostElement.isSelected=e.isSelected)})),this.options=[...o]}else a?Array.from(e.querySelectorAll("xpl-dropdown-option")).forEach((t=>{t.isSelected=t===s.hostElement})):l&&(s.isSelected=!s.isSelected);n&&n(t,{component:this})}startPositioning(){if(!this.anchorToTrigger||!this.triggerId)return;const t=document.getElementById(this.triggerId);t&&(this.stopPositioning(),this.floating=function(t,s,e){if(!r())return{update:async()=>{},stop:()=>{}};const{placement:i,strategy:o,middleware:l,onPosition:h,onReferenceHidden:c,onError:d}=e;let p=0,f=null,u=!0;const m=async()=>{if(!u)return;const e=p;try{const n=await a(t,s,{placement:i,strategy:o,middleware:l});if(!u||e!==p)return;if(n.middlewareData.hide?.referenceHidden&&!0===c?.())return;h(n)}catch(t){if(!u||e!==p)return;d?.(t)}};return f=n(t,s,m),{update:m,stop:()=>{u=!1,p+=1,f&&(f(),f=null)}}}(t,this.hostElement,{placement:this.placement,strategy:"fixed",middleware:f({flipFallbackPlacements:this.flipFallbackPlacements,sizeApply:({availableHeight:t,rects:s})=>{const e=this.hostElement.querySelector(".xpl-dropdown-list");let i=0;if(e){const t=Array.from(this.hostElement.children),s=t.indexOf(e);t.slice(0,s).forEach((t=>{t instanceof HTMLElement&&(i+=t.offsetHeight)}))}const o=getComputedStyle(this.hostElement),n=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)+parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),a=e?parseFloat(getComputedStyle(e).getPropertyValue("--xpl-dropdown-list-max-height")):1/0,l=Math.min(a,Math.max(0,t-i-n));Object.assign(this.hostElement.style,{width:`${s.reference.width}px`}),e&&(e.style.maxHeight=`${l}px`)}}),onPosition:({x:t,y:s,placement:e})=>{if(!this.floating)return;const i="top"===e.split("-")[0];Object.assign(this.hostElement.style,{left:`${t}px`,top:`${s}px`}),this.hostElement.classList.toggle("xpl-dropdown--above",i),this.hostElement.classList.toggle("xpl-dropdown--below",!i)},onReferenceHidden:()=>(this.isOpen=!1,!0)}))}stopPositioning(){this.floating?.stop(),this.floating=null,this.hostElement.style.left="",this.hostElement.style.top="",this.hostElement.style.width="",this.hostElement.querySelector(".xpl-dropdown-list")?.style.removeProperty("max-height"),this.hostElement.classList.remove("xpl-dropdown--above","xpl-dropdown--below")}cancelVirtualScroll(){null!==this.virtualScrollRaf&&(cancelAnimationFrame(this.virtualScrollRaf),this.virtualScrollRaf=null),null!==this.openAlignmentRaf&&(cancelAnimationFrame(this.openAlignmentRaf),this.openAlignmentRaf=null)}alignOnOpen(){this.scrollSelectedIntoView(),this.updateVirtualRange(),this.scheduleOpenAlignment()}scrollSelectedIntoView(){const{listEl:t,options:s}=this;if(!t||!s?.length||!this.isVirtualized)return;const e=s.findIndex((t=>t.isSelected));if(e<0)return;const{rowHeight:i}=u,o=e*i-(t.clientHeight-i)/2,n=Math.max(0,s.length*i-t.clientHeight);t.scrollTop=Math.max(0,Math.min(o,n))}updateVirtualRange(){const t=this.listEl,s=this.options?.length??0;if(!t||!s)return;const{rowHeight:e,overscan:i}=u,o=Math.floor(t.scrollTop/e),n=Math.ceil(t.clientHeight/e)||1,a=Math.max(0,o-i),l=Math.min(s,o+n+i);a===this.virtualStart&&l===this.virtualEnd||(this.virtualStart=a,this.virtualEnd=l)}get isVirtualized(){const{options:t}=this;return!!t&&t.length>u.virtualizeFrom&&t.every((t=>!t.groupName&&!t.subtitle))}render(){const{isOpen:t,mode:s,options:o}=this,n=this.isVirtualized;let a;if(o&&o.length)if(n){const{rowHeight:t,overscan:s}=u,i=o.length,n=Math.min(this.virtualStart,i),l=Math.min(i,Math.ceil(300/t)+2*s);a=e("li",{key:"8430b65a3af7d86f95d4e5f7097fdd54c5d26b57",class:"xpl-dropdown__virtual-sizer",style:{height:i*t+"px"}},o.slice(n,this.virtualEnd>n?this.virtualEnd:l).map(((t,s)=>m(t,n+s))))}else a=o.map((t=>m(t)));else a=e("slot",{key:"1d251963757071def866eb219bb3a33f3bc6df5c",name:"options"});return e(i,{key:"7a3687087564c55a008fd1bd2fece17c1dfb23dd","aria-expanded":t?"true":"false",class:{"xpl-dropdown":!0,"xpl-dropdown--multi":"multi"===s,"xpl-dropdown--open":t,"xpl-dropdown--anchor-to-trigger":this.anchorToTrigger,"xpl-dropdown--virtualized":n},role:"listbox"},e("slot",{key:"46caefc7c1f62c63c45340ade0b1586c9ad64238",name:"header"}),e("ul",{key:"40c83a3f32bceec5814fd95fc6d0256a729c86ce",class:"xpl-dropdown-list",ref:t=>{this.setListEl(t)},onScroll:n?this.handleVirtualScroll:void 0},a))}get hostElement(){return o(this)}static get watchers(){return{options:[{onOptionsChanged:0}],anchorToTrigger:[{onAnchorToTriggerChanged:0}],flipFallbackPlacements:[{onFlipFallbackPlacementsChanged:0}],placement:[{onPlacementChanged:0}],triggerId:[{onTriggerIdChanged:0}],selectedValues:[{onSelectedValuesChanged:0}],isOpen:[{onIsOpenStateChange:0}]}}},b=class{constructor(s){t(this,s)}render(){const{groupName:t,options:s}=this,o=s&&s.length&&s.map((({groupName:t,...s})=>t?e("xpl-dropdown-group",{label:t,...s}):e("xpl-dropdown-option",{...s})));return e(i,{key:"c9a5ff35e59c6d64fb3b2bdf8d8e9381f53f843b",role:"group","aria-label":t},e("li",{key:"610646a5285bbda17ad9ef1a77abd8ccff657676",class:"xpl-dropdown-list-item"},e("xpl-dropdown-heading",{key:"6daa3fa23425eae46c2d85370523af456c2dced3",label:t}),e("ul",{key:"0409673dbab16cd5fc72c5f7a50d23c531d91d66",class:"xpl-dropdown-list"},o||e("slot",{key:"19d7a3d59640af4759076e90c055556fa4a90f5f",name:"options"}))))}},w=class{constructor(s){t(this,s)}render(){return e(i,{key:"06a117cb42389f17449401733d384b6669c39859",class:{"xpl-dropdown-heading":!0},role:"presentation"},e("span",{key:"58262cf943e31880cf1d942af06dfefaa380cf8b"},this.label||e("slot",{key:"3e0081cc6c9fc738f4d14c9f9838a8cff2c01b21",name:"heading"})))}},x=class{constructor(s){t(this,s),this.dropdown=null}componentWillLoad(){this.dropdown=this.hostElement.closest("xpl-dropdown")}handleClick(t){if(!this.dropdown)return;const{closeOnSelect:s,mode:e}=this.dropdown;t.x&&t.y&&(this.dropdown.handleSelect(t,{component:this}),"single"===e&&s&&(this.dropdown.isOpen=!1))}handleKeyup(t){if(!this.dropdown)return;const{dropdown:s}=this,{closeOnSelect:e,mode:i,selectOnFocus:o}=this.dropdown;if(o&&["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Tab"].includes(t.key)){const{activeElement:o}=document,n=o?.closest("xpl-dropdown-option")??null;return s.handleSelect(t,{component:{hostElement:n}}),void("single"===i&&e&&(this.dropdown.isOpen=!1))}["Escape","Enter"].includes(t.key)&&(s.handleSelect(t,{component:this}),("Escape"===t.key||this.dropdown.closeOnSelect&&"Enter"===t.key)&&(this.dropdown.isOpen=!1))}connectedCallback(){this.hostElement.addEventListener("click",this.handleClick.bind(this)),this.hostElement.addEventListener("keyup",this.handleKeyup.bind(this))}disconnectedCallback(){this.hostElement.removeEventListener("click",this.handleClick),this.hostElement.removeEventListener("keyup",this.handleKeyup)}render(){const{label:t,isSelected:s,isDisabled:o,value:n,subtitle:a,icon:l}=this;return e(i,{key:"cc7bdfecd0354f3b1f9080535e3014d946a697c4",class:{"xpl-dropdown-option":!0,"xpl-dropdown-option--disabled":!!o,"xpl-dropdown-option--selected":!!s},role:"option","aria-checked":s,"aria-disabled":o,"aria-selected":s,value:n},e("li",{key:"4ef95d229611225a2019d0d8871b81f2ae603b6a",class:"xpl-dropdown-list-item"},l&&e("xpl-icon",{key:"e8380b63e1aac6fb00e36ae565147edfd4588415",class:"xpl-dropdown-list-item__icon",icon:l,size:20}),t||e("slot",{key:"0c040b57a16cd9b2e9fbf18d04dd1cde215f81b1",name:"option"}),a&&e("span",{key:"f8518da421611e4f3e72f28f38ac294bca9e9aad",class:"xpl-dropdown-list-item__subtitle"},a)))}get hostElement(){return o(this)}};export{g as xpl_dropdown,b as xpl_dropdown_group,w as xpl_dropdown_heading,x as xpl_dropdown_option}
1
+ import{r as t,c as s,h as e,H as i,g as o}from"./p-CgJEmBQY.js";import{a as n,c as a,o as l,f as h,b as c,h as d}from"./p-1M1pu0C2.js";import{i as r}from"./p-Dqb1pIRo.js";const p=4;function f(t){const{offsetPx:s=p,flipFallbackPlacements:e,sizeApply:i}=t;return[l(s),h(e&&e.length>0?{fallbackPlacements:e}:{}),c({apply:i}),d()]}const u={rowHeight:45,overscan:20,virtualizeFrom:200};function m(t,s){const{groupName:i,options:o,subtitle:n,...a}=t;if(i)return e("xpl-dropdown-group",{groupName:i,options:o,...a});const l=void 0!==s;return e("xpl-dropdown-option",{class:l?"xpl-dropdown-option--virtual":void 0,style:l?{transform:`translateY(${s*u.rowHeight}px)`}:void 0,subtitle:n,...a})}const g=class{constructor(e){t(this,e),this.isOpenChange=s(this,"isOpenChange",7),this.virtualEnd=0,this.virtualStart=0,this.isOpen=!1,this.closeOnSelect=!0,this.mode="single",this.anchorToTrigger=!1,this.placement="bottom-start",this.selectOnFocus=!1,this.floating=null,this.virtualScrollRaf=null,this.openAlignmentRaf=null,this.previousOptionCount=0,this.handleClickOutside=({target:t})=>{const{triggerId:s}=this,e=t,i=s?document.getElementById(s):null,o=i?.contains(e),n=this.hostElement.contains(e),a=e?.closest("label"),l=!!a&&!!s&&a.getAttribute("for")===s;n||o||l||!this.isOpen||(this.isOpen=!1)},this.handleKeyDown=t=>{"Escape"===t.key&&this.isOpen&&(this.isOpen=!1)},this.handleVirtualScroll=()=>{null===this.virtualScrollRaf&&(this.virtualScrollRaf=requestAnimationFrame((()=>{this.virtualScrollRaf=null,this.updateVirtualRange()})))},this.setListEl=t=>{t!==this.listEl&&(this.listEl=t,this.listResizeObserver?.disconnect(),t&&"undefined"!=typeof ResizeObserver&&(this.listResizeObserver??(this.listResizeObserver=new ResizeObserver((()=>{this.isVirtualized&&this.handleVirtualScroll()}))),this.listResizeObserver.observe(t)))},this.scheduleOpenAlignment=()=>{null===this.openAlignmentRaf&&(this.openAlignmentRaf=requestAnimationFrame((()=>{this.openAlignmentRaf=null,this.scrollSelectedIntoView(),this.updateVirtualRange()})))}}onOptionsChanged(){const t=this.options?.length??0,s=t!==this.previousOptionCount;if(this.previousOptionCount=t,!this.isVirtualized)return this.virtualStart=0,void(this.virtualEnd=0);const e=this.listEl;if(e){const i=Math.max(0,t*u.rowHeight-e.clientHeight);if(e.scrollTop>i&&(e.scrollTop=i),this.isOpen&&s){const t=this.options?.findIndex((t=>t.isSelected))??-1;t>=0&&(t<this.virtualStart||t>=this.virtualEnd)&&this.scrollSelectedIntoView()}}this.updateVirtualRange()}onAnchorToTriggerChanged(){this.isOpen&&this.startPositioning()}onFlipFallbackPlacementsChanged(){this.isOpen&&this.anchorToTrigger&&this.startPositioning()}onPlacementChanged(){this.isOpen&&this.anchorToTrigger&&this.startPositioning()}onTriggerIdChanged(){this.isOpen&&this.startPositioning()}onSelectedValuesChanged(t,s=!1){if(this.options&&this.options.length>0){this.options.flatMap((t=>t.groupName&&t.options?t.options:[t])).forEach((s=>{const e=s.value||s.label||"";if("single"===this.mode)s.isSelected=e===t;else{const i=Array.isArray(t)?t:[];s.isSelected=i.includes(e)}}));const e=t=>(t.options=t.groupName?t.options?.map(e):void 0,t);this.options=this.options.map(e),this.update&&!s&&this.update(null,{component:this})}}onIsOpenStateChange(t){this.isOpenChange.emit(t),t?(this.startPositioning(),this.alignOnOpen()):(this.stopPositioning(),this.cancelVirtualScroll(),this.virtualStart=0,this.virtualEnd=0)}connectedCallback(){r()&&(document.addEventListener("mousedown",this.handleClickOutside),document.addEventListener("keydown",this.handleKeyDown))}disconnectedCallback(){document.removeEventListener("mousedown",this.handleClickOutside),document.removeEventListener("keydown",this.handleKeyDown),this.stopPositioning(),this.cancelVirtualScroll(),this.listResizeObserver?.disconnect()}componentWillLoad(){this.handleSelect=this.handleSelect.bind(this),this.selectedValues&&this.onSelectedValuesChanged(this.selectedValues,!0),this.previousOptionCount=this.options?.length??0}componentDidLoad(){this.isOpen&&(this.startPositioning(),this.alignOnOpen())}async handleSelect(t,{component:s}){const{hostElement:e,mode:i,options:o,update:n}=this,a="single"===i,l="multi"===i;if(o){const t=s.hostElement.value||s.hostElement.label;if(o.some((t=>t.groupName))){o.flatMap((t=>t.groupName&&t.options?t.options:[t])).forEach((e=>{const i=(e.value||e.label)===t;a?(e.isSelected=i,s.hostElement.isSelected=!0):l&&i&&(e.isSelected=!e.isSelected,s.hostElement.isSelected=e.isSelected)}));const e=t=>(t.options=t.groupName?t.options?.map(e):void 0,t);this.options=o.map(e)}else o.forEach((e=>{const i=(e.value||e.label)===t;a?(e.isSelected=i,i&&(s.hostElement.isSelected=!0)):l&&i&&(e.isSelected=!e.isSelected,s.hostElement.isSelected=e.isSelected)})),this.options=[...o]}else a?Array.from(e.querySelectorAll("xpl-dropdown-option")).forEach((t=>{t.isSelected=t===s.hostElement})):l&&(s.isSelected=!s.isSelected);n&&n(t,{component:this})}startPositioning(){if(!this.anchorToTrigger||!this.triggerId)return;const t=document.getElementById(this.triggerId);t&&(this.stopPositioning(),this.floating=function(t,s,e){if(!r())return{update:async()=>{},stop:()=>{}};const{placement:i,strategy:o,middleware:l,onPosition:h,onReferenceHidden:c,onError:d}=e;let p=0,f=null,u=!0;const m=async()=>{if(!u)return;const e=p;try{const n=await a(t,s,{placement:i,strategy:o,middleware:l});if(!u||e!==p)return;if(n.middlewareData.hide?.referenceHidden&&!0===c?.())return;h(n)}catch(t){if(!u||e!==p)return;d?.(t)}};return f=n(t,s,m),{update:m,stop:()=>{u=!1,p+=1,f&&(f(),f=null)}}}(t,this.hostElement,{placement:this.placement,strategy:"fixed",middleware:f({flipFallbackPlacements:this.flipFallbackPlacements,sizeApply:({availableHeight:t,rects:s})=>{const e=this.hostElement.querySelector(".xpl-dropdown-list");let i=0;if(e){const t=Array.from(this.hostElement.children),s=t.indexOf(e);t.slice(0,s).forEach((t=>{t instanceof HTMLElement&&(i+=t.offsetHeight)}))}const o=getComputedStyle(this.hostElement),n=parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)+parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),a=e?parseFloat(getComputedStyle(e).getPropertyValue("--xpl-dropdown-list-max-height")):1/0,l=Math.min(a,Math.max(0,t-i-n));Object.assign(this.hostElement.style,{width:`${s.reference.width}px`}),e&&(e.style.maxHeight=`${l}px`)}}),onPosition:({x:t,y:s,placement:e})=>{if(!this.floating)return;const i="top"===e.split("-")[0];Object.assign(this.hostElement.style,{left:`${t}px`,top:`${s}px`}),this.hostElement.classList.toggle("xpl-dropdown--above",i),this.hostElement.classList.toggle("xpl-dropdown--below",!i)},onReferenceHidden:()=>(this.isOpen=!1,!0)}))}stopPositioning(){this.floating?.stop(),this.floating=null,this.hostElement.style.left="",this.hostElement.style.top="",this.hostElement.style.width="",this.hostElement.querySelector(".xpl-dropdown-list")?.style.removeProperty("max-height"),this.hostElement.classList.remove("xpl-dropdown--above","xpl-dropdown--below")}cancelVirtualScroll(){null!==this.virtualScrollRaf&&(cancelAnimationFrame(this.virtualScrollRaf),this.virtualScrollRaf=null),null!==this.openAlignmentRaf&&(cancelAnimationFrame(this.openAlignmentRaf),this.openAlignmentRaf=null)}alignOnOpen(){this.scrollSelectedIntoView(),this.updateVirtualRange(),this.scheduleOpenAlignment()}scrollSelectedIntoView(){const{listEl:t,options:s}=this;if(!t||!s?.length||!this.isVirtualized)return;const e=s.findIndex((t=>t.isSelected));if(e<0)return;const{rowHeight:i}=u,o=e*i-(t.clientHeight-i)/2,n=Math.max(0,s.length*i-t.clientHeight);t.scrollTop=Math.max(0,Math.min(o,n))}updateVirtualRange(){const t=this.listEl,s=this.options?.length??0;if(!t||!s)return;const{rowHeight:e,overscan:i}=u,o=Math.floor(t.scrollTop/e),n=Math.ceil(t.clientHeight/e)||1,a=Math.max(0,o-i),l=Math.min(s,o+n+i);a===this.virtualStart&&l===this.virtualEnd||(this.virtualStart=a,this.virtualEnd=l)}get isVirtualized(){const{options:t}=this;return!!t&&t.length>u.virtualizeFrom&&t.every((t=>!t.groupName&&!t.subtitle))}render(){const{isOpen:t,mode:s,options:o}=this,n=this.isVirtualized;let a;if(o&&o.length)if(n){const{rowHeight:t,overscan:s}=u,i=o.length,n=Math.min(this.virtualStart,i),l=Math.min(i,Math.ceil(300/t)+2*s);a=e("li",{key:"8430b65a3af7d86f95d4e5f7097fdd54c5d26b57",class:"xpl-dropdown__virtual-sizer",style:{height:i*t+"px"}},o.slice(n,this.virtualEnd>n?this.virtualEnd:l).map(((t,s)=>m(t,n+s))))}else a=o.map((t=>m(t)));else a=e("slot",{key:"1d251963757071def866eb219bb3a33f3bc6df5c",name:"options"});return e(i,{key:"7a3687087564c55a008fd1bd2fece17c1dfb23dd","aria-expanded":t?"true":"false",class:{"xpl-dropdown":!0,"xpl-dropdown--multi":"multi"===s,"xpl-dropdown--open":t,"xpl-dropdown--anchor-to-trigger":this.anchorToTrigger,"xpl-dropdown--virtualized":n},role:"listbox"},e("slot",{key:"46caefc7c1f62c63c45340ade0b1586c9ad64238",name:"header"}),e("ul",{key:"40c83a3f32bceec5814fd95fc6d0256a729c86ce",class:"xpl-dropdown-list",ref:t=>{this.setListEl(t)},onScroll:n?this.handleVirtualScroll:void 0},a))}get hostElement(){return o(this)}static get watchers(){return{options:[{onOptionsChanged:0}],anchorToTrigger:[{onAnchorToTriggerChanged:0}],flipFallbackPlacements:[{onFlipFallbackPlacementsChanged:0}],placement:[{onPlacementChanged:0}],triggerId:[{onTriggerIdChanged:0}],selectedValues:[{onSelectedValuesChanged:0}],isOpen:[{onIsOpenStateChange:0}]}}},b=class{constructor(s){t(this,s)}render(){const{groupName:t,options:s}=this,o=s&&s.length&&s.map((({groupName:t,...s})=>t?e("xpl-dropdown-group",{label:t,...s}):e("xpl-dropdown-option",{...s})));return e(i,{key:"c9a5ff35e59c6d64fb3b2bdf8d8e9381f53f843b",role:"group","aria-label":t},e("li",{key:"610646a5285bbda17ad9ef1a77abd8ccff657676",class:"xpl-dropdown-list-item"},e("xpl-dropdown-heading",{key:"6daa3fa23425eae46c2d85370523af456c2dced3",label:t}),e("ul",{key:"0409673dbab16cd5fc72c5f7a50d23c531d91d66",class:"xpl-dropdown-list"},o||e("slot",{key:"19d7a3d59640af4759076e90c055556fa4a90f5f",name:"options"}))))}},w=class{constructor(s){t(this,s)}render(){return e(i,{key:"06a117cb42389f17449401733d384b6669c39859",class:{"xpl-dropdown-heading":!0},role:"presentation"},e("span",{key:"58262cf943e31880cf1d942af06dfefaa380cf8b"},this.label||e("slot",{key:"3e0081cc6c9fc738f4d14c9f9838a8cff2c01b21",name:"heading"})))}},x=class{constructor(s){t(this,s),this.dropdown=null}componentWillLoad(){this.dropdown=this.hostElement.closest("xpl-dropdown")}handleClick(t){if(!this.dropdown)return;const{closeOnSelect:s,mode:e}=this.dropdown;t.x&&t.y&&(this.dropdown.handleSelect(t,{component:this}),"single"===e&&s&&(this.dropdown.isOpen=!1))}handleKeyup(t){if(!this.dropdown)return;const{dropdown:s}=this,{closeOnSelect:e,mode:i,selectOnFocus:o}=this.dropdown;if(o&&["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Tab"].includes(t.key)){const{activeElement:o}=document,n=o?.closest("xpl-dropdown-option")??null;return s.handleSelect(t,{component:{hostElement:n}}),void("single"===i&&e&&(this.dropdown.isOpen=!1))}["Escape","Enter"].includes(t.key)&&(s.handleSelect(t,{component:this}),("Escape"===t.key||this.dropdown.closeOnSelect&&"Enter"===t.key)&&(this.dropdown.isOpen=!1))}connectedCallback(){this.hostElement.addEventListener("click",this.handleClick.bind(this)),this.hostElement.addEventListener("keyup",this.handleKeyup.bind(this))}disconnectedCallback(){this.hostElement.removeEventListener("click",this.handleClick),this.hostElement.removeEventListener("keyup",this.handleKeyup)}render(){const{label:t,isSelected:s,isDisabled:o,value:n,subtitle:a,icon:l}=this;return e(i,{key:"cc7bdfecd0354f3b1f9080535e3014d946a697c4",class:{"xpl-dropdown-option":!0,"xpl-dropdown-option--disabled":!!o,"xpl-dropdown-option--selected":!!s},role:"option","aria-checked":s,"aria-disabled":o,"aria-selected":s,value:n},e("li",{key:"4ef95d229611225a2019d0d8871b81f2ae603b6a",class:"xpl-dropdown-list-item"},l&&e("xpl-icon",{key:"e8380b63e1aac6fb00e36ae565147edfd4588415",class:"xpl-dropdown-list-item__icon",icon:l,size:20}),t||e("slot",{key:"0c040b57a16cd9b2e9fbf18d04dd1cde215f81b1",name:"option"}),a&&e("span",{key:"f8518da421611e4f3e72f28f38ac294bca9e9aad",class:"xpl-dropdown-list-item__subtitle"},a)))}get hostElement(){return o(this)}};export{g as xpl_dropdown,b as xpl_dropdown_group,w as xpl_dropdown_heading,x as xpl_dropdown_option}
@@ -1 +1 @@
1
- import{r as t,c as i,f as s,h,H as o,g as e}from"./p-CJABLO_1.js";import{i as n}from"./p-Dqb1pIRo.js";import{c as l,a,o as r,f as p,s as c}from"./p-1M1pu0C2.js";const d=".xpl-spotlight__dismiss button, .xpl-spotlight__actions button";let u=0;const g={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end"},m={top:"bottom-left","top-start":"bottom-left","top-end":"bottom-right",bottom:"top-left","bottom-start":"top-left","bottom-end":"top-right",left:"top-right","left-start":"top-right","left-end":"bottom-right",right:"top-left","right-start":"top-left","right-end":"bottom-left"},f=class{constructor(h){t(this,h),this.dismiss=i(this,"dismiss",7),this.primaryAction=i(this,"primaryAction",7),this.secondaryAction=i(this,"secondaryAction",7),this.targetClick=i(this,"targetClick",7),this.cleanupAutoUpdate=null,this.enterVisibleFrameId=null,this.focusFrameId=null,this.hasCompletedInitialLoad=!1,this.headingId=(u+=1,`xpl-spotlight-heading-${u}`),this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!1,this.positioningGeneration=0,this.previousFocus=null,this.referenceEl=null,this.shouldMoveFocusOnRender=!1,this.shouldReinitializeAfterReconnect=!1,this.slotContentObserver=null,this.hasBodySlotContent=!1,this.hasFloatingPosition=!1,this.hasImageSlotContent=!1,this.hasTitleSlotContent=!1,this.dialogLabelId=void 0,this.isVisible=!1,this.resolvedAnchorPosition="top-left",this.actionLayout="default",this.anchorPosition="top-left",this.currentStep=1,this.isDismissible=!0,this.isOpen=!0,this.primaryActionLabel="Next",this.secondaryActionLabel="Back",this.showActions=!0,this.showImage=!0,this.showSteps=!0,this.totalSteps=1,this.emitDismiss=()=>{this.dismiss.emit()},this.handleDismissClick=()=>{this.emitDismiss()},this.handlePrimaryClick=()=>{this.primaryAction.emit()},this.handleSecondaryClick=()=>{this.secondaryAction.emit()},this.handleTargetClick=()=>{this.targetClick.emit()},this.syncTitleSlotIds=()=>{const t=this.getFirstTitleSlottedElement();t&&!t.id&&(t.id=this.headingId)},this.handleBodySlotChange=()=>{this.refreshBodySlotState()},this.handleTitleSlotChange=()=>{this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.handleImageSlotChange=()=>{this.refreshImageSlotState()},this.handleSlotContentMutation=()=>{this.refreshBodySlotState(),this.refreshImageSlotState(),this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.updatePosition=async t=>{if(!n())return;const i=this.positioningGeneration;try{const s=g[this.anchorPosition],{x:h,y:o,placement:e,middlewareData:n}=await l(t,this.el,{strategy:"fixed",placement:s,middleware:[r(12),p({crossAxis:!1}),c({padding:8})]});if(i!==this.positioningGeneration)return;this.el.style.left=`${h}px`,this.el.style.top=`${o}px`;const a=n.shift?.x??0,d=n.shift?.y??0;this.el.style.setProperty("--xpl-spotlight-shift-x",-a+"px"),this.el.style.setProperty("--xpl-spotlight-shift-y",-d+"px"),this.hasFloatingPosition=!0;const u=m[e]??m[e.split("-")[0]??""];this.resolvedAnchorPosition=u??this.anchorPosition,this.pendingEnterTransitionAfterAnchor&&this.scheduleEnterTransition()}catch{if(i!==this.positioningGeneration)return;this.clearFloatingHostCoordinates(),this.isOpenEnabled&&(this.scheduleEnterTransition({skipAnchorWait:!0}),await s(this))}}}onAnchorPositionChange(){this.target&&this.referenceEl?this.updatePosition(this.referenceEl).catch((()=>{})):this.resolvedAnchorPosition=this.anchorPosition}onIsOpenChange(t){if(f.coerceBoolean(t))return this.capturePreviousFocus(),this.shouldMoveFocusOnRender=!0,this.isVisible=!1,this.refreshBodySlotState(),this.refreshTitleSlotState(),this.refreshImageSlotState(),this.target&&(this.cleanupAutoUpdate&&this.referenceEl&&this.el.ownerDocument.contains(this.referenceEl)?this.hasFloatingPosition=!1:this.startPositioning()),void this.scheduleEnterTransition();this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.isVisible=!1,this.target||this.stopPositioning(),this.restoreFocus()}onTargetChange(){if(!this.target)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.startPositioning()}connectedCallback(){this.shouldReinitializeAfterReconnect&&(this.shouldReinitializeAfterReconnect=!1,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?(this.capturePreviousFocus(),this.shouldMoveFocusOnRender=!0,this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(s(this)).catch((()=>{}))):this.isVisible=!1)}disconnectedCallback(){this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.stopSlotContentObserver(),this.stopPositioning(),this.hasCompletedInitialLoad&&(this.shouldReinitializeAfterReconnect=!0)}componentWillLoad(){this.resolvedAnchorPosition=this.anchorPosition,this.hasBodySlotContent=this.hasSlottedContent("body"),this.hasImageSlotContent=this.hasSlottedContent("image"),this.hasTitleSlotContent=this.hasSlottedContent("title"),this.dialogLabelId=this.getDialogLabelId(),this.isOpenEnabled&&!this.target&&(this.pendingEnterVisible=!0),this.shouldMoveFocusOnRender=this.isOpenEnabled}componentDidLoad(){this.hasCompletedInitialLoad=!0,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?this.target&&(this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(s(this)).catch((()=>{}))):this.isVisible=!1}componentDidRender(){this.isOpenEnabled&&this.syncTitleSlotIds();const t=this.getDialogLabelId();this.dialogLabelId!==t&&(this.dialogLabelId=t),this.pendingEnterVisible&&this.isOpenEnabled&&(this.pendingEnterVisible=!1,this.enterVisibleFrameId=requestAnimationFrame((()=>{this.enterVisibleFrameId=null,this.isOpenEnabled&&(this.isVisible=!0)}))),this.shouldMoveFocusOnRender&&this.isOpenEnabled&&(this.shouldMoveFocusOnRender=!1,this.capturePreviousFocus(),this.focusInitial())}handleKeyDown(t){"Escape"===t.key&&this.shouldHandleDismissKeyboardEvent()&&(t.preventDefault(),this.emitDismiss())}get effectiveTotalSteps(){return Math.max(1,this.totalSteps)}get effectiveCurrentStep(){return Math.min(this.effectiveTotalSteps,Math.max(1,this.currentStep))}get isDismissibleEnabled(){return f.coerceBoolean(this.isDismissible)}get isOpenEnabled(){return f.coerceBoolean(this.isOpen)}get isSingleActionLayout(){return"single"===this.actionLayout}get usesHiddenEdgeActions(){return"dual"===this.actionLayout}get isPrimaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep>=this.effectiveTotalSteps}get isSecondaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep<=1}get shouldShowPrimaryAction(){return!!this.isSingleActionLayout||!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep<this.effectiveTotalSteps}get shouldShowSecondaryAction(){return!this.isSingleActionLayout&&(!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep>1)}get hasRenderableFocusChrome(){return!!this.isDismissibleEnabled||!!this.showActionsEnabled&&(this.shouldShowPrimaryAction||this.shouldShowSecondaryAction)}get showActionsEnabled(){return f.coerceBoolean(this.showActions)}get showImageEnabled(){return f.coerceBoolean(this.showImage)}get showStepsEnabled(){return f.coerceBoolean(this.showSteps)}get headingPropHasText(){return Boolean(this.heading?.trim())}get bodyPropHasText(){return Boolean(this.body?.trim())}async focusInitial(){if(this.focusAbort?.abort(),this.focusAbort=new AbortController,!this.hasRenderableFocusChrome&&this.isOpenEnabled)return void(this.focusFrameId=requestAnimationFrame((()=>{this.focusFrameId=null,this.isOpenEnabled&&this.el.focus()})));const t=await function(t,i){const s=t.querySelector(d);return s?Promise.resolve(s):i?.signal?.aborted?Promise.resolve(null):"undefined"==typeof MutationObserver?function(t,i){return new Promise((s=>{if(i?.signal?.aborted)return void s(null);let h,o,e=0;const n=t=>{void 0!==h&&"undefined"!=typeof cancelAnimationFrame&&cancelAnimationFrame(h),void 0!==o&&clearTimeout(o),s(t)},l=()=>n(null);i?.signal?.addEventListener("abort",l,{once:!0});const a=t=>{"undefined"!=typeof requestAnimationFrame?h=requestAnimationFrame((()=>{h=void 0,t()})):o=setTimeout((()=>{o=void 0,t()}),0)},r=()=>{if(i?.signal?.aborted)return void n(null);const s=t.querySelector(d);return s?(i?.signal?.removeEventListener("abort",l),void n(s)):(e+=1,e>=120?(i?.signal?.removeEventListener("abort",l),void n(null)):void a(r))};a(r)}))}(t,i):new Promise((s=>{let h,o,e=!1;function n(t){e||(e=!0,o.disconnect(),void 0!==h&&clearTimeout(h),s(t))}o=new MutationObserver((()=>{const i=t.querySelector(d);i&&n(i)})),o.observe(t instanceof Node?t:document,{childList:!0,subtree:!0}),h=setTimeout((()=>n(null)),2500),i?.signal?.addEventListener("abort",(()=>{n(null)}),{once:!0})}))}(this.el,{signal:this.focusAbort.signal});t?t.focus():this.isOpenEnabled&&this.el.focus()}shouldHandleDismissKeyboardEvent(){if(!this.isDismissibleEnabled||!this.isOpenEnabled||!this.isVisible)return!1;const{activeElement:t}=document;return Boolean(t)&&(t===this.el||this.el.contains(t))}capturePreviousFocus(){n()&&(this.previousFocus=document.activeElement instanceof HTMLElement?document.activeElement:null)}restoreFocus(){this.previousFocus?.isConnected&&this.previousFocus.focus()}cancelPendingFocusWait(){this.focusAbort?.abort(),null!=this.focusFrameId&&(cancelAnimationFrame(this.focusFrameId),this.focusFrameId=null)}cancelEnterTransition(){null!==this.enterVisibleFrameId&&(cancelAnimationFrame(this.enterVisibleFrameId),this.enterVisibleFrameId=null),this.pendingEnterVisible=!1}scheduleEnterTransition(t){this.cancelEnterTransition(),t?.skipAnchorWait||!Boolean(this.target&&this.referenceEl)||this.hasFloatingPosition?(this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!0):this.pendingEnterTransitionAfterAnchor=!0}getFirstTitleSlottedElement(){const t=Array.from(this.el.children).find((t=>t.nodeType===Node.ELEMENT_NODE&&"title"===t.getAttribute("slot")));if(t)return t;const i=this.el.querySelector('slot[name="title"]');if(i&&"function"==typeof i.assignedNodes){const t=Array.from(i.assignedNodes({flatten:!0})).find((t=>t.nodeType===Node.ELEMENT_NODE));if(t)return t}return this.el.querySelector('[slot="title"]')??null}getDialogLabelId(){if(this.hasTitleSlotContent){const t=this.getFirstTitleSlottedElement();return t?.id?t.id:this.headingId}if(this.headingPropHasText)return this.headingId}refreshBodySlotState(){const t=this.hasSlottedContent("body");this.hasBodySlotContent!==t&&(this.hasBodySlotContent=t)}refreshTitleSlotState(){const t=this.hasSlottedContent("title");this.hasTitleSlotContent!==t&&(this.hasTitleSlotContent=t)}static coerceBoolean(t){return"string"==typeof t?"false"!==t.trim().toLowerCase():Boolean(t)}refreshImageSlotState(){const t=this.hasSlottedContent("image");this.hasImageSlotContent!==t&&(this.hasImageSlotContent=t)}startSlotContentObserver(){"undefined"==typeof MutationObserver||this.slotContentObserver||(this.slotContentObserver=new MutationObserver(this.handleSlotContentMutation),this.slotContentObserver.observe(this.el,{attributes:!0,attributeFilter:["slot"],childList:!0,subtree:!0}))}stopSlotContentObserver(){this.slotContentObserver?.disconnect(),this.slotContentObserver=null}hasSlottedContent(t){const i=this.el.querySelector(`slot[name="${t}"]`),s=this.el.querySelector(`[slot="${t}"]`),h=Array.from(this.el.children).some((i=>i.getAttribute("slot")===t)),o=!!i&&i.assignedNodes({flatten:!0}).some((t=>t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()));return Boolean(s||h)||o}startPositioning(){if(!n())return;if(!this.target)return;let t=null;try{t=this.el.ownerDocument.querySelector(this.target)}catch{return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition)}if(!t)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.detachFloatingUiListeners(),this.referenceEl=t,this.cleanupAutoUpdate=a(t,this.el,(()=>{this.updatePosition(t).catch((()=>{}))}))}detachFloatingUiListeners(){this.positioningGeneration+=1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}resetFloatingHostPosition(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.referenceEl=null}clearFloatingHostCoordinates(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.resolvedAnchorPosition=this.anchorPosition}stopPositioning(){this.detachFloatingUiListeners(),this.resetFloatingHostPosition()}render(){if(!this.isOpenEnabled)return this.target?h(o,{class:{"xpl-spotlight":!0,"xpl-spotlight--target-only":!0,[`xpl-spotlight--${this.resolvedAnchorPosition}`]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition}},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"}))):h(o,{"aria-hidden":"true",class:{"xpl-spotlight":!0,"xpl-spotlight--closed":!0}});const{isSingleActionLayout:t,shouldShowPrimaryAction:i,shouldShowSecondaryAction:s,showActionsEnabled:e,showImageEnabled:n,showStepsEnabled:l}=this;return h(o,{class:{[`xpl-spotlight--action-layout-${this.actionLayout}`]:e,"xpl-spotlight":!0,[`xpl-spotlight--${this.resolvedAnchorPosition}`]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition,"xpl-spotlight--no-image":!n,"xpl-spotlight--only-primary-action":e&&i&&!s,"xpl-spotlight--only-secondary-action":e&&s&&!i,"xpl-spotlight--visible":this.isVisible},role:"dialog","aria-modal":"false","aria-label":this.dialogLabelId?void 0:"Tour step","aria-labelledby":this.dialogLabelId,tabindex:-1},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"})),this.isDismissibleEnabled&&h("div",{class:"xpl-spotlight__dismiss"},h("xpl-button",{variant:"secondary",size:"sm",iconOnly:!0,"aria-label":"Dismiss tour step",onClick:this.handleDismissClick},h("xpl-icon",{icon:"xmark",size:16}))),h("div",{class:"xpl-spotlight__frame"},h("div",{class:{"xpl-spotlight__image-container":!0,"xpl-spotlight__image-container--empty":!this.hasImageSlotContent,"xpl-spotlight__image-container--hidden":!n}},!this.hasImageSlotContent&&n&&h("div",{class:"xpl-spotlight__image-placeholder","aria-hidden":"true"},h("xpl-icon",{icon:"photo",size:24}),h("xpl-icon",{icon:"video",size:24})),h("slot",{name:"image",onSlotchange:this.handleImageSlotChange})),h("div",{class:"xpl-spotlight__content"},h("div",{class:"xpl-spotlight__header"},h("slot",{name:"title",onSlotchange:this.handleTitleSlotChange},!this.hasTitleSlotContent&&this.headingPropHasText&&h("span",{class:"xpl-spotlight__title",id:this.headingId},this.heading)),h("slot",{name:"body",onSlotchange:this.handleBodySlotChange},!this.hasBodySlotContent&&this.bodyPropHasText&&h("p",{class:"xpl-spotlight__body"},this.body))),e&&h("div",{class:{"xpl-spotlight__actions":!0,"xpl-spotlight__actions--dual":!t,"xpl-spotlight__actions--single":t,"xpl-spotlight__actions--with-steps":l,"xpl-spotlight__actions--only-primary":i&&!s,"xpl-spotlight__actions--only-secondary":s&&!i}},h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--secondary"},s&&h("xpl-button",{class:"xpl-spotlight__secondary-action",variant:"secondary",size:"default",disabled:this.isSecondaryStepActionDisabled,onClick:this.handleSecondaryClick},this.secondaryActionLabel)),l&&h("span",{class:"xpl-spotlight__step-text"},this.effectiveCurrentStep," of ",this.effectiveTotalSteps),h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--primary"},i&&h("xpl-button",{class:"xpl-spotlight__primary-action",variant:"primary",size:"default",disabled:this.isPrimaryStepActionDisabled,onClick:this.handlePrimaryClick},this.primaryActionLabel))))))}get el(){return e(this)}static get watchers(){return{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}}};export{f as xpl_spotlight}
1
+ import{r as t,c as i,f as s,h,H as o,g as e}from"./p-CgJEmBQY.js";import{i as n}from"./p-Dqb1pIRo.js";import{c as l,a,o as r,f as p,s as c}from"./p-1M1pu0C2.js";const d=".xpl-spotlight__dismiss button, .xpl-spotlight__actions button";let g=0;const u={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end"},m={top:"bottom-left","top-start":"bottom-left","top-end":"bottom-right",bottom:"top-left","bottom-start":"top-left","bottom-end":"top-right",left:"top-right","left-start":"top-right","left-end":"bottom-right",right:"top-left","right-start":"top-left","right-end":"bottom-left"},f=class{constructor(h){t(this,h),this.dismiss=i(this,"dismiss",7),this.primaryAction=i(this,"primaryAction",7),this.secondaryAction=i(this,"secondaryAction",7),this.targetClick=i(this,"targetClick",7),this.cleanupAutoUpdate=null,this.enterVisibleFrameId=null,this.focusFrameId=null,this.hasCompletedInitialLoad=!1,this.headingId=(g+=1,`xpl-spotlight-heading-${g}`),this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!1,this.positioningGeneration=0,this.previousFocus=null,this.referenceEl=null,this.shouldMoveFocusOnRender=!1,this.shouldReinitializeAfterReconnect=!1,this.slotContentObserver=null,this.hasBodySlotContent=!1,this.hasFloatingPosition=!1,this.hasImageSlotContent=!1,this.hasTitleSlotContent=!1,this.dialogLabelId=void 0,this.isVisible=!1,this.resolvedAnchorPosition="top-left",this.actionLayout="default",this.anchorPosition="top-left",this.currentStep=1,this.isDismissible=!0,this.isOpen=!0,this.primaryActionLabel="Next",this.secondaryActionLabel="Back",this.showActions=!0,this.showImage=!0,this.showSteps=!0,this.totalSteps=1,this.emitDismiss=()=>{this.dismiss.emit()},this.handleDismissClick=()=>{this.emitDismiss()},this.handlePrimaryClick=()=>{this.primaryAction.emit()},this.handleSecondaryClick=()=>{this.secondaryAction.emit()},this.handleTargetClick=()=>{this.targetClick.emit()},this.syncTitleSlotIds=()=>{const t=this.getFirstTitleSlottedElement();t&&!t.id&&(t.id=this.headingId)},this.handleBodySlotChange=()=>{this.refreshBodySlotState()},this.handleTitleSlotChange=()=>{this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.handleImageSlotChange=()=>{this.refreshImageSlotState()},this.handleSlotContentMutation=()=>{this.refreshBodySlotState(),this.refreshImageSlotState(),this.refreshTitleSlotState(),this.syncTitleSlotIds()},this.updatePosition=async t=>{if(!n())return;const i=this.positioningGeneration;try{const s=u[this.anchorPosition],{x:h,y:o,placement:e,middlewareData:n}=await l(t,this.el,{strategy:"fixed",placement:s,middleware:[r(12),p({crossAxis:!1}),c({padding:8})]});if(i!==this.positioningGeneration)return;this.el.style.left=`${h}px`,this.el.style.top=`${o}px`;const a=n.shift?.x??0,d=n.shift?.y??0;this.el.style.setProperty("--xpl-spotlight-shift-x",-a+"px"),this.el.style.setProperty("--xpl-spotlight-shift-y",-d+"px"),this.hasFloatingPosition=!0;const g=m[e]??m[e.split("-")[0]??""];this.resolvedAnchorPosition=g??this.anchorPosition,this.pendingEnterTransitionAfterAnchor&&this.scheduleEnterTransition()}catch{if(i!==this.positioningGeneration)return;this.clearFloatingHostCoordinates(),this.isOpenEnabled&&(this.scheduleEnterTransition({skipAnchorWait:!0}),await s(this))}}}onAnchorPositionChange(){this.target&&this.referenceEl?this.updatePosition(this.referenceEl).catch((()=>{})):this.resolvedAnchorPosition=this.anchorPosition}onIsOpenChange(t){if(f.coerceBoolean(t))return this.capturePreviousFocus(),this.shouldMoveFocusOnRender=!0,this.isVisible=!1,this.refreshBodySlotState(),this.refreshTitleSlotState(),this.refreshImageSlotState(),this.target&&(this.cleanupAutoUpdate&&this.referenceEl&&this.el.ownerDocument.contains(this.referenceEl)?this.hasFloatingPosition=!1:this.startPositioning()),void this.scheduleEnterTransition();this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.isVisible=!1,this.target||this.stopPositioning(),this.restoreFocus()}onTargetChange(){if(!this.target)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.startPositioning()}connectedCallback(){this.shouldReinitializeAfterReconnect&&(this.shouldReinitializeAfterReconnect=!1,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?(this.capturePreviousFocus(),this.shouldMoveFocusOnRender=!0,this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(s(this)).catch((()=>{}))):this.isVisible=!1)}disconnectedCallback(){this.cancelEnterTransition(),this.cancelPendingFocusWait(),this.stopSlotContentObserver(),this.stopPositioning(),this.hasCompletedInitialLoad&&(this.shouldReinitializeAfterReconnect=!0)}componentWillLoad(){this.resolvedAnchorPosition=this.anchorPosition,this.hasBodySlotContent=this.hasSlottedContent("body"),this.hasImageSlotContent=this.hasSlottedContent("image"),this.hasTitleSlotContent=this.hasSlottedContent("title"),this.dialogLabelId=this.getDialogLabelId(),this.isOpenEnabled&&!this.target&&(this.pendingEnterVisible=!0),this.shouldMoveFocusOnRender=this.isOpenEnabled}componentDidLoad(){this.hasCompletedInitialLoad=!0,this.startSlotContentObserver(),this.target&&this.startPositioning(),this.isOpenEnabled?this.target&&(this.scheduleEnterTransition(),this.pendingEnterVisible&&Promise.resolve(s(this)).catch((()=>{}))):this.isVisible=!1}componentDidRender(){this.isOpenEnabled&&this.syncTitleSlotIds();const t=this.getDialogLabelId();this.dialogLabelId!==t&&(this.dialogLabelId=t),this.pendingEnterVisible&&this.isOpenEnabled&&(this.pendingEnterVisible=!1,this.enterVisibleFrameId=requestAnimationFrame((()=>{this.enterVisibleFrameId=null,this.isOpenEnabled&&(this.isVisible=!0)}))),this.shouldMoveFocusOnRender&&this.isOpenEnabled&&(this.shouldMoveFocusOnRender=!1,this.capturePreviousFocus(),this.focusInitial())}handleKeyDown(t){"Escape"===t.key&&this.shouldHandleDismissKeyboardEvent()&&(t.preventDefault(),this.emitDismiss())}get effectiveTotalSteps(){return Math.max(1,this.totalSteps)}get effectiveCurrentStep(){return Math.min(this.effectiveTotalSteps,Math.max(1,this.currentStep))}get isDismissibleEnabled(){return f.coerceBoolean(this.isDismissible)}get isOpenEnabled(){return f.coerceBoolean(this.isOpen)}get isSingleActionLayout(){return"single"===this.actionLayout}get usesHiddenEdgeActions(){return"dual"===this.actionLayout}get isPrimaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep>=this.effectiveTotalSteps}get isSecondaryStepActionDisabled(){return!this.usesHiddenEdgeActions&&this.showStepsEnabled&&this.effectiveCurrentStep<=1}get shouldShowPrimaryAction(){return!!this.isSingleActionLayout||!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep<this.effectiveTotalSteps}get shouldShowSecondaryAction(){return!this.isSingleActionLayout&&(!this.usesHiddenEdgeActions||!this.showStepsEnabled||this.effectiveCurrentStep>1)}get hasRenderableFocusChrome(){return!!this.isDismissibleEnabled||!!this.showActionsEnabled&&(this.shouldShowPrimaryAction||this.shouldShowSecondaryAction)}get showActionsEnabled(){return f.coerceBoolean(this.showActions)}get showImageEnabled(){return f.coerceBoolean(this.showImage)}get showStepsEnabled(){return f.coerceBoolean(this.showSteps)}get headingPropHasText(){return Boolean(this.heading?.trim())}get bodyPropHasText(){return Boolean(this.body?.trim())}async focusInitial(){if(this.focusAbort?.abort(),this.focusAbort=new AbortController,!this.hasRenderableFocusChrome&&this.isOpenEnabled)return void(this.focusFrameId=requestAnimationFrame((()=>{this.focusFrameId=null,this.isOpenEnabled&&this.el.focus()})));const t=await function(t,i){const s=t.querySelector(d);return s?Promise.resolve(s):i?.signal?.aborted?Promise.resolve(null):"undefined"==typeof MutationObserver?function(t,i){return new Promise((s=>{if(i?.signal?.aborted)return void s(null);let h,o,e=0;const n=t=>{void 0!==h&&"undefined"!=typeof cancelAnimationFrame&&cancelAnimationFrame(h),void 0!==o&&clearTimeout(o),s(t)},l=()=>n(null);i?.signal?.addEventListener("abort",l,{once:!0});const a=t=>{"undefined"!=typeof requestAnimationFrame?h=requestAnimationFrame((()=>{h=void 0,t()})):o=setTimeout((()=>{o=void 0,t()}),0)},r=()=>{if(i?.signal?.aborted)return void n(null);const s=t.querySelector(d);return s?(i?.signal?.removeEventListener("abort",l),void n(s)):(e+=1,e>=120?(i?.signal?.removeEventListener("abort",l),void n(null)):void a(r))};a(r)}))}(t,i):new Promise((s=>{let h,o,e=!1;function n(t){e||(e=!0,o.disconnect(),void 0!==h&&clearTimeout(h),s(t))}o=new MutationObserver((()=>{const i=t.querySelector(d);i&&n(i)})),o.observe(t instanceof Node?t:document,{childList:!0,subtree:!0}),h=setTimeout((()=>n(null)),2500),i?.signal?.addEventListener("abort",(()=>{n(null)}),{once:!0})}))}(this.el,{signal:this.focusAbort.signal});t?t.focus():this.isOpenEnabled&&this.el.focus()}shouldHandleDismissKeyboardEvent(){if(!this.isDismissibleEnabled||!this.isOpenEnabled||!this.isVisible)return!1;const{activeElement:t}=document;return Boolean(t)&&(t===this.el||this.el.contains(t))}capturePreviousFocus(){n()&&(this.previousFocus=document.activeElement instanceof HTMLElement?document.activeElement:null)}restoreFocus(){this.previousFocus?.isConnected&&this.previousFocus.focus()}cancelPendingFocusWait(){this.focusAbort?.abort(),null!=this.focusFrameId&&(cancelAnimationFrame(this.focusFrameId),this.focusFrameId=null)}cancelEnterTransition(){null!==this.enterVisibleFrameId&&(cancelAnimationFrame(this.enterVisibleFrameId),this.enterVisibleFrameId=null),this.pendingEnterVisible=!1}scheduleEnterTransition(t){this.cancelEnterTransition(),t?.skipAnchorWait||!Boolean(this.target&&this.referenceEl)||this.hasFloatingPosition?(this.pendingEnterTransitionAfterAnchor=!1,this.pendingEnterVisible=!0):this.pendingEnterTransitionAfterAnchor=!0}getFirstTitleSlottedElement(){const t=Array.from(this.el.children).find((t=>t.nodeType===Node.ELEMENT_NODE&&"title"===t.getAttribute("slot")));if(t)return t;const i=this.el.querySelector('slot[name="title"]');if(i&&"function"==typeof i.assignedNodes){const t=Array.from(i.assignedNodes({flatten:!0})).find((t=>t.nodeType===Node.ELEMENT_NODE));if(t)return t}return this.el.querySelector('[slot="title"]')??null}getDialogLabelId(){if(this.hasTitleSlotContent){const t=this.getFirstTitleSlottedElement();return t?.id?t.id:this.headingId}if(this.headingPropHasText)return this.headingId}refreshBodySlotState(){const t=this.hasSlottedContent("body");this.hasBodySlotContent!==t&&(this.hasBodySlotContent=t)}refreshTitleSlotState(){const t=this.hasSlottedContent("title");this.hasTitleSlotContent!==t&&(this.hasTitleSlotContent=t)}static coerceBoolean(t){return"string"==typeof t?"false"!==t.trim().toLowerCase():Boolean(t)}refreshImageSlotState(){const t=this.hasSlottedContent("image");this.hasImageSlotContent!==t&&(this.hasImageSlotContent=t)}startSlotContentObserver(){"undefined"==typeof MutationObserver||this.slotContentObserver||(this.slotContentObserver=new MutationObserver(this.handleSlotContentMutation),this.slotContentObserver.observe(this.el,{attributes:!0,attributeFilter:["slot"],childList:!0,subtree:!0}))}stopSlotContentObserver(){this.slotContentObserver?.disconnect(),this.slotContentObserver=null}hasSlottedContent(t){const i=this.el.querySelector(`slot[name="${t}"]`),s=this.el.querySelector(`[slot="${t}"]`),h=Array.from(this.el.children).some((i=>i.getAttribute("slot")===t)),o=!!i&&i.assignedNodes({flatten:!0}).some((t=>t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()));return Boolean(s||h)||o}startPositioning(){if(!n())return;if(!this.target)return;let t=null;try{t=this.el.ownerDocument.querySelector(this.target)}catch{return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition)}if(!t)return this.stopPositioning(),void(this.resolvedAnchorPosition=this.anchorPosition);this.detachFloatingUiListeners(),this.referenceEl=t,this.cleanupAutoUpdate=a(t,this.el,(()=>{this.updatePosition(t).catch((()=>{}))}))}detachFloatingUiListeners(){this.positioningGeneration+=1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}resetFloatingHostPosition(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.referenceEl=null}clearFloatingHostCoordinates(){this.el.style.left="",this.el.style.top="",this.el.style.removeProperty("--xpl-spotlight-shift-x"),this.el.style.removeProperty("--xpl-spotlight-shift-y"),this.hasFloatingPosition=!1,this.pendingEnterTransitionAfterAnchor=!1,this.resolvedAnchorPosition=this.anchorPosition}stopPositioning(){this.detachFloatingUiListeners(),this.resetFloatingHostPosition()}render(){if(!this.isOpenEnabled)return this.target?h(o,{class:{"xpl-spotlight":!0,"xpl-spotlight--target-only":!0,[`xpl-spotlight--${this.resolvedAnchorPosition}`]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition}},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"}))):h(o,{"aria-hidden":"true",class:{"xpl-spotlight":!0,"xpl-spotlight--closed":!0}});const{isSingleActionLayout:t,shouldShowPrimaryAction:i,shouldShowSecondaryAction:s,showActionsEnabled:e,showImageEnabled:n,showStepsEnabled:l}=this;return h(o,{class:{[`xpl-spotlight--action-layout-${this.actionLayout}`]:e,"xpl-spotlight":!0,[`xpl-spotlight--${this.resolvedAnchorPosition}`]:!0,"xpl-spotlight--anchored":this.hasFloatingPosition,"xpl-spotlight--no-image":!n,"xpl-spotlight--only-primary-action":e&&i&&!s,"xpl-spotlight--only-secondary-action":e&&s&&!i,"xpl-spotlight--visible":this.isVisible},role:"dialog","aria-modal":"false","aria-label":this.dialogLabelId?void 0:"Tour step","aria-labelledby":this.dialogLabelId,tabindex:-1},h("button",{type:"button",class:"xpl-spotlight__target","aria-label":"Spotlight indicator",onClick:this.handleTargetClick},h("div",{class:"xpl-spotlight__target-outer"}),h("div",{class:"xpl-spotlight__target-inner"})),this.isDismissibleEnabled&&h("div",{class:"xpl-spotlight__dismiss"},h("xpl-button",{variant:"secondary",size:"sm",iconOnly:!0,"aria-label":"Dismiss tour step",onClick:this.handleDismissClick},h("xpl-icon",{icon:"xmark",size:16}))),h("div",{class:"xpl-spotlight__frame"},h("div",{class:{"xpl-spotlight__image-container":!0,"xpl-spotlight__image-container--empty":!this.hasImageSlotContent,"xpl-spotlight__image-container--hidden":!n}},!this.hasImageSlotContent&&n&&h("div",{class:"xpl-spotlight__image-placeholder","aria-hidden":"true"},h("xpl-icon",{icon:"photo",size:24}),h("xpl-icon",{icon:"video",size:24})),h("slot",{name:"image",onSlotchange:this.handleImageSlotChange})),h("div",{class:"xpl-spotlight__content"},h("div",{class:"xpl-spotlight__header"},h("slot",{name:"title",onSlotchange:this.handleTitleSlotChange},!this.hasTitleSlotContent&&this.headingPropHasText&&h("span",{class:"xpl-spotlight__title",id:this.headingId},this.heading)),h("slot",{name:"body",onSlotchange:this.handleBodySlotChange},!this.hasBodySlotContent&&this.bodyPropHasText&&h("p",{class:"xpl-spotlight__body"},this.body))),e&&h("div",{class:{"xpl-spotlight__actions":!0,"xpl-spotlight__actions--dual":!t,"xpl-spotlight__actions--single":t,"xpl-spotlight__actions--with-steps":l,"xpl-spotlight__actions--only-primary":i&&!s,"xpl-spotlight__actions--only-secondary":s&&!i}},h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--secondary"},s&&h("xpl-button",{class:"xpl-spotlight__secondary-action",variant:"secondary",size:"default",disabled:this.isSecondaryStepActionDisabled,onClick:this.handleSecondaryClick},this.secondaryActionLabel)),l&&h("span",{class:"xpl-spotlight__step-text"},this.effectiveCurrentStep," of ",this.effectiveTotalSteps),h("div",{class:"xpl-spotlight__action-slot xpl-spotlight__action-slot--primary"},i&&h("xpl-button",{class:"xpl-spotlight__primary-action",variant:"primary",size:"default",disabled:this.isPrimaryStepActionDisabled,onClick:this.handlePrimaryClick},this.primaryActionLabel))))))}get el(){return e(this)}static get watchers(){return{anchorPosition:[{onAnchorPositionChange:0}],isOpen:[{onIsOpenChange:0}],target:[{onTargetChange:0}]}}};export{f as xpl_spotlight}
@@ -1 +1 @@
1
- import{r as e,h as t,H as s,g as i}from"./p-CJABLO_1.js";function a(e){return"XPL-TABLE-CELL"===e.nodeName}const r=class{constructor(t){e(this,t),this.disabled=!1,this.selected=!1}onDisabledChange(){this.propagateDisabledToCells()}connectedCallback(){"undefined"!=typeof MutationObserver&&(this.cellObserver=new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{a(e)&&(e.disabled=this.disabled)}))}))})),this.cellObserver.observe(this.el,{childList:!0}))}disconnectedCallback(){this.cellObserver?.disconnect(),this.cellObserver=void 0}componentDidLoad(){this.propagateDisabledToCells()}propagateDisabledToCells(){Array.from(this.el.children).filter(a).forEach((e=>{e.disabled=this.disabled}))}render(){return t(s,{key:"a743e3cf9f4761d990d4437390f5f3f4949c68b7",class:{"xpl-table-row":!0,"xpl-table-row--disabled":this.disabled,"xpl-table-row--selected":this.selected},role:"row"},t("slot",{key:"fc13f425ec75c16e0079733b789e7b68e1371f33"}))}get el(){return i(this)}static get watchers(){return{disabled:[{onDisabledChange:0}]}}};export{r as xpl_table_row}
1
+ import{r as e,h as t,H as s,g as i}from"./p-CgJEmBQY.js";function a(e){return"XPL-TABLE-CELL"===e.nodeName}const r=class{constructor(t){e(this,t),this.disabled=!1,this.selected=!1}onDisabledChange(){this.propagateDisabledToCells()}connectedCallback(){"undefined"!=typeof MutationObserver&&(this.cellObserver=new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{a(e)&&(e.disabled=this.disabled)}))}))})),this.cellObserver.observe(this.el,{childList:!0}))}disconnectedCallback(){this.cellObserver?.disconnect(),this.cellObserver=void 0}componentDidLoad(){this.propagateDisabledToCells()}propagateDisabledToCells(){Array.from(this.el.children).filter(a).forEach((e=>{e.disabled=this.disabled}))}render(){return t(s,{key:"a743e3cf9f4761d990d4437390f5f3f4949c68b7",class:{"xpl-table-row":!0,"xpl-table-row--disabled":this.disabled,"xpl-table-row--selected":this.selected},role:"row"},t("slot",{key:"fc13f425ec75c16e0079733b789e7b68e1371f33"}))}get el(){return i(this)}static get watchers(){return{disabled:[{onDisabledChange:0}]}}};export{r as xpl_table_row}
@@ -1 +1 @@
1
- import{r as e,h as a,H as c}from"./p-CJABLO_1.js";const r=class{constructor(a){e(this,a),this.chevron='<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" class="svg-inline--fa fa-chevron-right fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\n <path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>\n </svg>\n '}render(){return a(c,{key:"f27e929df7f6b3c346c78dbaa1fbd5504ed02bb8",class:"xpl-breadcrumb-item",role:"listitem"},a("li",{key:"58c1f95719d3d0ad4304cc4f29e74fc66efa5693",role:"none"},a("slot",{key:"d8ecd978e3f99fd2638094d33735c66e3a56d29c"})),a("span",{key:"a0b21f289feb8246a9e75874f259fe5597cbcaf3",innerHTML:this.chevron}))}};export{r as xpl_breadcrumb_item}
1
+ import{r as e,h as a,H as c}from"./p-CgJEmBQY.js";const r=class{constructor(a){e(this,a),this.chevron='<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" class="svg-inline--fa fa-chevron-right fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\n <path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>\n </svg>\n '}render(){return a(c,{key:"f27e929df7f6b3c346c78dbaa1fbd5504ed02bb8",class:"xpl-breadcrumb-item",role:"listitem"},a("li",{key:"58c1f95719d3d0ad4304cc4f29e74fc66efa5693",role:"none"},a("slot",{key:"d8ecd978e3f99fd2638094d33735c66e3a56d29c"})),a("span",{key:"a0b21f289feb8246a9e75874f259fe5597cbcaf3",innerHTML:this.chevron}))}};export{r as xpl_breadcrumb_item}
@@ -1 +1 @@
1
- import{r as e,h as a,H as l}from"./p-CJABLO_1.js";const i=class{constructor(a){e(this,a),this.withSubnav=!1,this.withUtility=!0,this.navWidth="default",this.navOpen=!0}closeNavOnMobile(){window.innerWidth<=640&&(this.navOpen=!1)}navToggleHandler(){this.navOpen=!this.navOpen}navWithHandler(e){this.navWidth=e.detail}onWindowResize(){this.closeNavOnMobile()}connectedCallback(){this.closeNavOnMobile()}componentWillLoad(){this.navOpen=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.navOpen}render(){let e="xpl-application-shell";this.withUtility&&(e+=" xpl-application-shell--with_utility");let i="xpl-application-shell__nav";return i+=this.navOpen?` xpl-application-shell__nav--${this.navWidth}--open`:` xpl-application-shell__nav--${this.navWidth}`,a(l,{key:"62f8a731b47f2ffadb192ed1c4d804362dd66a42",class:e},a("div",{key:"0f8b2f9825bd85a187a44ec8b29bb61933216d47",class:i},a("slot",{key:"f35e09fef29ec3ec8a14c32891e1f1a6aeec058a",name:"nav"})),a("div",{key:"29ea416c978cdb10ecc2df516cc25ff7fbde2342",class:"xpl-application-shell__subnav"},a("slot",{key:"56d536702db72a201d5573d30e7e4f04a5fd3428",name:"subnav"})),a("div",{key:"eb6edaeab5e79ba6d6f60c1edf2369205a724f59",class:"xpl-application-shell__utility"},a("slot",{key:"86fde26627dbf24bf23d2b467940bf3ff58dbdc8",name:"utility"})),a("div",{key:"ae8b382f38f03018b4098b96fcf1a9a583671356",class:"xpl-application-shell__content"},a("slot",{key:"3e8cbe1c7540e3522147582e7bb724bef88f8910",name:"content"})),a("xpl-backdrop",{key:"559ef92a0ed4764257f25482a7d192183785c2cf",onClick:()=>this.navToggleHandler(),class:{"xpl-application-shell__backdrop--open":this.navOpen},relative:!0}))}};export{i as xpl_application_shell}
1
+ import{r as e,h as a,H as l}from"./p-CgJEmBQY.js";const i=class{constructor(a){e(this,a),this.withSubnav=!1,this.withUtility=!0,this.navWidth="default",this.navOpen=!0}closeNavOnMobile(){window.innerWidth<=640&&(this.navOpen=!1)}navToggleHandler(){this.navOpen=!this.navOpen}navWithHandler(e){this.navWidth=e.detail}onWindowResize(){this.closeNavOnMobile()}connectedCallback(){this.closeNavOnMobile()}componentWillLoad(){this.navOpen=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.navOpen}render(){let e="xpl-application-shell";this.withUtility&&(e+=" xpl-application-shell--with_utility");let i="xpl-application-shell__nav";return i+=this.navOpen?` xpl-application-shell__nav--${this.navWidth}--open`:` xpl-application-shell__nav--${this.navWidth}`,a(l,{key:"62f8a731b47f2ffadb192ed1c4d804362dd66a42",class:e},a("div",{key:"0f8b2f9825bd85a187a44ec8b29bb61933216d47",class:i},a("slot",{key:"f35e09fef29ec3ec8a14c32891e1f1a6aeec058a",name:"nav"})),a("div",{key:"29ea416c978cdb10ecc2df516cc25ff7fbde2342",class:"xpl-application-shell__subnav"},a("slot",{key:"56d536702db72a201d5573d30e7e4f04a5fd3428",name:"subnav"})),a("div",{key:"eb6edaeab5e79ba6d6f60c1edf2369205a724f59",class:"xpl-application-shell__utility"},a("slot",{key:"86fde26627dbf24bf23d2b467940bf3ff58dbdc8",name:"utility"})),a("div",{key:"ae8b382f38f03018b4098b96fcf1a9a583671356",class:"xpl-application-shell__content"},a("slot",{key:"3e8cbe1c7540e3522147582e7bb724bef88f8910",name:"content"})),a("xpl-backdrop",{key:"559ef92a0ed4764257f25482a7d192183785c2cf",onClick:()=>this.navToggleHandler(),class:{"xpl-application-shell__backdrop--open":this.navOpen},relative:!0}))}};export{i as xpl_application_shell}