@akad/design-system 0.2.0-beta.8 → 1.0.0-alpha.1

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 (370) hide show
  1. package/css/core.css +1 -0
  2. package/css/package.json +9 -1
  3. package/css/theme-aon.css +1 -0
  4. package/css/theme-bees.css +1 -0
  5. package/css/theme-bmc.css +1 -0
  6. package/css/theme-default.css +1 -0
  7. package/css/theme-linker.css +1 -0
  8. package/css/theme-oggi.css +1 -0
  9. package/css/theme-streetgo.css +1 -0
  10. package/package.json +1 -1
  11. package/react/package.json +1 -1
  12. package/react/react-lib.js +2794 -2792
  13. package/react/react-lib.umd.cjs +5 -5
  14. package/react/src/components/atoms/Button/Button.config.d.ts +106 -0
  15. package/react/{components → src/components}/atoms/Button/Button.d.ts +11 -7
  16. package/react/{components → src/components}/atoms/Button/Button.stories.d.ts +2 -2
  17. package/react/src/components/atoms/Button/index.d.ts +4 -0
  18. package/react/src/components/atoms/Caption/Caption.config.d.ts +6 -0
  19. package/react/src/components/atoms/Caption/index.d.ts +4 -0
  20. package/react/src/components/atoms/Card/Card.config.d.ts +92 -0
  21. package/react/{components → src/components}/atoms/Card/Card.d.ts +8 -4
  22. package/react/src/components/atoms/Card/index.d.ts +4 -0
  23. package/react/{components → src/components}/atoms/Checkbox/Checkbox.config.d.ts +18 -18
  24. package/react/src/components/atoms/Checkbox/index.d.ts +4 -0
  25. package/react/src/components/atoms/Heading/Heading.config.d.ts +22 -0
  26. package/react/src/components/atoms/Heading/index.d.ts +4 -0
  27. package/react/src/components/atoms/HorizontalRule/HorizontalRule.config.d.ts +30 -0
  28. package/react/{components → src/components}/atoms/HorizontalRule/HorizontalRule.d.ts +2 -2
  29. package/react/src/components/atoms/HorizontalRule/index.d.ts +4 -0
  30. package/react/src/components/atoms/Icon/Icon.config.d.ts +125 -0
  31. package/react/{components → src/components}/atoms/Icon/Icon.d.ts +3 -3
  32. package/react/{components → src/components}/atoms/Icon/Icon.stories.d.ts +3 -3
  33. package/react/src/components/atoms/Icon/index.d.ts +4 -0
  34. package/react/src/components/atoms/Input/Input.config.d.ts +146 -0
  35. package/react/{components → src/components}/atoms/Input/Input.stories.d.ts +2 -2
  36. package/react/src/components/atoms/Input/index.d.ts +4 -0
  37. package/react/src/components/atoms/Loading/Loading.config.d.ts +52 -0
  38. package/react/{components → src/components}/atoms/Loading/Loading.d.ts +1 -1
  39. package/react/src/components/atoms/Loading/index.d.ts +4 -0
  40. package/react/src/components/atoms/Option/Option.config.d.ts +53 -0
  41. package/react/src/components/atoms/Option/index.d.ts +4 -0
  42. package/react/src/components/atoms/Paragraph/Paragraph.config.d.ts +19 -0
  43. package/react/src/components/atoms/Paragraph/index.d.ts +4 -0
  44. package/react/src/components/atoms/Progress/Progress.config.d.ts +30 -0
  45. package/react/src/components/atoms/Progress/index.d.ts +4 -0
  46. package/react/src/components/atoms/Select/Select.config.d.ts +121 -0
  47. package/react/{components → src/components}/atoms/Select/Select.stories.d.ts +4 -4
  48. package/react/src/components/atoms/Select/index.d.ts +4 -0
  49. package/react/src/components/atoms/Subtitle/Subtitle.config.d.ts +18 -0
  50. package/react/src/components/atoms/Subtitle/index.d.ts +4 -0
  51. package/react/src/components/atoms/TextArea/TextArea.config.d.ts +128 -0
  52. package/react/{components → src/components}/atoms/TextArea/TextArea.d.ts +0 -1
  53. package/react/{components → src/components}/atoms/TextArea/TextArea.stories.d.ts +2 -2
  54. package/react/src/components/atoms/TextArea/index.d.ts +4 -0
  55. package/react/src/components/atoms/Tooltip/Tooltip.config.d.ts +41 -0
  56. package/react/{components → src/components}/atoms/Tooltip/Tooltip.d.ts +3 -1
  57. package/react/{components → src/components}/atoms/Tooltip/Tooltip.stories.d.ts +6 -6
  58. package/react/src/components/atoms/Tooltip/index.d.ts +4 -0
  59. package/react/src/components/bosons/Container/Container.config.d.ts +18 -0
  60. package/react/src/components/bosons/Container/index.d.ts +4 -0
  61. package/react/{components → src/components}/bosons/FlexLayout/FlexElement.config.d.ts +2 -2
  62. package/react/src/components/bosons/FlexLayout/FlexLayout.config.d.ts +95 -0
  63. package/react/src/components/bosons/FlexLayout/index.d.ts +8 -0
  64. package/react/{components → src/components}/bosons/GridLayout/GridElement.config.d.ts +2 -2
  65. package/react/{components → src/components}/bosons/GridLayout/GridElement.d.ts +6 -1
  66. package/react/src/components/bosons/GridLayout/GridLayout.config.d.ts +80 -0
  67. package/react/{components → src/components}/bosons/GridLayout/GridLayout.d.ts +3 -3
  68. package/react/src/components/bosons/GridLayout/index.d.ts +8 -0
  69. package/react/src/components/bosons/Spacer/Spacer.config.d.ts +24 -0
  70. package/react/{components → src/components}/bosons/Spacer/Spacer.stories.d.ts +2 -2
  71. package/react/src/components/bosons/Spacer/index.d.ts +4 -0
  72. package/react/src/components/bosons/Wrapper/Wrapper.config.d.ts +27 -0
  73. package/react/src/components/bosons/Wrapper/index.d.ts +4 -0
  74. package/react/src/components/index.d.ts +37 -0
  75. package/react/src/components/molecules/Accordion/Accordion.config.d.ts +31 -0
  76. package/react/{components → src/components}/molecules/Accordion/Accordion.d.ts +2 -2
  77. package/react/{components → src/components}/molecules/Accordion/Accordion.stories.d.ts +1 -1
  78. package/react/src/components/molecules/Accordion/AccordionItem.config.d.ts +28 -0
  79. package/react/{components → src/components}/molecules/Accordion/AccordionItem.d.ts +7 -1
  80. package/react/src/components/molecules/Accordion/index.d.ts +8 -0
  81. package/react/{components → src/components}/molecules/ActiveTags/ActiveTags.config.d.ts +2 -2
  82. package/react/src/components/molecules/ActiveTags/index.d.ts +4 -0
  83. package/react/src/components/molecules/Carousel/Carousel.config.d.ts +7 -0
  84. package/react/src/components/molecules/Carousel/Carousel.d.ts +31 -0
  85. package/react/src/components/molecules/Carousel/index.d.ts +4 -0
  86. package/react/src/components/molecules/EditableSelect/EditableSelect.config.d.ts +104 -0
  87. package/react/{components → src/components}/molecules/EditableSelect/EditableSelect.d.ts +2 -2
  88. package/react/src/components/molecules/EditableSelect/index.d.ts +4 -0
  89. package/react/{components → src/components}/molecules/Indicator/Indicator.config.d.ts +3 -3
  90. package/react/src/components/molecules/Indicator/index.d.ts +4 -0
  91. package/react/{components → src/components}/molecules/InlineEditable/InlineEditable.config.d.ts +3 -3
  92. package/react/src/components/molecules/InlineEditable/index.d.ts +4 -0
  93. package/react/src/components/molecules/Modal/Modal.config.d.ts +44 -0
  94. package/react/{components → src/components}/molecules/Modal/Modal.d.ts +2 -2
  95. package/react/{components → src/components}/molecules/Modal/Modal.stories.d.ts +2 -2
  96. package/react/src/components/molecules/Modal/Modal.test.d.ts +1 -0
  97. package/react/src/components/molecules/Modal/index.d.ts +4 -0
  98. package/react/{components → src/components}/molecules/Notification/Notification.config.d.ts +13 -32
  99. package/react/src/components/molecules/Notification/Notification.d.ts +22 -0
  100. package/react/{components → src/components}/molecules/Notification/Notification.stories.d.ts +1 -1
  101. package/react/src/components/molecules/Notification/index.d.ts +4 -0
  102. package/react/src/components/molecules/PasswordConfirmation/PasswordConfirmation.config.d.ts +32 -0
  103. package/react/{components → src/components}/molecules/PasswordConfirmation/PasswordConfirmation.stories.d.ts +1 -1
  104. package/react/src/components/molecules/PasswordConfirmation/index.d.ts +4 -0
  105. package/react/{components → src/components}/molecules/Stepper/Stepper.config.d.ts +2 -2
  106. package/react/{components → src/components}/molecules/Stepper/Stepper.d.ts +7 -2
  107. package/react/src/components/molecules/Stepper/index.d.ts +4 -0
  108. package/react/{components/molecules/Table/Table.types.d.ts → src/components/molecules/Table/Table.config.d.ts} +23 -0
  109. package/react/{components → src/components}/molecules/Table/Table.d.ts +1 -1
  110. package/react/{components → src/components}/molecules/Table/Table.stories.d.ts +3 -3
  111. package/react/{components → src/components}/molecules/Table/TableRow.d.ts +1 -1
  112. package/react/{components → src/components}/molecules/Table/dataTable.mock.d.ts +1 -1
  113. package/react/src/components/molecules/Table/index.d.ts +4 -0
  114. package/react/{components → src/components}/molecules/Tabs/Tab.d.ts +1 -1
  115. package/react/src/components/molecules/Tabs/Tabs.config.d.ts +44 -0
  116. package/react/{components → src/components}/molecules/Tabs/Tabs.d.ts +11 -1
  117. package/react/{components → src/components}/molecules/Tabs/Tabs.stories.d.ts +1 -1
  118. package/react/src/components/molecules/Tabs/index.d.ts +4 -0
  119. package/react/src/components/molecules/ThemeProvider/ThemeProvider.config.d.ts +28 -0
  120. package/react/src/components/organisms/NotificationList/NotificationList.config.d.ts +32 -0
  121. package/react/{components → src/components}/organisms/NotificationList/NotificationList.d.ts +1 -1
  122. package/react/{components → src/components}/organisms/NotificationList/NotificationList.stories.d.ts +1 -1
  123. package/react/src/components/organisms/NotificationList/index.d.ts +4 -0
  124. package/react/src/components/templates/SplitLayout/SplitLayout.config.d.ts +7 -0
  125. package/react/src/components/templates/SplitLayout/SplitLayout.d.ts +9 -0
  126. package/react/src/components/templates/SplitLayout/index.d.ts +5 -0
  127. package/react/{components → src/components}/templates/TwoColumns/TwoColumns.config.d.ts +2 -2
  128. package/react/src/components/templates/TwoColumns/index.d.ts +4 -0
  129. package/react/src/enum/colorProps.d.ts +30 -0
  130. package/scss/core/base/index.scss +3 -0
  131. package/scss/core/base/reset.scss +27 -0
  132. package/scss/core/base/typography.scss +18 -0
  133. package/scss/core/components/atoms/button.scss +816 -0
  134. package/scss/core/components/atoms/caption.scss +13 -0
  135. package/scss/core/components/atoms/card.scss +24 -0
  136. package/scss/core/components/atoms/checkbox.scss +61 -0
  137. package/scss/core/components/atoms/heading.scss +69 -0
  138. package/scss/core/components/atoms/horizontal-rule.scss +27 -0
  139. package/scss/core/components/atoms/icon.scss +49 -0
  140. package/scss/core/components/atoms/input.scss +333 -0
  141. package/scss/core/components/atoms/loading.scss +120 -0
  142. package/scss/core/components/atoms/option.scss +78 -0
  143. package/scss/core/components/atoms/paragraph.scss +44 -0
  144. package/scss/core/components/atoms/progress.scss +32 -0
  145. package/scss/core/components/atoms/select.scss +253 -0
  146. package/scss/core/components/atoms/subtitle.scss +21 -0
  147. package/scss/core/components/atoms/textarea.scss +340 -0
  148. package/scss/core/components/atoms/tooltip.scss +197 -0
  149. package/scss/core/components/bosons/container.scss +5 -0
  150. package/scss/core/components/bosons/flex-layout.scss +45 -0
  151. package/scss/core/components/bosons/grid-layout.scss +76 -0
  152. package/scss/core/components/bosons/grid.scss +79 -0
  153. package/scss/core/components/bosons/spacer.scss +45 -0
  154. package/scss/core/components/bosons/wrapper.scss +32 -0
  155. package/scss/core/components/index.scss +49 -0
  156. package/scss/core/components/molecules/accordion.scss +93 -0
  157. package/scss/core/components/molecules/active-tags.scss +58 -0
  158. package/scss/core/components/molecules/carousel.scss +67 -0
  159. package/scss/core/components/molecules/editable-select.scss +141 -0
  160. package/scss/core/components/molecules/indicator.scss +37 -0
  161. package/scss/core/components/molecules/inline-editable.scss +23 -0
  162. package/scss/core/components/molecules/modal.scss +70 -0
  163. package/scss/core/components/molecules/notification.scss +109 -0
  164. package/scss/core/components/molecules/password-confirmation.scss +16 -0
  165. package/scss/core/components/molecules/stepper.scss +84 -0
  166. package/scss/core/components/molecules/table.scss +95 -0
  167. package/scss/core/components/molecules/tabs.scss +114 -0
  168. package/scss/core/components/molecules/theme-provider.scss +6 -0
  169. package/scss/core/components/organisms/notification-list.scss +77 -0
  170. package/scss/core/components/templates/split-layout.scss +51 -0
  171. package/scss/core/components/templates/two-columns.scss +30 -0
  172. package/scss/core/functions/breakpoints.scss +35 -0
  173. package/scss/core/functions/fonts.scss +17 -0
  174. package/scss/core/functions/index.scss +5 -0
  175. package/scss/core/functions/spacings.scss +8 -0
  176. package/scss/core/functions/tokens.scss +14 -0
  177. package/scss/core/helpers/borders.scss +87 -0
  178. package/scss/core/helpers/colors.scss +167 -0
  179. package/scss/core/helpers/display.scss +177 -0
  180. package/scss/core/helpers/elevation.scss +16 -0
  181. package/scss/core/helpers/index.scss +6 -0
  182. package/scss/core/helpers/order.scss +20 -0
  183. package/scss/core/index.scss +18 -0
  184. package/scss/core/mixins/breakpoints.scss +90 -0
  185. package/scss/core/mixins/grid.scss +8 -0
  186. package/scss/core/mixins/index.scss +5 -0
  187. package/scss/core/tokens/borders.scss +12 -0
  188. package/scss/core/tokens/breakpoints.scss +20 -0
  189. package/scss/core/tokens/icons.scss +2 -0
  190. package/scss/core/tokens/index.scss +8 -0
  191. package/scss/core/tokens/opacity.scss +6 -0
  192. package/scss/core/tokens/shadows.scss +15 -0
  193. package/scss/core/tokens/spacings.scss +41 -0
  194. package/scss/core/tokens/typography.scss +20 -0
  195. package/scss/themes/aon/colors.scss +83 -0
  196. package/scss/themes/aon/index.scss +54 -0
  197. package/scss/themes/aon/typography.scss +7 -0
  198. package/scss/themes/bees/colors.scss +32 -0
  199. package/scss/themes/bees/index.scss +51 -0
  200. package/scss/themes/bees/typography.scss +6 -0
  201. package/scss/themes/bmc/colors.scss +81 -0
  202. package/scss/themes/bmc/index.scss +54 -0
  203. package/scss/themes/bmc/typography.scss +5 -0
  204. package/scss/themes/default/colors.scss +109 -0
  205. package/scss/themes/default/index.scss +80 -0
  206. package/scss/themes/default/typography.scss +7 -0
  207. package/scss/themes/linker/colors.scss +35 -0
  208. package/scss/themes/linker/index.scss +30 -0
  209. package/scss/themes/linker/typography.scss +6 -0
  210. package/scss/themes/oggi/colors.scss +81 -0
  211. package/scss/themes/oggi/index.scss +54 -0
  212. package/scss/themes/oggi/typography.scss +5 -0
  213. package/scss/themes/streetgo/colors.scss +81 -0
  214. package/scss/themes/streetgo/index.scss +54 -0
  215. package/scss/themes/streetgo/typography.scss +5 -0
  216. package/css/aon-theme.css +0 -1
  217. package/css/bees-theme.css +0 -1
  218. package/css/bmc-theme.css +0 -1
  219. package/css/default-theme.css +0 -1
  220. package/css/linker-theme.css +0 -1
  221. package/css/oggi-theme.css +0 -1
  222. package/css/streetgo-theme.css +0 -1
  223. package/react/components/atoms/Button/Button.config.d.ts +0 -94
  224. package/react/components/atoms/Button/index.d.ts +0 -4
  225. package/react/components/atoms/Caption/Caption.config.d.ts +0 -6
  226. package/react/components/atoms/Caption/index.d.ts +0 -4
  227. package/react/components/atoms/Card/Card.config.d.ts +0 -76
  228. package/react/components/atoms/Card/index.d.ts +0 -4
  229. package/react/components/atoms/Checkbox/index.d.ts +0 -5
  230. package/react/components/atoms/Heading/Heading.config.d.ts +0 -23
  231. package/react/components/atoms/Heading/index.d.ts +0 -4
  232. package/react/components/atoms/HorizontalRule/HorizontalRule.config.d.ts +0 -32
  233. package/react/components/atoms/HorizontalRule/index.d.ts +0 -4
  234. package/react/components/atoms/Icon/Icon.config.d.ts +0 -129
  235. package/react/components/atoms/Icon/index.d.ts +0 -4
  236. package/react/components/atoms/Input/Input.config.d.ts +0 -151
  237. package/react/components/atoms/Input/index.d.ts +0 -4
  238. package/react/components/atoms/Loading/Loading.config.d.ts +0 -54
  239. package/react/components/atoms/Loading/index.d.ts +0 -4
  240. package/react/components/atoms/Option/Option.config.d.ts +0 -53
  241. package/react/components/atoms/Option/index.d.ts +0 -4
  242. package/react/components/atoms/Paragraph/Paragraph.config.d.ts +0 -20
  243. package/react/components/atoms/Paragraph/index.d.ts +0 -4
  244. package/react/components/atoms/Progress/Progress.config.d.ts +0 -31
  245. package/react/components/atoms/Progress/index.d.ts +0 -4
  246. package/react/components/atoms/Select/Select.config.d.ts +0 -125
  247. package/react/components/atoms/Select/index.d.ts +0 -4
  248. package/react/components/atoms/Subtitle/Subtitle.config.d.ts +0 -19
  249. package/react/components/atoms/Subtitle/index.d.ts +0 -4
  250. package/react/components/atoms/TextArea/TextArea.config.d.ts +0 -132
  251. package/react/components/atoms/TextArea/index.d.ts +0 -4
  252. package/react/components/atoms/Tooltip/Tooltip.config.d.ts +0 -38
  253. package/react/components/atoms/Tooltip/index.d.ts +0 -4
  254. package/react/components/bosons/Container/Container.config.d.ts +0 -18
  255. package/react/components/bosons/Container/index.d.ts +0 -4
  256. package/react/components/bosons/FlexLayout/FlexLayout.config.d.ts +0 -100
  257. package/react/components/bosons/FlexLayout/index.d.ts +0 -5
  258. package/react/components/bosons/GridLayout/GridLayout.config.d.ts +0 -82
  259. package/react/components/bosons/GridLayout/index.d.ts +0 -5
  260. package/react/components/bosons/Spacer/Spacer.config.d.ts +0 -25
  261. package/react/components/bosons/Spacer/index.d.ts +0 -4
  262. package/react/components/bosons/Wrapper/Wrapper.config.d.ts +0 -28
  263. package/react/components/bosons/Wrapper/index.d.ts +0 -4
  264. package/react/components/index.d.ts +0 -37
  265. package/react/components/molecules/Accordion/Accordion.config.d.ts +0 -25
  266. package/react/components/molecules/Accordion/AccordionItem.config.d.ts +0 -28
  267. package/react/components/molecules/Accordion/index.d.ts +0 -5
  268. package/react/components/molecules/ActiveTags/index.d.ts +0 -4
  269. package/react/components/molecules/EditableSelect/EditableSelect.config.d.ts +0 -105
  270. package/react/components/molecules/EditableSelect/index.d.ts +0 -4
  271. package/react/components/molecules/Indicator/index.d.ts +0 -4
  272. package/react/components/molecules/InlineEditable/index.d.ts +0 -4
  273. package/react/components/molecules/Modal/Modal.config.d.ts +0 -41
  274. package/react/components/molecules/Modal/index.d.ts +0 -4
  275. package/react/components/molecules/Notification/Notification.d.ts +0 -7
  276. package/react/components/molecules/Notification/index.d.ts +0 -5
  277. package/react/components/molecules/PasswordConfirmation/PasswordConfirmation.config.d.ts +0 -32
  278. package/react/components/molecules/PasswordConfirmation/index.d.ts +0 -4
  279. package/react/components/molecules/Stepper/index.d.ts +0 -4
  280. package/react/components/molecules/Table/Table.config.d.ts +0 -23
  281. package/react/components/molecules/Table/index.d.ts +0 -5
  282. package/react/components/molecules/Tabs/Tabs.config.d.ts +0 -45
  283. package/react/components/molecules/Tabs/index.d.ts +0 -6
  284. package/react/components/molecules/ThemeProvider/ThemeProvider.config.d.ts +0 -30
  285. package/react/components/organisms/NotificationList/NotificationList.config.d.ts +0 -33
  286. package/react/components/organisms/NotificationList/index.d.ts +0 -4
  287. package/react/components/templates/TwoColumns/index.d.ts +0 -5
  288. package/react/decorators/storybook.d.ts +0 -3
  289. package/react/types/hooks/types.d.ts +0 -99
  290. package/react/types/types.d.ts +0 -43
  291. /package/react/{components → src/components}/atoms/Button/Button.test.d.ts +0 -0
  292. /package/react/{components → src/components}/atoms/Caption/Caption.d.ts +0 -0
  293. /package/react/{components → src/components}/atoms/Caption/Caption.stories.d.ts +0 -0
  294. /package/react/{components → src/components}/atoms/Caption/Caption.test.d.ts +0 -0
  295. /package/react/{components → src/components}/atoms/Card/Card.stories.d.ts +0 -0
  296. /package/react/{components → src/components}/atoms/Card/Card.test.d.ts +0 -0
  297. /package/react/{components → src/components}/atoms/Checkbox/Checkbox.d.ts +0 -0
  298. /package/react/{components → src/components}/atoms/Checkbox/Checkbox.stories.d.ts +0 -0
  299. /package/react/{components → src/components}/atoms/Checkbox/Checkbox.test.d.ts +0 -0
  300. /package/react/{components → src/components}/atoms/Heading/Heading.d.ts +0 -0
  301. /package/react/{components → src/components}/atoms/Heading/Heading.stories.d.ts +0 -0
  302. /package/react/{components → src/components}/atoms/Heading/Heading.test.d.ts +0 -0
  303. /package/react/{components → src/components}/atoms/HorizontalRule/HorizontalRule.stories.d.ts +0 -0
  304. /package/react/{components → src/components}/atoms/HorizontalRule/HorizontalRule.test.d.ts +0 -0
  305. /package/react/{components → src/components}/atoms/Icon/Icon.test.d.ts +0 -0
  306. /package/react/{components → src/components}/atoms/Input/Input.d.ts +0 -0
  307. /package/react/{components → src/components}/atoms/Input/Input.test.d.ts +0 -0
  308. /package/react/{components → src/components}/atoms/Input/mask.d.ts +0 -0
  309. /package/react/{components → src/components}/atoms/Loading/Loading.stories.d.ts +0 -0
  310. /package/react/{components → src/components}/atoms/Loading/Loading.test.d.ts +0 -0
  311. /package/react/{components → src/components}/atoms/Option/Option.d.ts +0 -0
  312. /package/react/{components → src/components}/atoms/Option/Option.stories.d.ts +0 -0
  313. /package/react/{components → src/components}/atoms/Option/Option.test.d.ts +0 -0
  314. /package/react/{components → src/components}/atoms/Paragraph/Paragraph.d.ts +0 -0
  315. /package/react/{components → src/components}/atoms/Paragraph/Paragraph.stories.d.ts +0 -0
  316. /package/react/{components → src/components}/atoms/Paragraph/Paragraph.test.d.ts +0 -0
  317. /package/react/{components → src/components}/atoms/Progress/Progress.d.ts +0 -0
  318. /package/react/{components → src/components}/atoms/Progress/Progress.stories.d.ts +0 -0
  319. /package/react/{components → src/components}/atoms/Progress/Progress.test.d.ts +0 -0
  320. /package/react/{components → src/components}/atoms/Select/Select.d.ts +0 -0
  321. /package/react/{components → src/components}/atoms/Select/Select.test.d.ts +0 -0
  322. /package/react/{components → src/components}/atoms/Subtitle/Subtitle.d.ts +0 -0
  323. /package/react/{components → src/components}/atoms/Subtitle/Subtitle.stories.d.ts +0 -0
  324. /package/react/{components → src/components}/atoms/Subtitle/Subtitle.test.d.ts +0 -0
  325. /package/react/{components → src/components}/atoms/TextArea/TextArea.test.d.ts +0 -0
  326. /package/react/{components → src/components}/atoms/Tooltip/Tooltip.test.d.ts +0 -0
  327. /package/react/{components → src/components}/bosons/Container/Container.d.ts +0 -0
  328. /package/react/{components → src/components}/bosons/Container/Container.stories.d.ts +0 -0
  329. /package/react/{components → src/components}/bosons/Container/Container.test.d.ts +0 -0
  330. /package/react/{components → src/components}/bosons/FlexLayout/FlexElement.d.ts +0 -0
  331. /package/react/{components → src/components}/bosons/FlexLayout/FlexLayout.d.ts +0 -0
  332. /package/react/{components → src/components}/bosons/FlexLayout/FlexLayout.stories.d.ts +0 -0
  333. /package/react/{components → src/components}/bosons/FlexLayout/FlexLayout.test.d.ts +0 -0
  334. /package/react/{components → src/components}/bosons/GridLayout/GridElement.test.d.ts +0 -0
  335. /package/react/{components → src/components}/bosons/GridLayout/GridLayout.stories.d.ts +0 -0
  336. /package/react/{components → src/components}/bosons/GridLayout/GridLayout.test.d.ts +0 -0
  337. /package/react/{components → src/components}/bosons/Spacer/Spacer.d.ts +0 -0
  338. /package/react/{components → src/components}/bosons/Spacer/Spacer.test.d.ts +0 -0
  339. /package/react/{components → src/components}/bosons/Wrapper/Wrapper.d.ts +0 -0
  340. /package/react/{components → src/components}/bosons/Wrapper/Wrapper.stories.d.ts +0 -0
  341. /package/react/{components → src/components}/bosons/Wrapper/Wrapper.test.d.ts +0 -0
  342. /package/react/{components → src/components}/molecules/Accordion/Accordion.test.d.ts +0 -0
  343. /package/react/{components → src/components}/molecules/ActiveTags/ActiveTags.d.ts +0 -0
  344. /package/react/{components → src/components}/molecules/ActiveTags/ActiveTags.stories.d.ts +0 -0
  345. /package/react/{components → src/components}/molecules/ActiveTags/ActiveTags.test.d.ts +0 -0
  346. /package/react/{components/molecules/Modal/Modal.test.d.ts → src/components/molecules/Carousel/Carousel.test.d.ts} +0 -0
  347. /package/react/{components → src/components}/molecules/EditableSelect/EditableSelect.stories.d.ts +0 -0
  348. /package/react/{components → src/components}/molecules/EditableSelect/EditableSelect.test.d.ts +0 -0
  349. /package/react/{components → src/components}/molecules/Indicator/Indicator.d.ts +0 -0
  350. /package/react/{components → src/components}/molecules/Indicator/Indicator.stories.d.ts +0 -0
  351. /package/react/{components → src/components}/molecules/Indicator/Indicator.test.d.ts +0 -0
  352. /package/react/{components → src/components}/molecules/InlineEditable/InlineEditable.d.ts +0 -0
  353. /package/react/{components → src/components}/molecules/InlineEditable/InlineEditable.stories.d.ts +0 -0
  354. /package/react/{components → src/components}/molecules/InlineEditable/InlineEditable.test.d.ts +0 -0
  355. /package/react/{components → src/components}/molecules/Notification/Notification.test.d.ts +0 -0
  356. /package/react/{components → src/components}/molecules/PasswordConfirmation/PasswordConfirmartion.test.d.ts +0 -0
  357. /package/react/{components → src/components}/molecules/PasswordConfirmation/PasswordConfirmation.d.ts +0 -0
  358. /package/react/{components → src/components}/molecules/Stepper/Stepper.stories.d.ts +0 -0
  359. /package/react/{components → src/components}/molecules/Stepper/Stepper.test.d.ts +0 -0
  360. /package/react/{components → src/components}/molecules/Table/Table.test.d.ts +0 -0
  361. /package/react/{components → src/components}/molecules/Tabs/Tab.test.d.ts +0 -0
  362. /package/react/{components → src/components}/molecules/Tabs/Tabs.test.d.ts +0 -0
  363. /package/react/{components → src/components}/molecules/ThemeProvider/ThemeProvider.d.ts +0 -0
  364. /package/react/{components → src/components}/molecules/ThemeProvider/ThemeProvider.test.d.ts +0 -0
  365. /package/react/{components → src/components}/molecules/ThemeProvider/index.d.ts +0 -0
  366. /package/react/{components → src/components}/organisms/NotificationList/NotificationList.test.d.ts +0 -0
  367. /package/react/{components/templates/TwoColumns/TwoColumns.test.d.ts → src/components/templates/SplitLayout/SplitLayout.test.d.ts} +0 -0
  368. /package/react/{components → src/components}/templates/TwoColumns/TwoColumns.d.ts +0 -0
  369. /package/react/{decorators/storybook.test.d.ts → src/components/templates/TwoColumns/TwoColumns.test.d.ts} +0 -0
  370. /package/react/{main.d.ts → src/main.d.ts} +0 -0
