luxen-ui 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/README.md +1 -0
  2. package/bin/cli.mjs +16 -1
  3. package/cdn/custom-elements.json +402 -276
  4. package/cdn/elements/alert-dialog/alert-dialog.d.ts +3 -2
  5. package/cdn/elements/alert-dialog/alert-dialog.d.ts.map +1 -1
  6. package/cdn/elements/alert-dialog/alert-dialog.js.map +1 -1
  7. package/cdn/elements/avatar/avatar.js +1 -1
  8. package/cdn/elements/avatar/avatar.js.map +1 -1
  9. package/cdn/elements/carousel/carousel.js +1 -1
  10. package/cdn/elements/carousel/carousel.js.map +1 -1
  11. package/cdn/elements/combobox/combobox.d.ts.map +1 -1
  12. package/cdn/elements/combobox/combobox.js +2 -1
  13. package/cdn/elements/combobox/combobox.js.map +1 -1
  14. package/cdn/elements/dialog/dialog.d.ts +2 -1
  15. package/cdn/elements/dialog/dialog.d.ts.map +1 -1
  16. package/cdn/elements/dialog/dialog.js.map +1 -1
  17. package/cdn/elements/dialog/dialog.styles.js +1 -1
  18. package/cdn/elements/dialog/dialog.styles.js.map +1 -1
  19. package/cdn/elements/drawer/drawer.d.ts +7 -7
  20. package/cdn/elements/drawer/drawer.js +1 -1
  21. package/cdn/elements/drawer/drawer.js.map +1 -1
  22. package/cdn/elements/dropdown-item/dropdown-item.js +1 -1
  23. package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
  24. package/cdn/elements/input-otp/input-otp.d.ts +2 -2
  25. package/cdn/elements/input-otp/input-otp.js.map +1 -1
  26. package/cdn/elements/prose-editor/prose-editor.js +1 -1
  27. package/cdn/elements/prose-editor/prose-editor.js.map +1 -1
  28. package/cdn/elements/rating/rating.js +1 -1
  29. package/cdn/elements/rating/rating.js.map +1 -1
  30. package/cdn/elements/select/select.d.ts.map +1 -1
  31. package/cdn/elements/select/select.js +2 -1
  32. package/cdn/elements/select/select.js.map +1 -1
  33. package/cdn/elements/slider/slider.js +1 -1
  34. package/cdn/elements/slider/slider.js.map +1 -1
  35. package/cdn/elements/stories-viewer/stories-viewer.js +1 -1
  36. package/cdn/elements/stories-viewer/stories-viewer.js.map +1 -1
  37. package/cdn/elements/table/table.meta.d.ts +55 -0
  38. package/cdn/elements/table/table.meta.d.ts.map +1 -0
  39. package/cdn/elements/table/table.meta.js +0 -0
  40. package/cdn/elements/tag/tag.js +1 -1
  41. package/cdn/elements/tag/tag.js.map +1 -1
  42. package/cdn/elements/tree/tree.js +1 -1
  43. package/cdn/elements/tree/tree.js.map +1 -1
  44. package/cdn/elements/tree-item/tree-item.js +1 -1
  45. package/cdn/elements/tree-item/tree-item.js.map +1 -1
  46. package/cdn/shared/controllers/listbox-nav.d.ts +7 -0
  47. package/cdn/shared/controllers/listbox-nav.d.ts.map +1 -1
  48. package/cdn/shared/controllers/listbox-nav.js +1 -1
  49. package/cdn/shared/controllers/listbox-nav.js.map +1 -1
  50. package/cdn/shared/styles/button-core.styles.js +1 -1
  51. package/cdn/shared/styles/button-core.styles.js.map +1 -1
  52. package/cdn/shared/styles/checkbox-appearance.styles.js +1 -1
  53. package/cdn/shared/styles/checkbox-appearance.styles.js.map +1 -1
  54. package/cdn/shared/styles/picker-core.styles.js +1 -1
  55. package/cdn/shared/styles/picker-core.styles.js.map +1 -1
  56. package/cdn/standalone.css +284 -67
  57. package/cdn/standalone.js +38 -28
  58. package/cdn/standalone.js.map +1 -1
  59. package/cdn/styles/base.css +11 -0
  60. package/cdn/styles/elements/breadcrumb.css +2 -2
  61. package/cdn/styles/elements/button.css +2 -2
  62. package/cdn/styles/elements/checkbox.css +2 -2
  63. package/cdn/styles/elements/close-button/circle.css +2 -2
  64. package/cdn/styles/elements/close-button/ring.css +2 -2
  65. package/cdn/styles/elements/close-button/square.css +2 -2
  66. package/cdn/styles/elements/disclosure.css +1 -1
  67. package/cdn/styles/elements/input-otp.css +19 -3
  68. package/cdn/styles/elements/input-stepper/default.css +1 -1
  69. package/cdn/styles/elements/input-stepper/pill.css +1 -1
  70. package/cdn/styles/elements/input-stepper/rounded.css +1 -1
  71. package/cdn/styles/elements/input.css +11 -11
  72. package/cdn/styles/elements/prose-editor.css +6 -6
  73. package/cdn/styles/elements/radio-group.css +2 -2
  74. package/cdn/styles/elements/radio.css +2 -2
  75. package/cdn/styles/elements/segmented-control.css +1 -1
  76. package/cdn/styles/elements/select.css +5 -5
  77. package/cdn/styles/elements/story.css +2 -2
  78. package/cdn/styles/elements/switch.css +2 -2
  79. package/cdn/styles/elements/table.css +186 -0
  80. package/cdn/styles/elements/tabs/enclosed.css +3 -3
  81. package/cdn/styles/elements/tabs/line.css +3 -3
  82. package/cdn/styles/elements/textarea.css +5 -5
  83. package/cdn/styles/preset.css +19 -6
  84. package/cdn/styles/tokens/aliases.css +5 -3
  85. package/cdn/styles/tokens/forms.css +3 -3
  86. package/cdn/styles/tokens.css +8 -6
  87. package/dist/css/base.css +11 -0
  88. package/dist/css/elements/breadcrumb.css +2 -2
  89. package/dist/css/elements/button.css +2 -2
  90. package/dist/css/elements/checkbox.css +2 -2
  91. package/dist/css/elements/close-button/circle.css +2 -2
  92. package/dist/css/elements/close-button/ring.css +2 -2
  93. package/dist/css/elements/close-button/square.css +2 -2
  94. package/dist/css/elements/disclosure.css +1 -1
  95. package/dist/css/elements/input-otp.css +19 -3
  96. package/dist/css/elements/input-stepper/default.css +1 -1
  97. package/dist/css/elements/input-stepper/pill.css +1 -1
  98. package/dist/css/elements/input-stepper/rounded.css +1 -1
  99. package/dist/css/elements/input.css +11 -11
  100. package/dist/css/elements/prose-editor.css +6 -6
  101. package/dist/css/elements/radio-group.css +2 -2
  102. package/dist/css/elements/radio.css +2 -2
  103. package/dist/css/elements/segmented-control.css +1 -1
  104. package/dist/css/elements/select.css +5 -5
  105. package/dist/css/elements/story.css +2 -2
  106. package/dist/css/elements/switch.css +2 -2
  107. package/dist/css/elements/table.css +186 -0
  108. package/dist/css/elements/tabs/enclosed.css +3 -3
  109. package/dist/css/elements/tabs/line.css +3 -3
  110. package/dist/css/elements/textarea.css +5 -5
  111. package/dist/css/preset.css +19 -6
  112. package/dist/css/tokens/aliases.css +5 -3
  113. package/dist/css/tokens/forms.css +3 -3
  114. package/dist/css/tokens.css +8 -6
  115. package/dist/custom-elements.json +402 -276
  116. package/dist/elements/alert-dialog/alert-dialog.d.ts +3 -2
  117. package/dist/elements/alert-dialog/alert-dialog.d.ts.map +1 -1
  118. package/dist/elements/alert-dialog/alert-dialog.js +3 -2
  119. package/dist/elements/avatar/avatar.css +2 -2
  120. package/dist/elements/carousel/carousel.css +18 -0
  121. package/dist/elements/combobox/combobox.css +9 -0
  122. package/dist/elements/combobox/combobox.d.ts.map +1 -1
  123. package/dist/elements/combobox/combobox.js +1 -0
  124. package/dist/elements/dialog/dialog.css +12 -0
  125. package/dist/elements/dialog/dialog.d.ts +2 -1
  126. package/dist/elements/dialog/dialog.d.ts.map +1 -1
  127. package/dist/elements/dialog/dialog.js +2 -1
  128. package/dist/elements/drawer/drawer.css +11 -1
  129. package/dist/elements/drawer/drawer.d.ts +7 -7
  130. package/dist/elements/drawer/drawer.js +7 -7
  131. package/dist/elements/dropdown-item/dropdown-item.css +1 -1
  132. package/dist/elements/input-otp/input-otp.d.ts +2 -2
  133. package/dist/elements/input-otp/input-otp.js +2 -2
  134. package/dist/elements/prose-editor/prose-editor.css +5 -3
  135. package/dist/elements/rating/rating.css +9 -10
  136. package/dist/elements/select/select.css +10 -5
  137. package/dist/elements/select/select.d.ts.map +1 -1
  138. package/dist/elements/select/select.js +1 -0
  139. package/dist/elements/slider/slider.css +5 -1
  140. package/dist/elements/stories-viewer/stories-viewer.css +10 -2
  141. package/dist/elements/table/table.meta.d.ts +55 -0
  142. package/dist/elements/table/table.meta.d.ts.map +1 -0
  143. package/dist/elements/table/table.meta.js +65 -0
  144. package/dist/elements/tag/tag.css +3 -3
  145. package/dist/elements/tree/tree.css +3 -3
  146. package/dist/elements/tree-item/tree-item.css +5 -3
  147. package/dist/metadata/alert-dialog.json +90 -85
  148. package/dist/metadata/alert.json +22 -22
  149. package/dist/metadata/avatar.json +26 -26
  150. package/dist/metadata/badge.json +13 -13
  151. package/dist/metadata/breadcrumb.json +9 -9
  152. package/dist/metadata/button.json +40 -40
  153. package/dist/metadata/carousel.json +133 -133
  154. package/dist/metadata/checkbox.json +13 -13
  155. package/dist/metadata/close-button.json +15 -15
  156. package/dist/metadata/color-scheme-icon.json +13 -13
  157. package/dist/metadata/combobox.json +77 -94
  158. package/dist/metadata/dialog.json +49 -44
  159. package/dist/metadata/disclosure.json +17 -17
  160. package/dist/metadata/divider.json +12 -12
  161. package/dist/metadata/drawer.json +61 -61
  162. package/dist/metadata/dropdown-item.json +50 -50
  163. package/dist/metadata/dropdown.json +32 -32
  164. package/dist/metadata/form-field.json +15 -15
  165. package/dist/metadata/icon.json +8 -8
  166. package/dist/metadata/index.json +1761 -1765
  167. package/dist/metadata/input-group.json +5 -5
  168. package/dist/metadata/input-otp.json +17 -17
  169. package/dist/metadata/input-stepper.json +24 -24
  170. package/dist/metadata/input.json +31 -31
  171. package/dist/metadata/popover.json +49 -49
  172. package/dist/metadata/progress.json +15 -15
  173. package/dist/metadata/prose-editor.json +110 -116
  174. package/dist/metadata/radio.json +15 -15
  175. package/dist/metadata/rating.json +25 -47
  176. package/dist/metadata/segmented-control.json +24 -46
  177. package/dist/metadata/select.json +81 -98
  178. package/dist/metadata/skeleton.json +12 -12
  179. package/dist/metadata/slider.json +60 -78
  180. package/dist/metadata/spinner.json +5 -5
  181. package/dist/metadata/sticky-bar.json +13 -13
  182. package/dist/metadata/stories-viewer.json +105 -105
  183. package/dist/metadata/stories.json +17 -17
  184. package/dist/metadata/story.json +41 -41
  185. package/dist/metadata/switch.json +9 -9
  186. package/dist/metadata/table.json +88 -0
  187. package/dist/metadata/tabs.json +26 -26
  188. package/dist/metadata/tag.json +50 -50
  189. package/dist/metadata/textarea.json +28 -28
  190. package/dist/metadata/toast.json +16 -16
  191. package/dist/metadata/tooltip.json +49 -49
  192. package/dist/metadata/tree-item.json +73 -73
  193. package/dist/metadata/tree.json +39 -39
  194. package/dist/shared/controllers/listbox-nav.d.ts +7 -0
  195. package/dist/shared/controllers/listbox-nav.d.ts.map +1 -1
  196. package/dist/shared/controllers/listbox-nav.js +12 -0
  197. package/dist/shared/styles/button-core.css +2 -2
  198. package/dist/shared/styles/checkbox-appearance.css +2 -2
  199. package/dist/shared/styles/picker-core.css +13 -10
  200. package/dist/templates/elements/alert-dialog.md +19 -18
  201. package/dist/templates/elements/alert.md +4 -4
  202. package/dist/templates/elements/avatar.md +9 -9
  203. package/dist/templates/elements/badge.md +4 -4
  204. package/dist/templates/elements/breadcrumb.md +4 -4
  205. package/dist/templates/elements/button.md +8 -8
  206. package/dist/templates/elements/carousel.md +32 -32
  207. package/dist/templates/elements/checkbox.md +4 -4
  208. package/dist/templates/elements/close-button.md +2 -2
  209. package/dist/templates/elements/color-scheme-icon.md +13 -13
  210. package/dist/templates/elements/combobox.md +19 -19
  211. package/dist/templates/elements/dialog.md +11 -10
  212. package/dist/templates/elements/disclosure.md +3 -3
  213. package/dist/templates/elements/divider.md +2 -2
  214. package/dist/templates/elements/drawer.md +15 -15
  215. package/dist/templates/elements/dropdown.md +15 -15
  216. package/dist/templates/elements/form-field.md +3 -3
  217. package/dist/templates/elements/icon.md +1 -1
  218. package/dist/templates/elements/input-otp.md +5 -5
  219. package/dist/templates/elements/input-stepper.md +4 -4
  220. package/dist/templates/elements/input.md +15 -8
  221. package/dist/templates/elements/popover.md +8 -8
  222. package/dist/templates/elements/progress.md +3 -3
  223. package/dist/templates/elements/prose-editor.md +38 -39
  224. package/dist/templates/elements/radio.md +6 -6
  225. package/dist/templates/elements/rating.md +5 -13
  226. package/dist/templates/elements/segmented-control.md +4 -4
  227. package/dist/templates/elements/select.md +23 -23
  228. package/dist/templates/elements/skeleton.md +2 -2
  229. package/dist/templates/elements/slider.md +13 -13
  230. package/dist/templates/elements/spinner.md +1 -1
  231. package/dist/templates/elements/sticky-bar.md +2 -2
  232. package/dist/templates/elements/stories-viewer.md +29 -29
  233. package/dist/templates/elements/stories.md +4 -4
  234. package/dist/templates/elements/story.md +11 -11
  235. package/dist/templates/elements/switch.md +5 -5
  236. package/dist/templates/elements/table.md +210 -0
  237. package/dist/templates/elements/tabs.md +4 -4
  238. package/dist/templates/elements/tag.md +14 -14
  239. package/dist/templates/elements/textarea.md +8 -8
  240. package/dist/templates/elements/toast.md +4 -4
  241. package/dist/templates/elements/tooltip.md +9 -9
  242. package/dist/templates/elements/tree-item.md +18 -18
  243. package/dist/templates/elements/tree.md +13 -13
  244. package/dist/templates/foundations/focus.md +303 -0
  245. package/elements.json +9 -0
  246. package/package.json +1 -1
  247. package/postcss-plugin-prefix.js +2 -2
  248. package/templates/SKILL.md.tpl +1 -0
  249. package/templates/choosing-elements.md.tpl +1 -0
