mui-tel-input 2.0.1 → 2.0.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.
@@ -651,10 +651,16 @@ function M2(t, l) {
651
651
  function x2(t, l) {
652
652
  return t.some((e) => x3[e].includes(l));
653
653
  }
654
+ function H2(t, l) {
655
+ return [...t].sort((e, i) => {
656
+ const a = l.of(e), d = l.of(i);
657
+ return a.localeCompare(d);
658
+ });
659
+ }
654
660
  function k(...t) {
655
661
  process.env.NODE_ENV !== "production" && console.error(...t);
656
662
  }
657
- function H2(t = Y) {
663
+ function y2(t = Y) {
658
664
  try {
659
665
  return new Intl.DisplayNames(t, {
660
666
  type: "region"
@@ -674,17 +680,20 @@ const b1 = (t) => {
674
680
  langOfCountryName: d,
675
681
  continents: r,
676
682
  preferredCountries: n
677
- } = t, [c] = $.useState(() => M2(f2, {
678
- onlyCountries: a,
679
- excludedCountries: i,
680
- continents: r,
681
- preferredCountries: n
682
- })), [h] = $.useState(() => e), [s] = $.useState(() => H2(d));
683
+ } = t, [c] = $.useState(() => y2(d)), [h] = $.useState(() => {
684
+ const o = H2(f2, c);
685
+ return M2(o, {
686
+ onlyCountries: a,
687
+ excludedCountries: i,
688
+ continents: r,
689
+ preferredCountries: n
690
+ });
691
+ }), [s] = $.useState(() => e);
683
692
  return /* @__PURE__ */ p(H1, {
684
- children: c.map((o) => /* @__PURE__ */ p(g2, {
685
- onSelectCountry: h,
693
+ children: h.map((o) => /* @__PURE__ */ p(g2, {
694
+ onSelectCountry: s,
686
695
  isoCode: o,
687
- displayNames: s,
696
+ displayNames: c,
688
697
  selected: o === l,
689
698
  id: `country-${o}`
690
699
  }, o))
@@ -739,7 +748,7 @@ A1.defaultProps = {
739
748
  preferredCountries: [],
740
749
  langOfCountryName: Y
741
750
  };
742
- function y2(t) {
751
+ function b2(t) {
743
752
  t.focus();
744
753
  const { length: l } = t.value;
745
754
  t.setSelectionRange(l, l);
@@ -747,7 +756,7 @@ function y2(t) {
747
756
  function a3(t, l) {
748
757
  typeof l == "function" ? l(t) : l && o2(l) && "current" in l && (l.current = t);
749
758
  }
750
- function b2(t) {
759
+ function A2(t) {
751
760
  const { defaultCountry: l, onlyCountries: e, excludedCountries: i, continents: a } = t;
752
761
  $.useEffect(() => {
753
762
  if (e && i) {
@@ -762,7 +771,7 @@ function b2(t) {
762
771
  l && a && a.length > 0 && (a.some((r) => x3[r].includes(l)) || k(`[mui-tel-input] Not expected to have a 'defaultCountry' prop (${l}) and a 'continents' prop that are not contain the country (${l})`));
763
772
  }, [l, a]);
764
773
  }
765
- function A2(t, l) {
774
+ function C2(t, l) {
766
775
  var e = Array.prototype.slice.call(l);
767
776
  return e.push(M3), t.apply(this, e);
768
777
  }
@@ -779,19 +788,19 @@ function B3(t, l) {
779
788
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
780
789
  }
781
790
  }
782
- function C2(t, l, e) {
791
+ function F2(t, l, e) {
783
792
  return l && B3(t.prototype, l), e && B3(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
784
793
  }
785
- function F2(t, l) {
794
+ function D2(t, l) {
786
795
  if (!(t instanceof l))
787
796
  throw new TypeError("Cannot call a class as a function");
788
797
  }
789
- function D2(t, l) {
798
+ function N2(t, l) {
790
799
  if (typeof l != "function" && l !== null)
791
800
  throw new TypeError("Super expression must either be null or a function");
792
801
  t.prototype = Object.create(l && l.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), l && _(t, l);
793
802
  }
794
- function N2(t) {
803
+ function L2(t) {
795
804
  var l = F1();
796
805
  return function() {
797
806
  var i = G(t), a;
@@ -800,10 +809,10 @@ function N2(t) {
800
809
  a = Reflect.construct(i, arguments, d);
801
810
  } else
802
811
  a = i.apply(this, arguments);
803
- return L2(this, a);
812
+ return B2(this, a);
804
813
  };
805
814
  }
806
- function L2(t, l) {
815
+ function B2(t, l) {
807
816
  if (l && (f3(l) === "object" || typeof l == "function"))
808
817
  return l;
809
818
  if (l !== void 0)
@@ -818,7 +827,7 @@ function C1(t) {
818
827
  function u3(t) {
819
828
  var l = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
820
829
  return u3 = function(i) {
821
- if (i === null || !B2(i))
830
+ if (i === null || !P2(i))
822
831
  return i;
823
832
  if (typeof i != "function")
824
833
  throw new TypeError("Super expression must either be null or a function");
@@ -853,7 +862,7 @@ function F1() {
853
862
  return !1;
854
863
  }
855
864
  }
856
- function B2(t) {
865
+ function P2(t) {
857
866
  return Function.toString.call(t).indexOf("[native code]") !== -1;
858
867
  }
859
868
  function _(t, l) {
@@ -867,14 +876,14 @@ function G(t) {
867
876
  }, G(t);
868
877
  }
869
878
  var B = /* @__PURE__ */ function(t) {
870
- D2(e, t);
871
- var l = N2(e);
879
+ N2(e, t);
880
+ var l = L2(e);
872
881
  function e(i) {
873
882
  var a;
874
- return F2(this, e), a = l.call(this, i), Object.setPrototypeOf(C1(a), e.prototype), a.name = a.constructor.name, a;
883
+ return D2(this, e), a = l.call(this, i), Object.setPrototypeOf(C1(a), e.prototype), a.name = a.constructor.name, a;
875
884
  }
876
- return C2(e);
877
- }(/* @__PURE__ */ u3(Error)), H3 = 2, P2 = 17, E2 = 3, H = "0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9", I2 = "-\u2010-\u2015\u2212\u30FC\uFF0D", S2 = "\uFF0F/", O2 = "\uFF0E.", T2 = " \xA0\xAD\u200B\u2060\u3000", V2 = "()\uFF08\uFF09\uFF3B\uFF3D\\[\\]", R2 = "~\u2053\u223C\uFF5E", b = "".concat(I2).concat(S2).concat(O2).concat(T2).concat(V2).concat(R2), Q = "+\uFF0B";
885
+ return F2(e);
886
+ }(/* @__PURE__ */ u3(Error)), H3 = 2, E2 = 17, I2 = 3, H = "0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9", S2 = "-\u2010-\u2015\u2212\u30FC\uFF0D", O2 = "\uFF0F/", T2 = "\uFF0E.", V2 = " \xA0\xAD\u200B\u2060\u3000", R2 = "()\uFF08\uFF09\uFF3B\uFF3D\\[\\]", k2 = "~\u2053\u223C\uFF5E", b = "".concat(S2).concat(O2).concat(T2).concat(V2).concat(R2).concat(k2), Q = "+\uFF0B";
878
887
  function P3(t, l) {
879
888
  t = t.split("-"), l = l.split("-");
880
889
  for (var e = t[0].split("."), i = l[0].split("."), a = 0; a < 3; a++) {
@@ -910,9 +919,9 @@ function E3(t, l) {
910
919
  function e3(t, l, e) {
911
920
  return l && E3(t.prototype, l), e && E3(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
912
921
  }
913
- var k2 = "1.2.0", _2 = "1.7.35", I3 = " ext. ", G2 = /^\d+$/, x = /* @__PURE__ */ function() {
922
+ var _2 = "1.2.0", G2 = "1.7.35", I3 = " ext. ", j2 = /^\d+$/, x = /* @__PURE__ */ function() {
914
923
  function t(l) {
915
- q(this, t), Z2(l), this.metadata = l, D1.call(this, l);
924
+ q(this, t), Y2(l), this.metadata = l, D1.call(this, l);
916
925
  }
917
926
  return e3(t, [{
918
927
  key: "getCountries",
@@ -964,7 +973,7 @@ var k2 = "1.2.0", _2 = "1.7.35", I3 = " ext. ", G2 = /^\d+$/, x = /* @__PURE__ *
964
973
  }, {
965
974
  key: "selectNumberingPlan",
966
975
  value: function(e, i) {
967
- if (e && G2.test(e) && (i = e, e = null), e && e !== "001") {
976
+ if (e && j2.test(e) && (i = e, e = null), e && e !== "001") {
968
977
  if (!this.hasCountry(e))
969
978
  throw new Error("Unknown country: ".concat(e));
970
979
  this.numberingPlan = new S3(this.getCountryMetadata(e), this);
@@ -1129,7 +1138,7 @@ var k2 = "1.2.0", _2 = "1.7.35", I3 = " ext. ", G2 = /^\d+$/, x = /* @__PURE__ *
1129
1138
  value: function() {
1130
1139
  var e = this, i = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];
1131
1140
  return i.map(function(a) {
1132
- return new j2(a, e);
1141
+ return new U2(a, e);
1133
1142
  });
1134
1143
  }
1135
1144
  }, {
@@ -1191,7 +1200,7 @@ var k2 = "1.2.0", _2 = "1.7.35", I3 = " ext. ", G2 = /^\d+$/, x = /* @__PURE__ *
1191
1200
  key: "type",
1192
1201
  value: function(e) {
1193
1202
  if (this.hasTypes() && O3(this.types(), e))
1194
- return new W2(O3(this.types(), e), this);
1203
+ return new Z2(O3(this.types(), e), this);
1195
1204
  }
1196
1205
  }, {
1197
1206
  key: "ext",
@@ -1199,7 +1208,7 @@ var k2 = "1.2.0", _2 = "1.7.35", I3 = " ext. ", G2 = /^\d+$/, x = /* @__PURE__ *
1199
1208
  return this.v1 || this.v2 ? I3 : this.metadata[13] || I3;
1200
1209
  }
1201
1210
  }]), t;
1202
- }(), j2 = /* @__PURE__ */ function() {
1211
+ }(), U2 = /* @__PURE__ */ function() {
1203
1212
  function t(l, e) {
1204
1213
  q(this, t), this._format = l, this.metadata = e;
1205
1214
  }
@@ -1236,7 +1245,7 @@ var k2 = "1.2.0", _2 = "1.7.35", I3 = " ext. ", G2 = /^\d+$/, x = /* @__PURE__ *
1236
1245
  }, {
1237
1246
  key: "usesNationalPrefix",
1238
1247
  value: function() {
1239
- return !!(this.nationalPrefixFormattingRule() && !U2.test(this.nationalPrefixFormattingRule()));
1248
+ return !!(this.nationalPrefixFormattingRule() && !W2.test(this.nationalPrefixFormattingRule()));
1240
1249
  }
1241
1250
  }, {
1242
1251
  key: "internationalFormat",
@@ -1244,7 +1253,7 @@ var k2 = "1.2.0", _2 = "1.7.35", I3 = " ext. ", G2 = /^\d+$/, x = /* @__PURE__ *
1244
1253
  return this._format[5] || this.format();
1245
1254
  }
1246
1255
  }]), t;
1247
- }(), U2 = /^\(?\$1\)?$/, W2 = /* @__PURE__ */ function() {
1256
+ }(), W2 = /^\(?\$1\)?$/, Z2 = /* @__PURE__ */ function() {
1248
1257
  function t(l, e) {
1249
1258
  q(this, t), this.type = l, this.metadata = e;
1250
1259
  }
@@ -1285,15 +1294,15 @@ function O3(t, l) {
1285
1294
  return t[9];
1286
1295
  }
1287
1296
  }
1288
- function Z2(t) {
1297
+ function Y2(t) {
1289
1298
  if (!t)
1290
1299
  throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");
1291
1300
  if (!d3(t) || !d3(t.countries))
1292
- throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(d3(t) ? "an object of shape: { " + Object.keys(t).join(", ") + " }" : "a " + Y2(t) + ": " + t, "."));
1301
+ throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(d3(t) ? "an object of shape: { " + Object.keys(t).join(", ") + " }" : "a " + K2(t) + ": " + t, "."));
1293
1302
  }
1294
1303
  var d3 = function(l) {
1295
1304
  return K(l) === "object";
1296
- }, Y2 = function(l) {
1305
+ }, K2 = function(l) {
1297
1306
  return K(l);
1298
1307
  };
1299
1308
  function y3(t, l) {
@@ -1301,29 +1310,29 @@ function y3(t, l) {
1301
1310
  return l.country(t).countryCallingCode();
1302
1311
  throw new Error("Unknown country: ".concat(t));
1303
1312
  }
1304
- function K2(t, l) {
1313
+ function X2(t, l) {
1305
1314
  return l.countries[t] !== void 0;
1306
1315
  }
1307
1316
  function D1(t) {
1308
1317
  var l = t.version;
1309
- typeof l == "number" ? (this.v1 = l === 1, this.v2 = l === 2, this.v3 = l === 3, this.v4 = l === 4) : l ? P3(l, k2) === -1 ? this.v2 = !0 : P3(l, _2) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
1318
+ typeof l == "number" ? (this.v1 = l === 1, this.v2 = l === 2, this.v3 = l === 3, this.v4 = l === 4) : l ? P3(l, _2) === -1 ? this.v2 = !0 : P3(l, G2) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
1310
1319
  }
1311
- var X2 = ";ext=", E = function(l) {
1320
+ var J2 = ";ext=", E = function(l) {
1312
1321
  return "([".concat(H, "]{1,").concat(l, "})");
1313
1322
  };
1314
1323
  function N1(t) {
1315
- var l = "20", e = "15", i = "9", a = "6", d = "[ \xA0\\t,]*", r = "[:\\.\uFF0E]?[ \xA0\\t,-]*", n = "#?", c = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)", h = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)", s = "[- ]+", o = "[ \xA0\\t]*", v = "(?:,{2}|;)", u = X2 + E(l), w = d + c + r + E(l) + n, z = d + h + r + E(i) + n, g = s + E(a) + "#", A = o + v + r + E(e) + n, S = o + "(?:,)+" + r + E(i) + n;
1324
+ var l = "20", e = "15", i = "9", a = "6", d = "[ \xA0\\t,]*", r = "[:\\.\uFF0E]?[ \xA0\\t,-]*", n = "#?", c = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)", h = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)", s = "[- ]+", o = "[ \xA0\\t]*", v = "(?:,{2}|;)", u = J2 + E(l), w = d + c + r + E(l) + n, z = d + h + r + E(i) + n, g = s + E(a) + "#", A = o + v + r + E(e) + n, S = o + "(?:,)+" + r + E(i) + n;
1316
1325
  return u + "|" + w + "|" + z + "|" + g + "|" + A + "|" + S;
1317
1326
  }
1318
- var J2 = "[" + H + "]{" + H3 + "}", Q2 = "[" + Q + "]{0,1}(?:[" + b + "]*[" + H + "]){3,}[" + b + H + "]*", q2 = new RegExp("^[" + Q + "]{0,1}(?:[" + b + "]*[" + H + "]){1,2}$", "i"), e0 = Q2 + "(?:" + N1() + ")?", t0 = new RegExp("^" + J2 + "$|^" + e0 + "$", "i");
1327
+ var Q2 = "[" + H + "]{" + H3 + "}", q2 = "[" + Q + "]{0,1}(?:[" + b + "]*[" + H + "]){3,}[" + b + H + "]*", e0 = new RegExp("^[" + Q + "]{0,1}(?:[" + b + "]*[" + H + "]){1,2}$", "i"), t0 = q2 + "(?:" + N1() + ")?", l0 = new RegExp("^" + Q2 + "$|^" + t0 + "$", "i");
1319
1328
  function L1(t) {
1320
- return t.length >= H3 && t0.test(t);
1329
+ return t.length >= H3 && l0.test(t);
1321
1330
  }
1322
- function l0(t) {
1323
- return q2.test(t);
1331
+ function i0(t) {
1332
+ return e0.test(t);
1324
1333
  }
1325
1334
  var T3 = new RegExp("(?:" + N1() + ")$", "i");
1326
- function i0(t) {
1335
+ function a0(t) {
1327
1336
  var l = t.search(T3);
1328
1337
  if (l < 0)
1329
1338
  return {};
@@ -1336,11 +1345,11 @@ function i0(t) {
1336
1345
  a++;
1337
1346
  }
1338
1347
  }
1339
- function a0(t, l) {
1348
+ function d0(t, l) {
1340
1349
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1341
1350
  if (e)
1342
1351
  return (e = e.call(t)).next.bind(e);
1343
- if (Array.isArray(t) || (e = d0(t)) || l && t && typeof t.length == "number") {
1352
+ if (Array.isArray(t) || (e = r0(t)) || l && t && typeof t.length == "number") {
1344
1353
  e && (t = e);
1345
1354
  var i = 0;
1346
1355
  return function() {
@@ -1350,7 +1359,7 @@ function a0(t, l) {
1350
1359
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1351
1360
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1352
1361
  }
1353
- function d0(t, l) {
1362
+ function r0(t, l) {
1354
1363
  if (!!t) {
1355
1364
  if (typeof t == "string")
1356
1365
  return V3(t, l);
@@ -1367,7 +1376,7 @@ function V3(t, l) {
1367
1376
  i[e] = t[e];
1368
1377
  return i;
1369
1378
  }
1370
- var r0 = {
1379
+ var n0 = {
1371
1380
  0: "0",
1372
1381
  1: "1",
1373
1382
  2: "2",
@@ -1410,20 +1419,20 @@ var r0 = {
1410
1419
  "\u06F9": "9"
1411
1420
  };
1412
1421
  function B1(t) {
1413
- return r0[t];
1422
+ return n0[t];
1414
1423
  }
1415
1424
  function X(t) {
1416
- for (var l = "", e = a0(t.split("")), i; !(i = e()).done; ) {
1425
+ for (var l = "", e = d0(t.split("")), i; !(i = e()).done; ) {
1417
1426
  var a = i.value, d = B1(a);
1418
1427
  d && (l += d);
1419
1428
  }
1420
1429
  return l;
1421
1430
  }
1422
- function n0(t, l) {
1431
+ function c0(t, l) {
1423
1432
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1424
1433
  if (e)
1425
1434
  return (e = e.call(t)).next.bind(e);
1426
- if (Array.isArray(t) || (e = c0(t)) || l && t && typeof t.length == "number") {
1435
+ if (Array.isArray(t) || (e = h0(t)) || l && t && typeof t.length == "number") {
1427
1436
  e && (t = e);
1428
1437
  var i = 0;
1429
1438
  return function() {
@@ -1433,7 +1442,7 @@ function n0(t, l) {
1433
1442
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1434
1443
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1435
1444
  }
1436
- function c0(t, l) {
1445
+ function h0(t, l) {
1437
1446
  if (!!t) {
1438
1447
  if (typeof t == "string")
1439
1448
  return R3(t, l);
@@ -1451,20 +1460,20 @@ function R3(t, l) {
1451
1460
  return i;
1452
1461
  }
1453
1462
  function k3(t) {
1454
- for (var l = "", e = n0(t.split("")), i; !(i = e()).done; ) {
1463
+ for (var l = "", e = c0(t.split("")), i; !(i = e()).done; ) {
1455
1464
  var a = i.value;
1456
- l += h0(a, l) || "";
1465
+ l += s0(a, l) || "";
1457
1466
  }
1458
1467
  return l;
1459
1468
  }
1460
- function h0(t, l) {
1469
+ function s0(t, l) {
1461
1470
  return t === "+" ? l ? void 0 : "+" : B1(t);
1462
1471
  }
1463
- function s0(t, l) {
1472
+ function o0(t, l) {
1464
1473
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1465
1474
  if (e)
1466
1475
  return (e = e.call(t)).next.bind(e);
1467
- if (Array.isArray(t) || (e = o0(t)) || l && t && typeof t.length == "number") {
1476
+ if (Array.isArray(t) || (e = v0(t)) || l && t && typeof t.length == "number") {
1468
1477
  e && (t = e);
1469
1478
  var i = 0;
1470
1479
  return function() {
@@ -1474,7 +1483,7 @@ function s0(t, l) {
1474
1483
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1475
1484
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1476
1485
  }
1477
- function o0(t, l) {
1486
+ function v0(t, l) {
1478
1487
  if (!!t) {
1479
1488
  if (typeof t == "string")
1480
1489
  return _3(t, l);
@@ -1491,8 +1500,8 @@ function _3(t, l) {
1491
1500
  i[e] = t[e];
1492
1501
  return i;
1493
1502
  }
1494
- function v0(t, l) {
1495
- for (var e = t.slice(), i = s0(l), a; !(a = i()).done; ) {
1503
+ function f0(t, l) {
1504
+ for (var e = t.slice(), i = o0(l), a; !(a = i()).done; ) {
1496
1505
  var d = a.value;
1497
1506
  t.indexOf(d) < 0 && e.push(d);
1498
1507
  }
@@ -1511,13 +1520,13 @@ function P1(t, l, e) {
1511
1520
  if (!e.type("FIXED_LINE"))
1512
1521
  return P1(t, "MOBILE", e);
1513
1522
  var d = e.type("MOBILE");
1514
- d && (a = v0(a, d.possibleLengths()));
1523
+ d && (a = f0(a, d.possibleLengths()));
1515
1524
  } else if (l && !i)
1516
1525
  return "INVALID_LENGTH";
1517
1526
  var r = t.length, n = a[0];
1518
1527
  return n === r ? "IS_POSSIBLE" : n > r ? "TOO_SHORT" : a[a.length - 1] < r ? "TOO_LONG" : a.indexOf(r, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
1519
1528
  }
1520
- function f0(t, l, e) {
1529
+ function u0(t, l, e) {
1521
1530
  if (l === void 0 && (l = {}), e = new x(e), l.v2) {
1522
1531
  if (!t.countryCallingCode)
1523
1532
  throw new Error("Invalid phone number object passed");
@@ -1549,14 +1558,14 @@ function E1(t, l) {
1549
1558
  return !1;
1550
1559
  }
1551
1560
  }
1552
- function u0(t, l) {
1553
- return m0(t) || $0(t, l) || I1(t, l) || g0();
1561
+ function g0(t, l) {
1562
+ return p0(t) || m0(t, l) || I1(t, l) || $0();
1554
1563
  }
1555
- function g0() {
1564
+ function $0() {
1556
1565
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1557
1566
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1558
1567
  }
1559
- function $0(t, l) {
1568
+ function m0(t, l) {
1560
1569
  var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1561
1570
  if (e != null) {
1562
1571
  var i = [], a = !0, d = !1, r, n;
@@ -1576,11 +1585,11 @@ function $0(t, l) {
1576
1585
  return i;
1577
1586
  }
1578
1587
  }
1579
- function m0(t) {
1588
+ function p0(t) {
1580
1589
  if (Array.isArray(t))
1581
1590
  return t;
1582
1591
  }
1583
- function p0(t, l) {
1592
+ function w0(t, l) {
1584
1593
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1585
1594
  if (e)
1586
1595
  return (e = e.call(t)).next.bind(e);
@@ -1611,11 +1620,11 @@ function G3(t, l) {
1611
1620
  i[e] = t[e];
1612
1621
  return i;
1613
1622
  }
1614
- function w0(t) {
1623
+ function z0(t) {
1615
1624
  var l, e;
1616
1625
  t = t.replace(/^tel:/, "tel=");
1617
- for (var i = p0(t.split(";")), a; !(a = i()).done; ) {
1618
- var d = a.value, r = d.split("="), n = u0(r, 2), c = n[0], h = n[1];
1626
+ for (var i = w0(t.split(";")), a; !(a = i()).done; ) {
1627
+ var d = a.value, r = d.split("="), n = g0(r, 2), c = n[0], h = n[1];
1619
1628
  switch (c) {
1620
1629
  case "tel":
1621
1630
  l = h;
@@ -1635,7 +1644,7 @@ function w0(t) {
1635
1644
  };
1636
1645
  return e && (s.ext = e), s;
1637
1646
  }
1638
- function z0(t) {
1647
+ function M0(t) {
1639
1648
  var l = t.number, e = t.ext;
1640
1649
  if (!l)
1641
1650
  return "";
@@ -1646,11 +1655,11 @@ function z0(t) {
1646
1655
  function N(t, l) {
1647
1656
  return t = t || "", new RegExp("^(?:" + l + ")$").test(t);
1648
1657
  }
1649
- function M0(t, l) {
1658
+ function x0(t, l) {
1650
1659
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1651
1660
  if (e)
1652
1661
  return (e = e.call(t)).next.bind(e);
1653
- if (Array.isArray(t) || (e = x0(t)) || l && t && typeof t.length == "number") {
1662
+ if (Array.isArray(t) || (e = H0(t)) || l && t && typeof t.length == "number") {
1654
1663
  e && (t = e);
1655
1664
  var i = 0;
1656
1665
  return function() {
@@ -1660,7 +1669,7 @@ function M0(t, l) {
1660
1669
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1661
1670
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1662
1671
  }
1663
- function x0(t, l) {
1672
+ function H0(t, l) {
1664
1673
  if (!!t) {
1665
1674
  if (typeof t == "string")
1666
1675
  return j3(t, l);
@@ -1677,7 +1686,7 @@ function j3(t, l) {
1677
1686
  i[e] = t[e];
1678
1687
  return i;
1679
1688
  }
1680
- var H0 = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
1689
+ var y0 = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
1681
1690
  function b3(t, l, e) {
1682
1691
  if (l = l || {}, !!t.country) {
1683
1692
  e = new x(e), e.selectNumberingPlan(t.country, t.countryCallingCode);
@@ -1685,7 +1694,7 @@ function b3(t, l, e) {
1685
1694
  if (!!N(i, e.nationalNumberPattern())) {
1686
1695
  if (r3(i, "FIXED_LINE", e))
1687
1696
  return e.type("MOBILE") && e.type("MOBILE").pattern() === "" || !e.type("MOBILE") || r3(i, "MOBILE", e) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
1688
- for (var a = M0(H0), d; !(d = a()).done; ) {
1697
+ for (var a = x0(y0), d; !(d = a()).done; ) {
1689
1698
  var r = d.value;
1690
1699
  if (r3(i, r, e))
1691
1700
  return r;
@@ -1696,7 +1705,7 @@ function b3(t, l, e) {
1696
1705
  function r3(t, l, e) {
1697
1706
  return l = e.type(l), !l || !l.pattern() || l.possibleLengths() && l.possibleLengths().indexOf(t.length) < 0 ? !1 : N(t, l.pattern());
1698
1707
  }
1699
- function y0(t, l, e) {
1708
+ function b0(t, l, e) {
1700
1709
  if (l = l || {}, e = new x(e), !t.country)
1701
1710
  return !1;
1702
1711
  if (e.selectNumberingPlan(t.country, t.countryCallingCode), e.hasTypes())
@@ -1714,19 +1723,19 @@ function T1(t, l, e) {
1714
1723
  var d = t.replace(new RegExp(l.pattern()), i ? l.internationalFormat() : a && l.nationalPrefixFormattingRule() ? l.format().replace(O1, l.nationalPrefixFormattingRule()) : l.format());
1715
1724
  return i ? S1(d) : d;
1716
1725
  }
1717
- var b0 = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
1718
- function A0(t, l, e) {
1726
+ var A0 = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
1727
+ function C0(t, l, e) {
1719
1728
  var i = new x(e);
1720
1729
  if (i.selectNumberingPlan(t, l), i.defaultIDDPrefix())
1721
1730
  return i.defaultIDDPrefix();
1722
- if (b0.test(i.IDDPrefix()))
1731
+ if (A0.test(i.IDDPrefix()))
1723
1732
  return i.IDDPrefix();
1724
1733
  }
1725
- function C0(t, l) {
1734
+ function F0(t, l) {
1726
1735
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1727
1736
  if (e)
1728
1737
  return (e = e.call(t)).next.bind(e);
1729
- if (Array.isArray(t) || (e = F0(t)) || l && t && typeof t.length == "number") {
1738
+ if (Array.isArray(t) || (e = D0(t)) || l && t && typeof t.length == "number") {
1730
1739
  e && (t = e);
1731
1740
  var i = 0;
1732
1741
  return function() {
@@ -1736,7 +1745,7 @@ function C0(t, l) {
1736
1745
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1737
1746
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1738
1747
  }
1739
- function F0(t, l) {
1748
+ function D0(t, l) {
1740
1749
  if (!!t) {
1741
1750
  if (typeof t == "string")
1742
1751
  return U3(t, l);
@@ -1767,14 +1776,14 @@ function Z3(t) {
1767
1776
  for (var l = 1; l < arguments.length; l++) {
1768
1777
  var e = arguments[l] != null ? arguments[l] : {};
1769
1778
  l % 2 ? W3(Object(e), !0).forEach(function(i) {
1770
- D0(t, i, e[i]);
1779
+ N0(t, i, e[i]);
1771
1780
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : W3(Object(e)).forEach(function(i) {
1772
1781
  Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(e, i));
1773
1782
  });
1774
1783
  }
1775
1784
  return t;
1776
1785
  }
1777
- function D0(t, l, e) {
1786
+ function N0(t, l, e) {
1778
1787
  return l in t ? Object.defineProperty(t, l, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[l] = e, t;
1779
1788
  }
1780
1789
  var Y3 = {
@@ -1782,7 +1791,7 @@ var Y3 = {
1782
1791
  return "".concat(l).concat(i.ext()).concat(e);
1783
1792
  }
1784
1793
  };
1785
- function N0(t, l, e, i) {
1794
+ function L0(t, l, e, i) {
1786
1795
  if (e ? e = Z3(Z3({}, Y3), e) : e = Y3, i = new x(i), t.country && t.country !== "001") {
1787
1796
  if (!i.hasCountry(t.country))
1788
1797
  throw new Error("Unknown country: ".concat(t.country));
@@ -1800,21 +1809,21 @@ function N0(t, l, e, i) {
1800
1809
  case "E.164":
1801
1810
  return "+".concat(a).concat(d);
1802
1811
  case "RFC3966":
1803
- return z0({
1812
+ return M0({
1804
1813
  number: "+".concat(a).concat(d),
1805
1814
  ext: t.ext
1806
1815
  });
1807
1816
  case "IDD":
1808
1817
  if (!e.fromCountry)
1809
1818
  return;
1810
- var n = B0(d, t.carrierCode, a, e.fromCountry, i);
1819
+ var n = P0(d, t.carrierCode, a, e.fromCountry, i);
1811
1820
  return n3(n, t.ext, i, e.formatExtension);
1812
1821
  default:
1813
1822
  throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(l, '"'));
1814
1823
  }
1815
1824
  }
1816
1825
  function J(t, l, e, i, a) {
1817
- var d = L0(i.formats(), t);
1826
+ var d = B0(i.formats(), t);
1818
1827
  return d ? T1(t, d, {
1819
1828
  useInternationalFormat: e === "INTERNATIONAL",
1820
1829
  withNationalPrefix: !(d.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && a && a.nationalPrefix === !1),
@@ -1822,8 +1831,8 @@ function J(t, l, e, i, a) {
1822
1831
  metadata: i
1823
1832
  }) : t;
1824
1833
  }
1825
- function L0(t, l) {
1826
- for (var e = C0(t), i; !(i = e()).done; ) {
1834
+ function B0(t, l) {
1835
+ for (var e = F0(t), i; !(i = e()).done; ) {
1827
1836
  var a = i.value;
1828
1837
  if (a.leadingDigitsPatterns().length > 0) {
1829
1838
  var d = a.leadingDigitsPatterns()[a.leadingDigitsPatterns().length - 1];
@@ -1837,13 +1846,13 @@ function L0(t, l) {
1837
1846
  function n3(t, l, e, i) {
1838
1847
  return l ? i(t, l, e) : t;
1839
1848
  }
1840
- function B0(t, l, e, i, a) {
1849
+ function P0(t, l, e, i, a) {
1841
1850
  var d = y3(i, a.metadata);
1842
1851
  if (d === e) {
1843
1852
  var r = J(t, l, "NATIONAL", a);
1844
1853
  return e === "1" ? e + " " + r : r;
1845
1854
  }
1846
- var n = A0(i, void 0, a.metadata);
1855
+ var n = C0(i, void 0, a.metadata);
1847
1856
  if (n)
1848
1857
  return "".concat(n, " ").concat(e, " ").concat(J(t, null, "INTERNATIONAL", a));
1849
1858
  }
@@ -1861,17 +1870,17 @@ function X3(t) {
1861
1870
  for (var l = 1; l < arguments.length; l++) {
1862
1871
  var e = arguments[l] != null ? arguments[l] : {};
1863
1872
  l % 2 ? K3(Object(e), !0).forEach(function(i) {
1864
- P0(t, i, e[i]);
1873
+ E0(t, i, e[i]);
1865
1874
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : K3(Object(e)).forEach(function(i) {
1866
1875
  Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(e, i));
1867
1876
  });
1868
1877
  }
1869
1878
  return t;
1870
1879
  }
1871
- function P0(t, l, e) {
1880
+ function E0(t, l, e) {
1872
1881
  return l in t ? Object.defineProperty(t, l, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[l] = e, t;
1873
1882
  }
1874
- function E0(t, l) {
1883
+ function I0(t, l) {
1875
1884
  if (!(t instanceof l))
1876
1885
  throw new TypeError("Cannot call a class as a function");
1877
1886
  }
@@ -1881,21 +1890,21 @@ function J3(t, l) {
1881
1890
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
1882
1891
  }
1883
1892
  }
1884
- function I0(t, l, e) {
1893
+ function S0(t, l, e) {
1885
1894
  return l && J3(t.prototype, l), e && J3(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1886
1895
  }
1887
1896
  var V1 = /* @__PURE__ */ function() {
1888
1897
  function t(l, e, i) {
1889
- if (E0(this, t), !l)
1898
+ if (I0(this, t), !l)
1890
1899
  throw new TypeError("`country` or `countryCallingCode` not passed");
1891
1900
  if (!e)
1892
1901
  throw new TypeError("`nationalNumber` not passed");
1893
1902
  if (!i)
1894
1903
  throw new TypeError("`metadata` not passed");
1895
1904
  var a = new x(i);
1896
- S0(l) && (this.country = l, a.country(l), l = a.countryCallingCode()), this.countryCallingCode = l, this.nationalNumber = e, this.number = "+" + this.countryCallingCode + this.nationalNumber, this.metadata = i;
1905
+ O0(l) && (this.country = l, a.country(l), l = a.countryCallingCode()), this.countryCallingCode = l, this.nationalNumber = e, this.number = "+" + this.countryCallingCode + this.nationalNumber, this.metadata = i;
1897
1906
  }
1898
- return I0(t, [{
1907
+ return S0(t, [{
1899
1908
  key: "setExt",
1900
1909
  value: function(e) {
1901
1910
  this.ext = e;
@@ -1903,14 +1912,14 @@ var V1 = /* @__PURE__ */ function() {
1903
1912
  }, {
1904
1913
  key: "isPossible",
1905
1914
  value: function() {
1906
- return f0(this, {
1915
+ return u0(this, {
1907
1916
  v2: !0
1908
1917
  }, this.metadata);
1909
1918
  }
1910
1919
  }, {
1911
1920
  key: "isValid",
1912
1921
  value: function() {
1913
- return y0(this, {
1922
+ return b0(this, {
1914
1923
  v2: !0
1915
1924
  }, this.metadata);
1916
1925
  }
@@ -1935,7 +1944,7 @@ var V1 = /* @__PURE__ */ function() {
1935
1944
  }, {
1936
1945
  key: "format",
1937
1946
  value: function(e, i) {
1938
- return N0(this, e, i ? X3(X3({}, i), {}, {
1947
+ return L0(this, e, i ? X3(X3({}, i), {}, {
1939
1948
  v2: !0
1940
1949
  }) : {
1941
1950
  v2: !0
@@ -1957,9 +1966,9 @@ var V1 = /* @__PURE__ */ function() {
1957
1966
  return this.format("RFC3966", e);
1958
1967
  }
1959
1968
  }]), t;
1960
- }(), S0 = function(l) {
1969
+ }(), O0 = function(l) {
1961
1970
  return /^[A-Z]{2}$/.test(l);
1962
- }, O0 = new RegExp("([" + H + "])");
1971
+ }, T0 = new RegExp("([" + H + "])");
1963
1972
  function R1(t, l, e, i) {
1964
1973
  if (!!l) {
1965
1974
  var a = new x(i);
@@ -1967,7 +1976,7 @@ function R1(t, l, e, i) {
1967
1976
  var d = new RegExp(a.IDDPrefix());
1968
1977
  if (t.search(d) === 0) {
1969
1978
  t = t.slice(t.match(d)[0].length);
1970
- var r = t.match(O0);
1979
+ var r = t.match(T0);
1971
1980
  if (!(r && r[1] != null && r[1].length > 0 && r[1] === "0"))
1972
1981
  return t;
1973
1982
  }
@@ -2004,11 +2013,11 @@ function g3(t, l) {
2004
2013
  function $3(t, l) {
2005
2014
  var e = g3(t, l), i = e.carrierCode, a = e.nationalNumber;
2006
2015
  if (a !== t) {
2007
- if (!T0(t, a, l))
2016
+ if (!V0(t, a, l))
2008
2017
  return {
2009
2018
  nationalNumber: t
2010
2019
  };
2011
- if (l.possibleLengths() && !V0(a, l))
2020
+ if (l.possibleLengths() && !R0(a, l))
2012
2021
  return {
2013
2022
  nationalNumber: t
2014
2023
  };
@@ -2018,10 +2027,10 @@ function $3(t, l) {
2018
2027
  carrierCode: i
2019
2028
  };
2020
2029
  }
2021
- function T0(t, l, e) {
2030
+ function V0(t, l, e) {
2022
2031
  return !(N(t, e.nationalNumberPattern()) && !N(l, e.nationalNumberPattern()));
2023
2032
  }
2024
- function V0(t, l) {
2033
+ function R0(t, l) {
2025
2034
  switch (t3(t, l)) {
2026
2035
  case "TOO_SHORT":
2027
2036
  case "INVALID_LENGTH":
@@ -2069,7 +2078,7 @@ function _1(t, l, e, i) {
2069
2078
  if (t[1] === "0")
2070
2079
  return {};
2071
2080
  i = new x(i);
2072
- for (var c = 2; c - 1 <= E2 && c <= t.length; ) {
2081
+ for (var c = 2; c - 1 <= I2 && c <= t.length; ) {
2073
2082
  var h = t.slice(1, c);
2074
2083
  if (i.hasCallingCode(h))
2075
2084
  return i.selectNumberingPlan(h), {
@@ -2080,11 +2089,11 @@ function _1(t, l, e, i) {
2080
2089
  }
2081
2090
  return {};
2082
2091
  }
2083
- function R0(t, l) {
2092
+ function k0(t, l) {
2084
2093
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2085
2094
  if (e)
2086
2095
  return (e = e.call(t)).next.bind(e);
2087
- if (Array.isArray(t) || (e = k0(t)) || l && t && typeof t.length == "number") {
2096
+ if (Array.isArray(t) || (e = _0(t)) || l && t && typeof t.length == "number") {
2088
2097
  e && (t = e);
2089
2098
  var i = 0;
2090
2099
  return function() {
@@ -2094,7 +2103,7 @@ function R0(t, l) {
2094
2103
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2095
2104
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2096
2105
  }
2097
- function k0(t, l) {
2106
+ function _0(t, l) {
2098
2107
  if (!!t) {
2099
2108
  if (typeof t == "string")
2100
2109
  return Q3(t, l);
@@ -2111,17 +2120,17 @@ function Q3(t, l) {
2111
2120
  i[e] = t[e];
2112
2121
  return i;
2113
2122
  }
2114
- var _0 = !1;
2123
+ var G0 = !1;
2115
2124
  function G1(t, l, e) {
2116
- if (_0 && e.isNonGeographicCallingCode(t))
2125
+ if (G0 && e.isNonGeographicCallingCode(t))
2117
2126
  return "001";
2118
2127
  var i = e.getCountryCodesForCallingCode(t);
2119
2128
  if (!!i)
2120
- return i.length === 1 ? i[0] : G0(i, l, e.metadata);
2129
+ return i.length === 1 ? i[0] : j0(i, l, e.metadata);
2121
2130
  }
2122
- function G0(t, l, e) {
2131
+ function j0(t, l, e) {
2123
2132
  e = new x(e);
2124
- for (var i = R0(t), a; !(a = i()).done; ) {
2133
+ for (var i = k0(t), a; !(a = i()).done; ) {
2125
2134
  var d = a.value;
2126
2135
  if (e.country(d), e.leadingDigits()) {
2127
2136
  if (l && l.search(e.leadingDigits()) === 0)
@@ -2133,17 +2142,17 @@ function G0(t, l, e) {
2133
2142
  return d;
2134
2143
  }
2135
2144
  }
2136
- var j0 = 250, U0 = new RegExp("[" + Q + H + "]"), W0 = new RegExp("[^" + H + "#]+$");
2137
- function Z0(t, l, e) {
2145
+ var U0 = 250, W0 = new RegExp("[" + Q + H + "]"), Z0 = new RegExp("[^" + H + "#]+$");
2146
+ function Y0(t, l, e) {
2138
2147
  if (l = l || {}, e = new x(e), l.defaultCountry && !e.hasCountry(l.defaultCountry))
2139
2148
  throw l.v2 ? new B("INVALID_COUNTRY") : new Error("Unknown country: ".concat(l.defaultCountry));
2140
- var i = K0(t, l.v2, l.extract), a = i.number, d = i.ext, r = i.error;
2149
+ var i = X0(t, l.v2, l.extract), a = i.number, d = i.ext, r = i.error;
2141
2150
  if (!a) {
2142
2151
  if (l.v2)
2143
2152
  throw r === "TOO_SHORT" ? new B("TOO_SHORT") : new B("NOT_A_NUMBER");
2144
2153
  return {};
2145
2154
  }
2146
- var n = J0(a, l.defaultCountry, l.defaultCallingCode, e), c = n.country, h = n.nationalNumber, s = n.countryCallingCode, o = n.carrierCode;
2155
+ var n = Q0(a, l.defaultCountry, l.defaultCallingCode, e), c = n.country, h = n.nationalNumber, s = n.countryCallingCode, o = n.carrierCode;
2147
2156
  if (!e.hasSelectedNumberingPlan()) {
2148
2157
  if (l.v2)
2149
2158
  throw new B("INVALID_COUNTRY");
@@ -2154,7 +2163,7 @@ function Z0(t, l, e) {
2154
2163
  throw new B("TOO_SHORT");
2155
2164
  return {};
2156
2165
  }
2157
- if (h.length > P2) {
2166
+ if (h.length > E2) {
2158
2167
  if (l.v2)
2159
2168
  throw new B("TOO_LONG");
2160
2169
  return {};
@@ -2172,45 +2181,45 @@ function Z0(t, l, e) {
2172
2181
  possible: u ? !0 : !!(l.extended === !0 && e.possibleLengths() && E1(h, e)),
2173
2182
  phone: h,
2174
2183
  ext: d
2175
- } : u ? X0(c, h, d) : {};
2184
+ } : u ? J0(c, h, d) : {};
2176
2185
  }
2177
- function Y0(t, l, e) {
2186
+ function K0(t, l, e) {
2178
2187
  if (!!t) {
2179
- if (t.length > j0) {
2188
+ if (t.length > U0) {
2180
2189
  if (e)
2181
2190
  throw new B("TOO_LONG");
2182
2191
  return;
2183
2192
  }
2184
2193
  if (l === !1)
2185
2194
  return t;
2186
- var i = t.search(U0);
2195
+ var i = t.search(W0);
2187
2196
  if (!(i < 0))
2188
- return t.slice(i).replace(W0, "");
2197
+ return t.slice(i).replace(Z0, "");
2189
2198
  }
2190
2199
  }
2191
- function K0(t, l, e) {
2200
+ function X0(t, l, e) {
2192
2201
  if (t && t.indexOf("tel:") === 0)
2193
- return w0(t);
2194
- var i = Y0(t, e, l);
2202
+ return z0(t);
2203
+ var i = K0(t, e, l);
2195
2204
  if (!i)
2196
2205
  return {};
2197
2206
  if (!L1(i))
2198
- return l0(i) ? {
2207
+ return i0(i) ? {
2199
2208
  error: "TOO_SHORT"
2200
2209
  } : {};
2201
- var a = i0(i);
2210
+ var a = a0(i);
2202
2211
  return a.ext ? a : {
2203
2212
  number: i
2204
2213
  };
2205
2214
  }
2206
- function X0(t, l, e) {
2215
+ function J0(t, l, e) {
2207
2216
  var i = {
2208
2217
  country: t,
2209
2218
  phone: l
2210
2219
  };
2211
2220
  return e && (i.ext = e), i;
2212
2221
  }
2213
- function J0(t, l, e, i) {
2222
+ function Q0(t, l, e, i) {
2214
2223
  var a = _1(k3(t), l, e, i.metadata), d = a.countryCallingCode, r = a.number, n;
2215
2224
  if (d)
2216
2225
  i.selectNumberingPlan(d);
@@ -2244,18 +2253,18 @@ function e1(t) {
2244
2253
  for (var l = 1; l < arguments.length; l++) {
2245
2254
  var e = arguments[l] != null ? arguments[l] : {};
2246
2255
  l % 2 ? q3(Object(e), !0).forEach(function(i) {
2247
- Q0(t, i, e[i]);
2256
+ q0(t, i, e[i]);
2248
2257
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : q3(Object(e)).forEach(function(i) {
2249
2258
  Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(e, i));
2250
2259
  });
2251
2260
  }
2252
2261
  return t;
2253
2262
  }
2254
- function Q0(t, l, e) {
2263
+ function q0(t, l, e) {
2255
2264
  return l in t ? Object.defineProperty(t, l, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[l] = e, t;
2256
2265
  }
2257
- function q0(t, l, e) {
2258
- return Z0(t, e1(e1({}, l), {}, {
2266
+ function e4(t, l, e) {
2267
+ return Y0(t, e1(e1({}, l), {}, {
2259
2268
  v2: !0
2260
2269
  }), e);
2261
2270
  }
@@ -2276,28 +2285,28 @@ function t1(t, l) {
2276
2285
  }
2277
2286
  return e;
2278
2287
  }
2279
- function e4(t) {
2288
+ function t4(t) {
2280
2289
  for (var l = 1; l < arguments.length; l++) {
2281
2290
  var e = arguments[l] != null ? arguments[l] : {};
2282
2291
  l % 2 ? t1(Object(e), !0).forEach(function(i) {
2283
- t4(t, i, e[i]);
2292
+ l4(t, i, e[i]);
2284
2293
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : t1(Object(e)).forEach(function(i) {
2285
2294
  Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(e, i));
2286
2295
  });
2287
2296
  }
2288
2297
  return t;
2289
2298
  }
2290
- function t4(t, l, e) {
2299
+ function l4(t, l, e) {
2291
2300
  return l in t ? Object.defineProperty(t, l, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[l] = e, t;
2292
2301
  }
2293
- function l4(t, l) {
2294
- return r4(t) || d4(t, l) || a4(t, l) || i4();
2302
+ function i4(t, l) {
2303
+ return n4(t) || r4(t, l) || d4(t, l) || a4();
2295
2304
  }
2296
- function i4() {
2305
+ function a4() {
2297
2306
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2298
2307
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2299
2308
  }
2300
- function a4(t, l) {
2309
+ function d4(t, l) {
2301
2310
  if (!!t) {
2302
2311
  if (typeof t == "string")
2303
2312
  return l1(t, l);
@@ -2314,7 +2323,7 @@ function l1(t, l) {
2314
2323
  i[e] = t[e];
2315
2324
  return i;
2316
2325
  }
2317
- function d4(t, l) {
2326
+ function r4(t, l) {
2318
2327
  var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2319
2328
  if (e != null) {
2320
2329
  var i = [], a = !0, d = !1, r, n;
@@ -2334,21 +2343,21 @@ function d4(t, l) {
2334
2343
  return i;
2335
2344
  }
2336
2345
  }
2337
- function r4(t) {
2346
+ function n4(t) {
2338
2347
  if (Array.isArray(t))
2339
2348
  return t;
2340
2349
  }
2341
- function n4(t) {
2342
- var l = Array.prototype.slice.call(t), e = l4(l, 4), i = e[0], a = e[1], d = e[2], r = e[3], n, c, h;
2350
+ function c4(t) {
2351
+ var l = Array.prototype.slice.call(t), e = i4(l, 4), i = e[0], a = e[1], d = e[2], r = e[3], n, c, h;
2343
2352
  if (typeof i == "string")
2344
2353
  n = i;
2345
2354
  else
2346
2355
  throw new TypeError("A text for parsing must be a string.");
2347
2356
  if (!a || typeof a == "string")
2348
- r ? (c = d, h = r) : (c = void 0, h = d), a && (c = e4({
2357
+ r ? (c = d, h = r) : (c = void 0, h = d), a && (c = t4({
2349
2358
  defaultCountry: a
2350
2359
  }, c));
2351
- else if (c4(a))
2360
+ else if (h4(a))
2352
2361
  d ? (c = a, h = d) : h = a;
2353
2362
  else
2354
2363
  throw new Error("Invalid second argument: ".concat(a));
@@ -2358,7 +2367,7 @@ function n4(t) {
2358
2367
  metadata: h
2359
2368
  };
2360
2369
  }
2361
- var c4 = function(l) {
2370
+ var h4 = function(l) {
2362
2371
  return m3(l) === "object";
2363
2372
  };
2364
2373
  function i1(t, l) {
@@ -2375,22 +2384,22 @@ function a1(t) {
2375
2384
  for (var l = 1; l < arguments.length; l++) {
2376
2385
  var e = arguments[l] != null ? arguments[l] : {};
2377
2386
  l % 2 ? i1(Object(e), !0).forEach(function(i) {
2378
- h4(t, i, e[i]);
2387
+ s4(t, i, e[i]);
2379
2388
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : i1(Object(e)).forEach(function(i) {
2380
2389
  Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(e, i));
2381
2390
  });
2382
2391
  }
2383
2392
  return t;
2384
2393
  }
2385
- function h4(t, l, e) {
2394
+ function s4(t, l, e) {
2386
2395
  return l in t ? Object.defineProperty(t, l, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[l] = e, t;
2387
2396
  }
2388
- function s4(t, l, e) {
2389
- l && l.defaultCountry && !K2(l.defaultCountry, e) && (l = a1(a1({}, l), {}, {
2397
+ function o4(t, l, e) {
2398
+ l && l.defaultCountry && !X2(l.defaultCountry, e) && (l = a1(a1({}, l), {}, {
2390
2399
  defaultCountry: void 0
2391
2400
  }));
2392
2401
  try {
2393
- return q0(t, l, e);
2402
+ return e4(t, l, e);
2394
2403
  } catch (i) {
2395
2404
  if (!(i instanceof B))
2396
2405
  throw i;
@@ -2410,25 +2419,25 @@ function r1(t) {
2410
2419
  for (var l = 1; l < arguments.length; l++) {
2411
2420
  var e = arguments[l] != null ? arguments[l] : {};
2412
2421
  l % 2 ? d1(Object(e), !0).forEach(function(i) {
2413
- o4(t, i, e[i]);
2422
+ v4(t, i, e[i]);
2414
2423
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(e)) : d1(Object(e)).forEach(function(i) {
2415
2424
  Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(e, i));
2416
2425
  });
2417
2426
  }
2418
2427
  return t;
2419
2428
  }
2420
- function o4(t, l, e) {
2429
+ function v4(t, l, e) {
2421
2430
  return l in t ? Object.defineProperty(t, l, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[l] = e, t;
2422
2431
  }
2423
- function v4() {
2424
- var t = n4(arguments), l = t.text, e = t.options, i = t.metadata;
2432
+ function f4() {
2433
+ var t = c4(arguments), l = t.text, e = t.options, i = t.metadata;
2425
2434
  e = r1(r1({}, e), {}, {
2426
2435
  extract: !1
2427
2436
  });
2428
- var a = s4(l, e, i);
2437
+ var a = o4(l, e, i);
2429
2438
  return a && a.isValid() || !1;
2430
2439
  }
2431
- function f4(t, l) {
2440
+ function u4(t, l) {
2432
2441
  if (!(t instanceof l))
2433
2442
  throw new TypeError("Cannot call a class as a function");
2434
2443
  }
@@ -2438,15 +2447,15 @@ function n1(t, l) {
2438
2447
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
2439
2448
  }
2440
2449
  }
2441
- function u4(t, l, e) {
2450
+ function g4(t, l, e) {
2442
2451
  return l && n1(t.prototype, l), e && n1(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
2443
2452
  }
2444
- var g4 = /* @__PURE__ */ function() {
2453
+ var $4 = /* @__PURE__ */ function() {
2445
2454
  function t(l) {
2446
2455
  var e = l.onCountryChange, i = l.onCallingCodeChange;
2447
- f4(this, t), this.onCountryChange = e, this.onCallingCodeChange = i;
2456
+ u4(this, t), this.onCountryChange = e, this.onCallingCodeChange = i;
2448
2457
  }
2449
- return u4(t, [{
2458
+ return g4(t, [{
2450
2459
  key: "reset",
2451
2460
  value: function(e, i) {
2452
2461
  this.international = !1, this.IDDPrefix = void 0, this.missingPlus = void 0, this.callingCode = void 0, this.digits = "", this.resetNationalSignificantNumber(), this.initCountryAndCallingCode(e, i);
@@ -2506,11 +2515,11 @@ var g4 = /* @__PURE__ */ function() {
2506
2515
  }
2507
2516
  }]), t;
2508
2517
  }();
2509
- function $4(t, l) {
2518
+ function m4(t, l) {
2510
2519
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2511
2520
  if (e)
2512
2521
  return (e = e.call(t)).next.bind(e);
2513
- if (Array.isArray(t) || (e = m4(t)) || l && t && typeof t.length == "number") {
2522
+ if (Array.isArray(t) || (e = p4(t)) || l && t && typeof t.length == "number") {
2514
2523
  e && (t = e);
2515
2524
  var i = 0;
2516
2525
  return function() {
@@ -2520,7 +2529,7 @@ function $4(t, l) {
2520
2529
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2521
2530
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2522
2531
  }
2523
- function m4(t, l) {
2532
+ function p4(t, l) {
2524
2533
  if (!!t) {
2525
2534
  if (typeof t == "string")
2526
2535
  return c1(t, l);
@@ -2546,9 +2555,9 @@ function W(t, l) {
2546
2555
  return e + t;
2547
2556
  }
2548
2557
  function h1(t, l) {
2549
- return t[l] === ")" && l++, p4(t.slice(0, l));
2558
+ return t[l] === ")" && l++, w4(t.slice(0, l));
2550
2559
  }
2551
- function p4(t) {
2560
+ function w4(t) {
2552
2561
  for (var l = [], e = 0; e < t.length; )
2553
2562
  t[e] === "(" ? l.push(e) : t[e] === ")" && l.pop(), e++;
2554
2563
  var i = 0, a = "";
@@ -2559,8 +2568,8 @@ function p4(t) {
2559
2568
  }
2560
2569
  return a;
2561
2570
  }
2562
- function w4(t, l, e) {
2563
- for (var i = $4(e.split("")), a; !(a = i()).done; ) {
2571
+ function z4(t, l, e) {
2572
+ for (var i = m4(e.split("")), a; !(a = i()).done; ) {
2564
2573
  var d = a.value;
2565
2574
  if (t.slice(l + 1).search(c3) < 0)
2566
2575
  return;
@@ -2568,19 +2577,19 @@ function w4(t, l, e) {
2568
2577
  }
2569
2578
  return [t, l];
2570
2579
  }
2571
- function z4(t, l, e) {
2580
+ function M4(t, l, e) {
2572
2581
  var i = e.metadata, a = e.shouldTryNationalPrefixFormattingRule, d = e.getSeparatorAfterNationalPrefix, r = new RegExp("^(?:".concat(l.pattern(), ")$"));
2573
2582
  if (r.test(t.nationalSignificantNumber))
2574
- return x4(t, l, {
2583
+ return H4(t, l, {
2575
2584
  metadata: i,
2576
2585
  shouldTryNationalPrefixFormattingRule: a,
2577
2586
  getSeparatorAfterNationalPrefix: d
2578
2587
  });
2579
2588
  }
2580
- function M4(t, l) {
2589
+ function x4(t, l) {
2581
2590
  return t3(t, l) === "IS_POSSIBLE";
2582
2591
  }
2583
- function x4(t, l, e) {
2592
+ function H4(t, l, e) {
2584
2593
  var i = e.metadata, a = e.shouldTryNationalPrefixFormattingRule, d = e.getSeparatorAfterNationalPrefix;
2585
2594
  if (t.nationalSignificantNumber, t.international, t.nationalPrefix, t.carrierCode, a(l)) {
2586
2595
  var r = s1(t, l, {
@@ -2604,13 +2613,13 @@ function s1(t, l, e) {
2604
2613
  withNationalPrefix: a,
2605
2614
  metadata: i
2606
2615
  });
2607
- if (a || (t.nationalPrefix ? r = t.nationalPrefix + d(l) + r : t.complexPrefixBeforeNationalSignificantNumber && (r = t.complexPrefixBeforeNationalSignificantNumber + " " + r)), H4(r, t))
2616
+ if (a || (t.nationalPrefix ? r = t.nationalPrefix + d(l) + r : t.complexPrefixBeforeNationalSignificantNumber && (r = t.complexPrefixBeforeNationalSignificantNumber + " " + r)), y4(r, t))
2608
2617
  return r;
2609
2618
  }
2610
- function H4(t, l) {
2619
+ function y4(t, l) {
2611
2620
  return X(t) === l.getNationalDigits();
2612
2621
  }
2613
- function y4(t, l) {
2622
+ function b4(t, l) {
2614
2623
  if (!(t instanceof l))
2615
2624
  throw new TypeError("Cannot call a class as a function");
2616
2625
  }
@@ -2620,14 +2629,14 @@ function o1(t, l) {
2620
2629
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
2621
2630
  }
2622
2631
  }
2623
- function b4(t, l, e) {
2632
+ function A4(t, l, e) {
2624
2633
  return l && o1(t.prototype, l), e && o1(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
2625
2634
  }
2626
- var A4 = /* @__PURE__ */ function() {
2635
+ var C4 = /* @__PURE__ */ function() {
2627
2636
  function t() {
2628
- y4(this, t);
2637
+ b4(this, t);
2629
2638
  }
2630
- return b4(t, [{
2639
+ return A4(t, [{
2631
2640
  key: "parse",
2632
2641
  value: function(e) {
2633
2642
  if (this.context = [{
@@ -2665,9 +2674,9 @@ var A4 = /* @__PURE__ */ function() {
2665
2674
  value: function(e) {
2666
2675
  if (!e)
2667
2676
  throw new Error("Pattern is required");
2668
- var i = e.match(D4);
2677
+ var i = e.match(N4);
2669
2678
  if (!i) {
2670
- if (F4.test(e))
2679
+ if (D4.test(e))
2671
2680
  throw new Error("Illegal characters found in a pattern: ".concat(e));
2672
2681
  this.getContext().instructions = this.getContext().instructions.concat(e.split(""));
2673
2682
  return;
@@ -2712,7 +2721,7 @@ var A4 = /* @__PURE__ */ function() {
2712
2721
  throw new Error('"]" operator must be preceded by "[" operator');
2713
2722
  this.endContext(), this.getContext().instructions.push({
2714
2723
  op: "[]",
2715
- args: C4(d)
2724
+ args: F4(d)
2716
2725
  });
2717
2726
  break;
2718
2727
  default:
@@ -2722,7 +2731,7 @@ var A4 = /* @__PURE__ */ function() {
2722
2731
  }
2723
2732
  }]), t;
2724
2733
  }();
2725
- function C4(t) {
2734
+ function F4(t) {
2726
2735
  for (var l = [], e = 0; e < t.length; ) {
2727
2736
  if (t[e] === "-") {
2728
2737
  if (e === 0 || e === t.length - 1)
@@ -2735,7 +2744,7 @@ function C4(t) {
2735
2744
  }
2736
2745
  return l;
2737
2746
  }
2738
- var F4 = /[\(\)\[\]\?\:\|]/, D4 = new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");
2747
+ var D4 = /[\(\)\[\]\?\:\|]/, N4 = new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");
2739
2748
  function h3(t) {
2740
2749
  return t.length === 1 ? t[0] : t;
2741
2750
  }
@@ -2743,7 +2752,7 @@ function v1(t, l) {
2743
2752
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2744
2753
  if (e)
2745
2754
  return (e = e.call(t)).next.bind(e);
2746
- if (Array.isArray(t) || (e = N4(t)) || l && t && typeof t.length == "number") {
2755
+ if (Array.isArray(t) || (e = L4(t)) || l && t && typeof t.length == "number") {
2747
2756
  e && (t = e);
2748
2757
  var i = 0;
2749
2758
  return function() {
@@ -2753,7 +2762,7 @@ function v1(t, l) {
2753
2762
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2754
2763
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2755
2764
  }
2756
- function N4(t, l) {
2765
+ function L4(t, l) {
2757
2766
  if (!!t) {
2758
2767
  if (typeof t == "string")
2759
2768
  return f1(t, l);
@@ -2770,7 +2779,7 @@ function f1(t, l) {
2770
2779
  i[e] = t[e];
2771
2780
  return i;
2772
2781
  }
2773
- function L4(t, l) {
2782
+ function B4(t, l) {
2774
2783
  if (!(t instanceof l))
2775
2784
  throw new TypeError("Cannot call a class as a function");
2776
2785
  }
@@ -2780,14 +2789,14 @@ function u1(t, l) {
2780
2789
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
2781
2790
  }
2782
2791
  }
2783
- function B4(t, l, e) {
2792
+ function P4(t, l, e) {
2784
2793
  return l && u1(t.prototype, l), e && u1(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
2785
2794
  }
2786
- var P4 = /* @__PURE__ */ function() {
2795
+ var E4 = /* @__PURE__ */ function() {
2787
2796
  function t(l) {
2788
- L4(this, t), this.matchTree = new A4().parse(l);
2797
+ B4(this, t), this.matchTree = new C4().parse(l);
2789
2798
  }
2790
- return B4(t, [{
2799
+ return P4(t, [{
2791
2800
  key: "match",
2792
2801
  value: function(e) {
2793
2802
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = i.allowOverflow;
@@ -2892,7 +2901,7 @@ function g1(t, l) {
2892
2901
  var e = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
2893
2902
  if (e)
2894
2903
  return (e = e.call(t)).next.bind(e);
2895
- if (Array.isArray(t) || (e = E4(t)) || l && t && typeof t.length == "number") {
2904
+ if (Array.isArray(t) || (e = I4(t)) || l && t && typeof t.length == "number") {
2896
2905
  e && (t = e);
2897
2906
  var i = 0;
2898
2907
  return function() {
@@ -2902,7 +2911,7 @@ function g1(t, l) {
2902
2911
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2903
2912
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2904
2913
  }
2905
- function E4(t, l) {
2914
+ function I4(t, l) {
2906
2915
  if (!!t) {
2907
2916
  if (typeof t == "string")
2908
2917
  return $1(t, l);
@@ -2919,7 +2928,7 @@ function $1(t, l) {
2919
2928
  i[e] = t[e];
2920
2929
  return i;
2921
2930
  }
2922
- function I4(t, l) {
2931
+ function S4(t, l) {
2923
2932
  if (!(t instanceof l))
2924
2933
  throw new TypeError("Cannot call a class as a function");
2925
2934
  }
@@ -2929,20 +2938,20 @@ function m1(t, l) {
2929
2938
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
2930
2939
  }
2931
2940
  }
2932
- function S4(t, l, e) {
2941
+ function O4(t, l, e) {
2933
2942
  return l && m1(t.prototype, l), e && m1(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
2934
2943
  }
2935
- var w3 = "9", O4 = 15, T4 = W(w3, O4), V4 = /[- ]/, R4 = function() {
2944
+ var w3 = "9", T4 = 15, V4 = W(w3, T4), R4 = /[- ]/, k4 = function() {
2936
2945
  return /\[([^\[\]])*\]/g;
2937
- }, k4 = function() {
2946
+ }, _4 = function() {
2938
2947
  return /\d(?=[^,}][^,}])/g;
2939
- }, _4 = new RegExp("[" + b + "]*\\$1[" + b + "]*(\\$\\d[" + b + "]*)*$"), p1 = 3, G4 = /* @__PURE__ */ function() {
2948
+ }, G4 = new RegExp("[" + b + "]*\\$1[" + b + "]*(\\$\\d[" + b + "]*)*$"), p1 = 3, j4 = /* @__PURE__ */ function() {
2940
2949
  function t(l) {
2941
2950
  l.state;
2942
2951
  var e = l.metadata;
2943
- I4(this, t), this.metadata = e, this.resetFormat();
2952
+ S4(this, t), this.metadata = e, this.resetFormat();
2944
2953
  }
2945
- return S4(t, [{
2954
+ return O4(t, [{
2946
2955
  key: "resetFormat",
2947
2956
  value: function() {
2948
2957
  this.chosenFormat = void 0, this.template = void 0, this.nationalNumberTemplate = void 0, this.populatedNationalNumberTemplate = void 0, this.populatedNationalNumberTemplatePosition = -1;
@@ -2956,9 +2965,9 @@ var w3 = "9", O4 = 15, T4 = W(w3, O4), V4 = /[- ]/, R4 = function() {
2956
2965
  key: "format",
2957
2966
  value: function(e, i) {
2958
2967
  var a = this;
2959
- if (M4(i.nationalSignificantNumber, this.metadata))
2968
+ if (x4(i.nationalSignificantNumber, this.metadata))
2960
2969
  for (var d = g1(this.matchingFormats), r; !(r = d()).done; ) {
2961
- var n = r.value, c = z4(i, n, {
2970
+ var n = r.value, c = M4(i, n, {
2962
2971
  metadata: this.metadata,
2963
2972
  shouldTryNationalPrefixFormattingRule: function(s) {
2964
2973
  return a.shouldTryNationalPrefixFormattingRule(s, {
@@ -3005,7 +3014,7 @@ var w3 = "9", O4 = 15, T4 = W(w3, O4), V4 = /[- ]/, R4 = function() {
3005
3014
  var r = e.leadingDigitsPatterns()[a];
3006
3015
  if (i.length < p1)
3007
3016
  try {
3008
- return new P4(r).match(i, {
3017
+ return new E4(r).match(i, {
3009
3018
  allowOverflow: !0
3010
3019
  }) !== void 0;
3011
3020
  } catch (n) {
@@ -3023,7 +3032,7 @@ var w3 = "9", O4 = 15, T4 = W(w3, O4), V4 = /[- ]/, R4 = function() {
3023
3032
  value: function(e) {
3024
3033
  for (var i = this, a = function() {
3025
3034
  var h = r.value;
3026
- return i.chosenFormat === h ? "break" : _4.test(i.getFormatFormat(h, e.international)) ? i.createTemplateForFormat(h, e) ? (i.chosenFormat = h, "break") : (i.matchingFormats = i.matchingFormats.filter(function(s) {
3035
+ return i.chosenFormat === h ? "break" : G4.test(i.getFormatFormat(h, e.international)) ? i.createTemplateForFormat(h, e) ? (i.chosenFormat = h, "break") : (i.matchingFormats = i.matchingFormats.filter(function(s) {
3027
3036
  return s !== h;
3028
3037
  }), "continue") : "continue";
3029
3038
  }, d = g1(this.matchingFormats.slice()), r; !(r = d()).done; ) {
@@ -3045,7 +3054,7 @@ var w3 = "9", O4 = 15, T4 = W(w3, O4), V4 = /[- ]/, R4 = function() {
3045
3054
  }, {
3046
3055
  key: "getSeparatorAfterNationalPrefix",
3047
3056
  value: function(e) {
3048
- return this.isNANP || e && e.nationalPrefixFormattingRule() && V4.test(e.nationalPrefixFormattingRule()) ? " " : "";
3057
+ return this.isNANP || e && e.nationalPrefixFormattingRule() && R4.test(e.nationalPrefixFormattingRule()) ? " " : "";
3049
3058
  }
3050
3059
  }, {
3051
3060
  key: "getInternationalPrefixBeforeCountryCallingCode",
@@ -3073,8 +3082,8 @@ var w3 = "9", O4 = 15, T4 = W(w3, O4), V4 = /[- ]/, R4 = function() {
3073
3082
  key: "getTemplateForFormat",
3074
3083
  value: function(e, i) {
3075
3084
  var a = i.nationalSignificantNumber, d = i.international, r = i.nationalPrefix, n = i.complexPrefixBeforeNationalSignificantNumber, c = e.pattern();
3076
- c = c.replace(R4(), "\\d").replace(k4(), "\\d");
3077
- var h = T4.match(c)[0];
3085
+ c = c.replace(k4(), "\\d").replace(_4(), "\\d");
3086
+ var h = V4.match(c)[0];
3078
3087
  if (!(a.length > h.length)) {
3079
3088
  var s = new RegExp("^" + c + "$"), o = a.replace(/\d/g, w3);
3080
3089
  s.test(o) && (h = o);
@@ -3095,7 +3104,7 @@ var w3 = "9", O4 = 15, T4 = W(w3, O4), V4 = /[- ]/, R4 = function() {
3095
3104
  }, {
3096
3105
  key: "formatNextNationalNumberDigits",
3097
3106
  value: function(e) {
3098
- var i = w4(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, e);
3107
+ var i = z4(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, e);
3099
3108
  if (!i) {
3100
3109
  this.resetFormat();
3101
3110
  return;
@@ -3115,13 +3124,13 @@ var w3 = "9", O4 = 15, T4 = W(w3, O4), V4 = /[- ]/, R4 = function() {
3115
3124
  }]), t;
3116
3125
  }();
3117
3126
  function j1(t, l) {
3118
- return Z4(t) || W4(t, l) || U4(t, l) || j4();
3127
+ return Y4(t) || Z4(t, l) || W4(t, l) || U4();
3119
3128
  }
3120
- function j4() {
3129
+ function U4() {
3121
3130
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3122
3131
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3123
3132
  }
3124
- function U4(t, l) {
3133
+ function W4(t, l) {
3125
3134
  if (!!t) {
3126
3135
  if (typeof t == "string")
3127
3136
  return w1(t, l);
@@ -3138,7 +3147,7 @@ function w1(t, l) {
3138
3147
  i[e] = t[e];
3139
3148
  return i;
3140
3149
  }
3141
- function W4(t, l) {
3150
+ function Z4(t, l) {
3142
3151
  var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
3143
3152
  if (e != null) {
3144
3153
  var i = [], a = !0, d = !1, r, n;
@@ -3158,11 +3167,11 @@ function W4(t, l) {
3158
3167
  return i;
3159
3168
  }
3160
3169
  }
3161
- function Z4(t) {
3170
+ function Y4(t) {
3162
3171
  if (Array.isArray(t))
3163
3172
  return t;
3164
3173
  }
3165
- function Y4(t, l) {
3174
+ function K4(t, l) {
3166
3175
  if (!(t instanceof l))
3167
3176
  throw new TypeError("Cannot call a class as a function");
3168
3177
  }
@@ -3172,18 +3181,18 @@ function z1(t, l) {
3172
3181
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
3173
3182
  }
3174
3183
  }
3175
- function K4(t, l, e) {
3184
+ function X4(t, l, e) {
3176
3185
  return l && z1(t.prototype, l), e && z1(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
3177
3186
  }
3178
- var X4 = "[" + b + H + "]+", J4 = new RegExp("^" + X4 + "$", "i"), Q4 = "(?:[" + Q + "][" + b + H + "]*|[" + b + H + "]+)", q4 = new RegExp("[^" + b + H + "]+.*$"), e5 = /[^\d\[\]]/, t5 = /* @__PURE__ */ function() {
3187
+ var J4 = "[" + b + H + "]+", Q4 = new RegExp("^" + J4 + "$", "i"), q4 = "(?:[" + Q + "][" + b + H + "]*|[" + b + H + "]+)", e5 = new RegExp("[^" + b + H + "]+.*$"), t5 = /[^\d\[\]]/, l5 = /* @__PURE__ */ function() {
3179
3188
  function t(l) {
3180
3189
  var e = l.defaultCountry, i = l.defaultCallingCode, a = l.metadata, d = l.onNationalSignificantNumberChange;
3181
- Y4(this, t), this.defaultCountry = e, this.defaultCallingCode = i, this.metadata = a, this.onNationalSignificantNumberChange = d;
3190
+ K4(this, t), this.defaultCountry = e, this.defaultCallingCode = i, this.metadata = a, this.onNationalSignificantNumberChange = d;
3182
3191
  }
3183
- return K4(t, [{
3192
+ return X4(t, [{
3184
3193
  key: "input",
3185
3194
  value: function(e, i) {
3186
- var a = a5(e), d = j1(a, 2), r = d[0], n = d[1], c = X(r), h;
3195
+ var a = d5(e), d = j1(a, 2), r = d[0], n = d[1], c = X(r), h;
3187
3196
  return n && (i.digits || (i.startInternationalNumber(), c || (h = !0))), c && this.inputDigits(c, i), {
3188
3197
  digits: c,
3189
3198
  justLeadingPlus: h
@@ -3223,7 +3232,7 @@ var X4 = "[" + b + H + "]+", J4 = new RegExp("^" + X4 + "$", "i"), Q4 = "(?:[" +
3223
3232
  if (e) {
3224
3233
  this.hasSelectedNumberingPlan = !0;
3225
3234
  var i = e._nationalPrefixForParsing();
3226
- this.couldPossiblyExtractAnotherNationalSignificantNumber = i && e5.test(i);
3235
+ this.couldPossiblyExtractAnotherNationalSignificantNumber = i && t5.test(i);
3227
3236
  } else
3228
3237
  this.hasSelectedNumberingPlan = void 0, this.couldPossiblyExtractAnotherNationalSignificantNumber = void 0;
3229
3238
  }
@@ -3313,21 +3322,21 @@ var X4 = "[" + b + H + "]+", J4 = new RegExp("^" + X4 + "$", "i"), Q4 = "(?:[" +
3313
3322
  }
3314
3323
  }]), t;
3315
3324
  }();
3316
- function l5(t) {
3317
- var l = t.search(Q4);
3325
+ function i5(t) {
3326
+ var l = t.search(q4);
3318
3327
  if (!(l < 0)) {
3319
3328
  t = t.slice(l);
3320
3329
  var e;
3321
- return t[0] === "+" && (e = !0, t = t.slice(1)), t = t.replace(q4, ""), e && (t = "+" + t), t;
3330
+ return t[0] === "+" && (e = !0, t = t.slice(1)), t = t.replace(e5, ""), e && (t = "+" + t), t;
3322
3331
  }
3323
3332
  }
3324
- function i5(t) {
3325
- var l = l5(t) || "";
3333
+ function a5(t) {
3334
+ var l = i5(t) || "";
3326
3335
  return l[0] === "+" ? [l.slice(1), !0] : [l];
3327
3336
  }
3328
- function a5(t) {
3329
- var l = i5(t), e = j1(l, 2), i = e[0], a = e[1];
3330
- return J4.test(i) || (i = ""), [i, a];
3337
+ function d5(t) {
3338
+ var l = a5(t), e = j1(l, 2), i = e[0], a = e[1];
3339
+ return Q4.test(i) || (i = ""), [i, a];
3331
3340
  }
3332
3341
  function z3(t) {
3333
3342
  return z3 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(l) {
@@ -3336,14 +3345,14 @@ function z3(t) {
3336
3345
  return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l;
3337
3346
  }, z3(t);
3338
3347
  }
3339
- function d5(t, l) {
3340
- return h5(t) || c5(t, l) || n5(t, l) || r5();
3348
+ function r5(t, l) {
3349
+ return s5(t) || h5(t, l) || c5(t, l) || n5();
3341
3350
  }
3342
- function r5() {
3351
+ function n5() {
3343
3352
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3344
3353
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3345
3354
  }
3346
- function n5(t, l) {
3355
+ function c5(t, l) {
3347
3356
  if (!!t) {
3348
3357
  if (typeof t == "string")
3349
3358
  return M1(t, l);
@@ -3360,7 +3369,7 @@ function M1(t, l) {
3360
3369
  i[e] = t[e];
3361
3370
  return i;
3362
3371
  }
3363
- function c5(t, l) {
3372
+ function h5(t, l) {
3364
3373
  var e = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
3365
3374
  if (e != null) {
3366
3375
  var i = [], a = !0, d = !1, r, n;
@@ -3380,11 +3389,11 @@ function c5(t, l) {
3380
3389
  return i;
3381
3390
  }
3382
3391
  }
3383
- function h5(t) {
3392
+ function s5(t) {
3384
3393
  if (Array.isArray(t))
3385
3394
  return t;
3386
3395
  }
3387
- function s5(t, l) {
3396
+ function o5(t, l) {
3388
3397
  if (!(t instanceof l))
3389
3398
  throw new TypeError("Cannot call a class as a function");
3390
3399
  }
@@ -3394,16 +3403,16 @@ function x1(t, l) {
3394
3403
  i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
3395
3404
  }
3396
3405
  }
3397
- function o5(t, l, e) {
3406
+ function v5(t, l, e) {
3398
3407
  return l && x1(t.prototype, l), e && x1(t, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
3399
3408
  }
3400
3409
  var U1 = /* @__PURE__ */ function() {
3401
3410
  function t(l, e) {
3402
- s5(this, t), this.metadata = new x(e);
3403
- var i = this.getCountryAndCallingCode(l), a = d5(i, 2), d = a[0], r = a[1];
3411
+ o5(this, t), this.metadata = new x(e);
3412
+ var i = this.getCountryAndCallingCode(l), a = r5(i, 2), d = a[0], r = a[1];
3404
3413
  this.defaultCountry = d, this.defaultCallingCode = r, this.reset();
3405
3414
  }
3406
- return o5(t, [{
3415
+ return v5(t, [{
3407
3416
  key: "getCountryAndCallingCode",
3408
3417
  value: function(e) {
3409
3418
  var i, a;
@@ -3431,17 +3440,17 @@ var U1 = /* @__PURE__ */ function() {
3431
3440
  key: "reset",
3432
3441
  value: function() {
3433
3442
  var e = this;
3434
- return this.state = new g4({
3443
+ return this.state = new $4({
3435
3444
  onCountryChange: function(a) {
3436
3445
  e.country = a;
3437
3446
  },
3438
3447
  onCallingCodeChange: function(a, d) {
3439
3448
  e.metadata.selectNumberingPlan(a, d), e.formatter.reset(e.metadata.numberingPlan, e.state), e.parser.reset(e.metadata.numberingPlan);
3440
3449
  }
3441
- }), this.formatter = new G4({
3450
+ }), this.formatter = new j4({
3442
3451
  state: this.state,
3443
3452
  metadata: this.metadata
3444
- }), this.parser = new t5({
3453
+ }), this.parser = new l5({
3445
3454
  defaultCountry: this.defaultCountry,
3446
3455
  defaultCallingCode: this.defaultCallingCode,
3447
3456
  metadata: this.metadata,
@@ -3580,8 +3589,8 @@ var U1 = /* @__PURE__ */ function() {
3580
3589
  }
3581
3590
  }]), t;
3582
3591
  }();
3583
- function A5() {
3584
- return A2(v4, arguments);
3592
+ function C5() {
3593
+ return C2(f4, arguments);
3585
3594
  }
3586
3595
  function I(t) {
3587
3596
  return U1.call(this, t, M3);
@@ -3597,11 +3606,11 @@ function s3(t) {
3597
3606
  isoCode: d.getCountry() || l || null
3598
3607
  };
3599
3608
  }
3600
- function v5(t, l) {
3609
+ function f5(t, l) {
3601
3610
  const { excludedCountries: e, onlyCountries: i, continents: a } = l;
3602
3611
  return !(D(e, !0) && e.includes(t) || D(i) && !i.includes(t) || D(a) && !x2(a, t));
3603
3612
  }
3604
- function f5({
3613
+ function u5({
3605
3614
  value: t,
3606
3615
  onChange: l,
3607
3616
  defaultCountry: e,
@@ -3621,7 +3630,7 @@ function f5({
3621
3630
  nationalNumber: h.current.getNationalNumber(),
3622
3631
  numberValue: h.current.getNumberValue() || null,
3623
3632
  reason: f
3624
- }), S = (f) => f && v5(f, {
3633
+ }), S = (f) => f && f5(f, {
3625
3634
  onlyCountries: a,
3626
3635
  excludedCountries: d,
3627
3636
  continents: r
@@ -3696,7 +3705,7 @@ function f5({
3696
3705
  inputRef: s
3697
3706
  };
3698
3707
  }
3699
- const u5 = $.forwardRef((t, l) => {
3708
+ const g5 = $.forwardRef((t, l) => {
3700
3709
  const {
3701
3710
  forceCallingCode: e,
3702
3711
  onlyCountries: i,
@@ -3721,14 +3730,14 @@ const u5 = $.forwardRef((t, l) => {
3721
3730
  className: f,
3722
3731
  ...M
3723
3732
  } = t, C = $.useRef(null), [L, T] = $.useState(null);
3724
- b2(t);
3733
+ A2(t);
3725
3734
  const {
3726
3735
  onInputChange: F,
3727
3736
  onCountryChange: V,
3728
3737
  inputRef: P,
3729
3738
  isoCode: A3,
3730
3739
  inputValue: W1
3731
- } = f5({
3740
+ } = u5({
3732
3741
  defaultCountry: d,
3733
3742
  value: h ?? "",
3734
3743
  onChange: w,
@@ -3745,7 +3754,7 @@ const u5 = $.forwardRef((t, l) => {
3745
3754
  T(null), V(m), A && Y1();
3746
3755
  }, X1 = (m) => {
3747
3756
  queueMicrotask(() => {
3748
- P.current && y2(P.current);
3757
+ P.current && b2(P.current);
3749
3758
  }), n?.(m);
3750
3759
  }, J1 = (m) => {
3751
3760
  const R = P.current;
@@ -3810,11 +3819,11 @@ const u5 = $.forwardRef((t, l) => {
3810
3819
  })]
3811
3820
  });
3812
3821
  });
3813
- u5.defaultProps = {
3822
+ g5.defaultProps = {
3814
3823
  value: ""
3815
3824
  };
3816
3825
  export {
3817
3826
  I as AsYouType,
3818
- u5 as MuiTelInput,
3819
- A5 as matchIsValidTel
3827
+ g5 as MuiTelInput,
3828
+ C5 as matchIsValidTel
3820
3829
  };