@ds-mo/ui 14.31.3 → 14.32.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 (290) hide show
  1. package/dist/.package-ready.json +1 -1
  2. package/dist/agent-patterns.json +15 -5
  3. package/dist/agent.json +228 -23
  4. package/dist/angular/ds-bar-page-title.d.ts +28 -0
  5. package/dist/angular/ds-bar-page-title.js +48 -0
  6. package/dist/angular/ds-card-settings-scope.d.ts +1 -1
  7. package/dist/angular/ds-card-settings-scope.js +3 -3
  8. package/dist/angular/index.d.ts +1 -1
  9. package/dist/angular/index.js +1 -0
  10. package/dist/angular/proxies.d.ts +1 -0
  11. package/dist/angular/proxies.js +1 -0
  12. package/dist/components/ds-agent-questionnaire.js +1 -1
  13. package/dist/components/ds-agent-response.js +1 -1
  14. package/dist/components/ds-avatar.js +1 -1
  15. package/dist/components/ds-avatar.js.map +1 -1
  16. package/dist/components/ds-banner.js +1 -1
  17. package/dist/components/ds-banner.js.map +1 -1
  18. package/dist/components/ds-bar-action.js +1 -1
  19. package/dist/components/ds-bar-action.js.map +1 -1
  20. package/dist/components/ds-bar-nav.js +1 -1
  21. package/dist/components/ds-bar-page-title.d.ts +11 -0
  22. package/dist/components/ds-bar-page-title.js +2 -0
  23. package/dist/components/ds-bar-page-title.js.map +1 -0
  24. package/dist/components/ds-bar-title.js +1 -1
  25. package/dist/components/ds-bar-workflow.js +1 -1
  26. package/dist/components/ds-bar-workflow.js.map +1 -1
  27. package/dist/components/ds-button-filled.js +1 -1
  28. package/dist/components/ds-button-unfilled.js +1 -1
  29. package/dist/components/ds-card-chart.js +1 -1
  30. package/dist/components/ds-card-chart.js.map +1 -1
  31. package/dist/components/ds-card-navigation.js +1 -1
  32. package/dist/components/ds-card-navigation.js.map +1 -1
  33. package/dist/components/ds-card-overview.js +1 -1
  34. package/dist/components/ds-card-overview.js.map +1 -1
  35. package/dist/components/ds-card-setting.js +1 -1
  36. package/dist/components/ds-card-setting.js.map +1 -1
  37. package/dist/components/ds-card-settings-scope.js +1 -1
  38. package/dist/components/ds-card-settings-scope.js.map +1 -1
  39. package/dist/components/ds-chart-legend.js +1 -1
  40. package/dist/components/ds-chart-legend.js.map +1 -1
  41. package/dist/components/ds-chart.js +1 -1
  42. package/dist/components/ds-checkbox.js +1 -1
  43. package/dist/components/ds-chip.js +1 -1
  44. package/dist/components/ds-code-block.js +1 -1
  45. package/dist/components/ds-conversation-list-item.js +1 -1
  46. package/dist/components/ds-conversation-list-item.js.map +1 -1
  47. package/dist/components/ds-conversation-list-section.js +1 -1
  48. package/dist/components/ds-empty-state.js +1 -1
  49. package/dist/components/ds-field.js +1 -1
  50. package/dist/components/ds-filter-menu.js +1 -1
  51. package/dist/components/ds-input.js +1 -1
  52. package/dist/components/ds-markdown.js +1 -1
  53. package/dist/components/ds-menu.js +1 -1
  54. package/dist/components/ds-message-actions.js +1 -1
  55. package/dist/components/ds-message-composer.js +1 -1
  56. package/dist/components/ds-message-scroller.js +1 -1
  57. package/dist/components/ds-message.js +1 -1
  58. package/dist/components/ds-mobile-bar-nav.js +1 -1
  59. package/dist/components/ds-mobile-header.js +1 -1
  60. package/dist/components/ds-mobile-section-switcher.js +1 -1
  61. package/dist/components/ds-mobile-sheet-nav.js +1 -1
  62. package/dist/components/ds-modal.js +1 -1
  63. package/dist/components/ds-pagination.js +1 -1
  64. package/dist/components/ds-panel-nav.js +1 -1
  65. package/dist/components/ds-panel-sub-nav.js +1 -1
  66. package/dist/components/ds-panel-sub-nav.js.map +1 -1
  67. package/dist/components/ds-panel-tool-header.js +1 -1
  68. package/dist/components/ds-panel-tool-search.js +1 -1
  69. package/dist/components/ds-panel-tool-search.js.map +1 -1
  70. package/dist/components/ds-panel-tools.js +1 -1
  71. package/dist/components/ds-paper-texture.js +1 -1
  72. package/dist/components/ds-radio.js +1 -1
  73. package/dist/components/ds-score.js +1 -1
  74. package/dist/components/ds-select.js +1 -1
  75. package/dist/components/ds-shell-app.js +1 -1
  76. package/dist/components/ds-shell-app.js.map +1 -1
  77. package/dist/components/ds-shell-page.js +1 -1
  78. package/dist/components/ds-shell-tools.js +1 -1
  79. package/dist/components/ds-skeleton.js +1 -1
  80. package/dist/components/ds-swatch-picker.js +1 -1
  81. package/dist/components/ds-tab-group.js +1 -1
  82. package/dist/components/ds-table-filter.js +1 -1
  83. package/dist/components/ds-table-group.js +1 -1
  84. package/dist/components/ds-table-group.js.map +1 -1
  85. package/dist/components/ds-table-saved-views.js +1 -1
  86. package/dist/components/ds-table-search.js +1 -1
  87. package/dist/components/ds-table-search.js.map +1 -1
  88. package/dist/components/ds-table-sort.js +1 -1
  89. package/dist/components/ds-table-toolbar.js +1 -1
  90. package/dist/components/ds-table.js +1 -1
  91. package/dist/components/ds-table.js.map +1 -1
  92. package/dist/components/ds-tag.js +1 -1
  93. package/dist/components/ds-textarea.js +1 -1
  94. package/dist/components/ds-textarea.js.map +1 -1
  95. package/dist/components/ds-toast.js +1 -1
  96. package/dist/components/ds-toast.js.map +1 -1
  97. package/dist/components/ds-tooltip-chart.js +1 -1
  98. package/dist/components/ds-tooltip.js +1 -1
  99. package/dist/components/ds-typing-indicator.js +1 -1
  100. package/dist/components/p--VKxPUoV.js +2 -0
  101. package/dist/components/p--VKxPUoV.js.map +1 -0
  102. package/dist/components/p-14sMoeTr.js +2 -0
  103. package/dist/components/p-14sMoeTr.js.map +1 -0
  104. package/dist/components/p-9rzbZP-F.js +2 -0
  105. package/dist/components/p-9rzbZP-F.js.map +1 -0
  106. package/dist/components/p-B5W_r4vV.js +2 -0
  107. package/dist/components/p-B5W_r4vV.js.map +1 -0
  108. package/dist/components/{p-DjF2m7bf.js → p-B8ZonS3S.js} +2 -2
  109. package/dist/components/{p-BrW77sNB.js → p-B9WwU5vu.js} +2 -2
  110. package/dist/components/p-BCRPg1Xs.js +2 -0
  111. package/dist/components/p-BCRPg1Xs.js.map +1 -0
  112. package/dist/components/{p-KV3_5Cgo.js → p-BFd18avA.js} +2 -2
  113. package/dist/components/{p-DLDFPn9F.js → p-BGGIEmQj.js} +2 -2
  114. package/dist/components/p-BG_n-zQT.js +2 -0
  115. package/dist/components/p-BG_n-zQT.js.map +1 -0
  116. package/dist/components/p-BINlT3xz.js +2 -0
  117. package/dist/components/p-BINlT3xz.js.map +1 -0
  118. package/dist/components/p-BPTqn5zL.js +2 -0
  119. package/dist/components/p-BPTqn5zL.js.map +1 -0
  120. package/dist/components/p-BnWxbhFP.js +2 -0
  121. package/dist/components/p-BnWxbhFP.js.map +1 -0
  122. package/dist/components/{p-DhibZEq-.js → p-BonnrRtE.js} +2 -2
  123. package/dist/components/p-BxduVc5g.js +2 -0
  124. package/dist/components/p-BxduVc5g.js.map +1 -0
  125. package/dist/components/p-CD9AbaHQ.js +2 -0
  126. package/dist/components/p-CD9AbaHQ.js.map +1 -0
  127. package/dist/components/p-CN3roaMg.js +2 -0
  128. package/dist/components/p-CN3roaMg.js.map +1 -0
  129. package/dist/components/p-CR7G2BI6.js +2 -0
  130. package/dist/components/p-CR7G2BI6.js.map +1 -0
  131. package/dist/components/p-CakRq92x.js +2 -0
  132. package/dist/components/p-CakRq92x.js.map +1 -0
  133. package/dist/components/p-CumGY3uN.js +2 -0
  134. package/dist/components/p-CumGY3uN.js.map +1 -0
  135. package/dist/components/p-D59xX7JN.js +2 -0
  136. package/dist/components/p-D59xX7JN.js.map +1 -0
  137. package/dist/components/p-DFWJmuaR.js +2 -0
  138. package/dist/components/p-DFWJmuaR.js.map +1 -0
  139. package/dist/components/p-DGQUm3WL.js +2 -0
  140. package/dist/components/p-DGQUm3WL.js.map +1 -0
  141. package/dist/components/{p-DmTnBu5r.js → p-DJHshyyC.js} +2 -2
  142. package/dist/components/{p-BtUYEMwA.js → p-DPPM5T7q.js} +2 -2
  143. package/dist/components/p-DVRL3oem.js +2 -0
  144. package/dist/components/p-DVRL3oem.js.map +1 -0
  145. package/dist/components/p-DceM6xWR.js +2 -0
  146. package/dist/components/p-DceM6xWR.js.map +1 -0
  147. package/dist/components/p-Dhw_W8nk.js +2 -0
  148. package/dist/components/p-Dhw_W8nk.js.map +1 -0
  149. package/dist/components/{p-pkGqqLm-.js → p-DwxKwC5i.js} +2 -2
  150. package/dist/components/{p-DnhDgPJv.js → p-DzHXk0IG.js} +2 -2
  151. package/dist/components/p-OHT7lQVt.js +2 -0
  152. package/dist/components/p-OHT7lQVt.js.map +1 -0
  153. package/dist/components/{p-ln3dJxQT.js → p-P60MGUqZ.js} +2 -2
  154. package/dist/components/{p-Bu-gu0mN.js → p-UxIgD24y.js} +2 -2
  155. package/dist/components/{p-BiIDQ5RW.js → p-YFrD62Ml.js} +2 -2
  156. package/dist/components/p-gR6G5azA.js +2 -0
  157. package/dist/components/p-gR6G5azA.js.map +1 -0
  158. package/dist/components/{p-ehZFKett.js → p-oFbI_M5B.js} +2 -2
  159. package/dist/components/p-r5td84fg.js +2 -0
  160. package/dist/components/p-r5td84fg.js.map +1 -0
  161. package/dist/components/p-skVhQk9d.js +2 -0
  162. package/dist/components/p-skVhQk9d.js.map +1 -0
  163. package/dist/components/p-z7Zj26BA.js +2 -0
  164. package/dist/components/p-z7Zj26BA.js.map +1 -0
  165. package/dist/components/{p-YDUM8xDg.js → p-zunBF381.js} +2 -2
  166. package/dist/docs/components.json +584 -38
  167. package/dist/mcp-data/registry/avatar.json +1 -1
  168. package/dist/mcp-data/registry/banner.json +1 -1
  169. package/dist/mcp-data/registry/bar-action.json +5 -5
  170. package/dist/mcp-data/registry/bar-nav.json +1 -1
  171. package/dist/mcp-data/registry/bar-page-title.json +433 -0
  172. package/dist/mcp-data/registry/bar-title.json +21 -5
  173. package/dist/mcp-data/registry/bar-workflow.json +1 -1
  174. package/dist/mcp-data/registry/button-filled.json +1 -1
  175. package/dist/mcp-data/registry/button-unfilled.json +1 -1
  176. package/dist/mcp-data/registry/card-chart.json +1 -1
  177. package/dist/mcp-data/registry/card-navigation.json +1 -1
  178. package/dist/mcp-data/registry/card-overview.json +1 -1
  179. package/dist/mcp-data/registry/card-setting.json +1 -1
  180. package/dist/mcp-data/registry/card-settings-scope.json +23 -5
  181. package/dist/mcp-data/registry/chart-legend.json +1 -1
  182. package/dist/mcp-data/registry/checkbox.json +1 -1
  183. package/dist/mcp-data/registry/chip.json +3 -2
  184. package/dist/mcp-data/registry/conversation-list-item.json +1 -1
  185. package/dist/mcp-data/registry/filter-menu.json +1 -1
  186. package/dist/mcp-data/registry/input.json +1 -1
  187. package/dist/mcp-data/registry/menu.json +1 -1
  188. package/dist/mcp-data/registry/mobile-section-switcher.json +1 -1
  189. package/dist/mcp-data/registry/mobile-sheet-nav.json +1 -1
  190. package/dist/mcp-data/registry/modal.json +1 -1
  191. package/dist/mcp-data/registry/pagination.json +10 -10
  192. package/dist/mcp-data/registry/panel-nav.json +1 -1
  193. package/dist/mcp-data/registry/panel-sub-nav.json +1 -1
  194. package/dist/mcp-data/registry/panel-tool-header.json +1 -1
  195. package/dist/mcp-data/registry/panel-tool-search.json +1 -1
  196. package/dist/mcp-data/registry/panel-tools.json +4 -2
  197. package/dist/mcp-data/registry/radio.json +1 -1
  198. package/dist/mcp-data/registry/registry.json +230 -22
  199. package/dist/mcp-data/registry/select.json +1 -1
  200. package/dist/mcp-data/registry/shell-app.json +9 -7
  201. package/dist/mcp-data/registry/skeleton.json +1 -1
  202. package/dist/mcp-data/registry/tab-group.json +1 -1
  203. package/dist/mcp-data/registry/table-group.json +1 -1
  204. package/dist/mcp-data/registry/table-search.json +1 -1
  205. package/dist/mcp-data/registry/table.json +2 -2
  206. package/dist/mcp-data/registry/tag.json +1 -1
  207. package/dist/mcp-data/registry/textarea.json +1 -1
  208. package/dist/mcp-data/registry/toast.json +1 -1
  209. package/dist/mcp-data/registry/tooltip-chart.json +1 -1
  210. package/dist/mcp-data/registry/tooltip.json +1 -1
  211. package/dist/react/components.d.ts +1 -0
  212. package/dist/react/components.js +1 -0
  213. package/dist/react/ds-bar-page-title.d.ts +14 -0
  214. package/dist/react/ds-bar-page-title.js +16 -0
  215. package/dist/styles/table.css +1 -1
  216. package/dist/types/components/BarPageTitle/BarPageTitle.d.ts +124 -0
  217. package/dist/types/components/BarPageTitle/index.d.ts +2 -0
  218. package/dist/types/components/BarTitle/BarTitle.d.ts +1 -7
  219. package/dist/types/components/BarTitle/bar-title-action-chrome.d.ts +76 -0
  220. package/dist/types/components/BarTitle/bar-title-actions.d.ts +1 -0
  221. package/dist/types/components/BarTitle/bar-title-sections.d.ts +11 -0
  222. package/dist/types/components/CardSettingsScope/CardSettingsScope.d.ts +3 -1
  223. package/dist/types/components/ShellApp/ShellApp.d.ts +1 -0
  224. package/dist/types/components.d.ts +181 -4
  225. package/dist/vue/components.d.ts +1 -0
  226. package/dist/vue/components.js +1 -0
  227. package/dist/vue/ds-bar-page-title.d.ts +3 -0
  228. package/dist/vue/ds-bar-page-title.js +26 -0
  229. package/dist/vue/ds-card-settings-scope.js +1 -0
  230. package/package.json +1 -1
  231. package/dist/components/p-B4ZrhWSH.js +0 -2
  232. package/dist/components/p-B4ZrhWSH.js.map +0 -1
  233. package/dist/components/p-BTsFFzfR.js +0 -2
  234. package/dist/components/p-BTsFFzfR.js.map +0 -1
  235. package/dist/components/p-BpSPAlOx.js +0 -2
  236. package/dist/components/p-BpSPAlOx.js.map +0 -1
  237. package/dist/components/p-C-MaZPyA.js +0 -2
  238. package/dist/components/p-C-MaZPyA.js.map +0 -1
  239. package/dist/components/p-CB5-uIY2.js +0 -2
  240. package/dist/components/p-CB5-uIY2.js.map +0 -1
  241. package/dist/components/p-CG4Fp3SY.js +0 -2
  242. package/dist/components/p-CG4Fp3SY.js.map +0 -1
  243. package/dist/components/p-CHCsDvJK.js +0 -2
  244. package/dist/components/p-CHCsDvJK.js.map +0 -1
  245. package/dist/components/p-CImwNex7.js +0 -2
  246. package/dist/components/p-CImwNex7.js.map +0 -1
  247. package/dist/components/p-CNZwk176.js +0 -2
  248. package/dist/components/p-CNZwk176.js.map +0 -1
  249. package/dist/components/p-CSZlbQ8_.js +0 -2
  250. package/dist/components/p-CSZlbQ8_.js.map +0 -1
  251. package/dist/components/p-CVNYRTEH.js +0 -2
  252. package/dist/components/p-CVNYRTEH.js.map +0 -1
  253. package/dist/components/p-D3sJXjcg.js +0 -2
  254. package/dist/components/p-D3sJXjcg.js.map +0 -1
  255. package/dist/components/p-DFOhxUQP.js +0 -2
  256. package/dist/components/p-DFOhxUQP.js.map +0 -1
  257. package/dist/components/p-DI7qbahC.js +0 -2
  258. package/dist/components/p-DI7qbahC.js.map +0 -1
  259. package/dist/components/p-DP75OhfU.js +0 -2
  260. package/dist/components/p-DP75OhfU.js.map +0 -1
  261. package/dist/components/p-DR1jV6Q5.js +0 -2
  262. package/dist/components/p-DR1jV6Q5.js.map +0 -1
  263. package/dist/components/p-DuJuqbcg.js +0 -2
  264. package/dist/components/p-DuJuqbcg.js.map +0 -1
  265. package/dist/components/p-E3RCUE7a.js +0 -2
  266. package/dist/components/p-E3RCUE7a.js.map +0 -1
  267. package/dist/components/p-JuKGR7Ay.js +0 -2
  268. package/dist/components/p-JuKGR7Ay.js.map +0 -1
  269. package/dist/components/p-MuZ6B9gu.js +0 -2
  270. package/dist/components/p-MuZ6B9gu.js.map +0 -1
  271. package/dist/components/p-Ui0Ir5li.js +0 -2
  272. package/dist/components/p-Ui0Ir5li.js.map +0 -1
  273. package/dist/components/p-eAX_M_QY.js +0 -2
  274. package/dist/components/p-eAX_M_QY.js.map +0 -1
  275. package/dist/components/p-eaCtnww1.js +0 -2
  276. package/dist/components/p-eaCtnww1.js.map +0 -1
  277. /package/dist/components/{p-DjF2m7bf.js.map → p-B8ZonS3S.js.map} +0 -0
  278. /package/dist/components/{p-BrW77sNB.js.map → p-B9WwU5vu.js.map} +0 -0
  279. /package/dist/components/{p-KV3_5Cgo.js.map → p-BFd18avA.js.map} +0 -0
  280. /package/dist/components/{p-DLDFPn9F.js.map → p-BGGIEmQj.js.map} +0 -0
  281. /package/dist/components/{p-DhibZEq-.js.map → p-BonnrRtE.js.map} +0 -0
  282. /package/dist/components/{p-DmTnBu5r.js.map → p-DJHshyyC.js.map} +0 -0
  283. /package/dist/components/{p-BtUYEMwA.js.map → p-DPPM5T7q.js.map} +0 -0
  284. /package/dist/components/{p-pkGqqLm-.js.map → p-DwxKwC5i.js.map} +0 -0
  285. /package/dist/components/{p-DnhDgPJv.js.map → p-DzHXk0IG.js.map} +0 -0
  286. /package/dist/components/{p-ln3dJxQT.js.map → p-P60MGUqZ.js.map} +0 -0
  287. /package/dist/components/{p-Bu-gu0mN.js.map → p-UxIgD24y.js.map} +0 -0
  288. /package/dist/components/{p-BiIDQ5RW.js.map → p-YFrD62Ml.js.map} +0 -0
  289. /package/dist/components/{p-ehZFKett.js.map → p-oFbI_M5B.js.map} +0 -0
  290. /package/dist/components/{p-YDUM8xDg.js.map → p-zunBF381.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SelectController","constructor","state","this","triggerEl","popupEl","searchEl","typeahead","typeaheadTimer","outsideHandler","setTriggerElement","element","setPopupElement","setSearchElement","handleTriggerKeyDown","event","open","includes","key","preventDefault","openPopup","isTypeaheadKey","searchable","searchTerm","handleTypeahead","handleListKeyDown","focusRingVisible","activeIndex","moveChoiceIndex","options","enabledChoiceIndexes","enabled","length","target","Node","contains","option","selectOption","closePopup","position","AnchoredPositionController","getAnchor","getPopup","measure","trigger","popup","isConnected","host","sectionPadding","resolveCssLengthPx","TOKEN_DEFAULTS","space050","style","minWidth","menuWidthXs","choicePopupMinWidth","offsetWidth","align","popupAlign","anchorRect","getBoundingClientRect","popupWidth","popupHeight","offsetHeight","side","sideOffsetPx","alignOffsetPx","resolveChoicePopupAlignOffset","sectionInsetPx","viewportPadPx","viewportWidth","window","innerWidth","viewportHeight","innerHeight","collisionRect","resolveAnchoredOverlayBoundaryRect","boundary","apply","x","y","positionReady","topLayer","activeOptionId","isLoading","generatedId","undefined","connect","openChanged","disconnect","cancelPositionRetry","unbindPopupListeners","clearTimeout","setFocus","focus","optionsChanged","requestAnimationFrame","updatePosition","loadingChanged","positionChanged","bindPopupListeners","schedulePositionUpdate","scrollActiveOptionIntoView","searchChanged","activeIndexChanged","focusVisible","edge","isDisabled","preferredIndex","restoreFocus","focusSearchOrTrigger","metaKey","ctrlKey","altKey","normalized","toLocaleLowerCase","repeatedCharacter","every","character","match","findChoiceTypeaheadMatch","resetMs","resolveCssTimeMs","animationDurationMedium1","setTimeout","querySelector","scrollIntoView","block","inline","eventIntersectsComposedBoundary","document","addEventListener","observe","removeEventListener","unobserve","cancel","onReady","schedule","update","selectCss","ICON_SIZE","lg","md","sm","xs","OPTION_ACTION_SIZE","selectId","Select","__stencil_proxyCustomElement","HTMLElement","registerHost","sections","multiple","value","disabled","required","requiredMessage","DEFAULT_REQUIRED_MESSAGE","placeholder","triggerLabelPlaceholder","dot","size","width","isInactive","activeFill","collapseLabel","hasBorder","indicator","allowClear","clearLabel","selectedLabel","searchPlaceholder","noResultsText","loadingLabel","error","ariaLabel","formDisabled","compactFooterSummary","captionCompact","listboxId","errorId","initialValue","controller","createController","hasLoaded","clearSelection","stopPropagation","dsChange","emit","dsClear","visibleOptions","activateFooterAction","dsFooterAction","owner","el","findIndex","scalarValue","componentWillLoad","normalizeValueForMode","Array","isArray","syncFormValue","componentDidLoad","observeFooterContent","syncCaptionCompactObserver","connectedCallback","componentDidRender","scheduleFooterSummaryMeasurement","disconnectedCallback","footerResizeObserver","observedFooterContentElement","footerMeasurementFrame","cancelAnimationFrame","disconnectCaptionCompactObserver","onCollapseLabelChange","inactive","values","resolvedValues","setRepeatedFormControlValue","internals","name","hasSelection","setFormControlValue","missing","setRequiredValidity","onLoadingChange","onPopupAlignChange","onOpenChange","dsOpenChange","onSearchTermChange","onActiveIndexChange","formDisabledCallback","formResetCallback","formStateRestoreCallback","restoreStringFormState","restoreStringArrayFormState","allSections","resolveChoiceSections","allOptions","flattenChoiceSections","visibleSections","filterChoiceSections","valid","Set","map","filter","has","selectedOption","find","Boolean","popupRole","some","action","content","footerContentElement","ResizeObserver","measureFooterSummary","summary","footerSummaryMeasureElement","clear","footerClearElement","styles","getComputedStyle","clientWidth","Number","parseFloat","paddingInlineStart","paddingInlineEnd","requiredWidth","columnGap","nextCompact","current","next","renderOption","index","usesIcons","usesSubtext","selected","active","actionId","h","ChoiceOptionRow","id","actionOpen","surfaceOpen","expanded","leading","class","label","checked","presentation","icon","color","supporting","subtextActions","actionIndex","as","variant","CONTROL_SUPPORTING_TEXT_VARIANT","type","tone","onKeyDown","onClick","dsOptionSubtextAction","actionValue","originalEvent","rounded","haspopup","controls","onDsClick","dsOptionAction","anchorId","detail","onHover","onSelect","captionIconOnly","captionCompactDisconnect","observeTableCaptionCompact","compact","renderCaptionTooltip","render","showPlaceholder","count","triggerLabel","textVariant","CONTROL_TEXT_VARIANT","iconSize","usesOptionIcons","choiceListUsesIcons","usesOptionSubtext","choiceListUsesSubtext","showError","errorMessage","describedBy","ariaDescribedby","join","popupStyle","left","top","transform","Math","round","zIndex","visibility","flatIndex","Host","controlWidthClass","background","ref","inputId","choiceBackgroundClassMap","role","String","ariaLabelledby","shiftKey","getElementById","lineTruncation","hasRing","trim","popover","ChoiceSearch","activeDescendant","inputRef","onValueChange","body","section","sectionIndex","divider","header","emphasis","footerActionLabel","ChoiceActionFooter","onAction","ChoiceFooter","compactSummary","useCompactSummary","contentRef","summaryMeasureRef","clearRef","onClear","textId"],"sources":["src/wc/utils/select-controller.ts","src/wc/components/Select/Select.css?tag=ds-select&encapsulation=scoped","src/wc/components/Select/Select.tsx"],"sourcesContent":["import { AnchoredPositionController } from './anchored-position-controller';\nimport {\n enabledChoiceIndexes,\n findChoiceTypeaheadMatch,\n moveChoiceIndex,\n type ChoiceOption,\n} from './choice-list';\nimport { choicePopupMinWidth, resolveChoicePopupAlignOffset } from './choice-popup-alignment';\nimport { resolveCssLengthPx } from './resolve-css-length-px';\nimport { resolveCssTimeMs } from './resolve-css-time-ms';\nimport { TOKEN_DEFAULTS } from './token-defaults';\nimport { eventIntersectsComposedBoundary } from './anchored-overlay-interaction-controller';\nimport { resolveAnchoredOverlayBoundaryRect } from './anchored-overlay-boundary';\n\ntype PopupPosition = { x: number; y: number };\n\nexport interface SelectControllerState<T extends ChoiceOption> {\n readonly host: HTMLElement;\n readonly generatedId: string;\n readonly options: T[];\n readonly searchable: boolean;\n readonly isLoading: boolean;\n readonly isDisabled: boolean;\n readonly preferredIndex: number;\n readonly popupAlign: 'start' | 'end';\n readonly boundary: HTMLElement | undefined;\n open: boolean;\n activeIndex: number;\n searchTerm: string;\n focusRingVisible: boolean;\n position: PopupPosition;\n positionReady: boolean;\n selectOption(option: T): void;\n}\n\n/**\n * Shared single/multiple Select interaction controller.\n *\n * Decorated Stencil state and scalar/array selection remain in each component;\n * this controller owns only popup lifecycle, focus, positioning, typeahead,\n * and listbox keyboard traversal. Anchored placement is delegated to\n * `AnchoredPositionController`; only the choice-cell measurement stays here.\n */\nexport class SelectController<T extends ChoiceOption> {\n private triggerEl: HTMLButtonElement | null = null;\n private popupEl: HTMLDivElement | null = null;\n private searchEl: HTMLDsInputElement | null = null;\n private typeahead = '';\n private typeaheadTimer: ReturnType<typeof setTimeout> | null = null;\n private outsideHandler: ((event: MouseEvent) => void) | null = null;\n private readonly position: AnchoredPositionController;\n\n constructor(private readonly state: SelectControllerState<T>) {\n this.position = new AnchoredPositionController({\n getAnchor: () => this.triggerEl,\n getPopup: () => this.popupEl,\n measure: (trigger, popup) => {\n if (!this.state.open || !popup.isConnected || !this.state.host.contains(popup)) return null;\n\n const sectionPadding = resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n popup.style.minWidth = `max(var(--ds-choice-popup-min-inline-size, ${TOKEN_DEFAULTS.menuWidthXs}), ${choicePopupMinWidth(trigger.offsetWidth, sectionPadding)}px)`;\n\n const align = this.state.popupAlign;\n return {\n anchorRect: trigger.getBoundingClientRect(),\n popupWidth: popup.offsetWidth,\n popupHeight: popup.offsetHeight,\n side: 'bottom',\n align,\n sideOffsetPx: sectionPadding,\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align,\n alignOffsetPx: 0,\n sectionInsetPx: sectionPadding,\n }),\n viewportPadPx: sectionPadding,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n collisionRect: resolveAnchoredOverlayBoundaryRect(trigger, this.state.boundary),\n };\n },\n apply: ({ x, y }) => {\n this.state.position = { x, y };\n this.state.positionReady = true;\n },\n topLayer: true,\n });\n }\n\n get activeOptionId(): string | undefined {\n return !this.state.isLoading && this.state.activeIndex >= 0\n ? `${this.state.generatedId}-option-${this.state.activeIndex}`\n : undefined;\n }\n\n setTriggerElement = (element: HTMLButtonElement | null) => {\n this.triggerEl = element;\n };\n\n setPopupElement = (element: HTMLDivElement | null) => {\n this.popupEl = element;\n };\n\n setSearchElement = (element: HTMLDsInputElement | null) => {\n this.searchEl = element;\n };\n\n connect() {\n if (this.state.open) this.openChanged(true);\n }\n\n disconnect() {\n this.cancelPositionRetry();\n this.unbindPopupListeners();\n if (this.typeaheadTimer) clearTimeout(this.typeaheadTimer);\n }\n\n setFocus() {\n this.triggerEl?.focus();\n }\n\n optionsChanged() {\n if (!this.state.open) return;\n const enabled = enabledChoiceIndexes(this.state.options);\n if (!enabled.includes(this.state.activeIndex)) this.state.activeIndex = enabled[0] ?? -1;\n requestAnimationFrame(() => this.updatePosition());\n }\n\n loadingChanged() {\n if (this.state.open) requestAnimationFrame(() => this.updatePosition());\n }\n\n positionChanged() {\n if (this.state.open) requestAnimationFrame(() => this.updatePosition());\n }\n\n openChanged(open: boolean) {\n if (open) {\n this.bindPopupListeners();\n this.schedulePositionUpdate(() => {\n this.scrollActiveOptionIntoView();\n if (this.state.searchable) void this.searchEl?.setFocus();\n });\n return;\n }\n this.cancelPositionRetry();\n this.unbindPopupListeners();\n this.state.searchTerm = '';\n this.state.positionReady = false;\n }\n\n searchChanged() {\n this.state.activeIndex = enabledChoiceIndexes(this.state.options)[0] ?? -1;\n requestAnimationFrame(() => {\n this.updatePosition();\n this.scrollActiveOptionIntoView();\n });\n }\n\n activeIndexChanged() {\n requestAnimationFrame(() => this.scrollActiveOptionIntoView());\n }\n\n openPopup(focusVisible: boolean, edge?: 'first' | 'last') {\n if (this.state.isDisabled || (!this.state.options.length && !this.state.isLoading)) return;\n const enabled = enabledChoiceIndexes(this.state.options);\n this.state.activeIndex =\n edge === 'last'\n ? (enabled[enabled.length - 1] ?? -1)\n : this.state.preferredIndex >= 0\n ? this.state.preferredIndex\n : (enabled[0] ?? -1);\n this.state.focusRingVisible = focusVisible;\n this.state.open = true;\n }\n\n closePopup(restoreFocus = false) {\n if (!this.state.open) return;\n this.state.open = false;\n if (restoreFocus) requestAnimationFrame(() => this.triggerEl?.focus());\n }\n\n focusSearchOrTrigger() {\n requestAnimationFrame(() => {\n if (this.state.searchable) void this.searchEl?.setFocus();\n else this.triggerEl?.focus();\n });\n }\n\n handleTriggerKeyDown = (event: KeyboardEvent) => {\n if (!this.state.open) {\n if (['ArrowDown', 'ArrowUp', 'Enter', ' '].includes(event.key)) {\n event.preventDefault();\n this.openPopup(true, event.key === 'ArrowUp' ? 'last' : 'first');\n } else if (this.isTypeaheadKey(event)) {\n event.preventDefault();\n this.openPopup(true);\n if (this.state.searchable) this.state.searchTerm = event.key;\n else this.handleTypeahead(event.key);\n }\n return;\n }\n this.handleListKeyDown(event);\n };\n\n handleListKeyDown = (event: KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n this.state.focusRingVisible = true;\n this.state.activeIndex = moveChoiceIndex(this.state.options, this.state.activeIndex, 1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n this.state.focusRingVisible = true;\n this.state.activeIndex = moveChoiceIndex(this.state.options, this.state.activeIndex, -1);\n break;\n case 'Home':\n event.preventDefault();\n this.state.focusRingVisible = true;\n this.state.activeIndex = enabledChoiceIndexes(this.state.options)[0] ?? -1;\n break;\n case 'End': {\n event.preventDefault();\n this.state.focusRingVisible = true;\n const enabled = enabledChoiceIndexes(this.state.options);\n this.state.activeIndex = enabled[enabled.length - 1] ?? -1;\n break;\n }\n case 'Enter':\n case ' ': {\n if (\n event.key === ' ' &&\n this.state.searchable &&\n event.target instanceof Node &&\n this.searchEl?.contains(event.target)\n )\n break;\n event.preventDefault();\n const option = this.state.options[this.state.activeIndex];\n if (option) this.state.selectOption(option);\n break;\n }\n case 'Escape':\n event.preventDefault();\n this.closePopup(true);\n break;\n case 'Tab':\n this.closePopup();\n break;\n default:\n if (!this.state.searchable && this.isTypeaheadKey(event)) {\n this.handleTypeahead(event.key);\n }\n }\n };\n\n private isTypeaheadKey(event: KeyboardEvent) {\n return event.key.length === 1 && !event.metaKey && !event.ctrlKey && !event.altKey;\n }\n\n private handleTypeahead(key: string) {\n if (this.typeaheadTimer) clearTimeout(this.typeaheadTimer);\n this.state.focusRingVisible = true;\n const normalized = key.toLocaleLowerCase();\n const repeatedCharacter =\n this.typeahead.length > 0 && [...this.typeahead].every(character => character === normalized);\n this.typeahead = repeatedCharacter ? normalized : `${this.typeahead}${normalized}`;\n const match = findChoiceTypeaheadMatch(\n this.state.options,\n this.typeahead,\n this.state.activeIndex\n );\n if (match >= 0) this.state.activeIndex = match;\n const resetMs = resolveCssTimeMs(\n TOKEN_DEFAULTS.animationDurationMedium1,\n TOKEN_DEFAULTS.animationDurationMedium1\n );\n this.typeaheadTimer = setTimeout(() => {\n this.typeahead = '';\n this.typeaheadTimer = null;\n }, resetMs);\n }\n\n private scrollActiveOptionIntoView() {\n if (!this.state.open || !this.activeOptionId) return;\n this.state.host\n .querySelector<HTMLElement>(`#${this.activeOptionId}`)\n ?.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n }\n\n private bindPopupListeners() {\n this.unbindPopupListeners();\n this.outsideHandler = event => {\n if (eventIntersectsComposedBoundary(event, this.state.host)) return;\n this.closePopup();\n };\n document.addEventListener('mousedown', this.outsideHandler, true);\n this.position.observe();\n }\n\n private unbindPopupListeners() {\n if (this.outsideHandler) {\n document.removeEventListener('mousedown', this.outsideHandler, true);\n this.outsideHandler = null;\n }\n this.position.unobserve();\n }\n\n private cancelPositionRetry() {\n this.position.cancel();\n }\n\n private schedulePositionUpdate(onReady?: () => void) {\n if (!this.state.open) return;\n this.state.positionReady = false;\n this.position.schedule(onReady);\n }\n\n private updatePosition(): boolean {\n return this.position.update();\n }\n}\n","@import '../../utils/radius.css';\n@import '../../utils/choice-list.css';\n@import '../../utils/control-parts.css';\n@import '../../utils/control-width.css';\n@import '../../utils/field-stack.css';\n@import '../../utils/search-control.css';\n@import '../../utils/select-trigger.css';\n@import '../../utils/table-caption-control.css';\n@import '../../utils/typography.css';\n@import '../../styles/control-elevation.css';\n\n.wrapper--error {\n --ds-interaction-border-width: var(--dimension-stroke-width-018);\n --ds-interaction-border-color: var(--color-border-bold-negative);\n}\n\n.select-popup {\n color: var(--color-foreground-secondary);\n}\n\n.select-option[aria-selected='true'] .ds-choice-item__icon {\n color: var(--color-foreground-primary);\n}\n\n.select-option-row {\n position: relative;\n isolation: isolate;\n}\n\n.select-option-row__action {\n position: absolute;\n top: 50%;\n right: var(--dimension-space-050);\n z-index: var(--dimension-z-index-floating);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--dimension-radius-half);\n background: var(--color-background-transparent);\n -webkit-backdrop-filter: blur(var(--effect-blur-sm));\n backdrop-filter: blur(var(--effect-blur-sm));\n opacity: 0;\n pointer-events: none;\n transform: translateY(-50%);\n}\n\n.select-option-row:has(:focus-visible) .select-option-row__action,\n.select-option-row--action-open .select-option-row__action,\n.select-option-row--keyboard-active .select-option-row__action {\n opacity: 1;\n pointer-events: auto;\n}\n\n.select-option-row--action-open .select-option::after {\n background: var(--ds-interaction-hover);\n}\n\n.select-option__subtext-actions {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-050);\n min-inline-size: 0;\n color: var(--color-foreground-secondary);\n}\n\n.select-option__subtext-action {\n appearance: none;\n display: inline-flex;\n align-items: center;\n padding: 0;\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n cursor: pointer;\n}\n\n.select-option__subtext-action--negative {\n --ds-text-action-foreground: var(--color-foreground-bold-negative);\n}\n\n.select-option__subtext-action-separator {\n color: var(--color-foreground-tertiary);\n pointer-events: none;\n}\n\n@media (hover: hover) and (pointer: fine) {\n .select-option-row:hover .select-option-row__action {\n opacity: 1;\n pointer-events: auto;\n }\n\n .select-option-row:hover .select-option::after {\n background: var(--ds-interaction-hover);\n }\n}\n\n@media (hover: none) {\n .select-option-row__action {\n opacity: 1;\n pointer-events: auto;\n }\n\n .select-option-row--has-action .ds-choice-item__content {\n padding-inline-end: var(--dimension-size-400);\n }\n}\n\n.error-text {\n width: 100%;\n}\n","import {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n type VNode,\n Watch,\n} from '@stencil/core';\nimport {\n controlWidthClass,\n CONTROL_SUPPORTING_TEXT_VARIANT,\n CONTROL_TEXT_VARIANT,\n DEFAULT_REQUIRED_MESSAGE,\n restoreStringArrayFormState,\n restoreStringFormState,\n setFormControlValue,\n setRepeatedFormControlValue,\n setRequiredValidity,\n type ControlWidth,\n} from '../../utils';\nimport {\n ChoiceActionFooter,\n ChoiceFooter,\n ChoiceOptionRow,\n ChoiceSearch,\n} from '../../utils/choice-list-parts';\nimport {\n choiceBackgroundClassMap,\n choiceListUsesIcons,\n choiceListUsesSubtext,\n enabledChoiceIndexes,\n filterChoiceSections,\n flattenChoiceSections,\n resolveChoiceSections,\n type ChoiceBackground,\n type ChoiceOption,\n type ChoiceSection,\n} from '../../utils/choice-list';\nimport { SelectController } from '../../utils/select-controller';\nimport { observeTableCaptionCompact } from '../../utils/table-caption-compact';\n\nexport type SelectOption = ChoiceOption;\nexport type SelectSection = ChoiceSection;\nexport type SelectBackground = ChoiceBackground;\nexport type SelectSize = 'lg' | 'md' | 'sm' | 'xs';\nexport type SelectWidth = ControlWidth;\nexport type SelectPopupAlign = 'start' | 'end';\nexport type SelectValue = string | string[];\nexport type SelectIndicator = 'down' | 'up-down';\n\nexport interface SelectOptionActionDetail {\n value: string;\n anchorId: string;\n originalEvent: MouseEvent;\n}\n\nexport interface SelectOptionSubtextActionDetail {\n value: string;\n actionValue: string;\n originalEvent: MouseEvent;\n}\n\nconst ICON_SIZE: Record<SelectSize, 'lg' | 'md' | 'sm' | 'xs'> = {\n lg: 'lg',\n md: 'md',\n sm: 'sm',\n xs: 'xs',\n};\n\nconst OPTION_ACTION_SIZE: Record<SelectSize, 'md' | 'sm' | 'xs'> = {\n lg: 'md',\n md: 'sm',\n sm: 'xs',\n xs: 'xs',\n};\n\nlet selectId = 0;\n\n@Component({\n tag: 'ds-select',\n styleUrl: 'Select.css',\n scoped: true,\n formAssociated: true,\n})\nexport class Select {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n /** Flat choices. Assign arrays through the JavaScript property. */\n @Prop() options: SelectOption[] = [];\n /** Grouped choices; takes precedence over options. Assign through JavaScript. */\n @Prop() sections: SelectSection[] = [];\n /** Enable independent multi-value selection while keeping the popup open. */\n @Prop({ reflect: true }) multiple: boolean = false;\n /** Selected scalar or array value according to `multiple`. */\n @Prop({ mutable: true }) value: SelectValue = '';\n /** Controlled popup visibility. */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n /** Native form field name. */\n @Prop({ reflect: true }) name: string | undefined;\n /** Native disabled state. */\n @Prop({ reflect: true }) disabled: boolean = false;\n /** Require one valid selected value. */\n @Prop({ reflect: true }) required: boolean = false;\n /** Validation message used when required is missing. */\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n /** Trigger text shown when no valid value is selected. */\n @Prop() placeholder: string = 'Select';\n /** Optional scalar-mode trigger text that does not change the selected option label. */\n @Prop() triggerLabel: string | undefined;\n /** Present triggerLabel with placeholder emphasis while preserving the selected value. */\n @Prop() triggerLabelPlaceholder: boolean = false;\n /** Show a supplemental notification dot beside the trigger label. */\n @Prop() dot: boolean = false;\n /** Control density. */\n @Prop() size: SelectSize = 'md';\n /** Width fit — hug content (default) or fill the parent. */\n @Prop() width: SelectWidth = 'hug';\n /** Align the popup's choice edge to the trigger start or end edge. */\n @Prop() popupAlign: SelectPopupAlign = 'start';\n /** Explicit collision owner; otherwise the nearest data-ds-overlay-boundary ancestor is used. */\n @Prop() boundary: HTMLElement | undefined;\n /** Shared inactive treatment; removes interaction and form submission. */\n @Prop() isInactive: boolean = false;\n /** Replace the prefix with a loader and disable option interaction. */\n @Prop() isLoading: boolean = false;\n /** Show the selected interaction fill when a valid value exists. */\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 /** Show the surface-aware inset border, including focused and invalid strokes. */\n @Prop() hasBorder: boolean = true;\n /** Optional trigger prefix icon name. */\n @Prop() icon: string | undefined;\n /** Trailing choice indicator. Use up-down for compact value steppers such as page size. */\n @Prop() indicator: SelectIndicator = 'down';\n /** Show the clear footer action when a value exists. */\n @Prop() allowClear: boolean = true;\n /** Localized clear action label. */\n @Prop() clearLabel: string = 'Clear';\n /** Localized noun displayed after the selected count in multiple mode. */\n @Prop() selectedLabel: string = 'selected';\n /** Optional text action shown in the popup footer instead of the clear action. */\n @Prop() footerActionLabel: string | undefined;\n /** Show immediate local filtering over option labels, subtext, and section headings. */\n @Prop() searchable: boolean = false;\n /** Localized search-field placeholder and accessible name. */\n @Prop() searchPlaceholder: string = 'Search';\n /** Localized empty-filter result text. */\n @Prop() noResultsText: string = 'No results found';\n /** Accessible loading status label. */\n @Prop() loadingLabel: string = 'Loading';\n /** Actual parent surface context; omit on primary and secondary surfaces. */\n @Prop() background: SelectBackground | undefined;\n /** Show invalid visual state. */\n @Prop() error: boolean = false;\n /** Error text rendered below the trigger when error is true. */\n @Prop() errorMessage: string | undefined;\n /** ID applied to the internal combobox trigger for external labels. */\n @Prop() inputId: string | undefined;\n /** Direct accessible name when no external label is available. */\n @Prop({ attribute: 'aria-label' }) ariaLabel: string | null = null;\n /** IDs of elements that label the combobox. */\n @Prop({ attribute: 'aria-labelledby' }) ariaLabelledby: string | undefined;\n /** Additional IDs that describe the combobox. */\n @Prop({ attribute: 'aria-describedby' }) ariaDescribedby: string | undefined;\n\n /** Emitted after selection or clearing with the next scalar or array value. */\n @Event() dsChange!: EventEmitter<SelectValue>;\n /** Emitted after the footer clear action. */\n @Event() dsClear!: EventEmitter<void>;\n /** Emitted whenever popup visibility changes. */\n @Event() dsOpenChange!: EventEmitter<boolean>;\n /** Emitted when the optional popup footer action is activated. */\n @Event() dsFooterAction!: EventEmitter<void>;\n /** Emitted when an option's contextual ellipsis action is activated. */\n @Event() dsOptionAction!: EventEmitter<SelectOptionActionDetail>;\n /** Emitted when an option's supporting text action is activated. */\n @Event() dsOptionSubtextAction!: EventEmitter<SelectOptionSubtextActionDetail>;\n\n @State() private activeIndex = -1;\n @State() private searchTerm = '';\n @State() private formDisabled = false;\n @State() private position = { x: 0, y: 0 };\n @State() private positionReady = false;\n @State() private focusRingVisible = false;\n @State() private compactFooterSummary = false;\n @State() private captionCompact = false;\n\n private readonly generatedId = `ds-select-${++selectId}`;\n private readonly listboxId = `${this.generatedId}-listbox`;\n private readonly errorId = `${this.generatedId}-error`;\n private initialValue: SelectValue = '';\n private readonly controller = this.createController();\n private footerContentElement?: HTMLDivElement;\n private footerSummaryMeasureElement?: HTMLElement;\n private footerClearElement?: HTMLButtonElement;\n private footerResizeObserver?: ResizeObserver;\n private observedFooterContentElement?: HTMLDivElement;\n private footerMeasurementFrame?: number;\n private captionCompactDisconnect: (() => void) | undefined;\n private hasLoaded = false;\n\n private createController() {\n // eslint-disable-next-line @typescript-eslint/no-this-alias -- adapter getters preserve reactive component ownership without inheritance.\n const owner = this;\n return new SelectController<SelectOption>({\n get host() {\n return owner.el;\n },\n generatedId: owner.generatedId,\n get options() {\n return owner.visibleOptions;\n },\n get searchable() {\n return owner.searchable;\n },\n get isLoading() {\n return owner.isLoading;\n },\n get isDisabled() {\n return owner.isDisabled;\n },\n get preferredIndex() {\n if (owner.multiple) return -1;\n return owner.visibleOptions.findIndex(\n option => option.value === owner.scalarValue && !option.isInactive\n );\n },\n get popupAlign() {\n return owner.popupAlign;\n },\n get boundary() {\n return owner.boundary;\n },\n get open() {\n return owner.open;\n },\n set open(value) {\n owner.open = value;\n },\n get activeIndex() {\n return owner.activeIndex;\n },\n set activeIndex(value) {\n owner.activeIndex = value;\n },\n get searchTerm() {\n return owner.searchTerm;\n },\n set searchTerm(value) {\n owner.searchTerm = value;\n },\n get focusRingVisible() {\n return owner.focusRingVisible;\n },\n set focusRingVisible(value) {\n owner.focusRingVisible = value;\n },\n get position() {\n return owner.position;\n },\n set position(value) {\n owner.position = value;\n },\n get positionReady() {\n return owner.positionReady;\n },\n set positionReady(value) {\n owner.positionReady = value;\n },\n selectOption: option => owner.selectOption(option),\n });\n }\n\n componentWillLoad() {\n this.value = this.normalizeValueForMode(this.value);\n this.initialValue = Array.isArray(this.value) ? [...this.value] : this.value;\n this.syncFormValue();\n }\n\n componentDidLoad() {\n this.hasLoaded = true;\n this.controller.connect();\n this.observeFooterContent();\n this.syncCaptionCompactObserver();\n }\n\n connectedCallback() {\n if (!this.hasLoaded) return;\n this.controller.connect();\n this.observeFooterContent();\n this.syncCaptionCompactObserver();\n }\n\n componentDidRender() {\n this.observeFooterContent();\n this.scheduleFooterSummaryMeasurement();\n }\n\n disconnectedCallback() {\n this.controller.disconnect();\n this.footerResizeObserver?.disconnect();\n this.observedFooterContentElement = undefined;\n if (this.footerMeasurementFrame !== undefined) {\n cancelAnimationFrame(this.footerMeasurementFrame);\n this.footerMeasurementFrame = undefined;\n }\n this.disconnectCaptionCompactObserver();\n }\n\n @Watch('collapseLabel')\n onCollapseLabelChange() {\n this.syncCaptionCompactObserver();\n }\n\n @Watch('value')\n @Watch('multiple')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('required')\n @Watch('name')\n @Watch('options')\n @Watch('sections')\n syncFormValue() {\n if (\n (this.multiple && !Array.isArray(this.value)) ||\n (!this.multiple && Array.isArray(this.value))\n ) {\n this.value = this.normalizeValueForMode(this.value);\n }\n const inactive = this.isDisabled;\n if (this.multiple) {\n const values = this.resolvedValues;\n setRepeatedFormControlValue(this.internals, this.name, values, { inactive });\n } else {\n const value = this.hasSelection ? this.scalarValue : '';\n setFormControlValue(this.internals, value, { inactive });\n }\n const missing = this.required && !inactive && !this.hasSelection;\n setRequiredValidity(this.internals, missing, this.requiredMessage);\n this.controller.optionsChanged();\n }\n\n @Watch('isLoading')\n onLoadingChange() {\n this.controller.loadingChanged();\n }\n\n @Watch('popupAlign')\n @Watch('boundary')\n onPopupAlignChange() {\n this.controller.positionChanged();\n }\n\n @Watch('open')\n onOpenChange(open: boolean) {\n this.dsOpenChange.emit(open);\n this.controller.openChanged(open);\n }\n\n @Watch('searchTerm')\n onSearchTermChange() {\n this.controller.searchChanged();\n }\n\n @Watch('activeIndex')\n onActiveIndexChange() {\n this.controller.activeIndexChanged();\n }\n\n formDisabledCallback(disabled: boolean) {\n this.formDisabled = disabled;\n this.syncFormValue();\n }\n\n formResetCallback() {\n this.value = this.normalizeValueForMode(this.initialValue);\n this.closePopup();\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n if (!this.multiple) {\n this.value = restoreStringFormState(state);\n return;\n }\n this.value = restoreStringArrayFormState(state);\n }\n\n @Method()\n async setFocus() {\n this.controller.setFocus();\n }\n\n private get isDisabled(): boolean {\n return this.disabled || this.isInactive || this.formDisabled;\n }\n\n private normalizeValueForMode(value: SelectValue): SelectValue {\n if (this.multiple) {\n return Array.isArray(value) ? [...value] : value ? [value] : [];\n }\n return Array.isArray(value) ? (value[0] ?? '') : value;\n }\n\n private get allSections(): SelectSection[] {\n return resolveChoiceSections(this.options, this.sections);\n }\n\n private get allOptions(): SelectOption[] {\n return flattenChoiceSections(this.allSections);\n }\n\n private get visibleSections(): SelectSection[] {\n return this.searchable\n ? filterChoiceSections(this.allSections, this.searchTerm)\n : this.allSections;\n }\n\n private get visibleOptions(): SelectOption[] {\n return flattenChoiceSections(this.visibleSections);\n }\n\n private get scalarValue(): string {\n return typeof this.value === 'string' ? this.value : '';\n }\n\n private get resolvedValues(): string[] {\n if (!this.multiple || !Array.isArray(this.value)) return [];\n const valid = new Set(this.allOptions.map(option => option.value));\n return [...new Set(this.value.filter(value => valid.has(value)))];\n }\n\n private get selectedOption(): SelectOption | undefined {\n if (this.multiple) return undefined;\n return this.allOptions.find(option => option.value === this.scalarValue);\n }\n\n private get hasSelection(): boolean {\n return this.multiple ? this.resolvedValues.length > 0 : Boolean(this.selectedOption);\n }\n\n private get activeOptionId(): string | undefined {\n return this.controller.activeOptionId;\n }\n\n private get popupRole(): 'listbox' | 'grid' {\n return this.allOptions.some(option => Boolean(option.action)) ? 'grid' : 'listbox';\n }\n\n private observeFooterContent() {\n const content =\n this.open && this.multiple && this.hasSelection ? this.footerContentElement : undefined;\n if (!content?.isConnected) {\n this.footerResizeObserver?.disconnect();\n this.observedFooterContentElement = undefined;\n return;\n }\n if (this.observedFooterContentElement === content) return;\n\n this.footerResizeObserver?.disconnect();\n if (typeof ResizeObserver !== 'undefined') {\n this.footerResizeObserver = new ResizeObserver(() => this.scheduleFooterSummaryMeasurement());\n this.footerResizeObserver.observe(content);\n }\n this.observedFooterContentElement = content;\n }\n\n private scheduleFooterSummaryMeasurement() {\n if (\n !this.open ||\n !this.multiple ||\n !this.hasSelection ||\n this.footerMeasurementFrame !== undefined\n ) {\n return;\n }\n this.footerMeasurementFrame = requestAnimationFrame(() => {\n this.footerMeasurementFrame = undefined;\n this.measureFooterSummary();\n });\n }\n\n private measureFooterSummary() {\n const content = this.footerContentElement;\n const summary = this.footerSummaryMeasureElement;\n const clear = this.footerClearElement;\n if (!content?.isConnected || !summary?.isConnected || !clear?.isConnected) return;\n\n const styles = getComputedStyle(content);\n const innerWidth =\n content.clientWidth -\n Number.parseFloat(styles.paddingInlineStart || '0') -\n Number.parseFloat(styles.paddingInlineEnd || '0');\n const requiredWidth =\n summary.getBoundingClientRect().width +\n clear.getBoundingClientRect().width +\n Number.parseFloat(styles.columnGap || '0');\n const nextCompact = requiredWidth > innerWidth + 0.5;\n if (nextCompact !== this.compactFooterSummary) {\n this.compactFooterSummary = nextCompact;\n }\n }\n\n private closePopup(restoreFocus = false) {\n this.controller.closePopup(restoreFocus);\n }\n\n private openPopup(focusVisible: boolean, edge?: 'first' | 'last') {\n this.controller.openPopup(focusVisible, edge);\n }\n\n private selectOption(option: SelectOption) {\n if (option.isInactive || this.isLoading) return;\n if (this.multiple) {\n const current = this.resolvedValues;\n const next = current.includes(option.value)\n ? current.filter(value => value !== option.value)\n : [...current, option.value];\n this.value = next;\n this.dsChange.emit([...next]);\n return;\n }\n this.value = option.value;\n this.dsChange.emit(option.value);\n this.controller.closePopup(true);\n }\n\n private clearSelection = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n this.value = this.multiple ? [] : '';\n this.dsChange.emit(this.multiple ? [] : '');\n this.dsClear.emit();\n if (!this.multiple) {\n const enabled = enabledChoiceIndexes(this.visibleOptions);\n this.activeIndex = enabled[0] ?? -1;\n }\n this.controller.focusSearchOrTrigger();\n };\n\n private activateFooterAction = (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n this.dsFooterAction.emit();\n this.closePopup();\n };\n\n private readonly handleListKeyDown = this.controller.handleListKeyDown;\n private readonly handleTriggerKeyDown = this.controller.handleTriggerKeyDown;\n\n private renderOption(\n option: SelectOption,\n index: number,\n usesIcons: boolean,\n usesSubtext: boolean\n ) {\n const selected = this.multiple\n ? this.resolvedValues.includes(option.value)\n : option.value === this.scalarValue;\n const active = index === this.activeIndex;\n const actionId = `${this.generatedId}-option-action-${index}`;\n return (\n <ChoiceOptionRow\n size={this.size}\n id={`${this.generatedId}-option-${index}`}\n option={option}\n selected={selected}\n active={active}\n focusRingVisible={this.focusRingVisible}\n usesSubtext={usesSubtext}\n actionOpen={option.action?.surfaceOpen ?? option.action?.expanded}\n popupRole={this.popupRole}\n leading={\n this.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\n class=\"select-option__checkbox\"\n label=\"\"\n size={this.size}\n checked={selected}\n presentation\n />\n </span>\n ) : usesIcons && option.icon ? (\n <span\n class=\"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n <ds-icon name={option.icon} size={this.size} color=\"inherit\" />\n </span>\n ) : undefined\n }\n supporting={\n option.subtextActions?.length ? (\n <span class=\"ds-choice-item__subtext ds-control-label-box select-option__subtext-actions\">\n {option.subtextActions.map((action, actionIndex) => [\n actionIndex > 0 ? (\n <ds-text\n class=\"select-option__subtext-action-separator\"\n as=\"span\"\n variant={CONTROL_SUPPORTING_TEXT_VARIANT[this.size]}\n color=\"inherit\"\n aria-hidden=\"true\"\n >\n ·\n </ds-text>\n ) : null,\n <button\n type=\"button\"\n class={{\n 'select-option__subtext-action': true,\n 'select-option__subtext-action--negative': action.tone === 'negative',\n 'ds-text-action': true,\n 'ds-focus-ring': true,\n }}\n onKeyDown={(event: KeyboardEvent) => event.stopPropagation()}\n onClick={(event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n this.dsOptionSubtextAction.emit({\n value: option.value,\n actionValue: action.value,\n originalEvent: event,\n });\n }}\n >\n <ds-text\n as=\"span\"\n variant={CONTROL_SUPPORTING_TEXT_VARIANT[this.size]}\n color=\"inherit\"\n >\n {action.label}\n </ds-text>\n </button>,\n ])}\n </span>\n ) : undefined\n }\n action={\n option.action ? (\n <ds-tooltip label={option.action.label} side=\"left\" size=\"sm\">\n <ds-button-unfilled\n id={actionId}\n variant=\"icon\"\n size={OPTION_ACTION_SIZE[this.size]}\n icon=\"Ellipses\"\n rounded\n hasBorder={false}\n activeFill={false}\n ariaLabel={option.action.label}\n haspopup=\"menu\"\n controls={option.action.controls}\n expanded={option.action.expanded}\n surfaceOpen={option.action.surfaceOpen}\n onKeyDown={event => {\n event.stopPropagation();\n if (event.key === 'Escape' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.controller.focusSearchOrTrigger();\n }\n }}\n onDsClick={(event: CustomEvent<MouseEvent>) => {\n event.stopPropagation();\n this.dsOptionAction.emit({\n value: option.value,\n anchorId: actionId,\n originalEvent: event.detail,\n });\n }}\n />\n </ds-tooltip>\n ) : undefined\n }\n onHover={() => {\n this.focusRingVisible = false;\n this.activeIndex = index;\n }}\n onSelect={() => this.selectOption(option)}\n />\n );\n }\n\n private get captionIconOnly(): boolean {\n return this.collapseLabel && this.captionCompact && Boolean(this.icon || this.isLoading);\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 private renderCaptionTooltip(trigger: VNode, label: string): VNode {\n if (!this.collapseLabel) return trigger;\n return (\n <ds-tooltip label={label} side=\"top\" size=\"sm\">\n {trigger}\n </ds-tooltip>\n );\n }\n\n render() {\n const inactive = this.isDisabled;\n const showPlaceholder = !this.hasSelection;\n const count = this.resolvedValues.length;\n const label = this.multiple\n ? `${this.placeholder}${count > 0 ? ` · ${count}` : ''}`\n : showPlaceholder\n ? this.placeholder\n : (this.triggerLabel ?? this.selectedOption?.label);\n const textVariant = CONTROL_TEXT_VARIANT[this.size];\n const iconSize = ICON_SIZE[this.size];\n const usesOptionIcons = !this.multiple && choiceListUsesIcons(this.allOptions);\n const usesOptionSubtext = choiceListUsesSubtext(this.allOptions);\n const showError = this.error && Boolean(this.errorMessage);\n const describedBy =\n [this.ariaDescribedby, showError ? this.errorId : undefined].filter(Boolean).join(' ') ||\n undefined;\n const popupStyle = {\n position: 'fixed',\n left: '0',\n top: '0',\n transform: `translate(${Math.round(this.position.x)}px, ${Math.round(this.position.y)}px)`,\n zIndex: 'var(--dimension-z-index-floating)',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n let flatIndex = 0;\n\n return (\n <Host\n class={{\n 'select-host': true,\n 'ds-select-trigger-host': true,\n 'select-host--multiple': this.multiple,\n 'ds-field-stack': true,\n 'ds-control-inactive': inactive,\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 [`select-host--background-${this.background}`]: !!this.background,\n [`ds-select-trigger-host--background-${this.background}`]: !!this.background,\n }}\n >\n {this.renderCaptionTooltip(\n <button\n ref={element => {\n this.controller.setTriggerElement((element as HTMLButtonElement) ?? null);\n }}\n id={this.inputId ?? this.generatedId}\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': !inactive && this.activeFill && this.hasSelection,\n 'trigger--expanded': !inactive && this.open,\n 'ds-interaction-fill--surface-open': !inactive && this.open,\n 'trigger--bordered': this.hasBorder,\n 'trigger--placeholder': showPlaceholder && !this.multiple,\n 'trigger--has-value': this.hasSelection,\n 'trigger--label-placeholder':\n !this.multiple && Boolean(this.triggerLabel) && this.triggerLabelPlaceholder,\n 'wrapper--error': this.hasBorder && this.error,\n [`ds-control--${this.size}`]: true,\n ...choiceBackgroundClassMap(this.background),\n }}\n disabled={inactive}\n role=\"combobox\"\n aria-haspopup={this.popupRole}\n aria-expanded={String(this.open)}\n aria-controls={this.open ? this.listboxId : undefined}\n aria-activedescendant={this.open && !this.searchable ? this.activeOptionId : undefined}\n aria-label={this.ariaLabel ?? (this.captionIconOnly ? label : undefined)}\n aria-labelledby={this.ariaLabelledby}\n aria-describedby={describedBy}\n aria-invalid={this.error ? 'true' : undefined}\n aria-required={this.required || undefined}\n aria-busy={this.isLoading ? 'true' : undefined}\n onClick={() => (this.open ? this.closePopup() : this.openPopup(false))}\n onKeyDown={event => {\n const action = this.visibleOptions[this.activeIndex]?.action;\n if (\n this.open &&\n action &&\n (event.key === 'ArrowRight' || (event.key === 'F10' && event.shiftKey))\n ) {\n event.preventDefault();\n document\n .getElementById(`${this.generatedId}-option-action-${this.activeIndex}`)\n ?.querySelector<HTMLElement>('button')\n ?.focus();\n return;\n }\n this.handleTriggerKeyDown(event);\n }}\n >\n {(this.icon || this.isLoading) && (\n <span\n class=\"trigger__prefix ds-control-icon-box ds-interaction-fill__content\"\n aria-hidden=\"true\"\n >\n {this.isLoading ? (\n <ds-loader size={iconSize} color=\"inherit\" />\n ) : (\n <ds-icon name={this.icon} size={iconSize} color=\"inherit\" />\n )}\n </span>\n )}\n {this.captionIconOnly ? null : (\n <span\n class={{\n 'trigger__label-box': true,\n 'ds-interaction-fill__content': true,\n }}\n >\n <span\n class={{\n 'trigger__label-content': true,\n 'ds-control-label-box': true,\n 'ds-control-label-dot': this.dot,\n 'trigger__label-content--dot': this.dot,\n }}\n >\n <ds-text\n class=\"trigger__label\"\n as=\"span\"\n variant={textVariant}\n color=\"inherit\"\n lineTruncation={1}\n >\n {label}\n </ds-text>\n {this.dot && (\n <ds-badge\n class=\"trigger__dot ds-control-label-dot__badge\"\n variant=\"dot\"\n hasRing={false}\n label=\"\"\n aria-hidden=\"true\"\n />\n )}\n </span>\n </span>\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\n name={this.indicator === 'up-down' ? 'ChevronUpDown' : 'ChevronDown'}\n size={iconSize}\n color=\"inherit\"\n />\n </span>\n )}\n </button>,\n this.captionIconOnly ? this.ariaLabel?.trim() || this.placeholder : ''\n )}\n\n {this.open && (\n <div\n popover=\"manual\"\n ref={element => {\n this.controller.setPopupElement((element as HTMLDivElement) ?? null);\n }}\n class=\"select-popup ds-choice-popup\"\n style={popupStyle}\n >\n {this.searchable && (\n <ChoiceSearch\n size={this.size}\n value={this.searchTerm}\n placeholder={this.searchPlaceholder}\n controls={this.listboxId}\n activeDescendant={this.activeOptionId}\n inputRef={this.controller.setSearchElement}\n clearLabel={this.clearLabel}\n onValueChange={value => {\n this.searchTerm = value;\n }}\n onKeyDown={event => this.handleListKeyDown(event)}\n />\n )}\n <div\n id={this.listboxId}\n class=\"ds-choice-list\"\n role={this.popupRole}\n aria-multiselectable={this.multiple ? 'true' : undefined}\n aria-label={this.ariaLabel ?? this.placeholder}\n aria-busy={this.isLoading ? 'true' : undefined}\n >\n {this.isLoading ? (\n <div\n class=\"ds-choice-loading ds-empty-region\"\n role={this.popupRole === 'grid' ? 'row' : 'option'}\n aria-selected=\"false\"\n aria-disabled=\"true\"\n aria-label={this.loadingLabel}\n aria-live=\"polite\"\n >\n {this.popupRole === 'grid' ? (\n <span role=\"gridcell\">\n <ds-loader size={this.size} color=\"inherit\" />\n </span>\n ) : (\n <ds-loader size={this.size} color=\"inherit\" />\n )}\n </div>\n ) : this.visibleOptions.length === 0 ? (\n <div\n class=\"ds-choice-empty ds-empty-region\"\n role={this.popupRole === 'grid' ? 'row' : 'option'}\n aria-selected=\"false\"\n aria-disabled=\"true\"\n aria-label={this.noResultsText}\n aria-live=\"polite\"\n >\n {this.popupRole === 'grid' ? (\n <span role=\"gridcell\">\n <ds-empty-state body={this.noResultsText} />\n </span>\n ) : (\n <ds-empty-state body={this.noResultsText} />\n )}\n </div>\n ) : (\n this.visibleSections.map((section, sectionIndex) => (\n <div\n class={{\n 'ds-choice-section': true,\n 'ds-chrome-column': true,\n 'ds-chrome-space--sm': true,\n 'ds-choice-section--divided': !!section.divider,\n 'ds-choice-section--headed-after-first':\n sectionIndex > 0 && Boolean(section.header),\n }}\n role={\n this.popupRole === 'grid' ? 'rowgroup' : section.header ? 'group' : undefined\n }\n aria-label={section.header}\n >\n {section.header && this.popupRole === 'grid' ? (\n <ds-text\n class={`ds-choice-section__header ds-control-section-heading ds-control--${this.size}`}\n as=\"span\"\n variant={CONTROL_SUPPORTING_TEXT_VARIANT[this.size]}\n emphasis\n color=\"primary\"\n role=\"row\"\n >\n <span class=\"ds-choice-section__header-label\" role=\"gridcell\">\n {section.header}\n </span>\n </ds-text>\n ) : section.header ? (\n <ds-text\n class={`ds-choice-section__header ds-control-section-heading ds-control--${this.size}`}\n as=\"span\"\n variant={CONTROL_SUPPORTING_TEXT_VARIANT[this.size]}\n emphasis\n color=\"primary\"\n aria-hidden=\"true\"\n >\n <span class=\"ds-choice-section__header-label\">{section.header}</span>\n </ds-text>\n ) : null}\n {section.options.map(option =>\n this.renderOption(option, flatIndex++, usesOptionIcons, usesOptionSubtext)\n )}\n </div>\n ))\n )}\n </div>\n {this.footerActionLabel && !this.isLoading ? (\n <ChoiceActionFooter\n size={this.size}\n label={this.footerActionLabel}\n onAction={this.activateFooterAction}\n />\n ) : this.allowClear && this.hasSelection && !this.isLoading ? (\n <ChoiceFooter\n size={this.size}\n summary={this.multiple ? `${count} ${this.selectedLabel}` : undefined}\n compactSummary={this.multiple ? String(count) : undefined}\n useCompactSummary={this.compactFooterSummary}\n contentRef={element => {\n this.footerContentElement = element ?? undefined;\n }}\n summaryMeasureRef={element => {\n this.footerSummaryMeasureElement = element ?? undefined;\n }}\n clearRef={element => {\n this.footerClearElement = element ?? undefined;\n }}\n clearLabel={this.clearLabel}\n onClear={this.clearSelection}\n />\n ) : null}\n </div>\n )}\n\n {showError && (\n <ds-text\n class=\"error-text\"\n as=\"div\"\n variant=\"text-body-small\"\n color=\"negative\"\n textId={this.errorId}\n role=\"alert\"\n >\n {this.errorMessage}\n </ds-text>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"u4BA2CaA,EASX,WAAAC,CAA6BC,GAAAC,KAAAD,QARrBC,KAAAC,UAAsC,KACtCD,KAAAE,QAAiC,KACjCF,KAAAG,SAAsC,KACtCH,KAAAI,UAAY,GACZJ,KAAAK,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/T,KAAKuK,gBAAkBpF,UAC5DgS,eAAgBnX,KAAKqJ,SAAWwM,OAAO9B,GAAS5O,UAChDiS,kBAAmBpX,KAAK8K,qBACxBuM,WAAY7W,IACVR,KAAK2P,qBAAuBnP,GAAW2E,SAAS,EAElDmS,kBAAmB9W,IACjBR,KAAK+P,4BAA8BvP,GAAW2E,SAAS,EAEzDoS,SAAU/W,IACRR,KAAKiQ,mBAAqBzP,GAAW2E,SAAS,EAEhDmF,WAAYtK,KAAKsK,WACjBkN,QAASxX,KAAKsL,iBAEd,MAIPkJ,GACCnD,EAAA,WAAAtQ,IAAA,2CACE6Q,MAAM,aACNS,GAAG,MACHC,QAAQ,kBACRL,MAAM,WACNwF,OAAQzX,KAAKiL,QACb2K,KAAK,SAEJ5V,KAAKyU,c","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,h as r,a as o,t as a}from"./index.js";import{d}from"./p-DQpw21HO.js";import{d as t}from"./p-CG4Fp3SY.js";import{d as n}from"./p-BrW77sNB.js";import{d as i}from"./p-Cea7rROU.js";import{d as c}from"./p-0XTyQNRG.js";import{d as h}from"./p-B9oadFSC.js";import{d as m}from"./p-JuKGR7Ay.js";import{r as l}from"./p-rCeztgVn.js";const p=()=>`.sc-ds-markdown:where(.ds-prose){display:block;box-sizing:border-box;max-inline-size:100%;min-inline-size:0;color:inherit;overflow-wrap:anywhere}.sc-ds-markdown:where(.ds-prose)>:where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6.sc-ds-markdown,p.sc-ds-markdown,ul.sc-ds-markdown,ol.sc-ds-markdown,dl.sc-ds-markdown,blockquote).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{max-inline-size:var(--ds-prose-text-max-inline-size, 100%)}.sc-ds-markdown:where(.ds-prose) :where(p,ul.sc-ds-markdown,ol.sc-ds-markdown,dl.sc-ds-markdown,blockquote.sc-ds-markdown,figure.sc-ds-markdown,figcaption.sc-ds-markdown,table).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin:0;color:inherit;font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);font-weight:var(--typography-weight-regular);line-height:var(--typography-lineheight-md);letter-spacing:var(--typography-letterspacing-negative-half)}.sc-ds-markdown:where(.ds-prose) :where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin:0;color:var(--color-foreground-primary);font-family:var(--typography-font-family-ui);font-weight:var(--typography-weight-semibold)}.sc-ds-markdown:where(.ds-prose) :where(h1,h2).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl);letter-spacing:var(--typography-letterspacing-negative-double)}.sc-ds-markdown:where(.ds-prose) :where(h3,h4).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.sc-ds-markdown:where(.ds-prose) :where(h2):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg);letter-spacing:var(--typography-letterspacing-negative)}.sc-ds-markdown:where(.ds-prose) :where(h5,h6).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);letter-spacing:var(--typography-letterspacing-negative)}.sc-ds-markdown:where(.ds-prose)>.sc-ds-markdown:where(*+*){margin-block-start:var(--dimension-space-150)}.sc-ds-markdown:where(.ds-prose)>:where(*)+:where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-200)}.sc-ds-markdown:where(.ds-prose)>:where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown+.sc-ds-markdown:where(*){margin-block-start:var(--dimension-space-100)}.sc-ds-markdown:where(.ds-prose) :where(blockquote,li.sc-ds-markdown,dd)>.sc-ds-markdown:where(*+*):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-050)}.sc-ds-markdown:where(.ds-prose) :where(li+li.sc-ds-markdown,dt+dd).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-050)}.sc-ds-markdown:where(.ds-prose) :where(ul,ol).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding-inline-start:var(--dimension-space-300)}.sc-ds-markdown:where(.ds-prose) :where(ol>li):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding-block-end:var(--dimension-space-100)}.sc-ds-markdown:where(.ds-prose) :where(ol>li:has(>:is(h3,h4).sc-ds-markdown:first-child)):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown::marker{color:var(--color-foreground-primary);font-size:var(--typography-fontsize-md);font-weight:var(--typography-weight-medium)}.sc-ds-markdown:where(.ds-prose) :where(li>ul.sc-ds-markdown,li>ol).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-050)}.sc-ds-markdown:where(.ds-prose) :where(li>input[type='checkbox']):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-inline-end:var(--dimension-space-050)}.sc-ds-markdown:where(.ds-prose) :where(blockquote):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding-inline-start:var(--dimension-space-150);border-inline-start:var(--dimension-stroke-width-025) solid var(--color-border-secondary);color:var(--color-foreground-secondary)}.sc-ds-markdown:where(.ds-prose) :where(strong,b).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-weight:var(--typography-weight-medium)}.sc-ds-markdown:where(.ds-prose) :where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6) .sc-ds-markdown:where(strong,b).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-weight:inherit}.sc-ds-markdown:where(.ds-prose) :where(a):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{color:var(--color-foreground-bold-brand);text-decoration-line:none;text-decoration-color:currentcolor;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))}@media (hover: hover) and (pointer: fine){.sc-ds-markdown:where(.ds-prose) :where(a):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown:hover{text-decoration-line:underline}}@media (forced-colors: active){.sc-ds-markdown:where(.ds-prose) :where(a):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{text-decoration-line:underline}}.sc-ds-markdown:where(.ds-prose) :where(code):not(:where(pre code.sc-ds-markdown,[data-ds-prose='off'].sc-ds-markdown,[data-ds-prose='off'] *)).sc-ds-markdown{padding:var(--dimension-space-012) var(--dimension-space-025);border-radius:var(--dimension-radius-025);background:var(--color-background-secondary);font-family:var( --typography-font-family-code, 'Fira Code', ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'Roboto Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace );font-size:var(--typography-fontsize-sm);font-variant-ligatures:var(--ds-code-font-variant-ligatures, normal);font-weight:var(--typography-weight-regular);line-height:var(--typography-lineheight-sm);letter-spacing:var(--typography-letterspacing-none)}.sc-ds-markdown:where(.ds-prose) :where(pre):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{box-sizing:border-box;max-inline-size:100%;min-inline-size:0;margin:0;padding:var(--dimension-space-150);overflow:auto;border-radius:var(--dimension-radius-050);background:var(--color-background-strong-neutral);color:var(--color-foreground-faint-neutral);font-family:var( --typography-font-family-code, 'Fira Code', ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'Roboto Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace );font-size:var(--typography-fontsize-sm);font-variant-ligatures:var(--ds-code-font-variant-ligatures, normal);font-weight:var(--typography-weight-regular);line-height:var(--typography-lineheight-sm);letter-spacing:var(--typography-letterspacing-none);tab-size:2}.sc-ds-markdown:where(.ds-prose) :where(pre code):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;white-space:pre}.sc-ds-markdown:where(.ds-prose) :where(hr):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin:0;border:0;border-block-start:var(--dimension-stroke-width-012) solid var(--color-border-tertiary)}.sc-ds-markdown:where(.ds-prose__table-scroll){box-sizing:border-box;max-inline-size:100%;min-inline-size:0;overflow-x:auto}.sc-ds-markdown:where(.ds-prose) :where(table):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{inline-size:100%;border-collapse:collapse}.sc-ds-markdown:where(.ds-prose) :where(th,td).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding:var(--dimension-space-075);border:var(--dimension-stroke-width-012) solid var(--color-border-tertiary);text-align:start;vertical-align:top;overflow-wrap:anywhere}.sc-ds-markdown:where(.ds-prose) :where(th):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{color:var(--color-foreground-primary);font-weight:var(--typography-weight-medium)}.sc-ds-markdown:where(.ds-prose) :where(img,video.sc-ds-markdown,svg).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{max-inline-size:100%;block-size:auto}.sc-ds-markdown:where(.ds-prose) :where(figcaption):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-050);color:var(--color-foreground-secondary);font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm);letter-spacing:var(--typography-letterspacing-none)}.sc-ds-markdown-h{display:block;min-width:0;color:inherit;box-sizing:border-box;-webkit-user-select:text;user-select:text}`;let w;function f(){w??(w=Promise.all([import("./p-BjtXYFhw.js"),import("./p-DVsje4AY.js"),import("./p-gidVv1FX.js")]).then((([e,s,r])=>({fromMarkdown:e.fromMarkdown,gfmFromMarkdown:s.gfmFromMarkdown,gfm:r.gfm}))));return w}const k=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.content="";this.streaming=false;this.tree=null;this.parseRevision=0}componentWillLoad(){if(typeof document!=="undefined")return this.parse()}disconnectedCallback(){this.parseRevision+=1;if(this.parseFrame&&typeof cancelAnimationFrame==="function"){cancelAnimationFrame(this.parseFrame)}}scheduleParse(){if(typeof requestAnimationFrame!=="function")return;if(this.parseFrame)cancelAnimationFrame(this.parseFrame);this.parseFrame=requestAnimationFrame((()=>{this.parseFrame=undefined;void this.parse()}))}async parse(){const e=++this.parseRevision;try{const{fromMarkdown:s,gfmFromMarkdown:r,gfm:o}=await f();const a=s(this.content,{extensions:[o()],mdastExtensions:[r()]});if(e===this.parseRevision)this.tree=a}catch{if(e===this.parseRevision)this.tree=null}}children(e){if(!("children"in e))return[];return e.children.map((e=>this.renderNode(e)))}renderNode(e){switch(e.type){case"root":return this.children(e);case"text":return r("span",{class:"markdown__text"},e.value);case"paragraph":return r("p",{class:"markdown__paragraph"},this.children(e));case"heading":{const s=`h${e.depth}`;return r(s,{class:"markdown__heading"},this.children(e))}case"strong":return r("strong",{class:"markdown__strong"},this.children(e));case"emphasis":return r("em",{class:"markdown__emphasis"},this.children(e));case"delete":return r("del",{class:"markdown__delete"},this.children(e));case"blockquote":return r("blockquote",{class:"markdown__blockquote"},this.children(e));case"break":return r("br",{class:"markdown__break"});case"thematicBreak":return r("hr",{class:"markdown__thematic-break"});case"inlineCode":return r("code",{class:"markdown__inline-code"},e.value);case"code":return r("ds-code-block",{class:"markdown__code-block","data-ds-prose":"off",code:e.value,language:e.lang??"",filename:e.meta??""});case"link":{const s=l(e.url,{protocols:["http:","https:","mailto:"]});return s?r("a",{class:"markdown__link",href:s,target:"_blank",rel:"noopener noreferrer"},this.children(e)):this.children(e)}case"list":{const s=e.ordered?"ol":"ul";return r(s,{class:"markdown__list",start:e.ordered&&e.start?e.start:undefined},this.children(e))}case"listItem":return r("li",{class:"markdown__list-item"},typeof e.checked==="boolean"?r("input",{class:"markdown__task-indicator",type:"checkbox",checked:e.checked,disabled:true,"aria-hidden":"true",tabIndex:-1}):null,this.children(e));case"table":{const[s,...o]=e.children;return r("div",{class:"markdown__table-wrap ds-prose__table-scroll",tabIndex:0},r("table",{class:"markdown__table"},s?r("thead",{class:"markdown__table-head"},r("tr",{class:"markdown__table-row"},s.children.map((e=>r("th",{class:"markdown__table-heading",scope:"col"},this.children(e)))))):null,r("tbody",{class:"markdown__table-body"},o.map((e=>this.renderNode(e))))))}case"tableRow":return r("tr",{class:"markdown__table-row"},this.children(e));case"tableCell":return r("td",{class:"markdown__table-cell"},this.children(e));case"image":{const s=l(e.url,{protocols:["http:","https:","mailto:"]});return s?r("a",{class:"markdown__image-link",href:s,target:"_blank",rel:"noopener noreferrer"},e.alt||"View image"):e.alt||null}case"html":case"definition":case"footnoteDefinition":return null;case"footnoteReference":return r("sup",{class:"markdown__footnote"},e.label);default:return this.children(e)}}render(){return r(o,{key:"a489fa9da17d1e12932e78c1e610dd9676fc0a3e","aria-busy":this.streaming?"true":undefined},r("div",{key:"c1247214ef7a1adbfb7dc84d79e750694c81142b",class:"markdown ds-prose"},this.tree?this.renderNode(this.tree):r("p",{class:"markdown__paragraph"},r("span",{class:"markdown__text"},this.content))))}static get watchers(){return{content:[{scheduleParse:0}]}}static get style(){return p()}},[2,"ds-markdown",{content:[1],streaming:[4],tree:[32]},undefined,{content:[{scheduleParse:0}]}]);function g(){if(typeof customElements==="undefined"){return}const e=["ds-markdown","ds-badge","ds-button-unfilled","ds-code-block","ds-icon","ds-loader","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-markdown":if(!customElements.get(a(e))){customElements.define(a(e),k)}break;case"ds-badge":if(!customElements.get(a(e))){d()}break;case"ds-button-unfilled":if(!customElements.get(a(e))){t()}break;case"ds-code-block":if(!customElements.get(a(e))){n()}break;case"ds-icon":if(!customElements.get(a(e))){i()}break;case"ds-loader":if(!customElements.get(a(e))){c()}break;case"ds-text":if(!customElements.get(a(e))){h()}break;case"ds-tooltip":if(!customElements.get(a(e))){m()}break}}))}g();export{k as M,g as d};
2
- //# sourceMappingURL=p-ln3dJxQT.js.map
1
+ import{p as e,H as s,h as r,a as o,t as a}from"./index.js";import{d}from"./p-DQpw21HO.js";import{d as t}from"./p-CD9AbaHQ.js";import{d as n}from"./p-B9WwU5vu.js";import{d as i}from"./p-Cea7rROU.js";import{d as c}from"./p-0XTyQNRG.js";import{d as h}from"./p-B9oadFSC.js";import{d as m}from"./p-14sMoeTr.js";import{r as l}from"./p-rCeztgVn.js";const w=()=>`.sc-ds-markdown:where(.ds-prose){display:block;box-sizing:border-box;max-inline-size:100%;min-inline-size:0;color:inherit;overflow-wrap:anywhere}.sc-ds-markdown:where(.ds-prose)>:where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6.sc-ds-markdown,p.sc-ds-markdown,ul.sc-ds-markdown,ol.sc-ds-markdown,dl.sc-ds-markdown,blockquote).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{max-inline-size:var(--ds-prose-text-max-inline-size, 100%)}.sc-ds-markdown:where(.ds-prose) :where(p,ul.sc-ds-markdown,ol.sc-ds-markdown,dl.sc-ds-markdown,blockquote.sc-ds-markdown,figure.sc-ds-markdown,figcaption.sc-ds-markdown,table).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin:0;color:inherit;font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);font-weight:var(--typography-weight-regular);line-height:var(--typography-lineheight-md);letter-spacing:var(--typography-letterspacing-negative-half)}.sc-ds-markdown:where(.ds-prose) :where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin:0;color:var(--color-foreground-primary);font-family:var(--typography-font-family-ui);font-weight:var(--typography-weight-semibold)}.sc-ds-markdown:where(.ds-prose) :where(h1,h2).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl);letter-spacing:var(--typography-letterspacing-negative-double)}.sc-ds-markdown:where(.ds-prose) :where(h3,h4).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.sc-ds-markdown:where(.ds-prose) :where(h2):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg);letter-spacing:var(--typography-letterspacing-negative)}.sc-ds-markdown:where(.ds-prose) :where(h5,h6).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md);letter-spacing:var(--typography-letterspacing-negative)}.sc-ds-markdown:where(.ds-prose)>.sc-ds-markdown:where(*+*){margin-block-start:var(--dimension-space-150)}.sc-ds-markdown:where(.ds-prose)>:where(*)+:where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-200)}.sc-ds-markdown:where(.ds-prose)>:where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown+.sc-ds-markdown:where(*){margin-block-start:var(--dimension-space-100)}.sc-ds-markdown:where(.ds-prose) :where(blockquote,li.sc-ds-markdown,dd)>.sc-ds-markdown:where(*+*):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-050)}.sc-ds-markdown:where(.ds-prose) :where(li+li.sc-ds-markdown,dt+dd).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-050)}.sc-ds-markdown:where(.ds-prose) :where(ul,ol).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding-inline-start:var(--dimension-space-300)}.sc-ds-markdown:where(.ds-prose) :where(ol>li):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding-block-end:var(--dimension-space-100)}.sc-ds-markdown:where(.ds-prose) :where(ol>li:has(>:is(h3,h4).sc-ds-markdown:first-child)):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown::marker{color:var(--color-foreground-primary);font-size:var(--typography-fontsize-md);font-weight:var(--typography-weight-medium)}.sc-ds-markdown:where(.ds-prose) :where(li>ul.sc-ds-markdown,li>ol).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-050)}.sc-ds-markdown:where(.ds-prose) :where(li>input[type='checkbox']):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-inline-end:var(--dimension-space-050)}.sc-ds-markdown:where(.ds-prose) :where(blockquote):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding-inline-start:var(--dimension-space-150);border-inline-start:var(--dimension-stroke-width-025) solid var(--color-border-secondary);color:var(--color-foreground-secondary)}.sc-ds-markdown:where(.ds-prose) :where(strong,b).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-weight:var(--typography-weight-medium)}.sc-ds-markdown:where(.ds-prose) :where(h1,h2.sc-ds-markdown,h3.sc-ds-markdown,h4.sc-ds-markdown,h5.sc-ds-markdown,h6) .sc-ds-markdown:where(strong,b).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{font-weight:inherit}.sc-ds-markdown:where(.ds-prose) :where(a):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{color:var(--color-foreground-bold-brand);text-decoration-line:none;text-decoration-color:currentcolor;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))}@media (hover: hover) and (pointer: fine){.sc-ds-markdown:where(.ds-prose) :where(a):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown:hover{text-decoration-line:underline}}@media (forced-colors: active){.sc-ds-markdown:where(.ds-prose) :where(a):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{text-decoration-line:underline}}.sc-ds-markdown:where(.ds-prose) :where(code):not(:where(pre code.sc-ds-markdown,[data-ds-prose='off'].sc-ds-markdown,[data-ds-prose='off'] *)).sc-ds-markdown{padding:var(--dimension-space-012) var(--dimension-space-025);border-radius:var(--dimension-radius-025);background:var(--color-background-secondary);font-family:var( --typography-font-family-code, 'Fira Code', ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'Roboto Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace );font-size:var(--typography-fontsize-sm);font-variant-ligatures:var(--ds-code-font-variant-ligatures, normal);font-weight:var(--typography-weight-regular);line-height:var(--typography-lineheight-sm);letter-spacing:var(--typography-letterspacing-none)}.sc-ds-markdown:where(.ds-prose) :where(pre):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{box-sizing:border-box;max-inline-size:100%;min-inline-size:0;margin:0;padding:var(--dimension-space-150);overflow:auto;border-radius:var(--dimension-radius-050);background:var(--color-background-strong-neutral);color:var(--color-foreground-faint-neutral);font-family:var( --typography-font-family-code, 'Fira Code', ui-monospace, 'SFMono-Regular', 'Cascadia Code', 'Roboto Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace );font-size:var(--typography-fontsize-sm);font-variant-ligatures:var(--ds-code-font-variant-ligatures, normal);font-weight:var(--typography-weight-regular);line-height:var(--typography-lineheight-sm);letter-spacing:var(--typography-letterspacing-none);tab-size:2}.sc-ds-markdown:where(.ds-prose) :where(pre code):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding:0;background:transparent;color:inherit;font:inherit;letter-spacing:inherit;white-space:pre}.sc-ds-markdown:where(.ds-prose) :where(hr):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin:0;border:0;border-block-start:var(--dimension-stroke-width-012) solid var(--color-border-tertiary)}.sc-ds-markdown:where(.ds-prose__table-scroll){box-sizing:border-box;max-inline-size:100%;min-inline-size:0;overflow-x:auto}.sc-ds-markdown:where(.ds-prose) :where(table):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{inline-size:100%;border-collapse:collapse}.sc-ds-markdown:where(.ds-prose) :where(th,td).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{padding:var(--dimension-space-075);border:var(--dimension-stroke-width-012) solid var(--color-border-tertiary);text-align:start;vertical-align:top;overflow-wrap:anywhere}.sc-ds-markdown:where(.ds-prose) :where(th):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{color:var(--color-foreground-primary);font-weight:var(--typography-weight-medium)}.sc-ds-markdown:where(.ds-prose) :where(img,video.sc-ds-markdown,svg).sc-ds-markdown:not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{max-inline-size:100%;block-size:auto}.sc-ds-markdown:where(.ds-prose) :where(figcaption):not(:where([data-ds-prose='off'],[data-ds-prose='off'] *)).sc-ds-markdown{margin-block-start:var(--dimension-space-050);color:var(--color-foreground-secondary);font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm);letter-spacing:var(--typography-letterspacing-none)}.sc-ds-markdown-h{display:block;min-width:0;color:inherit;box-sizing:border-box;-webkit-user-select:text;user-select:text}`;let p;function f(){p??(p=Promise.all([import("./p-BjtXYFhw.js"),import("./p-DVsje4AY.js"),import("./p-gidVv1FX.js")]).then((([e,s,r])=>({fromMarkdown:e.fromMarkdown,gfmFromMarkdown:s.gfmFromMarkdown,gfm:r.gfm}))));return p}const k=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.content="";this.streaming=false;this.tree=null;this.parseRevision=0}componentWillLoad(){if(typeof document!=="undefined")return this.parse()}disconnectedCallback(){this.parseRevision+=1;if(this.parseFrame&&typeof cancelAnimationFrame==="function"){cancelAnimationFrame(this.parseFrame)}}scheduleParse(){if(typeof requestAnimationFrame!=="function")return;if(this.parseFrame)cancelAnimationFrame(this.parseFrame);this.parseFrame=requestAnimationFrame((()=>{this.parseFrame=undefined;void this.parse()}))}async parse(){const e=++this.parseRevision;try{const{fromMarkdown:s,gfmFromMarkdown:r,gfm:o}=await f();const a=s(this.content,{extensions:[o()],mdastExtensions:[r()]});if(e===this.parseRevision)this.tree=a}catch{if(e===this.parseRevision)this.tree=null}}children(e){if(!("children"in e))return[];return e.children.map((e=>this.renderNode(e)))}renderNode(e){switch(e.type){case"root":return this.children(e);case"text":return r("span",{class:"markdown__text"},e.value);case"paragraph":return r("p",{class:"markdown__paragraph"},this.children(e));case"heading":{const s=`h${e.depth}`;return r(s,{class:"markdown__heading"},this.children(e))}case"strong":return r("strong",{class:"markdown__strong"},this.children(e));case"emphasis":return r("em",{class:"markdown__emphasis"},this.children(e));case"delete":return r("del",{class:"markdown__delete"},this.children(e));case"blockquote":return r("blockquote",{class:"markdown__blockquote"},this.children(e));case"break":return r("br",{class:"markdown__break"});case"thematicBreak":return r("hr",{class:"markdown__thematic-break"});case"inlineCode":return r("code",{class:"markdown__inline-code"},e.value);case"code":return r("ds-code-block",{class:"markdown__code-block","data-ds-prose":"off",code:e.value,language:e.lang??"",filename:e.meta??""});case"link":{const s=l(e.url,{protocols:["http:","https:","mailto:"]});return s?r("a",{class:"markdown__link",href:s,target:"_blank",rel:"noopener noreferrer"},this.children(e)):this.children(e)}case"list":{const s=e.ordered?"ol":"ul";return r(s,{class:"markdown__list",start:e.ordered&&e.start?e.start:undefined},this.children(e))}case"listItem":return r("li",{class:"markdown__list-item"},typeof e.checked==="boolean"?r("input",{class:"markdown__task-indicator",type:"checkbox",checked:e.checked,disabled:true,"aria-hidden":"true",tabIndex:-1}):null,this.children(e));case"table":{const[s,...o]=e.children;return r("div",{class:"markdown__table-wrap ds-prose__table-scroll",tabIndex:0},r("table",{class:"markdown__table"},s?r("thead",{class:"markdown__table-head"},r("tr",{class:"markdown__table-row"},s.children.map((e=>r("th",{class:"markdown__table-heading",scope:"col"},this.children(e)))))):null,r("tbody",{class:"markdown__table-body"},o.map((e=>this.renderNode(e))))))}case"tableRow":return r("tr",{class:"markdown__table-row"},this.children(e));case"tableCell":return r("td",{class:"markdown__table-cell"},this.children(e));case"image":{const s=l(e.url,{protocols:["http:","https:","mailto:"]});return s?r("a",{class:"markdown__image-link",href:s,target:"_blank",rel:"noopener noreferrer"},e.alt||"View image"):e.alt||null}case"html":case"definition":case"footnoteDefinition":return null;case"footnoteReference":return r("sup",{class:"markdown__footnote"},e.label);default:return this.children(e)}}render(){return r(o,{key:"9cc1ac5c90c8f06ddb558528611a4d287dd49524","aria-busy":this.streaming?"true":undefined},r("div",{key:"f403e7cc24b00ce3e4f7b677ed502b9a25d86614",class:"markdown ds-prose"},this.tree?this.renderNode(this.tree):r("p",{class:"markdown__paragraph"},r("span",{class:"markdown__text"},this.content))))}static get watchers(){return{content:[{scheduleParse:0}]}}static get style(){return w()}},[2,"ds-markdown",{content:[1],streaming:[4],tree:[32]},undefined,{content:[{scheduleParse:0}]}]);function g(){if(typeof customElements==="undefined"){return}const e=["ds-markdown","ds-badge","ds-button-unfilled","ds-code-block","ds-icon","ds-loader","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-markdown":if(!customElements.get(a(e))){customElements.define(a(e),k)}break;case"ds-badge":if(!customElements.get(a(e))){d()}break;case"ds-button-unfilled":if(!customElements.get(a(e))){t()}break;case"ds-code-block":if(!customElements.get(a(e))){n()}break;case"ds-icon":if(!customElements.get(a(e))){i()}break;case"ds-loader":if(!customElements.get(a(e))){c()}break;case"ds-text":if(!customElements.get(a(e))){h()}break;case"ds-tooltip":if(!customElements.get(a(e))){m()}break}}))}g();export{k as M,g as d};
2
+ //# sourceMappingURL=p-P60MGUqZ.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as t,c as i,h as s,a as n,t as a}from"./index.js";import{d as r}from"./p-DQpw21HO.js";import{d as o}from"./p-DP75OhfU.js";import{d}from"./p-CG4Fp3SY.js";import{d as u}from"./p-DFOhxUQP.js";import{d as c}from"./p-Cea7rROU.js";import{d as l}from"./p-0XTyQNRG.js";import{d as h}from"./p-BTsFFzfR.js";import{d as g}from"./p-B9oadFSC.js";import{d as q}from"./p-JuKGR7Ay.js";function p(e,t){return e.find((e=>e.questionId===t))}function m(e,t){return Object.fromEntries(e.map((e=>{const i=p(t,e.id);const s=new Set(e.choices?.map((e=>e.value))??[]);if(e.type==="multiple"){const t=Array.isArray(i?.value)?i.value:[];const n=t.filter((e=>s.has(e)));const a=t.find((e=>!s.has(e)))??"";return[e.id,{value:n,otherSelected:Boolean(e.allowOther&&a),otherText:e.allowOther?a:"",skipped:i?.value===null}]}const n=typeof i?.value==="string"?i.value:"";const a=e.type==="single"&&s.has(n);return[e.id,{value:e.type==="single"&&!a?"":n,otherSelected:Boolean(e.type==="single"&&e.allowOther&&n&&!a),otherText:e.type==="single"&&e.allowOther&&n&&!a?n:"",skipped:i?.value===null}]})))}function f(e,t){if(t.skipped)return{questionId:e.id,value:null};if(e.type==="multiple"){const i=Array.isArray(t.value)?[...t.value]:[];if(t.otherSelected&&t.otherText.trim())i.push(t.otherText.trim());return{questionId:e.id,value:i.length||e.required?i:null}}if(t.otherSelected){const i=t.otherText.trim();return{questionId:e.id,value:i||null}}const i=typeof t.value==="string"?t.value.trim():"";return{questionId:e.id,value:i||null}}function b(e,t){if((e.type==="single"||e.type==="multiple")&&!e.choices?.length){return"This question has no available choices."}if(t.otherSelected&&!t.otherText.trim()){return"Enter a response for Other."}if(!e.required||t.skipped)return undefined;const i=f(e,t).value;const s=i===null||Array.isArray(i)&&i.length===0;if(!s)return undefined;return e.type==="text"?"Enter an answer before continuing.":"Choose an answer before continuing."}function _(e,t){if(!t||t.value===null)return"Skipped";const i=Array.isArray(t.value)?t.value:[t.value];const s=new Map(e.choices?.map((e=>[e.value,e.label]))??[]);return i.map((e=>s.get(e)??e)).join(", ")}const v=()=>`@media (forced-colors: active){.sc-ds-agent-questionnaire:root,.sc-ds-agent-questionnaire-h,.ds-forced-colors-scope.sc-ds-agent-questionnaire{--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-visually-hidden.sc-ds-agent-questionnaire-h,.ds-visually-hidden.sc-ds-agent-questionnaire{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.sc-ds-agent-questionnaire-h{display:block;width:100%;min-width:0;box-sizing:border-box;-webkit-user-select:none;user-select:none}.questionnaire.sc-ds-agent-questionnaire{display:grid;gap:var(--dimension-space-150);width:100%;padding:var(--dimension-space-200);border-radius:var(--dimension-radius-125);background:var(--color-background-primary);box-shadow:var(--effect-elevation-elevated-md);box-sizing:border-box}.questionnaire--answered.sc-ds-agent-questionnaire{gap:var(--dimension-space-100);padding:var(--dimension-space-150);background:var(--color-background-secondary);box-shadow:none}.questionnaire--preparing.sc-ds-agent-questionnaire{align-items:center;grid-template-columns:auto minmax(0, 1fr)}.questionnaire__header.sc-ds-agent-questionnaire,.questionnaire__actions.sc-ds-agent-questionnaire,.questionnaire__actions-leading.sc-ds-agent-questionnaire,.questionnaire__error.sc-ds-agent-questionnaire,.questionnaire__submission-error.sc-ds-agent-questionnaire{display:flex;align-items:center}.questionnaire__header.sc-ds-agent-questionnaire,.questionnaire__actions.sc-ds-agent-questionnaire{justify-content:space-between;gap:var(--dimension-space-100)}.questionnaire__body.sc-ds-agent-questionnaire,.questionnaire__prompt.sc-ds-agent-questionnaire,.questionnaire__choices.sc-ds-agent-questionnaire,.questionnaire__single-choice.sc-ds-agent-questionnaire,.questionnaire__multiple-choice.sc-ds-agent-questionnaire,.questionnaire__other-choice.sc-ds-agent-questionnaire,.questionnaire__summary.sc-ds-agent-questionnaire,.questionnaire__summary.sc-ds-agent-questionnaire li.sc-ds-agent-questionnaire{display:grid}.questionnaire__body.sc-ds-agent-questionnaire,.questionnaire__prompt.sc-ds-agent-questionnaire,.questionnaire__choices.sc-ds-agent-questionnaire,.questionnaire__single-choice.sc-ds-agent-questionnaire,.questionnaire__multiple-choice.sc-ds-agent-questionnaire,.questionnaire__other-choice.sc-ds-agent-questionnaire{gap:var(--dimension-space-100)}.questionnaire__choices.sc-ds-agent-questionnaire{min-width:0;margin:0;padding:0;border:0}ds-radio.sc-ds-agent-questionnaire,ds-checkbox.sc-ds-agent-questionnaire{width:100%;min-width:0}.questionnaire__other-input.sc-ds-agent-questionnaire,.questionnaire__text-input.sc-ds-agent-questionnaire{width:100%;padding:var(--dimension-space-100);border:var(--dimension-stroke-width-012) solid var(--color-border-secondary);border-radius:var(--dimension-radius-050);outline:none;background:var(--color-background-primary);color:var(--color-foreground-primary);font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);font-weight:var(--typography-weight-regular);line-height:var(--typography-lineheight-md);letter-spacing:var(--typography-letterspacing-negative-half);box-sizing:border-box;-webkit-user-select:text;user-select:text}.questionnaire__other-input.sc-ds-agent-questionnaire{width:calc(100% - var(--dimension-size-500));margin-inline-start:var(--dimension-size-500)}.questionnaire__text-input.sc-ds-agent-questionnaire{min-height:calc(var(--typography-lineheight-md) * 4 + var(--dimension-space-200));resize:vertical}.questionnaire__other-input.sc-ds-agent-questionnaire:focus,.questionnaire__text-input.sc-ds-agent-questionnaire:focus{border-color:var(--color-border-bold-brand);box-shadow:inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand)}.questionnaire__other-input[aria-invalid='true'].sc-ds-agent-questionnaire,.questionnaire__text-input[aria-invalid='true'].sc-ds-agent-questionnaire{border-color:var(--color-border-bold-negative)}.questionnaire__error.sc-ds-agent-questionnaire,.questionnaire__submission-error.sc-ds-agent-questionnaire{gap:var(--dimension-space-050);color:var(--color-foreground-bold-negative)}.questionnaire__submission-error.sc-ds-agent-questionnaire{padding:var(--dimension-space-075);border-radius:var(--dimension-radius-050);background:var(--color-background-faint-negative)}.questionnaire__actions-leading.sc-ds-agent-questionnaire{flex-wrap:wrap;gap:var(--dimension-space-075)}.questionnaire__action-item.sc-ds-agent-questionnaire{width:fit-content;max-width:100%}.questionnaire.sc-ds-agent-questionnaire textarea.sc-ds-agent-questionnaire:disabled{color:var(--color-foreground-tertiary);cursor:default;opacity:1}.questionnaire__summary.sc-ds-agent-questionnaire{gap:var(--dimension-space-100);margin:0;padding:0;list-style:none}.questionnaire__summary.sc-ds-agent-questionnaire li.sc-ds-agent-questionnaire{gap:var(--dimension-space-025)}@media (max-width: 480px){.questionnaire.sc-ds-agent-questionnaire{padding:var(--dimension-space-150)}.questionnaire__actions.sc-ds-agent-questionnaire{align-items:stretch;flex-direction:column}.questionnaire__actions-leading.sc-ds-agent-questionnaire{display:grid;grid-template-columns:minmax(0, 1fr);width:100%}.questionnaire__action-item.sc-ds-agent-questionnaire,.questionnaire__action-item--primary.sc-ds-agent-questionnaire{width:100%}}@media (forced-colors: active){.questionnaire.sc-ds-agent-questionnaire{border:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);box-shadow:none}.questionnaire__other-input[aria-invalid='true'].sc-ds-agent-questionnaire,.questionnaire__text-input[aria-invalid='true'].sc-ds-agent-questionnaire{outline:var(--dimension-stroke-width-025) dashed var(--ds-forced-color-content)}.questionnaire__submission-error.sc-ds-agent-questionnaire{border:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);background:var(--ds-forced-color-surface)}.questionnaire.sc-ds-agent-questionnaire input.sc-ds-agent-questionnaire:disabled,.questionnaire.sc-ds-agent-questionnaire textarea.sc-ds-agent-questionnaire:disabled{color:var(--ds-forced-color-disabled)}}`;const x={progress:"Question {current} of {total}",previous:"Previous",next:"Next",answer:"Answer",skip:"Skip",cancel:"Cancel",other:"Other",otherPlaceholder:"Enter another answer",preparing:"Preparing questions…"};let y=0;const w=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.dsAnswer=i(this,"dsAnswer",7);this.dsCancel=i(this,"dsCancel",7);this.answers=[];this.status="ready";this.allowCancel=false;this.currentStep=0;this.drafts={};this.validation={};this.instanceId=++y;this.otherValue=`__ds-agent-questionnaire-other-${this.instanceId}`;this.answerPending=false;this.resetScheduled=false;this.answersSnapshot=[];this.waitingForRequestAnswers=false}componentWillLoad(){this.draftRequestId=this.requestId;this.answersSnapshot=this.answers;this.resetDraft()}handleQuestionnaireInputChange(){this.scheduleDraftReset()}handleStatusChange(e){if(e!=="submitting")this.answerPending=false}async setFocus(){this.focusCurrentControl()}get copy(){return{...x,...this.labels}}get disabled(){return this.status==="submitting"}resetDraft(e=this.answers){this.currentStep=0;this.drafts=m(this.questions??[],e??[]);this.validation={};this.answerPending=false}scheduleDraftReset(){if(this.resetScheduled)return;this.resetScheduled=true;queueMicrotask((()=>{this.resetScheduled=false;const e=this.requestId!==this.draftRequestId;const t=this.answers!==this.answersSnapshot;if(e&&!t){this.waitingForRequestAnswers=true}else if(t){this.waitingForRequestAnswers=false}this.resetDraft(this.waitingForRequestAnswers?[]:this.answers);this.draftRequestId=this.requestId;this.answersSnapshot=this.answers}))}focusCurrentControl(e=false){const t=()=>{const t=e?this.el.querySelector('[data-question-control][aria-invalid="true"]:not([disabled])'):null;const i=t??this.el.querySelector("[data-question-control]:not([disabled]):not([is-inactive])");const s=this.el.querySelector("[data-question-action]:not([is-inactive]):not([is-loading])");const n=i??s;if(n?.setFocus)void n.setFocus();else n?.focus()};t();requestAnimationFrame(t);setTimeout(t,0)}updateDraft(e,t){const i=this.drafts[e]??{value:"",otherSelected:false,otherText:"",skipped:false};this.drafts={...this.drafts,[e]:{...i,...t,skipped:false}};if(this.validation[e]){const{[e]:t,...i}=this.validation;this.validation=i}}validate(e){const t=b(e,this.drafts[e.id]);if(!t)return true;this.validation={...this.validation,[e.id]:t};this.focusCurrentControl(true);return false}move(e){this.currentStep=Math.min(Math.max(e,0),this.questions.length-1);this.focusCurrentControl()}next(e){if(!this.validate(e))return;this.move(this.currentStep+1)}skip(e){if(e.required)return;this.drafts={...this.drafts,[e.id]:{...this.drafts[e.id]??{value:"",otherSelected:false,otherText:""},skipped:true}};if(this.currentStep<this.questions.length-1)this.move(this.currentStep+1);else this.submit()}submit(){if(this.disabled||this.answerPending)return;const e=this.questions.findIndex((e=>!this.validateWithoutFocus(e)));if(e>=0){this.currentStep=e;this.focusCurrentControl(true);return}this.answerPending=true;this.dsAnswer.emit({requestId:this.requestId,answers:this.questions.map((e=>f(e,this.drafts[e.id])))})}validateWithoutFocus(e){const t=b(e,this.drafts[e.id]);if(!t)return true;this.validation={...this.validation,[e.id]:t};return false}progressLabel(){return this.copy.progress.split("{current}").join(String(this.currentStep+1)).split("{total}").join(String(this.questions.length))}selectSingle(e,t){const i=t===this.otherValue;this.updateDraft(e.id,{value:i?"":t,otherSelected:i});if(i){requestAnimationFrame((()=>this.el.querySelector("[data-question-other-input]")?.focus()))}}renderSingleChoice(e,t,i){const n=this.drafts[e.id];const a=n.otherSelected?this.otherValue:typeof n.value==="string"?n.value:"";const r=[...e.choices??[],...e.allowOther?[{value:this.otherValue,label:this.copy.other}]:[]];return s("div",{class:"questionnaire__single-choice"},s("ds-radio",{"data-question-control":true,size:"lg",options:r,value:a,disabled:this.disabled,form:`ds-agent-questionnaire-detached-${this.instanceId}`,ariaLabelledby:t,"aria-describedby":this.validation[e.id]?i:undefined,onDsChange:t=>this.selectSingle(e,t.detail)}),n.otherSelected?this.renderOtherInput(e,i):null)}renderMultipleChoice(e,t){const i=this.drafts[e.id];const n=Array.isArray(i.value)?i.value:[];const a=`ds-agent-questionnaire-detached-${this.instanceId}`;return s("div",{class:"questionnaire__multiple-choice"},e.choices?.map((t=>s("ds-checkbox",{key:t.value,"data-question-control":true,size:"lg",label:t.label,description:t.description,value:t.value,checked:n.includes(t.value),disabled:this.disabled,form:a,onDsChange:i=>{this.updateDraft(e.id,{value:i.detail?[...n,t.value]:n.filter((e=>e!==t.value))})}}))),e.allowOther?s("div",{class:"questionnaire__other-choice"},s("ds-checkbox",{"data-question-control":true,size:"lg",label:this.copy.other,checked:i.otherSelected,disabled:this.disabled,form:a,onDsChange:t=>{this.updateDraft(e.id,{otherSelected:t.detail});if(t.detail){requestAnimationFrame((()=>this.el.querySelector("[data-question-other-input]")?.focus()))}}}),i.otherSelected?this.renderOtherInput(e,t):null):null)}renderOtherInput(e,t){const i=this.drafts[e.id];return s("input",{class:"questionnaire__other-input","data-question-control":true,"data-question-other-input":true,type:"text",form:`ds-agent-questionnaire-detached-${this.instanceId}`,value:i.otherText,placeholder:this.copy.otherPlaceholder,"aria-label":this.copy.other,"aria-invalid":this.validation[e.id]?"true":undefined,"aria-describedby":this.validation[e.id]?t:undefined,disabled:this.disabled,onInput:t=>this.updateDraft(e.id,{otherText:t.target.value})})}renderQuestion(e){const t=this.drafts[e.id];const i=`ds-agent-questionnaire-${this.instanceId}-${this.currentStep}-error`;const n=`ds-agent-questionnaire-${this.instanceId}-${this.currentStep}-prompt`;return s("div",{class:"questionnaire__body"},s("div",{class:"questionnaire__prompt"},s("ds-text",{as:"h2",variant:"text-title-small",textId:n},e.question),e.description?s("ds-text",{variant:"text-body-small",color:"secondary"},e.description):null),e.type==="text"?s("textarea",{class:"questionnaire__text-input","data-question-control":true,value:typeof t.value==="string"?t.value:"",form:`ds-agent-questionnaire-detached-${this.instanceId}`,placeholder:e.placeholder,"aria-label":e.question,"aria-invalid":this.validation[e.id]?"true":undefined,"aria-describedby":this.validation[e.id]?i:undefined,disabled:this.disabled,rows:4,onInput:t=>this.updateDraft(e.id,{value:t.target.value})}):s("fieldset",{class:"questionnaire__choices","aria-describedby":this.validation[e.id]?i:undefined},s("legend",{class:"ds-visually-hidden"},e.question),e.type==="single"?this.renderSingleChoice(e,n,i):this.renderMultipleChoice(e,i)),this.validation[e.id]?s("div",{id:i,class:"questionnaire__error",role:"alert"},s("ds-icon",{name:"ErrorTriangle",size:"xs",color:"inherit"}),s("ds-text",{variant:"text-body-small",color:"negative"},this.validation[e.id])):null)}renderAnswered(){return s("div",{class:"questionnaire questionnaire--answered"},s("ol",{class:"questionnaire__summary"},this.questions.map((e=>s("li",null,s("ds-text",{variant:"text-body-small",emphasis:true},e.question),s("ds-text",{variant:"text-body-small",color:"secondary"},_(e,this.answers.find((t=>t.questionId===e.id)))))))))}render(){if(this.status==="preparing"){return s(n,null,s("div",{class:"questionnaire questionnaire--preparing",role:"status"},s("ds-loader",{size:"sm"}),s("ds-text",{variant:"text-body-medium"},this.copy.preparing)))}if(!this.questions?.length)return null;if(this.status==="answered")return s(n,null,this.renderAnswered());const e=this.questions[this.currentStep];const t=this.currentStep===this.questions.length-1;const i=Boolean(e.skippable&&!e.required);return s(n,null,s("section",{class:{questionnaire:true,"questionnaire--submitting":this.disabled,"questionnaire--error":this.status==="error"},"aria-busy":this.disabled?"true":undefined,"aria-label":e.question},s("header",{class:"questionnaire__header"},s("ds-text",{variant:"text-caption",color:"secondary"},this.progressLabel()),this.allowCancel?s("ds-tooltip",{label:this.copy.cancel,side:"top",size:"sm"},s("ds-button-unfilled",{"data-question-action":true,variant:"icon",icon:"Cross",size:"sm","aria-label":this.copy.cancel,hasBorder:false,isInactive:this.disabled,onDsClick:()=>this.dsCancel.emit({requestId:this.requestId})})):null),this.renderQuestion(e),this.status==="error"&&this.errorMessage?s("div",{class:"questionnaire__submission-error",role:"alert"},s("ds-icon",{name:"ErrorTriangle",size:"xs",color:"inherit"}),s("ds-text",{variant:"text-body-small",color:"negative"},this.errorMessage)):null,s("footer",{class:"questionnaire__actions"},s("div",{class:"questionnaire__actions-leading"},this.currentStep>0?s("div",{class:"questionnaire__action-item"},s("ds-button-unfilled",{"data-question-action":true,label:this.copy.previous,size:"sm",width:"fill",isInactive:this.disabled,onDsClick:()=>this.move(this.currentStep-1)})):null,i?s("div",{class:"questionnaire__action-item"},s("ds-button-unfilled",{"data-question-action":true,label:this.copy.skip,size:"sm",width:"fill",hasBorder:false,isInactive:this.disabled,onDsClick:()=>this.skip(e)})):null),s("div",{class:"questionnaire__action-item questionnaire__action-item--primary"},s("ds-button-filled",{"data-question-action":true,label:t?this.copy.answer:this.copy.next,size:"sm",width:"fill",isLoading:this.disabled,onDsClick:()=>t?this.submit():this.next(e)})))))}get el(){return this}static get watchers(){return{requestId:[{handleQuestionnaireInputChange:0}],questions:[{handleQuestionnaireInputChange:0}],answers:[{handleQuestionnaireInputChange:0}],status:[{handleStatusChange:0}]}}static get style(){return v()}},[2,"ds-agent-questionnaire",{requestId:[1,"request-id"],questions:[16],answers:[16],status:[1],errorMessage:[1,"error-message"],allowCancel:[4,"allow-cancel"],labels:[16],currentStep:[32],drafts:[32],validation:[32],setFocus:[64]},undefined,{requestId:[{handleQuestionnaireInputChange:0}],questions:[{handleQuestionnaireInputChange:0}],answers:[{handleQuestionnaireInputChange:0}],status:[{handleStatusChange:0}]}]);function k(){if(typeof customElements==="undefined"){return}const e=["ds-agent-questionnaire","ds-badge","ds-button-filled","ds-button-unfilled","ds-checkbox","ds-icon","ds-loader","ds-radio","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-agent-questionnaire":if(!customElements.get(a(e))){customElements.define(a(e),w)}break;case"ds-badge":if(!customElements.get(a(e))){r()}break;case"ds-button-filled":if(!customElements.get(a(e))){o()}break;case"ds-button-unfilled":if(!customElements.get(a(e))){d()}break;case"ds-checkbox":if(!customElements.get(a(e))){u()}break;case"ds-icon":if(!customElements.get(a(e))){c()}break;case"ds-loader":if(!customElements.get(a(e))){l()}break;case"ds-radio":if(!customElements.get(a(e))){h()}break;case"ds-text":if(!customElements.get(a(e))){g()}break;case"ds-tooltip":if(!customElements.get(a(e))){q()}break}}))}k();export{w as A,k as d};
2
- //# sourceMappingURL=p-Bu-gu0mN.js.map
1
+ import{p as e,H as t,c as i,h as s,a as n,t as a}from"./index.js";import{d as r}from"./p-DQpw21HO.js";import{d as o}from"./p-CumGY3uN.js";import{d}from"./p-CD9AbaHQ.js";import{d as u}from"./p-z7Zj26BA.js";import{d as c}from"./p-Cea7rROU.js";import{d as l}from"./p-0XTyQNRG.js";import{d as h}from"./p-r5td84fg.js";import{d as g}from"./p-B9oadFSC.js";import{d as q}from"./p-14sMoeTr.js";function p(e,t){return e.find((e=>e.questionId===t))}function m(e,t){return Object.fromEntries(e.map((e=>{const i=p(t,e.id);const s=new Set(e.choices?.map((e=>e.value))??[]);if(e.type==="multiple"){const t=Array.isArray(i?.value)?i.value:[];const n=t.filter((e=>s.has(e)));const a=t.find((e=>!s.has(e)))??"";return[e.id,{value:n,otherSelected:Boolean(e.allowOther&&a),otherText:e.allowOther?a:"",skipped:i?.value===null}]}const n=typeof i?.value==="string"?i.value:"";const a=e.type==="single"&&s.has(n);return[e.id,{value:e.type==="single"&&!a?"":n,otherSelected:Boolean(e.type==="single"&&e.allowOther&&n&&!a),otherText:e.type==="single"&&e.allowOther&&n&&!a?n:"",skipped:i?.value===null}]})))}function f(e,t){if(t.skipped)return{questionId:e.id,value:null};if(e.type==="multiple"){const i=Array.isArray(t.value)?[...t.value]:[];if(t.otherSelected&&t.otherText.trim())i.push(t.otherText.trim());return{questionId:e.id,value:i.length||e.required?i:null}}if(t.otherSelected){const i=t.otherText.trim();return{questionId:e.id,value:i||null}}const i=typeof t.value==="string"?t.value.trim():"";return{questionId:e.id,value:i||null}}function b(e,t){if((e.type==="single"||e.type==="multiple")&&!e.choices?.length){return"This question has no available choices."}if(t.otherSelected&&!t.otherText.trim()){return"Enter a response for Other."}if(!e.required||t.skipped)return undefined;const i=f(e,t).value;const s=i===null||Array.isArray(i)&&i.length===0;if(!s)return undefined;return e.type==="text"?"Enter an answer before continuing.":"Choose an answer before continuing."}function _(e,t){if(!t||t.value===null)return"Skipped";const i=Array.isArray(t.value)?t.value:[t.value];const s=new Map(e.choices?.map((e=>[e.value,e.label]))??[]);return i.map((e=>s.get(e)??e)).join(", ")}const v=()=>`@media (forced-colors: active){.sc-ds-agent-questionnaire:root,.sc-ds-agent-questionnaire-h,.ds-forced-colors-scope.sc-ds-agent-questionnaire{--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-visually-hidden.sc-ds-agent-questionnaire-h,.ds-visually-hidden.sc-ds-agent-questionnaire{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.sc-ds-agent-questionnaire-h{display:block;width:100%;min-width:0;box-sizing:border-box;-webkit-user-select:none;user-select:none}.questionnaire.sc-ds-agent-questionnaire{display:grid;gap:var(--dimension-space-150);width:100%;padding:var(--dimension-space-200);border-radius:var(--dimension-radius-125);background:var(--color-background-primary);box-shadow:var(--effect-elevation-elevated-md);box-sizing:border-box}.questionnaire--answered.sc-ds-agent-questionnaire{gap:var(--dimension-space-100);padding:var(--dimension-space-150);background:var(--color-background-secondary);box-shadow:none}.questionnaire--preparing.sc-ds-agent-questionnaire{align-items:center;grid-template-columns:auto minmax(0, 1fr)}.questionnaire__header.sc-ds-agent-questionnaire,.questionnaire__actions.sc-ds-agent-questionnaire,.questionnaire__actions-leading.sc-ds-agent-questionnaire,.questionnaire__error.sc-ds-agent-questionnaire,.questionnaire__submission-error.sc-ds-agent-questionnaire{display:flex;align-items:center}.questionnaire__header.sc-ds-agent-questionnaire,.questionnaire__actions.sc-ds-agent-questionnaire{justify-content:space-between;gap:var(--dimension-space-100)}.questionnaire__body.sc-ds-agent-questionnaire,.questionnaire__prompt.sc-ds-agent-questionnaire,.questionnaire__choices.sc-ds-agent-questionnaire,.questionnaire__single-choice.sc-ds-agent-questionnaire,.questionnaire__multiple-choice.sc-ds-agent-questionnaire,.questionnaire__other-choice.sc-ds-agent-questionnaire,.questionnaire__summary.sc-ds-agent-questionnaire,.questionnaire__summary.sc-ds-agent-questionnaire li.sc-ds-agent-questionnaire{display:grid}.questionnaire__body.sc-ds-agent-questionnaire,.questionnaire__prompt.sc-ds-agent-questionnaire,.questionnaire__choices.sc-ds-agent-questionnaire,.questionnaire__single-choice.sc-ds-agent-questionnaire,.questionnaire__multiple-choice.sc-ds-agent-questionnaire,.questionnaire__other-choice.sc-ds-agent-questionnaire{gap:var(--dimension-space-100)}.questionnaire__choices.sc-ds-agent-questionnaire{min-width:0;margin:0;padding:0;border:0}ds-radio.sc-ds-agent-questionnaire,ds-checkbox.sc-ds-agent-questionnaire{width:100%;min-width:0}.questionnaire__other-input.sc-ds-agent-questionnaire,.questionnaire__text-input.sc-ds-agent-questionnaire{width:100%;padding:var(--dimension-space-100);border:var(--dimension-stroke-width-012) solid var(--color-border-secondary);border-radius:var(--dimension-radius-050);outline:none;background:var(--color-background-primary);color:var(--color-foreground-primary);font-family:var(--typography-font-family-ui);font-size:var(--typography-fontsize-md);font-weight:var(--typography-weight-regular);line-height:var(--typography-lineheight-md);letter-spacing:var(--typography-letterspacing-negative-half);box-sizing:border-box;-webkit-user-select:text;user-select:text}.questionnaire__other-input.sc-ds-agent-questionnaire{width:calc(100% - var(--dimension-size-500));margin-inline-start:var(--dimension-size-500)}.questionnaire__text-input.sc-ds-agent-questionnaire{min-height:calc(var(--typography-lineheight-md) * 4 + var(--dimension-space-200));resize:vertical}.questionnaire__other-input.sc-ds-agent-questionnaire:focus,.questionnaire__text-input.sc-ds-agent-questionnaire:focus{border-color:var(--color-border-bold-brand);box-shadow:inset 0 0 0 var(--dimension-stroke-width-018) var(--color-border-bold-brand)}.questionnaire__other-input[aria-invalid='true'].sc-ds-agent-questionnaire,.questionnaire__text-input[aria-invalid='true'].sc-ds-agent-questionnaire{border-color:var(--color-border-bold-negative)}.questionnaire__error.sc-ds-agent-questionnaire,.questionnaire__submission-error.sc-ds-agent-questionnaire{gap:var(--dimension-space-050);color:var(--color-foreground-bold-negative)}.questionnaire__submission-error.sc-ds-agent-questionnaire{padding:var(--dimension-space-075);border-radius:var(--dimension-radius-050);background:var(--color-background-faint-negative)}.questionnaire__actions-leading.sc-ds-agent-questionnaire{flex-wrap:wrap;gap:var(--dimension-space-075)}.questionnaire__action-item.sc-ds-agent-questionnaire{width:fit-content;max-width:100%}.questionnaire.sc-ds-agent-questionnaire textarea.sc-ds-agent-questionnaire:disabled{color:var(--color-foreground-tertiary);cursor:default;opacity:1}.questionnaire__summary.sc-ds-agent-questionnaire{gap:var(--dimension-space-100);margin:0;padding:0;list-style:none}.questionnaire__summary.sc-ds-agent-questionnaire li.sc-ds-agent-questionnaire{gap:var(--dimension-space-025)}@media (max-width: 480px){.questionnaire.sc-ds-agent-questionnaire{padding:var(--dimension-space-150)}.questionnaire__actions.sc-ds-agent-questionnaire{align-items:stretch;flex-direction:column}.questionnaire__actions-leading.sc-ds-agent-questionnaire{display:grid;grid-template-columns:minmax(0, 1fr);width:100%}.questionnaire__action-item.sc-ds-agent-questionnaire,.questionnaire__action-item--primary.sc-ds-agent-questionnaire{width:100%}}@media (forced-colors: active){.questionnaire.sc-ds-agent-questionnaire{border:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);box-shadow:none}.questionnaire__other-input[aria-invalid='true'].sc-ds-agent-questionnaire,.questionnaire__text-input[aria-invalid='true'].sc-ds-agent-questionnaire{outline:var(--dimension-stroke-width-025) dashed var(--ds-forced-color-content)}.questionnaire__submission-error.sc-ds-agent-questionnaire{border:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);background:var(--ds-forced-color-surface)}.questionnaire.sc-ds-agent-questionnaire input.sc-ds-agent-questionnaire:disabled,.questionnaire.sc-ds-agent-questionnaire textarea.sc-ds-agent-questionnaire:disabled{color:var(--ds-forced-color-disabled)}}`;const x={progress:"Question {current} of {total}",previous:"Previous",next:"Next",answer:"Answer",skip:"Skip",cancel:"Cancel",other:"Other",otherPlaceholder:"Enter another answer",preparing:"Preparing questions…"};let y=0;const w=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.dsAnswer=i(this,"dsAnswer",7);this.dsCancel=i(this,"dsCancel",7);this.answers=[];this.status="ready";this.allowCancel=false;this.currentStep=0;this.drafts={};this.validation={};this.instanceId=++y;this.otherValue=`__ds-agent-questionnaire-other-${this.instanceId}`;this.answerPending=false;this.resetScheduled=false;this.answersSnapshot=[];this.waitingForRequestAnswers=false}componentWillLoad(){this.draftRequestId=this.requestId;this.answersSnapshot=this.answers;this.resetDraft()}handleQuestionnaireInputChange(){this.scheduleDraftReset()}handleStatusChange(e){if(e!=="submitting")this.answerPending=false}async setFocus(){this.focusCurrentControl()}get copy(){return{...x,...this.labels}}get disabled(){return this.status==="submitting"}resetDraft(e=this.answers){this.currentStep=0;this.drafts=m(this.questions??[],e??[]);this.validation={};this.answerPending=false}scheduleDraftReset(){if(this.resetScheduled)return;this.resetScheduled=true;queueMicrotask((()=>{this.resetScheduled=false;const e=this.requestId!==this.draftRequestId;const t=this.answers!==this.answersSnapshot;if(e&&!t){this.waitingForRequestAnswers=true}else if(t){this.waitingForRequestAnswers=false}this.resetDraft(this.waitingForRequestAnswers?[]:this.answers);this.draftRequestId=this.requestId;this.answersSnapshot=this.answers}))}focusCurrentControl(e=false){const t=()=>{const t=e?this.el.querySelector('[data-question-control][aria-invalid="true"]:not([disabled])'):null;const i=t??this.el.querySelector("[data-question-control]:not([disabled]):not([is-inactive])");const s=this.el.querySelector("[data-question-action]:not([is-inactive]):not([is-loading])");const n=i??s;if(n?.setFocus)void n.setFocus();else n?.focus()};t();requestAnimationFrame(t);setTimeout(t,0)}updateDraft(e,t){const i=this.drafts[e]??{value:"",otherSelected:false,otherText:"",skipped:false};this.drafts={...this.drafts,[e]:{...i,...t,skipped:false}};if(this.validation[e]){const{[e]:t,...i}=this.validation;this.validation=i}}validate(e){const t=b(e,this.drafts[e.id]);if(!t)return true;this.validation={...this.validation,[e.id]:t};this.focusCurrentControl(true);return false}move(e){this.currentStep=Math.min(Math.max(e,0),this.questions.length-1);this.focusCurrentControl()}next(e){if(!this.validate(e))return;this.move(this.currentStep+1)}skip(e){if(e.required)return;this.drafts={...this.drafts,[e.id]:{...this.drafts[e.id]??{value:"",otherSelected:false,otherText:""},skipped:true}};if(this.currentStep<this.questions.length-1)this.move(this.currentStep+1);else this.submit()}submit(){if(this.disabled||this.answerPending)return;const e=this.questions.findIndex((e=>!this.validateWithoutFocus(e)));if(e>=0){this.currentStep=e;this.focusCurrentControl(true);return}this.answerPending=true;this.dsAnswer.emit({requestId:this.requestId,answers:this.questions.map((e=>f(e,this.drafts[e.id])))})}validateWithoutFocus(e){const t=b(e,this.drafts[e.id]);if(!t)return true;this.validation={...this.validation,[e.id]:t};return false}progressLabel(){return this.copy.progress.split("{current}").join(String(this.currentStep+1)).split("{total}").join(String(this.questions.length))}selectSingle(e,t){const i=t===this.otherValue;this.updateDraft(e.id,{value:i?"":t,otherSelected:i});if(i){requestAnimationFrame((()=>this.el.querySelector("[data-question-other-input]")?.focus()))}}renderSingleChoice(e,t,i){const n=this.drafts[e.id];const a=n.otherSelected?this.otherValue:typeof n.value==="string"?n.value:"";const r=[...e.choices??[],...e.allowOther?[{value:this.otherValue,label:this.copy.other}]:[]];return s("div",{class:"questionnaire__single-choice"},s("ds-radio",{"data-question-control":true,size:"lg",options:r,value:a,disabled:this.disabled,form:`ds-agent-questionnaire-detached-${this.instanceId}`,ariaLabelledby:t,"aria-describedby":this.validation[e.id]?i:undefined,onDsChange:t=>this.selectSingle(e,t.detail)}),n.otherSelected?this.renderOtherInput(e,i):null)}renderMultipleChoice(e,t){const i=this.drafts[e.id];const n=Array.isArray(i.value)?i.value:[];const a=`ds-agent-questionnaire-detached-${this.instanceId}`;return s("div",{class:"questionnaire__multiple-choice"},e.choices?.map((t=>s("ds-checkbox",{key:t.value,"data-question-control":true,size:"lg",label:t.label,description:t.description,value:t.value,checked:n.includes(t.value),disabled:this.disabled,form:a,onDsChange:i=>{this.updateDraft(e.id,{value:i.detail?[...n,t.value]:n.filter((e=>e!==t.value))})}}))),e.allowOther?s("div",{class:"questionnaire__other-choice"},s("ds-checkbox",{"data-question-control":true,size:"lg",label:this.copy.other,checked:i.otherSelected,disabled:this.disabled,form:a,onDsChange:t=>{this.updateDraft(e.id,{otherSelected:t.detail});if(t.detail){requestAnimationFrame((()=>this.el.querySelector("[data-question-other-input]")?.focus()))}}}),i.otherSelected?this.renderOtherInput(e,t):null):null)}renderOtherInput(e,t){const i=this.drafts[e.id];return s("input",{class:"questionnaire__other-input","data-question-control":true,"data-question-other-input":true,type:"text",form:`ds-agent-questionnaire-detached-${this.instanceId}`,value:i.otherText,placeholder:this.copy.otherPlaceholder,"aria-label":this.copy.other,"aria-invalid":this.validation[e.id]?"true":undefined,"aria-describedby":this.validation[e.id]?t:undefined,disabled:this.disabled,onInput:t=>this.updateDraft(e.id,{otherText:t.target.value})})}renderQuestion(e){const t=this.drafts[e.id];const i=`ds-agent-questionnaire-${this.instanceId}-${this.currentStep}-error`;const n=`ds-agent-questionnaire-${this.instanceId}-${this.currentStep}-prompt`;return s("div",{class:"questionnaire__body"},s("div",{class:"questionnaire__prompt"},s("ds-text",{as:"h2",variant:"text-title-small",textId:n},e.question),e.description?s("ds-text",{variant:"text-body-small",color:"secondary"},e.description):null),e.type==="text"?s("textarea",{class:"questionnaire__text-input","data-question-control":true,value:typeof t.value==="string"?t.value:"",form:`ds-agent-questionnaire-detached-${this.instanceId}`,placeholder:e.placeholder,"aria-label":e.question,"aria-invalid":this.validation[e.id]?"true":undefined,"aria-describedby":this.validation[e.id]?i:undefined,disabled:this.disabled,rows:4,onInput:t=>this.updateDraft(e.id,{value:t.target.value})}):s("fieldset",{class:"questionnaire__choices","aria-describedby":this.validation[e.id]?i:undefined},s("legend",{class:"ds-visually-hidden"},e.question),e.type==="single"?this.renderSingleChoice(e,n,i):this.renderMultipleChoice(e,i)),this.validation[e.id]?s("div",{id:i,class:"questionnaire__error",role:"alert"},s("ds-icon",{name:"ErrorTriangle",size:"xs",color:"inherit"}),s("ds-text",{variant:"text-body-small",color:"negative"},this.validation[e.id])):null)}renderAnswered(){return s("div",{class:"questionnaire questionnaire--answered"},s("ol",{class:"questionnaire__summary"},this.questions.map((e=>s("li",null,s("ds-text",{variant:"text-body-small",emphasis:true},e.question),s("ds-text",{variant:"text-body-small",color:"secondary"},_(e,this.answers.find((t=>t.questionId===e.id)))))))))}render(){if(this.status==="preparing"){return s(n,null,s("div",{class:"questionnaire questionnaire--preparing",role:"status"},s("ds-loader",{size:"sm"}),s("ds-text",{variant:"text-body-medium"},this.copy.preparing)))}if(!this.questions?.length)return null;if(this.status==="answered")return s(n,null,this.renderAnswered());const e=this.questions[this.currentStep];const t=this.currentStep===this.questions.length-1;const i=Boolean(e.skippable&&!e.required);return s(n,null,s("section",{class:{questionnaire:true,"questionnaire--submitting":this.disabled,"questionnaire--error":this.status==="error"},"aria-busy":this.disabled?"true":undefined,"aria-label":e.question},s("header",{class:"questionnaire__header"},s("ds-text",{variant:"text-caption",color:"secondary"},this.progressLabel()),this.allowCancel?s("ds-tooltip",{label:this.copy.cancel,side:"top",size:"sm"},s("ds-button-unfilled",{"data-question-action":true,variant:"icon",icon:"Cross",size:"sm","aria-label":this.copy.cancel,hasBorder:false,isInactive:this.disabled,onDsClick:()=>this.dsCancel.emit({requestId:this.requestId})})):null),this.renderQuestion(e),this.status==="error"&&this.errorMessage?s("div",{class:"questionnaire__submission-error",role:"alert"},s("ds-icon",{name:"ErrorTriangle",size:"xs",color:"inherit"}),s("ds-text",{variant:"text-body-small",color:"negative"},this.errorMessage)):null,s("footer",{class:"questionnaire__actions"},s("div",{class:"questionnaire__actions-leading"},this.currentStep>0?s("div",{class:"questionnaire__action-item"},s("ds-button-unfilled",{"data-question-action":true,label:this.copy.previous,size:"sm",width:"fill",isInactive:this.disabled,onDsClick:()=>this.move(this.currentStep-1)})):null,i?s("div",{class:"questionnaire__action-item"},s("ds-button-unfilled",{"data-question-action":true,label:this.copy.skip,size:"sm",width:"fill",hasBorder:false,isInactive:this.disabled,onDsClick:()=>this.skip(e)})):null),s("div",{class:"questionnaire__action-item questionnaire__action-item--primary"},s("ds-button-filled",{"data-question-action":true,label:t?this.copy.answer:this.copy.next,size:"sm",width:"fill",isLoading:this.disabled,onDsClick:()=>t?this.submit():this.next(e)})))))}get el(){return this}static get watchers(){return{requestId:[{handleQuestionnaireInputChange:0}],questions:[{handleQuestionnaireInputChange:0}],answers:[{handleQuestionnaireInputChange:0}],status:[{handleStatusChange:0}]}}static get style(){return v()}},[2,"ds-agent-questionnaire",{requestId:[1,"request-id"],questions:[16],answers:[16],status:[1],errorMessage:[1,"error-message"],allowCancel:[4,"allow-cancel"],labels:[16],currentStep:[32],drafts:[32],validation:[32],setFocus:[64]},undefined,{requestId:[{handleQuestionnaireInputChange:0}],questions:[{handleQuestionnaireInputChange:0}],answers:[{handleQuestionnaireInputChange:0}],status:[{handleStatusChange:0}]}]);function k(){if(typeof customElements==="undefined"){return}const e=["ds-agent-questionnaire","ds-badge","ds-button-filled","ds-button-unfilled","ds-checkbox","ds-icon","ds-loader","ds-radio","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-agent-questionnaire":if(!customElements.get(a(e))){customElements.define(a(e),w)}break;case"ds-badge":if(!customElements.get(a(e))){r()}break;case"ds-button-filled":if(!customElements.get(a(e))){o()}break;case"ds-button-unfilled":if(!customElements.get(a(e))){d()}break;case"ds-checkbox":if(!customElements.get(a(e))){u()}break;case"ds-icon":if(!customElements.get(a(e))){c()}break;case"ds-loader":if(!customElements.get(a(e))){l()}break;case"ds-radio":if(!customElements.get(a(e))){h()}break;case"ds-text":if(!customElements.get(a(e))){g()}break;case"ds-tooltip":if(!customElements.get(a(e))){q()}break}}))}k();export{w as A,k as d};
2
+ //# sourceMappingURL=p-UxIgD24y.js.map