vue-tel-input 8.1.2 → 8.1.4

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.
@@ -241,7 +241,7 @@ const He = [
241
241
  "269"
242
242
  ],
243
243
  [
244
- "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)",
244
+ "Congo (DRC) (République démocratique du Congo)",
245
245
  "cd",
246
246
  "243"
247
247
  ],
@@ -1503,20 +1503,20 @@ function j(e) {
1503
1503
  return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d;
1504
1504
  }, j(e);
1505
1505
  }
1506
- function J(e, d) {
1506
+ function q(e, d) {
1507
1507
  for (var t = 0; t < d.length; t++) {
1508
1508
  var n = d[t];
1509
1509
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
1510
1510
  }
1511
1511
  }
1512
1512
  function Ze(e, d, t) {
1513
- return d && J(e.prototype, d), t && J(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1513
+ return d && q(e.prototype, d), t && q(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1514
1514
  }
1515
- function Je(e, d) {
1515
+ function qe(e, d) {
1516
1516
  if (!(e instanceof d))
1517
1517
  throw new TypeError("Cannot call a class as a function");
1518
1518
  }
1519
- function qe(e, d) {
1519
+ function Je(e, d) {
1520
1520
  if (typeof d != "function" && d !== null)
1521
1521
  throw new TypeError("Super expression must either be null or a function");
1522
1522
  e.prototype = Object.create(d && d.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), d && w(e, d);
@@ -1597,15 +1597,15 @@ function I(e) {
1597
1597
  }, I(e);
1598
1598
  }
1599
1599
  var m = /* @__PURE__ */ function(e) {
1600
- qe(t, e);
1600
+ Je(t, e);
1601
1601
  var d = Qe(t);
1602
1602
  function t(n) {
1603
1603
  var r;
1604
- return Je(this, t), r = d.call(this, n), Object.setPrototypeOf(Ne(r), t.prototype), r.name = r.constructor.name, r;
1604
+ return qe(this, t), r = d.call(this, n), Object.setPrototypeOf(Ne(r), t.prototype), r.name = r.constructor.name, r;
1605
1605
  }
1606
1606
  return Ze(t);
1607
1607
  }(/* @__PURE__ */ U(Error)), K = 2, td = 17, nd = 3, g = "0-90-9٠-٩۰-۹", rd = "-‐-―−ー-", id = "//", $d = "..", ad = "  ­​⁠ ", od = "()()[]\\[\\]", ud = "~⁓∼~", T = "".concat(rd).concat(id).concat($d).concat(ad).concat(od).concat(ud), W = "++";
1608
- function q(e, d) {
1608
+ function J(e, d) {
1609
1609
  e = e.split("-"), d = d.split("-");
1610
1610
  for (var t = e[0].split("."), n = d[0].split("."), r = 0; r < 3; r++) {
1611
1611
  var i = Number(t[r]), a = Number(n[r]);
@@ -2071,7 +2071,7 @@ function gd(e, d) {
2071
2071
  }
2072
2072
  function Ie(e) {
2073
2073
  var d = e.version;
2074
- typeof d == "number" ? (this.v1 = d === 1, this.v2 = d === 2, this.v3 = d === 3, this.v4 = d === 4) : d ? q(d, sd) === -1 ? this.v2 = !0 : q(d, ld) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
2074
+ typeof d == "number" ? (this.v1 = d === 1, this.v2 = d === 2, this.v3 = d === 3, this.v4 = d === 4) : d ? J(d, sd) === -1 ? this.v2 = !0 : J(d, ld) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
2075
2075
  }
2076
2076
  var bd = ";ext=", O = function(d) {
2077
2077
  return "([".concat(g, "]{1,").concat(d, "})");
@@ -2492,14 +2492,14 @@ function Yd(e, d, t) {
2492
2492
  return n ? zd(i) : i;
2493
2493
  }
2494
2494
  var Zd = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
2495
- function Jd(e, d, t) {
2495
+ function qd(e, d, t) {
2496
2496
  var n = new l(t);
2497
2497
  if (n.selectNumberingPlan(e, d), n.defaultIDDPrefix())
2498
2498
  return n.defaultIDDPrefix();
2499
2499
  if (Zd.test(n.IDDPrefix()))
2500
2500
  return n.IDDPrefix();
2501
2501
  }
2502
- function qd(e, d) {
2502
+ function Jd(e, d) {
2503
2503
  var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2504
2504
  if (t)
2505
2505
  return (t = t.call(e)).next.bind(t);
@@ -2600,7 +2600,7 @@ function x(e, d, t, n, r) {
2600
2600
  }) : e;
2601
2601
  }
2602
2602
  function tt(e, d) {
2603
- for (var t = qd(e), n; !(n = t()).done; ) {
2603
+ for (var t = Jd(e), n; !(n = t()).done; ) {
2604
2604
  var r = n.value;
2605
2605
  if (r.leadingDigitsPatterns().length > 0) {
2606
2606
  var i = r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length - 1];
@@ -2620,7 +2620,7 @@ function nt(e, d, t, n, r) {
2620
2620
  var a = x(e, d, "NATIONAL", r);
2621
2621
  return t === "1" ? t + " " + a : a;
2622
2622
  }
2623
- var $ = Jd(n, void 0, r.metadata);
2623
+ var $ = qd(n, void 0, r.metadata);
2624
2624
  if ($)
2625
2625
  return "".concat($, " ").concat(t, " ").concat(x(e, null, "INTERNATIONAL", r));
2626
2626
  }
@@ -3193,7 +3193,8 @@ const Ht = {
3193
3193
  n && (r += `Found in component ${n}`), console.warn(r);
3194
3194
  }
3195
3195
  e.clickOutsideEvent = function(n) {
3196
- e === n.target || e.contains(n.target) || d.value(n, e);
3196
+ const r = n.composedPath ? n.composedPath() : n.path;
3197
+ e === n.target || e.contains(n.target) || r.includes(e) || d.value(n, e);
3197
3198
  }, document.body.addEventListener("click", e.clickOutsideEvent);
3198
3199
  },
3199
3200
  unmounted(e) {
@@ -3310,10 +3311,13 @@ const Kt = {
3310
3311
  ) : this.allCountries;
3311
3312
  },
3312
3313
  sortedCountries() {
3313
- const d = [...this.getCountries(this.preferredCountries).map((t) => ({ ...t, preferred: !0 })), ...this.filteredCountries];
3314
- return this.dropdownOptions.showSearchBox ? d.filter(
3315
- (t) => new RegExp(this.searchQuery, "i").test(t.name) || new RegExp(this.searchQuery, "i").test(t.iso2) || new RegExp(this.searchQuery, "i").test(t.dialCode)
3316
- ) : d;
3314
+ const d = [...this.getCountries(this.preferredCountries).map((r) => ({ ...r, preferred: !0 })), ...this.filteredCountries];
3315
+ if (!this.dropdownOptions.showSearchBox)
3316
+ return d;
3317
+ const n = this.searchQuery.replace(/[~`!@#$%^&*()+={}\[\];:\'\"<>.,\/\\\?-_]/g, "");
3318
+ return d.filter(
3319
+ (r) => new RegExp(n, "i").test(r.name) || new RegExp(n, "i").test(r.iso2) || new RegExp(n, "i").test(r.dialCode)
3320
+ );
3317
3321
  },
3318
3322
  phoneObject() {
3319
3323
  var i, a, $;
@@ -3524,7 +3528,7 @@ const Kt = {
3524
3528
  }, Wt = ["aria-expanded", "tabindex"], zt = { class: "vti__selection" }, Xt = {
3525
3529
  key: 1,
3526
3530
  class: "vti__country-code"
3527
- }, Yt = { class: "vti__dropdown-arrow" }, Zt = ["placeholder"], Jt = ["onClick", "onMousemove", "aria-selected"], qt = { key: 1 }, Qt = ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex", "value", "aria-describedby"];
3531
+ }, Yt = { class: "vti__dropdown-arrow" }, Zt = ["placeholder"], qt = ["onClick", "onMousemove", "aria-selected"], Jt = { key: 1 }, Qt = ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex", "value", "aria-describedby"];
3528
3532
  function e1(e, d, t, n, r, i) {
3529
3533
  const a = Le("click-outside");
3530
3534
  return h(), p("div", {
@@ -3587,8 +3591,8 @@ function e1(e, d, t, n, r, i) {
3587
3591
  class: b(["vti__flag", $.iso2.toLowerCase()])
3588
3592
  }, null, 2)) : C("", !0),
3589
3593
  E("strong", null, S($.name), 1),
3590
- t.dropdownOptions.showDialCodeInList ? (h(), p("span", qt, " +" + S($.dialCode), 1)) : C("", !0)
3591
- ], 42, Jt))), 128))
3594
+ t.dropdownOptions.showDialCodeInList ? (h(), p("span", Jt, " +" + S($.dialCode), 1)) : C("", !0)
3595
+ ], 42, qt))), 128))
3592
3596
  ], 2)) : C("", !0)
3593
3597
  ], 42, Wt)), [
3594
3598
  [a, i.clickedOutside]