@solid-design-system/components 5.15.8 → 5.15.10

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 (268) hide show
  1. package/cdn/chunks/{chunk.FG6UWYSJ.js → chunk.EEEEBBEO.js} +1 -1
  2. package/cdn/chunks/chunk.I4X3XZE2.js +1 -0
  3. package/cdn/components/breadcrumb/breadcrumb.js +1 -1
  4. package/cdn/components/radio-button/radio-button.js +1 -1
  5. package/cdn/custom-elements.json +1 -1
  6. package/cdn/solid-components.bundle.js +2 -2
  7. package/cdn/solid-components.iife.js +2 -2
  8. package/cdn/solid-components.js +1 -1
  9. package/cdn/web-types.json +1 -1
  10. package/cdn-versioned/chunks/chunk.2ISKXAGO.js +1 -1
  11. package/cdn-versioned/chunks/chunk.2SZLINMB.js +1 -1
  12. package/cdn-versioned/chunks/chunk.32O6YP3U.js +1 -1
  13. package/cdn-versioned/chunks/chunk.4IWOUE76.js +1 -1
  14. package/cdn-versioned/chunks/chunk.5OMBHQPA.js +1 -1
  15. package/cdn-versioned/chunks/chunk.5W24KDFU.js +1 -1
  16. package/cdn-versioned/chunks/chunk.7QEBGL6Y.js +1 -1
  17. package/cdn-versioned/chunks/chunk.AJGWUW4E.js +1 -1
  18. package/cdn-versioned/chunks/chunk.ARAGTLEC.js +1 -1
  19. package/cdn-versioned/chunks/chunk.B3AC72EW.js +1 -1
  20. package/cdn-versioned/chunks/chunk.BANM4N77.js +1 -1
  21. package/cdn-versioned/chunks/chunk.CCMQCEZJ.js +1 -1
  22. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  23. package/cdn-versioned/chunks/chunk.CYW6I536.js +1 -1
  24. package/cdn-versioned/chunks/chunk.D6FN3FNE.js +1 -1
  25. package/cdn-versioned/chunks/chunk.D6IMYH3Q.js +1 -1
  26. package/cdn-versioned/chunks/chunk.DVKNQUHU.js +1 -1
  27. package/cdn-versioned/chunks/chunk.EEEEBBEO.js +1 -0
  28. package/cdn-versioned/chunks/chunk.F3XAK7C4.js +1 -1
  29. package/cdn-versioned/chunks/chunk.F7QW7F4F.js +1 -1
  30. package/cdn-versioned/chunks/chunk.FPJ2N37J.js +1 -1
  31. package/cdn-versioned/chunks/chunk.FQOZZTCK.js +1 -1
  32. package/cdn-versioned/chunks/chunk.FXVHSWNW.js +1 -1
  33. package/cdn-versioned/chunks/chunk.GFZEUCMA.js +1 -1
  34. package/cdn-versioned/chunks/chunk.GLIPGQCF.js +1 -1
  35. package/cdn-versioned/chunks/chunk.GSFHXYDA.js +1 -1
  36. package/cdn-versioned/chunks/chunk.GXH7FRMG.js +1 -1
  37. package/cdn-versioned/chunks/chunk.HJ4O4XQA.js +1 -1
  38. package/cdn-versioned/chunks/chunk.HSKVFAA5.js +1 -1
  39. package/cdn-versioned/chunks/chunk.HXTZNME5.js +1 -1
  40. package/cdn-versioned/chunks/chunk.I4X3XZE2.js +1 -0
  41. package/cdn-versioned/chunks/chunk.IDXOB3U5.js +2 -2
  42. package/cdn-versioned/chunks/chunk.IHOP5ZUO.js +1 -1
  43. package/cdn-versioned/chunks/chunk.IIZCWUXI.js +1 -1
  44. package/cdn-versioned/chunks/chunk.IKBD3TT3.js +1 -1
  45. package/cdn-versioned/chunks/chunk.J743YNA7.js +1 -1
  46. package/cdn-versioned/chunks/chunk.JZ6GZDIK.js +1 -1
  47. package/cdn-versioned/chunks/chunk.LMVYIGIS.js +1 -1
  48. package/cdn-versioned/chunks/chunk.MFRJXQSH.js +1 -1
  49. package/cdn-versioned/chunks/chunk.NRBNWX7R.js +1 -1
  50. package/cdn-versioned/chunks/chunk.OHV3OX65.js +1 -1
  51. package/cdn-versioned/chunks/chunk.OK6GNIXB.js +4 -4
  52. package/cdn-versioned/chunks/chunk.OXF3IL27.js +1 -1
  53. package/cdn-versioned/chunks/chunk.OYMGCYXV.js +1 -1
  54. package/cdn-versioned/chunks/chunk.P3DUIX2R.js +1 -1
  55. package/cdn-versioned/chunks/chunk.PO4DA6NA.js +1 -1
  56. package/cdn-versioned/chunks/chunk.QMJRCW7Z.js +1 -1
  57. package/cdn-versioned/chunks/chunk.R2ZX4H4Z.js +1 -1
  58. package/cdn-versioned/chunks/chunk.S62UDDDG.js +1 -1
  59. package/cdn-versioned/chunks/chunk.SAJJMXVB.js +1 -1
  60. package/cdn-versioned/chunks/chunk.SGYMVI3W.js +2 -2
  61. package/cdn-versioned/chunks/chunk.TLYSUPQV.js +1 -1
  62. package/cdn-versioned/chunks/chunk.TSB6QTAP.js +1 -1
  63. package/cdn-versioned/chunks/chunk.U5CISCXW.js +1 -1
  64. package/cdn-versioned/chunks/chunk.UDYXLKAX.js +1 -1
  65. package/cdn-versioned/chunks/chunk.VWL6GB47.js +1 -1
  66. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  67. package/cdn-versioned/chunks/chunk.WUM7JPR3.js +4 -4
  68. package/cdn-versioned/chunks/chunk.X2ABKMOB.js +1 -1
  69. package/cdn-versioned/chunks/chunk.YC4SBZ7I.js +1 -1
  70. package/cdn-versioned/chunks/chunk.YS5EGGO5.js +1 -1
  71. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  72. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  73. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  74. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  75. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  76. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  77. package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  78. package/cdn-versioned/components/breadcrumb/breadcrumb.js +1 -1
  79. package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  80. package/cdn-versioned/components/button/button.d.ts +1 -1
  81. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  82. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  83. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  84. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  85. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  86. package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
  87. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  88. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  89. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  90. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  91. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  92. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  93. package/cdn-versioned/components/header/header.d.ts +1 -1
  94. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  95. package/cdn-versioned/components/include/include.d.ts +1 -1
  96. package/cdn-versioned/components/input/input.d.ts +1 -1
  97. package/cdn-versioned/components/link/link.d.ts +1 -1
  98. package/cdn-versioned/components/loader/loader.d.ts +1 -1
  99. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  100. package/cdn-versioned/components/menu/menu.d.ts +1 -1
  101. package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
  102. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  103. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  104. package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
  105. package/cdn-versioned/components/option/option.d.ts +1 -1
  106. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  107. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  108. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  109. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  110. package/cdn-versioned/components/radio-button/radio-button.js +1 -1
  111. package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
  112. package/cdn-versioned/components/range/range.d.ts +1 -1
  113. package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
  114. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  115. package/cdn-versioned/components/select/select.d.ts +1 -1
  116. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  117. package/cdn-versioned/components/step/step.d.ts +1 -1
  118. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  119. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  120. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  121. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  122. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  123. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  124. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  125. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  126. package/cdn-versioned/components/video/video.d.ts +1 -1
  127. package/cdn-versioned/custom-elements.json +238 -238
  128. package/cdn-versioned/internal/form.js +3 -3
  129. package/cdn-versioned/solid-components.bundle.js +14 -14
  130. package/cdn-versioned/solid-components.css +2 -2
  131. package/cdn-versioned/solid-components.iife.js +14 -14
  132. package/cdn-versioned/solid-components.js +1 -1
  133. package/cdn-versioned/vscode.html-custom-data.json +91 -91
  134. package/cdn-versioned/web-types.json +154 -154
  135. package/dist/chunks/{chunk.WDWZFQ4X.js → chunk.YEYB4POY.js} +1 -1
  136. package/dist/chunks/{chunk.QW32IQ37.js → chunk.YKV272PW.js} +1 -1
  137. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  138. package/dist/components/radio-button/radio-button.js +1 -1
  139. package/dist/custom-elements.json +1 -1
  140. package/dist/solid-components.js +5 -5
  141. package/dist/web-types.json +1 -1
  142. package/dist-versioned/chunks/chunk.257BQ5G3.js +2 -2
  143. package/dist-versioned/chunks/chunk.2TPMKDGR.js +1 -1
  144. package/dist-versioned/chunks/chunk.2Z23SMCT.js +2 -2
  145. package/dist-versioned/chunks/chunk.34JZVZG6.js +2 -2
  146. package/dist-versioned/chunks/chunk.4CMRVAWO.js +6 -6
  147. package/dist-versioned/chunks/chunk.4PS5R3HQ.js +24 -24
  148. package/dist-versioned/chunks/chunk.55YNHA4Y.js +3 -3
  149. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  150. package/dist-versioned/chunks/chunk.6S62Y3SN.js +2 -2
  151. package/dist-versioned/chunks/chunk.A6F5UBS5.js +1 -1
  152. package/dist-versioned/chunks/chunk.AO5E3XWU.js +2 -2
  153. package/dist-versioned/chunks/chunk.AZRZJLYB.js +26 -26
  154. package/dist-versioned/chunks/chunk.C7HV6GLS.js +1 -1
  155. package/dist-versioned/chunks/chunk.CWOPJ6AE.js +2 -2
  156. package/dist-versioned/chunks/chunk.CYAZC6LN.js +3 -3
  157. package/dist-versioned/chunks/chunk.CZ5NVXDL.js +2 -2
  158. package/dist-versioned/chunks/chunk.DC7DGLHJ.js +1 -1
  159. package/dist-versioned/chunks/chunk.DT3ZL7JI.js +12 -12
  160. package/dist-versioned/chunks/chunk.ELPOH7TW.js +11 -11
  161. package/dist-versioned/chunks/chunk.F2UZ5T7G.js +5 -5
  162. package/dist-versioned/chunks/chunk.HBX6PDXK.js +4 -4
  163. package/dist-versioned/chunks/chunk.IJ2YK4AW.js +4 -4
  164. package/dist-versioned/chunks/chunk.IJIJ7YVU.js +1 -1
  165. package/dist-versioned/chunks/chunk.ILB62SSN.js +3 -3
  166. package/dist-versioned/chunks/chunk.IYSGB2DQ.js +5 -5
  167. package/dist-versioned/chunks/chunk.J3K6PVKE.js +2 -2
  168. package/dist-versioned/chunks/chunk.JSVTNGBN.js +2 -2
  169. package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
  170. package/dist-versioned/chunks/chunk.KENPSAUU.js +1 -1
  171. package/dist-versioned/chunks/chunk.KZLAI4DK.js +1 -1
  172. package/dist-versioned/chunks/chunk.LNGJFVKN.js +2 -2
  173. package/dist-versioned/chunks/chunk.M55G2PHP.js +2 -2
  174. package/dist-versioned/chunks/chunk.MDZHXHUH.js +3 -3
  175. package/dist-versioned/chunks/chunk.MML77VKL.js +2 -2
  176. package/dist-versioned/chunks/chunk.NR3OWI4Y.js +1 -1
  177. package/dist-versioned/chunks/chunk.NSCG7U5D.js +14 -14
  178. package/dist-versioned/chunks/chunk.NZFEW5QU.js +1 -1
  179. package/dist-versioned/chunks/chunk.PAGQREWS.js +4 -4
  180. package/dist-versioned/chunks/chunk.PUT4BQ4M.js +5 -5
  181. package/dist-versioned/chunks/chunk.PVFVGCKE.js +1 -1
  182. package/dist-versioned/chunks/chunk.QGSAYCDJ.js +5 -5
  183. package/dist-versioned/chunks/chunk.QIWHR4XZ.js +1 -1
  184. package/dist-versioned/chunks/chunk.RVZPI7LZ.js +8 -8
  185. package/dist-versioned/chunks/chunk.THYGJ3F3.js +2 -2
  186. package/dist-versioned/chunks/chunk.TLVK4R6I.js +3 -3
  187. package/dist-versioned/chunks/chunk.TUOYTASX.js +3 -3
  188. package/dist-versioned/chunks/chunk.U6LFASA7.js +1 -1
  189. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  190. package/dist-versioned/chunks/chunk.X4WBXLQO.js +1 -1
  191. package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
  192. package/dist-versioned/chunks/chunk.XIRK4KQ5.js +3 -3
  193. package/dist-versioned/chunks/chunk.XVNT7HIE.js +1 -1
  194. package/dist-versioned/chunks/chunk.XX3EFOOF.js +3 -3
  195. package/dist-versioned/chunks/chunk.XZDQNDB2.js +12 -12
  196. package/dist-versioned/chunks/chunk.Y62XG7YE.js +6 -6
  197. package/dist-versioned/chunks/chunk.Y7TQJEA7.js +2 -2
  198. package/dist-versioned/chunks/{chunk.WDWZFQ4X.js → chunk.YEYB4POY.js} +3 -3
  199. package/dist-versioned/chunks/chunk.YFRXAKBQ.js +1 -1
  200. package/dist-versioned/chunks/{chunk.QW32IQ37.js → chunk.YKV272PW.js} +6 -6
  201. package/dist-versioned/chunks/chunk.YXP3Q4D5.js +2 -2
  202. package/dist-versioned/chunks/chunk.ZNPGMZAM.js +1 -1
  203. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  204. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  205. package/dist-versioned/components/animation/animation.d.ts +1 -1
  206. package/dist-versioned/components/audio/audio.d.ts +1 -1
  207. package/dist-versioned/components/badge/badge.d.ts +1 -1
  208. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  209. package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
  210. package/dist-versioned/components/breadcrumb/breadcrumb.js +1 -1
  211. package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
  212. package/dist-versioned/components/button/button.d.ts +1 -1
  213. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  214. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  215. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  216. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  217. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  218. package/dist-versioned/components/combobox/combobox.d.ts +1 -1
  219. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  220. package/dist-versioned/components/divider/divider.d.ts +1 -1
  221. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  222. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  223. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  224. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  225. package/dist-versioned/components/header/header.d.ts +1 -1
  226. package/dist-versioned/components/icon/icon.d.ts +1 -1
  227. package/dist-versioned/components/include/include.d.ts +1 -1
  228. package/dist-versioned/components/input/input.d.ts +1 -1
  229. package/dist-versioned/components/link/link.d.ts +1 -1
  230. package/dist-versioned/components/loader/loader.d.ts +1 -1
  231. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  232. package/dist-versioned/components/menu/menu.d.ts +1 -1
  233. package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
  234. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  235. package/dist-versioned/components/notification/notification.d.ts +1 -1
  236. package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
  237. package/dist-versioned/components/option/option.d.ts +1 -1
  238. package/dist-versioned/components/popup/popup.d.ts +1 -1
  239. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  240. package/dist-versioned/components/radio/radio.d.ts +1 -1
  241. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  242. package/dist-versioned/components/radio-button/radio-button.js +1 -1
  243. package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
  244. package/dist-versioned/components/range/range.d.ts +1 -1
  245. package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
  246. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  247. package/dist-versioned/components/select/select.d.ts +1 -1
  248. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  249. package/dist-versioned/components/step/step.d.ts +1 -1
  250. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  251. package/dist-versioned/components/switch/switch.d.ts +1 -1
  252. package/dist-versioned/components/tab/tab.d.ts +1 -1
  253. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  254. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  255. package/dist-versioned/components/tag/tag.d.ts +1 -1
  256. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  257. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  258. package/dist-versioned/components/video/video.d.ts +1 -1
  259. package/dist-versioned/custom-elements.json +238 -238
  260. package/dist-versioned/internal/form.js +3 -3
  261. package/dist-versioned/solid-components.css +2 -2
  262. package/dist-versioned/solid-components.js +5 -5
  263. package/dist-versioned/vscode.html-custom-data.json +91 -91
  264. package/dist-versioned/web-types.json +154 -154
  265. package/package.json +1 -1
  266. package/cdn/chunks/chunk.VBRJ4CE4.js +0 -1
  267. package/cdn-versioned/chunks/chunk.FG6UWYSJ.js +0 -1
  268. package/cdn-versioned/chunks/chunk.VBRJ4CE4.js +0 -1
@@ -114,7 +114,7 @@
114
114
  disabled:text-neutral-500 disabled:border-neutral-500`,tertiary:this.inverted?`border-transparent ${this.visuallyDisabled?"text-neutral-600 hover:text-neutral-600 active:text-neutral-600":"text-white hover:text-primary-100 active:text-primary-200"}
115
115
  disabled:text-neutral-600`:`border-transparent ${this.visuallyDisabled?"text-neutral-500 hover:text-neutral-500 active:text-neutral-500":"text-primary hover:text-primary-500 active:text-primary-800"}
116
116
  disabled:text-neutral-500`,cta:`text-white ${this.visuallyDisabled?"bg-neutral-500 border-neutral-500 hover:bg-neutral-500 active:bg-neutral-500":"bg-accent-500 border-transparent"}
