@rpcbase/ui 0.159.0 → 0.160.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 (507) hide show
  1. package/dist/components/HoursPicker/index.d.ts +9 -6
  2. package/dist/components/HoursPicker/index.d.ts.map +1 -1
  3. package/dist/components/Select/index.d.ts.map +1 -1
  4. package/dist/index.js +32 -31
  5. package/dist/index100.js +105 -126
  6. package/dist/index100.js.map +1 -1
  7. package/dist/index101.js +24 -20
  8. package/dist/index101.js.map +1 -1
  9. package/dist/index102.js +8 -76
  10. package/dist/index102.js.map +1 -1
  11. package/dist/index103.js +4 -18
  12. package/dist/index103.js.map +1 -1
  13. package/dist/index104.js +5 -101
  14. package/dist/index104.js.map +1 -1
  15. package/dist/index105.js +5 -5
  16. package/dist/index105.js.map +1 -1
  17. package/dist/index106.js +466 -14
  18. package/dist/index106.js.map +1 -1
  19. package/dist/index107.js +186 -2
  20. package/dist/index107.js.map +1 -1
  21. package/dist/index108.js +107 -7
  22. package/dist/index108.js.map +1 -1
  23. package/dist/index109.js +241 -305
  24. package/dist/index109.js.map +1 -1
  25. package/dist/index110.js +9 -49
  26. package/dist/index110.js.map +1 -1
  27. package/dist/index111.js +42 -5
  28. package/dist/index111.js.map +1 -1
  29. package/dist/index112.js +4 -68
  30. package/dist/index112.js.map +1 -1
  31. package/dist/index113.js +52 -2
  32. package/dist/index113.js.map +1 -1
  33. package/dist/index114.js +4 -363
  34. package/dist/index114.js.map +1 -1
  35. package/dist/index115.js +4 -261
  36. package/dist/index115.js.map +1 -1
  37. package/dist/index116.js +15 -60
  38. package/dist/index116.js.map +1 -1
  39. package/dist/index117.js +5 -46
  40. package/dist/index117.js.map +1 -1
  41. package/dist/index118.js +7 -169
  42. package/dist/index118.js.map +1 -1
  43. package/dist/index119.js +16 -109
  44. package/dist/index119.js.map +1 -1
  45. package/dist/index120.js +4 -24
  46. package/dist/index120.js.map +1 -1
  47. package/dist/index121.js +5 -8
  48. package/dist/index121.js.map +1 -1
  49. package/dist/index122.js +5 -4
  50. package/dist/index122.js.map +1 -1
  51. package/dist/index123.js +5 -5
  52. package/dist/index123.js.map +1 -1
  53. package/dist/index124.js +3 -3
  54. package/dist/index124.js.map +1 -1
  55. package/dist/index125.js +4 -466
  56. package/dist/index125.js.map +1 -1
  57. package/dist/index126.js +6 -185
  58. package/dist/index126.js.map +1 -1
  59. package/dist/index127.js +24 -107
  60. package/dist/index127.js.map +1 -1
  61. package/dist/index128.js +6 -262
  62. package/dist/index128.js.map +1 -1
  63. package/dist/index129.js +4 -9
  64. package/dist/index129.js.map +1 -1
  65. package/dist/index130.js +6 -42
  66. package/dist/index130.js.map +1 -1
  67. package/dist/index131.js +5 -4
  68. package/dist/index131.js.map +1 -1
  69. package/dist/index132.js +5 -52
  70. package/dist/index132.js.map +1 -1
  71. package/dist/index133.js +5 -4
  72. package/dist/index133.js.map +1 -1
  73. package/dist/index134.js +3 -3
  74. package/dist/index134.js.map +1 -1
  75. package/dist/index135.js +6 -13
  76. package/dist/index135.js.map +1 -1
  77. package/dist/index136.js +4 -4
  78. package/dist/index136.js.map +1 -1
  79. package/dist/index137.js +4 -7
  80. package/dist/index137.js.map +1 -1
  81. package/dist/index138.js +4 -16
  82. package/dist/index138.js.map +1 -1
  83. package/dist/index139.js +6 -4
  84. package/dist/index139.js.map +1 -1
  85. package/dist/index140.js +145 -4
  86. package/dist/index140.js.map +1 -1
  87. package/dist/index141.js +39 -5
  88. package/dist/index141.js.map +1 -1
  89. package/dist/index142.js +4 -5
  90. package/dist/index142.js.map +1 -1
  91. package/dist/index143.js +7 -4
  92. package/dist/index143.js.map +1 -1
  93. package/dist/index144.js +13 -4
  94. package/dist/index144.js.map +1 -1
  95. package/dist/index145.js +13 -6
  96. package/dist/index145.js.map +1 -1
  97. package/dist/index146.js +7 -24
  98. package/dist/index146.js.map +1 -1
  99. package/dist/index147.js +31 -6
  100. package/dist/index147.js.map +1 -1
  101. package/dist/index148.js +10 -4
  102. package/dist/index148.js.map +1 -1
  103. package/dist/index149.js +10 -6
  104. package/dist/index149.js.map +1 -1
  105. package/dist/index150.js +8 -5
  106. package/dist/index150.js.map +1 -1
  107. package/dist/index151.js +13 -4
  108. package/dist/index151.js.map +1 -1
  109. package/dist/index152.js +101 -5
  110. package/dist/index152.js.map +1 -1
  111. package/dist/index153.js +20 -5
  112. package/dist/index153.js.map +1 -1
  113. package/dist/index154.js +53 -8
  114. package/dist/index154.js.map +1 -1
  115. package/dist/index155.js +72 -5
  116. package/dist/index155.js.map +1 -1
  117. package/dist/index156.js +9 -4
  118. package/dist/index156.js.map +1 -1
  119. package/dist/index157.js +20 -4
  120. package/dist/index157.js.map +1 -1
  121. package/dist/index158.js +16 -6
  122. package/dist/index158.js.map +1 -1
  123. package/dist/index159.js +23 -145
  124. package/dist/index159.js.map +1 -1
  125. package/dist/index160.js +6 -39
  126. package/dist/index160.js.map +1 -1
  127. package/dist/index161.js +5 -4
  128. package/dist/index161.js.map +1 -1
  129. package/dist/index162.js +23 -7
  130. package/dist/index162.js.map +1 -1
  131. package/dist/index163.js +35 -14
  132. package/dist/index163.js.map +1 -1
  133. package/dist/index164.js +16 -14
  134. package/dist/index164.js.map +1 -1
  135. package/dist/index165.js +6 -7
  136. package/dist/index165.js.map +1 -1
  137. package/dist/index166.js +4 -31
  138. package/dist/index166.js.map +1 -1
  139. package/dist/index167.js +4 -10
  140. package/dist/index167.js.map +1 -1
  141. package/dist/index168.js +4 -10
  142. package/dist/index168.js.map +1 -1
  143. package/dist/index169.js +4 -8
  144. package/dist/index169.js.map +1 -1
  145. package/dist/index170.js +3 -13
  146. package/dist/index170.js.map +1 -1
  147. package/dist/index171.js +6 -101
  148. package/dist/index171.js.map +1 -1
  149. package/dist/index172.js +24 -20
  150. package/dist/index172.js.map +1 -1
  151. package/dist/index173.js +7 -53
  152. package/dist/index173.js.map +1 -1
  153. package/dist/index174.js +6 -72
  154. package/dist/index174.js.map +1 -1
  155. package/dist/index175.js +5 -9
  156. package/dist/index175.js.map +1 -1
  157. package/dist/index176.js +3 -20
  158. package/dist/index176.js.map +1 -1
  159. package/dist/index177.js +3 -16
  160. package/dist/index177.js.map +1 -1
  161. package/dist/index178.js +4 -23
  162. package/dist/index178.js.map +1 -1
  163. package/dist/index179.js +3 -6
  164. package/dist/index179.js.map +1 -1
  165. package/dist/index18.js +475 -465
  166. package/dist/index18.js.map +1 -1
  167. package/dist/index180.js +4 -5
  168. package/dist/index180.js.map +1 -1
  169. package/dist/index181.js +3 -23
  170. package/dist/index181.js.map +1 -1
  171. package/dist/index182.js +4 -35
  172. package/dist/index182.js.map +1 -1
  173. package/dist/index183.js +4 -16
  174. package/dist/index183.js.map +1 -1
  175. package/dist/index184.js +3 -6
  176. package/dist/index184.js.map +1 -1
  177. package/dist/index185.js +33 -4
  178. package/dist/index185.js.map +1 -1
  179. package/dist/index186.js +249 -4
  180. package/dist/index186.js.map +1 -1
  181. package/dist/index187.js +114 -4
  182. package/dist/index187.js.map +1 -1
  183. package/dist/index188.js +219 -4
  184. package/dist/index188.js.map +1 -1
  185. package/dist/index189.js +66 -3
  186. package/dist/index189.js.map +1 -1
  187. package/dist/index190.js +20 -6
  188. package/dist/index190.js.map +1 -1
  189. package/dist/index191.js +210 -24
  190. package/dist/index191.js.map +1 -1
  191. package/dist/index192.js +319 -7
  192. package/dist/index192.js.map +1 -1
  193. package/dist/index193.js +130 -6
  194. package/dist/index193.js.map +1 -1
  195. package/dist/index194.js +20 -5
  196. package/dist/index194.js.map +1 -1
  197. package/dist/index195.js +75 -3
  198. package/dist/index195.js.map +1 -1
  199. package/dist/index196.js +18 -3
  200. package/dist/index196.js.map +1 -1
  201. package/dist/index197.js +101 -4
  202. package/dist/index197.js.map +1 -1
  203. package/dist/index198.js +5 -4
  204. package/dist/index198.js.map +1 -1
  205. package/dist/index199.js +14 -4
  206. package/dist/index199.js.map +1 -1
  207. package/dist/index20.js +113 -105
  208. package/dist/index20.js.map +1 -1
  209. package/dist/index200.js +2 -4
  210. package/dist/index200.js.map +1 -1
  211. package/dist/index201.js +7 -3
  212. package/dist/index201.js.map +1 -1
  213. package/dist/index202.js +326 -3
  214. package/dist/index202.js.map +1 -1
  215. package/dist/index203.js +46 -602
  216. package/dist/index203.js.map +1 -1
  217. package/dist/index205.js +3 -3
  218. package/dist/index206.js +3 -3
  219. package/dist/index209.js +1 -1
  220. package/dist/index210.js +1 -1
  221. package/dist/index215.js +63 -60
  222. package/dist/index215.js.map +1 -1
  223. package/dist/index216.js +179 -47
  224. package/dist/index216.js.map +1 -1
  225. package/dist/index217.js +46 -39
  226. package/dist/index217.js.map +1 -1
  227. package/dist/index218.js +13 -100
  228. package/dist/index218.js.map +1 -1
  229. package/dist/index219.js +151 -94
  230. package/dist/index219.js.map +1 -1
  231. package/dist/index220.js +27 -96
  232. package/dist/index220.js.map +1 -1
  233. package/dist/index221.js +9 -13
  234. package/dist/index221.js.map +1 -1
  235. package/dist/index222.js +40 -147
  236. package/dist/index222.js.map +1 -1
  237. package/dist/index223.js +10 -29
  238. package/dist/index223.js.map +1 -1
  239. package/dist/index224.js +44 -9
  240. package/dist/index224.js.map +1 -1
  241. package/dist/index225.js +88 -40
  242. package/dist/index225.js.map +1 -1
  243. package/dist/index226.js +85 -10
  244. package/dist/index226.js.map +1 -1
  245. package/dist/index227.js +102 -41
  246. package/dist/index227.js.map +1 -1
  247. package/dist/index228.js +45 -88
  248. package/dist/index228.js.map +1 -1
  249. package/dist/index229.js +10 -85
  250. package/dist/index229.js.map +1 -1
  251. package/dist/index230.js +28 -96
  252. package/dist/index230.js.map +1 -1
  253. package/dist/index231.js +8 -52
  254. package/dist/index231.js.map +1 -1
  255. package/dist/index232.js +115 -10
  256. package/dist/index232.js.map +1 -1
  257. package/dist/index233.js +16 -36
  258. package/dist/index233.js.map +1 -1
  259. package/dist/index234.js +15 -8
  260. package/dist/index234.js.map +1 -1
  261. package/dist/index235.js +3 -116
  262. package/dist/index235.js.map +1 -1
  263. package/dist/index236.js +35 -16
  264. package/dist/index236.js.map +1 -1
  265. package/dist/index237.js +19 -14
  266. package/dist/index237.js.map +1 -1
  267. package/dist/index238.js +9 -3
  268. package/dist/index238.js.map +1 -1
  269. package/dist/index239.js +8 -36
  270. package/dist/index239.js.map +1 -1
  271. package/dist/index240.js +58 -20
  272. package/dist/index240.js.map +1 -1
  273. package/dist/index241.js +8 -9
  274. package/dist/index241.js.map +1 -1
  275. package/dist/index242.js +66 -8
  276. package/dist/index242.js.map +1 -1
  277. package/dist/index243.js +18 -18
  278. package/dist/index243.js.map +1 -1
  279. package/dist/index244.js +15 -27
  280. package/dist/index244.js.map +1 -1
  281. package/dist/index245.js +4 -15
  282. package/dist/index245.js.map +1 -1
  283. package/dist/index246.js +4 -57
  284. package/dist/index246.js.map +1 -1
  285. package/dist/index247.js +6 -8
  286. package/dist/index247.js.map +1 -1
  287. package/dist/index248.js +4 -66
  288. package/dist/index248.js.map +1 -1
  289. package/dist/index249.js +7 -19
  290. package/dist/index249.js.map +1 -1
  291. package/dist/index250.js +17 -16
  292. package/dist/index250.js.map +1 -1
  293. package/dist/index251.js +5 -5
  294. package/dist/index251.js.map +1 -1
  295. package/dist/index252.js +5 -5
  296. package/dist/index252.js.map +1 -1
  297. package/dist/index253.js +13 -6
  298. package/dist/index253.js.map +1 -1
  299. package/dist/index254.js +10 -4
  300. package/dist/index254.js.map +1 -1
  301. package/dist/index255.js +14 -7
  302. package/dist/index255.js.map +1 -1
  303. package/dist/index256.js +14 -17
  304. package/dist/index256.js.map +1 -1
  305. package/dist/index257.js +5 -5
  306. package/dist/index257.js.map +1 -1
  307. package/dist/index258.js +6 -5
  308. package/dist/index258.js.map +1 -1
  309. package/dist/index259.js +7 -13
  310. package/dist/index259.js.map +1 -1
  311. package/dist/index260.js +5 -9
  312. package/dist/index260.js.map +1 -1
  313. package/dist/index261.js +9 -14
  314. package/dist/index261.js.map +1 -1
  315. package/dist/index262.js +5 -14
  316. package/dist/index262.js.map +1 -1
  317. package/dist/index263.js +5 -5
  318. package/dist/index263.js.map +1 -1
  319. package/dist/index264.js +9 -6
  320. package/dist/index264.js.map +1 -1
  321. package/dist/index265.js +5 -7
  322. package/dist/index265.js.map +1 -1
  323. package/dist/index266.js +5 -6
  324. package/dist/index266.js.map +1 -1
  325. package/dist/index267.js +4 -9
  326. package/dist/index267.js.map +1 -1
  327. package/dist/index268.js +11 -5
  328. package/dist/index268.js.map +1 -1
  329. package/dist/index269.js +10 -5
  330. package/dist/index269.js.map +1 -1
  331. package/dist/index270.js +10 -9
  332. package/dist/index270.js.map +1 -1
  333. package/dist/index271.js +11 -5
  334. package/dist/index271.js.map +1 -1
  335. package/dist/index272.js +11 -5
  336. package/dist/index272.js.map +1 -1
  337. package/dist/index273.js +10 -4
  338. package/dist/index273.js.map +1 -1
  339. package/dist/index274.js +7 -11
  340. package/dist/index274.js.map +1 -1
  341. package/dist/index275.js +6 -10
  342. package/dist/index275.js.map +1 -1
  343. package/dist/index276.js +5 -10
  344. package/dist/index276.js.map +1 -1
  345. package/dist/index277.js +6 -11
  346. package/dist/index277.js.map +1 -1
  347. package/dist/index278.js +6 -10
  348. package/dist/index278.js.map +1 -1
  349. package/dist/index279.js +6 -10
  350. package/dist/index279.js.map +1 -1
  351. package/dist/index280.js +55 -7
  352. package/dist/index280.js.map +1 -1
  353. package/dist/index281.js +19 -6
  354. package/dist/index281.js.map +1 -1
  355. package/dist/index282.js +28 -5
  356. package/dist/index282.js.map +1 -1
  357. package/dist/index283.js +16 -6
  358. package/dist/index283.js.map +1 -1
  359. package/dist/index284.js +23 -7
  360. package/dist/index284.js.map +1 -1
  361. package/dist/index285.js +16 -6
  362. package/dist/index285.js.map +1 -1
  363. package/dist/index286.js +7 -55
  364. package/dist/index286.js.map +1 -1
  365. package/dist/index287.js +10 -23
  366. package/dist/index287.js.map +1 -1
  367. package/dist/index288.js +9 -15
  368. package/dist/index288.js.map +1 -1
  369. package/dist/index289.js +21 -7
  370. package/dist/index289.js.map +1 -1
  371. package/dist/index29.js +1 -1
  372. package/dist/index290.js +10 -10
  373. package/dist/index290.js.map +1 -1
  374. package/dist/index291.js +9 -10
  375. package/dist/index291.js.map +1 -1
  376. package/dist/index292.js +9 -21
  377. package/dist/index292.js.map +1 -1
  378. package/dist/index293.js +4 -10
  379. package/dist/index293.js.map +1 -1
  380. package/dist/index294.js +5 -9
  381. package/dist/index294.js.map +1 -1
  382. package/dist/index295.js +16 -9
  383. package/dist/index295.js.map +1 -1
  384. package/dist/index296.js +9 -4
  385. package/dist/index296.js.map +1 -1
  386. package/dist/index297.js +18 -5
  387. package/dist/index297.js.map +1 -1
  388. package/dist/index298.js +15 -16
  389. package/dist/index298.js.map +1 -1
  390. package/dist/index299.js +12 -9
  391. package/dist/index299.js.map +1 -1
  392. package/dist/index30.js +14 -14
  393. package/dist/index300.js +29 -18
  394. package/dist/index300.js.map +1 -1
  395. package/dist/index301.js +12 -15
  396. package/dist/index301.js.map +1 -1
  397. package/dist/index302.js +25 -12
  398. package/dist/index302.js.map +1 -1
  399. package/dist/index303.js +5 -29
  400. package/dist/index303.js.map +1 -1
  401. package/dist/index304.js +62 -10
  402. package/dist/index304.js.map +1 -1
  403. package/dist/index305.js +48 -25
  404. package/dist/index305.js.map +1 -1
  405. package/dist/index306.js +39 -5
  406. package/dist/index306.js.map +1 -1
  407. package/dist/index307.js +98 -65
  408. package/dist/index307.js.map +1 -1
  409. package/dist/index308.js +94 -177
  410. package/dist/index308.js.map +1 -1
  411. package/dist/index309.js +98 -45
  412. package/dist/index309.js.map +1 -1
  413. package/dist/index31.js +3 -3
  414. package/dist/index310.js +2 -5
  415. package/dist/index310.js.map +1 -1
  416. package/dist/index311.js +2 -3
  417. package/dist/index311.js.map +1 -1
  418. package/dist/index312.js +5 -24
  419. package/dist/index312.js.map +1 -1
  420. package/dist/index313.js +3 -113
  421. package/dist/index313.js.map +1 -1
  422. package/dist/index314.js +23 -15
  423. package/dist/index314.js.map +1 -1
  424. package/dist/index315.js +107 -519
  425. package/dist/index315.js.map +1 -1
  426. package/dist/index316.js +14 -126
  427. package/dist/index316.js.map +1 -1
  428. package/dist/index317.js +516 -125
  429. package/dist/index317.js.map +1 -1
  430. package/dist/index318.js +128 -2
  431. package/dist/index318.js.map +1 -1
  432. package/dist/index319.js +134 -2
  433. package/dist/index319.js.map +1 -1
  434. package/dist/index32.js +2 -2
  435. package/dist/index320.js +1 -1
  436. package/dist/index325.js +2 -2
  437. package/dist/index326.js +1 -1
  438. package/dist/index33.js +1 -1
  439. package/dist/index336.js +2 -2
  440. package/dist/index339.js +1 -1
  441. package/dist/index34.js +1 -1
  442. package/dist/index340.js +2 -2
  443. package/dist/index342.js +1 -1
  444. package/dist/index343.js +1 -1
  445. package/dist/index344.js +1 -1
  446. package/dist/index345.js +1 -1
  447. package/dist/index35.js +1 -1
  448. package/dist/index355.js +11 -21
  449. package/dist/index355.js.map +1 -1
  450. package/dist/index356.js +26 -11
  451. package/dist/index356.js.map +1 -1
  452. package/dist/index357.js +4 -27
  453. package/dist/index357.js.map +1 -1
  454. package/dist/index358.js +22 -4
  455. package/dist/index358.js.map +1 -1
  456. package/dist/index36.js +1 -1
  457. package/dist/index39.js +2 -2
  458. package/dist/index40.js +24 -24
  459. package/dist/index42.js +1 -1
  460. package/dist/index50.js +2 -2
  461. package/dist/index55.js +1 -1
  462. package/dist/index56.js +1 -1
  463. package/dist/index59.js +1 -1
  464. package/dist/index66.js +4 -4
  465. package/dist/index68.js +1 -1
  466. package/dist/index77.js +1 -1
  467. package/dist/index78.js +53 -11
  468. package/dist/index78.js.map +1 -1
  469. package/dist/index79.js +1 -1
  470. package/dist/index80.js +2 -2
  471. package/dist/index81.js +2 -2
  472. package/dist/index82.js +12 -2
  473. package/dist/index82.js.map +1 -1
  474. package/dist/index83.js +2 -2
  475. package/dist/index84.js +2 -47
  476. package/dist/index84.js.map +1 -1
  477. package/dist/index85.js +41 -200
  478. package/dist/index85.js.map +1 -1
  479. package/dist/index86.js +204 -20
  480. package/dist/index86.js.map +1 -1
  481. package/dist/index87.js +22 -25
  482. package/dist/index87.js.map +1 -1
  483. package/dist/index88.js +23 -398
  484. package/dist/index88.js.map +1 -1
  485. package/dist/index89.js +392 -39
  486. package/dist/index89.js.map +1 -1
  487. package/dist/index90.js +44 -51
  488. package/dist/index90.js.map +1 -1
  489. package/dist/index91.js +605 -3
  490. package/dist/index91.js.map +1 -1
  491. package/dist/index92.js +5 -33
  492. package/dist/index92.js.map +1 -1
  493. package/dist/index93.js +65 -246
  494. package/dist/index93.js.map +1 -1
  495. package/dist/index94.js +2 -115
  496. package/dist/index94.js.map +1 -1
  497. package/dist/index95.js +359 -215
  498. package/dist/index95.js.map +1 -1
  499. package/dist/index96.js +257 -62
  500. package/dist/index96.js.map +1 -1
  501. package/dist/index97.js +58 -18
  502. package/dist/index97.js.map +1 -1
  503. package/dist/index98.js +44 -207
  504. package/dist/index98.js.map +1 -1
  505. package/dist/index99.js +159 -309
  506. package/dist/index99.js.map +1 -1
  507. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index216.js","sources":["../../../node_modules/imask/esm/core/action-details.js"],"sourcesContent":["import { DIRECTION } from './utils.js';\n\n/** Provides details of changing input */\nclass ActionDetails {\n /** Current input value */\n\n /** Current cursor position */\n\n /** Old input value */\n\n /** Old selection */\n\n constructor(opts) {\n Object.assign(this, opts);\n\n // double check if left part was changed (autofilling, other non-standard input triggers)\n while (this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos)) {\n --this.oldSelection.start;\n }\n if (this.insertedCount) {\n // double check right part\n while (this.value.slice(this.cursorPos) !== this.oldValue.slice(this.oldSelection.end)) {\n if (this.value.length - this.cursorPos < this.oldValue.length - this.oldSelection.end) ++this.oldSelection.end;else ++this.cursorPos;\n }\n }\n }\n\n /** Start changing position */\n get startChangePos() {\n return Math.min(this.cursorPos, this.oldSelection.start);\n }\n\n /** Inserted symbols count */\n get insertedCount() {\n return this.cursorPos - this.startChangePos;\n }\n\n /** Inserted symbols */\n get inserted() {\n return this.value.substr(this.startChangePos, this.insertedCount);\n }\n\n /** Removed symbols count */\n get removedCount() {\n // Math.max for opposite operation\n return Math.max(this.oldSelection.end - this.startChangePos ||\n // for Delete\n this.oldValue.length - this.value.length, 0);\n }\n\n /** Removed symbols */\n get removed() {\n return this.oldValue.substr(this.startChangePos, this.removedCount);\n }\n\n /** Unchanged head symbols */\n get head() {\n return this.value.substring(0, this.startChangePos);\n }\n\n /** Unchanged tail symbols */\n get tail() {\n return this.value.substring(this.startChangePos + this.insertedCount);\n }\n\n /** Remove direction */\n get removeDirection() {\n if (!this.removedCount || this.insertedCount) return DIRECTION.NONE;\n\n // align right if delete at right\n return (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) &&\n // if not range removed (event with backspace)\n this.oldSelection.end === this.oldSelection.start ? DIRECTION.RIGHT : DIRECTION.LEFT;\n }\n}\n\nexport { ActionDetails as default };\n"],"names":["ActionDetails","opts","DIRECTION"],"mappings":";AAGA,MAAMA,EAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EASlB,YAAYC,GAAM;AAIhB,SAHA,OAAO,OAAO,MAAMA,CAAI,GAGjB,KAAK,MAAM,MAAM,GAAG,KAAK,cAAc,MAAM,KAAK,SAAS,MAAM,GAAG,KAAK,cAAc;AAC5F,QAAE,KAAK,aAAa;AAEtB,QAAI,KAAK;AAEP,aAAO,KAAK,MAAM,MAAM,KAAK,SAAS,MAAM,KAAK,SAAS,MAAM,KAAK,aAAa,GAAG;AACnF,QAAI,KAAK,MAAM,SAAS,KAAK,YAAY,KAAK,SAAS,SAAS,KAAK,aAAa,MAAK,EAAE,KAAK,aAAa,MAAS,EAAE,KAAK;AAAA,EAGjI;AAAA;AAAA,EAGA,IAAI,iBAAiB;AACnB,WAAO,KAAK,IAAI,KAAK,WAAW,KAAK,aAAa,KAAK;AAAA,EACzD;AAAA;AAAA,EAGA,IAAI,gBAAgB;AAClB,WAAO,KAAK,YAAY,KAAK;AAAA,EAC/B;AAAA;AAAA,EAGA,IAAI,WAAW;AACb,WAAO,KAAK,MAAM,OAAO,KAAK,gBAAgB,KAAK,aAAa;AAAA,EAClE;AAAA;AAAA,EAGA,IAAI,eAAe;AAEjB,WAAO,KAAK,IAAI,KAAK,aAAa,MAAM,KAAK;AAAA,IAE7C,KAAK,SAAS,SAAS,KAAK,MAAM,QAAQ,CAAC;AAAA,EAC7C;AAAA;AAAA,EAGA,IAAI,UAAU;AACZ,WAAO,KAAK,SAAS,OAAO,KAAK,gBAAgB,KAAK,YAAY;AAAA,EACpE;AAAA;AAAA,EAGA,IAAI,OAAO;AACT,WAAO,KAAK,MAAM,UAAU,GAAG,KAAK,cAAc;AAAA,EACpD;AAAA;AAAA,EAGA,IAAI,OAAO;AACT,WAAO,KAAK,MAAM,UAAU,KAAK,iBAAiB,KAAK,aAAa;AAAA,EACtE;AAAA;AAAA,EAGA,IAAI,kBAAkB;AACpB,WAAI,CAAC,KAAK,gBAAgB,KAAK,gBAAsBC,EAAU,QAGvD,KAAK,aAAa,QAAQ,KAAK,aAAa,KAAK,aAAa,UAAU,KAAK;AAAA,IAErF,KAAK,aAAa,QAAQ,KAAK,aAAa,QAAQA,EAAU,QAAQA,EAAU;AAAA,EAClF;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index216.js","sources":["../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","node","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";;;;;;;;;;;AAcA,IAAIA,IAAc,iCACdC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAI,GAClDC,IAAa,oBACb,CAACC,GAAYC,GAAeC,CAAqB,IAAIC,EAAiBJ,CAAU,GAChF,CAACK,GAA+BC,EAA2B,IAAIC;AAAA,EACjEP;AAAA,EACA,CAACG,CAAqB;AACxB,GACI,CAACK,IAAqBC,EAAqB,IAAIJ,EAA8BL,CAAU,GACvFU,IAAmBC,EAAM;AAAA,EAC3B,CAACC,GAAOC,MACiBC,gBAAAA,MAAIb,EAAW,UAAU,EAAE,OAAOW,EAAM,yBAAyB,UAA0BE,gBAAAA,MAAIb,EAAW,MAAM,EAAE,OAAOW,EAAM,yBAAyB,UAA0BE,gBAAAA,EAAAA,IAAIC,IAAsB,EAAE,GAAGH,GAAO,KAAKC,GAAc,EAAC,CAAE,EAAC,CAAE;AAE5Q;AACAH,EAAiB,cAAcV;AAC/B,IAAIe,KAAuBJ,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACnE,QAAM;AAAA,IACJ,yBAAAG;AAAA,IACA,aAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,KAAAC;AAAA,IACA,kBAAkBC;AAAA,IAClB,yBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,cAAAC;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AS0D,CAAG,MACtE,EAAA1D,MAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAAS0D,CAAG;AACzE,WAAOF,GAAwBE,CAAG;AACpC;AACA,SAASpB,EAAWqB,GAAYC,IAAgB,IAAO;AACrD,QAAMC,IAA6B,SAAS;AAC5C,aAAWC,KAAaH;AAGtB,QAFIG,MAAcD,MAClBC,EAAU,MAAM,EAAE,eAAAF,GAAe,GAC7B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAO1E,GACP2E,KAAO5B;","x_google_ignoreList":[0]}
package/dist/index217.js CHANGED
@@ -1,43 +1,50 @@
1
- class h {
2
- /** Tail value as string */
3
- /** Tail start position */
4
- /** Start position */
5
- constructor(t, i, s) {
6
- t === void 0 && (t = ""), i === void 0 && (i = 0), this.value = t, this.from = i, this.stop = s;
7
- }
8
- toString() {
9
- return this.value;
10
- }
11
- extend(t) {
12
- this.value += String(t);
13
- }
14
- appendTo(t) {
15
- return t.append(this.toString(), {
16
- tail: !0
17
- }).aggregate(t._appendPlaceholder());
18
- }
19
- get state() {
20
- return {
21
- value: this.value,
22
- from: this.from,
23
- stop: this.stop
24
- };
25
- }
26
- set state(t) {
27
- Object.assign(this, t);
28
- }
29
- unshift(t) {
30
- if (!this.value.length || t != null && this.from >= t) return "";
31
- const i = this.value[0];
32
- return this.value = this.value.slice(1), i;
33
- }
34
- shift() {
35
- if (!this.value.length) return "";
36
- const t = this.value[this.value.length - 1];
37
- return this.value = this.value.slice(0, -1), t;
38
- }
1
+ import * as l from "react";
2
+ import { composeRefs as m } from "./index60.js";
3
+ import { j as u } from "./index28.js";
4
+ // @__NO_SIDE_EFFECTS__
5
+ function x(e) {
6
+ const r = /* @__PURE__ */ y(e), t = l.forwardRef((o, n) => {
7
+ const { children: i, ...c } = o, s = l.Children.toArray(i), a = s.find(g);
8
+ if (a) {
9
+ const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
10
+ return /* @__PURE__ */ u.jsx(r, { ...c, ref: n, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
11
+ }
12
+ return /* @__PURE__ */ u.jsx(r, { ...c, ref: n, children: i });
13
+ });
14
+ return t.displayName = `${e}.Slot`, t;
15
+ }
16
+ // @__NO_SIDE_EFFECTS__
17
+ function y(e) {
18
+ const r = l.forwardRef((t, o) => {
19
+ const { children: n, ...i } = t;
20
+ if (l.isValidElement(n)) {
21
+ const c = R(n), s = C(i, n.props);
22
+ return n.type !== l.Fragment && (s.ref = o ? m(o, c) : c), l.cloneElement(n, s);
23
+ }
24
+ return l.Children.count(n) > 1 ? l.Children.only(null) : null;
25
+ });
26
+ return r.displayName = `${e}.SlotClone`, r;
27
+ }
28
+ var E = /* @__PURE__ */ Symbol("radix.slottable");
29
+ function g(e) {
30
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === E;
31
+ }
32
+ function C(e, r) {
33
+ const t = { ...r };
34
+ for (const o in r) {
35
+ const n = e[o], i = r[o];
36
+ /^on[A-Z]/.test(o) ? n && i ? t[o] = (...s) => {
37
+ const a = i(...s);
38
+ return n(...s), a;
39
+ } : n && (t[o] = n) : o === "style" ? t[o] = { ...n, ...i } : o === "className" && (t[o] = [n, i].filter(Boolean).join(" "));
40
+ }
41
+ return { ...e, ...t };
42
+ }
43
+ function R(e) {
44
+ let r = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning;
45
+ return t ? e.ref : (r = Object.getOwnPropertyDescriptor(e, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
39
46
  }
40
47
  export {
41
- h as default
48
+ x as createSlot
42
49
  };
43
50
  //# sourceMappingURL=index217.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index217.js","sources":["../../../node_modules/imask/esm/core/continuous-tail-details.js"],"sourcesContent":["/** Provides details of continuous extracted tail */\nclass ContinuousTailDetails {\n /** Tail value as string */\n\n /** Tail start position */\n\n /** Start position */\n\n constructor(value, from, stop) {\n if (value === void 0) {\n value = '';\n }\n if (from === void 0) {\n from = 0;\n }\n this.value = value;\n this.from = from;\n this.stop = stop;\n }\n toString() {\n return this.value;\n }\n extend(tail) {\n this.value += String(tail);\n }\n appendTo(masked) {\n return masked.append(this.toString(), {\n tail: true\n }).aggregate(masked._appendPlaceholder());\n }\n get state() {\n return {\n value: this.value,\n from: this.from,\n stop: this.stop\n };\n }\n set state(state) {\n Object.assign(this, state);\n }\n unshift(beforePos) {\n if (!this.value.length || beforePos != null && this.from >= beforePos) return '';\n const shiftChar = this.value[0];\n this.value = this.value.slice(1);\n return shiftChar;\n }\n shift() {\n if (!this.value.length) return '';\n const shiftChar = this.value[this.value.length - 1];\n this.value = this.value.slice(0, -1);\n return shiftChar;\n }\n}\n\nexport { ContinuousTailDetails as default };\n"],"names":["ContinuousTailDetails","value","from","stop","tail","masked","state","beforePos","shiftChar"],"mappings":"AACA,MAAMA,EAAsB;AAAA;AAAA;AAAA;AAAA,EAO1B,YAAYC,GAAOC,GAAMC,GAAM;AAC7B,IAAIF,MAAU,WACZA,IAAQ,KAENC,MAAS,WACXA,IAAO,IAET,KAAK,QAAQD,GACb,KAAK,OAAOC,GACZ,KAAK,OAAOC;AAAA,EACd;AAAA,EACA,WAAW;AACT,WAAO,KAAK;AAAA,EACd;AAAA,EACA,OAAOC,GAAM;AACX,SAAK,SAAS,OAAOA,CAAI;AAAA,EAC3B;AAAA,EACA,SAASC,GAAQ;AACf,WAAOA,EAAO,OAAO,KAAK,SAAQ,GAAI;AAAA,MACpC,MAAM;AAAA,IACZ,CAAK,EAAE,UAAUA,EAAO,oBAAoB;AAAA,EAC1C;AAAA,EACA,IAAI,QAAQ;AACV,WAAO;AAAA,MACL,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,IACjB;AAAA,EACE;AAAA,EACA,IAAI,MAAMC,GAAO;AACf,WAAO,OAAO,MAAMA,CAAK;AAAA,EAC3B;AAAA,EACA,QAAQC,GAAW;AACjB,QAAI,CAAC,KAAK,MAAM,UAAUA,KAAa,QAAQ,KAAK,QAAQA,EAAW,QAAO;AAC9E,UAAMC,IAAY,KAAK,MAAM,CAAC;AAC9B,gBAAK,QAAQ,KAAK,MAAM,MAAM,CAAC,GACxBA;AAAA,EACT;AAAA,EACA,QAAQ;AACN,QAAI,CAAC,KAAK,MAAM,OAAQ,QAAO;AAC/B,UAAMA,IAAY,KAAK,MAAM,KAAK,MAAM,SAAS,CAAC;AAClD,gBAAK,QAAQ,KAAK,MAAM,MAAM,GAAG,EAAE,GAC5BA;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index217.js","sources":["../../../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAAM,SAAS,MAAMQ,CAAU,IAAI,IAAUR,EAAM,SAAS,KAAK,IAAI,IAClEA,EAAM,eAAeQ,CAAU,IAAIA,EAAW,MAAM,WAAW,OAE/DE,CAEV;AACD,aAAuBC,gBAAAA,EAAAA,IAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF,GAAc,UAAUF,EAAM,eAAeQ,CAAU,IAAIR,EAAM,aAAaQ,GAAY,QAAQC,C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C;AAAA,IACT,IACSH,MACTF,EAAcC,CAAQ,IAAIC,KAEnBD,MAAa,UACtBD,EAAcC,CAAQ,IAAI,EAAE,GAAGC,GAAe,GAAGC,EAAc,IACtDF,MAAa,gBACtBD,EAAcC,CAAQ,IAAI,CAACC,GAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAEtF;AACA,SAAO,EAAE,GAAGlB,GAAW,GAAGe,EAAa;AACzC;AACA,SAASN,EAAcY,GAAS;AAC9B,MAAIC,IAAS,OAAO,yBAAyBD,EAAQ,OAAO,KAAK,GAAG,KAChEE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIC,IACKF,EAAQ,OAEjBC,IAAS,OAAO,yBAAyBD,GAAS,KAAK,GAAG,KAC1DE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDC,IACKF,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
package/dist/index218.js CHANGED
@@ -1,104 +1,17 @@
1
- import p from "./index92.js";
2
- import { isString as g } from "./index215.js";
3
- import c from "./index217.js";
4
- import u from "./index91.js";
5
- class r {
6
- /** */
7
- constructor(t, s) {
8
- t === void 0 && (t = []), s === void 0 && (s = 0), this.chunks = t, this.from = s;
9
- }
10
- toString() {
11
- return this.chunks.map(String).join("");
12
- }
13
- extend(t) {
14
- if (!String(t)) return;
15
- t = g(t) ? new c(String(t)) : t;
16
- const s = this.chunks[this.chunks.length - 1], n = s && // if stops are same or tail has no stop
17
- (s.stop === t.stop || t.stop == null) && // if tail chunk goes just after last chunk
18
- t.from === s.from + s.toString().length;
19
- if (t instanceof c)
20
- n ? s.extend(t.toString()) : this.chunks.push(t);
21
- else if (t instanceof r) {
22
- if (t.stop == null) {
23
- let e;
24
- for (; t.chunks.length && t.chunks[0].stop == null; )
25
- e = t.chunks.shift(), e.from += t.from, this.extend(e);
26
- }
27
- t.toString() && (t.stop = t.blockIndex, this.chunks.push(t));
28
- }
29
- }
30
- appendTo(t) {
31
- if (!(t instanceof u.MaskedPattern))
32
- return new c(this.toString()).appendTo(t);
33
- const s = new p();
34
- for (let n = 0; n < this.chunks.length; ++n) {
35
- const e = this.chunks[n], i = t._mapPosToBlock(t.displayValue.length), o = e.stop;
36
- let h;
37
- if (o != null && // if block not found or stop is behind lastBlock
38
- (!i || i.index <= o) && ((e instanceof r || // for continuous block also check if stop is exist
39
- t._stops.indexOf(o) >= 0) && s.aggregate(t._appendPlaceholder(o)), h = e instanceof r && t._blocks[o]), h) {
40
- const f = h.appendTail(e);
41
- s.aggregate(f);
42
- const l = e.toString().slice(f.rawInserted.length);
43
- l && s.aggregate(t.append(l, {
44
- tail: !0
45
- }));
46
- } else
47
- s.aggregate(t.append(e.toString(), {
48
- tail: !0
49
- }));
50
- }
51
- return s;
52
- }
53
- get state() {
54
- return {
55
- chunks: this.chunks.map((t) => t.state),
56
- from: this.from,
57
- stop: this.stop,
58
- blockIndex: this.blockIndex
59
- };
60
- }
61
- set state(t) {
62
- const {
63
- chunks: s,
64
- ...n
65
- } = t;
66
- Object.assign(this, n), this.chunks = s.map((e) => {
67
- const i = "chunks" in e ? new r() : new c();
68
- return i.state = e, i;
69
- });
70
- }
71
- unshift(t) {
72
- if (!this.chunks.length || t != null && this.from >= t) return "";
73
- const s = t != null ? t - this.from : t;
74
- let n = 0;
75
- for (; n < this.chunks.length; ) {
76
- const e = this.chunks[n], i = e.unshift(s);
77
- if (e.toString()) {
78
- if (!i) break;
79
- ++n;
80
- } else
81
- this.chunks.splice(n, 1);
82
- if (i) return i;
83
- }
84
- return "";
85
- }
86
- shift() {
87
- if (!this.chunks.length) return "";
88
- let t = this.chunks.length - 1;
89
- for (; 0 <= t; ) {
90
- const s = this.chunks[t], n = s.shift();
91
- if (s.toString()) {
92
- if (!n) break;
93
- --t;
94
- } else
95
- this.chunks.splice(t, 1);
96
- if (n) return n;
97
- }
98
- return "";
99
- }
1
+ import h from "./index106.js";
2
+ function L(i, r, u) {
3
+ return s(i, r, void 0, u);
4
+ }
5
+ function s(i, r, u, e) {
6
+ r && (e = new h(e.metadata), e.selectNumberingPlan(r));
7
+ var f = e.type(u), n = f && f.possibleLengths() || e.possibleLengths();
8
+ if (!n)
9
+ return "IS_POSSIBLE";
10
+ var t = i.length, l = n[0];
11
+ return l === t ? "IS_POSSIBLE" : l > t ? "TOO_SHORT" : n[n.length - 1] < t ? "TOO_LONG" : n.indexOf(t, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
100
12
  }
101
13
  export {
102
- r as default
14
+ s as checkNumberLengthForType,
15
+ L as default
103
16
  };
104
17
  //# sourceMappingURL=index218.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index218.js","sources":["../../../node_modules/imask/esm/masked/pattern/chunk-tail-details.js"],"sourcesContent":["import ChangeDetails from '../../core/change-details.js';\nimport { isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\nimport IMask from '../../core/holder.js';\n\nclass ChunksTailDetails {\n /** */\n\n constructor(chunks, from) {\n if (chunks === void 0) {\n chunks = [];\n }\n if (from === void 0) {\n from = 0;\n }\n this.chunks = chunks;\n this.from = from;\n }\n toString() {\n return this.chunks.map(String).join('');\n }\n extend(tailChunk) {\n if (!String(tailChunk)) return;\n tailChunk = isString(tailChunk) ? new ContinuousTailDetails(String(tailChunk)) : tailChunk;\n const lastChunk = this.chunks[this.chunks.length - 1];\n const extendLast = lastChunk && (\n // if stops are same or tail has no stop\n lastChunk.stop === tailChunk.stop || tailChunk.stop == null) &&\n // if tail chunk goes just after last chunk\n tailChunk.from === lastChunk.from + lastChunk.toString().length;\n if (tailChunk instanceof ContinuousTailDetails) {\n // check the ability to extend previous chunk\n if (extendLast) {\n // extend previous chunk\n lastChunk.extend(tailChunk.toString());\n } else {\n // append new chunk\n this.chunks.push(tailChunk);\n }\n } else if (tailChunk instanceof ChunksTailDetails) {\n if (tailChunk.stop == null) {\n // unwrap floating chunks to parent, keeping `from` pos\n let firstTailChunk;\n while (tailChunk.chunks.length && tailChunk.chunks[0].stop == null) {\n firstTailChunk = tailChunk.chunks.shift(); // not possible to be `undefined` because length was checked above\n firstTailChunk.from += tailChunk.from;\n this.extend(firstTailChunk);\n }\n }\n\n // if tail chunk still has value\n if (tailChunk.toString()) {\n // if chunks contains stops, then popup stop to container\n tailChunk.stop = tailChunk.blockIndex;\n this.chunks.push(tailChunk);\n }\n }\n }\n appendTo(masked) {\n if (!(masked instanceof IMask.MaskedPattern)) {\n const tail = new ContinuousTailDetails(this.toString());\n return tail.appendTo(masked);\n }\n const details = new ChangeDetails();\n for (let ci = 0; ci < this.chunks.length; ++ci) {\n const chunk = this.chunks[ci];\n const lastBlockIter = masked._mapPosToBlock(masked.displayValue.length);\n const stop = chunk.stop;\n let chunkBlock;\n if (stop != null && (\n // if block not found or stop is behind lastBlock\n !lastBlockIter || lastBlockIter.index <= stop)) {\n if (chunk instanceof ChunksTailDetails ||\n // for continuous block also check if stop is exist\n masked._stops.indexOf(stop) >= 0) {\n details.aggregate(masked._appendPlaceholder(stop));\n }\n chunkBlock = chunk instanceof ChunksTailDetails && masked._blocks[stop];\n }\n if (chunkBlock) {\n const tailDetails = chunkBlock.appendTail(chunk);\n details.aggregate(tailDetails);\n\n // get not inserted chars\n const remainChars = chunk.toString().slice(tailDetails.rawInserted.length);\n if (remainChars) details.aggregate(masked.append(remainChars, {\n tail: true\n }));\n } else {\n details.aggregate(masked.append(chunk.toString(), {\n tail: true\n }));\n }\n }\n return details;\n }\n get state() {\n return {\n chunks: this.chunks.map(c => c.state),\n from: this.from,\n stop: this.stop,\n blockIndex: this.blockIndex\n };\n }\n set state(state) {\n const {\n chunks,\n ...props\n } = state;\n Object.assign(this, props);\n this.chunks = chunks.map(cstate => {\n const chunk = \"chunks\" in cstate ? new ChunksTailDetails() : new ContinuousTailDetails();\n chunk.state = cstate;\n return chunk;\n });\n }\n unshift(beforePos) {\n if (!this.chunks.length || beforePos != null && this.from >= beforePos) return '';\n const chunkShiftPos = beforePos != null ? beforePos - this.from : beforePos;\n let ci = 0;\n while (ci < this.chunks.length) {\n const chunk = this.chunks[ci];\n const shiftChar = chunk.unshift(chunkShiftPos);\n if (chunk.toString()) {\n // chunk still contains value\n // but not shifted - means no more available chars to shift\n if (!shiftChar) break;\n ++ci;\n } else {\n // clean if chunk has no value\n this.chunks.splice(ci, 1);\n }\n if (shiftChar) return shiftChar;\n }\n return '';\n }\n shift() {\n if (!this.chunks.length) return '';\n let ci = this.chunks.length - 1;\n while (0 <= ci) {\n const chunk = this.chunks[ci];\n const shiftChar = chunk.shift();\n if (chunk.toString()) {\n // chunk still contains value\n // but not shifted - means no more available chars to shift\n if (!shiftChar) break;\n --ci;\n } else {\n // clean if chunk has no value\n this.chunks.splice(ci, 1);\n }\n if (shiftChar) return shiftChar;\n }\n return '';\n }\n}\n\nexport { ChunksTailDetails as default };\n"],"names":["ChunksTailDetails","chunks","from","tailChunk","isString","ContinuousTailDetails","lastChunk","extendLast","firstTailChunk","masked","IMask","details","ChangeDetails","ci","chunk","lastBlockIter","stop","chunkBlock","tailDetails","remainChars","c","state","props","cstate","beforePos","chunkShiftPos","shiftChar"],"mappings":";;;;AAKA,MAAMA,EAAkB;AAAA;AAAA,EAGtB,YAAYC,GAAQC,GAAM;AACxB,IAAID,MAAW,WACbA,IAAS,CAAA,IAEPC,MAAS,WACXA,IAAO,IAET,KAAK,SAASD,GACd,KAAK,OAAOC;AAAA,EACd;AAAA,EACA,WAAW;AACT,WAAO,KAAK,OAAO,IAAI,MAAM,EAAE,KAAK,EAAE;AAAA,EACxC;AAAA,EACA,OAAOC,GAAW;AAChB,QAAI,CAAC,OAAOA,CAAS,EAAG;AACxB,IAAAA,IAAYC,EAASD,CAAS,IAAI,IAAIE,EAAsB,OAAOF,CAAS,CAAC,IAAIA;AACjF,UAAMG,IAAY,KAAK,OAAO,KAAK,OAAO,SAAS,CAAC,GAC9CC,IAAaD;AAAA,KAEnBA,EA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EACA,QAAQ;AACN,QAAI,CAAC,KAAK,OAAO,OAAQ,QAAO;AAChC,QAAIb,IAAK,KAAK,OAAO,SAAS;AAC9B,WAAO,KAAKA,KAAI;AACd,YAAMC,IAAQ,KAAK,OAAOD,CAAE,GACtBa,IAAYZ,EAAM,MAAK;AAC7B,UAAIA,EAAM,YAAY;AAGpB,YAAI,CAACY,EAAW;AAChB,UAAEb;AAAA,MACJ;AAEE,aAAK,OAAO,OAAOA,GAAI,CAAC;AAE1B,UAAIa,EAAW,QAAOA;AAAA,IACxB;AACA,WAAO;AAAA,EACT;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index218.js","sources":["../../../node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js"],"sourcesContent":["import Metadata from '../metadata.js';\nimport mergeArrays from './mergeArrays.js';\nexport default function checkNumberLength(nationalNumber, country, metadata) {\n return checkNumberLengthForType(nationalNumber, country, undefined, metadata);\n}\n\n// Checks whether a number is possible for a certain `country` based on the number length.\n//\n// This function is not supported by metadata generated with ancient versions of\n// `libphonenumber-js` (before version `1.0.18`) which didn't include \"possible lengths\".\n//\n// There was also a known issue with `checkNumberLength()` function:\n// if a number is possible only in a certain `country` among several `countries`\n// that share the same \"country calling code\", that function would check\n// the possibility of the phone number only in the \"main\" `country` for the \"country calling code\"\n// and would not check if it's actually be possible in the speciifc `country`.\n//\n// For example, \"+1310xxxx\" numbers are valid in Canada.\n// However, they are not possible in the US due to being too short.\n// Since Canada and the US share the same country calling code — \"+1\" —\n// `checkNumberLength()` function used to return not \"IS_POSSIBLE\" for \"+1310xxxx\" numbers.\n//\n// In such cases, when using \"/max\" metadata, `isValid()` could output `true`\n// but at the same time `isPossible()` could output `false`, which was contradictory.\n//\n// See https://issuetracker.google.com/issues/335892662 for the discusson in Google's issues.\n//\n// The solution suggested by Google was implemented: an optional `country` argument\n// was added to `checkNumberLength()` function. If present, that `country` will be used\n// to check phone number length for that specific `country` rather than the \"main\" country\n// for the shared \"country calling code\".\n//\nexport function checkNumberLengthForType(nationalNumber, country, type, metadata) {\n // If the exact `country` is specified, it's no necessarily already selected in `metadata`.\n // Most likely, in cases when there're multiple countries corresponding to the same\n // \"country calling code\", the \"main\" country for that \"country calling code\" will be selected.\n if (country) {\n metadata = new Metadata(metadata.metadata);\n metadata.selectNumberingPlan(country);\n }\n var type_info = metadata.type(type);\n\n // There should always be \"<possiblePengths/>\" set for every type element.\n // This is declared in the XML schema.\n // For size efficiency, where a sub-description (e.g. fixed-line)\n // has the same \"<possiblePengths/>\" as the \"general description\", this is missing,\n // so we fall back to the \"general description\". Where no numbers of the type\n // exist at all, there is one possible length (-1) which is guaranteed\n // not to match the length of any real phone number.\n var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths();\n // let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()\n\n // Metadata before version `1.0.18` didn't contain `possible_lengths`.\n if (!possible_lengths) {\n return 'IS_POSSIBLE';\n }\n if (type === 'FIXED_LINE_OR_MOBILE') {\n // No such country in metadata.\n /* istanbul ignore next */\n if (!metadata.type('FIXED_LINE')) {\n // The rare case has been encountered where no fixedLine data is available\n // (true for some non-geographic entities), so we just check mobile.\n return checkNumberLengthForType(nationalNumber, country, 'MOBILE', metadata);\n }\n var mobile_type = metadata.type('MOBILE');\n if (mobile_type) {\n // Merge the mobile data in if there was any. \"Concat\" creates a new\n // array, it doesn't edit possible_lengths in place, so we don't need a copy.\n // Note that when adding the possible lengths from mobile, we have\n // to again check they aren't empty since if they are this indicates\n // they are the same as the general desc and should be obtained from there.\n possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());\n // The current list is sorted; we need to merge in the new list and\n // re-sort (duplicates are okay). Sorting isn't so expensive because\n // the lists are very small.\n\n // if (local_lengths) {\n // \tlocal_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())\n // } else {\n // \tlocal_lengths = mobile_type.possibleLengthsLocal()\n // }\n }\n }\n // If the type doesn't exist then return 'INVALID_LENGTH'.\n else if (type && !type_info) {\n return 'INVALID_LENGTH';\n }\n var actual_length = nationalNumber.length;\n\n // In `libphonenumber-js` all \"local-only\" formats are dropped for simplicity.\n // // This is safe because there is never an overlap beween the possible lengths\n // // and the local-only lengths; this is checked at build time.\n // if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)\n // {\n // \treturn 'IS_POSSIBLE_LOCAL_ONLY'\n // }\n\n var minimum_length = possible_lengths[0];\n if (minimum_length === actual_length) {\n return 'IS_POSSIBLE';\n }\n if (minimum_length > actual_length) {\n return 'TOO_SHORT';\n }\n if (possible_lengths[possible_lengths.length - 1] < actual_length) {\n return 'TOO_LONG';\n }\n\n // We skip the first element since we've already checked it.\n return possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';\n}\n//# sourceMappingURL=checkNumberLength.js.map"],"names":["checkNumberLength","nationalNumber","country","metadata","checkNumberLengthForType","type","Metadata","type_info","possible_lengths","actual_length","minimum_length"],"mappings":";AAEe,SAASA,EAAkBC,GAAgBC,GAASC,GAAU;AAC3E,SAAOC,EAAyBH,GAAgBC,GAAS,QAAWC,CAAQ;AAC9E;AA4BO,SAASC,EAAyBH,GAAgBC,GAASG,GAAMF,GAAU;AAIhF,EAAID,MACFC,IAAW,IAAIG,EAASH,EAAS,QAAQ,GACzCA,EAAS,oBAAoBD,CAAO;AAEtC,MAAIK,IAAYJ,EAAS,KAAKE,CAAI,GAS9BG,IAAmBD,KAAaA,EAAU,gBAAe,KAAMJ,EAAS,gBAAe;AAI3F,MAAI,CAACK;AACH,WAAO;AAiCT,MAAIC,IAAgBR,EAAe,QAU/BS,IAAiBF,EAAiB,CAAC;AACvC,SAAIE,MAAmBD,IACd,gBAELC,IAAiBD,IACZ,cAELD,EAAiBA,EAAiB,SAAS,CAAC,IAAIC,IAC3C,aAIFD,EAAiB,QAAQC,GAAe,CAAC,KAAK,IAAI,gBAAgB;AAC3E;","x_google_ignoreList":[0]}
package/dist/index219.js CHANGED
@@ -1,101 +1,158 @@
1
- import { DIRECTION as s } from "./index215.js";
2
- class f {
3
- constructor(t, e) {
4
- this.masked = t, this._log = [];
5
- const {
6
- offset: i,
7
- index: h
8
- } = t._mapPosToBlock(e) || (e < 0 ? (
9
- // first
10
- {
11
- index: 0,
12
- offset: 0
1
+ function s(t) {
2
+ "@babel/helpers - typeof";
3
+ return s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
4
+ return typeof e;
5
+ } : function(e) {
6
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
7
+ }, s(t);
8
+ }
9
+ function f(t, e) {
10
+ if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
11
+ }
12
+ function l(t, e) {
13
+ for (var r = 0; r < e.length; r++) {
14
+ var n = e[r];
15
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, g(n.key), n);
16
+ }
17
+ }
18
+ function p(t, e, r) {
19
+ return e && l(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
20
+ }
21
+ function g(t) {
22
+ var e = x(t, "string");
23
+ return s(e) == "symbol" ? e : e + "";
24
+ }
25
+ function x(t, e) {
26
+ if (s(t) != "object" || !t) return t;
27
+ var r = t[Symbol.toPrimitive];
28
+ if (r !== void 0) {
29
+ var n = r.call(t, e);
30
+ if (s(n) != "object") return n;
31
+ throw new TypeError("@@toPrimitive must return a primitive value.");
32
+ }
33
+ return String(t);
34
+ }
35
+ var y = /* @__PURE__ */ (function() {
36
+ function t() {
37
+ f(this, t);
38
+ }
39
+ return p(t, [{
40
+ key: "parse",
41
+ value: function(r) {
42
+ if (this.context = [{
43
+ or: !0,
44
+ instructions: []
45
+ }], this.parsePattern(r), this.context.length !== 1)
46
+ throw new Error("Non-finalized contexts left when pattern parse ended");
47
+ var n = this.context[0], i = n.branches, o = n.instructions;
48
+ if (i)
49
+ return {
50
+ op: "|",
51
+ args: i.concat([a(o)])
52
+ };
53
+ if (o.length === 0)
54
+ throw new Error("Pattern is required");
55
+ return o.length === 1 ? o[0] : o;
56
+ }
57
+ }, {
58
+ key: "startContext",
59
+ value: function(r) {
60
+ this.context.push(r);
61
+ }
62
+ }, {
63
+ key: "endContext",
64
+ value: function() {
65
+ this.context.pop();
66
+ }
67
+ }, {
68
+ key: "getContext",
69
+ value: function() {
70
+ return this.context[this.context.length - 1];
71
+ }
72
+ }, {
73
+ key: "parsePattern",
74
+ value: function(r) {
75
+ if (!r)
76
+ throw new Error("Pattern is required");
77
+ var n = r.match(w);
78
+ if (!n) {
79
+ if (C.test(r))
80
+ throw new Error("Illegal characters found in a pattern: ".concat(r));
81
+ this.getContext().instructions = this.getContext().instructions.concat(r.split(""));
82
+ return;
13
83
  }
14
- ) : (
15
- // last
16
- {
17
- index: this.masked._blocks.length,
18
- offset: 0
84
+ var i = n[1], o = r.slice(0, n.index), c = r.slice(n.index + i.length);
85
+ switch (i) {
86
+ case "(?:":
87
+ o && this.parsePattern(o), this.startContext({
88
+ or: !0,
89
+ instructions: [],
90
+ branches: []
91
+ });
92
+ break;
93
+ case ")":
94
+ if (!this.getContext().or)
95
+ throw new Error('")" operator must be preceded by "(?:" operator');
96
+ if (o && this.parsePattern(o), this.getContext().instructions.length === 0)
97
+ throw new Error('No instructions found after "|" operator in an "or" group');
98
+ var h = this.getContext(), u = h.branches;
99
+ u.push(a(this.getContext().instructions)), this.endContext(), this.getContext().instructions.push({
100
+ op: "|",
101
+ args: u
102
+ });
103
+ break;
104
+ case "|":
105
+ if (!this.getContext().or)
106
+ throw new Error('"|" operator can only be used inside "or" groups');
107
+ if (o && this.parsePattern(o), !this.getContext().branches)
108
+ if (this.context.length === 1)
109
+ this.getContext().branches = [];
110
+ else
111
+ throw new Error('"branches" not found in an "or" group context');
112
+ this.getContext().branches.push(a(this.getContext().instructions)), this.getContext().instructions = [];
113
+ break;
114
+ case "[":
115
+ o && this.parsePattern(o), this.startContext({
116
+ oneOfSet: !0
117
+ });
118
+ break;
119
+ case "]":
120
+ if (!this.getContext().oneOfSet)
121
+ throw new Error('"]" operator must be preceded by "[" operator');
122
+ this.endContext(), this.getContext().instructions.push({
123
+ op: "[]",
124
+ args: b(o)
125
+ });
126
+ break;
127
+ /* istanbul ignore next */
128
+ default:
129
+ throw new Error("Unknown operator: ".concat(i));
19
130
  }
20
- ));
21
- this.offset = i, this.index = h, this.ok = !1;
22
- }
23
- get block() {
24
- return this.masked._blocks[this.index];
25
- }
26
- get pos() {
27
- return this.masked._blockStartPos(this.index) + this.offset;
28
- }
29
- get state() {
30
- return {
31
- index: this.index,
32
- offset: this.offset,
33
- ok: this.ok
34
- };
35
- }
36
- set state(t) {
37
- Object.assign(this, t);
38
- }
39
- pushState() {
40
- this._log.push(this.state);
41
- }
42
- popState() {
43
- const t = this._log.pop();
44
- return t && (this.state = t), t;
45
- }
46
- bindBlock() {
47
- this.block || (this.index < 0 && (this.index = 0, this.offset = 0), this.index >= this.masked._blocks.length && (this.index = this.masked._blocks.length - 1, this.offset = this.block.displayValue.length));
48
- }
49
- _pushLeft(t) {
50
- for (this.pushState(), this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((e = this.block) == null ? void 0 : e.displayValue.length) || 0) {
51
- var e;
52
- if (t()) return this.ok = !0;
131
+ c && this.parsePattern(c);
53
132
  }
54
- return this.ok = !1;
55
- }
56
- _pushRight(t) {
57
- for (this.pushState(), this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0)
58
- if (t()) return this.ok = !0;
59
- return this.ok = !1;
60
- }
61
- pushLeftBeforeFilled() {
62
- return this._pushLeft(() => {
63
- if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, s.FORCE_LEFT), this.offset !== 0))
64
- return !0;
65
- });
66
- }
67
- pushLeftBeforeInput() {
68
- return this._pushLeft(() => {
69
- if (!this.block.isFixed)
70
- return this.offset = this.block.nearestInputPos(this.offset, s.LEFT), !0;
71
- });
72
- }
73
- pushLeftBeforeRequired() {
74
- return this._pushLeft(() => {
75
- if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
76
- return this.offset = this.block.nearestInputPos(this.offset, s.LEFT), !0;
77
- });
78
- }
79
- pushRightBeforeFilled() {
80
- return this._pushRight(() => {
81
- if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, s.FORCE_RIGHT), this.offset !== this.block.value.length))
82
- return !0;
83
- });
84
- }
85
- pushRightBeforeInput() {
86
- return this._pushRight(() => {
87
- if (!this.block.isFixed)
88
- return this.offset = this.block.nearestInputPos(this.offset, s.NONE), !0;
89
- });
90
- }
91
- pushRightBeforeRequired() {
92
- return this._pushRight(() => {
93
- if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
94
- return this.offset = this.block.nearestInputPos(this.offset, s.NONE), !0;
95
- });
96
- }
133
+ }]);
134
+ })();
135
+ function b(t) {
136
+ for (var e = [], r = 0; r < t.length; ) {
137
+ if (t[r] === "-") {
138
+ if (r === 0 || r === t.length - 1)
139
+ throw new Error("Couldn't parse a one-of set pattern: ".concat(t));
140
+ for (var n = t[r - 1].charCodeAt(0) + 1, i = t[r + 1].charCodeAt(0) - 1, o = n; o <= i; )
141
+ e.push(String.fromCharCode(o)), o++;
142
+ } else
143
+ e.push(t[r]);
144
+ r++;
145
+ }
146
+ return e;
147
+ }
148
+ var C = /[\(\)\[\]\?\:\|]/, w = new RegExp(
149
+ // any of:
150
+ "(\\||\\(\\?\\:|\\)|\\[|\\])"
151
+ );
152
+ function a(t) {
153
+ return t.length === 1 ? t[0] : t;
97
154
  }
98
155
  export {
99
- f as default
156
+ y as default
100
157
  };
101
158
  //# sourceMappingURL=index219.js.map