@helpdice/ui 1.7.5 → 1.7.8

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 (304) hide show
  1. package/dist/CurrencyInput/index.js +2981 -0
  2. package/dist/LinearProgress/index.d.ts +2 -0
  3. package/dist/{css-baseline → LinearProgress}/index.js +25 -317
  4. package/dist/LinearProgress/linear-progress.d.ts +9 -0
  5. package/dist/Loadable/index.js +570 -0
  6. package/dist/PhoneInput/index.js +2136 -314
  7. package/dist/Placeholder/index.js +2116 -254
  8. package/dist/auto-complete/index.js +2145 -652
  9. package/dist/avatar/index.js +2119 -333
  10. package/dist/badge/index.js +2117 -331
  11. package/dist/breadcrumbs/index.js +2126 -340
  12. package/dist/button/button.compact.d.ts +2 -0
  13. package/dist/button/index.js +2214 -342
  14. package/dist/button-dropdown/index.js +2120 -291
  15. package/dist/button-group/index.js +2117 -331
  16. package/dist/capacity/index.js +2117 -331
  17. package/dist/card/index.js +2127 -298
  18. package/dist/checkbox/index.js +2119 -290
  19. package/dist/code/index.js +2116 -297
  20. package/dist/collapse/index.js +2117 -475
  21. package/dist/description/index.js +2117 -331
  22. package/dist/display/index.js +2117 -331
  23. package/dist/divider/index.js +2118 -332
  24. package/dist/dot/index.js +2117 -331
  25. package/dist/drawer/index.js +2129 -439
  26. package/dist/fieldset/index.js +2121 -354
  27. package/dist/grid/index.js +2119 -333
  28. package/dist/image/index.js +2122 -336
  29. package/dist/index.d.ts +2 -14
  30. package/dist/index.js +3175 -1879
  31. package/dist/input/index.js +2125 -296
  32. package/dist/keyboard/index.js +2116 -297
  33. package/dist/link/index.js +2117 -331
  34. package/dist/list/index.js +2119 -333
  35. package/dist/loading/index.js +2117 -331
  36. package/dist/menu/index.js +77 -45
  37. package/dist/modal/index.js +2145 -452
  38. package/dist/note/index.js +2117 -331
  39. package/dist/page/index.js +2117 -331
  40. package/dist/pagination/index.js +2118 -351
  41. package/dist/popover/index.js +2123 -354
  42. package/dist/progress/index.js +2117 -331
  43. package/dist/radio/index.js +2120 -334
  44. package/dist/rating/index.js +2118 -332
  45. package/dist/row/index.js +2115 -296
  46. package/dist/select/index.js +2151 -688
  47. package/dist/slider/index.js +2123 -356
  48. package/dist/snippet/index.js +2118 -421
  49. package/dist/spacer/index.js +2115 -296
  50. package/dist/spinner/index.js +2117 -331
  51. package/dist/table/index.js +2341 -754
  52. package/dist/tabs/index.js +2123 -344
  53. package/dist/tag/index.js +2116 -254
  54. package/dist/text/index.js +2116 -297
  55. package/dist/textarea/index.js +2117 -288
  56. package/dist/toggle/index.js +2117 -331
  57. package/dist/tooltip/index.js +2120 -351
  58. package/dist/tree/index.js +2123 -459
  59. package/dist/use-input/index.js +2122 -24
  60. package/dist/use-modal/index.js +2122 -24
  61. package/dist/use-network-status/index.d.ts +2 -0
  62. package/dist/{use-current-state → use-network-status}/index.js +22 -15
  63. package/dist/use-network-status/use-netowork-status.d.ts +4 -0
  64. package/dist/use-scale/index.js +2115 -296
  65. package/dist/use-tabs/index.js +2122 -24
  66. package/dist/user/index.js +2123 -337
  67. package/esm/CurrencyInput/components/CurrencyInput.js +342 -0
  68. package/esm/CurrencyInput/components/CurrencyInputProps.js +1 -0
  69. package/esm/CurrencyInput/components/utils/addSeparators.js +7 -0
  70. package/esm/CurrencyInput/components/utils/cleanValue.js +69 -0
  71. package/esm/CurrencyInput/components/utils/escapeRegExp.js +8 -0
  72. package/esm/CurrencyInput/components/utils/fixedDecimalValue.js +29 -0
  73. package/esm/CurrencyInput/components/utils/formatValue.js +124 -0
  74. package/esm/CurrencyInput/components/utils/getLocaleConfig.js +47 -0
  75. package/esm/CurrencyInput/components/utils/getSuffix.js +10 -0
  76. package/esm/CurrencyInput/components/utils/index.js +8 -0
  77. package/esm/CurrencyInput/components/utils/isNumber.js +3 -0
  78. package/esm/CurrencyInput/components/utils/padTrimValue.js +27 -0
  79. package/esm/CurrencyInput/components/utils/parseAbbrValue.js +43 -0
  80. package/esm/CurrencyInput/components/utils/removeInvalidChars.js +10 -0
  81. package/esm/CurrencyInput/components/utils/removeSeparators.js +10 -0
  82. package/esm/CurrencyInput/components/utils/repositionCursor.js +35 -0
  83. package/esm/CurrencyInput/index.js +4 -0
  84. package/esm/LinearProgress/index.d.ts +2 -0
  85. package/esm/LinearProgress/index.js +2 -0
  86. package/esm/LinearProgress/linear-progress.d.ts +9 -0
  87. package/esm/LinearProgress/linear-progress.js +28 -0
  88. package/esm/Loadable/index.js +2 -0
  89. package/esm/PhoneInput/phone.js +22 -19
  90. package/esm/auto-complete/auto-complete-dropdown.js +1 -3
  91. package/esm/auto-complete/auto-complete-item.js +1 -3
  92. package/esm/auto-complete/auto-complete-searching.js +1 -1
  93. package/esm/auto-complete/auto-complete.js +1 -1
  94. package/esm/avatar/avatar-group.js +1 -2
  95. package/esm/avatar/avatar.js +1 -2
  96. package/esm/badge/badge.js +1 -2
  97. package/esm/breadcrumbs/breadcrumbs-item.js +1 -1
  98. package/esm/breadcrumbs/breadcrumbs-separator.js +1 -1
  99. package/esm/breadcrumbs/breadcrumbs.js +1 -1
  100. package/esm/button/button-icon.js +1 -1
  101. package/esm/button/button.compact.d.ts +2 -0
  102. package/esm/button/button.compact.js +94 -50
  103. package/esm/button/button.js +1 -2
  104. package/esm/button/utils.js +1 -1
  105. package/esm/button-dropdown/button-dropdown-item.js +1 -1
  106. package/esm/button-dropdown/button-dropdown.js +1 -2
  107. package/esm/button-group/button-group.js +1 -2
  108. package/esm/capacity/capacity.js +1 -2
  109. package/esm/card/card-content.js +1 -1
  110. package/esm/card/card-footer.js +1 -2
  111. package/esm/card/card.js +1 -2
  112. package/esm/carousal/Arrow.js +18 -0
  113. package/esm/carousal/Indicator.js +20 -0
  114. package/esm/carousal/Thumbs.js +302 -0
  115. package/esm/carousal/animations.js +162 -0
  116. package/esm/carousal/index.js +683 -0
  117. package/esm/carousal/types.js +1 -0
  118. package/esm/carousal/utils.js +49 -0
  119. package/esm/checkbox/checkbox-group.js +1 -1
  120. package/esm/checkbox/checkbox.icon.js +1 -1
  121. package/esm/checkbox/checkbox.js +1 -2
  122. package/esm/code/code.js +1 -1
  123. package/esm/collapse/collapse-group.js +1 -2
  124. package/esm/collapse/collapse.js +1 -4
  125. package/esm/description/description.js +1 -2
  126. package/esm/display/display.js +1 -2
  127. package/esm/divider/divider.js +1 -2
  128. package/esm/dot/dot.js +1 -2
  129. package/esm/drawer/drawer-wrapper.js +1 -3
  130. package/esm/drawer/drawer.js +1 -1
  131. package/esm/fieldset/fieldset-content.js +1 -1
  132. package/esm/fieldset/fieldset-footer.js +1 -1
  133. package/esm/fieldset/fieldset-group.js +1 -3
  134. package/esm/fieldset/fieldset-title.js +1 -1
  135. package/esm/fieldset/fieldset.js +1 -2
  136. package/esm/grid/basic-item.js +1 -2
  137. package/esm/grid/grid-container.js +1 -1
  138. package/esm/grid/grid.js +1 -1
  139. package/esm/image/image-browser.js +1 -2
  140. package/esm/image/image.js +1 -2
  141. package/esm/image/image.skeleton.js +1 -1
  142. package/esm/index.d.ts +2 -14
  143. package/esm/index.js +5 -9
  144. package/esm/input/input-block-label.js +1 -1
  145. package/esm/input/input-icon-clear.js +1 -2
  146. package/esm/input/input-label.js +1 -1
  147. package/esm/input/input.js +1 -2
  148. package/esm/keyboard/keyboard.js +1 -1
  149. package/esm/link/link.js +1 -2
  150. package/esm/list/list-item.js +1 -2
  151. package/esm/loading/loading.js +1 -2
  152. package/esm/modal/modal-action.js +1 -2
  153. package/esm/modal/modal-actions.js +1 -1
  154. package/esm/modal/modal-content.js +1 -1
  155. package/esm/modal/modal-subtitle.js +1 -1
  156. package/esm/modal/modal-title.js +1 -1
  157. package/esm/modal/modal-wrapper.js +1 -3
  158. package/esm/modal/modal.js +1 -1
  159. package/esm/note/note.js +1 -2
  160. package/esm/page/page-header.js +1 -1
  161. package/esm/page/page.js +1 -1
  162. package/esm/pagination/pagination-item.js +1 -2
  163. package/esm/pagination/pagination.js +1 -1
  164. package/esm/popover/popover-item.js +1 -2
  165. package/esm/popover/popover.js +1 -1
  166. package/esm/progress/progress.js +1 -2
  167. package/esm/radio/radio-description.js +1 -1
  168. package/esm/radio/radio-group.js +1 -1
  169. package/esm/radio/radio.js +1 -2
  170. package/esm/rating/rating.js +1 -2
  171. package/esm/row/row.js +1 -1
  172. package/esm/select/select-dropdown.js +1 -3
  173. package/esm/select/select-icon-clear.js +1 -1
  174. package/esm/select/select-multiple-value.js +1 -1
  175. package/esm/select/select-option.js +1 -3
  176. package/esm/select/select.js +9 -12
  177. package/esm/slider/slider-dot.js +1 -2
  178. package/esm/slider/slider-mark.js +1 -1
  179. package/esm/slider/slider.js +1 -3
  180. package/esm/snippet/snippet.js +1 -3
  181. package/esm/spinner/spinner.js +1 -2
  182. package/esm/table/table-body.js +1 -2
  183. package/esm/table/table-head.js +3 -2
  184. package/esm/tabs/tabs-item.js +1 -2
  185. package/esm/tabs/tabs.js +1 -3
  186. package/esm/tag/tag.js +1 -1
  187. package/esm/text/child.js +1 -1
  188. package/esm/textarea/textarea.js +1 -2
  189. package/esm/toggle/toggle.js +1 -2
  190. package/esm/tooltip/tooltip-content.js +1 -3
  191. package/esm/tooltip/tooltip-icon.js +1 -1
  192. package/esm/tooltip/tooltip.js +1 -1
  193. package/esm/tree/tree-file-icon.js +1 -1
  194. package/esm/tree/tree-file.js +1 -2
  195. package/esm/tree/tree-folder-icon.js +1 -1
  196. package/esm/tree/tree-folder.js +1 -3
  197. package/esm/tree/tree-status-icon.js +1 -1
  198. package/esm/tree/tree.js +1 -1
  199. package/esm/use-input/use-input.js +1 -1
  200. package/esm/use-modal/use-modal.js +1 -1
  201. package/esm/use-network-status/index.d.ts +2 -0
  202. package/esm/use-network-status/index.js +2 -0
  203. package/esm/use-network-status/use-netowork-status.d.ts +4 -0
  204. package/esm/use-network-status/use-netowork-status.js +29 -0
  205. package/esm/use-scale/with-scale.js +1 -1
  206. package/esm/use-tabs/use-tabs.js +1 -1
  207. package/esm/user/user.js +1 -2
  208. package/esm/utils/use-context-state/use-context-state.js +1 -1
  209. package/esm/utils/use-drag.js +1 -1
  210. package/package.json +12 -4
  211. package/dist/css-baseline/css-baseline.d.ts +0 -9
  212. package/dist/css-baseline/index.d.ts +0 -1
  213. package/dist/shared/backdrop.d.ts +0 -14
  214. package/dist/shared/css-transition.d.ts +0 -13
  215. package/dist/shared/dropdown.d.ts +0 -9
  216. package/dist/shared/ellipsis.d.ts +0 -6
  217. package/dist/shared/expand.d.ts +0 -7
  218. package/dist/shared/highlight.d.ts +0 -13
  219. package/dist/ui-provider/index.d.ts +0 -3
  220. package/dist/ui-provider/index.js +0 -2186
  221. package/dist/ui-provider/theme-provider.d.ts +0 -8
  222. package/dist/ui-provider/ui-provider.d.ts +0 -8
  223. package/dist/use-all-themes/all-themes-context.d.ts +0 -7
  224. package/dist/use-all-themes/index.d.ts +0 -3
  225. package/dist/use-all-themes/index.js +0 -311
  226. package/dist/use-classes/index.d.ts +0 -2
  227. package/dist/use-classes/index.js +0 -48
  228. package/dist/use-classes/use-classes.d.ts +0 -4
  229. package/dist/use-current-state/index.d.ts +0 -2
  230. package/dist/use-current-state/use-current-state.d.ts +0 -4
  231. package/dist/use-media-query/index.d.ts +0 -3
  232. package/dist/use-media-query/index.js +0 -444
  233. package/dist/use-media-query/use-media-query.d.ts +0 -12
  234. package/dist/use-theme/index.d.ts +0 -2
  235. package/dist/use-theme/index.js +0 -309
  236. package/dist/use-theme/theme-context.d.ts +0 -4
  237. package/dist/use-toasts/helpers.d.ts +0 -18
  238. package/dist/use-toasts/index.d.ts +0 -3
  239. package/dist/use-toasts/index.js +0 -204
  240. package/dist/use-toasts/toast-container.d.ts +0 -3
  241. package/dist/use-toasts/toast-item.d.ts +0 -8
  242. package/dist/use-toasts/use-toast.d.ts +0 -40
  243. package/dist/utils/use-current-state.d.ts +0 -2
  244. package/dist/utils/use-dom-observer.d.ts +0 -3
  245. package/dist/utils/use-hd-ui-context.d.ts +0 -16
  246. package/dist/utils/use-previous.d.ts +0 -2
  247. package/esm/captcha/index.js +0 -128
  248. package/esm/css-baseline/css-baseline.d.ts +0 -9
  249. package/esm/css-baseline/css-baseline.js +0 -23
  250. package/esm/css-baseline/index.d.ts +0 -1
  251. package/esm/css-baseline/index.js +0 -2
  252. package/esm/shared/backdrop.d.ts +0 -14
  253. package/esm/shared/backdrop.js +0 -66
  254. package/esm/shared/css-transition.d.ts +0 -13
  255. package/esm/shared/css-transition.js +0 -65
  256. package/esm/shared/dropdown.d.ts +0 -9
  257. package/esm/shared/dropdown.js +0 -99
  258. package/esm/shared/ellipsis.d.ts +0 -6
  259. package/esm/shared/ellipsis.js +0 -13
  260. package/esm/shared/expand.d.ts +0 -7
  261. package/esm/shared/expand.js +0 -86
  262. package/esm/shared/highlight.d.ts +0 -13
  263. package/esm/shared/highlight.js +0 -46
  264. package/esm/ui-provider/index.d.ts +0 -3
  265. package/esm/ui-provider/index.js +0 -4
  266. package/esm/ui-provider/theme-provider.d.ts +0 -8
  267. package/esm/ui-provider/theme-provider.js +0 -45
  268. package/esm/ui-provider/ui-provider.d.ts +0 -8
  269. package/esm/ui-provider/ui-provider.js +0 -55
  270. package/esm/use-all-themes/all-themes-context.d.ts +0 -7
  271. package/esm/use-all-themes/all-themes-context.js +0 -11
  272. package/esm/use-all-themes/index.d.ts +0 -3
  273. package/esm/use-all-themes/index.js +0 -2
  274. package/esm/use-classes/index.d.ts +0 -2
  275. package/esm/use-classes/index.js +0 -2
  276. package/esm/use-classes/use-classes.d.ts +0 -4
  277. package/esm/use-classes/use-classes.js +0 -34
  278. package/esm/use-current-state/index.d.ts +0 -2
  279. package/esm/use-current-state/index.js +0 -2
  280. package/esm/use-current-state/use-current-state.d.ts +0 -4
  281. package/esm/use-current-state/use-current-state.js +0 -23
  282. package/esm/use-media-query/index.d.ts +0 -3
  283. package/esm/use-media-query/index.js +0 -2
  284. package/esm/use-media-query/use-media-query.d.ts +0 -12
  285. package/esm/use-media-query/use-media-query.js +0 -81
  286. package/esm/use-theme/index.d.ts +0 -2
  287. package/esm/use-theme/index.js +0 -2
  288. package/esm/use-theme/theme-context.d.ts +0 -4
  289. package/esm/use-theme/theme-context.js +0 -9
  290. package/esm/use-toasts/helpers.d.ts +0 -18
  291. package/esm/use-toasts/helpers.js +0 -68
  292. package/esm/use-toasts/index.d.ts +0 -3
  293. package/esm/use-toasts/index.js +0 -2
  294. package/esm/use-toasts/toast-container.d.ts +0 -3
  295. package/esm/use-toasts/toast-container.js +0 -120
  296. package/esm/use-toasts/toast-item.d.ts +0 -8
  297. package/esm/use-toasts/toast-item.js +0 -45
  298. package/esm/use-toasts/use-toast.d.ts +0 -40
  299. package/esm/use-toasts/use-toast.js +0 -103
  300. package/esm/utils/use-current-state.d.ts +0 -2
  301. package/esm/utils/use-current-state.js +0 -2
  302. package/esm/utils/use-dom-observer.d.ts +0 -3
  303. package/esm/utils/use-hd-ui-context.d.ts +0 -16
  304. package/esm/utils/use-previous.d.ts +0 -2
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
+ var require$$1 = require('react-dom');
6
7
 
