@baloise/ds-core 16.3.0 → 16.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/README.md +1 -1
  2. package/components/bal-accordion-summary.js +12 -2
  3. package/components/bal-accordion-trigger.js +15 -2
  4. package/components/bal-carousel-item2.js +13 -3
  5. package/components/bal-carousel2.js +50 -20
  6. package/components/bal-checkbox-group.js +1 -1
  7. package/components/bal-checkbox2.js +13 -2
  8. package/components/bal-close2.js +1 -6
  9. package/components/bal-date.js +1 -1
  10. package/components/bal-datepicker.js +1 -1
  11. package/components/bal-dropdown.js +3 -3
  12. package/components/bal-file-upload.js +1 -1
  13. package/components/bal-list-item-accordion-head2.js +7 -1
  14. package/components/bal-nav-menu-bar2.js +1 -1
  15. package/components/bal-nav-menu-flyout2.js +3 -6
  16. package/components/bal-nav.js +11 -8
  17. package/components/bal-option-list.js +27 -2
  18. package/components/bal-pagination2.js +3 -3
  19. package/components/bal-progress-bar.js +4 -2
  20. package/components/bal-radio2.js +1 -1
  21. package/components/bal-select2.js +1 -1
  22. package/components/bal-steps.js +8 -6
  23. package/components/bal-tab-item.js +10 -2
  24. package/components/bal-tabs2.js +149 -31
  25. package/components/index.esm.js +1 -1
  26. package/components/index.js +1 -1
  27. package/components/option.js +4 -1
  28. package/components/tokens.esm.js +1 -1
  29. package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
  30. package/dist/baloise-design-system/index.esm.js +1 -1
  31. package/dist/baloise-design-system/p-0295f5df96.entry.js +1 -0
  32. package/dist/baloise-design-system/p-098f268743.entry.js +1 -0
  33. package/dist/baloise-design-system/{p-ae28b86fe5.entry.js → p-0ab43941ba.entry.js} +1 -1
  34. package/dist/baloise-design-system/p-0d69371467.entry.js +1 -0
  35. package/dist/baloise-design-system/p-1509eaa7.system.js +1 -1
  36. package/dist/baloise-design-system/{p-60f45a7b48.entry.js → p-167594de04.entry.js} +1 -1
  37. package/dist/baloise-design-system/{p-692536f9ff.system.entry.js → p-19542d9bfc.system.entry.js} +1 -1
  38. package/dist/baloise-design-system/p-2f4c6257f4.entry.js +1 -0
  39. package/dist/baloise-design-system/{p-47b18581c7.system.entry.js → p-3e8b5dec38.system.entry.js} +1 -1
  40. package/dist/baloise-design-system/{p-1de6b20b1c.system.entry.js → p-44d845a857.system.entry.js} +1 -1
  41. package/dist/baloise-design-system/p-544a0af68d.system.entry.js +1 -0
  42. package/dist/baloise-design-system/p-54f81c32.js +1 -1
  43. package/dist/baloise-design-system/p-67e6932c19.entry.js +1 -0
  44. package/dist/baloise-design-system/{p-d319b257.system.js → p-685405e0.system.js} +1 -1
  45. package/dist/baloise-design-system/{p-d0d06aa690.entry.js → p-68eead378f.entry.js} +1 -1
  46. package/dist/baloise-design-system/p-6d9afce4c2.entry.js +1 -0
  47. package/dist/baloise-design-system/{p-7047afd8.system.js → p-77ccb1f4.system.js} +1 -1
  48. package/dist/baloise-design-system/{p-b7035c24.system.js → p-83ff83d0.system.js} +1 -1
  49. package/dist/baloise-design-system/p-86b8ffa1ab.system.entry.js +1 -0
  50. package/dist/baloise-design-system/p-8754258843.entry.js +1 -0
  51. package/dist/baloise-design-system/p-88493e9537.system.entry.js +1 -0
  52. package/dist/baloise-design-system/{p-6cf5e22bb4.entry.js → p-886bedebf9.entry.js} +1 -1
  53. package/dist/baloise-design-system/{p-1be257c9cd.system.entry.js → p-8b6aca042a.system.entry.js} +1 -1
  54. package/dist/baloise-design-system/p-95c6192efb.system.entry.js +1 -0
  55. package/dist/baloise-design-system/{p-12bcc7da.js → p-9b4da619.js} +1 -1
  56. package/dist/baloise-design-system/p-a7c3119418.system.entry.js +1 -0
  57. package/dist/baloise-design-system/p-aee4ebe860.system.entry.js +1 -0
  58. package/dist/baloise-design-system/{p-f9db454e37.entry.js → p-b069b55a8d.entry.js} +1 -1
  59. package/dist/baloise-design-system/p-b0f4388e4c.system.entry.js +1 -0
  60. package/dist/baloise-design-system/p-b33c021c08.entry.js +1 -0
  61. package/dist/baloise-design-system/p-b397abec9a.system.entry.js +1 -0
  62. package/dist/baloise-design-system/p-b487614e8b.entry.js +1 -0
  63. package/dist/baloise-design-system/p-b51665840d.entry.js +1 -0
  64. package/dist/baloise-design-system/{p-80b45dd4d6.system.entry.js → p-bcb892a723.system.entry.js} +1 -1
  65. package/dist/baloise-design-system/p-bcca1ed3.system.js +1 -1
  66. package/dist/baloise-design-system/{p-6ceac3e144.system.entry.js → p-c0f4b35c8c.system.entry.js} +1 -1
  67. package/dist/baloise-design-system/p-c2de2596d1.system.entry.js +1 -0
  68. package/dist/baloise-design-system/p-c69783ee18.entry.js +1 -0
  69. package/dist/baloise-design-system/{p-cf0c50d42a.system.entry.js → p-c92eb37957.system.entry.js} +1 -1
  70. package/dist/baloise-design-system/{p-c572e259f4.system.entry.js → p-d66c8f0da9.system.entry.js} +1 -1
  71. package/dist/baloise-design-system/{p-3bad0907.system.js → p-de36076c.system.js} +1 -1
  72. package/dist/baloise-design-system/{p-7292c6e1a1.entry.js → p-e066dc532d.entry.js} +1 -1
  73. package/dist/baloise-design-system/{p-301e753d6f.system.entry.js → p-e18ec1401d.system.entry.js} +1 -1
  74. package/dist/baloise-design-system/{p-0ab7aa0e.js → p-e851f284.js} +1 -1
  75. package/dist/baloise-design-system/{p-f02ea04390.entry.js → p-e9c3c1c4cc.entry.js} +1 -1
  76. package/dist/baloise-design-system/p-f7091a61.js +1 -0
  77. package/dist/cjs/bal-accordion_4.cjs.entry.js +29 -4
  78. package/dist/cjs/bal-carousel_2.cjs.entry.js +60 -24
  79. package/dist/cjs/bal-checkbox_2.cjs.entry.js +11 -1
  80. package/dist/cjs/bal-close.cjs.entry.js +1 -6
  81. package/dist/cjs/bal-datepicker.cjs.entry.js +3 -3
  82. package/dist/cjs/bal-dropdown.cjs.entry.js +3 -3
  83. package/dist/cjs/bal-hint_3.cjs.entry.js +3 -3
  84. package/dist/cjs/bal-list_8.cjs.entry.js +12 -4
  85. package/dist/cjs/bal-logo.cjs.entry.js +3 -3
  86. package/dist/cjs/bal-nav_8.cjs.entry.js +17 -18
  87. package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
  88. package/dist/cjs/bal-option_2.cjs.entry.js +26 -2
  89. package/dist/cjs/bal-pagination.cjs.entry.js +6 -6
  90. package/dist/cjs/bal-popover_2.cjs.entry.js +3 -3
  91. package/dist/cjs/bal-progress-bar.cjs.entry.js +6 -5
  92. package/dist/cjs/bal-shape.cjs.entry.js +1 -1
  93. package/dist/cjs/bal-steps.cjs.entry.js +9 -8
  94. package/dist/cjs/bal-tab-item_2.cjs.entry.js +157 -33
  95. package/dist/cjs/baloise-design-system.cjs.js +1 -1
  96. package/dist/cjs/{breakpoints.decorator-47fd06b2.js → breakpoints.decorator-e278a735.js} +1 -1
  97. package/dist/cjs/{breakpoints.subject-06716a68.js → breakpoints.subject-0802767f.js} +1 -1
  98. package/dist/cjs/index.cjs.js +3 -3
  99. package/dist/cjs/initialize-2a19d091.js +1 -1
  100. package/dist/cjs/loader.cjs.js +1 -1
  101. package/dist/cjs/{option-c33cf2b8.js → option-4034ca7d.js} +4 -1
  102. package/dist/cjs/{tokens.esm-dc93a5d7.js → tokens.esm-be397f27.js} +1 -1
  103. package/dist/collection/components/bal-accordion/bal-accordion-summary/bal-accordion-summary.css +1 -1
  104. package/dist/collection/components/bal-accordion/bal-accordion-summary/bal-accordion-summary.js +11 -1
  105. package/dist/collection/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.css +1 -1
  106. package/dist/collection/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.js +14 -1
  107. package/dist/collection/components/bal-carousel/bal-carousel-item/bal-carousel-item.js +45 -2
  108. package/dist/collection/components/bal-carousel/bal-carousel.js +76 -13
  109. package/dist/collection/components/bal-carousel/controls/dot-control.js +2 -2
  110. package/dist/collection/components/bal-carousel/controls/large-control.js +2 -2
  111. package/dist/collection/components/bal-carousel/controls/small-control.js +2 -2
  112. package/dist/collection/components/bal-carousel/controls/tab-control.js +2 -2
  113. package/dist/collection/components/bal-checkbox/bal-checkbox.js +13 -2
  114. package/dist/collection/components/bal-close/bal-close.js +1 -6
  115. package/dist/collection/components/bal-list/bal-list-item-accordion-head/bal-list-item-accordion-head.js +7 -1
  116. package/dist/collection/components/bal-nav/bal-nav-menu-bar/bal-nav-menu-bar.css +1 -1
  117. package/dist/collection/components/bal-nav/bal-nav-menu-flyout/bal-nav-menu-flyout.js +24 -6
  118. package/dist/collection/components/bal-nav/bal-nav.css +1 -1
  119. package/dist/collection/components/bal-nav/bal-nav.js +5 -2
  120. package/dist/collection/components/bal-nav/models/bal-nav-menu-link-item.js +2 -2
  121. package/dist/collection/components/bal-nav/models/bal-nav-meta-link-item.js +3 -3
  122. package/dist/collection/components/bal-option-list/bal-option-list.js +43 -2
  123. package/dist/collection/components/bal-pagination/bal-pagination.js +3 -3
  124. package/dist/collection/components/bal-progress-bar/bal-progress-bar.css +1 -1
  125. package/dist/collection/components/bal-progress-bar/bal-progress-bar.js +26 -2
  126. package/dist/collection/components/bal-steps/bal-steps.css +1 -1
  127. package/dist/collection/components/bal-steps/bal-steps.js +26 -2
  128. package/dist/collection/components/bal-steps/components/step-button.js +2 -2
  129. package/dist/collection/components/bal-tabs/bal-tab-item/bal-tab-item.js +47 -2
  130. package/dist/collection/components/bal-tabs/bal-tabs.js +124 -21
  131. package/dist/collection/components/bal-tabs/components/tab-button.js +18 -6
  132. package/dist/collection/components/bal-tabs/components/tab-nav.js +3 -3
  133. package/dist/collection/utils/constants/version.constant.js +1 -1
  134. package/dist/collection/utils/date/date.spec.js +0 -1
  135. package/dist/collection/utils/dropdown/option.js +4 -1
  136. package/dist/collection/utils/dropdown/popup.js +2 -2
  137. package/dist/collection/utils/string.js +10 -0
  138. package/dist/collection/utils/string.spec.js +24 -0
  139. package/dist/esm/bal-accordion_4.entry.js +29 -4
  140. package/dist/esm/bal-carousel_2.entry.js +61 -25
  141. package/dist/esm/bal-checkbox_2.entry.js +11 -1
  142. package/dist/esm/bal-close.entry.js +1 -6
  143. package/dist/esm/bal-datepicker.entry.js +3 -3
  144. package/dist/esm/bal-dropdown.entry.js +3 -3
  145. package/dist/esm/bal-hint_3.entry.js +3 -3
  146. package/dist/esm/bal-list_8.entry.js +12 -4
  147. package/dist/esm/bal-logo.entry.js +3 -3
  148. package/dist/esm/bal-nav_8.entry.js +17 -18
  149. package/dist/esm/bal-navbar_5.entry.js +3 -3
  150. package/dist/esm/bal-option_2.entry.js +26 -2
  151. package/dist/esm/bal-pagination.entry.js +6 -6
  152. package/dist/esm/bal-popover_2.entry.js +3 -3
  153. package/dist/esm/bal-progress-bar.entry.js +6 -5
  154. package/dist/esm/bal-shape.entry.js +1 -1
  155. package/dist/esm/bal-steps.entry.js +9 -8
  156. package/dist/esm/bal-tab-item_2.entry.js +158 -34
  157. package/dist/esm/baloise-design-system.js +1 -1
  158. package/dist/esm/{breakpoints.decorator-f979fe5c.js → breakpoints.decorator-d0f1affe.js} +1 -1
  159. package/dist/esm/{breakpoints.subject-9ea7074e.js → breakpoints.subject-f57eda2c.js} +1 -1
  160. package/dist/esm/index.js +4 -4
  161. package/dist/esm/initialize-e216cfe4.js +1 -1
  162. package/dist/esm/loader.js +1 -1
  163. package/dist/esm/{option-37cb0282.js → option-01553dab.js} +4 -1
  164. package/dist/esm/{tokens.esm-7d2734e1.js → tokens.esm-70c16b84.js} +1 -1
  165. package/dist/esm-es5/bal-accordion_4.entry.js +1 -1
  166. package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
  167. package/dist/esm-es5/bal-checkbox_2.entry.js +1 -1
  168. package/dist/esm-es5/bal-close.entry.js +1 -1
  169. package/dist/esm-es5/bal-datepicker.entry.js +1 -1
  170. package/dist/esm-es5/bal-dropdown.entry.js +1 -1
  171. package/dist/esm-es5/bal-hint_3.entry.js +1 -1
  172. package/dist/esm-es5/bal-list_8.entry.js +1 -1
  173. package/dist/esm-es5/bal-logo.entry.js +1 -1
  174. package/dist/esm-es5/bal-nav_8.entry.js +1 -1
  175. package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
  176. package/dist/esm-es5/bal-option_2.entry.js +1 -1
  177. package/dist/esm-es5/bal-pagination.entry.js +1 -1
  178. package/dist/esm-es5/bal-popover_2.entry.js +1 -1
  179. package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
  180. package/dist/esm-es5/bal-shape.entry.js +1 -1
  181. package/dist/esm-es5/bal-steps.entry.js +1 -1
  182. package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
  183. package/dist/esm-es5/baloise-design-system.js +1 -1
  184. package/dist/esm-es5/{breakpoints.decorator-f979fe5c.js → breakpoints.decorator-d0f1affe.js} +1 -1
  185. package/dist/esm-es5/{breakpoints.subject-9ea7074e.js → breakpoints.subject-f57eda2c.js} +1 -1
  186. package/dist/esm-es5/index.js +1 -1
  187. package/dist/esm-es5/initialize-e216cfe4.js +1 -1
  188. package/dist/esm-es5/loader.js +1 -1
  189. package/dist/esm-es5/option-01553dab.js +1 -0
  190. package/dist/html.html-data.json +81 -3
  191. package/dist/types/components/bal-accordion/bal-accordion-summary/bal-accordion-summary.d.ts +1 -0
  192. package/dist/types/components/bal-accordion/bal-accordion-trigger/bal-accordion-trigger.d.ts +1 -0
  193. package/dist/types/components/bal-carousel/bal-carousel-item/bal-carousel-item.d.ts +6 -0
  194. package/dist/types/components/bal-carousel/bal-carousel.d.ts +11 -2
  195. package/dist/types/components/bal-carousel/controls/dot-control.d.ts +1 -0
  196. package/dist/types/components/bal-carousel/controls/large-control.d.ts +1 -0
  197. package/dist/types/components/bal-carousel/controls/small-control.d.ts +1 -0
  198. package/dist/types/components/bal-carousel/controls/tab-control.d.ts +1 -0
  199. package/dist/types/components/bal-checkbox/bal-checkbox.d.ts +5 -0
  200. package/dist/types/components/bal-close/bal-close.d.ts +0 -2
  201. package/dist/types/components/bal-list/bal-list-item-accordion-head/bal-list-item-accordion-head.d.ts +1 -0
  202. package/dist/types/components/bal-nav/bal-nav-menu-flyout/bal-nav-menu-flyout.d.ts +4 -1
  203. package/dist/types/components/bal-nav/models/bal-nav-link-item.d.ts +1 -0
  204. package/dist/types/components/bal-nav/models/bal-nav-menu-link-item.d.ts +1 -0
  205. package/dist/types/components/bal-nav/models/bal-nav-meta-link-item.d.ts +3 -1
  206. package/dist/types/components/bal-option-list/bal-option-list.d.ts +5 -0
  207. package/dist/types/components/bal-progress-bar/bal-progress-bar.d.ts +5 -1
  208. package/dist/types/components/bal-progress-bar/bal-progress-bar.interfaces.d.ts +1 -0
  209. package/dist/types/components/bal-steps/bal-steps.d.ts +4 -0
  210. package/dist/types/components/bal-steps/bal-steps.interfaces.d.ts +3 -1
  211. package/dist/types/components/bal-steps/components/step-button.d.ts +1 -0
  212. package/dist/types/components/bal-tabs/bal-tab-item/bal-tab-item.d.ts +10 -0
  213. package/dist/types/components/bal-tabs/bal-tab.type.d.ts +5 -3
  214. package/dist/types/components/bal-tabs/bal-tabs.d.ts +15 -3
  215. package/dist/types/components/bal-tabs/bal-tabs.interfaces.d.ts +3 -0
  216. package/dist/types/components/bal-tabs/components/tab-button.d.ts +1 -0
  217. package/dist/types/components/bal-tabs/components/tab-nav.d.ts +1 -0
  218. package/dist/types/components.d.ts +71 -10
  219. package/dist/types/utils/dropdown/option.d.ts +1 -1
  220. package/dist/types/utils/dropdown/popup.d.ts +1 -1
  221. package/dist/types/utils/string.d.ts +1 -0
  222. package/package.json +8 -8
  223. package/dist/baloise-design-system/p-1502fa2526.entry.js +0 -1
  224. package/dist/baloise-design-system/p-1e100fd83b.entry.js +0 -1
  225. package/dist/baloise-design-system/p-254b130be5.system.entry.js +0 -1
  226. package/dist/baloise-design-system/p-2d82b78410.entry.js +0 -1
  227. package/dist/baloise-design-system/p-2e2ed7a07f.entry.js +0 -1
  228. package/dist/baloise-design-system/p-2ebc8f9d0c.system.entry.js +0 -1
  229. package/dist/baloise-design-system/p-30fc270ec1.entry.js +0 -1
  230. package/dist/baloise-design-system/p-35aa7ecb24.entry.js +0 -1
  231. package/dist/baloise-design-system/p-4f3776ea4e.system.entry.js +0 -1
  232. package/dist/baloise-design-system/p-55f280cf33.system.entry.js +0 -1
  233. package/dist/baloise-design-system/p-63dfa27862.system.entry.js +0 -1
  234. package/dist/baloise-design-system/p-7d498fc5.js +0 -1
  235. package/dist/baloise-design-system/p-87d9c24d45.system.entry.js +0 -1
  236. package/dist/baloise-design-system/p-96c55b4f58.entry.js +0 -1
  237. package/dist/baloise-design-system/p-b22fa7966b.entry.js +0 -1
  238. package/dist/baloise-design-system/p-c304d5fa9c.entry.js +0 -1
  239. package/dist/baloise-design-system/p-cee7a0dd73.system.entry.js +0 -1
  240. package/dist/baloise-design-system/p-cf47f1f53c.entry.js +0 -1
  241. package/dist/baloise-design-system/p-dbc2d22240.system.entry.js +0 -1
  242. package/dist/baloise-design-system/p-e7a4d97c51.entry.js +0 -1
  243. package/dist/baloise-design-system/p-f0ee1b670b.system.entry.js +0 -1
  244. package/dist/esm-es5/option-37cb0282.js +0 -1
  245. /package/dist/baloise-design-system/{p-fc80aa3e.system.js → p-83486137.system.js} +0 -0
  246. /package/dist/baloise-design-system/{p-6b5343bd.js → p-ec4875a2.js} +0 -0
  247. /package/dist/esm-es5/{tokens.esm-7d2734e1.js → tokens.esm-70c16b84.js} +0 -0