@@ -49,8 +49,9 @@ export declare class CancelEvent extends Event {
49
49
  * @cssproperty [--show-duration=200ms] - Open transition duration.
50
50
  * @cssproperty [--hide-duration=200ms] - Close transition duration.
51
51
  * @cssproperty [--easing=cubic-bezier(0.32, 0.72, 0, 1)] - Timing function of the open and close transitions, backdrop included.
52
- * @cssproperty --backdrop - Backdrop color.
53
- * @cssproperty [--backdrop-blur=0] - Backdrop blur amount (any CSS length).
52
+ * @cssproperty [--backdrop=var(--l-backdrop-strong)] - Backdrop color.
53
+ * @cssproperty [--backdrop-blur=2px] - Backdrop blur amount (any CSS length).
54
+ * @cssproperty [--shadow=none] - Drop shadow of the dialog panel (any `box-shadow` value). Raise it when the backdrop is light, where the panel edge would otherwise fade into the page.
54
55
  *
55
56
  * @event confirm - Fired when the user accepts. Cancelable — `preventDefault()` keeps it open for async work.
56
57
  * @event cancel - Fired when the user dismisses (cancel action, Escape). Cancelable — `preventDefault()` keeps it open.
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/html/elements/alert-dialog/alert-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAUpE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,OAAO,qBAAqB,CAAC;AAU7B;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,cAEC;CACF;AAED;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,cAEC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,qBAAa,WAAY,SAAQ,MAAM;IACrC,OAAgB,MAAM,4BAAyD;IAE/E,oCAAoC;IAEpC,WAAW,SAAa;IAExB,mCAAmC;IAEnC,UAAU,SAAY;IAEtB,uEAAuE;IAEvE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;2DACuD;IAEvD,OAAO,UAAS;IAEhB,cAAuB,KAAK,WAE3B;IAID,OAAO,CAAC,YAAY,CAA4C;IAChE,cAAuB,OAAO,uBAE7B;IAKD,UAAmB,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,QAG1D;IAID,UAAmB,SAAS,CAAC,CAAC,EAAE,KAAK,QAEpC;IAQD,UAAmB,aAAa,SAa/B;IAED,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,cAAc,CASpB;IAEF,UAAmB,YAAY,oCAsC9B;CACF;AAMD,MAAM,WAAW,WAAW;IAC1B,gBAAgB,CACd,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,EACvD,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IACR,gBAAgB,CACd,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI,EACtD,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IACR,gBAAgB,CACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IACR,mBAAmB,CACjB,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,EACvD,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;IACR,mBAAmB,CACjB,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI,EACtD,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;IACR,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;CACT"}
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/html/elements/alert-dialog/alert-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAUpE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,OAAO,qBAAqB,CAAC;AAU7B;;;;;;GAMG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,cAEC;CACF;AAED;;;;;GAKG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,cAEC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,qBAAa,WAAY,SAAQ,MAAM;IACrC,OAAgB,MAAM,4BAAyD;IAE/E,oCAAoC;IAEpC,WAAW,SAAa;IAExB,mCAAmC;IAEnC,UAAU,SAAY;IAEtB,uEAAuE;IAEvE,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;2DACuD;IAEvD,OAAO,UAAS;IAEhB,cAAuB,KAAK,WAE3B;IAID,OAAO,CAAC,YAAY,CAA4C;IAChE,cAAuB,OAAO,uBAE7B;IAKD,UAAmB,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,QAG1D;IAID,UAAmB,SAAS,CAAC,CAAC,EAAE,KAAK,QAEpC;IAQD,UAAmB,aAAa,SAa/B;IAED,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,cAAc,CASpB;IAEF,UAAmB,YAAY,oCAsC9B;CACF;AAMD,MAAM,WAAW,WAAW;IAC1B,gBAAgB,CACd,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,EACvD,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IACR,gBAAgB,CACd,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI,EACtD,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IACR,gBAAgB,CACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IACR,mBAAmB,CACjB,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,EACvD,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;IACR,mBAAmB,CACjB,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,KAAK,IAAI,EACtD,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;IACR,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI,CAAC;CACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.js","names":["unsafeCSS","rawAlertStyles","hostStyles","dialogStyles","buttonStyles","nothing","_decorate","property","r","u","__decorate","b","A","host_styles_default","dialog_styles_default","button_core_styles_default","alertStyles","ConfirmEvent","CancelEvent","AlertDialog","Dialog","_args","HasSlotController","node","changed","candidates","el","event","confirmVariant","spinnerTag","staticTag","cls"],"sources":["../../../src/html/elements/alert-dialog/alert-dialog.css?inline","../../../src/html/elements/alert-dialog/alert-dialog.ts"],"sourcesContent":["/*\n * Layout for l-alert-dialog. Unlayered to match dialog.css (the inherited\n * shared styles) so these overrides win — inside a shadow root there's no host\n * cascade to guard against, and layered rules can't override dialog.css's\n * unlayered ones. The `.l-button` appearance comes from the shared button-core\n * (imported in alert-dialog.ts), not from here.\n *\n * Visual rhythm: a confirmation reads better with the title and description\n * grouped tight and the actions set off in their own bar.\n */\n\n/* Interruptive by nature: a stronger backdrop (the token meant for immersive\n overlays) plus a touch of blur pulls focus firmly onto the confirmation.\n Consumers can still retune --backdrop / --backdrop-blur. */\n:host {\n --backdrop: var(--l-backdrop-strong);\n --backdrop-blur: 2px;\n}\n\n/* Pull the description up close under the title (title keeps the inherited\n 1.125rem / 600 from dialog.css). */\n[part='header'] {\n padding-block-end: 0.5rem;\n}\n\n/* Muted, smaller description with a comfortable reading measure, plus its own\n block-end gap so the footer divider isn't crowded. */\n[part='body'] {\n padding-block-end: var(--padding);\n color: var(--l-color-text-secondary);\n font-size: var(--l-text-sm);\n line-height: 1.5;\n}\n\n/* Footer as a distinct action bar: subtle fill + top divider, corners rounded\n to match the dialog (which doesn't clip its overflow). */\n[part='footer'] {\n padding: 1rem var(--padding);\n border-top: 1px solid var(--l-color-border);\n background: var(--l-color-bg-fill-neutral-subtle);\n border-end-start-radius: var(--border-radius);\n border-end-end-radius: var(--border-radius);\n}\n","import { html, nothing, unsafeCSS, type PropertyValues } from 'lit';\n// Only the spinner fragment needs the static tag function; the outer template\n// stays on lit's `html` so `renderFooter()` keeps the return type `Dialog`\n// declares. A static-html result nests inside a regular one just fine.\nimport { html as staticHtml } from 'lit/static-html.js';\nimport { property } from 'lit/decorators.js';\nimport { cls } from '../../registry.js';\nimport { staticTag } from '../../static-tag.js';\nimport hostStyles from '../../shared/styles/host.styles.js';\nimport { HasSlotController } from '../../shared/controllers/has-slot-controller.js';\nimport { Dialog } from '../dialog/dialog.js';\nimport dialogStyles from '../dialog/dialog.styles.js';\nimport buttonStyles from '../../shared/styles/button-core.styles.js';\nimport rawAlertStyles from './alert-dialog.css?inline';\nimport '../spinner/index.js';\n\n// The built-in actions render as `.l-button`, styled inside the shadow root from\n// the SAME shared button-core as the light-DOM `.l-button` (single source of\n// truth — no copy to drift). alert-dialog.css adds only the dialog layout.\n// The class is emitted through `cls('button')` so it tracks a renamed\n// `cssPrefix` — button-core.css ships as a real CSS file the consumer's postcss\n// re-prefixes, and a static literal would desync from it (see button-core.css).\nconst alertStyles = unsafeCSS(rawAlertStyles);\n\n/**\n * Fired when the user accepts an alert dialog (the confirm action). Cancelable —\n * call `event.preventDefault()` to keep the dialog open (e.g. to await an async\n * task); close it yourself afterwards by setting `open = false`.\n *\n * Does not bubble and is not composed: listen on the element itself.\n */\nexport class ConfirmEvent extends Event {\n constructor() {\n super('confirm', { bubbles: false, composed: false, cancelable: true });\n }\n}\n\n/**\n * Fired when the user dismisses an alert dialog (the cancel action, Escape, or a\n * close request). Cancelable — call `event.preventDefault()` to keep it open.\n *\n * Does not bubble and is not composed: listen on the element itself.\n */\nexport class CancelEvent extends Event {\n constructor() {\n super('cancel', { bubbles: false, composed: false, cancelable: true });\n }\n}\n\n/**\n * An interruptive confirmation dialog built on `<l-dialog>`. Renders its own\n * cancel/confirm actions and exposes `role=\"alertdialog\"`. Use it to confirm a\n * consequential action (delete, publish, discard) — not for generic content.\n *\n * Open and close by toggling the `open` property (or the `--show` / `--hide`\n * Invoker commands). The dialog closes automatically when the user picks an\n * action, unless the matching `confirm` / `cancel` event is canceled.\n *\n * @slot - Description text. Provides the dialog's accessible description.\n * @slot title - Custom heading element. Overrides the default `<h2>` rendered from the `title` property. Also provides the dialog's accessible name.\n * @slot cancel - Replaces the built-in cancel action (e.g. a link). Keep it focusable.\n * @slot confirm - Replaces the built-in confirm action.\n *\n * @csspart dialog - The native `<dialog>` element.\n * @csspart header - The header wrapper containing the title.\n * @csspart title - The dialog title heading.\n * @csspart body - The body wrapper around the description.\n * @csspart footer - The footer wrapper around the actions.\n * @csspart button - Both built-in action buttons.\n * @csspart cancel - The built-in cancel button.\n * @csspart confirm - The built-in confirm button.\n *\n * @cssproperty [--width=31rem] - Dialog width.\n * @cssproperty [--border-radius=6px] - Dialog border radius.\n * @cssproperty [--padding=1.5rem] - Padding applied to the header, footer, and inline-padding of the body.\n * @cssproperty [--show-duration=200ms] - Open transition duration.\n * @cssproperty [--hide-duration=200ms] - Close transition duration.\n * @cssproperty [--easing=cubic-bezier(0.32, 0.72, 0, 1)] - Timing function of the open and close transitions, backdrop included.\n * @cssproperty --backdrop - Backdrop color.\n * @cssproperty [--backdrop-blur=0] - Backdrop blur amount (any CSS length).\n *\n * @event confirm - Fired when the user accepts. Cancelable — `preventDefault()` keeps it open for async work.\n * @event cancel - Fired when the user dismisses (cancel action, Escape). Cancelable — `preventDefault()` keeps it open.\n * @event show - Fired when the dialog is about to open. Cancelable.\n * @event hide - Fired when the dialog is about to close via the `open` property. Cancelable. (The confirm, cancel, and Escape paths close natively and emit `confirm`/`cancel` instead of `hide`.)\n * @event after-show - Fired after the open animation completes. Not cancelable.\n * @event after-hide - Fired after the close animation completes. Not cancelable.\n *\n * @command --show - Sets `open = true`.\n * @command --hide - Sets `open = false`.\n *\n * @customElement l-alert-dialog\n */\n// oxlint-disable-next-line typescript/no-unsafe-declaration-merging -- typed addEventListener overloads merged below.\nexport class AlertDialog extends Dialog {\n static override styles = [hostStyles, dialogStyles, buttonStyles, alertStyles];\n\n /** Label for the confirm action. */\n @property({ attribute: 'confirm-text' })\n confirmText = 'Confirm';\n\n /** Label for the cancel action. */\n @property({ attribute: 'cancel-text' })\n cancelText = 'Cancel';\n\n /** Visual tone. `danger` renders the confirm action as destructive. */\n @property({ reflect: true })\n tone?: 'danger';\n\n /** Show a busy state on the confirm action (spinner + `aria-disabled`); the\n * cancel action stays operable as an escape hatch. */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n protected override get _role() {\n return 'alertdialog';\n }\n\n // Wire aria-describedby to the body only when it actually has content, so a\n // title-only confirmation doesn't advertise an empty description.\n private _bodyContent = new HasSlotController(this, '[default]');\n protected override get _bodyId() {\n return this._bodyContent.test('[default]') ? 'description' : '';\n }\n\n // Alert dialogs are interruptive: they are never dismissable by clicking\n // outside, so the inherited `light-dismiss` is forced off (a vetoed dismissal\n // gesture must go through an explicit action).\n protected override willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n if (this.lightDismiss) this.lightDismiss = false;\n }\n\n // Native Escape / close request → cancel intent. A vetoed `cancel` keeps the\n // dialog open; otherwise the native close proceeds (emitting `after-hide`).\n protected override _onCancel(e: Event) {\n if (!this.dispatchEvent(new CancelEvent())) e.preventDefault();\n }\n\n // Focus the least destructive action on open: an author `[autofocus]`, else\n // the slotted cancel action, else the built-in cancel button (in shadow DOM,\n // so the base light-DOM lookup can't reach it). Try each in order and keep the\n // first that actually takes focus — this skips a non-focusable slotted cancel\n // without rejecting a focusable one that reports `tabIndex === -1` (a custom\n // element with `delegatesFocus`, `<div role=\"button\" tabindex=\"0\">`, etc.).\n protected override _focusInitial() {\n const candidates = [\n this.querySelector<HTMLElement>('[autofocus]'),\n this.querySelector<HTMLElement>('[slot=\"cancel\"]'),\n this.renderRoot.querySelector<HTMLElement>('[data-cancel]'),\n ];\n for (const el of candidates) {\n if (!el || el.matches('[disabled], [aria-disabled=\"true\"]')) continue;\n el.focus({ preventScroll: true });\n // `document.activeElement` resolves to the shadow host when focus lands\n // inside an open shadow root, so this also covers delegatesFocus.\n if (el === document.activeElement || el.contains(document.activeElement)) return;\n }\n }\n\n private _close() {\n // Close natively rather than via `open = false` so we don't also emit the\n // inherited cancelable `hide` — `confirm` / `cancel` are the intent events.\n if (this.dialog.open) this.dialog.close();\n }\n\n // Activate an action unless its control is disabled. The built-in confirm also\n // respects `loading` via the property — immune to render timing, so a fast\n // second click in the window before `aria-disabled` is flushed can't fire a\n // duplicate confirm mid-async. A slotted action the consumer drives carries no\n // disabled state unless the author adds one, so it stays operable.\n private _activate(el: Element, event: ConfirmEvent | CancelEvent) {\n if (el.hasAttribute('data-confirm') && this.loading) return;\n if (el.matches('[disabled], [aria-disabled=\"true\"]')) return;\n if (this.dispatchEvent(event)) this._close();\n }\n\n // Single delegated handler covering both the built-in buttons (marked with\n // `data-confirm` / `data-cancel`) and slotted replacements (`slot=\"confirm\"` /\n // `slot=\"cancel\"`). `composedPath()` flattens across the slot boundary, so a\n // click on light-DOM slotted content still resolves here.\n private _onFooterClick = (e: Event) => {\n for (const node of e.composedPath()) {\n if (node === e.currentTarget) break;\n if (!(node instanceof Element)) continue;\n if (node.matches('[slot=\"confirm\"], [data-confirm]'))\n return this._activate(node, new ConfirmEvent());\n if (node.matches('[slot=\"cancel\"], [data-cancel]'))\n return this._activate(node, new CancelEvent());\n }\n };\n\n protected override renderFooter() {\n const confirmVariant = this.tone === 'danger' ? 'destructive' : 'primary';\n const spinnerTag = staticTag('spinner');\n return html`\n <footer\n part=\"footer\"\n @click=${this._onFooterClick}\n >\n <slot name=\"cancel\">\n <button\n part=\"button cancel\"\n class=${cls('button')}\n type=\"button\"\n data-cancel\n >\n ${this.cancelText}\n </button>\n </slot>\n <slot name=\"confirm\">\n <button\n part=\"button confirm\"\n class=${cls('button')}\n type=\"button\"\n data-confirm\n data-variant=${confirmVariant}\n aria-disabled=${this.loading ? 'true' : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n >\n ${\n this.loading\n ? staticHtml`<${spinnerTag} aria-hidden=\"true\"></${spinnerTag}>`\n : nothing\n }\n ${this.confirmText}\n </button>\n </slot>\n </footer>\n `;\n }\n}\n\n// `confirm` and `cancel` collide with lib.dom's event maps, so we cannot augment\n// the global map (as the shared lifecycle events do). Declaration-merge typed\n// listener overloads onto the element instead — must come after the class so the\n// CEM analyzer reads the class first.\nexport interface AlertDialog {\n addEventListener(\n type: 'confirm',\n listener: (this: AlertDialog, ev: ConfirmEvent) => void,\n options?: boolean | AddEventListenerOptions,\n ): void;\n addEventListener(\n type: 'cancel',\n listener: (this: AlertDialog, ev: CancelEvent) => void,\n options?: boolean | AddEventListenerOptions,\n ): void;\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): void;\n removeEventListener(\n type: 'confirm',\n listener: (this: AlertDialog, ev: ConfirmEvent) => void,\n options?: boolean | EventListenerOptions,\n ): void;\n removeEventListener(\n type: 'cancel',\n listener: (this: AlertDialog, ev: CancelEvent) => void,\n options?: boolean | EventListenerOptions,\n ): void;\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): void;\n}\n"],"mappings":"A,8iBCsBA,IAAMgB,EAAchB,EAAUC,gcAAc,EAS/BgB,EAAb,cAAkC,KAAM,CACtC,aAAc,CACZ,MAAM,UAAW,CAAE,QAAS,GAAO,SAAU,GAAO,WAAY,EAAK,CAAC,CACxE,CACF,EAQaC,EAAb,cAAiC,KAAM,CACrC,aAAc,CACZ,MAAM,SAAU,CAAE,QAAS,GAAO,SAAU,GAAO,WAAY,EAAK,CAAC,CACvE,CACF,EA+CaC,EAAb,cAAiCC,CAAO,C,8BAKxB,KAAA,YAAA,UAID,KAAA,WAAA,SASH,KAAA,QAAA,GAQa,KAAA,aAAA,IAAIE,EAAkB,KAAM,WAAW,EA6DpC,KAAA,eAAA,GAAa,CACrC,IAAK,IAAMC,KAAQ,EAAE,aAAa,EAAG,CACnC,GAAIA,IAAS,EAAE,cAAe,MAC9B,GAAMA,aAAgB,QACtB,IAAIA,EAAK,QAAQ,kCAAkC,EACjD,OAAO,KAAK,UAAUA,EAAM,IAAIN,CAAc,EAChD,GAAIM,EAAK,QAAQ,gCAAgC,EAC/C,OAAO,KAAK,UAAUA,EAAM,IAAIL,CAAa,CAFC,CAGlD,CACF,C,QA/FyB,KAAA,OAAA,CAAChB,EAAYC,EAAcC,EAAcY,CAAW,C,CAmB7E,IAAuB,OAAQ,CAC7B,MAAO,aACT,CAKA,IAAuB,SAAU,CAC/B,OAAO,KAAK,aAAa,KAAK,WAAW,EAAI,cAAgB,EAC/D,CAKA,WAA8B,EAA+B,CAC3D,MAAM,WAAWQ,CAAO,EACxB,AAAuB,KAAK,eAAe,EAC7C,CAIA,UAA6B,EAAU,CAChC,KAAK,cAAc,IAAIN,CAAa,GAAG,EAAE,eAAe,CAC/D,CAQA,eAAmC,CACjC,IAAMO,EAAa,CACjB,KAAK,cAA2B,aAAa,EAC7C,KAAK,cAA2B,iBAAiB,EACjD,KAAK,WAAW,cAA2B,eAAe,CAC5D,EACA,IAAK,IAAMC,KAAMD,EACf,GAAKC,GAAM,GAAG,QAAQ,oCAAoC,IAC1DA,EAAG,MAAM,CAAE,cAAe,EAAK,CAAC,EAG5BA,IAAO,SAAS,eAAiBA,EAAG,SAAS,SAAS,aAAa,GAAG,MAE9E,CAEA,QAAiB,CAGX,KAAK,OAAO,MAAM,KAAK,OAAO,MAAM,CAC1C,CAOA,UAAkB,EAAa,EAAmC,CAC5DA,EAAG,aAAa,cAAc,GAAK,KAAK,SACxCA,EAAG,QAAQ,oCAAoC,GAC/C,KAAK,cAAcC,CAAK,GAAG,KAAK,OAAO,CAC7C,CAiBA,cAAkC,CAChC,IAAMC,EAAiB,KAAK,OAAS,SAAW,cAAgB,UAC1DC,EAAaC,EAAU,SAAS,EACtC,MAAO,EAAI;;;iBAGE,KAAK,eAAe;;;;;oBAKjBC,EAAI,QAAQ,EAAE;;;;cAIpB,KAAK,WAAW;;;;;;oBAMVA,EAAI,QAAQ,EAAE;;;2BAGPH,EAAe;4BACd,KAAK,QAAU,OAASvB,EAAQ;wBACpC,KAAK,QAAU,OAASA,EAAQ;;cAG1C,KAAK,QACD,CAAU,IAAIwB,EAAW,wBAAwBA,EAAW,GAC5DxB,EACL;cACC,KAAK,YAAY;;;;KAK7B,CACF,EArIGC,EAAA,CAAAC,EAAS,CAAE,UAAW,cAAe,CAAC,CAAA,EAAAY,EAAA,UAAA,cAAA,IAAA,EAAA,EAItCb,EAAA,CAAAC,EAAS,CAAE,UAAW,aAAc,CAAC,CAAA,EAAAY,EAAA,UAAA,aAAA,IAAA,EAAA,EAIrCb,EAAA,CAAAC,EAAS,CAAE,QAAS,EAAK,CAAC,CAAA,EAAAY,EAAA,UAAA,OAAA,IAAA,EAAA,EAK1Bb,EAAA,CAAAC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAY,EAAA,UAAA,UAAA,IAAA,EAAA,E"}
1
+ {"version":3,"file":"alert-dialog.js","names":["unsafeCSS","rawAlertStyles","hostStyles","dialogStyles","buttonStyles","nothing","_decorate","property","r","u","__decorate","b","A","host_styles_default","dialog_styles_default","button_core_styles_default","alertStyles","ConfirmEvent","CancelEvent","AlertDialog","Dialog","_args","HasSlotController","node","changed","candidates","el","event","confirmVariant","spinnerTag","staticTag","cls"],"sources":["../../../src/html/elements/alert-dialog/alert-dialog.css?inline","../../../src/html/elements/alert-dialog/alert-dialog.ts"],"sourcesContent":["/*\n * Layout for l-alert-dialog. Unlayered to match dialog.css (the inherited\n * shared styles) so these overrides win — inside a shadow root there's no host\n * cascade to guard against, and layered rules can't override dialog.css's\n * unlayered ones. The `.l-button` appearance comes from the shared button-core\n * (imported in alert-dialog.ts), not from here.\n *\n * Visual rhythm: a confirmation reads better with the title and description\n * grouped tight and the actions set off in their own bar.\n */\n\n/* Interruptive by nature: a stronger backdrop (the token meant for immersive\n overlays) plus a touch of blur pulls focus firmly onto the confirmation.\n Consumers can still retune --backdrop / --backdrop-blur. */\n:host {\n --backdrop: var(--l-backdrop-strong);\n --backdrop-blur: 2px;\n}\n\n/* Pull the description up close under the title (title keeps the inherited\n 1.125rem / 600 from dialog.css). */\n[part='header'] {\n padding-block-end: 0.5rem;\n}\n\n/* Muted, smaller description with a comfortable reading measure, plus its own\n block-end gap so the footer divider isn't crowded. */\n[part='body'] {\n padding-block-end: var(--padding);\n color: var(--l-color-text-secondary);\n font-size: var(--l-text-sm);\n line-height: 1.5;\n}\n\n/* Footer as a distinct action bar: subtle fill + top divider, corners rounded\n to match the dialog (which doesn't clip its overflow). */\n[part='footer'] {\n padding: 1rem var(--padding);\n border-top: 1px solid var(--l-color-border);\n background: var(--l-color-bg-fill-neutral-subtle);\n border-end-start-radius: var(--border-radius);\n border-end-end-radius: var(--border-radius);\n}\n","import { html, nothing, unsafeCSS, type PropertyValues } from 'lit';\n// Only the spinner fragment needs the static tag function; the outer template\n// stays on lit's `html` so `renderFooter()` keeps the return type `Dialog`\n// declares. A static-html result nests inside a regular one just fine.\nimport { html as staticHtml } from 'lit/static-html.js';\nimport { property } from 'lit/decorators.js';\nimport { cls } from '../../registry.js';\nimport { staticTag } from '../../static-tag.js';\nimport hostStyles from '../../shared/styles/host.styles.js';\nimport { HasSlotController } from '../../shared/controllers/has-slot-controller.js';\nimport { Dialog } from '../dialog/dialog.js';\nimport dialogStyles from '../dialog/dialog.styles.js';\nimport buttonStyles from '../../shared/styles/button-core.styles.js';\nimport rawAlertStyles from './alert-dialog.css?inline';\nimport '../spinner/index.js';\n\n// The built-in actions render as `.l-button`, styled inside the shadow root from\n// the SAME shared button-core as the light-DOM `.l-button` (single source of\n// truth — no copy to drift). alert-dialog.css adds only the dialog layout.\n// The class is emitted through `cls('button')` so it tracks a renamed\n// `cssPrefix` — button-core.css ships as a real CSS file the consumer's postcss\n// re-prefixes, and a static literal would desync from it (see button-core.css).\nconst alertStyles = unsafeCSS(rawAlertStyles);\n\n/**\n * Fired when the user accepts an alert dialog (the confirm action). Cancelable —\n * call `event.preventDefault()` to keep the dialog open (e.g. to await an async\n * task); close it yourself afterwards by setting `open = false`.\n *\n * Does not bubble and is not composed: listen on the element itself.\n */\nexport class ConfirmEvent extends Event {\n constructor() {\n super('confirm', { bubbles: false, composed: false, cancelable: true });\n }\n}\n\n/**\n * Fired when the user dismisses an alert dialog (the cancel action, Escape, or a\n * close request). Cancelable — call `event.preventDefault()` to keep it open.\n *\n * Does not bubble and is not composed: listen on the element itself.\n */\nexport class CancelEvent extends Event {\n constructor() {\n super('cancel', { bubbles: false, composed: false, cancelable: true });\n }\n}\n\n/**\n * An interruptive confirmation dialog built on `<l-dialog>`. Renders its own\n * cancel/confirm actions and exposes `role=\"alertdialog\"`. Use it to confirm a\n * consequential action (delete, publish, discard) — not for generic content.\n *\n * Open and close by toggling the `open` property (or the `--show` / `--hide`\n * Invoker commands). The dialog closes automatically when the user picks an\n * action, unless the matching `confirm` / `cancel` event is canceled.\n *\n * @slot - Description text. Provides the dialog's accessible description.\n * @slot title - Custom heading element. Overrides the default `<h2>` rendered from the `title` property. Also provides the dialog's accessible name.\n * @slot cancel - Replaces the built-in cancel action (e.g. a link). Keep it focusable.\n * @slot confirm - Replaces the built-in confirm action.\n *\n * @csspart dialog - The native `<dialog>` element.\n * @csspart header - The header wrapper containing the title.\n * @csspart title - The dialog title heading.\n * @csspart body - The body wrapper around the description.\n * @csspart footer - The footer wrapper around the actions.\n * @csspart button - Both built-in action buttons.\n * @csspart cancel - The built-in cancel button.\n * @csspart confirm - The built-in confirm button.\n *\n * @cssproperty [--width=31rem] - Dialog width.\n * @cssproperty [--border-radius=6px] - Dialog border radius.\n * @cssproperty [--padding=1.5rem] - Padding applied to the header, footer, and inline-padding of the body.\n * @cssproperty [--show-duration=200ms] - Open transition duration.\n * @cssproperty [--hide-duration=200ms] - Close transition duration.\n * @cssproperty [--easing=cubic-bezier(0.32, 0.72, 0, 1)] - Timing function of the open and close transitions, backdrop included.\n * @cssproperty [--backdrop=var(--l-backdrop-strong)] - Backdrop color.\n * @cssproperty [--backdrop-blur=2px] - Backdrop blur amount (any CSS length).\n * @cssproperty [--shadow=none] - Drop shadow of the dialog panel (any `box-shadow` value). Raise it when the backdrop is light, where the panel edge would otherwise fade into the page.\n *\n * @event confirm - Fired when the user accepts. Cancelable — `preventDefault()` keeps it open for async work.\n * @event cancel - Fired when the user dismisses (cancel action, Escape). Cancelable — `preventDefault()` keeps it open.\n * @event show - Fired when the dialog is about to open. Cancelable.\n * @event hide - Fired when the dialog is about to close via the `open` property. Cancelable. (The confirm, cancel, and Escape paths close natively and emit `confirm`/`cancel` instead of `hide`.)\n * @event after-show - Fired after the open animation completes. Not cancelable.\n * @event after-hide - Fired after the close animation completes. Not cancelable.\n *\n * @command --show - Sets `open = true`.\n * @command --hide - Sets `open = false`.\n *\n * @customElement l-alert-dialog\n */\n// oxlint-disable-next-line typescript/no-unsafe-declaration-merging -- typed addEventListener overloads merged below.\nexport class AlertDialog extends Dialog {\n static override styles = [hostStyles, dialogStyles, buttonStyles, alertStyles];\n\n /** Label for the confirm action. */\n @property({ attribute: 'confirm-text' })\n confirmText = 'Confirm';\n\n /** Label for the cancel action. */\n @property({ attribute: 'cancel-text' })\n cancelText = 'Cancel';\n\n /** Visual tone. `danger` renders the confirm action as destructive. */\n @property({ reflect: true })\n tone?: 'danger';\n\n /** Show a busy state on the confirm action (spinner + `aria-disabled`); the\n * cancel action stays operable as an escape hatch. */\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n protected override get _role() {\n return 'alertdialog';\n }\n\n // Wire aria-describedby to the body only when it actually has content, so a\n // title-only confirmation doesn't advertise an empty description.\n private _bodyContent = new HasSlotController(this, '[default]');\n protected override get _bodyId() {\n return this._bodyContent.test('[default]') ? 'description' : '';\n }\n\n // Alert dialogs are interruptive: they are never dismissable by clicking\n // outside, so the inherited `light-dismiss` is forced off (a vetoed dismissal\n // gesture must go through an explicit action).\n protected override willUpdate(changed: PropertyValues<this>) {\n super.willUpdate(changed);\n if (this.lightDismiss) this.lightDismiss = false;\n }\n\n // Native Escape / close request → cancel intent. A vetoed `cancel` keeps the\n // dialog open; otherwise the native close proceeds (emitting `after-hide`).\n protected override _onCancel(e: Event) {\n if (!this.dispatchEvent(new CancelEvent())) e.preventDefault();\n }\n\n // Focus the least destructive action on open: an author `[autofocus]`, else\n // the slotted cancel action, else the built-in cancel button (in shadow DOM,\n // so the base light-DOM lookup can't reach it). Try each in order and keep the\n // first that actually takes focus — this skips a non-focusable slotted cancel\n // without rejecting a focusable one that reports `tabIndex === -1` (a custom\n // element with `delegatesFocus`, `<div role=\"button\" tabindex=\"0\">`, etc.).\n protected override _focusInitial() {\n const candidates = [\n this.querySelector<HTMLElement>('[autofocus]'),\n this.querySelector<HTMLElement>('[slot=\"cancel\"]'),\n this.renderRoot.querySelector<HTMLElement>('[data-cancel]'),\n ];\n for (const el of candidates) {\n if (!el || el.matches('[disabled], [aria-disabled=\"true\"]')) continue;\n el.focus({ preventScroll: true });\n // `document.activeElement` resolves to the shadow host when focus lands\n // inside an open shadow root, so this also covers delegatesFocus.\n if (el === document.activeElement || el.contains(document.activeElement)) return;\n }\n }\n\n private _close() {\n // Close natively rather than via `open = false` so we don't also emit the\n // inherited cancelable `hide` — `confirm` / `cancel` are the intent events.\n if (this.dialog.open) this.dialog.close();\n }\n\n // Activate an action unless its control is disabled. The built-in confirm also\n // respects `loading` via the property — immune to render timing, so a fast\n // second click in the window before `aria-disabled` is flushed can't fire a\n // duplicate confirm mid-async. A slotted action the consumer drives carries no\n // disabled state unless the author adds one, so it stays operable.\n private _activate(el: Element, event: ConfirmEvent | CancelEvent) {\n if (el.hasAttribute('data-confirm') && this.loading) return;\n if (el.matches('[disabled], [aria-disabled=\"true\"]')) return;\n if (this.dispatchEvent(event)) this._close();\n }\n\n // Single delegated handler covering both the built-in buttons (marked with\n // `data-confirm` / `data-cancel`) and slotted replacements (`slot=\"confirm\"` /\n // `slot=\"cancel\"`). `composedPath()` flattens across the slot boundary, so a\n // click on light-DOM slotted content still resolves here.\n private _onFooterClick = (e: Event) => {\n for (const node of e.composedPath()) {\n if (node === e.currentTarget) break;\n if (!(node instanceof Element)) continue;\n if (node.matches('[slot=\"confirm\"], [data-confirm]'))\n return this._activate(node, new ConfirmEvent());\n if (node.matches('[slot=\"cancel\"], [data-cancel]'))\n return this._activate(node, new CancelEvent());\n }\n };\n\n protected override renderFooter() {\n const confirmVariant = this.tone === 'danger' ? 'destructive' : 'primary';\n const spinnerTag = staticTag('spinner');\n return html`\n <footer\n part=\"footer\"\n @click=${this._onFooterClick}\n >\n <slot name=\"cancel\">\n <button\n part=\"button cancel\"\n class=${cls('button')}\n type=\"button\"\n data-cancel\n >\n ${this.cancelText}\n </button>\n </slot>\n <slot name=\"confirm\">\n <button\n part=\"button confirm\"\n class=${cls('button')}\n type=\"button\"\n data-confirm\n data-variant=${confirmVariant}\n aria-disabled=${this.loading ? 'true' : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n >\n ${\n this.loading\n ? staticHtml`<${spinnerTag} aria-hidden=\"true\"></${spinnerTag}>`\n : nothing\n }\n ${this.confirmText}\n </button>\n </slot>\n </footer>\n `;\n }\n}\n\n// `confirm` and `cancel` collide with lib.dom's event maps, so we cannot augment\n// the global map (as the shared lifecycle events do). Declaration-merge typed\n// listener overloads onto the element instead — must come after the class so the\n// CEM analyzer reads the class first.\nexport interface AlertDialog {\n addEventListener(\n type: 'confirm',\n listener: (this: AlertDialog, ev: ConfirmEvent) => void,\n options?: boolean | AddEventListenerOptions,\n ): void;\n addEventListener(\n type: 'cancel',\n listener: (this: AlertDialog, ev: CancelEvent) => void,\n options?: boolean | AddEventListenerOptions,\n ): void;\n addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): void;\n removeEventListener(\n type: 'confirm',\n listener: (this: AlertDialog, ev: ConfirmEvent) => void,\n options?: boolean | EventListenerOptions,\n ): void;\n removeEventListener(\n type: 'cancel',\n listener: (this: AlertDialog, ev: CancelEvent) => void,\n options?: boolean | EventListenerOptions,\n ): void;\n removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): void;\n}\n"],"mappings":"A,8iBCsBA,IAAMgB,EAAchB,EAAUC,gcAAc,EAS/BgB,EAAb,cAAkC,KAAM,CACtC,aAAc,CACZ,MAAM,UAAW,CAAE,QAAS,GAAO,SAAU,GAAO,WAAY,EAAK,CAAC,CACxE,CACF,EAQaC,EAAb,cAAiC,KAAM,CACrC,aAAc,CACZ,MAAM,SAAU,CAAE,QAAS,GAAO,SAAU,GAAO,WAAY,EAAK,CAAC,CACvE,CACF,EAgDaC,EAAb,cAAiCC,CAAO,C,8BAKxB,KAAA,YAAA,UAID,KAAA,WAAA,SASH,KAAA,QAAA,GAQa,KAAA,aAAA,IAAIE,EAAkB,KAAM,WAAW,EA6DpC,KAAA,eAAA,GAAa,CACrC,IAAK,IAAMC,KAAQ,EAAE,aAAa,EAAG,CACnC,GAAIA,IAAS,EAAE,cAAe,MAC9B,GAAMA,aAAgB,QACtB,IAAIA,EAAK,QAAQ,kCAAkC,EACjD,OAAO,KAAK,UAAUA,EAAM,IAAIN,CAAc,EAChD,GAAIM,EAAK,QAAQ,gCAAgC,EAC/C,OAAO,KAAK,UAAUA,EAAM,IAAIL,CAAa,CAFC,CAGlD,CACF,C,QA/FyB,KAAA,OAAA,CAAChB,EAAYC,EAAcC,EAAcY,CAAW,C,CAmB7E,IAAuB,OAAQ,CAC7B,MAAO,aACT,CAKA,IAAuB,SAAU,CAC/B,OAAO,KAAK,aAAa,KAAK,WAAW,EAAI,cAAgB,EAC/D,CAKA,WAA8B,EAA+B,CAC3D,MAAM,WAAWQ,CAAO,EACxB,AAAuB,KAAK,eAAe,EAC7C,CAIA,UAA6B,EAAU,CAChC,KAAK,cAAc,IAAIN,CAAa,GAAG,EAAE,eAAe,CAC/D,CAQA,eAAmC,CACjC,IAAMO,EAAa,CACjB,KAAK,cAA2B,aAAa,EAC7C,KAAK,cAA2B,iBAAiB,EACjD,KAAK,WAAW,cAA2B,eAAe,CAC5D,EACA,IAAK,IAAMC,KAAMD,EACf,GAAKC,GAAM,GAAG,QAAQ,oCAAoC,IAC1DA,EAAG,MAAM,CAAE,cAAe,EAAK,CAAC,EAG5BA,IAAO,SAAS,eAAiBA,EAAG,SAAS,SAAS,aAAa,GAAG,MAE9E,CAEA,QAAiB,CAGX,KAAK,OAAO,MAAM,KAAK,OAAO,MAAM,CAC1C,CAOA,UAAkB,EAAa,EAAmC,CAC5DA,EAAG,aAAa,cAAc,GAAK,KAAK,SACxCA,EAAG,QAAQ,oCAAoC,GAC/C,KAAK,cAAcC,CAAK,GAAG,KAAK,OAAO,CAC7C,CAiBA,cAAkC,CAChC,IAAMC,EAAiB,KAAK,OAAS,SAAW,cAAgB,UAC1DC,EAAaC,EAAU,SAAS,EACtC,MAAO,EAAI;;;iBAGE,KAAK,eAAe;;;;;oBAKjBC,EAAI,QAAQ,EAAE;;;;cAIpB,KAAK,WAAW;;;;;;oBAMVA,EAAI,QAAQ,EAAE;;;2BAGPH,EAAe;4BACd,KAAK,QAAU,OAASvB,EAAQ;wBACpC,KAAK,QAAU,OAASA,EAAQ;;cAG1C,KAAK,QACD,CAAU,IAAIwB,EAAW,wBAAwBA,EAAW,GAC5DxB,EACL;cACC,KAAK,YAAY;;;;KAK7B,CACF,EArIGC,EAAA,CAAAC,EAAS,CAAE,UAAW,cAAe,CAAC,CAAA,EAAAY,EAAA,UAAA,cAAA,IAAA,EAAA,EAItCb,EAAA,CAAAC,EAAS,CAAE,UAAW,aAAc,CAAC,CAAA,EAAAY,EAAA,UAAA,aAAA,IAAA,EAAA,EAIrCb,EAAA,CAAAC,EAAS,CAAE,QAAS,EAAK,CAAC,CAAA,EAAAY,EAAA,UAAA,OAAA,IAAA,EAAA,EAK1Bb,EAAA,CAAAC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAY,EAAA,UAAA,UAAA,IAAA,EAAA,E"}
@@ -1,4 +1,4 @@
1
- import{i as e}from"../../chunks/lit.js";import{LuxenElement as t}from"../../shared/luxen-element.js";import{a as n,s as r,t as i}from"../../chunks/lit-html.js";import{r as a,t as o}from"../../chunks/static-html.js";import{n as s,r as c,t as l}from"../../chunks/decorate.js";import u from"../../shared/styles/host.styles.js";var d=e(`:host{--size:40px;--_font-size:calc(var(--size) * .4);width:var(--size);height:var(--size);border-radius:calc(var(--size) * .15);isolation:isolate;vertical-align:middle;color:var(--l-color-text-secondary);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}:host([size=xs]){--size:24px;--_font-size:.75rem}:host([size=sm]){--size:32px;--_font-size:.875rem}:host([size=lg]){--size:48px;--_font-size:1.25rem}:host([size=xl]){--size:56px;--_font-size:1.25rem}img{object-fit:cover;border-radius:inherit;width:100%;height:100%}.initials{margin:auto}.icon{color:currentColor;width:60%;height:60%}.badge{z-index:1;min-width:12px;height:12px;box-shadow:0 0 0 2px var(--l-color-surface);background-color:var(--l-color-surface);font-size:.625rem;font-weight:var(--l-font-weight-medium);font-variant-numeric:tabular-nums;color:var(--l-color-text-primary);border-radius:3px;justify-content:center;align-items:center;padding-inline:2px;line-height:1;display:flex;position:absolute;bottom:0;right:0;overflow:hidden}.base:after{content:"";border-radius:inherit;pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 0 1px var(--lightningcss-light,oklch(0% 0 0/.07))var(--lightningcss-dark,oklch(100% 0 0/.1))}.base{border-radius:calc(var(--size) * .15);background-color:var(--color,var(--l-color-bg-fill-neutral-soft));--_on:calc(255 * ( 1 - sign(.2126 * (r / 255) * (r / 255) + .7152 * (g / 255) * (g / 255) + .0722 * (b / 255) * (b / 255) - .2) ) / 2);width:100%;height:100%;color:var(--text-color,rgb(from var(--color) var(--_on) var(--_on) var(--_on)));font-size:var(--_font-size);font-weight:var(--l-font-weight-medium);text-transform:uppercase;cursor:inherit;border:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}@supports (color:contrast-color(red)){.base{color:var(--text-color,contrast-color(var(--color)))}}button.base{cursor:pointer}button.base:focus-visible{outline:var(--l-focus-ring-width) solid var(--l-focus-ring);outline-offset:2px}button.base:hover{box-shadow:inset 0 0 0 1.5px var(--l-color-border-interactive)}@container style(--appearance:circle){.base{border-radius:50%}}`);function f(e=``){let t=e.normalize(`NFC`).trim().split(/\s+/).filter(Boolean);if(t.length===0)return``;let n=e=>[...e][0];return(n(t[0])+(t.length>1?n(t[t.length-1]):``)).toUpperCase()}var p=r`<svg class="icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
1
+ import{i as e}from"../../chunks/lit.js";import{LuxenElement as t}from"../../shared/luxen-element.js";import{a as n,s as r,t as i}from"../../chunks/lit-html.js";import{r as a,t as o}from"../../chunks/static-html.js";import{n as s,r as c,t as l}from"../../chunks/decorate.js";import u from"../../shared/styles/host.styles.js";var d=e(`:host{--size:40px;--_font-size:calc(var(--size) * .4);width:var(--size);height:var(--size);border-radius:calc(var(--size) * .15);isolation:isolate;vertical-align:middle;color:var(--l-color-text-secondary);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}:host([size=xs]){--size:24px;--_font-size:.75rem}:host([size=sm]){--size:32px;--_font-size:.875rem}:host([size=lg]){--size:48px;--_font-size:1.25rem}:host([size=xl]){--size:56px;--_font-size:1.25rem}img{object-fit:cover;border-radius:inherit;width:100%;height:100%}.initials{margin:auto}.icon{color:currentColor;width:60%;height:60%}.badge{z-index:1;min-width:12px;height:12px;box-shadow:0 0 0 2px var(--l-color-surface);background-color:var(--l-color-surface);font-size:.625rem;font-weight:var(--l-font-weight-medium);font-variant-numeric:tabular-nums;color:var(--l-color-text-primary);border-radius:3px;justify-content:center;align-items:center;padding-inline:2px;line-height:1;display:flex;position:absolute;bottom:0;right:0;overflow:hidden}.base:after{content:"";border-radius:inherit;pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 0 1px var(--lightningcss-light,oklch(0% 0 0/.07))var(--lightningcss-dark,oklch(100% 0 0/.1))}.base{border-radius:calc(var(--size) * .15);background-color:var(--color,var(--l-color-bg-fill-neutral-soft));--_on:calc(255 * ( 1 - sign(.2126 * (r / 255) * (r / 255) + .7152 * (g / 255) * (g / 255) + .0722 * (b / 255) * (b / 255) - .2) ) / 2);width:100%;height:100%;color:var(--text-color,rgb(from var(--color) var(--_on) var(--_on) var(--_on)));font-size:var(--_font-size);font-weight:var(--l-font-weight-medium);text-transform:uppercase;cursor:inherit;border:none;justify-content:center;align-items:center;padding:0;line-height:1;display:inline-flex}@supports (color:contrast-color(red)){.base{color:var(--text-color,contrast-color(var(--color)))}}button.base{cursor:pointer}button.base:focus-visible{outline:var(--l-focus-ring-width) solid var(--l-focus-ring-color);outline-offset:var(--l-focus-ring-offset)}button.base:hover{box-shadow:inset 0 0 0 1.5px var(--l-color-border-interactive)}@container style(--appearance:circle){.base{border-radius:50%}}`);function f(e=``){let t=e.normalize(`NFC`).trim().split(/\s+/).filter(Boolean);if(t.length===0)return``;let n=e=>[...e][0];return(n(t[0])+(t.length>1?n(t[t.length-1]):``)).toUpperCase()}var p=r`<svg class="icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
2
2
  <path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" />
3
3
  </svg>`,m=class extends t{constructor(...e){super(...e),this.src=``,this.name=``,this.size=`md`,this.badge=0,this.interactive=!1,this._hasError=!1,this._onError=()=>{this._hasError=!0}}static{this.styles=[u,d]}willUpdate(e){e.has(`src`)&&(this._hasError=!1)}connectedCallback(){super.connectedCallback(),!this.interactive&&!this.hasAttribute(`role`)&&this.setAttribute(`role`,`img`)}updated(){this.interactive?(this.getAttribute(`role`)===`img`&&this.removeAttribute(`role`),this.removeAttribute(`aria-label`)):(this.hasAttribute(`role`)||this.setAttribute(`role`,`img`),this.name&&this.setAttribute(`aria-label`,this.name));let e=getComputedStyle(this).getPropertyValue(`--appearance`).trim()===`circle`;this.style.borderRadius=e?`50%`:``}get _tag(){return this.interactive?o`button`:o`div`}render(){let e=this.src&&!this._hasError?n`<img
4
4
  src=${this.src}
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","names":["unsafeCSS","rawStyles","hostStyles","nothing","_decorate","property","state","r","b","w","A","u","i","r$1","n","__decorate","host_styles_default","styles","getInitials","words","name","firstLetter","word","defaultIcon","Avatar","LuxenElement","_args","changed","isCircle","content"],"sources":["../../../src/html/elements/avatar/avatar.css?inline","../../../src/html/elements/avatar/avatar.ts"],"sourcesContent":[":host {\n --size: 40px;\n --_font-size: calc(var(--size) * 0.4);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n border-radius: calc(var(--size) * 0.15);\n isolation: isolate;\n vertical-align: middle;\n flex-shrink: 0;\n color: var(--l-color-text-secondary);\n}\n\n:host([size='xs']) {\n --size: 24px;\n --_font-size: 0.75rem;\n}\n:host([size='sm']) {\n --size: 32px;\n --_font-size: 0.875rem;\n}\n:host([size='lg']) {\n --size: 48px;\n --_font-size: 1.25rem;\n}\n:host([size='xl']) {\n --size: 56px;\n --_font-size: 1.25rem;\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.initials {\n margin: auto;\n}\n\n.icon {\n width: 60%;\n height: 60%;\n color: currentColor;\n}\n\n.badge {\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 1;\n height: 12px;\n min-width: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: 2px;\n border-radius: 3px;\n box-shadow: 0 0 0 2px var(--l-color-surface);\n background-color: var(--l-color-surface);\n font-size: 0.625rem;\n font-weight: var(--l-font-weight-medium);\n font-variant-numeric: tabular-nums;\n line-height: 1;\n color: var(--l-color-text-primary);\n overflow: hidden;\n}\n\n/*\n * Inset ring via ::after so it renders on top of the <img>.\n * A box-shadow on :host would be covered by the image since\n * it fills the entire element with object-fit: cover.\n */\n.base::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 7%), oklch(100% 0 0 / 10%));\n pointer-events: none;\n}\n\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: calc(var(--size) * 0.15);\n background-color: var(--color, var(--l-color-bg-fill-neutral-soft));\n /*\n * Text over --color, decided by the background's own luminance — never the\n * document mode, since --color is consumer-set and ignores light/dark.\n * The contrast-color() block below is the primary path (Baseline 2026); this\n * --_on calc() is the fallback for browsers predating it (Chrome ≤146,\n * Safari <26, Firefox <146). It approximates WCAG relative luminance with\n * squared sRGB channels (a cheap linearization, Rec. 709 weights) and flips at\n * 0.2, just above the black/white crossover (~0.179) to offset squaring\n * underestimating mid-tones — holding AA across saturated brand colors where an\n * OKLCH-lightness threshold collapses to ≈1:1 (OKLCH L tracks hue, not\n * luminance: a mid red reads \"light\" yet needs white text). --text-color lets\n * consumers force a specific brand text color, overriding both paths.\n */\n --_on: calc(\n 255 *\n (\n 1 -\n sign(\n 0.2126 * (r / 255) * (r / 255) + 0.7152 * (g / 255) * (g / 255) + 0.0722 * (b / 255) *\n (b / 255) - 0.2\n )\n ) /\n 2\n );\n color: var(--text-color, rgb(from var(--color) var(--_on) var(--_on) var(--_on)));\n font-size: var(--_font-size);\n font-weight: var(--l-font-weight-medium);\n line-height: 1;\n text-transform: uppercase;\n padding: 0;\n cursor: inherit;\n}\n\n/* Primary path: native, guaranteed-contrast black/white. contrast-color() is\n * Baseline Newly Available (2026) — Safari 26+, Firefox 146+, Chrome/Edge 147+ —\n * and supersedes the luminance approximation above where supported. @supports (not\n * declaration order) is required: the value contains var(), so a non-supporting\n * browser would treat contrast-color() as invalid-at-computed-value-time and reset\n * to `inherit` rather than falling back to the calc() line. No bg fallback inside,\n * so a bare avatar (no --color) keeps inheriting --l-color-text-secondary.\n * --text-color still wins here, overriding contrast-color()'s choice.\n * (The earlier `… vs black, white to AA` extended syntax was dropped from the spec.) */\n@supports (color: contrast-color(red)) {\n .base {\n color: var(--text-color, contrast-color(var(--color)));\n }\n}\n\nbutton.base {\n cursor: pointer;\n}\n\nbutton.base:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 2px;\n}\n\nbutton.base:hover {\n box-shadow: inset 0 0 0 1.5px var(--l-color-border-interactive);\n}\n\n@container style(--appearance: circle) {\n .base {\n border-radius: 50%;\n }\n}\n","import { html, nothing, svg, unsafeCSS } from 'lit';\nimport { LuxenElement } from '../../shared/luxen-element.js';\nimport { html as staticHtml, literal } from 'lit/static-html.js';\nimport { property, state } from 'lit/decorators.js';\nimport hostStyles from '../../shared/styles/host.styles.js';\nimport rawStyles from './avatar.css?inline';\n\nconst styles = unsafeCSS(rawStyles);\n\n/**\n * Extracts up to two uppercase initials from a name: the first letter of the\n * first word, plus the first letter of the last word when there is more than one.\n *\n * Splits on whitespace rather than relying on a `\\b`/`\\w` regex, which only\n * recognises ASCII and mangles accented or non-ASCII names.\n *\n * @param name - The name to extract initials from. Defaults to an empty string.\n * @return The uppercased initials, or an empty string when `name` is blank.\n *\n * @example getInitials('John Doe') // 'JD'\n * @example getInitials('Markus Nösterer') // 'MN' (accents preserved)\n * @example getInitials('Cher') // 'C' (single word → one initial)\n * @example getInitials(' John Doe ') // 'JD' (extra whitespace ignored)\n * @example getInitials('') // ''\n */\nfunction getInitials(name: string = ''): string {\n const words = name.normalize('NFC').trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return '';\n\n // Spreading iterates by code point, so an accented letter (or an astral\n // character like an emoji) is taken whole instead of a broken half.\n // oxlint-disable-next-line typescript/no-misused-spread -- code-point-safe first char is the intent\n const firstLetter = (word: string) => [...word][0];\n\n const first = firstLetter(words[0]);\n const last = words.length > 1 ? firstLetter(words[words.length - 1]) : '';\n return (first + last).toUpperCase();\n}\n\nconst defaultIcon = svg`<svg class=\"icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z\" />\n</svg>`;\n\n/**\n * @summary An avatar component for displaying user images, initials, or a default icon.\n * @customElement l-avatar\n *\n * @cssproperty [--size=40px] - Box size (any length). Set it inline (e.g. `style=\"--size: 20px\"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.\n * @cssproperty --color - Background fill color for initials and the default icon.\n * @cssproperty --text-color - Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).\n * @cssproperty --appearance - Set to `circle` for a fully circular avatar (default is a rounded square).\n *\n * @csspart base - The avatar container that paints `--color`; style it (e.g. `color`) to override the auto-derived text color.\n *\n * @cssClass .l-avatar-group - Flex wrapper that overlaps a row of stacked avatars.\n */\nexport class Avatar extends LuxenElement {\n static styles = [hostStyles, styles];\n\n /** Image URL. Falls back to initials (then the default icon) if it fails to load. */\n @property()\n src = '';\n\n /** Name used as the accessible label and to derive the initials fallback. */\n @property()\n name = '';\n\n /** Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`. */\n @property({ reflect: true })\n size = 'md';\n\n /** Count shown in the corner badge. `0` hides the badge. */\n @property({ type: Number })\n badge = 0;\n\n /** Render as a `<button>` with focus ring and hover states. */\n @property({ type: Boolean, reflect: true })\n interactive = false;\n\n @state() private _hasError = false;\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('src')) {\n this._hasError = false;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.interactive && !this.hasAttribute('role')) {\n this.setAttribute('role', 'img');\n }\n }\n\n updated() {\n // An interactive avatar renders a focusable <button>, and a role=\"img\" node\n // must stay a leaf in the accessibility tree — so the host carries no role\n // or label and the inner button holds the accessible name (see render()).\n if (this.interactive) {\n if (this.getAttribute('role') === 'img') this.removeAttribute('role');\n this.removeAttribute('aria-label');\n } else {\n if (!this.hasAttribute('role')) this.setAttribute('role', 'img');\n if (this.name) this.setAttribute('aria-label', this.name);\n }\n\n const isCircle = getComputedStyle(this).getPropertyValue('--appearance').trim() === 'circle';\n this.style.borderRadius = isCircle ? '50%' : '';\n }\n\n private get _tag() {\n return this.interactive ? literal`button` : literal`div`;\n }\n\n render() {\n const content =\n this.src && !this._hasError\n ? html`<img\n src=${this.src}\n alt=${this.name || ''}\n @error=${this._onError}\n />`\n : this.name\n ? html`<span class=\"initials\">${getInitials(this.name)}</span>`\n : html`<slot>${defaultIcon}</slot>`;\n\n return staticHtml`\n <${this._tag}\n class=\"base\"\n part=\"base\"\n type=${this.interactive ? 'button' : nothing}\n aria-label=${this.interactive && this.name ? this.name : nothing}\n >\n ${content}\n </${this._tag}>\n ${\n this.badge\n ? html`<div\n class=\"badge\"\n aria-hidden=\"true\"\n >\n ${this.badge}\n </div>`\n : nothing\n }\n `;\n }\n\n private _onError = () => {\n this._hasError = true;\n };\n}\n"],"mappings":"A,oUCOA,IAAMiB,EAASjB,EAAUC,koEAAS,EAkBlC,SAASiB,EAAY,EAAe,GAAY,CAC9C,IAAMC,EAAQC,EAAK,UAAU,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO,EACtE,GAAID,EAAM,SAAW,EAAG,MAAO,GAK/B,IAAME,EAAe,GAAiB,CAAC,GAAGC,CAAI,CAAC,CAAC,GAIhD,OAFcD,EAAYF,EAAM,EAExB,GADKA,EAAM,OAAS,EAAIE,EAAYF,EAAMA,EAAM,OAAS,EAAE,EAAI,IAAA,CACjD,YAAY,CACpC,CAEA,IAAMI,EAAc,CAAG;;QAiBVC,EAAb,cAA4BC,CAAa,C,8BAKjC,KAAA,IAAA,GAIC,KAAA,KAAA,GAIA,KAAA,KAAA,KAIC,KAAA,MAAA,EAIM,KAAA,YAAA,GAEe,KAAA,UAAA,GAqEJ,KAAA,aAAA,CACvB,KAAK,UAAY,EACnB,C,QA7FgB,KAAA,OAAA,CAACvB,EAAYe,CAAM,C,CAwBnC,WAAW,EAA+B,CACpCU,EAAQ,IAAI,KAAK,IACnB,KAAK,UAAY,GAErB,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EACpB,CAAC,KAAK,aAAe,CAAC,KAAK,aAAa,MAAM,GAChD,KAAK,aAAa,OAAQ,KAAK,CAEnC,CAEA,SAAU,CAIJ,KAAK,aACH,KAAK,aAAa,MAAM,IAAM,OAAO,KAAK,gBAAgB,MAAM,EACpE,KAAK,gBAAgB,YAAY,IAE5B,KAAK,aAAa,MAAM,GAAG,KAAK,aAAa,OAAQ,KAAK,EAC3D,KAAK,MAAM,KAAK,aAAa,aAAc,KAAK,IAAI,GAG1D,IAAMC,EAAW,iBAAiB,IAAI,CAAC,CAAC,iBAAiB,cAAc,CAAC,CAAC,KAAK,IAAM,SACpF,KAAK,MAAM,aAAeA,EAAW,MAAQ,EAC/C,CAEA,IAAY,MAAO,CACjB,OAAO,KAAK,YAAc,CAAO,SAAW,CAAO,KACrD,CAEA,QAAS,CACP,IAAMC,EACJ,KAAK,KAAO,CAAC,KAAK,UACd,CAAI;kBACI,KAAK,IAAI;kBACT,KAAK,MAAQ,GAAG;qBACb,KAAK,SAAS;cAEzB,KAAK,KACH,CAAI,0BAA0BX,EAAY,KAAK,IAAI,EAAE,SACrD,CAAI,SAASK,EAAY,SAEjC,MAAO,EAAU;SACZ,KAAK,KAAK;;;eAGJ,KAAK,YAAc,SAAWpB,EAAQ;qBAChC,KAAK,aAAe,KAAK,KAAO,KAAK,KAAOA,EAAQ;;UAE/D0B,EAAQ;UACR,KAAK,KAAK;QAEZ,KAAK,MACD,CAAI;;;;gBAIA,KAAK,MAAM;oBAEf1B,EACL;KAEL,CAKF,EA3FGC,EAAA,CAAAC,EAAS,CAAA,EAAAmB,EAAA,UAAA,MAAA,IAAA,EAAA,EAITpB,EAAA,CAAAC,EAAS,CAAA,EAAAmB,EAAA,UAAA,OAAA,IAAA,EAAA,EAITpB,EAAA,CAAAC,EAAS,CAAE,QAAS,EAAK,CAAC,CAAA,EAAAmB,EAAA,UAAA,OAAA,IAAA,EAAA,EAI1BpB,EAAA,CAAAC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAmB,EAAA,UAAA,QAAA,IAAA,EAAA,EAIzBpB,EAAA,CAAAC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAmB,EAAA,UAAA,cAAA,IAAA,EAAA,EAGzCpB,EAAA,CAAAE,EAAM,CAAA,EAAAkB,EAAA,UAAA,YAAA,IAAA,EAAA,E"}
1
+ {"version":3,"file":"avatar.js","names":["unsafeCSS","rawStyles","hostStyles","nothing","_decorate","property","state","r","b","w","A","u","i","r$1","n","__decorate","host_styles_default","styles","getInitials","words","name","firstLetter","word","defaultIcon","Avatar","LuxenElement","_args","changed","isCircle","content"],"sources":["../../../src/html/elements/avatar/avatar.css?inline","../../../src/html/elements/avatar/avatar.ts"],"sourcesContent":[":host {\n --size: 40px;\n --_font-size: calc(var(--size) * 0.4);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n border-radius: calc(var(--size) * 0.15);\n isolation: isolate;\n vertical-align: middle;\n flex-shrink: 0;\n color: var(--l-color-text-secondary);\n}\n\n:host([size='xs']) {\n --size: 24px;\n --_font-size: 0.75rem;\n}\n:host([size='sm']) {\n --size: 32px;\n --_font-size: 0.875rem;\n}\n:host([size='lg']) {\n --size: 48px;\n --_font-size: 1.25rem;\n}\n:host([size='xl']) {\n --size: 56px;\n --_font-size: 1.25rem;\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.initials {\n margin: auto;\n}\n\n.icon {\n width: 60%;\n height: 60%;\n color: currentColor;\n}\n\n.badge {\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 1;\n height: 12px;\n min-width: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: 2px;\n border-radius: 3px;\n box-shadow: 0 0 0 2px var(--l-color-surface);\n background-color: var(--l-color-surface);\n font-size: 0.625rem;\n font-weight: var(--l-font-weight-medium);\n font-variant-numeric: tabular-nums;\n line-height: 1;\n color: var(--l-color-text-primary);\n overflow: hidden;\n}\n\n/*\n * Inset ring via ::after so it renders on top of the <img>.\n * A box-shadow on :host would be covered by the image since\n * it fills the entire element with object-fit: cover.\n */\n.base::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 7%), oklch(100% 0 0 / 10%));\n pointer-events: none;\n}\n\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: calc(var(--size) * 0.15);\n background-color: var(--color, var(--l-color-bg-fill-neutral-soft));\n /*\n * Text over --color, decided by the background's own luminance — never the\n * document mode, since --color is consumer-set and ignores light/dark.\n * The contrast-color() block below is the primary path (Baseline 2026); this\n * --_on calc() is the fallback for browsers predating it (Chrome ≤146,\n * Safari <26, Firefox <146). It approximates WCAG relative luminance with\n * squared sRGB channels (a cheap linearization, Rec. 709 weights) and flips at\n * 0.2, just above the black/white crossover (~0.179) to offset squaring\n * underestimating mid-tones — holding AA across saturated brand colors where an\n * OKLCH-lightness threshold collapses to ≈1:1 (OKLCH L tracks hue, not\n * luminance: a mid red reads \"light\" yet needs white text). --text-color lets\n * consumers force a specific brand text color, overriding both paths.\n */\n --_on: calc(\n 255 *\n (\n 1 -\n sign(\n 0.2126 * (r / 255) * (r / 255) + 0.7152 * (g / 255) * (g / 255) + 0.0722 * (b / 255) *\n (b / 255) - 0.2\n )\n ) /\n 2\n );\n color: var(--text-color, rgb(from var(--color) var(--_on) var(--_on) var(--_on)));\n font-size: var(--_font-size);\n font-weight: var(--l-font-weight-medium);\n line-height: 1;\n text-transform: uppercase;\n padding: 0;\n cursor: inherit;\n}\n\n/* Primary path: native, guaranteed-contrast black/white. contrast-color() is\n * Baseline Newly Available (2026) — Safari 26+, Firefox 146+, Chrome/Edge 147+ —\n * and supersedes the luminance approximation above where supported. @supports (not\n * declaration order) is required: the value contains var(), so a non-supporting\n * browser would treat contrast-color() as invalid-at-computed-value-time and reset\n * to `inherit` rather than falling back to the calc() line. No bg fallback inside,\n * so a bare avatar (no --color) keeps inheriting --l-color-text-secondary.\n * --text-color still wins here, overriding contrast-color()'s choice.\n * (The earlier `… vs black, white to AA` extended syntax was dropped from the spec.) */\n@supports (color: contrast-color(red)) {\n .base {\n color: var(--text-color, contrast-color(var(--color)));\n }\n}\n\nbutton.base {\n cursor: pointer;\n}\n\nbutton.base:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring-color);\n outline-offset: var(--l-focus-ring-offset);\n}\n\nbutton.base:hover {\n box-shadow: inset 0 0 0 1.5px var(--l-color-border-interactive);\n}\n\n@container style(--appearance: circle) {\n .base {\n border-radius: 50%;\n }\n}\n","import { html, nothing, svg, unsafeCSS } from 'lit';\nimport { LuxenElement } from '../../shared/luxen-element.js';\nimport { html as staticHtml, literal } from 'lit/static-html.js';\nimport { property, state } from 'lit/decorators.js';\nimport hostStyles from '../../shared/styles/host.styles.js';\nimport rawStyles from './avatar.css?inline';\n\nconst styles = unsafeCSS(rawStyles);\n\n/**\n * Extracts up to two uppercase initials from a name: the first letter of the\n * first word, plus the first letter of the last word when there is more than one.\n *\n * Splits on whitespace rather than relying on a `\\b`/`\\w` regex, which only\n * recognises ASCII and mangles accented or non-ASCII names.\n *\n * @param name - The name to extract initials from. Defaults to an empty string.\n * @return The uppercased initials, or an empty string when `name` is blank.\n *\n * @example getInitials('John Doe') // 'JD'\n * @example getInitials('Markus Nösterer') // 'MN' (accents preserved)\n * @example getInitials('Cher') // 'C' (single word → one initial)\n * @example getInitials(' John Doe ') // 'JD' (extra whitespace ignored)\n * @example getInitials('') // ''\n */\nfunction getInitials(name: string = ''): string {\n const words = name.normalize('NFC').trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return '';\n\n // Spreading iterates by code point, so an accented letter (or an astral\n // character like an emoji) is taken whole instead of a broken half.\n // oxlint-disable-next-line typescript/no-misused-spread -- code-point-safe first char is the intent\n const firstLetter = (word: string) => [...word][0];\n\n const first = firstLetter(words[0]);\n const last = words.length > 1 ? firstLetter(words[words.length - 1]) : '';\n return (first + last).toUpperCase();\n}\n\nconst defaultIcon = svg`<svg class=\"icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n <path d=\"M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z\" />\n</svg>`;\n\n/**\n * @summary An avatar component for displaying user images, initials, or a default icon.\n * @customElement l-avatar\n *\n * @cssproperty [--size=40px] - Box size (any length). Set it inline (e.g. `style=\"--size: 20px\"`) for an arbitrary size beyond the `size` token scale; the font then follows proportionally. The `size` attribute sets it to the matching token.\n * @cssproperty --color - Background fill color for initials and the default icon.\n * @cssproperty --text-color - Initials/icon color over `--color`. Defaults to an auto-derived readable color; set it to enforce a specific brand color (overrides the automatic choice).\n * @cssproperty --appearance - Set to `circle` for a fully circular avatar (default is a rounded square).\n *\n * @csspart base - The avatar container that paints `--color`; style it (e.g. `color`) to override the auto-derived text color.\n *\n * @cssClass .l-avatar-group - Flex wrapper that overlaps a row of stacked avatars.\n */\nexport class Avatar extends LuxenElement {\n static styles = [hostStyles, styles];\n\n /** Image URL. Falls back to initials (then the default icon) if it fails to load. */\n @property()\n src = '';\n\n /** Name used as the accessible label and to derive the initials fallback. */\n @property()\n name = '';\n\n /** Avatar size: `xs`, `sm`, `md` (default), `lg`, or `xl`. */\n @property({ reflect: true })\n size = 'md';\n\n /** Count shown in the corner badge. `0` hides the badge. */\n @property({ type: Number })\n badge = 0;\n\n /** Render as a `<button>` with focus ring and hover states. */\n @property({ type: Boolean, reflect: true })\n interactive = false;\n\n @state() private _hasError = false;\n\n willUpdate(changed: Map<string, unknown>) {\n if (changed.has('src')) {\n this._hasError = false;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!this.interactive && !this.hasAttribute('role')) {\n this.setAttribute('role', 'img');\n }\n }\n\n updated() {\n // An interactive avatar renders a focusable <button>, and a role=\"img\" node\n // must stay a leaf in the accessibility tree — so the host carries no role\n // or label and the inner button holds the accessible name (see render()).\n if (this.interactive) {\n if (this.getAttribute('role') === 'img') this.removeAttribute('role');\n this.removeAttribute('aria-label');\n } else {\n if (!this.hasAttribute('role')) this.setAttribute('role', 'img');\n if (this.name) this.setAttribute('aria-label', this.name);\n }\n\n const isCircle = getComputedStyle(this).getPropertyValue('--appearance').trim() === 'circle';\n this.style.borderRadius = isCircle ? '50%' : '';\n }\n\n private get _tag() {\n return this.interactive ? literal`button` : literal`div`;\n }\n\n render() {\n const content =\n this.src && !this._hasError\n ? html`<img\n src=${this.src}\n alt=${this.name || ''}\n @error=${this._onError}\n />`\n : this.name\n ? html`<span class=\"initials\">${getInitials(this.name)}</span>`\n : html`<slot>${defaultIcon}</slot>`;\n\n return staticHtml`\n <${this._tag}\n class=\"base\"\n part=\"base\"\n type=${this.interactive ? 'button' : nothing}\n aria-label=${this.interactive && this.name ? this.name : nothing}\n >\n ${content}\n </${this._tag}>\n ${\n this.badge\n ? html`<div\n class=\"badge\"\n aria-hidden=\"true\"\n >\n ${this.badge}\n </div>`\n : nothing\n }\n `;\n }\n\n private _onError = () => {\n this._hasError = true;\n };\n}\n"],"mappings":"A,oUCOA,IAAMiB,EAASjB,EAAUC,+pEAAS,EAkBlC,SAASiB,EAAY,EAAe,GAAY,CAC9C,IAAMC,EAAQC,EAAK,UAAU,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO,EACtE,GAAID,EAAM,SAAW,EAAG,MAAO,GAK/B,IAAME,EAAe,GAAiB,CAAC,GAAGC,CAAI,CAAC,CAAC,GAIhD,OAFcD,EAAYF,EAAM,EAExB,GADKA,EAAM,OAAS,EAAIE,EAAYF,EAAMA,EAAM,OAAS,EAAE,EAAI,IAAA,CACjD,YAAY,CACpC,CAEA,IAAMI,EAAc,CAAG;;QAiBVC,EAAb,cAA4BC,CAAa,C,8BAKjC,KAAA,IAAA,GAIC,KAAA,KAAA,GAIA,KAAA,KAAA,KAIC,KAAA,MAAA,EAIM,KAAA,YAAA,GAEe,KAAA,UAAA,GAqEJ,KAAA,aAAA,CACvB,KAAK,UAAY,EACnB,C,QA7FgB,KAAA,OAAA,CAACvB,EAAYe,CAAM,C,CAwBnC,WAAW,EAA+B,CACpCU,EAAQ,IAAI,KAAK,IACnB,KAAK,UAAY,GAErB,CAEA,mBAAoB,CAClB,MAAM,kBAAkB,EACpB,CAAC,KAAK,aAAe,CAAC,KAAK,aAAa,MAAM,GAChD,KAAK,aAAa,OAAQ,KAAK,CAEnC,CAEA,SAAU,CAIJ,KAAK,aACH,KAAK,aAAa,MAAM,IAAM,OAAO,KAAK,gBAAgB,MAAM,EACpE,KAAK,gBAAgB,YAAY,IAE5B,KAAK,aAAa,MAAM,GAAG,KAAK,aAAa,OAAQ,KAAK,EAC3D,KAAK,MAAM,KAAK,aAAa,aAAc,KAAK,IAAI,GAG1D,IAAMC,EAAW,iBAAiB,IAAI,CAAC,CAAC,iBAAiB,cAAc,CAAC,CAAC,KAAK,IAAM,SACpF,KAAK,MAAM,aAAeA,EAAW,MAAQ,EAC/C,CAEA,IAAY,MAAO,CACjB,OAAO,KAAK,YAAc,CAAO,SAAW,CAAO,KACrD,CAEA,QAAS,CACP,IAAMC,EACJ,KAAK,KAAO,CAAC,KAAK,UACd,CAAI;kBACI,KAAK,IAAI;kBACT,KAAK,MAAQ,GAAG;qBACb,KAAK,SAAS;cAEzB,KAAK,KACH,CAAI,0BAA0BX,EAAY,KAAK,IAAI,EAAE,SACrD,CAAI,SAASK,EAAY,SAEjC,MAAO,EAAU;SACZ,KAAK,KAAK;;;eAGJ,KAAK,YAAc,SAAWpB,EAAQ;qBAChC,KAAK,aAAe,KAAK,KAAO,KAAK,KAAOA,EAAQ;;UAE/D0B,EAAQ;UACR,KAAK,KAAK;QAEZ,KAAK,MACD,CAAI;;;;gBAIA,KAAK,MAAM;oBAEf1B,EACL;KAEL,CAKF,EA3FGC,EAAA,CAAAC,EAAS,CAAA,EAAAmB,EAAA,UAAA,MAAA,IAAA,EAAA,EAITpB,EAAA,CAAAC,EAAS,CAAA,EAAAmB,EAAA,UAAA,OAAA,IAAA,EAAA,EAITpB,EAAA,CAAAC,EAAS,CAAE,QAAS,EAAK,CAAC,CAAA,EAAAmB,EAAA,UAAA,OAAA,IAAA,EAAA,EAI1BpB,EAAA,CAAAC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAAAmB,EAAA,UAAA,QAAA,IAAA,EAAA,EAIzBpB,EAAA,CAAAC,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,CAAA,EAAAmB,EAAA,UAAA,cAAA,IAAA,EAAA,EAGzCpB,EAAA,CAAAE,EAAM,CAAA,EAAAkB,EAAA,UAAA,YAAA,IAAA,EAAA,E"}
@@ -1,4 +1,4 @@
1
- import{i as e}from"../../chunks/lit.js";import{n as t,r as n,t as r}from"../../chunks/decorate.js";import{t as i}from"../../chunks/query.js";import{a,t as o}from"../../chunks/lit-html.js";import{t as s}from"../../chunks/map.js";import{LuxenElement as c}from"../../shared/luxen-element.js";import{LocalizeController as l}from"../../shared/localize.js";import u from"../../shared/styles/host.styles.js";function d(e){return typeof e==`number`}function f(e){return typeof e==`string`}function p(e){return typeof e==`boolean`}function m(e){return Object.prototype.toString.call(e)===`[object Object]`}function h(e){return Math.abs(e)}function g(e){return Math.sign(e)}function _(e,t){return h(e-t)}function v(e,t){return e===0||t===0||h(e)<=h(t)?0:h(_(h(e),h(t))/e)}function y(e){return Math.round(e*100)/100}function b(e){return T(e).map(Number)}function x(e){return e[S(e)]}function S(e){return Math.max(0,e.length-1)}function C(e,t){return t===S(e)}function w(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function T(e){return Object.keys(e)}function E(e,t){return[e,t].reduce((e,t)=>(T(t).forEach(n=>{let r=e[n],i=t[n];e[n]=m(r)&&m(i)?E(r,i):i}),e),{})}function D(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function O(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return f(e)?n[e](r):e(t,r,i)}return{measure:o}}function k(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function A(e,t,n,r){let i=k(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function j(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function M(e=0,t=0){let n=h(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function ee(e,t,n){let{constrain:r}=M(0,e),i=e+1,a=o(t);function o(e){return n?h((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return ee(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function te(e,t,n,r,i,a,o,s,c,l,u,d,f,m,y,b,x,S,C){let{cross:w,direction:T}=e,E=[`INPUT`,`SELECT`,`TEXTAREA`],O={passive:!1},A=k(),j=k(),ee=M(50,225).constrain(m.measure(20)),te={mouse:300,touch:400},ne={mouse:500,touch:600},re=y?43:25,ie=!1,ae=0,N=0,P=!1,F=!1,I=!1,L=!1;function oe(e){if(!C)return;function n(t){(p(C)||C(e,t))&&z(t)}let r=t;A.add(r,`dragstart`,e=>e.preventDefault(),O).add(r,`touchmove`,()=>void 0,O).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,V).add(r,`contextmenu`,V).add(r,`click`,de,!0)}function se(){A.clear(),j.clear()}function ce(){let e=L?n:t;j.add(e,`touchmove`,B,O).add(e,`touchend`,V).add(e,`mousemove`,B,O).add(e,`mouseup`,V)}function le(e){let t=e.nodeName||``;return E.includes(t)}function R(){return(y?ne:te)[L?`mouse`:`touch`]}function ue(e,t){let n=d.add(g(e)*-1),r=u.byDistance(e,!y).distance;return y||h(e)<ee?r:x&&t?r*.5:u.byIndex(n.get(),0).distance}function z(e){let t=D(e,r);L=t,I=y&&t&&!e.buttons&&ie,ie=_(i.get(),o.get())>=2,t&&e.button!==0||le(e.target)||(P=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),ce(),ae=a.readPoint(e),N=a.readPoint(e,w),f.emit(`pointerDown`))}function B(e){if(!D(e,r)&&e.touches.length>=2)return V(e);let t=a.readPoint(e),n=a.readPoint(e,w),o=_(t,ae),c=_(n,N);if(!F&&!L&&(!e.cancelable||(F=o>c,!F)))return V(e);let u=a.pointerMove(e);o>b&&(I=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(T(u)),e.preventDefault()}function V(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*R(),r=ue(T(n),t),i=v(n,r),o=re-10*i,s=S+i/50;F=!1,P=!1,j.clear(),l.useDuration(o).useFriction(s),c.distance(r,!y),L=!1,f.emit(`pointerUp`)}function de(e){I&&=(e.stopPropagation(),e.preventDefault(),!1)}function fe(){return P}return{init:oe,destroy:se,pointerDown:fe}}function ne(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(D(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&h(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function re(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function ie(e){function t(t){return t/100*e}return{measure:t}}function ae(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function m(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(h(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(p(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function g(){d=!0,c&&c.disconnect()}return{init:m,destroy:g}}function N(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=g(a),d=u,C}function p(){return h(r.get()-t.get())<.001}function m(){return c}function _(){return s}function v(){return o}function y(){return x(i)}function b(){return S(a)}function x(e){return c=e,C}function S(e){return l=e,C}let C={direction:_,duration:m,velocity:v,seek:f,settled:p,useBaseFriction:b,useBaseDuration:y,useFriction:S,useDuration:x};return C}function P(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=M(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=h(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&h(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function F(e,t,n,r,i){let a=M(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return _(e,t)<=1}function u(){let e=o[0],t=x(o);return M(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=C(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function I(e,t,n){let r=t[0];return{limit:M(n?r-e:x(t),r)}}function L(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=M(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1&&a(n.get())}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function oe(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function se(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>x(e)[o]-e[0][a]).map(h)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-h(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function ce(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=C(n,t);return r?w(x(n[0])+1):i?w(S(a)-x(n)[0]+1,x(n)[0]):e})}return{slideRegistry:l}}function le(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>h(e)-h(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>h(e.diff)-h(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>g(e)===r);return a.length?c(a):x(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function R(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function ue(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function m(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));d(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,f,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(p(s)||s(u,e))&&m(t)},c)})}function f(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function z(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return d(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function B(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=y(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function V(e,t,n,r,i,a,o,s,c){let l=.5,u=b(i),d=b(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:z(-1),translate:B(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){let e=t-o[0]-1;return g(m(u,e),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function x(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function S(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:S,loop:x,loopPoints:f}}function de(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(p(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function fe(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return T(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function pe(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=g(),f=n.map(o),p=_();function m(){if(!l)return 0;let e=n[0];return h(t[s]-e[s])}function g(){if(!l)return 0;let e=a.getComputedStyle(x(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function _(){return n.map((e,t,n)=>{let r=!t,i=C(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(h)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function me(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:f}=e,p=d(n);function m(e,t){return b(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function g(e){return e.length?b(e).reduce((n,d,p)=>{let m=x(n)||0,g=m===0,_=d===S(e),v=i[l]-a[m][l],y=i[l]-a[d][u],b=!r&&g?f(o):0,C=h(y-(!r&&_?f(s):0)-(v+b));return p&&C>t+c&&n.push(d),_&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function _(e){return p?m(e,n):g(e)}return{groupSlides:_}}function H(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:C,watchDrag:w,watchFocus:T}=a,E=re(),D=E.measure(t),M=n.map(E.measure),H=j(c,l),U=H.measureSize(D),he=ie(U),ge=O(s,U),_e=!d&&!!v,{slideSizes:ve,slideSizesWithGaps:ye,startGap:be,endGap:xe}=pe(H,D,M,n,d||!!v,i),W=me(H,U,g,d,D,M,be,xe,2),{snaps:Se,snapsAligned:Ce}=se(H,ge,D,M,W),G=-x(Se)+x(ye),{snapsContained:we,scrollContainLimit:K}=F(U,G,Ce,v,2),q=_e?we:Ce,{limit:J}=I(G,q,d),Y=ee(S(q),u,d),Te=Y.clone(),Ee=b(n),De=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},Oe=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},ke=A(r,i,()=>De(Be),e=>Oe(Be,e)),Ae=.68,X=q[Y.get()],je=z(X),Me=z(X),Z=z(X),Q=z(X),$=N(je,Z,Me,Q,f,Ae),Ne=le(d,q,G,J,Q),Pe=R(ke,Y,Te,$,Ne,Q,o),Fe=oe(J),Ie=k(),Le=fe(t,n,o,h),{slideRegistry:Re}=ce(_e,v,q,K,W,Ee),ze=ue(e,n,Re,Pe,$,Ie,o,T),Be={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:D,slideRects:M,animation:ke,axis:H,dragHandler:te(H,e,r,i,Q,ne(H,i),je,ke,Pe,$,Ne,Y,o,he,p,m,_,Ae,w),eventStore:Ie,percentOfView:he,index:Y,indexPrevious:Te,limit:J,location:je,offsetLocation:Z,previousLocation:Me,options:a,resizeHandler:ae(t,o,i,n,H,y,E),scrollBody:$,scrollBounds:P(J,Z,Q,$,he),scrollLooper:L(G,J,Z,[je,Z,Me,Q]),scrollProgress:Fe,scrollSnapList:q.map(Fe.get),scrollSnaps:q,scrollTarget:Ne,scrollTo:Pe,slideLooper:V(H,U,G,ve,ye,Se,q,Z,n),slideFocus:ze,slidesHandler:de(t,o,C),slidesInView:Le,slideIndexes:Ee,slideRegistry:Re,slidesToScroll:W,target:Q,translate:B(H,t)};return Be}function U(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var he={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function ge(e){function t(e,t){return E(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,T(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>T(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function _e(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function ve(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=ge(i),o=_e(a),s=k(),c=U(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:p,off:m,emit:h}=c,g=O,_=!1,v,y=l(he,ve.globalOptions),b=l(y),x=[],S,C,w;function T(){let{container:t,slides:n}=b;C=(f(t)?e.querySelector(t):t)||e.children[0];let r=f(n)?C.querySelectorAll(n):n;w=[].slice.call(r||C.children)}function E(t){let n=H(e,C,w,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):n}function D(e,t){_||(y=l(y,e),b=u(y),x=t||x,T(),v=E(b),d([y,...x.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,O)),b.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(R),v.eventHandler.init(R),v.resizeHandler.init(R),v.slidesHandler.init(R),v.options.loop&&v.slideLooper.loop(),C.offsetParent&&w.length&&v.dragHandler.init(R),S=o.init(R,x)))}function O(e,t){let n=N();A(),D(l({startIndex:n},e),t),c.emit(`reInit`)}function A(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),o.destroy(),s.clear()}function j(){_||(_=!0,s.clear(),A(),c.emit(`destroy`),c.clear())}function M(e,t,n){b.active&&!_&&(v.scrollBody.useBaseFriction().useDuration(t===!0?0:b.duration),v.scrollTo.index(e,n||0))}function ee(e){M(v.index.add(1).get(),e,-1)}function te(e){M(v.index.add(-1).get(),e,1)}function ne(){return v.index.add(1).get()!==N()}function re(){return v.index.add(-1).get()!==N()}function ie(){return v.scrollSnapList}function ae(){return v.scrollProgress.get(v.offsetLocation.get())}function N(){return v.index.get()}function P(){return v.indexPrevious.get()}function F(){return v.slidesInView.get()}function I(){return v.slidesInView.get(!1)}function L(){return S}function oe(){return v}function se(){return e}function ce(){return C}function le(){return w}let R={canScrollNext:ne,canScrollPrev:re,containerNode:ce,internalEngine:oe,destroy:j,off:m,on:p,emit:h,plugins:L,previousScrollSnap:P,reInit:g,rootNode:se,scrollNext:ee,scrollPrev:te,scrollProgress:ae,scrollSnapList:ie,scrollTo:M,selectedScrollSnap:N,slideNodes:le,slidesInView:F,slidesNotInView:I};return D(t,n),setTimeout(()=>c.emit(`init`),0),R}ve.globalOptions=void 0;var ye={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function be(e,t){let n=e.scrollSnapList();return typeof t==`number`?n.map(()=>t):t(n,e)}function xe(e,t){let n=e.rootNode();return t&&t(n)||n}function W(e={}){let t,n,r,i,a=null,o=0,s=!1,c=!1,l=!1,u=!1;function d(a,o){n=a;let{mergeOptions:s,optionsAtMedia:c}=o;if(t=c(s(s(ye,W.globalOptions),e)),n.scrollSnapList().length<=1)return;u=t.jump,r=!1,i=be(n,t.delay);let{eventStore:l,ownerDocument:d}=n.internalEngine(),f=!!n.internalEngine().options.watchDrag,p=xe(n,t.rootNode);l.add(d,`visibilitychange`,_),f&&n.on(`pointerDown`,y),f&&!t.stopOnInteraction&&n.on(`pointerUp`,b),t.stopOnMouseEnter&&l.add(p,`mouseenter`,x),t.stopOnMouseEnter&&!t.stopOnInteraction&&l.add(p,`mouseleave`,S),t.stopOnFocusIn&&n.on(`slideFocusStart`,g),t.stopOnFocusIn&&!t.stopOnInteraction&&l.add(n.containerNode(),`focusout`,h),t.playOnInit&&h()}function f(){n.off(`pointerDown`,y).off(`pointerUp`,b).off(`slideFocusStart`,g),g(),r=!0,s=!1}function p(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=e.setTimeout(D,i[n.selectedScrollSnap()]),a=new Date().getTime(),n.emit(`autoplay:timerset`)}function m(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=0,a=null,n.emit(`autoplay:timerstopped`)}function h(){r||(v()?l=!0:(s||n.emit(`autoplay:play`),p(),s=!0))}function g(){r||(s&&n.emit(`autoplay:stop`),m(),s=!1)}function _(){if(v())return l=s,g();l&&h()}function v(){let{ownerDocument:e}=n.internalEngine();return e.visibilityState===`hidden`}function y(){c||g()}function b(){c||h()}function x(){c=!0,g()}function S(){c=!1,h()}function C(e){e!==void 0&&(u=e),h()}function w(){s&&g()}function T(){s&&h()}function E(){return s}function D(){let{index:e}=n.internalEngine(),r=e.clone().add(1).get(),i=n.scrollSnapList().length-1,a=t.stopOnLastSnap&&r===i;if(n.canScrollNext()?n.scrollNext(u):n.scrollTo(0,u),n.emit(`autoplay:select`),a)return g();h()}function O(){return a?i[n.selectedScrollSnap()]-(new Date().getTime()-a):null}return{name:`autoplay`,options:e,init:d,destroy:f,play:C,stop:w,reset:T,isPlaying:E,timeUntilNext:O}}W.globalOptions=void 0;var Se=e(`:host{--slide-height:19rem;--slide-size:100%;--slide-gap:0;--button-size:48px;--button-arrow-size:20px;--button-arrow-color:#4b5563;--button-offset:8px;--button-border-color:#e5e7eb;--button-border-radius:8px;--button-bg:#fffc;--button-color:inherit;--button-box-shadow-hover:0 1px 2px #3c40434d, 0 1px 3px 1px #3c404326;--dot-color:#9ca3af;--dot-color-active:#111827;--dot-margin:.5rem 0;--dot-edge-scale:.5;--scrollbar-color:#d1d5db transparent;display:block;position:relative;container-type:inline-size}:host([single]){--slide-size:100%;--slide-gap:0}:host([axis=y]) .container{max-height:var(--slide-height);flex-direction:column}:host([axis=y]) .viewport{max-height:var(--slide-height)}.viewport{overflow:hidden}:host([with-scrollbar]) .viewport{scrollbar-color:var(--scrollbar-color);scrollbar-gutter:stable both-edges;scrollbar-width:thin;overflow-x:scroll}.container{backface-visibility:hidden;gap:var(--slide-gap);touch-action:pan-y pinch-zoom;display:flex}::slotted(l-carousel-item){flex:0 0 var(--slide-size);min-width:0}.scroll-buttons--inside{pointer-events:none;position:absolute;inset:0}.scroll-buttons--outside{justify-content:end;gap:8px;padding-block:8px;display:flex}.scroll-buttons--disabled,.inactive .scroll-buttons{display:none}.button-next,.button-previous,.button-fullscreen{appearance:none;touch-action:manipulation;border:1px solid var(--button-border-color);border-radius:var(--button-border-radius);width:var(--button-size);height:var(--button-size);background-color:var(--button-bg);color:var(--button-color);cursor:pointer;pointer-events:auto;-webkit-tap-highlight-color:#31313180;justify-content:center;align-items:center;display:flex}.scroll-buttons--inside .button-previous,.scroll-buttons--inside .button-next,.button-fullscreen{top:calc(50% - (var(--button-size) / 2));z-index:1;position:absolute}.scroll-buttons--inside .button-previous{left:var(--button-offset)}.scroll-buttons--inside .button-next{right:var(--button-offset)}.scroll-buttons--inside .button:disabled{visibility:hidden}.button:disabled{cursor:not-allowed;pointer-events:none;opacity:.4}.button-fullscreen{right:var(--button-offset);top:var(--button-offset);width:calc(var(--button-size) * .75);height:calc(var(--button-size) * .75);border-radius:4px}@container (width>=640px){.button-fullscreen{width:var(--button-size);height:var(--button-size)}}@media (hover:hover){.button:hover:not(:disabled){box-shadow:var(--button-box-shadow-hover)}}.button svg{width:var(--button-arrow-size);height:var(--button-arrow-size);color:var(--button-arrow-color)}.dots{margin:var(--dot-margin);justify-content:center;display:flex}.dot{appearance:none;touch-action:manipulation;cursor:pointer;transform-origin:50%;background:0 0;border:0;place-items:center;padding-block:.5rem;padding-inline:.25rem;transition:transform .18s;display:inline-flex}.dot[data-edge]{transform:scale(var(--dot-edge-scale))}.dot--bar i{background:var(--dot-color);width:1rem;height:.125rem}.dot--selected i{background:var(--dot-color-active)}.dot--circle i{border:2px solid var(--dot-color-active);border-radius:8px;width:10px;height:10px;display:inline-block}.dot--circle.dot--selected i{width:30px}`),Ce=class extends Event{constructor(e){super(`select`,{bubbles:!0,composed:!1,cancelable:!1}),this.index=e}},G=class extends Event{constructor(e){super(`slides-in-view`,{bubbles:!1,composed:!1,cancelable:!1}),this.indexes=e}},we=class extends Event{constructor(){super(`fullscreen`,{bubbles:!1,composed:!1,cancelable:!1})}},K=class extends c{constructor(...e){super(...e),this._localize=new l(this),this.#e=0,this.#n=`x`,this.#r=`start`,this.#i={},this.#a=!1,this.#o=!1,this.#s=20,this.#c=!1,this.#l=1,this.#u=0,this.#d=`trimSnaps`,this.#f=!1,this.#p=!1,this.#m=!1,this.#h=!1,this.#g=`bar`,this.#_=0,this.#v=`inside`,this.#y=0,this.onSlidesInView=()=>{this.dispatchEvent(new G(this.embla.slidesInView()))},this.onInit=()=>{this.updateNavigation()},this.onReInit=()=>{this.updateNavigation(),this.requestUpdate()},this.onSelect=()=>{this.dispatchEvent(new Ce(this.embla.selectedScrollSnap())),this.updateNavigation()},this.onResize=()=>{this.requestUpdate()},this.detachEventListeners=()=>{this.previousBtn.removeEventListener(`click`,this.previous),this.nextBtn.removeEventListener(`click`,this.next)},this.handleSlotChange=e=>{e.target.assignedElements().length>0&&this.embla.reInit(this.options())},this.handleDotClick=e=>{let t=e.currentTarget;this.goToSlide(Number(t.dataset.index))},this.next=()=>{this.embla.scrollNext()},this.previous=()=>{this.embla.scrollPrev()}}static{this.styles=[u,Se]}#e;get autoplay(){return this.#e}set autoplay(e){this.#e=e}#t;get autoplayOptions(){return this.#t}set autoplayOptions(e){this.#t=e}#n;get axis(){return this.#n}set axis(e){this.#n=e}#r;get align(){return this.#r}set align(e){this.#r=e}#i;get breakpoints(){return this.#i}set breakpoints(e){this.#i=e}#a;get loop(){return this.#a}set loop(e){this.#a=e}#o;get dragFree(){return this.#o}set dragFree(e){this.#o=e}#s;get duration(){return this.#s}set duration(e){this.#s=e}#c;get skipSnaps(){return this.#c}set skipSnaps(e){this.#c=e}#l;get slidesToScroll(){return this.#l}set slidesToScroll(e){this.#l=e}#u;get startIndex(){return this.#u}set startIndex(e){this.#u=e}#d;get containScroll(){return this.#d}set containScroll(e){this.#d=e}#f;get single(){return this.#f}set single(e){this.#f=e}#p;get withDots(){return this.#p}set withDots(e){this.#p=e}#m;get withScrollbar(){return this.#m}set withScrollbar(e){this.#m=e}#h;get withFullscreen(){return this.#h}set withFullscreen(e){this.#h=e}#g;get dotAppearance(){return this.#g}set dotAppearance(e){this.#g=e}#_;get maxVisibleDots(){return this.#_}set maxVisibleDots(e){this.#_=e}#v;get scrollButtonsPosition(){return this.#v}set scrollButtonsPosition(e){this.#v=e}#y;get _selectedSnap(){return this.#y}set _selectedSnap(e){this.#y=e}connectedCallback(){super.connectedCallback(),this.createEmbla()}disconnectedCallback(){super.disconnectedCallback(),this.embla&&this.embla.destroy()}firstUpdated(){this.attachEventListeners()}createEmbla(){this.embla=ve(this,this.options()),this.embla.on(`init`,this.onInit).on(`reInit`,this.onReInit).on(`resize`,this.onResize).on(`slidesInView`,this.onSlidesInView).on(`select`,this.onSelect).on(`destroy`,this.detachEventListeners)}attachEventListeners(){this.previousBtn.addEventListener(`click`,this.previous),this.nextBtn.addEventListener(`click`,this.next)}updateNavigation(){let e=this.embla.canScrollPrev()||this.embla.canScrollNext();this.previousBtn.toggleAttribute(`disabled`,!this.embla.canScrollPrev()),this.nextBtn.toggleAttribute(`disabled`,!this.embla.canScrollNext()),this.scrollButtons.classList.toggle(`scroll-buttons--disabled`,!e),this._selectedSnap=this.embla.selectedScrollSnap()}async updated(e){e.has(`autoplay`)&&this.autoplay&&this.initAutoplay()}initAutoplay(){this.embla.reInit(this.options(),[W(this.autoplayOptions||{delay:this.autoplay})])}options(){let e=this.shadowRoot.querySelector(`slot`);return e?{container:e,slides:e.assignedElements(),containScroll:this.containScroll,breakpoints:this.breakpoints,axis:this.axis,align:this.align,dragFree:this.dragFree,duration:this.duration,loop:this.loop,slidesToScroll:this.slidesToScroll,skipSnaps:this.skipSnaps,startIndex:this.startIndex}:{container:this,slides:[]}}goToSlide(e,t){this.embla.scrollTo(e,t)}slideNodes(){this.embla.slideNodes()}slidesInView(){this.embla.slidesInView()}isActive(){return this.embla?.internalEngine().options.active}renderFullscreenButton(){return a`<button
1
+ import{i as e}from"../../chunks/lit.js";import{n as t,r as n,t as r}from"../../chunks/decorate.js";import{t as i}from"../../chunks/query.js";import{a,t as o}from"../../chunks/lit-html.js";import{t as s}from"../../chunks/map.js";import{LuxenElement as c}from"../../shared/luxen-element.js";import{LocalizeController as l}from"../../shared/localize.js";import u from"../../shared/styles/host.styles.js";function d(e){return typeof e==`number`}function f(e){return typeof e==`string`}function p(e){return typeof e==`boolean`}function m(e){return Object.prototype.toString.call(e)===`[object Object]`}function h(e){return Math.abs(e)}function g(e){return Math.sign(e)}function _(e,t){return h(e-t)}function v(e,t){return e===0||t===0||h(e)<=h(t)?0:h(_(h(e),h(t))/e)}function y(e){return Math.round(e*100)/100}function b(e){return T(e).map(Number)}function x(e){return e[S(e)]}function S(e){return Math.max(0,e.length-1)}function C(e,t){return t===S(e)}function w(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function T(e){return Object.keys(e)}function E(e,t){return[e,t].reduce((e,t)=>(T(t).forEach(n=>{let r=e[n],i=t[n];e[n]=m(r)&&m(i)?E(r,i):i}),e),{})}function D(e,t){return t.MouseEvent!==void 0&&e instanceof t.MouseEvent}function O(e,t){let n={start:r,center:i,end:a};function r(){return 0}function i(e){return a(e)/2}function a(e){return t-e}function o(r,i){return f(e)?n[e](r):e(t,r,i)}return{measure:o}}function k(){let e=[];function t(t,n,i,a={passive:!0}){let o;if(`addEventListener`in t)t.addEventListener(n,i,a),o=()=>t.removeEventListener(n,i,a);else{let e=t;e.addListener(i),o=()=>e.removeListener(i)}return e.push(o),r}function n(){e=e.filter(e=>e())}let r={add:t,clear:n};return r}function A(e,t,n,r){let i=k(),a=1e3/60,o=null,s=0,c=0;function l(){i.add(e,`visibilitychange`,()=>{e.hidden&&m()})}function u(){p(),i.clear()}function d(e){if(!c)return;o||(o=e,n(),n());let i=e-o;for(o=e,s+=i;s>=a;)n(),s-=a;r(s/a),c&&=t.requestAnimationFrame(d)}function f(){c||=t.requestAnimationFrame(d)}function p(){t.cancelAnimationFrame(c),o=null,s=0,c=0}function m(){o=null,s=0}return{init:l,destroy:u,start:f,stop:p,update:n,render:r}}function j(e,t){let n=t===`rtl`,r=e===`y`,i=r?`y`:`x`,a=r?`x`:`y`,o=!r&&n?-1:1,s=u(),c=d();function l(e){let{height:t,width:n}=e;return r?t:n}function u(){return r?`top`:n?`right`:`left`}function d(){return r?`bottom`:n?`left`:`right`}function f(e){return e*o}return{scroll:i,cross:a,startEdge:s,endEdge:c,measureSize:l,direction:f}}function M(e=0,t=0){let n=h(e-t);function r(t){return t<e}function i(e){return e>t}function a(e){return r(e)||i(e)}function o(n){return a(n)?r(n)?e:t:n}function s(e){return n?e-n*Math.ceil((e-t)/n):e}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function ee(e,t,n){let{constrain:r}=M(0,e),i=e+1,a=o(t);function o(e){return n?h((i+e)%i):r(e)}function s(){return a}function c(e){return a=o(e),d}function l(e){return u().set(s()+e)}function u(){return ee(e,s(),n)}let d={get:s,set:c,add:l,clone:u};return d}function te(e,t,n,r,i,a,o,s,c,l,u,d,f,m,y,b,x,S,C){let{cross:w,direction:T}=e,E=[`INPUT`,`SELECT`,`TEXTAREA`],O={passive:!1},A=k(),j=k(),ee=M(50,225).constrain(m.measure(20)),te={mouse:300,touch:400},ne={mouse:500,touch:600},re=y?43:25,ie=!1,ae=0,N=0,P=!1,F=!1,I=!1,L=!1;function oe(e){if(!C)return;function n(t){(p(C)||C(e,t))&&z(t)}let r=t;A.add(r,`dragstart`,e=>e.preventDefault(),O).add(r,`touchmove`,()=>void 0,O).add(r,`touchend`,()=>void 0).add(r,`touchstart`,n).add(r,`mousedown`,n).add(r,`touchcancel`,V).add(r,`contextmenu`,V).add(r,`click`,de,!0)}function se(){A.clear(),j.clear()}function ce(){let e=L?n:t;j.add(e,`touchmove`,B,O).add(e,`touchend`,V).add(e,`mousemove`,B,O).add(e,`mouseup`,V)}function le(e){let t=e.nodeName||``;return E.includes(t)}function R(){return(y?ne:te)[L?`mouse`:`touch`]}function ue(e,t){let n=d.add(g(e)*-1),r=u.byDistance(e,!y).distance;return y||h(e)<ee?r:x&&t?r*.5:u.byIndex(n.get(),0).distance}function z(e){let t=D(e,r);L=t,I=y&&t&&!e.buttons&&ie,ie=_(i.get(),o.get())>=2,t&&e.button!==0||le(e.target)||(P=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),i.set(o),ce(),ae=a.readPoint(e),N=a.readPoint(e,w),f.emit(`pointerDown`))}function B(e){if(!D(e,r)&&e.touches.length>=2)return V(e);let t=a.readPoint(e),n=a.readPoint(e,w),o=_(t,ae),c=_(n,N);if(!F&&!L&&(!e.cancelable||(F=o>c,!F)))return V(e);let u=a.pointerMove(e);o>b&&(I=!0),l.useFriction(.3).useDuration(.75),s.start(),i.add(T(u)),e.preventDefault()}function V(e){let t=u.byDistance(0,!1).index!==d.get(),n=a.pointerUp(e)*R(),r=ue(T(n),t),i=v(n,r),o=re-10*i,s=S+i/50;F=!1,P=!1,j.clear(),l.useDuration(o).useFriction(s),c.distance(r,!y),L=!1,f.emit(`pointerUp`)}function de(e){I&&=(e.stopPropagation(),e.preventDefault(),!1)}function fe(){return P}return{init:oe,destroy:se,pointerDown:fe}}function ne(e,t){let n,r;function i(e){return e.timeStamp}function a(n,r){let i=`client${(r||e.scroll)===`x`?`X`:`Y`}`;return(D(n,t)?n:n.touches[0])[i]}function o(e){return n=e,r=e,a(e)}function s(e){let t=a(e)-a(r),o=i(e)-i(n)>170;return r=e,o&&(n=e),t}function c(e){if(!n||!r)return 0;let t=a(r)-a(n),o=i(e)-i(n),s=i(e)-i(r)>170,c=t/o;return o&&!s&&h(c)>.1?c:0}return{pointerDown:o,pointerMove:s,pointerUp:c,readPoint:a}}function re(){function e(e){let{offsetTop:t,offsetLeft:n,offsetWidth:r,offsetHeight:i}=e;return{top:t,right:n+r,bottom:t+i,left:n,width:r,height:i}}return{measure:e}}function ie(e){function t(t){return t/100*e}return{measure:t}}function ae(e,t,n,r,i,a,o){let s=[e].concat(r),c,l,u=[],d=!1;function f(e){return i.measureSize(o.measure(e))}function m(i){if(!a)return;l=f(e),u=r.map(f);function o(n){for(let a of n){if(d)return;let n=a.target===e,o=r.indexOf(a.target),s=n?l:u[o];if(h(f(n?e:r[o])-s)>=.5){i.reInit(),t.emit(`resize`);break}}}c=new ResizeObserver(e=>{(p(a)||a(i,e))&&o(e)}),n.requestAnimationFrame(()=>{s.forEach(e=>c.observe(e))})}function g(){d=!0,c&&c.disconnect()}return{init:m,destroy:g}}function N(e,t,n,r,i,a){let o=0,s=0,c=i,l=a,u=e.get(),d=0;function f(){let t=r.get()-e.get(),i=!c,a=0;return i?(o=0,n.set(r),e.set(r),a=t):(n.set(e),o+=t/c,o*=l,u+=o,e.add(o),a=u-d),s=g(a),d=u,C}function p(){return h(r.get()-t.get())<.001}function m(){return c}function _(){return s}function v(){return o}function y(){return x(i)}function b(){return S(a)}function x(e){return c=e,C}function S(e){return l=e,C}let C={direction:_,duration:m,velocity:v,seek:f,settled:p,useBaseFriction:b,useBaseDuration:y,useFriction:S,useDuration:x};return C}function P(e,t,n,r,i){let a=i.measure(10),o=i.measure(50),s=M(.1,.99),c=!1;function l(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(i){if(!l())return;let c=h(e[e.reachedMin(t.get())?`min`:`max`]-t.get()),u=n.get()-t.get(),d=s.constrain(c/o);n.subtract(u*d),!i&&h(u)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function d(e){c=!e}return{shouldConstrain:l,constrain:u,toggleActive:d}}function F(e,t,n,r,i){let a=M(-t+e,0),o=d(),s=u(),c=f();function l(e,t){return _(e,t)<=1}function u(){let e=o[0],t=x(o);return M(o.lastIndexOf(e),o.indexOf(t)+1)}function d(){return n.map((e,t)=>{let{min:r,max:i}=a,o=a.constrain(e),s=!t,c=C(n,t);return s?i:c||l(r,o)?r:l(i,o)?i:o}).map(e=>parseFloat(e.toFixed(3)))}function f(){if(t<=e+i)return[a.max];if(r===`keepSnaps`)return o;let{min:n,max:c}=s;return o.slice(n,c)}return{snapsContained:c,scrollContainLimit:s}}function I(e,t,n){let r=t[0];return{limit:M(n?r-e:x(t),r)}}function L(e,t,n,r){let i=.1,{reachedMin:a,reachedMax:o}=M(t.min+i,t.max+i);function s(e){return e===1?o(n.get()):e===-1&&a(n.get())}function c(t){if(!s(t))return;let n=t*-1*e;r.forEach(e=>e.add(n))}return{loop:c}}function oe(e){let{max:t,length:n}=e;function r(e){let r=e-t;return n?r/-n:0}return{get:r}}function se(e,t,n,r,i){let{startEdge:a,endEdge:o}=e,{groupSlides:s}=i,c=d().map(t.measure),l=f(),u=p();function d(){return s(r).map(e=>x(e)[o]-e[0][a]).map(h)}function f(){return r.map(e=>n[a]-e[a]).map(e=>-h(e))}function p(){return s(l).map(e=>e[0]).map((e,t)=>e+c[t])}return{snaps:l,snapsAligned:u}}function ce(e,t,n,r,i,a){let{groupSlides:o}=i,{min:s,max:c}=r,l=u();function u(){let r=o(a),i=!e||t===`keepSnaps`;return n.length===1?[a]:i?r:r.slice(s,c).map((e,t,n)=>{let r=!t,i=C(n,t);return r?w(x(n[0])+1):i?w(S(a)-x(n)[0]+1,x(n)[0]):e})}return{slideRegistry:l}}function le(e,t,n,r,i){let{reachedAny:a,removeOffset:o,constrain:s}=r;function c(e){return e.concat().sort((e,t)=>h(e)-h(t))[0]}function l(n){let r=e?o(n):s(n),{index:i}=t.map((e,t)=>({diff:u(e-r,0),index:t})).sort((e,t)=>h(e.diff)-h(t.diff))[0];return{index:i,distance:r}}function u(t,r){let i=[t,t+n,t-n];if(!e)return t;if(!r)return c(i);let a=i.filter(e=>g(e)===r);return a.length?c(a):x(i)-n}function d(e,n){return{index:e,distance:u(t[e]-i.get(),n)}}function f(n,r){let o=i.get()+n,{index:s,distance:c}=l(o),d=!e&&a(o);return!r||d?{index:s,distance:n}:{index:s,distance:n+u(t[s]-c,0)}}return{byDistance:f,byIndex:d,shortcut:u}}function R(e,t,n,r,i,a,o){function s(i){let s=i.distance,c=i.index!==t.get();a.add(s),s&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(i.index),o.emit(`select`))}function c(e,t){s(i.byDistance(e,t))}function l(e,n){let r=t.clone().set(e);s(i.byIndex(r.get(),n))}return{distance:c,index:l}}function ue(e,t,n,r,i,a,o,s){let c={passive:!0,capture:!0},l=0;function u(u){if(!s)return;function m(t){if(new Date().getTime()-l>10)return;o.emit(`slideFocusStart`),e.scrollLeft=0;let a=n.findIndex(e=>e.includes(t));d(a)&&(i.useDuration(0),r.index(a,0),o.emit(`slideFocus`))}a.add(document,`keydown`,f,!1),t.forEach((e,t)=>{a.add(e,`focus`,e=>{(p(s)||s(u,e))&&m(t)},c)})}function f(e){e.code===`Tab`&&(l=new Date().getTime())}return{init:u}}function z(e){let t=e;function n(){return t}function r(e){t=o(e)}function i(e){t+=o(e)}function a(e){t-=o(e)}function o(e){return d(e)?e:e.get()}return{get:n,set:r,add:i,subtract:a}}function B(e,t){let n=e.scroll===`x`?o:s,r=t.style,i=null,a=!1;function o(e){return`translate3d(${e}px,0px,0px)`}function s(e){return`translate3d(0px,${e}px,0px)`}function c(t){if(a)return;let o=y(e.direction(t));o!==i&&(r.transform=n(o),i=o)}function l(e){a=!e}function u(){a||(r.transform=``,t.getAttribute(`style`)||t.removeAttribute(`style`))}return{clear:u,to:c,toggleActive:l}}function V(e,t,n,r,i,a,o,s,c){let l=.5,u=b(i),d=b(i).reverse(),f=_().concat(v());function p(e,t){return e.reduce((e,t)=>e-i[t],t)}function m(e,t){return e.reduce((e,n)=>p(e,t)>0?e.concat([n]):e,[])}function h(e){return a.map((n,i)=>({start:n-r[i]+l+e,end:n+t-l+e}))}function g(t,r,i){let a=h(r);return t.map(t=>{let r=i?0:-n,o=i?n:0,l=i?`end`:`start`,u=a[t][l];return{index:t,loopPoint:u,slideLocation:z(-1),translate:B(e,c[t]),target:()=>s.get()>u?r:o}})}function _(){let e=o[0];return g(m(d,e),n,!1)}function v(){let e=t-o[0]-1;return g(m(u,e),-n,!0)}function y(){return f.every(({index:e})=>p(u.filter(t=>t!==e),t)<=.1)}function x(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})}function S(){f.forEach(e=>e.translate.clear())}return{canLoop:y,clear:S,loop:x,loopPoints:f}}function de(e,t,n){let r,i=!1;function a(a){if(!n)return;function o(e){for(let n of e)if(n.type===`childList`){a.reInit(),t.emit(`slidesChanged`);break}}r=new MutationObserver(e=>{i||(p(n)||n(a,e))&&o(e)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),i=!0}return{init:a,destroy:o}}function fe(e,t,n,r){let i={},a=null,o=null,s,c=!1;function l(){s=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);i[n]=e}),a=null,o=null,n.emit(`slidesInView`))},{root:e.parentElement,threshold:r}),t.forEach(e=>s.observe(e))}function u(){s&&s.disconnect(),c=!0}function d(e){return T(i).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:a}=i[r];return(e&&a||!e&&!a)&&t.push(r),t},[])}function f(e=!0){if(e&&a)return a;if(!e&&o)return o;let t=d(e);return e&&(a=t),e||(o=t),t}return{init:l,destroy:u,get:f}}function pe(e,t,n,r,i,a){let{measureSize:o,startEdge:s,endEdge:c}=e,l=n[0]&&i,u=m(),d=g(),f=n.map(o),p=_();function m(){if(!l)return 0;let e=n[0];return h(t[s]-e[s])}function g(){if(!l)return 0;let e=a.getComputedStyle(x(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}function _(){return n.map((e,t,n)=>{let r=!t,i=C(n,t);return r?f[t]+u:i?f[t]+d:n[t+1][s]-e[s]}).map(h)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function me(e,t,n,r,i,a,o,s,c){let{startEdge:l,endEdge:u,direction:f}=e,p=d(n);function m(e,t){return b(e).filter(e=>e%t===0).map(n=>e.slice(n,n+t))}function g(e){return e.length?b(e).reduce((n,d,p)=>{let m=x(n)||0,g=m===0,_=d===S(e),v=i[l]-a[m][l],y=i[l]-a[d][u],b=!r&&g?f(o):0,C=h(y-(!r&&_?f(s):0)-(v+b));return p&&C>t+c&&n.push(d),_&&n.push(e.length),n},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}function _(e){return p?m(e,n):g(e)}return{groupSlides:_}}function H(e,t,n,r,i,a,o){let{align:s,axis:c,direction:l,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:_,containScroll:v,watchResize:y,watchSlides:C,watchDrag:w,watchFocus:T}=a,E=re(),D=E.measure(t),M=n.map(E.measure),H=j(c,l),U=H.measureSize(D),he=ie(U),ge=O(s,U),_e=!d&&!!v,{slideSizes:ve,slideSizesWithGaps:ye,startGap:be,endGap:xe}=pe(H,D,M,n,d||!!v,i),W=me(H,U,g,d,D,M,be,xe,2),{snaps:Se,snapsAligned:Ce}=se(H,ge,D,M,W),G=-x(Se)+x(ye),{snapsContained:we,scrollContainLimit:K}=F(U,G,Ce,v,2),q=_e?we:Ce,{limit:J}=I(G,q,d),Y=ee(S(q),u,d),Te=Y.clone(),Ee=b(n),De=({dragHandler:e,scrollBody:t,scrollBounds:n,options:{loop:r}})=>{r||n.constrain(e.pointerDown()),t.seek()},Oe=({scrollBody:e,translate:t,location:n,offsetLocation:r,previousLocation:i,scrollLooper:a,slideLooper:o,dragHandler:s,animation:c,eventHandler:l,scrollBounds:u,options:{loop:d}},f)=>{let p=e.settled(),m=!u.shouldConstrain(),h=d?p:p&&m,g=h&&!s.pointerDown();g&&c.stop();let _=n.get()*f+i.get()*(1-f);r.set(_),d&&(a.loop(e.direction()),o.loop()),t.to(r.get()),g&&l.emit(`settle`),h||l.emit(`scroll`)},ke=A(r,i,()=>De(Be),e=>Oe(Be,e)),Ae=.68,X=q[Y.get()],je=z(X),Me=z(X),Z=z(X),Q=z(X),$=N(je,Z,Me,Q,f,Ae),Ne=le(d,q,G,J,Q),Pe=R(ke,Y,Te,$,Ne,Q,o),Fe=oe(J),Ie=k(),Le=fe(t,n,o,h),{slideRegistry:Re}=ce(_e,v,q,K,W,Ee),ze=ue(e,n,Re,Pe,$,Ie,o,T),Be={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:D,slideRects:M,animation:ke,axis:H,dragHandler:te(H,e,r,i,Q,ne(H,i),je,ke,Pe,$,Ne,Y,o,he,p,m,_,Ae,w),eventStore:Ie,percentOfView:he,index:Y,indexPrevious:Te,limit:J,location:je,offsetLocation:Z,previousLocation:Me,options:a,resizeHandler:ae(t,o,i,n,H,y,E),scrollBody:$,scrollBounds:P(J,Z,Q,$,he),scrollLooper:L(G,J,Z,[je,Z,Me,Q]),scrollProgress:Fe,scrollSnapList:q.map(Fe.get),scrollSnaps:q,scrollTarget:Ne,scrollTo:Pe,slideLooper:V(H,U,G,ve,ye,Se,q,Z,n),slideFocus:ze,slidesHandler:de(t,o,C),slidesInView:Le,slideIndexes:Ee,slideRegistry:Re,slidesToScroll:W,target:Q,translate:B(H,t)};return Be}function U(){let e={},t;function n(e){t=e}function r(t){return e[t]||[]}function i(e){return r(e).forEach(n=>n(t,e)),c}function a(t,n){return e[t]=r(t).concat([n]),c}function o(t,n){return e[t]=r(t).filter(e=>e!==n),c}function s(){e={}}let c={init:n,emit:i,off:o,on:a,clear:s};return c}var he={align:`center`,axis:`x`,container:null,slides:null,containScroll:`trimSnaps`,direction:`ltr`,slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function ge(e){function t(e,t){return E(e,t||{})}function n(n){let r=n.breakpoints||{};return t(n,T(r).filter(t=>e.matchMedia(t).matches).map(e=>r[e]).reduce((e,n)=>t(e,n),{}))}function r(t){return t.map(e=>T(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function _e(e){let t=[];function n(n,r){return t=r.filter(({options:t})=>e.optionsAtMedia(t).active!==!1),t.forEach(t=>t.init(n,e)),r.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})}function r(){t=t.filter(e=>e.destroy())}return{init:n,destroy:r}}function ve(e,t,n){let r=e.ownerDocument,i=r.defaultView,a=ge(i),o=_e(a),s=k(),c=U(),{mergeOptions:l,optionsAtMedia:u,optionsMediaQueries:d}=a,{on:p,off:m,emit:h}=c,g=O,_=!1,v,y=l(he,ve.globalOptions),b=l(y),x=[],S,C,w;function T(){let{container:t,slides:n}=b;C=(f(t)?e.querySelector(t):t)||e.children[0];let r=f(n)?C.querySelectorAll(n):n;w=[].slice.call(r||C.children)}function E(t){let n=H(e,C,w,r,i,t,c);return t.loop&&!n.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):n}function D(e,t){_||(y=l(y,e),b=u(y),x=t||x,T(),v=E(b),d([y,...x.map(({options:e})=>e)]).forEach(e=>s.add(e,`change`,O)),b.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(R),v.eventHandler.init(R),v.resizeHandler.init(R),v.slidesHandler.init(R),v.options.loop&&v.slideLooper.loop(),C.offsetParent&&w.length&&v.dragHandler.init(R),S=o.init(R,x)))}function O(e,t){let n=N();A(),D(l({startIndex:n},e),t),c.emit(`reInit`)}function A(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),o.destroy(),s.clear()}function j(){_||(_=!0,s.clear(),A(),c.emit(`destroy`),c.clear())}function M(e,t,n){b.active&&!_&&(v.scrollBody.useBaseFriction().useDuration(t===!0?0:b.duration),v.scrollTo.index(e,n||0))}function ee(e){M(v.index.add(1).get(),e,-1)}function te(e){M(v.index.add(-1).get(),e,1)}function ne(){return v.index.add(1).get()!==N()}function re(){return v.index.add(-1).get()!==N()}function ie(){return v.scrollSnapList}function ae(){return v.scrollProgress.get(v.offsetLocation.get())}function N(){return v.index.get()}function P(){return v.indexPrevious.get()}function F(){return v.slidesInView.get()}function I(){return v.slidesInView.get(!1)}function L(){return S}function oe(){return v}function se(){return e}function ce(){return C}function le(){return w}let R={canScrollNext:ne,canScrollPrev:re,containerNode:ce,internalEngine:oe,destroy:j,off:m,on:p,emit:h,plugins:L,previousScrollSnap:P,reInit:g,rootNode:se,scrollNext:ee,scrollPrev:te,scrollProgress:ae,scrollSnapList:ie,scrollTo:M,selectedScrollSnap:N,slideNodes:le,slidesInView:F,slidesNotInView:I};return D(t,n),setTimeout(()=>c.emit(`init`),0),R}ve.globalOptions=void 0;var ye={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function be(e,t){let n=e.scrollSnapList();return typeof t==`number`?n.map(()=>t):t(n,e)}function xe(e,t){let n=e.rootNode();return t&&t(n)||n}function W(e={}){let t,n,r,i,a=null,o=0,s=!1,c=!1,l=!1,u=!1;function d(a,o){n=a;let{mergeOptions:s,optionsAtMedia:c}=o;if(t=c(s(s(ye,W.globalOptions),e)),n.scrollSnapList().length<=1)return;u=t.jump,r=!1,i=be(n,t.delay);let{eventStore:l,ownerDocument:d}=n.internalEngine(),f=!!n.internalEngine().options.watchDrag,p=xe(n,t.rootNode);l.add(d,`visibilitychange`,_),f&&n.on(`pointerDown`,y),f&&!t.stopOnInteraction&&n.on(`pointerUp`,b),t.stopOnMouseEnter&&l.add(p,`mouseenter`,x),t.stopOnMouseEnter&&!t.stopOnInteraction&&l.add(p,`mouseleave`,S),t.stopOnFocusIn&&n.on(`slideFocusStart`,g),t.stopOnFocusIn&&!t.stopOnInteraction&&l.add(n.containerNode(),`focusout`,h),t.playOnInit&&h()}function f(){n.off(`pointerDown`,y).off(`pointerUp`,b).off(`slideFocusStart`,g),g(),r=!0,s=!1}function p(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=e.setTimeout(D,i[n.selectedScrollSnap()]),a=new Date().getTime(),n.emit(`autoplay:timerset`)}function m(){let{ownerWindow:e}=n.internalEngine();e.clearTimeout(o),o=0,a=null,n.emit(`autoplay:timerstopped`)}function h(){r||(v()?l=!0:(s||n.emit(`autoplay:play`),p(),s=!0))}function g(){r||(s&&n.emit(`autoplay:stop`),m(),s=!1)}function _(){if(v())return l=s,g();l&&h()}function v(){let{ownerDocument:e}=n.internalEngine();return e.visibilityState===`hidden`}function y(){c||g()}function b(){c||h()}function x(){c=!0,g()}function S(){c=!1,h()}function C(e){e!==void 0&&(u=e),h()}function w(){s&&g()}function T(){s&&h()}function E(){return s}function D(){let{index:e}=n.internalEngine(),r=e.clone().add(1).get(),i=n.scrollSnapList().length-1,a=t.stopOnLastSnap&&r===i;if(n.canScrollNext()?n.scrollNext(u):n.scrollTo(0,u),n.emit(`autoplay:select`),a)return g();h()}function O(){return a?i[n.selectedScrollSnap()]-(new Date().getTime()-a):null}return{name:`autoplay`,options:e,init:d,destroy:f,play:C,stop:w,reset:T,isPlaying:E,timeUntilNext:O}}W.globalOptions=void 0;var Se=e(`:host{--slide-height:19rem;--slide-size:100%;--slide-gap:0;--button-size:48px;--button-arrow-size:20px;--button-arrow-color:#4b5563;--button-offset:8px;--button-border-color:#e5e7eb;--button-border-radius:8px;--button-bg:#fffc;--button-color:inherit;--button-box-shadow-hover:0 1px 2px #3c40434d, 0 1px 3px 1px #3c404326;--dot-color:#9ca3af;--dot-color-active:#111827;--dot-margin:.5rem 0;--dot-edge-scale:.5;--scrollbar-color:#d1d5db transparent;display:block;position:relative;container-type:inline-size}:host([single]){--slide-size:100%;--slide-gap:0}:host([axis=y]) .container{max-height:var(--slide-height);flex-direction:column}:host([axis=y]) .viewport{max-height:var(--slide-height)}.viewport{overflow:hidden}:host([with-scrollbar]) .viewport{scrollbar-color:var(--scrollbar-color);scrollbar-gutter:stable both-edges;scrollbar-width:thin;overflow-x:scroll}.container{backface-visibility:hidden;gap:var(--slide-gap);touch-action:pan-y pinch-zoom;display:flex}::slotted(l-carousel-item){flex:0 0 var(--slide-size);min-width:0}.scroll-buttons--inside{pointer-events:none;position:absolute;inset:0}.scroll-buttons--outside{justify-content:end;gap:8px;padding-block:8px;display:flex}.scroll-buttons--disabled,.inactive .scroll-buttons{display:none}.button-next,.button-previous,.button-fullscreen{appearance:none;touch-action:manipulation;border:1px solid var(--button-border-color);border-radius:var(--button-border-radius);width:var(--button-size);height:var(--button-size);background-color:var(--button-bg);color:var(--button-color);cursor:pointer;pointer-events:auto;-webkit-tap-highlight-color:#31313180;justify-content:center;align-items:center;display:flex}.scroll-buttons--inside .button-previous,.scroll-buttons--inside .button-next,.button-fullscreen{top:calc(50% - (var(--button-size) / 2));z-index:1;position:absolute}.scroll-buttons--inside .button-previous{left:var(--button-offset)}.scroll-buttons--inside .button-next{right:var(--button-offset)}.scroll-buttons--inside .button:disabled{visibility:hidden}.button:disabled{cursor:not-allowed;pointer-events:none;opacity:.4}.button-fullscreen{right:var(--button-offset);top:var(--button-offset);width:calc(var(--button-size) * .75);height:calc(var(--button-size) * .75);border-radius:4px}@container (width>=640px){.button-fullscreen{width:var(--button-size);height:var(--button-size)}}@media (hover:hover){.button:hover:not(:disabled){box-shadow:var(--button-box-shadow-hover)}}.button:not(:disabled):focus-visible{outline:var(--l-focus-ring-width) solid var(--l-focus-ring-color);outline-offset:var(--l-focus-ring-offset);box-shadow:0 0 0 var(--l-focus-ring-offset) var(--l-color-surface)}.button svg{width:var(--button-arrow-size);height:var(--button-arrow-size);color:var(--button-arrow-color)}.dots{margin:var(--dot-margin);justify-content:center;display:flex}.dot{appearance:none;touch-action:manipulation;cursor:pointer;transform-origin:50%;background:0 0;border:0;place-items:center;padding-block:.5rem;padding-inline:.25rem;transition:transform .18s;display:inline-flex}.dot:focus-visible{outline:var(--l-focus-ring-width) solid var(--l-focus-ring-color);outline-offset:calc(var(--l-focus-ring-width) * -1);border-radius:var(--l-radius-sm)}.dot[data-edge]{transform:scale(var(--dot-edge-scale))}.dot--bar i{background:var(--dot-color);width:1rem;height:.125rem}.dot--selected i{background:var(--dot-color-active)}.dot--circle i{border:2px solid var(--dot-color-active);border-radius:8px;width:10px;height:10px;display:inline-block}.dot--circle.dot--selected i{width:30px}`),Ce=class extends Event{constructor(e){super(`select`,{bubbles:!0,composed:!1,cancelable:!1}),this.index=e}},G=class extends Event{constructor(e){super(`slides-in-view`,{bubbles:!1,composed:!1,cancelable:!1}),this.indexes=e}},we=class extends Event{constructor(){super(`fullscreen`,{bubbles:!1,composed:!1,cancelable:!1})}},K=class extends c{constructor(...e){super(...e),this._localize=new l(this),this.#e=0,this.#n=`x`,this.#r=`start`,this.#i={},this.#a=!1,this.#o=!1,this.#s=20,this.#c=!1,this.#l=1,this.#u=0,this.#d=`trimSnaps`,this.#f=!1,this.#p=!1,this.#m=!1,this.#h=!1,this.#g=`bar`,this.#_=0,this.#v=`inside`,this.#y=0,this.onSlidesInView=()=>{this.dispatchEvent(new G(this.embla.slidesInView()))},this.onInit=()=>{this.updateNavigation()},this.onReInit=()=>{this.updateNavigation(),this.requestUpdate()},this.onSelect=()=>{this.dispatchEvent(new Ce(this.embla.selectedScrollSnap())),this.updateNavigation()},this.onResize=()=>{this.requestUpdate()},this.detachEventListeners=()=>{this.previousBtn.removeEventListener(`click`,this.previous),this.nextBtn.removeEventListener(`click`,this.next)},this.handleSlotChange=e=>{e.target.assignedElements().length>0&&this.embla.reInit(this.options())},this.handleDotClick=e=>{let t=e.currentTarget;this.goToSlide(Number(t.dataset.index))},this.next=()=>{this.embla.scrollNext()},this.previous=()=>{this.embla.scrollPrev()}}static{this.styles=[u,Se]}#e;get autoplay(){return this.#e}set autoplay(e){this.#e=e}#t;get autoplayOptions(){return this.#t}set autoplayOptions(e){this.#t=e}#n;get axis(){return this.#n}set axis(e){this.#n=e}#r;get align(){return this.#r}set align(e){this.#r=e}#i;get breakpoints(){return this.#i}set breakpoints(e){this.#i=e}#a;get loop(){return this.#a}set loop(e){this.#a=e}#o;get dragFree(){return this.#o}set dragFree(e){this.#o=e}#s;get duration(){return this.#s}set duration(e){this.#s=e}#c;get skipSnaps(){return this.#c}set skipSnaps(e){this.#c=e}#l;get slidesToScroll(){return this.#l}set slidesToScroll(e){this.#l=e}#u;get startIndex(){return this.#u}set startIndex(e){this.#u=e}#d;get containScroll(){return this.#d}set containScroll(e){this.#d=e}#f;get single(){return this.#f}set single(e){this.#f=e}#p;get withDots(){return this.#p}set withDots(e){this.#p=e}#m;get withScrollbar(){return this.#m}set withScrollbar(e){this.#m=e}#h;get withFullscreen(){return this.#h}set withFullscreen(e){this.#h=e}#g;get dotAppearance(){return this.#g}set dotAppearance(e){this.#g=e}#_;get maxVisibleDots(){return this.#_}set maxVisibleDots(e){this.#_=e}#v;get scrollButtonsPosition(){return this.#v}set scrollButtonsPosition(e){this.#v=e}#y;get _selectedSnap(){return this.#y}set _selectedSnap(e){this.#y=e}connectedCallback(){super.connectedCallback(),this.createEmbla()}disconnectedCallback(){super.disconnectedCallback(),this.embla&&this.embla.destroy()}firstUpdated(){this.attachEventListeners()}createEmbla(){this.embla=ve(this,this.options()),this.embla.on(`init`,this.onInit).on(`reInit`,this.onReInit).on(`resize`,this.onResize).on(`slidesInView`,this.onSlidesInView).on(`select`,this.onSelect).on(`destroy`,this.detachEventListeners)}attachEventListeners(){this.previousBtn.addEventListener(`click`,this.previous),this.nextBtn.addEventListener(`click`,this.next)}updateNavigation(){let e=this.embla.canScrollPrev()||this.embla.canScrollNext();this.previousBtn.toggleAttribute(`disabled`,!this.embla.canScrollPrev()),this.nextBtn.toggleAttribute(`disabled`,!this.embla.canScrollNext()),this.scrollButtons.classList.toggle(`scroll-buttons--disabled`,!e),this._selectedSnap=this.embla.selectedScrollSnap()}async updated(e){e.has(`autoplay`)&&this.autoplay&&this.initAutoplay()}initAutoplay(){this.embla.reInit(this.options(),[W(this.autoplayOptions||{delay:this.autoplay})])}options(){let e=this.shadowRoot.querySelector(`slot`);return e?{container:e,slides:e.assignedElements(),containScroll:this.containScroll,breakpoints:this.breakpoints,axis:this.axis,align:this.align,dragFree:this.dragFree,duration:this.duration,loop:this.loop,slidesToScroll:this.slidesToScroll,skipSnaps:this.skipSnaps,startIndex:this.startIndex}:{container:this,slides:[]}}goToSlide(e,t){this.embla.scrollTo(e,t)}slideNodes(){this.embla.slideNodes()}slidesInView(){this.embla.slidesInView()}isActive(){return this.embla?.internalEngine().options.active}renderFullscreenButton(){return a`<button
2
2
  type="button"
3
3
  part="button button-fullscreen"
4
4
  class="button button-fullscreen"