intl-tel-input 25.15.0 → 26.0.0-beta.0

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 (214) hide show
  1. package/README.md +22 -38
  2. package/angular/build/IntlTelInput.js +78 -324
  3. package/angular/build/IntlTelInputWithUtils.js +78 -324
  4. package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +3 -6
  5. package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +3 -6
  6. package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +3 -6
  7. package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +3 -6
  8. package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +3 -6
  9. package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +3 -6
  10. package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +3 -6
  11. package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +3 -6
  12. package/angular/build/types/intl-tel-input/i18n/ee/index.d.ts +3 -6
  13. package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +3 -6
  14. package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +3 -6
  15. package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +3 -6
  16. package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +3 -6
  17. package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +3 -6
  18. package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +3 -6
  19. package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +3 -6
  20. package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +3 -6
  21. package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +3 -6
  22. package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +3 -6
  23. package/angular/build/types/intl-tel-input/i18n/index.d.ts +43 -43
  24. package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +3 -6
  25. package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +3 -6
  26. package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +3 -6
  27. package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +3 -6
  28. package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +3 -6
  29. package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +3 -6
  30. package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +3 -6
  31. package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +3 -6
  32. package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +3 -6
  33. package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +3 -6
  34. package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +3 -6
  35. package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +3 -6
  36. package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +3 -6
  37. package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +3 -6
  38. package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +3 -6
  39. package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +3 -6
  40. package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +3 -6
  41. package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +3 -6
  42. package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +3 -6
  43. package/angular/build/types/intl-tel-input/i18n/types.d.ts +2 -4
  44. package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +3 -6
  45. package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +3 -6
  46. package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +3 -6
  47. package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +3 -6
  48. package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +3 -6
  49. package/angular/build/types/intl-tel-input.d.ts +1 -1
  50. package/angular/build/types/modules/constants.d.ts +1 -1
  51. package/angular/build/types/modules/core/icons.d.ts +2 -0
  52. package/angular/build/types/modules/core/options.d.ts +1 -2
  53. package/angular/build/types/modules/core/ui.d.ts +2 -3
  54. package/angular/build/types/modules/data/country-data.d.ts +2 -2
  55. package/angular/build/types/modules/format/formatting.d.ts +2 -2
  56. package/angular/build/types/modules/types/public-api.d.ts +3 -1
  57. package/build/css/demo.css +1 -3
  58. package/build/css/intlTelInput-no-assets.css +17 -19
  59. package/build/css/intlTelInput-no-assets.min.css +1 -1
  60. package/build/css/intlTelInput.css +18 -21
  61. package/build/css/intlTelInput.min.css +1 -1
  62. package/build/js/data.js +1 -1
  63. package/build/js/data.min.js +1 -1
  64. package/build/js/i18n/ar/index.js +23 -5
  65. package/build/js/i18n/bg/index.js +17 -5
  66. package/build/js/i18n/bn/index.js +17 -5
  67. package/build/js/i18n/bs/index.js +23 -5
  68. package/build/js/i18n/ca/index.js +17 -5
  69. package/build/js/i18n/cs/index.js +20 -5
  70. package/build/js/i18n/da/index.js +17 -5
  71. package/build/js/i18n/de/index.js +17 -5
  72. package/build/js/i18n/ee/index.js +17 -5
  73. package/build/js/i18n/el/index.js +17 -5
  74. package/build/js/i18n/en/index.js +18 -5
  75. package/build/js/i18n/es/index.js +17 -5
  76. package/build/js/i18n/fa/index.js +17 -5
  77. package/build/js/i18n/fi/index.js +17 -5
  78. package/build/js/i18n/fr/index.js +17 -5
  79. package/build/js/i18n/hi/index.js +17 -5
  80. package/build/js/i18n/hr/index.js +23 -5
  81. package/build/js/i18n/hu/index.js +17 -5
  82. package/build/js/i18n/id/index.js +17 -5
  83. package/build/js/i18n/index.js +43 -43
  84. package/build/js/i18n/it/index.js +17 -5
  85. package/build/js/i18n/ja/index.js +17 -5
  86. package/build/js/i18n/ko/index.js +17 -5
  87. package/build/js/i18n/lt/index.js +26 -5
  88. package/build/js/i18n/mr/index.js +17 -5
  89. package/build/js/i18n/nl/index.js +17 -5
  90. package/build/js/i18n/no/index.js +17 -5
  91. package/build/js/i18n/pl/index.js +21 -5
  92. package/build/js/i18n/pt/index.js +17 -5
  93. package/build/js/i18n/ro/index.js +21 -5
  94. package/build/js/i18n/ru/index.js +23 -5
  95. package/build/js/i18n/sk/index.js +23 -5
  96. package/build/js/i18n/sl/index.js +25 -5
  97. package/build/js/i18n/sq/index.js +18 -5
  98. package/build/js/i18n/sr/index.js +24 -5
  99. package/build/js/i18n/sv/index.js +17 -5
  100. package/build/js/i18n/te/index.js +17 -5
  101. package/build/js/i18n/th/index.js +17 -5
  102. package/build/js/i18n/tr/index.js +17 -5
  103. package/build/js/i18n/uk/index.js +23 -5
  104. package/build/js/i18n/ur/index.js +17 -5
  105. package/build/js/i18n/uz/index.js +17 -5
  106. package/build/js/i18n/vi/index.js +17 -5
  107. package/build/js/i18n/zh/index.js +17 -5
  108. package/build/js/intlTelInput.d.ts +118 -677
  109. package/build/js/intlTelInput.js +79 -329
  110. package/build/js/intlTelInput.min.js +8 -4
  111. package/build/js/intlTelInputWithUtils.js +79 -329
  112. package/build/js/intlTelInputWithUtils.min.js +7 -3
  113. package/package.json +10 -4
  114. package/react/build/IntlTelInput.cjs +78 -328
  115. package/react/build/IntlTelInput.d.ts +118 -677
  116. package/react/build/IntlTelInput.js +78 -328
  117. package/react/build/IntlTelInputWithUtils.cjs +78 -328
  118. package/react/build/IntlTelInputWithUtils.js +78 -328
  119. package/svelte/build/IntlTelInput.mjs +1170 -1413
  120. package/svelte/build/IntlTelInputWithUtils.mjs +935 -1178
  121. package/vue/build/exports/IntlTelInput.mjs +1 -1
  122. package/vue/build/exports/IntlTelInputWithUtils.mjs +1 -1
  123. package/vue/build/{intl-tel-input-Db39yQmC.mjs → intl-tel-input-BY4WpieT.mjs} +136 -138
  124. package/vue/build/modules/core/ui.d.ts +0 -1
  125. package/vue/build/modules/format/formatting.d.ts +1 -1
  126. package/vue/build/modules/types/public-api.d.ts +2 -1
  127. package/build/js/i18n/ar/countries.js +0 -245
  128. package/build/js/i18n/ar/interface.js +0 -23
  129. package/build/js/i18n/bg/countries.js +0 -245
  130. package/build/js/i18n/bg/interface.js +0 -13
  131. package/build/js/i18n/bn/countries.js +0 -245
  132. package/build/js/i18n/bn/interface.js +0 -13
  133. package/build/js/i18n/bs/countries.js +0 -245
  134. package/build/js/i18n/bs/interface.js +0 -20
  135. package/build/js/i18n/ca/countries.js +0 -245
  136. package/build/js/i18n/ca/interface.js +0 -13
  137. package/build/js/i18n/cs/countries.js +0 -245
  138. package/build/js/i18n/cs/interface.js +0 -20
  139. package/build/js/i18n/da/countries.js +0 -245
  140. package/build/js/i18n/da/interface.js +0 -13
  141. package/build/js/i18n/de/countries.js +0 -245
  142. package/build/js/i18n/de/interface.js +0 -13
  143. package/build/js/i18n/ee/countries.js +0 -245
  144. package/build/js/i18n/ee/interface.js +0 -13
  145. package/build/js/i18n/el/countries.js +0 -245
  146. package/build/js/i18n/el/interface.js +0 -13
  147. package/build/js/i18n/en/countries.js +0 -245
  148. package/build/js/i18n/en/interface.js +0 -14
  149. package/build/js/i18n/es/countries.js +0 -245
  150. package/build/js/i18n/es/interface.js +0 -13
  151. package/build/js/i18n/fa/countries.js +0 -245
  152. package/build/js/i18n/fa/interface.js +0 -13
  153. package/build/js/i18n/fi/countries.js +0 -245
  154. package/build/js/i18n/fi/interface.js +0 -13
  155. package/build/js/i18n/fr/countries.js +0 -245
  156. package/build/js/i18n/fr/interface.js +0 -13
  157. package/build/js/i18n/hi/countries.js +0 -245
  158. package/build/js/i18n/hi/interface.js +0 -13
  159. package/build/js/i18n/hr/countries.js +0 -245
  160. package/build/js/i18n/hr/interface.js +0 -20
  161. package/build/js/i18n/hu/countries.js +0 -245
  162. package/build/js/i18n/hu/interface.js +0 -13
  163. package/build/js/i18n/id/countries.js +0 -245
  164. package/build/js/i18n/id/interface.js +0 -13
  165. package/build/js/i18n/it/countries.js +0 -245
  166. package/build/js/i18n/it/interface.js +0 -13
  167. package/build/js/i18n/ja/countries.js +0 -245
  168. package/build/js/i18n/ja/interface.js +0 -13
  169. package/build/js/i18n/ko/countries.js +0 -245
  170. package/build/js/i18n/ko/interface.js +0 -13
  171. package/build/js/i18n/lt/countries.js +0 -245
  172. package/build/js/i18n/lt/interface.js +0 -26
  173. package/build/js/i18n/mr/countries.js +0 -245
  174. package/build/js/i18n/mr/interface.js +0 -13
  175. package/build/js/i18n/nl/countries.js +0 -245
  176. package/build/js/i18n/nl/interface.js +0 -13
  177. package/build/js/i18n/no/countries.js +0 -245
  178. package/build/js/i18n/no/interface.js +0 -13
  179. package/build/js/i18n/pl/countries.js +0 -245
  180. package/build/js/i18n/pl/interface.js +0 -19
  181. package/build/js/i18n/pt/countries.js +0 -245
  182. package/build/js/i18n/pt/interface.js +0 -13
  183. package/build/js/i18n/ro/countries.js +0 -245
  184. package/build/js/i18n/ro/interface.js +0 -18
  185. package/build/js/i18n/ru/countries.js +0 -245
  186. package/build/js/i18n/ru/interface.js +0 -20
  187. package/build/js/i18n/sk/countries.js +0 -245
  188. package/build/js/i18n/sk/interface.js +0 -20
  189. package/build/js/i18n/sl/countries.js +0 -245
  190. package/build/js/i18n/sl/interface.js +0 -25
  191. package/build/js/i18n/sq/countries.js +0 -245
  192. package/build/js/i18n/sq/interface.js +0 -14
  193. package/build/js/i18n/sr/countries.js +0 -245
  194. package/build/js/i18n/sr/interface.js +0 -21
  195. package/build/js/i18n/sv/countries.js +0 -245
  196. package/build/js/i18n/sv/interface.js +0 -13
  197. package/build/js/i18n/te/countries.js +0 -245
  198. package/build/js/i18n/te/interface.js +0 -13
  199. package/build/js/i18n/th/countries.js +0 -245
  200. package/build/js/i18n/th/interface.js +0 -13
  201. package/build/js/i18n/tr/countries.js +0 -245
  202. package/build/js/i18n/tr/interface.js +0 -13
  203. package/build/js/i18n/uk/countries.js +0 -245
  204. package/build/js/i18n/uk/interface.js +0 -20
  205. package/build/js/i18n/ur/countries.js +0 -245
  206. package/build/js/i18n/ur/interface.js +0 -13
  207. package/build/js/i18n/uz/countries.js +0 -245
  208. package/build/js/i18n/uz/interface.js +0 -13
  209. package/build/js/i18n/vi/countries.js +0 -245
  210. package/build/js/i18n/vi/interface.js +0 -13
  211. package/build/js/i18n/zh/countries.js +0 -245
  212. package/build/js/i18n/zh/interface.js +0 -13
  213. package/vue/build/IntlTelInput.mjs +0 -3398
  214. package/vue/build/IntlTelInputWithUtils.mjs +0 -9540
