@rpcbase/ui 0.166.0 → 0.167.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 (679) hide show
  1. package/dist/index100.js +318 -8
  2. package/dist/index100.js.map +1 -1
  3. package/dist/index101.js +126 -38
  4. package/dist/index101.js.map +1 -1
  5. package/dist/index102.js +20 -4
  6. package/dist/index102.js.map +1 -1
  7. package/dist/index103.js +76 -52
  8. package/dist/index103.js.map +1 -1
  9. package/dist/index104.js +18 -4
  10. package/dist/index104.js.map +1 -1
  11. package/dist/index105.js +101 -4
  12. package/dist/index105.js.map +1 -1
  13. package/dist/index106.js +5 -16
  14. package/dist/index106.js.map +1 -1
  15. package/dist/index107.js +14 -5
  16. package/dist/index107.js.map +1 -1
  17. package/dist/index108.js +2 -8
  18. package/dist/index108.js.map +1 -1
  19. package/dist/index109.js +7 -16
  20. package/dist/index109.js.map +1 -1
  21. package/dist/index11.js +13 -4
  22. package/dist/index11.js.map +1 -1
  23. package/dist/index110.js +326 -4
  24. package/dist/index110.js.map +1 -1
  25. package/dist/index111.js +49 -4
  26. package/dist/index111.js.map +1 -1
  27. package/dist/index112.js +52 -6
  28. package/dist/index112.js.map +1 -1
  29. package/dist/index113.js +4 -5
  30. package/dist/index113.js.map +1 -1
  31. package/dist/index114.js +4 -4
  32. package/dist/index114.js.map +1 -1
  33. package/dist/index115.js +14 -3
  34. package/dist/index115.js.map +1 -1
  35. package/dist/index116.js +5 -6
  36. package/dist/index116.js.map +1 -1
  37. package/dist/index117.js +7 -24
  38. package/dist/index117.js.map +1 -1
  39. package/dist/index118.js +16 -6
  40. package/dist/index118.js.map +1 -1
  41. package/dist/index119.js +4 -4
  42. package/dist/index119.js.map +1 -1
  43. package/dist/index120.js +4 -6
  44. package/dist/index120.js.map +1 -1
  45. package/dist/index121.js +5 -5
  46. package/dist/index121.js.map +1 -1
  47. package/dist/index122.js +5 -4
  48. package/dist/index122.js.map +1 -1
  49. package/dist/index123.js +4 -5
  50. package/dist/index123.js.map +1 -1
  51. package/dist/index124.js +4 -4
  52. package/dist/index124.js.map +1 -1
  53. package/dist/index125.js +5 -7
  54. package/dist/index125.js.map +1 -1
  55. package/dist/index126.js +24 -5
  56. package/dist/index126.js.map +1 -1
  57. package/dist/index127.js +6 -4
  58. package/dist/index127.js.map +1 -1
  59. package/dist/index128.js +4 -4
  60. package/dist/index128.js.map +1 -1
  61. package/dist/index129.js +6 -6
  62. package/dist/index129.js.map +1 -1
  63. package/dist/index13.js +1 -1
  64. package/dist/index130.js +5 -145
  65. package/dist/index130.js.map +1 -1
  66. package/dist/index131.js +4 -39
  67. package/dist/index131.js.map +1 -1
  68. package/dist/index132.js +5 -4
  69. package/dist/index132.js.map +1 -1
  70. package/dist/index133.js +4 -7
  71. package/dist/index133.js.map +1 -1
  72. package/dist/index134.js +8 -13
  73. package/dist/index134.js.map +1 -1
  74. package/dist/index135.js +5 -13
  75. package/dist/index135.js.map +1 -1
  76. package/dist/index136.js +4 -7
  77. package/dist/index136.js.map +1 -1
  78. package/dist/index137.js +4 -31
  79. package/dist/index137.js.map +1 -1
  80. package/dist/index138.js +6 -10
  81. package/dist/index138.js.map +1 -1
  82. package/dist/index139.js +145 -10
  83. package/dist/index139.js.map +1 -1
  84. package/dist/index14.js +3 -3
  85. package/dist/index140.js +38 -7
  86. package/dist/index140.js.map +1 -1
  87. package/dist/index141.js +4 -13
  88. package/dist/index141.js.map +1 -1
  89. package/dist/index142.js +5 -99
  90. package/dist/index142.js.map +1 -1
  91. package/dist/index143.js +14 -20
  92. package/dist/index143.js.map +1 -1
  93. package/dist/index144.js +13 -53
  94. package/dist/index144.js.map +1 -1
  95. package/dist/index145.js +6 -71
  96. package/dist/index145.js.map +1 -1
  97. package/dist/index146.js +31 -9
  98. package/dist/index146.js.map +1 -1
  99. package/dist/index147.js +10 -20
  100. package/dist/index147.js.map +1 -1
  101. package/dist/index148.js +10 -16
  102. package/dist/index148.js.map +1 -1
  103. package/dist/index149.js +8 -23
  104. package/dist/index149.js.map +1 -1
  105. package/dist/index150.js +13 -6
  106. package/dist/index150.js.map +1 -1
  107. package/dist/index151.js +101 -5
  108. package/dist/index151.js.map +1 -1
  109. package/dist/index152.js +20 -24
  110. package/dist/index152.js.map +1 -1
  111. package/dist/index153.js +53 -34
  112. package/dist/index153.js.map +1 -1
  113. package/dist/index154.js +73 -16
  114. package/dist/index154.js.map +1 -1
  115. package/dist/index155.js +9 -6
  116. package/dist/index155.js.map +1 -1
  117. package/dist/index156.js +20 -4
  118. package/dist/index156.js.map +1 -1
  119. package/dist/index157.js +16 -4
  120. package/dist/index157.js.map +1 -1
  121. package/dist/index158.js +23 -4
  122. package/dist/index158.js.map +1 -1
  123. package/dist/index159.js +6 -4
  124. package/dist/index159.js.map +1 -1
  125. package/dist/index160.js +5 -3
  126. package/dist/index160.js.map +1 -1
  127. package/dist/index161.js +23 -6
  128. package/dist/index161.js.map +1 -1
  129. package/dist/index162.js +35 -24
  130. package/dist/index162.js.map +1 -1
  131. package/dist/index163.js +16 -8
  132. package/dist/index163.js.map +1 -1
  133. package/dist/index164.js +5 -5
  134. package/dist/index164.js.map +1 -1
  135. package/dist/index165.js +4 -5
  136. package/dist/index165.js.map +1 -1
  137. package/dist/index166.js +4 -3
  138. package/dist/index166.js.map +1 -1
  139. package/dist/index167.js +4 -3
  140. package/dist/index167.js.map +1 -1
  141. package/dist/index168.js +4 -4
  142. package/dist/index168.js.map +1 -1
  143. package/dist/index169.js +3 -3
  144. package/dist/index169.js.map +1 -1
  145. package/dist/index170.js +6 -4
  146. package/dist/index170.js.map +1 -1
  147. package/dist/index171.js +24 -4
  148. package/dist/index171.js.map +1 -1
  149. package/dist/index172.js +7 -3
  150. package/dist/index172.js.map +1 -1
  151. package/dist/index173.js +6 -3
  152. package/dist/index173.js.map +1 -1
  153. package/dist/index174.js +5 -24
  154. package/dist/index174.js.map +1 -1
  155. package/dist/index175.js +4 -29
  156. package/dist/index175.js.map +1 -1
  157. package/dist/index176.js +4 -5
  158. package/dist/index176.js.map +1 -1
  159. package/dist/index177.js +4 -67
  160. package/dist/index177.js.map +1 -1
  161. package/dist/index178.js +3 -180
  162. package/dist/index178.js.map +1 -1
  163. package/dist/index179.js +4 -46
  164. package/dist/index179.js.map +1 -1
  165. package/dist/index18.js +10 -1
  166. package/dist/index18.js.map +1 -1
  167. package/dist/index180.js +3 -13
  168. package/dist/index180.js.map +1 -1
  169. package/dist/index181.js +3 -154
  170. package/dist/index181.js.map +1 -1
  171. package/dist/index182.js +3 -30
  172. package/dist/index182.js.map +1 -1
  173. package/dist/index183.js +3 -9
  174. package/dist/index183.js.map +1 -1
  175. package/dist/index184.js +2 -48
  176. package/dist/index184.js.map +1 -1
  177. package/dist/index185.js +67 -11
  178. package/dist/index185.js.map +1 -1
  179. package/dist/index186.js +83 -43
  180. package/dist/index186.js.map +1 -1
  181. package/dist/index187.js +41 -90
  182. package/dist/index187.js.map +1 -1
  183. package/dist/index188.js +7 -86
  184. package/dist/index188.js.map +1 -1
  185. package/dist/index189.js +4 -105
  186. package/dist/index189.js.map +1 -1
  187. package/dist/index19.js +6 -6
  188. package/dist/index190.js +49 -50
  189. package/dist/index190.js.map +1 -1
  190. package/dist/index191.js +24 -11
  191. package/dist/index191.js.map +1 -1
  192. package/dist/index192.js +29 -38
  193. package/dist/index192.js.map +1 -1
  194. package/dist/index193.js +5 -9
  195. package/dist/index193.js.map +1 -1
  196. package/dist/index194.js +5 -116
  197. package/dist/index194.js.map +1 -1
  198. package/dist/index195.js +67 -16
  199. package/dist/index195.js.map +1 -1
  200. package/dist/index196.js +2 -16
  201. package/dist/index196.js.map +1 -1
  202. package/dist/index197.js +363 -3
  203. package/dist/index197.js.map +1 -1
  204. package/dist/index198.js +259 -34
  205. package/dist/index198.js.map +1 -1
  206. package/dist/index199.js +59 -19
  207. package/dist/index199.js.map +1 -1
  208. package/dist/index20.js +1 -1
  209. package/dist/index200.js +46 -9
  210. package/dist/index200.js.map +1 -1
  211. package/dist/index201.js +169 -8
  212. package/dist/index201.js.map +1 -1
  213. package/dist/index202.js +108 -18
  214. package/dist/index202.js.map +1 -1
  215. package/dist/index203.js +24 -28
  216. package/dist/index203.js.map +1 -1
  217. package/dist/index204.js +8 -17
  218. package/dist/index204.js.map +1 -1
  219. package/dist/index205.js +4 -58
  220. package/dist/index205.js.map +1 -1
  221. package/dist/index206.js +5 -8
  222. package/dist/index206.js.map +1 -1
  223. package/dist/index207.js +4 -66
  224. package/dist/index207.js.map +1 -1
  225. package/dist/index208.js +464 -17
  226. package/dist/index208.js.map +1 -1
  227. package/dist/index209.js +183 -14
  228. package/dist/index209.js.map +1 -1
  229. package/dist/index21.js +1 -1
  230. package/dist/index210.js +106 -4
  231. package/dist/index210.js.map +1 -1
  232. package/dist/index211.js +261 -4
  233. package/dist/index211.js.map +1 -1
  234. package/dist/index212.js +9 -6
  235. package/dist/index212.js.map +1 -1
  236. package/dist/index213.js +42 -4
  237. package/dist/index213.js.map +1 -1
  238. package/dist/index214.js +4 -7
  239. package/dist/index214.js.map +1 -1
  240. package/dist/index215.js +64 -17
  241. package/dist/index215.js.map +1 -1
  242. package/dist/index216.js +47 -4
  243. package/dist/index216.js.map +1 -1
  244. package/dist/index217.js +67 -5
  245. package/dist/index217.js.map +1 -1
  246. package/dist/index218.js +180 -13
  247. package/dist/index218.js.map +1 -1
  248. package/dist/index219.js +46 -10
  249. package/dist/index219.js.map +1 -1
  250. package/dist/index220.js +39 -14
  251. package/dist/index220.js.map +1 -1
  252. package/dist/index221.js +100 -14
  253. package/dist/index221.js.map +1 -1
  254. package/dist/index222.js +97 -5
  255. package/dist/index222.js.map +1 -1
  256. package/dist/index223.js +99 -6
  257. package/dist/index223.js.map +1 -1
  258. package/dist/index224.js +58 -7
  259. package/dist/index224.js.map +1 -1
  260. package/dist/index225.js +8 -6
  261. package/dist/index225.js.map +1 -1
  262. package/dist/index226.js +66 -9
  263. package/dist/index226.js.map +1 -1
  264. package/dist/index227.js +19 -5
  265. package/dist/index227.js.map +1 -1
  266. package/dist/index228.js +16 -5
  267. package/dist/index228.js.map +1 -1
  268. package/dist/index229.js +5 -9
  269. package/dist/index229.js.map +1 -1
  270. package/dist/index23.js +1 -1
  271. package/dist/index230.js +5 -5
  272. package/dist/index230.js.map +1 -1
  273. package/dist/index231.js +6 -5
  274. package/dist/index231.js.map +1 -1
  275. package/dist/index232.js +4 -4
  276. package/dist/index232.js.map +1 -1
  277. package/dist/index233.js +7 -11
  278. package/dist/index233.js.map +1 -1
  279. package/dist/index234.js +16 -9
  280. package/dist/index234.js.map +1 -1
  281. package/dist/index235.js +5 -10
  282. package/dist/index235.js.map +1 -1
  283. package/dist/index236.js +5 -11
  284. package/dist/index236.js.map +1 -1
  285. package/dist/index237.js +13 -11
  286. package/dist/index237.js.map +1 -1
  287. package/dist/index238.js +10 -10
  288. package/dist/index238.js.map +1 -1
  289. package/dist/index239.js +13 -6
  290. package/dist/index239.js.map +1 -1
  291. package/dist/index240.js +14 -6
  292. package/dist/index240.js.map +1 -1
  293. package/dist/index241.js +4 -4
  294. package/dist/index241.js.map +1 -1
  295. package/dist/index242.js +6 -6
  296. package/dist/index242.js.map +1 -1
  297. package/dist/index243.js +6 -6
  298. package/dist/index243.js.map +1 -1
  299. package/dist/index244.js +5 -5
  300. package/dist/index244.js.map +1 -1
  301. package/dist/index245.js +9 -55
  302. package/dist/index245.js.map +1 -1
  303. package/dist/index246.js +5 -23
  304. package/dist/index246.js.map +1 -1
  305. package/dist/index247.js +5 -16
  306. package/dist/index247.js.map +1 -1
  307. package/dist/index248.js +9 -7
  308. package/dist/index248.js.map +1 -1
  309. package/dist/index249.js +5 -10
  310. package/dist/index249.js.map +1 -1
  311. package/dist/index250.js +5 -10
  312. package/dist/index250.js.map +1 -1
  313. package/dist/index251.js +4 -21
  314. package/dist/index251.js.map +1 -1
  315. package/dist/index252.js +11 -10
  316. package/dist/index252.js.map +1 -1
  317. package/dist/index253.js +10 -9
  318. package/dist/index253.js.map +1 -1
  319. package/dist/index254.js +10 -9
  320. package/dist/index254.js.map +1 -1
  321. package/dist/index255.js +11 -4
  322. package/dist/index255.js.map +1 -1
  323. package/dist/index256.js +11 -5
  324. package/dist/index256.js.map +1 -1
  325. package/dist/index257.js +10 -16
  326. package/dist/index257.js.map +1 -1
  327. package/dist/index258.js +7 -9
  328. package/dist/index258.js.map +1 -1
  329. package/dist/index259.js +6 -18
  330. package/dist/index259.js.map +1 -1
  331. package/dist/index260.js +5 -15
  332. package/dist/index260.js.map +1 -1
  333. package/dist/index261.js +6 -12
  334. package/dist/index261.js.map +1 -1
  335. package/dist/index262.js +7 -29
  336. package/dist/index262.js.map +1 -1
  337. package/dist/index263.js +6 -12
  338. package/dist/index263.js.map +1 -1
  339. package/dist/index264.js +54 -24
  340. package/dist/index264.js.map +1 -1
  341. package/dist/index265.js +23 -5
  342. package/dist/index265.js.map +1 -1
  343. package/dist/index266.js +17 -5
  344. package/dist/index266.js.map +1 -1
  345. package/dist/index267.js +8 -3
  346. package/dist/index267.js.map +1 -1
  347. package/dist/index268.js +10 -23
  348. package/dist/index268.js.map +1 -1
  349. package/dist/index269.js +10 -112
  350. package/dist/index269.js.map +1 -1
  351. package/dist/index270.js +21 -15
  352. package/dist/index270.js.map +1 -1
  353. package/dist/index271.js +10 -524
  354. package/dist/index271.js.map +1 -1
  355. package/dist/index272.js +9 -127
  356. package/dist/index272.js.map +1 -1
  357. package/dist/index273.js +9 -133
  358. package/dist/index273.js.map +1 -1
  359. package/dist/index274.js +4 -20
  360. package/dist/index274.js.map +1 -1
  361. package/dist/index275.js +5 -4
  362. package/dist/index275.js.map +1 -1
  363. package/dist/index276.js +16 -18
  364. package/dist/index276.js.map +1 -1
  365. package/dist/index277.js +9 -12
  366. package/dist/index277.js.map +1 -1
  367. package/dist/index278.js +19 -69
  368. package/dist/index278.js.map +1 -1
  369. package/dist/index279.js +15 -8
  370. package/dist/index279.js.map +1 -1
  371. package/dist/index28.js +1 -1
  372. package/dist/index280.js +13 -14
  373. package/dist/index280.js.map +1 -1
  374. package/dist/index281.js +30 -66
  375. package/dist/index281.js.map +1 -1
  376. package/dist/index282.js +12 -64
  377. package/dist/index282.js.map +1 -1
  378. package/dist/index283.js +25 -5
  379. package/dist/index283.js.map +1 -1
  380. package/dist/index284.js +5 -5
  381. package/dist/index284.js.map +1 -1
  382. package/dist/index285.js +2 -4
  383. package/dist/index285.js.map +1 -1
  384. package/dist/index286.js +2 -16
  385. package/dist/index286.js.map +1 -1
  386. package/dist/index287.js +5 -9
  387. package/dist/index287.js.map +1 -1
  388. package/dist/index288.js +3 -6
  389. package/dist/index288.js.map +1 -1
  390. package/dist/index289.js +23 -4
  391. package/dist/index289.js.map +1 -1
  392. package/dist/index29.js +5 -5
  393. package/dist/index290.js +111 -544
  394. package/dist/index290.js.map +1 -1
  395. package/dist/index291.js +15 -46
  396. package/dist/index291.js.map +1 -1
  397. package/dist/index292.js +521 -14
  398. package/dist/index292.js.map +1 -1
  399. package/dist/index293.js +127 -6
  400. package/dist/index293.js.map +1 -1
  401. package/dist/index294.js +133 -8
  402. package/dist/index294.js.map +1 -1
  403. package/dist/index295.js +13 -7
  404. package/dist/index295.js.map +1 -1
  405. package/dist/index296.js +154 -8
  406. package/dist/index296.js.map +1 -1
  407. package/dist/index297.js +30 -12
  408. package/dist/index297.js.map +1 -1
  409. package/dist/index298.js +9 -9
  410. package/dist/index298.js.map +1 -1
  411. package/dist/index299.js +47 -13
  412. package/dist/index299.js.map +1 -1
  413. package/dist/index30.js +47 -231
  414. package/dist/index30.js.map +1 -1
  415. package/dist/index300.js +11 -3
  416. package/dist/index300.js.map +1 -1
  417. package/dist/index301.js +43 -21
  418. package/dist/index301.js.map +1 -1
  419. package/dist/index302.js +95 -4
  420. package/dist/index302.js.map +1 -1
  421. package/dist/index303.js +85 -54
  422. package/dist/index303.js.map +1 -1
  423. package/dist/index304.js +105 -67
  424. package/dist/index304.js.map +1 -1
  425. package/dist/index305.js +53 -31
  426. package/dist/index305.js.map +1 -1
  427. package/dist/index306.js +12 -9
  428. package/dist/index306.js.map +1 -1
  429. package/dist/index307.js +36 -151
  430. package/dist/index307.js.map +1 -1
  431. package/dist/index308.js +9 -108
  432. package/dist/index308.js.map +1 -1
  433. package/dist/index309.js +4 -23
  434. package/dist/index309.js.map +1 -1
  435. package/dist/index31.js +218 -49
  436. package/dist/index31.js.map +1 -1
  437. package/dist/index310.js +10 -13
  438. package/dist/index310.js.map +1 -1
  439. package/dist/index311.js +113 -24
  440. package/dist/index311.js.map +1 -1
  441. package/dist/index312.js +18 -5
  442. package/dist/index312.js.map +1 -1
  443. package/dist/index313.js +15 -15
  444. package/dist/index313.js.map +1 -1
  445. package/dist/index314.js +33 -25
  446. package/dist/index314.js.map +1 -1
  447. package/dist/index315.js +20 -12
  448. package/dist/index315.js.map +1 -1
  449. package/dist/index316.js +8 -6
  450. package/dist/index316.js.map +1 -1
  451. package/dist/index317.js +23 -0
  452. package/dist/index317.js.map +1 -0
  453. package/dist/index318.js +32 -0
  454. package/dist/index318.js.map +1 -0
  455. package/dist/index319.js +20 -0
  456. package/dist/index319.js.map +1 -0
  457. package/dist/index32.js +36 -2633
  458. package/dist/index32.js.map +1 -1
  459. package/dist/index320.js +8 -0
  460. package/dist/index320.js.map +1 -0
  461. package/dist/index321.js +22 -0
  462. package/dist/index321.js.map +1 -0
  463. package/dist/index322.js +16 -0
  464. package/dist/index322.js.map +1 -0
  465. package/dist/index323.js +72 -0
  466. package/dist/index323.js.map +1 -0
  467. package/dist/index324.js +12 -0
  468. package/dist/index324.js.map +1 -0
  469. package/dist/index325.js +17 -0
  470. package/dist/index325.js.map +1 -0
  471. package/dist/index326.js +69 -0
  472. package/dist/index326.js.map +1 -0
  473. package/dist/index327.js +68 -0
  474. package/dist/index327.js.map +1 -0
  475. package/dist/index328.js +24 -0
  476. package/dist/index328.js.map +1 -0
  477. package/dist/index329.js +9 -0
  478. package/dist/index329.js.map +1 -0
  479. package/dist/index33.js +35 -388
  480. package/dist/index33.js.map +1 -1
  481. package/dist/index330.js +9 -0
  482. package/dist/index330.js.map +1 -0
  483. package/dist/index331.js +7 -0
  484. package/dist/index331.js.map +1 -0
  485. package/dist/index332.js +19 -0
  486. package/dist/index332.js.map +1 -0
  487. package/dist/index333.js +12 -0
  488. package/dist/index333.js.map +1 -0
  489. package/dist/index334.js +9 -0
  490. package/dist/index334.js.map +1 -0
  491. package/dist/index335.js +8 -0
  492. package/dist/index335.js.map +1 -0
  493. package/dist/index336.js +549 -0
  494. package/dist/index336.js.map +1 -0
  495. package/dist/index337.js +50 -0
  496. package/dist/index337.js.map +1 -0
  497. package/dist/index338.js +21 -0
  498. package/dist/index338.js.map +1 -0
  499. package/dist/index339.js +10 -0
  500. package/dist/index339.js.map +1 -0
  501. package/dist/index34.js +26 -230
  502. package/dist/index34.js.map +1 -1
  503. package/dist/index340.js +12 -0
  504. package/dist/index340.js.map +1 -0
  505. package/dist/index341.js +11 -0
  506. package/dist/index341.js.map +1 -0
  507. package/dist/index342.js +12 -0
  508. package/dist/index342.js.map +1 -0
  509. package/dist/index343.js +16 -0
  510. package/dist/index343.js.map +1 -0
  511. package/dist/index344.js +13 -0
  512. package/dist/index344.js.map +1 -0
  513. package/dist/index345.js +17 -0
  514. package/dist/index345.js.map +1 -0
  515. package/dist/index346.js +7 -0
  516. package/dist/index346.js.map +1 -0
  517. package/dist/index347.js +26 -0
  518. package/dist/index347.js.map +1 -0
  519. package/dist/index348.js +8 -0
  520. package/dist/index348.js.map +1 -0
  521. package/dist/index349.js +59 -0
  522. package/dist/index349.js.map +1 -0
  523. package/dist/index35.js +44 -20
  524. package/dist/index35.js.map +1 -1
  525. package/dist/index350.js +71 -0
  526. package/dist/index350.js.map +1 -0
  527. package/dist/index351.js +34 -0
  528. package/dist/index351.js.map +1 -0
  529. package/dist/index352.js +12 -0
  530. package/dist/index352.js.map +1 -0
  531. package/dist/index353.js +156 -0
  532. package/dist/index353.js.map +1 -0
  533. package/dist/index354.js +111 -0
  534. package/dist/index354.js.map +1 -0
  535. package/dist/index355.js +26 -0
  536. package/dist/index355.js.map +1 -0
  537. package/dist/index356.js +16 -0
  538. package/dist/index356.js.map +1 -0
  539. package/dist/index357.js +31 -0
  540. package/dist/index357.js.map +1 -0
  541. package/dist/index358.js +8 -0
  542. package/dist/index358.js.map +1 -0
  543. package/dist/index359.js +19 -0
  544. package/dist/index359.js.map +1 -0
  545. package/dist/index36.js +27 -137
  546. package/dist/index36.js.map +1 -1
  547. package/dist/index360.js +32 -0
  548. package/dist/index360.js.map +1 -0
  549. package/dist/index361.js +16 -0
  550. package/dist/index361.js.map +1 -0
  551. package/dist/index362.js +10 -0
  552. package/dist/index362.js.map +1 -0
  553. package/dist/index37.js +22 -181
  554. package/dist/index37.js.map +1 -1
  555. package/dist/index38.js +23 -77
  556. package/dist/index38.js.map +1 -1
  557. package/dist/index39.js +127 -89
  558. package/dist/index39.js.map +1 -1
  559. package/dist/index40.js +231 -5
  560. package/dist/index40.js.map +1 -1
  561. package/dist/index41.js +51 -844
  562. package/dist/index41.js.map +1 -1
  563. package/dist/index42.js +2636 -61
  564. package/dist/index42.js.map +1 -1
  565. package/dist/index43.js +393 -7
  566. package/dist/index43.js.map +1 -1
  567. package/dist/index44.js +233 -2
  568. package/dist/index44.js.map +1 -1
  569. package/dist/index45.js +20 -22
  570. package/dist/index45.js.map +1 -1
  571. package/dist/index46.js +140 -232
  572. package/dist/index46.js.map +1 -1
  573. package/dist/index47.js +180 -198
  574. package/dist/index47.js.map +1 -1
  575. package/dist/index48.js +76 -3
  576. package/dist/index48.js.map +1 -1
  577. package/dist/index49.js +89 -5
  578. package/dist/index49.js.map +1 -1
  579. package/dist/index50.js +5 -47
  580. package/dist/index50.js.map +1 -1
  581. package/dist/index51.js +840 -23
  582. package/dist/index51.js.map +1 -1
  583. package/dist/index52.js +65 -50
  584. package/dist/index52.js.map +1 -1
  585. package/dist/index53.js +7 -7
  586. package/dist/index53.js.map +1 -1
  587. package/dist/index54.js +2 -15
  588. package/dist/index54.js.map +1 -1
  589. package/dist/index55.js +22 -132
  590. package/dist/index55.js.map +1 -1
  591. package/dist/index56.js +233 -10
  592. package/dist/index56.js.map +1 -1
  593. package/dist/index57.js +191 -203
  594. package/dist/index57.js.map +1 -1
  595. package/dist/index58.js +4 -13
  596. package/dist/index58.js.map +1 -1
  597. package/dist/index59.js +6 -33
  598. package/dist/index59.js.map +1 -1
  599. package/dist/index60.js +44 -43
  600. package/dist/index60.js.map +1 -1
  601. package/dist/index61.js +26 -7
  602. package/dist/index61.js.map +1 -1
  603. package/dist/index62.js +48 -47
  604. package/dist/index62.js.map +1 -1
  605. package/dist/index63.js +7 -3
  606. package/dist/index63.js.map +1 -1
  607. package/dist/index64.js +14 -5
  608. package/dist/index64.js.map +1 -1
  609. package/dist/index65.js +133 -27
  610. package/dist/index65.js.map +1 -1
  611. package/dist/index66.js +11 -50
  612. package/dist/index66.js.map +1 -1
  613. package/dist/index67.js +216 -8
  614. package/dist/index67.js.map +1 -1
  615. package/dist/index68.js +13 -2
  616. package/dist/index68.js.map +1 -1
  617. package/dist/index69.js +34 -2
  618. package/dist/index69.js.map +1 -1
  619. package/dist/index70.js +46 -11
  620. package/dist/index70.js.map +1 -1
  621. package/dist/index71.js +7 -53
  622. package/dist/index71.js.map +1 -1
  623. package/dist/index72.js +49 -5
  624. package/dist/index72.js.map +1 -1
  625. package/dist/index73.js +4 -8
  626. package/dist/index73.js.map +1 -1
  627. package/dist/index74.js +5 -5
  628. package/dist/index74.js.map +1 -1
  629. package/dist/index75.js +27 -46
  630. package/dist/index75.js.map +1 -1
  631. package/dist/index76.js +48 -204
  632. package/dist/index76.js.map +1 -1
  633. package/dist/index77.js +8 -21
  634. package/dist/index77.js.map +1 -1
  635. package/dist/index78.js +11 -24
  636. package/dist/index78.js.map +1 -1
  637. package/dist/index79.js +2 -400
  638. package/dist/index79.js.map +1 -1
  639. package/dist/index80.js +2 -47
  640. package/dist/index80.js.map +1 -1
  641. package/dist/index81.js +52 -604
  642. package/dist/index81.js.map +1 -1
  643. package/dist/index82.js +46 -5
  644. package/dist/index82.js.map +1 -1
  645. package/dist/index83.js +199 -62
  646. package/dist/index83.js.map +1 -1
  647. package/dist/index84.js +22 -2
  648. package/dist/index84.js.map +1 -1
  649. package/dist/index85.js +24 -363
  650. package/dist/index85.js.map +1 -1
  651. package/dist/index86.js +381 -243
  652. package/dist/index86.js.map +1 -1
  653. package/dist/index87.js +41 -55
  654. package/dist/index87.js.map +1 -1
  655. package/dist/index88.js +5 -46
  656. package/dist/index88.js.map +1 -1
  657. package/dist/index89.js +7 -169
  658. package/dist/index89.js.map +1 -1
  659. package/dist/index90.js +5 -109
  660. package/dist/index90.js.map +1 -1
  661. package/dist/index91.js +605 -24
  662. package/dist/index91.js.map +1 -1
  663. package/dist/index92.js +4 -8
  664. package/dist/index92.js.map +1 -1
  665. package/dist/index93.js +33 -4
  666. package/dist/index93.js.map +1 -1
  667. package/dist/index94.js +249 -5
  668. package/dist/index94.js.map +1 -1
  669. package/dist/index95.js +114 -4
  670. package/dist/index95.js.map +1 -1
  671. package/dist/index96.js +214 -461
  672. package/dist/index96.js.map +1 -1
  673. package/dist/index97.js +60 -179
  674. package/dist/index97.js.map +1 -1
  675. package/dist/index98.js +18 -105
  676. package/dist/index98.js.map +1 -1
  677. package/dist/index99.js +197 -250
  678. package/dist/index99.js.map +1 -1
  679. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index358.js","sources":["../../../node_modules/get-nonce/dist/es2015/index.js"],"sourcesContent":["var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n"],"names":["getNonce"],"mappings":"AAIU,IAACA,IAAW,WAAY;AAI9B,MAAI,OAAO,oBAAsB;AAC7B,WAAO;AAGf;","x_google_ignoreList":[0]}