117
- ${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${w(t?void 0:this.disabled)}" type="${w(t?void 0:this.type)}" title="${this.title}" name="${w(t?void 0:this.name)}" value="${w(t?void 0:this.value)}" href="${w(t?this.href:void 0)}" target="${w(t?this.target:void 0)}" download="${w(t?this.download:void 0)}" rel="${w(t&&this.target?"noreferrer noopener":void 0)}" role="${w(t?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${c("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${c("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${c("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${c("flex flex-auto items-center justify-end pointer-events-none",r["icon-only"]&&"hidden",this.loading&&"invisible",r["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${c("inline-flex items-center justify-center",r["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${c("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",r["icon-only"]&&"hidden",r["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?H`<sd-loader class="${c("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-loader>`:""}</${e}>`}};N.styles=[...f.styles,y`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-icon),sd-loader{font-size:calc(var(--tw-varspacing)/2)}`],a([g("a, button")],N.prototype,"button",2),a([ei({selector:"sd-icon"})],N.prototype,"_iconsInDefaultSlot",2),a([E()],N.prototype,"invalid",2),a([l({type:String,reflect:!0})],N.prototype,"title",2),a([l({type:String,reflect:!0})],N.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],N.prototype,"inverted",2),a([l({type:String,reflect:!0})],N.prototype,"size",2),a([l({type:Boolean,reflect:!0})],N.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],N.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],N.prototype,"loading",2),a([l({type:String,reflect:!0})],N.prototype,"type",2),a([l({type:String,reflect:!0})],N.prototype,"name",2),a([l()],N.prototype,"value",2),a([l({type:String,reflect:!0})],N.prototype,"href",2),a([l({type:String,reflect:!0})],N.prototype,"target",2),a([l({reflect:!0})],N.prototype,"download",2),a([l({reflect:!0})],N.prototype,"form",2),a([l({attribute:"formaction"})],N.prototype,"formAction",2),a([l({attribute:"formenctype"})],N.prototype,"formEnctype",2),a([l({attribute:"formmethod"})],N.prototype,"formMethod",2),a([l({attribute:"formnovalidate",type:Boolean})],N.prototype,"formNoValidate",2),a([l({attribute:"formtarget"})],N.prototype,"formTarget",2),a([x("disabled",{waitUntilFirstUpdate:!0})],N.prototype,"handleDisabledChange",1),N=a([v("sd-button")],N);function qe(s=document.activeElement){if(s!=null&&s.shadowRoot){let i=s.shadowRoot.activeElement;if(i)return qe(i)}return s}function Zs(s,i){return{top:Math.round(s.getBoundingClientRect().top-i.getBoundingClientRect().top),left:Math.round(s.getBoundingClientRect().left-i.getBoundingClientRect().left)}}var Nr=new Set;function ll(){let s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}function Ke(s){if(Nr.add(s),!document.body.classList.contains("sd-scroll-lock")){let i=ll();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${i}px`)}}function je(s){Nr.delete(s),Nr.size===0&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function Yt(s,i,t="vertical",e="smooth"){let r=Zs(s,i),o=r.top+i.scrollTop,n=r.left+i.scrollLeft,d=i.scrollLeft,h=i.scrollLeft+i.offsetWidth,p=i.scrollTop,m=i.scrollTop+i.offsetHeight;(t==="horizontal"||t==="both")&&(n<d?i.scrollTo({left:n,behavior:e}):n+s.clientWidth>h&&i.scrollTo({left:n-i.offsetWidth+s.clientWidth,behavior:e})),(t==="vertical"||t==="both")&&(o<p?i.scrollTo({top:o,behavior:e}):o+s.clientHeight>m&&i.scrollTo({top:o-i.offsetHeight+s.clientHeight,behavior:e}))}function ai(s){return s.charAt(0).toUpperCase()+s.slice(1)}function qr(s){return s.replace(/-./g,i=>i[1].toUpperCase())}function Qs(s){let i=s.tagName.toLowerCase();return s.getAttribute("tabindex")==="-1"||s.hasAttribute("disabled")||s.hasAttribute("aria-disabled")&&s.getAttribute("aria-disabled")!=="false"||i==="input"&&s.getAttribute("type")==="radio"&&!s.hasAttribute("checked")||s.offsetParent===null&&!(s.getRootNode()instanceof ShadowRoot)||window.getComputedStyle(s).visibility==="hidden"?!1:(i==="audio"||i==="video")&&s.hasAttribute("controls")||s.hasAttribute("tabindex")||s.hasAttribute("contenteditable")&&s.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(i)}function ir(s){var o,n;let i=[];function t(d){d instanceof HTMLElement&&(i.push(d),d.shadowRoot!==null&&d.shadowRoot.mode==="open"&&t(d.shadowRoot)),[...d.children].forEach(h=>t(h))}t(s);let e=(o=i.find(d=>Qs(d)))!=null?o:null,r=(n=i.reverse().find(d=>Qs(d)))!=null?n:null;return{start:e,end:r}}var Ti=[],Xe=class{constructor(i){this.tabDirection="forward";this.element=i,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Ti.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Ti=Ti.filter(i=>i!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Ti[Ti.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){let{start:i,end:t}=ir(this.element),e=this.tabDirection==="forward"?i:t;typeof(e==null?void 0:e.focus)=="function"&&e.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(i){i.key==="Tab"&&i.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}};var ht=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"footer");this.localize=new L(this);this.modal=new Xe(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=t=>{this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),Ke(this)))}disconnectedCallback(){super.disconnectedCallback(),je(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=F(this,"drawer.denyClose",{dir:this.localize.dir()});B(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var e;let t=(e=this.closeButton.shadowRoot)==null?void 0:e.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=qe(),this.contained||(this.modal.activate(),Ke(this));let r=this.querySelector("[autofocus]");r&&r.removeAttribute("autofocus"),await Promise.all([R(this.drawer),R(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let o=F(this,`drawer.show${ai(this.placement)}`,{dir:this.localize.dir()}),n=F(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([B(this.panel,o.keyframes,o.options),B(this.overlay,n.keyframes,n.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(r?r.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),r?r.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),je(this)),await Promise.all([R(this.drawer),R(this.overlay)]);let r=F(this,`drawer.hide${ai(this.placement)}`,{dir:this.localize.dir()}),o=F(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([B(this.overlay,o.keyframes,o.options).then(()=>{this.overlay.hidden=!0}),B(this.panel,r.keyframes,r.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let n=this.originalTrigger;typeof(n==null?void 0:n.focus)=="function"&&setTimeout(()=>n.focus()),t==null||t.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),Ke(this)),this.open&&this.contained&&(this.modal.deactivate(),je(this))}async show(){if(!this.open)return this.open=!0,X(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,X(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${c("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${c("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${c("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2 z-10"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ms-4 absolute top-2 end-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${c(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};ht.styles=[...f.styles,y`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],a([g("[part=base]")],ht.prototype,"drawer",2),a([g("[part=panel]")],ht.prototype,"panel",2),a([g("[part=overlay]")],ht.prototype,"overlay",2),a([g("[part=close-button]")],ht.prototype,"closeButton",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"open",2),a([l({type:String,attribute:"label",reflect:!0})],ht.prototype,"label",2),a([l({type:String,reflect:!0})],ht.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"contained",2),a([l({attribute:"no-header",type:Boolean,reflect:!0})],ht.prototype,"noHeader",2),a([x("open",{waitUntilFirstUpdate:!0})],ht.prototype,"handleOpenChange",1),a([x("contained",{waitUntilFirstUpdate:!0})],ht.prototype,"handleNoModalChange",1),ht=a([v("sd-drawer")],ht);_("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});var Se=class{constructor(i){this.fixedEnd=!0;this.fixedStart=!0;this.gradient=!1;this.outline=!1;this.map=(i,t,e,r,o)=>(i-t)*(o-r)/(e-t)+r;this.damp=(i,t,e)=>2*(1-t/i)*(t/i)*e;this.canvas=i.canvas,this.frequency=i.frequency,this.phase=i.phase,this.amplitude=i.amplitude,this.color=i.color,this.shift=i.shift,this.lineWidth=2,this.damping=i.damping,this.context=this.canvas.getContext("2d"),this.paused=!0,this.playbackSpeed=1,this.origin={x:0,y:this.canvas.height}}drawPoint(i,t,e){if(!this.context)return;let r=this.lineWidth/2;if(this.context.beginPath(),this.outline&&(this.context.fillStyle=e,this.context.lineWidth=2,this.context.arc(i,t,r,0,2*Math.PI),this.context.fill()),this.gradient){let o=this.context.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(.1,e),o.addColorStop(1,"transparent"),this.context.fillStyle=o}else this.context.fillStyle=e;this.context.fillRect(i-r,t-r,r,this.canvas.height-t+r)}buildSine(i,t,e,r,o){for(let n=this.origin.x,d=this.origin.x+i;n<d;n+=1){let h=r*Math.sin(o*(n+t));this.fixedStart&&this.fixedEnd?this.drawPoint(n,this.origin.y+this.damp(d,n,this.damping)*h,e):this.fixedStart?this.drawPoint(n,this.origin.y+this.map(n,this.origin.x,d,0,this.damping)*h,e):this.fixedEnd?this.drawPoint(n,this.origin.y+(this.damping-this.map(n,this.origin.x,d,0,this.damping))*h,e):this.drawPoint(n,this.origin.y+h,e)}}redraw(){this.phase+=this.shift*(this.paused?1:2*this.playbackSpeed),this.buildSine(this.canvas.width,this.phase,this.color,this.amplitude,this.frequency)}setPlay(){this.paused=!1}setPause(){this.paused=!0}setPlaybackSpeed(i){this.playbackSpeed=i}};var it=class extends f{constructor(){super();this.localize=new L(this);this.hasSlotController=new A(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let e=t.get("animated");!e&&this.animated?this.initAnimation():e&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let e=Math.floor(t/60).toString().padStart(2,"0"),r=Math.floor(t%60).toString().padStart(2,"0");return`${e}:${r}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let e=t.match(/\d+/g);if(e&&e.length===3){let r=parseInt(e[0]),o=parseInt(e[1]),n=parseInt(e[2]),d=p=>p.toString(16).padStart(2,"0");return`#${d(r)}${d(o)}${d(n)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),r=window.getComputedStyle(t).color,o;this.inverted?o="#FFFFFF33":o=this.rgbToHex(r)+"33",this.waveList=[new Se({canvas:this.canvas,color:o,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new Se({canvas:this.canvas,color:o,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new Se({canvas:this.canvas,color:o,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new Se({canvas:this.canvas,color:o,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new Se({canvas:this.canvas,color:o,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=u`<div class="${c("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${c("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?u`<slot name="pause-icon"><sd-icon class="text-xl" name="pause" library="_internal"></sd-icon></slot>`:u`<slot name="play-icon"><sd-icon class="text-xl" name="start" library="_internal"></sd-icon></slot>`}</sd-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?u`<button class="${c("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-icon class="w-6 h-6" name="transcript" library="_internal"></sd-icon></button>`:null} <button class="${c("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-icon></button></div></div>`,e=u`<div class="${c("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${c("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${c("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return u`<div class="${c("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?t:null}<div class="relative">${this.animated&&!this.reversedLayout?u`${t}`:null} ${this.animated?u`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?e:null}<sd-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-range></div>${this.hasSlotController.test("transcript")?u`<sd-drawer><slot name="transcript"></slot></sd-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?e:null}</div>`}};it.styles=[...f.styles,y`sd-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-button::part(label){align-items:center;display:flex;flex-grow:0}sd-range::part(form-control-label){display:none}:host([inverted]) sd-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],it.prototype,"reversedLayout",2),a([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],it.prototype,"hideTimestamps",2),a([l({type:Boolean,reflect:!0})],it.prototype,"animated",2),a([l({type:Boolean,reflect:!0})],it.prototype,"inverted",2),a([l({type:Number,reflect:!0})],it.prototype,"speed",2),a([E()],it.prototype,"currentTime",2),a([E()],it.prototype,"duration",2),a([E()],it.prototype,"isPlaying",2),a([E()],it.prototype,"isMuted",2),a([E()],it.prototype,"isTranscriptOpen",2),a([E()],it.prototype,"progress",2),a([g('[part="progress-slider"]')],it.prototype,"progressSlider",2),a([g('[part="audio-player"]')],it.prototype,"audioPlayerContainer",2),a([g("sd-drawer")],it.prototype,"drawer",2),a([g("canvas")],it.prototype,"canvas",2),it=a([v("sd-audio")],it);var Wt=class extends f{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return u`<span part="base" aria-labelledby="content" class="${c("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${c(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};Wt.styles=[...f.styles,y`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],a([l({type:String,reflect:!0})],Wt.prototype,"size",2),a([l({type:String,reflect:!0})],Wt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],Wt.prototype,"inverted",2),Wt=a([v("sd-badge")],Wt);var Vt=class extends f{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(t,e){return{0:this.smallSvg(e),414:this.mediumSvg(e),640:this.largeSvg(e)}[t]}largeSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return u`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return u`<div class="${c({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${c({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${c("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":u`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return u`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(t){return u`<div class="${c({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[t],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return u`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${c(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return u`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let t=this.variant.startsWith("border-")||this.variant==="image";return u`<div class="${c({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${t?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};Vt.styles=[...f.styles,y`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],a([g("[part=base]")],Vt.prototype,"containerElem",2),a([l({type:String,reflect:!0})],Vt.prototype,"variant",2),a([l({type:Array})],Vt.prototype,"shapes",2),a([E()],Vt.prototype,"componentBreakpoint",2),Vt=a([v("sd-brandshape")],Vt);var $t=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:e}=t.getBoundingClientRect();t.dataset.size=`${e}`}),this.itemPositionsCached=!0}handleTruncation(){var o;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:e}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let r=0;for(let[n,d]of Array.from(this.items).reverse().entries()){let h=parseFloat(`${(o=d.dataset.size)!=null?o:d.getBoundingClientRect().width}`);if(d.hidden=!1,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0;continue}if(n===0||n===1){r+=h;continue}if(this.isTruncated=r+h+e>t,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0}else r+=h}}handleMobileChevron(){var e,r,o;let t=document.createElement("sd-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(o=(r=(e=Array.from(this.items).at(-2))==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("sd-link"))==null||o.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-dropdown part="truncated" class="${c(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};$t.styles=[...f.styles,y`:host{display:block;position:relative}::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{border-radius:var(--sd-border-radius-full,9999px);content:var(--tw-content);display:none;height:var(--sd-spacing-1,.25rem);margin-left:var(--sd-spacing-2,.5rem);margin-right:var(--sd-spacing-2,.5rem);width:var(--sd-spacing-1,.25rem);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-bg-opacity,1))}@media (min-width:1024px){::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{content:var(--tw-content);display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (min-width:1024px){::slotted(sd-breadcrumb-item:nth-last-child(2)):after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent,45 157 0)/var(--tw-bg-opacity,1))}}::slotted(sd-breadcrumb-item),sd-dropdown{align-items:center;display:none}@media (min-width:1024px){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}`],a([g('[part="base"]')],$t.prototype,"base",2),a([g('[part="truncated"]')],$t.prototype,"truncated",2),a([g('[part="truncated-dropdown"]')],$t.prototype,"dropdown",2),a([g("slot")],$t.prototype,"defaultSlot",2),a([l({type:String,reflect:!0})],$t.prototype,"label",2),a([E()],$t.prototype,"itemPositionsCached",2),a([E()],$t.prototype,"isTruncated",2),$t=a([v("sd-breadcrumb")],$t);var Pt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return u`<sd-link part="base" href="${w(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Pt.styles=[...f.styles,y`:host{align-items:center;display:inline-flex}sd-link::part(base){align-items:center}sd-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-link sd-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-link::part(label){text-decoration-line:none}`],a([g('[part="base"]')],Pt.prototype,"base",2),a([l({type:String,reflect:!0})],Pt.prototype,"href",2),a([l({type:String,reflect:!0})],Pt.prototype,"target",2),a([l({type:Boolean,reflect:!0})],Pt.prototype,"current",2),a([x("current")],Pt.prototype,"handleCurrentChange",1),Pt=a([v("sd-breadcrumb-item")],Pt);var rr=class{constructor(i,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};i.addController(this),this.host=i,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(i){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},i)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function Js(s,i,t){let e=r=>Object.is(r,-0)?0:r;return s<i?e(i):s>t?e(t):e(s)}var sr=class{constructor(i){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=i}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(i){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,r)=>{r===i?this.show(e):this.hide(e)})}show(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),i.removeAttribute("inert"),i.setAttribute("aria-hidden","false")}hide(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),i.toggleAttribute("inert",!0),i.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let i=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(i.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=i.map(r=>{let o=r,n={position:o.style.position,opacity:o.style.opacity,zIndex:o.style.zIndex,transform:o.style.transform,classes:o.className};return o.classList.remove(...this.getAllFadeClasses()),o.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let r=i.map(n=>n.getBoundingClientRect().height),o=Math.max(...r);i.forEach((n,d)=>{let h=n,p=e[d];h.className=p.classes,["position","opacity","zIndex","transform"].forEach(m=>{let b=p[m];b?h.style.setProperty(m,b):h.style.removeProperty(m)})}),o>0&&(this.carousel.style.setProperty("--carousel-height",`${o}px`),t.style.height=`${o}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*Gs(s,i){if(s!==void 0){let t=0;for(let e of s)yield i(e,t++)}}function*ta(s,i,t=1){let e=i===void 0?0:s;i!=null||(i=s);for(let r=e;t>0?r<i:i<r;r+=t)yield r}var ea=Symbol(),oi=s=>(i,t,e)=>{let r=e.value;e.value=function(...o){clearTimeout(this[ea]),this[ea]=window.setTimeout(()=>{r.apply(this,o)},s)}};var Li=class{constructor(i){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=i=>{if(i.pointerType==="touch")return;this.pointers.add(i.pointerId),this.mouseDragging&&!this.dragging&&i.button===0&&(i.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=i=>{let t=this.host.scrollContainer,e=!!i.movementX||!!i.movementY;!this.dragging&&e?(t.setPointerCapture(i.pointerId),this.handleDragStart()):t.hasPointerCapture(i.pointerId)&&this.handleDrag(i)};this.handlePointerUp=i=>{this.pointers.delete(i.pointerId),this.host.scrollContainer.releasePointerCapture(i.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=i=>{for(let t of i.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=i=>{for(let t of i.touches)this.pointers.add(t.identifier)};this.host=i,i.addController(this)}async hostConnected(){let i=this.host;await i.updateComplete;let t=i.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let i=this.host;this.dragging=!0,i.scrollContainer.style.setProperty("scroll-snap-type","unset"),i.requestUpdate()}handleDrag(i){this.host.scrollContainer.scrollBy({left:-i.movementX,top:-i.movementY})}async handleDragEnd(){let i=this.host,t=i.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,r=t.scrollTop;t.style.removeProperty("scroll-snap-type");let o=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:r,behavior:"auto"}),t.scrollTo({left:o,top:n,behavior:ki()?"auto":"smooth"}),this.scrolling&&await X(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),i.requestUpdate()}};a([oi(100)],Li.prototype,"handleScrollEnd",1);var oe=class extends f{static isCarouselItem(i){return i instanceof Element&&i.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return u`<slot></slot>`}};oe.styles=[...f.styles,y`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`],oe=a([v("sd-carousel-item")],oe);var q=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new rr(this,()=>this.next());this.scrollController=new Li(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new L(this);this.userInteracted=!1;this.fadeController=new sr(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(r=>[...r.addedNodes,...r.removedNodes].some(o=>oe.isCarouselItem(o)&&!o.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction));let t=new IntersectionObserver(e=>{e.forEach(r=>{this.intersectionObserverEntries.set(r.target,r);let o=r.target;o.toggleAttribute("inert",!r.isIntersecting),o.classList.toggle("--in-view",r.isIntersecting),o.setAttribute("aria-hidden",r.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(r=>{r.forEach(o=>{o.isIntersecting&&o.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,r){return Math.ceil((t-e)/r)+1>0?Math.ceil((t-e)/r)+1:1}getCurrentPage(t,e,r,o){return Math.ceil((t-r)/o)-Math.ceil((t-r-e)/o)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,r=this.localize.dir()==="rtl",o=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!r&&t.key==="ArrowRight"||r&&t.key==="ArrowLeft",d=t.key==="ArrowUp"||!r&&t.key==="ArrowLeft"||r&&t.key==="ArrowRight";t.preventDefault(),d&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),o&&this.updateComplete.then(()=>{var p;let h=(p=this.shadowRoot)==null?void 0:p.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),r=[...this.intersectionObserverEntries.values()].find(o=>o.isIntersecting);if(this.loop&&(r!=null&&r.target.hasAttribute("data-clone"))){let o=Number(r.target.getAttribute("data-clone"));this.goToSlide(o,"auto");return}r&&(this.activeSlide=t.indexOf(r.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var t,e;this.pausedAutoplay?(this.autoplayController.stop(),(t=this.autoplayControls)==null||t.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((r,o)=>{e.unobserve(r),r.classList.remove("--in-view"),r.classList.remove("--is-active"),r.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),r.hasAttribute("data-clone")&&r.remove()}),this.loop&&!this.fade){let r=this.slidesPerPage,o=t.slice(-r),n=t.slice(0,r);o.reverse().forEach((d,h)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(t.length-h-1)),this.prepend(p)}),n.forEach((d,h)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(h)),this.append(p)})}this.getSlides({excludeClones:!1}).forEach(r=>{e.observe(r)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((o,n)=>{o.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}});let r=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>r&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((r,o)=>{Math.abs(o-e)%e===0?r.style.removeProperty("scroll-snap-align"):r.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(t="smooth"){if(this.fade){let o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,r=!1;for(;!r&&e>0;)e-=1,r=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:r,loop:o,scrollContainer:n,fade:d}=this,h=this.getSlides(),p=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,d)return;let b=Js(t+(o?r:0),0,p.length+1),C=p[b],k=n.getBoundingClientRect(),$=C.getBoundingClientRect();if(n.scrollTo({left:$.left-k.left+n.scrollLeft,top:$.top-k.top+n.scrollTop,behavior:ki()?"auto":e}),this.userInteracted&&!this.loop){let z=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,S=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):S&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,r=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,d=this.loop||o<r,h=this.localize.dir()==="ltr";return u`<div part="base" class="${c("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(p=>!p.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?p=>{this.previous(),this.unblockAutoplay(p,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-down":"chevron-up"}"></sd-icon></slot></button> ${this.variant==="dot"?u`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${Gs(ta(r),p=>{let m=p+1===o;return u`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",p+1,r)}" @click="${b=>{this.goToSlide(p*e),this.unblockAutoplay(b,this.paginationItems[p])}}" @keydown="${this.handleKeyDown}"><span class="${c("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",m&&"bg-accent border-none",m?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:u`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${o}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${r}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!d}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!d&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${d?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${d?p=>{this.next(),this.unblockAutoplay(p,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-up":"chevron-down"}"></sd-icon></slot></button></div><button class="${c("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${p=>{this.pausedAutoplay=!this.pausedAutoplay,p.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button></div></div>`}};q.styles=[...f.styles,y`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],a([g('[part~="autoplay-controls"]')],q.prototype,"autoplayControls",2),a([g('[part~="navigation-button--previous"]')],q.prototype,"previousButton",2),a([g('[part~="navigation-button--next"]')],q.prototype,"nextButton",2),a([Wi('[part~="pagination-item"]')],q.prototype,"paginationItems",2),a([l({type:String,reflect:!0})],q.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],q.prototype,"inverted",2),a([l({type:Boolean,reflect:!0})],q.prototype,"loop",2),a([l({type:Boolean,reflect:!0})],q.prototype,"autoplay",2),a([l({type:Boolean,reflect:!0})],q.prototype,"fade",2),a([l({type:Number,attribute:"slides-per-page",reflect:!0})],q.prototype,"slidesPerPage",2),a([l({type:Number,attribute:"slides-per-move",reflect:!0})],q.prototype,"slidesPerMove",2),a([g("slot:not([name])")],q.prototype,"defaultSlot",2),a([g(".carousel__slides")],q.prototype,"scrollContainer",2),a([g(".carousel__pagination")],q.prototype,"paginationContainer",2),a([E()],q.prototype,"activeSlide",2),a([E()],q.prototype,"currentPage",2),a([E()],q.prototype,"pausedAutoplay",2),a([x("pausedAutoplay")],q.prototype,"handlePausedAutoplay",1),a([x("fade",{waitUntilFirstUpdate:!0})],q.prototype,"handleFadeChange",1),a([x("loop",{waitUntilFirstUpdate:!0}),x("slidesPerPage",{waitUntilFirstUpdate:!0})],q.prototype,"initializeSlides",1),a([x("activeSlide")],q.prototype,"handleSlideChange",1),a([x("slidesPerMove")],q.prototype,"handleSlidesPerMoveChange",1),a([x("autoplay")],q.prototype,"handleAutoplayChange",1),q=a([v("sd-carousel")],q);var Mt=(s="value")=>(i,t)=>{let e=i.constructor,r=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,d){var m;let h=e.getPropertyOptions(s),p=typeof h.attribute=="string"?h.attribute:s;if(o===p){let b=h.converter||Ae,k=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Ae.fromAttribute)(d,h.type);this[s]!==k&&(this[t]=k)}r.call(this,o,n,d)}};var{I:Nb}=Ts;var ar=s=>s.strings===void 0;var dl={},ia=(s,i=dl)=>s._$AH=i;var ge=Xt(class extends Oe{constructor(s){if(super(s),s.type!==Ht.PROPERTY&&s.type!==Ht.ATTRIBUTE&&s.type!==Ht.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ar(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[i]){if(i===kt||i===j)return i;let t=s.element,e=s.name;if(s.type===Ht.PROPERTY){if(i===t[e])return kt}else if(s.type===Ht.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(e))return kt}else if(s.type===Ht.ATTRIBUTE&&t.getAttribute(e)===i+"")return kt;return ia(s),i}});var tt=class extends f{constructor(){super(...arguments);this.formControlController=new lt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return u`<label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${w(this.value)}" .indeterminate="${ge(this.indeterminate)}" .checked="${ge(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div class="${c("absolute h-3 transition-[width] right-0.25 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"group-hover:bg-neutral-200",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?u`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="_internal" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};tt.styles=[...f.styles,y`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],a([g('input[type="checkbox"]')],tt.prototype,"input",2),a([g("#invalid-message")],tt.prototype,"invalidMessage",2),a([l({type:String,reflect:!0})],tt.prototype,"title",2),a([l({type:String,reflect:!0})],tt.prototype,"name",2),a([l()],tt.prototype,"value",2),a([l({type:String,reflect:!0})],tt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],tt.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"indeterminate",2),a([Mt("checked")],tt.prototype,"defaultChecked",2),a([l({type:String,reflect:!0})],tt.prototype,"form",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"required",2),a([E()],tt.prototype,"showInvalidStyle",2),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],tt.prototype,"handleDisabledChange",1),a([x(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],tt.prototype,"handleStateChange",1),tt=a([v("sd-checkbox")],tt);var Ot=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:r,n=u`<slot @slotchange="${this.syncCheckboxes}"></slot>`,d=this.hasSlotController.test("tooltip");return u`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||d?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${d?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};Ot.styles=[...f.styles,y`:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`],a([l({type:String,reflect:!0})],Ot.prototype,"size",2),a([l({type:String,reflect:!0})],Ot.prototype,"orientation",2),a([l({type:String,reflect:!0})],Ot.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],Ot.prototype,"helpText",2),a([x("size",{waitUntilFirstUpdate:!0})],Ot.prototype,"handleSizeChange",1),a([x("invalid",{waitUntilFirstUpdate:!0})],Ot.prototype,"handleInvalid",1),Ot=a([v("sd-checkbox-group")],Ot);var ne=Math.min,Tt=Math.max,Ai=Math.round,Mi=Math.floor,Zt=s=>({x:s,y:s}),cl={left:"right",right:"left",bottom:"top",top:"bottom"},hl={start:"end",end:"start"};function nr(s,i,t){return Tt(s,ne(i,t))}function Ye(s,i){return typeof s=="function"?s(i):s}function ve(s){return s.split("-")[0]}function We(s){return s.split("-")[1]}function Kr(s){return s==="x"?"y":"x"}function lr(s){return s==="y"?"height":"width"}var pl=new Set(["top","bottom"]);function le(s){return pl.has(ve(s))?"y":"x"}function dr(s){return Kr(le(s))}function aa(s,i,t){t===void 0&&(t=!1);let e=We(s),r=dr(s),o=lr(r),n=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return i.reference[o]>i.floating[o]&&(n=zi(n)),[n,zi(n)]}function oa(s){let i=zi(s);return[or(s),i,or(i)]}function or(s){return s.replace(/start|end/g,i=>hl[i])}var ra=["left","right"],sa=["right","left"],ul=["top","bottom"],ml=["bottom","top"];function fl(s,i,t){switch(s){case"top":case"bottom":return t?i?sa:ra:i?ra:sa;case"left":case"right":return i?ul:ml;default:return[]}}function na(s,i,t,e){let r=We(s),o=fl(ve(s),t==="start",e);return r&&(o=o.map(n=>n+"-"+r),i&&(o=o.concat(o.map(or)))),o}function zi(s){return s.replace(/left|right|bottom|top/g,i=>cl[i])}function bl(s){return P({top:0,right:0,bottom:0,left:0},s)}function jr(s){return typeof s!="number"?bl(s):{top:s,right:s,bottom:s,left:s}}function Ze(s){let{x:i,y:t,width:e,height:r}=s;return{width:e,height:r,top:t,left:i,right:i+e,bottom:t+r,x:i,y:t}}function la(s,i,t){let{reference:e,floating:r}=s,o=le(i),n=dr(i),d=lr(n),h=ve(i),p=o==="y",m=e.x+e.width/2-r.width/2,b=e.y+e.height/2-r.height/2,C=e[d]/2-r[d]/2,k;switch(h){case"top":k={x:m,y:e.y-r.height};break;case"bottom":k={x:m,y:e.y+e.height};break;case"right":k={x:e.x+e.width,y:b};break;case"left":k={x:e.x-r.width,y:b};break;default:k={x:e.x,y:e.y}}switch(We(i)){case"start":k[n]-=C*(t&&p?-1:1);break;case"end":k[n]+=C*(t&&p?-1:1);break}return k}var da=async(s,i,t)=>{let{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:n}=t,d=o.filter(Boolean),h=await(n.isRTL==null?void 0:n.isRTL(i)),p=await n.getElementRects({reference:s,floating:i,strategy:r}),{x:m,y:b}=la(p,e,h),C=e,k={},$=0;for(let z=0;z<d.length;z++){let{name:S,fn:D}=d[z],{x:V,y:U,data:Z,reset:Y}=await D({x:m,y:b,initialPlacement:e,placement:C,strategy:r,middlewareData:k,rects:p,platform:n,elements:{reference:s,floating:i}});m=V!=null?V:m,b=U!=null?U:b,k=ct(P({},k),{[S]:P(P({},k[S]),Z)}),Y&&$<=50&&($++,typeof Y=="object"&&(Y.placement&&(C=Y.placement),Y.rects&&(p=Y.rects===!0?await n.getElementRects({reference:s,floating:i,strategy:r}):Y.rects),{x:m,y:b}=la(p,C,h)),z=-1)}return{x:m,y:b,placement:C,strategy:r,middlewareData:k}};async function cr(s,i){var t;i===void 0&&(i={});let{x:e,y:r,platform:o,rects:n,elements:d,strategy:h}=s,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:C=!1,padding:k=0}=Ye(i,s),$=jr(k),S=d[C?b==="floating"?"reference":"floating":b],D=Ze(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(S)))==null||t?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:h})),V=b==="floating"?{x:e,y:r,width:n.floating.width,height:n.floating.height}:n.reference,U=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),Z=await(o.isElement==null?void 0:o.isElement(U))?await(o.getScale==null?void 0:o.getScale(U))||{x:1,y:1}:{x:1,y:1},Y=Ze(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:V,offsetParent:U,strategy:h}):V);return{top:(D.top-Y.top+$.top)/Z.y,bottom:(Y.bottom-D.bottom+$.bottom)/Z.y,left:(D.left-Y.left+$.left)/Z.x,right:(Y.right-D.right+$.right)/Z.x}}var ca=s=>({name:"arrow",options:s,async fn(i){let{x:t,y:e,placement:r,rects:o,platform:n,elements:d,middlewareData:h}=i,{element:p,padding:m=0}=Ye(s,i)||{};if(p==null)return{};let b=jr(m),C={x:t,y:e},k=dr(r),$=lr(k),z=await n.getDimensions(p),S=k==="y",D=S?"top":"left",V=S?"bottom":"right",U=S?"clientHeight":"clientWidth",Z=o.reference[$]+o.reference[k]-C[k]-o.floating[$],Y=C[k]-o.reference[k],qt=await(n.getOffsetParent==null?void 0:n.getOffsetParent(p)),xt=qt?qt[U]:0;(!xt||!await(n.isElement==null?void 0:n.isElement(qt)))&&(xt=d.floating[U]||o.floating[$]);let he=Z/2-Y/2,ie=xt/2-z[$]/2-1,Ft=ne(b[D],ie),$e=ne(b[V],ie),re=Ft,Te=xt-z[$]-$e,It=xt/2-z[$]/2+he,Kt=nr(re,It,Te),De=!h.arrow&&We(r)!=null&&It!==Kt&&o.reference[$]/2-(It<re?Ft:$e)-z[$]/2<0,pe=De?It<re?It-re:It-Te:0;return{[k]:C[k]+pe,data:P({[k]:Kt,centerOffset:It-Kt-pe},De&&{alignmentOffset:pe}),reset:De}}});var ha=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var t,e;let{placement:r,middlewareData:o,rects:n,initialPlacement:d,platform:h,elements:p}=i,It=Ye(s,i),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:C,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:$="none",flipAlignment:z=!0}=It,S=Hi(It,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=o.arrow)!=null&&t.alignmentOffset)return{};let D=ve(r),V=le(d),U=ve(d)===d,Z=await(h.isRTL==null?void 0:h.isRTL(p.floating)),Y=C||(U||!z?[zi(d)]:oa(d)),qt=$!=="none";!C&&qt&&Y.push(...na(d,z,$,Z));let xt=[d,...Y],he=await cr(i,S),ie=[],Ft=((e=o.flip)==null?void 0:e.overflows)||[];if(m&&ie.push(he[D]),b){let Kt=aa(r,n,Z);ie.push(he[Kt[0]],he[Kt[1]])}if(Ft=[...Ft,{placement:r,overflows:ie}],!ie.every(Kt=>Kt<=0)){var $e,re;let Kt=((($e=o.flip)==null?void 0:$e.index)||0)+1,De=xt[Kt];if(De&&(!(b==="alignment"?V!==le(De):!1)||Ft.every(jt=>le(jt.placement)===V?jt.overflows[0]>0:!0)))return{data:{index:Kt,overflows:Ft},reset:{placement:De}};let pe=(re=Ft.filter(Ie=>Ie.overflows[0]<=0).sort((Ie,jt)=>Ie.overflows[1]-jt.overflows[1])[0])==null?void 0:re.placement;if(!pe)switch(k){case"bestFit":{var Te;let Ie=(Te=Ft.filter(jt=>{if(qt){let Le=le(jt.placement);return Le===V||Le==="y"}return!0}).map(jt=>[jt.placement,jt.overflows.filter(Le=>Le>0).reduce((Le,Na)=>Le+Na,0)]).sort((jt,Le)=>jt[1]-Le[1])[0])==null?void 0:Te[0];Ie&&(pe=Ie);break}case"initialPlacement":pe=d;break}if(r!==pe)return{reset:{placement:pe}}}return{}}}};var gl=new Set(["left","top"]);async function vl(s,i){let{placement:t,platform:e,elements:r}=s,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),n=ve(t),d=We(t),h=le(t)==="y",p=gl.has(n)?-1:1,m=o&&h?-1:1,b=Ye(i,s),{mainAxis:C,crossAxis:k,alignmentAxis:$}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof $=="number"&&(k=d==="end"?$*-1:$),h?{x:k*m,y:C*p}:{x:C*p,y:k*m}}var pa=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){var t,e;let{x:r,y:o,placement:n,middlewareData:d}=i,h=await vl(i,s);return n===((t=d.offset)==null?void 0:t.placement)&&(e=d.arrow)!=null&&e.alignmentOffset?{}:{x:r+h.x,y:o+h.y,data:ct(P({},h),{placement:n})}}}},ua=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){let{x:t,y:e,placement:r}=i,S=Ye(s,i),{mainAxis:o=!0,crossAxis:n=!1,limiter:d={fn:D=>{let{x:V,y:U}=D;return{x:V,y:U}}}}=S,h=Hi(S,["mainAxis","crossAxis","limiter"]),p={x:t,y:e},m=await cr(i,h),b=le(ve(r)),C=Kr(b),k=p[C],$=p[b];if(o){let D=C==="y"?"top":"left",V=C==="y"?"bottom":"right",U=k+m[D],Z=k-m[V];k=nr(U,k,Z)}if(n){let D=b==="y"?"top":"left",V=b==="y"?"bottom":"right",U=$+m[D],Z=$-m[V];$=nr(U,$,Z)}let z=d.fn(ct(P({},i),{[C]:k,[b]:$}));return ct(P({},z),{data:{x:z.x-t,y:z.y-e,enabled:{[C]:o,[b]:n}}})}}};var ma=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){var t,e;let{placement:r,rects:o,platform:n,elements:d}=i,Ft=Ye(s,i),{apply:h=()=>{}}=Ft,p=Hi(Ft,["apply"]),m=await cr(i,p),b=ve(r),C=We(r),k=le(r)==="y",{width:$,height:z}=o.floating,S,D;b==="top"||b==="bottom"?(S=b,D=C===(await(n.isRTL==null?void 0:n.isRTL(d.floating))?"start":"end")?"left":"right"):(D=b,S=C==="end"?"top":"bottom");let V=z-m.top-m.bottom,U=$-m.left-m.right,Z=ne(z-m[S],V),Y=ne($-m[D],U),qt=!i.middlewareData.shift,xt=Z,he=Y;if((t=i.middlewareData.shift)!=null&&t.enabled.x&&(he=U),(e=i.middlewareData.shift)!=null&&e.enabled.y&&(xt=V),qt&&!C){let $e=Tt(m.left,0),re=Tt(m.right,0),Te=Tt(m.top,0),It=Tt(m.bottom,0);k?he=$-2*($e!==0||re!==0?$e+re:Tt(m.left,m.right)):xt=z-2*(Te!==0||It!==0?Te+It:Tt(m.top,m.bottom))}await h(ct(P({},i),{availableWidth:he,availableHeight:xt}));let ie=await n.getDimensions(d.floating);return $!==ie.width||z!==ie.height?{reset:{rects:!0}}:{}}}};function hr(){return typeof window!="undefined"}function Qe(s){return ba(s)?(s.nodeName||"").toLowerCase():"#document"}function St(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function Qt(s){var i;return(i=(ba(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function ba(s){return hr()?s instanceof Node||s instanceof St(s).Node:!1}function Bt(s){return hr()?s instanceof Element||s instanceof St(s).Element:!1}function Jt(s){return hr()?s instanceof HTMLElement||s instanceof St(s).HTMLElement:!1}function fa(s){return!hr()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof St(s).ShadowRoot}var yl=new Set(["inline","contents"]);function li(s){let{overflow:i,overflowX:t,overflowY:e,display:r}=Rt(s);return/auto|scroll|overlay|hidden|clip/.test(i+e+t)&&!yl.has(r)}var wl=new Set(["table","td","th"]);function ga(s){return wl.has(Qe(s))}var xl=[":popover-open",":modal"];function Oi(s){return xl.some(i=>{try{return s.matches(i)}catch(t){return!1}})}var kl=["transform","translate","scale","rotate","perspective"],Cl=["transform","translate","scale","rotate","perspective","filter"],El=["paint","layout","strict","content"];function pr(s){let i=ur(),t=Bt(s)?Rt(s):s;return kl.some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!i&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!i&&(t.filter?t.filter!=="none":!1)||Cl.some(e=>(t.willChange||"").includes(e))||El.some(e=>(t.contain||"").includes(e))}function va(s){let i=ye(s);for(;Jt(i)&&!Je(i);){if(pr(i))return i;if(Oi(i))return null;i=ye(i)}return null}function ur(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var $l=new Set(["html","body","#document"]);function Je(s){return $l.has(Qe(s))}function Rt(s){return St(s).getComputedStyle(s)}function Si(s){return Bt(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function ye(s){if(Qe(s)==="html")return s;let i=s.assignedSlot||s.parentNode||fa(s)&&s.host||Qt(s);return fa(i)?i.host:i}function ya(s){let i=ye(s);return Je(i)?s.ownerDocument?s.ownerDocument.body:s.body:Jt(i)&&li(i)?i:ya(i)}function ni(s,i,t){var e;i===void 0&&(i=[]),t===void 0&&(t=!0);let r=ya(s),o=r===((e=s.ownerDocument)==null?void 0:e.body),n=St(r);if(o){let d=mr(n);return i.concat(n,n.visualViewport||[],li(r)?r:[],d&&t?ni(d):[])}return i.concat(r,ni(r,[],t))}function mr(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function Ca(s){let i=Rt(s),t=parseFloat(i.width)||0,e=parseFloat(i.height)||0,r=Jt(s),o=r?s.offsetWidth:t,n=r?s.offsetHeight:e,d=Ai(t)!==o||Ai(e)!==n;return d&&(t=o,e=n),{width:t,height:e,$:d}}function Yr(s){return Bt(s)?s:s.contextElement}function di(s){let i=Yr(s);if(!Jt(i))return Zt(1);let t=i.getBoundingClientRect(),{width:e,height:r,$:o}=Ca(i),n=(o?Ai(t.width):t.width)/e,d=(o?Ai(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!d||!Number.isFinite(d))&&(d=1),{x:n,y:d}}var Tl=Zt(0);function Ea(s){let i=St(s);return!ur()||!i.visualViewport?Tl:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function Ll(s,i,t){return i===void 0&&(i=!1),!t||i&&t!==St(s)?!1:i}function Ge(s,i,t,e){i===void 0&&(i=!1),t===void 0&&(t=!1);let r=s.getBoundingClientRect(),o=Yr(s),n=Zt(1);i&&(e?Bt(e)&&(n=di(e)):n=di(s));let d=Ll(o,t,e)?Ea(o):Zt(0),h=(r.left+d.x)/n.x,p=(r.top+d.y)/n.y,m=r.width/n.x,b=r.height/n.y;if(o){let C=St(o),k=e&&Bt(e)?St(e):e,$=C,z=mr($);for(;z&&e&&k!==$;){let S=di(z),D=z.getBoundingClientRect(),V=Rt(z),U=D.left+(z.clientLeft+parseFloat(V.paddingLeft))*S.x,Z=D.top+(z.clientTop+parseFloat(V.paddingTop))*S.y;h*=S.x,p*=S.y,m*=S.x,b*=S.y,h+=U,p+=Z,$=St(z),z=mr($)}}return Ze({width:m,height:b,x:h,y:p})}function fr(s,i){let t=Si(s).scrollLeft;return i?i.left+t:Ge(Qt(s)).left+t}function $a(s,i){let t=s.getBoundingClientRect(),e=t.left+i.scrollLeft-fr(s,t),r=t.top+i.scrollTop;return{x:e,y:r}}function zl(s){let{elements:i,rect:t,offsetParent:e,strategy:r}=s,o=r==="fixed",n=Qt(e),d=i?Oi(i.floating):!1;if(e===n||d&&o)return t;let h={scrollLeft:0,scrollTop:0},p=Zt(1),m=Zt(0),b=Jt(e);if((b||!b&&!o)&&((Qe(e)!=="body"||li(n))&&(h=Si(e)),Jt(e))){let k=Ge(e);p=di(e),m.x=k.x+e.clientLeft,m.y=k.y+e.clientTop}let C=n&&!b&&!o?$a(n,h):Zt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-h.scrollLeft*p.x+m.x+C.x,y:t.y*p.y-h.scrollTop*p.y+m.y+C.y}}function Al(s){return Array.from(s.getClientRects())}function Ml(s){let i=Qt(s),t=Si(s),e=s.ownerDocument.body,r=Tt(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),o=Tt(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),n=-t.scrollLeft+fr(s),d=-t.scrollTop;return Rt(e).direction==="rtl"&&(n+=Tt(i.clientWidth,e.clientWidth)-r),{width:r,height:o,x:n,y:d}}var wa=25;function Ol(s,i){let t=St(s),e=Qt(s),r=t.visualViewport,o=e.clientWidth,n=e.clientHeight,d=0,h=0;if(r){o=r.width,n=r.height;let m=ur();(!m||m&&i==="fixed")&&(d=r.offsetLeft,h=r.offsetTop)}let p=fr(e);if(p<=0){let m=e.ownerDocument,b=m.body,C=getComputedStyle(b),k=m.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,$=Math.abs(e.clientWidth-b.clientWidth-k);$<=wa&&(o-=$)}else p<=wa&&(o+=p);return{width:o,height:n,x:d,y:h}}var Sl=new Set(["absolute","fixed"]);function _l(s,i){let t=Ge(s,!0,i==="fixed"),e=t.top+s.clientTop,r=t.left+s.clientLeft,o=Jt(s)?di(s):Zt(1),n=s.clientWidth*o.x,d=s.clientHeight*o.y,h=r*o.x,p=e*o.y;return{width:n,height:d,x:h,y:p}}function xa(s,i,t){let e;if(i==="viewport")e=Ol(s,t);else if(i==="document")e=Ml(Qt(s));else if(Bt(i))e=_l(i,t);else{let r=Ea(s);e={x:i.x-r.x,y:i.y-r.y,width:i.width,height:i.height}}return Ze(e)}function Ta(s,i){let t=ye(s);return t===i||!Bt(t)||Je(t)?!1:Rt(t).position==="fixed"||Ta(t,i)}function Dl(s,i){let t=i.get(s);if(t)return t;let e=ni(s,[],!1).filter(d=>Bt(d)&&Qe(d)!=="body"),r=null,o=Rt(s).position==="fixed",n=o?ye(s):s;for(;Bt(n)&&!Je(n);){let d=Rt(n),h=pr(n);!h&&d.position==="fixed"&&(r=null),(o?!h&&!r:!h&&d.position==="static"&&!!r&&Sl.has(r.position)||li(n)&&!h&&Ta(s,n))?e=e.filter(m=>m!==n):r=d,n=ye(n)}return i.set(s,e),e}function Il(s){let{element:i,boundary:t,rootBoundary:e,strategy:r}=s,n=[...t==="clippingAncestors"?Oi(i)?[]:Dl(i,this._c):[].concat(t),e],d=n[0],h=n.reduce((p,m)=>{let b=xa(i,m,r);return p.top=Tt(b.top,p.top),p.right=ne(b.right,p.right),p.bottom=ne(b.bottom,p.bottom),p.left=Tt(b.left,p.left),p},xa(i,d,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function Hl(s){let{width:i,height:t}=Ca(s);return{width:i,height:t}}function Pl(s,i,t){let e=Jt(i),r=Qt(i),o=t==="fixed",n=Ge(s,!0,o,i),d={scrollLeft:0,scrollTop:0},h=Zt(0);function p(){h.x=fr(r)}if(e||!e&&!o)if((Qe(i)!=="body"||li(r))&&(d=Si(i)),e){let k=Ge(i,!0,o,i);h.x=k.x+i.clientLeft,h.y=k.y+i.clientTop}else r&&p();o&&!e&&r&&p();let m=r&&!e&&!o?$a(r,d):Zt(0),b=n.left+d.scrollLeft-h.x-m.x,C=n.top+d.scrollTop-h.y-m.y;return{x:b,y:C,width:n.width,height:n.height}}function Xr(s){return Rt(s).position==="static"}function ka(s,i){if(!Jt(s)||Rt(s).position==="fixed")return null;if(i)return i(s);let t=s.offsetParent;return Qt(s)===t&&(t=t.ownerDocument.body),t}function La(s,i){let t=St(s);if(Oi(s))return t;if(!Jt(s)){let r=ye(s);for(;r&&!Je(r);){if(Bt(r)&&!Xr(r))return r;r=ye(r)}return t}let e=ka(s,i);for(;e&&ga(e)&&Xr(e);)e=ka(e,i);return e&&Je(e)&&Xr(e)&&!pr(e)?t:e||va(s)||t}var Fl=async function(s){let i=this.getOffsetParent||La,t=this.getDimensions,e=await t(s.floating);return{reference:Pl(s.reference,await i(s.floating),s.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Vl(s){return Rt(s).direction==="rtl"}var Bl={convertOffsetParentRelativeRectToViewportRelativeRect:zl,getDocumentElement:Qt,getClippingRect:Il,getOffsetParent:La,getElementRects:Fl,getClientRects:Al,getDimensions:Hl,getScale:di,isElement:Bt,isRTL:Vl};function za(s,i){return s.x===i.x&&s.y===i.y&&s.width===i.width&&s.height===i.height}function Rl(s,i){let t=null,e,r=Qt(s);function o(){var d;clearTimeout(e),(d=t)==null||d.disconnect(),t=null}function n(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),o();let p=s.getBoundingClientRect(),{left:m,top:b,width:C,height:k}=p;if(d||i(),!C||!k)return;let $=Mi(b),z=Mi(r.clientWidth-(m+C)),S=Mi(r.clientHeight-(b+k)),D=Mi(m),U={rootMargin:-$+"px "+-z+"px "+-S+"px "+-D+"px",threshold:Tt(0,ne(1,h))||1},Z=!0;function Y(qt){let xt=qt[0].intersectionRatio;if(xt!==h){if(!Z)return n();xt?n(!1,xt):e=setTimeout(()=>{n(!1,1e-7)},1e3)}xt===1&&!za(p,s.getBoundingClientRect())&&n(),Z=!1}try{t=new IntersectionObserver(Y,ct(P({},U),{root:r.ownerDocument}))}catch(qt){t=new IntersectionObserver(Y,U)}t.observe(s)}return n(!0),o}function Aa(s,i,t,e){e===void 0&&(e={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=e,p=Yr(s),m=r||o?[...p?ni(p):[],...ni(i)]:[];m.forEach(D=>{r&&D.addEventListener("scroll",t,{passive:!0}),o&&D.addEventListener("resize",t)});let b=p&&d?Rl(p,t):null,C=-1,k=null;n&&(k=new ResizeObserver(D=>{let[V]=D;V&&V.target===p&&k&&(k.unobserve(i),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var U;(U=k)==null||U.observe(i)})),t()}),p&&!h&&k.observe(p),k.observe(i));let $,z=h?Ge(s):null;h&&S();function S(){let D=Ge(s);z&&!za(z,D)&&t(),z=D,$=requestAnimationFrame(S)}return t(),()=>{var D;m.forEach(V=>{r&&V.removeEventListener("scroll",t),o&&V.removeEventListener("resize",t)}),b==null||b(),(D=k)==null||D.disconnect(),k=null,h&&cancelAnimationFrame($)}}var Ma=pa;var Oa=ua,Sa=ha,Wr=ma;var _a=ca;var Da=(s,i,t)=>{let e=new Map,r=P({platform:Bl},t),o=ct(P({},r.platform),{_c:e});return da(s,i,ct(P({},r),{platform:o}))};var K=class extends f{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(e=>this.handleCurrentPlacementChange(e));let t={attributes:!0};this.mutationObserver.observe(this,t)}handleCurrentPlacementChange(t){return t.forEach(e=>{if(e.attributeName==="data-current-placement"){let r=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:r})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=Aa(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Ma({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Wr({apply:({rects:e})=>{let r=this.sync==="width"||this.sync==="both",o=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${e.reference.width}px`:"",this.popup.style.height=o?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Sa({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Oa({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Wr({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(_a({element:this.arrowEl,padding:this.arrowPadding})),Da(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then(({x:e,y:r,middlewareData:o,placement:n})=>{let d=getComputedStyle(this).direction==="rtl",h={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${e}px`,top:`${r}px`}),this.arrow){let p=o.arrow.x,m=o.arrow.y,b="",C="",k="",$="";if(this.arrowPlacement==="start"){let z=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";b=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",C=d?z:"",$=d?"":z}else if(this.arrowPlacement==="end"){let z=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";C=d?"":z,$=d?z:"",k=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?($=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":"",b=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):($=typeof p=="number"?`${p}px`:"",b=typeof m=="number"?`${m}px`:"");Object.assign(this.arrowEl.style,{top:b,right:C,bottom:k,left:$,[h]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return u`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${c("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?u`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};K.styles=[...f.styles,y`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],a([g('[part="popup"]')],K.prototype,"popup",2),a([g('[part="arrow"]')],K.prototype,"arrowEl",2),a([l({reflect:!0})],K.prototype,"anchor",2),a([l({type:Boolean,reflect:!0})],K.prototype,"active",2),a([l({type:String,reflect:!0})],K.prototype,"placement",2),a([l({type:String,reflect:!0})],K.prototype,"strategy",2),a([l({type:Number,reflect:!0})],K.prototype,"distance",2),a([l({type:Number,reflect:!0})],K.prototype,"skidding",2),a([l({type:Boolean,reflect:!0})],K.prototype,"arrow",2),a([l({type:String,attribute:"arrow-placement",reflect:!0})],K.prototype,"arrowPlacement",2),a([l({attribute:"arrow-padding",type:Number,reflect:!0})],K.prototype,"arrowPadding",2),a([l({type:Boolean,reflect:!0})],K.prototype,"flip",2),a([l({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],K.prototype,"flipFallbackPlacements",2),a([l({type:String,attribute:"flip-fallback-strategy"})],K.prototype,"flipFallbackStrategy",2),a([l({type:Object})],K.prototype,"flipBoundary",2),a([l({attribute:"flip-padding",type:Number})],K.prototype,"flipPadding",2),a([l({type:Boolean})],K.prototype,"shift",2),a([l({type:Object})],K.prototype,"shiftBoundary",2),a([l({attribute:"shift-padding",type:Number})],K.prototype,"shiftPadding",2),a([l({type:String,attribute:"auto-size"})],K.prototype,"autoSize",2),a([l()],K.prototype,"sync",2),a([l({type:Object})],K.prototype,"autoSizeBoundary",2),a([l({attribute:"auto-size-padding",type:Number})],K.prototype,"autoSizePadding",2),K=a([v("sd-popup")],K);var gt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=t?Q`a`:this.removable?Q`div`:Q`button`;return H`<${e} part="base" type="${w(t?void 0:"button")}" href="${w(t?this.href:void 0)}" rel="${w(t&&this.target?"noreferrer noopener":void 0)}" target="${w(t?this.target:void 0)}" download="${w(t?this.download:void 0)}" ?disabled="${w(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${w(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||this.removable?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":c("border-primary text-primary disabled:border-neutral-500 disabled:text-neutral-500",this.removable?"has-[button:hover]:border-primary-500 has-[button:hover]:bg-neutral-100 has-[button:hover]:text-primary-500":"hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500"),this.disabled&&!t&&"cursor-not-allowed")}"><slot id="content" part="content"></slot>${this.removable&&!t?H`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}"><slot part="removable-indicator" name="removable-indicator"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${e}>`}};gt.styles=[...f.styles,y`:host{display:inline-block;transition-duration:.15s;transition-duration:var(--sd-duration-fast,.15s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host([size=lg])::part(removable-indicator){font-size:var(--sd-font-size-base,1rem)}:host([size=sm])::part(removable-indicator){font-size:.75rem}`],a([g("a, button, div")],gt.prototype,"tag",2),a([l({type:String,reflect:!0})],gt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"selected",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"toggleable",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"removable",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"disabled",2),a([l({type:String,reflect:!0})],gt.prototype,"href",2),a([l({type:String,reflect:!0})],gt.prototype,"target",2),a([l({reflect:!0})],gt.prototype,"download",2),gt=a([v("sd-tag")],gt);var Ia=s=>s;var Zr=s=>Array.from(s.assignedElements({flatten:!0})),Ul=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Nl=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",Ha=s=>s.map(Ul),Pa=s=>s.filter(Nl),br=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var T=class extends f{constructor(){super(...arguments);this.formControlController=new lt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new A(this,"help-text","label");this.localize=new L(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=Ia;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let r=br(t.value),o=br(t.getTextLabel()),n=br(e);return r.includes(n)||o.includes(n)};this.getTag=t=>u`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
117
+ ${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${w(t?void 0:this.disabled)}" type="${w(t?void 0:this.type)}" title="${this.title}" name="${w(t?void 0:this.name)}" value="${w(t?void 0:this.value)}" href="${w(t?this.href:void 0)}" target="${w(t?this.target:void 0)}" download="${w(t?this.download:void 0)}" rel="${w(t&&this.target?"noreferrer noopener":void 0)}" role="${w(t?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${c("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${c("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${c("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${c("flex flex-auto items-center justify-end pointer-events-none",r["icon-only"]&&"hidden",this.loading&&"invisible",r["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${c("inline-flex items-center justify-center",r["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${c("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",r["icon-only"]&&"hidden",r["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?H`<sd-loader class="${c("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-loader>`:""}</${e}>`}};N.styles=[...f.styles,y`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-icon),sd-loader{font-size:calc(var(--tw-varspacing)/2)}`],a([g("a, button")],N.prototype,"button",2),a([ei({selector:"sd-icon"})],N.prototype,"_iconsInDefaultSlot",2),a([E()],N.prototype,"invalid",2),a([l({type:String,reflect:!0})],N.prototype,"title",2),a([l({type:String,reflect:!0})],N.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],N.prototype,"inverted",2),a([l({type:String,reflect:!0})],N.prototype,"size",2),a([l({type:Boolean,reflect:!0})],N.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],N.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],N.prototype,"loading",2),a([l({type:String,reflect:!0})],N.prototype,"type",2),a([l({type:String,reflect:!0})],N.prototype,"name",2),a([l()],N.prototype,"value",2),a([l({type:String,reflect:!0})],N.prototype,"href",2),a([l({type:String,reflect:!0})],N.prototype,"target",2),a([l({reflect:!0})],N.prototype,"download",2),a([l({reflect:!0})],N.prototype,"form",2),a([l({attribute:"formaction"})],N.prototype,"formAction",2),a([l({attribute:"formenctype"})],N.prototype,"formEnctype",2),a([l({attribute:"formmethod"})],N.prototype,"formMethod",2),a([l({attribute:"formnovalidate",type:Boolean})],N.prototype,"formNoValidate",2),a([l({attribute:"formtarget"})],N.prototype,"formTarget",2),a([x("disabled",{waitUntilFirstUpdate:!0})],N.prototype,"handleDisabledChange",1),N=a([v("sd-button")],N);function qe(s=document.activeElement){if(s!=null&&s.shadowRoot){let i=s.shadowRoot.activeElement;if(i)return qe(i)}return s}function Zs(s,i){return{top:Math.round(s.getBoundingClientRect().top-i.getBoundingClientRect().top),left:Math.round(s.getBoundingClientRect().left-i.getBoundingClientRect().left)}}var Nr=new Set;function ll(){let s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}function Ke(s){if(Nr.add(s),!document.body.classList.contains("sd-scroll-lock")){let i=ll();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${i}px`)}}function je(s){Nr.delete(s),Nr.size===0&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function Yt(s,i,t="vertical",e="smooth"){let r=Zs(s,i),o=r.top+i.scrollTop,n=r.left+i.scrollLeft,d=i.scrollLeft,h=i.scrollLeft+i.offsetWidth,p=i.scrollTop,m=i.scrollTop+i.offsetHeight;(t==="horizontal"||t==="both")&&(n<d?i.scrollTo({left:n,behavior:e}):n+s.clientWidth>h&&i.scrollTo({left:n-i.offsetWidth+s.clientWidth,behavior:e})),(t==="vertical"||t==="both")&&(o<p?i.scrollTo({top:o,behavior:e}):o+s.clientHeight>m&&i.scrollTo({top:o-i.offsetHeight+s.clientHeight,behavior:e}))}function ai(s){return s.charAt(0).toUpperCase()+s.slice(1)}function qr(s){return s.replace(/-./g,i=>i[1].toUpperCase())}function Qs(s){let i=s.tagName.toLowerCase();return s.getAttribute("tabindex")==="-1"||s.hasAttribute("disabled")||s.hasAttribute("aria-disabled")&&s.getAttribute("aria-disabled")!=="false"||i==="input"&&s.getAttribute("type")==="radio"&&!s.hasAttribute("checked")||s.offsetParent===null&&!(s.getRootNode()instanceof ShadowRoot)||window.getComputedStyle(s).visibility==="hidden"?!1:(i==="audio"||i==="video")&&s.hasAttribute("controls")||s.hasAttribute("tabindex")||s.hasAttribute("contenteditable")&&s.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(i)}function ir(s){var o,n;let i=[];function t(d){d instanceof HTMLElement&&(i.push(d),d.shadowRoot!==null&&d.shadowRoot.mode==="open"&&t(d.shadowRoot)),[...d.children].forEach(h=>t(h))}t(s);let e=(o=i.find(d=>Qs(d)))!=null?o:null,r=(n=i.reverse().find(d=>Qs(d)))!=null?n:null;return{start:e,end:r}}var Ti=[],Xe=class{constructor(i){this.tabDirection="forward";this.element=i,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Ti.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Ti=Ti.filter(i=>i!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Ti[Ti.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){let{start:i,end:t}=ir(this.element),e=this.tabDirection==="forward"?i:t;typeof(e==null?void 0:e.focus)=="function"&&e.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(i){i.key==="Tab"&&i.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}};var ht=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"footer");this.localize=new L(this);this.modal=new Xe(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=t=>{this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),Ke(this)))}disconnectedCallback(){super.disconnectedCallback(),je(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=F(this,"drawer.denyClose",{dir:this.localize.dir()});B(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var e;let t=(e=this.closeButton.shadowRoot)==null?void 0:e.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=qe(),this.contained||(this.modal.activate(),Ke(this));let r=this.querySelector("[autofocus]");r&&r.removeAttribute("autofocus"),await Promise.all([R(this.drawer),R(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let o=F(this,`drawer.show${ai(this.placement)}`,{dir:this.localize.dir()}),n=F(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([B(this.panel,o.keyframes,o.options),B(this.overlay,n.keyframes,n.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(r?r.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),r?r.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),je(this)),await Promise.all([R(this.drawer),R(this.overlay)]);let r=F(this,`drawer.hide${ai(this.placement)}`,{dir:this.localize.dir()}),o=F(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([B(this.overlay,o.keyframes,o.options).then(()=>{this.overlay.hidden=!0}),B(this.panel,r.keyframes,r.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let n=this.originalTrigger;typeof(n==null?void 0:n.focus)=="function"&&setTimeout(()=>n.focus()),t==null||t.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),Ke(this)),this.open&&this.contained&&(this.modal.deactivate(),je(this))}async show(){if(!this.open)return this.open=!0,X(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,X(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${c("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${c("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${c("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2 z-10"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ms-4 absolute top-2 end-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${c(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};ht.styles=[...f.styles,y`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],a([g("[part=base]")],ht.prototype,"drawer",2),a([g("[part=panel]")],ht.prototype,"panel",2),a([g("[part=overlay]")],ht.prototype,"overlay",2),a([g("[part=close-button]")],ht.prototype,"closeButton",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"open",2),a([l({type:String,attribute:"label",reflect:!0})],ht.prototype,"label",2),a([l({type:String,reflect:!0})],ht.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"contained",2),a([l({attribute:"no-header",type:Boolean,reflect:!0})],ht.prototype,"noHeader",2),a([x("open",{waitUntilFirstUpdate:!0})],ht.prototype,"handleOpenChange",1),a([x("contained",{waitUntilFirstUpdate:!0})],ht.prototype,"handleNoModalChange",1),ht=a([v("sd-drawer")],ht);_("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});var Se=class{constructor(i){this.fixedEnd=!0;this.fixedStart=!0;this.gradient=!1;this.outline=!1;this.map=(i,t,e,r,o)=>(i-t)*(o-r)/(e-t)+r;this.damp=(i,t,e)=>2*(1-t/i)*(t/i)*e;this.canvas=i.canvas,this.frequency=i.frequency,this.phase=i.phase,this.amplitude=i.amplitude,this.color=i.color,this.shift=i.shift,this.lineWidth=2,this.damping=i.damping,this.context=this.canvas.getContext("2d"),this.paused=!0,this.playbackSpeed=1,this.origin={x:0,y:this.canvas.height}}drawPoint(i,t,e){if(!this.context)return;let r=this.lineWidth/2;if(this.context.beginPath(),this.outline&&(this.context.fillStyle=e,this.context.lineWidth=2,this.context.arc(i,t,r,0,2*Math.PI),this.context.fill()),this.gradient){let o=this.context.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(.1,e),o.addColorStop(1,"transparent"),this.context.fillStyle=o}else this.context.fillStyle=e;this.context.fillRect(i-r,t-r,r,this.canvas.height-t+r)}buildSine(i,t,e,r,o){for(let n=this.origin.x,d=this.origin.x+i;n<d;n+=1){let h=r*Math.sin(o*(n+t));this.fixedStart&&this.fixedEnd?this.drawPoint(n,this.origin.y+this.damp(d,n,this.damping)*h,e):this.fixedStart?this.drawPoint(n,this.origin.y+this.map(n,this.origin.x,d,0,this.damping)*h,e):this.fixedEnd?this.drawPoint(n,this.origin.y+(this.damping-this.map(n,this.origin.x,d,0,this.damping))*h,e):this.drawPoint(n,this.origin.y+h,e)}}redraw(){this.phase+=this.shift*(this.paused?1:2*this.playbackSpeed),this.buildSine(this.canvas.width,this.phase,this.color,this.amplitude,this.frequency)}setPlay(){this.paused=!1}setPause(){this.paused=!0}setPlaybackSpeed(i){this.playbackSpeed=i}};var it=class extends f{constructor(){super();this.localize=new L(this);this.hasSlotController=new A(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let e=t.get("animated");!e&&this.animated?this.initAnimation():e&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let e=Math.floor(t/60).toString().padStart(2,"0"),r=Math.floor(t%60).toString().padStart(2,"0");return`${e}:${r}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let e=t.match(/\d+/g);if(e&&e.length===3){let r=parseInt(e[0]),o=parseInt(e[1]),n=parseInt(e[2]),d=p=>p.toString(16).padStart(2,"0");return`#${d(r)}${d(o)}${d(n)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),r=window.getComputedStyle(t).color,o;this.inverted?o="#FFFFFF33":o=this.rgbToHex(r)+"33",this.waveList=[new Se({canvas:this.canvas,color:o,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new Se({canvas:this.canvas,color:o,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new Se({canvas:this.canvas,color:o,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new Se({canvas:this.canvas,color:o,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new Se({canvas:this.canvas,color:o,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=u`<div class="${c("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${c("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?u`<slot name="pause-icon"><sd-icon class="text-xl" name="pause" library="_internal"></sd-icon></slot>`:u`<slot name="play-icon"><sd-icon class="text-xl" name="start" library="_internal"></sd-icon></slot>`}</sd-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?u`<button class="${c("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-icon class="w-6 h-6" name="transcript" library="_internal"></sd-icon></button>`:null} <button class="${c("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-icon></button></div></div>`,e=u`<div class="${c("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${c("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${c("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return u`<div class="${c("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?t:null}<div class="relative">${this.animated&&!this.reversedLayout?u`${t}`:null} ${this.animated?u`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?e:null}<sd-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-range></div>${this.hasSlotController.test("transcript")?u`<sd-drawer><slot name="transcript"></slot></sd-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?e:null}</div>`}};it.styles=[...f.styles,y`sd-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-button::part(label){align-items:center;display:flex;flex-grow:0}sd-range::part(form-control-label){display:none}:host([inverted]) sd-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],it.prototype,"reversedLayout",2),a([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],it.prototype,"hideTimestamps",2),a([l({type:Boolean,reflect:!0})],it.prototype,"animated",2),a([l({type:Boolean,reflect:!0})],it.prototype,"inverted",2),a([l({type:Number,reflect:!0})],it.prototype,"speed",2),a([E()],it.prototype,"currentTime",2),a([E()],it.prototype,"duration",2),a([E()],it.prototype,"isPlaying",2),a([E()],it.prototype,"isMuted",2),a([E()],it.prototype,"isTranscriptOpen",2),a([E()],it.prototype,"progress",2),a([g('[part="progress-slider"]')],it.prototype,"progressSlider",2),a([g('[part="audio-player"]')],it.prototype,"audioPlayerContainer",2),a([g("sd-drawer")],it.prototype,"drawer",2),a([g("canvas")],it.prototype,"canvas",2),it=a([v("sd-audio")],it);var Wt=class extends f{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return u`<span part="base" aria-labelledby="content" class="${c("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${c(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};Wt.styles=[...f.styles,y`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],a([l({type:String,reflect:!0})],Wt.prototype,"size",2),a([l({type:String,reflect:!0})],Wt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],Wt.prototype,"inverted",2),Wt=a([v("sd-badge")],Wt);var Vt=class extends f{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(t,e){return{0:this.smallSvg(e),414:this.mediumSvg(e),640:this.largeSvg(e)}[t]}largeSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return u`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return u`<div class="${c({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${c({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${c("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":u`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return u`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(t){return u`<div class="${c({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[t],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return u`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${c(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return u`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let t=this.variant.startsWith("border-")||this.variant==="image";return u`<div class="${c({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${t?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};Vt.styles=[...f.styles,y`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],a([g("[part=base]")],Vt.prototype,"containerElem",2),a([l({type:String,reflect:!0})],Vt.prototype,"variant",2),a([l({type:Array})],Vt.prototype,"shapes",2),a([E()],Vt.prototype,"componentBreakpoint",2),Vt=a([v("sd-brandshape")],Vt);var $t=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:e}=t.getBoundingClientRect();t.dataset.size=`${e}`}),this.itemPositionsCached=!0}handleTruncation(){var o;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:e}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let r=0;for(let[n,d]of Array.from(this.items).reverse().entries()){let h=parseFloat(`${(o=d.dataset.size)!=null?o:d.getBoundingClientRect().width}`);if(d.hidden=!1,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0;continue}if(n===0||n===1){r+=h;continue}if(this.isTruncated=r+h+e>t,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0}else r+=h}}handleMobileChevron(){var e,r,o;let t=document.createElement("sd-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(o=(r=(e=Array.from(this.items).at(-2))==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("sd-link"))==null||o.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-dropdown part="truncated" class="${c(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};$t.styles=[...f.styles,y`:host{display:block;position:relative}::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{border-radius:var(--sd-border-radius-full,9999px);content:var(--tw-content);display:none;height:var(--sd-spacing-1,.25rem);margin-left:var(--sd-spacing-2,.5rem);margin-right:var(--sd-spacing-2,.5rem);width:var(--sd-spacing-1,.25rem);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-bg-opacity,1))}@media (min-width:1024px){::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{content:var(--tw-content);display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (min-width:1024px){::slotted(sd-breadcrumb-item:nth-last-child(2)):after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent,45 157 0)/var(--tw-bg-opacity,1))}}::slotted(sd-breadcrumb-item),sd-dropdown{align-items:center;display:none;font-size:var(--sd-font-size-sm,.875rem)}@media (min-width:1024px){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}`],a([g('[part="base"]')],$t.prototype,"base",2),a([g('[part="truncated"]')],$t.prototype,"truncated",2),a([g('[part="truncated-dropdown"]')],$t.prototype,"dropdown",2),a([g("slot")],$t.prototype,"defaultSlot",2),a([l({type:String,reflect:!0})],$t.prototype,"label",2),a([E()],$t.prototype,"itemPositionsCached",2),a([E()],$t.prototype,"isTruncated",2),$t=a([v("sd-breadcrumb")],$t);var Pt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return u`<sd-link part="base" href="${w(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Pt.styles=[...f.styles,y`:host{align-items:center;display:inline-flex}sd-link::part(base){align-items:center}sd-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-link sd-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-link::part(label){text-decoration-line:none}`],a([g('[part="base"]')],Pt.prototype,"base",2),a([l({type:String,reflect:!0})],Pt.prototype,"href",2),a([l({type:String,reflect:!0})],Pt.prototype,"target",2),a([l({type:Boolean,reflect:!0})],Pt.prototype,"current",2),a([x("current")],Pt.prototype,"handleCurrentChange",1),Pt=a([v("sd-breadcrumb-item")],Pt);var rr=class{constructor(i,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};i.addController(this),this.host=i,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(i){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},i)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function Js(s,i,t){let e=r=>Object.is(r,-0)?0:r;return s<i?e(i):s>t?e(t):e(s)}var sr=class{constructor(i){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=i}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(i){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,r)=>{r===i?this.show(e):this.hide(e)})}show(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),i.removeAttribute("inert"),i.setAttribute("aria-hidden","false")}hide(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),i.toggleAttribute("inert",!0),i.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let i=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(i.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=i.map(r=>{let o=r,n={position:o.style.position,opacity:o.style.opacity,zIndex:o.style.zIndex,transform:o.style.transform,classes:o.className};return o.classList.remove(...this.getAllFadeClasses()),o.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let r=i.map(n=>n.getBoundingClientRect().height),o=Math.max(...r);i.forEach((n,d)=>{let h=n,p=e[d];h.className=p.classes,["position","opacity","zIndex","transform"].forEach(m=>{let b=p[m];b?h.style.setProperty(m,b):h.style.removeProperty(m)})}),o>0&&(this.carousel.style.setProperty("--carousel-height",`${o}px`),t.style.height=`${o}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*Gs(s,i){if(s!==void 0){let t=0;for(let e of s)yield i(e,t++)}}function*ta(s,i,t=1){let e=i===void 0?0:s;i!=null||(i=s);for(let r=e;t>0?r<i:i<r;r+=t)yield r}var ea=Symbol(),oi=s=>(i,t,e)=>{let r=e.value;e.value=function(...o){clearTimeout(this[ea]),this[ea]=window.setTimeout(()=>{r.apply(this,o)},s)}};var Li=class{constructor(i){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=i=>{if(i.pointerType==="touch")return;this.pointers.add(i.pointerId),this.mouseDragging&&!this.dragging&&i.button===0&&(i.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=i=>{let t=this.host.scrollContainer,e=!!i.movementX||!!i.movementY;!this.dragging&&e?(t.setPointerCapture(i.pointerId),this.handleDragStart()):t.hasPointerCapture(i.pointerId)&&this.handleDrag(i)};this.handlePointerUp=i=>{this.pointers.delete(i.pointerId),this.host.scrollContainer.releasePointerCapture(i.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=i=>{for(let t of i.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=i=>{for(let t of i.touches)this.pointers.add(t.identifier)};this.host=i,i.addController(this)}async hostConnected(){let i=this.host;await i.updateComplete;let t=i.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let i=this.host;this.dragging=!0,i.scrollContainer.style.setProperty("scroll-snap-type","unset"),i.requestUpdate()}handleDrag(i){this.host.scrollContainer.scrollBy({left:-i.movementX,top:-i.movementY})}async handleDragEnd(){let i=this.host,t=i.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,r=t.scrollTop;t.style.removeProperty("scroll-snap-type");let o=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:r,behavior:"auto"}),t.scrollTo({left:o,top:n,behavior:ki()?"auto":"smooth"}),this.scrolling&&await X(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),i.requestUpdate()}};a([oi(100)],Li.prototype,"handleScrollEnd",1);var oe=class extends f{static isCarouselItem(i){return i instanceof Element&&i.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return u`<slot></slot>`}};oe.styles=[...f.styles,y`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`],oe=a([v("sd-carousel-item")],oe);var q=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new rr(this,()=>this.next());this.scrollController=new Li(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new L(this);this.userInteracted=!1;this.fadeController=new sr(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(r=>[...r.addedNodes,...r.removedNodes].some(o=>oe.isCarouselItem(o)&&!o.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction));let t=new IntersectionObserver(e=>{e.forEach(r=>{this.intersectionObserverEntries.set(r.target,r);let o=r.target;o.toggleAttribute("inert",!r.isIntersecting),o.classList.toggle("--in-view",r.isIntersecting),o.setAttribute("aria-hidden",r.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(r=>{r.forEach(o=>{o.isIntersecting&&o.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,r){return Math.ceil((t-e)/r)+1>0?Math.ceil((t-e)/r)+1:1}getCurrentPage(t,e,r,o){return Math.ceil((t-r)/o)-Math.ceil((t-r-e)/o)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,r=this.localize.dir()==="rtl",o=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!r&&t.key==="ArrowRight"||r&&t.key==="ArrowLeft",d=t.key==="ArrowUp"||!r&&t.key==="ArrowLeft"||r&&t.key==="ArrowRight";t.preventDefault(),d&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),o&&this.updateComplete.then(()=>{var p;let h=(p=this.shadowRoot)==null?void 0:p.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),r=[...this.intersectionObserverEntries.values()].find(o=>o.isIntersecting);if(this.loop&&(r!=null&&r.target.hasAttribute("data-clone"))){let o=Number(r.target.getAttribute("data-clone"));this.goToSlide(o,"auto");return}r&&(this.activeSlide=t.indexOf(r.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var t,e;this.pausedAutoplay?(this.autoplayController.stop(),(t=this.autoplayControls)==null||t.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((r,o)=>{e.unobserve(r),r.classList.remove("--in-view"),r.classList.remove("--is-active"),r.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),r.hasAttribute("data-clone")&&r.remove()}),this.loop&&!this.fade){let r=this.slidesPerPage,o=t.slice(-r),n=t.slice(0,r);o.reverse().forEach((d,h)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(t.length-h-1)),this.prepend(p)}),n.forEach((d,h)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(h)),this.append(p)})}this.getSlides({excludeClones:!1}).forEach(r=>{e.observe(r)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((o,n)=>{o.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}});let r=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>r&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((r,o)=>{Math.abs(o-e)%e===0?r.style.removeProperty("scroll-snap-align"):r.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(t="smooth"){if(this.fade){let o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,r=!1;for(;!r&&e>0;)e-=1,r=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:r,loop:o,scrollContainer:n,fade:d}=this,h=this.getSlides(),p=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,d)return;let b=Js(t+(o?r:0),0,p.length+1),C=p[b],k=n.getBoundingClientRect(),$=C.getBoundingClientRect();if(n.scrollTo({left:$.left-k.left+n.scrollLeft,top:$.top-k.top+n.scrollTop,behavior:ki()?"auto":e}),this.userInteracted&&!this.loop){let z=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,S=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):S&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,r=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,d=this.loop||o<r,h=this.localize.dir()==="ltr";return u`<div part="base" class="${c("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(p=>!p.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?p=>{this.previous(),this.unblockAutoplay(p,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-down":"chevron-up"}"></sd-icon></slot></button> ${this.variant==="dot"?u`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${Gs(ta(r),p=>{let m=p+1===o;return u`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",p+1,r)}" @click="${b=>{this.goToSlide(p*e),this.unblockAutoplay(b,this.paginationItems[p])}}" @keydown="${this.handleKeyDown}"><span class="${c("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",m&&"bg-accent border-none",m?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:u`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${o}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${r}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!d}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!d&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${d?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${d?p=>{this.next(),this.unblockAutoplay(p,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-up":"chevron-down"}"></sd-icon></slot></button></div><button class="${c("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${p=>{this.pausedAutoplay=!this.pausedAutoplay,p.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button></div></div>`}};q.styles=[...f.styles,y`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],a([g('[part~="autoplay-controls"]')],q.prototype,"autoplayControls",2),a([g('[part~="navigation-button--previous"]')],q.prototype,"previousButton",2),a([g('[part~="navigation-button--next"]')],q.prototype,"nextButton",2),a([Wi('[part~="pagination-item"]')],q.prototype,"paginationItems",2),a([l({type:String,reflect:!0})],q.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],q.prototype,"inverted",2),a([l({type:Boolean,reflect:!0})],q.prototype,"loop",2),a([l({type:Boolean,reflect:!0})],q.prototype,"autoplay",2),a([l({type:Boolean,reflect:!0})],q.prototype,"fade",2),a([l({type:Number,attribute:"slides-per-page",reflect:!0})],q.prototype,"slidesPerPage",2),a([l({type:Number,attribute:"slides-per-move",reflect:!0})],q.prototype,"slidesPerMove",2),a([g("slot:not([name])")],q.prototype,"defaultSlot",2),a([g(".carousel__slides")],q.prototype,"scrollContainer",2),a([g(".carousel__pagination")],q.prototype,"paginationContainer",2),a([E()],q.prototype,"activeSlide",2),a([E()],q.prototype,"currentPage",2),a([E()],q.prototype,"pausedAutoplay",2),a([x("pausedAutoplay")],q.prototype,"handlePausedAutoplay",1),a([x("fade",{waitUntilFirstUpdate:!0})],q.prototype,"handleFadeChange",1),a([x("loop",{waitUntilFirstUpdate:!0}),x("slidesPerPage",{waitUntilFirstUpdate:!0})],q.prototype,"initializeSlides",1),a([x("activeSlide")],q.prototype,"handleSlideChange",1),a([x("slidesPerMove")],q.prototype,"handleSlidesPerMoveChange",1),a([x("autoplay")],q.prototype,"handleAutoplayChange",1),q=a([v("sd-carousel")],q);var Mt=(s="value")=>(i,t)=>{let e=i.constructor,r=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,d){var m;let h=e.getPropertyOptions(s),p=typeof h.attribute=="string"?h.attribute:s;if(o===p){let b=h.converter||Ae,k=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Ae.fromAttribute)(d,h.type);this[s]!==k&&(this[t]=k)}r.call(this,o,n,d)}};var{I:Nb}=Ts;var ar=s=>s.strings===void 0;var dl={},ia=(s,i=dl)=>s._$AH=i;var ge=Xt(class extends Oe{constructor(s){if(super(s),s.type!==Ht.PROPERTY&&s.type!==Ht.ATTRIBUTE&&s.type!==Ht.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ar(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[i]){if(i===kt||i===j)return i;let t=s.element,e=s.name;if(s.type===Ht.PROPERTY){if(i===t[e])return kt}else if(s.type===Ht.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(e))return kt}else if(s.type===Ht.ATTRIBUTE&&t.getAttribute(e)===i+"")return kt;return ia(s),i}});var tt=class extends f{constructor(){super(...arguments);this.formControlController=new lt(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return u`<label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${w(this.value)}" .indeterminate="${ge(this.indeterminate)}" .checked="${ge(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div class="${c("absolute h-3 transition-[width] right-0.25 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"group-hover:bg-neutral-200",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?u`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="_internal" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};tt.styles=[...f.styles,y`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],a([g('input[type="checkbox"]')],tt.prototype,"input",2),a([g("#invalid-message")],tt.prototype,"invalidMessage",2),a([l({type:String,reflect:!0})],tt.prototype,"title",2),a([l({type:String,reflect:!0})],tt.prototype,"name",2),a([l()],tt.prototype,"value",2),a([l({type:String,reflect:!0})],tt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],tt.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"indeterminate",2),a([Mt("checked")],tt.prototype,"defaultChecked",2),a([l({type:String,reflect:!0})],tt.prototype,"form",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"required",2),a([E()],tt.prototype,"showInvalidStyle",2),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],tt.prototype,"handleDisabledChange",1),a([x(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],tt.prototype,"handleStateChange",1),tt=a([v("sd-checkbox")],tt);var Ot=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:r,n=u`<slot @slotchange="${this.syncCheckboxes}"></slot>`,d=this.hasSlotController.test("tooltip");return u`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||d?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${d?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};Ot.styles=[...f.styles,y`:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`],a([l({type:String,reflect:!0})],Ot.prototype,"size",2),a([l({type:String,reflect:!0})],Ot.prototype,"orientation",2),a([l({type:String,reflect:!0})],Ot.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],Ot.prototype,"helpText",2),a([x("size",{waitUntilFirstUpdate:!0})],Ot.prototype,"handleSizeChange",1),a([x("invalid",{waitUntilFirstUpdate:!0})],Ot.prototype,"handleInvalid",1),Ot=a([v("sd-checkbox-group")],Ot);var ne=Math.min,Tt=Math.max,Ai=Math.round,Mi=Math.floor,Zt=s=>({x:s,y:s}),cl={left:"right",right:"left",bottom:"top",top:"bottom"},hl={start:"end",end:"start"};function nr(s,i,t){return Tt(s,ne(i,t))}function Ye(s,i){return typeof s=="function"?s(i):s}function ve(s){return s.split("-")[0]}function We(s){return s.split("-")[1]}function Kr(s){return s==="x"?"y":"x"}function lr(s){return s==="y"?"height":"width"}var pl=new Set(["top","bottom"]);function le(s){return pl.has(ve(s))?"y":"x"}function dr(s){return Kr(le(s))}function aa(s,i,t){t===void 0&&(t=!1);let e=We(s),r=dr(s),o=lr(r),n=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return i.reference[o]>i.floating[o]&&(n=zi(n)),[n,zi(n)]}function oa(s){let i=zi(s);return[or(s),i,or(i)]}function or(s){return s.replace(/start|end/g,i=>hl[i])}var ra=["left","right"],sa=["right","left"],ul=["top","bottom"],ml=["bottom","top"];function fl(s,i,t){switch(s){case"top":case"bottom":return t?i?sa:ra:i?ra:sa;case"left":case"right":return i?ul:ml;default:return[]}}function na(s,i,t,e){let r=We(s),o=fl(ve(s),t==="start",e);return r&&(o=o.map(n=>n+"-"+r),i&&(o=o.concat(o.map(or)))),o}function zi(s){return s.replace(/left|right|bottom|top/g,i=>cl[i])}function bl(s){return P({top:0,right:0,bottom:0,left:0},s)}function jr(s){return typeof s!="number"?bl(s):{top:s,right:s,bottom:s,left:s}}function Ze(s){let{x:i,y:t,width:e,height:r}=s;return{width:e,height:r,top:t,left:i,right:i+e,bottom:t+r,x:i,y:t}}function la(s,i,t){let{reference:e,floating:r}=s,o=le(i),n=dr(i),d=lr(n),h=ve(i),p=o==="y",m=e.x+e.width/2-r.width/2,b=e.y+e.height/2-r.height/2,C=e[d]/2-r[d]/2,k;switch(h){case"top":k={x:m,y:e.y-r.height};break;case"bottom":k={x:m,y:e.y+e.height};break;case"right":k={x:e.x+e.width,y:b};break;case"left":k={x:e.x-r.width,y:b};break;default:k={x:e.x,y:e.y}}switch(We(i)){case"start":k[n]-=C*(t&&p?-1:1);break;case"end":k[n]+=C*(t&&p?-1:1);break}return k}var da=async(s,i,t)=>{let{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:n}=t,d=o.filter(Boolean),h=await(n.isRTL==null?void 0:n.isRTL(i)),p=await n.getElementRects({reference:s,floating:i,strategy:r}),{x:m,y:b}=la(p,e,h),C=e,k={},$=0;for(let z=0;z<d.length;z++){let{name:S,fn:D}=d[z],{x:V,y:U,data:Z,reset:Y}=await D({x:m,y:b,initialPlacement:e,placement:C,strategy:r,middlewareData:k,rects:p,platform:n,elements:{reference:s,floating:i}});m=V!=null?V:m,b=U!=null?U:b,k=ct(P({},k),{[S]:P(P({},k[S]),Z)}),Y&&$<=50&&($++,typeof Y=="object"&&(Y.placement&&(C=Y.placement),Y.rects&&(p=Y.rects===!0?await n.getElementRects({reference:s,floating:i,strategy:r}):Y.rects),{x:m,y:b}=la(p,C,h)),z=-1)}return{x:m,y:b,placement:C,strategy:r,middlewareData:k}};async function cr(s,i){var t;i===void 0&&(i={});let{x:e,y:r,platform:o,rects:n,elements:d,strategy:h}=s,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:C=!1,padding:k=0}=Ye(i,s),$=jr(k),S=d[C?b==="floating"?"reference":"floating":b],D=Ze(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(S)))==null||t?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:h})),V=b==="floating"?{x:e,y:r,width:n.floating.width,height:n.floating.height}:n.reference,U=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),Z=await(o.isElement==null?void 0:o.isElement(U))?await(o.getScale==null?void 0:o.getScale(U))||{x:1,y:1}:{x:1,y:1},Y=Ze(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:V,offsetParent:U,strategy:h}):V);return{top:(D.top-Y.top+$.top)/Z.y,bottom:(Y.bottom-D.bottom+$.bottom)/Z.y,left:(D.left-Y.left+$.left)/Z.x,right:(Y.right-D.right+$.right)/Z.x}}var ca=s=>({name:"arrow",options:s,async fn(i){let{x:t,y:e,placement:r,rects:o,platform:n,elements:d,middlewareData:h}=i,{element:p,padding:m=0}=Ye(s,i)||{};if(p==null)return{};let b=jr(m),C={x:t,y:e},k=dr(r),$=lr(k),z=await n.getDimensions(p),S=k==="y",D=S?"top":"left",V=S?"bottom":"right",U=S?"clientHeight":"clientWidth",Z=o.reference[$]+o.reference[k]-C[k]-o.floating[$],Y=C[k]-o.reference[k],qt=await(n.getOffsetParent==null?void 0:n.getOffsetParent(p)),xt=qt?qt[U]:0;(!xt||!await(n.isElement==null?void 0:n.isElement(qt)))&&(xt=d.floating[U]||o.floating[$]);let he=Z/2-Y/2,ie=xt/2-z[$]/2-1,Ft=ne(b[D],ie),$e=ne(b[V],ie),re=Ft,Te=xt-z[$]-$e,It=xt/2-z[$]/2+he,Kt=nr(re,It,Te),De=!h.arrow&&We(r)!=null&&It!==Kt&&o.reference[$]/2-(It<re?Ft:$e)-z[$]/2<0,pe=De?It<re?It-re:It-Te:0;return{[k]:C[k]+pe,data:P({[k]:Kt,centerOffset:It-Kt-pe},De&&{alignmentOffset:pe}),reset:De}}});var ha=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var t,e;let{placement:r,middlewareData:o,rects:n,initialPlacement:d,platform:h,elements:p}=i,It=Ye(s,i),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:C,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:$="none",flipAlignment:z=!0}=It,S=Hi(It,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=o.arrow)!=null&&t.alignmentOffset)return{};let D=ve(r),V=le(d),U=ve(d)===d,Z=await(h.isRTL==null?void 0:h.isRTL(p.floating)),Y=C||(U||!z?[zi(d)]:oa(d)),qt=$!=="none";!C&&qt&&Y.push(...na(d,z,$,Z));let xt=[d,...Y],he=await cr(i,S),ie=[],Ft=((e=o.flip)==null?void 0:e.overflows)||[];if(m&&ie.push(he[D]),b){let Kt=aa(r,n,Z);ie.push(he[Kt[0]],he[Kt[1]])}if(Ft=[...Ft,{placement:r,overflows:ie}],!ie.every(Kt=>Kt<=0)){var $e,re;let Kt=((($e=o.flip)==null?void 0:$e.index)||0)+1,De=xt[Kt];if(De&&(!(b==="alignment"?V!==le(De):!1)||Ft.every(jt=>le(jt.placement)===V?jt.overflows[0]>0:!0)))return{data:{index:Kt,overflows:Ft},reset:{placement:De}};let pe=(re=Ft.filter(Ie=>Ie.overflows[0]<=0).sort((Ie,jt)=>Ie.overflows[1]-jt.overflows[1])[0])==null?void 0:re.placement;if(!pe)switch(k){case"bestFit":{var Te;let Ie=(Te=Ft.filter(jt=>{if(qt){let Le=le(jt.placement);return Le===V||Le==="y"}return!0}).map(jt=>[jt.placement,jt.overflows.filter(Le=>Le>0).reduce((Le,Na)=>Le+Na,0)]).sort((jt,Le)=>jt[1]-Le[1])[0])==null?void 0:Te[0];Ie&&(pe=Ie);break}case"initialPlacement":pe=d;break}if(r!==pe)return{reset:{placement:pe}}}return{}}}};var gl=new Set(["left","top"]);async function vl(s,i){let{placement:t,platform:e,elements:r}=s,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),n=ve(t),d=We(t),h=le(t)==="y",p=gl.has(n)?-1:1,m=o&&h?-1:1,b=Ye(i,s),{mainAxis:C,crossAxis:k,alignmentAxis:$}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof $=="number"&&(k=d==="end"?$*-1:$),h?{x:k*m,y:C*p}:{x:C*p,y:k*m}}var pa=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){var t,e;let{x:r,y:o,placement:n,middlewareData:d}=i,h=await vl(i,s);return n===((t=d.offset)==null?void 0:t.placement)&&(e=d.arrow)!=null&&e.alignmentOffset?{}:{x:r+h.x,y:o+h.y,data:ct(P({},h),{placement:n})}}}},ua=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){let{x:t,y:e,placement:r}=i,S=Ye(s,i),{mainAxis:o=!0,crossAxis:n=!1,limiter:d={fn:D=>{let{x:V,y:U}=D;return{x:V,y:U}}}}=S,h=Hi(S,["mainAxis","crossAxis","limiter"]),p={x:t,y:e},m=await cr(i,h),b=le(ve(r)),C=Kr(b),k=p[C],$=p[b];if(o){let D=C==="y"?"top":"left",V=C==="y"?"bottom":"right",U=k+m[D],Z=k-m[V];k=nr(U,k,Z)}if(n){let D=b==="y"?"top":"left",V=b==="y"?"bottom":"right",U=$+m[D],Z=$-m[V];$=nr(U,$,Z)}let z=d.fn(ct(P({},i),{[C]:k,[b]:$}));return ct(P({},z),{data:{x:z.x-t,y:z.y-e,enabled:{[C]:o,[b]:n}}})}}};var ma=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){var t,e;let{placement:r,rects:o,platform:n,elements:d}=i,Ft=Ye(s,i),{apply:h=()=>{}}=Ft,p=Hi(Ft,["apply"]),m=await cr(i,p),b=ve(r),C=We(r),k=le(r)==="y",{width:$,height:z}=o.floating,S,D;b==="top"||b==="bottom"?(S=b,D=C===(await(n.isRTL==null?void 0:n.isRTL(d.floating))?"start":"end")?"left":"right"):(D=b,S=C==="end"?"top":"bottom");let V=z-m.top-m.bottom,U=$-m.left-m.right,Z=ne(z-m[S],V),Y=ne($-m[D],U),qt=!i.middlewareData.shift,xt=Z,he=Y;if((t=i.middlewareData.shift)!=null&&t.enabled.x&&(he=U),(e=i.middlewareData.shift)!=null&&e.enabled.y&&(xt=V),qt&&!C){let $e=Tt(m.left,0),re=Tt(m.right,0),Te=Tt(m.top,0),It=Tt(m.bottom,0);k?he=$-2*($e!==0||re!==0?$e+re:Tt(m.left,m.right)):xt=z-2*(Te!==0||It!==0?Te+It:Tt(m.top,m.bottom))}await h(ct(P({},i),{availableWidth:he,availableHeight:xt}));let ie=await n.getDimensions(d.floating);return $!==ie.width||z!==ie.height?{reset:{rects:!0}}:{}}}};function hr(){return typeof window!="undefined"}function Qe(s){return ba(s)?(s.nodeName||"").toLowerCase():"#document"}function St(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function Qt(s){var i;return(i=(ba(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function ba(s){return hr()?s instanceof Node||s instanceof St(s).Node:!1}function Bt(s){return hr()?s instanceof Element||s instanceof St(s).Element:!1}function Jt(s){return hr()?s instanceof HTMLElement||s instanceof St(s).HTMLElement:!1}function fa(s){return!hr()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof St(s).ShadowRoot}var yl=new Set(["inline","contents"]);function li(s){let{overflow:i,overflowX:t,overflowY:e,display:r}=Rt(s);return/auto|scroll|overlay|hidden|clip/.test(i+e+t)&&!yl.has(r)}var wl=new Set(["table","td","th"]);function ga(s){return wl.has(Qe(s))}var xl=[":popover-open",":modal"];function Oi(s){return xl.some(i=>{try{return s.matches(i)}catch(t){return!1}})}var kl=["transform","translate","scale","rotate","perspective"],Cl=["transform","translate","scale","rotate","perspective","filter"],El=["paint","layout","strict","content"];function pr(s){let i=ur(),t=Bt(s)?Rt(s):s;return kl.some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!i&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!i&&(t.filter?t.filter!=="none":!1)||Cl.some(e=>(t.willChange||"").includes(e))||El.some(e=>(t.contain||"").includes(e))}function va(s){let i=ye(s);for(;Jt(i)&&!Je(i);){if(pr(i))return i;if(Oi(i))return null;i=ye(i)}return null}function ur(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var $l=new Set(["html","body","#document"]);function Je(s){return $l.has(Qe(s))}function Rt(s){return St(s).getComputedStyle(s)}function Si(s){return Bt(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function ye(s){if(Qe(s)==="html")return s;let i=s.assignedSlot||s.parentNode||fa(s)&&s.host||Qt(s);return fa(i)?i.host:i}function ya(s){let i=ye(s);return Je(i)?s.ownerDocument?s.ownerDocument.body:s.body:Jt(i)&&li(i)?i:ya(i)}function ni(s,i,t){var e;i===void 0&&(i=[]),t===void 0&&(t=!0);let r=ya(s),o=r===((e=s.ownerDocument)==null?void 0:e.body),n=St(r);if(o){let d=mr(n);return i.concat(n,n.visualViewport||[],li(r)?r:[],d&&t?ni(d):[])}return i.concat(r,ni(r,[],t))}function mr(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function Ca(s){let i=Rt(s),t=parseFloat(i.width)||0,e=parseFloat(i.height)||0,r=Jt(s),o=r?s.offsetWidth:t,n=r?s.offsetHeight:e,d=Ai(t)!==o||Ai(e)!==n;return d&&(t=o,e=n),{width:t,height:e,$:d}}function Yr(s){return Bt(s)?s:s.contextElement}function di(s){let i=Yr(s);if(!Jt(i))return Zt(1);let t=i.getBoundingClientRect(),{width:e,height:r,$:o}=Ca(i),n=(o?Ai(t.width):t.width)/e,d=(o?Ai(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!d||!Number.isFinite(d))&&(d=1),{x:n,y:d}}var Tl=Zt(0);function Ea(s){let i=St(s);return!ur()||!i.visualViewport?Tl:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function Ll(s,i,t){return i===void 0&&(i=!1),!t||i&&t!==St(s)?!1:i}function Ge(s,i,t,e){i===void 0&&(i=!1),t===void 0&&(t=!1);let r=s.getBoundingClientRect(),o=Yr(s),n=Zt(1);i&&(e?Bt(e)&&(n=di(e)):n=di(s));let d=Ll(o,t,e)?Ea(o):Zt(0),h=(r.left+d.x)/n.x,p=(r.top+d.y)/n.y,m=r.width/n.x,b=r.height/n.y;if(o){let C=St(o),k=e&&Bt(e)?St(e):e,$=C,z=mr($);for(;z&&e&&k!==$;){let S=di(z),D=z.getBoundingClientRect(),V=Rt(z),U=D.left+(z.clientLeft+parseFloat(V.paddingLeft))*S.x,Z=D.top+(z.clientTop+parseFloat(V.paddingTop))*S.y;h*=S.x,p*=S.y,m*=S.x,b*=S.y,h+=U,p+=Z,$=St(z),z=mr($)}}return Ze({width:m,height:b,x:h,y:p})}function fr(s,i){let t=Si(s).scrollLeft;return i?i.left+t:Ge(Qt(s)).left+t}function $a(s,i){let t=s.getBoundingClientRect(),e=t.left+i.scrollLeft-fr(s,t),r=t.top+i.scrollTop;return{x:e,y:r}}function zl(s){let{elements:i,rect:t,offsetParent:e,strategy:r}=s,o=r==="fixed",n=Qt(e),d=i?Oi(i.floating):!1;if(e===n||d&&o)return t;let h={scrollLeft:0,scrollTop:0},p=Zt(1),m=Zt(0),b=Jt(e);if((b||!b&&!o)&&((Qe(e)!=="body"||li(n))&&(h=Si(e)),Jt(e))){let k=Ge(e);p=di(e),m.x=k.x+e.clientLeft,m.y=k.y+e.clientTop}let C=n&&!b&&!o?$a(n,h):Zt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-h.scrollLeft*p.x+m.x+C.x,y:t.y*p.y-h.scrollTop*p.y+m.y+C.y}}function Al(s){return Array.from(s.getClientRects())}function Ml(s){let i=Qt(s),t=Si(s),e=s.ownerDocument.body,r=Tt(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),o=Tt(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),n=-t.scrollLeft+fr(s),d=-t.scrollTop;return Rt(e).direction==="rtl"&&(n+=Tt(i.clientWidth,e.clientWidth)-r),{width:r,height:o,x:n,y:d}}var wa=25;function Ol(s,i){let t=St(s),e=Qt(s),r=t.visualViewport,o=e.clientWidth,n=e.clientHeight,d=0,h=0;if(r){o=r.width,n=r.height;let m=ur();(!m||m&&i==="fixed")&&(d=r.offsetLeft,h=r.offsetTop)}let p=fr(e);if(p<=0){let m=e.ownerDocument,b=m.body,C=getComputedStyle(b),k=m.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,$=Math.abs(e.clientWidth-b.clientWidth-k);$<=wa&&(o-=$)}else p<=wa&&(o+=p);return{width:o,height:n,x:d,y:h}}var Sl=new Set(["absolute","fixed"]);function _l(s,i){let t=Ge(s,!0,i==="fixed"),e=t.top+s.clientTop,r=t.left+s.clientLeft,o=Jt(s)?di(s):Zt(1),n=s.clientWidth*o.x,d=s.clientHeight*o.y,h=r*o.x,p=e*o.y;return{width:n,height:d,x:h,y:p}}function xa(s,i,t){let e;if(i==="viewport")e=Ol(s,t);else if(i==="document")e=Ml(Qt(s));else if(Bt(i))e=_l(i,t);else{let r=Ea(s);e={x:i.x-r.x,y:i.y-r.y,width:i.width,height:i.height}}return Ze(e)}function Ta(s,i){let t=ye(s);return t===i||!Bt(t)||Je(t)?!1:Rt(t).position==="fixed"||Ta(t,i)}function Dl(s,i){let t=i.get(s);if(t)return t;let e=ni(s,[],!1).filter(d=>Bt(d)&&Qe(d)!=="body"),r=null,o=Rt(s).position==="fixed",n=o?ye(s):s;for(;Bt(n)&&!Je(n);){let d=Rt(n),h=pr(n);!h&&d.position==="fixed"&&(r=null),(o?!h&&!r:!h&&d.position==="static"&&!!r&&Sl.has(r.position)||li(n)&&!h&&Ta(s,n))?e=e.filter(m=>m!==n):r=d,n=ye(n)}return i.set(s,e),e}function Il(s){let{element:i,boundary:t,rootBoundary:e,strategy:r}=s,n=[...t==="clippingAncestors"?Oi(i)?[]:Dl(i,this._c):[].concat(t),e],d=n[0],h=n.reduce((p,m)=>{let b=xa(i,m,r);return p.top=Tt(b.top,p.top),p.right=ne(b.right,p.right),p.bottom=ne(b.bottom,p.bottom),p.left=Tt(b.left,p.left),p},xa(i,d,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function Hl(s){let{width:i,height:t}=Ca(s);return{width:i,height:t}}function Pl(s,i,t){let e=Jt(i),r=Qt(i),o=t==="fixed",n=Ge(s,!0,o,i),d={scrollLeft:0,scrollTop:0},h=Zt(0);function p(){h.x=fr(r)}if(e||!e&&!o)if((Qe(i)!=="body"||li(r))&&(d=Si(i)),e){let k=Ge(i,!0,o,i);h.x=k.x+i.clientLeft,h.y=k.y+i.clientTop}else r&&p();o&&!e&&r&&p();let m=r&&!e&&!o?$a(r,d):Zt(0),b=n.left+d.scrollLeft-h.x-m.x,C=n.top+d.scrollTop-h.y-m.y;return{x:b,y:C,width:n.width,height:n.height}}function Xr(s){return Rt(s).position==="static"}function ka(s,i){if(!Jt(s)||Rt(s).position==="fixed")return null;if(i)return i(s);let t=s.offsetParent;return Qt(s)===t&&(t=t.ownerDocument.body),t}function La(s,i){let t=St(s);if(Oi(s))return t;if(!Jt(s)){let r=ye(s);for(;r&&!Je(r);){if(Bt(r)&&!Xr(r))return r;r=ye(r)}return t}let e=ka(s,i);for(;e&&ga(e)&&Xr(e);)e=ka(e,i);return e&&Je(e)&&Xr(e)&&!pr(e)?t:e||va(s)||t}var Fl=async function(s){let i=this.getOffsetParent||La,t=this.getDimensions,e=await t(s.floating);return{reference:Pl(s.reference,await i(s.floating),s.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Vl(s){return Rt(s).direction==="rtl"}var Bl={convertOffsetParentRelativeRectToViewportRelativeRect:zl,getDocumentElement:Qt,getClippingRect:Il,getOffsetParent:La,getElementRects:Fl,getClientRects:Al,getDimensions:Hl,getScale:di,isElement:Bt,isRTL:Vl};function za(s,i){return s.x===i.x&&s.y===i.y&&s.width===i.width&&s.height===i.height}function Rl(s,i){let t=null,e,r=Qt(s);function o(){var d;clearTimeout(e),(d=t)==null||d.disconnect(),t=null}function n(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),o();let p=s.getBoundingClientRect(),{left:m,top:b,width:C,height:k}=p;if(d||i(),!C||!k)return;let $=Mi(b),z=Mi(r.clientWidth-(m+C)),S=Mi(r.clientHeight-(b+k)),D=Mi(m),U={rootMargin:-$+"px "+-z+"px "+-S+"px "+-D+"px",threshold:Tt(0,ne(1,h))||1},Z=!0;function Y(qt){let xt=qt[0].intersectionRatio;if(xt!==h){if(!Z)return n();xt?n(!1,xt):e=setTimeout(()=>{n(!1,1e-7)},1e3)}xt===1&&!za(p,s.getBoundingClientRect())&&n(),Z=!1}try{t=new IntersectionObserver(Y,ct(P({},U),{root:r.ownerDocument}))}catch(qt){t=new IntersectionObserver(Y,U)}t.observe(s)}return n(!0),o}function Aa(s,i,t,e){e===void 0&&(e={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=e,p=Yr(s),m=r||o?[...p?ni(p):[],...ni(i)]:[];m.forEach(D=>{r&&D.addEventListener("scroll",t,{passive:!0}),o&&D.addEventListener("resize",t)});let b=p&&d?Rl(p,t):null,C=-1,k=null;n&&(k=new ResizeObserver(D=>{let[V]=D;V&&V.target===p&&k&&(k.unobserve(i),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var U;(U=k)==null||U.observe(i)})),t()}),p&&!h&&k.observe(p),k.observe(i));let $,z=h?Ge(s):null;h&&S();function S(){let D=Ge(s);z&&!za(z,D)&&t(),z=D,$=requestAnimationFrame(S)}return t(),()=>{var D;m.forEach(V=>{r&&V.removeEventListener("scroll",t),o&&V.removeEventListener("resize",t)}),b==null||b(),(D=k)==null||D.disconnect(),k=null,h&&cancelAnimationFrame($)}}var Ma=pa;var Oa=ua,Sa=ha,Wr=ma;var _a=ca;var Da=(s,i,t)=>{let e=new Map,r=P({platform:Bl},t),o=ct(P({},r.platform),{_c:e});return da(s,i,ct(P({},r),{platform:o}))};var K=class extends f{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(e=>this.handleCurrentPlacementChange(e));let t={attributes:!0};this.mutationObserver.observe(this,t)}handleCurrentPlacementChange(t){return t.forEach(e=>{if(e.attributeName==="data-current-placement"){let r=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:r})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=Aa(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Ma({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Wr({apply:({rects:e})=>{let r=this.sync==="width"||this.sync==="both",o=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${e.reference.width}px`:"",this.popup.style.height=o?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(Sa({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Oa({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Wr({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(_a({element:this.arrowEl,padding:this.arrowPadding})),Da(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then(({x:e,y:r,middlewareData:o,placement:n})=>{let d=getComputedStyle(this).direction==="rtl",h={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${e}px`,top:`${r}px`}),this.arrow){let p=o.arrow.x,m=o.arrow.y,b="",C="",k="",$="";if(this.arrowPlacement==="start"){let z=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";b=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",C=d?z:"",$=d?"":z}else if(this.arrowPlacement==="end"){let z=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";C=d?"":z,$=d?z:"",k=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?($=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":"",b=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):($=typeof p=="number"?`${p}px`:"",b=typeof m=="number"?`${m}px`:"");Object.assign(this.arrowEl.style,{top:b,right:C,bottom:k,left:$,[h]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return u`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${c("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?u`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};K.styles=[...f.styles,y`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],a([g('[part="popup"]')],K.prototype,"popup",2),a([g('[part="arrow"]')],K.prototype,"arrowEl",2),a([l({reflect:!0})],K.prototype,"anchor",2),a([l({type:Boolean,reflect:!0})],K.prototype,"active",2),a([l({type:String,reflect:!0})],K.prototype,"placement",2),a([l({type:String,reflect:!0})],K.prototype,"strategy",2),a([l({type:Number,reflect:!0})],K.prototype,"distance",2),a([l({type:Number,reflect:!0})],K.prototype,"skidding",2),a([l({type:Boolean,reflect:!0})],K.prototype,"arrow",2),a([l({type:String,attribute:"arrow-placement",reflect:!0})],K.prototype,"arrowPlacement",2),a([l({attribute:"arrow-padding",type:Number,reflect:!0})],K.prototype,"arrowPadding",2),a([l({type:Boolean,reflect:!0})],K.prototype,"flip",2),a([l({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],K.prototype,"flipFallbackPlacements",2),a([l({type:String,attribute:"flip-fallback-strategy"})],K.prototype,"flipFallbackStrategy",2),a([l({type:Object})],K.prototype,"flipBoundary",2),a([l({attribute:"flip-padding",type:Number})],K.prototype,"flipPadding",2),a([l({type:Boolean})],K.prototype,"shift",2),a([l({type:Object})],K.prototype,"shiftBoundary",2),a([l({attribute:"shift-padding",type:Number})],K.prototype,"shiftPadding",2),a([l({type:String,attribute:"auto-size"})],K.prototype,"autoSize",2),a([l()],K.prototype,"sync",2),a([l({type:Object})],K.prototype,"autoSizeBoundary",2),a([l({attribute:"auto-size-padding",type:Number})],K.prototype,"autoSizePadding",2),K=a([v("sd-popup")],K);var gt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=t?Q`a`:this.removable?Q`div`:Q`button`;return H`<${e} part="base" type="${w(t?void 0:"button")}" href="${w(t?this.href:void 0)}" rel="${w(t&&this.target?"noreferrer noopener":void 0)}" target="${w(t?this.target:void 0)}" download="${w(t?this.download:void 0)}" ?disabled="${w(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${w(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||this.removable?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":c("border-primary text-primary disabled:border-neutral-500 disabled:text-neutral-500",this.removable?"has-[button:hover]:border-primary-500 has-[button:hover]:bg-neutral-100 has-[button:hover]:text-primary-500":"hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500"),this.disabled&&!t&&"cursor-not-allowed")}"><slot id="content" part="content"></slot>${this.removable&&!t?H`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}"><slot part="removable-indicator" name="removable-indicator"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${e}>`}};gt.styles=[...f.styles,y`:host{display:inline-block;transition-duration:.15s;transition-duration:var(--sd-duration-fast,.15s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host([size=lg])::part(removable-indicator){font-size:var(--sd-font-size-base,1rem)}:host([size=sm])::part(removable-indicator){font-size:.75rem}`],a([g("a, button, div")],gt.prototype,"tag",2),a([l({type:String,reflect:!0})],gt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"selected",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"toggleable",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"removable",2),a([l({type:Boolean,reflect:!0})],gt.prototype,"disabled",2),a([l({type:String,reflect:!0})],gt.prototype,"href",2),a([l({type:String,reflect:!0})],gt.prototype,"target",2),a([l({reflect:!0})],gt.prototype,"download",2),gt=a([v("sd-tag")],gt);var Ia=s=>s;var Zr=s=>Array.from(s.assignedElements({flatten:!0})),Ul=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Nl=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",Ha=s=>s.map(Ul),Pa=s=>s.filter(Nl),br=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var T=class extends f{constructor(){super(...arguments);this.formControlController=new lt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new A(this,"help-text","label");this.localize=new L(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=Ia;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let r=br(t.value),o=br(t.getTextLabel()),n=br(e);return r.includes(n)||o.includes(n)};this.getTag=t=>u`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
118
118
  base:tag__base,
119
119
  content:tag__content,
120
120
  removable-indicator:tag__removable-indicator,
@@ -135,7 +135,7 @@
135
135
  </svg> `,place:`
136
136
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 75">
137
137
  <path fill-rule="evenodd" d="M51 49A29 29 0 0 0 30 0 29 29 0 0 0 9 49l21 22 21-22Z" clip-rule="evenodd" />
138
- </svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let t=this.isLink(),e=this.notInteractive?Q`div`:t?Q`a`:Q`button`,r=Qi(this.marker[this.variant]),o=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return H`<${e} part="base" class="${c("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${w(t?this.href:void 0)}" target="${w(t?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${w(this.notInteractive||t?void 0:"button")}" aria-label="${w(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${w(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${c("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${o};-webkit-mask-image:${o}"><div class="${c("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${c("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?H`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${r} ${this.variant==="cluster"?H`<div id="cluster-border" class="${c("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${c("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${e}>`}};At.styles=[...f.styles,y`:host{display:block}#motion-wrapper{mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1));margin-top:calc(var(--sd-spacing-2,.5rem)*-1)}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow:drop-shadow(var(--sd-shadow,0px 1px 3px #515151));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host([variant=main]) #marker-circle{height:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));width:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1))}`],a([l({type:String,reflect:!0})],At.prototype,"variant",2),a([l({type:String,reflect:!0})],At.prototype,"state",2),a([l({type:Boolean,reflect:!0})],At.prototype,"animated",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],At.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],At.prototype,"href",2),a([l({type:String,reflect:!0})],At.prototype,"target",2),a([l({reflect:!0})],At.prototype,"label",2),At=a([v("sd-map-marker")],At);var we=class extends f{constructor(){super(...arguments);this.localize=new L(this)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(t){let e=["menuitem","menuitemcheckbox"],r=t.composedPath(),o=r.find(p=>{var m;return e.includes(((m=p==null?void 0:p.getAttribute)==null?void 0:m.call(p,"role"))||"")});if(!o||r.find(p=>{var m;return((m=p==null?void 0:p.getAttribute)==null?void 0:m.call(p,"role"))==="menu"})!==this)return;let h=o;h.type==="checkbox"&&(h.checked=!h.checked),this.emit("sd-select",{detail:{item:h}})}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),r=this.getCurrentItem(),o=r?e.indexOf(r):0;if(e.length>0){t.preventDefault(),t.stopPropagation();let n=(d,h)=>{let p=d;for(let m of e)if(p=(p+h+e.length)%e.length,!e[p].disabled)return p;return d};if(t.key==="ArrowDown")o=n(o,1);else if(t.key==="ArrowUp")o=n(o,-1);else if(t.key==="Home")o=e.findIndex(d=>!d.disabled),o===-1&&(o=0);else if(t.key==="End"){o=e.length-1;for(let d=e.length-1;d>=0;d--)if(!e[d].disabled){o=d;break}}this.setCurrentItem(e[o]),e[o].focus()}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(r=>{r.setAttribute("tabindex",r===t?"0":"-1")})}render(){return u`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};we.styles=[...f.styles,y`:host{border-radius:var(--sd-border-radius-md,.375rem);display:block;overflow:auto;overscroll-behavior:auto;padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);position:relative;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75))!important;--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}::slotted(sd-divider){padding-bottom:var(--sd-spacing-3,.75rem);padding-top:var(--sd-spacing-3,.75rem)}`],a([g("slot")],we.prototype,"defaultSlot",2),we=a([v("sd-menu")],we);var Ra=()=>new ts,ts=class{},Gr=new WeakMap,Ua=Xt(class extends ci{render(s){return j}update(s,[i]){var e;let t=i!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=i,this.ht=(e=s.options)==null?void 0:e.host,this.rt(this.ct=s.element)),j}rt(s){var i;if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=(i=this.ht)!=null?i:globalThis,e=Gr.get(t);e===void 0&&(e=new WeakMap,Gr.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){var s,i,t;return typeof this.G=="function"?(i=Gr.get((s=this.ht)!=null?s:globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var vr=class{constructor(i,t){this.popupRef=Ra();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=i=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${i.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${i.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=i=>{switch(i.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":i.target!==this.host&&(i.preventDefault(),i.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(i);break;default:break}};this.handleClick=i=>{var t;i.target===this.host?(i.preventDefault(),i.stopPropagation()):i.target instanceof Element&&(i.target.tagName==="sd-menu-item"||(t=i.target.role)!=null&&t.startsWith("menuitem"))&&i.target.getAttribute("type")!=="checkbox"&&this.disableSubmenu()};this.handleFocusOut=i=>{i.relatedTarget&&i.relatedTarget instanceof Element&&this.host.contains(i.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=i=>{i.stopPropagation()};this.handlePopupReposition=()=>{let i=this.host.renderRoot.querySelector("slot[name='submenu']"),t=i==null?void 0:i.assignedElements({flatten:!0}).filter(h=>h.localName==="sd-menu")[0],e=getComputedStyle(this.host).direction==="rtl";if(!t)return;let{left:r,top:o,width:n,height:d}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${e?r+n:r}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${e?r+n:r}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${o+d}px`)};(this.host=i).addController(this),this.hasSlotController=t}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(i){let t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let e=null;for(let r of t.assignedElements())if(e=r.querySelectorAll("sd-menu-item, [role^='menuitem']"),e.length!==0)break;if(!(!e||e.length===0)){e[0].setAttribute("tabindex","0");for(let r=1;r!==e.length;++r)e[r].setAttribute("tabindex","-1");this.popupRef.value&&(i.preventDefault(),i.stopPropagation(),this.popupRef.value.active?e[0]instanceof HTMLElement&&e[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{e[0]instanceof HTMLElement&&e[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(i){this.popupRef.value&&this.popupRef.value.active!==i&&(this.popupRef.value.active=i,this.host.requestUpdate())}enableSubmenu(i=!0){i?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var r;if(!((r=this.host.parentElement)!=null&&r.computedStyleMap))return;let i=this.host.parentElement.computedStyleMap(),e=["padding-top","border-top-width","margin-top"].reduce((o,n)=>{var m;let d=(m=i.get(n))!=null?m:new CSSUnitValue(0,"px"),p=(d instanceof CSSUnitValue?d:new CSSUnitValue(0,"px")).to("px");return o-p.value},0);this.skidding=e}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let i=getComputedStyle(this.host).direction==="rtl";return this.isConnected?u`<sd-popup ${Ua(this.popupRef)} placement="${i?"left-start":"right-start"}" anchor="anchor" flip flip-fallback-strategy="best-fit" skidding="${this.skidding}" strategy="fixed" auto-size="vertical" auto-size-padding="10"><slot name="submenu"></slot></sd-popup>`:u`<slot name="submenu" hidden></slot>`}};var mt=class extends f{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new A(this,"submenu");this.submenuController=new vr(this,this.hasSlotController);this.handleHostClick=t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Ws(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let t=this.submenuController.isExpanded(),e={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return u`<div id="anchor" part="base" class="${c("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap",this.disabled?"outline-none cursor-not-allowed text-neutral-500 hover:bg-transparent":"cursor-pointer text-primary hover:bg-neutral-200",this.isSubmenu()&&t&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!t}">${this.type==="checkbox"?u`<span part="checked-icon" class="${c("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-icon></span>`:""} ${e.iconIndent?u`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?u`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};mt.styles=[...f.styles,y`:host{--submenu-offset:-6px;display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}::slotted(sd-icon){height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}[part=checked-icon]{margin-right:var(--sd-spacing-3,.75rem)}.submenu-expanded:after{bottom:var(--sd-spacing-0,0);left:var(--sd-spacing-0,0);position:fixed;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:calc(var(z-dropdown) - 1);--tw-content:"";clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0));content:var(--tw-content)}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:-2px;outline-style:solid;outline-width:2px}:host(:hover) [part=base]{outline:2px solid transparent;outline-offset:2px}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important}`],a([g("slot:not([name])")],mt.prototype,"defaultSlot",2),a([g('part="base"')],mt.prototype,"menuItem",2),a([l()],mt.prototype,"type",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"disabled",2),a([l()],mt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"chevron",2),a([x("checked")],mt.prototype,"handleCheckedChange",1),a([x("disabled")],mt.prototype,"handleDisabledChange",1),a([x("type")],mt.prototype,"handleTypeChange",1),mt=a([v("sd-menu-item")],mt);var st=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"[default]","description","children");this.localize=new L(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var r;return e.nodeType===Node.TEXT_NODE?!((r=e.textContent)!=null&&r.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?Q`div`:this.isAccordion&&!this.isLink?Q`summary`:this.isLink?Q`a`:Q`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,r=this.isButton,o=this.isAccordion,n=this.isIconOnly,d={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},h=this.vertical?"py-3":"py-2",p=H`<${t} part="base" class="${c("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px]",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",this.current&&"font-bold",!o&&"w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",n?"justify-center aspect-square p-3":"px-4")}" aria-current="${w(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${w(r?this.disabled:void 0)}" href="${w(e?this.href:void 0)}" target="${w(e?this.target:void 0)}" download="${w(e?this.download:void 0)}" rel="${w(e&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:r?this.handleClickButton:void 0}"><div part="current-indicator" class="${c("absolute bg-accent left-0 pointer-events-none",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0",this.disabled&&"bg-neutral-500")}"></div><div class="inline-flex flex-col justify-center gap-1 w-full h-full"><span part="content-area" class="${c("relative inline-flex justify-between items-center",o?"grow":"w-full",d.description&&"pt-3",!d.description&&!this.separated&&h,this.calculatePaddingX)}">${this.divider&&this.vertical?H`<sd-divider part="divider" class="${c("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span id="content" part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline-flex text-start"></slot></span>${this.chevron||d.children&&this.vertical&&!this.separated?H`<sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${d.description&&this.vertical?H`<slot id="description" name="description" part="description" class="${c("inline-block text-sm text-left font-normal text-black pb-3",o||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${t}>`;return this.separated?H`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${p} ${d.children&&this.vertical?H`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:""}</div>${this.open?H`<slot name="children"></slot>`:""}</div>`:o?H`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${p}<slot name="children"></slot></details>`:H`${p}`}};st.styles=[...f.styles,y`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],a([g('[part="base"]')],st.prototype,"button",2),a([g("slot:not([name])")],st.prototype,"defaultSlot",2),a([l({type:Boolean,reflect:!0})],st.prototype,"vertical",2),a([l({type:String,reflect:!0})],st.prototype,"size",2),a([l({reflect:!0})],st.prototype,"href",2),a([l({type:String,reflect:!0})],st.prototype,"target",2),a([l({reflect:!0})],st.prototype,"download",2),a([l({type:Boolean,reflect:!0})],st.prototype,"current",2),a([l({type:Boolean,reflect:!0})],st.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],st.prototype,"chevron",2),a([l({type:Boolean,reflect:!0})],st.prototype,"relaxed",2),a([l({type:Boolean,reflect:!0})],st.prototype,"divider",2),a([l({type:Boolean,reflect:!0})],st.prototype,"indented",2),a([l({type:Boolean,reflect:!0})],st.prototype,"open",2),a([l({type:Boolean,reflect:!0})],st.prototype,"separated",2),st=a([v("sd-navigation-item")],st);var yr={"top-right":null,"bottom-center":null},Wl=()=>{Object.entries(yr).forEach(([s])=>{let i=document.querySelector(`#sd-toast-stack--${s}`);if(i){i.setAttribute("role","region"),yr[s]=i;return}yr[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};Wl();var pt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return yr[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(t){this.closable&&t.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([R(this.base),R(this.wrapper)]),this.wrapper.hidden=!1;let t=F(this,"notification.show",{dir:this.localize.dir()}),e=F(this,`notification.wrapper.show${ai(qr(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([B(this.base,fe(t.keyframes,this.base.scrollHeight),t.options),B(this.wrapper,e.keyframes,e.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([R(this.base),R(this.wrapper)]);let t=F(this,"notification.hide",{dir:this.localize.dir()}),e=F(this,`notification.wrapper.hide${ai(qr(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([B(this.base,fe(t.keyframes,this.base.scrollHeight),t.options),B(this.wrapper,e.keyframes,e.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,X(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,X(this,"sd-after-hide")}async toast(){return new Promise(t=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),t()},{once:!0})})}render(){return u`<div part="base" class="${c("w-full flex items-stretch m-2 focus-visible:focus-outline")}" id="notification" tabindex="0" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${c("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${c("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="_internal" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${c("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?u`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?u`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${c("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div></div>`}};pt.styles=[...f.styles,y`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],a([g('[part~="base"]')],pt.prototype,"base",2),a([g('[part~="wrapper"]')],pt.prototype,"wrapper",2),a([g('[part~="close-button"]')],pt.prototype,"close",2),a([l({type:String,reflect:!0})],pt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],pt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],pt.prototype,"closable",2),a([l({type:Number,reflect:!0})],pt.prototype,"duration",2),a([l({type:Boolean,reflect:!0,attribute:"duration-indicator"})],pt.prototype,"durationIndicator",2),a([l({type:String,reflect:!0,attribute:"toast-stack"})],pt.prototype,"toastStack",2),a([x("open",{waitUntilFirstUpdate:!0})],pt.prototype,"handleOpenChange",1),a([x("duration")],pt.prototype,"handleDurationChange",1),pt=a([v("sd-notification")],pt);_("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Nt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:t}=this;this.defaultSlot.assignedElements().filter(e=>e.tagName.toLowerCase()==="sd-option").forEach(e=>{e.disabled=t})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:t}=this;return H`<div role="${t?"presentation":"group"}" class="${c(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-divider id="divider" class="pt-2 pb-4" part="divider"></sd-divider><div part="label-container" class="${c(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};Nt.styles=[...f.styles,y`:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([g("slot:not([name])")],Nt.prototype,"defaultSlot",2),a([l({reflect:!0,type:Boolean})],Nt.prototype,"disabled",2),a([l({type:String,reflect:!0})],Nt.prototype,"label",2),a([x("disabled",{waitUntilFirstUpdate:!0})],Nt.prototype,"handleDisabledChange",1),Nt=a([v("sd-optgroup")],Nt);var dt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return u`<div part="base" class="${c("px-4 flex items-center w-full transition-colors duration-fast ease-in-out text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-700 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${c("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?u`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"bg-white border-neutral-800")}">${this.selected?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""}</span>`:""} ${t.left?u`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${t.right?u`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};dt.styles=[...f.styles,y`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}.focus-outline-offset{outline-offset:-2px}`],a([g('[part="base"]')],dt.prototype,"defaultSlot",2),a([E()],dt.prototype,"current",2),a([E()],dt.prototype,"selected",2),a([E()],dt.prototype,"hasHover",2),a([E()],dt.prototype,"isKeyboardFocus",2),a([l({type:String,reflect:!0})],dt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"checkbox",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"disabled",2),a([l({type:String,reflect:!0})],dt.prototype,"value",2),a([x("disabled")],dt.prototype,"handleDisabledChange",1),a([x("selected")],dt.prototype,"handleSelectedChange",1),a([x("value")],dt.prototype,"handleValueChange",1),dt=a([v("sd-option")],dt);var xe=class extends bt{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?Q`details`:Q`div`,e=this.expandable?Q`summary`:Q`div`;return H`<${t} part="base" class="sm:p-6"><${e} part="header" id="header" class="${c("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${w(this.expandable?"button":void 0)}" aria-expanded="${w(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${w(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${c("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"text-primary":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-transform ease-in-out duration-medium text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${c(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot><slot name="collapse-icon" class="${c(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot></span></${e}><div part="content" id="content" class="${c("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></${t}>`}};xe.styles=[...bt.styles,y`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([l({type:Boolean,reflect:!0})],xe.prototype,"expandable",2),xe=a([v("sd-quickfact")],xe);_("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});_("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var ut=class extends f{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return u`<span part="base" class="${c("sd-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${c("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${c("rounded-full inline-flex text-white bg-accent h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span></span><slot part="label" class="${c("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};ut.styles=[...f.styles,y`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],a([E()],ut.prototype,"checked",2),a([E()],ut.prototype,"hasFocus",2),a([l({type:String,reflect:!0})],ut.prototype,"size",2),a([l({type:Boolean,reflect:!0})],ut.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ut.prototype,"visuallyDisabled",2),a([l()],ut.prototype,"value",2),a([l({type:Boolean,reflect:!0})],ut.prototype,"invalid",2),a([x("checked")],ut.prototype,"handleCheckedChange",1),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ut.prototype,"handleDisabledChange",1),ut=a([v("sd-radio")],ut);var vt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){let t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),r=`${this.size}-${t?"label":"no-label"}`;return u`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${c("relative text-center rounded-full transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"bg-primary text-white hover:bg-primary-500":(this.disabled||this.visuallyDisabled)&&!this.checked?"text-neutral-500 hover:cursor-not-allowed":(this.disabled||this.visuallyDisabled)&&this.checked?"text-neutral-500 hover:cursor-not-allowed ":"bg-transparent text-primary border-primary hover:text-primary-500 cursor-pointer",t&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",r)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${w(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${c(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?u`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};vt.styles=[...f.styles,y`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{padding-left:var(--sd-spacing-5,1.25rem);padding-right:var(--sd-spacing-5,1.25rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{padding-left:var(--sd-spacing-4,1rem);padding-right:var(--sd-spacing-4,1rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{padding-left:var(--sd-spacing-3,.75rem);padding-right:var(--sd-spacing-3,.75rem)}:host([size=lg].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3,.75rem)*-1)}:host([size=md].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2,.5rem)*-1)}:host([size=sm].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1,.25rem)*-1)}:host(.sd-button-group__button--hover){z-index:20}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:10}`],a([g(".button")],vt.prototype,"input",2),a([g(".hidden-input")],vt.prototype,"hiddenInput",2),a([E()],vt.prototype,"hasFocus",2),a([l({type:String,reflect:!0})],vt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],vt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],vt.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],vt.prototype,"checked",2),a([l()],vt.prototype,"value",2),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],vt.prototype,"handleDisabledChange",1),vt=a([v("sd-radio-button")],vt);var ke=class extends f{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(t){let e=Di(t.target);e==null||e.classList.add("sd-button-group__button--focus")}handleBlur(t){let e=Di(t.target);e==null||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){let e=Di(t.target);e==null||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){let e=Di(t.target);e==null||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){let t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach(e=>{let r=t.indexOf(e),o=Di(e);o!==null&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",r===0),o.classList.toggle("sd-button-group__button--inner",r>0&&r<t.length-1),o.classList.toggle("sd-button-group__button--last",r===t.length-1),o.classList.toggle("sd-button-group__button--radio",o.tagName.toLowerCase()==="sd-radio-button"))})}render(){return u`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};ke.styles=[...f.styles,y`:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],a([g("slot")],ke.prototype,"defaultSlot",2),a([E()],ke.prototype,"disableRole",2),a([l({type:String,reflect:!0})],ke.prototype,"label",2),ke=a([v("sd-button-group")],ke);function Di(s){var t;let i="sd-button, sd-radio-button";return(t=s.closest(i))!=null?t:s.querySelector(i)}var W=class extends f{constructor(){super(...arguments);this.formControlController=new lt(this);this.hasSlotController=new A(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.helpText="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?Ys:t?Xs:si}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),r=this.getAllRadios(),o=this.value;e.disabled||(this.value=e.value,r.forEach(n=>n.checked=n===e),this.value!==o&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var h;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(p=>!p.disabled),r=(h=e.find(p=>p.checked))!=null?h:e[0],o=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,d=e.indexOf(r)+o;d<0&&(d=e.length-1),d>e.length-1&&(d=0),this.getAllRadios().forEach(p=>{p.checked=!1,this.hasButtonGroup||(p.tabIndex=-1)}),this.value=e[d].value,e[d].checked=!0,this.hasButtonGroup?e[d].shadowRoot.querySelector("button").focus():(e[d].tabIndex=0,e[d].focus()),this.value!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),r=t.find(o=>o.checked)||t[0];r&&r.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,r;let t=this.getAllRadios();if(await Promise.all(t.map(async o=>{await o.updateComplete,o.checked=o.value===this.value,o.size=this.size,o instanceof ut&&(o.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(o=>o.tagName.toLowerCase()==="sd-radio-button"),!t.some(o=>o.checked))if(this.hasButtonGroup){let o=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");o&&(o.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let o=(r=this.shadowRoot)==null?void 0:r.querySelector("sd-button-group");o&&(o.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:!!r,n=this.hasSlotController.test("tooltip"),d=u`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return u`<fieldset part="form-control" class="${c("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${e||n?u`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${c("p-0 leading-normal text-black text-left",e?"inline-block":"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?u`<sd-button-group class="border border-primary rounded-full" part="button-group" exportparts="base:button-group__base" role="presentation">${d}</sd-button-group>`:d}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>${this.formControlController.renderInvalidMessage()}`}};W.styles=[...f.styles,y`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}:host:has(sd-button-group){display:inline-flex}`],a([g("slot:not([name])")],W.prototype,"defaultSlot",2),a([g("#validation-input")],W.prototype,"validationInput",2),a([g("#invalid-message")],W.prototype,"invalidMessage",2),a([E()],W.prototype,"hasButtonGroup",2),a([E()],W.prototype,"defaultValue",2),a([E()],W.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],W.prototype,"size",2),a([l({type:Boolean,reflect:!0})],W.prototype,"required",2),a([l({type:String,reflect:!0})],W.prototype,"orientation",2),a([l({type:String,reflect:!0})],W.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],W.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],W.prototype,"boldLabel",2),a([l({type:String,reflect:!0})],W.prototype,"name",2),a([l()],W.prototype,"value",2),a([l({type:String,reflect:!0})],W.prototype,"form",2),a([x("size",{waitUntilFirstUpdate:!0})],W.prototype,"handleSizeChange",1),a([x("showInvalidStyle",{waitUntilFirstUpdate:!0})],W.prototype,"handleInvalidChange",1),a([x("value")],W.prototype,"handleValueChange",1),W=a([v("sd-radio-group")],W);var _e=(s,i)=>s-i,hi=(s,i)=>{if(s.length!==i.length)return!0;let t=s.slice().sort(_e),e=i.slice().sort(_e);for(let r=0;r<t.length;r+=1)if(t[r]!==e[r])return!0;return!1},es=(s,i)=>{let t=s.getBoundingClientRect(),e=t.width;if(e<=0)return 0;let r=i;return r-=t.left,r<=0?0:r>=e?1:(r/=e,r)};var J=class extends f{constructor(){super();this.formControlController=new lt(this);this.hasSlotController=new A(this,"label","help-text");this.localize=new L(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.noTooltip=!1;this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(t){this._value=t?t.split(" ").map(Number).sort(_e):[]}get value(){return this._value.slice().sort(_e).join(" ")}set valueAsArray(t){let e=this._value;this._value=Array.isArray(t)?t.slice().sort(_e):t||[],hi(e,this._value)&&this.requestUpdate("value",e.join(" "))}get valueAsArray(){return[...this._value].sort(_e)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value)}willUpdate(t){super.willUpdate(t),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let e=this._value.map(r=>{if(r<=this.min)return this.min;if(r>=this.max)return this.max;let o=this.min+this.step*Math.round((r-this.min)/this.step);return o>this.max?this.max:o});hi(this._value,e)&&(this._value=e)}updated(t){super.updated(t);for(let e of this.thumbs){let r=+e.dataset.rangeId;this._rangeValues.has(r)&&this.moveThumb(e,this._rangeValues.get(r))}this.updateActiveTrack()}focus(t){let e=this.thumbs.item(0);e?e.focus(t):super.focus(t)}get validity(){return this.input.validity}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}updateTooltip(t){let e=+t.dataset.rangeId;if(!this._rangeValues.has(e))return;let r=this._rangeValues.get(e),o=t.parentElement;o.content=this.tooltipFormatter(r)}updateActiveTrack(){let{activeTrack:t}=this;if(!t)return;if(this.min===this.max){t.style.insetInlineStart="0%",t.style.insetInlineEnd="0%";return}if(this._value.length===1){let n=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",d=100*(this._value[0]-this.min)/(this.max-this.min);t.style.insetInlineStart=`min(${n}, ${d}%)`,t.style.insetInlineEnd=`min(calc(100% - ${n}), calc(100% - ${d}%))`;return}let e=this._value.slice().sort(_e),r=100*(e[0]-this.min)/(this.max-this.min),o=100*(e[e.length-1]-this.min)/(this.max-this.min);t.style.insetInlineStart=`${r}%`,t.style.insetInlineEnd=`calc(100% - ${o}%)`}moveThumb(t,e){t.setAttribute("aria-valuenow",e.toString()),t.setAttribute("aria-valuetext",this.tooltipFormatter(e));let r=(e-this.min)/(this.max-this.min);t.style.insetInlineStart=`calc(${100*r}% - 8px)`,this.updateTooltip(t)}movementBoundariesForThumb(t,e){let r=this.valueAsArray,n=Array.from(this.thumbs).indexOf(t),d=r[n-1]||this.min,h=r[n+1]||this.max,p=e<d||e>h;return{finalValue:Math.max(d,Math.min(h,e)),isRestricted:p,nextValue:h,prevValue:d}}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}onClickTrack(t,e=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:r}=t,o=Array.from(this.thumbs),n=es(this.inputWrapper,r),d=this.step/(this.max-this.min),h=this.min+this.step*Math.round(n/d),p=o.reduce((k,$)=>{let z=this._rangeValues.get(+$.dataset.rangeId),S=this._rangeValues.get(+k.dataset.rangeId),D=Math.abs(z-h),V=Math.abs(S-h);return D===V?z<h?$:k:D<V?$:k}),m=+p.dataset.rangeId;if(!m)return;this._rangeValues.set(m,h),this.moveThumb(p,h);let b=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),hi(b,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let C=new PointerEvent("pointerdown",t);e&&p.dispatchEvent(C)&&this.updateTooltip(p)}onClickTrackItem(t){this.onClickTrack(t,!1)}async onClickThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target;this.updateTooltip(e),e.dataset.pointerId&&e.releasePointerCapture(+e.dataset.pointerId),e.dataset.pointerId=t.pointerId.toString(),e.setPointerCapture(t.pointerId),e.classList.add("grabbed"),await e.parentElement.show()}onDragThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target,r=+e.dataset.rangeId;if(!this._rangeValues.has(r)||(e.dataset.pointerId?+e.dataset.pointerId:null)!==t.pointerId)return;let n=es(this.inputWrapper,t.clientX),d=this.step/(this.max-this.min),h=this.min+this.step*Math.round(n/d);if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:h}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(e,h);m.isRestricted?(h=m.finalValue,e.style.zIndex=(3+this.thumbs.length).toFixed(0)):e.style.zIndex="3",this._rangeValues.set(r,h),this.moveThumb(e,h);let b=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),hi(b,this._value)&&this.emit("sd-input")}async onReleaseThumb(t){let e=t.target;!e.dataset.pointerId||t.pointerId!==+e.dataset.pointerId||(e.classList.remove("grabbed"),e.releasePointerCapture(t.pointerId),delete e.dataset.pointerId,hi(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),await e.parentElement.hide())}onKeyPress(t){let e=t.target,r=+e.dataset.rangeId,o=this._rangeValues.get(r);if(o===void 0)return;let n=o;switch(t.key){case"ArrowUp":case"Up":n=Math.min(o+this.step,this.max);break;case"ArrowDown":case"Down":n=Math.max(o-this.step,this.min);break;case"ArrowLeft":case"Left":n=this.rtl?Math.min(o+this.step,this.max):Math.max(o-this.step,this.min);break;case"ArrowRight":case"Right":n=this.rtl?Math.max(o-this.step,this.min):Math.min(o+this.step,this.max);break;case"PageUp":n=Math.min(o+(this.max-this.min)/5,this.max);break;case"PageDown":n=Math.max(o-(this.max-this.min)/5,this.min);break;case"Home":n=this.min;break;case"End":n=this.max;break;default:return}if(n!==o){if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:n}}).defaultPrevented)return;let h=this.movementBoundariesForThumb(e,n);h.isRestricted&&(n=h.finalValue),this.moveThumb(e,n),this._rangeValues.set(r,n),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(e),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}t.preventDefault()}onBlur(t){var e;t.relatedTarget&&((e=this.shadowRoot)!=null&&e.contains(t.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(t){var r;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let e=t.target;(r=e==null?void 0:e.dataset)!=null&&r.rangeId&&this.updateTooltip(e)}renderThumbs(t){let e=this._value.length>1;return this._rangeValues.clear(),this._value.map((r,o)=>{let n=o+1;this._rangeValues.set(n,r);let d=`thumb-${n}`,h="",p="";return e?(p=t?`label aria-label-hidden ${d}`:`aria-label-hidden ${d}`,o===0?h=`${this.localize.term("minimum")} (${this.tooltipFormatter(r)})`:o===this._value.length-1?h=`${this.localize.term("maximum")} (${this.tooltipFormatter(r)})`:h=this.tooltipFormatter(r)):p=t?"label aria-label-hidden":"",u`<sd-tooltip hoist trigger="focus" disabled="${w(this.disabled||this.visuallyDisabled||this.noTooltip?!0:void 0)}"><div id="${d}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${w(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${p}" aria-label="${h}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${r}" aria-valuetext="${this.tooltipFormatter(r)}" data-range-id="${n}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${c("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"bg-neutral-500 outline-none":"bg-primary hover:bg-primary-500 cursor-pointer focus-visible:focus-outline")}"></div></sd-tooltip>`})}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},e=!!(this.label||t.label),r=!!(this.helpText||t.helpText);return u`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${e?u`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${e?"false":"true"}" class="${c("w-full",e?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${c("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${w(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" class="${c("h-1 my-[6px]",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-neutral-400")}"></div><div part="active-track" hidden="${w(this.noTrackBar?!0:void 0)}" class="${c("absolute top-0 h-1",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-primary")}"></div></div>${this.renderThumbs(e)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>`}};J.styles=[...f.styles,y`[part=base]{touch-action:none;-webkit-touch-callout:none}[part=thumb].grabbed{--tw-bg-opacity:1!important;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity,1))!important}`],a([g("#input")],J.prototype,"input",2),a([g('[part="active-track"]')],J.prototype,"activeTrack",2),a([g('[part="input-wrapper"]')],J.prototype,"inputWrapper",2),a([Wi('[part="thumb"]')],J.prototype,"thumbs",2),a([l({attribute:!1})],J.prototype,"tooltipFormatter",2),a([l({type:String,reflect:!0})],J.prototype,"name",2),a([l({type:String,reflect:!0})],J.prototype,"label",2),a([l({attribute:"help-text",reflect:!0})],J.prototype,"helpText",2),a([l({type:Number,reflect:!0})],J.prototype,"min",2),a([l({type:Number,reflect:!0})],J.prototype,"max",2),a([l({type:Number,reflect:!0})],J.prototype,"step",2),a([l({type:Boolean,reflect:!0})],J.prototype,"disabled",2),a([l({attribute:"visually-disabled",type:Boolean,reflect:!0})],J.prototype,"visuallyDisabled",2),a([l({attribute:"no-track-bar",type:Boolean,reflect:!0})],J.prototype,"noTrackBar",2),a([l({attribute:"no-tooltip",type:Boolean,reflect:!0})],J.prototype,"noTooltip",2),a([Mt()],J.prototype,"defaultValue",2),a([l({type:String})],J.prototype,"value",1),J=a([v("sd-range")],J);var Ce=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.subtick=!1}render(){return u`<div part="base" class="${c(this.subtick?"w-0.25":"w-0.5")}"><div part="line" class="${c("bg-neutral-500",this.subtick?"h-2":"h-[10px]")}"></div><div part="label" class="flex items-center justify-center text-center text-nowrap text-sm"><slot></slot></div></div>`}};Ce.styles=f.styles,a([l({type:Boolean,reflect:!0})],Ce.prototype,"subtick",2),Ce=a([v("sd-range-tick")],Ce);var at=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,e=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,r=this.container.scrollTop>0,o=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,n=this.canScroll,d={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&e,up:this.isScrollVerticalEnabled&&r,down:this.isScrollVerticalEnabled&&o},h=n.left&&!d.left,p=n.up&&!d.up,m=n.right&&!d.right,b=n.down&&!d.down;(h||p)&&this.dispatchEvent(new CustomEvent("start")),(m||b)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=d}handleScroll(t,e){var V,U,Z;let r=["left","up"].includes(t)?-this.step:this.step,o=["left","right"].includes(t)?"horizontal":"vertical",n=["left","up"].includes(t)?"start":"end",d=!["mouse","touch"].includes((V=e==null?void 0:e.pointerType)!=null?V:""),h=o==="horizontal"?"left":"top";(U=this.container)==null||U.scrollBy({behavior:"smooth",[h]:r});let p=`button-${t}`;this.dispatchEvent(new CustomEvent(p,{bubbles:!0,composed:!0}));let b=(o==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+r,C=o==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,k=n==="start"&&b<=0,$=n==="end"&&b>=C-1;if(!(k||$)){let Y=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===Y?`${Y}\u200B`:Y;return}let z=this.scrollButtons[t],S={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],D=k?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(Z=S==null?void 0:S.querySelector("sd-icon"))==null||Z.setAttribute("label",D),d?S==null||S.focus():z==null||z.blur()}handleButtonBlur(t,e){var d;let o=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(d=e.target.querySelector("sd-icon"))==null||d.setAttribute("label",o)}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",e="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return u`<div part="base" class="${c("scroll-container flex overflow-hidden flex-1",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset&&"p-4",{horizontal:"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",vertical:"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",auto:"scroll-auto overflow-auto"}[this.orientation])}" @scroll="${this.handleContainerScroll}" tabindex="0"><div id="announcement-container" role="status" class="sr-only"></div><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?u`${this.isScrollHorizontalEnabled?u`<div part="button-left" class="${c("absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.left&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${c(t)}" aria-hidden="${w(!this.canScroll.left||void 0)}" tabindex="${w(this.canScroll.left?void 0:-1)}" @click="${r=>this.handleScroll("left",r)}" @blur="${r=>this.handleButtonBlur("left",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-right" class="${c("absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.right&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${c(t)}" aria-hidden="${w(!this.canScroll.right||void 0)}" tabindex="${w(this.canScroll.right?void 0:-1)}" @click="${r=>this.handleScroll("right",r)}" @blur="${r=>this.handleButtonBlur("right",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?u`<div part="button-top" class="${c("absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.up&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${c(t)}" aria-hidden="${w(!this.canScroll.up||void 0)}" tabindex="${w(this.canScroll.up?void 0:-1)}" @click="${r=>this.handleScroll("up",r)}" @blur="${r=>this.handleButtonBlur("up",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-bottom" class="${c("absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.down&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${c(t)}" aria-hidden="${w(!this.canScroll.down||void 0)}" tabindex="${w(this.canScroll.down?void 0:-1)}" @click="${r=>this.handleScroll("down",r)}" @blur="${r=>this.handleButtonBlur("down",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null}`:null} ${this.shadows?u`${this.isScrollHorizontalEnabled?u`<div part="shadow-left" class="${c("left top-0 left-0 w-[6px] h-full",e,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${c("right top-0 right-0 w-[6px] h-full",e,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?u`<div part="shadow-top" class="${c("top top-0 left-0 w-full h-[6px]",e,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${c("bottom bottom-0 left-0 w-full h-[6px]",e,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};at.styles=[...f.styles,y`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-icon--top{align-self:flex-start}.sd-icon--down{align-self:flex-end}`],a([g('[part="button-right"] button')],at.prototype,"rightButton",2),a([g('[part="button-left"] button')],at.prototype,"leftButton",2),a([g('[part="button-bottom"] button')],at.prototype,"downButton",2),a([g('[part="button-top"] button')],at.prototype,"upButton",2),a([g(".scroll-container")],at.prototype,"container",2),a([g("#announcement-container")],at.prototype,"announcementContainer",2),a([l({type:String,reflect:!0})],at.prototype,"orientation",2),a([l({type:Boolean,reflect:!0})],at.prototype,"scrollbars",2),a([l({type:Boolean,reflect:!0})],at.prototype,"buttons",2),a([l({type:Boolean,reflect:!0})],at.prototype,"shadows",2),a([l({type:Boolean,reflect:!0})],at.prototype,"inset",2),a([l({type:Number,reflect:!0})],at.prototype,"step",2),a([E()],at.prototype,"canScroll",2),a([E()],at.prototype,"isScrollHorizontalEnabled",2),a([E()],at.prototype,"isScrollVerticalEnabled",2),at=a([v("sd-scrollable")],at);var O=class extends f{constructor(){super(...arguments);this.formControlController=new lt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new A(this,"help-text","label");this.localize=new L(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>u`<sd-tag class="relative z-10" ?disabled="${this.disabled}" part="tag" exportparts="
138
+ </svg>`}}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}isLink(){return!!this.href}render(){let t=this.isLink(),e=this.notInteractive?Q`div`:t?Q`a`:Q`button`,r=Qi(this.marker[this.variant]),o=`url("data:image/svg+xml;utf8,${encodeURIComponent(this.marker[this.variant]).replace(/#/g,"%23")}")`;return H`<${e} part="base" class="${c("relative flex justify-center",!this.notInteractive&&"group focus-visible:focus-outline")}" href="${w(t?this.href:void 0)}" target="${w(t?this.target:void 0)}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" role="${w(this.notInteractive||t?void 0:"button")}" aria-label="${w(!this.notInteractive&&this.label?this.label:void 0)}" aria-labelledby="${w(!this.notInteractive&&!this.label?"content":void 0)}"><div part="marker" class="${c("relative inline-flex",this.animated&&(this.variant==="main"||this.variant==="place")&&"animate-bounce-once",this.variant==="cluster"&&this.state==="hover"&&"scale-110 fill-primary-500",this.variant==="cluster"&&!this.notInteractive&&"transition-transform duration-fast ease-in-out hover:scale-110",{cluster:"fill-primary",main:"fill-accent",place:"fill-white"}[this.variant])}"><div id="motion-wrapper" part="motion-wrapper" class="absolute inset-0 overflow-hidden pointer-events-none" style="mask-image:${o};-webkit-mask-image:${o}"><div class="${c("absolute inset-0 transition-transform ease-in-out duration-fast translate-y-full group-hover:translate-y-0 group-active:translate-y-0",["hover","active"].includes(this.state)&&"!translate-y-0")}"><div class="${c("min-w-full min-h-full skew-y-[-11deg]",{cluster:"bg-primary-500",main:this.state==="active"?"bg-accent-700":"bg-accent-550 group-active:bg-accent-700",place:this.state==="active"?"bg-primary-200":"bg-primary-100 group-active:bg-primary-200"}[this.variant])}"></div></div>${this.variant==="main"?H`<div id="marker-circle" class="absolute rounded-full bg-white"></div>`:""}</div>${r} ${this.variant==="cluster"?H`<div id="cluster-border" class="${c("absolute inset-0 bg-primary opacity-30 rounded-full",this.state==="hover"&&"bg-primary-500")}"></div>`:""}</div><div id="content" part="content" class="${c("absolute self-center pointer-events-none",this.variant==="cluster"&&"font-bold text-white")}"><slot></slot></div></${e}>`}};At.styles=[...f.styles,y`:host{display:block}#motion-wrapper{mask-position:center;-webkit-mask-position:center;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-size:contain;-webkit-mask-size:contain}:host([variant=cluster]) [part=base],svg{width:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=base]{height:calc(var(--sd-spacing-12,3rem)*var(--map-marker-scaling,1))}:host(:not([variant=cluster])) [part=base]{height:calc(var(--sd-spacing-16,4rem)*var(--map-marker-scaling,1))}:host([variant=cluster]) [part=content]{font-size:calc(var(--sd-font-size-sm,.875rem)*var(--map-marker-scaling,1))}:host([variant=place]) [part=content]{font-size:calc(var(--sd-font-size-3xl,2rem)*var(--map-marker-scaling,1));margin-top:calc(var(--sd-spacing-2,.5rem)*-1)}:host([variant=main]) [part=marker],:host([variant=place]) [part=marker]{--tw-drop-shadow:drop-shadow(var(--sd-shadow,0px 1px 3px #515151));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host([variant=main]) #marker-circle{height:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));left:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));right:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));top:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1));width:calc(var(--sd-spacing-4,1rem)*var(--map-marker-scaling,1))}`],a([l({type:String,reflect:!0})],At.prototype,"variant",2),a([l({type:String,reflect:!0})],At.prototype,"state",2),a([l({type:Boolean,reflect:!0})],At.prototype,"animated",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],At.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],At.prototype,"href",2),a([l({type:String,reflect:!0})],At.prototype,"target",2),a([l({reflect:!0})],At.prototype,"label",2),At=a([v("sd-map-marker")],At);var we=class extends f{constructor(){super(...arguments);this.localize=new L(this)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}handleClick(t){let e=["menuitem","menuitemcheckbox"],r=t.composedPath(),o=r.find(p=>{var m;return e.includes(((m=p==null?void 0:p.getAttribute)==null?void 0:m.call(p,"role"))||"")});if(!o||r.find(p=>{var m;return((m=p==null?void 0:p.getAttribute)==null?void 0:m.call(p,"role"))==="menu"})!==this)return;let h=o;h.type==="checkbox"&&(h.checked=!h.checked),this.emit("sd-select",{detail:{item:h}})}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){let e=this.getCurrentItem();t.preventDefault(),t.stopPropagation(),e==null||e.click()}else if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){let e=this.getAllItems(),r=this.getCurrentItem(),o=r?e.indexOf(r):0;if(e.length>0){t.preventDefault(),t.stopPropagation();let n=(d,h)=>{let p=d;for(let m of e)if(p=(p+h+e.length)%e.length,!e[p].disabled)return p;return d};if(t.key==="ArrowDown")o=n(o,1);else if(t.key==="ArrowUp")o=n(o,-1);else if(t.key==="Home")o=e.findIndex(d=>!d.disabled),o===-1&&(o=0);else if(t.key==="End"){o=e.length-1;for(let d=e.length-1;d>=0;d--)if(!e[d].disabled){o=d;break}}this.setCurrentItem(e[o]),e[o].focus()}}}handleMouseDown(t){let e=t.target;this.isMenuItem(e)&&this.setCurrentItem(e)}handleSlotChange(){let t=this.getAllItems();t.length>0&&this.setCurrentItem(t[0])}isMenuItem(t){var e;return t.tagName.toLowerCase()==="sd-menu-item"||["menuitem","menuitemcheckbox","menuitemradio"].includes((e=t.getAttribute("role"))!=null?e:"")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!!this.isMenuItem(t))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(r=>{r.setAttribute("tabindex",r===t?"0":"-1")})}render(){return u`<slot @slotchange="${this.handleSlotChange}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}" @mousedown="${this.handleMouseDown}"></slot>`}};we.styles=[...f.styles,y`:host{border-radius:var(--sd-border-radius-md,.375rem);display:block;overflow:auto;overscroll-behavior:auto;padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);position:relative;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75))!important;--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}::slotted(sd-divider){padding-bottom:var(--sd-spacing-3,.75rem);padding-top:var(--sd-spacing-3,.75rem)}`],a([g("slot")],we.prototype,"defaultSlot",2),we=a([v("sd-menu")],we);var Ra=()=>new ts,ts=class{},Gr=new WeakMap,Ua=Xt(class extends ci{render(s){return j}update(s,[i]){var e;let t=i!==this.G;return t&&this.G!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.G=i,this.ht=(e=s.options)==null?void 0:e.host,this.rt(this.ct=s.element)),j}rt(s){var i;if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=(i=this.ht)!=null?i:globalThis,e=Gr.get(t);e===void 0&&(e=new WeakMap,Gr.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){var s,i,t;return typeof this.G=="function"?(i=Gr.get((s=this.ht)!=null?s:globalThis))==null?void 0:i.get(this.G):(t=this.G)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var vr=class{constructor(i,t){this.popupRef=Ra();this.enableSubmenuTimer=-1;this.isConnected=!1;this.isPopupConnected=!1;this.skidding=0;this.submenuOpenDelay=100;this.handleMouseMove=i=>{this.host.style.setProperty("--safe-triangle-cursor-x",`${i.clientX}px`),this.host.style.setProperty("--safe-triangle-cursor-y",`${i.clientY}px`)};this.handleMouseOver=()=>{this.hasSlotController.test("submenu")&&this.enableSubmenu()};this.handleKeyDown=i=>{switch(i.key){case"Escape":case"Tab":this.disableSubmenu();break;case"ArrowLeft":i.target!==this.host&&(i.preventDefault(),i.stopPropagation(),this.host.focus(),this.disableSubmenu());break;case"ArrowRight":case"Enter":case" ":this.handleSubmenuEntry(i);break;default:break}};this.handleClick=i=>{var t;i.target===this.host?(i.preventDefault(),i.stopPropagation()):i.target instanceof Element&&(i.target.tagName==="sd-menu-item"||(t=i.target.role)!=null&&t.startsWith("menuitem"))&&i.target.getAttribute("type")!=="checkbox"&&this.disableSubmenu()};this.handleFocusOut=i=>{i.relatedTarget&&i.relatedTarget instanceof Element&&this.host.contains(i.relatedTarget)||this.disableSubmenu()};this.handlePopupMouseover=i=>{i.stopPropagation()};this.handlePopupReposition=()=>{let i=this.host.renderRoot.querySelector("slot[name='submenu']"),t=i==null?void 0:i.assignedElements({flatten:!0}).filter(h=>h.localName==="sd-menu")[0],e=getComputedStyle(this.host).direction==="rtl";if(!t)return;let{left:r,top:o,width:n,height:d}=t.getBoundingClientRect();this.host.style.setProperty("--safe-triangle-submenu-start-x",`${e?r+n:r}px`),this.host.style.setProperty("--safe-triangle-submenu-start-y",`${o}px`),this.host.style.setProperty("--safe-triangle-submenu-end-x",`${e?r+n:r}px`),this.host.style.setProperty("--safe-triangle-submenu-end-y",`${o+d}px`)};(this.host=i).addController(this),this.hasSlotController=t}hostConnected(){this.hasSlotController.test("submenu")&&!this.host.disabled&&this.addListeners()}hostDisconnected(){this.removeListeners()}hostUpdated(){this.hasSlotController.test("submenu")&&!this.host.disabled?(this.addListeners(),this.updateSkidding()):this.removeListeners()}addListeners(){this.isConnected||(this.host.addEventListener("mousemove",this.handleMouseMove),this.host.addEventListener("mouseover",this.handleMouseOver),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick),this.host.addEventListener("focusout",this.handleFocusOut),this.isConnected=!0),this.isPopupConnected||this.popupRef.value&&(this.popupRef.value.addEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.addEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!0)}removeListeners(){this.isConnected&&(this.host.removeEventListener("mousemove",this.handleMouseMove),this.host.removeEventListener("mouseover",this.handleMouseOver),this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick),this.host.removeEventListener("focusout",this.handleFocusOut),this.isConnected=!1),this.isPopupConnected&&this.popupRef.value&&(this.popupRef.value.removeEventListener("mouseover",this.handlePopupMouseover),this.popupRef.value.removeEventListener("sd-reposition",this.handlePopupReposition),this.isPopupConnected=!1)}handleSubmenuEntry(i){let t=this.host.renderRoot.querySelector("slot[name='submenu']");if(!t){console.error("Cannot activate a submenu if no corresponding menuitem can be found.",this);return}let e=null;for(let r of t.assignedElements())if(e=r.querySelectorAll("sd-menu-item, [role^='menuitem']"),e.length!==0)break;if(!(!e||e.length===0)){e[0].setAttribute("tabindex","0");for(let r=1;r!==e.length;++r)e[r].setAttribute("tabindex","-1");this.popupRef.value&&(i.preventDefault(),i.stopPropagation(),this.popupRef.value.active?e[0]instanceof HTMLElement&&e[0].focus():(this.enableSubmenu(!1),this.host.updateComplete.then(()=>{e[0]instanceof HTMLElement&&e[0].focus()}),this.host.requestUpdate()))}}setSubmenuState(i){this.popupRef.value&&this.popupRef.value.active!==i&&(this.popupRef.value.active=i,this.host.requestUpdate())}enableSubmenu(i=!0){i?(window.clearTimeout(this.enableSubmenuTimer),this.enableSubmenuTimer=window.setTimeout(()=>{this.setSubmenuState(!0)},this.submenuOpenDelay)):this.setSubmenuState(!0)}disableSubmenu(){window.clearTimeout(this.enableSubmenuTimer),this.setSubmenuState(!1)}updateSkidding(){var r;if(!((r=this.host.parentElement)!=null&&r.computedStyleMap))return;let i=this.host.parentElement.computedStyleMap(),e=["padding-top","border-top-width","margin-top"].reduce((o,n)=>{var m;let d=(m=i.get(n))!=null?m:new CSSUnitValue(0,"px"),p=(d instanceof CSSUnitValue?d:new CSSUnitValue(0,"px")).to("px");return o-p.value},0);this.skidding=e}isExpanded(){return this.popupRef.value?this.popupRef.value.active:!1}renderSubmenu(){let i=getComputedStyle(this.host).direction==="rtl";return this.isConnected?u`<sd-popup ${Ua(this.popupRef)} placement="${i?"left-start":"right-start"}" anchor="anchor" flip flip-fallback-strategy="best-fit" skidding="${this.skidding}" strategy="fixed" auto-size="vertical" auto-size-padding="10"><slot name="submenu"></slot></sd-popup>`:u`<slot name="submenu" hidden></slot>`}};var mt=class extends f{constructor(){super(...arguments);this.type="normal";this.checked=!1;this.disabled=!1;this.value="";this.chevron=!1;this.hasSlotController=new A(this,"submenu");this.submenuController=new vr(this,this.hasSlotController);this.handleHostClick=t=>{this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.setAttribute("tabindex",this.disabled?"-1":"0")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Ws(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}render(){let t=this.submenuController.isExpanded(),e={label:this.hasSlotController.test("[default]"),iconIndent:this.hasSlotController.test("icon-indent")};return u`<div id="anchor" part="base" class="${c("relative flex items-stretch whitespace-nowrap py-3 px-4 no-wrap",this.disabled?"outline-none cursor-not-allowed text-neutral-500 hover:bg-transparent":"cursor-pointer text-primary hover:bg-neutral-200",this.isSubmenu()&&t&&"submenu-expanded")}" .disabled="${this.disabled}" ?aria-haspopup="${this.isSubmenu()}" ?aria-expanded="${!!t}">${this.type==="checkbox"?u`<span part="checked-icon" class="${c("flex items-center justify-center grow-0 shrink-0 basis-auto",this.checked?"visible":"invisible")}"><sd-icon name="status-check" library="sd-status-assets" aria-hidden="true"></sd-icon></span>`:""} ${e.iconIndent?u`<slot name="icon-indent" part="icon-indent" class="flex items-center grow-0 shrink-0 basis-auto mr-2"></slot>`:""}<slot part="label" class="inline-flex grow shrink basis-auto text-ellipsis overflow-hidden" @slotchange="${this.handleDefaultSlotChange}"></slot>${this.chevron||this.isSubmenu()?u`<span part="submenu-icon" class="flex items-center justify-center grow-0 shrink-0 basis-auto ml-3"><sd-icon name="chevron-right" library="_internal" aria-hidden="true" class="h-6 w-6"></sd-icon></span>`:""} ${this.submenuController.renderSubmenu()}</div>`}};mt.styles=[...f.styles,y`:host{--submenu-offset:-6px;display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}::slotted(sd-icon){height:var(--sd-spacing-6,1.5rem);width:var(--sd-spacing-6,1.5rem)}[part=checked-icon]{margin-right:var(--sd-spacing-3,.75rem)}.submenu-expanded:after{bottom:var(--sd-spacing-0,0);left:var(--sd-spacing-0,0);position:fixed;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:calc(var(z-dropdown) - 1);--tw-content:"";clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0));content:var(--tw-content)}:host(:hover:not([aria-disabled=true],:focus-visible)) [part=base]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}:host(:focus-visible:not([aria-disabled=true])) [part=base]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:-2px;outline-style:solid;outline-width:2px}:host(:hover) [part=base]{outline:2px solid transparent;outline-offset:2px}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));margin-left:var(--submenu-offset)}::slotted(sd-menu){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important}`],a([g("slot:not([name])")],mt.prototype,"defaultSlot",2),a([g('part="base"')],mt.prototype,"menuItem",2),a([l()],mt.prototype,"type",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"disabled",2),a([l()],mt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],mt.prototype,"chevron",2),a([x("checked")],mt.prototype,"handleCheckedChange",1),a([x("disabled")],mt.prototype,"handleDisabledChange",1),a([x("type")],mt.prototype,"handleTypeChange",1),mt=a([v("sd-menu-item")],mt);var st=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"[default]","description","children");this.localize=new L(this);this.vertical=!1;this.size="md";this.current=!1;this.disabled=!1;this.chevron=!1;this.relaxed=!1;this.divider=!1;this.indented=!1;this.open=!1;this.separated=!1}get isButton(){return!this.href&&!this.hasSlotController.test("children")}get isLink(){return!!this.href}get isAccordion(){return!this.separated&&!this.href&&this.hasSlotController.test("children")}get isIconOnly(){if(!this.defaultSlot)return!1;let t=this.defaultSlot.assignedNodes({flatten:!0});return t.length>0&&t.every(e=>{var r;return e.nodeType===Node.TEXT_NODE?!((r=e.textContent)!=null&&r.trim()):e.nodeType===Node.ELEMENT_NODE?e.tagName.toLowerCase()==="sd-icon":!1})}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}get calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}get tag(){return this.separated&&!this.isLink?Q`div`:this.isAccordion&&!this.isLink?Q`summary`:this.isLink?Q`a`:Q`button`}focus(){var t;this.disabled||(t=this.button)==null||t.focus()}blur(){var t;(t=this.button)==null||t.blur()}render(){let t=this.tag,e=this.isLink,r=this.isButton,o=this.isAccordion,n=this.isIconOnly,d={label:this.hasSlotController.test("[default]"),main:this.hasSlotController.test("main"),description:this.hasSlotController.test("description"),children:this.hasSlotController.test("children")},h=this.vertical?"py-3":"py-2",p=H`<${t} part="base" class="${c("flex items-center cursor-pointer relative focus-visible:focus-outline group hover:bg-neutral-200 transition-colors duration-fast ease-in-out min-h-[48px]",{md:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",this.current&&"font-bold",!o&&"w-full",this.divider&&this.vertical&&"mt-0.25",!this.vertical&&"inline-flex items-center",!this.separated&&"hover:bg-neutral-200 group transition-colors duration-fast ease-in-out min-h-[48px]",n?"justify-center aspect-square p-3":"px-4")}" aria-current="${w(this.current?"page":void 0)}" aria-disabled="${this.disabled}" aria-labelledby="content" aria-describedby="description" ?disabled="${w(r?this.disabled:void 0)}" href="${w(e?this.href:void 0)}" target="${w(e?this.target:void 0)}" download="${w(e?this.download:void 0)}" rel="${w(e&&this.target?"noreferrer noopener":void 0)}" tabindex="${this.disabled?"-1":"0"}" @click="${this.separated?void 0:o?this.handleClickSummary:r?this.handleClickButton:void 0}"><div part="current-indicator" class="${c("absolute bg-accent left-0 pointer-events-none",this.vertical?"w-1 h-[calc(100%-16px)] top-2 group-hover:h-full group-hover:top-0":"h-1 w-[calc(100%-16px)] bottom-0 left-2 group-hover:w-full group-hover:left-0",this.disabled&&"bg-neutral-500")}"></div><div class="inline-flex flex-col justify-center gap-1 w-full h-full"><span part="content-area" class="${c("relative inline-flex justify-between items-center",o?"grow":"w-full",d.description&&"pt-3",!d.description&&!this.separated&&h,this.calculatePaddingX)}">${this.divider&&this.vertical?H`<sd-divider part="divider" class="${c("w-full transition-all absolute -top-0.25 left-0",this.calculatePaddingX)}"></sd-divider>`:""} <span id="content" part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline-flex text-start"></slot></span>${this.chevron||d.children&&this.vertical&&!this.separated?H`<sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("h-6 w-6 ml-2 transition-all",o?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${d.description&&this.vertical?H`<slot id="description" name="description" part="description" class="${c("inline-block text-sm text-left font-normal text-black pb-3",o||this.separated?"grow":"w-full",this.calculatePaddingX)}"></slot>`:""}</div></${t}>`;return this.separated?H`<div part="details" id="navigation-item-details" class="relative flex flex-col"><div class="flex items-start">${p} ${d.children&&this.vertical?H`<button type="button" title="${this.open?this.localize.term("collapseNavigationItem"):this.localize.term("expandNavigationItem")}" class="sd-interactive sd-interactive--reset -mt-1" @click="${this.handleClickSummary}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor" class="${c("m-4 h-6 w-6 transition-all",o||this.separated?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon></button>`:""}</div>${this.open?H`<slot name="children"></slot>`:""}</div>`:o?H`<details aria-expanded="${this.open}" part="details" id="navigation-item-details" ?open="${this.open}" class="relative">${p}<slot name="children"></slot></details>`:H`${p}`}};st.styles=[...f.styles,y`:host{box-sizing:border-box;display:inline-block;position:relative}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}[part=current-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([current]) [part=current-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,height var(--sd-duration-fast) ease-in-out,left var(--sd-duration-fast) ease-in-out,top var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],a([g('[part="base"]')],st.prototype,"button",2),a([g("slot:not([name])")],st.prototype,"defaultSlot",2),a([l({type:Boolean,reflect:!0})],st.prototype,"vertical",2),a([l({type:String,reflect:!0})],st.prototype,"size",2),a([l({reflect:!0})],st.prototype,"href",2),a([l({type:String,reflect:!0})],st.prototype,"target",2),a([l({reflect:!0})],st.prototype,"download",2),a([l({type:Boolean,reflect:!0})],st.prototype,"current",2),a([l({type:Boolean,reflect:!0})],st.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],st.prototype,"chevron",2),a([l({type:Boolean,reflect:!0})],st.prototype,"relaxed",2),a([l({type:Boolean,reflect:!0})],st.prototype,"divider",2),a([l({type:Boolean,reflect:!0})],st.prototype,"indented",2),a([l({type:Boolean,reflect:!0})],st.prototype,"open",2),a([l({type:Boolean,reflect:!0})],st.prototype,"separated",2),st=a([v("sd-navigation-item")],st);var yr={"top-right":null,"bottom-center":null},Wl=()=>{Object.entries(yr).forEach(([s])=>{let i=document.querySelector(`#sd-toast-stack--${s}`);if(i){i.setAttribute("role","region"),yr[s]=i;return}yr[s]=Object.assign(document.createElement("div"),{role:"region",id:`sd-toast-stack--${s}`,className:`sd-toast-stack sd-toast-stack--${s}`})})};Wl();var pt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.variant="info";this.open=!1;this.closable=!1;this.duration=1/0;this.durationIndicator=!1;this.toastStack="top-right";this.remainingDuration=this.duration;this.startTime=Date.now()}get stack(){return yr[this.toastStack]}connectedCallback(){super.connectedCallback(),this.stack.parentElement||(document.body.append(this.stack),this.stack.ariaLabel=this.localize.term("notifications"))}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.wrapper.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>this.hide(),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout(()=>{this.hide()},this.remainingDuration))}handleCloseClick(){this.hide()}handleKeyDown(t){this.closable&&t.key==="Escape"&&this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await Promise.all([R(this.base),R(this.wrapper)]),this.wrapper.hidden=!1;let t=F(this,"notification.show",{dir:this.localize.dir()}),e=F(this,`notification.wrapper.show${ai(qr(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([B(this.base,fe(t.keyframes,this.base.scrollHeight),t.options),B(this.wrapper,e.keyframes,e.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await Promise.all([R(this.base),R(this.wrapper)]);let t=F(this,"notification.hide",{dir:this.localize.dir()}),e=F(this,`notification.wrapper.hide${ai(qr(this.toastStack))}`,{dir:this.localize.dir()});await Promise.all([B(this.base,fe(t.keyframes,this.base.scrollHeight),t.options),B(this.wrapper,e.keyframes,e.options)]),this.wrapper.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,X(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,X(this,"sd-after-hide")}async toast(){return new Promise(t=>{this.stack.parentElement===null&&document.body.append(this.stack),this.stack.appendChild(this),requestAnimationFrame(()=>{this.clientWidth,this.show()}),this.addEventListener("sd-after-hide",()=>{this.stack.removeChild(this),t()},{once:!0})})}render(){return u`<div part="base" class="${c("w-full flex items-stretch m-2 focus-visible:focus-outline")}" id="notification" tabindex="0" role="alert" aria-labelledby="message" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}" @keydown="${this.handleKeyDown}"><div part="wrapper" class="${c("w-full h-fit overflow-hidden flex items-stretch relative")}"><slot name="icon" part="icon" class="${c("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="_internal" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${c("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot id="message" part="message" class="block w-full pl-3 py-2"></slot>${this.closable?u`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" @click="${this.handleCloseClick}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?u`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${c("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute border border-neutral-400"></div>`:""}</div></div>`}};pt.styles=[...f.styles,y`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],a([g('[part~="base"]')],pt.prototype,"base",2),a([g('[part~="wrapper"]')],pt.prototype,"wrapper",2),a([g('[part~="close-button"]')],pt.prototype,"close",2),a([l({type:String,reflect:!0})],pt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],pt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],pt.prototype,"closable",2),a([l({type:Number,reflect:!0})],pt.prototype,"duration",2),a([l({type:Boolean,reflect:!0,attribute:"duration-indicator"})],pt.prototype,"durationIndicator",2),a([l({type:String,reflect:!0,attribute:"toast-stack"})],pt.prototype,"toastStack",2),a([x("open",{waitUntilFirstUpdate:!0})],pt.prototype,"handleOpenChange",1),a([x("duration")],pt.prototype,"handleDurationChange",1),pt=a([v("sd-notification")],pt);_("notification.show",{keyframes:[{opacity:0,height:0},{opacity:1,height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("notification.hide",{keyframes:[{opacity:1,height:"auto"},{opacity:0,height:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("notification.wrapper.showTopRight",{keyframes:[{bottom:"32px"},{bottom:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("notification.wrapper.hideTopRight",{keyframes:[{bottom:"0"},{bottom:"32px"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Nt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.disabled=!1;this.label=""}handleDisableOptions(){let{disabled:t}=this;this.defaultSlot.assignedElements().filter(e=>e.tagName.toLowerCase()==="sd-option").forEach(e=>{e.disabled=t})}handleDisabledChange(){this.handleDisableOptions()}render(){let{disabled:t}=this;return H`<div role="${t?"presentation":"group"}" class="${c(this.disabled?"text-neutral-500":"")}" part="base" aria-labelledby="group-label"><sd-divider id="divider" class="pt-2 pb-4" part="divider"></sd-divider><div part="label-container" class="${c(this.disabled?"text-neutral-500":"text-black")} px-4 font-bold text-left" role="presentation" id="group-label"><slot name="label"><span>${this.label}</span></slot></div><div role="listbox" part="options" aria-label="${this.localize.term("optionGroup")}"><slot @slotchange="${this.handleDisableOptions}"></slot></div></div>`}};Nt.styles=[...f.styles,y`:host{--display-divider:block}#divider{display:var(--display-divider)}`],a([g("slot:not([name])")],Nt.prototype,"defaultSlot",2),a([l({reflect:!0,type:Boolean})],Nt.prototype,"disabled",2),a([l({type:String,reflect:!0})],Nt.prototype,"label",2),a([x("disabled",{waitUntilFirstUpdate:!0})],Nt.prototype,"handleDisabledChange",1),Nt=a([v("sd-optgroup")],Nt);var dt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"default","left","right");this.current=!1;this.selected=!1;this.hasHover=!1;this.isKeyboardFocus=!1;this.size="lg";this.checkbox=!1;this.disabled=!1;this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel=="undefined"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){var t;return((t=this.textContent)!=null?t:"").trim()}render(){let t={default:this.hasSlotController.test("default"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")};return u`<div part="base" class="${c("px-4 flex items-center w-full transition-colors duration-fast ease-in-out text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-700 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.isKeyboardFocus?"focus-outline focus-outline-offset":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${c("absolute w-full left-0 top-0 pointer-events-none transition-[height,top] duration-fast ease-in-out border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?u`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"bg-white border-neutral-800")}">${this.selected?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""}</span>`:""} ${t.left?u`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${t.right?u`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};dt.styles=[...f.styles,y`:host{display:block;outline:2px solid transparent!important;outline-offset:2px!important;position:relative;width:100%}.focus-outline-offset{outline-offset:-2px}`],a([g('[part="base"]')],dt.prototype,"defaultSlot",2),a([E()],dt.prototype,"current",2),a([E()],dt.prototype,"selected",2),a([E()],dt.prototype,"hasHover",2),a([E()],dt.prototype,"isKeyboardFocus",2),a([l({type:String,reflect:!0})],dt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"checkbox",2),a([l({type:Boolean,reflect:!0})],dt.prototype,"disabled",2),a([l({type:String,reflect:!0})],dt.prototype,"value",2),a([x("disabled")],dt.prototype,"handleDisabledChange",1),a([x("selected")],dt.prototype,"handleSelectedChange",1),a([x("value")],dt.prototype,"handleValueChange",1),dt=a([v("sd-option")],dt);var xe=class extends bt{constructor(){super(...arguments);this.expandable=!1}render(){let t=this.expandable?Q`details`:Q`div`,e=this.expandable?Q`summary`:Q`div`;return H`<${t} part="base" class="sm:p-6"><${e} part="header" id="header" class="${c("text-base font-bold items-center focus-visible:focus-outline text-primary relative group flex flex-row hover:bg-transparent gap-3 pb-3 pt-0 px-0 sm:flex-col sm:gap-4 sm:pb-8",this.expandable&&"cursor-pointer select-none")}" role="${w(this.expandable?"button":void 0)}" aria-expanded="${w(this.expandable?this.open?"true":"false":void 0)}" aria-controls="${w(this.expandable?"content":void 0)}" tabindex="${this.expandable?"0":"-1"}" @click="${this.expandable?this.handleSummaryClick:null}" @keydown="${this.expandable?this.handleSummaryKeyDown:null}"><div part="icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto items-center",!this.expandable&&"cursor-default")}"><slot name="icon"></slot></div><slot name="summary" part="summary" class="${c("flex flex-auto items-start text-left text-base leading-normal font-normal sm:leading-tight sm:text-3xl sm:text-center",this.expandable?"text-primary":"text-black cursor-default")}">${this.summary}</slot><span part="summary-icon" class="${c("flex flex-grow-0 flex-shrink-0 flex-auto self-start sm:self-center transition-transform ease-in-out duration-medium text-xl sm:text-4xl sm:mt-2",this.open&&"rotate-180",!this.expandable&&"hidden")}"><slot name="expand-icon" class="${c(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot><slot name="collapse-icon" class="${c(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="group-hover:text-primary-500 transition-colors ease-in-out duration-medium"></sd-icon></slot></span></${e}><div part="content" id="content" class="${c("overflow-hidden",!this.expandable&&"hidden")}"><slot part="content__slot" class="block" role="region" aria-labelledby="header"></slot></div></${t}>`}};xe.styles=[...bt.styles,y`:host{display:block}@media (min-width:640px){[part=summary-icon]{font-size:var(--sd-spacing-12,3rem)}}[part=icon]{font-size:var(--sd-spacing-12,3rem)}@media (min-width:640px){[part=icon]{font-size:var(--sd-spacing-24,6rem)}}`],a([l({type:Boolean,reflect:!0})],xe.prototype,"expandable",2),xe=a([v("sd-quickfact")],xe);_("quickfact.show",{keyframes:[{height:"0"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});_("quickfact.hide",{keyframes:[{height:"auto"},{height:"0"}],options:{duration:"var(--sd-duration-medium, 300ms)",easing:"ease-in-out"}});var ut=class extends f{constructor(){super(...arguments);this.checked=!1;this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.invalid=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){!this.disabled&&!this.visuallyDisabled&&(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled||this.visuallyDisabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return u`<span part="base" class="${c("sd-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"small-size text-sm",md:"text-base",lg:"text-base"}[this.size])}"><span part="${`${this.checked?"control--checked":"control--unchecked"}`}" class="${c("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4 duration-fast ease-in-out",this.disabled||this.visuallyDisabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span part="checked" class="${c("rounded-full inline-flex text-white bg-accent h-2.5 w-2.5 transition-[transform, colors] duration-medium ease-in-out",this.checked?"scale-100":"scale-0",this.disabled?"bg-neutral-500":this.visuallyDisabled?"bg-white":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span></span><slot part="label" class="${c("ml-2 select-none inline-block",this.disabled||this.visuallyDisabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};ut.styles=[...f.styles,y`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],a([E()],ut.prototype,"checked",2),a([E()],ut.prototype,"hasFocus",2),a([l({type:String,reflect:!0})],ut.prototype,"size",2),a([l({type:Boolean,reflect:!0})],ut.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],ut.prototype,"visuallyDisabled",2),a([l()],ut.prototype,"value",2),a([l({type:Boolean,reflect:!0})],ut.prototype,"invalid",2),a([x("checked")],ut.prototype,"handleCheckedChange",1),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],ut.prototype,"handleDisabledChange",1),ut=a([v("sd-radio")],ut);var vt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"[default]","icon");this.hasFocus=!1;this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled||this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){let t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),r=`${this.size}-${t?"label":"no-label"}`;return u`<div part="base" role="presentation" class="relative"><button part="${`button${this.checked?" button--checked":""}`}" role="radio" aria-checked="${this.checked}" class="${c("relative text-center rounded-full transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline",this.size==="sm"?"text-sm":"text-base",this.checked&&!this.disabled&&!this.visuallyDisabled?"bg-primary text-white hover:bg-primary-500":!this.checked&&(this.disabled||this.visuallyDisabled)?"text-neutral-500 hover:cursor-not-allowed":this.checked&&(this.disabled||this.visuallyDisabled)?"bg-neutral-400 text-white hover:cursor-not-allowed ":"bg-transparent text-primary border-primary hover:text-primary-500 cursor-pointer",t&&{sm:"px-3",md:"px-4",lg:"px-5"}[this.size],this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",r)}" aria-disabled="${this.disabled||this.visuallyDisabled}" type="button" value="${w(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${c(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?u`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};vt.styles=[...f.styles,y`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;inset:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);outline-color:rgb(var(--sd-color-error,204 25 55)/1);outline-style:dotted;outline-width:1px;position:absolute;z-index:-10}.lg-label,.lg-no-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{padding-left:var(--sd-spacing-5,1.25rem);padding-right:var(--sd-spacing-5,1.25rem)}.md-label,.md-no-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{padding-left:var(--sd-spacing-4,1rem);padding-right:var(--sd-spacing-4,1rem)}.sm-label,.sm-no-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{padding-left:var(--sd-spacing-3,.75rem);padding-right:var(--sd-spacing-3,.75rem)}:host([size=lg].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-3,.75rem)*-1)}:host([size=md].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-2,.5rem)*-1)}:host([size=sm].sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:calc(var(--sd-spacing-1,.25rem)*-1)}:host(.sd-button-group__button--hover){z-index:20}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:10}`],a([g(".button")],vt.prototype,"input",2),a([g(".hidden-input")],vt.prototype,"hiddenInput",2),a([E()],vt.prototype,"hasFocus",2),a([l({type:String,reflect:!0})],vt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],vt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],vt.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],vt.prototype,"checked",2),a([l()],vt.prototype,"value",2),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],vt.prototype,"handleDisabledChange",1),vt=a([v("sd-radio-button")],vt);var ke=class extends f{constructor(){super(...arguments);this.disableRole=!1;this.label=""}handleFocus(t){let e=Di(t.target);e==null||e.classList.add("sd-button-group__button--focus")}handleBlur(t){let e=Di(t.target);e==null||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){let e=Di(t.target);e==null||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){let e=Di(t.target);e==null||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){let t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach(e=>{let r=t.indexOf(e),o=Di(e);o!==null&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",r===0),o.classList.toggle("sd-button-group__button--inner",r>0&&r<t.length-1),o.classList.toggle("sd-button-group__button--last",r===t.length-1),o.classList.toggle("sd-button-group__button--radio",o.tagName.toLowerCase()==="sd-radio-button"))})}render(){return u`<slot part="base" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};ke.styles=[...f.styles,y`:host{display:inline-block}[part=base]{display:flex;flex-wrap:nowrap}`],a([g("slot")],ke.prototype,"defaultSlot",2),a([E()],ke.prototype,"disableRole",2),a([l({type:String,reflect:!0})],ke.prototype,"label",2),ke=a([v("sd-button-group")],ke);function Di(s){var t;let i="sd-button, sd-radio-button";return(t=s.closest(i))!=null?t:s.querySelector(i)}var W=class extends f{constructor(){super(...arguments);this.formControlController=new lt(this);this.hasSlotController=new A(this,"label","error-text");this.customValidityMessage="";this.hasButtonGroup=!1;this.defaultValue="";this.showInvalidStyle=!1;this.size="lg";this.required=!1;this.orientation="vertical";this.label="";this.helpText="";this.boldLabel=!1;this.name="option";this.value="";this.form=""}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?Ys:t?Xs:si}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){let e=t.target.closest("sd-radio, sd-radio-button"),r=this.getAllRadios(),o=this.value;e.disabled||(this.value=e.value,r.forEach(n=>n.checked=n===e),this.value!==o&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){var h;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let e=this.getAllRadios().filter(p=>!p.disabled),r=(h=e.find(p=>p.checked))!=null?h:e[0],o=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,n=this.value,d=e.indexOf(r)+o;d<0&&(d=e.length-1),d>e.length-1&&(d=0),this.getAllRadios().forEach(p=>{p.checked=!1,this.hasButtonGroup||(p.tabIndex=-1)}),this.value=e[d].value,e[d].checked=!0,this.hasButtonGroup?e[d].shadowRoot.querySelector("button").focus():(e[d].tabIndex=0,e[d].focus()),this.value!==n&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){let t=this.getAllRadios(),r=t.find(o=>o.checked)||t[0];r&&r.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var e,r;let t=this.getAllRadios();if(await Promise.all(t.map(async o=>{await o.updateComplete,o.checked=o.value===this.value,o.size=this.size,o instanceof ut&&(o.invalid=this.showInvalidStyle)})),this.hasButtonGroup=t.some(o=>o.tagName.toLowerCase()==="sd-radio-button"),!t.some(o=>o.checked))if(this.hasButtonGroup){let o=(e=t[0].shadowRoot)==null?void 0:e.querySelector("button");o&&(o.tabIndex=0)}else t[0].tabIndex=0;if(this.hasButtonGroup){let o=(r=this.shadowRoot)==null?void 0:r.querySelector("sd-button-group");o&&(o.disableRole=!0)}}syncRadios(){if(customElements.get("sd-radio")&&customElements.get("sd-radio-button")){this.syncRadioElements();return}customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then(()=>this.syncRadios()),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(e=>e.checked=e.value===this.value),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){let t=this.required&&!this.value,e=this.customValidityMessage!=="";return t||e?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:!!r,n=this.hasSlotController.test("tooltip"),d=u`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return u`<fieldset part="form-control" class="${c("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="radiogroup" aria-describedby="invalid-message" aria-labelledby="label">${e||n?u`<div class="flex items-center gap-1 mb-2"><legend part="form-control-label" id="label" class="${c("p-0 leading-normal text-black text-left",e?"inline-block":"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></legend>${n?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" aria-labelledby="label" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?u`<sd-button-group class="border border-primary rounded-full" part="button-group" exportparts="base:button-group__base" role="presentation">${d}</sd-button-group>`:d}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>${this.formControlController.renderInvalidMessage()}`}};W.styles=[...f.styles,y`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label:after{content:" *"}:host:has(sd-button-group){display:inline-flex}`],a([g("slot:not([name])")],W.prototype,"defaultSlot",2),a([g("#validation-input")],W.prototype,"validationInput",2),a([g("#invalid-message")],W.prototype,"invalidMessage",2),a([E()],W.prototype,"hasButtonGroup",2),a([E()],W.prototype,"defaultValue",2),a([E()],W.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],W.prototype,"size",2),a([l({type:Boolean,reflect:!0})],W.prototype,"required",2),a([l({type:String,reflect:!0})],W.prototype,"orientation",2),a([l({type:String,reflect:!0})],W.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],W.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],W.prototype,"boldLabel",2),a([l({type:String,reflect:!0})],W.prototype,"name",2),a([l()],W.prototype,"value",2),a([l({type:String,reflect:!0})],W.prototype,"form",2),a([x("size",{waitUntilFirstUpdate:!0})],W.prototype,"handleSizeChange",1),a([x("showInvalidStyle",{waitUntilFirstUpdate:!0})],W.prototype,"handleInvalidChange",1),a([x("value")],W.prototype,"handleValueChange",1),W=a([v("sd-radio-group")],W);var _e=(s,i)=>s-i,hi=(s,i)=>{if(s.length!==i.length)return!0;let t=s.slice().sort(_e),e=i.slice().sort(_e);for(let r=0;r<t.length;r+=1)if(t[r]!==e[r])return!0;return!1},es=(s,i)=>{let t=s.getBoundingClientRect(),e=t.width;if(e<=0)return 0;let r=i;return r-=t.left,r<=0?0:r>=e?1:(r/=e,r)};var J=class extends f{constructor(){super();this.formControlController=new lt(this);this.hasSlotController=new A(this,"label","help-text");this.localize=new L(this);this.name="";this.label="";this.helpText="";this.min=0;this.max=100;this.step=1;this.disabled=!1;this.visuallyDisabled=!1;this.noTrackBar=!1;this.noTooltip=!1;this.defaultValue="";this._value=[0];this._rangeValues=new Map;this._lastChangeValue=[];this._hasFocus=!1;this.tooltipFormatter=this.localize.number.bind(this.localize)}set value(t){this._value=t?t.split(" ").map(Number).sort(_e):[]}get value(){return this._value.slice().sort(_e).join(" ")}set valueAsArray(t){let e=this._value;this._value=Array.isArray(t)?t.slice().sort(_e):t||[],hi(e,this._value)&&this.requestUpdate("value",e.join(" "))}get valueAsArray(){return[...this._value].sort(_e)}get rtl(){return this.localize.dir()==="rtl"}firstUpdated(){this.formControlController.updateValidity(),this._lastChangeValue=Array.from(this._value)}willUpdate(t){super.willUpdate(t),this.min>this.max&&([this.min,this.max]=[this.max,this.min]),this.step>this.max-this.min&&(this.step=this.max-this.min),this.step<=0&&(this.step=1);let e=this._value.map(r=>{if(r<=this.min)return this.min;if(r>=this.max)return this.max;let o=this.min+this.step*Math.round((r-this.min)/this.step);return o>this.max?this.max:o});hi(this._value,e)&&(this._value=e)}updated(t){super.updated(t);for(let e of this.thumbs){let r=+e.dataset.rangeId;this._rangeValues.has(r)&&this.moveThumb(e,this._rangeValues.get(r))}this.updateActiveTrack()}focus(t){let e=this.thumbs.item(0);e?e.focus(t):super.focus(t)}get validity(){return this.input.validity}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}updateTooltip(t){let e=+t.dataset.rangeId;if(!this._rangeValues.has(e))return;let r=this._rangeValues.get(e),o=t.parentElement;o.content=this.tooltipFormatter(r)}updateActiveTrack(){let{activeTrack:t}=this;if(!t)return;if(this.min===this.max){t.style.insetInlineStart="0%",t.style.insetInlineEnd="0%";return}if(this._value.length===1){let n=getComputedStyle(this).getPropertyValue("--track-active-offset")||"0%",d=100*(this._value[0]-this.min)/(this.max-this.min);t.style.insetInlineStart=`min(${n}, ${d}%)`,t.style.insetInlineEnd=`min(calc(100% - ${n}), calc(100% - ${d}%))`;return}let e=this._value.slice().sort(_e),r=100*(e[0]-this.min)/(this.max-this.min),o=100*(e[e.length-1]-this.min)/(this.max-this.min);t.style.insetInlineStart=`${r}%`,t.style.insetInlineEnd=`calc(100% - ${o}%)`}moveThumb(t,e){t.setAttribute("aria-valuenow",e.toString()),t.setAttribute("aria-valuetext",this.tooltipFormatter(e));let r=(e-this.min)/(this.max-this.min);t.style.insetInlineStart=`calc(${100*r}% - 8px)`,this.updateTooltip(t)}movementBoundariesForThumb(t,e){let r=this.valueAsArray,n=Array.from(this.thumbs).indexOf(t),d=r[n-1]||this.min,h=r[n+1]||this.max,p=e<d||e>h;return{finalValue:Math.max(d,Math.min(h,e)),isRestricted:p,nextValue:h,prevValue:d}}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}onClickTrack(t,e=!0){if(this.disabled||this.visuallyDisabled)return;let{clientX:r}=t,o=Array.from(this.thumbs),n=es(this.inputWrapper,r),d=this.step/(this.max-this.min),h=this.min+this.step*Math.round(n/d),p=o.reduce((k,$)=>{let z=this._rangeValues.get(+$.dataset.rangeId),S=this._rangeValues.get(+k.dataset.rangeId),D=Math.abs(z-h),V=Math.abs(S-h);return D===V?z<h?$:k:D<V?$:k}),m=+p.dataset.rangeId;if(!m)return;this._rangeValues.set(m,h),this.moveThumb(p,h);let b=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),hi(b,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change"));let C=new PointerEvent("pointerdown",t);e&&p.dispatchEvent(C)&&this.updateTooltip(p)}onClickTrackItem(t){this.onClickTrack(t,!1)}async onClickThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target;this.updateTooltip(e),e.dataset.pointerId&&e.releasePointerCapture(+e.dataset.pointerId),e.dataset.pointerId=t.pointerId.toString(),e.setPointerCapture(t.pointerId),e.classList.add("grabbed"),await e.parentElement.show()}onDragThumb(t){if(this.disabled||this.visuallyDisabled)return;let e=t.target,r=+e.dataset.rangeId;if(!this._rangeValues.has(r)||(e.dataset.pointerId?+e.dataset.pointerId:null)!==t.pointerId)return;let n=es(this.inputWrapper,t.clientX),d=this.step/(this.max-this.min),h=this.min+this.step*Math.round(n/d);if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:h}}).defaultPrevented)return;let m=this.movementBoundariesForThumb(e,h);m.isRestricted?(h=m.finalValue,e.style.zIndex=(3+this.thumbs.length).toFixed(0)):e.style.zIndex="3",this._rangeValues.set(r,h),this.moveThumb(e,h);let b=this._value;this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),hi(b,this._value)&&this.emit("sd-input")}async onReleaseThumb(t){let e=t.target;!e.dataset.pointerId||t.pointerId!==+e.dataset.pointerId||(e.classList.remove("grabbed"),e.releasePointerCapture(t.pointerId),delete e.dataset.pointerId,hi(this._lastChangeValue,this._value)&&(this._lastChangeValue=Array.from(this._value),this.emit("sd-change")),await e.parentElement.hide())}onKeyPress(t){let e=t.target,r=+e.dataset.rangeId,o=this._rangeValues.get(r);if(o===void 0)return;let n=o;switch(t.key){case"ArrowUp":case"Up":n=Math.min(o+this.step,this.max);break;case"ArrowDown":case"Down":n=Math.max(o-this.step,this.min);break;case"ArrowLeft":case"Left":n=this.rtl?Math.min(o+this.step,this.max):Math.max(o-this.step,this.min);break;case"ArrowRight":case"Right":n=this.rtl?Math.max(o-this.step,this.min):Math.min(o+this.step,this.max);break;case"PageUp":n=Math.min(o+(this.max-this.min)/5,this.max);break;case"PageDown":n=Math.max(o-(this.max-this.min)/5,this.min);break;case"Home":n=this.min;break;case"End":n=this.max;break;default:return}if(n!==o){if(this.emit("sd-move",{cancelable:!0,detail:{element:e,value:n}}).defaultPrevented)return;let h=this.movementBoundariesForThumb(e,n);h.isRestricted&&(n=h.finalValue),this.moveThumb(e,n),this._rangeValues.set(r,n),this._value=Array.from(this._rangeValues.values()),this.updateActiveTrack(),this.updateTooltip(e),this._lastChangeValue=Array.from(this._value),this.emit("sd-input"),this.emit("sd-change")}t.preventDefault()}onBlur(t){var e;t.relatedTarget&&((e=this.shadowRoot)!=null&&e.contains(t.relatedTarget))||(this.emit("sd-blur"),this._hasFocus=!1)}onFocusThumb(t){var r;if(this.disabled||this.visuallyDisabled)return;this._hasFocus||(this._hasFocus=!0,this.emit("sd-focus"));let e=t.target;(r=e==null?void 0:e.dataset)!=null&&r.rangeId&&this.updateTooltip(e)}renderThumbs(t){let e=this._value.length>1;return this._rangeValues.clear(),this._value.map((r,o)=>{let n=o+1;this._rangeValues.set(n,r);let d=`thumb-${n}`,h="",p="";return e?(p=t?`label aria-label-hidden ${d}`:`aria-label-hidden ${d}`,o===0?h=`${this.localize.term("minimum")} (${this.tooltipFormatter(r)})`:o===this._value.length-1?h=`${this.localize.term("maximum")} (${this.tooltipFormatter(r)})`:h=this.tooltipFormatter(r)):p=t?"label aria-label-hidden":"",u`<sd-tooltip hoist trigger="focus" disabled="${w(this.disabled||this.visuallyDisabled||this.noTooltip?!0:void 0)}"><div id="${d}" part="thumb" role="slider" tabindex="${this.disabled||this.visuallyDisabled?-1:0}" aria-disabled="${w(this.disabled||this.visuallyDisabled?"true":void 0)}" aria-labelledby="${p}" aria-label="${h}" aria-valuemax="${this.max}" aria-valuemin="${this.min}" aria-valuenow="${r}" aria-valuetext="${this.tooltipFormatter(r)}" data-range-id="${n}" @pointerdown="${this.onClickThumb}" @pointermove="${this.onDragThumb}" @pointerup="${this.onReleaseThumb}" @pointercancel="${this.onReleaseThumb}" @pointerleave="${this.onReleaseThumb}" @keydown="${this.onKeyPress}" @focus="${this.onFocusThumb}" class="${c("rounded-full absolute top-0 size-4 hover:cursor-grab after:-inset-2",this.disabled||this.visuallyDisabled?"bg-neutral-500 outline-none":"bg-primary hover:bg-primary-500 cursor-pointer focus-visible:focus-outline")}"></div></sd-tooltip>`})}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text")},e=!!(this.label||t.label),r=!!(this.helpText||t.helpText);return u`<div part="form-control" @focusout="${this.onBlur}" class="flex flex-col">${e?u`<div class="flex items-center gap-1"><label id="label" part="form-control-label" aria-hidden="${e?"false":"true"}" class="${c("w-full",e?"inline-block":"hidden")}" @click="${this.focus}"><slot name="label">${this.label}</slot></label></div>`:null} <label id="aria-label-hidden" class="sr-only">(${this._value.map(this.tooltipFormatter).join(" - ")})</label><div part="base" class="${c("inline-flex w-full",this.visuallyDisabled&&"focus-visible:focus-outline")}" tabindex="${w(this.visuallyDisabled?"0":void 0)}"><div part="input-wrapper" class="relative flex-1 mx-2 mb-[10px]"><input id="input" tabindex="-1" hidden @invalid="${this.handleInvalid}"><div part="track-wrapper" role="presentation" @pointerdown="${this.onClickTrack}" class="relative cursor-pointer -mx-2"><div part="track-click-helper" class="absolute -inset-y-2 inset-x-0"></div><div part="track" class="${c("h-1 my-[6px]",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-neutral-400")}"></div><div part="active-track" hidden="${w(this.noTrackBar?!0:void 0)}" class="${c("absolute top-0 h-1",this.disabled||this.visuallyDisabled?"bg-neutral-500":"bg-primary")}"></div></div>${this.renderThumbs(e)}<div class="-mt-[10px]" part="scale-ticks" @pointerdown="${this.onClickTrackItem}" role="presentation"><slot name="scale-ticks"></slot></div></div></div><slot></slot><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>`}};J.styles=[...f.styles,y`[part=base]{touch-action:none;-webkit-touch-callout:none}[part=thumb].grabbed{--tw-bg-opacity:1!important;background-color:rgb(var(--sd-color-primary-800,5 21 48)/var(--tw-bg-opacity,1))!important}`],a([g("#input")],J.prototype,"input",2),a([g('[part="active-track"]')],J.prototype,"activeTrack",2),a([g('[part="input-wrapper"]')],J.prototype,"inputWrapper",2),a([Wi('[part="thumb"]')],J.prototype,"thumbs",2),a([l({attribute:!1})],J.prototype,"tooltipFormatter",2),a([l({type:String,reflect:!0})],J.prototype,"name",2),a([l({type:String,reflect:!0})],J.prototype,"label",2),a([l({attribute:"help-text",reflect:!0})],J.prototype,"helpText",2),a([l({type:Number,reflect:!0})],J.prototype,"min",2),a([l({type:Number,reflect:!0})],J.prototype,"max",2),a([l({type:Number,reflect:!0})],J.prototype,"step",2),a([l({type:Boolean,reflect:!0})],J.prototype,"disabled",2),a([l({attribute:"visually-disabled",type:Boolean,reflect:!0})],J.prototype,"visuallyDisabled",2),a([l({attribute:"no-track-bar",type:Boolean,reflect:!0})],J.prototype,"noTrackBar",2),a([l({attribute:"no-tooltip",type:Boolean,reflect:!0})],J.prototype,"noTooltip",2),a([Mt()],J.prototype,"defaultValue",2),a([l({type:String})],J.prototype,"value",1),J=a([v("sd-range")],J);var Ce=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.subtick=!1}render(){return u`<div part="base" class="${c(this.subtick?"w-0.25":"w-0.5")}"><div part="line" class="${c("bg-neutral-500",this.subtick?"h-2":"h-[10px]")}"></div><div part="label" class="flex items-center justify-center text-center text-nowrap text-sm"><slot></slot></div></div>`}};Ce.styles=f.styles,a([l({type:Boolean,reflect:!0})],Ce.prototype,"subtick",2),Ce=a([v("sd-range-tick")],Ce);var at=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.orientation="horizontal";this.scrollbars=!1;this.buttons=!1;this.shadows=!1;this.inset=!1;this.step=150;this.canScroll={left:!1,right:!1,up:!1,down:!1};this.isScrollHorizontalEnabled=!1;this.isScrollVerticalEnabled=!1}connectedCallback(){super.connectedCallback(),this.updateScrollEnabledFlags(),this.resizeObserver=new ResizeObserver(()=>{this.handleContainerScroll()}),this.updateComplete.then(()=>{this.container&&this.resizeObserver.observe(this.container)})}disconnectedCallback(){super.disconnectedCallback(),this.container&&this.resizeObserver.unobserve(this.container)}updated(t){super.updated(t),(t.has("orientation")||t.has("buttons")||t.has("shadows"))&&(this.updateScrollEnabledFlags(),this.handleContainerScroll())}updateScrollEnabledFlags(){let t=this.orientation;this.isScrollHorizontalEnabled=t==="horizontal"||t==="auto",this.isScrollVerticalEnabled=t==="vertical"||t==="auto"}get scrollButtons(){return{left:this.leftButton,right:this.rightButton,up:this.upButton,down:this.downButton}}handleContainerScroll(){if(!this.container)return;let t=this.container.scrollLeft>0,e=this.container.scrollLeft+this.container.clientWidth<this.container.scrollWidth-1,r=this.container.scrollTop>0,o=this.container.scrollTop+this.container.clientHeight<this.container.scrollHeight-1,n=this.canScroll,d={left:this.isScrollHorizontalEnabled&&t,right:this.isScrollHorizontalEnabled&&e,up:this.isScrollVerticalEnabled&&r,down:this.isScrollVerticalEnabled&&o},h=n.left&&!d.left,p=n.up&&!d.up,m=n.right&&!d.right,b=n.down&&!d.down;(h||p)&&this.dispatchEvent(new CustomEvent("start")),(m||b)&&this.dispatchEvent(new CustomEvent("end")),this.canScroll=d}handleScroll(t,e){var V,U,Z;let r=["left","up"].includes(t)?-this.step:this.step,o=["left","right"].includes(t)?"horizontal":"vertical",n=["left","up"].includes(t)?"start":"end",d=!["mouse","touch"].includes((V=e==null?void 0:e.pointerType)!=null?V:""),h=o==="horizontal"?"left":"top";(U=this.container)==null||U.scrollBy({behavior:"smooth",[h]:r});let p=`button-${t}`;this.dispatchEvent(new CustomEvent(p,{bubbles:!0,composed:!0}));let b=(o==="horizontal"?this.container.scrollLeft:this.container.scrollTop)+r,C=o==="horizontal"?this.container.scrollWidth-this.container.clientWidth:this.container.scrollHeight-this.container.clientHeight,k=n==="start"&&b<=0,$=n==="end"&&b>=C-1;if(!(k||$)){let Y=this.localize.term("scrolled");this.announcementContainer.textContent=this.announcementContainer.textContent===Y?`${Y}\u200B`:Y;return}let z=this.scrollButtons[t],S={left:this.rightButton,right:this.leftButton,up:this.downButton,down:this.upButton}[t],D=k?`${this.localize.term("scrolled")}. ${this.localize.term("scrollToEnd")}`:`${this.localize.term("scrolled")}. ${this.localize.term("scrollToStart")}`;(Z=S==null?void 0:S.querySelector("sd-icon"))==null||Z.setAttribute("label",D),d?S==null||S.focus():z==null||z.blur()}handleButtonBlur(t,e){var d;let o=(["left","up"].includes(t)?"start":"end")==="start"?this.localize.term("scrollToStart"):this.localize.term("scrollToEnd");(d=e.target.querySelector("sd-icon"))==null||d.setAttribute("label",o)}render(){let t="relative p-0 border-0 bg-transparent cursor-pointer w-5 h-5 flex items-center justify-center sd-interactive rounded-md flex text-lg",e="scroll-shadow absolute z-10 pointer-events-none transition-opacity duration-medium ease-in-out";return u`<div part="base" class="${c("scroll-container flex overflow-hidden flex-1",this.scrollbars?"show-scrollbars":"hide-scrollbars",this.inset&&"p-4",{horizontal:"scroll-horizontal flex-row whitespace-nowrap items-center overflow-x-scroll overflow-y-hidden",vertical:"scroll-vertical justify-items-center overflow-y-scroll overflow-x-hidden",auto:"scroll-auto overflow-auto"}[this.orientation])}" @scroll="${this.handleContainerScroll}" tabindex="0"><div id="announcement-container" role="status" class="sr-only"></div><div part="scroll-content" class="flex-1"><slot></slot></div></div>${this.buttons?u`${this.isScrollHorizontalEnabled?u`<div part="button-left" class="${c("absolute z-10 flex items-center justify-center top-0 left-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.left&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${c(t)}" aria-hidden="${w(!this.canScroll.left||void 0)}" tabindex="${w(this.canScroll.left?void 0:-1)}" @click="${r=>this.handleScroll("left",r)}" @blur="${r=>this.handleButtonBlur("left",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" class="rotate-[-90deg]" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-right" class="${c("absolute z-10 flex items-center justify-center top-0 right-0 h-full w-8 transition-opacity duration-medium ease-in-out",!this.canScroll.right&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${c(t)}" aria-hidden="${w(!this.canScroll.right||void 0)}" tabindex="${w(this.canScroll.right?void 0:-1)}" @click="${r=>this.handleScroll("right",r)}" @blur="${r=>this.handleButtonBlur("right",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" class="rotate-[-90deg]" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null} ${this.isScrollVerticalEnabled?u`<div part="button-top" class="${c("absolute z-10 flex items-center justify-center top-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.up&&"opacity-0 pointer-events-none")}"><button part="button-start" class="${c(t)}" aria-hidden="${w(!this.canScroll.up||void 0)}" tabindex="${w(this.canScroll.up?void 0:-1)}" @click="${r=>this.handleScroll("up",r)}" @blur="${r=>this.handleButtonBlur("up",r)}"><slot name="icon-start"><sd-icon library="_internal" name="chevron-up" label="${this.localize.term("scrollToStart")}"></sd-icon></slot></button></div><div part="button-bottom" class="${c("absolute z-10 flex items-center justify-center bottom-0 left-0 w-full h-8 transition-opacity duration-medium ease-in-out",!this.canScroll.down&&"opacity-0 pointer-events-none")}"><button part="button-end" class="${c(t)}" aria-hidden="${w(!this.canScroll.down||void 0)}" tabindex="${w(this.canScroll.down?void 0:-1)}" @click="${r=>this.handleScroll("down",r)}" @blur="${r=>this.handleButtonBlur("down",r)}"><slot name="icon-end"><sd-icon library="_internal" name="chevron-down" label="${this.localize.term("scrollToEnd")}"></sd-icon></slot></button></div>`:null}`:null} ${this.shadows?u`${this.isScrollHorizontalEnabled?u`<div part="shadow-left" class="${c("left top-0 left-0 w-[6px] h-full",e,this.canScroll.left?"opacity-100":"opacity-0")}"></div><div part="shadow-right" class="${c("right top-0 right-0 w-[6px] h-full",e,this.canScroll.right?"opacity-100":"opacity-0")}"></div>`:null} ${this.isScrollVerticalEnabled?u`<div part="shadow-top" class="${c("top top-0 left-0 w-full h-[6px]",e,this.canScroll.up?"opacity-100":"opacity-0")}"></div><div part="shadow-bottom" class="${c("bottom bottom-0 left-0 w-full h-[6px]",e,this.canScroll.down?"opacity-100":"opacity-0")}"></div>`:null}`:null}`}};at.styles=[...f.styles,y`:host{--gradient-color:hsla(0,0%,100%,0);--gradient:var(--gradient-color) 0%,#fff 80%,#fff 100%;display:flex;overflow:hidden;position:relative}.hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}.hide-scrollbars::-webkit-scrollbar{display:none}.scroll-container::-webkit-scrollbar-thumb{background-color:transparent}.scroll-container:hover::-webkit-scrollbar-thumb{background:var(--background-neutral-400,#c3c3c3);border-radius:var(--sd-border-radius-sm,.125rem)}.scroll-container::-webkit-scrollbar{height:var(--sd-spacing-1,.25rem);width:var(--sd-spacing-1,.25rem)}.scroll-auto{overflow:auto}[part=button-left]{background:linear-gradient(270deg,var(--gradient))}[part=button-right]{background:linear-gradient(90deg,var(--gradient))}[part=button-top]{background:linear-gradient(0deg,var(--gradient))}[part=button-bottom]{background:linear-gradient(180deg,var(--gradient))}[part=shadow-left]{background:linear-gradient(270deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-right]{background:linear-gradient(90deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-top]{background:linear-gradient(0deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}[part=shadow-bottom]{background:linear-gradient(180deg,hsla(0,0%,9%,0) 50%,hsla(0,0%,9%,.4))}.sd-icon--top{align-self:flex-start}.sd-icon--down{align-self:flex-end}`],a([g('[part="button-right"] button')],at.prototype,"rightButton",2),a([g('[part="button-left"] button')],at.prototype,"leftButton",2),a([g('[part="button-bottom"] button')],at.prototype,"downButton",2),a([g('[part="button-top"] button')],at.prototype,"upButton",2),a([g(".scroll-container")],at.prototype,"container",2),a([g("#announcement-container")],at.prototype,"announcementContainer",2),a([l({type:String,reflect:!0})],at.prototype,"orientation",2),a([l({type:Boolean,reflect:!0})],at.prototype,"scrollbars",2),a([l({type:Boolean,reflect:!0})],at.prototype,"buttons",2),a([l({type:Boolean,reflect:!0})],at.prototype,"shadows",2),a([l({type:Boolean,reflect:!0})],at.prototype,"inset",2),a([l({type:Number,reflect:!0})],at.prototype,"step",2),a([E()],at.prototype,"canScroll",2),a([E()],at.prototype,"isScrollHorizontalEnabled",2),a([E()],at.prototype,"isScrollVerticalEnabled",2),at=a([v("sd-scrollable")],at);var O=class extends f{constructor(){super(...arguments);this.formControlController=new lt(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new A(this,"help-text","label");this.localize=new L(this);this.typeToSelectString="";this.deletedTagLabel="";this.hasFocus=!1;this.selectedOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.defaultValue="";this.open=!1;this.size="lg";this.placement="bottom";this.label="";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.helpText="";this.currentPlacement=this.placement;this.clearable=!1;this.multiple=!1;this.useTags=!1;this.maxOptionsVisible=3;this.form="";this.name="";this.value="";this.required=!1;this.styleOnValid=!1;this.hoist=!1;this.getTag=t=>u`<sd-tag class="relative z-10" ?disabled="${this.disabled}" part="tag" exportparts="
139
139
  base:tag__base,
140
140
  content:tag__content,
141
141
  removable-indicator:tag__removable-indicator,