@@ -1,77 +1,77 @@
1
- var xi = Object.defineProperty;
2
- var Te = (e) => {
1
+ var Hn = Object.defineProperty;
2
+ var Se = (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";
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) {
5
+ var Fn = (e, t, n) => t in e ? Hn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var nt = (e, t, n) => Fn(e, typeof t != "symbol" ? t + "" : t, n), ee = (e, t, n) => t.has(e) || Se("Cannot " + n);
7
+ var A = (e, t, n) => (ee(e, t, "read from private field"), n ? n.call(e) : t.get(e)), tt = (e, t, n) => t.has(e) ? Se("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), mt = (e, t, n, i) => (ee(e, t, "write to private field"), i ? i.call(e, n) : t.set(e, n), n), K = (e, t, n) => (ee(e, t, "access private method"), n);
8
+ import { onMount as Bn, onDestroy as Vn } from "svelte";
9
+ const Wn = "5";
10
+ var $e;
11
+ typeof window < "u" && (($e = window.__svelte ?? (window.__svelte = {})).v ?? ($e.v = /* @__PURE__ */ new Set())).add(Wn);
12
+ const jn = 1, Gn = 4, Yn = 8, Kn = 16, zn = 2, R = Symbol(), qn = "http://www.w3.org/1999/xhtml", $n = "@attach", de = !1;
13
+ var Xe = Array.isArray, Xn = Array.prototype.indexOf, Qn = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, Zn = Object.getOwnPropertyDescriptors, Jn = Object.prototype, ti = Array.prototype, Qe = Object.getPrototypeOf;
14
+ function ei(e) {
15
15
  for (var t = 0; t < e.length; t++)
16
16
  e[t]();
17
17
  }
18
- function Qe() {
19
- var e, t, i = new Promise((n, s) => {
20
- e = n, t = s;
18
+ function Ze() {
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 M = 2, ge = 4, Je = 8, tn = 1 << 24, _t = 16, Ct = 32, St = 64, be = 128, q = 512, H = 1024, j = 2048, Q = 4096, It = 8192, et = 16384, we = 32768, Pe = 65536, Oe = 1 << 17, en = 1 << 18, Jt = 1 << 19, ni = 1 << 20, ht = 32768, fe = 1 << 21, Ie = 1 << 22, it = 1 << 23, ct = Symbol("$state"), ii = Symbol("legacy props"), si = Symbol(""), gt = 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
+ nt(this, "name", "StaleReactionError");
28
+ nt(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
29
29
  }
30
30
  }();
31
- function rn() {
31
+ function ri() {
32
32
  throw new Error("https://svelte.dev/e/async_derived_orphan");
33
33
  }
34
- function on(e) {
34
+ function oi(e) {
35
35
  throw new Error("https://svelte.dev/e/effect_in_teardown");
36
36
  }
37
- function ln() {
37
+ function li() {
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 ai() {
44
44
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
45
45
  }
46
- function cn(e) {
46
+ function ci(e) {
47
47
  throw new Error("https://svelte.dev/e/props_invalid_value");
48
48
  }
49
- function dn() {
49
+ function di() {
50
50
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
51
51
  }
52
- function fn() {
52
+ function fi() {
53
53
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
54
54
  }
55
- function hn() {
55
+ function hi() {
56
56
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
57
57
  }
58
- function pn() {
58
+ function pi() {
59
59
  console.warn("https://svelte.dev/e/select_multiple_invalid_value");
60
60
  }
61
- function ei(e) {
61
+ function nn(e) {
62
62
  return e === this.v;
63
63
  }
64
- function _n(e, t) {
64
+ function _i(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 Ci(e) {
68
+ return !_i(e, this.v);
69
69
  }
70
- let gn = !1, Z = null;
71
- function zt(e) {
70
+ let yi = !1, Z = null;
71
+ function Yt(e) {
72
72
  Z = e;
73
73
  }
74
- function mn(e, t = !1, i) {
74
+ function vi(e, t = !1, n) {
75
75
  Z = {
76
76
  p: Z,
77
77
  i: !1,
@@ -82,40 +82,40 @@ function mn(e, t = !1, i) {
82
82
  l: null
83
83
  };
84
84
  }
85
- function yn(e) {
85
+ function mi(e) {
86
86
  var t = (
87
87
  /** @type {ComponentContext} */
88
88
  Z
89
- ), i = t.e;
90
- if (i !== null) {
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
95
  return e !== void 0 && (t.x = e), t.i = !0, Z = t.p, e ?? /** @type {T} */
96
96
  {};
97
97
  }
98
- function ii() {
98
+ function sn() {
99
99
  return !0;
100
100
  }
101
- let wt = [];
102
- function vn() {
103
- var e = wt;
104
- wt = [], tn(e);
101
+ let bt = [];
102
+ function gi() {
103
+ var e = bt;
104
+ bt = [], ei(e);
105
105
  }
106
106
  function te(e) {
107
- if (wt.length === 0) {
108
- var t = wt;
107
+ if (bt.length === 0) {
108
+ var t = bt;
109
109
  queueMicrotask(() => {
110
- t === wt && vn();
110
+ t === bt && gi();
111
111
  });
112
112
  }
113
- wt.push(e);
113
+ bt.push(e);
114
114
  }
115
- function bn(e) {
115
+ function bi(e) {
116
116
  var t = D;
117
117
  if (t === null)
118
- return w.f |= nt, e;
118
+ return w.f |= it, e;
119
119
  if ((t.f & we) === 0) {
120
120
  if ((t.f & be) === 0)
121
121
  throw e;
@@ -129,8 +129,8 @@ function Kt(e, t) {
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
  }
@@ -138,23 +138,23 @@ function Kt(e, t) {
138
138
  }
139
139
  const Ft = /* @__PURE__ */ new Set();
140
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;
141
+ var Nt, Dt, ut, at, Ut, Lt, At, k, pe, Rt, _e, rn, on;
142
142
  const Zt = class Zt {
143
143
  constructor() {
144
144
  tt(this, k);
145
- it(this, "committed", !1);
145
+ nt(this, "committed", !1);
146
146
  /**
147
147
  * The current values of any sources that are updated in this batch
148
148
  * They keys of this map are identical to `this.#previous`
149
149
  * @type {Map<Source, any>}
150
150
  */
151
- it(this, "current", /* @__PURE__ */ new Map());
151
+ nt(this, "current", /* @__PURE__ */ new Map());
152
152
  /**
153
153
  * The values of any sources that are updated in this batch _before_ those updates took place.
154
154
  * They keys of this map are identical to `this.#current`
155
155
  * @type {Map<Source, any>}
156
156
  */
157
- it(this, "previous", /* @__PURE__ */ new Map());
157
+ nt(this, "previous", /* @__PURE__ */ new Map());
158
158
  /**
159
159
  * When the batch is committed (and the DOM is updated), we need to remove old branches
160
160
  * and append new ones by calling the functions added inside (if/each/key/etc) blocks
@@ -169,54 +169,54 @@ const Zt = class Zt {
169
169
  /**
170
170
  * The number of async effects that are currently in flight
171
171
  */
172
- tt(this, at, 0);
172
+ tt(this, ut, 0);
173
173
  /**
174
174
  * The number of async effects that are currently in flight, _not_ inside a pending boundary
175
175
  */
176
- tt(this, ut, 0);
176
+ tt(this, at, 0);
177
177
  /**
178
178
  * A deferred that resolves when the batch is committed, used with `settled()`
179
179
  * TODO replace with Promise.withResolvers once supported widely enough
180
180
  * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
181
181
  */
182
- tt(this, xt, null);
182
+ tt(this, Ut, null);
183
183
  /**
184
184
  * Deferred effects (which run after async work has completed) that are DIRTY
185
185
  * @type {Set<Effect>}
186
186
  */
187
- tt(this, At, /* @__PURE__ */ new Set());
187
+ tt(this, Lt, /* @__PURE__ */ new Set());
188
188
  /**
189
189
  * Deferred effects that are MAYBE_DIRTY
190
190
  * @type {Set<Effect>}
191
191
  */
192
- tt(this, Lt, /* @__PURE__ */ new Set());
192
+ tt(this, At, /* @__PURE__ */ new Set());
193
193
  /**
194
194
  * A set of branches that still exist, but will be destroyed when this batch
195
195
  * is committed — we skip over these during `process`
196
196
  * @type {Set<Effect>}
197
197
  */
198
- it(this, "skipped_effects", /* @__PURE__ */ new Set());
199
- it(this, "is_fork", !1);
198
+ nt(this, "skipped_effects", /* @__PURE__ */ new Set());
199
+ nt(this, "is_fork", !1);
200
200
  }
201
201
  is_deferred() {
202
- return this.is_fork || L(this, ut) > 0;
202
+ return this.is_fork || A(this, at) > 0;
203
203
  }
204
204
  /**
205
205
  *
206
206
  * @param {Effect[]} root_effects
207
207
  */
208
208
  process(t) {
209
- var n;
209
+ var i;
210
210
  $ = [], this.apply();
211
- var i = {
211
+ var n = {
212
212
  parent: null,
213
213
  effect: null,
214
214
  effects: [],
215
215
  render_effects: []
216
216
  };
217
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;
218
+ K(this, k, pe).call(this, s, n);
219
+ this.is_fork || K(this, k, rn).call(this), this.is_deferred() ? (K(this, k, Rt).call(this, n.effects), K(this, k, Rt).call(this, n.render_effects)) : (N = null, Re(n.render_effects), Re(n.effects), (i = A(this, Ut)) == null || i.resolve()), P = null;
220
220
  }
221
221
  /**
222
222
  * Associate a change to a given source with the current
@@ -224,8 +224,8 @@ const Zt = class Zt {
224
224
  * @param {Source} source
225
225
  * @param {any} value
226
226
  */
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));
227
+ capture(t, n) {
228
+ this.previous.has(t) || this.previous.set(t, n), (t.f & it) === 0 && (this.current.set(t, t.v), P == null || P.set(t, t.v));
229
229
  }
230
230
  activate() {
231
231
  N = this, this.apply();
@@ -235,46 +235,46 @@ const Zt = class Zt {
235
235
  }
236
236
  flush() {
237
237
  if (this.activate(), $.length > 0) {
238
- if (wn(), N !== null && N !== this)
238
+ if (wi(), N !== null && N !== this)
239
239
  return;
240
- } else L(this, at) === 0 && this.process([]);
240
+ } else A(this, ut) === 0 && this.process([]);
241
241
  this.deactivate();
242
242
  }
243
243
  discard() {
244
- for (const t of L(this, Dt)) t(this);
245
- L(this, Dt).clear();
244
+ for (const t of A(this, Dt)) t(this);
245
+ A(this, Dt).clear();
246
246
  }
247
247
  /**
248
248
  *
249
249
  * @param {boolean} blocking
250
250
  */
251
251
  increment(t) {
252
- vt(this, at, L(this, at) + 1), t && vt(this, ut, L(this, ut) + 1);
252
+ mt(this, ut, A(this, ut) + 1), t && mt(this, at, A(this, at) + 1);
253
253
  }
254
254
  /**
255
255
  *
256
256
  * @param {boolean} blocking
257
257
  */
258
258
  decrement(t) {
259
- vt(this, at, L(this, at) - 1), t && vt(this, ut, L(this, ut) - 1), this.revive();
259
+ mt(this, ut, A(this, ut) - 1), t && mt(this, at, A(this, at) - 1), this.revive();
260
260
  }
261
261
  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);
262
+ for (const t of A(this, Lt))
263
+ A(this, At).delete(t), B(t, j), Tt(t);
264
+ for (const t of A(this, At))
265
+ B(t, Q), Tt(t);
266
266
  this.flush();
267
267
  }
268
268
  /** @param {() => void} fn */
269
269
  oncommit(t) {
270
- L(this, Nt).add(t);
270
+ A(this, Nt).add(t);
271
271
  }
272
272
  /** @param {(batch: Batch) => void} fn */
273
273
  ondiscard(t) {
274
- L(this, Dt).add(t);
274
+ A(this, Dt).add(t);
275
275
  }
276
276
  settled() {
277
- return (L(this, xt) ?? vt(this, xt, Qe())).promise;
277
+ return (A(this, Ut) ?? mt(this, Ut, Ze())).promise;
278
278
  }
279
279
  static ensure() {
280
280
  if (N === null) {
@@ -292,63 +292,63 @@ const Zt = class Zt {
292
292
  apply() {
293
293
  }
294
294
  };
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(), /**
295
+ Nt = new WeakMap(), Dt = new WeakMap(), ut = new WeakMap(), at = new WeakMap(), Ut = new WeakMap(), Lt = new WeakMap(), At = new WeakMap(), k = new WeakSet(), /**
296
296
  * Traverse the effect tree, executing effects or stashing
297
297
  * them for later execution as appropriate
298
298
  * @param {Effect} root
299
299
  * @param {EffectTarget} target
300
300
  */
301
- pe = function(t, i) {
301
+ pe = function(t, n) {
302
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,
303
+ t.f ^= H;
304
+ for (var i = t.first; i !== null; ) {
305
+ var s = i.f, r = (s & (Ct | St)) !== 0, o = r && (s & H) !== 0, l = o || (s & It) !== 0 || this.skipped_effects.has(i);
306
+ if ((i.f & be) !== 0 && ((c = i.b) != null && c.is_pending()) && (n = {
307
+ parent: n,
308
+ effect: i,
309
309
  effects: [],
310
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;
311
+ }), !l && i.fn !== null) {
312
+ r ? i.f ^= H : (s & ge) !== 0 ? n.effects.push(i) : Ht(i) && ((i.f & _t) !== 0 && A(this, Lt).add(i), xt(i));
313
+ var a = i.first;
314
+ if (a !== null) {
315
+ i = a;
316
316
  continue;
317
317
  }
318
318
  }
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;
319
+ var u = i.parent;
320
+ for (i = i.next; i === null && u !== null; )
321
+ u === n.effect && (K(this, k, Rt).call(this, n.effects), K(this, k, Rt).call(this, n.render_effects), n = /** @type {EffectTarget} */
322
+ n.parent), i = u.next, u = u.parent;
323
323
  }
324
324
  }, /**
325
325
  * @param {Effect[]} effects
326
326
  */
327
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);
328
+ for (const n of t)
329
+ (n.f & j) !== 0 ? A(this, Lt).add(n) : (n.f & Q) !== 0 && A(this, At).add(n), K(this, k, _e).call(this, n.deps), B(n, H);
330
330
  }, /**
331
331
  * @param {Value[] | null} deps
332
332
  */
333
333
  _e = function(t) {
334
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(
335
+ for (const n of t)
336
+ (n.f & M) === 0 || (n.f & ht) === 0 || (n.f ^= ht, K(this, k, _e).call(
337
337
  this,
338
338
  /** @type {Derived} */
339
- i.deps
339
+ n.deps
340
340
  ));
341
- }, ni = function() {
342
- if (L(this, ut) === 0) {
343
- for (const t of L(this, Nt)) t();
344
- L(this, Nt).clear();
341
+ }, rn = function() {
342
+ if (A(this, at) === 0) {
343
+ for (const t of A(this, Nt)) t();
344
+ A(this, Nt).clear();
345
345
  }
346
- L(this, at) === 0 && K(this, k, si).call(this);
347
- }, si = function() {
346
+ A(this, ut) === 0 && K(this, k, on).call(this);
347
+ }, on = function() {
348
348
  var r;
349
349
  if (Ft.size > 1) {
350
350
  this.previous.clear();
351
- var t = P, i = !0, n = {
351
+ var t = P, n = !0, i = {
352
352
  parent: null,
353
353
  effect: null,
354
354
  effects: [],
@@ -356,31 +356,31 @@ _e = function(t) {
356
356
  };
357
357
  for (const o of Ft) {
358
358
  if (o === this) {
359
- i = !1;
359
+ n = !1;
360
360
  continue;
361
361
  }
362
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);
363
+ for (const [u, c] of this.current) {
364
+ if (o.current.has(u))
365
+ if (n && c !== o.current.get(u))
366
+ o.current.set(u, c);
367
367
  else
368
368
  continue;
369
- l.push(a);
369
+ l.push(u);
370
370
  }
371
371
  if (l.length === 0)
372
372
  continue;
373
- const u = [...o.current.keys()].filter((a) => !this.current.has(a));
374
- if (u.length > 0) {
373
+ const a = [...o.current.keys()].filter((u) => !this.current.has(u));
374
+ if (a.length > 0) {
375
375
  var s = $;
376
376
  $ = [];
377
- const a = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
377
+ const u = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
378
378
  for (const d of l)
379
- ri(d, u, a, c);
379
+ ln(d, a, u, c);
380
380
  if ($.length > 0) {
381
381
  N = o, o.apply();
382
382
  for (const d of $)
383
- K(r = o, k, pe).call(r, d, n);
383
+ K(r = o, k, pe).call(r, d, i);
384
384
  o.deactivate();
385
385
  }
386
386
  $ = s;
@@ -390,151 +390,151 @@ _e = function(t) {
390
390
  }
391
391
  this.committed = !0, Ft.delete(this);
392
392
  };
393
- let Yt = Zt;
394
- function wn() {
393
+ let zt = Zt;
394
+ function wi() {
395
395
  var e = dt;
396
396
  he = !0;
397
397
  var t = null;
398
398
  try {
399
- var i = 0;
399
+ var n = 0;
400
400
  for (Xt(!0); $.length > 0; ) {
401
- var n = Yt.ensure();
402
- if (i++ > 1e3) {
401
+ var i = zt.ensure();
402
+ if (n++ > 1e3) {
403
403
  var s, r;
404
- In();
404
+ Ii();
405
405
  }
406
- n.process($), st.clear();
406
+ i.process($), st.clear();
407
407
  }
408
408
  } finally {
409
409
  he = !1, Xt(e), Ee = null;
410
410
  }
411
411
  }
412
- function In() {
412
+ function Ii() {
413
413
  try {
414
- un();
414
+ ai();
415
415
  } catch (e) {
416
416
  Kt(e, Ee);
417
417
  }
418
418
  }
419
- let Y = null;
419
+ let z = null;
420
420
  function Re(e) {
421
421
  var t = e.length;
422
422
  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)) {
423
+ for (var n = 0; n < t; ) {
424
+ var i = e[n++];
425
+ if ((i.f & (et | It)) === 0 && Ht(i) && (z = /* @__PURE__ */ new Set(), xt(i), i.deps === null && i.first === null && i.nodes === null && (i.teardown === null && i.ac === null ? gn(i) : i.fn = null), (z == null ? void 0 : z.size) > 0)) {
426
426
  st.clear();
427
- for (const s of Y) {
428
- if ((s.f & (et | Et)) !== 0) continue;
427
+ for (const s of z) {
428
+ if ((s.f & (et | It)) !== 0) continue;
429
429
  const r = [s];
430
430
  let o = s.parent;
431
431
  for (; o !== null; )
432
- Y.has(o) && (Y.delete(o), r.push(o)), o = o.parent;
432
+ z.has(o) && (z.delete(o), r.push(o)), o = o.parent;
433
433
  for (let l = r.length - 1; l >= 0; l--) {
434
- const u = r[l];
435
- (u.f & (et | Et)) === 0 && Ut(u);
434
+ const a = r[l];
435
+ (a.f & (et | It)) === 0 && xt(a);
436
436
  }
437
437
  }
438
- Y.clear();
438
+ z.clear();
439
439
  }
440
440
  }
441
- Y = null;
441
+ z = null;
442
442
  }
443
443
  }
444
- function ri(e, t, i, n) {
445
- if (!i.has(e) && (i.add(e), e.reactions !== null))
444
+ function ln(e, t, n, i) {
445
+ if (!n.has(e) && (n.add(e), e.reactions !== null))
446
446
  for (const s of e.reactions) {
447
447
  const r = s.f;
448
- (r & M) !== 0 ? ri(
448
+ (r & M) !== 0 ? ln(
449
449
  /** @type {Derived} */
450
450
  s,
451
451
  t,
452
- i,
453
- n
454
- ) : (r & (Ie | Ct)) !== 0 && (r & j) === 0 && oi(s, t, n) && (H(s, j), St(
452
+ n,
453
+ i
454
+ ) : (r & (Ie | _t)) !== 0 && (r & j) === 0 && un(s, t, i) && (B(s, j), Tt(
455
455
  /** @type {Effect} */
456
456
  s
457
457
  ));
458
458
  }
459
459
  }
460
- function oi(e, t, i) {
461
- const n = i.get(e);
462
- if (n !== void 0) return n;
460
+ function un(e, t, n) {
461
+ const i = n.get(e);
462
+ if (i !== void 0) return i;
463
463
  if (e.deps !== null)
464
464
  for (const s of e.deps) {
465
465
  if (t.includes(s))
466
466
  return !0;
467
- if ((s.f & M) !== 0 && oi(
467
+ if ((s.f & M) !== 0 && un(
468
468
  /** @type {Derived} */
469
469
  s,
470
470
  t,
471
- i
471
+ n
472
472
  ))
473
- return i.set(
473
+ return n.set(
474
474
  /** @type {Derived} */
475
475
  s,
476
476
  !0
477
477
  ), !0;
478
478
  }
479
- return i.set(e, !1), !1;
479
+ return n.set(e, !1), !1;
480
480
  }
481
- function St(e) {
481
+ function Tt(e) {
482
482
  for (var t = Ee = e; t.parent !== null; ) {
483
483
  t = t.parent;
484
- var i = t.f;
485
- if (he && t === D && (i & Ct) !== 0 && (i & ti) === 0)
484
+ var n = t.f;
485
+ if (he && t === D && (n & _t) !== 0 && (n & en) === 0)
486
486
  return;
487
- if ((i & (Tt | gt)) !== 0) {
488
- if ((i & B) === 0) return;
489
- t.f ^= B;
487
+ if ((n & (St | Ct)) !== 0) {
488
+ if ((n & H) === 0) return;
489
+ t.f ^= H;
490
490
  }
491
491
  }
492
492
  $.push(t);
493
493
  }
494
- function En(e, t, i, n) {
494
+ function Ei(e, t, n, i) {
495
495
  const s = Ne;
496
- if (i.length === 0 && e.length === 0) {
497
- n(t.map(s));
496
+ if (n.length === 0 && e.length === 0) {
497
+ i(t.map(s));
498
498
  return;
499
499
  }
500
500
  var r = N, o = (
501
501
  /** @type {Effect} */
502
502
  D
503
- ), l = Nn();
504
- function u() {
505
- Promise.all(i.map((a) => /* @__PURE__ */ Dn(a))).then((a) => {
503
+ ), l = Ni();
504
+ function a() {
505
+ Promise.all(n.map((u) => /* @__PURE__ */ Di(u))).then((u) => {
506
506
  l();
507
507
  try {
508
- n([...t.map(s), ...a]);
508
+ i([...t.map(s), ...u]);
509
509
  } catch (c) {
510
510
  (o.f & et) === 0 && Kt(c, o);
511
511
  }
512
512
  r == null || r.deactivate(), qt();
513
- }).catch((a) => {
514
- Kt(a, o);
513
+ }).catch((u) => {
514
+ Kt(u, o);
515
515
  });
516
516
  }
517
517
  e.length > 0 ? Promise.all(e).then(() => {
518
518
  l();
519
519
  try {
520
- return u();
520
+ return a();
521
521
  } finally {
522
522
  r == null || r.deactivate(), qt();
523
523
  }
524
- }) : u();
524
+ }) : a();
525
525
  }
526
- function Nn() {
527
- var e = D, t = w, i = Z, n = N;
526
+ function Ni() {
527
+ var e = D, t = w, n = Z, i = N;
528
528
  return function(r = !0) {
529
- rt(e), J(t), zt(i), r && (n == null || n.activate());
529
+ rt(e), J(t), Yt(n), r && (i == null || i.activate());
530
530
  };
531
531
  }
532
532
  function qt() {
533
- rt(null), J(null), zt(null);
533
+ rt(null), J(null), Yt(null);
534
534
  }
535
535
  // @__NO_SIDE_EFFECTS__
536
536
  function Ne(e) {
537
- var t = M | j, i = w !== null && (w.f & M) !== 0 ? (
537
+ var t = M | j, n = w !== null && (w.f & M) !== 0 ? (
538
538
  /** @type {Derived} */
539
539
  w
540
540
  ) : null;
@@ -542,7 +542,7 @@ function Ne(e) {
542
542
  ctx: Z,
543
543
  deps: null,
544
544
  effects: null,
545
- equals: ei,
545
+ equals: nn,
546
546
  f: t,
547
547
  fn: e,
548
548
  reactions: null,
@@ -552,90 +552,90 @@ function Ne(e) {
552
552
  R
553
553
  ),
554
554
  wv: 0,
555
- parent: i ?? D,
555
+ parent: n ?? D,
556
556
  ac: null
557
557
  };
558
558
  }
559
559
  // @__NO_SIDE_EFFECTS__
560
- function Dn(e, t) {
561
- let i = (
560
+ function Di(e, t) {
561
+ let n = (
562
562
  /** @type {Effect | null} */
563
563
  D
564
564
  );
565
- i === null && rn();
566
- var n = (
565
+ n === null && ri();
566
+ var i = (
567
567
  /** @type {Boundary} */
568
- i.b
568
+ n.b
569
569
  ), s = (
570
570
  /** @type {Promise<V>} */
571
571
  /** @type {unknown} */
572
572
  void 0
573
- ), r = ci(
573
+ ), r = fn(
574
574
  /** @type {V} */
575
575
  R
576
576
  ), o = !w, l = /* @__PURE__ */ new Map();
577
- return Hn(() => {
577
+ return Bi(() => {
578
578
  var f;
579
- var u = Qe();
580
- s = u.promise;
579
+ var a = Ze();
580
+ s = a.promise;
581
581
  try {
582
- Promise.resolve(e()).then(u.resolve, u.reject).then(() => {
583
- a === N && a.committed && a.deactivate(), qt();
582
+ Promise.resolve(e()).then(a.resolve, a.reject).then(() => {
583
+ u === N && u.committed && u.deactivate(), qt();
584
584
  });
585
585
  } catch (h) {
586
- u.reject(h), qt();
586
+ a.reject(h), qt();
587
587
  }
588
- var a = (
588
+ var u = (
589
589
  /** @type {Batch} */
590
590
  N
591
591
  );
592
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);
593
+ var c = !i.is_pending();
594
+ i.update_pending_count(1), u.increment(c), (f = l.get(u)) == null || f.reject(gt), l.delete(u), l.set(u, a);
595
595
  }
596
596
  const d = (h, C = void 0) => {
597
- if (a.activate(), C)
598
- C !== bt && (r.f |= nt, ge(r, C));
597
+ if (u.activate(), C)
598
+ C !== gt && (r.f |= it, ye(r, C));
599
599
  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);
600
+ (r.f & it) !== 0 && (r.f ^= it), ye(r, h);
601
+ for (const [b, g] of l) {
602
+ if (l.delete(b), b === u) break;
603
+ g.reject(gt);
604
604
  }
605
605
  }
606
- o && (n.update_pending_count(-1), a.decrement(c));
606
+ o && (i.update_pending_count(-1), u.decrement(c));
607
607
  };
608
- u.promise.then(d, (h) => d(null, h || "unknown"));
609
- }), fi(() => {
610
- for (const u of l.values())
611
- u.reject(bt);
612
- }), new Promise((u) => {
613
- function a(c) {
608
+ a.promise.then(d, (h) => d(null, h || "unknown"));
609
+ }), pn(() => {
610
+ for (const a of l.values())
611
+ a.reject(gt);
612
+ }), new Promise((a) => {
613
+ function u(c) {
614
614
  function d() {
615
- c === s ? u(r) : a(s);
615
+ c === s ? a(r) : u(s);
616
616
  }
617
617
  c.then(d, d);
618
618
  }
619
- a(s);
619
+ u(s);
620
620
  });
621
621
  }
622
622
  // @__NO_SIDE_EFFECTS__
623
- function An(e) {
623
+ function Li(e) {
624
624
  const t = /* @__PURE__ */ Ne(e);
625
- return t.equals = Cn, t;
625
+ return t.equals = Ci, t;
626
626
  }
627
- function li(e) {
627
+ function an(e) {
628
628
  var t = e.effects;
629
629
  if (t !== null) {
630
630
  e.effects = null;
631
- for (var i = 0; i < t.length; i += 1)
632
- _t(
631
+ for (var n = 0; n < t.length; n += 1)
632
+ pt(
633
633
  /** @type {Effect} */
634
- t[i]
634
+ t[n]
635
635
  );
636
636
  }
637
637
  }
638
- function Ln(e) {
638
+ function Ai(e) {
639
639
  for (var t = e.parent; t !== null; ) {
640
640
  if ((t.f & M) === 0)
641
641
  return (t.f & et) === 0 ? (
@@ -647,161 +647,161 @@ function Ln(e) {
647
647
  return null;
648
648
  }
649
649
  function De(e) {
650
- var t, i = D;
651
- rt(Ln(e));
650
+ var t, n = D;
651
+ rt(Ai(e));
652
652
  try {
653
- e.f &= ~pt, li(e), t = wi(e);
653
+ e.f &= ~ht, an(e), t = En(e);
654
654
  } finally {
655
- rt(i);
655
+ rt(n);
656
656
  }
657
657
  return t;
658
658
  }
659
- function ai(e) {
659
+ function cn(e) {
660
660
  var t = De(e);
661
- if (e.equals(t) || (N != null && N.is_fork || (e.v = t), e.wv = vi()), !yt)
661
+ if (e.equals(t) || (N != null && N.is_fork || (e.v = t), e.wv = wn()), !vt)
662
662
  if (P !== null)
663
663
  ($t() || N != null && N.is_fork) && P.set(e, t);
664
664
  else {
665
- var i = (e.f & q) === 0 ? Q : B;
666
- H(e, i);
665
+ var n = (e.f & q) === 0 ? Q : H;
666
+ B(e, n);
667
667
  }
668
668
  }
669
669
  let Ce = /* @__PURE__ */ new Set();
670
670
  const st = /* @__PURE__ */ new Map();
671
- let ui = !1;
672
- function ci(e, t) {
673
- var i = {
671
+ let dn = !1;
672
+ function fn(e, t) {
673
+ var n = {
674
674
  f: 0,
675
675
  // TODO ideally we could skip this altogether, but it causes type errors
676
676
  v: e,
677
677
  reactions: null,
678
- equals: ei,
678
+ equals: nn,
679
679
  rv: 0,
680
680
  wv: 0
681
681
  };
682
- return i;
682
+ return n;
683
683
  }
684
684
  // @__NO_SIDE_EFFECTS__
685
- function z(e, t) {
686
- const i = ci(e);
687
- return Gn(i), i;
685
+ function Y(e, t) {
686
+ const n = fn(e);
687
+ return Gi(n), n;
688
688
  }
689
- function W(e, t, i = !1) {
689
+ function W(e, t, n = !1) {
690
690
  w !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
691
691
  // 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);
692
+ (!X || (w.f & Oe) !== 0) && sn() && (w.f & (M | _t | Ie | Oe)) !== 0 && !(F != null && F.includes(e)) && hi();
693
+ let i = n ? wt(t) : t;
694
+ return ye(e, i);
695
695
  }
696
- function ge(e, t) {
696
+ function ye(e, t) {
697
697
  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(
698
+ var n = e.v;
699
+ vt ? st.set(e, t) : st.set(e, n), e.v = t;
700
+ var i = zt.ensure();
701
+ i.capture(e, n), (e.f & M) !== 0 && ((e.f & j) !== 0 && De(
702
702
  /** @type {Derived} */
703
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();
704
+ ), B(e, (e.f & q) !== 0 ? H : Q)), e.wv = wn(), hn(e, j), D !== null && (D.f & H) !== 0 && (D.f & (Ct | St)) === 0 && (G === null ? Yi([e]) : G.push(e)), !i.is_fork && Ce.size > 0 && !dn && Ti();
705
705
  }
706
706
  return t;
707
707
  }
708
- function Sn() {
709
- ui = !1;
708
+ function Ti() {
709
+ dn = !1;
710
710
  var e = dt;
711
711
  Xt(!0);
712
712
  const t = Array.from(Ce);
713
713
  try {
714
- for (const i of t)
715
- (i.f & B) !== 0 && H(i, Q), Bt(i) && Ut(i);
714
+ for (const n of t)
715
+ (n.f & H) !== 0 && B(n, Q), Ht(n) && xt(n);
716
716
  } finally {
717
717
  Xt(e);
718
718
  }
719
719
  Ce.clear();
720
720
  }
721
- function ie(e) {
721
+ function ne(e) {
722
722
  W(e, e.v + 1);
723
723
  }
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 = (
724
+ function hn(e, t) {
725
+ var n = e.reactions;
726
+ if (n !== null)
727
+ for (var i = n.length, s = 0; s < i; s++) {
728
+ var r = n[s], o = r.f, l = (o & j) === 0;
729
+ if (l && B(r, t), (o & M) !== 0) {
730
+ var a = (
731
731
  /** @type {Derived} */
732
732
  r
733
733
  );
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(
734
+ P == null || P.delete(a), (o & ht) === 0 && (o & q && (r.f |= ht), hn(a, Q));
735
+ } else l && ((o & _t) !== 0 && z !== null && z.add(
736
736
  /** @type {Effect} */
737
737
  r
738
- ), St(
738
+ ), Tt(
739
739
  /** @type {Effect} */
740
740
  r
741
741
  ));
742
742
  }
743
743
  }
744
- function It(e) {
744
+ function wt(e) {
745
745
  if (typeof e != "object" || e === null || ct in e)
746
746
  return e;
747
- const t = Xe(e);
748
- if (t !== Zi && t !== Ji)
747
+ const t = Qe(e);
748
+ if (t !== Jn && t !== ti)
749
749
  return e;
750
- var i = /* @__PURE__ */ new Map(), n = $e(e), s = /* @__PURE__ */ z(0), r = ft, o = (l) => {
750
+ var n = /* @__PURE__ */ new Map(), i = Xe(e), s = /* @__PURE__ */ Y(0), r = ft, o = (l) => {
751
751
  if (ft === r)
752
752
  return l();
753
- var u = w, a = ft;
754
- J(null), Ue(r);
753
+ var a = w, u = ft;
754
+ J(null), xe(r);
755
755
  var c = l();
756
- return J(u), Ue(a), c;
756
+ return J(a), xe(u), c;
757
757
  };
758
- return n && i.set("length", /* @__PURE__ */ z(
758
+ return i && n.set("length", /* @__PURE__ */ Y(
759
759
  /** @type {any[]} */
760
760
  e.length
761
761
  )), new Proxy(
762
762
  /** @type {any} */
763
763
  e,
764
764
  {
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);
765
+ defineProperty(l, a, u) {
766
+ (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && di();
767
+ var c = n.get(a);
768
768
  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;
769
+ var d = /* @__PURE__ */ Y(u.value);
770
+ return n.set(a, d), d;
771
+ }) : W(c, u.value, !0), !0;
772
772
  },
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);
773
+ deleteProperty(l, a) {
774
+ var u = n.get(a);
775
+ if (u === void 0) {
776
+ if (a in l) {
777
+ const c = o(() => /* @__PURE__ */ Y(R));
778
+ n.set(a, c), ne(s);
779
779
  }
780
780
  } else
781
- W(a, R), ie(s);
781
+ W(u, R), ne(s);
782
782
  return !0;
783
783
  },
784
- get(l, u, a) {
784
+ get(l, a, u) {
785
785
  var h;
786
- if (u === ct)
786
+ if (a === ct)
787
787
  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);
788
+ var c = n.get(a), d = a in l;
789
+ if (c === void 0 && (!d || (h = jt(l, a)) != null && h.writable) && (c = o(() => {
790
+ var C = wt(d ? l[a] : R), b = /* @__PURE__ */ Y(C);
791
791
  return b;
792
- }), i.set(u, c)), c !== void 0) {
792
+ }), n.set(a, c)), c !== void 0) {
793
793
  var f = I(c);
794
794
  return f === R ? void 0 : f;
795
795
  }
796
- return Reflect.get(l, u, a);
796
+ return Reflect.get(l, a, u);
797
797
  },
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;
798
+ getOwnPropertyDescriptor(l, a) {
799
+ var u = Reflect.getOwnPropertyDescriptor(l, a);
800
+ if (u && "value" in u) {
801
+ var c = n.get(a);
802
+ c && (u.value = I(c));
803
+ } else if (u === void 0) {
804
+ var d = n.get(a), f = d == null ? void 0 : d.v;
805
805
  if (d !== void 0 && f !== R)
806
806
  return {
807
807
  enumerable: !0,
@@ -810,65 +810,65 @@ function It(e) {
810
810
  writable: !0
811
811
  };
812
812
  }
813
- return a;
813
+ return u;
814
814
  },
815
- has(l, u) {
815
+ has(l, a) {
816
816
  var f;
817
- if (u === ct)
817
+ if (a === ct)
818
818
  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);
819
+ var u = n.get(a), c = u !== void 0 && u.v !== R || Reflect.has(l, a);
820
+ if (u !== void 0 || D !== null && (!c || (f = jt(l, a)) != null && f.writable)) {
821
+ u === void 0 && (u = o(() => {
822
+ var h = c ? wt(l[a]) : R, C = /* @__PURE__ */ Y(h);
823
823
  return C;
824
- }), i.set(u, a));
825
- var d = I(a);
824
+ }), n.set(a, u));
825
+ var d = I(u);
826
826
  if (d === R)
827
827
  return !1;
828
828
  }
829
829
  return c;
830
830
  },
831
- set(l, u, a, c) {
831
+ set(l, a, u, c) {
832
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>} */
833
+ var d = n.get(a), f = a in l;
834
+ if (i && a === "length")
835
+ for (var h = u; h < /** @type {Source<number>} */
836
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));
837
+ var C = n.get(h + "");
838
+ C !== void 0 ? W(C, R) : h in l && (C = o(() => /* @__PURE__ */ Y(R)), n.set(h + "", C));
839
839
  }
840
840
  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));
841
+ (!f || (p = jt(l, a)) != null && p.writable) && (d = o(() => /* @__PURE__ */ Y(void 0)), W(d, wt(u)), n.set(a, d));
842
842
  else {
843
843
  f = d.v !== R;
844
- var b = o(() => It(a));
844
+ var b = o(() => wt(u));
845
845
  W(d, b);
846
846
  }
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") {
850
- var g = (
847
+ var g = Reflect.getOwnPropertyDescriptor(l, a);
848
+ if (g != null && g.set && g.set.call(c, u), !f) {
849
+ if (i && typeof a == "string") {
850
+ var y = (
851
851
  /** @type {Source<number>} */
852
- i.get("length")
853
- ), m = Number(u);
854
- Number.isInteger(m) && m >= g.v && W(g, m + 1);
852
+ n.get("length")
853
+ ), v = Number(a);
854
+ Number.isInteger(v) && v >= y.v && W(y, v + 1);
855
855
  }
856
- ie(s);
856
+ ne(s);
857
857
  }
858
858
  return !0;
859
859
  },
860
860
  ownKeys(l) {
861
861
  I(s);
862
- var u = Reflect.ownKeys(l).filter((d) => {
863
- var f = i.get(d);
862
+ var a = Reflect.ownKeys(l).filter((d) => {
863
+ var f = n.get(d);
864
864
  return f === void 0 || f.v !== R;
865
865
  });
866
- for (var [a, c] of i)
867
- c.v !== R && !(a in l) && u.push(a);
868
- return u;
866
+ for (var [u, c] of n)
867
+ c.v !== R && !(u in l) && a.push(u);
868
+ return a;
869
869
  },
870
870
  setPrototypeOf() {
871
- fn();
871
+ fi();
872
872
  }
873
873
  }
874
874
  );
@@ -881,51 +881,51 @@ function ke(e) {
881
881
  }
882
882
  return e;
883
883
  }
884
- function Tn(e, t) {
884
+ function Si(e, t) {
885
885
  return Object.is(ke(e), ke(t));
886
886
  }
887
- var Pn, On, Rn;
887
+ var Pi, Oi, Ri;
888
888
  // @__NO_SIDE_EFFECTS__
889
- function kn(e) {
889
+ function ki(e) {
890
890
  return (
891
891
  /** @type {TemplateNode | null} */
892
- On.call(e)
892
+ Oi.call(e)
893
893
  );
894
894
  }
895
895
  // @__NO_SIDE_EFFECTS__
896
- function Mn(e) {
896
+ function Mi(e) {
897
897
  return (
898
898
  /** @type {TemplateNode | null} */
899
- Rn.call(e)
899
+ Ri.call(e)
900
900
  );
901
901
  }
902
- function Un(e, t) {
902
+ function xi(e, t) {
903
903
  if (t) {
904
- const i = document.body;
904
+ const n = document.body;
905
905
  e.autofocus = !0, te(() => {
906
- document.activeElement === i && e.focus();
906
+ document.activeElement === n && e.focus();
907
907
  });
908
908
  }
909
909
  }
910
- function Ae(e) {
911
- var t = w, i = D;
910
+ function Le(e) {
911
+ var t = w, n = D;
912
912
  J(null), rt(null);
913
913
  try {
914
914
  return e();
915
915
  } finally {
916
- J(t), rt(i);
916
+ J(t), rt(n);
917
917
  }
918
918
  }
919
- function xn(e) {
920
- D === null && (w === null && an(), ln()), yt && on();
919
+ function Ui(e) {
920
+ D === null && (w === null && ui(), li()), vt && oi();
921
921
  }
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);
922
+ function Hi(e, t) {
923
+ var n = t.last;
924
+ n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
925
925
  }
926
- function mt(e, t, i) {
927
- var n = D;
928
- n !== null && (n.f & Et) !== 0 && (e |= Et);
926
+ function yt(e, t, n) {
927
+ var i = D;
928
+ i !== null && (i.f & It) !== 0 && (e |= It);
929
929
  var s = {
930
930
  ctx: Z,
931
931
  deps: null,
@@ -935,23 +935,23 @@ function mt(e, t, i) {
935
935
  fn: t,
936
936
  last: null,
937
937
  next: null,
938
- parent: n,
939
- b: n && n.b,
938
+ parent: i,
939
+ b: i && i.b,
940
940
  prev: null,
941
941
  teardown: null,
942
942
  wv: 0,
943
943
  ac: null
944
944
  };
945
- if (i)
945
+ if (n)
946
946
  try {
947
- Ut(s), s.f |= we;
947
+ xt(s), s.f |= we;
948
948
  } catch (l) {
949
- throw _t(s), l;
949
+ throw pt(s), l;
950
950
  }
951
- else t !== null && St(s);
951
+ else t !== null && Tt(s);
952
952
  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)) {
953
+ if (n && 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 & _t) !== 0 && (e & Pe) !== 0 && r !== null && (r.f |= Pe)), r !== null && (r.parent = i, i !== null && Hi(r, i), w !== null && (w.f & M) !== 0 && (e & St) === 0)) {
955
955
  var o = (
956
956
  /** @type {Derived} */
957
957
  w
@@ -963,105 +963,105 @@ function mt(e, t, i) {
963
963
  function $t() {
964
964
  return w !== null && !X;
965
965
  }
966
- function fi(e) {
967
- const t = mt(Ze, null, !1);
968
- return H(t, B), t.teardown = e, t;
966
+ function pn(e) {
967
+ const t = yt(Je, null, !1);
968
+ return B(t, H), t.teardown = e, t;
969
969
  }
970
- function Fn(e) {
971
- xn();
970
+ function Fi(e) {
971
+ Ui();
972
972
  var t = (
973
973
  /** @type {Effect} */
974
974
  D.f
975
- ), i = !w && (t & gt) !== 0 && (t & we) === 0;
976
- if (i) {
977
- var n = (
975
+ ), n = !w && (t & Ct) !== 0 && (t & we) === 0;
976
+ if (n) {
977
+ var i = (
978
978
  /** @type {ComponentContext} */
979
979
  Z
980
980
  );
981
- (n.e ?? (n.e = [])).push(e);
981
+ (i.e ?? (i.e = [])).push(e);
982
982
  } else
983
- return hi(e);
983
+ return _n(e);
984
984
  }
985
- function hi(e) {
986
- return mt(ve | en, e, !1);
985
+ function _n(e) {
986
+ return yt(ge | ni, e, !1);
987
987
  }
988
- function Le(e) {
989
- return mt(ve, e, !1);
988
+ function Ae(e) {
989
+ return yt(ge, e, !1);
990
990
  }
991
- function Hn(e) {
992
- return mt(Ie | Jt, e, !0);
991
+ function Bi(e) {
992
+ return yt(Ie | Jt, e, !0);
993
993
  }
994
- function Vn(e, t = 0) {
995
- return mt(Ze | t, e, !0);
994
+ function Vi(e, t = 0) {
995
+ return yt(Je | t, e, !0);
996
996
  }
997
- function pi(e, t = 0) {
998
- var i = mt(Je | t, e, !0);
999
- return i;
997
+ function Cn(e, t = 0) {
998
+ var n = yt(tn | t, e, !0);
999
+ return n;
1000
1000
  }
1001
- function _i(e) {
1002
- return mt(gt | Jt, e, !0);
1001
+ function yn(e) {
1002
+ return yt(Ct | Jt, e, !0);
1003
1003
  }
1004
- function Ci(e) {
1004
+ function vn(e) {
1005
1005
  var t = e.teardown;
1006
1006
  if (t !== null) {
1007
- const i = yt, n = w;
1007
+ const n = vt, i = w;
1008
1008
  Me(!0), J(null);
1009
1009
  try {
1010
1010
  t.call(null);
1011
1011
  } finally {
1012
- Me(i), J(n);
1012
+ Me(n), J(i);
1013
1013
  }
1014
1014
  }
1015
1015
  }
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;
1020
- s !== null && Ae(() => {
1021
- s.abort(bt);
1016
+ function mn(e, t = !1) {
1017
+ var n = e.first;
1018
+ for (e.first = e.last = null; n !== null; ) {
1019
+ const s = n.ac;
1020
+ s !== null && Le(() => {
1021
+ s.abort(gt);
1022
1022
  });
1023
- var n = i.next;
1024
- (i.f & Tt) !== 0 ? i.parent = null : _t(i, t), i = n;
1023
+ var i = n.next;
1024
+ (n.f & St) !== 0 ? n.parent = null : pt(n, t), n = i;
1025
1025
  }
1026
1026
  }
1027
- function Wn(e) {
1027
+ function Wi(e) {
1028
1028
  for (var t = e.first; t !== null; ) {
1029
- var i = t.next;
1030
- (t.f & gt) === 0 && _t(t), t = i;
1029
+ var n = t.next;
1030
+ (t.f & Ct) === 0 && pt(t), t = n;
1031
1031
  }
1032
1032
  }
1033
- function _t(e, t = !0) {
1034
- var i = !1;
1035
- (t || (e.f & ti) !== 0) && e.nodes !== null && e.nodes.end !== null && (jn(
1033
+ function pt(e, t = !0) {
1034
+ var n = !1;
1035
+ (t || (e.f & en) !== 0) && e.nodes !== null && e.nodes.end !== null && (ji(
1036
1036
  e.nodes.start,
1037
1037
  /** @type {TemplateNode} */
1038
1038
  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)
1039
+ ), n = !0), mn(e, t && !n), Qt(e, 0), B(e, et);
1040
+ var i = e.nodes && e.nodes.t;
1041
+ if (i !== null)
1042
+ for (const r of i)
1043
1043
  r.stop();
1044
- Ci(e);
1044
+ vn(e);
1045
1045
  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;
1046
+ s !== null && s.first !== null && gn(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1047
1047
  }
1048
- function jn(e, t) {
1048
+ function ji(e, t) {
1049
1049
  for (; e !== null; ) {
1050
- var i = e === t ? null : /* @__PURE__ */ Mn(e);
1051
- e.remove(), e = i;
1050
+ var n = e === t ? null : /* @__PURE__ */ Mi(e);
1051
+ e.remove(), e = n;
1052
1052
  }
1053
1053
  }
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));
1054
+ function gn(e) {
1055
+ var t = e.parent, n = e.prev, i = e.next;
1056
+ 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
1057
  }
1058
1058
  let dt = !1;
1059
1059
  function Xt(e) {
1060
1060
  dt = e;
1061
1061
  }
1062
- let yt = !1;
1062
+ let vt = !1;
1063
1063
  function Me(e) {
1064
- yt = e;
1064
+ vt = e;
1065
1065
  }
1066
1066
  let w = null, X = !1;
1067
1067
  function J(e) {
@@ -1072,33 +1072,33 @@ function rt(e) {
1072
1072
  D = e;
1073
1073
  }
1074
1074
  let F = null;
1075
- function Gn(e) {
1075
+ function Gi(e) {
1076
1076
  w !== null && (F === null ? F = [e] : F.push(e));
1077
1077
  }
1078
- let x = null, V = 0, G = null;
1079
- function zn(e) {
1078
+ let U = null, V = 0, G = null;
1079
+ function Yi(e) {
1080
1080
  G = e;
1081
1081
  }
1082
- let yi = 1, Mt = 0, ft = Mt;
1083
- function Ue(e) {
1082
+ let bn = 1, Mt = 0, ft = Mt;
1083
+ function xe(e) {
1084
1084
  ft = e;
1085
1085
  }
1086
- function vi() {
1087
- return ++yi;
1086
+ function wn() {
1087
+ return ++bn;
1088
1088
  }
1089
- function Bt(e) {
1089
+ function Ht(e) {
1090
1090
  var t = e.f;
1091
1091
  if ((t & j) !== 0)
1092
1092
  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(
1093
+ if (t & M && (e.f &= ~ht), (t & Q) !== 0) {
1094
+ var n = e.deps;
1095
+ if (n !== null)
1096
+ for (var i = n.length, s = 0; s < i; s++) {
1097
+ var r = n[s];
1098
+ if (Ht(
1099
1099
  /** @type {Derived} */
1100
1100
  r
1101
- ) && ai(
1101
+ ) && cn(
1102
1102
  /** @type {Derived} */
1103
1103
  r
1104
1104
  ), r.wv > e.wv)
@@ -1106,32 +1106,32 @@ function Bt(e) {
1106
1106
  }
1107
1107
  (t & q) !== 0 && // During time traveling we don't want to reset the status so that
1108
1108
  // traversal of the graph in the other batches still happens
1109
- P === null && H(e, B);
1109
+ P === null && B(e, H);
1110
1110
  }
1111
1111
  return !1;
1112
1112
  }
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(
1113
+ function In(e, t, n = !0) {
1114
+ var i = e.reactions;
1115
+ if (i !== null && !(F != null && F.includes(e)))
1116
+ for (var s = 0; s < i.length; s++) {
1117
+ var r = i[s];
1118
+ (r.f & M) !== 0 ? In(
1119
1119
  /** @type {Derived} */
1120
1120
  r,
1121
1121
  t,
1122
1122
  !1
1123
- ) : t === r && (i ? H(r, j) : (r.f & B) !== 0 && H(r, Q), St(
1123
+ ) : t === r && (n ? B(r, j) : (r.f & H) !== 0 && B(r, Q), Tt(
1124
1124
  /** @type {Effect} */
1125
1125
  r
1126
1126
  ));
1127
1127
  }
1128
1128
  }
1129
- function wi(e) {
1129
+ function En(e) {
1130
1130
  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);
1131
+ var t = U, n = V, i = G, s = w, r = F, o = Z, l = X, a = ft, u = e.f;
1132
+ U = /** @type {null | Value[]} */
1133
+ null, V = 0, G = null, w = (u & (Ct | St)) === 0 ? e : null, F = null, Yt(e.ctx), X = !1, ft = ++Mt, e.ac !== null && (Le(() => {
1134
+ e.ac.abort(gt);
1135
1135
  }), e.ac = null);
1136
1136
  try {
1137
1137
  e.f |= fe;
@@ -1139,46 +1139,46 @@ function wi(e) {
1139
1139
  /** @type {Function} */
1140
1140
  e.fn
1141
1141
  ), d = c(), f = e.deps;
1142
- if (x !== null) {
1142
+ if (U !== null) {
1143
1143
  var h;
1144
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];
1145
+ for (f.length = V + U.length, h = 0; h < U.length; h++)
1146
+ f[V + h] = U[h];
1147
1147
  else
1148
- e.deps = f = x;
1148
+ e.deps = f = U;
1149
1149
  if ($t() && (e.f & q) !== 0)
1150
1150
  for (h = V; h < f.length; h++)
1151
1151
  ((C = f[h]).reactions ?? (C.reactions = [])).push(e);
1152
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)
1153
+ if (sn() && G !== null && !X && f !== null && (e.f & (M | Q | j)) === 0)
1154
1154
  for (h = 0; h < /** @type {Source[]} */
1155
1155
  G.length; h++)
1156
- bi(
1156
+ In(
1157
1157
  G[h],
1158
1158
  /** @type {Effect} */
1159
1159
  e
1160
1160
  );
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;
1161
+ return s !== null && s !== e && (Mt++, G !== null && (i === null ? i = G : i.push(.../** @type {Source[]} */
1162
+ G))), (e.f & it) !== 0 && (e.f ^= it), d;
1163
1163
  } catch (b) {
1164
- return bn(b);
1164
+ return bi(b);
1165
1165
  } finally {
1166
- e.f ^= fe, x = t, V = i, G = n, w = s, F = r, zt(o), X = l, ft = u;
1166
+ e.f ^= fe, U = t, V = n, G = i, w = s, F = r, Yt(o), X = l, ft = a;
1167
1167
  }
1168
1168
  }
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());
1169
+ function Ki(e, t) {
1170
+ let n = t.reactions;
1171
+ if (n !== null) {
1172
+ var i = Xn.call(n, e);
1173
+ if (i !== -1) {
1174
+ var s = n.length - 1;
1175
+ s === 0 ? n = t.reactions = null : (n[i] = n[s], n.pop());
1176
1176
  }
1177
1177
  }
1178
- i === null && (t.f & M) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1178
+ n === null && (t.f & M) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1179
1179
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1180
1180
  // 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(
1181
+ (U === null || !U.includes(t)) && (B(t, Q), (t.f & q) !== 0 && (t.f ^= q, t.f &= ~ht), an(
1182
1182
  /** @type {Derived} **/
1183
1183
  t
1184
1184
  ), Qt(
@@ -1188,36 +1188,36 @@ function Kn(e, t) {
1188
1188
  ));
1189
1189
  }
1190
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]);
1191
+ var n = e.deps;
1192
+ if (n !== null)
1193
+ for (var i = t; i < n.length; i++)
1194
+ Ki(e, n[i]);
1195
1195
  }
1196
- function Ut(e) {
1196
+ function xt(e) {
1197
1197
  var t = e.f;
1198
1198
  if ((t & et) === 0) {
1199
- H(e, B);
1200
- var i = D, n = dt;
1199
+ B(e, H);
1200
+ var n = D, i = dt;
1201
1201
  D = e, dt = !0;
1202
1202
  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;
1203
+ (t & (_t | tn)) !== 0 ? Wi(e) : mn(e), vn(e);
1204
+ var s = En(e);
1205
+ e.teardown = typeof s == "function" ? s : null, e.wv = bn;
1206
1206
  var r;
1207
- de && gn && (e.f & j) !== 0 && e.deps;
1207
+ de && yi && (e.f & j) !== 0 && e.deps;
1208
1208
  } finally {
1209
- dt = n, D = i;
1209
+ dt = i, D = n;
1210
1210
  }
1211
1211
  }
1212
1212
  }
1213
1213
  function I(e) {
1214
- var t = e.f, i = (t & M) !== 0;
1214
+ var t = e.f, n = (t & M) !== 0;
1215
1215
  if (w !== null && !X) {
1216
- var n = D !== null && (D.f & et) !== 0;
1217
- if (!n && !(F != null && F.includes(e))) {
1216
+ var i = D !== null && (D.f & et) !== 0;
1217
+ if (!i && !(F != null && F.includes(e))) {
1218
1218
  var s = w.deps;
1219
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));
1220
+ e.rv < Mt && (e.rv = Mt, U === null && s !== null && s[V] === e ? V++ : U === null ? U = [e] : U.includes(e) || U.push(e));
1221
1221
  else {
1222
1222
  (w.deps ?? (w.deps = [])).push(e);
1223
1223
  var r = e.reactions;
@@ -1225,46 +1225,46 @@ function I(e) {
1225
1225
  }
1226
1226
  }
1227
1227
  }
1228
- if (yt) {
1228
+ if (vt) {
1229
1229
  if (st.has(e))
1230
1230
  return st.get(e);
1231
- if (i) {
1231
+ if (n) {
1232
1232
  var o = (
1233
1233
  /** @type {Derived} */
1234
1234
  e
1235
1235
  ), l = o.v;
1236
- return ((o.f & B) === 0 && o.reactions !== null || Ei(o)) && (l = De(o)), st.set(o, l), l;
1236
+ return ((o.f & H) === 0 && o.reactions !== null || Dn(o)) && (l = De(o)), st.set(o, l), l;
1237
1237
  }
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));
1238
+ } else n && (!(P != null && P.has(e)) || N != null && N.is_fork && !$t()) && (o = /** @type {Derived} */
1239
+ e, Ht(o) && cn(o), dt && $t() && (o.f & q) === 0 && Nn(o));
1240
1240
  if (P != null && P.has(e))
1241
1241
  return P.get(e);
1242
- if ((e.f & nt) !== 0)
1242
+ if ((e.f & it) !== 0)
1243
1243
  throw e.v;
1244
1244
  return e.v;
1245
1245
  }
1246
- function Ii(e) {
1246
+ function Nn(e) {
1247
1247
  if (e.deps !== null) {
1248
1248
  e.f ^= q;
1249
1249
  for (const t of e.deps)
1250
- (t.reactions ?? (t.reactions = [])).push(e), (t.f & M) !== 0 && (t.f & q) === 0 && Ii(
1250
+ (t.reactions ?? (t.reactions = [])).push(e), (t.f & M) !== 0 && (t.f & q) === 0 && Nn(
1251
1251
  /** @type {Derived} */
1252
1252
  t
1253
1253
  );
1254
1254
  }
1255
1255
  }
1256
- function Ei(e) {
1256
+ function Dn(e) {
1257
1257
  if (e.v === R) return !0;
1258
1258
  if (e.deps === null) return !1;
1259
1259
  for (const t of e.deps)
1260
- if (st.has(t) || (t.f & M) !== 0 && Ei(
1260
+ if (st.has(t) || (t.f & M) !== 0 && Dn(
1261
1261
  /** @type {Derived} */
1262
1262
  t
1263
1263
  ))
1264
1264
  return !0;
1265
1265
  return !1;
1266
1266
  }
1267
- function Ni(e) {
1267
+ function Ln(e) {
1268
1268
  var t = X;
1269
1269
  try {
1270
1270
  return X = !0, e();
@@ -1272,56 +1272,56 @@ function Ni(e) {
1272
1272
  X = t;
1273
1273
  }
1274
1274
  }
1275
- const Yn = -7169;
1276
- function H(e, t) {
1277
- e.f = e.f & Yn | t;
1275
+ const zi = -7169;
1276
+ function B(e, t) {
1277
+ e.f = e.f & zi | t;
1278
1278
  }
1279
- const qn = /* @__PURE__ */ new Set(), $n = /* @__PURE__ */ new Set();
1280
- function Xn(e, t, i, n = {}) {
1279
+ const qi = /* @__PURE__ */ new Set(), $i = /* @__PURE__ */ new Set();
1280
+ function Xi(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 || Zi.call(t, r), !r.cancelBubble)
1283
+ return Le(() => n == null ? void 0 : n.call(this, r));
1284
1284
  }
1285
1285
  return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? te(() => {
1286
- t.addEventListener(e, s, n);
1287
- }) : t.addEventListener(e, s, n), s;
1286
+ t.addEventListener(e, s, i);
1287
+ }) : t.addEventListener(e, s, i), s;
1288
1288
  }
1289
- function Qn(e) {
1289
+ function Qi(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
+ qi.add(e[t]);
1292
+ for (var n of $i)
1293
+ n(e);
1294
1294
  }
1295
- let xe = null;
1296
- function Zn(e) {
1297
- var v;
1298
- var t = this, i = (
1295
+ let Ue = null;
1296
+ function Zi(e) {
1297
+ var g;
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 = ((g = e.composedPath) == null ? void 0 : g.call(e)) || [], r = (
1302
1302
  /** @type {null | Element} */
1303
1303
  s[0] || e.target
1304
1304
  );
1305
- xe = e;
1306
- var o = 0, l = xe === e && e.__root;
1305
+ Ue = e;
1306
+ var o = 0, l = Ue === 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
+ Qn(e, "currentTarget", {
1322
1322
  configurable: !0,
1323
1323
  get() {
1324
- return r || i;
1324
+ return r || n;
1325
1325
  }
1326
1326
  });
1327
1327
  var c = w, d = D;
@@ -1331,22 +1331,22 @@ function Zn(e) {
1331
1331
  var C = r.assignedSlot || r.parentNode || /** @type {any} */
1332
1332
  r.host || null;
1333
1333
  try {
1334
- var b = r["__" + n];
1334
+ var b = r["__" + i];
1335
1335
  b != 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
1338
  e.target === r) && b.call(r, e);
1339
- } catch (g) {
1340
- f ? h.push(g) : f = g;
1339
+ } catch (y) {
1340
+ f ? h.push(y) : f = y;
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 y of h)
1348
1348
  queueMicrotask(() => {
1349
- throw g;
1349
+ throw y;
1350
1350
  });
1351
1351
  throw f;
1352
1352
  }
@@ -1355,37 +1355,37 @@ function Zn(e) {
1355
1355
  }
1356
1356
  }
1357
1357
  }
1358
- function Jn(e) {
1358
+ function Ji(e) {
1359
1359
  var t = document.createElement("template");
1360
1360
  return t.innerHTML = e.replaceAll("<!>", "<!---->"), t.content;
1361
1361
  }
1362
1362
  function ts(e, t) {
1363
- var i = (
1363
+ var n = (
1364
1364
  /** @type {Effect} */
1365
1365
  D
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
1370
  function es(e, t) {
1371
- var i = (t & Ki) !== 0, n, s = !e.startsWith("<!>");
1371
+ var n = (t & zn) !== 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 = Ji(s ? e : "<!>" + e), i = /** @type {TemplateNode} */
1374
+ /* @__PURE__ */ ki(i));
1375
1375
  var r = (
1376
1376
  /** @type {TemplateNode} */
1377
- i || Pn ? document.importNode(n, !0) : n.cloneNode(!0)
1377
+ n || Pi ? document.importNode(i, !0) : i.cloneNode(!0)
1378
1378
  );
1379
1379
  return ts(r, r), r;
1380
1380
  };
1381
1381
  }
1382
- function is(e, t) {
1382
+ function ns(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 is(e) {
1389
1389
  return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
1390
1390
  }
1391
1391
  const ss = [
@@ -1434,68 +1434,68 @@ const os = {
1434
1434
  function ls(e) {
1435
1435
  return e = e.toLowerCase(), os[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(() => {
1441
- Le(() => (
1437
+ function us(e, t) {
1438
+ var n = void 0, i;
1439
+ Cn(() => {
1440
+ n !== (n = t()) && (i && (pt(i), i = null), n && (i = yn(() => {
1441
+ Ae(() => (
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 An(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 = An(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 as() {
1458
+ for (var e, t, n = 0, i = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (t = An(e)) && (i && (i += " "), i += t);
1459
+ return i;
1460
1460
  }
1461
1461
  function cs(e) {
1462
- return typeof e == "object" ? us(e) : e ?? "";
1462
+ return typeof e == "object" ? as(e) : e ?? "";
1463
1463
  }
1464
- const Be = [...`
1464
+ const He = [...`
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 ds(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 || He.includes(i[o - 1])) && (l === i.length || He.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
- function ne(e) {
1488
+ function ie(e) {
1489
1489
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
1490
1490
  }
1491
1491
  function fs(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;
1496
+ var r = !1, o = 0, l = !1, a = [];
1497
+ i && a.push(...Object.keys(i).map(ie)), s && a.push(...Object.keys(s).map(ie));
1498
+ var u = 0, c = -1;
1499
1499
  const b = e.length;
1500
1500
  for (var d = 0; d < b; d++) {
1501
1501
  var f = e[d];
@@ -1504,70 +1504,70 @@ function fs(e, t) {
1504
1504
  c = d;
1505
1505
  else if (f === ";" || d === b - 1) {
1506
1506
  if (c !== -1) {
1507
- var h = ne(e.substring(a, c).trim());
1508
- if (!u.includes(h)) {
1507
+ var h = ie(e.substring(u, c).trim());
1508
+ if (!a.includes(h)) {
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 hs(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 = ds(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 se(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 ps(e, t, n, i) {
1542
1542
  var s = e.__style;
1543
1543
  if (s !== t) {
1544
- var r = fs(t, n);
1544
+ var r = fs(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) ? (se(e, n == null ? void 0 : n[0], i[0]), se(e, n == null ? void 0 : n[1], i[1], "important")) : se(e, n, i));
1547
+ return i;
1548
1548
  }
1549
- function me(e, t, i = !1) {
1549
+ function ve(e, t, n = !1) {
1550
1550
  if (e.multiple) {
1551
1551
  if (t == null)
1552
1552
  return;
1553
- if (!$e(t))
1554
- return pn();
1555
- for (var n of e.options)
1556
- n.selected = t.includes(He(n));
1553
+ if (!Xe(t))
1554
+ return pi();
1555
+ for (var i of e.options)
1556
+ i.selected = t.includes(Be(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 = Be(i);
1561
+ if (Si(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
1568
  function _s(e) {
1569
1569
  var t = new MutationObserver(() => {
1570
- me(e, e.__value);
1570
+ ve(e, e.__value);
1571
1571
  });
1572
1572
  t.observe(e, {
1573
1573
  // Listen to option element changes
@@ -1579,141 +1579,141 @@ 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
- function He(e) {
1586
+ function Be(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");
1589
+ const Pt = Symbol("class"), Ot = Symbol("style"), Tn = Symbol("is custom element"), Sn = Symbol("is html");
1590
1590
  function Cs(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[si] = 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[Tn], a = !o[Sn], 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 = cs(n.class) : n[Pt] && (n.class = null), n[Ot] && (n.style ?? (n.style = null));
1602
+ var f = On(e);
1603
+ for (const p in n) {
1604
+ let m = n[p];
1605
+ if (c && p === "value" && m == null) {
1606
+ e.value = e.__value = "", u[p] = m;
1607
1607
  continue;
1608
1608
  }
1609
1609
  if (p === "class") {
1610
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];
1611
+ hs(e, h, m, i, t == null ? void 0 : t[Pt], n[Pt]), u[p] = m, u[Pt] = n[Pt];
1612
1612
  continue;
1613
1613
  }
1614
1614
  if (p === "style") {
1615
- ps(e, y, t == null ? void 0 : t[Ot], i[Ot]), a[p] = y, a[Ot] = i[Ot];
1615
+ ps(e, m, t == null ? void 0 : t[Ot], n[Ot]), u[p] = m, u[Ot] = n[Ot];
1616
1616
  continue;
1617
1617
  }
1618
- var C = a[p];
1619
- if (!(y === C && !(y === void 0 && e.hasAttribute(p)))) {
1620
- a[p] = y;
1618
+ var C = u[p];
1619
+ if (!(m === C && !(m === void 0 && e.hasAttribute(p)))) {
1620
+ u[p] = m;
1621
1621
  var b = p[0] + p[1];
1622
1622
  if (b !== "$$")
1623
1623
  if (b === "on") {
1624
- const T = {}, ot = "$$" + p;
1624
+ const S = {}, ot = "$$" + p;
1625
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;
1626
+ var g = rs(O);
1627
+ if (is(O) && (O = O.slice(0, -7), S.capture = !0), !g && C) {
1628
+ if (m != null) continue;
1629
+ e.removeEventListener(O, u[ot], S), u[ot] = null;
1630
1630
  }
1631
- if (y != null)
1632
- if (v)
1633
- e[`__${O}`] = y, Qn([O]);
1631
+ if (m != null)
1632
+ if (g)
1633
+ e[`__${O}`] = m, Qi([O]);
1634
1634
  else {
1635
- let Mi = function(Ui) {
1636
- a[p].call(this, Ui);
1635
+ let xn = function(Un) {
1636
+ u[p].call(this, Un);
1637
1637
  };
1638
- a[ot] = Xn(O, e, Mi, T);
1638
+ u[ot] = Xi(O, e, xn, S);
1639
1639
  }
1640
- else v && (e[`__${O}`] = void 0);
1640
+ else g && (e[`__${O}`] = void 0);
1641
1641
  } else if (p === "style")
1642
- Ve(e, p, y);
1642
+ Ve(e, p, m);
1643
1643
  else if (p === "autofocus")
1644
- Un(
1644
+ xi(
1645
1645
  /** @type {HTMLElement} */
1646
1646
  e,
1647
- !!y
1647
+ !!m
1648
1648
  );
1649
- else if (!l && (p === "__value" || p === "value" && y != null))
1650
- e.value = e.__value = y;
1649
+ else if (!l && (p === "__value" || p === "value" && m != null))
1650
+ e.value = e.__value = m;
1651
1651
  else if (p === "selected" && c)
1652
1652
  Cs(
1653
1653
  /** @type {HTMLOptionElement} */
1654
1654
  e,
1655
- y
1655
+ m
1656
1656
  );
1657
1657
  else {
1658
- var g = p;
1659
- u || (g = ls(g));
1660
- var m = g === "defaultValue" || g === "defaultChecked";
1661
- if (y == null && !l && !m)
1662
- if (o[p] = null, g === "value" || g === "checked") {
1663
- let T = (
1658
+ var y = p;
1659
+ a || (y = ls(y));
1660
+ var v = y === "defaultValue" || y === "defaultChecked";
1661
+ if (m == null && !l && !v)
1662
+ if (o[p] = null, y === "value" || y === "checked") {
1663
+ let S = (
1664
1664
  /** @type {HTMLInputElement} */
1665
1665
  e
1666
1666
  );
1667
1667
  const ot = t === void 0;
1668
- if (g === "value") {
1669
- let O = T.defaultValue;
1670
- T.removeAttribute(g), T.defaultValue = O, T.value = T.__value = ot ? O : null;
1668
+ if (y === "value") {
1669
+ let O = S.defaultValue;
1670
+ S.removeAttribute(y), S.defaultValue = O, S.value = S.__value = ot ? O : null;
1671
1671
  } else {
1672
- let O = T.defaultChecked;
1673
- T.removeAttribute(g), T.defaultChecked = O, T.checked = ot ? O : !1;
1672
+ let O = S.defaultChecked;
1673
+ S.removeAttribute(y), S.defaultChecked = O, S.checked = ot ? O : !1;
1674
1674
  }
1675
1675
  } else
1676
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);
1677
+ else v || f.includes(y) && (l || typeof m != "string") ? (e[y] = m, y in o && (o[y] = R)) : typeof m != "function" && Ve(e, y, m);
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
+ Ei(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)), b = 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 && ve(
1696
1696
  /** @type {HTMLSelectElement} */
1697
1697
  e,
1698
1698
  C.value
1699
1699
  );
1700
- for (let g of Object.getOwnPropertySymbols(c))
1701
- C[g] || _t(c[g]);
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;
1700
+ for (let y of Object.getOwnPropertySymbols(c))
1701
+ C[y] || pt(c[y]);
1702
+ for (let y of Object.getOwnPropertySymbols(C)) {
1703
+ var g = C[y];
1704
+ y.description === $n && (!u || g !== u[y]) && (c[y] && pt(c[y]), c[y] = yn(() => us(e, () => g))), b[y] = g;
1705
1705
  }
1706
- a = b;
1706
+ u = b;
1707
1707
  }), d) {
1708
1708
  var h = (
1709
1709
  /** @type {HTMLSelectElement} */
1710
1710
  e
1711
1711
  );
1712
- Le(() => {
1713
- me(
1712
+ Ae(() => {
1713
+ ve(
1714
1714
  h,
1715
1715
  /** @type {Record<string | symbol, any>} */
1716
- a.value,
1716
+ u.value,
1717
1717
  !0
1718
1718
  ), _s(h);
1719
1719
  });
@@ -1721,109 +1721,109 @@ function ms(e, t, i = [], n = [], s = [], r, o = !1, l = !1) {
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
+ [Tn]: e.nodeName.includes("-"),
1730
+ [Sn]: e.namespaceURI === qn
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);
1743
- s = Xe(s);
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 = Zn(s);
1741
+ for (var o in i)
1742
+ i[o].set && n.push(o);
1743
+ s = Qe(s);
1744
1744
  }
1745
- return i;
1745
+ return n;
1746
1746
  }
1747
1747
  function je(e, t) {
1748
1748
  return e === t || (e == null ? void 0 : e[ct]) === t;
1749
1749
  }
1750
- function ys(e = {}, t, i, n) {
1751
- return Le(() => {
1750
+ function ms(e = {}, t, n, i) {
1751
+ return Ae(() => {
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 Vi(() => {
1754
+ s = r, r = [], Ln(() => {
1755
+ e !== n(...r) && (t(e, ...r), s && je(n(...s), e) && t(null, ...s));
1756
1756
  });
1757
1757
  }), () => {
1758
1758
  te(() => {
1759
- r && je(i(...r), e) && t(null, ...r);
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 Bt = !1;
1765
+ function gs(e) {
1766
+ var t = Bt;
1767
1767
  try {
1768
- return Ht = !1, [e(), Ht];
1768
+ return Bt = !1, [e(), Bt];
1769
1769
  } finally {
1770
- Ht = t;
1770
+ Bt = t;
1771
1771
  }
1772
1772
  }
1773
- function Vt(e, t, i, n) {
1774
- var m;
1775
- var s = (i & Gi) !== 0, r = (i & zi) !== 0, o = (
1773
+ function Vt(e, t, n, i) {
1774
+ var v;
1775
+ var s = (n & Yn) !== 0, r = (n & Kn) !== 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 ? Ln(
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 = ct in e || ii in e;
1787
+ u = ((v = jt(e, t)) == null ? void 0 : v.set) ?? (c && t in e ? (p) => e[t] = p : void 0);
1788
1788
  }
1789
1789
  var d, f = !1;
1790
- s ? [d, f] = vs(() => (
1790
+ s ? [d, f] = gs(() => (
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)));
1794
+ e[t], d === void 0 && i !== void 0 && (d = a(), u && (ci(), u(d)));
1795
1795
  var h;
1796
1796
  if (h = () => {
1797
1797
  var p = (
1798
1798
  /** @type {V} */
1799
1799
  e[t]
1800
1800
  );
1801
- return p === void 0 ? u() : (l = !0, p);
1802
- }, (i & ji) === 0)
1801
+ return p === void 0 ? a() : (l = !0, p);
1802
+ }, (n & Gn) === 0)
1803
1803
  return h;
1804
- if (a) {
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(p, m) {
1809
+ return arguments.length > 0 ? ((!m || C || f) && u(m ? h() : p), p) : h();
1810
1810
  })
1811
1811
  );
1812
1812
  }
1813
- var b = !1, v = ((i & Wi) !== 0 ? Ne : An)(() => (b = !1, h()));
1814
- s && I(v);
1815
- var g = (
1813
+ var b = !1, g = ((n & jn) !== 0 ? Ne : Li)(() => (b = !1, h()));
1814
+ s && I(g);
1815
+ var y = (
1816
1816
  /** @type {Effect} */
1817
1817
  D
1818
1818
  );
1819
1819
  return (
1820
1820
  /** @type {() => V} */
1821
- (function(p, y) {
1821
+ (function(p, m) {
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 S = m ? I(g) : s ? wt(p) : p;
1824
+ return W(g, S), b = !0, o !== void 0 && (o = S), p;
1825
1825
  }
1826
- return yt && b || (g.f & et) !== 0 ? v.v : I(v);
1826
+ return vt && b || (y.f & et) !== 0 ? g.v : I(g);
1827
1827
  })
1828
1828
  );
1829
1829
  }
@@ -3504,9 +3504,9 @@ const bs = [
3504
3504
  null,
3505
3505
  "0"
3506
3506
  ]
3507
- ], ht = [];
3507
+ ], Et = [];
3508
3508
  for (const e of bs)
3509
- ht.push({
3509
+ Et.push({
3510
3510
  name: "",
3511
3511
  // populated in the plugin
3512
3512
  iso2: e[0],
@@ -3523,262 +3523,7 @@ for (const e of bs)
3523
3523
  dialCodePlus: ""
3524
3524
  // populated in the plugin
3525
3525
  });
3526
- const ws = {
3527
- ad: "Andorra",
3528
- ae: "United Arab Emirates",
3529
- af: "Afghanistan",
3530
- ag: "Antigua & Barbuda",
3531
- ai: "Anguilla",
3532
- al: "Albania",
3533
- am: "Armenia",
3534
- ao: "Angola",
3535
- ar: "Argentina",
3536
- as: "American Samoa",
3537
- at: "Austria",
3538
- au: "Australia",
3539
- aw: "Aruba",
3540
- ax: "Åland Islands",
3541
- az: "Azerbaijan",
3542
- ba: "Bosnia & Herzegovina",
3543
- bb: "Barbados",
3544
- bd: "Bangladesh",
3545
- be: "Belgium",
3546
- bf: "Burkina Faso",
3547
- bg: "Bulgaria",
3548
- bh: "Bahrain",
3549
- bi: "Burundi",
3550
- bj: "Benin",
3551
- bl: "St. Barthélemy",
3552
- bm: "Bermuda",
3553
- bn: "Brunei",
3554
- bo: "Bolivia",
3555
- bq: "Caribbean Netherlands",
3556
- br: "Brazil",
3557
- bs: "Bahamas",
3558
- bt: "Bhutan",
3559
- bw: "Botswana",
3560
- by: "Belarus",
3561
- bz: "Belize",
3562
- ca: "Canada",
3563
- cc: "Cocos (Keeling) Islands",
3564
- cd: "Congo - Kinshasa",
3565
- cf: "Central African Republic",
3566
- cg: "Congo - Brazzaville",
3567
- ch: "Switzerland",
3568
- ci: "Côte d’Ivoire",
3569
- ck: "Cook Islands",
3570
- cl: "Chile",
3571
- cm: "Cameroon",
3572
- cn: "China",
3573
- co: "Colombia",
3574
- cr: "Costa Rica",
3575
- cu: "Cuba",
3576
- cv: "Cape Verde",
3577
- cw: "Curaçao",
3578
- cx: "Christmas Island",
3579
- cy: "Cyprus",
3580
- cz: "Czechia",
3581
- de: "Germany",
3582
- dj: "Djibouti",
3583
- dk: "Denmark",
3584
- dm: "Dominica",
3585
- do: "Dominican Republic",
3586
- dz: "Algeria",
3587
- ec: "Ecuador",
3588
- ee: "Estonia",
3589
- eg: "Egypt",
3590
- eh: "Western Sahara",
3591
- er: "Eritrea",
3592
- es: "Spain",
3593
- et: "Ethiopia",
3594
- fi: "Finland",
3595
- fj: "Fiji",
3596
- fk: "Falkland Islands",
3597
- fm: "Micronesia",
3598
- fo: "Faroe Islands",
3599
- fr: "France",
3600
- ga: "Gabon",
3601
- gb: "United Kingdom",
3602
- gd: "Grenada",
3603
- ge: "Georgia",
3604
- gf: "French Guiana",
3605
- gg: "Guernsey",
3606
- gh: "Ghana",
3607
- gi: "Gibraltar",
3608
- gl: "Greenland",
3609
- gm: "Gambia",
3610
- gn: "Guinea",
3611
- gp: "Guadeloupe",
3612
- gq: "Equatorial Guinea",
3613
- gr: "Greece",
3614
- gt: "Guatemala",
3615
- gu: "Guam",
3616
- gw: "Guinea-Bissau",
3617
- gy: "Guyana",
3618
- hk: "Hong Kong SAR China",
3619
- hn: "Honduras",
3620
- hr: "Croatia",
3621
- ht: "Haiti",
3622
- hu: "Hungary",
3623
- id: "Indonesia",
3624
- ie: "Ireland",
3625
- il: "Israel",
3626
- im: "Isle of Man",
3627
- in: "India",
3628
- io: "British Indian Ocean Territory",
3629
- iq: "Iraq",
3630
- ir: "Iran",
3631
- is: "Iceland",
3632
- it: "Italy",
3633
- je: "Jersey",
3634
- jm: "Jamaica",
3635
- jo: "Jordan",
3636
- jp: "Japan",
3637
- ke: "Kenya",
3638
- kg: "Kyrgyzstan",
3639
- kh: "Cambodia",
3640
- ki: "Kiribati",
3641
- km: "Comoros",
3642
- kn: "St. Kitts & Nevis",
3643
- kp: "North Korea",
3644
- kr: "South Korea",
3645
- kw: "Kuwait",
3646
- ky: "Cayman Islands",
3647
- kz: "Kazakhstan",
3648
- la: "Laos",
3649
- lb: "Lebanon",
3650
- lc: "St. Lucia",
3651
- li: "Liechtenstein",
3652
- lk: "Sri Lanka",
3653
- lr: "Liberia",
3654
- ls: "Lesotho",
3655
- lt: "Lithuania",
3656
- lu: "Luxembourg",
3657
- lv: "Latvia",
3658
- ly: "Libya",
3659
- ma: "Morocco",
3660
- mc: "Monaco",
3661
- md: "Moldova",
3662
- me: "Montenegro",
3663
- mf: "St. Martin",
3664
- mg: "Madagascar",
3665
- mh: "Marshall Islands",
3666
- mk: "North Macedonia",
3667
- ml: "Mali",
3668
- mm: "Myanmar (Burma)",
3669
- mn: "Mongolia",
3670
- mo: "Macao SAR China",
3671
- mp: "Northern Mariana Islands",
3672
- mq: "Martinique",
3673
- mr: "Mauritania",
3674
- ms: "Montserrat",
3675
- mt: "Malta",
3676
- mu: "Mauritius",
3677
- mv: "Maldives",
3678
- mw: "Malawi",
3679
- mx: "Mexico",
3680
- my: "Malaysia",
3681
- mz: "Mozambique",
3682
- na: "Namibia",
3683
- nc: "New Caledonia",
3684
- ne: "Niger",
3685
- nf: "Norfolk Island",
3686
- ng: "Nigeria",
3687
- ni: "Nicaragua",
3688
- nl: "Netherlands",
3689
- no: "Norway",
3690
- np: "Nepal",
3691
- nr: "Nauru",
3692
- nu: "Niue",
3693
- nz: "New Zealand",
3694
- om: "Oman",
3695
- pa: "Panama",
3696
- pe: "Peru",
3697
- pf: "French Polynesia",
3698
- pg: "Papua New Guinea",
3699
- ph: "Philippines",
3700
- pk: "Pakistan",
3701
- pl: "Poland",
3702
- pm: "St. Pierre & Miquelon",
3703
- pr: "Puerto Rico",
3704
- ps: "Palestinian Territories",
3705
- pt: "Portugal",
3706
- pw: "Palau",
3707
- py: "Paraguay",
3708
- qa: "Qatar",
3709
- re: "Réunion",
3710
- ro: "Romania",
3711
- rs: "Serbia",
3712
- ru: "Russia",
3713
- rw: "Rwanda",
3714
- sa: "Saudi Arabia",
3715
- sb: "Solomon Islands",
3716
- sc: "Seychelles",
3717
- sd: "Sudan",
3718
- se: "Sweden",
3719
- sg: "Singapore",
3720
- sh: "St. Helena",
3721
- si: "Slovenia",
3722
- sj: "Svalbard & Jan Mayen",
3723
- sk: "Slovakia",
3724
- sl: "Sierra Leone",
3725
- sm: "San Marino",
3726
- sn: "Senegal",
3727
- so: "Somalia",
3728
- sr: "Suriname",
3729
- ss: "South Sudan",
3730
- st: "São Tomé & Príncipe",
3731
- sv: "El Salvador",
3732
- sx: "Sint Maarten",
3733
- sy: "Syria",
3734
- sz: "Eswatini",
3735
- tc: "Turks & Caicos Islands",
3736
- td: "Chad",
3737
- tg: "Togo",
3738
- th: "Thailand",
3739
- tj: "Tajikistan",
3740
- tk: "Tokelau",
3741
- tl: "Timor-Leste",
3742
- tm: "Turkmenistan",
3743
- tn: "Tunisia",
3744
- to: "Tonga",
3745
- tr: "Turkey",
3746
- tt: "Trinidad & Tobago",
3747
- tv: "Tuvalu",
3748
- tw: "Taiwan",
3749
- tz: "Tanzania",
3750
- ua: "Ukraine",
3751
- ug: "Uganda",
3752
- us: "United States",
3753
- uy: "Uruguay",
3754
- uz: "Uzbekistan",
3755
- va: "Vatican City",
3756
- vc: "St. Vincent & Grenadines",
3757
- ve: "Venezuela",
3758
- vg: "British Virgin Islands",
3759
- vi: "U.S. Virgin Islands",
3760
- vn: "Vietnam",
3761
- vu: "Vanuatu",
3762
- wf: "Wallis & Futuna",
3763
- ws: "Samoa",
3764
- ye: "Yemen",
3765
- yt: "Mayotte",
3766
- za: "South Africa",
3767
- zm: "Zambia",
3768
- zw: "Zimbabwe"
3769
- }, Is = {
3770
- selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
3771
- noCountrySelected: "Select country",
3772
- countryListAriaLabel: "List of countries",
3773
- searchPlaceholder: "Search",
3774
- clearSearchAriaLabel: "Clear search",
3775
- zeroSearchResults: "No results found",
3776
- oneSearchResult: "1 result found",
3777
- multipleSearchResults: "${count} results found",
3778
- // additional countries (not supported by country-list library)
3779
- ac: "Ascension Island",
3780
- xk: "Kosovo"
3781
- }, Pi = { ...ws, ...Is }, Wt = {
3526
+ const Wt = {
3782
3527
  OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
3783
3528
  CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
3784
3529
  COUNTRY_CHANGE: "countrychange",
@@ -3792,7 +3537,7 @@ const ws = {
3792
3537
  FLAG: "iti__flag",
3793
3538
  COUNTRY_ITEM: "iti__country",
3794
3539
  HIGHLIGHT: "iti__highlight"
3795
- }, U = {
3540
+ }, x = {
3796
3541
  ARROW_UP: "ArrowUp",
3797
3542
  ARROW_DOWN: "ArrowDown",
3798
3543
  SPACE: " ",
@@ -3811,9 +3556,9 @@ const ws = {
3811
3556
  // chars that are NOT + or digit (global)
3812
3557
  HIDDEN_SEARCH_CHAR: /^[a-zA-ZÀ-ÿа-яА-Я ]$/
3813
3558
  // single acceptable hidden-search char
3814
- }, Es = {
3559
+ }, ws = {
3815
3560
  HIDDEN_SEARCH_RESET_MS: 1e3
3816
- }, ze = {
3561
+ }, Ye = {
3817
3562
  UNKNOWN_NUMBER_TYPE: -99,
3818
3563
  UNKNOWN_VALIDATION_ERROR: -99
3819
3564
  }, re = {
@@ -3823,7 +3568,7 @@ const ws = {
3823
3568
  // px width fallback when no separate dial code
3824
3569
  INPUT_PADDING_EXTRA_LEFT: 6
3825
3570
  // px gap between selected country container and input text
3826
- }, Oi = {
3571
+ }, Rn = {
3827
3572
  NANP: "1"
3828
3573
  // North American Numbering Plan
3829
3574
  }, oe = {
@@ -3833,9 +3578,9 @@ const ws = {
3833
3578
  // UK mobile numbers start with 7 after national trunk (0) or core section
3834
3579
  MOBILE_CORE_LENGTH: 10
3835
3580
  // core number length (excluding dial code / national prefix) for mobiles
3836
- }, Ns = {
3581
+ }, Is = {
3837
3582
  ISO2: "us"
3838
- }, ye = {
3583
+ }, me = {
3839
3584
  AGGRESSIVE: "aggressive",
3840
3585
  POLITE: "polite"
3841
3586
  }, le = {
@@ -3843,7 +3588,7 @@ const ws = {
3843
3588
  }, Ke = {
3844
3589
  COUNTRY_CODE: "countryCode",
3845
3590
  DIAL_CODE: "dialCode"
3846
- }, A = {
3591
+ }, L = {
3847
3592
  EXPANDED: "aria-expanded",
3848
3593
  LABEL: "aria-label",
3849
3594
  SELECTED: "aria-selected",
@@ -3853,23 +3598,35 @@ const ws = {
3853
3598
  HIDDEN: "aria-hidden",
3854
3599
  AUTOCOMPLETE: "aria-autocomplete",
3855
3600
  MODAL: "aria-modal"
3856
- }, ae = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, Ds = () => {
3601
+ }, Es = {
3602
+ selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
3603
+ noCountrySelected: "Select country",
3604
+ countryListAriaLabel: "List of countries",
3605
+ searchPlaceholder: "Search",
3606
+ clearSearchAriaLabel: "Clear search",
3607
+ searchEmptyState: "No results found",
3608
+ searchSummaryAria(e) {
3609
+ return e === 0 ? "No results found" : e === 1 ? "1 result found" : `${e} results found`;
3610
+ }
3611
+ }, ue = (e) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(e).matches, Ns = () => {
3857
3612
  if (typeof navigator < "u" && typeof window < "u") {
3858
- const e = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
3859
- navigator.userAgent
3860
- ), t = ae("(max-width: 500px)"), i = ae("(max-height: 600px)"), n = ae("(pointer: coarse)");
3861
- return e || t || n && i;
3613
+ const e = ue("(max-width: 500px)"), t = ue("(max-height: 600px)"), n = ue("(pointer: coarse)");
3614
+ return e || n && t;
3862
3615
  }
3863
3616
  return !1;
3864
- }, Ri = {
3865
- // Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
3866
- allowPhonewords: !1,
3617
+ }, kn = {
3867
3618
  //* Whether or not to allow the dropdown.
3868
3619
  allowDropdown: !0,
3620
+ //* Whether or not to allow extensions after the main number.
3621
+ allowNumberExtensions: !1,
3622
+ // Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
3623
+ allowPhonewords: !1,
3869
3624
  //* Add a placeholder in the input with an example number for the selected country.
3870
- autoPlaceholder: ye.POLITE,
3625
+ autoPlaceholder: me.POLITE,
3871
3626
  //* Modify the parentClass.
3872
3627
  containerClass: "",
3628
+ //* Locale for localising country names via Intl.DisplayNames.
3629
+ countryNameLocale: "en",
3873
3630
  //* The order of the countries in the dropdown. Defaults to alphabetical.
3874
3631
  countryOrder: null,
3875
3632
  //* Add a country search input at the top of the dropdown.
@@ -3909,167 +3666,167 @@ const ws = {
3909
3666
  //* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
3910
3667
  strictMode: !1,
3911
3668
  //* Use full screen popup instead of dropdown for country list.
3912
- useFullscreenPopup: Ds(),
3669
+ useFullscreenPopup: Ns(),
3913
3670
  //* The number type to enforce during validation.
3914
- validationNumberTypes: ["MOBILE"]
3915
- }, As = (e, t) => {
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 = [];
3671
+ allowedNumberTypes: ["MOBILE", "FIXED_LINE"]
3672
+ }, Ds = (e) => {
3673
+ 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 = { ...Es, ...e.i18n };
3674
+ }, Gt = (e) => e.replace(/\D/g, ""), Mn = (e = "") => e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), Ls = (e, t) => {
3675
+ const n = Mn(t), i = [], s = [], r = [], o = [], l = [], a = [];
3919
3676
  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;
3677
+ 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);
3678
+ const u = (c, d) => c.priority - d.priority;
3922
3679
  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)
3680
+ ...i.sort(u),
3681
+ ...s.sort(u),
3682
+ ...r.sort(u),
3683
+ ...o.sort(u),
3684
+ ...l.sort(u),
3685
+ ...a.sort(u)
3929
3686
  ];
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;
3687
+ }, As = (e, t) => {
3688
+ const n = t.toLowerCase();
3689
+ for (const i of e)
3690
+ if (i.name.toLowerCase().startsWith(n))
3691
+ return i;
3935
3692
  return null;
3936
- }, ue = (e) => Object.keys(e).filter((t) => !!e[t]).join(" "), S = (e, t, i) => {
3937
- const n = document.createElement(e);
3693
+ }, ae = (e) => Object.keys(e).filter((t) => !!e[t]).join(" "), T = (e, t, n) => {
3694
+ const i = document.createElement(e);
3938
3695
  return t && Object.entries(t).forEach(
3939
- ([s, r]) => n.setAttribute(s, r)
3940
- ), i && i.appendChild(n), n;
3696
+ ([s, r]) => i.setAttribute(s, r)
3697
+ ), n && n.appendChild(i), i;
3941
3698
  }, Ts = () => `
3942
- <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${A.HIDDEN}="true">
3699
+ <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${L.HIDDEN}="true">
3943
3700
  <circle cx="11" cy="11" r="7" />
3944
3701
  <line x1="21" y1="21" x2="16.65" y2="16.65" />
3945
- </svg>`, Ps = (e) => {
3702
+ </svg>`, Ss = (e) => {
3946
3703
  const t = `iti-${e}-clear-mask`;
3947
3704
  return `
3948
- <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${A.HIDDEN}="true" focusable="false">
3705
+ <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${L.HIDDEN}="true" focusable="false">
3949
3706
  <mask id="${t}" maskUnits="userSpaceOnUse">
3950
3707
  <rect width="16" height="16" fill="white" />
3951
3708
  <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" />
3952
3709
  </mask>
3953
3710
  <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />
3954
3711
  </svg>`;
3955
- };
3712
+ }, Ps = () => `
3713
+ <svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
3714
+ <path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>
3715
+ <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>
3716
+ </svg>`;
3956
3717
  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);
3718
+ constructor(t, n, i) {
3719
+ 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
3720
  }
3960
3721
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
3961
3722
  generateMarkup(t) {
3962
- this.countries = t, this._prepareTelInput();
3963
- const i = this._createWrapperAndInsert();
3964
- this._maybeBuildCountryContainer(i), i.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs(i);
3965
- }
3966
- _prepareTelInput() {
3967
- var t;
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");
3723
+ this.countries = t, this.telInput.classList.add("iti__tel-input");
3724
+ const n = this._createWrapperAndInsert();
3725
+ this._maybeBuildCountryContainer(n), n.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs(n);
3969
3726
  }
3970
3727
  _createWrapperAndInsert() {
3971
- const { allowDropdown: t, showFlags: i, containerClass: n, useFullscreenPopup: s } = this.options, r = ue({
3728
+ const { allowDropdown: t, showFlags: n, containerClass: i, useFullscreenPopup: s } = this.options, r = ae({
3972
3729
  iti: !0,
3973
3730
  "iti--allow-dropdown": t,
3974
- "iti--show-flags": i,
3731
+ "iti--show-flags": n,
3975
3732
  "iti--inline-dropdown": !s,
3976
- [n]: !!n
3977
- }), o = S("div", { class: r });
3733
+ [i]: !!i
3734
+ }), o = T("div", { class: r });
3978
3735
  return this.isRTL && o.setAttribute("dir", "ltr"), this.telInput.before(o), o;
3979
3736
  }
3980
3737
  _maybeBuildCountryContainer(t) {
3981
- const { allowDropdown: i, separateDialCode: n, showFlags: s } = this.options;
3982
- if (i || s || n) {
3983
- this.countryContainer = S(
3738
+ const { allowDropdown: n, separateDialCode: i, showFlags: s } = this.options;
3739
+ if (n || s || i) {
3740
+ this.countryContainer = T(
3984
3741
  "div",
3985
3742
  // visibly hidden until we measure it's width to set the input padding correctly
3986
3743
  { class: `iti__country-container ${E.V_HIDE}` },
3987
3744
  t
3988
- ), i ? (this.selectedCountry = S(
3745
+ ), n ? (this.selectedCountry = T(
3989
3746
  "button",
3990
3747
  {
3991
3748
  type: "button",
3992
3749
  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`
3750
+ [L.EXPANDED]: "false",
3751
+ [L.LABEL]: this.options.i18n.noCountrySelected,
3752
+ [L.HASPOPUP]: "dialog",
3753
+ [L.CONTROLS]: `iti-${this.id}__dropdown-content`
3997
3754
  },
3998
3755
  this.countryContainer
3999
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = S(
3756
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
4000
3757
  "div",
4001
3758
  { class: "iti__selected-country" },
4002
3759
  this.countryContainer
4003
3760
  );
4004
- const r = S(
3761
+ const r = T(
4005
3762
  "div",
4006
3763
  { class: "iti__selected-country-primary" },
4007
3764
  this.selectedCountry
4008
3765
  );
4009
- this.selectedCountryInner = S(
3766
+ this.selectedCountryInner = T(
4010
3767
  "div",
4011
3768
  { class: E.FLAG },
4012
3769
  r
4013
- ), i && (this.dropdownArrow = S(
3770
+ ), n && (this.dropdownArrow = T(
4014
3771
  "div",
4015
- { class: "iti__arrow", [A.HIDDEN]: "true" },
3772
+ { class: "iti__arrow", [L.HIDDEN]: "true" },
4016
3773
  r
4017
- )), n && (this.selectedDialCode = S(
3774
+ )), i && (this.selectedDialCode = T(
4018
3775
  "div",
4019
3776
  { class: "iti__selected-dial-code" },
4020
3777
  this.selectedCountry
4021
- )), i && this._buildDropdownContent();
3778
+ )), n && this._buildDropdownContent();
4022
3779
  }
4023
3780
  }
4024
3781
  _buildDropdownContent() {
4025
3782
  const {
4026
3783
  fixDropdownWidth: t,
4027
- useFullscreenPopup: i,
4028
- countrySearch: n,
3784
+ useFullscreenPopup: n,
3785
+ countrySearch: i,
4029
3786
  i18n: s,
4030
3787
  dropdownContainer: r,
4031
3788
  containerClass: o
4032
3789
  } = this.options, l = t ? "" : "iti--flexible-dropdown-width";
4033
- if (this.dropdownContent = S("div", {
3790
+ if (this.dropdownContent = T("div", {
4034
3791
  id: `iti-${this.id}__dropdown-content`,
4035
3792
  class: `iti__dropdown-content ${E.HIDE} ${l}`,
4036
3793
  role: "dialog",
4037
- [A.MODAL]: "true"
4038
- }), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), n && this._buildSearchUI(), this.countryList = S(
3794
+ [L.MODAL]: "true"
3795
+ }), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), i && this._buildSearchUI(), this.countryList = T(
4039
3796
  "ul",
4040
3797
  {
4041
3798
  class: "iti__country-list",
4042
3799
  id: `iti-${this.id}__country-listbox`,
4043
3800
  role: "listbox",
4044
- [A.LABEL]: s.countryListAriaLabel
3801
+ [L.LABEL]: s.countryListAriaLabel
4045
3802
  },
4046
3803
  this.dropdownContent
4047
- ), this._appendListItems(), n && this.updateSearchResultsA11yText(), r) {
4048
- const u = ue({
3804
+ ), this._appendListItems(), i && this.updateSearchResultsA11yText(), r) {
3805
+ const a = ae({
4049
3806
  iti: !0,
4050
3807
  "iti--container": !0,
4051
- "iti--fullscreen-popup": i,
4052
- "iti--inline-dropdown": !i,
3808
+ "iti--fullscreen-popup": n,
3809
+ "iti--inline-dropdown": !n,
4053
3810
  [o]: !!o
4054
3811
  });
4055
- this.dropdown = S("div", { class: u }), this.dropdown.appendChild(this.dropdownContent);
3812
+ this.dropdown = T("div", { class: a }), this.dropdown.appendChild(this.dropdownContent);
4056
3813
  } else
4057
3814
  this.countryContainer.appendChild(this.dropdownContent);
4058
3815
  }
4059
3816
  _buildSearchUI() {
4060
- const { i18n: t } = this.options, i = S(
3817
+ const { i18n: t } = this.options, n = T(
4061
3818
  "div",
4062
3819
  { class: "iti__search-input-wrapper" },
4063
3820
  this.dropdownContent
4064
3821
  );
4065
- this.searchIcon = S(
3822
+ this.searchIcon = T(
4066
3823
  "span",
4067
3824
  {
4068
3825
  class: "iti__search-icon",
4069
- [A.HIDDEN]: "true"
3826
+ [L.HIDDEN]: "true"
4070
3827
  },
4071
- i
4072
- ), this.searchIcon.innerHTML = Ts(), this.searchInput = S(
3828
+ n
3829
+ ), this.searchIcon.innerHTML = Ts(), this.searchInput = T(
4073
3830
  "input",
4074
3831
  {
4075
3832
  id: `iti-${this.id}__search-input`,
@@ -4079,49 +3836,49 @@ class Os {
4079
3836
  placeholder: t.searchPlaceholder,
4080
3837
  // 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
3838
  role: "combobox",
4082
- [A.EXPANDED]: "true",
4083
- [A.LABEL]: t.searchPlaceholder,
4084
- [A.CONTROLS]: `iti-${this.id}__country-listbox`,
4085
- [A.AUTOCOMPLETE]: "list",
3839
+ [L.EXPANDED]: "true",
3840
+ [L.LABEL]: t.searchPlaceholder,
3841
+ [L.CONTROLS]: `iti-${this.id}__country-listbox`,
3842
+ [L.AUTOCOMPLETE]: "list",
4086
3843
  autocomplete: "off"
4087
3844
  },
4088
- i
4089
- ), this.searchClearButton = S(
3845
+ n
3846
+ ), this.searchClearButton = T(
4090
3847
  "button",
4091
3848
  {
4092
3849
  type: "button",
4093
3850
  class: `iti__search-clear ${E.HIDE}`,
4094
- [A.LABEL]: t.clearSearchAriaLabel,
3851
+ [L.LABEL]: t.clearSearchAriaLabel,
4095
3852
  tabindex: "-1"
4096
3853
  },
4097
- i
4098
- ), this.searchClearButton.innerHTML = Ps(this.id), this.searchResultsA11yText = S(
3854
+ n
3855
+ ), this.searchClearButton.innerHTML = Ss(this.id), this.searchResultsA11yText = T(
4099
3856
  "span",
4100
3857
  { class: "iti__a11y-text" },
4101
3858
  this.dropdownContent
4102
- ), this.searchNoResults = S(
3859
+ ), this.searchNoResults = T(
4103
3860
  "div",
4104
3861
  {
4105
3862
  class: `iti__no-results ${E.HIDE}`,
4106
- [A.HIDDEN]: "true"
3863
+ [L.HIDDEN]: "true"
4107
3864
  // all a11y messaging happens in this.searchResultsA11yText
4108
3865
  },
4109
3866
  this.dropdownContent
4110
- ), this.searchNoResults.textContent = t.zeroSearchResults;
3867
+ ), this.searchNoResults.textContent = t.searchEmptyState;
4111
3868
  }
4112
3869
  _maybeUpdateInputPaddingAndReveal() {
4113
3870
  this.countryContainer && (this.updateInputPadding(), this.countryContainer.classList.remove(E.V_HIDE));
4114
3871
  }
4115
3872
  _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);
3873
+ var i, s;
3874
+ const { hiddenInput: n } = this.options;
3875
+ if (n) {
3876
+ const r = this.telInput.getAttribute("name") || "", o = n(r);
4120
3877
  if (o.phone) {
4121
- const l = (n = this.telInput.form) == null ? void 0 : n.querySelector(
3878
+ const l = (i = this.telInput.form) == null ? void 0 : i.querySelector(
4122
3879
  `input[name="${o.phone}"]`
4123
3880
  );
4124
- l ? this.hiddenInput = l : (this.hiddenInput = S("input", {
3881
+ l ? this.hiddenInput = l : (this.hiddenInput = T("input", {
4125
3882
  type: "hidden",
4126
3883
  name: o.phone
4127
3884
  }), t.appendChild(this.hiddenInput));
@@ -4130,7 +3887,7 @@ class Os {
4130
3887
  const l = (s = this.telInput.form) == null ? void 0 : s.querySelector(
4131
3888
  `input[name="${o.country}"]`
4132
3889
  );
4133
- l ? this.hiddenInputCountry = l : (this.hiddenInputCountry = S("input", {
3890
+ l ? this.hiddenInputCountry = l : (this.hiddenInputCountry = T("input", {
4134
3891
  type: "hidden",
4135
3892
  name: o.country
4136
3893
  }), t.appendChild(this.hiddenInputCountry));
@@ -4140,29 +3897,29 @@ class Os {
4140
3897
  //* For each country: add a country list item <li> to the countryList <ul> container.
4141
3898
  _appendListItems() {
4142
3899
  const t = document.createDocumentFragment();
4143
- for (let i = 0; i < this.countries.length; i++) {
4144
- const n = this.countries[i], s = ue({
3900
+ for (let n = 0; n < this.countries.length; n++) {
3901
+ const i = this.countries[n], s = ae({
4145
3902
  [E.COUNTRY_ITEM]: !0
4146
- }), r = S("li", {
4147
- id: `iti-${this.id}__item-${n.iso2}`,
3903
+ }), r = T("li", {
3904
+ id: `iti-${this.id}__item-${i.iso2}`,
4148
3905
  class: s,
4149
3906
  tabindex: "-1",
4150
3907
  role: "option",
4151
- [A.SELECTED]: "false"
3908
+ [L.SELECTED]: "false"
4152
3909
  });
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);
3910
+ r.dataset.dialCode = i.dialCode, r.dataset.countryCode = i.iso2, i.nodeById[this.id] = r, this.options.showFlags && T("div", { class: `${E.FLAG} iti__${i.iso2}` }, r);
3911
+ const o = T("span", { class: "iti__country-name" }, r);
3912
+ o.textContent = i.name;
3913
+ const l = T("span", { class: "iti__dial-code" }, r);
3914
+ this.isRTL && l.setAttribute("dir", "ltr"), l.textContent = `+${i.dialCode}`, t.appendChild(r);
4158
3915
  }
4159
3916
  this.countryList.appendChild(t);
4160
3917
  }
4161
3918
  //* Update the input padding to make space for the selected country/dial code.
4162
3919
  updateInputPadding() {
4163
3920
  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`;
3921
+ const t = this.options.separateDialCode ? re.SANE_SELECTED_WITH_DIAL_WIDTH : re.SANE_SELECTED_NO_DIAL_WIDTH, i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || t) + re.INPUT_PADDING_EXTRA_LEFT;
3922
+ this.telInput.style.paddingLeft = `${i}px`;
4166
3923
  }
4167
3924
  }
4168
3925
  //* When input is in a hidden container during init, we cannot calculate the selected country width.
@@ -4177,165 +3934,161 @@ class Os {
4177
3934
  } catch {
4178
3935
  t = document.body;
4179
3936
  }
4180
- const i = this.telInput.parentNode.cloneNode(
3937
+ const n = this.telInput.parentNode.cloneNode(
4181
3938
  !1
4182
3939
  );
4183
- i.style.visibility = "hidden", t.appendChild(i);
4184
- const n = this.countryContainer.cloneNode();
4185
- i.appendChild(n);
3940
+ n.style.visibility = "hidden", t.appendChild(n);
3941
+ const i = this.countryContainer.cloneNode();
3942
+ n.appendChild(i);
4186
3943
  const s = this.selectedCountry.cloneNode(
4187
3944
  !0
4188
3945
  );
4189
- n.appendChild(s);
3946
+ i.appendChild(s);
4190
3947
  const r = s.offsetWidth;
4191
- return t.removeChild(i), r;
3948
+ return t.removeChild(n), r;
4192
3949
  }
4193
3950
  return 0;
4194
3951
  }
4195
3952
  //* Update search results text (for a11y).
4196
3953
  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(
4200
- "${count}",
4201
- i.toString()
4202
- ), this.searchResultsA11yText.textContent = n;
3954
+ const { i18n: t } = this.options, n = this.countryList.childElementCount;
3955
+ this.searchResultsA11yText.textContent = t.searchSummaryAria(n);
4203
3956
  }
4204
3957
  //* Check if an element is visible within it's container, else scroll until it is.
4205
3958
  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) {
3959
+ 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;
3960
+ if (a < r)
3961
+ n.scrollTop = c;
3962
+ else if (u > o) {
4210
3963
  const d = s - l;
4211
- i.scrollTop = c - d;
3964
+ n.scrollTop = c - d;
4212
3965
  }
4213
3966
  }
4214
3967
  //* 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)) {
3968
+ highlightListItem(t, n) {
3969
+ const i = this.highlightedItem;
3970
+ if (i && i.classList.remove(E.HIGHLIGHT), this.highlightedItem = t, this.highlightedItem && (this.highlightedItem.classList.add(E.HIGHLIGHT), this.options.countrySearch)) {
4218
3971
  const s = this.highlightedItem.getAttribute("id") || "";
4219
- this.searchInput.setAttribute(A.ACTIVE_DESCENDANT, s);
3972
+ this.searchInput.setAttribute(L.ACTIVE_DESCENDANT, s);
4220
3973
  }
4221
- i && this.highlightedItem.focus();
3974
+ n && this.highlightedItem.focus();
4222
3975
  }
4223
3976
  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(
3977
+ if (this.selectedItem && this.selectedItem.dataset.countryCode !== t && (this.selectedItem.setAttribute(L.SELECTED, "false"), this.selectedItem = null), t && !this.selectedItem) {
3978
+ const n = this.countryList.querySelector(
4226
3979
  `[data-country-code="${t}"]`
4227
3980
  );
4228
- i && (i.setAttribute(A.SELECTED, "true"), this.selectedItem = i);
3981
+ n && (n.setAttribute(L.SELECTED, "true"), this.selectedItem = n);
4229
3982
  }
4230
3983
  }
4231
3984
  //* Country search: Filter the country list to the given array of countries.
4232
3985
  filterCountries(t) {
4233
3986
  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));
3987
+ let n = !0;
3988
+ for (const i of t) {
3989
+ const s = i.nodeById[this.id];
3990
+ s && (this.countryList.appendChild(s), n && (this.highlightListItem(s, !1), n = !1));
4238
3991
  }
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();
3992
+ 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
3993
  }
4241
3994
  destroy() {
4242
3995
  this.telInput.iti = void 0, delete this.telInput.dataset.intlTelInputId, this.options.separateDialCode && (this.telInput.style.paddingLeft = this.originalPaddingLeft);
4243
3996
  const t = this.telInput.parentNode;
4244
3997
  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];
3998
+ for (const n of this.countries)
3999
+ delete n.nodeById[this.id];
4247
4000
  this.countries = null;
4248
4001
  }
4249
4002
  }
4250
4003
  const Rs = (e) => {
4251
- const { onlyCountries: t, excludeCountries: i } = e;
4004
+ const { onlyCountries: t, excludeCountries: n } = e;
4252
4005
  if (t.length) {
4253
- const n = t.map(
4006
+ const i = t.map(
4254
4007
  (s) => s.toLowerCase()
4255
4008
  );
4256
- return ht.filter(
4257
- (s) => n.includes(s.iso2)
4009
+ return Et.filter(
4010
+ (s) => i.includes(s.iso2)
4258
4011
  );
4259
- } else if (i.length) {
4260
- const n = i.map(
4012
+ } else if (n.length) {
4013
+ const i = n.map(
4261
4014
  (s) => s.toLowerCase()
4262
4015
  );
4263
- return ht.filter(
4264
- (s) => !n.includes(s.iso2)
4016
+ return Et.filter(
4017
+ (s) => !i.includes(s.iso2)
4265
4018
  );
4266
4019
  }
4267
- return ht;
4020
+ return Et;
4268
4021
  }, ks = (e, t) => {
4269
- for (const i of e) {
4270
- const n = i.iso2.toLowerCase();
4271
- t.i18n[n] && (i.name = t.i18n[n]);
4272
- }
4022
+ const { countryNameLocale: n, i18n: i } = t, r = typeof Intl < "u" && typeof Intl.DisplayNames == "function" ? new Intl.DisplayNames(n, {
4023
+ type: "region"
4024
+ }) : null;
4025
+ for (const o of e)
4026
+ o.name = i[o.iso2] || (r == null ? void 0 : r.of(o.iso2.toUpperCase()));
4273
4027
  }, Ms = (e) => {
4274
4028
  const t = /* @__PURE__ */ new Set();
4275
- let i = 0;
4276
- const n = {}, s = (o, l) => {
4029
+ let n = 0;
4030
+ const i = {}, s = (o, l) => {
4277
4031
  if (!o || !l)
4278
4032
  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);
4033
+ l.length > n && (n = l.length), i.hasOwnProperty(l) || (i[l] = []);
4034
+ const a = i[l];
4035
+ a.includes(o) || a.push(o);
4282
4036
  }, r = [...e].sort((o, l) => o.priority - l.priority);
4283
4037
  for (const o of r) {
4284
4038
  t.has(o.dialCode) || t.add(o.dialCode);
4285
4039
  for (let l = 1; l < o.dialCode.length; l++) {
4286
- const u = o.dialCode.substring(0, l);
4287
- s(o.iso2, u);
4040
+ const a = o.dialCode.substring(0, l);
4041
+ s(o.iso2, a);
4288
4042
  }
4289
4043
  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;
4044
+ const l = i[o.dialCode][0];
4045
+ for (const a of o.areaCodes) {
4046
+ for (let u = 1; u < a.length; u++) {
4047
+ const c = a.substring(0, u), d = o.dialCode + c;
4294
4048
  s(l, d), s(o.iso2, d);
4295
4049
  }
4296
- s(o.iso2, o.dialCode + u);
4050
+ s(o.iso2, o.dialCode + a);
4297
4051
  }
4298
4052
  }
4299
4053
  }
4300
- return { dialCodes: t, dialCodeMaxLen: i, dialCodeToIso2Map: n };
4301
- }, Us = (e, t) => {
4054
+ return { dialCodes: t, dialCodeMaxLen: n, dialCodeToIso2Map: i };
4055
+ }, xs = (e, t) => {
4302
4056
  t.countryOrder && (t.countryOrder = t.countryOrder.map(
4303
- (i) => i.toLowerCase()
4304
- )), e.sort((i, n) => {
4057
+ (n) => n.toLowerCase()
4058
+ )), e.sort((n, i) => {
4305
4059
  const { countryOrder: s } = t;
4306
4060
  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;
4061
+ const r = s.indexOf(n.iso2), o = s.indexOf(i.iso2), l = r > -1, a = o > -1;
4062
+ if (l || a)
4063
+ return l && a ? r - o : l ? -1 : 1;
4310
4064
  }
4311
- return i.name.localeCompare(n.name);
4065
+ return n.name.localeCompare(i.name);
4312
4066
  });
4313
- }, xs = (e) => {
4067
+ }, Us = (e) => {
4314
4068
  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) => {
4069
+ t.normalisedName = Mn(t.name), t.initials = t.normalisedName.split(/[^a-z]/).map((n) => n[0]).join(""), t.dialCodePlus = `+${t.dialCode}`;
4070
+ }, ze = (e, t, n, i) => {
4317
4071
  let s = e;
4318
- if (i && t) {
4319
- t = `+${n.dialCode}`;
4320
- const r = s[t.length] === " " || s[t.length] === "-" ? t.length + 1 : t.length;
4321
- s = s.substring(r);
4072
+ if (n && t) {
4073
+ const r = `+${i.dialCode}`, o = s[r.length] === " " || s[r.length] === "-" ? r.length + 1 : r.length;
4074
+ s = s.substring(o);
4322
4075
  }
4323
4076
  return s;
4324
- }, Fs = (e, t, i, n, s) => {
4325
- const r = i ? i.formatNumberAsYouType(e, n.iso2) : e, { dialCode: o } = n;
4077
+ }, Hs = (e, t, n, i, s) => {
4078
+ const r = n ? n.formatNumberAsYouType(e, i.iso2) : e, { dialCode: o } = i;
4326
4079
  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)
4080
+ }, Fs = (e, t, n, i) => {
4081
+ if (n === 0 && !i)
4329
4082
  return 0;
4330
4083
  let s = 0;
4331
4084
  for (let r = 0; r < t.length; r++) {
4332
- if (/[+0-9]/.test(t[r]) && s++, s === e && !n)
4085
+ if (/[+0-9]/.test(t[r]) && s++, s === e && !i)
4333
4086
  return r + 1;
4334
- if (n && s === e + 1)
4087
+ if (i && s === e + 1)
4335
4088
  return r;
4336
4089
  }
4337
4090
  return t.length;
4338
- }, Vs = [
4091
+ }, Bs = [
4339
4092
  "800",
4340
4093
  "822",
4341
4094
  "833",
@@ -4353,25 +4106,23 @@ const Rs = (e) => {
4353
4106
  "887",
4354
4107
  "888",
4355
4108
  "889"
4356
- ], Ye = (e) => {
4109
+ ], qe = (e) => {
4357
4110
  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);
4111
+ if (t.startsWith(Rn.NANP) && t.length >= 4) {
4112
+ const n = t.substring(1, 4);
4113
+ return Bs.includes(n);
4361
4114
  }
4362
4115
  return !1;
4363
4116
  };
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);
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(
4117
+ let Vs = 0;
4118
+ const Ws = new Set(Et.map((e) => e.iso2)), ce = (e) => Ws.has(e);
4119
+ class Te {
4120
+ constructor(t, n = {}) {
4121
+ this.id = Vs++, this.options = { ...kn, ...n }, Ds(this.options), this.ui = new Os(t, this.options, this.id), this.isAndroid = Te._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = Rs(this.options);
4122
+ const { dialCodes: i, dialCodeMaxLen: s, dialCodeToIso2Map: r } = Ms(
4372
4123
  this.countries
4373
4124
  );
4374
- this.dialCodes = n, this.dialCodeMaxLen = s, this.dialCodeToIso2Map = r, this.countryByIso2 = new Map(this.countries.map((o) => [o.iso2, o])), this._init();
4125
+ this.dialCodes = i, this.dialCodeMaxLen = s, this.dialCodeToIso2Map = r, this.countryByIso2 = new Map(this.countries.map((o) => [o.iso2, o])), this._init();
4375
4126
  }
4376
4127
  static _getIsAndroid() {
4377
4128
  return typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1;
@@ -4382,8 +4133,8 @@ class Se {
4382
4133
  _mapAsciiToUserNumerals(t) {
4383
4134
  if (this.userNumeralSet || this._updateNumeralSet(this.ui.telInput.value), this.userNumeralSet === "ascii")
4384
4135
  return t;
4385
- const i = this.userNumeralSet === "arabic-indic" ? 1632 : 1776;
4386
- return t.replace(/[0-9]/g, (n) => String.fromCharCode(i + Number(n)));
4136
+ const n = this.userNumeralSet === "arabic-indic" ? 1632 : 1776;
4137
+ return t.replace(/[0-9]/g, (i) => String.fromCharCode(n + Number(i)));
4387
4138
  }
4388
4139
  // Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9
4389
4140
  _normaliseNumerals(t) {
@@ -4391,8 +4142,8 @@ class Se {
4391
4142
  return "";
4392
4143
  if (this._updateNumeralSet(t), this.userNumeralSet === "ascii")
4393
4144
  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)));
4145
+ const n = this.userNumeralSet === "arabic-indic" ? 1632 : 1776, i = this.userNumeralSet === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
4146
+ return t.replace(i, (s) => String.fromCharCode(48 + (s.charCodeAt(0) - n)));
4396
4147
  }
4397
4148
  _getTelInputValue() {
4398
4149
  const t = this.ui.telInput.value.trim();
@@ -4402,12 +4153,12 @@ class Se {
4402
4153
  this.ui.telInput.value = this._mapAsciiToUserNumerals(t);
4403
4154
  }
4404
4155
  _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;
4156
+ const t = new Promise((i, s) => {
4157
+ this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = s;
4158
+ }), n = new Promise((i, s) => {
4159
+ this.resolveUtilsScriptPromise = i, this.rejectUtilsScriptPromise = s;
4409
4160
  });
4410
- return Promise.all([t, i]);
4161
+ return Promise.all([t, n]);
4411
4162
  }
4412
4163
  //* Can't be private as it's called from intlTelInput convenience wrapper.
4413
4164
  _init() {
@@ -4418,18 +4169,18 @@ class Se {
4418
4169
  //********************
4419
4170
  //* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
4420
4171
  _processCountryData() {
4421
- ks(this.countries, this.options), Us(this.countries, this.options), xs(this.countries);
4172
+ ks(this.countries, this.options), xs(this.countries, this.options), Us(this.countries);
4422
4173
  }
4423
4174
  //* Set the initial state of the input value and the selected country by:
4424
4175
  //* 1. Extracting a dial code from the given number
4425
4176
  //* 2. Using explicit initialCountry
4426
4177
  _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)
4178
+ 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 = qe(o), { initialCountry: u, geoIpLookup: c } = this.options, d = u === le.AUTO && c;
4179
+ if (l && !a)
4429
4180
  this._updateCountryFromNumber(o);
4430
4181
  else if (!d || t) {
4431
- const f = a ? a.toLowerCase() : "";
4432
- ce(f) ? this._setCountry(f) : l && u ? this._setCountry(Ns.ISO2) : this._setCountry("");
4182
+ const f = u ? u.toLowerCase() : "";
4183
+ ce(f) ? this._setCountry(f) : l && a ? this._setCountry(Is.ISO2) : this._setCountry("");
4433
4184
  }
4434
4185
  o && this._updateValFromNumber(o);
4435
4186
  }
@@ -4439,20 +4190,20 @@ class Se {
4439
4190
  }
4440
4191
  //* Update hidden input on form submit.
4441
4192
  _initHiddenInputListener() {
4442
- var i;
4193
+ var n;
4443
4194
  const t = () => {
4444
4195
  this.ui.hiddenInput && (this.ui.hiddenInput.value = this.getNumber()), this.ui.hiddenInputCountry && (this.ui.hiddenInputCountry.value = this.selectedCountryData.iso2 || "");
4445
4196
  };
4446
- (i = this.ui.telInput.form) == null || i.addEventListener("submit", t, {
4197
+ (n = this.ui.telInput.form) == null || n.addEventListener("submit", t, {
4447
4198
  signal: this.abortController.signal
4448
4199
  });
4449
4200
  }
4450
4201
  //* initialise the dropdown listeners.
4451
4202
  _initDropdownListeners() {
4452
- const t = this.abortController.signal, i = (o) => {
4203
+ const t = this.abortController.signal, n = (o) => {
4453
4204
  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 });
4205
+ }, i = this.ui.telInput.closest("label");
4206
+ i && i.addEventListener("click", n, { signal: t });
4456
4207
  const s = () => {
4457
4208
  this.ui.dropdownContent.classList.contains(
4458
4209
  E.HIDE
@@ -4468,7 +4219,7 @@ class Se {
4468
4219
  const r = (o) => {
4469
4220
  this.ui.dropdownContent.classList.contains(
4470
4221
  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();
4222
+ ) && [x.ARROW_UP, x.ARROW_DOWN, x.SPACE, x.ENTER].includes(o.key) && (o.preventDefault(), o.stopPropagation(), this._openDropdown()), o.key === x.TAB && this._closeDropdown();
4472
4223
  };
4473
4224
  this.ui.countryContainer.addEventListener(
4474
4225
  "keydown",
@@ -4478,7 +4229,7 @@ class Se {
4478
4229
  }
4479
4230
  //* Init many requests: utils script / geo ip lookup.
4480
4231
  _initRequests() {
4481
- const { loadUtils: t, initialCountry: i, geoIpLookup: n } = this.options;
4232
+ const { loadUtils: t, initialCountry: n, geoIpLookup: i } = this.options;
4482
4233
  if (t && !_.utils) {
4483
4234
  const r = () => {
4484
4235
  var o;
@@ -4497,14 +4248,14 @@ class Se {
4497
4248
  }
4498
4249
  } else
4499
4250
  this.resolveUtilsScriptPromise();
4500
- i === le.AUTO && n && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
4251
+ n === le.AUTO && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
4501
4252
  }
4502
4253
  //* Perform the geo ip lookup.
4503
4254
  _loadAutoCountry() {
4504
4255
  _.autoCountry ? this.handleAutoCountry() : _.startedLoadingAutoCountry || (_.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
4505
4256
  (t = "") => {
4506
- const i = t.toLowerCase();
4507
- ce(i) ? (_.autoCountry = i, setTimeout(() => kt("handleAutoCountry"))) : (this._setInitialState(!0), kt("rejectAutoCountryPromise"));
4257
+ const n = t.toLowerCase();
4258
+ ce(n) ? (_.autoCountry = n, setTimeout(() => kt("handleAutoCountry"))) : (this._setInitialState(!0), kt("rejectAutoCountryPromise"));
4508
4259
  },
4509
4260
  () => {
4510
4261
  this._setInitialState(!0), kt("rejectAutoCountryPromise");
@@ -4521,44 +4272,48 @@ class Se {
4521
4272
  _bindInputListener() {
4522
4273
  const {
4523
4274
  strictMode: t,
4524
- formatAsYouType: i,
4525
- separateDialCode: n,
4275
+ formatAsYouType: n,
4276
+ separateDialCode: i,
4526
4277
  allowDropdown: s,
4527
4278
  countrySearch: r
4528
4279
  } = this.options;
4529
4280
  let o = !1;
4530
4281
  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();
4282
+ const l = (a) => {
4283
+ const u = this._getTelInputValue();
4284
+ if (this.isAndroid && (a == null ? void 0 : a.data) === "+" && i && s && r) {
4285
+ const C = this.ui.telInput.selectionStart || 0, b = u.substring(0, C - 1), g = u.substring(C);
4286
+ this._setTelInputValue(b + g), this._openDropdownWithPlus();
4536
4287
  return;
4537
4288
  }
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(
4289
+ this._updateCountryFromNumber(u) && this._triggerCountryChange();
4290
+ const c = (a == null ? void 0 : a.data) && lt.NON_PLUS_NUMERIC.test(a.data), d = (a == null ? void 0 : a.inputType) === Ge.PASTE && u;
4291
+ c || d && !t ? o = !0 : lt.NON_PLUS_NUMERIC.test(u) || (o = !1);
4292
+ const f = (a == null ? void 0 : a.detail) && a.detail.isSetNumber, h = this.userNumeralSet === "ascii";
4293
+ if (n && !o && !f && h) {
4294
+ const C = this.ui.telInput.selectionStart || 0, g = u.substring(
4544
4295
  0,
4545
4296
  C
4546
4297
  ).replace(
4547
4298
  lt.NON_PLUS_NUMERIC_GLOBAL,
4548
4299
  ""
4549
- ).length, g = (u == null ? void 0 : u.inputType) === Ge.DELETE_FWD, m = this._getFullNumber(), p = Fs(
4550
- m,
4551
- a,
4300
+ ).length, y = (a == null ? void 0 : a.inputType) === Ge.DELETE_FWD, v = this._getFullNumber(), p = Hs(
4301
+ v,
4302
+ u,
4552
4303
  _.utils,
4553
4304
  this.selectedCountryData,
4554
- this.options.separateDialCode
4555
- ), y = Hs(
4556
- v,
4305
+ i
4306
+ ), m = Fs(
4307
+ g,
4557
4308
  p,
4558
4309
  C,
4559
- g
4310
+ y
4560
4311
  );
4561
- this._setTelInputValue(p), this.ui.telInput.setSelectionRange(y, y);
4312
+ this._setTelInputValue(p), this.ui.telInput.setSelectionRange(m, m);
4313
+ }
4314
+ if (i && u.startsWith("+") && this.selectedCountryData.dialCode) {
4315
+ const C = ze(u, !0, i, this.selectedCountryData);
4316
+ this._setTelInputValue(C);
4562
4317
  }
4563
4318
  };
4564
4319
  this.ui.telInput.addEventListener(
@@ -4570,20 +4325,20 @@ class Se {
4570
4325
  );
4571
4326
  }
4572
4327
  _maybeBindKeydownListener() {
4573
- const { strictMode: t, separateDialCode: i, allowDropdown: n, countrySearch: s } = this.options;
4574
- if (t || i) {
4328
+ const { strictMode: t, separateDialCode: n, allowDropdown: i, countrySearch: s } = this.options;
4329
+ if (t || n) {
4575
4330
  const r = (o) => {
4576
4331
  if (o.key && o.key.length === 1 && !o.altKey && !o.ctrlKey && !o.metaKey) {
4577
- if (i && n && s && o.key === "+") {
4332
+ if (n && i && s && o.key === "+") {
4578
4333
  o.preventDefault(), this._openDropdownWithPlus();
4579
4334
  return;
4580
4335
  }
4581
4336
  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(
4337
+ 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, h = this.ui.telInput, C = h.selectionStart, b = h.selectionEnd, g = l.slice(0, C), y = l.slice(b), v = g + o.key + y, p = this._getFullNumber(v), m = _.utils.getCoreNumber(
4583
4338
  p,
4584
4339
  this.selectedCountryData.iso2
4585
- ), T = this.maxCoreNumberLength && y.length > this.maxCoreNumberLength, O = this._getNewCountryFromNumber(p) !== null;
4586
- (!f || T && !O && !a) && o.preventDefault();
4340
+ ), S = this.maxCoreNumberLength && m.length > this.maxCoreNumberLength, O = this._getNewCountryFromNumber(p) !== null;
4341
+ (!f || S && !O && !u) && o.preventDefault();
4587
4342
  }
4588
4343
  }
4589
4344
  };
@@ -4594,26 +4349,26 @@ class Se {
4594
4349
  }
4595
4350
  _maybeBindPasteListener() {
4596
4351
  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;
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)
4352
+ const t = (n) => {
4353
+ n.preventDefault();
4354
+ 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, h = !o.startsWith("+") || f, C = d.replace(lt.NON_PLUS_NUMERIC_GLOBAL, ""), b = C.startsWith("+"), g = C.replace(/\+/g, ""), y = b && h ? `+${g}` : g;
4355
+ let v = l + y + a;
4356
+ if (v.length > 5) {
4357
+ let m = _.utils.getCoreNumber(v, u);
4358
+ for (; m.length === 0 && v.length > 0; )
4359
+ v = v.slice(0, -1), m = _.utils.getCoreNumber(v, u);
4360
+ if (!m)
4606
4361
  return;
4607
- if (this.maxCoreNumberLength && y.length > this.maxCoreNumberLength)
4608
- if (n.selectionEnd === o.length) {
4609
- const T = y.length - this.maxCoreNumberLength;
4610
- m = m.slice(0, m.length - T);
4362
+ if (this.maxCoreNumberLength && m.length > this.maxCoreNumberLength)
4363
+ if (i.selectionEnd === o.length) {
4364
+ const S = m.length - this.maxCoreNumberLength;
4365
+ v = v.slice(0, v.length - S);
4611
4366
  } else
4612
4367
  return;
4613
4368
  }
4614
- this._setTelInputValue(m);
4615
- const p = s + g.length;
4616
- n.setSelectionRange(p, p), n.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
4369
+ this._setTelInputValue(v);
4370
+ const p = s + y.length;
4371
+ i.setSelectionRange(p, p), i.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
4617
4372
  };
4618
4373
  this.ui.telInput.addEventListener("paste", t, {
4619
4374
  signal: this.abortController.signal
@@ -4622,35 +4377,35 @@ class Se {
4622
4377
  }
4623
4378
  //* Adhere to the input's maxlength attr.
4624
4379
  _cap(t) {
4625
- const i = Number(this.ui.telInput.getAttribute("maxlength"));
4626
- return i && t.length > i ? t.substring(0, i) : t;
4380
+ const n = Number(this.ui.telInput.getAttribute("maxlength"));
4381
+ return n && t.length > n ? t.substring(0, n) : t;
4627
4382
  }
4628
4383
  //* Trigger a custom event on the input (typed via ItiEventMap).
4629
- _trigger(t, i = {}) {
4630
- const n = new CustomEvent(t, {
4384
+ _trigger(t, n = {}) {
4385
+ const i = new CustomEvent(t, {
4631
4386
  bubbles: !0,
4632
4387
  cancelable: !0,
4633
- detail: i
4388
+ detail: n
4634
4389
  });
4635
- this.ui.telInput.dispatchEvent(n);
4390
+ this.ui.telInput.dispatchEvent(i);
4636
4391
  }
4637
4392
  //* Open the dropdown.
4638
4393
  _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();
4394
+ const { fixDropdownWidth: t, countrySearch: n } = this.options;
4395
+ 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(L.EXPANDED, "true"), this._setDropdownPosition(), n) {
4396
+ const i = this.ui.countryList.firstElementChild;
4397
+ i && (this.ui.highlightListItem(i, !1), this.ui.countryList.scrollTop = 0), this.ui.searchInput.focus();
4643
4398
  }
4644
4399
  this._bindDropdownListeners(), this.ui.dropdownArrow.classList.add(E.ARROW_UP), this._trigger(Wt.OPEN_COUNTRY_DROPDOWN);
4645
4400
  }
4646
4401
  //* Set the dropdown position
4647
4402
  _setDropdownPosition() {
4648
4403
  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;
4404
+ const t = this.ui.telInput.getBoundingClientRect(), n = this.ui.telInput.offsetHeight;
4650
4405
  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, {
4406
+ this.ui.dropdown.style.top = `${t.top + n}px`, this.ui.dropdown.style.left = `${t.left}px`;
4407
+ const i = () => this._closeDropdown();
4408
+ window.addEventListener("scroll", i, {
4654
4409
  signal: this.dropdownAbortController.signal
4655
4410
  });
4656
4411
  }
@@ -4664,16 +4419,16 @@ class Se {
4664
4419
  //* When mouse over a list item, just highlight that one
4665
4420
  //* we add the class "highlight", so if they hit "enter" we know which one to select.
4666
4421
  _bindDropdownMouseoverListener(t) {
4667
- const i = (n) => {
4422
+ const n = (i) => {
4668
4423
  var r;
4669
- const s = (r = n.target) == null ? void 0 : r.closest(
4424
+ const s = (r = i.target) == null ? void 0 : r.closest(
4670
4425
  `.${E.COUNTRY_ITEM}`
4671
4426
  );
4672
4427
  s && this.ui.highlightListItem(s, !1);
4673
4428
  };
4674
4429
  this.ui.countryList.addEventListener(
4675
4430
  "mouseover",
4676
- i,
4431
+ n,
4677
4432
  {
4678
4433
  signal: t
4679
4434
  }
@@ -4681,29 +4436,29 @@ class Se {
4681
4436
  }
4682
4437
  //* Listen for country selection.
4683
4438
  _bindDropdownCountryClickListener(t) {
4684
- const i = (n) => {
4439
+ const n = (i) => {
4685
4440
  var r;
4686
- const s = (r = n.target) == null ? void 0 : r.closest(
4441
+ const s = (r = i.target) == null ? void 0 : r.closest(
4687
4442
  `.${E.COUNTRY_ITEM}`
4688
4443
  );
4689
4444
  s && this._selectListItem(s);
4690
4445
  };
4691
- this.ui.countryList.addEventListener("click", i, {
4446
+ this.ui.countryList.addEventListener("click", n, {
4692
4447
  signal: t
4693
4448
  });
4694
4449
  }
4695
4450
  //* Click off to close (except when this initial opening click is bubbling up).
4696
4451
  //* We cannot just stopPropagation as it may be needed to close another instance.
4697
4452
  _bindDropdownClickOffListener(t) {
4698
- const i = (n) => {
4699
- !!n.target.closest(
4453
+ const n = (i) => {
4454
+ !!i.target.closest(
4700
4455
  `#iti-${this.id}__dropdown-content`
4701
4456
  ) || this._closeDropdown();
4702
4457
  };
4703
4458
  setTimeout(() => {
4704
4459
  document.documentElement.addEventListener(
4705
4460
  "click",
4706
- i,
4461
+ n,
4707
4462
  { signal: t }
4708
4463
  );
4709
4464
  }, 0);
@@ -4713,36 +4468,36 @@ class Se {
4713
4468
  //* just hit down and hold it to scroll down (no keyup event).
4714
4469
  //* Listen on the document because that's where key events are triggered if no input has focus.
4715
4470
  _bindDropdownKeydownListener(t) {
4716
- let i = "", n = null;
4471
+ let n = "", i = null;
4717
4472
  const s = (r) => {
4718
4473
  [
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));
4474
+ x.ARROW_UP,
4475
+ x.ARROW_DOWN,
4476
+ x.ENTER,
4477
+ x.ESC
4478
+ ].includes(r.key) && (r.preventDefault(), r.stopPropagation(), r.key === x.ARROW_UP || r.key === x.ARROW_DOWN ? this._handleUpDownKey(r.key) : r.key === x.ENTER ? this._handleEnterKey() : r.key === x.ESC && (this._closeDropdown(), this.ui.selectedCountry.focus())), !this.options.countrySearch && lt.HIDDEN_SEARCH_CHAR.test(r.key) && (r.stopPropagation(), i && clearTimeout(i), n += r.key.toLowerCase(), this._searchForCountry(n), i = setTimeout(() => {
4479
+ n = "";
4480
+ }, ws.HIDDEN_SEARCH_RESET_MS));
4726
4481
  };
4727
4482
  document.addEventListener("keydown", s, { signal: t });
4728
4483
  }
4729
4484
  //* Search input listeners when countrySearch enabled.
4730
4485
  _bindDropdownSearchListeners(t) {
4731
- const i = () => {
4486
+ const n = () => {
4732
4487
  const o = this.ui.searchInput.value.trim();
4733
4488
  this._filterCountriesByQuery(o), this.ui.searchInput.value ? this.ui.searchClearButton.classList.remove(E.HIDE) : this.ui.searchClearButton.classList.add(E.HIDE);
4734
4489
  };
4735
- let n = null;
4490
+ let i = null;
4736
4491
  const s = () => {
4737
- n && clearTimeout(n), n = setTimeout(() => {
4738
- i(), n = null;
4492
+ i && clearTimeout(i), i = setTimeout(() => {
4493
+ n(), i = null;
4739
4494
  }, 100);
4740
4495
  };
4741
4496
  this.ui.searchInput.addEventListener("input", s, {
4742
4497
  signal: t
4743
4498
  });
4744
4499
  const r = () => {
4745
- this.ui.searchInput.value = "", this.ui.searchInput.focus(), i();
4500
+ this.ui.searchInput.value = "", this.ui.searchInput.focus(), n();
4746
4501
  };
4747
4502
  this.ui.searchClearButton.addEventListener("click", r, {
4748
4503
  signal: t
@@ -4750,22 +4505,22 @@ class Se {
4750
4505
  }
4751
4506
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
4752
4507
  _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);
4508
+ const n = As(this.countries, t);
4509
+ if (n) {
4510
+ const i = n.nodeById[this.id];
4511
+ this.ui.highlightListItem(i, !1), this.ui.scrollTo(i);
4757
4512
  }
4758
4513
  }
4759
4514
  //* Country search: Filter the countries according to the search query.
4760
4515
  _filterCountriesByQuery(t) {
4761
- let i;
4762
- t === "" ? i = this.countries : i = Ls(this.countries, t), this.ui.filterCountries(i);
4516
+ let n;
4517
+ t === "" ? n = this.countries : n = Ls(this.countries, t), this.ui.filterCountries(n);
4763
4518
  }
4764
4519
  //* Highlight the next/prev item in the list (and ensure it is visible).
4765
4520
  _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));
4521
+ var i, s;
4522
+ let n = t === x.ARROW_UP ? (i = this.ui.highlightedItem) == null ? void 0 : i.previousElementSibling : (s = this.ui.highlightedItem) == null ? void 0 : s.nextElementSibling;
4523
+ !n && this.ui.countryList.childElementCount > 1 && (n = t === x.ARROW_UP ? this.ui.countryList.lastElementChild : this.ui.countryList.firstElementChild), n && (this.ui.scrollTo(n), this.ui.highlightListItem(n, !1));
4769
4524
  }
4770
4525
  //* Select the currently highlighted item.
4771
4526
  _handleEnterKey() {
@@ -4774,82 +4529,82 @@ class Se {
4774
4529
  //* Update the input's value to the given val (format first if possible)
4775
4530
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
4776
4531
  _updateValFromNumber(t) {
4777
- let i = t;
4532
+ let n = t;
4778
4533
  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,
4534
+ const i = this.options.nationalMode || !n.startsWith("+") && !this.options.separateDialCode, { NATIONAL: s, INTERNATIONAL: r } = _.utils.numberFormat, o = i ? s : r;
4535
+ n = _.utils.formatNumber(
4536
+ n,
4782
4537
  this.selectedCountryData.iso2,
4783
4538
  o
4784
4539
  );
4785
4540
  }
4786
- i = this._beforeSetNumber(i), this._setTelInputValue(i);
4541
+ n = this._beforeSetNumber(n), this._setTelInputValue(n);
4787
4542
  }
4788
4543
  //* Check if need to select a new country based on the given number
4789
4544
  //* Note: called from _setInitialState, keyup handler, setNumber.
4790
4545
  _updateCountryFromNumber(t) {
4791
- const i = this._getNewCountryFromNumber(t);
4792
- return i !== null ? this._setCountry(i) : !1;
4546
+ const n = this._getNewCountryFromNumber(t);
4547
+ return n !== null ? this._setCountry(n) : !1;
4793
4548
  }
4794
4549
  // if there is a selected country, and the number doesn't start with a dial code, then add it
4795
4550
  _ensureHasDialCode(t) {
4796
- const { dialCode: i, nationalPrefix: n } = this.selectedCountryData;
4797
- if (t.startsWith("+") || !i)
4551
+ const { dialCode: n, nationalPrefix: i } = this.selectedCountryData;
4552
+ if (t.startsWith("+") || !n)
4798
4553
  return t;
4799
- const o = n && t.startsWith(n) && !this.options.separateDialCode ? t.substring(1) : t;
4800
- return `+${i}${o}`;
4554
+ const o = i && t.startsWith(i) && !this.options.separateDialCode ? t.substring(1) : t;
4555
+ return `+${n}${o}`;
4801
4556
  }
4802
4557
  // Get the country ISO2 code from the given number
4803
4558
  // BUT ONLY IF ITS CHANGED FROM THE CURRENTLY SELECTED COUNTRY
4804
4559
  // NOTE: consider refactoring this to be more clear
4805
4560
  _getNewCountryFromNumber(t) {
4806
- const i = t.indexOf("+");
4807
- let n = i ? t.substring(i) : t;
4561
+ const n = t.indexOf("+");
4562
+ let i = n ? t.substring(n) : t;
4808
4563
  const s = this.selectedCountryData.iso2, r = this.selectedCountryData.dialCode;
4809
- n = this._ensureHasDialCode(n);
4810
- const o = this._getDialCode(n, !0), l = Gt(n);
4564
+ i = this._ensureHasDialCode(i);
4565
+ const o = this._getDialCode(i, !0), l = Gt(i);
4811
4566
  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))
4567
+ const a = Gt(o), u = this.dialCodeToIso2Map[a];
4568
+ if (u.length === 1)
4569
+ return u[0] === s ? null : u[0];
4570
+ if (!s && this.defaultCountry && u.includes(this.defaultCountry))
4816
4571
  return this.defaultCountry;
4817
- if (r === Oi.NANP && Ye(l))
4572
+ if (r === Rn.NANP && qe(l))
4818
4573
  return null;
4819
4574
  const { areaCodes: d, priority: f } = this.selectedCountryData;
4820
4575
  if (d) {
4821
- const g = d.map(
4822
- (m) => `${r}${m}`
4576
+ const y = d.map(
4577
+ (v) => `${r}${v}`
4823
4578
  );
4824
- for (const m of g)
4825
- if (l.startsWith(m))
4579
+ for (const v of y)
4580
+ if (l.startsWith(v))
4826
4581
  return null;
4827
4582
  }
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)
4583
+ const C = d && !(f === 0) && l.length > a.length, b = s && u.includes(s) && !C, g = s === u[0];
4584
+ if (!b && !g)
4585
+ return u[0];
4586
+ } else if (i.startsWith("+") && l.length) {
4587
+ const a = this.selectedCountryData.dialCode || "";
4588
+ return a && a.startsWith(l) ? null : "";
4589
+ } else if ((!i || i === "+") && !s)
4835
4590
  return this.defaultCountry;
4836
4591
  return null;
4837
4592
  }
4838
4593
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and selected list item.
4839
4594
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
4840
4595
  _setCountry(t) {
4841
- const { separateDialCode: i, showFlags: n, i18n: s, allowDropdown: r } = this.options, o = this.selectedCountryData.iso2 || "";
4596
+ const { separateDialCode: n, showFlags: i, i18n: s, allowDropdown: r } = this.options, o = this.selectedCountryData.iso2 || "";
4842
4597
  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;
4598
+ const l = t && i ? `${E.FLAG} iti__${t}` : `${E.FLAG} ${E.GLOBE}`;
4599
+ let a, u, c;
4845
4600
  if (t) {
4846
- const { name: c, dialCode: d } = this.selectedCountryData;
4847
- a = c, u = s.selectedCountryAriaLabel.replace("${countryName}", c).replace("${dialCode}", `+${d}`);
4601
+ const { name: d, dialCode: f } = this.selectedCountryData;
4602
+ u = d, a = s.selectedCountryAriaLabel.replace("${countryName}", d).replace("${dialCode}", `+${f}`), c = "";
4848
4603
  } 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);
4604
+ u = s.noCountrySelected, a = s.noCountrySelected, c = Ps();
4605
+ this.ui.selectedCountryInner.className = l, this.ui.selectedCountry.setAttribute("title", u), this.ui.selectedCountry.setAttribute(L.LABEL, a), this.ui.selectedCountryInner.innerHTML = c;
4851
4606
  }
4852
- if (i) {
4607
+ if (n) {
4853
4608
  const l = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
4854
4609
  this.ui.selectedDialCode.textContent = l, this.ui.updateInputPadding();
4855
4610
  }
@@ -4857,10 +4612,10 @@ class Se {
4857
4612
  }
4858
4613
  //* Update the maximum valid number length for the currently selected country.
4859
4614
  _updateMaxLength() {
4860
- const { strictMode: t, placeholderNumberType: i, validationNumberTypes: n } = this.options, { iso2: s } = this.selectedCountryData;
4615
+ const { strictMode: t, placeholderNumberType: n, allowedNumberTypes: i } = this.options, { iso2: s } = this.selectedCountryData;
4861
4616
  if (t && _.utils)
4862
4617
  if (s) {
4863
- const r = _.utils.numberType[i];
4618
+ const r = _.utils.numberType[n];
4864
4619
  let o = _.utils.getExampleNumber(
4865
4620
  s,
4866
4621
  !1,
@@ -4870,11 +4625,11 @@ class Se {
4870
4625
  for (; _.utils.isPossibleNumber(
4871
4626
  o,
4872
4627
  s,
4873
- n
4628
+ i
4874
4629
  ); )
4875
4630
  l = o, o += "0";
4876
- const u = _.utils.getCoreNumber(l, s);
4877
- this.maxCoreNumberLength = u.length, s === "by" && (this.maxCoreNumberLength = u.length + 1);
4631
+ const a = _.utils.getCoreNumber(l, s);
4632
+ this.maxCoreNumberLength = a.length, s === "by" && (this.maxCoreNumberLength = a.length + 1);
4878
4633
  } else
4879
4634
  this.maxCoreNumberLength = null;
4880
4635
  }
@@ -4882,15 +4637,15 @@ class Se {
4882
4637
  _updatePlaceholder() {
4883
4638
  const {
4884
4639
  autoPlaceholder: t,
4885
- placeholderNumberType: i,
4886
- nationalMode: n,
4640
+ placeholderNumberType: n,
4641
+ nationalMode: i,
4887
4642
  customPlaceholder: s
4888
- } = this.options, r = t === ye.AGGRESSIVE || !this.ui.hadInitialPlaceholder && t === ye.POLITE;
4643
+ } = this.options, r = t === me.AGGRESSIVE || !this.ui.hadInitialPlaceholder && t === me.POLITE;
4889
4644
  if (_.utils && r) {
4890
- const o = _.utils.numberType[i];
4645
+ const o = _.utils.numberType[n];
4891
4646
  let l = this.selectedCountryData.iso2 ? _.utils.getExampleNumber(
4892
4647
  this.selectedCountryData.iso2,
4893
- n,
4648
+ i,
4894
4649
  o
4895
4650
  ) : "";
4896
4651
  l = this._beforeSetNumber(l), typeof s == "function" && (l = s(l, this.selectedCountryData)), this.ui.telInput.setAttribute("placeholder", l);
@@ -4898,33 +4653,33 @@ class Se {
4898
4653
  }
4899
4654
  //* Called when the user selects a list item from the dropdown.
4900
4655
  _selectListItem(t) {
4901
- const i = t.dataset[Ke.COUNTRY_CODE], n = this._setCountry(i);
4656
+ const n = t.dataset[Ke.COUNTRY_CODE], i = this._setCountry(n);
4902
4657
  this._closeDropdown();
4903
4658
  const s = t.dataset[Ke.DIAL_CODE];
4904
4659
  if (this._updateDialCode(s), this.options.formatOnDisplay) {
4905
4660
  const r = this._getTelInputValue();
4906
4661
  this._updateValFromNumber(r);
4907
4662
  }
4908
- this.ui.telInput.focus(), n && this._triggerCountryChange();
4663
+ this.ui.telInput.focus(), i && this._triggerCountryChange();
4909
4664
  }
4910
4665
  //* Close the dropdown and unbind any listeners.
4911
4666
  _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));
4667
+ this.ui.dropdownContent.classList.contains(E.HIDE) || (this.ui.dropdownContent.classList.add(E.HIDE), this.ui.selectedCountry.setAttribute(L.EXPANDED, "false"), this.options.countrySearch && (this.ui.searchInput.removeAttribute(L.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));
4913
4668
  }
4914
4669
  //* Replace any existing dial code with the new one
4915
4670
  //* Note: called from _selectListItem and setCountry
4916
4671
  _updateDialCode(t) {
4917
- const i = this._getTelInputValue(), n = `+${t}`;
4672
+ const n = this._getTelInputValue(), i = `+${t}`;
4918
4673
  let s;
4919
- if (i.startsWith("+")) {
4920
- const r = this._getDialCode(i);
4921
- r ? s = i.replace(r, n) : s = n, this._setTelInputValue(s);
4674
+ if (n.startsWith("+")) {
4675
+ const r = this._getDialCode(n);
4676
+ r ? s = n.replace(r, i) : s = i, this._setTelInputValue(s);
4922
4677
  }
4923
4678
  }
4924
4679
  //* Try and extract a valid international dial code from a full telephone number.
4925
4680
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
4926
- _getDialCode(t, i) {
4927
- let n = "";
4681
+ _getDialCode(t, n) {
4682
+ let i = "";
4928
4683
  if (t.startsWith("+")) {
4929
4684
  let s = "", r = !1;
4930
4685
  for (let o = 0; o < t.length; o++) {
@@ -4933,32 +4688,32 @@ class Se {
4933
4688
  if (s += l, !!!this.dialCodeToIso2Map[s])
4934
4689
  break;
4935
4690
  if (this.dialCodes.has(s)) {
4936
- if (n = t.substring(0, o + 1), r = !0, !i)
4691
+ if (i = t.substring(0, o + 1), r = !0, !n)
4937
4692
  break;
4938
- } else i && r && (n = t.substring(0, o + 1));
4693
+ } else n && r && (i = t.substring(0, o + 1));
4939
4694
  if (s.length === this.dialCodeMaxLen)
4940
4695
  break;
4941
4696
  }
4942
4697
  }
4943
4698
  }
4944
- return n;
4699
+ return i;
4945
4700
  }
4946
4701
  //* Get the input val, adding the dial code if separateDialCode is enabled.
4947
4702
  _getFullNumber(t) {
4948
- const i = t ? this._normaliseNumerals(t) : this._getTelInputValue(), { dialCode: n } = this.selectedCountryData;
4703
+ const n = t ? this._normaliseNumerals(t) : this._getTelInputValue(), { dialCode: i } = this.selectedCountryData;
4949
4704
  let s;
4950
- const r = Gt(i);
4951
- return this.options.separateDialCode && !i.startsWith("+") && n && r ? s = `+${n}` : s = "", s + i;
4705
+ const r = Gt(n);
4706
+ return this.options.separateDialCode && !n.startsWith("+") && i && r ? s = `+${i}` : s = "", s + n;
4952
4707
  }
4953
4708
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
4954
4709
  _beforeSetNumber(t) {
4955
- const i = this._getDialCode(t), n = Bs(
4710
+ const n = !!this._getDialCode(t), i = ze(
4956
4711
  t,
4957
- i,
4712
+ n,
4958
4713
  this.options.separateDialCode,
4959
4714
  this.selectedCountryData
4960
4715
  );
4961
- return this._cap(n);
4716
+ return this._cap(i);
4962
4717
  }
4963
4718
  //* Trigger the 'countrychange' event.
4964
4719
  _triggerCountryChange() {
@@ -4996,9 +4751,9 @@ class Se {
4996
4751
  //* Format the number to the given format.
4997
4752
  getNumber(t) {
4998
4753
  if (_.utils) {
4999
- const { iso2: i } = this.selectedCountryData, n = this._getFullNumber(), s = _.utils.formatNumber(
5000
- n,
4754
+ const { iso2: n } = this.selectedCountryData, i = this._getFullNumber(), s = _.utils.formatNumber(
5001
4755
  i,
4756
+ n,
5002
4757
  t
5003
4758
  );
5004
4759
  return this._mapAsciiToUserNumerals(s);
@@ -5010,7 +4765,7 @@ class Se {
5010
4765
  return _.utils ? _.utils.getNumberType(
5011
4766
  this._getFullNumber(),
5012
4767
  this.selectedCountryData.iso2
5013
- ) : ze.UNKNOWN_NUMBER_TYPE;
4768
+ ) : Ye.UNKNOWN_NUMBER_TYPE;
5014
4769
  }
5015
4770
  //* Get the country data for the currently selected country.
5016
4771
  getSelectedCountryData() {
@@ -5022,13 +4777,13 @@ class Se {
5022
4777
  const { iso2: t } = this.selectedCountryData;
5023
4778
  return _.utils.getValidationError(this._getFullNumber(), t);
5024
4779
  }
5025
- return ze.UNKNOWN_VALIDATION_ERROR;
4780
+ return Ye.UNKNOWN_VALIDATION_ERROR;
5026
4781
  }
5027
4782
  //* Validate the input val using number length only
5028
4783
  isValidNumber() {
5029
- const { dialCode: t, iso2: i } = this.selectedCountryData;
4784
+ const { dialCode: t, iso2: n } = this.selectedCountryData;
5030
4785
  if (t === oe.DIAL_CODE && _.utils) {
5031
- const n = this._getFullNumber(), s = _.utils.getCoreNumber(n, i);
4786
+ const i = this._getFullNumber(), s = _.utils.getCoreNumber(i, n);
5032
4787
  if (s[0] === oe.MOBILE_PREFIX && s.length !== oe.MOBILE_CORE_LENGTH)
5033
4788
  return !1;
5034
4789
  }
@@ -5042,7 +4797,7 @@ class Se {
5042
4797
  return _.utils ? _.utils.isPossibleNumber(
5043
4798
  t,
5044
4799
  this.selectedCountryData.iso2,
5045
- this.options.validationNumberTypes
4800
+ this.options.allowedNumberTypes
5046
4801
  ) : null;
5047
4802
  }
5048
4803
  //* Shared internal validation logic to handle alpha character extension rules.
@@ -5051,28 +4806,30 @@ class Se {
5051
4806
  return null;
5052
4807
  if (!this.selectedCountryData.iso2)
5053
4808
  return !1;
5054
- const i = (o) => t ? this._utilsIsValidNumber(o) : this._utilsIsPossibleNumber(o), n = this._getFullNumber(), s = n.search(lt.ALPHA_UNICODE);
5055
- if (s > -1 && !this.options.allowPhonewords) {
5056
- const o = n.substring(0, s), l = i(o), u = i(n);
5057
- return l && u;
4809
+ const { allowNumberExtensions: n, allowPhonewords: i } = this.options, s = (a) => t ? this._utilsIsValidNumber(a) : this._utilsIsPossibleNumber(a), r = this._getFullNumber();
4810
+ if (!s(r))
4811
+ return !1;
4812
+ if (r.search(lt.ALPHA_UNICODE) > -1) {
4813
+ const a = this.selectedCountryData.iso2;
4814
+ return _.utils.getExtension(r, a) ? n : i;
5058
4815
  }
5059
- return i(n);
4816
+ return !0;
5060
4817
  }
5061
4818
  _utilsIsValidNumber(t) {
5062
4819
  return _.utils ? _.utils.isValidNumber(
5063
4820
  t,
5064
4821
  this.selectedCountryData.iso2,
5065
- this.options.validationNumberTypes
4822
+ this.options.allowedNumberTypes
5066
4823
  ) : null;
5067
4824
  }
5068
4825
  //* Update the selected country, and update the input val accordingly.
5069
4826
  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) {
4827
+ const n = t == null ? void 0 : t.toLowerCase();
4828
+ if (!ce(n))
4829
+ throw new Error(`Invalid country code: '${n}'`);
4830
+ const i = this.selectedCountryData.iso2;
4831
+ if (t && n !== i || !t && i) {
4832
+ if (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay) {
5076
4833
  const r = this._getTelInputValue();
5077
4834
  this._updateValFromNumber(r);
5078
4835
  }
@@ -5081,8 +4838,8 @@ class Se {
5081
4838
  }
5082
4839
  //* Set the input value and update the country.
5083
4840
  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 });
4841
+ const n = this._normaliseNumerals(t), i = this._updateCountryFromNumber(n);
4842
+ this._updateValFromNumber(n), i && this._triggerCountryChange(), this._trigger(Wt.INPUT, { isSetNumber: !0 });
5086
4843
  }
5087
4844
  //* Set the placeholder number typ
5088
4845
  setPlaceholderNumberType(t) {
@@ -5092,14 +4849,14 @@ class Se {
5092
4849
  this.ui.telInput.disabled = t, t ? this.ui.selectedCountry.setAttribute("disabled", "true") : this.ui.selectedCountry.removeAttribute("disabled");
5093
4850
  }
5094
4851
  }
5095
- const Gs = (e) => {
4852
+ const js = (e) => {
5096
4853
  if (!_.utils && !_.startedLoadingUtilsScript) {
5097
4854
  let t;
5098
4855
  if (typeof e == "function")
5099
4856
  try {
5100
4857
  t = Promise.resolve(e());
5101
- } catch (i) {
5102
- return Promise.reject(i);
4858
+ } catch (n) {
4859
+ return Promise.reject(n);
5103
4860
  }
5104
4861
  else
5105
4862
  return Promise.reject(
@@ -5107,34 +4864,34 @@ const Gs = (e) => {
5107
4864
  `The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof e}`
5108
4865
  )
5109
4866
  );
5110
- return _.startedLoadingUtilsScript = !0, t.then((i) => {
5111
- const n = i == null ? void 0 : i.default;
5112
- if (!n || typeof n != "object")
4867
+ return _.startedLoadingUtilsScript = !0, t.then((n) => {
4868
+ const i = n == null ? void 0 : n.default;
4869
+ if (!i || typeof i != "object")
5113
4870
  throw new TypeError(
5114
4871
  "The loader function passed to attachUtils did not resolve to a module object with utils as its default export."
5115
4872
  );
5116
- return _.utils = n, kt("handleUtils"), !0;
5117
- }).catch((i) => {
5118
- throw kt("rejectUtilsScriptPromise", i), i;
4873
+ return _.utils = i, kt("handleUtils"), !0;
4874
+ }).catch((n) => {
4875
+ throw kt("rejectUtilsScriptPromise", n), n;
5119
4876
  });
5120
4877
  }
5121
4878
  return null;
5122
4879
  }, kt = (e, ...t) => {
5123
- Object.values(_.instances).forEach((i) => {
5124
- const n = i[e];
5125
- typeof n == "function" && n.apply(i, t);
4880
+ Object.values(_.instances).forEach((n) => {
4881
+ const i = n[e];
4882
+ typeof i == "function" && i.apply(n, t);
5126
4883
  });
5127
4884
  }, _ = Object.assign(
5128
4885
  (e, t) => {
5129
- const i = new Se(e, t);
5130
- return _.instances[i.id] = i, e.iti = i, i;
4886
+ const n = new Te(e, t);
4887
+ return _.instances[n.id] = n, e.iti = n, n;
5131
4888
  },
5132
4889
  {
5133
- defaults: Ri,
4890
+ defaults: kn,
5134
4891
  //* Using a static var like this allows us to mock it in the tests.
5135
4892
  documentReady: () => document.readyState === "complete",
5136
4893
  //* Get the country data object.
5137
- getCountryData: () => ht,
4894
+ getCountryData: () => Et,
5138
4895
  //* A getter for the plugin instance.
5139
4896
  getInstance: (e) => {
5140
4897
  const t = e.dataset.intlTelInputId;
@@ -5142,34 +4899,34 @@ const Gs = (e) => {
5142
4899
  },
5143
4900
  //* A map from instance ID to instance object.
5144
4901
  instances: {},
5145
- attachUtils: Gs,
4902
+ attachUtils: js,
5146
4903
  startedLoadingUtilsScript: !1,
5147
4904
  startedLoadingAutoCountry: !1,
5148
- version: "25.15.0"
4905
+ version: "26.0.0-beta.0"
5149
4906
  }
5150
4907
  );
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);
4908
+ var Gs = /* @__PURE__ */ es("<input/>");
4909
+ function qs(e, t) {
4910
+ vi(t, !0);
4911
+ let n = Vt(t, "disabled", 3, !1), i = Vt(t, "inputProps", 19, () => ({})), s = Vt(t, "options", 19, () => ({})), r = Vt(t, "value", 3, ""), o = /* @__PURE__ */ Y(void 0), l = /* @__PURE__ */ Y(void 0), a = /* @__PURE__ */ Y(null), u = /* @__PURE__ */ Y(!1);
5155
4912
  const c = () => I(l) ? s().strictMode ? I(l).isValidNumberPrecise() : I(l).isValidNumber() : null, d = () => {
5156
- var p, y;
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()));
4913
+ var p, m;
4914
+ const v = c();
4915
+ I(a) !== v && (W(a, v, !0), (p = t.onChangeValidity) == null || p.call(t, !!v), (m = t.onChangeErrorCode) == null || m.call(t, v ? null : I(l).getValidationError()));
5159
4916
  }, f = () => {
5160
- var m, p;
5161
- (p = t.onChangeNumber) == null || p.call(t, ((m = I(l)) == null ? void 0 : m.getNumber()) ?? ""), d();
4917
+ var v, p;
4918
+ (p = t.onChangeNumber) == null || p.call(t, ((v = I(l)) == null ? void 0 : v.getNumber()) ?? ""), d();
5162
4919
  }, h = () => {
5163
- var m, p;
5164
- (p = t.onChangeCountry) == null || p.call(t, ((m = I(l)) == null ? void 0 : m.getSelectedCountryData().iso2) ?? ""), f();
4920
+ var v, p;
4921
+ (p = t.onChangeCountry) == null || p.call(t, ((v = I(l)) == null ? void 0 : v.getSelectedCountryData().iso2) ?? ""), f();
5165
4922
  };
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(() => {
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());
4923
+ Bn(() => {
4924
+ I(o) && (W(l, _(I(o), s()), !0), I(o).addEventListener("countrychange", h), r() && I(l).setNumber(r()), n() && I(l).setDisabled(n()), W(a, c(), !0), W(u, !0));
4925
+ }), Vn(() => {
4926
+ var v;
4927
+ I(o) && I(o).removeEventListener("countrychange", h), (v = I(l)) == null || v.destroy();
4928
+ }), Fi(() => {
4929
+ I(u) && I(l) && I(l).setDisabled(n());
5173
4930
  });
5174
4931
  function C() {
5175
4932
  return I(l);
@@ -5177,9 +4934,9 @@ function $s(e, t) {
5177
4934
  function b() {
5178
4935
  return I(o);
5179
4936
  }
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);
4937
+ var g = { getInstance: C, getInput: b }, y = Gs();
4938
+ return vs(y, () => ({ type: "tel", oninput: f, ...i() }), void 0, void 0, void 0, void 0, !0), ms(y, (v) => W(o, v), () => I(o)), ns(e, y), mi(g);
5182
4939
  }
5183
4940
  export {
5184
- $s as default
4941
+ qs as default
5185
4942
  };