@helpdice/ui 1.7.5 → 1.7.7

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