@memobit/libs 1.0.20 → 1.0.21

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.
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import E1, { Component as J2, Fragment as e3, createContext as w0, forwardRef as M1, useCallback as j, useContext as f0, useEffect as U, useId as C0, useImperativeHandle as w2, useMemo as m1, useRef as Y, useState as z } from "react";
2
- import { Fragment as c1, jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { Fragment as l1, jsx as e, jsxs as r } from "react/jsx-runtime";
3
3
  import { createPortal as q1 } from "react-dom";
4
4
  var t3 = /* @__PURE__ */ r("svg", {
5
5
  xmlns: "http://www.w3.org/2000/svg",
@@ -10088,7 +10088,7 @@ var t3 = /* @__PURE__ */ r("svg", {
10088
10088
  style: p,
10089
10089
  title: w,
10090
10090
  type: v,
10091
- children: n ? /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("span", { className: "button__spinner" }), /* @__PURE__ */ e("span", { children: c || "Loading..." })] }) : /* @__PURE__ */ r(c1, { children: [
10091
+ children: n ? /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("span", { className: "button__spinner" }), /* @__PURE__ */ e("span", { children: c || "Loading..." })] }) : /* @__PURE__ */ r(l1, { children: [
10092
10092
  o !== void 0 && (typeof o == "string" ? /* @__PURE__ */ e(G, {
10093
10093
  size: "lg",
10094
10094
  name: o,
@@ -10218,7 +10218,7 @@ var O1 = ({ children: t, className: c, isOpen: l, noPadding: a = !1, onClose: s,
10218
10218
  className: n,
10219
10219
  style: d
10220
10220
  });
10221
- }, M2 = ({ emoji: t, icon: c, svg: l, appName: a, heading: s, onClick: o, className: i = "", showSeparator: n = !0 }) => /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ r("div", {
10221
+ }, M2 = ({ emoji: t, icon: c, svg: l, appName: a, heading: s, onClick: o, className: i = "", showSeparator: n = !0 }) => /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ r("div", {
10222
10222
  className: [
10223
10223
  "app-header",
10224
10224
  o ? "app-header--clickable" : "",
@@ -10337,6 +10337,82 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
10337
10337
  children: "×"
10338
10338
  })]
10339
10339
  });
10340
+ }, K = ({ title: t, position: c = "top", delay: l = 200, children: a, disabled: s = !1, className: o = "", maxWidth: i, maxHeight: n }) => {
10341
+ const [d, h] = z(!1), [m, p] = z({
10342
+ top: 0,
10343
+ left: 0
10344
+ }), g = Y(null), w = Y(null), v = Y(null), u = Y(null), f = Y(!1), C = n !== void 0, x = C ? 150 : 0, b = () => {
10345
+ if (!v.current || !u.current) return;
10346
+ const H = v.current.firstElementChild, S = H && H.getBoundingClientRect().width > 0 ? H.getBoundingClientRect() : v.current.getBoundingClientRect(), k = u.current.getBoundingClientRect(), A = 8;
10347
+ let D = 0, P = 0;
10348
+ switch (c) {
10349
+ case "top":
10350
+ D = S.top - k.height - A, P = S.left + S.width / 2 - k.width / 2;
10351
+ break;
10352
+ case "bottom":
10353
+ D = S.bottom + A, P = S.left + S.width / 2 - k.width / 2;
10354
+ break;
10355
+ case "left":
10356
+ D = S.top + S.height / 2 - k.height / 2, P = S.left - k.width - A;
10357
+ break;
10358
+ case "right":
10359
+ D = S.top + S.height / 2 - k.height / 2, P = S.right + A;
10360
+ break;
10361
+ }
10362
+ const O = 8;
10363
+ P < O && (P = O), P + k.width > window.innerWidth - O && (P = window.innerWidth - k.width - O), D < O && (D = O), D + k.height > window.innerHeight - O && (D = window.innerHeight - k.height - O), p({
10364
+ top: D,
10365
+ left: P
10366
+ });
10367
+ }, M = () => {
10368
+ s || f.current || (w.current && (clearTimeout(w.current), w.current = null), g.current = setTimeout(() => {
10369
+ h(!0);
10370
+ }, l));
10371
+ }, _ = () => {
10372
+ f.current || (g.current && clearTimeout(g.current), x > 0 ? w.current = setTimeout(() => h(!1), x) : h(!1));
10373
+ }, N = (H) => {
10374
+ H.pointerType !== "touch" && H.pointerType !== "pen" || s || (f.current = !0, g.current && (clearTimeout(g.current), g.current = null), H.stopPropagation(), h((S) => !S));
10375
+ };
10376
+ U(() => (d && (b(), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b)), () => {
10377
+ window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
10378
+ }), [d]), U(() => {
10379
+ if (!d) return;
10380
+ const H = (S) => {
10381
+ v.current?.contains(S.target) || u.current?.contains(S.target) || h(!1);
10382
+ };
10383
+ return document.addEventListener("pointerdown", H), () => {
10384
+ document.removeEventListener("pointerdown", H), f.current = !1;
10385
+ };
10386
+ }, [d]), U(() => () => {
10387
+ g.current && clearTimeout(g.current), w.current && clearTimeout(w.current);
10388
+ }, []);
10389
+ const L = () => {
10390
+ C && w.current && (clearTimeout(w.current), w.current = null);
10391
+ }, y = () => {
10392
+ C && (w.current = setTimeout(() => h(!1), x));
10393
+ };
10394
+ return /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("span", {
10395
+ ref: v,
10396
+ className: "tooltip-trigger",
10397
+ onMouseEnter: M,
10398
+ onMouseLeave: _,
10399
+ onFocus: M,
10400
+ onBlur: _,
10401
+ onPointerDown: N,
10402
+ children: a
10403
+ }), d && t && q1(/* @__PURE__ */ r("div", {
10404
+ ref: u,
10405
+ className: `tooltip tooltip--${c} ${C ? "tooltip--scrollable" : ""} ${o}`,
10406
+ style: {
10407
+ top: `${m.top}px`,
10408
+ left: `${m.left}px`,
10409
+ ...i !== void 0 && { maxWidth: typeof i == "number" ? `${i}px` : i },
10410
+ ...n !== void 0 && { maxHeight: typeof n == "number" ? `${n}px` : n }
10411
+ },
10412
+ onMouseEnter: L,
10413
+ onMouseLeave: y,
10414
+ children: [t, /* @__PURE__ */ e("div", { className: `tooltip__arrow tooltip__arrow--${c}` })]
10415
+ }), document.body)] });
10340
10416
  }, jl = ({ action: t, secondaryAction: c, className: l = "", description: a, dismissLabel: s = "Dismiss", onDismiss: o, showDismiss: i = !0, title: n, variant: d = "default" }) => {
10341
10417
  const [h, m] = z(!1), p = t?.variant || (d === "default" ? "default" : d);
10342
10418
  if (h) return null;
@@ -10370,14 +10446,16 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
10370
10446
  children: c.text
10371
10447
  })]
10372
10448
  })]
10373
- }), i && /* @__PURE__ */ e("button", {
10374
- className: "banner__dismiss",
10375
- type: "button",
10449
+ }), i && /* @__PURE__ */ e(K, {
10376
10450
  title: s,
10377
- onClick: g,
10378
- children: /* @__PURE__ */ e(G, {
10379
- name: "clear",
10380
- size: "sm"
10451
+ children: /* @__PURE__ */ e("button", {
10452
+ className: "banner__dismiss",
10453
+ type: "button",
10454
+ onClick: g,
10455
+ children: /* @__PURE__ */ e(G, {
10456
+ name: "clear",
10457
+ size: "sm"
10458
+ })
10381
10459
  })
10382
10460
  })]
10383
10461
  });
@@ -10872,26 +10950,26 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
10872
10950
  return l === "multiple" && Array.isArray(t) ? t.some((Z) => U1(Z, B)) : !1;