@@ -1,20 +1,20 @@
1
- (function(O,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],u):(O=typeof globalThis<"u"?globalThis:O||self,u(O["react-lib"]={},O.jsxRuntime,O.React))})(this,function(O,u,g){"use strict";function mn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ht={exports:{}},Xe={exports:{}},W={};/** @license React v16.13.1
1
+ (function(h,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],u):(h=typeof globalThis<"u"?globalThis:h||self,u(h["react-lib"]={},h.jsxRuntime,h.React))})(this,function(h,u,m){"use strict";function Ta(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var St={exports:{}},et={exports:{}},H={};/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
- */var Rt;function yn(){if(Rt)return W;Rt=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,n=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,C=r?Symbol.for("react.memo"):60115,k=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,D=r?Symbol.for("react.responder"):60118,z=r?Symbol.for("react.scope"):60119;function w(p){if(typeof p=="object"&&p!==null){var E=p.$$typeof;switch(E){case e:switch(p=p.type,p){case c:case d:case s:case a:case n:case f:return p;default:switch(p=p&&p.$$typeof,p){case l:case h:case k:case C:case i:return p;default:return E}}case t:return E}}}function A(p){return w(p)===d}return W.AsyncMode=c,W.ConcurrentMode=d,W.ContextConsumer=l,W.ContextProvider=i,W.Element=e,W.ForwardRef=h,W.Fragment=s,W.Lazy=k,W.Memo=C,W.Portal=t,W.Profiler=a,W.StrictMode=n,W.Suspense=f,W.isAsyncMode=function(p){return A(p)||w(p)===c},W.isConcurrentMode=A,W.isContextConsumer=function(p){return w(p)===l},W.isContextProvider=function(p){return w(p)===i},W.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},W.isForwardRef=function(p){return w(p)===h},W.isFragment=function(p){return w(p)===s},W.isLazy=function(p){return w(p)===k},W.isMemo=function(p){return w(p)===C},W.isPortal=function(p){return w(p)===t},W.isProfiler=function(p){return w(p)===a},W.isStrictMode=function(p){return w(p)===n},W.isSuspense=function(p){return w(p)===f},W.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===s||p===d||p===a||p===n||p===f||p===v||typeof p=="object"&&p!==null&&(p.$$typeof===k||p.$$typeof===C||p.$$typeof===i||p.$$typeof===l||p.$$typeof===h||p.$$typeof===b||p.$$typeof===D||p.$$typeof===z||p.$$typeof===y)},W.typeOf=w,W}var R={};/** @license React v16.13.1
8
+ */var js;function Da(){if(js)return H;js=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,k=t?Symbol.for("react.suspense_list"):60120,b=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,I=t?Symbol.for("react.responder"):60118,q=t?Symbol.for("react.scope"):60119;function F(p){if(typeof p=="object"&&p!==null){var T=p.$$typeof;switch(T){case e:switch(p=p.type,p){case c:case d:case a:case r:case n:case g:return p;default:switch(p=p&&p.$$typeof,p){case o:case f:case C:case b:case i:return p;default:return T}}case s:return T}}}function w(p){return F(p)===d}return H.AsyncMode=c,H.ConcurrentMode=d,H.ContextConsumer=o,H.ContextProvider=i,H.Element=e,H.ForwardRef=f,H.Fragment=a,H.Lazy=C,H.Memo=b,H.Portal=s,H.Profiler=r,H.StrictMode=n,H.Suspense=g,H.isAsyncMode=function(p){return w(p)||F(p)===c},H.isConcurrentMode=w,H.isContextConsumer=function(p){return F(p)===o},H.isContextProvider=function(p){return F(p)===i},H.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},H.isForwardRef=function(p){return F(p)===f},H.isFragment=function(p){return F(p)===a},H.isLazy=function(p){return F(p)===C},H.isMemo=function(p){return F(p)===b},H.isPortal=function(p){return F(p)===s},H.isProfiler=function(p){return F(p)===r},H.isStrictMode=function(p){return F(p)===n},H.isSuspense=function(p){return F(p)===g},H.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===a||p===d||p===r||p===n||p===g||p===k||typeof p=="object"&&p!==null&&(p.$$typeof===C||p.$$typeof===b||p.$$typeof===i||p.$$typeof===o||p.$$typeof===f||p.$$typeof===y||p.$$typeof===I||p.$$typeof===q||p.$$typeof===_)},H.typeOf=F,H}var W={};/** @license React v16.13.1
9
9
  * react-is.development.js
10
10
  *
11
11
  * Copyright (c) Facebook, Inc. and its affiliates.
12
12
  *
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
- */var Yt;function _n(){return Yt||(Yt=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,n=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,C=r?Symbol.for("react.memo"):60115,k=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,D=r?Symbol.for("react.responder"):60118,z=r?Symbol.for("react.scope"):60119;function w(_){return typeof _=="string"||typeof _=="function"||_===s||_===d||_===a||_===n||_===f||_===v||typeof _=="object"&&_!==null&&(_.$$typeof===k||_.$$typeof===C||_.$$typeof===i||_.$$typeof===l||_.$$typeof===h||_.$$typeof===b||_.$$typeof===D||_.$$typeof===z||_.$$typeof===y)}function A(_){if(typeof _=="object"&&_!==null){var Ce=_.$$typeof;switch(Ce){case e:var pt=_.type;switch(pt){case c:case d:case s:case a:case n:case f:return pt;default:var gn=pt&&pt.$$typeof;switch(gn){case l:case h:case k:case C:case i:return gn;default:return Ce}}case t:return Ce}}}var p=c,E=d,M=l,U=i,P=e,re=h,de=s,pe=k,De=C,_e=t,je=a,le=n,ve=f,Ie=!1;function Ne(_){return Ie||(Ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),m(_)||A(_)===c}function m(_){return A(_)===d}function S(_){return A(_)===l}function L(_){return A(_)===i}function $(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function B(_){return A(_)===h}function x(_){return A(_)===s}function V(_){return A(_)===k}function j(_){return A(_)===C}function H(_){return A(_)===t}function F(_){return A(_)===a}function q(_){return A(_)===n}function ee(_){return A(_)===f}R.AsyncMode=p,R.ConcurrentMode=E,R.ContextConsumer=M,R.ContextProvider=U,R.Element=P,R.ForwardRef=re,R.Fragment=de,R.Lazy=pe,R.Memo=De,R.Portal=_e,R.Profiler=je,R.StrictMode=le,R.Suspense=ve,R.isAsyncMode=Ne,R.isConcurrentMode=m,R.isContextConsumer=S,R.isContextProvider=L,R.isElement=$,R.isForwardRef=B,R.isFragment=x,R.isLazy=V,R.isMemo=j,R.isPortal=H,R.isProfiler=F,R.isStrictMode=q,R.isSuspense=ee,R.isValidElementType=w,R.typeOf=A}()),R}var Gt;function Xt(){return Gt||(Gt=1,process.env.NODE_ENV==="production"?Xe.exports=yn():Xe.exports=_n()),Xe.exports}/*
15
+ */var Ps;function Fa(){return Ps||(Ps=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,k=t?Symbol.for("react.suspense_list"):60120,b=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,I=t?Symbol.for("react.responder"):60118,q=t?Symbol.for("react.scope"):60119;function F(S){return typeof S=="string"||typeof S=="function"||S===a||S===d||S===r||S===n||S===g||S===k||typeof S=="object"&&S!==null&&(S.$$typeof===C||S.$$typeof===b||S.$$typeof===i||S.$$typeof===o||S.$$typeof===f||S.$$typeof===y||S.$$typeof===I||S.$$typeof===q||S.$$typeof===_)}function w(S){if(typeof S=="object"&&S!==null){var Ae=S.$$typeof;switch(Ae){case e:var bt=S.type;switch(bt){case c:case d:case a:case r:case n:case g:return bt;default:var wa=bt&&bt.$$typeof;switch(wa){case o:case f:case C:case b:case i:return wa;default:return Ae}}case s:return Ae}}}var p=c,T=d,M=o,K=i,x=e,se=f,he=a,fe=C,Oe=b,_e=s,qe=r,ue=n,ke=g,Ie=!1;function $e(S){return Ie||(Ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),v(S)||w(S)===c}function v(S){return w(S)===d}function E(S){return w(S)===o}function j(S){return w(S)===i}function V(S){return typeof S=="object"&&S!==null&&S.$$typeof===e}function N(S){return w(S)===f}function D(S){return w(S)===a}function L(S){return w(S)===C}function P(S){return w(S)===b}function U(S){return w(S)===s}function O(S){return w(S)===r}function z(S){return w(S)===n}function ee(S){return w(S)===g}W.AsyncMode=p,W.ConcurrentMode=T,W.ContextConsumer=M,W.ContextProvider=K,W.Element=x,W.ForwardRef=se,W.Fragment=he,W.Lazy=fe,W.Memo=Oe,W.Portal=_e,W.Profiler=qe,W.StrictMode=ue,W.Suspense=ke,W.isAsyncMode=$e,W.isConcurrentMode=v,W.isContextConsumer=E,W.isContextProvider=j,W.isElement=V,W.isForwardRef=N,W.isFragment=D,W.isLazy=L,W.isMemo=P,W.isPortal=U,W.isProfiler=O,W.isStrictMode=z,W.isSuspense=ee,W.isValidElementType=F,W.typeOf=w}()),W}var qs;function zs(){return qs||(qs=1,process.env.NODE_ENV==="production"?et.exports=Da():et.exports=Fa()),et.exports}/*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
- */var ft,Kt;function vn(){if(Kt)return ft;Kt=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function s(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function n(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},l=0;l<10;l++)i["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(i).map(function(h){return i[h]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(h){d[h]=h}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ft=n()?Object.assign:function(a,i){for(var l,c=s(a),d,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var f in l)e.call(l,f)&&(c[f]=l[f]);if(r){d=r(l);for(var v=0;v<d.length;v++)t.call(l,d[v])&&(c[d[v]]=l[d[v]])}}return c},ft}var gt,Zt;function mt(){if(Zt)return gt;Zt=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gt=r,gt}var yt,Jt;function Qt(){return Jt||(Jt=1,yt=Function.call.bind(Object.prototype.hasOwnProperty)),yt}var _t,es;function kn(){if(es)return _t;es=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=mt(),t={},s=Qt();r=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(a,i,l,c,d){if(process.env.NODE_ENV!=="production"){for(var h in a)if(s(a,h)){var f;try{if(typeof a[h]!="function"){var v=Error((c||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}f=a[h](i,h,c,l,null,e)}catch(k){f=k}if(f&&!(f instanceof Error)&&r((c||"React class")+": type specification of "+l+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var C=d?d():"";r("Failed "+l+" type: "+f.message+(C??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},_t=n,_t}var vt,ts;function bn(){if(ts)return vt;ts=1;var r=Xt(),e=vn(),t=mt(),s=Qt(),n=kn(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return vt=function(l,c){var d=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function f(m){var S=m&&(d&&m[d]||m[h]);if(typeof S=="function")return S}var v="<<anonymous>>",C={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:z(),arrayOf:w,element:A(),elementType:p(),instanceOf:E,node:re(),objectOf:U,oneOf:M,oneOfType:P,shape:pe,exact:De};function k(m,S){return m===S?m!==0||1/m===1/S:m!==m&&S!==S}function y(m,S){this.message=m,this.data=S&&typeof S=="object"?S:{},this.stack=""}y.prototype=Error.prototype;function b(m){if(process.env.NODE_ENV!=="production")var S={},L=0;function $(x,V,j,H,F,q,ee){if(H=H||v,q=q||j,ee!==t){if(c){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ce=H+":"+j;!S[Ce]&&L<3&&(a("You are manually calling a React.PropTypes validation function for the `"+q+"` prop on `"+H+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),S[Ce]=!0,L++)}}return V[j]==null?x?V[j]===null?new y("The "+F+" `"+q+"` is marked as required "+("in `"+H+"`, but its value is `null`.")):new y("The "+F+" `"+q+"` is marked as required in "+("`"+H+"`, but its value is `undefined`.")):null:m(V,j,H,F,q)}var B=$.bind(null,!1);return B.isRequired=$.bind(null,!0),B}function D(m){function S(L,$,B,x,V,j){var H=L[$],F=le(H);if(F!==m){var q=ve(H);return new y("Invalid "+x+" `"+V+"` of type "+("`"+q+"` supplied to `"+B+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return b(S)}function z(){return b(i)}function w(m){function S(L,$,B,x,V){if(typeof m!="function")return new y("Property `"+V+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var j=L[$];if(!Array.isArray(j)){var H=le(j);return new y("Invalid "+x+" `"+V+"` of type "+("`"+H+"` supplied to `"+B+"`, expected an array."))}for(var F=0;F<j.length;F++){var q=m(j,F,B,x,V+"["+F+"]",t);if(q instanceof Error)return q}return null}return b(S)}function A(){function m(S,L,$,B,x){var V=S[L];if(!l(V)){var j=le(V);return new y("Invalid "+B+" `"+x+"` of type "+("`"+j+"` supplied to `"+$+"`, expected a single ReactElement."))}return null}return b(m)}function p(){function m(S,L,$,B,x){var V=S[L];if(!r.isValidElementType(V)){var j=le(V);return new y("Invalid "+B+" `"+x+"` of type "+("`"+j+"` supplied to `"+$+"`, expected a single ReactElement type."))}return null}return b(m)}function E(m){function S(L,$,B,x,V){if(!(L[$]instanceof m)){var j=m.name||v,H=Ne(L[$]);return new y("Invalid "+x+" `"+V+"` of type "+("`"+H+"` supplied to `"+B+"`, expected ")+("instance of `"+j+"`."))}return null}return b(S)}function M(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function S(L,$,B,x,V){for(var j=L[$],H=0;H<m.length;H++)if(k(j,m[H]))return null;var F=JSON.stringify(m,function(ee,_){var Ce=ve(_);return Ce==="symbol"?String(_):_});return new y("Invalid "+x+" `"+V+"` of value `"+String(j)+"` "+("supplied to `"+B+"`, expected one of "+F+"."))}return b(S)}function U(m){function S(L,$,B,x,V){if(typeof m!="function")return new y("Property `"+V+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var j=L[$],H=le(j);if(H!=="object")return new y("Invalid "+x+" `"+V+"` of type "+("`"+H+"` supplied to `"+B+"`, expected an object."));for(var F in j)if(s(j,F)){var q=m(j,F,B,x,V+"."+F,t);if(q instanceof Error)return q}return null}return b(S)}function P(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var S=0;S<m.length;S++){var L=m[S];if(typeof L!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ie(L)+" at index "+S+"."),i}function $(B,x,V,j,H){for(var F=[],q=0;q<m.length;q++){var ee=m[q],_=ee(B,x,V,j,H,t);if(_==null)return null;_.data&&s(_.data,"expectedType")&&F.push(_.data.expectedType)}var Ce=F.length>0?", expected one of type ["+F.join(", ")+"]":"";return new y("Invalid "+j+" `"+H+"` supplied to "+("`"+V+"`"+Ce+"."))}return b($)}function re(){function m(S,L,$,B,x){return _e(S[L])?null:new y("Invalid "+B+" `"+x+"` supplied to "+("`"+$+"`, expected a ReactNode."))}return b(m)}function de(m,S,L,$,B){return new y((m||"React class")+": "+S+" type `"+L+"."+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function pe(m){function S(L,$,B,x,V){var j=L[$],H=le(j);if(H!=="object")return new y("Invalid "+x+" `"+V+"` of type `"+H+"` "+("supplied to `"+B+"`, expected `object`."));for(var F in m){var q=m[F];if(typeof q!="function")return de(B,x,V,F,ve(q));var ee=q(j,F,B,x,V+"."+F,t);if(ee)return ee}return null}return b(S)}function De(m){function S(L,$,B,x,V){var j=L[$],H=le(j);if(H!=="object")return new y("Invalid "+x+" `"+V+"` of type `"+H+"` "+("supplied to `"+B+"`, expected `object`."));var F=e({},L[$],m);for(var q in F){var ee=m[q];if(s(m,q)&&typeof ee!="function")return de(B,x,V,q,ve(ee));if(!ee)return new y("Invalid "+x+" `"+V+"` key `"+q+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(L[$],null," ")+`
20
- Valid keys: `+JSON.stringify(Object.keys(m),null," "));var _=ee(j,q,B,x,V+"."+q,t);if(_)return _}return null}return b(S)}function _e(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(_e);if(m===null||l(m))return!0;var S=f(m);if(S){var L=S.call(m),$;if(S!==m.entries){for(;!($=L.next()).done;)if(!_e($.value))return!1}else for(;!($=L.next()).done;){var B=$.value;if(B&&!_e(B[1]))return!1}}else return!1;return!0;default:return!1}}function je(m,S){return m==="symbol"?!0:S?S["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&S instanceof Symbol:!1}function le(m){var S=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":je(S,m)?"symbol":S}function ve(m){if(typeof m>"u"||m===null)return""+m;var S=le(m);if(S==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return S}function Ie(m){var S=ve(m);switch(S){case"array":case"object":return"an "+S;case"boolean":case"date":case"regexp":return"a "+S;default:return S}}function Ne(m){return!m.constructor||!m.constructor.name?v:m.constructor.name}return C.checkPropTypes=n,C.resetWarningCache=n.resetWarningCache,C.PropTypes=C,C},vt}var kt,ss;function Sn(){if(ss)return kt;ss=1;var r=mt();function e(){}function t(){}return t.resetWarningCache=e,kt=function(){function s(i,l,c,d,h,f){if(f!==r){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},kt}if(process.env.NODE_ENV!=="production"){var Cn=Xt(),En=!0;ht.exports=bn()(Cn.isElement,En)}else ht.exports=Sn()();var Tn=ht.exports;const o=mn(Tn),ns={Primary:"primary",Secondary:"secondary",Info:"info",Success:"success",Danger:"danger",Warning:"warning",Neutral:"neutral"},as={Solid:"solid",Outline:"outline",Text:"text"},rs={Large:"lg",Medium:"md",Small:"sm"},is={Right:"right",Left:"left"},Y={name:"Button",class:"ds-button",props:{color:{type:String,default:ns.Primary,options:Object.values(ns)},variant:{type:String,default:as.Solid,options:Object.values(as)},size:{type:String,default:rs.Medium,options:Object.values(rs)},elevation:{type:Number,options:[1,2,3,4]},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconFill:{type:Boolean,default:!0},iconPosition:{type:String,default:is.Right,options:Object.values(is)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}},os={Primary:"primary",PrimaryLightest:"primary-lightest",PrimaryLighter:"primary-lighter",PrimaryLight:"primary-light",PrimaryDark:"primary-dark",PrimaryDarker:"primary-darker",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",Secondary:"secondary",SecondaryLightest:"secondary-lightest",SecondaryLighter:"secondary-lighter",SecondaryLight:"secondary-light",SecondaryDark:"secondary-dark",SecondaryDarker:"secondary-darker",Success:"success",SuccessLighter:"success-lighter",SuccessLight:"success-light",SuccessDark:"success-dark",Warning:"warning",WarningLighter:"warning-lighter",WarningLight:"warning-light",WarningDark:"warning-dark",Danger:"danger",DangerLighter:"danger-lighter",DangerLight:"danger-light",DangerDark:"danger-dark",Info:"info",InfoLighter:"info-lighter",InfoLight:"info-light",InfoDark:"info-dark"},ls={Outlined:"outlined",Rounded:"rounded",Sharp:"sharp"},us={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl",Huge:"huge"},cs={Bold:"bold",Semibold:"semibold",Medium:"medium",Regular:"regular",Light:"light",Extralight:"extralight"},ie={name:"Icon",class:"ds-icon",props:{color:{type:String,default:os.Neutral90,options:Object.values(os)},image:{type:String,default:"settings"},variation:{type:String,default:ls.Outlined,options:Object.values(ls)},size:{type:String,default:us.MD,options:Object.values(us)},fontVariationSettings:{type:Object,default:{fill:0,grad:0,weight:500,opticalSize:48}},fill:{type:Boolean,default:!1},testId:{type:String,default:"ds-icon-test"},weight:{type:String,default:cs.Semibold,options:Object.values(cs)},onClick:{type:Function,default:()=>({})}}},An={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},X=({image:r=ie.props.image.default,color:e=ie.props.color.default,className:t,size:s=ie.props.size.default,fill:n=ie.props.fill.default,weight:a=ie.props.weight.default,testId:i=ie.props.testId.default,onClick:l=ie.props.onClick.default})=>{const c="material-symbols-rounded",d=e&&ie.props.color.options.find(f=>f===e)&&`${ie.class}__color--${e}`,h=g.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${An[a]}, 'opsz' 48`}),[a,n]);return u.jsx("i",{className:[`${ie.class}--${s}`,ie.class,c,d,t&&t].filter(f=>f).join(" "),"data-testid":i,onClick:l,style:h,translate:"no",children:r})};X.propTypes={color:o.oneOf(ie.props.color.options),image:o.string,fontVariationSettings:o.object,size:o.oneOf(ie.props.size.options),fill:o.bool,weight:o.oneOf(ie.props.weight.options),onClick:o.func},X.displayName="DsIcon";const He=({children:r,className:e,onClick:t,size:s=Y.props.size.default,disabled:n=Y.props.disabled.default,icon:a=Y.props.icon.default,id:i=Y.props.id.default,testId:l=Y.props.testId.default,elevation:c,variant:d=Y.props.variant.default,color:h=Y.props.color.default,iconFill:f=Y.props.iconFill.default,iconPosition:v=Y.props.iconPosition.default,fullSize:C=Y.props.fullSize.default})=>{const k=s&&Y.props.size.options.find(E=>E===s)?`${Y.class}--${s}`:`${Y.class}__${Y.props.size.default}`,y=n&&`${Y.class}--disabled`,b=`${Y.class}__${h}--${d}`,D=c&&`${Y.class}--elevation-${c}`,z=a&&`${Y.class}--with-icon`,w=C?`${Y.class}--full-size`:"",A=v==="right"?`${Y.class}__icon`:`${Y.class}__icon--left`,p=v==="right"?`${Y.class}__text`:`${Y.class}__text--reversed`;return u.jsx("button",{className:[Y.class,w,y,z,k,b,D,z,e&&e].filter(E=>E).join(" "),"data-testid":l,disabled:n,id:i,onClick:n?void 0:t,children:u.jsxs("span",{className:["ds-button__text",p].join(" "),children:[r,a&&u.jsx(X,{className:["ds-button__icon",A].join(" "),fill:f,image:a,size:s})]})})};He.propTypes={color:o.oneOf(Y.props.color.options),variant:o.oneOf(Y.props.variant.options),size:o.oneOf(Y.props.size.options),disabled:o.bool,icon:o.string,iconFill:o.bool,iconPosition:o.oneOf(Y.props.iconPosition.options),testId:o.string,id:o.string,fullSize:o.bool},He.displayName="DsButton";const xn={name:"Caption",class:"ds-caption"},bt=({children:r,className:e,testId:t="ds-caption-test"})=>u.jsx("p",{className:[xn.class,e&&e].filter(s=>s).join(" "),"data-testid":t,children:r});bt.propTypes={children:o.node.isRequired,className:o.string,testId:o.string},bt.displayName="DsCaption";const Ke={None:"",PrimaryDarker:"primary-darker",PrimaryDark:"primary-dark",Primary:"primary",PrimaryLight:"primary-light",PrimaryLighter:"primary-lighter",PrimaryLightest:"primary-lightest",SecondaryDarker:"secondary-darker",SecondaryDark:"secondary-dark",Secondary:"secondary",SecondaryLight:"secondary-light",SecondaryLighter:"secondary-lighter",SecondaryLightest:"secondary-lightest",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",SuccessDark:"success-dark",Success:"success",SuccessLight:"success-light",SuccessLighter:"success-lighter",WarningDark:"warning-dark",Warning:"warning",WarningLight:"warning-light",WarningLighter:"warning-lighter",DangerDark:"danger-dark",Danger:"danger",DangerLight:"danger-light",DangerLighter:"danger-lighter",InfoDark:"info-dark",Info:"info",InfoLight:"info-light",InfoLighter:"info-lighter"},fe={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:Ke.None,options:Object.values(Ke)},borderColor:{type:String,default:Ke.None,options:Object.values(Ke)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},St=({id:r,testId:e=fe.props.testId.default,children:t,className:s,elevation:n=fe.props.elevation.default,backgroundColor:a=fe.props.backgroundColor.default,borderColor:i=fe.props.borderColor.default})=>{const l=n&&`${fe.class}--elevation-${n}`,c=i&&`${fe.class}--border-${i}`,d=a&&`${fe.class}--${a}`;return u.jsx("div",{className:[fe.class,s,l,c,d].filter(h=>h).join(" "),"data-testid":e,id:r,children:t})};St.propTypes={id:o.string,testId:o.string,backgroundColor:o.oneOf(fe.props.backgroundColor.options),borderColor:o.oneOf(fe.props.borderColor.options),elevation:o.oneOf(fe.props.elevation.options)},St.displayName="DsCard";const ae={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:"ds-checkbox-test"},label:{type:String,default:""},description:{type:String,default:""},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},changeByChecked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Ct=g.forwardRef(({id:r,className:e,name:t,testId:s=ae.props.testId.default,label:n=ae.props.label.default,description:a=ae.props.description.default,checked:i=ae.props.checked.default,disabled:l=ae.props.checked.default,changeByChecked:c=ae.props.changeByChecked.default,onChangeHandler:d},h)=>{const f=c||!1,v=i||!1,[C,k]=g.useState(v),y={image:C?"check_box":"check_box_outline_blank",class:C?`${ae.class}__icon--checked`:`${ae.class}__icon--unchecked`},b=l&&`${ae.class}--disabled`,D=z=>{l||(k(w=>!w),d&&d(z))};return g.useEffect(()=>{f&&k(i)},[i,f]),u.jsxs("label",{className:[ae.class,b,e&&e].join(" "),htmlFor:r||t,children:[u.jsx("input",{checked:C,className:`${ae.class}__input`,"data-testid":s,id:r||t,name:t,onChange:D,ref:h,type:"checkbox"}),u.jsx(X,{className:`${ae.class}__icon ${y.class}`,fill:!0,image:y.image,size:"xxl",testId:`${s}-icon`}),(a||n)&&u.jsxs("div",{className:`${ae.class}__label`,children:[n&&u.jsx("label",{className:`${ae.class}__label-title`,htmlFor:r||t,children:n}),a&&u.jsx("label",{className:`${ae.class}__label-description`,htmlFor:r||t,children:a})]})]})});Ct.propTypes={label:o.oneOfType([o.string,o.node]),name:o.string,className:o.string,testId:o.string,description:o.oneOfType([o.string,o.node]),checked:o.bool,disabled:o.bool},Ct.displayName="DsCheckbox";const ds={Heading1:"heading-1",Heading2:"heading-2",Heading3:"heading-3",Heading4:"heading-4",Heading5:"heading-5",Heading6:"heading-6"},We={name:"Heading",class:"ds-heading",props:{type:{type:String,default:ds.Heading1,options:Object.values(ds)}}},Et=({children:r,testId:e="ds-heading-test",type:t=We.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=We.props.type.options.find(c=>c===t)&&`${We.class}--${t}`,l=n[t];return u.jsx(l,{className:[We.class,a,s&&s].filter(c=>c).join(" "),"data-testid":e,children:r})};Et.propTypes={className:o.string,testId:o.string,type:o.oneOf(We.props.type.options)},Et.displayName="DsHeading";const ps={None:"",Dashed:"dashed",Dotted:"dotted"},hs={None:"",Small:"small",Large:"large"},Me={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:ps.None,options:Object.values(ps)},size:{type:String,default:hs.None,options:Object.values(hs)}}};function fs(r,e,t){const s=t.props[r];return s.options&&s.options.some(n=>n===e)?`${t.class}--${e}`:""}const Tt=({size:r=Me.props.size.default,borderStyle:e=Me.props.borderStyle.default})=>{const t=fs("size",r,Me),s=fs("borderStyle",e,Me);return u.jsx("hr",{className:`${Me.class} ${t} ${s}`.trim()})};Tt.propTypes={size:o.oneOf(Me.props.size.options),borderStyle:o.oneOf(Me.props.borderStyle.options)},Tt.displayName="DsHR";function Oe(r){return typeof r=="string"||r instanceof String}function gs(r){var e;return typeof r=="object"&&r!=null&&(r==null||(e=r.constructor)==null?void 0:e.name)==="Object"}function ms(r,e){return Array.isArray(e)?ms(r,(t,s)=>e.includes(s)):Object.entries(r).reduce((t,s)=>{let[n,a]=s;return e(a,n)&&(t[n]=a),t},{})}const T={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function wn(r){switch(r){case T.LEFT:return T.FORCE_LEFT;case T.RIGHT:return T.FORCE_RIGHT;default:return r}}function At(r){return r.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ze(r,e){if(e===r)return!0;const t=Array.isArray(e),s=Array.isArray(r);let n;if(t&&s){if(e.length!=r.length)return!1;for(n=0;n<e.length;n++)if(!Ze(e[n],r[n]))return!1;return!0}if(t!=s)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){const a=e instanceof Date,i=r instanceof Date;if(a&&i)return e.getTime()==r.getTime();if(a!=i)return!1;const l=e instanceof RegExp,c=r instanceof RegExp;if(l&&c)return e.toString()==r.toString();if(l!=c)return!1;const d=Object.keys(e);for(n=0;n<d.length;n++)if(!Object.prototype.hasOwnProperty.call(r,d[n]))return!1;for(n=0;n<d.length;n++)if(!Ze(r[d[n]],e[d[n]]))return!1;return!0}else if(e&&r&&typeof e=="function"&&typeof r=="function")return e.toString()===r.toString();return!1}class Fn{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?T.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?T.RIGHT:T.LEFT}}function I(r,e){return new I.InputMask(r,e)}function ys(r){if(r==null)throw new Error("mask property should be defined");return r instanceof RegExp?I.MaskedRegExp:Oe(r)?I.MaskedPattern:r===Date?I.MaskedDate:r===Number?I.MaskedNumber:Array.isArray(r)||r===Array?I.MaskedDynamic:I.Masked&&r.prototype instanceof I.Masked?r:I.Masked&&r instanceof I.Masked?r.constructor:r instanceof Function?I.MaskedFunction:(console.warn("Mask not found for mask",r),I.Masked)}function Re(r){if(!r)throw new Error("Options in not defined");if(I.Masked){if(r.prototype instanceof I.Masked)return{mask:r};const{mask:e=void 0,...t}=r instanceof I.Masked?{mask:r}:gs(r)&&r.mask instanceof I.Masked?r:{};if(e){const s=e.mask;return{...ms(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return gs(r)?{...r}:{mask:r}}function Ee(r){if(I.Masked&&r instanceof I.Masked)return r;const e=Re(r),t=ys(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}I.createMask=Ee;class xt{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}I.MaskElement=xt;const _s=90,Dn=89;class Je extends xt{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===_s&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Dn&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===_s&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}I.HTMLMaskElement=Je;class In extends Je{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}I.HTMLMaskElement=Je;class vs extends Je{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}I.HTMLContenteditableMaskElement=vs;class Qe{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Qe.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Qe.MAX_LENGTH=100;class On{constructor(e,t){this.el=e instanceof xt?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new vs(e):new In(e),this.masked=Ee(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Qe,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof I.Masked)&&this.masked.constructor===ys(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof I.Masked?e:Ee({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(n=>n(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=t,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,n=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);n&&(this.mask=t),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,T.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new Fn({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:T.NONE;let i=this.masked.nearestInputPos(t.startChangePos+n,a);a!==T.NONE&&(i=this.masked.nearestInputPos(i,T.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}I.InputMask=On;class N{static normalize(e){return Array.isArray(e)?e:[e,new N]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}I.ChangeDetails=N;class ke{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class se{constructor(e){this._value="",this._update({...se.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new ke(this.extractInput(e,t),e)}appendTail(e){return Oe(e)&&(e=new ke(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new N({inserted:e,rawInserted:e})):new N}_appendChar(e,t,s){t===void 0&&(t={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let l=this.pad(t);const c=this._appendCharRaw(e,t);l=l.aggregate(c),c.rawInserted||l.equals(a)?a=l:this.state=i}if(a.inserted){let i,l=this.doValidate(t)!==!1;if(l&&s!=null){const c=this.state;if(this.overwrite===!0){i=s.state;for(let h=0;h<a.rawInserted.length;++h)s.unshift(this.displayValue.length-a.tailShift)}let d=this.appendTail(s);if(l=d.rawInserted.length===s.toString().length,!(l&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=s.state;for(let h=0;h<a.rawInserted.length;++h)s.shift();d=this.appendTail(s),l=d.rawInserted.length===s.toString().length}l&&d.inserted&&(this.state=c)}l||(a=new N,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new N}_appendEager(){return new N}append(e,t,s){if(!Oe(e))throw new Error("value should be string");const n=Oe(s)?new ke(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let i=0;i<e.length;++i){const l=this._appendChar(e[i],t,n);if(!l.rawInserted&&!this.doSkipInvalid(e[i],t,n))break;a.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new N}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),N.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),N.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,n,a){s===void 0&&(s=""),n===void 0&&(n=T.NONE),a===void 0&&(a={input:!0});const i=e+t,l=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(n=wn(n),d=this.extractInput(0,i,{raw:!0}));let h=e;const f=new N;if(n!==T.NONE&&(h=this.nearestInputPos(e,t>1&&e!==0&&!c?T.NONE:n),f.tailShift=h-e),f.aggregate(this.remove(h)),c&&n!==T.NONE&&d===this.rawInputValue)if(n===T.FORCE_LEFT){let v;for(;d===this.rawInputValue&&(v=this.displayValue.length);)f.aggregate(new N({tailShift:-1})).aggregate(this.remove(v-1))}else n===T.FORCE_RIGHT&&l.unshift();return f.aggregate(this.append(s,a,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Ze(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||se.EMPTY_VALUES.includes(e)&&se.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new N}}se.DEFAULTS={skipInvalid:!0},se.EMPTY_VALUES=[void 0,null,""],I.Masked=se;class $e{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Oe(e)?new ke(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof ke)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof $e){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof I.MaskedPattern))return new ke(this.toString()).appendTo(e);const t=new N;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let l;if(i!=null&&(!a||a.index<=i)&&((n instanceof $e||e._stops.indexOf(i)>=0)&&t.aggregate(e._appendPlaceholder(i)),l=n instanceof $e&&e._blocks[i]),l){const c=l.appendTail(n);t.aggregate(c);const d=n.toString().slice(c.rawInserted.length);d&&t.aggregate(e.append(d,{tail:!0}))}else t.aggregate(e.append(n.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(n=>{const a="chunks"in n?new $e:new ke;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(t);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class Bn{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,T.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,T.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,T.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,T.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,T.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,T.NONE),!0})}}class ks{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new N}nearestInputPos(e,t){t===void 0&&(t=T.NONE);const s=0,n=this._value.length;switch(t){case T.LEFT:case T.FORCE_LEFT:return s;case T.NONE:case T.RIGHT:case T.FORCE_RIGHT:default:return n}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new N;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,i=new N({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new N;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new ke("")}appendTail(e){return Oe(e)&&(e=new ke(String(e))),e.appendTo(this)}append(e,t,s){const n=this._appendChar(e[0],t);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class et{constructor(e){const{parent:t,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:l,...c}=e;this.masked=Ee(c),Object.assign(this,{parent:t,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new N}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new N;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(t));return n.inserted&&this.doValidate(t)===!1&&(n=new N,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new N:(this.isFilled=!0,new N({inserted:this.placeholderChar}))}_appendEager(){return new N}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=T.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(t){case T.LEFT:case T.FORCE_LEFT:return this.isComplete?a:s;case T.RIGHT:case T.FORCE_RIGHT:return this.isComplete?a:n;case T.NONE:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new N}}et.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Nn extends se{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}I.MaskedRegExp=Nn;class ne extends se{constructor(e){super({...ne.DEFAULTS,...e,definitions:Object.assign({},et.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,n=!1;for(let a=0;a<t.length;++a){if(this.blocks){const d=t.slice(a),h=Object.keys(this.blocks).filter(v=>d.indexOf(v)===0);h.sort((v,C)=>C.length-v.length);const f=h[0];if(f){const{expose:v,repeat:C,...k}=Re(this.blocks[f]),y={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...k,repeat:C,parent:this},b=C!=null?new I.RepeatBlock(y):Ee(y);b&&(this._blocks.push(b),v&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let i=t[a],l=i in e;if(i===ne.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===ne.ESCAPE_CHAR){if(++a,i=t[a],!i)break;l=!1}const c=l?new et({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Re(e[i]),parent:this}):new ks({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((n,a)=>n.state=t[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new N;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),n=new N;if(!s)return n;for(let i=s.index,l;l=this._blocks[i];++i){var a;const c=l._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(c),c.consumed)break}return n}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new $e;return e===t||this._forEachBlocksInRange(e,t,(n,a,i,l)=>{const c=n.extractTail(i,l);c.stop=this._findStopBefore(a),c.from=this._blockStartPos(a),c instanceof $e&&(c.blockIndex=a),s.extend(c)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let n="";return this._forEachBlocksInRange(e,t,(a,i,l,c)=>{n+=a.extractInput(l,c,s)}),n}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)t=n;else break}return t}_appendPlaceholder(e){const t=new N;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var l;t.aggregate(i._appendPlaceholder((l=i._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=t.length;if(t+=n.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(t),i=a&&n.index===a.index,l=n.offset,c=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,l,c),a&&!i){for(let d=n.index+1;d<a.index;++d)s(this._blocks[d],d,0,this._blocks[d].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(n,a,i,l)=>{s.aggregate(n.remove(i,l))}),s}nearestInputPos(e,t){if(t===void 0&&(t=T.NONE),!this._blocks.length)return 0;const s=new Bn(this,e);if(t===T.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===T.LEFT||t===T.FORCE_LEFT){if(t===T.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===T.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===T.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===T.RIGHT||t===T.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===T.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,T.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(n,a,i,l)=>{s+=n.totalInputPositions(i,l)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new N;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}ne.DEFAULTS={...se.DEFAULTS,lazy:!0,placeholderChar:"_"},ne.STOP_CHAR="`",ne.ESCAPE_CHAR="\\",ne.InputDefinition=et,ne.FixedDefinition=ks,I.MaskedPattern=ne;class tt extends ne{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,n),this.autofix=a;const l=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===l[d];)++d;i.mask=c.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(n.length)+a,s="9".repeat(n.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(n[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(t);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new N;if(this.value.length===this.maxLength)return t;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}}I.MaskedRange=tt;class Te extends ne{static extractPatternOptions(e){const{mask:t,pattern:s,...n}=e;return{...n,mask:Oe(t)?t:s}}constructor(e){super(Te.extractPatternOptions({...Te.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:n,...a}={...Te.DEFAULTS,...e},i=Object.assign({},Te.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:Oe(t)?t:s,blocks:i})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Te.extractPatternOptions(e))}}Te.GET_DEFAULT_BLOCKS=()=>({d:{mask:tt,from:1,to:31,maxLength:2},m:{mask:tt,from:1,to:12,maxLength:2},Y:{mask:tt,from:1900,to:9999}}),Te.DEFAULTS={...ne.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(r,e)=>{if(!r)return"";const t=String(r.getDate()).padStart(2,"0"),s=String(r.getMonth()+1).padStart(2,"0"),n=r.getFullYear();return[t,s,n].join(".")},parse:(r,e)=>{const[t,s,n]=r.split(".").map(Number);return new Date(n,s-1,t)}},I.MaskedDate=Te;class st extends se{constructor(e){super({...st.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...n}=Re(t),a=Ee({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const n=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,i=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,l=a.slice(i.length),c=this.currentMask,d=new N,h=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-n.length),l&&(d.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):h&&(this.currentMask.state=h)),d}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new N;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,n]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,t){t===void 0&&(t={});let[s,n]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new N;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:n,...a}=e;t&&this.compiledMasks.forEach((i,l)=>i.state=t[l]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return Ze(t,a)&&t.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}st.DEFAULTS={...se.DEFAULTS,dispatch:(r,e,t,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,l)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,T.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):c||i.remove(d),i.append(r,e.currentMaskFlags(t)),i.appendTail(s),{index:l,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,T.FORCE_LEFT)))}});return a.sort((i,l)=>l.weight-i.weight||l.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},I.MaskedDynamic=st;class nt extends ne{constructor(e){super({...nt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const n=t.map(l=>l.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,T.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,l)=>{const c=n[0][l];l>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,t))});const a=super._appendCharRaw(n[0][this.value.length],t);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new N({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new ke("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new N;const s=Math.min(super.nearestInputPos(0,T.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(l=>this.matchValue(l,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,t);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}nt.DEFAULTS={...ne.DEFAULTS,matchValue:(r,e,t)=>r.indexOf(e,t)===t},I.MaskedEnum=nt;class Mn extends se{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}I.MaskedFunction=Mn;var bs;class ue extends se{constructor(e){super({...ue.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+At(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(At).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(At(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let l=!isNaN(i),c=!1;if(l){let v;this.min!=null&&this.min<0&&this.number<this.min&&(v=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(v=this.max),v!=null&&(this.autofix?(this._value=this.format(v,this).replace(ue.UNMASKED_RADIX,this.radix),c||(c=a===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let d;l?d=new N({inserted:this._value.slice(a.length),rawInserted:c?"":e,skip:c}):(this._value=a,d=new N),this._value=this._insertThousandsSeparators(this._value);const h=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,f=this._separatorsCountFromSlice(h);return d.tailShift+=(f-n)*this.thousandsSeparator.length,d}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(t);return n>=0&&(t=n+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),n=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new N({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case T.NONE:case T.LEFT:case T.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||t===T.FORCE_LEFT)return s}break}case T.RIGHT:case T.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===ue.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,ue.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(ue.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||ue.EMPTY_VALUES.includes(e)&&ue.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}bs=ue,ue.UNMASKED_RADIX=".",ue.EMPTY_VALUES=[...se.EMPTY_VALUES,0],ue.DEFAULTS={...se.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[bs.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:r=>r.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},I.MaskedNumber=ue;const wt={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ss(r,e,t){e===void 0&&(e=wt.MASKED),t===void 0&&(t=wt.MASKED);const s=Ee(r);return n=>s.runIsolated(a=>(a[e]=n,a[t]))}function $n(r,e,t,s){return Ss(e,t,s)(r)}I.PIPE_TYPE=wt,I.createPipe=Ss,I.pipe=$n;class Vn extends ne{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,n;const{repeat:a,...i}=Re(e);this._blockOpts=Object.assign({},this._blockOpts,i);const l=Ee(this._blockOpts);this.repeat=(t=(s=a??l.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ee(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new N;for(let c=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),d,h;d=(i=this._blocks[c])!=null?i:h=!h&&this._allocateBlock(c);++c){var n,a,i,l;const f=d._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[c]});if(f.skip&&h){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(f),f.consumed)break}return s}_trimEmptyTail(e,t){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;t!=null&&(i=(n=this._mapPosToBlock(t))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let l=0;for(let c=i;a<=c&&!this._blocks[c].unmaskedValue;--c,++l);l&&(this._blocks.splice(i-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}I.RepeatBlock=Vn;try{globalThis.IMask=I}catch{}const Cs={mask:o.oneOfType([o.array,o.func,o.string,o.instanceOf(RegExp),o.oneOf([Date,Number,I.Masked]),o.instanceOf(I.Masked)]),value:o.any,unmask:o.oneOfType([o.bool,o.oneOf(["typed"])]),prepare:o.func,prepareChar:o.func,validate:o.func,commit:o.func,overwrite:o.oneOfType([o.bool,o.oneOf(["shift"])]),eager:o.oneOfType([o.bool,o.oneOf(["append","remove"])]),skipInvalid:o.bool,onAccept:o.func,onComplete:o.func,placeholderChar:o.string,displayChar:o.string,lazy:o.bool,definitions:o.object,blocks:o.object,enum:o.arrayOf(o.string),maxLength:o.number,from:o.number,to:o.number,pattern:o.string,format:o.func,parse:o.func,autofix:o.oneOfType([o.bool,o.oneOf(["pad"])]),radix:o.string,thousandsSeparator:o.string,mapToRadix:o.arrayOf(o.string),scale:o.number,normalizeZeros:o.bool,padFractionalZeros:o.bool,min:o.oneOfType([o.number,o.instanceOf(Date)]),max:o.oneOfType([o.number,o.instanceOf(Date)]),dispatch:o.func,inputRef:o.oneOfType([o.func,o.shape({current:o.object})])},Es=Object.keys(Cs).filter(r=>r!=="value"),Ln=["value","unmask","onAccept","onComplete","inputRef"],Pn=Es.filter(r=>Ln.indexOf(r)<0);function jn(r){var e;const t=(e=class extends g.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var l;(l=this.element)!=null&&l.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=I(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...i}=a;return Object.keys(i).filter(l=>Pn.indexOf(l)<0).forEach(l=>{delete i[l]}),i}_extractNonMaskProps(a){const{...i}=a;return Es.forEach(l=>{l!=="maxLength"&&delete i[l]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return g.createElement(r,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=r.displayName||r.name||"Component";return t.displayName="IMask("+s+")",t.propTypes=Cs,g.forwardRef((n,a)=>g.createElement(t,{...n,ref:a}))}const zn=jn(r=>{let{inputRef:e,...t}=r;return g.createElement("input",{...t,ref:e})}),qn=(r,e)=>g.createElement(zn,{...r,ref:e});g.forwardRef(qn);function Un(r,e){let{onAccept:t,onComplete:s,ref:n=g.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:l}=e===void 0?{}:e;const c=g.useRef(null),[d,h]=g.useState({}),[f,v]=g.useState(""),[C,k]=g.useState(""),[y,b]=g.useState(),D=g.useCallback(()=>{var p;(p=c.current)==null||p.destroy(),c.current=null},[]),z=g.useCallback(()=>{const p=c.current;p&&(h({value:p.value,unmaskedValue:p.unmaskedValue,typedValue:p.typedValue}),b(p.typedValue),k(p.unmaskedValue),v(p.value))},[]),w=g.useCallback(p=>{const E=c.current;E&&(z(),t==null||t(E.value,E,p))},[t]),A=g.useCallback(p=>c.current&&(s==null?void 0:s(c.current.value,c.current,p)),[s]);return g.useEffect(()=>{const{value:p,...E}=d,M=c.current;!M||f===void 0||(p!==f&&(M.value=f,M.value!==f&&w()),h(E))},[f]),g.useEffect(()=>{const{unmaskedValue:p,...E}=d,M=c.current;!M||C===void 0||(p!==C&&(M.unmaskedValue=C,M.unmaskedValue!==C&&w()),h(E))},[C]),g.useEffect(()=>{const{typedValue:p,...E}=d,M=c.current;!M||y===void 0||(p!==y&&(M.typedValue=y,M.masked.typedValueEquals(y)||w()),h(E))},[y]),g.useEffect(()=>{const p=n.current;if(!p||!(r!=null&&r.mask))return D();const E=c.current;E?E==null||E.updateOptions(r):p&&r!=null&&r.mask&&(c.current=I(p,r),z(),a!==void 0&&v(a),i!==void 0&&k(i),l!==void 0&&b(l))},[r,D,w]),g.useEffect(()=>{if(!c.current)return;const p=c.current;return p.on("accept",w),p.on("complete",A),()=>{p.off("accept",w),p.off("complete",A)}},[w,A]),g.useEffect(()=>D,[D]),{ref:n,maskRef:c,value:f,setValue:v,unmaskedValue:C,setUnmaskedValue:k,typedValue:y,setTypedValue:b}}const Ts={Text:"text",Password:"password",Email:"email",Date:"date",Number:"number"},As={Small:"small",Medium:"medium",Large:"large"},xs={Default:"",Error:"error",Success:"success"},ws={Center:"center",End:"end",Initial:"initial"},Fs={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},K={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-input-test"},type:{type:String,default:Ts.Text,options:Object.values(Ts)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:As.Medium,options:Object.values(As)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:xs.Default,options:Object.values(xs)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!0},noMargin:{type:Boolean,default:!1},icon:{type:String,default:""},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:ws.Center,options:Object.values(ws)},tooltipPosition:{type:String,default:Fs.Top,options:Object.values(Fs)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},Ds={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(r,e)=>(e.value+r).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}},Is={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Os={Center:"center",End:"end",Initial:"initial"},Ae={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:Is.Top,options:Object.values(Is)},placement:{type:String,default:Os.Center,options:Object.values(Os)},text:{type:String,default:""}}},Ve=({children:r,position:e=Ae.props.position.default,placement:t=Ae.props.placement.default,text:s=Ae.props.text.default,className:n})=>{const a=g.useRef(null),[i,l]=g.useState(0),[c,d]=g.useState(0),[h,f]=g.useState(!1),v=e&&Ae.props.position.options.find(D=>D===e)&&`${Ae.class}--${e}`,C=t&&Ae.props.placement.options.find(D=>D===t)&&`${Ae.class}--${t}`;let k;g.useLayoutEffect(()=>{var D,z;a.current&&(l((D=a==null?void 0:a.current)==null?void 0:D.offsetHeight),d((z=a==null?void 0:a.current)==null?void 0:z.offsetWidth))},[]),g.useEffect(()=>(document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}),[]);const y=9;switch(e){case"top":t==="initial"?k={bottom:i+y,left:-y}:t==="end"?k={bottom:i+y,right:-y}:k={bottom:i+y,left:"50%",transform:"translateX(-50%)"};break;case"bottom":t==="initial"?k={top:i+y,left:-y}:t==="end"?k={top:i+y,right:-y}:k={top:i+y,left:"50%",transform:"translateX(-50%)"};break;case"left":t==="initial"?k={right:c+y,top:-y}:t==="end"?k={right:c+y,bottom:-y}:k={right:c+y,top:"50%",transform:"translateY(-50%)"};break;case"right":t==="initial"?k={left:c+y,top:-y}:t==="end"?k={left:c+y,bottom:-y}:k={left:c+y,top:"50%",transform:"translateY(-50%)"};break}const b=({target:D})=>{a.current&&a.current.contains(D)||f(!1)};return u.jsxs("span",{className:[Ae.class,n].join(" "),"data-testid":"ds-tooltip",onClick:()=>f(!h),ref:a,children:[r,h&&u.jsx("span",{className:[v,C].filter(D=>D).join(" "),children:u.jsx("span",{className:`${Ae.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:k,children:s})})]})};Ve.propTypes={position:o.string,placement:o.string,text:o.oneOfType([o.string,o.node])},Ve.displayName="DsTooltip";const ze=g.forwardRef(({name:r,testId:e=K.props.testId.default,type:t=K.props.type.default,animated:s=K.props.animated.default,size:n=K.props.size.default,label:a,placeholder:i,value:l,min:c,max:d,tooltip:h=K.props.tooltip.default,tooltipPosition:f=K.props.tooltipPosition.default,tooltipPlacement:v=K.props.tooltipPlacement.default,icon:C=K.props.icon.default,status:k=K.props.status.default,feedback:y,hasFeedback:b=K.props.hasFeedback.default,noMargin:D=K.props.noMargin.default,disabled:z=K.props.disabled.default,className:w,mask:A,onChangeHandler:p=K.props.onChangeHandler.default,onBlurHandler:E,onKeyDownHandler:M,onFocusHandler:U},P)=>{const[re,de]=g.useState(!1),[pe,De]=g.useState(!1),_e=!!p&&!!A,je=(F,q,ee)=>{if(_e&&ee){const _={...ee,target:{...ee.target,name:r,maskedValue:F,value:q.unmaskedValue,type:"text"}};p(_)}},le=g.useMemo(()=>typeof A=="object"?{lazy:!0,...A}:Ds[A]?{...Ds[A],min:c,max:d,lazy:!0}:{mask:A||"",min:c,max:d,lazy:!0},[A]),{ref:ve,setUnmaskedValue:Ie}=Un(le,{onAccept:je}),Ne=F=>{p&&!_e&&p(F)},m=F=>{M&&M(F)},S=F=>{de(!1),E&&E(F)},L=F=>{de(!0),U&&U(F)},$=()=>{De(F=>!F)},B=g.useMemo(()=>pe&&t==="password"?"text":t,[pe,t]),x=()=>{const F=[`${K.class}`];return n&&F.push(`${K.class}--${n}`),s&&F.push(`${K.class}--animated`),D&&F.push(`${K.class}--no-margin`),C&&F.push(`${K.class}--with-icon`),k&&F.push(`${K.class}--${k}`),w&&F.push(w),F.join(" ")},V=g.useMemo(()=>{const F=[`${K.class}__label`];return(re||l)&&F.push(`${K.class}__label--active`),F.join(" ")},[l,re]),j=()=>!s&&i?i:"",H=()=>k&&k==="error"?"info":"check_circle";return g.useEffect(()=>{A&&Ie(l||"")},[l,A,Ie]),u.jsxs("div",{className:x(),ref:P,children:[b&&u.jsx("div",{className:"ds-input__feedback",children:y&&u.jsxs(u.Fragment,{children:[u.jsx(X,{image:H()}),y]})}),u.jsx("input",{className:"ds-input__input","data-testid":e,disabled:z,id:r,max:d,min:c,name:r,onBlur:S,onChange:Ne,onFocus:L,onInput:Ne,onKeyDown:m,placeholder:j(),ref:ve,type:B,...!A&&{value:l||""}}),u.jsxs("label",{className:V,htmlFor:r,children:[a,h&&u.jsx(Ve,{className:"ds-input__tooltip",placement:v,position:f,text:h,children:u.jsx(X,{className:"ds-input__icon",image:"info"})})]}),C&&u.jsx(X,{className:"ds-input__icon",image:C}),t==="password"&&u.jsx(X,{className:"ds-input__password-icon",image:pe?"visibility_off":"visibility",onClick:$,size:"xl"})]})});ze.propTypes={name:o.string,testId:o.string,type:o.oneOf(K.props.type.options),animated:o.bool,size:o.oneOf(K.props.size.options),label:o.string,placeholder:o.string,value:o.oneOfType([o.string]),min:o.string,max:o.string,tooltip:o.string,tooltipPosition:o.string,tooltipPlacement:o.string,icon:o.string,status:o.oneOf(K.props.status.options),feedback:o.string,hasFeedback:o.bool,noMargin:o.bool,disabled:o.bool,mask:o.oneOfType([o.string,o.object]),onChangeHandler:o.func,onFocusHandler:o.func},ze.displayName="DsInput";const Bs={Small:"small",Medium:"medium",Large:"large"},Ns={None:"",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00"},ce={name:"Loading",class:"ds-loading",props:{size:{type:String,default:Bs.Medium,options:Object.values(Bs)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:Ns.Neutral10,options:Object.values(Ns)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},at=({id:r,testId:e=ce.props.testId.default,className:t,size:s=ce.props.size.default,opacity:n=ce.props.opacity.default,fullscreen:a=ce.props.fullscreen.default,backgroundColor:i=ce.props.backgroundColor.default})=>{const l=!a&&`${ce.class}--absolute`,c=s&&`${ce.class}__dots--${s}`,d=i&&ce.props.backgroundColor.options.find(f=>f===i)&&`${ce.class}__background--${i}`,h=n&&`${ce.class}__background--opacity`;return u.jsxs("div",{className:[ce.class,t,l].filter(f=>f).join(" "),"data-testid":e,id:r,children:[u.jsx("div",{className:[`${ce.class}__background`,d,h].filter(f=>f).join(" ")}),u.jsx("div",{className:["ds-loading__dots",c].filter(f=>f).join(" "),role:"status"})]})};at.propTypes={id:o.string,testId:o.string,size:o.oneOf(ce.props.size.options),opacity:o.bool,fullscreen:o.bool,backgroundColor:o.string},at.displayName="DsLoading";const xe={name:"Option",class:"ds-option",props:{id:{type:String,default:""},name:{type:String,default:""},testId:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},disabled:{type:Boolean,default:!1},detail:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Ft=({id:r,label:e,detail:t,name:s,testId:n=s||"ds-option-test",disabled:a=xe.props.disabled.default,value:i,checked:l=xe.props.checked.default,onChangeHandler:c=xe.props.onChangeHandler.default})=>{const[d]=g.useState(Math.random()),h=()=>{const f=[xe.class];return a&&f.push(`${xe.class}--disabled`),f.join(" ")};return u.jsxs("div",{className:h(),children:[u.jsx("input",{checked:l,"data-testid":n,disabled:a,id:r||String(d),name:s,onChange:c,type:"radio",value:i}),u.jsx(X,{className:`${xe.class}__icon`,image:l?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),u.jsxs("div",{className:`${xe.class}__text-container`,children:[e&&u.jsx("label",{className:`${xe.class}__label`,htmlFor:r||String(d),children:e}),t&&u.jsx("label",{className:`${xe.class}__detail`,htmlFor:r||String(d),children:t})]})]})};Ft.propTypes={id:o.string,name:o.string,testId:o.string,label:o.oneOfType([o.string,o.node]),value:o.oneOfType([o.string,o.number]),detail:o.string,disabled:o.bool,checked:o.bool,onChangeHandler:o.func},Ft.displayName="DsOption";const Ms={Default:"",Large:"large",Small:"small"},rt={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:Ms.Default,options:Object.values(Ms)}}},we=({children:r,className:e,testId:t="ds-paragraph-test",type:s=rt.props.type.default})=>{const n=s&&`${rt.class}--${s}`;return u.jsx("p",{className:[rt.class,n,e&&e].filter(a=>a).join(" "),"data-testid":t,children:r})};we.propTypes={className:o.string,testId:o.string,type:o.oneOf(rt.props.type.options)},we.displayName="DsParagraph";const $s={Success:"success",SuccessDark:"success-dark",Warning:"warning",Danger:"danger"},Vs={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:$s.Success,options:Object.values($s)}}},Dt={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},te=({children:r,flex:e=Dt.props.flex.default,className:t=Dt.props.className.default})=>{const s=()=>[Dt.class,t].join(" "),n=()=>({flex:e});return u.jsx("div",{className:s(),style:n(),children:r})};te.propTypes={className:o.string,flex:o.string},te.displayName="DsFlexElement";const Ls={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceAround:"space-around",SpaceBetween:"space-between"},Ps={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center"},js={Row:"row",Column:"column",RowReverse:"row-reverse",ColumnReverse:"column-reverse"},zs={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},Hn={Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},Le={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:Ls.Stretch,required:!0,options:Object.values(Ls)},alignItems:{type:String,default:Ps.Stretch,required:!0,options:Object.values(Ps)},flexDirection:{type:String,default:js.Row,required:!0,options:Object.values(js)},flexWrap:{type:String,default:zs.Wrap,required:!1,options:Object.values(zs)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(Hn)}}},Fe=({children:r,className:e,justifyContent:t=Le.props.justifyContent.default,alignItems:s=Le.props.alignItems.default,flexDirection:n=Le.props.flexDirection.default,flexWrap:a=Le.props.flexWrap.default,width:i=Le.props.width.default,height:l,gap:c})=>{const d=()=>{const f=[Le.class,e];return c&&f.push(`${Le.class}--gap-${c}`),f.join(" ")},h=()=>({display:"flex",justifyContent:t,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:l,gap:c});return u.jsx("div",{className:d(),style:h(),children:r})};Fe.propTypes={className:o.string,justifyContent:o.string,alignItems:o.string,flexDirection:o.string,flexWrap:o.string,width:o.string,height:o.string,gap:o.string},Fe.displayName="DsFlexLayout";const it={None:"none",Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm"},Ye={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:it.None,options:Object.values(it)},horizontal:{type:String,default:it.None,options:Object.values(it)}}},ge=({vertical:r=Ye.props.vertical.default,horizontal:e=Ye.props.horizontal.default})=>{const t=r&&`ds-spacer__vertical--${r}`,s=e&&`ds-spacer__horizontal--${e}`;return u.jsx("div",{className:[Ye.class,t,s].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};ge.propTypes={vertical:o.oneOf(Ye.props.vertical.options),horizontal:o.oneOf(Ye.props.horizontal.options)},ge.displayName="DsSpacer";const It=({label:r,progress:e=Vs.props.progress.default,color:t=Vs.props.color.default})=>{const s=g.useMemo(()=>e>100?100:e<0?0:e,[e]),n=g.useMemo(()=>`ds-progress__progress--${t}`,[t]),a=g.useMemo(()=>t==="success-dark"?"color__success--dark":t==="warning"?"color__warning--dark":`color__${t}--default`,[t]);return u.jsx("div",{className:"ds-progress",children:u.jsxs(Fe,{flexDirection:"column",children:[u.jsx(te,{children:u.jsx("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,className:"ds-progress__container",role:"progressbar",children:u.jsx("div",{className:`ds-progress__progress ${n}`,"data-testid":"ds-progress-bar",style:{width:`${s}%`}})})}),u.jsx(te,{children:u.jsxs(Fe,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[u.jsx(ge,{vertical:"quark"}),u.jsx(u.Fragment,{children:r&&u.jsx(we,{className:a,children:r})})]})})]})})};It.propTypes={label:o.string,progress:o.number,color:o.string};const qs={Small:"sm",Medium:"md",Large:"lg"},Us={Default:"",Error:"error",Success:"success"},Hs={Center:"center",End:"end",Initial:"initial"},Ws={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Z={name:"Select",class:"ds-select",props:{label:{type:String,default:""},className:{type:String,default:""},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String,default:""},testId:{type:String,default:"ds-select-test"},placeholder:{type:String},onChange:{type:Function,default:()=>{}},value:{type:[Boolean,String,Number,void 0]},size:{type:String,options:Object.values(qs),default:qs.Medium},status:{type:String,default:Us.Default,options:Object.values(Us)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:Hs.Initial,options:Object.values(Hs)},tooltipPosition:{type:String,default:Ws.Top,options:Object.values(Ws)},feedback:{type:String,default:""},options:[]}},Ot=g.forwardRef(({label:r,className:e,disabled:t=Z.props.disabled.default,animated:s=Z.props.animated.default,multiple:n=Z.props.multiple.default,testId:a=Z.props.testId.default,name:i,options:l,value:c,placeholder:d,onChange:h,onChangeHandler:f,size:v=Z.props.size.default,status:C=Z.props.status.default,tooltip:k,tooltipPosition:y=Z.props.tooltipPosition.default,tooltipPlacement:b=Z.props.tooltipPlacement.default,feedback:D,...z},w)=>{const[A,p]=g.useState(!1),E=P=>{p(!1),h&&h(P,P.target.value),f&&f(P,P.target.value)},M=()=>{const P=[Z.class,"select-placeholder"];return P.push(`${Z.class}--${v}`),C&&P.push(`${Z.class}--${C}`),A&&P.push(`${Z.class}--active`),t&&P.push(`${Z.class}--disabled`),e&&P.push(e),P.join(" ")},U=g.useMemo(()=>{const P=[`${Z.class}__label`];return!s&&P.push(`${Z.class}__label--not-animated`),c&&P.push(`${Z.class}__label--has-value`),s&&!c&&!k&&P.push(`${Z.class}__label--hidden`),P.join(" ")},[c]);return u.jsxs("div",{className:M(),"data-testid":"ds-select-component",children:[u.jsxs("label",{className:U,"data-testid":"ds-label-id",htmlFor:i,children:[r,k&&u.jsx(Ve,{className:`${Z.class}__tooltip`,placement:b,position:y,text:k,children:u.jsx(X,{className:`${Z.class}__icon`,image:"info"})})]}),u.jsxs("select",{"data-testid":a,disabled:t,id:i,multiple:n,name:i,onChange:P=>E(P),value:c||"",...z,onBlur:()=>p(!1),onFocus:()=>p(!0),ref:w,required:!0,children:[(d||s)&&u.jsx("option",{disabled:!0,value:"",children:d??r}),l==null?void 0:l.map((P,re)=>{var de;return"options"in P?u.jsx("optgroup",{label:P.label,children:(de=P.options)==null?void 0:de.map((pe,De)=>u.jsx("option",{className:`${Z.class}__option-select`,value:pe.value,children:pe.label||pe.value},De))},re):u.jsx("option",{className:`${Z.class}__option-select`,value:P.value,children:P.label||P.value},re)})]}),D&&u.jsxs("div",{className:"ds-select__feedback-container",children:[u.jsx(X,{className:"ds-select__icon",image:C==="success"?"check_circle":"info"}),u.jsx("span",{className:"ds-select__feedback",children:D})]})]})});Ot.propTypes={label:o.string.isRequired,className:o.string,disabled:o.bool,animated:o.bool,multiple:o.bool,name:o.string,testId:o.string,options:o.array.isRequired,placeholder:o.string,onChange:o.func,onChangeHandler:o.func,value:o.oneOfType([o.string,o.number]),size:o.oneOf(Z.props.size.options),status:o.oneOf(Z.props.status.options),tooltip:o.string,tooltipPosition:o.string,tooltipPlacement:o.string,feedback:o.string},Ot.displayName="DsSelect";const Rs={Large:"large",Small:"small"},Bt={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:Rs.Large,options:Object.values(Rs)}}},Ys=({children:r,className:e,testId:t="ds-subtitle-test",type:s})=>{const n=Bt.props.type.options.find(a=>a===s)&&`${Bt.class}--${s}`;return u.jsx("p",{className:[Bt.class,n,e&&e].filter(a=>a).join(" "),"data-testid":t,children:r})};Ys.displayName="DsSubtitle";const Gs={Small:"small",Medium:"medium",Large:"large"},Xs={Text:"text"},Ks={None:"",Error:"error",Success:"success"},Zs={None:"none",Both:"both",Horizontal:"horizontal",Vertical:"vertical",Block:"block",Inline:"inline"},J={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-textarea-test"},type:{type:String,default:Xs.Text,options:Object.values(Xs)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:Gs.Medium,options:Object.values(Gs)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},minLength:{type:Number,default:void 0},maxLength:{type:Number,default:void 0},rows:{type:Number,default:1},status:{type:String,default:Ks.None,options:Object.values(Ks)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:Zs.None,options:Object.values(Zs)},onChangeHandler:{type:Function,default:()=>{}}}},Nt=g.forwardRef(({name:r,testId:e=J.props.testId.default,animated:t=J.props.animated.default,size:s=J.props.size.default,label:n,placeholder:a,value:i,minLength:l,maxLength:c,tooltip:d,icon:h,status:f=J.props.status.default,feedback:v,disabled:C=J.props.disabled.default,required:k,className:y,resize:b=J.props.resize.default,onChangeHandler:D,onBlurHandler:z,onKeyDownHandler:w,onFocusHandler:A,rows:p=J.props.rows.default,cols:E,description:M,style:U},P)=>{const[re,de]=g.useState(!1),[pe,De]=g.useState(0),[_e,je]=g.useState(Math.random());g.useEffect(()=>{i==null&&je(Math.random())},[i]);const le=x=>{De(x.target.value.length),D&&D(x)},ve=x=>{w&&w(x)},Ie=x=>{de(!1),z&&z(x)},Ne=x=>{de(!0),A&&A(x)},m=()=>{const x=[`${J.class}`];return s&&x.push(`${J.class}--${s}`),t&&x.push(`${J.class}--animated`),d&&x.push(`${J.class}--with-icon`),f&&x.push(`${J.class}--${f}`),y&&x.push(y),x.join(" ")},S=g.useMemo(()=>{const x=[`${J.class}__label`];return(re||i)&&x.push(`${J.class}__label--active`),x.join(" ")},[i,re]),L=()=>!t&&a?a:"",$=()=>f&&f==="error"?"info":"check_circle",B={resize:b,...U||{}};return u.jsxs("div",{className:m(),children:[M&&u.jsx("span",{className:"ds-textarea__description",children:M}),v&&u.jsxs("div",{className:"ds-textarea__feedback",children:[u.jsx(X,{image:$()}),v]}),u.jsx("textarea",{className:"ds-textarea__textarea",cols:E,"data-testid":e,defaultValue:i||"",disabled:C,id:r,maxLength:c,minLength:l,name:r,onBlur:Ie,onChange:le,onFocus:Ne,onKeyDown:ve,placeholder:L(),ref:P,required:k,rows:p,style:B}),u.jsx("label",{className:S,htmlFor:r,children:n}),c&&u.jsxs("span",{className:"ds-textarea__count",children:[pe,"/",c]}),d&&u.jsx(Ve,{className:"ds-textarea__tooltip",placement:"end",text:d,children:u.jsx(X,{className:"ds-textarea__icon",image:h})})]},_e)});Nt.propTypes={name:o.string,testId:o.string,type:o.oneOf(J.props.type.options),animated:o.bool,size:o.oneOf(J.props.size.options),label:o.string,placeholder:o.string,value:o.oneOfType([o.string]),tooltip:o.string,icon:o.string,status:o.oneOf(J.props.status.options),feedback:o.string,minLength:o.number,maxLength:o.number,rows:o.number,cols:o.number,disabled:o.bool,required:o.bool,onChangeHandler:o.func,onBlur:o.func,onKeyDown:o.func,onFocus:o.func,resize:o.oneOf(J.props.resize.options).isRequired,description:o.string,style:o.object},Nt.displayName="DsTextArea";const ot={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1},testId:{type:String,default:"ds-container-test"}}},lt=({children:r,fluid:e=ot.props.fluid.default,className:t,style:s,testId:n=ot.props.testId.default})=>{const a=e?`${ot.class}--fluid`:ot.class;return u.jsx("div",{className:[a,t].filter(i=>i).join(" "),"data-testid":n,style:s,children:r})};lt.propTypes={children:o.node,fluid:o.bool,className:o.string,style:o.object,testId:o.string},lt.displayName="DsContainer";const Js=()=>typeof window<"u"&&window.innerWidth?window.innerWidth:0,Qs=({children:r,grid:e})=>{const{row:t,col:s,mobileRow:n,mobileCol:a}=e,[i,l]=g.useState(Js());g.useEffect(()=>{const d=()=>{l(Js())};if(typeof window<"u")return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]);const c=g.useMemo(()=>i<=768?{gridRow:n||t,gridColumn:a||s}:{gridRow:t,gridColumn:s},[i,t,s,n,a]);return u.jsx("div",{style:c,children:r})};Qs.displayName="DsGridElement";const en={Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},ut={Start:"start",End:"end",Center:"center",Stretch:"stretch",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},Q={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:en.Small,options:Object.values(en)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:ut.Start,options:Object.values(ut)},verticalAlign:{type:String,default:ut.Start,options:Object.values(ut)}}};function tn(){const{innerWidth:r,innerHeight:e}=window;return{width:r,height:e}}function Wn(){const[r,e]=g.useState(tn());return g.useEffect(()=>{function t(){e(tn())}return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),r}const Mt=({children:r,rows:e=Q.props.rows.default,gap:t=Q.props.gap.default,vGap:s=Q.props.vGap.default,hGap:n=Q.props.hGap.default,horizontalAlign:a=Q.props.horizontalAlign.default,verticalAlign:i=Q.props.verticalAlign.default,width:l=Q.props.width.default,height:c=Q.props.height.default})=>{const d=s&&`${Q.class}__v-gap--${t}`,h=n&&`${Q.class}__h-gap--${t}`,f=a&&Q.props.horizontalAlign.options.find(w=>w===a)?`${Q.class}--h-${a}`:null,v=i&&Q.props.verticalAlign.options.find(w=>w===i)?`${Q.class}--v-${i}`:null,{width:C}=Wn(),[k,y]=g.useState("auto");g.useEffect(()=>{C<=768?y("6"):y("12")},[C]);const b=w=>/^[+-]?\d+$/.test(w),D=()=>e.split(",").map(A=>(A=A.trim(),A==="0"||A==="*"||A==="auto"?"auto":b(A)?A+"fr":A)).join(" "),z=()=>`repeat(${k}, minmax(0, 1fr))`;return u.jsx("div",{className:[Q.class,f,v,d,h].filter(w=>w).join(" "),style:{width:l,height:c,gridTemplateColumns:z(),gridTemplateRows:D()},children:r})};Mt.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node,o.func]),rows:o.string,gap:o.oneOf(Q.props.gap.options),vGap:o.bool,hGap:o.bool,width:o.string,height:o.string,horizontalAlign:o.oneOf(Q.props.horizontalAlign.options),verticalAlign:o.oneOf(Q.props.verticalAlign.options)},Mt.displayName="DsGridLayout";const be={None:"none",Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},me={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:be.ExtraSmall,options:Object.values(be)},top:{type:String,default:be.None,options:Object.values(be)},right:{type:String,default:be.None,options:Object.values(be)},bottom:{type:String,default:be.None,options:Object.values(be)},left:{type:String,default:be.None,options:Object.values(be)}}},qe=({children:r,space:e=me.props.space.default,top:t=me.props.top.default,right:s=me.props.right.default,bottom:n=me.props.bottom.default,left:a=me.props.left.default})=>{const i=t&&`${me.class}__top--${t}`,l=s&&`${me.class}__right--${s}`,c=n&&`${me.class}__bottom--${n}`,d=a&&`${me.class}__left--${a}`,h=e&&`${me.class}--${e}`;return u.jsx("div",{className:[me.class,i,l,c,d,h].filter(f=>f).join(" "),children:r})};qe.displayName="DsWrapper";const $t={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},Ue={name:"AccordionItem",class:"ds-accordion-item",props:{title:{type:String,default:""},content:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}}},Vt=({title:r,content:e,onToggle:t,active:s=Ue.props.active.default,disabled:n=Ue.props.disabled.default})=>{const a=s&&`${Ue.class}--active`;return u.jsxs("li",{className:[Ue.class,a].filter(i=>i).join(" "),children:[u.jsxs("button",{className:`${Ue.class}__button`,disabled:n,onClick:t,children:[r,u.jsx(X,{className:`${Ue.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),s&&u.jsx("div",{className:"ds-accordion-item__content",children:e})]})};Vt.propTypes={active:o.bool,title:o.oneOfType([o.element,o.string]),content:o.oneOfType([o.element,o.string]),disabled:o.bool},Vt.displayName="DsAccordionItem";const Lt=({items:r=$t.props.items.default,activeItem:e=$t.props.activeItem.default,onClick:t})=>{const[s,n]=g.useState(-1);g.useEffect(()=>{r.map((i,l)=>{i.active&&n(l)})},[r]),g.useEffect(()=>{e!=null&&n(e)},[e]);const a=i=>{if(s===i)return t&&t(-1),n(-1);n(i),t&&t(i)};return u.jsx("ul",{className:$t.class,children:r.map((i,l)=>u.jsx(Vt,{active:s===l,content:i.content,disabled:i.disabled,onToggle:()=>{a(l)},title:i.title},l))})};Lt.propTypes={items:o.array,activeItem:o.number},Lt.displayName="DsAccordion";const sn=({title:r,activeTags:e,handleTagClose:t})=>u.jsx("div",{className:"active-tags",children:e.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(we,{className:"active-tags__title",children:r}),u.jsx("div",{className:"active-tags__list","data-testid":"ds-list",children:e.map((s,n)=>u.jsx(Ve,{text:`Filtro ${s.text} aplicado`,children:u.jsxs("div",{className:`active-tags__item ${s.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`ds-active-tag-${n}`,children:[u.jsxs(Fe,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(X,{className:"active-tags__icon",color:s.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:s.icon,testId:`icon-${n}`})}),u.jsx(te,{children:u.jsx(we,{type:"small",children:s.text})})]}),!s.hiddenClose&&u.jsx(X,{image:"close",onClick:()=>t(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${s.id}-${s.text}`))})]})});sn.displayName="DsActiveTags";const nn={Small:"small",Medium:"medium",Large:"large"},G={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},testId:{type:String,default:"ds-editable-select"},animated:{type:Boolean,default:!0},placeholder:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},size:{type:String,default:nn.Medium,options:Object.values(nn)},status:{type:String,default:""},options:{type:Array,default:[]},icon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},loading:{type:Boolean},onChangeHandler:{type:Function,default:()=>{}},onBlurHandler:{type:Function,default:()=>{}},onFocusHandler:{type:Function,default:()=>{}},onSelectHandler:{type:Function,default:()=>{}}}},an=({label:r=G.props.label.default,name:e=G.props.name.default,testId:t=G.props.testId.default,value:s=G.props.value.default,options:n=G.props.options.default,size:a=G.props.size.default,onChangeHandler:i=G.props.onChangeHandler.default,onSelectHandler:l=G.props.onSelectHandler.default,icon:c=G.props.icon.default,noOptionsMessage:d=G.props.noOptionsMessage.default,disabled:h=G.props.disabled.default,status:f=G.props.status.default,onBlurHandler:v=G.props.onBlurHandler.default,onFocusHandler:C=G.props.onFocusHandler.default,animated:k=G.props.animated.default,placeholder:y=G.props.placeholder.default,loading:b})=>{const[D,z]=g.useState(!1),[w,A]=g.useState(s),p=U=>{i(U),(b==null&&U.currentTarget.value.length||!b&&U.currentTarget.value.length>2)&&z(!0)},E=U=>{l(U),v(),A(Math.random().toString()),z(!1)};g.useEffect(()=>{s.length===0&&z(!1)},[s]);const M=()=>n.length>0?n.map((U,P)=>u.jsx("option",{className:`${G.class}__option ${G.class}__option--${a}`,"data-testid":`ds-option-${U.id||U.label}`,onClick:()=>!h&&E(U),value:P,children:U.label},P)):u.jsx("option",{className:`${G.class}__option ${G.class}__option--not-found--${a}`,children:d},"no_option");return u.jsxs("div",{className:`${G.class}__container`,children:[u.jsx(ze,{animated:k,className:`${G.class}__input`,disabled:h,label:r,name:e,onBlurHandler:v,onChangeHandler:p,onFocusHandler:C,placeholder:y,size:a,status:f,testId:t,value:s},w),(c||b)&&(b?u.jsx("div",{className:`${G.class}__loading ${G.class}__loading--${a}`,style:{width:"18px"},children:u.jsx(at,{fullscreen:!1})}):c&&u.jsx(X,{className:`${G.class}__icon ${G.class}__icon--${a}`,image:c})),D&&u.jsx("div",{className:`${G.class}__list`,"data-testid":"ds-list",children:M()})]})};an.displayName="DsEditableSelect";const Ge={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},Rn=({length:r,current:e=Ge.props.current.default})=>{const[t,s]=g.useState(e),n=i=>i<t?`${Ge.class}__step--older`:i===t?`${Ge.class}__step--active`:"";g.useEffect(()=>{s(e)},[e]);const a=[];for(let i=0;i<r;i++)a.push(u.jsx("div",{className:`${Ge.class}__step ${n(i)}`,"data-testid":`ds-indicator-step-${i}`},i));return u.jsx("div",{className:Ge.class,children:a})},Yn={name:"DsInlineEditable",class:"ds-inline-editable",props:{name:{type:String,required:!0},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},onChangeHandler:{type:Function,default:()=>{}}}},Pt=({name:r,value:e,prefix:t,sufix:s,min:n,max:a,onChangeHandler:i})=>{const l=g.useRef(null),[c,d]=g.useState(!1),[h,f]=g.useState("");g.useEffect(()=>{f(e??"")},[e]);const v=b=>{b.key==="Enter"&&C(b)};function C(b){d(!1),i&&(n&&parseInt(n)>=parseInt(h===""?n:h)?(b.currentTarget.value=n,f(n)):a&&parseInt(a)<parseInt(h)?(b.currentTarget.value=a,f(a)):b.currentTarget.value=h,i(b))}const k=b=>{f(b.currentTarget.value)},y=async()=>{var b;await d(!0),(b=l.current)==null||b.focus()};return u.jsx("div",{className:Yn.class,children:c?u.jsx("input",{className:"ds-input__input","data-testid":"ds-input",max:a,min:n,name:r,onBlur:C,onChange:k,onKeyDown:v,ref:l,type:"number",value:h}):u.jsx("div",{"data-testid":"ds-inline-editible-div-click",onClick:y,children:u.jsxs(Fe,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(we,{children:u.jsxs("b",{children:[t,e,s]})})}),u.jsx(te,{children:u.jsx(X,{image:"edit_square"})})]})})})};Pt.propTypes={value:o.string},Pt.displayName="DsInlineEditable";const Gn=[1,2,3,4],rn={Squared:"squared",Rounded:"rounded"},he={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:Gn},variant:{type:String,default:rn.Rounded,options:Object.values(rn)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},jt=({className:r,title:e,content:t,cancelBtnText:s=he.props.cancelBtnText.default,confirmBtnText:n=he.props.confirmBtnText.default,variant:a=he.props.variant.default,elevation:i,isModalOpen:l=he.props.isModalOpen.default,onClose:c,onCancel:d,onConfirm:h,...f})=>{const v=a&&he.props.variant.options.find(b=>b===a)?`${he.class}--${a}`:`${he.class}--${he.props.variant.default}`,C=i&&`${he.class}--elevation-${i}`,k=h||d,y=g.useCallback(b=>{b.keyCode===27&&c()},[c]);return g.useEffect(()=>(l&&window&&!k&&window.addEventListener("keyup",y),()=>{window.removeEventListener("keyup",y)}),[k,y]),l?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ds-modal-overlay","data-testid":"ds-modal-overlay",...f,onClick:()=>k?()=>{}:c()}),u.jsxs("div",{className:[he.class,v,C,r&&r].filter(b=>b).join(" "),"data-testid":"ds-modal",children:[!k&&u.jsx("button",{className:"ds-modal__closeBtn","data-testid":"ds-modal-close-button",onClick:c,children:u.jsx(X,{image:"close",size:"lg"})}),u.jsxs("div",{className:"ds-modal__content",children:[u.jsx("div",{className:"ds-modal__content__title",children:e}),e&&u.jsx(ge,{vertical:"xxxs"}),u.jsx("div",{className:"ds-modal__content__content",children:t})]}),k&&u.jsx(ge,{vertical:"sm"}),!k&&u.jsx(ge,{vertical:"xxs"}),u.jsxs("div",{className:"ds-modal__cta",children:[d&&u.jsx(He,{onClick:()=>{c(),d()},children:s}),h&&u.jsx(He,{onClick:()=>{c(),h()},children:n})]})]})]}):null};jt.propTypes={firstButtonText:o.string,confirmBtnText:o.string,cancelBtnText:o.string,variant:o.oneOf(he.props.variant.options),elevation:o.oneOf(he.props.elevation.options),isModalOpen:o.bool,title:o.node,content:o.node},jt.displayName="DsModal";const on={Success:"success",Danger:"danger",Warning:"warning",Info:"info"},ln={Rounded:"rounded",Squared:"squared"},oe={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:on.Info,options:Object.values(on)},id:{type:String},autoClose:{type:Boolean,default:!1},autoCloseTimer:{type:Number,default:4e3},dismissible:{type:Boolean,default:!1},elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:ln.Rounded,options:Object.values(ln)},progressBar:{type:Boolean,default:!0},testId:{type:String,default:"ds-notification"}}},Xn={success:"check",danger:"error",warning:"warning",info:"info"},zt=({className:r,type:e=oe.props.type.default,variant:t=oe.props.variant.default,id:s,children:n,message:a,autoClose:i=oe.props.autoClose.default,autoCloseTimer:l=oe.props.autoCloseTimer.default,dismissible:c=oe.props.dismissible.default,elevation:d,progressBar:h=oe.props.progressBar.default,handleClose:f,testId:v=oe.props.testId.default})=>{const[C,k]=g.useState(l),[y,b]=g.useState(!1),[D,z]=g.useState(!0),w=[oe.class,e&&`${oe.class}--${e}`,t&&`${oe.class}--${t}`,d&&`${oe.class}--elevation-${d}`,r&&r].join(" "),A=()=>k(U=>(U===0&&z(!1),U-100));g.useEffect(()=>{!i&&!c&&z(!0);let U;return!y&&i&&(U=setInterval(A,100)),()=>{clearInterval(U)}},[y,i,l,D,c]);const p=()=>{b(!0)},E=()=>{b(!1)},M=U=>{z(!1),f&&f(U)};return D?u.jsxs("div",{className:w,"data-testid":v,id:s,onMouseEnter:p,onMouseLeave:E,children:[u.jsx(qe,{bottom:"nano",top:"nano",children:u.jsxs(Fe,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[u.jsx(te,{children:u.jsx(X,{color:e,fill:!0,image:Xn[e]})}),u.jsx(te,{flex:"1",children:u.jsx(qe,{left:"none",right:"none",space:"nano",children:n??a})}),u.jsx(te,{children:c?u.jsx("div",{className:`${oe.class}__button`,"data-testid":`${v}-close`,onClick:U=>M(U),children:u.jsx(qe,{children:u.jsx(X,{image:"close"})})}):u.jsx(ge,{horizontal:"quark"})})]})}),h&&i&&u.jsx("div",{className:`${oe.class}__progress-bar ${oe.class}__progress-bar--${e}`,"data-testid":`${v}-progress-bar`,style:{width:`${C/l*100}%`}})]}):null};zt.displayName="DsNotification";const qt={name:"DsPasswordConfirmation",class:"ds-password-confirmation",props:{onChange:{type:Function,default:()=>{}},validationList:{type:Array,default:[{title:"Um número",rule:r=>/\d/.test(r)},{title:"Uma letra maiúscula",rule:r=>/[A-Z]/.test(r)},{title:"Um caractere especial. Ex: @#!?",rule:r=>/[!@#$%^&*()+\-=_[\]{};':"\\|,.<>/?]/.test(r)},{title:"Mínimo 8 caracteres",rule:r=>r.length>=8}]},instructionLabel:{type:String,default:"A senha deverá conter:"},testId:{type:String,default:"ds-password-confirmation"}}},ct={strong:"Forte",good:"Boa",medium:"Médio",weak:"Fraco"},Ut=({onChange:r,validationList:e=qt.props.validationList.default,instructionLabel:t=qt.props.instructionLabel.default,testId:s=qt.props.testId.default})=>{const[n,a]=g.useState(""),[i,l]=g.useState(""),[c,d]=g.useState([]),[h,f]=g.useState({score:0,color:"danger",label:"Fraco"}),[v,C]=g.useState(!1),k=g.useCallback(p=>{const E=e.map(M=>M==null?void 0:M.rule(p));return d(E),E},[e]),y=g.useCallback(p=>{a(p.currentTarget.value);const E=k(p.currentTarget.value),M=w(E);r({password:p.currentTarget.value,confirmationPassword:i,isEqual:i===p.currentTarget.value,feedback:M})},[i,r,k]),b=g.useCallback(p=>{l(p.currentTarget.value);const E=k(n),M=w(E);r({password:n,confirmationPassword:p.currentTarget.value,isEqual:n===p.currentTarget.value,feedback:M})},[n,r,k]),D=g.useMemo(()=>n!==i&&v?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[n,i,v]),z=g.useCallback(p=>{const E={score:p,color:"danger",label:ct.weak};return p>30&&p<75?(E.color="warning",E.label=ct.medium):p>=75&&p<100?(E.color="success",E.label=ct.good):p===100&&(E.color="success-dark",E.label=ct.strong),E},[]),w=g.useCallback(p=>{const E=p.reduce((U,P)=>{let re=U;return P?(re++,re):U},0),M=z(E*100/p.length);return f(M),M},[z]),A=()=>u.jsx("ul",{children:e.map((p,E)=>{const M=c[E]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return u.jsxs("li",{className:M,children:[c[E]?u.jsx(X,{color:"success-dark",image:"check",testId:"ds-check-icon"}):null,u.jsx(ge,{horizontal:"quark"}),u.jsx(we,{children:p.title})]},E+p.title)})});return u.jsxs(Fe,{className:"ds-password-confirmation",flexDirection:"column",children:[u.jsx(te,{children:u.jsx(ze,{label:"Senha",name:"password",onChangeHandler:y,testId:`${s}-main-input`,type:"password",value:n})}),u.jsx(te,{children:u.jsx(It,{color:h==null?void 0:h.color,label:h==null?void 0:h.label,progress:h==null?void 0:h.score})}),u.jsx(te,{children:u.jsx(we,{children:t})}),u.jsx(te,{children:A()}),u.jsx(ge,{vertical:"xxs"}),u.jsx(te,{children:u.jsx(ze,{feedback:D.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>C(!0),onChangeHandler:b,onFocusHandler:()=>C(!0),status:D.status,testId:`${s}-confirm-input`,type:"password",value:i})})]})};Ut.propTypes={onChange:o.func,validationList:o.array,instructionLabel:o.string,testId:o.string},Ut.displayName="DsPasswordConfirmation";const ye={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},un=({steps:r,selectedStep:e=ye.props.selectedStep.default,onChange:t})=>{const[s,n]=g.useState(e),a=(i,l)=>{const c=[`${ye.class}__button`];return l!==i&&c.push(`${ye.class}__button--round`),r[i]&&r[i].disabled&&c.push(`${ye.class}__button--disabled`),c.join(" ")};return g.useEffect(()=>{n(e)},[e]),g.useEffect(()=>{t(s)},[s]),u.jsxs("div",{className:ye.class,children:[u.jsxs("span",{className:`${ye.class}__step-counter`,children:["Etapa ",s+1," de ",r==null?void 0:r.length]}),u.jsx("div",{className:`${ye.class}__step`,children:r.map((i,l)=>u.jsx("div",{className:`${ye.class}__content`,children:u.jsx("button",{className:a(l,s),"data-testid":`ds-button-${l}`,disabled:i.disabled,onClick:()=>n(l),children:u.jsxs("span",{className:`${ye.class}__text`,children:[s===l?u.jsx(qe,{bottom:"none",left:"nano",right:"nano",top:"none",children:u.jsx(X,{className:`${ye.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${l}`})}):u.jsx(X,{className:`${ye.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${l}`}),s===l&&i.label]})})},l))})]})};un.displayName="DsStepper";const Se={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},cn=({item:r,columns:e})=>u.jsx("tr",{className:`${Se.class}__row`,children:e.map((t,s)=>{const n=t.align&&`${Se.class}__cell--align-${t.align}`;return u.jsx("td",{children:u.jsx("div",{className:[`${Se.class}__cell`,n,t.className].filter(a=>a).join(" "),children:r&&r[`${t.name}`]})},s)})});cn.displayName="DsTableRow";const dn=({columns:r,data:e,className:t})=>u.jsx("div",{className:`${Se.class}__wrapper`,children:u.jsxs("table",{className:[`${Se.class}`,t].filter(s=>s).join(" "),children:[u.jsx("thead",{className:`${Se.class}__head`,children:u.jsx("tr",{className:`${Se.class}__row`,children:r&&r.map((s,n)=>u.jsx("th",{style:{width:s.size},children:u.jsx("div",{className:[`${Se.class}__cell`,s.align&&`${Se.class}__cell--align-${s.align}`].filter(a=>a).join(" "),children:s.label})},n))})}),u.jsx("tbody",{className:`${Se.class}__body`,children:e&&e.map((s,n)=>u.jsx(cn,{columns:r,item:s},n))})]})});dn.displayName="DsTable";const pn={None:"",Primary:"primary",Secondary:"secondary",Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Info:"info"},Be={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:pn.Primary,options:Object.values(pn)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},Kn=({active:r,className:e,color:t,disabled:s,name:n,index:a,title:i,onClick:l})=>{const c=[`${Be.class}__tab`,`${Be.class}__tab-color--${t}`,r&&`${Be.class}__tab--active`,s&&`${Be.class}__tab--disabled`,e&&e].join(" "),d=h=>{l&&!s&&l(h)};return u.jsx("div",{className:c,"data-testid":`ds-tab-${a}`,id:n,onClick:()=>d(a),children:i})},Zn=({tabs:r,color:e,selectedTab:t=Be.props.selectedTab.default,className:s,onChange:n})=>{const[a,i]=g.useState(t),l=c=>{i(c),n&&n(c)};return g.useEffect(()=>i(t),[t]),u.jsxs("div",{className:[Be.class,s&&s].join(" "),"data-testid":"ds-tabs",children:[u.jsx("div",{className:`${Be.class}__header`,children:r.map((c,d)=>g.createElement(Kn,{...c,active:a===d,color:e,index:d,key:d,onClick:()=>l(d)}))}),u.jsx("div",{className:`${Be.class}__content`,children:r[a].content})]})};function hn({library:r,children:e,theme:t}){return u.jsx("div",{"data-library":r,"data-theme":t,children:u.jsx("div",{className:"ds-theme",children:e})})}hn.propTypes={library:o.string,children:o.node.isRequired,theme:o.string};const fn={TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},Pe={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:fn.TopRight,options:Object.values(fn)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},Ht=({className:r=Pe.props.className.default,position:e=Pe.props.position.default,fluid:t=Pe.props.fluid.default,notifications:s,removeNotification:n})=>{const a=[Pe.class,`${Pe.class}--${e}`,t&&`${Pe.class}--fluid`,r&&r].join(" "),i=l=>{n&&n(l)};return u.jsx("div",{className:a,"data-testid":"ds-notification-list",children:s.map(l=>{const c=l.autoClose??!0,d=l.autoCloseTimer??4e3,h=l.dismissible??!0,f=l.elevation??2,v=l.progressBar??!0;return u.jsx(zt,{autoClose:c,autoCloseTimer:d,dismissible:h,elevation:f,handleClose:()=>i(l.id),id:l.id,message:l.message,progressBar:v,type:l.type},l.id)})})};Ht.propTypes={position:o.oneOf(Pe.props.position.options),fluid:o.bool,notifications:o.array,removeNotification:o.func},Ht.displayName="DsNotificationList";const dt={name:"TwoColumns",class:"ds-two-columns",props:{}},Wt=({header:r,main:e,sidebar:t,breadcrumb:s})=>u.jsxs(lt,{children:[u.jsxs("div",{className:"ds-grid",children:[u.jsx("div",{className:"ds-grid__row",children:u.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:s})}),u.jsxs("div",{className:`${dt.class}__content ds-grid__row`,children:[u.jsx("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:`${dt.class}__header`,children:r}),u.jsx("div",{className:`${dt.class}__main`,children:e})]})}),u.jsx("div",{className:`${dt.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:t})]})]}),u.jsx(ge,{vertical:"sm"})]});Wt.propTypes={breadcrumb:o.node,header:o.node,main:o.node,sidebar:o.node},Wt.displayName="DsTwoColumns",O.DsAccordion=Lt,O.DsActiveTags=sn,O.DsButton=He,O.DsCaption=bt,O.DsCard=St,O.DsCheckbox=Ct,O.DsContainer=lt,O.DsEditableSelect=an,O.DsFlexElement=te,O.DsFlexLayout=Fe,O.DsGridElement=Qs,O.DsGridLayout=Mt,O.DsHR=Tt,O.DsHeading=Et,O.DsIcon=X,O.DsIndicator=Rn,O.DsInlineEditable=Pt,O.DsInput=ze,O.DsLoading=at,O.DsModal=jt,O.DsNotification=zt,O.DsNotificationList=Ht,O.DsOption=Ft,O.DsParagraph=we,O.DsPasswordConfirmation=Ut,O.DsProgress=It,O.DsSelect=Ot,O.DsSpacer=ge,O.DsStepper=un,O.DsSubtitle=Ys,O.DsTable=dn,O.DsTabs=Zn,O.DsTextArea=Nt,O.DsTooltip=Ve,O.DsTwoColumns=Wt,O.DsWrapper=qe,O.ThemeProvider=hn,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
19
+ */var Et,Us;function Oa(){if(Us)return Et;Us=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function a(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function n(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Et=n()?Object.assign:function(r,i){for(var o,c=a(r),d,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var g in o)e.call(o,g)&&(c[g]=o[g]);if(t){d=t(o);for(var k=0;k<d.length;k++)s.call(o,d[k])&&(c[d[k]]=o[d[k]])}}return c},Et}var Ct,Hs;function At(){if(Hs)return Ct;Hs=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ct=t,Ct}var wt,Ws;function Ys(){return Ws||(Ws=1,wt=Function.call.bind(Object.prototype.hasOwnProperty)),wt}var Tt,Xs;function Ia(){if(Xs)return Tt;Xs=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=At(),s={},a=Ys();t=function(r){var i="Warning: "+r;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(r,i,o,c,d){if(process.env.NODE_ENV!=="production"){for(var f in r)if(a(r,f)){var g;try{if(typeof r[f]!="function"){var k=Error((c||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}g=r[f](i,f,c,o,null,e)}catch(C){g=C}if(g&&!(g instanceof Error)&&t((c||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in s)){s[g.message]=!0;var b=d?d():"";t("Failed "+o+" type: "+g.message+(b??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(s={})},Tt=n,Tt}var Dt,Ks;function xa(){if(Ks)return Dt;Ks=1;var t=zs(),e=Oa(),s=At(),a=Ys(),n=Ia(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Dt=function(o,c){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function g(v){var E=v&&(d&&v[d]||v[f]);if(typeof E=="function")return E}var k="<<anonymous>>",b={array:I("array"),bigint:I("bigint"),bool:I("boolean"),func:I("function"),number:I("number"),object:I("object"),string:I("string"),symbol:I("symbol"),any:q(),arrayOf:F,element:w(),elementType:p(),instanceOf:T,node:se(),objectOf:K,oneOf:M,oneOfType:x,shape:fe,exact:Oe};function C(v,E){return v===E?v!==0||1/v===1/E:v!==v&&E!==E}function _(v,E){this.message=v,this.data=E&&typeof E=="object"?E:{},this.stack=""}_.prototype=Error.prototype;function y(v){if(process.env.NODE_ENV!=="production")var E={},j=0;function V(D,L,P,U,O,z,ee){if(U=U||k,z=z||P,ee!==s){if(c){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ae=U+":"+P;!E[Ae]&&j<3&&(r("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+U+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),E[Ae]=!0,j++)}}return L[P]==null?D?L[P]===null?new _("The "+O+" `"+z+"` is marked as required "+("in `"+U+"`, but its value is `null`.")):new _("The "+O+" `"+z+"` is marked as required in "+("`"+U+"`, but its value is `undefined`.")):null:v(L,P,U,O,z)}var N=V.bind(null,!1);return N.isRequired=V.bind(null,!0),N}function I(v){function E(j,V,N,D,L,P){var U=j[V],O=ue(U);if(O!==v){var z=ke(U);return new _("Invalid "+D+" `"+L+"` of type "+("`"+z+"` supplied to `"+N+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return y(E)}function q(){return y(i)}function F(v){function E(j,V,N,D,L){if(typeof v!="function")return new _("Property `"+L+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var P=j[V];if(!Array.isArray(P)){var U=ue(P);return new _("Invalid "+D+" `"+L+"` of type "+("`"+U+"` supplied to `"+N+"`, expected an array."))}for(var O=0;O<P.length;O++){var z=v(P,O,N,D,L+"["+O+"]",s);if(z instanceof Error)return z}return null}return y(E)}function w(){function v(E,j,V,N,D){var L=E[j];if(!o(L)){var P=ue(L);return new _("Invalid "+N+" `"+D+"` of type "+("`"+P+"` supplied to `"+V+"`, expected a single ReactElement."))}return null}return y(v)}function p(){function v(E,j,V,N,D){var L=E[j];if(!t.isValidElementType(L)){var P=ue(L);return new _("Invalid "+N+" `"+D+"` of type "+("`"+P+"` supplied to `"+V+"`, expected a single ReactElement type."))}return null}return y(v)}function T(v){function E(j,V,N,D,L){if(!(j[V]instanceof v)){var P=v.name||k,U=$e(j[V]);return new _("Invalid "+D+" `"+L+"` of type "+("`"+U+"` supplied to `"+N+"`, expected ")+("instance of `"+P+"`."))}return null}return y(E)}function M(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):r("Invalid argument supplied to oneOf, expected an array.")),i;function E(j,V,N,D,L){for(var P=j[V],U=0;U<v.length;U++)if(C(P,v[U]))return null;var O=JSON.stringify(v,function(ee,S){var Ae=ke(S);return Ae==="symbol"?String(S):S});return new _("Invalid "+D+" `"+L+"` of value `"+String(P)+"` "+("supplied to `"+N+"`, expected one of "+O+"."))}return y(E)}function K(v){function E(j,V,N,D,L){if(typeof v!="function")return new _("Property `"+L+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var P=j[V],U=ue(P);if(U!=="object")return new _("Invalid "+D+" `"+L+"` of type "+("`"+U+"` supplied to `"+N+"`, expected an object."));for(var O in P)if(a(P,O)){var z=v(P,O,N,D,L+"."+O,s);if(z instanceof Error)return z}return null}return y(E)}function x(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var E=0;E<v.length;E++){var j=v[E];if(typeof j!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ie(j)+" at index "+E+"."),i}function V(N,D,L,P,U){for(var O=[],z=0;z<v.length;z++){var ee=v[z],S=ee(N,D,L,P,U,s);if(S==null)return null;S.data&&a(S.data,"expectedType")&&O.push(S.data.expectedType)}var Ae=O.length>0?", expected one of type ["+O.join(", ")+"]":"";return new _("Invalid "+P+" `"+U+"` supplied to "+("`"+L+"`"+Ae+"."))}return y(V)}function se(){function v(E,j,V,N,D){return _e(E[j])?null:new _("Invalid "+N+" `"+D+"` supplied to "+("`"+V+"`, expected a ReactNode."))}return y(v)}function he(v,E,j,V,N){return new _((v||"React class")+": "+E+" type `"+j+"."+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function fe(v){function E(j,V,N,D,L){var P=j[V],U=ue(P);if(U!=="object")return new _("Invalid "+D+" `"+L+"` of type `"+U+"` "+("supplied to `"+N+"`, expected `object`."));for(var O in v){var z=v[O];if(typeof z!="function")return he(N,D,L,O,ke(z));var ee=z(P,O,N,D,L+"."+O,s);if(ee)return ee}return null}return y(E)}function Oe(v){function E(j,V,N,D,L){var P=j[V],U=ue(P);if(U!=="object")return new _("Invalid "+D+" `"+L+"` of type `"+U+"` "+("supplied to `"+N+"`, expected `object`."));var O=e({},j[V],v);for(var z in O){var ee=v[z];if(a(v,z)&&typeof ee!="function")return he(N,D,L,z,ke(ee));if(!ee)return new _("Invalid "+D+" `"+L+"` key `"+z+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(j[V],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(v),null," "));var S=ee(P,z,N,D,L+"."+z,s);if(S)return S}return null}return y(E)}function _e(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(_e);if(v===null||o(v))return!0;var E=g(v);if(E){var j=E.call(v),V;if(E!==v.entries){for(;!(V=j.next()).done;)if(!_e(V.value))return!1}else for(;!(V=j.next()).done;){var N=V.value;if(N&&!_e(N[1]))return!1}}else return!1;return!0;default:return!1}}function qe(v,E){return v==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function ue(v){var E=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":qe(E,v)?"symbol":E}function ke(v){if(typeof v>"u"||v===null)return""+v;var E=ue(v);if(E==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return E}function Ie(v){var E=ke(v);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function $e(v){return!v.constructor||!v.constructor.name?k:v.constructor.name}return b.checkPropTypes=n,b.resetWarningCache=n.resetWarningCache,b.PropTypes=b,b},Dt}var Ft,Rs;function Ba(){if(Rs)return Ft;Rs=1;var t=At();function e(){}function s(){}return s.resetWarningCache=e,Ft=function(){function a(i,o,c,d,f,g){if(g!==t){var k=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw k.name="Invariant Violation",k}}a.isRequired=a;function n(){return a}var r={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:n,element:a,elementType:a,instanceOf:n,node:a,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:s,resetWarningCache:e};return r.PropTypes=r,r},Ft}if(process.env.NODE_ENV!=="production"){var Na=zs(),Ma=!0;St.exports=xa()(Na.isElement,Ma)}else St.exports=Ba()();var $a=St.exports;const l=Ta($a);var Ot=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(Ot||{}),It=(t=>(t.Solid="solid",t.Outline="outline",t.Text="text",t))(It||{}),xt=(t=>(t.Large="lg",t.Medium="md",t.Small="sm",t))(xt||{}),Bt=(t=>(t.Right="right",t.Left="left",t))(Bt||{}),Gs=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(Gs||{});const Y={name:"Button",class:"ds-button",props:{color:{type:String,default:"primary",options:Object.values(Ot)},variant:{type:String,default:"solid",options:Object.values(It)},size:{type:String,default:"md",options:Object.values(xt)},elevation:{type:Number,options:[1,2,3,4]},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconFill:{type:Boolean,default:!0},iconPosition:{type:String,default:"right",options:Object.values(Bt)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1},trackId:{type:String,default:"track-click"},trackLabel:{type:String,default:""}}};var Nt=(t=>(t.Primary="primary",t.PrimaryLightest="primary-lightest",t.PrimaryLighter="primary-lighter",t.PrimaryLight="primary-light",t.PrimaryDark="primary-dark",t.PrimaryDarker="primary-darker",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.Secondary="secondary",t.SecondaryLightest="secondary-lightest",t.SecondaryLighter="secondary-lighter",t.SecondaryLight="secondary-light",t.SecondaryDark="secondary-dark",t.SecondaryDarker="secondary-darker",t.Success="success",t.SuccessLighter="success-lighter",t.SuccessLight="success-light",t.SuccessDark="success-dark",t.Warning="warning",t.WarningLighter="warning-lighter",t.WarningLight="warning-light",t.WarningDark="warning-dark",t.Danger="danger",t.DangerLighter="danger-lighter",t.DangerLight="danger-light",t.DangerDark="danger-dark",t.Info="info",t.InfoLighter="info-lighter",t.InfoLight="info-light",t.InfoDark="info-dark",t))(Nt||{}),Mt=(t=>(t.Outlined="outlined",t.Rounded="rounded",t.Sharp="sharp",t))(Mt||{}),$t=(t=>(t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t.Huge="huge",t))($t||{}),Vt=(t=>(t.Bold="bold",t.Semibold="semibold",t.Medium="medium",t.Regular="regular",t.Light="light",t.Extralight="extralight",t))(Vt||{});const le={name:"Icon",class:"ds-icon",props:{color:{type:String,default:"neutral-90",options:Object.values(Nt)},image:{type:String,default:"settings"},variation:{type:String,default:"outlined",options:Object.values(Mt)},size:{type:String,default:"md",options:Object.values($t)},fontVariationSettings:{type:Object,default:{fill:0,grad:0,weight:500,opticalSize:48}},fill:{type:Boolean,default:!1},testId:{type:String,default:"ds-icon-test"},weight:{type:String,default:"semibold",options:Object.values(Vt)},onClick:{type:Function,default:()=>({})}}};var tt=(t=>(t["primary-darker"]="primary--darker",t["primary-dark"]="primary--dark",t["primary-light"]="primary--light",t["primary-lighter"]="primary--lighter",t["primary-lightest"]="primary--lightest",t["secondary-darker"]="secondary--darker",t["secondary-dark"]="secondary--dark",t["secondary-light"]="secondary--light",t["secondary-lighter"]="secondary--lighter",t["secondary-lightest"]="secondary--lightest",t["success-dark"]="success--dark",t["success-light"]="success--light",t["success-lighter"]="success--lighter",t["warning-dark"]="warning--dark",t["warning-light"]="warning--light",t["warning-lighter"]="warning--lighter",t["danger-dark"]="danger--dark",t["danger-light"]="danger--light",t["danger-lighter"]="danger--lighter",t["info-dark"]="info--dark",t["info-light"]="info--light",t["info-lighter"]="info--lighter",t))(tt||{});const Va={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},R=({image:t=le.props.image.default,color:e=le.props.color.default,className:s,size:a=le.props.size.default,fill:n=le.props.fill.default,weight:r=le.props.weight.default,testId:i=le.props.testId.default,onClick:o=le.props.onClick.default})=>{const c="material-symbols-rounded",d=e&&le.props.color.options.find(g=>g===e)&&`color__${tt[e]||e}`,f=m.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Va[r]}, 'opsz' 48`}),[r,n]);return u.jsx("i",{className:[`${le.class}--${a}`,le.class,c,d,s&&s].filter(g=>g).join(" "),"data-testid":i,onClick:o,style:f,translate:"no",children:t})};R.propTypes={color:l.oneOf(le.props.color.options),image:l.string,fontVariationSettings:l.object,size:l.oneOf(le.props.size.options),fill:l.bool,weight:l.oneOf(le.props.weight.options),onClick:l.func},R.displayName="DsIcon";const Ke=({children:t,className:e,onClick:s,size:a=Y.props.size.default,disabled:n=Y.props.disabled.default,icon:r=Y.props.icon.default,id:i=Y.props.id.default,testId:o=Y.props.testId.default,elevation:c,variant:d=Y.props.variant.default,color:f=Y.props.color.default,iconFill:g=Y.props.iconFill.default,iconPosition:k=Y.props.iconPosition.default,fullSize:b=Y.props.fullSize.default,trackId:C=Y.props.trackId.default,trackLabel:_})=>{const y=a&&Y.props.size.options.find(K=>K===a)?`${Y.class}--${a}`:`${Y.class}__${Y.props.size.default}`,I=n&&`${Y.class}--disabled`,q=`${Y.class}__${f}--${d}`,F=c&&`${Y.class}--elevation-${c}`,w=r&&`${Y.class}--with-icon`,p=b?`${Y.class}--full-size`:"",T=k==="right"?`${Y.class}__icon`:`${Y.class}__icon--left`,M=k==="right"?`${Y.class}__text`:`${Y.class}__text--reversed`;return u.jsx("button",{className:[Y.class,p,I,y,q,F,w,e].filter(K=>K).join(" "),"data-testid":o,"data-trackid":C,..._&&{"data-tracklabel":_},disabled:n,id:i,onClick:n?void 0:s,children:u.jsxs("span",{className:["ds-button__text",M].join(" "),children:[t,r&&u.jsx(R,{className:["ds-button__icon",T].join(" "),fill:g,image:r,size:a})]})})};Ke.propTypes={color:l.oneOf(Y.props.color.options),variant:l.oneOf(Y.props.variant.options),size:l.oneOf(Y.props.size.options),disabled:l.bool,icon:l.string,iconFill:l.bool,iconPosition:l.oneOf(Y.props.iconPosition.options),testId:l.string,id:l.string,fullSize:l.bool,trackId:l.string,trackLabel:l.string},Ke.displayName="DsButton";const Zs={name:"Caption",class:"ds-caption"},Lt=({children:t,className:e,testId:s="ds-caption-test"})=>u.jsx("p",{className:[Zs.class,e].filter(a=>a).join(" "),"data-testid":s,children:t});Lt.propTypes={children:l.node.isRequired,className:l.string,testId:l.string},Lt.displayName="DsCaption";var st=(t=>(t.None="",t.PrimaryDarker="primary-darker",t.PrimaryDark="primary-dark",t.Primary="primary",t.PrimaryLight="primary-light",t.PrimaryLighter="primary-lighter",t.PrimaryLightest="primary-lightest",t.SecondaryDarker="secondary-darker",t.SecondaryDark="secondary-dark",t.Secondary="secondary",t.SecondaryLight="secondary-light",t.SecondaryLighter="secondary-lighter",t.SecondaryLightest="secondary-lightest",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.SuccessDark="success-dark",t.Success="success",t.SuccessLight="success-light",t.SuccessLighter="success-lighter",t.WarningDark="warning-dark",t.Warning="warning",t.WarningLight="warning-light",t.WarningLighter="warning-lighter",t.DangerDark="danger-dark",t.Danger="danger",t.DangerLight="danger-light",t.DangerLighter="danger-lighter",t.InfoDark="info-dark",t.Info="info",t.InfoLight="info-light",t.InfoLighter="info-lighter",t))(st||{}),Qs=(t=>(t[t.Elevation=0]="Elevation",t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(Qs||{});const be={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:"",options:Object.values(st)},borderColor:{type:String,default:"",options:Object.values(st)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"},trackId:{type:String,default:"track-click"},trackLabel:{type:String,default:""}}},jt=({id:t,testId:e=be.props.testId.default,children:s,className:a,elevation:n=be.props.elevation.default,backgroundColor:r=be.props.backgroundColor.default,borderColor:i=be.props.borderColor.default,trackId:o=be.props.trackId.default,trackLabel:c})=>{const d=n&&`elevation-${n}`,f=i&&`border-color__${tt[i]||i}`,g=r&&`bg-color__${tt[r]||r}`;return u.jsx("div",{className:[be.class,a,d,f,g].filter(k=>k).join(" "),"data-testid":e,"data-trackid":o,...c&&{"data-tracklabel":c},id:t,children:s})};jt.propTypes={id:l.string,testId:l.string,backgroundColor:l.oneOf(be.props.backgroundColor.options),borderColor:l.oneOf(be.props.borderColor.options),elevation:l.oneOf(be.props.elevation.options),trackId:l.string,trackLabel:l.string},jt.displayName="DsCard";const ae={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:"ds-checkbox-test"},label:{type:String,default:""},description:{type:String,default:""},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},changeByChecked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Pt=m.forwardRef(({id:t,className:e,name:s,testId:a=ae.props.testId.default,label:n=ae.props.label.default,description:r=ae.props.description.default,checked:i=ae.props.checked.default,disabled:o=ae.props.checked.default,changeByChecked:c=ae.props.changeByChecked.default,onChangeHandler:d},f)=>{const g=c||!1,k=i||!1,[b,C]=m.useState(k),_={image:b?"check_box":"check_box_outline_blank",class:b?`${ae.class}__icon--checked`:`${ae.class}__icon--unchecked`},y=o&&`${ae.class}--disabled`,I=q=>{o||(C(F=>!F),d&&d(q))};return m.useEffect(()=>{g&&C(i)},[i,g]),u.jsxs("label",{className:[ae.class,y,e&&e].join(" "),htmlFor:t||s,children:[u.jsx("input",{checked:b,className:`${ae.class}__input`,"data-testid":a,id:t||s,name:s,onChange:I,ref:f,type:"checkbox"}),u.jsx(R,{className:`${ae.class}__icon ${_.class}`,fill:!0,image:_.image,size:"xxl",testId:`${a}-icon`}),(r||n)&&u.jsxs("div",{className:`${ae.class}__label`,children:[n&&u.jsx("label",{className:`${ae.class}__label-title`,htmlFor:t||s,children:n}),r&&u.jsx("label",{className:`${ae.class}__label-description`,htmlFor:t||s,children:r})]})]})});Pt.propTypes={label:l.oneOfType([l.string,l.element]),name:l.string,className:l.string,testId:l.string,description:l.oneOfType([l.string,l.element]),checked:l.bool,disabled:l.bool},Pt.displayName="DsCheckbox";var qt=(t=>(t.Heading1="heading-1",t.Heading2="heading-2",t.Heading3="heading-3",t.Heading4="heading-4",t.Heading5="heading-5",t.Heading6="heading-6",t))(qt||{});const ze={name:"Heading",class:"ds-heading",props:{type:{type:String,default:"heading-1",options:Object.values(qt)}}},at=({children:t,testId:e="ds-heading-test",type:s=ze.props.type.default,className:a})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},r=s.replace("heading-",""),i=ze.props.type.options.find(d=>d===s)&&`${ze.class}--${r}`,c=n[s];return u.jsx(c,{className:[ze.class,i,a].filter(d=>d).join(" "),"data-testid":e,children:t})};at.propTypes={className:l.string,testId:l.string,type:l.oneOf(ze.props.type.options)},at.displayName="DsHeading";var zt=(t=>(t.None="",t.Dashed="dashed",t.Dotted="dotted",t))(zt||{}),Ut=(t=>(t.None="",t.Small="small",t.Large="large",t))(Ut||{});const xe={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:"",options:Object.values(zt)},size:{type:String,default:"",options:Object.values(Ut)}}};function Js(t,e,s){const a=s.props[t];return a.options&&a.options.some(n=>n===e)?`${s.class}--${e}`:""}const Ht=({size:t=xe.props.size.default,borderStyle:e=xe.props.borderStyle.default})=>{const s=Js("size",t,xe),a=Js("borderStyle",e,xe);return u.jsx("hr",{className:`${xe.class} ${s} ${a}`.trim()})};Ht.propTypes={size:l.oneOf(xe.props.size.options),borderStyle:l.oneOf(xe.props.borderStyle.options)},Ht.displayName="DsHR";function Be(t){return typeof t=="string"||t instanceof String}function ea(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function ta(t,e){return Array.isArray(e)?ta(t,(s,a)=>e.includes(a)):Object.entries(t).reduce((s,a)=>{let[n,r]=a;return e(r,n)&&(s[n]=r),s},{})}const A={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function La(t){switch(t){case A.LEFT:return A.FORCE_LEFT;case A.RIGHT:return A.FORCE_RIGHT;default:return t}}function Wt(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function nt(t,e){if(e===t)return!0;const s=Array.isArray(e),a=Array.isArray(t);let n;if(s&&a){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!nt(e[n],t[n]))return!1;return!0}if(s!=a)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const r=e instanceof Date,i=t instanceof Date;if(r&&i)return e.getTime()==t.getTime();if(r!=i)return!1;const o=e instanceof RegExp,c=t instanceof RegExp;if(o&&c)return e.toString()==t.toString();if(o!=c)return!1;const d=Object.keys(e);for(n=0;n<d.length;n++)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=0;n<d.length;n++)if(!nt(t[d[n]],e[d[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class ja{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?A.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?A.RIGHT:A.LEFT}}function B(t,e){return new B.InputMask(t,e)}function sa(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?B.MaskedRegExp:Be(t)?B.MaskedPattern:t===Date?B.MaskedDate:t===Number?B.MaskedNumber:Array.isArray(t)||t===Array?B.MaskedDynamic:B.Masked&&t.prototype instanceof B.Masked?t:B.Masked&&t instanceof B.Masked?t.constructor:t instanceof Function?B.MaskedFunction:(console.warn("Mask not found for mask",t),B.Masked)}function Re(t){if(!t)throw new Error("Options in not defined");if(B.Masked){if(t.prototype instanceof B.Masked)return{mask:t};const{mask:e=void 0,...s}=t instanceof B.Masked?{mask:t}:ea(t)&&t.mask instanceof B.Masked?t:{};if(e){const a=e.mask;return{...ta(e,(n,r)=>!r.startsWith("_")),mask:e.constructor,_mask:a,...s}}}return ea(t)?{...t}:{mask:t}}function we(t){if(B.Masked&&t instanceof B.Masked)return t;const e=Re(t),s=sa(e.mask);if(!s)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}B.createMask=we;class Yt{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,s){if(!(e==null||s==null||e===this.selectionStart&&s===this.selectionEnd))try{this._unsafeSelect(e,s)}catch{}}get isActive(){return!1}}B.MaskElement=Yt;const aa=90,Pa=89;class rt extends Yt{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,s,a;return(e=(s=(a=this.input).getRootNode)==null?void 0:s.call(a))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===aa&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Pa&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===aa&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}B.HTMLMaskElement=rt;class qa extends rt{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,s){this.input.setSelectionRange(e,s)}get value(){return this.input.value}set value(e){this.input.value=e}}B.HTMLMaskElement=rt;class na extends rt{get _unsafeSelectionStart(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a<n?a:n}get _unsafeSelectionEnd(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a>n?a:n}_unsafeSelect(e,s){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,e),a.setEnd(this.input.lastChild||this.input,s);const n=this.rootElement,r=n.getSelection&&n.getSelection();r&&(r.removeAllRanges(),r.addRange(a))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}B.HTMLContenteditableMaskElement=na;class it{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>it.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}it.MAX_LENGTH=100;class za{constructor(e,s){this.el=e instanceof Yt?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new na(e):new qa(e),this.masked=we(s),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new it,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var s;return e==null||((s=this.masked)==null?void 0:s.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof B.Masked)&&this.masked.constructor===sa(e)){this.masked.updateOptions({mask:e});return}const s=e instanceof B.Masked?e:we({mask:e});s.unmaskedValue=this.masked.unmaskedValue,this.masked=s}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,s){const a=this._listeners[e];a&&a.forEach(n=>n(s))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const s=this.masked.unmaskedValue,a=this.masked.value,n=this.masked.rawInputValue,r=this.displayValue,i=this.unmaskedValue!==s||this.value!==a||this._rawInputValue!==n;this._unmaskedValue=s,this._value=a,this._rawInputValue=n,this.el.value!==r&&(this.el.value=r),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:s,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:s,...a}=e,n=!this.maskEquals(s),r=this.masked.optionsIsChanged(a);n&&(this.mask=s),r&&this.masked.updateOptions(a),(n||r)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,A.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,s){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(s),this}off(e,s){if(!this._listeners[e])return this;if(!s)return delete this._listeners[e],this;const a=this._listeners[e].indexOf(s);return a>=0&&this._listeners[e].splice(a,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const s=new ja({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,n=this.masked.splice(s.startChangePos,s.removed.length,s.inserted,s.removeDirection,{input:!0,raw:!0}).offset,r=a===this.masked.rawInputValue?s.removeDirection:A.NONE;let i=this.masked.nearestInputPos(s.startChangePos+n,r);r!==A.NONE&&(i=this.masked.nearestInputPos(i,A.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}B.InputMask=za;class ${static normalize(e){return Array.isArray(e)?e:[e,new $]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}B.ChangeDetails=$;class Se{constructor(e,s,a){e===void 0&&(e=""),s===void 0&&(s=0),this.value=e,this.from=s,this.stop=a}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const s=this.value[0];return this.value=this.value.slice(1),s}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class ne{constructor(e){this._value="",this._update({...ne.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,s){s===void 0&&(s={input:!0}),this.reset(),this.append(e,s,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,s){return e}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),Math.min(this.displayValue.length,s-e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this.displayValue.slice(e,s)}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Se(this.extractInput(e,s),e)}appendTail(e){return Be(e)&&(e=new Se(String(e))),e.appendTo(this)}_appendCharRaw(e,s){return e?(this._value+=e,new $({inserted:e,rawInserted:e})):new $}_appendChar(e,s,a){s===void 0&&(s={});const n=this.state;let r;if([e,r]=this.doPrepareChar(e,s),e&&(r=r.aggregate(this._appendCharRaw(e,s)),!r.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(s);const c=this._appendCharRaw(e,s);o=o.aggregate(c),c.rawInserted||o.equals(r)?r=o:this.state=i}if(r.inserted){let i,o=this.doValidate(s)!==!1;if(o&&a!=null){const c=this.state;if(this.overwrite===!0){i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.unshift(this.displayValue.length-r.tailShift)}let d=this.appendTail(a);if(o=d.rawInserted.length===a.toString().length,!(o&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.shift();d=this.appendTail(a),o=d.rawInserted.length===a.toString().length}o&&d.inserted&&(this.state=c)}o||(r=new $,this.state=n,a&&i&&(a.state=i))}return r}_appendPlaceholder(){return new $}_appendEager(){return new $}append(e,s,a){if(!Be(e))throw new Error("value should be string");const n=Be(a)?new Se(String(a)):a;s!=null&&s.tail&&(s._beforeTailState=this.state);let r;[e,r]=this.doPrepare(e,s);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],s,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],s,n))break;r.aggregate(o)}return(this.eager===!0||this.eager==="append")&&s!=null&&s.input&&e&&r.aggregate(this._appendEager()),n!=null&&(r.tailShift+=this.appendTail(n).tailShift),r}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(s),new $}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const s=this.rawInputValue,a=this.value,n=e();return this.rawInputValue=s,this.value&&this.value!==a&&a.indexOf(this.value)===0&&(this.append(a.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const s=this.state,a=e(this);return this.state=s,delete this._isolated,a}doSkipInvalid(e,s,a){return!!this.skipInvalid}doPrepare(e,s){return s===void 0&&(s={}),$.normalize(this.prepare?this.prepare(e,this,s):e)}doPrepareChar(e,s){return s===void 0&&(s={}),$.normalize(this.prepareChar?this.prepareChar(e,this,s):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,s,a,n,r){a===void 0&&(a=""),n===void 0&&(n=A.NONE),r===void 0&&(r={input:!0});const i=e+s,o=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(n=La(n),d=this.extractInput(0,i,{raw:!0}));let f=e;const g=new $;if(n!==A.NONE&&(f=this.nearestInputPos(e,s>1&&e!==0&&!c?A.NONE:n),g.tailShift=f-e),g.aggregate(this.remove(f)),c&&n!==A.NONE&&d===this.rawInputValue)if(n===A.FORCE_LEFT){let k;for(;d===this.rawInputValue&&(k=this.displayValue.length);)g.aggregate(new $({tailShift:-1})).aggregate(this.remove(k-1))}else n===A.FORCE_RIGHT&&o.unshift();return g.aggregate(this.append(a,r,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!nt(this,e)}typedValueEquals(e){const s=this.typedValue;return e===s||ne.EMPTY_VALUES.includes(e)&&ne.EMPTY_VALUES.includes(s)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new $}}ne.DEFAULTS={skipInvalid:!0},ne.EMPTY_VALUES=[void 0,null,""],B.Masked=ne;class Ve{constructor(e,s){e===void 0&&(e=[]),s===void 0&&(s=0),this.chunks=e,this.from=s}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Be(e)?new Se(String(e)):e;const s=this.chunks[this.chunks.length-1],a=s&&(s.stop===e.stop||e.stop==null)&&e.from===s.from+s.toString().length;if(e instanceof Se)a?s.extend(e.toString()):this.chunks.push(e);else if(e instanceof Ve){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof B.MaskedPattern))return new Se(this.toString()).appendTo(e);const s=new $;for(let a=0;a<this.chunks.length;++a){const n=this.chunks[a],r=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!r||r.index<=i)&&((n instanceof Ve||e._stops.indexOf(i)>=0)&&s.aggregate(e._appendPlaceholder(i)),o=n instanceof Ve&&e._blocks[i]),o){const c=o.appendTail(n);s.aggregate(c);const d=n.toString().slice(c.rawInserted.length);d&&s.aggregate(e.append(d,{tail:!0}))}else s.aggregate(e.append(n.toString(),{tail:!0}))}return s}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:s,...a}=e;Object.assign(this,a),this.chunks=s.map(n=>{const r="chunks"in n?new Ve:new Se;return r.state=n,r})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const s=e!=null?e-this.from:e;let a=0;for(;a<this.chunks.length;){const n=this.chunks[a],r=n.unshift(s);if(n.toString()){if(!r)break;++a}else this.chunks.splice(a,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const s=this.chunks[e],a=s.shift();if(s.toString()){if(!a)break;--e}else this.chunks.splice(e,1);if(a)return a}return""}}class Ua{constructor(e,s){this.masked=e,this._log=[];const{offset:a,index:n}=e._mapPosToBlock(s)||(s<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((s=this.block)==null?void 0:s.displayValue.length)||0){var s;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,A.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,A.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,A.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,A.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,A.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,A.NONE),!0})}}class ra{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(s),this._value||(this._isRawInput=!1),new $}nearestInputPos(e,s){s===void 0&&(s=A.NONE);const a=0,n=this._value.length;switch(s){case A.LEFT:case A.FORCE_LEFT:return a;case A.NONE:case A.RIGHT:case A.FORCE_RIGHT:default:return n}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._isRawInput?s-e:0}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(e,s)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,s){if(s===void 0&&(s={}),this.isFilled)return new $;const a=this.eager===!0||this.eager==="append",r=this.char===e&&(this.isUnmasking||s.input||s.raw)&&(!s.raw||!a)&&!s.tail,i=new $({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(s.raw||s.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new $;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Se("")}appendTail(e){return Be(e)&&(e=new Se(String(e))),e.appendTo(this)}append(e,s,a){const n=this._appendChar(e[0],s);return a!=null&&(n.tailShift+=this.appendTail(a).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class lt{constructor(e){const{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:o,...c}=e;this.masked=we(c),Object.assign(this,{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),e===0&&s>=1?(this.isFilled=!1,this.masked.remove(e,s)):new $}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,s){if(s===void 0&&(s={}),this.isFilled)return new $;const a=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(s));return n.inserted&&this.doValidate(s)===!1&&(n=new $,this.masked.state=a),!n.inserted&&!this.isOptional&&!this.lazy&&!s.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,s,a){return this.masked.append(e,this.currentMaskFlags(s),a)}_appendPlaceholder(){return this.isFilled||this.isOptional?new $:(this.isFilled=!0,new $({inserted:this.placeholderChar}))}_appendEager(){return new $}extractTail(e,s){return this.masked.extractTail(e,s)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.masked.extractInput(e,s,a)}nearestInputPos(e,s){s===void 0&&(s=A.NONE);const a=0,n=this.value.length,r=Math.min(Math.max(e,a),n);switch(s){case A.LEFT:case A.FORCE_LEFT:return this.isComplete?r:a;case A.RIGHT:case A.FORCE_RIGHT:return this.isComplete?r:n;case A.NONE:default:return r}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.value.slice(e,s).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var s;return{...e,_beforeTailState:(e==null||(s=e._beforeTailState)==null?void 0:s.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new $}}lt.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Ha extends ne{updateOptions(e){super.updateOptions(e)}_update(e){const s=e.mask;s&&(e.validate=a=>a.search(s)>=0),super._update(e)}}B.MaskedRegExp=Ha;class re extends ne{constructor(e){super({...re.DEFAULTS,...e,definitions:Object.assign({},lt.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const s=this.mask;if(!s||!e)return;let a=!1,n=!1;for(let r=0;r<s.length;++r){if(this.blocks){const d=s.slice(r),f=Object.keys(this.blocks).filter(k=>d.indexOf(k)===0);f.sort((k,b)=>b.length-k.length);const g=f[0];if(g){const{expose:k,repeat:b,...C}=Re(this.blocks[g]),_={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...C,repeat:b,parent:this},y=b!=null?new B.RepeatBlock(_):we(_);y&&(this._blocks.push(y),k&&(this.exposeBlock=y),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),r+=g.length-1;continue}}let i=s[r],o=i in e;if(i===re.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){a=!a;continue}if(i==="["||i==="]"){n=!n;continue}if(i===re.ESCAPE_CHAR){if(++r,i=s[r],!i)break;o=!1}const c=o?new lt({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Re(e[i]),parent:this}):new ra({char:i,eager:this.eager,isUnmasking:a});this._blocks.push(c)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:s,...a}=e;this._blocks.forEach((n,r)=>n.state=s[r]),super.state=a}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,s)=>e+=s.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(s),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,s)=>e+=s.value,"")}set value(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(s),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(s),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,s)=>e+=s.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const s=new $;let a=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(a==null)return s;this._blocks[a].isFilled&&++a;for(let n=a;n<this._blocks.length;++n){const r=this._blocks[n]._appendEager();if(!r.inserted)break;s.aggregate(r)}return s}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._mapPosToBlock(this.displayValue.length),n=new $;if(!a)return n;for(let i=a.index,o;o=this._blocks[i];++i){var r;const c=o._appendChar(e,{...s,_beforeTailState:(r=s._beforeTailState)==null||(r=r._blocks)==null?void 0:r[i]});if(n.aggregate(c),c.consumed)break}return n}extractTail(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=new Ve;return e===s||this._forEachBlocksInRange(e,s,(n,r,i,o)=>{const c=n.extractTail(i,o);c.stop=this._findStopBefore(r),c.from=this._blockStartPos(r),c instanceof Ve&&(c.blockIndex=r),a.extend(c)}),a}extractInput(e,s,a){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),a===void 0&&(a={}),e===s)return"";let n="";return this._forEachBlocksInRange(e,s,(r,i,o,c)=>{n+=r.extractInput(o,c,a)}),n}_findStopBefore(e){let s;for(let a=0;a<this._stops.length;++a){const n=this._stops[a];if(n<=e)s=n;else break}return s}_appendPlaceholder(e){const s=new $;if(this.lazy&&e==null)return s;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return s;const n=a.index,r=e??this._blocks.length;return this._blocks.slice(n,r).forEach(i=>{if(!i.lazy||e!=null){var o;s.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),s}_mapPosToBlock(e){let s="";for(let a=0;a<this._blocks.length;++a){const n=this._blocks[a],r=s.length;if(s+=n.displayValue,e<=s.length)return{index:a,offset:e-r}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((s,a)=>s+=a.displayValue.length,0)}_forEachBlocksInRange(e,s,a){s===void 0&&(s=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const r=this._mapPosToBlock(s),i=r&&n.index===r.index,o=n.offset,c=r&&i?r.offset:this._blocks[n.index].displayValue.length;if(a(this._blocks[n.index],n.index,o,c),r&&!i){for(let d=n.index+1;d<r.index;++d)a(this._blocks[d],d,0,this._blocks[d].displayValue.length);a(this._blocks[r.index],r.index,0,r.offset)}}}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._forEachBlocksInRange(e,s,(n,r,i,o)=>{a.aggregate(n.remove(i,o))}),a}nearestInputPos(e,s){if(s===void 0&&(s=A.NONE),!this._blocks.length)return 0;const a=new Ua(this,e);if(s===A.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(s===A.LEFT||s===A.FORCE_LEFT){if(s===A.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===e)return e;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),s===A.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=e||(a.popState(),a.ok&&a.pos<=e))return a.pos;a.popState()}return a.ok?a.pos:s===A.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return s===A.RIGHT||s===A.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:s===A.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(e,A.LEFT))):e}totalInputPositions(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);let a=0;return this._forEachBlocksInRange(e,s,(n,r,i,o)=>{a+=n.totalInputPositions(i,o)}),a}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const s=this._maskedBlocks[e];return s?s.map(a=>this._blocks[a]):[]}pad(e){const s=new $;return this._forEachBlocksInRange(0,this.displayValue.length,a=>s.aggregate(a.pad(e))),s}}re.DEFAULTS={...ne.DEFAULTS,lazy:!0,placeholderChar:"_"},re.STOP_CHAR="`",re.ESCAPE_CHAR="\\",re.InputDefinition=lt,re.FixedDefinition=ra,B.MaskedPattern=re;class ot extends re{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:s=this.to||0,from:a=this.from||0,maxLength:n=this.maxLength||0,autofix:r=this.autofix,...i}=e;this.to=s,this.from=a,this.maxLength=Math.max(String(s).length,n),this.autofix=r;const o=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===o[d];)++d;i.mask=c.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let s="",a="";const[,n,r]=e.match(/^(\D*)(\d*)(\D*)/)||[];return r&&(s="0".repeat(n.length)+r,a="9".repeat(n.length)+r),s=s.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[s,a]}doPrepareChar(e,s){s===void 0&&(s={});let a;return[e,a]=super.doPrepareChar(e.replace(/\D/g,""),s),e||(a.skip=!this.isComplete),[e,a]}_appendCharRaw(e,s){if(s===void 0&&(s={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,s);const a=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[r,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(a[this.value.length],s):Number(r)>this.to?!s.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(a[this.value.length],s).aggregate(this._appendCharRaw(e,s)):super._appendCharRaw(n[this.value.length],s):super._appendCharRaw(e,s)}doValidate(e){const s=this.value;if(s.search(/[^0]/)===-1&&s.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(s);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const s=new $;if(this.value.length===this.maxLength)return s;const a=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let r=0;r<n;++r)s.aggregate(super._appendCharRaw("0",e));a.split("").forEach(r=>this._appendCharRaw(r))}return s}}B.MaskedRange=ot;class Te extends re{static extractPatternOptions(e){const{mask:s,pattern:a,...n}=e;return{...n,mask:Be(s)?s:a}}constructor(e){super(Te.extractPatternOptions({...Te.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:s,pattern:a,blocks:n,...r}={...Te.DEFAULTS,...e},i=Object.assign({},Te.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...r,mask:Be(s)?s:a,blocks:i})}doValidate(e){const s=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&s!=null&&(this.min==null||this.min<=s)&&(this.max==null||s<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Te.extractPatternOptions(e))}}Te.GET_DEFAULT_BLOCKS=()=>({d:{mask:ot,from:1,to:31,maxLength:2},m:{mask:ot,from:1,to:12,maxLength:2},Y:{mask:ot,from:1900,to:9999}}),Te.DEFAULTS={...re.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const s=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[s,a,n].join(".")},parse:(t,e)=>{const[s,a,n]=t.split(".").map(Number);return new Date(n,a-1,s)}},B.MaskedDate=Te;class ut extends ne{constructor(e){super({...ut.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(s=>{const{expose:a,...n}=Re(s),r=we({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return a&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._applyDispatch(e,s);return this.currentMask&&a.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(s))),a}_applyDispatch(e,s,a){e===void 0&&(e=""),s===void 0&&(s={}),a===void 0&&(a="");const n=s.tail&&s._beforeTailState!=null?s._beforeTailState._value:this.value,r=this.rawInputValue,i=s.tail&&s._beforeTailState!=null?s._beforeTailState._rawInputValue:r,o=r.slice(i.length),c=this.currentMask,d=new $,f=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...s},a),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-n.length),o&&(d.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):f&&(this.currentMask.state=f)),d}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const s=new $;return e&&s.aggregate(this._applyDispatch("",{},e)),s.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var s,a;return{...e,_beforeTailState:((s=e._beforeTailState)==null?void 0:s.currentMaskRef)===this.currentMask&&((a=e._beforeTailState)==null?void 0:a.currentMask)||e._beforeTailState}}doDispatch(e,s,a){return s===void 0&&(s={}),a===void 0&&(a=""),this.dispatch(e,this,s,a)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,s){s===void 0&&(s={});let[a,n]=super.doPrepare(e,s);if(this.currentMask){let r;[a,r]=super.doPrepare(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}doPrepareChar(e,s){s===void 0&&(s={});let[a,n]=super.doPrepareChar(e,s);if(this.currentMask){let r;[a,r]=super.doPrepareChar(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(s=>s.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let s=String(e);this.currentMask&&(this.currentMask.typedValue=e,s=this.currentMask.unmaskedValue),this.unmaskedValue=s}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,s){const a=new $;return this.currentMask&&a.aggregate(this.currentMask.remove(e,s)).aggregate(this._applyDispatch()),a}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(s=>s.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:s,currentMaskRef:a,currentMask:n,...r}=e;s&&this.compiledMasks.forEach((i,o)=>i.state=s[o]),a!=null&&(this.currentMask=a,this.currentMask.state=n),super.state=r}extractInput(e,s,a){return this.currentMask?this.currentMask.extractInput(e,s,a):""}extractTail(e,s){return this.currentMask?this.currentMask.extractTail(e,s):super.extractTail(e,s)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,s){return this.currentMask?this.currentMask.nearestInputPos(e,s):super.nearestInputPos(e,s)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((s,a)=>{if(!e[a])return;const{mask:n,...r}=e[a];return nt(s,r)&&s.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var s;return!!((s=this.currentMask)!=null&&s.typedValueEquals(e))}}ut.DEFAULTS={...ne.DEFAULTS,dispatch:(t,e,s,a)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,r=e.compiledMasks.map((i,o)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,A.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):c||i.remove(d),i.append(t,e.currentMaskFlags(s)),i.appendTail(a),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,A.FORCE_LEFT)))}});return r.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[r[0].index]}},B.MaskedDynamic=ut;class ct extends re{constructor(e){super({...ct.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:s,...a}=e;if(s){const n=s.map(o=>o.length),r=Math.min(...n),i=Math.max(...n)-r;a.mask="*".repeat(r),i&&(a.mask+="["+"*".repeat(i)+"]"),this.enum=s}super._update(a)}_appendCharRaw(e,s){s===void 0&&(s={});const a=Math.min(this.nearestInputPos(0,A.FORCE_RIGHT),this.value.length),n=this.enum.filter(r=>this.matchValue(r,this.unmaskedValue+e,a));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const c=n[0][o];o>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,s))});const r=super._appendCharRaw(n[0][this.value.length],s);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>r.aggregate(super._appendCharRaw(i))),r}return new $({skip:!this.isComplete})}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Se("",e)}remove(e,s){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),e===s)return new $;const a=Math.min(super.nearestInputPos(0,A.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(a,n),a)).length>1);--n);const r=super.remove(n,s);return r.tailShift+=n-e,r}get isComplete(){return this.enum.indexOf(this.value)>=0}}ct.DEFAULTS={...re.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},B.MaskedEnum=ct;class Wa extends ne{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}B.MaskedFunction=Wa;var ia;class ce extends ne{constructor(e){super({...ce.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),s="\\d*",a=(this.scale?"("+Wt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+s+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Wt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Wt(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const s=e.split(this.radix);return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),s.join(this.radix)}doPrepareChar(e,s){s===void 0&&(s={});const[a,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(s.input&&s.raw||!s.input&&!s.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),s);return e&&!a&&(n.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&n.aggregate(this._appendChar("-")),[a,n]}_separatorsCount(e,s){s===void 0&&(s=!1);let a=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++a,s&&(e+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s),this._removeThousandsSeparators(super.extractInput(e,s,a))}_appendCharRaw(e,s){s===void 0&&(s={});const a=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),c=!1;if(o){let k;this.min!=null&&this.min<0&&this.number<this.min&&(k=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(k=this.max),k!=null&&(this.autofix?(this._value=this.format(k,this).replace(ce.UNMASKED_RADIX,this.radix),c||(c=r===this._value&&!s.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let d;o?d=new $({inserted:this._value.slice(r.length),rawInserted:c?"":e,skip:c}):(this._value=r,d=new $),this._value=this._insertThousandsSeparators(this._value);const f=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(f);return d.tailShift+=(g-n)*this.thousandsSeparator.length,d}_findSeparatorAround(e){if(this.thousandsSeparator){const s=e-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,s);if(a<=e)return a}return-1}_adjustRangeWithSeparators(e,s){const a=this._findSeparatorAround(e);a>=0&&(e=a);const n=this._findSeparatorAround(s);return n>=0&&(s=n+this.thousandsSeparator.length),[e,s]}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s);const a=this.value.slice(0,e),n=this.value.slice(s),r=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+n));const i=this._separatorsCountFromSlice(a);return new $({tailShift:(i-r)*this.thousandsSeparator.length})}nearestInputPos(e,s){if(!this.thousandsSeparator)return e;switch(s){case A.NONE:case A.LEFT:case A.FORCE_LEFT:{const a=this._findSeparatorAround(e-1);if(a>=0){const n=a+this.thousandsSeparator.length;if(e<n||this.value.length<=n||s===A.FORCE_LEFT)return a}break}case A.RIGHT:case A.FORCE_RIGHT:{const a=this._findSeparatorAround(e);if(a>=0)return a+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let s=e;this.min!=null&&(s=Math.max(s,this.min)),this.max!=null&&(s=Math.min(s,this.max)),s!==e&&(this.unmaskedValue=this.format(s,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(e){const s=this._removeThousandsSeparators(e).split(this.radix);return s[0]=s[0].replace(/^(\D*)(0*)(\d*)/,(a,n,r,i)=>n+i),e.length&&!/\d$/.test(s[0])&&(s[0]=s[0]+"0"),s.length>1&&(s[1]=s[1].replace(/0*$/,""),s[1].length||(s.length=1)),this._insertThousandsSeparators(s.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const s=e.split(this.radix);return s.length<2&&s.push(""),s[1]=s[1].padEnd(this.scale,"0"),s.join(this.radix)}doSkipInvalid(e,s,a){s===void 0&&(s={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===ce.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,s,a)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,ce.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(ce.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||ce.EMPTY_VALUES.includes(e)&&ce.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}ia=ce,ce.UNMASKED_RADIX=".",ce.EMPTY_VALUES=[...ne.EMPTY_VALUES,0],ce.DEFAULTS={...ne.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[ia.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},B.MaskedNumber=ce;const Xt={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function la(t,e,s){e===void 0&&(e=Xt.MASKED),s===void 0&&(s=Xt.MASKED);const a=we(t);return n=>a.runIsolated(r=>(r[e]=n,r[s]))}function Ya(t,e,s,a){return la(e,s,a)(t)}B.PIPE_TYPE=Xt,B.createPipe=la,B.pipe=Ya;class Xa extends re{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var s,a,n;const{repeat:r,...i}=Re(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=we(this._blockOpts);this.repeat=(s=(a=r??o.repeat)!=null?a:this.repeat)!=null?s:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(we(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,s){s===void 0&&(s={});const a=new $;for(let c=(n=(r=this._mapPosToBlock(this.displayValue.length))==null?void 0:r.index)!=null?n:Math.max(this._blocks.length-1,0),d,f;d=(i=this._blocks[c])!=null?i:f=!f&&this._allocateBlock(c);++c){var n,r,i,o;const g=d._appendChar(e,{...s,_beforeTailState:(o=s._beforeTailState)==null||(o=o._blocks)==null?void 0:o[c]});if(g.skip&&f){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(a.aggregate(g),g.consumed)break}return a}_trimEmptyTail(e,s){var a,n;e===void 0&&(e=0);const r=Math.max(((a=this._mapPosToBlock(e))==null?void 0:a.index)||0,this.repeatFrom,0);let i;s!=null&&(i=(n=this._mapPosToBlock(s))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let c=i;r<=c&&!this._blocks[c].unmaskedValue;--c,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._trimEmptyTail(e,s),a}totalInputPositions(e,s){return e===void 0&&(e=0),s==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,s)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}B.RepeatBlock=Xa;try{globalThis.IMask=B}catch{}const oa={mask:l.oneOfType([l.array,l.func,l.string,l.instanceOf(RegExp),l.oneOf([Date,Number,B.Masked]),l.instanceOf(B.Masked)]),value:l.any,unmask:l.oneOfType([l.bool,l.oneOf(["typed"])]),prepare:l.func,prepareChar:l.func,validate:l.func,commit:l.func,overwrite:l.oneOfType([l.bool,l.oneOf(["shift"])]),eager:l.oneOfType([l.bool,l.oneOf(["append","remove"])]),skipInvalid:l.bool,onAccept:l.func,onComplete:l.func,placeholderChar:l.string,displayChar:l.string,lazy:l.bool,definitions:l.object,blocks:l.object,enum:l.arrayOf(l.string),maxLength:l.number,from:l.number,to:l.number,pattern:l.string,format:l.func,parse:l.func,autofix:l.oneOfType([l.bool,l.oneOf(["pad"])]),radix:l.string,thousandsSeparator:l.string,mapToRadix:l.arrayOf(l.string),scale:l.number,normalizeZeros:l.bool,padFractionalZeros:l.bool,min:l.oneOfType([l.number,l.instanceOf(Date)]),max:l.oneOfType([l.number,l.instanceOf(Date)]),dispatch:l.func,inputRef:l.oneOfType([l.func,l.shape({current:l.object})])},ua=Object.keys(oa).filter(t=>t!=="value"),Ka=["value","unmask","onAccept","onComplete","inputRef"],Ra=ua.filter(t=>Ka.indexOf(t)<0);function Ga(t){var e;const s=(e=class extends m.Component{constructor(r){super(r),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const r=this.props,i=this._extractMaskOptionsFromProps(r);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in r&&r.value!==void 0&&(this.maskValue=r.value)):this.initMask(i);else if(this.destroyMask(),"value"in r&&r.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=r.value:this.element.value=r.value}}componentWillUnmount(){this.destroyMask()}_inputRef(r){this.element=r,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=r:this.props.inputRef(r))}initMask(r){r===void 0&&(r=this._extractMaskOptionsFromProps(this.props)),this.maskRef=B(this.element,r).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(r){const{...i}=r;return Object.keys(i).filter(o=>Ra.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(r){const{...i}=r;return ua.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=r.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(r){this.maskRef&&(r=r==null&&this.props.unmask!=="typed"?"":r,this.props.unmask==="typed"?this.maskRef.typedValue=r:this.props.unmask?this.maskRef.unmaskedValue=r:this.maskRef.value=r)}_onAccept(r){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,r)}_onComplete(r){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,r)}render(){return m.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),a=t.displayName||t.name||"Component";return s.displayName="IMask("+a+")",s.propTypes=oa,m.forwardRef((n,r)=>m.createElement(s,{...n,ref:r}))}const Za=Ga(t=>{let{inputRef:e,...s}=t;return m.createElement("input",{...s,ref:e})}),Qa=(t,e)=>m.createElement(Za,{...t,ref:e});m.forwardRef(Qa);function Ja(t,e){let{onAccept:s,onComplete:a,ref:n=m.useRef(null),defaultValue:r,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const c=m.useRef(null),[d,f]=m.useState({}),[g,k]=m.useState(""),[b,C]=m.useState(""),[_,y]=m.useState(),I=m.useCallback(()=>{var p;(p=c.current)==null||p.destroy(),c.current=null},[]),q=m.useCallback(()=>{const p=c.current;p&&(f({value:p.value,unmaskedValue:p.unmaskedValue,typedValue:p.typedValue}),y(p.typedValue),C(p.unmaskedValue),k(p.value))},[]),F=m.useCallback(p=>{const T=c.current;T&&(q(),s==null||s(T.value,T,p))},[s]),w=m.useCallback(p=>c.current&&(a==null?void 0:a(c.current.value,c.current,p)),[a]);return m.useEffect(()=>{const{value:p,...T}=d,M=c.current;!M||g===void 0||(p!==g&&(M.value=g,M.value!==g&&F()),f(T))},[g]),m.useEffect(()=>{const{unmaskedValue:p,...T}=d,M=c.current;!M||b===void 0||(p!==b&&(M.unmaskedValue=b,M.unmaskedValue!==b&&F()),f(T))},[b]),m.useEffect(()=>{const{typedValue:p,...T}=d,M=c.current;!M||_===void 0||(p!==_&&(M.typedValue=_,M.masked.typedValueEquals(_)||F()),f(T))},[_]),m.useEffect(()=>{const p=n.current;if(!p||!(t!=null&&t.mask))return I();const T=c.current;T?T==null||T.updateOptions(t):p&&t!=null&&t.mask&&(c.current=B(p,t),q(),r!==void 0&&k(r),i!==void 0&&C(i),o!==void 0&&y(o))},[t,I,F]),m.useEffect(()=>{if(!c.current)return;const p=c.current;return p.on("accept",F),p.on("complete",w),()=>{p.off("accept",F),p.off("complete",w)}},[F,w]),m.useEffect(()=>I,[I]),{ref:n,maskRef:c,value:g,setValue:k,unmaskedValue:b,setUnmaskedValue:C,typedValue:_,setTypedValue:y}}var Kt=(t=>(t.Text="text",t.Password="password",t.Email="email",t.Date="date",t.Number="number",t))(Kt||{}),Rt=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(Rt||{}),Gt=(t=>(t.Default="",t.Error="error",t.Success="success",t))(Gt||{}),Zt=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(Zt||{}),Qt=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(Qt||{});const G={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-input-test"},type:{type:String,default:"text",options:Object.values(Kt)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(Rt)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:"",options:Object.values(Gt)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!0},noMargin:{type:Boolean,default:!1},icon:{type:String,default:""},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:"center",options:Object.values(Zt)},tooltipPosition:{type:String,default:"top",options:Object.values(Qt)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},ca={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(t,e)=>(e.value+t).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}};var Jt=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(Jt||{}),es=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(es||{});const ve={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:"top",options:Object.values(Jt)},placement:{type:String,default:"center",options:Object.values(es)},text:{type:String,default:""},testId:{type:String,default:"ds-tooltip"}}},Le=({children:t,position:e=ve.props.position.default,placement:s=ve.props.placement.default,text:a=ve.props.text.default,testId:n=ve.props.testId.default,className:r})=>{const i=m.useRef(null),[o,c]=m.useState(0),[d,f]=m.useState(0),[g,k]=m.useState(!1),b=e&&ve.props.position.options.find(I=>I===e)&&`${ve.class}--${e}`,C=s&&ve.props.placement.options.find(I=>I===s)&&`${ve.class}--${s}`;let _;m.useLayoutEffect(()=>{var I,q;i.current&&(c((I=i==null?void 0:i.current)==null?void 0:I.offsetHeight),f((q=i==null?void 0:i.current)==null?void 0:q.offsetWidth))},[]);const y=9;switch(e){case"top":s==="initial"?_={bottom:o+y,left:-y}:s==="end"?_={bottom:o+y,right:-y}:_={bottom:o+y,left:"50%",transform:"translateX(-50%)"};break;case"bottom":s==="initial"?_={top:o+y,left:-y}:s==="end"?_={top:o+y,right:-y}:_={top:o+y,left:"50%",transform:"translateX(-50%)"};break;case"left":s==="initial"?_={right:d+y,top:-y}:s==="end"?_={right:d+y,bottom:-y}:_={right:d+y,top:"50%",transform:"translateY(-50%)"};break;case"right":s==="initial"?_={left:d+y,top:-y}:s==="end"?_={left:d+y,bottom:-y}:_={left:d+y,top:"50%",transform:"translateY(-50%)"};break}return u.jsxs("div",{className:[ve.class,r].join(" "),"data-testid":n,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),ref:i,role:"tooltip",children:[t,g&&u.jsx("div",{className:[b,C].filter(I=>I).join(" "),children:u.jsx("span",{className:`${ve.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:_,children:a})})]})};Le.propTypes={position:l.string,placement:l.string,text:l.oneOfType([l.string,l.node]),testId:l.string},Le.displayName="DsTooltip";const Ue=m.forwardRef(({name:t,testId:e=G.props.testId.default,type:s=G.props.type.default,animated:a=G.props.animated.default,size:n=G.props.size.default,label:r,placeholder:i,value:o,min:c,max:d,tooltip:f=G.props.tooltip.default,tooltipPosition:g=G.props.tooltipPosition.default,tooltipPlacement:k=G.props.tooltipPlacement.default,icon:b=G.props.icon.default,status:C=G.props.status.default,feedback:_,hasFeedback:y=G.props.hasFeedback.default,noMargin:I=G.props.noMargin.default,disabled:q=G.props.disabled.default,className:F,mask:w,onChangeHandler:p=G.props.onChangeHandler.default,onBlurHandler:T,onKeyDownHandler:M,onFocusHandler:K},x)=>{const[se,he]=m.useState(!1),[fe,Oe]=m.useState(!1),_e=!!p&&!!w,qe=(O,z,ee)=>{if(_e&&ee){const S={...ee,target:{...ee.target,name:t,maskedValue:O,value:z.unmaskedValue,type:"text"}};p(S)}},ue=m.useMemo(()=>typeof w=="object"?{lazy:!0,...w}:ca[w]?{...ca[w],min:c,max:d,lazy:!0}:{mask:w||"",min:c,max:d,lazy:!0},[w]),{ref:ke,setUnmaskedValue:Ie}=Ja(ue,{onAccept:qe}),$e=O=>{p&&!_e&&p(O)},v=O=>{M&&M(O)},E=O=>{he(!1),T&&T(O)},j=O=>{he(!0),K&&K(O)},V=()=>{Oe(O=>!O)},N=m.useMemo(()=>fe&&s==="password"?"text":s,[fe,s]),D=()=>{const O=[`${G.class}`];return n&&O.push(`${G.class}--${n}`),a&&O.push(`${G.class}--animated`),I&&O.push(`${G.class}--no-margin`),b&&O.push(`${G.class}--with-icon`),C&&O.push(`${G.class}--${C}`),F&&O.push(F),O.join(" ")},L=m.useMemo(()=>{const O=[`${G.class}__label`];return(se||o)&&O.push(`${G.class}__label--active`),O.join(" ")},[o,se]),P=()=>!a&&i?i:"",U=()=>C&&C==="error"?"info":"check_circle";return m.useEffect(()=>{w&&Ie(o||"")},[o,w,Ie]),u.jsxs("div",{className:D(),ref:x,children:[y&&u.jsx("div",{className:"ds-input__feedback",children:_&&u.jsxs(u.Fragment,{children:[u.jsx(R,{image:U()}),_]})}),u.jsx("input",{className:"ds-input__input","data-testid":e,disabled:q,id:t,max:d,min:c,name:t,onBlur:E,onChange:$e,onFocus:j,onInput:$e,onKeyDown:v,placeholder:P(),ref:ke,type:N,...!w&&{value:o||""}}),u.jsxs("label",{className:L,htmlFor:t,children:[r,f&&u.jsx(Le,{className:"ds-input__tooltip",placement:k,position:g,text:f,children:u.jsx(R,{className:"ds-input__icon",image:"info"})})]}),b&&u.jsx(R,{className:"ds-input__icon",image:b}),s==="password"&&u.jsx(R,{className:"ds-input__password-icon",image:fe?"visibility_off":"visibility",onClick:V,size:"xl"})]})});Ue.propTypes={name:l.string,testId:l.string,type:l.oneOf(G.props.type.options),animated:l.bool,size:l.oneOf(G.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),min:l.string,max:l.string,tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,icon:l.string,status:l.oneOf(G.props.status.options),feedback:l.string,hasFeedback:l.bool,noMargin:l.bool,disabled:l.bool,mask:l.oneOfType([l.string,l.object]),onChangeHandler:l.func,onFocusHandler:l.func},Ue.displayName="DsInput";var ts=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(ts||{}),ss=(t=>(t.None="",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t))(ss||{});const oe={name:"Loading",class:"ds-loading",props:{size:{type:String,default:"medium",options:Object.values(ts)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:"neutral-10",options:Object.values(ss)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},dt=({id:t,testId:e=oe.props.testId.default,className:s,size:a=oe.props.size.default,opacity:n=oe.props.opacity.default,fullscreen:r=oe.props.fullscreen.default,backgroundColor:i=oe.props.backgroundColor.default})=>{const o=!r&&`${oe.class}--absolute`,c=a&&`${oe.class}__dots--${a}`,d=i&&oe.props.backgroundColor.options.find(g=>g===i)&&`${oe.class}__background--${i}`,f=n&&`${oe.class}__background--opacity`;return u.jsxs("div",{className:[oe.class,s,o].filter(g=>g).join(" "),"data-testid":e,id:t,children:[u.jsx("div",{className:[`${oe.class}__background`,d,f].filter(g=>g).join(" ")}),u.jsx("div",{className:["ds-loading__dots",c].filter(g=>g).join(" "),role:"status"})]})};dt.propTypes={id:l.string,testId:l.string,size:l.oneOf(oe.props.size.options),opacity:l.bool,fullscreen:l.bool,backgroundColor:l.string},dt.displayName="DsLoading";const Ee={name:"Option",class:"ds-option",props:{id:{type:String,default:""},name:{type:String,default:""},testId:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},disabled:{type:Boolean,default:!1},detail:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},as=({id:t,label:e,detail:s,name:a,testId:n=a||"ds-option-test",disabled:r=Ee.props.disabled.default,value:i,checked:o=Ee.props.checked.default,onChangeHandler:c=Ee.props.onChangeHandler.default})=>{const[d]=m.useState(Math.random()),f=()=>{const g=[Ee.class];return r&&g.push(`${Ee.class}--disabled`),g.join(" ")};return u.jsxs("div",{className:f(),children:[u.jsx("input",{checked:o,"data-testid":n,disabled:r,id:t||String(d),name:a,onChange:c,type:"radio",value:i}),u.jsx(R,{className:`${Ee.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),u.jsxs("div",{className:`${Ee.class}__text-container`,children:[e&&u.jsx("label",{className:`${Ee.class}__label`,htmlFor:t||String(d),children:e}),s&&u.jsx("label",{className:`${Ee.class}__detail`,htmlFor:t||String(d),children:s})]})]})};as.propTypes={id:l.string,name:l.string,testId:l.string,label:l.oneOfType([l.string,l.node]),value:l.oneOfType([l.string,l.number]),detail:l.string,disabled:l.bool,checked:l.bool,onChangeHandler:l.func},as.displayName="DsOption";var ns=(t=>(t.Default="",t.Large="large",t.Small="small",t))(ns||{});const Ge={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:"",options:Object.values(ns)}}},Ce=({children:t,className:e,testId:s="ds-paragraph-test",type:a=Ge.props.type.default})=>{const n=a&&`${Ge.class}--${a}`;return u.jsx("p",{className:[Ge.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};Ce.propTypes={className:l.string,testId:l.string,type:l.oneOf(Ge.props.type.options)},Ce.displayName="DsParagraph";var rs=(t=>(t.Success="success",t.SuccessDark="success-dark",t.Warning="warning",t.Danger="danger",t))(rs||{});const is={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:"success",options:Object.values(rs)}}};var ls=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t.SpaceAround="space-around",t.SpaceBetween="space-between",t))(ls||{}),os=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t))(os||{}),us=(t=>(t.Row="row",t.Column="column",t.RowReverse="row-reverse",t.ColumnReverse="column-reverse",t))(us||{}),cs=(t=>(t.NoWrap="nowrap",t.Wrap="wrap",t.WrapReverse="wrap-reverse",t))(cs||{}),ds=(t=>(t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t))(ds||{});const Ne={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:"stretch",required:!0,options:Object.values(ls)},alignItems:{type:String,default:"stretch",required:!0,options:Object.values(os)},flexDirection:{type:String,default:"row",required:!0,options:Object.values(us)},flexWrap:{type:String,default:"wrap",required:!1,options:Object.values(cs)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(ds)}}},De=({children:t,className:e,justifyContent:s=Ne.props.justifyContent.default,alignItems:a=Ne.props.alignItems.default,flexDirection:n=Ne.props.flexDirection.default,flexWrap:r=Ne.props.flexWrap.default,width:i=Ne.props.width.default,height:o,gap:c})=>{const d=()=>{const g=[Ne.class,e];return c&&g.push(`${Ne.class}--gap-${c}`),g.join(" ")},f=()=>({display:"flex",justifyContent:s,alignItems:a,flexDirection:n,flexWrap:r,width:i,height:o,gap:c});return u.jsx("div",{className:d(),style:f(),children:t})};De.propTypes={className:l.string,justifyContent:l.string,alignItems:l.string,flexDirection:l.string,flexWrap:l.string,width:l.string,height:l.string,gap:l.string},De.displayName="DsFlexLayout";const pt={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},te=({children:t,flex:e=pt.props.flex.default,className:s=pt.props.className.default})=>{const a=()=>[pt.class,s].join(" "),n=()=>({flex:e});return u.jsx("div",{className:a(),style:n(),children:t})};te.propTypes={className:l.string,flex:l.string},te.displayName="DsFlexElement";var ht=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t))(ht||{});const He={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:"none",options:Object.values(ht)},horizontal:{type:String,default:"none",options:Object.values(ht)}}},de=({vertical:t=He.props.vertical.default,horizontal:e=He.props.horizontal.default})=>{const s=t&&`ds-spacer__vertical--${t}`,a=e&&`ds-spacer__horizontal--${e}`;return u.jsx("div",{className:[He.class,s,a].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};de.propTypes={vertical:l.oneOf(He.props.vertical.options),horizontal:l.oneOf(He.props.horizontal.options)},de.displayName="DsSpacer";const ps=({label:t,progress:e=is.props.progress.default,color:s=is.props.color.default})=>{const a=m.useMemo(()=>e>100?100:e<0?0:e,[e]),n=m.useMemo(()=>`ds-progress__progress--${s}`,[s]),r=m.useMemo(()=>s==="success-dark"?"color__success--dark":s==="warning"?"color__warning--dark":`color__${s}`,[s]);return u.jsx("div",{className:"ds-progress",children:u.jsxs(De,{flexDirection:"column",children:[u.jsx(te,{children:u.jsx("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,className:"ds-progress__container",role:"progressbar",children:u.jsx("div",{className:`ds-progress__progress ${n}`,"data-testid":"ds-progress-bar",style:{width:`${a}%`}})})}),u.jsx(te,{children:u.jsxs(De,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[u.jsx(de,{vertical:"quark"}),u.jsx(u.Fragment,{children:t&&u.jsx(Ce,{className:r,children:t})})]})})]})})};ps.propTypes={label:l.string,progress:l.number,color:l.string};var hs=(t=>(t.Small="sm",t.Medium="md",t.Large="lg",t))(hs||{}),fs=(t=>(t.Default="",t.Error="error",t.Success="success",t))(fs||{}),gs=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(gs||{}),ms=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(ms||{});const Z={name:"Select",class:"ds-select",props:{label:{type:String,default:""},className:{type:String,default:""},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String,default:""},testId:{type:String,default:"ds-select-test"},placeholder:{type:String},onChange:{type:Function,default:()=>{}},value:{type:[Boolean,String,Number,void 0]},size:{type:String,options:Object.values(hs),default:"md"},status:{type:String,default:"",options:Object.values(fs)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:"initial",options:Object.values(gs)},tooltipPosition:{type:String,default:"top",options:Object.values(ms)},feedback:{type:String,default:""},options:[]}},vs=m.forwardRef(({label:t,className:e,disabled:s=Z.props.disabled.default,animated:a=Z.props.animated.default,multiple:n=Z.props.multiple.default,testId:r=Z.props.testId.default,name:i,options:o,value:c,placeholder:d,onChange:f,onChangeHandler:g,size:k=Z.props.size.default,status:b=Z.props.status.default,tooltip:C,tooltipPosition:_=Z.props.tooltipPosition.default,tooltipPlacement:y=Z.props.tooltipPlacement.default,feedback:I,...q},F)=>{const[w,p]=m.useState(!1),T=x=>{p(!1),f&&f(x,x.target.value),g&&g(x,x.target.value)},M=()=>{const x=[Z.class,"select-placeholder"];return x.push(`${Z.class}--${k}`),b&&x.push(`${Z.class}--${b}`),w&&x.push(`${Z.class}--active`),s&&x.push(`${Z.class}--disabled`),e&&x.push(e),x.join(" ")},K=m.useMemo(()=>{const x=[`${Z.class}__label`];return!a&&x.push(`${Z.class}__label--not-animated`),c&&x.push(`${Z.class}__label--has-value`),a&&!c&&!C&&x.push(`${Z.class}__label--hidden`),x.join(" ")},[c]);return u.jsxs("div",{className:M(),"data-testid":"ds-select-component",children:[t&&u.jsxs("label",{className:K,"data-testid":"ds-label-id",htmlFor:i,children:[t,C&&u.jsx(Le,{className:`${Z.class}__tooltip`,placement:y,position:_,text:C,children:u.jsx(R,{className:`${Z.class}__icon`,image:"info"})})]}),u.jsxs("select",{"data-testid":r,disabled:s,id:i,multiple:n,name:i,onBlur:()=>p(!1),onChange:x=>T(x),onFocus:()=>p(!0),ref:F,value:c??"",...q,children:[(d||a)&&u.jsx("option",{disabled:!0,value:"",children:d??t}),o==null?void 0:o.map((x,se)=>{var he;return"options"in x?u.jsx("optgroup",{label:x.label,children:(he=x.options)==null?void 0:he.map((fe,Oe)=>u.jsx("option",{className:`${Z.class}__option-select`,value:fe.value,children:fe.label||fe.value},Oe))},se):u.jsx("option",{className:`${Z.class}__option-select`,value:x.value,children:x.label||x.value},se)})]}),I&&u.jsxs("div",{className:"ds-select__feedback-container",children:[u.jsx(R,{className:"ds-select__icon",image:b==="success"?"check_circle":"info"}),u.jsx("span",{className:"ds-select__feedback",children:I})]})]})});vs.propTypes={label:l.string.isRequired,className:l.string,disabled:l.bool,animated:l.bool,multiple:l.bool,name:l.string,testId:l.string,options:l.array.isRequired,placeholder:l.string,onChange:l.func,onChangeHandler:l.func,value:l.oneOfType([l.string,l.number]),size:l.oneOf(Z.props.size.options),status:l.oneOf(Z.props.status.options),tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,feedback:l.string},vs.displayName="DsSelect";var ys=(t=>(t.Large="large",t.Small="small",t))(ys||{});const ft={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:"large",options:Object.values(ys)}}},da=({children:t,className:e,testId:s="ds-subtitle-test",type:a})=>{const n=ft.props.type.options.find(r=>r===a)&&`${ft.class}--${a}`;return u.jsx("p",{className:[ft.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};da.displayName="DsSubtitle";var _s=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(_s||{}),ks=(t=>(t.Text="text",t))(ks||{}),bs=(t=>(t.None="",t.Error="error",t.Success="success",t))(bs||{}),Ss=(t=>(t.None="none",t.Both="both",t.Horizontal="horizontal",t.Vertical="vertical",t.Block="block",t.Inline="inline",t))(Ss||{});const J={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-textarea-test"},type:{type:String,default:"text",options:Object.values(ks)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(_s)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},minLength:{type:Number,default:void 0},maxLength:{type:Number,default:void 0},rows:{type:Number,default:1},status:{type:String,default:"",options:Object.values(bs)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:"none",options:Object.values(Ss)},onChangeHandler:{type:Function,default:()=>{}}}},Es=m.forwardRef(({name:t,testId:e=J.props.testId.default,animated:s=J.props.animated.default,size:a=J.props.size.default,label:n,placeholder:r,value:i,minLength:o,maxLength:c,tooltip:d,icon:f,status:g=J.props.status.default,feedback:k,disabled:b=J.props.disabled.default,required:C,className:_,resize:y=J.props.resize.default,onChangeHandler:I,onBlurHandler:q,onKeyDownHandler:F,onFocusHandler:w,rows:p=J.props.rows.default,cols:T,description:M,style:K},x)=>{const[se,he]=m.useState(!1),[fe,Oe]=m.useState(0),[_e,qe]=m.useState(Math.random());m.useEffect(()=>{i==null&&qe(Math.random())},[i]);const ue=D=>{Oe(D.target.value.length),I&&I(D)},ke=D=>{F&&F(D)},Ie=D=>{he(!1),q&&q(D)},$e=D=>{he(!0),w&&w(D)},v=()=>{const D=[`${J.class}`];return a&&D.push(`${J.class}--${a}`),s&&D.push(`${J.class}--animated`),d&&D.push(`${J.class}--with-icon`),g&&D.push(`${J.class}--${g}`),_&&D.push(_),D.join(" ")},E=m.useMemo(()=>{const D=[`${J.class}__label`];return(se||i)&&D.push(`${J.class}__label--active`),D.join(" ")},[i,se]),j=()=>!s&&r?r:"",V=()=>g&&g==="error"?"info":"check_circle",N={resize:y,...K||{}};return u.jsxs("div",{className:v(),children:[M&&u.jsx("span",{className:"ds-textarea__description",children:M}),k&&u.jsxs("div",{className:"ds-textarea__feedback",children:[u.jsx(R,{image:V()}),k]}),u.jsx("textarea",{className:"ds-textarea__textarea",cols:T,"data-testid":e,defaultValue:i||"",disabled:b,id:t,maxLength:c,minLength:o,name:t,onBlur:Ie,onChange:ue,onFocus:$e,onKeyDown:ke,placeholder:j(),ref:x,required:C,rows:p,style:N}),u.jsx("label",{className:E,htmlFor:t,children:n}),c&&u.jsxs("span",{className:"ds-textarea__count",children:[fe,"/",c]}),d&&u.jsx(Le,{className:"ds-textarea__tooltip",placement:"end",text:d,children:u.jsx(R,{className:"ds-textarea__icon",image:f})})]},_e)});Es.propTypes={name:l.string,testId:l.string,animated:l.bool,size:l.oneOf(J.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),tooltip:l.string,icon:l.string,status:l.oneOf(J.props.status.options),feedback:l.string,minLength:l.number,maxLength:l.number,rows:l.number,cols:l.number,disabled:l.bool,required:l.bool,onChangeHandler:l.func,onBlur:l.func,onKeyDown:l.func,onFocus:l.func,resize:l.oneOf(J.props.resize.options).isRequired,description:l.string,style:l.object},Es.displayName="DsTextArea";const Ze={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1},testId:{type:String,default:"ds-container-test"}}},gt=({children:t,fluid:e=Ze.props.fluid.default,className:s,style:a,testId:n=Ze.props.testId.default})=>{const r=e?`${Ze.class}--fluid`:Ze.class;return u.jsx("div",{className:[r,s].filter(i=>i).join(" "),"data-testid":n,style:a,children:t})};gt.propTypes={children:l.node,fluid:l.bool,className:l.string,style:l.object,testId:l.string},gt.displayName="DsContainer";var Cs=(t=>(t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(Cs||{}),mt=(t=>(t.Start="start",t.End="end",t.Center="center",t.Stretch="stretch",t.SpaceAround="space-around",t.SpaceBetween="space-between",t.SpaceEvenly="space-evenly",t))(mt||{});const Q={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:"sm",options:Object.values(Cs)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:"start",options:Object.values(mt)},verticalAlign:{type:String,default:"start",options:Object.values(mt)}}};function pa(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function en(){const[t,e]=m.useState(pa());return m.useEffect(()=>{function s(){e(pa())}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),t}const As=({children:t,rows:e=Q.props.rows.default,gap:s=Q.props.gap.default,vGap:a=Q.props.vGap.default,hGap:n=Q.props.hGap.default,horizontalAlign:r=Q.props.horizontalAlign.default,verticalAlign:i=Q.props.verticalAlign.default,width:o=Q.props.width.default,height:c=Q.props.height.default})=>{const d=a&&`${Q.class}__v-gap--${s}`,f=n&&`${Q.class}__h-gap--${s}`,g=r&&Q.props.horizontalAlign.options.find(F=>F===r)?`${Q.class}--h-${r}`:null,k=i&&Q.props.verticalAlign.options.find(F=>F===i)?`${Q.class}--v-${i}`:null,{width:b}=en(),[C,_]=m.useState("auto");m.useEffect(()=>{b<=768?_("6"):_("12")},[b]);const y=F=>/^[+-]?\d+$/.test(F),I=()=>e.split(",").map(w=>(w=w.trim(),w==="0"||w==="*"||w==="auto"?"auto":y(w)?w+"fr":w)).join(" "),q=()=>`repeat(${C}, minmax(0, 1fr))`;return u.jsx("div",{className:[Q.class,g,k,d,f].filter(F=>F).join(" "),style:{width:o,height:c,gridTemplateColumns:q(),gridTemplateRows:I()},children:t})};As.propTypes={children:l.oneOfType([l.arrayOf(l.node),l.node,l.func]),rows:l.string,gap:l.oneOf(Q.props.gap.options),vGap:l.bool,hGap:l.bool,width:l.string,height:l.string,horizontalAlign:l.oneOf(Q.props.horizontalAlign.options),verticalAlign:l.oneOf(Q.props.verticalAlign.options)},As.displayName="DsGridLayout";const ha=()=>typeof window<"u"&&window.innerWidth?window.innerWidth:0,fa=({children:t,grid:e})=>{const{row:s,col:a,mobileRow:n,mobileCol:r}=e,[i,o]=m.useState(ha());m.useEffect(()=>{const d=()=>{o(ha())};if(typeof window<"u")return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]);const c=m.useMemo(()=>i<=768?{gridRow:n||s,gridColumn:r||a}:{gridRow:s,gridColumn:a},[i,s,a,n,r]);return u.jsx("div",{style:c,children:t})};fa.displayName="DsGridElement";const tn={name:"Grid-Element",class:"ds-grid-element",props:{grid:{type:Object,default:{row:"auto",col:"auto"}}}};var je=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(je||{});const ge={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:"xs",options:Object.values(je)},top:{type:String,default:"none",options:Object.values(je)},right:{type:String,default:"none",options:Object.values(je)},bottom:{type:String,default:"none",options:Object.values(je)},left:{type:String,default:"none",options:Object.values(je)}}},We=({children:t,space:e=ge.props.space.default,top:s=ge.props.top.default,right:a=ge.props.right.default,bottom:n=ge.props.bottom.default,left:r=ge.props.left.default})=>{const i=s&&`${ge.class}__top--${s}`,o=a&&`${ge.class}__right--${a}`,c=n&&`${ge.class}__bottom--${n}`,d=r&&`${ge.class}__left--${r}`,f=e&&`${ge.class}--${e}`;return u.jsx("div",{className:[ge.class,i,o,c,d,f].filter(g=>g).join(" "),children:t})};We.displayName="DsWrapper";const vt={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},Pe={name:"AccordionItem",class:"ds-accordion-item",props:{title:{type:String,default:""},content:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}}},yt=({title:t,content:e,onToggle:s,active:a=Pe.props.active.default,disabled:n=Pe.props.disabled.default})=>{const r=a&&`${Pe.class}--active`;return u.jsxs("li",{className:[Pe.class,r].filter(i=>i).join(" "),children:[u.jsxs("button",{className:`${Pe.class}__button`,disabled:n,onClick:s,children:[t,u.jsx(R,{className:`${Pe.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),a&&u.jsx("div",{className:"ds-accordion-item__content",children:e})]})};yt.propTypes={active:l.bool,title:l.oneOfType([l.element,l.string]),content:l.oneOfType([l.element,l.string]),disabled:l.bool},yt.displayName="DsAccordionItem";const ws=({items:t=vt.props.items.default,activeItem:e=vt.props.activeItem.default,onClick:s})=>{const[a,n]=m.useState(-1);m.useEffect(()=>{t.map((i,o)=>{i.active&&n(o)})},[t]),m.useEffect(()=>{e!=null&&n(e)},[e]);const r=i=>{if(a===i)return s&&s(-1),n(-1);n(i),s&&s(i)};return u.jsx("ul",{className:vt.class,children:t.map((i,o)=>u.jsx(yt,{active:a===o,content:i.content,disabled:i.disabled,onToggle:()=>{r(o)},title:i.title},o))})};ws.propTypes={items:l.array,activeItem:l.number},ws.displayName="DsAccordion";const ga=({title:t,activeTags:e,handleTagClose:s})=>u.jsx("div",{className:"active-tags",children:e.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(Ce,{className:"active-tags__title",children:t}),u.jsx("div",{className:"active-tags__list","data-testid":"ds-list",children:e.map((a,n)=>u.jsx(Le,{text:`Filtro ${a.text} aplicado`,children:u.jsxs("div",{className:`active-tags__item ${a.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`ds-active-tag-${n}`,children:[u.jsxs(De,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(R,{className:"active-tags__icon",color:a.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:a.icon,testId:`icon-${n}`})}),u.jsx(te,{children:u.jsx(Ce,{type:"small",children:a.text})})]}),!a.hiddenClose&&u.jsx(R,{image:"close",onClick:()=>s(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${a.id}-${a.text}`))})]})});ga.displayName="DsActiveTags";const sn={name:"ActiveTags",class:"ds-active-tags",props:{title:{type:String,default:""},activeTags:{type:Array,default:[]},handleTagClose:{type:Function,default:()=>{}}}},Ye={name:"Carousel",class:"ds-carousel",props:{}},ma=({slides:t,interval:e=3e3,imageHeight:s=100,imageWidth:a=100,imageMaxHeight:n,imageMaxWidth:r})=>{const[i,o]=m.useState(0),[c,d]=m.useState(!1),f=m.useRef(null);m.useEffect(()=>(c||(f.current=setInterval(()=>{o(b=>b===t.length-1?0:b+1)},e)),()=>{f.current&&clearInterval(f.current)}),[c,e,t.length]);const g=()=>d(!0),k=()=>d(!1);return u.jsxs("div",{className:`${Ye.class}`,"data-testid":"ds-carousel",onMouseEnter:g,onMouseLeave:k,children:[u.jsx("div",{className:`${Ye.class}__image-wrapper`,style:{height:s,width:a,maxHeight:n,maxWidth:r},children:t.map((b,C)=>u.jsx("img",{alt:b.title,className:`${Ye.class}__image ${C===i?"active":"inactive"}`,height:s,src:b.image,style:{maxHeight:n,maxWidth:r},width:a},C))}),u.jsx(de,{vertical:"xxs"}),u.jsx("div",{children:u.jsx(at,{className:"color__primary--default",type:"heading-4",children:t[i].title})}),u.jsx("div",{children:u.jsx(Ce,{type:"large",children:t[i].description})}),u.jsx(de,{vertical:"xxs"}),u.jsx("div",{className:`${Ye.class}__dots`,children:u.jsx("div",{className:`${Ye.class}__dots-wrapper`,children:t.map((b,C)=>u.jsx("button",{"aria-label":`Go to slide ${C+1}`,className:`dot ${i===C?"dot--active":""}`,onClick:()=>o(C)},C))})})]})};ma.propTypes={slides:l.arrayOf(l.shape({title:l.string.isRequired,image:l.string.isRequired,description:l.string.isRequired})).isRequired,interval:l.number,imageHeight:l.oneOfType([l.number,l.string]),imageWidth:l.oneOfType([l.number,l.string]),imageMaxHeight:l.oneOfType([l.number,l.string]),imageMaxWidth:l.oneOfType([l.number,l.string])};var Ts=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(Ts||{});const X={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},testId:{type:String,default:"ds-editable-select"},animated:{type:Boolean,default:!0},placeholder:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},size:{type:String,default:"medium",options:Object.values(Ts)},status:{type:String,default:""},options:{type:Array,default:[]},icon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},loading:{type:Boolean},onChangeHandler:{type:Function,default:()=>{}},onBlurHandler:{type:Function,default:()=>{}},onFocusHandler:{type:Function,default:()=>{}},onSelectHandler:{type:Function,default:()=>{}}}},va=({label:t=X.props.label.default,name:e=X.props.name.default,testId:s=X.props.testId.default,value:a=X.props.value.default,options:n=X.props.options.default,size:r=X.props.size.default,onChangeHandler:i=X.props.onChangeHandler.default,onSelectHandler:o=X.props.onSelectHandler.default,icon:c=X.props.icon.default,noOptionsMessage:d=X.props.noOptionsMessage.default,disabled:f=X.props.disabled.default,status:g=X.props.status.default,onBlurHandler:k=X.props.onBlurHandler.default,onFocusHandler:b=X.props.onFocusHandler.default,animated:C=X.props.animated.default,placeholder:_=X.props.placeholder.default,loading:y})=>{const[I,q]=m.useState(!1),[F,w]=m.useState(a),p=x=>{i(x),(y==null&&x.currentTarget.value.length||!y&&x.currentTarget.value.length>2)&&q(!0)},T=x=>{o(x),k(),w(Math.random().toString()),q(!1)},M=x=>{f||T(x)};m.useEffect(()=>{a.length===0&&q(!1)},[a]);const K=()=>n.length>0?n.map((x,se)=>u.jsx("button",{className:`${X.class}__option ${X.class}__option--${r}`,"data-testid":`ds-option-${x.id||x.label}`,onClick:()=>M(x),children:x.label},se)):u.jsx("div",{className:`${X.class}__option ${X.class}__option--not-found--${r}`,children:d},"no_option");return u.jsxs("div",{className:`${X.class}__container`,children:[u.jsx(Ue,{animated:C,className:`${X.class}__input`,disabled:f,label:t,name:e,onBlurHandler:k,onChangeHandler:p,onFocusHandler:b,placeholder:_,size:r,status:g,testId:s,value:a},F),(c||y)&&(y?u.jsx("div",{className:`${X.class}__loading ${X.class}__loading--${r}`,style:{width:"18px"},children:u.jsx(dt,{fullscreen:!1})}):c&&u.jsx(R,{className:`${X.class}__icon ${X.class}__icon--${r}`,image:c})),I&&u.jsx("div",{className:`${X.class}__list ${X.class}__list--${r}`,"data-testid":"ds-list",children:K()})]})};va.displayName="DsEditableSelect";const Xe={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},an=({length:t,current:e=Xe.props.current.default})=>{const[s,a]=m.useState(e),n=i=>i<s?`${Xe.class}__step--older`:i===s?`${Xe.class}__step--active`:"";m.useEffect(()=>{a(e)},[e]);const r=[];for(let i=0;i<t;i++)r.push(u.jsx("div",{className:`${Xe.class}__step ${n(i)}`,"data-testid":`ds-indicator-step-${i}`},i));return u.jsx("div",{className:Xe.class,children:r})},ya={name:"DsInlineEditable",class:"ds-inline-editable",props:{name:{type:String,required:!0},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},onChangeHandler:{type:Function,default:()=>{}}}},Ds=({name:t,value:e,prefix:s,sufix:a,min:n,max:r,onChangeHandler:i})=>{const o=m.useRef(null),[c,d]=m.useState(!1),[f,g]=m.useState("");m.useEffect(()=>{g(e??"")},[e]);const k=y=>{y.key==="Enter"&&b(y)};function b(y){d(!1),i&&(n&&parseInt(n)>=parseInt(f===""?n:f)?(y.currentTarget.value=n,g(n)):r&&parseInt(r)<parseInt(f)?(y.currentTarget.value=r,g(r)):y.currentTarget.value=f,i(y))}const C=y=>{g(y.currentTarget.value)},_=async()=>{var y;await d(!0),(y=o.current)==null||y.focus()};return u.jsx("div",{className:ya.class,children:c?u.jsx("input",{className:"ds-input__input","data-testid":"ds-input",max:r,min:n,name:t,onBlur:b,onChange:C,onKeyDown:k,ref:o,type:"number",value:f}):u.jsx("div",{"data-testid":"ds-inline-editible-div-click",onClick:_,children:u.jsxs(De,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(Ce,{children:u.jsxs("b",{children:[s,e,a]})})}),u.jsx(te,{children:u.jsx(R,{image:"edit_square"})})]})})})};Ds.propTypes={value:l.string},Ds.displayName="DsInlineEditable";var _a=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(_a||{}),Fs=(t=>(t.Squared="squared",t.Rounded="rounded",t))(Fs||{});const pe={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:"rounded",options:Object.values(Fs)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},Os=({className:t,title:e,content:s,cancelBtnText:a=pe.props.cancelBtnText.default,confirmBtnText:n=pe.props.confirmBtnText.default,variant:r=pe.props.variant.default,elevation:i,isModalOpen:o=pe.props.isModalOpen.default,onClose:c,onCancel:d,onConfirm:f,...g})=>{const k=r&&pe.props.variant.options.find(y=>y===r)?`${pe.class}--${r}`:`${pe.class}--${pe.props.variant.default}`,b=i&&`${pe.class}--elevation-${i}`,C=f||d,_=m.useCallback(y=>{y.keyCode===27&&c()},[c]);return m.useEffect(()=>(o&&window&&!C&&window.addEventListener("keyup",_),()=>{window.removeEventListener("keyup",_)}),[C,_]),o?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ds-modal-overlay","data-testid":"ds-modal-overlay",...g,onClick:()=>C?()=>{}:c()}),u.jsxs("div",{className:[pe.class,k,b,t&&t].filter(y=>y).join(" "),"data-testid":"ds-modal",children:[!C&&u.jsx("button",{className:"ds-modal__closeBtn","data-testid":"ds-modal-close-button",onClick:c,children:u.jsx(R,{image:"close",size:"lg"})}),u.jsxs("div",{className:"ds-modal__content",children:[u.jsx("div",{className:"ds-modal__content__title",children:e}),e&&u.jsx(de,{vertical:"xxxs"}),u.jsx("div",{className:"ds-modal__content__content",children:s})]}),C&&u.jsx(de,{vertical:"sm"}),!C&&u.jsx(de,{vertical:"xxs"}),u.jsxs("div",{className:"ds-modal__cta",children:[d&&u.jsx(Ke,{onClick:()=>{c(),d()},children:a}),f&&u.jsx(Ke,{onClick:()=>{c(),f()},children:n})]})]})]}):null};Os.propTypes={firstButtonText:l.string,confirmBtnText:l.string,cancelBtnText:l.string,variant:l.oneOf(pe.props.variant.options),elevation:l.oneOf(pe.props.elevation.options),isModalOpen:l.bool,title:l.node,content:l.node},Os.displayName="DsModal";var Is=(t=>(t.Success="success",t.Danger="danger",t.Warning="warning",t.Info="info",t))(Is||{}),xs=(t=>(t.Rounded="rounded",t.Squared="squared",t))(xs||{});const ie={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:"info",options:Object.values(Is)},id:{type:String},autoClose:{type:Boolean,default:!1},autoCloseTimer:{type:Number,default:4e3},dismissible:{type:Boolean,default:!1},elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:"rounded",options:Object.values(xs)},progressBar:{type:Boolean,default:!0},testId:{type:String,default:"ds-notification"}}};var ka=(t=>(t.success="check",t.danger="error",t.warning="warning",t.info="info",t))(ka||{});const Bs=({className:t,type:e=ie.props.type.default,variant:s=ie.props.variant.default,id:a,children:n,message:r,autoClose:i=ie.props.autoClose.default,autoCloseTimer:o=ie.props.autoCloseTimer.default,dismissible:c=ie.props.dismissible.default,elevation:d,progressBar:f=ie.props.progressBar.default,handleClose:g,testId:k=ie.props.testId.default})=>{const[b,C]=m.useState(o),[_,y]=m.useState(!1),[I,q]=m.useState(!0),F=[ie.class,e&&`${ie.class}--${e}`,s&&`${ie.class}--${s}`,d&&`${ie.class}--elevation-${d}`,t&&t].join(" "),w=()=>C(K=>(K===0&&q(!1),K-100));m.useEffect(()=>{!i&&!c&&q(!0);let K;return!_&&i&&(K=setInterval(w,100)),()=>{clearInterval(K)}},[_,i,o,I,c]);const p=()=>{y(!0)},T=()=>{y(!1)},M=K=>{q(!1),g&&g(K)};return I?u.jsxs("div",{className:F,"data-testid":k,id:a,onMouseEnter:p,onMouseLeave:T,children:[u.jsx(We,{bottom:"nano",top:"nano",children:u.jsxs(De,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[u.jsx(te,{children:u.jsx(R,{color:e,fill:!0,image:ka[e]})}),u.jsx(te,{flex:"1",children:u.jsx(We,{left:"none",right:"none",space:"nano",children:n??r})}),u.jsx(te,{children:c?u.jsx("div",{className:`${ie.class}__button`,"data-testid":`${k}-close`,onClick:K=>M(K),children:u.jsx(We,{children:u.jsx(R,{image:"close"})})}):u.jsx(de,{horizontal:"quark"})})]})}),f&&i&&u.jsx("div",{className:`${ie.class}__progress-bar ${ie.class}__progress-bar--${e}`,"data-testid":`${k}-progress-bar`,style:{width:`${b/o*100}%`}})]}):null};Bs.displayName="DsNotification";const _t={name:"DsPasswordConfirmation",class:"ds-password-confirmation",props:{onChange:{type:Function,default:()=>{}},validationList:{type:Array,default:[{title:"Um número",rule:t=>/\d/.test(t)},{title:"Uma letra maiúscula",rule:t=>/[A-Z]/.test(t)},{title:"Um caractere especial. Ex: @#!?",rule:t=>/[!@#$%^&*()+\-=_[\]{};':"\\|,.<>/?]/.test(t)},{title:"Mínimo 8 caracteres",rule:t=>t.length>=8}]},instructionLabel:{type:String,default:"A senha deverá conter:"},testId:{type:String,default:"ds-password-confirmation"}}},kt={strong:"Forte",good:"Boa",medium:"Médio",weak:"Fraco"},Ns=({onChange:t,validationList:e=_t.props.validationList.default,instructionLabel:s=_t.props.instructionLabel.default,testId:a=_t.props.testId.default})=>{const[n,r]=m.useState(""),[i,o]=m.useState(""),[c,d]=m.useState([]),[f,g]=m.useState({score:0,color:"danger",label:"Fraco"}),[k,b]=m.useState(!1),C=m.useCallback(p=>{const T=e.map(M=>M==null?void 0:M.rule(p));return d(T),T},[e]),_=m.useCallback(p=>{r(p.currentTarget.value);const T=C(p.currentTarget.value),M=F(T);t({password:p.currentTarget.value,confirmationPassword:i,isEqual:i===p.currentTarget.value,feedback:M})},[i,t,C]),y=m.useCallback(p=>{o(p.currentTarget.value);const T=C(n),M=F(T);t({password:n,confirmationPassword:p.currentTarget.value,isEqual:n===p.currentTarget.value,feedback:M})},[n,t,C]),I=m.useMemo(()=>n!==i&&k?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[n,i,k]),q=m.useCallback(p=>{const T={score:p,color:"danger",label:kt.weak};return p>30&&p<75?(T.color="warning",T.label=kt.medium):p>=75&&p<100?(T.color="success",T.label=kt.good):p===100&&(T.color="success-dark",T.label=kt.strong),T},[]),F=m.useCallback(p=>{const T=p.reduce((K,x)=>{let se=K;return x?(se++,se):K},0),M=q(T*100/p.length);return g(M),M},[q]),w=()=>u.jsx("ul",{children:e.map((p,T)=>{const M=c[T]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return u.jsxs("li",{className:M,children:[c[T]?u.jsx(R,{color:"success-dark",image:"check",testId:"ds-check-icon"}):null,u.jsx(de,{horizontal:"quark"}),u.jsx(Ce,{children:p.title})]},T+p.title)})});return u.jsxs(De,{className:"ds-password-confirmation",flexDirection:"column",children:[u.jsx(te,{children:u.jsx(Ue,{label:"Senha",name:"password",onChangeHandler:_,testId:`${a}-main-input`,type:"password",value:n})}),u.jsx(te,{children:u.jsx(ps,{color:f==null?void 0:f.color,label:f==null?void 0:f.label,progress:f==null?void 0:f.score})}),u.jsx(te,{children:u.jsx(Ce,{children:s})}),u.jsx(te,{children:w()}),u.jsx(de,{vertical:"xxs"}),u.jsx(te,{children:u.jsx(Ue,{feedback:I.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>b(!0),onChangeHandler:y,onFocusHandler:()=>b(!0),status:I.status,testId:`${a}-confirm-input`,type:"password",value:i})})]})};Ns.propTypes={onChange:l.func,validationList:l.array,instructionLabel:l.string,testId:l.string},Ns.displayName="DsPasswordConfirmation";const me={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},ba=({steps:t,selectedStep:e=me.props.selectedStep.default,onChange:s})=>{const[a,n]=m.useState(e),r=(i,o)=>{const c=[`${me.class}__button`];return o!==i&&c.push(`${me.class}__button--round`),t[i]&&t[i].disabled&&c.push(`${me.class}__button--disabled`),c.join(" ")};return m.useEffect(()=>{n(e)},[e]),m.useEffect(()=>{s(a)},[a]),u.jsxs("div",{className:me.class,children:[u.jsxs("span",{className:`${me.class}__step-counter`,children:["Etapa ",a+1," de ",t==null?void 0:t.length]}),u.jsx("div",{className:`${me.class}__step`,children:t.map((i,o)=>u.jsx("div",{className:`${me.class}__content`,children:u.jsx("button",{className:r(o,a),"data-testid":`ds-button-${o}`,disabled:i.disabled,onClick:()=>n(o),children:u.jsxs("span",{className:`${me.class}__text`,children:[a===o?u.jsx(We,{bottom:"none",left:"nano",right:"nano",top:"none",children:u.jsx(R,{className:`${me.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${o}`})}):u.jsx(R,{className:`${me.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${o}`}),a===o&&i.label]})})},`${i.name}-${i.label}`))})]})};ba.displayName="DsStepper";const ye={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},Sa=({item:t,columns:e})=>u.jsx("tr",{className:`${ye.class}__row`,children:e.map((s,a)=>{const n=s.align&&`${ye.class}__cell--align-${s.align}`;return u.jsx("td",{children:u.jsx("div",{className:[`${ye.class}__cell`,n,s.className].filter(r=>r).join(" "),children:t&&t[`${s.name}`]})},a)})});Sa.displayName="DsTableRow";const Ea=({columns:t,data:e,className:s})=>u.jsx("div",{className:`${ye.class}__wrapper`,children:u.jsxs("table",{className:[`${ye.class}`,s].filter(a=>a).join(" "),children:[u.jsx("thead",{className:`${ye.class}__head`,children:u.jsx("tr",{className:`${ye.class}__row`,children:t==null?void 0:t.map((a,n)=>u.jsx("th",{style:{width:a.size},children:u.jsx("div",{className:[`${ye.class}__cell`,a.align&&`${ye.class}__cell--align-${a.align}`].filter(r=>r).join(" "),children:a.label})},n))})}),u.jsx("tbody",{className:`${ye.class}__body`,children:e&&e.map((a,n)=>u.jsx(Sa,{columns:t,item:a},n))})]})});Ea.displayName="DsTable";var Ms=(t=>(t.None="",t.Primary="primary",t.Secondary="secondary",t.Neutral="neutral",t.Success="success",t.Warning="warning",t.Danger="danger",t.Info="info",t))(Ms||{});const Fe={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:"primary",options:Object.values(Ms)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},nn=({active:t,className:e,color:s,disabled:a,name:n,index:r,title:i,onClick:o})=>{const c=[`${Fe.class}__tab`,`${Fe.class}__tab-color--${s}`,t&&`${Fe.class}__tab--active`,a&&`${Fe.class}__tab--disabled`,e&&e].join(" "),d=f=>{o&&!a&&o(f)};return u.jsx("div",{className:c,"data-testid":`ds-tab-${r}`,id:n,onClick:()=>d(r),children:i})},rn=({tabs:t,color:e,selectedTab:s=Fe.props.selectedTab.default,className:a,onChange:n})=>{const[r,i]=m.useState(s),o=c=>{i(c),n&&n(c)};return m.useEffect(()=>i(s),[s]),u.jsxs("div",{className:[Fe.class,a].filter(c=>c).join(" "),"data-testid":"ds-tabs",children:[u.jsx("div",{className:`${Fe.class}__header`,children:t.map((c,d)=>m.createElement(nn,{...c,active:r===d,color:e,index:d,key:d,onClick:()=>o(d)}))}),u.jsx("div",{className:`${Fe.class}__content`,children:t[r].content})]})};function Ca({library:t,children:e,theme:s}){return u.jsx("div",{"data-library":t,"data-theme":s,children:u.jsx("div",{className:"ds-theme",children:e})})}Ca.propTypes={library:l.string,children:l.node.isRequired,theme:l.string};var $s=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))($s||{});const Me={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:"top-right",options:Object.values($s)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},Vs=({className:t=Me.props.className.default,position:e=Me.props.position.default,fluid:s=Me.props.fluid.default,notifications:a,removeNotification:n})=>{const r=[Me.class,`${Me.class}--${e}`,s&&`${Me.class}--fluid`,t&&t].join(" "),i=o=>{n&&n(o)};return u.jsx("div",{className:r,"data-testid":"ds-notification-list",children:a.map(o=>{const c=o.autoClose??!0,d=o.autoCloseTimer??4e3,f=o.dismissible??!0,g=o.elevation??2,k=o.progressBar??!0;return u.jsx(Bs,{autoClose:c,autoCloseTimer:d,dismissible:f,elevation:g,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:k,type:o.type},o.id)})})};Vs.propTypes={position:l.oneOf(Me.props.position.options),fluid:l.bool,notifications:l.array,removeNotification:l.func},Vs.displayName="DsNotificationList";const Qe={name:"SplitLayout",class:"ds-split-layout",props:{}},Aa=({leftContent:t,rightContent:e,leftBackgroundColor:s,rightBackgroundColor:a,reverseOnMobile:n=!1})=>{const r=s?`bg-color__${s}`:"",i=a?`bg-color__${a}`:"",o=n?`${Qe.class}__content--mobile-order-2`:"",c=n?`${Qe.class}__content--mobile-order-1`:"",d=`${Qe.class}__content ${r} ${o}`,f=`${Qe.class}__content ${i} ${c}`;return u.jsxs("div",{className:Qe.class,children:[u.jsx("div",{className:d,children:t}),u.jsx("div",{className:f,children:e})]})};Aa.displayName="DsSplitLayout";const Je={name:"TwoColumns",class:"ds-two-columns",props:{}},Ls=({header:t,main:e,sidebar:s,breadcrumb:a})=>u.jsxs(gt,{children:[u.jsxs("div",{className:"ds-grid",children:[u.jsx("div",{className:"ds-grid__row",children:u.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:a})}),u.jsxs("div",{className:`${Je.class}__content ds-grid__row`,children:[u.jsxs("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:[u.jsx("div",{className:`${Je.class}__header`,children:t}),u.jsx("div",{className:`${Je.class}__main`,children:e})]}),u.jsx("div",{className:`${Je.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:s})]})]}),u.jsx(de,{vertical:"sm"})]});Ls.propTypes={breadcrumb:l.node,header:l.node,main:l.node,sidebar:l.node},Ls.displayName="DsTwoColumns",h.ButtonColor=Ot,h.ButtonElevation=Gs,h.ButtonIconPosition=Bt,h.ButtonSize=xt,h.ButtonVariant=It,h.CardColor=st,h.CardElevation=Qs,h.DsAccordion=ws,h.DsAccordionItem=yt,h.DsActiveTags=ga,h.DsButton=Ke,h.DsCaption=Lt,h.DsCard=jt,h.DsCarousel=ma,h.DsCheckbox=Pt,h.DsContainer=gt,h.DsEditableSelect=va,h.DsFlexElement=te,h.DsFlexLayout=De,h.DsGridElement=fa,h.DsGridLayout=As,h.DsHR=Ht,h.DsHeading=at,h.DsIcon=R,h.DsIndicator=an,h.DsInlineEditable=Ds,h.DsInput=Ue,h.DsLoading=dt,h.DsModal=Os,h.DsNotification=Bs,h.DsNotificationList=Vs,h.DsOption=as,h.DsParagraph=Ce,h.DsPasswordConfirmation=Ns,h.DsProgress=ps,h.DsSelect=vs,h.DsSpacer=de,h.DsSplitLayout=Aa,h.DsStepper=ba,h.DsSubtitle=da,h.DsTable=Ea,h.DsTabs=rn,h.DsTextArea=Es,h.DsTooltip=Le,h.DsTwoColumns=Ls,h.DsWrapper=We,h.EditableSelectSize=Ts,h.FlexLayoutAlignItems=os,h.FlexLayoutDirection=us,h.FlexLayoutGap=ds,h.FlexLayoutJustifyContent=ls,h.FlexLayoutWrap=cs,h.GridLayoutAlign=mt,h.GridLayoutGap=Cs,h.HRBorderStyle=zt,h.HRSize=Ut,h.HeadingType=qt,h.IconColor=Nt,h.IconSize=$t,h.IconVariation=Mt,h.IconWeight=Vt,h.InputSize=Rt,h.InputStatus=Gt,h.InputTooltipPlacement=Zt,h.InputTooltipPosition=Qt,h.InputType=Kt,h.LoadingBackgroundColor=ss,h.LoadingSize=ts,h.ModalElevation=_a,h.ModalVariant=Fs,h.NotificationListPosition=$s,h.NotificationType=Is,h.NotificationVariant=xs,h.ParagraphType=ns,h.ProgressColor=rs,h.SelectSize=hs,h.SelectStatus=fs,h.SelectTooltipPlacement=gs,h.SelectTooltipPosition=ms,h.SpacerSize=ht,h.SubtitleType=ys,h.TabsColor=Ms,h.TextAreaResize=Ss,h.TextAreaSize=_s,h.TextAreaStatus=bs,h.TextAreaType=ks,h.ThemeProvider=Ca,h.TooltipPlacement=es,h.TooltipPosition=Jt,h.WrapperSpace=je,h.accordionConfig=vt,h.accordionItemConfig=Pe,h.activeTagsConfig=sn,h.buttonConfig=Y,h.captionConfig=Zs,h.cardConfig=be,h.carouselConfig=Ye,h.checkboxConfig=ae,h.containerConfig=Ze,h.editableSelectConfig=X,h.flexElementConfig=pt,h.flexLayoutConfig=Ne,h.gridElementConfig=tn,h.gridLayoutConfig=Q,h.headingConfig=ze,h.horizontalRuleConfig=xe,h.iconConfig=le,h.indicatorConfig=Xe,h.inlineEditableConfig=ya,h.inputConfig=G,h.loadingConfig=oe,h.modalConfig=pe,h.notificationConfig=ie,h.notificationListConfig=Me,h.optionConfig=Ee,h.paragraphConfig=Ge,h.passwordConfirmationConfig=_t,h.progressConfig=is,h.selectConfig=Z,h.spacerConfig=He,h.stepperConfig=me,h.subtitleConfig=ft,h.tableConfig=ye,h.tabsConfig=Fe,h.textAreaConfig=J,h.tooltipConfig=ve,h.twoColumnsConfig=Je,h.wrapperConfig=ge,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});