@sisense/sdk-shared-ui 2.7.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/{Breadcrumbs-B-OHBus7.cjs → Breadcrumbs-BPFGyMFx.cjs} +3 -3
  2. package/dist/{Breadcrumbs-DrCp8avo.js → Breadcrumbs-Dx05v0v1.js} +17 -17
  3. package/dist/{Button-cvim-8Bz.js → Button-Ok4u9SDv.js} +4 -4
  4. package/dist/{Button-CvkAcTyS.cjs → Button-SdsF1IuR.cjs} +1 -1
  5. package/dist/{ButtonBase-4TqAVSBf.js → ButtonBase-BFKx2I1_.js} +3 -3
  6. package/dist/{ButtonBase-hZEG-21k.cjs → ButtonBase-_pI6xEeE.cjs} +1 -1
  7. package/dist/{Checkbox-BbF4jutm.cjs → Checkbox-BsNYaD1B.cjs} +1 -1
  8. package/dist/{Checkbox-aMi60WQj.js → Checkbox-DZEeQIus.js} +7 -7
  9. package/dist/{CircularProgress-B3FkrcM6.js → CircularProgress-BDTuj27S.js} +3 -3
  10. package/dist/{CircularProgress-BWqRJiR-.cjs → CircularProgress-BW3Hjcp9.cjs} +1 -1
  11. package/dist/{DEPRECATED_Button-CKGdJitl.cjs → DEPRECATED_Button-CIjcOy2c.cjs} +1 -1
  12. package/dist/{DEPRECATED_Button-Dhs0ieAl.js → DEPRECATED_Button-D4Ej5Vhs.js} +1 -1
  13. package/dist/{Dropdown-B6uSaA3z.cjs → Dropdown-C-gB9fcP.cjs} +1 -1
  14. package/dist/{Dropdown-BzcjbX6k.js → Dropdown-DHawmEpj.js} +1 -1
  15. package/dist/{Icon-DVO7Byvy.js → Icon-CJxir64u.js} +2 -2
  16. package/dist/{Icon-DFhY5sRf.cjs → Icon-MnCGEEQV.cjs} +1 -1
  17. package/dist/Menu-1NGOC2wt.cjs +1 -0
  18. package/dist/Menu-B79T1mdd.js +902 -0
  19. package/dist/{Portal-C6RJkJ6n.js → Portal-CuOEoTV6.js} +4 -4
  20. package/dist/{Portal-B6TDsfBi.cjs → Portal-DjzIwZc4.cjs} +1 -1
  21. package/dist/{SvgIcon-a_07YA77.js → SvgIcon-Cx2GHl0w.js} +2 -2
  22. package/dist/{SvgIcon-CjUZ_jwt.cjs → SvgIcon-DOhrb2-I.cjs} +1 -1
  23. package/dist/{TablePagination-CNwjJIdB.cjs → TablePagination-B9mPoc_j.cjs} +12 -12
  24. package/dist/{TablePagination-D4-bcrO_.js → TablePagination-DVbTwUqR.js} +26 -26
  25. package/dist/{Tooltip-BjyR1mIC.cjs → Tooltip-CvpZynmo.cjs} +1 -1
  26. package/dist/{Tooltip-CWF5y-3F.js → Tooltip-DNpXhTeO.js} +77 -77
  27. package/dist/{TransitionGroupContext-BNiEy2cD.js → TransitionGroupContext-ChvHFIH-.js} +2 -2
  28. package/dist/{TransitionGroupContext-CJJeIdck.cjs → TransitionGroupContext-gYEZneWE.cjs} +1 -1
  29. package/dist/{Typography-ReSKaH87.js → Typography-BzL8bBVw.js} +5 -5
  30. package/dist/{Typography-Pieq_mxw.cjs → Typography-DpSJrSkJ.cjs} +1 -1
  31. package/dist/{createSvgIcon-CiRZfwSO.js → createSvgIcon-BICIYW9O.js} +1 -1
  32. package/dist/{createSvgIcon-DgE0zN0k.cjs → createSvgIcon-CNsKzZej.cjs} +1 -1
  33. package/dist/emotion-cache-provider-BA0VP8z6.cjs +108 -0
  34. package/dist/{emotion-cache-provider-B6yKtm_a.js → emotion-cache-provider-CbsuuMnH.js} +1588 -1755
  35. package/dist/{lightweight/index-D0lMis-I.js → index-B2g_Xs_b.js} +138 -140
  36. package/dist/index-CHH7nhRo.cjs +20 -0
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +10 -10
  39. package/dist/index.umd.js +41 -41
  40. package/dist/integerPropType-Ched4o4e.cjs +1 -0
  41. package/dist/integerPropType-D-nm5Xmm.js +31 -0
  42. package/dist/lib/Breadcrumbs/Breadcrumbs.cjs +1 -1
  43. package/dist/lib/Breadcrumbs/Breadcrumbs.js +2 -2
  44. package/dist/lib/Button/Button.cjs +1 -1
  45. package/dist/lib/Button/Button.js +2 -2
  46. package/dist/lib/Checkbox/Checkbox.cjs +1 -1
  47. package/dist/lib/Checkbox/Checkbox.js +1 -1
  48. package/dist/lib/DEPRECATED_Button/DEPRECATED_Button.cjs +1 -1
  49. package/dist/lib/DEPRECATED_Button/DEPRECATED_Button.js +1 -1
  50. package/dist/lib/DEPRECATED_Tooltip/DEPRECATED_Tooltip.d.ts.map +1 -1
  51. package/dist/lib/Dropdown/Dropdown.cjs +1 -1
  52. package/dist/lib/Dropdown/Dropdown.d.ts +1 -2
  53. package/dist/lib/Dropdown/Dropdown.d.ts.map +1 -1
  54. package/dist/lib/Dropdown/Dropdown.js +1 -1
  55. package/dist/lib/Icon/Icon.cjs +1 -1
  56. package/dist/lib/Icon/Icon.js +1 -1
  57. package/dist/lib/Input/Input.d.ts.map +1 -1
  58. package/dist/lib/LazyLoader/LazyLoader.d.ts.map +1 -1
  59. package/dist/lib/Menu/Menu.cjs +1 -1
  60. package/dist/lib/Menu/Menu.d.ts +6 -1
  61. package/dist/lib/Menu/Menu.d.ts.map +1 -1
  62. package/dist/lib/Menu/Menu.js +2 -2
  63. package/dist/lib/Popover/Popover.d.ts.map +1 -1
  64. package/dist/lib/TablePagination/TablePagination.cjs +1 -1
  65. package/dist/lib/TablePagination/TablePagination.js +1 -1
  66. package/dist/lib/Tooltip/Tooltip.cjs +1 -1
  67. package/dist/lib/Tooltip/Tooltip.js +2 -2
  68. package/dist/lib/Typography/Typography.cjs +1 -1
  69. package/dist/lib/Typography/Typography.js +2 -2
  70. package/dist/lib/themes/themes.cjs +1 -1
  71. package/dist/lib/themes/themes.js +1 -1
  72. package/dist/lightweight/DEPRECATED_Button-CJkh2swh.js +746 -0
  73. package/dist/lightweight/DEPRECATED_Button-CTtEqID4.cjs +20 -0
  74. package/dist/lightweight/{Dropdown-B6uSaA3z.cjs → Dropdown-C-gB9fcP.cjs} +1 -1
  75. package/dist/lightweight/{Dropdown-C5DcG6WG.js → Dropdown-DtISatbx.js} +1 -1
  76. package/dist/lightweight/Menu-1NGOC2wt.cjs +1 -0
  77. package/dist/lightweight/Menu-dqrqcZgC.js +902 -0
  78. package/dist/lightweight/index.cjs +1 -1
  79. package/dist/lightweight/index.js +3 -3
  80. package/dist/lightweight/lib/DEPRECATED_Button/DEPRECATED_Button.cjs +1 -1
  81. package/dist/lightweight/lib/DEPRECATED_Button/DEPRECATED_Button.js +1 -1
  82. package/dist/lightweight/lib/DEPRECATED_Tooltip/DEPRECATED_Tooltip.d.ts.map +1 -1
  83. package/dist/lightweight/lib/Dropdown/Dropdown.cjs +1 -1
  84. package/dist/lightweight/lib/Dropdown/Dropdown.d.ts +1 -2
  85. package/dist/lightweight/lib/Dropdown/Dropdown.d.ts.map +1 -1
  86. package/dist/lightweight/lib/Dropdown/Dropdown.js +1 -1
  87. package/dist/lightweight/lib/Input/Input.d.ts.map +1 -1
  88. package/dist/lightweight/lib/LazyLoader/LazyLoader.d.ts.map +1 -1
  89. package/dist/lightweight/lib/Menu/Menu.cjs +1 -1
  90. package/dist/lightweight/lib/Menu/Menu.d.ts +6 -1
  91. package/dist/lightweight/lib/Menu/Menu.d.ts.map +1 -1
  92. package/dist/lightweight/lib/Menu/Menu.js +2 -2
  93. package/dist/lightweight/lib/Popover/Popover.d.ts.map +1 -1
  94. package/dist/lightweight/lib/themes/themes.cjs +1 -1
  95. package/dist/lightweight/lib/themes/themes.js +1 -1
  96. package/dist/lightweight/package.json +9 -10
  97. package/dist/package.json +9 -10
  98. package/dist/{resolveComponentProps-BjHOskdg.cjs → resolveComponentProps-C1BCvUav.cjs} +1 -1
  99. package/dist/{resolveComponentProps-L5VTqIs8.js → resolveComponentProps-CVKbaofP.js} +1 -1
  100. package/dist/{useFormControl-DNim9J_T.cjs → useFormControl-CisPyzzB.cjs} +1 -1
  101. package/dist/{useFormControl-lYrMmqEx.js → useFormControl-ngVvjZV5.js} +1 -1
  102. package/dist/{useSlot-BHK4fbKV.cjs → useSlot-CIx66mhH.cjs} +1 -1
  103. package/dist/{useSlot-DUGuD2Ya.js → useSlot-V_VuJk__.js} +2 -2
  104. package/dist/{useSlotProps-ChaoOi-_.cjs → useSlotProps-CNjMh886.cjs} +1 -1
  105. package/dist/{useSlotProps-9rt1So3E.js → useSlotProps-Cvkx05GZ.js} +2 -2
  106. package/dist/{useTheme-DPwUUXTG.js → useTheme-D8nF1njr.js} +1 -1
  107. package/dist/{useTheme-Dn8Us9iT.cjs → useTheme-zwxXljhI.cjs} +1 -1
  108. package/package.json +9 -10
  109. package/dist/Menu-CgLII61r.cjs +0 -1
  110. package/dist/Menu-DqvdoiKn.js +0 -1211
  111. package/dist/emotion-cache-provider-XZE1SDsY.cjs +0 -122
  112. package/dist/index-B-zZeebW.cjs +0 -20
  113. package/dist/index-D0lMis-I.js +0 -667
  114. package/dist/integerPropType-B8hl-7D0.js +0 -180
  115. package/dist/integerPropType-BGlNA6vX.cjs +0 -17
  116. package/dist/lightweight/DEPRECATED_Button-CKGdJitl.cjs +0 -1
  117. package/dist/lightweight/DEPRECATED_Button-Dhs0ieAl.js +0 -87
  118. package/dist/lightweight/Menu-CgLII61r.cjs +0 -1
  119. package/dist/lightweight/Menu-DeHgR0JO.js +0 -1211
  120. package/dist/lightweight/index-B-zZeebW.cjs +0 -20