10873
10951
  }, D = (B) => {
10874
10952
  if (l === "range" && t && "start" in t) {
10875
- const { start: Z, end: Q } = t, i1 = B.getTime();
10876
- return i1 > Z.getTime() && i1 < Q.getTime();
10953
+ const { start: Z, end: J } = t, n1 = B.getTime();
10954
+ return n1 > Z.getTime() && n1 < J.getTime();
10877
10955
  }
10878
10956
  return !1;
10879
- }, P = (B) => l === "range" && y ? B.getTime() > y.getTime() : !1, O = (B) => B.getMonth() === L.getMonth(), o1 = (B) => {
10957
+ }, P = (B) => l === "range" && y ? B.getTime() > y.getTime() : !1, O = (B) => B.getMonth() === L.getMonth(), s1 = (B) => {
10880
10958
  if (!k(B)) {
10881
10959
  if (l === "single") c?.(B);
10882
10960
  else if (l === "range") if (!y) v ? v(B) : (N(B), c?.(void 0));
10883
10961
  else {
10884
- const Z = A0(B, y) ? B : y, Q = A0(B, y) ? y : B;
10962
+ const Z = A0(B, y) ? B : y, J = A0(B, y) ? y : B;
10885
10963
  c?.({
10886
10964
  start: Z,
10887
- end: Q
10965
+ end: J
10888
10966
  }), v ? v(null) : N(null);
10889
10967
  }
10890
10968
  else if (l === "multiple") {
10891
- const Z = Array.isArray(t) ? t : [], Q = Z.findIndex((i1) => U1(i1, B));
10892
- if (Q >= 0) {
10893
- const i1 = Z.filter((b1, f1) => f1 !== Q);
10894
- c?.(i1.length > 0 ? i1 : void 0);
10969
+ const Z = Array.isArray(t) ? t : [], J = Z.findIndex((n1) => U1(n1, B));
10970
+ if (J >= 0) {
10971
+ const n1 = Z.filter((b1, f1) => f1 !== J);
10972
+ c?.(n1.length > 0 ? n1 : void 0);
10895
10973
  } else c?.([...Z, B]);
10896
10974
  }
10897
10975
  }
@@ -10901,7 +10979,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
10901
10979
  }, X = () => {
10902
10980
  const B = u0(L, 1);
10903
10981
  p ? p(B) : f(B);
10904
- }, a1 = () => {
10982
+ }, i1 = () => {
10905
10983
  const B = /* @__PURE__ */ new Date(), Z = new Date(B.getFullYear(), B.getMonth(), 1);
10906
10984
  p ? p(Z) : f(Z), x("days"), l === "single" && c?.(B);
10907
10985
  }, I = () => {
@@ -10911,12 +10989,12 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
10911
10989
  }, p1 = (B) => {
10912
10990
  const Z = new Date(L.getFullYear(), B, 1);
10913
10991
  p ? p(Z) : f(Z), x("days");
10914
- }, s1 = (B) => {
10992
+ }, h1 = (B) => {
10915
10993
  const Z = new Date(B, L.getMonth(), 1);
10916
10994
  p ? p(Z) : f(Z), x("months");
10917
10995
  }, W = () => {
10918
10996
  M(b - P1);
10919
- }, n1 = () => {
10997
+ }, o1 = () => {
10920
10998
  M(b + P1);
10921
10999
  }, v1 = () => {
10922
11000
  const B = new Date(L.getFullYear() - 1, L.getMonth(), 1);
@@ -10934,12 +11012,14 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
10934
11012
  }, $1 = () => C === "years" ? /* @__PURE__ */ r("div", {
10935
11013
  className: "calendar__header",
10936
11014
  children: [
10937
- /* @__PURE__ */ e("button", {
10938
- type: "button",
10939
- className: "calendar__nav-button",
10940
- onClick: W,
11015
+ /* @__PURE__ */ e(K, {
10941
11016
  title: "Previous years",
10942
- children: "‹"
11017
+ children: /* @__PURE__ */ e("button", {
11018
+ type: "button",
11019
+ className: "calendar__nav-button",
11020
+ onClick: W,
11021
+ children: "‹"
11022
+ })
10943
11023
  }),
10944
11024
  /* @__PURE__ */ r("div", {
10945
11025
  className: "calendar__month-year",
@@ -10949,23 +11029,27 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
10949
11029
  b + P1 - 1
10950
11030
  ]
10951
11031
  }),
10952
- /* @__PURE__ */ e("button", {
10953
- type: "button",
10954
- className: "calendar__nav-button",
10955
- onClick: n1,
11032
+ /* @__PURE__ */ e(K, {
10956
11033
  title: "Next years",
10957
- children: "›"
11034
+ children: /* @__PURE__ */ e("button", {
11035
+ type: "button",
11036
+ className: "calendar__nav-button",
11037
+ onClick: o1,
11038
+ children: "›"
11039
+ })
10958
11040
  })
10959
11041
  ]
10960
11042
  }) : C === "months" ? /* @__PURE__ */ r("div", {
10961
11043
  className: "calendar__header",
10962
11044
  children: [
10963
- /* @__PURE__ */ e("button", {
10964
- type: "button",
10965
- className: "calendar__nav-button",
10966
- onClick: v1,
11045
+ /* @__PURE__ */ e(K, {
10967
11046
  title: "Previous year",
10968
- children: "‹"
11047
+ children: /* @__PURE__ */ e("button", {
11048
+ type: "button",
11049
+ className: "calendar__nav-button",
11050
+ onClick: v1,
11051
+ children: "‹"
11052
+ })
10969
11053
  }),
10970
11054
  /* @__PURE__ */ e("button", {
10971
11055
  type: "button",
@@ -10973,30 +11057,34 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
10973
11057
  onClick: $,
10974
11058
  children: L.getFullYear()
10975
11059
  }),
10976
- /* @__PURE__ */ e("button", {
10977
- type: "button",
10978
- className: "calendar__nav-button",
10979
- onClick: y1,
11060
+ /* @__PURE__ */ e(K, {
10980
11061
  title: "Next year",
10981
- children: "›"
11062
+ children: /* @__PURE__ */ e("button", {
11063
+ type: "button",
11064
+ className: "calendar__nav-button",
11065
+ onClick: y1,
11066
+ children: "›"
11067
+ })
10982
11068
  })
10983
11069
  ]
10984
11070
  }) : /* @__PURE__ */ r("div", {
10985
11071
  className: "calendar__header",
10986
11072
  children: [
10987
- /* @__PURE__ */ e("button", {
10988
- type: "button",
10989
- className: "calendar__nav-button",
10990
- onClick: V,
11073
+ /* @__PURE__ */ e(K, {
10991
11074
  title: "Previous month",
10992
- children: "‹"
11075
+ children: /* @__PURE__ */ e("button", {
11076
+ type: "button",
11077
+ className: "calendar__nav-button",
11078
+ onClick: V,
11079
+ children: "‹"
11080
+ })
10993
11081
  }),
10994
11082
  /* @__PURE__ */ e("div", {
10995
11083
  className: "calendar__month-year",
10996
11084
  children: d ? /* @__PURE__ */ e("span", {
10997
11085
  className: "calendar__header-label",
10998
11086
  children: $0[L.getMonth()]
10999
- }) : /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("button", {
11087
+ }) : /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("button", {
11000
11088
  type: "button",
11001
11089
  className: "calendar__header-button",
11002
11090
  onClick: I,
@@ -11008,32 +11096,34 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
11008
11096
  children: L.getFullYear()
11009
11097
  })] })
11010
11098
  }),
11011
- /* @__PURE__ */ e("button", {
11012
- type: "button",
11013
- className: "calendar__nav-button",
11014
- onClick: X,
11099
+ /* @__PURE__ */ e(K, {
11015
11100
  title: "Next month",
11016
- children: "›"
11101
+ children: /* @__PURE__ */ e("button", {
11102
+ type: "button",
11103
+ className: "calendar__nav-button",
11104
+ onClick: X,
11105
+ children: "›"
11106
+ })
11017
11107
  })
11018
11108
  ]
11019
- }), K = () => {
11020
- const B = k1(), Z = (/* @__PURE__ */ new Date()).getFullYear(), Q = L.getFullYear();
11109
+ }), Q = () => {
11110
+ const B = k1(), Z = (/* @__PURE__ */ new Date()).getFullYear(), J = L.getFullYear();
11021
11111
  return /* @__PURE__ */ e("div", {
11022
11112
  className: "calendar__years-grid",
11023
- children: B.map((i1) => /* @__PURE__ */ e("button", {
11113
+ children: B.map((n1) => /* @__PURE__ */ e("button", {
11024
11114
  type: "button",
11025
- className: `calendar__year-item ${i1 === Q ? "calendar__year-item--selected" : ""} ${i1 === Z ? "calendar__year-item--current" : ""}`,
11026
- onClick: () => s1(i1),
11027
- children: i1
11028
- }, i1))
11115
+ className: `calendar__year-item ${n1 === J ? "calendar__year-item--selected" : ""} ${n1 === Z ? "calendar__year-item--current" : ""}`,
11116
+ onClick: () => h1(n1),
11117
+ children: n1
11118
+ }, n1))
11029
11119
  });
11030
- }, t1 = () => {
11031
- const B = (/* @__PURE__ */ new Date()).getMonth(), Z = (/* @__PURE__ */ new Date()).getFullYear(), Q = L.getMonth(), i1 = L.getFullYear();
11120
+ }, r1 = () => {
11121
+ const B = (/* @__PURE__ */ new Date()).getMonth(), Z = (/* @__PURE__ */ new Date()).getFullYear(), J = L.getMonth(), n1 = L.getFullYear();
11032
11122
  return /* @__PURE__ */ e("div", {
11033
11123
  className: "calendar__months-grid",
11034
11124
  children: $0.map((b1, f1) => /* @__PURE__ */ e("button", {
11035
11125
  type: "button",
11036
- className: `calendar__month-item ${f1 === Q && i1 === L.getFullYear() ? "calendar__month-item--selected" : ""} ${f1 === B && Z === L.getFullYear() ? "calendar__month-item--current" : ""}`,
11126
+ className: `calendar__month-item ${f1 === J && n1 === L.getFullYear() ? "calendar__month-item--selected" : ""} ${f1 === B && Z === L.getFullYear() ? "calendar__month-item--current" : ""}`,
11037
11127
  onClick: () => p1(f1),
11038
11128
  children: b1.substring(0, 3)
11039
11129
  }, b1))
@@ -11043,15 +11133,15 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
11043
11133
  className: `calendar ${h}`,
11044
11134
  children: [
11045
11135
  g && $1(),
11046
- C === "years" && K(),
11047
- C === "months" && t1(),
11048
- C === "days" && /* @__PURE__ */ r(c1, { children: [
11136
+ C === "years" && Q(),
11137
+ C === "months" && r1(),
11138
+ C === "days" && /* @__PURE__ */ r(l1, { children: [
11049
11139
  n && !d && /* @__PURE__ */ e("div", {
11050
11140
  className: "calendar__today-section",
11051
11141
  children: /* @__PURE__ */ e("button", {
11052
11142
  type: "button",
11053
11143
  className: "calendar__today-button",
11054
- onClick: a1,
11144
+ onClick: i1,
11055
11145
  children: "Today"
11056
11146
  })
11057
11147
  }),
@@ -11066,14 +11156,14 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
11066
11156
  className: "calendar__days",
11067
11157
  children: H.map((B, Z) => /* @__PURE__ */ e("div", {
11068
11158
  className: "calendar__week",
11069
- children: B.map((Q, i1) => /* @__PURE__ */ e("button", {
11159
+ children: B.map((J, n1) => /* @__PURE__ */ e("button", {
11070
11160
  type: "button",
11071
- className: g1(Q),
11072
- onClick: () => o1(Q),
11073
- disabled: k(Q),
11074
- title: Q.toDateString(),
11075
- children: Q.getDate()
11076
- }, i1))
11161
+ className: g1(J),
11162
+ onClick: () => s1(J),
11163
+ disabled: k(J),
11164
+ title: J.toDateString(),
11165
+ children: J.getDate()
11166
+ }, n1))
11077
11167
  }, Z))
11078
11168
  })
11079
11169
  ] })
@@ -11257,7 +11347,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
11257
11347
  children: [n && /* @__PURE__ */ e("div", {
11258
11348
  className: `collapsible-section__header ${N ? "" : "collapsible-section__header--inline"} ${g ? "collapsible-section__header--space-between" : ""} ${w ? "collapsible-section__header--swap" : ""} ${h ? "collapsible-section__header--highlight" : ""} ${d ? "collapsible-section__header--accent" : ""} ${p ? `collapsible-section__header--size-${p}` : ""} ${u ? `collapsible-section__header--variant-${u}` : ""} ${v !== "plain" ? `collapsible-section__header--tint-${v}` : ""}`,
11259
11349
  onClick: N ? _ : void 0,
11260
- children: N ? /* @__PURE__ */ r(c1, { children: [
11350
+ children: N ? /* @__PURE__ */ r(l1, { children: [
11261
11351
  /* @__PURE__ */ r("div", {
11262
11352
  className: "collapsible-section__label",
11263
11353
  children: [
@@ -12109,7 +12199,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12109
12199
  const h = (m) => {
12110
12200
  a && c?.();
12111
12201
  };
12112
- return t ? q1(/* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("div", {
12202
+ return t ? q1(/* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("div", {
12113
12203
  style: {
12114
12204
  position: "fixed",
12115
12205
  inset: 0,
@@ -12156,13 +12246,15 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12156
12246
  className: "toast__action-button",
12157
12247
  children: a.label
12158
12248
  }),
12159
- o && /* @__PURE__ */ e("button", {
12160
- onClick: h,
12161
- className: "toast__close-button",
12249
+ o && /* @__PURE__ */ e(K, {
12162
12250
  title: "Close",
12163
- children: /* @__PURE__ */ e(G, {
12164
- name: "clear",
12165
- size: "sm"
12251
+ children: /* @__PURE__ */ e("button", {
12252
+ onClick: h,
12253
+ className: "toast__close-button",
12254
+ children: /* @__PURE__ */ e(G, {
12255
+ name: "clear",
12256
+ size: "sm"
12257
+ })
12166
12258
  })
12167
12259
  })
12168
12260
  ]
@@ -12283,82 +12375,6 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12283
12375
  value: n,
12284
12376
  children: t
12285
12377
  });
12286
- }, d1 = ({ title: t, position: c = "top", delay: l = 200, children: a, disabled: s = !1, className: o = "", maxWidth: i, maxHeight: n }) => {
12287
- const [d, h] = z(!1), [m, p] = z({
12288
- top: 0,
12289
- left: 0
12290
- }), g = Y(null), w = Y(null), v = Y(null), u = Y(null), f = Y(!1), C = n !== void 0, x = C ? 150 : 0, b = () => {
12291
- if (!v.current || !u.current) return;
12292
- const H = v.current.firstElementChild, S = H && H.getBoundingClientRect().width > 0 ? H.getBoundingClientRect() : v.current.getBoundingClientRect(), k = u.current.getBoundingClientRect(), A = 8;
12293
- let D = 0, P = 0;
12294
- switch (c) {
12295
- case "top":
12296
- D = S.top - k.height - A, P = S.left + S.width / 2 - k.width / 2;
12297
- break;
12298
- case "bottom":
12299
- D = S.bottom + A, P = S.left + S.width / 2 - k.width / 2;
12300
- break;
12301
- case "left":
12302
- D = S.top + S.height / 2 - k.height / 2, P = S.left - k.width - A;
12303
- break;
12304
- case "right":
12305
- D = S.top + S.height / 2 - k.height / 2, P = S.right + A;
12306
- break;
12307
- }
12308
- const O = 8;
12309
- P < O && (P = O), P + k.width > window.innerWidth - O && (P = window.innerWidth - k.width - O), D < O && (D = O), D + k.height > window.innerHeight - O && (D = window.innerHeight - k.height - O), p({
12310
- top: D,
12311
- left: P
12312
- });
12313
- }, M = () => {
12314
- s || f.current || (w.current && (clearTimeout(w.current), w.current = null), g.current = setTimeout(() => {
12315
- h(!0);
12316
- }, l));
12317
- }, _ = () => {
12318
- f.current || (g.current && clearTimeout(g.current), x > 0 ? w.current = setTimeout(() => h(!1), x) : h(!1));
12319
- }, N = (H) => {
12320
- H.pointerType !== "touch" && H.pointerType !== "pen" || s || (f.current = !0, g.current && (clearTimeout(g.current), g.current = null), H.stopPropagation(), h((S) => !S));
12321
- };
12322
- U(() => (d && (b(), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b)), () => {
12323
- window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
12324
- }), [d]), U(() => {
12325
- if (!d) return;
12326
- const H = (S) => {
12327
- v.current?.contains(S.target) || u.current?.contains(S.target) || h(!1);
12328
- };
12329
- return document.addEventListener("pointerdown", H), () => {
12330
- document.removeEventListener("pointerdown", H), f.current = !1;
12331
- };
12332
- }, [d]), U(() => () => {
12333
- g.current && clearTimeout(g.current), w.current && clearTimeout(w.current);
12334
- }, []);
12335
- const L = () => {
12336
- C && w.current && (clearTimeout(w.current), w.current = null);
12337
- }, y = () => {
12338
- C && (w.current = setTimeout(() => h(!1), x));
12339
- };
12340
- return /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("span", {
12341
- ref: v,
12342
- className: "tooltip-trigger",
12343
- onMouseEnter: M,
12344
- onMouseLeave: _,
12345
- onFocus: M,
12346
- onBlur: _,
12347
- onPointerDown: N,
12348
- children: a
12349
- }), d && t && q1(/* @__PURE__ */ r("div", {
12350
- ref: u,
12351
- className: `tooltip tooltip--${c} ${C ? "tooltip--scrollable" : ""} ${o}`,
12352
- style: {
12353
- top: `${m.top}px`,
12354
- left: `${m.left}px`,
12355
- ...i !== void 0 && { maxWidth: typeof i == "number" ? `${i}px` : i },
12356
- ...n !== void 0 && { maxHeight: typeof n == "number" ? `${n}px` : n }
12357
- },
12358
- onMouseEnter: L,
12359
- onMouseLeave: y,
12360
- children: [t, /* @__PURE__ */ e("div", { className: `tooltip__arrow tooltip__arrow--${c}` })]
12361
- }), document.body)] });
12362
12378
  }, Vr = ({ value: t, onChange: c, mode: l = "single", withTime: a = !1, timeFormat: s = "24h", withSeconds: o = !1, dateFormat: i = "YYYY-MM-DD", placeholder: n = "Select date...", disabled: d = !1, clearable: h = !0, autoClose: m = !0, alwaysOpen: p = !1, ...g }) => {
12363
12379
  const [w, v] = z(!1), [u, f] = z(0), [C, x] = z(0), [b, M] = z(0), [_, N] = z(!1), [L, y] = z(null), [H, S] = z({
12364
12380
  position: "fixed",
@@ -12381,7 +12397,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12381
12397
  }, [p, D]);
12382
12398
  const P = j(() => {
12383
12399
  if (p || !D || !k.current || !A.current) return;
12384
- const I = k.current.getBoundingClientRect(), $ = A.current.getBoundingClientRect(), p1 = 16, s1 = 8, W = window.innerHeight - I.bottom - p1, n1 = I.top - p1, v1 = W < $.height && n1 > $.height ? I.top - $.height - s1 : I.bottom + s1, y1 = Math.max(p1, Math.min(v1, window.innerHeight - $.height - p1)), k1 = Math.max(p1, Math.min(I.left, window.innerWidth - $.width - p1));
12400
+ const I = k.current.getBoundingClientRect(), $ = A.current.getBoundingClientRect(), p1 = 16, h1 = 8, W = window.innerHeight - I.bottom - p1, o1 = I.top - p1, v1 = W < $.height && o1 > $.height ? I.top - $.height - h1 : I.bottom + h1, y1 = Math.max(p1, Math.min(v1, window.innerHeight - $.height - p1)), k1 = Math.max(p1, Math.min(I.left, window.innerWidth - $.width - p1));
12385
12401
  S({
12386
12402
  position: "fixed",
12387
12403
  top: `${y1}px`,
@@ -12413,7 +12429,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12413
12429
  return a ? `${I} ${o ? F1(t, "HH:mm:ss") : F1(t, "HH:mm")}` : I;
12414
12430
  }
12415
12431
  return l === "range" && t && "start" in t ? `${F1(t.start, i)} - ${F1(t.end, i)}` : l === "multiple" && Array.isArray(t) ? t.map((I) => F1(I, i)).join(", ") : "";
12416
- }, o1 = (I) => {
12432
+ }, s1 = (I) => {
12417
12433
  if (!a || !(I instanceof Date)) {
12418
12434
  c?.(I), m && l !== "multiple" && !p && v(!1);
12419
12435
  return;
@@ -12426,7 +12442,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12426
12442
  I.setHours($, C, b), c?.(I);
12427
12443
  }, X = (I) => {
12428
12444
  I.stopPropagation(), y(null), c?.(void 0);
12429
- }, a1 = O();
12445
+ }, i1 = O();
12430
12446
  return /* @__PURE__ */ r("div", {
12431
12447
  className: "datepicker",
12432
12448
  children: [/* @__PURE__ */ r("div", {
@@ -12436,16 +12452,18 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12436
12452
  d || p || (D && y(null), v(!D));
12437
12453
  },
12438
12454
  children: [/* @__PURE__ */ e("span", {
12439
- className: `datepicker__value ${a1 ? "" : "datepicker__value--placeholder"}`,
12440
- children: a1 || n
12455
+ className: `datepicker__value ${i1 ? "" : "datepicker__value--placeholder"}`,
12456
+ children: i1 || n
12441
12457
  }), /* @__PURE__ */ r("div", {
12442
12458
  className: "datepicker__actions",
12443
- children: [h && a1 && /* @__PURE__ */ e("button", {
12444
- type: "button",
12445
- className: "datepicker__clear",
12446
- onClick: X,
12459
+ children: [h && i1 && /* @__PURE__ */ e(K, {
12447
12460
  title: "Clear",
12448
- children: "×"
12461
+ children: /* @__PURE__ */ e("button", {
12462
+ type: "button",
12463
+ className: "datepicker__clear",
12464
+ onClick: X,
12465
+ children: "×"
12466
+ })
12449
12467
  }), /* @__PURE__ */ e("span", {
12450
12468
  className: "datepicker__icon",
12451
12469
  children: /* @__PURE__ */ e(G, { name: "calendar" })
@@ -12458,7 +12476,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12458
12476
  ...g,
12459
12477
  mode: l,
12460
12478
  value: t,
12461
- onChange: o1,
12479
+ onChange: s1,
12462
12480
  rangeStart: l === "range" ? L : g.rangeStart,
12463
12481
  onRangeStartChange: l === "range" ? y : g.onRangeStartChange
12464
12482
  }), a && l === "single" && t instanceof Date && /* @__PURE__ */ r("div", {
@@ -12494,7 +12512,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12494
12512
  min: "0",
12495
12513
  max: "59"
12496
12514
  }),
12497
- o && /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("span", { children: ":" }), /* @__PURE__ */ e("input", {
12515
+ o && /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("span", { children: ":" }), /* @__PURE__ */ e("input", {
12498
12516
  type: "number",
12499
12517
  className: "datepicker__time-input",
12500
12518
  value: b,
@@ -12525,7 +12543,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12525
12543
  ...g,
12526
12544
  mode: l,
12527
12545
  value: t,
12528
- onChange: o1,
12546
+ onChange: s1,
12529
12547
  rangeStart: l === "range" ? L : g.rangeStart,
12530
12548
  onRangeStartChange: l === "range" ? y : g.onRangeStartChange
12531
12549
  }), a && l === "single" && t instanceof Date && /* @__PURE__ */ r("div", {
@@ -12561,7 +12579,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12561
12579
  min: "0",
12562
12580
  max: "59"
12563
12581
  }),
12564
- o && /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("span", { children: ":" }), /* @__PURE__ */ e("input", {
12582
+ o && /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("span", { children: ":" }), /* @__PURE__ */ e("input", {
12565
12583
  type: "number",
12566
12584
  className: "datepicker__time-input",
12567
12585
  value: b,
@@ -12597,15 +12615,15 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12597
12615
  }
12598
12616
  return o / a.length >= s;
12599
12617
  }, y0 = ({ allowCustomValue: t = !1, autofocus: c = !1, className: l = "", disabled: a = !1, error: s, highlighted: o = !1, id: i, label: n, maxVisibleSelectedLabels: d = 1, multilineChips: h = !1, multiple: m = !1, name: p, onChange: g, onSearchChange: w, options: v, placeholder: u = "Select an option", searchable: f = !0, searchValue: C, selectedCountDisplay: x = "inline", showChips: b = !1, sortSelectedFirst: M = !1, success: _, usePortal: N = !0, value: L, valueAsChip: y = !0 }) => {
12600
- const [H, S] = z(!1), [k, A] = z(C || ""), [D, P] = z(v), [O, o1] = z(-1), [V, X] = z([]), [a1, I] = z({
12618
+ const [H, S] = z(!1), [k, A] = z(C || ""), [D, P] = z(v), [O, s1] = z(-1), [V, X] = z([]), [i1, I] = z({
12601
12619
  top: 0,
12602
12620
  left: 0,
12603
12621
  width: 0
12604
- }), [$, p1] = z(!1), s1 = Y(null), W = Y([]), n1 = Y(null), v1 = Y(null), y1 = C0(), k1 = i ?? `dropdown-${y1}`, g1 = Y(null);
12622
+ }), [$, p1] = z(!1), h1 = Y(null), W = Y([]), o1 = Y(null), v1 = Y(null), y1 = C0(), k1 = i ?? `dropdown-${y1}`, g1 = Y(null);
12605
12623
  U(() => {
12606
12624
  if (H && M && m) {
12607
- const E = new Set(V.map((r1) => r1.value)), T = [], q = [];
12608
- v.forEach((r1) => (E.has(r1.value) ? T : q).push(r1)), g1.current = [...T, ...q];
12625
+ const E = new Set(V.map((c1) => c1.value)), T = [], q = [];
12626
+ v.forEach((c1) => (E.has(c1.value) ? T : q).push(c1)), g1.current = [...T, ...q];
12609
12627
  } else H || (g1.current = null);
12610
12628
  }, [
12611
12629
  H,
@@ -12619,7 +12637,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12619
12637
  const T = c2(k);
12620
12638
  P(E.filter((q) => c2(q.label).includes(T)));
12621
12639
  }
12622
- o1(-1);
12640
+ s1(-1);
12623
12641
  }, [
12624
12642
  k,
12625
12643
  v,
@@ -12647,7 +12665,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12647
12665
  if (m && Array.isArray(L))
12648
12666
  X(v.filter((q) => typeof q.value == "number" ? L.includes(q.value) : L.includes(q.value.toString()))), T && A("");
12649
12667
  else if (!m && (typeof L == "string" || typeof L == "number")) {
12650
- const q = v.find((r1) => typeof r1.value == "number" && typeof L == "number" ? r1.value === L : r1.value.toString() === L.toString());
12668
+ const q = v.find((c1) => typeof c1.value == "number" && typeof L == "number" ? c1.value === L : c1.value.toString() === L.toString());
12651
12669
  q ? (X([q]), T && A(q.label)) : t && typeof L == "string" && L.trim() ? (X([{
12652
12670
  label: L.trim(),
12653
12671
  value: L.trim(),
@@ -12668,10 +12686,10 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12668
12686
  ]), U(() => {
12669
12687
  f && C !== void 0 && A(C);
12670
12688
  }, [C, f]), U(() => {
12671
- if (!H || !s1.current) return;
12689
+ if (!H || !h1.current) return;
12672
12690
  const E = () => {
12673
- if (!s1.current) return;
12674
- const T = s1.current.getBoundingClientRect(), q = window.innerHeight, r1 = 300, K1 = q - T.bottom, j1 = T.top, b0 = K1 < r1 && j1 > K1;
12691
+ if (!h1.current) return;
12692
+ const T = h1.current.getBoundingClientRect(), q = window.innerHeight, c1 = 300, K1 = q - T.bottom, j1 = T.top, b0 = K1 < c1 && j1 > K1;
12675
12693
  p1(b0), N && I({
12676
12694
  top: b0 ? T.top + window.scrollY : T.bottom + window.scrollY,
12677
12695
  left: T.left + window.scrollX,
@@ -12683,13 +12701,13 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12683
12701
  };
12684
12702
  }, [H, N]), U(() => {
12685
12703
  const E = (T) => {
12686
- if (s1.current && !s1.current.contains(T.target)) {
12704
+ if (h1.current && !h1.current.contains(T.target)) {
12687
12705
  if (N && H) {
12688
12706
  const q = document.querySelector(".dropdown-menu--portal");
12689
12707
  if (q && q.contains(T.target)) return;
12690
12708
  }
12691
12709
  if (t && !m && k.trim() && !(V.length > 0 && V[0].label.toLowerCase() === k.trim().toLowerCase())) {
12692
- const q = v.find((r1) => r1.label.toLowerCase() === k.toLowerCase() || r1.value.toString() === k) || {
12710
+ const q = v.find((c1) => c1.label.toLowerCase() === k.toLowerCase() || c1.value.toString() === k) || {
12693
12711
  label: k.trim(),
12694
12712
  value: k.trim(),
12695
12713
  className: "custom-option"
@@ -12715,19 +12733,19 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12715
12733
  V,
12716
12734
  N
12717
12735
  ]);
12718
- const K = (E) => {
12736
+ const Q = (E) => {
12719
12737
  if (!E.disabled)
12720
12738
  if (m) {
12721
- const T = V.some((r1) => r1.value === E.value);
12739
+ const T = V.some((c1) => c1.value === E.value);
12722
12740
  let q;
12723
- T ? q = V.filter((r1) => r1.value !== E.value) : q = [...V, E], X(q), f && A(""), g && g(q, p);
12741
+ T ? q = V.filter((c1) => c1.value !== E.value) : q = [...V, E], X(q), f && A(""), g && g(q, p);
12724
12742
  } else
12725
12743
  A(E.label), X([E]), S(!1), g && g(E, p);
12726
- }, t1 = () => {
12744
+ }, r1 = () => {
12727
12745
  if (!t || !k.trim()) return;
12728
12746
  const E = v.find((q) => q.label.toLowerCase() === k.toLowerCase() || q.value.toString() === k);
12729
12747
  if (E) {
12730
- K(E);
12748
+ Q(E);
12731
12749
  return;
12732
12750
  }
12733
12751
  const T = {
@@ -12745,12 +12763,12 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12745
12763
  X(T), g && (m ? g(T, p) : (g(null, p), f || A("")));
12746
12764
  }, Z = () => {
12747
12765
  X([]), (!f || !m) && A(""), S(!1), g && g(m ? [] : null, p);
12748
- }, Q = (E) => {
12766
+ }, J = (E) => {
12749
12767
  A(E), H || S(!0), w?.(E);
12750
- }, i1 = () => {
12751
- a || (S(!0), !m && f && V.length > 0 && A(""), (m || f) && n1.current?.focus());
12768
+ }, n1 = () => {
12769
+ a || (S(!0), !m && f && V.length > 0 && A(""), (m || f) && o1.current?.focus());
12752
12770
  }, b1 = () => {
12753
- a || (S(!H), H || (o1(-1), !m && f && V.length > 0 && A(""), (m || f) && n1.current?.focus()));
12771
+ a || (S(!H), H || (s1(-1), !m && f && V.length > 0 && A(""), (m || f) && o1.current?.focus()));
12754
12772
  }, f1 = (E) => {
12755
12773
  if (!a) {
12756
12774
  if (!H) {
@@ -12760,20 +12778,20 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12760
12778
  switch (E.key) {
12761
12779
  case "ArrowDown":
12762
12780
  if (E.preventDefault(), t && k && D.length === 0) return;
12763
- o1((T) => {
12764
- const q = T < (t && k && !D.some((r1) => r1.label.toLowerCase() === k.toLowerCase()) ? D.length : D.length - 1) ? T + 1 : 0;
12781
+ s1((T) => {
12782
+ const q = T < (t && k && !D.some((c1) => c1.label.toLowerCase() === k.toLowerCase()) ? D.length : D.length - 1) ? T + 1 : 0;
12765
12783
  return q < D.length && W.current[q] && W.current[q]?.scrollIntoView({ block: "nearest" }), q;
12766
12784
  });
12767
12785
  break;
12768
12786
  case "ArrowUp":
12769
12787
  if (E.preventDefault(), t && k && D.length === 0) return;
12770
- o1((T) => {
12771
- const q = t && k && !D.some((K1) => K1.label.toLowerCase() === k.toLowerCase()) ? D.length : D.length - 1, r1 = T > 0 ? T - 1 : q;
12772
- return r1 < D.length && W.current[r1] && W.current[r1]?.scrollIntoView({ block: "nearest" }), r1;
12788
+ s1((T) => {
12789
+ const q = t && k && !D.some((K1) => K1.label.toLowerCase() === k.toLowerCase()) ? D.length : D.length - 1, c1 = T > 0 ? T - 1 : q;
12790
+ return c1 < D.length && W.current[c1] && W.current[c1]?.scrollIntoView({ block: "nearest" }), c1;
12773
12791
  });
12774
12792
  break;
12775
12793
  case "Enter":
12776
- E.preventDefault(), O >= 0 && O < D.length ? K(D[O]) : (t && k && O === D.length || t && k && D.length === 0) && t1();
12794
+ E.preventDefault(), O >= 0 && O < D.length ? Q(D[O]) : (t && k && O === D.length || t && k && D.length === 0) && r1();
12777
12795
  break;
12778
12796
  case "Escape":
12779
12797
  E.preventDefault(), S(!1), !m && V.length > 0 ? A(V[0].label) : m && f && A("");
@@ -12788,8 +12806,8 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12788
12806
  }, B1 = (E) => V.some((T) => T.value === E.value), D1 = () => {
12789
12807
  if (V.length === 0) return "";
12790
12808
  const E = Math.max(1, d);
12791
- if (V.length <= E) return V.map((r1) => r1.label).join(", ");
12792
- const T = V.slice(0, E).map((r1) => r1.label).join(", "), q = V.length - E;
12809
+ if (V.length <= E) return V.map((c1) => c1.label).join(", ");
12810
+ const T = V.slice(0, E).map((c1) => c1.label).join(", "), q = V.length - E;
12793
12811
  return `${T} (+${q} ${q === 1 ? "other" : "others"})`;
12794
12812
  }, Y1 = () => m && b || f && H ? k : V.length > 0 ? m ? D1() : V[0].label : "", _1 = () => m && b ? V.length > 0 ? "" : u : H && f ? u : V.length > 0 ? "" : u, L1 = () => !m || V.length === 0 || x === "none" ? null : x === "floating" ? /* @__PURE__ */ r("div", {
12795
12813
  className: "dropdown-selected-count",
@@ -12801,21 +12819,21 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12801
12819
  className: `dropdown-menu ${N ? "dropdown-menu--portal" : ""} ${$ ? "dropdown-menu--upward" : ""}`,
12802
12820
  style: N ? {
12803
12821
  position: "absolute",
12804
- top: $ ? "auto" : `${a1.top}px`,
12805
- bottom: $ ? `${window.innerHeight - a1.top}px` : "auto",
12806
- left: `${a1.left}px`,
12807
- width: `${a1.width}px`,
12822
+ top: $ ? "auto" : `${i1.top}px`,
12823
+ bottom: $ ? `${window.innerHeight - i1.top}px` : "auto",
12824
+ left: `${i1.left}px`,
12825
+ width: `${i1.width}px`,
12808
12826
  zIndex: 9999
12809
12827
  } : void 0,
12810
12828
  children: D.length > 0 || T1() ? /* @__PURE__ */ r("ul", {
12811
12829
  className: "dropdown-options-list",
12812
12830
  children: [D.map((T, q) => /* @__PURE__ */ r("li", {
12813
- ref: (r1) => {
12814
- W.current[q] = r1;
12831
+ ref: (c1) => {
12832
+ W.current[q] = c1;
12815
12833
  },
12816
12834
  className: `dropdown-option ${T.className || ""} ${O === q ? "focused" : ""} ${B1(T) ? "selected" : ""} ${T.disabled ? "dropdown-option--disabled" : ""}`,
12817
- onClick: () => K(T),
12818
- onMouseEnter: () => o1(q),
12835
+ onClick: () => Q(T),
12836
+ onMouseEnter: () => s1(q),
12819
12837
  title: T.tooltip,
12820
12838
  children: [m && /* @__PURE__ */ e("div", {
12821
12839
  className: "dropdown-option-checkbox",
@@ -12858,8 +12876,8 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12858
12876
  W.current[D.length] = T;
12859
12877
  },
12860
12878
  className: `dropdown-option dropdown-option--create ${O === D.length ? "focused" : ""}`,
12861
- onClick: t1,
12862
- onMouseEnter: () => o1(D.length),
12879
+ onClick: r1,
12880
+ onMouseEnter: () => s1(D.length),
12863
12881
  children: /* @__PURE__ */ e("div", {
12864
12882
  className: "dropdown-option-content",
12865
12883
  children: /* @__PURE__ */ r("span", {
@@ -12881,7 +12899,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12881
12899
  }, C1 = !m && V.length === 1 ? V[0] : null, I1 = y && !H && !m && V.length > 0, X1 = !!(C1?.icon && !k && !I1), r0 = !!(C1?.suffixIcon && !I1), Z1 = m && b;
12882
12900
  return /* @__PURE__ */ r("div", {
12883
12901
  className: `dropdown-container ${s ? "dropdown-error" : ""} ${_ ? "dropdown-success" : ""} ${o ? "dropdown-highlighted" : ""} ${m ? "multiple" : ""} ${a ? "disabled" : ""} ${m ? `count-display-${x}` : ""} ${l}`,
12884
- ref: s1,
12902
+ ref: h1,
12885
12903
  children: [
12886
12904
  n && /* @__PURE__ */ e("label", {
12887
12905
  htmlFor: k1,
@@ -12897,7 +12915,7 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12897
12915
  }),
12898
12916
  I1 && C1 && /* @__PURE__ */ r("span", {
12899
12917
  className: "dropdown-value-chip",
12900
- onClick: i1,
12918
+ onClick: n1,
12901
12919
  children: [C1.icon && /* @__PURE__ */ e(G, { name: C1.icon }), /* @__PURE__ */ e("span", {
12902
12920
  className: "dropdown-value-chip__label",
12903
12921
  children: C1.label
@@ -12920,13 +12938,13 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
12920
12938
  })]
12921
12939
  }, `dd-chip-${E.value}`)),
12922
12940
  /* @__PURE__ */ e(A1, {
12923
- ref: n1,
12941
+ ref: o1,
12924
12942
  id: k1,
12925
12943
  placeholder: I1 ? "" : _1(),
12926
12944
  value: I1 ? "" : Y1(),
12927
- onChange: f || m ? Q : () => {
12945
+ onChange: f || m ? J : () => {
12928
12946
  },
12929
- onClick: i1,
12947
+ onClick: n1,
12930
12948
  onKeyDown: f1,
12931
12949
  autoComplete: "off",
12932
12950
  autoFocus: c,
@@ -13006,14 +13024,16 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
13006
13024
  onKeyUp: v,
13007
13025
  readOnly: u,
13008
13026
  required: f
13009
- }), _ && /* @__PURE__ */ e("button", {
13010
- type: "button",
13011
- className: "input-date-clear",
13012
- onClick: () => p?.(void 0),
13027
+ }), _ && /* @__PURE__ */ e(K, {
13013
13028
  title: "Clear date",
13014
- children: /* @__PURE__ */ e(G, {
13015
- name: "clear",
13016
- size: "sm"
13029
+ children: /* @__PURE__ */ e("button", {
13030
+ type: "button",
13031
+ className: "input-date-clear",
13032
+ onClick: () => p?.(void 0),
13033
+ children: /* @__PURE__ */ e(G, {
13034
+ name: "clear",
13035
+ size: "sm"
13036
+ })
13017
13037
  })
13018
13038
  })]
13019
13039
  }),
@@ -13223,14 +13243,16 @@ var El = ({ name: t, size: c = "medium", shape: l = "rounded", className: a = ""
13223
13243
  value: w,
13224
13244
  ref: u
13225
13245
  }),
13226
- C && /* @__PURE__ */ e("button", {
13227
- type: "button",
13228
- className: "input-search__clear",
13229
- onClick: f,
13246
+ C && /* @__PURE__ */ e(K, {
13230
13247
  title: "Clear search",
13231
- children: /* @__PURE__ */ e(G, {
13232
- name: "clear",
13233
- size: "sm"
13248
+ children: /* @__PURE__ */ e("button", {
13249
+ type: "button",
13250
+ className: "input-search__clear",
13251
+ onClick: f,
13252
+ children: /* @__PURE__ */ e(G, {
13253
+ name: "clear",
13254
+ size: "sm"
13255
+ })
13234
13256
  })
13235
13257
  })
13236
13258
  ]
@@ -13666,7 +13688,7 @@ var Gr = [{
13666
13688
  }, o.value))
13667
13689
  })
13668
13690
  }),
13669
- a && a.options.length > 0 && /* @__PURE__ */ r(c1, { children: [l && /* @__PURE__ */ e(a0, { spacing: 0 }), /* @__PURE__ */ r("div", {
13691
+ a && a.options.length > 0 && /* @__PURE__ */ r(l1, { children: [l && /* @__PURE__ */ e(a0, { spacing: 0 }), /* @__PURE__ */ r("div", {
13670
13692
  className: "control-panel__option control-panel__option--group-by",
13671
13693
  children: [/* @__PURE__ */ e("span", {
13672
13694
  className: "control-panel__filter-title",
@@ -13683,7 +13705,7 @@ var Gr = [{
13683
13705
  })
13684
13706
  })]
13685
13707
  })] }),
13686
- s && /* @__PURE__ */ r(c1, { children: [(l || a && a.options.length > 0) && /* @__PURE__ */ e(a0, { spacing: 0 }), /* @__PURE__ */ r("div", {
13708
+ s && /* @__PURE__ */ r(l1, { children: [(l || a && a.options.length > 0) && /* @__PURE__ */ e(a0, { spacing: 0 }), /* @__PURE__ */ r("div", {
13687
13709
  className: "control-panel__option control-panel__option--chips",
13688
13710
  children: [/* @__PURE__ */ e("span", {
13689
13711
  className: "control-panel__filter-title",
@@ -13723,7 +13745,7 @@ var Gr = [{
13723
13745
  }),
13724
13746
  children: n.label
13725
13747
  }),
13726
- n.type === "radio" && /* @__PURE__ */ r(c1, { children: [n.label && /* @__PURE__ */ e("span", {
13748
+ n.type === "radio" && /* @__PURE__ */ r(l1, { children: [n.label && /* @__PURE__ */ e("span", {
13727
13749
  className: "control-panel__filter-title",
13728
13750
  children: n.label
13729
13751
  }), /* @__PURE__ */ e("div", {
@@ -13757,13 +13779,13 @@ var Gr = [{
13757
13779
  ]
13758
13780
  })
13759
13781
  });
13760
- return p.title ? /* @__PURE__ */ e(d1, {
13782
+ return p.title ? /* @__PURE__ */ e(K, {
13761
13783
  title: p.title,
13762
13784
  children: v
13763
13785
  }, p.value) : /* @__PURE__ */ e(E1.Fragment, { children: v }, p.value);
13764
13786
  })
13765
13787
  })] }),
13766
- n.type === "chips" && /* @__PURE__ */ r(c1, { children: [n.label && /* @__PURE__ */ e("span", {
13788
+ n.type === "chips" && /* @__PURE__ */ r(l1, { children: [n.label && /* @__PURE__ */ e("span", {
13767
13789
  className: "control-panel__filter-title",
13768
13790
  children: n.label
13769
13791
  }), /* @__PURE__ */ e("div", {
@@ -13805,7 +13827,7 @@ var Gr = [{
13805
13827
  "--control-panel-width": t,
13806
13828
  "--control-panel-shadow": d
13807
13829
  }, A = f.length === 0 ? [] : "type" in f[0] ? [{ options: f }] : f, D = !!(x || b || M || A.length > 0), P = g.length > 0 || w !== void 0 && w > 0;
13808
- return /* @__PURE__ */ r(c1, { children: [o && N && L && /* @__PURE__ */ e("div", {
13830
+ return /* @__PURE__ */ r(l1, { children: [o && N && L && /* @__PURE__ */ e("div", {
13809
13831
  className: S,
13810
13832
  onClick: y
13811
13833
  }), /* @__PURE__ */ r("aside", {
@@ -13843,7 +13865,7 @@ var Gr = [{
13843
13865
  })]
13844
13866
  }), g.map((O) => /* @__PURE__ */ e(Dr, {
13845
13867
  filter: O,
13846
- onChange: (o1) => v?.(o1)
13868
+ onChange: (s1) => v?.(s1)
13847
13869
  }, O.id))]
13848
13870
  }),
13849
13871
  P && D && /* @__PURE__ */ e(a0, { spacing: 0 }),
@@ -13876,7 +13898,7 @@ var Gr = [{
13876
13898
  variant: t.variant ?? "default",
13877
13899
  children: t.label
13878
13900
  });
13879
- return /* @__PURE__ */ r(c1, { children: [t.tooltip ? /* @__PURE__ */ e(d1, {
13901
+ return /* @__PURE__ */ r(l1, { children: [t.tooltip ? /* @__PURE__ */ e(K, {
13880
13902
  title: t.tooltip,
13881
13903
  position: "right",
13882
13904
  children: n
@@ -13940,7 +13962,7 @@ var Gr = [{
13940
13962
  children: o ? void 0 : t || b
13941
13963
  });
13942
13964
  }, Wr = ({ code: t, size: c = "md", className: l = "" }) => {
13943
- if (!t) return /* @__PURE__ */ e(d1, {
13965
+ if (!t) return /* @__PURE__ */ e(K, {
13944
13966
  title: `Unsupported country code: ${t}`,
13945
13967
  children: /* @__PURE__ */ e("div", {
13946
13968
  className: `flags flags--fallback flags--${c} ${l}`,
@@ -13953,7 +13975,7 @@ var Gr = [{
13953
13975
  children: [/* @__PURE__ */ e("source", {
13954
13976
  srcSet: s,
13955
13977
  type: "image/webp"
13956
- }), /* @__PURE__ */ e(d1, {
13978
+ }), /* @__PURE__ */ e(K, {
13957
13979
  title: `Country: ${t.toUpperCase()}`,
13958
13980
  children: /* @__PURE__ */ e("img", {
13959
13981
  src: a,
@@ -14197,15 +14219,17 @@ function ac({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
14197
14219
  secondary: h.secondary
14198
14220
  }) : /* @__PURE__ */ e(J1, { title: "No data available" });
14199
14221
  const S = (k, A) => {
14200
- const D = H.get(A), P = l(k, A), O = m && p.includes(P), o1 = N.has(P), V = n?.(k), X = `data-view__card ${i || V ? "data-view__card--clickable" : ""} ${O ? "data-view__card--selected" : ""} ${o1 ? "data-view__card--pinned" : ""} ${d?.(k) || ""}`, a1 = ($) => {
14222
+ const D = H.get(A), P = l(k, A), O = m && p.includes(P), s1 = N.has(P), V = n?.(k), X = `data-view__card ${i || V ? "data-view__card--clickable" : ""} ${O ? "data-view__card--selected" : ""} ${s1 ? "data-view__card--pinned" : ""} ${d?.(k) || ""}`, i1 = ($) => {
14201
14223
  $.metaKey || $.ctrlKey || $.shiftKey || $.altKey || $.button !== 0 || i && ($.preventDefault(), i(k, $));
14202
- }, I = /* @__PURE__ */ r(c1, { children: [
14203
- o1 && /* @__PURE__ */ e("span", {
14204
- className: "data-view__card-pin",
14224
+ }, I = /* @__PURE__ */ r(l1, { children: [
14225
+ s1 && /* @__PURE__ */ e(K, {
14205
14226
  title: "Pinned",
14206
- children: /* @__PURE__ */ e(G, {
14207
- name: "pin",
14208
- size: "sm"
14227
+ children: /* @__PURE__ */ e("span", {
14228
+ className: "data-view__card-pin",
14229
+ children: /* @__PURE__ */ e(G, {
14230
+ name: "pin",
14231
+ size: "sm"
14232
+ })
14209
14233
  })
14210
14234
  }),
14211
14235
  m && w && /* @__PURE__ */ e("div", {
@@ -14267,7 +14291,7 @@ function ac({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
14267
14291
  return /* @__PURE__ */ r(E1.Fragment, { children: [D && /* @__PURE__ */ e(cc, { marker: D }), V ? /* @__PURE__ */ e("a", {
14268
14292
  className: X,
14269
14293
  href: V,
14270
- onClick: a1,
14294
+ onClick: i1,
14271
14295
  children: I
14272
14296
  }) : /* @__PURE__ */ e("div", {
14273
14297
  className: X,
@@ -14306,7 +14330,7 @@ function ac({ data: t, columns: c, rowKey: l, card: a, actions: s, timeline: o,
14306
14330
  }), !P && /* @__PURE__ */ e("div", {
14307
14331
  className: L,
14308
14332
  style: y,
14309
- children: A.items.map((O, o1) => S(O, D + o1))
14333
+ children: A.items.map((O, s1) => S(O, D + s1))
14310
14334
  })]
14311
14335
  }, A.key ?? "__null__");
14312
14336
  })
@@ -14368,7 +14392,7 @@ var nc = ({ items: t, sortKey: c, sortDirection: l, onSort: a, align: s = "left"
14368
14392
  ].filter(Boolean).join(" "),
14369
14393
  children: [t.map((n, d) => {
14370
14394
  const h = n.direction ?? "asc", m = o ? c === n.value : c === n.value && l === h;
14371
- return /* @__PURE__ */ e(d1, {
14395
+ return /* @__PURE__ */ e(K, {
14372
14396
  title: `Sort by ${typeof n.label == "string" || typeof n.label == "number" ? String(n.label) : n.value}${o ? "" : ` ${h === "asc" ? "ascending" : "descending"}`}`,
14373
14397
  children: /* @__PURE__ */ e(F, {
14374
14398
  className: `mini-sort__button${m ? " is-active" : ""}`,
@@ -14385,7 +14409,7 @@ var nc = ({ items: t, sortKey: c, sortDirection: l, onSort: a, align: s = "left"
14385
14409
  children: n.label ?? n.value
14386
14410
  })
14387
14411
  }, `${n.value}-${d}`);
14388
- }), o && /* @__PURE__ */ e(d1, {
14412
+ }), o && /* @__PURE__ */ e(K, {
14389
14413
  title: `Direction: ${l === "asc" ? "ascending" : "descending"}`,
14390
14414
  children: /* @__PURE__ */ e(F, {
14391
14415
  className: "mini-sort__button mini-sort__direction",
@@ -14427,43 +14451,43 @@ function sc({ state: t }) {
14427
14451
  children: /* @__PURE__ */ e(G, { name: t === "asc" ? "arrow-up" : t === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
14428
14452
  });
14429
14453
  }
14430
- function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1, onSelectionChange: o, selectedIds: i, pageSizeOptions: n = i2, initialPageSize: d = i2[1], showPageSize: h = !0, card: m, actions: p, actionsWidth: g, timeline: w, onRowClick: v, rowHref: u, rowClassName: f, rowDetail: C, empty: x, initialSortKey: b = null, initialSortDirection: M = "asc", sortKey: _, sortDirection: N, onSortChange: L, miniSort: y, showCardSortControls: H = !0, desktopView: S = "table", cardMaxWidth: k, className: A, onPageChange: D, onPageSizeChange: P, currentPage: O, totalItems: o1, group: V, showResultsCount: X = !0, totalCount: a1, itemNoun: I, columnSelector: $ }) {
14431
- const { isMobile: p1 } = h0(), [s1, W] = z(b), [n1, v1] = z(M), [y1, k1] = z([]), g1 = i ?? y1, [$1, K] = z(1), t1 = O ?? $1, [B, Z] = z(d), [Q, i1] = z(() => t.reduce((R, J) => (J.width && (R[J.key] = J.width), R), {})), [b1, f1] = z(/* @__PURE__ */ new Set()), B1 = (R) => {
14432
- f1((J) => {
14433
- const h1 = new Set(J);
14434
- return h1.has(R) ? h1.delete(R) : h1.add(R), h1;
14454
+ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1, onSelectionChange: o, selectedIds: i, pageSizeOptions: n = i2, initialPageSize: d = i2[1], showPageSize: h = !0, card: m, actions: p, actionsWidth: g, timeline: w, onRowClick: v, rowHref: u, rowClassName: f, rowDetail: C, empty: x, initialSortKey: b = null, initialSortDirection: M = "asc", sortKey: _, sortDirection: N, onSortChange: L, miniSort: y, showCardSortControls: H = !0, desktopView: S = "table", cardMaxWidth: k, className: A, onPageChange: D, onPageSizeChange: P, currentPage: O, totalItems: s1, group: V, showResultsCount: X = !0, totalCount: i1, itemNoun: I, columnSelector: $ }) {
14455
+ const { isMobile: p1 } = h0(), [h1, W] = z(b), [o1, v1] = z(M), [y1, k1] = z([]), g1 = i ?? y1, [$1, Q] = z(1), r1 = O ?? $1, [B, Z] = z(d), [J, n1] = z(() => t.reduce((R, e1) => (e1.width && (R[e1.key] = e1.width), R), {})), [b1, f1] = z(/* @__PURE__ */ new Set()), B1 = (R) => {
14456
+ f1((e1) => {
14457
+ const d1 = new Set(e1);
14458
+ return d1.has(R) ? d1.delete(R) : d1.add(R), d1;
14435
14459
  });
14436
- }, D1 = (R, J) => l?.(R, J) ?? J, Y1 = (R) => {
14437
- O === void 0 && K(R), D?.(R);
14438
- }, _1 = _ !== void 0 ? _ : s1, L1 = N ?? n1, T1 = (R, J) => {
14439
- _ === void 0 && W(R), N === void 0 && v1(J), L?.({
14460
+ }, D1 = (R, e1) => l?.(R, e1) ?? e1, Y1 = (R) => {
14461
+ O === void 0 && Q(R), D?.(R);
14462
+ }, _1 = _ !== void 0 ? _ : h1, L1 = N ?? o1, T1 = (R, e1) => {
14463
+ _ === void 0 && W(R), N === void 0 && v1(e1), L?.({
14440
14464
  key: R,
14441
- direction: J
14465
+ direction: e1
14442
14466
  }), Y1(1);
14443
14467
  }, t0 = m1(() => new Set(a ?? []), [a]), C1 = m1(() => {
14444
14468
  let R = c;
14445
14469
  if (_1) {
14446
- const e1 = t.find((l1) => l1.key === _1);
14447
- if (e1) {
14448
- const l1 = e1.sortAccessor || e1.accessor || ((N1) => {
14449
- const z1 = N1[e1.key];
14470
+ const t1 = t.find((a1) => a1.key === _1);
14471
+ if (t1) {
14472
+ const a1 = t1.sortAccessor || t1.accessor || ((N1) => {
14473
+ const z1 = N1[t1.key];
14450
14474
  return typeof z1 == "string" || typeof z1 == "number" ? z1 : "";
14451
14475
  }), u1 = [...c].sort((N1, z1) => {
14452
- const R1 = l1(N1), x1 = l1(z1);
14476
+ const R1 = a1(N1), x1 = a1(z1);
14453
14477
  return typeof R1 == "number" && typeof x1 == "number" ? R1 - x1 : String(R1).localeCompare(String(x1));
14454
14478
  });
14455
14479
  R = L1 === "asc" ? u1 : u1.reverse();
14456
14480
  }
14457
14481
  }
14458
14482
  if (t0.size === 0) return R;
14459
- const J = [], h1 = [];
14460
- if (R.forEach((e1, l1) => {
14461
- t0.has(D1(e1, l1)) ? J.push(e1) : h1.push(e1);
14462
- }), a && a.length > 1 && J.length > 1) {
14463
- const e1 = new Map(a.map((l1, u1) => [l1, u1]));
14464
- J.sort((l1, u1) => (e1.get(D1(l1, 0)) ?? 0) - (e1.get(D1(u1, 0)) ?? 0));
14483
+ const e1 = [], d1 = [];
14484
+ if (R.forEach((t1, a1) => {
14485
+ t0.has(D1(t1, a1)) ? e1.push(t1) : d1.push(t1);
14486
+ }), a && a.length > 1 && e1.length > 1) {
14487
+ const t1 = new Map(a.map((a1, u1) => [a1, u1]));
14488
+ e1.sort((a1, u1) => (t1.get(D1(a1, 0)) ?? 0) - (t1.get(D1(u1, 0)) ?? 0));
14465
14489
  }
14466
- return [...J, ...h1];
14490
+ return [...e1, ...d1];
14467
14491
  }, [
14468
14492
  t,
14469
14493
  c,
@@ -14471,27 +14495,27 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14471
14495
  _1,
14472
14496
  t0,
14473
14497
  a
14474
- ]), I1 = o1 !== void 0, X1 = I1 ? o1 : C1.length, r0 = Math.max(1, Math.ceil(X1 / B)), Z1 = Math.min(t1, r0), E = I1 ? C1 : C1.slice((Z1 - 1) * B, Z1 * B), T = X ? Ur(B, X1, a1 ?? X1, Z1, I) : null, q = m1(() => {
14498
+ ]), I1 = s1 !== void 0, X1 = I1 ? s1 : C1.length, r0 = Math.max(1, Math.ceil(X1 / B)), Z1 = Math.min(r1, r0), E = I1 ? C1 : C1.slice((Z1 - 1) * B, Z1 * B), T = X ? Ur(B, X1, i1 ?? X1, Z1, I) : null, q = m1(() => {
14475
14499
  if (!V) return null;
14476
14500
  const R = /* @__PURE__ */ new Map();
14477
- return C1.forEach((J) => {
14478
- const h1 = V.groupBy(J);
14479
- R.set(h1, (R.get(h1) ?? 0) + 1);
14501
+ return C1.forEach((e1) => {
14502
+ const d1 = V.groupBy(e1);
14503
+ R.set(d1, (R.get(d1) ?? 0) + 1);
14480
14504
  }), R;
14481
- }, [V, C1]), r1 = m1(() => {
14505
+ }, [V, C1]), c1 = m1(() => {
14482
14506
  if (!V || !q) return null;
14483
- const R = /* @__PURE__ */ new Map(), J = [];
14484
- E.forEach((e1) => {
14485
- const l1 = V.groupBy(e1), u1 = R.get(l1);
14486
- u1 ? u1.push(e1) : (R.set(l1, [e1]), J.push(l1));
14507
+ const R = /* @__PURE__ */ new Map(), e1 = [];
14508
+ E.forEach((t1) => {
14509
+ const a1 = V.groupBy(t1), u1 = R.get(a1);
14510
+ u1 ? u1.push(t1) : (R.set(a1, [t1]), e1.push(a1));
14487
14511
  });
14488
- const h1 = J.map((e1) => ({
14489
- key: e1,
14490
- label: V.groupLabel(e1),
14491
- items: R.get(e1),
14492
- totalCount: q.get(e1) ?? 0
14512
+ const d1 = e1.map((t1) => ({
14513
+ key: t1,
14514
+ label: V.groupLabel(t1),
14515
+ items: R.get(t1),
14516
+ totalCount: q.get(t1) ?? 0
14493
14517
  }));
14494
- return V.sortGroups ? h1.sort(V.sortGroups) : h1.sort((e1, l1) => e1.key === null ? 1 : l1.key === null ? -1 : 0), h1;
14518
+ return V.sortGroups ? d1.sort(V.sortGroups) : d1.sort((t1, a1) => t1.key === null ? 1 : a1.key === null ? -1 : 0), d1;
14495
14519
  }, [
14496
14520
  V,
14497
14521
  q,
@@ -14500,21 +14524,21 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14500
14524
  id: w.idAccessor(R),
14501
14525
  date: w.dateAccessor(R)
14502
14526
  })), w.granularity) : /* @__PURE__ */ new Map(), [E, w]), j1 = (R) => {
14503
- i === void 0 && k1(R), o?.(c.filter((J, h1) => R.includes(D1(J, h1))));
14527
+ i === void 0 && k1(R), o?.(c.filter((e1, d1) => R.includes(D1(e1, d1))));
14504
14528
  }, b0 = (R) => {
14505
14529
  R.sortable && (_1 === R.key ? T1(R.key, L1 === "asc" ? "desc" : "asc") : T1(R.key, "asc"));
14506
- }, U2 = (R, J) => {
14530
+ }, U2 = (R, e1) => {
14507
14531
  R.preventDefault();
14508
- const h1 = R.clientX, e1 = Q[J] ?? 150, l1 = (N1) => {
14509
- const z1 = N1.clientX - h1, R1 = t.find((x1) => x1.key === J)?.minWidth ?? 120;
14510
- i1((x1) => ({
14532
+ const d1 = R.clientX, t1 = J[e1] ?? 150, a1 = (N1) => {
14533
+ const z1 = N1.clientX - d1, R1 = t.find((x1) => x1.key === e1)?.minWidth ?? 120;
14534
+ n1((x1) => ({
14511
14535
  ...x1,
14512
- [J]: Math.max(R1, e1 + z1)
14536
+ [e1]: Math.max(R1, t1 + z1)
14513
14537
  }));
14514
14538
  }, u1 = () => {
14515
- window.removeEventListener("mousemove", l1), window.removeEventListener("mouseup", u1);
14539
+ window.removeEventListener("mousemove", a1), window.removeEventListener("mouseup", u1);
14516
14540
  };
14517
- window.addEventListener("mousemove", l1), window.addEventListener("mouseup", u1);
14541
+ window.addEventListener("mousemove", a1), window.addEventListener("mouseup", u1);
14518
14542
  }, O0 = t.some((R) => R.filter), N0 = t.filter((R) => R.sortable), F2 = N0.map((R) => ({
14519
14543
  label: H2(R),
14520
14544
  value: R.key
@@ -14566,11 +14590,11 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14566
14590
  T1(null, L1);
14567
14591
  return;
14568
14592
  }
14569
- const J = String(R.value);
14570
- T1(J, _1 === J ? L1 : "asc");
14593
+ const e1 = String(R.value);
14594
+ T1(e1, _1 === e1 ? L1 : "asc");
14571
14595
  }
14572
14596
  })
14573
- }), /* @__PURE__ */ e(d1, {
14597
+ }), /* @__PURE__ */ e(K, {
14574
14598
  title: L1 === "asc" ? "Sort descending" : "Sort ascending",
14575
14599
  children: /* @__PURE__ */ e(F, {
14576
14600
  className: "data-view__card-sort-direction",
@@ -14606,13 +14630,13 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14606
14630
  pinnedIds: a,
14607
14631
  cardMaxWidth: k,
14608
14632
  isMobile: p1,
14609
- groups: r1 ?? void 0,
14633
+ groups: c1 ?? void 0,
14610
14634
  showGroupCount: V?.showCount !== !1,
14611
14635
  collapsible: V?.collapsible,
14612
14636
  collapsedGroups: b1,
14613
14637
  onToggleGroup: B1,
14614
- onToggleSelect: (R, J) => {
14615
- j1(J ? [...g1, R] : g1.filter((h1) => h1 !== R));
14638
+ onToggleSelect: (R, e1) => {
14639
+ j1(e1 ? [...g1, R] : g1.filter((d1) => d1 !== R));
14616
14640
  }
14617
14641
  }),
14618
14642
  /* @__PURE__ */ e(a2, {
@@ -14628,7 +14652,7 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14628
14652
  })
14629
14653
  ]
14630
14654
  });
14631
- const d0 = t.filter((R) => !R.hideInTable), Y2 = s && g1.length > 0 && g1.length === c.length, X2 = s && g1.length > 0 && g1.length < c.length, c0 = w && K1.size > 0, K0 = /* @__PURE__ */ r(c1, { children: [
14655
+ const d0 = t.filter((R) => !R.hideInTable), Y2 = s && g1.length > 0 && g1.length === c.length, X2 = s && g1.length > 0 && g1.length < c.length, c0 = w && K1.size > 0, K0 = /* @__PURE__ */ r(l1, { children: [
14632
14656
  S0,
14633
14657
  /* @__PURE__ */ e("div", {
14634
14658
  className: "data-view__wrapper",
@@ -14645,9 +14669,9 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14645
14669
  })
14646
14670
  }),
14647
14671
  d0.map((R) => {
14648
- const J = {};
14649
- return Q[R.key] && (J.width = Q[R.key]), R.minWidth && (J.minWidth = R.minWidth), /* @__PURE__ */ r("th", {
14650
- style: Object.keys(J).length > 0 ? J : void 0,
14672
+ const e1 = {};
14673
+ return J[R.key] && (e1.width = J[R.key]), R.minWidth && (e1.minWidth = R.minWidth), /* @__PURE__ */ r("th", {
14674
+ style: Object.keys(e1).length > 0 ? e1 : void 0,
14651
14675
  className: R.sortable ? "is-sortable" : "",
14652
14676
  onClick: () => b0(R),
14653
14677
  children: [/* @__PURE__ */ r("span", {
@@ -14655,8 +14679,8 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14655
14679
  children: [S2(R), R.sortable && /* @__PURE__ */ e(sc, { state: _1 === R.key ? L1 : "unsorted" })]
14656
14680
  }), /* @__PURE__ */ e("span", {
14657
14681
  className: "data-view__resizer",
14658
- onMouseDown: (h1) => U2(h1, R.key),
14659
- onClick: (h1) => h1.stopPropagation()
14682
+ onMouseDown: (d1) => U2(d1, R.key),
14683
+ onClick: (d1) => d1.stopPropagation()
14660
14684
  })]
14661
14685
  }, R.key);
14662
14686
  }),
@@ -14672,7 +14696,7 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14672
14696
  s && /* @__PURE__ */ e("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" }),
14673
14697
  d0.map((R) => /* @__PURE__ */ e("td", {
14674
14698
  className: "data-view__filter-cell",
14675
- style: Q[R.key] ? { width: Q[R.key] } : void 0,
14699
+ style: J[R.key] ? { width: J[R.key] } : void 0,
14676
14700
  children: R.filter ?? null
14677
14701
  }, R.key)),
14678
14702
  p && /* @__PURE__ */ e("td", { className: "data-view__filter-cell data-view__filter-cell--spacer" })
@@ -14689,18 +14713,18 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14689
14713
  secondary: x.secondary
14690
14714
  }) : /* @__PURE__ */ e(J1, { title: "No data available" })
14691
14715
  }) });
14692
- const R = d0.length + (c0 ? 1 : 0) + (s ? 1 : 0) + (p ? 1 : 0), J = V?.showCount !== !1, h1 = (e1, l1) => {
14693
- const u1 = D1(e1, l1), N1 = g1.includes(u1), z1 = t0.has(u1), R1 = K1.get(l1), x1 = u?.(e1), Q0 = !!v || !!x1, K2 = (w1) => {
14716
+ const R = d0.length + (c0 ? 1 : 0) + (s ? 1 : 0) + (p ? 1 : 0), e1 = V?.showCount !== !1, d1 = (t1, a1) => {
14717
+ const u1 = D1(t1, a1), N1 = g1.includes(u1), z1 = t0.has(u1), R1 = K1.get(a1), x1 = u?.(t1), Q0 = !!v || !!x1, K2 = (w1) => {
14694
14718
  if (x1 && (w1.metaKey || w1.ctrlKey || w1.shiftKey)) {
14695
14719
  window.open(x1, "_blank", "noopener,noreferrer");
14696
14720
  return;
14697
14721
  }
14698
- v?.(e1, w1);
14722
+ v?.(t1, w1);
14699
14723
  }, Q2 = (w1) => {
14700
14724
  w1.button !== 1 || !x1 || (w1.preventDefault(), window.open(x1, "_blank", "noopener,noreferrer"));
14701
- }, B0 = C?.(e1);
14725
+ }, B0 = C?.(t1);
14702
14726
  return /* @__PURE__ */ r(E1.Fragment, { children: [/* @__PURE__ */ r("tr", {
14703
- className: `${N1 ? "is-selected" : ""} ${Q0 ? "data-view__row--clickable" : ""} ${z1 ? "data-view__row--pinned" : ""} ${f?.(e1) || ""}`,
14727
+ className: `${N1 ? "is-selected" : ""} ${Q0 ? "data-view__row--clickable" : ""} ${z1 ? "data-view__row--pinned" : ""} ${f?.(t1) || ""}`,
14704
14728
  onClick: Q0 ? K2 : void 0,
14705
14729
  onAuxClick: x1 ? Q2 : void 0,
14706
14730
  children: [
@@ -14718,15 +14742,15 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14718
14742
  })
14719
14743
  }),
14720
14744
  d0.map((w1, R0) => /* @__PURE__ */ r("td", {
14721
- style: Q[w1.key] ? { width: Q[w1.key] } : void 0,
14722
- children: [R0 === 0 && z1 && /* @__PURE__ */ e(d1, {
14745
+ style: J[w1.key] ? { width: J[w1.key] } : void 0,
14746
+ children: [R0 === 0 && z1 && /* @__PURE__ */ e(K, {
14723
14747
  title: "Pinned",
14724
14748
  children: /* @__PURE__ */ e(G, {
14725
14749
  className: "data-view__pin-indicator",
14726
14750
  name: "pin",
14727
14751
  size: "sm"
14728
14752
  })
14729
- }), B2(w1, e1)]
14753
+ }), B2(w1, t1)]
14730
14754
  }, w1.key)),
14731
14755
  p && /* @__PURE__ */ e("td", {
14732
14756
  className: "data-view__actions-cell",
@@ -14734,7 +14758,7 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14734
14758
  children: /* @__PURE__ */ e("div", {
14735
14759
  className: "data-view__table-actions",
14736
14760
  onClick: (w1) => w1.stopPropagation(),
14737
- children: p(e1)
14761
+ children: p(t1)
14738
14762
  })
14739
14763
  })
14740
14764
  ]
@@ -14747,26 +14771,26 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14747
14771
  })
14748
14772
  })] }, u1);
14749
14773
  };
14750
- if (r1) {
14751
- let e1 = 0;
14752
- return r1.map((l1) => {
14753
- const u1 = e1;
14754
- e1 += l1.items.length;
14755
- const N1 = V?.collapsible && b1.has(l1.key);
14774
+ if (c1) {
14775
+ let t1 = 0;
14776
+ return c1.map((a1) => {
14777
+ const u1 = t1;
14778
+ t1 += a1.items.length;
14779
+ const N1 = V?.collapsible && b1.has(a1.key);
14756
14780
  return /* @__PURE__ */ r(E1.Fragment, { children: [/* @__PURE__ */ e("tr", {
14757
14781
  className: `data-view__group-row${V?.collapsible ? " data-view__group-row--collapsible" : ""}`,
14758
- onClick: V?.collapsible ? () => B1(l1.key) : void 0,
14782
+ onClick: V?.collapsible ? () => B1(a1.key) : void 0,
14759
14783
  children: /* @__PURE__ */ r("td", {
14760
14784
  colSpan: R,
14761
14785
  className: "data-view__group-cell",
14762
14786
  children: [
14763
14787
  /* @__PURE__ */ e("span", {
14764
14788
  className: "data-view__group-label",
14765
- children: l1.label
14789
+ children: a1.label
14766
14790
  }),
14767
- J && /* @__PURE__ */ e("span", {
14791
+ e1 && /* @__PURE__ */ e("span", {
14768
14792
  className: "data-view__group-count",
14769
- children: l1.totalCount
14793
+ children: a1.totalCount
14770
14794
  }),
14771
14795
  V?.collapsible && /* @__PURE__ */ e(G, {
14772
14796
  className: "data-view__group-chevron",
@@ -14775,10 +14799,10 @@ function Ca({ columns: t, data: c, rowKey: l, pinnedIds: a, selectable: s = !1,
14775
14799
  })
14776
14800
  ]
14777
14801
  })
14778
- }), !N1 && l1.items.map((z1, R1) => h1(z1, u1 + R1))] }, l1.key ?? "__null__");
14802
+ }), !N1 && a1.items.map((z1, R1) => d1(z1, u1 + R1))] }, a1.key ?? "__null__");
14779
14803
  });
14780
14804
  }
14781
- return E.map((e1, l1) => h1(e1, l1));
14805
+ return E.map((t1, a1) => d1(t1, a1));
14782
14806
  })() })] })
14783
14807
  }),
14784
14808
  /* @__PURE__ */ e(a2, {
@@ -14822,7 +14846,7 @@ var Q1 = (t) => {
14822
14846
  }), w(null), !o && i && u(!1));
14823
14847
  }, P = (W) => {
14824
14848
  w(W);
14825
- }, O = (W) => /^\d{4}-\d{2}-\d{2}$/.test(W) && Q1(W) !== void 0, o1 = () => {
14849
+ }, O = (W) => /^\d{4}-\d{2}-\d{2}$/.test(W) && Q1(W) !== void 0, s1 = () => {
14826
14850
  O(x) ? A({
14827
14851
  ...y,
14828
14852
  start: x
@@ -14833,10 +14857,10 @@ var Q1 = (t) => {
14833
14857
  end: M
14834
14858
  }) : _(y.end ?? "");
14835
14859
  }, X = (W) => {
14836
- const n1 = /* @__PURE__ */ new Date(), v1 = /* @__PURE__ */ new Date();
14860
+ const o1 = /* @__PURE__ */ new Date(), v1 = /* @__PURE__ */ new Date();
14837
14861
  v1.setDate(v1.getDate() - W), A({
14838
14862
  start: x0(v1),
14839
- end: x0(n1)
14863
+ end: x0(o1)
14840
14864
  });
14841
14865
  };
14842
14866
  U(() => {
@@ -14844,12 +14868,12 @@ var Q1 = (t) => {
14844
14868
  }, [y.start]), U(() => {
14845
14869
  _(y.end ?? "");
14846
14870
  }, [y.end]);
14847
- const a1 = m1(() => u0(m, 1), [m]), I = o || v, $ = !o && v, p1 = j(() => {
14871
+ const i1 = m1(() => u0(m, 1), [m]), I = o || v, $ = !o && v, p1 = j(() => {
14848
14872
  if (!$ || !N.current || !L.current) return;
14849
- const W = N.current.getBoundingClientRect(), n1 = L.current.getBoundingClientRect(), v1 = 16, y1 = 8, k1 = window.innerHeight - W.bottom - v1, g1 = W.top - v1, $1 = k1 < n1.height && g1 > n1.height ? W.top - n1.height - y1 : W.bottom + y1, K = Math.max(v1, Math.min($1, window.innerHeight - n1.height - v1)), t1 = W.left, B = Math.max(v1, Math.min(t1, window.innerWidth - n1.width - v1));
14873
+ const W = N.current.getBoundingClientRect(), o1 = L.current.getBoundingClientRect(), v1 = 16, y1 = 8, k1 = window.innerHeight - W.bottom - v1, g1 = W.top - v1, $1 = k1 < o1.height && g1 > o1.height ? W.top - o1.height - y1 : W.bottom + y1, Q = Math.max(v1, Math.min($1, window.innerHeight - o1.height - v1)), r1 = W.left, B = Math.max(v1, Math.min(r1, window.innerWidth - o1.width - v1));
14850
14874
  C({
14851
14875
  position: "fixed",
14852
- top: `${K}px`,
14876
+ top: `${Q}px`,
14853
14877
  left: `${B}px`,
14854
14878
  zIndex: 1e3
14855
14879
  });
@@ -14873,14 +14897,14 @@ var Q1 = (t) => {
14873
14897
  const W = (v1) => {
14874
14898
  const y1 = v1.target;
14875
14899
  N.current?.contains(y1) || L.current?.contains(y1) || u(!1);
14876
- }, n1 = (v1) => {
14900
+ }, o1 = (v1) => {
14877
14901
  v1.key === "Escape" && u(!1);
14878
14902
  };
14879
- return document.addEventListener("mousedown", W), document.addEventListener("keydown", n1), () => {
14880
- document.removeEventListener("mousedown", W), document.removeEventListener("keydown", n1);
14903
+ return document.addEventListener("mousedown", W), document.addEventListener("keydown", o1), () => {
14904
+ document.removeEventListener("mousedown", W), document.removeEventListener("keydown", o1);
14881
14905
  };
14882
14906
  }, [$]);
14883
- const s1 = /* @__PURE__ */ r("div", {
14907
+ const h1 = /* @__PURE__ */ r("div", {
14884
14908
  className: "date-range-picker__calendar",
14885
14909
  children: [/* @__PURE__ */ r("div", {
14886
14910
  className: "date-range-picker__nav",
@@ -14896,9 +14920,9 @@ var Q1 = (t) => {
14896
14920
  " ",
14897
14921
  m.getFullYear(),
14898
14922
  " -",
14899
- a1.toLocaleString("default", { month: "long" }),
14923
+ i1.toLocaleString("default", { month: "long" }),
14900
14924
  " ",
14901
- a1.getFullYear()
14925
+ i1.getFullYear()
14902
14926
  ] }),
14903
14927
  /* @__PURE__ */ e(F, {
14904
14928
  variant: "default",
@@ -14927,7 +14951,7 @@ var Q1 = (t) => {
14927
14951
  onChange: D,
14928
14952
  rangeStart: g,
14929
14953
  onRangeStartChange: P,
14930
- currentMonth: a1,
14954
+ currentMonth: i1,
14931
14955
  onMonthChange: p,
14932
14956
  showHeader: !1,
14933
14957
  showToday: !1,
@@ -14954,7 +14978,7 @@ var Q1 = (t) => {
14954
14978
  children: W.label
14955
14979
  }, W.days))
14956
14980
  })]
14957
- }) : /* @__PURE__ */ r(c1, { children: [t && /* @__PURE__ */ e("label", {
14981
+ }) : /* @__PURE__ */ r(l1, { children: [t && /* @__PURE__ */ e("label", {
14958
14982
  className: "date-range-picker__label",
14959
14983
  children: t
14960
14984
  }), n && n.length > 0 && /* @__PURE__ */ e("div", {
@@ -14974,7 +14998,7 @@ var Q1 = (t) => {
14974
14998
  placeholder: "YYYY-MM-DD",
14975
14999
  maxLength: 10,
14976
15000
  onChange: b,
14977
- onBlur: o1
15001
+ onBlur: s1
14978
15002
  }),
14979
15003
  /* @__PURE__ */ e("span", {
14980
15004
  className: "date-range-picker__separator",
@@ -14995,12 +15019,12 @@ var Q1 = (t) => {
14995
15019
  })
14996
15020
  ]
14997
15021
  }),
14998
- o && I && s1,
15022
+ o && I && h1,
14999
15023
  $ && q1(/* @__PURE__ */ e("div", {
15000
15024
  ref: L,
15001
15025
  className: "date-range-picker__overlay",
15002
15026
  style: f,
15003
- children: s1
15027
+ children: h1
15004
15028
  }), document.body)
15005
15029
  ]
15006
15030
  });
@@ -15078,7 +15102,7 @@ function dc(t, c) {
15078
15102
  const l = (a) => a.match(/\S+|\s+/g) ?? [];
15079
15103
  return R2(l(t), l(c));
15080
15104
  }
15081
- var mc = ({ a: t, b: c, side: l }) => /* @__PURE__ */ e(c1, { children: dc(t, c).map((a, s) => a.kind === "eq" ? /* @__PURE__ */ e("span", { children: a.val }, s) : a.kind === "del" && l === "old" ? /* @__PURE__ */ e("mark", {
15105
+ var mc = ({ a: t, b: c, side: l }) => /* @__PURE__ */ e(l1, { children: dc(t, c).map((a, s) => a.kind === "eq" ? /* @__PURE__ */ e("span", { children: a.val }, s) : a.kind === "del" && l === "old" ? /* @__PURE__ */ e("mark", {
15082
15106
  className: "dv-word dv-word--del",
15083
15107
  children: a.val
15084
15108
  }, s) : a.kind === "ins" && l === "new" ? /* @__PURE__ */ e("mark", {
@@ -15136,7 +15160,7 @@ function vc(t) {
15136
15160
  }
15137
15161
  return c;
15138
15162
  }
15139
- var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t]).map((c, l) => c.name === "plain" ? /* @__PURE__ */ e("span", { children: c.val }, l) : /* @__PURE__ */ e("span", {
15163
+ var gc = ({ text: t }) => /* @__PURE__ */ e(l1, { children: m1(() => vc(t), [t]).map((c, l) => c.name === "plain" ? /* @__PURE__ */ e("span", { children: c.val }, l) : /* @__PURE__ */ e("span", {
15140
15164
  className: `dv-token dv-token--${c.name}`,
15141
15165
  children: c.val
15142
15166
  }, l)) }), E0 = ({ line: t, side: c, type: l }) => {
@@ -15145,7 +15169,7 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
15145
15169
  a: t.oldText,
15146
15170
  b: t.newText,
15147
15171
  side: c
15148
- }) : l === "code" ? /* @__PURE__ */ e(gc, { text: a }) : /* @__PURE__ */ e(c1, { children: a });
15172
+ }) : l === "code" ? /* @__PURE__ */ e(gc, { text: a }) : /* @__PURE__ */ e(l1, { children: a });
15149
15173
  }, ba = ({ oldValue: t, newValue: c, mode: l = "split", type: a = "text", oldTitle: s = "Before", newTitle: o = "After", showLineNumbers: i = !0 }) => {
15150
15174
  const n = m1(() => hc(t, c), [t, c]), d = m1(() => ({
15151
15175
  added: n.filter((h) => h.kind === "added").length,
@@ -15155,7 +15179,7 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
15155
15179
  className: `dv dv--${l} dv--${a}`,
15156
15180
  children: [/* @__PURE__ */ r("div", {
15157
15181
  className: "dv__header",
15158
- children: [l === "split" ? /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("div", {
15182
+ children: [l === "split" ? /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("div", {
15159
15183
  className: "dv__header-side",
15160
15184
  children: s
15161
15185
  }), /* @__PURE__ */ e("div", {
@@ -15243,7 +15267,7 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
15243
15267
  children: n.map((h, m) => /* @__PURE__ */ r("div", {
15244
15268
  className: `dv__row dv__row--${h.kind}`,
15245
15269
  children: [
15246
- i && /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("span", {
15270
+ i && /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("span", {
15247
15271
  className: "dv__lineno",
15248
15272
  children: h.kind !== "added" ? h.oldLineNo : ""
15249
15273
  }), /* @__PURE__ */ e("span", {
@@ -15286,7 +15310,7 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
15286
15310
  "--drawer-shadow": n,
15287
15311
  zIndex: y + 1
15288
15312
  }, S = M || x || b;
15289
- return /* @__PURE__ */ r(c1, { children: [g && /* @__PURE__ */ e("div", {
15313
+ return /* @__PURE__ */ r(l1, { children: [g && /* @__PURE__ */ e("div", {
15290
15314
  className: "drawer-overlay",
15291
15315
  onClick: c,
15292
15316
  style: { zIndex: y }
@@ -15297,7 +15321,7 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
15297
15321
  /* @__PURE__ */ r("div", {
15298
15322
  className: "drawer__header",
15299
15323
  children: [
15300
- f && /* @__PURE__ */ e(d1, {
15324
+ f && /* @__PURE__ */ e(K, {
15301
15325
  title: C,
15302
15326
  position: "bottom",
15303
15327
  children: /* @__PURE__ */ e(F, {
@@ -15327,7 +15351,7 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
15327
15351
  variant: k.variant ?? "ghost",
15328
15352
  children: k.label
15329
15353
  }), D = k.title ?? k.label;
15330
- return D ? /* @__PURE__ */ e(d1, {
15354
+ return D ? /* @__PURE__ */ e(K, {
15331
15355
  title: D,
15332
15356
  position: "bottom",
15333
15357
  children: A
@@ -20554,7 +20578,7 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
20554
20578
  const [c, l] = z(!1);
20555
20579
  if (t.length === 1) return /* @__PURE__ */ e("div", {
20556
20580
  className: "float-button-container",
20557
- children: /* @__PURE__ */ e(d1, {
20581
+ children: /* @__PURE__ */ e(K, {
20558
20582
  title: t[0].label,
20559
20583
  position: "left",
20560
20584
  children: /* @__PURE__ */ e("button", {
@@ -20577,7 +20601,7 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
20577
20601
  };
20578
20602
  return /* @__PURE__ */ r("div", {
20579
20603
  className: "float-button-container",
20580
- children: [c && /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("div", {
20604
+ children: [c && /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("div", {
20581
20605
  className: "float-button-overlay",
20582
20606
  onClick: () => l(!1)
20583
20607
  }), /* @__PURE__ */ e("div", {
@@ -20593,15 +20617,17 @@ var gc = ({ text: t }) => /* @__PURE__ */ e(c1, { children: m1(() => vc(t), [t])
20593
20617
  children: o.label
20594
20618
  })]
20595
20619
  }, `float-button-${i}`))
20596
- })] }), /* @__PURE__ */ e("button", {
20597
- className: `float-button ${c ? "float-button--active" : ""}`,
20598
- onClick: a,
20620
+ })] }), /* @__PURE__ */ e(K, {
20599
20621
  title: "Actions menu",
20600
- children: /* @__PURE__ */ e("span", {
20601
- className: "float-button__icon",
20602
- children: /* @__PURE__ */ e(G, {
20603
- name: c ? "clear" : "plus",
20604
- size: "xxl"
20622
+ children: /* @__PURE__ */ e("button", {
20623
+ className: `float-button ${c ? "float-button--active" : ""}`,
20624
+ onClick: a,
20625
+ children: /* @__PURE__ */ e("span", {
20626
+ className: "float-button__icon",
20627
+ children: /* @__PURE__ */ e(G, {
20628
+ name: c ? "clear" : "plus",
20629
+ size: "xxl"
20630
+ })
20605
20631
  })
20606
20632
  })
20607
20633
  })]
@@ -20940,7 +20966,7 @@ var Sc = M1(({ mask: t, value: c, onChange: l, onComplete: a, placeholder: s, la
20940
20966
  },
20941
20967
  getRawValue: () => S
20942
20968
  }));
20943
- const { masked: D } = I0(S, N, w), P = D.includes(w) ? D.replace(new RegExp(w.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), w) : D, O = n ? "danger" : m, o1 = [
20969
+ const { masked: D } = I0(S, N, w), P = D.includes(w) ? D.replace(new RegExp(w.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), w) : D, O = n ? "danger" : m, s1 = [
20944
20970
  "input-mask",
20945
20971
  `input-mask--${h}`,
20946
20972
  `input-mask--${O}`,
@@ -20955,22 +20981,22 @@ var Sc = M1(({ mask: t, value: c, onChange: l, onComplete: a, placeholder: s, la
20955
20981
  if (p || g) return;
20956
20982
  if (I.key === "Backspace") {
20957
20983
  I.preventDefault();
20958
- const n1 = S.slice(0, -1), { masked: v1 } = I0(n1, N, w);
20959
- k(n1), l?.(n1, v1);
20984
+ const o1 = S.slice(0, -1), { masked: v1 } = I0(o1, N, w);
20985
+ k(o1), l?.(o1, v1);
20960
20986
  return;
20961
20987
  }
20962
20988
  if (I.key.length !== 1 || I.ctrlKey || I.metaKey || (I.preventDefault(), S.length >= L)) return;
20963
20989
  const $ = I.key;
20964
20990
  let p1 = 0;
20965
- for (const n1 of N) if (n1.type === "token") {
20991
+ for (const o1 of N) if (o1.type === "token") {
20966
20992
  if (p1 === S.length) {
20967
- if (!D2[n1.key].test($)) return;
20993
+ if (!D2[o1.key].test($)) return;
20968
20994
  break;
20969
20995
  }
20970
20996
  p1++;
20971
20997
  }
20972
- const { masked: s1, rawAccepted: W } = I0(S + $, N, w);
20973
- k(W), l?.(W, s1), W.length === L && a?.(W, s1);
20998
+ const { masked: h1, rawAccepted: W } = I0(S + $, N, w);
20999
+ k(W), l?.(W, h1), W.length === L && a?.(W, h1);
20974
21000
  }, [
20975
21001
  p,
20976
21002
  g,
@@ -20980,9 +21006,9 @@ var Sc = M1(({ mask: t, value: c, onChange: l, onComplete: a, placeholder: s, la
20980
21006
  L,
20981
21007
  l,
20982
21008
  a
20983
- ]), X = s ?? N.map((I) => I.type === "literal" ? I.char : w).join(""), a1 = S.length === L;
21009
+ ]), X = s ?? N.map((I) => I.type === "literal" ? I.char : w).join(""), i1 = S.length === L;
20984
21010
  return /* @__PURE__ */ r("div", {
20985
- className: o1,
21011
+ className: s1,
20986
21012
  children: [
20987
21013
  o && /* @__PURE__ */ e("label", {
20988
21014
  className: "input-mask__label",
@@ -21003,7 +21029,7 @@ var Sc = M1(({ mask: t, value: c, onChange: l, onComplete: a, placeholder: s, la
21003
21029
  type: "text",
21004
21030
  inputMode: "text",
21005
21031
  autoComplete: M,
21006
- className: ["input-mask__input", a1 ? "input-mask__input--filled" : ""].filter(Boolean).join(" "),
21032
+ className: ["input-mask__input", i1 ? "input-mask__input--filled" : ""].filter(Boolean).join(" "),
21007
21033
  value: P,
21008
21034
  placeholder: X,
21009
21035
  disabled: p,
@@ -21703,7 +21729,7 @@ var Sa = M1(({ autoComplete: t = "on", autoFocus: c, cols: l, disabled: a, error
21703
21729
  className: "NotificationPanel__badge",
21704
21730
  children: t.length
21705
21731
  })]
21706
- }), s && q1(/* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("div", {
21732
+ }), s && q1(/* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("div", {
21707
21733
  className: "NotificationPanel__backdrop",
21708
21734
  onClick: () => o(!1)
21709
21735
  }), /* @__PURE__ */ r("div", {
@@ -21794,7 +21820,7 @@ var Sa = M1(({ autoComplete: t = "on", autoFocus: c, cols: l, disabled: a, error
21794
21820
  height: n,
21795
21821
  viewBox: p,
21796
21822
  children: [
21797
- !w && /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("circle", {
21823
+ !w && /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("circle", {
21798
21824
  className: "pie-chart__empty-circle",
21799
21825
  cx: h,
21800
21826
  cy: h,
@@ -22646,7 +22672,7 @@ ${s.textContent ?? ""}
22646
22672
  /* @__PURE__ */ r("div", {
22647
22673
  className: "rte-table-toolbar-group",
22648
22674
  children: [
22649
- /* @__PURE__ */ e(d1, {
22675
+ /* @__PURE__ */ e(K, {
22650
22676
  title: "Add row above",
22651
22677
  children: /* @__PURE__ */ e("button", {
22652
22678
  type: "button",
@@ -22655,7 +22681,7 @@ ${s.textContent ?? ""}
22655
22681
  children: "↑ Row"
22656
22682
  })
22657
22683
  }),
22658
- /* @__PURE__ */ e(d1, {
22684
+ /* @__PURE__ */ e(K, {
22659
22685
  title: "Add row below",
22660
22686
  children: /* @__PURE__ */ e("button", {
22661
22687
  type: "button",
@@ -22664,7 +22690,7 @@ ${s.textContent ?? ""}
22664
22690
  children: "↓ Row"
22665
22691
  })
22666
22692
  }),
22667
- /* @__PURE__ */ e(d1, {
22693
+ /* @__PURE__ */ e(K, {
22668
22694
  title: "Remove last row",
22669
22695
  children: /* @__PURE__ */ e("button", {
22670
22696
  type: "button",
@@ -22679,7 +22705,7 @@ ${s.textContent ?? ""}
22679
22705
  /* @__PURE__ */ r("div", {
22680
22706
  className: "rte-table-toolbar-group",
22681
22707
  children: [
22682
- /* @__PURE__ */ e(d1, {
22708
+ /* @__PURE__ */ e(K, {
22683
22709
  title: "Add column left",
22684
22710
  children: /* @__PURE__ */ e("button", {
22685
22711
  type: "button",
@@ -22688,7 +22714,7 @@ ${s.textContent ?? ""}
22688
22714
  children: "← Col"
22689
22715
  })
22690
22716
  }),
22691
- /* @__PURE__ */ e(d1, {
22717
+ /* @__PURE__ */ e(K, {
22692
22718
  title: "Add column right",
22693
22719
  children: /* @__PURE__ */ e("button", {
22694
22720
  type: "button",
@@ -22697,7 +22723,7 @@ ${s.textContent ?? ""}
22697
22723
  children: "→ Col"
22698
22724
  })
22699
22725
  }),
22700
- /* @__PURE__ */ e(d1, {
22726
+ /* @__PURE__ */ e(K, {
22701
22727
  title: "Remove last column",
22702
22728
  children: /* @__PURE__ */ e("button", {
22703
22729
  type: "button",
@@ -22711,7 +22737,7 @@ ${s.textContent ?? ""}
22711
22737
  /* @__PURE__ */ e("div", { className: "rte-table-toolbar-divider" }),
22712
22738
  /* @__PURE__ */ e("div", {
22713
22739
  className: "rte-table-toolbar-group",
22714
- children: /* @__PURE__ */ e(d1, {
22740
+ children: /* @__PURE__ */ e(K, {
22715
22741
  title: "Delete table",
22716
22742
  children: /* @__PURE__ */ e("button", {
22717
22743
  type: "button",
@@ -22727,7 +22753,7 @@ ${s.textContent ?? ""}
22727
22753
  children: [
22728
22754
  /* @__PURE__ */ e("div", {
22729
22755
  className: "rte-toolbar-group",
22730
- children: Yc.map((h) => /* @__PURE__ */ e(d1, {
22756
+ children: Yc.map((h) => /* @__PURE__ */ e(K, {
22731
22757
  title: h.title,
22732
22758
  children: /* @__PURE__ */ e("button", {
22733
22759
  type: "button",
@@ -22742,7 +22768,7 @@ ${s.textContent ?? ""}
22742
22768
  /* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }),
22743
22769
  /* @__PURE__ */ r("div", {
22744
22770
  className: "rte-toolbar-group",
22745
- children: [Oc.map((h) => /* @__PURE__ */ e(d1, {
22771
+ children: [Oc.map((h) => /* @__PURE__ */ e(K, {
22746
22772
  title: h.title,
22747
22773
  children: /* @__PURE__ */ e("button", {
22748
22774
  type: "button",
@@ -22752,7 +22778,7 @@ ${s.textContent ?? ""}
22752
22778
  },
22753
22779
  children: h.label
22754
22780
  })
22755
- }, h.command)), /* @__PURE__ */ e(d1, {
22781
+ }, h.command)), /* @__PURE__ */ e(K, {
22756
22782
  title: "Task List",
22757
22783
  children: /* @__PURE__ */ r("button", {
22758
22784
  type: "button",
@@ -22767,7 +22793,7 @@ ${s.textContent ?? ""}
22767
22793
  /* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }),
22768
22794
  /* @__PURE__ */ e("div", {
22769
22795
  className: "rte-toolbar-group",
22770
- children: Xc.map((h) => /* @__PURE__ */ e(d1, {
22796
+ children: Xc.map((h) => /* @__PURE__ */ e(K, {
22771
22797
  title: `Heading ${h}`,
22772
22798
  children: /* @__PURE__ */ r("button", {
22773
22799
  type: "button",
@@ -22782,7 +22808,7 @@ ${s.textContent ?? ""}
22782
22808
  /* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }),
22783
22809
  /* @__PURE__ */ e("div", {
22784
22810
  className: "rte-toolbar-group",
22785
- children: /* @__PURE__ */ e(d1, {
22811
+ children: /* @__PURE__ */ e(K, {
22786
22812
  title: "Insert Link",
22787
22813
  children: /* @__PURE__ */ r("button", {
22788
22814
  type: "button",
@@ -22794,9 +22820,9 @@ ${s.textContent ?? ""}
22794
22820
  })
22795
22821
  })
22796
22822
  }),
22797
- t && /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }), /* @__PURE__ */ r("div", {
22823
+ t && /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("div", { className: "rte-toolbar-divider" }), /* @__PURE__ */ r("div", {
22798
22824
  className: "rte-toolbar-group",
22799
- children: [Kc.map((h) => /* @__PURE__ */ e(d1, {
22825
+ children: [Kc.map((h) => /* @__PURE__ */ e(K, {
22800
22826
  title: h.title,
22801
22827
  children: /* @__PURE__ */ e("button", {
22802
22828
  type: "button",
@@ -22806,7 +22832,7 @@ ${s.textContent ?? ""}
22806
22832
  },
22807
22833
  children: h.label
22808
22834
  })
22809
- }, h.command + (h.value ?? ""))), /* @__PURE__ */ e(d1, {
22835
+ }, h.command + (h.value ?? ""))), /* @__PURE__ */ e(K, {
22810
22836
  title: "Insert Table",
22811
22837
  children: /* @__PURE__ */ e("button", {
22812
22838
  type: "button",
@@ -22822,38 +22848,38 @@ ${s.textContent ?? ""}
22822
22848
  }), Ya = ({ advanced: t = !1, error: c, format: l = "html", id: a, label: s, onBlur: o, onChange: i, placeholder: n, required: d = !1, value: h }) => {
22823
22849
  const m = Y(null), p = Y(!1), g = Y(null), [w, v] = z(/* @__PURE__ */ new Set());
22824
22850
  U(() => {
22825
- const K = m.current;
22826
- if (!K || p.current) return;
22827
- const t1 = h ?? "";
22828
- K.innerHTML !== t1 && (K.innerHTML = t1);
22851
+ const Q = m.current;
22852
+ if (!Q || p.current) return;
22853
+ const r1 = h ?? "";
22854
+ Q.innerHTML !== r1 && (Q.innerHTML = r1);
22829
22855
  }, [h]);
22830
22856
  const u = j(() => {
22831
- const K = m.current;
22832
- if (!K || !i) return;
22857
+ const Q = m.current;
22858
+ if (!Q || !i) return;
22833
22859
  p.current = !0;
22834
- const t1 = K.innerHTML.replace(/&nbsp;/g, " ");
22835
- i(l === "markdown" ? qc(t1) : t1), setTimeout(() => {
22860
+ const r1 = Q.innerHTML.replace(/&nbsp;/g, " ");
22861
+ i(l === "markdown" ? qc(r1) : r1), setTimeout(() => {
22836
22862
  p.current = !1;
22837
22863
  }, 0);
22838
22864
  }, [l, i]), { snapshotForUndo: f, undo: C, redo: x } = el(m, p, u), { showLinkPrompt: b, linkUrl: M, setLinkUrl: _, linkText: N, setLinkText: L, editingAnchorRef: y, openLinkPrompt: H, confirmLink: S, cancelLink: k } = tl({
22839
22865
  editorRef: m,
22840
22866
  snapshotForUndo: f,
22841
22867
  emitChange: u
22842
- }), { activeTable: A, tableToolbarPos: D, showTableToolbar: P, hideTableToolbar: O, addRowAbove: o1, addRowBelow: V, removeRow: X, addColumnLeft: a1, addColumnRight: I, removeColumn: $, deleteTable: p1 } = rl({
22868
+ }), { activeTable: A, tableToolbarPos: D, showTableToolbar: P, hideTableToolbar: O, addRowAbove: s1, addRowBelow: V, removeRow: X, addColumnLeft: i1, addColumnRight: I, removeColumn: $, deleteTable: p1 } = rl({
22843
22869
  editorRef: m,
22844
22870
  snapshotForUndo: f,
22845
22871
  emitChange: u
22846
- }), s1 = j(() => {
22847
- const K = [
22872
+ }), h1 = j(() => {
22873
+ const Q = [
22848
22874
  "bold",
22849
22875
  "italic",
22850
22876
  "underline",
22851
22877
  "insertUnorderedList",
22852
22878
  "insertOrderedList"
22853
- ], t1 = /* @__PURE__ */ new Set();
22854
- K.forEach((Z) => {
22879
+ ], r1 = /* @__PURE__ */ new Set();
22880
+ Q.forEach((Z) => {
22855
22881
  try {
22856
- document.queryCommandState(Z) && t1.add(Z);
22882
+ document.queryCommandState(Z) && r1.add(Z);
22857
22883
  } catch {
22858
22884
  }
22859
22885
  });
@@ -22862,83 +22888,83 @@ ${s.textContent ?? ""}
22862
22888
  let Z = B.getRangeAt(0).commonAncestorContainer;
22863
22889
  for (; Z && Z !== m.current; ) {
22864
22890
  if (Z.nodeType === Node.ELEMENT_NODE) {
22865
- const Q = Z.tagName.toLowerCase();
22866
- if (/^h[1-6]$/.test(Q)) {
22867
- t1.add(Q);
22891
+ const J = Z.tagName.toLowerCase();
22892
+ if (/^h[1-6]$/.test(J)) {
22893
+ r1.add(J);
22868
22894
  break;
22869
22895
  }
22870
- Q === "pre" && t1.add("pre");
22896
+ J === "pre" && r1.add("pre");
22871
22897
  }
22872
22898
  Z = Z.parentNode;
22873
22899
  }
22874
22900
  }
22875
- v(t1);
22876
- }, []), W = j((K, t1) => {
22877
- m.current?.focus(), document.execCommand(K, !1, t1), s1(), u();
22878
- }, [u, s1]), n1 = j((K) => {
22879
- const t1 = `h${K}`;
22880
- W("formatBlock", w.has(t1) ? "p" : t1);
22901
+ v(r1);
22902
+ }, []), W = j((Q, r1) => {
22903
+ m.current?.focus(), document.execCommand(Q, !1, r1), h1(), u();
22904
+ }, [u, h1]), o1 = j((Q) => {
22905
+ const r1 = `h${Q}`;
22906
+ W("formatBlock", w.has(r1) ? "p" : r1);
22881
22907
  }, [w, W]), v1 = j(() => {
22882
22908
  f();
22883
- const K = m.current;
22884
- if (!K) return;
22885
- K.focus();
22886
- const t1 = window.getSelection();
22887
- if (!t1 || t1.rangeCount === 0) return;
22888
- const B = t1.getRangeAt(0), Z = document.createElement("li");
22909
+ const Q = m.current;
22910
+ if (!Q) return;
22911
+ Q.focus();
22912
+ const r1 = window.getSelection();
22913
+ if (!r1 || r1.rangeCount === 0) return;
22914
+ const B = r1.getRangeAt(0), Z = document.createElement("li");
22889
22915
  Z.setAttribute("data-task", "true");
22890
- const Q = document.createElement("input");
22891
- Q.type = "checkbox", Q.style.marginRight = "6px";
22892
- const i1 = document.createElement("span");
22893
- i1.textContent = "​", Z.appendChild(Q), Z.appendChild(i1);
22916
+ const J = document.createElement("input");
22917
+ J.type = "checkbox", J.style.marginRight = "6px";
22918
+ const n1 = document.createElement("span");
22919
+ n1.textContent = "​", Z.appendChild(J), Z.appendChild(n1);
22894
22920
  const b1 = document.createElement("ul");
22895
22921
  b1.className = "rte-task-list", b1.appendChild(Z), B.deleteContents(), B.insertNode(b1);
22896
22922
  const f1 = document.createRange();
22897
- f1.setStart(i1, 1), f1.collapse(!0), t1.removeAllRanges(), t1.addRange(f1), u();
22923
+ f1.setStart(n1, 1), f1.collapse(!0), r1.removeAllRanges(), r1.addRange(f1), u();
22898
22924
  }, [f, u]), y1 = j(() => {
22899
22925
  W("insertHTML", Qc);
22900
- }, [W]), k1 = j((K) => {
22901
- const t1 = K.target, B = t1.closest("a");
22926
+ }, [W]), k1 = j((Q) => {
22927
+ const r1 = Q.target, B = r1.closest("a");
22902
22928
  if (B) {
22903
- K.preventDefault(), H(B), s1();
22929
+ Q.preventDefault(), H(B), h1();
22904
22930
  return;
22905
22931
  }
22906
- const Z = t1.closest("table");
22907
- Z ? P(Z) : O(), s1();
22932
+ const Z = r1.closest("table");
22933
+ Z ? P(Z) : O(), h1();
22908
22934
  }, [
22909
22935
  H,
22910
- s1,
22936
+ h1,
22911
22937
  P,
22912
22938
  O
22913
- ]), g1 = j((K) => {
22914
- if ((K.ctrlKey || K.metaKey) && K.key === "z") {
22915
- K.preventDefault(), K.shiftKey ? x() : C();
22939
+ ]), g1 = j((Q) => {
22940
+ if ((Q.ctrlKey || Q.metaKey) && Q.key === "z") {
22941
+ Q.preventDefault(), Q.shiftKey ? x() : C();
22916
22942
  return;
22917
22943
  }
22918
- const t1 = K.key.length === 1 && !K.ctrlKey && !K.metaKey, B = [
22944
+ const r1 = Q.key.length === 1 && !Q.ctrlKey && !Q.metaKey, B = [
22919
22945
  "Enter",
22920
22946
  "Backspace",
22921
22947
  "Delete",
22922
22948
  " "
22923
- ].includes(K.key);
22924
- if ((t1 || B) && f(), K.key === "Enter" && !K.shiftKey) {
22949
+ ].includes(Q.key);
22950
+ if ((r1 || B) && f(), Q.key === "Enter" && !Q.shiftKey) {
22925
22951
  const Z = window.getSelection();
22926
22952
  if (Z && Z.rangeCount > 0) {
22927
- let Q = Z.getRangeAt(0).commonAncestorContainer;
22928
- for (; Q && Q !== m.current; ) {
22929
- if (Q.classList?.contains("rte-task-list")) {
22930
- K.preventDefault();
22931
- const i1 = document.createElement("li");
22932
- i1.setAttribute("data-task", "true");
22953
+ let J = Z.getRangeAt(0).commonAncestorContainer;
22954
+ for (; J && J !== m.current; ) {
22955
+ if (J.classList?.contains("rte-task-list")) {
22956
+ Q.preventDefault();
22957
+ const n1 = document.createElement("li");
22958
+ n1.setAttribute("data-task", "true");
22933
22959
  const b1 = document.createElement("input");
22934
22960
  b1.type = "checkbox", b1.style.marginRight = "6px";
22935
22961
  const f1 = document.createElement("span");
22936
- f1.textContent = "​", i1.appendChild(b1), i1.appendChild(f1), Q.appendChild(i1);
22962
+ f1.textContent = "​", n1.appendChild(b1), n1.appendChild(f1), J.appendChild(n1);
22937
22963
  const B1 = document.createRange();
22938
22964
  B1.setStart(f1, 1), B1.collapse(!0), Z.removeAllRanges(), Z.addRange(B1);
22939
22965
  return;
22940
22966
  }
22941
- Q = Q.parentNode;
22967
+ J = J.parentNode;
22942
22968
  }
22943
22969
  }
22944
22970
  }
@@ -22964,9 +22990,9 @@ ${s.textContent ?? ""}
22964
22990
  children: [
22965
22991
  /* @__PURE__ */ e(al, {
22966
22992
  advanced: t,
22967
- isActive: (K) => w.has(K),
22993
+ isActive: (Q) => w.has(Q),
22968
22994
  exec: W,
22969
- applyHeading: n1,
22995
+ applyHeading: o1,
22970
22996
  insertTaskList: v1,
22971
22997
  openLinkPrompt: () => H(),
22972
22998
  insertTable: y1,
@@ -22985,10 +23011,10 @@ ${s.textContent ?? ""}
22985
23011
  A && D && /* @__PURE__ */ e(ll, {
22986
23012
  pos: D,
22987
23013
  toolbarRef: g,
22988
- addRowAbove: o1,
23014
+ addRowAbove: s1,
22989
23015
  addRowBelow: V,
22990
23016
  removeRow: X,
22991
- addColumnLeft: a1,
23017
+ addColumnLeft: i1,
22992
23018
  addColumnRight: I,
22993
23019
  removeColumn: $,
22994
23020
  deleteTable: p1
@@ -23001,8 +23027,8 @@ ${s.textContent ?? ""}
23001
23027
  suppressContentEditableWarning: !0,
23002
23028
  "data-placeholder": n,
23003
23029
  onInput: u,
23004
- onKeyUp: s1,
23005
- onMouseUp: s1,
23030
+ onKeyUp: h1,
23031
+ onMouseUp: h1,
23006
23032
  onClick: k1,
23007
23033
  onKeyDown: g1,
23008
23034
  onBlur: o
@@ -23034,13 +23060,15 @@ ${s.textContent ?? ""}
23034
23060
  behavior: "smooth"
23035
23061
  });
23036
23062
  }, [t]);
23037
- return a ? /* @__PURE__ */ e("button", {
23038
- className: `scroll-to-top${l ? ` ${l}` : ""}`,
23039
- onClick: o,
23063
+ return a ? /* @__PURE__ */ e(K, {
23040
23064
  title: "Scroll to top",
23041
- children: /* @__PURE__ */ e("span", {
23042
- className: "scroll-to-top__icon",
23043
- children: "▲"
23065
+ children: /* @__PURE__ */ e("button", {
23066
+ className: `scroll-to-top${l ? ` ${l}` : ""}`,
23067
+ onClick: o,
23068
+ children: /* @__PURE__ */ e("span", {
23069
+ className: "scroll-to-top__icon",
23070
+ children: "▲"
23071
+ })
23044
23072
  })
23045
23073
  }) : null;
23046
23074
  }, Z2 = w0(null), G2 = () => f0(Z2), Ka = () => {
@@ -23105,14 +23133,16 @@ ${s.textContent ?? ""}
23105
23133
  className: "sidebar__link-label",
23106
23134
  children: y.label
23107
23135
  }),
23108
- y.count !== void 0 && /* @__PURE__ */ e("span", {
23109
- className: "sidebar__link-count",
23136
+ y.count !== void 0 && /* @__PURE__ */ e(K, {
23110
23137
  title: y.countLabel,
23111
- children: y.count
23138
+ children: /* @__PURE__ */ e("span", {
23139
+ className: "sidebar__link-count",
23140
+ children: y.count
23141
+ })
23112
23142
  })
23113
23143
  ]
23114
23144
  }, y.id);
23115
- return /* @__PURE__ */ r(c1, { children: [d && u && f && /* @__PURE__ */ e("div", {
23145
+ return /* @__PURE__ */ r(l1, { children: [d && u && f && /* @__PURE__ */ e("div", {
23116
23146
  className: M,
23117
23147
  onClick: C
23118
23148
  }), /* @__PURE__ */ r("aside", {
@@ -23256,7 +23286,7 @@ var ti = ({ variant: t = "text", animation: c = "pulse", width: l, height: a, bo
23256
23286
  return o > 1 ? /* @__PURE__ */ e("div", {
23257
23287
  className: "skeleton-group",
23258
23288
  children: m
23259
- }) : /* @__PURE__ */ e(c1, { children: m });
23289
+ }) : /* @__PURE__ */ e(l1, { children: m });
23260
23290
  }, ol = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.length ?? 0, ri = ({ disabled: t = !1, largeValueState: c = "info", min: l = 0, max: a = 100, step: s = 1, value: o, onChange: i, showValues: n = !0, showValueAtTheRight: d = !1, valueSize: h, thin: m = !1, vertical: p = !1 }) => {
23261
23291
  const g = (f) => {
23262
23292
  i(parseFloat(f.target.value));
@@ -23331,11 +23361,13 @@ var ti = ({ variant: t = "text", animation: c = "pulse", width: l, height: a, bo
23331
23361
  children: [s && /* @__PURE__ */ e("h2", {
23332
23362
  className: "split-panel__right-title",
23333
23363
  children: s
23334
- }), /* @__PURE__ */ e("button", {
23335
- className: "split-panel__close",
23336
- onClick: a,
23364
+ }), /* @__PURE__ */ e(K, {
23337
23365
  title: "Close panel",
23338
- children: "✕"
23366
+ children: /* @__PURE__ */ e("button", {
23367
+ className: "split-panel__close",
23368
+ onClick: a,
23369
+ children: "✕"
23370
+ })
23339
23371
  })]
23340
23372
  }), /* @__PURE__ */ e("div", {
23341
23373
  className: "split-panel__right-content",
@@ -23369,18 +23401,20 @@ var ti = ({ variant: t = "text", animation: c = "pulse", width: l, height: a, bo
23369
23401
  const u = m[v];
23370
23402
  if (u <= 0) return null;
23371
23403
  const f = w.state || "default", C = w.pattern || "solid", x = sl(w, u, n);
23372
- return /* @__PURE__ */ e("div", {
23373
- className: [
23374
- "stacked-bar__segment",
23375
- `stacked-bar__segment--${f}`,
23376
- `stacked-bar__segment--${C}`,
23377
- t && C !== "solid" ? "stacked-bar__segment--animated" : ""
23378
- ].filter(Boolean).join(" "),
23379
- style: p ? { height: `${u}%` } : { width: `${u}%` },
23404
+ return /* @__PURE__ */ e(K, {
23380
23405
  title: x,
23381
- children: i && /* @__PURE__ */ e("span", {
23382
- className: "stacked-bar__segment-label",
23383
- children: x
23406
+ children: /* @__PURE__ */ e("div", {
23407
+ className: [
23408
+ "stacked-bar__segment",
23409
+ `stacked-bar__segment--${f}`,
23410
+ `stacked-bar__segment--${C}`,
23411
+ t && C !== "solid" ? "stacked-bar__segment--animated" : ""
23412
+ ].filter(Boolean).join(" "),
23413
+ style: p ? { height: `${u}%` } : { width: `${u}%` },
23414
+ children: i && /* @__PURE__ */ e("span", {
23415
+ className: "stacked-bar__segment-label",
23416
+ children: x
23417
+ })
23384
23418
  })
23385
23419
  }, `stacked-bar-segment-${v}`);
23386
23420
  })
@@ -23451,7 +23485,7 @@ var d2 = 10, ni = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
23451
23485
  }, L = m1(() => /* @__PURE__ */ r("div", {
23452
23486
  className: "list-suggestions-list",
23453
23487
  children: [
23454
- /* @__PURE__ */ e(d1, {
23488
+ /* @__PURE__ */ e(K, {
23455
23489
  title: a,
23456
23490
  children: /* @__PURE__ */ e("legend", { children: l || "Suggestions" })
23457
23491
  }),
@@ -24125,11 +24159,11 @@ var d2 = 10, ni = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
24125
24159
  let V = o0;
24126
24160
  if (l && l.length > 0) {
24127
24161
  const X = new Set(l);
24128
- V = V.filter((a1) => X.has(a1.value));
24162
+ V = V.filter((i1) => X.has(i1.value));
24129
24163
  }
24130
- if (x && (V = V.filter((X) => p2.has(X.value))), M && S && (V = V.filter((X) => (X.recommendedApps ?? []).some((a1) => a1.toLowerCase() === S))), N !== "all" && (V = V.filter((X) => dl(X.value) === N)), f.trim()) {
24164
+ if (x && (V = V.filter((X) => p2.has(X.value))), M && S && (V = V.filter((X) => (X.recommendedApps ?? []).some((i1) => i1.toLowerCase() === S))), N !== "all" && (V = V.filter((X) => dl(X.value) === N)), f.trim()) {
24131
24165
  const X = f.toLowerCase().trim();
24132
- V = V.filter((a1) => a1.label.toLowerCase().includes(X) || (a1.recommendedApps ?? []).some((I) => I.toLowerCase().includes(X)));
24166
+ V = V.filter((i1) => i1.label.toLowerCase().includes(X) || (i1.recommendedApps ?? []).some((I) => I.toLowerCase().includes(X)));
24133
24167
  }
24134
24168
  return V;
24135
24169
  }, [
@@ -24167,10 +24201,10 @@ var d2 = 10, ni = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
24167
24201
  components: h.components
24168
24202
  });
24169
24203
  }, P = (V, X) => {
24170
- const a1 = X ? [...h.components, V] : h.components.filter((I) => I !== V);
24204
+ const i1 = X ? [...h.components, V] : h.components.filter((I) => I !== V);
24171
24205
  p({
24172
24206
  effect: h.effect,
24173
- components: a1
24207
+ components: i1
24174
24208
  });
24175
24209
  }, O = () => {
24176
24210
  w(), c();
@@ -24286,7 +24320,7 @@ var d2 = 10, ni = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
24286
24320
  }, V.value))
24287
24321
  })
24288
24322
  ]
24289
- }), s && /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ r("div", {
24323
+ }), s && /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ r("div", {
24290
24324
  className: "theme-settings__section",
24291
24325
  children: [/* @__PURE__ */ e("label", {
24292
24326
  htmlFor: "effect-selector",
@@ -24516,13 +24550,15 @@ var d2 = 10, ni = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
24516
24550
  onClick: i.onClick,
24517
24551
  children: i.label
24518
24552
  }),
24519
- s && /* @__PURE__ */ e("button", {
24520
- className: "toast__close",
24521
- onClick: l,
24553
+ s && /* @__PURE__ */ e(K, {
24522
24554
  title: "Close",
24523
- children: /* @__PURE__ */ e(G, {
24524
- name: "clear",
24525
- size: "sm"
24555
+ children: /* @__PURE__ */ e("button", {
24556
+ className: "toast__close",
24557
+ onClick: l,
24558
+ children: /* @__PURE__ */ e(G, {
24559
+ name: "clear",
24560
+ size: "sm"
24561
+ })
24526
24562
  })
24527
24563
  })
24528
24564
  ]
@@ -24546,7 +24582,7 @@ var d2 = 10, ni = ({ data: t, label: c, title: l, tooltip: a, enableSearch: s =
24546
24582
  children: n.label
24547
24583
  })]
24548
24584
  }, n.key);
24549
- return n.description ? /* @__PURE__ */ e(d1, {
24585
+ return n.description ? /* @__PURE__ */ e(K, {
24550
24586
  title: n.description,
24551
24587
  children: d
24552
24588
  }, n.key) : d;
@@ -25162,7 +25198,7 @@ function Ci({ redirectPath: t = "/" }) {
25162
25198
  w(!1);
25163
25199
  }
25164
25200
  };
25165
- return /* @__PURE__ */ r(c1, { children: [/* @__PURE__ */ e("div", {
25201
+ return /* @__PURE__ */ r(l1, { children: [/* @__PURE__ */ e("div", {
25166
25202
  className: "LoginPage",
25167
25203
  children: /* @__PURE__ */ r("div", {
25168
25204
  className: "LoginPage__card",
@@ -25432,7 +25468,7 @@ var _i = (t, c, l) => {
25432
25468
  } catch {
25433
25469
  return t.trim();
25434
25470
  }
25435
- }, _l = "1.0.20", Bi = 240, Ll = "71768a7", zl = "2026-07-14T08:38:11.557Z", Ri = "240", Vl = (t) => {
25471
+ }, _l = "1.0.21", Bi = 242, Ll = "4d81fc9", zl = "2026-07-14T09:19:47.258Z", Ri = "242", Vl = (t) => {
25436
25472
  const c = document.getElementById("mb-version-toast");
25437
25473
  if (c) {
25438
25474
  c.remove();
@@ -25456,7 +25492,7 @@ var _i = (t, c, l) => {
25456
25492
  const c = {
25457
25493
  ...t,
25458
25494
  lib: _l,
25459
- libBuildNumber: 240,
25495
+ libBuildNumber: 242,
25460
25496
  libCommit: Ll,
25461
25497
  libBuildDate: zl
25462
25498
  };
@@ -25647,7 +25683,7 @@ export {
25647
25683
  mi as ToggleButtons,
25648
25684
  m2 as ToggleSwitch,
25649
25685
  pi as Toolbar,
25650
- d1 as Tooltip,
25686
+ K as Tooltip,
25651
25687
  vi as TourHud,
25652
25688
  gi as Tree,
25653
25689
  ui as WHtR,