@baloise/ds-core 19.9.4-nightly.20260513 → 19.9.5

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 (214) hide show
  1. package/components/all.d.ts +0 -2
  2. package/components/all.js +0 -3
  3. package/components/animation.decorator.js +1 -1
  4. package/components/bal-accordion.js +1 -1
  5. package/components/bal-app.js +102 -1
  6. package/components/bal-button2.js +1 -1
  7. package/components/bal-carousel-item.js +1 -1
  8. package/components/bal-checkbox-group.js +21 -3
  9. package/components/bal-checkbox2.js +21 -4
  10. package/components/bal-date-calendar2.js +1 -1
  11. package/components/bal-date.js +1 -1
  12. package/components/bal-dropdown.js +1 -1
  13. package/components/bal-field.js +1 -1
  14. package/components/bal-footer.js +1 -1
  15. package/components/bal-form.js +1 -1
  16. package/components/bal-input-stepper.js +1 -1
  17. package/components/bal-list-item-accordion-body2.js +1 -1
  18. package/components/bal-list-item2.js +1 -1
  19. package/components/bal-logo2.js +1 -1
  20. package/components/bal-modal.js +1 -1
  21. package/components/bal-nav.js +65 -53
  22. package/components/bal-navbar-brand.js +1 -1
  23. package/components/bal-option-list2.js +1 -1
  24. package/components/bal-popup2.js +1 -1
  25. package/components/bal-radio-group.js +1 -1
  26. package/components/bal-segment-item.js +1 -1
  27. package/components/bal-select2.js +23 -11
  28. package/components/bal-spinner2.js +1 -1
  29. package/components/bal-stage-image.js +1 -1
  30. package/components/bal-switch.js +1 -74
  31. package/{dist/esm/bal-switch.entry.js → components/bal-switch2.js} +36 -8
  32. package/components/bal-tabs2.js +29 -17
  33. package/components/breakpoints.subject.js +1 -1
  34. package/components/element-states.decorator.js +1 -1
  35. package/components/floating-ui.js +1 -1
  36. package/components/focus.decorator.js +1 -1
  37. package/components/form-input.js +1 -1
  38. package/components/helpers.js +1 -1
  39. package/components/index.js +449 -5
  40. package/components/mutation.decorator.js +1 -1
  41. package/components/overlays.js +1 -1
  42. package/components/resize.decorator.js +1 -1
  43. package/components/swipe.subject.js +1 -1
  44. package/components/swiper.util.js +1 -1
  45. package/components/tokens.esm.js +1 -1
  46. package/components/visibility.decorator.js +1 -1
  47. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  48. package/dist/baloise-design-system/baloise-design-system.js +1 -1
  49. package/dist/baloise-design-system/index.esm.js +1 -1
  50. package/dist/baloise-design-system/{p-09d63730a7.entry.js → p-1bb5b8696e.entry.js} +1 -1
  51. package/dist/baloise-design-system/p-1d7406989c.system.entry.js +1 -0
  52. package/dist/baloise-design-system/{p-0b1aeaaed8.entry.js → p-3850595dd0.entry.js} +1 -1
  53. package/dist/baloise-design-system/{p-81c4b117a6.system.entry.js → p-43dd693355.system.entry.js} +1 -1
  54. package/dist/baloise-design-system/{p-8f510eed45.entry.js → p-477359bbf9.entry.js} +1 -1
  55. package/dist/baloise-design-system/{p-873a0bf9d9.system.entry.js → p-59129fb1d1.system.entry.js} +1 -1
  56. package/dist/baloise-design-system/{p-CIBedZ4h.js → p-5GEK9UQy.js} +1 -1
  57. package/dist/baloise-design-system/{p-8bc92b4b2e.system.entry.js → p-607125007c.system.entry.js} +1 -1
  58. package/dist/baloise-design-system/{p-38888ff243.system.entry.js → p-64d45da025.system.entry.js} +1 -1
  59. package/dist/baloise-design-system/{p-89a45b7719.system.entry.js → p-68baccfba9.system.entry.js} +1 -1
  60. package/dist/baloise-design-system/{p-8da007a406.entry.js → p-68f77714ab.entry.js} +1 -1
  61. package/dist/baloise-design-system/{p-9459a04689.system.entry.js → p-6c3d087d59.system.entry.js} +1 -1
  62. package/dist/baloise-design-system/{p-627def5e99.entry.js → p-74fe27789f.entry.js} +1 -1
  63. package/dist/baloise-design-system/{p-41e1ac82bb.entry.js → p-8268d61dd6.entry.js} +1 -1
  64. package/dist/baloise-design-system/{p-b273a2f73a.entry.js → p-8e3412d465.entry.js} +1 -1
  65. package/dist/baloise-design-system/p-BFRjY4w3.js +1 -1
  66. package/dist/baloise-design-system/p-BRAmUyPx.system.js +1 -1
  67. package/dist/baloise-design-system/p-Bk7UdnZ5.system.js +1 -0
  68. package/dist/baloise-design-system/p-CKN3W8qn.js +1 -0
  69. package/dist/baloise-design-system/{p-x0vPGP6t.system.js → p-CPHPFMUC.system.js} +1 -1
  70. package/dist/baloise-design-system/{p-3VlTyI5Z.system.js → p-CsPrCX4f.system.js} +1 -1
  71. package/dist/baloise-design-system/{p-CWajPM1f.system.js → p-DLLNm5Gs.system.js} +1 -1
  72. package/dist/baloise-design-system/{p-BQ-ZBPGz.js → p-DvLv1IDC.js} +1 -1
  73. package/dist/baloise-design-system/{p-DOmwcY8I.system.js → p-DxnFuP0T.system.js} +1 -1
  74. package/dist/baloise-design-system/{p-BeOuHPcP.js → p-Oz8SBVmc.js} +1 -1
  75. package/dist/baloise-design-system/p-aDM_iThE.system.js +1 -0
  76. package/dist/baloise-design-system/{p-bd8e1fd900.entry.js → p-af05694fd5.entry.js} +1 -1
  77. package/dist/baloise-design-system/{p-2bd8d02b81.entry.js → p-b670d9cae9.entry.js} +1 -1
  78. package/dist/baloise-design-system/{p-46986c305d.system.entry.js → p-b6e82651ef.system.entry.js} +1 -1
  79. package/dist/baloise-design-system/{p-4df7edd98f.entry.js → p-bac3d30df3.entry.js} +1 -1
  80. package/dist/baloise-design-system/{p-1922f177ca.system.entry.js → p-bbeeefc31a.system.entry.js} +1 -1
  81. package/dist/baloise-design-system/{p-b75d71bb54.entry.js → p-c31dc8146b.entry.js} +1 -1
  82. package/dist/baloise-design-system/{p-439f4eac54.system.entry.js → p-c4a244b558.system.entry.js} +1 -1
  83. package/dist/baloise-design-system/{p-4f5b4d3b9e.entry.js → p-c5ae87f18e.entry.js} +1 -1
  84. package/dist/baloise-design-system/{p-15a9d2bdb4.entry.js → p-c8b853074f.entry.js} +1 -1
  85. package/dist/baloise-design-system/{p-8058e17e38.system.entry.js → p-d21134a60b.system.entry.js} +1 -1
  86. package/dist/baloise-design-system/{p-c6f0c6f765.system.entry.js → p-d5bd821ab7.system.entry.js} +1 -1
  87. package/dist/baloise-design-system/p-d9349f5eb0.entry.js +1 -0
  88. package/dist/baloise-design-system/{p-7d611a8e60.entry.js → p-e6f03ecdd0.entry.js} +1 -1
  89. package/dist/baloise-design-system/{p-c72c874ad0.system.entry.js → p-eb2f5b22de.system.entry.js} +1 -1
  90. package/dist/baloise-design-system/{p-4b6f33ea10.system.entry.js → p-f2435a528c.system.entry.js} +1 -1
  91. package/dist/baloise-design-system/{p-2cab716afd.system.entry.js → p-fa728470a3.system.entry.js} +1 -1
  92. package/dist/cjs/{global-BOGOCc0T.js → app-globals-D4xKyILL.js} +4 -2
  93. package/dist/cjs/bal-carousel_2.cjs.entry.js +3 -3
  94. package/dist/cjs/{bal-dropdown_3.cjs.entry.js → bal-check_7.cjs.entry.js} +815 -9
  95. package/dist/cjs/bal-field_5.cjs.entry.js +3 -3
  96. package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
  97. package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
  98. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  99. package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
  100. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  101. package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
  102. package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
  103. package/dist/cjs/{bal-radio_2.cjs.entry.js → bal-radio_3.cjs.entry.js} +50 -0
  104. package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
  105. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  106. package/dist/cjs/bal-steps.cjs.entry.js +3 -3
  107. package/dist/cjs/bal-tab-item_2.cjs.entry.js +3 -3
  108. package/dist/cjs/baloise-design-system.cjs.js +2 -3
  109. package/dist/cjs/{breakpoints.decorator-CDD6cOv6.js → breakpoints.decorator-DPrGtqtk.js} +1 -1
  110. package/dist/cjs/{breakpoints.subject-DpuyBCjh.js → breakpoints.subject-C1p-ePFH.js} +1 -1
  111. package/dist/cjs/index.cjs.js +2 -2
  112. package/dist/cjs/initialize-BzrcZo6Y.js +1 -1
  113. package/dist/cjs/loader.cjs.js +2 -3
  114. package/dist/cjs/{tokens.esm-LV2Uuiay.js → tokens.esm-BWWYqtq4.js} +1 -1
  115. package/dist/cjs/{window-resize.decorator-C-w0-60C.js → window-resize.decorator-DRN0wiUR.js} +1 -1
  116. package/dist/collection/collection-manifest.json +15 -17
  117. package/dist/collection/components/bal-checkbox/bal-checkbox.js +2 -3
  118. package/dist/collection/utils/constants/version.constant.js +1 -1
  119. package/dist/esm/{global-Llrc69_N.js → app-globals-Blx--ecs.js} +4 -2
  120. package/dist/esm/bal-carousel_2.entry.js +3 -3
  121. package/dist/esm/{bal-dropdown_3.entry.js → bal-check_7.entry.js} +815 -13
  122. package/dist/esm/bal-field_5.entry.js +3 -3
  123. package/dist/esm/bal-hint_5.entry.js +3 -3
  124. package/dist/esm/bal-list_8.entry.js +3 -3
  125. package/dist/esm/bal-logo.entry.js +3 -3
  126. package/dist/esm/bal-nav_8.entry.js +3 -3
  127. package/dist/esm/bal-navbar_5.entry.js +3 -3
  128. package/dist/esm/bal-pagination.entry.js +3 -3
  129. package/dist/esm/bal-progress-bar.entry.js +4 -4
  130. package/dist/esm/{bal-radio_2.entry.js → bal-radio_3.entry.js} +50 -1
  131. package/dist/esm/bal-segment_2.entry.js +4 -4
  132. package/dist/esm/bal-shape.entry.js +1 -1
  133. package/dist/esm/bal-steps.entry.js +3 -3
  134. package/dist/esm/bal-tab-item_2.entry.js +3 -3
  135. package/dist/esm/baloise-design-system.js +2 -3
  136. package/dist/esm/{breakpoints.decorator-DcfCKRvu.js → breakpoints.decorator-DwhK_t2m.js} +1 -1
  137. package/dist/esm/{breakpoints.subject-9qUvMXOC.js → breakpoints.subject-PxavGndB.js} +1 -1
  138. package/dist/esm/index.js +3 -3
  139. package/dist/esm/initialize-W3od-FM9.js +1 -1
  140. package/dist/esm/loader.js +2 -3
  141. package/dist/esm/{tokens.esm-CvA86VZU.js → tokens.esm-Dk6PruGq.js} +1 -1
  142. package/dist/esm/{window-resize.decorator-DNh3w5KW.js → window-resize.decorator-DiNYHJee.js} +1 -1
  143. package/dist/esm-es5/app-globals-Blx--ecs.js +1 -0
  144. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  145. package/dist/esm-es5/bal-check_7.entry.js +1 -0
  146. package/dist/esm-es5/bal-field_5.entry.js +1 -1
  147. package/dist/esm-es5/bal-hint_5.entry.js +1 -1
  148. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  149. package/dist/esm-es5/bal-logo.entry.js +1 -1
  150. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  151. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  152. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  153. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  154. package/dist/esm-es5/{bal-radio_2.entry.js → bal-radio_3.entry.js} +1 -1
  155. package/dist/esm-es5/bal-segment_2.entry.js +1 -1
  156. package/dist/esm-es5/bal-shape.entry.js +1 -1
  157. package/dist/esm-es5/bal-steps.entry.js +1 -1
  158. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  159. package/dist/esm-es5/baloise-design-system.js +1 -1
  160. package/dist/esm-es5/{breakpoints.decorator-DcfCKRvu.js → breakpoints.decorator-DwhK_t2m.js} +1 -1
  161. package/dist/esm-es5/{breakpoints.subject-9qUvMXOC.js → breakpoints.subject-PxavGndB.js} +1 -1
  162. package/dist/esm-es5/index.js +1 -1
  163. package/dist/esm-es5/initialize-W3od-FM9.js +1 -1
  164. package/dist/esm-es5/loader.js +1 -1
  165. package/dist/esm-es5/{window-resize.decorator-DNh3w5KW.js → window-resize.decorator-DiNYHJee.js} +1 -1
  166. package/dist/types/components.d.ts +0 -75
  167. package/package.json +6 -6
  168. package/components/bal-app2.js +0 -104
  169. package/components/bal-doc-app.d.ts +0 -11
  170. package/components/bal-doc-app.js +0 -264
  171. package/components/initialize.js +0 -450
  172. package/dist/baloise-design-system/p-00d493e589.system.entry.js +0 -1
  173. package/dist/baloise-design-system/p-21ea7b32f1.system.entry.js +0 -1
  174. package/dist/baloise-design-system/p-24185181f1.system.entry.js +0 -1
  175. package/dist/baloise-design-system/p-2dbbdfb785.system.entry.js +0 -1
  176. package/dist/baloise-design-system/p-5965694a0f.entry.js +0 -1
  177. package/dist/baloise-design-system/p-75f3abf19e.system.entry.js +0 -1
  178. package/dist/baloise-design-system/p-90d225c57c.system.entry.js +0 -1
  179. package/dist/baloise-design-system/p-9ca0a9bf5c.entry.js +0 -1
  180. package/dist/baloise-design-system/p-BvSkuJ_n.js +0 -1
  181. package/dist/baloise-design-system/p-BzIZLOtt.system.js +0 -1
  182. package/dist/baloise-design-system/p-C_qvcMEM.system.js +0 -1
  183. package/dist/baloise-design-system/p-DrynNwPm.system.js +0 -1
  184. package/dist/baloise-design-system/p-Ectc3YAG.js +0 -1
  185. package/dist/baloise-design-system/p-a97c5309f7.entry.js +0 -1
  186. package/dist/baloise-design-system/p-f217ad88a9.entry.js +0 -1
  187. package/dist/baloise-design-system/p-f7b16f08ab.entry.js +0 -1
  188. package/dist/baloise-design-system/p-fc9a46b295.entry.js +0 -1
  189. package/dist/cjs/app-globals-DcKvQZAC.js +0 -7
  190. package/dist/cjs/bal-check.cjs.entry.js +0 -55
  191. package/dist/cjs/bal-checkbox_2.cjs.entry.js +0 -734
  192. package/dist/cjs/bal-doc-app.cjs.entry.js +0 -231
  193. package/dist/cjs/bal-radio-icon.cjs.entry.js +0 -55
  194. package/dist/cjs/bal-switch.cjs.entry.js +0 -50
  195. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +0 -1
  196. package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +0 -248
  197. package/dist/esm/app-globals-CIj5uAPM.js +0 -5
  198. package/dist/esm/bal-check.entry.js +0 -53
  199. package/dist/esm/bal-checkbox_2.entry.js +0 -731
  200. package/dist/esm/bal-doc-app.entry.js +0 -229
  201. package/dist/esm/bal-radio-icon.entry.js +0 -53
  202. package/dist/esm-es5/app-globals-CIj5uAPM.js +0 -1
  203. package/dist/esm-es5/bal-check.entry.js +0 -1
  204. package/dist/esm-es5/bal-checkbox_2.entry.js +0 -1
  205. package/dist/esm-es5/bal-doc-app.entry.js +0 -1
  206. package/dist/esm-es5/bal-dropdown_3.entry.js +0 -1
  207. package/dist/esm-es5/bal-radio-icon.entry.js +0 -1
  208. package/dist/esm-es5/bal-switch.entry.js +0 -1
  209. package/dist/esm-es5/global-Llrc69_N.js +0 -1
  210. package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +0 -21
  211. package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +0 -82
  212. /package/dist/baloise-design-system/{p-CvA86VZU.js → p-Dk6PruGq.js} +0 -0
  213. /package/dist/baloise-design-system/{p-BpG6m494.system.js → p-Nqmo3uHl.system.js} +0 -0
  214. /package/dist/esm-es5/{tokens.esm-CvA86VZU.js → tokens.esm-Dk6PruGq.js} +0 -0
