@snmt-react-ui/country-select 2.7.1 → 2.7.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.
@@ -5805,15 +5805,19 @@ const H5 = ({
5805
5805
  ]
5806
5806
  }
5807
5807
  );
5808
- }, A1 = ({ size: i = 30, color: e = "#004ed7" }) => {
5809
- const t = `no-repeat linear-gradient(${e}
5810
- calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, n = {
5811
- width: i,
5812
- background: `${t} 0% 100%, ${t} 50% 100%, ${t} 100% 100%`,
5808
+ }, I5 = {
5809
+ small: 20,
5810
+ medium: 28,
5811
+ large: 48
5812
+ }, A1 = ({ size: i = "medium", color: e = "#004ed7" }) => {
5813
+ const t = typeof i == "number" ? i : I5[i], n = `no-repeat linear-gradient(${e}
5814
+ calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, s = {
5815
+ width: t,
5816
+ background: `${n} 0% 100%, ${n} 50% 100%, ${n} 100% 100%`,
5813
5817
  backgroundSize: "20% calc(200% + 20px)"
5814
5818
  };
5815
- return /* @__PURE__ */ o("span", { className: "snmt-loader", style: n });
5816
- }, I5 = w1(
5819
+ return /* @__PURE__ */ o("span", { className: "snmt-loader", style: s });
5820
+ }, O5 = w1(
5817
5821
  ({
5818
5822
  value: i,
5819
5823
  onChange: e,
@@ -6053,11 +6057,11 @@ const H5 = ({
6053
6057
  i = n, e = s;
6054
6058
  });
6055
6059
  return t.resolve = i, t.reject = e, t;
6056
- }, T1 = (i) => i == null ? "" : "" + i, O5 = (i, e, t) => {
6060
+ }, T1 = (i) => i == null ? "" : "" + i, S5 = (i, e, t) => {
6057
6061
  i.forEach((n) => {
6058
6062
  e[n] && (t[n] = e[n]);
6059
6063
  });
6060
- }, S5 = /###/g, Z1 = (i) => i && i.indexOf("###") > -1 ? i.replace(S5, ".") : i, D1 = (i) => !i || k(i), a1 = (i, e, t) => {
6064
+ }, V5 = /###/g, Z1 = (i) => i && i.indexOf("###") > -1 ? i.replace(V5, ".") : i, D1 = (i) => !i || k(i), a1 = (i, e, t) => {
6061
6065
  const n = k(e) ? e.split(".") : e;
6062
6066
  let s = 0;
6063
6067
  for (; s < n.length - 1; ) {
@@ -6082,7 +6086,7 @@ const H5 = ({
6082
6086
  for (; a.obj === void 0 && c.length; )
6083
6087
  r = `${c[c.length - 1]}.${r}`, c = c.slice(0, c.length - 1), a = a1(i, c, Object), a && a.obj && typeof a.obj[`${a.k}.${r}`] < "u" && (a.obj = void 0);
6084
6088
  a.obj[`${a.k}.${r}`] = t;
6085
- }, V5 = (i, e, t, n) => {
6089
+ }, A5 = (i, e, t, n) => {
6086
6090
  const {
6087
6091
  obj: s,
6088
6092
  k: r
@@ -6095,7 +6099,7 @@ const H5 = ({
6095
6099
  } = a1(i, e);
6096
6100
  if (t)
6097
6101
  return t[n];
6098
- }, A5 = (i, e, t) => {
6102
+ }, T5 = (i, e, t) => {
6099
6103
  const n = C1(i, t);
6100
6104
  return n !== void 0 ? n : C1(e, t);
6101
6105
  }, ne = (i, e, t) => {
@@ -6103,7 +6107,7 @@ const H5 = ({
6103
6107
  n !== "__proto__" && n !== "constructor" && (n in i ? k(i[n]) || i[n] instanceof String || k(e[n]) || e[n] instanceof String ? t && (i[n] = e[n]) : ne(i[n], e[n], t) : i[n] = e[n]);
6104
6108
  return i;
6105
6109
  }, X = (i) => i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
6106
- var T5 = {
6110
+ var Z5 = {
6107
6111
  "&": "&amp;",
6108
6112
  "<": "&lt;",
6109
6113
  ">": "&gt;",
@@ -6111,8 +6115,8 @@ var T5 = {
6111
6115
  "'": "&#39;",
6112
6116
  "/": "&#x2F;"
6113
6117
  };
6114
- const Z5 = (i) => k(i) ? i.replace(/[&<>"'\/]/g, (e) => T5[e]) : i;
6115
- class D5 {
6118
+ const D5 = (i) => k(i) ? i.replace(/[&<>"'\/]/g, (e) => Z5[e]) : i;
6119
+ class B5 {
6116
6120
  constructor(e) {
6117
6121
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
6118
6122
  }
@@ -6124,11 +6128,11 @@ class D5 {
6124
6128
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
6125
6129
  }
6126
6130
  }
6127
- const B5 = [" ", ",", "?", "!", ";"], j5 = new D5(20), G5 = (i, e, t) => {
6131
+ const j5 = [" ", ",", "?", "!", ";"], G5 = new B5(20), W5 = (i, e, t) => {
6128
6132
  e = e || "", t = t || "";
6129
- const n = B5.filter((c) => e.indexOf(c) < 0 && t.indexOf(c) < 0);
6133
+ const n = j5.filter((c) => e.indexOf(c) < 0 && t.indexOf(c) < 0);
6130
6134
  if (n.length === 0) return !0;
6131
- const s = j5.getRegExp(`(${n.map((c) => c === "?" ? "\\?" : c).join("|")})`);
6135
+ const s = G5.getRegExp(`(${n.map((c) => c === "?" ? "\\?" : c).join("|")})`);
6132
6136
  let r = !s.test(i);
6133
6137
  if (!r) {
6134
6138
  const c = i.indexOf(t);
@@ -6155,7 +6159,7 @@ const B5 = [" ", ",", "?", "!", ";"], j5 = new D5(20), G5 = (i, e, t) => {
6155
6159
  s = c;
6156
6160
  }
6157
6161
  return s;
6158
- }, p1 = (i) => i && i.replace("_", "-"), W5 = {
6162
+ }, p1 = (i) => i && i.replace("_", "-"), K5 = {
6159
6163
  type: "logger",
6160
6164
  log(i) {
6161
6165
  this.output("log", i);
@@ -6177,7 +6181,7 @@ class f1 {
6177
6181
  }
6178
6182
  init(e) {
6179
6183
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6180
- this.prefix = t.prefix || "i18next:", this.logger = e || W5, this.options = t, this.debug = t.debug;
6184
+ this.prefix = t.prefix || "i18next:", this.logger = e || K5, this.options = t, this.debug = t.debug;
6181
6185
  }
6182
6186
  log() {
6183
6187
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
@@ -6337,7 +6341,7 @@ const G1 = {};
6337
6341
  class m1 extends k1 {
6338
6342
  constructor(e) {
6339
6343
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6340
- super(), O5(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = G.create("translator");
6344
+ super(), S5(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = G.create("translator");
6341
6345
  }
6342
6346
  changeLanguage(e) {
6343
6347
  e && (this.language = e);
@@ -6356,7 +6360,7 @@ class m1 extends k1 {
6356
6360
  n === void 0 && (n = ":");
6357
6361
  const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
6358
6362
  let r = t.ns || this.options.defaultNS || [];
6359
- const c = n && e.indexOf(n) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !G5(e, n, s);
6363
+ const c = n && e.indexOf(n) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !W5(e, n, s);
6360
6364
  if (c && !a) {
6361
6365
  const g = e.match(this.interpolator.nestingRegexp);
6362
6366
  if (g && g.length > 0)
@@ -6646,7 +6650,7 @@ class W1 {
6646
6650
  }), s;
6647
6651
  }
6648
6652
  }
6649
- let K5 = [{
6653
+ let P5 = [{
6650
6654
  lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
6651
6655
  nr: [1, 2],
6652
6656
  fc: 1
@@ -6738,7 +6742,7 @@ let K5 = [{
6738
6742
  lngs: ["he", "iw"],
6739
6743
  nr: [1, 2, 20, 21],
6740
6744
  fc: 22
6741
- }], P5 = {
6745
+ }], $5 = {
6742
6746
  1: (i) => +(i > 1),
6743
6747
  2: (i) => +(i != 1),
6744
6748
  3: (i) => 0,
@@ -6762,28 +6766,28 @@ let K5 = [{
6762
6766
  21: (i) => i % 100 == 1 ? 1 : i % 100 == 2 ? 2 : i % 100 == 3 || i % 100 == 4 ? 3 : 0,
6763
6767
  22: (i) => i == 1 ? 0 : i == 2 ? 1 : (i < 0 || i > 10) && i % 10 == 0 ? 2 : 3
6764
6768
  };
6765
- const $5 = ["v1", "v2", "v3"], F5 = ["v4"], K1 = {
6769
+ const F5 = ["v1", "v2", "v3"], Y5 = ["v4"], K1 = {
6766
6770
  zero: 0,
6767
6771
  one: 1,
6768
6772
  two: 2,
6769
6773
  few: 3,
6770
6774
  many: 4,
6771
6775
  other: 5
6772
- }, Y5 = () => {
6776
+ }, U5 = () => {
6773
6777
  const i = {};
6774
- return K5.forEach((e) => {
6778
+ return P5.forEach((e) => {
6775
6779
  e.lngs.forEach((t) => {
6776
6780
  i[t] = {
6777
6781
  numbers: e.nr,
6778
- plurals: P5[e.fc]
6782
+ plurals: $5[e.fc]
6779
6783
  };
6780
6784
  });
6781
6785
  }), i;
6782
6786
  };
6783
- class U5 {
6787
+ class z5 {
6784
6788
  constructor(e) {
6785
6789
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6786
- this.languageUtils = e, this.options = t, this.logger = G.create("pluralResolver"), (!this.options.compatibilityJSON || F5.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 = Y5(), this.pluralRulesCache = {};
6790
+ this.languageUtils = e, this.options = t, this.logger = G.create("pluralResolver"), (!this.options.compatibilityJSON || Y5.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 = U5(), this.pluralRulesCache = {};
6787
6791
  }
6788
6792
  addRule(e, t) {
6789
6793
  this.rules[e] = t;
@@ -6841,14 +6845,14 @@ class U5 {
6841
6845
  return this.options.compatibilityJSON === "v1" ? s === 1 ? "" : typeof s == "number" ? `_plural_${s.toString()}` : r() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? r() : this.options.prepend && n.toString() ? this.options.prepend + n.toString() : n.toString();
6842
6846
  }
6843
6847
  shouldUseIntlApi() {
6844
- return !$5.includes(this.options.compatibilityJSON);
6848
+ return !F5.includes(this.options.compatibilityJSON);
6845
6849
  }
6846
6850
  }
6847
6851
  const P1 = function(i, e, t) {
6848
- let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, r = A5(i, e, t);
6852
+ let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, r = T5(i, e, t);
6849
6853
  return !r && s && k(t) && (r = M1(i, t, n), r === void 0 && (r = M1(e, t, n))), r;
6850
6854
  }, x1 = (i) => i.replace(/\$/g, "$$$$");
6851
- class z5 {
6855
+ class J5 {
6852
6856
  constructor() {
6853
6857
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
6854
6858
  this.logger = G.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
@@ -6877,7 +6881,7 @@ class z5 {
6877
6881
  maxReplaces: E,
6878
6882
  alwaysFormat: M
6879
6883
  } = e.interpolation;
6880
- this.escape = t !== void 0 ? t : Z5, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = r ? X(r) : c || "{{", this.suffix = a ? X(a) : g || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = u ? X(u) : p || X("$t("), this.nestingSuffix = w ? X(w) : L || X(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = E || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
6884
+ this.escape = t !== void 0 ? t : D5, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = r ? X(r) : c || "{{", this.suffix = a ? X(a) : g || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = u ? X(u) : p || X("$t("), this.nestingSuffix = w ? X(w) : L || X(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = E || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
6881
6885
  }
6882
6886
  reset() {
6883
6887
  this.options && this.init(this.options);
@@ -6972,7 +6976,7 @@ class z5 {
6972
6976
  return e;
6973
6977
  }
6974
6978
  }
6975
- const J5 = (i) => {
6979
+ const Q5 = (i) => {
6976
6980
  let e = i.toLowerCase().trim();
6977
6981
  const t = {};
6978
6982
  if (i.indexOf("(") > -1) {
@@ -7003,7 +7007,7 @@ const J5 = (i) => {
7003
7007
  return a || (a = i(p1(n), s), e[c] = a), a(t);
7004
7008
  };
7005
7009
  };
7006
- class Q5 {
7010
+ class q5 {
7007
7011
  constructor() {
7008
7012
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
7009
7013
  this.logger = G.create("formatter"), this.options = e, this.formats = {
@@ -7063,7 +7067,7 @@ class Q5 {
7063
7067
  const {
7064
7068
  formatName: d,
7065
7069
  formatOptions: l
7066
- } = J5(g);
7070
+ } = Q5(g);
7067
7071
  if (this.formats[d]) {
7068
7072
  let h = a;
7069
7073
  try {
@@ -7083,10 +7087,10 @@ class Q5 {
7083
7087
  }, e);
7084
7088
  }
7085
7089
  }
7086
- const q5 = (i, e) => {
7090
+ const X5 = (i, e) => {
7087
7091
  i.pending[e] !== void 0 && (delete i.pending[e], i.pendingCount--);
7088
7092
  };
7089
- class X5 extends k1 {
7093
+ class ei extends k1 {
7090
7094
  constructor(e, t, n) {
7091
7095
  let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
7092
7096
  super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = s, this.logger = G.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(n, s.backend, s);
@@ -7119,7 +7123,7 @@ class X5 extends k1 {
7119
7123
  }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
7120
7124
  const a = {};
7121
7125
  this.queue.forEach((g) => {
7122
- V5(g.loaded, [r], c), q5(g, e), t && g.errors.push(t), g.pendingCount === 0 && !g.done && (Object.keys(g.loaded).forEach((d) => {
7126
+ A5(g.loaded, [r], c), X5(g, e), t && g.errors.push(t), g.pendingCount === 0 && !g.done && (Object.keys(g.loaded).forEach((d) => {
7123
7127
  a[d] || (a[d] = {});
7124
7128
  const l = g.loaded[d];
7125
7129
  l.length && l.forEach((h) => {
@@ -7278,7 +7282,7 @@ const $1 = () => ({
7278
7282
  skipOnVariables: !0
7279
7283
  }
7280
7284
  }), F1 = (i) => (k(i.ns) && (i.ns = [i.ns]), k(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), k(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), u1 = () => {
7281
- }, ei = (i) => {
7285
+ }, ti = (i) => {
7282
7286
  Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
7283
7287
  typeof i[t] == "function" && (i[t] = i[t].bind(i));
7284
7288
  });
@@ -7288,7 +7292,7 @@ class l1 extends k1 {
7288
7292
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
7289
7293
  if (super(), this.options = F1(e), this.services = {}, this.logger = G, this.modules = {
7290
7294
  external: []
7291
- }, ei(this), t && !this.isInitialized && !e.isClone) {
7295
+ }, ti(this), t && !this.isInitialized && !e.isClone) {
7292
7296
  if (!this.options.initImmediate)
7293
7297
  return this.init(e, t), this;
7294
7298
  setTimeout(() => {
@@ -7313,17 +7317,17 @@ class l1 extends k1 {
7313
7317
  if (!this.options.isClone) {
7314
7318
  this.modules.logger ? G.init(r(this.modules.logger), this.options) : G.init(null, this.options);
7315
7319
  let l;
7316
- this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = Q5);
7320
+ this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = q5);
7317
7321
  const h = new W1(this.options);
7318
7322
  this.store = new j1(this.options.resources, this.options);
7319
7323
  const u = this.services;
7320
- u.logger = G, u.resourceStore = this.store, u.languageUtils = h, u.pluralResolver = new U5(h, {
7324
+ u.logger = G, u.resourceStore = this.store, u.languageUtils = h, u.pluralResolver = new z5(h, {
7321
7325
  prepend: this.options.pluralSeparator,
7322
7326
  compatibilityJSON: this.options.compatibilityJSON,
7323
7327
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
7324
- }), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (u.formatter = r(l), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new z5(this.options), u.utils = {
7328
+ }), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (u.formatter = r(l), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new J5(this.options), u.utils = {
7325
7329
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
7326
- }, u.backendConnector = new X5(r(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", function(p) {
7330
+ }, u.backendConnector = new ei(r(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", function(p) {
7327
7331
  for (var w = arguments.length, L = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
7328
7332
  L[m - 1] = arguments[m];
7329
7333
  e.emit(p, ...L);
@@ -7537,7 +7541,7 @@ V.setDefaultNamespace;
7537
7541
  V.hasLoadedNamespace;
7538
7542
  V.loadNamespaces;
7539
7543
  V.loadLanguages;
7540
- function ti() {
7544
+ function ii() {
7541
7545
  if (console && console.warn) {
7542
7546
  for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
7543
7547
  e[t] = arguments[t];
@@ -7548,7 +7552,7 @@ const Y1 = {};
7548
7552
  function b1() {
7549
7553
  for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
7550
7554
  e[t] = arguments[t];
7551
- z(e[0]) && Y1[e[0]] || (z(e[0]) && (Y1[e[0]] = /* @__PURE__ */ new Date()), ti(...e));
7555
+ z(e[0]) && Y1[e[0]] || (z(e[0]) && (Y1[e[0]] = /* @__PURE__ */ new Date()), ii(...e));
7552
7556
  }
7553
7557
  const oe = (i, e) => () => {
7554
7558
  if (i.isInitialized)
@@ -7567,7 +7571,7 @@ const oe = (i, e) => () => {
7567
7571
  z(t) && (t = [t]), t.forEach((s) => {
7568
7572
  i.options.ns.indexOf(s) < 0 && i.options.ns.push(s);
7569
7573
  }), i.loadLanguages(e, oe(i, n));
7570
- }, ii = function(i, e) {
7574
+ }, ni = function(i, e) {
7571
7575
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
7572
7576
  const n = e.languages[0], s = e.options ? e.options.fallbackLng : !1, r = e.languages[e.languages.length - 1];
7573
7577
  if (n.toLowerCase() === "cimode") return !0;
@@ -7576,15 +7580,15 @@ const oe = (i, e) => () => {
7576
7580
  return d === -1 || d === 2;
7577
7581
  };
7578
7582
  return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !c(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(n, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || c(n, i) && (!s || c(r, i)));
7579
- }, ni = function(i, e) {
7583
+ }, si = function(i, e) {
7580
7584
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
7581
7585
  return !e.languages || !e.languages.length ? (b1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
7582
7586
  lng: t.lng,
7583
7587
  precheck: (s, r) => {
7584
7588
  if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && s.services.backendConnector.backend && s.isLanguageChangingTo && !r(s.isLanguageChangingTo, i)) return !1;
7585
7589
  }
7586
- }) : ii(i, e, t);
7587
- }, z = (i) => typeof i == "string", si = (i) => typeof i == "object" && i !== null, oi = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, ri = {
7590
+ }) : ni(i, e, t);
7591
+ }, z = (i) => typeof i == "string", oi = (i) => typeof i == "object" && i !== null, ri = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, ai = {
7588
7592
  "&amp;": "&",
7589
7593
  "&#38;": "&",
7590
7594
  "&lt;": "<",
@@ -7605,7 +7609,7 @@ const oe = (i, e) => () => {
7605
7609
  "&#8230;": "…",
7606
7610
  "&#x2F;": "/",
7607
7611
  "&#47;": "/"
7608
- }, ai = (i) => ri[i], li = (i) => i.replace(oi, ai);
7612
+ }, li = (i) => ai[i], hi = (i) => i.replace(ri, li);
7609
7613
  let y1 = {
7610
7614
  bindI18n: "languageChanged",
7611
7615
  bindI18nStore: "",
@@ -7614,25 +7618,25 @@ let y1 = {
7614
7618
  transWrapTextNodes: "",
7615
7619
  transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
7616
7620
  useSuspense: !0,
7617
- unescape: li
7621
+ unescape: hi
7618
7622
  };
7619
- const hi = function() {
7623
+ const ci = function() {
7620
7624
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
7621
7625
  y1 = {
7622
7626
  ...y1,
7623
7627
  ...i
7624
7628
  };
7625
- }, ci = () => y1;
7629
+ }, di = () => y1;
7626
7630
  let re;
7627
- const di = (i) => {
7631
+ const gi = (i) => {
7628
7632
  re = i;
7629
- }, gi = () => re, ui = {
7633
+ }, ui = () => re, Ci = {
7630
7634
  type: "3rdParty",
7631
7635
  init(i) {
7632
- hi(i.options.react), di(i);
7636
+ ci(i.options.react), gi(i);
7633
7637
  }
7634
- }, Ci = t1();
7635
- class pi {
7638
+ }, pi = t1();
7639
+ class fi {
7636
7640
  constructor() {
7637
7641
  I1(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces));
7638
7642
  this.usedNamespaces = {};
@@ -7643,27 +7647,27 @@ class pi {
7643
7647
  });
7644
7648
  }
7645
7649
  }
7646
- const fi = (i, e) => {
7650
+ const mi = (i, e) => {
7647
7651
  const t = J();
7648
7652
  return S(() => {
7649
7653
  t.current = i;
7650
7654
  }, [i, e]), t.current;
7651
- }, ae = (i, e, t, n) => i.getFixedT(e, t, n), mi = (i, e, t, n) => j(ae(i, e, t, n), [i, e, t, n]), wi = function(i) {
7655
+ }, ae = (i, e, t, n) => i.getFixedT(e, t, n), wi = (i, e, t, n) => j(ae(i, e, t, n), [i, e, t, n]), ki = function(i) {
7652
7656
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
7653
7657
  const {
7654
7658
  i18n: t
7655
7659
  } = e, {
7656
7660
  i18n: n,
7657
7661
  defaultNS: s
7658
- } = Q(Ci) || {}, r = t || n || gi();
7659
- if (r && !r.reportNamespaces && (r.reportNamespaces = new pi()), !r) {
7662
+ } = Q(pi) || {}, r = t || n || ui();
7663
+ if (r && !r.reportNamespaces && (r.reportNamespaces = new fi()), !r) {
7660
7664
  b1("You will need to pass in an i18next instance by using initReactI18next");
7661
- const f = (v, N) => z(N) ? N : si(N) && z(N.defaultValue) ? N.defaultValue : Array.isArray(v) ? v[v.length - 1] : v, R = [f, {}, !1];
7665
+ const f = (v, N) => z(N) ? N : oi(N) && z(N.defaultValue) ? N.defaultValue : Array.isArray(v) ? v[v.length - 1] : v, R = [f, {}, !1];
7662
7666
  return R.t = f, R.i18n = {}, R.ready = !1, R;
7663
7667
  }
7664
7668
  r.options.react && r.options.react.wait !== void 0 && b1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
7665
7669
  const c = {
7666
- ...ci(),
7670
+ ...di(),
7667
7671
  ...r.options.react,
7668
7672
  ...e
7669
7673
  }, {
@@ -7672,10 +7676,10 @@ const fi = (i, e) => {
7672
7676
  } = c;
7673
7677
  let d = i;
7674
7678
  d = z(d) ? [d] : d || ["translation"], r.reportNamespaces.addUsedNamespaces && r.reportNamespaces.addUsedNamespaces(d);
7675
- const l = (r.isInitialized || r.initializedStoreOnce) && d.every((f) => ni(f, r, c)), h = mi(r, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => ae(r, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, L] = O(u);
7679
+ const l = (r.isInitialized || r.initializedStoreOnce) && d.every((f) => si(f, r, c)), h = wi(r, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => ae(r, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, L] = O(u);
7676
7680
  let m = d.join();
7677
7681
  e.lng && (m = `${e.lng}${m}`);
7678
- const E = fi(m), M = J(!0);
7682
+ const E = mi(m), M = J(!0);
7679
7683
  S(() => {
7680
7684
  const {
7681
7685
  bindI18n: f,
@@ -7700,24 +7704,24 @@ const fi = (i, e) => {
7700
7704
  throw new Promise((f) => {
7701
7705
  e.lng ? z1(r, e.lng, d, () => f()) : U1(r, d, () => f());
7702
7706
  });
7703
- }, ki = "Country", Li = {
7704
- placeholder: ki
7705
- }, vi = "Страна", Ni = {
7706
- placeholder: vi
7707
+ }, Li = "Country", vi = {
7708
+ placeholder: Li
7709
+ }, Ni = "Страна", xi = {
7710
+ placeholder: Ni
7707
7711
  };
7708
- V.use(ui).init({
7712
+ V.use(Ci).init({
7709
7713
  defaultNS: "common",
7710
7714
  lng: "en",
7711
7715
  resources: {
7712
7716
  en: {
7713
- common: Li
7717
+ common: vi
7714
7718
  },
7715
7719
  ru: {
7716
- common: Ni
7720
+ common: xi
7717
7721
  }
7718
7722
  }
7719
7723
  });
7720
- const Hi = w1(
7724
+ const Ii = w1(
7721
7725
  ({
7722
7726
  width: i,
7723
7727
  selectedCity: e,
@@ -7736,7 +7740,7 @@ const Hi = w1(
7736
7740
  `CountrySelect requires "axiosPeople" to fetch counties.
7737
7741
  Please provide it via SNMTUiContext.`
7738
7742
  );
7739
- const { t: H } = wi("common", { lng: E }), f = j(async () => {
7743
+ const { t: H } = ki("common", { lng: E }), f = j(async () => {
7740
7744
  m(!0);
7741
7745
  try {
7742
7746
  const v = await M.post("v1/countries/search");
@@ -7773,7 +7777,7 @@ const Hi = w1(
7773
7777
  v === null ? (n(""), t && t("")) : (n(v), t && t(""));
7774
7778
  };
7775
7779
  return /* @__PURE__ */ o("div", { className: "snmt-country-select", children: /* @__PURE__ */ o(
7776
- I5,
7780
+ O5,
7777
7781
  {
7778
7782
  id: r,
7779
7783
  width: i,
@@ -7792,5 +7796,5 @@ const Hi = w1(
7792
7796
  }
7793
7797
  );
7794
7798
  export {
7795
- Hi as CountrySelect
7799
+ Ii as CountrySelect
7796
7800
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snmt-react-ui/country-select",
3
3
  "private": false,
4
- "version": "2.7.1",
4
+ "version": "2.7.2",
5
5
  "type": "module",
6
6
  "main": "dist/country-select.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "build": "tsc && vite build"
19
19
  },
20
20
  "dependencies": {
21
- "@snmt-react-ui/city-select": "^2.7.1",
21
+ "@snmt-react-ui/city-select": "^2.7.2",
22
22
  "@snmt-react-ui/core": "^2.4.0",
23
23
  "@snmt-react-ui/flex": "^1.6.0",
24
24
  "i18next": "^23.11.5",
@@ -27,5 +27,5 @@
27
27
  "peerDependencies": {
28
28
  "antd": "^5.18.3"
29
29
  },
30
- "gitHead": "b2140fff934bfa6a07b26714b36c79e1937e0ae9"
30
+ "gitHead": "91950a2410825f6d5526afb073c0f5e5629d441f"
31
31
  }