@sito/dashboard 0.0.44 → 0.0.46

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 (25) hide show
  1. package/dist/components/Badge/Badge.d.ts +2 -0
  2. package/dist/components/Badge/index.d.ts +2 -0
  3. package/dist/components/Badge/types.d.ts +4 -0
  4. package/dist/components/Table/components/Filters/ActiveFilters/ActiveFilters.d.ts +2 -0
  5. package/dist/components/Table/components/Filters/ActiveFilters/ArrayChip.d.ts +3 -0
  6. package/dist/components/Table/components/Filters/ActiveFilters/RangeChip.d.ts +2 -0
  7. package/dist/components/Table/components/Filters/ActiveFilters/index.d.ts +1 -0
  8. package/dist/components/Table/components/Filters/ActiveFilters/types.d.ts +15 -0
  9. package/dist/components/Table/components/Filters/FilterDropdown/FilterDropdown.d.ts +2 -0
  10. package/dist/components/Table/components/{FilterPopup → Filters/FilterDropdown}/index.d.ts +1 -1
  11. package/dist/components/Table/components/{FilterPopup → Filters/FilterDropdown}/types.d.ts +4 -2
  12. package/dist/components/Table/components/{FilterPopup → Filters/FilterDropdown}/utils.d.ts +1 -1
  13. package/dist/components/Table/components/Filters/index.d.ts +2 -0
  14. package/dist/components/Table/components/TableHeader/types.d.ts +1 -1
  15. package/dist/components/Table/components/index.d.ts +1 -1
  16. package/dist/components/Table/components/types.d.ts +2 -0
  17. package/dist/components/Table/types.d.ts +1 -1
  18. package/dist/components/index.d.ts +1 -0
  19. package/dist/dashboard.cjs +1 -1
  20. package/dist/dashboard.js +1585 -597
  21. package/dist/lib/filters.d.ts +1 -0
  22. package/dist/main.css +1 -1
  23. package/dist/providers/TableOptions/types.d.ts +2 -0
  24. package/package.json +3 -2
  25. package/dist/components/Table/components/FilterPopup/FilterPopup.d.ts +0 -2
package/dist/dashboard.js CHANGED
@@ -1,77 +1,77 @@
1
1
  import "./main.css";