@@ -0,0 +1,19 @@
1
+ function c(t) {
2
+ return (l, e) => {
3
+ const u = e?.context ? String(e.context) : "standalone";
4
+ let d;
5
+ if (u === "formatting" && t.formattingValues) {
6
+ const n = t.defaultFormattingWidth || t.defaultWidth, i = e?.width ? String(e.width) : n;
7
+ d = t.formattingValues[i] || t.formattingValues[n];
8
+ } else {
9
+ const n = t.defaultWidth, i = e?.width ? String(e.width) : t.defaultWidth;
10
+ d = t.values[i] || t.values[n];
11
+ }
12
+ const a = t.argumentCallback ? t.argumentCallback(l) : l;
13
+ return d[a];
14
+ };
15
+ }
16
+ export {
17
+ c as buildLocalizeFn
18
+ };
19
+ //# sourceMappingURL=index359.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index359.js","sources":["../../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js"],"sourcesContent":["/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n"],"names":["buildLocalizeFn","args","value","options","context","valuesArray","defaultWidth","width","index"],"mappings":"AAuCO,SAASA,EAAgBC,GAAM;AACpC,SAAO,CAACC,GAAOC,MAAY;AACzB,UAAMC,IAAUD,GAAS,UAAU,OAAOA,EAAQ,OAAO,IAAI;AAE7D,QAAIE;AACJ,QAAID,MAAY,gBAAgBH,EAAK,kBAAkB;AACrD,YAAMK,IAAeL,EAAK,0BAA0BA,EAAK,cACnDM,IAAQJ,GAAS,QAAQ,OAAOA,EAAQ,KAAK,IAAIG;AAEvD,MAAAD,IACEJ,EAAK,iBAAiBM,CAAK,KAAKN,EAAK,iBAAiBK,CAAY;AAAA,IACtE,OAAO;AACL,YAAMA,IAAeL,EAAK,cACpBM,IAAQJ,GAAS,QAAQ,OAAOA,EAAQ,KAAK,IAAIF,EAAK;AAE5D,MAAAI,IAAcJ,EAAK,OAAOM,CAAK,KAAKN,EAAK,OAAOK,CAAY;AAAA,IAC9D;AACA,UAAME,IAAQP,EAAK,mBAAmBA,EAAK,iBAAiBC,CAAK,IAAIA;AAGrE,WAAOG,EAAYG,CAAK;AAAA,EAC1B;AACF;","x_google_ignoreList":[0]}
package/dist/index36.js CHANGED
@@ -1,145 +1,35 @@
1
- import { getCountryList as E } from "./index72.js";
2
- import { getCountryCallingCode as s } from "./index40.js";
3
- const c = "US", u = E(), f = /* @__PURE__ */ new Map(), m = "__default_locale__", _ = Array.from(
4
- new Set(u.map((e) => s(e)))
5
- ).sort((e, t) => t.length - e.length), O = _.reduce(
6
- (e, t) => Math.max(e, t.length),
7
- 0
8
- ), y = ["0011", "001", "011", "00", "810"];
9
- function R(e) {
10
- return e && u.includes(e) ? e : c;
11
- }
12
- function C(e) {
13
- if (typeof Intl > "u" || typeof Intl.DisplayNames > "u")
14
- return null;
15
- try {
16
- const t = Array.isArray(e) ? e : e ? [e] : void 0;
17
- return new Intl.DisplayNames(t, { type: "region" });
18
- } catch {
19
- return null;
1
+ import i from "./index35.js";
2
+ import l from "./index92.js";
3
+ import "./index33.js";
4
+ class r extends i {
5
+ /** Returns HTMLElement selection start */
6
+ get _unsafeSelectionStart() {
7
+ const o = this.rootElement, t = o.getSelection && o.getSelection(), e = t && t.anchorOffset, n = t && t.focusOffset;
8
+ return n == null || e == null || e < n ? e : n;
20
9
  }
21
- }
22
- function N(e) {
23
- const t = C(e), r = C("en");
24
- return u.map((n) => {
25
- const a = s(n), o = t?.of(n) ?? r?.of(n) ?? n, i = r?.of(n) ?? o, g = D(n), l = Array.from(
26
- new Set(
27
- [o, i, n.toUpperCase(), n.toLowerCase(), ...g].filter(
28
- Boolean
29
- )
30
- )
31
- );
32
- return {
33
- value: n,
34
- name: o,
35
- dialCode: a,
36
- label: `${o} (+${a})`,
37
- flag: A(n),
38
- searchableTokens: l,
39
- normalizedSearchableTokens: l.map((p) => U(p))
40
- };
41
- }).sort((n, a) => {
42
- const o = d(n.value), i = d(a.value);
43
- return o !== i ? o - i : n.name.localeCompare(a.name);
44
- });
45
- }
46
- function d(e) {
47
- return e === "US" ? 0 : e === "CA" ? 1 : s(e) === "1" ? 2 : 3;
48
- }
49
- function b(e) {
50
- return e ? Array.isArray(e) ? e.join("\0") : e : m;
51
- }
52
- function L(e) {
53
- if (e !== m) {
54
- if (e.includes("\0")) {
55
- const t = e.split("\0").filter(Boolean);
56
- return t.length === 0 ? void 0 : t.length === 1 ? t[0] ?? void 0 : t;
57
- }
58
- return e;
10
+ /** Returns HTMLElement selection end */
11
+ get _unsafeSelectionEnd() {
12
+ const o = this.rootElement, t = o.getSelection && o.getSelection(), e = t && t.anchorOffset, n = t && t.focusOffset;
13
+ return n == null || e == null || e > n ? e : n;
59
14
  }
60
- }
61
- function v(e, t) {
62
- const r = f.get(t);
63
- if (r)
64
- return r;
65
- const n = N(e);
66
- return f.set(t, n), n;
67
- }
68
- function F(e) {
69
- return {
70
- code: e.value,
71
- name: e.name,
72
- dialCode: e.dialCode,
73
- flag: e.flag
74
- };
75
- }
76
- function M(e) {
77
- return {
78
- code: e,
79
- name: e,
80
- dialCode: s(e),
81
- flag: A(e)
82
- };
83
- }
84
- function A(e) {
85
- const t = e?.toUpperCase();
86
- if (!t || t.length !== 2 || /[^A-Z]/.test(t))
87
- return "";
88
- const r = 127397;
89
- return String.fromCodePoint(
90
- t.charCodeAt(0) + r,
91
- t.charCodeAt(1) + r
92
- );
93
- }
94
- const S = /[\u0300-\u036f]/g;
95
- function h(e) {
96
- return e.normalize("NFD").replace(S, "");
97
- }
98
- function U(e) {
99
- return h(e).toLowerCase();
100
- }
101
- function B(e, t) {
102
- let r = Number.MAX_SAFE_INTEGER;
103
- for (const n of e) {
104
- const a = n.indexOf(t);
105
- a >= 0 && a < r && (r = a);
15
+ /** Sets HTMLElement selection */
16
+ _unsafeSelect(o, t) {
17
+ if (!this.rootElement.createRange) return;
18
+ const e = this.rootElement.createRange();
19
+ e.setStart(this.input.firstChild || this.input, o), e.setEnd(this.input.lastChild || this.input, t);
20
+ const n = this.rootElement, s = n.getSelection && n.getSelection();
21
+ s && (s.removeAllRanges(), s.addRange(e));
106
22
  }
107
- return r === Number.MAX_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : r;
108
- }
109
- function D(e) {
110
- switch (e) {
111
- case "US":
112
- return ["USA", "United States", "America", "United States of America"];
113
- case "GB":
114
- return ["UK", "United Kingdom", "Great Britain", "England"];
115
- case "AE":
116
- return ["UAE", "United Arab Emirates"];
117
- case "KR":
118
- return ["South Korea", "Korea"];
119
- case "CN":
120
- return ["China", "PRC"];
121
- case "CD":
122
- return ["DRC", "Congo-Kinshasa"];
123
- case "CG":
124
- return ["Congo-Brazzaville"];
125
- case "BR":
126
- return ["Brazil"];
127
- default:
128
- return [];
23
+ /** HTMLElement value */
24
+ get value() {
25
+ return this.input.textContent || "";
26
+ }
27
+ set value(o) {
28
+ this.input.textContent = o;
129
29
  }
130
30
  }
31
+ l.HTMLContenteditableMaskElement = r;
131
32
  export {
132
- y as COMMON_IDD_PREFIXES,
133
- _ as COUNTRY_DIAL_CODES,
134
- c as DEFAULT_COUNTRY,
135
- O as MAX_DIAL_CODE_LENGTH,
136
- M as buildFallbackSelectedCountry,
137
- v as getCachedCountryOptions,
138
- b as getLocaleCacheKey,
139
- R as getValidCountry,
140
- U as normalizeSearchValue,
141
- B as optionMatchIndex,
142
- L as parseLocaleCacheKey,
143
- F as toSelectedCountry
33
+ r as default
144
34
  };
145
35
  //# sourceMappingURL=index36.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index36.js","sources":["../src/components/PhoneNumberInput/country-options.ts"],"sourcesContent":["import type { CountryCode } from \"libphonenumber-js\"\nimport { getCountryCallingCode } from \"libphonenumber-js\"\n\nimport type { CountryOption, PhoneNumberSelectedCountry } from \"./types\"\nimport { getCountryList } from \"./countries\"\n\n\nexport const DEFAULT_COUNTRY: CountryCode = \"US\"\nconst COUNTRY_OPTIONS = getCountryList()\n\nconst COUNTRY_OPTIONS_CACHE = new Map<string, CountryOption[]>()\nconst DEFAULT_LOCALE_CACHE_KEY = \"__default_locale__\"\nexport const COUNTRY_DIAL_CODES = Array.from(\n new Set(COUNTRY_OPTIONS.map((code) => getCountryCallingCode(code)))\n).sort((a, b) => b.length - a.length)\nexport const MAX_DIAL_CODE_LENGTH = COUNTRY_DIAL_CODES.reduce(\n (max, dial) => Math.max(max, dial.length),\n 0\n)\nexport const COMMON_IDD_PREFIXES = [\"0011\", \"001\", \"011\", \"00\", \"810\"]\n\nexport function getValidCountry(input: CountryCode | undefined) {\n if (!input) {\n return DEFAULT_COUNTRY\n }\n\n return COUNTRY_OPTIONS.includes(input) ? input : DEFAULT_COUNTRY\n}\n\nfunction createDisplayNames(locale?: string | string[]) {\n if (typeof Intl === \"undefined\" || typeof Intl.DisplayNames === \"undefined\") {\n return null\n }\n\n try {\n const locales = Array.isArray(locale) ? locale : locale ? [locale] : undefined\n return new Intl.DisplayNames(locales, { type: \"region\" })\n } catch {\n return null\n }\n}\n\nfunction buildCountryOptions(locale?: string | string[]) {\n const displayNames = createDisplayNames(locale)\n const englishDisplayNames = createDisplayNames(\"en\")\n\n return COUNTRY_OPTIONS\n .map((country) => {\n const dialCode = getCountryCallingCode(country)\n const localizedName = displayNames?.of(country) ?? englishDisplayNames?.of(country) ?? country\n const englishName = englishDisplayNames?.of(country) ?? localizedName\n const aliasTokens = getCountryAliases(country)\n const searchableTokens = Array.from(\n new Set(\n [localizedName, englishName, country.toUpperCase(), country.toLowerCase(), ...aliasTokens].filter(\n Boolean\n )\n )\n ) as string[]\n return {\n value: country,\n name: localizedName,\n dialCode,\n label: `${localizedName} (+${dialCode})`,\n flag: countryCodeToFlagEmoji(country),\n searchableTokens,\n normalizedSearchableTokens: searchableTokens.map((token) => normalizeSearchValue(token)),\n }\n })\n .sort((a, b) => {\n const priorityA = getCountryPriority(a.value)\n const priorityB = getCountryPriority(b.value)\n if (priorityA !== priorityB) {\n return priorityA - priorityB\n }\n return a.name.localeCompare(b.name)\n })\n}\n\nfunction getCountryPriority(code: CountryCode) {\n if (code === \"US\") return 0\n if (code === \"CA\") return 1\n if (getCountryCallingCode(code) === \"1\") return 2\n return 3\n}\n\nexport function getLocaleCacheKey(locale?: string | string[]) {\n if (!locale) {\n return DEFAULT_LOCALE_CACHE_KEY\n }\n if (Array.isArray(locale)) {\n return locale.join(\"\\u0000\")\n }\n return locale\n}\n\nexport function parseLocaleCacheKey(cacheKey: string): string | string[] | undefined {\n if (cacheKey === DEFAULT_LOCALE_CACHE_KEY) {\n return undefined\n }\n\n if (cacheKey.includes(\"\\u0000\")) {\n const parts = cacheKey.split(\"\\u0000\").filter(Boolean)\n if (parts.length === 0) {\n return undefined\n }\n if (parts.length === 1) {\n return parts[0] ?? undefined\n }\n return parts\n }\n\n return cacheKey\n}\n\nexport function getCachedCountryOptions(locale: string | string[] | undefined, cacheKey: string) {\n const cached = COUNTRY_OPTIONS_CACHE.get(cacheKey)\n if (cached) {\n return cached\n }\n const built = buildCountryOptions(locale)\n COUNTRY_OPTIONS_CACHE.set(cacheKey, built)\n return built\n}\n\nexport function toSelectedCountry(option: CountryOption): PhoneNumberSelectedCountry {\n return {\n code: option.value,\n name: option.name,\n dialCode: option.dialCode,\n flag: option.flag,\n }\n}\n\nexport function buildFallbackSelectedCountry(country: CountryCode): PhoneNumberSelectedCountry {\n return {\n code: country,\n name: country,\n dialCode: getCountryCallingCode(country),\n flag: countryCodeToFlagEmoji(country),\n }\n}\n\nfunction countryCodeToFlagEmoji(country: CountryCode) {\n const upper = country?.toUpperCase()\n\n if (!upper || upper.length !== 2 || /[^A-Z]/.test(upper)) {\n return \"\"\n }\n\n const base = 127397\n return String.fromCodePoint(\n upper.charCodeAt(0) + base,\n upper.charCodeAt(1) + base\n )\n}\n\nconst DIACRITICS_REGEX = /[\\u0300-\\u036f]/g\n\nfunction stripDiacritics(value: string) {\n return value.normalize(\"NFD\").replace(DIACRITICS_REGEX, \"\")\n}\n\nexport function normalizeSearchValue(value: string) {\n return stripDiacritics(value).toLowerCase()\n}\n\nexport function optionMatchIndex(tokens: string[], query: string) {\n let best = Number.MAX_SAFE_INTEGER\n for (const token of tokens) {\n const index = token.indexOf(query)\n if (index >= 0 && index < best) {\n best = index\n }\n }\n return best === Number.MAX_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : best\n}\n\nfunction getCountryAliases(code: CountryCode): string[] {\n switch (code) {\n case \"US\":\n return [\"USA\", \"United States\", \"America\", \"United States of America\"]\n case \"GB\":\n return [\"UK\", \"United Kingdom\", \"Great Britain\", \"England\"]\n case \"AE\":\n return [\"UAE\", \"United Arab Emirates\"]\n case \"KR\":\n return [\"South Korea\", \"Korea\"]\n case \"CN\":\n return [\"China\", \"PRC\"]\n case \"CD\":\n return [\"DRC\", \"Congo-Kinshasa\"]\n case \"CG\":\n return [\"Congo-Brazzaville\"]\n case \"BR\":\n return [\"Brazil\"]\n default:\n return []\n }\n}\n\n"],"names":["DEFAULT_COUNTRY","COUNTRY_OPTIONS","getCountryList","COUNTRY_OPTIONS_CACHE","DEFAULT_LOCALE_CACHE_KEY","COUNTRY_DIAL_CODES","code","getCountryCallingCode","a","b","MAX_DIAL_CODE_LENGTH","max","dial","COMMON_IDD_PREFIXES","getValidCountry","input","createDisplayNames","locale","locales","buildCountryOptions","displayNames","englishDisplayNames","country","dialCode","localizedName","englishName","aliasTokens","getCountryAliases","searchableTokens","countryCodeToFlagEmoji","token","normalizeSearchValue","priorityA","getCountryPriority","priorityB","getLocaleCacheKey","parseLocaleCacheKey","cacheKey","parts","getCachedCountryOptions","cached","built","toSelectedCountry","option","buildFallbackSelectedCountry","upper","base","DIACRITICS_REGEX","stripDiacritics","value","optionMatchIndex","tokens","query","best","index"],"mappings":";;AAOO,MAAMA,IAA+B,MACtCC,IAAkBC,EAAA,GAElBC,wBAA4B,IAAA,GAC5BC,IAA2B,sBACpBC,IAAqB,MAAM;AAAA,EACtC,IAAI,IAAIJ,EAAgB,IAAI,CAACK,MAASC,EAAsBD,CAAI,CAAC,CAAC;AACpE,EAAE,KAAK,CAACE,GAAGC,MAAMA,EAAE,SAASD,EAAE,MAAM,GACvBE,IAAuBL,EAAmB;AAAA,EACrD,CAACM,GAAKC,MAAS,KAAK,IAAID,GAAKC,EAAK,MAAM;AAAA,EACxC;AACF,GACaC,IAAsB,CAAC,QAAQ,OAAO,OAAO,MAAM,KAAK;AAE9D,SAASC,EAAgBC,GAAgC;AAC9D,SAAKA,KAIEd,EAAgB,SAASc,CAAK,IAAIA,IAHhCf;AAIX;AAEA,SAASgB,EAAmBC,GAA4B;AACtD,MAAI,OAAO,OAAS,OAAe,OAAO,KAAK,eAAiB;AAC9D,WAAO;AAGT,MAAI;AACF,UAAMC,IAAU,MAAM,QAAQD,CAAM,IAAIA,IAASA,IAAS,CAACA,CAAM,IAAI;AACrE,WAAO,IAAI,KAAK,aAAaC,GAAS,EAAE,MAAM,UAAU;AAAA,EAC1D,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAASC,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e;AAChE,MAAIC,IAAO,OAAO;AAClB,aAAWvB,KAASqB,GAAQ;AAC1B,UAAMG,IAAQxB,EAAM,QAAQsB,CAAK;AACjC,IAAIE,KAAS,KAAKA,IAAQD,MACxBA,IAAOC;AAAA,EAEX;AACA,SAAOD,MAAS,OAAO,mBAAmB,OAAO,mBAAmBA;AACtE;AAEA,SAAS1B,EAAkBrB,GAA6B;AACtD,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAO,CAAC,OAAO,iBAAiB,WAAW,0BAA0B;AAAA,IACvE,KAAK;AACH,aAAO,CAAC,MAAM,kBAAkB,iBAAiB,SAAS;AAAA,IAC5D,KAAK;AACH,aAAO,CAAC,OAAO,sBAAsB;AAAA,IACvC,KAAK;AACH,aAAO,CAAC,eAAe,OAAO;AAAA,IAChC,KAAK;AACH,aAAO,CAAC,SAAS,KAAK;AAAA,IACxB,KAAK;AACH,aAAO,CAAC,OAAO,gBAAgB;AAAA,IACjC,KAAK;AACH,aAAO,CAAC,mBAAmB;AAAA,IAC7B,KAAK;AACH,aAAO,CAAC,QAAQ;AAAA,IAClB;AACE,aAAO,CAAA;AAAA,EAAC;AAEd;"}
1
+ {"version":3,"file":"index36.js","sources":["../../../node_modules/imask/esm/controls/html-contenteditable-mask-element.js"],"sourcesContent":["import HTMLMaskElement from './html-mask-element.js';\nimport IMask from '../core/holder.js';\nimport './mask-element.js';\n\nclass HTMLContenteditableMaskElement extends HTMLMaskElement {\n /** Returns HTMLElement selection start */\n get _unsafeSelectionStart() {\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n const anchorOffset = selection && selection.anchorOffset;\n const focusOffset = selection && selection.focusOffset;\n if (focusOffset == null || anchorOffset == null || anchorOffset < focusOffset) {\n return anchorOffset;\n }\n return focusOffset;\n }\n\n /** Returns HTMLElement selection end */\n get _unsafeSelectionEnd() {\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n const anchorOffset = selection && selection.anchorOffset;\n const focusOffset = selection && selection.focusOffset;\n if (focusOffset == null || anchorOffset == null || anchorOffset > focusOffset) {\n return anchorOffset;\n }\n return focusOffset;\n }\n\n /** Sets HTMLElement selection */\n _unsafeSelect(start, end) {\n if (!this.rootElement.createRange) return;\n const range = this.rootElement.createRange();\n range.setStart(this.input.firstChild || this.input, start);\n range.setEnd(this.input.lastChild || this.input, end);\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n /** HTMLElement value */\n get value() {\n return this.input.textContent || '';\n }\n set value(value) {\n this.input.textContent = value;\n }\n}\nIMask.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement;\n\nexport { HTMLContenteditableMaskElement as default };\n"],"names":["HTMLContenteditableMaskElement","HTMLMaskElement","root","selection","anchorOffset","focusOffset","start","end","range","value","IMask"],"mappings":";;;AAIA,MAAMA,UAAuCC,EAAgB;AAAA;AAAA,EAE3D,IAAI,wBAAwB;AAC1B,UAAMC,IAAO,KAAK,aACZC,IAAYD,EAAK,gBAAgBA,EAAK,aAAY,GAClDE,IAAeD,KAAaA,EAAU,cACtCE,IAAcF,KAAaA,EAAU;AAC3C,WAAIE,KAAe,QAAQD,KAAgB,QAAQA,IAAeC,IACzDD,IAEFC;AAAA,EACT;AAAA;AAAA,EAGA,IAAI,sBAAsB;AACxB,UAAMH,IAAO,KAAK,aACZC,IAAYD,EAAK,gBAAgBA,EAAK,aAAY,GAClDE,IAAeD,KAAaA,EAAU,cACtCE,IAAcF,KAAaA,EAAU;AAC3C,WAAIE,KAAe,QAAQD,KAAgB,QAAQA,IAAeC,IACzDD,IAEFC;AAAA,EACT;AAAA;AAAA,EAGA,cAAcC,GAAOC,GAAK;AACxB,QAAI,CAAC,KAAK,YAAY,YAAa;AACnC,UAAMC,IAAQ,KAAK,YAAY,YAAW;AAC1C,IAAAA,EAAM,SAAS,KAAK,MAAM,cAAc,KAAK,OAAOF,CAAK,GACzDE,EAAM,OAAO,KAAK,MAAM,aAAa,KAAK,OAAOD,CAAG;AACpD,UAAML,IAAO,KAAK,aACZC,IAAYD,EAAK,gBAAgBA,EAAK,aAAY;AACxD,IAAIC,MACFA,EAAU,gBAAe,GACzBA,EAAU,SAASK,CAAK;AAAA,EAE5B;AAAA;AAAA,EAGA,IAAI,QAAQ;AACV,WAAO,KAAK,MAAM,eAAe;AAAA,EACnC;AAAA,EACA,IAAI,MAAMC,GAAO;AACf,SAAK,MAAM,cAAcA;AAAA,EAC3B;AACF;AACAC,EAAM,iCAAiCV;","x_google_ignoreList":[0]}
@@ -0,0 +1,32 @@
1
+ function P(t) {
2
+ return (n, e = {}) => {
3
+ const l = e.width, h = l && t.matchPatterns[l] || t.matchPatterns[t.defaultMatchWidth], i = n.match(h);
4
+ if (!i)
5
+ return null;
6
+ const r = i[0], c = l && t.parsePatterns[l] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ? o(c, (u) => u.test(r)) : (
7
+ // [TODO] -- I challenge you to fix the type
8
+ s(c, (u) => u.test(r))
9
+ );
10
+ let a;
11
+ a = t.valueCallback ? t.valueCallback(d) : d, a = e.valueCallback ? (
12
+ // [TODO] -- I challenge you to fix the type
13
+ e.valueCallback(a)
14
+ ) : a;
15
+ const f = n.slice(r.length);
16
+ return { value: a, rest: f };
17
+ };
18
+ }
19
+ function s(t, n) {
20
+ for (const e in t)
21
+ if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
22
+ return e;
23
+ }
24
+ function o(t, n) {
25
+ for (let e = 0; e < t.length; e++)
26
+ if (n(t[e]))
27
+ return e;
28
+ }
29
+ export {
30
+ P as buildMatchFn
31
+ };
32
+ //# sourceMappingURL=index360.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index360.js","sources":["../../../node_modules/date-fns/locale/_lib/buildMatchFn.js"],"sourcesContent":["export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n"],"names":["buildMatchFn","args","string","options","width","matchPattern","matchResult","matchedString","parsePatterns","key","findIndex","pattern","findKey","value","rest","object","predicate","array"],"mappings":"AAAO,SAASA,EAAaC,GAAM;AACjC,SAAO,CAACC,GAAQC,IAAU,OAAO;AAC/B,UAAMC,IAAQD,EAAQ,OAEhBE,IACHD,KAASH,EAAK,cAAcG,CAAK,KAClCH,EAAK,cAAcA,EAAK,iBAAiB,GACrCK,IAAcJ,EAAO,MAAMG,CAAY;AAE7C,QAAI,CAACC;AACH,aAAO;AAET,UAAMC,IAAgBD,EAAY,CAAC,GAE7BE,IACHJ,KAASH,EAAK,cAAcG,CAAK,KAClCH,EAAK,cAAcA,EAAK,iBAAiB,GAErCQ,IAAM,MAAM,QAAQD,CAAa,IACnCE,EAAUF,GAAe,CAACG,MAAYA,EAAQ,KAAKJ,CAAa,CAAC;AAAA;AAAA,MAEjEK,EAAQJ,GAAe,CAACG,MAAYA,EAAQ,KAAKJ,CAAa,CAAC;AAAA;AAEnE,QAAIM;AAEJ,IAAAA,IAAQZ,EAAK,gBAAgBA,EAAK,cAAcQ,CAAG,IAAIA,GACvDI,IAAQV,EAAQ;AAAA;AAAA,MAEZA,EAAQ,cAAcU,CAAK;AAAA,QAC3BA;AAEJ,UAAMC,IAAOZ,EAAO,MAAMK,EAAc,MAAM;AAE9C,WAAO,EAAE,OAAAM,GAAO,MAAAC,EAAI;AAAA,EACtB;AACF;AAEA,SAASF,EAAQG,GAAQC,GAAW;AAClC,aAAWP,KAAOM;AAChB,QACE,OAAO,UAAU,eAAe,KAAKA,GAAQN,CAAG,KAChDO,EAAUD,EAAON,CAAG,CAAC;AAErB,aAAOA;AAIb;AAEA,SAASC,EAAUO,GAAOD,GAAW;AACnC,WAASP,IAAM,GAAGA,IAAMQ,EAAM,QAAQR;AACpC,QAAIO,EAAUC,EAAMR,CAAG,CAAC;AACtB,aAAOA;AAIb;","x_google_ignoreList":[0]}
@@ -0,0 +1,16 @@
1
+ function h(t) {
2
+ return (e, c = {}) => {
3
+ const n = e.match(t.matchPattern);
4
+ if (!n) return null;
5
+ const u = n[0], a = e.match(t.parsePattern);
6
+ if (!a) return null;
7
+ let l = t.valueCallback ? t.valueCallback(a[0]) : a[0];
8
+ l = c.valueCallback ? c.valueCallback(l) : l;
9
+ const r = e.slice(u.length);
10
+ return { value: l, rest: r };
11
+ };
12
+ }
13
+ export {
14
+ h as buildMatchPatternFn
15
+ };
16
+ //# sourceMappingURL=index361.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index361.js","sources":["../../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js"],"sourcesContent":["export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n"],"names":["buildMatchPatternFn","args","string","options","matchResult","matchedString","parseResult","value","rest"],"mappings":"AAAO,SAASA,EAAoBC,GAAM;AACxC,SAAO,CAACC,GAAQC,IAAU,OAAO;AAC/B,UAAMC,IAAcF,EAAO,MAAMD,EAAK,YAAY;AAClD,QAAI,CAACG,EAAa,QAAO;AACzB,UAAMC,IAAgBD,EAAY,CAAC,GAE7BE,IAAcJ,EAAO,MAAMD,EAAK,YAAY;AAClD,QAAI,CAACK,EAAa,QAAO;AACzB,QAAIC,IAAQN,EAAK,gBACbA,EAAK,cAAcK,EAAY,CAAC,CAAC,IACjCA,EAAY,CAAC;AAGjB,IAAAC,IAAQJ,EAAQ,gBAAgBA,EAAQ,cAAcI,CAAK,IAAIA;AAE/D,UAAMC,IAAON,EAAO,MAAMG,EAAc,MAAM;AAE9C,WAAO,EAAE,OAAAE,GAAO,MAAAC,EAAI;AAAA,EACtB;AACF;","x_google_ignoreList":[0]}
@@ -0,0 +1,10 @@
1
+ function r(t) {
2
+ return (d = {}) => {
3
+ const n = d.width ? String(d.width) : t.defaultWidth;
4
+ return t.formats[n] || t.formats[t.defaultWidth];
5
+ };
6
+ }
7
+ export {
8
+ r as buildFormatLongFn
9
+ };
10
+ //# sourceMappingURL=index362.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index362.js","sources":["../../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js"],"sourcesContent":["export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n"],"names":["buildFormatLongFn","args","options","width"],"mappings":"AAAO,SAASA,EAAkBC,GAAM;AACtC,SAAO,CAACC,IAAU,OAAO;AAEvB,UAAMC,IAAQD,EAAQ,QAAQ,OAAOA,EAAQ,KAAK,IAAID,EAAK;AAE3D,WADeA,EAAK,QAAQE,CAAK,KAAKF,EAAK,QAAQA,EAAK,YAAY;AAAA,EAEtE;AACF;","x_google_ignoreList":[0]}
package/dist/index37.js CHANGED
@@ -1,190 +1,31 @@
1
- import { MAX_DIAL_CODE_LENGTH as W, COMMON_IDD_PREFIXES as $, DEFAULT_COUNTRY as x, COUNTRY_DIAL_CODES as C } from "./index36.js";
2
- import { getCountryCallingCode as p } from "./index40.js";
3
- import { AsYouType as I } from "./index73.js";
4
- import { validatePhoneNumberLength as D } from "./index74.js";
5
- function g(t) {
6
- return t.replace(/\D/g, "");
7
- }
8
- function P(t) {
9
- return t ? t.length > W ? !1 : C.some((e) => e.startsWith(t)) : !0;
10
- }
11
- const N = /[\u061C\u200B-\u200F\u202A-\u202E\u2066-\u2069\uFEFF]/g;
12
- function T(t) {
13
- return t.replace(N, "");
14
- }
15
- function q(t, e, s = {}) {
16
- const { force: u = !1 } = s, o = `+${e}`;
17
- if (!t.startsWith(o) || !u)
18
- return t;
19
- const i = t.slice(o.length).trimStart();
20
- if (i.startsWith("0"))
21
- return t;
22
- if (!i)
23
- return `${o} 0`;
24
- const [n, ...r] = i.split(" "), f = `0${n ?? ""}`, l = r.length > 0 ? ` ${r.join(" ")}` : "";
25
- return `${o} ${f}${l}`.replace(/\s\s+/g, " ").trimEnd();
26
- }
27
- const O = {
28
- GG: "GB",
29
- JE: "GB",
30
- IM: "GB"
31
- };
32
- function y(t) {
33
- if (t)
34
- return O[t] ?? t;
35
- }
36
- function _(t, e, s) {
37
- if (!t || !s || (t.nationalNumber ?? "").length < 4)
38
- return;
39
- const o = t.countryCallingCode;
40
- if (!o)
41
- return;
42
- const i = t.getMetadata, n = (typeof i == "function" ? i() : null)?.country_calling_codes?.[o];
43
- if (!n || n.length === 0)
44
- return;
45
- const r = [];
46
- for (const f of n) {
47
- const l = y(f);
48
- l && !r.includes(l) && r.push(l);
1
+ class s {
2
+ constructor() {
3
+ this.states = [], this.currentIndex = 0;
49
4
  }
50
- if (r.length !== 0)
51
- return e && r.includes(e) ? e : r.includes(x) ? x : r[0];
52
- }
53
- function B(t, e, s, u) {
54
- if (!t)
55
- return !1;
56
- if (!u)
57
- return t.startsWith("0");
58
- if (!s || !t.startsWith(s) || !t.slice(s.length).startsWith("0"))
59
- return !1;
60
- const o = t.slice(s.length + 1), i = e.startsWith(s) ? e.slice(s.length) : e;
61
- return o === i;
62
- }
63
- function S(t) {
64
- for (const e of $)
65
- if (t.startsWith(e))
66
- return t.slice(e.length);
67
- return t;
68
- }
69
- function M(t, e, s = {}) {
70
- const { allowJustPlus: u = !1, removeNationalPrefix: o = !0, previousValue: i } = s, n = T(t).trim();
71
- if (!n)
72
- return "";
73
- if (n === "+")
74
- return u ? "+" : "";
75
- if (n.startsWith("+")) {
76
- const a = g(n);
77
- if (!a)
78
- return u ? "+" : "";
79
- const d = S(a);
80
- if (d !== a)
81
- return d ? `+${d}` : u ? "+" : "";
82
- if (o && e) {
83
- const h = p(e);
84
- if (a.startsWith(h) && a.slice(h.length).startsWith("0")) {
85
- const E = a.slice(h.length + 1);
86
- return E ? `+${h}${E}` : `+${h}`;
87
- }
88
- }
89
- return `+${a}`;
5
+ get currentState() {
6
+ return this.states[this.currentIndex];
90
7
  }
91
- const r = g(n);
92
- if (!r)
93
- return "";
94
- const f = S(r);
95
- if (f !== r)
96
- return f ? `+${f}` : u ? "+" : "";
97
- const l = typeof i == "string" ? i : "", m = l && l.startsWith("+") ? g(l) : "";
98
- if (m && m.length > r.length && m.endsWith(r) && m.length - r.length <= W)
99
- return `+${r}`;
100
- if (r === "0")
101
- return "0";
102
- if (o && e && r.length > 1 && r.startsWith("0") && !r.startsWith("00")) {
103
- const a = p(e), d = r.slice(1);
104
- return d ? `+${a}${d}` : `+${a}`;
8
+ get isEmpty() {
9
+ return this.states.length === 0;
105
10
  }
106
- return e ? r.length <= 4 ? `+${r}` : `+${p(e)}${r}` : r;
107
- }
108
- function Y(t, e) {
109
- if (t === "+")
110
- return {
111
- international: "+",
112
- national: "",
113
- formatted: "+",
114
- phoneNumber: null,
115
- detectedCountry: void 0,
116
- inferredCountry: void 0,
117
- hasExplicitInternationalPrefix: !0
118
- };
119
- const s = /^\s*\+/.test(t), u = e ? new I(e) : new I(), o = u.input(t), i = u.getNumber(), c = g(t), n = y(
120
- i?.country ?? u.country ?? void 0
121
- ), r = n ?? !i ? void 0 : y(
122
- _(i, e, c)
123
- ), f = i?.formatInternational() ?? o, l = i?.formatNational() ?? g(f);
124
- return {
125
- international: f,
126
- national: l,
127
- formatted: o,
128
- phoneNumber: i,
129
- detectedCountry: n,
130
- inferredCountry: r,
131
- hasExplicitInternationalPrefix: s
132
- };
133
- }
134
- function v(t, e) {
135
- return t.startsWith(e) ? t.slice(e.length) : t;
136
- }
137
- function H(t, e) {
138
- if (!e || !t)
139
- return null;
140
- try {
141
- return D(t, e) === "TOO_LONG" ? "TOO_LONG" : null;
142
- } catch {
143
- return null;
11
+ push(t) {
12
+ this.currentIndex < this.states.length - 1 && (this.states.length = this.currentIndex + 1), this.states.push(t), this.states.length > s.MAX_LENGTH && this.states.shift(), this.currentIndex = this.states.length - 1;
144
13
  }
145
- }
146
- function U(t, e, s, u = {}) {
147
- const {
148
- hasRemovedNationalPrefix: o = !1,
149
- detectedCountry: i,
150
- hasExplicitInternationalPrefix: c = !1
151
- } = u;
152
- if (!t)
153
- return { shouldSuggest: !1, query: "" };
154
- if (t === "+")
155
- return { shouldSuggest: !0, query: "" };
156
- const n = g(t);
157
- if (!n)
158
- return { shouldSuggest: !0, query: "" };
159
- if (o)
160
- return { shouldSuggest: !1, query: "" };
161
- if (c && !i)
162
- return P(n) ? { shouldSuggest: !0, query: n } : { shouldSuggest: !1, query: "" };
163
- let r = s?.countryCallingCode ?? null;
164
- if (!r) {
165
- if (e) {
166
- const l = p(e);
167
- n.startsWith(l) && (r = l);
168
- } else if (!c)
169
- return { shouldSuggest: !1, query: "" };
14
+ go(t) {
15
+ return this.currentIndex = Math.min(Math.max(this.currentIndex + t, 0), this.states.length - 1), this.currentState;
16
+ }
17
+ undo() {
18
+ return this.go(-1);
19
+ }
20
+ redo() {
21
+ return this.go(1);
22
+ }
23
+ clear() {
24
+ this.states.length = 0, this.currentIndex = 0;
170
25
  }
171
- return r ? v(n, r).length === 0 ? { shouldSuggest: !0, query: n } : { shouldSuggest: !1, query: "" } : { shouldSuggest: !0, query: n };
172
- }
173
- function V(t, e) {
174
- if (t.shouldSuggest)
175
- return !1;
176
- const { hasExplicitInternationalPrefix: s = !1, detectedCountry: u } = e;
177
- return s ? !!u : !0;
178
26
  }
27
+ s.MAX_LENGTH = 100;
179
28
  export {
180
- B as detectNationalPrefixForDisplay,
181
- Y as formatWithAsYouType,
182
- H as getLengthIssue,
183
- U as getSuggestionState,
184
- q as injectNationalPrefixDisplay,
185
- M as normalizeInputValue,
186
- g as sanitizeDigits,
187
- V as shouldDisplayExplicitCountrySelection,
188
- v as stripPrefix
29
+ s as default
189
30
  };
190
31
  //# sourceMappingURL=index37.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index37.js","sources":["../src/components/PhoneNumberInput/normalization.ts"],"sourcesContent":["import type { CountryCode } from \"libphonenumber-js\"\nimport { AsYouType, getCountryCallingCode, validatePhoneNumberLength } from \"libphonenumber-js\"\n\nimport {\n COMMON_IDD_PREFIXES,\n COUNTRY_DIAL_CODES,\n DEFAULT_COUNTRY,\n MAX_DIAL_CODE_LENGTH,\n} from \"./country-options\"\n\n\nexport type LengthIssue = \"TOO_LONG\"\n\nexport function sanitizeDigits(value: string) {\n return value.replace(/\\D/g, \"\")\n}\n\nfunction isDialCodeProgress(digits: string) {\n if (!digits) {\n return true\n }\n\n if (digits.length > MAX_DIAL_CODE_LENGTH) {\n return false\n }\n\n return COUNTRY_DIAL_CODES.some((dial) => dial.startsWith(digits))\n}\n\nconst INVISIBLE_FORMATTING_CHARACTERS =\n /[\\u061C\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF]/g\n\nfunction stripInvisibleFormatting(value: string) {\n return value.replace(INVISIBLE_FORMATTING_CHARACTERS, \"\")\n}\n\nexport function injectNationalPrefixDisplay(\n international: string,\n dialCode: string,\n options: { force?: boolean } = {}\n) {\n // Preserve a user-typed national trunk (e.g. the French \"0\") purely for display\n // so validation can continue to use the canonical E.164 representation internally.\n const { force = false } = options\n const prefix = `+${dialCode}`\n\n if (!international.startsWith(prefix)) {\n return international\n }\n\n if (!force) {\n return international\n }\n\n const remainder = international.slice(prefix.length).trimStart()\n const alreadyHasTrunk = remainder.startsWith(\"0\")\n\n if (alreadyHasTrunk) {\n return international\n }\n\n if (!remainder) {\n return `${prefix} 0`\n }\n\n const [firstGroup, ...restGroups] = remainder.split(\" \")\n const rebuiltFirstGroup = `0${firstGroup ?? \"\"}`\n const rebuiltRemainder = restGroups.length > 0 ? ` ${restGroups.join(\" \")}` : \"\"\n\n return `${prefix} ${rebuiltFirstGroup}${rebuiltRemainder}`.replace(/\\s\\s+/g, \" \").trimEnd()\n}\n\nconst DETECTED_COUNTRY_OVERRIDES: Partial<Record<CountryCode, CountryCode>> = {\n GG: \"GB\",\n JE: \"GB\",\n IM: \"GB\",\n}\n\nfunction canonicalizeDetectedCountry(candidate: CountryCode | undefined): CountryCode | undefined {\n if (!candidate) {\n return undefined\n }\n return DETECTED_COUNTRY_OVERRIDES[candidate] ?? candidate\n}\n\ntype AsYouTypeNumber = ReturnType<AsYouType[\"getNumber\"]>\n\nfunction inferCountryFromDialCode(\n phoneNumber: AsYouTypeNumber,\n baseCountry: CountryCode | undefined,\n normalizedDigits: string\n): CountryCode | undefined {\n if (!phoneNumber) {\n return undefined\n }\n\n if (!normalizedDigits) {\n return undefined\n }\n\n const nationalDigits = phoneNumber.nationalNumber ?? \"\"\n if (nationalDigits.length < 4) {\n return undefined\n }\n\n const dial = phoneNumber.countryCallingCode\n if (!dial) {\n return undefined\n }\n\n const metadataGetter = (phoneNumber as unknown as { getMetadata?: () => unknown }).getMetadata\n const metadata =\n typeof metadataGetter === \"function\"\n ? (metadataGetter() as {\n country_calling_codes?: Record<string, string[]>\n } | null)\n : null\n\n const candidates = metadata?.country_calling_codes?.[dial]\n if (!candidates || candidates.length === 0) {\n return undefined\n }\n\n const canonicalCandidates: CountryCode[] = []\n for (const candidate of candidates) {\n const canonical = canonicalizeDetectedCountry(candidate as CountryCode)\n if (canonical && !canonicalCandidates.includes(canonical)) {\n canonicalCandidates.push(canonical)\n }\n }\n\n if (canonicalCandidates.length === 0) {\n return undefined\n }\n\n if (baseCountry && canonicalCandidates.includes(baseCountry)) {\n return baseCountry\n }\n\n if (canonicalCandidates.includes(DEFAULT_COUNTRY)) {\n return DEFAULT_COUNTRY\n }\n\n return canonicalCandidates[0]\n}\n\nexport function detectNationalPrefixForDisplay(\n rawDigits: string,\n internationalDigits: string,\n dialCode: string,\n hasExplicitInternationalPrefix: boolean\n) {\n if (!rawDigits) {\n return false\n }\n\n if (!hasExplicitInternationalPrefix) {\n return rawDigits.startsWith(\"0\")\n }\n\n if (!dialCode) {\n return false\n }\n\n if (!rawDigits.startsWith(dialCode)) {\n return false\n }\n\n if (!rawDigits.slice(dialCode.length).startsWith(\"0\")) {\n return false\n }\n\n const rawAfterTrunk = rawDigits.slice(dialCode.length + 1)\n const internationalAfterDial = internationalDigits.startsWith(dialCode)\n ? internationalDigits.slice(dialCode.length)\n : internationalDigits\n\n return rawAfterTrunk === internationalAfterDial\n}\n\nfunction stripIddPrefix(digits: string) {\n for (const prefix of COMMON_IDD_PREFIXES) {\n if (digits.startsWith(prefix)) {\n return digits.slice(prefix.length)\n }\n }\n return digits\n}\n\nexport function normalizeInputValue(\n rawValue: string,\n country: CountryCode | undefined,\n options: {\n allowJustPlus?: boolean\n removeNationalPrefix?: boolean\n previousValue?: string\n } = {}\n) {\n const { allowJustPlus = false, removeNationalPrefix = true, previousValue } = options\n const cleaned = stripInvisibleFormatting(rawValue)\n const trimmed = cleaned.trim()\n\n if (!trimmed) {\n return \"\"\n }\n\n if (trimmed === \"+\") {\n return allowJustPlus ? \"+\" : \"\"\n }\n\n if (trimmed.startsWith(\"+\")) {\n const digits = sanitizeDigits(trimmed)\n if (!digits) {\n return allowJustPlus ? \"+\" : \"\"\n }\n const digitsWithoutIdd = stripIddPrefix(digits)\n if (digitsWithoutIdd !== digits) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : allowJustPlus ? \"+\" : \"\"\n }\n if (removeNationalPrefix && country) {\n const dial = getCountryCallingCode(country)\n if (digits.startsWith(dial) && digits.slice(dial.length).startsWith(\"0\")) {\n const withoutPrefix = digits.slice(dial.length + 1)\n return withoutPrefix ? `+${dial}${withoutPrefix}` : `+${dial}`\n }\n }\n return `+${digits}`\n }\n\n const digitsOnly = sanitizeDigits(trimmed)\n if (!digitsOnly) {\n return \"\"\n }\n\n const digitsWithoutIdd = stripIddPrefix(digitsOnly)\n if (digitsWithoutIdd !== digitsOnly) {\n return digitsWithoutIdd ? `+${digitsWithoutIdd}` : allowJustPlus ? \"+\" : \"\"\n }\n\n const previousNormalized = typeof previousValue === \"string\" ? previousValue : \"\"\n const previousDigits =\n previousNormalized && previousNormalized.startsWith(\"+\")\n ? sanitizeDigits(previousNormalized)\n : \"\"\n\n if (previousDigits && previousDigits.length > digitsOnly.length) {\n if (previousDigits.endsWith(digitsOnly)) {\n const removedPrefixLength = previousDigits.length - digitsOnly.length\n if (removedPrefixLength <= MAX_DIAL_CODE_LENGTH) {\n return `+${digitsOnly}`\n }\n }\n }\n\n if (digitsOnly === \"0\") {\n return \"0\"\n }\n\n if (\n removeNationalPrefix &&\n country &&\n digitsOnly.length > 1 &&\n digitsOnly.startsWith(\"0\") &&\n !digitsOnly.startsWith(\"00\")\n ) {\n const dial = getCountryCallingCode(country)\n const withoutPrefix = digitsOnly.slice(1)\n return withoutPrefix ? `+${dial}${withoutPrefix}` : `+${dial}`\n }\n\n if (!country) {\n return digitsOnly\n }\n\n if (digitsOnly.length <= 4) {\n return `+${digitsOnly}`\n }\n\n const dial = getCountryCallingCode(country)\n return `+${dial}${digitsOnly}`\n}\n\nexport function formatWithAsYouType(value: string, baseCountry?: CountryCode) {\n if (value === \"+\") {\n return {\n international: \"+\",\n national: \"\",\n formatted: \"+\",\n phoneNumber: null,\n detectedCountry: undefined,\n inferredCountry: undefined,\n hasExplicitInternationalPrefix: true,\n }\n }\n\n const hasExplicitInternationalPrefix = /^\\s*\\+/.test(value)\n const formatter = baseCountry ? new AsYouType(baseCountry) : new AsYouType()\n const formatted = formatter.input(value)\n const phoneNumber = formatter.getNumber()\n const digits = sanitizeDigits(value)\n const detectedCountry = canonicalizeDetectedCountry(\n (phoneNumber?.country ?? formatter.country ?? undefined) as CountryCode | undefined\n )\n const inferredCountry =\n detectedCountry ?? !phoneNumber\n ? undefined\n : canonicalizeDetectedCountry(\n inferCountryFromDialCode(phoneNumber, baseCountry, digits)\n )\n\n const international = phoneNumber?.formatInternational() ?? formatted\n const national = phoneNumber?.formatNational() ?? sanitizeDigits(international)\n\n return {\n international,\n national,\n formatted,\n phoneNumber,\n detectedCountry,\n inferredCountry,\n hasExplicitInternationalPrefix,\n }\n}\n\nexport function stripPrefix(value: string, prefix: string) {\n return value.startsWith(prefix) ? value.slice(prefix.length) : value\n}\n\nexport function getLengthIssue(value: string, country: CountryCode | undefined): LengthIssue | null {\n if (!country || !value) {\n return null\n }\n\n try {\n const result = validatePhoneNumberLength(value, country)\n return result === \"TOO_LONG\" ? \"TOO_LONG\" : null\n } catch {\n return null\n }\n}\n\ntype SuggestionState = {\n shouldSuggest: boolean\n query: string\n}\n\nexport function getSuggestionState(\n normalized: string,\n baseCountry: CountryCode | undefined,\n phoneNumber: ReturnType<AsYouType[\"getNumber\"]>,\n options: {\n hasRemovedNationalPrefix?: boolean\n detectedCountry?: CountryCode\n hasExplicitInternationalPrefix?: boolean\n } = {}\n): SuggestionState {\n const {\n hasRemovedNationalPrefix = false,\n detectedCountry,\n hasExplicitInternationalPrefix = false,\n } = options\n\n if (!normalized) {\n return { shouldSuggest: false, query: \"\" }\n }\n\n if (normalized === \"+\") {\n return { shouldSuggest: true, query: \"\" }\n }\n\n const digits = sanitizeDigits(normalized)\n if (!digits) {\n return { shouldSuggest: true, query: \"\" }\n }\n\n if (hasRemovedNationalPrefix) {\n return { shouldSuggest: false, query: \"\" }\n }\n\n if (hasExplicitInternationalPrefix && !detectedCountry) {\n if (!isDialCodeProgress(digits)) {\n return { shouldSuggest: false, query: \"\" }\n }\n return { shouldSuggest: true, query: digits }\n }\n\n let dial = phoneNumber?.countryCallingCode ?? null\n if (!dial) {\n if (baseCountry) {\n const baseDial = getCountryCallingCode(baseCountry)\n if (digits.startsWith(baseDial)) {\n dial = baseDial\n }\n } else if (!hasExplicitInternationalPrefix) {\n return { shouldSuggest: false, query: \"\" }\n }\n }\n\n if (!dial) {\n return { shouldSuggest: true, query: digits }\n }\n\n const nationalDigits = stripPrefix(digits, dial)\n if (nationalDigits.length === 0) {\n return { shouldSuggest: true, query: digits }\n }\n\n return { shouldSuggest: false, query: \"\" }\n}\n\nexport function shouldDisplayExplicitCountrySelection(\n suggestion: SuggestionState,\n options: { detectedCountry?: CountryCode; hasExplicitInternationalPrefix?: boolean }\n) {\n if (suggestion.shouldSuggest) {\n return false\n }\n\n const { hasExplicitInternationalPrefix = false, detectedCountry } = options\n\n if (!hasExplicitInternationalPrefix) {\n return true\n }\n\n return Boolean(detectedCountry)\n}\n"],"names":["sanitizeDigits","value","isDialCodeProgress","digits","MAX_DIAL_CODE_LENGTH","COUNTRY_DIAL_CODES","dial","INVISIBLE_FORMATTING_CHARACTERS","stripInvisibleFormatting","injectNationalPrefixDisplay","international","dialCode","options","force","prefix","remainder","firstGroup","restGroups","rebuiltFirstGroup","rebuiltRemainder","DETECTED_COUNTRY_OVERRIDES","canonicalizeDetectedCountry","candidate","inferCountryFromDialCode","phoneNumber","baseCountry","normalizedDigits","metadataGetter","candidates","canonicalCandidates","canonical","DEFAULT_COUNTRY","detectNationalPrefixForDisplay","rawDigits","internationalDigits","hasExplicitInternationalPrefix","rawAfterTrunk","internationalAfterDial","stripIddPrefix","COMMON_IDD_PREFIXES","normalizeInputValue","rawValue","country","allowJustPlus","removeNationalPrefix","previousValue","trimmed","digitsWithoutIdd","getCountryCallingCode","withoutPrefix","digitsOnly","previousNormalized","previousDigits","formatWithAsYouType","formatter","AsYouType","formatted","detectedCountry","inferredCountry","national","stripPrefix","getLengthIssue","validatePhoneNumberLength","getSuggestionState","normalized","hasRemovedNationalPrefix","baseDial","shouldDisplayExplicitCountrySelection","suggestion"],"mappings":";;;;AAaO,SAASA,EAAeC,GAAe;AAC5C,SAAOA,EAAM,QAAQ,OAAO,EAAE;AAChC;AAEA,SAASC,EAAmBC,GAAgB;AAC1C,SAAKA,IAIDA,EAAO,SAASC,IACX,KAGFC,EAAmB,KAAK,CAACC,MAASA,EAAK,WAAWH,CAAM,CAAC,IAPvD;AAQX;AAEA,MAAMI,IACJ;AAEF,SAASC,EAAyBP,GAAe;AAC/C,SAAOA,EAAM,QAAQM,GAAiC,EAAE;AAC1D;AAEO,SAASE,EACdC,GACAC,GACAC,IAA+B,CAAA,GAC/B;AAGA,QAAM,EAAE,OAAAC,IAAQ,GAAA,IAAUD,GACpBE,IAAS,IAAIH,CAAQ;AAM3B,MAJI,CAACD,EAAc,WAAWI,CAAM,KAIhC,CAACD;AACH,WAAOH;AAGT,QAAMK,IAAYL,EAAc,MAAMI,EAAO,MAAM,EAAE,UAAA;AAGrD,MAFwBC,EAAU,WAAW,GAAG;AAG9C,WAAOL;AAGT,MAAI,CAACK;AACH,WAAO,GAAGD,CAAM;AAGlB,QAAM,CAACE,GAAY,GAAGC,CAAU,IAAIF,EAAU,MAAM,GAAG,GACjDG,IAAoB,IAAIF,KAAc,EAAE,IACxCG,IAAmBF,EAAW,SAAS,IAAI,IAAIA,EAAW,KAAK,GAAG,CAAC,KAAK;AAE9E,SAAO,GAAGH,CAAM,IAAII,CAAiB,GAAGC,CAAgB,GAAG,QAAQ,UAAU,GAAG,EAAE,QAAA;AACpF;AAEA,MAAMC,IAAwE;AAAA,EAC5E,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kBsD,EAAYzD,GAAQG,CAAI,EAC5B,WAAW,IACrB,EAAE,eAAe,IAAM,OAAOH,EAAA,IAGhC,EAAE,eAAe,IAAO,OAAO,GAAA,IAR7B,EAAE,eAAe,IAAM,OAAOA,EAAA;AASzC;AAEO,SAASgE,EACdC,GACAxD,GACA;AACA,MAAIwD,EAAW;AACb,WAAO;AAGT,QAAM,EAAE,gCAAAjC,IAAiC,IAAO,iBAAAsB,EAAA,IAAoB7C;AAEpE,SAAKuB,IAIE,EAAQsB,IAHN;AAIX;"}
1
+ {"version":3,"file":"index37.js","sources":["../../../node_modules/imask/esm/controls/input-history.js"],"sourcesContent":["class InputHistory {\n constructor() {\n this.states = [];\n this.currentIndex = 0;\n }\n get currentState() {\n return this.states[this.currentIndex];\n }\n get isEmpty() {\n return this.states.length === 0;\n }\n push(state) {\n // if current index points before the last element then remove the future\n if (this.currentIndex < this.states.length - 1) this.states.length = this.currentIndex + 1;\n this.states.push(state);\n if (this.states.length > InputHistory.MAX_LENGTH) this.states.shift();\n this.currentIndex = this.states.length - 1;\n }\n go(steps) {\n this.currentIndex = Math.min(Math.max(this.currentIndex + steps, 0), this.states.length - 1);\n return this.currentState;\n }\n undo() {\n return this.go(-1);\n }\n redo() {\n return this.go(+1);\n }\n clear() {\n this.states.length = 0;\n this.currentIndex = 0;\n }\n}\nInputHistory.MAX_LENGTH = 100;\n\nexport { InputHistory as default };\n"],"names":["InputHistory","state","steps"],"mappings":"AAAA,MAAMA,EAAa;AAAA,EACjB,cAAc;AACZ,SAAK,SAAS,CAAA,GACd,KAAK,eAAe;AAAA,EACtB;AAAA,EACA,IAAI,eAAe;AACjB,WAAO,KAAK,OAAO,KAAK,YAAY;AAAA,EACtC;AAAA,EACA,IAAI,UAAU;AACZ,WAAO,KAAK,OAAO,WAAW;AAAA,EAChC;AAAA,EACA,KAAKC,GAAO;AAEV,IAAI,KAAK,eAAe,KAAK,OAAO,SAAS,MAAG,KAAK,OAAO,SAAS,KAAK,eAAe,IACzF,KAAK,OAAO,KAAKA,CAAK,GAClB,KAAK,OAAO,SAASD,EAAa,cAAY,KAAK,OAAO,MAAK,GACnE,KAAK,eAAe,KAAK,OAAO,SAAS;AAAA,EAC3C;AAAA,EACA,GAAGE,GAAO;AACR,gBAAK,eAAe,KAAK,IAAI,KAAK,IAAI,KAAK,eAAeA,GAAO,CAAC,GAAG,KAAK,OAAO,SAAS,CAAC,GACpF,KAAK;AAAA,EACd;AAAA,EACA,OAAO;AACL,WAAO,KAAK,GAAG,EAAE;AAAA,EACnB;AAAA,EACA,OAAO;AACL,WAAO,KAAK,GAAG,CAAE;AAAA,EACnB;AAAA,EACA,QAAQ;AACN,SAAK,OAAO,SAAS,GACrB,KAAK,eAAe;AAAA,EACtB;AACF;AACAF,EAAa,aAAa;","x_google_ignoreList":[0]}