@moneyto/components 0.0.11 → 0.0.13
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/dist/Styles-Dmz3r-1B.js +2100 -0
- package/dist/api-Aa0lPCOo.js +1057 -0
- package/dist/calculator.js +1617 -1736
- package/dist/country-list.js +26 -25
- package/dist/google-play-DwU6F6by.js +286 -0
- package/dist/index.js +1 -0
- package/dist/mobile-apps.js +1741 -0
- package/package.json +9 -1
- package/dist/Styles-Cr6Pd9ft.js +0 -3129
|
@@ -0,0 +1,1057 @@
|
|
|
1
|
+
var Ct = Object.defineProperty;
|
|
2
|
+
var St = (e, t, s) => t in e ? Ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var q = (e, t, s) => St(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
import { z as _t, X as Rt, h as X, Y as Nt, Z as ft, A as ht, _ as kt, $ as F, a0 as dt, T as bt, a1 as Q, a2 as K, a3 as $, a4 as j, a5 as It, a6 as z, F as R, a7 as pt, a8 as Lt, a9 as Gt, aa as Ot, ab as Pt, E as Bt, I as Ut, ac as Ft, L as w, D as wt, G as Dt, ad as Ht, ae as Kt, af as tt, ag as D, H as G, ah as jt } from "./Styles-Dmz3r-1B.js";
|
|
5
|
+
let H = null;
|
|
6
|
+
function zr(e, t) {
|
|
7
|
+
return t;
|
|
8
|
+
}
|
|
9
|
+
function Wt(e, t, s, n) {
|
|
10
|
+
for (var o = [], r = t.length, c = 0; c < r; c++)
|
|
11
|
+
Gt(t[c].e, o, !0);
|
|
12
|
+
var u = r > 0 && o.length === 0 && s !== null;
|
|
13
|
+
if (u) {
|
|
14
|
+
var d = (
|
|
15
|
+
/** @type {Element} */
|
|
16
|
+
/** @type {Element} */
|
|
17
|
+
s.parentNode
|
|
18
|
+
);
|
|
19
|
+
Ot(d), d.append(
|
|
20
|
+
/** @type {Element} */
|
|
21
|
+
s
|
|
22
|
+
), n.clear(), _(e, t[0].prev, t[r - 1].next);
|
|
23
|
+
}
|
|
24
|
+
Pt(o, () => {
|
|
25
|
+
for (var f = 0; f < r; f++) {
|
|
26
|
+
var E = t[f];
|
|
27
|
+
u || (n.delete(E.k), _(e, E.prev, E.next)), Bt(E.e, !u);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function ta(e, t, s, n, o, r = null) {
|
|
32
|
+
var c = e, u = { items: /* @__PURE__ */ new Map(), first: null }, d = (t & pt) !== 0;
|
|
33
|
+
if (d) {
|
|
34
|
+
var f = (
|
|
35
|
+
/** @type {Element} */
|
|
36
|
+
e
|
|
37
|
+
);
|
|
38
|
+
c = R ? w(
|
|
39
|
+
/** @type {Comment | Text} */
|
|
40
|
+
wt(f)
|
|
41
|
+
) : f.appendChild(Rt());
|
|
42
|
+
}
|
|
43
|
+
R && Dt();
|
|
44
|
+
var E = null, T = !1, m = Nt(() => {
|
|
45
|
+
var g = s();
|
|
46
|
+
return Ht(g) ? g : g == null ? [] : dt(g);
|
|
47
|
+
});
|
|
48
|
+
_t(() => {
|
|
49
|
+
var g = X(m), p = g.length;
|
|
50
|
+
if (T && p === 0)
|
|
51
|
+
return;
|
|
52
|
+
T = p === 0;
|
|
53
|
+
let A = !1;
|
|
54
|
+
if (R) {
|
|
55
|
+
var h = (
|
|
56
|
+
/** @type {Comment} */
|
|
57
|
+
c.data === Kt
|
|
58
|
+
);
|
|
59
|
+
h !== (p === 0) && (c = tt(), w(c), D(!1), A = !0);
|
|
60
|
+
}
|
|
61
|
+
if (R) {
|
|
62
|
+
for (var y = null, v, a = 0; a < p; a++) {
|
|
63
|
+
if (G.nodeType === 8 && /** @type {Comment} */
|
|
64
|
+
G.data === jt) {
|
|
65
|
+
c = /** @type {Comment} */
|
|
66
|
+
G, A = !0, D(!1);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
var i = g[a], l = n(i, a);
|
|
70
|
+
v = mt(
|
|
71
|
+
G,
|
|
72
|
+
u,
|
|
73
|
+
y,
|
|
74
|
+
null,
|
|
75
|
+
i,
|
|
76
|
+
l,
|
|
77
|
+
a,
|
|
78
|
+
o,
|
|
79
|
+
t,
|
|
80
|
+
s
|
|
81
|
+
), u.items.set(l, v), y = v;
|
|
82
|
+
}
|
|
83
|
+
p > 0 && w(tt());
|
|
84
|
+
}
|
|
85
|
+
R || xt(g, u, c, o, t, n, s), r !== null && (p === 0 ? E ? ft(E) : E = ht(() => r(c)) : E !== null && kt(E, () => {
|
|
86
|
+
E = null;
|
|
87
|
+
})), A && D(!0), X(m);
|
|
88
|
+
}), R && (c = G);
|
|
89
|
+
}
|
|
90
|
+
function xt(e, t, s, n, o, r, c) {
|
|
91
|
+
var x, Y, Z, V;
|
|
92
|
+
var u = (o & Lt) !== 0, d = (o & (K | j)) !== 0, f = e.length, E = t.items, T = t.first, m = T, g, p = null, A, h = [], y = [], v, a, i, l;
|
|
93
|
+
if (u)
|
|
94
|
+
for (l = 0; l < f; l += 1)
|
|
95
|
+
v = e[l], a = r(v, l), i = E.get(a), i !== void 0 && ((x = i.a) == null || x.measure(), (A ?? (A = /* @__PURE__ */ new Set())).add(i));
|
|
96
|
+
for (l = 0; l < f; l += 1) {
|
|
97
|
+
if (v = e[l], a = r(v, l), i = E.get(a), i === void 0) {
|
|
98
|
+
var C = m ? (
|
|
99
|
+
/** @type {TemplateNode} */
|
|
100
|
+
m.e.nodes_start
|
|
101
|
+
) : s;
|
|
102
|
+
p = mt(
|
|
103
|
+
C,
|
|
104
|
+
t,
|
|
105
|
+
p,
|
|
106
|
+
p === null ? t.first : p.next,
|
|
107
|
+
v,
|
|
108
|
+
a,
|
|
109
|
+
l,
|
|
110
|
+
n,
|
|
111
|
+
o,
|
|
112
|
+
c
|
|
113
|
+
), E.set(a, p), h = [], y = [], m = p.next;
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (d && Yt(i, v, l, o), i.e.f & F && (ft(i.e), u && ((Y = i.a) == null || Y.unfix(), (A ?? (A = /* @__PURE__ */ new Set())).delete(i))), i !== m) {
|
|
117
|
+
if (g !== void 0 && g.has(i)) {
|
|
118
|
+
if (h.length < y.length) {
|
|
119
|
+
var S = y[0], M;
|
|
120
|
+
p = S.prev;
|
|
121
|
+
var W = h[0], B = h[h.length - 1];
|
|
122
|
+
for (M = 0; M < h.length; M += 1)
|
|
123
|
+
et(h[M], S, s);
|
|
124
|
+
for (M = 0; M < y.length; M += 1)
|
|
125
|
+
g.delete(y[M]);
|
|
126
|
+
_(t, W.prev, B.next), _(t, p, W), _(t, B, S), m = S, p = B, l -= 1, h = [], y = [];
|
|
127
|
+
} else
|
|
128
|
+
g.delete(i), et(i, m, s), _(t, i.prev, i.next), _(t, i, p === null ? t.first : p.next), _(t, p, i), p = i;
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
for (h = [], y = []; m !== null && m.k !== a; )
|
|
132
|
+
m.e.f & F || (g ?? (g = /* @__PURE__ */ new Set())).add(m), y.push(m), m = m.next;
|
|
133
|
+
if (m === null)
|
|
134
|
+
continue;
|
|
135
|
+
i = m;
|
|
136
|
+
}
|
|
137
|
+
h.push(i), p = i, m = i.next;
|
|
138
|
+
}
|
|
139
|
+
if (m !== null || g !== void 0) {
|
|
140
|
+
for (var L = g === void 0 ? [] : dt(g); m !== null; )
|
|
141
|
+
m.e.f & F || L.push(m), m = m.next;
|
|
142
|
+
var U = L.length;
|
|
143
|
+
if (U > 0) {
|
|
144
|
+
var vt = o & pt && f === 0 ? s : null;
|
|
145
|
+
if (u) {
|
|
146
|
+
for (l = 0; l < U; l += 1)
|
|
147
|
+
(Z = L[l].a) == null || Z.measure();
|
|
148
|
+
for (l = 0; l < U; l += 1)
|
|
149
|
+
(V = L[l].a) == null || V.fix();
|
|
150
|
+
}
|
|
151
|
+
Wt(t, L, vt, E);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
u && bt(() => {
|
|
155
|
+
var J;
|
|
156
|
+
if (A !== void 0)
|
|
157
|
+
for (i of A)
|
|
158
|
+
(J = i.a) == null || J.apply();
|
|
159
|
+
}), Q.first = t.first && t.first.e, Q.last = p && p.e;
|
|
160
|
+
}
|
|
161
|
+
function Yt(e, t, s, n) {
|
|
162
|
+
n & K && $(e.v, t), n & j ? $(
|
|
163
|
+
/** @type {Value<number>} */
|
|
164
|
+
e.i,
|
|
165
|
+
s
|
|
166
|
+
) : e.i = s;
|
|
167
|
+
}
|
|
168
|
+
function mt(e, t, s, n, o, r, c, u, d, f) {
|
|
169
|
+
var E = H, T = (d & K) !== 0, m = (d & Ft) === 0, g = T ? m ? It(o) : z(o) : o, p = d & j ? z(c) : c, A = {
|
|
170
|
+
i: p,
|
|
171
|
+
v: g,
|
|
172
|
+
k: r,
|
|
173
|
+
a: null,
|
|
174
|
+
// @ts-expect-error
|
|
175
|
+
e: null,
|
|
176
|
+
prev: s,
|
|
177
|
+
next: n
|
|
178
|
+
};
|
|
179
|
+
H = A;
|
|
180
|
+
try {
|
|
181
|
+
return A.e = ht(() => u(e, g, p, f), R), A.e.prev = s && s.e, A.e.next = n && n.e, s === null ? t.first = A : (s.next = A, s.e.next = A.e), n !== null && (n.prev = A, n.e.prev = A.e), A;
|
|
182
|
+
} finally {
|
|
183
|
+
H = E;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function et(e, t, s) {
|
|
187
|
+
for (var n = e.next ? (
|
|
188
|
+
/** @type {TemplateNode} */
|
|
189
|
+
e.next.e.nodes_start
|
|
190
|
+
) : s, o = t ? (
|
|
191
|
+
/** @type {TemplateNode} */
|
|
192
|
+
t.e.nodes_start
|
|
193
|
+
) : s, r = (
|
|
194
|
+
/** @type {TemplateNode} */
|
|
195
|
+
e.e.nodes_start
|
|
196
|
+
); r !== n; ) {
|
|
197
|
+
var c = (
|
|
198
|
+
/** @type {TemplateNode} */
|
|
199
|
+
Ut(r)
|
|
200
|
+
);
|
|
201
|
+
o.before(r), r = c;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function _(e, t, s) {
|
|
205
|
+
t === null ? e.first = s : (t.next = s, t.e.next = s && s.e), s !== null && (s.prev = t, s.e.prev = t && t.e);
|
|
206
|
+
}
|
|
207
|
+
function Zt(e) {
|
|
208
|
+
return String.fromCodePoint(e.toLowerCase().charCodeAt(0) + 127365);
|
|
209
|
+
}
|
|
210
|
+
function Vt(e) {
|
|
211
|
+
return e.split("-").pop().toUpperCase();
|
|
212
|
+
}
|
|
213
|
+
function ea(e) {
|
|
214
|
+
if (!e)
|
|
215
|
+
throw new Error("countryCode is required");
|
|
216
|
+
return Array.from(Vt(e)).map(Zt).join("");
|
|
217
|
+
}
|
|
218
|
+
const Jt = "AD", qt = "AE", Xt = "AF", Qt = "AG", $t = "AI", zt = "AL", te = "AM", ee = "AO", se = "AQ", ne = "AR", oe = "AS", re = "AT", ae = "AU", ie = "AW", ce = "AX", le = "AZ", ue = "BA", fe = "BB", he = "BD", de = "BE", pe = "BF", me = "BG", Ae = "BH", Ee = "BI", ge = "BJ", ye = "BL", Te = "BM", Me = "BN", ve = "BO", Ce = "BQ", Se = "BR", _e = "BS", Re = "BT", Ne = "BV", ke = "BW", be = "BY", Ie = "BZ", Le = "CA", Ge = "CC", Oe = "CD", Pe = "CF", Be = "CG", Ue = "CH", Fe = "CI", we = "CK", De = "CL", He = "CM", Ke = "CN", je = "CO", We = "CR", xe = "CU", Ye = "CV", Ze = "CW", Ve = "CX", Je = "CY", qe = "CZ", Xe = "DE", Qe = "DJ", $e = "DK", ze = "DM", ts = "DO", es = "DZ", ss = "EC", ns = "EE", os = "EG", rs = "EH", as = "ER", is = "ES", cs = "ET", ls = "FI", us = "FJ", fs = "FK", hs = "FM", ds = "FO", ps = "FR", ms = "GA", As = "GB", Es = "GD", gs = "GE", ys = "GF", Ts = "GG", Ms = "GH", vs = "GI", Cs = "GL", Ss = "GM", _s = "GN", Rs = "GP", Ns = "GQ", ks = "GR", bs = "GS", Is = "GT", Ls = "GU", Gs = "GW", Os = "GY", Ps = "HK", Bs = "HM", Us = "HN", Fs = "HR", ws = "HT", Ds = "HU", Hs = "ID", Ks = "IE", js = "IL", Ws = "IM", xs = "IN", Ys = "IO", Zs = "IQ", Vs = "IR", Js = "IS", qs = "IT", Xs = "JE", Qs = "JM", $s = "JO", zs = "JP", tn = "KE", en = "KG", sn = "KH", nn = "KI", on = "KM", rn = "KN", an = "KP", cn = "KR", ln = "KW", un = "KY", fn = "KZ", hn = "LA", dn = "LB", pn = "LC", mn = "LI", An = "LK", En = "LR", gn = "LS", yn = "LT", Tn = "LU", Mn = "LV", vn = "LY", Cn = "MA", Sn = "MC", _n = "MD", Rn = "ME", Nn = "MF", kn = "MG", bn = "MH", In = "MK", Ln = "ML", Gn = "MM", On = "MN", Pn = "MO", Bn = "MP", Un = "MQ", Fn = "MR", wn = "MS", Dn = "MT", Hn = "MU", Kn = "MV", jn = "MW", Wn = "MX", xn = "MY", Yn = "MZ", Zn = "NA", Vn = "NC", Jn = "NE", qn = "NF", Xn = "NG", Qn = "NI", $n = "NL", zn = "NO", to = "NP", eo = "NR", so = "NU", no = "NZ", oo = "OM", ro = "PA", ao = "PE", io = "PF", co = "PG", lo = "PH", uo = "PK", fo = "PL", ho = "PM", po = "PN", mo = "PR", Ao = "PS", Eo = "PT", go = "PW", yo = "PY", To = "QA", Mo = "RE", vo = "RO", Co = "RS", So = "RU", _o = "RW", Ro = "SA", No = "SB", ko = "SC", bo = "SD", Io = "SE", Lo = "SG", Go = "SH", Oo = "SI", Po = "SJ", Bo = "SK", Uo = "SL", Fo = "SM", wo = "SN", Do = "SO", Ho = "SR", Ko = "SS", jo = "ST", Wo = "SV", xo = "SX", Yo = "SY", Zo = "SZ", Vo = "TC", Jo = "TD", qo = "TF", Xo = "TG", Qo = "TH", $o = "TJ", zo = "TK", tr = "TL", er = "TM", sr = "TN", nr = "TO", or = "TR", rr = "TT", ar = "TV", ir = "TW", cr = "TZ", lr = "UA", ur = "UG", fr = "UM", hr = "US", dr = "UY", pr = "UZ", mr = "VA", Ar = "VC", Er = "VE", gr = "VG", yr = "VI", Tr = "VN", Mr = "VU", vr = "WF", Cr = "WS", Sr = "XK", _r = "YE", Rr = "YT", Nr = "ZA", kr = "ZM", br = "ZW", sa = {
|
|
219
|
+
AND: Jt,
|
|
220
|
+
ARE: qt,
|
|
221
|
+
AFG: Xt,
|
|
222
|
+
ATG: Qt,
|
|
223
|
+
AIA: $t,
|
|
224
|
+
ALB: zt,
|
|
225
|
+
ARM: te,
|
|
226
|
+
AGO: ee,
|
|
227
|
+
ATA: se,
|
|
228
|
+
ARG: ne,
|
|
229
|
+
ASM: oe,
|
|
230
|
+
AUT: re,
|
|
231
|
+
AUS: ae,
|
|
232
|
+
ABW: ie,
|
|
233
|
+
ALA: ce,
|
|
234
|
+
AZE: le,
|
|
235
|
+
BIH: ue,
|
|
236
|
+
BRB: fe,
|
|
237
|
+
BGD: he,
|
|
238
|
+
BEL: de,
|
|
239
|
+
BFA: pe,
|
|
240
|
+
BGR: me,
|
|
241
|
+
BHR: Ae,
|
|
242
|
+
BDI: Ee,
|
|
243
|
+
BEN: ge,
|
|
244
|
+
BLM: ye,
|
|
245
|
+
BMU: Te,
|
|
246
|
+
BRN: Me,
|
|
247
|
+
BOL: ve,
|
|
248
|
+
BES: Ce,
|
|
249
|
+
BRA: Se,
|
|
250
|
+
BHS: _e,
|
|
251
|
+
BTN: Re,
|
|
252
|
+
BVT: Ne,
|
|
253
|
+
BWA: ke,
|
|
254
|
+
BLR: be,
|
|
255
|
+
BLZ: Ie,
|
|
256
|
+
CAN: Le,
|
|
257
|
+
CCK: Ge,
|
|
258
|
+
COD: Oe,
|
|
259
|
+
CAF: Pe,
|
|
260
|
+
COG: Be,
|
|
261
|
+
CHE: Ue,
|
|
262
|
+
CIV: Fe,
|
|
263
|
+
COK: we,
|
|
264
|
+
CHL: De,
|
|
265
|
+
CMR: He,
|
|
266
|
+
CHN: Ke,
|
|
267
|
+
COL: je,
|
|
268
|
+
CRI: We,
|
|
269
|
+
CUB: xe,
|
|
270
|
+
CPV: Ye,
|
|
271
|
+
CUW: Ze,
|
|
272
|
+
CXR: Ve,
|
|
273
|
+
CYP: Je,
|
|
274
|
+
CZE: qe,
|
|
275
|
+
DEU: Xe,
|
|
276
|
+
DJI: Qe,
|
|
277
|
+
DNK: $e,
|
|
278
|
+
DMA: ze,
|
|
279
|
+
DOM: ts,
|
|
280
|
+
DZA: es,
|
|
281
|
+
ECU: ss,
|
|
282
|
+
EST: ns,
|
|
283
|
+
EGY: os,
|
|
284
|
+
ESH: rs,
|
|
285
|
+
ERI: as,
|
|
286
|
+
ESP: is,
|
|
287
|
+
ETH: cs,
|
|
288
|
+
FIN: ls,
|
|
289
|
+
FJI: us,
|
|
290
|
+
FLK: fs,
|
|
291
|
+
FSM: hs,
|
|
292
|
+
FRO: ds,
|
|
293
|
+
FRA: ps,
|
|
294
|
+
GAB: ms,
|
|
295
|
+
GBR: As,
|
|
296
|
+
GRD: Es,
|
|
297
|
+
GEO: gs,
|
|
298
|
+
GUF: ys,
|
|
299
|
+
GGY: Ts,
|
|
300
|
+
GHA: Ms,
|
|
301
|
+
GIB: vs,
|
|
302
|
+
GRL: Cs,
|
|
303
|
+
GMB: Ss,
|
|
304
|
+
GIN: _s,
|
|
305
|
+
GLP: Rs,
|
|
306
|
+
GNQ: Ns,
|
|
307
|
+
GRC: ks,
|
|
308
|
+
SGS: bs,
|
|
309
|
+
GTM: Is,
|
|
310
|
+
GUM: Ls,
|
|
311
|
+
GNB: Gs,
|
|
312
|
+
GUY: Os,
|
|
313
|
+
HKG: Ps,
|
|
314
|
+
HMD: Bs,
|
|
315
|
+
HND: Us,
|
|
316
|
+
HRV: Fs,
|
|
317
|
+
HTI: ws,
|
|
318
|
+
HUN: Ds,
|
|
319
|
+
IDN: Hs,
|
|
320
|
+
IRL: Ks,
|
|
321
|
+
ISR: js,
|
|
322
|
+
IMN: Ws,
|
|
323
|
+
IND: xs,
|
|
324
|
+
IOT: Ys,
|
|
325
|
+
IRQ: Zs,
|
|
326
|
+
IRN: Vs,
|
|
327
|
+
ISL: Js,
|
|
328
|
+
ITA: qs,
|
|
329
|
+
JEY: Xs,
|
|
330
|
+
JAM: Qs,
|
|
331
|
+
JOR: $s,
|
|
332
|
+
JPN: zs,
|
|
333
|
+
KEN: tn,
|
|
334
|
+
KGZ: en,
|
|
335
|
+
KHM: sn,
|
|
336
|
+
KIR: nn,
|
|
337
|
+
COM: on,
|
|
338
|
+
KNA: rn,
|
|
339
|
+
PRK: an,
|
|
340
|
+
KOR: cn,
|
|
341
|
+
KWT: ln,
|
|
342
|
+
CYM: un,
|
|
343
|
+
KAZ: fn,
|
|
344
|
+
LAO: hn,
|
|
345
|
+
LBN: dn,
|
|
346
|
+
LCA: pn,
|
|
347
|
+
LIE: mn,
|
|
348
|
+
LKA: An,
|
|
349
|
+
LBR: En,
|
|
350
|
+
LSO: gn,
|
|
351
|
+
LTU: yn,
|
|
352
|
+
LUX: Tn,
|
|
353
|
+
LVA: Mn,
|
|
354
|
+
LBY: vn,
|
|
355
|
+
MAR: Cn,
|
|
356
|
+
MCO: Sn,
|
|
357
|
+
MDA: _n,
|
|
358
|
+
MNE: Rn,
|
|
359
|
+
MAF: Nn,
|
|
360
|
+
MDG: kn,
|
|
361
|
+
MHL: bn,
|
|
362
|
+
MKD: In,
|
|
363
|
+
MLI: Ln,
|
|
364
|
+
MMR: Gn,
|
|
365
|
+
MNG: On,
|
|
366
|
+
MAC: Pn,
|
|
367
|
+
MNP: Bn,
|
|
368
|
+
MTQ: Un,
|
|
369
|
+
MRT: Fn,
|
|
370
|
+
MSR: wn,
|
|
371
|
+
MLT: Dn,
|
|
372
|
+
MUS: Hn,
|
|
373
|
+
MDV: Kn,
|
|
374
|
+
MWI: jn,
|
|
375
|
+
MEX: Wn,
|
|
376
|
+
MYS: xn,
|
|
377
|
+
MOZ: Yn,
|
|
378
|
+
NAM: Zn,
|
|
379
|
+
NCL: Vn,
|
|
380
|
+
NER: Jn,
|
|
381
|
+
NFK: qn,
|
|
382
|
+
NGA: Xn,
|
|
383
|
+
NIC: Qn,
|
|
384
|
+
NLD: $n,
|
|
385
|
+
NOR: zn,
|
|
386
|
+
NPL: to,
|
|
387
|
+
NRU: eo,
|
|
388
|
+
NIU: so,
|
|
389
|
+
NZL: no,
|
|
390
|
+
OMN: oo,
|
|
391
|
+
PAN: ro,
|
|
392
|
+
PER: ao,
|
|
393
|
+
PYF: io,
|
|
394
|
+
PNG: co,
|
|
395
|
+
PHL: lo,
|
|
396
|
+
PAK: uo,
|
|
397
|
+
POL: fo,
|
|
398
|
+
SPM: ho,
|
|
399
|
+
PCN: po,
|
|
400
|
+
PRI: mo,
|
|
401
|
+
PSE: Ao,
|
|
402
|
+
PRT: Eo,
|
|
403
|
+
PLW: go,
|
|
404
|
+
PRY: yo,
|
|
405
|
+
QAT: To,
|
|
406
|
+
REU: Mo,
|
|
407
|
+
ROU: vo,
|
|
408
|
+
SRB: Co,
|
|
409
|
+
RUS: So,
|
|
410
|
+
RWA: _o,
|
|
411
|
+
SAU: Ro,
|
|
412
|
+
SLB: No,
|
|
413
|
+
SYC: ko,
|
|
414
|
+
SDN: bo,
|
|
415
|
+
SWE: Io,
|
|
416
|
+
SGP: Lo,
|
|
417
|
+
SHN: Go,
|
|
418
|
+
SVN: Oo,
|
|
419
|
+
SJM: Po,
|
|
420
|
+
SVK: Bo,
|
|
421
|
+
SLE: Uo,
|
|
422
|
+
SMR: Fo,
|
|
423
|
+
SEN: wo,
|
|
424
|
+
SOM: Do,
|
|
425
|
+
SUR: Ho,
|
|
426
|
+
SSD: Ko,
|
|
427
|
+
STP: jo,
|
|
428
|
+
SLV: Wo,
|
|
429
|
+
SXM: xo,
|
|
430
|
+
SYR: Yo,
|
|
431
|
+
SWZ: Zo,
|
|
432
|
+
TCA: Vo,
|
|
433
|
+
TCD: Jo,
|
|
434
|
+
ATF: qo,
|
|
435
|
+
TGO: Xo,
|
|
436
|
+
THA: Qo,
|
|
437
|
+
TJK: $o,
|
|
438
|
+
TKL: zo,
|
|
439
|
+
TLS: tr,
|
|
440
|
+
TKM: er,
|
|
441
|
+
TUN: sr,
|
|
442
|
+
TON: nr,
|
|
443
|
+
TUR: or,
|
|
444
|
+
TTO: rr,
|
|
445
|
+
TUV: ar,
|
|
446
|
+
TWN: ir,
|
|
447
|
+
TZA: cr,
|
|
448
|
+
UKR: lr,
|
|
449
|
+
UGA: ur,
|
|
450
|
+
UMI: fr,
|
|
451
|
+
USA: hr,
|
|
452
|
+
URY: dr,
|
|
453
|
+
UZB: pr,
|
|
454
|
+
VAT: mr,
|
|
455
|
+
VCT: Ar,
|
|
456
|
+
VEN: Er,
|
|
457
|
+
VGB: gr,
|
|
458
|
+
VIR: yr,
|
|
459
|
+
VNM: Tr,
|
|
460
|
+
VUT: Mr,
|
|
461
|
+
WLF: vr,
|
|
462
|
+
WSM: Cr,
|
|
463
|
+
XKX: Sr,
|
|
464
|
+
YEM: _r,
|
|
465
|
+
MYT: Rr,
|
|
466
|
+
ZAF: Nr,
|
|
467
|
+
ZMB: kr,
|
|
468
|
+
ZWE: br
|
|
469
|
+
}, Ir = '"Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif';
|
|
470
|
+
function Lr() {
|
|
471
|
+
const e = document.createElement("canvas");
|
|
472
|
+
e.width = e.height = 1;
|
|
473
|
+
const t = e.getContext("2d", { willReadFrequently: !0 });
|
|
474
|
+
return t.textBaseline = "top", t.font = `100px ${Ir}`, t.scale(0.01, 0.01), t;
|
|
475
|
+
}
|
|
476
|
+
function st(e, t, s) {
|
|
477
|
+
return e.clearRect(0, 0, 100, 100), e.fillStyle = s, e.fillText(t, 0, 0), e.getImageData(0, 0, 1, 1).data.join(",");
|
|
478
|
+
}
|
|
479
|
+
function nt(e) {
|
|
480
|
+
const t = Lr(), s = st(t, e, "#fff"), n = st(t, e, "#000");
|
|
481
|
+
return n === s && !n.startsWith("0,0,0,");
|
|
482
|
+
}
|
|
483
|
+
function na(e = "Twemoji Country Flags", t = "https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2") {
|
|
484
|
+
if (typeof window < "u" && nt("😊") && !nt("🇨🇭")) {
|
|
485
|
+
const s = document.createElement("style");
|
|
486
|
+
return s.textContent = `@font-face {
|
|
487
|
+
font-family: "${e}";
|
|
488
|
+
unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
|
|
489
|
+
U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
|
|
490
|
+
src: url('${t}') format('woff2');
|
|
491
|
+
font-display: swap;
|
|
492
|
+
}`, document.head.appendChild(s), !0;
|
|
493
|
+
}
|
|
494
|
+
return !1;
|
|
495
|
+
}
|
|
496
|
+
var Gr = Object.defineProperty, Or = (e, t, s) => t in e ? Gr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, O = (e, t, s) => Or(e, typeof t != "symbol" ? t + "" : t, s);
|
|
497
|
+
const ot = {
|
|
498
|
+
"#": { pattern: /[0-9]/ },
|
|
499
|
+
"@": { pattern: /[a-zA-Z]/ },
|
|
500
|
+
"*": { pattern: /[a-zA-Z0-9]/ }
|
|
501
|
+
}, rt = (e, t, s) => e.replaceAll(t, "").replace(s, ".").replace("..", ".").replace(/[^.\d]/g, ""), at = (e, t, s) => {
|
|
502
|
+
var n;
|
|
503
|
+
return new Intl.NumberFormat(((n = s.number) == null ? void 0 : n.locale) ?? "en", {
|
|
504
|
+
minimumFractionDigits: e,
|
|
505
|
+
maximumFractionDigits: t,
|
|
506
|
+
roundingMode: "trunc"
|
|
507
|
+
});
|
|
508
|
+
}, Pr = (e, t = !0, s) => {
|
|
509
|
+
var n, o, r, c;
|
|
510
|
+
const u = ((n = s.number) == null ? void 0 : n.unsigned) !== !0 && e.startsWith("-") ? "-" : "", d = ((o = s.number) == null ? void 0 : o.fraction) ?? 0;
|
|
511
|
+
let f = at(0, d, s);
|
|
512
|
+
const E = f.formatToParts(1000.12), T = ((r = E.find((h) => h.type === "group")) == null ? void 0 : r.value) ?? " ", m = ((c = E.find((h) => h.type === "decimal")) == null ? void 0 : c.value) ?? ".", g = rt(e, T, m);
|
|
513
|
+
if (Number.isNaN(parseFloat(g))) return u;
|
|
514
|
+
const p = g.split(".");
|
|
515
|
+
if (p[1] != null && p[1].length >= 1) {
|
|
516
|
+
const h = p[1].length <= d ? p[1].length : d;
|
|
517
|
+
f = at(h, d, s);
|
|
518
|
+
}
|
|
519
|
+
let A = f.format(parseFloat(g));
|
|
520
|
+
return t ? d > 0 && g.endsWith(".") && !g.slice(0, -1).includes(".") && (A += m) : A = rt(A, T, m), u + A;
|
|
521
|
+
};
|
|
522
|
+
class At {
|
|
523
|
+
constructor(t = {}) {
|
|
524
|
+
O(this, "opts", {}), O(this, "memo", /* @__PURE__ */ new Map());
|
|
525
|
+
const s = { ...t };
|
|
526
|
+
if (s.tokens != null) {
|
|
527
|
+
s.tokens = s.tokensReplace ? { ...s.tokens } : { ...ot, ...s.tokens };
|
|
528
|
+
for (const n of Object.values(s.tokens))
|
|
529
|
+
typeof n.pattern == "string" && (n.pattern = new RegExp(n.pattern));
|
|
530
|
+
} else
|
|
531
|
+
s.tokens = ot;
|
|
532
|
+
Array.isArray(s.mask) && (s.mask.length > 1 ? s.mask = [...s.mask].sort((n, o) => n.length - o.length) : s.mask = s.mask[0] ?? ""), s.mask === "" && (s.mask = null), this.opts = s;
|
|
533
|
+
}
|
|
534
|
+
masked(t) {
|
|
535
|
+
return this.process(String(t), this.findMask(String(t)));
|
|
536
|
+
}
|
|
537
|
+
unmasked(t) {
|
|
538
|
+
return this.process(String(t), this.findMask(String(t)), !1);
|
|
539
|
+
}
|
|
540
|
+
isEager() {
|
|
541
|
+
return this.opts.eager === !0;
|
|
542
|
+
}
|
|
543
|
+
isReversed() {
|
|
544
|
+
return this.opts.reversed === !0;
|
|
545
|
+
}
|
|
546
|
+
completed(t) {
|
|
547
|
+
const s = this.findMask(String(t));
|
|
548
|
+
if (this.opts.mask == null || s == null) return !1;
|
|
549
|
+
const n = this.process(String(t), s).length;
|
|
550
|
+
return typeof this.opts.mask == "string" ? n >= this.opts.mask.length : n >= s.length;
|
|
551
|
+
}
|
|
552
|
+
findMask(t) {
|
|
553
|
+
const s = this.opts.mask;
|
|
554
|
+
if (s == null)
|
|
555
|
+
return null;
|
|
556
|
+
if (typeof s == "string")
|
|
557
|
+
return s;
|
|
558
|
+
if (typeof s == "function")
|
|
559
|
+
return s(t);
|
|
560
|
+
const n = this.process(t, s.slice(-1).pop() ?? "", !1);
|
|
561
|
+
return s.find((o) => this.process(t, o, !1).length >= n.length) ?? "";
|
|
562
|
+
}
|
|
563
|
+
escapeMask(t) {
|
|
564
|
+
const s = [], n = [];
|
|
565
|
+
return t.split("").forEach((o, r) => {
|
|
566
|
+
o === "!" && t[r - 1] !== "!" ? n.push(r - n.length) : s.push(o);
|
|
567
|
+
}), { mask: s.join(""), escaped: n };
|
|
568
|
+
}
|
|
569
|
+
process(t, s, n = !0) {
|
|
570
|
+
if (this.opts.number != null) return Pr(t, n, this.opts);
|
|
571
|
+
if (s == null) return t;
|
|
572
|
+
const o = `v=${t},mr=${s},m=${n ? 1 : 0}`;
|
|
573
|
+
if (this.memo.has(o)) return this.memo.get(o);
|
|
574
|
+
const { mask: r, escaped: c } = this.escapeMask(s), u = [], d = this.opts.tokens != null ? this.opts.tokens : {}, f = this.isReversed() ? -1 : 1, E = this.isReversed() ? "unshift" : "push", T = this.isReversed() ? 0 : r.length - 1, m = this.isReversed() ? () => h > -1 && y > -1 : () => h < r.length && y < t.length, g = (a) => !this.isReversed() && a <= T || this.isReversed() && a >= T;
|
|
575
|
+
let p, A = -1, h = this.isReversed() ? r.length - 1 : 0, y = this.isReversed() ? t.length - 1 : 0, v = !1;
|
|
576
|
+
for (; m(); ) {
|
|
577
|
+
const a = r.charAt(h), i = d[a], l = (i == null ? void 0 : i.transform) != null ? i.transform(t.charAt(y)) : t.charAt(y);
|
|
578
|
+
if (!c.includes(h) && i != null ? (l.match(i.pattern) != null ? (u[E](l), i.repeated ? (A === -1 ? A = h : h === T && h !== A && (h = A - f), T === A && (h -= f)) : i.multiple && (v = !0, h -= f), h += f) : i.multiple ? v && (h += f, y -= f, v = !1) : l === p ? p = void 0 : i.optional && (h += f, y -= f), y += f) : (n && !this.isEager() && u[E](a), l === a && !this.isEager() ? y += f : p = a, this.isEager() || (h += f)), this.isEager())
|
|
579
|
+
for (; g(h) && (d[r.charAt(h)] == null || c.includes(h)); ) {
|
|
580
|
+
if (n) {
|
|
581
|
+
if (u[E](r.charAt(h)), t.charAt(y) === r.charAt(h)) {
|
|
582
|
+
h += f, y += f;
|
|
583
|
+
continue;
|
|
584
|
+
}
|
|
585
|
+
} else r.charAt(h) === t.charAt(y) && (y += f);
|
|
586
|
+
h += f;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
return this.memo.set(o, u.join("")), this.memo.get(o);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
const Et = (e) => JSON.parse(e.replaceAll("'", '"')), Br = (e, t = {}) => {
|
|
593
|
+
const s = { ...t };
|
|
594
|
+
e.dataset.maska != null && e.dataset.maska !== "" && (s.mask = Ur(e.dataset.maska)), e.dataset.maskaEager != null && (s.eager = P(e.dataset.maskaEager)), e.dataset.maskaReversed != null && (s.reversed = P(e.dataset.maskaReversed)), e.dataset.maskaTokensReplace != null && (s.tokensReplace = P(e.dataset.maskaTokensReplace)), e.dataset.maskaTokens != null && (s.tokens = Fr(e.dataset.maskaTokens));
|
|
595
|
+
const n = {};
|
|
596
|
+
return e.dataset.maskaNumberLocale != null && (n.locale = e.dataset.maskaNumberLocale), e.dataset.maskaNumberFraction != null && (n.fraction = parseInt(e.dataset.maskaNumberFraction)), e.dataset.maskaNumberUnsigned != null && (n.unsigned = P(e.dataset.maskaNumberUnsigned)), (e.dataset.maskaNumber != null || Object.values(n).length > 0) && (s.number = n), s;
|
|
597
|
+
}, P = (e) => e !== "" ? !!JSON.parse(e) : !0, Ur = (e) => e.startsWith("[") && e.endsWith("]") ? Et(e) : e, Fr = (e) => {
|
|
598
|
+
if (e.startsWith("{") && e.endsWith("}"))
|
|
599
|
+
return Et(e);
|
|
600
|
+
const t = {};
|
|
601
|
+
return e.split("|").forEach((s) => {
|
|
602
|
+
const n = s.split(":");
|
|
603
|
+
t[n[0]] = {
|
|
604
|
+
pattern: new RegExp(n[1]),
|
|
605
|
+
optional: n[2] === "optional",
|
|
606
|
+
multiple: n[2] === "multiple",
|
|
607
|
+
repeated: n[2] === "repeated"
|
|
608
|
+
};
|
|
609
|
+
}), t;
|
|
610
|
+
};
|
|
611
|
+
class oa {
|
|
612
|
+
constructor(t, s = {}) {
|
|
613
|
+
O(this, "items", /* @__PURE__ */ new Map()), O(this, "eventAbortController"), O(this, "onInput", (n) => {
|
|
614
|
+
if (n instanceof CustomEvent && n.type === "input" && !n.isTrusted && !n.bubbles)
|
|
615
|
+
return;
|
|
616
|
+
const o = n.target, r = this.items.get(o), c = "inputType" in n && n.inputType.startsWith("delete"), u = r.isEager(), d = c && u && r.unmasked(o.value) === "" ? "" : o.value;
|
|
617
|
+
this.fixCursor(o, c, () => this.setValue(o, d));
|
|
618
|
+
}), this.options = s, this.eventAbortController = new AbortController(), this.init(this.getInputs(t));
|
|
619
|
+
}
|
|
620
|
+
update(t = {}) {
|
|
621
|
+
this.options = { ...t }, this.init(Array.from(this.items.keys()));
|
|
622
|
+
}
|
|
623
|
+
updateValue(t) {
|
|
624
|
+
t.value !== "" && t.value !== this.processInput(t).masked && this.setValue(t, t.value);
|
|
625
|
+
}
|
|
626
|
+
destroy() {
|
|
627
|
+
this.eventAbortController.abort(), this.items.clear();
|
|
628
|
+
}
|
|
629
|
+
init(t) {
|
|
630
|
+
const s = this.getOptions(this.options);
|
|
631
|
+
for (const n of t) {
|
|
632
|
+
if (!this.items.has(n)) {
|
|
633
|
+
const { signal: r } = this.eventAbortController;
|
|
634
|
+
n.addEventListener("input", this.onInput, { capture: !0, signal: r });
|
|
635
|
+
}
|
|
636
|
+
const o = new At(Br(n, s));
|
|
637
|
+
this.items.set(n, o), queueMicrotask(() => this.updateValue(n)), n.selectionStart === null && o.isEager() && console.warn("Maska: input of `%s` type is not supported", n.type);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
getInputs(t) {
|
|
641
|
+
return typeof t == "string" ? Array.from(document.querySelectorAll(t)) : "length" in t ? Array.from(t) : [t];
|
|
642
|
+
}
|
|
643
|
+
getOptions(t) {
|
|
644
|
+
const { onMaska: s, preProcess: n, postProcess: o, ...r } = t;
|
|
645
|
+
return r;
|
|
646
|
+
}
|
|
647
|
+
fixCursor(t, s, n) {
|
|
648
|
+
const o = t.selectionStart, r = t.value;
|
|
649
|
+
if (n(), o === null || o === r.length && !s) return;
|
|
650
|
+
const c = t.value, u = r.slice(0, o), d = c.slice(0, o), f = this.processInput(t, u).unmasked, E = this.processInput(t, d).unmasked;
|
|
651
|
+
let T = o;
|
|
652
|
+
u !== d && (T += s ? c.length - r.length : f.length - E.length), t.setSelectionRange(T, T);
|
|
653
|
+
}
|
|
654
|
+
setValue(t, s) {
|
|
655
|
+
const n = this.processInput(t, s);
|
|
656
|
+
t.value = n.masked, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((o) => o(n)) : this.options.onMaska(n)), t.dispatchEvent(new CustomEvent("maska", { detail: n })), t.dispatchEvent(new CustomEvent("input", { detail: n.masked }));
|
|
657
|
+
}
|
|
658
|
+
processInput(t, s) {
|
|
659
|
+
const n = this.items.get(t);
|
|
660
|
+
let o = s ?? t.value;
|
|
661
|
+
this.options.preProcess != null && (o = this.options.preProcess(o));
|
|
662
|
+
let r = n.masked(o);
|
|
663
|
+
return this.options.postProcess != null && (r = this.options.postProcess(r)), {
|
|
664
|
+
masked: r,
|
|
665
|
+
unmasked: n.unmasked(o),
|
|
666
|
+
completed: n.completed(o)
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
const wr = "application/json", gt = "Content-Type", b = Symbol(), yt = Symbol();
|
|
671
|
+
function it(e = {}) {
|
|
672
|
+
var t;
|
|
673
|
+
const s = e instanceof Array ? Object.fromEntries(e) : e;
|
|
674
|
+
return (t = Object.entries(s).find(([n]) => n.toLowerCase() === gt.toLowerCase())) === null || t === void 0 ? void 0 : t[1];
|
|
675
|
+
}
|
|
676
|
+
function ct(e) {
|
|
677
|
+
return /^application\/.*json.*/.test(e);
|
|
678
|
+
}
|
|
679
|
+
const N = function(e, t, s = !1) {
|
|
680
|
+
return Object.entries(t).reduce((n, [o, r]) => {
|
|
681
|
+
const c = e[o];
|
|
682
|
+
return Array.isArray(c) && Array.isArray(r) ? n[o] = s ? [...c, ...r] : r : typeof c == "object" && typeof r == "object" ? n[o] = N(c, r, s) : n[o] = r, n;
|
|
683
|
+
}, { ...e });
|
|
684
|
+
}, I = {
|
|
685
|
+
// Default options
|
|
686
|
+
options: {},
|
|
687
|
+
// Error type
|
|
688
|
+
errorType: "text",
|
|
689
|
+
// Polyfills
|
|
690
|
+
polyfills: {
|
|
691
|
+
// fetch: null,
|
|
692
|
+
// FormData: null,
|
|
693
|
+
// URL: null,
|
|
694
|
+
// URLSearchParams: null,
|
|
695
|
+
// performance: null,
|
|
696
|
+
// PerformanceObserver: null,
|
|
697
|
+
// AbortController: null,
|
|
698
|
+
},
|
|
699
|
+
polyfill(e, t = !0, s = !1, ...n) {
|
|
700
|
+
const o = this.polyfills[e] || (typeof self < "u" ? self[e] : null) || (typeof global < "u" ? global[e] : null);
|
|
701
|
+
if (t && !o)
|
|
702
|
+
throw new Error(e + " is not defined");
|
|
703
|
+
return s && o ? new o(...n) : o;
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
function Dr(e, t = !1) {
|
|
707
|
+
I.options = t ? e : N(I.options, e);
|
|
708
|
+
}
|
|
709
|
+
function Hr(e, t = !1) {
|
|
710
|
+
I.polyfills = t ? e : N(I.polyfills, e);
|
|
711
|
+
}
|
|
712
|
+
function Kr(e) {
|
|
713
|
+
I.errorType = e;
|
|
714
|
+
}
|
|
715
|
+
const jr = (e) => (t) => e.reduceRight((s, n) => n(s), t) || t;
|
|
716
|
+
class Tt extends Error {
|
|
717
|
+
}
|
|
718
|
+
const Wr = (e) => {
|
|
719
|
+
const t = /* @__PURE__ */ Object.create(null);
|
|
720
|
+
e = e._addons.reduce((a, i) => i.beforeRequest && i.beforeRequest(a, e._options, t) || a, e);
|
|
721
|
+
const { _url: s, _options: n, _config: o, _catchers: r, _resolvers: c, _middlewares: u, _addons: d } = e, f = new Map(r), E = N(o.options, n);
|
|
722
|
+
let T = s;
|
|
723
|
+
const m = jr(u)((a, i) => (T = a, o.polyfill("fetch")(a, i)))(s, E), g = new Error(), p = m.catch((a) => {
|
|
724
|
+
throw { [b]: a };
|
|
725
|
+
}).then((a) => {
|
|
726
|
+
var i;
|
|
727
|
+
if (!a.ok) {
|
|
728
|
+
const l = new Tt();
|
|
729
|
+
if (l.cause = g, l.stack = l.stack + `
|
|
730
|
+
CAUSE: ` + g.stack, l.response = a, l.status = a.status, l.url = T, a.type === "opaque")
|
|
731
|
+
throw l;
|
|
732
|
+
const C = o.errorType === "json" || ((i = a.headers.get("Content-Type")) === null || i === void 0 ? void 0 : i.split(";")[0]) === "application/json";
|
|
733
|
+
return (o.errorType ? C ? a.text() : a[o.errorType]() : Promise.resolve(a.body)).then((M) => {
|
|
734
|
+
throw l.message = typeof M == "string" ? M : a.statusText, M && (C && typeof M == "string" ? (l.text = M, l.json = JSON.parse(M)) : l[o.errorType] = M), l;
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
return a;
|
|
738
|
+
}), A = (a) => a.catch((i) => {
|
|
739
|
+
const l = Object.prototype.hasOwnProperty.call(i, b), C = l ? i[b] : i, S = (C == null ? void 0 : C.status) && f.get(C.status) || f.get(C == null ? void 0 : C.name) || l && f.has(b) && f.get(b);
|
|
740
|
+
if (S)
|
|
741
|
+
return S(C, e);
|
|
742
|
+
const M = f.get(yt);
|
|
743
|
+
if (M)
|
|
744
|
+
return M(C, e);
|
|
745
|
+
throw C;
|
|
746
|
+
}), h = (a) => (i) => /* If a callback is provided, then callback with the body result otherwise return the parsed body itself. */ A(a ? p.then((l) => l && l[a]()).then((l) => i ? i(l) : l) : p.then((l) => i ? i(l) : l)), y = {
|
|
747
|
+
_wretchReq: e,
|
|
748
|
+
_fetchReq: m,
|
|
749
|
+
_sharedState: t,
|
|
750
|
+
res: h(null),
|
|
751
|
+
json: h("json"),
|
|
752
|
+
blob: h("blob"),
|
|
753
|
+
formData: h("formData"),
|
|
754
|
+
arrayBuffer: h("arrayBuffer"),
|
|
755
|
+
text: h("text"),
|
|
756
|
+
error(a, i) {
|
|
757
|
+
return f.set(a, i), this;
|
|
758
|
+
},
|
|
759
|
+
badRequest(a) {
|
|
760
|
+
return this.error(400, a);
|
|
761
|
+
},
|
|
762
|
+
unauthorized(a) {
|
|
763
|
+
return this.error(401, a);
|
|
764
|
+
},
|
|
765
|
+
forbidden(a) {
|
|
766
|
+
return this.error(403, a);
|
|
767
|
+
},
|
|
768
|
+
notFound(a) {
|
|
769
|
+
return this.error(404, a);
|
|
770
|
+
},
|
|
771
|
+
timeout(a) {
|
|
772
|
+
return this.error(408, a);
|
|
773
|
+
},
|
|
774
|
+
internalError(a) {
|
|
775
|
+
return this.error(500, a);
|
|
776
|
+
},
|
|
777
|
+
fetchError(a) {
|
|
778
|
+
return this.error(b, a);
|
|
779
|
+
}
|
|
780
|
+
}, v = d.reduce((a, i) => ({
|
|
781
|
+
...a,
|
|
782
|
+
...typeof i.resolver == "function" ? i.resolver(a) : i.resolver
|
|
783
|
+
}), y);
|
|
784
|
+
return c.reduce((a, i) => i(a, e), v);
|
|
785
|
+
}, xr = {
|
|
786
|
+
_url: "",
|
|
787
|
+
_options: {},
|
|
788
|
+
_config: I,
|
|
789
|
+
_catchers: /* @__PURE__ */ new Map(),
|
|
790
|
+
_resolvers: [],
|
|
791
|
+
_deferred: [],
|
|
792
|
+
_middlewares: [],
|
|
793
|
+
_addons: [],
|
|
794
|
+
addon(e) {
|
|
795
|
+
return { ...this, _addons: [...this._addons, e], ...e.wretch };
|
|
796
|
+
},
|
|
797
|
+
errorType(e) {
|
|
798
|
+
return {
|
|
799
|
+
...this,
|
|
800
|
+
_config: {
|
|
801
|
+
...this._config,
|
|
802
|
+
errorType: e
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
},
|
|
806
|
+
polyfills(e, t = !1) {
|
|
807
|
+
return {
|
|
808
|
+
...this,
|
|
809
|
+
_config: {
|
|
810
|
+
...this._config,
|
|
811
|
+
polyfills: t ? e : N(this._config.polyfills, e)
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
},
|
|
815
|
+
url(e, t = !1) {
|
|
816
|
+
if (t)
|
|
817
|
+
return { ...this, _url: e };
|
|
818
|
+
const s = this._url.split("?");
|
|
819
|
+
return {
|
|
820
|
+
...this,
|
|
821
|
+
_url: s.length > 1 ? s[0] + e + "?" + s[1] : this._url + e
|
|
822
|
+
};
|
|
823
|
+
},
|
|
824
|
+
options(e, t = !1) {
|
|
825
|
+
return { ...this, _options: t ? e : N(this._options, e) };
|
|
826
|
+
},
|
|
827
|
+
headers(e) {
|
|
828
|
+
const t = e ? Array.isArray(e) ? Object.fromEntries(e) : "entries" in e ? Object.fromEntries(e.entries()) : e : {};
|
|
829
|
+
return { ...this, _options: N(this._options, { headers: t }) };
|
|
830
|
+
},
|
|
831
|
+
accept(e) {
|
|
832
|
+
return this.headers({ Accept: e });
|
|
833
|
+
},
|
|
834
|
+
content(e) {
|
|
835
|
+
return this.headers({ [gt]: e });
|
|
836
|
+
},
|
|
837
|
+
auth(e) {
|
|
838
|
+
return this.headers({ Authorization: e });
|
|
839
|
+
},
|
|
840
|
+
catcher(e, t) {
|
|
841
|
+
const s = new Map(this._catchers);
|
|
842
|
+
return s.set(e, t), { ...this, _catchers: s };
|
|
843
|
+
},
|
|
844
|
+
catcherFallback(e) {
|
|
845
|
+
return this.catcher(yt, e);
|
|
846
|
+
},
|
|
847
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
848
|
+
resolve(e, t = !1) {
|
|
849
|
+
return { ...this, _resolvers: t ? [e] : [...this._resolvers, e] };
|
|
850
|
+
},
|
|
851
|
+
defer(e, t = !1) {
|
|
852
|
+
return {
|
|
853
|
+
...this,
|
|
854
|
+
_deferred: t ? [e] : [...this._deferred, e]
|
|
855
|
+
};
|
|
856
|
+
},
|
|
857
|
+
middlewares(e, t = !1) {
|
|
858
|
+
return {
|
|
859
|
+
...this,
|
|
860
|
+
_middlewares: t ? e : [...this._middlewares, ...e]
|
|
861
|
+
};
|
|
862
|
+
},
|
|
863
|
+
fetch(e = this._options.method, t = "", s = null) {
|
|
864
|
+
let n = this.url(t).options({ method: e });
|
|
865
|
+
const o = it(n._options.headers), r = this._config.polyfill("FormData", !1), c = typeof s == "object" && !(r && s instanceof r) && (!n._options.headers || !o || ct(o));
|
|
866
|
+
return n = s ? c ? n.json(s, o) : n.body(s) : n, Wr(n._deferred.reduce((u, d) => d(u, u._url, u._options), n));
|
|
867
|
+
},
|
|
868
|
+
get(e = "") {
|
|
869
|
+
return this.fetch("GET", e);
|
|
870
|
+
},
|
|
871
|
+
delete(e = "") {
|
|
872
|
+
return this.fetch("DELETE", e);
|
|
873
|
+
},
|
|
874
|
+
put(e, t = "") {
|
|
875
|
+
return this.fetch("PUT", t, e);
|
|
876
|
+
},
|
|
877
|
+
post(e, t = "") {
|
|
878
|
+
return this.fetch("POST", t, e);
|
|
879
|
+
},
|
|
880
|
+
patch(e, t = "") {
|
|
881
|
+
return this.fetch("PATCH", t, e);
|
|
882
|
+
},
|
|
883
|
+
head(e = "") {
|
|
884
|
+
return this.fetch("HEAD", e);
|
|
885
|
+
},
|
|
886
|
+
opts(e = "") {
|
|
887
|
+
return this.fetch("OPTIONS", e);
|
|
888
|
+
},
|
|
889
|
+
body(e) {
|
|
890
|
+
return { ...this, _options: { ...this._options, body: e } };
|
|
891
|
+
},
|
|
892
|
+
json(e, t) {
|
|
893
|
+
const s = it(this._options.headers);
|
|
894
|
+
return this.content(t || ct(s) && s || wr).body(JSON.stringify(e));
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
function k(e = "", t = {}) {
|
|
898
|
+
return { ...xr, _url: e, _options: t };
|
|
899
|
+
}
|
|
900
|
+
k.default = k;
|
|
901
|
+
k.options = Dr;
|
|
902
|
+
k.errorType = Kr;
|
|
903
|
+
k.polyfills = Hr;
|
|
904
|
+
k.WretchError = Tt;
|
|
905
|
+
const Yr = () => ({
|
|
906
|
+
beforeRequest(e, t, s) {
|
|
907
|
+
const n = e._config.polyfill("AbortController", !1, !0);
|
|
908
|
+
!t.signal && n && (t.signal = n.signal);
|
|
909
|
+
const o = {
|
|
910
|
+
ref: null,
|
|
911
|
+
clear() {
|
|
912
|
+
o.ref && (clearTimeout(o.ref), o.ref = null);
|
|
913
|
+
}
|
|
914
|
+
};
|
|
915
|
+
return s.abort = {
|
|
916
|
+
timeout: o,
|
|
917
|
+
fetchController: n
|
|
918
|
+
}, e;
|
|
919
|
+
},
|
|
920
|
+
wretch: {
|
|
921
|
+
signal(e) {
|
|
922
|
+
return { ...this, _options: { ...this._options, signal: e.signal } };
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
resolver: {
|
|
926
|
+
setTimeout(e, t = this._sharedState.abort.fetchController) {
|
|
927
|
+
const { timeout: s } = this._sharedState.abort;
|
|
928
|
+
return s.clear(), s.ref = setTimeout(() => t.abort(), e), this;
|
|
929
|
+
},
|
|
930
|
+
controller() {
|
|
931
|
+
return [this._sharedState.abort.fetchController, this];
|
|
932
|
+
},
|
|
933
|
+
onAbort(e) {
|
|
934
|
+
return this.error("AbortError", e);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
function Mt(e, t = !1, s, n = s.polyfill("FormData", !0, !0), o = []) {
|
|
939
|
+
return Object.entries(e).forEach(([r, c]) => {
|
|
940
|
+
let u = o.reduce((d, f) => d ? `${d}[${f}]` : f, null);
|
|
941
|
+
if (u = u ? `${u}[${r}]` : r, c instanceof Array || globalThis.FileList && c instanceof FileList)
|
|
942
|
+
for (const d of c)
|
|
943
|
+
n.append(u, d);
|
|
944
|
+
else t && typeof c == "object" && (!(t instanceof Array) || !t.includes(r)) ? c !== null && Mt(c, t, s, n, [...o, r]) : n.append(u, c);
|
|
945
|
+
}), n;
|
|
946
|
+
}
|
|
947
|
+
const Zr = {
|
|
948
|
+
wretch: {
|
|
949
|
+
formData(e, t = !1) {
|
|
950
|
+
return this.body(Mt(e, t, this._config));
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
};
|
|
954
|
+
function lt(e) {
|
|
955
|
+
return typeof e < "u" ? e : "";
|
|
956
|
+
}
|
|
957
|
+
const Vr = (e, t, s, n, o) => {
|
|
958
|
+
let r;
|
|
959
|
+
if (typeof t == "string")
|
|
960
|
+
r = t;
|
|
961
|
+
else {
|
|
962
|
+
const u = o.polyfill("URLSearchParams", !0, !0);
|
|
963
|
+
for (const d in t) {
|
|
964
|
+
const f = t[d];
|
|
965
|
+
if (!(n && f == null))
|
|
966
|
+
if (t[d] instanceof Array)
|
|
967
|
+
for (const E of f)
|
|
968
|
+
u.append(d, lt(E));
|
|
969
|
+
else
|
|
970
|
+
u.append(d, lt(f));
|
|
971
|
+
}
|
|
972
|
+
r = u.toString();
|
|
973
|
+
}
|
|
974
|
+
const c = e.split("?");
|
|
975
|
+
return r ? s || c.length < 2 ? c[0] + "?" + r : e + "&" + r : s ? c[0] : e;
|
|
976
|
+
}, Jr = {
|
|
977
|
+
wretch: {
|
|
978
|
+
query(e, t = !1, s = !1) {
|
|
979
|
+
return { ...this, _url: Vr(this._url, e, t, s, this._config) };
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}, qr = {
|
|
983
|
+
number: {
|
|
984
|
+
locale: "uk",
|
|
985
|
+
fraction: 2,
|
|
986
|
+
unsigned: !0
|
|
987
|
+
}
|
|
988
|
+
}, ra = {
|
|
989
|
+
number: {
|
|
990
|
+
locale: "uk",
|
|
991
|
+
fraction: 0,
|
|
992
|
+
unsigned: !0
|
|
993
|
+
}
|
|
994
|
+
}, aa = (e) => {
|
|
995
|
+
const t = e.split(",");
|
|
996
|
+
return t.length > 1 && t[1].length === 1 ? e.padEnd(e.length + 1, "0") : e;
|
|
997
|
+
}, Xr = (e) => new At(qr).unmasked(e), ut = Symbol("aborted");
|
|
998
|
+
class ia {
|
|
999
|
+
constructor(t) {
|
|
1000
|
+
q(this, "abort");
|
|
1001
|
+
this.version = t;
|
|
1002
|
+
}
|
|
1003
|
+
getProfile(t) {
|
|
1004
|
+
return t === "GBP" ? "uk" : "euro";
|
|
1005
|
+
}
|
|
1006
|
+
async loadData(t = "https://transfer.moneyto.co.uk/sf/country-list") {
|
|
1007
|
+
const s = await this.makeRequest().url(t).get();
|
|
1008
|
+
if (s.status === "success")
|
|
1009
|
+
return s.result;
|
|
1010
|
+
}
|
|
1011
|
+
async calculate(t, s = "https://transfer.moneyto.co.uk/sf/calculate") {
|
|
1012
|
+
var c;
|
|
1013
|
+
(c = this.abort) == null || c.abort(ut), this.abort = new AbortController();
|
|
1014
|
+
const n = t.isReceive ? t.payoutAmount : t.sendAmount, o = new URLSearchParams(window.location.search), r = {
|
|
1015
|
+
country: t.country,
|
|
1016
|
+
method: t.payoutType,
|
|
1017
|
+
amount: Xr(n),
|
|
1018
|
+
currency: t.payoutCurrency,
|
|
1019
|
+
send_currency: t.sendCurrency,
|
|
1020
|
+
is_receive: t.isReceive ? 1 : 0,
|
|
1021
|
+
profile: this.getProfile(t.sendCurrency),
|
|
1022
|
+
utm_source: o.get("utm_source"),
|
|
1023
|
+
utm_medium: o.get("utm_medium"),
|
|
1024
|
+
utm_campaign: o.get("utm_campaign"),
|
|
1025
|
+
utm_content: o.get("utm_content"),
|
|
1026
|
+
utm_term: o.get("utm_term")
|
|
1027
|
+
};
|
|
1028
|
+
try {
|
|
1029
|
+
const u = await this.makeRequest().url(s).formData(r).signal(this.abort).post();
|
|
1030
|
+
if (u.status !== "success")
|
|
1031
|
+
throw new Error();
|
|
1032
|
+
return u.result;
|
|
1033
|
+
} catch (u) {
|
|
1034
|
+
throw u === ut ? u : new Error("Calculation error, please try later");
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
makeRequest() {
|
|
1038
|
+
let t = k().errorType("json").addon(Yr()).addon(Zr).addon(Jr).resolve((s) => s.json());
|
|
1039
|
+
return this.version && (t = t.query({ api_version: this.version })), t;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
export {
|
|
1043
|
+
ia as A,
|
|
1044
|
+
At as F,
|
|
1045
|
+
oa as V,
|
|
1046
|
+
sa as a,
|
|
1047
|
+
H as b,
|
|
1048
|
+
ea as c,
|
|
1049
|
+
ra as d,
|
|
1050
|
+
ta as e,
|
|
1051
|
+
na as f,
|
|
1052
|
+
qr as g,
|
|
1053
|
+
ut as h,
|
|
1054
|
+
zr as i,
|
|
1055
|
+
Xr as j,
|
|
1056
|
+
aa as p
|
|
1057
|
+
};
|