@@ -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-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{s as stopEventBubbling,c as inputSetFocus,d as inputSetBlur}from"./form-input-28a08ec5.js";import{i as isDescendant,p as hasTagName}from"./helpers-c201154e.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{e as isSpaceKey,o as areArraysEqual}from"./index.esm-83b1f9c4.js";import{L as Logger}from"./log-dfd1c19f.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{a as ariaBooleanToString}from"./aria-d5877698.js";import{L as ListenToFocus}from"./focus.decorator-8acd79c3.js";import{L as ListenToMutation}from"./mutation.decorator-c7b24839.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./listener-04842ae9.js";var radioCheckboxCss='@media (hover: hover)and (pointer: fine){.bal-radio-checkbox.bal-focused .bal-radio-checkbox__input:not(.bal-radio-checkbox__input--select-button)+.bal-radio-checkbox__label::before,.bal-radio-checkbox.bal-focused.bal-radio-checkbox--select-button{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-radio-checkbox-symbol-size:1.5rem;--bal-radio-checkbox-symbol-width:calc(0.5rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.875rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.5rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.25rem;--bal-radio-checkbox-label-min-height:1.5rem;--bal-radio-checkbox-select-button-background-hover:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-checked:var(--bal-color-primary);--bal-radio-checkbox-select-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-background-checked-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-background-invalid:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-hover:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-active:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-radio-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-radio-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-radio-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-radio-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-radio-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-radio-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-radio-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-radio-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-radio-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-radio-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-radio-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white);--bal-radio-checkbox-button-background:transparent;--bal-radio-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-radio-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-radio-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-radio-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-radio-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-radio-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-radio-checkbox-select-button-border-color:var(--bal-color-primary);--bal-radio-checkbox-select-button-border-color-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-border-color-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-border-color-invalid:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-hover:var(--bal-color-border-primary-hovered);--bal-radio-checkbox-button-border-color-active:var(--bal-color-border-primary-pressed);--bal-radio-checkbox-button-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-radio-checkbox-button-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-radio-checkbox-button-border-color:var(--bal-color-border);--bal-radio-checkbox-button-border-color-checked:var(--bal-color-border-primary);--bal-radio-checkbox-button-border-color-disabled:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-invalid:var(--bal-color-border-danger)}bal-radio .bal-radio-checkbox__label::before,bal-radio .bal-radio-checkbox__label::after{margin-top:0px !important}.bal-radio-checkbox-group{display:inline-block;position:relative;width:100%}.bal-radio-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-radio-checkbox-group__inner--select-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-radio-checkbox-group__inner--select-button{-ms-flex-direction:row;flex-direction:row}}.bal-radio-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{width:100%}}.bal-radio-checkbox-group__inner--select-button.bal-radio-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-radio-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-radio-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}.bal-radio-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:1.5rem;min-height:3rem}.bal-radio-checkbox--flat:not(.bal-radio-checkbox--select-button){min-height:1.5rem}.bal-radio-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}.bal-radio-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-radio-checkbox:not(.bal-radio-checkbox--disabled),.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label>span{cursor:pointer}.bal-radio-checkbox__label{-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;margin:0;line-height:1.5rem;contain:layout style;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-align:left;min-height:var(--bal-radio-checkbox-label-min-height);font-family:var(--bal-font-family-text)}.bal-radio-checkbox__label__text{padding-left:2rem;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox__label__text--hidden{padding-left:0;display:none}.bal-radio-checkbox__label__text--flat{padding-top:0;padding-bottom:0}.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::before,.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::after{top:0px !important}.bal-radio-checkbox__label--hidden::before,.bal-radio-checkbox__label--hidden::after{top:0px !important}.bal-radio-checkbox__label::before,.bal-radio-checkbox__label::after{display:inline-block;position:absolute;left:0;top:.25rem;height:var(--bal-radio-checkbox-symbol-size);width:var(--bal-radio-checkbox-symbol-size);background-color:rgba(0,0,0,0);background-position:center;background-repeat:no-repeat;background-size:var(--bal-radio-checkbox-symbol-size) var(--bal-radio-checkbox-symbol-size)}.bal-radio-checkbox__label::before{content:"";border-style:var(--bal-form-field-control-border-style);border-width:2px}.bal-radio-checkbox__label::after{content:none}.bal-radio-checkbox__label--checked::after{content:""}.bal-radio-checkbox__label--radio::before,.bal-radio-checkbox__label--radio::after{border-radius:50%}.bal-radio-checkbox__label--radio::after{left:0;-webkit-transform:scale(0.25);transform:scale(0.25)}.bal-radio-checkbox__label--checkbox::before{border-radius:var(--bal-form-field-control-radius)}.bal-radio-checkbox__label--checkbox::after{border-top:0;border-right-style:var(--bal-form-field-control-border-style);border-right-width:2px;border-bottom-style:var(--bal-form-field-control-border-style);border-bottom-width:2px;border-left:0;border-radius:1px;width:var(--bal-radio-checkbox-symbol-width);height:var(--bal-radio-checkbox-symbol-height);left:var(--bal-radio-checkbox-symbol-left);margin-top:var(--bal-radio-checkbox-symbol-margin-top);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-primary);background:var(--bal-color-transparent)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-light-blue-5);background:var(--bal-color-grey-2)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-blue-6);background:var(--bal-color-grey-2)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-danger);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-5);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-6);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-grey-dark);background:var(--bal-color-grey-2)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-radio-checkbox--inline{display:inline}.bal-radio-checkbox--select-button{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-radio-checkbox-select-button-border-color)}.bal-radio-checkbox--select-button:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-hover);background:var(--bal-radio-checkbox-select-button-background-hover)}.bal-radio-checkbox--select-button:active{border-color:var(--bal-radio-checkbox-select-button-border-color-active);background:var(--bal-radio-checkbox-select-button-background-active)}.bal-radio-checkbox--select-button label::before{top:unset}.bal-radio-checkbox--select-button label::after{top:unset;margin-top:-3px}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::before{top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::after{margin-top:-3px;top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat .bal-radio-checkbox__label__text--flat{padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked{background:var(--bal-radio-checkbox-select-button-background-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-radio-checkbox-select-button-link-text-color-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover{background:var(--bal-radio-checkbox-select-button-background-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active{background:var(--bal-radio-checkbox-select-button-background-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid);background:var(--bal-radio-checkbox-select-button-background-invalid)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-danger-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-active);background:var(--bal-radio-checkbox-select-button-background-invalid-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked);background:var(--bal-radio-checkbox-select-button-background-invalid-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-active);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-disabled-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-checked-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--switch{min-width:2.5rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label{padding-left:1rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{border-radius:1.5rem;position:absolute;display:block;top:0;left:0;width:2.5rem;height:1.5rem;border:1.6px solid rgba(0,0,0,0);content:"";-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;margin-top:.25rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{border:none;margin:0;border-radius:50%;display:block;position:absolute;top:.25rem !important;left:.25rem;width:1rem;height:1rem;margin-top:.25rem;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;content:""}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-before)}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-after)}.bal-radio-checkbox--switch:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-hover-after)}.bal-radio-checkbox--switch:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{left:1.25rem;background:var(--bal-radio-checkbox-switch-label-background-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-hover-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after)}';var BalCheckboxStyle0=radioCheckboxCss;var Checkbox=function(){function a(a){var e=this;registerInstance(this,a);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balChange=createEvent(this,"balChange",7);this.inputId="bal-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.keyboardMode=true;this.initialValue=false;this.onKeypress=function(a){if(isSpaceKey(a)){var o=a.target;if(o.href){return}if(o.nodeName==="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();a.preventDefault()}else{stopEventBubbling(a)}}};this.onClick=function(a){var o;var c=a.target;if(c.href){return}if(c.nodeName!=="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();(o=e.nativeInput)===null||o===void 0?void 0:o.focus();a.preventDefault()}else{stopEventBubbling(a)}};this.onFocus=function(a){if(e.disabled||e.readonly){e.focused=false;return stopEventBubbling(a)}e.balFocus.emit(a);if(e.keyboardMode){e.focused=true}};this.onBlur=function(a){if(e.disabled||e.readonly){return stopEventBubbling(a)}e.balBlur.emit(a);e.focused=false};this.onPointerDown=function(){return e.keyboardMode=false};this.onKeydown=function(a){return e.keyboardMode=FOCUS_KEYS.includes(a.key)};this.hasLabel=true;this.focused=false;this.buttonTabindex=undefined;this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.label="";this.invisible=false;this.labelHidden=false;this.flat=false;this.inline=false;this.interface="checkbox";this.value="on";this.checked=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}a.prototype.createLogger=function(a){this.log=a};a.prototype.connectedCallback=function(){var a=this;var e=this.group;var o=this.checkboxButton;if(o||e){this.updateState()}if(e){e.addEventListener("balChange",(function(){return a.updateState()}))}this.initialValue=this.checked;this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};a.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.disconnectedCallback=function(){var a=this;if(this.group){this.group.removeEventListener("balChange",(function(){return a.updateState()}))}this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};a.prototype.listenOnClick=function(a){if((this.disabled||this.readonly)&&a.target&&(a.target===this.el||isDescendant(this.el,a.target))){stopEventBubbling(a)}};a.prototype.resetHandler=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){this.checked=this.initialValue}};a.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){inputSetFocus(this);return[2]}))}))};a.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){inputSetBlur(this);return[2]}))}))};a.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};a.prototype.getOption=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,this.option]}))}))};a.prototype.setButtonTabindex=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.checkboxButton){this.buttonTabindex=-1}else{this.buttonTabindex=a}return[2]}))}))};a.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var a;return __generator(this,(function(e){if(this.group&&this.group.control&&Array.isArray(this.group.value)){a=this.group.value.includes(this.value);if(a!==this.checked){this.checked=a}}if(this.checkboxButton){this.buttonTabindex=-1;if(this.checkboxButton.setChecked){this.checkboxButton.setChecked(this.checked)}}return[2]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};Object.defineProperty(a.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,invisible:this.invisible,invalid:this.invalid}},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"group",{get:function(){return this.el.closest("bal-checkbox-group")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"checkboxButton",{get:function(){return this.el.closest("bal-checkbox-button")},enumerable:false,configurable:true});a.prototype.toggleChecked=function(){this.checked=!this.checked;this.balChange.emit(this.checked)};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox");var o=e.element("input");var c=e.element("label");var b=c.element("text");var l=this.focused&&this.buttonTabindex!==-1;var r=this.inheritedAttributes;if(this.buttonTabindex!==undefined){r.tabIndex=this.buttonTabindex}var i=this.ariaForm.controlId||this.inputId;var t=this.ariaForm.labelId||null;var d=this.labelHidden?"span":"label";var k={};if(!this.labelHidden){t="".concat(t||""," ").concat(i,"-lbl").trim();k.id="".concat(i,"-lbl");k.htmlFor=i}return h(Host,{"aria-checked":"".concat(this.checked),"aria-disabled":ariaBooleanToString(this.disabled),"aria-hidden":ariaBooleanToString(this.disabled||this.nonSubmit),"aria-focused":l?"true":null,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({"bal-focused":l},e.class()),e.modifier("checkbox").class()),e.modifier("select-button").class(this.interface==="select-button")),e.modifier("switch").class(this.interface==="switch")),e.modifier("focused").class(this.focused)),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("invisible").class(this.invisible)),e.modifier("flat").class(this.flat)),e.modifier("disabled").class(this.disabled||this.readonly)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed)),e.modifier("inline").class(this.inline)),onKeypress:this.onKeypress,onClick:this.onClick},h("input",Object.assign({class:Object.assign(Object.assign({},o.class()),o.modifier("select-button").class(this.interface==="select-button")),"data-testid":"bal-checkbox-input",type:"checkbox",id:i,"aria-labelledby":t,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":ariaBooleanToString(this.disabled),"aria-checked":"".concat(this.checked),"aria-hidden":ariaBooleanToString(this.nonSubmit),name:this.name,value:this.value,checked:this.checked,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,required:this.required,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return a.nativeInput=e}},r)),!this.invisible?h(d,Object.assign({class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("checkbox").class()),c.modifier("checked").class(this.checked)),c.modifier("hidden").class(this.labelHidden)),c.modifier("flat").class(this.flat)),c.modifier("switch").class(this.interface==="switch"))},k,{"data-testid":"bal-checkbox-label"}),h("span",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("hidden").class(this.labelHidden)),b.modifier("flat").class(this.flat)),"data-testid":"bal-checkbox-text"},this.label,h("slot",null))):"")};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-checkbox"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Checkbox.prototype,"createLogger",null);var checkboxIds=0;Checkbox.style=BalCheckboxStyle0;var CheckboxGroup=function(){function a(a){var e=this;registerInstance(this,a);this.balChange=createEvent(this,"balChange",7);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.inputId="bal-cg-".concat(checkboxGroupIds++);this.inheritedAttributes={};this.hasFocus=false;this.mutationObserverActive=true;this.onClick=function(a){if(!e.control){return}var o=a.target;if(o.href){return}a.preventDefault();var c=a.target&&a.target.closest("bal-checkbox");if(c){if(c.disabled||c.readonly){return a.stopPropagation()}}var b=[];e.getCheckboxes().forEach((function(a){if(a.checked){b.push(a.value)}}));if(!areArraysEqual(e.value,b)){e.value=__spreadArray([],b,true);e.balChange.emit(e.value)}};this.onOptionChange=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(a){this.sync();return[2]}))}))};this.ariaForm=defaultBalAriaForm;this.options=undefined;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}a.prototype.createLogger=function(a){this.log=a};a.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){if(this.control){this.onOptionChange();this.mutationObserverActive=this.options===undefined}return[2]}))}))};a.prototype.invalidChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.invalid=a}));this.getCheckboxButtons().forEach((function(e){e.invalid=a}))}}};a.prototype.disabledChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.disabled=a}));this.getCheckboxButtons().forEach((function(e){e.disabled=a}))}}};a.prototype.readonlyChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.readonly=a}));this.getCheckboxButtons().forEach((function(e){e.readonly=a}))}}};a.prototype.valueChanged=function(a,e){if(this.control){if(!areArraysEqual(this.value,e)){this.onOptionChange()}}else{this.onOptionChange()}};a.prototype.columnsChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSize=a}))};a.prototype.columnsTabletChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSizeTablet=a}))};a.prototype.columnsMobileChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSizeMobile=a}))};a.prototype.connectedCallback=function(){if(this.control){this.mutationObserverActive=this.options===undefined}};a.prototype.componentWillLoad=function(){if(this.control){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly)}this.columnsChanged(this.columns);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.focusInListener=function(a){this.balFocus.emit(a)};a.prototype.focusOutListener=function(a){this.balBlur.emit(a)};a.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()};a.prototype.listenOnClick=function(a){if(this.control){if(isDescendant(this.el,a.target)){stopEventBubbling(a)}}};a.prototype.resetHandler=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){if(this.control){this.value=[]}this.onOptionChange()}};a.prototype.checkboxFocusListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-checkbox")){stopEventBubbling(a)}};a.prototype.checkboxBlurListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-checkbox")){stopEventBubbling(a)}};a.prototype.setValue=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.control){this.value=a}return[2]}))}))};a.prototype.getOptionByValue=function(a){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=this.options;if(e){return[2,e.find((function(e){return e.value===a}))]}return[2,undefined]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};a.prototype.sync=function(){var a=this;if(this.control){var e=function(e){for(var o=0;o<a.value.length;o++){var c=a.value[o];if(c!==undefined&&c.toString()===e.value.toString()){return true}}return false};this.getCheckboxes().forEach((function(a){a.checked=e(a)}))}this.getCheckboxes().forEach((function(e){if(a.interface){e.interface=a.interface}}))};a.prototype.getCheckboxes=function(){return Array.from(this.el.querySelectorAll("bal-checkbox"))};a.prototype.getCheckboxButtons=function(){return Array.from(this.el.querySelectorAll("bal-checkbox-button"))};a.prototype.render=function(){var a=BEM.block("radio-checkbox-group");var e=a.element("inner");var o=this.options||[];var c=o.map((function(a){if(typeof a.html==="function"){return Object.assign(Object.assign({},a),{html:a.html()})}return a}));return h(Host,Object.assign({class:Object.assign({},a.class()),role:"group","aria-disabled":this.disabled?"true":null,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("vertical-mobile").class(this.verticalOnMobile)),e.modifier("vertical").class(this.vertical)),e.modifier("expanded").class(this.expanded)),e.modifier("select-button").class(this.interface==="select-button"))},h("slot",null),c.map((function(a){return h("bal-checkbox",{key:a.value,name:a.name,value:a.value,labelHidden:a.labelHidden,flat:a.flat,interface:a.interface,disabled:a.disabled,readonly:a.readonly,required:a.required,nonSubmit:!!a.nonSubmit,invalid:a.invalid,innerHTML:a.html})}))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"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 a}();__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",[FocusEvent]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__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;export{Checkbox as bal_checkbox,CheckboxGroup as bal_checkbox_group};
1
+ import{__awaiter,__generator,__spreadArray}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{s as stopEventBubbling,c as inputSetFocus,d as inputSetBlur}from"./form-input-28a08ec5.js";import{i as isDescendant,p as hasTagName}from"./helpers-c201154e.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{e as isSpaceKey,o as areArraysEqual}from"./index.esm-83b1f9c4.js";import{L as Logger}from"./log-dfd1c19f.js";import{F as FOCUS_KEYS}from"./focus-visible-f0cdd043.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{a as ariaBooleanToString}from"./aria-d5877698.js";import{L as ListenToFocus}from"./focus.decorator-8acd79c3.js";import{L as ListenToMutation}from"./mutation.decorator-c7b24839.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";import"./index-82aff103.js";import"./_commonjsHelpers-1c8beb5f.js";import"./listener-04842ae9.js";var radioCheckboxCss='@media (hover: hover)and (pointer: fine){.bal-radio-checkbox.bal-focused .bal-radio-checkbox__input:not(.bal-radio-checkbox__input--select-button)+.bal-radio-checkbox__label::before,.bal-radio-checkbox.bal-focused.bal-radio-checkbox--select-button{-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-radio-checkbox-symbol-size:1.5rem;--bal-radio-checkbox-symbol-width:calc(0.5rem - 1px);--bal-radio-checkbox-symbol-height:calc(0.875rem - 1px);--bal-radio-checkbox-symbol-left:calc(0.5rem + 1px);--bal-radio-checkbox-symbol-margin-top:0.25rem;--bal-radio-checkbox-label-min-height:1.5rem;--bal-radio-checkbox-select-button-background-hover:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-checked:var(--bal-color-primary);--bal-radio-checkbox-select-button-background-checked-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-background-checked-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-background-invalid:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-hover:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-active:var(--bal-color-danger-1);--bal-radio-checkbox-select-button-background-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-background-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-background-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-background-disabled-hover-active:var(--bal-color-grey-2);--bal-radio-checkbox-select-button-background-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-before:var(--bal-color-primary-1);--bal-radio-checkbox-switch-label-background-after:var(--bal-color-primary);--bal-radio-checkbox-switch-label-background-hover-after:var(--bal-color-light-blue-5);--bal-radio-checkbox-switch-label-background-active-after:var(--bal-color-primary-6);--bal-radio-checkbox-switch-label-background-checked-before:var(--bal-color-success-4);--bal-radio-checkbox-switch-label-background-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-checked-hover-before:var(--bal-color-success-5);--bal-radio-checkbox-switch-label-background-checked-active-before:var(--bal-color-success-6);--bal-radio-checkbox-switch-label-background-invalid-before:var(--bal-color-danger-1);--bal-radio-checkbox-switch-label-background-invalid-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-hover-after:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-invalid-active-after:var(--bal-color-border-danger);--bal-radio-checkbox-switch-label-background-invalid-checked-before:var(--bal-color-danger-4);--bal-radio-checkbox-switch-label-background-invalid-checked-after:var(--bal-color-white);--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before:var(--bal-color-danger-5);--bal-radio-checkbox-switch-label-background-invalid-checked-active-before:var(--bal-color-danger-6);--bal-radio-checkbox-switch-label-background-disabled-hover-active-before:var(--bal-color-grey-3);--bal-radio-checkbox-switch-label-background-disabled-hover-active-after:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before:var(--bal-color-border-grey-dark);--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after:var(--bal-color-white);--bal-radio-checkbox-button-background:transparent;--bal-radio-checkbox-button-background-checked-green:var(--bal-color-green-1);--bal-radio-checkbox-button-background-checked-purple:var(--bal-color-purple-1);--bal-radio-checkbox-button-background-checked-red:var(--bal-color-red-1);--bal-radio-checkbox-button-background-checked-yellow:var(--bal-color-yellow-1);--bal-radio-checkbox-button-background-disabled:var(--bal-color-grey-1);--bal-radio-checkbox-button-background-hover:var(--bal-color-grey-1);--bal-radio-checkbox-select-button-border-color:var(--bal-color-primary);--bal-radio-checkbox-select-button-border-color-hover:var(--bal-color-light-blue-5);--bal-radio-checkbox-select-button-border-color-active:var(--bal-color-primary-6);--bal-radio-checkbox-select-button-border-color-invalid:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-invalid-checked:var(--bal-color-border-danger);--bal-radio-checkbox-select-button-border-color-invalid-checked-hover:var(--bal-color-danger-5);--bal-radio-checkbox-select-button-border-color-invalid-checked-active:var(--bal-color-danger-6);--bal-radio-checkbox-select-button-border-color-disabled-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-hover:var(--bal-color-border-primary-hovered);--bal-radio-checkbox-button-border-color-active:var(--bal-color-border-primary-pressed);--bal-radio-checkbox-button-border-color-invalid-hover:var(--bal-color-border-danger-hovered);--bal-radio-checkbox-button-border-color-invalid-active:var(--bal-color-border-danger-pressed);--bal-radio-checkbox-button-border-color:var(--bal-color-border);--bal-radio-checkbox-button-border-color-checked:var(--bal-color-border-primary);--bal-radio-checkbox-button-border-color-disabled:var(--bal-color-border-grey-dark);--bal-radio-checkbox-button-border-color-invalid:var(--bal-color-border-danger)}bal-radio .bal-radio-checkbox__label::before,bal-radio .bal-radio-checkbox__label::after{margin-top:0px !important}.bal-radio-checkbox-group{display:inline-block;position:relative;width:100%}.bal-radio-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-radio-checkbox-group__inner--select-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-radio-checkbox-group__inner--select-button{-ms-flex-direction:row;flex-direction:row}}.bal-radio-checkbox-group__inner--expanded{-ms-flex-align:stretch;align-items:stretch}.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{-ms-flex:1;flex:1}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--expanded .bal-radio-checkbox{width:100%}}.bal-radio-checkbox-group__inner--select-button.bal-radio-checkbox-group__inner--vertical{gap:var(--bal-space-x-small)}.bal-radio-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-radio-checkbox-group__inner--vertical{-ms-flex-align:start;align-items:flex-start}}@media screen and (max-width: 768px){.bal-radio-checkbox-group__inner--vertical-mobile{-ms-flex-direction:column;flex-direction:column;border-radius:var(--bal-radius-normal);gap:0}}.bal-radio-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:1.5rem;min-height:3rem}.bal-radio-checkbox--flat:not(.bal-radio-checkbox--select-button){min-height:1.5rem}.bal-radio-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}.bal-radio-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-radio-checkbox:not(.bal-radio-checkbox--disabled),.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label,.bal-radio-checkbox:not(.bal-radio-checkbox--disabled) input+label>span{cursor:pointer}.bal-radio-checkbox__label{-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;margin:0;line-height:1.5rem;contain:layout style;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-align:left;min-height:var(--bal-radio-checkbox-label-min-height);font-family:var(--bal-font-family-text)}.bal-radio-checkbox__label__text{padding-left:2rem;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox__label__text--hidden{padding-left:0;display:none}.bal-radio-checkbox__label__text--flat{padding-top:0;padding-bottom:0}.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::before,.bal-radio-checkbox__label--flat:not(.bal-radio-checkbox--select-button)::after{top:0px !important}.bal-radio-checkbox__label--hidden::before,.bal-radio-checkbox__label--hidden::after{top:0px !important}.bal-radio-checkbox__label::before,.bal-radio-checkbox__label::after{display:inline-block;position:absolute;left:0;top:.25rem;height:var(--bal-radio-checkbox-symbol-size);width:var(--bal-radio-checkbox-symbol-size);background-color:rgba(0,0,0,0);background-position:center;background-repeat:no-repeat;background-size:var(--bal-radio-checkbox-symbol-size) var(--bal-radio-checkbox-symbol-size)}.bal-radio-checkbox__label::before{content:"";border-style:var(--bal-form-field-control-border-style);border-width:2px}.bal-radio-checkbox__label::after{content:none}.bal-radio-checkbox__label--checked::after{content:""}.bal-radio-checkbox__label--radio::before,.bal-radio-checkbox__label--radio::after{border-radius:50%}.bal-radio-checkbox__label--radio::after{left:0;-webkit-transform:scale(0.25);transform:scale(0.25)}.bal-radio-checkbox__label--checkbox::before{border-radius:var(--bal-form-field-control-radius)}.bal-radio-checkbox__label--checkbox::after{border-top:0;border-right-style:var(--bal-form-field-control-border-style);border-right-width:2px;border-bottom-style:var(--bal-form-field-control-border-style);border-bottom-width:2px;border-left:0;border-radius:1px;width:var(--bal-radio-checkbox-symbol-width);height:var(--bal-radio-checkbox-symbol-height);left:var(--bal-radio-checkbox-symbol-left);margin-top:var(--bal-radio-checkbox-symbol-margin-top);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-primary);background:var(--bal-color-transparent)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-light-blue-5);background:var(--bal-color-grey-2)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-blue-6);background:var(--bal-color-grey-2)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-danger);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-5);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-danger-6);background:var(--bal-color-danger-1)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-border-grey-dark);background:var(--bal-color-grey-2)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-primary)}.bal-radio-checkbox:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-light-blue-5)}.bal-radio-checkbox:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-blue-6)}.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-border-danger)}.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-5)}.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--invalid.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-danger-6)}.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--hovered .bal-radio-checkbox__label .bal-radio-checkbox__label__text,.bal-radio-checkbox--disabled.bal-radio-checkbox--pressed .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-text-grey)}.bal-radio-checkbox--inline{display:inline}.bal-radio-checkbox--select-button{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-radio-checkbox-select-button-border-color)}.bal-radio-checkbox--select-button:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-hover);background:var(--bal-radio-checkbox-select-button-background-hover)}.bal-radio-checkbox--select-button:active{border-color:var(--bal-radio-checkbox-select-button-border-color-active);background:var(--bal-radio-checkbox-select-button-background-active)}.bal-radio-checkbox--select-button label::before{top:unset}.bal-radio-checkbox--select-button label::after{top:unset;margin-top:-3px}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::before{top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat::after{margin-top:-3px;top:unset !important}.bal-radio-checkbox--select-button .bal-radio-checkbox__label--flat .bal-radio-checkbox__label__text--flat{padding-top:.25rem;padding-bottom:.25rem}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked{background:var(--bal-radio-checkbox-select-button-background-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-radio-checkbox-select-button-link-text-color-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover{background:var(--bal-radio-checkbox-select-button-background-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active{background:var(--bal-radio-checkbox-select-button-background-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-primary)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-light-blue-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-blue-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--checked:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text{color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid);background:var(--bal-radio-checkbox-select-button-background-invalid)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-danger-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-active);background:var(--bal-radio-checkbox-select-button-background-invalid-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked);background:var(--bal-radio-checkbox-select-button-background-invalid-checked)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-hover);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-hover)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-invalid-checked-active);background:var(--bal-radio-checkbox-select-button-background-invalid-checked-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-danger)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-5)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-danger-6)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label .bal-radio-checkbox__label__text .is-link{color:var(--bal-form-field-label-disabled-color)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active{border-color:var(--bal-radio-checkbox-select-button-border-color-disabled-checked-hover-active);background:var(--bal-radio-checkbox-select-button-background-disabled-checked-hover-active)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch)::before{border-color:var(--bal-color-white);background:var(--bal-color-transparent)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::after{background:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--radio.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox::after{border-right-color:var(--bal-color-white);border-bottom-color:var(--bal-color-white)}.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before,.bal-radio-checkbox--select-button.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label:not(.bal-radio-checkbox__label--switch).bal-radio-checkbox__label--checkbox.bal-radio-checkbox__label--checked::before{background:var(--bal-color-border-grey-dark)}.bal-radio-checkbox--switch{min-width:2.5rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label{padding-left:1rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{border-radius:1.5rem;position:absolute;display:block;top:0;left:0;width:2.5rem;height:1.5rem;border:1.6px solid rgba(0,0,0,0);content:"";-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;margin-top:.25rem}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{border:none;margin:0;border-radius:50%;display:block;position:absolute;top:.25rem !important;left:.25rem;width:1rem;height:1rem;margin-top:.25rem;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:left .25s ease-out,background .25s ease-out;transition:left .25s ease-out,background .25s ease-out;content:""}.bal-radio-checkbox--switch .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-before)}.bal-radio-checkbox--switch .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-after)}.bal-radio-checkbox--switch:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-hover-after)}.bal-radio-checkbox--switch:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{left:1.25rem;background:var(--bal-radio-checkbox-switch-label-background-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:hover .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-hover-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-hover-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--invalid.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-invalid-checked-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-hover-active-after)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::before,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::before{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-before)}.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:hover .bal-radio-checkbox__label::after,.bal-radio-checkbox--switch.bal-radio-checkbox--disabled.bal-radio-checkbox--checked:active .bal-radio-checkbox__label::after{background:var(--bal-radio-checkbox-switch-label-background-disabled-checked-hover-active-after)}';var BalCheckboxStyle0=radioCheckboxCss;var Checkbox=function(){function a(a){var e=this;registerInstance(this,a);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.balChange=createEvent(this,"balChange",7);this.inputId="bal-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.keyboardMode=true;this.initialValue=false;this.onKeypress=function(a){if(isSpaceKey(a)){var o=a.target;if(o.href){return}if(o.nodeName==="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();a.preventDefault()}else{stopEventBubbling(a)}}};this.onClick=function(a){var o;var c=a.target;if(c.href){return}if(e.wasFocused){e.focused=true}if(c.nodeName!=="INPUT"&&!e.disabled&&!e.readonly){e.toggleChecked();(o=e.nativeInput)===null||o===void 0?void 0:o.focus();a.preventDefault()}else{stopEventBubbling(a)}};this.onFocus=function(a){if(e.disabled||e.readonly){e.focused=false;return stopEventBubbling(a)}e.balFocus.emit(a);if(e.keyboardMode){e.focused=true;e.wasFocused=true}};this.onBlur=function(a){if(e.disabled||e.readonly){return stopEventBubbling(a)}e.balBlur.emit(a);e.focused=false};this.onPointerDown=function(){return e.keyboardMode=false};this.onKeydown=function(a){if(!isSpaceKey(a)){e.wasFocused=false}e.keyboardMode=FOCUS_KEYS.includes(a.key)};this.hasLabel=true;this.focused=false;this.buttonTabindex=undefined;this.ariaForm=defaultBalAriaForm;this.wasFocused=false;this.name=this.inputId;this.label="";this.invisible=false;this.labelHidden=false;this.flat=false;this.inline=false;this.interface="checkbox";this.value="on";this.checked=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}a.prototype.createLogger=function(a){this.log=a};a.prototype.connectedCallback=function(){var a=this;var e=this.group;var o=this.checkboxButton;if(o||e){this.updateState()}if(e){e.addEventListener("balChange",(function(){return a.updateState()}))}this.initialValue=this.checked;this.el.addEventListener("keydown",this.onKeydown);this.el.addEventListener("touchstart",this.onPointerDown);this.el.addEventListener("mousedown",this.onPointerDown)};a.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"])};a.prototype.disconnectedCallback=function(){var a=this;if(this.group){this.group.removeEventListener("balChange",(function(){return a.updateState()}))}this.el.removeEventListener("keydown",this.onKeydown);this.el.removeEventListener("touchstart",this.onPointerDown);this.el.removeEventListener("mousedown",this.onPointerDown)};a.prototype.listenOnClick=function(a){if((this.disabled||this.readonly)&&a.target&&(a.target===this.el||isDescendant(this.el,a.target))){stopEventBubbling(a)}};a.prototype.resetHandler=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){this.checked=this.initialValue}};a.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){inputSetFocus(this);return[2]}))}))};a.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){inputSetBlur(this);return[2]}))}))};a.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};a.prototype.getOption=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){return[2,this.option]}))}))};a.prototype.setButtonTabindex=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.checkboxButton){this.buttonTabindex=-1}else{this.buttonTabindex=a}return[2]}))}))};a.prototype.updateState=function(){return __awaiter(this,void 0,void 0,(function(){var a;return __generator(this,(function(e){if(this.group&&this.group.control&&Array.isArray(this.group.value)){a=this.group.value.includes(this.value);if(a!==this.checked){this.checked=a}}if(this.checkboxButton){this.buttonTabindex=-1;if(this.checkboxButton.setChecked){this.checkboxButton.setChecked(this.checked)}}return[2]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};Object.defineProperty(a.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,invisible:this.invisible,invalid:this.invalid}},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"group",{get:function(){return this.el.closest("bal-checkbox-group")},enumerable:false,configurable:true});Object.defineProperty(a.prototype,"checkboxButton",{get:function(){return this.el.closest("bal-checkbox-button")},enumerable:false,configurable:true});a.prototype.toggleChecked=function(){this.checked=!this.checked;this.balChange.emit(this.checked)};a.prototype.render=function(){var a=this;var e=BEM.block("radio-checkbox");var o=e.element("input");var c=e.element("label");var b=c.element("text");var l=this.focused&&this.buttonTabindex!==-1;var r=this.inheritedAttributes;if(this.buttonTabindex!==undefined){r.tabIndex=this.buttonTabindex}var i=this.ariaForm.controlId||this.inputId;var t=this.ariaForm.labelId||null;var d=this.labelHidden?"span":"label";var k={};if(!this.labelHidden){t="".concat(t||""," ").concat(i,"-lbl").trim();k.id="".concat(i,"-lbl");k.htmlFor=i}return h(Host,{"aria-checked":"".concat(this.checked),"aria-disabled":ariaBooleanToString(this.disabled),"aria-hidden":ariaBooleanToString(this.disabled||this.nonSubmit),"aria-focused":l?"true":null,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({"bal-focused":l},e.class()),e.modifier("checkbox").class()),e.modifier("select-button").class(this.interface==="select-button")),e.modifier("switch").class(this.interface==="switch")),e.modifier("focused").class(this.focused)),e.modifier("invalid").class(this.invalid)),e.modifier("checked").class(this.checked)),e.modifier("invisible").class(this.invisible)),e.modifier("flat").class(this.flat)),e.modifier("disabled").class(this.disabled||this.readonly)),e.modifier("hovered").class(this.hovered)),e.modifier("pressed").class(this.pressed)),e.modifier("inline").class(this.inline)),onKeypress:this.onKeypress,onClick:this.onClick},h("input",Object.assign({class:Object.assign(Object.assign({},o.class()),o.modifier("select-button").class(this.interface==="select-button")),"data-testid":"bal-checkbox-input",type:"checkbox",id:i,"aria-labelledby":t,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":ariaBooleanToString(this.disabled),"aria-checked":"".concat(this.checked),"aria-hidden":ariaBooleanToString(this.nonSubmit),name:this.name,value:this.value,checked:this.checked,disabled:this.disabled||this.nonSubmit,readonly:this.readonly,required:this.required,onFocus:this.onFocus,onBlur:this.onBlur,ref:function(e){return a.nativeInput=e}},r)),!this.invisible?h(d,Object.assign({class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c.class()),c.modifier("checkbox").class()),c.modifier("checked").class(this.checked)),c.modifier("hidden").class(this.labelHidden)),c.modifier("flat").class(this.flat)),c.modifier("switch").class(this.interface==="switch"))},k,{"data-testid":"bal-checkbox-label"}),h("span",{class:Object.assign(Object.assign(Object.assign({},b.class()),b.modifier("hidden").class(this.labelHidden)),b.modifier("flat").class(this.flat)),"data-testid":"bal-checkbox-text"},this.label,h("slot",null))):"")};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return a}();__decorate([Logger("bal-checkbox"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Checkbox.prototype,"createLogger",null);var checkboxIds=0;Checkbox.style=BalCheckboxStyle0;var CheckboxGroup=function(){function a(a){var e=this;registerInstance(this,a);this.balChange=createEvent(this,"balChange",7);this.balFocus=createEvent(this,"balFocus",7);this.balBlur=createEvent(this,"balBlur",7);this.inputId="bal-cg-".concat(checkboxGroupIds++);this.inheritedAttributes={};this.hasFocus=false;this.mutationObserverActive=true;this.onClick=function(a){if(!e.control){return}var o=a.target;if(o.href){return}a.preventDefault();var c=a.target&&a.target.closest("bal-checkbox");if(c){if(c.disabled||c.readonly){return a.stopPropagation()}}var b=[];e.getCheckboxes().forEach((function(a){if(a.checked){b.push(a.value)}}));if(!areArraysEqual(e.value,b)){e.value=__spreadArray([],b,true);e.balChange.emit(e.value)}};this.onOptionChange=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(a){this.sync();return[2]}))}))};this.ariaForm=defaultBalAriaForm;this.options=undefined;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}a.prototype.createLogger=function(a){this.log=a};a.prototype.optionChanged=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(a){if(this.control){this.onOptionChange();this.mutationObserverActive=this.options===undefined}return[2]}))}))};a.prototype.invalidChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.invalid=a}));this.getCheckboxButtons().forEach((function(e){e.invalid=a}))}}};a.prototype.disabledChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.disabled=a}));this.getCheckboxButtons().forEach((function(e){e.disabled=a}))}}};a.prototype.readonlyChanged=function(a){if(this.control){if(a!==undefined){this.getCheckboxes().forEach((function(e){e.readonly=a}));this.getCheckboxButtons().forEach((function(e){e.readonly=a}))}}};a.prototype.valueChanged=function(a,e){if(this.control){if(!areArraysEqual(this.value,e)){this.onOptionChange()}}else{this.onOptionChange()}};a.prototype.columnsChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSize=a}))};a.prototype.columnsTabletChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSizeTablet=a}))};a.prototype.columnsMobileChanged=function(a){this.getCheckboxButtons().forEach((function(e){return e.colSizeMobile=a}))};a.prototype.connectedCallback=function(){if(this.control){this.mutationObserverActive=this.options===undefined}};a.prototype.componentWillLoad=function(){if(this.control){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.disabledChanged(this.disabled);this.readonlyChanged(this.readonly)}this.columnsChanged(this.columns);this.columnsTabletChanged(this.columnsTablet);this.columnsMobileChanged(this.columnsMobile);this.onOptionChange()};a.prototype.focusInListener=function(a){this.balFocus.emit(a)};a.prototype.focusOutListener=function(a){this.balBlur.emit(a)};a.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()};a.prototype.listenOnClick=function(a){if(this.control){if(isDescendant(this.el,a.target)){stopEventBubbling(a)}}};a.prototype.resetHandler=function(a){var e=a.target;if(e===null||e===void 0?void 0:e.contains(this.el)){if(this.control){this.value=[]}this.onOptionChange()}};a.prototype.checkboxFocusListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-checkbox")){stopEventBubbling(a)}};a.prototype.checkboxBlurListener=function(a){var e=a.target;if(e&&isDescendant(this.el,e)&&hasTagName(e,"bal-checkbox")){stopEventBubbling(a)}};a.prototype.setValue=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.control){this.value=a}return[2]}))}))};a.prototype.getOptionByValue=function(a){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=this.options;if(e){return[2,e.find((function(e){return e.value===a}))]}return[2,undefined]}))}))};a.prototype.setAriaForm=function(a){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},a);return[2]}))}))};a.prototype.sync=function(){var a=this;if(this.control){var e=function(e){for(var o=0;o<a.value.length;o++){var c=a.value[o];if(c!==undefined&&c.toString()===e.value.toString()){return true}}return false};this.getCheckboxes().forEach((function(a){a.checked=e(a)}))}this.getCheckboxes().forEach((function(e){if(a.interface){e.interface=a.interface}}))};a.prototype.getCheckboxes=function(){return Array.from(this.el.querySelectorAll("bal-checkbox"))};a.prototype.getCheckboxButtons=function(){return Array.from(this.el.querySelectorAll("bal-checkbox-button"))};a.prototype.render=function(){var a=BEM.block("radio-checkbox-group");var e=a.element("inner");var o=this.options||[];var c=o.map((function(a){if(typeof a.html==="function"){return Object.assign(Object.assign({},a),{html:a.html()})}return a}));return h(Host,Object.assign({class:Object.assign({},a.class()),role:"group","aria-disabled":this.disabled?"true":null,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,onClick:this.onClick},this.inheritedAttributes),h("div",{class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e.class()),e.modifier("vertical-mobile").class(this.verticalOnMobile)),e.modifier("vertical").class(this.vertical)),e.modifier("expanded").class(this.expanded)),e.modifier("select-button").class(this.interface==="select-button"))},h("slot",null),c.map((function(a){return h("bal-checkbox",{key:a.value,name:a.name,value:a.value,labelHidden:a.labelHidden,flat:a.flat,interface:a.interface,disabled:a.disabled,readonly:a.readonly,required:a.required,nonSubmit:!!a.nonSubmit,invalid:a.invalid,innerHTML:a.html})}))))};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"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 a}();__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",[FocusEvent]),__metadata("design:returntype",void 0)],CheckboxGroup.prototype,"focusInListener",null);__decorate([ListenToFocus(),__metadata("design:type",Function),__metadata("design:paramtypes",[FocusEvent]),__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;export{Checkbox as bal_checkbox,CheckboxGroup as bal_checkbox_group};
@@ -1 +1 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{i as i18nBalClose}from"./bal-close.i18n-f2daa707.js";import{d as defaultConfig}from"./config.default-7efdc82d.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import"./log-dfd1c19f.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";var balCloseCss="@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active),.bal-close__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-close-background:transparent;--bal-close-background-focus-visible:var(--bal-form-field-control-background);--bal-close-background-focus-inverted-focus-visible:var(--bal-form-field-control-background);--bal-close-border-radius:var(--bal-radius-rounded)}.bal-close{position:static;display:inline-block}.bal-close__button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-moz-appearance:none;-webkit-appearance:none;background-color:var(--bal-close-background);border:none;border-radius:var(--bal-close-border-radius);cursor:pointer;pointer-events:auto;display:inline-block;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;font-size:0;outline:none;position:relative;vertical-align:top;padding:.313rem}@media (hover: hover)and (pointer: fine){.bal-close__button:hover{background:rgba(0,7,57,.1)}}@media (hover: hover)and (pointer: fine){.bal-close__button:focus-visible:not(:active){background:var(--bal-close-background-focus-visible)}}.bal-close__button:active{background:rgba(0,7,57,.3)}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:hover{background:rgba(255,255,255,.3)}}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active){background:var(--bal-close-background-focus-inverted-focus-visible)}}.bal-close__button--inverted:active{background:rgba(255,255,255,.5)}.bal-close__button--size-small{padding:.25rem}.bal-close__button--size-medium{padding:.531rem}";var BalCloseStyle0=balCloseCss;var Close=function(){function e(e){registerInstance(this,e);this.inheritedAttributes={};this.language=defaultConfig.language;this.region=defaultConfig.region;this.size="";this.inverted=false}e.prototype.componentWillRender=function(){this.inheritedAttributes=inheritAttributes(this.el,["tabindex"])};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;return[2]}))}))};e.prototype.render=function(){var e=BEM.block("close");var o=e.element("button");var t=o.element("icon");var a=i18nBalClose[this.language].close;return h(Host,{class:Object.assign({},e.class())},h("button",Object.assign({type:"button","aria-label":a,title:a,tabindex:-1,class:Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("inverted").class(this.inverted)),o.modifier("size-".concat(this.size)).class(this.size!=="")),"data-testid":"bal-close"},this.inheritedAttributes),h("bal-icon",{name:"close",size:this.size==="small"?"x-small":this.size==="medium"?"medium":"small",inverted:this.inverted,class:Object.assign({},t.class())})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Close.prototype,"configChanged",null);Close.style=BalCloseStyle0;export{Close as bal_close};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{i as i18nBalClose}from"./bal-close.i18n-f2daa707.js";import{d as defaultConfig}from"./config.default-7efdc82d.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import"./log-dfd1c19f.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./config.utils-6ac6c9bd.js";var balCloseCss="@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active),.bal-close__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-close-background:transparent;--bal-close-background-focus-visible:var(--bal-form-field-control-background);--bal-close-background-focus-inverted-focus-visible:var(--bal-form-field-control-background);--bal-close-border-radius:var(--bal-radius-rounded)}.bal-close{position:static;display:inline-block}.bal-close__button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-moz-appearance:none;-webkit-appearance:none;background-color:var(--bal-close-background);border:none;border-radius:var(--bal-close-border-radius);cursor:pointer;pointer-events:auto;display:inline-block;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;font-size:0;outline:none;position:relative;vertical-align:top;padding:.313rem}@media (hover: hover)and (pointer: fine){.bal-close__button:hover{background:rgba(0,7,57,.1)}}@media (hover: hover)and (pointer: fine){.bal-close__button:focus-visible:not(:active){background:var(--bal-close-background-focus-visible)}}.bal-close__button:active{background:rgba(0,7,57,.3)}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:hover{background:rgba(255,255,255,.3)}}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active){background:var(--bal-close-background-focus-inverted-focus-visible)}}.bal-close__button--inverted:active{background:rgba(255,255,255,.5)}.bal-close__button--size-small{padding:.25rem}.bal-close__button--size-medium{padding:.531rem}";var BalCloseStyle0=balCloseCss;var Close=function(){function e(e){registerInstance(this,e);this.language=defaultConfig.language;this.region=defaultConfig.region;this.size="";this.inverted=false}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;return[2]}))}))};e.prototype.render=function(){var e=BEM.block("close");var o=e.element("button");var t=o.element("icon");var a=i18nBalClose[this.language].close;return h(Host,{class:Object.assign({},e.class())},h("button",{type:"button","aria-label":a,title:a,tabindex:"0",class:Object.assign(Object.assign(Object.assign({},o.class()),o.modifier("inverted").class(this.inverted)),o.modifier("size-".concat(this.size)).class(this.size!=="")),"data-testid":"bal-close"},h("bal-icon",{name:"close",size:this.size==="small"?"x-small":this.size==="medium"?"medium":"small",inverted:this.inverted,class:Object.assign({},t.class())})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Close.prototype,"configChanged",null);Close.style=BalCloseStyle0;export{Close as bal_close};
@@ -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-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{k as rIC,m as debounceEvent}from"./helpers-c201154e.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{r as requiredArgs,t as toDate,b as toInteger,g as getDefaultOptions,p as parse,f as formatDateString,i as isValidIsoString,c as format,e as isSpaceKey,h as isEnterKey,d as dateSeparator,j as getYear,n as now,k as getMonth,m as getDate}from"./index.esm-83b1f9c4.js";import{l as lodash_isnil}from"./index-82aff103.js";import{N as NUMBER_KEYS,A as ACTION_KEYS,i as isCtrlOrCommandKey}from"./keys.constant-0eb059e0.js";import{i as i18nBalDatepicker}from"./bal-datepicker.i18n-63a3cb67.js";import{s as stopEventBubbling,g as getInputTarget,i as inputHandleFocus,a as inputHandleHostClick,b as inputListenOnClick,c as inputSetFocus,d as inputSetBlur}from"./form-input-28a08ec5.js";import{p as preventDefault}from"./utils-9fbab1d3.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{L as Logger}from"./log-dfd1c19f.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{d as defaultConfig,a as defaultLocale}from"./config.default-7efdc82d.js";import{b as balBreakpoints}from"./breakpoints.subject-9ea7074e.js";import{g as useBalConfig}from"./config.utils-6ac6c9bd.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-f979fe5c.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./_commonjsHelpers-1c8beb5f.js";import"./device-8c6d2881.js";import"./listener-04842ae9.js";import"./tokens.esm-7d2734e1.js";function addDays(t,e){requiredArgs(2,arguments);var i=toDate(t);var r=toInteger(e);if(isNaN(r)){return new Date(NaN)}if(!r){return i}i.setDate(i.getDate()+r);return i}function addMonths(t,e){requiredArgs(2,arguments);var i=toDate(t);var r=toInteger(e);if(isNaN(r)){return new Date(NaN)}if(!r){return i}var a=i.getDate();var n=new Date(i.getTime());n.setMonth(i.getMonth()+r+1,0);var s=n.getDate();if(a>=s){return n}else{i.setFullYear(n.getFullYear(),n.getMonth(),a);return i}}function startOfWeek(t,e){var i,r,a,n,s,o,l,d;requiredArgs(1,arguments);var c=getDefaultOptions();var u=toInteger((i=(r=(a=(n=e===null||e===void 0?void 0:e.weekStartsOn)!==null&&n!==void 0?n:e===null||e===void 0?void 0:(s=e.locale)===null||s===void 0?void 0:(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&r!==void 0?r:(l=c.locale)===null||l===void 0?void 0:(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:0);if(!(u>=0&&u<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var h=toDate(t);var f=h.getDay();var p=(f<u?7:0)+f-u;h.setDate(h.getDate()-p);h.setHours(0,0,0,0);return h}function startOfDay(t){requiredArgs(1,arguments);var e=toDate(t);e.setHours(0,0,0,0);return e}function addYears(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addMonths(t,i*12)}function isSameDay(t,e){requiredArgs(2,arguments);var i=startOfDay(t);var r=startOfDay(e);return i.getTime()===r.getTime()}function lastDayOfMonth(t){requiredArgs(1,arguments);var e=toDate(t);var i=e.getMonth();e.setFullYear(e.getFullYear(),i+1,0);e.setHours(0,0,0,0);return e}function isAfter(t,e){requiredArgs(2,arguments);var i=toDate(t);var r=toDate(e);return i.getTime()>r.getTime()}function isBefore(t,e){requiredArgs(2,arguments);var i=toDate(t);var r=toDate(e);return i.getTime()<r.getTime()}function isSameWeek(t,e,i){requiredArgs(2,arguments);var r=startOfWeek(t,i);var a=startOfWeek(e,i);return r.getTime()===a.getTime()}function isSameMonth(t,e){requiredArgs(2,arguments);var i=toDate(t);var r=toDate(e);return i.getFullYear()===r.getFullYear()&&i.getMonth()===r.getMonth()}function isWithinInterval(t,e){requiredArgs(2,arguments);var i=toDate(t).getTime();var r=toDate(e.start).getTime();var a=toDate(e.end).getTime();if(!(r<=a)){throw new RangeError("Invalid interval")}return i>=r&&i<=a}function subDays(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addDays(t,-i)}function subYears(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addYears(t,-i)}var balDatepickerCss=':root{--bal-datepicker-popover-background:var(--bal-color-grey-2);--bal-datepicker-cell-background:var(--bal-color-white);--bal-datepicker-cell-selected-background:var(--bal-color-primary);--bal-datepicker-cell-selected-today-background:var(--bal-color-white);--bal-datepicker-cell-today-background:var(--bal-color-primary);--bal-datepicker-cell-today-radius:var(--bal-radius-rounded)}.bal-datepicker{display:block;font-family:var(--bal-font-family-text);width:100%}.bal-datepicker__native{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-datepicker__popup{padding:1rem;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:var(--bal-datepicker-popover-background)}@media screen and (min-width: 769px),print{.bal-datepicker__popup{max-width:24.5rem}}.bal-datepicker__popup__body{max-width:22.5rem;margin:0 auto 0 auto;margin-top:.75rem}.bal-datepicker-pagination{max-width:22.5rem;margin:0 auto 0 auto}.bal-datepicker-pagination__inner{display:-ms-flexbox;display:flex;gap:.5rem}.bal-datepicker-pagination__month-and-year{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;gap:.5rem}.bal-datepicker-pagination__month-and-year__select{-ms-flex:1;flex:1}.bal-datepicker-pagination__month-and-year__select .select,.bal-datepicker-pagination__month-and-year__select .select select{padding-top:0 !important;padding-bottom:0 !important;text-align:center !important;min-height:2rem !important;height:2rem !important}@media screen and (min-width: 769px),print{.bal-datepicker-pagination__month-and-year__select .select,.bal-datepicker-pagination__month-and-year__select .select select{min-height:3rem !important;height:3rem !important}}.bal-datepicker-grid{display:table;border-collapse:collapse;width:100%;table-layout:fixed}.bal-datepicker-grid__body{display:table-row-group}.bal-datepicker-grid__row{display:table-row}.bal-datepicker-grid__row .bal-datepicker-grid__cell{margin-bottom:.25rem;margin-right:.25rem}.bal-datepicker-grid__row:last-child .bal-datepicker-grid__cell{margin-bottom:0}.bal-datepicker-grid__header{display:-ms-flexbox;display:flex;max-width:22.5rem;margin:0 auto 0 auto;gap:.25rem}.bal-datepicker-grid__header .bal-datepicker-grid__cell{background:rgba(0,0,0,0)}.bal-datepicker-grid__header .bal-datepicker-grid__cell span{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;width:100%}.bal-datepicker-grid__cell{position:relative;text-align:center;vertical-align:middle;display:table-cell;width:13%;padding:0 !important;height:3rem;min-height:3rem;min-width:2.25rem;-webkit-appearance:auto !important;-moz-appearance:auto !important;appearance:auto !important;background:var(--bal-datepicker-cell-background)}.bal-datepicker-grid__cell--selected{background:var(--bal-datepicker-cell-selected-background) !important}.bal-datepicker-grid__cell--today:not(.bal-datepicker-grid__cell--outdated)>span{font-weight:var(--bal-font-weight-bold)}.bal-datepicker-grid__cell--today:not(.bal-datepicker-grid__cell--outdated)::after{content:"";position:absolute;display:block;width:.25rem;height:.25rem;background:var(--bal-datepicker-cell-today-background);border-radius:var(--bal-datepicker-cell-today-radius);margin-left:-2px;left:50%;bottom:.375rem}.bal-datepicker-grid__cell--today.bal-datepicker-grid__cell--selected:not(.bal-datepicker-grid__cell--outdated)::after{background:var(--bal-datepicker-cell-selected-today-background)}.bal-datepicker-grid__cell:last-child{margin-right:0}.bal-datepicker-grid__cell>span{font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular)}@media screen and (min-width: 769px),print{.bal-datepicker-grid__cell{min-width:3rem !important}}.bal-datepicker-grid__cell--disabled{border-color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important}.bal-datepicker-grid__cell--header>span{border:none;background:rgba(0,0,0,0);color:var(--bal-color-text-primary);font-weight:var(--bal-font-weight-bold);cursor:default}';var BalDatepickerStyle0=balDatepickerCss;var Datepicker=function(){function t(t){var e=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.balInput=createEvent(this,"balInput",7);this.balBlur=createEvent(this,"balBlur",7);this.balFocus=createEvent(this,"balFocus",7);this.balInputClick=createEvent(this,"balInputClick",7);this.balIconClick=createEvent(this,"balIconClick",7);this.inputId="bal-dp-".concat(datepickerIds++);this.inheritedAttributes={};this.inputValue=this.value;this.onIconClick=function(t){if(!e.disabled&&!e.readonly){e.popoverElement.toggle()}stopEventBubbling(t);e.balIconClick.emit(t)};this.onInputClick=function(t){if(!e.triggerIcon&&!e.disabled&&!e.readonly){e.popoverElement.toggle()}stopEventBubbling(t);if(!e.triggerIcon){e.balInputClick.emit(t)}};this.onPopoverChange=function(t){stopEventBubbling(t);if(e.isPopoverOpen!==t.detail){e.isPopoverOpen=t.detail;e.fireBlur(t)}};this.onInput=function(t){var i=getInputTarget(t);if(i){e.inputValue=i.value;if(i.value){e.nativeInput.value=e.formatDate(e.inputValue)}if(e.inputValue&&e.inputValue.length>=6){var r=parse(e.inputValue,e.getLocale());var a=formatDateString(r);if(isValidIsoString(a)){e.selectedDate=a;e.updatePointerDates()}}}e.balInput.emit(e.inputValue)};this.onInputChange=function(t){var i=t.target.value;var r=parse(i,e.getLocale());var a=formatDateString(r);var n=format(e.getLocale(),r);e.nativeInput.value=n;e.updateValue(a);e.updatePointerDates()};this.onClickDateCell=function(t){if(!t.isDisabled){e.select(t.dateString)}};this.onInputKeyUp=function(t){if(isSpaceKey(t)&&!e.triggerIcon){if(e.isPopoverOpen){e.close()}else{e.open()}}if(isEnterKey(t)&&!e.triggerIcon){var i=parse(e.nativeInput.value,e.getLocale());var r=formatDateString(i);if(e.isPopoverOpen){if(e.value===r){e.close()}}}};this.onInputKeyDown=function(t){var i=dateSeparator(e.getLocale());var r=__spreadArray(__spreadArray(__spreadArray([],NUMBER_KEYS,true),[i],false),ACTION_KEYS,true);if(!isCtrlOrCommandKey(t)&&r.indexOf(t.key)<0){t.preventDefault();t.stopPropagation()}if(t.key==="Tab"){e.close()}};this.onMonthSelect=function(t){var i=t.target.value;e.pointerDate=Object.assign(Object.assign({},e.pointerDate),{day:1,month:parseInt(i,10)})};this.onYearSelect=function(t){var i=t.target.value;var r=parseInt(i,10);var a=undefined;if(e.defaultDate){var n=parse(e.defaultDate);if(e.max){var s=parse(e.max);if(n.getMonth()>s.getMonth()){a=s.getMonth()}}if(e.min){var o=parse(e.min);if(n.getMonth()<o.getMonth()){a=o.getMonth()}}}e.pointerDate={day:1,year:r,month:a!==undefined?a:e.pointerDate.month}};this.onInputFocus=function(t){return inputHandleFocus(e,t)};this.onInputBlur=function(t){preventDefault(t);e.focused=false;e.fireBlur(t)};this.fireBlur=function(t){if(!e.isPopoverOpen&&!e.focused){rIC((function(){return e.balBlur.emit(t)}))}};this.handleClick=function(t){return inputHandleHostClick(e,t)};this.language=defaultConfig.language;this.region=defaultConfig.region;this.isMobile=balBreakpoints.isMobile;this.focused=false;this.isPopoverOpen=false;this.selectedDate="";this.pointerDate={year:getYear(now()),month:getMonth(now()),day:getDate(now())};this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.loading=false;this.placeholder=undefined;this.min=undefined;this.max=undefined;this.closeOnSelect=true;this.triggerIcon=false;this.minYearProp=undefined;this.maxYearProp=undefined;this.debounce=0;this.defaultDate=undefined;this.value=undefined;this.allowedDates=undefined;this.autoInvalidOff=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.debounceChanged=function(){this.balChange=debounceEvent(this.balChange,this.debounce)};t.prototype.valueChanged=function(){this.selectedDate=this.value;this.updatePointerDates()};t.prototype.listenOnClick=function(t){inputListenOnClick(this,t)};t.prototype.resetHandler=function(t){var e=this;var i=t.target;if(i===null||i===void 0?void 0:i.contains(this.el)){if(this.resetHandlerTimer){clearTimeout(this.resetHandlerTimer)}this.resetHandlerTimer=setTimeout((function(){if(e.initialValue){e.nativeInput.value=format(e.getLocale(),parse(e.initialValue))}else{e.nativeInput.value=""}e.selectedDate=e.initialValue;e.updateValue(e.initialValue,false);e.updatePointerDates()}),0)}};t.prototype.breakpointListener=function(t){this.isMobile=t.mobile};t.prototype.connectedCallback=function(){this.debounceChanged();this.initialValue=this.value};t.prototype.componentDidLoad=function(){this.inputValue=this.value};t.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.selectedDate=this.value;this.updatePointerDates();this.updateValue(this.value,false)};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;this.region=t.region;return[2]}))}))};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&this.popoverElement){this.popoverElement.present()}return[2]}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&this.popoverElement){this.popoverElement.dismiss()}return[2]}))}))};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:this.nativeInput.value=format(this.getLocale(),parse(t));this.updateValue(t);this.updatePointerDates();if(!this.closeOnSelect)return[3,2];return[4,(e=this.popoverElement)===null||e===void 0?void 0:e.toggle()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){inputSetFocus(this);return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){inputSetBlur(this);return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},t);return[2]}))}))};t.prototype.updatePointerDates=function(){var t=now();t.setDate(1);if(this.selectedDate){t=parse(this.selectedDate)}else{if(this.defaultDate){t=parse(this.defaultDate)}}if(this.min){var e=parse(this.min);if(e&&t<e){t=e}}if(this.max){var i=parse(this.max);if(i&&t>i){t=i}}this.pointerDate={year:getYear(t),month:getMonth(t),day:getDate(t)}};t.prototype.updateValue=function(t,e){if(e===void 0){e=true}if(!isValidIsoString(t)){this.selectedDate=undefined;this.value=undefined;if(this.nativeInput){this.nativeInput.value=""}}if(this.value!==t){this.value=t;if(e&&(this.isDateInRange(parse(this.value))||this.value==="")){this.balChange.emit(this.value)}}};Object.defineProperty(t.prototype,"minYear",{get:function(){if(this.min){return parseInt(this.min.substring(0,4),10)}return this.minYearProp?this.minYearProp:getYear(subYears(now(),100))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxYear",{get:function(){if(this.max){return parseInt(this.max.substring(0,4),10)}return this.maxYearProp?this.maxYearProp:getYear(addYears(now(),100))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"years",{get:function(){var t=this;var e=Array.from({length:this.maxYear-this.minYear+1},(function(e,i){return t.minYear+i}));if(this.min&&this.pointerDate.month===getMonth(parse(this.min))){var i=getYear(parse(this.min));e=e.filter((function(t){return t>=i}))}if(this.max&&this.pointerDate.month===getMonth(parse(this.max))){var r=getYear(parse(this.max));e=e.filter((function(t){return t<=r}))}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"months",{get:function(){var t=i18nBalDatepicker[this.language].monthsShort;var e=t.map((function(t,e){return{name:t,index:e}}));if(this.min&&this.pointerDate.year===getYear(parse(this.min))){var i=parseInt(this.min.substring(5,7),10)-1;e=e.filter((function(t){return t.index>=i}))}if(this.max&&this.pointerDate.year===getYear(parse(this.max))){var r=parseInt(this.max.substring(5,7),10)-1;e=e.filter((function(t){return t.index<=r}))}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"weekDays",{get:function(){var t=__spreadArray([],i18nBalDatepicker[this.language].weekdaysMin,true);t.push(t.shift()||"");return t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"firstDateOfBox",{get:function(){var t=new Date(this.pointerDate.year,this.pointerDate.month,1);return startOfWeek(t,{weekStartsOn:1})},enumerable:false,configurable:true});t.prototype.getLocale=function(){var t=useBalConfig();return t&&t.locale||defaultLocale};Object.defineProperty(t.prototype,"calendarGrid",{get:function(){var t=this.firstDateOfBox;var e=this.firstDateOfBox;var i=[];do{var r=[];do{r=__spreadArray(__spreadArray([],r,true),[{date:new Date(e),display:format(this.getLocale(),e),dateString:formatDateString(e),label:getDate(e).toString(),isToday:isSameDay(e,now()),isSelected:parse(this.selectedDate)!==undefined&&isSameDay(e,parse(this.selectedDate)),isDisabled:!this.getAllowedDates(e)||!this.isDateInRange(e),isOutdated:this.pointerDate.month!==e.getMonth()||!this.isDateInRange(e)}],false);e.setDate(e.getDate()+1)}while(isSameWeek(e,t,{weekStartsOn:1}));i=__spreadArray(__spreadArray([],i,true),[r],false);t.setDate(t.getDate()+7)}while(isSameMonth(new Date(this.pointerDate.year,this.pointerDate.month,this.pointerDate.day),e));return i},enumerable:false,configurable:true});t.prototype.getAllowedDates=function(t){if(lodash_isnil(this.allowedDates)){return true}return this.allowedDates(formatDateString(t))};t.prototype.formatDate=function(t){var e=dateSeparator(this.getLocale());var i=t.length;var r=t.charAt(i-1);var a=t.charAt(i-2);if(r===e){if(i===1||a===e||t.split(e).filter((function(t){return t.length>0})).length>=3){return t.substring(0,i-1)}}if(i===5){if(t.split(e)[0].split("").length===1&&a!==e&&r!==e){return t.substring(0,i-1)+e+t.substring(i-1,i)}}if(i===3||i===6){if(r!==e&&a!==e&&t.split(e).length<=2){return t.substring(0,i-1)+e+t.substring(i-1,i)}}return t};t.prototype.render=function(){var t=this;var e=BEM.block("datepicker");var i=e.element("native");var r=e.element("popup");var a=r.element("body");var n=r.element("footer");return h(Host,{onClick:this.handleClick,"aria-disabled":this.disabled?"true":null,class:Object.assign(Object.assign({},e.class()),e.modifier("disabled").class(this.disabled||this.readonly))},h("input",{type:"date",class:Object.assign({},i.class()),name:this.name,min:this.min,max:this.max,value:this.value,tabindex:-1,"aria-hidden":"true"}),h("bal-popover",{onBalChange:this.onPopoverChange,ref:function(e){return t.popoverElement=e}},this.renderInput(),h("bal-popover-content",{spaceless:true,contentMinWidth:392},h("div",{class:Object.assign({},r.class())},this.renderHeader(),h("div",{class:Object.assign({},a.class())},this.renderGrid()),h("div",{class:Object.assign({},n.class())},h("slot",null))))))};t.prototype.renderInput=function(){var t=this;return h("div",{"bal-popover-trigger":true,class:"control"},h("bal-input-group",{disabled:this.disabled||this.readonly,invalid:this.invalid},h("input",Object.assign({class:{input:true,"data-test-input":true,"is-clickable":!this.disabled&&!this.triggerIcon&&!this.readonly,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid},"data-testid":"bal-datepicker-input",ref:function(e){return t.nativeInput=e},id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,type:"text",maxlength:"10",autoComplete:"off",value:format(this.getLocale(),parse(this.value||"")),required:this.required,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,onKeyDown:function(e){return t.onInputKeyDown(e)},onKeyUp:function(e){return t.onInputKeyUp(e)},onInput:this.onInput,onClick:this.onInputClick,onChange:this.onInputChange,onBlur:this.onInputBlur,onFocus:this.onInputFocus},this.inheritedAttributes)),!this.loading?h("bal-icon",{class:{"datepicker-trigger-icon":true,"is-clickable":!this.disabled&&!this.readonly},"is-right":true,color:this.disabled||this.readonly?"grey":this.invalid?"danger":"primary",name:"date",onClick:this.onIconClick}):""))};t.prototype.renderGrid=function(){var t=this;var e=BEM.block("datepicker-grid");var i=e.element("row");var r=e.element("cell");return h("div",null,this.renderWeekDayHeader(),h("div",{class:Object.assign({},e.class())},this.calendarGrid.map((function(e,a){return h("div",{key:a,class:Object.assign({},i.class())},e.map((function(e){return h("button",{key:e.dateString,type:"button","data-date":e.dateString,onClick:function(){return t.onClickDateCell(e)},disabled:e.isDisabled,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r.class()),{button:true,"is-text":!e.isDisabled&&!e.isSelected,"is-primary":e.isSelected&&e.isSelected,"is-disabled":e.isDisabled||e.isOutdated}),r.modifier("today").class(e.isToday)),r.modifier("selectable").class(!e.isDisabled&&!e.isOutdated)),r.modifier("disabled").class(e.isDisabled||e.isOutdated)),r.modifier("outdated").class(e.isOutdated)),r.modifier("selected").class(e.isSelected))},h("span",null,e.label))})))}))))};t.prototype.renderWeekDayHeader=function(){var t=BEM.block("datepicker-grid");var e=t.element("header");var i=t.element("cell");return h("header",{class:Object.assign({},e.class())},this.weekDays.map((function(t){return h("div",{key:t,class:Object.assign(Object.assign({},i.class()),i.modifier("header").class())},h("span",null,t))})))};t.prototype.renderHeader=function(){var t=this;var e=BEM.block("datepicker-pagination");var i=e.element("inner");var r=e.element("month-and-year");var a=r.element("select");return h("header",{class:Object.assign({},e.class())},h("div",{class:Object.assign({},i.class())},h("bal-button",{square:true,size:this.isMobile?"small":"",color:"info",icon:"nav-go-left",disabled:this.isPreviousMonthDisabled,onClick:function(){return t.previousMonth()}}),h("div",{class:Object.assign({},r.class())},h("div",{class:Object.assign(Object.assign({},a.class()),a.modifier("month").class())},h("div",{class:"select"},h("select",{onInput:this.onMonthSelect},this.months.map((function(e){return h("option",{key:e.index,value:e.index,selected:t.pointerDate.month===e.index},e.name)}))))),h("div",{class:Object.assign(Object.assign({},a.class()),a.modifier("year").class())},h("div",{class:"select"},h("select",{onInput:this.onYearSelect},this.years.map((function(e){return h("option",{key:e,value:e,selected:t.pointerDate.year===e},e)})))))),h("bal-button",{square:true,size:this.isMobile?"small":"",color:"info",icon:"nav-go-right",disabled:this.isNextMonthDisabled,onClick:function(){return t.nextMonth()}})))};t.prototype.previousMonth=function(){if(!this.isPreviousMonthDisabled){if(this.pointerDate.year===this.minYear&&this.pointerDate.month===0){return}this.pointerDate=this.calcPreviousMonth()}};t.prototype.nextMonth=function(){if(!this.isNextMonthDisabled){if(this.pointerDate.year===this.maxYear&&this.pointerDate.month===11){return}this.pointerDate=this.calcNextMonth()}};t.prototype.calcPreviousMonth=function(){if(this.pointerDate.month===0){return Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year-1,month:11,day:1})}else{return Object.assign(Object.assign({},this.pointerDate),{month:this.pointerDate.month-1,day:1})}};t.prototype.calcNextMonth=function(){if(this.pointerDate.month===11){return Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year+1,month:0,day:1})}else{return Object.assign(Object.assign({},this.pointerDate),{month:this.pointerDate.month+1,day:1})}};t.prototype.lastDayOfMonth=function(t,e){var i=new Date(t,e+1,0);return getDate(i)};Object.defineProperty(t.prototype,"isPreviousMonthDisabled",{get:function(){if(this.min){var t=parse(this.min);var e=this.lastDayOfMonth(this.calcPreviousMonth().year,this.calcPreviousMonth().month);var i=new Date(this.calcPreviousMonth().year,this.calcPreviousMonth().month,e);return isBefore(i,subDays(t,1))}return false},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isNextMonthDisabled",{get:function(){if(this.max){var t=parse(this.max);var e=new Date(this.calcNextMonth().year,this.calcNextMonth().month,1);return isAfter(e,lastDayOfMonth(t)?t:addDays(t,1))}return false},enumerable:false,configurable:true});t.prototype.isDateInRange=function(t){var e=parse(formatDateString(t));if(this.min&&this.max&&this.max>this.min){return isWithinInterval(e,{start:parse(this.min),end:parse(this.max)})}if(this.min){return isAfter(e,parse(this.min))||isSameDay(e,parse(this.min))}if(this.max){return isBefore(e,addDays(parse(this.max),1))||isSameDay(e,parse(this.max))}return true};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return t}();__decorate([Logger("bal-datepicker"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Datepicker.prototype,"createLogger",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Datepicker.prototype,"breakpointListener",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Datepicker.prototype,"configChanged",null);var datepickerIds=0;Datepicker.style=BalDatepickerStyle0;export{Datepicker as bal_datepicker};
1
+ import{__awaiter,__generator,__spreadArray}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b6003bc7.js";import{_ as __decorate,a as __metadata}from"./tslib.es6-654e2c24.js";import{k as rIC,m as debounceEvent}from"./helpers-c201154e.js";import{i as inheritAttributes}from"./attributes-4fa7040f.js";import{r as requiredArgs,t as toDate,b as toInteger,g as getDefaultOptions,p as parse,f as formatDateString,i as isValidIsoString,c as format,e as isSpaceKey,h as isEnterKey,d as dateSeparator,j as getYear,n as now,k as getMonth,m as getDate}from"./index.esm-83b1f9c4.js";import{l as lodash_isnil}from"./index-82aff103.js";import{N as NUMBER_KEYS,A as ACTION_KEYS,i as isCtrlOrCommandKey}from"./keys.constant-0eb059e0.js";import{i as i18nBalDatepicker}from"./bal-datepicker.i18n-63a3cb67.js";import{s as stopEventBubbling,g as getInputTarget,i as inputHandleFocus,a as inputHandleHostClick,b as inputListenOnClick,c as inputSetFocus,d as inputSetBlur}from"./form-input-28a08ec5.js";import{p as preventDefault}from"./utils-9fbab1d3.js";import{B as BEM}from"./bem-8c7d2eb0.js";import{L as Logger}from"./log-dfd1c19f.js";import{d as defaultBalAriaForm}from"./form-fb8dd9f5.js";import{d as defaultConfig,a as defaultLocale}from"./config.default-7efdc82d.js";import{b as balBreakpoints}from"./breakpoints.subject-f57eda2c.js";import{g as useBalConfig}from"./config.utils-6ac6c9bd.js";import{L as ListenToBreakpoints}from"./breakpoints.decorator-d0f1affe.js";import{L as ListenToConfig}from"./config.decorator-d18abfe1.js";import"./browser-a8073d92.js";import"./icons.constant-a7885631.js";import"./_commonjsHelpers-1c8beb5f.js";import"./device-8c6d2881.js";import"./listener-04842ae9.js";import"./tokens.esm-70c16b84.js";function addDays(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toInteger(e);if(isNaN(a)){return new Date(NaN)}if(!a){return i}i.setDate(i.getDate()+a);return i}function addMonths(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toInteger(e);if(isNaN(a)){return new Date(NaN)}if(!a){return i}var r=i.getDate();var n=new Date(i.getTime());n.setMonth(i.getMonth()+a+1,0);var s=n.getDate();if(r>=s){return n}else{i.setFullYear(n.getFullYear(),n.getMonth(),r);return i}}function startOfWeek(t,e){var i,a,r,n,s,o,l,d;requiredArgs(1,arguments);var c=getDefaultOptions();var u=toInteger((i=(a=(r=(n=e===null||e===void 0?void 0:e.weekStartsOn)!==null&&n!==void 0?n:e===null||e===void 0?void 0:(s=e.locale)===null||s===void 0?void 0:(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:c.weekStartsOn)!==null&&a!==void 0?a:(l=c.locale)===null||l===void 0?void 0:(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:0);if(!(u>=0&&u<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var h=toDate(t);var f=h.getDay();var p=(f<u?7:0)+f-u;h.setDate(h.getDate()-p);h.setHours(0,0,0,0);return h}function startOfDay(t){requiredArgs(1,arguments);var e=toDate(t);e.setHours(0,0,0,0);return e}function addYears(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addMonths(t,i*12)}function isSameDay(t,e){requiredArgs(2,arguments);var i=startOfDay(t);var a=startOfDay(e);return i.getTime()===a.getTime()}function lastDayOfMonth(t){requiredArgs(1,arguments);var e=toDate(t);var i=e.getMonth();e.setFullYear(e.getFullYear(),i+1,0);e.setHours(0,0,0,0);return e}function isAfter(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getTime()>a.getTime()}function isBefore(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getTime()<a.getTime()}function isSameWeek(t,e,i){requiredArgs(2,arguments);var a=startOfWeek(t,i);var r=startOfWeek(e,i);return a.getTime()===r.getTime()}function isSameMonth(t,e){requiredArgs(2,arguments);var i=toDate(t);var a=toDate(e);return i.getFullYear()===a.getFullYear()&&i.getMonth()===a.getMonth()}function isWithinInterval(t,e){requiredArgs(2,arguments);var i=toDate(t).getTime();var a=toDate(e.start).getTime();var r=toDate(e.end).getTime();if(!(a<=r)){throw new RangeError("Invalid interval")}return i>=a&&i<=r}function subDays(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addDays(t,-i)}function subYears(t,e){requiredArgs(2,arguments);var i=toInteger(e);return addYears(t,-i)}var balDatepickerCss=':root{--bal-datepicker-popover-background:var(--bal-color-grey-2);--bal-datepicker-cell-background:var(--bal-color-white);--bal-datepicker-cell-selected-background:var(--bal-color-primary);--bal-datepicker-cell-selected-today-background:var(--bal-color-white);--bal-datepicker-cell-today-background:var(--bal-color-primary);--bal-datepicker-cell-today-radius:var(--bal-radius-rounded)}.bal-datepicker{display:block;font-family:var(--bal-font-family-text);width:100%}.bal-datepicker__native{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-datepicker__popup{padding:1rem;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:var(--bal-datepicker-popover-background)}@media screen and (min-width: 769px),print{.bal-datepicker__popup{max-width:24.5rem}}.bal-datepicker__popup__body{max-width:22.5rem;margin:0 auto 0 auto;margin-top:.75rem}.bal-datepicker-pagination{max-width:22.5rem;margin:0 auto 0 auto}.bal-datepicker-pagination__inner{display:-ms-flexbox;display:flex;gap:.5rem}.bal-datepicker-pagination__month-and-year{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;gap:.5rem}.bal-datepicker-pagination__month-and-year__select{-ms-flex:1;flex:1}.bal-datepicker-pagination__month-and-year__select .select,.bal-datepicker-pagination__month-and-year__select .select select{padding-top:0 !important;padding-bottom:0 !important;text-align:center !important;min-height:2rem !important;height:2rem !important}@media screen and (min-width: 769px),print{.bal-datepicker-pagination__month-and-year__select .select,.bal-datepicker-pagination__month-and-year__select .select select{min-height:3rem !important;height:3rem !important}}.bal-datepicker-grid{display:table;border-collapse:collapse;width:100%;table-layout:fixed}.bal-datepicker-grid__body{display:table-row-group}.bal-datepicker-grid__row{display:table-row}.bal-datepicker-grid__row .bal-datepicker-grid__cell{margin-bottom:.25rem;margin-right:.25rem}.bal-datepicker-grid__row:last-child .bal-datepicker-grid__cell{margin-bottom:0}.bal-datepicker-grid__header{display:-ms-flexbox;display:flex;max-width:22.5rem;margin:0 auto 0 auto;gap:.25rem}.bal-datepicker-grid__header .bal-datepicker-grid__cell{background:rgba(0,0,0,0)}.bal-datepicker-grid__header .bal-datepicker-grid__cell span{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;width:100%}.bal-datepicker-grid__cell{position:relative;text-align:center;vertical-align:middle;display:table-cell;width:13%;padding:0 !important;height:3rem;min-height:3rem;min-width:2.25rem;-webkit-appearance:auto !important;-moz-appearance:auto !important;appearance:auto !important;background:var(--bal-datepicker-cell-background)}.bal-datepicker-grid__cell--selected{background:var(--bal-datepicker-cell-selected-background) !important}.bal-datepicker-grid__cell--today:not(.bal-datepicker-grid__cell--outdated)>span{font-weight:var(--bal-font-weight-bold)}.bal-datepicker-grid__cell--today:not(.bal-datepicker-grid__cell--outdated)::after{content:"";position:absolute;display:block;width:.25rem;height:.25rem;background:var(--bal-datepicker-cell-today-background);border-radius:var(--bal-datepicker-cell-today-radius);margin-left:-2px;left:50%;bottom:.375rem}.bal-datepicker-grid__cell--today.bal-datepicker-grid__cell--selected:not(.bal-datepicker-grid__cell--outdated)::after{background:var(--bal-datepicker-cell-selected-today-background)}.bal-datepicker-grid__cell:last-child{margin-right:0}.bal-datepicker-grid__cell>span{font-family:var(--bal-font-family-text);font-weight:var(--bal-font-weight-regular)}@media screen and (min-width: 769px),print{.bal-datepicker-grid__cell{min-width:3rem !important}}.bal-datepicker-grid__cell--disabled{border-color:rgba(0,0,0,0) !important;background:rgba(0,0,0,0) !important}.bal-datepicker-grid__cell--header>span{border:none;background:rgba(0,0,0,0);color:var(--bal-color-text-primary);font-weight:var(--bal-font-weight-bold);cursor:default}';var BalDatepickerStyle0=balDatepickerCss;var Datepicker=function(){function t(t){var e=this;registerInstance(this,t);this.balChange=createEvent(this,"balChange",7);this.balInput=createEvent(this,"balInput",7);this.balBlur=createEvent(this,"balBlur",7);this.balFocus=createEvent(this,"balFocus",7);this.balInputClick=createEvent(this,"balInputClick",7);this.balIconClick=createEvent(this,"balIconClick",7);this.inputId="bal-dp-".concat(datepickerIds++);this.inheritedAttributes={};this.inputValue=this.value;this.onIconClick=function(t){if(!e.disabled&&!e.readonly){e.popoverElement.toggle()}stopEventBubbling(t);e.balIconClick.emit(t)};this.onInputClick=function(t){if(!e.triggerIcon&&!e.disabled&&!e.readonly){e.popoverElement.toggle()}stopEventBubbling(t);if(!e.triggerIcon){e.balInputClick.emit(t)}};this.onPopoverChange=function(t){stopEventBubbling(t);if(e.isPopoverOpen!==t.detail){e.isPopoverOpen=t.detail;e.fireBlur(t)}};this.onInput=function(t){var i=getInputTarget(t);if(i){e.inputValue=i.value;if(i.value){e.nativeInput.value=e.formatDate(e.inputValue)}if(e.inputValue&&e.inputValue.length>=6){var a=parse(e.inputValue,e.getLocale());var r=formatDateString(a);if(isValidIsoString(r)){e.selectedDate=r;e.updatePointerDates()}}}e.balInput.emit(e.inputValue)};this.onInputChange=function(t){var i=t.target.value;var a=parse(i,e.getLocale());var r=formatDateString(a);var n=format(e.getLocale(),a);e.nativeInput.value=n;e.updateValue(r);e.updatePointerDates()};this.onClickDateCell=function(t){if(!t.isDisabled){e.select(t.dateString)}};this.onInputKeyUp=function(t){if(isSpaceKey(t)&&!e.triggerIcon){if(e.isPopoverOpen){e.close()}else{e.open()}}if(isEnterKey(t)&&!e.triggerIcon){var i=parse(e.nativeInput.value,e.getLocale());var a=formatDateString(i);if(e.isPopoverOpen){if(e.value===a){e.close()}}}};this.onInputKeyDown=function(t){var i=dateSeparator(e.getLocale());var a=__spreadArray(__spreadArray(__spreadArray([],NUMBER_KEYS,true),[i],false),ACTION_KEYS,true);if(!isCtrlOrCommandKey(t)&&a.indexOf(t.key)<0){t.preventDefault();t.stopPropagation()}if(t.key==="Tab"){e.close()}};this.onMonthSelect=function(t){var i=t.target.value;e.pointerDate=Object.assign(Object.assign({},e.pointerDate),{day:1,month:parseInt(i,10)})};this.onYearSelect=function(t){var i=t.target.value;var a=parseInt(i,10);var r=undefined;if(e.defaultDate){var n=parse(e.defaultDate);if(e.max){var s=parse(e.max);if(n.getMonth()>s.getMonth()){r=s.getMonth()}}if(e.min){var o=parse(e.min);if(n.getMonth()<o.getMonth()){r=o.getMonth()}}}e.pointerDate={day:1,year:a,month:r!==undefined?r:e.pointerDate.month}};this.onInputFocus=function(t){return inputHandleFocus(e,t)};this.onInputBlur=function(t){preventDefault(t);e.focused=false;e.fireBlur(t)};this.fireBlur=function(t){if(!e.isPopoverOpen&&!e.focused){rIC((function(){return e.balBlur.emit(t)}))}};this.handleClick=function(t){return inputHandleHostClick(e,t)};this.language=defaultConfig.language;this.region=defaultConfig.region;this.isMobile=balBreakpoints.isMobile;this.focused=false;this.isPopoverOpen=false;this.selectedDate="";this.pointerDate={year:getYear(now()),month:getMonth(now()),day:getDate(now())};this.ariaForm=defaultBalAriaForm;this.name=this.inputId;this.invalid=false;this.required=false;this.disabled=false;this.readonly=false;this.loading=false;this.placeholder=undefined;this.min=undefined;this.max=undefined;this.closeOnSelect=true;this.triggerIcon=false;this.minYearProp=undefined;this.maxYearProp=undefined;this.debounce=0;this.defaultDate=undefined;this.value=undefined;this.allowedDates=undefined;this.autoInvalidOff=false}t.prototype.createLogger=function(t){this.log=t};t.prototype.debounceChanged=function(){this.balChange=debounceEvent(this.balChange,this.debounce)};t.prototype.valueChanged=function(){this.selectedDate=this.value;this.updatePointerDates()};t.prototype.listenOnClick=function(t){inputListenOnClick(this,t)};t.prototype.resetHandler=function(t){var e=this;var i=t.target;if(i===null||i===void 0?void 0:i.contains(this.el)){if(this.resetHandlerTimer){clearTimeout(this.resetHandlerTimer)}this.resetHandlerTimer=setTimeout((function(){if(e.initialValue){e.nativeInput.value=format(e.getLocale(),parse(e.initialValue))}else{e.nativeInput.value=""}e.selectedDate=e.initialValue;e.updateValue(e.initialValue,false);e.updatePointerDates()}),0)}};t.prototype.breakpointListener=function(t){this.isMobile=t.mobile};t.prototype.connectedCallback=function(){this.debounceChanged();this.initialValue=this.value};t.prototype.componentDidLoad=function(){this.inputValue=this.value};t.prototype.componentWillLoad=function(){this.inheritedAttributes=inheritAttributes(this.el,["aria-label","tabindex","title"]);this.selectedDate=this.value;this.updatePointerDates();this.updateValue(this.value,false)};t.prototype.configChanged=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.language=t.language;this.region=t.region;return[2]}))}))};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&this.popoverElement){this.popoverElement.present()}return[2]}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(!this.disabled&&this.popoverElement){this.popoverElement.dismiss()}return[2]}))}))};t.prototype.select=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:this.nativeInput.value=format(this.getLocale(),parse(t));this.updateValue(t);this.updatePointerDates();if(!this.closeOnSelect)return[3,2];return[4,(e=this.popoverElement)===null||e===void 0?void 0:e.toggle()];case 1:i.sent();i.label=2;case 2:return[2]}}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){inputSetFocus(this);return[2]}))}))};t.prototype.setBlur=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){inputSetBlur(this);return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.setAriaForm=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.ariaForm=Object.assign({},t);return[2]}))}))};t.prototype.updatePointerDates=function(){var t=now();t.setDate(1);if(this.selectedDate){t=parse(this.selectedDate)}else{if(this.defaultDate){t=parse(this.defaultDate)}}if(this.min){var e=parse(this.min);if(e&&t<e){t=e}}if(this.max){var i=parse(this.max);if(i&&t>i){t=i}}this.pointerDate={year:getYear(t),month:getMonth(t),day:getDate(t)}};t.prototype.updateValue=function(t,e){if(e===void 0){e=true}if(!isValidIsoString(t)){this.selectedDate=undefined;this.value=undefined;if(this.nativeInput){this.nativeInput.value=""}}if(this.value!==t){this.value=t;if(e&&(this.isDateInRange(parse(this.value))||this.value==="")){this.balChange.emit(this.value)}}};Object.defineProperty(t.prototype,"minYear",{get:function(){if(this.min){return parseInt(this.min.substring(0,4),10)}return this.minYearProp?this.minYearProp:getYear(subYears(now(),100))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"maxYear",{get:function(){if(this.max){return parseInt(this.max.substring(0,4),10)}return this.maxYearProp?this.maxYearProp:getYear(addYears(now(),100))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"years",{get:function(){var t=this;var e=Array.from({length:this.maxYear-this.minYear+1},(function(e,i){return t.minYear+i}));if(this.min&&this.pointerDate.month===getMonth(parse(this.min))){var i=getYear(parse(this.min));e=e.filter((function(t){return t>=i}))}if(this.max&&this.pointerDate.month===getMonth(parse(this.max))){var a=getYear(parse(this.max));e=e.filter((function(t){return t<=a}))}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"months",{get:function(){var t=i18nBalDatepicker[this.language].monthsShort;var e=t.map((function(t,e){return{name:t,index:e}}));if(this.min&&this.pointerDate.year===getYear(parse(this.min))){var i=parseInt(this.min.substring(5,7),10)-1;e=e.filter((function(t){return t.index>=i}))}if(this.max&&this.pointerDate.year===getYear(parse(this.max))){var a=parseInt(this.max.substring(5,7),10)-1;e=e.filter((function(t){return t.index<=a}))}return e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"weekDays",{get:function(){var t=__spreadArray([],i18nBalDatepicker[this.language].weekdaysMin,true);t.push(t.shift()||"");return t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"firstDateOfBox",{get:function(){var t=new Date(this.pointerDate.year,this.pointerDate.month,1);return startOfWeek(t,{weekStartsOn:1})},enumerable:false,configurable:true});t.prototype.getLocale=function(){var t=useBalConfig();return t&&t.locale||defaultLocale};Object.defineProperty(t.prototype,"calendarGrid",{get:function(){var t=this.firstDateOfBox;var e=this.firstDateOfBox;var i=[];do{var a=[];do{a=__spreadArray(__spreadArray([],a,true),[{date:new Date(e),display:format(this.getLocale(),e),dateString:formatDateString(e),label:getDate(e).toString(),isToday:isSameDay(e,now()),isSelected:parse(this.selectedDate)!==undefined&&isSameDay(e,parse(this.selectedDate)),isDisabled:!this.getAllowedDates(e)||!this.isDateInRange(e),isOutdated:this.pointerDate.month!==e.getMonth()||!this.isDateInRange(e)}],false);e.setDate(e.getDate()+1)}while(isSameWeek(e,t,{weekStartsOn:1}));i=__spreadArray(__spreadArray([],i,true),[a],false);t.setDate(t.getDate()+7)}while(isSameMonth(new Date(this.pointerDate.year,this.pointerDate.month,this.pointerDate.day),e));return i},enumerable:false,configurable:true});t.prototype.getAllowedDates=function(t){if(lodash_isnil(this.allowedDates)){return true}return this.allowedDates(formatDateString(t))};t.prototype.formatDate=function(t){var e=dateSeparator(this.getLocale());var i=t.length;var a=t.charAt(i-1);var r=t.charAt(i-2);if(a===e){if(i===1||r===e||t.split(e).filter((function(t){return t.length>0})).length>=3){return t.substring(0,i-1)}}if(i===5){if(t.split(e)[0].split("").length===1&&r!==e&&a!==e){return t.substring(0,i-1)+e+t.substring(i-1,i)}}if(i===3||i===6){if(a!==e&&r!==e&&t.split(e).length<=2){return t.substring(0,i-1)+e+t.substring(i-1,i)}}return t};t.prototype.render=function(){var t=this;var e=BEM.block("datepicker");var i=e.element("native");var a=e.element("popup");var r=a.element("body");var n=a.element("footer");return h(Host,{onClick:this.handleClick,"aria-disabled":this.disabled?"true":null,class:Object.assign(Object.assign({},e.class()),e.modifier("disabled").class(this.disabled||this.readonly))},h("input",{type:"date",class:Object.assign({},i.class()),name:this.name,min:this.min,max:this.max,value:this.value,tabindex:-1,"aria-hidden":"true"}),h("bal-popover",{onBalChange:this.onPopoverChange,ref:function(e){return t.popoverElement=e}},this.renderInput(),h("bal-popover-content",{spaceless:true,contentMinWidth:392},h("div",{class:Object.assign({},a.class())},this.renderHeader(),h("div",{class:Object.assign({},r.class())},this.renderGrid()),h("div",{class:Object.assign({},n.class())},h("slot",null))))))};t.prototype.renderInput=function(){var t=this;return h("div",{"bal-popover-trigger":true,class:"control"},h("bal-input-group",{disabled:this.disabled||this.readonly,invalid:this.invalid},h("input",Object.assign({class:{input:true,"data-test-input":true,"is-clickable":!this.disabled&&!this.triggerIcon&&!this.readonly,"is-disabled":this.disabled||this.readonly,"is-danger":this.invalid},"data-testid":"bal-datepicker-input",ref:function(e){return t.nativeInput=e},id:this.ariaForm.controlId||this.inputId,"aria-labelledby":this.ariaForm.labelId,"aria-describedby":this.ariaForm.messageId,"aria-invalid":this.invalid===true?"true":"false","aria-disabled":this.disabled?"true":null,type:"text",maxlength:"10",autoComplete:"off",value:format(this.getLocale(),parse(this.value||"")),required:this.required,disabled:this.disabled,readonly:this.readonly,placeholder:this.placeholder,onKeyDown:function(e){return t.onInputKeyDown(e)},onKeyUp:function(e){return t.onInputKeyUp(e)},onInput:this.onInput,onClick:this.onInputClick,onChange:this.onInputChange,onBlur:this.onInputBlur,onFocus:this.onInputFocus},this.inheritedAttributes)),!this.loading?h("bal-icon",{class:{"datepicker-trigger-icon":true,"is-clickable":!this.disabled&&!this.readonly},"is-right":true,color:this.disabled||this.readonly?"grey":this.invalid?"danger":"primary",name:"date",onClick:this.onIconClick}):""))};t.prototype.renderGrid=function(){var t=this;var e=BEM.block("datepicker-grid");var i=e.element("row");var a=e.element("cell");return h("div",null,this.renderWeekDayHeader(),h("div",{class:Object.assign({},e.class())},this.calendarGrid.map((function(e,r){return h("div",{key:r,class:Object.assign({},i.class())},e.map((function(e){return h("button",{key:e.dateString,type:"button","data-date":e.dateString,onClick:function(){return t.onClickDateCell(e)},disabled:e.isDisabled,class:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a.class()),{button:true,"is-text":!e.isDisabled&&!e.isSelected,"is-primary":e.isSelected&&e.isSelected,"is-disabled":e.isDisabled||e.isOutdated}),a.modifier("today").class(e.isToday)),a.modifier("selectable").class(!e.isDisabled&&!e.isOutdated)),a.modifier("disabled").class(e.isDisabled||e.isOutdated)),a.modifier("outdated").class(e.isOutdated)),a.modifier("selected").class(e.isSelected))},h("span",null,e.label))})))}))))};t.prototype.renderWeekDayHeader=function(){var t=BEM.block("datepicker-grid");var e=t.element("header");var i=t.element("cell");return h("header",{class:Object.assign({},e.class())},this.weekDays.map((function(t){return h("div",{key:t,class:Object.assign(Object.assign({},i.class()),i.modifier("header").class())},h("span",null,t))})))};t.prototype.renderHeader=function(){var t=this;var e=BEM.block("datepicker-pagination");var i=e.element("inner");var a=e.element("month-and-year");var r=a.element("select");return h("header",{class:Object.assign({},e.class())},h("div",{class:Object.assign({},i.class())},h("bal-button",{square:true,size:this.isMobile?"small":"",color:"info",icon:"nav-go-left",disabled:this.isPreviousMonthDisabled,onClick:function(){return t.previousMonth()}}),h("div",{class:Object.assign({},a.class())},h("div",{class:Object.assign(Object.assign({},r.class()),r.modifier("month").class())},h("div",{class:"select"},h("select",{onInput:this.onMonthSelect},this.months.map((function(e){return h("option",{key:e.index,value:e.index,selected:t.pointerDate.month===e.index},e.name)}))))),h("div",{class:Object.assign(Object.assign({},r.class()),r.modifier("year").class())},h("div",{class:"select"},h("select",{onInput:this.onYearSelect},this.years.map((function(e){return h("option",{key:e,value:e,selected:t.pointerDate.year===e},e)})))))),h("bal-button",{square:true,size:this.isMobile?"small":"",color:"info",icon:"nav-go-right",disabled:this.isNextMonthDisabled,onClick:function(){return t.nextMonth()}})))};t.prototype.previousMonth=function(){if(!this.isPreviousMonthDisabled){if(this.pointerDate.year===this.minYear&&this.pointerDate.month===0){return}this.pointerDate=this.calcPreviousMonth()}};t.prototype.nextMonth=function(){if(!this.isNextMonthDisabled){if(this.pointerDate.year===this.maxYear&&this.pointerDate.month===11){return}this.pointerDate=this.calcNextMonth()}};t.prototype.calcPreviousMonth=function(){if(this.pointerDate.month===0){return Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year-1,month:11,day:1})}else{return Object.assign(Object.assign({},this.pointerDate),{month:this.pointerDate.month-1,day:1})}};t.prototype.calcNextMonth=function(){if(this.pointerDate.month===11){return Object.assign(Object.assign({},this.pointerDate),{year:this.pointerDate.year+1,month:0,day:1})}else{return Object.assign(Object.assign({},this.pointerDate),{month:this.pointerDate.month+1,day:1})}};t.prototype.lastDayOfMonth=function(t,e){var i=new Date(t,e+1,0);return getDate(i)};Object.defineProperty(t.prototype,"isPreviousMonthDisabled",{get:function(){if(this.min){var t=parse(this.min);var e=this.lastDayOfMonth(this.calcPreviousMonth().year,this.calcPreviousMonth().month);var i=new Date(this.calcPreviousMonth().year,this.calcPreviousMonth().month,e);return isBefore(i,subDays(t,1))}return false},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isNextMonthDisabled",{get:function(){if(this.max){var t=parse(this.max);var e=new Date(this.calcNextMonth().year,this.calcNextMonth().month,1);return isAfter(e,lastDayOfMonth(t)?t:addDays(t,1))}return false},enumerable:false,configurable:true});t.prototype.isDateInRange=function(t){var e=parse(formatDateString(t));if(this.min&&this.max&&this.max>this.min){return isWithinInterval(e,{start:parse(this.min),end:parse(this.max)})}if(this.min){return isAfter(e,parse(this.min))||isSameDay(e,parse(this.min))}if(this.max){return isBefore(e,addDays(parse(this.max),1))||isSameDay(e,parse(this.max))}return true};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"]}},enumerable:false,configurable:true});return t}();__decorate([Logger("bal-datepicker"),__metadata("design:type",Function),__metadata("design:paramtypes",[Function]),__metadata("design:returntype",void 0)],Datepicker.prototype,"createLogger",null);__decorate([ListenToBreakpoints(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",void 0)],Datepicker.prototype,"breakpointListener",null);__decorate([ListenToConfig(),__metadata("design:type",Function),__metadata("design:paramtypes",[Object]),__metadata("design:returntype",Promise)],Datepicker.prototype,"configChanged",null);var datepickerIds=0;Datepicker.style=BalDatepickerStyle0;export{Datepicker as bal_datepicker};