@@ -1 +1 @@
1
- import{__awaiter,__generator}from"tslib";import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-BdVwMG9u.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-dfXERft2.js";import{B as BEM}from"./bem-ByiN-QjD.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-DcfCKRvu.js";import{s as stopEventBubbling}from"./form-input-DYvzaBlM.js";import{a as ariaBooleanToString}from"./aria-DBsOHTWj.js";import{t as toKebabCase,S as SwiperUtil}from"./string-Dk4PnSfl.js";import{L as ListenToMutation}from"./mutation.decorator-DhVeNnnY.js";import{L as ListenToSwipe}from"./swipe.decorator-B-pmjyNr.js";import{L as ListenToResize}from"./resize.decorator-ZKPOJfw5.js";import{b as balBreakpoints}from"./breakpoints.subject-9qUvMXOC.js";import{d as defaultConfig}from"./config.default-RE8-gLMQ.js";import{L as ListenToVisibility}from"./visibility.decorator-zTjPC2du.js";import{L as ListenToConfig}from"./config.decorator-3bfyZ-0Y.js";import{s as sanitizeSvg}from"./svg-DhNz-XmR.js";import{i as inheritAttributes}from"./attributes-C4sZQbkT.js";import{l as rOnLoad,a as waitAfterFramePaint}from"./helpers-BNj87EbG.js";import"./keyboard.helpers-BERg8BNc.js";import"./listener-CClDIhvK.js";import"./browser-B1u-Mq75.js";import"./swipe.subject-BXuaiulg.js";import"./device-TtMibDFL.js";import"./tokens.esm-CvA86VZU.js";import"./config.utils-B7jugjyM.js";import"./log-CwssmmaV.js";import"./_commonjsHelpers-BFTU3MAI.js";var TabControl=function(e){var t=e.value,r=e.items,a=e.containerId,o=e.onControlChange;var i=BEM.block("carousel");var n=i.element("controls");return h("div",{class:Object.assign(Object.assign({},n.class()),n.modifier("tabs").class())},h("bal-card",null,h("bal-card-content",{role:"tabs"},r.map((function(e){return h("button",{class:{button:true,"is-fullwidth":true,"is-primary":t===e.value,"is-light":t!==e.value},role:"tab","aria-selected":ariaBooleanToString(t===e.value),"aria-controls":a+"-"+toKebabCase(e.label),key:e.value,onClick:function(){return o(e)}},e.label)})))))};var balCarouselCss=':root{--bal-carousel-inner-border-background:var(--bal-color-border);--bal-carousel-inner-border-background-inverted:var(--bal-color-border-primary-light);--bal-carousel-inner-shadow-left-background-before:var(--bal-color-white);--bal-carousel-inner-shadow-right-background-after:var(--bal-color-white);--bal-carousel-inner-shadow-left-background-inverted-before:var(--bal-color-primary);--bal-carousel-inner-shadow-right-background-inverted-after:var(--bal-color-primary);--bal-carousel-product-item-button-background:var(--bal-color-white);--bal-carousel-product-item-button-background-green:var(--bal-color-green-1);--bal-carousel-product-item-button-background-green-hover:var(--bal-color-green-1);--bal-carousel-product-item-button-background-green-active:var(--bal-color-green-2);--bal-carousel-product-item-button-background-red:var(--bal-color-red-1);--bal-carousel-product-item-button-background-red-hover:var(--bal-color-red-1);--bal-carousel-product-item-button-background-red-active:var(--bal-color-red-2);--bal-carousel-product-item-button-background-yellow:var(--bal-color-yellow-1);--bal-carousel-product-item-button-background-yellow-hover:var(--bal-color-yellow-1);--bal-carousel-product-item-button-background-yellow-active:var(--bal-color-yellow-2);--bal-carousel-product-item-button-background-purple:var(--bal-color-purple-1);--bal-carousel-product-item-button-background-purple-hover:var(--bal-color-purple-1);--bal-carousel-product-item-button-background-purple-active:var(--bal-color-purple-2);--bal-carousel-inner-border-radius:var(--bal-radius-rounded);--bal-carousel-image-border-radius:var(--bal-radius-normal);--bal-carousel-product-item-button-border-radius:var(--bal-radius-large);--bal-carousel-product-item-button-label-text-color:var(--bal-color-text-primary);--bal-carousel-sticky-top:0}.bal-swiper{position:relative;display:block}.bal-swiper__inner{display:block;position:relative;margin-left:auto;margin-right:auto;overflow:clip;list-style:none;padding:0;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-overflow-scrolling:touch}.bal-swiper__inner--items-per-view-auto .bal-carousel__item{width:auto}.bal-swiper__inner--items-per-view-1 .bal-carousel__item{width:100%}.bal-swiper__inner--items-per-view-2 .bal-carousel__item{width:50%}.bal-swiper__inner--items-per-view-3 .bal-carousel__item{width:33.3333%}.bal-swiper__inner--items-per-view-4 .bal-carousel__item{width:25%}.bal-swiper__container{position:relative;max-width:100%;width:100%;height:100%;display:-ms-flexbox;display:flex;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-duration:0ms;transition-duration:0ms;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.bal-swiper__container--gap-none{gap:0}.bal-swiper__container--gap-normal{gap:1rem}.bal-swiper__container--gap-medium{gap:1.5rem}.bal-swiper__controls{width:100%}.bal-swiper__controls--dots{position:relative}@media screen and (max-width: 768px){.bal-swiper__controls--large{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:2rem;margin-top:1rem}}@media screen and (min-width: 769px),print{.bal-swiper__controls--large{position:absolute;top:calc(50% - 1.5rem)}.bal-swiper__controls--large .bal-swiper__controls__button{position:absolute;z-index:7}.bal-swiper__controls--large .bal-swiper__controls__button--left{left:0}.bal-swiper__controls--large .bal-swiper__controls__button--right{right:0}}.bal-swiper__controls__button--hidden{display:none !important;visibility:none !important}.bal-swiper__controls--small{position:absolute;top:calc(50% - 1rem)}.bal-swiper__controls--small .bal-swiper__controls__button{position:absolute;z-index:7}.bal-swiper__controls--small .bal-swiper__controls__button--left{left:0}.bal-swiper__controls--small .bal-swiper__controls__button--right{right:0}.bal-swiper__controls--small .bal-swiper__controls__button--hidden{display:none !important;visibility:hidden !important}.bal-swiper__inner--shadow-left::before,.bal-swiper__inner--shadow-right::after{position:absolute;width:3rem;height:100%;top:0}.bal-swiper__inner--shadow-left::before{content:"";left:0;background:-webkit-gradient(linear, left top, right top, color-stop(50%, var(--bal-carousel-inner-shadow-left-background-before)), to(rgba(255, 255, 255, 0)));background:linear-gradient(90deg, var(--bal-carousel-inner-shadow-left-background-before) 50%, rgba(255, 255, 255, 0) 100%)}.bal-swiper__inner--shadow-right::after{content:"";right:0;background:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(50%, var(--bal-carousel-inner-shadow-right-background-after)));background:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-after) 50%)}.bal-swiper__inner--shadow-left.bal-swiper__inner--inverted::before{background:-webkit-gradient(linear, left top, right top, color-stop(50%, var(--bal-carousel-inner-shadow-left-background-inverted-before)), to(rgba(255, 255, 255, 0)));background:linear-gradient(90deg, var(--bal-carousel-inner-shadow-left-background-inverted-before) 50%, rgba(255, 255, 255, 0) 100%)}.bal-swiper__inner--shadow-right.bal-swiper__inner--inverted::after{background:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(50%, var(--bal-carousel-inner-shadow-right-background-inverted-after)));background:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-inverted-after) 50%)}.bal-carousel--full-height{height:100%}.bal-carousel--full-height .bal-carousel__item{height:auto}.bal-carousel__inner--full-height{height:100%}.bal-carousel__inner__container--border{padding-bottom:var(--bal-border-width-normal)}.bal-carousel__inner__container__border{position:absolute;background:var(--bal-carousel-inner-border-background);border-radius:var(--bal-carousel-inner-border-radius);height:var(--bal-border-width-normal);width:100%;bottom:0;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.bal-carousel__inner__container__border--inverted{background:var(--bal-carousel-inner-border-background-inverted)}.bal-carousel__item{-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;font-size:var(--bal-text-size-large);min-height:2rem;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;round:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-inverted-after) 50%)}.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:2.5rem}}@media screen and (min-width: 1024px){.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:3rem}}.bal-carousel--card{margin-left:-1rem;margin-right:-1rem}@media screen and (min-width: 769px),print{.bal-carousel--card{margin-left:-2.5rem;margin-right:-2.5rem}}.bal-carousel--card .bal-carousel__controls{padding-left:1rem;padding-right:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__controls{padding-left:2.5rem;padding-right:2.5rem}}.bal-carousel--card .bal-carousel__item{width:100%;padding-top:1rem;padding-bottom:1rem;padding-left:1rem;padding-right:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__item{width:100%;padding-top:2.5rem;padding-bottom:2.5rem;padding-left:2.5rem;padding-right:2.5rem}}.bal-carousel--controls-sticky .bal-carousel__controls--tabs{position:-webkit-sticky;position:sticky;top:var(--bal-carousel-sticky-top);z-index:var(--bal-z-index-sticky)}.bal-carousel__controls--tabs .bal-card{padding:0}.bal-carousel__controls--tabs .bal-card-content{padding:.5rem !important;gap:.5rem;display:-ms-flexbox;display:flex}.bal-carousel__controls--tabs .bal-card-content .bal-button{-ms-flex:1;flex:1}.bal-carousel__controls--tabs .bal-card-content .bal-button .button{padding:.5rem !important}.bal-carousel--image .bal-carousel__inner{border-radius:var(--bal-carousel-image-border-radius)}.bal-carousel--image .bal-carousel__inner--is-1by1{padding-top:100%}.bal-carousel--image .bal-carousel__inner--is-16by9{padding-top:56.25%}.bal-carousel--image .bal-carousel__inner--is-3by2{padding-top:66.66%}.bal-carousel--image .bal-carousel__inner--is-4by3{padding-top:75%}.bal-carousel--image .bal-carousel__inner__container{position:absolute;top:0;left:0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%}.bal-carousel--image .bal-carousel__item{position:relative;-ms-flex:0 0 100%;flex:0 0 100%}.bal-carousel--image .bal-carousel__item>img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-drag:none;user-zoom:fixed}.bal-carousel--product .bal-carousel__inner__container{gap:1rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding-top:1rem;padding-bottom:1rem}@media screen and (min-width: 769px),print{.bal-carousel--product .bal-carousel__inner__container{padding-top:1.5rem;padding-bottom:1.5rem}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__inner__container{padding-top:2rem;padding-bottom:2rem}}.bal-carousel--product .bal-carousel__item{display:-ms-flexbox;display:flex;min-width:10rem;max-width:10rem;height:11rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-zoom:fixed;user-drag:none}.bal-carousel--product .bal-carousel__item img{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-zoom:fixed;user-drag:none}.bal-carousel--product .bal-carousel__item__button{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:1rem;border-radius:var(--bal-carousel-product-item-button-border-radius);padding:var(--bal-text-size-x-small);border:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;background:var(--bal-carousel-product-item-button-background)}@media (hover: hover)and (pointer: fine){.bal-carousel--product .bal-carousel__item__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-green{background:var(--bal-carousel-product-item-button-background-green)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-green:hover{background:var(--bal-carousel-product-item-button-background-green-hover)}.bal-carousel--product .bal-carousel__item__button--color-green:active{background:var(--bal-carousel-product-item-button-background-green-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-red{background:var(--bal-carousel-product-item-button-background-red)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-red:hover{background:var(--bal-carousel-product-item-button-background-red-hover)}.bal-carousel--product .bal-carousel__item__button--color-red:active{background:var(--bal-carousel-product-item-button-background-red-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-yellow{background:var(--bal-carousel-product-item-button-background-yellow)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-yellow:hover{background:var(--bal-carousel-product-item-button-background-yellow-hover)}.bal-carousel--product .bal-carousel__item__button--color-yellow:active{background:var(--bal-carousel-product-item-button-background-yellow-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-purple{background:var(--bal-carousel-product-item-button-background-purple)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-purple:hover{background:var(--bal-carousel-product-item-button-background-purple-hover)}.bal-carousel--product .bal-carousel__item__button--color-purple:active{background:var(--bal-carousel-product-item-button-background-purple-active)}}.bal-carousel--product .bal-carousel__item__button__image{width:5rem;height:5rem;pointer-events:none}.bal-carousel--product .bal-carousel__item__button__label{font-weight:var(--bal-font-weight-bold);color:var(--bal-carousel-product-item-button-label-text-color);font-size:var(--bal-text-size-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;height:3.5rem;overflow:hidden;line-height:1.15rem;word-break:break-word}';var Carousel=function(){function e(e){registerInstance(this,e);this.balChange=createEvent(this,"balChange");this.swiper=new SwiperUtil;this.swiperIsLastSlideVisible=false;this.hasAnimated=false;this.isMobile=balBreakpoints.isMobile;this.language=defaultConfig.language;this.value=0;this.steps=1;this.itemsPerView=1;this.controls="none";this.space="none";this.htmlRole="list";this.controlsOverflow=false;this.inverted=false;this.fullHeight=false;this.aspectRatio="16by9";this.interface="";this.controlsSticky=false;this.scrollY=true;this.border=false;this.mutationObserverActive=true}e.prototype.onValueChange=function(){this.swiper.index=this.value};e.prototype.onStepsChange=function(){this.swiper.steps=this.steps};e.prototype.onItemsPerViewChange=function(){this.swiper.itemsPerView=this.itemsPerView};e.prototype.onControlsChange=function(){this.swiper.controls=this.controls};e.prototype.onSpaceChange=function(){this.swiper.gapSpace=this.space};e.prototype.onInterFaceChange=function(){this.swiper.gapSpace=this.interface==="product"?"normal":this.space};e.prototype.connectedCallback=function(){this.swiper.connectedCallback(this);this.onControlsChange();this.onItemsPerViewChange();this.onStepsChange();this.onSpaceChange();this.onInterFaceChange();this.onValueChange()};e.prototype.disconnectedCallback=function(){this.swiper.disconnectedCallback()};e.prototype.blockVerticalScrolling=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){if(!this.scrollY&&((t=this.el)===null||t===void 0?void 0:t.contains(e.target))){stopEventBubbling(e)}return[2]}))}))};e.prototype.mutationListener=function(){this.swiper.notifyChange()};e.prototype.visibilityListener=function(){this.swiper.notifyChange()};e.prototype.swipeListener=function(e){var t=e.left,r=e.right;if(t){this.next()}else if(r){this.previous()}};e.prototype.breakpointListener=function(e){this.isMobile=e.mobile;this.swiper.notifyChange()};e.prototype.resizeListener=function(){this.swiper.notifyChange()};e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=e.language;return[2]}))}))};e.prototype.previous=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=this.steps}return __generator(this,(function(t){this.swiper.previous(e);return[2]}))}))};e.prototype.next=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=this.steps}return __generator(this,(function(t){this.swiper.next(e);return[2]}))}))};e.prototype.getContainerId=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.swiper.containerId]}))}))};e.prototype.swiperGetAllChildrenElements=function(){return Array.from(this.el.querySelectorAll("bal-carousel-item"))};e.prototype.swiperOnChange=function(e){this.value=e;this.balChange.emit(e)};e.prototype.render=function(){var e=this;var t=BEM.block("carousel");var r=t.element("inner");var a=r.element("container");return h(Host,{key:"561107c8e3c5eb7a80b3e2a8b113ed13f2fdfb5d",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.swiper.cssSwiper()),t.class()),t.modifier(this.interface).class(this.interface!=="")),t.modifier("full-height").class(this.fullHeight)),t.modifier("controls-sticky").class(this.controlsSticky)),t.modifier("controls-tabs").class(this.controls==="tabs"))},this.controls==="tabs"?h(TabControl,{value:this.value,items:this.swiper.getAllControlItems(),containerId:this.swiper.containerId,onControlChange:function(t){return e.swiper.onControlChange(t.value)}}):"",h("div",{key:"6adb9641efe5f488a940ffac297bcc7b3932c92a",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.swiper.cssInnerSwiper()),r.class()),r.modifier("is-".concat(this.aspectRatio)).class()),r.modifier("inverted").class(this.inverted)),r.modifier("full-height").class(this.fullHeight)),ref:function(t){return e.swiper.innerEl=t}},h("div",{key:"fb4083afd4a967761c25200e8630f171b02a6c2d",id:this.swiper.containerId,role:this.controls==="tabs"?"":"list",class:Object.assign(Object.assign(Object.assign(Object.assign({},this.swiper.cssSwiperContainer()),a.class()),a.modifier("border").class(this.border)),a.modifier("is-".concat(this.aspectRatio)).class()),ref:function(t){return e.swiper.containerEl=t}},h("slot",{key:"c46d996cc3904bcdc38951f155e3a49f73f284f8"}),this.border?h("div",{id:"".concat(this.swiper.id,"-border"),"aria-hidden":"true",class:Object.assign(Object.assign({},a.element("border").class()),a.element("border").modifier("inverted").class(this.inverted)),ref:function(t){return e.swiper.borderEl=t}}):"")),this.swiper.renderControls())};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["onValueChange"],steps:["onStepsChange"],itemsPerView:["onItemsPerViewChange"],controls:["onControlsChange"],space:["onSpaceChange"],interface:["onInterFaceChange"]}},enumerable:false,configurable:true});return e}();__decorate([ListenToMutation({tags:["bal-carousel-item"],characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"mutationListener",null);__decorate([ListenToVisibility(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"visibilityListener",null);__decorate([ListenToSwipe(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Carousel.prototype,"swipeListener",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Carousel.prototype,"breakpointListener",null);__decorate([ListenToResize(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"resizeListener",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Carousel.prototype,"configChanged",null);Carousel.style=balCarouselCss;var CarouselItem=function(){function e(e){var t=this;registerInstance(this,e);this.balNavigate=createEvent(this,"balNavigate");this.balFocus=createEvent(this,"balFocus");this.balBlur=createEvent(this,"balBlur");this.imageInheritAttributes={};this.isOnLoadEventDone=false;this.containerId="";this.svgContent="";this.label="";this.svg="";this.htmlRole="listitem";this.elementType="button";this.name=undefined;this.value=undefined;this.target="_self";this.generateSvgContent=function(){if(t.svg!==undefined&&t.svg.length>0){t.svgContent=sanitizeSvg(t.svg)}};this.onClick=function(e){if(t.href!==undefined){t.balNavigate.emit(e)}};this.onFocus=function(){t.balFocus.emit()};this.onBlur=function(){t.balBlur.emit()}}e.prototype.svgChanged=function(){this.generateSvgContent()};e.prototype.connectedCallback=function(){this.generateSvgContent()};e.prototype.componentDidLoad=function(){var e=this;rOnLoad((function(){e.isOnLoadEventDone=true}))};e.prototype.componentWillLoad=function(){this.imageInheritAttributes=inheritAttributes(this.el,["alt"]);this.getContainerId()};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,waitAfterFramePaint()];case 1:e.sent();if(this.buttonEl){this.buttonEl.focus()}return[2]}}))}))};e.prototype.getContainerId=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:e=this.el.closest("bal-carousel");t=this;return[4,e.getContainerId()];case 1:t.containerId=r.sent();return[2]}}))}))};e.prototype.render=function(){var e=this;var t=BEM.block("carousel");var r=t.element("item");var a=!!this.color&&!!this.label;var o=this.el.closest("bal-carousel");var i=o&&o.controls==="tabs"?"tabpanel":"listitem";var n="".concat(this.containerId,"-").concat(toKebabCase(this.label));if(!a){return h(Host,{id:n,role:i,class:Object.assign({},r.class()),"aria-label":this.label},this.isOnLoadEventDone&&this.src!==undefined?h("img",Object.assign({draggable:false,onDragStart:function(){return false},src:this.src},this.imageInheritAttributes)):"",h("slot",null))}var s=r.element("button");var l=s.element("image");var c=s.element("label");var u=this,b=u.elementType,d=u.download,p=u.href,m=u.rel,_=u.target,g=u.name,f=u.value;var v=this.href===undefined?"button":"a";var w=v==="button"?{type:b,name:g,value:f}:{download:d,href:p,rel:m,target:_};return h(Host,{id:n,role:i,"aria-label":this.label,class:Object.assign({},r.class())},h(v,Object.assign({},w,{class:Object.assign(Object.assign({},s.class()),s.modifier("color-".concat(this.color)).class()),part:"native",onFocus:this.onFocus,onBlur:this.onBlur,onClick:this.onClick,ref:function(t){return e.buttonEl=t}}),this.isOnLoadEventDone&&this.src!==undefined?h("img",Object.assign({class:Object.assign({},l.class()),draggable:false,onDragStart:function(){return false},"aria-hidden":"true",src:this.src},this.imageInheritAttributes)):this.isOnLoadEventDone&&this.svgContent!==undefined?h("div",{class:Object.assign({},l.class()),innerHTML:this.svgContent}):"",this.label!==undefined?h("span",{class:Object.assign({},c.class())},this.label):"",h("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{svg:["svgChanged"]}},enumerable:false,configurable:true});return e}();export{Carousel as bal_carousel,CarouselItem as bal_carousel_item};
1
+ import{__awaiter,__generator}from"tslib";import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-BdVwMG9u.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-dfXERft2.js";import{B as BEM}from"./bem-ByiN-QjD.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-DwhK_t2m.js";import{s as stopEventBubbling}from"./form-input-DYvzaBlM.js";import{a as ariaBooleanToString}from"./aria-DBsOHTWj.js";import{t as toKebabCase,S as SwiperUtil}from"./string-Dk4PnSfl.js";import{L as ListenToMutation}from"./mutation.decorator-DhVeNnnY.js";import{L as ListenToSwipe}from"./swipe.decorator-B-pmjyNr.js";import{L as ListenToResize}from"./resize.decorator-ZKPOJfw5.js";import{b as balBreakpoints}from"./breakpoints.subject-PxavGndB.js";import{d as defaultConfig}from"./config.default-RE8-gLMQ.js";import{L as ListenToVisibility}from"./visibility.decorator-zTjPC2du.js";import{L as ListenToConfig}from"./config.decorator-3bfyZ-0Y.js";import{s as sanitizeSvg}from"./svg-DhNz-XmR.js";import{i as inheritAttributes}from"./attributes-C4sZQbkT.js";import{l as rOnLoad,a as waitAfterFramePaint}from"./helpers-BNj87EbG.js";import"./keyboard.helpers-BERg8BNc.js";import"./listener-CClDIhvK.js";import"./browser-B1u-Mq75.js";import"./swipe.subject-BXuaiulg.js";import"./device-TtMibDFL.js";import"./tokens.esm-Dk6PruGq.js";import"./config.utils-B7jugjyM.js";import"./log-CwssmmaV.js";import"./_commonjsHelpers-BFTU3MAI.js";var TabControl=function(e){var t=e.value,r=e.items,a=e.containerId,o=e.onControlChange;var i=BEM.block("carousel");var n=i.element("controls");return h("div",{class:Object.assign(Object.assign({},n.class()),n.modifier("tabs").class())},h("bal-card",null,h("bal-card-content",{role:"tabs"},r.map((function(e){return h("button",{class:{button:true,"is-fullwidth":true,"is-primary":t===e.value,"is-light":t!==e.value},role:"tab","aria-selected":ariaBooleanToString(t===e.value),"aria-controls":a+"-"+toKebabCase(e.label),key:e.value,onClick:function(){return o(e)}},e.label)})))))};var balCarouselCss=':root{--bal-carousel-inner-border-background:var(--bal-color-border);--bal-carousel-inner-border-background-inverted:var(--bal-color-border-primary-light);--bal-carousel-inner-shadow-left-background-before:var(--bal-color-white);--bal-carousel-inner-shadow-right-background-after:var(--bal-color-white);--bal-carousel-inner-shadow-left-background-inverted-before:var(--bal-color-primary);--bal-carousel-inner-shadow-right-background-inverted-after:var(--bal-color-primary);--bal-carousel-product-item-button-background:var(--bal-color-white);--bal-carousel-product-item-button-background-green:var(--bal-color-green-1);--bal-carousel-product-item-button-background-green-hover:var(--bal-color-green-1);--bal-carousel-product-item-button-background-green-active:var(--bal-color-green-2);--bal-carousel-product-item-button-background-red:var(--bal-color-red-1);--bal-carousel-product-item-button-background-red-hover:var(--bal-color-red-1);--bal-carousel-product-item-button-background-red-active:var(--bal-color-red-2);--bal-carousel-product-item-button-background-yellow:var(--bal-color-yellow-1);--bal-carousel-product-item-button-background-yellow-hover:var(--bal-color-yellow-1);--bal-carousel-product-item-button-background-yellow-active:var(--bal-color-yellow-2);--bal-carousel-product-item-button-background-purple:var(--bal-color-purple-1);--bal-carousel-product-item-button-background-purple-hover:var(--bal-color-purple-1);--bal-carousel-product-item-button-background-purple-active:var(--bal-color-purple-2);--bal-carousel-inner-border-radius:var(--bal-radius-rounded);--bal-carousel-image-border-radius:var(--bal-radius-normal);--bal-carousel-product-item-button-border-radius:var(--bal-radius-large);--bal-carousel-product-item-button-label-text-color:var(--bal-color-text-primary);--bal-carousel-sticky-top:0}.bal-swiper{position:relative;display:block}.bal-swiper__inner{display:block;position:relative;margin-left:auto;margin-right:auto;overflow:clip;list-style:none;padding:0;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-overflow-scrolling:touch}.bal-swiper__inner--items-per-view-auto .bal-carousel__item{width:auto}.bal-swiper__inner--items-per-view-1 .bal-carousel__item{width:100%}.bal-swiper__inner--items-per-view-2 .bal-carousel__item{width:50%}.bal-swiper__inner--items-per-view-3 .bal-carousel__item{width:33.3333%}.bal-swiper__inner--items-per-view-4 .bal-carousel__item{width:25%}.bal-swiper__container{position:relative;max-width:100%;width:100%;height:100%;display:-ms-flexbox;display:flex;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-duration:0ms;transition-duration:0ms;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.bal-swiper__container--gap-none{gap:0}.bal-swiper__container--gap-normal{gap:1rem}.bal-swiper__container--gap-medium{gap:1.5rem}.bal-swiper__controls{width:100%}.bal-swiper__controls--dots{position:relative}@media screen and (max-width: 768px){.bal-swiper__controls--large{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:2rem;margin-top:1rem}}@media screen and (min-width: 769px),print{.bal-swiper__controls--large{position:absolute;top:calc(50% - 1.5rem)}.bal-swiper__controls--large .bal-swiper__controls__button{position:absolute;z-index:7}.bal-swiper__controls--large .bal-swiper__controls__button--left{left:0}.bal-swiper__controls--large .bal-swiper__controls__button--right{right:0}}.bal-swiper__controls__button--hidden{display:none !important;visibility:none !important}.bal-swiper__controls--small{position:absolute;top:calc(50% - 1rem)}.bal-swiper__controls--small .bal-swiper__controls__button{position:absolute;z-index:7}.bal-swiper__controls--small .bal-swiper__controls__button--left{left:0}.bal-swiper__controls--small .bal-swiper__controls__button--right{right:0}.bal-swiper__controls--small .bal-swiper__controls__button--hidden{display:none !important;visibility:hidden !important}.bal-swiper__inner--shadow-left::before,.bal-swiper__inner--shadow-right::after{position:absolute;width:3rem;height:100%;top:0}.bal-swiper__inner--shadow-left::before{content:"";left:0;background:-webkit-gradient(linear, left top, right top, color-stop(50%, var(--bal-carousel-inner-shadow-left-background-before)), to(rgba(255, 255, 255, 0)));background:linear-gradient(90deg, var(--bal-carousel-inner-shadow-left-background-before) 50%, rgba(255, 255, 255, 0) 100%)}.bal-swiper__inner--shadow-right::after{content:"";right:0;background:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(50%, var(--bal-carousel-inner-shadow-right-background-after)));background:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-after) 50%)}.bal-swiper__inner--shadow-left.bal-swiper__inner--inverted::before{background:-webkit-gradient(linear, left top, right top, color-stop(50%, var(--bal-carousel-inner-shadow-left-background-inverted-before)), to(rgba(255, 255, 255, 0)));background:linear-gradient(90deg, var(--bal-carousel-inner-shadow-left-background-inverted-before) 50%, rgba(255, 255, 255, 0) 100%)}.bal-swiper__inner--shadow-right.bal-swiper__inner--inverted::after{background:-webkit-gradient(linear, left top, right top, from(rgba(255, 255, 255, 0)), color-stop(50%, var(--bal-carousel-inner-shadow-right-background-inverted-after)));background:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-inverted-after) 50%)}.bal-carousel--full-height{height:100%}.bal-carousel--full-height .bal-carousel__item{height:auto}.bal-carousel__inner--full-height{height:100%}.bal-carousel__inner__container--border{padding-bottom:var(--bal-border-width-normal)}.bal-carousel__inner__container__border{position:absolute;background:var(--bal-carousel-inner-border-background);border-radius:var(--bal-carousel-inner-border-radius);height:var(--bal-border-width-normal);width:100%;bottom:0;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.bal-carousel__inner__container__border--inverted{background:var(--bal-carousel-inner-border-background-inverted)}.bal-carousel__item{-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;font-size:var(--bal-text-size-large);min-height:2rem;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;round:linear-gradient(90deg, rgba(255, 255, 255, 0), var(--bal-carousel-inner-shadow-right-background-inverted-after) 50%)}.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:2.5rem}}@media screen and (min-width: 1024px){.bal-carousel--card .bal-carousel__inner--shadow-left::before,.bal-carousel--card .bal-carousel__inner--shadow-right::after{width:3rem}}.bal-carousel--card{margin-left:-1rem;margin-right:-1rem}@media screen and (min-width: 769px),print{.bal-carousel--card{margin-left:-2.5rem;margin-right:-2.5rem}}.bal-carousel--card .bal-carousel__controls{padding-left:1rem;padding-right:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__controls{padding-left:2.5rem;padding-right:2.5rem}}.bal-carousel--card .bal-carousel__item{width:100%;padding-top:1rem;padding-bottom:1rem;padding-left:1rem;padding-right:1rem}@media screen and (min-width: 769px),print{.bal-carousel--card .bal-carousel__item{width:100%;padding-top:2.5rem;padding-bottom:2.5rem;padding-left:2.5rem;padding-right:2.5rem}}.bal-carousel--controls-sticky .bal-carousel__controls--tabs{position:-webkit-sticky;position:sticky;top:var(--bal-carousel-sticky-top);z-index:var(--bal-z-index-sticky)}.bal-carousel__controls--tabs .bal-card{padding:0}.bal-carousel__controls--tabs .bal-card-content{padding:.5rem !important;gap:.5rem;display:-ms-flexbox;display:flex}.bal-carousel__controls--tabs .bal-card-content .bal-button{-ms-flex:1;flex:1}.bal-carousel__controls--tabs .bal-card-content .bal-button .button{padding:.5rem !important}.bal-carousel--image .bal-carousel__inner{border-radius:var(--bal-carousel-image-border-radius)}.bal-carousel--image .bal-carousel__inner--is-1by1{padding-top:100%}.bal-carousel--image .bal-carousel__inner--is-16by9{padding-top:56.25%}.bal-carousel--image .bal-carousel__inner--is-3by2{padding-top:66.66%}.bal-carousel--image .bal-carousel__inner--is-4by3{padding-top:75%}.bal-carousel--image .bal-carousel__inner__container{position:absolute;top:0;left:0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%}.bal-carousel--image .bal-carousel__item{position:relative;-ms-flex:0 0 100%;flex:0 0 100%}.bal-carousel--image .bal-carousel__item>img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-drag:none;user-zoom:fixed}.bal-carousel--product .bal-carousel__inner__container{gap:1rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;padding-top:1rem;padding-bottom:1rem}@media screen and (min-width: 769px),print{.bal-carousel--product .bal-carousel__inner__container{padding-top:1.5rem;padding-bottom:1.5rem}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__inner__container{padding-top:2rem;padding-bottom:2rem}}.bal-carousel--product .bal-carousel__item{display:-ms-flexbox;display:flex;min-width:10rem;max-width:10rem;height:11rem;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-zoom:fixed;user-drag:none}.bal-carousel--product .bal-carousel__item img{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;user-zoom:fixed;user-drag:none}.bal-carousel--product .bal-carousel__item__button{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;gap:1rem;border-radius:var(--bal-carousel-product-item-button-border-radius);padding:var(--bal-text-size-x-small);border:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none;background:var(--bal-carousel-product-item-button-background)}@media (hover: hover)and (pointer: fine){.bal-carousel--product .bal-carousel__item__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-green{background:var(--bal-carousel-product-item-button-background-green)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-green:hover{background:var(--bal-carousel-product-item-button-background-green-hover)}.bal-carousel--product .bal-carousel__item__button--color-green:active{background:var(--bal-carousel-product-item-button-background-green-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-red{background:var(--bal-carousel-product-item-button-background-red)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-red:hover{background:var(--bal-carousel-product-item-button-background-red-hover)}.bal-carousel--product .bal-carousel__item__button--color-red:active{background:var(--bal-carousel-product-item-button-background-red-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-yellow{background:var(--bal-carousel-product-item-button-background-yellow)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-yellow:hover{background:var(--bal-carousel-product-item-button-background-yellow-hover)}.bal-carousel--product .bal-carousel__item__button--color-yellow:active{background:var(--bal-carousel-product-item-button-background-yellow-active)}}@media screen and (max-width: 1023px){.bal-carousel--product .bal-carousel__item__button--color-purple{background:var(--bal-carousel-product-item-button-background-purple)}}@media screen and (min-width: 1024px){.bal-carousel--product .bal-carousel__item__button--color-purple:hover{background:var(--bal-carousel-product-item-button-background-purple-hover)}.bal-carousel--product .bal-carousel__item__button--color-purple:active{background:var(--bal-carousel-product-item-button-background-purple-active)}}.bal-carousel--product .bal-carousel__item__button__image{width:5rem;height:5rem;pointer-events:none}.bal-carousel--product .bal-carousel__item__button__label{font-weight:var(--bal-font-weight-bold);color:var(--bal-carousel-product-item-button-label-text-color);font-size:var(--bal-text-size-normal);-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;height:3.5rem;overflow:hidden;line-height:1.15rem;word-break:break-word}';var Carousel=function(){function e(e){registerInstance(this,e);this.balChange=createEvent(this,"balChange");this.swiper=new SwiperUtil;this.swiperIsLastSlideVisible=false;this.hasAnimated=false;this.isMobile=balBreakpoints.isMobile;this.language=defaultConfig.language;this.value=0;this.steps=1;this.itemsPerView=1;this.controls="none";this.space="none";this.htmlRole="list";this.controlsOverflow=false;this.inverted=false;this.fullHeight=false;this.aspectRatio="16by9";this.interface="";this.controlsSticky=false;this.scrollY=true;this.border=false;this.mutationObserverActive=true}e.prototype.onValueChange=function(){this.swiper.index=this.value};e.prototype.onStepsChange=function(){this.swiper.steps=this.steps};e.prototype.onItemsPerViewChange=function(){this.swiper.itemsPerView=this.itemsPerView};e.prototype.onControlsChange=function(){this.swiper.controls=this.controls};e.prototype.onSpaceChange=function(){this.swiper.gapSpace=this.space};e.prototype.onInterFaceChange=function(){this.swiper.gapSpace=this.interface==="product"?"normal":this.space};e.prototype.connectedCallback=function(){this.swiper.connectedCallback(this);this.onControlsChange();this.onItemsPerViewChange();this.onStepsChange();this.onSpaceChange();this.onInterFaceChange();this.onValueChange()};e.prototype.disconnectedCallback=function(){this.swiper.disconnectedCallback()};e.prototype.blockVerticalScrolling=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){if(!this.scrollY&&((t=this.el)===null||t===void 0?void 0:t.contains(e.target))){stopEventBubbling(e)}return[2]}))}))};e.prototype.mutationListener=function(){this.swiper.notifyChange()};e.prototype.visibilityListener=function(){this.swiper.notifyChange()};e.prototype.swipeListener=function(e){var t=e.left,r=e.right;if(t){this.next()}else if(r){this.previous()}};e.prototype.breakpointListener=function(e){this.isMobile=e.mobile;this.swiper.notifyChange()};e.prototype.resizeListener=function(){this.swiper.notifyChange()};e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.language=e.language;return[2]}))}))};e.prototype.previous=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=this.steps}return __generator(this,(function(t){this.swiper.previous(e);return[2]}))}))};e.prototype.next=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=this.steps}return __generator(this,(function(t){this.swiper.next(e);return[2]}))}))};e.prototype.getContainerId=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.swiper.containerId]}))}))};e.prototype.swiperGetAllChildrenElements=function(){return Array.from(this.el.querySelectorAll("bal-carousel-item"))};e.prototype.swiperOnChange=function(e){this.value=e;this.balChange.emit(e)};e.prototype.render=function(){var e=this;var t=BEM.block("carousel");var r=t.element("inner");var a=r.element("container");return h(Host,{key:"561107c8e3c5eb7a80b3e2a8b113ed13f2fdfb5d",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.swiper.cssSwiper()),t.class()),t.modifier(this.interface).class(this.interface!=="")),t.modifier("full-height").class(this.fullHeight)),t.modifier("controls-sticky").class(this.controlsSticky)),t.modifier("controls-tabs").class(this.controls==="tabs"))},this.controls==="tabs"?h(TabControl,{value:this.value,items:this.swiper.getAllControlItems(),containerId:this.swiper.containerId,onControlChange:function(t){return e.swiper.onControlChange(t.value)}}):"",h("div",{key:"6adb9641efe5f488a940ffac297bcc7b3932c92a",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.swiper.cssInnerSwiper()),r.class()),r.modifier("is-".concat(this.aspectRatio)).class()),r.modifier("inverted").class(this.inverted)),r.modifier("full-height").class(this.fullHeight)),ref:function(t){return e.swiper.innerEl=t}},h("div",{key:"fb4083afd4a967761c25200e8630f171b02a6c2d",id:this.swiper.containerId,role:this.controls==="tabs"?"":"list",class:Object.assign(Object.assign(Object.assign(Object.assign({},this.swiper.cssSwiperContainer()),a.class()),a.modifier("border").class(this.border)),a.modifier("is-".concat(this.aspectRatio)).class()),ref:function(t){return e.swiper.containerEl=t}},h("slot",{key:"c46d996cc3904bcdc38951f155e3a49f73f284f8"}),this.border?h("div",{id:"".concat(this.swiper.id,"-border"),"aria-hidden":"true",class:Object.assign(Object.assign({},a.element("border").class()),a.element("border").modifier("inverted").class(this.inverted)),ref:function(t){return e.swiper.borderEl=t}}):"")),this.swiper.renderControls())};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["onValueChange"],steps:["onStepsChange"],itemsPerView:["onItemsPerViewChange"],controls:["onControlsChange"],space:["onSpaceChange"],interface:["onInterFaceChange"]}},enumerable:false,configurable:true});return e}();__decorate([ListenToMutation({tags:["bal-carousel-item"],characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"mutationListener",null);__decorate([ListenToVisibility(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"visibilityListener",null);__decorate([ListenToSwipe(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Carousel.prototype,"swipeListener",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Carousel.prototype,"breakpointListener",null);__decorate([ListenToResize(),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Carousel.prototype,"resizeListener",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Carousel.prototype,"configChanged",null);Carousel.style=balCarouselCss;var CarouselItem=function(){function e(e){var t=this;registerInstance(this,e);this.balNavigate=createEvent(this,"balNavigate");this.balFocus=createEvent(this,"balFocus");this.balBlur=createEvent(this,"balBlur");this.imageInheritAttributes={};this.isOnLoadEventDone=false;this.containerId="";this.svgContent="";this.label="";this.svg="";this.htmlRole="listitem";this.elementType="button";this.name=undefined;this.value=undefined;this.target="_self";this.generateSvgContent=function(){if(t.svg!==undefined&&t.svg.length>0){t.svgContent=sanitizeSvg(t.svg)}};this.onClick=function(e){if(t.href!==undefined){t.balNavigate.emit(e)}};this.onFocus=function(){t.balFocus.emit()};this.onBlur=function(){t.balBlur.emit()}}e.prototype.svgChanged=function(){this.generateSvgContent()};e.prototype.connectedCallback=function(){this.generateSvgContent()};e.prototype.componentDidLoad=function(){var e=this;rOnLoad((function(){e.isOnLoadEventDone=true}))};e.prototype.componentWillLoad=function(){this.imageInheritAttributes=inheritAttributes(this.el,["alt"]);this.getContainerId()};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,waitAfterFramePaint()];case 1:e.sent();if(this.buttonEl){this.buttonEl.focus()}return[2]}}))}))};e.prototype.getContainerId=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(r){switch(r.label){case 0:e=this.el.closest("bal-carousel");t=this;return[4,e.getContainerId()];case 1:t.containerId=r.sent();return[2]}}))}))};e.prototype.render=function(){var e=this;var t=BEM.block("carousel");var r=t.element("item");var a=!!this.color&&!!this.label;var o=this.el.closest("bal-carousel");var i=o&&o.controls==="tabs"?"tabpanel":"listitem";var n="".concat(this.containerId,"-").concat(toKebabCase(this.label));if(!a){return h(Host,{id:n,role:i,class:Object.assign({},r.class()),"aria-label":this.label},this.isOnLoadEventDone&&this.src!==undefined?h("img",Object.assign({draggable:false,onDragStart:function(){return false},src:this.src},this.imageInheritAttributes)):"",h("slot",null))}var s=r.element("button");var l=s.element("image");var c=s.element("label");var u=this,b=u.elementType,d=u.download,p=u.href,m=u.rel,_=u.target,g=u.name,f=u.value;var v=this.href===undefined?"button":"a";var w=v==="button"?{type:b,name:g,value:f}:{download:d,href:p,rel:m,target:_};return h(Host,{id:n,role:i,"aria-label":this.label,class:Object.assign({},r.class())},h(v,Object.assign({},w,{class:Object.assign(Object.assign({},s.class()),s.modifier("color-".concat(this.color)).class()),part:"native",onFocus:this.onFocus,onBlur:this.onBlur,onClick:this.onClick,ref:function(t){return e.buttonEl=t}}),this.isOnLoadEventDone&&this.src!==undefined?h("img",Object.assign({class:Object.assign({},l.class()),draggable:false,onDragStart:function(){return false},"aria-hidden":"true",src:this.src},this.imageInheritAttributes)):this.isOnLoadEventDone&&this.svgContent!==undefined?h("div",{class:Object.assign({},l.class()),innerHTML:this.svgContent}):"",this.label!==undefined?h("span",{class:Object.assign({},c.class())},this.label):"",h("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{svg:["svgChanged"]}},enumerable:false,configurable:true});return e}();export{Carousel as bal_carousel,CarouselItem as bal_carousel_item};
@@ -0,0 +1 @@
1
+ import{__awaiter,__generator,__spreadArray}from"tslib";import{r as registerInstance,h,H as Host,c as createEvent,g as getElement}from"./index-BdVwMG9u.js";import{B as BEM}from"./bem-ByiN-QjD.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-dfXERft2.js";import{a as ariaBooleanToString}from"./aria-DBsOHTWj.js";import{i as inheritAttributes}from"./attributes-C4sZQbkT.js";import{F as FOCUS_KEYS}from"./focus-visible-DqCbGYzv.js";import{d as defaultBalAriaForm}from"./form-FCLKfv6B.js";import{s as stopEventBubbling,c as inputSetFocus,d as inputSetBlur}from"./form-input-DYvzaBlM.js";import{i as isDescendant,v as hasTagName,r as rIC,a as waitAfterFramePaint,o as addEventListener,p as removeEventListener,b as waitAfterIdleCallback,m as raf}from"./helpers-BNj87EbG.js";import{L as Logger}from"./log-CwssmmaV.js";import{i as isSpaceKey,d as isArrowDownKey,b as isArrowUpKey,a as isEnterKey,j as isEscapeKey}from"./keyboard.helpers-BERg8BNc.js";import{L as ListenToElementStates,B as BalElementStateListener}from"./element-states.decorator-B68ANq1p.js";import{a as areArraysEqual}from"./array-CDfSqLEo.js";import{L as ListenToFocus}from"./focus.decorator-C1s3OoqI.js";import{L as ListenToMutation}from"./mutation.decorator-DhVeNnnY.js";import{b as balBrowser}from"./browser-B1u-Mq75.js";import{i as isNil}from"./index-zWZxKBfo.js";import{b as balFloatingUi}from"./floating-ui-gZ7E41T8.js";import{D as DropdownOptionUtil}from"./option-BLp4ll3i.js";import{d as defaultConfig}from"./config.default-RE8-gLMQ.js";import{L as ListenToConfig}from"./config.decorator-3bfyZ-0Y.js";import{i as includes,s as startsWith}from"./utils-C_qktPg7.js";import"./config.utils-B7jugjyM.js";import"./listener-CClDIhvK.js";import"./index-B4k_dH6V.js";import"./_commonjsHelpers-BFTU3MAI.js";var balCheckCss=":root{--bal-check-size:1.5rem;--bal-check-border-width:2px;--bal-check-border-radius:var(--bal-radius-normal);--bal-check-color-inverted:var(--bal-color-white);--bal-check-border-color:var(--bal-color-primary);--bal-check-border-color-hovered:var(--bal-color-border-primary-hovered);--bal-check-border-color-pressed:var(--bal-color-border-primary-pressed);--bal-check-border-color-checked:var(--bal-color-primary);--bal-check-border-color-checked-hovered:var(--bal-color-border-primary-hovered);--bal-check-border-color-checked-pressed:var(--bal-color-border-primary-pressed);--bal-check-background:transparent;--bal-check-background-hovered:var(--bal-color-grey-2);--bal-check-background-pressed:var(--bal-color-grey-2);--bal-check-background-checked:var(--bal-color-primary);--bal-check-background-checked-hovered:var(--bal-color-border-primary-hovered);--bal-check-background-checked-pressed:var(--bal-color-border-primary-pressed);--bal-check-border-color-invalid:var(--bal-color-border-danger);--bal-check-border-color-invalid-hovered:var(--bal-color-border-danger-hovered);--bal-check-border-color-invalid-pressed:var(--bal-color-border-danger-pressed);--bal-check-border-color-invalid-checked:var(--bal-color-border-danger);--bal-check-border-color-invalid-checked-hovered:var(--bal-color-border-danger-hovered);--bal-check-border-color-invalid-checked-pressed:var(--bal-color-border-danger-pressed);--bal-check-background-invalid:transparent;--bal-check-background-invalid-hovered:var(--bal-color-danger-1);--bal-check-background-invalid-pressed:var(--bal-color-danger-1);--bal-check-background-invalid-checked:var(--bal-color-border-danger);--bal-check-background-invalid-checked-hovered:var(--bal-color-border-danger-hovered);--bal-check-background-invalid-checked-pressed:var(--bal-color-border-danger-pressed);--bal-check-background-disabled:var(--bal-color-grey-2);--bal-check-border-color-disabled:var(--bal-color-border-grey-dark);--bal-check-background-checked-disabled:var(--bal-color-border-grey-dark);--bal-check-border-color-checked-disabled:var(--bal-color-border-grey-dark)}.bal-check{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:var(--bal-check-size);max-width:var(--bal-check-size);height:var(--bal-check-size);max-height:var(--bal-check-size);border-radius:var(--bal-check-border-radius);overflow:hidden;border:var(--bal-check-border-width) solid var(--bal-check-border-color);background-color:var(--bal-check-background)}@media (hover: hover)and (pointer: fine){.bal-check--hovered,.bal-check:hover{background:var(--bal-check-background-hovered);border-color:var(--bal-check-border-color-hovered)}}.bal-check--pressed,.bal-check:active{background:var(--bal-check-background-pressed);border-color:var(--bal-check-border-color-pressed)}.bal-check bal-icon{opacity:0}.bal-check--checked{background-color:var(--bal-check-background-checked);border-color:var(--bal-check-border-color-checked)}.bal-check--checked bal-icon{opacity:1}@media (hover: hover)and (pointer: fine){.bal-check--checked.bal-check--hovered,.bal-check--checked:hover{background:var(--bal-check-background-checked-hovered);border-color:var(--bal-check-border-color-checked-hovered)}}.bal-check--checked.bal-check--pressed,.bal-check--checked:active{background:var(--bal-check-background-checked-pressed);border-color:var(--bal-check-border-color-checked-pressed)}.bal-check--checked.bal-check--inverted{border-color:var(--bal-check-color-inverted)}.bal-check--invalid{border-color:var(--bal-check-border-color-invalid);background-color:var(--bal-check-background-invalid)}@media (hover: hover)and (pointer: fine){.bal-check--invalid.bal-check--hovered,.bal-check--invalid:hover{background-color:var(--bal-check-background-invalid-hovered);border-color:var(--bal-check-border-color-invalid-hovered)}}.bal-check--invalid.bal-check--pressed,.bal-check--invalid:active{background-color:var(--bal-check-background-invalid-pressed);border-color:var(--bal-check-border-color-invalid-pressed)}.bal-check--invalid.bal-check--checked{border-color:var(--bal-check-border-color-invalid);background:var(--bal-check-background-invalid-checked)}@media (hover: hover)and (pointer: fine){.bal-check--invalid.bal-check--checked.bal-check--hovered,.bal-check--invalid.bal-check--checked:hover{background-color:var(--bal-check-background-invalid-checked-hovered);border-color:var(--bal-check-border-color-invalid-hovered)}}.bal-check--invalid.bal-check--checked.bal-check--pressed,.bal-check--invalid.bal-check--checked:active{background-color:var(--bal-check-background-invalid-checked-pressed);border-color:var(--bal-check-border-color-invalid-pressed)}.bal-check--invalid.bal-check--checked.bal-check--inverted{border-color:var(--bal-check-color-inverted)}.bal-check--disabled{cursor:default !important;background:var(--bal-check-background-disabled) !important;border-color:var(--bal-check-border-color-disabled) !important}.bal-check--disabled.bal-check--checked{background-color:var(--bal-check-background-checked-disabled) !important;border-color:var(--bal-check-border-color-checked-disabled) !important}.bal-check--disabled.bal-check--checked.bal-check--inverted{border-color:var(--bal-check-color-inverted) !important}";var Check=function(){function e(e){registerInstance(this,e);this.checked=false;this.invalid=undefined;this.disabled=undefined;this.inverted=undefined;this.hovered=false;this.pressed=false}e.prototype.render=function(){var e=BEM.block("check");var o=!!this.checked;var r=!!this.disabled;var a=!!this.invalid;var t=!!this.inverted;return h(Host,{key:"c995184b2f4adb6f6de85e17c13ea45f992c88aa",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("checked").class(o)),e.modifier("disabled").class(r)),e.modifier("invalid").class(a)),e.modifier("inverted").class(t)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed))},h("bal-icon",{key:"c93f453451f95b8ac79b25a0e9e71b6baa4e1ac9",name:"check",color:"white",colorHovered:"white",colorPressed:"white",size:"small","aria-hidden":"true",hovered:this.hovered,pressed:this.pressed}))};return e}();Check.style=balCheckCss;var balCheckboxCss="@media (hover: hover)and (pointer: fine){.bal-checkbox.bal-focused{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-checkbox-symbol-size:1.5rem;--bal-checkbox-symbol-border-width:2px;--bal-checkbox-symbol-background:transparent;--bal-checkbox-label-min-height:1.5rem;--bal-checkbox-button-background-hover:var(--bal-color-grey-2);--bal-checkbox-button-background-active:var(--bal-color-grey-2);--bal-checkbox-button-background-checked:var(--bal-color-primary);--bal-checkbox-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-checkbox-button-background-checked-active:var(--bal-color-primary-6);--bal-checkbox-button-background-invalid:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-hover:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-active:var(--bal-color-danger-1);--bal-checkbox-button-background-invalid-checked:var(--bal-color-border-danger);--bal-checkbox-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-checkbox-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-checkbox-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-checkbox-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-button-background:transparent;--bal-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-checkbox-button-border-color:var(--bal-color-primary);--bal-checkbox-button-border-color-hover:var(--bal-color-light-blue-5);--bal-checkbox-button-border-color-active:var(--bal-color-primary-6);--bal-checkbox-button-border-color-invalid:var(--bal-color-border-danger);--bal-checkbox-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-checkbox-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-checkbox-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-checkbox-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-checkbox-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-checkbox-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-checkbox-tile-background:transparent;--bal-checkbox-tile-background-hover:var(--bal-color-grey-1);--bal-checkbox-tile-background-disabled:var(--bal-color-grey-1);--bal-checkbox-tile-background-invalid-hover:var(--bal-color-danger-1);--bal-checkbox-tile-background-invalid-active:var(--bal-color-danger-1);--bal-checkbox-tile-background-checked-green:var(--bal-color-green-1);--bal-checkbox-tile-background-checked-purple:var(--bal-color-purple-1);--bal-checkbox-tile-background-checked-red:var(--bal-color-red-1);--bal-checkbox-tile-background-checked-yellow:var(--bal-color-yellow-1);--bal-checkbox-tile-border-style:var(--bal-form-field-control-border-style);--bal-checkbox-tile-border-radius:var(--bal-form-field-control-radius);--bal-checkbox-tile-border-width:var(--bal-form-field-control-border-width);--bal-checkbox-tile-padding:var(--bal-text-size-medium);--bal-checkbox-tile-border-color:var(--bal-color-border);--bal-checkbox-tile-border-color-hover:var(--bal-color-border-primary-hovered);--bal-checkbox-tile-border-color-active:var(--bal-color-border-primary-pressed);--bal-checkbox-tile-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-checkbox-tile-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-checkbox-tile-border-color-checked:var(--bal-color-border-primary);--bal-checkbox-tile-border-color-invalid:var(--bal-color-border-danger);--bal-checkbox-tile-border-color-disabled:var(--bal-color-border-grey-dark)}.bal-checkbox{position:relative;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;outline:none;min-width:var(--bal-checkbox-symbol-size);border-radius:var(--bal-radius-normal);cursor:pointer}.bal-checkbox .bal-checkbox__label{cursor:pointer}.bal-checkbox--invisible{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-checkbox.bal-checkbox--flat{min-height:var(--bal-checkbox-symbol-size)}.bal-checkbox:not(.bal-checkbox--flat){min-height:3rem}.bal-checkbox--invalid{color:var(--bal-form-field-label-danger-color)}.bal-checkbox--disabled,.bal-checkbox--disabled .bal-checkbox__label{color:var(--bal-form-field-label-disabled-color);cursor:default}.bal-checkbox__input{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden;width:100%;height:100%}.bal-checkbox__label{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;gap:.5rem;-ms-flex-direction:row;flex-direction:row}.bal-checkbox__label__text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-align:left;contain:layout style;font-family:var(--bal-font-family-text);padding-top:.25rem;padding-bottom:.25rem;width:100%}.bal-checkbox__label__text--hidden{display:none}.bal-checkbox__label__icon{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}@media (hover: hover)and (pointer: fine){.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-text-primary-hovered)}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__icon,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__icon{color:var(--bal-color-text-primary-hovered)}}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-text-primary-pressed)}.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__icon,.bal-checkbox:not(.bal-checkbox--button):not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__icon{color:var(--bal-color-text-primary-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-text-danger-hovered)}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__icon,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):hover .bal-checkbox__label__icon{color:var(--bal-color-text-danger-hovered)}}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-text-danger-pressed)}.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__icon,.bal-checkbox--invalid:not(.bal-checkbox--button):not(.bal-checkbox--disabled):active .bal-checkbox__label__icon{color:var(--bal-color-text-danger-pressed)}.bal-checkbox--button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-x-small);-ms-flex-pack:center;justify-content:center;-ms-flex-align:start;align-items:flex-start;padding-left:.75rem;padding-right:.75rem;min-width:3rem;border-width:2px;border-style:var(--bal-form-field-control-border-style);border-radius:var(--bal-form-field-control-radius);border-color:var(--bal-checkbox-button-border-color)}.bal-checkbox--button.bal-checkbox--checked{background:var(--bal-checkbox-button-background-checked);color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--invalid{border-color:var(--bal-color-border-danger);color:var(--bal-color-text-danger-hovered);background:var(--bal-color-danger-1)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked{color:var(--bal-color-white);background:var(--bal-color-border-danger)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--disabled{border-color:var(--bal-color-grey-4);background:var(--bal-color-grey-2)}.bal-checkbox--button.bal-checkbox--disabled .bal-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked{background:var(--bal-color-grey-4);color:var(--bal-color-white)}.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--disabled.bal-checkbox--checked .bal-checkbox__label__text .link{color:var(--bal-color-white)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-color-grey-2);border-color:var(--bal-color-border-primary-hovered)}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-text-primary-hovered)}}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-color-grey-2);border-color:var(--bal-color-border-primary-pressed)}.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-text-primary-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-color-border-primary-hovered);border-color:var(--bal-color-border-primary-hovered)}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover .bal-checkbox__label__text{color:var(--bal-color-white)}}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-color-border-primary-pressed);border-color:var(--bal-color-border-primary-pressed)}.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--checked:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active .bal-checkbox__label__text{color:var(--bal-color-white)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover{background:var(--bal-color-danger-1);border-color:var(--bal-color-border-danger-hovered)}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-text-danger-hovered)}}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):active{background:var(--bal-color-danger-1);border-color:var(--bal-color-border-danger-pressed)}.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid:not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-text-danger-pressed)}@media (hover: hover)and (pointer: fine){.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):hover{background:var(--bal-color-border-danger-hovered);border-color:var(--bal-color-border-danger-hovered)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--hovered .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):hover .bal-checkbox__label__text{color:var(--bal-color-white)}}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):active{background:var(--bal-color-border-danger-pressed);border-color:var(--bal-color-border-danger-pressed)}.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled).bal-checkbox--pressed .bal-checkbox__label__text,.bal-checkbox--button.bal-checkbox--invalid.bal-checkbox--checked:not(.bal-checkbox--disabled):active .bal-checkbox__label__text{color:var(--bal-color-white)}.bal-checkbox--tile{display:block;-ms-flex:0 0 100%;flex:0 0 100%;background:var(--bal-checkbox-tile-background);border-style:var(--bal-checkbox-tile-border-style);border-radius:var(--bal-checkbox-tile-border-radius);border-width:var(--bal-checkbox-tile-border-width);border-color:var(--bal-checkbox-tile-border-color);padding:var(--bal-checkbox-tile-padding)}.bal-checkbox--tile .bal-checkbox__label{height:100%;-ms-flex-align:stretch;align-items:stretch}.bal-checkbox--tile.bal-checkbox--checked{border-color:var(--bal-checkbox-tile-border-color-checked)}.bal-checkbox--tile.bal-checkbox--invalid{border-color:var(--bal-checkbox-tile-border-color-invalid)}.bal-checkbox--tile.bal-checkbox--disabled{background:var(--bal-checkbox-tile-background-disabled);border-color:var(--bal-checkbox-tile-border-color-disabled);cursor:default}@media (hover: hover)and (pointer: fine){.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--hovered,.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):hover{background:var(--bal-checkbox-tile-background-hover);border-color:var(--bal-checkbox-tile-border-color-hover)}}.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid).bal-checkbox--pressed,.bal-checkbox--tile:not(.bal-checkbox--disabled):not(.bal-checkbox--invalid):active{background:var(--bal-checkbox-tile-background-hover);border-color:var(--bal-checkbox-tile-border-color-active)}@media (hover: hover)and (pointer: fine){.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--hovered,.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled):hover{background:var(--bal-checkbox-tile-background-invalid-hover);border-color:var(--bal-checkbox-tile-border-color-invalid-hover)}}.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled).bal-checkbox--pressed,.bal-checkbox--tile.bal-checkbox--invalid:not(.bal-checkbox--disabled):active{background:var(--bal-checkbox-tile-background-invalid-active);border-color:var(--bal-checkbox-tile-border-color-invalid-active)}.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-green:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-green)}.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-red:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-red)}.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-purple:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-purple)}.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked,.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked.bal-checkbox--hovered,.bal-checkbox--tile-color-yellow:not(.bal-checkbox--disabled).bal-checkbox--checked:hover{background:var(--bal-checkbox-tile-background-checked-yellow)}@media screen and (min-width: 769px),print{.bal-checkbox--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (max-width: 768px){.bal-checkbox--column-mobile-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-mobile-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-mobile-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 769px),print{.bal-checkbox--column-tablet-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-tablet-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-tablet-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}@media screen and (min-width: 1024px){.bal-checkbox--column-2{-ms-flex:0 0 calc(50% - var(--bal-space-normal)*1/2);flex:0 0 calc(50% - var(--bal-space-normal)*1/2)}.bal-checkbox--column-3{-ms-flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3);flex:0 0 calc(33.3333333333% - var(--bal-space-normal)*2/3)}.bal-checkbox--column-4{-ms-flex:0 0 calc(25% - var(--bal-space-normal)*3/4);flex:0 0 calc(25% - var(--bal-space-normal)*3/4)}}";var Checkbox=function(){function e(e){var o=this;registerInstance(this,e);this.balFocus=createEvent(this,"balFocus");this.balBlur=createEvent(this,"balBlur");this.balChange=createEvent(this,"balChange");this.inputId="bal-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.keyboardMode=true;this.hasLabel=true;this.focused=false;this.ariaForm=defaultBalAriaForm;this.wasFocused=false;this.outerElementState={hovered:false,pressed:false};this.innerElementState={hovered:false,pressed:false};this.mergedElementState={hovered:false,pressed:false};this.name=this.inputId;this.label="";this.labelHidden=false;this.flat=false;this.interface="checkbox";this.value="on";this.checked=false;this.initialValue=false;this.disabled=false;this.readonly=false;this.required=false;this.autoInvalidOff=false;this.nonSubmit=false;this.invalid=false;this.hovered=false;this.pressed=false;this.colSize=1;this.colSizeTablet=1;this.colSizeMobile=1;this.setChecked=function(e){o.checked=e;o.balChange.emit(o.checked)};this.toggleChecked=function(e){e.preventDefault();o.setFocus();o.setChecked(!o.checked)};this.onClick=function(e){if(o.disabled){return}var r=e.target;if(r&&r.href){return}if(o.wasFocused){o.focused=true}o.toggleChecked(e)};this.onFocus=function(e){if(o.disabled||o.readonly){o.focused=false;return stopEventBubbling(e)}o.balFocus.emit(e);if(o.keyboardMode){o.focused=true;o.wasFocused=true}};this.onBlur=function(e){if(o.disabled||o.readonly){return stopEventBubbling(e)}o.balBlur.emit(e);o.focused=false};this.onPointerDown=function(){return o.keyboardMode=false};this.onKeydown=function(e){if(!isSpaceKey(e)){o.wasFocused=false}o.keyboardMode=FOCUS_KEYS.includes(e.key)}}e.prototype.createLogger=function(e){this.log=e};e.prototype.hoveredChanged=function(){this.innerElementState={hovered:this.hovered,pressed:this.pressed};this.mergeElementState()};e.prototype.pressedChanged=function(){this.innerElementState={hovered:this.hovered,pressed:this.pressed};this.mergeElementState()};e.prototype.connectedCallback=function(){var e=this;this.hoveredChanged();if(this.group){this.updateState();this.group.addEventListener("balChange",(function(){return e.updateState()}))}this.initialValue=this.checked;this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};e.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};e.prototype.componentWillRender=function(){var e=this;this.interactionChildElements.forEach((function(o){o.disabled=e.disabled||e.readonly;o.invalid=e.invalid;o.checked=e.checked}))};e.prototype.disconnectedCallback=function(){var e=this;if(this.group){this.group.removeEventListener("balChange",(function(){return e.updateState()}))}this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};e.prototype.listenOnClick=function(e){if((this.disabled||this.readonly)&&e.target&&(e.target===this.el||isDescendant(this.el,e.target))){stopEventBubbling(e)}};e.prototype.resetHandler=function(e){var o=e.target;if(o===null||o===void 0?void 0:o.contains(this.el)){this.checked=this.initialValue}};e.prototype.elementStateListener=function(e){this.outerElementState=e;this.mergeElementState()};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){inputSetFocus(this);return[2]}))}))};e.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){inputSetBlur(this);return[2]}))}))};e.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};e.prototype.getOption=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.option]}))}))};e.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){if(this.group&&this.group.control&&Array.isArray(this.group.value)){e=this.group.value.includes(this.value);if(e!==this.checked){this.checked=e}}return[2]}))}))};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.ariaForm=Object.assign({},e);return[2]}))}))};Object.defineProperty(e.prototype,"group",{get:function(){return this.el.closest("bal-checkbox-group")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"interactionChildElements",{get:function(){return Array.from(this.el.querySelectorAll("bal-check, bal-switch, bal-icon"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"option",{get:function(){return{name:this.name,value:this.value,checked:this.checked,label:this.label,labelHidden:this.labelHidden,flat:this.flat,interface:this.interface,disabled:this.disabled,readonly:this.readonly,required:this.required,nonSubmit:this.nonSubmit,invalid:this.invalid}},enumerable:false,configurable:true});e.prototype.mergeElementState=function(){var e=this;this.mergedElementState={hovered:this.outerElementState.hovered||this.innerElementState.hovered,pressed:this.outerElementState.pressed||this.innerElementState.pressed};this.interactionChildElements.forEach((function(o){o.hovered=e.mergedElementState.hovered;o.pressed=e.mergedElementState.pressed}))};e.prototype.render=function(){var e=this;var o=BEM.block("checkbox");var r=o.element("input");var a=o.element("label");var t=a.element("text");var i=a.element("icon");var c=this.focused&&this.buttonTabindex!==-1;var l=this.inheritedAttributes;if(this.buttonTabindex!==undefined){l.tabIndex=this.buttonTabindex}var n=!this.nonSubmit;var b=this.ariaForm.controlId||this.inputId;var d=this.ariaForm.labelId||null;var s=n?"label":"span";return h(Host,{key:"e6718d0f01496940fbc03686159599af02e63be2","aria-checked":"".concat(this.checked),"aria-disabled":ariaBooleanToString(this.disabled),"aria-invalid":this.invalid===true?"true":"false","aria-hidden":ariaBooleanToString(this.disabled||this.nonSubmit),"aria-focused":c?"true":null,"aria-labelledby":d,"aria-describedby":this.ariaForm.messageId,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"bal-focused":c},o.class()),o.modifier("checkbox").class()),o.modifier("button").class(this.interface==="button")),o.modifier("switch").class(this.interface==="switch")),o.modifier("tile").class(this.interface==="tile")),o.modifier("tile-color-".concat(this.color)).class(this.interface==="tile"&&!!this.color)),o.modifier("focused").class(this.focused)),o.modifier("invalid").class(this.invalid)),o.modifier("checked").class(this.checked)),o.modifier("flat").class(this.flat)),o.modifier("disabled").class(this.disabled||this.readonly)),o.modifier("hovered").class(this.mergedElementState.hovered)),o.modifier("pressed").class(this.mergedElementState.pressed)),o.modifier("column-".concat(this.colSize)).class(this.interface==="tile"&&this.colSize>1)),o.modifier("column-tablet-".concat(this.colSizeTablet)).class(this.interface==="tile"&&this.colSizeTablet>1)),o.modifier("column-mobile-".concat(this.colSizeMobile)).class(this.interface==="tile"&&this.colSizeMobile>1)),onClick:this.onClick},h(s,{key:"3bd8c2c8217d5e958009aeb3465bd7c8446c6960",class:Object.assign({},a.class()),"data-testid":"bal-checkbox-label"},n?h("input",Object.assign({id:b,type:"checkbox","data-testid":"bal-checkbox-input",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,class:Object.assign({},r.class()),"aria-hidden":ariaBooleanToString(this.nonSubmit),"aria-invalid":this.invalid===true?"true":"false","aria-describedby":this.ariaForm.messageId,onChange:function(o){return e.toggleChecked(o)},onFocus:function(o){return e.onFocus(o)},onBlur:function(o){return e.onBlur(o)},ref:function(o){return e.nativeInput=o}},l)):"",this.interface!=="tile"?h("div",{class:Object.assign({},i.class())},this.interface==="switch"?h("bal-switch",{checked:this.checked,disabled:this.disabled||this.readonly,invalid:this.invalid,hovered:this.mergedElementState.hovered,pressed:this.mergedElementState.pressed}):h("bal-check",{checked:this.checked,disabled:this.disabled||this.readonly,invalid:this.invalid,inverted:this.interface==="button"&&this.checked,hovered:this.mergedElementState.hovered,pressed:this.mergedElementState.pressed})):"",h("div",{key:"c1d1b270f076b748681da1d4fdb36380e8bfaf45",class:Object.assign(Object.assign({},t.class()),t.modifier("hidden").class(this.labelHidden))},h("slot",{key:"123d7f262307eda399023cdc4ecbe6c83d352336"}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{hovered:["hoveredChanged"],pressed:["pressedChanged"]}},enumerable:false,configurable:true});return e}();__decorate([Logger("bal-checkbox"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Checkbox.prototype,"createLogger",null);__decorate([ListenToElementStates(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Checkbox.prototype,"elementStateListener",null);var checkboxIds=0;Checkbox.style=balCheckboxCss;var balCheckboxGroupCss=".bal-checkbox-group{display:inline-block;position:relative;width:100%}.bal-checkbox-group__inner{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:stretch;align-items:stretch;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-normal)}.bal-checkbox-group__inner--button{-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex:1;flex:1;gap:var(--bal-space-x-small)}@media screen and (min-width: 769px),print{.bal-checkbox-group__inner--button{-ms-flex-direction:row;flex-direction:row}}.bal-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-checkbox-group__inner--expanded .bal-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-checkbox-group__inner--expanded .bal-checkbox{width:100%}}.bal-checkbox-group__inner--button.bal-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-checkbox-group__inner--vertical{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}@media screen and (min-width: 769px),print{.bal-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}";var CheckboxGroup=function(){function e(e){var o=this;registerInstance(this,e);this.balChange=createEvent(this,"balChange");this.balFocus=createEvent(this,"balFocus");this.balBlur=createEvent(this,"balBlur");this.inputId="bal-cg-".concat(checkboxGroupIds++);this.inheritedAttributes={};this.ariaForm=defaultBalAriaForm;this.interface=undefined;this.control=false;this.name=this.inputId;this.vertical=false;this.verticalOnMobile=false;this.expanded=false;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.value=[];this.columns=1;this.columnsTablet=1;this.columnsMobile=1;this.autoInvalidOff=false;this.hasFocus=false;this.mutationObserverActive=true;this.onClick=function(e){if(!o.control){return}var r=e.target;if(r.href){return}var a=e.target&&e.target.closest("bal-checkbox");if(a){if(a.disabled||a.readonly){return e.stopPropagation()}}o.updateValues()};this.onOptionChange=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){this.sync();return[2]}))}))}}e.prototype.createLogger=function(e){this.log=e};e.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.control){this.onOptionChange();this.mutationObserverActive=this.options===undefined}return[2]}))}))};e.prototype.invalidChanged=function(e){if(this.control){if(e!==undefined){this.getCheckboxes().forEach((function(o){o.invalid=e}))}}};e.prototype.disabledChanged=function(e){if(this.control){if(e!==undefined){this.getCheckboxes().forEach((function(o){o.disabled=e}))}}};e.prototype.readonlyChanged=function(e){if(this.control){if(e!==undefined){this.getCheckboxes().forEach((function(o){o.readonly=e}))}}};e.prototype.valueChanged=function(e,o){if(this.control){if(!areArraysEqual(this.value,o)){this.onOptionChange()}}else{this.onOptionChange()}};e.prototype.columnsChanged=function(e){this.getCheckboxes().forEach((function(o){return o.colSize=e}))};e.prototype.columnsTabletChanged=function(e){this.getCheckboxes().forEach((function(o){return o.colSizeTablet=e}))};e.prototype.columnsMobileChanged=function(e){this.getCheckboxes().forEach((function(o){return o.colSizeMobile=e}))};e.prototype.connectedCallback=function(){if(this.control){this.mutationObserverActive=this.options===undefined;this.valueChanged(this.value,[])}};e.prototype.componentWillLoad=function(){if(this.control){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.disabledChanged(this.disabled);this.invalidChanged(this.invalid);this.readonlyChanged(this.readonly)}this.columnsChanged(this.columns);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};e.prototype.focusInListener=function(e){this.balFocus.emit(e)};e.prototype.focusOutListener=function(e){this.balBlur.emit(e)};e.prototype.mutationListener=function(){if(this.control){this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly)}this.columnsChanged(this.columns);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};e.prototype.listenOnCheckboxChange=function(e){if(this.control){if(isDescendant(this.el,e.target)){stopEventBubbling(e);this.updateValues()}}};e.prototype.resetHandler=function(e){var o=e.target;if(o===null||o===void 0?void 0:o.contains(this.el)){if(this.control){this.value=[]}this.onOptionChange()}};e.prototype.checkboxFocusListener=function(e){var o=e.target;if(o&&isDescendant(this.el,o)&&hasTagName(o,"bal-checkbox")){stopEventBubbling(e)}};e.prototype.checkboxBlurListener=function(e){var o=e.target;if(o&&isDescendant(this.el,o)&&hasTagName(o,"bal-checkbox")){stopEventBubbling(e)}};e.prototype.setValue=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(this.control){this.value=e}return[2]}))}))};e.prototype.getOptionByValue=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(r){o=this.options;if(o){return[2,o.find((function(o){return o.value===e}))]}return[2,undefined]}))}))};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.ariaForm=Object.assign({},e);return[2]}))}))};e.prototype.sync=function(){var e=this;if(this.control){var o=function(o){for(var r=0;r<e.value.length;r++){var a=e.value[r];if(a!==undefined&&a.toString()===o.value.toString()){return true}}return false};this.getCheckboxes().forEach((function(e){e.checked=o(e)}))}this.getCheckboxes().forEach((function(o){if(e.interface){o.interface=e.interface}}))};e.prototype.getCheckboxes=function(){return Array.from(this.el.querySelectorAll("bal-checkbox"))};e.prototype.updateValues=function(){var e=[];this.getCheckboxes().forEach((function(o){if(o.checked){e.push(o.value)}}));if(!areArraysEqual(this.value,e)){this.value=__spreadArray([],e,true);this.balChange.emit(this.value)}};e.prototype.render=function(){var e=BEM.block("checkbox-group");var o=e.element("inner");var r=this.options||[];var a=r.map((function(e){if(typeof e.html==="function"){return Object.assign(Object.assign({},e),{html:e.html()})}return e}));return h(Host,Object.assign({class:Object.assign({},e.class()),role:"group","aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-disabled":ariaBooleanToString(this.disabled),"aria-invalid":ariaBooleanToString(this.invalid),onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("vertical-mobile").class(this.verticalOnMobile)),o.modifier("vertical").class(this.vertical)),o.modifier("expanded").class(this.expanded)),o.modifier("button").class(this.interface==="button"))},h("slot",null),a.map((function(e){return h("bal-checkbox",{key:e.value,name:e.name,value:e.value,labelHidden:e.labelHidden,flat:e.flat,interface:e.interface,disabled:e.disabled,readonly:e.readonly,required:e.required,nonSubmit:!!e.nonSubmit,invalid:e.invalid,innerHTML:e.html})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{options:["optionChanged"],invalid:["invalidChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"],value:["valueChanged"],columns:["columnsChanged"],columnsTablet:["columnsTabletChanged"],columnsMobile:["columnsMobileChanged"]}},enumerable:false,configurable:true});return e}();__decorate([Logger("bal-checkbox-group"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"createLogger",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"focusOutListener",null);__decorate([ListenToMutation({tags:["bal-checkbox-group","bal-checkbox"],attributes:false,characterData:false}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"mutationListener",null);var checkboxGroupIds=0;CheckboxGroup.style=balCheckboxGroupCss;var DropdownAutoFillUtil=function(){function e(){var e=this;this.handleAutoFill=function(o){return __awaiter(e,void 0,void 0,(function(){var e,r;return __generator(this,(function(a){switch(a.label){case 0:stopEventBubbling(o);if(!this.isAutoFillAllowed())return[3,2];this.component.isAutoFilled=true;e=this.component.nativeEl.value;return[4,this.parseAutoFillValueWithOptions(e)];case 1:r=a.sent();if(r===undefined){this.component.isAutoFilled=false;return[2]}if(!areArraysEqual(r,this.component.rawValue)){this.component.valueUtil.updateRawValueBySelection(r,true)}a.label=2;case 2:return[2]}}))}))}}e.prototype.connectedCallback=function(e){this.component=e};e.prototype.isAutoFillAllowed=function(){return!this.component.multiple};e.prototype.parseAutoFillValueWithOptions=function(e){return __awaiter(this,void 0,void 0,(function(){var o,r,a,t;return __generator(this,(function(i){switch(i.label){case 0:return[4,this.component.listEl.getOptions()];case 1:o=i.sent();r=undefined;for(a=0;a<o.length;a++){t=o[a];if(t.value===e||t.label===e){return[2,[t.value]]}}return[2,r]}}))}))};return e}();var i18nBalDropdown={de:{clearable:"Löschen",open:"Öffnen",close:"Schließen"},en:{clearable:"clear",open:"Open",close:"Close"},fr:{clearable:"Effacer",open:"Ouvrir",close:"Fermer"},it:{clearable:"Cancellare",open:"Apri",close:"Chiudi"},nl:{clearable:"Wissen",open:"Open",close:"Sluiten"},es:{clearable:"Limpiar",open:"Abrir",close:"Cerrar"},pl:{clearable:"Wyczyść",open:"Otwórz",close:"Zamknij"},pt:{clearable:"Limpar",open:"Abrir",close:"Fechar"},sv:{clearable:"Rensa",open:"Öppna",close:"Stäng"},fi:{clearable:"Tyhjennä",open:"Avaa",close:"Sulje"}};var DropdownEventsUtil=function(){function e(){var e=this;this.handlePointerDown=function(){e.component.isKeyboardMode=false};this.handleKeydown=function(o){e.component.isKeyboardMode=FOCUS_KEYS.includes(o.key)}}e.prototype.connectedCallback=function(e){this.component=e};e.prototype.handleFocus=function(e){this.component.hasFocus=true;this.component.balFocus.emit(e)};e.prototype.handleBlur=function(e){var o=this;if(!this.component.isExpanded){this.component.hasFocus=false;rIC((function(){return o.component.balBlur.emit(e)}))}};e.prototype.handleClick=function(e){if(!this.component.valueUtil.isDisabled()){if(this.component.chips){var o=e.target;var r=o.closest("bal-close");if(r){return}}if(this.component.clearable){var o=e.target;var a=o.closest(".bal-dropdown__clear");if(a){this.component.valueUtil.updateRawValueBySelection([]);return}}this.component.popupUtil.toggleList()}};e.prototype.handleOutsideClick=function(e){var o=this;var r;if(this.component.isExpanded){if(!this.component.el.contains(e.target)){this.component.isExpanded=false;(r=this.component.listEl)===null||r===void 0?void 0:r.resetFocus();this.component.hasFocus=false;rIC((function(){return o.component.balBlur.emit(e)}))}}};return e}();var DropdownFocusUtil=function(){function e(){}e.prototype.connectedCallback=function(e){this.component=e};e.prototype.focusOptionByLabel=function(e,o){var r=this;if(o===void 0){o={}}this.component.labelToFocus=(this.component.labelToFocus+e).trim();if(this.component.labelToFocus.length>0){clearTimeout(this.keyHitTimeout);this.keyHitTimeout=setTimeout((function(){var e;(e=r.component.listEl)===null||e===void 0?void 0:e.focusByLabel(r.component.labelToFocus,o)}),100);clearTimeout(this.timeout);this.timeout=setTimeout((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){this.component.labelToFocus="";return[2]}))}))}),1e3)}};return e}();var DropdownFormSubmitUtil=function(){function e(){}e.prototype.connectedCallback=function(e){this.component=e;this.component.initialValue=this.component.value};e.prototype.componentDidRender=function(){var e=this;if(this.component.selectEl){var o=this.component.selectEl.querySelectorAll("option");o.forEach((function(o){if(e.component.rawValue.includes(o.value)){o.selected=true}}))}};e.prototype.handle=function(e){var o=this;var r=e.target;if(r===null||r===void 0?void 0:r.contains(this.component.el)){if(this.resetHandlerTimer){clearTimeout(this.resetHandlerTimer)}this.resetHandlerTimer=setTimeout((function(){var e=o.component.valueUtil.parseValueString(o.component.initialValue);o.component.valueUtil.updateRawValueBySelection(e)}),0)}};return e}();var DropdownNativeSelect=function(e){var o=e.name,r=e.httpFormSubmit,a=e.multiple,t=e.required,i=e.disabled,c=e.rawValue,l=e.refSelectEl;var n=BEM.block("dropdown");return r?h("select",{class:Object.assign({},n.element("root").element("select").class()),"aria-hidden":"true",name:o,multiple:a,required:t,disabled:i,tabindex:-1,ref:l},c.map((function(e){return h("option",{key:e,value:e,selected:true},e)}))):""};var DropdownIcon=function(e){var o=e.size,r=e.theme,a=e.icon,t=e.language,i=e.loading,c=e.clearable,l=e.invalid,n=e.filled,b=e.expanded,d=e.disabled;var s=BEM.block("dropdown");if(i){return h("bal-spinner",{class:Object.assign({},s.element("rear").class()),small:true,variation:"circle",color:"white"})}else if(c&&n&&!d){return h("button",{title:i18nBalDropdown[t].clearable,type:"button",tabIndex:-1,class:Object.assign(Object.assign(Object.assign(Object.assign({},s.element("rear").class()),s.element("clear").class()),s.element("clear").modifier("invalid").class(l)),s.element("clear").modifier("theme-purple").class(r==="purple"))},h("bal-icon",{class:Object.assign({},s.element("rear").class()),name:r==="purple"?"close":"close-circle",size:o,color:r==="purple"?"primary":"grey"}))}else{return h("bal-icon",{class:Object.assign({},s.element("rear").class()),name:a,size:o,turn:b,color:d?"grey":l?"danger":"primary"})}};var DropdownInput=function(e){var o=e.inputId,r=e.httpFormSubmit,a=e.ariaForm,t=e.rawValue,i=e.autocomplete,c=e.required,l=e.disabled,n=e.readonly,b=e.placeholder,d=e.expanded,s=e.invalid,u=e.language,v=e.inputLabel,p=e.inheritedAttributes,k=e.refInputEl,f=e.onChange,_=e.onFocus,x=e.onBlur,g=e.onKeyDown;var w=BEM.block("dropdown");var m=function(){return h("input",Object.assign({id:a.controlId||"".concat(o,"-ctrl"),class:Object.assign({},w.element("root").element("input").class()),type:"text",size:1,inputmode:"none",tabindex:"0",autoComplete:i,value:t.join(","),required:c,disabled:l,readonly:n,placeholder:b,title:d?i18nBalDropdown[u].close:i18nBalDropdown[u].open,"aria-label":d?i18nBalDropdown[u].close:i18nBalDropdown[u].open,"aria-owns":"".concat(o,"-menu"),"aria-invalid":ariaBooleanToString(s),"aria-disabled":ariaBooleanToString(l||n),"aria-labelledby":a.labelId,"aria-describedby":a.messageId,"aria-haspopup":"listbox","data-native":true,"data-label":v,"data-value":t.join(","),ref:function(e){return k(e)},onChange:function(e){return f(e)},onFocus:function(e){return _(e)},onBlur:function(e){return x(e)},onKeyDown:function(e){return g(e)}},p))};if(r){return h(m,null)}return h("form",{novalidate:true},h(m,null))};var DropdownPopupUtil=function(){function e(){this.updatePanelPosition=function(e,o,r){return function(){e.computePosition(o,r,{placement:"bottom-start",middleware:[e.flip(),e.shift()]}).then((function(e){var o=e.x,a=e.y;Object.assign(r.style,{left:"".concat(o,"px"),top:"".concat(a,"px")})}))}}}e.prototype.connectedCallback=function(e){this.component=e};e.prototype.toggleList=function(){if(!this.component.valueUtil.isDisabled()){if(this.component.isExpanded){this.collapseList()}else{this.expandList()}}};e.prototype.expandList=function(){return __awaiter(this,void 0,void 0,(function(){var e,o;return __generator(this,(function(r){switch(r.label){case 0:if(!this.component.panelEl)return[3,2];return[4,balFloatingUi.load()];case 1:o=r.sent();this.component.panelCleanup=o.autoUpdate(this.component.el,this.component.panelEl,this.updatePanelPosition(o,this.component.el,this.component.panelEl));r.label=2;case 2:this.component.isExpanded=true;return[4,(e=this.component.listEl)===null||e===void 0?void 0:e.focusSelected()];case 3:r.sent();return[2]}}))}))};e.prototype.collapseList=function(){var e;this.component.isExpanded=false;(e=this.component.listEl)===null||e===void 0?void 0:e.resetFocus();if(this.component.panelCleanup){this.component.panelCleanup()}};return e}();var DropdownValueUtil=function(){function e(){}e.prototype.connectedCallback=function(e){this.component=e};e.prototype.componentDidLoad=function(){var e=this;setTimeout((function(){return e.valueChanged(e.component.value,undefined)}),0)};e.prototype.isDisabled=function(){return this.component.disabled||this.component.readonly};e.prototype.isFilled=function(){return this.component.rawValue&&this.component.rawValue.length>0};e.prototype.valueChanged=function(e,o){var r=typeof e;var a=typeof o;if(r!==a){this.updateRawValueByValueProp(e)}if(r==="string"&&e!==o){this.updateRawValueByValueProp(e)}if(Array.isArray(e)&&Array.isArray(o)&&!areArraysEqual(e,o)){this.updateRawValueByValueProp(e)}};e.prototype.updateRawValueBySelection=function(e,o){if(e===void 0){e=[]}if(o===void 0){o=false}this.component.isAutoFilled=o;this.updateRawValue(e);if(this.component.multiple){this.component.balChange.emit(this.component.rawValue)}else{this.component.balChange.emit(this.component.rawValue[0])}};e.prototype.parseValueString=function(e){if(e===void 0){e=[]}var o=[];if(!isNil(e)&&e!==""){if(Array.isArray(e)){o=__spreadArray([],e.filter((function(e){return!isNil(e)})),true)}else{if(e.split("").includes(",")){o=__spreadArray([],e.split(",").filter((function(e){return e})).map((function(e){return e.trim()})),true)}else{o=[e]}}}return o};e.prototype.updateRawValueByValueProp=function(e){if(e===void 0){e=[]}var o=this.parseValueString(e);this.updateRawValue(o)};e.prototype.updateRawValue=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=[]}return __generator(this,(function(o){switch(o.label){case 0:this.component.rawValue=e;if(!this.component.listEl)return[3,2];return[4,this.component.listEl.updateSelected(this.component.rawValue)];case 1:o.sent();o.label=2;case 2:return[4,this.updateInputContent()];case 3:o.sent();return[2]}}))}))};e.prototype.removeOption=function(e){var o=this.component.rawValue.filter((function(o){return o!==e.value}));this.updateRawValueBySelection(o)};e.prototype.updateInputContent=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:return[4,waitAfterFramePaint()];case 1:o.sent();if(!this.component.listEl)return[3,3];e=this.component;return[4,this.component.listEl.getSelectedOptions(this.component.rawValue)];case 2:e.choices=o.sent();this.component.inputLabel=this.component.choices.map((function(e){return e.label.trim()})).sort().join(",");o.label=3;case 3:return[2]}}))}))};return e}();var DropdownValue=function(e){var o=e.inlineLabel,r=e.filled,a=e.chips,t=e.placeholder,i=e.choices,c=e.renderChip;var l=BEM.block("dropdown");if(r){if(a){return h("div",{class:Object.assign({},l.element("root").element("content").element("chips").class())},i.map((function(e){return c(e)})))}else{return(o&&"".concat(o,": "))+i.map((function(e){return e.label})).join(", ")}}else{return t}};var balDropdownCss=':root{--bal-dropdown-control-background:var(--bal-color-white);--bal-dropdown-control-background-hover:var(--bal-form-field-control-background-hover);--bal-dropdown-control-background-invalid:var(--bal-form-field-control-danger-background);--bal-dropdown-control-background-disabled:var(--bal-form-field-control-disabled-background);--bal-dropdown-control-input-background:var(--bal-color-grey-1);--bal-dropdown-control-native-input-background:transparent;--bal-dropdown-control-native-input-background-hover:transparent;--bal-dropdown-control-input-inverted-footer-background:transparent;--bal-dropdown-control-input-inverted-footer-background-hover:transparent;--bal-dropdown-control-input-multiple-background:transparent;--bal-dropdown-control-input-multiple-background-read-only-selection:transparent;--bal-dropdown-control-input-option-background:transparent;--bal-dropdown-control-input-option-background-selected:var(--bal-color-primary-1);--bal-dropdown-control-input-option-background-focused:var(--bal-color-grey-3);--bal-dropdown-control-input-option-background-hover:var(--bal-color-grey-3);--bal-dropdown-control-border-radius:var(--bal-form-field-control-radius);--bal-dropdown-popover-border-color:var(--bal-color-grey-2);--bal-dropdown-control-border-color:var(--bal-form-field-control-border-color);--bal-dropdown-control-border-color-focused:var(--bal-color-primary);--bal-dropdown-control-border-color-hover:var(--bal-form-field-control-border-color-hover);--bal-dropdown-control-border-color-invalid:var(--bal-form-field-control-danger-border-color);--bal-dropdown-control-border-color-disabled:var(--bal-form-field-control-disabled-border-color);--bal-dropdown-control-border-color-focus-within:var(--bal-color-primary);--bal-dropdown-option-border-top-color:var(--bal-color-grey-2);--bal-dropdown-popover-empty-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color:var(--bal-form-field-control-color);--bal-dropdown-control-text-color-focused:var(--bal-color-primary);--bal-dropdown-input-text-color-disabled:var(--bal-form-field-label-disabled-color);--bal-dropdown-control-inverted-footer-native-input-text-color:var(--bal-color-text-white);--bal-dropdown-option-content-label-text-color:var(--bal-form-field-control-color)}.bal-dropdown{display:block;position:relative;-ms-flex:1;flex:1;width:100%}.bal-dropdown__root{border-width:.125rem;border-style:solid;border-color:var(--bal-dropdown-control-border-color);border-radius:var(--bal-dropdown-control-border-radius);background:var(--bal-dropdown-control-background);font-weight:var(--bal-font-weight-regular);font-size:var(--bal-text-size-normal);font-family:var(--bal-font-family-text);color:var(--bal-dropdown-control-text-color);outline:none;-webkit-box-shadow:var(--bal-shadow-none);box-shadow:var(--bal-shadow-none);padding-right:1rem;height:auto;min-height:3rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:-ms-flexbox;display:flex;width:100%;text-align:left;gap:1rem;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.bal-dropdown__root--autofill{background:#faffbd !important;background:light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4)) !important}.bal-dropdown__root>span{-ms-flex:1;flex:1;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bal-dropdown__root--focused{border-color:var(--bal-dropdown-control-border-color-focused)}.bal-dropdown__root--invalid{border-color:var(--bal-dropdown-control-border-color-invalid);background:var(--bal-dropdown-control-background-invalid)}.bal-dropdown__root--disabled{border-color:var(--bal-dropdown-control-border-color-disabled);background:var(--bal-dropdown-control-background-disabled)}.bal-dropdown__root__content--placeholder{color:var(--bal-form-field-control-placeholder-color)}.bal-dropdown__root__content--disabled{color:var(--bal-dropdown-input-text-color-disabled)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root:not(.bal-dropdown__root--disabled):not(.bal-dropdown__root--invalid):not(.bal-dropdown__root--theme-purple):not(.bal-dropdown__root--theme-purple-expanded):hover{background:var(--bal-dropdown-control-background-hover)}}.bal-dropdown__root__content__chips{--bal-tag-size-small-font-size:var(--bal-text-size-normal);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--bal-space-xx-small);padding-top:var(--bal-space-x-small);padding-bottom:var(--bal-space-x-small)}.bal-dropdown__root__content__chips>bal-tag{z-index:1}.bal-dropdown__root__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:rgba(0,0,0,0);position:absolute;right:var(--bal-border-width-normal);left:var(--bal-border-width-normal);top:var(--bal-border-width-normal);bottom:var(--bal-border-width-normal);opacity:0;padding-left:calc(.75em - var(--bal-border-width-normal));padding-right:calc(.75em - var(--bal-border-width-normal));cursor:pointer}.bal-dropdown__root__input:disabled{cursor:default}.bal-dropdown__root__input:-webkit-autofill{opacity:1}.bal-dropdown__root__input:autofill{opacity:1}.bal-dropdown__root__input:-internal-autofill-selected{opacity:0}.bal-dropdown__root__select{position:absolute !important;left:0;top:0;margin:0;padding:0;opacity:0;outline:0;border:none;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);overflow:hidden}.bal-dropdown__root--autofill .bal-dropdown__root__input{opacity:0}.bal-dropdown__list{display:none;visibility:hidden;opacity:0;width:100vw;position:absolute;top:0;left:0;will-change:left,top,opacity;background:var(--bal-color-white);border-radius:var(--bal-radius-normal);-webkit-box-shadow:var(--bal-shadow-normal);box-shadow:var(--bal-shadow-normal);z-index:var(--bal-z-index-popup)}@media screen and (min-width: 769px),print{.bal-dropdown__list{max-width:100vw;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;min-width:100%}}.bal-dropdown__list--expanded{display:block;visibility:visible;opacity:1}.bal-dropdown__native{bottom:0;left:0;position:absolute;opacity:0;pointer-events:none;width:100%}.bal-dropdown__clear{background:rgba(0,0,0,0);border:none;padding:0;margin:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;cursor:pointer}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}.bal-dropdown__rear{z-index:1}.bal-dropdown__root--size-small{min-height:2rem}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content--placeholder{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-background-grey-light)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-1)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded){border:none;background:var(--bal-color-purple-2)}@media (hover: hover)and (pointer: fine){.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content{color:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle{fill:var(--bal-color-text-primary-pressed)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active{background:var(--bal-color-purple-3)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-filled:not(.bal-dropdown__root--theme-purple-expanded):not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled),.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active{border:none;background:var(--bal-color-purple-2)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-dropdown__root__content,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__input,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-dropdown__root__content{color:var(--bal-color-text-primary)}.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled) .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):hover .bal-icon__inner circle,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner svg,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner g,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner path,.bal-dropdown__root--theme-purple-expanded:not(.bal-dropdown__root--disabled):active .bal-icon__inner circle{fill:var(--bal-color-text-primary)}.bal-dropdown__root--focused.bal-dropdown__root--theme-purple:before{content:"";border-width:var(--bal-border-width-normal);border-style:solid;border-color:var(--bal-focus-shadow-end-color);position:absolute;background:rgba(0,0,0,0);border-radius:var(--bal-radius-normal);top:-0.25rem;bottom:-0.25rem;left:-0.25rem;right:-0.25rem}.bal-dropdown__root__content--size-small{font-size:var(--bal-text-size-small);font-weight:var(--bal-font-weight-bold)}.bal-dropdown__clear--theme-purple{height:2rem;width:2rem;border-top-right-radius:2px;border-bottom-right-radius:2px;margin-right:-10px}.bal-dropdown__clear--theme-purple::before{content:"";position:absolute;right:32px;background:var(--bal-color-white);width:2px;height:100%}';var Dropdown=function(){function e(e){var o=this;registerInstance(this,e);this.balChange=createEvent(this,"balChange");this.balFocus=createEvent(this,"balFocus");this.balBlur=createEvent(this,"balBlur");this.inputId="bal-dropdown-".concat(balDropdownIds++);this.inheritedAttributes={};this.initialValue=[];this.nativeOptions=[];this.rawOptions=[];this.choices=[];this.rawValue=[];this.hasFocus=false;this.isExpanded=false;this.isAutoFilled=false;this.isKeyboardMode=false;this.inputLabel="";this.ariaForm=defaultBalAriaForm;this.language=defaultConfig.language;this.region=defaultConfig.region;this.httpFormSubmit=defaultConfig.httpFormSubmit;this.labelToFocus="";this.valueUtil=new DropdownValueUtil;this.eventsUtil=new DropdownEventsUtil;this.popupUtil=new DropdownPopupUtil;this.optionUtil=new DropdownOptionUtil;this.formSubmitUtil=new DropdownFormSubmitUtil;this.focusUtil=new DropdownFocusUtil;this.autoFillUtil=new DropdownAutoFillUtil;this.autocomplete="off";this.name=this.inputId;this.placeholder="";this.inlineLabel="";this.icon="caret-down";this.size="";this.theme="";this.disabled=false;this.readonly=false;this.multiple=false;this.chips=false;this.clearable=false;this.invalid=false;this.required=false;this.loading=false;this.filter="includes";this.contentHeight=262;this.inverted=false;this.options=[];this.value=[];this.hasConnected=false;this.listenToOptionChange=function(e){o.optionUtil.listenToOptionChange(e)};this.listenOnClickOutside=function(e){o.eventsUtil.handleOutsideClick(e)};this.resetHandler=function(e){o.formSubmitUtil.handle(e)};this.handleAutoFill=function(e){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){this.log("(handleAutoFill)",e,this.nativeEl.value);this.autoFillUtil.handleAutoFill(e);return[2]}))}))};this.handleKeyDown=function(e){var r,a,t,i,c;if(e&&e.key){if(o.isExpanded){if(isArrowDownKey(e)){stopEventBubbling(e);(r=o.listEl)===null||r===void 0?void 0:r.focusNext()}else if(isArrowUpKey(e)){stopEventBubbling(e);(a=o.listEl)===null||a===void 0?void 0:a.focusPrevious()}else if(e.key==="Home"||e.key==="PageUp"){stopEventBubbling(e);(t=o.listEl)===null||t===void 0?void 0:t.focusFirst()}else if(e.key==="End"||e.key==="PageDown"){stopEventBubbling(e);(i=o.listEl)===null||i===void 0?void 0:i.focusLast()}else if(isEnterKey(e)){stopEventBubbling(e);(c=o.listEl)===null||c===void 0?void 0:c.selectByFocus()}else if(e.key==="Tab"||isEscapeKey(e)){o.popupUtil.collapseList()}else if(e.key.length===1){o.focusUtil.focusOptionByLabel(e.key)}}else{if(isEnterKey(e)||isSpaceKey(e)){stopEventBubbling(e);o.popupUtil.expandList()}else if(e.key.length===1){o.focusUtil.focusOptionByLabel(e.key,{select:true})}}}else{if(o.isExpanded){o.popupUtil.collapseList()}}}}e.prototype.createLogger=function(e){this.log=e};e.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.optionUtil.optionChanged();return[2]}))}))};e.prototype.valueChanged=function(e,o){this.valueUtil.valueChanged(e,o)};e.prototype.connectedCallback=function(){if(!this.hasConnected){this.eventsUtil.connectedCallback(this);this.valueUtil.connectedCallback(this);this.popupUtil.connectedCallback(this);this.optionUtil.connectedCallback(this);this.formSubmitUtil.connectedCallback(this);this.focusUtil.connectedCallback(this);this.autoFillUtil.connectedCallback(this)}addEventListener(this.el,"balOptionChange",this.listenToOptionChange);if(balBrowser.hasDocument){addEventListener(document,"keydown",this.eventsUtil.handleKeydown);addEventListener(document,"touchstart",this.eventsUtil.handlePointerDown);addEventListener(document,"mousedown",this.eventsUtil.handlePointerDown);addEventListener(document,"click",this.listenOnClickOutside);addEventListener(document,"reset",this.resetHandler,{capture:true})}this.hasConnected=true};e.prototype.disconnectedCallback=function(){removeEventListener(this.el,"balOptionChange",this.listenToOptionChange);if(balBrowser.hasDocument){removeEventListener(document,"keydown",this.eventsUtil.handleKeydown);removeEventListener(document,"touchstart",this.eventsUtil.handlePointerDown);removeEventListener(document,"mousedown",this.eventsUtil.handlePointerDown);removeEventListener(document,"click",this.listenOnClickOutside);removeEventListener(document,"reset",this.resetHandler,{capture:true})}};e.prototype.componentWillRender=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.inheritedAttributes=inheritAttributes(this.el,["tabindex","data-hj-allow"]);return[4,this.optionUtil.componentWillRender()];case 1:e.sent();return[2]}}))}))};e.prototype.componentDidRender=function(){this.formSubmitUtil.componentDidRender()};e.prototype.componentDidLoad=function(){this.valueUtil.componentDidLoad()};e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.language=e.language;this.region=e.region;this.httpFormSubmit=e.httpFormSubmit;return[2]}))}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!(this.nativeEl&&!this.valueUtil.isDisabled()))return[3,2];return[4,waitAfterIdleCallback()];case 1:e.sent();this.nativeEl.focus();e.label=2;case 2:return[2]}}))}))};e.prototype.getValue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.rawValue]}))}))};e.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.valueUtil.updateRawValueBySelection([]);return[2]}))}))};e.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!(!this.valueUtil.isDisabled()&&this.panelEl))return[3,2];return[4,this.popupUtil.expandList()];case 1:e.sent();e.label=2;case 2:return[2]}}))}))};e.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!(!this.valueUtil.isDisabled()&&this.panelEl))return[3,2];return[4,this.popupUtil.collapseList()];case 1:e.sent();e.label=2;case 2:return[2]}}))}))};e.prototype.select=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(r){o=this.valueUtil.parseValueString(e);this.valueUtil.updateRawValueBySelection(o);return[2]}))}))};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.ariaForm=Object.assign({},e);return[2]}))}))};e.prototype.render=function(){var e=this;var o=BEM.block("dropdown");var r=this.valueUtil.isFilled();var a=this.size!=="";var t="size-".concat(this.size);var i=this.theme!=="";var c="theme-".concat(this.theme);var l=this.theme==="purple"?this.hasFocus&&this.isKeyboardMode:this.hasFocus;return h(Host,{key:"3fe05ba6190dabe5fb8c297f4809659f7c24aa74",class:Object.assign({},o.class()),tabindex:"-1",id:"".concat(this.inputId)},h("div",{key:"e0b038aa5b7ead381d271c5b7b04fd5bbaa3ea3b",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o.element("root").class()),o.element("root").modifier("focused").class(l)),o.element("root").modifier("invalid").class(this.invalid)),o.element("root").modifier("disabled").class(this.valueUtil.isDisabled())),o.element("root").modifier("autofill").class(this.isAutoFilled)),o.element("root").modifier(t).class(a)),o.element("root").modifier(c).class(i)),o.element("root").modifier(c+"-filled").class(r&&i)),o.element("root").modifier(c+"-expanded").class(this.isExpanded&&i)),"data-testid":"bal-dropdown-trigger",onClick:function(o){return e.eventsUtil.handleClick(o)}},h("span",{key:"a3499a9e2abcaa3b363385c475c3dcd91ed1a371",class:Object.assign(Object.assign(Object.assign(Object.assign({},o.element("root").element("content").class()),o.element("root").element("content").modifier("disabled").class(this.valueUtil.isDisabled())),o.element("root").element("content").modifier("placeholder").class(!this.valueUtil.isFilled())),o.element("root").element("content").modifier(t).class(a))},h(DropdownValue,{key:"8ffc980c91386038c4ee9b9e6673a25a3609d674",filled:this.valueUtil.isFilled(),inlineLabel:this.inlineLabel,chips:this.chips,placeholder:this.placeholder,choices:this.choices,renderChip:function(o){return h("bal-tag",{key:o.value,"data-testid":"bal-dropdown-chip",size:"small",invalid:e.invalid,disabled:e.disabled||e.readonly,closable:!(e.disabled||e.readonly),onBalCloseClick:function(){return e.valueUtil.removeOption(o)}},o.label)}})),h(DropdownInput,{key:"9a97fc39a821d5dcca32eba522ae29e4aa6eedc0",inputId:this.inputId,httpFormSubmit:this.httpFormSubmit,ariaForm:this.ariaForm,rawValue:this.rawValue,autocomplete:this.autocomplete,required:this.required,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,expanded:this.isExpanded,invalid:this.invalid,language:this.language,inputLabel:this.inputLabel,inheritedAttributes:this.inheritedAttributes,refInputEl:function(o){return e.nativeEl=o},onChange:function(o){return e.handleAutoFill(o)},onFocus:function(o){return e.eventsUtil.handleFocus(o)},onBlur:function(o){return e.eventsUtil.handleBlur(o)},onKeyDown:function(o){return e.handleKeyDown(o)}}),h(DropdownNativeSelect,{key:"2a33a8ac7f336889197137fc741ed8a4a107fceb",name:this.name,httpFormSubmit:this.httpFormSubmit,multiple:this.multiple,required:this.required,disabled:this.valueUtil.isDisabled(),rawValue:this.rawValue,refSelectEl:function(o){return e.selectEl=o}}),h(DropdownIcon,{key:"d0f6958fb47ad7f6d73d4f98482cb2102c344f20",icon:this.icon,size:this.size,theme:this.theme,language:this.language,loading:this.loading,clearable:this.clearable,invalid:this.invalid,expanded:this.isExpanded,filled:r,disabled:this.valueUtil.isDisabled()})),h("div",{key:"29e98d1f54ffb6ee913bd682d6531d45997fc1d0",id:"".concat(this.inputId,"-menu"),class:Object.assign(Object.assign({},o.element("list").class()),o.element("list").modifier("expanded").class(this.isExpanded)),ref:function(o){return e.panelEl=o}},h("bal-option-list",{key:"4e6fa69f9d9859208f83dd7bc86c17fc75d5eb60",multiple:this.multiple,disabled:this.valueUtil.isDisabled(),filter:this.filter,required:this.required,contentHeight:this.contentHeight,ref:function(o){return e.listEl=o}},h("slot",{key:"1c169dc692632671f62410b2dadcbbc10b0fe36a"}),this.optionUtil.hasPropOptions()?this.rawOptions.map((function(e){return h("bal-option",{key:e.value,value:e.value,label:e.label,disabled:e.disabled,multiline:e.multiline,invalid:e.invalid,hidden:e.hidden,selected:e.selected,focused:e.focused},e.label)})):"")))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{options:["optionChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return e}();__decorate([Logger("bal-dropdown"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Dropdown.prototype,"createLogger",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Dropdown.prototype,"configChanged",null);var balDropdownIds=0;Dropdown.style=balDropdownCss;var balOptionCss=":root{--bal-option-padding-x:var(--bal-space-small);--bal-option-min-height:1.5rem;--bal-option-background:var(--bal-color-white);--bal-option-background-hovered:var(--bal-color-grey-3);--bal-option-background-selected:var(--bal-color-primary-1);--bal-option-background-selected-hovered:#dddfeb;--bal-option-background-invalid:var(--bal-color-danger-1);--bal-option-background-invalid-hovered:#fbe0de;--bal-option-border-width:var(--bal-border-width-normal);--bal-option-border-color:var(--bal-color-grey-2);--bal-option-font-family:var(--bal-font-family-text);--bal-option-font-weight:var(--bal-font-weight-regular);--bal-option-line-height:1.125rem;--bal-option-text-hovered:var(--bal-color-text-primary-hovered);--bal-option-text-pressed:var(--bal-color-text-primary-pressed);--bal-option-text-disabled:var(--bal-color-text-grey-light)}.bal-option{font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:block;list-style:none;cursor:pointer;border-bottom-width:var(--bal-option-border-width);border-bottom-color:var(--bal-option-border-color);border-bottom-style:solid;background:var(--bal-option-background);padding-left:var(--bal-option-padding-x);padding-right:var(--bal-option-padding-x);min-height:var(--bal-option-min-height)}.bal-option>bal-stack{min-height:var(--bal-option-min-height)}.bal-option:last-child{border-bottom:none}.bal-option::-moz-focus-inner{border:none}.bal-option--hidden{display:none;visibility:hidden}.bal-option__inner{font-family:var(--bal-option-font-family);font-weight:var(--bal-option-font-weight);line-height:var(--bal-option-line-height);word-break:break-word;white-space:normal;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-ms-flex:1;flex:1}.bal-option__inner--multiline{white-space:normal}.bal-option--focused{background:var(--bal-option-background-hovered)}@media (hover: hover)and (pointer: fine){.bal-option:hover{background:var(--bal-option-background-hovered);color:var(--bal-option-text-hovered)}}.bal-option:active{background:var(--bal-option-background-hovered);color:var(--bal-option-text-pressed)}.bal-option--selected{background:var(--bal-option-background-selected)}@media (hover: hover)and (pointer: fine){.bal-option--selected:hover{background:var(--bal-option-background-selected-hovered)}}.bal-option--selected:active{background:var(--bal-option-background-selected-hovered)}.bal-option--selected .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--selected.bal-option--focused{background:var(--bal-option-background-selected-hovered)}.bal-option--selected.bal-option--focused .bal-option__inner{font-weight:var(--bal-font-weight-bold)}.bal-option--invalid{background:var(--bal-option-background-invalid)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover{background:var(--bal-option-background-invalid-hovered)}}.bal-option--invalid:active{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid.bal-option--focused{background:var(--bal-option-background-invalid-hovered)}.bal-option--invalid .bal-option__inner{color:var(--bal-color-text-danger-hovered)}@media (hover: hover)and (pointer: fine){.bal-option--invalid:hover .bal-option__inner{color:var(--bal-color-text-danger-hovered)}}.bal-option--invalid:active .bal-option__inner{color:var(--bal-color-text-danger-pressed)}.bal-option--disabled,.bal-option--disabled.bal-option--focused{background:var(--bal-option-background) !important;color:var(--bal-option-text-disabled) !important;cursor:default !important}.bal-option--disabled:hover,.bal-option--disabled.bal-option--focused:hover{background:var(--bal-option-background) !important}.bal-option{--bal-check-size:1.25rem}";var Option=function(){function e(e){var o=this;registerInstance(this,e);this.balOptionChange=createEvent(this,"balOptionChange");this.balOptionFocus=createEvent(this,"balOptionFocus");this.inputId="bal-option-".concat(balOptionIds++);this.checkbox=false;this.interactionState=BalElementStateListener.DefaultState;this.label="";this.value="";this.disabled=false;this.multiline=false;this.invalid=false;this.selected=false;this.focused=false;this.hidden=false;this.onClick=function(e){var r=o.el.closest("bal-option-list");if(o.disabled||r&&r.disabled){stopEventBubbling(e)}else{if(r&&r.required&&!r.multiple){if(!o.selected){o.select(true)}}else{o.select(!o.selected)}}}}e.prototype.createLogger=function(e){this.log=e};e.prototype.componentWillRender=function(){if(this.el){var e=this.el.closest("bal-option-list");if(e){this.checkbox=!!e.multiple}}};e.prototype.listenToMouseEnter=function(){var e=this,o=e.label,r=e.value,a=e.selected,t=e.disabled,i=e.hidden;if(!i&&!t){this.balOptionFocus.emit({label:o,value:r,selected:a})}};e.prototype.elementStateListener=function(e){this.interactionChildElements.forEach((function(o){o.hovered=e.hovered;o.pressed=e.pressed}))};e.prototype.select=function(){return __awaiter(this,arguments,void 0,(function(e){var o,r,a;if(e===void 0){e=true}return __generator(this,(function(t){this.selected=e;o=this,r=o.label,a=o.value;this.balOptionChange.emit({label:r,value:a,selected:e});return[2]}))}))};Object.defineProperty(e.prototype,"interactionChildElements",{get:function(){return Array.from(this.el.querySelectorAll("bal-check"))},enumerable:false,configurable:true});e.prototype.render=function(){var e=BEM.block("option");return h(Host,{key:"dca805aa021ad35c2ea4153008a8a5ba4f37931c",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("checkbox").class(this.checkbox)),e.modifier("focused").class(this.focused)),e.modifier("invalid").class(this.invalid)),e.modifier("selected").class(this.selected)),e.modifier("disabled").class(this.disabled)),e.modifier("hidden").class(this.hidden)),role:"option",id:this.inputId,"data-value":this.value,"data-label":this.label,"aria-label":this.label,"aria-hidden":ariaBooleanToString(this.hidden),"aria-selected":ariaBooleanToString(this.selected),"aria-checked":ariaBooleanToString(this.selected),"aria-disabled":ariaBooleanToString(this.disabled),"aria-invalid":ariaBooleanToString(this.invalid),tabIndex:-1,onClick:this.onClick},h("bal-stack",{key:"cfcf978a82159a6e7ad2dcddccdb40dd6b9f74a4",py:"small",space:"x-small"},this.checkbox?h("bal-check",{checked:this.selected,disabled:this.disabled,invalid:this.invalid,hovered:this.interactionState.hovered,pressed:this.interactionState.pressed,tabindex:-1}):"",h("div",{key:"e92a9c019432d29f6153371daca316c8136c75e9",class:Object.assign(Object.assign({},e.element("inner").class()),e.element("inner").modifier("multiline").class(this.multiline))},h("slot",{key:"639a99194ed6e86787e9eb2b3adc993161d58a07"})),this.selected&&!this.checkbox?h("bal-icon",{name:"check",size:"small",color:this.disabled?"grey":this.invalid?"danger":"primary"}):""))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();__decorate([Logger("bal-option"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Option.prototype,"createLogger",null);__decorate([ListenToElementStates(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Option.prototype,"elementStateListener",null);var balOptionIds=0;Option.style=balOptionCss;var balOptionListCss=".bal-option-list{display:block;position:relative;width:100%;list-style:none;margin:0;outline:0;max-height:var(--bal-option-list-max-height);border-radius:var(--bal-radius-normal);overflow:hidden auto}";var OptionList=function(){function e(e){registerInstance(this,e);this.inputId="bal-option-list-".concat(balOptionListIds++);this.inheritAttributes={};this.ariaForm=defaultBalAriaForm;this.multiple=false;this.disabled=false;this.required=false;this.focusIndex=-1;this.filter="includes";this.contentHeight=262}e.prototype.createLogger=function(e){this.log=e};e.prototype.contentHeightChanged=function(e){if(e===undefined){this.el.style.removeProperty("--bal-option-list-max-height")}else{this.el.style.setProperty("--bal-option-list-max-height","".concat(e,"px"))}};e.prototype.componentDidLoad=function(){this.contentHeightChanged(this.contentHeight)};e.prototype.componentWillRender=function(){this.inheritAttributes=inheritAttributes(this.el,["aria-multiselectable","aria-labelledby"])};e.prototype.listenToMouseEnter=function(e){var o=this.options;var r=this.getOptionIndex(o,e.detail.value);if(r!==undefined){this.updateFocus(o,r)}};e.prototype.listenToOptionChange=function(e){var o=e.detail;if(!this.multiple){this.options.filter((function(e){return e.value!==o.value})).forEach((function(e){return e.selected=false}))}};e.prototype.focusSelected=function(){return __awaiter(this,void 0,void 0,(function(){var e,o;return __generator(this,(function(r){switch(r.label){case 0:e=this.options;o=this.getSelectedOptionIndex(e);if(!(o>0))return[3,2];this.updateFocus(e,o);return[4,waitAfterFramePaint()];case 1:r.sent();return[2,o];case 2:return[4,this.focusFirst()];case 3:return[2,r.sent()]}}))}))};e.prototype.focusFirst=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,r;return __generator(this,(function(a){switch(a.label){case 0:e=this.options;o=this.getFirstOptionIndex(e);this.updateFocus(e,o);r=e[o];this.updateScrollTopPosition(r);return[4,waitAfterFramePaint()];case 1:a.sent();return[2,o]}}))}))};e.prototype.focusLast=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,r;return __generator(this,(function(a){switch(a.label){case 0:e=this.options;o=this.getLastOptionIndex(e);this.updateFocus(e,o);r=e[o];this.updateScrollBottomPosition(r);return[4,waitAfterFramePaint()];case 1:a.sent();return[2,o]}}))}))};e.prototype.focusNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,r;return __generator(this,(function(a){switch(a.label){case 0:e=this.options;o=this.getNextOptionIndex(e);this.updateFocus(e,o);r=e[o];this.updateScrollBottomPosition(r);return[4,waitAfterFramePaint()];case 1:a.sent();return[2,o]}}))}))};e.prototype.focusPrevious=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,r;return __generator(this,(function(a){switch(a.label){case 0:e=this.options;o=this.getPreviousOptionIndex(e);this.updateFocus(e,o);r=e[o];this.updateScrollTopPosition(r);return[4,waitAfterFramePaint()];case 1:a.sent();return[2,o]}}))}))};e.prototype.focusByLabel=function(e,o){return __awaiter(this,void 0,void 0,(function(){var r,a,t;return __generator(this,(function(i){switch(i.label){case 0:r=this.options;a=this.getOptionIndexByLabel(r,e);this.updateFocus(r,a);t=r[a];this.updateScrollTopPosition(t);return[4,waitAfterFramePaint()];case 1:i.sent();if(!o.select)return[3,3];return[4,t.select()];case 2:i.sent();i.label=3;case 3:return[2,a]}}))}))};e.prototype.filterByContent=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(r){switch(r.label){case 0:o=this.allOptions;this.filterOptions(o,e);return[4,waitAfterFramePaint()];case 1:r.sent();return[2,this.focusFirst()]}}))}))};e.prototype.resetHidden=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=false}return __generator(this,(function(o){switch(o.label){case 0:this.options.forEach((function(o){return o.hidden=e}));return[4,waitAfterFramePaint()];case 1:o.sent();this.resetFocus();return[2]}}))}))};e.prototype.resetSelected=function(){return __awaiter(this,arguments,void 0,(function(e){if(e===void 0){e=false}return __generator(this,(function(o){switch(o.label){case 0:this.options.forEach((function(o){return o.selected=e}));return[4,waitAfterFramePaint()];case 1:o.sent();return[2]}}))}))};e.prototype.updateSelected=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:this.options.forEach((function(o){return o.selected=e.includes(o.value)}));return[4,waitAfterFramePaint()];case 1:o.sent();return[2]}}))}))};e.prototype.resetFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e,o;return __generator(this,(function(r){switch(r.label){case 0:e=this.options;o=-1;this.updateFocus(e,o);this.scrollTo(0);return[4,waitAfterFramePaint()];case 1:r.sent();return[2,o]}}))}))};e.prototype.getSelectedValues=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=this.options;return[2,e.filter((function(e){return e.selected})).map((function(e){return e.value}))]}))}))};e.prototype.getSelectedOptions=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(r){o=this.options;if(e&&e.length>0){return[2,o.filter((function(o){return e.includes(o.value)})).map((function(e){return e}))]}return[2,o.filter((function(e){return e.selected})).map((function(e){return e}))]}))}))};e.prototype.getValues=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.options.map((function(e){return e.value}))]}))}))};e.prototype.getLabels=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.options.map((function(e){return e.label}))]}))}))};e.prototype.getOptions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.options.filter((function(e){return!e.disabled||!e.hidden}))]}))}))};e.prototype.selectByFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e,o;return __generator(this,(function(r){e=this.options;o=e[this.focusIndex];if(o){if(this.multiple){o.select(!o.selected)}else{o.select(true)}}return[2]}))}))};e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.ariaForm=Object.assign({},e);return[2]}))}))};Object.defineProperty(e.prototype,"options",{get:function(){return Array.from(this.el.querySelectorAll("bal-option")).filter((function(e){return!e.hidden}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptions",{get:function(){return Array.from(this.el.querySelectorAll("bal-option"))},enumerable:false,configurable:true});e.prototype.filterOptions=function(e,o){var r=[];var a=this.filter==="includes"?includes:startsWith;for(var t=0;t<e.length;t++){var i=e[t];var c=i.textContent||"";if(a(c,o)){r.push(i);i.hidden=false}else{i.hidden=true}}return r};e.prototype.isOptionVisible=function(e){var o=this.el.clientHeight;var r=this.el.scrollTop;var a=r+o;var t=r<=e.offsetTop&&e.offsetTop+e.clientHeight<=a;return t};e.prototype.updateScrollTopPosition=function(e){if(e){var o=this.isOptionVisible(e);if(!o){this.scrollTo(this.getScrollTopForTopPosition(e))}}};e.prototype.updateScrollBottomPosition=function(e){if(e){var o=this.isOptionVisible(e);if(!o){this.scrollTo(this.getScrollTopForBottomPosition(e))}}};e.prototype.getScrollTopForTopPosition=function(e){var o=e.offsetTop;var r=o;if(r<0){return 0}return r};e.prototype.getScrollTopForBottomPosition=function(e){var o=this.el.clientHeight;var r=e.offsetTop+e.clientHeight;var a=r-o;if(a<0){return 0}return a};e.prototype.scrollTo=function(e){return __awaiter(this,void 0,void 0,(function(){var o=this;return __generator(this,(function(r){if(e!==undefined&&e!==null){if(this.focusRaf!==undefined){cancelAnimationFrame(this.focusRaf)}this.focusRaf=raf((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){this.el.scrollTop=e;return[2]}))}))}))}return[2]}))}))};e.prototype.updateFocus=function(e,o){this.focusIndex=o;for(var r=0;r<e.length;r++){var a=e[r];a.focused=r===o}};e.prototype.getOptionIndex=function(e,o){for(var r=0;r<e.length;r++){var a=e[r];if(a.value===o){return r}}return undefined};e.prototype.getSelectedOptionIndex=function(e){for(var o=0;o<e.length;o++){var r=e[o];if(r.selected&&!r.hidden){return o}}return this.focusIndex};e.prototype.getFirstOptionIndex=function(e){for(var o=0;o<e.length;o++){var r=e[o];if(!r.disabled&&!r.hidden){return o}}return this.focusIndex};e.prototype.getNextOptionIndex=function(e,o){if(o===void 0){o=this.focusIndex}if(o<0){return this.getFirstOptionIndex(e)}var r=this.getLength(e);var a=o;if(o<r){a=o+1;if(e[a].disabled){return this.getNextOptionIndex(e,a)}}return a};e.prototype.getPreviousOptionIndex=function(e,o){if(o===void 0){o=this.focusIndex}var r=this.getFirstOptionIndex(e);if(o<=r){return r}var a=o;a=o-1;if(e[a].disabled){return this.getPreviousOptionIndex(e,a)}return a};e.prototype.getLastOptionIndex=function(e){for(var o=e.length-1;o>=0;o--){var r=e[o];if(!r.disabled){return o}}return this.focusIndex};e.prototype.getOptionIndexByLabel=function(e,o){if(o===undefined||o===""){return this.focusIndex}var r=e.find((function(e){return startsWith(e.label||"",o)}));if(!isNil(r)&&r.id){return e.indexOf(r)}return this.focusIndex};e.prototype.getLength=function(e){var o=e.map((function(e,o){return e.disabled?0:o}));var r=Math.max.apply(Math,o);return r};e.prototype.render=function(){var e=BEM.block("option-list");var o=this.labelledby||this.ariaForm.labelId;return h(Host,{key:"bcb9ee55aefe68beac309225d1127524f327f9da",class:Object.assign({},e.class()),id:this.inputId},h("div",Object.assign({key:"ac14c8a5615c6497569ca0aa8436dda3924babf6",role:"listbox","aria-labelledby":o,"aria-disabled":ariaBooleanToString(this.disabled),class:Object.assign({},e.element("container").class())},this.inheritAttributes),h("slot",{key:"869656387e53fd832b45141cb3b5b89684e61727"})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{contentHeight:["contentHeightChanged"]}},enumerable:false,configurable:true});return e}();__decorate([Logger("bal-option-list"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],OptionList.prototype,"createLogger",null);var balOptionListIds=0;OptionList.style=balOptionListCss;var balSwitchCss=":root{--bal-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-checkbox-switch-label-background-pressed-after:var(--bal-color-border-primary-pressed);--bal-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-border-danger-hovered);--bal-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-checkbox-switch-label-background-invalid-pressed-after:var(--bal-color-border-danger-pressed);--bal-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-checkbox-switch-label-background-invalid-checked-hovered-before:var(--bal-color-border-danger-hovered);--bal-checkbox-switch-label-background-invalid-checked-pressed-before:var(--bal-color-border-danger-pressed);--bal-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white)}.bal-switch{display:-ms-inline-flexbox;display:inline-flex;position:relative;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:2.5rem;height:1.5rem;padding:.25rem;border-radius:var(--bal-radius-rounded);overflow:hidden;background:var(--bal-checkbox-switch-label-background-before)}@media (hover: hover)and (pointer: fine){.bal-switch--hovered,.bal-switch:hover{background:var(--bal-checkbox-switch-label-background-before)}.bal-switch--hovered .bal-switch__toggle,.bal-switch:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-hover-after)}}.bal-switch--pressed,.bal-switch:active{background:var(--bal-checkbox-switch-label-background-before)}.bal-switch--pressed .bal-switch__toggle,.bal-switch:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-pressed-after)}.bal-switch--checked{background:var(--bal-checkbox-switch-label-background-checked-before)}.bal-switch--checked .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}@media (hover: hover)and (pointer: fine){.bal-switch--checked.bal-switch--hovered,.bal-switch--checked:hover{background:var(--bal-checkbox-switch-label-background-checked-hover-before)}.bal-switch--checked.bal-switch--hovered .bal-switch__toggle,.bal-switch--checked:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}}.bal-switch--checked.bal-switch--pressed,.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-checked-active-before)}.bal-switch--checked.bal-switch--pressed .bal-switch__toggle,.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-checked-after)}.bal-switch--invalid{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-after)}@media (hover: hover)and (pointer: fine){.bal-switch--invalid.bal-switch--hovered,.bal-switch--invalid:hover{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid.bal-switch--hovered .bal-switch__toggle,.bal-switch--invalid:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-hover-after)}}.bal-switch--invalid.bal-switch--pressed,.bal-switch--invalid:active{background:var(--bal-checkbox-switch-label-background-invalid-before)}.bal-switch--invalid.bal-switch--pressed .bal-switch__toggle,.bal-switch--invalid:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-pressed-after)}.bal-switch--invalid.bal-switch--checked.bal-switch,.bal-switch--invalid.bal-switch--checked{background:var(--bal-checkbox-switch-label-background-invalid-checked-before)}.bal-switch--invalid.bal-switch--checked.bal-switch .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--invalid.bal-switch--checked.bal-switch--hovered,.bal-switch--invalid.bal-switch--checked:hover{background:var(--bal-checkbox-switch-label-background-invalid-checked-hovered-before)}.bal-switch--invalid.bal-switch--checked.bal-switch--hovered .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked:hover .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--invalid.bal-switch--checked.bal-switch--pressed,.bal-switch--invalid.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-invalid-checked-pressed-before)}.bal-switch--invalid.bal-switch--checked.bal-switch--pressed .bal-switch__toggle,.bal-switch--invalid.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-invalid-checked-after)}.bal-switch--disabled,.bal-switch--disabled:hover,.bal-switch--disabled:active{background:var(--bal-checkbox-switch-label-background-disabled-hover-active-before)}.bal-switch--disabled .bal-switch__toggle,.bal-switch--disabled:hover .bal-switch__toggle,.bal-switch--disabled:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-disabled-hover-active-after)}.bal-switch--disabled.bal-switch--checked,.bal-switch--disabled.bal-switch--checked:hover,.bal-switch--disabled.bal-switch--checked:active{background:var(--bal-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-switch--disabled.bal-switch--checked .bal-switch__toggle,.bal-switch--disabled.bal-switch--checked:hover .bal-switch__toggle,.bal-switch--disabled.bal-switch--checked:active .bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-disabled-checked-hover-active-after)}.bal-switch__toggle{background:var(--bal-checkbox-switch-label-background-after);border-radius:50%;position:absolute;top:.25rem;width:1rem;height:1rem;-webkit-transition:-webkit-transform .3s ease-in-out;transition:-webkit-transform .3s ease-in-out;transition:transform .3s ease-in-out;transition:transform .3s ease-in-out, -webkit-transform .3s ease-in-out}.bal-switch__toggle--checked{-webkit-transform:translateX(100%);transform:translateX(100%);background:var(--bal-checkbox-switch-label-background-checked-after)}.bal-switch .bal-icon{position:absolute}.bal-switch .bal-icon .bal-switch__icon--checked{opacity:1}.bal-switch .bal-icon .bal-switch__icon{opacity:0;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}";var Switch=function(){function e(e){registerInstance(this,e);this.checked=false;this.invalid=undefined;this.disabled=undefined;this.hovered=false;this.pressed=false}e.prototype.render=function(){var e=BEM.block("switch");var o=!!this.checked;var r=!!this.disabled;var a=!!this.invalid;return h(Host,{key:"44e17aefdee7df228e92368c3863509a4dcd4bc8",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("checked").class(o)),e.modifier("disabled").class(r)),e.modifier("invalid").class(a)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed))},h("bal-icon",{key:"1f27c8f3f92467ea80de321666e597c8ea7cde89",name:"check",color:"white",size:"small","aria-hidden":"true",colorHovered:"white",colorPressed:"white",hovered:this.hovered,pressed:this.pressed,class:Object.assign({},e.element("icon").modifier("checked").class(o))}),h("div",{key:"d22b87a1a091669422db72acf16d48a4c4e8825f",class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.element("toggle").class()),e.element("toggle").modifier("checked").class(o)),e.element("toggle").modifier("disabled").class(r)),e.element("toggle").modifier("invalid").class(a)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed))}))};return e}();Switch.style=balSwitchCss;export{Check as bal_check,Checkbox as bal_checkbox,CheckboxGroup as bal_checkbox_group,Dropdown as bal_dropdown,Option as bal_option,OptionList as bal_option_list,Switch as bal_switch};
@@ -1 +1 @@
1
- import{__awaiter,__generator,__spreadArray}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BdVwMG9u.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-dfXERft2.js";import{d as defaultBalAriaForm}from"./form-FCLKfv6B.js";import{d as deepReady,a as waitAfterFramePaint}from"./helpers-BNj87EbG.js";import{L as ListenToMutation}from"./mutation.decorator-DhVeNnnY.js";import{B as BEM}from"./bem-ByiN-QjD.js";import{b as balBreakpoints}from"./breakpoints.subject-9qUvMXOC.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-DcfCKRvu.js";import"./browser-B1u-Mq75.js";import"./config.utils-B7jugjyM.js";import"./listener-CClDIhvK.js";import"./device-TtMibDFL.js";import"./tokens.esm-CvA86VZU.js";var balFieldCss=":root{--bal-field-label-horizontal-width:33.3333%;--bal-field-label-column-gap:.5rem}.bal-field,.bal-field-label,.bal-field-control,.bal-field-message,.bal-field-hint{display:block;position:relative;font-family:var(--bal-font-family-text)}.bal-field-label{display:inline}.bal-field-label~.bal-field-control{margin-top:.25rem}.bal-field-hint{display:inline-block;margin-left:.25rem;height:1rem;width:1rem}.bal-field-hint__hint{position:absolute;top:2px;left:0}.bal-field-message{line-height:var(--bal-line-height-normal)}.bal-field-hidden{display:none !important;visibility:hidden !important}.bal-field-control{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;gap:.5rem}.bal-field-control .bal-input{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-field-control--expanded-on-mobile{-ms-flex-direction:column;flex-direction:column}.bal-field-control--expanded-on-mobile .bal-button,.bal-field-control--expanded-on-mobile .bal-button .button{width:100%}}.bal-field-message{margin-top:0 !important}.bal-field-control+.bal-field-message{min-height:1.375rem;line-height:1.375rem}.bal-field-control:not(:has(+.bal-field-message)){padding-bottom:1.375rem}.bal-field--horizontal{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:var(--bal-field-label-column-gap);-moz-column-gap:var(--bal-field-label-column-gap);column-gap:var(--bal-field-label-column-gap);-ms-flex-align:center;align-items:center}.bal-field--horizontal .bal-field-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-width:var(--bal-field-label-horizontal-width);max-width:var(--bal-field-label-horizontal-width);-ms-flex-pack:end;justify-content:flex-end;text-align:right;margin-bottom:0}.bal-field--horizontal .bal-field-control{-ms-flex:1;flex:1;padding-bottom:0;-ms-flex-item-align:end;align-self:flex-end}.bal-field--horizontal .bal-field-message{-ms-flex-preferred-size:100%;flex-basis:100%;margin-top:0 !important;margin-left:calc(var(--bal-field-label-horizontal-width) + var(--bal-field-label-column-gap))}.bal-field--horizontal .bal-field-hint{margin-left:0}.bal-field--horizontal .bal-field-hint .bal-hint{top:0}.bal-field--horizontal .bal-field-hint~.bal-field-message{margin-left:calc(var(--bal-field-label-horizontal-width) + var(--bal-field-label-column-gap)*2 + 1.125rem)}.bal-field--horizontal .bal-field-label~.bal-field-control{margin-top:0}";var Field=function(){function e(e){var i=this;registerInstance(this,e);this.balFormControlDidLoad=createEvent(this,"balFormControlDidLoad");this.fieldId="bal-field-".concat(FieldIds++);this.formControlElement=["bal-field-control"];this.inputElements=["bal-input","bal-number-input","bal-textarea","bal-select","bal-checkbox","bal-radio","bal-input-group","bal-date","bal-input-date","bal-input-stepper","bal-input-slider","bal-file-upload","bal-dropdown","bal-segment"];this.formElements=__spreadArray(__spreadArray([],this.formControlElement,true),["bal-field-label","bal-field-message"],false);this.required=undefined;this.horizontal=false;this.invalid=undefined;this.valid=false;this.disabled=undefined;this.readonly=undefined;this.loading=undefined;this.isDirectChild=function(e){if(!e){return false}var t=e.parentElement;if(!t){return false}if(t.nodeName.toLowerCase()==="bal-field"&&t!==i.el){return false}if(t===i.el){return true}return i.isDirectChild(t)};this.isVisible=function(e){if(!e){return false}return e.ariaHidden!=="true"};this.findDirectChild=function(e){var t=i.el.querySelector(e);var l=i.isDirectChild(t);if(l){if(i.isVisible(t)){return t}}return undefined};this.findDirectChildren=function(e){return e.map((function(e){return Array.from(i.el.querySelectorAll(e)).filter(i.isDirectChild).filter(i.isVisible)})).flat()};this.mutationObserverActive=true}e.prototype.requiredHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),["bal-field-label"],false),"required")};e.prototype.invalidHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formElements,true),"invalid")};e.prototype.validHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formElements,true),"valid")};e.prototype.disabledHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formElements,true),"disabled")};e.prototype.readonlyHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formElements,true),"readonly")};e.prototype.loadingHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formControlElement,true),"loading")};e.prototype.connectedCallback=function(){this.triggerAllHandlers()};e.prototype.componentWillLoad=function(){this.triggerAllHandlers()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.syncAriaAttributes()];case 1:e.sent();return[2]}}))}))};e.prototype.syncAriaAttributes=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,l,a,n;return __generator(this,(function(r){switch(r.label){case 0:return[4,deepReady(this.el)];case 1:r.sent();return[4,waitAfterFramePaint()];case 2:r.sent();e=this.findDirectChild("bal-field-label bal-label");i=this.findDirectChild("bal-field-message");t=this.findDirectChildren(["bal-field-control bal-input","bal-field-control bal-select","bal-field-control bal-input-date","bal-field-control bal-dropdown","bal-field-control bal-checkbox","bal-field-control bal-radio","bal-field-control bal-segment","bal-field-control bal-segment-item","bal-field-control bal-checkbox-group","bal-field-control bal-radio-group","bal-field-control bal-number-input","bal-field-control bal-time-input","bal-field-control bal-input-slider","bal-field-control bal-input-stepper","bal-field-control bal-textarea","bal-field-control bal-file-upload"]);l=Object.assign({},defaultBalAriaForm);if(e){l.labelId="".concat(this.fieldId,"-lbl")}if(i){l.messageId="".concat(this.fieldId,"-msg")}a=0;r.label=3;case 3:if(!(a<t.length))return[3,10];n=t[a];if(!(a===0))return[3,7];l.controlId="".concat(this.fieldId,"-ctrl");return[4,e===null||e===void 0?void 0:e.setAriaForm(l)];case 4:r.sent();return[4,i===null||i===void 0?void 0:i.setAriaForm(l)];case 5:r.sent();return[4,n===null||n===void 0?void 0:n.setAriaForm(l)];case 6:r.sent();return[3,9];case 7:l.controlId="".concat(this.fieldId,"-ctrl-").concat(a);return[4,n===null||n===void 0?void 0:n.setAriaForm(l)];case 8:r.sent();r.label=9;case 9:a++;return[3,3];case 10:return[2]}}))}))};e.prototype.mutationListener=function(){this.triggerAllHandlers();this.syncAriaAttributes()};e.prototype.triggerAllHandlers=function(){this.requiredHandler();this.invalidHandler();this.validHandler();this.readonlyHandler();this.disabledHandler();this.loadingHandler()};e.prototype.updateProps=function(e,i){var t=this[i];if(t!==undefined){this.notifyComponents(e,(function(e){return e[i]=t}))}};e.prototype.notifyComponents=function(e,i){var t=this.el.querySelectorAll(e.join(", "));t.forEach((function(e){return i(e)}))};e.prototype.render=function(){return h(Host,{key:"ef05b294a516d40c5089d051feeb46715f581bc1",id:this.fieldId,class:{"bal-field":true,field:true,"bal-field--invalid":this.invalid===true,"bal-field--horizontal":this.horizontal===true}},h("slot",{key:"5710d7fd141b21d699004d7982d5d5bb7238cd94"}),h("span",{key:"e1b36343cdcb60960bcdac4d938c946f40041334",class:"bal-field-hidden"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{required:["requiredHandler"],invalid:["invalidHandler"],valid:["validHandler"],disabled:["disabledHandler"],readonly:["readonlyHandler"],loading:["loadingHandler"]}},enumerable:false,configurable:true});return e}();__decorate([ListenToMutation({subtree:false,waitAfterFramePrint:true}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Field.prototype,"mutationListener",null);var FieldIds=0;Field.style=balFieldCss;var FieldControl=function(){function e(e){registerInstance(this,e);this.iconRight="";this.iconLeft="";this.expandedOnMobile=undefined;this.loading=false}Object.defineProperty(e.prototype,"buildIconLeftTemplate",{get:function(){if(this.iconLeft){return h("bal-icon",{name:this.iconLeft,color:"info",class:"is-left",size:"small"})}return""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"buildIconRightTemplate",{get:function(){if(this.iconRight){return h("bal-icon",{name:this.iconRight,color:"info",class:"is-right",size:"small"})}return""},enumerable:false,configurable:true});e.prototype.render=function(){return h(Host,{key:"f2dbde868506b54d5b5e2fc14b5c29c417d42891",class:{"bal-field-control":true,control:true,"has-icons-left":!!this.iconLeft,"has-icons-right":!!this.iconRight,"is-loading":this.loading,"bal-field-control--expanded-on-mobile":!!this.expandedOnMobile}},h("slot",{key:"274cd16bccefc825d85e4b1222da7c523a1aa937"}),this.buildIconLeftTemplate,this.buildIconRightTemplate)};return e}();var FieldHint=function(){function e(e){registerInstance(this,e);this.hideTitleOnDesktop=false;this.subject="";this.closeLabel="Close";this.small=false;this.isDesktop=balBreakpoints.isDesktop}e.prototype.breakpointListener=function(e){this.isDesktop=e.desktop};e.prototype.render=function(){var e=BEM.block("field-hint");return h(Host,{key:"90dbf0da0a0c7ec498538721135e2fdefc4ac238",class:Object.assign({},e.class())},h("bal-hint",{key:"1976d07de449aa8b2897a375f61953f0c705e4ae",class:Object.assign({},e.element("hint").class()),"data-testid":"bal-field-hint",closeLabel:this.closeLabel,small:this.small},this.subject&&!(this.hideTitleOnDesktop&&this.isDesktop)?h("bal-hint-title",null,this.subject):"",h("bal-hint-text",{key:"ae2b48186e4f4c1adbfe7b3ed57a798a55a4cad0"},h("slot",{key:"e4a33e9e14ab86a15e78321fbd9f7325e0420ec5"}))))};return e}();__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],FieldHint.prototype,"breakpointListener",null);var FieldLabel=function(){function e(e){registerInstance(this,e);this.htmlFor=undefined;this.required=true;this.valid=undefined;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.size="small";this.weight="bold"}e.prototype.componentDidLoad=function(){if(this.element){this.parentBalFieldElement=this.element.closest("bal-field");if(this.parentBalFieldElement){this.parentBalFieldElement.classList.add("has-label")}}};e.prototype.disconnectedCallback=function(){if(this.parentBalFieldElement){this.parentBalFieldElement.classList.remove("has-label")}};e.prototype.render=function(){return h(Host,{key:"6685a5711aba2152b975fe49fe114a9edb400679",class:"bal-field-label"},h("bal-label",{key:"f677ab02ba144832c6304dc99c3e2900079e38b7",multiline:true,size:this.size,htmlFor:this.htmlFor,required:this.required,valid:this.valid,invalid:this.invalid,disabled:this.disabled,readonly:this.readonly,weight:this.weight},h("slot",{key:"687bfc73cab2cf7bef4e3e15b6a9090d5ba29d38"})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();var FieldMessage=function(){function e(e){registerInstance(this,e);this.ariaForm=defaultBalAriaForm;this.color="";this.invalid=false;this.valid=false;this.disabled=false;this.readonly=false;this.noReservedSpace=false}e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.ariaForm=Object.assign({},e);return[2]}))}))};e.prototype.render=function(){var e;return h(Host,{key:"24a1ad8e6d848841fd1e83428aa14430ed6fe5fc",id:this.ariaForm.messageId,class:(e={"bal-field-message":true,help:true,"is-danger":this.invalid,"is-success":this.valid,"is-disabled":this.disabled||this.readonly},e["is-".concat(this.color)]=!!this.color,e),style:{minHeight:this.noReservedSpace?"0":undefined}},h("slot",{key:"2cb9fb2480527f5b4ae63611f3a424fcc202bc36"}))};return e}();export{Field as bal_field,FieldControl as bal_field_control,FieldHint as bal_field_hint,FieldLabel as bal_field_label,FieldMessage as bal_field_message};
1
+ import{__awaiter,__generator,__spreadArray}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BdVwMG9u.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-dfXERft2.js";import{d as defaultBalAriaForm}from"./form-FCLKfv6B.js";import{d as deepReady,a as waitAfterFramePaint}from"./helpers-BNj87EbG.js";import{L as ListenToMutation}from"./mutation.decorator-DhVeNnnY.js";import{B as BEM}from"./bem-ByiN-QjD.js";import{b as balBreakpoints}from"./breakpoints.subject-PxavGndB.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-DwhK_t2m.js";import"./browser-B1u-Mq75.js";import"./config.utils-B7jugjyM.js";import"./listener-CClDIhvK.js";import"./device-TtMibDFL.js";import"./tokens.esm-Dk6PruGq.js";var balFieldCss=":root{--bal-field-label-horizontal-width:33.3333%;--bal-field-label-column-gap:.5rem}.bal-field,.bal-field-label,.bal-field-control,.bal-field-message,.bal-field-hint{display:block;position:relative;font-family:var(--bal-font-family-text)}.bal-field-label{display:inline}.bal-field-label~.bal-field-control{margin-top:.25rem}.bal-field-hint{display:inline-block;margin-left:.25rem;height:1rem;width:1rem}.bal-field-hint__hint{position:absolute;top:2px;left:0}.bal-field-message{line-height:var(--bal-line-height-normal)}.bal-field-hidden{display:none !important;visibility:hidden !important}.bal-field-control{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;gap:.5rem}.bal-field-control .bal-input{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-field-control--expanded-on-mobile{-ms-flex-direction:column;flex-direction:column}.bal-field-control--expanded-on-mobile .bal-button,.bal-field-control--expanded-on-mobile .bal-button .button{width:100%}}.bal-field-message{margin-top:0 !important}.bal-field-control+.bal-field-message{min-height:1.375rem;line-height:1.375rem}.bal-field-control:not(:has(+.bal-field-message)){padding-bottom:1.375rem}.bal-field--horizontal{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:var(--bal-field-label-column-gap);-moz-column-gap:var(--bal-field-label-column-gap);column-gap:var(--bal-field-label-column-gap);-ms-flex-align:center;align-items:center}.bal-field--horizontal .bal-field-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-width:var(--bal-field-label-horizontal-width);max-width:var(--bal-field-label-horizontal-width);-ms-flex-pack:end;justify-content:flex-end;text-align:right;margin-bottom:0}.bal-field--horizontal .bal-field-control{-ms-flex:1;flex:1;padding-bottom:0;-ms-flex-item-align:end;align-self:flex-end}.bal-field--horizontal .bal-field-message{-ms-flex-preferred-size:100%;flex-basis:100%;margin-top:0 !important;margin-left:calc(var(--bal-field-label-horizontal-width) + var(--bal-field-label-column-gap))}.bal-field--horizontal .bal-field-hint{margin-left:0}.bal-field--horizontal .bal-field-hint .bal-hint{top:0}.bal-field--horizontal .bal-field-hint~.bal-field-message{margin-left:calc(var(--bal-field-label-horizontal-width) + var(--bal-field-label-column-gap)*2 + 1.125rem)}.bal-field--horizontal .bal-field-label~.bal-field-control{margin-top:0}";var Field=function(){function e(e){var i=this;registerInstance(this,e);this.balFormControlDidLoad=createEvent(this,"balFormControlDidLoad");this.fieldId="bal-field-".concat(FieldIds++);this.formControlElement=["bal-field-control"];this.inputElements=["bal-input","bal-number-input","bal-textarea","bal-select","bal-checkbox","bal-radio","bal-input-group","bal-date","bal-input-date","bal-input-stepper","bal-input-slider","bal-file-upload","bal-dropdown","bal-segment"];this.formElements=__spreadArray(__spreadArray([],this.formControlElement,true),["bal-field-label","bal-field-message"],false);this.required=undefined;this.horizontal=false;this.invalid=undefined;this.valid=false;this.disabled=undefined;this.readonly=undefined;this.loading=undefined;this.isDirectChild=function(e){if(!e){return false}var t=e.parentElement;if(!t){return false}if(t.nodeName.toLowerCase()==="bal-field"&&t!==i.el){return false}if(t===i.el){return true}return i.isDirectChild(t)};this.isVisible=function(e){if(!e){return false}return e.ariaHidden!=="true"};this.findDirectChild=function(e){var t=i.el.querySelector(e);var l=i.isDirectChild(t);if(l){if(i.isVisible(t)){return t}}return undefined};this.findDirectChildren=function(e){return e.map((function(e){return Array.from(i.el.querySelectorAll(e)).filter(i.isDirectChild).filter(i.isVisible)})).flat()};this.mutationObserverActive=true}e.prototype.requiredHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),["bal-field-label"],false),"required")};e.prototype.invalidHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formElements,true),"invalid")};e.prototype.validHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formElements,true),"valid")};e.prototype.disabledHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formElements,true),"disabled")};e.prototype.readonlyHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formElements,true),"readonly")};e.prototype.loadingHandler=function(){this.updateProps(__spreadArray(__spreadArray([],this.inputElements,true),this.formControlElement,true),"loading")};e.prototype.connectedCallback=function(){this.triggerAllHandlers()};e.prototype.componentWillLoad=function(){this.triggerAllHandlers()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.syncAriaAttributes()];case 1:e.sent();return[2]}}))}))};e.prototype.syncAriaAttributes=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,l,a,n;return __generator(this,(function(r){switch(r.label){case 0:return[4,deepReady(this.el)];case 1:r.sent();return[4,waitAfterFramePaint()];case 2:r.sent();e=this.findDirectChild("bal-field-label bal-label");i=this.findDirectChild("bal-field-message");t=this.findDirectChildren(["bal-field-control bal-input","bal-field-control bal-select","bal-field-control bal-input-date","bal-field-control bal-dropdown","bal-field-control bal-checkbox","bal-field-control bal-radio","bal-field-control bal-segment","bal-field-control bal-segment-item","bal-field-control bal-checkbox-group","bal-field-control bal-radio-group","bal-field-control bal-number-input","bal-field-control bal-time-input","bal-field-control bal-input-slider","bal-field-control bal-input-stepper","bal-field-control bal-textarea","bal-field-control bal-file-upload"]);l=Object.assign({},defaultBalAriaForm);if(e){l.labelId="".concat(this.fieldId,"-lbl")}if(i){l.messageId="".concat(this.fieldId,"-msg")}a=0;r.label=3;case 3:if(!(a<t.length))return[3,10];n=t[a];if(!(a===0))return[3,7];l.controlId="".concat(this.fieldId,"-ctrl");return[4,e===null||e===void 0?void 0:e.setAriaForm(l)];case 4:r.sent();return[4,i===null||i===void 0?void 0:i.setAriaForm(l)];case 5:r.sent();return[4,n===null||n===void 0?void 0:n.setAriaForm(l)];case 6:r.sent();return[3,9];case 7:l.controlId="".concat(this.fieldId,"-ctrl-").concat(a);return[4,n===null||n===void 0?void 0:n.setAriaForm(l)];case 8:r.sent();r.label=9;case 9:a++;return[3,3];case 10:return[2]}}))}))};e.prototype.mutationListener=function(){this.triggerAllHandlers();this.syncAriaAttributes()};e.prototype.triggerAllHandlers=function(){this.requiredHandler();this.invalidHandler();this.validHandler();this.readonlyHandler();this.disabledHandler();this.loadingHandler()};e.prototype.updateProps=function(e,i){var t=this[i];if(t!==undefined){this.notifyComponents(e,(function(e){return e[i]=t}))}};e.prototype.notifyComponents=function(e,i){var t=this.el.querySelectorAll(e.join(", "));t.forEach((function(e){return i(e)}))};e.prototype.render=function(){return h(Host,{key:"ef05b294a516d40c5089d051feeb46715f581bc1",id:this.fieldId,class:{"bal-field":true,field:true,"bal-field--invalid":this.invalid===true,"bal-field--horizontal":this.horizontal===true}},h("slot",{key:"5710d7fd141b21d699004d7982d5d5bb7238cd94"}),h("span",{key:"e1b36343cdcb60960bcdac4d938c946f40041334",class:"bal-field-hidden"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{required:["requiredHandler"],invalid:["invalidHandler"],valid:["validHandler"],disabled:["disabledHandler"],readonly:["readonlyHandler"],loading:["loadingHandler"]}},enumerable:false,configurable:true});return e}();__decorate([ListenToMutation({subtree:false,waitAfterFramePrint:true}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",void 0)],Field.prototype,"mutationListener",null);var FieldIds=0;Field.style=balFieldCss;var FieldControl=function(){function e(e){registerInstance(this,e);this.iconRight="";this.iconLeft="";this.expandedOnMobile=undefined;this.loading=false}Object.defineProperty(e.prototype,"buildIconLeftTemplate",{get:function(){if(this.iconLeft){return h("bal-icon",{name:this.iconLeft,color:"info",class:"is-left",size:"small"})}return""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"buildIconRightTemplate",{get:function(){if(this.iconRight){return h("bal-icon",{name:this.iconRight,color:"info",class:"is-right",size:"small"})}return""},enumerable:false,configurable:true});e.prototype.render=function(){return h(Host,{key:"f2dbde868506b54d5b5e2fc14b5c29c417d42891",class:{"bal-field-control":true,control:true,"has-icons-left":!!this.iconLeft,"has-icons-right":!!this.iconRight,"is-loading":this.loading,"bal-field-control--expanded-on-mobile":!!this.expandedOnMobile}},h("slot",{key:"274cd16bccefc825d85e4b1222da7c523a1aa937"}),this.buildIconLeftTemplate,this.buildIconRightTemplate)};return e}();var FieldHint=function(){function e(e){registerInstance(this,e);this.hideTitleOnDesktop=false;this.subject="";this.closeLabel="Close";this.small=false;this.isDesktop=balBreakpoints.isDesktop}e.prototype.breakpointListener=function(e){this.isDesktop=e.desktop};e.prototype.render=function(){var e=BEM.block("field-hint");return h(Host,{key:"90dbf0da0a0c7ec498538721135e2fdefc4ac238",class:Object.assign({},e.class())},h("bal-hint",{key:"1976d07de449aa8b2897a375f61953f0c705e4ae",class:Object.assign({},e.element("hint").class()),"data-testid":"bal-field-hint",closeLabel:this.closeLabel,small:this.small},this.subject&&!(this.hideTitleOnDesktop&&this.isDesktop)?h("bal-hint-title",null,this.subject):"",h("bal-hint-text",{key:"ae2b48186e4f4c1adbfe7b3ed57a798a55a4cad0"},h("slot",{key:"e4a33e9e14ab86a15e78321fbd9f7325e0420ec5"}))))};return e}();__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],FieldHint.prototype,"breakpointListener",null);var FieldLabel=function(){function e(e){registerInstance(this,e);this.htmlFor=undefined;this.required=true;this.valid=undefined;this.invalid=undefined;this.disabled=undefined;this.readonly=undefined;this.size="small";this.weight="bold"}e.prototype.componentDidLoad=function(){if(this.element){this.parentBalFieldElement=this.element.closest("bal-field");if(this.parentBalFieldElement){this.parentBalFieldElement.classList.add("has-label")}}};e.prototype.disconnectedCallback=function(){if(this.parentBalFieldElement){this.parentBalFieldElement.classList.remove("has-label")}};e.prototype.render=function(){return h(Host,{key:"6685a5711aba2152b975fe49fe114a9edb400679",class:"bal-field-label"},h("bal-label",{key:"f677ab02ba144832c6304dc99c3e2900079e38b7",multiline:true,size:this.size,htmlFor:this.htmlFor,required:this.required,valid:this.valid,invalid:this.invalid,disabled:this.disabled,readonly:this.readonly,weight:this.weight},h("slot",{key:"687bfc73cab2cf7bef4e3e15b6a9090d5ba29d38"})))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();var FieldMessage=function(){function e(e){registerInstance(this,e);this.ariaForm=defaultBalAriaForm;this.color="";this.invalid=false;this.valid=false;this.disabled=false;this.readonly=false;this.noReservedSpace=false}e.prototype.setAriaForm=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.ariaForm=Object.assign({},e);return[2]}))}))};e.prototype.render=function(){var e;return h(Host,{key:"24a1ad8e6d848841fd1e83428aa14430ed6fe5fc",id:this.ariaForm.messageId,class:(e={"bal-field-message":true,help:true,"is-danger":this.invalid,"is-success":this.valid,"is-disabled":this.disabled||this.readonly},e["is-".concat(this.color)]=!!this.color,e),style:{minHeight:this.noReservedSpace?"0":undefined}},h("slot",{key:"2cb9fb2480527f5b4ae63611f3a424fcc202bc36"}))};return e}();export{Field as bal_field,FieldControl as bal_field_control,FieldHint as bal_field_hint,FieldLabel as bal_field_label,FieldMessage as bal_field_message};