@ds-mo/ui 14.17.0 → 14.18.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 (256) hide show
  1. package/dist/.package-ready.json +1 -1
  2. package/dist/agent-patterns.json +6 -6
  3. package/dist/agent.json +62 -34
  4. package/dist/angular/ds-button-filled.d.ts +1 -1
  5. package/dist/angular/ds-button-filled.js +3 -3
  6. package/dist/angular/ds-button-unfilled.d.ts +1 -1
  7. package/dist/angular/ds-button-unfilled.js +3 -3
  8. package/dist/angular/ds-mobile-bar-nav.d.ts +1 -1
  9. package/dist/angular/ds-mobile-bar-nav.js +3 -3
  10. package/dist/components/ds-agent-activity.js +1 -1
  11. package/dist/components/ds-agent-questionnaire.js +1 -1
  12. package/dist/components/ds-agent-response.js +1 -1
  13. package/dist/components/ds-agent-source-list.js +1 -1
  14. package/dist/components/ds-agent-tool-call.js +1 -1
  15. package/dist/components/ds-attachment-list.js +1 -1
  16. package/dist/components/ds-badge.js +1 -1
  17. package/dist/components/ds-banner.js +1 -1
  18. package/dist/components/ds-bar-action.js +1 -1
  19. package/dist/components/ds-bar-nav.js +1 -1
  20. package/dist/components/ds-bar-title.js +1 -1
  21. package/dist/components/ds-bar-workflow.js +1 -1
  22. package/dist/components/ds-bar-workflow.js.map +1 -1
  23. package/dist/components/ds-breadcrumb.js +1 -1
  24. package/dist/components/ds-button-filled.js +1 -1
  25. package/dist/components/ds-button-unfilled.js +1 -1
  26. package/dist/components/ds-card-chart.js +1 -1
  27. package/dist/components/ds-card-chart.js.map +1 -1
  28. package/dist/components/ds-card-overview.js +1 -1
  29. package/dist/components/ds-card-setting.js +1 -1
  30. package/dist/components/ds-card-setting.js.map +1 -1
  31. package/dist/components/ds-chart-legend.js +1 -1
  32. package/dist/components/ds-chart.js +1 -1
  33. package/dist/components/ds-checkbox.js +1 -1
  34. package/dist/components/ds-chip.js +1 -1
  35. package/dist/components/ds-code-block.js +1 -1
  36. package/dist/components/ds-conversation-list-item.js +1 -1
  37. package/dist/components/ds-conversation-list-section.js +1 -1
  38. package/dist/components/ds-conversation-list.js +1 -1
  39. package/dist/components/ds-divider.js +1 -1
  40. package/dist/components/ds-empty-state.js +1 -1
  41. package/dist/components/ds-field.js +1 -1
  42. package/dist/components/ds-filter-menu.js +1 -1
  43. package/dist/components/ds-input.js +1 -1
  44. package/dist/components/ds-markdown.js +1 -1
  45. package/dist/components/ds-menu.js +1 -1
  46. package/dist/components/ds-message-actions.js +1 -1
  47. package/dist/components/ds-message-actions.js.map +1 -1
  48. package/dist/components/ds-message-bubble.js +1 -1
  49. package/dist/components/ds-message-composer.js +1 -1
  50. package/dist/components/ds-message-scroller.js +1 -1
  51. package/dist/components/ds-message.js +1 -1
  52. package/dist/components/ds-mobile-bar-nav.js +1 -1
  53. package/dist/components/ds-mobile-header.js +1 -1
  54. package/dist/components/ds-mobile-section-switcher.js +1 -1
  55. package/dist/components/ds-mobile-sheet-nav.js +1 -1
  56. package/dist/components/ds-modal.js +1 -1
  57. package/dist/components/ds-pagination.js +1 -1
  58. package/dist/components/ds-panel-nav.js +1 -1
  59. package/dist/components/ds-panel-sub-nav.js +1 -1
  60. package/dist/components/ds-panel-tool-header.js +1 -1
  61. package/dist/components/ds-panel-tool-search.js +1 -1
  62. package/dist/components/ds-panel-tools.js +1 -1
  63. package/dist/components/ds-paper-texture.js +1 -1
  64. package/dist/components/ds-radio.js +1 -1
  65. package/dist/components/ds-scroll-overlay.js +1 -1
  66. package/dist/components/ds-select.js +1 -1
  67. package/dist/components/ds-shell-app.js +1 -1
  68. package/dist/components/ds-shell-app.js.map +1 -1
  69. package/dist/components/ds-shell-page.js +1 -1
  70. package/dist/components/ds-shell-tools.js +1 -1
  71. package/dist/components/ds-skeleton.js +1 -1
  72. package/dist/components/ds-slider.js +1 -1
  73. package/dist/components/ds-swatch-picker.js +1 -1
  74. package/dist/components/ds-switch.js +1 -1
  75. package/dist/components/ds-tab-group.js +1 -1
  76. package/dist/components/ds-table-filter.js +1 -1
  77. package/dist/components/ds-table-filter.js.map +1 -1
  78. package/dist/components/ds-table-saved-views.js +1 -1
  79. package/dist/components/ds-table-sort.js +1 -1
  80. package/dist/components/ds-table-sort.js.map +1 -1
  81. package/dist/components/ds-table-toolbar.js +1 -1
  82. package/dist/components/ds-table-toolbar.js.map +1 -1
  83. package/dist/components/ds-table.js +1 -1
  84. package/dist/components/ds-table.js.map +1 -1
  85. package/dist/components/ds-tag.js +1 -1
  86. package/dist/components/ds-text.js +1 -1
  87. package/dist/components/ds-toast.js +1 -1
  88. package/dist/components/ds-toast.js.map +1 -1
  89. package/dist/components/ds-tooltip-chart.js +1 -1
  90. package/dist/components/ds-tooltip.js +1 -1
  91. package/dist/components/ds-typing-indicator.js +1 -1
  92. package/dist/components/{p-y4jhIkRc.js → p-3WlVHGUe.js} +2 -2
  93. package/dist/components/{p-DAqSoyd4.js → p-9EQ3xLI1.js} +2 -2
  94. package/dist/components/p-9GuNIXuz.js +2 -0
  95. package/dist/components/{p-B0PEg5RF.js.map → p-9GuNIXuz.js.map} +1 -1
  96. package/dist/components/p-B0Byw6OX.js +2 -0
  97. package/dist/components/p-B0Byw6OX.js.map +1 -0
  98. package/dist/components/{p-DSIOINBK.js → p-B145kX-i.js} +2 -2
  99. package/dist/components/{p-DZ55e3j9.js → p-B9ZfoprK.js} +2 -2
  100. package/dist/components/{p-DNJTN_s0.js → p-BBmRD_S0.js} +2 -2
  101. package/dist/components/{p-C4TgWJi9.js → p-BKx2ihnG.js} +2 -2
  102. package/dist/components/p-BMERUCe1.js +2 -0
  103. package/dist/components/p-BMERUCe1.js.map +1 -0
  104. package/dist/components/{p-Be1sY58w.js → p-BTTxl3ro.js} +2 -2
  105. package/dist/components/p-Ba7DaFkb.js +2 -0
  106. package/dist/components/{p-DEjh3klB.js.map → p-Ba7DaFkb.js.map} +1 -1
  107. package/dist/components/{p-CKmfuK7k.js → p-BcNYvLMi.js} +2 -2
  108. package/dist/components/p-BcNYvLMi.js.map +1 -0
  109. package/dist/components/{p-rrFMAZkj.js → p-BdgoB2ef.js} +2 -2
  110. package/dist/components/{p-U8JIZzI2.js → p-Be-vZpWx.js} +2 -2
  111. package/dist/components/p-Be-vZpWx.js.map +1 -0
  112. package/dist/components/{p-DQqOzDEq.js → p-BiBXCjjo.js} +2 -2
  113. package/dist/components/{p-D1YhYulL.js → p-C6yLERx6.js} +2 -2
  114. package/dist/components/{p-Dg9qiMDa.js → p-C9StMCWg.js} +2 -2
  115. package/dist/components/{p-7tZx4ukz.js → p-CAJIARNW.js} +2 -2
  116. package/dist/components/{p-BVlfQ8xZ.js → p-CBa_6lqj.js} +2 -2
  117. package/dist/components/p-CBa_6lqj.js.map +1 -0
  118. package/dist/components/{p-D2z2DgtX.js → p-CHEt4mW8.js} +2 -2
  119. package/dist/components/p-CI5Ce8VF.js +2 -0
  120. package/dist/components/p-CI5Ce8VF.js.map +1 -0
  121. package/dist/components/{p-BHz78C8h.js → p-CbZ0RU2c.js} +2 -2
  122. package/dist/components/{p-BFSLT0yc.js → p-Cgm7YMLw.js} +2 -2
  123. package/dist/components/{p-BFSLT0yc.js.map → p-Cgm7YMLw.js.map} +1 -1
  124. package/dist/components/{p-Bn8NryHK.js → p-CihNoe1M.js} +2 -2
  125. package/dist/components/{p-D4K9CE8a.js → p-Cj5Hkt6Y.js} +2 -2
  126. package/dist/components/{p-ruPTIV6t.js → p-D6P_1YrL.js} +2 -2
  127. package/dist/components/p-DC_8dK55.js +2 -0
  128. package/dist/components/p-DC_8dK55.js.map +1 -0
  129. package/dist/components/p-DHzn7INS.js +2 -0
  130. package/dist/components/{p-DIEK54fV.js.map → p-DHzn7INS.js.map} +1 -1
  131. package/dist/components/{p-BNkU9dcc.js → p-DJ0GCCFa.js} +2 -2
  132. package/dist/components/p-DKY3IJqt.js +2 -0
  133. package/dist/components/p-DKY3IJqt.js.map +1 -0
  134. package/dist/components/{p-DsJW5W3W.js → p-DMaQkEYP.js} +2 -2
  135. package/dist/components/p-DNpLDbWY.js +2 -0
  136. package/dist/components/p-DNpLDbWY.js.map +1 -0
  137. package/dist/components/{p-PD1Vfg0t.js → p-DPR0TGGJ.js} +2 -2
  138. package/dist/components/{p-CMFvaY05.js → p-DPpHSIzS.js} +2 -2
  139. package/dist/components/p-DQyvAN44.js +2 -0
  140. package/dist/components/p-DQyvAN44.js.map +1 -0
  141. package/dist/components/p-DaxKVtZG.js +2 -0
  142. package/dist/components/p-DaxKVtZG.js.map +1 -0
  143. package/dist/components/{p-a6qP60zb.js → p-DbJahF86.js} +2 -2
  144. package/dist/components/{p-D8Qd6gkf.js → p-Dd8VKdAO.js} +2 -2
  145. package/dist/components/{p-C0X2zKbB.js → p-Dginv8PT.js} +2 -2
  146. package/dist/components/{p-BHDkJmrC.js → p-Dl3gciej.js} +2 -2
  147. package/dist/components/p-Drcl4zS9.js +2 -0
  148. package/dist/components/p-DzPw6aDK.js +2 -0
  149. package/dist/components/p-DzPw6aDK.js.map +1 -0
  150. package/dist/components/{p-BhYWdbEp.js → p-HZz5aJKz.js} +2 -2
  151. package/dist/components/{p-BGXqFq2C.js → p-LHzBS95u.js} +2 -2
  152. package/dist/components/{p-DHuyj-9J.js → p-hp_2W2Qy.js} +2 -2
  153. package/dist/components/p-jk2-y5dH.js +2 -0
  154. package/dist/components/p-jk2-y5dH.js.map +1 -0
  155. package/dist/components/{p-CzcWZiH-.js → p-oCc3mz_c.js} +2 -2
  156. package/dist/docs/components.json +234 -19
  157. package/dist/lib/components/ButtonFilled/ButtonFilled.d.ts +2 -0
  158. package/dist/lib/components/PanelTools/panel-tools-types.d.ts +2 -2
  159. package/dist/lib/shell/index.js +17 -25
  160. package/dist/lib/shell/index.js.map +2 -2
  161. package/dist/lib/shell/shell-responsive.d.ts +6 -1
  162. package/dist/lib/utils/anchored-position.d.ts +2 -0
  163. package/dist/lib/utils/button-render.d.ts +1 -0
  164. package/dist/mcp-data/registry/button-filled.json +20 -1
  165. package/dist/mcp-data/registry/button-unfilled.json +24 -4
  166. package/dist/mcp-data/registry/filter-menu.json +2 -2
  167. package/dist/mcp-data/registry/input.json +2 -2
  168. package/dist/mcp-data/registry/menu.json +2 -1
  169. package/dist/mcp-data/registry/mobile-bar-nav.json +57 -6
  170. package/dist/mcp-data/registry/pagination.json +5 -4
  171. package/dist/mcp-data/registry/panel-tools.json +4 -4
  172. package/dist/mcp-data/registry/registry.json +61 -33
  173. package/dist/mcp-data/registry/select.json +2 -2
  174. package/dist/mcp-data/registry/shell-app.json +5 -5
  175. package/dist/mcp-data/registry/shell-tools.json +4 -4
  176. package/dist/mcp-data/registry/table-filter.json +3 -3
  177. package/dist/mcp-data/registry/table-sort.json +5 -4
  178. package/dist/mcp-data/registry/table-toolbar.json +10 -9
  179. package/dist/mcp-data/registry/table.json +6 -6
  180. package/dist/styles/table.css +30 -10
  181. package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +2 -0
  182. package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +2 -0
  183. package/dist/types/components/Menu/Menu.d.ts +1 -0
  184. package/dist/types/components/MobileBarNav/MobileBarNav.d.ts +4 -0
  185. package/dist/types/components/Pagination/Pagination.d.ts +8 -0
  186. package/dist/types/components/PanelTools/panel-tools-types.d.ts +2 -2
  187. package/dist/types/components/Table/Table.d.ts +1 -0
  188. package/dist/types/components/Table/table-column-customizer.d.ts +0 -2
  189. package/dist/types/components/TableToolbar/TableToolbar.d.ts +5 -0
  190. package/dist/types/components.d.ts +51 -0
  191. package/dist/types/shell/shell-responsive.d.ts +6 -1
  192. package/dist/types/utils/anchored-position.d.ts +2 -0
  193. package/dist/types/utils/button-render.d.ts +1 -0
  194. package/dist/vue/ds-button-filled.js +1 -0
  195. package/dist/vue/ds-button-unfilled.js +1 -0
  196. package/dist/vue/ds-mobile-bar-nav.js +3 -0
  197. package/package.json +1 -1
  198. package/dist/components/p-23u3lIr1.js +0 -2
  199. package/dist/components/p-Asi9h3pa.js +0 -2
  200. package/dist/components/p-Asi9h3pa.js.map +0 -1
  201. package/dist/components/p-B0PEg5RF.js +0 -2
  202. package/dist/components/p-BBxcMVqk.js +0 -2
  203. package/dist/components/p-BBxcMVqk.js.map +0 -1
  204. package/dist/components/p-BEvBJ65v.js +0 -2
  205. package/dist/components/p-BEvBJ65v.js.map +0 -1
  206. package/dist/components/p-BVlfQ8xZ.js.map +0 -1
  207. package/dist/components/p-BX0BMhgz.js +0 -2
  208. package/dist/components/p-BX0BMhgz.js.map +0 -1
  209. package/dist/components/p-BdnQv7Zl.js +0 -2
  210. package/dist/components/p-BdnQv7Zl.js.map +0 -1
  211. package/dist/components/p-Bh67XbfB.js +0 -2
  212. package/dist/components/p-Bh67XbfB.js.map +0 -1
  213. package/dist/components/p-CKmfuK7k.js.map +0 -1
  214. package/dist/components/p-DEjh3klB.js +0 -2
  215. package/dist/components/p-DIEK54fV.js +0 -2
  216. package/dist/components/p-DOqnJVos.js +0 -2
  217. package/dist/components/p-DOqnJVos.js.map +0 -1
  218. package/dist/components/p-Dr4AgJbV.js +0 -2
  219. package/dist/components/p-Dr4AgJbV.js.map +0 -1
  220. package/dist/components/p-NzGRAPcF.js +0 -2
  221. package/dist/components/p-NzGRAPcF.js.map +0 -1
  222. package/dist/components/p-U8JIZzI2.js.map +0 -1
  223. package/dist/components/p-ZZzC52Ea.js +0 -2
  224. package/dist/components/p-ZZzC52Ea.js.map +0 -1
  225. package/dist/components/p-__lNIImO.js +0 -2
  226. package/dist/components/p-__lNIImO.js.map +0 -1
  227. /package/dist/components/{p-y4jhIkRc.js.map → p-3WlVHGUe.js.map} +0 -0
  228. /package/dist/components/{p-DAqSoyd4.js.map → p-9EQ3xLI1.js.map} +0 -0
  229. /package/dist/components/{p-DSIOINBK.js.map → p-B145kX-i.js.map} +0 -0
  230. /package/dist/components/{p-DZ55e3j9.js.map → p-B9ZfoprK.js.map} +0 -0
  231. /package/dist/components/{p-DNJTN_s0.js.map → p-BBmRD_S0.js.map} +0 -0
  232. /package/dist/components/{p-C4TgWJi9.js.map → p-BKx2ihnG.js.map} +0 -0
  233. /package/dist/components/{p-Be1sY58w.js.map → p-BTTxl3ro.js.map} +0 -0
  234. /package/dist/components/{p-rrFMAZkj.js.map → p-BdgoB2ef.js.map} +0 -0
  235. /package/dist/components/{p-DQqOzDEq.js.map → p-BiBXCjjo.js.map} +0 -0
  236. /package/dist/components/{p-D1YhYulL.js.map → p-C6yLERx6.js.map} +0 -0
  237. /package/dist/components/{p-Dg9qiMDa.js.map → p-C9StMCWg.js.map} +0 -0
  238. /package/dist/components/{p-7tZx4ukz.js.map → p-CAJIARNW.js.map} +0 -0
  239. /package/dist/components/{p-D2z2DgtX.js.map → p-CHEt4mW8.js.map} +0 -0
  240. /package/dist/components/{p-BHz78C8h.js.map → p-CbZ0RU2c.js.map} +0 -0
  241. /package/dist/components/{p-Bn8NryHK.js.map → p-CihNoe1M.js.map} +0 -0
  242. /package/dist/components/{p-D4K9CE8a.js.map → p-Cj5Hkt6Y.js.map} +0 -0
  243. /package/dist/components/{p-ruPTIV6t.js.map → p-D6P_1YrL.js.map} +0 -0
  244. /package/dist/components/{p-BNkU9dcc.js.map → p-DJ0GCCFa.js.map} +0 -0
  245. /package/dist/components/{p-DsJW5W3W.js.map → p-DMaQkEYP.js.map} +0 -0
  246. /package/dist/components/{p-PD1Vfg0t.js.map → p-DPR0TGGJ.js.map} +0 -0
  247. /package/dist/components/{p-CMFvaY05.js.map → p-DPpHSIzS.js.map} +0 -0
  248. /package/dist/components/{p-a6qP60zb.js.map → p-DbJahF86.js.map} +0 -0
  249. /package/dist/components/{p-D8Qd6gkf.js.map → p-Dd8VKdAO.js.map} +0 -0
  250. /package/dist/components/{p-C0X2zKbB.js.map → p-Dginv8PT.js.map} +0 -0
  251. /package/dist/components/{p-BHDkJmrC.js.map → p-Dl3gciej.js.map} +0 -0
  252. /package/dist/components/{p-23u3lIr1.js.map → p-Drcl4zS9.js.map} +0 -0
  253. /package/dist/components/{p-BhYWdbEp.js.map → p-HZz5aJKz.js.map} +0 -0
  254. /package/dist/components/{p-BGXqFq2C.js.map → p-LHzBS95u.js.map} +0 -0
  255. /package/dist/components/{p-DHuyj-9J.js.map → p-hp_2W2Qy.js.map} +0 -0
  256. /package/dist/components/{p-CzcWZiH-.js.map → p-oCc3mz_c.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as e,H as i,c as t,h as r,a as n,t as s}from"./index.js";import{o,d}from"./p-NzGRAPcF.js";import{A as c}from"./p-BBxcMVqk.js";import{C as a}from"./p-C6DNhlES.js";import{c as l}from"./p-Cxr0IQjC.js";import{d as f}from"./p-a6qP60zb.js";import{d as u}from"./p-B0PEg5RF.js";import{d as h}from"./p-BFfLvMZd.js";import{d as m}from"./p-JPTkZ3Ji.js";import{d as g}from"./p-y4jhIkRc.js";import{d as v}from"./p-BGXqFq2C.js";import{d as p}from"./p-D4K9CE8a.js";import{a as b,b as x,T as y}from"./p-DFQ9mcbK.js";import{r as w}from"./p-BMc0DE59.js";import{r as _}from"./p-DhKvqh5G.js";import{C as k}from"./p-CuwopElg.js";import{c as z}from"./p-DuFm-ieS.js";const C=()=>`@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-filter-menu-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-filter-menu-h,.ds-focus-ring.sc-ds-filter-menu,.ds-focus-ring-inset.sc-ds-filter-menu-h,.ds-focus-ring-inset.sc-ds-filter-menu{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-filter-menu-h:focus-visible,.ds-focus-ring.sc-ds-filter-menu:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-filter-menu-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-filter-menu{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-filter-menu-h:focus-visible,.ds-focus-ring-inset.sc-ds-filter-menu:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-filter-menu-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-filter-menu:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-filter-menu-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-filter-menu-h,.ds-interaction-fill.sc-ds-filter-menu{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-filter-menu-h::before,.ds-interaction-fill.sc-ds-filter-menu::before,.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-filter-menu-h::before,.ds-interaction-fill.sc-ds-filter-menu::before{z-index:1}.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-filter-menu-h,.ds-interaction-fill--bordered.sc-ds-filter-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-filter-menu-h::before,.ds-interaction-fill--selected.sc-ds-filter-menu::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-filter-menu-h,.ds-interaction-fill--selected.sc-ds-filter-menu{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-filter-menu-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-filter-menu:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-filter-menu-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-filter-menu:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-filter-menu-h::after,.ds-interaction-fill--grouped.sc-ds-filter-menu::after,.ds-interaction-fill--grouped.sc-ds-filter-menu-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-filter-menu:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-filter-menu-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-filter-menu:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-filter-menu-h,.ds-interaction-fill--grouped.sc-ds-filter-menu{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-filter-menu-h>.ds-interaction-fill__content.sc-ds-filter-menu,.ds-interaction-fill.sc-ds-filter-menu>.ds-interaction-fill__content.sc-ds-filter-menu,.ds-interaction-fill__content.sc-ds-filter-menu{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-filter-menu-h,.ds-interaction-fill--on-faint.sc-ds-filter-menu{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-filter-menu-h,.ds-interaction-fill--on-medium.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-filter-menu-h,.ds-interaction-fill--on-bold.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-filter-menu-h,.ds-interaction-fill--on-strong.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-filter-menu-h,.ds-interaction-fill--on-translucent.sc-ds-filter-menu{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-filter-menu-h,.ds-interaction-fill--on-inverted.sc-ds-filter-menu{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-filter-menu-h,.ds-interaction-fill--on-media.sc-ds-filter-menu{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-filter-menu-h,.ds-interaction-fill--on-always-dark.sc-ds-filter-menu{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-filter-menu-h,.ds-interaction-fill--on-navigation.sc-ds-filter-menu{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--selected.sc-ds-filter-menu-h::before,.ds-interaction-fill--selected.sc-ds-filter-menu::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-filter-menu-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-filter-menu:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-filter-menu-h,.ds-control-inactive.sc-ds-filter-menu{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-filter-menu-h,.ds-control-inactive.sc-ds-filter-menu{color:var(--ds-forced-color-disabled);opacity:1}}.ds-control--lg.sc-ds-filter-menu,.ds-control--lg.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu,.ds-control--sm.sc-ds-filter-menu-h,.ds-control--sm.sc-ds-filter-menu,.ds-control--xs.sc-ds-filter-menu-h,.ds-control--xs.sc-ds-filter-menu{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-filter-menu-h,.ds-control--lg.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-filter-menu-h,.ds-control--sm.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-filter-menu-h,.ds-control--xs.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-filter-menu-h,.ds-chrome-space--sm.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-filter-menu-h,.ds-chrome-space--md.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-filter-menu-h,.ds-chrome-space--lg.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-filter-menu-h,.ds-chrome-row.sc-ds-filter-menu,.ds-chrome-column.sc-ds-filter-menu-h,.ds-chrome-column.sc-ds-filter-menu,.ds-chrome-grid.sc-ds-filter-menu-h,.ds-chrome-grid.sc-ds-filter-menu{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-filter-menu-h,.ds-chrome-row.sc-ds-filter-menu{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-filter-menu-h,.ds-chrome-column.sc-ds-filter-menu{flex-direction:column}.ds-chrome-grid.sc-ds-filter-menu-h,.ds-chrome-grid.sc-ds-filter-menu{display:grid;align-items:center}.ds-control-frame.sc-ds-filter-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-filter-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-filter-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-filter-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-filter-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-empty-region.sc-ds-filter-menu{display:flex;flex:1 1 auto;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.ds-empty-region--padded.sc-ds-filter-menu{padding:var(--dimension-space-200)}.sc-ds-filter-menu:where(.ds-text-decoration,.ds-text-action).sc-ds-filter-menu{text-decoration-color:var(--ds-text-decoration-color, var(--color-foreground-tertiary));text-decoration-thickness:var(--ds-text-decoration-thickness, var(--dimension-stroke-width-012));text-underline-offset:var(--ds-text-decoration-offset, var(--dimension-space-025))}.ds-text-action.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-bold-brand);--ds-text-decoration-color:var(--ds-text-action-foreground);color:var(--ds-text-action-foreground);text-decoration-line:none}.ds-text-action--on-medium.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-medium-background-primary);--ds-text-decoration-color:var(--color-foreground-on-medium-background-secondary);text-decoration-line:underline}.ds-text-action--on-strong.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-strong-background-primary);--ds-text-decoration-color:var(--color-foreground-on-strong-background-secondary);text-decoration-line:underline}.ds-text-action--on-bold.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-bold-background-primary);--ds-text-decoration-color:var(--color-foreground-on-bold-background-secondary);text-decoration-line:underline}@media (hover: hover) and (pointer: fine){.ds-text-action.sc-ds-filter-menu:hover{text-decoration-line:underline}}@media (forced-colors: active){.ds-text-action.sc-ds-filter-menu{text-decoration-line:underline;text-decoration-color:currentcolor}}.ds-choice-popup.sc-ds-filter-menu{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--ds-choice-popup-min-inline-size, var(--dimension-menu-width-xs));max-width:min(var(--dimension-panel-width-lg), calc(100vw - var(--dimension-space-200)));max-height:calc(100vh - var(--dimension-space-200));overflow:hidden;inset:auto;margin:0;padding:0;border:0;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);color:var(--color-foreground-secondary);animation:dsChoiceFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform;text-align:start}.ds-choice-popup.sc-ds-filter-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.ds-choice-popup--closing.sc-ds-filter-menu{animation:dsChoiceFadeOut var(--effect-motion-short-2) forwards}@keyframes dsChoiceFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes dsChoiceFadeOut{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.ds-choice-popup.sc-ds-filter-menu{animation:none;opacity:1}.ds-choice-popup--closing.sc-ds-filter-menu{opacity:0}}.ds-choice-list.sc-ds-filter-menu{display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain}.ds-choice-section--divided.sc-ds-filter-menu{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}ds-text.ds-choice-section__header.sc-ds-filter-menu{text-align:start;-webkit-user-select:none;user-select:none}.ds-choice-section--headed-after-first.sc-ds-filter-menu{margin-block-start:var(--dimension-space-050)}.ds-choice-item.sc-ds-filter-menu{width:100%;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));background:transparent;cursor:default;-webkit-user-select:none;user-select:none;text-align:left;color:inherit}.ds-choice-item.sc-ds-filter-menu:has(.ds-choice-item__subtext){height:auto;min-height:var(--ds-control-height, var(--dimension-size-400));padding-block:var(--ds-control-padding-inline, var(--dimension-space-075));align-items:flex-start}.ds-choice-item__content.sc-ds-filter-menu{display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}ds-text.ds-choice-item__label.sc-ds-filter-menu{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ds-text.ds-choice-item__subtext.sc-ds-filter-menu{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ds-choice-item__icon.sc-ds-filter-menu,.ds-choice-item__suffix.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.ds-choice-item.ds-interaction-fill--selected.sc-ds-filter-menu .ds-choice-item__icon.sc-ds-filter-menu{color:var(--color-foreground-primary)}.ds-choice-item__tag.sc-ds-filter-menu{flex-shrink:0;pointer-events:none}.ds-choice-empty.sc-ds-filter-menu,.ds-choice-loading.sc-ds-filter-menu{min-height:var(--dimension-size-600);padding:var(--dimension-space-100)}.ds-choice-footer.sc-ds-filter-menu{position:relative;box-sizing:border-box;padding-block:var(--dimension-space-050)}.ds-choice-footer.sc-ds-filter-menu::before{content:'';position:absolute;inset:0 0 auto;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.ds-choice-footer__content.sc-ds-filter-menu{display:flex;align-items:center;justify-content:space-between;column-gap:var(--dimension-space-050);box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400))}.ds-choice-footer__summary.sc-ds-filter-menu,.ds-choice-footer__summary-measure.sc-ds-filter-menu,.ds-choice-footer__clear.sc-ds-filter-menu ds-text.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu ds-text.sc-ds-filter-menu{padding-inline:calc( var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-choice-footer__summary.sc-ds-filter-menu,.ds-choice-footer__summary-measure.sc-ds-filter-menu,.ds-choice-footer__clear.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu{white-space:nowrap}.ds-choice-footer__summary-measure.sc-ds-filter-menu{position:absolute;visibility:hidden;pointer-events:none}.ds-choice-footer__clear.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu{appearance:none;display:inline-flex;align-items:center;padding:0;border:0;border-radius:var(--dimension-radius-025);background:transparent;cursor:default}@media (forced-colors: active){.ds-choice-popup.sc-ds-filter-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}.ds-choice-popup.sc-ds-filter-menu::after{box-shadow:none}.ds-choice-section--divided.sc-ds-filter-menu{border-bottom-color:var(--ds-forced-color-content)}.ds-choice-footer.sc-ds-filter-menu::before{background-color:var(--ds-forced-color-content)}}.ds-control-frame.sc-ds-filter-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-filter-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-filter-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-filter-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-filter-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-control-width--hug.sc-ds-filter-menu-h,.ds-control-width--hug.sc-ds-filter-menu{width:fit-content;max-width:100%;flex:0 0 auto;align-self:flex-start}.ds-control-width--fill.sc-ds-filter-menu-h,.ds-control-width--fill.sc-ds-filter-menu{width:100%;min-width:0;flex:1 1 auto;align-self:stretch}.ds-select-trigger-host.sc-ds-filter-menu-h{display:inline-flex;position:relative;min-inline-size:0;outline:none;--ds-select-fg:var(--color-foreground-secondary);--ds-select-fg-active:var(--color-foreground-primary);--ds-select-prefix-fg:var(--ds-select-fg);--ds-select-chevron-fg:var(--ds-select-fg);--ds-select-border:var(--color-border-secondary)}.ds-control-width--fill.sc-ds-filter-menu-h .trigger.sc-ds-filter-menu{width:100%}.trigger.sc-ds-filter-menu{justify-content:flex-start;box-sizing:border-box;inline-size:100%;max-inline-size:100%;min-inline-size:0;background:transparent;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));color:var(--ds-select-fg);cursor:default;font-family:inherit;-webkit-user-select:none;user-select:none;overflow:hidden;transition:color var(--effect-motion-short-2)}.trigger--bordered.sc-ds-filter-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--ds-select-border)}.trigger--expanded.sc-ds-filter-menu{--ds-interaction-hover:var(--ds-interaction-pressed)}.trigger--expanded.sc-ds-filter-menu::after{background:var(--ds-interaction-pressed)}.trigger--has-value.sc-ds-filter-menu .trigger__label-box.sc-ds-filter-menu{color:var(--ds-select-fg-active)}.trigger--label-placeholder.sc-ds-filter-menu .trigger__label-box.sc-ds-filter-menu{color:var(--ds-select-fg)}.trigger__prefix.sc-ds-filter-menu,.trigger__chevron.sc-ds-filter-menu{position:relative;z-index:2}.trigger__prefix.sc-ds-filter-menu{color:var(--ds-select-prefix-fg)}.trigger__chevron.sc-ds-filter-menu{color:var(--ds-select-chevron-fg)}.trigger__label-box.sc-ds-filter-menu{position:relative;z-index:2;display:flex;align-items:center;flex:1 1 auto;overflow:hidden;text-align:left;color:inherit;transition:color var(--effect-motion-short-2)}.trigger__label-content.sc-ds-filter-menu{display:inline-flex;align-items:center;flex:1 1 auto;max-width:100%;min-width:0;overflow:hidden}.trigger__label.sc-ds-filter-menu{flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden}.ds-select-trigger-host--background-medium.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-medium-background-secondary);--ds-select-fg-active:var(--color-foreground-on-medium-background-primary);--ds-select-border:var(--color-border-on-medium-background-secondary)}.ds-select-trigger-host--background-bold.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-bold-background-secondary);--ds-select-fg-active:var(--color-foreground-on-bold-background-primary);--ds-select-border:var(--color-border-on-bold-background-secondary)}.ds-select-trigger-host--background-strong.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-strong-background-secondary);--ds-select-fg-active:var(--color-foreground-on-strong-background-primary);--ds-select-border:var(--color-border-on-strong-background-secondary)}.ds-select-trigger-host--background-translucent.sc-ds-filter-menu-h{--ds-select-fg:var(--color-translucent-foreground-secondary);--ds-select-fg-active:var(--color-translucent-foreground-primary);--ds-select-border:var(--color-translucent-border-secondary)}.ds-select-trigger-host--background-inverted.sc-ds-filter-menu-h{--ds-select-fg:var(--color-inverted-foreground-secondary);--ds-select-fg-active:var(--color-inverted-foreground-primary);--ds-select-border:var(--color-inverted-border-secondary)}.ds-select-trigger-host--background-media.sc-ds-filter-menu-h{--ds-select-fg:var(--color-media-foreground-secondary);--ds-select-fg-active:var(--color-media-foreground-primary);--ds-select-border:var(--color-media-border-secondary)}.ds-select-trigger-host--background-always-dark.sc-ds-filter-menu-h{--ds-select-fg:var(--color-always-dark-foreground-secondary);--ds-select-fg-active:var(--color-always-dark-foreground-primary);--ds-select-border:var(--color-always-dark-border-secondary)}.ds-table-caption-control.sc-ds-filter-menu-h{--ds-choice-popup-min-inline-size:var(--dimension-menu-width-xs)}.ds-table-caption-control.ds-table-caption-control--compact.sc-ds-filter-menu-h{flex:0 0 auto;width:var(--ds-control-height, var(--dimension-size-400));height:var(--ds-control-height, var(--dimension-size-400));min-width:var(--ds-control-height, var(--dimension-size-400));min-height:var(--ds-control-height, var(--dimension-size-400));max-width:var(--ds-control-height, var(--dimension-size-400));inline-size:var(--ds-control-height, var(--dimension-size-400));min-inline-size:var(--ds-control-height, var(--dimension-size-400));max-inline-size:var(--ds-control-height, var(--dimension-size-400))}.ds-table-caption-control.ds-table-caption-control--compact.sc-ds-filter-menu-h .trigger.sc-ds-filter-menu{justify-content:center;inline-size:100%;min-inline-size:100%;height:100%;padding-inline:0}.ds-table-caption-control.ds-table-caption-control--compact.sc-ds-filter-menu-h .trigger--has-value.sc-ds-filter-menu{--ds-select-prefix-fg:var(--ds-select-fg-active)}@container ds-table (max-width: 899px){.sc-ds-filter-menu-h.ds-table-caption-control{flex:0 0 auto;inline-size:var(--ds-control-height, var(--dimension-size-400));min-inline-size:var(--ds-control-height, var(--dimension-size-400));max-inline-size:var(--ds-control-height, var(--dimension-size-400))}.sc-ds-filter-menu-h.ds-table-caption-control .trigger{justify-content:center;inline-size:100%;min-inline-size:100%;padding-inline:0}.sc-ds-filter-menu-h.ds-table-caption-control .trigger--has-value{--ds-select-prefix-fg:var(--ds-select-fg-active)}}.filter-menu-host--external-trigger.sc-ds-filter-menu-h{display:contents}.filter-menu.sc-ds-filter-menu{display:flex;min-height:0;flex-direction:column;color:var(--color-foreground-primary)}.filter-menu__body.sc-ds-filter-menu{display:grid;grid-template-columns:minmax(calc(var(--dimension-size-base) * 18), 2fr) minmax(0, 3fr);min-height:calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));max-height:calc(100vh - var(--dimension-size-800) - var(--dimension-size-600))}.filter-menu__categories.sc-ds-filter-menu{min-width:0;border-inline-end:var(--dimension-stroke-width-012) solid var(--color-border-tertiary)}.filter-menu__category-section.sc-ds-filter-menu{display:flex;min-width:0;flex-direction:column}.filter-menu__category-section.ds-choice-section--divided.sc-ds-filter-menu{padding-block-end:var(--dimension-space-050)}.filter-menu__category.sc-ds-filter-menu{justify-content:space-between;width:100%;border:0;background:transparent;color:var(--color-foreground-secondary);cursor:default;text-align:start}.filter-menu__category--active.sc-ds-filter-menu{color:var(--color-foreground-primary)}.filter-menu__options.sc-ds-filter-menu{min-width:0;overflow:hidden}.filter-menu__date-field.sc-ds-filter-menu{display:flex;min-width:0;flex-direction:column;align-items:stretch;gap:var(--dimension-space-100)}.filter-menu__date-control.sc-ds-filter-menu{width:100%;border-radius:var(--dimension-radius-025);background:transparent;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary)}.filter-menu__date-control.sc-ds-filter-menu:focus-within{box-shadow:inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand)}.filter-menu__date-input.sc-ds-filter-menu{flex:1 1 auto;min-width:0;height:100%;padding-inline:var(--dimension-space-100);border:0;outline:0;background:transparent;color:var(--color-foreground-primary);font:inherit}.filter-menu__footer.sc-ds-filter-menu{flex:0 0 auto}.filter-menu__clear.sc-ds-filter-menu{color:var(--color-foreground-bold-brand)}@media (max-width: 520px){.filter-menu__body.sc-ds-filter-menu{grid-template-columns:minmax(calc(var(--dimension-size-base) * 14), 2fr) minmax(0, 3fr)}}@media (forced-colors: active){.filter-menu__categories.sc-ds-filter-menu{border-inline-end-color:var(--ds-forced-color-content)}.filter-menu__date-control.sc-ds-filter-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content)}}`;const I=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");let F=0;const j={lg:"lg",md:"md",sm:"sm",xs:"xs"};const $=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.dsChange=t(this,"dsChange",7);this.dsClear=t(this,"dsClear",7);this.dsActiveFilterChange=t(this,"dsActiveFilterChange",7);this.dsClose=t(this,"dsClose",7);this.dsOpenChange=t(this,"dsOpenChange",7);this.dsAfterClose=t(this,"dsAfterClose",7);this.open=false;this.triggerLabel="Filters";this.icon="Filters";this.size="md";this.width="hug";this.hasBorder=true;this.activeFill=false;this.collapseLabel=false;this.ariaLabel=null;this.filters=[];this.values={};this.side="bottom";this.align="end";this.sideOffset=b.space050;this.alignOffset=0;this.menuWidth=b.menuWidthLg;this.menuLabel="Filters";this.categoriesLabel="Filter categories";this.clearLabel="Clear";this.initialFocusVisible=false;this.shouldRender=false;this.closing=false;this.positionReady=false;this.pos={x:0,y:0};this.focusRingVisible=false;this.activeOptionIndex=0;this.captionCompact=false;this.generatedId=`ds-filter-menu-${++F}`;this.outsideHandler=null;this.triggerElement=null;this.pendingInitialFocusVisible=false;this.closeTimer=null;this.hasLoaded=false;this.closingSnapshot=null;this.position=new c({getAnchor:()=>this.resolvedAnchor,getPopup:()=>this.el.querySelector(".filter-menu-popup"),measure:(e,i)=>{if(!this.open)return null;const t=e.getBoundingClientRect();const r=w(y.space050,y.space050);return{anchorRect:t,popupWidth:i.offsetWidth||this.popupFallbackWidth,popupHeight:i.offsetHeight||this.popupFallbackHeight,side:this.side,align:this.align,sideOffsetPx:w(this.sideOffset,y.space050),alignOffsetPx:_({align:this.align,alignOffsetPx:w(this.alignOffset,0),sectionInsetPx:r}),viewportPadPx:this.viewportPad,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}},apply:({x:e,y:i})=>{this.pos={x:e,y:i}},onReady:()=>{this.positionReady=true},liveUpdate:"double-frame",observeResize:true,topLayer:true})}componentDidLoad(){this.hasLoaded=true;this.syncCaptionCompactObserver();if(this.open)this.onOpenChange(true)}connectedCallback(){if(!this.hasLoaded)return;this.syncCaptionCompactObserver();if(this.open)this.onOpenChange(true)}disconnectedCallback(){this.disconnectCaptionCompactObserver();this.position.unobserve();this.teardownListeners()}onCollapseLabelChange(){this.syncCaptionCompactObserver()}onOpenChange(e){if(e){this.teardownListeners();this.closingSnapshot=null;this.shouldRender=true;this.closing=false;this.positionReady=false;this.focusRingVisible=this.pendingInitialFocusVisible||this.initialFocusVisible;this.setupListeners();this.position.schedule((()=>this.focusInitialCategory()));return}if(!this.shouldRender)return;this.position.cancel();this.captureClosingSnapshot();this.closing=true;this.teardownListeners();const i=x(y.motionShort2,y.animationDurationShort3);if(i<=0){this.finishClose();return}this.closeTimer=setTimeout((()=>this.finishClose()),i)}onPositionInputChange(){if(this.open)this.position.schedule()}handleKeyDown(e){if(!this.shouldRender||this.closing)return;if(e.key==="Escape"){e.preventDefault();this.close();return}if(e.key!=="Tab"||!this.tabLeavesPopup(e))return;e.preventDefault();this.close(false);this.moveFocusAfterTab(e.shiftKey)}get resolvedAnchor(){if(this.anchor)return this.anchor;if(this.anchorId)return document.getElementById(this.anchorId);return this.triggerElement}get usesInternalTrigger(){return!this.anchor&&!this.anchorId}get anchorFocusTarget(){const e=this.resolvedAnchor;if(!e)return null;if(e.matches(I))return e;return e.querySelector(I)??e}get viewportPad(){return w(y.space050,y.space050)}get popupFallbackWidth(){return w(y.menuWidthLg,y.menuWidthLg)}get popupFallbackHeight(){return w(y.menuFallbackHeight,y.menuFallbackHeight)}setupListeners(){this.outsideHandler=e=>{const i=e.target;const t=this.el.querySelector(".filter-menu-popup");if(t?.contains(i)||this.resolvedAnchor?.contains(i))return;this.close()};document.addEventListener("mousedown",this.outsideHandler,true);this.position.observe()}teardownListeners(){this.position.unobserve();if(this.outsideHandler){document.removeEventListener("mousedown",this.outsideHandler,true);this.outsideHandler=null}if(this.closeTimer){clearTimeout(this.closeTimer);this.closeTimer=null}}close(e=true){this.captureClosingSnapshot();if(e)this.focusAnchor();this.dsOpenChange.emit(false);this.dsClose.emit();this.open=false;this.onOpenChange(false)}toggleFromTrigger(e){if(this.open){this.close();return}this.pendingInitialFocusVisible=e.detail===0;this.open=true;this.dsOpenChange.emit(true);this.onOpenChange(true)}handleTriggerKeyDown(e){if(e.key!=="ArrowDown"||this.open)return;e.preventDefault();this.pendingInitialFocusVisible=true;this.open=true;this.dsOpenChange.emit(true);this.onOpenChange(true)}finishClose(){const e=this.el.querySelector(".filter-menu-popup");if(e?.matches(":popover-open"))e.hidePopover();this.shouldRender=false;this.closing=false;this.closingSnapshot=null;this.closeTimer=null;this.dsAfterClose.emit()}captureClosingSnapshot(){if(this.closingSnapshot)return;this.closingSnapshot={filters:this.filters.map((e=>({...e,options:e.options?.map((e=>({...e})))}))),values:Object.fromEntries(Object.entries(this.values).map((([e,i])=>[e,Array.isArray(i)?[...i]:i]))),activeFilterId:this.activeFilterId}}focusAnchor(){const e=this.resolvedAnchor;if(e?.setFocus){void e.setFocus();return}this.anchorFocusTarget?.focus()}focusInitialCategory(){requestAnimationFrame((()=>{this.el.querySelector('.filter-menu__category[tabindex="0"]')?.focus();this.pendingInitialFocusVisible=false}))}tabLeavesPopup(e){const i=this.el.querySelector(".filter-menu-popup");if(!i)return true;const t=Array.from(i.querySelectorAll(I)).filter((e=>e.getClientRects().length>0));const r=t.indexOf(e.target);if(r<0)return true;return e.shiftKey?r===0:r===t.length-1}moveFocusAfterTab(e){const i=this.anchorFocusTarget;if(!i)return;if(e){i.focus();return}const t=Array.from(document.querySelectorAll(I)).filter((e=>!e.closest(".filter-menu-popup")&&!e.closest("[inert]")&&e.getClientRects().length>0));const r=t.indexOf(i);(t[r+1]??i).focus()}selectedFilter(e,i){return e.find((e=>e.id===i))??e[0]}selectedCount(e,i){const t=i[e.id];if(e.kind==="multiple")return Array.isArray(t)?t.length:0;if(e.kind==="boolean")return t===true?1:0;return typeof t==="string"&&t.length>0?1:0}totalSelected(e,i){return e.reduce(((e,t)=>e+this.selectedCount(t,i)),0)}activeFilterCount(e,i){return e.filter((e=>this.selectedCount(e,i)>0)).length}selectCategory(e,i=false){this.activeOptionIndex=0;this.dsActiveFilterChange.emit(e);if(!i)return;requestAnimationFrame((()=>{this.el.querySelector(`[data-filter-category="${e}"]`)?.focus()}))}handleCategoryKeyDown(e,i,t){const r=i.findIndex((e=>e.id===t));let n;if(e.key==="ArrowDown")n=(r+1)%i.length;else if(e.key==="ArrowUp")n=(r-1+i.length)%i.length;else if(e.key==="Home")n=0;else if(e.key==="End")n=i.length-1;else if(e.key==="ArrowRight"){e.preventDefault();requestAnimationFrame((()=>{this.el.querySelector('.filter-menu__options [role="option"], .filter-menu__options input')?.focus()}));return}else return;e.preventDefault();this.focusRingVisible=true;this.selectCategory(i[n].id,true)}handlePanelKeyDown(e,i){if(e.key!=="ArrowLeft")return;e.preventDefault();this.el.querySelector(`[data-filter-category="${i}"]`)?.focus()}handleOptionKeyDown(e,i,t,r,n){const s=i.options??[];if(e.key==="ArrowLeft"){this.handlePanelKeyDown(e,i.id);return}if(e.key==="Enter"||e.key===" "){e.preventDefault();this.selectOption(i,t,n);return}if(!["ArrowDown","ArrowUp","Home","End"].includes(e.key))return;e.preventDefault();const o=s.map(((e,i)=>({candidate:e,optionIndex:i}))).filter((({candidate:e})=>!e.isInactive)).map((({optionIndex:e})=>e));if(!o.length)return;const d=o.indexOf(r);let c;if(e.key==="Home")c=o[0];else if(e.key==="End")c=o[o.length-1];else{const i=e.key==="ArrowDown"?1:-1;const t=d>=0?d:i===1?-1:0;c=o[(t+i+o.length)%o.length]}this.activeOptionIndex=c;this.focusRingVisible=true;requestAnimationFrame((()=>{this.el.querySelector(`#${this.generatedId}-${i.id}-option-${c}`)?.focus()}))}toggleMultiple(e,i,t,r){if(i.isInactive)return;const n=Array.isArray(r[e.id])?r[e.id]:[];const s=new Set(n);if(t)s.add(i.value);else s.delete(i.value);const o=(e.options??[]).map((e=>e.value)).filter((e=>s.has(e)));this.dsChange.emit({filterId:e.id,value:o})}selectOption(e,i,t){if(i.isInactive)return;if(e.kind==="single"){this.dsChange.emit({filterId:e.id,value:i.value});return}const r=Array.isArray(t[e.id])?t[e.id].includes(i.value):false;this.toggleMultiple(e,i,!r,t)}renderOptions(e,i){const t=i[e.id];if(e.kind==="multiple"||e.kind==="single"){const n=Array.isArray(t)?t:[];const s=e.options??[];const o=l(s.map((e=>({label:e.label,value:e.value,subtext:e.description}))));return s.map(((s,d)=>{const c=e.kind==="multiple"?n.includes(s.value):t===s.value;return r(a,{size:"md",id:`${this.generatedId}-${e.id}-option-${d}`,option:{label:s.label,value:s.value,subtext:s.description,isInactive:s.isInactive},selected:c,active:d===this.activeOptionIndex,focusRingVisible:this.focusRingVisible,usesSubtext:o,tabIndex:d===this.activeOptionIndex?0:-1,leading:e.kind==="multiple"?r("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-checkbox",{label:"",size:"md",checked:c,presentation:true})):undefined,onFocus:()=>{this.activeOptionIndex=d},onKeyDown:t=>this.handleOptionKeyDown(t,e,s,d,i),onHover:()=>{this.focusRingVisible=false;this.activeOptionIndex=d},onSelect:()=>this.selectOption(e,s,i)})}))}if(e.kind==="boolean"){const i={label:e.fieldLabel??e.label,value:"true",description:e.description};return r(a,{size:"md",id:`${this.generatedId}-${e.id}-option-0`,option:{label:i.label,value:i.value,subtext:i.description},selected:t===true,active:true,focusRingVisible:this.focusRingVisible,usesSubtext:Boolean(i.description),tabIndex:0,leading:r("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-checkbox",{label:"",size:"md",checked:t===true,presentation:true})),onKeyDown:i=>{if(i.key==="ArrowLeft")this.handlePanelKeyDown(i,e.id);else if(i.key==="Enter"||i.key===" "){i.preventDefault();this.dsChange.emit({filterId:e.id,value:t!==true})}},onHover:()=>{this.focusRingVisible=false},onSelect:()=>this.dsChange.emit({filterId:e.id,value:t!==true})})}const n=typeof t==="string"?t:"";const s=`${this.generatedId}-${e.id}-input`;return r("div",{class:"filter-menu__date-field"},r("label",{htmlFor:s},r("ds-text",{as:"span",variant:"text-body-small",emphasis:true,color:"primary"},e.fieldLabel??"Event date")),r("div",{class:"filter-menu__date-control ds-control-frame ds-control--md"},r("input",{id:s,class:"filter-menu__date-input",type:"date",value:n,onInput:i=>this.dsChange.emit({filterId:e.id,value:i.target.value})}),n?r("ds-button-unfilled",{variant:"icon",icon:"CrossCircle",size:"sm",isInset:true,hasBorder:false,rounded:true,ariaLabel:`${this.clearLabel} ${e.fieldLabel??e.label}`,onDsClick:i=>{i.stopPropagation();this.dsChange.emit({filterId:e.id,value:""})}}):null))}get captionIconOnly(){return this.collapseLabel&&this.captionCompact&&this.usesInternalTrigger&&Boolean(this.icon)}syncCaptionCompactObserver(){this.disconnectCaptionCompactObserver();if(!this.collapseLabel){if(this.captionCompact)this.captionCompact=false;return}this.captionCompactDisconnect=o(this.el,(e=>{if(this.captionCompact!==e)this.captionCompact=e}))}disconnectCaptionCompactObserver(){this.captionCompactDisconnect?.();this.captionCompactDisconnect=undefined}render(){const e=this.closing&&this.closingSnapshot?this.closingSnapshot:{filters:this.filters,values:this.values,activeFilterId:this.activeFilterId};const i=this.selectedFilter(e.filters,e.activeFilterId);const t=this.totalSelected(e.filters,e.values);const s=this.activeFilterCount(e.filters,e.values);const o=s>0;const d=`${this.triggerLabel}${o?` · ${s}`:""}`;const c=k[this.size];const a=j[this.size];const l=`${this.generatedId}-popup`;const f={position:"fixed",left:"0",top:"0",width:this.menuWidth,transform:`translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,zIndex:"9998",visibility:this.positionReady?"visible":"hidden"};return r(n,{key:"a24f7bef56dc4ae63eb9cbb2e78c8221dd7b5455",class:{"filter-menu-host":true,"filter-menu-host--external-trigger":!this.usesInternalTrigger,"ds-select-trigger-host":this.usesInternalTrigger,[`ds-control--${this.size}`]:true,"ds-table-caption-control":this.collapseLabel,"ds-table-caption-control--compact":this.captionIconOnly,...z(this.width)}},this.usesInternalTrigger?r("button",{ref:e=>{this.triggerElement=e??null},id:this.inputId??`${this.generatedId}-trigger`,type:"button",class:{trigger:true,"ds-control-frame":true,"ds-focus-ring-inset":true,"ds-interaction-fill":true,"ds-interaction-fill--selected":this.activeFill&&o,"trigger--expanded":this.open||this.closing,"trigger--bordered":this.hasBorder,"trigger--has-value":o,[`ds-control--${this.size}`]:true},role:"combobox","aria-haspopup":"dialog","aria-expanded":String(this.open),"aria-controls":this.open?l:undefined,"aria-label":this.ariaLabel??this.menuLabel,onClick:e=>this.toggleFromTrigger(e),onKeyDown:e=>this.handleTriggerKeyDown(e)},this.icon?r("span",{class:"trigger__prefix ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-icon",{name:this.icon,size:a,color:"inherit"})):null,this.captionIconOnly?null:r("ds-text",{class:"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content",as:"span",variant:c,color:"inherit",lineTruncation:1},d),this.captionIconOnly?null:r("span",{class:"trigger__chevron ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-icon",{name:"ChevronDown",size:a,color:"inherit"}))):null,this.shouldRender?r("div",{id:l,popover:"manual",class:{"filter-menu-popup":true,"ds-choice-popup":true,"ds-choice-popup--closing":this.closing},style:f,role:"dialog","aria-label":this.menuLabel},i?r("div",{class:"filter-menu"},r("div",{class:"filter-menu__body"},r("div",{class:"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm",role:"tablist","aria-label":this.categoriesLabel,"aria-orientation":"vertical"},e.filters.map((t=>{const n=t.id===i.id;const s=this.selectedCount(t,e.values);return r("div",{key:t.id,class:{"filter-menu__category-section":true,"ds-choice-section--divided":Boolean(t.divider)}},r("button",{id:`${this.generatedId}-${t.id}-tab`,type:"button",role:"tab","data-filter-category":t.id,class:{"filter-menu__category":true,"filter-menu__category--active":n,"ds-choice-item":true,"ds-control-frame":true,"ds-control--md":true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":n&&this.focusRingVisible,"ds-interaction-fill":true,"ds-interaction-fill--selected":n},"aria-selected":String(n),"aria-controls":`${this.generatedId}-panel`,tabIndex:n?0:-1,onMouseDown:()=>{this.focusRingVisible=false},onClick:()=>this.selectCategory(t.id),onKeyDown:i=>this.handleCategoryKeyDown(i,e.filters,t.id)},r("ds-text",{class:"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content",as:"span",variant:"text-body-medium",color:n?"primary":"secondary"},t.label),s>0?r("ds-tag",{class:"ds-choice-item__tag ds-interaction-fill__content",label:String(s),size:"sm",intent:"brand",contrast:"bold",isInset:true,rounded:true}):null))}))),r("div",{id:`${this.generatedId}-panel`,class:"filter-menu__options",role:"tabpanel","aria-labelledby":`${this.generatedId}-${i.id}-tab`},r("div",{key:i.id,class:"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm",role:"listbox","aria-label":i.label,"aria-multiselectable":i.kind==="multiple"?"true":undefined},this.renderOptions(i,e.values)))),t>0?r("div",{class:"filter-menu__footer ds-choice-footer"},r("div",{class:"ds-choice-footer__content ds-control--md"},r("ds-text",{class:"ds-choice-footer__summary",as:"span",variant:"text-body-medium",color:"secondary","aria-live":"polite"},t," selected"),r("button",{class:"filter-menu__clear ds-choice-footer__clear ds-text-action",type:"button",onClick:()=>this.dsClear.emit()},r("ds-text",{as:"span",variant:"text-body-medium",color:"inherit"},this.clearLabel)))):null):null):null)}get el(){return this}static get watchers(){return{collapseLabel:[{onCollapseLabelChange:0}],open:[{onOpenChange:0}],anchor:[{onPositionInputChange:0}],anchorId:[{onPositionInputChange:0}],side:[{onPositionInputChange:0}],align:[{onPositionInputChange:0}],sideOffset:[{onPositionInputChange:0}],alignOffset:[{onPositionInputChange:0}],menuWidth:[{onPositionInputChange:0}]}}static get style(){return C()}},[2,"ds-filter-menu",{open:[1028],triggerLabel:[1,"trigger-label"],icon:[1],size:[1],width:[1],hasBorder:[4,"has-border"],activeFill:[4,"active-fill"],collapseLabel:[516,"collapse-label"],inputId:[1,"input-id"],ariaLabel:[1,"aria-label"],filters:[16],values:[16],activeFilterId:[1,"active-filter-id"],anchor:[16],anchorId:[1,"anchor-id"],side:[1],align:[1],sideOffset:[8,"side-offset"],alignOffset:[8,"align-offset"],menuWidth:[1,"menu-width"],menuLabel:[1,"menu-label"],categoriesLabel:[1,"categories-label"],clearLabel:[1,"clear-label"],initialFocusVisible:[4,"initial-focus-visible"],shouldRender:[32],closing:[32],positionReady:[32],pos:[32],focusRingVisible:[32],activeOptionIndex:[32],captionCompact:[32]},[[0,"keydown","handleKeyDown"]],{collapseLabel:[{onCollapseLabelChange:0}],open:[{onOpenChange:0}],anchor:[{onPositionInputChange:0}],anchorId:[{onPositionInputChange:0}],side:[{onPositionInputChange:0}],align:[{onPositionInputChange:0}],sideOffset:[{onPositionInputChange:0}],alignOffset:[{onPositionInputChange:0}],menuWidth:[{onPositionInputChange:0}]}]);function A(){if(typeof customElements==="undefined"){return}const e=["ds-filter-menu","ds-badge","ds-button-unfilled","ds-checkbox","ds-icon","ds-loader","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-filter-menu":if(!customElements.get(s(e))){customElements.define(s(e),$)}break;case"ds-badge":if(!customElements.get(s(e))){f()}break;case"ds-button-unfilled":if(!customElements.get(s(e))){d()}break;case"ds-checkbox":if(!customElements.get(s(e))){u()}break;case"ds-icon":if(!customElements.get(s(e))){h()}break;case"ds-loader":if(!customElements.get(s(e))){m()}break;case"ds-tag":if(!customElements.get(s(e))){g()}break;case"ds-text":if(!customElements.get(s(e))){v()}break;case"ds-tooltip":if(!customElements.get(s(e))){p()}break}}))}A();export{$ as F,A as d};
