@quidgest/ui 0.19.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/dist/json/api.json +1414 -45
- package/dist/manifest/components.json +2 -0
- package/dist/ui.css +1374 -5
- package/dist/ui.esm.js +1459 -841
- package/dist/ui.js +1444 -826
- package/dist/ui.min.css +2 -1
- package/dist/ui.min.js +1444 -826
- package/dist/ui.scss +569 -7
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.vue.js +1 -1
- package/esm/components/QGauge/QGauge.d.ts +56 -0
- package/esm/components/QGauge/QGauge.d.ts.map +1 -0
- package/esm/components/QGauge/QGauge.vue.js +305 -0
- package/esm/components/QGauge/QGauge2.vue.js +5 -0
- package/esm/components/QGauge/constants.d.ts +6 -0
- package/esm/components/QGauge/constants.d.ts.map +1 -0
- package/esm/components/QGauge/constants.js +8 -0
- package/esm/components/QGauge/index.d.ts +124 -0
- package/esm/components/QGauge/index.d.ts.map +1 -0
- package/esm/components/QGauge/index.js +6 -0
- package/esm/components/QGauge/types.d.ts +146 -0
- package/esm/components/QGauge/types.d.ts.map +1 -0
- package/esm/components/QInputGroup/QInputGroup.d.ts +147 -3
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +32 -23
- package/esm/components/QInputGroup/index.d.ts +81 -4
- package/esm/components/QInputGroup/index.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +3 -1
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +24 -28
- package/esm/components/QList/types.d.ts +1 -1
- package/esm/components/QOverlay/types.d.ts +3 -1
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +2263 -0
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -0
- package/esm/components/QPhoneField/QPhoneField.vue.js +478 -0
- package/esm/components/QPhoneField/QPhoneField2.vue.js +5 -0
- package/esm/components/QPhoneField/constants.d.ts +11 -0
- package/esm/components/QPhoneField/constants.d.ts.map +1 -0
- package/esm/components/QPhoneField/constants.js +14 -0
- package/esm/components/QPhoneField/index.d.ts +1253 -0
- package/esm/components/QPhoneField/index.d.ts.map +1 -0
- package/esm/components/QPhoneField/index.js +6 -0
- package/esm/components/QPhoneField/types.d.ts +108 -0
- package/esm/components/QPhoneField/types.d.ts.map +1 -0
- package/esm/components/QSelect/QSelect.d.ts +16 -1
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +158 -129
- package/esm/components/QSelect/index.d.ts +31 -3
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +13 -0
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/index.d.ts +2 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +64 -60
- package/esm/composables/useColor/index.d.ts +8 -0
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +16 -18
- package/esm/composables/useDialog/index.d.ts +2 -88
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/index.js +6 -6
- package/esm/composables/useDialog/types.d.ts +14 -4
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/vendors/country-flag-icons/modules/countries.json.js +4 -0
- package/esm/vendors/country-flag-icons/modules/hasFlag.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouType.js +312 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +142 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +145 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +45 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.js +258 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeFormatter.util.js +57 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeParser.js +242 -0
- package/esm/vendors/libphonenumber-js/es6/AsYouTypeState.js +115 -0
- package/esm/vendors/libphonenumber-js/es6/ParseError.js +116 -0
- package/esm/vendors/libphonenumber-js/es6/PhoneNumber.js +164 -0
- package/esm/vendors/libphonenumber-js/es6/constants.js +4 -0
- package/esm/vendors/libphonenumber-js/es6/format.js +77 -0
- package/esm/vendors/libphonenumber-js/es6/formatIncompletePhoneNumber.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/getCountries.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/getExampleNumber.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/RFC3966.js +9 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/checkNumberLength.js +21 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extension/extractExtension.js +16 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +36 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +21 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +18 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumber.js +27 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +27 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js +13 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +12 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +43 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getIddPrefix.js +10 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getNumberType.js +61 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +14 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isCallingCode.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isCountryCode.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isObject.js +7 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +12 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/matchesEntirely.js +6 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/mergeArrays.js +39 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/parseDigits.js +82 -0
- package/esm/vendors/libphonenumber-js/es6/helpers/stripIddPrefix.js +18 -0
- package/esm/vendors/libphonenumber-js/es6/isPossible.js +32 -0
- package/esm/vendors/libphonenumber-js/es6/isValid.js +11 -0
- package/esm/vendors/libphonenumber-js/es6/metadata.js +474 -0
- package/esm/vendors/libphonenumber-js/es6/normalizeArguments.js +110 -0
- package/esm/vendors/libphonenumber-js/es6/parse.js +103 -0
- package/esm/vendors/libphonenumber-js/es6/parseIncompletePhoneNumber.js +48 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber.js +9 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumberWithError_.js +58 -0
- package/esm/vendors/libphonenumber-js/es6/parsePhoneNumber_.js +66 -0
- package/esm/vendors/libphonenumber-js/es6/tools/semver-compare.js +14 -0
- package/esm/vendors/libphonenumber-js/examples.mobile.json.js +250 -0
- package/esm/vendors/libphonenumber-js/max/exports/AsYouType.js +9 -0
- package/esm/vendors/libphonenumber-js/max/exports/formatIncompletePhoneNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getCountries.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getCountryCallingCode.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/getExampleNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/isSupportedCountry.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/parsePhoneNumber.js +8 -0
- package/esm/vendors/libphonenumber-js/max/exports/withMetadataArgument.js +8 -0
- package/esm/vendors/libphonenumber-js/metadata.max.json.js +10489 -0
- package/package.json +3 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/ParseError.js
|
|
2
|
+
function e(t) {
|
|
3
|
+
"@babel/helpers - typeof";
|
|
4
|
+
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
5
|
+
return typeof e;
|
|
6
|
+
} : function(e) {
|
|
7
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
8
|
+
}, e(t);
|
|
9
|
+
}
|
|
10
|
+
function t(e, t) {
|
|
11
|
+
for (var n = 0; n < t.length; n++) {
|
|
12
|
+
var i = t[n];
|
|
13
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, r(i.key), i);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function n(e, n, r) {
|
|
17
|
+
return n && t(e.prototype, n), r && t(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
18
|
+
}
|
|
19
|
+
function r(t) {
|
|
20
|
+
var n = i(t, "string");
|
|
21
|
+
return e(n) == "symbol" ? n : n + "";
|
|
22
|
+
}
|
|
23
|
+
function i(t, n) {
|
|
24
|
+
if (e(t) != "object" || !t) return t;
|
|
25
|
+
var r = t[Symbol.toPrimitive];
|
|
26
|
+
if (r !== void 0) {
|
|
27
|
+
var i = r.call(t, n || "default");
|
|
28
|
+
if (e(i) != "object") return i;
|
|
29
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
30
|
+
}
|
|
31
|
+
return (n === "string" ? String : Number)(t);
|
|
32
|
+
}
|
|
33
|
+
function a(e, t) {
|
|
34
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
35
|
+
}
|
|
36
|
+
function o(e, t, n) {
|
|
37
|
+
return t = h(t), s(e, f() ? Reflect.construct(t, n || [], h(e).constructor) : t.apply(e, n));
|
|
38
|
+
}
|
|
39
|
+
function s(t, n) {
|
|
40
|
+
if (n && (e(n) == "object" || typeof n == "function")) return n;
|
|
41
|
+
if (n !== void 0) throw TypeError("Derived constructors may only return object or undefined");
|
|
42
|
+
return c(t);
|
|
43
|
+
}
|
|
44
|
+
function c(e) {
|
|
45
|
+
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
46
|
+
return e;
|
|
47
|
+
}
|
|
48
|
+
function l(e, t) {
|
|
49
|
+
if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
|
|
50
|
+
e.prototype = Object.create(t && t.prototype, { constructor: {
|
|
51
|
+
value: e,
|
|
52
|
+
writable: !0,
|
|
53
|
+
configurable: !0
|
|
54
|
+
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && m(e, t);
|
|
55
|
+
}
|
|
56
|
+
function u(e) {
|
|
57
|
+
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
58
|
+
return u = function(e) {
|
|
59
|
+
if (e === null || !p(e)) return e;
|
|
60
|
+
if (typeof e != "function") throw TypeError("Super expression must either be null or a function");
|
|
61
|
+
if (t !== void 0) {
|
|
62
|
+
if (t.has(e)) return t.get(e);
|
|
63
|
+
t.set(e, n);
|
|
64
|
+
}
|
|
65
|
+
function n() {
|
|
66
|
+
return d(e, arguments, h(this).constructor);
|
|
67
|
+
}
|
|
68
|
+
return n.prototype = Object.create(e.prototype, { constructor: {
|
|
69
|
+
value: n,
|
|
70
|
+
enumerable: !1,
|
|
71
|
+
writable: !0,
|
|
72
|
+
configurable: !0
|
|
73
|
+
} }), m(n, e);
|
|
74
|
+
}, u(e);
|
|
75
|
+
}
|
|
76
|
+
function d(e, t, n) {
|
|
77
|
+
if (f()) return Reflect.construct.apply(null, arguments);
|
|
78
|
+
var r = [null];
|
|
79
|
+
r.push.apply(r, t);
|
|
80
|
+
var i = new (e.bind.apply(e, r))();
|
|
81
|
+
return n && m(i, n.prototype), i;
|
|
82
|
+
}
|
|
83
|
+
function f() {
|
|
84
|
+
try {
|
|
85
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
86
|
+
} catch {}
|
|
87
|
+
return (f = function() {
|
|
88
|
+
return !!e;
|
|
89
|
+
})();
|
|
90
|
+
}
|
|
91
|
+
function p(e) {
|
|
92
|
+
try {
|
|
93
|
+
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
94
|
+
} catch {
|
|
95
|
+
return typeof e == "function";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function m(e, t) {
|
|
99
|
+
return m = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
100
|
+
return e.__proto__ = t, e;
|
|
101
|
+
}, m(e, t);
|
|
102
|
+
}
|
|
103
|
+
function h(e) {
|
|
104
|
+
return h = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
105
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
106
|
+
}, h(e);
|
|
107
|
+
}
|
|
108
|
+
var g = /*#__PURE__*/ function(e) {
|
|
109
|
+
function t(e) {
|
|
110
|
+
var n;
|
|
111
|
+
return a(this, t), n = o(this, t, [e]), Object.setPrototypeOf(n, t.prototype), n.name = n.constructor.name, n;
|
|
112
|
+
}
|
|
113
|
+
return l(t, e), n(t);
|
|
114
|
+
}(/*#__PURE__*/ u(Error));
|
|
115
|
+
//#endregion
|
|
116
|
+
export { g as default };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import e from "./helpers/isObject.js";
|
|
2
|
+
import t, { validateMetadata as n } from "./metadata.js";
|
|
3
|
+
import r from "./isPossible.js";
|
|
4
|
+
import i from "./helpers/getNumberType.js";
|
|
5
|
+
import a from "./isValid.js";
|
|
6
|
+
import o from "./helpers/getCountryAndCallingCodeFromOneOfThem.js";
|
|
7
|
+
import s from "./helpers/getPossibleCountriesForNumber.js";
|
|
8
|
+
import c from "./helpers/extractCountryCallingCode.js";
|
|
9
|
+
import l from "./format.js";
|
|
10
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/PhoneNumber.js
|
|
11
|
+
function u(e) {
|
|
12
|
+
"@babel/helpers - typeof";
|
|
13
|
+
return u = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
14
|
+
return typeof e;
|
|
15
|
+
} : function(e) {
|
|
16
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
17
|
+
}, u(e);
|
|
18
|
+
}
|
|
19
|
+
function d(e, t) {
|
|
20
|
+
var n = Object.keys(e);
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
23
|
+
t && (r = r.filter(function(t) {
|
|
24
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
25
|
+
})), n.push.apply(n, r);
|
|
26
|
+
}
|
|
27
|
+
return n;
|
|
28
|
+
}
|
|
29
|
+
function f(e) {
|
|
30
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
31
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
32
|
+
t % 2 ? d(Object(n), !0).forEach(function(t) {
|
|
33
|
+
p(e, t, n[t]);
|
|
34
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : d(Object(n)).forEach(function(t) {
|
|
35
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return e;
|
|
39
|
+
}
|
|
40
|
+
function p(e, t, n) {
|
|
41
|
+
return (t = _(t)) in e ? Object.defineProperty(e, t, {
|
|
42
|
+
value: n,
|
|
43
|
+
enumerable: !0,
|
|
44
|
+
configurable: !0,
|
|
45
|
+
writable: !0
|
|
46
|
+
}) : e[t] = n, e;
|
|
47
|
+
}
|
|
48
|
+
function m(e, t) {
|
|
49
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
50
|
+
}
|
|
51
|
+
function h(e, t) {
|
|
52
|
+
for (var n = 0; n < t.length; n++) {
|
|
53
|
+
var r = t[n];
|
|
54
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, _(r.key), r);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function g(e, t, n) {
|
|
58
|
+
return t && h(e.prototype, t), n && h(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
59
|
+
}
|
|
60
|
+
function _(e) {
|
|
61
|
+
var t = v(e, "string");
|
|
62
|
+
return u(t) == "symbol" ? t : t + "";
|
|
63
|
+
}
|
|
64
|
+
function v(e, t) {
|
|
65
|
+
if (u(e) != "object" || !e) return e;
|
|
66
|
+
var n = e[Symbol.toPrimitive];
|
|
67
|
+
if (n !== void 0) {
|
|
68
|
+
var r = n.call(e, t || "default");
|
|
69
|
+
if (u(r) != "object") return r;
|
|
70
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
71
|
+
}
|
|
72
|
+
return (t === "string" ? String : Number)(e);
|
|
73
|
+
}
|
|
74
|
+
var y = /*#__PURE__*/ function() {
|
|
75
|
+
function u(t, r, i) {
|
|
76
|
+
if (m(this, u), !t) throw TypeError("First argument is required");
|
|
77
|
+
if (typeof t != "string") throw TypeError("First argument must be a string");
|
|
78
|
+
if (t[0] === "+" && !r) throw TypeError("`metadata` argument not passed");
|
|
79
|
+
if (e(r) && e(r.countries)) {
|
|
80
|
+
i = r;
|
|
81
|
+
var a = t;
|
|
82
|
+
if (!b.test(a)) throw Error("Invalid `number` argument passed: must consist of a \"+\" followed by digits");
|
|
83
|
+
var s = c(a, void 0, void 0, void 0, i), l = s.countryCallingCode;
|
|
84
|
+
if (r = s.number, t = l, !r) throw Error("Invalid `number` argument passed: too short");
|
|
85
|
+
}
|
|
86
|
+
if (!r) throw TypeError("`nationalNumber` argument is required");
|
|
87
|
+
if (typeof r != "string") throw TypeError("`nationalNumber` argument must be a string");
|
|
88
|
+
n(i);
|
|
89
|
+
var d = o(t, i), f = d.country, p = d.callingCode;
|
|
90
|
+
this.country = f, this.countryCallingCode = p, this.nationalNumber = r, this.number = "+" + this.countryCallingCode + this.nationalNumber, this.getMetadata = function() {
|
|
91
|
+
return i;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return g(u, [
|
|
95
|
+
{
|
|
96
|
+
key: "setExt",
|
|
97
|
+
value: function(e) {
|
|
98
|
+
this.ext = e;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
key: "getPossibleCountries",
|
|
103
|
+
value: function() {
|
|
104
|
+
return this.country ? [this.country] : s(this.countryCallingCode, this.nationalNumber, this.getMetadata());
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: "isPossible",
|
|
109
|
+
value: function() {
|
|
110
|
+
return r(this, { v2: !0 }, this.getMetadata());
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
key: "isValid",
|
|
115
|
+
value: function() {
|
|
116
|
+
return a(this, { v2: !0 }, this.getMetadata());
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: "isNonGeographic",
|
|
121
|
+
value: function() {
|
|
122
|
+
return new t(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
key: "isEqual",
|
|
127
|
+
value: function(e) {
|
|
128
|
+
return this.number === e.number && this.ext === e.ext;
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: "getType",
|
|
133
|
+
value: function() {
|
|
134
|
+
return i(this, { v2: !0 }, this.getMetadata());
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
key: "format",
|
|
139
|
+
value: function(e, t) {
|
|
140
|
+
return l(this, e, t ? f(f({}, t), {}, { v2: !0 }) : { v2: !0 }, this.getMetadata());
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
key: "formatNational",
|
|
145
|
+
value: function(e) {
|
|
146
|
+
return this.format("NATIONAL", e);
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: "formatInternational",
|
|
151
|
+
value: function(e) {
|
|
152
|
+
return this.format("INTERNATIONAL", e);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
key: "getURI",
|
|
157
|
+
value: function(e) {
|
|
158
|
+
return this.format("RFC3966", e);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
]);
|
|
162
|
+
}(), b = /^\+\d+$/;
|
|
163
|
+
//#endregion
|
|
164
|
+
export { y as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/constants.js
|
|
2
|
+
var e = "0-90-9٠-٩۰-۹", t = "-‐-―−ー-", n = "//", r = "..", i = " \xA0 ", a = `${t}${n}${r}${i}()()[]\\[\\]~⁓∼~`, o = "++";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { o as PLUS_CHARS, e as VALID_DIGITS, a as VALID_PUNCTUATION, i as WHITESPACE };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import e, { getCountryCallingCode as t } from "./metadata.js";
|
|
2
|
+
import n from "./helpers/matchesEntirely.js";
|
|
3
|
+
import r from "./helpers/formatNationalNumberUsingFormat.js";
|
|
4
|
+
import i from "./helpers/getIddPrefix.js";
|
|
5
|
+
import { formatRFC3966 as a } from "./helpers/RFC3966.js";
|
|
6
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/format.js
|
|
7
|
+
var o = { formatExtension: function(e, t, n) {
|
|
8
|
+
return `${e}${n.ext()}${t}`;
|
|
9
|
+
} };
|
|
10
|
+
function s(t, n, r, i) {
|
|
11
|
+
r = r ? f({}, o, r) : o;
|
|
12
|
+
var s = new e(i);
|
|
13
|
+
if (t.country && t.country !== "001") {
|
|
14
|
+
if (!s.hasCountry(t.country)) throw Error(`Unknown country: ${t.country}`);
|
|
15
|
+
s.selectNumberingPlan(t.country);
|
|
16
|
+
} else if (t.countryCallingCode) s.selectNumberingPlan(t.countryCallingCode);
|
|
17
|
+
else return t.phone || "";
|
|
18
|
+
var l = s.countryCallingCode(), p = r.v2 ? t.nationalNumber : t.phone, m;
|
|
19
|
+
switch (n) {
|
|
20
|
+
case "NATIONAL": return p ? (m = c(p, t.carrierCode, "NATIONAL", s, r), u(m, t.ext, s, r.formatExtension)) : "";
|
|
21
|
+
case "INTERNATIONAL": return p ? (m = c(p, null, "INTERNATIONAL", s, r), m = `+${l} ${m}`, u(m, t.ext, s, r.formatExtension)) : `+${l}`;
|
|
22
|
+
case "E.164": return `+${l}${p}`;
|
|
23
|
+
case "RFC3966": return a({
|
|
24
|
+
number: `+${l}${p}`,
|
|
25
|
+
ext: t.ext
|
|
26
|
+
});
|
|
27
|
+
case "IDD":
|
|
28
|
+
if (!r.fromCountry) return;
|
|
29
|
+
var h = d(p, t.carrierCode, l, r.fromCountry, s);
|
|
30
|
+
return h ? u(h, t.ext, s, r.formatExtension) : void 0;
|
|
31
|
+
default: throw Error(`Unknown "format" argument passed to "formatNumber()": "${n}"`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function c(e, t, n, i, a) {
|
|
35
|
+
var o = l(i.formats(), e);
|
|
36
|
+
return o ? r(e, o, {
|
|
37
|
+
useInternationalFormat: n === "INTERNATIONAL",
|
|
38
|
+
withNationalPrefix: !(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && a && a.nationalPrefix === !1),
|
|
39
|
+
carrierCode: t,
|
|
40
|
+
metadata: i
|
|
41
|
+
}) : e;
|
|
42
|
+
}
|
|
43
|
+
function l(e, t) {
|
|
44
|
+
return p(e, function(e) {
|
|
45
|
+
if (e.leadingDigitsPatterns().length > 0) {
|
|
46
|
+
var r = e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length - 1];
|
|
47
|
+
if (t.search(r) !== 0) return !1;
|
|
48
|
+
}
|
|
49
|
+
return n(t, e.pattern());
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function u(e, t, n, r) {
|
|
53
|
+
return t ? r(e, t, n) : e;
|
|
54
|
+
}
|
|
55
|
+
function d(e, n, r, a, o) {
|
|
56
|
+
if (t(a, o.metadata) === r) {
|
|
57
|
+
var s = c(e, n, "NATIONAL", o);
|
|
58
|
+
return r === "1" ? r + " " + s : s;
|
|
59
|
+
}
|
|
60
|
+
var l = i(a, void 0, o.metadata);
|
|
61
|
+
if (l) return `${l} ${r} ${c(e, null, "INTERNATIONAL", o)}`;
|
|
62
|
+
}
|
|
63
|
+
function f() {
|
|
64
|
+
for (var e = 1, t = [...arguments]; e < t.length;) {
|
|
65
|
+
if (t[e]) for (var n in t[e]) t[0][n] = t[e][n];
|
|
66
|
+
e++;
|
|
67
|
+
}
|
|
68
|
+
return t[0];
|
|
69
|
+
}
|
|
70
|
+
function p(e, t) {
|
|
71
|
+
for (var n = 0; n < e.length;) {
|
|
72
|
+
if (t(e[n])) return e[n];
|
|
73
|
+
n++;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { l as chooseFormatForNumber, s as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./AsYouType.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js
|
|
3
|
+
function t(t, n, r) {
|
|
4
|
+
return r || (r = n, n = void 0), new e(n, r).input(t);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/RFC3966.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
var t = e.number, n = e.ext;
|
|
4
|
+
if (!t) return "";
|
|
5
|
+
if (t[0] !== "+") throw Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
|
|
6
|
+
return `tel:${t}${n ? ";ext=" + n : ""}`;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as formatRFC3966 };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VALID_PUNCTUATION as e } from "../constants.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js
|
|
3
|
+
function t(t) {
|
|
4
|
+
return t.replace(RegExp(`[${e}]+`, "g"), " ").trim();
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import e from "../metadata.js";
|
|
2
|
+
import t from "./mergeArrays.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js
|
|
4
|
+
function n(e, t, n) {
|
|
5
|
+
return r(e, void 0, t, n);
|
|
6
|
+
}
|
|
7
|
+
function r(n, i, a, o) {
|
|
8
|
+
a && (o = new e(o.metadata), o.selectNumberingPlan(a));
|
|
9
|
+
var s = o.type(i), c = s && s.possibleLengths() || o.possibleLengths();
|
|
10
|
+
if (!c) return "IS_POSSIBLE";
|
|
11
|
+
if (i === "FIXED_LINE_OR_MOBILE") {
|
|
12
|
+
/* istanbul ignore next */
|
|
13
|
+
if (!o.type("FIXED_LINE")) return r(n, "MOBILE", a, o);
|
|
14
|
+
var l = o.type("MOBILE");
|
|
15
|
+
l && (c = t(c, l.possibleLengths()));
|
|
16
|
+
} else if (i && !s) return "INVALID_LENGTH";
|
|
17
|
+
var u = n.length, d = c[0];
|
|
18
|
+
return d === u ? "IS_POSSIBLE" : d > u ? "TOO_SHORT" : c[c.length - 1] < u ? "TOO_LONG" : c.indexOf(u, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { r as checkNumberLengthForType, n as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VALID_DIGITS as e } from "../../constants.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js
|
|
3
|
+
var t = ";ext=", n = function(t) {
|
|
4
|
+
return `([${e}]{1,${t}})`;
|
|
5
|
+
};
|
|
6
|
+
function r(e) {
|
|
7
|
+
var r = "20", i = "15", a = "9", o = "6", s = "[ \xA0\\t,]*", c = "[:\\..]?[ \xA0\\t,-]*", l = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", d = "(?:[xx##~~]|int|int)", f = "[- ]+", p = "[ \xA0\\t]*", m = "(?:,{2}|;)", h = t + n(r), g = s + u + c + n(r) + l, _ = s + d + c + n(a) + l, v = f + n(o) + "#", y = p + m + c + n(i) + l, b = p + "(?:,)+" + c + n(a) + l;
|
|
8
|
+
return h + "|" + g + "|" + _ + "|" + v + "|" + y + "|" + b;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { r as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import e from "./createExtensionPattern.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js
|
|
3
|
+
var t = RegExp("(?:" + e() + ")$", "i");
|
|
4
|
+
function n(e) {
|
|
5
|
+
var n = e.search(t);
|
|
6
|
+
if (n < 0) return {};
|
|
7
|
+
for (var r = e.slice(0, n), i = e.match(t), a = 1; a < i.length;) {
|
|
8
|
+
if (i[a]) return {
|
|
9
|
+
number: r,
|
|
10
|
+
ext: i[a]
|
|
11
|
+
};
|
|
12
|
+
a++;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import e from "../metadata.js";
|
|
2
|
+
import t from "./stripIddPrefix.js";
|
|
3
|
+
import n from "./extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js
|
|
5
|
+
function r(r, i, a, o, s) {
|
|
6
|
+
if (!r) return {};
|
|
7
|
+
var c;
|
|
8
|
+
if (r[0] !== "+") {
|
|
9
|
+
var l = t(r, i || a, o, s);
|
|
10
|
+
if (l && l !== r) c = !0, r = "+" + l;
|
|
11
|
+
else {
|
|
12
|
+
if (i || a || o) {
|
|
13
|
+
var u = n(r, i, a, o, s), d = u.countryCallingCode, f = u.number;
|
|
14
|
+
if (d) return {
|
|
15
|
+
countryCallingCodeSource: "FROM_NUMBER_WITHOUT_PLUS_SIGN",
|
|
16
|
+
countryCallingCode: d,
|
|
17
|
+
number: f
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
return { number: r };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (r[1] === "0") return {};
|
|
24
|
+
for (var p = new e(s), m = 2; m - 1 <= 3 && m <= r.length;) {
|
|
25
|
+
var h = r.slice(1, m);
|
|
26
|
+
if (p.hasCallingCode(h)) return p.selectNumberingPlan(h), {
|
|
27
|
+
countryCallingCodeSource: c ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN",
|
|
28
|
+
countryCallingCode: h,
|
|
29
|
+
number: r.slice(m)
|
|
30
|
+
};
|
|
31
|
+
m++;
|
|
32
|
+
}
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { r as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import e, { getCountryCallingCode as t } from "../metadata.js";
|
|
2
|
+
import n from "./checkNumberLength.js";
|
|
3
|
+
import r from "./matchesEntirely.js";
|
|
4
|
+
import i from "./extractNationalNumber.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js
|
|
6
|
+
function a(a, o, s, c, l) {
|
|
7
|
+
if (!(o || s || c)) return { number: a };
|
|
8
|
+
var u = o || s ? t(o || s, l) : c;
|
|
9
|
+
if (a.indexOf(u) === 0) {
|
|
10
|
+
var d = new e(l);
|
|
11
|
+
d.selectNumberingPlan(o || s || c);
|
|
12
|
+
var f = a.slice(u.length), p = i(f, void 0, d).nationalNumber, m = i(a, void 0, d).nationalNumber;
|
|
13
|
+
if (!r(m, d.nationalNumberPattern()) && r(p, d.nationalNumberPattern()) || n(m, void 0, d) === "TOO_LONG") return {
|
|
14
|
+
countryCallingCode: u,
|
|
15
|
+
number: f
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return { number: a };
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import e from "../ParseError.js";
|
|
2
|
+
import t, { RFC3966_ISDN_SUBADDRESS_ as n, RFC3966_PHONE_CONTEXT_ as r, RFC3966_PREFIX_ as i, isPhoneContextValid as a } from "./extractPhoneContext.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js
|
|
4
|
+
function o(o, s) {
|
|
5
|
+
var c = s.extractFormattedPhoneNumber, l = t(o);
|
|
6
|
+
if (!a(l)) throw new e("NOT_A_NUMBER");
|
|
7
|
+
var u;
|
|
8
|
+
if (l === null) u = c(o) || "";
|
|
9
|
+
else {
|
|
10
|
+
u = "", l.charAt(0) === "+" && (u += l);
|
|
11
|
+
var d = o.indexOf(i), f = d >= 0 ? d + i.length : 0, p = o.indexOf(r);
|
|
12
|
+
u += o.substring(f, p);
|
|
13
|
+
}
|
|
14
|
+
var m = u.indexOf(n);
|
|
15
|
+
if (m > 0 && (u = u.substring(0, m)), u !== "") return u;
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { o as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import e from "./checkNumberLength.js";
|
|
2
|
+
import t from "./matchesEntirely.js";
|
|
3
|
+
import n from "./extractNationalNumberFromPossiblyIncompleteNumber.js";
|
|
4
|
+
import r from "./getCountryByCallingCode.js";
|
|
5
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js
|
|
6
|
+
function i(e, t, i) {
|
|
7
|
+
var s = n(e, i), c = s.carrierCode, l = s.nationalNumber;
|
|
8
|
+
return l !== e && (!a(e, l, i) || i.numberingPlan.possibleLengths() && (t ||= r(i.numberingPlan.callingCode(), {
|
|
9
|
+
nationalNumber: l,
|
|
10
|
+
metadata: i
|
|
11
|
+
}), !o(l, t, i))) ? { nationalNumber: e } : {
|
|
12
|
+
nationalNumber: l,
|
|
13
|
+
carrierCode: c
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function a(e, n, r) {
|
|
17
|
+
return !(t(e, r.nationalNumberPattern()) && !t(n, r.nationalNumberPattern()));
|
|
18
|
+
}
|
|
19
|
+
function o(t, n, r) {
|
|
20
|
+
switch (e(t, n, r)) {
|
|
21
|
+
case "TOO_SHORT":
|
|
22
|
+
case "INVALID_LENGTH": return !1;
|
|
23
|
+
default: return !0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { i as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
if (e && t.numberingPlan.nationalPrefixForParsing()) {
|
|
4
|
+
var n = RegExp("^(?:" + t.numberingPlan.nationalPrefixForParsing() + ")"), r = n.exec(e);
|
|
5
|
+
if (r) {
|
|
6
|
+
var i, a, o = r.length - 1, s = o > 0 && r[o];
|
|
7
|
+
if (t.nationalPrefixTransformRule() && s) i = e.replace(n, t.nationalPrefixTransformRule()), o > 1 && (a = r[1]);
|
|
8
|
+
else {
|
|
9
|
+
var c = r[0];
|
|
10
|
+
i = e.slice(c.length), s && (a = r[1]);
|
|
11
|
+
}
|
|
12
|
+
var l;
|
|
13
|
+
if (s) {
|
|
14
|
+
var u = e.indexOf(r[1]);
|
|
15
|
+
e.slice(0, u) === t.numberingPlan.nationalPrefix() && (l = t.numberingPlan.nationalPrefix());
|
|
16
|
+
} else l = r[0];
|
|
17
|
+
return {
|
|
18
|
+
nationalNumber: i,
|
|
19
|
+
nationalPrefix: l,
|
|
20
|
+
carrierCode: a
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return { nationalNumber: e };
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { e as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { VALID_DIGITS as e } from "../constants.js";
|
|
2
|
+
var t = "([" + e + "]|[\\-\\.\\(\\)]?)", n = "^\\+" + t + "*[" + e + "]" + t + "*$", r = new RegExp(n, "g"), i = e, a = "[" + i + "]+((\\-)*[" + i + "])*", o = "[a-zA-Z]+((\\-)*[" + i + "])*", s = "^(" + a + "\\.)*" + o + "\\.?$", c = new RegExp(s, "g"), l = "tel:", u = ";phone-context=", d = ";isub=";
|
|
3
|
+
function f(e) {
|
|
4
|
+
var t = e.indexOf(u);
|
|
5
|
+
if (t < 0) return null;
|
|
6
|
+
var n = t + u.length;
|
|
7
|
+
if (n >= e.length) return "";
|
|
8
|
+
var r = e.indexOf(";", n);
|
|
9
|
+
return r >= 0 ? e.substring(n, r) : e.substring(n);
|
|
10
|
+
}
|
|
11
|
+
function p(e) {
|
|
12
|
+
return e === null ? !0 : e.length === 0 ? !1 : r.test(e) || c.test(e);
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { d as RFC3966_ISDN_SUBADDRESS_, u as RFC3966_PHONE_CONTEXT_, l as RFC3966_PREFIX_, f as default, p as isPhoneContextValid };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import e from "./applyInternationalSeparatorStyle.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js
|
|
3
|
+
var t = /(\$\d)/;
|
|
4
|
+
function n(n, r, i) {
|
|
5
|
+
var a = i.useInternationalFormat, o = i.withNationalPrefix;
|
|
6
|
+
i.carrierCode, i.metadata;
|
|
7
|
+
var s = n.replace(new RegExp(r.pattern()), a ? r.internationalFormat() : o && r.nationalPrefixFormattingRule() ? r.format().replace(t, r.nationalPrefixFormattingRule()) : r.format());
|
|
8
|
+
return a ? e(s) : s;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as FIRST_GROUP_PATTERN, n as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import e from "../metadata.js";
|
|
2
|
+
import t from "./isCountryCode.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js
|
|
4
|
+
var n = !1;
|
|
5
|
+
function r(r, i) {
|
|
6
|
+
var a, o, s = new e(i);
|
|
7
|
+
return t(r) ? (a = r, s.selectNumberingPlan(a), o = s.countryCallingCode()) : (o = r, n && s.isNonGeographicCallingCode(o) && (a = "001")), {
|
|
8
|
+
country: a,
|
|
9
|
+
callingCode: o
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { r as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import e from "./getCountryByNationalNumber.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/libphonenumber-js@1.13.7/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js
|
|
3
|
+
var t = !1;
|
|
4
|
+
function n(n, r) {
|
|
5
|
+
var i = r.nationalNumber, a = r.metadata;
|
|
6
|
+
/* istanbul ignore if */
|
|
7
|
+
if (t && a.isNonGeographicCallingCode(n)) return "001";
|
|
8
|
+
var o = a.getCountryCodesForCallingCode(n);
|
|
9
|
+
if (o) return o.length === 1 ? o[0] : e(i, o, a.metadata);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as default };
|