7
8
  function _arrayLikeToArray(r, a) {
8
9
  (null == a || a > r.length) && (a = r.length);
@@ -165,15 +166,6 @@ function _toPropertyKey(t) {
165
166
  var i = _toPrimitive(t, "string");
166
167
  return "symbol" == typeof i ? i : i + "";
167
168
  }
168
- function _typeof(o) {
169
- "@babel/helpers - typeof";
170
-
171
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
172
- return typeof o;
173
- } : function (o) {
174
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
175
- }, _typeof(o);
176
- }
177
169
  function _unsupportedIterableToArray(r, a) {
178
170
  if (r) {
179
171
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
@@ -725,254 +717,2124 @@ function requireStyle () {
725
717
  var styleExports = requireStyle();
726
718
  var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
727
719
 
728
- var defaultFont = {
729
- sans: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
730
- mono: 'Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace',
731
- prism: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace'
732
- };
733
- var defaultBreakpoints = {
734
- xs: {
735
- min: '0',
736
- max: '650px'
737
- },
738
- sm: {
739
- min: '650px',
740
- max: '900px'
741
- },
742
- md: {
743
- min: '900px',
744
- max: '1280px'
745
- },
746
- lg: {
747
- min: '1280px',
748
- max: '1920px'
749
- },
750
- xl: {
751
- min: '1920px',
752
- max: '10000px'
753
- }
754
- };
755
- var defaultLayout = {
756
- gap: '16pt',
757
- gapNegative: '-16pt',
758
- gapHalf: '8pt',
759
- gapHalfNegative: '-8pt',
760
- gapQuarter: '4pt',
761
- gapQuarterNegative: '-4pt',
762
- pageMargin: '16pt',
763
- pageWidth: '750pt',
764
- pageWidthWithMargin: '782pt',
765
- breakpointMobile: defaultBreakpoints.xs.max,
766
- breakpointTablet: defaultBreakpoints.sm.max,
767
- radius: '6px',
768
- unit: '16px'
769
- };
720
+ var dist = {};
770
721
 
771
- var palette$1 = {
772
- accents_1: '#fafafa',
773
- accents_2: '#eaeaea',
774
- accents_3: '#999',
775
- accents_4: '#888',
776
- accents_5: '#666',
777
- accents_6: '#444',
778
- accents_7: '#333',
779
- accents_8: '#111',
780
- background: '#fff',
781
- foreground: '#000',
782
- selection: '#79ffe1',
783
- secondary: '#666',
784
- code: '#f81ce5',
785
- border: '#eaeaea',
786
- error: '#e00',
787
- errorLight: '#ff1a1a',
788
- errorLighter: '#f7d4d6',
789
- errorDark: '#c50000',
790
- success: '#0070f3',
791
- successLight: '#3291ff',
792
- successLighter: '#d3e5ff',
793
- successDark: '#0761d1',
794
- warning: '#f5a623',
795
- warningLight: '#f7b955',
796
- warningLighter: '#ffefcf',
797
- warningDark: '#ab570a',
798
- cyan: '#50e3c2',
799
- cyanLighter: '#aaffec',
800
- cyanLight: '#79ffe1',
801
- cyanDark: '#29bc9b',
802
- violet: '#7928ca',
803
- violetLighter: '#e3d7fc',
804
- violetLight: '#8a63d2',
805
- violetDark: '#4c2889',
806
- purple: '#f81ce5',
807
- alert: '#ff0080',
808
- magenta: '#eb367f',
809
- link: '#0070f3'
810
- };
811
- var expressiveness$1 = {
812
- linkStyle: 'none',
813
- linkHoverStyle: 'none',
814
- dropdownBoxShadow: '0 4px 4px 0 rgba(0, 0, 0, 0.02)',
815
- scrollerStart: 'rgba(255, 255, 255, 1)',
816
- scrollerEnd: 'rgba(255, 255, 255, 0)',
817
- shadowSmall: '0 5px 10px rgba(0, 0, 0, 0.12)',
818
- shadowMedium: '0 8px 30px rgba(0, 0, 0, 0.12)',
819
- shadowLarge: '0 30px 60px rgba(0, 0, 0, 0.12)',
820
- portalOpacity: 0.25
821
- };
822
- var font$1 = defaultFont;
823
- var breakpoints$1 = defaultBreakpoints;
824
- var layout$1 = defaultLayout;
825
- var themes$1 = {
826
- type: 'light',
827
- font: font$1,
828
- layout: layout$1,
829
- palette: palette$1,
830
- breakpoints: breakpoints$1,
831
- expressiveness: expressiveness$1
832
- };
722
+ var hasRequiredDist;
833
723
 
834
- var palette = {
835
- accents_1: '#111',
836
- accents_2: '#333',
837
- accents_3: '#444',
838
- accents_4: '#666',
839
- accents_5: '#888',
840
- accents_6: '#999',
841
- accents_7: '#eaeaea',
842
- accents_8: '#fafafa',
843
- background: '#000',
844
- foreground: '#fff',
845
- selection: '#f81ce5',
846
- secondary: '#888',
847
- code: '#79ffe1',
848
- border: '#333',
849
- error: '#e00',
850
- errorLighter: '#f7d4d6',
851
- errorLight: '#ff1a1a',
852
- errorDark: '#c50000',
853
- success: '#0070f3',
854
- successLighter: '#d3e5ff',
855
- successLight: '#3291ff',
856
- successDark: '#0761d1',
857
- warning: '#f5a623',
858
- warningLighter: '#ffefcf',
859
- warningLight: '#f7b955',
860
- warningDark: '#ab570a',
861
- cyan: '#50e3c2',
862
- cyanLighter: '#aaffec',
863
- cyanLight: '#79ffe1',
864
- cyanDark: '#29bc9b',
865
- violet: '#7928ca',
866
- violetLighter: '#e3d7fc',
867
- violetLight: '#8a63d2',
868
- violetDark: '#4c2889',
869
- purple: '#f81ce5',
870
- alert: '#ff0080',
871
- magenta: '#eb367f',
872
- link: '#3291ff'
873
- };
874
- var expressiveness = {
875
- linkStyle: 'none',
876
- linkHoverStyle: 'none',
877
- dropdownBoxShadow: '0 0 0 1px #333',
878
- scrollerStart: 'rgba(255, 255, 255, 1)',
879
- scrollerEnd: 'rgba(255, 255, 255, 0)',
880
- shadowSmall: '0 0 0 1px #333',
881
- shadowMedium: '0 0 0 1px #333',
882
- shadowLarge: '0 0 0 1px #333',
883
- portalOpacity: 0.75
884
- };
885
- var font = defaultFont;
886
- var breakpoints = defaultBreakpoints;
887
- var layout = defaultLayout;
888
- var themes = {
889
- type: 'dark',
890
- font: font,
891
- layout: layout,
892
- palette: palette,
893
- breakpoints: breakpoints,
894
- expressiveness: expressiveness
895
- };
724
+ function requireDist () {
725
+ if (hasRequiredDist) return dist;
726
+ hasRequiredDist = 1;
896
727
 
897
- var isObject = function isObject(target) {
898
- return target && _typeof(target) === 'object';
899
- };
900
- var _deepDuplicable = function deepDuplicable(source, target) {
901
- if (!isObject(target) || !isObject(source)) return source;
902
- var sourceKeys = Object.keys(source);
903
- var result = {};
904
- for (var _i = 0, _sourceKeys = sourceKeys; _i < _sourceKeys.length; _i++) {
905
- var key = _sourceKeys[_i];
906
- var sourceValue = source[key];
907
- var targetValue = target[key];
908
- if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
909
- result[key] = targetValue.concat(sourceValue);
910
- } else if (isObject(sourceValue) && isObject(targetValue)) {
911
- result[key] = _deepDuplicable(sourceValue, _objectSpread2({}, targetValue));
912
- } else if (targetValue) {
913
- result[key] = targetValue;
914
- } else {
915
- result[key] = sourceValue;
916
- }
917
- }
918
- return result;
919
- };
920
- var getPresets = function getPresets() {
921
- return [themes$1, themes];
922
- };
923
- var getPresetStaticTheme = function getPresetStaticTheme() {
924
- return themes$1;
925
- };
926
- var isAvailableThemeType = function isAvailableThemeType(type) {
927
- if (!type) return false;
928
- var presetThemes = getPresets();
929
- var hasType = presetThemes.find(function (theme) {
930
- return theme.type === type;
931
- });
932
- return !hasType;
933
- };
934
- var isPresetTheme = function isPresetTheme(themeOrType) {
935
- if (!themeOrType) return false;
936
- var isType = typeof themeOrType === 'string';
937
- var type = isType ? themeOrType : themeOrType.type;
938
- return !isAvailableThemeType(type);
939
- };
940
- var hasUserCustomTheme = function hasUserCustomTheme() {
941
- var themes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
942
- return !!themes.find(function (item) {
943
- return isAvailableThemeType(item.type);
944
- });
945
- };
946
- var create = function create(base, custom) {
947
- if (!isAvailableThemeType(custom.type)) {
948
- throw new Error('Duplicate or unavailable theme type');
949
- }
950
- return _deepDuplicable(base, custom);
951
- };
952
- var createFromDark = function createFromDark(custom) {
953
- return create(themes, custom);
954
- };
955
- var createFromLight = function createFromLight(custom) {
956
- return create(themes$1, custom);
957
- };
958
- var Themes = {
959
- isPresetTheme: isPresetTheme,
960
- isAvailableThemeType: isAvailableThemeType,
961
- hasUserCustomTheme: hasUserCustomTheme,
962
- getPresets: getPresets,
963
- getPresetStaticTheme: getPresetStaticTheme,
964
- create: create,
965
- createFromDark: createFromDark,
966
- createFromLight: createFromLight
967
- };
728
+ var React$1 = React;
729
+ var reactDom = require$$1;
968
730
 
969
- /* "use client" */
731
+ function _arrayLikeToArray(r, a) {
732
+ (null == a || a > r.length) && (a = r.length);
733
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
734
+ return n;
735
+ }
736
+ function _arrayWithHoles(r) {
737
+ if (Array.isArray(r)) return r;
738
+ }
739
+ function _arrayWithoutHoles(r) {
740
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
741
+ }
742
+ function _defineProperty(e, r, t) {
743
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
744
+ value: t,
745
+ enumerable: true,
746
+ configurable: true,
747
+ writable: true
748
+ }) : e[r] = t, e;
749
+ }
750
+ function _extends() {
751
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
752
+ for (var e = 1; e < arguments.length; e++) {
753
+ var t = arguments[e];
754
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
755
+ }
756
+ return n;
757
+ }, _extends.apply(null, arguments);
758
+ }
759
+ function _iterableToArray(r) {
760
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
761
+ }
762
+ function _iterableToArrayLimit(r, l) {
763
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
764
+ if (null != t) {
765
+ var e,
766
+ n,
767
+ i,
768
+ u,
769
+ a = [],
770
+ f = true,
771
+ o = false;
772
+ try {
773
+ if (i = (t = t.call(r)).next, 0 === l) {
774
+ if (Object(t) !== t) return;
775
+ f = !1;
776
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
777
+ } catch (r) {
778
+ o = true, n = r;
779
+ } finally {
780
+ try {
781
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
782
+ } finally {
783
+ if (o) throw n;
784
+ }
785
+ }
786
+ return a;
787
+ }
788
+ }
789
+ function _nonIterableRest() {
790
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
791
+ }
792
+ function _nonIterableSpread() {
793
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
794
+ }
795
+ function ownKeys(e, r) {
796
+ var t = Object.keys(e);
797
+ if (Object.getOwnPropertySymbols) {
798
+ var o = Object.getOwnPropertySymbols(e);
799
+ r && (o = o.filter(function (r) {
800
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
801
+ })), t.push.apply(t, o);
802
+ }
803
+ return t;
804
+ }
805
+ function _objectSpread2(e) {
806
+ for (var r = 1; r < arguments.length; r++) {
807
+ var t = null != arguments[r] ? arguments[r] : {};
808
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
809
+ _defineProperty(e, r, t[r]);
810
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
811
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
812
+ });
813
+ }
814
+ return e;
815
+ }
816
+ function _objectWithoutProperties(e, t) {
817
+ if (null == e) return {};
818
+ var o,
819
+ r,
820
+ i = _objectWithoutPropertiesLoose(e, t);
821
+ if (Object.getOwnPropertySymbols) {
822
+ var n = Object.getOwnPropertySymbols(e);
823
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
824
+ }
825
+ return i;
826
+ }
827
+ function _objectWithoutPropertiesLoose(r, e) {
828
+ if (null == r) return {};
829
+ var t = {};
830
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
831
+ if (-1 !== e.indexOf(n)) continue;
832
+ t[n] = r[n];
833
+ }
834
+ return t;
835
+ }
836
+ function _slicedToArray(r, e) {
837
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
838
+ }
839
+ function _toConsumableArray(r) {
840
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
841
+ }
842
+ function _toPrimitive(t, r) {
843
+ if ("object" != typeof t || !t) return t;
844
+ var e = t[Symbol.toPrimitive];
845
+ if (void 0 !== e) {
846
+ var i = e.call(t, r);
847
+ if ("object" != typeof i) return i;
848
+ throw new TypeError("@@toPrimitive must return a primitive value.");
849
+ }
850
+ return ("string" === r ? String : Number)(t);
851
+ }
852
+ function _toPropertyKey(t) {
853
+ var i = _toPrimitive(t, "string");
854
+ return "symbol" == typeof i ? i : i + "";
855
+ }
856
+ function _typeof(o) {
857
+ "@babel/helpers - typeof";
970
858
 
971
- var defaultTheme = Themes.getPresetStaticTheme();
972
- var ThemeContext = /*#__PURE__*/React.createContext(defaultTheme);
973
- var useTheme = function useTheme() {
974
- return React.useContext(ThemeContext);
975
- };
859
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
860
+ return typeof o;
861
+ } : function (o) {
862
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
863
+ }, _typeof(o);
864
+ }
865
+ function _unsupportedIterableToArray(r, a) {
866
+ if (r) {
867
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
868
+ var t = {}.toString.call(r).slice(8, -1);
869
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
870
+ }
871
+ }
872
+
873
+ var defaultToastLayout = {
874
+ padding: '12px 16px',
875
+ margin: '8px 0',
876
+ width: '420px',
877
+ maxWidth: '90vw',
878
+ maxHeight: '75px',
879
+ placement: 'bottomRight'
880
+ };
881
+ var defaultParams = {
882
+ toasts: [],
883
+ toastLayout: defaultToastLayout,
884
+ updateToastLayout: function updateToastLayout(t) {
885
+ return t;
886
+ },
887
+ updateToasts: function updateToasts(t) {
888
+ return t;
889
+ },
890
+ lastUpdateToastId: null,
891
+ updateLastToastId: function updateLastToastId() {
892
+ return null;
893
+ }
894
+ };
895
+ var HUIContent = /*#__PURE__*/React$1.createContext(defaultParams);
896
+ var useHUIContext = function useHUIContext() {
897
+ return React$1.useContext(HUIContent);
898
+ };
899
+
900
+ var defaultFont = {
901
+ sans: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
902
+ mono: 'Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace',
903
+ prism: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace'
904
+ };
905
+ var defaultBreakpoints = {
906
+ xs: {
907
+ min: '0',
908
+ max: '650px'
909
+ },
910
+ sm: {
911
+ min: '650px',
912
+ max: '900px'
913
+ },
914
+ md: {
915
+ min: '900px',
916
+ max: '1280px'
917
+ },
918
+ lg: {
919
+ min: '1280px',
920
+ max: '1920px'
921
+ },
922
+ xl: {
923
+ min: '1920px',
924
+ max: '10000px'
925
+ }
926
+ };
927
+ var defaultLayout = {
928
+ gap: '16pt',
929
+ gapNegative: '-16pt',
930
+ gapHalf: '8pt',
931
+ gapHalfNegative: '-8pt',
932
+ gapQuarter: '4pt',
933
+ gapQuarterNegative: '-4pt',
934
+ pageMargin: '16pt',
935
+ pageWidth: '750pt',
936
+ pageWidthWithMargin: '782pt',
937
+ breakpointMobile: defaultBreakpoints.xs.max,
938
+ breakpointTablet: defaultBreakpoints.sm.max,
939
+ radius: '6px',
940
+ unit: '16px'
941
+ };
942
+
943
+ var palette$1 = {
944
+ accents_1: '#fafafa',
945
+ accents_2: '#eaeaea',
946
+ accents_3: '#999',
947
+ accents_4: '#888',
948
+ accents_5: '#666',
949
+ accents_6: '#444',
950
+ accents_7: '#333',
951
+ accents_8: '#111',
952
+ background: '#fff',
953
+ foreground: '#000',
954
+ selection: '#79ffe1',
955
+ secondary: '#666',
956
+ code: '#f81ce5',
957
+ border: '#eaeaea',
958
+ error: '#e00',
959
+ errorLight: '#ff1a1a',
960
+ errorLighter: '#f7d4d6',
961
+ errorDark: '#c50000',
962
+ success: '#0070f3',
963
+ successLight: '#3291ff',
964
+ successLighter: '#d3e5ff',
965
+ successDark: '#0761d1',
966
+ warning: '#f5a623',
967
+ warningLight: '#f7b955',
968
+ warningLighter: '#ffefcf',
969
+ warningDark: '#ab570a',
970
+ cyan: '#50e3c2',
971
+ cyanLighter: '#aaffec',
972
+ cyanLight: '#79ffe1',
973
+ cyanDark: '#29bc9b',
974
+ violet: '#7928ca',
975
+ violetLighter: '#e3d7fc',
976
+ violetLight: '#8a63d2',
977
+ violetDark: '#4c2889',
978
+ purple: '#f81ce5',
979
+ alert: '#ff0080',
980
+ magenta: '#eb367f',
981
+ link: '#0070f3'
982
+ };
983
+ var expressiveness$1 = {
984
+ linkStyle: 'none',
985
+ linkHoverStyle: 'none',
986
+ dropdownBoxShadow: '0 4px 4px 0 rgba(0, 0, 0, 0.02)',
987
+ scrollerStart: 'rgba(255, 255, 255, 1)',
988
+ scrollerEnd: 'rgba(255, 255, 255, 0)',
989
+ shadowSmall: '0 5px 10px rgba(0, 0, 0, 0.12)',
990
+ shadowMedium: '0 8px 30px rgba(0, 0, 0, 0.12)',
991
+ shadowLarge: '0 30px 60px rgba(0, 0, 0, 0.12)',
992
+ portalOpacity: 0.25
993
+ };
994
+ var font$1 = defaultFont;
995
+ var breakpoints$1 = defaultBreakpoints;
996
+ var layout$1 = defaultLayout;
997
+ var themes$1 = {
998
+ type: 'light',
999
+ font: font$1,
1000
+ layout: layout$1,
1001
+ palette: palette$1,
1002
+ breakpoints: breakpoints$1,
1003
+ expressiveness: expressiveness$1
1004
+ };
1005
+
1006
+ var palette = {
1007
+ accents_1: '#111',
1008
+ accents_2: '#333',
1009
+ accents_3: '#444',
1010
+ accents_4: '#666',
1011
+ accents_5: '#888',
1012
+ accents_6: '#999',
1013
+ accents_7: '#eaeaea',
1014
+ accents_8: '#fafafa',
1015
+ background: '#000',
1016
+ foreground: '#fff',
1017
+ selection: '#f81ce5',
1018
+ secondary: '#888',
1019
+ code: '#79ffe1',
1020
+ border: '#333',
1021
+ error: '#e00',
1022
+ errorLighter: '#f7d4d6',
1023
+ errorLight: '#ff1a1a',
1024
+ errorDark: '#c50000',
1025
+ success: '#0070f3',
1026
+ successLighter: '#d3e5ff',
1027
+ successLight: '#3291ff',
1028
+ successDark: '#0761d1',
1029
+ warning: '#f5a623',
1030
+ warningLighter: '#ffefcf',
1031
+ warningLight: '#f7b955',
1032
+ warningDark: '#ab570a',
1033
+ cyan: '#50e3c2',
1034
+ cyanLighter: '#aaffec',
1035
+ cyanLight: '#79ffe1',
1036
+ cyanDark: '#29bc9b',
1037
+ violet: '#7928ca',
1038
+ violetLighter: '#e3d7fc',
1039
+ violetLight: '#8a63d2',
1040
+ violetDark: '#4c2889',
1041
+ purple: '#f81ce5',
1042
+ alert: '#ff0080',
1043
+ magenta: '#eb367f',
1044
+ link: '#3291ff'
1045
+ };
1046
+ var expressiveness = {
1047
+ linkStyle: 'none',
1048
+ linkHoverStyle: 'none',
1049
+ dropdownBoxShadow: '0 0 0 1px #333',
1050
+ scrollerStart: 'rgba(255, 255, 255, 1)',
1051
+ scrollerEnd: 'rgba(255, 255, 255, 0)',
1052
+ shadowSmall: '0 0 0 1px #333',
1053
+ shadowMedium: '0 0 0 1px #333',
1054
+ shadowLarge: '0 0 0 1px #333',
1055
+ portalOpacity: 0.75
1056
+ };
1057
+ var font = defaultFont;
1058
+ var breakpoints = defaultBreakpoints;
1059
+ var layout = defaultLayout;
1060
+ var themes = {
1061
+ type: 'dark',
1062
+ font: font,
1063
+ layout: layout,
1064
+ palette: palette,
1065
+ breakpoints: breakpoints,
1066
+ expressiveness: expressiveness
1067
+ };
1068
+
1069
+ var isObject = function isObject(target) {
1070
+ return target && _typeof(target) === 'object';
1071
+ };
1072
+ var _deepDuplicable = function deepDuplicable(source, target) {
1073
+ if (!isObject(target) || !isObject(source)) return source;
1074
+ var sourceKeys = Object.keys(source);
1075
+ var result = {};
1076
+ for (var _i = 0, _sourceKeys = sourceKeys; _i < _sourceKeys.length; _i++) {
1077
+ var key = _sourceKeys[_i];
1078
+ var sourceValue = source[key];
1079
+ var targetValue = target[key];
1080
+ if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
1081
+ result[key] = targetValue.concat(sourceValue);
1082
+ } else if (isObject(sourceValue) && isObject(targetValue)) {
1083
+ result[key] = _deepDuplicable(sourceValue, _objectSpread2({}, targetValue));
1084
+ } else if (targetValue) {
1085
+ result[key] = targetValue;
1086
+ } else {
1087
+ result[key] = sourceValue;
1088
+ }
1089
+ }
1090
+ return result;
1091
+ };
1092
+ var getPresets = function getPresets() {
1093
+ return [themes$1, themes];
1094
+ };
1095
+ var getPresetStaticTheme = function getPresetStaticTheme() {
1096
+ return themes$1;
1097
+ };
1098
+ var isAvailableThemeType = function isAvailableThemeType(type) {
1099
+ if (!type) return false;
1100
+ var presetThemes = getPresets();
1101
+ var hasType = presetThemes.find(function (theme) {
1102
+ return theme.type === type;
1103
+ });
1104
+ return !hasType;
1105
+ };
1106
+ var isPresetTheme = function isPresetTheme(themeOrType) {
1107
+ if (!themeOrType) return false;
1108
+ var isType = typeof themeOrType === 'string';
1109
+ var type = isType ? themeOrType : themeOrType.type;
1110
+ return !isAvailableThemeType(type);
1111
+ };
1112
+ var hasUserCustomTheme = function hasUserCustomTheme() {
1113
+ var themes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
1114
+ return !!themes.find(function (item) {
1115
+ return isAvailableThemeType(item.type);
1116
+ });
1117
+ };
1118
+ var create = function create(base, custom) {
1119
+ if (!isAvailableThemeType(custom.type)) {
1120
+ throw new Error('Duplicate or unavailable theme type');
1121
+ }
1122
+ return _deepDuplicable(base, custom);
1123
+ };
1124
+ var createFromDark = function createFromDark(custom) {
1125
+ return create(themes, custom);
1126
+ };
1127
+ var createFromLight = function createFromLight(custom) {
1128
+ return create(themes$1, custom);
1129
+ };
1130
+ var Themes = {
1131
+ isPresetTheme: isPresetTheme,
1132
+ isAvailableThemeType: isAvailableThemeType,
1133
+ hasUserCustomTheme: hasUserCustomTheme,
1134
+ getPresets: getPresets,
1135
+ getPresetStaticTheme: getPresetStaticTheme,
1136
+ create: create,
1137
+ createFromDark: createFromDark,
1138
+ createFromLight: createFromLight
1139
+ };
1140
+
1141
+ /* "use client" */
1142
+
1143
+ var defaultTheme = Themes.getPresetStaticTheme();
1144
+ var ThemeContext = /*#__PURE__*/React$1.createContext(defaultTheme);
1145
+ var useTheme = function useTheme() {
1146
+ return React$1.useContext(ThemeContext);
1147
+ };
1148
+
1149
+ /* "use client" */
1150
+
1151
+ var defaultAllThemesConfig = {
1152
+ themes: Themes.getPresets()
1153
+ };
1154
+ var AllThemesContext = /*#__PURE__*/React$1.createContext(defaultAllThemesConfig);
1155
+ var useAllThemes = function useAllThemes() {
1156
+ return React$1.useContext(AllThemesContext);
1157
+ };
1158
+
1159
+ var ThemeProvider = function ThemeProvider(_ref) {
1160
+ var children = _ref.children,
1161
+ themeType = _ref.themeType,
1162
+ _ref$themes = _ref.themes,
1163
+ themes = _ref$themes === void 0 ? [] : _ref$themes;
1164
+ var _React$useState = React$1.useState({
1165
+ themes: Themes.getPresets()
1166
+ }),
1167
+ _React$useState2 = _slicedToArray(_React$useState, 2),
1168
+ allThemes = _React$useState2[0],
1169
+ setAllThemes = _React$useState2[1];
1170
+ var currentTheme = React$1.useMemo(function () {
1171
+ var theme = allThemes.themes.find(function (item) {
1172
+ return item.type === themeType;
1173
+ });
1174
+ if (theme) return theme;
1175
+ return Themes.getPresetStaticTheme();
1176
+ }, [allThemes, themeType]);
1177
+ React$1.useEffect(function () {
1178
+ if (!(themes !== null && themes !== void 0 && themes.length)) return;
1179
+ setAllThemes(function (last) {
1180
+ var safeThemes = themes.filter(function (item) {
1181
+ return Themes.isAvailableThemeType(item.type);
1182
+ });
1183
+ var nextThemes = Themes.getPresets().concat(safeThemes);
1184
+ return _objectSpread2(_objectSpread2({}, last), {}, {
1185
+ themes: nextThemes
1186
+ });
1187
+ });
1188
+ }, [themes]);
1189
+ return /*#__PURE__*/React$1.createElement(AllThemesContext.Provider, {
1190
+ value: allThemes
1191
+ }, /*#__PURE__*/React$1.createElement(ThemeContext.Provider, {
1192
+ value: currentTheme
1193
+ }, children));
1194
+ };
1195
+
1196
+ var useCurrentState = function useCurrentState(initialState) {
1197
+ var _useState = React$1.useState(function () {
1198
+ return typeof initialState === 'function' ? initialState() : initialState;
1199
+ }),
1200
+ _useState2 = _slicedToArray(_useState, 2),
1201
+ state = _useState2[0],
1202
+ setState = _useState2[1];
1203
+ var ref = React$1.useRef(initialState);
1204
+ React$1.useEffect(function () {
1205
+ ref.current = state;
1206
+ }, [state]);
1207
+ var setValue = function setValue(val) {
1208
+ var result = typeof val === 'function' ? val(ref.current) : val;
1209
+ ref.current = result;
1210
+ setState(result);
1211
+ };
1212
+ return [state, setValue, ref];
1213
+ };
1214
+
1215
+ function getDefaultExportFromCjs (x) {
1216
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
1217
+ }
1218
+
1219
+ var index = {};
1220
+
1221
+ var hasRequiredIndex;
1222
+
1223
+ function requireIndex () {
1224
+ if (hasRequiredIndex) return index;
1225
+ hasRequiredIndex = 1;
1226
+ var React$1$1 = React$1;
1227
+
1228
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
1229
+
1230
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1$1);
1231
+
1232
+ /*
1233
+ Based on Glamor's sheet
1234
+ https://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js
1235
+ */ function _defineProperties(target, props) {
1236
+ for(var i = 0; i < props.length; i++){
1237
+ var descriptor = props[i];
1238
+ descriptor.enumerable = descriptor.enumerable || false;
1239
+ descriptor.configurable = true;
1240
+ if ("value" in descriptor) descriptor.writable = true;
1241
+ Object.defineProperty(target, descriptor.key, descriptor);
1242
+ }
1243
+ }
1244
+ function _createClass(Constructor, protoProps, staticProps) {
1245
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1246
+ return Constructor;
1247
+ }
1248
+ var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
1249
+ var isString = function(o) {
1250
+ return Object.prototype.toString.call(o) === "[object String]";
1251
+ };
1252
+ var StyleSheet = /*#__PURE__*/ function() {
1253
+ function StyleSheet(param) {
1254
+ var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
1255
+ invariant$1(isString(name), "`name` must be a string");
1256
+ this._name = name;
1257
+ this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
1258
+ invariant$1(typeof optimizeForSpeed === "boolean", "`optimizeForSpeed` must be a boolean");
1259
+ this._optimizeForSpeed = optimizeForSpeed;
1260
+ this._serverSheet = undefined;
1261
+ this._tags = [];
1262
+ this._injected = false;
1263
+ this._rulesCount = 0;
1264
+ var node = typeof window !== "undefined" && document.querySelector('meta[property="csp-nonce"]');
1265
+ this._nonce = node ? node.getAttribute("content") : null;
1266
+ }
1267
+ var _proto = StyleSheet.prototype;
1268
+ _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {
1269
+ invariant$1(typeof bool === "boolean", "`setOptimizeForSpeed` accepts a boolean");
1270
+ invariant$1(this._rulesCount === 0, "optimizeForSpeed cannot be when rules have already been inserted");
1271
+ this.flush();
1272
+ this._optimizeForSpeed = bool;
1273
+ this.inject();
1274
+ };
1275
+ _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {
1276
+ return this._optimizeForSpeed;
1277
+ };
1278
+ _proto.inject = function inject() {
1279
+ var _this = this;
1280
+ invariant$1(!this._injected, "sheet already injected");
1281
+ this._injected = true;
1282
+ if (typeof window !== "undefined" && this._optimizeForSpeed) {
1283
+ this._tags[0] = this.makeStyleTag(this._name);
1284
+ this._optimizeForSpeed = "insertRule" in this.getSheet();
1285
+ if (!this._optimizeForSpeed) {
1286
+ if (!isProd) {
1287
+ console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.");
1288
+ }
1289
+ this.flush();
1290
+ this._injected = true;
1291
+ }
1292
+ return;
1293
+ }
1294
+ this._serverSheet = {
1295
+ cssRules: [],
1296
+ insertRule: function(rule, index) {
1297
+ if (typeof index === "number") {
1298
+ _this._serverSheet.cssRules[index] = {
1299
+ cssText: rule
1300
+ };
1301
+ } else {
1302
+ _this._serverSheet.cssRules.push({
1303
+ cssText: rule
1304
+ });
1305
+ }
1306
+ return index;
1307
+ },
1308
+ deleteRule: function(index) {
1309
+ _this._serverSheet.cssRules[index] = null;
1310
+ }
1311
+ };
1312
+ };
1313
+ _proto.getSheetForTag = function getSheetForTag(tag) {
1314
+ if (tag.sheet) {
1315
+ return tag.sheet;
1316
+ }
1317
+ // this weirdness brought to you by firefox
1318
+ for(var i = 0; i < document.styleSheets.length; i++){
1319
+ if (document.styleSheets[i].ownerNode === tag) {
1320
+ return document.styleSheets[i];
1321
+ }
1322
+ }
1323
+ };
1324
+ _proto.getSheet = function getSheet() {
1325
+ return this.getSheetForTag(this._tags[this._tags.length - 1]);
1326
+ };
1327
+ _proto.insertRule = function insertRule(rule, index) {
1328
+ invariant$1(isString(rule), "`insertRule` accepts only strings");
1329
+ if (typeof window === "undefined") {
1330
+ if (typeof index !== "number") {
1331
+ index = this._serverSheet.cssRules.length;
1332
+ }
1333
+ this._serverSheet.insertRule(rule, index);
1334
+ return this._rulesCount++;
1335
+ }
1336
+ if (this._optimizeForSpeed) {
1337
+ var sheet = this.getSheet();
1338
+ if (typeof index !== "number") {
1339
+ index = sheet.cssRules.length;
1340
+ }
1341
+ // this weirdness for perf, and chrome's weird bug
1342
+ // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
1343
+ try {
1344
+ sheet.insertRule(rule, index);
1345
+ } catch (error) {
1346
+ if (!isProd) {
1347
+ console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
1348
+ }
1349
+ return -1;
1350
+ }
1351
+ } else {
1352
+ var insertionPoint = this._tags[index];
1353
+ this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));
1354
+ }
1355
+ return this._rulesCount++;
1356
+ };
1357
+ _proto.replaceRule = function replaceRule(index, rule) {
1358
+ if (this._optimizeForSpeed || typeof window === "undefined") {
1359
+ var sheet = typeof window !== "undefined" ? this.getSheet() : this._serverSheet;
1360
+ if (!rule.trim()) {
1361
+ rule = this._deletedRulePlaceholder;
1362
+ }
1363
+ if (!sheet.cssRules[index]) {
1364
+ // @TBD Should we throw an error?
1365
+ return index;
1366
+ }
1367
+ sheet.deleteRule(index);
1368
+ try {
1369
+ sheet.insertRule(rule, index);
1370
+ } catch (error) {
1371
+ if (!isProd) {
1372
+ console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
1373
+ }
1374
+ // In order to preserve the indices we insert a deleteRulePlaceholder
1375
+ sheet.insertRule(this._deletedRulePlaceholder, index);
1376
+ }
1377
+ } else {
1378
+ var tag = this._tags[index];
1379
+ invariant$1(tag, "old rule at index `" + index + "` not found");
1380
+ tag.textContent = rule;
1381
+ }
1382
+ return index;
1383
+ };
1384
+ _proto.deleteRule = function deleteRule(index) {
1385
+ if (typeof window === "undefined") {
1386
+ this._serverSheet.deleteRule(index);
1387
+ return;
1388
+ }
1389
+ if (this._optimizeForSpeed) {
1390
+ this.replaceRule(index, "");
1391
+ } else {
1392
+ var tag = this._tags[index];
1393
+ invariant$1(tag, "rule at index `" + index + "` not found");
1394
+ tag.parentNode.removeChild(tag);
1395
+ this._tags[index] = null;
1396
+ }
1397
+ };
1398
+ _proto.flush = function flush() {
1399
+ this._injected = false;
1400
+ this._rulesCount = 0;
1401
+ if (typeof window !== "undefined") {
1402
+ this._tags.forEach(function(tag) {
1403
+ return tag && tag.parentNode.removeChild(tag);
1404
+ });
1405
+ this._tags = [];
1406
+ } else {
1407
+ // simpler on server
1408
+ this._serverSheet.cssRules = [];
1409
+ }
1410
+ };
1411
+ _proto.cssRules = function cssRules() {
1412
+ var _this = this;
1413
+ if (typeof window === "undefined") {
1414
+ return this._serverSheet.cssRules;
1415
+ }
1416
+ return this._tags.reduce(function(rules, tag) {
1417
+ if (tag) {
1418
+ rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {
1419
+ return rule.cssText === _this._deletedRulePlaceholder ? null : rule;
1420
+ }));
1421
+ } else {
1422
+ rules.push(null);
1423
+ }
1424
+ return rules;
1425
+ }, []);
1426
+ };
1427
+ _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {
1428
+ if (cssString) {
1429
+ invariant$1(isString(cssString), "makeStyleTag accepts only strings as second parameter");
1430
+ }
1431
+ var tag = document.createElement("style");
1432
+ if (this._nonce) tag.setAttribute("nonce", this._nonce);
1433
+ tag.type = "text/css";
1434
+ tag.setAttribute("data-" + name, "");
1435
+ if (cssString) {
1436
+ tag.appendChild(document.createTextNode(cssString));
1437
+ }
1438
+ var head = document.head || document.getElementsByTagName("head")[0];
1439
+ if (relativeToTag) {
1440
+ head.insertBefore(tag, relativeToTag);
1441
+ } else {
1442
+ head.appendChild(tag);
1443
+ }
1444
+ return tag;
1445
+ };
1446
+ _createClass(StyleSheet, [
1447
+ {
1448
+ key: "length",
1449
+ get: function get() {
1450
+ return this._rulesCount;
1451
+ }
1452
+ }
1453
+ ]);
1454
+ return StyleSheet;
1455
+ }();
1456
+ function invariant$1(condition, message) {
1457
+ if (!condition) {
1458
+ throw new Error("StyleSheet: " + message + ".");
1459
+ }
1460
+ }
1461
+
1462
+ function hash(str) {
1463
+ var _$hash = 5381, i = str.length;
1464
+ while(i){
1465
+ _$hash = _$hash * 33 ^ str.charCodeAt(--i);
1466
+ }
1467
+ /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
1468
+ * integers. Since we want the results to be always positive, convert the
1469
+ * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;
1470
+ }
1471
+ var stringHash = hash;
1472
+
1473
+ var sanitize = function(rule) {
1474
+ return rule.replace(/\/style/gi, "\\/style");
1475
+ };
1476
+ var cache = {};
1477
+ /**
1478
+ * computeId
1479
+ *
1480
+ * Compute and memoize a jsx id from a basedId and optionally props.
1481
+ */ function computeId(baseId, props) {
1482
+ if (!props) {
1483
+ return "jsx-" + baseId;
1484
+ }
1485
+ var propsToString = String(props);
1486
+ var key = baseId + propsToString;
1487
+ if (!cache[key]) {
1488
+ cache[key] = "jsx-" + stringHash(baseId + "-" + propsToString);
1489
+ }
1490
+ return cache[key];
1491
+ }
1492
+ /**
1493
+ * computeSelector
1494
+ *
1495
+ * Compute and memoize dynamic selectors.
1496
+ */ function computeSelector(id, css) {
1497
+ var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;
1498
+ // Sanitize SSR-ed CSS.
1499
+ // Client side code doesn't need to be sanitized since we use
1500
+ // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).
1501
+ if (typeof window === "undefined") {
1502
+ css = sanitize(css);
1503
+ }
1504
+ var idcss = id + css;
1505
+ if (!cache[idcss]) {
1506
+ cache[idcss] = css.replace(selectoPlaceholderRegexp, id);
1507
+ }
1508
+ return cache[idcss];
1509
+ }
1510
+
1511
+ function mapRulesToStyle(cssRules, options) {
1512
+ if (options === void 0) options = {};
1513
+ return cssRules.map(function(args) {
1514
+ var id = args[0];
1515
+ var css = args[1];
1516
+ return /*#__PURE__*/ React__default["default"].createElement("style", {
1517
+ id: "__" + id,
1518
+ // Avoid warnings upon render with a key
1519
+ key: "__" + id,
1520
+ nonce: options.nonce ? options.nonce : undefined,
1521
+ dangerouslySetInnerHTML: {
1522
+ __html: css
1523
+ }
1524
+ });
1525
+ });
1526
+ }
1527
+ var StyleSheetRegistry = /*#__PURE__*/ function() {
1528
+ function StyleSheetRegistry(param) {
1529
+ var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
1530
+ this._sheet = styleSheet || new StyleSheet({
1531
+ name: "styled-jsx",
1532
+ optimizeForSpeed: optimizeForSpeed
1533
+ });
1534
+ this._sheet.inject();
1535
+ if (styleSheet && typeof optimizeForSpeed === "boolean") {
1536
+ this._sheet.setOptimizeForSpeed(optimizeForSpeed);
1537
+ this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
1538
+ }
1539
+ this._fromServer = undefined;
1540
+ this._indices = {};
1541
+ this._instancesCounts = {};
1542
+ }
1543
+ var _proto = StyleSheetRegistry.prototype;
1544
+ _proto.add = function add(props) {
1545
+ var _this = this;
1546
+ if (undefined === this._optimizeForSpeed) {
1547
+ this._optimizeForSpeed = Array.isArray(props.children);
1548
+ this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);
1549
+ this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
1550
+ }
1551
+ if (typeof window !== "undefined" && !this._fromServer) {
1552
+ this._fromServer = this.selectFromServer();
1553
+ this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {
1554
+ acc[tagName] = 0;
1555
+ return acc;
1556
+ }, {});
1557
+ }
1558
+ var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;
1559
+ // Deduping: just increase the instances count.
1560
+ if (styleId in this._instancesCounts) {
1561
+ this._instancesCounts[styleId] += 1;
1562
+ return;
1563
+ }
1564
+ var indices = rules.map(function(rule) {
1565
+ return _this._sheet.insertRule(rule);
1566
+ })// Filter out invalid rules
1567
+ .filter(function(index) {
1568
+ return index !== -1;
1569
+ });
1570
+ this._indices[styleId] = indices;
1571
+ this._instancesCounts[styleId] = 1;
1572
+ };
1573
+ _proto.remove = function remove(props) {
1574
+ var _this = this;
1575
+ var styleId = this.getIdAndRules(props).styleId;
1576
+ invariant(styleId in this._instancesCounts, "styleId: `" + styleId + "` not found");
1577
+ this._instancesCounts[styleId] -= 1;
1578
+ if (this._instancesCounts[styleId] < 1) {
1579
+ var tagFromServer = this._fromServer && this._fromServer[styleId];
1580
+ if (tagFromServer) {
1581
+ tagFromServer.parentNode.removeChild(tagFromServer);
1582
+ delete this._fromServer[styleId];
1583
+ } else {
1584
+ this._indices[styleId].forEach(function(index) {
1585
+ return _this._sheet.deleteRule(index);
1586
+ });
1587
+ delete this._indices[styleId];
1588
+ }
1589
+ delete this._instancesCounts[styleId];
1590
+ }
1591
+ };
1592
+ _proto.update = function update(props, nextProps) {
1593
+ this.add(nextProps);
1594
+ this.remove(props);
1595
+ };
1596
+ _proto.flush = function flush() {
1597
+ this._sheet.flush();
1598
+ this._sheet.inject();
1599
+ this._fromServer = undefined;
1600
+ this._indices = {};
1601
+ this._instancesCounts = {};
1602
+ };
1603
+ _proto.cssRules = function cssRules() {
1604
+ var _this = this;
1605
+ var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {
1606
+ return [
1607
+ styleId,
1608
+ _this._fromServer[styleId]
1609
+ ];
1610
+ }) : [];
1611
+ var cssRules = this._sheet.cssRules();
1612
+ return fromServer.concat(Object.keys(this._indices).map(function(styleId) {
1613
+ return [
1614
+ styleId,
1615
+ _this._indices[styleId].map(function(index) {
1616
+ return cssRules[index].cssText;
1617
+ }).join(_this._optimizeForSpeed ? "" : "\n")
1618
+ ];
1619
+ })// filter out empty rules
1620
+ .filter(function(rule) {
1621
+ return Boolean(rule[1]);
1622
+ }));
1623
+ };
1624
+ _proto.styles = function styles(options) {
1625
+ return mapRulesToStyle(this.cssRules(), options);
1626
+ };
1627
+ _proto.getIdAndRules = function getIdAndRules(props) {
1628
+ var css = props.children, dynamic = props.dynamic, id = props.id;
1629
+ if (dynamic) {
1630
+ var styleId = computeId(id, dynamic);
1631
+ return {
1632
+ styleId: styleId,
1633
+ rules: Array.isArray(css) ? css.map(function(rule) {
1634
+ return computeSelector(styleId, rule);
1635
+ }) : [
1636
+ computeSelector(styleId, css)
1637
+ ]
1638
+ };
1639
+ }
1640
+ return {
1641
+ styleId: computeId(id),
1642
+ rules: Array.isArray(css) ? css : [
1643
+ css
1644
+ ]
1645
+ };
1646
+ };
1647
+ /**
1648
+ * selectFromServer
1649
+ *
1650
+ * Collects style tags from the document with id __jsx-XXX
1651
+ */ _proto.selectFromServer = function selectFromServer() {
1652
+ var elements = Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]'));
1653
+ return elements.reduce(function(acc, element) {
1654
+ var id = element.id.slice(2);
1655
+ acc[id] = element;
1656
+ return acc;
1657
+ }, {});
1658
+ };
1659
+ return StyleSheetRegistry;
1660
+ }();
1661
+ function invariant(condition, message) {
1662
+ if (!condition) {
1663
+ throw new Error("StyleSheetRegistry: " + message + ".");
1664
+ }
1665
+ }
1666
+ var StyleSheetContext = /*#__PURE__*/ React$1$1.createContext(null);
1667
+ StyleSheetContext.displayName = "StyleSheetContext";
1668
+ function createStyleRegistry() {
1669
+ return new StyleSheetRegistry();
1670
+ }
1671
+ function StyleRegistry(param) {
1672
+ var configuredRegistry = param.registry, children = param.children;
1673
+ var rootRegistry = React$1$1.useContext(StyleSheetContext);
1674
+ var ref = React$1$1.useState(function() {
1675
+ return rootRegistry || configuredRegistry || createStyleRegistry();
1676
+ }), registry = ref[0];
1677
+ return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
1678
+ value: registry
1679
+ }, children);
1680
+ }
1681
+ function useStyleRegistry() {
1682
+ return React$1$1.useContext(StyleSheetContext);
1683
+ }
1684
+
1685
+ // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
1686
+ // https://github.com/reactwg/react-18/discussions/110
1687
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React$1$1.useLayoutEffect;
1688
+ var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
1689
+ function JSXStyle(props) {
1690
+ var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
1691
+ var insertionEffectCalled = React$1$1.useRef(false);
1692
+ // `registry` might not exist while server-side rendering
1693
+ if (!registry) {
1694
+ return null;
1695
+ }
1696
+ if (typeof window === "undefined") {
1697
+ registry.add(props);
1698
+ return null;
1699
+ }
1700
+ useInsertionEffect(function() {
1701
+ // ReactDOM removes all DOM during hydration in certain cases
1702
+ if (!document.head) {
1703
+ return;
1704
+ }
1705
+ registry.add(props);
1706
+ insertionEffectCalled.current = true;
1707
+ return function() {
1708
+ insertionEffectCalled.current = false;
1709
+ registry.remove(props);
1710
+ };
1711
+ }, [
1712
+ props.id,
1713
+ String(props.dynamic)
1714
+ ]);
1715
+ React$1$1.useLayoutEffect(function() {
1716
+ if (!document.head || insertionEffectCalled.current) {
1717
+ return;
1718
+ }
1719
+ registry.add(props);
1720
+ return function() {
1721
+ registry.remove(props);
1722
+ };
1723
+ // props.children can be string[], will be striped since id is identical
1724
+ }, [
1725
+ props.id,
1726
+ String(props.dynamic)
1727
+ ]);
1728
+ return null;
1729
+ }
1730
+ JSXStyle.dynamic = function(info) {
1731
+ return info.map(function(tagInfo) {
1732
+ var baseId = tagInfo[0];
1733
+ var props = tagInfo[1];
1734
+ return computeId(baseId, props);
1735
+ }).join(" ");
1736
+ };
1737
+
1738
+ index.StyleRegistry = StyleRegistry;
1739
+ index.createStyleRegistry = createStyleRegistry;
1740
+ index.style = JSXStyle;
1741
+ index.useStyleRegistry = useStyleRegistry;
1742
+ return index;
1743
+ }
1744
+
1745
+ var style;
1746
+ var hasRequiredStyle;
1747
+
1748
+ function requireStyle () {
1749
+ if (hasRequiredStyle) return style;
1750
+ hasRequiredStyle = 1;
1751
+ style = requireIndex().style;
1752
+ return style;
1753
+ }
1754
+
1755
+ var styleExports = requireStyle();
1756
+ var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
1757
+
1758
+ /* "use client" */
1759
+
1760
+ var getId = function getId() {
1761
+ return Math.random().toString(32).slice(2, 10);
1762
+ };
1763
+ var isBrowser = function isBrowser() {
1764
+ return Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
1765
+ };
1766
+
1767
+ var useSSR = function useSSR() {
1768
+ var _useState = React$1.useState(false),
1769
+ _useState2 = _slicedToArray(_useState, 2),
1770
+ browser = _useState2[0],
1771
+ setBrowser = _useState2[1];
1772
+ React$1.useEffect(function () {
1773
+ setBrowser(isBrowser());
1774
+ }, []);
1775
+ return {
1776
+ isBrowser: browser,
1777
+ isServer: !browser
1778
+ };
1779
+ };
1780
+
1781
+ var createElement = function createElement(id) {
1782
+ var el = document.createElement('div');
1783
+ el.setAttribute('id', id);
1784
+ return el;
1785
+ };
1786
+ var usePortal = function usePortal() {
1787
+ var selectId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getId();
1788
+ var getContainer = arguments.length > 1 ? arguments[1] : undefined;
1789
+ var id = "helpdice-ui-".concat(selectId);
1790
+ var _useSSR = useSSR(),
1791
+ isBrowser = _useSSR.isBrowser;
1792
+ var _useState = React$1.useState(isBrowser ? createElement(id) : null),
1793
+ _useState2 = _slicedToArray(_useState, 2),
1794
+ elSnapshot = _useState2[0],
1795
+ setElSnapshot = _useState2[1];
1796
+ React$1.useEffect(function () {
1797
+ var customContainer = getContainer ? getContainer() : null;
1798
+ var parentElement = customContainer || document.body;
1799
+ var hasElement = parentElement.querySelector("#".concat(id));
1800
+ var el = hasElement || createElement(id);
1801
+ if (!hasElement) {
1802
+ parentElement.appendChild(el);
1803
+ }
1804
+ setElSnapshot(el);
1805
+ }, []);
1806
+ return elSnapshot;
1807
+ };
1808
+
1809
+ var _excluded$2 = ["children", "className", "visible", "enterTime", "leaveTime", "clearTime", "name"];
1810
+ var CssTransition = function CssTransition(_ref) {
1811
+ var children = _ref.children,
1812
+ _ref$className = _ref.className,
1813
+ className = _ref$className === void 0 ? '' : _ref$className,
1814
+ _ref$visible = _ref.visible,
1815
+ visible = _ref$visible === void 0 ? false : _ref$visible,
1816
+ _ref$enterTime = _ref.enterTime,
1817
+ enterTime = _ref$enterTime === void 0 ? 60 : _ref$enterTime,
1818
+ _ref$leaveTime = _ref.leaveTime,
1819
+ leaveTime = _ref$leaveTime === void 0 ? 60 : _ref$leaveTime,
1820
+ _ref$clearTime = _ref.clearTime,
1821
+ clearTime = _ref$clearTime === void 0 ? 60 : _ref$clearTime,
1822
+ _ref$name = _ref.name,
1823
+ name = _ref$name === void 0 ? 'transition' : _ref$name,
1824
+ props = _objectWithoutProperties(_ref, _excluded$2);
1825
+ var _useState = React$1.useState(''),
1826
+ _useState2 = _slicedToArray(_useState, 2),
1827
+ classes = _useState2[0],
1828
+ setClasses = _useState2[1];
1829
+ var _useState3 = React$1.useState(visible),
1830
+ _useState4 = _slicedToArray(_useState3, 2),
1831
+ renderable = _useState4[0],
1832
+ setRenderable = _useState4[1];
1833
+ React$1.useEffect(function () {
1834
+ var statusClassName = visible ? 'enter' : 'leave';
1835
+ var time = visible ? enterTime : leaveTime;
1836
+ if (visible && !renderable) {
1837
+ setRenderable(true);
1838
+ }
1839
+ setClasses("".concat(name, "-").concat(statusClassName));
1840
+
1841
+ // set class to active
1842
+ var timer = setTimeout(function () {
1843
+ setClasses("".concat(name, "-").concat(statusClassName, " ").concat(name, "-").concat(statusClassName, "-active"));
1844
+ clearTimeout(timer);
1845
+ }, time);
1846
+
1847
+ // remove classess when animation over
1848
+ var clearClassesTimer = setTimeout(function () {
1849
+ if (!visible) {
1850
+ setClasses('');
1851
+ setRenderable(false);
1852
+ }
1853
+ clearTimeout(clearClassesTimer);
1854
+ }, time + clearTime);
1855
+ return function () {
1856
+ clearTimeout(timer);
1857
+ clearTimeout(clearClassesTimer);
1858
+ };
1859
+ }, [visible, renderable]);
1860
+ if (! /*#__PURE__*/React$1.isValidElement(children) || !renderable) return null;
1861
+ var propsTransition = _objectSpread2(_objectSpread2({}, props), {}, {
1862
+ className: "".concat(children.props.className, " ").concat(className, " ").concat(classes)
1863
+ });
1864
+ return /*#__PURE__*/React$1.cloneElement(children, propsTransition);
1865
+ };
1866
+ CssTransition.displayName = 'CssTransition';
1867
+
1868
+ var tuple = function tuple() {
1869
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1870
+ args[_key] = arguments[_key];
1871
+ }
1872
+ return args;
1873
+ };
1874
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'abort', 'secondary-light', 'success-light', 'warning-light', 'error-light');
1875
+ tuple('default', 'secondary', 'success', 'warning', 'error');
1876
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite');
1877
+ tuple('default', 'secondary', 'success', 'warning', 'error', 'dark', 'lite', 'alert', 'purple', 'violet', 'cyan');
1878
+ tuple('default', 'silent', 'prevent');
1879
+ tuple('hover', 'click');
1880
+ tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
1881
+ tuple('start', 'center', 'end', 'left', 'right');
1882
+
1883
+ var makeToastActions = function makeToastActions(actions, cancelHandle) {
1884
+ var handler = function handler(event, userHandler) {
1885
+ userHandler && userHandler(event, cancelHandle);
1886
+ };
1887
+ if (!actions || !actions.length) return null;
1888
+ return actions.map(function (action, index) {
1889
+ return /*#__PURE__*/React$1.createElement("button", {
1890
+ color: action.passive ? 'default' : 'secondary',
1891
+ key: "action-".concat(index),
1892
+ onClick: function onClick(event) {
1893
+ return handler(event, action.handler);
1894
+ }
1895
+ }, action.name);
1896
+ });
1897
+ };
1898
+ var getColors = function getColors(palette, type) {
1899
+ var colors = {
1900
+ "default": palette.background,
1901
+ secondary: palette.secondary,
1902
+ success: palette.success,
1903
+ warning: palette.warning,
1904
+ error: palette.error
1905
+ };
1906
+ var isDefault = !type || type === 'default';
1907
+ if (isDefault) return {
1908
+ bgColor: colors["default"],
1909
+ color: palette.foreground
1910
+ };
1911
+ /**
1912
+ * Prevent main color change in special types.
1913
+ * The color will only follow the theme when it is in the default type.
1914
+ */
1915
+ return {
1916
+ bgColor: colors[type],
1917
+ color: 'white'
1918
+ };
1919
+ };
1920
+ tuple('topLeft', 'topRight', 'bottomLeft', 'bottomRight');
1921
+ var isTopPlacement = function isTopPlacement(placement) {
1922
+ return "".concat(placement).toLowerCase().startsWith('top');
1923
+ };
1924
+ var isLeftPlacement = function isLeftPlacement(placement) {
1925
+ return "".concat(placement).toLowerCase().endsWith('left');
1926
+ };
1927
+ var getTranslateByPlacement = function getTranslateByPlacement(placement) {
1928
+ var translateInByPlacement = {
1929
+ topLeft: 'translate(-60px, -60px)',
1930
+ topRight: 'translate(60px, -60px)',
1931
+ bottomLeft: 'translate(-60px, 60px)',
1932
+ bottomRight: 'translate(60px, 60px)'
1933
+ };
1934
+ var translateOutByPlacement = {
1935
+ topLeft: 'translate(-50px, 15px) scale(0.85)',
1936
+ topRight: 'translate(50px, 15px) scale(0.85)',
1937
+ bottomLeft: 'translate(-50px, -15px) scale(0.85)',
1938
+ bottomRight: 'translate(50px, -15px) scale(0.85)'
1939
+ };
1940
+ return {
1941
+ enter: translateInByPlacement[placement],
1942
+ leave: translateOutByPlacement[placement]
1943
+ };
1944
+ };
1945
+
1946
+ var ToastItem = /*#__PURE__*/React$1.memo(function (_ref) {
1947
+ var toast = _ref.toast,
1948
+ layout = _ref.layout;
1949
+ var theme = useTheme();
1950
+ var _useMemo = React$1.useMemo(function () {
1951
+ return getColors(theme.palette, toast.type);
1952
+ }, [theme.palette, toast.type]),
1953
+ color = _useMemo.color,
1954
+ bgColor = _useMemo.bgColor;
1955
+ var isReactNode = typeof toast.text !== 'string';
1956
+ var padding = layout.padding,
1957
+ margin = layout.margin,
1958
+ maxHeight = layout.maxHeight,
1959
+ maxWidth = layout.maxWidth,
1960
+ width = layout.width,
1961
+ placement = layout.placement;
1962
+ var _useMemo2 = React$1.useMemo(function () {
1963
+ return getTranslateByPlacement(placement);
1964
+ }, [placement]),
1965
+ enter = _useMemo2.enter,
1966
+ leave = _useMemo2.leave;
1967
+ return /*#__PURE__*/React$1.createElement(CssTransition, {
1968
+ name: "toast",
1969
+ visible: toast.visible,
1970
+ clearTime: 350
1971
+ }, /*#__PURE__*/React$1.createElement("div", {
1972
+ key: toast.id,
1973
+ className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "toast"
1974
+ }, isReactNode ? toast.text : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
1975
+ className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "message"
1976
+ }, toast.text), /*#__PURE__*/React$1.createElement("div", {
1977
+ className: _JSXStyle.dynamic([["1407001838", [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]]]) + " " + "action"
1978
+ }, makeToastActions(toast.actions, toast.cancel))), /*#__PURE__*/React$1.createElement(_JSXStyle, {
1979
+ id: "1407001838",
1980
+ dynamic: [width, maxWidth, maxHeight, theme.palette.foreground, bgColor, color, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, enter, margin, padding, margin, padding, leave]
1981
+ }, ".toast.__jsx-style-dynamic-selector{width:".concat(width, ";max-width:").concat(maxWidth, ";max-height:").concat(maxHeight, ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.foreground, ";background-color:").concat(bgColor, ";color:").concat(color, ";border:0;border-radius:").concat(theme.layout.radius, ";opacity:1;box-shadow:").concat(theme.expressiveness.shadowSmall, ";-webkit-transition:all 350ms cubic-bezier(0.1,0.2,0.1,1);transition:all 350ms cubic-bezier(0.1,0.2,0.1,1);overflow:hidden;}.message.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;font-size:0.875em;display:-webkit-box;word-break:break-all;padding-right:").concat(theme.layout.gapHalf, ";overflow:hidden;max-height:100%;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.1rem;}.toast-enter.__jsx-style-dynamic-selector{opacity:0;height:0;padding:0;margin:0;-webkit-transform:").concat(enter, ";-ms-transform:").concat(enter, ";transform:").concat(enter, ";}.toast-enter-active.__jsx-style-dynamic-selector{opacity:1;height:auto;margin:").concat(margin, ";padding:").concat(padding, ";-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);}.toast-leave.__jsx-style-dynamic-selector{opacity:1;-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);height:auto;margin:").concat(margin, ";padding:").concat(padding, ";}.toast-leave-active.__jsx-style-dynamic-selector{opacity:0;-webkit-transform:").concat(leave, ";-ms-transform:").concat(leave, ";transform:").concat(leave, ";}"))));
1982
+ });
1983
+
1984
+ /* "use client" */
1985
+
1986
+ var classObjectToString = function classObjectToString(className) {
1987
+ var keys = Object.keys(className);
1988
+ var len = keys.length;
1989
+ var str = '';
1990
+ for (var index = 0; index < len; index++) {
1991
+ var key = keys[index];
1992
+ var val = className[keys[index]];
1993
+ if (!val) continue;
1994
+ str = str ? "".concat(str, " ").concat(String(key)) : String(key);
1995
+ }
1996
+ return str;
1997
+ };
1998
+ var isObjectClassName = function isObjectClassName(value) {
1999
+ return _typeof(value) === 'object' && !Array.isArray(value);
2000
+ };
2001
+ var useClasses = function useClasses() {
2002
+ var len = arguments.length;
2003
+ var classes = '';
2004
+ if (len === 0) return classes;
2005
+ for (var index = 0; index < len; index++) {
2006
+ var val = index < 0 || arguments.length <= index ? undefined : arguments[index];
2007
+ if (!val) continue;
2008
+ if (isObjectClassName(val)) {
2009
+ classes += " ".concat(classObjectToString(val));
2010
+ } else {
2011
+ classes += " ".concat(String(val).trim());
2012
+ }
2013
+ }
2014
+ return classes.trim();
2015
+ };
2016
+
2017
+ var ToastContainer = function ToastContainer() {
2018
+ var theme = useTheme();
2019
+ var portal = usePortal('toast');
2020
+ var _useCurrentState = useCurrentState(false),
2021
+ _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
2022
+ setHovering = _useCurrentState2[1],
2023
+ hoveringRef = _useCurrentState2[2];
2024
+ var _useHUIContext = useHUIContext(),
2025
+ toasts = _useHUIContext.toasts,
2026
+ updateToasts = _useHUIContext.updateToasts,
2027
+ toastLayout = _useHUIContext.toastLayout,
2028
+ lastUpdateToastId = _useHUIContext.lastUpdateToastId;
2029
+ var memoizedLayout = React$1.useMemo(function () {
2030
+ return toastLayout;
2031
+ }, [toastLayout]);
2032
+ var toastElements = React$1.useMemo(function () {
2033
+ return toasts.map(function (toast) {
2034
+ return /*#__PURE__*/React$1.createElement(ToastItem, {
2035
+ toast: toast,
2036
+ layout: memoizedLayout,
2037
+ key: toast._internalIdent
2038
+ });
2039
+ });
2040
+ }, [toasts, memoizedLayout]);
2041
+ var classNames = React$1.useMemo(function () {
2042
+ return useClasses('toasts', {
2043
+ top: isTopPlacement(toastLayout.placement),
2044
+ left: isLeftPlacement(toastLayout.placement)
2045
+ });
2046
+ }, [memoizedLayout]);
2047
+ var hoverHandler = function hoverHandler(isHovering) {
2048
+ setHovering(isHovering);
2049
+ if (isHovering) {
2050
+ return updateToasts(function (last) {
2051
+ return last.map(function (toast) {
2052
+ if (!toast.visible) return toast;
2053
+ toast._timeout && window.clearTimeout(toast._timeout);
2054
+ return _objectSpread2(_objectSpread2({}, toast), {}, {
2055
+ timeout: null
2056
+ });
2057
+ });
2058
+ });
2059
+ }
2060
+ updateToasts(function (last) {
2061
+ return last.map(function (toast, index) {
2062
+ if (!toast.visible) return toast;
2063
+ toast._timeout && window.clearTimeout(toast._timeout);
2064
+ return _objectSpread2(_objectSpread2({}, toast), {}, {
2065
+ _timeout: function () {
2066
+ var timer = window.setTimeout(function () {
2067
+ toast.cancel();
2068
+ window.clearTimeout(timer);
2069
+ }, toast.delay + index * 100);
2070
+ return timer;
2071
+ }()
2072
+ });
2073
+ });
2074
+ });
2075
+ };
2076
+ React$1.useEffect(function () {
2077
+ var index = toasts.findIndex(function (r) {
2078
+ return r._internalIdent === lastUpdateToastId;
2079
+ });
2080
+ var toast = toasts[index];
2081
+ if (!toast || toast.visible || !hoveringRef.current) return;
2082
+ var hasVisible = toasts.find(function (r, i) {
2083
+ return i < index && r.visible;
2084
+ });
2085
+ if (hasVisible || !hoveringRef.current) return;
2086
+ hoverHandler(false);
2087
+ }, [toasts, lastUpdateToastId]);
2088
+ React$1.useEffect(function () {
2089
+ var timeout = null;
2090
+ var timer = window.setInterval(function () {
2091
+ if (toasts.length === 0) return;
2092
+ timeout = window.setTimeout(function () {
2093
+ var allInvisible = !toasts.find(function (r) {
2094
+ return r.visible;
2095
+ });
2096
+ allInvisible && updateToasts(function () {
2097
+ return [];
2098
+ });
2099
+ timeout && clearTimeout(timeout);
2100
+ }, 350);
2101
+ }, 5000);
2102
+ return function () {
2103
+ timer && clearInterval(timer);
2104
+ timeout && clearTimeout(timeout);
2105
+ };
2106
+ }, [toasts]);
2107
+ if (!portal) return null;
2108
+ if (!toasts || toasts.length === 0) return null;
2109
+ return /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/React$1.createElement("div", {
2110
+ onMouseEnter: function onMouseEnter() {
2111
+ return hoverHandler(true);
2112
+ },
2113
+ onMouseLeave: function onMouseLeave() {
2114
+ return hoverHandler(false);
2115
+ },
2116
+ className: _JSXStyle.dynamic([["622610754", [theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.layout.gap]]]) + " " + (classNames || "")
2117
+ }, toastElements, /*#__PURE__*/React$1.createElement(_JSXStyle, {
2118
+ id: "622610754",
2119
+ dynamic: [theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.layout.gap]
2120
+ }, ".toasts.__jsx-style-dynamic-selector{position:fixed;width:auto;max-width:100%;right:".concat(theme.layout.gap, ";bottom:").concat(theme.layout.gap, ";z-index:2000;-webkit-transition:all 400ms ease;transition:all 400ms ease;box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.top.__jsx-style-dynamic-selector{bottom:unset;-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;top:").concat(theme.layout.gap, ";}.left.__jsx-style-dynamic-selector{right:unset;left:").concat(theme.layout.gap, ";}"))), portal);
2121
+ };
2122
+
2123
+ var HuiProvider = function HuiProvider(_ref) {
2124
+ var themes = _ref.themes,
2125
+ themeType = _ref.themeType,
2126
+ children = _ref.children;
2127
+ var _React$useState = React$1.useState(''),
2128
+ _React$useState2 = _slicedToArray(_React$useState, 2),
2129
+ lastUpdateToastId = _React$useState2[0],
2130
+ setLastUpdateToastId = _React$useState2[1];
2131
+ var _useCurrentState = useCurrentState([]),
2132
+ _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
2133
+ toasts = _useCurrentState2[0],
2134
+ setToasts = _useCurrentState2[1],
2135
+ toastsRef = _useCurrentState2[2];
2136
+ var _useCurrentState3 = useCurrentState(defaultToastLayout),
2137
+ _useCurrentState4 = _slicedToArray(_useCurrentState3, 3),
2138
+ toastLayout = _useCurrentState4[0],
2139
+ setToastLayout = _useCurrentState4[1],
2140
+ toastLayoutRef = _useCurrentState4[2];
2141
+ var updateToasts = function updateToasts(fn) {
2142
+ var nextToasts = fn(toastsRef.current);
2143
+ setToasts(nextToasts);
2144
+ };
2145
+ var updateToastLayout = function updateToastLayout(fn) {
2146
+ var nextLayout = fn(toastLayoutRef.current);
2147
+ setToastLayout(nextLayout);
2148
+ };
2149
+ var updateLastToastId = function updateLastToastId(fn) {
2150
+ setLastUpdateToastId(fn());
2151
+ };
2152
+ var initialValue = React$1.useMemo(function () {
2153
+ return {
2154
+ toasts: toasts,
2155
+ toastLayout: toastLayout,
2156
+ updateToasts: updateToasts,
2157
+ lastUpdateToastId: lastUpdateToastId,
2158
+ updateToastLayout: updateToastLayout,
2159
+ updateLastToastId: updateLastToastId
2160
+ };
2161
+ }, [toasts, toastLayout, lastUpdateToastId]);
2162
+ return /*#__PURE__*/React$1.createElement(HUIContent.Provider, {
2163
+ value: initialValue
2164
+ }, /*#__PURE__*/React$1.createElement(ThemeProvider, {
2165
+ themes: themes,
2166
+ themeType: themeType
2167
+ }, children, /*#__PURE__*/React$1.createElement(ToastContainer, null)));
2168
+ };
2169
+
2170
+ // import flush from 'styled-jsx'
2171
+
2172
+ // export type FlushToReact = <T>(opts?: { nonce?: string }) => Array<ReactElement<T>>
2173
+
2174
+ // export type FlushToHTML = (opts?: { nonce?: string }) => string
2175
+
2176
+ var CssBaseline = function CssBaseline(_ref) {
2177
+ var children = _ref.children;
2178
+ var theme = useTheme();
2179
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, children, /*#__PURE__*/React$1.createElement(_JSXStyle, {
2180
+ id: "3647548829",
2181
+ dynamic: [theme.palette.background, theme.palette.foreground, theme.palette.background, theme.font.sans, theme.font.sans, theme.palette.link, theme.expressiveness.linkStyle, theme.expressiveness.linkHoverStyle, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gap, theme.palette.foreground, theme.palette.code, theme.font.mono, theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.palette.accents_2, theme.layout.radius, theme.font.mono, theme.palette.foreground, theme.palette.accents_2, theme.palette.accents_1, theme.layout.gap, theme.layout.gap, theme.palette.accents_5, theme.palette.accents_1, theme.layout.radius, theme.palette.border, theme.palette.selection, theme.palette.foreground]
2182
+ }, "html,body{background-color:".concat(theme.palette.background, ";color:").concat(theme.palette.foreground, ";}html{font-size:16px;--helpdice-icons-background:").concat(theme.palette.background, ";}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-size:1rem;line-height:1.5;margin:0;padding:0;min-height:100%;position:relative;overflow-x:hidden;font-family:").concat(theme.font.sans, ";}#__next{overflow-x:hidden;}*,*:before,*:after{box-sizing:inherit;text-rendering:geometricPrecision;-webkit-tap-highlight-color:transparent;}p,small{font-weight:400;color:inherit;-webkit-letter-spacing:-0.005625em;-moz-letter-spacing:-0.005625em;-ms-letter-spacing:-0.005625em;letter-spacing:-0.005625em;font-family:").concat(theme.font.sans, ";}p{margin:1em 0;font-size:1em;line-height:1.625em;}small{margin:0;line-height:1.5;font-size:0.875em;}b{font-weight:600;}span{font-size:inherit;color:inherit;font-weight:inherit;}img{max-width:100%;}a{cursor:pointer;font-size:inherit;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-box-align:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.link, ";-webkit-text-decoration:").concat(theme.expressiveness.linkStyle, ";text-decoration:").concat(theme.expressiveness.linkStyle, ";}a:hover{-webkit-text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";}ul,ol{padding:0;list-style-type:none;margin:").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gap, ";color:").concat(theme.palette.foreground, ";}ol{list-style-type:decimal;}li{margin-bottom:0.625em;font-size:1em;line-height:1.625em;}h1,h2,h3,h4,h5,h6{color:inherit;margin:0 0 0.7rem 0;}h1{font-size:3rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;line-height:1.5;font-weight:700;}h2{font-size:2.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h3{font-size:1.5rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h4{font-size:1.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h5{font-size:1rem;-webkit-letter-spacing:-0.01em;-moz-letter-spacing:-0.01em;-ms-letter-spacing:-0.01em;letter-spacing:-0.01em;font-weight:600;}h6{font-size:0.875rem;-webkit-letter-spacing:-0.005em;-moz-letter-spacing:-0.005em;-ms-letter-spacing:-0.005em;letter-spacing:-0.005em;font-weight:600;}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;margin:0;}button:focus,input:focus,select:focus,textarea:focus{outline:none;}code{color:").concat(theme.palette.code, ";font-family:").concat(theme.font.mono, ";font-size:0.9em;white-space:pre-wrap;}code:before,code:after{content:'\\`';}pre{padding:calc(").concat(theme.layout.gap, " * 0.9) ").concat(theme.layout.gap, ";margin:").concat(theme.layout.gap, " 0;border:1px solid ").concat(theme.palette.accents_2, ";border-radius:").concat(theme.layout.radius, ";font-family:").concat(theme.font.mono, ";white-space:pre;overflow:auto;line-height:1.5;text-align:left;font-size:14px;-webkit-overflow-scrolling:touch;}pre code{color:").concat(theme.palette.foreground, ";font-size:1em;line-height:1.25em;white-space:pre;}pre code:before,pre code:after{display:none;}pre p{margin:0;}pre::-webkit-scrollbar{display:none;width:0;height:0;background:transparent;}hr{border-color:").concat(theme.palette.accents_2, ";}details{background-color:").concat(theme.palette.accents_1, ";border:none;}details:focus,details:hover,details:active{outline:none;}summary{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;list-style:none;outline:none;}summary::marker,summary::before,summary::-webkit-details-marker{display:none;}summary::-moz-list-bullet{font-size:0;}summary:focus,summary:hover,summary:active{outline:none;list-style:none;}blockquote{padding:calc(0.667 * ").concat(theme.layout.gap, ") ").concat(theme.layout.gap, ";color:").concat(theme.palette.accents_5, ";background-color:").concat(theme.palette.accents_1, ";border-radius:").concat(theme.layout.radius, ";margin:1.5em 0;border:1px solid ").concat(theme.palette.border, ";}blockquote *:first-child{margin-top:0;}blockquote *:last-child{margin-bottom:0;}::selection{background-color:").concat(theme.palette.selection, ";color:").concat(theme.palette.foreground, ";}")));
2183
+ };
2184
+ var MemoCssBaseline = /*#__PURE__*/React$1.memo(CssBaseline);
2185
+
2186
+ var getElementOffset = function getElementOffset(el) {
2187
+ if (!el) return {
2188
+ top: 0,
2189
+ left: 0
2190
+ };
2191
+ var _el$getBoundingClient = el.getBoundingClientRect(),
2192
+ top = _el$getBoundingClient.top,
2193
+ left = _el$getBoundingClient.left;
2194
+ return {
2195
+ top: top,
2196
+ left: left
2197
+ };
2198
+ };
2199
+ var defaultRect$1 = {
2200
+ top: -1e3,
2201
+ left: -1e3,
2202
+ right: -1e3,
2203
+ width: 0,
2204
+ height: 0,
2205
+ elementTop: -1e3
2206
+ };
2207
+ var getRectFromDOMWithContainer = function getRectFromDOMWithContainer(domRect, getContainer) {
2208
+ if (!domRect) return defaultRect$1;
2209
+ var container = getContainer ? getContainer() : null;
2210
+ var scrollElement = container || document.documentElement;
2211
+ var _getElementOffset = getElementOffset(container),
2212
+ offsetTop = _getElementOffset.top,
2213
+ offsetLeft = _getElementOffset.left;
2214
+ return _objectSpread2(_objectSpread2({}, domRect), {}, {
2215
+ width: domRect.width || domRect.right - domRect.left,
2216
+ height: domRect.height || domRect.top - domRect.bottom,
2217
+ top: domRect.bottom + scrollElement.scrollTop - offsetTop,
2218
+ left: domRect.left + scrollElement.scrollLeft - offsetLeft,
2219
+ elementTop: domRect.top + scrollElement.scrollTop - offsetTop
2220
+ });
2221
+ };
2222
+ var isUnplacedRect = function isUnplacedRect(rect) {
2223
+ if (!rect) return true;
2224
+ return rect.top === defaultRect$1.top && rect.left === defaultRect$1.left;
2225
+ };
2226
+ var getRefRect = function getRefRect(ref, getContainer) {
2227
+ if (!ref || !ref.current) return defaultRect$1;
2228
+ var rect = ref.current.getBoundingClientRect();
2229
+ return getRectFromDOMWithContainer(rect, getContainer);
2230
+ };
2231
+ var getEventRect = function getEventRect(event, getContainer) {
2232
+ var _event$target;
2233
+ var rect = event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.getBoundingClientRect();
2234
+ if (!rect) return defaultRect$1;
2235
+ return getRectFromDOMWithContainer(rect, getContainer);
2236
+ };
2237
+ var isRefTarget = function isRefTarget(eventOrRef) {
2238
+ return typeof (eventOrRef === null || eventOrRef === void 0 ? void 0 : eventOrRef.target) === 'undefined';
2239
+ };
2240
+ var useRect = function useRect(initialState) {
2241
+ var _useState = React$1.useState(initialState || defaultRect$1),
2242
+ _useState2 = _slicedToArray(_useState, 2),
2243
+ rect = _useState2[0],
2244
+ setRect = _useState2[1];
2245
+ var updateRect = function updateRect(eventOrRef, getContainer) {
2246
+ if (isRefTarget(eventOrRef)) return setRect(getRefRect(eventOrRef, getContainer));
2247
+ setRect(getEventRect(eventOrRef, getContainer));
2248
+ };
2249
+ return {
2250
+ rect: rect,
2251
+ setRect: updateRect
2252
+ };
2253
+ };
2254
+
2255
+ var defaultToast = {
2256
+ delay: 2000,
2257
+ type: 'default'
2258
+ };
2259
+ var useToasts = function useToasts(layout) {
2260
+ var _useHUIContext = useHUIContext(),
2261
+ updateToasts = _useHUIContext.updateToasts,
2262
+ toasts = _useHUIContext.toasts,
2263
+ updateToastLayout = _useHUIContext.updateToastLayout,
2264
+ updateLastToastId = _useHUIContext.updateLastToastId;
2265
+ React$1.useEffect(function () {
2266
+ if (!layout) return;
2267
+ updateToastLayout(function () {
2268
+ return layout ? _objectSpread2(_objectSpread2({}, defaultToastLayout), layout) : defaultToastLayout;
2269
+ });
2270
+ }, []);
2271
+ var _cancel = function cancel(internalId) {
2272
+ updateToasts(function (currentToasts) {
2273
+ return currentToasts.map(function (item) {
2274
+ if (item._internalIdent !== internalId) return item;
2275
+ return _objectSpread2(_objectSpread2({}, item), {}, {
2276
+ visible: false
2277
+ });
2278
+ });
2279
+ });
2280
+ updateLastToastId(function () {
2281
+ return internalId;
2282
+ });
2283
+ };
2284
+ var removeAll = function removeAll() {
2285
+ updateToasts(function (last) {
2286
+ return last.map(function (toast) {
2287
+ return _objectSpread2(_objectSpread2({}, toast), {}, {
2288
+ visible: false
2289
+ });
2290
+ });
2291
+ });
2292
+ };
2293
+ var findToastOneByID = function findToastOneByID(id) {
2294
+ return toasts.find(function (t) {
2295
+ return t.id === id;
2296
+ });
2297
+ };
2298
+ var removeToastOneByID = function removeToastOneByID(id) {
2299
+ updateToasts(function (last) {
2300
+ return last.map(function (toast) {
2301
+ if (toast.id !== id) return toast;
2302
+ return _objectSpread2(_objectSpread2({}, toast), {}, {
2303
+ visible: false
2304
+ });
2305
+ });
2306
+ });
2307
+ };
2308
+ var setToast = function setToast(toast) {
2309
+ var internalIdent = "toast-".concat(getId());
2310
+ var delay = toast.delay || defaultToast.delay;
2311
+ if (toast.id) {
2312
+ var hasIdent = toasts.find(function (t) {
2313
+ return t.id === toast.id;
2314
+ });
2315
+ if (hasIdent) {
2316
+ throw new Error('Toast: Already have the same key: "ident"');
2317
+ }
2318
+ }
2319
+ updateToasts(function (last) {
2320
+ var newToast = {
2321
+ delay: delay,
2322
+ text: toast.text,
2323
+ visible: true,
2324
+ type: toast.type || defaultToast.type,
2325
+ id: toast.id || internalIdent,
2326
+ actions: toast.actions || [],
2327
+ _internalIdent: internalIdent,
2328
+ _timeout: window.setTimeout(function () {
2329
+ _cancel(internalIdent);
2330
+ if (newToast._timeout) {
2331
+ window.clearTimeout(newToast._timeout);
2332
+ newToast._timeout = null;
2333
+ }
2334
+ }, delay),
2335
+ cancel: function cancel() {
2336
+ return _cancel(internalIdent);
2337
+ }
2338
+ };
2339
+ return [].concat(_toConsumableArray(last), [newToast]);
2340
+ });
2341
+ };
2342
+ return {
2343
+ toasts: toasts,
2344
+ setToast: setToast,
2345
+ removeAll: removeAll,
2346
+ findToastOneByID: findToastOneByID,
2347
+ removeToastOneByID: removeToastOneByID
2348
+ };
2349
+ };
2350
+
2351
+ tuple('xs', 'sm', 'md', 'lg', 'xl', 'mobile');
2352
+ tuple('up', 'down', 'default');
2353
+ var defaultResponsiveOptions = {
2354
+ match: 'default'
2355
+ };
2356
+ var makeQueries = function makeQueries(bp, up, down) {
2357
+ var queryString = function queryString(item) {
2358
+ var upQuery = "(min-width: ".concat(item.min, ")");
2359
+ var downQuery = "(max-width: ".concat(item.max, ")");
2360
+ return up ? upQuery : down ? downQuery : "".concat(upQuery, " and ").concat(downQuery);
2361
+ };
2362
+ var xs = queryString(bp.xs);
2363
+ return {
2364
+ xs: xs,
2365
+ mobile: xs,
2366
+ sm: queryString(bp.sm),
2367
+ md: queryString(bp.md),
2368
+ lg: queryString(bp.lg),
2369
+ xl: queryString(bp.xl)
2370
+ };
2371
+ };
2372
+ var useMediaQuery = function useMediaQuery(breakpoint) {
2373
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultResponsiveOptions;
2374
+ var _options$match = options.match,
2375
+ matchType = _options$match === void 0 ? 'default' : _options$match,
2376
+ _options$ssrMatchMedi = options.ssrMatchMedia,
2377
+ ssrMatchMedia = _options$ssrMatchMedi === void 0 ? null : _options$ssrMatchMedi;
2378
+ var supportMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
2379
+ var theme = useTheme();
2380
+ var mediaQueries = React$1.useMemo(function () {
2381
+ var up = matchType === 'up';
2382
+ var down = matchType === 'down';
2383
+ return makeQueries(theme.breakpoints, up, down);
2384
+ }, [theme.breakpoints, options]);
2385
+ var query = React$1.useMemo(function () {
2386
+ return mediaQueries[breakpoint];
2387
+ }, [mediaQueries, breakpoint]);
2388
+ var matchQuery = function matchQuery(q) {
2389
+ return window.matchMedia(q);
2390
+ };
2391
+
2392
+ /**
2393
+ * Do nothing in the server-side rendering.
2394
+ * If server match query fucntion is simulated, return user-defined value first.
2395
+ */
2396
+ var _useState = React$1.useState(function () {
2397
+ if (supportMedia) return matchQuery(query).matches;
2398
+ if (ssrMatchMedia && typeof ssrMatchMedia === 'function') {
2399
+ return ssrMatchMedia(query).matches;
2400
+ }
2401
+ return false;
2402
+ }),
2403
+ _useState2 = _slicedToArray(_useState, 2),
2404
+ state = _useState2[0],
2405
+ setState = _useState2[1];
2406
+ React$1.useEffect(function () {
2407
+ if (!supportMedia) return;
2408
+ var queryList = matchQuery(query);
2409
+ var update = function update() {
2410
+ return setState(matchQuery(query).matches);
2411
+ };
2412
+ update();
2413
+
2414
+ /**
2415
+ * addListener is deprecated. EventTarget.addEventListener is recommended.
2416
+ * But in some old browsers, MediaQueryList does not inherit from EventTarget.
2417
+ */
2418
+ queryList.addListener(update);
2419
+ return function () {
2420
+ queryList.removeListener(update);
2421
+ };
2422
+ }, [supportMedia]);
2423
+ return state;
2424
+ };
2425
+
2426
+ /* "use client" */
2427
+
2428
+ var usePrevious = function usePrevious(state) {
2429
+ var ref = React$1.useRef(null);
2430
+ React$1.useEffect(function () {
2431
+ ref.current = state;
2432
+ });
2433
+ return ref ? ref.current : null;
2434
+ };
2435
+
2436
+ var _excluded$1 = ["rect", "visible", "hoverHeightRatio", "hoverWidthRatio", "activeOpacity", "className"];
2437
+ var Highlight = function Highlight(_ref) {
2438
+ var rect = _ref.rect,
2439
+ visible = _ref.visible,
2440
+ _ref$hoverHeightRatio = _ref.hoverHeightRatio,
2441
+ hoverHeightRatio = _ref$hoverHeightRatio === void 0 ? 1 : _ref$hoverHeightRatio,
2442
+ _ref$hoverWidthRatio = _ref.hoverWidthRatio,
2443
+ hoverWidthRatio = _ref$hoverWidthRatio === void 0 ? 1 : _ref$hoverWidthRatio,
2444
+ _ref$activeOpacity = _ref.activeOpacity,
2445
+ activeOpacity = _ref$activeOpacity === void 0 ? 0.8 : _ref$activeOpacity,
2446
+ className = _ref.className,
2447
+ props = _objectWithoutProperties(_ref, _excluded$1);
2448
+ var theme = useTheme();
2449
+ var ref = React$1.useRef(null);
2450
+ var isFirstVisible = usePrevious(isUnplacedRect(rect));
2451
+ var position = React$1.useMemo(function () {
2452
+ var width = rect.width * hoverWidthRatio;
2453
+ var height = rect.height * hoverHeightRatio;
2454
+ return {
2455
+ width: "".concat(width, "px"),
2456
+ left: "".concat(rect.left + (rect.width - width) / 2, "px"),
2457
+ height: "".concat(height, "px"),
2458
+ top: "".concat(rect.elementTop + (rect.height - height) / 2, "px"),
2459
+ transition: isFirstVisible ? 'opacity' : 'opacity, width, left, top'
2460
+ };
2461
+ }, [rect, hoverWidthRatio, hoverHeightRatio]);
2462
+ return /*#__PURE__*/React$1.createElement("div", _extends({
2463
+ ref: ref
2464
+ }, props, {
2465
+ className: _JSXStyle.dynamic([["603024321", [theme.palette.accents_2, position.width, position.left, position.height, position.top, visible ? activeOpacity : 0, position.transition]]]) + " " + (props && props.className != null && props.className || useClasses('highlight', className) || "")
2466
+ }), /*#__PURE__*/React$1.createElement(_JSXStyle, {
2467
+ id: "603024321",
2468
+ dynamic: [theme.palette.accents_2, position.width, position.left, position.height, position.top, visible ? activeOpacity : 0, position.transition]
2469
+ }, ".highlight.__jsx-style-dynamic-selector{background:".concat(theme.palette.accents_2, ";position:absolute;border-radius:5px;width:").concat(position.width, ";left:").concat(position.left, ";height:").concat(position.height, ";top:").concat(position.top, ";opacity:").concat(visible ? activeOpacity : 0, ";-webkit-transition:0.15s ease;transition:0.15s ease;-webkit-transition-property:").concat(position.transition, ";transition-property:").concat(position.transition, ";}")));
2470
+ };
2471
+
2472
+ var Ellipsis = function Ellipsis(_ref) {
2473
+ var children = _ref.children,
2474
+ height = _ref.height;
2475
+ return /*#__PURE__*/React$1.createElement("span", {
2476
+ className: _JSXStyle.dynamic([["822089635", [height]]])
2477
+ }, children, /*#__PURE__*/React$1.createElement(_JSXStyle, {
2478
+ id: "822089635",
2479
+ dynamic: [height]
2480
+ }, "span.__jsx-style-dynamic-selector{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:".concat(height, ";min-width:0;}")));
2481
+ };
2482
+ var ellipsis = /*#__PURE__*/React$1.memo(Ellipsis);
2483
+
2484
+ var getRealShape = function getRealShape(el) {
2485
+ var defaultShape = {
2486
+ width: 0,
2487
+ height: 0
2488
+ };
2489
+ if (!el || typeof window === 'undefined') return defaultShape;
2490
+ var rect = el.getBoundingClientRect();
2491
+ var _window$getComputedSt = window.getComputedStyle(el),
2492
+ width = _window$getComputedSt.width,
2493
+ height = _window$getComputedSt.height;
2494
+ var getCSSStyleVal = function getCSSStyleVal(str, parentNum) {
2495
+ if (!str) return 0;
2496
+ var strVal = str.includes('px') ? +str.split('px')[0] : str.includes('%') ? +str.split('%')[0] * parentNum * 0.01 : str;
2497
+ return Number.isNaN(+strVal) ? 0 : +strVal;
2498
+ };
2499
+ return {
2500
+ width: getCSSStyleVal("".concat(width), rect.width),
2501
+ height: getCSSStyleVal("".concat(height), rect.height)
2502
+ };
2503
+ };
2504
+ var useRealShape = function useRealShape(ref) {
2505
+ var _useState = React$1.useState({
2506
+ width: 0,
2507
+ height: 0
2508
+ }),
2509
+ _useState2 = _slicedToArray(_useState, 2),
2510
+ state = _useState2[0],
2511
+ setState = _useState2[1];
2512
+ var update = function update() {
2513
+ var _getRealShape = getRealShape(ref.current),
2514
+ width = _getRealShape.width,
2515
+ height = _getRealShape.height;
2516
+ setState({
2517
+ width: width,
2518
+ height: height
2519
+ });
2520
+ };
2521
+ React$1.useEffect(function () {
2522
+ return update();
2523
+ }, [ref.current]);
2524
+ return [state, update];
2525
+ };
2526
+
2527
+ var Expand = function Expand(_ref) {
2528
+ var _ref$isExpanded = _ref.isExpanded,
2529
+ isExpanded = _ref$isExpanded === void 0 ? false : _ref$isExpanded,
2530
+ _ref$delay = _ref.delay,
2531
+ delay = _ref$delay === void 0 ? 200 : _ref$delay,
2532
+ children = _ref.children;
2533
+ var _useState = React$1.useState(isExpanded ? 'auto' : '0'),
2534
+ _useState2 = _slicedToArray(_useState, 2),
2535
+ height = _useState2[0],
2536
+ setHeight = _useState2[1];
2537
+ var _useState3 = React$1.useState(isExpanded),
2538
+ _useState4 = _slicedToArray(_useState3, 2),
2539
+ selfExpanded = _useState4[0],
2540
+ setSelfExpanded = _useState4[1];
2541
+ var _useState5 = React$1.useState(isExpanded),
2542
+ _useState6 = _slicedToArray(_useState5, 2),
2543
+ visible = _useState6[0],
2544
+ setVisible = _useState6[1];
2545
+ var contentRef = React$1.useRef(null);
2546
+ var entryTimer = React$1.useRef();
2547
+ var leaveTimer = React$1.useRef();
2548
+ var resetTimer = React$1.useRef();
2549
+ var _useRealShape = useRealShape(contentRef),
2550
+ _useRealShape2 = _slicedToArray(_useRealShape, 2),
2551
+ state = _useRealShape2[0],
2552
+ updateShape = _useRealShape2[1];
2553
+ var classes = useClasses('container', {
2554
+ expanded: selfExpanded
2555
+ });
2556
+ React$1.useEffect(function () {
2557
+ return setHeight("".concat(state.height, "px"));
2558
+ }, [state.height]);
2559
+ React$1.useEffect(function () {
2560
+ // show element or reset height.
2561
+ // force an update once manually, even if the element does not change.
2562
+ // (the height of the element might be "auto")
2563
+ if (isExpanded) {
2564
+ setVisible(isExpanded);
2565
+ } else {
2566
+ updateShape();
2567
+ setHeight("".concat(state.height, "px"));
2568
+ }
2569
+
2570
+ // show expand animation
2571
+ entryTimer.current = window.setTimeout(function () {
2572
+ setSelfExpanded(isExpanded);
2573
+ clearTimeout(entryTimer.current);
2574
+ }, 30);
2575
+
2576
+ // Reset height after animation
2577
+ if (isExpanded) {
2578
+ resetTimer.current = window.setTimeout(function () {
2579
+ setHeight('auto');
2580
+ clearTimeout(resetTimer.current);
2581
+ }, delay);
2582
+ } else {
2583
+ leaveTimer.current = window.setTimeout(function () {
2584
+ setVisible(isExpanded);
2585
+ clearTimeout(leaveTimer.current);
2586
+ }, delay / 2);
2587
+ }
2588
+ return function () {
2589
+ clearTimeout(entryTimer.current);
2590
+ clearTimeout(leaveTimer.current);
2591
+ clearTimeout(resetTimer.current);
2592
+ };
2593
+ }, [isExpanded]);
2594
+ return /*#__PURE__*/React$1.createElement("div", {
2595
+ className: _JSXStyle.dynamic([["1918690829", [visible ? 'visible' : 'hidden', delay, height]]]) + " " + (classes || "")
2596
+ }, /*#__PURE__*/React$1.createElement("div", {
2597
+ ref: contentRef,
2598
+ className: _JSXStyle.dynamic([["1918690829", [visible ? 'visible' : 'hidden', delay, height]]]) + " " + "content"
2599
+ }, children), /*#__PURE__*/React$1.createElement(_JSXStyle, {
2600
+ id: "1918690829",
2601
+ dynamic: [visible ? 'visible' : 'hidden', delay, height]
2602
+ }, ".container.__jsx-style-dynamic-selector{padding:0;margin:0;height:0;overflow:hidden;visibility:".concat(visible ? 'visible' : 'hidden', ";-webkit-transition:height ").concat(delay, "ms ease;transition:height ").concat(delay, "ms ease;}.expanded.__jsx-style-dynamic-selector{height:").concat(height, ";visibility:visible;}")));
2603
+ };
2604
+ Expand.displayName = 'Expand';
2605
+
2606
+ /* "use client" */
2607
+
2608
+ var useResize = function useResize(callback) {
2609
+ var immediatelyInvoke = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2610
+ React$1.useEffect(function () {
2611
+ var fn = function fn() {
2612
+ return callback();
2613
+ };
2614
+ if (immediatelyInvoke) {
2615
+ fn();
2616
+ }
2617
+ window.addEventListener('resize', fn);
2618
+ return function () {
2619
+ return window.removeEventListener('resize', fn);
2620
+ };
2621
+ }, []);
2622
+ };
2623
+
2624
+ /* "use client" */
2625
+
2626
+ var useClickAnyWhere = function useClickAnyWhere(handler) {
2627
+ React$1.useEffect(function () {
2628
+ var callback = function callback(event) {
2629
+ return handler(event);
2630
+ };
2631
+ document.addEventListener('click', callback);
2632
+ return function () {
2633
+ return document.removeEventListener('click', callback);
2634
+ };
2635
+ }, [handler]);
2636
+ };
2637
+
2638
+ /* "use client" */
2639
+
2640
+ var useDOMObserver = function useDOMObserver(ref) {
2641
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
2642
+ var config = {
2643
+ attributes: false,
2644
+ childList: true,
2645
+ subtree: true
2646
+ };
2647
+ React$1.useEffect(function () {
2648
+ if (!ref || !ref.current) return;
2649
+ var unmount = false;
2650
+ var done = function done() {
2651
+ if (unmount) return;
2652
+ callback.apply(void 0, arguments);
2653
+ };
2654
+ var observer = new MutationObserver(done);
2655
+ observer.observe(ref.current, config);
2656
+ return function () {
2657
+ unmount = true;
2658
+ observer.disconnect();
2659
+ };
2660
+ }, [ref]);
2661
+ };
2662
+
2663
+ var warningStack = {};
2664
+ var useWarning = function useWarning(message, component) {
2665
+ var tag = ' ';
2666
+ var log = "[Helpdice UI]".concat(tag, ": ").concat(message);
2667
+ if (typeof console === 'undefined') return;
2668
+ if (warningStack[log]) return;
2669
+ warningStack[log] = true;
2670
+ if (process.env.NODE_ENV !== 'production') {
2671
+ return console.error(log);
2672
+ }
2673
+ console.warn(log);
2674
+ };
2675
+
2676
+ var defaultRect = {
2677
+ top: -1e3,
2678
+ left: -1e3,
2679
+ right: -1e3,
2680
+ width: 0
2681
+ };
2682
+ var Dropdown = /*#__PURE__*/React$1.memo(function (_ref) {
2683
+ var children = _ref.children,
2684
+ parent = _ref.parent,
2685
+ visible = _ref.visible,
2686
+ disableMatchWidth = _ref.disableMatchWidth,
2687
+ getPopupContainer = _ref.getPopupContainer;
2688
+ var el = usePortal('dropdown', getPopupContainer);
2689
+ var _useState = React$1.useState(defaultRect),
2690
+ _useState2 = _slicedToArray(_useState, 2),
2691
+ rect = _useState2[0],
2692
+ setRect = _useState2[1];
2693
+ var classes = useClasses('dropdown', disableMatchWidth ? 'disable-match' : 'width-match');
2694
+ if (!parent) return null;
2695
+
2696
+ /* istanbul ignore next */
2697
+ if (process.env.NODE_ENV !== 'production') {
2698
+ if (getPopupContainer && getPopupContainer()) {
2699
+ var _el = getPopupContainer();
2700
+ var style = window.getComputedStyle(_el);
2701
+ if (style.position === 'static') {
2702
+ useWarning('The element specified by "getPopupContainer" must have "position" set.');
2703
+ }
2704
+ }
2705
+ }
2706
+ var updateRect = function updateRect() {
2707
+ var _getRefRect = getRefRect(parent, getPopupContainer),
2708
+ top = _getRefRect.top,
2709
+ left = _getRefRect.left,
2710
+ right = _getRefRect.right,
2711
+ nativeWidth = _getRefRect.width;
2712
+ setRect({
2713
+ top: top,
2714
+ left: left,
2715
+ right: right,
2716
+ width: nativeWidth
2717
+ });
2718
+ };
2719
+ useResize(updateRect);
2720
+ useClickAnyWhere(function () {
2721
+ var _getRefRect2 = getRefRect(parent, getPopupContainer),
2722
+ top = _getRefRect2.top,
2723
+ left = _getRefRect2.left;
2724
+ var shouldUpdatePosition = top !== rect.top || left !== rect.left;
2725
+ if (!shouldUpdatePosition) return;
2726
+ updateRect();
2727
+ });
2728
+ useDOMObserver(parent, function () {
2729
+ updateRect();
2730
+ });
2731
+ React$1.useEffect(function () {
2732
+ if (!parent || !parent.current) return;
2733
+ parent.current.addEventListener('mouseenter', updateRect);
2734
+ /* istanbul ignore next */
2735
+ return function () {
2736
+ if (!parent || !parent.current) return;
2737
+ parent.current.removeEventListener('mouseenter', updateRect);
2738
+ };
2739
+ }, [parent]);
2740
+ var clickHandler = function clickHandler(event) {
2741
+ event.stopPropagation();
2742
+ event.nativeEvent.stopImmediatePropagation();
2743
+ event.preventDefault();
2744
+ };
2745
+ var mouseDownHandler = function mouseDownHandler(event) {
2746
+ event.preventDefault();
2747
+ };
2748
+ if (!el) return null;
2749
+ return /*#__PURE__*/reactDom.createPortal(/*#__PURE__*/React$1.createElement(CssTransition, {
2750
+ visible: visible
2751
+ }, /*#__PURE__*/React$1.createElement("div", {
2752
+ onClick: clickHandler,
2753
+ onMouseDown: mouseDownHandler,
2754
+ className: _JSXStyle.dynamic([["1644673105", [rect.top + 2, rect.left, rect.width, rect.width]]]) + " " + (classes || "")
2755
+ }, children, /*#__PURE__*/React$1.createElement(_JSXStyle, {
2756
+ id: "1644673105",
2757
+ dynamic: [rect.top + 2, rect.left, rect.width, rect.width]
2758
+ }, ".dropdown.__jsx-style-dynamic-selector{position:absolute;top:".concat(rect.top + 2, "px;left:").concat(rect.left, "px;z-index:1100;}.width-match.__jsx-style-dynamic-selector{width:").concat(rect.width, "px;}.disable-match.__jsx-style-dynamic-selector{min-width:").concat(rect.width, "px;}")))), el);
2759
+ });
2760
+
2761
+ var _excluded = ["children", "onClick", "visible", "width", "onContentClick", "backdropClassName", "positionClassName", "layerClassName"];
2762
+ var Backdrop = /*#__PURE__*/React$1.memo(function (_ref) {
2763
+ var children = _ref.children,
2764
+ _ref$onClick = _ref.onClick,
2765
+ onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
2766
+ _ref$visible = _ref.visible,
2767
+ visible = _ref$visible === void 0 ? false : _ref$visible,
2768
+ width = _ref.width,
2769
+ _ref$onContentClick = _ref.onContentClick,
2770
+ onContentClick = _ref$onContentClick === void 0 ? function () {} : _ref$onContentClick,
2771
+ _ref$backdropClassNam = _ref.backdropClassName,
2772
+ backdropClassName = _ref$backdropClassNam === void 0 ? '' : _ref$backdropClassNam,
2773
+ _ref$positionClassNam = _ref.positionClassName,
2774
+ positionClassName = _ref$positionClassNam === void 0 ? '' : _ref$positionClassNam,
2775
+ _ref$layerClassName = _ref.layerClassName,
2776
+ layerClassName = _ref$layerClassName === void 0 ? '' : _ref$layerClassName,
2777
+ props = _objectWithoutProperties(_ref, _excluded);
2778
+ var theme = useTheme();
2779
+ var _useCurrentState = useCurrentState(false),
2780
+ _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
2781
+ setIsContentMouseDown = _useCurrentState2[1],
2782
+ IsContentMouseDownRef = _useCurrentState2[2];
2783
+ var clickHandler = function clickHandler(event) {
2784
+ if (IsContentMouseDownRef.current) return;
2785
+ onClick && onClick(event);
2786
+ };
2787
+ var mouseUpHandler = function mouseUpHandler() {
2788
+ if (!IsContentMouseDownRef.current) return;
2789
+ var timer = setTimeout(function () {
2790
+ setIsContentMouseDown(false);
2791
+ clearTimeout(timer);
2792
+ }, 0);
2793
+ };
2794
+ return /*#__PURE__*/React$1.createElement(CssTransition, {
2795
+ name: "backdrop-wrapper",
2796
+ visible: visible,
2797
+ clearTime: 300
2798
+ }, /*#__PURE__*/React$1.createElement("div", _extends({
2799
+ onClick: clickHandler,
2800
+ onMouseUp: mouseUpHandler
2801
+ }, props, {
2802
+ className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (props && props.className != null && props.className || useClasses('backdrop', backdropClassName) || "")
2803
+ }), /*#__PURE__*/React$1.createElement("div", {
2804
+ className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (useClasses('layer', layerClassName) || "")
2805
+ }), /*#__PURE__*/React$1.createElement("div", {
2806
+ onClick: onContentClick,
2807
+ onMouseDown: function onMouseDown() {
2808
+ return setIsContentMouseDown(true);
2809
+ },
2810
+ className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (useClasses('position', positionClassName) || "")
2811
+ }, children), /*#__PURE__*/React$1.createElement(_JSXStyle, {
2812
+ id: "2021762493",
2813
+ dynamic: [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]
2814
+ }, ".backdrop.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;right:0;bottom:0;overflow:auto;z-index:1000;-webkit-overflow-scrolling:touch;box-sizing:border-box;text-align:center;}.position.__jsx-style-dynamic-selector{position:relative;z-index:1001;outline:none;max-width:90%;width:".concat(width, ";margin:20px auto;vertical-align:middle;display:inline-block;}.backdrop.__jsx-style-dynamic-selector:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:'';}.layer.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;opacity:").concat(theme.expressiveness.portalOpacity, ";background-color:black;-webkit-transition:opacity 0.35s cubic-bezier(0.4,0,0.2,1);transition:opacity 0.35s cubic-bezier(0.4,0,0.2,1);pointer-events:none;z-index:1000;}.backdrop-wrapper-enter.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:0;}.backdrop-wrapper-enter-active.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:").concat(theme.expressiveness.portalOpacity, ";}.backdrop-wrapper-leave.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:").concat(theme.expressiveness.portalOpacity, ";}.backdrop-wrapper-leave-active.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:0;}"))));
2815
+ });
2816
+ Backdrop.displayName = 'Backdrop';
2817
+
2818
+ dist.Backdrop = Backdrop;
2819
+ dist.CssBaseline = MemoCssBaseline;
2820
+ dist.CssTransition = CssTransition;
2821
+ dist.Dropdown = Dropdown;
2822
+ dist.Ellipsis = ellipsis;
2823
+ dist.Expand = Expand;
2824
+ dist.Highlight = Highlight;
2825
+ dist.Themes = Themes;
2826
+ dist.UiProvider = HuiProvider;
2827
+ dist.useAllThemes = useAllThemes;
2828
+ dist.useClasses = useClasses;
2829
+ dist.useCurrentState = useCurrentState;
2830
+ dist.useMediaQuery = useMediaQuery;
2831
+ dist.useRect = useRect;
2832
+ dist.useTheme = useTheme;
2833
+ dist.useToasts = useToasts;
2834
+ return dist;
2835
+ }
2836
+
2837
+ var distExports = /*@__PURE__*/ requireDist();
976
2838
 