2
- //# sourceMappingURL=p-BFSLT0yc.js.map
1
+ import{p as e,H as i,c as t,h as r,a as n,t as s}from"./index.js";import{o,d}from"./p-DC_8dK55.js";import{A as c}from"./p-DzPw6aDK.js";import{C as a}from"./p-C6DNhlES.js";import{c as l}from"./p-Cxr0IQjC.js";import{d as f}from"./p-DbJahF86.js";import{d as u}from"./p-9GuNIXuz.js";import{d as h}from"./p-BFfLvMZd.js";import{d as m}from"./p-JPTkZ3Ji.js";import{d as g}from"./p-3WlVHGUe.js";import{d as v}from"./p-LHzBS95u.js";import{d as p}from"./p-Cj5Hkt6Y.js";import{a as b,b as x,T as y}from"./p-DFQ9mcbK.js";import{r as w}from"./p-BMc0DE59.js";import{r as _}from"./p-DhKvqh5G.js";import{C as k}from"./p-CuwopElg.js";import{c as z}from"./p-DuFm-ieS.js";const C=()=>`@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-filter-menu-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-filter-menu-h,.ds-focus-ring.sc-ds-filter-menu,.ds-focus-ring-inset.sc-ds-filter-menu-h,.ds-focus-ring-inset.sc-ds-filter-menu{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-filter-menu-h:focus-visible,.ds-focus-ring.sc-ds-filter-menu:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-filter-menu-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-filter-menu{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-filter-menu-h:focus-visible,.ds-focus-ring-inset.sc-ds-filter-menu:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-filter-menu-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-filter-menu:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-filter-menu::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-filter-menu-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-filter-menu-h,.ds-interaction-fill.sc-ds-filter-menu{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-filter-menu-h::before,.ds-interaction-fill.sc-ds-filter-menu::before,.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-filter-menu-h::before,.ds-interaction-fill.sc-ds-filter-menu::before{z-index:1}.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-filter-menu-h,.ds-interaction-fill--bordered.sc-ds-filter-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-filter-menu-h::before,.ds-interaction-fill--selected.sc-ds-filter-menu::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-filter-menu-h,.ds-interaction-fill--selected.sc-ds-filter-menu{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-filter-menu-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-filter-menu:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-filter-menu-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-filter-menu:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-filter-menu-h::after,.ds-interaction-fill--grouped.sc-ds-filter-menu::after,.ds-interaction-fill--grouped.sc-ds-filter-menu-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-filter-menu:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-filter-menu-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-filter-menu:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-filter-menu-h,.ds-interaction-fill--grouped.sc-ds-filter-menu{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-filter-menu-h>.ds-interaction-fill__content.sc-ds-filter-menu,.ds-interaction-fill.sc-ds-filter-menu>.ds-interaction-fill__content.sc-ds-filter-menu,.ds-interaction-fill__content.sc-ds-filter-menu{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-filter-menu-h,.ds-interaction-fill--on-faint.sc-ds-filter-menu{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-filter-menu-h,.ds-interaction-fill--on-medium.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-filter-menu-h,.ds-interaction-fill--on-bold.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-filter-menu-h,.ds-interaction-fill--on-strong.sc-ds-filter-menu{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-filter-menu-h,.ds-interaction-fill--on-translucent.sc-ds-filter-menu{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active-brand);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-filter-menu-h,.ds-interaction-fill--on-inverted.sc-ds-filter-menu{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active-brand);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-filter-menu-h,.ds-interaction-fill--on-media.sc-ds-filter-menu{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-filter-menu-h,.ds-interaction-fill--on-always-dark.sc-ds-filter-menu{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active-brand);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-filter-menu-h,.ds-interaction-fill--on-navigation.sc-ds-filter-menu{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-filter-menu-h::after,.ds-interaction-fill.sc-ds-filter-menu::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--selected.sc-ds-filter-menu-h::before,.ds-interaction-fill--selected.sc-ds-filter-menu::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-filter-menu-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-filter-menu:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-filter-menu:root,.sc-ds-filter-menu-h,.ds-forced-colors-scope.sc-ds-filter-menu{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-filter-menu-h,.ds-control-inactive.sc-ds-filter-menu{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-filter-menu-h,.ds-control-inactive.sc-ds-filter-menu{color:var(--ds-forced-color-disabled);opacity:1}}.ds-control--lg.sc-ds-filter-menu,.ds-control--lg.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu,.ds-control--sm.sc-ds-filter-menu-h,.ds-control--sm.sc-ds-filter-menu,.ds-control--xs.sc-ds-filter-menu-h,.ds-control--xs.sc-ds-filter-menu{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-filter-menu-h,.ds-control--lg.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-filter-menu-h,.ds-control--md.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-filter-menu-h,.ds-control--sm.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-filter-menu-h,.ds-control--xs.sc-ds-filter-menu{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-filter-menu-h,.ds-chrome-space--sm.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-filter-menu-h,.ds-chrome-space--md.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-filter-menu-h,.ds-chrome-space--lg.sc-ds-filter-menu{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-filter-menu-h,.ds-chrome-row.sc-ds-filter-menu,.ds-chrome-column.sc-ds-filter-menu-h,.ds-chrome-column.sc-ds-filter-menu,.ds-chrome-grid.sc-ds-filter-menu-h,.ds-chrome-grid.sc-ds-filter-menu{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-filter-menu-h,.ds-chrome-row.sc-ds-filter-menu{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-filter-menu-h,.ds-chrome-column.sc-ds-filter-menu{flex-direction:column}.ds-chrome-grid.sc-ds-filter-menu-h,.ds-chrome-grid.sc-ds-filter-menu{display:grid;align-items:center}.ds-control-frame.sc-ds-filter-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-filter-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-filter-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-filter-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-filter-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-empty-region.sc-ds-filter-menu{display:flex;flex:1 1 auto;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.ds-empty-region--padded.sc-ds-filter-menu{padding:var(--dimension-space-200)}.sc-ds-filter-menu:where(.ds-text-decoration,.ds-text-action).sc-ds-filter-menu{text-decoration-color:var(--ds-text-decoration-color, var(--color-foreground-tertiary));text-decoration-thickness:var(--ds-text-decoration-thickness, var(--dimension-stroke-width-012));text-underline-offset:var(--ds-text-decoration-offset, var(--dimension-space-025))}.ds-text-action.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-bold-brand);--ds-text-decoration-color:var(--ds-text-action-foreground);color:var(--ds-text-action-foreground);text-decoration-line:none}.ds-text-action--on-medium.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-medium-background-primary);--ds-text-decoration-color:var(--color-foreground-on-medium-background-secondary);text-decoration-line:underline}.ds-text-action--on-strong.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-strong-background-primary);--ds-text-decoration-color:var(--color-foreground-on-strong-background-secondary);text-decoration-line:underline}.ds-text-action--on-bold.sc-ds-filter-menu{--ds-text-action-foreground:var(--color-foreground-on-bold-background-primary);--ds-text-decoration-color:var(--color-foreground-on-bold-background-secondary);text-decoration-line:underline}@media (hover: hover) and (pointer: fine){.ds-text-action.sc-ds-filter-menu:hover{text-decoration-line:underline}}@media (forced-colors: active){.ds-text-action.sc-ds-filter-menu{text-decoration-line:underline;text-decoration-color:currentcolor}}.ds-choice-popup.sc-ds-filter-menu{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--ds-choice-popup-min-inline-size, var(--dimension-menu-width-xs));max-width:min(var(--dimension-panel-width-lg), calc(100vw - var(--dimension-space-200)));max-height:calc(100vh - var(--dimension-space-200));overflow:hidden;inset:auto;margin:0;padding:0;border:0;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);color:var(--color-foreground-secondary);animation:dsChoiceFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform;text-align:start}.ds-choice-popup.sc-ds-filter-menu::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.ds-choice-popup--closing.sc-ds-filter-menu{animation:dsChoiceFadeOut var(--effect-motion-short-2) forwards}@keyframes dsChoiceFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes dsChoiceFadeOut{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.ds-choice-popup.sc-ds-filter-menu{animation:none;opacity:1}.ds-choice-popup--closing.sc-ds-filter-menu{opacity:0}}.ds-choice-list.sc-ds-filter-menu{display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain}.ds-choice-section--divided.sc-ds-filter-menu{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}ds-text.ds-choice-section__header.sc-ds-filter-menu{text-align:start;-webkit-user-select:none;user-select:none}.ds-choice-section--headed-after-first.sc-ds-filter-menu{margin-block-start:var(--dimension-space-050)}.ds-choice-item.sc-ds-filter-menu{width:100%;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));background:transparent;cursor:default;-webkit-user-select:none;user-select:none;text-align:left;color:inherit}.ds-choice-item.sc-ds-filter-menu:has(.ds-choice-item__subtext){height:auto;min-height:var(--ds-control-height, var(--dimension-size-400));padding-block:var(--ds-control-padding-inline, var(--dimension-space-075));align-items:flex-start}.ds-choice-item__content.sc-ds-filter-menu{display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}ds-text.ds-choice-item__label.sc-ds-filter-menu{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ds-text.ds-choice-item__subtext.sc-ds-filter-menu{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ds-choice-item__icon.sc-ds-filter-menu,.ds-choice-item__suffix.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.ds-choice-item.ds-interaction-fill--selected.sc-ds-filter-menu .ds-choice-item__icon.sc-ds-filter-menu{color:var(--color-foreground-primary)}.ds-choice-item__tag.sc-ds-filter-menu{flex-shrink:0;pointer-events:none}.ds-choice-empty.sc-ds-filter-menu,.ds-choice-loading.sc-ds-filter-menu{min-height:var(--dimension-size-600);padding:var(--dimension-space-100)}.ds-choice-footer.sc-ds-filter-menu{position:relative;box-sizing:border-box;padding-block:var(--dimension-space-050)}.ds-choice-footer.sc-ds-filter-menu::before{content:'';position:absolute;inset:0 0 auto;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.ds-choice-footer__content.sc-ds-filter-menu{display:flex;align-items:center;justify-content:space-between;column-gap:var(--dimension-space-050);box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400))}.ds-choice-footer__summary.sc-ds-filter-menu,.ds-choice-footer__summary-measure.sc-ds-filter-menu,.ds-choice-footer__clear.sc-ds-filter-menu ds-text.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu ds-text.sc-ds-filter-menu{padding-inline:calc( var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-choice-footer__summary.sc-ds-filter-menu,.ds-choice-footer__summary-measure.sc-ds-filter-menu,.ds-choice-footer__clear.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu{white-space:nowrap}.ds-choice-footer__summary-measure.sc-ds-filter-menu{position:absolute;visibility:hidden;pointer-events:none}.ds-choice-footer__clear.sc-ds-filter-menu,.ds-choice-footer__action.sc-ds-filter-menu{appearance:none;display:inline-flex;align-items:center;padding:0;border:0;border-radius:var(--dimension-radius-025);background:transparent;cursor:default}@media (forced-colors: active){.ds-choice-popup.sc-ds-filter-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}.ds-choice-popup.sc-ds-filter-menu::after{box-shadow:none}.ds-choice-section--divided.sc-ds-filter-menu{border-bottom-color:var(--ds-forced-color-content)}.ds-choice-footer.sc-ds-filter-menu::before{background-color:var(--ds-forced-color-content)}}.ds-control-frame.sc-ds-filter-menu{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-filter-menu{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-filter-menu{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-filter-menu{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-label-dot.sc-ds-filter-menu{position:relative;padding-inline-end:calc( var(--ds-control-label-inset, var(--dimension-space-025)) + var(--ds-control-gap, var(--dimension-space-050)) )}.ds-control-label-dot__badge.sc-ds-filter-menu{position:absolute;inset-block-start:0;inset-inline-end:0;pointer-events:none}.ds-control-width--hug.sc-ds-filter-menu-h,.ds-control-width--hug.sc-ds-filter-menu{width:fit-content;max-width:100%;flex:0 0 auto;align-self:flex-start}.ds-control-width--fill.sc-ds-filter-menu-h,.ds-control-width--fill.sc-ds-filter-menu{width:100%;min-width:0;flex:1 1 auto;align-self:stretch}.ds-select-trigger-host.sc-ds-filter-menu-h{display:inline-flex;position:relative;min-inline-size:0;outline:none;--ds-select-fg:var(--color-foreground-secondary);--ds-select-fg-active:var(--color-foreground-primary);--ds-select-prefix-fg:var(--ds-select-fg);--ds-select-chevron-fg:var(--ds-select-fg);--ds-select-border:var(--color-border-secondary)}.ds-control-width--fill.sc-ds-filter-menu-h .trigger.sc-ds-filter-menu{width:100%}.trigger.sc-ds-filter-menu{justify-content:flex-start;box-sizing:border-box;inline-size:100%;max-inline-size:100%;min-inline-size:0;background:transparent;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));color:var(--ds-select-fg);cursor:default;font-family:inherit;-webkit-user-select:none;user-select:none;overflow:hidden;transition:color var(--effect-motion-short-2)}.trigger--bordered.sc-ds-filter-menu{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--ds-select-border)}.trigger--expanded.sc-ds-filter-menu{--ds-interaction-hover:var(--ds-interaction-pressed)}.trigger--expanded.sc-ds-filter-menu::after{background:var(--ds-interaction-pressed)}.trigger--has-value.sc-ds-filter-menu .trigger__label-box.sc-ds-filter-menu{color:var(--ds-select-fg-active)}.trigger--label-placeholder.sc-ds-filter-menu .trigger__label-box.sc-ds-filter-menu{color:var(--ds-select-fg)}.trigger__prefix.sc-ds-filter-menu,.trigger__chevron.sc-ds-filter-menu{position:relative;z-index:2}.trigger__prefix.sc-ds-filter-menu{color:var(--ds-select-prefix-fg)}.trigger__chevron.sc-ds-filter-menu{color:var(--ds-select-chevron-fg)}.trigger__label-box.sc-ds-filter-menu{position:relative;z-index:2;display:flex;align-items:center;flex:1 1 auto;overflow:hidden;text-align:left;color:inherit;transition:color var(--effect-motion-short-2)}.trigger__label-content.sc-ds-filter-menu{display:inline-flex;align-items:center;flex:1 1 auto;max-width:100%;min-width:0;overflow:hidden}.trigger__label.sc-ds-filter-menu{flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden}.ds-select-trigger-host--background-medium.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-medium-background-secondary);--ds-select-fg-active:var(--color-foreground-on-medium-background-primary);--ds-select-border:var(--color-border-on-medium-background-secondary)}.ds-select-trigger-host--background-bold.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-bold-background-secondary);--ds-select-fg-active:var(--color-foreground-on-bold-background-primary);--ds-select-border:var(--color-border-on-bold-background-secondary)}.ds-select-trigger-host--background-strong.sc-ds-filter-menu-h{--ds-select-fg:var(--color-foreground-on-strong-background-secondary);--ds-select-fg-active:var(--color-foreground-on-strong-background-primary);--ds-select-border:var(--color-border-on-strong-background-secondary)}.ds-select-trigger-host--background-translucent.sc-ds-filter-menu-h{--ds-select-fg:var(--color-translucent-foreground-secondary);--ds-select-fg-active:var(--color-translucent-foreground-primary);--ds-select-border:var(--color-translucent-border-secondary)}.ds-select-trigger-host--background-inverted.sc-ds-filter-menu-h{--ds-select-fg:var(--color-inverted-foreground-secondary);--ds-select-fg-active:var(--color-inverted-foreground-primary);--ds-select-border:var(--color-inverted-border-secondary)}.ds-select-trigger-host--background-media.sc-ds-filter-menu-h{--ds-select-fg:var(--color-media-foreground-secondary);--ds-select-fg-active:var(--color-media-foreground-primary);--ds-select-border:var(--color-media-border-secondary)}.ds-select-trigger-host--background-always-dark.sc-ds-filter-menu-h{--ds-select-fg:var(--color-always-dark-foreground-secondary);--ds-select-fg-active:var(--color-always-dark-foreground-primary);--ds-select-border:var(--color-always-dark-border-secondary)}.ds-table-caption-control.sc-ds-filter-menu-h{--ds-choice-popup-min-inline-size:var(--dimension-menu-width-xs)}.ds-table-caption-control.ds-table-caption-control--compact.sc-ds-filter-menu-h{flex:0 0 auto;width:var(--ds-control-height, var(--dimension-size-400));height:var(--ds-control-height, var(--dimension-size-400));min-width:var(--ds-control-height, var(--dimension-size-400));min-height:var(--ds-control-height, var(--dimension-size-400));max-width:var(--ds-control-height, var(--dimension-size-400));inline-size:var(--ds-control-height, var(--dimension-size-400));min-inline-size:var(--ds-control-height, var(--dimension-size-400));max-inline-size:var(--ds-control-height, var(--dimension-size-400))}.ds-table-caption-control.ds-table-caption-control--compact.sc-ds-filter-menu-h .trigger.sc-ds-filter-menu{justify-content:center;inline-size:100%;min-inline-size:100%;height:100%;padding-inline:0}.ds-table-caption-control.ds-table-caption-control--compact.sc-ds-filter-menu-h .trigger--has-value.sc-ds-filter-menu{--ds-select-prefix-fg:var(--ds-select-fg-active)}@container ds-table (max-width: 899px){.sc-ds-filter-menu-h.ds-table-caption-control{flex:0 0 auto;inline-size:var(--ds-control-height, var(--dimension-size-400));min-inline-size:var(--ds-control-height, var(--dimension-size-400));max-inline-size:var(--ds-control-height, var(--dimension-size-400))}.sc-ds-filter-menu-h.ds-table-caption-control .trigger{justify-content:center;inline-size:100%;min-inline-size:100%;padding-inline:0}.sc-ds-filter-menu-h.ds-table-caption-control .trigger--has-value{--ds-select-prefix-fg:var(--ds-select-fg-active)}}.filter-menu-host--external-trigger.sc-ds-filter-menu-h{display:contents}.filter-menu.sc-ds-filter-menu{display:flex;min-height:0;flex-direction:column;color:var(--color-foreground-primary)}.filter-menu__body.sc-ds-filter-menu{display:grid;grid-template-columns:minmax(calc(var(--dimension-size-base) * 18), 2fr) minmax(0, 3fr);min-height:calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));max-height:calc(100vh - var(--dimension-size-800) - var(--dimension-size-600))}.filter-menu__categories.sc-ds-filter-menu{min-width:0;border-inline-end:var(--dimension-stroke-width-012) solid var(--color-border-tertiary)}.filter-menu__category-section.sc-ds-filter-menu{display:flex;min-width:0;flex-direction:column}.filter-menu__category-section.ds-choice-section--divided.sc-ds-filter-menu{padding-block-end:var(--dimension-space-050)}.filter-menu__category.sc-ds-filter-menu{justify-content:space-between;width:100%;border:0;background:transparent;color:var(--color-foreground-secondary);cursor:default;text-align:start}.filter-menu__category--active.sc-ds-filter-menu{color:var(--color-foreground-primary)}.filter-menu__options.sc-ds-filter-menu{min-width:0;overflow:hidden}.filter-menu__date-field.sc-ds-filter-menu{display:flex;min-width:0;flex-direction:column;align-items:stretch;gap:var(--dimension-space-100)}.filter-menu__date-control.sc-ds-filter-menu{width:100%;border-radius:var(--dimension-radius-025);background:transparent;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary)}.filter-menu__date-control.sc-ds-filter-menu:focus-within{box-shadow:inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand)}.filter-menu__date-input.sc-ds-filter-menu{flex:1 1 auto;min-width:0;height:100%;padding-inline:var(--dimension-space-100);border:0;outline:0;background:transparent;color:var(--color-foreground-primary);font:inherit}.filter-menu__footer.sc-ds-filter-menu{flex:0 0 auto}.filter-menu__clear.sc-ds-filter-menu{color:var(--color-foreground-bold-brand)}@media (max-width: 520px){.filter-menu__body.sc-ds-filter-menu{grid-template-columns:minmax(calc(var(--dimension-size-base) * 14), 2fr) minmax(0, 3fr)}}@media (forced-colors: active){.filter-menu__categories.sc-ds-filter-menu{border-inline-end-color:var(--ds-forced-color-content)}.filter-menu__date-control.sc-ds-filter-menu{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content)}}`;const I=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");let F=0;const j={lg:"lg",md:"md",sm:"sm",xs:"xs"};const $=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.dsChange=t(this,"dsChange",7);this.dsClear=t(this,"dsClear",7);this.dsActiveFilterChange=t(this,"dsActiveFilterChange",7);this.dsClose=t(this,"dsClose",7);this.dsOpenChange=t(this,"dsOpenChange",7);this.dsAfterClose=t(this,"dsAfterClose",7);this.open=false;this.triggerLabel="Filters";this.icon="Filters";this.size="md";this.width="hug";this.hasBorder=true;this.activeFill=false;this.collapseLabel=false;this.ariaLabel=null;this.filters=[];this.values={};this.side="bottom";this.align="end";this.sideOffset=b.space050;this.alignOffset=0;this.menuWidth=b.menuWidthLg;this.menuLabel="Filters";this.categoriesLabel="Filter categories";this.clearLabel="Clear";this.initialFocusVisible=false;this.shouldRender=false;this.closing=false;this.positionReady=false;this.pos={x:0,y:0};this.focusRingVisible=false;this.activeOptionIndex=0;this.captionCompact=false;this.generatedId=`ds-filter-menu-${++F}`;this.outsideHandler=null;this.triggerElement=null;this.pendingInitialFocusVisible=false;this.closeTimer=null;this.hasLoaded=false;this.closingSnapshot=null;this.position=new c({getAnchor:()=>this.resolvedAnchor,getPopup:()=>this.el.querySelector(".filter-menu-popup"),measure:(e,i)=>{if(!this.open)return null;const t=e.getBoundingClientRect();const r=w(y.space050,y.space050);return{anchorRect:t,popupWidth:i.offsetWidth||this.popupFallbackWidth,popupHeight:i.offsetHeight||this.popupFallbackHeight,side:this.side,align:this.align,sideOffsetPx:w(this.sideOffset,y.space050),alignOffsetPx:_({align:this.align,alignOffsetPx:w(this.alignOffset,0),sectionInsetPx:r}),viewportPadPx:this.viewportPad,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}},apply:({x:e,y:i})=>{this.pos={x:e,y:i}},onReady:()=>{this.positionReady=true},liveUpdate:"double-frame",observeResize:true,topLayer:true})}componentDidLoad(){this.hasLoaded=true;this.syncCaptionCompactObserver();if(this.open)this.onOpenChange(true)}connectedCallback(){if(!this.hasLoaded)return;this.syncCaptionCompactObserver();if(this.open)this.onOpenChange(true)}disconnectedCallback(){this.disconnectCaptionCompactObserver();this.position.unobserve();this.teardownListeners()}onCollapseLabelChange(){this.syncCaptionCompactObserver()}onOpenChange(e){if(e){this.teardownListeners();this.closingSnapshot=null;this.shouldRender=true;this.closing=false;this.positionReady=false;this.focusRingVisible=this.pendingInitialFocusVisible||this.initialFocusVisible;this.setupListeners();this.position.schedule((()=>this.focusInitialCategory()));return}if(!this.shouldRender)return;this.position.cancel();this.captureClosingSnapshot();this.closing=true;this.teardownListeners();const i=x(y.motionShort2,y.animationDurationShort3);if(i<=0){this.finishClose();return}this.closeTimer=setTimeout((()=>this.finishClose()),i)}onPositionInputChange(){if(this.open)this.position.schedule()}handleKeyDown(e){if(!this.shouldRender||this.closing)return;if(e.key==="Escape"){e.preventDefault();this.close();return}if(e.key!=="Tab"||!this.tabLeavesPopup(e))return;e.preventDefault();this.close(false);this.moveFocusAfterTab(e.shiftKey)}get resolvedAnchor(){if(this.anchor)return this.anchor;if(this.anchorId)return document.getElementById(this.anchorId);return this.triggerElement}get usesInternalTrigger(){return!this.anchor&&!this.anchorId}get anchorFocusTarget(){const e=this.resolvedAnchor;if(!e)return null;if(e.matches(I))return e;return e.querySelector(I)??e}get viewportPad(){return w(y.space050,y.space050)}get popupFallbackWidth(){return w(y.menuWidthLg,y.menuWidthLg)}get popupFallbackHeight(){return w(y.menuFallbackHeight,y.menuFallbackHeight)}setupListeners(){this.outsideHandler=e=>{const i=e.target;const t=this.el.querySelector(".filter-menu-popup");if(t?.contains(i)||this.resolvedAnchor?.contains(i))return;this.close()};document.addEventListener("mousedown",this.outsideHandler,true);this.position.observe()}teardownListeners(){this.position.unobserve();if(this.outsideHandler){document.removeEventListener("mousedown",this.outsideHandler,true);this.outsideHandler=null}if(this.closeTimer){clearTimeout(this.closeTimer);this.closeTimer=null}}close(e=true){this.captureClosingSnapshot();if(e)this.focusAnchor();this.dsOpenChange.emit(false);this.dsClose.emit();this.open=false;this.onOpenChange(false)}toggleFromTrigger(e){if(this.open){this.close();return}this.pendingInitialFocusVisible=e.detail===0;this.open=true;this.dsOpenChange.emit(true);this.onOpenChange(true)}handleTriggerKeyDown(e){if(e.key!=="ArrowDown"||this.open)return;e.preventDefault();this.pendingInitialFocusVisible=true;this.open=true;this.dsOpenChange.emit(true);this.onOpenChange(true)}finishClose(){const e=this.el.querySelector(".filter-menu-popup");if(e?.matches(":popover-open"))e.hidePopover();this.shouldRender=false;this.closing=false;this.closingSnapshot=null;this.closeTimer=null;this.dsAfterClose.emit()}captureClosingSnapshot(){if(this.closingSnapshot)return;this.closingSnapshot={filters:this.filters.map((e=>({...e,options:e.options?.map((e=>({...e})))}))),values:Object.fromEntries(Object.entries(this.values).map((([e,i])=>[e,Array.isArray(i)?[...i]:i]))),activeFilterId:this.activeFilterId}}focusAnchor(){const e=this.resolvedAnchor;if(e?.setFocus){void e.setFocus();return}this.anchorFocusTarget?.focus()}focusInitialCategory(){requestAnimationFrame((()=>{this.el.querySelector('.filter-menu__category[tabindex="0"]')?.focus();this.pendingInitialFocusVisible=false}))}tabLeavesPopup(e){const i=this.el.querySelector(".filter-menu-popup");if(!i)return true;const t=Array.from(i.querySelectorAll(I)).filter((e=>e.getClientRects().length>0));const r=t.indexOf(e.target);if(r<0)return true;return e.shiftKey?r===0:r===t.length-1}moveFocusAfterTab(e){const i=this.anchorFocusTarget;if(!i)return;if(e){i.focus();return}const t=Array.from(document.querySelectorAll(I)).filter((e=>!e.closest(".filter-menu-popup")&&!e.closest("[inert]")&&e.getClientRects().length>0));const r=t.indexOf(i);(t[r+1]??i).focus()}selectedFilter(e,i){return e.find((e=>e.id===i))??e[0]}selectedCount(e,i){const t=i[e.id];if(e.kind==="multiple")return Array.isArray(t)?t.length:0;if(e.kind==="boolean")return t===true?1:0;return typeof t==="string"&&t.length>0?1:0}totalSelected(e,i){return e.reduce(((e,t)=>e+this.selectedCount(t,i)),0)}activeFilterCount(e,i){return e.filter((e=>this.selectedCount(e,i)>0)).length}selectCategory(e,i=false){this.activeOptionIndex=0;this.dsActiveFilterChange.emit(e);if(!i)return;requestAnimationFrame((()=>{this.el.querySelector(`[data-filter-category="${e}"]`)?.focus()}))}handleCategoryKeyDown(e,i,t){const r=i.findIndex((e=>e.id===t));let n;if(e.key==="ArrowDown")n=(r+1)%i.length;else if(e.key==="ArrowUp")n=(r-1+i.length)%i.length;else if(e.key==="Home")n=0;else if(e.key==="End")n=i.length-1;else if(e.key==="ArrowRight"){e.preventDefault();requestAnimationFrame((()=>{this.el.querySelector('.filter-menu__options [role="option"], .filter-menu__options input')?.focus()}));return}else return;e.preventDefault();this.focusRingVisible=true;this.selectCategory(i[n].id,true)}handlePanelKeyDown(e,i){if(e.key!=="ArrowLeft")return;e.preventDefault();this.el.querySelector(`[data-filter-category="${i}"]`)?.focus()}handleOptionKeyDown(e,i,t,r,n){const s=i.options??[];if(e.key==="ArrowLeft"){this.handlePanelKeyDown(e,i.id);return}if(e.key==="Enter"||e.key===" "){e.preventDefault();this.selectOption(i,t,n);return}if(!["ArrowDown","ArrowUp","Home","End"].includes(e.key))return;e.preventDefault();const o=s.map(((e,i)=>({candidate:e,optionIndex:i}))).filter((({candidate:e})=>!e.isInactive)).map((({optionIndex:e})=>e));if(!o.length)return;const d=o.indexOf(r);let c;if(e.key==="Home")c=o[0];else if(e.key==="End")c=o[o.length-1];else{const i=e.key==="ArrowDown"?1:-1;const t=d>=0?d:i===1?-1:0;c=o[(t+i+o.length)%o.length]}this.activeOptionIndex=c;this.focusRingVisible=true;requestAnimationFrame((()=>{this.el.querySelector(`#${this.generatedId}-${i.id}-option-${c}`)?.focus()}))}toggleMultiple(e,i,t,r){if(i.isInactive)return;const n=Array.isArray(r[e.id])?r[e.id]:[];const s=new Set(n);if(t)s.add(i.value);else s.delete(i.value);const o=(e.options??[]).map((e=>e.value)).filter((e=>s.has(e)));this.dsChange.emit({filterId:e.id,value:o})}selectOption(e,i,t){if(i.isInactive)return;if(e.kind==="single"){this.dsChange.emit({filterId:e.id,value:i.value});return}const r=Array.isArray(t[e.id])?t[e.id].includes(i.value):false;this.toggleMultiple(e,i,!r,t)}renderOptions(e,i){const t=i[e.id];if(e.kind==="multiple"||e.kind==="single"){const n=Array.isArray(t)?t:[];const s=e.options??[];const o=l(s.map((e=>({label:e.label,value:e.value,subtext:e.description}))));return s.map(((s,d)=>{const c=e.kind==="multiple"?n.includes(s.value):t===s.value;return r(a,{size:"md",id:`${this.generatedId}-${e.id}-option-${d}`,option:{label:s.label,value:s.value,subtext:s.description,isInactive:s.isInactive},selected:c,active:d===this.activeOptionIndex,focusRingVisible:this.focusRingVisible,usesSubtext:o,tabIndex:d===this.activeOptionIndex?0:-1,leading:e.kind==="multiple"?r("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-checkbox",{label:"",size:"md",checked:c,presentation:true})):undefined,onFocus:()=>{this.activeOptionIndex=d},onKeyDown:t=>this.handleOptionKeyDown(t,e,s,d,i),onHover:()=>{this.focusRingVisible=false;this.activeOptionIndex=d},onSelect:()=>this.selectOption(e,s,i)})}))}if(e.kind==="boolean"){const i={label:e.fieldLabel??e.label,value:"true",description:e.description};return r(a,{size:"md",id:`${this.generatedId}-${e.id}-option-0`,option:{label:i.label,value:i.value,subtext:i.description},selected:t===true,active:true,focusRingVisible:this.focusRingVisible,usesSubtext:Boolean(i.description),tabIndex:0,leading:r("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-checkbox",{label:"",size:"md",checked:t===true,presentation:true})),onKeyDown:i=>{if(i.key==="ArrowLeft")this.handlePanelKeyDown(i,e.id);else if(i.key==="Enter"||i.key===" "){i.preventDefault();this.dsChange.emit({filterId:e.id,value:t!==true})}},onHover:()=>{this.focusRingVisible=false},onSelect:()=>this.dsChange.emit({filterId:e.id,value:t!==true})})}const n=typeof t==="string"?t:"";const s=`${this.generatedId}-${e.id}-input`;return r("div",{class:"filter-menu__date-field"},r("label",{htmlFor:s},r("ds-text",{as:"span",variant:"text-body-small",emphasis:true,color:"primary"},e.fieldLabel??"Event date")),r("div",{class:"filter-menu__date-control ds-control-frame ds-control--md"},r("input",{id:s,class:"filter-menu__date-input",type:"date",value:n,onInput:i=>this.dsChange.emit({filterId:e.id,value:i.target.value})}),n?r("ds-button-unfilled",{variant:"icon",icon:"CrossCircle",size:"sm",isInset:true,hasBorder:false,rounded:true,ariaLabel:`${this.clearLabel} ${e.fieldLabel??e.label}`,onDsClick:i=>{i.stopPropagation();this.dsChange.emit({filterId:e.id,value:""})}}):null))}get captionIconOnly(){return this.collapseLabel&&this.captionCompact&&this.usesInternalTrigger&&Boolean(this.icon)}syncCaptionCompactObserver(){this.disconnectCaptionCompactObserver();if(!this.collapseLabel){if(this.captionCompact)this.captionCompact=false;return}this.captionCompactDisconnect=o(this.el,(e=>{if(this.captionCompact!==e)this.captionCompact=e}))}disconnectCaptionCompactObserver(){this.captionCompactDisconnect?.();this.captionCompactDisconnect=undefined}render(){const e=this.closing&&this.closingSnapshot?this.closingSnapshot:{filters:this.filters,values:this.values,activeFilterId:this.activeFilterId};const i=this.selectedFilter(e.filters,e.activeFilterId);const t=this.totalSelected(e.filters,e.values);const s=this.activeFilterCount(e.filters,e.values);const o=s>0;const d=`${this.triggerLabel}${o?` · ${s}`:""}`;const c=k[this.size];const a=j[this.size];const l=`${this.generatedId}-popup`;const f={position:"fixed",left:"0",top:"0",width:this.menuWidth,transform:`translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,zIndex:"9998",visibility:this.positionReady?"visible":"hidden"};return r(n,{key:"e6e386639960ffacbc19ec7477889bed532d7f72",class:{"filter-menu-host":true,"filter-menu-host--external-trigger":!this.usesInternalTrigger,"ds-select-trigger-host":this.usesInternalTrigger,[`ds-control--${this.size}`]:true,"ds-table-caption-control":this.collapseLabel,"ds-table-caption-control--compact":this.captionIconOnly,...z(this.width)}},this.usesInternalTrigger?r("ds-tooltip",{label:this.captionIconOnly?d:"",side:"top",size:"sm"},r("button",{ref:e=>{this.triggerElement=e??null},id:this.inputId??`${this.generatedId}-trigger`,type:"button",class:{trigger:true,"ds-control-frame":true,"ds-focus-ring-inset":true,"ds-interaction-fill":true,"ds-interaction-fill--selected":this.activeFill&&o,"trigger--expanded":this.open||this.closing,"trigger--bordered":this.hasBorder,"trigger--has-value":o,[`ds-control--${this.size}`]:true},role:"combobox","aria-haspopup":"dialog","aria-expanded":String(this.open),"aria-controls":this.open?l:undefined,"aria-label":this.ariaLabel??this.menuLabel,onClick:e=>this.toggleFromTrigger(e),onKeyDown:e=>this.handleTriggerKeyDown(e)},this.icon?r("span",{class:"trigger__prefix ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-icon",{name:this.icon,size:a,color:"inherit"})):null,this.captionIconOnly?null:r("ds-text",{class:"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content",as:"span",variant:c,color:"inherit",lineTruncation:1},d),this.captionIconOnly?null:r("span",{class:"trigger__chevron ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},r("ds-icon",{name:"ChevronDown",size:a,color:"inherit"})))):null,this.shouldRender?r("div",{id:l,popover:"manual",class:{"filter-menu-popup":true,"ds-choice-popup":true,"ds-choice-popup--closing":this.closing},style:f,role:"dialog","aria-label":this.menuLabel},i?r("div",{class:"filter-menu"},r("div",{class:"filter-menu__body"},r("div",{class:"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm",role:"tablist","aria-label":this.categoriesLabel,"aria-orientation":"vertical"},e.filters.map((t=>{const n=t.id===i.id;const s=this.selectedCount(t,e.values);return r("div",{key:t.id,class:{"filter-menu__category-section":true,"ds-choice-section--divided":Boolean(t.divider)}},r("button",{id:`${this.generatedId}-${t.id}-tab`,type:"button",role:"tab","data-filter-category":t.id,class:{"filter-menu__category":true,"filter-menu__category--active":n,"ds-choice-item":true,"ds-control-frame":true,"ds-control--md":true,"ds-focus-ring-inset":true,"ds-focus-ring--visible":n&&this.focusRingVisible,"ds-interaction-fill":true,"ds-interaction-fill--selected":n},"aria-selected":String(n),"aria-controls":`${this.generatedId}-panel`,tabIndex:n?0:-1,onMouseDown:()=>{this.focusRingVisible=false},onClick:()=>this.selectCategory(t.id),onKeyDown:i=>this.handleCategoryKeyDown(i,e.filters,t.id)},r("ds-text",{class:"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content",as:"span",variant:"text-body-medium",color:n?"primary":"secondary"},t.label),s>0?r("ds-tag",{class:"ds-choice-item__tag ds-interaction-fill__content",label:String(s),size:"sm",intent:"brand",contrast:"bold",isInset:true,rounded:true}):null))}))),r("div",{id:`${this.generatedId}-panel`,class:"filter-menu__options",role:"tabpanel","aria-labelledby":`${this.generatedId}-${i.id}-tab`},r("div",{key:i.id,class:"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm",role:"listbox","aria-label":i.label,"aria-multiselectable":i.kind==="multiple"?"true":undefined},this.renderOptions(i,e.values)))),t>0?r("div",{class:"filter-menu__footer ds-choice-footer"},r("div",{class:"ds-choice-footer__content ds-control--md"},r("ds-text",{class:"ds-choice-footer__summary",as:"span",variant:"text-body-medium",color:"secondary","aria-live":"polite"},t," selected"),r("button",{class:"filter-menu__clear ds-choice-footer__clear ds-text-action",type:"button",onClick:()=>this.dsClear.emit()},r("ds-text",{as:"span",variant:"text-body-medium",color:"inherit"},this.clearLabel)))):null):null):null)}get el(){return this}static get watchers(){return{collapseLabel:[{onCollapseLabelChange:0}],open:[{onOpenChange:0}],anchor:[{onPositionInputChange:0}],anchorId:[{onPositionInputChange:0}],side:[{onPositionInputChange:0}],align:[{onPositionInputChange:0}],sideOffset:[{onPositionInputChange:0}],alignOffset:[{onPositionInputChange:0}],menuWidth:[{onPositionInputChange:0}]}}static get style(){return C()}},[2,"ds-filter-menu",{open:[1028],triggerLabel:[1,"trigger-label"],icon:[1],size:[1],width:[1],hasBorder:[4,"has-border"],activeFill:[4,"active-fill"],collapseLabel:[516,"collapse-label"],inputId:[1,"input-id"],ariaLabel:[1,"aria-label"],filters:[16],values:[16],activeFilterId:[1,"active-filter-id"],anchor:[16],anchorId:[1,"anchor-id"],side:[1],align:[1],sideOffset:[8,"side-offset"],alignOffset:[8,"align-offset"],menuWidth:[1,"menu-width"],menuLabel:[1,"menu-label"],categoriesLabel:[1,"categories-label"],clearLabel:[1,"clear-label"],initialFocusVisible:[4,"initial-focus-visible"],shouldRender:[32],closing:[32],positionReady:[32],pos:[32],focusRingVisible:[32],activeOptionIndex:[32],captionCompact:[32]},[[0,"keydown","handleKeyDown"]],{collapseLabel:[{onCollapseLabelChange:0}],open:[{onOpenChange:0}],anchor:[{onPositionInputChange:0}],anchorId:[{onPositionInputChange:0}],side:[{onPositionInputChange:0}],align:[{onPositionInputChange:0}],sideOffset:[{onPositionInputChange:0}],alignOffset:[{onPositionInputChange:0}],menuWidth:[{onPositionInputChange:0}]}]);function A(){if(typeof customElements==="undefined"){return}const e=["ds-filter-menu","ds-badge","ds-button-unfilled","ds-checkbox","ds-icon","ds-loader","ds-tag","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-filter-menu":if(!customElements.get(s(e))){customElements.define(s(e),$)}break;case"ds-badge":if(!customElements.get(s(e))){f()}break;case"ds-button-unfilled":if(!customElements.get(s(e))){d()}break;case"ds-checkbox":if(!customElements.get(s(e))){u()}break;case"ds-icon":if(!customElements.get(s(e))){h()}break;case"ds-loader":if(!customElements.get(s(e))){m()}break;case"ds-tag":if(!customElements.get(s(e))){g()}break;case"ds-text":if(!customElements.get(s(e))){v()}break;case"ds-tooltip":if(!customElements.get(s(e))){p()}break}}))}A();export{$ as F,A as d};
2
+ //# sourceMappingURL=p-Cgm7YMLw.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["filterMenuCss","FILTER_MENU_FOCUSABLE_SELECTOR","join","filterMenuId","ICON_SIZE","lg","md","sm","xs","FilterMenu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","triggerLabel","icon","size","width","hasBorder","activeFill","collapseLabel","ariaLabel","filters","values","side","align","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","menuWidth","menuWidthLg","menuLabel","categoriesLabel","clearLabel","initialFocusVisible","shouldRender","closing","positionReady","pos","x","y","focusRingVisible","activeOptionIndex","captionCompact","generatedId","outsideHandler","triggerElement","pendingInitialFocusVisible","closeTimer","hasLoaded","closingSnapshot","position","AnchoredPositionController","getAnchor","resolvedAnchor","getPopup","el","querySelector","measure","anchor","popup","anchorRect","getBoundingClientRect","sectionInsetPx","resolveCssLengthPx","TOKEN_DEFAULTS","popupWidth","offsetWidth","popupFallbackWidth","popupHeight","offsetHeight","popupFallbackHeight","sideOffsetPx","alignOffsetPx","resolveChoicePopupAlignOffset","viewportPadPx","viewportPad","viewportWidth","window","innerWidth","viewportHeight","innerHeight","apply","onReady","liveUpdate","observeResize","topLayer","componentDidLoad","syncCaptionCompactObserver","onOpenChange","connectedCallback","disconnectedCallback","disconnectCaptionCompactObserver","unobserve","teardownListeners","onCollapseLabelChange","isOpen","setupListeners","schedule","focusInitialCategory","cancel","captureClosingSnapshot","duration","resolveMotionTimeMs","motionShort2","animationDurationShort3","finishClose","setTimeout","onPositionInputChange","handleKeyDown","event","key","preventDefault","close","tabLeavesPopup","moveFocusAfterTab","shiftKey","anchorId","document","getElementById","usesInternalTrigger","anchorFocusTarget","matches","menuFallbackHeight","target","contains","addEventListener","observe","removeEventListener","clearTimeout","restoreFocus","focusAnchor","dsOpenChange","emit","dsClose","toggleFromTrigger","detail","handleTriggerKeyDown","hidePopover","dsAfterClose","map","filter","options","option","Object","fromEntries","entries","value","Array","isArray","activeFilterId","setFocus","focus","requestAnimationFrame","focusables","from","querySelectorAll","element","getClientRects","length","index","indexOf","backwards","candidates","closest","selectedFilter","find","id","selectedCount","kind","totalSelected","reduce","total","activeFilterCount","selectCategory","filterId","dsActiveFilterChange","handleCategoryKeyDown","currentIndex","findIndex","nextIndex","handlePanelKeyDown","handleOptionKeyDown","selectOption","includes","enabled","candidate","optionIndex","isInactive","current","next","direction","start","toggleMultiple","checked","selected","Set","add","delete","ordered","has","dsChange","renderOptions","usesSubtext","choiceListUsesSubtext","label","subtext","description","isSelected","h","ChoiceOptionRow","active","tabIndex","leading","class","presentation","undefined","onFocus","onKeyDown","onHover","onSelect","fieldLabel","Boolean","dateValue","inputId","htmlFor","as","variant","emphasis","color","type","onInput","isInset","rounded","onDsClick","stopPropagation","captionIconOnly","captionCompactDisconnect","observeTableCaptionCompact","compact","render","state","activeFilter","hasActiveFilters","textVariant","CONTROL_TEXT_VARIANT","iconSize","popupId","popupStyle","left","top","transform","Math","round","zIndex","visibility","Host","controlWidthClass","ref","trigger","role","String","onClick","name","lineTruncation","popover","style","count","divider","onMouseDown","intent","contrast","dsClear"],"sources":["src/wc/components/FilterMenu/FilterMenu.css?tag=ds-filter-menu&encapsulation=scoped","src/wc/components/FilterMenu/FilterMenu.tsx"],"sourcesContent":["@import '../../utils/choice-list.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/select-trigger.css';\n@import '../../utils/table-caption-control.css';\n\n:host(.filter-menu-host--external-trigger) {\n display: contents;\n}\n\n.filter-menu {\n display: flex;\n min-height: 0;\n flex-direction: column;\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__body {\n display: grid;\n grid-template-columns: minmax(calc(var(--dimension-size-base) * 18), 2fr) minmax(0, 3fr);\n min-height: calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));\n max-height: calc(100vh - var(--dimension-size-800) - var(--dimension-size-600));\n}\n\n.filter-menu__categories {\n min-width: 0;\n border-inline-end: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n.filter-menu__category-section {\n display: flex;\n min-width: 0;\n flex-direction: column;\n}\n\n.filter-menu__category-section.ds-choice-section--divided {\n padding-block-end: var(--dimension-space-050);\n}\n\n.filter-menu__category {\n justify-content: space-between;\n width: 100%;\n border: 0;\n background: transparent;\n color: var(--color-foreground-secondary);\n cursor: default;\n text-align: start;\n}\n\n.filter-menu__category--active {\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__options {\n min-width: 0;\n overflow: hidden;\n}\n\n.filter-menu__date-field {\n display: flex;\n min-width: 0;\n flex-direction: column;\n align-items: stretch;\n gap: var(--dimension-space-100);\n}\n\n.filter-menu__date-control {\n width: 100%;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary);\n}\n\n.filter-menu__date-control:focus-within {\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand);\n}\n\n.filter-menu__date-input {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding-inline: var(--dimension-space-100);\n border: 0;\n outline: 0;\n background: transparent;\n color: var(--color-foreground-primary);\n font: inherit;\n}\n\n.filter-menu__footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__clear {\n color: var(--color-foreground-bold-brand);\n}\n\n@media (max-width: 520px) {\n .filter-menu__body {\n grid-template-columns: minmax(calc(var(--dimension-size-base) * 14), 2fr) minmax(0, 3fr);\n }\n}\n\n@media (forced-colors: active) {\n .filter-menu__categories {\n border-inline-end-color: var(--ds-forced-color-content);\n }\n\n .filter-menu__date-control {\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n CONTROL_TEXT_VARIANT,\n controlWidthClass,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ControlWidth,\n} from '../../utils';\nimport { observeTableCaptionCompact } from '../../utils/table-caption-compact';\nimport type { AnchoredAlign, AnchoredSide } from '../../utils/anchored-position';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { ChoiceOptionRow } from '../../utils/choice-list-parts';\nimport { choiceListUsesSubtext } from '../../utils/choice-list';\n\nexport type FilterMenuFilterKind = 'single' | 'multiple' | 'boolean' | 'date';\nexport type FilterMenuSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type FilterMenuWidth = ControlWidth;\n\nexport interface FilterMenuOption {\n label: string;\n value: string;\n description?: string;\n isInactive?: boolean;\n}\n\nexport interface FilterMenuFilter {\n id: string;\n label: string;\n kind: FilterMenuFilterKind;\n options?: FilterMenuOption[];\n description?: string;\n fieldLabel?: string;\n /** Draw a standard menu-section divider after this category. */\n divider?: boolean;\n}\n\nexport type FilterMenuValue = string[] | boolean | string;\nexport type FilterMenuValues = Record<string, FilterMenuValue | undefined>;\n\nexport interface FilterMenuChangeDetail {\n filterId: string;\n value: FilterMenuValue;\n}\n\nconst FILTER_MENU_FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\nlet filterMenuId = 0;\n\nconst ICON_SIZE: Record<FilterMenuSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\n@Component({\n tag: 'ds-filter-menu',\n styleUrl: 'FilterMenu.css',\n scoped: true,\n})\nexport class FilterMenu {\n @Element() el!: HTMLElement;\n\n /** Controlled popup visibility. */\n @Prop({ mutable: true }) open: boolean = false;\n /** Select trigger text. The selected count is appended automatically. */\n @Prop() triggerLabel: string = 'Filters';\n /** Optional select trigger prefix icon name. */\n @Prop() icon: string | undefined = 'Filters';\n /** Select trigger density. */\n @Prop() size: FilterMenuSize = 'md';\n /** Select trigger width fit. */\n @Prop() width: FilterMenuWidth = 'hug';\n /** Show the surface-aware inset border around the select trigger. */\n @Prop() hasBorder: boolean = true;\n /** Show selected interaction fill when one or more criteria are active. */\n @Prop() activeFill: boolean = false;\n /**\n * Opt into table-caption icon-only chrome below 900px. The trigger omits its\n * visible label and chevron; keep an accessible name via aria-label.\n */\n @Prop({ reflect: true }) collapseLabel: boolean = false;\n /** ID applied to the internal select trigger. */\n @Prop() inputId: string | undefined;\n /** Direct accessible name for the internal select trigger. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n /** Product-owned filter categories and option definitions. */\n @Prop() filters: FilterMenuFilter[] = [];\n /** Controlled values keyed by filter id. */\n @Prop() values: FilterMenuValues = {};\n /** Controlled category shown in the option pane. */\n @Prop() activeFilterId: string | undefined;\n /** External trigger element to position against. */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element used for positioning and focus return. */\n @Prop() anchorId: string | undefined;\n /** Preferred popup side; collision handling may flip it. */\n @Prop() side: AnchoredSide = 'bottom';\n /** Cross-axis alignment against the trigger. */\n @Prop() align: AnchoredAlign = 'end';\n /** Gap between trigger and popup — number in px or a TokoMo length. */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number in px or a TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n /** Popup width. It remains clamped to the viewport by the component recipe. */\n @Prop() menuWidth: string = TOKEN_CSS_LENGTHS.menuWidthLg;\n /** Accessible name for the non-modal filter dialog. */\n @Prop() menuLabel: string = 'Filters';\n /** Accessible name for the category tab list. */\n @Prop() categoriesLabel: string = 'Filter categories';\n /** Footer action and date-clear accessible label. */\n @Prop() clearLabel: string = 'Clear';\n /** Show a visible focus ring on initial entry after keyboard activation. */\n @Prop() initialFocusVisible: boolean = false;\n\n @State() private shouldRender = false;\n @State() private closing = false;\n @State() private positionReady = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusRingVisible = false;\n @State() private activeOptionIndex = 0;\n @State() private captionCompact = false;\n\n /** Requests a controlled value replacement without closing the popup. */\n @Event() dsChange!: EventEmitter<FilterMenuChangeDetail>;\n /** Requests that the consumer clear every filter value. */\n @Event() dsClear!: EventEmitter<void>;\n /** Requests a controlled active-category replacement. */\n @Event() dsActiveFilterChange!: EventEmitter<string>;\n /** Requests that the controlled popup close. */\n @Event() dsClose!: EventEmitter<void>;\n /** Emitted whenever internal select-trigger activation changes popup visibility. */\n @Event() dsOpenChange!: EventEmitter<boolean>;\n /** Emitted after exit motion and rendered popup removal complete. */\n @Event() dsAfterClose!: EventEmitter<void>;\n\n private readonly generatedId = `ds-filter-menu-${++filterMenuId}`;\n private outsideHandler: ((event: MouseEvent) => void) | null = null;\n private triggerElement: HTMLButtonElement | null = null;\n private pendingInitialFocusVisible = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private captionCompactDisconnect: (() => void) | undefined;\n private hasLoaded = false;\n private closingSnapshot: {\n filters: FilterMenuFilter[];\n values: FilterMenuValues;\n activeFilterId: string | undefined;\n } | null = null;\n\n private readonly position = new AnchoredPositionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n measure: (anchor, popup) => {\n if (!this.open) return null;\n const anchorRect = anchor.getBoundingClientRect();\n const sectionInsetPx = resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n return {\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidth,\n popupHeight: popup.offsetHeight || this.popupFallbackHeight,\n side: this.side,\n align: this.align,\n sideOffsetPx: resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050),\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: resolveCssLengthPx(this.alignOffset, 0),\n sectionInsetPx,\n }),\n viewportPadPx: this.viewportPad,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n };\n },\n apply: ({ x, y }) => {\n this.pos = { x, y };\n },\n onReady: () => {\n this.positionReady = true;\n },\n liveUpdate: 'double-frame',\n observeResize: true,\n topLayer: true,\n });\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n connectedCallback() {\n if (!this.hasLoaded) return;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.disconnectCaptionCompactObserver();\n this.position.unobserve();\n this.teardownListeners();\n }\n\n @Watch('collapseLabel')\n onCollapseLabelChange() {\n this.syncCaptionCompactObserver();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.closingSnapshot = null;\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.focusRingVisible = this.pendingInitialFocusVisible || this.initialFocusVisible;\n this.setupListeners();\n this.position.schedule(() => this.focusInitialCategory());\n return;\n }\n\n if (!this.shouldRender) return;\n this.position.cancel();\n this.captureClosingSnapshot();\n this.closing = true;\n this.teardownListeners();\n const duration = resolveMotionTimeMs(\n TOKEN_DEFAULTS.motionShort2,\n TOKEN_DEFAULTS.animationDurationShort3\n );\n if (duration <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => this.finishClose(), duration);\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n @Watch('side')\n @Watch('align')\n @Watch('sideOffset')\n @Watch('alignOffset')\n @Watch('menuWidth')\n onPositionInputChange() {\n if (this.open) this.position.schedule();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close();\n return;\n }\n if (event.key !== 'Tab' || !this.tabLeavesPopup(event)) return;\n event.preventDefault();\n this.close(false);\n this.moveFocusAfterTab(event.shiftKey);\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return this.triggerElement;\n }\n\n private get usesInternalTrigger(): boolean {\n return !this.anchor && !this.anchorId;\n }\n\n private get anchorFocusTarget(): HTMLElement | null {\n const anchor = this.resolvedAnchor;\n if (!anchor) return null;\n if (anchor.matches(FILTER_MENU_FOCUSABLE_SELECTOR)) return anchor;\n return anchor.querySelector<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR) ?? anchor;\n }\n\n private get viewportPad(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get popupFallbackWidth(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthLg, TOKEN_DEFAULTS.menuWidthLg);\n }\n\n private get popupFallbackHeight(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private setupListeners() {\n this.outsideHandler = event => {\n const target = event.target as Node;\n const popup = this.el.querySelector('.filter-menu-popup');\n if (popup?.contains(target) || this.resolvedAnchor?.contains(target)) return;\n this.close();\n };\n document.addEventListener('mousedown', this.outsideHandler, true);\n this.position.observe();\n }\n\n private teardownListeners() {\n this.position.unobserve();\n if (this.outsideHandler) {\n document.removeEventListener('mousedown', this.outsideHandler, true);\n this.outsideHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n this.captureClosingSnapshot();\n if (restoreFocus) this.focusAnchor();\n this.dsOpenChange.emit(false);\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n private toggleFromTrigger(event: MouseEvent) {\n if (this.open) {\n this.close();\n return;\n }\n this.pendingInitialFocusVisible = event.detail === 0;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private handleTriggerKeyDown(event: KeyboardEvent) {\n if (event.key !== 'ArrowDown' || this.open) return;\n event.preventDefault();\n this.pendingInitialFocusVisible = true;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private finishClose() {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (popup?.matches(':popover-open')) popup.hidePopover();\n this.shouldRender = false;\n this.closing = false;\n this.closingSnapshot = null;\n this.closeTimer = null;\n this.dsAfterClose.emit();\n }\n\n private captureClosingSnapshot() {\n if (this.closingSnapshot) return;\n this.closingSnapshot = {\n filters: this.filters.map(filter => ({\n ...filter,\n options: filter.options?.map(option => ({ ...option })),\n })),\n values: Object.fromEntries(\n Object.entries(this.values).map(([key, value]) => [\n key,\n Array.isArray(value) ? [...value] : value,\n ])\n ),\n activeFilterId: this.activeFilterId,\n };\n }\n\n private focusAnchor() {\n const anchor = this.resolvedAnchor as\n (HTMLElement & { setFocus?: () => Promise<void> | void }) | null;\n if (anchor?.setFocus) {\n void anchor.setFocus();\n return;\n }\n this.anchorFocusTarget?.focus();\n }\n\n private focusInitialCategory() {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.filter-menu__category[tabindex=\"0\"]')?.focus();\n this.pendingInitialFocusVisible = false;\n });\n }\n\n private tabLeavesPopup(event: KeyboardEvent): boolean {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (!popup) return true;\n const focusables = Array.from(\n popup.querySelectorAll<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR)\n ).filter(element => element.getClientRects().length > 0);\n const index = focusables.indexOf(event.target as HTMLElement);\n if (index < 0) return true;\n return event.shiftKey ? index === 0 : index === focusables.length - 1;\n }\n\n private moveFocusAfterTab(backwards: boolean) {\n const anchor = this.anchorFocusTarget;\n if (!anchor) return;\n if (backwards) {\n anchor.focus();\n return;\n }\n const candidates = Array.from(\n document.querySelectorAll<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR)\n ).filter(\n element =>\n !element.closest('.filter-menu-popup') &&\n !element.closest('[inert]') &&\n element.getClientRects().length > 0\n );\n const index = candidates.indexOf(anchor);\n (candidates[index + 1] ?? anchor).focus();\n }\n\n private selectedFilter(filters: FilterMenuFilter[], activeFilterId: string | undefined) {\n return filters.find(filter => filter.id === activeFilterId) ?? filters[0];\n }\n\n private selectedCount(filter: FilterMenuFilter, values: FilterMenuValues): number {\n const value = values[filter.id];\n if (filter.kind === 'multiple') return Array.isArray(value) ? value.length : 0;\n if (filter.kind === 'boolean') return value === true ? 1 : 0;\n return typeof value === 'string' && value.length > 0 ? 1 : 0;\n }\n\n private totalSelected(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.reduce((total, filter) => total + this.selectedCount(filter, values), 0);\n }\n\n private activeFilterCount(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.filter(filter => this.selectedCount(filter, values) > 0).length;\n }\n\n private selectCategory(filterId: string, focus = false) {\n this.activeOptionIndex = 0;\n this.dsActiveFilterChange.emit(filterId);\n if (!focus) return;\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n });\n }\n\n private handleCategoryKeyDown(\n event: KeyboardEvent,\n filters: FilterMenuFilter[],\n filterId: string\n ) {\n const currentIndex = filters.findIndex(filter => filter.id === filterId);\n let nextIndex: number;\n if (event.key === 'ArrowDown') nextIndex = (currentIndex + 1) % filters.length;\n else if (event.key === 'ArrowUp')\n nextIndex = (currentIndex - 1 + filters.length) % filters.length;\n else if (event.key === 'Home') nextIndex = 0;\n else if (event.key === 'End') nextIndex = filters.length - 1;\n else if (event.key === 'ArrowRight') {\n event.preventDefault();\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(\n '.filter-menu__options [role=\"option\"], .filter-menu__options input'\n )\n ?.focus();\n });\n return;\n } else return;\n\n event.preventDefault();\n this.focusRingVisible = true;\n this.selectCategory(filters[nextIndex].id, true);\n }\n\n private handlePanelKeyDown(event: KeyboardEvent, filterId: string) {\n if (event.key !== 'ArrowLeft') return;\n event.preventDefault();\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n }\n\n private handleOptionKeyDown(\n event: KeyboardEvent,\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n index: number,\n values: FilterMenuValues\n ) {\n const options = filter.options ?? [];\n if (event.key === 'ArrowLeft') {\n this.handlePanelKeyDown(event, filter.id);\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.selectOption(filter, option, values);\n return;\n }\n if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return;\n event.preventDefault();\n const enabled = options\n .map((candidate, optionIndex) => ({ candidate, optionIndex }))\n .filter(({ candidate }) => !candidate.isInactive)\n .map(({ optionIndex }) => optionIndex);\n if (!enabled.length) return;\n const current = enabled.indexOf(index);\n let next: number;\n if (event.key === 'Home') next = enabled[0];\n else if (event.key === 'End') next = enabled[enabled.length - 1];\n else {\n const direction = event.key === 'ArrowDown' ? 1 : -1;\n const start = current >= 0 ? current : direction === 1 ? -1 : 0;\n next = enabled[(start + direction + enabled.length) % enabled.length];\n }\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)\n ?.focus();\n });\n }\n\n private toggleMultiple(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n checked: boolean,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n const current = Array.isArray(values[filter.id]) ? (values[filter.id] as string[]) : [];\n const selected = new Set(current);\n if (checked) selected.add(option.value);\n else selected.delete(option.value);\n const ordered = (filter.options ?? [])\n .map(candidate => candidate.value)\n .filter(value => selected.has(value));\n this.dsChange.emit({ filterId: filter.id, value: ordered });\n }\n\n private selectOption(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n if (filter.kind === 'single') {\n this.dsChange.emit({ filterId: filter.id, value: option.value });\n return;\n }\n const selected = Array.isArray(values[filter.id])\n ? (values[filter.id] as string[]).includes(option.value)\n : false;\n this.toggleMultiple(filter, option, !selected, values);\n }\n\n private renderOptions(filter: FilterMenuFilter, values: FilterMenuValues) {\n const value = values[filter.id];\n if (filter.kind === 'multiple' || filter.kind === 'single') {\n const selected = Array.isArray(value) ? value : [];\n const options = filter.options ?? [];\n const usesSubtext = choiceListUsesSubtext(\n options.map(option => ({\n label: option.label,\n value: option.value,\n subtext: option.description,\n }))\n );\n return options.map((option, index) => {\n const isSelected =\n filter.kind === 'multiple' ? selected.includes(option.value) : value === option.value;\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-${index}`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n isInactive: option.isInactive,\n }}\n selected={isSelected}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={usesSubtext}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n leading={\n filter.kind === 'multiple' ? (\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={isSelected} presentation />\n </span>\n ) : undefined\n }\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, filter, option, index, values)\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.selectOption(filter, option, values)}\n />\n );\n });\n }\n\n if (filter.kind === 'boolean') {\n const option: FilterMenuOption = {\n label: filter.fieldLabel ?? filter.label,\n value: 'true',\n description: filter.description,\n };\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-0`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n }}\n selected={value === true}\n active\n focusRingVisible={this.focusRingVisible}\n usesSubtext={Boolean(option.description)}\n tabIndex={0}\n leading={\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={value === true} presentation />\n </span>\n }\n onKeyDown={(event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') this.handlePanelKeyDown(event, filter.id);\n else if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.dsChange.emit({ filterId: filter.id, value: value !== true });\n }\n }}\n onHover={() => {\n this.focusRingVisible = false;\n }}\n onSelect={() => this.dsChange.emit({ filterId: filter.id, value: value !== true })}\n />\n );\n }\n\n const dateValue = typeof value === 'string' ? value : '';\n const inputId = `${this.generatedId}-${filter.id}-input`;\n return (\n <div class=\"filter-menu__date-field\">\n <label htmlFor={inputId}>\n <ds-text as=\"span\" variant=\"text-body-small\" emphasis color=\"primary\">\n {filter.fieldLabel ?? 'Event date'}\n </ds-text>\n </label>\n <div class=\"filter-menu__date-control ds-control-frame ds-control--md\">\n <input\n id={inputId}\n class=\"filter-menu__date-input\"\n type=\"date\"\n value={dateValue}\n onInput={(event: Event) =>\n this.dsChange.emit({\n filterId: filter.id,\n value: (event.target as HTMLInputElement).value,\n })\n }\n />\n {dateValue ? (\n <ds-button-unfilled\n variant=\"icon\"\n icon=\"CrossCircle\"\n size=\"sm\"\n isInset\n hasBorder={false}\n rounded\n ariaLabel={`${this.clearLabel} ${filter.fieldLabel ?? filter.label}`}\n onDsClick={(event: CustomEvent<MouseEvent>) => {\n event.stopPropagation();\n this.dsChange.emit({ filterId: filter.id, value: '' });\n }}\n />\n ) : null}\n </div>\n </div>\n );\n }\n\n private get captionIconOnly(): boolean {\n return (\n this.collapseLabel &&\n this.captionCompact &&\n this.usesInternalTrigger &&\n Boolean(this.icon)\n );\n }\n\n private syncCaptionCompactObserver(): void {\n this.disconnectCaptionCompactObserver();\n if (!this.collapseLabel) {\n if (this.captionCompact) this.captionCompact = false;\n return;\n }\n this.captionCompactDisconnect = observeTableCaptionCompact(this.el, compact => {\n if (this.captionCompact !== compact) this.captionCompact = compact;\n });\n }\n\n private disconnectCaptionCompactObserver(): void {\n this.captionCompactDisconnect?.();\n this.captionCompactDisconnect = undefined;\n }\n\n render() {\n const state =\n this.closing && this.closingSnapshot\n ? this.closingSnapshot\n : {\n filters: this.filters,\n values: this.values,\n activeFilterId: this.activeFilterId,\n };\n const activeFilter = this.selectedFilter(state.filters, state.activeFilterId);\n const totalSelected = this.totalSelected(state.filters, state.values);\n const activeFilterCount = this.activeFilterCount(state.filters, state.values);\n const hasActiveFilters = activeFilterCount > 0;\n const label = `${this.triggerLabel}${hasActiveFilters ? ` · ${activeFilterCount}` : ''}`;\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const popupId = `${this.generatedId}-popup`;\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n width: this.menuWidth,\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n return (\n <Host\n class={{\n 'filter-menu-host': true,\n 'filter-menu-host--external-trigger': !this.usesInternalTrigger,\n 'ds-select-trigger-host': this.usesInternalTrigger,\n [`ds-control--${this.size}`]: true,\n 'ds-table-caption-control': this.collapseLabel,\n 'ds-table-caption-control--compact': this.captionIconOnly,\n ...controlWidthClass(this.width),\n }}\n >\n {this.usesInternalTrigger ? (\n <button\n ref={element => {\n this.triggerElement = (element as HTMLButtonElement) ?? null;\n }}\n id={this.inputId ?? `${this.generatedId}-trigger`}\n type=\"button\"\n class={{\n trigger: true,\n 'ds-control-frame': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': this.activeFill && hasActiveFilters,\n 'trigger--expanded': this.open || this.closing,\n 'trigger--bordered': this.hasBorder,\n 'trigger--has-value': hasActiveFilters,\n [`ds-control--${this.size}`]: true,\n }}\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={String(this.open)}\n aria-controls={this.open ? popupId : undefined}\n aria-label={this.ariaLabel ?? this.menuLabel}\n onClick={(event: MouseEvent) => this.toggleFromTrigger(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleTriggerKeyDown(event)}\n >\n {this.icon ? (\n <span\n class=\"trigger__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n ) : null}\n {this.captionIconOnly ? null : (\n <ds-text\n class=\"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant={textVariant}\n color=\"inherit\"\n lineTruncation={1}\n >\n {label}\n </ds-text>\n )}\n {this.captionIconOnly ? null : (\n <span\n class=\"trigger__chevron ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name=\"ChevronDown\" size={iconSize} color=\"inherit\" />\n </span>\n )}\n </button>\n ) : null}\n\n {this.shouldRender ? (\n <div\n id={popupId}\n popover=\"manual\"\n class={{\n 'filter-menu-popup': true,\n 'ds-choice-popup': true,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={popupStyle}\n role=\"dialog\"\n aria-label={this.menuLabel}\n >\n {activeFilter ? (\n <div class=\"filter-menu\">\n <div class=\"filter-menu__body\">\n <div\n class=\"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"tablist\"\n aria-label={this.categoriesLabel}\n aria-orientation=\"vertical\"\n >\n {state.filters.map(filter => {\n const active = filter.id === activeFilter.id;\n const count = this.selectedCount(filter, state.values);\n return (\n <div\n key={filter.id}\n class={{\n 'filter-menu__category-section': true,\n 'ds-choice-section--divided': Boolean(filter.divider),\n }}\n >\n <button\n id={`${this.generatedId}-${filter.id}-tab`}\n type=\"button\"\n role=\"tab\"\n data-filter-category={filter.id}\n class={{\n 'filter-menu__category': true,\n 'filter-menu__category--active': active,\n 'ds-choice-item': true,\n 'ds-control-frame': true,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': active && this.focusRingVisible,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': active,\n }}\n aria-selected={String(active)}\n aria-controls={`${this.generatedId}-panel`}\n tabIndex={active ? 0 : -1}\n onMouseDown={() => {\n this.focusRingVisible = false;\n }}\n onClick={() => this.selectCategory(filter.id)}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleCategoryKeyDown(event, state.filters, filter.id)\n }\n >\n <ds-text\n class=\"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={active ? 'primary' : 'secondary'}\n >\n {filter.label}\n </ds-text>\n {count > 0 ? (\n <ds-tag\n class=\"ds-choice-item__tag ds-interaction-fill__content\"\n label={String(count)}\n size=\"sm\"\n intent=\"brand\"\n contrast=\"bold\"\n isInset\n rounded\n />\n ) : null}\n </button>\n </div>\n );\n })}\n </div>\n\n <div\n id={`${this.generatedId}-panel`}\n class=\"filter-menu__options\"\n role=\"tabpanel\"\n aria-labelledby={`${this.generatedId}-${activeFilter.id}-tab`}\n >\n <div\n key={activeFilter.id}\n class=\"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label={activeFilter.label}\n aria-multiselectable={activeFilter.kind === 'multiple' ? 'true' : undefined}\n >\n {this.renderOptions(activeFilter, state.values)}\n </div>\n </div>\n </div>\n\n {totalSelected > 0 ? (\n <div class=\"filter-menu__footer ds-choice-footer\">\n <div class=\"ds-choice-footer__content ds-control--md\">\n <ds-text\n class=\"ds-choice-footer__summary\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"secondary\"\n aria-live=\"polite\"\n >\n {totalSelected} selected\n </ds-text>\n <button\n class=\"filter-menu__clear ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n onClick={() => this.dsClear.emit()}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.clearLabel}\n </ds-text>\n </button>\n </div>\n </div>\n ) : null}\n </div>\n )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AOmI,EAAM5N,QAASwH,EAAO0B,KAG1D0C,EAAA,WACEK,MAAM,kGACNY,GAAG,OACHC,QAAQ,mBACRE,MAAOlB,EAAS,UAAY,aAE3BtE,EAAOgE,OAET8D,EAAQ,EACP1D,EAAA,UACEK,MAAM,mDACNT,MAAOwD,OAAOM,GACd5P,KAAK,KACL+P,OAAO,QACPC,SAAS,OACTvC,QAAO,KACPC,QAAO,OAEP,MAEF,KAKZxB,EAAA,OACE1C,GAAI,GAAG5J,KAAKiC,oBACZ0K,MAAM,uBACN8C,KAAK,WAAU,kBACE,GAAGzP,KAAKiC,eAAesM,EAAa3E,UAErD0C,EAAA,OACElG,IAAKmI,EAAa3E,GAClB+C,MAAM,+EACN8C,KAAK,UAAS,aACFlB,EAAarC,MAAK,uBACRqC,EAAazE,OAAS,WAAa,OAAS+C,WAEjE7M,KAAK+L,cAAcwC,EAAcD,EAAM3N,WAK7CoJ,EAAgB,EACfuC,EAAA,OAAKK,MAAM,wCACTL,EAAA,OAAKK,MAAM,4CACTL,EAAA,WACEK,MAAM,4BACNY,GAAG,OACHC,QAAQ,mBACRE,MAAM,YAAW,YACP,UAET3D,EACO,aACVuC,EAAA,UACEK,MAAM,4DACNgB,KAAK,SACLgC,QAAS,IAAM3P,KAAKqQ,QAAQ3I,QAE5B4E,EAAA,WAASiB,GAAG,OAAOC,QAAQ,mBAAmBE,MAAM,WACjD1N,KAAKsB,eAKZ,MAEJ,MAEJ,K","ignoreList":[]}
1
+ {"version":3,"names":["filterMenuCss","FILTER_MENU_FOCUSABLE_SELECTOR","join","filterMenuId","ICON_SIZE","lg","md","sm","xs","FilterMenu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","triggerLabel","icon","size","width","hasBorder","activeFill","collapseLabel","ariaLabel","filters","values","side","align","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","menuWidth","menuWidthLg","menuLabel","categoriesLabel","clearLabel","initialFocusVisible","shouldRender","closing","positionReady","pos","x","y","focusRingVisible","activeOptionIndex","captionCompact","generatedId","outsideHandler","triggerElement","pendingInitialFocusVisible","closeTimer","hasLoaded","closingSnapshot","position","AnchoredPositionController","getAnchor","resolvedAnchor","getPopup","el","querySelector","measure","anchor","popup","anchorRect","getBoundingClientRect","sectionInsetPx","resolveCssLengthPx","TOKEN_DEFAULTS","popupWidth","offsetWidth","popupFallbackWidth","popupHeight","offsetHeight","popupFallbackHeight","sideOffsetPx","alignOffsetPx","resolveChoicePopupAlignOffset","viewportPadPx","viewportPad","viewportWidth","window","innerWidth","viewportHeight","innerHeight","apply","onReady","liveUpdate","observeResize","topLayer","componentDidLoad","syncCaptionCompactObserver","onOpenChange","connectedCallback","disconnectedCallback","disconnectCaptionCompactObserver","unobserve","teardownListeners","onCollapseLabelChange","isOpen","setupListeners","schedule","focusInitialCategory","cancel","captureClosingSnapshot","duration","resolveMotionTimeMs","motionShort2","animationDurationShort3","finishClose","setTimeout","onPositionInputChange","handleKeyDown","event","key","preventDefault","close","tabLeavesPopup","moveFocusAfterTab","shiftKey","anchorId","document","getElementById","usesInternalTrigger","anchorFocusTarget","matches","menuFallbackHeight","target","contains","addEventListener","observe","removeEventListener","clearTimeout","restoreFocus","focusAnchor","dsOpenChange","emit","dsClose","toggleFromTrigger","detail","handleTriggerKeyDown","hidePopover","dsAfterClose","map","filter","options","option","Object","fromEntries","entries","value","Array","isArray","activeFilterId","setFocus","focus","requestAnimationFrame","focusables","from","querySelectorAll","element","getClientRects","length","index","indexOf","backwards","candidates","closest","selectedFilter","find","id","selectedCount","kind","totalSelected","reduce","total","activeFilterCount","selectCategory","filterId","dsActiveFilterChange","handleCategoryKeyDown","currentIndex","findIndex","nextIndex","handlePanelKeyDown","handleOptionKeyDown","selectOption","includes","enabled","candidate","optionIndex","isInactive","current","next","direction","start","toggleMultiple","checked","selected","Set","add","delete","ordered","has","dsChange","renderOptions","usesSubtext","choiceListUsesSubtext","label","subtext","description","isSelected","h","ChoiceOptionRow","active","tabIndex","leading","class","presentation","undefined","onFocus","onKeyDown","onHover","onSelect","fieldLabel","Boolean","dateValue","inputId","htmlFor","as","variant","emphasis","color","type","onInput","isInset","rounded","onDsClick","stopPropagation","captionIconOnly","captionCompactDisconnect","observeTableCaptionCompact","compact","render","state","activeFilter","hasActiveFilters","textVariant","CONTROL_TEXT_VARIANT","iconSize","popupId","popupStyle","left","top","transform","Math","round","zIndex","visibility","Host","controlWidthClass","ref","trigger","role","String","onClick","name","lineTruncation","popover","style","count","divider","onMouseDown","intent","contrast","dsClear"],"sources":["src/wc/components/FilterMenu/FilterMenu.css?tag=ds-filter-menu&encapsulation=scoped","src/wc/components/FilterMenu/FilterMenu.tsx"],"sourcesContent":["@import '../../utils/choice-list.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/select-trigger.css';\n@import '../../utils/table-caption-control.css';\n\n:host(.filter-menu-host--external-trigger) {\n display: contents;\n}\n\n.filter-menu {\n display: flex;\n min-height: 0;\n flex-direction: column;\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__body {\n display: grid;\n grid-template-columns: minmax(calc(var(--dimension-size-base) * 18), 2fr) minmax(0, 3fr);\n min-height: calc(var(--dimension-size-800) * 4 + var(--dimension-space-150));\n max-height: calc(100vh - var(--dimension-size-800) - var(--dimension-size-600));\n}\n\n.filter-menu__categories {\n min-width: 0;\n border-inline-end: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n}\n\n.filter-menu__category-section {\n display: flex;\n min-width: 0;\n flex-direction: column;\n}\n\n.filter-menu__category-section.ds-choice-section--divided {\n padding-block-end: var(--dimension-space-050);\n}\n\n.filter-menu__category {\n justify-content: space-between;\n width: 100%;\n border: 0;\n background: transparent;\n color: var(--color-foreground-secondary);\n cursor: default;\n text-align: start;\n}\n\n.filter-menu__category--active {\n color: var(--color-foreground-primary);\n}\n\n.filter-menu__options {\n min-width: 0;\n overflow: hidden;\n}\n\n.filter-menu__date-field {\n display: flex;\n min-width: 0;\n flex-direction: column;\n align-items: stretch;\n gap: var(--dimension-space-100);\n}\n\n.filter-menu__date-control {\n width: 100%;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary);\n}\n\n.filter-menu__date-control:focus-within {\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand);\n}\n\n.filter-menu__date-input {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n padding-inline: var(--dimension-space-100);\n border: 0;\n outline: 0;\n background: transparent;\n color: var(--color-foreground-primary);\n font: inherit;\n}\n\n.filter-menu__footer {\n flex: 0 0 auto;\n}\n\n.filter-menu__clear {\n color: var(--color-foreground-bold-brand);\n}\n\n@media (max-width: 520px) {\n .filter-menu__body {\n grid-template-columns: minmax(calc(var(--dimension-size-base) * 14), 2fr) minmax(0, 3fr);\n }\n}\n\n@media (forced-colors: active) {\n .filter-menu__categories {\n border-inline-end-color: var(--ds-forced-color-content);\n }\n\n .filter-menu__date-control {\n outline: var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n CONTROL_TEXT_VARIANT,\n controlWidthClass,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ControlWidth,\n} from '../../utils';\nimport { observeTableCaptionCompact } from '../../utils/table-caption-compact';\nimport type { AnchoredAlign, AnchoredSide } from '../../utils/anchored-position';\nimport { AnchoredPositionController } from '../../utils/anchored-position-controller';\nimport { ChoiceOptionRow } from '../../utils/choice-list-parts';\nimport { choiceListUsesSubtext } from '../../utils/choice-list';\n\nexport type FilterMenuFilterKind = 'single' | 'multiple' | 'boolean' | 'date';\nexport type FilterMenuSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type FilterMenuWidth = ControlWidth;\n\nexport interface FilterMenuOption {\n label: string;\n value: string;\n description?: string;\n isInactive?: boolean;\n}\n\nexport interface FilterMenuFilter {\n id: string;\n label: string;\n kind: FilterMenuFilterKind;\n options?: FilterMenuOption[];\n description?: string;\n fieldLabel?: string;\n /** Draw a standard menu-section divider after this category. */\n divider?: boolean;\n}\n\nexport type FilterMenuValue = string[] | boolean | string;\nexport type FilterMenuValues = Record<string, FilterMenuValue | undefined>;\n\nexport interface FilterMenuChangeDetail {\n filterId: string;\n value: FilterMenuValue;\n}\n\nconst FILTER_MENU_FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\nlet filterMenuId = 0;\n\nconst ICON_SIZE: Record<FilterMenuSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\n@Component({\n tag: 'ds-filter-menu',\n styleUrl: 'FilterMenu.css',\n scoped: true,\n})\nexport class FilterMenu {\n @Element() el!: HTMLElement;\n\n /** Controlled popup visibility. */\n @Prop({ mutable: true }) open: boolean = false;\n /** Select trigger text. The selected count is appended automatically. */\n @Prop() triggerLabel: string = 'Filters';\n /** Optional select trigger prefix icon name. */\n @Prop() icon: string | undefined = 'Filters';\n /** Select trigger density. */\n @Prop() size: FilterMenuSize = 'md';\n /** Select trigger width fit. */\n @Prop() width: FilterMenuWidth = 'hug';\n /** Show the surface-aware inset border around the select trigger. */\n @Prop() hasBorder: boolean = true;\n /** Show selected interaction fill when one or more criteria are active. */\n @Prop() activeFill: boolean = false;\n /**\n * Opt into table-caption icon-only chrome below 900px. The trigger omits its\n * visible label and chevron; keep an accessible name via aria-label.\n */\n @Prop({ reflect: true }) collapseLabel: boolean = false;\n /** ID applied to the internal select trigger. */\n @Prop() inputId: string | undefined;\n /** Direct accessible name for the internal select trigger. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n /** Product-owned filter categories and option definitions. */\n @Prop() filters: FilterMenuFilter[] = [];\n /** Controlled values keyed by filter id. */\n @Prop() values: FilterMenuValues = {};\n /** Controlled category shown in the option pane. */\n @Prop() activeFilterId: string | undefined;\n /** External trigger element to position against. */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element used for positioning and focus return. */\n @Prop() anchorId: string | undefined;\n /** Preferred popup side; collision handling may flip it. */\n @Prop() side: AnchoredSide = 'bottom';\n /** Cross-axis alignment against the trigger. */\n @Prop() align: AnchoredAlign = 'end';\n /** Gap between trigger and popup — number in px or a TokoMo length. */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number in px or a TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n /** Popup width. It remains clamped to the viewport by the component recipe. */\n @Prop() menuWidth: string = TOKEN_CSS_LENGTHS.menuWidthLg;\n /** Accessible name for the non-modal filter dialog. */\n @Prop() menuLabel: string = 'Filters';\n /** Accessible name for the category tab list. */\n @Prop() categoriesLabel: string = 'Filter categories';\n /** Footer action and date-clear accessible label. */\n @Prop() clearLabel: string = 'Clear';\n /** Show a visible focus ring on initial entry after keyboard activation. */\n @Prop() initialFocusVisible: boolean = false;\n\n @State() private shouldRender = false;\n @State() private closing = false;\n @State() private positionReady = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusRingVisible = false;\n @State() private activeOptionIndex = 0;\n @State() private captionCompact = false;\n\n /** Requests a controlled value replacement without closing the popup. */\n @Event() dsChange!: EventEmitter<FilterMenuChangeDetail>;\n /** Requests that the consumer clear every filter value. */\n @Event() dsClear!: EventEmitter<void>;\n /** Requests a controlled active-category replacement. */\n @Event() dsActiveFilterChange!: EventEmitter<string>;\n /** Requests that the controlled popup close. */\n @Event() dsClose!: EventEmitter<void>;\n /** Emitted whenever internal select-trigger activation changes popup visibility. */\n @Event() dsOpenChange!: EventEmitter<boolean>;\n /** Emitted after exit motion and rendered popup removal complete. */\n @Event() dsAfterClose!: EventEmitter<void>;\n\n private readonly generatedId = `ds-filter-menu-${++filterMenuId}`;\n private outsideHandler: ((event: MouseEvent) => void) | null = null;\n private triggerElement: HTMLButtonElement | null = null;\n private pendingInitialFocusVisible = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private captionCompactDisconnect: (() => void) | undefined;\n private hasLoaded = false;\n private closingSnapshot: {\n filters: FilterMenuFilter[];\n values: FilterMenuValues;\n activeFilterId: string | undefined;\n } | null = null;\n\n private readonly position = new AnchoredPositionController({\n getAnchor: () => this.resolvedAnchor,\n getPopup: () => this.el.querySelector<HTMLElement>('.filter-menu-popup'),\n measure: (anchor, popup) => {\n if (!this.open) return null;\n const anchorRect = anchor.getBoundingClientRect();\n const sectionInsetPx = resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n return {\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidth,\n popupHeight: popup.offsetHeight || this.popupFallbackHeight,\n side: this.side,\n align: this.align,\n sideOffsetPx: resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050),\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: resolveCssLengthPx(this.alignOffset, 0),\n sectionInsetPx,\n }),\n viewportPadPx: this.viewportPad,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n };\n },\n apply: ({ x, y }) => {\n this.pos = { x, y };\n },\n onReady: () => {\n this.positionReady = true;\n },\n liveUpdate: 'double-frame',\n observeResize: true,\n topLayer: true,\n });\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n connectedCallback() {\n if (!this.hasLoaded) return;\n this.syncCaptionCompactObserver();\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.disconnectCaptionCompactObserver();\n this.position.unobserve();\n this.teardownListeners();\n }\n\n @Watch('collapseLabel')\n onCollapseLabelChange() {\n this.syncCaptionCompactObserver();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.closingSnapshot = null;\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.focusRingVisible = this.pendingInitialFocusVisible || this.initialFocusVisible;\n this.setupListeners();\n this.position.schedule(() => this.focusInitialCategory());\n return;\n }\n\n if (!this.shouldRender) return;\n this.position.cancel();\n this.captureClosingSnapshot();\n this.closing = true;\n this.teardownListeners();\n const duration = resolveMotionTimeMs(\n TOKEN_DEFAULTS.motionShort2,\n TOKEN_DEFAULTS.animationDurationShort3\n );\n if (duration <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => this.finishClose(), duration);\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n @Watch('side')\n @Watch('align')\n @Watch('sideOffset')\n @Watch('alignOffset')\n @Watch('menuWidth')\n onPositionInputChange() {\n if (this.open) this.position.schedule();\n }\n\n @Listen('keydown')\n handleKeyDown(event: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close();\n return;\n }\n if (event.key !== 'Tab' || !this.tabLeavesPopup(event)) return;\n event.preventDefault();\n this.close(false);\n this.moveFocusAfterTab(event.shiftKey);\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return this.triggerElement;\n }\n\n private get usesInternalTrigger(): boolean {\n return !this.anchor && !this.anchorId;\n }\n\n private get anchorFocusTarget(): HTMLElement | null {\n const anchor = this.resolvedAnchor;\n if (!anchor) return null;\n if (anchor.matches(FILTER_MENU_FOCUSABLE_SELECTOR)) return anchor;\n return anchor.querySelector<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR) ?? anchor;\n }\n\n private get viewportPad(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get popupFallbackWidth(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthLg, TOKEN_DEFAULTS.menuWidthLg);\n }\n\n private get popupFallbackHeight(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private setupListeners() {\n this.outsideHandler = event => {\n const target = event.target as Node;\n const popup = this.el.querySelector('.filter-menu-popup');\n if (popup?.contains(target) || this.resolvedAnchor?.contains(target)) return;\n this.close();\n };\n document.addEventListener('mousedown', this.outsideHandler, true);\n this.position.observe();\n }\n\n private teardownListeners() {\n this.position.unobserve();\n if (this.outsideHandler) {\n document.removeEventListener('mousedown', this.outsideHandler, true);\n this.outsideHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n this.captureClosingSnapshot();\n if (restoreFocus) this.focusAnchor();\n this.dsOpenChange.emit(false);\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n private toggleFromTrigger(event: MouseEvent) {\n if (this.open) {\n this.close();\n return;\n }\n this.pendingInitialFocusVisible = event.detail === 0;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private handleTriggerKeyDown(event: KeyboardEvent) {\n if (event.key !== 'ArrowDown' || this.open) return;\n event.preventDefault();\n this.pendingInitialFocusVisible = true;\n this.open = true;\n this.dsOpenChange.emit(true);\n this.onOpenChange(true);\n }\n\n private finishClose() {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (popup?.matches(':popover-open')) popup.hidePopover();\n this.shouldRender = false;\n this.closing = false;\n this.closingSnapshot = null;\n this.closeTimer = null;\n this.dsAfterClose.emit();\n }\n\n private captureClosingSnapshot() {\n if (this.closingSnapshot) return;\n this.closingSnapshot = {\n filters: this.filters.map(filter => ({\n ...filter,\n options: filter.options?.map(option => ({ ...option })),\n })),\n values: Object.fromEntries(\n Object.entries(this.values).map(([key, value]) => [\n key,\n Array.isArray(value) ? [...value] : value,\n ])\n ),\n activeFilterId: this.activeFilterId,\n };\n }\n\n private focusAnchor() {\n const anchor = this.resolvedAnchor as\n (HTMLElement & { setFocus?: () => Promise<void> | void }) | null;\n if (anchor?.setFocus) {\n void anchor.setFocus();\n return;\n }\n this.anchorFocusTarget?.focus();\n }\n\n private focusInitialCategory() {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.filter-menu__category[tabindex=\"0\"]')?.focus();\n this.pendingInitialFocusVisible = false;\n });\n }\n\n private tabLeavesPopup(event: KeyboardEvent): boolean {\n const popup = this.el.querySelector<HTMLElement>('.filter-menu-popup');\n if (!popup) return true;\n const focusables = Array.from(\n popup.querySelectorAll<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR)\n ).filter(element => element.getClientRects().length > 0);\n const index = focusables.indexOf(event.target as HTMLElement);\n if (index < 0) return true;\n return event.shiftKey ? index === 0 : index === focusables.length - 1;\n }\n\n private moveFocusAfterTab(backwards: boolean) {\n const anchor = this.anchorFocusTarget;\n if (!anchor) return;\n if (backwards) {\n anchor.focus();\n return;\n }\n const candidates = Array.from(\n document.querySelectorAll<HTMLElement>(FILTER_MENU_FOCUSABLE_SELECTOR)\n ).filter(\n element =>\n !element.closest('.filter-menu-popup') &&\n !element.closest('[inert]') &&\n element.getClientRects().length > 0\n );\n const index = candidates.indexOf(anchor);\n (candidates[index + 1] ?? anchor).focus();\n }\n\n private selectedFilter(filters: FilterMenuFilter[], activeFilterId: string | undefined) {\n return filters.find(filter => filter.id === activeFilterId) ?? filters[0];\n }\n\n private selectedCount(filter: FilterMenuFilter, values: FilterMenuValues): number {\n const value = values[filter.id];\n if (filter.kind === 'multiple') return Array.isArray(value) ? value.length : 0;\n if (filter.kind === 'boolean') return value === true ? 1 : 0;\n return typeof value === 'string' && value.length > 0 ? 1 : 0;\n }\n\n private totalSelected(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.reduce((total, filter) => total + this.selectedCount(filter, values), 0);\n }\n\n private activeFilterCount(filters: FilterMenuFilter[], values: FilterMenuValues): number {\n return filters.filter(filter => this.selectedCount(filter, values) > 0).length;\n }\n\n private selectCategory(filterId: string, focus = false) {\n this.activeOptionIndex = 0;\n this.dsActiveFilterChange.emit(filterId);\n if (!focus) return;\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n });\n }\n\n private handleCategoryKeyDown(\n event: KeyboardEvent,\n filters: FilterMenuFilter[],\n filterId: string\n ) {\n const currentIndex = filters.findIndex(filter => filter.id === filterId);\n let nextIndex: number;\n if (event.key === 'ArrowDown') nextIndex = (currentIndex + 1) % filters.length;\n else if (event.key === 'ArrowUp')\n nextIndex = (currentIndex - 1 + filters.length) % filters.length;\n else if (event.key === 'Home') nextIndex = 0;\n else if (event.key === 'End') nextIndex = filters.length - 1;\n else if (event.key === 'ArrowRight') {\n event.preventDefault();\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(\n '.filter-menu__options [role=\"option\"], .filter-menu__options input'\n )\n ?.focus();\n });\n return;\n } else return;\n\n event.preventDefault();\n this.focusRingVisible = true;\n this.selectCategory(filters[nextIndex].id, true);\n }\n\n private handlePanelKeyDown(event: KeyboardEvent, filterId: string) {\n if (event.key !== 'ArrowLeft') return;\n event.preventDefault();\n this.el.querySelector<HTMLElement>(`[data-filter-category=\"${filterId}\"]`)?.focus();\n }\n\n private handleOptionKeyDown(\n event: KeyboardEvent,\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n index: number,\n values: FilterMenuValues\n ) {\n const options = filter.options ?? [];\n if (event.key === 'ArrowLeft') {\n this.handlePanelKeyDown(event, filter.id);\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.selectOption(filter, option, values);\n return;\n }\n if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return;\n event.preventDefault();\n const enabled = options\n .map((candidate, optionIndex) => ({ candidate, optionIndex }))\n .filter(({ candidate }) => !candidate.isInactive)\n .map(({ optionIndex }) => optionIndex);\n if (!enabled.length) return;\n const current = enabled.indexOf(index);\n let next: number;\n if (event.key === 'Home') next = enabled[0];\n else if (event.key === 'End') next = enabled[enabled.length - 1];\n else {\n const direction = event.key === 'ArrowDown' ? 1 : -1;\n const start = current >= 0 ? current : direction === 1 ? -1 : 0;\n next = enabled[(start + direction + enabled.length) % enabled.length];\n }\n this.activeOptionIndex = next;\n this.focusRingVisible = true;\n requestAnimationFrame(() => {\n this.el\n .querySelector<HTMLElement>(`#${this.generatedId}-${filter.id}-option-${next}`)\n ?.focus();\n });\n }\n\n private toggleMultiple(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n checked: boolean,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n const current = Array.isArray(values[filter.id]) ? (values[filter.id] as string[]) : [];\n const selected = new Set(current);\n if (checked) selected.add(option.value);\n else selected.delete(option.value);\n const ordered = (filter.options ?? [])\n .map(candidate => candidate.value)\n .filter(value => selected.has(value));\n this.dsChange.emit({ filterId: filter.id, value: ordered });\n }\n\n private selectOption(\n filter: FilterMenuFilter,\n option: FilterMenuOption,\n values: FilterMenuValues\n ) {\n if (option.isInactive) return;\n if (filter.kind === 'single') {\n this.dsChange.emit({ filterId: filter.id, value: option.value });\n return;\n }\n const selected = Array.isArray(values[filter.id])\n ? (values[filter.id] as string[]).includes(option.value)\n : false;\n this.toggleMultiple(filter, option, !selected, values);\n }\n\n private renderOptions(filter: FilterMenuFilter, values: FilterMenuValues) {\n const value = values[filter.id];\n if (filter.kind === 'multiple' || filter.kind === 'single') {\n const selected = Array.isArray(value) ? value : [];\n const options = filter.options ?? [];\n const usesSubtext = choiceListUsesSubtext(\n options.map(option => ({\n label: option.label,\n value: option.value,\n subtext: option.description,\n }))\n );\n return options.map((option, index) => {\n const isSelected =\n filter.kind === 'multiple' ? selected.includes(option.value) : value === option.value;\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-${index}`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n isInactive: option.isInactive,\n }}\n selected={isSelected}\n active={index === this.activeOptionIndex}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={usesSubtext}\n tabIndex={index === this.activeOptionIndex ? 0 : -1}\n leading={\n filter.kind === 'multiple' ? (\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={isSelected} presentation />\n </span>\n ) : undefined\n }\n onFocus={() => {\n this.activeOptionIndex = index;\n }}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleOptionKeyDown(event, filter, option, index, values)\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeOptionIndex = index;\n }}\n onSelect={() => this.selectOption(filter, option, values)}\n />\n );\n });\n }\n\n if (filter.kind === 'boolean') {\n const option: FilterMenuOption = {\n label: filter.fieldLabel ?? filter.label,\n value: 'true',\n description: filter.description,\n };\n return (\n <ChoiceOptionRow\n size=\"md\"\n id={`${this.generatedId}-${filter.id}-option-0`}\n option={{\n label: option.label,\n value: option.value,\n subtext: option.description,\n }}\n selected={value === true}\n active\n focusRingVisible={this.focusRingVisible}\n usesSubtext={Boolean(option.description)}\n tabIndex={0}\n leading={\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-checkbox label=\"\" size=\"md\" checked={value === true} presentation />\n </span>\n }\n onKeyDown={(event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') this.handlePanelKeyDown(event, filter.id);\n else if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.dsChange.emit({ filterId: filter.id, value: value !== true });\n }\n }}\n onHover={() => {\n this.focusRingVisible = false;\n }}\n onSelect={() => this.dsChange.emit({ filterId: filter.id, value: value !== true })}\n />\n );\n }\n\n const dateValue = typeof value === 'string' ? value : '';\n const inputId = `${this.generatedId}-${filter.id}-input`;\n return (\n <div class=\"filter-menu__date-field\">\n <label htmlFor={inputId}>\n <ds-text as=\"span\" variant=\"text-body-small\" emphasis color=\"primary\">\n {filter.fieldLabel ?? 'Event date'}\n </ds-text>\n </label>\n <div class=\"filter-menu__date-control ds-control-frame ds-control--md\">\n <input\n id={inputId}\n class=\"filter-menu__date-input\"\n type=\"date\"\n value={dateValue}\n onInput={(event: Event) =>\n this.dsChange.emit({\n filterId: filter.id,\n value: (event.target as HTMLInputElement).value,\n })\n }\n />\n {dateValue ? (\n <ds-button-unfilled\n variant=\"icon\"\n icon=\"CrossCircle\"\n size=\"sm\"\n isInset\n hasBorder={false}\n rounded\n ariaLabel={`${this.clearLabel} ${filter.fieldLabel ?? filter.label}`}\n onDsClick={(event: CustomEvent<MouseEvent>) => {\n event.stopPropagation();\n this.dsChange.emit({ filterId: filter.id, value: '' });\n }}\n />\n ) : null}\n </div>\n </div>\n );\n }\n\n private get captionIconOnly(): boolean {\n return (\n this.collapseLabel &&\n this.captionCompact &&\n this.usesInternalTrigger &&\n Boolean(this.icon)\n );\n }\n\n private syncCaptionCompactObserver(): void {\n this.disconnectCaptionCompactObserver();\n if (!this.collapseLabel) {\n if (this.captionCompact) this.captionCompact = false;\n return;\n }\n this.captionCompactDisconnect = observeTableCaptionCompact(this.el, compact => {\n if (this.captionCompact !== compact) this.captionCompact = compact;\n });\n }\n\n private disconnectCaptionCompactObserver(): void {\n this.captionCompactDisconnect?.();\n this.captionCompactDisconnect = undefined;\n }\n\n render() {\n const state =\n this.closing && this.closingSnapshot\n ? this.closingSnapshot\n : {\n filters: this.filters,\n values: this.values,\n activeFilterId: this.activeFilterId,\n };\n const activeFilter = this.selectedFilter(state.filters, state.activeFilterId);\n const totalSelected = this.totalSelected(state.filters, state.values);\n const activeFilterCount = this.activeFilterCount(state.filters, state.values);\n const hasActiveFilters = activeFilterCount > 0;\n const label = `${this.triggerLabel}${hasActiveFilters ? ` · ${activeFilterCount}` : ''}`;\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const popupId = `${this.generatedId}-popup`;\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n width: this.menuWidth,\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n return (\n <Host\n class={{\n 'filter-menu-host': true,\n 'filter-menu-host--external-trigger': !this.usesInternalTrigger,\n 'ds-select-trigger-host': this.usesInternalTrigger,\n [`ds-control--${this.size}`]: true,\n 'ds-table-caption-control': this.collapseLabel,\n 'ds-table-caption-control--compact': this.captionIconOnly,\n ...controlWidthClass(this.width),\n }}\n >\n {this.usesInternalTrigger ? (\n <ds-tooltip\n label={this.captionIconOnly ? label : ''}\n side=\"top\"\n size=\"sm\"\n >\n <button\n ref={element => {\n this.triggerElement = (element as HTMLButtonElement) ?? null;\n }}\n id={this.inputId ?? `${this.generatedId}-trigger`}\n type=\"button\"\n class={{\n trigger: true,\n 'ds-control-frame': true,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': this.activeFill && hasActiveFilters,\n 'trigger--expanded': this.open || this.closing,\n 'trigger--bordered': this.hasBorder,\n 'trigger--has-value': hasActiveFilters,\n [`ds-control--${this.size}`]: true,\n }}\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={String(this.open)}\n aria-controls={this.open ? popupId : undefined}\n aria-label={this.ariaLabel ?? this.menuLabel}\n onClick={(event: MouseEvent) => this.toggleFromTrigger(event)}\n onKeyDown={(event: KeyboardEvent) => this.handleTriggerKeyDown(event)}\n >\n {this.icon ? (\n <span\n class=\"trigger__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n </span>\n ) : null}\n {this.captionIconOnly ? null : (\n <ds-text\n class=\"trigger__label-box trigger__label trigger__label-content ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant={textVariant}\n color=\"inherit\"\n lineTruncation={1}\n >\n {label}\n </ds-text>\n )}\n {this.captionIconOnly ? null : (\n <span\n class=\"trigger__chevron ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name=\"ChevronDown\" size={iconSize} color=\"inherit\" />\n </span>\n )}\n </button>\n </ds-tooltip>\n ) : null}\n\n {this.shouldRender ? (\n <div\n id={popupId}\n popover=\"manual\"\n class={{\n 'filter-menu-popup': true,\n 'ds-choice-popup': true,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={popupStyle}\n role=\"dialog\"\n aria-label={this.menuLabel}\n >\n {activeFilter ? (\n <div class=\"filter-menu\">\n <div class=\"filter-menu__body\">\n <div\n class=\"filter-menu__categories ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"tablist\"\n aria-label={this.categoriesLabel}\n aria-orientation=\"vertical\"\n >\n {state.filters.map(filter => {\n const active = filter.id === activeFilter.id;\n const count = this.selectedCount(filter, state.values);\n return (\n <div\n key={filter.id}\n class={{\n 'filter-menu__category-section': true,\n 'ds-choice-section--divided': Boolean(filter.divider),\n }}\n >\n <button\n id={`${this.generatedId}-${filter.id}-tab`}\n type=\"button\"\n role=\"tab\"\n data-filter-category={filter.id}\n class={{\n 'filter-menu__category': true,\n 'filter-menu__category--active': active,\n 'ds-choice-item': true,\n 'ds-control-frame': true,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': active && this.focusRingVisible,\n 'ds-interaction-fill': true,\n 'ds-interaction-fill--selected': active,\n }}\n aria-selected={String(active)}\n aria-controls={`${this.generatedId}-panel`}\n tabIndex={active ? 0 : -1}\n onMouseDown={() => {\n this.focusRingVisible = false;\n }}\n onClick={() => this.selectCategory(filter.id)}\n onKeyDown={(event: KeyboardEvent) =>\n this.handleCategoryKeyDown(event, state.filters, filter.id)\n }\n >\n <ds-text\n class=\"ds-choice-item__content ds-choice-item__label ds-control-label-box ds-interaction-fill__content\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={active ? 'primary' : 'secondary'}\n >\n {filter.label}\n </ds-text>\n {count > 0 ? (\n <ds-tag\n class=\"ds-choice-item__tag ds-interaction-fill__content\"\n label={String(count)}\n size=\"sm\"\n intent=\"brand\"\n contrast=\"bold\"\n isInset\n rounded\n />\n ) : null}\n </button>\n </div>\n );\n })}\n </div>\n\n <div\n id={`${this.generatedId}-panel`}\n class=\"filter-menu__options\"\n role=\"tabpanel\"\n aria-labelledby={`${this.generatedId}-${activeFilter.id}-tab`}\n >\n <div\n key={activeFilter.id}\n class=\"filter-menu__option-list ds-choice-list ds-chrome-column ds-chrome-space--sm\"\n role=\"listbox\"\n aria-label={activeFilter.label}\n aria-multiselectable={activeFilter.kind === 'multiple' ? 'true' : undefined}\n >\n {this.renderOptions(activeFilter, state.values)}\n </div>\n </div>\n </div>\n\n {totalSelected > 0 ? (\n <div class=\"filter-menu__footer ds-choice-footer\">\n <div class=\"ds-choice-footer__content ds-control--md\">\n <ds-text\n class=\"ds-choice-footer__summary\"\n as=\"span\"\n variant=\"text-body-medium\"\n color=\"secondary\"\n aria-live=\"polite\"\n >\n {totalSelected} selected\n </ds-text>\n <button\n class=\"filter-menu__clear ds-choice-footer__clear ds-text-action\"\n type=\"button\"\n onClick={() => this.dsClear.emit()}\n >\n <ds-text as=\"span\" variant=\"text-body-medium\" color=\"inherit\">\n {this.clearLabel}\n </ds-text>\n </button>\n </div>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n ) : null}\n </Host>\n );\n }\n}\n"],"mappings":"6oBAAA,MAAMA,EAAgB,IAAM,oy/BC0D5B,MAAMC,EAAiC,CACrC,UACA,yBACA,6CACA,yBACA,2BACA,mCACAC,KAAK,KAEP,IAAIC,EAAe,EAEnB,MAAMC,EAA+D,CACn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