@reportportal/ui-kit 0.0.1-alpha.236 → 0.0.1-alpha.238

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.
@@ -0,0 +1,1639 @@
1
+ import { jsx as n, jsxs as y, Fragment as ce } from "react/jsx-runtime";
2
+ import { forwardRef as He, useRef as we, useId as pt, useState as X, useMemo as Le, useEffect as De, useCallback as oe, useLayoutEffect as mt } from "react";
3
+ import { c as F } from "./bind-06a7ff84.js";
4
+ import { Scrollbars as _t } from "rc-scrollbars";
5
+ import { B as ft } from "./bubblesLoader-f3ffa240.js";
6
+ import { B as Ie } from "./button-7ab874f3.js";
7
+ import { a as ht } from "./plus-0929dda4.js";
8
+ import { i as We } from "./isEmpty-ccacb5ff.js";
9
+ import { createPortal as gt } from "react-dom";
10
+ import $e from "downshift";
11
+ import { useFloating as rt, autoUpdate as at, flip as bt, size as yt } from "@floating-ui/react";
12
+ import { S as lt } from "./clear-53660571.js";
13
+ import { b as wt, a as vt, S as Ge, c as Xe, d as Je } from "./prevPage-1c4a826f.js";
14
+ import "./adaptiveTagList.js";
15
+ import "./actionMenu-f8a2f5bb.js";
16
+ import "./index-d6e02727.js";
17
+ import { B as ye } from "./baseIconButton-251479f7.js";
18
+ import "./breadcrumbs-5730e318.js";
19
+ import "./bulkPanel.js";
20
+ import "./checkbox-76aa8f97.js";
21
+ import "./chip.js";
22
+ import Qe from "react-datepicker/dist/es/index.js";
23
+ import { D as Ze } from "./dropdown-d2a05471.js";
24
+ import { registerLocale as Nt } from "react-datepicker";
25
+ import { FieldLabel as xt } from "./fieldLabel.js";
26
+ import "./fieldNumber-c9795245.js";
27
+ import "./fieldTextFlex-2f51c173.js";
28
+ import "./fileDropArea.js";
29
+ import "./filtersButton.js";
30
+ import "./filterItem.js";
31
+ import "./issueList.js";
32
+ import { E as ct, A as Ct, T as St } from "./index-a13c9a87.js";
33
+ import { S as kt } from "./close-4d480ef7.js";
34
+ import { S as it } from "./dropdown-0260bb66.js";
35
+ import { Popover as dt } from "./popover.js";
36
+ import { Tooltip as $t } from "./tooltip.js";
37
+ import "./radio-62546efa.js";
38
+ import "./segmentedControl.js";
39
+ import "./selection-da1a3528.js";
40
+ import { S as Dt } from "./spinLoader-c4a53718.js";
41
+ import "./systemAlert.js";
42
+ import "./systemMessage-924fdaa6.js";
43
+ import "./treeSortableItem-301dbd92.js";
44
+ import "./table-4d35951e.js";
45
+ import "./themeProvider-46c2be7b.js";
46
+ import "./toggle-304107fa.js";
47
+ import "./sidePanel.js";
48
+ import "react-dnd";
49
+ import "react-dnd-html5-backend";
50
+ import { M as It } from "./maxValueDisplay-9be01a75.js";
51
+ function Et(e) {
52
+ return e == null;
53
+ }
54
+ const At = "_collapsed_18d9y_11", Mt = "_field_18d9y_23", Tt = "_placeholder_18d9y_48", zt = "_disabled_18d9y_51", Pt = "_error_18d9y_54", Ot = "_touched_18d9y_54", Ft = "_input_18d9y_73", Rt = "_icon_18d9y_1", Bt = "_text_18d9y_171", Lt = {
55
+ "icon-container": "_icon-container_18d9y_1",
56
+ "icon-container-additional": "_icon-container-additional_18d9y_1",
57
+ "icon-container-end": "_icon-container-end_18d9y_1",
58
+ "icon-container-start": "_icon-container-start_18d9y_1",
59
+ collapsed: At,
60
+ field: Mt,
61
+ "default-width": "_default-width_18d9y_35",
62
+ placeholder: Tt,
63
+ disabled: zt,
64
+ error: Pt,
65
+ touched: Ot,
66
+ "max-length-display": "_max-length-display_18d9y_61",
67
+ "input-container": "_input-container_18d9y_73",
68
+ "type-password": "_type-password_18d9y_77",
69
+ input: Ft,
70
+ "eye-icon": "_eye-icon_18d9y_81",
71
+ icon: Rt,
72
+ "start-icon": "_start-icon_18d9y_127",
73
+ "clear-icon": "_clear-icon_18d9y_128",
74
+ "additional-content": "_additional-content_18d9y_164",
75
+ text: Bt,
76
+ "error-text": "_error-text_18d9y_191",
77
+ "help-text": "_help-text_18d9y_195"
78
+ }, L = F.bind(Lt), je = He(
79
+ ({
80
+ value: e = "",
81
+ className: t,
82
+ classNameHelpText: o,
83
+ error: s,
84
+ placeholder: a,
85
+ disabled: l = !1,
86
+ onChange: i,
87
+ touched: r = !1,
88
+ title: _,
89
+ label: c,
90
+ helpText: p,
91
+ defaultWidth: v = !0,
92
+ startIcon: x,
93
+ endIcon: f,
94
+ clearable: z = !1,
95
+ onClear: P,
96
+ isRequired: h = !1,
97
+ hasDoubleMessage: g = !1,
98
+ type: S = "text",
99
+ displayError: A = !0,
100
+ collapsible: u = !1,
101
+ loading: d = !1,
102
+ maxLengthDisplay: b,
103
+ onFocus: m = () => {
104
+ },
105
+ onBlur: w = () => {
106
+ },
107
+ ...I
108
+ }, N) => {
109
+ const $ = we(null), M = N || $, D = pt(), [j, k] = X(!1), [B, H] = X(!1), ee = (O) => {
110
+ k(!0), m(O);
111
+ }, Y = (O) => {
112
+ k(!1), w(O);
113
+ }, te = () => {
114
+ var O;
115
+ P && (P(e), (O = M.current) == null || O.focus());
116
+ }, Z = A && s && r, U = /* @__PURE__ */ n("span", { className: L("text", "help-text", o), children: p }), ne = () => S !== "password" ? S : B ? "text" : "password", ie = (O) => {
117
+ O.preventDefault(), H(!0);
118
+ }, K = (O) => {
119
+ O.preventDefault(), H(!1);
120
+ };
121
+ return /* @__PURE__ */ y(ce, { children: [
122
+ c && /* @__PURE__ */ n(xt, { isRequired: h, htmlFor: D, children: c }),
123
+ /* @__PURE__ */ y(
124
+ "div",
125
+ {
126
+ className: L("field", t, {
127
+ error: s,
128
+ touched: r,
129
+ disabled: l,
130
+ "default-width": v,
131
+ collapsed: u && !j && !e
132
+ }),
133
+ title: _,
134
+ children: [
135
+ d ? /* @__PURE__ */ n(Dt, {}) : x && /* @__PURE__ */ n(
136
+ "span",
137
+ {
138
+ className: L("icon-container-start"),
139
+ onClick: () => {
140
+ var se;
141
+ (se = M.current) == null || se.focus();
142
+ },
143
+ children: /* @__PURE__ */ n("span", { className: L("icon", { "start-icon": !j }), children: x })
144
+ }
145
+ ),
146
+ /* @__PURE__ */ y("span", { className: L("input-container", `type-${S}`), children: [
147
+ /* @__PURE__ */ n(
148
+ "input",
149
+ {
150
+ ref: M,
151
+ type: ne(),
152
+ className: L("input"),
153
+ value: e,
154
+ disabled: l,
155
+ id: D,
156
+ onChange: i,
157
+ onFocus: ee,
158
+ onBlur: Y,
159
+ ...I
160
+ }
161
+ ),
162
+ S === "password" && e && /* @__PURE__ */ n(
163
+ ye,
164
+ {
165
+ className: L("eye-icon"),
166
+ onMouseDown: ie,
167
+ onMouseLeave: K,
168
+ onMouseUp: K,
169
+ onTouchStart: ie,
170
+ onTouchEnd: K,
171
+ onTouchCancel: K,
172
+ children: B ? /* @__PURE__ */ n(wt, {}) : /* @__PURE__ */ n(vt, {})
173
+ }
174
+ ),
175
+ a && !e && /* @__PURE__ */ y("span", { className: L("placeholder"), children: [
176
+ a,
177
+ h && !c && /* @__PURE__ */ n("span", { className: L("asterisk") })
178
+ ] })
179
+ ] }),
180
+ /* @__PURE__ */ n(
181
+ It,
182
+ {
183
+ className: L("max-length-display"),
184
+ value: e.length,
185
+ maxValue: b
186
+ }
187
+ ),
188
+ z && e.length > 0 && /* @__PURE__ */ n("span", { className: L("icon-container-end"), children: /* @__PURE__ */ n(
189
+ "button",
190
+ {
191
+ type: "button",
192
+ className: L("clear-icon", { disabled: l }),
193
+ onClick: te,
194
+ onMouseDown: (O) => O.preventDefault(),
195
+ children: /* @__PURE__ */ n(lt, {})
196
+ }
197
+ ) }),
198
+ f && /* @__PURE__ */ n("span", { className: L("icon-container-end"), children: /* @__PURE__ */ n("span", { className: L("icon"), children: f }) })
199
+ ]
200
+ }
201
+ ),
202
+ (Z || p) && /* @__PURE__ */ n("div", { className: L("additional-content", { disabled: l }), children: Z ? /* @__PURE__ */ y(ce, { children: [
203
+ /* @__PURE__ */ n("span", { className: L("text", "error-text"), children: s }),
204
+ g && U
205
+ ] }) : p && U })
206
+ ] });
207
+ }
208
+ ), _s = (e, t) => {
209
+ Nt(e, t);
210
+ }, Ht = (e, t, o = 20) => {
211
+ const s = new Array(o).fill(void 0).map((l, i) => e - i), a = e - o + 1;
212
+ return t > e ? [t, ...s] : t < a ? [...s, t] : s;
213
+ }, Wt = "_header_1s3dn_1", jt = "_disabled_1s3dn_25", Yt = "_dropdown_1s3dn_8", Kt = {
214
+ header: Wt,
215
+ "dropdowns-wrapper": "_dropdowns-wrapper_1s3dn_8",
216
+ "button-prev": "_button-prev_1s3dn_13",
217
+ "button-next": "_button-next_1s3dn_14",
218
+ disabled: jt,
219
+ dropdown: Yt,
220
+ "month-dropdown": "_month-dropdown_1s3dn_44",
221
+ "toggle-button": "_toggle-button_1s3dn_47"
222
+ }, V = F.bind(Kt), Gt = ({
223
+ date: e = /* @__PURE__ */ new Date(),
224
+ changeYear: t = () => {
225
+ },
226
+ changeMonth: o = () => {
227
+ },
228
+ decreaseMonth: s = () => {
229
+ },
230
+ increaseMonth: a = () => {
231
+ },
232
+ prevMonthButtonDisabled: l = !1,
233
+ nextMonthButtonDisabled: i = !1,
234
+ headerNodes: r = null,
235
+ customClassName: _ = "",
236
+ yearsOptions: c = [],
237
+ locale: p
238
+ }) => {
239
+ const v = e.getFullYear(), x = e.getMonth(), f = Le(() => {
240
+ const g = Array(12).keys(), S = new Intl.DateTimeFormat(p, {
241
+ month: "long"
242
+ }), A = (d) => S.format(new Date(v, d));
243
+ return Array.from(g, A).reduce((d, b, m) => d.concat({
244
+ value: m,
245
+ label: b
246
+ }), []);
247
+ }, [p, v]), z = Le(() => {
248
+ const g = (/* @__PURE__ */ new Date()).getFullYear();
249
+ return (c.length > 0 ? c : Ht(g, v)).reduce(
250
+ (A, u) => A.concat({ value: u, label: `${u}` }),
251
+ []
252
+ );
253
+ }, [c, v]), P = (g) => {
254
+ o(g);
255
+ }, h = (g) => {
256
+ t(g);
257
+ };
258
+ return /* @__PURE__ */ y(ce, { children: [
259
+ r && /* @__PURE__ */ n("div", { className: V(_), children: r }),
260
+ /* @__PURE__ */ y("div", { className: V("header"), children: [
261
+ /* @__PURE__ */ n(
262
+ "button",
263
+ {
264
+ type: "button",
265
+ "aria-label": "Previous Months",
266
+ disabled: l,
267
+ onClick: (g) => {
268
+ g.stopPropagation(), s();
269
+ },
270
+ className: V("button-prev", { disabled: l }),
271
+ children: /* @__PURE__ */ n(Ge, {})
272
+ }
273
+ ),
274
+ /* @__PURE__ */ y("div", { className: V("dropdowns-wrapper"), children: [
275
+ /* @__PURE__ */ n(
276
+ Ze,
277
+ {
278
+ options: f,
279
+ value: x,
280
+ onChange: P,
281
+ transparentBackground: !0,
282
+ className: V("dropdown", "month-dropdown"),
283
+ toggleButtonClassName: V("toggle-button")
284
+ }
285
+ ),
286
+ /* @__PURE__ */ n(
287
+ Ze,
288
+ {
289
+ options: z,
290
+ value: v,
291
+ onChange: h,
292
+ transparentBackground: !0,
293
+ className: V("dropdown"),
294
+ toggleButtonClassName: V("toggle-button")
295
+ }
296
+ )
297
+ ] }),
298
+ /* @__PURE__ */ n(
299
+ "button",
300
+ {
301
+ type: "button",
302
+ "aria-label": "Next Months",
303
+ disabled: i,
304
+ onClick: (g) => {
305
+ g.stopPropagation(), a();
306
+ },
307
+ className: V("button-next", { disabled: i }),
308
+ children: /* @__PURE__ */ n(Ge, {})
309
+ }
310
+ )
311
+ ] })
312
+ ] });
313
+ }, Xt = "_calendar_1511k_5", Jt = "_date_1511k_104", Qt = "_disabled_1511k_150", Zt = "_popper_1511k_159", Ut = "_input_1511k_163", qt = {
314
+ calendar: Xt,
315
+ "current-date": "_current-date_1511k_103",
316
+ date: Jt,
317
+ "end-date": "_end-date_1511k_121",
318
+ "selected-range": "_selected-range_1511k_131",
319
+ disabled: Qt,
320
+ popper: Zt,
321
+ input: Ut,
322
+ "input-range": "_input-range_1511k_174"
323
+ }, fe = F.bind(qt), Vt = "en", en = "MM-dd-yyyy", tn = " to ", Ue = (e) => Et(e) ? void 0 : e, nn = He(
324
+ ({ selectsRange: e, value: t, ...o }, s) => /* @__PURE__ */ n(
325
+ je,
326
+ {
327
+ ...o,
328
+ className: fe("input", e ? "input-range" : ""),
329
+ defaultWidth: !1,
330
+ value: e ? (t == null ? void 0 : t.replace(" - ", tn)) ?? "" : t,
331
+ ref: s,
332
+ readOnly: !0
333
+ }
334
+ )
335
+ ), fs = (e) => {
336
+ const {
337
+ onChange: t = () => {
338
+ },
339
+ disabled: o = !1,
340
+ onBlur: s = () => {
341
+ },
342
+ onFocus: a = () => {
343
+ },
344
+ headerNodes: l = null,
345
+ customClassName: i = "",
346
+ customTimeInput: r = void 0,
347
+ shouldCloseOnSelect: _ = !0,
348
+ popperClassName: c = "",
349
+ calendarClassName: p = "",
350
+ popperPlacement: v = "bottom-start",
351
+ fixedHeight: x = !0,
352
+ language: f = Vt,
353
+ yearsOptions: z = [],
354
+ dateFormat: P = en,
355
+ value: h = null
356
+ } = e, { minDate: g, maxDate: S } = e, A = Ue(g), u = Ue(S), d = "selectsRange" in e && e.selectsRange === !0, b = we(null), m = d ? (h == null ? void 0 : h[0]) ?? void 0 : void 0, w = d ? (h == null ? void 0 : h[1]) ?? void 0 : void 0, I = m == null ? void 0 : m.toDateString(), N = w == null ? void 0 : w.toDateString(), $ = w && m && w > m, M = d ? "Select date range" : "Select date", D = e.placeholder ?? M, B = {
357
+ customInput: /* @__PURE__ */ n(nn, { ref: b, selectsRange: d }),
358
+ placeholderText: D,
359
+ disabled: o,
360
+ shouldCloseOnSelect: _,
361
+ fixedHeight: x,
362
+ locale: f,
363
+ showPopperArrow: !1,
364
+ dayClassName: (H) => {
365
+ if (!d) {
366
+ const U = h == null ? void 0 : h.toDateString(), ne = H.toDateString();
367
+ return fe("date", {
368
+ "current-date": ne === U,
369
+ disabled: o
370
+ });
371
+ }
372
+ const ee = H.toDateString(), Y = ee === I, te = $ && ee === N, Z = m && w && H > m && H < w;
373
+ return fe("date", {
374
+ "current-date": Y,
375
+ "selected-range": Z && !te,
376
+ "end-date": te && $,
377
+ disabled: o
378
+ });
379
+ },
380
+ calendarClassName: fe(p, "calendar"),
381
+ renderCustomHeader: (H) => /* @__PURE__ */ n(
382
+ Gt,
383
+ {
384
+ ...H,
385
+ headerNodes: l,
386
+ customClassName: i,
387
+ yearsOptions: z,
388
+ locale: f
389
+ }
390
+ ),
391
+ onBlur: s,
392
+ onFocus: a,
393
+ customTimeInput: r,
394
+ showTimeInput: !!r,
395
+ popperClassName: fe(c, "popper"),
396
+ dateFormat: P,
397
+ className: fe("datepicker"),
398
+ popperPlacement: v
399
+ };
400
+ return d ? /* @__PURE__ */ n(
401
+ Qe,
402
+ {
403
+ ...B,
404
+ selectsRange: !0,
405
+ startDate: m,
406
+ endDate: w,
407
+ onChange: t,
408
+ minDate: A,
409
+ maxDate: u
410
+ }
411
+ ) : /* @__PURE__ */ n(
412
+ Qe,
413
+ {
414
+ ...B,
415
+ selected: h,
416
+ onChange: t,
417
+ minDate: A,
418
+ maxDate: u
419
+ }
420
+ );
421
+ }, on = "_disabled_1rpph_43", sn = "_input_1rpph_107", rn = {
422
+ "selected-item": "_selected-item_1rpph_16",
423
+ "validation-error": "_validation-error_1rpph_35",
424
+ "highlight-un-stored-item": "_highlight-un-stored-item_1rpph_40",
425
+ disabled: on,
426
+ "mobile-disabled": "_mobile-disabled_1rpph_48",
427
+ "selected-item-text": "_selected-item-text_1rpph_54",
428
+ "single-line": "_single-line_1rpph_58",
429
+ "cross-icon": "_cross-icon_1rpph_64",
430
+ input: sn
431
+ }, Se = F.bind(rn), an = (e) => e.scrollWidth > e.clientWidth, ln = ({
432
+ item: e,
433
+ onRemoveItem: t,
434
+ disabled: o = !1,
435
+ mobileDisabled: s = !1,
436
+ parseValueToString: a,
437
+ error: l = !1,
438
+ editItem: i,
439
+ editable: r = !1,
440
+ getAdditionalCreationCondition: _ = () => !0,
441
+ storedOption: c = !0,
442
+ highlightUnStoredItem: p = !1,
443
+ variant: v = "light",
444
+ getItemName: x,
445
+ singleLine: f = !1,
446
+ className: z,
447
+ textClassName: P
448
+ }) => {
449
+ const [h, g] = X(!1), [S, A] = X(""), [u, d] = X(!1), b = we(null), m = () => {
450
+ !o && r && !c && (A((x == null ? void 0 : x(e)) || (a == null ? void 0 : a(e)) || ""), g(!0));
451
+ }, w = (k) => {
452
+ A(k.target.value);
453
+ }, I = (k) => {
454
+ const B = _(S);
455
+ k.key === "Enter" && B && (i(e, S), g(!1), A(""));
456
+ }, N = () => {
457
+ g(!1), A("");
458
+ }, $ = (k) => {
459
+ k.stopPropagation(), t(e);
460
+ }, M = (a == null ? void 0 : a(e)) || "";
461
+ De(() => {
462
+ if (b.current && f) {
463
+ const k = () => {
464
+ b.current && d(an(b.current));
465
+ };
466
+ if (k(), typeof ResizeObserver < "u") {
467
+ const B = new ResizeObserver(k);
468
+ return B.observe(b.current), () => B.disconnect();
469
+ }
470
+ } else
471
+ d(!1);
472
+ }, [M, f]);
473
+ const D = Se(
474
+ "selected-item-text",
475
+ {
476
+ "single-line": f
477
+ },
478
+ P
479
+ ), j = Se(
480
+ "selected-item",
481
+ v,
482
+ {
483
+ [`validation-${l}`]: l,
484
+ disabled: o,
485
+ "mobile-disabled": s,
486
+ "highlight-un-stored-item": p && !c
487
+ },
488
+ z
489
+ );
490
+ return h ? /* @__PURE__ */ n(
491
+ "input",
492
+ {
493
+ autoFocus: !0,
494
+ value: S,
495
+ onChange: w,
496
+ onKeyDown: I,
497
+ onBlur: N,
498
+ className: Se("input")
499
+ }
500
+ ) : /* @__PURE__ */ y("div", { className: j, onClick: m, children: [
501
+ /* @__PURE__ */ n(
502
+ "span",
503
+ {
504
+ ref: b,
505
+ className: D,
506
+ title: f && u ? M : void 0,
507
+ children: M
508
+ }
509
+ ),
510
+ !o && /* @__PURE__ */ n(
511
+ "button",
512
+ {
513
+ type: "button",
514
+ className: Se("cross-icon", {
515
+ [`validation-${l}`]: l,
516
+ "mobile-disabled": s,
517
+ disabled: o
518
+ }),
519
+ onClick: $,
520
+ children: /* @__PURE__ */ n(kt, {})
521
+ }
522
+ )
523
+ ] });
524
+ }, cn = ({
525
+ items: e = [],
526
+ parseValueToString: t,
527
+ getItemValidationErrorType: o,
528
+ storedItemsMap: s = {},
529
+ highlightUnStoredItem: a = !1,
530
+ renderCustomSelectedItem: l,
531
+ selectedItemSingleLine: i,
532
+ selectedItemClassName: r,
533
+ selectedItemTextClassName: _,
534
+ ...c
535
+ }) => e.map((p) => l ? l(p) : /* @__PURE__ */ n(
536
+ ln,
537
+ {
538
+ parseValueToString: t,
539
+ error: (o == null ? void 0 : o(p)) || "",
540
+ item: p,
541
+ storedOption: !!s[t(p)],
542
+ highlightUnStoredItem: a,
543
+ singleLine: i,
544
+ className: r,
545
+ textClassName: _,
546
+ ...c
547
+ },
548
+ t == null ? void 0 : t(p)
549
+ )), dn = "_prompt_1xfmd_16", un = {
550
+ prompt: dn
551
+ }, pn = F.bind(un), mn = ({ children: e = null }) => /* @__PURE__ */ n("div", { className: pn("prompt"), children: e }), _n = "_item_zw4ux_16", fn = "_divider_zw4ux_24", hn = "_active_zw4ux_49", gn = "_value_zw4ux_55", bn = "_tag_zw4ux_69", yn = "_disabled_zw4ux_80", wn = {
552
+ item: _n,
553
+ divider: fn,
554
+ "new-item": "_new-item_zw4ux_31",
555
+ active: hn,
556
+ value: gn,
557
+ "key-variant": "_key-variant_zw4ux_66",
558
+ tag: bn,
559
+ "button-active": "_button-active_zw4ux_80",
560
+ disabled: yn,
561
+ "value-variant": "_value-variant_zw4ux_100"
562
+ }, _e = F.bind(wn), qe = ({
563
+ isActive: e = !1,
564
+ isSelected: t = !1,
565
+ isNew: o = !1,
566
+ children: s = null,
567
+ disabled: a = !1,
568
+ optionVariant: l = "",
569
+ newItemButtonText: i = "",
570
+ ...r
571
+ }) => {
572
+ const _ = () => i || (l === "key-variant" ? "New key" : "New value");
573
+ return o ? /* @__PURE__ */ y(ce, { children: [
574
+ /* @__PURE__ */ n("div", { className: _e("divider") }),
575
+ /* @__PURE__ */ y(
576
+ "li",
577
+ {
578
+ className: _e("new-item", l, {
579
+ active: e,
580
+ selected: t,
581
+ disabled: a
582
+ }),
583
+ ...r,
584
+ children: [
585
+ /* @__PURE__ */ n("span", { className: _e("value"), children: s }),
586
+ /* @__PURE__ */ n(
587
+ Ie,
588
+ {
589
+ ...!a && r,
590
+ className: _e({ "button-active": e }),
591
+ icon: /* @__PURE__ */ n(ht, {}),
592
+ variant: "text",
593
+ children: _()
594
+ }
595
+ )
596
+ ]
597
+ }
598
+ )
599
+ ] }) : /* @__PURE__ */ n(
600
+ "li",
601
+ {
602
+ className: _e("item", l, {
603
+ active: e,
604
+ selected: t,
605
+ disabled: a
606
+ }),
607
+ ...a ? {} : r,
608
+ children: /* @__PURE__ */ n("span", { className: _e("label", "tag"), children: s })
609
+ }
610
+ );
611
+ }, vn = "_container_12uzd_16", Nn = {
612
+ container: vn,
613
+ "empty-list-message": "_empty-list-message_12uzd_20",
614
+ "limitation-item": "_limitation-item_12uzd_28"
615
+ }, ke = F.bind(Nn), xn = (e) => {
616
+ const {
617
+ options: t,
618
+ async: o,
619
+ inputValue: s,
620
+ loading: a,
621
+ createWithoutConfirmation: l,
622
+ customEmptyListMessage: i,
623
+ customNoMatchesMessage: r,
624
+ optionVariant: _,
625
+ newItemButtonText: c,
626
+ renderOption: p,
627
+ getUniqKey: v,
628
+ getItemProps: x,
629
+ parseValueToString: f,
630
+ limitationText: z = "Too many results. Type to search",
631
+ optionsLimit: P = 0,
632
+ shouldShowEmptyListMessage: h = !0
633
+ } = e, g = oe(() => (t || []).filter((N) => f(N).toUpperCase().indexOf((s.toUpperCase() || "").trim()) > -1), [s, t, f]), S = oe(
634
+ (N, $, M = !1) => p ? p(N, $, M, x) : /* @__PURE__ */ n(
635
+ qe,
636
+ {
637
+ optionVariant: _,
638
+ ...x({ item: N, index: $ }),
639
+ isNew: M,
640
+ newItemButtonText: c,
641
+ children: f(N)
642
+ },
643
+ (v == null ? void 0 : v(N)) || f(N)
644
+ ),
645
+ [x, v, c, _, f, p]
646
+ ), A = oe(
647
+ (N) => N.length ? N.map(($, M) => S($, M)) : "",
648
+ [S]
649
+ ), u = oe(
650
+ (N) => {
651
+ const $ = N.length;
652
+ return /* @__PURE__ */ n("div", { className: ke({ container: !$ }), children: /* @__PURE__ */ n(
653
+ qe,
654
+ {
655
+ optionVariant: _,
656
+ isNew: !0,
657
+ newItemButtonText: c,
658
+ ...x({ item: s, index: $ }),
659
+ children: f(s)
660
+ },
661
+ f(s)
662
+ ) });
663
+ },
664
+ [x, s, c, _, f]
665
+ ), d = oe(
666
+ (N) => a ? /* @__PURE__ */ y(ce, { children: [
667
+ /* @__PURE__ */ n(mn, { children: /* @__PURE__ */ n(ft, {}) }),
668
+ !l && u(N)
669
+ ] }) : "",
670
+ [l, a, u]
671
+ ), b = oe(() => {
672
+ const N = (t == null ? void 0 : t.length) === 0 ? i || "No available options" : r || "No matches found";
673
+ return /* @__PURE__ */ n("div", { className: ke("empty-list-message"), children: N });
674
+ }, [i, r, t == null ? void 0 : t.length]), m = o ? t : g(), w = d(t);
675
+ if (w)
676
+ return w;
677
+ const I = We(m);
678
+ return I && !h && l ? null : /* @__PURE__ */ y("div", { className: ke({ container: t.length }), children: [
679
+ /* @__PURE__ */ y(_t, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: [
680
+ I ? h && b() : A(m),
681
+ (m == null ? void 0 : m.length) > P && P > 0 && z ? /* @__PURE__ */ n("li", { className: ke("limitation-item"), "aria-hidden": "true", children: z }) : null
682
+ ] }),
683
+ !l && u(m)
684
+ ] });
685
+ }, Cn = "_menu_f64z5_16", Sn = "_opened_f64z5_34", kn = "_dark_f64z5_37", $n = {
686
+ menu: Cn,
687
+ opened: Sn,
688
+ dark: kn
689
+ }, Dn = F.bind($n), In = (e, t) => !e || e <= t.trim().length, ut = He(
690
+ ({
691
+ isOpen: e = !1,
692
+ style: t = {},
693
+ minLength: o = 1,
694
+ isDropdownMode: s,
695
+ inputValue: a = "",
696
+ className: l = "",
697
+ portalMenuAttribute: i = null,
698
+ ...r
699
+ }, _) => /* @__PURE__ */ n(
700
+ "ul",
701
+ {
702
+ ref: _,
703
+ className: Dn(
704
+ "menu",
705
+ { opened: e && (s || In(o, a)) },
706
+ l
707
+ ),
708
+ style: t,
709
+ ...i ? { [i]: "" } : {},
710
+ children: /* @__PURE__ */ n(xn, { inputValue: a, ...r })
711
+ }
712
+ )
713
+ ), Ve = (e, t) => typeof e == "string" ? e : t ? String(e[t(e)]) : "", he = (e, t) => {
714
+ var s;
715
+ return e === t ? !0 : !!(e && t && typeof e == "object" && typeof t == "object" && Object.keys(e).length === Object.keys(t).length && ((s = Object.entries(e)) != null && s.every(([a, l]) => he(l, t[a]))));
716
+ }, En = (e, t, o) => typeof e == "string" ? e === t : o ? (() => {
717
+ const s = o(e);
718
+ return e[s] === t[s];
719
+ })() : !1, An = ({
720
+ options: e = [],
721
+ onChange: t,
722
+ selectedItems: o = [],
723
+ handleUnStoredItemCb: s = null,
724
+ existingItemsMap: a = {},
725
+ children: l,
726
+ customizeNewSelectedValue: i = (p) => p,
727
+ getOptionUniqKey: r,
728
+ getOptionUniqKeyValue: _,
729
+ ...c
730
+ }) => {
731
+ const [p, v] = X(a), x = (u, d) => {
732
+ const b = {
733
+ ...p
734
+ };
735
+ u.forEach((m) => {
736
+ if (e.find((w) => En(w, m, r))) {
737
+ const w = Ve(m, r);
738
+ b[w] = !0;
739
+ }
740
+ }), v(b), d(b);
741
+ }, f = (u, d) => {
742
+ const b = Ve(u, r);
743
+ if (b in p) {
744
+ const m = { ...p };
745
+ delete m[b], v(m), d(m);
746
+ } else
747
+ d(p);
748
+ }, z = (u, d) => {
749
+ const I = (Array.isArray(u) ? u : [u]).map((D) => i(D)).flatMap((D) => Array.isArray(D) ? D : [D]).filter(
750
+ (D, j, k) => k.findIndex((B) => he(B, D)) === j
751
+ );
752
+ if (!I || I.length === 0)
753
+ return;
754
+ const $ = [...o.filter(
755
+ (D) => !I.some((j) => he(j, D))
756
+ ), ...I];
757
+ t == null || t($, d), x(I, (D) => s == null ? void 0 : s($, D));
758
+ }, P = (u, d) => {
759
+ const b = o.indexOf(u), m = [...o];
760
+ m.splice(b, 1, d), t == null || t(m, null);
761
+ }, h = (u, d) => {
762
+ const b = o.filter((w) => !he(w, u));
763
+ t == null || t(b, d), f(u, (w) => s == null ? void 0 : s(b, w));
764
+ }, g = (u, d) => {
765
+ u && z(u, d);
766
+ }, S = (u) => ({
767
+ removeItem: h,
768
+ editItem: P,
769
+ handleChange: t,
770
+ getOptionUniqKeyValue: _,
771
+ storedItemsMap: p,
772
+ batchAddItems: (b) => {
773
+ z(b, u);
774
+ },
775
+ ...u
776
+ });
777
+ return /* @__PURE__ */ n(
778
+ $e,
779
+ {
780
+ ...c,
781
+ stateReducer: (u, d) => {
782
+ switch (d.type) {
783
+ case $e.stateChangeTypes.keyDownEnter:
784
+ case $e.stateChangeTypes.clickItem:
785
+ return {
786
+ ...d,
787
+ highlightedIndex: u.highlightedIndex,
788
+ inputValue: ""
789
+ };
790
+ default:
791
+ return d;
792
+ }
793
+ },
794
+ onChange: g,
795
+ selectedItem: null,
796
+ children: (u) => l == null ? void 0 : l(S(u))
797
+ }
798
+ );
799
+ }, Mn = "_autocomplete_1so4a_16", Tn = "_disabled_1so4a_32", zn = "_error_1so4a_35", Pn = "_touched_1so4a_35", On = "_input_1so4a_77", Fn = {
800
+ autocomplete: Mn,
801
+ "autocomplete-wrapper": "_autocomplete-wrapper_1so4a_28",
802
+ disabled: Tn,
803
+ error: zn,
804
+ touched: Pn,
805
+ "clear-icon": "_clear-icon_1so4a_46",
806
+ "clear-icon--disabled": "_clear-icon--disabled_1so4a_56",
807
+ "autocomplete-input": "_autocomplete-input_1so4a_60",
808
+ "single-line-mode": "_single-line-mode_1so4a_68",
809
+ "mobile-disabled": "_mobile-disabled_1so4a_72",
810
+ input: On,
811
+ "type-number": "_type-number_1so4a_101",
812
+ "error-text": "_error-text_1so4a_112",
813
+ "dropdown-button": "_dropdown-button_1so4a_121",
814
+ "icon-reversed": "_icon-reversed_1so4a_129"
815
+ }, re = F.bind(Fn), hs = (e) => {
816
+ const {
817
+ options: t = [],
818
+ loading: o = !1,
819
+ onStateChange: s = () => {
820
+ },
821
+ value: a = [],
822
+ placeholder: l = "",
823
+ error: i = "",
824
+ touched: r = !1,
825
+ creatable: _ = !1,
826
+ editable: c = !1,
827
+ onChange: p = () => {
828
+ },
829
+ onFocus: v = () => {
830
+ },
831
+ onBlur: x = () => {
832
+ },
833
+ disabled: f = !1,
834
+ isDropdownMode: z = !1,
835
+ mobileDisabled: P = !1,
836
+ inputProps: h = {},
837
+ parseValueToString: g = (C) => C == null ? "" : String(C),
838
+ maxLength: S = null,
839
+ async: A = !1,
840
+ customClass: u = "",
841
+ createWithoutConfirmation: d = !1,
842
+ getItemValidationErrorType: b = null,
843
+ clearItemsError: m = () => {
844
+ },
845
+ getAdditionalCreationCondition: w = () => !0,
846
+ highlightUnStoredItem: I = !1,
847
+ parseInputValueFn: N = null,
848
+ handleUnStoredItemCb: $ = null,
849
+ dataAutomationId: M = "",
850
+ existingItemsMap: D = {},
851
+ customizeNewSelectedValue: j = (C) => C,
852
+ renderCustomSelectedItem: k,
853
+ useFixedPositioning: B,
854
+ newItemButtonText: H = "",
855
+ menuClassName: ee = "",
856
+ selectedItemSingleLine: Y,
857
+ selectedItemClassName: te,
858
+ selectedItemTextClassName: Z,
859
+ ...U
860
+ } = e, { refs: ne, floatingStyles: ie } = rt({
861
+ placement: "bottom-start",
862
+ strategy: B ? "fixed" : "absolute",
863
+ whileElementsMounted: at
864
+ }), K = a.length === 0 && !f ? l : "", O = we(null);
865
+ De(() => {
866
+ m();
867
+ }, [m, a]);
868
+ const se = (C, R) => {
869
+ p(C, R);
870
+ }, Ee = (C, R, W) => ({ item: T, index: G, ...ue }) => C({
871
+ item: T,
872
+ index: G,
873
+ isSelected: W.some((ge) => he(ge, T)),
874
+ ...ue,
875
+ isActive: R === G
876
+ }), Ae = ({
877
+ event: C,
878
+ removeItem: R,
879
+ inputValue: W
880
+ }) => {
881
+ C.key === "Backspace" && !W && a.length && R(a[a.length - 1], null);
882
+ }, E = ({
883
+ inputValue: C,
884
+ selectItem: R,
885
+ clearSelection: W,
886
+ batchAddItems: T
887
+ }) => {
888
+ if (N) {
889
+ const G = N(C);
890
+ T(G.length ? G : [C]), W();
891
+ } else
892
+ R(C), W();
893
+ }, q = (C) => (R) => {
894
+ C(R, null), O.current && O.current.focus();
895
+ }, de = t.filter((C) => a.every((R) => !he(R, C)));
896
+ return /* @__PURE__ */ n(
897
+ An,
898
+ {
899
+ onChange: se,
900
+ itemToString: g,
901
+ selectedItems: a,
902
+ onStateChange: s,
903
+ options: t,
904
+ existingItemsMap: D,
905
+ handleUnStoredItemCb: $,
906
+ customizeNewSelectedValue: j,
907
+ children: ({
908
+ getInputProps: C,
909
+ getItemProps: R,
910
+ isOpen: W,
911
+ inputValue: T = "",
912
+ highlightedIndex: G,
913
+ removeItem: ue,
914
+ editItem: ge,
915
+ openMenu: pe,
916
+ selectItem: be,
917
+ clearSelection: ve,
918
+ toggleMenu: Me,
919
+ storedItemsMap: me,
920
+ getRootProps: Te,
921
+ batchAddItems: Ne
922
+ }) => {
923
+ const Ye = Te(void 0, { suppressRefError: !0 }), xe = T ?? "";
924
+ return /* @__PURE__ */ y("div", { ...Ye, className: re("autocomplete-wrapper"), children: [
925
+ /* @__PURE__ */ y(ce, { children: [
926
+ /* @__PURE__ */ y(
927
+ "div",
928
+ {
929
+ ref: ne.setReference,
930
+ className: re("autocomplete", u, {
931
+ "mobile-disabled": P,
932
+ error: i,
933
+ touched: r,
934
+ disabled: f
935
+ }),
936
+ children: [
937
+ /* @__PURE__ */ y(
938
+ "div",
939
+ {
940
+ className: re("autocomplete-input", {
941
+ "mobile-disabled": P,
942
+ "single-line-mode": Y
943
+ }),
944
+ children: [
945
+ /* @__PURE__ */ n(
946
+ cn,
947
+ {
948
+ items: a,
949
+ onRemoveItem: q(ue),
950
+ disabled: f,
951
+ mobileDisabled: P,
952
+ parseValueToString: g,
953
+ getItemValidationErrorType: b,
954
+ renderCustomSelectedItem: k,
955
+ editItem: ge,
956
+ editable: c,
957
+ getAdditionalCreationCondition: w,
958
+ storedItemsMap: me,
959
+ highlightUnStoredItem: I,
960
+ selectedItemSingleLine: Y,
961
+ selectedItemClassName: te,
962
+ selectedItemTextClassName: Z
963
+ }
964
+ ),
965
+ /* @__PURE__ */ n(
966
+ "input",
967
+ {
968
+ ...C({
969
+ ref: O,
970
+ placeholder: K,
971
+ maxLength: S,
972
+ onFocus: () => {
973
+ z && pe(), v();
974
+ },
975
+ onKeyDown: (J) => {
976
+ J.key === ct && T && _ && w(T) && E({
977
+ inputValue: T,
978
+ selectItem: be,
979
+ clearSelection: ve,
980
+ batchAddItems: Ne
981
+ }), Ae({ event: J, removeItem: ue, inputValue: T });
982
+ },
983
+ onBlur: () => {
984
+ x(), T && _ && w(T) && E({
985
+ inputValue: T,
986
+ selectItem: be,
987
+ clearSelection: ve,
988
+ batchAddItems: Ne
989
+ });
990
+ },
991
+ disabled: f,
992
+ ...h
993
+ }),
994
+ className: re("input", { disabled: f }, h.className),
995
+ "data-automation-id": M
996
+ }
997
+ )
998
+ ]
999
+ }
1000
+ ),
1001
+ (h == null ? void 0 : h.clearable) && !We(a) && /* @__PURE__ */ n(
1002
+ "button",
1003
+ {
1004
+ type: "button",
1005
+ className: re("clear-icon", { "clear-icon--disabled": f }),
1006
+ onClick: () => {
1007
+ var J;
1008
+ return !f && ((J = h == null ? void 0 : h.onClear) == null ? void 0 : J.call(h));
1009
+ },
1010
+ onMouseDown: (J) => J.preventDefault(),
1011
+ children: /* @__PURE__ */ n(lt, {})
1012
+ }
1013
+ ),
1014
+ z && /* @__PURE__ */ n(
1015
+ "button",
1016
+ {
1017
+ type: "button",
1018
+ className: re("dropdown-button", { "icon-reversed": W }),
1019
+ onClick: () => Me(),
1020
+ "aria-label": "Toggle dropdown",
1021
+ "aria-expanded": W,
1022
+ children: /* @__PURE__ */ n(it, {})
1023
+ }
1024
+ )
1025
+ ]
1026
+ }
1027
+ ),
1028
+ i && r && /* @__PURE__ */ n("span", { className: re("error-text"), children: i })
1029
+ ] }),
1030
+ /* @__PURE__ */ n(
1031
+ ut,
1032
+ {
1033
+ isOpen: W,
1034
+ loading: o,
1035
+ async: A,
1036
+ ref: ne.setFloating,
1037
+ newItemButtonText: H,
1038
+ isDropdownMode: z,
1039
+ style: ie,
1040
+ inputValue: xe.trim(),
1041
+ getItemProps: Ee(R, G, a),
1042
+ parseValueToString: g,
1043
+ createWithoutConfirmation: d,
1044
+ options: de,
1045
+ className: ee,
1046
+ ...U
1047
+ }
1048
+ )
1049
+ ] });
1050
+ }
1051
+ }
1052
+ );
1053
+ }, Rn = {
1054
+ "item-counter": "_item-counter_1qk4p_1"
1055
+ }, Bn = F.bind(Rn), Ln = ({
1056
+ activePage: e,
1057
+ pageSize: t,
1058
+ totalItems: o,
1059
+ ofText: s,
1060
+ itemsText: a,
1061
+ limitExceeded: l = !1,
1062
+ warningContent: i = null
1063
+ }) => {
1064
+ const r = e * t, _ = r - t;
1065
+ return /* @__PURE__ */ y("div", { className: Bn("item-counter"), children: [
1066
+ `${_ + 1} - ${r < o ? r : o}`,
1067
+ ` ${s} ${o}${l ? "+" : ""} ${a}`,
1068
+ i
1069
+ ] });
1070
+ }, Hn = "_selected_cjnvy_23", Wn = {
1071
+ "size-selector": "_size-selector_cjnvy_1",
1072
+ "size-option": "_size-option_cjnvy_6",
1073
+ selected: Hn
1074
+ }, et = F.bind(Wn), jn = ({
1075
+ currentSize: e,
1076
+ options: t,
1077
+ onClickOption: o
1078
+ }) => /* @__PURE__ */ n("div", { className: et("size-selector"), children: t.map((s) => /* @__PURE__ */ n(
1079
+ "button",
1080
+ {
1081
+ className: et("size-option", { selected: s === e }),
1082
+ onClick: () => {
1083
+ o(s);
1084
+ },
1085
+ children: s
1086
+ },
1087
+ s
1088
+ )) }), Yn = {
1089
+ "page-size-control": "_page-size-control_8rb7p_1",
1090
+ "page-size-options": "_page-size-options_8rb7p_8",
1091
+ "size-selector-button": "_size-selector-button_8rb7p_12"
1092
+ }, Fe = F.bind(Yn), Kn = ({
1093
+ size: e,
1094
+ sizeOptions: t,
1095
+ perPageText: o,
1096
+ changeSize: s
1097
+ }) => {
1098
+ const [a, l] = X(!1), i = (r) => {
1099
+ s(r), l(!1);
1100
+ };
1101
+ return /* @__PURE__ */ y("div", { className: Fe("page-size-control"), children: [
1102
+ /* @__PURE__ */ n(
1103
+ dt,
1104
+ {
1105
+ content: /* @__PURE__ */ n(jn, { options: t, onClickOption: i, currentSize: e }),
1106
+ placement: "top",
1107
+ isOpened: a,
1108
+ setIsOpened: l,
1109
+ className: Fe("page-size-options"),
1110
+ children: /* @__PURE__ */ n(Ie, { className: Fe("size-selector-button"), variant: "text", adjustWidthOn: "content", children: e })
1111
+ }
1112
+ ),
1113
+ ` ${o}`
1114
+ ] });
1115
+ }, Gn = {
1116
+ "page-selector": "_page-selector_rtho4_1",
1117
+ "field-wrapper": "_field-wrapper_rtho4_6",
1118
+ "apply-button": "_apply-button_rtho4_10"
1119
+ }, Re = F.bind(Gn), Xn = ({
1120
+ totalPages: e,
1121
+ pageText: t,
1122
+ goActionText: o,
1123
+ selectPage: s
1124
+ }) => {
1125
+ const [a, l] = X(""), [i, r] = X(!0), _ = (p) => {
1126
+ const v = p.target.value.replace(/\D/g, ""), x = Number(v), f = x > 0 && x <= e;
1127
+ r(f), l(v);
1128
+ }, c = () => {
1129
+ s(Number(a));
1130
+ };
1131
+ return /* @__PURE__ */ y("div", { className: Re("page-selector"), children: [
1132
+ /* @__PURE__ */ n("div", { className: Re("field-wrapper"), children: /* @__PURE__ */ n(
1133
+ je,
1134
+ {
1135
+ onChange: _,
1136
+ value: a,
1137
+ placeholder: t,
1138
+ error: i ? "" : "Error",
1139
+ touched: !0,
1140
+ defaultWidth: !1,
1141
+ displayError: !1
1142
+ }
1143
+ ) }),
1144
+ /* @__PURE__ */ n(Ie, { onClick: c, disabled: !a || !i, className: Re("apply-button"), children: o })
1145
+ ] });
1146
+ }, Jn = {
1147
+ "active-page": "_active-page_1gl9o_1",
1148
+ "page-selector": "_page-selector_1gl9o_10",
1149
+ "page-selector-button": "_page-selector-button_1gl9o_14"
1150
+ }, Be = F.bind(Jn), Qn = ({
1151
+ activePage: e,
1152
+ totalPages: t,
1153
+ pageText: o,
1154
+ goToText: s,
1155
+ goActionText: a,
1156
+ changePage: l
1157
+ }) => {
1158
+ const [i, r] = X(!1), _ = (c) => {
1159
+ l(c), r(!1);
1160
+ };
1161
+ return /* @__PURE__ */ y("div", { className: Be("active-page"), children: [
1162
+ `${o} `,
1163
+ /* @__PURE__ */ n(
1164
+ dt,
1165
+ {
1166
+ content: /* @__PURE__ */ n(
1167
+ Xn,
1168
+ {
1169
+ pageText: o,
1170
+ goActionText: a,
1171
+ selectPage: _,
1172
+ totalPages: t
1173
+ }
1174
+ ),
1175
+ title: s,
1176
+ placement: "top",
1177
+ isOpened: i,
1178
+ setIsOpened: r,
1179
+ className: Be("page-selector"),
1180
+ children: /* @__PURE__ */ n(Ie, { className: Be("page-selector-button"), variant: "text", adjustWidthOn: "content", children: e })
1181
+ }
1182
+ )
1183
+ ] });
1184
+ }, Zn = "_bar_y74hy_1", Un = "_section_y74hy_9", qn = "_selected_y74hy_33", Vn = "_tooltip_y74hy_37", eo = {
1185
+ bar: Zn,
1186
+ "section-with-tooltip": "_section-with-tooltip_y74hy_9",
1187
+ section: Un,
1188
+ selected: qn,
1189
+ "tooltip-wrapper": "_tooltip-wrapper_y74hy_37",
1190
+ tooltip: Vn,
1191
+ "tooltip-text": "_tooltip-text_y74hy_48",
1192
+ "page-number": "_page-number_y74hy_52"
1193
+ }, ae = F.bind(eo), tt = 13, nt = 260, to = ({
1194
+ totalPages: e,
1195
+ activePage: t,
1196
+ changePage: o,
1197
+ captions: s
1198
+ }) => {
1199
+ const a = nt / e, l = Math.min(Math.ceil(nt / tt), e), i = Math.max(tt, a), r = [];
1200
+ for (let c = 1; c <= e; c++)
1201
+ r.push({
1202
+ end: c * a,
1203
+ pageNumber: c
1204
+ });
1205
+ const _ = Array.from({ length: l }, () => ({ pages: { from: void 0, to: void 0 } }));
1206
+ return _.forEach((c, p) => {
1207
+ for (c.pages.from = r[0].pageNumber; i * (p + 1) > r[0].end; )
1208
+ r.shift();
1209
+ c.pages.to = r[0].pageNumber, r.shift();
1210
+ }), /* @__PURE__ */ n("div", { className: ae("bar"), children: _.map((c, p) => /* @__PURE__ */ n(
1211
+ "div",
1212
+ {
1213
+ className: ae("section-with-tooltip"),
1214
+ style: { width: i },
1215
+ onClick: () => c.pages.from && o(c.pages.from),
1216
+ children: /* @__PURE__ */ n(
1217
+ $t,
1218
+ {
1219
+ content: /* @__PURE__ */ y("div", { className: ae("tooltip"), children: [
1220
+ /* @__PURE__ */ n("div", { className: ae("tooltip-text"), children: s.goTo }),
1221
+ /* @__PURE__ */ n("div", { className: ae("page-number"), children: c.pages.from })
1222
+ ] }),
1223
+ wrapperClassName: ae("tooltip-wrapper"),
1224
+ placement: "top",
1225
+ children: /* @__PURE__ */ n(
1226
+ "div",
1227
+ {
1228
+ className: ae("section", {
1229
+ selected: c.pages.from && c.pages.to && c.pages.from <= t && t <= c.pages.to
1230
+ })
1231
+ }
1232
+ )
1233
+ }
1234
+ )
1235
+ },
1236
+ p
1237
+ )) });
1238
+ }, no = "_next_pyt8p_21", oo = {
1239
+ "page-navigator": "_page-navigator_pyt8p_1",
1240
+ "page-buttons": "_page-buttons_pyt8p_7",
1241
+ "page-button": "_page-button_pyt8p_7",
1242
+ next: no
1243
+ }, le = F.bind(oo), so = ({
1244
+ activePage: e,
1245
+ changePage: t,
1246
+ totalPages: o,
1247
+ captions: s
1248
+ }) => {
1249
+ const a = () => {
1250
+ t(1);
1251
+ }, l = () => {
1252
+ t(e - 1);
1253
+ }, i = () => {
1254
+ t(e + 1);
1255
+ }, r = () => {
1256
+ t(o);
1257
+ };
1258
+ return /* @__PURE__ */ y("div", { className: le("page-navigator"), children: [
1259
+ /* @__PURE__ */ y("div", { className: le("page-buttons"), children: [
1260
+ /* @__PURE__ */ n(
1261
+ ye,
1262
+ {
1263
+ className: le("page-button"),
1264
+ onClick: a,
1265
+ disabled: e === 1,
1266
+ children: /* @__PURE__ */ n(Xe, {})
1267
+ }
1268
+ ),
1269
+ /* @__PURE__ */ n(
1270
+ ye,
1271
+ {
1272
+ className: le("page-button"),
1273
+ onClick: l,
1274
+ disabled: e === 1,
1275
+ children: /* @__PURE__ */ n(Je, {})
1276
+ }
1277
+ )
1278
+ ] }),
1279
+ /* @__PURE__ */ n(
1280
+ to,
1281
+ {
1282
+ totalPages: o,
1283
+ activePage: e,
1284
+ changePage: t,
1285
+ captions: s
1286
+ }
1287
+ ),
1288
+ /* @__PURE__ */ y("div", { className: le("page-buttons"), children: [
1289
+ /* @__PURE__ */ n(
1290
+ ye,
1291
+ {
1292
+ className: le("page-button", "next"),
1293
+ onClick: i,
1294
+ disabled: e === o,
1295
+ children: /* @__PURE__ */ n(Je, {})
1296
+ }
1297
+ ),
1298
+ /* @__PURE__ */ n(
1299
+ ye,
1300
+ {
1301
+ className: le("page-button", "next"),
1302
+ onClick: r,
1303
+ disabled: e === o,
1304
+ children: /* @__PURE__ */ n(Xe, {})
1305
+ }
1306
+ )
1307
+ ] })
1308
+ ] });
1309
+ }, ro = {
1310
+ "page-controls": "_page-controls_thyf8_1",
1311
+ "total-pages": "_total-pages_thyf8_8"
1312
+ }, ot = F.bind(ro), ao = ({
1313
+ activePage: e,
1314
+ changePage: t,
1315
+ captions: o,
1316
+ totalPages: s
1317
+ }) => /* @__PURE__ */ y("div", { className: ot("page-controls"), children: [
1318
+ /* @__PURE__ */ n(
1319
+ Qn,
1320
+ {
1321
+ activePage: e,
1322
+ totalPages: s,
1323
+ changePage: t,
1324
+ pageText: o.page,
1325
+ goToText: o.goTo,
1326
+ goActionText: o.goAction
1327
+ }
1328
+ ),
1329
+ /* @__PURE__ */ n(
1330
+ so,
1331
+ {
1332
+ changePage: t,
1333
+ activePage: e,
1334
+ totalPages: s,
1335
+ captions: { goTo: o.goTo }
1336
+ }
1337
+ ),
1338
+ /* @__PURE__ */ y("span", { className: ot("total-pages"), children: [
1339
+ `${o.of} `,
1340
+ s
1341
+ ] })
1342
+ ] }), lo = "_pagination_ax9ed_1", co = {
1343
+ pagination: lo
1344
+ }, io = F.bind(co), gs = ({
1345
+ activePage: e,
1346
+ totalPages: t,
1347
+ pageSize: o,
1348
+ totalItems: s,
1349
+ pageSizeOptions: a,
1350
+ changePage: l,
1351
+ changePageSize: i,
1352
+ captions: r,
1353
+ className: _,
1354
+ warningContent: c,
1355
+ limitExceeded: p = !1
1356
+ }) => {
1357
+ const v = (r == null ? void 0 : r.of) || "of", x = (r == null ? void 0 : r.page) || "Page";
1358
+ return /* @__PURE__ */ y("div", { className: io("pagination", _), children: [
1359
+ /* @__PURE__ */ n(
1360
+ Ln,
1361
+ {
1362
+ activePage: e,
1363
+ pageSize: o,
1364
+ totalItems: s,
1365
+ ofText: v,
1366
+ itemsText: (r == null ? void 0 : r.items) || "items",
1367
+ limitExceeded: p,
1368
+ warningContent: c
1369
+ }
1370
+ ),
1371
+ t > 1 && /* @__PURE__ */ n(
1372
+ ao,
1373
+ {
1374
+ activePage: e,
1375
+ totalPages: t,
1376
+ changePage: l,
1377
+ captions: {
1378
+ page: x,
1379
+ of: v,
1380
+ goTo: (r == null ? void 0 : r.goTo) || "Go to page",
1381
+ goAction: (r == null ? void 0 : r.goAction) || "Go"
1382
+ }
1383
+ }
1384
+ ),
1385
+ /* @__PURE__ */ n(
1386
+ Kn,
1387
+ {
1388
+ size: o,
1389
+ sizeOptions: a,
1390
+ changeSize: i,
1391
+ perPageText: (r == null ? void 0 : r.perPage) || "per page"
1392
+ }
1393
+ )
1394
+ ] });
1395
+ }, uo = ({ skip: e }) => {
1396
+ mt(() => {
1397
+ if (e)
1398
+ return;
1399
+ let t = window.scrollY, o = !0;
1400
+ const s = 300, a = () => {
1401
+ if (!o)
1402
+ return;
1403
+ window.scrollY !== t && window.scrollTo(0, t);
1404
+ }, l = (r) => {
1405
+ o && (r.preventDefault(), r.stopImmediatePropagation(), a());
1406
+ };
1407
+ t = window.scrollY, window.addEventListener("scroll", l, { passive: !1, capture: !0 }), requestAnimationFrame(() => {
1408
+ t = window.scrollY, a();
1409
+ });
1410
+ const i = setTimeout(() => {
1411
+ o = !1;
1412
+ }, s);
1413
+ return () => {
1414
+ clearTimeout(i), window.removeEventListener("scroll", l, { capture: !0 });
1415
+ };
1416
+ }, [e]);
1417
+ }, po = ({ skip: e, reference: t }) => {
1418
+ De(() => {
1419
+ if (e)
1420
+ return;
1421
+ const o = () => {
1422
+ const s = t.current;
1423
+ s instanceof HTMLElement && s.blur();
1424
+ };
1425
+ return window.addEventListener("resize", o), () => {
1426
+ window.removeEventListener("resize", o);
1427
+ };
1428
+ }, [e, t]);
1429
+ }, mo = ({ skip: e, onClose: t, menuRef: o }) => {
1430
+ De(() => {
1431
+ if (e)
1432
+ return;
1433
+ const s = (a) => {
1434
+ var l;
1435
+ (l = o.current) != null && l.contains(a.target) || t();
1436
+ };
1437
+ return window.addEventListener("scroll", s, !0), () => {
1438
+ window.removeEventListener("scroll", s, !0);
1439
+ };
1440
+ }, [e, t, o]);
1441
+ }, _o = {
1442
+ "input-wrapper": "_input-wrapper_d9vma_1",
1443
+ "dropdown-button": "_dropdown-button_d9vma_6",
1444
+ "icon-reversed": "_icon-reversed_d9vma_14"
1445
+ }, st = F.bind(_o), fo = 0, ho = bt({
1446
+ fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"],
1447
+ boundary: document == null ? void 0 : document.documentElement,
1448
+ rootBoundary: "viewport"
1449
+ }), go = yt({
1450
+ apply({ rects: e, elements: t }) {
1451
+ Object.assign(t.floating.style, {
1452
+ width: `${e.reference.width}px`
1453
+ });
1454
+ }
1455
+ }), bs = (e) => {
1456
+ const {
1457
+ options: t = [],
1458
+ value: o,
1459
+ placeholder: s = "",
1460
+ onChange: a = () => {
1461
+ },
1462
+ onFocus: l = () => {
1463
+ },
1464
+ onBlur: i = () => {
1465
+ },
1466
+ disabled: r = !1,
1467
+ inputProps: _ = {},
1468
+ parseValueToString: c = (E) => E === null ? "" : String(E),
1469
+ minLength: p = 1,
1470
+ skipOptionCreation: v = !1,
1471
+ maxLength: x = null,
1472
+ optionVariant: f = "",
1473
+ isRequired: z = !1,
1474
+ error: P = "",
1475
+ touched: h = !1,
1476
+ setTouch: g = () => {
1477
+ },
1478
+ createWithoutConfirmation: S = !1,
1479
+ menuClassName: A = "",
1480
+ icon: u,
1481
+ isDropdownMode: d = !1,
1482
+ isOptionUnique: b,
1483
+ refFunction: m,
1484
+ stateReducer: w,
1485
+ onStateChange: I,
1486
+ useFixedPositioning: N,
1487
+ dropdownMatchInputWidth: $ = !1,
1488
+ withMenuFlip: M = !1,
1489
+ placement: D = "bottom-start",
1490
+ newItemButtonText: j = "",
1491
+ menuPortalRoot: k,
1492
+ ...B
1493
+ } = e, [H, ee] = X(!1), Y = we(null), te = oe(() => {
1494
+ var E;
1495
+ return (E = Y.current) == null ? void 0 : E.call(Y);
1496
+ }, []), Z = !H || !k, U = k || N ? "fixed" : "absolute", ne = !H || U === "absolute", ie = Le(
1497
+ () => [
1498
+ ...M ? [ho] : [],
1499
+ ...$ ? [go] : []
1500
+ ],
1501
+ [M, $]
1502
+ ), { refs: K, floatingStyles: O } = rt({
1503
+ placement: D,
1504
+ whileElementsMounted: at,
1505
+ strategy: U,
1506
+ middleware: ie
1507
+ });
1508
+ uo({ skip: Z }), po({ skip: Z, reference: K.reference }), mo({
1509
+ skip: ne,
1510
+ onClose: te,
1511
+ menuRef: K.floating
1512
+ });
1513
+ const se = (E, q, de) => ({ item: C, index: R, ...W }) => E({
1514
+ item: C,
1515
+ index: R,
1516
+ isSelected: de !== null && de === C,
1517
+ ...W,
1518
+ isActive: q === R
1519
+ }), Ee = (E, q) => {
1520
+ E.key === St && (E.preventDefault(), q(t.length));
1521
+ }, Ae = oe(
1522
+ (E, ...q) => {
1523
+ (E == null ? void 0 : E.isOpen) !== void 0 && ee(E.isOpen), I == null || I(E, ...q);
1524
+ },
1525
+ [I]
1526
+ );
1527
+ return /* @__PURE__ */ n(
1528
+ $e,
1529
+ {
1530
+ onChange: a,
1531
+ itemToString: c,
1532
+ selectedItem: o,
1533
+ onStateChange: Ae,
1534
+ defaultHighlightedIndex: fo,
1535
+ stateReducer: w,
1536
+ children: ({
1537
+ getInputProps: E,
1538
+ getItemProps: q,
1539
+ setHighlightedIndex: de,
1540
+ toggleMenu: C,
1541
+ openMenu: R,
1542
+ closeMenu: W,
1543
+ isOpen: T,
1544
+ inputValue: G,
1545
+ highlightedIndex: ue,
1546
+ getRootProps: ge,
1547
+ selectItem: pe
1548
+ }) => {
1549
+ const be = ge(void 0, { suppressRefError: !0 }), ve = {
1550
+ ...be,
1551
+ ref: (Q) => (K.setReference(Q), be.ref(Q))
1552
+ };
1553
+ Y.current || (Y.current = W);
1554
+ const Me = G ?? "", { onClear: me, clearable: Te, ...Ne } = _, xe = Te && o !== null, J = (...Q) => {
1555
+ pe(null), me == null || me(...Q);
1556
+ }, ze = /* @__PURE__ */ n(
1557
+ ut,
1558
+ {
1559
+ isOpen: T,
1560
+ isDropdownMode: d,
1561
+ style: O,
1562
+ ref: K.setFloating,
1563
+ portalMenuAttribute: k ? Ct : null,
1564
+ minLength: p,
1565
+ inputValue: (G || "").trim(),
1566
+ getItemProps: se(q, ue, o),
1567
+ parseValueToString: c,
1568
+ optionVariant: f,
1569
+ createWithoutConfirmation: S,
1570
+ className: A,
1571
+ options: t,
1572
+ newItemButtonText: j,
1573
+ ...B
1574
+ }
1575
+ );
1576
+ return /* @__PURE__ */ y(ce, { children: [
1577
+ /* @__PURE__ */ y("div", { className: st("input-wrapper"), ...ve, children: [
1578
+ /* @__PURE__ */ n(
1579
+ je,
1580
+ {
1581
+ ...E({
1582
+ placeholder: r ? "" : s,
1583
+ maxLength: x || void 0,
1584
+ onFocus: () => {
1585
+ d && !T && (R(), g == null || g(!0)), l();
1586
+ },
1587
+ ref: m,
1588
+ onKeyDown: (Q) => {
1589
+ Q.key === ct && Q.preventDefault(), G && T && Ee(Q, de);
1590
+ },
1591
+ onBlur: (Q) => {
1592
+ const Ce = Me.trim(), Pe = !We(Ce), Ke = Pe ? t.find((Oe) => c(Oe) === Ce) : void 0;
1593
+ pe(Ke || (!v && S && Pe ? Ce : null)), i(Q), b == null || b(
1594
+ Pe ? !t.some((Oe) => c(Oe) === Ce) : null
1595
+ ), d && T && C(), g == null || g(!0);
1596
+ },
1597
+ disabled: r,
1598
+ defaultWidth: !1,
1599
+ isRequired: z,
1600
+ touched: h,
1601
+ error: P,
1602
+ ...Ne,
1603
+ clearable: xe,
1604
+ onClear: xe ? J : me,
1605
+ endIcon: d && !u ? /* @__PURE__ */ n(
1606
+ "button",
1607
+ {
1608
+ type: "button",
1609
+ className: st("dropdown-button", { "icon-reversed": T }),
1610
+ onClick: () => C(),
1611
+ "aria-label": "Toggle dropdown",
1612
+ "aria-expanded": T,
1613
+ children: /* @__PURE__ */ n(it, {})
1614
+ }
1615
+ ) : u,
1616
+ minLength: d ? 0 : p
1617
+ })
1618
+ }
1619
+ ),
1620
+ !k && ze
1621
+ ] }),
1622
+ k && gt(ze, k)
1623
+ ] });
1624
+ }
1625
+ }
1626
+ );
1627
+ };
1628
+ export {
1629
+ ut as A,
1630
+ fs as D,
1631
+ je as F,
1632
+ hs as M,
1633
+ gs as P,
1634
+ bs as S,
1635
+ mn as a,
1636
+ qe as b,
1637
+ xn as c,
1638
+ _s as r
1639
+ };