977
2839
  var getStyles = function getStyles(type, palette, isShadow) {
978
2840
  var colors = {
@@ -1147,7 +3009,7 @@ var withScale = function withScale(Render) {
1147
3009
  var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
1148
3010
  var children = _ref.children,
1149
3011
  props = _objectWithoutProperties(_ref, _excluded$7);
1150
- var _useTheme = useTheme(),
3012
+ var _useTheme = distExports.useTheme(),
1151
3013
  layout = _useTheme.layout;
1152
3014
  var paddingLeft = props.paddingLeft,
1153
3015
  pl = props.pl,
@@ -1229,39 +3091,6 @@ var withScale = function withScale(Render) {
1229
3091
  return ScaleFC;
1230
3092
  };
1231
3093
 
1232
- /* "use client" */
1233
-
1234
- var classObjectToString = function classObjectToString(className) {
1235
- var keys = Object.keys(className);
1236
- var len = keys.length;
1237
- var str = '';
1238
- for (var index = 0; index < len; index++) {
1239
- var key = keys[index];
1240
- var val = className[keys[index]];
1241
- if (!val) continue;
1242
- str = str ? "".concat(str, " ").concat(String(key)) : String(key);
1243
- }
1244
- return str;
1245
- };
1246
- var isObjectClassName = function isObjectClassName(value) {
1247
- return _typeof(value) === 'object' && !Array.isArray(value);
1248
- };
1249
- var useClasses = function useClasses() {
1250
- var len = arguments.length;
1251
- var classes = '';
1252
- if (len === 0) return classes;
1253
- for (var index = 0; index < len; index++) {
1254
- var val = index < 0 || arguments.length <= index ? undefined : arguments[index];
1255
- if (!val) continue;
1256
- if (isObjectClassName(val)) {
1257
- classes += " ".concat(classObjectToString(val));
1258
- } else {
1259
- classes += " ".concat(String(val).trim());
1260
- }
1261
- }
1262
- return classes.trim();
1263
- };
1264
-
1265
3094
  var _excluded$6 = ["children", "className", "disableAutoMargin"];
1266
3095
  var CardFooterComponent = function CardFooterComponent(_ref) {
1267
3096
  var children = _ref.children,
@@ -1270,10 +3099,10 @@ var CardFooterComponent = function CardFooterComponent(_ref) {
1270
3099
  _ref$disableAutoMargi = _ref.disableAutoMargin,
1271
3100
  disableAutoMargin = _ref$disableAutoMargi === void 0 ? false : _ref$disableAutoMargi,
1272
3101
  props = _objectWithoutProperties(_ref, _excluded$6);
1273
- var theme = useTheme();
3102
+ var theme = distExports.useTheme();
1274
3103
  var _useScale = useScale(),
1275
3104
  SCALES = _useScale.SCALES;
1276
- var classes = useClasses({
3105
+ var classes = distExports.useClasses({
1277
3106
  'auto-margin': !disableAutoMargin
1278
3107
  }, className);
1279
3108
  return /*#__PURE__*/React.createElement("footer", _extends({}, props, {
@@ -1295,7 +3124,7 @@ var CardContentComponent = function CardContentComponent(_ref) {
1295
3124
  var _useScale = useScale(),
1296
3125
  SCALES = _useScale.SCALES;
1297
3126
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
1298
- className: _JSXStyle.dynamic([["490544004", [SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(1), SCALES.pr(1), SCALES.pb(1), SCALES.pl(1), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]) + " " + (props && props.className != null && props.className || useClasses('content', className) || "")
3127
+ className: _JSXStyle.dynamic([["490544004", [SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(1), SCALES.pr(1), SCALES.pb(1), SCALES.pl(1), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]]) + " " + (props && props.className != null && props.className || distExports.useClasses('content', className) || "")
1299
3128
  }), children, /*#__PURE__*/React.createElement(_JSXStyle, {
1300
3129
  id: "490544004",
1301
3130
  dynamic: [SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(1), SCALES.pr(1), SCALES.pb(1), SCALES.pl(1), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]
@@ -1309,7 +3138,7 @@ var ImageSkeleton = /*#__PURE__*/React.memo(function (_ref) {
1309
3138
  var _ref$opacity = _ref.opacity,
1310
3139
  opacity = _ref$opacity === void 0 ? 0.5 : _ref$opacity,
1311
3140
  props = _objectWithoutProperties(_ref, _excluded$4);
1312
- var theme = useTheme();
3141
+ var theme = distExports.useTheme();
1313
3142
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
1314
3143
  className: _JSXStyle.dynamic([["2946022605", [theme.palette.accents_1, theme.palette.accents_2, theme.palette.accents_2, theme.palette.accents_1, opacity]]]) + " " + (props && props.className != null && props.className || "skeleton")
1315
3144
  }), /*#__PURE__*/React.createElement(_JSXStyle, {
@@ -1350,7 +3179,7 @@ var ImageComponent = function ImageComponent(_ref) {
1350
3179
  var width = getScaleProps(['width', 'w']);
1351
3180
  var height = getScaleProps(['height', 'h']);
1352
3181
  var showAnimation = !disableSkeleton && width && height;
1353
- var theme = useTheme();
3182
+ var theme = distExports.useTheme();
1354
3183
  var _useState = React.useState(true),
1355
3184
  _useState2 = _slicedToArray(_useState, 2),
1356
3185
  loading = _useState2[0],
@@ -1387,7 +3216,7 @@ var ImageComponent = function ImageComponent(_ref) {
1387
3216
  };
1388
3217
  }, [loading]);
1389
3218
  return /*#__PURE__*/React.createElement("div", {
1390
- className: _JSXStyle.dynamic([["4175752462", [theme.layout.radius, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.width(1, 'auto'), SCALES.height(1, 'auto')]]]) + " " + (useClasses('image', className) || "")
3219
+ className: _JSXStyle.dynamic([["4175752462", [theme.layout.radius, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.width(1, 'auto'), SCALES.height(1, 'auto')]]]) + " " + (distExports.useClasses('image', className) || "")
1391
3220
  }, showSkeleton && showAnimation && /*#__PURE__*/React.createElement(ImageSkeleton, {
1392
3221
  opacity: loading ? 0.5 : 0
1393
3222
  }), /*#__PURE__*/React.createElement("img", _extends({
@@ -1483,13 +3312,13 @@ var LinkComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1483
3312
  _ref$icon = _ref.icon,
1484
3313
  icon = _ref$icon === void 0 ? false : _ref$icon,
1485
3314
  props = _objectWithoutProperties(_ref, _excluded$2);
1486
- var theme = useTheme();
3315
+ var theme = distExports.useTheme();
1487
3316
  var _useScale = useScale(),
1488
3317
  SCALES = _useScale.SCALES;
1489
3318
  var linkColor = showColor || block ? theme.palette.link : 'inherit';
1490
3319
  var hoverColor = showColor || block ? theme.palette.successLight : 'inherit';
1491
3320
  var decoration = underline ? 'underline' : 'none';
1492
- var classes = useClasses('link', {
3321
+ var classes = distExports.useClasses('link', {
1493
3322
  block: block
1494
3323
  }, className);
1495
3324
  return /*#__PURE__*/React.createElement("a", _extends({
@@ -1576,7 +3405,7 @@ var ImageBrowserComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1576
3405
  _ref$className = _ref.className,
1577
3406
  className = _ref$className === void 0 ? '' : _ref$className,
1578
3407
  props = _objectWithoutProperties(_ref, _excluded$1);
1579
- var theme = useTheme();
3408
+ var theme = distExports.useTheme();
1580
3409
  var _useScale = useScale(),
1581
3410
  SCALES = _useScale.SCALES;
1582
3411
  var colors = React.useMemo(function () {
@@ -1590,7 +3419,7 @@ var ImageBrowserComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1590
3419
  return /*#__PURE__*/React.createElement("div", _extends({
1591
3420
  ref: ref
1592
3421
  }, props, {
1593
- className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]]) + " " + (props && props.className != null && props.className || useClasses('browser', className) || "")
3422
+ className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]]) + " " + (props && props.className != null && props.className || distExports.useClasses('browser', className) || "")
1594
3423
  }), /*#__PURE__*/React.createElement("header", {
1595
3424
  className: _JSXStyle.dynamic([["1856409351", [theme.expressiveness.shadowLarge, theme.layout.radius, SCALES.font(1), SCALES.width(1, 'max-content'), SCALES.height(1, 'auto'), SCALES.mt(0), SCALES.mr(0, 'auto'), SCALES.mb(0), SCALES.ml(0, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), colors.color, colors.barBgColor, colors.borderColor, theme.layout.gapHalf]]])
1596
3425
  }, /*#__PURE__*/React.createElement("div", {
@@ -1623,7 +3452,7 @@ var CardComponent = function CardComponent(_ref) {
1623
3452
  _ref$type = _ref.type,
1624
3453
  type = _ref$type === void 0 ? 'default' : _ref$type,
1625
3454
  props = _objectWithoutProperties(_ref, _excluded);
1626
- var theme = useTheme();
3455
+ var theme = distExports.useTheme();
1627
3456
  var _useScale = useScale(),
1628
3457
  SCALES = _useScale.SCALES;
1629
3458
  var hoverShadow = React.useMemo(function () {
@@ -1646,7 +3475,7 @@ var CardComponent = function CardComponent(_ref) {
1646
3475
  imageChildren = _pickChild4[1];
1647
3476
  var hasContent = hasChild(withoutImageChildren, CardContent);
1648
3477
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
1649
- className: _JSXStyle.dynamic([["4234389955", [theme.palette.background, theme.layout.radius, shadow ? theme.expressiveness.shadowSmall : 'none', color, bgColor, borderColor, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverShadow]]]) + " " + (props && props.className != null && props.className || useClasses('card', className) || "")
3478
+ className: _JSXStyle.dynamic([["4234389955", [theme.palette.background, theme.layout.radius, shadow ? theme.expressiveness.shadowSmall : 'none', color, bgColor, borderColor, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverShadow]]]) + " " + (props && props.className != null && props.className || distExports.useClasses('card', className) || "")
1650
3479
  }), imageChildren, hasContent ? withoutImageChildren : /*#__PURE__*/React.createElement(CardContent, null, withoutImageChildren), footerChildren, /*#__PURE__*/React.createElement(_JSXStyle, {
1651
3480
  id: "4234389955",
1652
3481
  dynamic: [theme.palette.background, theme.layout.radius, shadow ? theme.expressiveness.shadowSmall : 'none', color, bgColor, borderColor, SCALES.width(1, 'auto'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), hoverShadow]