@@ -0,0 +1,902 @@
1
+ import { jsxs as W, jsx as f } from "react/jsx-runtime";
2
+ import x from "classnames";
3
+ import * as g from "react";
4
+ import { Component as le } from "react";
5
+ import { L as ge } from "./LazyLoader-DB86QSSx.js";
6
+ import { P as $ } from "./Popover-BAehEo3a.js";
7
+ import { s as P } from "./styleguideConstants-D4Yls16w.js";
8
+ import { D as be } from "./DEPRECATED_Checkbox-Be1l_Vce.js";
9
+ import { D as H } from "./DEPRECATED_Icon-Bgufd-9Q.js";
10
+ import { D as ye } from "./DEPRECATED_Toggle-DMnlQO3F.js";
11
+ import { D as _e } from "./DEPRECATED_Tooltip-C3s_235Q.js";
12
+ import { R as Ee } from "./RadioButton-BpAksn2s.js";
13
+ function X(s) {
14
+ var i = typeof s;
15
+ return s != null && (i == "object" || i == "function");
16
+ }
17
+ var Se = typeof global == "object" && global && global.Object === Object && global, xe = typeof self == "object" && self && self.Object === Object && self, ae = Se || xe || Function("return this")(), G = function() {
18
+ return ae.Date.now();
19
+ }, Oe = /\s/;
20
+ function Ce(s) {
21
+ for (var i = s.length; i-- && Oe.test(s.charAt(i)); )
22
+ ;
23
+ return i;
24
+ }
25
+ var Me = /^\s+/;
26
+ function we(s) {
27
+ return s && s.slice(0, Ce(s) + 1).replace(Me, "");
28
+ }
29
+ var Y = ae.Symbol, ce = Object.prototype, Ne = ce.hasOwnProperty, ke = ce.toString, L = Y ? Y.toStringTag : void 0;
30
+ function Te(s) {
31
+ var i = Ne.call(s, L), t = s[L];
32
+ try {
33
+ s[L] = void 0;
34
+ var e = !0;
35
+ } catch {
36
+ }
37
+ var r = ke.call(s);
38
+ return e && (i ? s[L] = t : delete s[L]), r;
39
+ }
40
+ var Ae = Object.prototype, We = Ae.toString;
41
+ function Ie(s) {
42
+ return We.call(s);
43
+ }
44
+ var ze = "[object Null]", Re = "[object Undefined]", ee = Y ? Y.toStringTag : void 0;
45
+ function Le(s) {
46
+ return s == null ? s === void 0 ? Re : ze : ee && ee in Object(s) ? Te(s) : Ie(s);
47
+ }
48
+ function De(s) {
49
+ return s != null && typeof s == "object";
50
+ }
51
+ var Pe = "[object Symbol]";
52
+ function Be(s) {
53
+ return typeof s == "symbol" || De(s) && Le(s) == Pe;
54
+ }
55
+ var te = NaN, He = /^[-+]0x[0-9a-f]+$/i, je = /^0b[01]+$/i, Ve = /^0o[0-7]+$/i, Xe = parseInt;
56
+ function ie(s) {
57
+ if (typeof s == "number")
58
+ return s;
59
+ if (Be(s))
60
+ return te;
61
+ if (X(s)) {
62
+ var i = typeof s.valueOf == "function" ? s.valueOf() : s;
63
+ s = X(i) ? i + "" : i;
64
+ }
65
+ if (typeof s != "string")
66
+ return s === 0 ? s : +s;
67
+ s = we(s);
68
+ var t = je.test(s);
69
+ return t || Ve.test(s) ? Xe(s.slice(2), t ? 2 : 8) : He.test(s) ? te : +s;
70
+ }
71
+ var Ye = "Expected a function", qe = Math.max, Fe = Math.min;
72
+ function V(s, i, t) {
73
+ var e, r, o, n, l, h, u = 0, m = !1, c = !1, d = !0;
74
+ if (typeof s != "function")
75
+ throw new TypeError(Ye);
76
+ i = ie(i) || 0, X(t) && (m = !!t.leading, c = "maxWait" in t, o = c ? qe(ie(t.maxWait) || 0, i) : o, d = "trailing" in t ? !!t.trailing : d);
77
+ function a(p) {
78
+ var O = e, C = r;
79
+ return e = r = void 0, u = p, n = s.apply(C, O), n;
80
+ }
81
+ function b(p) {
82
+ return u = p, l = setTimeout(S, i), m ? a(p) : n;
83
+ }
84
+ function y(p) {
85
+ var O = p - h, C = p - u, K = i - O;
86
+ return c ? Fe(K, o - C) : K;
87
+ }
88
+ function M(p) {
89
+ var O = p - h, C = p - u;
90
+ return h === void 0 || O >= i || O < 0 || c && C >= o;
91
+ }
92
+ function S() {
93
+ var p = G();
94
+ if (M(p))
95
+ return w(p);
96
+ l = setTimeout(S, y(p));
97
+ }
98
+ function w(p) {
99
+ return l = void 0, d && e ? a(p) : (e = r = void 0, n);
100
+ }
101
+ function B() {
102
+ l !== void 0 && clearTimeout(l), u = 0, e = h = r = l = void 0;
103
+ }
104
+ function F() {
105
+ return l === void 0 ? n : w(G());
106
+ }
107
+ function R() {
108
+ var p = G(), O = M(p);
109
+ if (e = arguments, r = this, h = p, O) {
110
+ if (l === void 0)
111
+ return b(h);
112
+ if (c)
113
+ return clearTimeout(l), l = setTimeout(S, i), a(h);
114
+ }
115
+ return l === void 0 && (l = setTimeout(S, i)), n;
116
+ }
117
+ return R.cancel = B, R.flush = F, R;
118
+ }
119
+ var $e = "Expected a function";
120
+ function Ge(s, i, t) {
121
+ var e = !0, r = !0;
122
+ if (typeof s != "function")
123
+ throw new TypeError($e);
124
+ return X(t) && (e = "leading" in t ? !!t.leading : e, r = "trailing" in t ? !!t.trailing : r), V(s, i, {
125
+ leading: e,
126
+ maxWait: i,
127
+ trailing: r
128
+ });
129
+ }
130
+ var z = function() {
131
+ return z = Object.assign || function(i) {
132
+ for (var t, e = 1, r = arguments.length; e < r; e++) {
133
+ t = arguments[e];
134
+ for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (i[o] = t[o]);
135
+ }
136
+ return i;
137
+ }, z.apply(this, arguments);
138
+ };
139
+ function ue(s) {
140
+ return !s || !s.ownerDocument || !s.ownerDocument.defaultView ? window : s.ownerDocument.defaultView;
141
+ }
142
+ function he(s) {
143
+ return !s || !s.ownerDocument ? document : s.ownerDocument;
144
+ }
145
+ var de = function(s) {
146
+ var i = {}, t = Array.prototype.reduce.call(s, function(e, r) {
147
+ var o = r.name.match(/data-simplebar-(.+)/);
148
+ if (o) {
149
+ var n = o[1].replace(/\W+(.)/g, function(l, h) {
150
+ return h.toUpperCase();
151
+ });
152
+ switch (r.value) {
153
+ case "true":
154
+ e[n] = !0;
155
+ break;
156
+ case "false":
157
+ e[n] = !1;
158
+ break;
159
+ case void 0:
160
+ e[n] = !0;
161
+ break;
162
+ default:
163
+ e[n] = r.value;
164
+ }
165
+ }
166
+ return e;
167
+ }, i);
168
+ return t;
169
+ };
170
+ function fe(s, i) {
171
+ var t;
172
+ s && (t = s.classList).add.apply(t, i.split(" "));
173
+ }
174
+ function pe(s, i) {
175
+ s && i.split(" ").forEach(function(t) {
176
+ s.classList.remove(t);
177
+ });
178
+ }
179
+ function me(s) {
180
+ return ".".concat(s.split(" ").join("."));
181
+ }
182
+ var Z = !!(typeof window < "u" && window.document && window.document.createElement), Ue = /* @__PURE__ */ Object.freeze({
183
+ __proto__: null,
184
+ addClasses: fe,
185
+ canUseDOM: Z,
186
+ classNamesToQuery: me,
187
+ getElementDocument: he,
188
+ getElementWindow: ue,
189
+ getOptions: de,
190
+ removeClasses: pe
191
+ }), I = null, se = null;
192
+ Z && window.addEventListener("resize", function() {
193
+ se !== window.devicePixelRatio && (se = window.devicePixelRatio, I = null);
194
+ });
195
+ function re() {
196
+ if (I === null) {
197
+ if (typeof document > "u")
198
+ return I = 0, I;
199
+ var s = document.body, i = document.createElement("div");
200
+ i.classList.add("simplebar-hide-scrollbar"), s.appendChild(i);
201
+ var t = i.getBoundingClientRect().right;
202
+ s.removeChild(i), I = t;
203
+ }
204
+ return I;
205
+ }
206
+ var N = ue, U = he, Qe = de, k = fe, T = pe, _ = me, D = (
207
+ /** @class */
208
+ function() {
209
+ function s(i, t) {
210
+ t === void 0 && (t = {});
211
+ var e = this;
212
+ if (this.removePreventClickId = null, this.minScrollbarWidth = 20, this.stopScrollDelay = 175, this.isScrolling = !1, this.isMouseEntering = !1, this.isDragging = !1, this.scrollXTicking = !1, this.scrollYTicking = !1, this.wrapperEl = null, this.contentWrapperEl = null, this.contentEl = null, this.offsetEl = null, this.maskEl = null, this.placeholderEl = null, this.heightAutoObserverWrapperEl = null, this.heightAutoObserverEl = null, this.rtlHelpers = null, this.scrollbarWidth = 0, this.resizeObserver = null, this.mutationObserver = null, this.elStyles = null, this.isRtl = null, this.mouseX = 0, this.mouseY = 0, this.onMouseMove = function() {
213
+ }, this.onWindowResize = function() {
214
+ }, this.onStopScrolling = function() {
215
+ }, this.onMouseEntered = function() {
216
+ }, this.onScroll = function() {
217
+ var r = N(e.el);
218
+ e.scrollXTicking || (r.requestAnimationFrame(e.scrollX), e.scrollXTicking = !0), e.scrollYTicking || (r.requestAnimationFrame(e.scrollY), e.scrollYTicking = !0), e.isScrolling || (e.isScrolling = !0, k(e.el, e.classNames.scrolling)), e.showScrollbar("x"), e.showScrollbar("y"), e.onStopScrolling();
219
+ }, this.scrollX = function() {
220
+ e.axis.x.isOverflowing && e.positionScrollbar("x"), e.scrollXTicking = !1;
221
+ }, this.scrollY = function() {
222
+ e.axis.y.isOverflowing && e.positionScrollbar("y"), e.scrollYTicking = !1;
223
+ }, this._onStopScrolling = function() {
224
+ T(e.el, e.classNames.scrolling), e.options.autoHide && (e.hideScrollbar("x"), e.hideScrollbar("y")), e.isScrolling = !1;
225
+ }, this.onMouseEnter = function() {
226
+ e.isMouseEntering || (k(e.el, e.classNames.mouseEntered), e.showScrollbar("x"), e.showScrollbar("y"), e.isMouseEntering = !0), e.onMouseEntered();
227
+ }, this._onMouseEntered = function() {
228
+ T(e.el, e.classNames.mouseEntered), e.options.autoHide && (e.hideScrollbar("x"), e.hideScrollbar("y")), e.isMouseEntering = !1;
229
+ }, this._onMouseMove = function(r) {
230
+ e.mouseX = r.clientX, e.mouseY = r.clientY, (e.axis.x.isOverflowing || e.axis.x.forceVisible) && e.onMouseMoveForAxis("x"), (e.axis.y.isOverflowing || e.axis.y.forceVisible) && e.onMouseMoveForAxis("y");
231
+ }, this.onMouseLeave = function() {
232
+ e.onMouseMove.cancel(), (e.axis.x.isOverflowing || e.axis.x.forceVisible) && e.onMouseLeaveForAxis("x"), (e.axis.y.isOverflowing || e.axis.y.forceVisible) && e.onMouseLeaveForAxis("y"), e.mouseX = -1, e.mouseY = -1;
233
+ }, this._onWindowResize = function() {
234
+ e.scrollbarWidth = e.getScrollbarWidth(), e.hideNativeScrollbar();
235
+ }, this.onPointerEvent = function(r) {
236
+ if (!(!e.axis.x.track.el || !e.axis.y.track.el || !e.axis.x.scrollbar.el || !e.axis.y.scrollbar.el)) {
237
+ var o, n;
238
+ e.axis.x.track.rect = e.axis.x.track.el.getBoundingClientRect(), e.axis.y.track.rect = e.axis.y.track.el.getBoundingClientRect(), (e.axis.x.isOverflowing || e.axis.x.forceVisible) && (o = e.isWithinBounds(e.axis.x.track.rect)), (e.axis.y.isOverflowing || e.axis.y.forceVisible) && (n = e.isWithinBounds(e.axis.y.track.rect)), (o || n) && (r.stopPropagation(), r.type === "pointerdown" && r.pointerType !== "touch" && (o && (e.axis.x.scrollbar.rect = e.axis.x.scrollbar.el.getBoundingClientRect(), e.isWithinBounds(e.axis.x.scrollbar.rect) ? e.onDragStart(r, "x") : e.onTrackClick(r, "x")), n && (e.axis.y.scrollbar.rect = e.axis.y.scrollbar.el.getBoundingClientRect(), e.isWithinBounds(e.axis.y.scrollbar.rect) ? e.onDragStart(r, "y") : e.onTrackClick(r, "y"))));
239
+ }
240
+ }, this.drag = function(r) {
241
+ var o, n, l, h, u, m, c, d, a, b, y;
242
+ if (!(!e.draggedAxis || !e.contentWrapperEl)) {
243
+ var M, S = e.axis[e.draggedAxis].track, w = (n = (o = S.rect) === null || o === void 0 ? void 0 : o[e.axis[e.draggedAxis].sizeAttr]) !== null && n !== void 0 ? n : 0, B = e.axis[e.draggedAxis].scrollbar, F = (h = (l = e.contentWrapperEl) === null || l === void 0 ? void 0 : l[e.axis[e.draggedAxis].scrollSizeAttr]) !== null && h !== void 0 ? h : 0, R = parseInt((m = (u = e.elStyles) === null || u === void 0 ? void 0 : u[e.axis[e.draggedAxis].sizeAttr]) !== null && m !== void 0 ? m : "0px", 10);
244
+ r.preventDefault(), r.stopPropagation(), e.draggedAxis === "y" ? M = r.pageY : M = r.pageX;
245
+ var p = M - ((d = (c = S.rect) === null || c === void 0 ? void 0 : c[e.axis[e.draggedAxis].offsetAttr]) !== null && d !== void 0 ? d : 0) - e.axis[e.draggedAxis].dragOffset;
246
+ p = e.draggedAxis === "x" && e.isRtl ? ((b = (a = S.rect) === null || a === void 0 ? void 0 : a[e.axis[e.draggedAxis].sizeAttr]) !== null && b !== void 0 ? b : 0) - B.size - p : p;
247
+ var O = p / (w - B.size), C = O * (F - R);
248
+ e.draggedAxis === "x" && e.isRtl && (C = !((y = s.getRtlHelpers()) === null || y === void 0) && y.isScrollingToNegative ? -C : C), e.contentWrapperEl[e.axis[e.draggedAxis].scrollOffsetAttr] = C;
249
+ }
250
+ }, this.onEndDrag = function(r) {
251
+ e.isDragging = !1;
252
+ var o = U(e.el), n = N(e.el);
253
+ r.preventDefault(), r.stopPropagation(), T(e.el, e.classNames.dragging), e.onStopScrolling(), o.removeEventListener("mousemove", e.drag, !0), o.removeEventListener("mouseup", e.onEndDrag, !0), e.removePreventClickId = n.setTimeout(function() {
254
+ o.removeEventListener("click", e.preventClick, !0), o.removeEventListener("dblclick", e.preventClick, !0), e.removePreventClickId = null;
255
+ });
256
+ }, this.preventClick = function(r) {
257
+ r.preventDefault(), r.stopPropagation();
258
+ }, this.el = i, this.options = z(z({}, s.defaultOptions), t), this.classNames = z(z({}, s.defaultOptions.classNames), t.classNames), this.axis = {
259
+ x: {
260
+ scrollOffsetAttr: "scrollLeft",
261
+ sizeAttr: "width",
262
+ scrollSizeAttr: "scrollWidth",
263
+ offsetSizeAttr: "offsetWidth",
264
+ offsetAttr: "left",
265
+ overflowAttr: "overflowX",
266
+ dragOffset: 0,
267
+ isOverflowing: !0,
268
+ forceVisible: !1,
269
+ track: { size: null, el: null, rect: null, isVisible: !1 },
270
+ scrollbar: { size: null, el: null, rect: null, isVisible: !1 }
271
+ },
272
+ y: {
273
+ scrollOffsetAttr: "scrollTop",
274
+ sizeAttr: "height",
275
+ scrollSizeAttr: "scrollHeight",
276
+ offsetSizeAttr: "offsetHeight",
277
+ offsetAttr: "top",
278
+ overflowAttr: "overflowY",
279
+ dragOffset: 0,
280
+ isOverflowing: !0,
281
+ forceVisible: !1,
282
+ track: { size: null, el: null, rect: null, isVisible: !1 },
283
+ scrollbar: { size: null, el: null, rect: null, isVisible: !1 }
284
+ }
285
+ }, typeof this.el != "object" || !this.el.nodeName)
286
+ throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));
287
+ this.onMouseMove = Ge(this._onMouseMove, 64), this.onWindowResize = V(this._onWindowResize, 64, { leading: !0 }), this.onStopScrolling = V(this._onStopScrolling, this.stopScrollDelay), this.onMouseEntered = V(this._onMouseEntered, this.stopScrollDelay), this.init();
288
+ }
289
+ return s.getRtlHelpers = function() {
290
+ if (s.rtlHelpers)
291
+ return s.rtlHelpers;
292
+ var i = document.createElement("div");
293
+ i.innerHTML = '<div class="simplebar-dummy-scrollbar-size"><div></div></div>';
294
+ var t = i.firstElementChild, e = t == null ? void 0 : t.firstElementChild;
295
+ if (!e)
296
+ return null;
297
+ document.body.appendChild(t), t.scrollLeft = 0;
298
+ var r = s.getOffset(t), o = s.getOffset(e);
299
+ t.scrollLeft = -999;
300
+ var n = s.getOffset(e);
301
+ return document.body.removeChild(t), s.rtlHelpers = {
302
+ // determines if the scrolling is responding with negative values
303
+ isScrollOriginAtZero: r.left !== o.left,
304
+ // determines if the origin scrollbar position is inverted or not (positioned on left or right)
305
+ isScrollingToNegative: o.left !== n.left
306
+ }, s.rtlHelpers;
307
+ }, s.prototype.getScrollbarWidth = function() {
308
+ try {
309
+ return this.contentWrapperEl && getComputedStyle(this.contentWrapperEl, "::-webkit-scrollbar").display === "none" || "scrollbarWidth" in document.documentElement.style || "-ms-overflow-style" in document.documentElement.style ? 0 : re();
310
+ } catch {
311
+ return re();
312
+ }
313
+ }, s.getOffset = function(i) {
314
+ var t = i.getBoundingClientRect(), e = U(i), r = N(i);
315
+ return {
316
+ top: t.top + (r.pageYOffset || e.documentElement.scrollTop),
317
+ left: t.left + (r.pageXOffset || e.documentElement.scrollLeft)
318
+ };
319
+ }, s.prototype.init = function() {
320
+ Z && (this.initDOM(), this.rtlHelpers = s.getRtlHelpers(), this.scrollbarWidth = this.getScrollbarWidth(), this.recalculate(), this.initListeners());
321
+ }, s.prototype.initDOM = function() {
322
+ var i, t;
323
+ this.wrapperEl = this.el.querySelector(_(this.classNames.wrapper)), this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector(_(this.classNames.contentWrapper)), this.contentEl = this.options.contentNode || this.el.querySelector(_(this.classNames.contentEl)), this.offsetEl = this.el.querySelector(_(this.classNames.offset)), this.maskEl = this.el.querySelector(_(this.classNames.mask)), this.placeholderEl = this.findChild(this.wrapperEl, _(this.classNames.placeholder)), this.heightAutoObserverWrapperEl = this.el.querySelector(_(this.classNames.heightAutoObserverWrapperEl)), this.heightAutoObserverEl = this.el.querySelector(_(this.classNames.heightAutoObserverEl)), this.axis.x.track.el = this.findChild(this.el, "".concat(_(this.classNames.track)).concat(_(this.classNames.horizontal))), this.axis.y.track.el = this.findChild(this.el, "".concat(_(this.classNames.track)).concat(_(this.classNames.vertical))), this.axis.x.scrollbar.el = ((i = this.axis.x.track.el) === null || i === void 0 ? void 0 : i.querySelector(_(this.classNames.scrollbar))) || null, this.axis.y.scrollbar.el = ((t = this.axis.y.track.el) === null || t === void 0 ? void 0 : t.querySelector(_(this.classNames.scrollbar))) || null, this.options.autoHide || (k(this.axis.x.scrollbar.el, this.classNames.visible), k(this.axis.y.scrollbar.el, this.classNames.visible));
324
+ }, s.prototype.initListeners = function() {
325
+ var i = this, t, e = N(this.el);
326
+ if (this.el.addEventListener("mouseenter", this.onMouseEnter), this.el.addEventListener("pointerdown", this.onPointerEvent, !0), this.el.addEventListener("mousemove", this.onMouseMove), this.el.addEventListener("mouseleave", this.onMouseLeave), (t = this.contentWrapperEl) === null || t === void 0 || t.addEventListener("scroll", this.onScroll), e.addEventListener("resize", this.onWindowResize), !!this.contentEl) {
327
+ if (window.ResizeObserver) {
328
+ var r = !1, o = e.ResizeObserver || ResizeObserver;
329
+ this.resizeObserver = new o(function() {
330
+ r && e.requestAnimationFrame(function() {
331
+ i.recalculate();
332
+ });
333
+ }), this.resizeObserver.observe(this.el), this.resizeObserver.observe(this.contentEl), e.requestAnimationFrame(function() {
334
+ r = !0;
335
+ });
336
+ }
337
+ this.mutationObserver = new e.MutationObserver(function() {
338
+ e.requestAnimationFrame(function() {
339
+ i.recalculate();
340
+ });
341
+ }), this.mutationObserver.observe(this.contentEl, {
342
+ childList: !0,
343
+ subtree: !0,
344
+ characterData: !0
345
+ });
346
+ }
347
+ }, s.prototype.recalculate = function() {
348
+ if (!(!this.heightAutoObserverEl || !this.contentEl || !this.contentWrapperEl || !this.wrapperEl || !this.placeholderEl)) {
349
+ var i = N(this.el);
350
+ this.elStyles = i.getComputedStyle(this.el), this.isRtl = this.elStyles.direction === "rtl";
351
+ var t = this.contentEl.offsetWidth, e = this.heightAutoObserverEl.offsetHeight <= 1, r = this.heightAutoObserverEl.offsetWidth <= 1 || t > 0, o = this.contentWrapperEl.offsetWidth, n = this.elStyles.overflowX, l = this.elStyles.overflowY;
352
+ this.contentEl.style.padding = "".concat(this.elStyles.paddingTop, " ").concat(this.elStyles.paddingRight, " ").concat(this.elStyles.paddingBottom, " ").concat(this.elStyles.paddingLeft), this.wrapperEl.style.margin = "-".concat(this.elStyles.paddingTop, " -").concat(this.elStyles.paddingRight, " -").concat(this.elStyles.paddingBottom, " -").concat(this.elStyles.paddingLeft);
353
+ var h = this.contentEl.scrollHeight, u = this.contentEl.scrollWidth;
354
+ this.contentWrapperEl.style.height = e ? "auto" : "100%", this.placeholderEl.style.width = r ? "".concat(t || u, "px") : "auto", this.placeholderEl.style.height = "".concat(h, "px");
355
+ var m = this.contentWrapperEl.offsetHeight;
356
+ this.axis.x.isOverflowing = t !== 0 && u > t, this.axis.y.isOverflowing = h > m, this.axis.x.isOverflowing = n === "hidden" ? !1 : this.axis.x.isOverflowing, this.axis.y.isOverflowing = l === "hidden" ? !1 : this.axis.y.isOverflowing, this.axis.x.forceVisible = this.options.forceVisible === "x" || this.options.forceVisible === !0, this.axis.y.forceVisible = this.options.forceVisible === "y" || this.options.forceVisible === !0, this.hideNativeScrollbar();
357
+ var c = this.axis.x.isOverflowing ? this.scrollbarWidth : 0, d = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
358
+ this.axis.x.isOverflowing = this.axis.x.isOverflowing && u > o - d, this.axis.y.isOverflowing = this.axis.y.isOverflowing && h > m - c, this.axis.x.scrollbar.size = this.getScrollbarSize("x"), this.axis.y.scrollbar.size = this.getScrollbarSize("y"), this.axis.x.scrollbar.el && (this.axis.x.scrollbar.el.style.width = "".concat(this.axis.x.scrollbar.size, "px")), this.axis.y.scrollbar.el && (this.axis.y.scrollbar.el.style.height = "".concat(this.axis.y.scrollbar.size, "px")), this.positionScrollbar("x"), this.positionScrollbar("y"), this.toggleTrackVisibility("x"), this.toggleTrackVisibility("y");
359
+ }
360
+ }, s.prototype.getScrollbarSize = function(i) {
361
+ var t, e;
362
+ if (i === void 0 && (i = "y"), !this.axis[i].isOverflowing || !this.contentEl)
363
+ return 0;
364
+ var r = this.contentEl[this.axis[i].scrollSizeAttr], o = (e = (t = this.axis[i].track.el) === null || t === void 0 ? void 0 : t[this.axis[i].offsetSizeAttr]) !== null && e !== void 0 ? e : 0, n = o / r, l;
365
+ return l = Math.max(~~(n * o), this.options.scrollbarMinSize), this.options.scrollbarMaxSize && (l = Math.min(l, this.options.scrollbarMaxSize)), l;
366
+ }, s.prototype.positionScrollbar = function(i) {
367
+ var t, e, r;
368
+ i === void 0 && (i = "y");
369
+ var o = this.axis[i].scrollbar;
370
+ if (!(!this.axis[i].isOverflowing || !this.contentWrapperEl || !o.el || !this.elStyles)) {
371
+ var n = this.contentWrapperEl[this.axis[i].scrollSizeAttr], l = ((t = this.axis[i].track.el) === null || t === void 0 ? void 0 : t[this.axis[i].offsetSizeAttr]) || 0, h = parseInt(this.elStyles[this.axis[i].sizeAttr], 10), u = this.contentWrapperEl[this.axis[i].scrollOffsetAttr];
372
+ u = i === "x" && this.isRtl && (!((e = s.getRtlHelpers()) === null || e === void 0) && e.isScrollOriginAtZero) ? -u : u, i === "x" && this.isRtl && (u = !((r = s.getRtlHelpers()) === null || r === void 0) && r.isScrollingToNegative ? u : -u);
373
+ var m = u / (n - h), c = ~~((l - o.size) * m);
374
+ c = i === "x" && this.isRtl ? -c + (l - o.size) : c, o.el.style.transform = i === "x" ? "translate3d(".concat(c, "px, 0, 0)") : "translate3d(0, ".concat(c, "px, 0)");
375
+ }
376
+ }, s.prototype.toggleTrackVisibility = function(i) {
377
+ i === void 0 && (i = "y");
378
+ var t = this.axis[i].track.el, e = this.axis[i].scrollbar.el;
379
+ !t || !e || !this.contentWrapperEl || (this.axis[i].isOverflowing || this.axis[i].forceVisible ? (t.style.visibility = "visible", this.contentWrapperEl.style[this.axis[i].overflowAttr] = "scroll", this.el.classList.add("".concat(this.classNames.scrollable, "-").concat(i))) : (t.style.visibility = "hidden", this.contentWrapperEl.style[this.axis[i].overflowAttr] = "hidden", this.el.classList.remove("".concat(this.classNames.scrollable, "-").concat(i))), this.axis[i].isOverflowing ? e.style.display = "block" : e.style.display = "none");
380
+ }, s.prototype.showScrollbar = function(i) {
381
+ i === void 0 && (i = "y"), this.axis[i].isOverflowing && !this.axis[i].scrollbar.isVisible && (k(this.axis[i].scrollbar.el, this.classNames.visible), this.axis[i].scrollbar.isVisible = !0);
382
+ }, s.prototype.hideScrollbar = function(i) {
383
+ i === void 0 && (i = "y"), !this.isDragging && this.axis[i].isOverflowing && this.axis[i].scrollbar.isVisible && (T(this.axis[i].scrollbar.el, this.classNames.visible), this.axis[i].scrollbar.isVisible = !1);
384
+ }, s.prototype.hideNativeScrollbar = function() {
385
+ this.offsetEl && (this.offsetEl.style[this.isRtl ? "left" : "right"] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px", this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px");
386
+ }, s.prototype.onMouseMoveForAxis = function(i) {
387
+ i === void 0 && (i = "y");
388
+ var t = this.axis[i];
389
+ !t.track.el || !t.scrollbar.el || (t.track.rect = t.track.el.getBoundingClientRect(), t.scrollbar.rect = t.scrollbar.el.getBoundingClientRect(), this.isWithinBounds(t.track.rect) ? (this.showScrollbar(i), k(t.track.el, this.classNames.hover), this.isWithinBounds(t.scrollbar.rect) ? k(t.scrollbar.el, this.classNames.hover) : T(t.scrollbar.el, this.classNames.hover)) : (T(t.track.el, this.classNames.hover), this.options.autoHide && this.hideScrollbar(i)));
390
+ }, s.prototype.onMouseLeaveForAxis = function(i) {
391
+ i === void 0 && (i = "y"), T(this.axis[i].track.el, this.classNames.hover), T(this.axis[i].scrollbar.el, this.classNames.hover), this.options.autoHide && this.hideScrollbar(i);
392
+ }, s.prototype.onDragStart = function(i, t) {
393
+ var e;
394
+ t === void 0 && (t = "y"), this.isDragging = !0;
395
+ var r = U(this.el), o = N(this.el), n = this.axis[t].scrollbar, l = t === "y" ? i.pageY : i.pageX;
396
+ this.axis[t].dragOffset = l - (((e = n.rect) === null || e === void 0 ? void 0 : e[this.axis[t].offsetAttr]) || 0), this.draggedAxis = t, k(this.el, this.classNames.dragging), r.addEventListener("mousemove", this.drag, !0), r.addEventListener("mouseup", this.onEndDrag, !0), this.removePreventClickId === null ? (r.addEventListener("click", this.preventClick, !0), r.addEventListener("dblclick", this.preventClick, !0)) : (o.clearTimeout(this.removePreventClickId), this.removePreventClickId = null);
397
+ }, s.prototype.onTrackClick = function(i, t) {
398
+ var e = this, r, o, n, l;
399
+ t === void 0 && (t = "y");
400
+ var h = this.axis[t];
401
+ if (!(!this.options.clickOnTrack || !h.scrollbar.el || !this.contentWrapperEl)) {
402
+ i.preventDefault();
403
+ var u = N(this.el);
404
+ this.axis[t].scrollbar.rect = h.scrollbar.el.getBoundingClientRect();
405
+ var m = this.axis[t].scrollbar, c = (o = (r = m.rect) === null || r === void 0 ? void 0 : r[this.axis[t].offsetAttr]) !== null && o !== void 0 ? o : 0, d = parseInt((l = (n = this.elStyles) === null || n === void 0 ? void 0 : n[this.axis[t].sizeAttr]) !== null && l !== void 0 ? l : "0px", 10), a = this.contentWrapperEl[this.axis[t].scrollOffsetAttr], b = t === "y" ? this.mouseY - c : this.mouseX - c, y = b < 0 ? -1 : 1, M = y === -1 ? a - d : a + d, S = 40, w = function() {
406
+ e.contentWrapperEl && (y === -1 ? a > M && (a -= S, e.contentWrapperEl[e.axis[t].scrollOffsetAttr] = a, u.requestAnimationFrame(w)) : a < M && (a += S, e.contentWrapperEl[e.axis[t].scrollOffsetAttr] = a, u.requestAnimationFrame(w)));
407
+ };
408
+ w();
409
+ }
410
+ }, s.prototype.getContentElement = function() {
411
+ return this.contentEl;
412
+ }, s.prototype.getScrollElement = function() {
413
+ return this.contentWrapperEl;
414
+ }, s.prototype.removeListeners = function() {
415
+ var i = N(this.el);
416
+ this.el.removeEventListener("mouseenter", this.onMouseEnter), this.el.removeEventListener("pointerdown", this.onPointerEvent, !0), this.el.removeEventListener("mousemove", this.onMouseMove), this.el.removeEventListener("mouseleave", this.onMouseLeave), this.contentWrapperEl && this.contentWrapperEl.removeEventListener("scroll", this.onScroll), i.removeEventListener("resize", this.onWindowResize), this.mutationObserver && this.mutationObserver.disconnect(), this.resizeObserver && this.resizeObserver.disconnect(), this.onMouseMove.cancel(), this.onWindowResize.cancel(), this.onStopScrolling.cancel(), this.onMouseEntered.cancel();
417
+ }, s.prototype.unMount = function() {
418
+ this.removeListeners();
419
+ }, s.prototype.isWithinBounds = function(i) {
420
+ return this.mouseX >= i.left && this.mouseX <= i.left + i.width && this.mouseY >= i.top && this.mouseY <= i.top + i.height;
421
+ }, s.prototype.findChild = function(i, t) {
422
+ var e = i.matches || i.webkitMatchesSelector || i.mozMatchesSelector || i.msMatchesSelector;
423
+ return Array.prototype.filter.call(i.children, function(r) {
424
+ return e.call(r, t);
425
+ })[0];
426
+ }, s.rtlHelpers = null, s.defaultOptions = {
427
+ forceVisible: !1,
428
+ clickOnTrack: !0,
429
+ scrollbarMinSize: 25,
430
+ scrollbarMaxSize: 0,
431
+ ariaLabel: "scrollable content",
432
+ tabIndex: 0,
433
+ classNames: {
434
+ contentEl: "simplebar-content",
435
+ contentWrapper: "simplebar-content-wrapper",
436
+ offset: "simplebar-offset",
437
+ mask: "simplebar-mask",
438
+ wrapper: "simplebar-wrapper",
439
+ placeholder: "simplebar-placeholder",
440
+ scrollbar: "simplebar-scrollbar",
441
+ track: "simplebar-track",
442
+ heightAutoObserverWrapperEl: "simplebar-height-auto-observer-wrapper",
443
+ heightAutoObserverEl: "simplebar-height-auto-observer",
444
+ visible: "simplebar-visible",
445
+ horizontal: "simplebar-horizontal",
446
+ vertical: "simplebar-vertical",
447
+ hover: "simplebar-hover",
448
+ dragging: "simplebar-dragging",
449
+ scrolling: "simplebar-scrolling",
450
+ scrollable: "simplebar-scrollable",
451
+ mouseEntered: "simplebar-mouse-entered"
452
+ },
453
+ scrollableNode: null,
454
+ contentNode: null,
455
+ autoHide: !0
456
+ }, s.getOptions = Qe, s.helpers = Ue, s;
457
+ }()
458
+ ), E = function() {
459
+ return E = Object.assign || function(i) {
460
+ for (var t, e = 1, r = arguments.length; e < r; e++) {
461
+ t = arguments[e];
462
+ for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (i[o] = t[o]);
463
+ }
464
+ return i;
465
+ }, E.apply(this, arguments);
466
+ };
467
+ function Ze(s, i) {
468
+ var t = {};
469
+ for (var e in s) Object.prototype.hasOwnProperty.call(s, e) && i.indexOf(e) < 0 && (t[e] = s[e]);
470
+ if (s != null && typeof Object.getOwnPropertySymbols == "function")
471
+ for (var r = 0, e = Object.getOwnPropertySymbols(s); r < e.length; r++)
472
+ i.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(s, e[r]) && (t[e[r]] = s[e[r]]);
473
+ return t;
474
+ }
475
+ var ve = g.forwardRef(function(s, i) {
476
+ var t = s.children, e = s.scrollableNodeProps, r = e === void 0 ? {} : e, o = Ze(s, ["children", "scrollableNodeProps"]), n = g.useRef(), l = g.useRef(), h = g.useRef(), u = {}, m = {};
477
+ Object.keys(o).forEach(function(a) {
478
+ Object.prototype.hasOwnProperty.call(D.defaultOptions, a) ? u[a] = o[a] : m[a] = o[a];
479
+ });
480
+ var c = E(E({}, D.defaultOptions.classNames), u.classNames), d = E(E({}, r), { className: "".concat(c.contentWrapper).concat(r.className ? " ".concat(r.className) : ""), tabIndex: u.tabIndex || D.defaultOptions.tabIndex, role: "region", "aria-label": u.ariaLabel || D.defaultOptions.ariaLabel });
481
+ return g.useEffect(function() {
482
+ var a;
483
+ return l.current = d.ref ? d.ref.current : l.current, n.current && (a = new D(n.current, E(E(E({}, u), l.current && {
484
+ scrollableNode: l.current
485
+ }), h.current && {
486
+ contentNode: h.current
487
+ })), typeof i == "function" ? i(a) : i && (i.current = a)), function() {
488
+ a == null || a.unMount(), a = null, typeof i == "function" && i(null);
489
+ };
490
+ }, []), g.createElement(
491
+ "div",
492
+ E({ "data-simplebar": "init", ref: n }, m),
493
+ g.createElement(
494
+ "div",
495
+ { className: c.wrapper },
496
+ g.createElement(
497
+ "div",
498
+ { className: c.heightAutoObserverWrapperEl },
499
+ g.createElement("div", { className: c.heightAutoObserverEl })
500
+ ),
501
+ g.createElement(
502
+ "div",
503
+ { className: c.mask },
504
+ g.createElement("div", { className: c.offset }, typeof t == "function" ? t({
505
+ scrollableNodeRef: l,
506
+ scrollableNodeProps: E(E({}, d), { ref: l }),
507
+ contentNodeRef: h,
508
+ contentNodeProps: {
509
+ className: c.contentEl,
510
+ ref: h
511
+ }
512
+ }) : g.createElement(
513
+ "div",
514
+ E({}, d),
515
+ g.createElement("div", { className: c.contentEl }, t)
516
+ ))
517
+ ),
518
+ g.createElement("div", { className: c.placeholder })
519
+ ),
520
+ g.createElement(
521
+ "div",
522
+ { className: "".concat(c.track, " ").concat(c.horizontal) },
523
+ g.createElement("div", { className: c.scrollbar })
524
+ ),
525
+ g.createElement(
526
+ "div",
527
+ { className: "".concat(c.track, " ").concat(c.vertical) },
528
+ g.createElement("div", { className: c.scrollbar })
529
+ )
530
+ );
531
+ });
532
+ ve.displayName = "SimpleBar";
533
+ const Je = "Confirmation-module__container___45eSd", Ke = "Confirmation-module__message___4r1SC", et = "Confirmation-module__buttons___QYVqm", tt = "Confirmation-module__button___gJmIL", it = "Confirmation-module__confirm___DqtMv", st = "Confirmation-module__cancel___3CIW9", A = {
534
+ container: Je,
535
+ message: Ke,
536
+ buttons: et,
537
+ button: tt,
538
+ confirm: it,
539
+ cancel: st
540
+ }, rt = ({
541
+ message: s,
542
+ title: i,
543
+ onCancel: t,
544
+ onConfirm: e
545
+ }) => {
546
+ const r = x(A.button, A.confirm), o = x(A.button, A.cancel);
547
+ return /* @__PURE__ */ W("div", { className: A.container, children: [
548
+ /* @__PURE__ */ f("div", { className: A.title, children: i }),
549
+ /* @__PURE__ */ f("div", { className: x(A.message, P.TEXT_SECONDARY), children: s }),
550
+ /* @__PURE__ */ W("div", { className: A.buttons, children: [
551
+ /* @__PURE__ */ f("button", { className: r, onClick: e, children: "Yes" }),
552
+ /* @__PURE__ */ f("button", { className: o, onClick: t, children: "No" })
553
+ ] })
554
+ ] });
555
+ }, ot = "Menu-module__container___KGp0N", nt = "Menu-module__disabled___xdT-F", lt = "Menu-module__groupHeader___-d7MT", at = "Menu-module__isDrill___6OfQP", ct = "Menu-module__separator___OQ--M", ut = "Menu-module__noIcon___MYkPf", ht = "Menu-module__item___nmDUr", dt = "Menu-module__checked___6OJEB", ft = "Menu-module__radio___OlxcQ", pt = "Menu-module__checkbox___HocC7", mt = "Menu-module__icon___ZxKUL", vt = "Menu-module__itemType___VLiEZ", gt = "Menu-module__nestedType___gayzp", bt = "Menu-module__nestedIcon___VyPyZ", yt = "Menu-module__menuItemText___agoSf", _t = "Menu-module__separateGroup___0J5WE", Et = "Menu-module__itemCheckBox___2DHy4", St = "Menu-module__itemRadioButton___h2ifs", xt = "Menu-module__scrollbar___li1b-", Ot = "Menu-module__itemContainer___m0XPy", Ct = "Menu-module__inlineConfirmation___0JCIX", Mt = "Menu-module__menuItemTooltip___5jA0S", wt = "Menu-module__toggleButtonMenu___qwLCQ", Nt = "Menu-module__loader___pzNnL", v = {
556
+ container: ot,
557
+ disabled: nt,
558
+ groupHeader: lt,
559
+ isDrill: at,
560
+ separator: ct,
561
+ noIcon: ut,
562
+ item: ht,
563
+ checked: dt,
564
+ radio: ft,
565
+ checkbox: pt,
566
+ icon: mt,
567
+ itemType: vt,
568
+ nestedType: gt,
569
+ nestedIcon: bt,
570
+ menuItemText: yt,
571
+ separateGroup: _t,
572
+ itemCheckBox: Et,
573
+ itemRadioButton: St,
574
+ scrollbar: xt,
575
+ itemContainer: Ot,
576
+ inlineConfirmation: Ct,
577
+ menuItemTooltip: Mt,
578
+ toggleButtonMenu: wt,
579
+ loader: Nt
580
+ }, j = Object.freeze({
581
+ ITEM: "item",
582
+ RADIO: "radio",
583
+ CHECKBOX: "checkbox",
584
+ TOGGLE: "toggle",
585
+ NESTED: "nested"
586
+ }), J = class J extends le {
587
+ constructor(i) {
588
+ super(i), this.renderRegularMenuItem = () => {
589
+ const { dataTestId: t, iconName: e, iconClass: r, isDrill: o } = this.props;
590
+ return /* @__PURE__ */ W("span", { className: v.itemContainer, children: [
591
+ e && /* @__PURE__ */ f(H, { name: e, className: r }),
592
+ /* @__PURE__ */ f(
593
+ "span",
594
+ {
595
+ "data-testid": t,
596
+ className: x(v.menuItemText, P.TEXT_PRIMARY),
597
+ children: this.getContent()
598
+ }
599
+ ),
600
+ o && /* @__PURE__ */ f(H, { name: "general-arrow-right" })
601
+ ] });
602
+ }, this.renderMenuItem = () => {
603
+ const { tooltip: t, classNameTooltip: e, level: r } = this.props, o = this.renderRegularMenuItem();
604
+ return t ? /* @__PURE__ */ f(
605
+ _e,
606
+ {
607
+ overlay: /* @__PURE__ */ f("div", { children: t }),
608
+ placement: "right",
609
+ overlayClassName: x(e, v.menuItemTooltip),
610
+ mouseLeaveDelay: 0,
611
+ align: { offset: [r ? 5 : 10, 0] },
612
+ children: o
613
+ }
614
+ ) : o;
615
+ }, this.state = { inInlineConfirmation: !1 };
616
+ }
617
+ getContent() {
618
+ const { type: i, caption: t, subCaption: e, checked: r, selected: o } = this.props;
619
+ switch (i) {
620
+ case j.RADIO:
621
+ return /* @__PURE__ */ f(
622
+ Ee,
623
+ {
624
+ text: t,
625
+ name: t,
626
+ onChange: () => null,
627
+ value: t,
628
+ checked: !!r,
629
+ preventClick: !0
630
+ }
631
+ );
632
+ case j.CHECKBOX:
633
+ return /* @__PURE__ */ f(
634
+ be,
635
+ {
636
+ title: t,
637
+ text: t,
638
+ onChange: () => null,
639
+ checked: !!r,
640
+ className: v.itemCheckBox
641
+ }
642
+ );
643
+ case j.TOGGLE:
644
+ return /* @__PURE__ */ W("div", { children: [
645
+ /* @__PURE__ */ f("span", { children: t }),
646
+ /* @__PURE__ */ f(
647
+ ye,
648
+ {
649
+ onChange: () => null,
650
+ className: v.toggleButtonMenu,
651
+ checked: !!r
652
+ }
653
+ )
654
+ ] });
655
+ case j.NESTED:
656
+ return /* @__PURE__ */ W("div", { className: v.nestedType, children: [
657
+ /* @__PURE__ */ f("div", { children: t }),
658
+ /* @__PURE__ */ f(H, { className: v.nestedIcon, name: "general-double-arrow-front" }),
659
+ /* @__PURE__ */ f("div", { children: e })
660
+ ] });
661
+ default:
662
+ return /* @__PURE__ */ W("div", { className: v.itemType, children: [
663
+ t,
664
+ o && /* @__PURE__ */ f(H, { name: "general-vi-small-white" })
665
+ ] });
666
+ }
667
+ }
668
+ handleClick(i) {
669
+ i.stopPropagation();
670
+ const { handleClick: t, disabled: e } = this.props;
671
+ e || t();
672
+ }
673
+ render() {
674
+ const { checked: i, className: t, iconName: e, handleOver: r, handleOut: o, disabled: n } = this.props, l = !1, h = x(t, {
675
+ [v.checked]: i,
676
+ [v.noIcon]: !e || l,
677
+ [v.disabled]: n,
678
+ [P.TEXT_PRIMARY]: i,
679
+ [P.TEXT_SECONDARY_HOVER]: !i && !n,
680
+ [P.TEXT_SECONDARY]: n
681
+ });
682
+ return /* @__PURE__ */ f(
683
+ "li",
684
+ {
685
+ "data-menu-item": !0,
686
+ className: h,
687
+ onClick: this.handleClick.bind(this),
688
+ onMouseOver: r,
689
+ onMouseOut: o,
690
+ children: this.renderMenuItem()
691
+ }
692
+ );
693
+ }
694
+ };
695
+ J.defaultProps = {
696
+ className: ""
697
+ };
698
+ let Q = J;
699
+ function kt(s, i) {
700
+ const t = {};
701
+ return s.reduce(function(e, r) {
702
+ const o = i(r);
703
+ return e[o] || (e[o] = []), e[o].push(r), e;
704
+ }, t);
705
+ }
706
+ const oe = () => {
707
+ }, q = class q extends le {
708
+ constructor(i) {
709
+ super(i), this.handleClick = (t) => {
710
+ if (t.subItems || t.actionableComponent) {
711
+ this.clearTimeout(), this.state.activeSubMenu === t.id ? this.closeSubMenu() : this.setState({ activeSubMenu: t.id });
712
+ return;
713
+ } else if (t.confirmation && !t.confirmation.inline) {
714
+ this.clearTimeout(), this.setState({ activeSubMenu: t.id });
715
+ return;
716
+ }
717
+ const { onItemSelected: e } = this.props;
718
+ e(t, t.value);
719
+ }, this.handleOver = (t) => {
720
+ this.clearTimeout(), this.setState({ isHoverSubMenu: !1 });
721
+ const e = t.subItems || t.actionableComponent ? t.id : null;
722
+ this.timeoutIn = window.setTimeout(() => {
723
+ this.setState({
724
+ activeSubMenu: e
725
+ });
726
+ }, 900);
727
+ }, this.handleOut = (t) => {
728
+ (t.subItems || t.actionableComponent) && this.state.activeSubMenu && this.clearTimeout();
729
+ }, this.onSubMenuMouseEnter = () => {
730
+ this.clearTimeout(), this.setState({ isHoverSubMenu: !0 });
731
+ }, this.onSubMenuMouseLeave = () => {
732
+ this.setState({ isHoverSubMenu: !1 });
733
+ }, this.closeSubMenu = () => {
734
+ this.setState({ activeSubMenu: null });
735
+ }, this.onConfirm = (t) => {
736
+ const { onItemSelected: e } = this.props;
737
+ this.closeSubMenu(), e(t);
738
+ }, this.renderMenuItem = (t) => {
739
+ const { onItemSelected: e, onRequestClose: r, level: o, classNameTooltip: n, zIndex: l, className: h } = this.props;
740
+ let u = x(v[t.type], {
741
+ [v.isDrill]: t.subItems,
742
+ [v.separator]: t.separator,
743
+ fakeHover: t.checked,
744
+ [v.groupHeader]: t.groupTitle
745
+ });
746
+ const m = (d) => {
747
+ const a = x(t.iconClass, v.icon);
748
+ return /* @__PURE__ */ f(
749
+ Q,
750
+ {
751
+ className: d,
752
+ checked: t.checked,
753
+ dataTestId: t.dataTestId,
754
+ disabled: t.disabled,
755
+ type: t.type,
756
+ caption: t.caption,
757
+ subCaption: t.subCaption,
758
+ tooltip: t.tooltip,
759
+ classNameTooltip: n,
760
+ iconName: t.iconName,
761
+ iconClass: a,
762
+ isDrill: !!t.subItems || !!t.actionableComponent,
763
+ level: o,
764
+ selected: t.selected,
765
+ handleClick: () => this.handleClick(t),
766
+ handleOver: () => this.handleOver(t),
767
+ handleOut: () => this.handleOut(t)
768
+ },
769
+ t.id
770
+ );
771
+ };
772
+ let c = t.subItems;
773
+ if (c) {
774
+ const d = this.state.activeSubMenu === t.id;
775
+ let a = this.handleClick;
776
+ return u = x(u, {
777
+ fakeHover: d && this.state.isHoverSubMenu
778
+ }), t.value !== void 0 && (c = c.map(function(y) {
779
+ return {
780
+ ...y,
781
+ checked: y.value === t.value
782
+ };
783
+ }), a = (y) => e(t, y.value)), /* @__PURE__ */ f(
784
+ $,
785
+ {
786
+ visible: d,
787
+ level: 1,
788
+ mask: !1,
789
+ trigger: [],
790
+ placement: "rightTop",
791
+ align: { offset: [0, 0] },
792
+ overlay: () => /* @__PURE__ */ f(
793
+ q,
794
+ {
795
+ items: c || [],
796
+ className: h,
797
+ onItemSelected: a,
798
+ onMouseEnter: this.onSubMenuMouseEnter,
799
+ scrollbarProps: {
800
+ className: t.subItemScrollbarClassName
801
+ },
802
+ level: (o || 0) + 1,
803
+ zIndex: (l || 1) + 1
804
+ }
805
+ ),
806
+ onRequestClose: r,
807
+ zIndex: (l || 1) + 1,
808
+ children: m(u)
809
+ },
810
+ t.id
811
+ );
812
+ } else if (t.actionableComponent) {
813
+ const { componentProps: d } = t.actionableComponent, a = t.actionableComponent.component, b = this.state.activeSubMenu === t.id;
814
+ return /* @__PURE__ */ f(
815
+ $,
816
+ {
817
+ visible: b,
818
+ level: 1,
819
+ mask: !1,
820
+ trigger: [],
821
+ placement: "rightTop",
822
+ align: { offset: [10, 0] },
823
+ overlay: () => /* @__PURE__ */ f(a, { ...d, onRequestClose: r }),
824
+ onRequestClose: r,
825
+ children: m(u)
826
+ },
827
+ t.id
828
+ );
829
+ } else if (t.confirmation && !t.confirmation.inline) {
830
+ const d = t.confirmation, a = this.state.activeSubMenu === t.id;
831
+ return /* @__PURE__ */ f(
832
+ $,
833
+ {
834
+ visible: a,
835
+ level: 1,
836
+ mask: !0,
837
+ trigger: [],
838
+ placement: "rightBottom",
839
+ align: { offset: [10, 0] },
840
+ overlay: () => /* @__PURE__ */ f(
841
+ rt,
842
+ {
843
+ title: d.title,
844
+ message: d.message,
845
+ onCancel: this.closeSubMenu,
846
+ onConfirm: () => this.onConfirm(t)
847
+ }
848
+ ),
849
+ onRequestClose: this.closeSubMenu,
850
+ children: m(u)
851
+ },
852
+ t.id
853
+ );
854
+ }
855
+ return m(u);
856
+ }, this.state = {
857
+ activeSubMenu: null,
858
+ isHoverSubMenu: !1
859
+ }, this.timeoutIn = null;
860
+ }
861
+ componentWillUnmount() {
862
+ this.clearTimeout();
863
+ }
864
+ clearTimeout() {
865
+ this.timeoutIn && (clearTimeout(this.timeoutIn), this.timeoutIn = null);
866
+ }
867
+ getSeparateGroups(i) {
868
+ const t = kt(i, (o) => o.groupId || ""), e = Object.values(t);
869
+ return e.slice(1).forEach((o) => o[0].separator = !0), e;
870
+ }
871
+ render() {
872
+ const {
873
+ items: i,
874
+ className: t,
875
+ onMouseEnter: e,
876
+ scrollbarProps: { className: r, ...o },
877
+ width: n,
878
+ isLoading: l
879
+ } = this.props;
880
+ let h = i.filter((a) => !a.hidden);
881
+ h = h.map((a, b) => (a.separator && !h[b - 1] && (a.separator = !1), a));
882
+ const u = x(v.container, t), m = x(v.scrollbar, r), c = n ? { width: `${n}px`, minWidth: "inherit" } : {}, d = l ? v.loader : "";
883
+ return /* @__PURE__ */ f("div", { className: u, onMouseEnter: e, style: c, children: /* @__PURE__ */ W(ve, { className: m, ...o, children: [
884
+ this.getSeparateGroups(h).map((a, b) => /* @__PURE__ */ f("div", { className: v.separateGroup, children: a.map(this.renderMenuItem) }, b)),
885
+ /* @__PURE__ */ f("div", { className: d, children: /* @__PURE__ */ f(ge, { isLoading: l }) })
886
+ ] }) });
887
+ }
888
+ };
889
+ q.defaultProps = {
890
+ onMouseEnter: oe,
891
+ onRequestClose: oe,
892
+ scrollbarProps: {},
893
+ level: 0,
894
+ isLoading: !1,
895
+ zIndex: 1
896
+ };
897
+ let ne = q;
898
+ export {
899
+ Q as M,
900
+ ne as a,
901
+ j as i
902
+ };