intl-tel-input 25.15.0 → 25.15.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.
Files changed (79) hide show
  1. package/README.md +21 -19
  2. package/angular/README.md +1 -1
  3. package/angular/build/IntlTelInput.js +1 -1
  4. package/angular/build/IntlTelInputWithUtils.js +125 -186
  5. package/build/js/data.js +1 -1
  6. package/build/js/data.min.js +1 -1
  7. package/build/js/i18n/zh-hk/countries.js +245 -0
  8. package/build/js/i18n/zh-hk/index.js +5 -0
  9. package/build/js/i18n/zh-hk/interface.js +14 -0
  10. package/build/js/intlTelInput.js +2 -2
  11. package/build/js/intlTelInput.min.js +2 -2
  12. package/build/js/intlTelInputWithUtils.js +126 -187
  13. package/build/js/intlTelInputWithUtils.min.js +2 -2
  14. package/build/js/utils.js +53 -54
  15. package/package.json +2 -2
  16. package/react/README.md +4 -2
  17. package/react/build/IntlTelInput.cjs +1 -1
  18. package/react/build/IntlTelInput.js +1 -1
  19. package/react/build/IntlTelInputWithUtils.cjs +125 -186
  20. package/react/build/IntlTelInputWithUtils.js +125 -186
  21. package/svelte/README.md +7 -9
  22. package/svelte/build/IntlTelInput.mjs +1329 -1329
  23. package/svelte/build/IntlTelInputWithUtils.mjs +1829 -1890
  24. package/vue/README.md +7 -9
  25. package/vue/build/IntlTelInput.mjs +1 -1
  26. package/vue/build/IntlTelInputWithUtils.mjs +125 -186
  27. package/vue/build/exports/IntlTelInput.mjs +1 -1
  28. package/vue/build/exports/IntlTelInputWithUtils.mjs +1 -1
  29. package/vue/build/intl-tel-input/data.d.ts +18 -0
  30. package/vue/build/intl-tel-input/i18n/ar/index.d.ts +3 -0
  31. package/vue/build/intl-tel-input/i18n/bg/index.d.ts +3 -0
  32. package/vue/build/intl-tel-input/i18n/bn/index.d.ts +3 -0
  33. package/vue/build/intl-tel-input/i18n/bs/index.d.ts +3 -0
  34. package/vue/build/intl-tel-input/i18n/ca/index.d.ts +3 -0
  35. package/vue/build/intl-tel-input/i18n/cs/index.d.ts +3 -0
  36. package/vue/build/intl-tel-input/i18n/da/index.d.ts +3 -0
  37. package/vue/build/intl-tel-input/i18n/de/index.d.ts +3 -0
  38. package/vue/build/intl-tel-input/i18n/ee/index.d.ts +3 -0
  39. package/vue/build/intl-tel-input/i18n/el/index.d.ts +3 -0
  40. package/vue/build/intl-tel-input/i18n/en/index.d.ts +3 -0
  41. package/vue/build/intl-tel-input/i18n/es/index.d.ts +3 -0
  42. package/vue/build/intl-tel-input/i18n/fa/index.d.ts +3 -0
  43. package/vue/build/intl-tel-input/i18n/fi/index.d.ts +3 -0
  44. package/vue/build/intl-tel-input/i18n/fr/index.d.ts +3 -0
  45. package/vue/build/intl-tel-input/i18n/hi/index.d.ts +3 -0
  46. package/vue/build/intl-tel-input/i18n/hr/index.d.ts +3 -0
  47. package/vue/build/intl-tel-input/i18n/hu/index.d.ts +3 -0
  48. package/vue/build/intl-tel-input/i18n/id/index.d.ts +3 -0
  49. package/vue/build/intl-tel-input/i18n/index.d.ts +43 -0
  50. package/vue/build/intl-tel-input/i18n/it/index.d.ts +3 -0
  51. package/vue/build/intl-tel-input/i18n/ja/index.d.ts +3 -0
  52. package/vue/build/intl-tel-input/i18n/ko/index.d.ts +3 -0
  53. package/vue/build/intl-tel-input/i18n/lt/index.d.ts +3 -0
  54. package/vue/build/intl-tel-input/i18n/mr/index.d.ts +3 -0
  55. package/vue/build/intl-tel-input/i18n/nl/index.d.ts +3 -0
  56. package/vue/build/intl-tel-input/i18n/no/index.d.ts +3 -0
  57. package/vue/build/intl-tel-input/i18n/pl/index.d.ts +3 -0
  58. package/vue/build/intl-tel-input/i18n/pt/index.d.ts +3 -0
  59. package/vue/build/intl-tel-input/i18n/ro/index.d.ts +3 -0
  60. package/vue/build/intl-tel-input/i18n/ru/index.d.ts +3 -0
  61. package/vue/build/intl-tel-input/i18n/sk/index.d.ts +3 -0
  62. package/vue/build/intl-tel-input/i18n/sl/index.d.ts +3 -0
  63. package/vue/build/intl-tel-input/i18n/sq/index.d.ts +3 -0
  64. package/vue/build/intl-tel-input/i18n/sr/index.d.ts +3 -0
  65. package/vue/build/intl-tel-input/i18n/sv/index.d.ts +3 -0
  66. package/vue/build/intl-tel-input/i18n/te/index.d.ts +3 -0
  67. package/vue/build/intl-tel-input/i18n/th/index.d.ts +3 -0
  68. package/vue/build/intl-tel-input/i18n/tr/index.d.ts +3 -0
  69. package/vue/build/intl-tel-input/i18n/types.d.ts +10 -0
  70. package/vue/build/intl-tel-input/i18n/uk/index.d.ts +3 -0
  71. package/vue/build/intl-tel-input/i18n/ur/index.d.ts +3 -0
  72. package/vue/build/intl-tel-input/i18n/uz/index.d.ts +3 -0
  73. package/vue/build/intl-tel-input/i18n/vi/index.d.ts +3 -0
  74. package/vue/build/intl-tel-input/i18n/zh/index.d.ts +3 -0
  75. package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +2 -0
  76. package/vue/build/{intl-tel-input-Db39yQmC.mjs → intl-tel-input-f0-6rrpA.mjs} +136 -138
  77. package/vue/build/modules/core/ui.d.ts +0 -1
  78. package/vue/build/modules/format/formatting.d.ts +1 -1
  79. package/vue/build/modules/types/public-api.d.ts +2 -1
@@ -1,79 +1,79 @@
1
- var xi = Object.defineProperty;
1
+ var Fn = Object.defineProperty;
2
2
  var Te = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var Bi = (e, t, i) => t in e ? xi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