2
- import { jsx as t, jsxs as N, Fragment as M } from "react/jsx-runtime";
3
- import { forwardRef as j, useState as P, useRef as B, useEffect as R, useCallback as k, createContext as I, useContext as W, useReducer as ne, useMemo as S } from "react";
4
- function ae(e) {
5
- const { className: a = "" } = e;
6
- return /* @__PURE__ */ t(
2
+ import { jsx as c, jsxs as $, Fragment as te } from "react/jsx-runtime";
3
+ import { forwardRef as he, useState as W, useRef as V, useEffect as ne, useCallback as D, createContext as xe, useContext as $e, useMemo as F, useReducer as it } from "react";
4
+ function ot(e) {
5
+ const { className: t = "" } = e;
6
+ return /* @__PURE__ */ c(
7
7
  "svg",
8
8
  {
9
- className: a,
9
+ className: t,
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  viewBox: "0 0 512 512",
12
12
  fill: "currentColor",
13
- children: /* @__PURE__ */ t("path", { d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" })
13
+ children: /* @__PURE__ */ c("path", { d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" })
14
14
  }
15
15
  );
16
16
  }
17
- function se(e) {
18
- const { className: a = "" } = e;
19
- return /* @__PURE__ */ t(
17
+ function lt(e) {
18
+ const { className: t = "" } = e;
19
+ return /* @__PURE__ */ c(
20
20
  "svg",
21
21
  {
22
- className: a,
22
+ className: t,
23
23
  xmlns: "http://www.w3.org/2000/svg",
24
24
  viewBox: "0 0 512 512",
25
25
  fill: "currentColor",
26
- children: /* @__PURE__ */ t("path", { d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z" })
26
+ children: /* @__PURE__ */ c("path", { d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z" })
27
27
  }
28
28
  );
29
29
  }
30
- function re(e) {
31
- const { className: a = "" } = e;
32
- return /* @__PURE__ */ t(
30
+ function ut(e) {
31
+ const { className: t = "" } = e;
32
+ return /* @__PURE__ */ c(
33
33
  "svg",
34
34
  {
35
- className: a,
35
+ className: t,
36
36
  xmlns: "http://www.w3.org/2000/svg",
37
37
  viewBox: "0 0 320 512",
38
38
  fill: "currentColor",
39
- children: /* @__PURE__ */ t("path", { d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" })
39
+ children: /* @__PURE__ */ c("path", { d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" })
40
40
  }
41
41
  );
42
42
  }
43
- function le(e) {
44
- const { className: a = "" } = e;
45
- return /* @__PURE__ */ t(
43
+ function dt(e) {
44
+ const { className: t = "" } = e;
45
+ return /* @__PURE__ */ c(
46
46
  "svg",
47
47
  {
48
- className: a,
48
+ className: t,
49
49
  xmlns: "http://www.w3.org/2000/svg",
50
50
  viewBox: "0 0 320 512",
51
51
  fill: "currentColor",
52
- children: /* @__PURE__ */ t("path", { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" })
52
+ children: /* @__PURE__ */ c("path", { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" })
53
53
  }
54
54
  );
55
55
  }
56
- const oe = (e) => {
57
- const { className: a = "" } = e;
58
- return /* @__PURE__ */ t("svg", { className: a, viewBox: "0 0 16 16", children: /* @__PURE__ */ t("path", { d: "M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z" }) });
56
+ const ft = (e) => {
57
+ const { className: t = "" } = e;
58
+ return /* @__PURE__ */ c("svg", { className: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ c("path", { d: "M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z" }) });
59
59
  };
60
- function G(e) {
61
- const { className: a = "" } = e;
62
- return /* @__PURE__ */ t(
60
+ function He(e) {
61
+ const { className: t = "" } = e;
62
+ return /* @__PURE__ */ c(
63
63
  "svg",
64
64
  {
65
- className: a,
65
+ className: t,
66
66
  xmlns: "http://www.w3.org/2000/svg",
67
67
  viewBox: "0 0 384 512",
68
68
  fill: "currentColor",
69
- children: /* @__PURE__ */ t("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" })
69
+ children: /* @__PURE__ */ c("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" })
70
70
  }
71
71
  );
72
72
  }
73
- var U = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(U || {});
74
- const K = (e) => {
73
+ var pe = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(pe || {});
74
+ const Ue = (e) => {
75
75
  switch (e) {
76
76
  case "error":
77
77
  return "input-error";
@@ -80,7 +80,7 @@ const K = (e) => {
80
80
  default:
81
81
  return "input-normal";
82
82
  }
83
- }, Q = (e) => {
83
+ }, Ve = (e) => {
84
84
  switch (e) {
85
85
  case "error":
86
86
  return "input-label-error";
@@ -89,7 +89,7 @@ const K = (e) => {
89
89
  default:
90
90
  return "input-label-normal";
91
91
  }
92
- }, X = (e) => {
92
+ }, qe = (e) => {
93
93
  switch (e) {
94
94
  case "error":
95
95
  return "input-helper-text-error";
@@ -99,394 +99,1305 @@ const K = (e) => {
99
99
  return "input-helper-text-normal";
100
100
  }
101
101
  };
102
- const q = j(function(e, a) {
102
+ const Se = he(function(e, t) {
103
103
  const {
104
- value: s,
104
+ value: r,
105
105
  onChange: n,
106
- options: r,
107
- containerClassName: o = "",
108
- inputClassName: c = "",
106
+ options: a,
107
+ containerClassName: s = "",
108
+ inputClassName: l = "",
109
109
  labelClassName: i = "",
110
- helperText: l = "",
111
- helperTextClassName: h = "",
110
+ helperText: o = "",
111
+ helperTextClassName: f = "",
112
112
  placeholder: u = "",
113
- label: p = "",
114
- name: C = "",
115
- id: g = "",
116
- state: v = U.default,
117
- children: f,
118
- ...d
113
+ label: d = "",
114
+ name: b = "",
115
+ id: w = "",
116
+ state: v = pe.default,
117
+ children: m,
118
+ ...h
119
119
  } = e;
120
- return /* @__PURE__ */ N("div", { className: `select-input-container ${o}`, children: [
121
- /* @__PURE__ */ t(
120
+ return /* @__PURE__ */ $("div", { className: `select-input-container ${s}`, children: [
121
+ /* @__PURE__ */ c(
122
122
  "select",
123
123
  {
124
- ...d,
125
- id: g,
126
- ref: a,
127
- name: C,
128
- value: s,
124
+ ...h,
125
+ id: w,
126
+ ref: t,
127
+ name: b,
128
+ value: r,
129
129
  onChange: n,
130
- className: `select-input ${K(v)} peer ${c}`,
131
- children: r == null ? void 0 : r.map((m) => /* @__PURE__ */ t("option", { value: m.id, children: m.value ?? m.name ?? m.id }, m.id))
130
+ className: `select-input ${Ue(v)} peer ${l}`,
131
+ children: a == null ? void 0 : a.map((p) => /* @__PURE__ */ c("option", { value: p.id, children: p.value ?? p.name ?? p.id }, p.id))
132
132
  }
133
133
  ),
134
- /* @__PURE__ */ t(
134
+ /* @__PURE__ */ c(
135
135
  "label",
136
136
  {
137
- htmlFor: C,
138
- className: `select-input-label ${Q(v)} ${i}`,
139
- children: p
137
+ htmlFor: b,
138
+ className: `select-input-label ${Ve(v)} ${i}`,
139
+ children: d
140
140
  }
141
141
  ),
142
- f,
143
- /* @__PURE__ */ t(
142
+ m,
143
+ /* @__PURE__ */ c(
144
144
  "p",
145
145
  {
146
- className: `select-input-helper-text ${X(v)} ${h}`,
147
- children: v !== "error" && v !== "good" ? u : l
146
+ className: `select-input-helper-text ${qe(v)} ${f}`,
147
+ children: v !== "error" && v !== "good" ? u : o
148
148
  }
149
149
  )
150
150
  ] });
151
151
  });
152
- const D = j(function(e, a) {
152
+ const de = he(function(e, t) {
153
153
  const {
154
- children: s,
155
- state: n = U.default,
156
- label: r = "",
157
- containerClassName: o = "",
158
- inputClassName: c = "",
154
+ children: r,
155
+ state: n = pe.default,
156
+ label: a = "",
157
+ containerClassName: s = "",
158
+ inputClassName: l = "",
159
159
  labelClassName: i = "",
160
- helperText: l = "",
161
- helperTextClassName: h = "",
160
+ helperText: o = "",
161
+ helperTextClassName: f = "",
162
162
  value: u = "",
163
- ...p
163
+ ...d
164
164
  } = e;
165
- return /* @__PURE__ */ N("div", { className: `text-input-container ${o}`, children: [
166
- /* @__PURE__ */ t(
165
+ return /* @__PURE__ */ $("div", { className: `text-input-container ${s}`, children: [
166
+ /* @__PURE__ */ c(
167
167
  "input",
168
168
  {
169
- ref: a,
169
+ ref: t,
170
170
  value: u,
171
- className: `text-input ${K(n)} peer ${c} ${u ? "has-value" : ""} ${p.placeholder ? "has-placeholder" : ""}`,
172
- ...p
171
+ className: `text-input ${Ue(n)} peer ${l} ${u ? "has-value" : ""} ${d.placeholder ? "has-placeholder" : ""}`,
172
+ ...d
173
173
  }
174
174
  ),
175
- !!r && /* @__PURE__ */ N(
175
+ !!a && /* @__PURE__ */ $(
176
176
  "label",
177
177
  {
178
- htmlFor: p.name,
179
- className: `text-input-label ${Q(n)} ${i}`,
178
+ htmlFor: d.name,
179
+ className: `text-input-label ${Ve(n)} ${i}`,
180
180
  children: [
181
- r,
182
- p.required ? " *" : ""
181
+ a,
182
+ d.required ? " *" : ""
183
183
  ]
184
184
  }
185
185
  ),
186
- s,
187
- !!l && /* @__PURE__ */ t(
186
+ r,
187
+ !!o && /* @__PURE__ */ c(
188
188
  "p",
189
189
  {
190
- className: `text-input-helper-text ${X(n)} ${h}`,
191
- children: l
190
+ className: `text-input-helper-text ${qe(n)} ${f}`,
191
+ children: o
192
192
  }
193
193
  )
194
194
  ] });
195
195
  });
196
- const ce = j(function(e, a) {
196
+ const ht = he(function(e, t) {
197
197
  const {
198
- checked: s,
198
+ checked: r,
199
199
  onChange: n,
200
- state: r = U.default,
201
- name: o = "",
202
- id: c = "",
200
+ state: a = pe.default,
201
+ name: s = "",
202
+ id: l = "",
203
203
  type: i = "text",
204
- label: l = "",
205
- containerClassName: h = "",
204
+ label: o = "",
205
+ containerClassName: f = "",
206
206
  inputClassName: u = "",
207
- labelClassName: p = "",
208
- helperText: C = "",
209
- helperTextClassName: g = "",
207
+ labelClassName: d = "",
208
+ helperText: b = "",
209
+ helperTextClassName: w = "",
210
210
  ...v
211
211
  } = e;
212
- return /* @__PURE__ */ N("label", { className: `input-check-container ${h}`, children: [
213
- /* @__PURE__ */ t(
212
+ return /* @__PURE__ */ $("label", { className: `input-check-container ${f}`, children: [
213
+ /* @__PURE__ */ c(
214
214
  "input",
215
215
  {
216
- id: c,
217
- ref: a,
218
- name: o,
216
+ id: l,
217
+ ref: t,
218
+ name: s,
219
219
  type: "checkbox",
220
- checked: s,
220
+ checked: r,
221
221
  onChange: n,
222
222
  className: `input-check ${u}`,
223
223
  ...v
224
224
  }
225
225
  ),
226
- /* @__PURE__ */ t("span", { className: `input-check-label ${p}`, children: l })
226
+ /* @__PURE__ */ c("span", { className: `input-check-label ${d}`, children: o })
227
227
  ] });
228
228
  });
229
- const ie = j(function(e, a) {
229
+ var pt = !1;
230
+ function mt(e) {
231
+ if (e.sheet)
232
+ return e.sheet;
233
+ for (var t = 0; t < document.styleSheets.length; t++)
234
+ if (document.styleSheets[t].ownerNode === e)
235
+ return document.styleSheets[t];
236
+ }
237
+ function bt(e) {
238
+ var t = document.createElement("style");
239
+ return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
240
+ }
241
+ var gt = /* @__PURE__ */ function() {
242
+ function e(r) {
243
+ var n = this;
244
+ this._insertTag = function(a) {
245
+ var s;
246
+ n.tags.length === 0 ? n.insertionPoint ? s = n.insertionPoint.nextSibling : n.prepend ? s = n.container.firstChild : s = n.before : s = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(a, s), n.tags.push(a);
247
+ }, this.isSpeedy = r.speedy === void 0 ? !pt : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
248
+ }
249
+ var t = e.prototype;
250
+ return t.hydrate = function(n) {
251
+ n.forEach(this._insertTag);
252
+ }, t.insert = function(n) {
253
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(bt(this));
254
+ var a = this.tags[this.tags.length - 1];
255
+ if (this.isSpeedy) {
256
+ var s = mt(a);
257
+ try {
258
+ s.insertRule(n, s.cssRules.length);
259
+ } catch {
260
+ }
261
+ } else
262
+ a.appendChild(document.createTextNode(n));
263
+ this.ctr++;
264
+ }, t.flush = function() {
265
+ this.tags.forEach(function(n) {
266
+ var a;
267
+ return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
268
+ }), this.tags = [], this.ctr = 0;
269
+ }, e;
270
+ }(), P = "-ms-", fe = "-moz-", y = "-webkit-", Ke = "comm", ke = "rule", Ee = "decl", vt = "@import", Ye = "@keyframes", wt = "@layer", Ct = Math.abs, me = String.fromCharCode, yt = Object.assign;
271
+ function Nt(e, t) {
272
+ return A(e, 0) ^ 45 ? (((t << 2 ^ A(e, 0)) << 2 ^ A(e, 1)) << 2 ^ A(e, 2)) << 2 ^ A(e, 3) : 0;
273
+ }
274
+ function Ze(e) {
275
+ return e.trim();
276
+ }
277
+ function xt(e, t) {
278
+ return (e = t.exec(e)) ? e[0] : e;
279
+ }
280
+ function N(e, t, r) {
281
+ return e.replace(t, r);
282
+ }
283
+ function ye(e, t) {
284
+ return e.indexOf(t);
285
+ }
286
+ function A(e, t) {
287
+ return e.charCodeAt(t) | 0;
288
+ }
289
+ function re(e, t, r) {
290
+ return e.slice(t, r);
291
+ }
292
+ function j(e) {
293
+ return e.length;
294
+ }
295
+ function Ae(e) {
296
+ return e.length;
297
+ }
298
+ function ie(e, t) {
299
+ return t.push(e), e;
300
+ }
301
+ function $t(e, t) {
302
+ return e.map(t).join("");
303
+ }
304
+ var be = 1, J = 1, Je = 0, L = 0, k = 0, Q = "";
305
+ function ge(e, t, r, n, a, s, l) {
306
+ return { value: e, root: t, parent: r, type: n, props: a, children: s, line: be, column: J, length: l, return: "" };
307
+ }
308
+ function ee(e, t) {
309
+ return yt(ge("", null, null, "", null, null, 0), e, { length: -e.length }, t);
310
+ }
311
+ function St() {
312
+ return k;
313
+ }
314
+ function kt() {
315
+ return k = L > 0 ? A(Q, --L) : 0, J--, k === 10 && (J = 1, be--), k;
316
+ }
317
+ function z() {
318
+ return k = L < Je ? A(Q, L++) : 0, J++, k === 10 && (J = 1, be++), k;
319
+ }
320
+ function B() {
321
+ return A(Q, L);
322
+ }
323
+ function oe() {
324
+ return L;
325
+ }
326
+ function ce(e, t) {
327
+ return re(Q, e, t);
328
+ }
329
+ function ae(e) {
330
+ switch (e) {
331
+ case 0:
332
+ case 9:
333
+ case 10:
334
+ case 13:
335
+ case 32:
336
+ return 5;
337
+ case 33:
338
+ case 43:
339
+ case 44:
340
+ case 47:
341
+ case 62:
342
+ case 64:
343
+ case 126:
344
+ case 59:
345
+ case 123:
346
+ case 125:
347
+ return 4;
348
+ case 58:
349
+ return 3;
350
+ case 34:
351
+ case 39:
352
+ case 40:
353
+ case 91:
354
+ return 2;
355
+ case 41:
356
+ case 93:
357
+ return 1;
358
+ }
359
+ return 0;
360
+ }
361
+ function Qe(e) {
362
+ return be = J = 1, Je = j(Q = e), L = 0, [];
363
+ }
364
+ function Xe(e) {
365
+ return Q = "", e;
366
+ }
367
+ function le(e) {
368
+ return Ze(ce(L - 1, Ne(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
369
+ }
370
+ function Et(e) {
371
+ for (; (k = B()) && k < 33; )
372
+ z();
373
+ return ae(e) > 2 || ae(k) > 3 ? "" : " ";
374
+ }
375
+ function At(e, t) {
376
+ for (; --t && z() && !(k < 48 || k > 102 || k > 57 && k < 65 || k > 70 && k < 97); )
377
+ ;
378
+ return ce(e, oe() + (t < 6 && B() == 32 && z() == 32));
379
+ }
380
+ function Ne(e) {
381
+ for (; z(); )
382
+ switch (k) {
383
+ case e:
384
+ return L;
385
+ case 34:
386
+ case 39:
387
+ e !== 34 && e !== 39 && Ne(k);
388
+ break;
389
+ case 40:
390
+ e === 41 && Ne(e);
391
+ break;
392
+ case 92:
393
+ z();
394
+ break;
395
+ }
396
+ return L;
397
+ }
398
+ function Pt(e, t) {
399
+ for (; z() && e + k !== 47 + 10; )
400
+ if (e + k === 42 + 42 && B() === 47)
401
+ break;
402
+ return "/*" + ce(t, L - 1) + "*" + me(e === 47 ? e : z());
403
+ }
404
+ function Ot(e) {
405
+ for (; !ae(B()); )
406
+ z();
407
+ return ce(e, L);
408
+ }
409
+ function Tt(e) {
410
+ return Xe(ue("", null, null, null, [""], e = Qe(e), 0, [0], e));
411
+ }
412
+ function ue(e, t, r, n, a, s, l, i, o) {
413
+ for (var f = 0, u = 0, d = l, b = 0, w = 0, v = 0, m = 1, h = 1, p = 1, x = 0, S = "", T = a, E = s, R = n, C = S; h; )
414
+ switch (v = x, x = z()) {
415
+ case 40:
416
+ if (v != 108 && A(C, d - 1) == 58) {
417
+ ye(C += N(le(x), "&", "&\f"), "&\f") != -1 && (p = -1);
418
+ break;
419
+ }
420
+ case 34:
421
+ case 39:
422
+ case 91:
423
+ C += le(x);
424
+ break;
425
+ case 9:
426
+ case 10:
427
+ case 13:
428
+ case 32:
429
+ C += Et(v);
430
+ break;
431
+ case 92:
432
+ C += At(oe() - 1, 7);
433
+ continue;
434
+ case 47:
435
+ switch (B()) {
436
+ case 42:
437
+ case 47:
438
+ ie(Rt(Pt(z(), oe()), t, r), o);
439
+ break;
440
+ default:
441
+ C += "/";
442
+ }
443
+ break;
444
+ case 123 * m:
445
+ i[f++] = j(C) * p;
446
+ case 125 * m:
447
+ case 59:
448
+ case 0:
449
+ switch (x) {
450
+ case 0:
451
+ case 125:
452
+ h = 0;
453
+ case 59 + u:
454
+ p == -1 && (C = N(C, /\f/g, "")), w > 0 && j(C) - d && ie(w > 32 ? ze(C + ";", n, r, d - 1) : ze(N(C, " ", "") + ";", n, r, d - 2), o);
455
+ break;
456
+ case 59:
457
+ C += ";";
458
+ default:
459
+ if (ie(R = De(C, t, r, f, u, a, i, S, T = [], E = [], d), s), x === 123)
460
+ if (u === 0)
461
+ ue(C, t, R, R, T, s, d, i, E);
462
+ else
463
+ switch (b === 99 && A(C, 3) === 110 ? 100 : b) {
464
+ case 100:
465
+ case 108:
466
+ case 109:
467
+ case 115:
468
+ ue(e, R, R, n && ie(De(e, R, R, 0, 0, a, i, S, a, T = [], d), E), a, E, d, i, n ? T : E);
469
+ break;
470
+ default:
471
+ ue(C, R, R, R, [""], E, 0, i, E);
472
+ }
473
+ }
474
+ f = u = w = 0, m = p = 1, S = C = "", d = l;
475
+ break;
476
+ case 58:
477
+ d = 1 + j(C), w = v;
478
+ default:
479
+ if (m < 1) {
480
+ if (x == 123)
481
+ --m;
482
+ else if (x == 125 && m++ == 0 && kt() == 125)
483
+ continue;
484
+ }
485
+ switch (C += me(x), x * m) {
486
+ case 38:
487
+ p = u > 0 ? 1 : (C += "\f", -1);
488
+ break;
489
+ case 44:
490
+ i[f++] = (j(C) - 1) * p, p = 1;
491
+ break;
492
+ case 64:
493
+ B() === 45 && (C += le(z())), b = B(), u = d = j(S = C += Ot(oe())), x++;
494
+ break;
495
+ case 45:
496
+ v === 45 && j(C) == 2 && (m = 0);
497
+ }
498
+ }
499
+ return s;
500
+ }
501
+ function De(e, t, r, n, a, s, l, i, o, f, u) {
502
+ for (var d = a - 1, b = a === 0 ? s : [""], w = Ae(b), v = 0, m = 0, h = 0; v < n; ++v)
503
+ for (var p = 0, x = re(e, d + 1, d = Ct(m = l[v])), S = e; p < w; ++p)
504
+ (S = Ze(m > 0 ? b[p] + " " + x : N(x, /&\f/g, b[p]))) && (o[h++] = S);
505
+ return ge(e, t, r, a === 0 ? ke : i, o, f, u);
506
+ }
507
+ function Rt(e, t, r) {
508
+ return ge(e, t, r, Ke, me(St()), re(e, 2, -2), 0);
509
+ }
510
+ function ze(e, t, r, n) {
511
+ return ge(e, t, r, Ee, re(e, 0, n), re(e, n + 1, -1), n);
512
+ }
513
+ function Y(e, t) {
514
+ for (var r = "", n = Ae(e), a = 0; a < n; a++)
515
+ r += t(e[a], a, e, t) || "";
516
+ return r;
517
+ }
518
+ function Ft(e, t, r, n) {
519
+ switch (e.type) {
520
+ case wt:
521
+ if (e.children.length)
522
+ break;
523
+ case vt:
524
+ case Ee:
525
+ return e.return = e.return || e.value;
526
+ case Ke:
527
+ return "";
528
+ case Ye:
529
+ return e.return = e.value + "{" + Y(e.children, n) + "}";
530
+ case ke:
531
+ e.value = e.props.join(",");
532
+ }
533
+ return j(r = Y(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
534
+ }
535
+ function Lt(e) {
536
+ var t = Ae(e);
537
+ return function(r, n, a, s) {
538
+ for (var l = "", i = 0; i < t; i++)
539
+ l += e[i](r, n, a, s) || "";
540
+ return l;
541
+ };
542
+ }
543
+ function Dt(e) {
544
+ return function(t) {
545
+ t.root || (t = t.return) && e(t);
546
+ };
547
+ }
548
+ function zt(e) {
549
+ var t = /* @__PURE__ */ Object.create(null);
550
+ return function(r) {
551
+ return t[r] === void 0 && (t[r] = e(r)), t[r];
552
+ };
553
+ }
554
+ var Mt = function(t, r, n) {
555
+ for (var a = 0, s = 0; a = s, s = B(), a === 38 && s === 12 && (r[n] = 1), !ae(s); )
556
+ z();
557
+ return ce(t, L);
558
+ }, Wt = function(t, r) {
559
+ var n = -1, a = 44;
560
+ do
561
+ switch (ae(a)) {
562
+ case 0:
563
+ a === 38 && B() === 12 && (r[n] = 1), t[n] += Mt(L - 1, r, n);
564
+ break;
565
+ case 2:
566
+ t[n] += le(a);
567
+ break;
568
+ case 4:
569
+ if (a === 44) {
570
+ t[++n] = B() === 58 ? "&\f" : "", r[n] = t[n].length;
571
+ break;
572
+ }
573
+ default:
574
+ t[n] += me(a);
575
+ }
576
+ while (a = z());
577
+ return t;
578
+ }, jt = function(t, r) {
579
+ return Xe(Wt(Qe(t), r));
580
+ }, Me = /* @__PURE__ */ new WeakMap(), It = function(t) {
581
+ if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
582
+ // negative .length indicates that this rule has been already prefixed
583
+ t.length < 1)) {
584
+ for (var r = t.value, n = t.parent, a = t.column === n.column && t.line === n.line; n.type !== "rule"; )
585
+ if (n = n.parent, !n)
586
+ return;
587
+ if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !Me.get(n)) && !a) {
588
+ Me.set(t, !0);
589
+ for (var s = [], l = jt(r, s), i = n.props, o = 0, f = 0; o < l.length; o++)
590
+ for (var u = 0; u < i.length; u++, f++)
591
+ t.props[f] = s[o] ? l[o].replace(/&\f/g, i[u]) : i[u] + " " + l[o];
592
+ }
593
+ }
594
+ }, Bt = function(t) {
595
+ if (t.type === "decl") {
596
+ var r = t.value;
597
+ // charcode for l
598
+ r.charCodeAt(0) === 108 && // charcode for b
599
+ r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
600
+ }
601
+ };
602
+ function et(e, t) {
603
+ switch (Nt(e, t)) {
604
+ case 5103:
605
+ return y + "print-" + e + e;
606
+ case 5737:
607
+ case 4201:
608
+ case 3177:
609
+ case 3433:
610
+ case 1641:
611
+ case 4457:
612
+ case 2921:
613
+ case 5572:
614
+ case 6356:
615
+ case 5844:
616
+ case 3191:
617
+ case 6645:
618
+ case 3005:
619
+ case 6391:
620
+ case 5879:
621
+ case 5623:
622
+ case 6135:
623
+ case 4599:
624
+ case 4855:
625
+ case 4215:
626
+ case 6389:
627
+ case 5109:
628
+ case 5365:
629
+ case 5621:
630
+ case 3829:
631
+ return y + e + e;
632
+ case 5349:
633
+ case 4246:
634
+ case 4810:
635
+ case 6968:
636
+ case 2756:
637
+ return y + e + fe + e + P + e + e;
638
+ case 6828:
639
+ case 4268:
640
+ return y + e + P + e + e;
641
+ case 6165:
642
+ return y + e + P + "flex-" + e + e;
643
+ case 5187:
644
+ return y + e + N(e, /(\w+).+(:[^]+)/, y + "box-$1$2" + P + "flex-$1$2") + e;
645
+ case 5443:
646
+ return y + e + P + "flex-item-" + N(e, /flex-|-self/, "") + e;
647
+ case 4675:
648
+ return y + e + P + "flex-line-pack" + N(e, /align-content|flex-|-self/, "") + e;
649
+ case 5548:
650
+ return y + e + P + N(e, "shrink", "negative") + e;
651
+ case 5292:
652
+ return y + e + P + N(e, "basis", "preferred-size") + e;
653
+ case 6060:
654
+ return y + "box-" + N(e, "-grow", "") + y + e + P + N(e, "grow", "positive") + e;
655
+ case 4554:
656
+ return y + N(e, /([^-])(transform)/g, "$1" + y + "$2") + e;
657
+ case 6187:
658
+ return N(N(N(e, /(zoom-|grab)/, y + "$1"), /(image-set)/, y + "$1"), e, "") + e;
659
+ case 5495:
660
+ case 3959:
661
+ return N(e, /(image-set\([^]*)/, y + "$1$`$1");
662
+ case 4968:
663
+ return N(N(e, /(.+:)(flex-)?(.*)/, y + "box-pack:$3" + P + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + y + e + e;
664
+ case 4095:
665
+ case 3583:
666
+ case 4068:
667
+ case 2532:
668
+ return N(e, /(.+)-inline(.+)/, y + "$1$2") + e;
669
+ case 8116:
670
+ case 7059:
671
+ case 5753:
672
+ case 5535:
673
+ case 5445:
674
+ case 5701:
675
+ case 4933:
676
+ case 4677:
677
+ case 5533:
678
+ case 5789:
679
+ case 5021:
680
+ case 4765:
681
+ if (j(e) - 1 - t > 6)
682
+ switch (A(e, t + 1)) {
683
+ case 109:
684
+ if (A(e, t + 4) !== 45)
685
+ break;
686
+ case 102:
687
+ return N(e, /(.+:)(.+)-([^]+)/, "$1" + y + "$2-$3$1" + fe + (A(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
688
+ case 115:
689
+ return ~ye(e, "stretch") ? et(N(e, "stretch", "fill-available"), t) + e : e;
690
+ }
691
+ break;
692
+ case 4949:
693
+ if (A(e, t + 1) !== 115)
694
+ break;
695
+ case 6444:
696
+ switch (A(e, j(e) - 3 - (~ye(e, "!important") && 10))) {
697
+ case 107:
698
+ return N(e, ":", ":" + y) + e;
699
+ case 101:
700
+ return N(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + y + (A(e, 14) === 45 ? "inline-" : "") + "box$3$1" + y + "$2$3$1" + P + "$2box$3") + e;
701
+ }
702
+ break;
703
+ case 5936:
704
+ switch (A(e, t + 11)) {
705
+ case 114:
706
+ return y + e + P + N(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
707
+ case 108:
708
+ return y + e + P + N(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
709
+ case 45:
710
+ return y + e + P + N(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
711
+ }
712
+ return y + e + P + e + e;
713
+ }
714
+ return e;
715
+ }
716
+ var _t = function(t, r, n, a) {
717
+ if (t.length > -1 && !t.return)
718
+ switch (t.type) {
719
+ case Ee:
720
+ t.return = et(t.value, t.length);
721
+ break;
722
+ case Ye:
723
+ return Y([ee(t, {
724
+ value: N(t.value, "@", "@" + y)
725
+ })], a);
726
+ case ke:
727
+ if (t.length)
728
+ return $t(t.props, function(s) {
729
+ switch (xt(s, /(::plac\w+|:read-\w+)/)) {
730
+ case ":read-only":
731
+ case ":read-write":
732
+ return Y([ee(t, {
733
+ props: [N(s, /:(read-\w+)/, ":" + fe + "$1")]
734
+ })], a);
735
+ case "::placeholder":
736
+ return Y([ee(t, {
737
+ props: [N(s, /:(plac\w+)/, ":" + y + "input-$1")]
738
+ }), ee(t, {
739
+ props: [N(s, /:(plac\w+)/, ":" + fe + "$1")]
740
+ }), ee(t, {
741
+ props: [N(s, /:(plac\w+)/, P + "input-$1")]
742
+ })], a);
743
+ }
744
+ return "";
745
+ });
746
+ }
747
+ }, Gt = [_t], Ht = function(t) {
748
+ var r = t.key;
749
+ if (r === "css") {
750
+ var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
751
+ Array.prototype.forEach.call(n, function(m) {
752
+ var h = m.getAttribute("data-emotion");
753
+ h.indexOf(" ") !== -1 && (document.head.appendChild(m), m.setAttribute("data-s", ""));
754
+ });
755
+ }
756
+ var a = t.stylisPlugins || Gt, s = {}, l, i = [];
757
+ l = t.container || document.head, Array.prototype.forEach.call(
758
+ // this means we will ignore elements which don't have a space in them which
759
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
760
+ document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
761
+ function(m) {
762
+ for (var h = m.getAttribute("data-emotion").split(" "), p = 1; p < h.length; p++)
763
+ s[h[p]] = !0;
764
+ i.push(m);
765
+ }
766
+ );
767
+ var o, f = [It, Bt];
768
+ {
769
+ var u, d = [Ft, Dt(function(m) {
770
+ u.insert(m);
771
+ })], b = Lt(f.concat(a, d)), w = function(h) {
772
+ return Y(Tt(h), b);
773
+ };
774
+ o = function(h, p, x, S) {
775
+ u = x, w(h ? h + "{" + p.styles + "}" : p.styles), S && (v.inserted[p.name] = !0);
776
+ };
777
+ }
778
+ var v = {
779
+ key: r,
780
+ sheet: new gt({
781
+ key: r,
782
+ container: l,
783
+ nonce: t.nonce,
784
+ speedy: t.speedy,
785
+ prepend: t.prepend,
786
+ insertionPoint: t.insertionPoint
787
+ }),
788
+ nonce: t.nonce,
789
+ inserted: s,
790
+ registered: {},
791
+ insert: o
792
+ };
793
+ return v.sheet.hydrate(i), v;
794
+ };
795
+ function Ut(e) {
796
+ for (var t = 0, r, n = 0, a = e.length; a >= 4; ++n, a -= 4)
797
+ r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
798
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
799
+ r >>> 24, t = /* Math.imul(k, m): */
800
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
801
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
802
+ switch (a) {
803
+ case 3:
804
+ t ^= (e.charCodeAt(n + 2) & 255) << 16;
805
+ case 2:
806
+ t ^= (e.charCodeAt(n + 1) & 255) << 8;
807
+ case 1:
808
+ t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
809
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
810
+ }
811
+ return t ^= t >>> 13, t = /* Math.imul(h, m): */
812
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
813
+ }
814
+ var Vt = {
815
+ animationIterationCount: 1,
816
+ aspectRatio: 1,
817
+ borderImageOutset: 1,
818
+ borderImageSlice: 1,
819
+ borderImageWidth: 1,
820
+ boxFlex: 1,
821
+ boxFlexGroup: 1,
822
+ boxOrdinalGroup: 1,
823
+ columnCount: 1,
824
+ columns: 1,
825
+ flex: 1,
826
+ flexGrow: 1,
827
+ flexPositive: 1,
828
+ flexShrink: 1,
829
+ flexNegative: 1,
830
+ flexOrder: 1,
831
+ gridRow: 1,
832
+ gridRowEnd: 1,
833
+ gridRowSpan: 1,
834
+ gridRowStart: 1,
835
+ gridColumn: 1,
836
+ gridColumnEnd: 1,
837
+ gridColumnSpan: 1,
838
+ gridColumnStart: 1,
839
+ msGridRow: 1,
840
+ msGridRowSpan: 1,
841
+ msGridColumn: 1,
842
+ msGridColumnSpan: 1,
843
+ fontWeight: 1,
844
+ lineHeight: 1,
845
+ opacity: 1,
846
+ order: 1,
847
+ orphans: 1,
848
+ scale: 1,
849
+ tabSize: 1,
850
+ widows: 1,
851
+ zIndex: 1,
852
+ zoom: 1,
853
+ WebkitLineClamp: 1,
854
+ // SVG-related properties
855
+ fillOpacity: 1,
856
+ floodOpacity: 1,
857
+ stopOpacity: 1,
858
+ strokeDasharray: 1,
859
+ strokeDashoffset: 1,
860
+ strokeMiterlimit: 1,
861
+ strokeOpacity: 1,
862
+ strokeWidth: 1
863
+ }, qt = !1, Kt = /[A-Z]|^ms/g, Yt = /_EMO_([^_]+?)_([^]*?)_EMO_/g, tt = function(t) {
864
+ return t.charCodeAt(1) === 45;
865
+ }, We = function(t) {
866
+ return t != null && typeof t != "boolean";
867
+ }, we = /* @__PURE__ */ zt(function(e) {
868
+ return tt(e) ? e : e.replace(Kt, "-$&").toLowerCase();
869
+ }), je = function(t, r) {
870
+ switch (t) {
871
+ case "animation":
872
+ case "animationName":
873
+ if (typeof r == "string")
874
+ return r.replace(Yt, function(n, a, s) {
875
+ return I = {
876
+ name: a,
877
+ styles: s,
878
+ next: I
879
+ }, a;
880
+ });
881
+ }
882
+ return Vt[t] !== 1 && !tt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
883
+ }, Zt = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
884
+ function se(e, t, r) {
885
+ if (r == null)
886
+ return "";
887
+ var n = r;
888
+ if (n.__emotion_styles !== void 0)
889
+ return n;
890
+ switch (typeof r) {
891
+ case "boolean":
892
+ return "";
893
+ case "object": {
894
+ var a = r;
895
+ if (a.anim === 1)
896
+ return I = {
897
+ name: a.name,
898
+ styles: a.styles,
899
+ next: I
900
+ }, a.name;
901
+ var s = r;
902
+ if (s.styles !== void 0) {
903
+ var l = s.next;
904
+ if (l !== void 0)
905
+ for (; l !== void 0; )
906
+ I = {
907
+ name: l.name,
908
+ styles: l.styles,
909
+ next: I
910
+ }, l = l.next;
911
+ var i = s.styles + ";";
912
+ return i;
913
+ }
914
+ return Jt(e, t, r);
915
+ }
916
+ case "function": {
917
+ if (e !== void 0) {
918
+ var o = I, f = r(e);
919
+ return I = o, se(e, t, f);
920
+ }
921
+ break;
922
+ }
923
+ }
924
+ var u = r;
925
+ if (t == null)
926
+ return u;
927
+ var d = t[u];
928
+ return d !== void 0 ? d : u;
929
+ }
930
+ function Jt(e, t, r) {
931
+ var n = "";
932
+ if (Array.isArray(r))
933
+ for (var a = 0; a < r.length; a++)
934
+ n += se(e, t, r[a]) + ";";
935
+ else
936
+ for (var s in r) {
937
+ var l = r[s];
938
+ if (typeof l != "object") {
939
+ var i = l;
940
+ t != null && t[i] !== void 0 ? n += s + "{" + t[i] + "}" : We(i) && (n += we(s) + ":" + je(s, i) + ";");
941
+ } else {
942
+ if (s === "NO_COMPONENT_SELECTOR" && qt)
943
+ throw new Error(Zt);
944
+ if (Array.isArray(l) && typeof l[0] == "string" && (t == null || t[l[0]] === void 0))
945
+ for (var o = 0; o < l.length; o++)
946
+ We(l[o]) && (n += we(s) + ":" + je(s, l[o]) + ";");
947
+ else {
948
+ var f = se(e, t, l);
949
+ switch (s) {
950
+ case "animation":
951
+ case "animationName": {
952
+ n += we(s) + ":" + f + ";";
953
+ break;
954
+ }
955
+ default:
956
+ n += s + "{" + f + "}";
957
+ }
958
+ }
959
+ }
960
+ }
961
+ return n;
962
+ }
963
+ var Ie = /label:\s*([^\s;{]+)\s*(;|$)/g, I;
964
+ function Ce(e, t, r) {
965
+ if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
966
+ return e[0];
967
+ var n = !0, a = "";
968
+ I = void 0;
969
+ var s = e[0];
970
+ if (s == null || s.raw === void 0)
971
+ n = !1, a += se(r, t, s);
972
+ else {
973
+ var l = s;
974
+ a += l[0];
975
+ }
976
+ for (var i = 1; i < e.length; i++)
977
+ if (a += se(r, t, e[i]), n) {
978
+ var o = s;
979
+ a += o[i];
980
+ }
981
+ Ie.lastIndex = 0;
982
+ for (var f = "", u; (u = Ie.exec(a)) !== null; )
983
+ f += "-" + u[1];
984
+ var d = Ut(a) + f;
985
+ return {
986
+ name: d,
987
+ styles: a,
988
+ next: I
989
+ };
990
+ }
991
+ var Qt = !0;
992
+ function nt(e, t, r) {
993
+ var n = "";
994
+ return r.split(" ").forEach(function(a) {
995
+ e[a] !== void 0 ? t.push(e[a] + ";") : a && (n += a + " ");
996
+ }), n;
997
+ }
998
+ var Xt = function(t, r, n) {
999
+ var a = t.key + "-" + r.name;
1000
+ // we only need to add the styles to the registered cache if the
1001
+ // class name could be used further down
1002
+ // the tree but if it's a string tag, we know it won't
1003
+ // so we don't have to add it to registered cache.
1004
+ // this improves memory usage since we can avoid storing the whole style string
1005
+ (n === !1 || // we need to always store it if we're in compat mode and
1006
+ // in node since emotion-server relies on whether a style is in
1007
+ // the registered cache to know whether a style is global or not
1008
+ // also, note that this check will be dead code eliminated in the browser
1009
+ Qt === !1) && t.registered[a] === void 0 && (t.registered[a] = r.styles);
1010
+ }, en = function(t, r, n) {
1011
+ Xt(t, r, n);
1012
+ var a = t.key + "-" + r.name;
1013
+ if (t.inserted[r.name] === void 0) {
1014
+ var s = r;
1015
+ do
1016
+ t.insert(r === s ? "." + a : "", s, t.sheet, !0), s = s.next;
1017
+ while (s !== void 0);
1018
+ }
1019
+ };
1020
+ function Be(e, t) {
1021
+ if (e.inserted[t.name] === void 0)
1022
+ return e.insert("", t, e.sheet, !0);
1023
+ }
1024
+ function _e(e, t, r) {
1025
+ var n = [], a = nt(e, n, r);
1026
+ return n.length < 2 ? r : a + t(n);
1027
+ }
1028
+ var tn = function(t) {
1029
+ var r = Ht(t);
1030
+ r.sheet.speedy = function(i) {
1031
+ this.isSpeedy = i;
1032
+ }, r.compat = !0;
1033
+ var n = function() {
1034
+ for (var o = arguments.length, f = new Array(o), u = 0; u < o; u++)
1035
+ f[u] = arguments[u];
1036
+ var d = Ce(f, r.registered, void 0);
1037
+ return en(r, d, !1), r.key + "-" + d.name;
1038
+ }, a = function() {
1039
+ for (var o = arguments.length, f = new Array(o), u = 0; u < o; u++)
1040
+ f[u] = arguments[u];
1041
+ var d = Ce(f, r.registered), b = "animation-" + d.name;
1042
+ return Be(r, {
1043
+ name: d.name,
1044
+ styles: "@keyframes " + b + "{" + d.styles + "}"
1045
+ }), b;
1046
+ }, s = function() {
1047
+ for (var o = arguments.length, f = new Array(o), u = 0; u < o; u++)
1048
+ f[u] = arguments[u];
1049
+ var d = Ce(f, r.registered);
1050
+ Be(r, d);
1051
+ }, l = function() {
1052
+ for (var o = arguments.length, f = new Array(o), u = 0; u < o; u++)
1053
+ f[u] = arguments[u];
1054
+ return _e(r.registered, n, nn(f));
1055
+ };
1056
+ return {
1057
+ css: n,
1058
+ cx: l,
1059
+ injectGlobal: s,
1060
+ keyframes: a,
1061
+ hydrate: function(o) {
1062
+ o.forEach(function(f) {
1063
+ r.inserted[f] = !0;
1064
+ });
1065
+ },
1066
+ flush: function() {
1067
+ r.registered = {}, r.inserted = {}, r.sheet.flush();
1068
+ },
1069
+ sheet: r.sheet,
1070
+ cache: r,
1071
+ getRegisteredStyles: nt.bind(null, r.registered),
1072
+ merge: _e.bind(null, r.registered, n)
1073
+ };
1074
+ }, nn = function e(t) {
1075
+ for (var r = "", n = 0; n < t.length; n++) {
1076
+ var a = t[n];
1077
+ if (a != null) {
1078
+ var s = void 0;
1079
+ switch (typeof a) {
1080
+ case "boolean":
1081
+ break;
1082
+ case "object": {
1083
+ if (Array.isArray(a))
1084
+ s = e(a);
1085
+ else {
1086
+ s = "";
1087
+ for (var l in a)
1088
+ a[l] && l && (s && (s += " "), s += l);
1089
+ }
1090
+ break;
1091
+ }
1092
+ default:
1093
+ s = a;
1094
+ }
1095
+ s && (r && (r += " "), r += s);
1096
+ }
1097
+ }
1098
+ return r;
1099
+ }, rn = tn({
1100
+ key: "css"
1101
+ }), an = rn.css;
1102
+ const sn = he(function(e, t) {
1103
+ var Te, Re, Fe;
230
1104
  const {
231
- state: s,
1105
+ state: r,
232
1106
  value: n,
233
- onChange: r,
234
- options: o = [],
235
- name: c = "",
1107
+ onChange: a,
1108
+ options: s = [],
1109
+ name: l = "",
236
1110
  id: i = "",
237
- label: l = "",
238
- containerClassName: h = "",
1111
+ label: o = "",
1112
+ containerClassName: f = "",
239
1113
  inputContainerClassName: u = "",
240
- helperText: p = "",
241
- placeholder: C = "",
242
- multiple: g = !1,
1114
+ helperText: d = "",
1115
+ placeholder: b = "",
1116
+ multiple: w = !1,
243
1117
  ...v
244
- } = e, [f, d] = P(""), [m, w] = P(!1), y = o.filter((b) => {
245
- const x = String(b.value).toLowerCase().includes(f == null ? void 0 : f.toLowerCase());
246
- return n && n.length ? n != null && n.some ? !(n != null && n.some((H) => H.id === b.id)) : (n == null ? void 0 : n.id) !== b.id : x;
247
- }), _ = B(null);
248
- R(() => {
249
- const b = (z) => {
250
- _.current && !_.current.contains(z.target) && w(!1);
251
- }, x = (z) => {
252
- z.key === "Escape" && w(!1);
1118
+ } = e, [m, h] = W(""), [p, x] = W(!1), S = s.filter((g) => {
1119
+ const O = String(g.value).toLowerCase().includes(m == null ? void 0 : m.toLowerCase());
1120
+ return n && n.length ? n != null && n.some ? !(n != null && n.some((q) => q.id === g.id)) : (n == null ? void 0 : n.id) !== g.id : O;
1121
+ }), T = V(null), E = V(null), [R, C] = W(!1), Pe = V(null);
1122
+ ne(() => {
1123
+ const g = (M) => {
1124
+ T.current && !T.current.contains(M.target) && x(!1);
1125
+ }, O = (M) => {
1126
+ M.key === "Escape" && x(!1);
253
1127
  };
254
- return document.addEventListener("mousedown", b), document.addEventListener("keydown", x), () => {
255
- document.removeEventListener("mousedown", b), document.removeEventListener("keydown", x);
1128
+ return document.addEventListener("mousedown", g), document.addEventListener("keydown", O), () => {
1129
+ document.removeEventListener("mousedown", g), document.removeEventListener("keydown", O);
256
1130
  };
257
1131
  }, []);
258
- const A = (b) => {
259
- d(b.target.value);
260
- }, J = k(
261
- (b) => {
262
- d(""), b ? g ? Array.isArray(n) && n.length ? r([...n, b]) : r([b]) : r(b) : r(null), w(!1);
1132
+ const ct = (g) => {
1133
+ h(g.target.value);
1134
+ }, Oe = D(
1135
+ (g) => {
1136
+ h(""), g ? w ? Array.isArray(n) && n.length ? a([...n, g]) : a([g]) : a(g) : a(null), x(!1);
263
1137
  },
264
- [g, r, n]
265
- ), te = k(
266
- (b) => {
267
- const x = n.filter((z, H) => H !== b);
268
- x.length ? r(x) : r(null);
1138
+ [w, a, n]
1139
+ ), ve = D(
1140
+ (g) => {
1141
+ if (g != null) {
1142
+ const O = n.filter((M, q) => q !== g);
1143
+ O.length ? a(O) : a(null);
1144
+ } else
1145
+ a(null);
269
1146
  },
270
- [r, n]
1147
+ [a, n]
271
1148
  );
272
- return /* @__PURE__ */ N(
1149
+ return ne(() => {
1150
+ var M, q, Le;
1151
+ const g = ((M = Pe.current) == null ? void 0 : M.offsetWidth) ?? 0, O = ((Le = (q = t ?? E) == null ? void 0 : q.current) == null ? void 0 : Le.offsetWidth) ?? 0;
1152
+ console.log(g, O, g > O * 0.4), g > O * 0.4 ? C(!0) : C(!1);
1153
+ }, [n]), /* @__PURE__ */ $(
273
1154
  "div",
274
1155
  {
275
- className: `autocomplete-input-container ${h}`,
276
- ref: _,
1156
+ className: `autocomplete-input-container ${f}`,
1157
+ ref: T,
277
1158
  children: [
278
- /* @__PURE__ */ t(
279
- D,
280
- {
281
- state: s,
282
- name: c,
283
- id: i,
284
- value: !g && n ? n.value ?? n.name : f,
285
- onChange: A,
286
- placeholder: C,
287
- helperText: p,
288
- onFocus: () => w(!0),
289
- label: l,
290
- containerClassName: `autocomplete-text-input ${u}`,
291
- ref: a,
292
- ...v,
293
- children: !g && n && /* @__PURE__ */ t(
294
- "button",
1159
+ /* @__PURE__ */ $("div", { className: "autocomplete-value-input-container", children: [
1160
+ /* @__PURE__ */ c(
1161
+ de,
1162
+ {
1163
+ state: r,
1164
+ name: l,
1165
+ id: i,
1166
+ value: !w && n ? n.value ?? n.name : m,
1167
+ onChange: ct,
1168
+ placeholder: b,
1169
+ helperText: d,
1170
+ onFocus: () => x(!0),
1171
+ label: o,
1172
+ containerClassName: `autocomplete-text-input ${u}`,
1173
+ ref: t ?? E,
1174
+ ...v,
1175
+ children: ((n == null ? void 0 : n.value) || (n == null ? void 0 : n.name)) && !w && /* @__PURE__ */ c(
1176
+ "button",
1177
+ {
1178
+ type: "button",
1179
+ className: "autocomplete-delete-button",
1180
+ onClick: (g) => {
1181
+ Oe(), g.stopPropagation();
1182
+ },
1183
+ children: /* @__PURE__ */ c(He, {})
1184
+ }
1185
+ )
1186
+ }
1187
+ ),
1188
+ w && Array.isArray(n) && n.length ? /* @__PURE__ */ c("ul", { ref: Pe, className: "autocomplete-value-container", children: R ? /* @__PURE__ */ $(te, { children: [
1189
+ /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
1190
+ Z,
295
1191
  {
296
- type: "button",
297
- className: "autocomplete-delete-button",
298
- onClick: (b) => {
299
- J(), b.stopPropagation();
300
- },
301
- children: /* @__PURE__ */ t(G, {})
1192
+ label: ((Te = n[0]) == null ? void 0 : Te.value) ?? ((Re = n[0]) == null ? void 0 : Re.name),
1193
+ onDelete: (g) => {
1194
+ ve(0), g.stopPropagation();
1195
+ }
1196
+ }
1197
+ ) }),
1198
+ n.length > 1 && /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
1199
+ Z,
1200
+ {
1201
+ label: `+${n.length - 1}`,
1202
+ onDelete: (g) => {
1203
+ ve(), g.stopPropagation();
1204
+ }
1205
+ }
1206
+ ) })
1207
+ ] }) : n.map((g, O) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
1208
+ Z,
1209
+ {
1210
+ label: String(g.value ?? g.name),
1211
+ onDelete: (M) => {
1212
+ ve(O), M.stopPropagation();
302
1213
  }
303
- )
304
- }
305
- ),
306
- m && /* @__PURE__ */ t("ul", { className: "autocomplete-suggestions-container", children: y.map((b) => /* @__PURE__ */ t(
307
- "li",
308
- {
309
- className: "autocomplete-suggestion-item",
310
- onClick: (x) => {
311
- J(b), x.stopPropagation();
312
- },
313
- children: b.value ?? b.name
314
- },
315
- b.id ?? b.value ?? b.name
316
- )) }),
317
- g && Array.isArray(n) && n.length ? /* @__PURE__ */ t("ul", { className: "autocomplete-value-container", children: n.map((b, x) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
318
- Te,
319
- {
320
- label: String(b.value ?? b.name),
321
- onDelete: (z) => {
322
- te(x), z.stopPropagation();
323
1214
  }
1215
+ ) }, g.id ?? g.value ?? g.name)) }) : null
1216
+ ] }),
1217
+ p && /* @__PURE__ */ c(
1218
+ "ul",
1219
+ {
1220
+ className: `autocomplete-suggestions-container ${an({ width: (Fe = T.current) == null ? void 0 : Fe.offsetWidth })}`,
1221
+ children: S.map((g) => /* @__PURE__ */ c(
1222
+ "li",
1223
+ {
1224
+ className: "autocomplete-suggestion-item",
1225
+ onClick: (O) => {
1226
+ Oe(g), O.stopPropagation();
1227
+ },
1228
+ children: g.value ?? g.name
1229
+ },
1230
+ g.id ?? g.value ?? g.name
1231
+ ))
324
1232
  }
325
- ) }, b.id ?? b.value ?? b.name)) }) : null
1233
+ )
326
1234
  ]
327
1235
  }
328
1236
  );
329
1237
  });
330
- function de(e) {
1238
+ function cn(e) {
331
1239
  const {
332
- color: a = "stroke-blue-800",
333
- className: s = "",
1240
+ color: t = "stroke-blue-800",
1241
+ className: r = "",
334
1242
  loaderClass: n = "",
335
- strokeWidth: r = "4",
336
- ...o
1243
+ strokeWidth: a = "4",
1244
+ ...s
337
1245
  } = e;
338
- return /* @__PURE__ */ t("div", { ...o, className: `loading ${s}`, children: /* @__PURE__ */ t("div", { className: "loader-container", children: /* @__PURE__ */ t("div", { className: `loader ${n}`, children: /* @__PURE__ */ t("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ t(
1246
+ return /* @__PURE__ */ c("div", { ...s, className: `loading ${r}`, children: /* @__PURE__ */ c("div", { className: "loader-container", children: /* @__PURE__ */ c("div", { className: `loader ${n}`, children: /* @__PURE__ */ c("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ c(
339
1247
  "circle",
340
1248
  {
341
- className: `path ${a}`,
1249
+ className: `path ${t}`,
342
1250
  cx: "50",
343
1251
  cy: "50",
344
1252
  r: "20",
345
1253
  fill: "none",
346
- strokeWidth: r,
1254
+ strokeWidth: a,
347
1255
  strokeMiterlimit: "10"
348
1256
  }
349
1257
  ) }) }) }) });
350
1258
  }
351
- const Y = I({});
352
- function Be(e) {
353
- const { children: a, t: s } = e;
354
- return /* @__PURE__ */ t(Y.Provider, { value: { t: s }, children: a });
1259
+ const rt = xe({});
1260
+ function zn(e) {
1261
+ const { children: t, t: r } = e;
1262
+ return /* @__PURE__ */ c(rt.Provider, { value: { t: r }, children: t });
355
1263
  }
356
- const O = () => {
357
- const e = W(Y);
1264
+ const G = () => {
1265
+ const e = $e(rt);
358
1266
  if (e === void 0)
359
1267
  throw new Error("translationContext must be used within a Provider");
360
1268
  return e;
361
1269
  };
362
- var E = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.number = 1] = "number", e[e.select = 2] = "select", e[e.autocomplete = 3] = "autocomplete", e[e.date = 4] = "date", e[e.check = 5] = "check", e))(E || {}), T = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(T || {});
363
- const ue = [20, 50, 100], Z = I({}), Me = (e) => {
364
- const { children: a } = e, [s, n] = P(0), [r, o] = P(20), [c, i] = P(0), [l, h] = P("id"), [u, p] = P(T.DESC), [C, g] = P({}), v = k(
365
- (m, w) => {
366
- let y = u;
367
- if (l === m)
1270
+ var U = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.number = 1] = "number", e[e.select = 2] = "select", e[e.autocomplete = 3] = "autocomplete", e[e.date = 4] = "date", e[e.check = 5] = "check", e))(U || {}), K = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(K || {});
1271
+ const on = [20, 50, 100], at = xe({}), Mn = (e) => {
1272
+ const { children: t } = e, [r, n] = W(0), [a, s] = W(20), [l, i] = W(0), [o, f] = W("id"), [u, d] = W(K.DESC), [b, w] = W({}), v = D(
1273
+ (S, T) => {
1274
+ let E = u;
1275
+ if (o === S)
368
1276
  switch (u) {
369
- case T.ASC:
370
- y = T.DESC;
1277
+ case K.ASC:
1278
+ E = K.DESC;
371
1279
  break;
372
1280
  default:
373
- y = T.ASC;
1281
+ E = K.ASC;
374
1282
  break;
375
1283
  }
376
- h(m), p(y), w && w(m, y);
1284
+ f(S), d(E), T && T(S, E);
377
1285
  },
378
- [l, u]
379
- ), f = k((m) => {
380
- const w = Object.entries(m).reduce(
381
- (y, [_, A]) => (A && typeof A.value < "u" && (y[_] = A.value), y),
1286
+ [o, u]
1287
+ ), m = D((S) => {
1288
+ const T = Object.entries(S).reduce(
1289
+ (E, [R, C]) => (C && typeof C.value < "u" && (E[R] = C.value), E),
382
1290
  {}
383
1291
  );
384
- g(w);
385
- }, []), d = {
1292
+ w(T);
1293
+ }, []), h = D(
1294
+ (S) => {
1295
+ S ? (delete b[S], w({ ...b })) : w({});
1296
+ },
1297
+ [b]
1298
+ ), p = F(() => Object.keys(b).length, [b]), x = {
386
1299
  onSort: v,
387
- total: s,
1300
+ total: r,
388
1301
  setTotal: n,
389
- sortingBy: l,
390
- setSortingBy: h,
1302
+ sortingBy: o,
1303
+ setSortingBy: f,
391
1304
  sortingOrder: u,
392
- setSortingOrder: p,
393
- pageSize: r,
394
- pageSizes: ue,
395
- setPageSize: o,
396
- currentPage: c,
1305
+ setSortingOrder: d,
1306
+ pageSize: a,
1307
+ pageSizes: on,
1308
+ setPageSize: s,
1309
+ currentPage: l,
397
1310
  setCurrentPage: i,
398
- filters: C,
399
- onFilterApply: f
1311
+ filters: b,
1312
+ onFilterApply: m,
1313
+ clearFilters: h,
1314
+ countOfFilters: p
400
1315
  };
401
- return /* @__PURE__ */ t(Z.Provider, { value: d, children: a });
402
- }, L = () => {
403
- const e = W(Z);
1316
+ return /* @__PURE__ */ c(at.Provider, { value: x, children: t });
1317
+ }, H = () => {
1318
+ const e = $e(at);
404
1319
  if (e === void 0)
405
1320
  throw new Error("tableOptionsContext must be used within a Provider");
406
1321
  return e;
407
1322
  };
408
- var $ = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))($ || {});
409
- const pe = (e) => {
1323
+ var _ = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(_ || {});
1324
+ const ln = (e) => {
410
1325
  if (e) {
411
- const a = {}, s = Object.keys(e);
412
- return s == null || s.forEach((n) => {
413
- a[n] = { value: e[n] };
414
- }), a;
1326
+ const t = {}, r = Object.keys(e);
1327
+ return r == null || r.forEach((n) => {
1328
+ t[n] = { value: e[n] };
1329
+ }), t;
415
1330
  }
416
1331
  return {};
417
1332
  };
418
- function he(e, a) {
419
- const { type: s } = a;
420
- switch (s) {
421
- case $.reset: {
422
- const { filters: n } = a, r = {};
423
- return n == null || n.forEach(({ propertyName: o, defaultValue: c }) => {
424
- r[o] = { value: c };
425
- }), { ...e, ...r };
426
- }
427
- case $.update: {
428
- const { toUpdate: n } = a;
1333
+ function un(e, t) {
1334
+ const { type: r } = t;
1335
+ switch (r) {
1336
+ case _.reset:
1337
+ return {};
1338
+ case _.update: {
1339
+ const { toUpdate: n } = t;
429
1340
  return { ...e, ...n };
430
1341
  }
431
1342
  default:
432
1343
  return e;
433
1344
  }
434
1345
  }
435
- const ee = I({}), me = (e) => {
436
- const { children: a } = e, { filters: s } = L(), [n, r] = ne(
437
- he,
438
- pe(s)
439
- ), o = {
1346
+ const st = xe({}), dn = (e) => {
1347
+ const { children: t } = e, { filters: r } = H(), [n, a] = it(
1348
+ un,
1349
+ ln(r)
1350
+ ), s = {
440
1351
  currentFilters: n,
441
- setCurrentFilters: r
1352
+ setCurrentFilters: a
442
1353
  };
443
- return /* @__PURE__ */ t(ee.Provider, { value: o, children: a });
444
- }, F = () => {
445
- const e = W(ee);
1354
+ return /* @__PURE__ */ c(st.Provider, { value: s, children: t });
1355
+ }, X = () => {
1356
+ const e = $e(st);
446
1357
  if (e === void 0)
447
1358
  throw new Error("tableOptionsContext must be used within a Provider");
448
1359
  return e;
449
1360
  };
450
- function be(e) {
451
- const { t: a } = O(), { entity: s = "", columns: n = [], hasAction: r = !0, onSortCallback: o } = e, { onSort: c, sortingOrder: i, sortingBy: l } = L(), h = S(() => {
1361
+ function fn(e) {
1362
+ const { t } = G(), { entity: r = "", columns: n = [], hasAction: a = !0, onSortCallback: s } = e, { onSort: l, sortingOrder: i, sortingBy: o } = H(), f = F(() => {
452
1363
  var u;
453
- return (u = n.sort((p, C) => (C.pos ?? 0) - (p.pos ?? 0)).filter((p) => p.display !== "none")) == null ? void 0 : u.map((p) => ({
454
- id: p.key,
455
- label: p.label,
456
- className: p.className ?? "",
457
- sortable: p.sortable ?? !0,
458
- sortOptions: p.sortOptions
1364
+ return (u = n.sort((d, b) => (b.pos ?? 0) - (d.pos ?? 0)).filter((d) => d.display !== "none")) == null ? void 0 : u.map((d) => ({
1365
+ id: d.key,
1366
+ label: d.label,
1367
+ className: d.className ?? "",
1368
+ sortable: d.sortable ?? !0,
1369
+ sortOptions: d.sortOptions
459
1370
  }));
460
- }, [n, s, a]);
461
- return /* @__PURE__ */ t("thead", { className: "table-headers-row", children: /* @__PURE__ */ N("tr", { children: [
462
- h.map((u) => {
463
- var p, C, g, v, f, d, m, w;
464
- return /* @__PURE__ */ t(
1371
+ }, [n, r, t]);
1372
+ return /* @__PURE__ */ c("thead", { className: "table-headers-row", children: /* @__PURE__ */ $("tr", { children: [
1373
+ f.map((u) => {
1374
+ var d, b, w, v, m, h, p, x;
1375
+ return /* @__PURE__ */ c(
465
1376
  "th",
466
1377
  {
467
1378
  scope: "col",
468
1379
  className: `table-headers-column ${u.className}`,
469
- children: /* @__PURE__ */ N(
1380
+ children: /* @__PURE__ */ $(
470
1381
  "button",
471
1382
  {
472
1383
  disabled: !u.sortable,
473
- onClick: () => c(u.id, o),
1384
+ onClick: () => l(u.id, s),
474
1385
  className: "table-headers-cell",
475
1386
  children: [
476
- /* @__PURE__ */ t("span", { className: "table-headers-label", children: u.label }),
477
- u.sortable && /* @__PURE__ */ t(
1387
+ /* @__PURE__ */ c("span", { className: "table-headers-label", children: u.label }),
1388
+ u.sortable && /* @__PURE__ */ c(
478
1389
  "span",
479
1390
  {
480
- className: `${l === u.id ? "table-headers-sort-on" : "table-headers-sort"}`,
481
- children: i === T.ASC ? ((C = (p = u.sortOptions) == null ? void 0 : p.icons) == null ? void 0 : C.asc) ?? /* @__PURE__ */ t(
482
- se,
1391
+ className: `${o === u.id ? "table-headers-sort-on" : "table-headers-sort"}`,
1392
+ children: i === K.ASC ? ((b = (d = u.sortOptions) == null ? void 0 : d.icons) == null ? void 0 : b.asc) ?? /* @__PURE__ */ c(
1393
+ lt,
483
1394
  {
484
- className: ((v = (g = u.sortOptions) == null ? void 0 : g.icons) == null ? void 0 : v.className) ?? "table-headers-sort-indicator"
1395
+ className: ((v = (w = u.sortOptions) == null ? void 0 : w.icons) == null ? void 0 : v.className) ?? "table-headers-sort-indicator"
485
1396
  }
486
- ) : ((d = (f = u.sortOptions) == null ? void 0 : f.icons) == null ? void 0 : d.desc) ?? /* @__PURE__ */ t(
487
- ae,
1397
+ ) : ((h = (m = u.sortOptions) == null ? void 0 : m.icons) == null ? void 0 : h.desc) ?? /* @__PURE__ */ c(
1398
+ ot,
488
1399
  {
489
- className: ((w = (m = u.sortOptions) == null ? void 0 : m.icons) == null ? void 0 : w.className) ?? "table-headers-sort-indicator"
1400
+ className: ((x = (p = u.sortOptions) == null ? void 0 : p.icons) == null ? void 0 : x.className) ?? "table-headers-sort-indicator"
490
1401
  }
491
1402
  )
492
1403
  }
@@ -498,232 +1409,235 @@ function be(e) {
498
1409
  u.id
499
1410
  );
500
1411
  }),
501
- r && /* @__PURE__ */ t("th", { scope: "col", className: "table-headers-action", children: a("_accessibility:labels.actions") })
1412
+ a && /* @__PURE__ */ c("th", { scope: "col", className: "table-headers-action", children: t("_accessibility:labels.actions") })
502
1413
  ] }) });
503
1414
  }
504
- function Ne() {
505
- const { t: e } = O();
506
- return /* @__PURE__ */ t("div", { className: "table-empty", children: /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.empty") }) });
1415
+ function hn() {
1416
+ const { t: e } = G();
1417
+ return /* @__PURE__ */ c("div", { className: "table-empty", children: /* @__PURE__ */ c("p", { children: e("_accessibility:components.table.empty") }) });
507
1418
  }
508
- const ve = () => {
509
- const { t: e } = O(), { total: a, pageSize: s, currentPage: n, setCurrentPage: r } = L();
510
- return /* @__PURE__ */ N("div", { className: "table-navigation-pages", children: [
511
- /* @__PURE__ */ t(
1419
+ const pn = () => {
1420
+ const { t: e } = G(), { total: t, pageSize: r, currentPage: n, setCurrentPage: a } = H();
1421
+ return /* @__PURE__ */ $("div", { className: "table-navigation-pages", children: [
1422
+ /* @__PURE__ */ c(
512
1423
  "button",
513
1424
  {
514
1425
  className: "table-navigation-buttons",
515
1426
  disabled: n === 0,
516
1427
  "aria-label": e("_accessibility:buttons.previous"),
517
1428
  name: e("_accessibility:buttons.previous"),
518
- onClick: () => r(n - 1),
519
- children: /* @__PURE__ */ t(le, { className: "w-2.5" })
1429
+ onClick: () => a(n - 1),
1430
+ children: /* @__PURE__ */ c(dt, { className: "w-2.5" })
520
1431
  }
521
1432
  ),
522
- /* @__PURE__ */ t(
1433
+ /* @__PURE__ */ c(
523
1434
  "button",
524
1435
  {
525
- disabled: Math.floor(a / ((n + 1) * s)) === 0,
1436
+ disabled: Math.floor(t / ((n + 1) * r)) === 0,
526
1437
  className: "table-navigation-buttons",
527
1438
  name: e("_accessibility:buttons.next"),
528
1439
  "aria-label": e("_accessibility:buttons.next"),
529
- onClick: () => r(n + 1),
530
- children: /* @__PURE__ */ t(re, { className: "w-2.5" })
1440
+ onClick: () => a(n + 1),
1441
+ children: /* @__PURE__ */ c(ut, { className: "w-2.5" })
531
1442
  }
532
1443
  )
533
1444
  ] });
534
- }, ge = () => {
535
- const { t: e } = O(), { total: a, pageSize: s, pageSizes: n, currentPage: r } = L(), o = (r + 1) * s > a ? a : (r + 1) * s;
536
- return /* @__PURE__ */ N("div", { className: "table-navigation-sizes", children: [
537
- n[0] < a && /* @__PURE__ */ t(M, { children: /* @__PURE__ */ N("p", { children: [
538
- r * s + 1,
1445
+ }, mn = () => {
1446
+ const { t: e } = G(), { total: t, pageSize: r, pageSizes: n, currentPage: a } = H(), s = (a + 1) * r > t ? t : (a + 1) * r;
1447
+ return /* @__PURE__ */ $("div", { className: "table-navigation-sizes", children: [
1448
+ n[0] < t && /* @__PURE__ */ c(te, { children: /* @__PURE__ */ $("p", { children: [
1449
+ a * r + 1,
539
1450
  " - ",
540
- o,
1451
+ s,
541
1452
  " ",
542
1453
  e("_accessibility:components.table.of")
543
1454
  ] }) }),
544
- /* @__PURE__ */ t("p", { children: a })
1455
+ /* @__PURE__ */ c("p", { children: t })
545
1456
  ] });
546
1457
  };
547
- function Ce() {
548
- const { t: e } = O(), { pageSizes: a, pageSize: s, setPageSize: n } = L(), r = S(
549
- () => a == null ? void 0 : a.map((o) => ({ id: o, value: o })),
550
- [a]
1458
+ function bn() {
1459
+ const { t: e } = G(), { pageSizes: t, pageSize: r, setPageSize: n } = H(), a = F(
1460
+ () => t == null ? void 0 : t.map((s) => ({ id: s, value: s })),
1461
+ [t]
551
1462
  );
552
- return /* @__PURE__ */ N("div", { className: "page-size", children: [
553
- /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.pageSizes") }),
554
- /* @__PURE__ */ t(
555
- q,
1463
+ return /* @__PURE__ */ $("div", { className: "page-size", children: [
1464
+ /* @__PURE__ */ c("p", { children: e("_accessibility:components.table.pageSizes") }),
1465
+ /* @__PURE__ */ c(
1466
+ Se,
556
1467
  {
557
- value: s,
558
- options: r,
1468
+ value: r,
1469
+ options: a,
559
1470
  inputClassName: "page-size-input",
560
1471
  containerClassName: "page-size-input-container",
561
1472
  helperTextClassName: "hidden",
562
- onChange: (o) => n(Number(o.target.value))
1473
+ onChange: (s) => n(Number(s.target.value))
563
1474
  }
564
1475
  )
565
1476
  ] });
566
1477
  }
567
- function fe() {
568
- const { t: e } = O(), { total: a, pageSize: s, currentPage: n, setCurrentPage: r } = L(), o = S(() => {
569
- const c = Math.ceil(a / s);
570
- return Array.from({ length: c }, (i, l) => ({
571
- id: l,
572
- value: l + 1
1478
+ function gn() {
1479
+ const { t: e } = G(), { total: t, pageSize: r, currentPage: n, setCurrentPage: a } = H(), s = F(() => {
1480
+ const l = Math.ceil(t / r);
1481
+ return Array.from({ length: l }, (i, o) => ({
1482
+ id: o,
1483
+ value: o + 1
573
1484
  }));
574
- }, [a, s]);
575
- return /* @__PURE__ */ N("div", { className: "jump-to-page", children: [
576
- /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.jumpToPage") }),
577
- /* @__PURE__ */ t(
578
- q,
1485
+ }, [t, r]);
1486
+ return /* @__PURE__ */ $("div", { className: "jump-to-page", children: [
1487
+ /* @__PURE__ */ c("p", { children: e("_accessibility:components.table.jumpToPage") }),
1488
+ /* @__PURE__ */ c(
1489
+ Se,
579
1490
  {
580
1491
  value: n,
581
- options: o,
1492
+ options: s,
582
1493
  inputClassName: "jump-to-page-input",
583
1494
  containerClassName: "jump-to-page-input-container",
584
1495
  helperTextClassName: "hidden",
585
- onChange: (c) => r(Number(c.target.value))
1496
+ onChange: (l) => a(Number(l.target.value))
586
1497
  }
587
1498
  )
588
1499
  ] });
589
1500
  }
590
- function we() {
591
- return /* @__PURE__ */ N("div", { className: "table-footer", children: [
592
- /* @__PURE__ */ t(fe, {}),
593
- /* @__PURE__ */ t(Ce, {}),
594
- /* @__PURE__ */ t(ge, {}),
595
- /* @__PURE__ */ t(ve, {})
1501
+ function vn() {
1502
+ return /* @__PURE__ */ $("div", { className: "table-footer", children: [
1503
+ /* @__PURE__ */ c(gn, {}),
1504
+ /* @__PURE__ */ c(bn, {}),
1505
+ /* @__PURE__ */ c(mn, {}),
1506
+ /* @__PURE__ */ c(pn, {})
596
1507
  ] });
597
1508
  }
598
- function ye(e) {
599
- const { propertyName: a, options: s, label: n } = e, { currentFilters: r, setCurrentFilters: o } = F(), c = S(() => {
600
- var l;
601
- return ((l = r[a]) == null ? void 0 : l.value) ?? s[0];
602
- }, [r]), i = k((l) => {
603
- o({
604
- type: $.update,
605
- toUpdate: { [a]: { value: l.target.value } }
1509
+ function wn(e) {
1510
+ const { propertyName: t, options: r, label: n, placeholder: a } = e, { currentFilters: s, setCurrentFilters: l } = X(), i = F(() => {
1511
+ var f;
1512
+ return ((f = s[t]) == null ? void 0 : f.value) ?? r[0];
1513
+ }, [s]), o = D((f) => {
1514
+ l({
1515
+ type: _.update,
1516
+ toUpdate: { [t]: { value: f.target.value } }
606
1517
  });
607
1518
  }, []);
608
- return /* @__PURE__ */ t(
609
- q,
1519
+ return /* @__PURE__ */ c(
1520
+ Se,
610
1521
  {
611
- value: c,
1522
+ value: i,
612
1523
  label: n,
613
- options: s,
1524
+ options: r,
614
1525
  helperTextClassName: "hidden",
615
1526
  containerClassName: "options-widget-container",
616
- onChange: i
1527
+ onChange: o,
1528
+ placeholder: a
617
1529
  }
618
1530
  );
619
1531
  }
620
- const xe = (e) => {
621
- const { propertyName: a, label: s } = e, { currentFilters: n, setCurrentFilters: r } = F(), o = S(() => {
622
- var i;
623
- return ((i = n[a]) == null ? void 0 : i.value) ?? "";
624
- }, [n]), c = k((i) => {
625
- r({
626
- type: $.update,
627
- toUpdate: { [a]: { value: i.target.value } }
1532
+ const Cn = (e) => {
1533
+ const { propertyName: t, label: r, placeholder: n } = e, { currentFilters: a, setCurrentFilters: s } = X(), l = F(() => {
1534
+ var o;
1535
+ return ((o = a[t]) == null ? void 0 : o.value) ?? "";
1536
+ }, [a]), i = D((o) => {
1537
+ s({
1538
+ type: _.update,
1539
+ toUpdate: { [t]: { value: o.target.value } }
628
1540
  });
629
1541
  }, []);
630
- return /* @__PURE__ */ t(
631
- D,
1542
+ return /* @__PURE__ */ c(
1543
+ de,
632
1544
  {
633
- value: o ?? "",
634
- label: s,
635
- onChange: c,
1545
+ value: l ?? "",
1546
+ label: r,
1547
+ onChange: i,
636
1548
  containerClassName: "input-widget-container",
637
- helperTextClassName: ""
1549
+ helperTextClassName: "",
1550
+ placeholder: n
638
1551
  }
639
1552
  );
640
- }, ke = (e) => {
641
- const { propertyName: a, label: s } = e, { currentFilters: n, setCurrentFilters: r } = F(), o = S(() => {
1553
+ }, yn = (e) => {
1554
+ const { propertyName: t, label: r } = e, { currentFilters: n, setCurrentFilters: a } = X(), s = F(() => {
642
1555
  var i;
643
- return ((i = n[a]) == null ? void 0 : i.value) ?? "";
644
- }, [n]), c = k((i) => {
645
- r({
646
- type: $.update,
647
- toUpdate: { [a]: { value: i.target.checked } }
1556
+ return ((i = n[t]) == null ? void 0 : i.value) ?? "";
1557
+ }, [n]), l = D((i) => {
1558
+ a({
1559
+ type: _.update,
1560
+ toUpdate: { [t]: { value: i.target.checked } }
648
1561
  });
649
1562
  }, []);
650
- return /* @__PURE__ */ t(ce, { label: s, checked: o ?? !1, onChange: c });
1563
+ return /* @__PURE__ */ c(ht, { label: r, checked: s ?? !1, onChange: l });
651
1564
  };
652
- function $e(e) {
653
- const { propertyName: a, label: s, options: n, multiple: r = !0 } = e, { currentFilters: o, setCurrentFilters: c } = F(), i = S(() => o[a] ?? n[0], [o]), l = k(
654
- (h) => {
655
- c({
656
- type: $.update,
1565
+ function Nn(e) {
1566
+ const { propertyName: t, label: r, placeholder: n, options: a, multiple: s = !0 } = e, { currentFilters: l, setCurrentFilters: i } = X(), o = F(() => l[t] ?? a[0], [l]), f = D(
1567
+ (u) => {
1568
+ i({
1569
+ type: _.update,
657
1570
  toUpdate: {
658
- [a]: {
659
- value: h
1571
+ [t]: {
1572
+ value: u
660
1573
  }
661
1574
  }
662
1575
  });
663
1576
  },
664
- [r]
1577
+ [s]
665
1578
  );
666
- return /* @__PURE__ */ t(
667
- ie,
1579
+ return /* @__PURE__ */ c(
1580
+ sn,
668
1581
  {
669
- value: i == null ? void 0 : i.value,
670
- label: s,
671
- options: n,
672
- multiple: r,
1582
+ value: o == null ? void 0 : o.value,
1583
+ label: r,
1584
+ options: a,
1585
+ multiple: s,
673
1586
  helperTextClassName: "hidden",
674
1587
  containerClassName: "options-widget-container",
675
- onChange: l
1588
+ onChange: f,
1589
+ placeholder: n
676
1590
  }
677
1591
  );
678
1592
  }
679
- const V = (e) => {
680
- var p, C, g, v;
681
- const { propertyName: a, label: s, inputType: n } = e, { t: r } = O(), { currentFilters: o, setCurrentFilters: c } = F(), i = B(null), l = B(null), h = k((f) => {
682
- var d;
683
- c({
684
- type: $.update,
1593
+ const Ge = (e) => {
1594
+ var d, b, w, v;
1595
+ const { propertyName: t, label: r, inputType: n } = e, { t: a } = G(), { currentFilters: s, setCurrentFilters: l } = X(), i = V(null), o = V(null), f = D((m) => {
1596
+ var h;
1597
+ l({
1598
+ type: _.update,
685
1599
  toUpdate: {
686
- [a]: {
687
- value: { end: ((d = l == null ? void 0 : l.current) == null ? void 0 : d.value) ?? null, start: f.target.value }
1600
+ [t]: {
1601
+ value: { end: ((h = o == null ? void 0 : o.current) == null ? void 0 : h.value) ?? null, start: m.target.value }
688
1602
  }
689
1603
  }
690
1604
  });
691
- }, []), u = k((f) => {
692
- var d;
693
- c({
694
- type: $.update,
1605
+ }, []), u = D((m) => {
1606
+ var h;
1607
+ l({
1608
+ type: _.update,
695
1609
  toUpdate: {
696
- [a]: {
1610
+ [t]: {
697
1611
  value: {
698
- start: ((d = i == null ? void 0 : i.current) == null ? void 0 : d.value) ?? null,
699
- end: f.target.value
1612
+ start: ((h = i == null ? void 0 : i.current) == null ? void 0 : h.value) ?? null,
1613
+ end: m.target.value
700
1614
  }
701
1615
  }
702
1616
  }
703
1617
  });
704
1618
  }, []);
705
- return /* @__PURE__ */ N("div", { className: "range-widget-container", children: [
706
- /* @__PURE__ */ t("p", { className: "text-input-label input-widget-label input-label-normal", children: s }),
707
- /* @__PURE__ */ N("div", { className: "range-widget-row", children: [
708
- /* @__PURE__ */ t(
709
- D,
1619
+ return /* @__PURE__ */ $("div", { className: "range-widget-container", children: [
1620
+ /* @__PURE__ */ c("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
1621
+ /* @__PURE__ */ $("div", { className: "range-widget-row", children: [
1622
+ /* @__PURE__ */ c(
1623
+ de,
710
1624
  {
711
- value: ((C = (p = o[a]) == null ? void 0 : p.value) == null ? void 0 : C.start) ?? "",
712
- placeholder: r("_accessibility:components.table.filters.range.start"),
1625
+ value: ((b = (d = s[t]) == null ? void 0 : d.value) == null ? void 0 : b.start) ?? "",
1626
+ placeholder: a("_accessibility:components.table.filters.range.start"),
713
1627
  type: n,
714
1628
  ref: i,
715
- onChange: h,
1629
+ onChange: f,
716
1630
  containerClassName: "input-widget-container",
717
1631
  helperTextClassName: ""
718
1632
  }
719
1633
  ),
720
- /* @__PURE__ */ t(
721
- D,
1634
+ /* @__PURE__ */ c(
1635
+ de,
722
1636
  {
723
- value: ((v = (g = o[a]) == null ? void 0 : g.value) == null ? void 0 : v.end) ?? "",
724
- placeholder: r("_accessibility:components.table.filters.range.end"),
1637
+ value: ((v = (w = s[t]) == null ? void 0 : w.value) == null ? void 0 : v.end) ?? "",
1638
+ placeholder: a("_accessibility:components.table.filters.range.end"),
725
1639
  type: n,
726
- ref: l,
1640
+ ref: o,
727
1641
  onChange: u,
728
1642
  containerClassName: "input-widget-container",
729
1643
  helperTextClassName: ""
@@ -731,255 +1645,329 @@ const V = (e) => {
731
1645
  )
732
1646
  ] })
733
1647
  ] });
734
- }, Se = (e) => {
1648
+ }, xn = (e) => {
735
1649
  switch (e.type) {
736
- case E.text:
737
- return /* @__PURE__ */ t(xe, { ...e });
738
- case E.number:
739
- return /* @__PURE__ */ t(
740
- V,
1650
+ case U.text:
1651
+ return /* @__PURE__ */ c(Cn, { ...e });
1652
+ case U.number:
1653
+ return /* @__PURE__ */ c(
1654
+ Ge,
741
1655
  {
742
1656
  ...e,
743
1657
  inputType: "number"
744
1658
  }
745
1659
  );
746
- case E.date:
747
- return /* @__PURE__ */ t(
748
- V,
1660
+ case U.date:
1661
+ return /* @__PURE__ */ c(
1662
+ Ge,
749
1663
  {
750
1664
  ...e,
751
1665
  inputType: "date"
752
1666
  }
753
1667
  );
754
- case E.select:
755
- return /* @__PURE__ */ t(ye, { ...e });
756
- case E.autocomplete:
757
- return /* @__PURE__ */ t($e, { ...e });
758
- case E.check:
759
- return /* @__PURE__ */ t(ke, { ...e });
1668
+ case U.select:
1669
+ return /* @__PURE__ */ c(wn, { ...e });
1670
+ case U.autocomplete:
1671
+ return /* @__PURE__ */ c(Nn, { ...e });
1672
+ case U.check:
1673
+ return /* @__PURE__ */ c(yn, { ...e });
760
1674
  }
761
- return /* @__PURE__ */ t(M, {});
1675
+ return /* @__PURE__ */ c(te, {});
762
1676
  };
763
- const Pe = (e) => {
764
- var C, g, v, f;
765
- const { filters: a = [], options: s } = e, [n, r] = P(!1), { onFilterApply: o, filters: c } = L(), { currentFilters: i, setCurrentFilters: l } = F(), { t: h } = O(), u = B(null), p = B(null);
766
- return R(() => {
767
- const d = ({ target: m }) => {
768
- var w, y;
769
- p.current && (!n || (w = p.current) != null && w.contains(m) || (y = u == null ? void 0 : u.current) != null && y.contains(m) || r(!1));
1677
+ const $n = (e) => {
1678
+ const { filters: t = [], options: r, show: n, handleShow: a } = e, { onFilterApply: s, filters: l } = H(), { currentFilters: i, setCurrentFilters: o } = X(), { t: f } = G(), u = V(null);
1679
+ return ne(() => {
1680
+ const d = ({ target: b }) => {
1681
+ var w;
1682
+ u.current && (!n || (w = u.current) != null && w.contains(b) || a(!1));
770
1683
  };
771
1684
  return document.addEventListener("click", d), () => document.removeEventListener("click", d);
772
- }), R(() => {
773
- const d = (m) => {
774
- !n || m.code !== "Escape" || r(!1);
1685
+ }), ne(() => {
1686
+ const d = (b) => {
1687
+ !n || b.code !== "Escape" || a(!1);
775
1688
  };
776
1689
  return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
777
- }), /* @__PURE__ */ N("div", { className: "filter-dropdown-main", children: [
778
- ((C = s == null ? void 0 : s.button) == null ? void 0 : C.hide) !== !0 && /* @__PURE__ */ N(
779
- "button",
780
- {
781
- ref: u,
782
- className: "filter-dropdown-button normal filter-dropdown-trigger",
783
- "aria-haspopup": "true",
784
- onClick: () => {
785
- var d, m, w;
786
- return ((w = (d = s == null ? void 0 : s.dropdown) == null ? void 0 : d.setOpened) == null ? void 0 : w.call(d, !((m = s == null ? void 0 : s.dropdown) != null && m.opened))) ?? r(!n);
787
- },
788
- "aria-expanded": ((g = s == null ? void 0 : s.dropdown) == null ? void 0 : g.opened) ?? n,
789
- children: [
790
- /* @__PURE__ */ t("span", { className: "sr-only", children: h("_accessibility:buttons.filters") }),
791
- /* @__PURE__ */ t("wbr", {}),
792
- ((v = s == null ? void 0 : s.button) == null ? void 0 : v.icon) ?? /* @__PURE__ */ t(oe, { className: "filter-dropdown-trigger-icon" })
793
- ]
794
- }
795
- ),
796
- /* @__PURE__ */ t(
797
- "div",
798
- {
799
- className: `filter-dropdown-backdrop ${(f = s == null ? void 0 : s.dropdown) != null && f.opened || n ? "opened" : "closed"}`,
800
- children: /* @__PURE__ */ N("div", { className: "filter-popup", children: [
801
- /* @__PURE__ */ t("div", { className: "filter-title", children: h("_accessibility:buttons.filters") }),
802
- /* @__PURE__ */ t("ul", { className: "filter-container", children: a.map((d) => /* @__PURE__ */ t("li", { className: "filter-container-item", children: Se(d) }, d.propertyName)) }),
803
- /* @__PURE__ */ t("div", { className: "filter-footer", children: /* @__PURE__ */ N("ul", { className: "filter-buttons-row", children: [
804
- /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
805
- "button",
806
- {
807
- onClick: () => l({
808
- type: $.reset,
809
- filters: a
810
- }),
811
- className: "filter-dropdown-button small filter-dropdown-cancel",
812
- children: h("_accessibility:buttons.clear")
813
- }
814
- ) }),
815
- /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
816
- "button",
817
- {
818
- className: "filter-dropdown-button small filter-dropdown-submit",
819
- onClick: () => {
820
- var d, m;
821
- ((m = (d = s == null ? void 0 : s.dropdown) == null ? void 0 : d.setOpened) == null ? void 0 : m.call(d, !1)) ?? r(!1), o(i);
822
- },
823
- onBlur: () => {
824
- var d, m;
825
- return ((m = (d = s == null ? void 0 : s.dropdown) == null ? void 0 : d.setOpened) == null ? void 0 : m.call(d, !1)) ?? r(!1);
826
- },
827
- children: h("_accessibility:buttons.applyFilters")
828
- }
829
- ) })
830
- ] }) })
831
- ] })
832
- }
833
- )
834
- ] });
835
- }, Oe = (e) => {
836
- var i;
837
- const { columns: a, title: s, isLoading: n, toolbar: r, filterOptions: o } = e, c = S(() => a ? a.sort((l, h) => (h.pos ?? 0) - (l.pos ?? 0)).filter((l) => !!l.filterOptions).map((l) => {
838
- var h;
1690
+ }), /* @__PURE__ */ c("div", { className: `filter-dropdown-backdrop ${n ? "opened" : "closed"}`, children: /* @__PURE__ */ $("div", { className: "filter-popup", children: [
1691
+ /* @__PURE__ */ c("div", { className: "filter-title", children: f("_accessibility:buttons.filters") }),
1692
+ /* @__PURE__ */ c("ul", { className: "filter-container", children: t.map((d) => /* @__PURE__ */ c("li", { className: "filter-container-item", children: xn(d) }, d.propertyName)) }),
1693
+ /* @__PURE__ */ c("div", { className: "filter-footer", children: /* @__PURE__ */ $("ul", { className: "filter-buttons-row", children: [
1694
+ /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
1695
+ "button",
1696
+ {
1697
+ onClick: () => o({
1698
+ type: _.reset,
1699
+ filters: t
1700
+ }),
1701
+ className: "filter-dropdown-button small filter-dropdown-cancel",
1702
+ children: f("_accessibility:buttons.clear")
1703
+ }
1704
+ ) }),
1705
+ /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
1706
+ "button",
1707
+ {
1708
+ className: "filter-dropdown-button small filter-dropdown-submit",
1709
+ onClick: () => {
1710
+ a(!1), s(i);
1711
+ },
1712
+ onBlur: () => a(!1),
1713
+ children: f("_accessibility:buttons.applyFilters")
1714
+ }
1715
+ ) })
1716
+ ] }) })
1717
+ ] }) });
1718
+ }, Sn = (e) => {
1719
+ const { items: t, label: r, onClearFilter: n } = e;
1720
+ return /* @__PURE__ */ c(
1721
+ Z,
1722
+ {
1723
+ label: `${r}: ${t.map((a) => a.value ?? a.name).join(", ")}`,
1724
+ onDelete: () => n(r)
1725
+ }
1726
+ );
1727
+ }, kn = (e) => {
1728
+ const { end: t, start: r, label: n, onClearFilter: a } = e;
1729
+ return /* @__PURE__ */ c(
1730
+ Z,
1731
+ {
1732
+ label: `${n}: ${r || "♾️"} - ${t || "♾️"}`,
1733
+ onDelete: () => a(n)
1734
+ }
1735
+ );
1736
+ };
1737
+ const En = (e) => {
1738
+ const { filtersDefinition: t } = e, r = F(() => {
1739
+ const i = {};
1740
+ return t.forEach((o) => {
1741
+ i[o.propertyName] = o.label ?? o.propertyName;
1742
+ }), i;
1743
+ }, [t]), { filters: n, clearFilters: a } = H(), s = F(() => (Object.keys(n).map((i) => console.log(n[i])), Object.keys(n)), [n]), l = D(
1744
+ (i) => {
1745
+ var o, f;
1746
+ return n[i].end || n[i].start ? /* @__PURE__ */ c(
1747
+ kn,
1748
+ {
1749
+ label: r[i],
1750
+ start: n[i].start,
1751
+ end: n[i].end,
1752
+ onClearFilter: a
1753
+ }
1754
+ ) : Array.isArray(n[i]) ? /* @__PURE__ */ c(
1755
+ Sn,
1756
+ {
1757
+ label: r[i],
1758
+ items: n[i],
1759
+ onClearFilter: a
1760
+ }
1761
+ ) : /* @__PURE__ */ c(
1762
+ Z,
1763
+ {
1764
+ label: `${r[i]}: ${((o = n[i]) == null ? void 0 : o.value) ?? ((f = n[i]) == null ? void 0 : f.name) ?? n[i]}`,
1765
+ onDelete: () => a(i)
1766
+ }
1767
+ );
1768
+ },
1769
+ [n, r]
1770
+ );
1771
+ return /* @__PURE__ */ c("ul", { className: "active-filters-main", children: s == null ? void 0 : s.map((i) => /* @__PURE__ */ c("li", { children: l(i) }, i)) });
1772
+ }, An = (e) => {
1773
+ var w, v, m;
1774
+ const { columns: t, title: r, isLoading: n, toolbar: a, filterOptions: s } = e, { countOfFilters: l } = H(), { t: i } = G(), o = F(() => t ? t.sort((h, p) => (p.pos ?? 0) - (h.pos ?? 0)).filter((h) => !!h.filterOptions).map((h) => {
1775
+ var p;
839
1776
  return {
840
- ...l.filterOptions,
841
- label: ((h = l.filterOptions) == null ? void 0 : h.label) ?? l.label,
842
- propertyName: l.key
1777
+ ...h.filterOptions,
1778
+ label: ((p = h.filterOptions) == null ? void 0 : p.label) ?? h.label,
1779
+ propertyName: h.key
843
1780
  };
844
- }) : [], [a]);
845
- return /* @__PURE__ */ N(
1781
+ }) : [], [t]), [f, u] = W(!1), d = D(
1782
+ (h) => {
1783
+ var p, x;
1784
+ ((x = (p = s == null ? void 0 : s.dropdown) == null ? void 0 : p.setOpened) == null ? void 0 : x.call(p, h ?? !1)) ?? u(h ?? !1);
1785
+ },
1786
+ [s, f]
1787
+ ), b = F(
1788
+ () => {
1789
+ var h;
1790
+ return ((h = s == null ? void 0 : s.dropdown) == null ? void 0 : h.opened) ?? f;
1791
+ },
1792
+ [s, f]
1793
+ );
1794
+ return /* @__PURE__ */ $(
846
1795
  "div",
847
1796
  {
848
- className: `table-header ${s && (r || !((i = o == null ? void 0 : o.button) != null && i.hide)) ? "two" : "one"}`,
1797
+ className: `table-header ${r && (a || !((w = s == null ? void 0 : s.button) != null && w.hide)) ? "two" : "one"}`,
849
1798
  children: [
850
- s && /* @__PURE__ */ t("h1", { className: "table-header-title", children: s }),
851
- n ? null : /* @__PURE__ */ N("div", { className: "table-header-right", children: [
852
- r,
853
- !!c && !!c.length && /* @__PURE__ */ t(
854
- Pe,
855
- {
856
- filters: c,
857
- options: o
858
- }
859
- )
860
- ] })
1799
+ /* @__PURE__ */ $("div", { children: [
1800
+ r && /* @__PURE__ */ c("h1", { className: "table-header-title", children: r }),
1801
+ n ? null : /* @__PURE__ */ $("div", { className: "table-header-right", children: [
1802
+ a,
1803
+ ((v = s == null ? void 0 : s.button) == null ? void 0 : v.hide) !== !0 && /* @__PURE__ */ $(
1804
+ "button",
1805
+ {
1806
+ className: "filter-dropdown-button normal filter-dropdown-trigger",
1807
+ "aria-haspopup": "true",
1808
+ onClick: () => {
1809
+ var h;
1810
+ return d(
1811
+ ((h = s == null ? void 0 : s.dropdown) == null ? void 0 : h.opened) ?? !f
1812
+ );
1813
+ },
1814
+ "aria-expanded": b,
1815
+ children: [
1816
+ /* @__PURE__ */ c(
1817
+ Rn,
1818
+ {
1819
+ count: l,
1820
+ className: `${l > 0 ? "show" : "hide"} `
1821
+ }
1822
+ ),
1823
+ /* @__PURE__ */ c("span", { className: "sr-only", children: i("_accessibility:buttons.filters") }),
1824
+ /* @__PURE__ */ c("wbr", {}),
1825
+ ((m = s == null ? void 0 : s.button) == null ? void 0 : m.icon) ?? /* @__PURE__ */ c(ft, { className: "filter-dropdown-trigger-icon" })
1826
+ ]
1827
+ }
1828
+ )
1829
+ ] })
1830
+ ] }),
1831
+ /* @__PURE__ */ c(En, { filtersDefinition: o }),
1832
+ !!o && !!o.length && /* @__PURE__ */ c(
1833
+ $n,
1834
+ {
1835
+ filters: o,
1836
+ show: b,
1837
+ handleShow: d,
1838
+ options: s
1839
+ }
1840
+ )
861
1841
  ]
862
1842
  }
863
1843
  );
864
- }, ze = (e) => e, Ee = (e) => {
865
- const { columns: a, softDeleteProperty: s = "deleted", data: n, actions: r } = e, o = S(
866
- () => a.sort((c, i) => (i.pos ?? 0) - (c.pos ?? 0)).filter((c) => c.display !== "none"),
867
- [a]
1844
+ }, Pn = (e) => e, On = (e) => {
1845
+ const { columns: t, softDeleteProperty: r = "deleted", data: n, actions: a } = e, s = F(
1846
+ () => t.sort((l, i) => (i.pos ?? 0) - (l.pos ?? 0)).filter((l) => l.display !== "none"),
1847
+ [t]
868
1848
  );
869
- return n == null ? void 0 : n.map((c) => {
1849
+ return n == null ? void 0 : n.map((l) => {
870
1850
  var i;
871
- return /* @__PURE__ */ N(
1851
+ return /* @__PURE__ */ $(
872
1852
  "tr",
873
1853
  {
874
- className: `table-row ${c[s] ? "deleted-class" : ""}`,
1854
+ className: `table-row ${l[r] ? "deleted-class" : ""}`,
875
1855
  children: [
876
- o == null ? void 0 : o.map((l, h) => /* @__PURE__ */ t(
1856
+ s == null ? void 0 : s.map((o, f) => /* @__PURE__ */ c(
877
1857
  "td",
878
1858
  {
879
- className: `table-row-cell ${h === 0 ? "basic" : ""} ${l.className ?? ""}`,
880
- children: l.renderBody ? l.renderBody(c[l.key], c) : ze(c[l.key])
1859
+ className: `table-row-cell ${f === 0 ? "basic" : ""} ${o.className ?? ""}`,
1860
+ children: o.renderBody ? o.renderBody(l[o.key], l) : Pn(l[o.key])
881
1861
  },
882
- l.key
1862
+ o.key
883
1863
  )),
884
- r ? /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", { className: "table-row-cell-action", children: (i = r(c).filter((l) => !l.hidden)) == null ? void 0 : i.map((l) => /* @__PURE__ */ t(Le, { content: l.tooltip, children: /* @__PURE__ */ t("button", { onClick: () => l.onClick(c), children: l.icon }) }, l.id)) }) }) : null
1864
+ a ? /* @__PURE__ */ c("td", { children: /* @__PURE__ */ c("div", { className: "table-row-cell-action", children: (i = a(l).filter((o) => !o.hidden)) == null ? void 0 : i.map((o) => /* @__PURE__ */ c(Tn, { content: o.tooltip, children: /* @__PURE__ */ c("button", { onClick: () => o.onClick(l), children: o.icon }) }, o.id)) }) }) : null
885
1865
  ]
886
1866
  },
887
- c.id
1867
+ l.id
888
1868
  );
889
1869
  });
890
1870
  };
891
- function De(e) {
1871
+ function Wn(e) {
892
1872
  const {
893
- data: a,
894
- onSort: s,
1873
+ data: t,
1874
+ onSort: r,
895
1875
  entity: n = "",
896
- isLoading: r = !1,
897
- actions: o,
898
- columns: c = [],
1876
+ isLoading: a = !1,
1877
+ actions: s,
1878
+ columns: l = [],
899
1879
  contentClassName: i = "",
900
- className: l = "",
901
- softDeleteProperty: h = "deleted",
1880
+ className: o = "",
1881
+ softDeleteProperty: f = "deleted",
902
1882
  ...u
903
- } = e, p = S(() => !(a != null && a.length), [a]);
904
- return /* @__PURE__ */ t(me, { children: /* @__PURE__ */ N("div", { className: `${l} table-main`, children: [
905
- /* @__PURE__ */ t(Oe, { columns: c, isLoading: r, ...u }),
906
- r ? /* @__PURE__ */ t(de, { className: "table-loading" }) : /* @__PURE__ */ t(M, { children: p ? /* @__PURE__ */ t(Ne, {}) : /* @__PURE__ */ N(M, { children: [
907
- /* @__PURE__ */ t("div", { className: `${i} table-body`, children: /* @__PURE__ */ N("table", { className: "table-content", children: [
908
- /* @__PURE__ */ t(
909
- be,
1883
+ } = e, d = F(() => !(t != null && t.length), [t]);
1884
+ return /* @__PURE__ */ c(dn, { children: /* @__PURE__ */ $("div", { className: `${o} table-main`, children: [
1885
+ /* @__PURE__ */ c(An, { columns: l, isLoading: a, ...u }),
1886
+ a ? /* @__PURE__ */ c(cn, { className: "table-loading" }) : /* @__PURE__ */ c(te, { children: d ? /* @__PURE__ */ c(hn, {}) : /* @__PURE__ */ $(te, { children: [
1887
+ /* @__PURE__ */ c("div", { className: `${i} table-body`, children: /* @__PURE__ */ $("table", { className: "table-content", children: [
1888
+ /* @__PURE__ */ c(
1889
+ fn,
910
1890
  {
911
1891
  entity: n,
912
- columns: c,
913
- onSortCallback: s,
914
- hasAction: !!o
1892
+ columns: l,
1893
+ onSortCallback: r,
1894
+ hasAction: !!s
915
1895
  }
916
1896
  ),
917
- /* @__PURE__ */ t("tbody", { children: /* @__PURE__ */ t(
918
- Ee,
1897
+ /* @__PURE__ */ c("tbody", { children: /* @__PURE__ */ c(
1898
+ On,
919
1899
  {
920
- data: a,
921
- actions: o,
922
- columns: c,
923
- softDeleteProperty: h
1900
+ data: t,
1901
+ actions: s,
1902
+ columns: l,
1903
+ softDeleteProperty: f
924
1904
  }
925
1905
  ) })
926
1906
  ] }) }),
927
- /* @__PURE__ */ t(we, {})
1907
+ /* @__PURE__ */ c(vn, {})
928
1908
  ] }) })
929
1909
  ] }) });
930
1910
  }
931
- function Le(e) {
932
- const { content: a, children: s } = e;
933
- return /* @__PURE__ */ N("div", { className: "tooltip-container", children: [
934
- s,
935
- /* @__PURE__ */ t("div", { className: "tooltip-text", children: a })
1911
+ function Tn(e) {
1912
+ const { content: t, children: r } = e;
1913
+ return /* @__PURE__ */ $("div", { className: "tooltip-container", children: [
1914
+ r,
1915
+ /* @__PURE__ */ c("div", { className: "tooltip-text", children: t })
936
1916
  ] });
937
1917
  }
938
- function Te(e) {
939
- const { label: a, onDelete: s, className: n = "", spanClassName: r = "" } = e;
940
- return /* @__PURE__ */ N("div", { className: `chip-main ${n}`, children: [
941
- /* @__PURE__ */ t("span", { className: r, children: a }),
942
- s ? /* @__PURE__ */ t("button", { type: "button", className: "chip-delete-button", onClick: s, children: /* @__PURE__ */ t(G, {}) }) : null
1918
+ function Z(e) {
1919
+ const { label: t, onDelete: r, className: n = "", spanClassName: a = "" } = e;
1920
+ return /* @__PURE__ */ $("div", { className: `chip-main ${n}`, children: [
1921
+ /* @__PURE__ */ c("span", { className: a, children: t }),
1922
+ r ? /* @__PURE__ */ c("button", { type: "button", className: "chip-delete-button", onClick: r, children: /* @__PURE__ */ c(He, {}) }) : null
943
1923
  ] });
944
1924
  }
1925
+ const Rn = (e) => {
1926
+ const { count: t, className: r = "" } = e, n = V(null);
1927
+ return ne(() => {
1928
+ var a, s;
1929
+ (a = n.current) != null && a.parentNode && (((s = n.current) == null ? void 0 : s.parentNode).style.position = "relative");
1930
+ }, [n]), /* @__PURE__ */ c("span", { ref: n, className: `${r} badge-main`, children: t });
1931
+ };
945
1932
  export {
946
- ie as AutocompleteInput,
947
- ce as CheckInput,
948
- ae as ChevronDown,
949
- le as ChevronLeft,
950
- re as ChevronRight,
951
- se as ChevronUp,
952
- Te as Chip,
953
- G as Close,
954
- be as Columns,
955
- ge as CountOfTotal,
956
- Ne as Empty,
957
- Pe as FilterPopup,
958
- E as FilterTypes,
959
- oe as Filters,
960
- $ as FiltersActions,
961
- me as FiltersProvider,
962
- we as Footer,
963
- de as Loading,
964
- ve as Navigation,
965
- Ce as PageSize,
966
- Ee as Rows,
967
- q as SelectInput,
968
- T as SortOrder,
969
- U as State,
970
- De as Table,
971
- Oe as TableHeader,
972
- Me as TableOptionsProvider,
973
- D as TextInput,
974
- Le as Tooltip,
975
- Be as TranslationProvider,
976
- he as filtersReducer,
977
- X as helperTextStateClassName,
978
- pe as initializer,
979
- K as inputStateClassName,
980
- Q as labelStateClassName,
981
- Se as renderFilterComponent,
982
- F as useFilters,
983
- L as useTableOptions,
984
- O as useTranslation
1933
+ sn as AutocompleteInput,
1934
+ Rn as Badge,
1935
+ ht as CheckInput,
1936
+ ot as ChevronDown,
1937
+ dt as ChevronLeft,
1938
+ ut as ChevronRight,
1939
+ lt as ChevronUp,
1940
+ Z as Chip,
1941
+ He as Close,
1942
+ fn as Columns,
1943
+ mn as CountOfTotal,
1944
+ hn as Empty,
1945
+ $n as FilterDropdown,
1946
+ U as FilterTypes,
1947
+ ft as Filters,
1948
+ _ as FiltersActions,
1949
+ dn as FiltersProvider,
1950
+ vn as Footer,
1951
+ cn as Loading,
1952
+ pn as Navigation,
1953
+ bn as PageSize,
1954
+ On as Rows,
1955
+ Se as SelectInput,
1956
+ K as SortOrder,
1957
+ pe as State,
1958
+ Wn as Table,
1959
+ An as TableHeader,
1960
+ Mn as TableOptionsProvider,
1961
+ de as TextInput,
1962
+ Tn as Tooltip,
1963
+ zn as TranslationProvider,
1964
+ un as filtersReducer,
1965
+ qe as helperTextStateClassName,
1966
+ ln as initializer,
1967
+ Ue as inputStateClassName,
1968
+ Ve as labelStateClassName,
1969
+ xn as renderFilterComponent,
1970
+ X as useFilters,
1971
+ H as useTableOptions,
1972
+ G as useTranslation
985
1973
  };