@snmt-react-ui/user-select 2.8.0 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/user-select.js +646 -610
  2. package/package.json +5 -5
@@ -1,9 +1,9 @@
1
1
  var ke = Object.defineProperty;
2
2
  var Le = (i, e, t) => e in i ? ke(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var D1 = (i, e, t) => Le(i, typeof e != "symbol" ? e + "" : e, t);
3
+ var B1 = (i, e, t) => Le(i, typeof e != "symbol" ? e + "" : e, t);
4
4
  import "./index.css";
5
5
  import { jsx as r, Fragment as i1, jsxs as C } from "react/jsx-runtime";
6
- import { createContext as d1, forwardRef as k1, useState as B, useRef as X, useEffect as G, useCallback as $, useMemo as ve, useImperativeHandle as oe, useContext as r1 } from "react";
6
+ import { createContext as d1, forwardRef as k1, useRef as q, useImperativeHandle as _1, useState as T, useEffect as j, useCallback as $, useMemo as ve, useContext as r1 } from "react";
7
7
  import { Select as Ne, Flex as xe, Avatar as Re, Checkbox as Me, Typography as ae, Tag as be, Popover as ye } from "antd";
8
8
  import { SNMTUiContext as Ee } from "@snmt-react-ui/core";
9
9
  var _e = Object.defineProperty, He = (i, e, t) => e in i ? _e(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Ie = (i, e, t) => He(i, e + "", t), Oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -14,11 +14,11 @@ function Se() {
14
14
  s1(e[0]) && (e[0] = `react-i18next:: ${e[0]}`), console.warn(...e);
15
15
  }
16
16
  }
17
- const B1 = {};
18
- function S1() {
17
+ const j1 = {};
18
+ function V1() {
19
19
  for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
20
20
  e[t] = arguments[t];
21
- s1(e[0]) && B1[e[0]] || (s1(e[0]) && (B1[e[0]] = /* @__PURE__ */ new Date()), Se(...e));
21
+ s1(e[0]) && j1[e[0]] || (s1(e[0]) && (j1[e[0]] = /* @__PURE__ */ new Date()), Se(...e));
22
22
  }
23
23
  const le = (i, e) => () => {
24
24
  if (i.isInitialized)
@@ -31,9 +31,9 @@ const le = (i, e) => () => {
31
31
  };
32
32
  i.on("initialized", t);
33
33
  }
34
- }, j1 = (i, e, t) => {
34
+ }, W1 = (i, e, t) => {
35
35
  i.loadNamespaces(e, le(i, t));
36
- }, W1 = (i, e, t, s) => {
36
+ }, G1 = (i, e, t, s) => {
37
37
  s1(t) && (t = [t]), t.forEach((n) => {
38
38
  i.options.ns.indexOf(n) < 0 && i.options.ns.push(n);
39
39
  }), i.loadLanguages(e, le(i, s));
@@ -41,14 +41,14 @@ const le = (i, e) => () => {
41
41
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
42
42
  const s = e.languages[0], n = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
43
43
  if (s.toLowerCase() === "cimode") return !0;
44
- const c = (a, d) => {
45
- const g = e.services.backendConnector.state[`${a}|${d}`];
46
- return g === -1 || g === 2;
44
+ const c = (a, g) => {
45
+ const d = e.services.backendConnector.state[`${a}|${g}`];
46
+ return d === -1 || d === 2;
47
47
  };
48
48
  return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !c(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(s, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || c(s, i) && (!n || c(o, i)));
49
49
  }, Ae = function(i, e) {
50
50
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
51
- return !e.languages || !e.languages.length ? (S1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
51
+ return !e.languages || !e.languages.length ? (V1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
52
52
  lng: t.lng,
53
53
  precheck: (s, n) => {
54
54
  if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && s.services.backendConnector.backend && s.isLanguageChangingTo && !n(s.isLanguageChangingTo, i)) return !1;
@@ -100,8 +100,8 @@ class Fe {
100
100
  }
101
101
  }
102
102
  const Ye = (i, e) => {
103
- const t = X();
104
- return G(() => {
103
+ const t = q();
104
+ return j(() => {
105
105
  t.current = i;
106
106
  }, [i, e]), t.current;
107
107
  }, he = (i, e, t, s) => i.getFixedT(e, t, s), Ue = (i, e, t, s) => $(he(i, e, t, s), [i, e, t, s]), ze = function(i) {
@@ -113,48 +113,48 @@ const Ye = (i, e) => {
113
113
  defaultNS: n
114
114
  } = r1(Pe) || {}, o = t || s || $e();
115
115
  if (o && !o.reportNamespaces && (o.reportNamespaces = new Fe()), !o) {
116
- S1("You will need to pass in an i18next instance by using initReactI18next");
117
- const f = (x, L) => s1(L) ? L : Te(L) && s1(L.defaultValue) ? L.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, N = [f, {}, !1];
116
+ V1("You will need to pass in an i18next instance by using initReactI18next");
117
+ const f = (x, v) => s1(v) ? v : Te(v) && s1(v.defaultValue) ? v.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, N = [f, {}, !1];
118
118
  return N.t = f, N.i18n = {}, N.ready = !1, N;
119
119
  }
120
- o.options.react && o.options.react.wait !== void 0 && S1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
120
+ o.options.react && o.options.react.wait !== void 0 && V1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
121
121
  const c = {
122
122
  ...Ge(),
123
123
  ...o.options.react,
124
124
  ...e
125
125
  }, {
126
126
  useSuspense: a,
127
- keyPrefix: d
127
+ keyPrefix: g
128
128
  } = c;
129
- let g = i;
130
- g = s1(g) ? [g] : g || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(g);
131
- const l = (o.isInitialized || o.initializedStoreOnce) && g.every((f) => Ae(f, o, c)), h = Ue(o, e.lng || null, c.nsMode === "fallback" ? g : g[0], d), u = () => h, p = () => he(o, e.lng || null, c.nsMode === "fallback" ? g : g[0], d), [k, v] = B(u);
132
- let m = g.join();
129
+ let d = i;
130
+ d = s1(d) ? [d] : d || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(d);
131
+ const l = (o.isInitialized || o.initializedStoreOnce) && d.every((f) => Ae(f, o, c)), h = Ue(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => he(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, k] = T(u);
132
+ let m = d.join();
133
133
  e.lng && (m = `${e.lng}${m}`);
134
- const O = Ye(m), M = X(!0);
135
- G(() => {
134
+ const _ = Ye(m), M = q(!0);
135
+ j(() => {
136
136
  const {
137
137
  bindI18n: f,
138
138
  bindI18nStore: N
139
139
  } = c;
140
- M.current = !0, !l && !a && (e.lng ? W1(o, e.lng, g, () => {
141
- M.current && v(p);
142
- }) : j1(o, g, () => {
143
- M.current && v(p);
144
- })), l && O && O !== m && M.current && v(p);
140
+ M.current = !0, !l && !a && (e.lng ? G1(o, e.lng, d, () => {
141
+ M.current && k(p);
142
+ }) : W1(o, d, () => {
143
+ M.current && k(p);
144
+ })), l && _ && _ !== m && M.current && k(p);
145
145
  const x = () => {
146
- M.current && v(p);
146
+ M.current && k(p);
147
147
  };
148
148
  return f && o && o.on(f, x), N && o && o.store.on(N, x), () => {
149
- M.current = !1, f && o && f.split(" ").forEach((L) => o.off(L, x)), N && o && N.split(" ").forEach((L) => o.store.off(L, x));
149
+ M.current = !1, f && o && f.split(" ").forEach((v) => o.off(v, x)), N && o && N.split(" ").forEach((v) => o.store.off(v, x));
150
150
  };
151
- }, [o, m]), G(() => {
152
- M.current && l && v(u);
153
- }, [o, d, l]);
154
- const S = [k, o, l];
155
- if (S.t = k, S.i18n = o, S.ready = l, l || !l && !a) return S;
151
+ }, [o, m]), j(() => {
152
+ M.current && l && k(u);
153
+ }, [o, g, l]);
154
+ const S = [w, o, l];
155
+ if (S.t = w, S.i18n = o, S.ready = l, l || !l && !a) return S;
156
156
  throw new Promise((f) => {
157
- e.lng ? W1(o, e.lng, g, () => f()) : j1(o, g, () => f());
157
+ e.lng ? G1(o, e.lng, d, () => f()) : W1(o, d, () => f());
158
158
  });
159
159
  }, p1 = ({
160
160
  children: i,
@@ -193,12 +193,12 @@ const Ye = (i, e) => {
193
193
  );
194
194
  };
195
195
  var Q = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.BLUE_DARK_3 = "var(--blue-dark-3)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(Q || {});
196
- const Z1 = d1({
196
+ const D1 = d1({
197
197
  locale: "en",
198
198
  theme: "light"
199
199
  });
200
- Z1.Provider;
201
- const Qe = ({
200
+ D1.Provider;
201
+ const qe = ({
202
202
  checked: i = !0,
203
203
  indeterminate: e = !1,
204
204
  children: t,
@@ -206,19 +206,19 @@ const Qe = ({
206
206
  disabled: n = !1,
207
207
  disableUncheck: o = !1
208
208
  }) => {
209
- const [c, a] = B(i), [d, g] = B(e);
210
- G(() => {
211
- a(i), g(e);
209
+ const [c, a] = T(i), [g, d] = T(e);
210
+ j(() => {
211
+ a(i), d(e);
212
212
  }, [i, e]);
213
- const { theme: l } = r1(Z1);
213
+ const { theme: l } = r1(D1);
214
214
  return /* @__PURE__ */ r(
215
215
  Me,
216
216
  {
217
217
  className: `snmt-checkbox snmt-checkbox-${l}`,
218
218
  checked: c,
219
- indeterminate: d,
219
+ indeterminate: g,
220
220
  onChange: (h) => {
221
- o && c || (g(!1), a(h.target.checked), s && s(h));
221
+ o && c || (d(!1), a(h.target.checked), s && s(h));
222
222
  },
223
223
  disabled: n,
224
224
  children: t
@@ -231,7 +231,7 @@ const ce = d1({
231
231
  theme: "light"
232
232
  });
233
233
  ce.Provider;
234
- const qe = ({
234
+ const Qe = ({
235
235
  width: i = 20,
236
236
  height: e = 20,
237
237
  color: t = "#001E52",
@@ -2186,7 +2186,7 @@ const qe = ({
2186
2186
  )
2187
2187
  ]
2188
2188
  }
2189
- ), Qt = ({
2189
+ ), qt = ({
2190
2190
  className: i,
2191
2191
  color: e = y.GREY_DARK_5,
2192
2192
  height: t = 24,
@@ -2225,7 +2225,7 @@ const qe = ({
2225
2225
  )
2226
2226
  ]
2227
2227
  }
2228
- ), qt = ({
2228
+ ), Qt = ({
2229
2229
  className: i,
2230
2230
  color: e = y.GREY_DARK_5,
2231
2231
  height: t = 24,
@@ -2706,13 +2706,13 @@ const qe = ({
2706
2706
  disabled: o = !1,
2707
2707
  onClick: c
2708
2708
  }) => {
2709
- const [a, d] = B(n), { theme: g } = r1(ce), l = o ? g && g === "dark" ? y.GREY_LIGHT_4 : y.GREY_DARK_1 : s, h = o ? void 0 : c;
2710
- return G(() => {
2709
+ const [a, g] = T(n), { theme: d } = r1(ce), l = o ? d && d === "dark" ? y.GREY_LIGHT_4 : y.GREY_DARK_1 : s, h = o ? void 0 : c;
2710
+ return j(() => {
2711
2711
  if (n) {
2712
- h && !o && d(`${n} clickable`);
2712
+ h && !o && g(`${n} clickable`);
2713
2713
  return;
2714
2714
  }
2715
- h && !o && d("clickable");
2715
+ h && !o && g("clickable");
2716
2716
  }, [h, n, o]), /* @__PURE__ */ r(i1, { children: (() => {
2717
2717
  switch (i) {
2718
2718
  case "nextIcon":
@@ -2720,7 +2720,7 @@ const qe = ({
2720
2720
  case "prevIcon":
2721
2721
  return St({ width: e, height: t, color: l, className: a, onClick: h });
2722
2722
  case "arrowDown":
2723
- return qe({ width: e, height: t, color: l, className: a, onClick: h });
2723
+ return Qe({ width: e, height: t, color: l, className: a, onClick: h });
2724
2724
  case "info":
2725
2725
  return Xe({ width: e, height: t, color: l, className: a, onClick: h });
2726
2726
  case "arrowRight":
@@ -2870,9 +2870,9 @@ const qe = ({
2870
2870
  case "resourceManager":
2871
2871
  return Jt({ width: e, height: t, color: l, className: a, onClick: h });
2872
2872
  case "settings2":
2873
- return Qt({ width: e, height: t, color: l, className: a, onClick: h });
2874
- case "image":
2875
2873
  return qt({ width: e, height: t, color: l, className: a, onClick: h });
2874
+ case "image":
2875
+ return Qt({ width: e, height: t, color: l, className: a, onClick: h });
2876
2876
  case "edit":
2877
2877
  return Xt({ width: e, height: t, color: l, className: a, onClick: h });
2878
2878
  case "filledArrowRight":
@@ -2919,24 +2919,38 @@ const qe = ({
2919
2919
  whiteSpace: c = "normal",
2920
2920
  /** This prop allows you to enable tooltip if text size is too big */
2921
2921
  trim: a = !1
2922
- }, d) => {
2923
- const g = e === "h1" || e === "h2" || e === "h3" || e === "h4";
2924
- let l = `snmt-typography snmt-typography-${e}`;
2925
- i && i !== "inherit" && (l += ` snmt-typography-align-${i}`), o && (l += " collapsed");
2926
- const h = {
2927
- className: l,
2922
+ }, g) => {
2923
+ const d = q(null);
2924
+ _1(g, () => d.current);
2925
+ const [l, h] = T(!1);
2926
+ j(() => {
2927
+ var k;
2928
+ if (!a) return;
2929
+ const m = () => {
2930
+ d.current && h(d.current.scrollWidth > d.current.clientWidth);
2931
+ };
2932
+ m();
2933
+ const _ = new ResizeObserver(m);
2934
+ return d.current && _.observe(d.current), (k = d.current) != null && k.parentElement && _.observe(d.current.parentElement), () => {
2935
+ _.disconnect();
2936
+ };
2937
+ }, [a]);
2938
+ const u = e === "h1" || e === "h2" || e === "h3" || e === "h4";
2939
+ let p = `snmt-typography snmt-typography-${e}`;
2940
+ i && i !== "inherit" && (p += ` snmt-typography-align-${i}`), o && (p += " collapsed");
2941
+ const w = {
2942
+ className: p,
2928
2943
  style: { color: t, whiteSpace: a ? "nowrap" : c, display: a ? "block" : "" },
2929
2944
  onClick: n,
2930
2945
  ref: d,
2931
- ellipsis: a ? {
2946
+ ellipsis: a && l ? {
2932
2947
  tooltip: {
2933
2948
  title: s,
2934
- arrow: !0,
2935
2949
  overlayClassName: "snmt-tooltip"
2936
2950
  }
2937
2951
  } : void 0
2938
2952
  };
2939
- return g ? /* @__PURE__ */ r(g2, { level: C2[e], ...h, children: s }) : /* @__PURE__ */ r(u2, { ...h, children: s });
2953
+ return u ? /* @__PURE__ */ r(g2, { level: C2[e], ...w, children: s }) : /* @__PURE__ */ r(u2, { ...w, children: s });
2940
2954
  }
2941
2955
  );
2942
2956
  var E = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.BLUE_DARK_3 = "var(--blue-dark-3)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(E || {});
@@ -4201,7 +4215,7 @@ const f2 = ({
4201
4215
  }
4202
4216
  )
4203
4217
  }
4204
- ), Q2 = ({
4218
+ ), q2 = ({
4205
4219
  className: i,
4206
4220
  color: e = E.GREY_DARK_5,
4207
4221
  height: t = 20,
@@ -4228,7 +4242,7 @@ const f2 = ({
4228
4242
  }
4229
4243
  )
4230
4244
  }
4231
- ), q2 = ({
4245
+ ), Q2 = ({
4232
4246
  className: i,
4233
4247
  color: e = E.GREY_DARK_5,
4234
4248
  height: t = 5,
@@ -5420,19 +5434,19 @@ const f2 = ({
5420
5434
  disabled: o = !1,
5421
5435
  onClick: c
5422
5436
  }) => {
5423
- const [a, d] = B(n), { theme: g } = r1(de), l = o ? g && g === "dark" ? E.GREY_LIGHT_4 : E.GREY_DARK_1 : s, h = o ? void 0 : c;
5424
- return G(() => {
5437
+ const [a, g] = T(n), { theme: d } = r1(de), l = o ? d && d === "dark" ? E.GREY_LIGHT_4 : E.GREY_DARK_1 : s, h = o ? void 0 : c;
5438
+ return j(() => {
5425
5439
  if (n) {
5426
- h && !o && d(`${n} clickable`);
5440
+ h && !o && g(`${n} clickable`);
5427
5441
  return;
5428
5442
  }
5429
- h && !o && d("clickable");
5443
+ h && !o && g("clickable");
5430
5444
  }, [h, n, o]), /* @__PURE__ */ r(i1, { children: (() => {
5431
5445
  switch (i) {
5432
5446
  case "nextIcon":
5433
5447
  return J2({ width: e, height: t, color: l, className: a, onClick: h });
5434
5448
  case "prevIcon":
5435
- return Q2({ width: e, height: t, color: l, className: a, onClick: h });
5449
+ return q2({ width: e, height: t, color: l, className: a, onClick: h });
5436
5450
  case "arrowDown":
5437
5451
  return f2({ width: e, height: t, color: l, className: a, onClick: h });
5438
5452
  case "info":
@@ -5552,7 +5566,7 @@ const f2 = ({
5552
5566
  case "arrowUpFilled":
5553
5567
  return X2({ width: e, height: t, color: l, className: a, onClick: h });
5554
5568
  case "arrowDownFilled":
5555
- return q2({ width: e, height: t, color: l, className: a, onClick: h });
5569
+ return Q2({ width: e, height: t, color: l, className: a, onClick: h });
5556
5570
  case "link":
5557
5571
  return e5({ width: e, height: t, color: l, className: a, onClick: h });
5558
5572
  case "telegram":
@@ -5678,24 +5692,38 @@ const ge = ({
5678
5692
  whiteSpace: c = "normal",
5679
5693
  /** This prop allows you to enable tooltip if text size is too big */
5680
5694
  trim: a = !1
5681
- }, d) => {
5682
- const g = e === "h1" || e === "h2" || e === "h3" || e === "h4";
5683
- let l = `snmt-typography snmt-typography-${e}`;
5684
- i && i !== "inherit" && (l += ` snmt-typography-align-${i}`), o && (l += " collapsed");
5685
- const h = {
5686
- className: l,
5695
+ }, g) => {
5696
+ const d = q(null);
5697
+ _1(g, () => d.current);
5698
+ const [l, h] = T(!1);
5699
+ j(() => {
5700
+ var k;
5701
+ if (!a) return;
5702
+ const m = () => {
5703
+ d.current && h(d.current.scrollWidth > d.current.clientWidth);
5704
+ };
5705
+ m();
5706
+ const _ = new ResizeObserver(m);
5707
+ return d.current && _.observe(d.current), (k = d.current) != null && k.parentElement && _.observe(d.current.parentElement), () => {
5708
+ _.disconnect();
5709
+ };
5710
+ }, [a]);
5711
+ const u = e === "h1" || e === "h2" || e === "h3" || e === "h4";
5712
+ let p = `snmt-typography snmt-typography-${e}`;
5713
+ i && i !== "inherit" && (p += ` snmt-typography-align-${i}`), o && (p += " collapsed");
5714
+ const w = {
5715
+ className: p,
5687
5716
  style: { color: t, whiteSpace: a ? "nowrap" : c, display: a ? "block" : "" },
5688
5717
  onClick: n,
5689
5718
  ref: d,
5690
- ellipsis: a ? {
5719
+ ellipsis: a && l ? {
5691
5720
  tooltip: {
5692
5721
  title: s,
5693
- arrow: !0,
5694
5722
  overlayClassName: "snmt-tooltip"
5695
5723
  }
5696
5724
  } : void 0
5697
5725
  };
5698
- return g ? /* @__PURE__ */ r(O5, { level: V5[e], ...h, children: s }) : /* @__PURE__ */ r(S5, { ...h, children: s });
5726
+ return u ? /* @__PURE__ */ r(O5, { level: V5[e], ...w, children: s }) : /* @__PURE__ */ r(S5, { ...w, children: s });
5699
5727
  }
5700
5728
  ), T5 = ({
5701
5729
  children: i,
@@ -5705,7 +5733,7 @@ const ge = ({
5705
5733
  placement: n = "topRight",
5706
5734
  noPadding: o = !1
5707
5735
  }) => {
5708
- const [c, a] = B(!1);
5736
+ const [c, a] = T(!1);
5709
5737
  return /* @__PURE__ */ r(
5710
5738
  ye,
5711
5739
  {
@@ -5715,8 +5743,8 @@ const ge = ({
5715
5743
  trigger: "click",
5716
5744
  overlayClassName: `snmt-popover ${o ? "" : "padding"}`,
5717
5745
  open: t ?? c,
5718
- onOpenChange: (d) => {
5719
- a(d), s == null || s(d);
5746
+ onOpenChange: (g) => {
5747
+ a(g), s == null || s(g);
5720
5748
  },
5721
5749
  children: /* @__PURE__ */ r("div", { className: "wrapper", children: i })
5722
5750
  }
@@ -5742,14 +5770,14 @@ const D5 = ({
5742
5770
  options: o,
5743
5771
  extraOptions: c
5744
5772
  }) => {
5745
- const { locale: a } = r1(Z1), { t: d } = ze("common", { lng: a }), [g, l] = B(!1);
5746
- if (G(() => {
5773
+ const { locale: a } = r1(D1), { t: g } = ze("common", { lng: a }), [d, l] = T(!1);
5774
+ if (j(() => {
5747
5775
  i.length || l(!1);
5748
5776
  }, [i]), !i.length)
5749
5777
  return null;
5750
5778
  const h = (u) => {
5751
- var p, k;
5752
- return ((p = o == null ? void 0 : o.find((v) => v.value === u)) == null ? void 0 : p.label) || ((k = c == null ? void 0 : c.find((v) => v.value === u)) == null ? void 0 : k.label) || u;
5779
+ var p, w;
5780
+ return ((p = o == null ? void 0 : o.find((k) => k.value === u)) == null ? void 0 : p.label) || ((w = c == null ? void 0 : c.find((k) => k.value === u)) == null ? void 0 : w.label) || u;
5753
5781
  };
5754
5782
  return /* @__PURE__ */ C(
5755
5783
  T5,
@@ -5768,24 +5796,28 @@ const D5 = ({
5768
5796
  )) }) })
5769
5797
  ),
5770
5798
  placement: "bottomRight",
5771
- isOpen: g,
5799
+ isOpen: d,
5772
5800
  setIsOpen: l,
5773
5801
  children: [
5774
5802
  i.length,
5775
5803
  " ",
5776
- d("more")
5804
+ g("more")
5777
5805
  ]
5778
5806
  }
5779
5807
  );
5780
- }, G1 = ({ size: i = 30, color: e = "#004ed7" }) => {
5781
- const t = `no-repeat linear-gradient(${e}
5782
- calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, s = {
5783
- width: i,
5784
- background: `${t} 0% 100%, ${t} 50% 100%, ${t} 100% 100%`,
5808
+ }, B5 = {
5809
+ small: 20,
5810
+ medium: 28,
5811
+ large: 48
5812
+ }, K1 = ({ size: i = "medium", color: e = "#004ed7" }) => {
5813
+ const t = typeof i == "number" ? i : B5[i], s = `no-repeat linear-gradient(${e}
5814
+ calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, n = {
5815
+ width: t,
5816
+ background: `${s} 0% 100%, ${s} 50% 100%, ${s} 100% 100%`,
5785
5817
  backgroundSize: "20% calc(200% + 20px)"
5786
5818
  };
5787
- return /* @__PURE__ */ r("span", { className: "snmt-loader", style: s });
5788
- }, K1 = k1(
5819
+ return /* @__PURE__ */ r("span", { className: "snmt-loader", style: n });
5820
+ }, $1 = k1(
5789
5821
  ({
5790
5822
  value: i,
5791
5823
  onChange: e,
@@ -5795,88 +5827,88 @@ const D5 = ({
5795
5827
  options: o,
5796
5828
  width: c,
5797
5829
  disabled: a = !1,
5798
- required: d = !1,
5799
- clearable: g = !1,
5830
+ required: g = !1,
5831
+ clearable: d = !1,
5800
5832
  scrollThresholdValue: l = 50,
5801
5833
  onSearchChange: h,
5802
5834
  onDropdownVisibleChange: u,
5803
5835
  onScrollToEnd: p,
5804
- onPopupScroll: k,
5805
- id: v,
5836
+ onPopupScroll: w,
5837
+ id: k,
5806
5838
  extraOptions: m,
5807
- dropdownRender: O,
5839
+ dropdownRender: _,
5808
5840
  optionRender: M,
5809
5841
  isLoading: S,
5810
5842
  readOnly: f,
5811
5843
  error: N
5812
5844
  }, x) => {
5813
- const [L, P] = B(!1), [J, F] = B(!1), [_, Z] = B(!0), [H, V] = B(i), T = X(null);
5814
- G(() => {
5845
+ const [v, P] = T(!1), [J, F] = T(!1), [H, D] = T(!0), [I, V] = T(i), Z = q(null);
5846
+ j(() => {
5815
5847
  V(i);
5816
5848
  }, [i]);
5817
- const j = (w) => {
5818
- P(w), u && u(w);
5819
- }, U = (w, b) => {
5820
- var D;
5821
- return !!((D = b == null ? void 0 : b.label) != null && D.toString().toLowerCase().includes(w.toLowerCase()));
5822
- }, I = () => {
5849
+ const W = (L) => {
5850
+ P(L), u && u(L);
5851
+ }, U = (L, b) => {
5852
+ var B;
5853
+ return !!((B = b == null ? void 0 : b.label) != null && B.toString().toLowerCase().includes(L.toLowerCase()));
5854
+ }, O = () => {
5823
5855
  F(!0);
5824
5856
  }, K = () => {
5825
5857
  F(!1);
5826
- }, W = $(
5827
- (w) => {
5828
- if (V(w), s) {
5829
- const D = w;
5830
- e == null || e(D);
5858
+ }, G = $(
5859
+ (L) => {
5860
+ if (V(L), s) {
5861
+ const B = L;
5862
+ e == null || e(B);
5831
5863
  return;
5832
5864
  }
5833
- const b = w;
5865
+ const b = L;
5834
5866
  e == null || e(b);
5835
5867
  },
5836
5868
  [s, e]
5837
5869
  ), e1 = $(() => {
5838
5870
  if (!(f || a)) {
5839
5871
  if (s) {
5840
- W([]);
5872
+ G([]);
5841
5873
  return;
5842
5874
  }
5843
- W("");
5875
+ G("");
5844
5876
  }
5845
- }, [a, W, s, f]), t1 = $(
5846
- (w) => {
5847
- const b = H.filter((D) => D !== w);
5848
- W(b), V(b);
5877
+ }, [a, G, s, f]), t1 = $(
5878
+ (L) => {
5879
+ const b = I.filter((B) => B !== L);
5880
+ G(b), V(b);
5849
5881
  },
5850
- [W, H]
5882
+ [G, I]
5851
5883
  ), g1 = $(
5852
- (w) => (H == null ? void 0 : H.indexOf(w)) === 0 ? (
5884
+ (L) => (I == null ? void 0 : I.indexOf(L)) === 0 ? (
5853
5885
  // if the search input is empty
5854
5886
  // then display the placeholder, else do not display it
5855
- /* @__PURE__ */ r("span", { className: "custom-placeholder", children: _ ? t : "" })
5887
+ /* @__PURE__ */ r("span", { className: "custom-placeholder", children: H ? t : "" })
5856
5888
  ) : /* @__PURE__ */ r(i1, {}),
5857
- [_, H, t]
5858
- ), L1 = (w) => {
5859
- w.preventDefault(), w.stopPropagation();
5860
- }, v1 = async (w) => {
5861
- const { target: b } = w;
5862
- b.scrollTop + b.offsetHeight >= b.scrollHeight - l && (p == null || p(!0)), k && await k(w);
5889
+ [H, I, t]
5890
+ ), L1 = (L) => {
5891
+ L.preventDefault(), L.stopPropagation();
5892
+ }, v1 = async (L) => {
5893
+ const { target: b } = L;
5894
+ b.scrollTop + b.offsetHeight >= b.scrollHeight - l && (p == null || p(!0)), w && await w(L);
5863
5895
  }, o1 = $(
5864
- (w) => {
5865
- var b, D;
5866
- return ((b = o.find((a1) => a1.value === w)) == null ? void 0 : b.label) || ((D = m == null ? void 0 : m.find(
5867
- (a1) => a1.value === w
5868
- )) == null ? void 0 : D.label) || w;
5896
+ (L) => {
5897
+ var b, B;
5898
+ return ((b = o.find((a1) => a1.value === L)) == null ? void 0 : b.label) || ((B = m == null ? void 0 : m.find(
5899
+ (a1) => a1.value === L
5900
+ )) == null ? void 0 : B.label) || L;
5869
5901
  },
5870
5902
  [m, o]
5871
5903
  ), N1 = $(
5872
- (w) => {
5904
+ (L) => {
5873
5905
  var b;
5874
5906
  return /* @__PURE__ */ r(
5875
5907
  D5,
5876
5908
  {
5877
- values: w,
5909
+ values: L,
5878
5910
  onTagClose: t1,
5879
- maxWidth: ((b = T.current) == null ? void 0 : b.clientWidth) || 0,
5911
+ maxWidth: ((b = Z.current) == null ? void 0 : b.clientWidth) || 0,
5880
5912
  disabled: a,
5881
5913
  closable: !f,
5882
5914
  options: o,
@@ -5886,16 +5918,16 @@ const D5 = ({
5886
5918
  },
5887
5919
  [a, m, t1, o, f]
5888
5920
  ), A = $(
5889
- ({ label: w, value: b, mode: D }) => D === "filter" ? g1(b) : /* @__PURE__ */ r("div", { onMouseDown: L1, className: "tag-wrapper", children: /* @__PURE__ */ r(ge, { onClose: () => t1(b), disabled: a, children: typeof w == "object" ? w : o1(b) }) }),
5921
+ ({ label: L, value: b, mode: B }) => B === "filter" ? g1(b) : /* @__PURE__ */ r("div", { onMouseDown: L1, className: "tag-wrapper", children: /* @__PURE__ */ r(ge, { onClose: () => t1(b), disabled: a, children: typeof L == "object" ? L : o1(b) }) }),
5890
5922
  [a, o1, t1, g1]
5891
- ), z = Array.isArray(H) && H.length > 0 || !!H && typeof H == "string" && H.trim() !== "";
5923
+ ), z = Array.isArray(I) && I.length > 0 || !!I && typeof I == "string" && I.trim() !== "";
5892
5924
  return /* @__PURE__ */ C("div", { className: "snmt-select-container", children: [
5893
5925
  /* @__PURE__ */ C(
5894
5926
  "div",
5895
5927
  {
5896
5928
  className: `snmt-select-1-15-6 ${J ? "snmt-select-focused" : ""}
5897
5929
  ${s ? "" : "snmt-select-single"} ${f ? "snmt-select-read-only" : ""}`,
5898
- ref: T,
5930
+ ref: Z,
5899
5931
  style: { width: c },
5900
5932
  children: [
5901
5933
  /* @__PURE__ */ r(
@@ -5903,33 +5935,33 @@ const D5 = ({
5903
5935
  {
5904
5936
  className: "snmt-select-blank",
5905
5937
  popupClassName: f ? "dropdown-read-only" : "",
5906
- id: v,
5938
+ id: k,
5907
5939
  ref: x,
5908
5940
  showSearch: !!n,
5909
5941
  filterOption: n && U,
5910
- onDropdownVisibleChange: j,
5942
+ onDropdownVisibleChange: W,
5911
5943
  disabled: a,
5912
- value: H || void 0,
5913
- labelRender: (w) => {
5914
- const b = o1(w.value);
5944
+ value: I || void 0,
5945
+ labelRender: (L) => {
5946
+ const b = o1(L.value);
5915
5947
  return a ? /* @__PURE__ */ r("span", { style: { color: Q.GREY_DARK_1 }, children: b }) : b;
5916
5948
  },
5917
5949
  mode: s === "filter" ? "multiple" : s,
5918
- onChange: W,
5919
- onFocus: I,
5950
+ onChange: G,
5951
+ onFocus: O,
5920
5952
  onBlur: K,
5921
- onSearch: (w) => {
5922
- Z(!w), h && h(w);
5953
+ onSearch: (L) => {
5954
+ D(!L), h && h(L);
5923
5955
  },
5924
- onSelect: () => Z(!0),
5925
- onDeselect: () => Z(!0),
5926
- tagRender: (w) => A({ ...w, mode: s }),
5956
+ onSelect: () => D(!0),
5957
+ onDeselect: () => D(!0),
5958
+ tagRender: (L) => A({ ...L, mode: s }),
5927
5959
  maxTagCount: "responsive",
5928
5960
  maxTagPlaceholder: N1,
5929
5961
  onPopupScroll: v1,
5930
- prefix: S && /* @__PURE__ */ r(G1, { size: 15 }),
5962
+ prefix: S && /* @__PURE__ */ r(K1, { size: 15 }),
5931
5963
  suffixIcon: /* @__PURE__ */ r("div", { className: "wrapper-suffix-icon", children: s !== "filter" && /* @__PURE__ */ C(i1, { children: [
5932
- H && !!H.length && (s || g) && /* @__PURE__ */ r(
5964
+ I && !!I.length && (s || d) && /* @__PURE__ */ r(
5933
5965
  "div",
5934
5966
  {
5935
5967
  onClick: e1,
@@ -5950,27 +5982,27 @@ const D5 = ({
5950
5982
  {
5951
5983
  name: "selectArrowIcon",
5952
5984
  color: a ? Q.GREY_DARK_1 : Q.GREY_DARK_5,
5953
- className: L ? "select-arrow-rotated" : "select-arrow",
5954
- onClick: () => P(!L)
5985
+ className: v ? "select-arrow-rotated" : "select-arrow",
5986
+ onClick: () => P(!v)
5955
5987
  }
5956
5988
  )
5957
5989
  ] }) }),
5958
5990
  removeIcon: /* @__PURE__ */ r(u1, { name: "errorSmall", color: Q.GREY_DARK_1 }),
5959
5991
  options: o,
5960
- optionRender: (w) => M ? M(w.data) : /* @__PURE__ */ C(p1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
5992
+ optionRender: (L) => M ? M(L.data) : /* @__PURE__ */ C(p1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
5961
5993
  /* @__PURE__ */ C(p1, { alignItems: "center", gap: 12, children: [
5962
5994
  s && /* @__PURE__ */ r(
5963
- Qe,
5995
+ qe,
5964
5996
  {
5965
- checked: !!(H != null && H.includes(w.value))
5997
+ checked: !!(I != null && I.includes(L.value))
5966
5998
  }
5967
5999
  ),
5968
6000
  /* @__PURE__ */ C(p1, { alignItems: "center", gap: 8, children: [
5969
- w.data.image && /* @__PURE__ */ r(Je, { src: w.data.image, size: 20 }),
5970
- /* @__PURE__ */ r("span", { children: w.label })
6001
+ L.data.image && /* @__PURE__ */ r(Je, { src: L.data.image, size: 20 }),
6002
+ /* @__PURE__ */ r("span", { children: L.label })
5971
6003
  ] })
5972
6004
  ] }),
5973
- !s && H === w.value && /* @__PURE__ */ r(
6005
+ !s && I === L.value && /* @__PURE__ */ r(
5974
6006
  u1,
5975
6007
  {
5976
6008
  name: "ok",
@@ -5980,9 +6012,9 @@ const D5 = ({
5980
6012
  }
5981
6013
  )
5982
6014
  ] }),
5983
- dropdownRender: (w) => /* @__PURE__ */ C("div", { className: "dropdown-container", children: [
5984
- /* @__PURE__ */ r("div", { className: "dropdown-menu", children: O ? O(w) : w }),
5985
- S && /* @__PURE__ */ r("div", { className: "loading-overlay", children: /* @__PURE__ */ r(G1, { size: 28 }) })
6015
+ dropdownRender: (L) => /* @__PURE__ */ C("div", { className: "dropdown-container", children: [
6016
+ /* @__PURE__ */ r("div", { className: "dropdown-menu", children: _ ? _(L) : L }),
6017
+ S && /* @__PURE__ */ r("div", { className: "loading-overlay", children: /* @__PURE__ */ r(K1, { size: 28 }) })
5986
6018
  ] })
5987
6019
  }
5988
6020
  ),
@@ -5991,14 +6023,14 @@ const D5 = ({
5991
6023
  "label",
5992
6024
  {
5993
6025
  className: `${J || z ? "label-floating" : ""} ${a ? "label-disabled" : ""} ${J ? "label-focused" : ""} ${S ? "label-loading" : ""} ${N ? "label-error" : ""}`,
5994
- children: d ? `${t}*` : t
6026
+ children: g ? `${t}*` : t
5995
6027
  }
5996
6028
  ),
5997
6029
  /* @__PURE__ */ r(
5998
6030
  "fieldset",
5999
6031
  {
6000
6032
  className: `${J ? "fieldset-focused" : ""} ${a ? "fieldset-disabled" : ""} ${z ? "fieldset-filled" : ""} ${N ? "fieldset-error" : ""}`,
6001
- children: /* @__PURE__ */ r("legend", { children: /* @__PURE__ */ r("span", { children: d ? `${t}*` : t }) })
6033
+ children: /* @__PURE__ */ r("legend", { children: /* @__PURE__ */ r("span", { children: g ? `${t}*` : t }) })
6002
6034
  }
6003
6035
  )
6004
6036
  ] })
@@ -6020,9 +6052,9 @@ const D5 = ({
6020
6052
  ] });
6021
6053
  }
6022
6054
  );
6023
- function B5(i, e = 500) {
6024
- const t = X();
6025
- return G(() => () => {
6055
+ function j5(i, e = 500) {
6056
+ const t = q();
6057
+ return j(() => () => {
6026
6058
  t.current && clearTimeout(t.current);
6027
6059
  }, []), (...s) => {
6028
6060
  const n = setTimeout(() => {
@@ -6031,15 +6063,15 @@ function B5(i, e = 500) {
6031
6063
  clearTimeout(t.current), t.current = n;
6032
6064
  };
6033
6065
  }
6034
- function $1(i) {
6035
- const e = X(i);
6036
- return G(() => {
6066
+ function P1(i) {
6067
+ const e = q(i);
6068
+ return j(() => {
6037
6069
  e.current = i;
6038
6070
  }, [i]), e.current;
6039
6071
  }
6040
- const H1 = 100, l1 = {
6072
+ const I1 = 100, l1 = {
6041
6073
  offset: 0
6042
- }, P1 = k1(
6074
+ }, F1 = k1(
6043
6075
  ({
6044
6076
  loadOptions: i,
6045
6077
  width: e,
@@ -6049,37 +6081,37 @@ const H1 = 100, l1 = {
6049
6081
  disabled: o,
6050
6082
  scrollThresholdValue: c,
6051
6083
  placeholder: a,
6052
- mode: d,
6053
- loadOnClosedState: g,
6084
+ mode: g,
6085
+ loadOnClosedState: d,
6054
6086
  preloadOptions: l,
6055
6087
  extraOptions: h,
6056
6088
  onDropdownVisibleChange: u,
6057
6089
  optionRender: p,
6058
- dropdownRender: k,
6059
- readOnly: v,
6090
+ dropdownRender: w,
6091
+ readOnly: k,
6060
6092
  clearable: m = !1,
6061
- required: O = !1,
6093
+ required: _ = !1,
6062
6094
  error: M
6063
6095
  }, S) => {
6064
- const [f, N] = B(), [x, L] = B(l1), [P, J] = B(!1), [F, _] = B(), [Z, H] = B(!1), [V, T] = B(
6096
+ const [f, N] = T(), [x, v] = T(l1), [P, J] = T(!1), [F, H] = T(), [D, I] = T(!1), [V, Z] = T(
6065
6097
  h ?? []
6066
- ), j = $1(x.offset), U = $1(F), [I, K] = B(!1), W = X(!1), e1 = $(
6098
+ ), W = P1(x.offset), U = P1(F), [O, K] = T(!1), G = q(!1), e1 = $(
6067
6099
  async ({
6068
- limit: A = H1,
6100
+ limit: A = I1,
6069
6101
  offset: z,
6070
- search: w
6102
+ search: L
6071
6103
  }) => {
6072
6104
  J(!0);
6073
6105
  try {
6074
6106
  const b = await i({
6075
6107
  limit: A,
6076
6108
  offset: z,
6077
- search: w
6109
+ search: L
6078
6110
  });
6079
6111
  N(
6080
- (D) => z === 0 ? b.options : [...D ?? [], ...b.options]
6081
- ), L((D) => ({
6082
- ...D,
6112
+ (B) => z === 0 ? b.options : [...B ?? [], ...b.options]
6113
+ ), v((B) => ({
6114
+ ...B,
6083
6115
  count: b.count
6084
6116
  }));
6085
6117
  } catch (b) {
@@ -6089,33 +6121,33 @@ const H1 = 100, l1 = {
6089
6121
  }
6090
6122
  },
6091
6123
  [i]
6092
- ), t1 = B5((A) => {
6093
- _(A), A || L(l1);
6124
+ ), t1 = j5((A) => {
6125
+ H(A), A || v(l1);
6094
6126
  }), g1 = $(
6095
6127
  (A) => t1(A),
6096
6128
  [t1]
6097
6129
  ), L1 = $(
6098
6130
  async (A) => {
6099
- P || A && x.count && x.count > ((f == null ? void 0 : f.length) ?? 0) && L((z) => ({
6131
+ P || A && x.count && x.count > ((f == null ? void 0 : f.length) ?? 0) && v((z) => ({
6100
6132
  ...z,
6101
- offset: z.offset + H1
6133
+ offset: z.offset + I1
6102
6134
  }));
6103
6135
  },
6104
6136
  [P, f == null ? void 0 : f.length, x.count]
6105
6137
  ), v1 = $(
6106
6138
  (A) => {
6107
- H(A), !A && F && (_(void 0), L(l1), K(!0)), u == null || u(A);
6139
+ I(A), !A && F && (H(void 0), v(l1), K(!0)), u == null || u(A);
6108
6140
  },
6109
6141
  [u, F]
6110
6142
  );
6111
- G(() => {
6112
- !W.current || P || (I || Z && (j !== x.offset || U !== F || !f)) && (e1({ offset: x.offset, limit: H1, search: F }), I && K(!1));
6113
- }, [I, Z, x.offset, F, j, U, f, P]), G(() => {
6114
- (g || l) && e1(l1), W.current = !0;
6115
- }, []), G(() => {
6116
- h && T((A) => {
6143
+ j(() => {
6144
+ !G.current || P || (O || D && (W !== x.offset || U !== F || !f)) && (e1({ offset: x.offset, limit: I1, search: F }), O && K(!1));
6145
+ }, [O, D, x.offset, F, W, U, f, P]), j(() => {
6146
+ (d || l) && e1(l1), G.current = !0;
6147
+ }, []), j(() => {
6148
+ h && Z((A) => {
6117
6149
  const z = h.filter(
6118
- (w) => !A.some((b) => b.value === w.value)
6150
+ (L) => !A.some((b) => b.value === L.value)
6119
6151
  );
6120
6152
  return [...A, ...z];
6121
6153
  });
@@ -6124,23 +6156,23 @@ const H1 = 100, l1 = {
6124
6156
  (A) => {
6125
6157
  t && t(A);
6126
6158
  let z = [];
6127
- if (d ? z = Array.isArray(A) ? A : [] : z = A ? [A] : [], F) {
6128
- const w = z.filter(
6129
- (b) => !(V != null && V.some((D) => D.value === b))
6159
+ if (g ? z = Array.isArray(A) ? A : [] : z = A ? [A] : [], F) {
6160
+ const L = z.filter(
6161
+ (b) => !(V != null && V.some((B) => B.value === b))
6130
6162
  );
6131
- w.length > 0 && T((b = []) => [
6163
+ L.length > 0 && Z((b = []) => [
6132
6164
  ...b,
6133
- ...w.map((D) => {
6134
- const a1 = f == null ? void 0 : f.find((we) => we.value === D);
6165
+ ...L.map((B) => {
6166
+ const a1 = f == null ? void 0 : f.find((we) => we.value === B);
6135
6167
  return {
6136
- value: D,
6137
- label: (a1 == null ? void 0 : a1.label) ?? D
6168
+ value: B,
6169
+ label: (a1 == null ? void 0 : a1.label) ?? B
6138
6170
  };
6139
6171
  })
6140
- ]), _(void 0), L(l1), K(!0);
6172
+ ]), H(void 0), v(l1), K(!0);
6141
6173
  }
6142
6174
  },
6143
- [t, F, d, f, V]
6175
+ [t, F, g, f, V]
6144
6176
  ), N1 = ve(
6145
6177
  () => ({
6146
6178
  id: n,
@@ -6159,10 +6191,10 @@ const H1 = 100, l1 = {
6159
6191
  extraOptions: V,
6160
6192
  isLoading: P,
6161
6193
  optionRender: p,
6162
- dropdownRender: k,
6163
- readOnly: v,
6194
+ dropdownRender: w,
6195
+ readOnly: k,
6164
6196
  clearable: m,
6165
- required: O,
6197
+ required: _,
6166
6198
  error: M
6167
6199
  }),
6168
6200
  [
@@ -6181,42 +6213,46 @@ const H1 = 100, l1 = {
6181
6213
  V,
6182
6214
  P,
6183
6215
  p,
6216
+ w,
6184
6217
  k,
6185
- v,
6186
6218
  m,
6187
- O,
6219
+ _,
6188
6220
  M
6189
6221
  ]
6190
6222
  );
6191
- return oe(S, () => ({
6223
+ return _1(S, () => ({
6192
6224
  refetchOptions: async () => {
6193
- L(l1), _(void 0), K(!0);
6225
+ v(l1), H(void 0), K(!0);
6194
6226
  }
6195
- })), d ? /* @__PURE__ */ r(K1, { ...N1, value: s, mode: d }) : /* @__PURE__ */ r("div", { className: "snmt-async-select", children: /* @__PURE__ */ r(K1, { ...N1, value: s }) });
6227
+ })), g ? /* @__PURE__ */ r($1, { ...N1, value: s, mode: g }) : /* @__PURE__ */ r("div", { className: "snmt-async-select", children: /* @__PURE__ */ r($1, { ...N1, value: s }) });
6196
6228
  }
6197
6229
  );
6198
6230
  var R1 = /* @__PURE__ */ ((i) => (i.ACTIVE = "Active", i.ARCHIVED = "Archived", i))(R1 || {});
6199
- const j5 = ({ size: i = 30, color: e = "#004ed7" }) => {
6200
- const t = `no-repeat linear-gradient(${e}
6201
- calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, s = {
6202
- width: i,
6203
- background: `${t} 0% 100%, ${t} 50% 100%, ${t} 100% 100%`,
6231
+ const W5 = {
6232
+ small: 20,
6233
+ medium: 28,
6234
+ large: 48
6235
+ }, G5 = ({ size: i = "medium", color: e = "#004ed7" }) => {
6236
+ const t = typeof i == "number" ? i : W5[i], s = `no-repeat linear-gradient(${e}
6237
+ calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, n = {
6238
+ width: t,
6239
+ background: `${s} 0% 100%, ${s} 50% 100%, ${s} 100% 100%`,
6204
6240
  backgroundSize: "20% calc(200% + 20px)"
6205
6241
  };
6206
- return /* @__PURE__ */ r("span", { className: "snmt-loader", style: s });
6242
+ return /* @__PURE__ */ r("span", { className: "snmt-loader", style: n });
6207
6243
  };
6208
- function W5() {
6244
+ function K5() {
6209
6245
  if (console && console.warn) {
6210
6246
  for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
6211
6247
  e[t] = arguments[t];
6212
6248
  n1(e[0]) && (e[0] = `react-i18next:: ${e[0]}`), console.warn(...e);
6213
6249
  }
6214
6250
  }
6215
- const F1 = {};
6216
- function V1() {
6251
+ const Y1 = {};
6252
+ function A1() {
6217
6253
  for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
6218
6254
  e[t] = arguments[t];
6219
- n1(e[0]) && F1[e[0]] || (n1(e[0]) && (F1[e[0]] = /* @__PURE__ */ new Date()), W5(...e));
6255
+ n1(e[0]) && Y1[e[0]] || (n1(e[0]) && (Y1[e[0]] = /* @__PURE__ */ new Date()), K5(...e));
6220
6256
  }
6221
6257
  const ue = (i, e) => () => {
6222
6258
  if (i.isInitialized)
@@ -6229,30 +6265,30 @@ const ue = (i, e) => () => {
6229
6265
  };
6230
6266
  i.on("initialized", t);
6231
6267
  }
6232
- }, Y1 = (i, e, t) => {
6268
+ }, U1 = (i, e, t) => {
6233
6269
  i.loadNamespaces(e, ue(i, t));
6234
- }, U1 = (i, e, t, s) => {
6270
+ }, z1 = (i, e, t, s) => {
6235
6271
  n1(t) && (t = [t]), t.forEach((n) => {
6236
6272
  i.options.ns.indexOf(n) < 0 && i.options.ns.push(n);
6237
6273
  }), i.loadLanguages(e, ue(i, s));
6238
- }, G5 = function(i, e) {
6274
+ }, $5 = function(i, e) {
6239
6275
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6240
6276
  const s = e.languages[0], n = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
6241
6277
  if (s.toLowerCase() === "cimode") return !0;
6242
- const c = (a, d) => {
6243
- const g = e.services.backendConnector.state[`${a}|${d}`];
6244
- return g === -1 || g === 2;
6278
+ const c = (a, g) => {
6279
+ const d = e.services.backendConnector.state[`${a}|${g}`];
6280
+ return d === -1 || d === 2;
6245
6281
  };
6246
6282
  return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !c(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(s, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || c(s, i) && (!n || c(o, i)));
6247
- }, K5 = function(i, e) {
6283
+ }, P5 = function(i, e) {
6248
6284
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6249
- return !e.languages || !e.languages.length ? (V1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
6285
+ return !e.languages || !e.languages.length ? (A1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
6250
6286
  lng: t.lng,
6251
6287
  precheck: (n, o) => {
6252
6288
  if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && n.services.backendConnector.backend && n.isLanguageChangingTo && !o(n.isLanguageChangingTo, i)) return !1;
6253
6289
  }
6254
- }) : G5(i, e, t);
6255
- }, n1 = (i) => typeof i == "string", $5 = (i) => typeof i == "object" && i !== null, P5 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, F5 = {
6290
+ }) : $5(i, e, t);
6291
+ }, n1 = (i) => typeof i == "string", F5 = (i) => typeof i == "object" && i !== null, Y5 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, U5 = {
6256
6292
  "&amp;": "&",
6257
6293
  "&#38;": "&",
6258
6294
  "&lt;": "<",
@@ -6273,8 +6309,8 @@ const ue = (i, e) => () => {
6273
6309
  "&#8230;": "…",
6274
6310
  "&#x2F;": "/",
6275
6311
  "&#47;": "/"
6276
- }, Y5 = (i) => F5[i], U5 = (i) => i.replace(P5, Y5);
6277
- let A1 = {
6312
+ }, z5 = (i) => U5[i], J5 = (i) => i.replace(Y5, z5);
6313
+ let T1 = {
6278
6314
  bindI18n: "languageChanged",
6279
6315
  bindI18nStore: "",
6280
6316
  transEmptyNodeValue: "",
@@ -6282,27 +6318,27 @@ let A1 = {
6282
6318
  transWrapTextNodes: "",
6283
6319
  transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
6284
6320
  useSuspense: !0,
6285
- unescape: U5
6321
+ unescape: J5
6286
6322
  };
6287
- const z5 = function() {
6323
+ const q5 = function() {
6288
6324
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
6289
- A1 = {
6290
- ...A1,
6325
+ T1 = {
6326
+ ...T1,
6291
6327
  ...i
6292
6328
  };
6293
- }, J5 = () => A1;
6329
+ }, Q5 = () => T1;
6294
6330
  let Ce;
6295
- const Q5 = (i) => {
6331
+ const X5 = (i) => {
6296
6332
  Ce = i;
6297
- }, q5 = () => Ce, X5 = {
6333
+ }, ei = () => Ce, ti = {
6298
6334
  type: "3rdParty",
6299
6335
  init(i) {
6300
- z5(i.options.react), Q5(i);
6336
+ q5(i.options.react), X5(i);
6301
6337
  }
6302
- }, ei = d1();
6303
- class ti {
6338
+ }, ii = d1();
6339
+ class si {
6304
6340
  constructor() {
6305
- D1(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces));
6341
+ B1(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces));
6306
6342
  this.usedNamespaces = {};
6307
6343
  }
6308
6344
  addUsedNamespaces(e) {
@@ -6311,62 +6347,62 @@ class ti {
6311
6347
  });
6312
6348
  }
6313
6349
  }
6314
- const ii = (i, e) => {
6315
- const t = X();
6316
- return G(() => {
6350
+ const ni = (i, e) => {
6351
+ const t = q();
6352
+ return j(() => {
6317
6353
  t.current = i;
6318
6354
  }, [i, e]), t.current;
6319
- }, pe = (i, e, t, s) => i.getFixedT(e, t, s), si = (i, e, t, s) => $(pe(i, e, t, s), [i, e, t, s]), ni = function(i) {
6355
+ }, pe = (i, e, t, s) => i.getFixedT(e, t, s), ri = (i, e, t, s) => $(pe(i, e, t, s), [i, e, t, s]), oi = function(i) {
6320
6356
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6321
6357
  const {
6322
6358
  i18n: t
6323
6359
  } = e, {
6324
6360
  i18n: s,
6325
6361
  defaultNS: n
6326
- } = r1(ei) || {}, o = t || s || q5();
6327
- if (o && !o.reportNamespaces && (o.reportNamespaces = new ti()), !o) {
6328
- V1("You will need to pass in an i18next instance by using initReactI18next");
6329
- const f = (x, L) => n1(L) ? L : $5(L) && n1(L.defaultValue) ? L.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, N = [f, {}, !1];
6362
+ } = r1(ii) || {}, o = t || s || ei();
6363
+ if (o && !o.reportNamespaces && (o.reportNamespaces = new si()), !o) {
6364
+ A1("You will need to pass in an i18next instance by using initReactI18next");
6365
+ const f = (x, v) => n1(v) ? v : F5(v) && n1(v.defaultValue) ? v.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, N = [f, {}, !1];
6330
6366
  return N.t = f, N.i18n = {}, N.ready = !1, N;
6331
6367
  }
6332
- o.options.react && o.options.react.wait !== void 0 && V1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
6368
+ o.options.react && o.options.react.wait !== void 0 && A1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
6333
6369
  const c = {
6334
- ...J5(),
6370
+ ...Q5(),
6335
6371
  ...o.options.react,
6336
6372
  ...e
6337
6373
  }, {
6338
6374
  useSuspense: a,
6339
- keyPrefix: d
6375
+ keyPrefix: g
6340
6376
  } = c;
6341
- let g = i;
6342
- g = n1(g) ? [g] : g || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(g);
6343
- const l = (o.isInitialized || o.initializedStoreOnce) && g.every((f) => K5(f, o, c)), h = si(o, e.lng || null, c.nsMode === "fallback" ? g : g[0], d), u = () => h, p = () => pe(o, e.lng || null, c.nsMode === "fallback" ? g : g[0], d), [k, v] = B(u);
6344
- let m = g.join();
6377
+ let d = i;
6378
+ d = n1(d) ? [d] : d || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(d);
6379
+ const l = (o.isInitialized || o.initializedStoreOnce) && d.every((f) => P5(f, o, c)), h = ri(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => pe(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, k] = T(u);
6380
+ let m = d.join();
6345
6381
  e.lng && (m = `${e.lng}${m}`);
6346
- const O = ii(m), M = X(!0);
6347
- G(() => {
6382
+ const _ = ni(m), M = q(!0);
6383
+ j(() => {
6348
6384
  const {
6349
6385
  bindI18n: f,
6350
6386
  bindI18nStore: N
6351
6387
  } = c;
6352
- M.current = !0, !l && !a && (e.lng ? U1(o, e.lng, g, () => {
6353
- M.current && v(p);
6354
- }) : Y1(o, g, () => {
6355
- M.current && v(p);
6356
- })), l && O && O !== m && M.current && v(p);
6388
+ M.current = !0, !l && !a && (e.lng ? z1(o, e.lng, d, () => {
6389
+ M.current && k(p);
6390
+ }) : U1(o, d, () => {
6391
+ M.current && k(p);
6392
+ })), l && _ && _ !== m && M.current && k(p);
6357
6393
  const x = () => {
6358
- M.current && v(p);
6394
+ M.current && k(p);
6359
6395
  };
6360
6396
  return f && o && o.on(f, x), N && o && o.store.on(N, x), () => {
6361
- M.current = !1, f && o && f.split(" ").forEach((L) => o.off(L, x)), N && o && N.split(" ").forEach((L) => o.store.off(L, x));
6397
+ M.current = !1, f && o && f.split(" ").forEach((v) => o.off(v, x)), N && o && N.split(" ").forEach((v) => o.store.off(v, x));
6362
6398
  };
6363
- }, [o, m]), G(() => {
6364
- M.current && l && v(u);
6365
- }, [o, d, l]);
6366
- const S = [k, o, l];
6367
- if (S.t = k, S.i18n = o, S.ready = l, l || !l && !a) return S;
6399
+ }, [o, m]), j(() => {
6400
+ M.current && l && k(u);
6401
+ }, [o, g, l]);
6402
+ const S = [w, o, l];
6403
+ if (S.t = w, S.i18n = o, S.ready = l, l || !l && !a) return S;
6368
6404
  throw new Promise((f) => {
6369
- e.lng ? U1(o, e.lng, g, () => f()) : Y1(o, g, () => f());
6405
+ e.lng ? z1(o, e.lng, d, () => f()) : U1(o, d, () => f());
6370
6406
  });
6371
6407
  }, R = (i) => typeof i == "string", C1 = () => {
6372
6408
  let i, e;
@@ -6374,23 +6410,23 @@ const ii = (i, e) => {
6374
6410
  i = s, e = n;
6375
6411
  });
6376
6412
  return t.resolve = i, t.reject = e, t;
6377
- }, z1 = (i) => i == null ? "" : "" + i, ri = (i, e, t) => {
6413
+ }, J1 = (i) => i == null ? "" : "" + i, ai = (i, e, t) => {
6378
6414
  i.forEach((s) => {
6379
6415
  e[s] && (t[s] = e[s]);
6380
6416
  });
6381
- }, oi = /###/g, J1 = (i) => i && i.indexOf("###") > -1 ? i.replace(oi, ".") : i, Q1 = (i) => !i || R(i), m1 = (i, e, t) => {
6417
+ }, li = /###/g, q1 = (i) => i && i.indexOf("###") > -1 ? i.replace(li, ".") : i, Q1 = (i) => !i || R(i), m1 = (i, e, t) => {
6382
6418
  const s = R(e) ? e.split(".") : e;
6383
6419
  let n = 0;
6384
6420
  for (; n < s.length - 1; ) {
6385
6421
  if (Q1(i)) return {};
6386
- const o = J1(s[n]);
6422
+ const o = q1(s[n]);
6387
6423
  !i[o] && t && (i[o] = new t()), Object.prototype.hasOwnProperty.call(i, o) ? i = i[o] : i = {}, ++n;
6388
6424
  }
6389
6425
  return Q1(i) ? {} : {
6390
6426
  obj: i,
6391
- k: J1(s[n])
6427
+ k: q1(s[n])
6392
6428
  };
6393
- }, q1 = (i, e, t) => {
6429
+ }, X1 = (i, e, t) => {
6394
6430
  const {
6395
6431
  obj: s,
6396
6432
  k: n
@@ -6403,7 +6439,7 @@ const ii = (i, e) => {
6403
6439
  for (; a.obj === void 0 && c.length; )
6404
6440
  o = `${c[c.length - 1]}.${o}`, c = c.slice(0, c.length - 1), a = m1(i, c, Object), a && a.obj && typeof a.obj[`${a.k}.${o}`] < "u" && (a.obj = void 0);
6405
6441
  a.obj[`${a.k}.${o}`] = t;
6406
- }, ai = (i, e, t, s) => {
6442
+ }, hi = (i, e, t, s) => {
6407
6443
  const {
6408
6444
  obj: n,
6409
6445
  k: o
@@ -6416,7 +6452,7 @@ const ii = (i, e) => {
6416
6452
  } = m1(i, e);
6417
6453
  if (t)
6418
6454
  return t[s];
6419
- }, li = (i, e, t) => {
6455
+ }, ci = (i, e, t) => {
6420
6456
  const s = M1(i, t);
6421
6457
  return s !== void 0 ? s : M1(e, t);
6422
6458
  }, fe = (i, e, t) => {
@@ -6424,7 +6460,7 @@ const ii = (i, e) => {
6424
6460
  s !== "__proto__" && s !== "constructor" && (s in i ? R(i[s]) || i[s] instanceof String || R(e[s]) || e[s] instanceof String ? t && (i[s] = e[s]) : fe(i[s], e[s], t) : i[s] = e[s]);
6425
6461
  return i;
6426
6462
  }, h1 = (i) => i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
6427
- var hi = {
6463
+ var di = {
6428
6464
  "&": "&amp;",
6429
6465
  "<": "&lt;",
6430
6466
  ">": "&gt;",
@@ -6432,8 +6468,8 @@ var hi = {
6432
6468
  "'": "&#39;",
6433
6469
  "/": "&#x2F;"
6434
6470
  };
6435
- const ci = (i) => R(i) ? i.replace(/[&<>"'\/]/g, (e) => hi[e]) : i;
6436
- class di {
6471
+ const gi = (i) => R(i) ? i.replace(/[&<>"'\/]/g, (e) => di[e]) : i;
6472
+ class ui {
6437
6473
  constructor(e) {
6438
6474
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
6439
6475
  }
@@ -6445,18 +6481,18 @@ class di {
6445
6481
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, s), this.regExpQueue.push(e), s;
6446
6482
  }
6447
6483
  }
6448
- const gi = [" ", ",", "?", "!", ";"], ui = new di(20), Ci = (i, e, t) => {
6484
+ const Ci = [" ", ",", "?", "!", ";"], pi = new ui(20), fi = (i, e, t) => {
6449
6485
  e = e || "", t = t || "";
6450
- const s = gi.filter((c) => e.indexOf(c) < 0 && t.indexOf(c) < 0);
6486
+ const s = Ci.filter((c) => e.indexOf(c) < 0 && t.indexOf(c) < 0);
6451
6487
  if (s.length === 0) return !0;
6452
- const n = ui.getRegExp(`(${s.map((c) => c === "?" ? "\\?" : c).join("|")})`);
6488
+ const n = pi.getRegExp(`(${s.map((c) => c === "?" ? "\\?" : c).join("|")})`);
6453
6489
  let o = !n.test(i);
6454
6490
  if (!o) {
6455
6491
  const c = i.indexOf(t);
6456
6492
  c > 0 && !n.test(i.substring(0, c)) && (o = !0);
6457
6493
  }
6458
6494
  return o;
6459
- }, T1 = function(i, e) {
6495
+ }, Z1 = function(i, e) {
6460
6496
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
6461
6497
  if (!i) return;
6462
6498
  if (i[e]) return i[e];
@@ -6466,17 +6502,17 @@ const gi = [" ", ",", "?", "!", ";"], ui = new di(20), Ci = (i, e, t) => {
6466
6502
  if (!n || typeof n != "object")
6467
6503
  return;
6468
6504
  let c, a = "";
6469
- for (let d = o; d < s.length; ++d)
6470
- if (d !== o && (a += t), a += s[d], c = n[a], c !== void 0) {
6471
- if (["string", "number", "boolean"].indexOf(typeof c) > -1 && d < s.length - 1)
6505
+ for (let g = o; g < s.length; ++g)
6506
+ if (g !== o && (a += t), a += s[g], c = n[a], c !== void 0) {
6507
+ if (["string", "number", "boolean"].indexOf(typeof c) > -1 && g < s.length - 1)
6472
6508
  continue;
6473
- o += d - o + 1;
6509
+ o += g - o + 1;
6474
6510
  break;
6475
6511
  }
6476
6512
  n = c;
6477
6513
  }
6478
6514
  return n;
6479
- }, b1 = (i) => i && i.replace("_", "-"), pi = {
6515
+ }, b1 = (i) => i && i.replace("_", "-"), mi = {
6480
6516
  type: "logger",
6481
6517
  log(i) {
6482
6518
  this.output("log", i);
@@ -6498,7 +6534,7 @@ class y1 {
6498
6534
  }
6499
6535
  init(e) {
6500
6536
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6501
- this.prefix = t.prefix || "i18next:", this.logger = e || pi, this.options = t, this.debug = t.debug;
6537
+ this.prefix = t.prefix || "i18next:", this.logger = e || mi, this.options = t, this.debug = t.debug;
6502
6538
  }
6503
6539
  log() {
6504
6540
  for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
@@ -6533,8 +6569,8 @@ class y1 {
6533
6569
  return e = e || this.options, e.prefix = e.prefix || this.prefix, new y1(this.logger, e);
6534
6570
  }
6535
6571
  }
6536
- var q = new y1();
6537
- class _1 {
6572
+ var X = new y1();
6573
+ class H1 {
6538
6574
  constructor() {
6539
6575
  this.observers = {};
6540
6576
  }
@@ -6558,17 +6594,17 @@ class _1 {
6558
6594
  for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
6559
6595
  s[n - 1] = arguments[n];
6560
6596
  this.observers[e] && Array.from(this.observers[e].entries()).forEach((c) => {
6561
- let [a, d] = c;
6562
- for (let g = 0; g < d; g++)
6597
+ let [a, g] = c;
6598
+ for (let d = 0; d < g; d++)
6563
6599
  a(...s);
6564
6600
  }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((c) => {
6565
- let [a, d] = c;
6566
- for (let g = 0; g < d; g++)
6601
+ let [a, g] = c;
6602
+ for (let d = 0; d < g; d++)
6567
6603
  a.apply(a, [e, ...s]);
6568
6604
  });
6569
6605
  }
6570
6606
  }
6571
- class X1 extends _1 {
6607
+ class ee extends H1 {
6572
6608
  constructor(e) {
6573
6609
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
6574
6610
  ns: ["translation"],
@@ -6588,8 +6624,8 @@ class X1 extends _1 {
6588
6624
  const o = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, c = n.ignoreJSONStructure !== void 0 ? n.ignoreJSONStructure : this.options.ignoreJSONStructure;
6589
6625
  let a;
6590
6626
  e.indexOf(".") > -1 ? a = e.split(".") : (a = [e, t], s && (Array.isArray(s) ? a.push(...s) : R(s) && o ? a.push(...s.split(o)) : a.push(s)));
6591
- const d = M1(this.data, a);
6592
- return !d && !t && !s && e.indexOf(".") > -1 && (e = a[0], t = a[1], s = a.slice(2).join(".")), d || !c || !R(s) ? d : T1(this.data && this.data[e] && this.data[e][t], s, o);
6627
+ const g = M1(this.data, a);
6628
+ return !g && !t && !s && e.indexOf(".") > -1 && (e = a[0], t = a[1], s = a.slice(2).join(".")), g || !c || !R(s) ? g : Z1(this.data && this.data[e] && this.data[e][t], s, o);
6593
6629
  }
6594
6630
  addResource(e, t, s, n) {
6595
6631
  let o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -6597,7 +6633,7 @@ class X1 extends _1 {
6597
6633
  };
6598
6634
  const c = o.keySeparator !== void 0 ? o.keySeparator : this.options.keySeparator;
6599
6635
  let a = [e, t];
6600
- s && (a = a.concat(c ? s.split(c) : s)), e.indexOf(".") > -1 && (a = e.split("."), n = t, t = a[1]), this.addNamespaces(t), q1(this.data, a, n), o.silent || this.emit("added", e, t, s, n);
6636
+ s && (a = a.concat(c ? s.split(c) : s)), e.indexOf(".") > -1 && (a = e.split("."), n = t, t = a[1]), this.addNamespaces(t), X1(this.data, a, n), o.silent || this.emit("added", e, t, s, n);
6601
6637
  }
6602
6638
  addResources(e, t, s) {
6603
6639
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
@@ -6615,11 +6651,11 @@ class X1 extends _1 {
6615
6651
  skipCopy: !1
6616
6652
  }, a = [e, t];
6617
6653
  e.indexOf(".") > -1 && (a = e.split("."), n = s, s = t, t = a[1]), this.addNamespaces(t);
6618
- let d = M1(this.data, a) || {};
6619
- c.skipCopy || (s = JSON.parse(JSON.stringify(s))), n ? fe(d, s, o) : d = {
6620
- ...d,
6654
+ let g = M1(this.data, a) || {};
6655
+ c.skipCopy || (s = JSON.parse(JSON.stringify(s))), n ? fe(g, s, o) : g = {
6656
+ ...g,
6621
6657
  ...s
6622
- }, q1(this.data, a, d), c.silent || this.emit("added", e, t, s);
6658
+ }, X1(this.data, a, g), c.silent || this.emit("added", e, t, s);
6623
6659
  }
6624
6660
  removeResourceBundle(e, t) {
6625
6661
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -6654,11 +6690,11 @@ var me = {
6654
6690
  }), e;
6655
6691
  }
6656
6692
  };
6657
- const ee = {};
6658
- class E1 extends _1 {
6693
+ const te = {};
6694
+ class E1 extends H1 {
6659
6695
  constructor(e) {
6660
6696
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6661
- super(), ri(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = q.create("translator");
6697
+ super(), ai(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = X.create("translator");
6662
6698
  }
6663
6699
  changeLanguage(e) {
6664
6700
  e && (this.language = e);
@@ -6677,16 +6713,16 @@ class E1 extends _1 {
6677
6713
  s === void 0 && (s = ":");
6678
6714
  const n = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
6679
6715
  let o = t.ns || this.options.defaultNS || [];
6680
- const c = s && e.indexOf(s) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ci(e, s, n);
6716
+ const c = s && e.indexOf(s) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !fi(e, s, n);
6681
6717
  if (c && !a) {
6682
- const d = e.match(this.interpolator.nestingRegexp);
6683
- if (d && d.length > 0)
6718
+ const g = e.match(this.interpolator.nestingRegexp);
6719
+ if (g && g.length > 0)
6684
6720
  return {
6685
6721
  key: e,
6686
6722
  namespaces: R(o) ? [o] : o
6687
6723
  };
6688
- const g = e.split(s);
6689
- (s !== n || s === n && this.options.ns.indexOf(g[0]) > -1) && (o = g.shift()), e = g.join(n);
6724
+ const d = e.split(s);
6725
+ (s !== n || s === n && this.options.ns.indexOf(d[0]) > -1) && (o = d.shift()), e = d.join(n);
6690
6726
  }
6691
6727
  return {
6692
6728
  key: e,
@@ -6701,32 +6737,32 @@ class E1 extends _1 {
6701
6737
  const n = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, o = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
6702
6738
  key: c,
6703
6739
  namespaces: a
6704
- } = this.extractFromKey(e[e.length - 1], t), d = a[a.length - 1], g = t.lng || this.language, l = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
6705
- if (g && g.toLowerCase() === "cimode") {
6740
+ } = this.extractFromKey(e[e.length - 1], t), g = a[a.length - 1], d = t.lng || this.language, l = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
6741
+ if (d && d.toLowerCase() === "cimode") {
6706
6742
  if (l) {
6707
6743
  const f = t.nsSeparator || this.options.nsSeparator;
6708
6744
  return n ? {
6709
- res: `${d}${f}${c}`,
6745
+ res: `${g}${f}${c}`,
6710
6746
  usedKey: c,
6711
6747
  exactUsedKey: c,
6712
- usedLng: g,
6713
- usedNS: d,
6748
+ usedLng: d,
6749
+ usedNS: g,
6714
6750
  usedParams: this.getUsedParamsDetails(t)
6715
- } : `${d}${f}${c}`;
6751
+ } : `${g}${f}${c}`;
6716
6752
  }
6717
6753
  return n ? {
6718
6754
  res: c,
6719
6755
  usedKey: c,
6720
6756
  exactUsedKey: c,
6721
- usedLng: g,
6722
- usedNS: d,
6757
+ usedLng: d,
6758
+ usedNS: g,
6723
6759
  usedParams: this.getUsedParamsDetails(t)
6724
6760
  } : c;
6725
6761
  }
6726
6762
  const h = this.resolve(e, t);
6727
6763
  let u = h && h.res;
6728
- const p = h && h.usedKey || c, k = h && h.exactUsedKey || c, v = Object.prototype.toString.apply(u), m = ["[object Number]", "[object Function]", "[object RegExp]"], O = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, M = !this.i18nFormat || this.i18nFormat.handleAsObject, S = !R(u) && typeof u != "boolean" && typeof u != "number";
6729
- if (M && u && S && m.indexOf(v) < 0 && !(R(O) && Array.isArray(u))) {
6764
+ const p = h && h.usedKey || c, w = h && h.exactUsedKey || c, k = Object.prototype.toString.apply(u), m = ["[object Number]", "[object Function]", "[object RegExp]"], _ = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, M = !this.i18nFormat || this.i18nFormat.handleAsObject, S = !R(u) && typeof u != "boolean" && typeof u != "number";
6765
+ if (M && u && S && m.indexOf(k) < 0 && !(R(_) && Array.isArray(u))) {
6730
6766
  if (!t.returnObjects && !this.options.returnObjects) {
6731
6767
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
6732
6768
  const f = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(p, u, {
@@ -6736,53 +6772,53 @@ class E1 extends _1 {
6736
6772
  return n ? (h.res = f, h.usedParams = this.getUsedParamsDetails(t), h) : f;
6737
6773
  }
6738
6774
  if (o) {
6739
- const f = Array.isArray(u), N = f ? [] : {}, x = f ? k : p;
6740
- for (const L in u)
6741
- if (Object.prototype.hasOwnProperty.call(u, L)) {
6742
- const P = `${x}${o}${L}`;
6743
- N[L] = this.translate(P, {
6775
+ const f = Array.isArray(u), N = f ? [] : {}, x = f ? w : p;
6776
+ for (const v in u)
6777
+ if (Object.prototype.hasOwnProperty.call(u, v)) {
6778
+ const P = `${x}${o}${v}`;
6779
+ N[v] = this.translate(P, {
6744
6780
  ...t,
6745
6781
  joinArrays: !1,
6746
6782
  ns: a
6747
- }), N[L] === P && (N[L] = u[L]);
6783
+ }), N[v] === P && (N[v] = u[v]);
6748
6784
  }
6749
6785
  u = N;
6750
6786
  }
6751
- } else if (M && R(O) && Array.isArray(u))
6752
- u = u.join(O), u && (u = this.extendTranslation(u, e, t, s));
6787
+ } else if (M && R(_) && Array.isArray(u))
6788
+ u = u.join(_), u && (u = this.extendTranslation(u, e, t, s));
6753
6789
  else {
6754
6790
  let f = !1, N = !1;
6755
- const x = t.count !== void 0 && !R(t.count), L = E1.hasDefaultValue(t), P = x ? this.pluralResolver.getSuffix(g, t.count, t) : "", J = t.ordinal && x ? this.pluralResolver.getSuffix(g, t.count, {
6791
+ const x = t.count !== void 0 && !R(t.count), v = E1.hasDefaultValue(t), P = x ? this.pluralResolver.getSuffix(d, t.count, t) : "", J = t.ordinal && x ? this.pluralResolver.getSuffix(d, t.count, {
6756
6792
  ordinal: !1
6757
- }) : "", F = x && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), _ = F && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${P}`] || t[`defaultValue${J}`] || t.defaultValue;
6758
- !this.isValidLookup(u) && L && (f = !0, u = _), this.isValidLookup(u) || (N = !0, u = c);
6759
- const H = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && N ? void 0 : u, V = L && _ !== u && this.options.updateMissing;
6793
+ }) : "", F = x && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), H = F && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${P}`] || t[`defaultValue${J}`] || t.defaultValue;
6794
+ !this.isValidLookup(u) && v && (f = !0, u = H), this.isValidLookup(u) || (N = !0, u = c);
6795
+ const I = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && N ? void 0 : u, V = v && H !== u && this.options.updateMissing;
6760
6796
  if (N || f || V) {
6761
- if (this.logger.log(V ? "updateKey" : "missingKey", g, d, c, V ? _ : u), o) {
6762
- const I = this.resolve(c, {
6797
+ if (this.logger.log(V ? "updateKey" : "missingKey", d, g, c, V ? H : u), o) {
6798
+ const O = this.resolve(c, {
6763
6799
  ...t,
6764
6800
  keySeparator: !1
6765
6801
  });
6766
- I && I.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
6767
- }
6768
- let T = [];
6769
- const j = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
6770
- if (this.options.saveMissingTo === "fallback" && j && j[0])
6771
- for (let I = 0; I < j.length; I++)
6772
- T.push(j[I]);
6773
- else this.options.saveMissingTo === "all" ? T = this.languageUtils.toResolveHierarchy(t.lng || this.language) : T.push(t.lng || this.language);
6774
- const U = (I, K, W) => {
6775
- const e1 = L && W !== u ? W : H;
6776
- this.options.missingKeyHandler ? this.options.missingKeyHandler(I, d, K, e1, V, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(I, d, K, e1, V, t), this.emit("missingKey", I, d, K, u);
6802
+ O && O.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
6803
+ }
6804
+ let Z = [];
6805
+ const W = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
6806
+ if (this.options.saveMissingTo === "fallback" && W && W[0])
6807
+ for (let O = 0; O < W.length; O++)
6808
+ Z.push(W[O]);
6809
+ else this.options.saveMissingTo === "all" ? Z = this.languageUtils.toResolveHierarchy(t.lng || this.language) : Z.push(t.lng || this.language);
6810
+ const U = (O, K, G) => {
6811
+ const e1 = v && G !== u ? G : I;
6812
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(O, g, K, e1, V, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(O, g, K, e1, V, t), this.emit("missingKey", O, g, K, u);
6777
6813
  };
6778
- this.options.saveMissing && (this.options.saveMissingPlurals && x ? T.forEach((I) => {
6779
- const K = this.pluralResolver.getSuffixes(I, t);
6780
- F && t[`defaultValue${this.options.pluralSeparator}zero`] && K.indexOf(`${this.options.pluralSeparator}zero`) < 0 && K.push(`${this.options.pluralSeparator}zero`), K.forEach((W) => {
6781
- U([I], c + W, t[`defaultValue${W}`] || _);
6814
+ this.options.saveMissing && (this.options.saveMissingPlurals && x ? Z.forEach((O) => {
6815
+ const K = this.pluralResolver.getSuffixes(O, t);
6816
+ F && t[`defaultValue${this.options.pluralSeparator}zero`] && K.indexOf(`${this.options.pluralSeparator}zero`) < 0 && K.push(`${this.options.pluralSeparator}zero`), K.forEach((G) => {
6817
+ U([O], c + G, t[`defaultValue${G}`] || H);
6782
6818
  });
6783
- }) : U(T, c, _));
6819
+ }) : U(Z, c, H));
6784
6820
  }
6785
- u = this.extendTranslation(u, e, t, h, s), N && u === c && this.options.appendNamespaceToMissingKey && (u = `${d}:${c}`), (N || f) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? u = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${d}:${c}` : c, f ? u : void 0) : u = this.options.parseMissingKeyHandler(u));
6821
+ u = this.extendTranslation(u, e, t, h, s), N && u === c && this.options.appendNamespaceToMissingKey && (u = `${g}:${c}`), (N || f) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? u = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${g}:${c}` : c, f ? u : void 0) : u = this.options.parseMissingKeyHandler(u));
6786
6822
  }
6787
6823
  return n ? (h.res = u, h.usedParams = this.getUsedParamsDetails(t), h) : u;
6788
6824
  }
@@ -6803,9 +6839,9 @@ class E1 extends _1 {
6803
6839
  ...s.interpolation
6804
6840
  }
6805
6841
  });
6806
- const g = R(e) && (s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
6842
+ const d = R(e) && (s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
6807
6843
  let l;
6808
- if (g) {
6844
+ if (d) {
6809
6845
  const u = e.match(this.interpolator.nestingRegexp);
6810
6846
  l = u && u.length;
6811
6847
  }
@@ -6813,18 +6849,18 @@ class E1 extends _1 {
6813
6849
  if (this.options.interpolation.defaultVariables && (h = {
6814
6850
  ...this.options.interpolation.defaultVariables,
6815
6851
  ...h
6816
- }), e = this.interpolator.interpolate(e, h, s.lng || this.language || n.usedLng, s), g) {
6852
+ }), e = this.interpolator.interpolate(e, h, s.lng || this.language || n.usedLng, s), d) {
6817
6853
  const u = e.match(this.interpolator.nestingRegexp), p = u && u.length;
6818
6854
  l < p && (s.nest = !1);
6819
6855
  }
6820
6856
  !s.lng && this.options.compatibilityAPI !== "v1" && n && n.res && (s.lng = this.language || n.usedLng), s.nest !== !1 && (e = this.interpolator.nest(e, function() {
6821
- for (var u = arguments.length, p = new Array(u), k = 0; k < u; k++)
6822
- p[k] = arguments[k];
6857
+ for (var u = arguments.length, p = new Array(u), w = 0; w < u; w++)
6858
+ p[w] = arguments[w];
6823
6859
  return o && o[0] === p[0] && !s.context ? (c.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`), null) : c.translate(...p, t);
6824
6860
  }, s)), s.interpolation && this.interpolator.reset();
6825
6861
  }
6826
- const a = s.postProcess || this.options.postProcess, d = R(a) ? [a] : a;
6827
- return e != null && d && d.length && s.applyPostProcessor !== !1 && (e = me.handle(d, e, t, this.options && this.options.postProcessPassResolved ? {
6862
+ const a = s.postProcess || this.options.postProcess, g = R(a) ? [a] : a;
6863
+ return e != null && g && g.length && s.applyPostProcessor !== !1 && (e = me.handle(g, e, t, this.options && this.options.postProcessPassResolved ? {
6828
6864
  i18nResolved: {
6829
6865
  ...n,
6830
6866
  usedParams: this.getUsedParamsDetails(s)
@@ -6834,32 +6870,32 @@ class E1 extends _1 {
6834
6870
  }
6835
6871
  resolve(e) {
6836
6872
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, n, o, c, a;
6837
- return R(e) && (e = [e]), e.forEach((d) => {
6873
+ return R(e) && (e = [e]), e.forEach((g) => {
6838
6874
  if (this.isValidLookup(s)) return;
6839
- const g = this.extractFromKey(d, t), l = g.key;
6875
+ const d = this.extractFromKey(g, t), l = d.key;
6840
6876
  n = l;
6841
- let h = g.namespaces;
6877
+ let h = d.namespaces;
6842
6878
  this.options.fallbackNS && (h = h.concat(this.options.fallbackNS));
6843
- const u = t.count !== void 0 && !R(t.count), p = u && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), k = t.context !== void 0 && (R(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
6879
+ const u = t.count !== void 0 && !R(t.count), p = u && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), w = t.context !== void 0 && (R(t.context) || typeof t.context == "number") && t.context !== "", k = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
6844
6880
  h.forEach((m) => {
6845
- this.isValidLookup(s) || (a = m, !ee[`${v[0]}-${m}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(a) && (ee[`${v[0]}-${m}`] = !0, this.logger.warn(`key "${n}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), v.forEach((O) => {
6881
+ this.isValidLookup(s) || (a = m, !te[`${k[0]}-${m}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(a) && (te[`${k[0]}-${m}`] = !0, this.logger.warn(`key "${n}" for languages "${k.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), k.forEach((_) => {
6846
6882
  if (this.isValidLookup(s)) return;
6847
- c = O;
6883
+ c = _;
6848
6884
  const M = [l];
6849
6885
  if (this.i18nFormat && this.i18nFormat.addLookupKeys)
6850
- this.i18nFormat.addLookupKeys(M, l, O, m, t);
6886
+ this.i18nFormat.addLookupKeys(M, l, _, m, t);
6851
6887
  else {
6852
6888
  let f;
6853
- u && (f = this.pluralResolver.getSuffix(O, t.count, t));
6889
+ u && (f = this.pluralResolver.getSuffix(_, t.count, t));
6854
6890
  const N = `${this.options.pluralSeparator}zero`, x = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
6855
- if (u && (M.push(l + f), t.ordinal && f.indexOf(x) === 0 && M.push(l + f.replace(x, this.options.pluralSeparator)), p && M.push(l + N)), k) {
6856
- const L = `${l}${this.options.contextSeparator}${t.context}`;
6857
- M.push(L), u && (M.push(L + f), t.ordinal && f.indexOf(x) === 0 && M.push(L + f.replace(x, this.options.pluralSeparator)), p && M.push(L + N));
6891
+ if (u && (M.push(l + f), t.ordinal && f.indexOf(x) === 0 && M.push(l + f.replace(x, this.options.pluralSeparator)), p && M.push(l + N)), w) {
6892
+ const v = `${l}${this.options.contextSeparator}${t.context}`;
6893
+ M.push(v), u && (M.push(v + f), t.ordinal && f.indexOf(x) === 0 && M.push(v + f.replace(x, this.options.pluralSeparator)), p && M.push(v + N));
6858
6894
  }
6859
6895
  }
6860
6896
  let S;
6861
6897
  for (; S = M.pop(); )
6862
- this.isValidLookup(s) || (o = S, s = this.getResource(O, m, S, t));
6898
+ this.isValidLookup(s) || (o = S, s = this.getResource(_, m, S, t));
6863
6899
  }));
6864
6900
  });
6865
6901
  }), {
@@ -6901,10 +6937,10 @@ class E1 extends _1 {
6901
6937
  return !1;
6902
6938
  }
6903
6939
  }
6904
- const I1 = (i) => i.charAt(0).toUpperCase() + i.slice(1);
6905
- class te {
6940
+ const O1 = (i) => i.charAt(0).toUpperCase() + i.slice(1);
6941
+ class ie {
6906
6942
  constructor(e) {
6907
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = q.create("languageUtils");
6943
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = X.create("languageUtils");
6908
6944
  }
6909
6945
  getScriptPartFromCode(e) {
6910
6946
  if (e = b1(e), !e || e.indexOf("-") < 0) return null;
@@ -6926,7 +6962,7 @@ class te {
6926
6962
  }
6927
6963
  const t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
6928
6964
  let s = e.split("-");
6929
- return this.options.lowerCaseLng ? s = s.map((n) => n.toLowerCase()) : s.length === 2 ? (s[0] = s[0].toLowerCase(), s[1] = s[1].toUpperCase(), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] = I1(s[1].toLowerCase()))) : s.length === 3 && (s[0] = s[0].toLowerCase(), s[1].length === 2 && (s[1] = s[1].toUpperCase()), s[0] !== "sgn" && s[2].length === 2 && (s[2] = s[2].toUpperCase()), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] = I1(s[1].toLowerCase())), t.indexOf(s[2].toLowerCase()) > -1 && (s[2] = I1(s[2].toLowerCase()))), s.join("-");
6965
+ return this.options.lowerCaseLng ? s = s.map((n) => n.toLowerCase()) : s.length === 2 ? (s[0] = s[0].toLowerCase(), s[1] = s[1].toUpperCase(), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] = O1(s[1].toLowerCase()))) : s.length === 3 && (s[0] = s[0].toLowerCase(), s[1].length === 2 && (s[1] = s[1].toUpperCase()), s[0] !== "sgn" && s[2].length === 2 && (s[2] = s[2].toUpperCase()), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] = O1(s[1].toLowerCase())), t.indexOf(s[2].toLowerCase()) > -1 && (s[2] = O1(s[2].toLowerCase()))), s.join("-");
6930
6966
  }
6931
6967
  return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
6932
6968
  }
@@ -6967,7 +7003,7 @@ class te {
6967
7003
  }), n;
6968
7004
  }
6969
7005
  }
6970
- let fi = [{
7006
+ let wi = [{
6971
7007
  lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
6972
7008
  nr: [1, 2],
6973
7009
  fc: 1
@@ -7059,7 +7095,7 @@ let fi = [{
7059
7095
  lngs: ["he", "iw"],
7060
7096
  nr: [1, 2, 20, 21],
7061
7097
  fc: 22
7062
- }], mi = {
7098
+ }], ki = {
7063
7099
  1: (i) => +(i > 1),
7064
7100
  2: (i) => +(i != 1),
7065
7101
  3: (i) => 0,
@@ -7083,28 +7119,28 @@ let fi = [{
7083
7119
  21: (i) => i % 100 == 1 ? 1 : i % 100 == 2 ? 2 : i % 100 == 3 || i % 100 == 4 ? 3 : 0,
7084
7120
  22: (i) => i == 1 ? 0 : i == 2 ? 1 : (i < 0 || i > 10) && i % 10 == 0 ? 2 : 3
7085
7121
  };
7086
- const wi = ["v1", "v2", "v3"], ki = ["v4"], ie = {
7122
+ const Li = ["v1", "v2", "v3"], vi = ["v4"], se = {
7087
7123
  zero: 0,
7088
7124
  one: 1,
7089
7125
  two: 2,
7090
7126
  few: 3,
7091
7127
  many: 4,
7092
7128
  other: 5
7093
- }, Li = () => {
7129
+ }, Ni = () => {
7094
7130
  const i = {};
7095
- return fi.forEach((e) => {
7131
+ return wi.forEach((e) => {
7096
7132
  e.lngs.forEach((t) => {
7097
7133
  i[t] = {
7098
7134
  numbers: e.nr,
7099
- plurals: mi[e.fc]
7135
+ plurals: ki[e.fc]
7100
7136
  };
7101
7137
  });
7102
7138
  }), i;
7103
7139
  };
7104
- class vi {
7140
+ class xi {
7105
7141
  constructor(e) {
7106
7142
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
7107
- this.languageUtils = e, this.options = t, this.logger = q.create("pluralResolver"), (!this.options.compatibilityJSON || ki.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = Li(), this.pluralRulesCache = {};
7143
+ this.languageUtils = e, this.options = t, this.logger = X.create("pluralResolver"), (!this.options.compatibilityJSON || vi.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = Ni(), this.pluralRulesCache = {};
7108
7144
  }
7109
7145
  addRule(e, t) {
7110
7146
  this.rules[e] = t;
@@ -7128,8 +7164,8 @@ class vi {
7128
7164
  });
7129
7165
  } catch {
7130
7166
  if (!e.match(/-|_/)) return;
7131
- const d = this.languageUtils.getLanguagePartFromCode(e);
7132
- c = this.getRule(d, t);
7167
+ const g = this.languageUtils.getLanguagePartFromCode(e);
7168
+ c = this.getRule(g, t);
7133
7169
  }
7134
7170
  return this.pluralRulesCache[o] = c, c;
7135
7171
  }
@@ -7147,7 +7183,7 @@ class vi {
7147
7183
  getSuffixes(e) {
7148
7184
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
7149
7185
  const s = this.getRule(e, t);
7150
- return s ? this.shouldUseIntlApi() ? s.resolvedOptions().pluralCategories.sort((n, o) => ie[n] - ie[o]).map((n) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${n}`) : s.numbers.map((n) => this.getSuffix(e, n, t)) : [];
7186
+ return s ? this.shouldUseIntlApi() ? s.resolvedOptions().pluralCategories.sort((n, o) => se[n] - se[o]).map((n) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${n}`) : s.numbers.map((n) => this.getSuffix(e, n, t)) : [];
7151
7187
  }
7152
7188
  getSuffix(e, t) {
7153
7189
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
@@ -7162,17 +7198,17 @@ class vi {
7162
7198
  return this.options.compatibilityJSON === "v1" ? n === 1 ? "" : typeof n == "number" ? `_plural_${n.toString()}` : o() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? o() : this.options.prepend && s.toString() ? this.options.prepend + s.toString() : s.toString();
7163
7199
  }
7164
7200
  shouldUseIntlApi() {
7165
- return !wi.includes(this.options.compatibilityJSON);
7201
+ return !Li.includes(this.options.compatibilityJSON);
7166
7202
  }
7167
7203
  }
7168
- const se = function(i, e, t) {
7169
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = li(i, e, t);
7170
- return !o && n && R(t) && (o = T1(i, t, s), o === void 0 && (o = T1(e, t, s))), o;
7171
- }, O1 = (i) => i.replace(/\$/g, "$$$$");
7172
- class Ni {
7204
+ const ne = function(i, e, t) {
7205
+ let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = ci(i, e, t);
7206
+ return !o && n && R(t) && (o = Z1(i, t, s), o === void 0 && (o = Z1(e, t, s))), o;
7207
+ }, S1 = (i) => i.replace(/\$/g, "$$$$");
7208
+ class Ri {
7173
7209
  constructor() {
7174
7210
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
7175
- this.logger = q.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
7211
+ this.logger = X.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
7176
7212
  }
7177
7213
  init() {
7178
7214
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -7186,19 +7222,19 @@ class Ni {
7186
7222
  prefix: o,
7187
7223
  prefixEscaped: c,
7188
7224
  suffix: a,
7189
- suffixEscaped: d,
7190
- formatSeparator: g,
7225
+ suffixEscaped: g,
7226
+ formatSeparator: d,
7191
7227
  unescapeSuffix: l,
7192
7228
  unescapePrefix: h,
7193
7229
  nestingPrefix: u,
7194
7230
  nestingPrefixEscaped: p,
7195
- nestingSuffix: k,
7196
- nestingSuffixEscaped: v,
7231
+ nestingSuffix: w,
7232
+ nestingSuffixEscaped: k,
7197
7233
  nestingOptionsSeparator: m,
7198
- maxReplaces: O,
7234
+ maxReplaces: _,
7199
7235
  alwaysFormat: M
7200
7236
  } = e.interpolation;
7201
- this.escape = t !== void 0 ? t : ci, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = n !== void 0 ? n : !1, this.prefix = o ? h1(o) : c || "{{", this.suffix = a ? h1(a) : d || "}}", this.formatSeparator = g || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = u ? h1(u) : p || h1("$t("), this.nestingSuffix = k ? h1(k) : v || h1(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = O || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
7237
+ this.escape = t !== void 0 ? t : gi, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = n !== void 0 ? n : !1, this.prefix = o ? h1(o) : c || "{{", this.suffix = a ? h1(a) : g || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = u ? h1(u) : p || h1("$t("), this.nestingSuffix = w ? h1(w) : k || h1(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = _ || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
7202
7238
  }
7203
7239
  reset() {
7204
7240
  this.options && this.init(this.options);
@@ -7209,83 +7245,83 @@ class Ni {
7209
7245
  }
7210
7246
  interpolate(e, t, s, n) {
7211
7247
  let o, c, a;
7212
- const d = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, g = (p) => {
7248
+ const g = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (p) => {
7213
7249
  if (p.indexOf(this.formatSeparator) < 0) {
7214
- const O = se(t, d, p, this.options.keySeparator, this.options.ignoreJSONStructure);
7215
- return this.alwaysFormat ? this.format(O, void 0, s, {
7250
+ const _ = ne(t, g, p, this.options.keySeparator, this.options.ignoreJSONStructure);
7251
+ return this.alwaysFormat ? this.format(_, void 0, s, {
7216
7252
  ...n,
7217
7253
  ...t,
7218
7254
  interpolationkey: p
7219
- }) : O;
7255
+ }) : _;
7220
7256
  }
7221
- const k = p.split(this.formatSeparator), v = k.shift().trim(), m = k.join(this.formatSeparator).trim();
7222
- return this.format(se(t, d, v, this.options.keySeparator, this.options.ignoreJSONStructure), m, s, {
7257
+ const w = p.split(this.formatSeparator), k = w.shift().trim(), m = w.join(this.formatSeparator).trim();
7258
+ return this.format(ne(t, g, k, this.options.keySeparator, this.options.ignoreJSONStructure), m, s, {
7223
7259
  ...n,
7224
7260
  ...t,
7225
- interpolationkey: v
7261
+ interpolationkey: k
7226
7262
  });
7227
7263
  };
7228
7264
  this.resetRegExp();
7229
7265
  const l = n && n.missingInterpolationHandler || this.options.missingInterpolationHandler, h = n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
7230
7266
  return [{
7231
7267
  regex: this.regexpUnescape,
7232
- safeValue: (p) => O1(p)
7268
+ safeValue: (p) => S1(p)
7233
7269
  }, {
7234
7270
  regex: this.regexp,
7235
- safeValue: (p) => this.escapeValue ? O1(this.escape(p)) : O1(p)
7271
+ safeValue: (p) => this.escapeValue ? S1(this.escape(p)) : S1(p)
7236
7272
  }].forEach((p) => {
7237
7273
  for (a = 0; o = p.regex.exec(e); ) {
7238
- const k = o[1].trim();
7239
- if (c = g(k), c === void 0)
7274
+ const w = o[1].trim();
7275
+ if (c = d(w), c === void 0)
7240
7276
  if (typeof l == "function") {
7241
7277
  const m = l(e, o, n);
7242
7278
  c = R(m) ? m : "";
7243
- } else if (n && Object.prototype.hasOwnProperty.call(n, k))
7279
+ } else if (n && Object.prototype.hasOwnProperty.call(n, w))
7244
7280
  c = "";
7245
7281
  else if (h) {
7246
7282
  c = o[0];
7247
7283
  continue;
7248
7284
  } else
7249
- this.logger.warn(`missed to pass in variable ${k} for interpolating ${e}`), c = "";
7250
- else !R(c) && !this.useRawValueToEscape && (c = z1(c));
7251
- const v = p.safeValue(c);
7252
- if (e = e.replace(o[0], v), h ? (p.regex.lastIndex += c.length, p.regex.lastIndex -= o[0].length) : p.regex.lastIndex = 0, a++, a >= this.maxReplaces)
7285
+ this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`), c = "";
7286
+ else !R(c) && !this.useRawValueToEscape && (c = J1(c));
7287
+ const k = p.safeValue(c);
7288
+ if (e = e.replace(o[0], k), h ? (p.regex.lastIndex += c.length, p.regex.lastIndex -= o[0].length) : p.regex.lastIndex = 0, a++, a >= this.maxReplaces)
7253
7289
  break;
7254
7290
  }
7255
7291
  }), e;
7256
7292
  }
7257
7293
  nest(e, t) {
7258
7294
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n, o, c;
7259
- const a = (d, g) => {
7295
+ const a = (g, d) => {
7260
7296
  const l = this.nestingOptionsSeparator;
7261
- if (d.indexOf(l) < 0) return d;
7262
- const h = d.split(new RegExp(`${l}[ ]*{`));
7297
+ if (g.indexOf(l) < 0) return g;
7298
+ const h = g.split(new RegExp(`${l}[ ]*{`));
7263
7299
  let u = `{${h[1]}`;
7264
- d = h[0], u = this.interpolate(u, c);
7265
- const p = u.match(/'/g), k = u.match(/"/g);
7266
- (p && p.length % 2 === 0 && !k || k.length % 2 !== 0) && (u = u.replace(/'/g, '"'));
7300
+ g = h[0], u = this.interpolate(u, c);
7301
+ const p = u.match(/'/g), w = u.match(/"/g);
7302
+ (p && p.length % 2 === 0 && !w || w.length % 2 !== 0) && (u = u.replace(/'/g, '"'));
7267
7303
  try {
7268
- c = JSON.parse(u), g && (c = {
7269
- ...g,
7304
+ c = JSON.parse(u), d && (c = {
7305
+ ...d,
7270
7306
  ...c
7271
7307
  });
7272
- } catch (v) {
7273
- return this.logger.warn(`failed parsing options string in nesting for key ${d}`, v), `${d}${l}${u}`;
7308
+ } catch (k) {
7309
+ return this.logger.warn(`failed parsing options string in nesting for key ${g}`, k), `${g}${l}${u}`;
7274
7310
  }
7275
- return c.defaultValue && c.defaultValue.indexOf(this.prefix) > -1 && delete c.defaultValue, d;
7311
+ return c.defaultValue && c.defaultValue.indexOf(this.prefix) > -1 && delete c.defaultValue, g;
7276
7312
  };
7277
7313
  for (; n = this.nestingRegexp.exec(e); ) {
7278
- let d = [];
7314
+ let g = [];
7279
7315
  c = {
7280
7316
  ...s
7281
7317
  }, c = c.replace && !R(c.replace) ? c.replace : c, c.applyPostProcessor = !1, delete c.defaultValue;
7282
- let g = !1;
7318
+ let d = !1;
7283
7319
  if (n[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(n[1])) {
7284
7320
  const l = n[1].split(this.formatSeparator).map((h) => h.trim());
7285
- n[1] = l.shift(), d = l, g = !0;
7321
+ n[1] = l.shift(), g = l, d = !0;
7286
7322
  }
7287
7323
  if (o = t(a.call(this, n[1].trim(), c), c), o && n[0] === e && !R(o)) return o;
7288
- R(o) || (o = z1(o)), o || (this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`), o = ""), g && (o = d.reduce((l, h) => this.format(l, h, s.lng, {
7324
+ R(o) || (o = J1(o)), o || (this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`), o = ""), d && (o = g.reduce((l, h) => this.format(l, h, s.lng, {
7289
7325
  ...s,
7290
7326
  interpolationkey: n[1].trim()
7291
7327
  }), o.trim())), e = e.replace(n[0], o), this.regexp.lastIndex = 0;
@@ -7293,7 +7329,7 @@ class Ni {
7293
7329
  return e;
7294
7330
  }
7295
7331
  }
7296
- const xi = (i) => {
7332
+ const Mi = (i) => {
7297
7333
  let e = i.toLowerCase().trim();
7298
7334
  const t = {};
7299
7335
  if (i.indexOf("(") > -1) {
@@ -7302,8 +7338,8 @@ const xi = (i) => {
7302
7338
  const n = s[1].substring(0, s[1].length - 1);
7303
7339
  e === "currency" && n.indexOf(":") < 0 ? t.currency || (t.currency = n.trim()) : e === "relativetime" && n.indexOf(":") < 0 ? t.range || (t.range = n.trim()) : n.split(";").forEach((c) => {
7304
7340
  if (c) {
7305
- const [a, ...d] = c.split(":"), g = d.join(":").trim().replace(/^'+|'+$/g, ""), l = a.trim();
7306
- t[l] || (t[l] = g), g === "false" && (t[l] = !1), g === "true" && (t[l] = !0), isNaN(g) || (t[l] = parseInt(g, 10));
7341
+ const [a, ...g] = c.split(":"), d = g.join(":").trim().replace(/^'+|'+$/g, ""), l = a.trim();
7342
+ t[l] || (t[l] = d), d === "false" && (t[l] = !1), d === "true" && (t[l] = !0), isNaN(d) || (t[l] = parseInt(d, 10));
7307
7343
  }
7308
7344
  });
7309
7345
  }
@@ -7324,10 +7360,10 @@ const xi = (i) => {
7324
7360
  return a || (a = i(b1(s), n), e[c] = a), a(t);
7325
7361
  };
7326
7362
  };
7327
- class Ri {
7363
+ class bi {
7328
7364
  constructor() {
7329
7365
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
7330
- this.logger = q.create("formatter"), this.options = e, this.formats = {
7366
+ this.logger = X.create("formatter"), this.options = e, this.formats = {
7331
7367
  number: c1((t, s) => {
7332
7368
  const n = new Intl.NumberFormat(t, {
7333
7369
  ...s
@@ -7377,19 +7413,19 @@ class Ri {
7377
7413
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
7378
7414
  const o = t.split(this.formatSeparator);
7379
7415
  if (o.length > 1 && o[0].indexOf("(") > 1 && o[0].indexOf(")") < 0 && o.find((a) => a.indexOf(")") > -1)) {
7380
- const a = o.findIndex((d) => d.indexOf(")") > -1);
7416
+ const a = o.findIndex((g) => g.indexOf(")") > -1);
7381
7417
  o[0] = [o[0], ...o.splice(1, a)].join(this.formatSeparator);
7382
7418
  }
7383
- return o.reduce((a, d) => {
7419
+ return o.reduce((a, g) => {
7384
7420
  const {
7385
- formatName: g,
7421
+ formatName: d,
7386
7422
  formatOptions: l
7387
- } = xi(d);
7388
- if (this.formats[g]) {
7423
+ } = Mi(g);
7424
+ if (this.formats[d]) {
7389
7425
  let h = a;
7390
7426
  try {
7391
7427
  const u = n && n.formatParams && n.formatParams[n.interpolationkey] || {}, p = u.locale || u.lng || n.locale || n.lng || s;
7392
- h = this.formats[g](a, p, {
7428
+ h = this.formats[d](a, p, {
7393
7429
  ...l,
7394
7430
  ...n,
7395
7431
  ...u
@@ -7399,27 +7435,27 @@ class Ri {
7399
7435
  }
7400
7436
  return h;
7401
7437
  } else
7402
- this.logger.warn(`there was no format function for ${g}`);
7438
+ this.logger.warn(`there was no format function for ${d}`);
7403
7439
  return a;
7404
7440
  }, e);
7405
7441
  }
7406
7442
  }
7407
- const Mi = (i, e) => {
7443
+ const yi = (i, e) => {
7408
7444
  i.pending[e] !== void 0 && (delete i.pending[e], i.pendingCount--);
7409
7445
  };
7410
- class bi extends _1 {
7446
+ class Ei extends H1 {
7411
7447
  constructor(e, t, s) {
7412
7448
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
7413
- super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = n, this.logger = q.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = n.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = n.maxRetries >= 0 ? n.maxRetries : 5, this.retryTimeout = n.retryTimeout >= 1 ? n.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(s, n.backend, n);
7449
+ super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = n, this.logger = X.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = n.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = n.maxRetries >= 0 ? n.maxRetries : 5, this.retryTimeout = n.retryTimeout >= 1 ? n.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(s, n.backend, n);
7414
7450
  }
7415
7451
  queueLoad(e, t, s, n) {
7416
- const o = {}, c = {}, a = {}, d = {};
7417
- return e.forEach((g) => {
7452
+ const o = {}, c = {}, a = {}, g = {};
7453
+ return e.forEach((d) => {
7418
7454
  let l = !0;
7419
7455
  t.forEach((h) => {
7420
- const u = `${g}|${h}`;
7421
- !s.reload && this.store.hasResourceBundle(g, h) ? this.state[u] = 2 : this.state[u] < 0 || (this.state[u] === 1 ? c[u] === void 0 && (c[u] = !0) : (this.state[u] = 1, l = !1, c[u] === void 0 && (c[u] = !0), o[u] === void 0 && (o[u] = !0), d[h] === void 0 && (d[h] = !0)));
7422
- }), l || (a[g] = !0);
7456
+ const u = `${d}|${h}`;
7457
+ !s.reload && this.store.hasResourceBundle(d, h) ? this.state[u] = 2 : this.state[u] < 0 || (this.state[u] === 1 ? c[u] === void 0 && (c[u] = !0) : (this.state[u] = 1, l = !1, c[u] === void 0 && (c[u] = !0), o[u] === void 0 && (o[u] = !0), g[h] === void 0 && (g[h] = !0)));
7458
+ }), l || (a[d] = !0);
7423
7459
  }), (Object.keys(o).length || Object.keys(c).length) && this.queue.push({
7424
7460
  pending: c,
7425
7461
  pendingCount: Object.keys(c).length,
@@ -7430,7 +7466,7 @@ class bi extends _1 {
7430
7466
  toLoad: Object.keys(o),
7431
7467
  pending: Object.keys(c),
7432
7468
  toLoadLanguages: Object.keys(a),
7433
- toLoadNamespaces: Object.keys(d)
7469
+ toLoadNamespaces: Object.keys(g)
7434
7470
  };
7435
7471
  }
7436
7472
  loaded(e, t, s) {
@@ -7439,15 +7475,15 @@ class bi extends _1 {
7439
7475
  skipCopy: !0
7440
7476
  }), this.state[e] = t ? -1 : 2, t && s && (this.state[e] = 0);
7441
7477
  const a = {};
7442
- this.queue.forEach((d) => {
7443
- ai(d.loaded, [o], c), Mi(d, e), t && d.errors.push(t), d.pendingCount === 0 && !d.done && (Object.keys(d.loaded).forEach((g) => {
7444
- a[g] || (a[g] = {});
7445
- const l = d.loaded[g];
7478
+ this.queue.forEach((g) => {
7479
+ hi(g.loaded, [o], c), yi(g, e), t && g.errors.push(t), g.pendingCount === 0 && !g.done && (Object.keys(g.loaded).forEach((d) => {
7480
+ a[d] || (a[d] = {});
7481
+ const l = g.loaded[d];
7446
7482
  l.length && l.forEach((h) => {
7447
- a[g][h] === void 0 && (a[g][h] = !0);
7483
+ a[d][h] === void 0 && (a[d][h] = !0);
7448
7484
  });
7449
- }), d.done = !0, d.errors.length ? d.callback(d.errors) : d.callback());
7450
- }), this.emit("loaded", a), this.queue = this.queue.filter((d) => !d.done);
7485
+ }), g.done = !0, g.errors.length ? g.callback(g.errors) : g.callback());
7486
+ }), this.emit("loaded", a), this.queue = this.queue.filter((g) => !g.done);
7451
7487
  }
7452
7488
  read(e, t, s) {
7453
7489
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, c = arguments.length > 5 ? arguments[5] : void 0;
@@ -7464,29 +7500,29 @@ class bi extends _1 {
7464
7500
  return;
7465
7501
  }
7466
7502
  this.readingCalls++;
7467
- const a = (g, l) => {
7503
+ const a = (d, l) => {
7468
7504
  if (this.readingCalls--, this.waitingReads.length > 0) {
7469
7505
  const h = this.waitingReads.shift();
7470
7506
  this.read(h.lng, h.ns, h.fcName, h.tried, h.wait, h.callback);
7471
7507
  }
7472
- if (g && l && n < this.maxRetries) {
7508
+ if (d && l && n < this.maxRetries) {
7473
7509
  setTimeout(() => {
7474
7510
  this.read.call(this, e, t, s, n + 1, o * 2, c);
7475
7511
  }, o);
7476
7512
  return;
7477
7513
  }
7478
- c(g, l);
7479
- }, d = this.backend[s].bind(this.backend);
7480
- if (d.length === 2) {
7514
+ c(d, l);
7515
+ }, g = this.backend[s].bind(this.backend);
7516
+ if (g.length === 2) {
7481
7517
  try {
7482
- const g = d(e, t);
7483
- g && typeof g.then == "function" ? g.then((l) => a(null, l)).catch(a) : a(null, g);
7484
- } catch (g) {
7485
- a(g);
7518
+ const d = g(e, t);
7519
+ d && typeof d.then == "function" ? d.then((l) => a(null, l)).catch(a) : a(null, d);
7520
+ } catch (d) {
7521
+ a(d);
7486
7522
  }
7487
7523
  return;
7488
7524
  }
7489
- return d(e, t, a);
7525
+ return g(e, t, a);
7490
7526
  }
7491
7527
  prepareLoading(e, t) {
7492
7528
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = arguments.length > 3 ? arguments[3] : void 0;
@@ -7524,25 +7560,25 @@ class bi extends _1 {
7524
7560
  }
7525
7561
  if (!(s == null || s === "")) {
7526
7562
  if (this.backend && this.backend.create) {
7527
- const d = {
7563
+ const g = {
7528
7564
  ...c,
7529
7565
  isUpdate: o
7530
- }, g = this.backend.create.bind(this.backend);
7531
- if (g.length < 6)
7566
+ }, d = this.backend.create.bind(this.backend);
7567
+ if (d.length < 6)
7532
7568
  try {
7533
7569
  let l;
7534
- g.length === 5 ? l = g(e, t, s, n, d) : l = g(e, t, s, n), l && typeof l.then == "function" ? l.then((h) => a(null, h)).catch(a) : a(null, l);
7570
+ d.length === 5 ? l = d(e, t, s, n, g) : l = d(e, t, s, n), l && typeof l.then == "function" ? l.then((h) => a(null, h)).catch(a) : a(null, l);
7535
7571
  } catch (l) {
7536
7572
  a(l);
7537
7573
  }
7538
7574
  else
7539
- g(e, t, s, n, a, d);
7575
+ d(e, t, s, n, a, g);
7540
7576
  }
7541
7577
  !e || !e[0] || this.store.addResource(e[0], t, s, n);
7542
7578
  }
7543
7579
  }
7544
7580
  }
7545
- const ne = () => ({
7581
+ const re = () => ({
7546
7582
  debug: !1,
7547
7583
  initImmediate: !0,
7548
7584
  ns: ["translation"],
@@ -7598,18 +7634,18 @@ const ne = () => ({
7598
7634
  maxReplaces: 1e3,
7599
7635
  skipOnVariables: !0
7600
7636
  }
7601
- }), re = (i) => (R(i.ns) && (i.ns = [i.ns]), R(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), R(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), x1 = () => {
7602
- }, yi = (i) => {
7637
+ }), oe = (i) => (R(i.ns) && (i.ns = [i.ns]), R(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), R(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), x1 = () => {
7638
+ }, _i = (i) => {
7603
7639
  Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
7604
7640
  typeof i[t] == "function" && (i[t] = i[t].bind(i));
7605
7641
  });
7606
7642
  };
7607
- class w1 extends _1 {
7643
+ class w1 extends H1 {
7608
7644
  constructor() {
7609
7645
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
7610
- if (super(), this.options = re(e), this.services = {}, this.logger = q, this.modules = {
7646
+ if (super(), this.options = oe(e), this.services = {}, this.logger = X, this.modules = {
7611
7647
  external: []
7612
- }, yi(this), t && !this.isInitialized && !e.isClone) {
7648
+ }, _i(this), t && !this.isInitialized && !e.isClone) {
7613
7649
  if (!this.options.initImmediate)
7614
7650
  return this.init(e, t), this;
7615
7651
  setTimeout(() => {
@@ -7621,37 +7657,37 @@ class w1 extends _1 {
7621
7657
  var e = this;
7622
7658
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 ? arguments[1] : void 0;
7623
7659
  this.isInitializing = !0, typeof t == "function" && (s = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (R(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
7624
- const n = ne();
7660
+ const n = re();
7625
7661
  this.options = {
7626
7662
  ...n,
7627
7663
  ...this.options,
7628
- ...re(t)
7664
+ ...oe(t)
7629
7665
  }, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = {
7630
7666
  ...n.interpolation,
7631
7667
  ...this.options.interpolation
7632
7668
  }), t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
7633
7669
  const o = (l) => l ? typeof l == "function" ? new l() : l : null;
7634
7670
  if (!this.options.isClone) {
7635
- this.modules.logger ? q.init(o(this.modules.logger), this.options) : q.init(null, this.options);
7671
+ this.modules.logger ? X.init(o(this.modules.logger), this.options) : X.init(null, this.options);
7636
7672
  let l;
7637
- this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = Ri);
7638
- const h = new te(this.options);
7639
- this.store = new X1(this.options.resources, this.options);
7673
+ this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = bi);
7674
+ const h = new ie(this.options);
7675
+ this.store = new ee(this.options.resources, this.options);
7640
7676
  const u = this.services;
7641
- u.logger = q, u.resourceStore = this.store, u.languageUtils = h, u.pluralResolver = new vi(h, {
7677
+ u.logger = X, u.resourceStore = this.store, u.languageUtils = h, u.pluralResolver = new xi(h, {
7642
7678
  prepend: this.options.pluralSeparator,
7643
7679
  compatibilityJSON: this.options.compatibilityJSON,
7644
7680
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
7645
- }), l && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = o(l), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new Ni(this.options), u.utils = {
7681
+ }), l && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = o(l), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new Ri(this.options), u.utils = {
7646
7682
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
7647
- }, u.backendConnector = new bi(o(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", function(p) {
7648
- for (var k = arguments.length, v = new Array(k > 1 ? k - 1 : 0), m = 1; m < k; m++)
7649
- v[m - 1] = arguments[m];
7650
- e.emit(p, ...v);
7683
+ }, u.backendConnector = new Ei(o(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", function(p) {
7684
+ for (var w = arguments.length, k = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
7685
+ k[m - 1] = arguments[m];
7686
+ e.emit(p, ...k);
7651
7687
  }), this.modules.languageDetector && (u.languageDetector = o(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = o(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new E1(this.services, this.options), this.translator.on("*", function(p) {
7652
- for (var k = arguments.length, v = new Array(k > 1 ? k - 1 : 0), m = 1; m < k; m++)
7653
- v[m - 1] = arguments[m];
7654
- e.emit(p, ...v);
7688
+ for (var w = arguments.length, k = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
7689
+ k[m - 1] = arguments[m];
7690
+ e.emit(p, ...k);
7655
7691
  }), this.modules.external.forEach((p) => {
7656
7692
  p.init && p.init(this);
7657
7693
  });
@@ -7669,14 +7705,14 @@ class w1 extends _1 {
7669
7705
  return e.store[l](...arguments), e;
7670
7706
  };
7671
7707
  });
7672
- const d = C1(), g = () => {
7708
+ const g = C1(), d = () => {
7673
7709
  const l = (h, u) => {
7674
- this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), d.resolve(u), s(h, u);
7710
+ this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), g.resolve(u), s(h, u);
7675
7711
  };
7676
7712
  if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized) return l(null, this.t.bind(this));
7677
7713
  this.changeLanguage(this.options.lng, l);
7678
7714
  };
7679
- return this.options.resources || !this.options.initImmediate ? g() : setTimeout(g, 0), d;
7715
+ return this.options.resources || !this.options.initImmediate ? d() : setTimeout(d, 0), g;
7680
7716
  }
7681
7717
  loadResources(e) {
7682
7718
  let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : x1;
@@ -7685,11 +7721,11 @@ class w1 extends _1 {
7685
7721
  if (n && n.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
7686
7722
  const o = [], c = (a) => {
7687
7723
  if (!a || a === "cimode") return;
7688
- this.services.languageUtils.toResolveHierarchy(a).forEach((g) => {
7689
- g !== "cimode" && o.indexOf(g) < 0 && o.push(g);
7724
+ this.services.languageUtils.toResolveHierarchy(a).forEach((d) => {
7725
+ d !== "cimode" && o.indexOf(d) < 0 && o.push(d);
7690
7726
  });
7691
7727
  };
7692
- n ? c(n) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((d) => c(d)), this.options.preload && this.options.preload.forEach((a) => c(a)), this.services.backendConnector.load(o, this.options.ns, (a) => {
7728
+ n ? c(n) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((g) => c(g)), this.options.preload && this.options.preload.forEach((a) => c(a)), this.services.backendConnector.load(o, this.options.ns, (a) => {
7693
7729
  !a && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), s(a);
7694
7730
  });
7695
7731
  } else
@@ -7721,19 +7757,19 @@ class w1 extends _1 {
7721
7757
  this.isLanguageChangingTo = e;
7722
7758
  const n = C1();
7723
7759
  this.emit("languageChanging", e);
7724
- const o = (d) => {
7725
- this.language = d, this.languages = this.services.languageUtils.toResolveHierarchy(d), this.resolvedLanguage = void 0, this.setResolvedLanguage(d);
7726
- }, c = (d, g) => {
7727
- g ? (o(g), this.translator.changeLanguage(g), this.isLanguageChangingTo = void 0, this.emit("languageChanged", g), this.logger.log("languageChanged", g)) : this.isLanguageChangingTo = void 0, n.resolve(function() {
7760
+ const o = (g) => {
7761
+ this.language = g, this.languages = this.services.languageUtils.toResolveHierarchy(g), this.resolvedLanguage = void 0, this.setResolvedLanguage(g);
7762
+ }, c = (g, d) => {
7763
+ d ? (o(d), this.translator.changeLanguage(d), this.isLanguageChangingTo = void 0, this.emit("languageChanged", d), this.logger.log("languageChanged", d)) : this.isLanguageChangingTo = void 0, n.resolve(function() {
7728
7764
  return s.t(...arguments);
7729
- }), t && t(d, function() {
7765
+ }), t && t(g, function() {
7730
7766
  return s.t(...arguments);
7731
7767
  });
7732
- }, a = (d) => {
7733
- !e && !d && this.services.languageDetector && (d = []);
7734
- const g = R(d) ? d : this.services.languageUtils.getBestMatchFromCodes(d);
7735
- g && (this.language || o(g), this.translator.language || this.translator.changeLanguage(g), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(g)), this.loadResources(g, (l) => {
7736
- c(l, g);
7768
+ }, a = (g) => {
7769
+ !e && !g && this.services.languageDetector && (g = []);
7770
+ const d = R(g) ? g : this.services.languageUtils.getBestMatchFromCodes(g);
7771
+ d && (this.language || o(d), this.translator.language || this.translator.changeLanguage(d), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(d)), this.loadResources(d, (l) => {
7772
+ c(l, d);
7737
7773
  });
7738
7774
  };
7739
7775
  return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(e), n;
@@ -7741,19 +7777,19 @@ class w1 extends _1 {
7741
7777
  getFixedT(e, t, s) {
7742
7778
  var n = this;
7743
7779
  const o = function(c, a) {
7744
- let d;
7780
+ let g;
7745
7781
  if (typeof a != "object") {
7746
- for (var g = arguments.length, l = new Array(g > 2 ? g - 2 : 0), h = 2; h < g; h++)
7782
+ for (var d = arguments.length, l = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++)
7747
7783
  l[h - 2] = arguments[h];
7748
- d = n.options.overloadTranslationOptionHandler([c, a].concat(l));
7784
+ g = n.options.overloadTranslationOptionHandler([c, a].concat(l));
7749
7785
  } else
7750
- d = {
7786
+ g = {
7751
7787
  ...a
7752
7788
  };
7753
- d.lng = d.lng || o.lng, d.lngs = d.lngs || o.lngs, d.ns = d.ns || o.ns, d.keyPrefix !== "" && (d.keyPrefix = d.keyPrefix || s || o.keyPrefix);
7789
+ g.lng = g.lng || o.lng, g.lngs = g.lngs || o.lngs, g.ns = g.ns || o.ns, g.keyPrefix !== "" && (g.keyPrefix = g.keyPrefix || s || o.keyPrefix);
7754
7790
  const u = n.options.keySeparator || ".";
7755
7791
  let p;
7756
- return d.keyPrefix && Array.isArray(c) ? p = c.map((k) => `${d.keyPrefix}${u}${k}`) : p = d.keyPrefix ? `${d.keyPrefix}${u}${c}` : c, n.t(p, d);
7792
+ return g.keyPrefix && Array.isArray(c) ? p = c.map((w) => `${g.keyPrefix}${u}${w}`) : p = g.keyPrefix ? `${g.keyPrefix}${u}${c}` : c, n.t(p, g);
7757
7793
  };
7758
7794
  return R(e) ? o.lng = e : o.lngs = e, o.ns = t, o.keyPrefix = s, o;
7759
7795
  }
@@ -7774,9 +7810,9 @@ class w1 extends _1 {
7774
7810
  return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
7775
7811
  const s = t.lng || this.resolvedLanguage || this.languages[0], n = this.options ? this.options.fallbackLng : !1, o = this.languages[this.languages.length - 1];
7776
7812
  if (s.toLowerCase() === "cimode") return !0;
7777
- const c = (a, d) => {
7778
- const g = this.services.backendConnector.state[`${a}|${d}`];
7779
- return g === -1 || g === 0 || g === 2;
7813
+ const c = (a, g) => {
7814
+ const d = this.services.backendConnector.state[`${a}|${g}`];
7815
+ return d === -1 || d === 0 || d === 2;
7780
7816
  };
7781
7817
  if (t.precheck) {
7782
7818
  const a = t.precheck(this, c);
@@ -7802,7 +7838,7 @@ class w1 extends _1 {
7802
7838
  }
7803
7839
  dir(e) {
7804
7840
  if (e || (e = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !e) return "rtl";
7805
- const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], s = this.services && this.services.languageUtils || new te(ne());
7841
+ const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], s = this.services && this.services.languageUtils || new ie(re());
7806
7842
  return t.indexOf(s.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
7807
7843
  }
7808
7844
  static createInstance() {
@@ -7824,10 +7860,10 @@ class w1 extends _1 {
7824
7860
  ...this.services
7825
7861
  }, o.services.utils = {
7826
7862
  hasLoadedNamespace: o.hasLoadedNamespace.bind(o)
7827
- }, s && (o.store = new X1(this.store.data, n), o.services.resourceStore = o.store), o.translator = new E1(o.services, n), o.translator.on("*", function(a) {
7828
- for (var d = arguments.length, g = new Array(d > 1 ? d - 1 : 0), l = 1; l < d; l++)
7829
- g[l - 1] = arguments[l];
7830
- o.emit(a, ...g);
7863
+ }, s && (o.store = new ee(this.store.data, n), o.services.resourceStore = o.store), o.translator = new E1(o.services, n), o.translator.on("*", function(a) {
7864
+ for (var g = arguments.length, d = new Array(g > 1 ? g - 1 : 0), l = 1; l < g; l++)
7865
+ d[l - 1] = arguments[l];
7866
+ o.emit(a, ...d);
7831
7867
  }), o.init(n, t), o.translator.options = n, o.translator.backendConnector.services.utils = {
7832
7868
  hasLoadedNamespace: o.hasLoadedNamespace.bind(o)
7833
7869
  }, o;
@@ -7858,26 +7894,26 @@ Y.setDefaultNamespace;
7858
7894
  Y.hasLoadedNamespace;
7859
7895
  Y.loadNamespaces;
7860
7896
  Y.loadLanguages;
7861
- const Ei = "Archived", _i = "Deleted", Hi = {
7862
- archived: Ei,
7863
- deleted: _i
7864
- }, Ii = "Заархивирован", Oi = "Удалён", Si = {
7865
- archived: Ii,
7866
- deleted: Oi
7897
+ const Hi = "Archived", Ii = "Deleted", Oi = {
7898
+ archived: Hi,
7899
+ deleted: Ii
7900
+ }, Si = "Заархивирован", Vi = "Удалён", Ai = {
7901
+ archived: Si,
7902
+ deleted: Vi
7867
7903
  };
7868
- Y.use(X5).init({
7904
+ Y.use(ti).init({
7869
7905
  defaultNS: "common",
7870
7906
  lng: "en",
7871
7907
  resources: {
7872
7908
  en: {
7873
- common: Hi
7909
+ common: Oi
7874
7910
  },
7875
7911
  ru: {
7876
- common: Si
7912
+ common: Ai
7877
7913
  }
7878
7914
  }
7879
7915
  });
7880
- const ji = k1(
7916
+ const Gi = k1(
7881
7917
  ({
7882
7918
  fetchParams: i,
7883
7919
  mode: e = void 0,
@@ -7887,133 +7923,133 @@ const ji = k1(
7887
7923
  onChange: o,
7888
7924
  onError: c,
7889
7925
  allowEmpty: a = !1,
7890
- showAvatar: d = !1,
7891
- clearable: g,
7926
+ showAvatar: g = !1,
7927
+ clearable: d,
7892
7928
  required: l,
7893
7929
  error: h
7894
7930
  }, u) => {
7895
- const { axiosPeople: p, locale: k } = r1(Ee), { t: v } = ni("common", { lng: k }), [m, O] = B([]), [M, S] = B(!0), f = X(m), N = X(null);
7896
- if (oe(u, () => N.current), !p)
7931
+ const { axiosPeople: p, locale: w } = r1(Ee), { t: k } = oi("common", { lng: w }), [m, _] = T([]), [M, S] = T(!0), f = q(m), N = q(null);
7932
+ if (_1(u, () => N.current), !p)
7897
7933
  throw new Error(
7898
7934
  `UserSelect requires "axiosPeople" to fetch users.
7899
7935
  Please provide it via SNMTUiContext.`
7900
7936
  );
7901
7937
  const x = $(
7902
- (_) => {
7903
- let Z = "";
7904
- return _.deletedAt && (Z += `[${v("deleted")}] `), _.status === R1.ARCHIVED && (Z += `[${v("archived")}] `), `${Z}${_.firstName} ${_.lastName}`;
7938
+ (H) => {
7939
+ let D = "";
7940
+ return H.deletedAt && (D += `[${k("deleted")}] `), H.status === R1.ARCHIVED && (D += `[${k("archived")}] `), `${D}${H.firstName} ${H.lastName}`;
7905
7941
  },
7906
- [v]
7907
- ), L = $(
7942
+ [k]
7943
+ ), v = $(
7908
7944
  async ({
7909
- offset: _,
7910
- limit: Z,
7911
- search: H
7945
+ offset: H,
7946
+ limit: D,
7947
+ search: I
7912
7948
  }) => {
7913
- var V, T, j;
7949
+ var V, Z, W;
7914
7950
  try {
7915
7951
  const U = await p.post("v1/users/search", {
7916
- offset: _,
7917
- limit: Z,
7918
- search: H,
7952
+ offset: H,
7953
+ limit: D,
7954
+ search: I,
7919
7955
  ...i,
7920
7956
  includeCount: !0
7921
- }), { data: I, metadata: K } = U.data;
7957
+ }), { data: O, metadata: K } = U.data;
7922
7958
  return {
7923
- options: I.map((W) => ({
7924
- value: W.id,
7925
- label: x(W),
7926
- image: d ? W.avatarUrl : void 0
7959
+ options: O.map((G) => ({
7960
+ value: G.id,
7961
+ label: x(G),
7962
+ image: g ? G.avatarUrl : void 0
7927
7963
  })),
7928
7964
  count: K.count
7929
7965
  };
7930
7966
  } catch (U) {
7931
7967
  return c && c({
7932
7968
  status: ((V = U.response) == null ? void 0 : V.status) ?? 500,
7933
- message: ((j = (T = U.response) == null ? void 0 : T.data) == null ? void 0 : j.message) ?? "Error while fetching options"
7969
+ message: ((W = (Z = U.response) == null ? void 0 : Z.data) == null ? void 0 : W.message) ?? "Error while fetching options"
7934
7970
  }), {
7935
7971
  options: [],
7936
7972
  count: 0
7937
7973
  };
7938
7974
  }
7939
7975
  },
7940
- [p, i, x, d, c]
7976
+ [p, i, x, g, c]
7941
7977
  ), P = $(
7942
- async (_) => {
7943
- var Z, H, V;
7978
+ async (H) => {
7979
+ var D, I, V;
7944
7980
  try {
7945
- const T = _.filter(
7946
- (I) => !f.current.some((K) => K.value === I)
7981
+ const Z = H.filter(
7982
+ (O) => !f.current.some((K) => K.value === O)
7947
7983
  );
7948
- let j = [];
7949
- T.length && (j = (await p.post("v1/users/search", {
7984
+ let W = [];
7985
+ Z.length && (W = (await p.post("v1/users/search", {
7950
7986
  filters: {
7951
- id: T,
7987
+ id: Z,
7952
7988
  status: [R1.ACTIVE, R1.ARCHIVED]
7953
7989
  }
7954
7990
  })).data.data);
7955
- const U = j.map((I) => ({
7956
- value: I.id,
7957
- label: x(I),
7958
- image: d ? I.avatarUrl : void 0
7991
+ const U = W.map((O) => ({
7992
+ value: O.id,
7993
+ label: x(O),
7994
+ image: g ? O.avatarUrl : void 0
7959
7995
  }));
7960
7996
  return [...f.current, ...U];
7961
- } catch (T) {
7997
+ } catch (Z) {
7962
7998
  return c && c({
7963
- status: ((Z = T.response) == null ? void 0 : Z.status) ?? 500,
7964
- message: ((V = (H = T.response) == null ? void 0 : H.data) == null ? void 0 : V.message) ?? "Error while fetching selected items"
7999
+ status: ((D = Z.response) == null ? void 0 : D.status) ?? 500,
8000
+ message: ((V = (I = Z.response) == null ? void 0 : I.data) == null ? void 0 : V.message) ?? "Error while fetching selected items"
7965
8001
  }), [];
7966
8002
  }
7967
8003
  },
7968
- [p, x, c, d]
8004
+ [p, x, c, g]
7969
8005
  );
7970
- G(() => {
8006
+ j(() => {
7971
8007
  f.current = m;
7972
- }, [m]), G(() => {
7973
- var _;
7974
- (_ = N.current) == null || _.refetchOptions();
7975
- }, [i]), G(() => {
8008
+ }, [m]), j(() => {
8009
+ var H;
8010
+ (H = N.current) == null || H.refetchOptions();
8011
+ }, [i]), j(() => {
7976
8012
  if (!n) {
7977
8013
  S(!1);
7978
8014
  return;
7979
8015
  }
7980
8016
  (async () => {
7981
- const Z = Array.isArray(n) ? n : [n], H = await P(Z);
7982
- O(H), S(!1);
8017
+ const D = Array.isArray(n) ? n : [n], I = await P(D);
8018
+ _(I), S(!1);
7983
8019
  })();
7984
8020
  }, [P, n]);
7985
8021
  const J = $(
7986
8022
  async ({
7987
- limit: _,
7988
- offset: Z,
7989
- search: H
8023
+ limit: H,
8024
+ offset: D,
8025
+ search: I
7990
8026
  }) => {
7991
- const { count: V, ...T } = await L({
7992
- offset: Z,
7993
- limit: _,
7994
- search: H
8027
+ const { count: V, ...Z } = await v({
8028
+ offset: D,
8029
+ limit: H,
8030
+ search: I
7995
8031
  });
7996
- let j = T.options;
7997
- return a && Z === 0 && (j = [{ value: null, label: "None" }, ...j]), {
7998
- options: j,
8032
+ let W = Z.options;
8033
+ return a && D === 0 && (W = [{ value: null, label: "None" }, ...W]), {
8034
+ options: W,
7999
8035
  count: V,
8000
- limit: _
8036
+ limit: H
8001
8037
  };
8002
8038
  },
8003
- [a, L]
8039
+ [a, v]
8004
8040
  );
8005
8041
  if (M)
8006
- return /* @__PURE__ */ r(j5, {});
8042
+ return /* @__PURE__ */ r(G5, {});
8007
8043
  const F = {
8008
8044
  ref: N,
8009
8045
  placeholder: t,
8010
8046
  disabled: s,
8011
- clearable: g,
8047
+ clearable: d,
8012
8048
  required: l,
8013
8049
  error: h
8014
8050
  };
8015
8051
  return e ? /* @__PURE__ */ r(
8016
- P1,
8052
+ F1,
8017
8053
  {
8018
8054
  ...F,
8019
8055
  mode: e,
@@ -8024,7 +8060,7 @@ const ji = k1(
8024
8060
  extraOptions: m
8025
8061
  }
8026
8062
  ) : /* @__PURE__ */ r(
8027
- P1,
8063
+ F1,
8028
8064
  {
8029
8065
  ...F,
8030
8066
  value: n,
@@ -8038,5 +8074,5 @@ const ji = k1(
8038
8074
  }
8039
8075
  );
8040
8076
  export {
8041
- ji as UserSelect
8077
+ Gi as UserSelect
8042
8078
  };