6
- var it = (e, t, i) => Bi(e, typeof t != "symbol" ? t + "" : t, i), ee = (e, t, i) => t.has(e) || Te("Cannot " + i);
7
- var L = (e, t, i) => (ee(e, t, "read from private field"), i ? i.call(e) : t.get(e)), tt = (e, t, i) => t.has(e) ? Te("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, i), vt = (e, t, i, n) => (ee(e, t, "write to private field"), n ? n.call(e, i) : t.set(e, i), i), K = (e, t, i) => (ee(e, t, "access private method"), i);
8
- import { onMount as Fi, onDestroy as Hi } from "svelte";
9
- const Vi = "5";
5
+ var Hn = (e, t, n) => t in e ? Fn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var tt = (e, t, n) => Hn(e, typeof t != "symbol" ? t + "" : t, n), te = (e, t, n) => t.has(e) || Te("Cannot " + n);
7
+ var A = (e, t, n) => (te(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Z = (e, t, n) => t.has(e) ? Te("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), bt = (e, t, n, i) => (te(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), lt = (e, t, n) => (te(e, t, "access private method"), n);
8
+ import { onMount as Vn, onDestroy as Wn } from "svelte";
9
+ const jn = "5";
10
10
  var qe;
11
- typeof window < "u" && ((qe = window.__svelte ?? (window.__svelte = {})).v ?? (qe.v = /* @__PURE__ */ new Set())).add(Vi);
12
- const Wi = 1, ji = 4, Gi = 8, zi = 16, Ki = 2, R = Symbol(), Yi = "http://www.w3.org/1999/xhtml", qi = "@attach", de = !1;
13
- var $e = Array.isArray, $i = Array.prototype.indexOf, Xi = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, Qi = Object.getOwnPropertyDescriptors, Zi = Object.prototype, Ji = Array.prototype, Xe = Object.getPrototypeOf;
14
- function tn(e) {
11
+ typeof window < "u" && ((qe = window.__svelte ?? (window.__svelte = {})).v ?? (qe.v = /* @__PURE__ */ new Set())).add(jn);
12
+ const Gn = 1, zn = 4, Kn = 8, Yn = 16, qn = 2, P = Symbol(), $n = "http://www.w3.org/1999/xhtml", Xn = "@attach", ce = !1;
13
+ var $e = Array.isArray, Qn = Array.prototype.indexOf, Zn = Object.defineProperty, Wt = Object.getOwnPropertyDescriptor, Jn = Object.getOwnPropertyDescriptors, ti = Object.prototype, ei = Array.prototype, Xe = Object.getPrototypeOf;
14
+ function ni(e) {
15
15
  for (var t = 0; t < e.length; t++)
16
16
  e[t]();
17
17
  }
18
18
  function Qe() {
19
- var e, t, i = new Promise((n, s) => {
20
- e = n, t = s;
19
+ var e, t, n = new Promise((i, s) => {
20
+ e = i, t = s;
21
21
  });
22
- return { promise: i, resolve: e, reject: t };
22
+ return { promise: n, resolve: e, reject: t };
23
23
  }
24
- const M = 2, ve = 4, Ze = 8, Je = 1 << 24, Ct = 16, gt = 32, Tt = 64, be = 128, q = 512, B = 1024, j = 2048, Q = 4096, Et = 8192, et = 16384, we = 32768, Pe = 65536, Oe = 1 << 17, ti = 1 << 18, Jt = 1 << 19, en = 1 << 20, pt = 32768, fe = 1 << 21, Ie = 1 << 22, nt = 1 << 23, ct = Symbol("$state"), nn = Symbol("legacy props"), sn = Symbol(""), bt = new class extends Error {
24
+ const k = 2, Gt = 4, ye = 8, ve = 1 << 24, mt = 16, yt = 32, Pt = 64, Ze = 128, z = 512, U = 1024, W = 2048, rt = 4096, Nt = 8192, J = 16384, be = 32768, Pe = 65536, Oe = 1 << 17, Je = 1 << 18, Zt = 1 << 19, ii = 1 << 20, Ct = 32768, de = 1 << 21, we = 1 << 22, et = 1 << 23, ft = Symbol("$state"), si = Symbol("legacy props"), ri = Symbol(""), wt = new class extends Error {
25
25
  constructor() {
26
26
  super(...arguments);
27
- it(this, "name", "StaleReactionError");
28
- it(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
27
+ tt(this, "name", "StaleReactionError");
28
+ tt(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
29
29
  }
30
30
  }();
31
- function rn() {
31
+ function oi() {
32
32
  throw new Error("https://svelte.dev/e/async_derived_orphan");
33
33
  }
34
- function on(e) {
34
+ function li(e) {
35
35
  throw new Error("https://svelte.dev/e/effect_in_teardown");
36
36
  }
37
- function ln() {
37
+ function ai() {
38
38
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
39
39
  }
40
- function an(e) {
40
+ function ui(e) {
41
41
  throw new Error("https://svelte.dev/e/effect_orphan");
42
42
  }
43
- function un() {
43
+ function ci() {
44
44
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
45
45
  }
46
- function cn(e) {
46
+ function di(e) {
47
47
  throw new Error("https://svelte.dev/e/props_invalid_value");
48
48
  }
49
- function dn() {
49
+ function fi() {
50
50
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
51
51
  }
52
- function fn() {
52
+ function hi() {
53
53
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
54
54
  }
55
- function hn() {
55
+ function pi() {
56
56
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
57
57
  }
58
- function pn() {
58
+ function _i() {
59
59
  console.warn("https://svelte.dev/e/select_multiple_invalid_value");
60
60
  }
61
- function ei(e) {
61
+ function tn(e) {
62
62
  return e === this.v;
63
63
  }
64
- function _n(e, t) {
64
+ function Ci(e, t) {
65
65
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
66
66
  }
67
- function Cn(e) {
68
- return !_n(e, this.v);
67
+ function gi(e) {
68
+ return !Ci(e, this.v);
69
69
  }
70
- let gn = !1, Z = null;
70
+ let mi = !1, X = null;
71
71
  function zt(e) {
72
- Z = e;
72
+ X = e;
73
73
  }
74
- function mn(e, t = !1, i) {
75
- Z = {
76
- p: Z,
74
+ function yi(e, t = !1, n) {
75
+ X = {
76
+ p: X,
77
77
  i: !1,
78
78
  c: null,
79
79
  e: null,
@@ -82,42 +82,42 @@ function mn(e, t = !1, i) {
82
82
  l: null
83
83
  };
84
84
  }
85
- function yn(e) {
85
+ function vi(e) {
86
86
  var t = (
87
87
  /** @type {ComponentContext} */
88
- Z
89
- ), i = t.e;
90
- if (i !== null) {
88
+ X
89
+ ), n = t.e;
90
+ if (n !== null) {
91
91
  t.e = null;
92
- for (var n of i)
93
- hi(n);
92
+ for (var i of n)
93
+ _n(i);
94
94
  }
95
- return e !== void 0 && (t.x = e), t.i = !0, Z = t.p, e ?? /** @type {T} */
95
+ return e !== void 0 && (t.x = e), t.i = !0, X = t.p, e ?? /** @type {T} */
96
96
  {};
97
97
  }
98
- function ii() {
98
+ function en() {
99
99
  return !0;
100
100
  }
101
- let wt = [];
102
- function vn() {
103
- var e = wt;
104
- wt = [], tn(e);
101
+ let It = [];
102
+ function bi() {
103
+ var e = It;
104
+ It = [], ni(e);
105
105
  }
106
- function te(e) {
107
- if (wt.length === 0) {
108
- var t = wt;
106
+ function Jt(e) {
107
+ if (It.length === 0) {
108
+ var t = It;
109
109
  queueMicrotask(() => {
110
- t === wt && vn();
110
+ t === It && bi();
111
111
  });
112
112
  }
113
- wt.push(e);
113
+ It.push(e);
114
114
  }
115
- function bn(e) {
116
- var t = D;
115
+ function wi(e) {
116
+ var t = N;
117
117
  if (t === null)
118
- return w.f |= nt, e;
119
- if ((t.f & we) === 0) {
120
- if ((t.f & be) === 0)
118
+ return w.f |= et, e;
119
+ if ((t.f & be) === 0) {
120
+ if ((t.f & Ze) === 0)
121
121
  throw e;
122
122
  t.b.error(e);
123
123
  } else
@@ -125,98 +125,111 @@ function bn(e) {
125
125
  }
126
126
  function Kt(e, t) {
127
127
  for (; t !== null; ) {
128
- if ((t.f & be) !== 0)
128
+ if ((t.f & Ze) !== 0)
129
129
  try {
130
130
  t.b.error(e);
131
131
  return;
132
- } catch (i) {
133
- e = i;
132
+ } catch (n) {
133
+ e = n;
134
134
  }
135
135
  t = t.parent;
136
136
  }
137
137
  throw e;
138
138
  }
139
- const Ft = /* @__PURE__ */ new Set();
140
- let N = null, P = null, $ = [], Ee = null, he = !1;
141
- var Nt, Dt, at, ut, xt, At, Lt, k, pe, Rt, _e, ni, si;
142
- const Zt = class Zt {
139
+ const Ii = -7169;
140
+ function B(e, t) {
141
+ e.f = e.f & Ii | t;
142
+ }
143
+ function Ie(e) {
144
+ (e.f & z) !== 0 || e.deps === null ? B(e, U) : B(e, rt);
145
+ }
146
+ function nn(e) {
147
+ if (e !== null)
148
+ for (const t of e)
149
+ (t.f & k) === 0 || (t.f & Ct) === 0 || (t.f ^= Ct, nn(
150
+ /** @type {Derived} */
151
+ t.deps
152
+ ));
153
+ }
154
+ function Ei(e, t, n) {
155
+ (e.f & W) !== 0 ? t.add(e) : (e.f & rt) !== 0 && n.add(e), nn(e.deps), B(e, U);
156
+ }
157
+ const Bt = /* @__PURE__ */ new Set();
158
+ let S = null, R = null, $ = [], Ee = null, fe = !1;
159
+ var Dt, At, ct, dt, Ut, Lt, St, K, he, pe, sn, rn;
160
+ const Qt = class Qt {
143
161
  constructor() {
144
- tt(this, k);
145
- it(this, "committed", !1);
162
+ Z(this, K);
163
+ tt(this, "committed", !1);
146
164
  /**
147
165
  * The current values of any sources that are updated in this batch
148
166
  * They keys of this map are identical to `this.#previous`
149
167
  * @type {Map<Source, any>}
150
168
  */
151
- it(this, "current", /* @__PURE__ */ new Map());
169
+ tt(this, "current", /* @__PURE__ */ new Map());
152
170
  /**
153
171
  * The values of any sources that are updated in this batch _before_ those updates took place.
154
172
  * They keys of this map are identical to `this.#current`
155
173
  * @type {Map<Source, any>}
156
174
  */
157
- it(this, "previous", /* @__PURE__ */ new Map());
175
+ tt(this, "previous", /* @__PURE__ */ new Map());
158
176
  /**
159
177
  * When the batch is committed (and the DOM is updated), we need to remove old branches
160
178
  * and append new ones by calling the functions added inside (if/each/key/etc) blocks
161
179
  * @type {Set<() => void>}
162
180
  */
163
- tt(this, Nt, /* @__PURE__ */ new Set());
181
+ Z(this, Dt, /* @__PURE__ */ new Set());
164
182
  /**
165
183
  * If a fork is discarded, we need to destroy any effects that are no longer needed
166
184
  * @type {Set<(batch: Batch) => void>}
167
185
  */
168
- tt(this, Dt, /* @__PURE__ */ new Set());
186
+ Z(this, At, /* @__PURE__ */ new Set());
169
187
  /**
170
188
  * The number of async effects that are currently in flight
171
189
  */
172
- tt(this, at, 0);
190
+ Z(this, ct, 0);
173
191
  /**
174
192
  * The number of async effects that are currently in flight, _not_ inside a pending boundary
175
193
  */
176
- tt(this, ut, 0);
194
+ Z(this, dt, 0);
177
195
  /**
178
196
  * A deferred that resolves when the batch is committed, used with `settled()`
179
197
  * TODO replace with Promise.withResolvers once supported widely enough
180
198
  * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
181
199
  */
182
- tt(this, xt, null);
200
+ Z(this, Ut, null);
183
201
  /**
184
202
  * Deferred effects (which run after async work has completed) that are DIRTY
185
203
  * @type {Set<Effect>}
186
204
  */
187
- tt(this, At, /* @__PURE__ */ new Set());
205
+ Z(this, Lt, /* @__PURE__ */ new Set());
188
206
  /**
189
207
  * Deferred effects that are MAYBE_DIRTY
190
208
  * @type {Set<Effect>}
191
209
  */
192
- tt(this, Lt, /* @__PURE__ */ new Set());
210
+ Z(this, St, /* @__PURE__ */ new Set());
193
211
  /**
194
212
  * A set of branches that still exist, but will be destroyed when this batch
195
213
  * is committed — we skip over these during `process`
196
214
  * @type {Set<Effect>}
197
215
  */
198
- it(this, "skipped_effects", /* @__PURE__ */ new Set());
199
- it(this, "is_fork", !1);
216
+ tt(this, "skipped_effects", /* @__PURE__ */ new Set());
217
+ tt(this, "is_fork", !1);
200
218
  }
201
219
  is_deferred() {
202
- return this.is_fork || L(this, ut) > 0;
220
+ return this.is_fork || A(this, dt) > 0;
203
221
  }
204
222
  /**
205
223
  *
206
224
  * @param {Effect[]} root_effects
207
225
  */
208
226
  process(t) {
209
- var n;
227
+ var s;
210
228
  $ = [], this.apply();
211
- var i = {
212
- parent: null,
213
- effect: null,
214
- effects: [],
215
- render_effects: []
216
- };
217
- for (const s of t)
218
- K(this, k, pe).call(this, s, i);
219
- this.is_fork || K(this, k, ni).call(this), this.is_deferred() ? (K(this, k, Rt).call(this, i.effects), K(this, k, Rt).call(this, i.render_effects)) : (N = null, Re(i.render_effects), Re(i.effects), (n = L(this, xt)) == null || n.resolve()), P = null;
229
+ var n = [], i = [];
230
+ for (const r of t)
231
+ lt(this, K, he).call(this, r, n, i);
232
+ this.is_fork || lt(this, K, sn).call(this), this.is_deferred() ? (lt(this, K, pe).call(this, i), lt(this, K, pe).call(this, n)) : (S = null, Re(i), Re(n), (s = A(this, Ut)) == null || s.resolve()), R = null;
220
233
  }
221
234
  /**
222
235
  * Associate a change to a given source with the current
@@ -224,194 +237,172 @@ const Zt = class Zt {
224
237
  * @param {Source} source
225
238
  * @param {any} value
226
239
  */
227
- capture(t, i) {
228
- this.previous.has(t) || this.previous.set(t, i), (t.f & nt) === 0 && (this.current.set(t, t.v), P == null || P.set(t, t.v));
240
+ capture(t, n) {
241
+ n !== P && !this.previous.has(t) && this.previous.set(t, n), (t.f & et) === 0 && (this.current.set(t, t.v), R == null || R.set(t, t.v));
229
242
  }
230
243
  activate() {
231
- N = this, this.apply();
244
+ S = this, this.apply();
232
245
  }
233
246
  deactivate() {
234
- N === this && (N = null, P = null);
247
+ S === this && (S = null, R = null);
235
248
  }
236
249
  flush() {
237
250
  if (this.activate(), $.length > 0) {
238
- if (wn(), N !== null && N !== this)
251
+ if (Ni(), S !== null && S !== this)
239
252
  return;
240
- } else L(this, at) === 0 && this.process([]);
253
+ } else A(this, ct) === 0 && this.process([]);
241
254
  this.deactivate();
242
255
  }
243
256
  discard() {
244
- for (const t of L(this, Dt)) t(this);
245
- L(this, Dt).clear();
257
+ for (const t of A(this, At)) t(this);
258
+ A(this, At).clear();
246
259
  }
247
260
  /**
248
261
  *
249
262
  * @param {boolean} blocking
250
263
  */
251
264
  increment(t) {
252
- vt(this, at, L(this, at) + 1), t && vt(this, ut, L(this, ut) + 1);
265
+ bt(this, ct, A(this, ct) + 1), t && bt(this, dt, A(this, dt) + 1);
253
266
  }
254
267
  /**
255
268
  *
256
269
  * @param {boolean} blocking
257
270
  */
258
271
  decrement(t) {
259
- vt(this, at, L(this, at) - 1), t && vt(this, ut, L(this, ut) - 1), this.revive();
272
+ bt(this, ct, A(this, ct) - 1), t && bt(this, dt, A(this, dt) - 1), this.revive();
260
273
  }
261
274
  revive() {
262
- for (const t of L(this, At))
263
- L(this, Lt).delete(t), H(t, j), St(t);
264
- for (const t of L(this, Lt))
265
- H(t, Q), St(t);
275
+ for (const t of A(this, Lt))
276
+ A(this, St).delete(t), B(t, W), Tt(t);
277
+ for (const t of A(this, St))
278
+ B(t, rt), Tt(t);
266
279
  this.flush();
267
280
  }
268
281
  /** @param {() => void} fn */
269
282
  oncommit(t) {
270
- L(this, Nt).add(t);
283
+ A(this, Dt).add(t);
271
284
  }
272
285
  /** @param {(batch: Batch) => void} fn */
273
286
  ondiscard(t) {
274
- L(this, Dt).add(t);
287
+ A(this, At).add(t);
275
288
  }
276
289
  settled() {
277
- return (L(this, xt) ?? vt(this, xt, Qe())).promise;
290
+ return (A(this, Ut) ?? bt(this, Ut, Qe())).promise;
278
291
  }
279
292
  static ensure() {
280
- if (N === null) {
281
- const t = N = new Zt();
282
- Ft.add(N), Zt.enqueue(() => {
283
- N === t && t.flush();
293
+ if (S === null) {
294
+ const t = S = new Qt();
295
+ Bt.add(S), Qt.enqueue(() => {
296
+ S === t && t.flush();
284
297
  });
285
298
  }
286
- return N;
299
+ return S;
287
300
  }
288
301
  /** @param {() => void} task */
289
302
  static enqueue(t) {
290
- te(t);
303
+ Jt(t);
291
304
  }
292
305
  apply() {
293
306
  }
294
307
  };
295
- Nt = new WeakMap(), Dt = new WeakMap(), at = new WeakMap(), ut = new WeakMap(), xt = new WeakMap(), At = new WeakMap(), Lt = new WeakMap(), k = new WeakSet(), /**
308
+ Dt = new WeakMap(), At = new WeakMap(), ct = new WeakMap(), dt = new WeakMap(), Ut = new WeakMap(), Lt = new WeakMap(), St = new WeakMap(), K = new WeakSet(), /**
296
309
  * Traverse the effect tree, executing effects or stashing
297
310
  * them for later execution as appropriate
298
311
  * @param {Effect} root
299
- * @param {EffectTarget} target
312
+ * @param {Effect[]} effects
313
+ * @param {Effect[]} render_effects
300
314
  */
301
- pe = function(t, i) {
302
- var c;
303
- t.f ^= B;
304
- for (var n = t.first; n !== null; ) {
305
- var s = n.f, r = (s & (gt | Tt)) !== 0, o = r && (s & B) !== 0, l = o || (s & Et) !== 0 || this.skipped_effects.has(n);
306
- if ((n.f & be) !== 0 && ((c = n.b) != null && c.is_pending()) && (i = {
307
- parent: i,
308
- effect: n,
309
- effects: [],
310
- render_effects: []
311
- }), !l && n.fn !== null) {
312
- r ? n.f ^= B : (s & ve) !== 0 ? i.effects.push(n) : Bt(n) && ((n.f & Ct) !== 0 && L(this, At).add(n), Ut(n));
313
- var u = n.first;
314
- if (u !== null) {
315
- n = u;
315
+ he = function(t, n, i) {
316
+ t.f ^= U;
317
+ for (var s = t.first, r = null; s !== null; ) {
318
+ var o = s.f, l = (o & (yt | Pt)) !== 0, a = l && (o & U) !== 0, u = a || (o & Nt) !== 0 || this.skipped_effects.has(s);
319
+ if (!u && s.fn !== null) {
320
+ l ? s.f ^= U : r !== null && (o & (Gt | ye | ve)) !== 0 ? r.b.defer_effect(s) : (o & Gt) !== 0 ? n.push(s) : xt(s) && ((o & mt) !== 0 && A(this, Lt).add(s), Mt(s));
321
+ var c = s.first;
322
+ if (c !== null) {
323
+ s = c;
316
324
  continue;
317
325
  }
318
326
  }
319
- var a = n.parent;
320
- for (n = n.next; n === null && a !== null; )
321
- a === i.effect && (K(this, k, Rt).call(this, i.effects), K(this, k, Rt).call(this, i.render_effects), i = /** @type {EffectTarget} */
322
- i.parent), n = a.next, a = a.parent;
327
+ var d = s.parent;
328
+ for (s = s.next; s === null && d !== null; )
329
+ d === r && (r = null), s = d.next, d = d.parent;
323
330
  }
324
331
  }, /**
325
332
  * @param {Effect[]} effects
326
333
  */
327
- Rt = function(t) {
328
- for (const i of t)
329
- (i.f & j) !== 0 ? L(this, At).add(i) : (i.f & Q) !== 0 && L(this, Lt).add(i), K(this, k, _e).call(this, i.deps), H(i, B);
330
- }, /**
331
- * @param {Value[] | null} deps
332
- */
333
- _e = function(t) {
334
- if (t !== null)
335
- for (const i of t)
336
- (i.f & M) === 0 || (i.f & pt) === 0 || (i.f ^= pt, K(this, k, _e).call(
337
- this,
338
- /** @type {Derived} */
339
- i.deps
340
- ));
341
- }, ni = function() {
342
- if (L(this, ut) === 0) {
343
- for (const t of L(this, Nt)) t();
344
- L(this, Nt).clear();
345
- }
346
- L(this, at) === 0 && K(this, k, si).call(this);
347
- }, si = function() {
348
- var r;
349
- if (Ft.size > 1) {
334
+ pe = function(t) {
335
+ for (var n = 0; n < t.length; n += 1)
336
+ Ei(t[n], A(this, Lt), A(this, St));
337
+ }, sn = function() {
338
+ if (A(this, dt) === 0) {
339
+ for (const t of A(this, Dt)) t();
340
+ A(this, Dt).clear();
341
+ }
342
+ A(this, ct) === 0 && lt(this, K, rn).call(this);
343
+ }, rn = function() {
344
+ var s;
345
+ if (Bt.size > 1) {
350
346
  this.previous.clear();
351
- var t = P, i = !0, n = {
352
- parent: null,
353
- effect: null,
354
- effects: [],
355
- render_effects: []
356
- };
357
- for (const o of Ft) {
358
- if (o === this) {
359
- i = !1;
347
+ var t = R, n = !0;
348
+ for (const r of Bt) {
349
+ if (r === this) {
350
+ n = !1;
360
351
  continue;
361
352
  }
362
- const l = [];
363
- for (const [a, c] of this.current) {
364
- if (o.current.has(a))
365
- if (i && c !== o.current.get(a))
366
- o.current.set(a, c);
353
+ const o = [];
354
+ for (const [a, u] of this.current) {
355
+ if (r.current.has(a))
356
+ if (n && u !== r.current.get(a))
357
+ r.current.set(a, u);
367
358
  else
368
359
  continue;
369
- l.push(a);
360
+ o.push(a);
370
361
  }
371
- if (l.length === 0)
362
+ if (o.length === 0)
372
363
  continue;
373
- const u = [...o.current.keys()].filter((a) => !this.current.has(a));
374
- if (u.length > 0) {
375
- var s = $;
364
+ const l = [...r.current.keys()].filter((a) => !this.current.has(a));
365
+ if (l.length > 0) {
366
+ var i = $;
376
367
  $ = [];
377
- const a = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
378
- for (const d of l)
379
- ri(d, u, a, c);
368
+ const a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
369
+ for (const c of o)
370
+ on(c, l, a, u);
380
371
  if ($.length > 0) {
381
- N = o, o.apply();
382
- for (const d of $)
383
- K(r = o, k, pe).call(r, d, n);
384
- o.deactivate();
372
+ S = r, r.apply();
373
+ for (const c of $)
374
+ lt(s = r, K, he).call(s, c, [], []);
375
+ r.deactivate();
385
376
  }
386
- $ = s;
377
+ $ = i;
387
378
  }
388
379
  }
389
- N = null, P = t;
380
+ S = null, R = t;
390
381
  }
391
- this.committed = !0, Ft.delete(this);
382
+ this.committed = !0, Bt.delete(this);
392
383
  };
393
- let Yt = Zt;
394
- function wn() {
395
- var e = dt;
396
- he = !0;
384
+ let Yt = Qt;
385
+ function Ni() {
386
+ var e = ht;
387
+ fe = !0;
397
388
  var t = null;
398
389
  try {
399
- var i = 0;
400
- for (Xt(!0); $.length > 0; ) {
401
- var n = Yt.ensure();
402
- if (i++ > 1e3) {
390
+ var n = 0;
391
+ for ($t(!0); $.length > 0; ) {
392
+ var i = Yt.ensure();
393
+ if (n++ > 1e3) {
403
394
  var s, r;
404
- In();
395
+ Di();
405
396
  }
406
- n.process($), st.clear();
397
+ i.process($), nt.clear();
407
398
  }
408
399
  } finally {
409
- he = !1, Xt(e), Ee = null;
400
+ fe = !1, $t(e), Ee = null;
410
401
  }
411
402
  }
412
- function In() {
403
+ function Di() {
413
404
  try {
414
- un();
405
+ ci();
415
406
  } catch (e) {
416
407
  Kt(e, Ee);
417
408
  }
@@ -420,19 +411,19 @@ let Y = null;
420
411
  function Re(e) {
421
412
  var t = e.length;
422
413
  if (t !== 0) {
423
- for (var i = 0; i < t; ) {
424
- var n = e[i++];
425
- if ((n.f & (et | Et)) === 0 && Bt(n) && (Y = /* @__PURE__ */ new Set(), Ut(n), n.deps === null && n.first === null && n.nodes === null && (n.teardown === null && n.ac === null ? mi(n) : n.fn = null), (Y == null ? void 0 : Y.size) > 0)) {
426
- st.clear();
414
+ for (var n = 0; n < t; ) {
415
+ var i = e[n++];
416
+ if ((i.f & (J | Nt)) === 0 && xt(i) && (Y = /* @__PURE__ */ new Set(), Mt(i), i.deps === null && i.first === null && i.nodes === null && (i.teardown === null && i.ac === null ? vn(i) : i.fn = null), (Y == null ? void 0 : Y.size) > 0)) {
417
+ nt.clear();
427
418
  for (const s of Y) {
428
- if ((s.f & (et | Et)) !== 0) continue;
419
+ if ((s.f & (J | Nt)) !== 0) continue;
429
420
  const r = [s];
430
421
  let o = s.parent;
431
422
  for (; o !== null; )
432
423
  Y.has(o) && (Y.delete(o), r.push(o)), o = o.parent;
433
424
  for (let l = r.length - 1; l >= 0; l--) {
434
- const u = r[l];
435
- (u.f & (et | Et)) === 0 && Ut(u);
425
+ const a = r[l];
426
+ (a.f & (J | Nt)) === 0 && Mt(a);
436
427
  }
437
428
  }
438
429
  Y.clear();
@@ -441,204 +432,204 @@ function Re(e) {
441
432
  Y = null;
442
433
  }
443
434
  }
444
- function ri(e, t, i, n) {
445
- if (!i.has(e) && (i.add(e), e.reactions !== null))
435
+ function on(e, t, n, i) {
436
+ if (!n.has(e) && (n.add(e), e.reactions !== null))
446
437
  for (const s of e.reactions) {
447
438
  const r = s.f;
448
- (r & M) !== 0 ? ri(
439
+ (r & k) !== 0 ? on(
449
440
  /** @type {Derived} */
450
441
  s,
451
442
  t,
452
- i,
453
- n
454
- ) : (r & (Ie | Ct)) !== 0 && (r & j) === 0 && oi(s, t, n) && (H(s, j), St(
443
+ n,
444
+ i
445
+ ) : (r & (we | mt)) !== 0 && (r & W) === 0 && ln(s, t, i) && (B(s, W), Tt(
455
446
  /** @type {Effect} */
456
447
  s
457
448
  ));
458
449
  }
459
450
  }
460
- function oi(e, t, i) {
461
- const n = i.get(e);
462
- if (n !== void 0) return n;
451
+ function ln(e, t, n) {
452
+ const i = n.get(e);
453
+ if (i !== void 0) return i;
463
454
  if (e.deps !== null)
464
455
  for (const s of e.deps) {
465
456
  if (t.includes(s))
466
457
  return !0;
467
- if ((s.f & M) !== 0 && oi(
458
+ if ((s.f & k) !== 0 && ln(
468
459
  /** @type {Derived} */
469
460
  s,
470
461
  t,
471
- i
462
+ n
472
463
  ))
473
- return i.set(
464
+ return n.set(
474
465
  /** @type {Derived} */
475
466
  s,
476
467
  !0
477
468
  ), !0;
478
469
  }
479
- return i.set(e, !1), !1;
470
+ return n.set(e, !1), !1;
480
471
  }
481
- function St(e) {
472
+ function Tt(e) {
482
473
  for (var t = Ee = e; t.parent !== null; ) {
483
474
  t = t.parent;
484
- var i = t.f;
485
- if (he && t === D && (i & Ct) !== 0 && (i & ti) === 0)
475
+ var n = t.f;
476
+ if (fe && t === N && (n & mt) !== 0 && (n & Je) === 0)
486
477
  return;
487
- if ((i & (Tt | gt)) !== 0) {
488
- if ((i & B) === 0) return;
489
- t.f ^= B;
478
+ if ((n & (Pt | yt)) !== 0) {
479
+ if ((n & U) === 0) return;
480
+ t.f ^= U;
490
481
  }
491
482
  }
492
483
  $.push(t);
493
484
  }
494
- function En(e, t, i, n) {
485
+ function Ai(e, t, n, i) {
495
486
  const s = Ne;
496
- if (i.length === 0 && e.length === 0) {
497
- n(t.map(s));
487
+ if (n.length === 0 && e.length === 0) {
488
+ i(t.map(s));
498
489
  return;
499
490
  }
500
- var r = N, o = (
491
+ var r = S, o = (
501
492
  /** @type {Effect} */
502
- D
503
- ), l = Nn();
504
- function u() {
505
- Promise.all(i.map((a) => /* @__PURE__ */ Dn(a))).then((a) => {
493
+ N
494
+ ), l = Li();
495
+ function a() {
496
+ Promise.all(n.map((u) => /* @__PURE__ */ Si(u))).then((u) => {
506
497
  l();
507
498
  try {
508
- n([...t.map(s), ...a]);
499
+ i([...t.map(s), ...u]);
509
500
  } catch (c) {
510
- (o.f & et) === 0 && Kt(c, o);
501
+ (o.f & J) === 0 && Kt(c, o);
511
502
  }
512
503
  r == null || r.deactivate(), qt();
513
- }).catch((a) => {
514
- Kt(a, o);
504
+ }).catch((u) => {
505
+ Kt(u, o);
515
506
  });
516
507
  }
517
508
  e.length > 0 ? Promise.all(e).then(() => {
518
509
  l();
519
510
  try {
520
- return u();
511
+ return a();
521
512
  } finally {
522
513
  r == null || r.deactivate(), qt();
523
514
  }
524
- }) : u();
515
+ }) : a();
525
516
  }
526
- function Nn() {
527
- var e = D, t = w, i = Z, n = N;
517
+ function Li() {
518
+ var e = N, t = w, n = X, i = S;
528
519
  return function(r = !0) {
529
- rt(e), J(t), zt(i), r && (n == null || n.activate());
520
+ st(e), Q(t), zt(n), r && (i == null || i.activate());
530
521
  };
531
522
  }
532
523
  function qt() {
533
- rt(null), J(null), zt(null);
524
+ st(null), Q(null), zt(null);
534
525
  }
535
526
  // @__NO_SIDE_EFFECTS__
536
527
  function Ne(e) {
537
- var t = M | j, i = w !== null && (w.f & M) !== 0 ? (
528
+ var t = k | W, n = w !== null && (w.f & k) !== 0 ? (
538
529
  /** @type {Derived} */
539
530
  w
540
531
  ) : null;
541
- return D !== null && (D.f |= Jt), {
542
- ctx: Z,
532
+ return N !== null && (N.f |= Zt), {
533
+ ctx: X,
543
534
  deps: null,
544
535
  effects: null,
545
- equals: ei,
536
+ equals: tn,
546
537
  f: t,
547
538
  fn: e,
548
539
  reactions: null,
549
540
  rv: 0,
550
541
  v: (
551
542
  /** @type {V} */
552
- R
543
+ P
553
544
  ),
554
545
  wv: 0,
555
- parent: i ?? D,
546
+ parent: n ?? N,
556
547
  ac: null
557
548
  };
558
549
  }
559
550
  // @__NO_SIDE_EFFECTS__
560
- function Dn(e, t) {
551
+ function Si(e, t, n) {
561
552
  let i = (
562
553
  /** @type {Effect | null} */
563
- D
554
+ N
564
555
  );
565
- i === null && rn();
566
- var n = (
556
+ i === null && oi();
557
+ var s = (
567
558
  /** @type {Boundary} */
568
559
  i.b
569
- ), s = (
560
+ ), r = (
570
561
  /** @type {Promise<V>} */
571
562
  /** @type {unknown} */
572
563
  void 0
573
- ), r = ci(
564
+ ), o = dn(
574
565
  /** @type {V} */
575
- R
576
- ), o = !w, l = /* @__PURE__ */ new Map();
577
- return Hn(() => {
578
- var f;
566
+ P
567
+ ), l = !w, a = /* @__PURE__ */ new Map();
568
+ return ji(() => {
569
+ var p;
579
570
  var u = Qe();
580
- s = u.promise;
571
+ r = u.promise;
581
572
  try {
582
573
  Promise.resolve(e()).then(u.resolve, u.reject).then(() => {
583
- a === N && a.committed && a.deactivate(), qt();
574
+ c === S && c.committed && c.deactivate(), qt();
584
575
  });
585
- } catch (h) {
586
- u.reject(h), qt();
576
+ } catch (C) {
577
+ u.reject(C), qt();
587
578
  }
588
- var a = (
579
+ var c = (
589
580
  /** @type {Batch} */
590
- N
581
+ S
591
582
  );
592
- if (o) {
593
- var c = !n.is_pending();
594
- n.update_pending_count(1), a.increment(c), (f = l.get(a)) == null || f.reject(bt), l.delete(a), l.set(a, u);
583
+ if (l) {
584
+ var d = s.is_rendered();
585
+ s.update_pending_count(1), c.increment(d), (p = a.get(c)) == null || p.reject(wt), a.delete(c), a.set(c, u);
595
586
  }
596
- const d = (h, C = void 0) => {
597
- if (a.activate(), C)
598
- C !== bt && (r.f |= nt, ge(r, C));
587
+ const f = (C, y = void 0) => {
588
+ if (c.activate(), y)
589
+ y !== wt && (o.f |= et, Ce(o, y));
599
590
  else {
600
- (r.f & nt) !== 0 && (r.f ^= nt), ge(r, h);
601
- for (const [b, v] of l) {
602
- if (l.delete(b), b === a) break;
603
- v.reject(bt);
591
+ (o.f & et) !== 0 && (o.f ^= et), Ce(o, C);
592
+ for (const [b, g] of a) {
593
+ if (a.delete(b), b === c) break;
594
+ g.reject(wt);
604
595
  }
605
596
  }
606
- o && (n.update_pending_count(-1), a.decrement(c));
597
+ l && (s.update_pending_count(-1), c.decrement(d));
607
598
  };
608
- u.promise.then(d, (h) => d(null, h || "unknown"));
609
- }), fi(() => {
610
- for (const u of l.values())
611
- u.reject(bt);
599
+ u.promise.then(f, (C) => f(null, C || "unknown"));
600
+ }), pn(() => {
601
+ for (const u of a.values())
602
+ u.reject(wt);
612
603
  }), new Promise((u) => {
613
- function a(c) {
614
- function d() {
615
- c === s ? u(r) : a(s);
604
+ function c(d) {
605
+ function f() {
606
+ d === r ? u(o) : c(r);
616
607
  }
617
- c.then(d, d);
608
+ d.then(f, f);
618
609
  }
619
- a(s);
610
+ c(r);
620
611
  });
621
612
  }
622
613
  // @__NO_SIDE_EFFECTS__
623
- function An(e) {
614
+ function Ti(e) {
624
615
  const t = /* @__PURE__ */ Ne(e);
625
- return t.equals = Cn, t;
616
+ return t.equals = gi, t;
626
617
  }
627
- function li(e) {
618
+ function an(e) {
628
619
  var t = e.effects;
629
620
  if (t !== null) {
630
621
  e.effects = null;
631
- for (var i = 0; i < t.length; i += 1)
632
- _t(
622
+ for (var n = 0; n < t.length; n += 1)
623
+ gt(
633
624
  /** @type {Effect} */
634
- t[i]
625
+ t[n]
635
626
  );
636
627
  }
637
628
  }
638
- function Ln(e) {
629
+ function Pi(e) {
639
630
  for (var t = e.parent; t !== null; ) {
640
- if ((t.f & M) === 0)
641
- return (t.f & et) === 0 ? (
631
+ if ((t.f & k) === 0)
632
+ return (t.f & J) === 0 ? (
642
633
  /** @type {Effect} */
643
634
  t
644
635
  ) : null;
@@ -647,162 +638,164 @@ function Ln(e) {
647
638
  return null;
648
639
  }
649
640
  function De(e) {
650
- var t, i = D;
651
- rt(Ln(e));
641
+ var t, n = N;
642
+ st(Pi(e));
652
643
  try {
653
- e.f &= ~pt, li(e), t = wi(e);
644
+ e.f &= ~Ct, an(e), t = En(e);
654
645
  } finally {
655
- rt(i);
646
+ st(n);
656
647
  }
657
648
  return t;
658
649
  }
659
- function ai(e) {
650
+ function un(e) {
660
651
  var t = De(e);
661
- if (e.equals(t) || (N != null && N.is_fork || (e.v = t), e.wv = vi()), !yt)
662
- if (P !== null)
663
- ($t() || N != null && N.is_fork) && P.set(e, t);
664
- else {
665
- var i = (e.f & q) === 0 ? Q : B;
666
- H(e, i);
667
- }
652
+ if (!e.equals(t) && (e.wv = wn(), (!(S != null && S.is_fork) || e.deps === null) && (e.v = t, e.deps === null))) {
653
+ B(e, U);
654
+ return;
655
+ }
656
+ it || (R !== null ? (hn() || S != null && S.is_fork) && R.set(e, t) : Ie(e));
668
657
  }
669
- let Ce = /* @__PURE__ */ new Set();
670
- const st = /* @__PURE__ */ new Map();
671
- let ui = !1;
672
- function ci(e, t) {
673
- var i = {
658
+ let _e = /* @__PURE__ */ new Set();
659
+ const nt = /* @__PURE__ */ new Map();
660
+ let cn = !1;
661
+ function dn(e, t) {
662
+ var n = {
674
663
  f: 0,
675
664
  // TODO ideally we could skip this altogether, but it causes type errors
676
665
  v: e,
677
666
  reactions: null,
678
- equals: ei,
667
+ equals: tn,
679
668
  rv: 0,
680
669
  wv: 0
681
670
  };
682
- return i;
671
+ return n;
683
672
  }
684
673
  // @__NO_SIDE_EFFECTS__
685
- function z(e, t) {
686
- const i = ci(e);
687
- return Gn(i), i;
674
+ function G(e, t) {
675
+ const n = dn(e);
676
+ return Yi(n), n;
688
677
  }
689
- function W(e, t, i = !1) {
678
+ function V(e, t, n = !1) {
690
679
  w !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
691
680
  // to ensure we error if state is set inside an inspect effect
692
- (!X || (w.f & Oe) !== 0) && ii() && (w.f & (M | Ct | Ie | Oe)) !== 0 && !(F != null && F.includes(e)) && hn();
693
- let n = i ? It(t) : t;
694
- return ge(e, n);
681
+ (!q || (w.f & Oe) !== 0) && en() && (w.f & (k | mt | we | Oe)) !== 0 && !(x != null && x.includes(e)) && pi();
682
+ let i = n ? Et(t) : t;
683
+ return Ce(e, i);
695
684
  }
696
- function ge(e, t) {
685
+ function Ce(e, t) {
697
686
  if (!e.equals(t)) {
698
- var i = e.v;
699
- yt ? st.set(e, t) : st.set(e, i), e.v = t;
700
- var n = Yt.ensure();
701
- n.capture(e, i), (e.f & M) !== 0 && ((e.f & j) !== 0 && De(
702
- /** @type {Derived} */
703
- e
704
- ), H(e, (e.f & q) !== 0 ? B : Q)), e.wv = vi(), di(e, j), D !== null && (D.f & B) !== 0 && (D.f & (gt | Tt)) === 0 && (G === null ? zn([e]) : G.push(e)), !n.is_fork && Ce.size > 0 && !ui && Sn();
687
+ var n = e.v;
688
+ it ? nt.set(e, t) : nt.set(e, n), e.v = t;
689
+ var i = Yt.ensure();
690
+ if (i.capture(e, n), (e.f & k) !== 0) {
691
+ const s = (
692
+ /** @type {Derived} */
693
+ e
694
+ );
695
+ (e.f & W) !== 0 && De(s), Ie(s);
696
+ }
697
+ e.wv = wn(), fn(e, W), N !== null && (N.f & U) !== 0 && (N.f & (yt | Pt)) === 0 && (j === null ? qi([e]) : j.push(e)), !i.is_fork && _e.size > 0 && !cn && Oi();
705
698
  }
706
699
  return t;
707
700
  }
708
- function Sn() {
709
- ui = !1;
710
- var e = dt;
711
- Xt(!0);
712
- const t = Array.from(Ce);
701
+ function Oi() {
702
+ cn = !1;
703
+ var e = ht;
704
+ $t(!0);
705
+ const t = Array.from(_e);
713
706
  try {
714
- for (const i of t)
715
- (i.f & B) !== 0 && H(i, Q), Bt(i) && Ut(i);
707
+ for (const n of t)
708
+ (n.f & U) !== 0 && B(n, rt), xt(n) && Mt(n);
716
709
  } finally {
717
- Xt(e);
710
+ $t(e);
718
711
  }
719
- Ce.clear();
712
+ _e.clear();
720
713
  }
721
- function ie(e) {
722
- W(e, e.v + 1);
714
+ function ee(e) {
715
+ V(e, e.v + 1);
723
716
  }
724
- function di(e, t) {
725
- var i = e.reactions;
726
- if (i !== null)
727
- for (var n = i.length, s = 0; s < n; s++) {
728
- var r = i[s], o = r.f, l = (o & j) === 0;
729
- if (l && H(r, t), (o & M) !== 0) {
730
- var u = (
717
+ function fn(e, t) {
718
+ var n = e.reactions;
719
+ if (n !== null)
720
+ for (var i = n.length, s = 0; s < i; s++) {
721
+ var r = n[s], o = r.f, l = (o & W) === 0;
722
+ if (l && B(r, t), (o & k) !== 0) {
723
+ var a = (
731
724
  /** @type {Derived} */
732
725
  r
733
726
  );
734
- P == null || P.delete(u), (o & pt) === 0 && (o & q && (r.f |= pt), di(u, Q));
735
- } else l && ((o & Ct) !== 0 && Y !== null && Y.add(
727
+ R == null || R.delete(a), (o & Ct) === 0 && (o & z && (r.f |= Ct), fn(a, rt));
728
+ } else l && ((o & mt) !== 0 && Y !== null && Y.add(
736
729
  /** @type {Effect} */
737
730
  r
738
- ), St(
731
+ ), Tt(
739
732
  /** @type {Effect} */
740
733
  r
741
734
  ));
742
735
  }
743
736
  }
744
- function It(e) {
745
- if (typeof e != "object" || e === null || ct in e)
737
+ function Et(e) {
738
+ if (typeof e != "object" || e === null || ft in e)
746
739
  return e;
747
740
  const t = Xe(e);
748
- if (t !== Zi && t !== Ji)
741
+ if (t !== ti && t !== ei)
749
742
  return e;
750
- var i = /* @__PURE__ */ new Map(), n = $e(e), s = /* @__PURE__ */ z(0), r = ft, o = (l) => {
751
- if (ft === r)
743
+ var n = /* @__PURE__ */ new Map(), i = $e(e), s = /* @__PURE__ */ G(0), r = pt, o = (l) => {
744
+ if (pt === r)
752
745
  return l();
753
- var u = w, a = ft;
754
- J(null), Ue(r);
746
+ var a = w, u = pt;
747
+ Q(null), Ue(r);
755
748
  var c = l();
756
- return J(u), Ue(a), c;
749
+ return Q(a), Ue(u), c;
757
750
  };
758
- return n && i.set("length", /* @__PURE__ */ z(
751
+ return i && n.set("length", /* @__PURE__ */ G(
759
752
  /** @type {any[]} */
760
753
  e.length
761
754
  )), new Proxy(
762
755
  /** @type {any} */
763
756
  e,
764
757
  {
765
- defineProperty(l, u, a) {
766
- (!("value" in a) || a.configurable === !1 || a.enumerable === !1 || a.writable === !1) && dn();
767
- var c = i.get(u);
758
+ defineProperty(l, a, u) {
759
+ (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && fi();
760
+ var c = n.get(a);
768
761
  return c === void 0 ? c = o(() => {
769
- var d = /* @__PURE__ */ z(a.value);
770
- return i.set(u, d), d;
771
- }) : W(c, a.value, !0), !0;
762
+ var d = /* @__PURE__ */ G(u.value);
763
+ return n.set(a, d), d;
764
+ }) : V(c, u.value, !0), !0;
772
765
  },
773
- deleteProperty(l, u) {
774
- var a = i.get(u);
775
- if (a === void 0) {
776
- if (u in l) {
777
- const c = o(() => /* @__PURE__ */ z(R));
778
- i.set(u, c), ie(s);
766
+ deleteProperty(l, a) {
767
+ var u = n.get(a);
768
+ if (u === void 0) {
769
+ if (a in l) {
770
+ const c = o(() => /* @__PURE__ */ G(P));
771
+ n.set(a, c), ee(s);
779
772
  }
780
773
  } else
781
- W(a, R), ie(s);
774
+ V(u, P), ee(s);
782
775
  return !0;
783
776
  },
784
- get(l, u, a) {
785
- var h;
786
- if (u === ct)
777
+ get(l, a, u) {
778
+ var p;
779
+ if (a === ft)
787
780
  return e;
788
- var c = i.get(u), d = u in l;
789
- if (c === void 0 && (!d || (h = jt(l, u)) != null && h.writable) && (c = o(() => {
790
- var C = It(d ? l[u] : R), b = /* @__PURE__ */ z(C);
791
- return b;
792
- }), i.set(u, c)), c !== void 0) {
781
+ var c = n.get(a), d = a in l;
782
+ if (c === void 0 && (!d || (p = Wt(l, a)) != null && p.writable) && (c = o(() => {
783
+ var C = Et(d ? l[a] : P), y = /* @__PURE__ */ G(C);
784
+ return y;
785
+ }), n.set(a, c)), c !== void 0) {
793
786
  var f = I(c);
794
- return f === R ? void 0 : f;
787
+ return f === P ? void 0 : f;
795
788
  }
796
- return Reflect.get(l, u, a);
789
+ return Reflect.get(l, a, u);
797
790
  },
798
- getOwnPropertyDescriptor(l, u) {
799
- var a = Reflect.getOwnPropertyDescriptor(l, u);
800
- if (a && "value" in a) {
801
- var c = i.get(u);
802
- c && (a.value = I(c));
803
- } else if (a === void 0) {
804
- var d = i.get(u), f = d == null ? void 0 : d.v;
805
- if (d !== void 0 && f !== R)
791
+ getOwnPropertyDescriptor(l, a) {
792
+ var u = Reflect.getOwnPropertyDescriptor(l, a);
793
+ if (u && "value" in u) {
794
+ var c = n.get(a);
795
+ c && (u.value = I(c));
796
+ } else if (u === void 0) {
797
+ var d = n.get(a), f = d == null ? void 0 : d.v;
798
+ if (d !== void 0 && f !== P)
806
799
  return {
807
800
  enumerable: !0,
808
801
  configurable: !0,
@@ -810,148 +803,148 @@ function It(e) {
810
803
  writable: !0
811
804
  };
812
805
  }
813
- return a;
806
+ return u;
814
807
  },
815
- has(l, u) {
808
+ has(l, a) {
816
809
  var f;
817
- if (u === ct)
810
+ if (a === ft)
818
811
  return !0;
819
- var a = i.get(u), c = a !== void 0 && a.v !== R || Reflect.has(l, u);
820
- if (a !== void 0 || D !== null && (!c || (f = jt(l, u)) != null && f.writable)) {
821
- a === void 0 && (a = o(() => {
822
- var h = c ? It(l[u]) : R, C = /* @__PURE__ */ z(h);
812
+ var u = n.get(a), c = u !== void 0 && u.v !== P || Reflect.has(l, a);
813
+ if (u !== void 0 || N !== null && (!c || (f = Wt(l, a)) != null && f.writable)) {
814
+ u === void 0 && (u = o(() => {
815
+ var p = c ? Et(l[a]) : P, C = /* @__PURE__ */ G(p);
823
816
  return C;
824
- }), i.set(u, a));
825
- var d = I(a);
826
- if (d === R)
817
+ }), n.set(a, u));
818
+ var d = I(u);
819
+ if (d === P)
827
820
  return !1;
828
821
  }
829
822
  return c;
830
823
  },
831
- set(l, u, a, c) {
832
- var p;
833
- var d = i.get(u), f = u in l;
834
- if (n && u === "length")
835
- for (var h = a; h < /** @type {Source<number>} */
836
- d.v; h += 1) {
837
- var C = i.get(h + "");
838
- C !== void 0 ? W(C, R) : h in l && (C = o(() => /* @__PURE__ */ z(R)), i.set(h + "", C));
824
+ set(l, a, u, c) {
825
+ var h;
826
+ var d = n.get(a), f = a in l;
827
+ if (i && a === "length")
828
+ for (var p = u; p < /** @type {Source<number>} */
829
+ d.v; p += 1) {
830
+ var C = n.get(p + "");
831
+ C !== void 0 ? V(C, P) : p in l && (C = o(() => /* @__PURE__ */ G(P)), n.set(p + "", C));
839
832
  }
840
833
  if (d === void 0)
841
- (!f || (p = jt(l, u)) != null && p.writable) && (d = o(() => /* @__PURE__ */ z(void 0)), W(d, It(a)), i.set(u, d));
834
+ (!f || (h = Wt(l, a)) != null && h.writable) && (d = o(() => /* @__PURE__ */ G(void 0)), V(d, Et(u)), n.set(a, d));
842
835
  else {
843
- f = d.v !== R;
844
- var b = o(() => It(a));
845
- W(d, b);
836
+ f = d.v !== P;
837
+ var y = o(() => Et(u));
838
+ V(d, y);
846
839
  }
847
- var v = Reflect.getOwnPropertyDescriptor(l, u);
848
- if (v != null && v.set && v.set.call(c, a), !f) {
849
- if (n && typeof u == "string") {
840
+ var b = Reflect.getOwnPropertyDescriptor(l, a);
841
+ if (b != null && b.set && b.set.call(c, u), !f) {
842
+ if (i && typeof a == "string") {
850
843
  var g = (
851
844
  /** @type {Source<number>} */
852
- i.get("length")
853
- ), m = Number(u);
854
- Number.isInteger(m) && m >= g.v && W(g, m + 1);
845
+ n.get("length")
846
+ ), m = Number(a);
847
+ Number.isInteger(m) && m >= g.v && V(g, m + 1);
855
848
  }
856
- ie(s);
849
+ ee(s);
857
850
  }
858
851
  return !0;
859
852
  },
860
853
  ownKeys(l) {
861
854
  I(s);
862
- var u = Reflect.ownKeys(l).filter((d) => {
863
- var f = i.get(d);
864
- return f === void 0 || f.v !== R;
855
+ var a = Reflect.ownKeys(l).filter((d) => {
856
+ var f = n.get(d);
857
+ return f === void 0 || f.v !== P;
865
858
  });
866
- for (var [a, c] of i)
867
- c.v !== R && !(a in l) && u.push(a);
868
- return u;
859
+ for (var [u, c] of n)
860
+ c.v !== P && !(u in l) && a.push(u);
861
+ return a;
869
862
  },
870
863
  setPrototypeOf() {
871
- fn();
864
+ hi();
872
865
  }
873
866
  }
874
867
  );
875
868
  }
876
869
  function ke(e) {
877
870
  try {
878
- if (e !== null && typeof e == "object" && ct in e)
879
- return e[ct];
871
+ if (e !== null && typeof e == "object" && ft in e)
872
+ return e[ft];
880
873
  } catch {
881
874
  }
882
875
  return e;
883
876
  }
884
- function Tn(e, t) {
877
+ function Ri(e, t) {
885
878
  return Object.is(ke(e), ke(t));
886
879
  }
887
- var Pn, On, Rn;
880
+ var ki, Mi, Ui;
888
881
  // @__NO_SIDE_EFFECTS__
889
- function kn(e) {
882
+ function xi(e) {
890
883
  return (
891
884
  /** @type {TemplateNode | null} */
892
- On.call(e)
885
+ Mi.call(e)
893
886
  );
894
887
  }
895
888
  // @__NO_SIDE_EFFECTS__
896
- function Mn(e) {
889
+ function Bi(e) {
897
890
  return (
898
891
  /** @type {TemplateNode | null} */
899
- Rn.call(e)
892
+ Ui.call(e)
900
893
  );
901
894
  }
902
- function Un(e, t) {
895
+ function Fi(e, t) {
903
896
  if (t) {
904
- const i = document.body;
905
- e.autofocus = !0, te(() => {
906
- document.activeElement === i && e.focus();
897
+ const n = document.body;
898
+ e.autofocus = !0, Jt(() => {
899
+ document.activeElement === n && e.focus();
907
900
  });
908
901
  }
909
902
  }
910
903
  function Ae(e) {
911
- var t = w, i = D;
912
- J(null), rt(null);
904
+ var t = w, n = N;
905
+ Q(null), st(null);
913
906
  try {
914
907
  return e();
915
908
  } finally {
916
- J(t), rt(i);
909
+ Q(t), st(n);
917
910
  }
918
911
  }
919
- function xn(e) {
920
- D === null && (w === null && an(), ln()), yt && on();
912
+ function Hi(e) {
913
+ N === null && (w === null && ui(), ai()), it && li();
921
914
  }
922
- function Bn(e, t) {
923
- var i = t.last;
924
- i === null ? t.last = t.first = e : (i.next = e, e.prev = i, t.last = e);
915
+ function Vi(e, t) {
916
+ var n = t.last;
917
+ n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
925
918
  }
926
- function mt(e, t, i) {
927
- var n = D;
928
- n !== null && (n.f & Et) !== 0 && (e |= Et);
919
+ function vt(e, t, n) {
920
+ var i = N;
921
+ i !== null && (i.f & Nt) !== 0 && (e |= Nt);
929
922
  var s = {
930
- ctx: Z,
923
+ ctx: X,
931
924
  deps: null,
932
925
  nodes: null,
933
- f: e | j | q,
926
+ f: e | W | z,
934
927
  first: null,
935
928
  fn: t,
936
929
  last: null,
937
930
  next: null,
938
- parent: n,
939
- b: n && n.b,
931
+ parent: i,
932
+ b: i && i.b,
940
933
  prev: null,
941
934
  teardown: null,
942
935
  wv: 0,
943
936
  ac: null
944
937
  };
945
- if (i)
938
+ if (n)
946
939
  try {
947
- Ut(s), s.f |= we;
940
+ Mt(s), s.f |= be;
948
941
  } catch (l) {
949
- throw _t(s), l;
942
+ throw gt(s), l;
950
943
  }
951
- else t !== null && St(s);
944
+ else t !== null && Tt(s);
952
945
  var r = s;
953
- if (i && r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
954
- (r.f & Jt) === 0 && (r = r.first, (e & Ct) !== 0 && (e & Pe) !== 0 && r !== null && (r.f |= Pe)), r !== null && (r.parent = n, n !== null && Bn(r, n), w !== null && (w.f & M) !== 0 && (e & Tt) === 0)) {
946
+ if (n && r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
947
+ (r.f & Zt) === 0 && (r = r.first, (e & mt) !== 0 && (e & Pe) !== 0 && r !== null && (r.f |= Pe)), r !== null && (r.parent = i, i !== null && Vi(r, i), w !== null && (w.f & k) !== 0 && (e & Pt) === 0)) {
955
948
  var o = (
956
949
  /** @type {Derived} */
957
950
  w
@@ -960,264 +953,273 @@ function mt(e, t, i) {
960
953
  }
961
954
  return s;
962
955
  }
963
- function $t() {
964
- return w !== null && !X;
956
+ function hn() {
957
+ return w !== null && !q;
965
958
  }
966
- function fi(e) {
967
- const t = mt(Ze, null, !1);
968
- return H(t, B), t.teardown = e, t;
959
+ function pn(e) {
960
+ const t = vt(ye, null, !1);
961
+ return B(t, U), t.teardown = e, t;
969
962
  }
970
- function Fn(e) {
971
- xn();
963
+ function Wi(e) {
964
+ Hi();
972
965
  var t = (
973
966
  /** @type {Effect} */
974
- D.f
975
- ), i = !w && (t & gt) !== 0 && (t & we) === 0;
976
- if (i) {
977
- var n = (
967
+ N.f
968
+ ), n = !w && (t & yt) !== 0 && (t & be) === 0;
969
+ if (n) {
970
+ var i = (
978
971
  /** @type {ComponentContext} */
979
- Z
972
+ X
980
973
  );
981
- (n.e ?? (n.e = [])).push(e);
974
+ (i.e ?? (i.e = [])).push(e);
982
975
  } else
983
- return hi(e);
976
+ return _n(e);
984
977
  }
985
- function hi(e) {
986
- return mt(ve | en, e, !1);
978
+ function _n(e) {
979
+ return vt(Gt | ii, e, !1);
987
980
  }
988
981
  function Le(e) {
989
- return mt(ve, e, !1);
982
+ return vt(Gt, e, !1);
990
983
  }
991
- function Hn(e) {
992
- return mt(Ie | Jt, e, !0);
984
+ function ji(e) {
985
+ return vt(we | Zt, e, !0);
993
986
  }
994
- function Vn(e, t = 0) {
995
- return mt(Ze | t, e, !0);
987
+ function Gi(e, t = 0) {
988
+ return vt(ye | t, e, !0);
996
989
  }
997
- function pi(e, t = 0) {
998
- var i = mt(Je | t, e, !0);
999
- return i;
990
+ function Cn(e, t = 0) {
991
+ var n = vt(ve | t, e, !0);
992
+ return n;
1000
993
  }
1001
- function _i(e) {
1002
- return mt(gt | Jt, e, !0);
994
+ function gn(e) {
995
+ return vt(yt | Zt, e, !0);
1003
996
  }
1004
- function Ci(e) {
997
+ function mn(e) {
1005
998
  var t = e.teardown;
1006
999
  if (t !== null) {
1007
- const i = yt, n = w;
1008
- Me(!0), J(null);
1000
+ const n = it, i = w;
1001
+ Me(!0), Q(null);
1009
1002
  try {
1010
1003
  t.call(null);
1011
1004
  } finally {
1012
- Me(i), J(n);
1005
+ Me(n), Q(i);
1013
1006
  }
1014
1007
  }
1015
1008
  }
1016
- function gi(e, t = !1) {
1017
- var i = e.first;
1018
- for (e.first = e.last = null; i !== null; ) {
1019
- const s = i.ac;
1009
+ function yn(e, t = !1) {
1010
+ var n = e.first;
1011
+ for (e.first = e.last = null; n !== null; ) {
1012
+ const s = n.ac;
1020
1013
  s !== null && Ae(() => {
1021
- s.abort(bt);
1014
+ s.abort(wt);
1022
1015
  });
1023
- var n = i.next;
1024
- (i.f & Tt) !== 0 ? i.parent = null : _t(i, t), i = n;
1016
+ var i = n.next;
1017
+ (n.f & Pt) !== 0 ? n.parent = null : gt(n, t), n = i;
1025
1018
  }
1026
1019
  }
1027
- function Wn(e) {
1020
+ function zi(e) {
1028
1021
  for (var t = e.first; t !== null; ) {
1029
- var i = t.next;
1030
- (t.f & gt) === 0 && _t(t), t = i;
1022
+ var n = t.next;
1023
+ (t.f & yt) === 0 && gt(t), t = n;
1031
1024
  }
1032
1025
  }
1033
- function _t(e, t = !0) {
1034
- var i = !1;
1035
- (t || (e.f & ti) !== 0) && e.nodes !== null && e.nodes.end !== null && (jn(
1026
+ function gt(e, t = !0) {
1027
+ var n = !1;
1028
+ (t || (e.f & Je) !== 0) && e.nodes !== null && e.nodes.end !== null && (Ki(
1036
1029
  e.nodes.start,
1037
1030
  /** @type {TemplateNode} */
1038
1031
  e.nodes.end
1039
- ), i = !0), gi(e, t && !i), Qt(e, 0), H(e, et);
1040
- var n = e.nodes && e.nodes.t;
1041
- if (n !== null)
1042
- for (const r of n)
1032
+ ), n = !0), yn(e, t && !n), Xt(e, 0), B(e, J);
1033
+ var i = e.nodes && e.nodes.t;
1034
+ if (i !== null)
1035
+ for (const r of i)
1043
1036
  r.stop();
1044
- Ci(e);
1037
+ mn(e);
1045
1038
  var s = e.parent;
1046
- s !== null && s.first !== null && mi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1039
+ s !== null && s.first !== null && vn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1047
1040
  }
1048
- function jn(e, t) {
1041
+ function Ki(e, t) {
1049
1042
  for (; e !== null; ) {
1050
- var i = e === t ? null : /* @__PURE__ */ Mn(e);
1051
- e.remove(), e = i;
1043
+ var n = e === t ? null : /* @__PURE__ */ Bi(e);
1044
+ e.remove(), e = n;
1052
1045
  }
1053
1046
  }
1054
- function mi(e) {
1055
- var t = e.parent, i = e.prev, n = e.next;
1056
- i !== null && (i.next = n), n !== null && (n.prev = i), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = i));
1047
+ function vn(e) {
1048
+ var t = e.parent, n = e.prev, i = e.next;
1049
+ n !== null && (n.next = i), i !== null && (i.prev = n), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = n));
1057
1050
  }
1058
- let dt = !1;
1059
- function Xt(e) {
1060
- dt = e;
1051
+ let ht = !1;
1052
+ function $t(e) {
1053
+ ht = e;
1061
1054
  }
1062
- let yt = !1;
1055
+ let it = !1;
1063
1056
  function Me(e) {
1064
- yt = e;
1057
+ it = e;
1065
1058
  }
1066
- let w = null, X = !1;
1067
- function J(e) {
1059
+ let w = null, q = !1;
1060
+ function Q(e) {
1068
1061
  w = e;
1069
1062
  }
1070
- let D = null;
1071
- function rt(e) {
1072
- D = e;
1063
+ let N = null;
1064
+ function st(e) {
1065
+ N = e;
1073
1066
  }
1074
- let F = null;
1075
- function Gn(e) {
1076
- w !== null && (F === null ? F = [e] : F.push(e));
1067
+ let x = null;
1068
+ function Yi(e) {
1069
+ w !== null && (x === null ? x = [e] : x.push(e));
1077
1070
  }
1078
- let x = null, V = 0, G = null;
1079
- function zn(e) {
1080
- G = e;
1071
+ let F = null, H = 0, j = null;
1072
+ function qi(e) {
1073
+ j = e;
1081
1074
  }
1082
- let yi = 1, Mt = 0, ft = Mt;
1075
+ let bn = 1, ut = 0, pt = ut;
1083
1076
  function Ue(e) {
1084
- ft = e;
1077
+ pt = e;
1085
1078
  }
1086
- function vi() {
1087
- return ++yi;
1079
+ function wn() {
1080
+ return ++bn;
1088
1081
  }
1089
- function Bt(e) {
1082
+ function xt(e) {
1090
1083
  var t = e.f;
1091
- if ((t & j) !== 0)
1084
+ if ((t & W) !== 0)
1092
1085
  return !0;
1093
- if (t & M && (e.f &= ~pt), (t & Q) !== 0) {
1094
- var i = e.deps;
1095
- if (i !== null)
1096
- for (var n = i.length, s = 0; s < n; s++) {
1097
- var r = i[s];
1098
- if (Bt(
1099
- /** @type {Derived} */
1100
- r
1101
- ) && ai(
1102
- /** @type {Derived} */
1103
- r
1104
- ), r.wv > e.wv)
1105
- return !0;
1106
- }
1107
- (t & q) !== 0 && // During time traveling we don't want to reset the status so that
1086
+ if (t & k && (e.f &= ~Ct), (t & rt) !== 0) {
1087
+ for (var n = (
1088
+ /** @type {Value[]} */
1089
+ e.deps
1090
+ ), i = n.length, s = 0; s < i; s++) {
1091
+ var r = n[s];
1092
+ if (xt(
1093
+ /** @type {Derived} */
1094
+ r
1095
+ ) && un(
1096
+ /** @type {Derived} */
1097
+ r
1098
+ ), r.wv > e.wv)
1099
+ return !0;
1100
+ }
1101
+ (t & z) !== 0 && // During time traveling we don't want to reset the status so that
1108
1102
  // traversal of the graph in the other batches still happens
1109
- P === null && H(e, B);
1103
+ R === null && B(e, U);
1110
1104
  }
1111
1105
  return !1;
1112
1106
  }
1113
- function bi(e, t, i = !0) {
1114
- var n = e.reactions;
1115
- if (n !== null && !(F != null && F.includes(e)))
1116
- for (var s = 0; s < n.length; s++) {
1117
- var r = n[s];
1118
- (r.f & M) !== 0 ? bi(
1107
+ function In(e, t, n = !0) {
1108
+ var i = e.reactions;
1109
+ if (i !== null && !(x != null && x.includes(e)))
1110
+ for (var s = 0; s < i.length; s++) {
1111
+ var r = i[s];
1112
+ (r.f & k) !== 0 ? In(
1119
1113
  /** @type {Derived} */
1120
1114
  r,
1121
1115
  t,
1122
1116
  !1
1123
- ) : t === r && (i ? H(r, j) : (r.f & B) !== 0 && H(r, Q), St(
1117
+ ) : t === r && (n ? B(r, W) : (r.f & U) !== 0 && B(r, rt), Tt(
1124
1118
  /** @type {Effect} */
1125
1119
  r
1126
1120
  ));
1127
1121
  }
1128
1122
  }
1129
- function wi(e) {
1123
+ function En(e) {
1130
1124
  var C;
1131
- var t = x, i = V, n = G, s = w, r = F, o = Z, l = X, u = ft, a = e.f;
1132
- x = /** @type {null | Value[]} */
1133
- null, V = 0, G = null, w = (a & (gt | Tt)) === 0 ? e : null, F = null, zt(e.ctx), X = !1, ft = ++Mt, e.ac !== null && (Ae(() => {
1134
- e.ac.abort(bt);
1125
+ var t = F, n = H, i = j, s = w, r = x, o = X, l = q, a = pt, u = e.f;
1126
+ F = /** @type {null | Value[]} */
1127
+ null, H = 0, j = null, w = (u & (yt | Pt)) === 0 ? e : null, x = null, zt(e.ctx), q = !1, pt = ++ut, e.ac !== null && (Ae(() => {
1128
+ e.ac.abort(wt);
1135
1129
  }), e.ac = null);
1136
1130
  try {
1137
- e.f |= fe;
1131
+ e.f |= de;
1138
1132
  var c = (
1139
1133
  /** @type {Function} */
1140
1134
  e.fn
1141
1135
  ), d = c(), f = e.deps;
1142
- if (x !== null) {
1143
- var h;
1144
- if (Qt(e, V), f !== null && V > 0)
1145
- for (f.length = V + x.length, h = 0; h < x.length; h++)
1146
- f[V + h] = x[h];
1136
+ if (F !== null) {
1137
+ var p;
1138
+ if (Xt(e, H), f !== null && H > 0)
1139
+ for (f.length = H + F.length, p = 0; p < F.length; p++)
1140
+ f[H + p] = F[p];
1147
1141
  else
1148
- e.deps = f = x;
1149
- if ($t() && (e.f & q) !== 0)
1150
- for (h = V; h < f.length; h++)
1151
- ((C = f[h]).reactions ?? (C.reactions = [])).push(e);
1152
- } else f !== null && V < f.length && (Qt(e, V), f.length = V);
1153
- if (ii() && G !== null && !X && f !== null && (e.f & (M | Q | j)) === 0)
1154
- for (h = 0; h < /** @type {Source[]} */
1155
- G.length; h++)
1156
- bi(
1157
- G[h],
1142
+ e.deps = f = F;
1143
+ if (hn() && (e.f & z) !== 0)
1144
+ for (p = H; p < f.length; p++)
1145
+ ((C = f[p]).reactions ?? (C.reactions = [])).push(e);
1146
+ } else f !== null && H < f.length && (Xt(e, H), f.length = H);
1147
+ if (en() && j !== null && !q && f !== null && (e.f & (k | rt | W)) === 0)
1148
+ for (p = 0; p < /** @type {Source[]} */
1149
+ j.length; p++)
1150
+ In(
1151
+ j[p],
1158
1152
  /** @type {Effect} */
1159
1153
  e
1160
1154
  );
1161
- return s !== null && s !== e && (Mt++, G !== null && (n === null ? n = G : n.push(.../** @type {Source[]} */
1162
- G))), (e.f & nt) !== 0 && (e.f ^= nt), d;
1163
- } catch (b) {
1164
- return bn(b);
1155
+ if (s !== null && s !== e) {
1156
+ if (ut++, s.deps !== null)
1157
+ for (let y = 0; y < n; y += 1)
1158
+ s.deps[y].rv = ut;
1159
+ if (t !== null)
1160
+ for (const y of t)
1161
+ y.rv = ut;
1162
+ j !== null && (i === null ? i = j : i.push(.../** @type {Source[]} */
1163
+ j));
1164
+ }
1165
+ return (e.f & et) !== 0 && (e.f ^= et), d;
1166
+ } catch (y) {
1167
+ return wi(y);
1165
1168
  } finally {
1166
- e.f ^= fe, x = t, V = i, G = n, w = s, F = r, zt(o), X = l, ft = u;
1169
+ e.f ^= de, F = t, H = n, j = i, w = s, x = r, zt(o), q = l, pt = a;
1167
1170
  }
1168
1171
  }
1169
- function Kn(e, t) {
1170
- let i = t.reactions;
1171
- if (i !== null) {
1172
- var n = $i.call(i, e);
1173
- if (n !== -1) {
1174
- var s = i.length - 1;
1175
- s === 0 ? i = t.reactions = null : (i[n] = i[s], i.pop());
1172
+ function $i(e, t) {
1173
+ let n = t.reactions;
1174
+ if (n !== null) {
1175
+ var i = Qn.call(n, e);
1176
+ if (i !== -1) {
1177
+ var s = n.length - 1;
1178
+ s === 0 ? n = t.reactions = null : (n[i] = n[s], n.pop());
1176
1179
  }
1177
1180
  }
1178
- i === null && (t.f & M) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1181
+ if (n === null && (t.f & k) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1179
1182
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1180
1183
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1181
- (x === null || !x.includes(t)) && (H(t, Q), (t.f & q) !== 0 && (t.f ^= q, t.f &= ~pt), li(
1182
- /** @type {Derived} **/
1183
- t
1184
- ), Qt(
1185
- /** @type {Derived} **/
1186
- t,
1187
- 0
1188
- ));
1184
+ (F === null || !F.includes(t))) {
1185
+ var r = (
1186
+ /** @type {Derived} */
1187
+ t
1188
+ );
1189
+ (r.f & z) !== 0 && (r.f ^= z, r.f &= ~Ct), Ie(r), an(r), Xt(r, 0);
1190
+ }
1189
1191
  }
1190
- function Qt(e, t) {
1191
- var i = e.deps;
1192
- if (i !== null)
1193
- for (var n = t; n < i.length; n++)
1194
- Kn(e, i[n]);
1192
+ function Xt(e, t) {
1193
+ var n = e.deps;
1194
+ if (n !== null)
1195
+ for (var i = t; i < n.length; i++)
1196
+ $i(e, n[i]);
1195
1197
  }
1196
- function Ut(e) {
1198
+ function Mt(e) {
1197
1199
  var t = e.f;
1198
- if ((t & et) === 0) {
1199
- H(e, B);
1200
- var i = D, n = dt;
1201
- D = e, dt = !0;
1200
+ if ((t & J) === 0) {
1201
+ B(e, U);
1202
+ var n = N, i = ht;
1203
+ N = e, ht = !0;
1202
1204
  try {
1203
- (t & (Ct | Je)) !== 0 ? Wn(e) : gi(e), Ci(e);
1204
- var s = wi(e);
1205
- e.teardown = typeof s == "function" ? s : null, e.wv = yi;
1205
+ (t & (mt | ve)) !== 0 ? zi(e) : yn(e), mn(e);
1206
+ var s = En(e);
1207
+ e.teardown = typeof s == "function" ? s : null, e.wv = bn;
1206
1208
  var r;
1207
- de && gn && (e.f & j) !== 0 && e.deps;
1209
+ ce && mi && (e.f & W) !== 0 && e.deps;
1208
1210
  } finally {
1209
- dt = n, D = i;
1211
+ ht = i, N = n;
1210
1212
  }
1211
1213
  }
1212
1214
  }
1213
1215
  function I(e) {
1214
- var t = e.f, i = (t & M) !== 0;
1215
- if (w !== null && !X) {
1216
- var n = D !== null && (D.f & et) !== 0;
1217
- if (!n && !(F != null && F.includes(e))) {
1216
+ var t = e.f, n = (t & k) !== 0;
1217
+ if (w !== null && !q) {
1218
+ var i = N !== null && (N.f & J) !== 0;
1219
+ if (!i && !(x != null && x.includes(e))) {
1218
1220
  var s = w.deps;
1219
- if ((w.f & fe) !== 0)
1220
- e.rv < Mt && (e.rv = Mt, x === null && s !== null && s[V] === e ? V++ : x === null ? x = [e] : x.includes(e) || x.push(e));
1221
+ if ((w.f & de) !== 0)
1222
+ e.rv < ut && (e.rv = ut, F === null && s !== null && s[H] === e ? H++ : F === null ? F = [e] : F.push(e));
1221
1223
  else {
1222
1224
  (w.deps ?? (w.deps = [])).push(e);
1223
1225
  var r = e.reactions;
@@ -1225,170 +1227,168 @@ function I(e) {
1225
1227
  }
1226
1228
  }
1227
1229
  }
1228
- if (yt) {
1229
- if (st.has(e))
1230
- return st.get(e);
1231
- if (i) {
1232
- var o = (
1233
- /** @type {Derived} */
1234
- e
1235
- ), l = o.v;
1236
- return ((o.f & B) === 0 && o.reactions !== null || Ei(o)) && (l = De(o)), st.set(o, l), l;
1230
+ if (it && nt.has(e))
1231
+ return nt.get(e);
1232
+ if (n) {
1233
+ var o = (
1234
+ /** @type {Derived} */
1235
+ e
1236
+ );
1237
+ if (it) {
1238
+ var l = o.v;
1239
+ return ((o.f & U) === 0 && o.reactions !== null || Dn(o)) && (l = De(o)), nt.set(o, l), l;
1237
1240
  }
1238
- } else i && (!(P != null && P.has(e)) || N != null && N.is_fork && !$t()) && (o = /** @type {Derived} */
1239
- e, Bt(o) && ai(o), dt && $t() && (o.f & q) === 0 && Ii(o));
1240
- if (P != null && P.has(e))
1241
- return P.get(e);
1242
- if ((e.f & nt) !== 0)
1241
+ var a = (o.f & z) === 0 && !q && w !== null && (ht || (w.f & z) !== 0), u = o.deps === null;
1242
+ xt(o) && (a && (o.f |= z), un(o)), a && !u && Nn(o);
1243
+ }
1244
+ if (R != null && R.has(e))
1245
+ return R.get(e);
1246
+ if ((e.f & et) !== 0)
1243
1247
  throw e.v;
1244
1248
  return e.v;
1245
1249
  }
1246
- function Ii(e) {
1250
+ function Nn(e) {
1247
1251
  if (e.deps !== null) {
1248
- e.f ^= q;
1252
+ e.f |= z;
1249
1253
  for (const t of e.deps)
1250
- (t.reactions ?? (t.reactions = [])).push(e), (t.f & M) !== 0 && (t.f & q) === 0 && Ii(
1254
+ (t.reactions ?? (t.reactions = [])).push(e), (t.f & k) !== 0 && (t.f & z) === 0 && Nn(
1251
1255
  /** @type {Derived} */
1252
1256
  t
1253
1257
  );
1254
1258
  }
1255
1259
  }
1256
- function Ei(e) {
1257
- if (e.v === R) return !0;
1260
+ function Dn(e) {
1261
+ if (e.v === P) return !0;
1258
1262
  if (e.deps === null) return !1;
1259
1263
  for (const t of e.deps)
1260
- if (st.has(t) || (t.f & M) !== 0 && Ei(
1264
+ if (nt.has(t) || (t.f & k) !== 0 && Dn(
1261
1265
  /** @type {Derived} */
1262
1266
  t
1263
1267
  ))
1264
1268
  return !0;
1265
1269
  return !1;
1266
1270
  }
1267
- function Ni(e) {
1268
- var t = X;
1271
+ function An(e) {
1272
+ var t = q;
1269
1273
  try {
1270
- return X = !0, e();
1274
+ return q = !0, e();
1271
1275
  } finally {
1272
- X = t;
1276
+ q = t;
1273
1277
  }
1274
1278
  }
1275
- const Yn = -7169;
1276
- function H(e, t) {
1277
- e.f = e.f & Yn | t;
1278
- }
1279
- const qn = /* @__PURE__ */ new Set(), $n = /* @__PURE__ */ new Set();
1280
- function Xn(e, t, i, n = {}) {
1279
+ const Xi = /* @__PURE__ */ new Set(), Qi = /* @__PURE__ */ new Set();
1280
+ function Zi(e, t, n, i = {}) {
1281
1281
  function s(r) {
1282
- if (n.capture || Zn.call(t, r), !r.cancelBubble)
1283
- return Ae(() => i == null ? void 0 : i.call(this, r));
1282
+ if (i.capture || ts.call(t, r), !r.cancelBubble)
1283
+ return Ae(() => n == null ? void 0 : n.call(this, r));
1284
1284
  }
1285
- return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? te(() => {
1286
- t.addEventListener(e, s, n);
1287
- }) : t.addEventListener(e, s, n), s;
1285
+ return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? Jt(() => {
1286
+ t.addEventListener(e, s, i);
1287
+ }) : t.addEventListener(e, s, i), s;
1288
1288
  }
1289
- function Qn(e) {
1289
+ function Ji(e) {
1290
1290
  for (var t = 0; t < e.length; t++)
1291
- qn.add(e[t]);
1292
- for (var i of $n)
1293
- i(e);
1291
+ Xi.add(e[t]);
1292
+ for (var n of Qi)
1293
+ n(e);
1294
1294
  }
1295
1295
  let xe = null;
1296
- function Zn(e) {
1297
- var v;
1298
- var t = this, i = (
1296
+ function ts(e) {
1297
+ var b;
1298
+ var t = this, n = (
1299
1299
  /** @type {Node} */
1300
1300
  t.ownerDocument
1301
- ), n = e.type, s = ((v = e.composedPath) == null ? void 0 : v.call(e)) || [], r = (
1301
+ ), i = e.type, s = ((b = e.composedPath) == null ? void 0 : b.call(e)) || [], r = (
1302
1302
  /** @type {null | Element} */
1303
1303
  s[0] || e.target
1304
1304
  );
1305
1305
  xe = e;
1306
1306
  var o = 0, l = xe === e && e.__root;
1307
1307
  if (l) {
1308
- var u = s.indexOf(l);
1309
- if (u !== -1 && (t === document || t === /** @type {any} */
1308
+ var a = s.indexOf(l);
1309
+ if (a !== -1 && (t === document || t === /** @type {any} */
1310
1310
  window)) {
1311
1311
  e.__root = t;
1312
1312
  return;
1313
1313
  }
1314
- var a = s.indexOf(t);
1315
- if (a === -1)
1314
+ var u = s.indexOf(t);
1315
+ if (u === -1)
1316
1316
  return;
1317
- u <= a && (o = u);
1317
+ a <= u && (o = a);
1318
1318
  }
1319
1319
  if (r = /** @type {Element} */
1320
1320
  s[o] || e.target, r !== t) {
1321
- Xi(e, "currentTarget", {
1321
+ Zn(e, "currentTarget", {
1322
1322
  configurable: !0,
1323
1323
  get() {
1324
- return r || i;
1324
+ return r || n;
1325
1325
  }
1326
1326
  });
1327
- var c = w, d = D;
1328
- J(null), rt(null);
1327
+ var c = w, d = N;
1328
+ Q(null), st(null);
1329
1329
  try {
1330
- for (var f, h = []; r !== null; ) {
1330
+ for (var f, p = []; r !== null; ) {
1331
1331
  var C = r.assignedSlot || r.parentNode || /** @type {any} */
1332
1332
  r.host || null;
1333
1333
  try {
1334
- var b = r["__" + n];
1335
- b != null && (!/** @type {any} */
1334
+ var y = r["__" + i];
1335
+ y != null && (!/** @type {any} */
1336
1336
  r.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1337
1337
  // -> the target could not have been disabled because it emits the event in the first place
1338
- e.target === r) && b.call(r, e);
1338
+ e.target === r) && y.call(r, e);
1339
1339
  } catch (g) {
1340
- f ? h.push(g) : f = g;
1340
+ f ? p.push(g) : f = g;
1341
1341
  }
1342
1342
  if (e.cancelBubble || C === t || C === null)
1343
1343
  break;
1344
1344
  r = C;
1345
1345
  }
1346
1346
  if (f) {
1347
- for (let g of h)
1347
+ for (let g of p)
1348
1348
  queueMicrotask(() => {
1349
1349
  throw g;
1350
1350
  });
1351
1351
  throw f;
1352
1352
  }
1353
1353
  } finally {
1354
- e.__root = t, delete e.currentTarget, J(c), rt(d);
1354
+ e.__root = t, delete e.currentTarget, Q(c), st(d);
1355
1355
  }
1356
1356
  }
1357
1357
  }
1358
- function Jn(e) {
1358
+ function es(e) {
1359
1359
  var t = document.createElement("template");
1360
1360
  return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
1361
1361
  }
1362
- function ts(e, t) {
1363
- var i = (
1362
+ function ns(e, t) {
1363
+ var n = (
1364
1364
  /** @type {Effect} */
1365
- D
1365
+ N
1366
1366
  );
1367
- i.nodes === null && (i.nodes = { start: e, end: t, a: null, t: null });
1367
+ n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
1368
1368
  }
1369
1369
  // @__NO_SIDE_EFFECTS__
1370
- function es(e, t) {
1371
- var i = (t & Ki) !== 0, n, s = !e.startsWith("<!>");
1370
+ function is(e, t) {
1371
+ var n = (t & qn) !== 0, i, s = !e.startsWith("<!>");
1372
1372
  return () => {
1373
- n === void 0 && (n = Jn(s ? e : "<!>" + e), n = /** @type {TemplateNode} */
1374
- /* @__PURE__ */ kn(n));
1373
+ i === void 0 && (i = es(s ? e : "<!>" + e), i = /** @type {TemplateNode} */
1374
+ /* @__PURE__ */ xi(i));
1375
1375
  var r = (
1376
1376
  /** @type {TemplateNode} */
1377
- i || Pn ? document.importNode(n, !0) : n.cloneNode(!0)
1377
+ n || ki ? document.importNode(i, !0) : i.cloneNode(!0)
1378
1378
  );
1379
- return ts(r, r), r;
1379
+ return ns(r, r), r;
1380
1380
  };
1381
1381
  }
1382
- function is(e, t) {
1382
+ function ss(e, t) {
1383
1383
  e !== null && e.before(
1384
1384
  /** @type {Node} */
1385
1385
  t
1386
1386
  );
1387
1387
  }
1388
- function ns(e) {
1388
+ function rs(e) {
1389
1389
  return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
1390
1390
  }
1391
- const ss = [
1391
+ const os = [
1392
1392
  "beforeinput",
1393
1393
  "click",
1394
1394
  "change",
@@ -1413,10 +1413,10 @@ const ss = [
1413
1413
  "touchmove",
1414
1414
  "touchstart"
1415
1415
  ];
1416
- function rs(e) {
1417
- return ss.includes(e);
1416
+ function ls(e) {
1417
+ return os.includes(e);
1418
1418
  }
1419
- const os = {
1419
+ const as = {
1420
1420
  // no `class: 'className'` because we handle that separately
1421
1421
  formnovalidate: "formNoValidate",
1422
1422
  ismap: "isMap",
@@ -1431,143 +1431,143 @@ const os = {
1431
1431
  disablepictureinpicture: "disablePictureInPicture",
1432
1432
  disableremoteplayback: "disableRemotePlayback"
1433
1433
  };
1434
- function ls(e) {
1435
- return e = e.toLowerCase(), os[e] ?? e;
1434
+ function us(e) {
1435
+ return e = e.toLowerCase(), as[e] ?? e;
1436
1436
  }
1437
- function as(e, t) {
1438
- var i = void 0, n;
1439
- pi(() => {
1440
- i !== (i = t()) && (n && (_t(n), n = null), i && (n = _i(() => {
1437
+ function cs(e, t) {
1438
+ var n = void 0, i;
1439
+ Cn(() => {
1440
+ n !== (n = t()) && (i && (gt(i), i = null), n && (i = gn(() => {
1441
1441
  Le(() => (
1442
1442
  /** @type {(node: Element) => void} */
1443
- i(e)
1443
+ n(e)
1444
1444
  ));
1445
1445
  })));
1446
1446
  });
1447
1447
  }
1448
- function Di(e) {
1449
- var t, i, n = "";
1450
- if (typeof e == "string" || typeof e == "number") n += e;
1448
+ function Ln(e) {
1449
+ var t, n, i = "";
1450
+ if (typeof e == "string" || typeof e == "number") i += e;
1451
1451
  else if (typeof e == "object") if (Array.isArray(e)) {
1452
1452
  var s = e.length;
1453
- for (t = 0; t < s; t++) e[t] && (i = Di(e[t])) && (n && (n += " "), n += i);
1454
- } else for (i in e) e[i] && (n && (n += " "), n += i);
1455
- return n;
1453
+ for (t = 0; t < s; t++) e[t] && (n = Ln(e[t])) && (i && (i += " "), i += n);
1454
+ } else for (n in e) e[n] && (i && (i += " "), i += n);
1455
+ return i;
1456
1456
  }
1457
- function us() {
1458
- for (var e, t, i = 0, n = "", s = arguments.length; i < s; i++) (e = arguments[i]) && (t = Di(e)) && (n && (n += " "), n += t);
1459
- return n;
1457
+ function ds() {
1458
+ for (var e, t, n = 0, i = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (t = Ln(e)) && (i && (i += " "), i += t);
1459
+ return i;
1460
1460
  }
1461
- function cs(e) {
1462
- return typeof e == "object" ? us(e) : e ?? "";
1461
+ function fs(e) {
1462
+ return typeof e == "object" ? ds(e) : e ?? "";
1463
1463
  }
1464
1464
  const Be = [...`
1465
1465
  \r\f \v\uFEFF`];
1466
- function ds(e, t, i) {
1467
- var n = e == null ? "" : "" + e;
1468
- if (i) {
1469
- for (var s in i)
1470
- if (i[s])
1471
- n = n ? n + " " + s : s;
1472
- else if (n.length)
1473
- for (var r = s.length, o = 0; (o = n.indexOf(s, o)) >= 0; ) {
1466
+ function hs(e, t, n) {
1467
+ var i = e == null ? "" : "" + e;
1468
+ if (n) {
1469
+ for (var s in n)
1470
+ if (n[s])
1471
+ i = i ? i + " " + s : s;
1472
+ else if (i.length)
1473
+ for (var r = s.length, o = 0; (o = i.indexOf(s, o)) >= 0; ) {
1474
1474
  var l = o + r;
1475
- (o === 0 || Be.includes(n[o - 1])) && (l === n.length || Be.includes(n[l])) ? n = (o === 0 ? "" : n.substring(0, o)) + n.substring(l + 1) : o = l;
1475
+ (o === 0 || Be.includes(i[o - 1])) && (l === i.length || Be.includes(i[l])) ? i = (o === 0 ? "" : i.substring(0, o)) + i.substring(l + 1) : o = l;
1476
1476
  }
1477
1477
  }
1478
- return n === "" ? null : n;
1478
+ return i === "" ? null : i;
1479
1479
  }
1480
1480
  function Fe(e, t = !1) {
1481
- var i = t ? " !important;" : ";", n = "";
1481
+ var n = t ? " !important;" : ";", i = "";
1482
1482
  for (var s in e) {
1483
1483
  var r = e[s];
1484
- r != null && r !== "" && (n += " " + s + ": " + r + i);
1484
+ r != null && r !== "" && (i += " " + s + ": " + r + n);
1485
1485
  }
1486
- return n;
1486
+ return i;
1487
1487
  }
1488
1488
  function ne(e) {
1489
1489
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
1490
1490
  }
1491
- function fs(e, t) {
1491
+ function ps(e, t) {
1492
1492
  if (t) {
1493
- var i = "", n, s;
1494
- if (Array.isArray(t) ? (n = t[0], s = t[1]) : n = t, e) {
1493
+ var n = "", i, s;
1494
+ if (Array.isArray(t) ? (i = t[0], s = t[1]) : i = t, e) {
1495
1495
  e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1496
- var r = !1, o = 0, l = !1, u = [];
1497
- n && u.push(...Object.keys(n).map(ne)), s && u.push(...Object.keys(s).map(ne));
1498
- var a = 0, c = -1;
1499
- const b = e.length;
1500
- for (var d = 0; d < b; d++) {
1496
+ var r = !1, o = 0, l = !1, a = [];
1497
+ i && a.push(...Object.keys(i).map(ne)), s && a.push(...Object.keys(s).map(ne));
1498
+ var u = 0, c = -1;
1499
+ const y = e.length;
1500
+ for (var d = 0; d < y; d++) {
1501
1501
  var f = e[d];
1502
1502
  if (l ? f === "/" && e[d - 1] === "*" && (l = !1) : r ? r === f && (r = !1) : f === "/" && e[d + 1] === "*" ? l = !0 : f === '"' || f === "'" ? r = f : f === "(" ? o++ : f === ")" && o--, !l && r === !1 && o === 0) {
1503
1503
  if (f === ":" && c === -1)
1504
1504
  c = d;
1505
- else if (f === ";" || d === b - 1) {
1505
+ else if (f === ";" || d === y - 1) {
1506
1506
  if (c !== -1) {
1507
- var h = ne(e.substring(a, c).trim());
1508
- if (!u.includes(h)) {
1507
+ var p = ne(e.substring(u, c).trim());
1508
+ if (!a.includes(p)) {
1509
1509
  f !== ";" && d++;
1510
- var C = e.substring(a, d).trim();
1511
- i += " " + C + ";";
1510
+ var C = e.substring(u, d).trim();
1511
+ n += " " + C + ";";
1512
1512
  }
1513
1513
  }
1514
- a = d + 1, c = -1;
1514
+ u = d + 1, c = -1;
1515
1515
  }
1516
1516
  }
1517
1517
  }
1518
1518
  }
1519
- return n && (i += Fe(n)), s && (i += Fe(s, !0)), i = i.trim(), i === "" ? null : i;
1519
+ return i && (n += Fe(i)), s && (n += Fe(s, !0)), n = n.trim(), n === "" ? null : n;
1520
1520
  }
1521
1521
  return e == null ? null : String(e);
1522
1522
  }
1523
- function hs(e, t, i, n, s, r) {
1523
+ function _s(e, t, n, i, s, r) {
1524
1524
  var o = e.__className;
1525
- if (o !== i || o === void 0) {
1526
- var l = ds(i, n, r);
1527
- l == null ? e.removeAttribute("class") : t ? e.className = l : e.setAttribute("class", l), e.__className = i;
1525
+ if (o !== n || o === void 0) {
1526
+ var l = hs(n, i, r);
1527
+ l == null ? e.removeAttribute("class") : t ? e.className = l : e.setAttribute("class", l), e.__className = n;
1528
1528
  } else if (r && s !== r)
1529
- for (var u in r) {
1530
- var a = !!r[u];
1531
- (s == null || a !== !!s[u]) && e.classList.toggle(u, a);
1529
+ for (var a in r) {
1530
+ var u = !!r[a];
1531
+ (s == null || u !== !!s[a]) && e.classList.toggle(a, u);
1532
1532
  }
1533
1533
  return r;
1534
1534
  }
1535
- function se(e, t = {}, i, n) {
1536
- for (var s in i) {
1537
- var r = i[s];
1538
- t[s] !== r && (i[s] == null ? e.style.removeProperty(s) : e.style.setProperty(s, r, n));
1535
+ function ie(e, t = {}, n, i) {
1536
+ for (var s in n) {
1537
+ var r = n[s];
1538
+ t[s] !== r && (n[s] == null ? e.style.removeProperty(s) : e.style.setProperty(s, r, i));
1539
1539
  }
1540
1540
  }
1541
- function ps(e, t, i, n) {
1541
+ function Cs(e, t, n, i) {
1542
1542
  var s = e.__style;
1543
1543
  if (s !== t) {
1544
- var r = fs(t, n);
1544
+ var r = ps(t, i);
1545
1545
  r == null ? e.removeAttribute("style") : e.style.cssText = r, e.__style = t;
1546
- } else n && (Array.isArray(n) ? (se(e, i == null ? void 0 : i[0], n[0]), se(e, i == null ? void 0 : i[1], n[1], "important")) : se(e, i, n));
1547
- return n;
1546
+ } else i && (Array.isArray(i) ? (ie(e, n == null ? void 0 : n[0], i[0]), ie(e, n == null ? void 0 : n[1], i[1], "important")) : ie(e, n, i));
1547
+ return i;
1548
1548
  }
1549
- function me(e, t, i = !1) {
1549
+ function ge(e, t, n = !1) {
1550
1550
  if (e.multiple) {
1551
1551
  if (t == null)
1552
1552
  return;
1553
1553
  if (!$e(t))
1554
- return pn();
1555
- for (var n of e.options)
1556
- n.selected = t.includes(He(n));
1554
+ return _i();
1555
+ for (var i of e.options)
1556
+ i.selected = t.includes(He(i));
1557
1557
  return;
1558
1558
  }
1559
- for (n of e.options) {
1560
- var s = He(n);
1561
- if (Tn(s, t)) {
1562
- n.selected = !0;
1559
+ for (i of e.options) {
1560
+ var s = He(i);
1561
+ if (Ri(s, t)) {
1562
+ i.selected = !0;
1563
1563
  return;
1564
1564
  }
1565
1565
  }
1566
- (!i || t !== void 0) && (e.selectedIndex = -1);
1566
+ (!n || t !== void 0) && (e.selectedIndex = -1);
1567
1567
  }
1568
- function _s(e) {
1568
+ function gs(e) {
1569
1569
  var t = new MutationObserver(() => {
1570
- me(e, e.__value);
1570
+ ge(e, e.__value);
1571
1571
  });
1572
1572
  t.observe(e, {
1573
1573
  // Listen to option element changes
@@ -1579,87 +1579,87 @@ function _s(e) {
1579
1579
  // because that property is not reflected as an attribute)
1580
1580
  attributes: !0,
1581
1581
  attributeFilter: ["value"]
1582
- }), fi(() => {
1582
+ }), pn(() => {
1583
1583
  t.disconnect();
1584
1584
  });
1585
1585
  }
1586
1586
  function He(e) {
1587
1587
  return "__value" in e ? e.__value : e.value;
1588
1588
  }
1589
- const Pt = Symbol("class"), Ot = Symbol("style"), Ai = Symbol("is custom element"), Li = Symbol("is html");
1590
- function Cs(e, t) {
1589
+ const Ot = Symbol("class"), Rt = Symbol("style"), Sn = Symbol("is custom element"), Tn = Symbol("is html");
1590
+ function ms(e, t) {
1591
1591
  t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
1592
1592
  }
1593
- function Ve(e, t, i, n) {
1594
- var s = Si(e);
1595
- s[t] !== (s[t] = i) && (t === "loading" && (e[sn] = i), i == null ? e.removeAttribute(t) : typeof i != "string" && Ti(e).includes(t) ? e[t] = i : e.setAttribute(t, i));
1593
+ function Ve(e, t, n, i) {
1594
+ var s = Pn(e);
1595
+ s[t] !== (s[t] = n) && (t === "loading" && (e[ri] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && On(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
1596
1596
  }
1597
- function gs(e, t, i, n, s = !1, r = !1) {
1598
- var o = Si(e), l = o[Ai], u = !o[Li], a = t || {}, c = e.tagName === "OPTION";
1597
+ function ys(e, t, n, i, s = !1, r = !1) {
1598
+ var o = Pn(e), l = o[Sn], a = !o[Tn], u = t || {}, c = e.tagName === "OPTION";
1599
1599
  for (var d in t)
1600
- d in i || (i[d] = null);
1601
- i.class ? i.class = cs(i.class) : i[Pt] && (i.class = null), i[Ot] && (i.style ?? (i.style = null));
1602
- var f = Ti(e);
1603
- for (const p in i) {
1604
- let y = i[p];
1605
- if (c && p === "value" && y == null) {
1606
- e.value = e.__value = "", a[p] = y;
1600
+ d in n || (n[d] = null);
1601
+ n.class ? n.class = fs(n.class) : n[Ot] && (n.class = null), n[Rt] && (n.style ?? (n.style = null));
1602
+ var f = On(e);
1603
+ for (const h in n) {
1604
+ let v = n[h];
1605
+ if (c && h === "value" && v == null) {
1606
+ e.value = e.__value = "", u[h] = v;
1607
1607
  continue;
1608
1608
  }
1609
- if (p === "class") {
1610
- var h = e.namespaceURI === "http://www.w3.org/1999/xhtml";
1611
- hs(e, h, y, n, t == null ? void 0 : t[Pt], i[Pt]), a[p] = y, a[Pt] = i[Pt];
1609
+ if (h === "class") {
1610
+ var p = e.namespaceURI === "http://www.w3.org/1999/xhtml";
1611
+ _s(e, p, v, i, t == null ? void 0 : t[Ot], n[Ot]), u[h] = v, u[Ot] = n[Ot];
1612
1612
  continue;
1613
1613
  }
1614
- if (p === "style") {
1615
- ps(e, y, t == null ? void 0 : t[Ot], i[Ot]), a[p] = y, a[Ot] = i[Ot];
1614
+ if (h === "style") {
1615
+ Cs(e, v, t == null ? void 0 : t[Rt], n[Rt]), u[h] = v, u[Rt] = n[Rt];
1616
1616
  continue;
1617
1617
  }
1618
- var C = a[p];
1619
- if (!(y === C && !(y === void 0 && e.hasAttribute(p)))) {
1620
- a[p] = y;
1621
- var b = p[0] + p[1];
1622
- if (b !== "$$")
1623
- if (b === "on") {
1624
- const T = {}, ot = "$$" + p;
1625
- let O = p.slice(2);
1626
- var v = rs(O);
1627
- if (ns(O) && (O = O.slice(0, -7), T.capture = !0), !v && C) {
1628
- if (y != null) continue;
1629
- e.removeEventListener(O, a[ot], T), a[ot] = null;
1618
+ var C = u[h];
1619
+ if (!(v === C && !(v === void 0 && e.hasAttribute(h)))) {
1620
+ u[h] = v;
1621
+ var y = h[0] + h[1];
1622
+ if (y !== "$$")
1623
+ if (y === "on") {
1624
+ const T = {}, ot = "$$" + h;
1625
+ let O = h.slice(2);
1626
+ var b = ls(O);
1627
+ if (rs(O) && (O = O.slice(0, -7), T.capture = !0), !b && C) {
1628
+ if (v != null) continue;
1629
+ e.removeEventListener(O, u[ot], T), u[ot] = null;
1630
1630
  }
1631
- if (y != null)
1632
- if (v)
1633
- e[`__${O}`] = y, Qn([O]);
1631
+ if (v != null)
1632
+ if (b)
1633
+ e[`__${O}`] = v, Ji([O]);
1634
1634
  else {
1635
- let Mi = function(Ui) {
1636
- a[p].call(this, Ui);
1635
+ let xn = function(Bn) {
1636
+ u[h].call(this, Bn);
1637
1637
  };
1638
- a[ot] = Xn(O, e, Mi, T);
1638
+ u[ot] = Zi(O, e, xn, T);
1639
1639
  }
1640
- else v && (e[`__${O}`] = void 0);
1641
- } else if (p === "style")
1642
- Ve(e, p, y);
1643
- else if (p === "autofocus")
1644
- Un(
1640
+ else b && (e[`__${O}`] = void 0);
1641
+ } else if (h === "style")
1642
+ Ve(e, h, v);
1643
+ else if (h === "autofocus")
1644
+ Fi(
1645
1645
  /** @type {HTMLElement} */
1646
1646
  e,
1647
- !!y
1647
+ !!v
1648
1648
  );
1649
- else if (!l && (p === "__value" || p === "value" && y != null))
1650
- e.value = e.__value = y;
1651
- else if (p === "selected" && c)
1652
- Cs(
1649
+ else if (!l && (h === "__value" || h === "value" && v != null))
1650
+ e.value = e.__value = v;
1651
+ else if (h === "selected" && c)
1652
+ ms(
1653
1653
  /** @type {HTMLOptionElement} */
1654
1654
  e,
1655
- y
1655
+ v
1656
1656
  );
1657
1657
  else {
1658
- var g = p;
1659
- u || (g = ls(g));
1658
+ var g = h;
1659
+ a || (g = us(g));
1660
1660
  var m = g === "defaultValue" || g === "defaultChecked";
1661
- if (y == null && !l && !m)
1662
- if (o[p] = null, g === "value" || g === "checked") {
1661
+ if (v == null && !l && !m)
1662
+ if (o[h] = null, g === "value" || g === "checked") {
1663
1663
  let T = (
1664
1664
  /** @type {HTMLInputElement} */
1665
1665
  e
@@ -1673,161 +1673,161 @@ function gs(e, t, i, n, s = !1, r = !1) {
1673
1673
  T.removeAttribute(g), T.defaultChecked = O, T.checked = ot ? O : !1;
1674
1674
  }
1675
1675
  } else
1676
- e.removeAttribute(p);
1677
- else m || f.includes(g) && (l || typeof y != "string") ? (e[g] = y, g in o && (o[g] = R)) : typeof y != "function" && Ve(e, g, y);
1676
+ e.removeAttribute(h);
1677
+ else m || f.includes(g) && (l || typeof v != "string") ? (e[g] = v, g in o && (o[g] = P)) : typeof v != "function" && Ve(e, g, v);
1678
1678
  }
1679
1679
  }
1680
1680
  }
1681
- return a;
1681
+ return u;
1682
1682
  }
1683
- function ms(e, t, i = [], n = [], s = [], r, o = !1, l = !1) {
1684
- En(s, i, n, (u) => {
1685
- var a = void 0, c = {}, d = e.nodeName === "SELECT", f = !1;
1686
- if (pi(() => {
1687
- var C = t(...u.map(I)), b = gs(
1683
+ function vs(e, t, n = [], i = [], s = [], r, o = !1, l = !1) {
1684
+ Ai(s, n, i, (a) => {
1685
+ var u = void 0, c = {}, d = e.nodeName === "SELECT", f = !1;
1686
+ if (Cn(() => {
1687
+ var C = t(...a.map(I)), y = ys(
1688
1688
  e,
1689
- a,
1689
+ u,
1690
1690
  C,
1691
1691
  r,
1692
1692
  o,
1693
1693
  l
1694
1694
  );
1695
- f && d && "value" in C && me(
1695
+ f && d && "value" in C && ge(
1696
1696
  /** @type {HTMLSelectElement} */
1697
1697
  e,
1698
1698
  C.value
1699
1699
  );
1700
1700
  for (let g of Object.getOwnPropertySymbols(c))
1701
- C[g] || _t(c[g]);
1701
+ C[g] || gt(c[g]);
1702
1702
  for (let g of Object.getOwnPropertySymbols(C)) {
1703
- var v = C[g];
1704
- g.description === qi && (!a || v !== a[g]) && (c[g] && _t(c[g]), c[g] = _i(() => as(e, () => v))), b[g] = v;
1703
+ var b = C[g];
1704
+ g.description === Xn && (!u || b !== u[g]) && (c[g] && gt(c[g]), c[g] = gn(() => cs(e, () => b))), y[g] = b;
1705
1705
  }
1706
- a = b;
1706
+ u = y;
1707
1707
  }), d) {
1708
- var h = (
1708
+ var p = (
1709
1709
  /** @type {HTMLSelectElement} */
1710
1710
  e
1711
1711
  );
1712
1712
  Le(() => {
1713
- me(
1714
- h,
1713
+ ge(
1714
+ p,
1715
1715
  /** @type {Record<string | symbol, any>} */
1716
- a.value,
1716
+ u.value,
1717
1717
  !0
1718
- ), _s(h);
1718
+ ), gs(p);
1719
1719
  });
1720
1720
  }
1721
1721
  f = !0;
1722
1722
  });
1723
1723
  }
1724
- function Si(e) {
1724
+ function Pn(e) {
1725
1725
  return (
1726
1726
  /** @type {Record<string | symbol, unknown>} **/
1727
1727
  // @ts-expect-error
1728
1728
  e.__attributes ?? (e.__attributes = {
1729
- [Ai]: e.nodeName.includes("-"),
1730
- [Li]: e.namespaceURI === Yi
1729
+ [Sn]: e.nodeName.includes("-"),
1730
+ [Tn]: e.namespaceURI === $n
1731
1731
  })
1732
1732
  );
1733
1733
  }
1734
1734
  var We = /* @__PURE__ */ new Map();
1735
- function Ti(e) {
1736
- var t = e.getAttribute("is") || e.nodeName, i = We.get(t);
1737
- if (i) return i;
1738
- We.set(t, i = []);
1739
- for (var n, s = e, r = Element.prototype; r !== s; ) {
1740
- n = Qi(s);
1741
- for (var o in n)
1742
- n[o].set && i.push(o);
1735
+ function On(e) {
1736
+ var t = e.getAttribute("is") || e.nodeName, n = We.get(t);
1737
+ if (n) return n;
1738
+ We.set(t, n = []);
1739
+ for (var i, s = e, r = Element.prototype; r !== s; ) {
1740
+ i = Jn(s);
1741
+ for (var o in i)
1742
+ i[o].set && n.push(o);
1743
1743
  s = Xe(s);
1744
1744
  }
1745
- return i;
1745
+ return n;
1746
1746
  }
1747
1747
  function je(e, t) {
1748
- return e === t || (e == null ? void 0 : e[ct]) === t;
1748
+ return e === t || (e == null ? void 0 : e[ft]) === t;
1749
1749
  }
1750
- function ys(e = {}, t, i, n) {
1750
+ function bs(e = {}, t, n, i) {
1751
1751
  return Le(() => {
1752
1752
  var s, r;
1753
- return Vn(() => {
1754
- s = r, r = [], Ni(() => {
1755
- e !== i(...r) && (t(e, ...r), s && je(i(...s), e) && t(null, ...s));
1753
+ return Gi(() => {
1754
+ s = r, r = [], An(() => {
1755
+ e !== n(...r) && (t(e, ...r), s && je(n(...s), e) && t(null, ...s));
1756
1756
  });
1757
1757
  }), () => {
1758
- te(() => {
1759
- r && je(i(...r), e) && t(null, ...r);
1758
+ Jt(() => {
1759
+ r && je(n(...r), e) && t(null, ...r);
1760
1760
  });
1761
1761
  };
1762
1762
  }), e;
1763
1763
  }
1764
- let Ht = !1;
1765
- function vs(e) {
1766
- var t = Ht;
1764
+ let Ft = !1;
1765
+ function ws(e) {
1766
+ var t = Ft;
1767
1767
  try {
1768
- return Ht = !1, [e(), Ht];
1768
+ return Ft = !1, [e(), Ft];
1769
1769
  } finally {
1770
- Ht = t;
1770
+ Ft = t;
1771
1771
  }
1772
1772
  }
1773
- function Vt(e, t, i, n) {
1773
+ function Ht(e, t, n, i) {
1774
1774
  var m;
1775
- var s = (i & Gi) !== 0, r = (i & zi) !== 0, o = (
1775
+ var s = (n & Kn) !== 0, r = (n & Yn) !== 0, o = (
1776
1776
  /** @type {V} */
1777
- n
1778
- ), l = !0, u = () => (l && (l = !1, o = r ? Ni(
1777
+ i
1778
+ ), l = !0, a = () => (l && (l = !1, o = r ? An(
1779
1779
  /** @type {() => V} */
1780
- n
1780
+ i
1781
1781
  ) : (
1782
1782
  /** @type {V} */
1783
- n
1784
- )), o), a;
1783
+ i
1784
+ )), o), u;
1785
1785
  if (s) {
1786
- var c = ct in e || nn in e;
1787
- a = ((m = jt(e, t)) == null ? void 0 : m.set) ?? (c && t in e ? (p) => e[t] = p : void 0);
1786
+ var c = ft in e || si in e;
1787
+ u = ((m = Wt(e, t)) == null ? void 0 : m.set) ?? (c && t in e ? (h) => e[t] = h : void 0);
1788
1788
  }
1789
1789
  var d, f = !1;
1790
- s ? [d, f] = vs(() => (
1790
+ s ? [d, f] = ws(() => (
1791
1791
  /** @type {V} */
1792
1792
  e[t]
1793
1793
  )) : d = /** @type {V} */
1794
- e[t], d === void 0 && n !== void 0 && (d = u(), a && (cn(), a(d)));
1795
- var h;
1796
- if (h = () => {
1797
- var p = (
1794
+ e[t], d === void 0 && i !== void 0 && (d = a(), u && (di(), u(d)));
1795
+ var p;
1796
+ if (p = () => {
1797
+ var h = (
1798
1798
  /** @type {V} */
1799
1799
  e[t]
1800
1800
  );
1801
- return p === void 0 ? u() : (l = !0, p);
1802
- }, (i & ji) === 0)
1803
- return h;
1804
- if (a) {
1801
+ return h === void 0 ? a() : (l = !0, h);
1802
+ }, (n & zn) === 0)
1803
+ return p;
1804
+ if (u) {
1805
1805
  var C = e.$$legacy;
1806
1806
  return (
1807
1807
  /** @type {() => V} */
1808
- (function(p, y) {
1809
- return arguments.length > 0 ? ((!y || C || f) && a(y ? h() : p), p) : h();
1808
+ (function(h, v) {
1809
+ return arguments.length > 0 ? ((!v || C || f) && u(v ? p() : h), h) : p();
1810
1810
  })
1811
1811
  );
1812
1812
  }
1813
- var b = !1, v = ((i & Wi) !== 0 ? Ne : An)(() => (b = !1, h()));
1814
- s && I(v);
1813
+ var y = !1, b = ((n & Gn) !== 0 ? Ne : Ti)(() => (y = !1, p()));
1814
+ s && I(b);
1815
1815
  var g = (
1816
1816
  /** @type {Effect} */
1817
- D
1817
+ N
1818
1818
  );
1819
1819
  return (
1820
1820
  /** @type {() => V} */
1821
- (function(p, y) {
1821
+ (function(h, v) {
1822
1822
  if (arguments.length > 0) {
1823
- const T = y ? I(v) : s ? It(p) : p;
1824
- return W(v, T), b = !0, o !== void 0 && (o = T), p;
1823
+ const T = v ? I(b) : s ? Et(h) : h;
1824
+ return V(b, T), y = !0, o !== void 0 && (o = T), h;
1825
1825
  }
1826
- return yt && b || (g.f & et) !== 0 ? v.v : I(v);
1826
+ return it && y || (g.f & J) !== 0 ? b.v : I(b);
1827
1827
  })
1828
1828
  );
1829
1829
  }
1830
- const bs = [
1830
+ const Is = [
1831
1831
  [
1832
1832
  "af",
1833
1833
  // Afghanistan
@@ -3504,9 +3504,9 @@ const bs = [
3504
3504
  null,
3505
3505
  "0"
3506
3506
  ]
3507
- ], ht = [];
3508
- for (const e of bs)
3509
- ht.push({
3507
+ ], _t = [];
3508
+ for (const e of Is)
3509
+ _t.push({
3510
3510
  name: "",
3511
3511
  // populated in the plugin
3512
3512
  iso2: e[0],
@@ -3523,7 +3523,7 @@ for (const e of bs)
3523
3523
  dialCodePlus: ""
3524
3524
  // populated in the plugin
3525
3525
  });
3526
- const ws = {
3526
+ const Es = {
3527
3527
  ad: "Andorra",
3528
3528
  ae: "United Arab Emirates",
3529
3529
  af: "Afghanistan",
@@ -3766,7 +3766,7 @@ const ws = {
3766
3766
  za: "South Africa",
3767
3767
  zm: "Zambia",
3768
3768
  zw: "Zimbabwe"
3769
- }, Is = {
3769
+ }, Ns = {
3770
3770
  selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
3771
3771
  noCountrySelected: "Select country",
3772
3772
  countryListAriaLabel: "List of countries",
@@ -3778,7 +3778,7 @@ const ws = {
3778
3778
  // additional countries (not supported by country-list library)
3779
3779
  ac: "Ascension Island",
3780
3780
  xk: "Kosovo"
3781
- }, Pi = { ...ws, ...Is }, Wt = {
3781
+ }, Rn = { ...Es, ...Ns }, Vt = {
3782
3782
  OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
3783
3783
  CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
3784
3784
  COUNTRY_CHANGE: "countrychange",
@@ -3792,7 +3792,7 @@ const ws = {
3792
3792
  FLAG: "iti__flag",
3793
3793
  COUNTRY_ITEM: "iti__country",
3794
3794
  HIGHLIGHT: "iti__highlight"
3795
- }, U = {
3795
+ }, M = {
3796
3796
  ARROW_UP: "ArrowUp",
3797
3797
  ARROW_DOWN: "ArrowDown",
3798
3798
  SPACE: " ",
@@ -3802,7 +3802,7 @@ const ws = {
3802
3802
  }, Ge = {
3803
3803
  PASTE: "insertFromPaste",
3804
3804
  DELETE_FWD: "deleteContentForward"
3805
- }, lt = {
3805
+ }, at = {
3806
3806
  ALPHA_UNICODE: new RegExp("\\p{L}", "u"),
3807
3807
  // any kind of letter from any language
3808
3808
  NON_PLUS_NUMERIC: /[^+0-9]/,
@@ -3811,39 +3811,39 @@ const ws = {
3811
3811
  // chars that are NOT + or digit (global)
3812
3812
  HIDDEN_SEARCH_CHAR: /^[a-zA-ZÀ-ÿа-яА-Я ]$/
3813
3813
  // single acceptable hidden-search char
3814
- }, Es = {
3814
+ }, Ds = {
3815
3815
  HIDDEN_SEARCH_RESET_MS: 1e3
3816
3816
  }, ze = {
3817
3817
  UNKNOWN_NUMBER_TYPE: -99,
3818
3818
  UNKNOWN_VALIDATION_ERROR: -99
3819
- }, re = {
3819
+ }, se = {
3820
3820
  SANE_SELECTED_WITH_DIAL_WIDTH: 78,
3821
3821
  // px width fallback when separateDialCode enabled
3822
3822
  SANE_SELECTED_NO_DIAL_WIDTH: 42,
3823
3823
  // px width fallback when no separate dial code
3824
3824
  INPUT_PADDING_EXTRA_LEFT: 6
3825
3825
  // px gap between selected country container and input text
3826
- }, Oi = {
3826
+ }, kn = {
3827
3827
  NANP: "1"
3828
3828
  // North American Numbering Plan
3829
- }, oe = {
3829
+ }, re = {
3830
3830
  DIAL_CODE: "44",
3831
3831
  // +44 United Kingdom
3832
3832
  MOBILE_PREFIX: "7",
3833
3833
  // UK mobile numbers start with 7 after national trunk (0) or core section
3834
3834
  MOBILE_CORE_LENGTH: 10
3835
3835
  // core number length (excluding dial code / national prefix) for mobiles
3836
- }, Ns = {
3836
+ }, As = {
3837
3837
  ISO2: "us"
3838
- }, ye = {
3838
+ }, me = {
3839
3839
  AGGRESSIVE: "aggressive",
3840
3840
  POLITE: "polite"
3841
- }, le = {
3841
+ }, oe = {
3842
3842
  AUTO: "auto"
3843
3843
  }, Ke = {
3844
3844
  COUNTRY_CODE: "countryCode",
3845
3845
  DIAL_CODE: "dialCode"
3846
- }, A = {
3846
+ }, D = {
3847
3847
  EXPANDED: "aria-expanded",
3848
3848
  LABEL: "aria-label",
3849
3849
  SELECTED: "aria-selected",
@@ -3853,21 +3853,21 @@ const ws = {
3853
3853
  HIDDEN: "aria-hidden",
3854
3854
  AUTOCOMPLETE: "aria-autocomplete",
3855
3855
  MODAL: "aria-modal"
3856
- }, ae = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, Ds = () => {
3856
+ }, le = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, Ls = () => {
3857
3857
  if (typeof navigator < "u" && typeof window < "u") {
3858
3858
  const e = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
3859
3859
  navigator.userAgent
3860
- ), t = ae("(max-width: 500px)"), i = ae("(max-height: 600px)"), n = ae("(pointer: coarse)");
3861
- return e || t || n && i;
3860
+ ), t = le("(max-width: 500px)"), n = le("(max-height: 600px)"), i = le("(pointer: coarse)");
3861
+ return e || t || i && n;
3862
3862
  }
3863
3863
  return !1;
3864
- }, Ri = {
3864
+ }, Mn = {
3865
3865
  // Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
3866
3866
  allowPhonewords: !1,
3867
3867
  //* Whether or not to allow the dropdown.
3868
3868
  allowDropdown: !0,
3869
3869
  //* Add a placeholder in the input with an example number for the selected country.
3870
- autoPlaceholder: ye.POLITE,
3870
+ autoPlaceholder: me.POLITE,
3871
3871
  //* Modify the parentClass.
3872
3872
  containerClass: "",
3873
3873
  //* The order of the countries in the dropdown. Defaults to alphabetical.
@@ -3909,43 +3909,43 @@ const ws = {
3909
3909
  //* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
3910
3910
  strictMode: !1,
3911
3911
  //* Use full screen popup instead of dropdown for country list.
3912
- useFullscreenPopup: Ds(),
3912
+ useFullscreenPopup: Ls(),
3913
3913
  //* The number type to enforce during validation.
3914
3914
  validationNumberTypes: ["MOBILE"]
3915
- }, As = (e, t) => {
3915
+ }, Ss = (e, t) => {
3916
3916
  e.useFullscreenPopup && (e.fixDropdownWidth = !1), e.onlyCountries.length === 1 && (e.initialCountry = e.onlyCountries[0]), e.separateDialCode && (e.nationalMode = !1), e.allowDropdown && !e.showFlags && !e.separateDialCode && (e.nationalMode = !1), e.useFullscreenPopup && !e.dropdownContainer && (e.dropdownContainer = document.body), e.i18n = { ...t, ...e.i18n };
3917
- }, Gt = (e) => e.replace(/\D/g, ""), ki = (e = "") => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), Ls = (e, t) => {
3918
- const i = ki(t), n = [], s = [], r = [], o = [], l = [], u = [];
3917
+ }, jt = (e) => e.replace(/\D/g, ""), Un = (e = "") => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), Ts = (e, t) => {
3918
+ const n = Un(t), i = [], s = [], r = [], o = [], l = [], a = [];
3919
3919
  for (const c of e)
3920
- c.iso2 === i ? n.push(c) : c.normalisedName.startsWith(i) ? s.push(c) : c.normalisedName.includes(i) ? r.push(c) : i === c.dialCode || i === c.dialCodePlus ? o.push(c) : c.dialCodePlus.includes(i) ? l.push(c) : c.initials.includes(i) && u.push(c);
3921
- const a = (c, d) => c.priority - d.priority;
3920
+ c.iso2 === n ? i.push(c) : c.normalisedName.startsWith(n) ? s.push(c) : c.normalisedName.includes(n) ? r.push(c) : n === c.dialCode || n === c.dialCodePlus ? o.push(c) : c.dialCodePlus.includes(n) ? l.push(c) : c.initials.includes(n) && a.push(c);
3921
+ const u = (c, d) => c.priority - d.priority;
3922
3922
  return [
3923
- ...n.sort(a),
3924
- ...s.sort(a),
3925
- ...r.sort(a),
3926
- ...o.sort(a),
3927
- ...l.sort(a),
3928
- ...u.sort(a)
3923
+ ...i.sort(u),
3924
+ ...s.sort(u),
3925
+ ...r.sort(u),
3926
+ ...o.sort(u),
3927
+ ...l.sort(u),
3928
+ ...a.sort(u)
3929
3929
  ];
3930
- }, Ss = (e, t) => {
3931
- const i = t.toLowerCase();
3932
- for (const n of e)
3933
- if (n.name.toLowerCase().startsWith(i))
3934
- return n;
3930
+ }, Ps = (e, t) => {
3931
+ const n = t.toLowerCase();
3932
+ for (const i of e)
3933
+ if (i.name.toLowerCase().startsWith(n))
3934
+ return i;
3935
3935
  return null;
3936
- }, ue = (e) => Object.keys(e).filter((t) => !!e[t]).join(" "), S = (e, t, i) => {
3937
- const n = document.createElement(e);
3936
+ }, ae = (e) => Object.keys(e).filter((t) => !!e[t]).join(" "), L = (e, t, n) => {
3937
+ const i = document.createElement(e);
3938
3938
  return t && Object.entries(t).forEach(
3939
- ([s, r]) => n.setAttribute(s, r)
3940
- ), i && i.appendChild(n), n;
3941
- }, Ts = () => `
3942
- <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${A.HIDDEN}="true">
3939
+ ([s, r]) => i.setAttribute(s, r)
3940
+ ), n && n.appendChild(i), i;
3941
+ }, Os = () => `
3942
+ <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${D.HIDDEN}="true">
3943
3943
  <circle cx="11" cy="11" r="7" />
3944
3944
  <line x1="21" y1="21" x2="16.65" y2="16.65" />
3945
- </svg>`, Ps = (e) => {
3945
+ </svg>`, Rs = (e) => {
3946
3946
  const t = `iti-${e}-clear-mask`;
3947
3947
  return `
3948
- <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${A.HIDDEN}="true" focusable="false">
3948
+ <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${D.HIDDEN}="true" focusable="false">
3949
3949
  <mask id="${t}" maskUnits="userSpaceOnUse">
3950
3950
  <rect width="16" height="16" fill="white" />
3951
3951
  <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
@@ -3953,123 +3953,123 @@ const ws = {
3953
3953
  <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />
3954
3954
  </svg>`;
3955
3955
  };
3956
- class Os {
3957
- constructor(t, i, n) {
3958
- this.highlightedItem = null, this.selectedItem = null, t.dataset.intlTelInputId = n.toString(), this.telInput = t, this.options = i, this.id = n, this.hadInitialPlaceholder = !!t.getAttribute("placeholder"), this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.options.separateDialCode && (this.originalPaddingLeft = this.telInput.style.paddingLeft);
3956
+ class ks {
3957
+ constructor(t, n, i) {
3958
+ this.highlightedItem = null, this.selectedItem = null, t.dataset.intlTelInputId = i.toString(), this.telInput = t, this.options = n, this.id = i, this.hadInitialPlaceholder = !!t.getAttribute("placeholder"), this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.options.separateDialCode && (this.originalPaddingLeft = this.telInput.style.paddingLeft);
3959
3959
  }
3960
3960
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
3961
3961
  generateMarkup(t) {
3962
3962
  this.countries = t, this._prepareTelInput();
3963
- const i = this._createWrapperAndInsert();
3964
- this._maybeBuildCountryContainer(i), i.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs(i);
3963
+ const n = this._createWrapperAndInsert();
3964
+ this._maybeBuildCountryContainer(n), n.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs(n);
3965
3965
  }
3966
3966
  _prepareTelInput() {
3967
3967
  var t;
3968
3968
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !((t = this.telInput.form) != null && t.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
3969
3969
  }
3970
3970
  _createWrapperAndInsert() {
3971
- const { allowDropdown: t, showFlags: i, containerClass: n, useFullscreenPopup: s } = this.options, r = ue({
3971
+ const { allowDropdown: t, showFlags: n, containerClass: i, useFullscreenPopup: s } = this.options, r = ae({
3972
3972
  iti: !0,
3973
3973
  "iti--allow-dropdown": t,
3974
- "iti--show-flags": i,
3974
+ "iti--show-flags": n,
3975
3975
  "iti--inline-dropdown": !s,
3976
- [n]: !!n
3977
- }), o = S("div", { class: r });
3976
+ [i]: !!i
3977
+ }), o = L("div", { class: r });
3978
3978
  return this.isRTL && o.setAttribute("dir", "ltr"), this.telInput.before(o), o;
3979
3979
  }
3980
3980
  _maybeBuildCountryContainer(t) {
3981
- const { allowDropdown: i, separateDialCode: n, showFlags: s } = this.options;
3982
- if (i || s || n) {
3983
- this.countryContainer = S(
3981
+ const { allowDropdown: n, separateDialCode: i, showFlags: s } = this.options;
3982
+ if (n || s || i) {
3983
+ this.countryContainer = L(
3984
3984
  "div",
3985
3985
  // visibly hidden until we measure it's width to set the input padding correctly
3986
3986
  { class: `iti__country-container ${E.V_HIDE}` },
3987
3987
  t
3988
- ), i ? (this.selectedCountry = S(
3988
+ ), n ? (this.selectedCountry = L(
3989
3989
  "button",
3990
3990
  {
3991
3991
  type: "button",
3992
3992
  class: "iti__selected-country",
3993
- [A.EXPANDED]: "false",
3994
- [A.LABEL]: this.options.i18n.noCountrySelected,
3995
- [A.HASPOPUP]: "dialog",
3996
- [A.CONTROLS]: `iti-${this.id}__dropdown-content`
3993
+ [D.EXPANDED]: "false",
3994
+ [D.LABEL]: this.options.i18n.noCountrySelected,
3995
+ [D.HASPOPUP]: "dialog",
3996
+ [D.CONTROLS]: `iti-${this.id}__dropdown-content`
3997
3997
  },
3998
3998
  this.countryContainer
3999
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = S(
3999
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = L(
4000
4000
  "div",
4001
4001
  { class: "iti__selected-country" },
4002
4002
  this.countryContainer
4003
4003
  );
4004
- const r = S(
4004
+ const r = L(
4005
4005
  "div",
4006
4006
  { class: "iti__selected-country-primary" },
4007
4007
  this.selectedCountry
4008
4008
  );
4009
- this.selectedCountryInner = S(
4009
+ this.selectedCountryInner = L(
4010
4010
  "div",
4011
4011
  { class: E.FLAG },
4012
4012
  r
4013
- ), i && (this.dropdownArrow = S(
4013
+ ), n && (this.dropdownArrow = L(
4014
4014
  "div",
4015
- { class: "iti__arrow", [A.HIDDEN]: "true" },
4015
+ { class: "iti__arrow", [D.HIDDEN]: "true" },
4016
4016
  r
4017
- )), n && (this.selectedDialCode = S(
4017
+ )), i && (this.selectedDialCode = L(
4018
4018
  "div",
4019
4019
  { class: "iti__selected-dial-code" },
4020
4020
  this.selectedCountry
4021
- )), i && this._buildDropdownContent();
4021
+ )), n && this._buildDropdownContent();
4022
4022
  }
4023
4023
  }
4024
4024
  _buildDropdownContent() {
4025
4025
  const {
4026
4026
  fixDropdownWidth: t,
4027
- useFullscreenPopup: i,
4028
- countrySearch: n,
4027
+ useFullscreenPopup: n,
4028
+ countrySearch: i,
4029
4029
  i18n: s,
4030
4030
  dropdownContainer: r,
4031
4031
  containerClass: o
4032
4032
  } = this.options, l = t ? "" : "iti--flexible-dropdown-width";
4033
- if (this.dropdownContent = S("div", {
4033
+ if (this.dropdownContent = L("div", {
4034
4034
  id: `iti-${this.id}__dropdown-content`,
4035
4035
  class: `iti__dropdown-content ${E.HIDE} ${l}`,
4036
4036
  role: "dialog",
4037
- [A.MODAL]: "true"
4038
- }), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), n && this._buildSearchUI(), this.countryList = S(
4037
+ [D.MODAL]: "true"
4038
+ }), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), i && this._buildSearchUI(), this.countryList = L(
4039
4039
  "ul",
4040
4040
  {
4041
4041
  class: "iti__country-list",
4042
4042
  id: `iti-${this.id}__country-listbox`,
4043
4043
  role: "listbox",
4044
- [A.LABEL]: s.countryListAriaLabel
4044
+ [D.LABEL]: s.countryListAriaLabel
4045
4045
  },
4046
4046
  this.dropdownContent
4047
- ), this._appendListItems(), n && this.updateSearchResultsA11yText(), r) {
4048
- const u = ue({
4047
+ ), this._appendListItems(), i && this.updateSearchResultsA11yText(), r) {
4048
+ const a = ae({
4049
4049
  iti: !0,
4050
4050
  "iti--container": !0,
4051
- "iti--fullscreen-popup": i,
4052
- "iti--inline-dropdown": !i,
4051
+ "iti--fullscreen-popup": n,
4052
+ "iti--inline-dropdown": !n,
4053
4053
  [o]: !!o
4054
4054
  });
4055
- this.dropdown = S("div", { class: u }), this.dropdown.appendChild(this.dropdownContent);
4055
+ this.dropdown = L("div", { class: a }), this.dropdown.appendChild(this.dropdownContent);
4056
4056
  } else
4057
4057
  this.countryContainer.appendChild(this.dropdownContent);
4058
4058
  }
4059
4059
  _buildSearchUI() {
4060
- const { i18n: t } = this.options, i = S(
4060
+ const { i18n: t } = this.options, n = L(
4061
4061
  "div",
4062
4062
  { class: "iti__search-input-wrapper" },
4063
4063
  this.dropdownContent
4064
4064
  );
4065
- this.searchIcon = S(
4065
+ this.searchIcon = L(
4066
4066
  "span",
4067
4067
  {
4068
4068
  class: "iti__search-icon",
4069
- [A.HIDDEN]: "true"
4069
+ [D.HIDDEN]: "true"
4070
4070
  },
4071
- i
4072
- ), this.searchIcon.innerHTML = Ts(), this.searchInput = S(
4071
+ n
4072
+ ), this.searchIcon.innerHTML = Os(), this.searchInput = L(
4073
4073
  "input",
4074
4074
  {
4075
4075
  id: `iti-${this.id}__search-input`,
@@ -4079,31 +4079,31 @@ class Os {
4079
4079
  placeholder: t.searchPlaceholder,
4080
4080
  // role=combobox + aria-autocomplete=list + aria-activedescendant allows maintaining focus on the search input while allowing users to navigate search results with up/down keyboard keys
4081
4081
  role: "combobox",
4082
- [A.EXPANDED]: "true",
4083
- [A.LABEL]: t.searchPlaceholder,
4084
- [A.CONTROLS]: `iti-${this.id}__country-listbox`,
4085
- [A.AUTOCOMPLETE]: "list",
4082
+ [D.EXPANDED]: "true",
4083
+ [D.LABEL]: t.searchPlaceholder,
4084
+ [D.CONTROLS]: `iti-${this.id}__country-listbox`,
4085
+ [D.AUTOCOMPLETE]: "list",
4086
4086
  autocomplete: "off"
4087
4087
  },
4088
- i
4089
- ), this.searchClearButton = S(
4088
+ n
4089
+ ), this.searchClearButton = L(
4090
4090
  "button",
4091
4091
  {
4092
4092
  type: "button",
4093
4093
  class: `iti__search-clear ${E.HIDE}`,
4094
- [A.LABEL]: t.clearSearchAriaLabel,
4094
+ [D.LABEL]: t.clearSearchAriaLabel,
4095
4095
  tabindex: "-1"
4096
4096
  },
4097
- i
4098
- ), this.searchClearButton.innerHTML = Ps(this.id), this.searchResultsA11yText = S(
4097
+ n
4098
+ ), this.searchClearButton.innerHTML = Rs(this.id), this.searchResultsA11yText = L(
4099
4099
  "span",
4100
4100
  { class: "iti__a11y-text" },
4101
4101
  this.dropdownContent
4102
- ), this.searchNoResults = S(
4102
+ ), this.searchNoResults = L(
4103
4103
  "div",
4104
4104
  {
4105
4105
  class: `iti__no-results ${E.HIDE}`,
4106
- [A.HIDDEN]: "true"
4106
+ [D.HIDDEN]: "true"
4107
4107
  // all a11y messaging happens in this.searchResultsA11yText
4108
4108
  },
4109
4109
  this.dropdownContent
@@ -4113,15 +4113,15 @@ class Os {
4113
4113
  this.countryContainer && (this.updateInputPadding(), this.countryContainer.classList.remove(E.V_HIDE));
4114
4114
  }
4115
4115
  _maybeBuildHiddenInputs(t) {
4116
- var n, s;
4117
- const { hiddenInput: i } = this.options;
4118
- if (i) {
4119
- const r = this.telInput.getAttribute("name") || "", o = i(r);
4116
+ var i, s;
4117
+ const { hiddenInput: n } = this.options;
4118
+ if (n) {
4119
+ const r = this.telInput.getAttribute("name") || "", o = n(r);
4120
4120
  if (o.phone) {
4121
- const l = (n = this.telInput.form) == null ? void 0 : n.querySelector(
4121
+ const l = (i = this.telInput.form) == null ? void 0 : i.querySelector(
4122
4122
  `input[name="${o.phone}"]`
4123
4123
  );
4124
- l ? this.hiddenInput = l : (this.hiddenInput = S("input", {
4124
+ l ? this.hiddenInput = l : (this.hiddenInput = L("input", {
4125
4125
  type: "hidden",
4126
4126
  name: o.phone
4127
4127
  }), t.appendChild(this.hiddenInput));
@@ -4130,7 +4130,7 @@ class Os {
4130
4130
  const l = (s = this.telInput.form) == null ? void 0 : s.querySelector(
4131
4131
  `input[name="${o.country}"]`
4132
4132
  );
4133
- l ? this.hiddenInputCountry = l : (this.hiddenInputCountry = S("input", {
4133
+ l ? this.hiddenInputCountry = l : (this.hiddenInputCountry = L("input", {
4134
4134
  type: "hidden",
4135
4135
  name: o.country
4136
4136
  }), t.appendChild(this.hiddenInputCountry));
@@ -4140,29 +4140,29 @@ class Os {
4140
4140
  //* For each country: add a country list item <li> to the countryList <ul> container.
4141
4141
  _appendListItems() {
4142
4142
  const t = document.createDocumentFragment();
4143
- for (let i = 0; i < this.countries.length; i++) {
4144
- const n = this.countries[i], s = ue({
4143
+ for (let n = 0; n < this.countries.length; n++) {
4144
+ const i = this.countries[n], s = ae({
4145
4145
  [E.COUNTRY_ITEM]: !0
4146
- }), r = S("li", {
4147
- id: `iti-${this.id}__item-${n.iso2}`,
4146
+ }), r = L("li", {
4147
+ id: `iti-${this.id}__item-${i.iso2}`,
4148
4148
  class: s,
4149
4149
  tabindex: "-1",
4150
4150
  role: "option",
4151
- [A.SELECTED]: "false"
4151
+ [D.SELECTED]: "false"
4152
4152
  });
4153
- r.dataset.dialCode = n.dialCode, r.dataset.countryCode = n.iso2, n.nodeById[this.id] = r, this.options.showFlags && S("div", { class: `${E.FLAG} iti__${n.iso2}` }, r);
4154
- const o = S("span", { class: "iti__country-name" }, r);
4155
- o.textContent = n.name;
4156
- const l = S("span", { class: "iti__dial-code" }, r);
4157
- this.isRTL && l.setAttribute("dir", "ltr"), l.textContent = `+${n.dialCode}`, t.appendChild(r);
4153
+ r.dataset.dialCode = i.dialCode, r.dataset.countryCode = i.iso2, i.nodeById[this.id] = r, this.options.showFlags && L("div", { class: `${E.FLAG} iti__${i.iso2}` }, r);
4154
+ const o = L("span", { class: "iti__country-name" }, r);
4155
+ o.textContent = i.name;
4156
+ const l = L("span", { class: "iti__dial-code" }, r);
4157
+ this.isRTL && l.setAttribute("dir", "ltr"), l.textContent = `+${i.dialCode}`, t.appendChild(r);
4158
4158
  }
4159
4159
  this.countryList.appendChild(t);
4160
4160
  }
4161
4161
  //* Update the input padding to make space for the selected country/dial code.
4162
4162
  updateInputPadding() {
4163
4163
  if (this.selectedCountry) {
4164
- const t = this.options.separateDialCode ? re.SANE_SELECTED_WITH_DIAL_WIDTH : re.SANE_SELECTED_NO_DIAL_WIDTH, n = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || t) + re.INPUT_PADDING_EXTRA_LEFT;
4165
- this.telInput.style.paddingLeft = `${n}px`;
4164
+ const t = this.options.separateDialCode ? se.SANE_SELECTED_WITH_DIAL_WIDTH : se.SANE_SELECTED_NO_DIAL_WIDTH, i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || t) + se.INPUT_PADDING_EXTRA_LEFT;
4165
+ this.telInput.style.paddingLeft = `${i}px`;
4166
4166
  }
4167
4167
  }
4168
4168
  //* When input is in a hidden container during init, we cannot calculate the selected country width.
@@ -4177,165 +4177,165 @@ class Os {
4177
4177
  } catch {
4178
4178
  t = document.body;
4179
4179
  }
4180
- const i = this.telInput.parentNode.cloneNode(
4180
+ const n = this.telInput.parentNode.cloneNode(
4181
4181
  !1
4182
4182
  );
4183
- i.style.visibility = "hidden", t.appendChild(i);
4184
- const n = this.countryContainer.cloneNode();
4185
- i.appendChild(n);
4183
+ n.style.visibility = "hidden", t.appendChild(n);
4184
+ const i = this.countryContainer.cloneNode();
4185
+ n.appendChild(i);
4186
4186
  const s = this.selectedCountry.cloneNode(
4187
4187
  !0
4188
4188
  );
4189
- n.appendChild(s);
4189
+ i.appendChild(s);
4190
4190
  const r = s.offsetWidth;
4191
- return t.removeChild(i), r;
4191
+ return t.removeChild(n), r;
4192
4192
  }
4193
4193
  return 0;
4194
4194
  }
4195
4195
  //* Update search results text (for a11y).
4196
4196
  updateSearchResultsA11yText() {
4197
- const { i18n: t } = this.options, i = this.countryList.childElementCount;
4198
- let n;
4199
- i === 0 ? n = t.zeroSearchResults : t.searchResultsText ? n = t.searchResultsText(i) : i === 1 ? n = t.oneSearchResult : n = t.multipleSearchResults.replace(
4197
+ const { i18n: t } = this.options, n = this.countryList.childElementCount;
4198
+ let i;
4199
+ n === 0 ? i = t.zeroSearchResults : t.searchResultsText ? i = t.searchResultsText(n) : n === 1 ? i = t.oneSearchResult : i = t.multipleSearchResults.replace(
4200
4200
  "${count}",
4201
- i.toString()
4202
- ), this.searchResultsA11yText.textContent = n;
4201
+ n.toString()
4202
+ ), this.searchResultsA11yText.textContent = i;
4203
4203
  }
4204
4204
  //* Check if an element is visible within it's container, else scroll until it is.
4205
4205
  scrollTo(t) {
4206
- const i = this.countryList, n = document.documentElement.scrollTop, s = i.offsetHeight, r = i.getBoundingClientRect().top + n, o = r + s, l = t.offsetHeight, u = t.getBoundingClientRect().top + n, a = u + l, c = u - r + i.scrollTop;
4207
- if (u < r)
4208
- i.scrollTop = c;
4209
- else if (a > o) {
4206
+ const n = this.countryList, i = document.documentElement.scrollTop, s = n.offsetHeight, r = n.getBoundingClientRect().top + i, o = r + s, l = t.offsetHeight, a = t.getBoundingClientRect().top + i, u = a + l, c = a - r + n.scrollTop;
4207
+ if (a < r)
4208
+ n.scrollTop = c;
4209
+ else if (u > o) {
4210
4210
  const d = s - l;
4211
- i.scrollTop = c - d;
4211
+ n.scrollTop = c - d;
4212
4212
  }
4213
4213
  }
4214
4214
  //* Remove highlighting from the previous list item and highlight the new one.
4215
- highlightListItem(t, i) {
4216
- const n = this.highlightedItem;
4217
- if (n && n.classList.remove(E.HIGHLIGHT), this.highlightedItem = t, this.highlightedItem && (this.highlightedItem.classList.add(E.HIGHLIGHT), this.options.countrySearch)) {
4215
+ highlightListItem(t, n) {
4216
+ const i = this.highlightedItem;
4217
+ if (i && i.classList.remove(E.HIGHLIGHT), this.highlightedItem = t, this.highlightedItem && (this.highlightedItem.classList.add(E.HIGHLIGHT), this.options.countrySearch)) {
4218
4218
  const s = this.highlightedItem.getAttribute("id") || "";
4219
- this.searchInput.setAttribute(A.ACTIVE_DESCENDANT, s);
4219
+ this.searchInput.setAttribute(D.ACTIVE_DESCENDANT, s);
4220
4220
  }
4221
- i && this.highlightedItem.focus();
4221
+ n && this.highlightedItem.focus();
4222
4222
  }
4223
4223
  updateSelectedItem(t) {
4224
- if (this.selectedItem && this.selectedItem.dataset.countryCode !== t && (this.selectedItem.setAttribute(A.SELECTED, "false"), this.selectedItem = null), t && !this.selectedItem) {
4225
- const i = this.countryList.querySelector(
4224
+ if (this.selectedItem && this.selectedItem.dataset.countryCode !== t && (this.selectedItem.setAttribute(D.SELECTED, "false"), this.selectedItem = null), t && !this.selectedItem) {
4225
+ const n = this.countryList.querySelector(
4226
4226
  `[data-country-code="${t}"]`
4227
4227
  );
4228
- i && (i.setAttribute(A.SELECTED, "true"), this.selectedItem = i);
4228
+ n && (n.setAttribute(D.SELECTED, "true"), this.selectedItem = n);
4229
4229
  }
4230
4230
  }
4231
4231
  //* Country search: Filter the country list to the given array of countries.
4232
4232
  filterCountries(t) {
4233
4233
  this.countryList.innerHTML = "";
4234
- let i = !0;
4235
- for (const n of t) {
4236
- const s = n.nodeById[this.id];
4237
- s && (this.countryList.appendChild(s), i && (this.highlightListItem(s, !1), i = !1));
4234
+ let n = !0;
4235
+ for (const i of t) {
4236
+ const s = i.nodeById[this.id];
4237
+ s && (this.countryList.appendChild(s), n && (this.highlightListItem(s, !1), n = !1));
4238
4238
  }
4239
- i ? (this.highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove(E.HIDE)) : this.searchNoResults && this.searchNoResults.classList.add(E.HIDE), this.countryList.scrollTop = 0, this.updateSearchResultsA11yText();
4239
+ n ? (this.highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove(E.HIDE)) : this.searchNoResults && this.searchNoResults.classList.add(E.HIDE), this.countryList.scrollTop = 0, this.updateSearchResultsA11yText();
4240
4240
  }
4241
4241
  destroy() {
4242
4242
  this.telInput.iti = void 0, delete this.telInput.dataset.intlTelInputId, this.options.separateDialCode && (this.telInput.style.paddingLeft = this.originalPaddingLeft);
4243
4243
  const t = this.telInput.parentNode;
4244
4244
  t.before(this.telInput), t.remove(), this.telInput = null, this.countryContainer = null, this.selectedCountry = null, this.selectedCountryInner = null, this.selectedDialCode = null, this.dropdownArrow = null, this.dropdownContent = null, this.searchInput = null, this.searchIcon = null, this.searchClearButton = null, this.searchNoResults = null, this.searchResultsA11yText = null, this.countryList = null, this.dropdown = null, this.hiddenInput = null, this.hiddenInputCountry = null, this.highlightedItem = null, this.selectedItem = null;
4245
- for (const i of this.countries)
4246
- delete i.nodeById[this.id];
4245
+ for (const n of this.countries)
4246
+ delete n.nodeById[this.id];
4247
4247
  this.countries = null;
4248
4248
  }
4249
4249
  }
4250
- const Rs = (e) => {
4251
- const { onlyCountries: t, excludeCountries: i } = e;
4250
+ const Ms = (e) => {
4251
+ const { onlyCountries: t, excludeCountries: n } = e;
4252
4252
  if (t.length) {
4253
- const n = t.map(
4253
+ const i = t.map(
4254
4254
  (s) => s.toLowerCase()
4255
4255
  );
4256
- return ht.filter(
4257
- (s) => n.includes(s.iso2)
4256
+ return _t.filter(
4257
+ (s) => i.includes(s.iso2)
4258
4258
  );
4259
- } else if (i.length) {
4260
- const n = i.map(
4259
+ } else if (n.length) {
4260
+ const i = n.map(
4261
4261
  (s) => s.toLowerCase()
4262
4262
  );
4263
- return ht.filter(
4264
- (s) => !n.includes(s.iso2)
4263
+ return _t.filter(
4264
+ (s) => !i.includes(s.iso2)
4265
4265
  );
4266
4266
  }
4267
- return ht;
4268
- }, ks = (e, t) => {
4269
- for (const i of e) {
4270
- const n = i.iso2.toLowerCase();
4271
- t.i18n[n] && (i.name = t.i18n[n]);
4267
+ return _t;
4268
+ }, Us = (e, t) => {
4269
+ for (const n of e) {
4270
+ const i = n.iso2.toLowerCase();
4271
+ t.i18n[i] && (n.name = t.i18n[i]);
4272
4272
  }
4273
- }, Ms = (e) => {
4273
+ }, xs = (e) => {
4274
4274
  const t = /* @__PURE__ */ new Set();
4275
- let i = 0;
4276
- const n = {}, s = (o, l) => {
4275
+ let n = 0;
4276
+ const i = {}, s = (o, l) => {
4277
4277
  if (!o || !l)
4278
4278
  return;
4279
- l.length > i && (i = l.length), n.hasOwnProperty(l) || (n[l] = []);
4280
- const u = n[l];
4281
- u.includes(o) || u.push(o);
4279
+ l.length > n && (n = l.length), i.hasOwnProperty(l) || (i[l] = []);
4280
+ const a = i[l];
4281
+ a.includes(o) || a.push(o);
4282
4282
  }, r = [...e].sort((o, l) => o.priority - l.priority);
4283
4283
  for (const o of r) {
4284
4284
  t.has(o.dialCode) || t.add(o.dialCode);
4285
4285
  for (let l = 1; l < o.dialCode.length; l++) {
4286
- const u = o.dialCode.substring(0, l);
4287
- s(o.iso2, u);
4286
+ const a = o.dialCode.substring(0, l);
4287
+ s(o.iso2, a);
4288
4288
  }
4289
4289
  if (s(o.iso2, o.dialCode), o.areaCodes) {
4290
- const l = n[o.dialCode][0];
4291
- for (const u of o.areaCodes) {
4292
- for (let a = 1; a < u.length; a++) {
4293
- const c = u.substring(0, a), d = o.dialCode + c;
4290
+ const l = i[o.dialCode][0];
4291
+ for (const a of o.areaCodes) {
4292
+ for (let u = 1; u < a.length; u++) {
4293
+ const c = a.substring(0, u), d = o.dialCode + c;
4294
4294
  s(l, d), s(o.iso2, d);
4295
4295
  }
4296
- s(o.iso2, o.dialCode + u);
4296
+ s(o.iso2, o.dialCode + a);
4297
4297
  }
4298
4298
  }
4299
4299
  }
4300
- return { dialCodes: t, dialCodeMaxLen: i, dialCodeToIso2Map: n };
4301
- }, Us = (e, t) => {
4300
+ return { dialCodes: t, dialCodeMaxLen: n, dialCodeToIso2Map: i };
4301
+ }, Bs = (e, t) => {
4302
4302
  t.countryOrder && (t.countryOrder = t.countryOrder.map(
4303
- (i) => i.toLowerCase()
4304
- )), e.sort((i, n) => {
4303
+ (n) => n.toLowerCase()
4304
+ )), e.sort((n, i) => {
4305
4305
  const { countryOrder: s } = t;
4306
4306
  if (s) {
4307
- const r = s.indexOf(i.iso2), o = s.indexOf(n.iso2), l = r > -1, u = o > -1;
4308
- if (l || u)
4309
- return l && u ? r - o : l ? -1 : 1;
4307
+ const r = s.indexOf(n.iso2), o = s.indexOf(i.iso2), l = r > -1, a = o > -1;
4308
+ if (l || a)
4309
+ return l && a ? r - o : l ? -1 : 1;
4310
4310
  }
4311
- return i.name.localeCompare(n.name);
4311
+ return n.name.localeCompare(i.name);
4312
4312
  });
4313
- }, xs = (e) => {
4313
+ }, Fs = (e) => {
4314
4314
  for (const t of e)
4315
- t.normalisedName = ki(t.name), t.initials = t.normalisedName.split(/[^a-z]/).map((i) => i[0]).join(""), t.dialCodePlus = `+${t.dialCode}`;
4316
- }, Bs = (e, t, i, n) => {
4315
+ t.normalisedName = Un(t.name), t.initials = t.normalisedName.split(/[^a-z]/).map((n) => n[0]).join(""), t.dialCodePlus = `+${t.dialCode}`;
4316
+ }, Hs = (e, t, n, i) => {
4317
4317
  let s = e;
4318
- if (i && t) {
4319
- t = `+${n.dialCode}`;
4318
+ if (n && t) {
4319
+ t = `+${i.dialCode}`;
4320
4320
  const r = s[t.length] === " " || s[t.length] === "-" ? t.length + 1 : t.length;
4321
4321
  s = s.substring(r);
4322
4322
  }
4323
4323
  return s;
4324
- }, Fs = (e, t, i, n, s) => {
4325
- const r = i ? i.formatNumberAsYouType(e, n.iso2) : e, { dialCode: o } = n;
4324
+ }, Vs = (e, t, n, i, s) => {
4325
+ const r = n ? n.formatNumberAsYouType(e, i.iso2) : e, { dialCode: o } = i;
4326
4326
  return s && t.charAt(0) !== "+" && r.includes(`+${o}`) ? (r.split(`+${o}`)[1] || "").trim() : r;
4327
- }, Hs = (e, t, i, n) => {
4328
- if (i === 0 && !n)
4327
+ }, Ws = (e, t, n, i) => {
4328
+ if (n === 0 && !i)
4329
4329
  return 0;
4330
4330
  let s = 0;
4331
4331
  for (let r = 0; r < t.length; r++) {
4332
- if (/[+0-9]/.test(t[r]) && s++, s === e && !n)
4332
+ if (/[+0-9]/.test(t[r]) && s++, s === e && !i)
4333
4333
  return r + 1;
4334
- if (n && s === e + 1)
4334
+ if (i && s === e + 1)
4335
4335
  return r;
4336
4336
  }
4337
4337
  return t.length;
4338
- }, Vs = [
4338
+ }, js = [
4339
4339
  "800",
4340
4340
  "822",
4341
4341
  "833",
@@ -4354,24 +4354,24 @@ const Rs = (e) => {
4354
4354
  "888",
4355
4355
  "889"
4356
4356
  ], Ye = (e) => {
4357
- const t = Gt(e);
4358
- if (t.startsWith(Oi.NANP) && t.length >= 4) {
4359
- const i = t.substring(1, 4);
4360
- return Vs.includes(i);
4357
+ const t = jt(e);
4358
+ if (t.startsWith(kn.NANP) && t.length >= 4) {
4359
+ const n = t.substring(1, 4);
4360
+ return js.includes(n);
4361
4361
  }
4362
4362
  return !1;
4363
4363
  };
4364
- for (const e of ht)
4365
- e.name = Pi[e.iso2];
4366
- let Ws = 0;
4367
- const js = new Set(ht.map((e) => e.iso2)), ce = (e) => js.has(e);
4364
+ for (const e of _t)
4365
+ e.name = Rn[e.iso2];
4366
+ let Gs = 0;
4367
+ const zs = new Set(_t.map((e) => e.iso2)), ue = (e) => zs.has(e);
4368
4368
  class Se {
4369
- constructor(t, i = {}) {
4370
- this.id = Ws++, this.options = { ...Ri, ...i }, As(this.options, Pi), this.ui = new Os(t, this.options, this.id), this.isAndroid = Se._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = Rs(this.options);
4371
- const { dialCodes: n, dialCodeMaxLen: s, dialCodeToIso2Map: r } = Ms(
4369
+ constructor(t, n = {}) {
4370
+ this.id = Gs++, this.options = { ...Mn, ...n }, Ss(this.options, Rn), this.ui = new ks(t, this.options, this.id), this.isAndroid = Se._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = Ms(this.options);
4371
+ const { dialCodes: i, dialCodeMaxLen: s, dialCodeToIso2Map: r } = xs(
4372
4372
  this.countries
4373
4373
  );
4374
- this.dialCodes = n, this.dialCodeMaxLen = s, this.dialCodeToIso2Map = r, this.countryByIso2 = new Map(this.countries.map((o) => [o.iso2, o])), this._init();
4374
+ this.dialCodes = i, this.dialCodeMaxLen = s, this.dialCodeToIso2Map = r, this.countryByIso2 = new Map(this.countries.map((o) => [o.iso2, o])), this._init();
4375
4375
  }
4376
4376
  static _getIsAndroid() {
4377
4377
  return typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1;
@@ -4382,8 +4382,8 @@ class Se {
4382
4382
  _mapAsciiToUserNumerals(t) {
4383
4383
  if (this.userNumeralSet || this._updateNumeralSet(this.ui.telInput.value), this.userNumeralSet === "ascii")
4384
4384
  return t;
4385
- const i = this.userNumeralSet === "arabic-indic" ? 1632 : 1776;
4386
- return t.replace(/[0-9]/g, (n) => String.fromCharCode(i + Number(n)));
4385
+ const n = this.userNumeralSet === "arabic-indic" ? 1632 : 1776;
4386
+ return t.replace(/[0-9]/g, (i) => String.fromCharCode(n + Number(i)));
4387
4387
  }
4388
4388
  // Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9
4389
4389
  _normaliseNumerals(t) {
@@ -4391,8 +4391,8 @@ class Se {
4391
4391
  return "";
4392
4392
  if (this._updateNumeralSet(t), this.userNumeralSet === "ascii")
4393
4393
  return t;
4394
- const i = this.userNumeralSet === "arabic-indic" ? 1632 : 1776, n = this.userNumeralSet === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
4395
- return t.replace(n, (s) => String.fromCharCode(48 + (s.charCodeAt(0) - i)));
4394
+ const n = this.userNumeralSet === "arabic-indic" ? 1632 : 1776, i = this.userNumeralSet === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
4395
+ return t.replace(i, (s) => String.fromCharCode(48 + (s.charCodeAt(0) - n)));
4396
4396
  }
4397
4397
  _getTelInputValue() {
4398
4398
  const t = this.ui.telInput.value.trim();
@@ -4402,12 +4402,12 @@ class Se {
4402
4402
  this.ui.telInput.value = this._mapAsciiToUserNumerals(t);
4403
4403
  }
4404
4404
  _createInitPromises() {
4405
- const t = new Promise((n, s) => {
4406
- this.resolveAutoCountryPromise = n, this.rejectAutoCountryPromise = s;
4407
- }), i = new Promise((n, s) => {
4408
- this.resolveUtilsScriptPromise = n, this.rejectUtilsScriptPromise = s;
4405
+ const t = new Promise((i, s) => {
4406
+ this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = s;
4407
+ }), n = new Promise((i, s) => {
4408
+ this.resolveUtilsScriptPromise = i, this.rejectUtilsScriptPromise = s;
4409
4409
  });
4410
- return Promise.all([t, i]);
4410
+ return Promise.all([t, n]);
4411
4411
  }
4412
4412
  //* Can't be private as it's called from intlTelInput convenience wrapper.
4413
4413
  _init() {
@@ -4418,18 +4418,18 @@ class Se {
4418
4418
  //********************
4419
4419
  //* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
4420
4420
  _processCountryData() {
4421
- ks(this.countries, this.options), Us(this.countries, this.options), xs(this.countries);
4421
+ Us(this.countries, this.options), Bs(this.countries, this.options), Fs(this.countries);
4422
4422
  }
4423
4423
  //* Set the initial state of the input value and the selected country by:
4424
4424
  //* 1. Extracting a dial code from the given number
4425
4425
  //* 2. Using explicit initialCountry
4426
4426
  _setInitialState(t = !1) {
4427
- const i = this.ui.telInput.getAttribute("value"), n = this._normaliseNumerals(i), s = this._getTelInputValue(), o = n && n.startsWith("+") && (!s || !s.startsWith("+")) ? n : s, l = this._getDialCode(o), u = Ye(o), { initialCountry: a, geoIpLookup: c } = this.options, d = a === le.AUTO && c;
4428
- if (l && !u)
4427
+ const n = this.ui.telInput.getAttribute("value"), i = this._normaliseNumerals(n), s = this._getTelInputValue(), o = i && i.startsWith("+") && (!s || !s.startsWith("+")) ? i : s, l = this._getDialCode(o), a = Ye(o), { initialCountry: u, geoIpLookup: c } = this.options, d = u === oe.AUTO && c;
4428
+ if (l && !a)
4429
4429
  this._updateCountryFromNumber(o);
4430
4430
  else if (!d || t) {
4431
- const f = a ? a.toLowerCase() : "";
4432
- ce(f) ? this._setCountry(f) : l && u ? this._setCountry(Ns.ISO2) : this._setCountry("");
4431
+ const f = u ? u.toLowerCase() : "";
4432
+ ue(f) ? this._setCountry(f) : l && a ? this._setCountry(As.ISO2) : this._setCountry("");
4433
4433
  }
4434
4434
  o && this._updateValFromNumber(o);
4435
4435
  }
@@ -4439,20 +4439,20 @@ class Se {
4439
4439
  }
4440
4440
  //* Update hidden input on form submit.
4441
4441
  _initHiddenInputListener() {
4442
- var i;
4442
+ var n;
4443
4443
  const t = () => {
4444
4444
  this.ui.hiddenInput && (this.ui.hiddenInput.value = this.getNumber()), this.ui.hiddenInputCountry && (this.ui.hiddenInputCountry.value = this.selectedCountryData.iso2 || "");
4445
4445
  };
4446
- (i = this.ui.telInput.form) == null || i.addEventListener("submit", t, {
4446
+ (n = this.ui.telInput.form) == null || n.addEventListener("submit", t, {
4447
4447
  signal: this.abortController.signal
4448
4448
  });
4449
4449
  }
4450
4450
  //* initialise the dropdown listeners.
4451
4451
  _initDropdownListeners() {
4452
- const t = this.abortController.signal, i = (o) => {
4452
+ const t = this.abortController.signal, n = (o) => {
4453
4453
  this.ui.dropdownContent.classList.contains(E.HIDE) ? this.ui.telInput.focus() : o.preventDefault();
4454
- }, n = this.ui.telInput.closest("label");
4455
- n && n.addEventListener("click", i, { signal: t });
4454
+ }, i = this.ui.telInput.closest("label");
4455
+ i && i.addEventListener("click", n, { signal: t });
4456
4456
  const s = () => {
4457
4457
  this.ui.dropdownContent.classList.contains(
4458
4458
  E.HIDE
@@ -4468,7 +4468,7 @@ class Se {
4468
4468
  const r = (o) => {
4469
4469
  this.ui.dropdownContent.classList.contains(
4470
4470
  E.HIDE
4471
- ) && [U.ARROW_UP, U.ARROW_DOWN, U.SPACE, U.ENTER].includes(o.key) && (o.preventDefault(), o.stopPropagation(), this._openDropdown()), o.key === U.TAB && this._closeDropdown();
4471
+ ) && [M.ARROW_UP, M.ARROW_DOWN, M.SPACE, M.ENTER].includes(o.key) && (o.preventDefault(), o.stopPropagation(), this._openDropdown()), o.key === M.TAB && this._closeDropdown();
4472
4472
  };
4473
4473
  this.ui.countryContainer.addEventListener(
4474
4474
  "keydown",
@@ -4478,7 +4478,7 @@ class Se {
4478
4478
  }
4479
4479
  //* Init many requests: utils script / geo ip lookup.
4480
4480
  _initRequests() {
4481
- const { loadUtils: t, initialCountry: i, geoIpLookup: n } = this.options;
4481
+ const { loadUtils: t, initialCountry: n, geoIpLookup: i } = this.options;
4482
4482
  if (t && !_.utils) {
4483
4483
  const r = () => {
4484
4484
  var o;
@@ -4497,14 +4497,14 @@ class Se {
4497
4497
  }
4498
4498
  } else
4499
4499
  this.resolveUtilsScriptPromise();
4500
- i === le.AUTO && n && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
4500
+ n === oe.AUTO && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
4501
4501
  }
4502
4502
  //* Perform the geo ip lookup.
4503
4503
  _loadAutoCountry() {
4504
4504
  _.autoCountry ? this.handleAutoCountry() : _.startedLoadingAutoCountry || (_.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
4505
4505
  (t = "") => {
4506
- const i = t.toLowerCase();
4507
- ce(i) ? (_.autoCountry = i, setTimeout(() => kt("handleAutoCountry"))) : (this._setInitialState(!0), kt("rejectAutoCountryPromise"));
4506
+ const n = t.toLowerCase();
4507
+ ue(n) ? (_.autoCountry = n, setTimeout(() => kt("handleAutoCountry"))) : (this._setInitialState(!0), kt("rejectAutoCountryPromise"));
4508
4508
  },
4509
4509
  () => {
4510
4510
  this._setInitialState(!0), kt("rejectAutoCountryPromise");
@@ -4521,44 +4521,44 @@ class Se {
4521
4521
  _bindInputListener() {
4522
4522
  const {
4523
4523
  strictMode: t,
4524
- formatAsYouType: i,
4525
- separateDialCode: n,
4524
+ formatAsYouType: n,
4525
+ separateDialCode: i,
4526
4526
  allowDropdown: s,
4527
4527
  countrySearch: r
4528
4528
  } = this.options;
4529
4529
  let o = !1;
4530
- lt.ALPHA_UNICODE.test(this._getTelInputValue()) && (o = !0);
4531
- const l = (u) => {
4532
- const a = this._getTelInputValue();
4533
- if (this.isAndroid && (u == null ? void 0 : u.data) === "+" && n && s && r) {
4534
- const C = this.ui.telInput.selectionStart || 0, b = a.substring(0, C - 1), v = a.substring(C);
4535
- this._setTelInputValue(b + v), this._openDropdownWithPlus();
4530
+ at.ALPHA_UNICODE.test(this._getTelInputValue()) && (o = !0);
4531
+ const l = (a) => {
4532
+ const u = this._getTelInputValue();
4533
+ if (this.isAndroid && (a == null ? void 0 : a.data) === "+" && i && s && r) {
4534
+ const C = this.ui.telInput.selectionStart || 0, y = u.substring(0, C - 1), b = u.substring(C);
4535
+ this._setTelInputValue(y + b), this._openDropdownWithPlus();
4536
4536
  return;
4537
4537
  }
4538
- this._updateCountryFromNumber(a) && this._triggerCountryChange();
4539
- const c = (u == null ? void 0 : u.data) && lt.NON_PLUS_NUMERIC.test(u.data), d = (u == null ? void 0 : u.inputType) === Ge.PASTE && a;
4540
- c || d && !t ? o = !0 : lt.NON_PLUS_NUMERIC.test(a) || (o = !1);
4541
- const f = (u == null ? void 0 : u.detail) && u.detail.isSetNumber, h = this.userNumeralSet === "ascii";
4542
- if (i && !o && !f && h) {
4543
- const C = this.ui.telInput.selectionStart || 0, v = a.substring(
4538
+ this._updateCountryFromNumber(u) && this._triggerCountryChange();
4539
+ const c = (a == null ? void 0 : a.data) && at.NON_PLUS_NUMERIC.test(a.data), d = (a == null ? void 0 : a.inputType) === Ge.PASTE && u;
4540
+ c || d && !t ? o = !0 : at.NON_PLUS_NUMERIC.test(u) || (o = !1);
4541
+ const f = (a == null ? void 0 : a.detail) && a.detail.isSetNumber, p = this.userNumeralSet === "ascii";
4542
+ if (n && !o && !f && p) {
4543
+ const C = this.ui.telInput.selectionStart || 0, b = u.substring(
4544
4544
  0,
4545
4545
  C
4546
4546
  ).replace(
4547
- lt.NON_PLUS_NUMERIC_GLOBAL,
4547
+ at.NON_PLUS_NUMERIC_GLOBAL,
4548
4548
  ""
4549
- ).length, g = (u == null ? void 0 : u.inputType) === Ge.DELETE_FWD, m = this._getFullNumber(), p = Fs(
4549
+ ).length, g = (a == null ? void 0 : a.inputType) === Ge.DELETE_FWD, m = this._getFullNumber(), h = Vs(
4550
4550
  m,
4551
- a,
4551
+ u,
4552
4552
  _.utils,
4553
4553
  this.selectedCountryData,
4554
4554
  this.options.separateDialCode
4555
- ), y = Hs(
4556
- v,
4557
- p,
4555
+ ), v = Ws(
4556
+ b,
4557
+ h,
4558
4558
  C,
4559
4559
  g
4560
4560
  );
4561
- this._setTelInputValue(p), this.ui.telInput.setSelectionRange(y, y);
4561
+ this._setTelInputValue(h), this.ui.telInput.setSelectionRange(v, v);
4562
4562
  }
4563
4563
  };
4564
4564
  this.ui.telInput.addEventListener(
@@ -4570,20 +4570,20 @@ class Se {
4570
4570
  );
4571
4571
  }
4572
4572
  _maybeBindKeydownListener() {
4573
- const { strictMode: t, separateDialCode: i, allowDropdown: n, countrySearch: s } = this.options;
4574
- if (t || i) {
4573
+ const { strictMode: t, separateDialCode: n, allowDropdown: i, countrySearch: s } = this.options;
4574
+ if (t || n) {
4575
4575
  const r = (o) => {
4576
4576
  if (o.key && o.key.length === 1 && !o.altKey && !o.ctrlKey && !o.metaKey) {
4577
- if (i && n && s && o.key === "+") {
4577
+ if (n && i && s && o.key === "+") {
4578
4578
  o.preventDefault(), this._openDropdownWithPlus();
4579
4579
  return;
4580
4580
  }
4581
4581
  if (t) {
4582
- const l = this._getTelInputValue(), a = !l.startsWith("+") && this.ui.telInput.selectionStart === 0 && o.key === "+", c = this._normaliseNumerals(o.key), d = /^[0-9]$/.test(c), f = i ? d : a || d, h = this.ui.telInput, C = h.selectionStart, b = h.selectionEnd, v = l.slice(0, C), g = l.slice(b), m = v + o.key + g, p = this._getFullNumber(m), y = _.utils.getCoreNumber(
4583
- p,
4582
+ const l = this._getTelInputValue(), u = !l.startsWith("+") && this.ui.telInput.selectionStart === 0 && o.key === "+", c = this._normaliseNumerals(o.key), d = /^[0-9]$/.test(c), f = n ? d : u || d, p = this.ui.telInput, C = p.selectionStart, y = p.selectionEnd, b = l.slice(0, C), g = l.slice(y), m = b + o.key + g, h = this._getFullNumber(m), v = _.utils.getCoreNumber(
4583
+ h,
4584
4584
  this.selectedCountryData.iso2
4585
- ), T = this.maxCoreNumberLength && y.length > this.maxCoreNumberLength, O = this._getNewCountryFromNumber(p) !== null;
4586
- (!f || T && !O && !a) && o.preventDefault();
4585
+ ), T = this.maxCoreNumberLength && v.length > this.maxCoreNumberLength, O = this._getNewCountryFromNumber(h) !== null;
4586
+ (!f || T && !O && !u) && o.preventDefault();
4587
4587
  }
4588
4588
  }
4589
4589
  };
@@ -4594,26 +4594,26 @@ class Se {
4594
4594
  }
4595
4595
  _maybeBindPasteListener() {
4596
4596
  if (this.options.strictMode) {
4597
- const t = (i) => {
4598
- i.preventDefault();
4599
- const n = this.ui.telInput, s = n.selectionStart, r = n.selectionEnd, o = this._getTelInputValue(), l = o.slice(0, s), u = o.slice(r), a = this.selectedCountryData.iso2, c = i.clipboardData.getData("text"), d = this._normaliseNumerals(c), f = s === 0 && r > 0, h = !o.startsWith("+") || f, C = d.replace(lt.NON_PLUS_NUMERIC_GLOBAL, ""), b = C.startsWith("+"), v = C.replace(/\+/g, ""), g = b && h ? `+${v}` : v;
4600
- let m = l + g + u;
4597
+ const t = (n) => {
4598
+ n.preventDefault();
4599
+ const i = this.ui.telInput, s = i.selectionStart, r = i.selectionEnd, o = this._getTelInputValue(), l = o.slice(0, s), a = o.slice(r), u = this.selectedCountryData.iso2, c = n.clipboardData.getData("text"), d = this._normaliseNumerals(c), f = s === 0 && r > 0, p = !o.startsWith("+") || f, C = d.replace(at.NON_PLUS_NUMERIC_GLOBAL, ""), y = C.startsWith("+"), b = C.replace(/\+/g, ""), g = y && p ? `+${b}` : b;
4600
+ let m = l + g + a;
4601
4601
  if (m.length > 5) {
4602
- let y = _.utils.getCoreNumber(m, a);
4603
- for (; y.length === 0 && m.length > 0; )
4604
- m = m.slice(0, -1), y = _.utils.getCoreNumber(m, a);
4605
- if (!y)
4602
+ let v = _.utils.getCoreNumber(m, u);
4603
+ for (; v.length === 0 && m.length > 0; )
4604
+ m = m.slice(0, -1), v = _.utils.getCoreNumber(m, u);
4605
+ if (!v)
4606
4606
  return;
4607
- if (this.maxCoreNumberLength && y.length > this.maxCoreNumberLength)
4608
- if (n.selectionEnd === o.length) {
4609
- const T = y.length - this.maxCoreNumberLength;
4607
+ if (this.maxCoreNumberLength && v.length > this.maxCoreNumberLength)
4608
+ if (i.selectionEnd === o.length) {
4609
+ const T = v.length - this.maxCoreNumberLength;
4610
4610
  m = m.slice(0, m.length - T);
4611
4611
  } else
4612
4612
  return;
4613
4613
  }
4614
4614
  this._setTelInputValue(m);
4615
- const p = s + g.length;
4616
- n.setSelectionRange(p, p), n.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
4615
+ const h = s + g.length;
4616
+ i.setSelectionRange(h, h), i.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
4617
4617
  };
4618
4618
  this.ui.telInput.addEventListener("paste", t, {
4619
4619
  signal: this.abortController.signal
@@ -4622,35 +4622,35 @@ class Se {
4622
4622
  }
4623
4623
  //* Adhere to the input's maxlength attr.
4624
4624
  _cap(t) {
4625
- const i = Number(this.ui.telInput.getAttribute("maxlength"));
4626
- return i && t.length > i ? t.substring(0, i) : t;
4625
+ const n = Number(this.ui.telInput.getAttribute("maxlength"));
4626
+ return n && t.length > n ? t.substring(0, n) : t;
4627
4627
  }
4628
4628
  //* Trigger a custom event on the input (typed via ItiEventMap).
4629
- _trigger(t, i = {}) {
4630
- const n = new CustomEvent(t, {
4629
+ _trigger(t, n = {}) {
4630
+ const i = new CustomEvent(t, {
4631
4631
  bubbles: !0,
4632
4632
  cancelable: !0,
4633
- detail: i
4633
+ detail: n
4634
4634
  });
4635
- this.ui.telInput.dispatchEvent(n);
4635
+ this.ui.telInput.dispatchEvent(i);
4636
4636
  }
4637
4637
  //* Open the dropdown.
4638
4638
  _openDropdown() {
4639
- const { fixDropdownWidth: t, countrySearch: i } = this.options;
4640
- if (this.dropdownAbortController = new AbortController(), t && (this.ui.dropdownContent.style.width = `${this.ui.telInput.offsetWidth}px`), this.ui.dropdownContent.classList.remove(E.HIDE), this.ui.selectedCountry.setAttribute(A.EXPANDED, "true"), this._setDropdownPosition(), i) {
4641
- const n = this.ui.countryList.firstElementChild;
4642
- n && (this.ui.highlightListItem(n, !1), this.ui.countryList.scrollTop = 0), this.ui.searchInput.focus();
4639
+ const { fixDropdownWidth: t, countrySearch: n } = this.options;
4640
+ if (this.dropdownAbortController = new AbortController(), t && (this.ui.dropdownContent.style.width = `${this.ui.telInput.offsetWidth}px`), this.ui.dropdownContent.classList.remove(E.HIDE), this.ui.selectedCountry.setAttribute(D.EXPANDED, "true"), this._setDropdownPosition(), n) {
4641
+ const i = this.ui.countryList.firstElementChild;
4642
+ i && (this.ui.highlightListItem(i, !1), this.ui.countryList.scrollTop = 0), this.ui.searchInput.focus();
4643
4643
  }
4644
- this._bindDropdownListeners(), this.ui.dropdownArrow.classList.add(E.ARROW_UP), this._trigger(Wt.OPEN_COUNTRY_DROPDOWN);
4644
+ this._bindDropdownListeners(), this.ui.dropdownArrow.classList.add(E.ARROW_UP), this._trigger(Vt.OPEN_COUNTRY_DROPDOWN);
4645
4645
  }
4646
4646
  //* Set the dropdown position
4647
4647
  _setDropdownPosition() {
4648
4648
  if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.ui.dropdown), !this.options.useFullscreenPopup) {
4649
- const t = this.ui.telInput.getBoundingClientRect(), i = this.ui.telInput.offsetHeight;
4649
+ const t = this.ui.telInput.getBoundingClientRect(), n = this.ui.telInput.offsetHeight;
4650
4650
  if (this.options.dropdownContainer) {
4651
- this.ui.dropdown.style.top = `${t.top + i}px`, this.ui.dropdown.style.left = `${t.left}px`;
4652
- const n = () => this._closeDropdown();
4653
- window.addEventListener("scroll", n, {
4651
+ this.ui.dropdown.style.top = `${t.top + n}px`, this.ui.dropdown.style.left = `${t.left}px`;
4652
+ const i = () => this._closeDropdown();
4653
+ window.addEventListener("scroll", i, {
4654
4654
  signal: this.dropdownAbortController.signal
4655
4655
  });
4656
4656
  }
@@ -4664,16 +4664,16 @@ class Se {
4664
4664
  //* When mouse over a list item, just highlight that one
4665
4665
  //* we add the class "highlight", so if they hit "enter" we know which one to select.
4666
4666
  _bindDropdownMouseoverListener(t) {
4667
- const i = (n) => {
4667
+ const n = (i) => {
4668
4668
  var r;
4669
- const s = (r = n.target) == null ? void 0 : r.closest(
4669
+ const s = (r = i.target) == null ? void 0 : r.closest(
4670
4670
  `.${E.COUNTRY_ITEM}`
4671
4671
  );
4672
4672
  s && this.ui.highlightListItem(s, !1);
4673
4673
  };
4674
4674
  this.ui.countryList.addEventListener(
4675
4675
  "mouseover",
4676
- i,
4676
+ n,
4677
4677
  {
4678
4678
  signal: t
4679
4679
  }
@@ -4681,29 +4681,29 @@ class Se {
4681
4681
  }
4682
4682
  //* Listen for country selection.
4683
4683
  _bindDropdownCountryClickListener(t) {
4684
- const i = (n) => {
4684
+ const n = (i) => {
4685
4685
  var r;
4686
- const s = (r = n.target) == null ? void 0 : r.closest(
4686
+ const s = (r = i.target) == null ? void 0 : r.closest(
4687
4687
  `.${E.COUNTRY_ITEM}`
4688
4688
  );
4689
4689
  s && this._selectListItem(s);
4690
4690
  };
4691
- this.ui.countryList.addEventListener("click", i, {
4691
+ this.ui.countryList.addEventListener("click", n, {
4692
4692
  signal: t
4693
4693
  });
4694
4694
  }
4695
4695
  //* Click off to close (except when this initial opening click is bubbling up).
4696
4696
  //* We cannot just stopPropagation as it may be needed to close another instance.
4697
4697
  _bindDropdownClickOffListener(t) {
4698
- const i = (n) => {
4699
- !!n.target.closest(
4698
+ const n = (i) => {
4699
+ !!i.target.closest(
4700
4700
  `#iti-${this.id}__dropdown-content`
4701
4701
  ) || this._closeDropdown();
4702
4702
  };
4703
4703
  setTimeout(() => {
4704
4704
  document.documentElement.addEventListener(
4705
4705
  "click",
4706
- i,
4706
+ n,
4707
4707
  { signal: t }
4708
4708
  );
4709
4709
  }, 0);
@@ -4713,36 +4713,36 @@ class Se {
4713
4713
  //* just hit down and hold it to scroll down (no keyup event).
4714
4714
  //* Listen on the document because that's where key events are triggered if no input has focus.
4715
4715
  _bindDropdownKeydownListener(t) {
4716
- let i = "", n = null;
4716
+ let n = "", i = null;
4717
4717
  const s = (r) => {
4718
4718
  [
4719
- U.ARROW_UP,
4720
- U.ARROW_DOWN,
4721
- U.ENTER,
4722
- U.ESC
4723
- ].includes(r.key) && (r.preventDefault(), r.stopPropagation(), r.key === U.ARROW_UP || r.key === U.ARROW_DOWN ? this._handleUpDownKey(r.key) : r.key === U.ENTER ? this._handleEnterKey() : r.key === U.ESC && (this._closeDropdown(), this.ui.selectedCountry.focus())), !this.options.countrySearch && lt.HIDDEN_SEARCH_CHAR.test(r.key) && (r.stopPropagation(), n && clearTimeout(n), i += r.key.toLowerCase(), this._searchForCountry(i), n = setTimeout(() => {
4724
- i = "";
4725
- }, Es.HIDDEN_SEARCH_RESET_MS));
4719
+ M.ARROW_UP,
4720
+ M.ARROW_DOWN,
4721
+ M.ENTER,
4722
+ M.ESC
4723
+ ].includes(r.key) && (r.preventDefault(), r.stopPropagation(), r.key === M.ARROW_UP || r.key === M.ARROW_DOWN ? this._handleUpDownKey(r.key) : r.key === M.ENTER ? this._handleEnterKey() : r.key === M.ESC && (this._closeDropdown(), this.ui.selectedCountry.focus())), !this.options.countrySearch && at.HIDDEN_SEARCH_CHAR.test(r.key) && (r.stopPropagation(), i && clearTimeout(i), n += r.key.toLowerCase(), this._searchForCountry(n), i = setTimeout(() => {
4724
+ n = "";
4725
+ }, Ds.HIDDEN_SEARCH_RESET_MS));
4726
4726
  };
4727
4727
  document.addEventListener("keydown", s, { signal: t });
4728
4728
  }
4729
4729
  //* Search input listeners when countrySearch enabled.
4730
4730
  _bindDropdownSearchListeners(t) {
4731
- const i = () => {
4731
+ const n = () => {
4732
4732
  const o = this.ui.searchInput.value.trim();
4733
4733
  this._filterCountriesByQuery(o), this.ui.searchInput.value ? this.ui.searchClearButton.classList.remove(E.HIDE) : this.ui.searchClearButton.classList.add(E.HIDE);
4734
4734
  };
4735
- let n = null;
4735
+ let i = null;
4736
4736
  const s = () => {
4737
- n && clearTimeout(n), n = setTimeout(() => {
4738
- i(), n = null;
4737
+ i && clearTimeout(i), i = setTimeout(() => {
4738
+ n(), i = null;
4739
4739
  }, 100);
4740
4740
  };
4741
4741
  this.ui.searchInput.addEventListener("input", s, {
4742
4742
  signal: t
4743
4743
  });
4744
4744
  const r = () => {
4745
- this.ui.searchInput.value = "", this.ui.searchInput.focus(), i();
4745
+ this.ui.searchInput.value = "", this.ui.searchInput.focus(), n();
4746
4746
  };
4747
4747
  this.ui.searchClearButton.addEventListener("click", r, {
4748
4748
  signal: t
@@ -4750,22 +4750,22 @@ class Se {
4750
4750
  }
4751
4751
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
4752
4752
  _searchForCountry(t) {
4753
- const i = Ss(this.countries, t);
4754
- if (i) {
4755
- const n = i.nodeById[this.id];
4756
- this.ui.highlightListItem(n, !1), this.ui.scrollTo(n);
4753
+ const n = Ps(this.countries, t);
4754
+ if (n) {
4755
+ const i = n.nodeById[this.id];
4756
+ this.ui.highlightListItem(i, !1), this.ui.scrollTo(i);
4757
4757
  }
4758
4758
  }
4759
4759
  //* Country search: Filter the countries according to the search query.
4760
4760
  _filterCountriesByQuery(t) {
4761
- let i;
4762
- t === "" ? i = this.countries : i = Ls(this.countries, t), this.ui.filterCountries(i);
4761
+ let n;
4762
+ t === "" ? n = this.countries : n = Ts(this.countries, t), this.ui.filterCountries(n);
4763
4763
  }
4764
4764
  //* Highlight the next/prev item in the list (and ensure it is visible).
4765
4765
  _handleUpDownKey(t) {
4766
- var n, s;
4767
- let i = t === U.ARROW_UP ? (n = this.ui.highlightedItem) == null ? void 0 : n.previousElementSibling : (s = this.ui.highlightedItem) == null ? void 0 : s.nextElementSibling;
4768
- !i && this.ui.countryList.childElementCount > 1 && (i = t === U.ARROW_UP ? this.ui.countryList.lastElementChild : this.ui.countryList.firstElementChild), i && (this.ui.scrollTo(i), this.ui.highlightListItem(i, !1));
4766
+ var i, s;
4767
+ let n = t === M.ARROW_UP ? (i = this.ui.highlightedItem) == null ? void 0 : i.previousElementSibling : (s = this.ui.highlightedItem) == null ? void 0 : s.nextElementSibling;
4768
+ !n && this.ui.countryList.childElementCount > 1 && (n = t === M.ARROW_UP ? this.ui.countryList.lastElementChild : this.ui.countryList.firstElementChild), n && (this.ui.scrollTo(n), this.ui.highlightListItem(n, !1));
4769
4769
  }
4770
4770
  //* Select the currently highlighted item.
4771
4771
  _handleEnterKey() {
@@ -4774,47 +4774,47 @@ class Se {
4774
4774
  //* Update the input's value to the given val (format first if possible)
4775
4775
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
4776
4776
  _updateValFromNumber(t) {
4777
- let i = t;
4777
+ let n = t;
4778
4778
  if (this.options.formatOnDisplay && _.utils && this.selectedCountryData) {
4779
- const n = this.options.nationalMode || !i.startsWith("+") && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: r } = _.utils.numberFormat, o = n ? s : r;
4780
- i = _.utils.formatNumber(
4781
- i,
4779
+ const i = this.options.nationalMode || !n.startsWith("+") && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: r } = _.utils.numberFormat, o = i ? s : r;
4780
+ n = _.utils.formatNumber(
4781
+ n,
4782
4782
  this.selectedCountryData.iso2,
4783
4783
  o
4784
4784
  );
4785
4785
  }
4786
- i = this._beforeSetNumber(i), this._setTelInputValue(i);
4786
+ n = this._beforeSetNumber(n), this._setTelInputValue(n);
4787
4787
  }
4788
4788
  //* Check if need to select a new country based on the given number
4789
4789
  //* Note: called from _setInitialState, keyup handler, setNumber.
4790
4790
  _updateCountryFromNumber(t) {
4791
- const i = this._getNewCountryFromNumber(t);
4792
- return i !== null ? this._setCountry(i) : !1;
4791
+ const n = this._getNewCountryFromNumber(t);
4792
+ return n !== null ? this._setCountry(n) : !1;
4793
4793
  }
4794
4794
  // if there is a selected country, and the number doesn't start with a dial code, then add it
4795
4795
  _ensureHasDialCode(t) {
4796
- const { dialCode: i, nationalPrefix: n } = this.selectedCountryData;
4797
- if (t.startsWith("+") || !i)
4796
+ const { dialCode: n, nationalPrefix: i } = this.selectedCountryData;
4797
+ if (t.startsWith("+") || !n)
4798
4798
  return t;
4799
- const o = n && t.startsWith(n) && !this.options.separateDialCode ? t.substring(1) : t;
4800
- return `+${i}${o}`;
4799
+ const o = i && t.startsWith(i) && !this.options.separateDialCode ? t.substring(1) : t;
4800
+ return `+${n}${o}`;
4801
4801
  }
4802
4802
  // Get the country ISO2 code from the given number
4803
4803
  // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
4804
4804
  // NOTE: consider refactoring this to be more clear
4805
4805
  _getNewCountryFromNumber(t) {
4806
- const i = t.indexOf("+");
4807
- let n = i ? t.substring(i) : t;
4806
+ const n = t.indexOf("+");
4807
+ let i = n ? t.substring(n) : t;
4808
4808
  const s = this.selectedCountryData.iso2, r = this.selectedCountryData.dialCode;
4809
- n = this._ensureHasDialCode(n);
4810
- const o = this._getDialCode(n, !0), l = Gt(n);
4809
+ i = this._ensureHasDialCode(i);
4810
+ const o = this._getDialCode(i, !0), l = jt(i);
4811
4811
  if (o) {
4812
- const u = Gt(o), a = this.dialCodeToIso2Map[u];
4813
- if (a.length === 1)
4814
- return a[0] === s ? null : a[0];
4815
- if (!s && this.defaultCountry && a.includes(this.defaultCountry))
4812
+ const a = jt(o), u = this.dialCodeToIso2Map[a];
4813
+ if (u.length === 1)
4814
+ return u[0] === s ? null : u[0];
4815
+ if (!s && this.defaultCountry && u.includes(this.defaultCountry))
4816
4816
  return this.defaultCountry;
4817
- if (r === Oi.NANP && Ye(l))
4817
+ if (r === kn.NANP && Ye(l))
4818
4818
  return null;
4819
4819
  const { areaCodes: d, priority: f } = this.selectedCountryData;
4820
4820
  if (d) {
@@ -4825,31 +4825,31 @@ class Se {
4825
4825
  if (l.startsWith(m))
4826
4826
  return null;
4827
4827
  }
4828
- const C = d && !(f === 0) && l.length > u.length, b = s && a.includes(s) && !C, v = s === a[0];
4829
- if (!b && !v)
4830
- return a[0];
4831
- } else if (n.startsWith("+") && l.length) {
4832
- const u = this.selectedCountryData.dialCode || "";
4833
- return u && u.startsWith(l) ? null : "";
4834
- } else if ((!n || n === "+") && !s)
4828
+ const C = d && !(f === 0) && l.length > a.length, y = s && u.includes(s) && !C, b = s === u[0];
4829
+ if (!y && !b)
4830
+ return u[0];
4831
+ } else if (i.startsWith("+") && l.length) {
4832
+ const a = this.selectedCountryData.dialCode || "";
4833
+ return a && a.startsWith(l) ? null : "";
4834
+ } else if ((!i || i === "+") && !s)
4835
4835
  return this.defaultCountry;
4836
4836
  return null;
4837
4837
  }
4838
4838
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and selected list item.
4839
4839
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
4840
4840
  _setCountry(t) {
4841
- const { separateDialCode: i, showFlags: n, i18n: s, allowDropdown: r } = this.options, o = this.selectedCountryData.iso2 || "";
4841
+ const { separateDialCode: n, showFlags: i, i18n: s, allowDropdown: r } = this.options, o = this.selectedCountryData.iso2 || "";
4842
4842
  if (r && this.ui.updateSelectedItem(t), this.selectedCountryData = t ? this.countryByIso2.get(t) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.ui.selectedCountry) {
4843
- const l = t && n ? `${E.FLAG} iti__${t}` : `${E.FLAG} ${E.GLOBE}`;
4844
- let u, a;
4843
+ const l = t && i ? `${E.FLAG} iti__${t}` : `${E.FLAG} ${E.GLOBE}`;
4844
+ let a, u;
4845
4845
  if (t) {
4846
4846
  const { name: c, dialCode: d } = this.selectedCountryData;
4847
- a = c, u = s.selectedCountryAriaLabel.replace("${countryName}", c).replace("${dialCode}", `+${d}`);
4847
+ u = c, a = s.selectedCountryAriaLabel.replace("${countryName}", c).replace("${dialCode}", `+${d}`);
4848
4848
  } else
4849
- a = s.noCountrySelected, u = s.noCountrySelected;
4850
- this.ui.selectedCountryInner.className = l, this.ui.selectedCountry.setAttribute("title", a), this.ui.selectedCountry.setAttribute(A.LABEL, u);
4849
+ u = s.noCountrySelected, a = s.noCountrySelected;
4850
+ this.ui.selectedCountryInner.className = l, this.ui.selectedCountry.setAttribute("title", u), this.ui.selectedCountry.setAttribute(D.LABEL, a);
4851
4851
  }
4852
- if (i) {
4852
+ if (n) {
4853
4853
  const l = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
4854
4854
  this.ui.selectedDialCode.textContent = l, this.ui.updateInputPadding();
4855
4855
  }
@@ -4857,10 +4857,10 @@ class Se {
4857
4857
  }
4858
4858
  //* Update the maximum valid number length for the currently selected country.
4859
4859
  _updateMaxLength() {
4860
- const { strictMode: t, placeholderNumberType: i, validationNumberTypes: n } = this.options, { iso2: s } = this.selectedCountryData;
4860
+ const { strictMode: t, placeholderNumberType: n, validationNumberTypes: i } = this.options, { iso2: s } = this.selectedCountryData;
4861
4861
  if (t && _.utils)
4862
4862
  if (s) {
4863
- const r = _.utils.numberType[i];
4863
+ const r = _.utils.numberType[n];
4864
4864
  let o = _.utils.getExampleNumber(
4865
4865
  s,
4866
4866
  !1,
@@ -4870,11 +4870,11 @@ class Se {
4870
4870
  for (; _.utils.isPossibleNumber(
4871
4871
  o,
4872
4872
  s,
4873
- n
4873
+ i
4874
4874
  ); )
4875
4875
  l = o, o += "0";
4876
- const u = _.utils.getCoreNumber(l, s);
4877
- this.maxCoreNumberLength = u.length, s === "by" && (this.maxCoreNumberLength = u.length + 1);
4876
+ const a = _.utils.getCoreNumber(l, s);
4877
+ this.maxCoreNumberLength = a.length, s === "by" && (this.maxCoreNumberLength = a.length + 1);
4878
4878
  } else
4879
4879
  this.maxCoreNumberLength = null;
4880
4880
  }
@@ -4882,15 +4882,15 @@ class Se {
4882
4882
  _updatePlaceholder() {
4883
4883
  const {
4884
4884
  autoPlaceholder: t,
4885
- placeholderNumberType: i,
4886
- nationalMode: n,
4885
+ placeholderNumberType: n,
4886
+ nationalMode: i,
4887
4887
  customPlaceholder: s
4888
- } = this.options, r = t === ye.AGGRESSIVE || !this.ui.hadInitialPlaceholder && t === ye.POLITE;
4888
+ } = this.options, r = t === me.AGGRESSIVE || !this.ui.hadInitialPlaceholder && t === me.POLITE;
4889
4889
  if (_.utils && r) {
4890
- const o = _.utils.numberType[i];
4890
+ const o = _.utils.numberType[n];
4891
4891
  let l = this.selectedCountryData.iso2 ? _.utils.getExampleNumber(
4892
4892
  this.selectedCountryData.iso2,
4893
- n,
4893
+ i,
4894
4894
  o
4895
4895
  ) : "";
4896
4896
  l = this._beforeSetNumber(l), typeof s == "function" && (l = s(l, this.selectedCountryData)), this.ui.telInput.setAttribute("placeholder", l);
@@ -4898,33 +4898,33 @@ class Se {
4898
4898
  }
4899
4899
  //* Called when the user selects a list item from the dropdown.
4900
4900
  _selectListItem(t) {
4901
- const i = t.dataset[Ke.COUNTRY_CODE], n = this._setCountry(i);
4901
+ const n = t.dataset[Ke.COUNTRY_CODE], i = this._setCountry(n);
4902
4902
  this._closeDropdown();
4903
4903
  const s = t.dataset[Ke.DIAL_CODE];
4904
4904
  if (this._updateDialCode(s), this.options.formatOnDisplay) {
4905
4905
  const r = this._getTelInputValue();
4906
4906
  this._updateValFromNumber(r);
4907
4907
  }
4908
- this.ui.telInput.focus(), n && this._triggerCountryChange();
4908
+ this.ui.telInput.focus(), i && this._triggerCountryChange();
4909
4909
  }
4910
4910
  //* Close the dropdown and unbind any listeners.
4911
4911
  _closeDropdown() {
4912
- this.ui.dropdownContent.classList.contains(E.HIDE) || (this.ui.dropdownContent.classList.add(E.HIDE), this.ui.selectedCountry.setAttribute(A.EXPANDED, "false"), this.options.countrySearch && (this.ui.searchInput.removeAttribute(A.ACTIVE_DESCENDANT), this.ui.highlightedItem && (this.ui.highlightedItem.classList.remove(E.HIGHLIGHT), this.ui.highlightedItem = null)), this.ui.dropdownArrow.classList.remove(E.ARROW_UP), this.dropdownAbortController.abort(), this.dropdownAbortController = null, this.options.dropdownContainer && this.ui.dropdown.remove(), this._trigger(Wt.CLOSE_COUNTRY_DROPDOWN));
4912
+ this.ui.dropdownContent.classList.contains(E.HIDE) || (this.ui.dropdownContent.classList.add(E.HIDE), this.ui.selectedCountry.setAttribute(D.EXPANDED, "false"), this.options.countrySearch && (this.ui.searchInput.removeAttribute(D.ACTIVE_DESCENDANT), this.ui.highlightedItem && (this.ui.highlightedItem.classList.remove(E.HIGHLIGHT), this.ui.highlightedItem = null)), this.ui.dropdownArrow.classList.remove(E.ARROW_UP), this.dropdownAbortController.abort(), this.dropdownAbortController = null, this.options.dropdownContainer && this.ui.dropdown.remove(), this._trigger(Vt.CLOSE_COUNTRY_DROPDOWN));
4913
4913
  }
4914
4914
  //* Replace any existing dial code with the new one
4915
4915
  //* Note: called from _selectListItem and setCountry
4916
4916
  _updateDialCode(t) {
4917
- const i = this._getTelInputValue(), n = `+${t}`;
4917
+ const n = this._getTelInputValue(), i = `+${t}`;
4918
4918
  let s;
4919
- if (i.startsWith("+")) {
4920
- const r = this._getDialCode(i);
4921
- r ? s = i.replace(r, n) : s = n, this._setTelInputValue(s);
4919
+ if (n.startsWith("+")) {
4920
+ const r = this._getDialCode(n);
4921
+ r ? s = n.replace(r, i) : s = i, this._setTelInputValue(s);
4922
4922
  }
4923
4923
  }
4924
4924
  //* Try and extract a valid international dial code from a full telephone number.
4925
4925
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
4926
- _getDialCode(t, i) {
4927
- let n = "";
4926
+ _getDialCode(t, n) {
4927
+ let i = "";
4928
4928
  if (t.startsWith("+")) {
4929
4929
  let s = "", r = !1;
4930
4930
  for (let o = 0; o < t.length; o++) {
@@ -4933,43 +4933,43 @@ class Se {
4933
4933
  if (s += l, !!!this.dialCodeToIso2Map[s])
4934
4934
  break;
4935
4935
  if (this.dialCodes.has(s)) {
4936
- if (n = t.substring(0, o + 1), r = !0, !i)
4936
+ if (i = t.substring(0, o + 1), r = !0, !n)
4937
4937
  break;
4938
- } else i && r && (n = t.substring(0, o + 1));
4938
+ } else n && r && (i = t.substring(0, o + 1));
4939
4939
  if (s.length === this.dialCodeMaxLen)
4940
4940
  break;
4941
4941
  }
4942
4942
  }
4943
4943
  }
4944
- return n;
4944
+ return i;
4945
4945
  }
4946
4946
  //* Get the input val, adding the dial code if separateDialCode is enabled.
4947
4947
  _getFullNumber(t) {
4948
- const i = t ? this._normaliseNumerals(t) : this._getTelInputValue(), { dialCode: n } = this.selectedCountryData;
4948
+ const n = t ? this._normaliseNumerals(t) : this._getTelInputValue(), { dialCode: i } = this.selectedCountryData;
4949
4949
  let s;
4950
- const r = Gt(i);
4951
- return this.options.separateDialCode && !i.startsWith("+") && n && r ? s = `+${n}` : s = "", s + i;
4950
+ const r = jt(n);
4951
+ return this.options.separateDialCode && !n.startsWith("+") && i && r ? s = `+${i}` : s = "", s + n;
4952
4952
  }
4953
4953
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
4954
4954
  _beforeSetNumber(t) {
4955
- const i = this._getDialCode(t), n = Bs(
4955
+ const n = this._getDialCode(t), i = Hs(
4956
4956
  t,
4957
- i,
4957
+ n,
4958
4958
  this.options.separateDialCode,
4959
4959
  this.selectedCountryData
4960
4960
  );
4961
- return this._cap(n);
4961
+ return this._cap(i);
4962
4962
  }
4963
4963
  //* Trigger the 'countrychange' event.
4964
4964
  _triggerCountryChange() {
4965
- this._trigger(Wt.COUNTRY_CHANGE);
4965
+ this._trigger(Vt.COUNTRY_CHANGE);
4966
4966
  }
4967
4967
  //**************************
4968
4968
  //* SECRET PUBLIC METHODS
4969
4969
  //**************************
4970
4970
  //* This is called when the geoip call returns.
4971
4971
  handleAutoCountry() {
4972
- this.options.initialCountry === le.AUTO && _.autoCountry && (this.defaultCountry = _.autoCountry, this.selectedCountryData.iso2 || this.ui.selectedCountryInner.classList.contains(E.GLOBE) || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
4972
+ this.options.initialCountry === oe.AUTO && _.autoCountry && (this.defaultCountry = _.autoCountry, this.selectedCountryData.iso2 || this.ui.selectedCountryInner.classList.contains(E.GLOBE) || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
4973
4973
  }
4974
4974
  //* This is called when the utils request completes.
4975
4975
  handleUtils() {
@@ -4996,9 +4996,9 @@ class Se {
4996
4996
  //* Format the number to the given format.
4997
4997
  getNumber(t) {
4998
4998
  if (_.utils) {
4999
- const { iso2: i } = this.selectedCountryData, n = this._getFullNumber(), s = _.utils.formatNumber(
5000
- n,
4999
+ const { iso2: n } = this.selectedCountryData, i = this._getFullNumber(), s = _.utils.formatNumber(
5001
5000
  i,
5001
+ n,
5002
5002
  t
5003
5003
  );
5004
5004
  return this._mapAsciiToUserNumerals(s);
@@ -5026,10 +5026,10 @@ class Se {
5026
5026
  }
5027
5027
  //* Validate the input val using number length only
5028
5028
  isValidNumber() {
5029
- const { dialCode: t, iso2: i } = this.selectedCountryData;
5030
- if (t === oe.DIAL_CODE && _.utils) {
5031
- const n = this._getFullNumber(), s = _.utils.getCoreNumber(n, i);
5032
- if (s[0] === oe.MOBILE_PREFIX && s.length !== oe.MOBILE_CORE_LENGTH)
5029
+ const { dialCode: t, iso2: n } = this.selectedCountryData;
5030
+ if (t === re.DIAL_CODE && _.utils) {
5031
+ const i = this._getFullNumber(), s = _.utils.getCoreNumber(i, n);
5032
+ if (s[0] === re.MOBILE_PREFIX && s.length !== re.MOBILE_CORE_LENGTH)
5033
5033
  return !1;
5034
5034
  }
5035
5035
  return this._validateNumber(!1);
@@ -5051,12 +5051,12 @@ class Se {
5051
5051
  return null;
5052
5052
  if (!this.selectedCountryData.iso2)
5053
5053
  return !1;
5054
- const i = (o) => t ? this._utilsIsValidNumber(o) : this._utilsIsPossibleNumber(o), n = this._getFullNumber(), s = n.search(lt.ALPHA_UNICODE);
5054
+ const n = (o) => t ? this._utilsIsValidNumber(o) : this._utilsIsPossibleNumber(o), i = this._getFullNumber(), s = i.search(at.ALPHA_UNICODE);
5055
5055
  if (s > -1 && !this.options.allowPhonewords) {
5056
- const o = n.substring(0, s), l = i(o), u = i(n);
5057
- return l && u;
5056
+ const o = i.substring(0, s), l = n(o), a = n(i);
5057
+ return l && a;
5058
5058
  }
5059
- return i(n);
5059
+ return n(i);
5060
5060
  }
5061
5061
  _utilsIsValidNumber(t) {
5062
5062
  return _.utils ? _.utils.isValidNumber(
@@ -5067,12 +5067,12 @@ class Se {
5067
5067
  }
5068
5068
  //* Update the selected country, and update the input val accordingly.
5069
5069
  setCountry(t) {
5070
- const i = t == null ? void 0 : t.toLowerCase();
5071
- if (!ce(i))
5072
- throw new Error(`Invalid country code: '${i}'`);
5073
- const n = this.selectedCountryData.iso2;
5074
- if (t && i !== n || !t && n) {
5075
- if (this._setCountry(i), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay) {
5070
+ const n = t == null ? void 0 : t.toLowerCase();
5071
+ if (!ue(n))
5072
+ throw new Error(`Invalid country code: '${n}'`);
5073
+ const i = this.selectedCountryData.iso2;
5074
+ if (t && n !== i || !t && i) {
5075
+ if (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay) {
5076
5076
  const r = this._getTelInputValue();
5077
5077
  this._updateValFromNumber(r);
5078
5078
  }
@@ -5081,8 +5081,8 @@ class Se {
5081
5081
  }
5082
5082
  //* Set the input value and update the country.
5083
5083
  setNumber(t) {
5084
- const i = this._normaliseNumerals(t), n = this._updateCountryFromNumber(i);
5085
- this._updateValFromNumber(i), n && this._triggerCountryChange(), this._trigger(Wt.INPUT, { isSetNumber: !0 });
5084
+ const n = this._normaliseNumerals(t), i = this._updateCountryFromNumber(n);
5085
+ this._updateValFromNumber(n), i && this._triggerCountryChange(), this._trigger(Vt.INPUT, { isSetNumber: !0 });
5086
5086
  }
5087
5087
  //* Set the placeholder number typ
5088
5088
  setPlaceholderNumberType(t) {
@@ -5092,14 +5092,14 @@ class Se {
5092
5092
  this.ui.telInput.disabled = t, t ? this.ui.selectedCountry.setAttribute("disabled", "true") : this.ui.selectedCountry.removeAttribute("disabled");
5093
5093
  }
5094
5094
  }
5095
- const Gs = (e) => {
5095
+ const Ks = (e) => {
5096
5096
  if (!_.utils && !_.startedLoadingUtilsScript) {
5097
5097
  let t;
5098
5098
  if (typeof e == "function")
5099
5099
  try {
5100
5100
  t = Promise.resolve(e());
5101
- } catch (i) {
5102
- return Promise.reject(i);
5101
+ } catch (n) {
5102
+ return Promise.reject(n);
5103
5103
  }
5104
5104
  else
5105
5105
  return Promise.reject(
@@ -5107,34 +5107,34 @@ const Gs = (e) => {
5107
5107
  `The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof e}`
5108
5108
  )
5109
5109
  );
5110
- return _.startedLoadingUtilsScript = !0, t.then((i) => {
5111
- const n = i == null ? void 0 : i.default;
5112
- if (!n || typeof n != "object")
5110
+ return _.startedLoadingUtilsScript = !0, t.then((n) => {
5111
+ const i = n == null ? void 0 : n.default;
5112
+ if (!i || typeof i != "object")
5113
5113
  throw new TypeError(
5114
5114
  "The loader function passed to attachUtils did not resolve to a module object with utils as its default export."
5115
5115
  );
5116
- return _.utils = n, kt("handleUtils"), !0;
5117
- }).catch((i) => {
5118
- throw kt("rejectUtilsScriptPromise", i), i;
5116
+ return _.utils = i, kt("handleUtils"), !0;
5117
+ }).catch((n) => {
5118
+ throw kt("rejectUtilsScriptPromise", n), n;
5119
5119
  });
5120
5120
  }
5121
5121
  return null;
5122
5122
  }, kt = (e, ...t) => {
5123
- Object.values(_.instances).forEach((i) => {
5124
- const n = i[e];
5125
- typeof n == "function" && n.apply(i, t);
5123
+ Object.values(_.instances).forEach((n) => {
5124
+ const i = n[e];
5125
+ typeof i == "function" && i.apply(n, t);
5126
5126
  });
5127
5127
  }, _ = Object.assign(
5128
5128
  (e, t) => {
5129
- const i = new Se(e, t);
5130
- return _.instances[i.id] = i, e.iti = i, i;
5129
+ const n = new Se(e, t);
5130
+ return _.instances[n.id] = n, e.iti = n, n;
5131
5131
  },
5132
5132
  {
5133
- defaults: Ri,
5133
+ defaults: Mn,
5134
5134
  //* Using a static var like this allows us to mock it in the tests.
5135
5135
  documentReady: () => document.readyState === "complete",
5136
5136
  //* Get the country data object.
5137
- getCountryData: () => ht,
5137
+ getCountryData: () => _t,
5138
5138
  //* A getter for the plugin instance.
5139
5139
  getInstance: (e) => {
5140
5140
  const t = e.dataset.intlTelInputId;
@@ -5142,44 +5142,44 @@ const Gs = (e) => {
5142
5142
  },
5143
5143
  //* A map from instance ID to instance object.
5144
5144
  instances: {},
5145
- attachUtils: Gs,
5145
+ attachUtils: Ks,
5146
5146
  startedLoadingUtilsScript: !1,
5147
5147
  startedLoadingAutoCountry: !1,
5148
- version: "25.15.0"
5148
+ version: "25.15.1"
5149
5149
  }
5150
5150
  );
5151
- var zs = /* @__PURE__ */ es("<input/>");
5152
- function $s(e, t) {
5153
- mn(t, !0);
5154
- let i = Vt(t, "disabled", 3, !1), n = Vt(t, "inputProps", 19, () => ({})), s = Vt(t, "options", 19, () => ({})), r = Vt(t, "value", 3, ""), o = /* @__PURE__ */ z(void 0), l = /* @__PURE__ */ z(void 0), u = /* @__PURE__ */ z(null), a = /* @__PURE__ */ z(!1);
5151
+ var Ys = /* @__PURE__ */ is("<input/>");
5152
+ function Qs(e, t) {
5153
+ yi(t, !0);
5154
+ let n = Ht(t, "disabled", 3, !1), i = Ht(t, "inputProps", 19, () => ({})), s = Ht(t, "options", 19, () => ({})), r = Ht(t, "value", 3, ""), o = /* @__PURE__ */ G(void 0), l = /* @__PURE__ */ G(void 0), a = /* @__PURE__ */ G(null), u = /* @__PURE__ */ G(!1);
5155
5155
  const c = () => I(l) ? s().strictMode ? I(l).isValidNumberPrecise() : I(l).isValidNumber() : null, d = () => {
5156
- var p, y;
5156
+ var h, v;
5157
5157
  const m = c();
5158
- I(u) !== m && (W(u, m, !0), (p = t.onChangeValidity) == null || p.call(t, !!m), (y = t.onChangeErrorCode) == null || y.call(t, m ? null : I(l).getValidationError()));
5158
+ I(a) !== m && (V(a, m, !0), (h = t.onChangeValidity) == null || h.call(t, !!m), (v = t.onChangeErrorCode) == null || v.call(t, m ? null : I(l).getValidationError()));
5159
5159
  }, f = () => {
5160
- var m, p;
5161
- (p = t.onChangeNumber) == null || p.call(t, ((m = I(l)) == null ? void 0 : m.getNumber()) ?? ""), d();
5162
- }, h = () => {
5163
- var m, p;
5164
- (p = t.onChangeCountry) == null || p.call(t, ((m = I(l)) == null ? void 0 : m.getSelectedCountryData().iso2) ?? ""), f();
5160
+ var m, h;
5161
+ (h = t.onChangeNumber) == null || h.call(t, ((m = I(l)) == null ? void 0 : m.getNumber()) ?? ""), d();
5162
+ }, p = () => {
5163
+ var m, h;
5164
+ (h = t.onChangeCountry) == null || h.call(t, ((m = I(l)) == null ? void 0 : m.getSelectedCountryData().iso2) ?? ""), f();
5165
5165
  };
5166
- Fi(() => {
5167
- I(o) && (W(l, _(I(o), s()), !0), I(o).addEventListener("countrychange", h), r() && I(l).setNumber(r()), i() && I(l).setDisabled(i()), W(u, c(), !0), W(a, !0));
5168
- }), Hi(() => {
5166
+ Vn(() => {
5167
+ I(o) && (V(l, _(I(o), s()), !0), I(o).addEventListener("countrychange", p), r() && I(l).setNumber(r()), n() && I(l).setDisabled(n()), V(a, c(), !0), V(u, !0));
5168
+ }), Wn(() => {
5169
5169
  var m;
5170
- I(o) && I(o).removeEventListener("countrychange", h), (m = I(l)) == null || m.destroy();
5171
- }), Fn(() => {
5172
- I(a) && I(l) && I(l).setDisabled(i());
5170
+ I(o) && I(o).removeEventListener("countrychange", p), (m = I(l)) == null || m.destroy();
5171
+ }), Wi(() => {
5172
+ I(u) && I(l) && I(l).setDisabled(n());
5173
5173
  });
5174
5174
  function C() {
5175
5175
  return I(l);
5176
5176
  }
5177
- function b() {
5177
+ function y() {
5178
5178
  return I(o);
5179
5179
  }
5180
- var v = { getInstance: C, getInput: b }, g = zs();
5181
- return ms(g, () => ({ type: "tel", oninput: f, ...n() }), void 0, void 0, void 0, void 0, !0), ys(g, (m) => W(o, m), () => I(o)), is(e, g), yn(v);
5180
+ var b = { getInstance: C, getInput: y }, g = Ys();
5181
+ return vs(g, () => ({ type: "tel", oninput: f, ...i() }), void 0, void 0, void 0, void 0, !0), bs(g, (m) => V(o, m), () => I(o)), ss(e, g), vi(b);
5182
5182
  }
5183
5183
  export {
5184
- $s as default
5184
+ Qs as default
5185
5185
  };